]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Migrate frontend prefix to -pngx
authorshamoon <4887959+shamoon@users.noreply.github.com>
Thu, 14 Sep 2023 21:03:28 +0000 (14:03 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Thu, 14 Sep 2023 21:51:02 +0000 (14:51 -0700)
111 files changed:
src-ui/.eslintrc.json
src-ui/angular.json
src-ui/e2e/dashboard/dashboard.spec.ts
src-ui/e2e/document-detail/document-detail.spec.ts
src-ui/e2e/document-list/document-list.spec.ts
src-ui/src/app/app.component.html
src-ui/src/app/app.component.ts
src-ui/src/app/components/app-frame/app-frame.component.html
src-ui/src/app/components/app-frame/app-frame.component.ts
src-ui/src/app/components/common/clearable-badge/clearable-badge.component.ts
src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.ts
src-ui/src/app/components/common/date-dropdown/date-dropdown.component.html
src-ui/src/app/components/common/date-dropdown/date-dropdown.component.ts
src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html
src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts
src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.html
src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts
src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.html
src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.ts
src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.html
src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts
src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.html
src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts
src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html
src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts
src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.html
src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts
src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.html
src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts
src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html
src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.spec.ts
src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts
src-ui/src/app/components/common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component.html
src-ui/src/app/components/common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component.ts
src-ui/src/app/components/common/input/check/check.component.ts
src-ui/src/app/components/common/input/color/color.component.ts
src-ui/src/app/components/common/input/date/date.component.ts
src-ui/src/app/components/common/input/number/number.component.ts
src-ui/src/app/components/common/input/password/password.component.ts
src-ui/src/app/components/common/input/permissions/permissions-form/permissions-form.component.html
src-ui/src/app/components/common/input/permissions/permissions-form/permissions-form.component.ts
src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.ts
src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.ts
src-ui/src/app/components/common/input/select/select.component.ts
src-ui/src/app/components/common/input/tags/tags.component.html
src-ui/src/app/components/common/input/tags/tags.component.ts
src-ui/src/app/components/common/input/text/text.component.ts
src-ui/src/app/components/common/logo/logo.component.ts
src-ui/src/app/components/common/page-header/page-header.component.ts
src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.html
src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.ts
src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.html
src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.ts
src-ui/src/app/components/common/permissions-select/permissions-select.component.ts
src-ui/src/app/components/common/select-dialog/select-dialog.component.html
src-ui/src/app/components/common/select-dialog/select-dialog.component.ts
src-ui/src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts
src-ui/src/app/components/common/tag/tag.component.ts
src-ui/src/app/components/common/toasts/toasts.component.ts
src-ui/src/app/components/dashboard/dashboard.component.html
src-ui/src/app/components/dashboard/dashboard.component.ts
src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html
src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts
src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html
src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.ts
src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html
src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts
src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.ts
src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.spec.ts
src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.ts
src-ui/src/app/components/document-asn/document-asn.component.ts
src-ui/src/app/components/document-detail/document-detail.component.html
src-ui/src/app/components/document-detail/document-detail.component.ts
src-ui/src/app/components/document-detail/metadata-collapse/metadata-collapse.component.ts
src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html
src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts
src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html
src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts
src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html
src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts
src-ui/src/app/components/document-list/document-list.component.html
src-ui/src/app/components/document-list/document-list.component.ts
src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html
src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts
src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html
src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.ts
src-ui/src/app/components/document-notes/document-notes.component.html
src-ui/src/app/components/document-notes/document-notes.component.ts
src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts
src-ui/src/app/components/manage/document-type-list/document-type-list.component.ts
src-ui/src/app/components/manage/logs/logs.component.html
src-ui/src/app/components/manage/logs/logs.component.ts
src-ui/src/app/components/manage/management-list/management-list.component.html
src-ui/src/app/components/manage/settings/settings.component.html
src-ui/src/app/components/manage/settings/settings.component.ts
src-ui/src/app/components/manage/storage-path-list/storage-path-list.component.ts
src-ui/src/app/components/manage/tag-list/tag-list.component.ts
src-ui/src/app/components/manage/tasks/tasks.component.html
src-ui/src/app/components/manage/tasks/tasks.component.ts
src-ui/src/app/components/not-found/not-found.component.html
src-ui/src/app/components/not-found/not-found.component.ts
src-ui/src/app/directives/if-object-permissions.directive.spec.ts
src-ui/src/app/directives/if-object-permissions.directive.ts
src-ui/src/app/directives/if-owner.directive.spec.ts
src-ui/src/app/directives/if-owner.directive.ts
src-ui/src/app/directives/if-permissions.directive.spec.ts
src-ui/src/app/directives/if-permissions.directive.ts
src-ui/src/app/directives/sortable.directive.spec.ts
src-ui/src/app/directives/sortable.directive.ts
src-ui/src/index.html
src/documents/templates/index.html

index b036bf6ad94e21216baf7607260c88bc2ff9f5d6..12b35ce26133f05a1a0cebf1d27bba3f9c82cff4 100644 (file)
@@ -24,7 +24,7 @@
           "error",
           {
             "type": "attribute",
-            "prefix": "app",
+            "prefix": "pngx",
             "style": "camelCase"
           }
         ],
@@ -32,7 +32,7 @@
           "error",
           {
             "type": "element",
-            "prefix": "app",
+            "prefix": "pngx",
             "style": "kebab-case"
           }
         ]
index 4ba862aed29fea4c7d5c8dfdfc509929a3d89105..03f86da3453ae659fab2a8c3c296f4c94bdbae04 100644 (file)
@@ -12,7 +12,7 @@
       },
       "root": "",
       "sourceRoot": "src",
-      "prefix": "app",
+      "prefix": "pngx",
       "i18n": {
         "sourceLocale": "en-US",
         "locales": {
index ff22c490e284652e5f451419806595129e2fe10e..34bbc4949bc127e58231f9d94050608004002159 100644 (file)
@@ -10,7 +10,7 @@ test('dashboard inbox link', async ({ page }) => {
   await page.goto('/dashboard')
   await page.getByRole('link', { name: 'Documents in inbox' }).click()
   await expect(page).toHaveURL(/tags__id__all=9/)
-  await expect(page.locator('app-document-list')).toHaveText(/8 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/8 documents/)
 })
 
 test('dashboard total documents link', async ({ page }) => {
@@ -18,7 +18,7 @@ test('dashboard total documents link', async ({ page }) => {
   await page.goto('/dashboard')
   await page.getByRole('link').filter({ hasText: 'Total documents' }).click()
   await expect(page).toHaveURL(/documents/)
-  await expect(page.locator('app-document-list')).toHaveText(/61 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/61 documents/)
   await page.getByRole('button', { name: 'Reset filters' })
 })
 
@@ -26,19 +26,19 @@ test('dashboard saved view show all', async ({ page }) => {
   await page.routeFromHAR(REQUESTS_HAR3, { notFound: 'fallback' })
   await page.goto('/dashboard')
   await page
-    .locator('app-widget-frame')
+    .locator('pngx-widget-frame')
     .filter({ hasText: 'Inbox' })
     .getByRole('link', { name: 'Show all' })
     .click()
   await expect(page).toHaveURL(/view\/7/)
-  await expect(page.locator('app-document-list')).toHaveText(/8 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/8 documents/)
 })
 
 test('dashboard saved view document links', async ({ page }) => {
   await page.routeFromHAR(REQUESTS_HAR4, { notFound: 'fallback' })
   await page.goto('/dashboard')
   await page
-    .locator('app-widget-frame')
+    .locator('pngx-widget-frame')
     .filter({ hasText: 'Inbox' })
     .locator('table')
     .getByRole('link', { name: /test/ })
index 8248db04bdfe1035c762eac3e503e2cf7f09c757..1bc2b6aa911a5323b0b4521679aa56c159105d90 100644 (file)
@@ -8,7 +8,7 @@ test('should activate / deactivate save button when changes are saved', async ({
 }) => {
   await page.routeFromHAR(REQUESTS_HAR, { notFound: 'fallback' })
   await page.goto('/documents/175/')
-  await page.waitForSelector('app-document-detail app-input-text:first-child')
+  await page.waitForSelector('pngx-document-detail pngx-input-text:first-child')
   await expect(page.getByTitle('Storage path', { exact: true })).toHaveText(
     /\w+/
   )
@@ -85,7 +85,7 @@ test('should show a mobile preview', async ({ page }) => {
 test('should show a list of notes', async ({ page }) => {
   await page.routeFromHAR(REQUESTS_HAR, { notFound: 'fallback' })
   await page.goto('/documents/175/notes')
-  await expect(page.locator('app-document-notes')).toBeVisible()
+  await expect(page.locator('pngx-document-notes')).toBeVisible()
   await expect(
     await page.getByRole('button', {
       name: /delete note/i,
index 9bd86bb1d4859aecafc7152639985615ca1116f0..06b512a286418d1c77a9672e5346ee787d622ef2 100644 (file)
@@ -13,33 +13,33 @@ test('basic filtering', async ({ page }) => {
   await page.getByRole('button', { name: 'Tags' }).click()
   await page.getByRole('menuitem', { name: 'Inbox' }).click()
   await expect(page).toHaveURL(/tags__id__all=9/)
-  await expect(page.locator('app-document-list')).toHaveText(/8 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/8 documents/)
   await page.getByRole('button', { name: 'Document type' }).click()
   await page.getByRole('menuitem', { name: 'Invoice Test 3' }).click()
   await expect(page).toHaveURL(/document_type__id__in=1/)
-  await expect(page.locator('app-document-list')).toHaveText(/3 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/3 documents/)
   await page.getByRole('button', { name: 'Reset filters' }).first().click()
   await page.getByRole('button', { name: 'Correspondent' }).click()
   await page.getByRole('menuitem', { name: 'Test Correspondent 1' }).click()
   await page.getByRole('menuitem', { name: 'Correspondent 9' }).click()
   await expect(page).toHaveURL(/correspondent__id__in=12,1/)
-  await expect(page.locator('app-document-list')).toHaveText(/7 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/7 documents/)
   await page
-    .locator('app-filter-editor')
+    .locator('pngx-filter-editor')
     .getByTitle('Correspondent')
     .getByText('Exclude')
     .click()
   await expect(page).toHaveURL(/correspondent__id__none=12,1/)
-  await expect(page.locator('app-document-list')).toHaveText(/54 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/54 documents/)
   // clear button
   await page.getByRole('button', { name: '2 selected', exact: true }).click()
-  await expect(page.locator('app-document-list')).toHaveText(/61 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/61 documents/)
   await page.getByRole('button', { name: 'Storage path' }).click()
   await page.getByRole('menuitem', { name: 'Testing 12' }).click()
   await expect(page).toHaveURL(/storage_path__id__in=5/)
-  await expect(page.locator('app-document-list')).toHaveText(/8 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/8 documents/)
   await page.getByRole('button', { name: 'Reset filters' }).first().click()
-  await expect(page.locator('app-document-list')).toHaveText(/61 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/61 documents/)
 })
 
 test('text filtering', async ({ page }) => {
@@ -47,35 +47,35 @@ test('text filtering', async ({ page }) => {
   await page.goto('/documents')
   await page.getByRole('textbox').click()
   await page.getByRole('textbox').fill('test')
-  await expect(page.locator('app-document-list')).toHaveText(/32 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/32 documents/)
   await expect(page).toHaveURL(/title_content=test/)
   await page.getByRole('button', { name: 'Title & content' }).click()
   await page.getByRole('button', { name: 'Title', exact: true }).click()
-  await expect(page.locator('app-document-list')).toHaveText(/9 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/9 documents/)
   await expect(page).toHaveURL(/title__icontains=test/)
   await page.getByRole('button', { name: 'Title', exact: true }).click()
   await page.getByRole('button', { name: 'Advanced search' }).click()
   await expect(page).toHaveURL(/query=test/)
-  await expect(page.locator('app-document-list')).toHaveText(/26 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/26 documents/)
   await page.getByRole('button', { name: 'Advanced search' }).click()
   await page.getByRole('button', { name: 'ASN' }).click()
   await page.getByRole('textbox').fill('1123')
   await expect(page).toHaveURL(/archive_serial_number=1123/)
-  await expect(page.locator('app-document-list')).toHaveText(/one document/i)
+  await expect(page.locator('pngx-document-list')).toHaveText(/one document/i)
   await page.locator('select').selectOption('greater')
   await page.getByRole('textbox').click()
   await page.getByRole('textbox').fill('1123')
   await expect(page).toHaveURL(/archive_serial_number__gt=1123/)
-  await expect(page.locator('app-document-list')).toHaveText(/5 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/5 documents/)
   await page.locator('select').selectOption('less')
   await expect(page).toHaveURL(/archive_serial_number__lt=1123/)
-  await expect(page.locator('app-document-list')).toHaveText(/0 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/0 documents/)
   await page.locator('select').selectOption('is null')
   await expect(page).toHaveURL(/archive_serial_number__isnull=1/)
-  await expect(page.locator('app-document-list')).toHaveText(/55 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/55 documents/)
   await page.locator('select').selectOption('not null')
   await expect(page).toHaveURL(/archive_serial_number__isnull=0/)
-  await expect(page.locator('app-document-list')).toHaveText(/6 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/6 documents/)
 })
 
 test('date filtering', async ({ page }) => {
@@ -83,7 +83,7 @@ test('date filtering', async ({ page }) => {
   await page.goto('/documents')
   await page.getByRole('button', { name: 'Created' }).click()
   await page.getByRole('menuitem', { name: 'Last 3 months' }).click()
-  await expect(page.locator('app-document-list')).toHaveText(/one document/i)
+  await expect(page.locator('pngx-document-list')).toHaveText(/one document/i)
   await page.getByRole('button', { name: 'Created Clear selected' }).click()
   await page.getByRole('button', { name: 'Created' }).click()
   await page
@@ -94,7 +94,7 @@ test('date filtering', async ({ page }) => {
   await page.getByRole('combobox', { name: 'Select year' }).selectOption('2022')
   await page.getByText('11', { exact: true }).click()
   await page.getByRole('button', { name: 'Title & content' }).click()
-  await expect(page.locator('app-document-list')).toHaveText(/2 documents/)
+  await expect(page.locator('pngx-document-list')).toHaveText(/2 documents/)
 })
 
 test('sorting', async ({ page }) => {
@@ -105,7 +105,7 @@ test('sorting', async ({ page }) => {
   await expect(page).toHaveURL(/sort=archive_serial_number/)
   await page.getByRole('button', { name: 'Sort' }).click()
   await page
-    .locator('app-page-header')
+    .locator('pngx-page-header')
     .getByRole('button', { name: 'Correspondent' })
     .click()
   await expect(page).toHaveURL(/sort=correspondent__name/)
@@ -114,7 +114,7 @@ test('sorting', async ({ page }) => {
   await expect(page).toHaveURL(/sort=title/)
   await page.getByRole('button', { name: 'Sort' }).click()
   await page
-    .locator('app-page-header')
+    .locator('pngx-page-header')
     .getByRole('button', { name: 'Document type' })
     .click()
   await expect(page).toHaveURL(/sort=document_type__name/)
@@ -138,42 +138,42 @@ test('sorting', async ({ page }) => {
 test('change views', async ({ page }) => {
   await page.routeFromHAR(REQUESTS_HAR5, { notFound: 'fallback' })
   await page.goto('/documents')
-  await page.locator('app-page-header label').first().click()
-  await expect(page.locator('app-document-list table')).toBeVisible()
-  await page.locator('app-page-header label').nth(1).click()
-  await expect(page.locator('app-document-card-small').first()).toBeAttached()
-  await page.locator('app-page-header label').nth(2).click()
-  await expect(page.locator('app-document-card-large').first()).toBeAttached()
+  await page.locator('pngx-page-header label').first().click()
+  await expect(page.locator('pngx-document-list table')).toBeVisible()
+  await page.locator('pngx-page-header label').nth(1).click()
+  await expect(page.locator('pngx-document-card-small').first()).toBeAttached()
+  await page.locator('pngx-page-header label').nth(2).click()
+  await expect(page.locator('pngx-document-card-large').first()).toBeAttached()
 })
 
 test('bulk edit', async ({ page }) => {
   await page.routeFromHAR(REQUESTS_HAR6, { notFound: 'fallback' })
   await page.goto('/documents')
 
-  await page.locator('app-document-card-small').nth(0).click()
+  await page.locator('pngx-document-card-small').nth(0).click()
   await page
-    .locator('app-document-card-small')
+    .locator('pngx-document-card-small')
     .nth(3)
     .click({
       modifiers: ['Shift'],
     })
 
-  await expect(page.locator('app-document-list')).toHaveText(
+  await expect(page.locator('pngx-document-list')).toHaveText(
     /Selected 4 of 61 documents/i
   )
 
   await page.getByRole('button', { name: 'Page' }).click()
-  await expect(page.locator('app-document-list')).toHaveText(
+  await expect(page.locator('pngx-document-list')).toHaveText(
     /Selected 50 of 61 documents/i
   )
   await page.getByRole('button', { name: 'All' }).click()
-  await expect(page.locator('app-document-list')).toHaveText(
+  await expect(page.locator('pngx-document-list')).toHaveText(
     /Selected 61 of 61 documents/i
   )
   await page.getByRole('button', { name: 'Cancel' }).click()
 
-  await page.locator('app-document-card-small').nth(1).click()
-  await page.locator('app-document-card-small').nth(2).click()
+  await page.locator('pngx-document-card-small').nth(1).click()
+  await page.locator('pngx-document-card-small').nth(2).click()
 
   await page.getByRole('button', { name: 'Tags' }).click()
   await page.getByRole('menuitem', { name: 'TagWithPartial' }).click()
index 84a4f595cd02e36f9bbc1648c4b98c05294100ad..7fbb8dc4a8b72b8efda6eed0b832dd930eb50feb 100644 (file)
@@ -1,4 +1,4 @@
-<app-toasts></app-toasts>
+<pngx-toasts></pngx-toasts>
 
 <ngx-file-drop dropZoneClassName="main-dropzone" contentClassName="main-content" [disabled]="!dragDropEnabled"
 (onFileDrop)="dropped($event)" (onFileOver)="fileOver()" (onFileLeave)="fileLeave()">
index e6718bbede69303c0d66669148fb115cea6c4d8b..ca8e5ab238db6b8466387e489a6856e395895a99 100644 (file)
@@ -16,7 +16,7 @@ import {
 } from './services/permissions.service'
 
 @Component({
-  selector: 'app-root',
+  selector: 'pngx-root',
   templateUrl: './app.component.html',
   styleUrls: ['./app.component.scss'],
 })
index 83fe13d81ea82f597c1bb901620a3f66e8c7389e..3d62c0932993faeeb84bb3b386bf2a320e926ece 100644 (file)
@@ -10,7 +10,7 @@
     </svg>
     <span class="ms-2" [class.visually-hidden]="slimSidebarEnabled" i18n="app title">Paperless-ngx</span>
   </a>
-  <div class="search-form-container flex-grow-1 py-2 pb-3 pb-sm-2 px-3 ps-md-4 me-sm-auto order-3 order-sm-1" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
+  <div class="search-form-container flex-grow-1 py-2 pb-3 pb-sm-2 px-3 ps-md-4 me-sm-auto order-3 order-sm-1" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
     <form (ngSubmit)="search()" class="form-inline flex-grow-1">
       <svg width="1em" height="1em" fill="currentColor">
         <use xlink:href="assets/bootstrap-icons.svg#search"/>
@@ -39,7 +39,7 @@
           <p class="small mb-0 px-3 text-muted" i18n>Logged in as {{this.settingsService.displayName}}</p>
           <div class="dropdown-divider"></div>
         </div>
-        <a ngbDropdownItem class="nav-link" routerLink="settings" (click)="closeMenu()" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.UISettings }">
+        <a ngbDropdownItem class="nav-link" routerLink="settings" (click)="closeMenu()" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.UISettings }">
           <svg class="sidebaricon me-2" fill="currentColor">
             <use xlink:href="assets/bootstrap-icons.svg#gear"/>
           </svg><ng-container i18n>Settings</ng-container>
@@ -72,7 +72,7 @@
               </svg><span>&nbsp;<ng-container i18n>Dashboard</ng-container></span>
             </a>
           </li>
-          <li class="nav-item" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
+          <li class="nav-item" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
             <a class="nav-link" routerLink="documents" routerLinkActive="active" (click)="closeMenu()" ngbPopover="Documents" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim">
               <svg class="sidebaricon" fill="currentColor">
                 <use xlink:href="assets/bootstrap-icons.svg#files"/>
@@ -80,7 +80,7 @@
             </a>
           </li>
         </ul>
-        <div *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.SavedView }">
+        <div *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.SavedView }">
           <h6 class="sidebar-heading px-3 mt-4 mb-1 text-muted" *ngIf='savedViewService.loading || savedViewService.sidebarViews.length > 0'>
             <span i18n>Saved views</span>
             <div *ngIf="savedViewService.loading" class="spinner-border spinner-border-sm fw-normal ms-2" role="status"></div>
@@ -96,7 +96,7 @@
           </ul>
         </div>
 
-        <div *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
+        <div *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
           <h6 class="sidebar-heading px-3 mt-4 mb-1 text-muted" *ngIf='openDocuments.length > 0'>
             <span i18n>Open documents</span>
           </h6>
           <span i18n>Manage</span>
         </h6>
         <ul class="nav flex-column mb-2">
-          <li class="nav-item" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Correspondent }">
+          <li class="nav-item" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Correspondent }">
             <a class="nav-link" routerLink="correspondents" routerLinkActive="active" (click)="closeMenu()" ngbPopover="Correspondents" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim">
               <svg class="sidebaricon" fill="currentColor">
                 <use xlink:href="assets/bootstrap-icons.svg#person"/>
               </svg><span>&nbsp;<ng-container i18n>Correspondents</ng-container></span>
             </a>
           </li>
-          <li class="nav-item" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Tag }" tourAnchor="tour.tags">
+          <li class="nav-item" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Tag }" tourAnchor="tour.tags">
             <a class="nav-link" routerLink="tags" routerLinkActive="active" (click)="closeMenu()" ngbPopover="Tags" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim">
               <svg class="sidebaricon" fill="currentColor">
                 <use xlink:href="assets/bootstrap-icons.svg#tags"/>
               </svg><span>&nbsp;<ng-container i18n>Tags</ng-container></span>
             </a>
           </li>
-          <li class="nav-item" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.DocumentType }">
+          <li class="nav-item" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.DocumentType }">
             <a class="nav-link" routerLink="documenttypes" routerLinkActive="active" (click)="closeMenu()" ngbPopover="Document types" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim">
               <svg class="sidebaricon" fill="currentColor">
                 <use xlink:href="assets/bootstrap-icons.svg#hash"/>
               </svg><span>&nbsp;<ng-container i18n>Document types</ng-container></span>
             </a>
           </li>
-          <li class="nav-item" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.StoragePath }">
+          <li class="nav-item" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.StoragePath }">
             <a class="nav-link" routerLink="storagepaths" routerLinkActive="active" (click)="closeMenu()" ngbPopover="Storage paths" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim">
               <svg class="sidebaricon" fill="currentColor">
                 <use xlink:href="assets/bootstrap-icons.svg#folder"/>
               </svg><span>&nbsp;<ng-container i18n>Storage paths</ng-container></span>
             </a>
           </li>
-          <li class="nav-item" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.PaperlessTask }" tourAnchor="tour.file-tasks">
+          <li class="nav-item" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.PaperlessTask }" tourAnchor="tour.file-tasks">
             <a class="nav-link" routerLink="tasks" routerLinkActive="active" (click)="closeMenu()" ngbPopover="File Tasks" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim">
               <span *ngIf="tasksService.failedFileTasks.length > 0 && slimSidebarEnabled" class="badge bg-danger position-absolute top-0 end-0">{{tasksService.failedFileTasks.length}}</span>
               <svg class="sidebaricon" fill="currentColor">
               </svg><span>&nbsp;<ng-container i18n>File Tasks<span *ngIf="tasksService.failedFileTasks.length > 0"><span class="badge bg-danger ms-2">{{tasksService.failedFileTasks.length}}</span></span></ng-container></span>
             </a>
           </li>
-          <li class="nav-item" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Admin }">
+          <li class="nav-item" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Admin }">
             <a class="nav-link" routerLink="logs" routerLinkActive="active" (click)="closeMenu()" ngbPopover="Logs" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim">
               <svg class="sidebaricon" fill="currentColor">
                 <use xlink:href="assets/bootstrap-icons.svg#text-left"/>
               </svg><span>&nbsp;<ng-container i18n>Logs</ng-container></span>
             </a>
           </li>
-          <li class="nav-item" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.UISettings }" tourAnchor="tour.settings">
+          <li class="nav-item" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.UISettings }" tourAnchor="tour.settings">
             <a class="nav-link" routerLink="settings" routerLinkActive="active" (click)="closeMenu()" ngbPopover="Settings" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" container="body" triggers="mouseenter:mouseleave" popoverClass="popover-slim">
               <svg class="sidebaricon" fill="currentColor">
                 <use xlink:href="assets/bootstrap-icons.svg#gear"/>
index 930b74de31458dc7a5ca8c5efdc53012fe82ed37..01c1345da8a2c8900fa19afe0b3d9929195bef96 100644 (file)
@@ -34,7 +34,7 @@ import {
 } from 'src/app/services/permissions.service'
 
 @Component({
-  selector: 'app-app-frame',
+  selector: 'pngx-app-frame',
   templateUrl: './app-frame.component.html',
   styleUrls: ['./app-frame.component.scss'],
 })
index 0f0b7d64f197c914ab2ed0f6a1f2352eb2d16ce3..89648934b59363e45307e2a1773d96793c2403d8 100644 (file)
@@ -1,7 +1,7 @@
 import { Component, Input, Output, EventEmitter } from '@angular/core'
 
 @Component({
-  selector: 'app-clearable-badge',
+  selector: 'pngx-clearable-badge',
   templateUrl: './clearable-badge.component.html',
   styleUrls: ['./clearable-badge.component.scss'],
 })
index 3cd90f2f4f25bb500c2ad69e4e72ddfd405b531b..4ab2af257e688027b2a96e24cb74a54f3c779893 100644 (file)
@@ -3,7 +3,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
 import { interval, Subject, take } from 'rxjs'
 
 @Component({
-  selector: 'app-confirm-dialog',
+  selector: 'pngx-confirm-dialog',
   templateUrl: './confirm-dialog.component.html',
   styleUrls: ['./confirm-dialog.component.scss'],
 })
index 4f9410bee2bb9f7ecb915df4b64961f8f79c5d9f..2b58048299e1af76d160d24215d39120aabcee95 100644 (file)
@@ -1,7 +1,7 @@
   <div class="btn-group w-100" ngbDropdown role="group">
   <button class="btn btn-sm" id="dropdown{{title}}" ngbDropdownToggle [ngClass]="dateBefore || dateAfter ? 'btn-primary' : 'btn-outline-primary'" [disabled]="disabled">
     {{title}}
-    <app-clearable-badge [selected]="isActive" (cleared)="reset()"></app-clearable-badge><span class="visually-hidden">selected</span>
+    <pngx-clearable-badge [selected]="isActive" (cleared)="reset()"></pngx-clearable-badge><span class="visually-hidden">selected</span>
   </button>
   <div class="dropdown-menu date-dropdown shadow pt-0" ngbDropdownMenu attr.aria-labelledby="dropdown{{title}}">
     <div class="list-group list-group-flush">
index d8d482033e5690ce0dedd1589fdde83e2781c627..f4748969913c0427b6d43aeb86b2ac05737b7972 100644 (file)
@@ -26,7 +26,7 @@ export enum RelativeDate {
 }
 
 @Component({
-  selector: 'app-date-dropdown',
+  selector: 'pngx-date-dropdown',
   templateUrl: './date-dropdown.component.html',
   styleUrls: ['./date-dropdown.component.scss'],
   providers: [{ provide: NgbDateAdapter, useClass: ISODateAdapter }],
index b04cfb216ae46b53343ba63d0a8c379518e78352..c7376ffb29803171a26fb5cc746e25c571b4a40b 100644 (file)
@@ -6,13 +6,13 @@
   </div>
   <div class="modal-body">
 
-    <app-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></app-input-text>
-    <app-input-select i18n-title title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></app-input-select>
-    <app-input-text *ngIf="patternRequired" i18n-title title="Matching pattern" formControlName="match" [error]="error?.match"></app-input-text>
-    <app-input-check *ngIf="patternRequired" i18n-title title="Case insensitive" formControlName="is_insensitive" novalidate></app-input-check>
+    <pngx-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></pngx-input-text>
+    <pngx-input-select i18n-title title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></pngx-input-select>
+    <pngx-input-text *ngIf="patternRequired" i18n-title title="Matching pattern" formControlName="match" [error]="error?.match"></pngx-input-text>
+    <pngx-input-check *ngIf="patternRequired" i18n-title title="Case insensitive" formControlName="is_insensitive" novalidate></pngx-input-check>
 
-    <div *appIfOwner="object">
-      <app-permissions-form [users]="users" accordion="true" formControlName="permissions_form"></app-permissions-form>
+    <div *pngxIfOwner="object">
+      <pngx-permissions-form [users]="users" accordion="true" formControlName="permissions_form"></pngx-permissions-form>
     </div>
 
   </div>
index 89aa68f84261ce66f5e78931086fb47907b5203a..6c290af1b4d0488840017b5a6d69a166f1b7725d 100644 (file)
@@ -9,7 +9,7 @@ import { UserService } from 'src/app/services/rest/user.service'
 import { SettingsService } from 'src/app/services/settings.service'
 
 @Component({
-  selector: 'app-correspondent-edit-dialog',
+  selector: 'pngx-correspondent-edit-dialog',
   templateUrl: './correspondent-edit-dialog.component.html',
   styleUrls: ['./correspondent-edit-dialog.component.scss'],
 })
index ee6f60b2a4660325c58b7363bf2cbec7a43f7c97..693736d41114009930471aeb686906ca1389d0f1 100644 (file)
@@ -7,14 +7,14 @@
     <div class="modal-body">
 
       <div class="col">
-        <app-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></app-input-text>
-        <app-input-select i18n-title title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></app-input-select>
-        <app-input-text *ngIf="patternRequired" i18n-title title="Matching pattern" formControlName="match" [error]="error?.match"></app-input-text>
-        <app-input-check *ngIf="patternRequired" i18n-title title="Case insensitive" formControlName="is_insensitive"></app-input-check>
+        <pngx-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></pngx-input-text>
+        <pngx-input-select i18n-title title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></pngx-input-select>
+        <pngx-input-text *ngIf="patternRequired" i18n-title title="Matching pattern" formControlName="match" [error]="error?.match"></pngx-input-text>
+        <pngx-input-check *ngIf="patternRequired" i18n-title title="Case insensitive" formControlName="is_insensitive"></pngx-input-check>
       </div>
 
-      <div *appIfOwner="object">
-        <app-permissions-form [users]="users" accordion="true" formControlName="permissions_form"></app-permissions-form>
+      <div *pngxIfOwner="object">
+        <pngx-permissions-form [users]="users" accordion="true" formControlName="permissions_form"></pngx-permissions-form>
       </div>
 
     </div>
index e469cdd003b6a0535d03f31bfd394c14b7217746..7450a5bc6476ccbe382923f31452a66928b5cecc 100644 (file)
@@ -9,7 +9,7 @@ import { UserService } from 'src/app/services/rest/user.service'
 import { SettingsService } from 'src/app/services/settings.service'
 
 @Component({
-  selector: 'app-document-type-edit-dialog',
+  selector: 'pngx-document-type-edit-dialog',
   templateUrl: './document-type-edit-dialog.component.html',
   styleUrls: ['./document-type-edit-dialog.component.scss'],
 })
index 97124a05f475605cd597d41bad893a8fd3119b1a..d200853bbf28b6d838fa0fd7b811c3ede0c54733 100644 (file)
@@ -7,8 +7,8 @@
     <div class="modal-body">
       <div class="row">
         <div class="col">
-          <app-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></app-input-text>
-          <app-permissions-select i18n-title title="Permissions" formControlName="permissions" [error]="error?.permissions"></app-permissions-select>
+          <pngx-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></pngx-input-text>
+          <pngx-permissions-select i18n-title title="Permissions" formControlName="permissions" [error]="error?.permissions"></pngx-permissions-select>
         </div>
       </div>
     </div>
index 85f6d9efdb745e164f33727a2f7c4432aa8f4c21..aec1ec05ebbad49dfd53f1157190cacf7caffdb5 100644 (file)
@@ -8,7 +8,7 @@ import { UserService } from 'src/app/services/rest/user.service'
 import { SettingsService } from 'src/app/services/settings.service'
 
 @Component({
-  selector: 'app-group-edit-dialog',
+  selector: 'pngx-group-edit-dialog',
   templateUrl: './group-edit-dialog.component.html',
   styleUrls: ['./group-edit-dialog.component.scss'],
 })
index dbdf5739759f848cdc2f4b2b1760d11ec988d68e..672e0e5b9eb23bcef3c98bf0b764acc461d4c2c3 100644 (file)
@@ -7,16 +7,16 @@
   <div class="modal-body">
     <div class="row">
       <div class="col">
-        <app-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></app-input-text>
-        <app-input-text i18n-title title="IMAP Server" formControlName="imap_server" [error]="error?.imap_server"></app-input-text>
-        <app-input-text i18n-title title="IMAP Port" formControlName="imap_port" [error]="error?.imap_port"></app-input-text>
-        <app-input-select i18n-title title="IMAP Security" [items]="imapSecurityOptions" formControlName="imap_security"></app-input-select>
+        <pngx-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></pngx-input-text>
+        <pngx-input-text i18n-title title="IMAP Server" formControlName="imap_server" [error]="error?.imap_server"></pngx-input-text>
+        <pngx-input-text i18n-title title="IMAP Port" formControlName="imap_port" [error]="error?.imap_port"></pngx-input-text>
+        <pngx-input-select i18n-title title="IMAP Security" [items]="imapSecurityOptions" formControlName="imap_security"></pngx-input-select>
       </div>
       <div class="col">
-        <app-input-text i18n-title title="Username" formControlName="username" [error]="error?.username"></app-input-text>
-        <app-input-password i18n-title title="Password" formControlName="password" [error]="error?.password"></app-input-password>
-        <app-input-check i18n-title title="Password is token" i18n-hint hint="Check if the password above is a token used for authentication" formControlName="is_token" [error]="error?.is_token"></app-input-check>
-        <app-input-text i18n-title title="Character Set" formControlName="character_set" [error]="error?.character_set"></app-input-text>
+        <pngx-input-text i18n-title title="Username" formControlName="username" [error]="error?.username"></pngx-input-text>
+        <pngx-input-password i18n-title title="Password" formControlName="password" [error]="error?.password"></pngx-input-password>
+        <pngx-input-check i18n-title title="Password is token" i18n-hint hint="Check if the password above is a token used for authentication" formControlName="is_token" [error]="error?.is_token"></pngx-input-check>
+        <pngx-input-text i18n-title title="Character Set" formControlName="character_set" [error]="error?.character_set"></pngx-input-text>
       </div>
     </div>
   </div>
index d19c422413c4b305cd7ea203e2d7ab4ebb8a1791..59e01d30ec09d1d3fa1fdd26cc76fa835afd5625 100644 (file)
@@ -17,7 +17,7 @@ const IMAP_SECURITY_OPTIONS = [
 ]
 
 @Component({
-  selector: 'app-mail-account-edit-dialog',
+  selector: 'pngx-mail-account-edit-dialog',
   templateUrl: './mail-account-edit-dialog.component.html',
   styleUrls: ['./mail-account-edit-dialog.component.scss'],
 })
index b9802ea2ace90b37c848f9fa0628b2c639a68620..9dcefa0640827a202688d377a8c1af6fd5d372b6 100644 (file)
@@ -7,30 +7,30 @@
   <div class="modal-body">
     <div class="row">
       <div class="col">
-        <app-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></app-input-text>
-        <app-input-select i18n-title title="Account" [items]="accounts" formControlName="account"></app-input-select>
-        <app-input-text i18n-title title="Folder" formControlName="folder" i18n-hint hint="Subfolders must be separated by a delimiter, often a dot ('.') or slash ('/'), but it varies by mail server." [error]="error?.folder"></app-input-text>
-        <app-input-number i18n-title title="Maximum age (days)" formControlName="maximum_age" [showAdd]="false" [error]="error?.maximum_age"></app-input-number>
-        <app-input-select i18n-title title="Attachment type" [items]="attachmentTypeOptions" formControlName="attachment_type"></app-input-select>
-        <app-input-select i18n-title title="Consumption scope" [items]="consumptionScopeOptions" formControlName="consumption_scope" i18n-hint hint="See docs for .eml processing requirements"></app-input-select>
-        <app-input-number i18n-title title="Rule order" formControlName="order" [showAdd]="false" [error]="error?.order"></app-input-number>
+        <pngx-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></pngx-input-text>
+        <pngx-input-select i18n-title title="Account" [items]="accounts" formControlName="account"></pngx-input-select>
+        <pngx-input-text i18n-title title="Folder" formControlName="folder" i18n-hint hint="Subfolders must be separated by a delimiter, often a dot ('.') or slash ('/'), but it varies by mail server." [error]="error?.folder"></pngx-input-text>
+        <pngx-input-number i18n-title title="Maximum age (days)" formControlName="maximum_age" [showAdd]="false" [error]="error?.maximum_age"></pngx-input-number>
+        <pngx-input-select i18n-title title="Attachment type" [items]="attachmentTypeOptions" formControlName="attachment_type"></pngx-input-select>
+        <pngx-input-select i18n-title title="Consumption scope" [items]="consumptionScopeOptions" formControlName="consumption_scope" i18n-hint hint="See docs for .eml processing requirements"></pngx-input-select>
+        <pngx-input-number i18n-title title="Rule order" formControlName="order" [showAdd]="false" [error]="error?.order"></pngx-input-number>
       </div>
       <div class="col">
         <p class="small" i18n>Paperless will only process mails that match <em>all</em> of the filters specified below.</p>
-        <app-input-text i18n-title title="Filter from" formControlName="filter_from" [error]="error?.filter_from"></app-input-text>
-        <app-input-text i18n-title title="Filter to" formControlName="filter_to" [error]="error?.filter_to"></app-input-text>
-        <app-input-text i18n-title title="Filter subject" formControlName="filter_subject" [error]="error?.filter_subject"></app-input-text>
-        <app-input-text i18n-title title="Filter body" formControlName="filter_body" [error]="error?.filter_body"></app-input-text>
-        <app-input-text i18n-title title="Filter attachment filename" formControlName="filter_attachment_filename" i18n-hint hint="Only consume documents which entirely match this filename if specified. Wildcards such as *.pdf or *invoice* are allowed. Case insensitive." [error]="error?.filter_attachment_filename"></app-input-text>
+        <pngx-input-text i18n-title title="Filter from" formControlName="filter_from" [error]="error?.filter_from"></pngx-input-text>
+        <pngx-input-text i18n-title title="Filter to" formControlName="filter_to" [error]="error?.filter_to"></pngx-input-text>
+        <pngx-input-text i18n-title title="Filter subject" formControlName="filter_subject" [error]="error?.filter_subject"></pngx-input-text>
+        <pngx-input-text i18n-title title="Filter body" formControlName="filter_body" [error]="error?.filter_body"></pngx-input-text>
+        <pngx-input-text i18n-title title="Filter attachment filename" formControlName="filter_attachment_filename" i18n-hint hint="Only consume documents which entirely match this filename if specified. Wildcards such as *.pdf or *invoice* are allowed. Case insensitive." [error]="error?.filter_attachment_filename"></pngx-input-text>
       </div>
       <div class="col">
-        <app-input-select i18n-title title="Action" [items]="actionOptions" formControlName="action" i18n-hint hint="Action is only performed when documents are consumed from the mail. Mails without attachments remain entirely untouched."></app-input-select>
-        <app-input-text i18n-title title="Action parameter" *ngIf="showActionParamField" formControlName="action_parameter" [error]="error?.action_parameter"></app-input-text>
-        <app-input-select i18n-title title="Assign title from" [items]="metadataTitleOptions" formControlName="assign_title_from"></app-input-select>
-        <app-input-tags [allowCreate]="false" formControlName="assign_tags"></app-input-tags>
-        <app-input-select i18n-title title="Assign document type" [items]="documentTypes" [allowNull]="true" formControlName="assign_document_type"></app-input-select>
-        <app-input-select i18n-title title="Assign correspondent from" [items]="metadataCorrespondentOptions" formControlName="assign_correspondent_from"></app-input-select>
-        <app-input-select *ngIf="showCorrespondentField" i18n-title title="Assign correspondent" [items]="correspondents" [allowNull]="true" formControlName="assign_correspondent"></app-input-select>
+        <pngx-input-select i18n-title title="Action" [items]="actionOptions" formControlName="action" i18n-hint hint="Action is only performed when documents are consumed from the mail. Mails without attachments remain entirely untouched."></pngx-input-select>
+        <pngx-input-text i18n-title title="Action parameter" *ngIf="showActionParamField" formControlName="action_parameter" [error]="error?.action_parameter"></pngx-input-text>
+        <pngx-input-select i18n-title title="Assign title from" [items]="metadataTitleOptions" formControlName="assign_title_from"></pngx-input-select>
+        <pngx-input-tags [allowCreate]="false" formControlName="assign_tags"></pngx-input-tags>
+        <pngx-input-select i18n-title title="Assign document type" [items]="documentTypes" [allowNull]="true" formControlName="assign_document_type"></pngx-input-select>
+        <pngx-input-select i18n-title title="Assign correspondent from" [items]="metadataCorrespondentOptions" formControlName="assign_correspondent_from"></pngx-input-select>
+        <pngx-input-select *ngIf="showCorrespondentField" i18n-title title="Assign correspondent" [items]="correspondents" [allowNull]="true" formControlName="assign_correspondent"></pngx-input-select>
       </div>
     </div>
   </div>
index d26c882754c92cdee8febe34874f16d6b3c08919..bddecf2040bd5a343566b90d299024bd1c92d269 100644 (file)
@@ -101,7 +101,7 @@ const METADATA_CORRESPONDENT_OPTIONS = [
 ]
 
 @Component({
-  selector: 'app-mail-rule-edit-dialog',
+  selector: 'pngx-mail-rule-edit-dialog',
   templateUrl: './mail-rule-edit-dialog.component.html',
   styleUrls: ['./mail-rule-edit-dialog.component.scss'],
 })
index a3bcb62ceeb6c6ab41ff176d65a2129a14381485..4aadd27ef249164c185b1e6c68f46da86d6457c6 100644 (file)
@@ -6,14 +6,14 @@
   </div>
   <div class="modal-body">
 
-    <app-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></app-input-text>
-    <app-input-text i18n-title title="Path" formControlName="path" [error]="error?.path" [hint]="pathHint"></app-input-text>
-    <app-input-select i18n-title title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></app-input-select>
-    <app-input-text *ngIf="patternRequired" i18n-title title="Matching pattern" formControlName="match" [error]="error?.match"></app-input-text>
-    <app-input-check *ngIf="patternRequired" i18n-title title="Case insensitive" formControlName="is_insensitive"></app-input-check>
+    <pngx-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></pngx-input-text>
+    <pngx-input-text i18n-title title="Path" formControlName="path" [error]="error?.path" [hint]="pathHint"></pngx-input-text>
+    <pngx-input-select i18n-title title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></pngx-input-select>
+    <pngx-input-text *ngIf="patternRequired" i18n-title title="Matching pattern" formControlName="match" [error]="error?.match"></pngx-input-text>
+    <pngx-input-check *ngIf="patternRequired" i18n-title title="Case insensitive" formControlName="is_insensitive"></pngx-input-check>
 
-    <div *appIfOwner="object">
-      <app-permissions-form [users]="users" accordion="true" formControlName="permissions_form"></app-permissions-form>
+    <div *pngxIfOwner="object">
+      <pngx-permissions-form [users]="users" accordion="true" formControlName="permissions_form"></pngx-permissions-form>
     </div>
 
   </div>
index 3c78b41cfc2be25529eefa5bca7f78c7246ff931..0e600b8ab3135c816ee19fa09e63f7be26e3d4a3 100644 (file)
@@ -9,7 +9,7 @@ import { UserService } from 'src/app/services/rest/user.service'
 import { SettingsService } from 'src/app/services/settings.service'
 
 @Component({
-  selector: 'app-storage-path-edit-dialog',
+  selector: 'pngx-storage-path-edit-dialog',
   templateUrl: './storage-path-edit-dialog.component.html',
   styleUrls: ['./storage-path-edit-dialog.component.scss'],
 })
index 25f48232765e2a00dc5e9016f84ee89096889f9b..475dd96f096ef8b4bde7094f843c0d32bb34f2e9 100644 (file)
@@ -5,17 +5,17 @@
       </button>
     </div>
     <div class="modal-body">
-      <app-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></app-input-text>
+      <pngx-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></pngx-input-text>
 
-      <app-input-color i18n-title title="Color" formControlName="color" [error]="error?.color"></app-input-color>
+      <pngx-input-color i18n-title title="Color" formControlName="color" [error]="error?.color"></pngx-input-color>
 
-      <app-input-check i18n-title title="Inbox tag" formControlName="is_inbox_tag" i18n-hint hint="Inbox tags are automatically assigned to all consumed documents."></app-input-check>
-      <app-input-select i18n-title title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></app-input-select>
-      <app-input-text *ngIf="patternRequired" i18n-title title="Matching pattern" formControlName="match" [error]="error?.match"></app-input-text>
-      <app-input-check *ngIf="patternRequired" i18n-title title="Case insensitive" formControlName="is_insensitive"></app-input-check>
+      <pngx-input-check i18n-title title="Inbox tag" formControlName="is_inbox_tag" i18n-hint hint="Inbox tags are automatically assigned to all consumed documents."></pngx-input-check>
+      <pngx-input-select i18n-title title="Matching algorithm" [items]="getMatchingAlgorithms()" formControlName="matching_algorithm"></pngx-input-select>
+      <pngx-input-text *ngIf="patternRequired" i18n-title title="Matching pattern" formControlName="match" [error]="error?.match"></pngx-input-text>
+      <pngx-input-check *ngIf="patternRequired" i18n-title title="Case insensitive" formControlName="is_insensitive"></pngx-input-check>
 
-      <div *appIfOwner="object">
-        <app-permissions-form [users]="users" accordion="true" formControlName="permissions_form"></app-permissions-form>
+      <div *pngxIfOwner="object">
+        <pngx-permissions-form [users]="users" accordion="true" formControlName="permissions_form"></pngx-permissions-form>
       </div>
 
     </div>
index 0efea146b17b59c3b6fc1cac6ab1ed9f929fefe9..e27169354ec7c5866a137ea3f3de7ad1eea0fe24 100644 (file)
@@ -10,7 +10,7 @@ import { UserService } from 'src/app/services/rest/user.service'
 import { SettingsService } from 'src/app/services/settings.service'
 
 @Component({
-  selector: 'app-tag-edit-dialog',
+  selector: 'pngx-tag-edit-dialog',
   templateUrl: './tag-edit-dialog.component.html',
   styleUrls: ['./tag-edit-dialog.component.scss'],
 })
index ec9cceae9e66a4bf4b1cef2510f1a709b19c138b..3c8794e4db5acb1877a8546de2f4f7e689865ce6 100644 (file)
@@ -7,11 +7,11 @@
     <div class="modal-body">
       <div class="row">
         <div class="col">
-          <app-input-text i18n-title title="Username" formControlName="username" [error]="error?.username"></app-input-text>
-          <app-input-text i18n-title title="Email" formControlName="email" [error]="error?.email"></app-input-text>
-          <app-input-password i18n-title title="Password" formControlName="password" [error]="error?.password"></app-input-password>
-          <app-input-text i18n-title title="First name" formControlName="first_name" [error]="error?.first_name"></app-input-text>
-          <app-input-text i18n-title title="Last name" formControlName="last_name" [error]="error?.first_name"></app-input-text>
+          <pngx-input-text i18n-title title="Username" formControlName="username" [error]="error?.username"></pngx-input-text>
+          <pngx-input-text i18n-title title="Email" formControlName="email" [error]="error?.email"></pngx-input-text>
+          <pngx-input-password i18n-title title="Password" formControlName="password" [error]="error?.password"></pngx-input-password>
+          <pngx-input-text i18n-title title="First name" formControlName="first_name" [error]="error?.first_name"></pngx-input-text>
+          <pngx-input-text i18n-title title="Last name" formControlName="last_name" [error]="error?.first_name"></pngx-input-text>
 
           <div class="mb-2">
             <div class="form-check form-switch form-check-inline">
             </div>
           </div>
 
-          <app-input-select i18n-title title="Groups" [items]="groups" multiple="true" formControlName="groups"></app-input-select>
+          <pngx-input-select i18n-title title="Groups" [items]="groups" multiple="true" formControlName="groups"></pngx-input-select>
         </div>
         <div class="col">
-          <app-permissions-select i18n-title title="Permissions" formControlName="user_permissions" [error]="error?.user_permissions" [inheritedPermissions]="inheritedPermissions"></app-permissions-select>
+          <pngx-permissions-select i18n-title title="Permissions" formControlName="user_permissions" [error]="error?.user_permissions" [inheritedPermissions]="inheritedPermissions"></pngx-permissions-select>
         </div>
       </div>
     </div>
index afe23ac1bc1a0764e2a6aa26a57faa9d55e75e59..94072f404af9604d8949eebb8c65bec1efca5c5a 100644 (file)
@@ -10,7 +10,7 @@ import { UserService } from 'src/app/services/rest/user.service'
 import { SettingsService } from 'src/app/services/settings.service'
 
 @Component({
-  selector: 'app-user-edit-dialog',
+  selector: 'pngx-user-edit-dialog',
   templateUrl: './user-edit-dialog.component.html',
   styleUrls: ['./user-edit-dialog.component.scss'],
 })
index 4ee05f3b247b0342fc8ed95a0aaccb98e3c7de24..849dec4c5ba5fc8bc92f3893cfeeda28d3111bfc 100644 (file)
@@ -5,7 +5,7 @@
     </svg>
     <div class="d-none d-sm-inline">&nbsp;{{title}}</div>
     <ng-container *ngIf="!editing && selectionModel.totalCount > 0">
-      <app-clearable-badge [number]="selectionModel.totalCount" [selected]="selectionModel.selectionSize() > 0" (cleared)="reset()"></app-clearable-badge>
+      <pngx-clearable-badge [number]="selectionModel.totalCount" [selected]="selectionModel.selectionSize() > 0" (cleared)="reset()"></pngx-clearable-badge>
     </ng-container>
   </button>
   <div class="dropdown-menu py-0 shadow" ngbDropdownMenu attr.aria-labelledby="dropdown_{{name}}">
@@ -33,9 +33,9 @@
       </div>
       <div *ngIf="selectionModel.items" class="items" #buttonItems>
         <ng-container *ngFor="let item of selectionModel.itemsSorted | filter: filterText; let i = index">
-          <app-toggleable-dropdown-button
+          <pngx-toggleable-dropdown-button
             *ngIf="allowSelectNone || item.id" [item]="item" [hideCount]="hideCount(item)" [state]="selectionModel.get(item.id)" [count]="getUpdatedDocumentCount(item.id)" (toggle)="selectionModel.toggle(item.id)" (exclude)="excludeClicked(item.id)" (click)="setButtonItemIndex(i - 1)" [disabled]="disabled">
-          </app-toggleable-dropdown-button>
+          </pngx-toggleable-dropdown-button>
         </ng-container>
       </div>
       <button *ngIf="editing" class="list-group-item list-group-item-action bg-light" (click)="applyClicked()" [disabled]="!modelIsDirty || disabled">
index 42adfdba36ddc347cfe2cc52b5d62a53cd40afb9..13b8d7c59c3f2f1a2d6fb875cc0250417e86d056 100644 (file)
@@ -410,7 +410,7 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () =>
       (fixture.nativeElement as HTMLDivElement).querySelectorAll('button')
     ).filter((b) => b.textContent.includes('Tag'))
     fixture.nativeElement
-      .querySelector('app-toggleable-dropdown-button')
+      .querySelector('pngx-toggleable-dropdown-button')
       .dispatchEvent(new MouseEvent('click'))
     itemButtons[0].focus() // normally handled by browser
     expect(document.activeElement).toEqual(itemButtons[0])
index e0c363fdbc5b76320e0007afdb8263704b6650c5..26b036db9e9fedda02980a9ac5a9ccc338dc0bc1 100644 (file)
@@ -318,7 +318,7 @@ export class FilterableDropdownSelectionModel {
 }
 
 @Component({
-  selector: 'app-filterable-dropdown',
+  selector: 'pngx-filterable-dropdown',
   templateUrl: './filterable-dropdown.component.html',
   styleUrls: ['./filterable-dropdown.component.scss'],
 })
index 49c24203525de8f2615cfdbbc63e90de44d78ee8..461f38b3b2d2968399655a2017245f0f6bc79283 100644 (file)
@@ -17,7 +17,7 @@
     </ng-container>
   </div>
   <div class="me-1">
-    <app-tag *ngIf="isTag; else displayName" [tag]="item" [clickable]="false"></app-tag>
+    <pngx-tag *ngIf="isTag; else displayName" [tag]="item" [clickable]="false"></pngx-tag>
     <ng-template #displayName><small>{{item.name}}</small></ng-template>
   </div>
   <div *ngIf="!hideCount" class="badge bg-light text-dark rounded-pill ms-auto me-1">{{count ?? item.document_count}}</div>
index 7eb6d1b269037b1a5cc3bf9aff462e1e3b7fdc9a..6c0c31f753a5ace48490b373f022cc58f058c8ef 100644 (file)
@@ -9,7 +9,7 @@ export enum ToggleableItemState {
 }
 
 @Component({
-  selector: 'app-toggleable-dropdown-button',
+  selector: 'pngx-toggleable-dropdown-button',
   templateUrl: './toggleable-dropdown-button.component.html',
   styleUrls: ['./toggleable-dropdown-button.component.scss'],
 })
index 1815421424f95212628b204abb0849ec6ab9a2a1..29690b429cb6115ad36e269101e83943a6c66288 100644 (file)
@@ -10,7 +10,7 @@ import { AbstractInputComponent } from '../abstract-input'
       multi: true,
     },
   ],
-  selector: 'app-input-check',
+  selector: 'pngx-input-check',
   templateUrl: './check.component.html',
   styleUrls: ['./check.component.scss'],
 })
index 3efdda8c8256ecb90018ec196c689ddeecde0718..9c619d788926d51bd1c390bac2b9847086496efe 100644 (file)
@@ -11,7 +11,7 @@ import { AbstractInputComponent } from '../abstract-input'
       multi: true,
     },
   ],
-  selector: 'app-input-color',
+  selector: 'pngx-input-color',
   templateUrl: './color.component.html',
   styleUrls: ['./color.component.scss'],
 })
index c4177b04c1199cf4b360b0a0945cb160c828a1bd..36bbea57c4cf60cde632ab720089e78b0192bfd7 100644 (file)
@@ -23,7 +23,7 @@ import { AbstractInputComponent } from '../abstract-input'
       multi: true,
     },
   ],
-  selector: 'app-input-date',
+  selector: 'pngx-input-date',
   templateUrl: './date.component.html',
   styleUrls: ['./date.component.scss'],
 })
index 5ed861b5a95577974864e40973ddf2926bc58edf..25271044f870a2933c33007e03432cdf8860c85b 100644 (file)
@@ -12,7 +12,7 @@ import { AbstractInputComponent } from '../abstract-input'
       multi: true,
     },
   ],
-  selector: 'app-input-number',
+  selector: 'pngx-input-number',
   templateUrl: './number.component.html',
   styleUrls: ['./number.component.scss'],
 })
index 3216dbed2e218109d12314c6a60adc6f1051ec4e..ce0284a7758ee86205451e8ff2a3a9163e1da1a3 100644 (file)
@@ -10,7 +10,7 @@ import { AbstractInputComponent } from '../abstract-input'
       multi: true,
     },
   ],
-  selector: 'app-input-password',
+  selector: 'pngx-input-password',
   templateUrl: './password.component.html',
   styleUrls: ['./password.component.scss'],
 })
index d7ae5ee7b1c403db6d7a1cb3cac6fbddcc84fc4e..7339c9052d49fd496e32ce5d04df444574f2769b 100644 (file)
@@ -19,7 +19,7 @@
       <label class="form-label d-block my-2" i18n>Owner:</label>
     </div>
     <div class="col-lg-9">
-      <app-input-select [items]="users" bindLabel="username" formControlName="owner" [allowNull]="true"></app-input-select>
+      <pngx-input-select [items]="users" bindLabel="username" formControlName="owner" [allowNull]="true"></pngx-input-select>
     </div>
   </div>
   <small class="form-text text-muted text-end d-block mt-n2" i18n>Objects without an owner can be viewed and edited by all users</small>
@@ -31,7 +31,7 @@
           <label class="form-label d-block my-2" i18n>Users:</label>
         </div>
         <div class="col-lg-9">
-          <app-permissions-user type="view" formControlName="users"></app-permissions-user>
+          <pngx-permissions-user type="view" formControlName="users"></pngx-permissions-user>
         </div>
       </div>
       <div class="row">
@@ -39,7 +39,7 @@
           <label class="form-label d-block my-2" i18n>Groups:</label>
         </div>
         <div class="col-lg-9">
-          <app-permissions-group type="view" formControlName="groups"></app-permissions-group>
+          <pngx-permissions-group type="view" formControlName="groups"></pngx-permissions-group>
         </div>
       </div>
     </div>
@@ -50,7 +50,7 @@
           <label class="form-label d-block my-2" i18n>Users:</label>
         </div>
         <div class="col-lg-9">
-          <app-permissions-user type="change" formControlName="users"></app-permissions-user>
+          <pngx-permissions-user type="change" formControlName="users"></pngx-permissions-user>
         </div>
       </div>
       <div class="row">
@@ -58,7 +58,7 @@
           <label class="form-label d-block my-2" i18n>Groups:</label>
         </div>
         <div class="col-lg-9">
-          <app-permissions-group type="change" formControlName="groups"></app-permissions-group>
+          <pngx-permissions-group type="change" formControlName="groups"></pngx-permissions-group>
         </div>
       </div>
       <small class="form-text text-muted text-end d-block" i18n>Edit permissions also grant viewing permissions</small>
index 8fcde88cb6e9ba124a44108f30f482fcd662231f..81716d40a6aa82d9204d0336d180e0005a363b40 100644 (file)
@@ -25,7 +25,7 @@ export interface PermissionsFormObject {
       multi: true,
     },
   ],
-  selector: 'app-permissions-form',
+  selector: 'pngx-permissions-form',
   templateUrl: './permissions-form.component.html',
   styleUrls: ['./permissions-form.component.scss'],
 })
index f047ac6c2815f3b14d75065be826458049eff1c2..b17c6ccc1f393983917ef57f91da0f35e320cfea 100644 (file)
@@ -13,7 +13,7 @@ import { AbstractInputComponent } from '../../abstract-input'
       multi: true,
     },
   ],
-  selector: 'app-permissions-group',
+  selector: 'pngx-permissions-group',
   templateUrl: './permissions-group.component.html',
   styleUrls: ['./permissions-group.component.scss'],
 })
index 1db4e0ff9545e937d894b6e48e91a3044c6de1f6..5773ca2d67352bd2f32e3d5764f1960c42ec920b 100644 (file)
@@ -14,7 +14,7 @@ import { AbstractInputComponent } from '../../abstract-input'
       multi: true,
     },
   ],
-  selector: 'app-permissions-user',
+  selector: 'pngx-permissions-user',
   templateUrl: './permissions-user.component.html',
   styleUrls: ['./permissions-user.component.scss'],
 })
index 1a3341842df659ee5b37313a249d303774fe7f5d..437fc60d2cffd8063d58fa92ce53535aa983e07b 100644 (file)
@@ -16,7 +16,7 @@ import { AbstractInputComponent } from '../abstract-input'
       multi: true,
     },
   ],
-  selector: 'app-input-select',
+  selector: 'pngx-input-select',
   templateUrl: './select.component.html',
   styleUrls: ['./select.component.scss'],
 })
index 497a62335b0bce0d021ffacf5cd3104427d47a72..a49a0de2d066a821704dd2c6d6ab86f0c1c65665 100644 (file)
           <svg width="1.2em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
             <use xlink:href="assets/bootstrap-icons.svg#x"/>
           </svg>
-          <app-tag *ngIf="item.id && tags" style="background-color: none;" [tag]="getTag(item.id)"></app-tag>
+          <pngx-tag *ngIf="item.id && tags" style="background-color: none;" [tag]="getTag(item.id)"></pngx-tag>
         </span>
       </ng-template>
       <ng-template ng-option-tmp let-item="item" let-index="index" let-search="searchTerm">
         <div class="tag-wrap">
-          <app-tag *ngIf="item.id && tags" class="me-2" [tag]="getTag(item.id)"></app-tag>
+          <pngx-tag *ngIf="item.id && tags" class="me-2" [tag]="getTag(item.id)"></pngx-tag>
         </div>
       </ng-template>
     </ng-select>
index b6bfddb3ca633e8e0564a4a8770056be45aec28b..ff5657a121fc26dbbb0e6546cb438f832b542b1c 100644 (file)
@@ -24,7 +24,7 @@ import { NgSelectComponent } from '@ng-select/ng-select'
       multi: true,
     },
   ],
-  selector: 'app-input-tags',
+  selector: 'pngx-input-tags',
   templateUrl: './tags.component.html',
   styleUrls: ['./tags.component.scss'],
 })
index d2bac853d9150b8eb3d0d07e746dad806638bdd3..4060977d415b97e196ebaeb29c64dcfb2c308992 100644 (file)
@@ -10,7 +10,7 @@ import { AbstractInputComponent } from '../abstract-input'
       multi: true,
     },
   ],
-  selector: 'app-input-text',
+  selector: 'pngx-input-text',
   templateUrl: './text.component.html',
   styleUrls: ['./text.component.scss'],
 })
index 0c5ecefda266ef80019eda0d5821f49438dd65c8..3320a621a956ecbf5aecbf37f484c8c34ad96302 100644 (file)
@@ -1,7 +1,7 @@
 import { Component, Input } from '@angular/core'
 
 @Component({
-  selector: 'app-logo',
+  selector: 'pngx-logo',
   templateUrl: './logo.component.html',
   styleUrls: ['./logo.component.scss'],
 })
index 5b68e1423ca361246b8a734cdb014083f102951d..457bdfda518e3eb7ac3ba96aec4bbdca4b7ccbd8 100644 (file)
@@ -3,7 +3,7 @@ import { Title } from '@angular/platform-browser'
 import { environment } from 'src/environments/environment'
 
 @Component({
-  selector: 'app-page-header',
+  selector: 'pngx-page-header',
   templateUrl: './page-header.component.html',
   styleUrls: ['./page-header.component.scss'],
 })
index d70e744923341d1de237e0e433d4b47e4667a052..2ed42fd62a7b103f60428da0c9731f3a6bf0c01b 100644 (file)
@@ -8,7 +8,7 @@
     <p class="mb-3" *ngIf="message" [innerHTML]="message | safeHtml"></p>
 
     <form [formGroup]="form">
-      <app-permissions-form [users]="users" formControlName="permissions_form"></app-permissions-form>
+      <pngx-permissions-form [users]="users" formControlName="permissions_form"></pngx-permissions-form>
     </form>
 
   </div>
index 5ddb8e10af0c23d5d787b9da3f5aa66c206a7373..f1b922175556c5119e2a9ce00861684f0c49cd5f 100644 (file)
@@ -5,7 +5,7 @@ import { PaperlessUser } from 'src/app/data/paperless-user'
 import { UserService } from 'src/app/services/rest/user.service'
 
 @Component({
-  selector: 'app-permissions-dialog',
+  selector: 'pngx-permissions-dialog',
   templateUrl: './permissions-dialog.component.html',
   styleUrls: ['./permissions-dialog.component.scss'],
 })
index 8cac4dce87abc72b0d02dfab487301d7eddba72f..b7a1b139716f38c2edb73fc93ccd5d342ab00bd2 100644 (file)
@@ -4,7 +4,7 @@
            <use xlink:href="assets/bootstrap-icons.svg#person-fill-lock" />
         </svg>
         <div class="d-none d-sm-inline">&nbsp;{{title}}</div>
-      <app-clearable-badge [selected]="isActive" (cleared)="reset()"></app-clearable-badge><span class="visually-hidden">selected</span>
+      <pngx-clearable-badge [selected]="isActive" (cleared)="reset()"></pngx-clearable-badge><span class="visually-hidden">selected</span>
     </button>
     <div class="dropdown-menu permission-filter-dropdown shadow py-0 w-2" ngbDropdownMenu attr.aria-labelledby="dropdown{{title}}">
         <div class="list-group list-group-flush">
@@ -48,7 +48,7 @@
                     <small i18n>Unowned</small>
                 </div>
             </button>
-            <button *appIfPermissions="{ action: PermissionAction.Add, type: PermissionType.User }" class="list-group-item list-group-item-action d-flex align-items-center p-2 border-top-0 border-start-0 border-end-0 border-bottom" role="menuitem" [disabled]="disabled">
+            <button *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.User }" class="list-group-item list-group-item-action d-flex align-items-center p-2 border-top-0 border-start-0 border-end-0 border-bottom" role="menuitem" [disabled]="disabled">
                 <div class="selected-icon me-1">
                     <svg *ngIf="selectionModel.ownerFilter === OwnerFilterType.OTHERS" fill="currentColor" class="buttonicon-sm">
                         <use xlink:href="assets/bootstrap-icons.svg#check"/>
index 338f999e76027ed213934011005bf9573d7dd785..06d60d56ca49a2551fca1761426ea8013c8c0947 100644 (file)
@@ -35,7 +35,7 @@ export enum OwnerFilterType {
 }
 
 @Component({
-  selector: 'app-permissions-filter-dropdown',
+  selector: 'pngx-permissions-filter-dropdown',
   templateUrl: './permissions-filter-dropdown.component.html',
   styleUrls: ['./permissions-filter-dropdown.component.scss'],
 })
index 924ffd662d581a0193e4d4e08f23dc26f1bcd5b0..49d879677ffd6f51e959b96ab8c55b94f7dd3d6e 100644 (file)
@@ -21,7 +21,7 @@ import { ComponentWithPermissions } from '../../with-permissions/with-permission
       multi: true,
     },
   ],
-  selector: 'app-permissions-select',
+  selector: 'pngx-permissions-select',
   templateUrl: './permissions-select.component.html',
   styleUrls: ['./permissions-select.component.scss'],
 })
index fe07033e9bfe315c8a7c87df5f9398cdbe2bfa49..00b2dc7732fed6fe5e084fea9b5ade4ab4b016c3 100644 (file)
@@ -5,7 +5,7 @@
 </div>
 <div class="modal-body">
 
-  <app-input-select [items]="objects" [title]="message" [(ngModel)]="selected"></app-input-select>
+  <pngx-input-select [items]="objects" [title]="message" [(ngModel)]="selected"></pngx-input-select>
 
 </div>
 <div class="modal-footer">
index c341ac96b7278f5c81e5e1510551ed431b5c315f..16195b645670802630e3c098c9415a28ed380b1d 100644 (file)
@@ -3,7 +3,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
 import { ObjectWithId } from 'src/app/data/object-with-id'
 
 @Component({
-  selector: 'app-select-dialog',
+  selector: 'pngx-select-dialog',
   templateUrl: './select-dialog.component.html',
   styleUrls: ['./select-dialog.component.scss'],
 })
index 1eb43fa4239508726b05df93e80ba050984a0117..5e00eb8151112268db17d98db7c3b6c2356bc1e7 100644 (file)
@@ -10,7 +10,7 @@ import { environment } from 'src/environments/environment'
 import { ClipboardService } from 'ngx-clipboard'
 
 @Component({
-  selector: 'app-share-links-dropdown',
+  selector: 'pngx-share-links-dropdown',
   templateUrl: './share-links-dropdown.component.html',
   styleUrls: ['./share-links-dropdown.component.scss'],
 })
index d7d929594b4e5be31caf0d183def94390a347e46..2c05a8ba0e5265525b7573684fc22d3caf7764b3 100644 (file)
@@ -2,7 +2,7 @@ import { Component, Input } from '@angular/core'
 import { PaperlessTag } from 'src/app/data/paperless-tag'
 
 @Component({
-  selector: 'app-tag',
+  selector: 'pngx-tag',
   templateUrl: './tag.component.html',
   styleUrls: ['./tag.component.scss'],
 })
index bdabe33eef44242495c946f8d1b4fe46ff566c9f..e2194ef1bc3a4fc1088106f6a600f1ac1e7944c6 100644 (file)
@@ -4,7 +4,7 @@ import { Toast, ToastService } from 'src/app/services/toast.service'
 import { ClipboardService } from 'ngx-clipboard'
 
 @Component({
-  selector: 'app-toasts',
+  selector: 'pngx-toasts',
   templateUrl: './toasts.component.html',
   styleUrls: ['./toasts.component.scss'],
 })
index db396a62b43483cae173246e0726a31e78ac7f2b..538f6a910c14cff066120ab94594d1a744a79d72 100644 (file)
@@ -1,6 +1,6 @@
-<app-page-header title="Dashboard" [subTitle]="subtitle" i18n-title>
-  <app-logo extra_classes="d-none d-md-block"></app-logo>
-</app-page-header>
+<pngx-page-header title="Dashboard" [subTitle]="subtitle" i18n-title>
+  <pngx-logo extra_classes="d-none d-md-block"></pngx-logo>
+</pngx-page-header>
 
 <div class="row">
   <div class="col-lg-8">
         <ng-container i18n>Loading...</ng-container>
       </ng-container>
 
-      <app-welcome-widget *ngIf="settingsService.offerTour()" (dismiss)="completeTour()"></app-welcome-widget>
+      <pngx-welcome-widget *ngIf="settingsService.offerTour()" (dismiss)="completeTour()"></pngx-welcome-widget>
 
-      <div *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.SavedView }">
+      <div *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.SavedView }">
         <ng-container *ngFor="let v of savedViewService.dashboardViews; first as isFirst">
-          <app-saved-view-widget [savedView]="v"></app-saved-view-widget>
+          <pngx-saved-view-widget [savedView]="v"></pngx-saved-view-widget>
         </ng-container>
       </div>
     </div>
   </div>
   <div class="col-lg-4">
 
-    <app-statistics-widget></app-statistics-widget>
+    <pngx-statistics-widget></pngx-statistics-widget>
 
-    <app-upload-file-widget></app-upload-file-widget>
+    <pngx-upload-file-widget></pngx-upload-file-widget>
 
   </div>
 </div>
index 2a7533808bf1e5a74b79b724a3e8ab7d52a35b96..8d47495a83c0ced3a9a3a204fb47dee156d078aa 100644 (file)
@@ -5,7 +5,7 @@ import { ComponentWithPermissions } from '../with-permissions/with-permissions.c
 import { TourService } from 'ngx-ui-tour-ng-bootstrap'
 
 @Component({
-  selector: 'app-dashboard',
+  selector: 'pngx-dashboard',
   templateUrl: './dashboard.component.html',
   styleUrls: ['./dashboard.component.scss'],
 })
index e12f91a7255360355c0ad548e470167bba6c2030..9082d0cd86ccc7646241e6578fd828f0ccaef496 100644 (file)
@@ -1,6 +1,6 @@
-<app-widget-frame [title]="savedView.name" [loading]="loading">
+<pngx-widget-frame [title]="savedView.name" [loading]="loading">
 
-  <a class="btn-link" header-buttons [routerLink]="[]" (click)="showAll()" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }" i18n>Show all</a>
+  <a class="btn-link" header-buttons [routerLink]="[]" (click)="showAll()" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }" i18n>Show all</a>
 
 
   <table content class="table table-sm table-hover table-borderless mb-0">
         <th scope="col" i18n>Title</th>
       </tr>
     </thead>
-    <tbody *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
+    <tbody *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
       <tr *ngFor="let doc of documents" (mouseleave)="mouseLeaveCard()">
         <td><a routerLink="/documents/{{doc.id}}" class="d-block text-dark text-decoration-none">{{doc.created_date | customDate}}</a></td>
         <td class="position-relative">
-          <a routerLink="/documents/{{doc.id}}" title="Edit" i18n-title class="d-block text-dark text-decoration-none">{{doc.title | documentTitle}}<app-tag [tag]="t" *ngFor="let t of doc.tags$ | async" class="ms-1" (click)="clickTag(t, $event)"></app-tag></a>
+          <a routerLink="/documents/{{doc.id}}" title="Edit" i18n-title class="d-block text-dark text-decoration-none">{{doc.title | documentTitle}}<pngx-tag [tag]="t" *ngFor="let t of doc.tags$ | async" class="ms-1" (click)="clickTag(t, $event)"></pngx-tag></a>
           <div class="btn-group position-absolute top-50 end-0 translate-middle-y">
             <a [href]="getPreviewUrl(doc)" title="View Preview" i18n-title target="_blank" class="btn btn-sm px-4 py-0 btn-dark border-dark-subtle"
             [ngbPopover]="previewContent" [popoverTitle]="doc.title | documentTitle"
@@ -37,4 +37,4 @@
     </tbody>
   </table>
 
-</app-widget-frame>
+</pngx-widget-frame>
index 1e13702b69665638756c8847371dc5a734722179..efc288378ed3016ec540a56a37f5e1b19a61c73b 100644 (file)
@@ -20,7 +20,7 @@ import { ComponentWithPermissions } from 'src/app/components/with-permissions/wi
 import { NgbPopover } from '@ng-bootstrap/ng-bootstrap'
 
 @Component({
-  selector: 'app-saved-view-widget',
+  selector: 'pngx-saved-view-widget',
   templateUrl: './saved-view-widget.component.html',
   styleUrls: [
     './saved-view-widget.component.scss',
index e142478839876a2762dec6708c1fe8ea7d0a6dd1..3561bbcf4917f1152f4bf36c8951c8aa8ad974ca 100644 (file)
@@ -1,4 +1,4 @@
-<app-widget-frame title="Statistics" [loading]="loading" i18n-title>
+<pngx-widget-frame title="Statistics" [loading]="loading" i18n-title>
   <ng-container content>
     <div class="list-group border-light">
       <a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" title="Go to inbox" i18n-title href="javascript:void(0)" *ngIf="statistics?.documents_inbox !== null" (click)="goToInbox()">
@@ -43,4 +43,4 @@
       </div>
     </div>
   </ng-container>
-</app-widget-frame>
+</pngx-widget-frame>
index d1de799c15ea4f8e4fdddb51d041a7602715dad8..be722197593f63dafeeb38f42b533f1c66bb0643 100644 (file)
@@ -21,7 +21,7 @@ interface DocumentFileType {
 }
 
 @Component({
-  selector: 'app-statistics-widget',
+  selector: 'pngx-statistics-widget',
   templateUrl: './statistics-widget.component.html',
   styleUrls: ['./statistics-widget.component.scss'],
 })
index cf79172bcdd77c01693fcdbd724383d48229b7aa..30dbdd8e126e4ee68ca16452cd734176f15647eb 100644 (file)
@@ -1,4 +1,4 @@
-<app-widget-frame title="Upload new documents" i18n-title>
+<pngx-widget-frame title="Upload new documents" i18n-title>
   <div header-buttons>
     <a *ngIf="getStatusSuccess().length > 0" (click)="dismissCompleted()" [routerLink]="[]" >
       <span class="me-1" i18n="This button dismisses all status messages about processed documents on the dashboard (failed and successful)">Dismiss completed</span>
@@ -9,7 +9,7 @@
     </a>
   </div>
   <div content tourAnchor="tour.upload-widget">
-    <form *appIfPermissions="{ action: PermissionAction.Add, type: PermissionType.Document }">
+    <form *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.Document }">
       <ngx-file-drop dropZoneLabel="Drop documents here or" browseBtnLabel="Browse files" (onFileDrop)="dropped($event)"
         (onFileOver)="fileOver($event)" (onFileLeave)="fileLeave($event)" dropZoneClassName="bg-light card"
         multiple="true" contentClassName="justify-content-center d-flex align-items-center py-5 px-2" [showBrowseBtn]=true
       </div>
     </div>
   </div>
-</app-widget-frame>
+</pngx-widget-frame>
 
 <ng-template #consumerAlert let-status>
   <ngb-alert type="secondary" class="mt-2 mb-0" [dismissible]="isFinished(status)" (closed)="dismiss(status)">
     <h6 class="alert-heading">{{status.filename}}</h6>
     <p class="mb-0 pb-1" *ngIf="!isFinished(status) || (isFinished(status) && !status.documentId)">{{status.message}}</p>
     <ngb-progressbar [value]="status.getProgress()" [max]="1" [type]="getStatusColor(status)"></ngb-progressbar>
-    <div *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
+    <div *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
       <div *ngIf="isFinished(status)">
         <button *ngIf="status.documentId" class="btn btn-sm btn-outline-primary btn-open" routerLink="/documents/{{status.documentId}}" (click)="dismiss(status)">
           <small i18n>Open document</small>
index 68a3fbdfaca052cee3c42df6b31ea3b29e4da979..22a3263e3695fe23f9bb4da2090b913d386d6317 100644 (file)
@@ -11,7 +11,7 @@ import { UploadDocumentsService } from 'src/app/services/upload-documents.servic
 const MAX_ALERTS = 5
 
 @Component({
-  selector: 'app-upload-file-widget',
+  selector: 'pngx-upload-file-widget',
   templateUrl: './upload-file-widget.component.html',
   styleUrls: ['./upload-file-widget.component.scss'],
 })
index d46a91e375a842b5eb3348cf51e8e46927487663..d99b5a44fd7068891c09480cfb059796b8c19b94 100644 (file)
@@ -2,7 +2,7 @@ import { Component, EventEmitter, Output } from '@angular/core'
 import { TourService } from 'ngx-ui-tour-ng-bootstrap'
 
 @Component({
-  selector: 'app-welcome-widget',
+  selector: 'pngx-welcome-widget',
   templateUrl: './welcome-widget.component.html',
   styleUrls: ['./welcome-widget.component.scss'],
 })
index 59089deb4f53b742b1dd66ff7bf551c017854d8e..a0ff0a50d33a0a6a2ca077a99b2c6dd64321e9a0 100644 (file)
@@ -9,7 +9,7 @@ import { WidgetFrameComponent } from './widget-frame.component'
   template: `
     <div>
       <button
-        *appIfObjectPermissions="{
+        *pngxIfObjectPermissions="{
           object: { id: 2, owner: user1 },
           action: 'view'
         }"
index 64f5c682bb2e7f9835cd6a0ca19d560d07201793..65f80ed084f4d5464f951a53c29477aa366e066b 100644 (file)
@@ -1,7 +1,7 @@
 import { Component, Input } from '@angular/core'
 
 @Component({
-  selector: 'app-widget-frame',
+  selector: 'pngx-widget-frame',
   templateUrl: './widget-frame.component.html',
   styleUrls: ['./widget-frame.component.scss'],
 })
index 6003f16216f1b47ad9cef7138ec918369364f72b..2a802642a507fe77e9e3d4f9d8d04b8705c56422 100644 (file)
@@ -4,7 +4,7 @@ import { ActivatedRoute, Router } from '@angular/router'
 import { FILTER_ASN } from '../../data/filter-rule-type'
 
 @Component({
-  selector: 'app-document-asncomponent',
+  selector: 'pngx-document-asncomponent',
   templateUrl: './document-asn.component.html',
   styleUrls: ['./document-asn.component.scss'],
 })
index 6b91438f983c460a86c874f9e95257113748b124..f1031484aebaba7437c682960615b911eec757a2 100644 (file)
@@ -1,11 +1,11 @@
-<app-page-header [(title)]="title">
+<pngx-page-header [(title)]="title">
     <div class="input-group input-group-sm me-5 d-none d-md-flex" *ngIf="getContentType() === 'application/pdf' && !useNativePdfViewer">
       <div class="input-group-text" i18n>Page</div>
       <input class="form-control flex-grow-0 w-auto" type="number" min="1" [max]="previewNumPages" [(ngModel)]="previewCurrentPage" />
       <div class="input-group-text" i18n>of {{previewNumPages}}</div>
     </div>
 
-    <button type="button" class="btn btn-sm btn-outline-danger me-4" (click)="delete()" [disabled]="!userIsOwner" *appIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.Document }">
+    <button type="button" class="btn btn-sm btn-outline-danger me-4" (click)="delete()" [disabled]="!userIsOwner" *pngxIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.Document }">
         <svg class="buttonicon" fill="currentColor">
             <use xlink:href="assets/bootstrap-icons.svg#trash" />
         </svg><span class="d-none d-lg-inline ps-1" i18n>Delete</span>
@@ -48,7 +48,7 @@
         </div>
     </div>
 
-    <app-share-links-dropdown [documentId]="documentId" [disabled]="!userIsOwner" *appIfPermissions="{ action: PermissionAction.Add, type: PermissionType.ShareLink }"></app-share-links-dropdown>
+    <pngx-share-links-dropdown [documentId]="documentId" [disabled]="!userIsOwner" *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.ShareLink }"></pngx-share-links-dropdown>
 
     <button type="button" class="btn btn-sm btn-outline-primary me-2" i18n-title title="Close" (click)="close()">
         <svg class="buttonicon" fill="currentColor">
@@ -69,7 +69,7 @@
         </button>
     </div>
 
-</app-page-header>
+</pngx-page-header>
 
 
 <div class="row">
                     <a ngbNavLink i18n>Details</a>
                     <ng-template ngbNavContent>
 
-                        <app-input-text #inputTitle i18n-title title="Title" formControlName="title" (keyup)="titleKeyUp($event)" [error]="error?.title"></app-input-text>
-                        <app-input-number i18n-title title="Archive serial number" [error]="error?.archive_serial_number" formControlName='archive_serial_number'></app-input-number>
-                        <app-input-date i18n-title title="Date created" formControlName="created_date" [suggestions]="suggestions?.dates" [showFilter]="true" (filterDocuments)="filterDocuments($event)"
-                            [error]="error?.created_date"></app-input-date>
-                        <app-input-select [items]="correspondents" i18n-title title="Correspondent" formControlName="correspondent" [allowNull]="true" [showFilter]="true" (filterDocuments)="filterDocuments($event)"
-                            (createNew)="createCorrespondent($event)" [suggestions]="suggestions?.correspondents" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Correspondent }"></app-input-select>
-                        <app-input-select [items]="documentTypes" i18n-title title="Document type" formControlName="document_type" [allowNull]="true" [showFilter]="true" (filterDocuments)="filterDocuments($event)"
-                            (createNew)="createDocumentType($event)" [suggestions]="suggestions?.document_types" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.DocumentType }"></app-input-select>
-                        <app-input-select [items]="storagePaths" i18n-title title="Storage path" formControlName="storage_path" [allowNull]="true" [showFilter]="true" (filterDocuments)="filterDocuments($event)"
-                            (createNew)="createStoragePath($event)" [suggestions]="suggestions?.storage_paths" i18n-placeholder placeholder="Default" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.StoragePath }"></app-input-select>
-                        <app-input-tags formControlName="tags" [suggestions]="suggestions?.tags" [showFilter]="true" (filterDocuments)="filterDocuments($event)" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Tag }"></app-input-tags>
+                        <pngx-input-text #inputTitle i18n-title title="Title" formControlName="title" (keyup)="titleKeyUp($event)" [error]="error?.title"></pngx-input-text>
+                        <pngx-input-number i18n-title title="Archive serial number" [error]="error?.archive_serial_number" formControlName='archive_serial_number'></pngx-input-number>
+                        <pngx-input-date i18n-title title="Date created" formControlName="created_date" [suggestions]="suggestions?.dates" [showFilter]="true" (filterDocuments)="filterDocuments($event)"
+                            [error]="error?.created_date"></pngx-input-date>
+                        <pngx-input-select [items]="correspondents" i18n-title title="Correspondent" formControlName="correspondent" [allowNull]="true" [showFilter]="true" (filterDocuments)="filterDocuments($event)"
+                            (createNew)="createCorrespondent($event)" [suggestions]="suggestions?.correspondents" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Correspondent }"></pngx-input-select>
+                        <pngx-input-select [items]="documentTypes" i18n-title title="Document type" formControlName="document_type" [allowNull]="true" [showFilter]="true" (filterDocuments)="filterDocuments($event)"
+                            (createNew)="createDocumentType($event)" [suggestions]="suggestions?.document_types" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.DocumentType }"></pngx-input-select>
+                        <pngx-input-select [items]="storagePaths" i18n-title title="Storage path" formControlName="storage_path" [allowNull]="true" [showFilter]="true" (filterDocuments)="filterDocuments($event)"
+                            (createNew)="createStoragePath($event)" [suggestions]="suggestions?.storage_paths" i18n-placeholder placeholder="Default" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.StoragePath }"></pngx-input-select>
+                        <pngx-input-tags formControlName="tags" [suggestions]="suggestions?.tags" [showFilter]="true" (filterDocuments)="filterDocuments($event)" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Tag }"></pngx-input-tags>
 
                     </ng-template>
                 </li>
                             </tbody>
                         </table>
 
-                        <app-metadata-collapse i18n-title title="Original document metadata" [metadata]="metadata.original_metadata" *ngIf="metadata?.original_metadata?.length > 0"></app-metadata-collapse>
-                        <app-metadata-collapse i18n-title title="Archived document metadata" [metadata]="metadata.archive_metadata" *ngIf="metadata?.archive_metadata?.length > 0"></app-metadata-collapse>
+                        <pngx-metadata-collapse i18n-title title="Original document metadata" [metadata]="metadata.original_metadata" *ngIf="metadata?.original_metadata?.length > 0"></pngx-metadata-collapse>
+                        <pngx-metadata-collapse i18n-title title="Archived document metadata" [metadata]="metadata.archive_metadata" *ngIf="metadata?.archive_metadata?.length > 0"></pngx-metadata-collapse>
 
                     </ng-template>
                 </li>
                 <li [ngbNavItem]="DocumentDetailNavIDs.Notes" *ngIf="notesEnabled">
                     <a ngbNavLink i18n>Notes <span *ngIf="document?.notes.length" class="badge text-bg-secondary ms-1">{{document.notes.length}}</span></a>
                     <ng-template ngbNavContent>
-                        <app-document-notes [documentId]="documentId" [notes]="document?.notes" [addDisabled]="!userCanEdit" (updated)="notesUpdated($event)"></app-document-notes>
+                        <pngx-document-notes [documentId]="documentId" [notes]="document?.notes" [addDisabled]="!userCanEdit" (updated)="notesUpdated($event)"></pngx-document-notes>
                     </ng-template>
                 </li>
 
                     <a ngbNavLink i18n>Permissions</a>
                     <ng-template ngbNavContent>
                         <div class="mb-3">
-                            <app-permissions-form [users]="users" formControlName="permissions_form"></app-permissions-form>
+                            <pngx-permissions-form [users]="users" formControlName="permissions_form"></pngx-permissions-form>
                         </div>
                     </ng-template>
                 </li>
 
             <ng-container>
                 <button type="button" class="btn btn-outline-secondary me-2" (click)="discard()" i18n [disabled]="!userCanEdit || networkActive || (isDirty$ | async) !== true">Discard</button>
-                <ng-container *appIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }">
+                <ng-container *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }">
                     <button *ngIf="hasNext()" type="button" class="btn btn-outline-primary me-2" (click)="saveEditNext()" i18n [disabled]="!userCanEdit || networkActive || (isDirty$ | async) !== true">Save &amp; next</button>
                     <button *ngIf="!hasNext()" type="button" class="btn btn-outline-primary me-2" (click)="save(true)" i18n [disabled]="!userCanEdit || networkActive || (isDirty$ | async) !== true">Save &amp; close</button>
                     <button type="submit" class="btn btn-primary" i18n [disabled]="!userCanEdit || networkActive || (isDirty$ | async) !== true">Save</button>
index 056df5c2e3f9f42a5f47cd88fefc89ed3921f807..d992b0191ede98eec75650f037206783379204f0 100644 (file)
@@ -75,7 +75,7 @@ enum DocumentDetailNavIDs {
 }
 
 @Component({
-  selector: 'app-document-detail',
+  selector: 'pngx-document-detail',
   templateUrl: './document-detail.component.html',
   styleUrls: ['./document-detail.component.scss'],
 })
index ab117be81c66b47c65b5a1ed161551b58fd655d5..99ee0d1a4c7d6cfbd5a6d9eaeb8e85b10c15b5fb 100644 (file)
@@ -1,7 +1,7 @@
 import { Component, Input } from '@angular/core'
 
 @Component({
-  selector: 'app-metadata-collapse',
+  selector: 'pngx-metadata-collapse',
   templateUrl: './metadata-collapse.component.html',
   styleUrls: ['./metadata-collapse.component.scss'],
 })
index d4d94c9ec2a93e478e177b7b4b8211a1c5b32b34..9e65b7a77a7c09fc150f70d93f313a3299b91645 100644 (file)
@@ -21,9 +21,9 @@
       </button>
     </div>
   </div>
-    <div class="d-flex align-items-center gap-2" *appIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }">
+    <div class="d-flex align-items-center gap-2" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }">
       <label class="me-2" i18n>Edit:</label>
-      <app-filterable-dropdown title="Tags" icon="tag-fill" i18n-title
+      <pngx-filterable-dropdown title="Tags" icon="tag-fill" i18n-title
         filterPlaceholder="Filter tags" i18n-filterPlaceholder
         [items]="tags"
         [disabled]="!userCanEditAll"
@@ -34,8 +34,8 @@
         [(selectionModel)]="tagSelectionModel"
         [documentCounts]="tagDocumentCounts"
         (apply)="setTags($event)">
-      </app-filterable-dropdown>
-      <app-filterable-dropdown title="Correspondent" icon="person-fill" i18n-title
+      </pngx-filterable-dropdown>
+      <pngx-filterable-dropdown title="Correspondent" icon="person-fill" i18n-title
         filterPlaceholder="Filter correspondents" i18n-filterPlaceholder
         [items]="correspondents"
         [disabled]="!userCanEditAll"
@@ -45,8 +45,8 @@
         [(selectionModel)]="correspondentSelectionModel"
         [documentCounts]="correspondentDocumentCounts"
         (apply)="setCorrespondents($event)">
-      </app-filterable-dropdown>
-      <app-filterable-dropdown title="Document type" icon="file-earmark-fill" i18n-title
+      </pngx-filterable-dropdown>
+      <pngx-filterable-dropdown title="Document type" icon="file-earmark-fill" i18n-title
         filterPlaceholder="Filter document types" i18n-filterPlaceholder
         [items]="documentTypes"
         [disabled]="!userCanEditAll"
@@ -56,8 +56,8 @@
         [(selectionModel)]="documentTypeSelectionModel"
         [documentCounts]="documentTypeDocumentCounts"
         (apply)="setDocumentTypes($event)">
-      </app-filterable-dropdown>
-      <app-filterable-dropdown title="Storage path" icon="folder-fill" i18n-title
+      </pngx-filterable-dropdown>
+      <pngx-filterable-dropdown title="Storage path" icon="folder-fill" i18n-title
         filterPlaceholder="Filter storage paths" i18n-filterPlaceholder
         [items]="storagePaths"
         [disabled]="!userCanEditAll"
@@ -67,7 +67,7 @@
         [(selectionModel)]="storagePathsSelectionModel"
         [documentCounts]="storagePathDocumentCounts"
         (apply)="setStoragePaths($event)">
-      </app-filterable-dropdown>
+      </pngx-filterable-dropdown>
   </div>
   <div class="d-flex align-items-center gap-2 ms-auto">
     <div class="btn-toolbar">
     </div>
 
     <div class="btn-group btn-group-sm">
-      <button type="button" class="btn btn-sm btn-outline-danger" (click)="applyDelete()" *appIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.Document }" [disabled]="!userOwnsAll">
+      <button type="button" class="btn btn-sm btn-outline-danger" (click)="applyDelete()" *pngxIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.Document }" [disabled]="!userOwnsAll">
         <svg width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor">
           <use xlink:href="assets/bootstrap-icons.svg#trash" />
         </svg>&nbsp;<ng-container i18n>Delete</ng-container>
index 1b118683404ada952a89e6bcb2587e954260adf2..29ae839fb8b8dd41456edec3bf4f699cb034325f 100644 (file)
@@ -36,7 +36,7 @@ import { FormControl, FormGroup } from '@angular/forms'
 import { first, Subject, takeUntil } from 'rxjs'
 
 @Component({
-  selector: 'app-bulk-editor',
+  selector: 'pngx-bulk-editor',
   templateUrl: './bulk-editor.component.html',
   styleUrls: ['./bulk-editor.component.scss'],
 })
index 5bc27c8a14103afd325b9a39149e0225b9aa2ad2..ba4608d3c4644f1c583a3c3787d744f45d589838 100644 (file)
@@ -21,7 +21,7 @@
               <ng-template #nolink>{{(document.correspondent$ | async)?.name}}</ng-template>:
             </ng-container>
             {{document.title | documentTitle}}
-            <app-tag [tag]="t" linkTitle="Filter by tag" i18n-linkTitle *ngFor="let t of document.tags$ | async" class="ms-1" (click)="clickTag.emit(t.id);$event.stopPropagation()" [clickable]="clickTag.observers.length"></app-tag>
+            <pngx-tag [tag]="t" linkTitle="Filter by tag" i18n-linkTitle *ngFor="let t of document.tags$ | async" class="ms-1" (click)="clickTag.emit(t.id);$event.stopPropagation()" [clickable]="clickTag.observers.length"></pngx-tag>
           </h5>
         </div>
         <p class="card-text">
@@ -43,7 +43,7 @@
                 <use xlink:href="assets/bootstrap-icons.svg#diagram-3"/>
               </svg>&nbsp;<span class="d-none d-md-inline" i18n>More like this</span>
             </a>
-            <a routerLink="/documents/{{document.id}}" class="btn btn-sm btn-outline-secondary" *appIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }">
+            <a routerLink="/documents/{{document.id}}" class="btn btn-sm btn-outline-secondary" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }">
               <svg class="sidebaricon" fill="currentColor" class="sidebaricon">
                 <use xlink:href="assets/bootstrap-icons.svg#pencil"/>
               </svg>&nbsp;<span class="d-none d-md-inline" i18n>Edit</span>
index 8d2a594052865add47c2698c49c5405e1454d637..1725e5795be6916f9a1333a1971300eca3b127f7 100644 (file)
@@ -13,7 +13,7 @@ import { SETTINGS_KEYS } from 'src/app/data/paperless-uisettings'
 import { ComponentWithPermissions } from '../../with-permissions/with-permissions.component'
 
 @Component({
-  selector: 'app-document-card-large',
+  selector: 'pngx-document-card-large',
   templateUrl: './document-card-large.component.html',
   styleUrls: [
     './document-card-large.component.scss',
index 98d8e2770e6505f662ef410631dee465da324d14..8719f2ddfdd3929e7b2bf4d937e3ad7a2f5985d4 100644 (file)
@@ -11,7 +11,7 @@
       </div>
 
       <div class="tags d-flex flex-column text-end position-absolute me-1 fs-6">
-        <app-tag *ngFor="let t of getTagsLimited$() | async" [tag]="t" (click)="clickTag.emit(t.id);$event.stopPropagation()" [clickable]="true" linkTitle="Toggle tag filter" i18n-linkTitle></app-tag>
+        <pngx-tag *ngFor="let t of getTagsLimited$() | async" [tag]="t" (click)="clickTag.emit(t.id);$event.stopPropagation()" [clickable]="true" linkTitle="Toggle tag filter" i18n-linkTitle></pngx-tag>
         <div *ngIf="moreTags">
           <span class="badge text-dark">+ {{moreTags}}</span>
         </div>
@@ -80,7 +80,7 @@
       </div>
       <div class="d-flex justify-content-between align-items-center">
         <div class="btn-group w-100">
-          <a routerLink="/documents/{{document.id}}" class="btn btn-sm btn-outline-secondary" title="Edit" i18n-title *appIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }" i18n-title>
+          <a routerLink="/documents/{{document.id}}" class="btn btn-sm btn-outline-secondary" title="Edit" i18n-title *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Document }" i18n-title>
             <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-pencil" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
               <path fill-rule="evenodd" d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5L13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175l-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z"/>
             </svg>
index 3dd64818df25dc7701afe1bfc0ccc5547748af60..65ee5e6ad948aecb7622863ac83ccc70995fd87d 100644 (file)
@@ -14,7 +14,7 @@ import { SETTINGS_KEYS } from 'src/app/data/paperless-uisettings'
 import { ComponentWithPermissions } from '../../with-permissions/with-permissions.component'
 
 @Component({
-  selector: 'app-document-card-small',
+  selector: 'pngx-document-card-small',
   templateUrl: './document-card-small.component.html',
   styleUrls: [
     './document-card-small.component.scss',
index e91115323b2ee41dfcfd91f1fa6e5f607d5022ca..70931e5bc4cc901637e86842f0be38500ca00d32 100644 (file)
@@ -1,4 +1,4 @@
-<app-page-header [title]="getTitle()">
+<pngx-page-header [title]="getTitle()">
 
   <div ngbDropdown class="me-2 d-flex">
     <button class="btn btn-sm btn-outline-primary" id="dropdownSelect" ngbDropdownToggle>
@@ -59,7 +59,7 @@
     </div>
   </div>
 
-  <div class="btn-group ms-2 flex-fill" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.SavedView }" ngbDropdown role="group">
+  <div class="btn-group ms-2 flex-fill" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.SavedView }" ngbDropdown role="group">
     <button class="btn btn-sm btn-outline-primary dropdown-toggle flex-fill" tourAnchor="tour.documents-views" ngbDropdownToggle>
       <ng-container i18n>Views</ng-container>
       <div *ngIf="savedViewIsModified" class="position-absolute top-0 start-100 p-2 translate-middle badge bg-secondary border border-light rounded-circle">
         <div class="dropdown-divider" *ngIf="savedViewService.allViews.length > 0"></div>
       </ng-container>
 
-      <div *appIfPermissions="{ action: PermissionAction.Change, type: PermissionType.SavedView }">
+      <div *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.SavedView }">
         <button ngbDropdownItem (click)="saveViewConfig()" *ngIf="list.activeSavedViewId" [disabled]="!savedViewIsModified" i18n>Save "{{list.activeSavedViewTitle}}"</button>
       </div>
-      <button ngbDropdownItem (click)="saveViewConfigAs()" *appIfPermissions="{ action: PermissionAction.Add, type: PermissionType.SavedView }" i18n>Save as...</button>
+      <button ngbDropdownItem (click)="saveViewConfigAs()" *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.SavedView }" i18n>Save as...</button>
     </div>
   </div>
 
-</app-page-header>
+</pngx-page-header>
 
 <div class="row sticky-top pt-3 pt-sm-4 pb-3 pb-lg-4 bg-body">
-  <app-filter-editor [hidden]="isBulkEditing" [(filterRules)]="list.filterRules" [unmodifiedFilterRules]="unmodifiedFilterRules" [selectionData]="list.selectionData" #filterEditor></app-filter-editor>
-  <app-bulk-editor [hidden]="!isBulkEditing"></app-bulk-editor>
+  <pngx-filter-editor [hidden]="isBulkEditing" [(filterRules)]="list.filterRules" [unmodifiedFilterRules]="unmodifiedFilterRules" [selectionData]="list.selectionData" #filterEditor></pngx-filter-editor>
+  <pngx-bulk-editor [hidden]="!isBulkEditing"></pngx-bulk-editor>
 </div>
 
 
 
 <ng-template #documentListNoError>
   <div *ngIf="displayMode === 'largeCards'">
-    <app-document-card-large [selected]="list.isSelected(d)" (toggleSelected)="toggleSelected(d, $event)" (dblClickDocument)="openDocumentDetail(d)" *ngFor="let d of list.documents; trackBy: trackByDocumentId" [document]="d" (clickTag)="clickTag($event)" (clickCorrespondent)="clickCorrespondent($event)" (clickDocumentType)="clickDocumentType($event)" (clickStoragePath)="clickStoragePath($event)" (clickMoreLike)="clickMoreLike(d.id)">
-    </app-document-card-large>
+    <pngx-document-card-large [selected]="list.isSelected(d)" (toggleSelected)="toggleSelected(d, $event)" (dblClickDocument)="openDocumentDetail(d)" *ngFor="let d of list.documents; trackBy: trackByDocumentId" [document]="d" (clickTag)="clickTag($event)" (clickCorrespondent)="clickCorrespondent($event)" (clickDocumentType)="clickDocumentType($event)" (clickStoragePath)="clickStoragePath($event)" (clickMoreLike)="clickMoreLike(d.id)">
+    </pngx-document-card-large>
   </div>
 
   <table class="table table-sm align-middle border shadow-sm" *ngIf="displayMode === 'details'">
     <thead>
       <th></th>
       <th class="d-none d-lg-table-cell"
-        appSortable="archive_serial_number"
+        pngxSortable="archive_serial_number"
         title="Sort by ASN" i18n-title
         [currentSortField]="list.sortField"
         [currentSortReverse]="list.sortReverse"
         (sort)="onSort($event)"
         i18n>ASN</th>
       <th class="d-none d-md-table-cell"
-        appSortable="correspondent__name"
+        pngxSortable="correspondent__name"
         title="Sort by correspondent" i18n-title
         [currentSortField]="list.sortField"
         [currentSortReverse]="list.sortReverse"
         (sort)="onSort($event)"
         i18n>Correspondent</th>
       <th
-        appSortable="title"
+        pngxSortable="title"
         title="Sort by title" i18n-title
         [currentSortField]="list.sortField"
         [currentSortReverse]="list.sortReverse"
         (sort)="onSort($event)"
         i18n>Title</th>
       <th class="d-none d-xl-table-cell"
-        appSortable="owner"
+        pngxSortable="owner"
         title="Sort by owner" i18n-title
         [currentSortField]="list.sortField"
         [currentSortReverse]="list.sortReverse"
         (sort)="onSort($event)"
         i18n>Owner</th>
       <th *ngIf="notesEnabled" class="d-none d-xl-table-cell"
-        appSortable="num_notes"
+        pngxSortable="num_notes"
         title="Sort by notes" i18n-title
         [currentSortField]="list.sortField"
         [currentSortReverse]="list.sortReverse"
         (sort)="onSort($event)"
         i18n>Notes</th>
       <th class="d-none d-xl-table-cell"
-        appSortable="document_type__name"
+        pngxSortable="document_type__name"
         title="Sort by document type" i18n-title
         [currentSortField]="list.sortField"
         [currentSortReverse]="list.sortReverse"
         (sort)="onSort($event)"
         i18n>Document type</th>
       <th class="d-none d-xl-table-cell"
-        appSortable="storage_path__name"
+        pngxSortable="storage_path__name"
         title="Sort by storage path" i18n-title
         [currentSortField]="list.sortField"
         [currentSortReverse]="list.sortReverse"
         (sort)="onSort($event)"
         i18n>Storage path</th>
       <th
-        appSortable="created"
+        pngxSortable="created"
         title="Sort by created date" i18n-title
         [currentSortField]="list.sortField"
         [currentSortReverse]="list.sortReverse"
         (sort)="onSort($event)"
         i18n>Created</th>
       <th class="d-none d-xl-table-cell"
-        appSortable="added"
+        pngxSortable="added"
         title="Sort by added date" i18n-title
         [currentSortField]="list.sortField"
         [currentSortReverse]="list.sortReverse"
         </td>
         <td>
           <a routerLink="/documents/{{d.id}}" title="Edit document" i18n-title style="overflow-wrap: anywhere;">{{d.title | documentTitle}}</a>
-          <app-tag [tag]="t" *ngFor="let t of d.tags$ | async" class="ms-1" clickable="true" linkTitle="Filter by tag" i18n-linkTitle (click)="clickTag(t.id);$event.stopPropagation()"></app-tag>
+          <pngx-tag [tag]="t" *ngFor="let t of d.tags$ | async" class="ms-1" clickable="true" linkTitle="Filter by tag" i18n-linkTitle (click)="clickTag(t.id);$event.stopPropagation()"></pngx-tag>
         </td>
         <td>
           {{d.owner | username}}
   </table>
 
   <div class="row row-cols-paperless-cards" *ngIf="displayMode === 'smallCards'">
-    <app-document-card-small class="p-0" [selected]="list.isSelected(d)" (toggleSelected)="toggleSelected(d, $event)" (dblClickDocument)="openDocumentDetail(d)" [document]="d" *ngFor="let d of list.documents; trackBy: trackByDocumentId" (clickTag)="clickTag($event)" (clickCorrespondent)="clickCorrespondent($event)" (clickStoragePath)="clickStoragePath($event)" (clickDocumentType)="clickDocumentType($event)"></app-document-card-small>
+    <pngx-document-card-small class="p-0" [selected]="list.isSelected(d)" (toggleSelected)="toggleSelected(d, $event)" (dblClickDocument)="openDocumentDetail(d)" [document]="d" *ngFor="let d of list.documents; trackBy: trackByDocumentId" (clickTag)="clickTag($event)" (clickCorrespondent)="clickCorrespondent($event)" (clickStoragePath)="clickStoragePath($event)" (clickDocumentType)="clickDocumentType($event)"></pngx-document-card-small>
   </div>
   <div *ngIf="list.documents?.length > 15" class="mt-3">
     <ng-container *ngTemplateOutlet="pagination"></ng-container>
index 911ddccbf34f23d381835cb7e8273ca718611859..f095695ecce5443ab537917c0ba9c02d1530885f 100644 (file)
@@ -37,7 +37,7 @@ import { FilterEditorComponent } from './filter-editor/filter-editor.component'
 import { SaveViewConfigDialogComponent } from './save-view-config-dialog/save-view-config-dialog.component'
 
 @Component({
-  selector: 'app-document-list',
+  selector: 'pngx-document-list',
   templateUrl: './document-list.component.html',
   styleUrls: ['./document-list.component.scss'],
 })
index 69e6e3768ab213c6ef7b36b94c3b5a15a85ba627..460b9e0fbec02102ca4092e0362d0040f0bff2ab 100644 (file)
@@ -23,7 +23,7 @@
   <div class="col-auto">
     <div class="d-flex flex-wrap gap-3">
       <div class="d-flex flex-wrap gap-2">
-        <app-filterable-dropdown class="flex-fill" title="Tags" icon="tag-fill" i18n-title
+        <pngx-filterable-dropdown class="flex-fill" title="Tags" icon="tag-fill" i18n-title
           filterPlaceholder="Filter tags" i18n-filterPlaceholder
           [items]="tags"
           [manyToOne]="true"
           (selectionModelChange)="updateRules()"
           (opened)="onTagsDropdownOpen()"
           [documentCounts]="tagDocumentCounts"
-          [allowSelectNone]="true"></app-filterable-dropdown>
-        <app-filterable-dropdown class="flex-fill" title="Correspondent" icon="person-fill" i18n-title
+          [allowSelectNone]="true"></pngx-filterable-dropdown>
+        <pngx-filterable-dropdown class="flex-fill" title="Correspondent" icon="person-fill" i18n-title
           filterPlaceholder="Filter correspondents" i18n-filterPlaceholder
           [items]="correspondents"
           [(selectionModel)]="correspondentSelectionModel"
           (selectionModelChange)="updateRules()"
           (opened)="onCorrespondentDropdownOpen()"
           [documentCounts]="correspondentDocumentCounts"
-          [allowSelectNone]="true"></app-filterable-dropdown>
-        <app-filterable-dropdown class="flex-fill" title="Document type" icon="file-earmark-fill" i18n-title
+          [allowSelectNone]="true"></pngx-filterable-dropdown>
+        <pngx-filterable-dropdown class="flex-fill" title="Document type" icon="file-earmark-fill" i18n-title
           filterPlaceholder="Filter document types" i18n-filterPlaceholder
           [items]="documentTypes"
           [(selectionModel)]="documentTypeSelectionModel"
           (selectionModelChange)="updateRules()"
           (opened)="onDocumentTypeDropdownOpen()"
           [documentCounts]="documentTypeDocumentCounts"
-          [allowSelectNone]="true"></app-filterable-dropdown>
-        <app-filterable-dropdown class="flex-fill" title="Storage path" icon="folder-fill" i18n-title
+          [allowSelectNone]="true"></pngx-filterable-dropdown>
+        <pngx-filterable-dropdown class="flex-fill" title="Storage path" icon="folder-fill" i18n-title
           filterPlaceholder="Filter storage paths" i18n-filterPlaceholder
           [items]="storagePaths"
           [(selectionModel)]="storagePathSelectionModel"
           (selectionModelChange)="updateRules()"
           (opened)="onStoragePathDropdownOpen()"
           [documentCounts]="storagePathDocumentCounts"
-          [allowSelectNone]="true"></app-filterable-dropdown>
+          [allowSelectNone]="true"></pngx-filterable-dropdown>
       </div>
       <div class="d-flex flex-wrap gap-2">
-        <app-date-dropdown
+        <pngx-date-dropdown
           title="Created" i18n-title
           (datesSet)="updateRules()"
           [(dateBefore)]="dateCreatedBefore"
           [(dateAfter)]="dateCreatedAfter"
-          [(relativeDate)]="dateCreatedRelativeDate"></app-date-dropdown>
-        <app-date-dropdown
+          [(relativeDate)]="dateCreatedRelativeDate"></pngx-date-dropdown>
+        <pngx-date-dropdown
           title="Added" i18n-title
           (datesSet)="updateRules()"
           [(dateBefore)]="dateAddedBefore"
           [(dateAfter)]="dateAddedAfter"
-          [(relativeDate)]="dateAddedRelativeDate"></app-date-dropdown>
+          [(relativeDate)]="dateAddedRelativeDate"></pngx-date-dropdown>
       </div>
       <div class="d-flex flex-wrap">
-        <app-permissions-filter-dropdown
+        <pngx-permissions-filter-dropdown
           title="Permissions" i18n-title
           (ownerFilterSet)="updateRules()"
-          [(selectionModel)]="permissionsSelectionModel"></app-permissions-filter-dropdown>
+          [(selectionModel)]="permissionsSelectionModel"></pngx-permissions-filter-dropdown>
       </div>
       <div class="d-flex flex-wrap d-none d-sm-inline-block">
         <button class="btn btn-outline-secondary btn-sm" [disabled]="!rulesModified" (click)="resetSelected()">
index c619039759c467b0af3823db477c480bc735407c..78b1bdc8304e422a2eec0e396a7ee598bef3428d 100644 (file)
@@ -103,7 +103,7 @@ const RELATIVE_DATE_QUERYSTRINGS = [
 ]
 
 @Component({
-  selector: 'app-filter-editor',
+  selector: 'pngx-filter-editor',
   templateUrl: './filter-editor.component.html',
   styleUrls: ['./filter-editor.component.scss'],
 })
index ae20031a21d48edc5dc580a417cdc62aeec8b267..4563e9624dd1e67e21bf1ce681c44ab6aede0bba 100644 (file)
@@ -5,9 +5,9 @@
     </button>
   </div>
   <div class="modal-body">
-    <app-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></app-input-text>
-    <app-input-check i18n-title title="Show in sidebar" formControlName="showInSideBar"></app-input-check>
-    <app-input-check i18n-title title="Show on dashboard" formControlName="showOnDashboard"></app-input-check>
+    <pngx-input-text i18n-title title="Name" formControlName="name" [error]="error?.name"></pngx-input-text>
+    <pngx-input-check i18n-title title="Show in sidebar" formControlName="showInSideBar"></pngx-input-check>
+    <pngx-input-check i18n-title title="Show on dashboard" formControlName="showOnDashboard"></pngx-input-check>
     <div *ngIf="error?.filter_rules" class="alert alert-danger" role="alert">
       <h6 class="alert-heading" i18n>Filter rules error occurred while saving this view</h6>
       <ng-container i18n>The error returned was</ng-container>:<br/>
index 84d4e9b24efcbada95f6219f081306f001aca46a..b079e2a1ee2e10fa42a88d6a099fd7f09a5c6ed2 100644 (file)
@@ -3,7 +3,7 @@ import { FormControl, FormGroup } from '@angular/forms'
 import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
 
 @Component({
-  selector: 'app-save-view-config-dialog',
+  selector: 'pngx-save-view-config-dialog',
   templateUrl: './save-view-config-dialog.component.html',
   styleUrls: ['./save-view-config-dialog.component.scss'],
 })
index c76660e30734d6c60880b0c96bdd042e41a7d8ad..64426962aeb80cd628514d4a4ab7bc419c4b5ad5 100644 (file)
@@ -1,5 +1,5 @@
 <div *ngIf="notes">
-    <form [formGroup]="noteForm" class="needs-validation mt-3" *appIfPermissions="{ action: PermissionAction.Add, type: PermissionType.Note }" novalidate>
+    <form [formGroup]="noteForm" class="needs-validation mt-3" *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.Note }" novalidate>
         <div class="form-group">
             <textarea class="form-control form-control-sm" [class.is-invalid]="newNoteError" rows="3" formControlName="newNote" placeholder="Enter note" i18n-placeholder (keydown)="noteFormKeydown($event)" required></textarea>
             <div class="invalid-feedback" i18n>
@@ -18,7 +18,7 @@
         </div>
         <div class="d-flex card-footer small bg-light text-primary justify-content-between align-items-center">
             <span>{{displayName(note)}} - {{ note.created | customDate}}</span>
-            <button type="button" class="btn btn-link btn-sm p-0 fade" title="Delete note" i18n-title (click)="deleteNote(note.id)" *appIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.Note }">
+            <button type="button" class="btn btn-link btn-sm p-0 fade" title="Delete note" i18n-title (click)="deleteNote(note.id)" *pngxIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.Note }">
                 <svg width="13" height="13" fill="currentColor">
                     <use xlink:href="assets/bootstrap-icons.svg#trash" />
                 </svg>
index 1ee6edd96a54a04828a986a39fb0e9cd90b25a6e..4e45ad2719c48675d38a904be5c9b2eebb5ee4f7 100644 (file)
@@ -8,7 +8,7 @@ import { UserService } from 'src/app/services/rest/user.service'
 import { PaperlessUser } from 'src/app/data/paperless-user'
 
 @Component({
-  selector: 'app-document-notes',
+  selector: 'pngx-document-notes',
   templateUrl: './document-notes.component.html',
   styleUrls: ['./document-notes.component.scss'],
 })
index 06f9d11b104897a88be4c396bb624cde60639be4..c0ed578a1d5f3733fb0f5e15a1c8be4eddba8854 100644 (file)
@@ -14,7 +14,7 @@ import { CorrespondentEditDialogComponent } from '../../common/edit-dialog/corre
 import { ManagementListComponent } from '../management-list/management-list.component'
 
 @Component({
-  selector: 'app-correspondent-list',
+  selector: 'pngx-correspondent-list',
   templateUrl: './../management-list/management-list.component.html',
   styleUrls: ['./../management-list/management-list.component.scss'],
   providers: [{ provide: CustomDatePipe }],
index ee209e738ff17a20bba52f120b2358e87cdb8002..925e17b2b554986a3f5966bc51c899083d8b5ab7 100644 (file)
@@ -13,7 +13,7 @@ import { DocumentTypeEditDialogComponent } from '../../common/edit-dialog/docume
 import { ManagementListComponent } from '../management-list/management-list.component'
 
 @Component({
-  selector: 'app-document-type-list',
+  selector: 'pngx-document-type-list',
   templateUrl: './../management-list/management-list.component.html',
   styleUrls: ['./../management-list/management-list.component.scss'],
 })
index f16a6e5295600eeb4df296ed615c4963a43cea1e..91f7f3bd6f545cb3747b0a21831bba458b14ac43 100644 (file)
@@ -1,6 +1,6 @@
-<app-page-header title="Logs" i18n-title>
+<pngx-page-header title="Logs" i18n-title>
 
-</app-page-header>
+</pngx-page-header>
 
 <ul ngbNav #nav="ngbNav" [(activeId)]="activeLog" (activeIdChange)="reloadLogs()" class="nav-tabs">
   <li *ngFor="let logFile of logFiles" [ngbNavItem]="logFile">
index e2fc2ab0bcb6e38d77f7d80db6f0cafdcd2a2b11..cf88077e70adfa12ef4eef2295759e0688827d71 100644 (file)
@@ -10,7 +10,7 @@ import { Subject, takeUntil } from 'rxjs'
 import { LogService } from 'src/app/services/rest/log.service'
 
 @Component({
-  selector: 'app-logs',
+  selector: 'pngx-logs',
   templateUrl: './logs.component.html',
   styleUrls: ['./logs.component.scss'],
 })
index b0fba8962f84d554a37178c2b5c6cec65302f006..0c73558732f8d5817e6b0f03a5e6e4b527db04aa 100644 (file)
@@ -1,6 +1,6 @@
-<app-page-header title="{{ typeNamePlural | titlecase }}">
-  <button type="button" class="btn btn-sm btn-outline-primary" (click)="openCreateDialog()" *appIfPermissions="{ action: PermissionAction.Add, type: permissionType }" i18n>Create</button>
-</app-page-header>
+<pngx-page-header title="{{ typeNamePlural | titlecase }}">
+  <button type="button" class="btn btn-sm btn-outline-primary" (click)="openCreateDialog()" *pngxIfPermissions="{ action: PermissionAction.Add, type: permissionType }" i18n>Create</button>
+</pngx-page-header>
 
 <div class="row mb-3">
   <div class="col-md mb-2 mb-xl-0">
 <table class="table table-striped align-middle border shadow-sm">
   <thead>
     <tr>
-      <th scope="col" appSortable="name" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)" i18n>Name</th>
-      <th scope="col" class="d-none d-sm-table-cell" appSortable="matching_algorithm" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)" i18n>Matching</th>
-      <th scope="col" appSortable="document_count" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)" i18n>Document count</th>
-      <th scope="col" *ngFor="let column of extraColumns" appSortable="{{column.key}}" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)">{{column.name}}</th>
+      <th scope="col" pngxSortable="name" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)" i18n>Name</th>
+      <th scope="col" class="d-none d-sm-table-cell" pngxSortable="matching_algorithm" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)" i18n>Matching</th>
+      <th scope="col" pngxSortable="document_count" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)" i18n>Document count</th>
+      <th scope="col" *ngFor="let column of extraColumns" pngxSortable="{{column.key}}" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)">{{column.name}}</th>
       <th scope="col" i18n>Actions</th>
     </tr>
   </thead>
               </svg>
             </button>
             <div ngbDropdownMenu aria-labelledby="actionsMenuMobile">
-              <button (click)="filterDocuments(object)" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }" ngbDropdownItem i18n>Filter Documents</button>
-              <button (click)="openEditDialog(object)" *appIfPermissions="{ action: PermissionAction.Change, type: permissionType }" ngbDropdownItem i18n>Edit</button>
-              <button class="text-danger" (click)="openDeleteDialog(object)" *appIfPermissions="{ action: PermissionAction.Delete, type: permissionType }" ngbDropdownItem i18n>Delete</button>
+              <button (click)="filterDocuments(object)" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }" ngbDropdownItem i18n>Filter Documents</button>
+              <button (click)="openEditDialog(object)" *pngxIfPermissions="{ action: PermissionAction.Change, type: permissionType }" ngbDropdownItem i18n>Edit</button>
+              <button class="text-danger" (click)="openDeleteDialog(object)" *pngxIfPermissions="{ action: PermissionAction.Delete, type: permissionType }" ngbDropdownItem i18n>Delete</button>
             </div>
           </div>
         </div>
         <div class="btn-group d-none d-sm-block">
-          <button class="btn btn-sm btn-outline-secondary" (click)="filterDocuments(object)" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
+          <button class="btn btn-sm btn-outline-secondary" (click)="filterDocuments(object)" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
             <svg class="buttonicon-sm" fill="currentColor">
               <use xlink:href="assets/bootstrap-icons.svg#filter" />
             </svg>&nbsp;<ng-container i18n>Documents</ng-container>
           </button>
-          <button class="btn btn-sm btn-outline-secondary" (click)="openEditDialog(object)" *appIfPermissions="{ action: PermissionAction.Change, type: permissionType }" [disabled]="!userCanEdit(object)">
+          <button class="btn btn-sm btn-outline-secondary" (click)="openEditDialog(object)" *pngxIfPermissions="{ action: PermissionAction.Change, type: permissionType }" [disabled]="!userCanEdit(object)">
             <svg class="buttonicon-sm" fill="currentColor">
               <use xlink:href="assets/bootstrap-icons.svg#pencil" />
             </svg>&nbsp;<ng-container i18n>Edit</ng-container>
           </button>
-          <button class="btn btn-sm btn-outline-danger" (click)="openDeleteDialog(object)" *appIfPermissions="{ action: PermissionAction.Delete, type: permissionType }" [disabled]="!userCanDelete(object)">
+          <button class="btn btn-sm btn-outline-danger" (click)="openDeleteDialog(object)" *pngxIfPermissions="{ action: PermissionAction.Delete, type: permissionType }" [disabled]="!userCanDelete(object)">
             <svg class="buttonicon-sm" fill="currentColor">
               <use xlink:href="assets/bootstrap-icons.svg#trash" />
             </svg>&nbsp;<ng-container i18n>Delete</ng-container>
index 513085c8cbc3ccaffc9ab33909bc6380807e00ac..e834f36dec43cf0150c1aa779cbe83f060ebcdf6 100644 (file)
@@ -1,12 +1,12 @@
-<app-page-header title="Settings" i18n-title>
+<pngx-page-header title="Settings" i18n-title>
   <button class="btn btn-sm btn-outline-primary" (click)="tourService.start()"><ng-container i18n>Start tour</ng-container></button>
-  <a *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Admin }" class="btn btn-sm btn-primary ms-3" href="admin/" target="_blank">
+  <a *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Admin }" class="btn btn-sm btn-primary ms-3" href="admin/" target="_blank">
       <ng-container i18n>Open Django Admin</ng-container>
       <svg class="sidebaricon ms-1" fill="currentColor">
         <use xlink:href="assets/bootstrap-icons.svg#arrow-up-right"/>
       </svg>
   </a>
-</app-page-header>
+</pngx-page-header>
 
 <form [formGroup]="settingsForm" (ngSubmit)="saveSettings()">
 
@@ -89,7 +89,7 @@
           </div>
           <div class="col">
 
-            <app-input-check i18n-title title="Use PDF viewer provided by the browser" i18n-hint hint="This is usually faster for displaying large PDF documents, but it might not work on some browsers." formControlName="useNativePdfViewer"></app-input-check>
+            <pngx-input-check i18n-title title="Use PDF viewer provided by the browser" i18n-hint hint="This is usually faster for displaying large PDF documents, but it might not work on some browsers." formControlName="useNativePdfViewer"></pngx-input-check>
 
           </div>
         </div>
           </div>
           <div class="col">
 
-            <app-input-check i18n-title title="Use 'slim' sidebar (icons only)" formControlName="slimSidebarEnabled"></app-input-check>
+            <pngx-input-check i18n-title title="Use 'slim' sidebar (icons only)" formControlName="slimSidebarEnabled"></pngx-input-check>
 
           </div>
         </div>
             <span i18n>Dark mode</span>
           </div>
           <div class="col">
-            <app-input-check i18n-title title="Use system settings" formControlName="darkModeUseSystem"></app-input-check>
-            <app-input-check [hidden]="settingsForm.value.darkModeUseSystem" i18n-title title="Enable dark mode" formControlName="darkModeEnabled"></app-input-check>
-            <app-input-check i18n-title title="Invert thumbnails in dark mode" formControlName="darkModeInvertThumbs"></app-input-check>
+            <pngx-input-check i18n-title title="Use system settings" formControlName="darkModeUseSystem"></pngx-input-check>
+            <pngx-input-check [hidden]="settingsForm.value.darkModeUseSystem" i18n-title title="Enable dark mode" formControlName="darkModeEnabled"></pngx-input-check>
+            <pngx-input-check i18n-title title="Invert thumbnails in dark mode" formControlName="darkModeInvertThumbs"></pngx-input-check>
           </div>
         </div>
 
             <span i18n>Theme Color</span>
           </div>
           <div class="col col-md-3">
-            <app-input-color i18n-title formControlName="themeColor" [error]="error?.color"></app-input-color>
+            <pngx-input-color i18n-title formControlName="themeColor" [error]="error?.color"></pngx-input-color>
           </div>
           <div class="col-2">
             <button class="btn btn-link btn-sm pt-2 ps-0" [disabled]="!this.settingsForm.get('themeColor').value" (click)="clearThemeColor()">
             <p i18n>
               <em>No tracking data is collected by the app in any way.</em>
             </p>
-            <app-input-check i18n-title title="Enable update checking" formControlName="updateCheckingEnabled" i18n-hint hint="Note that for users of third-party containers e.g. linuxserver.io this notification may be 'ahead' of the current third-party release."></app-input-check>
+            <pngx-input-check i18n-title title="Enable update checking" formControlName="updateCheckingEnabled" i18n-hint hint="Note that for users of third-party containers e.g. linuxserver.io this notification may be 'ahead' of the current third-party release."></pngx-input-check>
           </div>
         </div>
 
 
         <div class="row mb-3">
           <div class="offset-md-3 col">
-            <app-input-check i18n-title title="Show confirmation dialogs" formControlName="bulkEditConfirmationDialogs" i18n-hint hint="Deleting documents will always ask for confirmation."></app-input-check>
-            <app-input-check i18n-title title="Apply on close" formControlName="bulkEditApplyOnClose"></app-input-check>
+            <pngx-input-check i18n-title title="Show confirmation dialogs" formControlName="bulkEditConfirmationDialogs" i18n-hint hint="Deleting documents will always ask for confirmation."></pngx-input-check>
+            <pngx-input-check i18n-title title="Apply on close" formControlName="bulkEditApplyOnClose"></pngx-input-check>
           </div>
         </div>
 
 
         <div class="row mb-3">
           <div class="offset-md-3 col">
-            <app-input-check i18n-title title="Enable notes" formControlName="notesEnabled"></app-input-check>
+            <pngx-input-check i18n-title title="Enable notes" formControlName="notesEnabled"></pngx-input-check>
           </div>
         </div>
 
 
         <div class="row mb-3">
           <div class="offset-md-3 col">
-            <app-input-check i18n-title title="Show notifications when new documents are detected" formControlName="notificationsConsumerNewDocument"></app-input-check>
-            <app-input-check i18n-title title="Show notifications when document processing completes successfully" formControlName="notificationsConsumerSuccess"></app-input-check>
-            <app-input-check i18n-title title="Show notifications when document processing fails" formControlName="notificationsConsumerFailed"></app-input-check>
-            <app-input-check i18n-title title="Suppress notifications on dashboard" formControlName="notificationsConsumerSuppressOnDashboard" i18n-hint hint="This will suppress all messages about document processing status on the dashboard."></app-input-check>
+            <pngx-input-check i18n-title title="Show notifications when new documents are detected" formControlName="notificationsConsumerNewDocument"></pngx-input-check>
+            <pngx-input-check i18n-title title="Show notifications when document processing completes successfully" formControlName="notificationsConsumerSuccess"></pngx-input-check>
+            <pngx-input-check i18n-title title="Show notifications when document processing fails" formControlName="notificationsConsumerFailed"></pngx-input-check>
+            <pngx-input-check i18n-title title="Suppress notifications on dashboard" formControlName="notificationsConsumerSuppressOnDashboard" i18n-hint hint="This will suppress all messages about document processing status on the dashboard."></pngx-input-check>
           </div>
         </div>
 
         <h4 i18n>Settings</h4>
         <div class="row mb-3">
           <div class="offset-md-3 col">
-            <app-input-check i18n-title title="Show warning when closing saved views with unsaved changes" formControlName="savedViewsWarnOnUnsavedChange"></app-input-check>
+            <pngx-input-check i18n-title title="Show warning when closing saved views with unsaved changes" formControlName="savedViewsWarnOnUnsavedChange"></pngx-input-check>
           </div>
         </div>
 
 
               <div class="mb-2 col-auto">
                 <label class="form-label" for="name_{{view.id}}" i18n>Actions</label>
-                <button type="button" class="btn btn-sm btn-outline-danger form-control" (click)="deleteSavedView(view)" *appIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.SavedView }" i18n>Delete</button>
+                <button type="button" class="btn btn-sm btn-outline-danger form-control" (click)="deleteSavedView(view)" *pngxIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.SavedView }" i18n>Delete</button>
               </div>
             </div>
 
       </ng-template>
     </li>
 
-    <li *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.MailRule }" [ngbNavItem]="SettingsNavIDs.Mail" (mouseover)="maybeInitializeTab(SettingsNavIDs.Mail)" (focusin)="maybeInitializeTab(SettingsNavIDs.Mail)">
+    <li *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.MailRule }" [ngbNavItem]="SettingsNavIDs.Mail" (mouseover)="maybeInitializeTab(SettingsNavIDs.Mail)" (focusin)="maybeInitializeTab(SettingsNavIDs.Mail)">
       <a ngbNavLink i18n>Mail</a>
       <ng-template ngbNavContent>
 
         <ng-container *ngIf="mailAccounts && mailRules">
-          <ng-container *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.MailAccount }">
+          <ng-container *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.MailAccount }">
             <h4>
               <ng-container i18n>Mail accounts</ng-container>
-              <button type="button" class="btn btn-sm btn-primary ms-4" (click)="editMailAccount()" *appIfPermissions="{ action: PermissionAction.Add, type: PermissionType.MailAccount }">
+              <button type="button" class="btn btn-sm btn-primary ms-4" (click)="editMailAccount()" *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.MailAccount }">
                 <svg class="sidebaricon me-1" fill="currentColor">
                   <use xlink:href="assets/bootstrap-icons.svg#plus-circle" />
                 </svg>
                     <div class="col d-flex align-items-center">{{account.imap_server}}</div>
                     <div class="col">
                       <div class="btn-group">
-                        <button *appIfPermissions="{ action: PermissionAction.Change, type: PermissionType.MailAccount }" [disabled]="!userCanEdit(account)" class="btn btn-sm btn-primary" type="button" (click)="editMailAccount(account)" i18n>Edit</button>
-                        <button *appIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.MailAccount }" [disabled]="!userIsOwner(account)" class="btn btn-sm btn-outline-danger" type="button" (click)="deleteMailAccount(account)" i18n>Delete</button>
+                        <button *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.MailAccount }" [disabled]="!userCanEdit(account)" class="btn btn-sm btn-primary" type="button" (click)="editMailAccount(account)" i18n>Edit</button>
+                        <button *pngxIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.MailAccount }" [disabled]="!userIsOwner(account)" class="btn btn-sm btn-outline-danger" type="button" (click)="deleteMailAccount(account)" i18n>Delete</button>
                       </div>
                     </div>
                   </div>
             </ul>
           </ng-container>
 
-          <ng-container *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.MailRule }">
+          <ng-container *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.MailRule }">
             <h4 class="mt-4">
               <ng-container i18n>Mail rules</ng-container>
-              <button type="button" class="btn btn-sm btn-primary ms-4" (click)="editMailRule()" *appIfPermissions="{ action: PermissionAction.Add, type: PermissionType.MailRule }">
+              <button type="button" class="btn btn-sm btn-primary ms-4" (click)="editMailRule()" *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.MailRule }">
                 <svg class="sidebaricon me-1" fill="currentColor">
                   <use xlink:href="assets/bootstrap-icons.svg#plus-circle" />
                 </svg>
                     <div class="col d-flex align-items-center">{{(mailAccountService.getCached(rule.account) | async)?.name}}</div>
                     <div class="col">
                       <div class="btn-group">
-                        <button *appIfPermissions="{ action: PermissionAction.Change, type: PermissionType.MailRule }" [disabled]="!userCanEdit(rule)" class="btn btn-sm btn-primary" type="button" (click)="editMailRule(rule)" i18n>Edit</button>
-                        <button *appIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.MailRule }" [disabled]="!userIsOwner(rule)" class="btn btn-sm btn-outline-danger" type="button" (click)="deleteMailRule(rule)" i18n>Delete</button>
+                        <button *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.MailRule }" [disabled]="!userCanEdit(rule)" class="btn btn-sm btn-primary" type="button" (click)="editMailRule(rule)" i18n>Edit</button>
+                        <button *pngxIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.MailRule }" [disabled]="!userIsOwner(rule)" class="btn btn-sm btn-outline-danger" type="button" (click)="deleteMailRule(rule)" i18n>Delete</button>
                       </div>
                     </div>
                   </div>
       </ng-template>
     </li>
 
-    <li [ngbNavItem]="SettingsNavIDs.UsersGroups" *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.User }" (mouseover)="maybeInitializeTab(SettingsNavIDs.UsersGroups)" (focusin)="maybeInitializeTab(SettingsNavIDs.UsersGroups)">
+    <li [ngbNavItem]="SettingsNavIDs.UsersGroups" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.User }" (mouseover)="maybeInitializeTab(SettingsNavIDs.UsersGroups)" (focusin)="maybeInitializeTab(SettingsNavIDs.UsersGroups)">
       <a ngbNavLink i18n>Users & Groups</a>
       <ng-template ngbNavContent>
 
       <ng-container *ngIf="users && groups">
         <h4 class="d-flex">
           <ng-container i18n>Users</ng-container>
-          <button type="button" class="btn btn-sm btn-primary ms-4" (click)="editUser()" *appIfPermissions="{ action: PermissionAction.Add, type: PermissionType.User }">
+          <button type="button" class="btn btn-sm btn-primary ms-4" (click)="editUser()" *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.User }">
             <svg class="sidebaricon me-1" fill="currentColor">
               <use xlink:href="assets/bootstrap-icons.svg#plus-circle" />
             </svg>
               <div class="col d-flex align-items-center">{{user.groups?.map(getGroupName, this).join(', ')}}</div>
               <div class="col">
                 <div class="btn-group">
-                  <button class="btn btn-sm btn-primary" type="button" (click)="editUser(user)" *appIfPermissions="{ action: PermissionAction.Change, type: PermissionType.User }" i18n>Edit</button>
-                  <button class="btn btn-sm btn-outline-danger" type="button" (click)="deleteUser(user)" *appIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.User }" i18n>Delete</button>
+                  <button class="btn btn-sm btn-primary" type="button" (click)="editUser(user)" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.User }" i18n>Edit</button>
+                  <button class="btn btn-sm btn-outline-danger" type="button" (click)="deleteUser(user)" *pngxIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.User }" i18n>Delete</button>
                 </div>
               </div>
             </div>
 
         <h4 class="mt-4 d-flex">
           <ng-container i18n>Groups</ng-container>
-          <button type="button" class="btn btn-sm btn-primary ms-4" (click)="editGroup()" *appIfPermissions="{ action: PermissionAction.Add, type: PermissionType.Group }">
+          <button type="button" class="btn btn-sm btn-primary ms-4" (click)="editGroup()" *pngxIfPermissions="{ action: PermissionAction.Add, type: PermissionType.Group }">
             <svg class="sidebaricon me-1" fill="currentColor">
               <use xlink:href="assets/bootstrap-icons.svg#plus-circle" />
             </svg>
               <div class="col"></div>
               <div class="col">
                 <div class="btn-group">
-                  <button class="btn btn-sm btn-primary" type="button" (click)="editGroup(group)" *appIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Group }" i18n>Edit</button>
-                  <button class="btn btn-sm btn-outline-danger" type="button" (click)="deleteGroup(group)" *appIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.Group }" i18n>Delete</button>
+                  <button class="btn btn-sm btn-primary" type="button" (click)="editGroup(group)" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.Group }" i18n>Edit</button>
+                  <button class="btn btn-sm btn-outline-danger" type="button" (click)="deleteGroup(group)" *pngxIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.Group }" i18n>Delete</button>
                 </div>
               </div>
             </div>
 
   <div [ngbNavOutlet]="nav" class="border-start border-end border-bottom p-3 mb-3 shadow-sm"></div>
 
-  <button type="submit" class="btn btn-primary mb-2" *appIfPermissions="{ action: PermissionAction.Change, type: PermissionType.UISettings }" [disabled]="(isDirty$ | async) === false" i18n>Save</button>
+  <button type="submit" class="btn btn-primary mb-2" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.UISettings }" [disabled]="(isDirty$ | async) === false" i18n>Save</button>
 </form>
index d692892efdd7a0b38711f9de7b3e7df4bee8f43a..9d5937c0973d5291be2a4313d96115a9aa3a06c5 100644 (file)
@@ -60,7 +60,7 @@ enum SettingsNavIDs {
 }
 
 @Component({
-  selector: 'app-settings',
+  selector: 'pngx-settings',
   templateUrl: './settings.component.html',
   styleUrls: ['./settings.component.scss'],
 })
index 043a9ad412494f31d041e08e8bd21960e0175a7b..1a51c53a6c93a1e98e92ea0d6174a2c0b30afa9f 100644 (file)
@@ -13,7 +13,7 @@ import { StoragePathEditDialogComponent } from '../../common/edit-dialog/storage
 import { ManagementListComponent } from '../management-list/management-list.component'
 
 @Component({
-  selector: 'app-storage-path-list',
+  selector: 'pngx-storage-path-list',
   templateUrl: './../management-list/management-list.component.html',
   styleUrls: ['./../management-list/management-list.component.scss'],
 })
index 6688b2f5aadd87417288ee9ad78a443b0d66708d..caaadc486fb90a4119bcd3e3e6ea8591174533a9 100644 (file)
@@ -13,7 +13,7 @@ import { TagEditDialogComponent } from '../../common/edit-dialog/tag-edit-dialog
 import { ManagementListComponent } from '../management-list/management-list.component'
 
 @Component({
-  selector: 'app-tag-list',
+  selector: 'pngx-tag-list',
   templateUrl: './../management-list/management-list.component.html',
   styleUrls: ['./../management-list/management-list.component.scss'],
 })
index 5a29db110b55ac6afd8620e8c3c5d3d9cdd5d56d..66f81ea7f432df65420545e03017d19660b87242 100644 (file)
@@ -1,11 +1,11 @@
-<app-page-header title="File Tasks" i18n-title>
+<pngx-page-header title="File Tasks" i18n-title>
   <div class="btn-toolbar col col-md-auto">
     <button class="btn btn-sm btn-outline-secondary me-2" (click)="clearSelection()" [hidden]="selectedTasks.size === 0">
       <svg class="sidebaricon" fill="currentColor">
         <use xlink:href="assets/bootstrap-icons.svg#x"/>
       </svg>&nbsp;<ng-container i18n>Clear selection</ng-container>
     </button>
-    <button class="btn btn-sm btn-outline-primary me-4" (click)="dismissTasks()" *appIfPermissions="{ action: PermissionAction.Change, type: PermissionType.PaperlessTask }" [disabled]="tasksService.total === 0">
+    <button class="btn btn-sm btn-outline-primary me-4" (click)="dismissTasks()" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.PaperlessTask }" [disabled]="tasksService.total === 0">
       <svg class="sidebaricon" fill="currentColor">
         <use xlink:href="assets/bootstrap-icons.svg#check2-all"/>
       </svg>&nbsp;<ng-container i18n>{{dismissButtonText}}</ng-container>
@@ -20,7 +20,7 @@
       </ng-container>&nbsp;<ng-container i18n>Refresh</ng-container>
     </button>
   </div>
-</app-page-header>
+</pngx-page-header>
 
 <ng-container *ngIf="!tasksService.completedFileTasks && tasksService.loading">
   <div class="spinner-border spinner-border-sm fw-normal ms-2 me-auto" role="status"></div>
         </td>
         <td scope="row">
           <div class="btn-group" role="group">
-            <button class="btn btn-sm btn-outline-secondary" (click)="dismissTask(task); $event.stopPropagation();" *appIfPermissions="{ action: PermissionAction.Change, type: PermissionType.PaperlessTask }">
+            <button class="btn btn-sm btn-outline-secondary" (click)="dismissTask(task); $event.stopPropagation();" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.PaperlessTask }">
               <svg class="sidebaricon" fill="currentColor">
                 <use xlink:href="assets/bootstrap-icons.svg#check"/>
               </svg>&nbsp;<ng-container i18n>Dismiss</ng-container>
             </button>
-            <ng-container *appIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
+            <ng-container *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.Document }">
               <button *ngIf="task.related_document" class="btn btn-sm btn-outline-primary" (click)="dismissAndGo(task); $event.stopPropagation();">
                 <svg class="sidebaricon" fill="currentColor">
                   <use xlink:href="assets/bootstrap-icons.svg#file-text"/>
index 01b5669cd9f88ad2c0e897285cc69cb88989bd95..a85769b57ffa7e332c9b35158b2f0eb3be019dbc 100644 (file)
@@ -8,7 +8,7 @@ import { ConfirmDialogComponent } from '../../common/confirm-dialog/confirm-dial
 import { ComponentWithPermissions } from '../../with-permissions/with-permissions.component'
 
 @Component({
-  selector: 'app-tasks',
+  selector: 'pngx-tasks',
   templateUrl: './tasks.component.html',
   styleUrls: ['./tasks.component.scss'],
 })
index 4b4dc7c09e34d6051ebd933fb06772c91434a042..92ac85f39faf8612cdd9aedb11c862b5e3386f37 100644 (file)
@@ -13,5 +13,5 @@
         </a>
       </p>
     </div>
-    <app-logo extra_classes="p-3 position-absolute bottom-0 start-50 translate-middle"></app-logo>
+    <pngx-logo extra_classes="p-3 position-absolute bottom-0 start-50 translate-middle"></pngx-logo>
   </div>
index 573f57f99ccefb9a09e07dfb5ff4ee0a57e358d5..44bbf4c3a5fad59f495da00bfce7b7d69b61ed74 100644 (file)
@@ -1,7 +1,7 @@
 import { Component } from '@angular/core'
 
 @Component({
-  selector: 'app-not-found',
+  selector: 'pngx-not-found',
   templateUrl: './not-found.component.html',
   styleUrls: ['./not-found.component.scss'],
 })
index ceda02df556ee3a600716849051af3b42a7700aa..a94549967ab7fb4cf4c662ae19ee1b8c52531929 100644 (file)
@@ -7,7 +7,7 @@ import { PermissionsService } from '../services/permissions.service'
   template: `
     <div>
       <button
-        *appIfObjectPermissions="{
+        *pngxIfObjectPermissions="{
           object: { id: 2, owner: user1 },
           action: 'view'
         }"
index 3f4f565e91da5fd905c25e8297bb73e0f473a67c..72256da681ea575fa8aa0064d009978b0e558941 100644 (file)
@@ -14,12 +14,12 @@ import {
 } from '../services/permissions.service'
 
 @Directive({
-  selector: '[appIfObjectPermissions]',
+  selector: '[pngxIfObjectPermissions]',
 })
 export class IfObjectPermissionsDirective implements OnInit, OnChanges {
   // The role the user must have
   @Input()
-  appIfObjectPermissions: {
+  pngxIfObjectPermissions: {
     object: ObjectWithPermissions
     action: PermissionAction
   }
@@ -39,10 +39,10 @@ export class IfObjectPermissionsDirective implements OnInit, OnChanges {
 
   public ngOnInit(): void {
     if (
-      !this.appIfObjectPermissions?.object ||
+      !this.pngxIfObjectPermissions?.object ||
       this.permissionsService.currentUserHasObjectPermissions(
-        this.appIfObjectPermissions.action,
-        this.appIfObjectPermissions.object
+        this.pngxIfObjectPermissions.action,
+        this.pngxIfObjectPermissions.object
       )
     ) {
       if (!this.createdView)
index 8e5d4fed25f81a9b3e07b0c2a7f0f9cf2b7a626a..289a8c4ca09960c2213dea9a378ed0aa839e5e53 100644 (file)
@@ -6,7 +6,7 @@ import { PermissionsService } from '../services/permissions.service'
 @Component({
   template: `
     <div>
-      <button *appIfOwner="{ id: 2, owner: user1 }">Some Text</button>
+      <button *pngxIfOwner="{ id: 2, owner: user1 }">Some Text</button>
     </div>
   `,
 })
index 7b2efa9276dbac1b0dc02ad18a8796642e214a34..7c9743fd6546dc40d86a4bff87277f9ea53866b3 100644 (file)
@@ -11,12 +11,12 @@ import { ObjectWithPermissions } from '../data/object-with-permissions'
 import { PermissionsService } from '../services/permissions.service'
 
 @Directive({
-  selector: '[appIfOwner]',
+  selector: '[pngxIfOwner]',
 })
 export class IfOwnerDirective implements OnInit, OnChanges {
   // The role the user must have
   @Input()
-  appIfOwner: ObjectWithPermissions
+  pngxIfOwner: ObjectWithPermissions
 
   createdView: EmbeddedViewRef<any>
 
@@ -32,7 +32,7 @@ export class IfOwnerDirective implements OnInit, OnChanges {
   ) {}
 
   public ngOnInit(): void {
-    if (this.permissionsService.currentUserOwnsObject(this.appIfOwner)) {
+    if (this.permissionsService.currentUserOwnsObject(this.pngxIfOwner)) {
       if (!this.createdView)
         this.createdView = this.viewContainerRef.createEmbeddedView(
           this.templateRef
index 8dc926f05177eb355e5fe9ba7de995f1c1dd29d0..e44706571cf380f726aa423124c3458572adb556 100644 (file)
@@ -6,7 +6,7 @@ import { PermissionsService } from '../services/permissions.service'
 @Component({
   template: `
     <div>
-      <button *appIfPermissions="{ action: 'add', type: '%s_user' }">
+      <button *pngxIfPermissions="{ action: 'add', type: '%s_user' }">
         Some Text
       </button>
     </div>
index 9251185e2b7dd7453722e5d82ca6a7ffacf94e23..29d40d12953dbb41136f9b78a3625b4f674943eb 100644 (file)
@@ -12,11 +12,11 @@ import {
 } from '../services/permissions.service'
 
 @Directive({
-  selector: '[appIfPermissions]',
+  selector: '[pngxIfPermissions]',
 })
 export class IfPermissionsDirective implements OnInit {
   @Input()
-  appIfPermissions:
+  pngxIfPermissions:
     | Array<{ action: PermissionAction; type: PermissionType }>
     | { action: PermissionAction; type: PermissionType }
 
@@ -34,7 +34,7 @@ export class IfPermissionsDirective implements OnInit {
   public ngOnInit(): void {
     if (
       []
-        .concat(this.appIfPermissions)
+        .concat(this.pngxIfPermissions)
         .every((perm: { action: PermissionAction; type: PermissionType }) =>
           this.permissionsService.currentUserCan(perm.action, perm.type)
         )
index 65f317ad2df384194cb2758aa09bf111bb138335..4d5cd88319dc0db77d9082f682cf472e6126304f 100644 (file)
@@ -8,10 +8,10 @@ import { By } from '@angular/platform-browser'
     <table class="table">
       <thead>
         <th></th>
-        <th class="d-none d-lg-table-cell" appSortable="archive_serial_number">
+        <th class="d-none d-lg-table-cell" pngxSortable="archive_serial_number">
           ASN
         </th>
-        <th class="d-none d-md-table-cell" appSortable="correspondent__name">
+        <th class="d-none d-md-table-cell" pngxSortable="correspondent__name">
           Correspondent
         </th>
       </thead>
index 57253aa48d661bac3e3ad07733544998e29a37da..ac306faca583c86dd388c60610ec8ccdded2832b 100644 (file)
@@ -13,13 +13,13 @@ export interface SortEvent {
 }
 
 @Directive({
-  selector: 'th[appSortable]',
+  selector: 'th[pngxSortable]',
 })
 export class SortableDirective {
   constructor() {}
 
   @Input()
-  appSortable: string = ''
+  pngxSortable: string = ''
 
   @Input()
   currentSortReverse: boolean = false
@@ -31,18 +31,20 @@ export class SortableDirective {
 
   @HostBinding('class.asc') get asc() {
     return (
-      this.currentSortField === this.appSortable && !this.currentSortReverse
+      this.currentSortField === this.pngxSortable && !this.currentSortReverse
     )
   }
   @HostBinding('class.des') get des() {
-    return this.currentSortField === this.appSortable && this.currentSortReverse
+    return (
+      this.currentSortField === this.pngxSortable && this.currentSortReverse
+    )
   }
 
   @HostListener('click') rotate() {
-    if (this.currentSortField != this.appSortable) {
-      this.sort.emit({ column: this.appSortable, reverse: false })
+    if (this.currentSortField != this.pngxSortable) {
+      this.sort.emit({ column: this.pngxSortable, reverse: false })
     } else if (
-      this.currentSortField == this.appSortable &&
+      this.currentSortField == this.pngxSortable &&
       !this.currentSortReverse
     ) {
       this.sort.emit({ column: this.currentSortField, reverse: true })
index 118b9deff1c1a151c058a46482cd32066f4138cd..de85328f3f5b26ccf4a0f213726877f9e9d92572 100644 (file)
@@ -12,6 +12,6 @@
   <link rel="apple-touch-icon" href="apple-touch-icon.png">
 </head>
 <body>
-  <app-root></app-root>
+  <pngx-root></pngx-root>
 </body>
 </html>
index 9e6214ed82a94f10b5ddcda23e1e131a8ab0c519..c53d1d07717de63f784b2d4fc8a3768d8dc539bb 100644 (file)
@@ -17,8 +17,8 @@
        <link rel="stylesheet" href="{% static styles_css %}">
        <link rel="apple-touch-icon" href="{% static apple_touch_icon %}">
 </head>
-       <app-root>
 <body>
+       <pngx-root>
                <script type="text/javascript">
                        setTimeout(() => {
                                let warning = document.getElementsByClassName('warning').item(0)
@@ -80,7 +80,7 @@
                                <p class="warning m-auto mt-3 small fade hide">{% translate "Still here?! Hmm, something might be wrong." %} <a href="https://docs.paperless-ngx.com">{% translate "Here's a link to the docs." %}</a></p>
                        </div>
                </div>
-       </app-root>
+       </pngx-root>
        <script src="{% static runtime_js %}" defer></script>
        <script src="{% static polyfills_js %}" defer></script>
        <script src="{% static main_js %}" defer></script>