From b70ba0e85bd52564c2780f778dc67a0acc28060a Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 30 Dec 2024 11:40:48 -0800 Subject: [PATCH] Convert to standalone --- src-ui/messages.xlf | 1295 +++++++---------- src-ui/setup-jest.ts | 3 +- src-ui/src/app/app.component.spec.ts | 8 +- src-ui/src/app/app.component.ts | 13 +- src-ui/src/app/app.module.ts | 575 -------- .../admin/config/config.component.spec.ts | 16 +- .../admin/config/config.component.ts | 31 +- .../admin/logs/logs.component.spec.ts | 6 +- .../components/admin/logs/logs.component.ts | 10 +- .../admin/settings/settings.component.spec.ts | 22 +- .../admin/settings/settings.component.ts | 37 +- .../admin/tasks/tasks.component.spec.ts | 12 +- .../components/admin/tasks/tasks.component.ts | 27 +- .../admin/trash/trash.component.spec.ts | 10 +- .../components/admin/trash/trash.component.ts | 15 +- .../users-groups.component.spec.ts | 52 +- .../users-groups/users-groups.component.ts | 9 +- .../app-frame/app-frame.component.spec.ts | 8 +- .../app-frame/app-frame.component.ts | 32 +- .../global-search.component.spec.ts | 2 +- .../global-search/global-search.component.ts | 20 +- .../clearable-badge.component.spec.ts | 6 +- .../clearable-badge.component.ts | 3 +- .../confirm-button.component.spec.ts | 7 +- .../confirm-button.component.ts | 5 +- .../confirm-dialog.component.spec.ts | 3 +- .../confirm-dialog.component.ts | 4 +- ...ete-pages-confirm-dialog.component.spec.ts | 4 +- .../delete-pages-confirm-dialog.component.ts | 10 +- .../merge-confirm-dialog.component.spec.ts | 2 +- .../merge-confirm-dialog.component.ts | 4 +- .../rotate-confirm-dialog.component.spec.ts | 7 +- .../rotate-confirm-dialog.component.ts | 5 +- .../split-confirm-dialog.component.spec.ts | 2 +- .../split-confirm-dialog.component.ts | 11 +- .../custom-field-display.component.spec.ts | 3 +- .../custom-field-display.component.ts | 5 +- .../custom-fields-dropdown.component.spec.ts | 7 +- .../custom-fields-dropdown.component.ts | 11 +- ...ustom-fields-query-dropdown.component.html | 4 +- ...om-fields-query-dropdown.component.spec.ts | 2 +- .../custom-fields-query-dropdown.component.ts | 18 +- .../dates-dropdown.component.spec.ts | 8 +- .../dates-dropdown.component.ts | 22 +- ...orrespondent-edit-dialog.component.spec.ts | 7 +- .../correspondent-edit-dialog.component.ts | 20 +- ...custom-field-edit-dialog.component.spec.ts | 14 +- .../custom-field-edit-dialog.component.ts | 19 +- ...ocument-type-edit-dialog.component.spec.ts | 7 +- .../document-type-edit-dialog.component.ts | 20 +- .../edit-dialog/edit-dialog.component.spec.ts | 5 +- .../group-edit-dialog.component.spec.ts | 14 +- .../group-edit-dialog.component.ts | 16 +- ...mail-account-edit-dialog.component.spec.ts | 7 +- .../mail-account-edit-dialog.component.ts | 27 +- .../mail-rule-edit-dialog.component.spec.ts | 7 +- .../mail-rule-edit-dialog.component.ts | 24 +- ...storage-path-edit-dialog.component.spec.ts | 27 +- .../storage-path-edit-dialog.component.ts | 32 +- .../tag-edit-dialog.component.spec.ts | 14 +- .../tag-edit-dialog.component.ts | 24 +- .../user-edit-dialog.component.spec.ts | 14 +- .../user-edit-dialog.component.ts | 20 +- .../workflow-edit-dialog.component.spec.ts | 7 +- .../workflow-edit-dialog.component.ts | 43 +- .../filterable-dropdown.component.spec.ts | 23 +- .../filterable-dropdown.component.ts | 22 +- ...ggleable-dropdown-button.component.spec.ts | 3 +- .../toggleable-dropdown-button.component.ts | 4 +- .../hotkey-dialog.component.spec.ts | 2 +- .../hotkey-dialog/hotkey-dialog.component.ts | 1 - .../common/input/abstract-input.spec.ts | 5 +- .../input/check/check.component.spec.ts | 3 +- .../common/input/check/check.component.ts | 9 +- .../input/color/color.component.spec.ts | 2 +- .../common/input/color/color.component.ts | 17 +- .../common/input/date/date.component.spec.ts | 20 +- .../common/input/date/date.component.ts | 17 +- .../document-link.component.html | 4 +- .../document-link.component.spec.ts | 10 +- .../document-link/document-link.component.ts | 22 +- .../drag-drop-select.component.spec.ts | 3 +- .../drag-drop-select.component.ts | 3 +- .../input/entries/entries.component.spec.ts | 2 +- .../common/input/entries/entries.component.ts | 3 +- .../common/input/file/file.component.spec.ts | 3 +- .../common/input/file/file.component.ts | 8 +- .../input/monetary/monetary.component.spec.ts | 11 +- .../input/monetary/monetary.component.ts | 10 +- .../input/number/number.component.spec.ts | 3 +- .../common/input/number/number.component.ts | 9 +- .../input/password/password.component.spec.ts | 2 +- .../input/password/password.component.ts | 9 +- .../permissions-form.component.spec.ts | 10 +- .../permissions-form.component.ts | 23 +- .../permissions-group.component.spec.ts | 8 +- .../permissions-group.component.ts | 9 +- .../permissions-user.component.spec.ts | 8 +- .../permissions-user.component.ts | 9 +- .../input/select/select.component.spec.ts | 2 +- .../common/input/select/select.component.ts | 17 +- .../input/switch/switch.component.spec.ts | 8 +- .../common/input/switch/switch.component.ts | 10 +- .../common/input/tags/tags.component.spec.ts | 20 +- .../common/input/tags/tags.component.ts | 21 +- .../common/input/text/text.component.spec.ts | 3 +- .../common/input/text/text.component.ts | 15 +- .../input/textarea/textarea.component.spec.ts | 3 +- .../input/textarea/textarea.component.ts | 9 +- .../common/input/url/url.component.spec.ts | 2 +- .../common/input/url/url.component.ts | 9 +- .../common/logo/logo.component.spec.ts | 3 +- .../components/common/logo/logo.component.ts | 1 - .../page-header/page-header.component.spec.ts | 3 +- .../page-header/page-header.component.ts | 5 +- .../permissions-dialog.component.spec.ts | 7 +- .../permissions-dialog.component.ts | 16 +- ...missions-filter-dropdown.component.spec.ts | 8 +- .../permissions-filter-dropdown.component.ts | 18 +- .../permissions-select.component.spec.ts | 12 +- .../permissions-select.component.ts | 13 +- .../preview-popup.component.spec.ts | 11 +- .../preview-popup/preview-popup.component.ts | 14 +- .../profile-edit-dialog.component.spec.ts | 10 +- .../profile-edit-dialog.component.ts | 30 +- .../select-dialog.component.spec.ts | 9 +- .../select-dialog/select-dialog.component.ts | 4 +- .../share-links-dropdown.component.spec.ts | 5 +- .../share-links-dropdown.component.ts | 10 +- .../system-status-dialog.component.spec.ts | 16 +- .../system-status-dialog.component.ts | 22 +- .../common/tag/tag.component.spec.ts | 3 +- .../components/common/tag/tag.component.ts | 1 - .../common/toasts/toasts.component.spec.ts | 4 +- .../common/toasts/toasts.component.ts | 13 +- .../dashboard/dashboard.component.spec.ts | 14 +- .../dashboard/dashboard.component.ts | 19 +- .../saved-view-widget.component.spec.ts | 12 +- .../saved-view-widget.component.ts | 28 +- .../statistics-widget.component.spec.ts | 8 +- .../statistics-widget.component.ts | 13 +- .../upload-file-widget.component.html | 2 +- .../upload-file-widget.component.spec.ts | 19 +- .../upload-file-widget.component.ts | 26 +- .../welcome-widget.component.spec.ts | 3 +- .../welcome-widget.component.ts | 3 +- .../widget-frame.component.spec.ts | 9 +- .../widget-frame/widget-frame.component.ts | 4 +- .../document-asn.component.spec.ts | 3 +- .../document-asn/document-asn.component.ts | 1 - .../document-detail.component.html | 4 +- .../document-detail.component.spec.ts | 59 +- .../document-detail.component.ts | 64 +- .../metadata-collapse.component.spec.ts | 7 +- .../metadata-collapse.component.ts | 4 +- .../document-history.component.spec.ts | 6 +- .../document-history.component.ts | 13 +- .../bulk-editor/bulk-editor.component.spec.ts | 49 +- .../bulk-editor/bulk-editor.component.ts | 25 +- ...-fields-bulk-edit-dialog.component.spec.ts | 9 +- ...ustom-fields-bulk-edit-dialog.component.ts | 29 +- .../document-card-large.component.spec.ts | 14 +- .../document-card-large.component.ts | 30 +- .../document-card-small.component.spec.ts | 27 +- .../document-card-small.component.ts | 30 +- .../document-list.component.spec.ts | 57 +- .../document-list/document-list.component.ts | 45 +- .../filter-editor.component.spec.ts | 20 +- .../filter-editor/filter-editor.component.ts | 32 +- .../save-view-config-dialog.component.spec.ts | 8 +- .../save-view-config-dialog.component.ts | 11 +- .../document-notes.component.spec.ts | 8 +- .../document-notes.component.ts | 18 +- .../file-drop/file-drop.component.spec.ts | 3 +- .../file-drop/file-drop.component.ts | 8 +- .../correspondent-list.component.spec.ts | 10 +- .../correspondent-list.component.ts | 20 +- .../custom-fields.component.spec.ts | 10 +- .../custom-fields/custom-fields.component.ts | 12 +- .../document-type-list.component.spec.ts | 10 +- .../document-type-list.component.ts | 19 +- .../manage/mail/mail.component.spec.ts | 18 +- .../components/manage/mail/mail.component.ts | 16 +- .../management-list.component.spec.ts | 16 +- .../saved-views/saved-views.component.spec.ts | 14 +- .../saved-views/saved-views.component.ts | 27 +- .../storage-path-list.component.spec.ts | 12 +- .../storage-path-list.component.ts | 22 +- .../tag-list/tag-list.component.spec.ts | 12 +- .../manage/tag-list/tag-list.component.ts | 22 +- .../workflows/workflows.component.spec.ts | 10 +- .../manage/workflows/workflows.component.ts | 12 +- .../not-found/not-found.component.spec.ts | 7 +- .../not-found/not-found.component.ts | 4 +- .../if-object-permissions.directive.spec.ts | 4 +- .../if-object-permissions.directive.ts | 1 - .../app/directives/if-owner.directive.spec.ts | 4 +- .../src/app/directives/if-owner.directive.ts | 1 - .../if-permissions.directive.spec.ts | 4 +- .../directives/if-permissions.directive.ts | 1 - .../app/directives/sortable.directive.spec.ts | 4 +- .../src/app/directives/sortable.directive.ts | 1 - src-ui/src/app/guards/dirty-doc.guard.spec.ts | 11 +- .../src/app/guards/dirty-form.guard.spec.ts | 12 +- .../app/guards/dirty-saved-view.guard.spec.ts | 8 +- src-ui/src/app/pipes/custom-date.pipe.ts | 1 - src-ui/src/app/pipes/document-title.pipe.ts | 1 - src-ui/src/app/pipes/file-size.pipe.ts | 5 +- src-ui/src/app/pipes/filter.pipe.ts | 1 - src-ui/src/app/pipes/is-number.pipe.ts | 1 - src-ui/src/app/pipes/safehtml.pipe.ts | 1 - src-ui/src/app/pipes/safeurl.pipe.ts | 1 - src-ui/src/app/pipes/username.pipe.ts | 1 - src-ui/src/app/pipes/yes-no.pipe.ts | 1 - .../document-list-view.service.spec.ts | 3 +- .../services/open-documents.service.spec.ts | 3 +- .../src/app/services/settings.service.spec.ts | 4 +- src-ui/src/main.ts | 377 ++++- 218 files changed, 2561 insertions(+), 2285 deletions(-) delete mode 100644 src-ui/src/app/app.module.ts diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index 1f71afd16..d14616914 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -5,8 +5,52 @@ Close - node_modules/src/ngb-config.ts - 13 + node_modules/src/alert/alert.ts + 51 + + + + Slide of + + node_modules/src/carousel/carousel.ts + 132,136 + + Currently selected slide number read by screen reader + + + Previous + + node_modules/src/carousel/carousel.ts + 148,149 + + + + Next + + node_modules/src/carousel/carousel.ts + 167,170 + + + + Previous month + + node_modules/src/datepicker/datepicker-navigation.ts + 77,79 + + + node_modules/src/datepicker/datepicker-navigation.ts + 97,98 + + + + Next month + + node_modules/src/datepicker/datepicker-navigation.ts + 102 + + + node_modules/src/datepicker/datepicker-navigation.ts + 102 @@ -41,32 +85,6 @@ 13 - - Previous month - - node_modules/src/ngb-config.ts - 13 - - - node_modules/src/ngb-config.ts - 13 - - - - - - node_modules/src/ngb-config.ts - 13 - - - - Slide of - - node_modules/src/ngb-config.ts - 13 - - Currently selected slide number read by screen reader - Hours @@ -81,13 +99,6 @@ 13 - - Previous - - node_modules/src/ngb-config.ts - 13 - - MM @@ -113,24 +124,6 @@ 13 - - Next month - - node_modules/src/ngb-config.ts - 13 - - - node_modules/src/ngb-config.ts - 13 - - - - Next - - node_modules/src/ngb-config.ts - 13 - - Minutes @@ -236,26 +229,34 @@ 13 + + + + node_modules/src/progressbar/progressbar.ts + 41,42 + + Document was added to Paperless-ngx. src/app/app.component.ts - 85 + 93 src/app/app.component.ts - 94 + 102 Open document src/app/app.component.ts - 87 + 95 src/app/components/admin/trash/trash.component.ts - 124 + 136 src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html @@ -278,21 +279,21 @@ Could not add : src/app/app.component.ts - 109 + 117 Document is being processed by Paperless-ngx. src/app/app.component.ts - 124 + 132 Dashboard src/app/app.component.ts - 131 + 139 src/app/components/app-frame/app-frame.component.html @@ -311,7 +312,7 @@ Documents src/app/app.component.ts - 142 + 150 src/app/components/app-frame/app-frame.component.html @@ -323,7 +324,7 @@ src/app/components/document-list/document-list.component.ts - 138 + 159 src/app/components/manage/custom-fields/custom-fields.component.html @@ -350,7 +351,7 @@ Settings src/app/app.component.ts - 154 + 162 src/app/components/admin/settings/settings.component.html @@ -373,14 +374,14 @@ Prev src/app/app.component.ts - 160 + 168 Next src/app/app.component.ts - 161 + 169 src/app/components/document-detail/document-detail.component.html @@ -391,56 +392,56 @@ End src/app/app.component.ts - 162 + 170 The dashboard can be used to show saved views, such as an 'Inbox'. Views are found under Manage > Saved Views once you have created some. src/app/app.component.ts - 168 + 176 Drag-and-drop documents here to start uploading or place them in the consume folder. You can also drag-and-drop documents anywhere on all other pages of the web app. Once you do, Paperless-ngx will start training its machine learning algorithms. src/app/app.component.ts - 175 + 183 The documents list shows all of your documents and allows for filtering as well as bulk-editing. There are three different view styles: list, small cards and large cards. A list of documents currently opened for editing is shown in the sidebar. src/app/app.component.ts - 180 + 188 The filtering tools allow you to quickly find documents using various searches, dates, tags, etc. src/app/app.component.ts - 187 + 195 Any combination of filters can be saved as a 'view' which can then be displayed on the dashboard and / or sidebar. src/app/app.component.ts - 193 + 201 Tags, correspondents, document types and storage paths can all be managed using these pages. They can also be created from the document edit view. src/app/app.component.ts - 198 + 206 Manage e-mail accounts and rules for automatically importing documents. src/app/app.component.ts - 206 + 214 src/app/components/manage/mail/mail.component.html @@ -451,14 +452,14 @@ Workflows give you more control over the document pipeline. src/app/app.component.ts - 214 + 222 File Tasks shows you documents that have been consumed, are waiting to be, or may have failed during the process. src/app/app.component.ts - 222 + 230 src/app/components/admin/tasks/tasks.component.html @@ -469,28 +470,28 @@ Check out the settings for various tweaks to the web app. src/app/app.component.ts - 230 + 238 Thank you! 🙏 src/app/app.component.ts - 238 + 246 There are <em>tons</em> more features and info we didn't cover here, but this should get you started. Check out the documentation or visit the project on GitHub to learn more or to report issues. src/app/app.component.ts - 240 + 248 Lastly, on behalf of every contributor to this community-supported project, thank you for using Paperless-ngx! src/app/app.component.ts - 242 + 250 @@ -611,42 +612,42 @@ Error retrieving config src/app/components/admin/config/config.component.ts - 75 + 101 Invalid JSON src/app/components/admin/config/config.component.ts - 101 + 127 Configuration updated src/app/components/admin/config/config.component.ts - 145 + 171 An error occurred updating configuration src/app/components/admin/config/config.component.ts - 150 + 176 File successfully updated src/app/components/admin/config/config.component.ts - 172 + 198 An error occurred uploading file src/app/components/admin/config/config.component.ts - 177 + 203 @@ -712,10 +713,6 @@ src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html 50 - - src/app/components/common/input/document-link/document-link.component.html - 57 - src/app/components/common/permissions-dialog/permissions-dialog.component.html 23 @@ -1050,7 +1047,7 @@ src/app/components/app-frame/global-search/global-search.component.ts - 103 + 120 @@ -1086,7 +1083,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.ts - 151 + 165 @@ -1396,7 +1393,7 @@ src/app/components/common/confirm-dialog/confirm-dialog.component.ts - 47 + 49 src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html @@ -1446,10 +1443,6 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html 183 - - src/app/components/common/select-dialog/select-dialog.component.html - 12 - src/app/components/document-list/bulk-editor/bulk-editor.component.html 4 @@ -1471,68 +1464,68 @@ Use system language src/app/components/admin/settings/settings.component.ts - 59 + 73 Use date format of display language src/app/components/admin/settings/settings.component.ts - 62 + 76 Error retrieving users src/app/components/admin/settings/settings.component.ts - 181 + 209 src/app/components/admin/users-groups/users-groups.component.ts - 51 + 54 Error retrieving groups src/app/components/admin/settings/settings.component.ts - 200 + 228 src/app/components/admin/users-groups/users-groups.component.ts - 63 + 66 Settings were saved successfully. src/app/components/admin/settings/settings.component.ts - 489 + 517 Settings were saved successfully. Reload is required to apply some changes. src/app/components/admin/settings/settings.component.ts - 493 + 521 Reload now src/app/components/admin/settings/settings.component.ts - 494 + 522 An error occurred while saving settings. src/app/components/admin/settings/settings.component.ts - 504 + 532 src/app/components/app-frame/app-frame.component.ts - 132 + 153 @@ -1592,7 +1585,7 @@ src/app/components/admin/tasks/tasks.component.ts - 31 + 41 src/app/components/admin/trash/trash.component.html @@ -1707,7 +1700,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 60 + 80 src/app/components/document-list/document-list.component.html @@ -1818,7 +1811,7 @@ src/app/components/admin/tasks/tasks.component.ts - 129 + 151 @@ -1874,63 +1867,63 @@ Result src/app/components/admin/tasks/tasks.component.ts - 32 + 42 Dismiss selected src/app/components/admin/tasks/tasks.component.ts - 76 + 98 Dismiss all src/app/components/admin/tasks/tasks.component.ts - 77 + 99 Confirm Dismiss All src/app/components/admin/tasks/tasks.component.ts - 126 + 148 Dismiss all tasks? src/app/components/admin/tasks/tasks.component.ts - 127 + 149 queued src/app/components/admin/tasks/tasks.component.ts - 212 + 234 started src/app/components/admin/tasks/tasks.component.ts - 214 + 236 completed src/app/components/admin/tasks/tasks.component.ts - 216 + 238 failed src/app/components/admin/tasks/tasks.component.ts - 218 + 240 @@ -2013,11 +2006,11 @@ src/app/components/admin/trash/trash.component.ts - 65 + 77 src/app/components/admin/trash/trash.component.ts - 94 + 106 src/app/components/admin/users-groups/users-groups.component.html @@ -2033,7 +2026,7 @@ src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 53 + 64 src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html @@ -2047,10 +2040,6 @@ src/app/components/common/permissions-select/permissions-select.component.html 19 - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.html - 37 - src/app/components/document-detail/document-detail.component.html 24 @@ -2159,11 +2148,11 @@ Confirm delete src/app/components/admin/trash/trash.component.ts - 61 + 73 src/app/components/admin/trash/trash.component.ts - 88 + 100 src/app/components/manage/management-list/management-list.component.ts @@ -2178,38 +2167,38 @@ This operation will permanently delete this document. src/app/components/admin/trash/trash.component.ts - 62 + 74 This operation cannot be undone. src/app/components/admin/trash/trash.component.ts - 63 + 75 src/app/components/admin/trash/trash.component.ts - 92 + 104 src/app/components/admin/users-groups/users-groups.component.ts - 116 + 119 src/app/components/admin/users-groups/users-groups.component.ts - 166 + 169 src/app/components/manage/custom-fields/custom-fields.component.ts - 89 + 98 src/app/components/manage/mail/mail.component.ts - 179 + 191 src/app/components/manage/mail/mail.component.ts - 270 + 282 src/app/components/manage/management-list/management-list.component.ts @@ -2217,81 +2206,81 @@ src/app/components/manage/workflows/workflows.component.ts - 119 + 127 Document deleted src/app/components/admin/trash/trash.component.ts - 72 + 84 Error deleting document src/app/components/admin/trash/trash.component.ts - 77 + 89 src/app/components/document-detail/document-detail.component.ts - 860 + 876 This operation will permanently delete the selected documents. src/app/components/admin/trash/trash.component.ts - 90 + 102 This operation will permanently delete all documents in the trash. src/app/components/admin/trash/trash.component.ts - 91 + 103 Document(s) deleted src/app/components/admin/trash/trash.component.ts - 102 + 114 Error deleting document(s) src/app/components/admin/trash/trash.component.ts - 109 + 121 Document restored src/app/components/admin/trash/trash.component.ts - 122 + 134 Error restoring document src/app/components/admin/trash/trash.component.ts - 132 + 144 Document(s) restored src/app/components/admin/trash/trash.component.ts - 142 + 154 Error restoring document(s) src/app/components/admin/trash/trash.component.ts - 148 + 160 @@ -2465,90 +2454,90 @@ Password has been changed, you will be logged out momentarily. src/app/components/admin/users-groups/users-groups.component.ts - 89 + 92 src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 173 + 191 Saved user "". src/app/components/admin/users-groups/users-groups.component.ts - 96 + 99 Error saving user. src/app/components/admin/users-groups/users-groups.component.ts - 106 + 109 Confirm delete user account src/app/components/admin/users-groups/users-groups.component.ts - 114 + 117 This operation will permanently delete this user account. src/app/components/admin/users-groups/users-groups.component.ts - 115 + 118 Proceed src/app/components/admin/users-groups/users-groups.component.ts - 118 + 121 src/app/components/admin/users-groups/users-groups.component.ts - 168 + 171 src/app/components/document-detail/document-detail.component.ts - 884 + 900 src/app/components/document-detail/document-detail.component.ts - 1191 + 1207 src/app/components/document-detail/document-detail.component.ts - 1230 + 1246 src/app/components/document-detail/document-detail.component.ts - 1271 + 1287 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 773 + 786 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 806 + 819 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 825 + 838 src/app/components/manage/custom-fields/custom-fields.component.ts - 91 + 100 src/app/components/manage/mail/mail.component.ts - 181 + 193 src/app/components/manage/mail/mail.component.ts - 272 + 284 src/app/components/manage/management-list/management-list.component.ts @@ -2556,63 +2545,63 @@ src/app/components/manage/workflows/workflows.component.ts - 121 + 129 Deleted user src/app/components/admin/users-groups/users-groups.component.ts - 124 + 127 Error deleting user. src/app/components/admin/users-groups/users-groups.component.ts - 130 + 133 Saved group "". src/app/components/admin/users-groups/users-groups.component.ts - 148 + 151 Error saving group. src/app/components/admin/users-groups/users-groups.component.ts - 156 + 159 Confirm delete user group src/app/components/admin/users-groups/users-groups.component.ts - 164 + 167 This operation will permanently delete this user group. src/app/components/admin/users-groups/users-groups.component.ts - 165 + 168 Deleted group src/app/components/admin/users-groups/users-groups.component.ts - 174 + 177 Error deleting group. src/app/components/admin/users-groups/users-groups.component.ts - 180 + 183 @@ -2721,7 +2710,7 @@ src/app/components/common/input/tags/tags.component.ts - 63 + 69 src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html @@ -2784,10 +2773,6 @@ src/app/components/app-frame/app-frame.component.html 199 - - src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.html - 4 - src/app/components/manage/custom-fields/custom-fields.component.html 2 @@ -2883,21 +2868,21 @@ Sidebar views updated src/app/components/app-frame/app-frame.component.ts - 216 + 237 Error updating sidebar views src/app/components/app-frame/app-frame.component.ts - 219 + 240 An error occurred while saving update checking settings. src/app/components/app-frame/app-frame.component.ts - 240 + 261 @@ -3067,22 +3052,22 @@ Successfully updated object. src/app/components/app-frame/global-search/global-search.component.ts - 192 + 209 src/app/components/app-frame/global-search/global-search.component.ts - 230 + 247 Error occurred saving object. src/app/components/app-frame/global-search/global-search.component.ts - 195 + 212 src/app/components/app-frame/global-search/global-search.component.ts - 233 + 250 @@ -3096,21 +3081,21 @@ Are you sure? src/app/components/common/confirm-button/confirm-button.component.ts - 20 + 22 Confirmation src/app/components/common/confirm-dialog/confirm-dialog.component.ts - 23 + 25 Confirm src/app/components/common/confirm-dialog/confirm-dialog.component.ts - 35 + 37 src/app/components/common/permissions-dialog/permissions-dialog.component.html @@ -3118,31 +3103,31 @@ src/app/components/document-detail/document-detail.component.ts - 837 + 853 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 416 + 429 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 456 + 469 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 494 + 507 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 532 + 545 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 594 + 607 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 727 + 740 @@ -3261,42 +3246,6 @@ 75 - - Search fields - - src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.html - 10 - - - - Create new field - - src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.html - 21 - - - - Saved field "". - - src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts - 118 - - - src/app/components/manage/custom-fields/custom-fields.component.ts - 71 - - - - Error saving field. - - src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts - 127 - - - src/app/components/manage/custom-fields/custom-fields.component.ts - 79 - - True @@ -3434,7 +3383,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 56 + 76 src/app/components/document-list/document-list.component.html @@ -3453,14 +3402,14 @@ Last 7 days src/app/components/common/dates-dropdown/dates-dropdown.component.ts - 48 + 67 Last month src/app/components/common/dates-dropdown/dates-dropdown.component.ts - 53 + 72 src/app/pipes/custom-date.pipe.ts @@ -3471,14 +3420,14 @@ Last 3 months src/app/components/common/dates-dropdown/dates-dropdown.component.ts - 58 + 77 Last year src/app/components/common/dates-dropdown/dates-dropdown.component.ts - 63 + 82 src/app/pipes/custom-date.pipe.ts @@ -3550,14 +3499,14 @@ Create new correspondent src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts - 27 + 35 Edit correspondent src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts - 31 + 39 @@ -3613,28 +3562,28 @@ Create new custom field src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.ts - 79 + 88 Edit custom field src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.ts - 83 + 92 Create new document type src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts - 27 + 35 Edit document type src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts - 31 + 39 @@ -3655,14 +3604,14 @@ Create new user group src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.ts - 26 + 39 Edit user group src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.ts - 30 + 43 @@ -3733,49 +3682,49 @@ No encryption src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 11 + 24 SSL src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 12 + 25 STARTTLS src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 13 + 26 Create new mail account src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 38 + 60 Edit mail account src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 42 + 64 Successfully connected to the mail server src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 87 + 109 Unable to connect to the mail server src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts - 88 + 110 @@ -4000,123 +3949,123 @@ Only process attachments src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 27 + 38 src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 38 + 49 Process all files, including 'inline' attachments src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 31 + 42 Process message as .eml src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 42 + 53 Process message as .eml and attachments separately src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 46 + 57 Move to specified folder src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 57 + 68 Mark as read, don't process read mails src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 61 + 72 Flag the mail, don't process flagged mails src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 65 + 76 Tag the mail with specified tag, don't process tagged mails src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 69 + 80 Use subject as title src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 76 + 87 Use attachment filename as title src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 80 + 91 Do not assign title from this rule src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 84 + 95 Do not assign a correspondent src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 91 + 102 Use mail address src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 95 + 106 Use name (or mail address if not available) src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 99 + 110 Use correspondent selected below src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 103 + 114 Create new mail rule src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 145 + 166 Edit mail rule src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts - 149 + 170 @@ -4127,7 +4076,7 @@ src/app/components/manage/storage-path-list/storage-path-list.component.ts - 42 + 60 @@ -4175,23 +4124,19 @@ src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.html 39 - - src/app/components/common/input/document-link/document-link.component.ts - 44 - Create new storage path src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts - 56 + 71 Edit storage path src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts - 60 + 75 @@ -4202,7 +4147,7 @@ src/app/components/manage/tag-list/tag-list.component.ts - 42 + 60 @@ -4223,14 +4168,14 @@ Create new tag src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts - 28 + 45 Edit tag src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts - 32 + 49 @@ -4241,7 +4186,7 @@ src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 102 + 122 src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html @@ -4343,32 +4288,32 @@ Create new user account src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts - 49 + 66 Edit user account src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts - 53 + 70 Totp deactivated src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts - 109 + 126 Totp deactivation failed src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts - 112 + 129 src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts - 117 + 134 @@ -4813,28 +4758,28 @@ Consume Folder src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 41 + 61 API Upload src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 45 + 65 Mail Fetch src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 49 + 69 Modified src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 64 + 84 src/app/data/document.ts @@ -4845,70 +4790,70 @@ Custom Field src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 68 + 88 Consumption Started src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 75 + 95 Document Added src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 79 + 99 Document Updated src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 83 + 103 Scheduled src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 87 + 107 Assignment src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 94 + 114 Removal src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 98 + 118 Webhook src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 106 + 126 Create new workflow src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 183 + 219 Edit workflow src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts - 187 + 223 @@ -4931,10 +4876,6 @@ src/app/components/common/filterable-dropdown/filterable-dropdown.component.html 58 - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.html - 64 - src/app/components/manage/management-list/management-list.component.html 12 @@ -4970,7 +4911,7 @@ Not assigned src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts - 373 + 384 Filter drop down element to filter for documents with no correspondent/type/tag assigned @@ -4978,7 +4919,7 @@ Open filter src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts - 494 + 505 @@ -4994,14 +4935,6 @@ src/app/components/common/input/check/check.component.html 8 - - src/app/components/common/input/date/date.component.html - 7 - - - src/app/components/common/input/document-link/document-link.component.html - 12 - src/app/components/common/input/file/file.component.html 9 @@ -5010,10 +4943,6 @@ src/app/components/common/input/file/file.component.html 21 - - src/app/components/common/input/monetary/monetary.component.html - 9 - src/app/components/common/input/number/number.component.html 9 @@ -5034,103 +4963,19 @@ src/app/components/common/input/textarea/textarea.component.html 9 - - src/app/components/common/input/url/url.component.html - 7 - - - - Invalid date. - - src/app/components/common/input/date/date.component.html - 25 - - - - Suggestions: - - src/app/components/common/input/date/date.component.html - 31 - - - src/app/components/common/input/select/select.component.html - 58 - - - src/app/components/common/input/tags/tags.component.html - 51 - - - - Filter documents with this - - src/app/components/common/input/date/date.component.ts - 107 - - - src/app/components/common/input/select/select.component.ts - 158 - - - - Remove link - - src/app/components/common/input/document-link/document-link.component.html - 43 - - - src/app/components/common/input/document-link/document-link.component.html - 49 - - - - Open link - - src/app/components/common/input/document-link/document-link.component.html - 45 - - - src/app/components/common/input/url/url.component.html - 14 - - - - Not found - - src/app/components/common/input/document-link/document-link.component.html - 50 - - - - Search for documents - - src/app/components/common/input/document-link/document-link.component.ts - 53 - Selected items src/app/components/common/input/drag-drop-select/drag-drop-select.component.ts - 23 + 25 No items selected src/app/components/common/input/drag-drop-select/drag-drop-select.component.ts - 29 - - - - Add - - src/app/components/common/input/entries/entries.component.html - 8 - - - src/app/components/common/permissions-select/permissions-select.component.html - 17 + 31 @@ -5169,11 +5014,22 @@ Used for both types, correspondents, storage paths + + Suggestions: + + src/app/components/common/input/select/select.component.html + 58 + + + src/app/components/common/input/tags/tags.component.html + 51 + + Private src/app/components/common/input/select/select.component.ts - 57 + 63 src/app/components/common/tag/tag.component.html @@ -5185,14 +5041,21 @@ src/app/components/document-list/document-card-small/document-card-small.component.ts - 89 + 116 No items found src/app/components/common/input/select/select.component.ts - 92 + 98 + + + + Filter documents with this + + src/app/components/common/input/select/select.component.ts + 164 @@ -5245,28 +5108,28 @@ Set permissions src/app/components/common/permissions-dialog/permissions-dialog.component.ts - 28 + 41 Edit permissions for src/app/components/common/permissions-dialog/permissions-dialog.component.ts - 33 + 46 Existing owner, user and group permissions will be merged with these settings. src/app/components/common/permissions-dialog/permissions-dialog.component.ts - 74 + 87 Any and all existing owner, user and group permissions will be replaced. src/app/components/common/permissions-dialog/permissions-dialog.component.ts - 75 + 88 @@ -5322,6 +5185,13 @@ 45 + + Add + + src/app/components/common/permissions-select/permissions-select.component.html + 17 + + Change @@ -5333,7 +5203,7 @@ Inherited from group src/app/components/common/permissions-select/permissions-select.component.ts - 63 + 73 @@ -5347,7 +5217,7 @@ Open preview src/app/components/common/preview-popup/preview-popup.component.ts - 37 + 40 @@ -5392,10 +5262,6 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html 156 - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.html - 29 - src/app/components/common/system-status-dialog/system-status-dialog.component.html 156 @@ -5434,10 +5300,6 @@ src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.html 163 - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.html - 40 - Warning: changing the token cannot be undone @@ -5534,210 +5396,85 @@ Emails must match src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 121 + 139 Passwords must match src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 149 + 167 Profile updated successfully src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 170 + 188 Error saving profile src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 182 + 200 Error generating auth token src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 199 + 217 Error disconnecting social account src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 224 + 242 Error fetching TOTP settings src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 243 + 261 TOTP activated successfully src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 264 + 282 Error activating TOTP src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 266 + 284 src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 272 + 290 TOTP deactivated successfully src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 288 + 306 Error deactivating TOTP src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 290 + 308 src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts - 295 - - - - Select - - src/app/components/common/select-dialog/select-dialog.component.html - 13 - - - src/app/components/common/select-dialog/select-dialog.component.ts - 17 - - - src/app/components/document-list/document-list.component.html - 6 - - - src/app/data/custom-field.ts - 50 - - - - Please select an object - - src/app/components/common/select-dialog/select-dialog.component.ts - 20 - - - - Share Links - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.html - 4 - - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts - 23 - - - - No existing links - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.html - 9,11 - - - - Share - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.html - 33 - - - - Share archive version - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.html - 47 - - - - Expires - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.html - 51 - - - - 1 day - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts - 16 - - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts - 102 - - - - 7 days - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts - 17 - - - - 30 days - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts - 18 - - - - Never - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts - 19 - - - - Error retrieving links - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts - 83 - - - - days - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts - 102 - - - - Error deleting link - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts - 131 - - - - Error creating link - - src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts - 159 + 313 @@ -5903,28 +5640,28 @@ Hello , welcome to src/app/components/dashboard/dashboard.component.ts - 38 + 56 Welcome to src/app/components/dashboard/dashboard.component.ts - 40 + 58 Dashboard updated src/app/components/dashboard/dashboard.component.ts - 71 + 89 Error updating dashboard src/app/components/dashboard/dashboard.component.ts - 74 + 92 @@ -6043,7 +5780,7 @@ Other src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.ts - 67 + 77 @@ -6087,32 +5824,32 @@ Processing: src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts - 44 + 55 Failed: src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts - 47 + 58 Added: src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts - 50 + 61 , src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts - 53 + 64 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 361 + 374 this string is used to separate processing, failed and added on the file upload widget @@ -6234,7 +5971,7 @@ src/app/components/document-detail/document-detail.component.ts - 1248 + 1264 src/app/guards/dirty-saved-view.guard.ts @@ -6267,7 +6004,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.ts - 139 + 153 src/app/data/document.ts @@ -6393,10 +6130,6 @@ src/app/components/document-detail/document-detail.component.html 222 - - src/app/components/document-detail/metadata-collapse/metadata-collapse.component.ts - 17 - Date modified @@ -6521,56 +6254,56 @@ An error occurred loading content: src/app/components/document-detail/document-detail.component.ts - 347,349 + 363,365 Document changes detected src/app/components/document-detail/document-detail.component.ts - 377 + 393 The version of this document in your browser session appears older than the existing version. src/app/components/document-detail/document-detail.component.ts - 378 + 394 Saving the document here may overwrite other changes that were made. To restore the existing version, discard your changes or close the document. src/app/components/document-detail/document-detail.component.ts - 379 + 395 Ok src/app/components/document-detail/document-detail.component.ts - 381 + 397 Next document src/app/components/document-detail/document-detail.component.ts - 488 + 504 Previous document src/app/components/document-detail/document-detail.component.ts - 498 + 514 Close document src/app/components/document-detail/document-detail.component.ts - 506 + 522 src/app/services/open-documents.service.ts @@ -6581,231 +6314,224 @@ Save document src/app/components/document-detail/document-detail.component.ts - 513 + 529 Save and close / next src/app/components/document-detail/document-detail.component.ts - 522 + 538 Error retrieving metadata src/app/components/document-detail/document-detail.component.ts - 571 + 587 Error retrieving suggestions. src/app/components/document-detail/document-detail.component.ts - 600 + 616 Document saved successfully. src/app/components/document-detail/document-detail.component.ts - 751 + 767 src/app/components/document-detail/document-detail.component.ts - 765 + 781 Error saving document src/app/components/document-detail/document-detail.component.ts - 769 + 785 src/app/components/document-detail/document-detail.component.ts - 810 + 826 Do you really want to move the document "" to the trash? src/app/components/document-detail/document-detail.component.ts - 838 + 854 Documents can be restored prior to permanent deletion. src/app/components/document-detail/document-detail.component.ts - 839 + 855 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 729 + 742 Move to trash src/app/components/document-detail/document-detail.component.ts - 841 + 857 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 731 + 744 Reprocess confirm src/app/components/document-detail/document-detail.component.ts - 880 + 896 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 769 + 782 This operation will permanently recreate the archive file for this document. src/app/components/document-detail/document-detail.component.ts - 881 + 897 The archive file will be re-generated with the current settings. src/app/components/document-detail/document-detail.component.ts - 882 + 898 Reprocess operation will begin in the background. Close and re-open or reload this document after the operation has completed to see new content. src/app/components/document-detail/document-detail.component.ts - 892 + 908 Error executing operation src/app/components/document-detail/document-detail.component.ts - 903 + 919 Page Fit src/app/components/document-detail/document-detail.component.ts - 976 + 992 Split confirm src/app/components/document-detail/document-detail.component.ts - 1189 + 1205 This operation will split the selected document(s) into new documents. src/app/components/document-detail/document-detail.component.ts - 1190 + 1206 Split operation will begin in the background. src/app/components/document-detail/document-detail.component.ts - 1206 + 1222 Error executing split operation src/app/components/document-detail/document-detail.component.ts - 1215 + 1231 Rotate confirm src/app/components/document-detail/document-detail.component.ts - 1228 + 1244 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 803 + 816 This operation will permanently rotate the original version of the current document. src/app/components/document-detail/document-detail.component.ts - 1229 + 1245 Rotation will begin in the background. Close and re-open the document after the operation has completed to see the changes. src/app/components/document-detail/document-detail.component.ts - 1245 + 1261 Error executing rotate operation src/app/components/document-detail/document-detail.component.ts - 1257 + 1273 Delete pages confirm src/app/components/document-detail/document-detail.component.ts - 1269 + 1285 This operation will permanently delete the selected pages from the original document. src/app/components/document-detail/document-detail.component.ts - 1270 + 1286 Delete pages operation will begin in the background. Close and re-open or reload this document after the operation has completed to see the changes. src/app/components/document-detail/document-detail.component.ts - 1285 + 1301 Error executing delete pages operation src/app/components/document-detail/document-detail.component.ts - 1294 + 1310 An error occurred loading tiff: src/app/components/document-detail/document-detail.component.ts - 1334 + 1350 src/app/components/document-detail/document-detail.component.ts - 1338 - - - - No entries found. - - src/app/components/document-history/document-history.component.html - 10 + 1354 @@ -6878,7 +6604,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.ts - 147 + 161 @@ -6934,29 +6660,29 @@ Error executing bulk operation src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 265 + 278 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 873 + 886 "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 353 + 366 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 359 + 372 "" and "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 355 + 368 This is for messages like 'modify "tag1" and "tag2"' @@ -6964,7 +6690,7 @@ and "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 363,365 + 376,378 this is for messages like 'modify "tag1", "tag2" and "tag3"' @@ -6972,14 +6698,14 @@ Confirm tags assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 380 + 393 This operation will add the tag "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 386 + 399 @@ -6988,14 +6714,14 @@ )"/> to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 391,393 + 404,406 This operation will remove the tag "" from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 399 + 412 @@ -7004,7 +6730,7 @@ )"/> from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 404,406 + 417,419 @@ -7015,84 +6741,84 @@ )"/> on selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 408,412 + 421,425 Confirm correspondent assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 449 + 462 This operation will assign the correspondent "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 451 + 464 This operation will remove the correspondent from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 453 + 466 Confirm document type assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 487 + 500 This operation will assign the document type "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 489 + 502 This operation will remove the document type from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 491 + 504 Confirm storage path assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 525 + 538 This operation will assign the storage path "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 527 + 540 This operation will remove the storage path from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 529 + 542 Confirm custom field assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 558 + 571 This operation will assign the custom field "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 564 + 577 @@ -7101,14 +6827,14 @@ )"/> to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 569,571 + 582,584 This operation will remove the custom field "" from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 577 + 590 @@ -7117,7 +6843,7 @@ )"/> from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 582,584 + 595,597 @@ -7128,63 +6854,63 @@ )"/> on selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 586,590 + 599,603 Move selected document(s) to the trash? src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 728 + 741 This operation will permanently recreate the archive files for selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 770 + 783 The archive files will be re-generated with the current settings. src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 771 + 784 This operation will permanently rotate the original version of document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 804 + 817 Merge confirm src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 823 + 836 This operation will merge selected documents into a new document. src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 824 + 837 Merged document will be queued for consumption. src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 840 + 853 Bulk operation executed successfully src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 863 + 876 @@ -7337,6 +7063,17 @@ 66 + + Select + + src/app/components/document-list/document-list.component.html + 6 + + + src/app/data/custom-field.ts + 50 + + Select none @@ -7352,7 +7089,7 @@ src/app/components/document-list/document-list.component.ts - 255 + 276 @@ -7363,7 +7100,7 @@ src/app/components/document-list/document-list.component.ts - 248 + 269 @@ -7466,7 +7203,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.ts - 144 + 158 src/app/data/document.ts @@ -7608,10 +7345,6 @@ src/app/components/document-list/document-list.component.html 362 - - src/app/pipes/yes-no.pipe.ts - 8 - No @@ -7619,51 +7352,47 @@ src/app/components/document-list/document-list.component.html 362 - - src/app/pipes/yes-no.pipe.ts - 8 - Reset filters / selection src/app/components/document-list/document-list.component.ts - 236 + 257 Open first [selected] document src/app/components/document-list/document-list.component.ts - 264 + 285 Previous page src/app/components/document-list/document-list.component.ts - 280 + 301 Next page src/app/components/document-list/document-list.component.ts - 292 + 313 View "" saved successfully. src/app/components/document-list/document-list.component.ts - 324 + 345 View "" created successfully. src/app/components/document-list/document-list.component.ts - 367 + 388 @@ -7677,147 +7406,147 @@ Title & content src/app/components/document-list/filter-editor/filter-editor.component.ts - 142 + 156 More like src/app/components/document-list/filter-editor/filter-editor.component.ts - 157 + 171 equals src/app/components/document-list/filter-editor/filter-editor.component.ts - 163 + 177 is empty src/app/components/document-list/filter-editor/filter-editor.component.ts - 167 + 181 is not empty src/app/components/document-list/filter-editor/filter-editor.component.ts - 171 + 185 greater than src/app/components/document-list/filter-editor/filter-editor.component.ts - 175 + 189 less than src/app/components/document-list/filter-editor/filter-editor.component.ts - 179 + 193 Correspondent: src/app/components/document-list/filter-editor/filter-editor.component.ts - 199,201 + 224,226 Without correspondent src/app/components/document-list/filter-editor/filter-editor.component.ts - 203 + 228 Document type: src/app/components/document-list/filter-editor/filter-editor.component.ts - 209,211 + 234,236 Without document type src/app/components/document-list/filter-editor/filter-editor.component.ts - 213 + 238 Storage path: src/app/components/document-list/filter-editor/filter-editor.component.ts - 219,221 + 244,246 Without storage path src/app/components/document-list/filter-editor/filter-editor.component.ts - 223 + 248 Tag: src/app/components/document-list/filter-editor/filter-editor.component.ts - 227,229 + 252,254 Without any tag src/app/components/document-list/filter-editor/filter-editor.component.ts - 233 + 258 Custom fields query src/app/components/document-list/filter-editor/filter-editor.component.ts - 237 + 262 Title: src/app/components/document-list/filter-editor/filter-editor.component.ts - 240 + 265 ASN: src/app/components/document-list/filter-editor/filter-editor.component.ts - 243 + 268 Owner: src/app/components/document-list/filter-editor/filter-editor.component.ts - 246 + 271 Owner not in: src/app/components/document-list/filter-editor/filter-editor.component.ts - 249 + 274 Without an owner src/app/components/document-list/filter-editor/filter-editor.component.ts - 252 + 277 @@ -7863,52 +7592,6 @@ 14 - - Enter note - - src/app/components/document-notes/document-notes.component.html - 5 - - - - Please enter a note. - - src/app/components/document-notes/document-notes.component.html - 6,8 - - - - Add note - - src/app/components/document-notes/document-notes.component.html - 14 - - - - Delete note - - src/app/components/document-notes/document-notes.component.html - 25 - - - src/app/components/document-notes/document-notes.component.html - 27 - - - - Error saving note - - src/app/components/document-notes/document-notes.component.ts - 66 - - - - Error deleting note - - src/app/components/document-notes/document-notes.component.ts - 80 - - Drop files to begin upload @@ -7920,35 +7603,35 @@ Initiating upload... src/app/components/file-drop/file-drop.component.ts - 88 + 93 correspondent src/app/components/manage/correspondent-list/correspondent-list.component.ts - 39 + 55 correspondents src/app/components/manage/correspondent-list/correspondent-list.component.ts - 40 + 56 Last used src/app/components/manage/correspondent-list/correspondent-list.component.ts - 45 + 61 Do you really want to delete the correspondent ""? src/app/components/manage/correspondent-list/correspondent-list.component.ts - 71 + 87 @@ -8002,53 +7685,67 @@ 70 + + Saved field "". + + src/app/components/manage/custom-fields/custom-fields.component.ts + 80 + + + + Error saving field. + + src/app/components/manage/custom-fields/custom-fields.component.ts + 88 + + Confirm delete field src/app/components/manage/custom-fields/custom-fields.component.ts - 87 + 96 This operation will permanently delete this field. src/app/components/manage/custom-fields/custom-fields.component.ts - 88 + 97 Deleted field src/app/components/manage/custom-fields/custom-fields.component.ts - 97 + 106 Error deleting field. src/app/components/manage/custom-fields/custom-fields.component.ts - 103 + 112 document type src/app/components/manage/document-type-list/document-type-list.component.ts - 36 + 52 document types src/app/components/manage/document-type-list/document-type-list.component.ts - 37 + 53 Do you really want to delete the document type ""? src/app/components/manage/document-type-list/document-type-list.component.ts - 44 + 60 @@ -8154,161 +7851,161 @@ Error retrieving mail accounts src/app/components/manage/mail/mail.component.ts - 92 + 104 Error retrieving mail rules src/app/components/manage/mail/mail.component.ts - 114 + 126 OAuth2 authentication success src/app/components/manage/mail/mail.component.ts - 122 + 134 OAuth2 authentication failed, see logs for details src/app/components/manage/mail/mail.component.ts - 133 + 145 Saved account "". src/app/components/manage/mail/mail.component.ts - 157 + 169 Error saving account. src/app/components/manage/mail/mail.component.ts - 169 + 181 Confirm delete mail account src/app/components/manage/mail/mail.component.ts - 177 + 189 This operation will permanently delete this mail account. src/app/components/manage/mail/mail.component.ts - 178 + 190 Deleted mail account src/app/components/manage/mail/mail.component.ts - 187 + 199 Error deleting mail account. src/app/components/manage/mail/mail.component.ts - 197 + 209 Processing mail account src/app/components/manage/mail/mail.component.ts - 208 + 220 Error processing mail account src/app/components/manage/mail/mail.component.ts - 211 + 223 Saved rule "". src/app/components/manage/mail/mail.component.ts - 227 + 239 Error saving rule. src/app/components/manage/mail/mail.component.ts - 238 + 250 Rule "" enabled. src/app/components/manage/mail/mail.component.ts - 254 + 266 Rule "" disabled. src/app/components/manage/mail/mail.component.ts - 255 + 267 Error toggling rule. src/app/components/manage/mail/mail.component.ts - 259 + 271 Confirm delete mail rule src/app/components/manage/mail/mail.component.ts - 268 + 280 This operation will permanently delete this mail rule. src/app/components/manage/mail/mail.component.ts - 269 + 281 Deleted mail rule src/app/components/manage/mail/mail.component.ts - 278 + 290 Error deleting mail rule. src/app/components/manage/mail/mail.component.ts - 287 + 299 Permissions updated src/app/components/manage/mail/mail.component.ts - 309 + 321 Error updating permissions src/app/components/manage/mail/mail.component.ts - 314 + 326 src/app/components/manage/management-list/management-list.component.ts @@ -8536,63 +8233,63 @@ Saved view "" deleted. src/app/components/manage/saved-views/saved-views.component.ts - 110 + 132 Views saved successfully. src/app/components/manage/saved-views/saved-views.component.ts - 135 + 157 Error while saving views. src/app/components/manage/saved-views/saved-views.component.ts - 140 + 162 storage path src/app/components/manage/storage-path-list/storage-path-list.component.ts - 36 + 54 storage paths src/app/components/manage/storage-path-list/storage-path-list.component.ts - 37 + 55 Do you really want to delete the storage path ""? src/app/components/manage/storage-path-list/storage-path-list.component.ts - 54 + 72 tag src/app/components/manage/tag-list/tag-list.component.ts - 36 + 54 tags src/app/components/manage/tag-list/tag-list.component.ts - 37 + 55 Do you really want to delete the tag ""? src/app/components/manage/tag-list/tag-list.component.ts - 53 + 71 @@ -8620,63 +8317,63 @@ Saved workflow "". src/app/components/manage/workflows/workflows.component.ts - 82 + 90 Error saving workflow. src/app/components/manage/workflows/workflows.component.ts - 90 + 98 Confirm delete workflow src/app/components/manage/workflows/workflows.component.ts - 117 + 125 This operation will permanently delete this workflow. src/app/components/manage/workflows/workflows.component.ts - 118 + 126 Deleted workflow src/app/components/manage/workflows/workflows.component.ts - 127 + 135 Error deleting workflow. src/app/components/manage/workflows/workflows.component.ts - 132 + 140 Enabled workflow src/app/components/manage/workflows/workflows.component.ts - 143 + 151 Disabled workflow src/app/components/manage/workflows/workflows.component.ts - 144 + 152 Error toggling workflow. src/app/components/manage/workflows/workflows.component.ts - 150 + 158 diff --git a/src-ui/setup-jest.ts b/src-ui/setup-jest.ts index 10c9f99f1..244938606 100644 --- a/src-ui/setup-jest.ts +++ b/src-ui/setup-jest.ts @@ -1,8 +1,9 @@ import '@angular/localize/init' import { jest } from '@jest/globals' +import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone' import { TextDecoder, TextEncoder } from 'util' if (process.env.NODE_ENV === 'test') { - require('jest-preset-angular/setup-jest') + setupZoneTestEnv() } global.TextEncoder = TextEncoder global.TextDecoder = TextDecoder diff --git a/src-ui/src/app/app.component.spec.ts b/src-ui/src/app/app.component.spec.ts index cd11864c3..74626f847 100644 --- a/src-ui/src/app/app.component.spec.ts +++ b/src-ui/src/app/app.component.spec.ts @@ -2,12 +2,13 @@ import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http' import { provideHttpClientTesting } from '@angular/common/http/testing' import { ComponentFixture, - TestBed, fakeAsync, + TestBed, tick, } from '@angular/core/testing' import { Router, RouterModule } from '@angular/router' import { NgbModalModule } from '@ng-bootstrap/ng-bootstrap' +import { allIcons, NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { NgxFileDropModule } from 'ngx-file-drop' import { TourNgBootstrapModule, TourService } from 'ngx-ui-tour-ng-bootstrap' import { Subject } from 'rxjs' @@ -39,12 +40,15 @@ describe('AppComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [AppComponent, ToastsComponent, FileDropComponent], imports: [ TourNgBootstrapModule, RouterModule.forRoot(routes), NgxFileDropModule, NgbModalModule, + AppComponent, + ToastsComponent, + FileDropComponent, + NgxBootstrapIconsModule.pick(allIcons), ], providers: [ PermissionsGuard, diff --git a/src-ui/src/app/app.component.ts b/src-ui/src/app/app.component.ts index 20433d3ca..d22b4ca38 100644 --- a/src-ui/src/app/app.component.ts +++ b/src-ui/src/app/app.component.ts @@ -1,7 +1,9 @@ import { Component, OnDestroy, OnInit, Renderer2 } from '@angular/core' -import { Router } from '@angular/router' -import { TourService } from 'ngx-ui-tour-ng-bootstrap' +import { Router, RouterOutlet } from '@angular/router' +import { TourNgBootstrapModule, TourService } from 'ngx-ui-tour-ng-bootstrap' import { first, Subscription } from 'rxjs' +import { ToastsComponent } from './components/common/toasts/toasts.component' +import { FileDropComponent } from './components/file-drop/file-drop.component' import { SETTINGS_KEYS } from './data/ui-settings' import { ConsumerStatusService } from './services/consumer-status.service' import { HotKeyService } from './services/hot-key.service' @@ -18,7 +20,12 @@ import { ToastService } from './services/toast.service' selector: 'pngx-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'], - standalone: false, + imports: [ + FileDropComponent, + ToastsComponent, + TourNgBootstrapModule, + RouterOutlet, + ], }) export class AppComponent implements OnInit, OnDestroy { newDocumentSubscription: Subscription diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts deleted file mode 100644 index faf4f2818..000000000 --- a/src-ui/src/app/app.module.ts +++ /dev/null @@ -1,575 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser' -import { NgModule, inject, provideAppInitializer } from '@angular/core' -import { AppRoutingModule } from './app-routing.module' -import { AppComponent } from './app.component' -import { - NgbDateAdapter, - NgbDateParserFormatter, - NgbModule, -} from '@ng-bootstrap/ng-bootstrap' -import { - HTTP_INTERCEPTORS, - provideHttpClient, - withInterceptorsFromDi, -} from '@angular/common/http' -import { DocumentListComponent } from './components/document-list/document-list.component' -import { DocumentDetailComponent } from './components/document-detail/document-detail.component' -import { DashboardComponent } from './components/dashboard/dashboard.component' -import { TagListComponent } from './components/manage/tag-list/tag-list.component' -import { DocumentTypeListComponent } from './components/manage/document-type-list/document-type-list.component' -import { CorrespondentListComponent } from './components/manage/correspondent-list/correspondent-list.component' -import { LogsComponent } from './components/admin/logs/logs.component' -import { SettingsComponent } from './components/admin/settings/settings.component' -import { FormsModule, ReactiveFormsModule } from '@angular/forms' -import { DatePipe, registerLocaleData } from '@angular/common' -import { NotFoundComponent } from './components/not-found/not-found.component' -import { ConfirmDialogComponent } from './components/common/confirm-dialog/confirm-dialog.component' -import { CorrespondentEditDialogComponent } from './components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component' -import { TagEditDialogComponent } from './components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component' -import { DocumentTypeEditDialogComponent } from './components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component' -import { TagComponent } from './components/common/tag/tag.component' -import { ClearableBadgeComponent } from './components/common/clearable-badge/clearable-badge.component' -import { PageHeaderComponent } from './components/common/page-header/page-header.component' -import { AppFrameComponent } from './components/app-frame/app-frame.component' -import { ToastsComponent } from './components/common/toasts/toasts.component' -import { FilterEditorComponent } from './components/document-list/filter-editor/filter-editor.component' -import { FilterableDropdownComponent } from './components/common/filterable-dropdown/filterable-dropdown.component' -import { ToggleableDropdownButtonComponent } from './components/common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component' -import { DatesDropdownComponent } from './components/common/dates-dropdown/dates-dropdown.component' -import { DocumentCardLargeComponent } from './components/document-list/document-card-large/document-card-large.component' -import { DocumentCardSmallComponent } from './components/document-list/document-card-small/document-card-small.component' -import { BulkEditorComponent } from './components/document-list/bulk-editor/bulk-editor.component' -import { NgxFileDropModule } from 'ngx-file-drop' -import { TextComponent } from './components/common/input/text/text.component' -import { TextAreaComponent } from './components/common/input/textarea/textarea.component' -import { SelectComponent } from './components/common/input/select/select.component' -import { CheckComponent } from './components/common/input/check/check.component' -import { UrlComponent } from './components/common/input/url/url.component' -import { PasswordComponent } from './components/common/input/password/password.component' -import { SaveViewConfigDialogComponent } from './components/document-list/save-view-config-dialog/save-view-config-dialog.component' -import { TagsComponent } from './components/common/input/tags/tags.component' -import { IfPermissionsDirective } from './directives/if-permissions.directive' -import { SortableDirective } from './directives/sortable.directive' -import { CookieService } from 'ngx-cookie-service' -import { CsrfInterceptor } from './interceptors/csrf.interceptor' -import { SavedViewWidgetComponent } from './components/dashboard/widgets/saved-view-widget/saved-view-widget.component' -import { StatisticsWidgetComponent } from './components/dashboard/widgets/statistics-widget/statistics-widget.component' -import { UploadFileWidgetComponent } from './components/dashboard/widgets/upload-file-widget/upload-file-widget.component' -import { WidgetFrameComponent } from './components/dashboard/widgets/widget-frame/widget-frame.component' -import { WelcomeWidgetComponent } from './components/dashboard/widgets/welcome-widget/welcome-widget.component' -import { YesNoPipe } from './pipes/yes-no.pipe' -import { FileSizePipe } from './pipes/file-size.pipe' -import { FilterPipe } from './pipes/filter.pipe' -import { DocumentTitlePipe } from './pipes/document-title.pipe' -import { MetadataCollapseComponent } from './components/document-detail/metadata-collapse/metadata-collapse.component' -import { SelectDialogComponent } from './components/common/select-dialog/select-dialog.component' -import { NgSelectModule } from '@ng-select/ng-select' -import { NumberComponent } from './components/common/input/number/number.component' -import { SafeUrlPipe } from './pipes/safeurl.pipe' -import { SafeHtmlPipe } from './pipes/safehtml.pipe' -import { CustomDatePipe } from './pipes/custom-date.pipe' -import { DateComponent } from './components/common/input/date/date.component' -import { ISODateAdapter } from './utils/ngb-iso-date-adapter' -import { LocalizedDateParserFormatter } from './utils/ngb-date-parser-formatter' -import { ApiVersionInterceptor } from './interceptors/api-version.interceptor' -import { ColorSliderModule } from 'ngx-color/slider' -import { ColorComponent } from './components/common/input/color/color.component' -import { DocumentAsnComponent } from './components/document-asn/document-asn.component' -import { DocumentNotesComponent } from './components/document-notes/document-notes.component' -import { PermissionsGuard } from './guards/permissions.guard' -import { DirtyDocGuard } from './guards/dirty-doc.guard' -import { DirtySavedViewGuard } from './guards/dirty-saved-view.guard' -import { StoragePathListComponent } from './components/manage/storage-path-list/storage-path-list.component' -import { StoragePathEditDialogComponent } from './components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component' -import { SettingsService } from './services/settings.service' -import { TasksComponent } from './components/admin/tasks/tasks.component' -import { TourNgBootstrapModule } from 'ngx-ui-tour-ng-bootstrap' -import { UserEditDialogComponent } from './components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component' -import { GroupEditDialogComponent } from './components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component' -import { PermissionsSelectComponent } from './components/common/permissions-select/permissions-select.component' -import { MailAccountEditDialogComponent } from './components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component' -import { MailRuleEditDialogComponent } from './components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component' -import { PermissionsUserComponent } from './components/common/input/permissions/permissions-user/permissions-user.component' -import { PermissionsGroupComponent } from './components/common/input/permissions/permissions-group/permissions-group.component' -import { IfOwnerDirective } from './directives/if-owner.directive' -import { IfObjectPermissionsDirective } from './directives/if-object-permissions.directive' -import { PermissionsDialogComponent } from './components/common/permissions-dialog/permissions-dialog.component' -import { PermissionsFormComponent } from './components/common/input/permissions/permissions-form/permissions-form.component' -import { PermissionsFilterDropdownComponent } from './components/common/permissions-filter-dropdown/permissions-filter-dropdown.component' -import { UsernamePipe } from './pipes/username.pipe' -import { LogoComponent } from './components/common/logo/logo.component' -import { IsNumberPipe } from './pipes/is-number.pipe' -import { ShareLinksDropdownComponent } from './components/common/share-links-dropdown/share-links-dropdown.component' -import { WorkflowsComponent } from './components/manage/workflows/workflows.component' -import { WorkflowEditDialogComponent } from './components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component' -import { MailComponent } from './components/manage/mail/mail.component' -import { UsersAndGroupsComponent } from './components/admin/users-groups/users-groups.component' -import { DragDropModule } from '@angular/cdk/drag-drop' -import { FileDropComponent } from './components/file-drop/file-drop.component' -import { CustomFieldsComponent } from './components/manage/custom-fields/custom-fields.component' -import { CustomFieldEditDialogComponent } from './components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component' -import { CustomFieldsDropdownComponent } from './components/common/custom-fields-dropdown/custom-fields-dropdown.component' -import { CustomFieldsQueryDropdownComponent } from './components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component' -import { ProfileEditDialogComponent } from './components/common/profile-edit-dialog/profile-edit-dialog.component' -import { PdfViewerModule } from 'ng2-pdf-viewer' -import { DocumentLinkComponent } from './components/common/input/document-link/document-link.component' -import { PreviewPopupComponent } from './components/common/preview-popup/preview-popup.component' -import { SwitchComponent } from './components/common/input/switch/switch.component' -import { ConfigComponent } from './components/admin/config/config.component' -import { FileComponent } from './components/common/input/file/file.component' -import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' -import { ConfirmButtonComponent } from './components/common/confirm-button/confirm-button.component' -import { MonetaryComponent } from './components/common/input/monetary/monetary.component' -import { SystemStatusDialogComponent } from './components/common/system-status-dialog/system-status-dialog.component' -import { RotateConfirmDialogComponent } from './components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component' -import { MergeConfirmDialogComponent } from './components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component' -import { SplitConfirmDialogComponent } from './components/common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component' -import { DocumentHistoryComponent } from './components/document-history/document-history.component' -import { DragDropSelectComponent } from './components/common/input/drag-drop-select/drag-drop-select.component' -import { CustomFieldDisplayComponent } from './components/common/custom-field-display/custom-field-display.component' -import { GlobalSearchComponent } from './components/app-frame/global-search/global-search.component' -import { HotkeyDialogComponent } from './components/common/hotkey-dialog/hotkey-dialog.component' -import { DeletePagesConfirmDialogComponent } from './components/common/confirm-dialog/delete-pages-confirm-dialog/delete-pages-confirm-dialog.component' -import { TrashComponent } from './components/admin/trash/trash.component' -import { EntriesComponent } from './components/common/input/entries/entries.component' -import { SavedViewsComponent } from './components/manage/saved-views/saved-views.component' -import { - airplane, - archive, - arrowClockwise, - arrowCounterclockwise, - arrowDown, - arrowLeft, - arrowRepeat, - arrowRight, - arrowRightShort, - arrowUpRight, - asterisk, - braces, - bodyText, - boxArrowUp, - boxArrowUpRight, - boxes, - calendar, - calendarEvent, - calendarEventFill, - cardChecklist, - cardHeading, - caretDown, - caretUp, - chatLeftText, - check, - check2All, - checkAll, - checkCircleFill, - checkLg, - chevronDoubleLeft, - chevronDoubleRight, - clipboard, - clipboardCheck, - clipboardCheckFill, - clipboardFill, - dash, - dashCircle, - diagram3, - dice5, - doorOpen, - download, - envelope, - envelopeAt, - envelopeAtFill, - exclamationCircleFill, - exclamationTriangle, - exclamationTriangleFill, - eye, - fileEarmark, - fileEarmarkCheck, - fileEarmarkFill, - fileEarmarkLock, - fileEarmarkMinus, - fileEarmarkRichtext, - files, - fileText, - filter, - folder, - folderFill, - funnel, - gear, - google, - grid, - gripVertical, - hash, - hddStack, - house, - infoCircle, - journals, - link, - listTask, - listUl, - microsoft, - nodePlus, - pencil, - people, - peopleFill, - person, - personCircle, - personFill, - personFillLock, - personLock, - personSquare, - plus, - plusCircle, - questionCircle, - scissors, - search, - slashCircle, - sliders2Vertical, - sortAlphaDown, - sortAlphaUpAlt, - tagFill, - tag, - tags, - textIndentLeft, - textLeft, - threeDots, - threeDotsVertical, - trash, - uiRadios, - upcScan, - windowStack, - x, - xCircle, - xLg, -} from 'ngx-bootstrap-icons' - -const icons = { - airplane, - archive, - arrowClockwise, - arrowCounterclockwise, - arrowDown, - arrowLeft, - arrowRepeat, - arrowRight, - arrowRightShort, - arrowUpRight, - asterisk, - braces, - bodyText, - boxArrowUp, - boxArrowUpRight, - boxes, - calendar, - calendarEvent, - calendarEventFill, - cardChecklist, - cardHeading, - caretDown, - caretUp, - chatLeftText, - check, - check2All, - checkAll, - checkCircleFill, - checkLg, - chevronDoubleLeft, - chevronDoubleRight, - clipboard, - clipboardCheck, - clipboardCheckFill, - clipboardFill, - dash, - dashCircle, - diagram3, - dice5, - doorOpen, - download, - envelope, - envelopeAt, - envelopeAtFill, - exclamationCircleFill, - exclamationTriangle, - exclamationTriangleFill, - eye, - fileEarmark, - fileEarmarkCheck, - fileEarmarkFill, - fileEarmarkLock, - fileEarmarkMinus, - fileEarmarkRichtext, - files, - fileText, - filter, - folder, - folderFill, - funnel, - gear, - google, - grid, - gripVertical, - hash, - hddStack, - house, - infoCircle, - journals, - link, - listTask, - listUl, - microsoft, - nodePlus, - pencil, - people, - peopleFill, - person, - personCircle, - personFill, - personFillLock, - personLock, - personSquare, - plus, - plusCircle, - questionCircle, - scissors, - search, - slashCircle, - sliders2Vertical, - sortAlphaDown, - sortAlphaUpAlt, - tagFill, - tag, - tags, - textIndentLeft, - textLeft, - threeDots, - threeDotsVertical, - trash, - uiRadios, - upcScan, - windowStack, - x, - xCircle, - xLg, -} - -import localeAf from '@angular/common/locales/af' -import localeAr from '@angular/common/locales/ar' -import localeBe from '@angular/common/locales/be' -import localeBg from '@angular/common/locales/bg' -import localeCa from '@angular/common/locales/ca' -import localeCs from '@angular/common/locales/cs' -import localeDa from '@angular/common/locales/da' -import localeDe from '@angular/common/locales/de' -import localeEl from '@angular/common/locales/el' -import localeEnGb from '@angular/common/locales/en-GB' -import localeEs from '@angular/common/locales/es' -import localeFi from '@angular/common/locales/fi' -import localeFr from '@angular/common/locales/fr' -import localeHu from '@angular/common/locales/hu' -import localeIt from '@angular/common/locales/it' -import localeJa from '@angular/common/locales/ja' -import localeKo from '@angular/common/locales/ko' -import localeLb from '@angular/common/locales/lb' -import localeNl from '@angular/common/locales/nl' -import localeNo from '@angular/common/locales/no' -import localePl from '@angular/common/locales/pl' -import localePt from '@angular/common/locales/pt' -import localeRo from '@angular/common/locales/ro' -import localeRu from '@angular/common/locales/ru' -import localeSk from '@angular/common/locales/sk' -import localeSl from '@angular/common/locales/sl' -import localeSr from '@angular/common/locales/sr' -import localeSv from '@angular/common/locales/sv' -import localeTr from '@angular/common/locales/tr' -import localeUk from '@angular/common/locales/uk' -import localeZh from '@angular/common/locales/zh' - -registerLocaleData(localeAf) -registerLocaleData(localeAr) -registerLocaleData(localeBe) -registerLocaleData(localeBg) -registerLocaleData(localeCa) -registerLocaleData(localeCs) -registerLocaleData(localeDa) -registerLocaleData(localeDe) -registerLocaleData(localeEl) -registerLocaleData(localeEnGb) -registerLocaleData(localeEs) -registerLocaleData(localeFi) -registerLocaleData(localeFr) -registerLocaleData(localeHu) -registerLocaleData(localeIt) -registerLocaleData(localeJa) -registerLocaleData(localeKo) -registerLocaleData(localeLb) -registerLocaleData(localeNl) -registerLocaleData(localeNo) -registerLocaleData(localePl) -registerLocaleData(localePt, 'pt-BR') -registerLocaleData(localePt, 'pt-PT') -registerLocaleData(localeRo) -registerLocaleData(localeRu) -registerLocaleData(localeSk) -registerLocaleData(localeSl) -registerLocaleData(localeSr) -registerLocaleData(localeSv) -registerLocaleData(localeTr) -registerLocaleData(localeUk) -registerLocaleData(localeZh) - -function initializeApp(settings: SettingsService) { - return () => { - return settings.initializeSettings() - } -} - -@NgModule({ - declarations: [ - AppComponent, - DocumentListComponent, - DocumentDetailComponent, - DashboardComponent, - TagListComponent, - DocumentTypeListComponent, - CorrespondentListComponent, - StoragePathListComponent, - LogsComponent, - SettingsComponent, - NotFoundComponent, - CorrespondentEditDialogComponent, - ConfirmDialogComponent, - TagEditDialogComponent, - DocumentTypeEditDialogComponent, - StoragePathEditDialogComponent, - TagComponent, - ClearableBadgeComponent, - PageHeaderComponent, - AppFrameComponent, - ToastsComponent, - FilterEditorComponent, - FilterableDropdownComponent, - ToggleableDropdownButtonComponent, - DatesDropdownComponent, - DocumentCardLargeComponent, - DocumentCardSmallComponent, - BulkEditorComponent, - TextComponent, - TextAreaComponent, - SelectComponent, - CheckComponent, - UrlComponent, - PasswordComponent, - SaveViewConfigDialogComponent, - TagsComponent, - IfPermissionsDirective, - SortableDirective, - SavedViewWidgetComponent, - StatisticsWidgetComponent, - UploadFileWidgetComponent, - WidgetFrameComponent, - WelcomeWidgetComponent, - YesNoPipe, - FileSizePipe, - FilterPipe, - DocumentTitlePipe, - MetadataCollapseComponent, - SelectDialogComponent, - NumberComponent, - SafeUrlPipe, - SafeHtmlPipe, - CustomDatePipe, - DateComponent, - ColorComponent, - DocumentAsnComponent, - DocumentNotesComponent, - TasksComponent, - UserEditDialogComponent, - GroupEditDialogComponent, - PermissionsSelectComponent, - MailAccountEditDialogComponent, - MailRuleEditDialogComponent, - PermissionsUserComponent, - PermissionsGroupComponent, - IfOwnerDirective, - IfObjectPermissionsDirective, - PermissionsDialogComponent, - PermissionsFormComponent, - PermissionsFilterDropdownComponent, - UsernamePipe, - LogoComponent, - IsNumberPipe, - ShareLinksDropdownComponent, - WorkflowsComponent, - WorkflowEditDialogComponent, - MailComponent, - UsersAndGroupsComponent, - FileDropComponent, - CustomFieldsComponent, - CustomFieldEditDialogComponent, - CustomFieldsDropdownComponent, - CustomFieldsQueryDropdownComponent, - ProfileEditDialogComponent, - DocumentLinkComponent, - PreviewPopupComponent, - SwitchComponent, - ConfigComponent, - FileComponent, - ConfirmButtonComponent, - MonetaryComponent, - SystemStatusDialogComponent, - RotateConfirmDialogComponent, - MergeConfirmDialogComponent, - SplitConfirmDialogComponent, - DocumentHistoryComponent, - DragDropSelectComponent, - CustomFieldDisplayComponent, - GlobalSearchComponent, - HotkeyDialogComponent, - DeletePagesConfirmDialogComponent, - TrashComponent, - EntriesComponent, - SavedViewsComponent, - ], - bootstrap: [AppComponent], - imports: [ - BrowserModule, - AppRoutingModule, - NgbModule, - FormsModule, - ReactiveFormsModule, - PdfViewerModule, - NgxFileDropModule, - NgSelectModule, - ColorSliderModule, - TourNgBootstrapModule, - DragDropModule, - NgxBootstrapIconsModule.pick(icons), - ], - providers: [ - provideAppInitializer(() => { - const initializerFn = initializeApp(inject(SettingsService)) - return initializerFn() - }), - DatePipe, - CookieService, - { - provide: HTTP_INTERCEPTORS, - useClass: CsrfInterceptor, - multi: true, - }, - { - provide: HTTP_INTERCEPTORS, - useClass: ApiVersionInterceptor, - multi: true, - }, - FilterPipe, - DocumentTitlePipe, - { provide: NgbDateAdapter, useClass: ISODateAdapter }, - { provide: NgbDateParserFormatter, useClass: LocalizedDateParserFormatter }, - PermissionsGuard, - DirtyDocGuard, - DirtySavedViewGuard, - UsernamePipe, - provideHttpClient(withInterceptorsFromDi()), - ], -}) -export class AppModule {} diff --git a/src-ui/src/app/components/admin/config/config.component.spec.ts b/src-ui/src/app/components/admin/config/config.component.spec.ts index 470add34b..191532590 100644 --- a/src-ui/src/app/components/admin/config/config.component.spec.ts +++ b/src-ui/src/app/components/admin/config/config.component.spec.ts @@ -29,15 +29,6 @@ describe('ConfigComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ - ConfigComponent, - TextComponent, - SelectComponent, - NumberComponent, - SwitchComponent, - FileComponent, - PageHeaderComponent, - ], imports: [ BrowserModule, NgbModule, @@ -45,6 +36,13 @@ describe('ConfigComponent', () => { FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule.pick(allIcons), + ConfigComponent, + TextComponent, + SelectComponent, + NumberComponent, + SwitchComponent, + FileComponent, + PageHeaderComponent, ], providers: [ provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/admin/config/config.component.ts b/src-ui/src/app/components/admin/config/config.component.ts index 2721a16b8..76f6b8795 100644 --- a/src-ui/src/app/components/admin/config/config.component.ts +++ b/src-ui/src/app/components/admin/config/config.component.ts @@ -1,6 +1,15 @@ +import { AsyncPipe } from '@angular/common' import { Component, OnDestroy, OnInit } from '@angular/core' -import { AbstractControl, FormControl, FormGroup } from '@angular/forms' +import { + AbstractControl, + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' +import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap' import { DirtyComponent, dirtyCheck } from '@ngneat/dirty-check-forms' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { BehaviorSubject, Observable, @@ -18,13 +27,31 @@ import { import { ConfigService } from 'src/app/services/config.service' import { SettingsService } from 'src/app/services/settings.service' import { ToastService } from 'src/app/services/toast.service' +import { FileComponent } from '../../common/input/file/file.component' +import { NumberComponent } from '../../common/input/number/number.component' +import { SelectComponent } from '../../common/input/select/select.component' +import { SwitchComponent } from '../../common/input/switch/switch.component' +import { TextComponent } from '../../common/input/text/text.component' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' @Component({ selector: 'pngx-config', templateUrl: './config.component.html', styleUrl: './config.component.scss', - standalone: false, + imports: [ + PageHeaderComponent, + SelectComponent, + SwitchComponent, + TextComponent, + NumberComponent, + FileComponent, + AsyncPipe, + NgbNavModule, + FormsModule, + ReactiveFormsModule, + NgxBootstrapIconsModule, + ], }) export class ConfigComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/admin/logs/logs.component.spec.ts b/src-ui/src/app/components/admin/logs/logs.component.spec.ts index 2c17e2e82..6e4adacfe 100644 --- a/src-ui/src/app/components/admin/logs/logs.component.spec.ts +++ b/src-ui/src/app/components/admin/logs/logs.component.spec.ts @@ -1,7 +1,6 @@ import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http' import { provideHttpClientTesting } from '@angular/common/http/testing' import { ComponentFixture, TestBed } from '@angular/core/testing' -import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { BrowserModule, By } from '@angular/platform-browser' import { NgbModule, NgbNavLink } from '@ng-bootstrap/ng-bootstrap' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' @@ -33,13 +32,12 @@ describe('LogsComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [LogsComponent, PageHeaderComponent], imports: [ BrowserModule, NgbModule, NgxBootstrapIconsModule.pick(allIcons), - FormsModule, - ReactiveFormsModule, + LogsComponent, + PageHeaderComponent, ], providers: [ provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/admin/logs/logs.component.ts b/src-ui/src/app/components/admin/logs/logs.component.ts index 16587d792..90a1715db 100644 --- a/src-ui/src/app/components/admin/logs/logs.component.ts +++ b/src-ui/src/app/components/admin/logs/logs.component.ts @@ -6,15 +6,23 @@ import { OnInit, ViewChild, } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap' import { filter, takeUntil, timer } from 'rxjs' import { LogService } from 'src/app/services/rest/log.service' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' @Component({ selector: 'pngx-logs', templateUrl: './logs.component.html', styleUrls: ['./logs.component.scss'], - standalone: false, + imports: [ + PageHeaderComponent, + NgbNavModule, + FormsModule, + ReactiveFormsModule, + ], }) export class LogsComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/admin/settings/settings.component.spec.ts b/src-ui/src/app/components/admin/settings/settings.component.spec.ts index 488785f34..5f587cf9e 100644 --- a/src-ui/src/app/components/admin/settings/settings.component.spec.ts +++ b/src-ui/src/app/components/admin/settings/settings.component.spec.ts @@ -75,7 +75,16 @@ describe('SettingsComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + NgbModule, + RouterTestingModule.withRoutes(routes), + FormsModule, + ReactiveFormsModule, + NgbAlertModule, + NgSelectModule, + NgxBootstrapIconsModule.pick(allIcons), + NgbModalModule, + DragDropModule, SettingsComponent, PageHeaderComponent, IfPermissionsDirective, @@ -94,17 +103,6 @@ describe('SettingsComponent', () => { ConfirmButtonComponent, DragDropSelectComponent, ], - imports: [ - NgbModule, - RouterTestingModule.withRoutes(routes), - FormsModule, - ReactiveFormsModule, - NgbAlertModule, - NgSelectModule, - NgxBootstrapIconsModule.pick(allIcons), - NgbModalModule, - DragDropModule, - ], providers: [ CustomDatePipe, DatePipe, diff --git a/src-ui/src/app/components/admin/settings/settings.component.ts b/src-ui/src/app/components/admin/settings/settings.component.ts index a576e6820..9bd044f78 100644 --- a/src-ui/src/app/components/admin/settings/settings.component.ts +++ b/src-ui/src/app/components/admin/settings/settings.component.ts @@ -1,4 +1,4 @@ -import { ViewportScroller } from '@angular/common' +import { AsyncPipe, ViewportScroller } from '@angular/common' import { AfterViewInit, Component, @@ -7,14 +7,22 @@ import { OnDestroy, OnInit, } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' import { ActivatedRoute, Router } from '@angular/router' import { NgbModal, NgbModalRef, NgbNavChangeEvent, + NgbNavModule, + NgbPopoverModule, } from '@ng-bootstrap/ng-bootstrap' import { DirtyComponent, dirtyCheck } from '@ngneat/dirty-check-forms' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { TourService } from 'ngx-ui-tour-ng-bootstrap' import { BehaviorSubject, @@ -32,6 +40,8 @@ import { } from 'src/app/data/system-status' import { GlobalSearchType, SETTINGS_KEYS } from 'src/app/data/ui-settings' import { User } from 'src/app/data/user' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { PermissionAction, @@ -46,6 +56,12 @@ import { } from 'src/app/services/settings.service' import { SystemStatusService } from 'src/app/services/system-status.service' import { Toast, ToastService } from 'src/app/services/toast.service' +import { CheckComponent } from '../../common/input/check/check.component' +import { ColorComponent } from '../../common/input/color/color.component' +import { PermissionsGroupComponent } from '../../common/input/permissions/permissions-group/permissions-group.component' +import { PermissionsUserComponent } from '../../common/input/permissions/permissions-user/permissions-user.component' +import { SelectComponent } from '../../common/input/select/select.component' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' import { SystemStatusDialogComponent } from '../../common/system-status-dialog/system-status-dialog.component' import { ComponentWithPermissions } from '../../with-permissions/with-permissions.component' @@ -66,7 +82,22 @@ const systemDateFormat = { selector: 'pngx-settings', templateUrl: './settings.component.html', styleUrls: ['./settings.component.scss'], - standalone: false, + imports: [ + PageHeaderComponent, + CheckComponent, + ColorComponent, + SelectComponent, + PermissionsGroupComponent, + PermissionsUserComponent, + CustomDatePipe, + IfPermissionsDirective, + AsyncPipe, + FormsModule, + ReactiveFormsModule, + NgbNavModule, + NgbPopoverModule, + NgxBootstrapIconsModule, + ], }) export class SettingsComponent extends ComponentWithPermissions diff --git a/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts b/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts index 4c03b5cab..a0a6f9ea0 100644 --- a/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts +++ b/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts @@ -119,18 +119,16 @@ describe('TasksComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - TasksComponent, - PageHeaderComponent, - IfPermissionsDirective, - CustomDatePipe, - ConfirmDialogComponent, - ], imports: [ NgbModule, RouterTestingModule.withRoutes(routes), NgxBootstrapIconsModule.pick(allIcons), FormsModule, + TasksComponent, + PageHeaderComponent, + IfPermissionsDirective, + CustomDatePipe, + ConfirmDialogComponent, ], providers: [ { diff --git a/src-ui/src/app/components/admin/tasks/tasks.component.ts b/src-ui/src/app/components/admin/tasks/tasks.component.ts index 756e6d662..b1b1f33ee 100644 --- a/src-ui/src/app/components/admin/tasks/tasks.component.ts +++ b/src-ui/src/app/components/admin/tasks/tasks.component.ts @@ -1,6 +1,14 @@ +import { NgTemplateOutlet, SlicePipe } from '@angular/common' import { Component, OnDestroy, OnInit } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { Router } from '@angular/router' -import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { + NgbCollapseModule, + NgbModal, + NgbNavModule, + NgbPopoverModule, +} from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { debounceTime, distinctUntilChanged, @@ -11,8 +19,11 @@ import { timer, } from 'rxjs' import { PaperlessTask } from 'src/app/data/paperless-task' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' import { TasksService } from 'src/app/services/tasks.service' import { ConfirmDialogComponent } from '../../common/confirm-dialog/confirm-dialog.component' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' export enum TaskTab { @@ -36,7 +47,19 @@ const FILTER_TARGETS = [ selector: 'pngx-tasks', templateUrl: './tasks.component.html', styleUrls: ['./tasks.component.scss'], - standalone: false, + imports: [ + PageHeaderComponent, + IfPermissionsDirective, + CustomDatePipe, + SlicePipe, + FormsModule, + ReactiveFormsModule, + NgTemplateOutlet, + NgbCollapseModule, + NgbNavModule, + NgbPopoverModule, + NgxBootstrapIconsModule, + ], }) export class TasksComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/admin/trash/trash.component.spec.ts b/src-ui/src/app/components/admin/trash/trash.component.spec.ts index 91f3287af..aa5a8af0f 100644 --- a/src-ui/src/app/components/admin/trash/trash.component.spec.ts +++ b/src-ui/src/app/components/admin/trash/trash.component.spec.ts @@ -43,12 +43,6 @@ describe('TrashComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ - TrashComponent, - PageHeaderComponent, - ConfirmDialogComponent, - SafeHtmlPipe, - ], imports: [ HttpClientTestingModule, FormsModule, @@ -56,6 +50,10 @@ describe('TrashComponent', () => { NgbPopoverModule, NgbPaginationModule, NgxBootstrapIconsModule.pick(allIcons), + TrashComponent, + PageHeaderComponent, + ConfirmDialogComponent, + SafeHtmlPipe, ], }).compileComponents() diff --git a/src-ui/src/app/components/admin/trash/trash.component.ts b/src-ui/src/app/components/admin/trash/trash.component.ts index d4b2b4b6a..6c60638ad 100644 --- a/src-ui/src/app/components/admin/trash/trash.component.ts +++ b/src-ui/src/app/components/admin/trash/trash.component.ts @@ -1,6 +1,8 @@ import { Component, OnDestroy } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { Router } from '@angular/router' -import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { NgbModal, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { delay, takeUntil, tap } from 'rxjs' import { Document } from 'src/app/data/document' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' @@ -8,13 +10,22 @@ import { SettingsService } from 'src/app/services/settings.service' import { ToastService } from 'src/app/services/toast.service' import { TrashService } from 'src/app/services/trash.service' import { ConfirmDialogComponent } from '../../common/confirm-dialog/confirm-dialog.component' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' +import { PreviewPopupComponent } from '../../common/preview-popup/preview-popup.component' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' @Component({ selector: 'pngx-trash', templateUrl: './trash.component.html', styleUrl: './trash.component.scss', - standalone: false, + imports: [ + PageHeaderComponent, + PreviewPopupComponent, + FormsModule, + ReactiveFormsModule, + NgbPaginationModule, + NgxBootstrapIconsModule, + ], }) export class TrashComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/admin/users-groups/users-groups.component.spec.ts b/src-ui/src/app/components/admin/users-groups/users-groups.component.spec.ts index 0e2a52b65..ab739aa54 100644 --- a/src-ui/src/app/components/admin/users-groups/users-groups.component.spec.ts +++ b/src-ui/src/app/components/admin/users-groups/users-groups.component.spec.ts @@ -7,25 +7,13 @@ import { fakeAsync, tick, } from '@angular/core/testing' -import { FormsModule, ReactiveFormsModule } from '@angular/forms' -import { RouterTestingModule } from '@angular/router/testing' -import { - NgbAlertModule, - NgbModal, - NgbModalRef, - NgbModule, -} from '@ng-bootstrap/ng-bootstrap' -import { NgSelectModule } from '@ng-select/ng-select' +import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { of, throwError } from 'rxjs' -import { routes } from 'src/app/app-routing.module' import { Group } from 'src/app/data/group' import { User } from 'src/app/data/user' -import { IfOwnerDirective } from 'src/app/directives/if-owner.directive' -import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { PermissionsGuard } from 'src/app/guards/permissions.guard' import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' -import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' import { PermissionsService } from 'src/app/services/permissions.service' import { GroupService } from 'src/app/services/rest/group.service' import { UserService } from 'src/app/services/rest/user.service' @@ -34,16 +22,6 @@ import { ToastService } from 'src/app/services/toast.service' import { ConfirmDialogComponent } from '../../common/confirm-dialog/confirm-dialog.component' import { GroupEditDialogComponent } from '../../common/edit-dialog/group-edit-dialog/group-edit-dialog.component' import { UserEditDialogComponent } from '../../common/edit-dialog/user-edit-dialog/user-edit-dialog.component' -import { CheckComponent } from '../../common/input/check/check.component' -import { NumberComponent } from '../../common/input/number/number.component' -import { PasswordComponent } from '../../common/input/password/password.component' -import { PermissionsGroupComponent } from '../../common/input/permissions/permissions-group/permissions-group.component' -import { PermissionsUserComponent } from '../../common/input/permissions/permissions-user/permissions-user.component' -import { SelectComponent } from '../../common/input/select/select.component' -import { TagsComponent } from '../../common/input/tags/tags.component' -import { TextComponent } from '../../common/input/text/text.component' -import { PageHeaderComponent } from '../../common/page-header/page-header.component' -import { SettingsComponent } from '../settings/settings.component' import { UsersAndGroupsComponent } from './users-groups.component' const users = [ @@ -67,33 +45,7 @@ describe('UsersAndGroupsComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [ - UsersAndGroupsComponent, - SettingsComponent, - PageHeaderComponent, - IfPermissionsDirective, - CustomDatePipe, - ConfirmDialogComponent, - CheckComponent, - SafeHtmlPipe, - SelectComponent, - TextComponent, - PasswordComponent, - NumberComponent, - TagsComponent, - PermissionsUserComponent, - PermissionsGroupComponent, - IfOwnerDirective, - ], - imports: [ - NgbModule, - RouterTestingModule.withRoutes(routes), - FormsModule, - ReactiveFormsModule, - NgbAlertModule, - NgSelectModule, - NgxBootstrapIconsModule.pick(allIcons), - ], + imports: [NgxBootstrapIconsModule.pick(allIcons)], providers: [ CustomDatePipe, DatePipe, diff --git a/src-ui/src/app/components/admin/users-groups/users-groups.component.ts b/src-ui/src/app/components/admin/users-groups/users-groups.component.ts index 32ff753ac..41ed58dac 100644 --- a/src-ui/src/app/components/admin/users-groups/users-groups.component.ts +++ b/src-ui/src/app/components/admin/users-groups/users-groups.component.ts @@ -1,8 +1,10 @@ import { Component, OnDestroy, OnInit } from '@angular/core' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { Subject, first, takeUntil } from 'rxjs' import { Group } from 'src/app/data/group' import { User } from 'src/app/data/user' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { PermissionsService } from 'src/app/services/permissions.service' import { GroupService } from 'src/app/services/rest/group.service' import { UserService } from 'src/app/services/rest/user.service' @@ -12,13 +14,18 @@ import { ConfirmDialogComponent } from '../../common/confirm-dialog/confirm-dial import { EditDialogMode } from '../../common/edit-dialog/edit-dialog.component' import { GroupEditDialogComponent } from '../../common/edit-dialog/group-edit-dialog/group-edit-dialog.component' import { UserEditDialogComponent } from '../../common/edit-dialog/user-edit-dialog/user-edit-dialog.component' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' import { ComponentWithPermissions } from '../../with-permissions/with-permissions.component' @Component({ selector: 'pngx-users-groups', templateUrl: './users-groups.component.html', styleUrls: ['./users-groups.component.scss'], - standalone: false, + imports: [ + PageHeaderComponent, + IfPermissionsDirective, + NgxBootstrapIconsModule, + ], }) export class UsersAndGroupsComponent extends ComponentWithPermissions diff --git a/src-ui/src/app/components/app-frame/app-frame.component.spec.ts b/src-ui/src/app/components/app-frame/app-frame.component.spec.ts index d59c68116..f1d54ba70 100644 --- a/src-ui/src/app/components/app-frame/app-frame.component.spec.ts +++ b/src-ui/src/app/components/app-frame/app-frame.component.spec.ts @@ -95,11 +95,6 @@ describe('AppFrameComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - AppFrameComponent, - IfPermissionsDirective, - GlobalSearchComponent, - ], imports: [ BrowserModule, RouterTestingModule.withRoutes(routes), @@ -109,6 +104,9 @@ describe('AppFrameComponent', () => { DragDropModule, NgbModalModule, NgxBootstrapIconsModule.pick(allIcons), + AppFrameComponent, + IfPermissionsDirective, + GlobalSearchComponent, ], providers: [ SettingsService, diff --git a/src-ui/src/app/components/app-frame/app-frame.component.ts b/src-ui/src/app/components/app-frame/app-frame.component.ts index b2dfdd91d..4990beb09 100644 --- a/src-ui/src/app/components/app-frame/app-frame.component.ts +++ b/src-ui/src/app/components/app-frame/app-frame.component.ts @@ -2,17 +2,29 @@ import { CdkDragDrop, CdkDragEnd, CdkDragStart, + DragDropModule, moveItemInArray, } from '@angular/cdk/drag-drop' +import { NgClass } from '@angular/common' import { Component, HostListener, OnInit } from '@angular/core' -import { ActivatedRoute, Router } from '@angular/router' -import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { ActivatedRoute, Router, RouterModule } from '@angular/router' +import { + NgbCollapseModule, + NgbDropdownModule, + NgbModal, + NgbNavModule, + NgbPopoverModule, +} from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' +import { TourNgBootstrapModule } from 'ngx-ui-tour-ng-bootstrap' import { Observable } from 'rxjs' import { first } from 'rxjs/operators' import { Document } from 'src/app/data/document' import { SavedView } from 'src/app/data/saved-view' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { ComponentCanDeactivate } from 'src/app/guards/dirty-doc.guard' +import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe' import { DjangoMessageLevel, DjangoMessagesService, @@ -35,12 +47,26 @@ import { environment } from 'src/environments/environment' import { ProfileEditDialogComponent } from '../common/profile-edit-dialog/profile-edit-dialog.component' import { DocumentDetailComponent } from '../document-detail/document-detail.component' import { ComponentWithPermissions } from '../with-permissions/with-permissions.component' +import { GlobalSearchComponent } from './global-search/global-search.component' @Component({ selector: 'pngx-app-frame', templateUrl: './app-frame.component.html', styleUrls: ['./app-frame.component.scss'], - standalone: false, + imports: [ + GlobalSearchComponent, + DocumentTitlePipe, + IfPermissionsDirective, + RouterModule, + NgClass, + NgbDropdownModule, + NgbPopoverModule, + NgbCollapseModule, + NgbNavModule, + NgxBootstrapIconsModule, + DragDropModule, + TourNgBootstrapModule, + ], }) export class AppFrameComponent extends ComponentWithPermissions diff --git a/src-ui/src/app/components/app-frame/global-search/global-search.component.spec.ts b/src-ui/src/app/components/app-frame/global-search/global-search.component.spec.ts index fa3aaff36..db407c228 100644 --- a/src-ui/src/app/components/app-frame/global-search/global-search.component.spec.ts +++ b/src-ui/src/app/components/app-frame/global-search/global-search.component.spec.ts @@ -138,13 +138,13 @@ describe('GlobalSearchComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [GlobalSearchComponent], imports: [ NgbModalModule, NgbDropdownModule, FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule.pick(allIcons), + GlobalSearchComponent, ], providers: [ provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/app-frame/global-search/global-search.component.ts b/src-ui/src/app/components/app-frame/global-search/global-search.component.ts index 7bb14de52..8ef466d5b 100644 --- a/src-ui/src/app/components/app-frame/global-search/global-search.component.ts +++ b/src-ui/src/app/components/app-frame/global-search/global-search.component.ts @@ -1,3 +1,4 @@ +import { NgTemplateOutlet } from '@angular/common' import { Component, ElementRef, @@ -6,8 +7,15 @@ import { ViewChild, ViewChildren, } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { Router } from '@angular/router' -import { NgbDropdown, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' +import { + NgbDropdown, + NgbDropdownModule, + NgbModal, + NgbModalRef, +} from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { Subject, debounceTime, distinctUntilChanged, filter } from 'rxjs' import { DataType } from 'src/app/data/datatype' import { @@ -20,6 +28,7 @@ import { } from 'src/app/data/filter-rule-type' import { ObjectWithId } from 'src/app/data/object-with-id' import { GlobalSearchType, SETTINGS_KEYS } from 'src/app/data/ui-settings' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { HotKeyService } from 'src/app/services/hot-key.service' import { @@ -50,7 +59,14 @@ import { WorkflowEditDialogComponent } from '../../common/edit-dialog/workflow-e selector: 'pngx-global-search', templateUrl: './global-search.component.html', styleUrl: './global-search.component.scss', - standalone: false, + imports: [ + CustomDatePipe, + FormsModule, + ReactiveFormsModule, + NgxBootstrapIconsModule, + NgbDropdownModule, + NgTemplateOutlet, + ], }) export class GlobalSearchComponent implements OnInit { public DataType = DataType diff --git a/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.spec.ts b/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.spec.ts index 0c55889db..2f45dd902 100644 --- a/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.spec.ts +++ b/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.spec.ts @@ -8,8 +8,10 @@ describe('ClearableBadgeComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ClearableBadgeComponent], - imports: [NgxBootstrapIconsModule.pick(allIcons)], + imports: [ + NgxBootstrapIconsModule.pick(allIcons), + ClearableBadgeComponent, + ], }).compileComponents() fixture = TestBed.createComponent(ClearableBadgeComponent) diff --git a/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.ts b/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.ts index cb297ba6f..51ae812c7 100644 --- a/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.ts +++ b/src-ui/src/app/components/common/clearable-badge/clearable-badge.component.ts @@ -1,10 +1,11 @@ import { Component, EventEmitter, Input, Output } from '@angular/core' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' @Component({ selector: 'pngx-clearable-badge', templateUrl: './clearable-badge.component.html', styleUrls: ['./clearable-badge.component.scss'], - standalone: false, + imports: [NgxBootstrapIconsModule], }) export class ClearableBadgeComponent { constructor() {} diff --git a/src-ui/src/app/components/common/confirm-button/confirm-button.component.spec.ts b/src-ui/src/app/components/common/confirm-button/confirm-button.component.spec.ts index e0974566d..6f9d3819c 100644 --- a/src-ui/src/app/components/common/confirm-button/confirm-button.component.spec.ts +++ b/src-ui/src/app/components/common/confirm-button/confirm-button.component.spec.ts @@ -10,8 +10,11 @@ describe('ConfirmButtonComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ConfirmButtonComponent], - imports: [NgbPopoverModule, NgxBootstrapIconsModule.pick(allIcons)], + imports: [ + NgbPopoverModule, + NgxBootstrapIconsModule.pick(allIcons), + ConfirmButtonComponent, + ], }).compileComponents() fixture = TestBed.createComponent(ConfirmButtonComponent) diff --git a/src-ui/src/app/components/common/confirm-button/confirm-button.component.ts b/src-ui/src/app/components/common/confirm-button/confirm-button.component.ts index db9087f7d..7ed79308b 100644 --- a/src-ui/src/app/components/common/confirm-button/confirm-button.component.ts +++ b/src-ui/src/app/components/common/confirm-button/confirm-button.component.ts @@ -5,13 +5,14 @@ import { Output, ViewChild, } from '@angular/core' -import { NgbPopover } from '@ng-bootstrap/ng-bootstrap' +import { NgbPopover, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' @Component({ selector: 'pngx-confirm-button', templateUrl: './confirm-button.component.html', styleUrl: './confirm-button.component.scss', - standalone: false, + imports: [NgbPopoverModule, NgxBootstrapIconsModule], }) export class ConfirmButtonComponent { @Input() diff --git a/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.spec.ts b/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.spec.ts index cb8c6a356..e0cbd9113 100644 --- a/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.spec.ts @@ -11,9 +11,8 @@ describe('ConfirmDialogComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ConfirmDialogComponent, SafeHtmlPipe], providers: [NgbActiveModal, SafeHtmlPipe], - imports: [], + imports: [ConfirmDialogComponent, SafeHtmlPipe], }).compileComponents() modal = TestBed.inject(NgbActiveModal) diff --git a/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.ts b/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.ts index 02ca3c20e..ce1440048 100644 --- a/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.ts +++ b/src-ui/src/app/components/common/confirm-dialog/confirm-dialog.component.ts @@ -1,13 +1,15 @@ +import { DecimalPipe } from '@angular/common' import { Component, EventEmitter, Input, Output } from '@angular/core' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { Subject } from 'rxjs' +import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' @Component({ selector: 'pngx-confirm-dialog', templateUrl: './confirm-dialog.component.html', styleUrls: ['./confirm-dialog.component.scss'], - standalone: false, + imports: [DecimalPipe, SafeHtmlPipe], }) export class ConfirmDialogComponent extends LoadingComponentWithPermissions { constructor(public activeModal: NgbActiveModal) { diff --git a/src-ui/src/app/components/common/confirm-dialog/delete-pages-confirm-dialog/delete-pages-confirm-dialog.component.spec.ts b/src-ui/src/app/components/common/confirm-dialog/delete-pages-confirm-dialog/delete-pages-confirm-dialog.component.spec.ts index 3545bcf7c..964cc05a7 100644 --- a/src-ui/src/app/components/common/confirm-dialog/delete-pages-confirm-dialog/delete-pages-confirm-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/confirm-dialog/delete-pages-confirm-dialog/delete-pages-confirm-dialog.component.spec.ts @@ -3,7 +3,6 @@ import { provideHttpClientTesting } from '@angular/common/http/testing' import { ComponentFixture, TestBed } from '@angular/core/testing' import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' -import { PdfViewerComponent } from 'ng2-pdf-viewer' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' import { DeletePagesConfirmDialogComponent } from './delete-pages-confirm-dialog.component' @@ -14,11 +13,12 @@ describe('DeletePagesConfirmDialogComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [DeletePagesConfirmDialogComponent, PdfViewerComponent], + declarations: [], imports: [ NgxBootstrapIconsModule.pick(allIcons), FormsModule, ReactiveFormsModule, + DeletePagesConfirmDialogComponent, ], providers: [ NgbActiveModal, diff --git a/src-ui/src/app/components/common/confirm-dialog/delete-pages-confirm-dialog/delete-pages-confirm-dialog.component.ts b/src-ui/src/app/components/common/confirm-dialog/delete-pages-confirm-dialog/delete-pages-confirm-dialog.component.ts index 876228ad7..a73f35aeb 100644 --- a/src-ui/src/app/components/common/confirm-dialog/delete-pages-confirm-dialog/delete-pages-confirm-dialog.component.ts +++ b/src-ui/src/app/components/common/confirm-dialog/delete-pages-confirm-dialog/delete-pages-confirm-dialog.component.ts @@ -1,6 +1,12 @@ import { Component, TemplateRef, ViewChild } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' -import { PDFDocumentProxy, PdfViewerComponent } from 'ng2-pdf-viewer' +import { + PDFDocumentProxy, + PdfViewerComponent, + PdfViewerModule, +} from 'ng2-pdf-viewer' +import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' import { DocumentService } from 'src/app/services/rest/document.service' import { ConfirmDialogComponent } from '../confirm-dialog.component' @@ -8,7 +14,7 @@ import { ConfirmDialogComponent } from '../confirm-dialog.component' selector: 'pngx-delete-pages-confirm-dialog', templateUrl: './delete-pages-confirm-dialog.component.html', styleUrl: './delete-pages-confirm-dialog.component.scss', - standalone: false, + imports: [PdfViewerModule, FormsModule, ReactiveFormsModule, SafeHtmlPipe], }) export class DeletePagesConfirmDialogComponent extends ConfirmDialogComponent { public documentID: number diff --git a/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.spec.ts b/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.spec.ts index 9674e386c..db772c592 100644 --- a/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.spec.ts @@ -15,11 +15,11 @@ describe('MergeConfirmDialogComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [MergeConfirmDialogComponent], imports: [ NgxBootstrapIconsModule.pick(allIcons), ReactiveFormsModule, FormsModule, + MergeConfirmDialogComponent, ], providers: [ NgbActiveModal, diff --git a/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.ts b/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.ts index af897a844..45891fb64 100644 --- a/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.ts +++ b/src-ui/src/app/components/common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component.ts @@ -1,6 +1,8 @@ import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop' import { Component, OnInit } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { takeUntil } from 'rxjs' import { Document } from 'src/app/data/document' import { PermissionsService } from 'src/app/services/permissions.service' @@ -11,7 +13,7 @@ import { ConfirmDialogComponent } from '../confirm-dialog.component' selector: 'pngx-merge-confirm-dialog', templateUrl: './merge-confirm-dialog.component.html', styleUrl: './merge-confirm-dialog.component.scss', - standalone: false, + imports: [FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule], }) export class MergeConfirmDialogComponent extends ConfirmDialogComponent diff --git a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.spec.ts b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.spec.ts index 6c447455d..df5819ac7 100644 --- a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.spec.ts @@ -12,8 +12,11 @@ describe('RotateConfirmDialogComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [RotateConfirmDialogComponent, SafeHtmlPipe], - imports: [NgxBootstrapIconsModule.pick(allIcons)], + imports: [ + NgxBootstrapIconsModule.pick(allIcons), + RotateConfirmDialogComponent, + SafeHtmlPipe, + ], providers: [ NgbActiveModal, SafeHtmlPipe, diff --git a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.ts b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.ts index 55789c24b..3d6844d76 100644 --- a/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.ts +++ b/src-ui/src/app/components/common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component.ts @@ -1,5 +1,8 @@ +import { NgStyle } from '@angular/common' import { Component } from '@angular/core' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' +import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' import { DocumentService } from 'src/app/services/rest/document.service' import { ConfirmDialogComponent } from '../confirm-dialog.component' @@ -7,7 +10,7 @@ import { ConfirmDialogComponent } from '../confirm-dialog.component' selector: 'pngx-rotate-confirm-dialog', templateUrl: './rotate-confirm-dialog.component.html', styleUrl: './rotate-confirm-dialog.component.scss', - standalone: false, + imports: [NgStyle, NgxBootstrapIconsModule, SafeHtmlPipe], }) export class RotateConfirmDialogComponent extends ConfirmDialogComponent { public documentID: number diff --git a/src-ui/src/app/components/common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component.spec.ts b/src-ui/src/app/components/common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component.spec.ts index 2d0135df8..b47101f6e 100644 --- a/src-ui/src/app/components/common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component.spec.ts @@ -17,12 +17,12 @@ describe('SplitConfirmDialogComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [SplitConfirmDialogComponent], imports: [ NgxBootstrapIconsModule.pick(allIcons), ReactiveFormsModule, FormsModule, PdfViewerModule, + SplitConfirmDialogComponent, ], providers: [ NgbActiveModal, diff --git a/src-ui/src/app/components/common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component.ts b/src-ui/src/app/components/common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component.ts index 7901989ec..785f2f3d4 100644 --- a/src-ui/src/app/components/common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component.ts +++ b/src-ui/src/app/components/common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component.ts @@ -1,6 +1,8 @@ import { Component, OnInit } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' -import { PDFDocumentProxy } from 'ng2-pdf-viewer' +import { PDFDocumentProxy, PdfViewerModule } from 'ng2-pdf-viewer' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { Document } from 'src/app/data/document' import { PermissionsService } from 'src/app/services/permissions.service' import { DocumentService } from 'src/app/services/rest/document.service' @@ -10,7 +12,12 @@ import { ConfirmDialogComponent } from '../confirm-dialog.component' selector: 'pngx-split-confirm-dialog', templateUrl: './split-confirm-dialog.component.html', styleUrl: './split-confirm-dialog.component.scss', - standalone: false, + imports: [ + FormsModule, + ReactiveFormsModule, + NgxBootstrapIconsModule, + PdfViewerModule, + ], }) export class SplitConfirmDialogComponent extends ConfirmDialogComponent diff --git a/src-ui/src/app/components/common/custom-field-display/custom-field-display.component.spec.ts b/src-ui/src/app/components/common/custom-field-display/custom-field-display.component.spec.ts index 1ead0a7dd..fca619f5d 100644 --- a/src-ui/src/app/components/common/custom-field-display/custom-field-display.component.spec.ts +++ b/src-ui/src/app/components/common/custom-field-display/custom-field-display.component.spec.ts @@ -49,8 +49,7 @@ describe('CustomFieldDisplayComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [CustomFieldDisplayComponent], - imports: [], + imports: [CustomFieldDisplayComponent], providers: [ DocumentService, provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/common/custom-field-display/custom-field-display.component.ts b/src-ui/src/app/components/common/custom-field-display/custom-field-display.component.ts index 0b32a6909..86913b468 100644 --- a/src-ui/src/app/components/common/custom-field-display/custom-field-display.component.ts +++ b/src-ui/src/app/components/common/custom-field-display/custom-field-display.component.ts @@ -1,9 +1,10 @@ -import { getLocaleCurrencyCode } from '@angular/common' +import { CurrencyPipe, getLocaleCurrencyCode } from '@angular/common' import { Component, Inject, Input, LOCALE_ID, OnInit } from '@angular/core' import { takeUntil } from 'rxjs' import { CustomField, CustomFieldDataType } from 'src/app/data/custom-field' import { DisplayField, Document } from 'src/app/data/document' import { Results } from 'src/app/data/results' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' import { CustomFieldsService } from 'src/app/services/rest/custom-fields.service' import { DocumentService } from 'src/app/services/rest/document.service' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' @@ -12,7 +13,7 @@ import { LoadingComponentWithPermissions } from '../../loading-component/loading selector: 'pngx-custom-field-display', templateUrl: './custom-field-display.component.html', styleUrl: './custom-field-display.component.scss', - standalone: false, + imports: [CustomDatePipe, CurrencyPipe], }) export class CustomFieldDisplayComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.spec.ts b/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.spec.ts index 6ffef8ff8..78df9c74f 100644 --- a/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.spec.ts +++ b/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.spec.ts @@ -19,6 +19,7 @@ import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { of } from 'rxjs' import { CustomField, CustomFieldDataType } from 'src/app/data/custom-field' import { CustomFieldsService } from 'src/app/services/rest/custom-fields.service' +import { SettingsService } from 'src/app/services/settings.service' import { ToastService } from 'src/app/services/toast.service' import { CustomFieldEditDialogComponent } from '../edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component' import { SelectComponent } from '../input/select/select.component' @@ -43,10 +44,10 @@ describe('CustomFieldsDropdownComponent', () => { let customFieldService: CustomFieldsService let toastService: ToastService let modalService: NgbModal + let settingsService: SettingsService beforeEach(() => { TestBed.configureTestingModule({ - declarations: [CustomFieldsDropdownComponent, SelectComponent], imports: [ NgSelectModule, FormsModule, @@ -54,6 +55,8 @@ describe('CustomFieldsDropdownComponent', () => { NgbModalModule, NgbDropdownModule, NgxBootstrapIconsModule.pick(allIcons), + CustomFieldsDropdownComponent, + SelectComponent, ], providers: [ provideHttpClient(withInterceptorsFromDi()), @@ -70,6 +73,8 @@ describe('CustomFieldsDropdownComponent', () => { results: fields.concat([]), }) ) + settingsService = TestBed.inject(SettingsService) + settingsService.currentUser = { id: 1, username: 'test' } fixture = TestBed.createComponent(CustomFieldsDropdownComponent) component = fixture.componentInstance fixture.detectChanges() diff --git a/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts b/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts index 965a69e7a..9e211edd0 100644 --- a/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts +++ b/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts @@ -8,7 +8,9 @@ import { ViewChild, ViewChildren, } from '@angular/core' -import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { NgbDropdownModule, NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { first, takeUntil } from 'rxjs' import { CustomField, DATA_TYPE_LABELS } from 'src/app/data/custom-field' import { CustomFieldInstance } from 'src/app/data/custom-field-instance' @@ -26,7 +28,12 @@ import { CustomFieldEditDialogComponent } from '../edit-dialog/custom-field-edit selector: 'pngx-custom-fields-dropdown', templateUrl: './custom-fields-dropdown.component.html', styleUrls: ['./custom-fields-dropdown.component.scss'], - standalone: false, + imports: [ + NgbDropdownModule, + NgxBootstrapIconsModule, + FormsModule, + ReactiveFormsModule, + ], }) export class CustomFieldsDropdownComponent extends LoadingComponentWithPermissions { @Input() diff --git a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html index 768a79af5..2f119b074 100644 --- a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html +++ b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.html @@ -67,7 +67,9 @@ (mousedown)="$event.stopImmediatePropagation()" > @switch (atom.operator) { @case (CustomFieldQueryOperator.Exists) { diff --git a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.spec.ts b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.spec.ts index 1ec277bc4..7afb5fc1c 100644 --- a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.spec.ts +++ b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.spec.ts @@ -55,13 +55,13 @@ describe('CustomFieldsQueryDropdownComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [CustomFieldsQueryDropdownComponent], imports: [ NgbDropdownModule, NgxBootstrapIconsModule.pick(allIcons), NgSelectModule, FormsModule, ReactiveFormsModule, + CustomFieldsQueryDropdownComponent, ], providers: [ provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.ts b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.ts index 65b66f37d..d6ae95604 100644 --- a/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.ts +++ b/src-ui/src/app/components/common/custom-fields-query-dropdown/custom-fields-query-dropdown.component.ts @@ -1,3 +1,4 @@ +import { NgTemplateOutlet } from '@angular/common' import { Component, EventEmitter, @@ -7,8 +8,10 @@ import { ViewChild, ViewChildren, } from '@angular/core' -import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' -import { NgSelectComponent } from '@ng-select/ng-select' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { NgbDropdown, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap' +import { NgSelectComponent, NgSelectModule } from '@ng-select/ng-select' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { first, Subject, takeUntil } from 'rxjs' import { CustomField, CustomFieldDataType } from 'src/app/data/custom-field' import { @@ -29,6 +32,7 @@ import { } from 'src/app/utils/custom-field-query-element' import { popperOptionsReenablePreventOverflow } from 'src/app/utils/popper-options' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' +import { ClearableBadgeComponent } from '../clearable-badge/clearable-badge.component' export class CustomFieldQueriesModel { public queries: CustomFieldQueryElement[] = [] @@ -156,7 +160,15 @@ export class CustomFieldQueriesModel { selector: 'pngx-custom-fields-query-dropdown', templateUrl: './custom-fields-query-dropdown.component.html', styleUrls: ['./custom-fields-query-dropdown.component.scss'], - standalone: false, + imports: [ + ClearableBadgeComponent, + FormsModule, + ReactiveFormsModule, + NgTemplateOutlet, + NgSelectModule, + NgxBootstrapIconsModule, + NgbDropdownModule, + ], }) export class CustomFieldsQueryDropdownComponent extends LoadingComponentWithPermissions { public CustomFieldQueryComponentType = CustomFieldQueryElementType diff --git a/src-ui/src/app/components/common/dates-dropdown/dates-dropdown.component.spec.ts b/src-ui/src/app/components/common/dates-dropdown/dates-dropdown.component.spec.ts index 91b0c71e5..10762264a 100644 --- a/src-ui/src/app/components/common/dates-dropdown/dates-dropdown.component.spec.ts +++ b/src-ui/src/app/components/common/dates-dropdown/dates-dropdown.component.spec.ts @@ -27,16 +27,14 @@ describe('DatesDropdownComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - DatesDropdownComponent, - ClearableBadgeComponent, - CustomDatePipe, - ], imports: [ NgbModule, FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule.pick(allIcons), + DatesDropdownComponent, + ClearableBadgeComponent, + CustomDatePipe, ], providers: [ SettingsService, diff --git a/src-ui/src/app/components/common/dates-dropdown/dates-dropdown.component.ts b/src-ui/src/app/components/common/dates-dropdown/dates-dropdown.component.ts index e5bb3435a..356ba510a 100644 --- a/src-ui/src/app/components/common/dates-dropdown/dates-dropdown.component.ts +++ b/src-ui/src/app/components/common/dates-dropdown/dates-dropdown.component.ts @@ -1,3 +1,4 @@ +import { NgClass } from '@angular/common' import { Component, EventEmitter, @@ -6,12 +7,20 @@ import { OnInit, Output, } from '@angular/core' -import { NgbDateAdapter } from '@ng-bootstrap/ng-bootstrap' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { + NgbDateAdapter, + NgbDatepickerModule, + NgbDropdownModule, +} from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { Subject, Subscription } from 'rxjs' import { debounceTime } from 'rxjs/operators' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' import { SettingsService } from 'src/app/services/settings.service' import { ISODateAdapter } from 'src/app/utils/ngb-iso-date-adapter' import { popperOptionsReenablePreventOverflow } from 'src/app/utils/popper-options' +import { ClearableBadgeComponent } from '../clearable-badge/clearable-badge.component' export interface DateSelection { createdBefore?: string @@ -34,7 +43,16 @@ export enum RelativeDate { templateUrl: './dates-dropdown.component.html', styleUrls: ['./dates-dropdown.component.scss'], providers: [{ provide: NgbDateAdapter, useClass: ISODateAdapter }], - standalone: false, + imports: [ + ClearableBadgeComponent, + CustomDatePipe, + NgxBootstrapIconsModule, + NgbDatepickerModule, + NgbDropdownModule, + FormsModule, + ReactiveFormsModule, + NgClass, + ], }) export class DatesDropdownComponent implements OnInit, OnDestroy { public popperOptions = popperOptionsReenablePreventOverflow diff --git a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.spec.ts index 78ddb96c5..467aabc4f 100644 --- a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.spec.ts @@ -20,7 +20,11 @@ describe('CorrespondentEditDialogComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + FormsModule, + ReactiveFormsModule, + NgSelectModule, + NgbModule, CorrespondentEditDialogComponent, IfPermissionsDirective, IfOwnerDirective, @@ -28,7 +32,6 @@ describe('CorrespondentEditDialogComponent', () => { TextComponent, PermissionsFormComponent, ], - imports: [FormsModule, ReactiveFormsModule, NgSelectModule, NgbModule], providers: [ NgbActiveModal, provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts index a04c2c654..37ac4ff65 100644 --- a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts @@ -1,18 +1,34 @@ import { Component } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component' import { Correspondent } from 'src/app/data/correspondent' import { DEFAULT_MATCHING_ALGORITHM } from 'src/app/data/matching-model' +import { IfOwnerDirective } from 'src/app/directives/if-owner.directive' import { CorrespondentService } from 'src/app/services/rest/correspondent.service' import { UserService } from 'src/app/services/rest/user.service' import { SettingsService } from 'src/app/services/settings.service' +import { PermissionsFormComponent } from '../../input/permissions/permissions-form/permissions-form.component' +import { SelectComponent } from '../../input/select/select.component' +import { TextComponent } from '../../input/text/text.component' @Component({ selector: 'pngx-correspondent-edit-dialog', templateUrl: './correspondent-edit-dialog.component.html', styleUrls: ['./correspondent-edit-dialog.component.scss'], - standalone: false, + imports: [ + SelectComponent, + PermissionsFormComponent, + TextComponent, + IfOwnerDirective, + FormsModule, + ReactiveFormsModule, + ], }) export class CorrespondentEditDialogComponent extends EditDialogComponent { constructor( diff --git a/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.spec.ts index 75f8e0bfe..62a0954a1 100644 --- a/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.spec.ts @@ -24,20 +24,18 @@ describe('CustomFieldEditDialogComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [ - CustomFieldEditDialogComponent, - IfPermissionsDirective, - IfOwnerDirective, - SelectComponent, - TextComponent, - SafeHtmlPipe, - ], imports: [ FormsModule, ReactiveFormsModule, NgSelectModule, NgbModule, NgxBootstrapIconsModule.pick(allIcons), + CustomFieldEditDialogComponent, + IfPermissionsDirective, + IfOwnerDirective, + SelectComponent, + TextComponent, + SafeHtmlPipe, ], providers: [ NgbActiveModal, diff --git a/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.ts index 1b0cbb6e5..384bf7b68 100644 --- a/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component.ts @@ -6,8 +6,15 @@ import { QueryList, ViewChildren, } from '@angular/core' -import { FormArray, FormControl, FormGroup } from '@angular/forms' +import { + FormArray, + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { takeUntil } from 'rxjs' import { CustomField, @@ -17,13 +24,21 @@ import { import { CustomFieldsService } from 'src/app/services/rest/custom-fields.service' import { UserService } from 'src/app/services/rest/user.service' import { SettingsService } from 'src/app/services/settings.service' +import { SelectComponent } from '../../input/select/select.component' +import { TextComponent } from '../../input/text/text.component' import { EditDialogComponent, EditDialogMode } from '../edit-dialog.component' @Component({ selector: 'pngx-custom-field-edit-dialog', templateUrl: './custom-field-edit-dialog.component.html', styleUrls: ['./custom-field-edit-dialog.component.scss'], - standalone: false, + imports: [ + SelectComponent, + TextComponent, + FormsModule, + ReactiveFormsModule, + NgxBootstrapIconsModule, + ], }) export class CustomFieldEditDialogComponent extends EditDialogComponent diff --git a/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.spec.ts index e71e20136..c3c46c980 100644 --- a/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.spec.ts @@ -20,7 +20,11 @@ describe('DocumentTypeEditDialogComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + FormsModule, + ReactiveFormsModule, + NgSelectModule, + NgbModule, DocumentTypeEditDialogComponent, IfPermissionsDirective, IfOwnerDirective, @@ -28,7 +32,6 @@ describe('DocumentTypeEditDialogComponent', () => { TextComponent, PermissionsFormComponent, ], - imports: [FormsModule, ReactiveFormsModule, NgSelectModule, NgbModule], providers: [ NgbActiveModal, provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts index c2da981f0..48c347068 100644 --- a/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts @@ -1,18 +1,34 @@ import { Component } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component' import { DocumentType } from 'src/app/data/document-type' import { DEFAULT_MATCHING_ALGORITHM } from 'src/app/data/matching-model' +import { IfOwnerDirective } from 'src/app/directives/if-owner.directive' import { DocumentTypeService } from 'src/app/services/rest/document-type.service' import { UserService } from 'src/app/services/rest/user.service' import { SettingsService } from 'src/app/services/settings.service' +import { PermissionsFormComponent } from '../../input/permissions/permissions-form/permissions-form.component' +import { SelectComponent } from '../../input/select/select.component' +import { TextComponent } from '../../input/text/text.component' @Component({ selector: 'pngx-document-type-edit-dialog', templateUrl: './document-type-edit-dialog.component.html', styleUrls: ['./document-type-edit-dialog.component.scss'], - standalone: false, + imports: [ + SelectComponent, + PermissionsFormComponent, + TextComponent, + IfOwnerDirective, + FormsModule, + ReactiveFormsModule, + ], }) export class DocumentTypeEditDialogComponent extends EditDialogComponent { constructor( diff --git a/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.spec.ts index 655d52122..d16a22f31 100644 --- a/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/edit-dialog/edit-dialog.component.spec.ts @@ -38,7 +38,7 @@ import { EditDialogComponent, EditDialogMode } from './edit-dialog.component' `, - standalone: false, + imports: [FormsModule, ReactiveFormsModule], }) class TestComponent extends EditDialogComponent { constructor( @@ -97,8 +97,7 @@ describe('EditDialogComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [TestComponent], - imports: [FormsModule, ReactiveFormsModule], + imports: [FormsModule, ReactiveFormsModule, TestComponent], providers: [ NgbActiveModal, { diff --git a/src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.spec.ts index 22abf083d..88e989942 100644 --- a/src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.spec.ts @@ -22,7 +22,12 @@ describe('GroupEditDialogComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + FormsModule, + ReactiveFormsModule, + NgSelectModule, + NgbModule, + NgxBootstrapIconsModule.pick(allIcons), GroupEditDialogComponent, IfPermissionsDirective, IfOwnerDirective, @@ -31,13 +36,6 @@ describe('GroupEditDialogComponent', () => { PermissionsFormComponent, PermissionsSelectComponent, ], - imports: [ - FormsModule, - ReactiveFormsModule, - NgSelectModule, - NgbModule, - NgxBootstrapIconsModule.pick(allIcons), - ], providers: [ NgbActiveModal, provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.ts index c06fde464..07e696d58 100644 --- a/src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.ts @@ -1,17 +1,29 @@ import { Component } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component' import { Group } from 'src/app/data/group' import { GroupService } from 'src/app/services/rest/group.service' import { UserService } from 'src/app/services/rest/user.service' import { SettingsService } from 'src/app/services/settings.service' +import { TextComponent } from '../../input/text/text.component' +import { PermissionsSelectComponent } from '../../permissions-select/permissions-select.component' @Component({ selector: 'pngx-group-edit-dialog', templateUrl: './group-edit-dialog.component.html', styleUrls: ['./group-edit-dialog.component.scss'], - standalone: false, + imports: [ + PermissionsSelectComponent, + TextComponent, + FormsModule, + ReactiveFormsModule, + ], }) export class GroupEditDialogComponent extends EditDialogComponent { constructor( diff --git a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.spec.ts index 01949d460..bdb5863a7 100644 --- a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.spec.ts @@ -33,7 +33,11 @@ describe('MailAccountEditDialogComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + FormsModule, + ReactiveFormsModule, + NgSelectModule, + NgbModule, MailAccountEditDialogComponent, IfPermissionsDirective, IfOwnerDirective, @@ -43,7 +47,6 @@ describe('MailAccountEditDialogComponent', () => { PermissionsFormComponent, PasswordComponent, ], - imports: [FormsModule, ReactiveFormsModule, NgSelectModule, NgbModule], providers: [ NgbActiveModal, provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts index c319bb842..a165a0c13 100644 --- a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts @@ -1,11 +1,24 @@ import { Component, ViewChild } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' -import { NgbActiveModal, NgbAlert } from '@ng-bootstrap/ng-bootstrap' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' +import { + NgbActiveModal, + NgbAlert, + NgbAlertModule, +} from '@ng-bootstrap/ng-bootstrap' import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component' import { IMAPSecurity, MailAccount } from 'src/app/data/mail-account' import { MailAccountService } from 'src/app/services/rest/mail-account.service' import { UserService } from 'src/app/services/rest/user.service' import { SettingsService } from 'src/app/services/settings.service' +import { CheckComponent } from '../../input/check/check.component' +import { PasswordComponent } from '../../input/password/password.component' +import { SelectComponent } from '../../input/select/select.component' +import { TextComponent } from '../../input/text/text.component' const IMAP_SECURITY_OPTIONS = [ { id: IMAPSecurity.None, name: $localize`No encryption` }, @@ -17,7 +30,15 @@ const IMAP_SECURITY_OPTIONS = [ selector: 'pngx-mail-account-edit-dialog', templateUrl: './mail-account-edit-dialog.component.html', styleUrls: ['./mail-account-edit-dialog.component.scss'], - standalone: false, + imports: [ + TextComponent, + CheckComponent, + PasswordComponent, + SelectComponent, + FormsModule, + ReactiveFormsModule, + NgbAlertModule, + ], }) export class MailAccountEditDialogComponent extends EditDialogComponent { testActive: boolean = false diff --git a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.spec.ts index 312224415..d808caf0c 100644 --- a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.spec.ts @@ -33,7 +33,11 @@ describe('MailRuleEditDialogComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + FormsModule, + ReactiveFormsModule, + NgSelectModule, + NgbModule, MailRuleEditDialogComponent, IfPermissionsDirective, IfOwnerDirective, @@ -46,7 +50,6 @@ describe('MailRuleEditDialogComponent', () => { CheckComponent, SwitchComponent, ], - imports: [FormsModule, ReactiveFormsModule, NgSelectModule, NgbModule], providers: [ NgbActiveModal, { diff --git a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts index 67eeec7a3..1e1116620 100644 --- a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts @@ -1,5 +1,10 @@ import { Component } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { first } from 'rxjs' import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component' @@ -20,6 +25,12 @@ import { MailAccountService } from 'src/app/services/rest/mail-account.service' import { MailRuleService } from 'src/app/services/rest/mail-rule.service' import { UserService } from 'src/app/services/rest/user.service' import { SettingsService } from 'src/app/services/settings.service' +import { CheckComponent } from '../../input/check/check.component' +import { NumberComponent } from '../../input/number/number.component' +import { SelectComponent } from '../../input/select/select.component' +import { SwitchComponent } from '../../input/switch/switch.component' +import { TagsComponent } from '../../input/tags/tags.component' +import { TextComponent } from '../../input/text/text.component' const ATTACHMENT_TYPE_OPTIONS = [ { @@ -108,7 +119,16 @@ const METADATA_CORRESPONDENT_OPTIONS = [ selector: 'pngx-mail-rule-edit-dialog', templateUrl: './mail-rule-edit-dialog.component.html', styleUrls: ['./mail-rule-edit-dialog.component.scss'], - standalone: false, + imports: [ + SelectComponent, + TagsComponent, + CheckComponent, + TextComponent, + NumberComponent, + SwitchComponent, + FormsModule, + ReactiveFormsModule, + ], }) export class MailRuleEditDialogComponent extends EditDialogComponent { accounts: MailAccount[] diff --git a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.spec.ts index 76d1162f1..89e7b1fee 100644 --- a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.spec.ts @@ -1,26 +1,13 @@ import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http' import { provideHttpClientTesting } from '@angular/common/http/testing' import { ComponentFixture, TestBed } from '@angular/core/testing' -import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { By } from '@angular/platform-browser' -import { - NgbAccordionButton, - NgbActiveModal, - NgbModule, -} from '@ng-bootstrap/ng-bootstrap' -import { NgSelectModule } from '@ng-select/ng-select' +import { NgbAccordionButton, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { of, throwError } from 'rxjs' import { FILTER_TITLE } from 'src/app/data/filter-rule-type' -import { IfOwnerDirective } from 'src/app/directives/if-owner.directive' -import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' -import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' import { DocumentService } from 'src/app/services/rest/document.service' import { StoragePathService } from 'src/app/services/rest/storage-path.service' import { SettingsService } from 'src/app/services/settings.service' -import { PermissionsFormComponent } from '../../input/permissions/permissions-form/permissions-form.component' -import { SelectComponent } from '../../input/select/select.component' -import { TextComponent } from '../../input/text/text.component' -import { TextAreaComponent } from '../../input/textarea/textarea.component' import { EditDialogMode } from '../edit-dialog.component' import { StoragePathEditDialogComponent } from './storage-path-edit-dialog.component' @@ -32,17 +19,7 @@ describe('StoragePathEditDialogComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - StoragePathEditDialogComponent, - IfPermissionsDirective, - IfOwnerDirective, - SelectComponent, - TextComponent, - TextAreaComponent, - PermissionsFormComponent, - SafeHtmlPipe, - ], - imports: [FormsModule, ReactiveFormsModule, NgSelectModule, NgbModule], + imports: [], providers: [ NgbActiveModal, provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts index 16de808f5..1699e5324 100644 --- a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts @@ -1,6 +1,13 @@ +import { AsyncPipe, NgTemplateOutlet } from '@angular/common' import { Component, OnDestroy } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' +import { NgbAccordionModule, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' +import { NgSelectComponent } from '@ng-select/ng-select' import { Observable, Subject, @@ -19,16 +26,35 @@ import { Document } from 'src/app/data/document' import { FILTER_TITLE } from 'src/app/data/filter-rule-type' import { DEFAULT_MATCHING_ALGORITHM } from 'src/app/data/matching-model' import { StoragePath } from 'src/app/data/storage-path' +import { IfOwnerDirective } from 'src/app/directives/if-owner.directive' import { DocumentService } from 'src/app/services/rest/document.service' import { StoragePathService } from 'src/app/services/rest/storage-path.service' import { UserService } from 'src/app/services/rest/user.service' import { SettingsService } from 'src/app/services/settings.service' +import { CheckComponent } from '../../input/check/check.component' +import { PermissionsFormComponent } from '../../input/permissions/permissions-form/permissions-form.component' +import { SelectComponent } from '../../input/select/select.component' +import { TextComponent } from '../../input/text/text.component' +import { TextAreaComponent } from '../../input/textarea/textarea.component' @Component({ selector: 'pngx-storage-path-edit-dialog', templateUrl: './storage-path-edit-dialog.component.html', styleUrls: ['./storage-path-edit-dialog.component.scss'], - standalone: false, + imports: [ + SelectComponent, + TextAreaComponent, + TextComponent, + CheckComponent, + PermissionsFormComponent, + IfOwnerDirective, + AsyncPipe, + NgTemplateOutlet, + FormsModule, + ReactiveFormsModule, + NgbAccordionModule, + NgSelectComponent, + ], }) export class StoragePathEditDialogComponent extends EditDialogComponent diff --git a/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.spec.ts index 67aff08c6..16fb7a9f3 100644 --- a/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.spec.ts @@ -23,7 +23,12 @@ describe('TagEditDialogComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + FormsModule, + ReactiveFormsModule, + NgSelectModule, + NgbModule, + NgxBootstrapIconsModule.pick(allIcons), TagEditDialogComponent, IfPermissionsDirective, IfOwnerDirective, @@ -33,13 +38,6 @@ describe('TagEditDialogComponent', () => { ColorComponent, CheckComponent, ], - imports: [ - FormsModule, - ReactiveFormsModule, - NgSelectModule, - NgbModule, - NgxBootstrapIconsModule.pick(allIcons), - ], providers: [ NgbActiveModal, SettingsService, diff --git a/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts index 8fdc58fc8..63a99e2f2 100644 --- a/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts @@ -1,19 +1,39 @@ import { Component } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component' import { DEFAULT_MATCHING_ALGORITHM } from 'src/app/data/matching-model' import { Tag } from 'src/app/data/tag' +import { IfOwnerDirective } from 'src/app/directives/if-owner.directive' import { TagService } from 'src/app/services/rest/tag.service' import { UserService } from 'src/app/services/rest/user.service' import { SettingsService } from 'src/app/services/settings.service' import { randomColor } from 'src/app/utils/color' +import { CheckComponent } from '../../input/check/check.component' +import { ColorComponent } from '../../input/color/color.component' +import { PermissionsFormComponent } from '../../input/permissions/permissions-form/permissions-form.component' +import { SelectComponent } from '../../input/select/select.component' +import { TextComponent } from '../../input/text/text.component' @Component({ selector: 'pngx-tag-edit-dialog', templateUrl: './tag-edit-dialog.component.html', styleUrls: ['./tag-edit-dialog.component.scss'], - standalone: false, + imports: [ + SelectComponent, + CheckComponent, + ColorComponent, + TextComponent, + IfOwnerDirective, + PermissionsFormComponent, + FormsModule, + ReactiveFormsModule, + ], }) export class TagEditDialogComponent extends EditDialogComponent { constructor( diff --git a/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.spec.ts index 4b15f50cc..560a259f4 100644 --- a/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.spec.ts @@ -34,7 +34,12 @@ describe('UserEditDialogComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + FormsModule, + ReactiveFormsModule, + NgSelectModule, + NgbModule, + NgxBootstrapIconsModule.pick(allIcons), UserEditDialogComponent, IfPermissionsDirective, IfOwnerDirective, @@ -44,13 +49,6 @@ describe('UserEditDialogComponent', () => { PermissionsFormComponent, PermissionsSelectComponent, ], - imports: [ - FormsModule, - ReactiveFormsModule, - NgSelectModule, - NgbModule, - NgxBootstrapIconsModule.pick(allIcons), - ], providers: [ NgbActiveModal, { diff --git a/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts index 5a380821c..819d075b5 100644 --- a/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/user-edit-dialog/user-edit-dialog.component.ts @@ -1,5 +1,10 @@ import { Component, OnInit } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { first } from 'rxjs' import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component' @@ -10,12 +15,23 @@ import { GroupService } from 'src/app/services/rest/group.service' import { UserService } from 'src/app/services/rest/user.service' import { SettingsService } from 'src/app/services/settings.service' import { ToastService } from 'src/app/services/toast.service' +import { PasswordComponent } from '../../input/password/password.component' +import { SelectComponent } from '../../input/select/select.component' +import { TextComponent } from '../../input/text/text.component' +import { PermissionsSelectComponent } from '../../permissions-select/permissions-select.component' @Component({ selector: 'pngx-user-edit-dialog', templateUrl: './user-edit-dialog.component.html', styleUrls: ['./user-edit-dialog.component.scss'], - standalone: false, + imports: [ + PermissionsSelectComponent, + SelectComponent, + TextComponent, + PasswordComponent, + FormsModule, + ReactiveFormsModule, + ], }) export class UserEditDialogComponent extends EditDialogComponent diff --git a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.spec.ts index b790ab736..24af7916d 100644 --- a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.spec.ts @@ -77,7 +77,11 @@ describe('WorkflowEditDialogComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + FormsModule, + ReactiveFormsModule, + NgSelectModule, + NgbModule, WorkflowEditDialogComponent, IfPermissionsDirective, IfOwnerDirective, @@ -91,7 +95,6 @@ describe('WorkflowEditDialogComponent', () => { SafeHtmlPipe, ConfirmButtonComponent, ], - imports: [FormsModule, ReactiveFormsModule, NgSelectModule, NgbModule], providers: [ NgbActiveModal, { diff --git a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts index 80a12295a..629042661 100644 --- a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts @@ -1,7 +1,18 @@ -import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop' +import { + CdkDragDrop, + DragDropModule, + moveItemInArray, +} from '@angular/cdk/drag-drop' +import { NgTemplateOutlet } from '@angular/common' import { Component, OnInit } from '@angular/core' -import { FormArray, FormControl, FormGroup } from '@angular/forms' -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' +import { + FormArray, + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' +import { NgbAccordionModule, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { first } from 'rxjs' import { Correspondent } from 'src/app/data/correspondent' import { CustomField, CustomFieldDataType } from 'src/app/data/custom-field' @@ -33,6 +44,15 @@ import { StoragePathService } from 'src/app/services/rest/storage-path.service' import { UserService } from 'src/app/services/rest/user.service' import { WorkflowService } from 'src/app/services/rest/workflow.service' import { SettingsService } from 'src/app/services/settings.service' +import { ConfirmButtonComponent } from '../../confirm-button/confirm-button.component' +import { NumberComponent } from '../../input/number/number.component' +import { PermissionsGroupComponent } from '../../input/permissions/permissions-group/permissions-group.component' +import { PermissionsUserComponent } from '../../input/permissions/permissions-user/permissions-user.component' +import { SelectComponent } from '../../input/select/select.component' +import { SwitchComponent } from '../../input/switch/switch.component' +import { TagsComponent } from '../../input/tags/tags.component' +import { TextComponent } from '../../input/text/text.component' +import { TextAreaComponent } from '../../input/textarea/textarea.component' import { EditDialogComponent } from '../edit-dialog.component' export const DOCUMENT_SOURCE_OPTIONS = [ @@ -115,7 +135,22 @@ const TRIGGER_MATCHING_ALGORITHMS = MATCHING_ALGORITHMS.filter( selector: 'pngx-workflow-edit-dialog', templateUrl: './workflow-edit-dialog.component.html', styleUrls: ['./workflow-edit-dialog.component.scss'], - standalone: false, + imports: [ + SwitchComponent, + NumberComponent, + TextComponent, + SelectComponent, + TextAreaComponent, + TagsComponent, + PermissionsGroupComponent, + PermissionsUserComponent, + ConfirmButtonComponent, + FormsModule, + ReactiveFormsModule, + NgbAccordionModule, + NgTemplateOutlet, + DragDropModule, + ], }) export class WorkflowEditDialogComponent extends EditDialogComponent diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.spec.ts b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.spec.ts index 6746b60b0..245d34830 100644 --- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.spec.ts +++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.spec.ts @@ -4,8 +4,6 @@ import { fakeAsync, tick, } from '@angular/core/testing' -import { FormsModule, ReactiveFormsModule } from '@angular/forms' -import { NgbModule } from '@ng-bootstrap/ng-bootstrap' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { DEFAULT_MATCHING_ALGORITHM, @@ -14,8 +12,6 @@ import { import { Tag } from 'src/app/data/tag' import { FilterPipe } from 'src/app/pipes/filter.pipe' import { HotKeyService } from 'src/app/services/hot-key.service' -import { ClearableBadgeComponent } from '../clearable-badge/clearable-badge.component' -import { TagComponent } from '../tag/tag.component' import { ChangedItems, FilterableDropdownComponent, @@ -23,10 +19,7 @@ import { Intersection, LogicalOperator, } from './filterable-dropdown.component' -import { - ToggleableDropdownButtonComponent, - ToggleableItemState, -} from './toggleable-dropdown-button/toggleable-dropdown-button.component' +import { ToggleableItemState } from './toggleable-dropdown-button/toggleable-dropdown-button.component' const items: Tag[] = [ { @@ -58,20 +51,8 @@ describe('FilterableDropdownComponent & FilterableDropdownSelectionModel', () => beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - FilterableDropdownComponent, - FilterPipe, - ToggleableDropdownButtonComponent, - TagComponent, - ClearableBadgeComponent, - ], providers: [FilterPipe], - imports: [ - NgbModule, - FormsModule, - ReactiveFormsModule, - NgxBootstrapIconsModule.pick(allIcons), - ], + imports: [NgxBootstrapIconsModule.pick(allIcons)], }).compileComponents() hotkeyService = TestBed.inject(HotKeyService) diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts index 95ca9d328..3f8ee0dc3 100644 --- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts +++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts @@ -1,3 +1,4 @@ +import { NgClass } from '@angular/common' import { Component, ElementRef, @@ -7,7 +8,9 @@ import { Output, ViewChild, } from '@angular/core' -import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { NgbDropdown, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { Subject, filter, takeUntil } from 'rxjs' import { MatchingModel } from 'src/app/data/matching-model' import { ObjectWithPermissions } from 'src/app/data/object-with-permissions' @@ -16,7 +19,11 @@ import { HotKeyService } from 'src/app/services/hot-key.service' import { SelectionDataItem } from 'src/app/services/rest/document.service' import { popperOptionsReenablePreventOverflow } from 'src/app/utils/popper-options' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' -import { ToggleableItemState } from './toggleable-dropdown-button/toggleable-dropdown-button.component' +import { ClearableBadgeComponent } from '../clearable-badge/clearable-badge.component' +import { + ToggleableDropdownButtonComponent, + ToggleableItemState, +} from './toggleable-dropdown-button/toggleable-dropdown-button.component' export interface ChangedItems { itemsToAdd: MatchingModel[] @@ -352,7 +359,16 @@ export class FilterableDropdownSelectionModel { selector: 'pngx-filterable-dropdown', templateUrl: './filterable-dropdown.component.html', styleUrls: ['./filterable-dropdown.component.scss'], - standalone: false, + imports: [ + ClearableBadgeComponent, + ToggleableDropdownButtonComponent, + FilterPipe, + FormsModule, + ReactiveFormsModule, + NgxBootstrapIconsModule, + NgbDropdownModule, + NgClass, + ], }) export class FilterableDropdownComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component.spec.ts b/src-ui/src/app/components/common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component.spec.ts index ca5d46365..9e1f3d147 100644 --- a/src-ui/src/app/components/common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component.spec.ts +++ b/src-ui/src/app/components/common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component.spec.ts @@ -12,9 +12,8 @@ describe('ToggleableDropdownButtonComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ToggleableDropdownButtonComponent, TagComponent], providers: [], - imports: [], + imports: [ToggleableDropdownButtonComponent, TagComponent], }).compileComponents() fixture = TestBed.createComponent(ToggleableDropdownButtonComponent) diff --git a/src-ui/src/app/components/common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component.ts b/src-ui/src/app/components/common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component.ts index 796f67be6..6c3bc3c9d 100644 --- a/src-ui/src/app/components/common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component.ts +++ b/src-ui/src/app/components/common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component.ts @@ -1,5 +1,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { MatchingModel } from 'src/app/data/matching-model' +import { TagComponent } from '../../tag/tag.component' export enum ToggleableItemState { NotSelected = 0, @@ -12,7 +14,7 @@ export enum ToggleableItemState { selector: 'pngx-toggleable-dropdown-button', templateUrl: './toggleable-dropdown-button.component.html', styleUrls: ['./toggleable-dropdown-button.component.scss'], - standalone: false, + imports: [TagComponent, NgxBootstrapIconsModule], }) export class ToggleableDropdownButtonComponent { @Input() diff --git a/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.spec.ts b/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.spec.ts index e96f9d3f1..c0b133c93 100644 --- a/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.spec.ts @@ -9,7 +9,7 @@ describe('HotkeyDialogComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [HotkeyDialogComponent], + imports: [HotkeyDialogComponent], providers: [NgbActiveModal], }).compileComponents() diff --git a/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.ts b/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.ts index 19a0208e0..429e2db17 100644 --- a/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.ts +++ b/src-ui/src/app/components/common/hotkey-dialog/hotkey-dialog.component.ts @@ -17,7 +17,6 @@ const SYMBOLS = { selector: 'pngx-hotkey-dialog', templateUrl: './hotkey-dialog.component.html', styleUrl: './hotkey-dialog.component.scss', - standalone: false, }) export class HotkeyDialogComponent { public title: string = $localize`Keyboard shortcuts` diff --git a/src-ui/src/app/components/common/input/abstract-input.spec.ts b/src-ui/src/app/components/common/input/abstract-input.spec.ts index 7661c7692..a0c8ec85b 100644 --- a/src-ui/src/app/components/common/input/abstract-input.spec.ts +++ b/src-ui/src/app/components/common/input/abstract-input.spec.ts @@ -18,7 +18,7 @@ import { AbstractInputComponent } from './abstract-input' /> `, - standalone: false, + imports: [FormsModule, ReactiveFormsModule], }) class TestComponent extends AbstractInputComponent { constructor() { @@ -32,9 +32,8 @@ describe(`AbstractInputComponent`, () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [TestComponent], providers: [], - imports: [FormsModule, ReactiveFormsModule], + imports: [FormsModule, ReactiveFormsModule, TestComponent], }).compileComponents() fixture = TestBed.createComponent(TestComponent) diff --git a/src-ui/src/app/components/common/input/check/check.component.spec.ts b/src-ui/src/app/components/common/input/check/check.component.spec.ts index 79ce00cbf..443276adb 100644 --- a/src-ui/src/app/components/common/input/check/check.component.spec.ts +++ b/src-ui/src/app/components/common/input/check/check.component.spec.ts @@ -13,9 +13,8 @@ describe('CheckComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [CheckComponent], providers: [], - imports: [FormsModule, ReactiveFormsModule], + imports: [FormsModule, ReactiveFormsModule, CheckComponent], }).compileComponents() fixture = TestBed.createComponent(CheckComponent) diff --git a/src-ui/src/app/components/common/input/check/check.component.ts b/src-ui/src/app/components/common/input/check/check.component.ts index 88b3f999c..d7903b44b 100644 --- a/src-ui/src/app/components/common/input/check/check.component.ts +++ b/src-ui/src/app/components/common/input/check/check.component.ts @@ -1,5 +1,10 @@ +import { NgClass } from '@angular/common' import { Component, forwardRef } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' import { AbstractInputComponent } from '../abstract-input' @Component({ @@ -13,7 +18,7 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-check', templateUrl: './check.component.html', styleUrls: ['./check.component.scss'], - standalone: false, + imports: [FormsModule, ReactiveFormsModule, NgClass], }) export class CheckComponent extends AbstractInputComponent { constructor() { diff --git a/src-ui/src/app/components/common/input/color/color.component.spec.ts b/src-ui/src/app/components/common/input/color/color.component.spec.ts index 9db2cb93e..cbe53a0c3 100644 --- a/src-ui/src/app/components/common/input/color/color.component.spec.ts +++ b/src-ui/src/app/components/common/input/color/color.component.spec.ts @@ -16,7 +16,6 @@ describe('ColorComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ColorComponent], providers: [], imports: [ FormsModule, @@ -24,6 +23,7 @@ describe('ColorComponent', () => { NgbPopoverModule, ColorSliderModule, NgxBootstrapIconsModule.pick(allIcons), + ColorComponent, ], }).compileComponents() diff --git a/src-ui/src/app/components/common/input/color/color.component.ts b/src-ui/src/app/components/common/input/color/color.component.ts index 7f0f774ef..5f83d593f 100644 --- a/src-ui/src/app/components/common/input/color/color.component.ts +++ b/src-ui/src/app/components/common/input/color/color.component.ts @@ -1,5 +1,12 @@ import { Component, forwardRef } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' +import { ColorSliderModule } from 'ngx-color/slider' import { randomColor } from 'src/app/utils/color' import { AbstractInputComponent } from '../abstract-input' @@ -14,7 +21,13 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-color', templateUrl: './color.component.html', styleUrls: ['./color.component.scss'], - standalone: false, + imports: [ + NgxBootstrapIconsModule, + NgbPopoverModule, + FormsModule, + ReactiveFormsModule, + ColorSliderModule, + ], }) export class ColorComponent extends AbstractInputComponent { constructor() { diff --git a/src-ui/src/app/components/common/input/date/date.component.spec.ts b/src-ui/src/app/components/common/input/date/date.component.spec.ts index 0e4edefb9..c8bf9b2e2 100644 --- a/src-ui/src/app/components/common/input/date/date.component.spec.ts +++ b/src-ui/src/app/components/common/input/date/date.component.spec.ts @@ -1,17 +1,11 @@ import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http' import { provideHttpClientTesting } from '@angular/common/http/testing' import { ComponentFixture, TestBed } from '@angular/core/testing' -import { - FormsModule, - NG_VALUE_ACCESSOR, - ReactiveFormsModule, -} from '@angular/forms' -import { RouterTestingModule } from '@angular/router/testing' -import { - NgbDateParserFormatter, - NgbDatepickerModule, -} from '@ng-bootstrap/ng-bootstrap' +import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { RouterModule } from '@angular/router' +import { NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' +import { routes } from 'src/app/app-routing.module' import { LocalizedDateParserFormatter } from 'src/app/utils/ngb-date-parser-formatter' import { DateComponent } from './date.component' @@ -22,13 +16,9 @@ describe('DateComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [DateComponent], imports: [ - FormsModule, - ReactiveFormsModule, - NgbDatepickerModule, - RouterTestingModule, NgxBootstrapIconsModule.pick(allIcons), + RouterModule.forRoot(routes), ], providers: [ { diff --git a/src-ui/src/app/components/common/input/date/date.component.ts b/src-ui/src/app/components/common/input/date/date.component.ts index 510abe286..b266ebfaa 100644 --- a/src-ui/src/app/components/common/input/date/date.component.ts +++ b/src-ui/src/app/components/common/input/date/date.component.ts @@ -6,12 +6,19 @@ import { OnInit, Output, } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { RouterModule } from '@angular/router' import { NgbDateAdapter, NgbDateParserFormatter, + NgbDatepickerModule, NgbDateStruct, } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { SettingsService } from 'src/app/services/settings.service' import { AbstractInputComponent } from '../abstract-input' @@ -26,7 +33,13 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-date', templateUrl: './date.component.html', styleUrls: ['./date.component.scss'], - standalone: false, + imports: [ + NgbDatepickerModule, + FormsModule, + ReactiveFormsModule, + RouterModule, + NgxBootstrapIconsModule, + ], }) export class DateComponent extends AbstractInputComponent diff --git a/src-ui/src/app/components/common/input/document-link/document-link.component.html b/src-ui/src/app/components/common/input/document-link/document-link.component.html index f494a2446..08fe17bc1 100644 --- a/src-ui/src/app/components/common/input/document-link/document-link.component.html +++ b/src-ui/src/app/components/common/input/document-link/document-link.component.html @@ -40,7 +40,9 @@ (change)="onChange(selectedDocuments)">
- + @if (!disabled) { + + } @if (document.title) {  {{document.title}} diff --git a/src-ui/src/app/components/common/input/document-link/document-link.component.spec.ts b/src-ui/src/app/components/common/input/document-link/document-link.component.spec.ts index dda8b3299..196260f2f 100644 --- a/src-ui/src/app/components/common/input/document-link/document-link.component.spec.ts +++ b/src-ui/src/app/components/common/input/document-link/document-link.component.spec.ts @@ -1,12 +1,7 @@ import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http' import { provideHttpClientTesting } from '@angular/common/http/testing' import { ComponentFixture, TestBed } from '@angular/core/testing' -import { - FormsModule, - NG_VALUE_ACCESSOR, - ReactiveFormsModule, -} from '@angular/forms' -import { NgSelectModule } from '@ng-select/ng-select' +import { NG_VALUE_ACCESSOR } from '@angular/forms' import { of, throwError } from 'rxjs' import { FILTER_TITLE } from 'src/app/data/filter-rule-type' import { DocumentService } from 'src/app/services/rest/document.service' @@ -38,8 +33,7 @@ describe('DocumentLinkComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [DocumentLinkComponent], - imports: [NgSelectModule, FormsModule, ReactiveFormsModule], + imports: [DocumentLinkComponent], providers: [ provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting(), diff --git a/src-ui/src/app/components/common/input/document-link/document-link.component.ts b/src-ui/src/app/components/common/input/document-link/document-link.component.ts index 974b2fdf0..a9e6f115a 100644 --- a/src-ui/src/app/components/common/input/document-link/document-link.component.ts +++ b/src-ui/src/app/components/common/input/document-link/document-link.component.ts @@ -1,5 +1,13 @@ +import { AsyncPipe, NgTemplateOutlet } from '@angular/common' import { Component, forwardRef, Input, OnDestroy, OnInit } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { RouterModule } from '@angular/router' +import { NgSelectModule } from '@ng-select/ng-select' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { catchError, concat, @@ -14,6 +22,7 @@ import { } from 'rxjs' import { Document } from 'src/app/data/document' import { FILTER_TITLE } from 'src/app/data/filter-rule-type' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' import { DocumentService } from 'src/app/services/rest/document.service' import { AbstractInputComponent } from '../abstract-input' @@ -28,7 +37,16 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-document-link', templateUrl: './document-link.component.html', styleUrls: ['./document-link.component.scss'], - standalone: false, + imports: [ + CustomDatePipe, + AsyncPipe, + FormsModule, + ReactiveFormsModule, + RouterModule, + NgTemplateOutlet, + NgSelectModule, + NgxBootstrapIconsModule, + ], }) export class DocumentLinkComponent extends AbstractInputComponent diff --git a/src-ui/src/app/components/common/input/drag-drop-select/drag-drop-select.component.spec.ts b/src-ui/src/app/components/common/input/drag-drop-select/drag-drop-select.component.spec.ts index 962192cb7..9f30fc44a 100644 --- a/src-ui/src/app/components/common/input/drag-drop-select/drag-drop-select.component.spec.ts +++ b/src-ui/src/app/components/common/input/drag-drop-select/drag-drop-select.component.spec.ts @@ -9,8 +9,7 @@ describe('DragDropSelectComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [DragDropModule, FormsModule], - declarations: [DragDropSelectComponent], + imports: [DragDropModule, FormsModule, DragDropSelectComponent], }).compileComponents() fixture = TestBed.createComponent(DragDropSelectComponent) diff --git a/src-ui/src/app/components/common/input/drag-drop-select/drag-drop-select.component.ts b/src-ui/src/app/components/common/input/drag-drop-select/drag-drop-select.component.ts index 36a2c2f00..a27100a68 100644 --- a/src-ui/src/app/components/common/input/drag-drop-select/drag-drop-select.component.ts +++ b/src-ui/src/app/components/common/input/drag-drop-select/drag-drop-select.component.ts @@ -1,6 +1,7 @@ import { CdkDragDrop, CdkDropList, + DragDropModule, moveItemInArray, } from '@angular/cdk/drag-drop' import { Component, Input, ViewChild, forwardRef } from '@angular/core' @@ -18,7 +19,7 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-drag-drop-select', templateUrl: './drag-drop-select.component.html', styleUrl: './drag-drop-select.component.scss', - standalone: false, + imports: [DragDropModule], }) export class DragDropSelectComponent extends AbstractInputComponent { @Input() title: string = $localize`Selected items` diff --git a/src-ui/src/app/components/common/input/entries/entries.component.spec.ts b/src-ui/src/app/components/common/input/entries/entries.component.spec.ts index 5f2bcaeba..692b9c0b8 100644 --- a/src-ui/src/app/components/common/input/entries/entries.component.spec.ts +++ b/src-ui/src/app/components/common/input/entries/entries.component.spec.ts @@ -13,11 +13,11 @@ describe('EntriesComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [EntriesComponent], imports: [ FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule.pick(allIcons), + EntriesComponent, ], }).compileComponents() }) diff --git a/src-ui/src/app/components/common/input/entries/entries.component.ts b/src-ui/src/app/components/common/input/entries/entries.component.ts index 1a5dd190d..05cb3073b 100644 --- a/src-ui/src/app/components/common/input/entries/entries.component.ts +++ b/src-ui/src/app/components/common/input/entries/entries.component.ts @@ -1,5 +1,6 @@ import { Component, forwardRef } from '@angular/core' import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { AbstractInputComponent } from '../abstract-input' @Component({ @@ -13,7 +14,7 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-entries', templateUrl: './entries.component.html', styleUrl: './entries.component.scss', - standalone: false, + imports: [NgxBootstrapIconsModule], }) export class EntriesComponent extends AbstractInputComponent { entries = [] diff --git a/src-ui/src/app/components/common/input/file/file.component.spec.ts b/src-ui/src/app/components/common/input/file/file.component.spec.ts index 7b6380f03..cd0aa5761 100644 --- a/src-ui/src/app/components/common/input/file/file.component.spec.ts +++ b/src-ui/src/app/components/common/input/file/file.component.spec.ts @@ -11,8 +11,7 @@ describe('FileComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [FileComponent], - imports: [FormsModule, ReactiveFormsModule], + imports: [FormsModule, ReactiveFormsModule, FileComponent], providers: [ provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting(), diff --git a/src-ui/src/app/components/common/input/file/file.component.ts b/src-ui/src/app/components/common/input/file/file.component.ts index fcc0ac123..0ee239113 100644 --- a/src-ui/src/app/components/common/input/file/file.component.ts +++ b/src-ui/src/app/components/common/input/file/file.component.ts @@ -6,7 +6,11 @@ import { ViewChild, forwardRef, } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' import { AbstractInputComponent } from '../abstract-input' @Component({ @@ -20,7 +24,7 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-file', templateUrl: './file.component.html', styleUrl: './file.component.scss', - standalone: false, + imports: [FormsModule, ReactiveFormsModule], }) export class FileComponent extends AbstractInputComponent { @Output() diff --git a/src-ui/src/app/components/common/input/monetary/monetary.component.spec.ts b/src-ui/src/app/components/common/input/monetary/monetary.component.spec.ts index 49ccc811a..7c0194641 100644 --- a/src-ui/src/app/components/common/input/monetary/monetary.component.spec.ts +++ b/src-ui/src/app/components/common/input/monetary/monetary.component.spec.ts @@ -1,12 +1,7 @@ -import { CurrencyPipe } from '@angular/common' import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http' import { provideHttpClientTesting } from '@angular/common/http/testing' import { ComponentFixture, TestBed } from '@angular/core/testing' -import { - FormsModule, - NG_VALUE_ACCESSOR, - ReactiveFormsModule, -} from '@angular/forms' +import { NG_VALUE_ACCESSOR } from '@angular/forms' import { MonetaryComponent } from './monetary.component' describe('MonetaryComponent', () => { @@ -15,10 +10,8 @@ describe('MonetaryComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [MonetaryComponent], - imports: [FormsModule, ReactiveFormsModule], + imports: [MonetaryComponent], providers: [ - CurrencyPipe, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting(), ], diff --git a/src-ui/src/app/components/common/input/monetary/monetary.component.ts b/src-ui/src/app/components/common/input/monetary/monetary.component.ts index f37af7703..a895f3d56 100644 --- a/src-ui/src/app/components/common/input/monetary/monetary.component.ts +++ b/src-ui/src/app/components/common/input/monetary/monetary.component.ts @@ -1,6 +1,10 @@ -import { getLocaleCurrencyCode } from '@angular/common' +import { CurrencyPipe, getLocaleCurrencyCode } from '@angular/common' import { Component, forwardRef, Inject, Input, LOCALE_ID } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' import { AbstractInputComponent } from '../abstract-input' @Component({ @@ -14,7 +18,7 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-monetary', templateUrl: './monetary.component.html', styleUrls: ['./monetary.component.scss'], - standalone: false, + imports: [CurrencyPipe, FormsModule, ReactiveFormsModule], }) export class MonetaryComponent extends AbstractInputComponent { public currency: string = '' diff --git a/src-ui/src/app/components/common/input/number/number.component.spec.ts b/src-ui/src/app/components/common/input/number/number.component.spec.ts index fba0bd63d..c8da2c7bd 100644 --- a/src-ui/src/app/components/common/input/number/number.component.spec.ts +++ b/src-ui/src/app/components/common/input/number/number.component.spec.ts @@ -18,8 +18,7 @@ describe('NumberComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [NumberComponent], - imports: [FormsModule, ReactiveFormsModule], + imports: [FormsModule, ReactiveFormsModule, NumberComponent], providers: [ DocumentService, provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/common/input/number/number.component.ts b/src-ui/src/app/components/common/input/number/number.component.ts index 4687da79b..127574334 100644 --- a/src-ui/src/app/components/common/input/number/number.component.ts +++ b/src-ui/src/app/components/common/input/number/number.component.ts @@ -1,5 +1,10 @@ import { Component, forwardRef, Input } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { DocumentService } from 'src/app/services/rest/document.service' import { AbstractInputComponent } from '../abstract-input' @@ -14,7 +19,7 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-number', templateUrl: './number.component.html', styleUrls: ['./number.component.scss'], - standalone: false, + imports: [FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule], }) export class NumberComponent extends AbstractInputComponent { @Input() diff --git a/src-ui/src/app/components/common/input/password/password.component.spec.ts b/src-ui/src/app/components/common/input/password/password.component.spec.ts index bb7388015..5f840568c 100644 --- a/src-ui/src/app/components/common/input/password/password.component.spec.ts +++ b/src-ui/src/app/components/common/input/password/password.component.spec.ts @@ -15,12 +15,12 @@ describe('PasswordComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [PasswordComponent], providers: [], imports: [ FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule.pick(allIcons), + PasswordComponent, ], }).compileComponents() diff --git a/src-ui/src/app/components/common/input/password/password.component.ts b/src-ui/src/app/components/common/input/password/password.component.ts index c68e25a51..e1d077cff 100644 --- a/src-ui/src/app/components/common/input/password/password.component.ts +++ b/src-ui/src/app/components/common/input/password/password.component.ts @@ -1,5 +1,10 @@ import { Component, Input, forwardRef } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { AbstractInputComponent } from '../abstract-input' @Component({ @@ -13,7 +18,7 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-password', templateUrl: './password.component.html', styleUrls: ['./password.component.scss'], - standalone: false, + imports: [FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule], }) export class PasswordComponent extends AbstractInputComponent { @Input() diff --git a/src-ui/src/app/components/common/input/permissions/permissions-form/permissions-form.component.spec.ts b/src-ui/src/app/components/common/input/permissions/permissions-form/permissions-form.component.spec.ts index 9467d3917..ba5ce280b 100644 --- a/src-ui/src/app/components/common/input/permissions/permissions-form/permissions-form.component.spec.ts +++ b/src-ui/src/app/components/common/input/permissions/permissions-form/permissions-form.component.spec.ts @@ -19,17 +19,15 @@ describe('PermissionsFormComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - PermissionsFormComponent, - SelectComponent, - PermissionsGroupComponent, - PermissionsUserComponent, - ], imports: [ FormsModule, ReactiveFormsModule, NgbAccordionModule, NgSelectModule, + PermissionsFormComponent, + SelectComponent, + PermissionsGroupComponent, + PermissionsUserComponent, ], providers: [ provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/common/input/permissions/permissions-form/permissions-form.component.ts b/src-ui/src/app/components/common/input/permissions/permissions-form/permissions-form.component.ts index 2b50743bd..4da6c9ca9 100644 --- a/src-ui/src/app/components/common/input/permissions/permissions-form/permissions-form.component.ts +++ b/src-ui/src/app/components/common/input/permissions/permissions-form/permissions-form.component.ts @@ -1,7 +1,18 @@ +import { NgTemplateOutlet } from '@angular/common' import { Component, forwardRef, Input, OnInit } from '@angular/core' -import { FormControl, FormGroup, NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormControl, + FormGroup, + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap' import { User } from 'src/app/data/user' import { AbstractInputComponent } from '../../abstract-input' +import { SelectComponent } from '../../select/select.component' +import { PermissionsGroupComponent } from '../permissions-group/permissions-group.component' +import { PermissionsUserComponent } from '../permissions-user/permissions-user.component' export interface PermissionsFormObject { owner?: number @@ -28,7 +39,15 @@ export interface PermissionsFormObject { selector: 'pngx-permissions-form', templateUrl: './permissions-form.component.html', styleUrls: ['./permissions-form.component.scss'], - standalone: false, + imports: [ + SelectComponent, + PermissionsUserComponent, + PermissionsGroupComponent, + FormsModule, + ReactiveFormsModule, + NgTemplateOutlet, + NgbAccordionModule, + ], }) export class PermissionsFormComponent extends AbstractInputComponent diff --git a/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.spec.ts b/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.spec.ts index fc139ac26..0bfed7b37 100644 --- a/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.spec.ts +++ b/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.spec.ts @@ -19,8 +19,12 @@ describe('PermissionsGroupComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [PermissionsGroupComponent], - imports: [FormsModule, ReactiveFormsModule, NgSelectModule], + imports: [ + FormsModule, + ReactiveFormsModule, + NgSelectModule, + PermissionsGroupComponent, + ], providers: [ GroupService, provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.ts b/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.ts index a76cc009e..1c157c121 100644 --- a/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.ts +++ b/src-ui/src/app/components/common/input/permissions/permissions-group/permissions-group.component.ts @@ -1,5 +1,10 @@ import { Component, forwardRef } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { NgSelectComponent } from '@ng-select/ng-select' import { first } from 'rxjs/operators' import { Group } from 'src/app/data/group' import { GroupService } from 'src/app/services/rest/group.service' @@ -16,7 +21,7 @@ import { AbstractInputComponent } from '../../abstract-input' selector: 'pngx-permissions-group', templateUrl: './permissions-group.component.html', styleUrls: ['./permissions-group.component.scss'], - standalone: false, + imports: [NgSelectComponent, FormsModule, ReactiveFormsModule], }) export class PermissionsGroupComponent extends AbstractInputComponent { groups: Group[] diff --git a/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.spec.ts b/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.spec.ts index 53a3d3f2c..0d7a525ae 100644 --- a/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.spec.ts +++ b/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.spec.ts @@ -19,8 +19,12 @@ describe('PermissionsUserComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [PermissionsUserComponent], - imports: [FormsModule, ReactiveFormsModule, NgSelectModule], + imports: [ + FormsModule, + ReactiveFormsModule, + NgSelectModule, + PermissionsUserComponent, + ], providers: [ UserService, provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.ts b/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.ts index a38ca0ea3..42e553890 100644 --- a/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.ts +++ b/src-ui/src/app/components/common/input/permissions/permissions-user/permissions-user.component.ts @@ -1,5 +1,10 @@ import { Component, forwardRef } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { NgSelectComponent } from '@ng-select/ng-select' import { first } from 'rxjs/operators' import { User } from 'src/app/data/user' import { UserService } from 'src/app/services/rest/user.service' @@ -17,7 +22,7 @@ import { AbstractInputComponent } from '../../abstract-input' selector: 'pngx-permissions-user', templateUrl: './permissions-user.component.html', styleUrls: ['./permissions-user.component.scss'], - standalone: false, + imports: [NgSelectComponent, FormsModule, ReactiveFormsModule], }) export class PermissionsUserComponent extends AbstractInputComponent { users: User[] diff --git a/src-ui/src/app/components/common/input/select/select.component.spec.ts b/src-ui/src/app/components/common/input/select/select.component.spec.ts index 8af96acf0..d93703ab1 100644 --- a/src-ui/src/app/components/common/input/select/select.component.spec.ts +++ b/src-ui/src/app/components/common/input/select/select.component.spec.ts @@ -47,13 +47,13 @@ describe('SelectComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [SelectComponent], providers: [], imports: [ FormsModule, ReactiveFormsModule, NgSelectModule, RouterTestingModule, + SelectComponent, ], }).compileComponents() diff --git a/src-ui/src/app/components/common/input/select/select.component.ts b/src-ui/src/app/components/common/input/select/select.component.ts index 4388e7f8a..aa7b169c6 100644 --- a/src-ui/src/app/components/common/input/select/select.component.ts +++ b/src-ui/src/app/components/common/input/select/select.component.ts @@ -5,7 +5,14 @@ import { Input, Output, } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { RouterModule } from '@angular/router' +import { NgSelectModule } from '@ng-select/ng-select' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { AbstractInputComponent } from '../abstract-input' @Component({ @@ -19,7 +26,13 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-select', templateUrl: './select.component.html', styleUrls: ['./select.component.scss'], - standalone: false, + imports: [ + NgSelectModule, + FormsModule, + ReactiveFormsModule, + RouterModule, + NgxBootstrapIconsModule, + ], }) export class SelectComponent extends AbstractInputComponent { constructor() { diff --git a/src-ui/src/app/components/common/input/switch/switch.component.spec.ts b/src-ui/src/app/components/common/input/switch/switch.component.spec.ts index a0ea4708a..8dfe0c435 100644 --- a/src-ui/src/app/components/common/input/switch/switch.component.spec.ts +++ b/src-ui/src/app/components/common/input/switch/switch.component.spec.ts @@ -14,9 +14,13 @@ describe('SwitchComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [SwitchComponent], providers: [], - imports: [FormsModule, ReactiveFormsModule, NgbTooltipModule], + imports: [ + FormsModule, + ReactiveFormsModule, + NgbTooltipModule, + SwitchComponent, + ], }).compileComponents() fixture = TestBed.createComponent(SwitchComponent) diff --git a/src-ui/src/app/components/common/input/switch/switch.component.ts b/src-ui/src/app/components/common/input/switch/switch.component.ts index 5d74b013b..2b888225a 100644 --- a/src-ui/src/app/components/common/input/switch/switch.component.ts +++ b/src-ui/src/app/components/common/input/switch/switch.component.ts @@ -1,5 +1,11 @@ +import { NgClass } from '@angular/common' import { Component, Input, forwardRef } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap' import { AbstractInputComponent } from '../abstract-input' @Component({ @@ -13,7 +19,7 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-switch', templateUrl: './switch.component.html', styleUrls: ['./switch.component.scss'], - standalone: false, + imports: [FormsModule, ReactiveFormsModule, NgClass, NgbTooltipModule], }) export class SwitchComponent extends AbstractInputComponent { @Input() diff --git a/src-ui/src/app/components/common/input/tags/tags.component.spec.ts b/src-ui/src/app/components/common/input/tags/tags.component.spec.ts index 522ddde72..7fdf11e53 100644 --- a/src-ui/src/app/components/common/input/tags/tags.component.spec.ts +++ b/src-ui/src/app/components/common/input/tags/tags.component.spec.ts @@ -63,7 +63,15 @@ describe('TagsComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + FormsModule, + ReactiveFormsModule, + NgSelectModule, + RouterTestingModule, + NgbModalModule, + NgbAccordionModule, + NgbPopoverModule, + NgxBootstrapIconsModule.pick(allIcons), TagsComponent, TagEditDialogComponent, TextComponent, @@ -75,16 +83,6 @@ describe('TagsComponent', () => { ColorComponent, CheckComponent, ], - imports: [ - FormsModule, - ReactiveFormsModule, - NgSelectModule, - RouterTestingModule, - NgbModalModule, - NgbAccordionModule, - NgbPopoverModule, - NgxBootstrapIconsModule.pick(allIcons), - ], providers: [ { provide: TagService, diff --git a/src-ui/src/app/components/common/input/tags/tags.component.ts b/src-ui/src/app/components/common/input/tags/tags.component.ts index e6b8dc866..31ef65489 100644 --- a/src-ui/src/app/components/common/input/tags/tags.component.ts +++ b/src-ui/src/app/components/common/input/tags/tags.component.ts @@ -7,14 +7,22 @@ import { Output, ViewChild, } from '@angular/core' -import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' +import { + ControlValueAccessor, + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { RouterModule } from '@angular/router' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' -import { NgSelectComponent } from '@ng-select/ng-select' +import { NgSelectComponent, NgSelectModule } from '@ng-select/ng-select' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { first, firstValueFrom, tap } from 'rxjs' import { Tag } from 'src/app/data/tag' import { TagService } from 'src/app/services/rest/tag.service' import { EditDialogMode } from '../../edit-dialog/edit-dialog.component' import { TagEditDialogComponent } from '../../edit-dialog/tag-edit-dialog/tag-edit-dialog.component' +import { TagComponent } from '../../tag/tag.component' @Component({ providers: [ @@ -27,7 +35,14 @@ import { TagEditDialogComponent } from '../../edit-dialog/tag-edit-dialog/tag-ed selector: 'pngx-input-tags', templateUrl: './tags.component.html', styleUrls: ['./tags.component.scss'], - standalone: false, + imports: [ + TagComponent, + NgSelectModule, + FormsModule, + ReactiveFormsModule, + RouterModule, + NgxBootstrapIconsModule, + ], }) export class TagsComponent implements OnInit, ControlValueAccessor { constructor( diff --git a/src-ui/src/app/components/common/input/text/text.component.spec.ts b/src-ui/src/app/components/common/input/text/text.component.spec.ts index da77aebe3..c5662b341 100644 --- a/src-ui/src/app/components/common/input/text/text.component.spec.ts +++ b/src-ui/src/app/components/common/input/text/text.component.spec.ts @@ -13,9 +13,8 @@ describe('TextComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [TextComponent], providers: [], - imports: [FormsModule, ReactiveFormsModule], + imports: [FormsModule, ReactiveFormsModule, TextComponent], }).compileComponents() fixture = TestBed.createComponent(TextComponent) diff --git a/src-ui/src/app/components/common/input/text/text.component.ts b/src-ui/src/app/components/common/input/text/text.component.ts index 986be679b..cc06d5bc0 100644 --- a/src-ui/src/app/components/common/input/text/text.component.ts +++ b/src-ui/src/app/components/common/input/text/text.component.ts @@ -1,5 +1,11 @@ import { Component, Input, forwardRef } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' +import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' import { AbstractInputComponent } from '../abstract-input' @Component({ @@ -13,7 +19,12 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-text', templateUrl: './text.component.html', styleUrls: ['./text.component.scss'], - standalone: false, + imports: [ + FormsModule, + ReactiveFormsModule, + SafeHtmlPipe, + NgxBootstrapIconsModule, + ], }) export class TextComponent extends AbstractInputComponent { @Input() diff --git a/src-ui/src/app/components/common/input/textarea/textarea.component.spec.ts b/src-ui/src/app/components/common/input/textarea/textarea.component.spec.ts index 1cd6ee5d9..f7f38f30a 100644 --- a/src-ui/src/app/components/common/input/textarea/textarea.component.spec.ts +++ b/src-ui/src/app/components/common/input/textarea/textarea.component.spec.ts @@ -13,9 +13,8 @@ describe('TextComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [TextAreaComponent], providers: [], - imports: [FormsModule, ReactiveFormsModule], + imports: [FormsModule, ReactiveFormsModule, TextAreaComponent], }).compileComponents() fixture = TestBed.createComponent(TextAreaComponent) diff --git a/src-ui/src/app/components/common/input/textarea/textarea.component.ts b/src-ui/src/app/components/common/input/textarea/textarea.component.ts index d128b3598..6f486a46e 100644 --- a/src-ui/src/app/components/common/input/textarea/textarea.component.ts +++ b/src-ui/src/app/components/common/input/textarea/textarea.component.ts @@ -1,5 +1,10 @@ import { Component, Input, forwardRef } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' import { AbstractInputComponent } from '../abstract-input' @Component({ @@ -13,7 +18,7 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-textarea', templateUrl: './textarea.component.html', styleUrls: ['./textarea.component.scss'], - standalone: false, + imports: [FormsModule, ReactiveFormsModule, SafeHtmlPipe], }) export class TextAreaComponent extends AbstractInputComponent { @Input() diff --git a/src-ui/src/app/components/common/input/url/url.component.spec.ts b/src-ui/src/app/components/common/input/url/url.component.spec.ts index 23e94fab7..73feb1148 100644 --- a/src-ui/src/app/components/common/input/url/url.component.spec.ts +++ b/src-ui/src/app/components/common/input/url/url.component.spec.ts @@ -14,12 +14,12 @@ describe('TextComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [UrlComponent], providers: [], imports: [ FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule.pick(allIcons), + UrlComponent, ], }).compileComponents() diff --git a/src-ui/src/app/components/common/input/url/url.component.ts b/src-ui/src/app/components/common/input/url/url.component.ts index 04888dd56..ac28e2d0a 100644 --- a/src-ui/src/app/components/common/input/url/url.component.ts +++ b/src-ui/src/app/components/common/input/url/url.component.ts @@ -1,5 +1,10 @@ import { Component, forwardRef } from '@angular/core' -import { NG_VALUE_ACCESSOR } from '@angular/forms' +import { + FormsModule, + NG_VALUE_ACCESSOR, + ReactiveFormsModule, +} from '@angular/forms' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { AbstractInputComponent } from '../abstract-input' @Component({ @@ -13,7 +18,7 @@ import { AbstractInputComponent } from '../abstract-input' selector: 'pngx-input-url', templateUrl: './url.component.html', styleUrls: ['./url.component.scss'], - standalone: false, + imports: [NgxBootstrapIconsModule, FormsModule, ReactiveFormsModule], }) export class UrlComponent extends AbstractInputComponent { constructor() { diff --git a/src-ui/src/app/components/common/logo/logo.component.spec.ts b/src-ui/src/app/components/common/logo/logo.component.spec.ts index 8af7e4480..cb6112016 100644 --- a/src-ui/src/app/components/common/logo/logo.component.spec.ts +++ b/src-ui/src/app/components/common/logo/logo.component.spec.ts @@ -14,8 +14,7 @@ describe('LogoComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [LogoComponent], - imports: [], + imports: [LogoComponent], providers: [ provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting(), diff --git a/src-ui/src/app/components/common/logo/logo.component.ts b/src-ui/src/app/components/common/logo/logo.component.ts index 524c48568..7404ea865 100644 --- a/src-ui/src/app/components/common/logo/logo.component.ts +++ b/src-ui/src/app/components/common/logo/logo.component.ts @@ -7,7 +7,6 @@ import { environment } from 'src/environments/environment' selector: 'pngx-logo', templateUrl: './logo.component.html', styleUrls: ['./logo.component.scss'], - standalone: false, }) export class LogoComponent { @Input() diff --git a/src-ui/src/app/components/common/page-header/page-header.component.spec.ts b/src-ui/src/app/components/common/page-header/page-header.component.spec.ts index de4ccfffc..8b307b10d 100644 --- a/src-ui/src/app/components/common/page-header/page-header.component.spec.ts +++ b/src-ui/src/app/components/common/page-header/page-header.component.spec.ts @@ -10,9 +10,8 @@ describe('PageHeaderComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [PageHeaderComponent], providers: [], - imports: [], + imports: [PageHeaderComponent], }).compileComponents() titleService = TestBed.inject(Title) diff --git a/src-ui/src/app/components/common/page-header/page-header.component.ts b/src-ui/src/app/components/common/page-header/page-header.component.ts index 5d2423d4c..1bec482b6 100644 --- a/src-ui/src/app/components/common/page-header/page-header.component.ts +++ b/src-ui/src/app/components/common/page-header/page-header.component.ts @@ -1,12 +1,15 @@ import { Component, Input } from '@angular/core' import { Title } from '@angular/platform-browser' +import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' +import { TourNgBootstrapModule } from 'ngx-ui-tour-ng-bootstrap' import { environment } from 'src/environments/environment' @Component({ selector: 'pngx-page-header', templateUrl: './page-header.component.html', styleUrls: ['./page-header.component.scss'], - standalone: false, + imports: [NgbPopoverModule, NgxBootstrapIconsModule, TourNgBootstrapModule], }) export class PageHeaderComponent { constructor(private titleService: Title) {} diff --git a/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.spec.ts b/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.spec.ts index 9b1c16f64..55cbf152a 100644 --- a/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.spec.ts @@ -35,7 +35,11 @@ describe('PermissionsDialogComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + NgSelectModule, + FormsModule, + ReactiveFormsModule, + NgbModule, PermissionsDialogComponent, SafeHtmlPipe, SelectComponent, @@ -44,7 +48,6 @@ describe('PermissionsDialogComponent', () => { PermissionsUserComponent, PermissionsGroupComponent, ], - imports: [NgSelectModule, FormsModule, ReactiveFormsModule, NgbModule], providers: [ NgbActiveModal, { diff --git a/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.ts b/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.ts index bf0c6228a..5574a7c60 100644 --- a/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.ts +++ b/src-ui/src/app/components/common/permissions-dialog/permissions-dialog.component.ts @@ -1,15 +1,27 @@ import { Component, EventEmitter, Input, Output } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { ObjectWithPermissions } from 'src/app/data/object-with-permissions' import { User } from 'src/app/data/user' import { UserService } from 'src/app/services/rest/user.service' +import { PermissionsFormComponent } from '../input/permissions/permissions-form/permissions-form.component' +import { SwitchComponent } from '../input/switch/switch.component' @Component({ selector: 'pngx-permissions-dialog', templateUrl: './permissions-dialog.component.html', styleUrls: ['./permissions-dialog.component.scss'], - standalone: false, + imports: [ + SwitchComponent, + PermissionsFormComponent, + FormsModule, + ReactiveFormsModule, + ], }) export class PermissionsDialogComponent { users: User[] diff --git a/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.spec.ts b/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.spec.ts index bd07eb02c..fd8e261a0 100644 --- a/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.spec.ts +++ b/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.spec.ts @@ -26,17 +26,15 @@ describe('PermissionsFilterDropdownComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - PermissionsFilterDropdownComponent, - ClearableBadgeComponent, - IfPermissionsDirective, - ], imports: [ NgSelectModule, FormsModule, ReactiveFormsModule, NgbModule, NgxBootstrapIconsModule.pick(allIcons), + PermissionsFilterDropdownComponent, + ClearableBadgeComponent, + IfPermissionsDirective, ], providers: [ { diff --git a/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.ts b/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.ts index 24d072341..505a1a723 100644 --- a/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.ts +++ b/src-ui/src/app/components/common/permissions-filter-dropdown/permissions-filter-dropdown.component.ts @@ -1,6 +1,12 @@ +import { NgClass } from '@angular/common' import { Component, EventEmitter, Input, Output } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap' +import { NgSelectComponent } from '@ng-select/ng-select' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { first } from 'rxjs' import { User } from 'src/app/data/user' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { PermissionAction, PermissionType, @@ -9,6 +15,7 @@ import { import { UserService } from 'src/app/services/rest/user.service' import { SettingsService } from 'src/app/services/settings.service' import { ComponentWithPermissions } from '../../with-permissions/with-permissions.component' +import { ClearableBadgeComponent } from '../clearable-badge/clearable-badge.component' export class PermissionsSelectionModel { ownerFilter: OwnerFilterType @@ -39,7 +46,16 @@ export enum OwnerFilterType { selector: 'pngx-permissions-filter-dropdown', templateUrl: './permissions-filter-dropdown.component.html', styleUrls: ['./permissions-filter-dropdown.component.scss'], - standalone: false, + imports: [ + ClearableBadgeComponent, + IfPermissionsDirective, + FormsModule, + ReactiveFormsModule, + NgbDropdownModule, + NgSelectComponent, + NgClass, + NgxBootstrapIconsModule, + ], }) export class PermissionsFilterDropdownComponent extends ComponentWithPermissions { public OwnerFilterType = OwnerFilterType diff --git a/src-ui/src/app/components/common/permissions-select/permissions-select.component.spec.ts b/src-ui/src/app/components/common/permissions-select/permissions-select.component.spec.ts index 6fed0d16a..0aebf1ee3 100644 --- a/src-ui/src/app/components/common/permissions-select/permissions-select.component.spec.ts +++ b/src-ui/src/app/components/common/permissions-select/permissions-select.component.spec.ts @@ -1,13 +1,8 @@ import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http' import { provideHttpClientTesting } from '@angular/common/http/testing' import { ComponentFixture, TestBed } from '@angular/core/testing' -import { - FormsModule, - NG_VALUE_ACCESSOR, - ReactiveFormsModule, -} from '@angular/forms' +import { NG_VALUE_ACCESSOR } from '@angular/forms' import { By } from '@angular/platform-browser' -import { NgbModule } from '@ng-bootstrap/ng-bootstrap' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' import { @@ -36,12 +31,9 @@ describe('PermissionsSelectComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [PermissionsSelectComponent], imports: [ - FormsModule, - ReactiveFormsModule, - NgbModule, NgxBootstrapIconsModule.pick(allIcons), + PermissionsSelectComponent, ], providers: [ provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/common/permissions-select/permissions-select.component.ts b/src-ui/src/app/components/common/permissions-select/permissions-select.component.ts index 216862089..bca4eb628 100644 --- a/src-ui/src/app/components/common/permissions-select/permissions-select.component.ts +++ b/src-ui/src/app/components/common/permissions-select/permissions-select.component.ts @@ -1,11 +1,16 @@ +import { KeyValuePipe } from '@angular/common' import { Component, forwardRef, Input, OnInit } from '@angular/core' import { AbstractControl, ControlValueAccessor, FormControl, FormGroup, + FormsModule, NG_VALUE_ACCESSOR, + ReactiveFormsModule, } from '@angular/forms' +import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' import { PermissionAction, @@ -26,7 +31,13 @@ import { ComponentWithPermissions } from '../../with-permissions/with-permission selector: 'pngx-permissions-select', templateUrl: './permissions-select.component.html', styleUrls: ['./permissions-select.component.scss'], - standalone: false, + imports: [ + KeyValuePipe, + NgxBootstrapIconsModule, + NgbPopoverModule, + FormsModule, + ReactiveFormsModule, + ], }) export class PermissionsSelectComponent extends ComponentWithPermissions diff --git a/src-ui/src/app/components/common/preview-popup/preview-popup.component.spec.ts b/src-ui/src/app/components/common/preview-popup/preview-popup.component.spec.ts index 3b5e7e4ba..e8d34286e 100644 --- a/src-ui/src/app/components/common/preview-popup/preview-popup.component.spec.ts +++ b/src-ui/src/app/components/common/preview-popup/preview-popup.component.spec.ts @@ -7,13 +7,9 @@ import { } from '@angular/common/http' import { provideHttpClientTesting } from '@angular/common/http/testing' import { By } from '@angular/platform-browser' -import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap' -import { PdfViewerModule } from 'ng2-pdf-viewer' import { allIcons, NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { of, throwError } from 'rxjs' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' -import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe' -import { SafeUrlPipe } from 'src/app/pipes/safeurl.pipe' import { DocumentService } from 'src/app/services/rest/document.service' import { SettingsService } from 'src/app/services/settings.service' import { PreviewPopupComponent } from './preview-popup.component' @@ -36,12 +32,7 @@ describe('PreviewPopupComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [PreviewPopupComponent, SafeUrlPipe, DocumentTitlePipe], - imports: [ - NgxBootstrapIconsModule.pick(allIcons), - PdfViewerModule, - NgbPopoverModule, - ], + imports: [NgxBootstrapIconsModule.pick(allIcons)], providers: [ provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting(), diff --git a/src-ui/src/app/components/common/preview-popup/preview-popup.component.ts b/src-ui/src/app/components/common/preview-popup/preview-popup.component.ts index f3f3bd7a8..039264fd0 100644 --- a/src-ui/src/app/components/common/preview-popup/preview-popup.component.ts +++ b/src-ui/src/app/components/common/preview-popup/preview-popup.component.ts @@ -1,9 +1,13 @@ import { HttpClient } from '@angular/common/http' import { Component, Input, OnDestroy, ViewChild } from '@angular/core' -import { NgbPopover } from '@ng-bootstrap/ng-bootstrap' +import { NgbPopover, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap' +import { PdfViewerModule } from 'ng2-pdf-viewer' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { first, Subject, takeUntil } from 'rxjs' import { Document } from 'src/app/data/document' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' +import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe' +import { SafeUrlPipe } from 'src/app/pipes/safeurl.pipe' import { DocumentService } from 'src/app/services/rest/document.service' import { SettingsService } from 'src/app/services/settings.service' @@ -11,7 +15,13 @@ import { SettingsService } from 'src/app/services/settings.service' selector: 'pngx-preview-popup', templateUrl: './preview-popup.component.html', styleUrls: ['./preview-popup.component.scss'], - standalone: false, + imports: [ + NgbPopoverModule, + DocumentTitlePipe, + PdfViewerModule, + SafeUrlPipe, + NgxBootstrapIconsModule, + ], }) export class PreviewPopupComponent implements OnDestroy { private _document: Document diff --git a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts index d213c86e4..64e122612 100644 --- a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.spec.ts @@ -49,12 +49,6 @@ describe('ProfileEditDialogComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [ - ProfileEditDialogComponent, - TextComponent, - PasswordComponent, - ConfirmButtonComponent, - ], imports: [ ReactiveFormsModule, FormsModule, @@ -62,6 +56,10 @@ describe('ProfileEditDialogComponent', () => { NgbAccordionModule, NgxBootstrapIconsModule.pick(allIcons), NgbPopoverModule, + ProfileEditDialogComponent, + TextComponent, + PasswordComponent, + ConfirmButtonComponent, ], providers: [NgbActiveModal, provideHttpClient(withInterceptorsFromDi())], }) diff --git a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts index a9be14240..afffa7693 100644 --- a/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/profile-edit-dialog/profile-edit-dialog.component.ts @@ -1,22 +1,46 @@ import { Clipboard } from '@angular/cdk/clipboard' import { Component, OnInit } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' +import { + NgbAccordionModule, + NgbActiveModal, + NgbPopoverModule, +} from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { takeUntil } from 'rxjs' import { SocialAccount, SocialAccountProvider, TotpSettings, } from 'src/app/data/user-profile' +import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' import { ProfileService } from 'src/app/services/profile.service' import { ToastService } from 'src/app/services/toast.service' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' +import { ConfirmButtonComponent } from '../confirm-button/confirm-button.component' +import { PasswordComponent } from '../input/password/password.component' +import { TextComponent } from '../input/text/text.component' @Component({ selector: 'pngx-profile-edit-dialog', templateUrl: './profile-edit-dialog.component.html', styleUrls: ['./profile-edit-dialog.component.scss'], - standalone: false, + imports: [ + ConfirmButtonComponent, + TextComponent, + PasswordComponent, + FormsModule, + ReactiveFormsModule, + SafeHtmlPipe, + NgbAccordionModule, + NgbPopoverModule, + NgxBootstrapIconsModule, + ], }) export class ProfileEditDialogComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.spec.ts b/src-ui/src/app/components/common/select-dialog/select-dialog.component.spec.ts index cd4c0dcc3..d67ea42ba 100644 --- a/src-ui/src/app/components/common/select-dialog/select-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/select-dialog/select-dialog.component.spec.ts @@ -12,9 +12,14 @@ describe('SelectDialogComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [SelectDialogComponent, SelectComponent], providers: [NgbActiveModal], - imports: [NgSelectModule, FormsModule, ReactiveFormsModule], + imports: [ + NgSelectModule, + FormsModule, + ReactiveFormsModule, + SelectDialogComponent, + SelectComponent, + ], }).compileComponents() modal = TestBed.inject(NgbActiveModal) diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.ts b/src-ui/src/app/components/common/select-dialog/select-dialog.component.ts index fbd97bac4..3c6c98577 100644 --- a/src-ui/src/app/components/common/select-dialog/select-dialog.component.ts +++ b/src-ui/src/app/components/common/select-dialog/select-dialog.component.ts @@ -1,12 +1,14 @@ import { Component, EventEmitter, Input, Output } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { ObjectWithId } from 'src/app/data/object-with-id' +import { SelectComponent } from '../input/select/select.component' @Component({ selector: 'pngx-select-dialog', templateUrl: './select-dialog.component.html', styleUrls: ['./select-dialog.component.scss'], - standalone: false, + imports: [SelectComponent, FormsModule, ReactiveFormsModule], }) export class SelectDialogComponent { constructor(public activeModal: NgbActiveModal) {} diff --git a/src-ui/src/app/components/common/share-links-dropdown/share-links-dropdown.component.spec.ts b/src-ui/src/app/components/common/share-links-dropdown/share-links-dropdown.component.spec.ts index 8b3c71e2a..b7b0305be 100644 --- a/src-ui/src/app/components/common/share-links-dropdown/share-links-dropdown.component.spec.ts +++ b/src-ui/src/app/components/common/share-links-dropdown/share-links-dropdown.component.spec.ts @@ -10,7 +10,6 @@ import { fakeAsync, tick, } from '@angular/core/testing' -import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { By } from '@angular/platform-browser' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { of, throwError } from 'rxjs' @@ -30,10 +29,8 @@ describe('ShareLinksDropdownComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [ShareLinksDropdownComponent], imports: [ - FormsModule, - ReactiveFormsModule, + ShareLinksDropdownComponent, NgxBootstrapIconsModule.pick(allIcons), ], providers: [ diff --git a/src-ui/src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts b/src-ui/src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts index e97f2688e..5e65eed73 100644 --- a/src-ui/src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts +++ b/src-ui/src/app/components/common/share-links-dropdown/share-links-dropdown.component.ts @@ -1,5 +1,8 @@ import { Clipboard } from '@angular/cdk/clipboard' import { Component, Input, OnInit } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { first } from 'rxjs' import { FileVersion, ShareLink } from 'src/app/data/share-link' import { ShareLinkService } from 'src/app/services/rest/share-link.service' @@ -10,7 +13,12 @@ import { environment } from 'src/environments/environment' selector: 'pngx-share-links-dropdown', templateUrl: './share-links-dropdown.component.html', styleUrls: ['./share-links-dropdown.component.scss'], - standalone: false, + imports: [ + FormsModule, + ReactiveFormsModule, + NgbDropdownModule, + NgxBootstrapIconsModule, + ], }) export class ShareLinksDropdownComponent implements OnInit { EXPIRATION_OPTIONS = [ diff --git a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.spec.ts b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.spec.ts index 077a2d04e..cd076b185 100644 --- a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.spec.ts +++ b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.spec.ts @@ -1,4 +1,4 @@ -import { Clipboard, ClipboardModule } from '@angular/cdk/clipboard' +import { Clipboard } from '@angular/cdk/clipboard' import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http' import { provideHttpClientTesting } from '@angular/common/http/testing' import { @@ -7,19 +7,13 @@ import { fakeAsync, tick, } from '@angular/core/testing' -import { - NgbActiveModal, - NgbModalModule, - NgbPopoverModule, - NgbProgressbarModule, -} from '@ng-bootstrap/ng-bootstrap' +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { InstallType, SystemStatus, SystemStatusItemStatus, } from 'src/app/data/system-status' -import { FileSizePipe } from 'src/app/pipes/file-size.pipe' import { SystemStatusDialogComponent } from './system-status-dialog.component' const status: SystemStatus = { @@ -58,13 +52,9 @@ describe('SystemStatusDialogComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [SystemStatusDialogComponent, FileSizePipe], imports: [ - NgbModalModule, - ClipboardModule, + SystemStatusDialogComponent, NgxBootstrapIconsModule.pick(allIcons), - NgbPopoverModule, - NgbProgressbarModule, ], providers: [ NgbActiveModal, diff --git a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.ts b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.ts index 056c6bfa3..710d01dcf 100644 --- a/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.ts +++ b/src-ui/src/app/components/common/system-status-dialog/system-status-dialog.component.ts @@ -1,16 +1,32 @@ -import { Clipboard } from '@angular/cdk/clipboard' +import { Clipboard, ClipboardModule } from '@angular/cdk/clipboard' import { Component } from '@angular/core' -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' +import { + NgbActiveModal, + NgbModalModule, + NgbPopoverModule, + NgbProgressbarModule, +} from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { SystemStatus, SystemStatusItemStatus, } from 'src/app/data/system-status' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' +import { FileSizePipe } from 'src/app/pipes/file-size.pipe' @Component({ selector: 'pngx-system-status-dialog', templateUrl: './system-status-dialog.component.html', styleUrl: './system-status-dialog.component.scss', - standalone: false, + imports: [ + NgbModalModule, + ClipboardModule, + NgbPopoverModule, + NgbProgressbarModule, + CustomDatePipe, + FileSizePipe, + NgxBootstrapIconsModule, + ], }) export class SystemStatusDialogComponent { public SystemStatusItemStatus = SystemStatusItemStatus diff --git a/src-ui/src/app/components/common/tag/tag.component.spec.ts b/src-ui/src/app/components/common/tag/tag.component.spec.ts index 33d980e0a..6da8052ba 100644 --- a/src-ui/src/app/components/common/tag/tag.component.spec.ts +++ b/src-ui/src/app/components/common/tag/tag.component.spec.ts @@ -15,9 +15,8 @@ describe('TagComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [TagComponent], providers: [], - imports: [], + imports: [TagComponent], }).compileComponents() fixture = TestBed.createComponent(TagComponent) diff --git a/src-ui/src/app/components/common/tag/tag.component.ts b/src-ui/src/app/components/common/tag/tag.component.ts index 28aeffc38..0a052f9b5 100644 --- a/src-ui/src/app/components/common/tag/tag.component.ts +++ b/src-ui/src/app/components/common/tag/tag.component.ts @@ -5,7 +5,6 @@ import { Tag } from 'src/app/data/tag' selector: 'pngx-tag', templateUrl: './tag.component.html', styleUrls: ['./tag.component.scss'], - standalone: false, }) export class TagComponent { constructor() {} diff --git a/src-ui/src/app/components/common/toasts/toasts.component.spec.ts b/src-ui/src/app/components/common/toasts/toasts.component.spec.ts index 1a6b80931..449396134 100644 --- a/src-ui/src/app/components/common/toasts/toasts.component.spec.ts +++ b/src-ui/src/app/components/common/toasts/toasts.component.spec.ts @@ -9,7 +9,6 @@ import { flush, tick, } from '@angular/core/testing' -import { NgbModule } from '@ng-bootstrap/ng-bootstrap' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { of } from 'rxjs' import { ToastService } from 'src/app/services/toast.service' @@ -46,8 +45,7 @@ describe('ToastsComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ToastsComponent], - imports: [NgbModule, NgxBootstrapIconsModule.pick(allIcons)], + imports: [ToastsComponent, NgxBootstrapIconsModule.pick(allIcons)], providers: [ { provide: ToastService, diff --git a/src-ui/src/app/components/common/toasts/toasts.component.ts b/src-ui/src/app/components/common/toasts/toasts.component.ts index 9392f76de..bb791de11 100644 --- a/src-ui/src/app/components/common/toasts/toasts.component.ts +++ b/src-ui/src/app/components/common/toasts/toasts.component.ts @@ -1,5 +1,11 @@ import { Clipboard } from '@angular/cdk/clipboard' +import { DecimalPipe } from '@angular/common' import { Component, OnDestroy, OnInit } from '@angular/core' +import { + NgbProgressbarModule, + NgbToastModule, +} from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { Subscription, interval, take } from 'rxjs' import { Toast, ToastService } from 'src/app/services/toast.service' @@ -7,7 +13,12 @@ import { Toast, ToastService } from 'src/app/services/toast.service' selector: 'pngx-toasts', templateUrl: './toasts.component.html', styleUrls: ['./toasts.component.scss'], - standalone: false, + imports: [ + DecimalPipe, + NgbToastModule, + NgbProgressbarModule, + NgxBootstrapIconsModule, + ], }) export class ToastsComponent implements OnInit, OnDestroy { constructor( diff --git a/src-ui/src/app/components/dashboard/dashboard.component.spec.ts b/src-ui/src/app/components/dashboard/dashboard.component.spec.ts index 529e9ece2..2ff5eab78 100644 --- a/src-ui/src/app/components/dashboard/dashboard.component.spec.ts +++ b/src-ui/src/app/components/dashboard/dashboard.component.spec.ts @@ -72,7 +72,12 @@ describe('DashboardComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + NgbAlertModule, + RouterTestingModule, + TourNgBootstrapModule, + DragDropModule, + NgxBootstrapIconsModule.pick(allIcons), DashboardComponent, StatisticsWidgetComponent, PageHeaderComponent, @@ -82,13 +87,6 @@ describe('DashboardComponent', () => { SavedViewWidgetComponent, LogoComponent, ], - imports: [ - NgbAlertModule, - RouterTestingModule, - TourNgBootstrapModule, - DragDropModule, - NgxBootstrapIconsModule.pick(allIcons), - ], providers: [ PermissionsGuard, { diff --git a/src-ui/src/app/components/dashboard/dashboard.component.ts b/src-ui/src/app/components/dashboard/dashboard.component.ts index 928b2d632..8b45b6c8f 100644 --- a/src-ui/src/app/components/dashboard/dashboard.component.ts +++ b/src-ui/src/app/components/dashboard/dashboard.component.ts @@ -2,22 +2,39 @@ import { CdkDragDrop, CdkDragEnd, CdkDragStart, + DragDropModule, moveItemInArray, } from '@angular/cdk/drag-drop' import { Component } from '@angular/core' import { TourService } from 'ngx-ui-tour-ng-bootstrap' import { SavedView } from 'src/app/data/saved-view' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { SavedViewService } from 'src/app/services/rest/saved-view.service' import { SettingsService } from 'src/app/services/settings.service' import { ToastService } from 'src/app/services/toast.service' import { environment } from 'src/environments/environment' +import { LogoComponent } from '../common/logo/logo.component' +import { PageHeaderComponent } from '../common/page-header/page-header.component' import { ComponentWithPermissions } from '../with-permissions/with-permissions.component' +import { SavedViewWidgetComponent } from './widgets/saved-view-widget/saved-view-widget.component' +import { StatisticsWidgetComponent } from './widgets/statistics-widget/statistics-widget.component' +import { UploadFileWidgetComponent } from './widgets/upload-file-widget/upload-file-widget.component' +import { WelcomeWidgetComponent } from './widgets/welcome-widget/welcome-widget.component' @Component({ selector: 'pngx-dashboard', templateUrl: './dashboard.component.html', styleUrls: ['./dashboard.component.scss'], - standalone: false, + imports: [ + PageHeaderComponent, + UploadFileWidgetComponent, + WelcomeWidgetComponent, + SavedViewWidgetComponent, + StatisticsWidgetComponent, + IfPermissionsDirective, + DragDropModule, + LogoComponent, + ], }) export class DashboardComponent extends ComponentWithPermissions { public dashboardViews: SavedView[] = [] diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.spec.ts b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.spec.ts index 6f8cb2183..d827c9305 100644 --- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.spec.ts +++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.spec.ts @@ -117,7 +117,11 @@ describe('SavedViewWidgetComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + NgbModule, + RouterTestingModule.withRoutes(routes), + DragDropModule, + NgxBootstrapIconsModule.pick(allIcons), SavedViewWidgetComponent, WidgetFrameComponent, IfPermissionsDirective, @@ -127,12 +131,6 @@ describe('SavedViewWidgetComponent', () => { PreviewPopupComponent, CustomFieldDisplayComponent, ], - imports: [ - NgbModule, - RouterTestingModule.withRoutes(routes), - DragDropModule, - NgxBootstrapIconsModule.pick(allIcons), - ], providers: [ PermissionsGuard, DocumentService, diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts index bc673bfaf..0dbb0513f 100644 --- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts +++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.ts @@ -1,3 +1,4 @@ +import { AsyncPipe, NgClass, NgStyle } from '@angular/common' import { Component, Input, @@ -6,9 +7,14 @@ import { QueryList, ViewChildren, } from '@angular/core' -import { Router } from '@angular/router' +import { Router, RouterModule } from '@angular/router' import { NgbPopover } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { delay, Subject, takeUntil, tap } from 'rxjs' +import { PreviewPopupComponent } from 'src/app/components/common/preview-popup/preview-popup.component' +import { TagComponent } from 'src/app/components/common/tag/tag.component' +import { DocumentCardLargeComponent } from 'src/app/components/document-list/document-card-large/document-card-large.component' +import { DocumentCardSmallComponent } from 'src/app/components/document-list/document-card-small/document-card-small.component' import { LoadingComponentWithPermissions } from 'src/app/components/loading-component/loading.component' import { CustomField, CustomFieldDataType } from 'src/app/data/custom-field' import { @@ -27,6 +33,9 @@ import { FILTER_STORAGE_PATH, } from 'src/app/data/filter-rule-type' import { SavedView } from 'src/app/data/saved-view' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' +import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe' import { ConsumerStatusService } from 'src/app/services/consumer-status.service' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { OpenDocumentsService } from 'src/app/services/open-documents.service' @@ -38,12 +47,27 @@ import { import { CustomFieldsService } from 'src/app/services/rest/custom-fields.service' import { DocumentService } from 'src/app/services/rest/document.service' import { SettingsService } from 'src/app/services/settings.service' +import { WidgetFrameComponent } from '../widget-frame/widget-frame.component' @Component({ selector: 'pngx-saved-view-widget', templateUrl: './saved-view-widget.component.html', styleUrls: ['./saved-view-widget.component.scss'], - standalone: false, + imports: [ + DocumentCardSmallComponent, + DocumentCardLargeComponent, + PreviewPopupComponent, + TagComponent, + WidgetFrameComponent, + IfPermissionsDirective, + AsyncPipe, + DocumentTitlePipe, + CustomDatePipe, + NgClass, + NgStyle, + RouterModule, + NgxBootstrapIconsModule, + ], }) export class SavedViewWidgetComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.spec.ts b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.spec.ts index beece0c43..da0c2c083 100644 --- a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.spec.ts +++ b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.spec.ts @@ -28,15 +28,13 @@ describe('StatisticsWidgetComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - StatisticsWidgetComponent, - WidgetFrameComponent, - IfPermissionsDirective, - ], imports: [ NgbModule, RouterTestingModule.withRoutes(routes), DragDropModule, + StatisticsWidgetComponent, + WidgetFrameComponent, + IfPermissionsDirective, ], providers: [ PermissionsGuard, diff --git a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.ts index 7e3f9dbcf..f54852429 100644 --- a/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.ts +++ b/src-ui/src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.ts @@ -1,12 +1,17 @@ +import { DecimalPipe } from '@angular/common' import { HttpClient } from '@angular/common/http' import { Component, OnDestroy, OnInit } from '@angular/core' +import { RouterModule } from '@angular/router' +import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap' import * as mimeTypeNames from 'mime-names' import { first, Subject, Subscription, takeUntil } from 'rxjs' import { ComponentWithPermissions } from 'src/app/components/with-permissions/with-permissions.component' import { FILTER_HAS_TAGS_ANY } from 'src/app/data/filter-rule-type' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { ConsumerStatusService } from 'src/app/services/consumer-status.service' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { environment } from 'src/environments/environment' +import { WidgetFrameComponent } from '../widget-frame/widget-frame.component' export interface Statistics { documents_total?: number @@ -30,7 +35,13 @@ interface DocumentFileType { selector: 'pngx-statistics-widget', templateUrl: './statistics-widget.component.html', styleUrls: ['./statistics-widget.component.scss'], - standalone: false, + imports: [ + WidgetFrameComponent, + IfPermissionsDirective, + NgbPopoverModule, + DecimalPipe, + RouterModule, + ], }) export class StatisticsWidgetComponent extends ComponentWithPermissions diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html index e63859754..677be66a4 100644 --- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html +++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html @@ -2,7 +2,7 @@
Drop documents anywhere or - +
@if (getStatus().length > 0) { diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.spec.ts b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.spec.ts index 882109f40..cc1591966 100644 --- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.spec.ts +++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.spec.ts @@ -1,4 +1,3 @@ -import { DragDropModule } from '@angular/cdk/drag-drop' import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http' import { provideHttpClientTesting } from '@angular/common/http/testing' import { @@ -9,15 +8,9 @@ import { } from '@angular/core/testing' import { By } from '@angular/platform-browser' import { RouterTestingModule } from '@angular/router/testing' -import { - NgbAlert, - NgbAlertModule, - NgbCollapse, - NgbModule, -} from '@ng-bootstrap/ng-bootstrap' +import { NgbAlert, NgbCollapse } from '@ng-bootstrap/ng-bootstrap' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { routes } from 'src/app/app-routing.module' -import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { PermissionsGuard } from 'src/app/guards/permissions.guard' import { ConsumerStatusService, @@ -26,7 +19,6 @@ import { } from 'src/app/services/consumer-status.service' import { PermissionsService } from 'src/app/services/permissions.service' import { UploadDocumentsService } from 'src/app/services/upload-documents.service' -import { WidgetFrameComponent } from '../widget-frame/widget-frame.component' import { UploadFileWidgetComponent } from './upload-file-widget.component' const FAILED_STATUSES = [new FileStatus()] @@ -55,17 +47,10 @@ describe('UploadFileWidgetComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - UploadFileWidgetComponent, - WidgetFrameComponent, - IfPermissionsDirective, - ], imports: [ - NgbModule, RouterTestingModule.withRoutes(routes), - NgbAlertModule, - DragDropModule, NgxBootstrapIconsModule.pick(allIcons), + UploadFileWidgetComponent, ], providers: [ PermissionsGuard, diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts index e260450be..f237ab7aa 100644 --- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts +++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts @@ -1,7 +1,17 @@ +import { NgClass, NgTemplateOutlet } from '@angular/common' import { Component, QueryList, ViewChildren } from '@angular/core' -import { NgbAlert } from '@ng-bootstrap/ng-bootstrap' +import { RouterModule } from '@angular/router' +import { + NgbAlert, + NgbAlertModule, + NgbCollapseModule, + NgbProgressbarModule, +} from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' +import { TourNgBootstrapModule } from 'ngx-ui-tour-ng-bootstrap' import { ComponentWithPermissions } from 'src/app/components/with-permissions/with-permissions.component' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { ConsumerStatusService, FileStatus, @@ -9,6 +19,7 @@ import { } from 'src/app/services/consumer-status.service' import { SettingsService } from 'src/app/services/settings.service' import { UploadDocumentsService } from 'src/app/services/upload-documents.service' +import { WidgetFrameComponent } from '../widget-frame/widget-frame.component' const MAX_ALERTS = 5 @@ -16,7 +27,18 @@ const MAX_ALERTS = 5 selector: 'pngx-upload-file-widget', templateUrl: './upload-file-widget.component.html', styleUrls: ['./upload-file-widget.component.scss'], - standalone: false, + imports: [ + WidgetFrameComponent, + IfPermissionsDirective, + NgClass, + NgTemplateOutlet, + RouterModule, + NgbAlertModule, + NgbCollapseModule, + NgbProgressbarModule, + NgxBootstrapIconsModule, + TourNgBootstrapModule, + ], }) export class UploadFileWidgetComponent extends ComponentWithPermissions { alertsExpanded = false diff --git a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.spec.ts b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.spec.ts index a06bf55e0..c721c7b51 100644 --- a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.spec.ts +++ b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.spec.ts @@ -11,9 +11,8 @@ describe('WelcomeWidgetComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [WelcomeWidgetComponent, WidgetFrameComponent], providers: [PermissionsGuard], - imports: [NgbAlertModule], + imports: [NgbAlertModule, WelcomeWidgetComponent, WidgetFrameComponent], }).compileComponents() fixture = TestBed.createComponent(WelcomeWidgetComponent) diff --git a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.ts index e5ee1741f..37de0865a 100644 --- a/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.ts +++ b/src-ui/src/app/components/dashboard/widgets/welcome-widget/welcome-widget.component.ts @@ -1,11 +1,12 @@ import { Component, EventEmitter, Output } from '@angular/core' +import { NgbAlertModule } from '@ng-bootstrap/ng-bootstrap' import { TourService } from 'ngx-ui-tour-ng-bootstrap' @Component({ selector: 'pngx-welcome-widget', templateUrl: './welcome-widget.component.html', styleUrls: ['./welcome-widget.component.scss'], - standalone: false, + imports: [NgbAlertModule], }) export class WelcomeWidgetComponent { constructor(public readonly tourService: TourService) {} diff --git a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.spec.ts b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.spec.ts index 913a49a07..e61697587 100644 --- a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.spec.ts +++ b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.spec.ts @@ -19,7 +19,6 @@ import { WidgetFrameComponent } from './widget-frame.component'
`, - standalone: false, }) class TestComponent extends WidgetFrameComponent {} @@ -29,9 +28,13 @@ describe('WidgetFrameComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [WidgetFrameComponent, WidgetFrameComponent], providers: [PermissionsGuard], - imports: [NgbAlertModule, DragDropModule], + imports: [ + NgbAlertModule, + DragDropModule, + WidgetFrameComponent, + WidgetFrameComponent, + ], }).compileComponents() fixture = TestBed.createComponent(WidgetFrameComponent) diff --git a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.ts b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.ts index f5fe49938..109608daa 100644 --- a/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.ts +++ b/src-ui/src/app/components/dashboard/widgets/widget-frame/widget-frame.component.ts @@ -1,11 +1,13 @@ +import { DragDropModule } from '@angular/cdk/drag-drop' import { AfterViewInit, Component, Input } from '@angular/core' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { LoadingComponentWithPermissions } from 'src/app/components/loading-component/loading.component' @Component({ selector: 'pngx-widget-frame', templateUrl: './widget-frame.component.html', styleUrls: ['./widget-frame.component.scss'], - standalone: false, + imports: [DragDropModule, NgxBootstrapIconsModule], }) export class WidgetFrameComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/document-asn/document-asn.component.spec.ts b/src-ui/src/app/components/document-asn/document-asn.component.spec.ts index d56e0b0ee..a523c0ab7 100644 --- a/src-ui/src/app/components/document-asn/document-asn.component.spec.ts +++ b/src-ui/src/app/components/document-asn/document-asn.component.spec.ts @@ -16,7 +16,6 @@ describe('DocumentAsnComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [DocumentAsnComponent], providers: [ { provide: DocumentService, @@ -27,7 +26,7 @@ describe('DocumentAsnComponent', () => { }, PermissionsGuard, ], - imports: [RouterTestingModule.withRoutes(routes)], + imports: [RouterTestingModule.withRoutes(routes), DocumentAsnComponent], }).compileComponents() router = TestBed.inject(Router) diff --git a/src-ui/src/app/components/document-asn/document-asn.component.ts b/src-ui/src/app/components/document-asn/document-asn.component.ts index 5dcea329a..d2001cc37 100644 --- a/src-ui/src/app/components/document-asn/document-asn.component.ts +++ b/src-ui/src/app/components/document-asn/document-asn.component.ts @@ -7,7 +7,6 @@ import { DocumentService } from '../../services/rest/document.service' selector: 'pngx-document-asncomponent', templateUrl: './document-asn.component.html', styleUrls: ['./document-asn.component.scss'], - standalone: false, }) export class DocumentAsnComponent implements OnInit { asn: string diff --git a/src-ui/src/app/components/document-detail/document-detail.component.html b/src-ui/src/app/components/document-detail/document-detail.component.html index ba91d7f5d..9686ab4d0 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.html +++ b/src-ui/src/app/components/document-detail/document-detail.component.html @@ -352,7 +352,9 @@
- Document loading... + @if (showThumbnailOverlay) { + Document loading... + }
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.spec.ts b/src-ui/src/app/components/document-detail/document-detail.component.spec.ts index d0951af1a..fb2596d4a 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.spec.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.spec.ts @@ -11,7 +11,6 @@ import { fakeAsync, tick, } from '@angular/core/testing' -import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { By } from '@angular/platform-browser' import { ActivatedRoute, @@ -22,12 +21,8 @@ import { import { NgbDateStruct, NgbModal, - NgbModalModule, NgbModalRef, - NgbModule, } from '@ng-bootstrap/ng-bootstrap' -import { NgSelectModule } from '@ng-select/ng-select' -import { PdfViewerModule } from 'ng2-pdf-viewer' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { of, throwError } from 'rxjs' import { routes } from 'src/app/app-routing.module' @@ -47,13 +42,9 @@ import { } from 'src/app/data/filter-rule-type' import { StoragePath } from 'src/app/data/storage-path' import { Tag } from 'src/app/data/tag' -import { IfOwnerDirective } from 'src/app/directives/if-owner.directive' -import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { PermissionsGuard } from 'src/app/guards/permissions.guard' import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe' -import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' -import { SafeUrlPipe } from 'src/app/pipes/safeurl.pipe' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { OpenDocumentsService } from 'src/app/services/open-documents.service' import { PermissionsService } from 'src/app/services/permissions.service' @@ -68,23 +59,7 @@ import { SettingsService } from 'src/app/services/settings.service' import { ToastService } from 'src/app/services/toast.service' import { environment } from 'src/environments/environment' import { ConfirmDialogComponent } from '../common/confirm-dialog/confirm-dialog.component' -import { DeletePagesConfirmDialogComponent } from '../common/confirm-dialog/delete-pages-confirm-dialog/delete-pages-confirm-dialog.component' -import { RotateConfirmDialogComponent } from '../common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component' -import { SplitConfirmDialogComponent } from '../common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component' import { CustomFieldsDropdownComponent } from '../common/custom-fields-dropdown/custom-fields-dropdown.component' -import { CorrespondentEditDialogComponent } from '../common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component' -import { DocumentTypeEditDialogComponent } from '../common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component' -import { StoragePathEditDialogComponent } from '../common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component' -import { DateComponent } from '../common/input/date/date.component' -import { NumberComponent } from '../common/input/number/number.component' -import { PermissionsFormComponent } from '../common/input/permissions/permissions-form/permissions-form.component' -import { SelectComponent } from '../common/input/select/select.component' -import { TagsComponent } from '../common/input/tags/tags.component' -import { TextComponent } from '../common/input/text/text.component' -import { TextAreaComponent } from '../common/input/textarea/textarea.component' -import { PageHeaderComponent } from '../common/page-header/page-header.component' -import { ShareLinksDropdownComponent } from '../common/share-links-dropdown/share-links-dropdown.component' -import { DocumentNotesComponent } from '../document-notes/document-notes.component' import { DocumentDetailComponent } from './document-detail.component' const doc: Document = { @@ -159,42 +134,10 @@ describe('DocumentDetailComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - DocumentDetailComponent, - DocumentTitlePipe, - PageHeaderComponent, - IfPermissionsDirective, - TagsComponent, - SelectComponent, - TextComponent, - NumberComponent, - DateComponent, - DocumentNotesComponent, - CustomDatePipe, - DocumentTypeEditDialogComponent, - CorrespondentEditDialogComponent, - StoragePathEditDialogComponent, - IfOwnerDirective, - PermissionsFormComponent, - SafeHtmlPipe, - ConfirmDialogComponent, - SafeUrlPipe, - ShareLinksDropdownComponent, - CustomFieldsDropdownComponent, - SplitConfirmDialogComponent, - RotateConfirmDialogComponent, - DeletePagesConfirmDialogComponent, - TextAreaComponent, - ], imports: [ + DocumentDetailComponent, RouterModule.forRoot(routes), - NgbModule, - NgSelectModule, - FormsModule, - ReactiveFormsModule, - NgbModalModule, NgxBootstrapIconsModule.pick(allIcons), - PdfViewerModule, ], providers: [ DocumentTitlePipe, diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index d3ba04a90..751dc0e11 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -1,15 +1,25 @@ +import { AsyncPipe, NgTemplateOutlet } from '@angular/common' import { HttpClient } from '@angular/common/http' import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core' -import { FormArray, FormControl, FormGroup } from '@angular/forms' +import { + FormArray, + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' import { ActivatedRoute, Router } from '@angular/router' import { NgbDateStruct, + NgbDropdownModule, NgbModal, NgbNav, NgbNavChangeEvent, + NgbNavModule, } from '@ng-bootstrap/ng-bootstrap' import { dirtyCheck, DirtyComponent } from '@ngneat/dirty-check-forms' -import { PDFDocumentProxy } from 'ng2-pdf-viewer' +import { PDFDocumentProxy, PdfViewerModule } from 'ng2-pdf-viewer' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { BehaviorSubject, Observable, Subject } from 'rxjs' import { debounceTime, @@ -44,7 +54,11 @@ import { StoragePath } from 'src/app/data/storage-path' import { Tag } from 'src/app/data/tag' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' import { User } from 'src/app/data/user' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe' +import { FileSizePipe } from 'src/app/pipes/file-size.pipe' +import { SafeUrlPipe } from 'src/app/pipes/safeurl.pipe' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { HotKeyService } from 'src/app/services/hot-key.service' import { OpenDocumentsService } from 'src/app/services/open-documents.service' @@ -67,12 +81,27 @@ import { ConfirmDialogComponent } from '../common/confirm-dialog/confirm-dialog. import { DeletePagesConfirmDialogComponent } from '../common/confirm-dialog/delete-pages-confirm-dialog/delete-pages-confirm-dialog.component' import { RotateConfirmDialogComponent } from '../common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component' import { SplitConfirmDialogComponent } from '../common/confirm-dialog/split-confirm-dialog/split-confirm-dialog.component' +import { CustomFieldsDropdownComponent } from '../common/custom-fields-dropdown/custom-fields-dropdown.component' import { CorrespondentEditDialogComponent } from '../common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component' import { DocumentTypeEditDialogComponent } from '../common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component' import { EditDialogMode } from '../common/edit-dialog/edit-dialog.component' import { StoragePathEditDialogComponent } from '../common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component' +import { CheckComponent } from '../common/input/check/check.component' +import { DateComponent } from '../common/input/date/date.component' +import { DocumentLinkComponent } from '../common/input/document-link/document-link.component' +import { MonetaryComponent } from '../common/input/monetary/monetary.component' +import { NumberComponent } from '../common/input/number/number.component' +import { PermissionsFormComponent } from '../common/input/permissions/permissions-form/permissions-form.component' +import { SelectComponent } from '../common/input/select/select.component' +import { TagsComponent } from '../common/input/tags/tags.component' import { TextComponent } from '../common/input/text/text.component' +import { UrlComponent } from '../common/input/url/url.component' +import { PageHeaderComponent } from '../common/page-header/page-header.component' +import { ShareLinksDropdownComponent } from '../common/share-links-dropdown/share-links-dropdown.component' +import { DocumentHistoryComponent } from '../document-history/document-history.component' +import { DocumentNotesComponent } from '../document-notes/document-notes.component' import { ComponentWithPermissions } from '../with-permissions/with-permissions.component' +import { MetadataCollapseComponent } from './metadata-collapse/metadata-collapse.component' enum DocumentDetailNavIDs { Details = 1, @@ -109,7 +138,36 @@ enum ZoomSetting { selector: 'pngx-document-detail', templateUrl: './document-detail.component.html', styleUrls: ['./document-detail.component.scss'], - standalone: false, + imports: [ + PageHeaderComponent, + CustomFieldsDropdownComponent, + DocumentNotesComponent, + DocumentHistoryComponent, + ShareLinksDropdownComponent, + CheckComponent, + DateComponent, + DocumentLinkComponent, + MetadataCollapseComponent, + PermissionsFormComponent, + SelectComponent, + TagsComponent, + TextComponent, + NumberComponent, + MonetaryComponent, + UrlComponent, + CustomDatePipe, + FileSizePipe, + IfPermissionsDirective, + AsyncPipe, + FormsModule, + ReactiveFormsModule, + NgTemplateOutlet, + SafeUrlPipe, + NgbNavModule, + NgbDropdownModule, + NgxBootstrapIconsModule, + PdfViewerModule, + ], }) export class DocumentDetailComponent extends ComponentWithPermissions diff --git a/src-ui/src/app/components/document-detail/metadata-collapse/metadata-collapse.component.spec.ts b/src-ui/src/app/components/document-detail/metadata-collapse/metadata-collapse.component.spec.ts index 056b8bef3..f70df7202 100644 --- a/src-ui/src/app/components/document-detail/metadata-collapse/metadata-collapse.component.spec.ts +++ b/src-ui/src/app/components/document-detail/metadata-collapse/metadata-collapse.component.spec.ts @@ -1,5 +1,4 @@ import { ComponentFixture, TestBed } from '@angular/core/testing' -import { NgbCollapseModule } from '@ng-bootstrap/ng-bootstrap' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { MetadataCollapseComponent } from './metadata-collapse.component' @@ -24,9 +23,11 @@ describe('MetadataCollapseComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [MetadataCollapseComponent], providers: [], - imports: [NgbCollapseModule, NgxBootstrapIconsModule.pick(allIcons)], + imports: [ + MetadataCollapseComponent, + NgxBootstrapIconsModule.pick(allIcons), + ], }).compileComponents() fixture = TestBed.createComponent(MetadataCollapseComponent) diff --git a/src-ui/src/app/components/document-detail/metadata-collapse/metadata-collapse.component.ts b/src-ui/src/app/components/document-detail/metadata-collapse/metadata-collapse.component.ts index 1010a791e..586170e88 100644 --- a/src-ui/src/app/components/document-detail/metadata-collapse/metadata-collapse.component.ts +++ b/src-ui/src/app/components/document-detail/metadata-collapse/metadata-collapse.component.ts @@ -1,10 +1,12 @@ import { Component, Input } from '@angular/core' +import { NgbCollapseModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' @Component({ selector: 'pngx-metadata-collapse', templateUrl: './metadata-collapse.component.html', styleUrls: ['./metadata-collapse.component.scss'], - standalone: false, + imports: [NgbCollapseModule, NgxBootstrapIconsModule], }) export class MetadataCollapseComponent { constructor() {} diff --git a/src-ui/src/app/components/document-history/document-history.component.spec.ts b/src-ui/src/app/components/document-history/document-history.component.spec.ts index f8758c381..68b037b02 100644 --- a/src-ui/src/app/components/document-history/document-history.component.spec.ts +++ b/src-ui/src/app/components/document-history/document-history.component.spec.ts @@ -3,12 +3,11 @@ import { ComponentFixture, TestBed } from '@angular/core/testing' import { DatePipe } from '@angular/common' import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http' import { provideHttpClientTesting } from '@angular/common/http/testing' -import { NgbCollapseModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap' +import { NgbCollapseModule } from '@ng-bootstrap/ng-bootstrap' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { of } from 'rxjs' import { AuditLogAction } from 'src/app/data/auditlog-entry' import { DataType } from 'src/app/data/datatype' -import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' import { CorrespondentService } from 'src/app/services/rest/correspondent.service' import { DocumentTypeService } from 'src/app/services/rest/document-type.service' import { DocumentService } from 'src/app/services/rest/document.service' @@ -27,11 +26,10 @@ describe('DocumentHistoryComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [DocumentHistoryComponent, CustomDatePipe], imports: [ + DocumentHistoryComponent, NgbCollapseModule, NgxBootstrapIconsModule.pick(allIcons), - NgbTooltipModule, ], providers: [ DatePipe, diff --git a/src-ui/src/app/components/document-history/document-history.component.ts b/src-ui/src/app/components/document-history/document-history.component.ts index 069b2bdd9..58ce8cb8b 100644 --- a/src-ui/src/app/components/document-history/document-history.component.ts +++ b/src-ui/src/app/components/document-history/document-history.component.ts @@ -1,7 +1,11 @@ +import { AsyncPipe, KeyValuePipe, TitleCasePipe } from '@angular/common' import { Component, Input, OnInit } from '@angular/core' +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { Observable, first, map, of } from 'rxjs' import { AuditLogAction, AuditLogEntry } from 'src/app/data/auditlog-entry' import { DataType } from 'src/app/data/datatype' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' import { CorrespondentService } from 'src/app/services/rest/correspondent.service' import { DocumentTypeService } from 'src/app/services/rest/document-type.service' import { DocumentService } from 'src/app/services/rest/document.service' @@ -12,7 +16,14 @@ import { UserService } from 'src/app/services/rest/user.service' selector: 'pngx-document-history', templateUrl: './document-history.component.html', styleUrl: './document-history.component.scss', - standalone: false, + imports: [ + CustomDatePipe, + NgbTooltipModule, + AsyncPipe, + KeyValuePipe, + TitleCasePipe, + NgxBootstrapIconsModule, + ], }) export class DocumentHistoryComponent implements OnInit { public AuditLogAction = AuditLogAction diff --git a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.spec.ts b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.spec.ts index 0b0698907..21b8f4175 100644 --- a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.spec.ts +++ b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.spec.ts @@ -4,15 +4,8 @@ import { provideHttpClientTesting, } from '@angular/common/http/testing' import { ComponentFixture, TestBed } from '@angular/core/testing' -import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { By } from '@angular/platform-browser' -import { - NgbModal, - NgbModalModule, - NgbModalRef, - NgbModule, -} from '@ng-bootstrap/ng-bootstrap' -import { NgSelectModule } from '@ng-select/ng-select' +import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { of, throwError } from 'rxjs' import { Correspondent } from 'src/app/data/correspondent' @@ -21,10 +14,7 @@ import { DocumentType } from 'src/app/data/document-type' import { Results } from 'src/app/data/results' import { StoragePath } from 'src/app/data/storage-path' import { Tag } from 'src/app/data/tag' -import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { FilterPipe } from 'src/app/pipes/filter.pipe' -import { IsNumberPipe } from 'src/app/pipes/is-number.pipe' -import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { PermissionsService } from 'src/app/services/permissions.service' import { CorrespondentService } from 'src/app/services/rest/correspondent.service' @@ -41,9 +31,6 @@ import { UserService } from 'src/app/services/rest/user.service' import { SettingsService } from 'src/app/services/settings.service' import { ToastService } from 'src/app/services/toast.service' import { environment } from 'src/environments/environment' -import { ConfirmDialogComponent } from '../../common/confirm-dialog/confirm-dialog.component' -import { MergeConfirmDialogComponent } from '../../common/confirm-dialog/merge-confirm-dialog/merge-confirm-dialog.component' -import { RotateConfirmDialogComponent } from '../../common/confirm-dialog/rotate-confirm-dialog/rotate-confirm-dialog.component' import { CorrespondentEditDialogComponent } from '../../common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component' import { CustomFieldEditDialogComponent } from '../../common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component' import { DocumentTypeEditDialogComponent } from '../../common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component' @@ -51,13 +38,6 @@ import { EditDialogMode } from '../../common/edit-dialog/edit-dialog.component' import { StoragePathEditDialogComponent } from '../../common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component' import { TagEditDialogComponent } from '../../common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component' import { FilterableDropdownComponent } from '../../common/filterable-dropdown/filterable-dropdown.component' -import { ToggleableDropdownButtonComponent } from '../../common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component' -import { PermissionsFormComponent } from '../../common/input/permissions/permissions-form/permissions-form.component' -import { PermissionsGroupComponent } from '../../common/input/permissions/permissions-group/permissions-group.component' -import { PermissionsUserComponent } from '../../common/input/permissions/permissions-user/permissions-user.component' -import { SelectComponent } from '../../common/input/select/select.component' -import { SwitchComponent } from '../../common/input/switch/switch.component' -import { PermissionsDialogComponent } from '../../common/permissions-dialog/permissions-dialog.component' import { BulkEditorComponent } from './bulk-editor.component' const selectionData: SelectionData = { @@ -95,32 +75,7 @@ describe('BulkEditorComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - BulkEditorComponent, - IfPermissionsDirective, - FilterableDropdownComponent, - ToggleableDropdownButtonComponent, - FilterPipe, - ConfirmDialogComponent, - SafeHtmlPipe, - PermissionsDialogComponent, - PermissionsFormComponent, - SelectComponent, - PermissionsGroupComponent, - PermissionsUserComponent, - SwitchComponent, - RotateConfirmDialogComponent, - IsNumberPipe, - MergeConfirmDialogComponent, - ], - imports: [ - FormsModule, - ReactiveFormsModule, - NgbModule, - NgbModalModule, - NgSelectModule, - NgxBootstrapIconsModule.pick(allIcons), - ], + imports: [BulkEditorComponent, NgxBootstrapIconsModule.pick(allIcons)], providers: [ PermissionsService, { diff --git a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts index a3f5ddf82..bc7492bc5 100644 --- a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts +++ b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts @@ -1,7 +1,17 @@ import { Component, Input, OnDestroy, OnInit } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' -import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' +import { + NgbDropdownModule, + NgbModal, + NgbModalRef, +} from '@ng-bootstrap/ng-bootstrap' import { saveAs } from 'file-saver' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { first, map, Subject, switchMap, takeUntil } from 'rxjs' import { ConfirmDialogComponent } from 'src/app/components/common/confirm-dialog/confirm-dialog.component' import { Correspondent } from 'src/app/data/correspondent' @@ -11,6 +21,7 @@ import { MatchingModel } from 'src/app/data/matching-model' import { StoragePath } from 'src/app/data/storage-path' import { Tag } from 'src/app/data/tag' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { OpenDocumentsService } from 'src/app/services/open-documents.service' import { @@ -39,6 +50,7 @@ import { StoragePathEditDialogComponent } from '../../common/edit-dialog/storage import { TagEditDialogComponent } from '../../common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component' import { ChangedItems, + FilterableDropdownComponent, FilterableDropdownSelectionModel, } from '../../common/filterable-dropdown/filterable-dropdown.component' import { ToggleableItemState } from '../../common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component' @@ -50,7 +62,14 @@ import { CustomFieldsBulkEditDialogComponent } from './custom-fields-bulk-edit-d selector: 'pngx-bulk-editor', templateUrl: './bulk-editor.component.html', styleUrls: ['./bulk-editor.component.scss'], - standalone: false, + imports: [ + FilterableDropdownComponent, + IfPermissionsDirective, + FormsModule, + ReactiveFormsModule, + NgbDropdownModule, + NgxBootstrapIconsModule, + ], }) export class BulkEditorComponent extends ComponentWithPermissions diff --git a/src-ui/src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.spec.ts b/src-ui/src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.spec.ts index a03a1ca62..40ec327ba 100644 --- a/src-ui/src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.spec.ts +++ b/src-ui/src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.spec.ts @@ -2,11 +2,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing' import { provideHttpClient } from '@angular/common/http' import { provideHttpClientTesting } from '@angular/common/http/testing' -import { FormsModule, ReactiveFormsModule } from '@angular/forms' -import { NgbActiveModal, NgbModule } from '@ng-bootstrap/ng-bootstrap' -import { NgSelectModule } from '@ng-select/ng-select' +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { of, throwError } from 'rxjs' -import { SelectComponent } from 'src/app/components/common/input/select/select.component' import { CustomFieldDataType } from 'src/app/data/custom-field' import { DocumentService } from 'src/app/services/rest/document.service' import { CustomFieldsBulkEditDialogComponent } from './custom-fields-bulk-edit-dialog.component' @@ -19,8 +16,8 @@ describe('CustomFieldsBulkEditDialogComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [CustomFieldsBulkEditDialogComponent, SelectComponent], - imports: [FormsModule, ReactiveFormsModule, NgbModule, NgSelectModule], + declarations: [], + imports: [CustomFieldsBulkEditDialogComponent], providers: [ NgbActiveModal, provideHttpClient(), diff --git a/src-ui/src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.ts b/src-ui/src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.ts index 9a253f488..132fc5a36 100644 --- a/src-ui/src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.ts +++ b/src-ui/src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.ts @@ -1,7 +1,21 @@ import { Component, EventEmitter, Output } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { first } from 'rxjs' +import { CheckComponent } from 'src/app/components/common/input/check/check.component' +import { DateComponent } from 'src/app/components/common/input/date/date.component' +import { DocumentLinkComponent } from 'src/app/components/common/input/document-link/document-link.component' +import { MonetaryComponent } from 'src/app/components/common/input/monetary/monetary.component' +import { NumberComponent } from 'src/app/components/common/input/number/number.component' +import { SelectComponent } from 'src/app/components/common/input/select/select.component' +import { TextComponent } from 'src/app/components/common/input/text/text.component' +import { UrlComponent } from 'src/app/components/common/input/url/url.component' import { CustomField, CustomFieldDataType } from 'src/app/data/custom-field' import { DocumentService } from 'src/app/services/rest/document.service' @@ -9,6 +23,19 @@ import { DocumentService } from 'src/app/services/rest/document.service' selector: 'pngx-custom-fields-bulk-edit-dialog', templateUrl: './custom-fields-bulk-edit-dialog.component.html', styleUrl: './custom-fields-bulk-edit-dialog.component.scss', + imports: [ + CheckComponent, + DateComponent, + DocumentLinkComponent, + MonetaryComponent, + NumberComponent, + SelectComponent, + TextComponent, + UrlComponent, + FormsModule, + ReactiveFormsModule, + NgxBootstrapIconsModule, + ], }) export class CustomFieldsBulkEditDialogComponent { CustomFieldDataType = CustomFieldDataType diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts index 237ee58c4..4d62c6a0a 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts @@ -43,7 +43,12 @@ describe('DocumentCardLargeComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + RouterTestingModule, + NgbPopoverModule, + NgbTooltipModule, + NgbProgressbarModule, + NgxBootstrapIconsModule.pick(allIcons), DocumentCardLargeComponent, DocumentTitlePipe, CustomDatePipe, @@ -53,13 +58,6 @@ describe('DocumentCardLargeComponent', () => { PreviewPopupComponent, CustomFieldDisplayComponent, ], - imports: [ - RouterTestingModule, - NgbPopoverModule, - NgbTooltipModule, - NgbProgressbarModule, - NgxBootstrapIconsModule.pick(allIcons), - ], providers: [ DatePipe, provideHttpClient(withInterceptorsFromDi()), diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts index 13940789e..458b4ee6b 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts @@ -1,3 +1,4 @@ +import { AsyncPipe } from '@angular/common' import { AfterViewInit, Component, @@ -6,22 +7,49 @@ import { Output, ViewChild, } from '@angular/core' +import { RouterModule } from '@angular/router' +import { + NgbProgressbarModule, + NgbTooltipModule, +} from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { DEFAULT_DISPLAY_FIELDS, DisplayField, Document, } from 'src/app/data/document' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' +import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe' +import { IsNumberPipe } from 'src/app/pipes/is-number.pipe' +import { UsernamePipe } from 'src/app/pipes/username.pipe' import { DocumentService } from 'src/app/services/rest/document.service' import { SettingsService } from 'src/app/services/settings.service' +import { CustomFieldDisplayComponent } from '../../common/custom-field-display/custom-field-display.component' import { PreviewPopupComponent } from '../../common/preview-popup/preview-popup.component' +import { TagComponent } from '../../common/tag/tag.component' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' @Component({ selector: 'pngx-document-card-large', templateUrl: './document-card-large.component.html', styleUrls: ['./document-card-large.component.scss'], - standalone: false, + imports: [ + DocumentTitlePipe, + IsNumberPipe, + PreviewPopupComponent, + TagComponent, + CustomFieldDisplayComponent, + AsyncPipe, + UsernamePipe, + IfPermissionsDirective, + CustomDatePipe, + RouterModule, + NgbTooltipModule, + NgbProgressbarModule, + NgxBootstrapIconsModule, + ], }) export class DocumentCardLargeComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts index 729521052..7e6d9da20 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts @@ -4,21 +4,9 @@ import { provideHttpClientTesting } from '@angular/common/http/testing' import { ComponentFixture, TestBed } from '@angular/core/testing' import { By } from '@angular/platform-browser' import { RouterTestingModule } from '@angular/router/testing' -import { - NgbPopoverModule, - NgbProgressbarModule, - NgbTooltipModule, -} from '@ng-bootstrap/ng-bootstrap' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { of } from 'rxjs' import { Tag } from 'src/app/data/tag' -import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' -import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' -import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe' -import { IsNumberPipe } from 'src/app/pipes/is-number.pipe' -import { SafeUrlPipe } from 'src/app/pipes/safeurl.pipe' -import { CustomFieldDisplayComponent } from '../../common/custom-field-display/custom-field-display.component' -import { PreviewPopupComponent } from '../../common/preview-popup/preview-popup.component' import { TagComponent } from '../../common/tag/tag.component' import { DocumentCardSmallComponent } from './document-card-small.component' @@ -56,23 +44,10 @@ describe('DocumentCardSmallComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - DocumentCardSmallComponent, - DocumentTitlePipe, - CustomDatePipe, - IfPermissionsDirective, - SafeUrlPipe, - TagComponent, - IsNumberPipe, - PreviewPopupComponent, - CustomFieldDisplayComponent, - ], imports: [ RouterTestingModule, - NgbPopoverModule, - NgbTooltipModule, - NgbProgressbarModule, NgxBootstrapIconsModule.pick(allIcons), + DocumentCardSmallComponent, ], providers: [ DatePipe, diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts index 7b831e9c1..2c318690d 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts @@ -1,3 +1,4 @@ +import { AsyncPipe } from '@angular/common' import { AfterViewInit, Component, @@ -6,6 +7,12 @@ import { Output, ViewChild, } from '@angular/core' +import { RouterModule } from '@angular/router' +import { + NgbProgressbarModule, + NgbTooltipModule, +} from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { map } from 'rxjs/operators' import { DEFAULT_DISPLAY_FIELDS, @@ -13,16 +20,37 @@ import { Document, } from 'src/app/data/document' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' +import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe' +import { IsNumberPipe } from 'src/app/pipes/is-number.pipe' +import { UsernamePipe } from 'src/app/pipes/username.pipe' import { DocumentService } from 'src/app/services/rest/document.service' import { SettingsService } from 'src/app/services/settings.service' +import { CustomFieldDisplayComponent } from '../../common/custom-field-display/custom-field-display.component' import { PreviewPopupComponent } from '../../common/preview-popup/preview-popup.component' +import { TagComponent } from '../../common/tag/tag.component' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' @Component({ selector: 'pngx-document-card-small', templateUrl: './document-card-small.component.html', styleUrls: ['./document-card-small.component.scss'], - standalone: false, + imports: [ + DocumentTitlePipe, + IsNumberPipe, + PreviewPopupComponent, + TagComponent, + CustomFieldDisplayComponent, + AsyncPipe, + UsernamePipe, + IfPermissionsDirective, + CustomDatePipe, + RouterModule, + NgbTooltipModule, + NgbProgressbarModule, + NgxBootstrapIconsModule, + ], }) export class DocumentCardSmallComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/document-list/document-list.component.spec.ts b/src-ui/src/app/components/document-list/document-list.component.spec.ts index 63b7e41ad..dfdab018f 100644 --- a/src-ui/src/app/components/document-list/document-list.component.spec.ts +++ b/src-ui/src/app/components/document-list/document-list.component.spec.ts @@ -6,22 +6,15 @@ import { } from '@angular/common/http' import { provideHttpClientTesting } from '@angular/common/http/testing' import { ComponentFixture, TestBed } from '@angular/core/testing' -import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { By } from '@angular/platform-browser' import { ActivatedRoute, Router, convertToParamMap } from '@angular/router' import { RouterTestingModule } from '@angular/router/testing' import { - NgbDatepickerModule, NgbDropdown, NgbDropdownItem, - NgbDropdownModule, NgbModal, NgbModalRef, - NgbPopoverModule, - NgbTooltipModule, - NgbTypeaheadModule, } from '@ng-bootstrap/ng-bootstrap' -import { NgSelectModule } from '@ng-select/ng-select' import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons' import { Subject, of, throwError } from 'rxjs' import { routes } from 'src/app/app-routing.module' @@ -38,13 +31,11 @@ import { } from 'src/app/data/filter-rule-type' import { SavedView } from 'src/app/data/saved-view' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' -import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { SortableDirective } from 'src/app/directives/sortable.directive' import { PermissionsGuard } from 'src/app/guards/permissions.guard' import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe' import { FilterPipe } from 'src/app/pipes/filter.pipe' -import { IsNumberPipe } from 'src/app/pipes/is-number.pipe' import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' import { UsernamePipe } from 'src/app/pipes/username.pipe' import { @@ -57,22 +48,9 @@ import { DocumentService } from 'src/app/services/rest/document.service' import { SavedViewService } from 'src/app/services/rest/saved-view.service' import { SettingsService } from 'src/app/services/settings.service' import { ToastService } from 'src/app/services/toast.service' -import { ClearableBadgeComponent } from '../common/clearable-badge/clearable-badge.component' -import { ConfirmDialogComponent } from '../common/confirm-dialog/confirm-dialog.component' -import { DatesDropdownComponent } from '../common/dates-dropdown/dates-dropdown.component' -import { FilterableDropdownComponent } from '../common/filterable-dropdown/filterable-dropdown.component' -import { ToggleableDropdownButtonComponent } from '../common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component' -import { CheckComponent } from '../common/input/check/check.component' -import { TextComponent } from '../common/input/text/text.component' -import { PageHeaderComponent } from '../common/page-header/page-header.component' -import { PermissionsFilterDropdownComponent } from '../common/permissions-filter-dropdown/permissions-filter-dropdown.component' -import { PreviewPopupComponent } from '../common/preview-popup/preview-popup.component' -import { BulkEditorComponent } from './bulk-editor/bulk-editor.component' import { DocumentCardLargeComponent } from './document-card-large/document-card-large.component' import { DocumentCardSmallComponent } from './document-card-small/document-card-small.component' import { DocumentListComponent } from './document-list.component' -import { FilterEditorComponent } from './filter-editor/filter-editor.component' -import { SaveViewConfigDialogComponent } from './save-view-config-dialog/save-view-config-dialog.component' const docs: Document[] = [ { @@ -114,43 +92,10 @@ describe('DocumentListComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - DocumentListComponent, - PageHeaderComponent, - FilterEditorComponent, - FilterableDropdownComponent, - DatesDropdownComponent, - PermissionsFilterDropdownComponent, - ToggleableDropdownButtonComponent, - BulkEditorComponent, - ClearableBadgeComponent, - DocumentCardSmallComponent, - DocumentCardLargeComponent, - ConfirmDialogComponent, - SaveViewConfigDialogComponent, - TextComponent, - CheckComponent, - IfPermissionsDirective, - FilterPipe, - CustomDatePipe, - SortableDirective, - DocumentTitlePipe, - UsernamePipe, - SafeHtmlPipe, - IsNumberPipe, - PreviewPopupComponent, - ], imports: [ RouterTestingModule.withRoutes(routes), - FormsModule, - ReactiveFormsModule, - NgbDropdownModule, - NgbDatepickerModule, - NgbPopoverModule, - NgbTooltipModule, NgxBootstrapIconsModule.pick(allIcons), - NgSelectModule, - NgbTypeaheadModule, + DocumentListComponent, ], providers: [ FilterPipe, diff --git a/src-ui/src/app/components/document-list/document-list.component.ts b/src-ui/src/app/components/document-list/document-list.component.ts index 0b61feb98..d10146ea1 100644 --- a/src-ui/src/app/components/document-list/document-list.component.ts +++ b/src-ui/src/app/components/document-list/document-list.component.ts @@ -1,3 +1,4 @@ +import { AsyncPipe, NgClass, NgTemplateOutlet } from '@angular/common' import { Component, OnDestroy, @@ -6,8 +7,16 @@ import { ViewChild, ViewChildren, } from '@angular/core' -import { ActivatedRoute, convertToParamMap, Router } from '@angular/router' -import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { + ActivatedRoute, + convertToParamMap, + Router, + RouterModule, +} from '@angular/router' +import { NgbDropdownModule, NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' +import { TourNgBootstrapModule } from 'ngx-ui-tour-ng-bootstrap' import { filter, first, map, Subject, switchMap, takeUntil } from 'rxjs' import { DEFAULT_DISPLAY_FIELDS, @@ -19,10 +28,14 @@ import { FilterRule } from 'src/app/data/filter-rule' import { FILTER_FULLTEXT_MORELIKE } from 'src/app/data/filter-rule-type' import { SavedView } from 'src/app/data/saved-view' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { SortableDirective, SortEvent, } from 'src/app/directives/sortable.directive' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' +import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe' +import { UsernamePipe } from 'src/app/pipes/username.pipe' import { ConsumerStatusService } from 'src/app/services/consumer-status.service' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { HotKeyService } from 'src/app/services/hot-key.service' @@ -35,7 +48,12 @@ import { filterRulesDiffer, isFullTextFilterRule, } from 'src/app/utils/filter-rules' +import { PageHeaderComponent } from '../common/page-header/page-header.component' +import { PreviewPopupComponent } from '../common/preview-popup/preview-popup.component' import { ComponentWithPermissions } from '../with-permissions/with-permissions.component' +import { BulkEditorComponent } from './bulk-editor/bulk-editor.component' +import { DocumentCardLargeComponent } from './document-card-large/document-card-large.component' +import { DocumentCardSmallComponent } from './document-card-small/document-card-small.component' import { FilterEditorComponent } from './filter-editor/filter-editor.component' import { SaveViewConfigDialogComponent } from './save-view-config-dialog/save-view-config-dialog.component' @@ -43,7 +61,28 @@ import { SaveViewConfigDialogComponent } from './save-view-config-dialog/save-vi selector: 'pngx-document-list', templateUrl: './document-list.component.html', styleUrls: ['./document-list.component.scss'], - standalone: false, + imports: [ + PageHeaderComponent, + BulkEditorComponent, + FilterEditorComponent, + DocumentCardSmallComponent, + DocumentCardLargeComponent, + PreviewPopupComponent, + CustomDatePipe, + DocumentTitlePipe, + IfPermissionsDirective, + SortableDirective, + UsernamePipe, + NgxBootstrapIconsModule, + AsyncPipe, + FormsModule, + ReactiveFormsModule, + NgTemplateOutlet, + NgbDropdownModule, + NgClass, + RouterModule, + TourNgBootstrapModule, + ], }) export class DocumentListComponent extends ComponentWithPermissions diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.spec.ts b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.spec.ts index 019ce4aab..6e5e29400 100644 --- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.spec.ts +++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.spec.ts @@ -179,7 +179,15 @@ describe('FilterEditorComponent', () => { beforeEach(fakeAsync(() => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + RouterModule, + NgbDropdownModule, + FormsModule, + ReactiveFormsModule, + NgbDatepickerModule, + NgxBootstrapIconsModule.pick(allIcons), + NgbTypeaheadModule, + NgSelectModule, FilterEditorComponent, FilterableDropdownComponent, PermissionsFilterDropdownComponent, @@ -191,16 +199,6 @@ describe('FilterEditorComponent', () => { CustomDatePipe, CustomFieldsQueryDropdownComponent, ], - imports: [ - RouterModule, - NgbDropdownModule, - FormsModule, - ReactiveFormsModule, - NgbDatepickerModule, - NgxBootstrapIconsModule.pick(allIcons), - NgbTypeaheadModule, - NgSelectModule, - ], providers: [ FilterPipe, CustomDatePipe, diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts index 39747a65e..6e9a3fb7d 100644 --- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts +++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.ts @@ -9,6 +9,13 @@ import { Output, ViewChild, } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { + NgbDropdownModule, + NgbTypeaheadModule, +} from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' +import { TourNgBootstrapModule } from 'ngx-ui-tour-ng-bootstrap' import { Observable, Subject, from } from 'rxjs' import { catchError, @@ -87,9 +94,16 @@ import { CustomFieldQueryExpression, } from 'src/app/utils/custom-field-query-element' import { filterRulesDiffer } from 'src/app/utils/filter-rules' -import { CustomFieldQueriesModel } from '../../common/custom-fields-query-dropdown/custom-fields-query-dropdown.component' -import { RelativeDate } from '../../common/dates-dropdown/dates-dropdown.component' import { + CustomFieldQueriesModel, + CustomFieldsQueryDropdownComponent, +} from '../../common/custom-fields-query-dropdown/custom-fields-query-dropdown.component' +import { + DatesDropdownComponent, + RelativeDate, +} from '../../common/dates-dropdown/dates-dropdown.component' +import { + FilterableDropdownComponent, FilterableDropdownSelectionModel, Intersection, LogicalOperator, @@ -97,6 +111,7 @@ import { import { ToggleableItemState } from '../../common/filterable-dropdown/toggleable-dropdown-button/toggleable-dropdown-button.component' import { OwnerFilterType, + PermissionsFilterDropdownComponent, PermissionsSelectionModel, } from '../../common/permissions-filter-dropdown/permissions-filter-dropdown.component' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' @@ -184,7 +199,18 @@ const DEFAULT_TEXT_FILTER_MODIFIER_OPTIONS = [ selector: 'pngx-filter-editor', templateUrl: './filter-editor.component.html', styleUrls: ['./filter-editor.component.scss'], - standalone: false, + imports: [ + FilterableDropdownComponent, + CustomFieldsQueryDropdownComponent, + DatesDropdownComponent, + PermissionsFilterDropdownComponent, + NgxBootstrapIconsModule, + NgbDropdownModule, + NgbTypeaheadModule, + FormsModule, + ReactiveFormsModule, + TourNgBootstrapModule, + ], }) export class FilterEditorComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.spec.ts b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.spec.ts index 91b61ccc2..33e6bd6aa 100644 --- a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.spec.ts +++ b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.spec.ts @@ -18,13 +18,15 @@ describe('SaveViewConfigDialogComponent', () => { beforeEach(fakeAsync(() => { TestBed.configureTestingModule({ - declarations: [ + providers: [NgbActiveModal], + imports: [ + NgbModalModule, + FormsModule, + ReactiveFormsModule, SaveViewConfigDialogComponent, TextComponent, CheckComponent, ], - providers: [NgbActiveModal], - imports: [NgbModalModule, FormsModule, ReactiveFormsModule], }).compileComponents() modal = TestBed.inject(NgbActiveModal) diff --git a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.ts b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.ts index 07ad10381..675b43e98 100644 --- a/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.ts +++ b/src-ui/src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.ts @@ -1,12 +1,19 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' +import { CheckComponent } from '../../common/input/check/check.component' +import { TextComponent } from '../../common/input/text/text.component' @Component({ selector: 'pngx-save-view-config-dialog', templateUrl: './save-view-config-dialog.component.html', styleUrls: ['./save-view-config-dialog.component.scss'], - standalone: false, + imports: [CheckComponent, TextComponent, FormsModule, ReactiveFormsModule], }) export class SaveViewConfigDialogComponent implements OnInit { constructor(private modal: NgbActiveModal) {} diff --git a/src-ui/src/app/components/document-notes/document-notes.component.spec.ts b/src-ui/src/app/components/document-notes/document-notes.component.spec.ts index 136e49c9c..1c86c03a5 100644 --- a/src-ui/src/app/components/document-notes/document-notes.component.spec.ts +++ b/src-ui/src/app/components/document-notes/document-notes.component.spec.ts @@ -56,15 +56,13 @@ describe('DocumentNotesComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - DocumentNotesComponent, - CustomDatePipe, - IfPermissionsDirective, - ], imports: [ FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule.pick(allIcons), + DocumentNotesComponent, + CustomDatePipe, + IfPermissionsDirective, ], providers: [ { diff --git a/src-ui/src/app/components/document-notes/document-notes.component.ts b/src-ui/src/app/components/document-notes/document-notes.component.ts index 4aaa054fc..685d2d93e 100644 --- a/src-ui/src/app/components/document-notes/document-notes.component.ts +++ b/src-ui/src/app/components/document-notes/document-notes.component.ts @@ -1,7 +1,15 @@ import { Component, EventEmitter, Input, Output } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { DocumentNote } from 'src/app/data/document-note' import { User } from 'src/app/data/user' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' +import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' import { DocumentNotesService } from 'src/app/services/rest/document-notes.service' import { UserService } from 'src/app/services/rest/user.service' import { ToastService } from 'src/app/services/toast.service' @@ -11,7 +19,13 @@ import { ComponentWithPermissions } from '../with-permissions/with-permissions.c selector: 'pngx-document-notes', templateUrl: './document-notes.component.html', styleUrls: ['./document-notes.component.scss'], - standalone: false, + imports: [ + IfPermissionsDirective, + CustomDatePipe, + FormsModule, + ReactiveFormsModule, + NgxBootstrapIconsModule, + ], }) export class DocumentNotesComponent extends ComponentWithPermissions { noteForm: FormGroup = new FormGroup({ diff --git a/src-ui/src/app/components/file-drop/file-drop.component.spec.ts b/src-ui/src/app/components/file-drop/file-drop.component.spec.ts index 221fb4101..bd3a56a3f 100644 --- a/src-ui/src/app/components/file-drop/file-drop.component.spec.ts +++ b/src-ui/src/app/components/file-drop/file-drop.component.spec.ts @@ -27,8 +27,7 @@ describe('FileDropComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [FileDropComponent, ToastsComponent], - imports: [NgxFileDropModule], + imports: [NgxFileDropModule, FileDropComponent, ToastsComponent], providers: [ provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting(), diff --git a/src-ui/src/app/components/file-drop/file-drop.component.ts b/src-ui/src/app/components/file-drop/file-drop.component.ts index 718e20ae8..49eb423b2 100644 --- a/src-ui/src/app/components/file-drop/file-drop.component.ts +++ b/src-ui/src/app/components/file-drop/file-drop.component.ts @@ -1,5 +1,9 @@ import { Component, HostListener, ViewChild } from '@angular/core' -import { NgxFileDropComponent, NgxFileDropEntry } from 'ngx-file-drop' +import { + NgxFileDropComponent, + NgxFileDropEntry, + NgxFileDropModule, +} from 'ngx-file-drop' import { PermissionAction, PermissionsService, @@ -13,7 +17,7 @@ import { UploadDocumentsService } from 'src/app/services/upload-documents.servic selector: 'pngx-file-drop', templateUrl: './file-drop.component.html', styleUrls: ['./file-drop.component.scss'], - standalone: false, + imports: [NgxFileDropModule], }) export class FileDropComponent { private fileLeaveTimeoutID: any diff --git a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.spec.ts b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.spec.ts index 5b6f725fa..98071cb90 100644 --- a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.spec.ts +++ b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.spec.ts @@ -19,17 +19,15 @@ describe('CorrespondentListComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - CorrespondentListComponent, - SortableDirective, - PageHeaderComponent, - IfPermissionsDirective, - ], imports: [ NgbPaginationModule, FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule.pick(allIcons), + CorrespondentListComponent, + SortableDirective, + PageHeaderComponent, + IfPermissionsDirective, ], providers: [ DatePipe, diff --git a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts index d9504ce16..95ea3e45b 100644 --- a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts +++ b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.ts @@ -1,7 +1,12 @@ +import { NgClass, TitleCasePipe } from '@angular/common' import { Component } from '@angular/core' -import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { NgbModal, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { Correspondent } from 'src/app/data/correspondent' import { FILTER_HAS_CORRESPONDENT_ANY } from 'src/app/data/filter-rule-type' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' +import { SortableDirective } from 'src/app/directives/sortable.directive' import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { @@ -11,6 +16,7 @@ import { import { CorrespondentService } from 'src/app/services/rest/correspondent.service' import { ToastService } from 'src/app/services/toast.service' import { CorrespondentEditDialogComponent } from '../../common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' import { ManagementListComponent } from '../management-list/management-list.component' @Component({ @@ -18,7 +24,17 @@ import { ManagementListComponent } from '../management-list/management-list.comp templateUrl: './../management-list/management-list.component.html', styleUrls: ['./../management-list/management-list.component.scss'], providers: [{ provide: CustomDatePipe }], - standalone: false, + imports: [ + SortableDirective, + IfPermissionsDirective, + PageHeaderComponent, + TitleCasePipe, + FormsModule, + ReactiveFormsModule, + NgClass, + NgbPaginationModule, + NgxBootstrapIconsModule, + ], }) export class CorrespondentListComponent extends ManagementListComponent { constructor( diff --git a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.spec.ts b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.spec.ts index 1c1c78fa1..e94470d64 100644 --- a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.spec.ts +++ b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.spec.ts @@ -54,12 +54,6 @@ describe('CustomFieldsComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [ - CustomFieldsComponent, - IfPermissionsDirective, - PageHeaderComponent, - ConfirmDialogComponent, - ], imports: [ NgbPaginationModule, FormsModule, @@ -67,6 +61,10 @@ describe('CustomFieldsComponent', () => { NgbModalModule, NgbPopoverModule, NgxBootstrapIconsModule.pick(allIcons), + CustomFieldsComponent, + IfPermissionsDirective, + PageHeaderComponent, + ConfirmDialogComponent, ], providers: [ { diff --git a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.ts b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.ts index 2a35c6bc8..ced70655c 100644 --- a/src-ui/src/app/components/manage/custom-fields/custom-fields.component.ts +++ b/src-ui/src/app/components/manage/custom-fields/custom-fields.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core' -import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { NgbModal, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { delay, takeUntil, tap } from 'rxjs' import { CustomField, DATA_TYPE_LABELS } from 'src/app/data/custom-field' import { @@ -7,6 +8,7 @@ import { CustomFieldQueryOperator, } from 'src/app/data/custom-field-query' import { FILTER_CUSTOM_FIELDS_QUERY } from 'src/app/data/filter-rule-type' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { PermissionsService } from 'src/app/services/permissions.service' import { CustomFieldsService } from 'src/app/services/rest/custom-fields.service' @@ -15,13 +17,19 @@ import { ToastService } from 'src/app/services/toast.service' import { ConfirmDialogComponent } from '../../common/confirm-dialog/confirm-dialog.component' import { CustomFieldEditDialogComponent } from '../../common/edit-dialog/custom-field-edit-dialog/custom-field-edit-dialog.component' import { EditDialogMode } from '../../common/edit-dialog/edit-dialog.component' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' @Component({ selector: 'pngx-custom-fields', templateUrl: './custom-fields.component.html', styleUrls: ['./custom-fields.component.scss'], - standalone: false, + imports: [ + PageHeaderComponent, + IfPermissionsDirective, + NgbPaginationModule, + NgxBootstrapIconsModule, + ], }) export class CustomFieldsComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/manage/document-type-list/document-type-list.component.spec.ts b/src-ui/src/app/components/manage/document-type-list/document-type-list.component.spec.ts index 1dbaa580d..640d6aab8 100644 --- a/src-ui/src/app/components/manage/document-type-list/document-type-list.component.spec.ts +++ b/src-ui/src/app/components/manage/document-type-list/document-type-list.component.spec.ts @@ -19,17 +19,15 @@ describe('DocumentTypeListComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - DocumentTypeListComponent, - SortableDirective, - PageHeaderComponent, - IfPermissionsDirective, - ], imports: [ NgbPaginationModule, FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule.pick(allIcons), + DocumentTypeListComponent, + SortableDirective, + PageHeaderComponent, + IfPermissionsDirective, ], providers: [ DatePipe, diff --git a/src-ui/src/app/components/manage/document-type-list/document-type-list.component.ts b/src-ui/src/app/components/manage/document-type-list/document-type-list.component.ts index 1e50b7e8d..a36748677 100644 --- a/src-ui/src/app/components/manage/document-type-list/document-type-list.component.ts +++ b/src-ui/src/app/components/manage/document-type-list/document-type-list.component.ts @@ -1,7 +1,12 @@ +import { TitleCasePipe } from '@angular/common' import { Component } from '@angular/core' -import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { NgbModal, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { DocumentType } from 'src/app/data/document-type' import { FILTER_HAS_DOCUMENT_TYPE_ANY } from 'src/app/data/filter-rule-type' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' +import { SortableDirective } from 'src/app/directives/sortable.directive' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { PermissionsService, @@ -10,13 +15,23 @@ import { import { DocumentTypeService } from 'src/app/services/rest/document-type.service' import { ToastService } from 'src/app/services/toast.service' import { DocumentTypeEditDialogComponent } from '../../common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' import { ManagementListComponent } from '../management-list/management-list.component' @Component({ selector: 'pngx-document-type-list', templateUrl: './../management-list/management-list.component.html', styleUrls: ['./../management-list/management-list.component.scss'], - standalone: false, + imports: [ + SortableDirective, + PageHeaderComponent, + TitleCasePipe, + IfPermissionsDirective, + FormsModule, + ReactiveFormsModule, + NgbPaginationModule, + NgxBootstrapIconsModule, + ], }) export class DocumentTypeListComponent extends ManagementListComponent { constructor( diff --git a/src-ui/src/app/components/manage/mail/mail.component.spec.ts b/src-ui/src/app/components/manage/mail/mail.component.spec.ts index fe98d610f..3ece18061 100644 --- a/src-ui/src/app/components/manage/mail/mail.component.spec.ts +++ b/src-ui/src/app/components/manage/mail/mail.component.spec.ts @@ -70,7 +70,14 @@ describe('MailComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + NgbModule, + RouterTestingModule.withRoutes(routes), + FormsModule, + ReactiveFormsModule, + NgbAlertModule, + NgSelectModule, + NgxBootstrapIconsModule.pick(allIcons), MailComponent, PageHeaderComponent, IfPermissionsDirective, @@ -92,15 +99,6 @@ describe('MailComponent', () => { PermissionsFormComponent, SwitchComponent, ], - imports: [ - NgbModule, - RouterTestingModule.withRoutes(routes), - FormsModule, - ReactiveFormsModule, - NgbAlertModule, - NgSelectModule, - NgxBootstrapIconsModule.pick(allIcons), - ], providers: [ CustomDatePipe, DatePipe, diff --git a/src-ui/src/app/components/manage/mail/mail.component.ts b/src-ui/src/app/components/manage/mail/mail.component.ts index e666da024..1938f9a0b 100644 --- a/src-ui/src/app/components/manage/mail/mail.component.ts +++ b/src-ui/src/app/components/manage/mail/mail.component.ts @@ -1,11 +1,16 @@ +import { AsyncPipe } from '@angular/common' import { Component, OnDestroy, OnInit } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { ActivatedRoute } from '@angular/router' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { Subject, delay, first, takeUntil, tap } from 'rxjs' import { MailAccount, MailAccountType } from 'src/app/data/mail-account' import { MailRule } from 'src/app/data/mail-rule' import { ObjectWithPermissions } from 'src/app/data/object-with-permissions' import { SETTINGS_KEYS } from 'src/app/data/ui-settings' +import { IfOwnerDirective } from 'src/app/directives/if-owner.directive' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { PermissionAction, PermissionsService, @@ -19,6 +24,7 @@ import { ConfirmDialogComponent } from '../../common/confirm-dialog/confirm-dial import { EditDialogMode } from '../../common/edit-dialog/edit-dialog.component' import { MailAccountEditDialogComponent } from '../../common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component' import { MailRuleEditDialogComponent } from '../../common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' import { PermissionsDialogComponent } from '../../common/permissions-dialog/permissions-dialog.component' import { ComponentWithPermissions } from '../../with-permissions/with-permissions.component' @@ -26,7 +32,15 @@ import { ComponentWithPermissions } from '../../with-permissions/with-permission selector: 'pngx-mail', templateUrl: './mail.component.html', styleUrls: ['./mail.component.scss'], - standalone: false, + imports: [ + PageHeaderComponent, + IfPermissionsDirective, + IfOwnerDirective, + AsyncPipe, + FormsModule, + ReactiveFormsModule, + NgxBootstrapIconsModule, + ], }) export class MailComponent extends ComponentWithPermissions diff --git a/src-ui/src/app/components/manage/management-list/management-list.component.spec.ts b/src-ui/src/app/components/manage/management-list/management-list.component.spec.ts index 511ba5b3b..b058446cd 100644 --- a/src-ui/src/app/components/manage/management-list/management-list.component.spec.ts +++ b/src-ui/src/app/components/manage/management-list/management-list.component.spec.ts @@ -78,15 +78,6 @@ describe('ManagementListComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - TagListComponent, - SortableDirective, - PageHeaderComponent, - IfPermissionsDirective, - SafeHtmlPipe, - ConfirmDialogComponent, - PermissionsDialogComponent, - ], imports: [ NgbPaginationModule, FormsModule, @@ -94,6 +85,13 @@ describe('ManagementListComponent', () => { NgbModalModule, RouterTestingModule.withRoutes(routes), NgxBootstrapIconsModule.pick(allIcons), + TagListComponent, + SortableDirective, + PageHeaderComponent, + IfPermissionsDirective, + SafeHtmlPipe, + ConfirmDialogComponent, + PermissionsDialogComponent, ], providers: [ DatePipe, diff --git a/src-ui/src/app/components/manage/saved-views/saved-views.component.spec.ts b/src-ui/src/app/components/manage/saved-views/saved-views.component.spec.ts index 9372c94ff..10bc5db8e 100644 --- a/src-ui/src/app/components/manage/saved-views/saved-views.component.spec.ts +++ b/src-ui/src/app/components/manage/saved-views/saved-views.component.spec.ts @@ -36,7 +36,12 @@ describe('SavedViewsComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ + imports: [ + NgbModule, + NgxBootstrapIconsModule.pick(allIcons), + ReactiveFormsModule, + FormsModule, + DragDropModule, SavedViewsComponent, PageHeaderComponent, IfPermissionsDirective, @@ -47,13 +52,6 @@ describe('SavedViewsComponent', () => { ConfirmButtonComponent, DragDropSelectComponent, ], - imports: [ - NgbModule, - NgxBootstrapIconsModule.pick(allIcons), - ReactiveFormsModule, - FormsModule, - DragDropModule, - ], providers: [ { provide: PermissionsService, diff --git a/src-ui/src/app/components/manage/saved-views/saved-views.component.ts b/src-ui/src/app/components/manage/saved-views/saved-views.component.ts index adab95ed2..c9ccf9355 100644 --- a/src-ui/src/app/components/manage/saved-views/saved-views.component.ts +++ b/src-ui/src/app/components/manage/saved-views/saved-views.component.ts @@ -1,19 +1,40 @@ +import { AsyncPipe } from '@angular/common' import { Component, OnDestroy, OnInit } from '@angular/core' -import { FormControl, FormGroup } from '@angular/forms' +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms' import { dirtyCheck } from '@ngneat/dirty-check-forms' import { BehaviorSubject, Observable, takeUntil } from 'rxjs' import { DisplayMode } from 'src/app/data/document' import { SavedView } from 'src/app/data/saved-view' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { SavedViewService } from 'src/app/services/rest/saved-view.service' import { SettingsService } from 'src/app/services/settings.service' import { ToastService } from 'src/app/services/toast.service' +import { ConfirmButtonComponent } from '../../common/confirm-button/confirm-button.component' +import { DragDropSelectComponent } from '../../common/input/drag-drop-select/drag-drop-select.component' +import { NumberComponent } from '../../common/input/number/number.component' +import { TextComponent } from '../../common/input/text/text.component' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' - @Component({ selector: 'pngx-saved-views', templateUrl: './saved-views.component.html', styleUrl: './saved-views.component.scss', - standalone: false, + imports: [ + PageHeaderComponent, + ConfirmButtonComponent, + NumberComponent, + TextComponent, + IfPermissionsDirective, + DragDropSelectComponent, + FormsModule, + ReactiveFormsModule, + AsyncPipe, + ], }) export class SavedViewsComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/manage/storage-path-list/storage-path-list.component.spec.ts b/src-ui/src/app/components/manage/storage-path-list/storage-path-list.component.spec.ts index b69aac37a..45735285e 100644 --- a/src-ui/src/app/components/manage/storage-path-list/storage-path-list.component.spec.ts +++ b/src-ui/src/app/components/manage/storage-path-list/storage-path-list.component.spec.ts @@ -21,18 +21,16 @@ describe('StoragePathListComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - StoragePathListComponent, - SortableDirective, - PageHeaderComponent, - IfPermissionsDirective, - SafeHtmlPipe, - ], imports: [ NgbPaginationModule, FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule.pick(allIcons), + StoragePathListComponent, + SortableDirective, + PageHeaderComponent, + IfPermissionsDirective, + SafeHtmlPipe, ], providers: [ DatePipe, diff --git a/src-ui/src/app/components/manage/storage-path-list/storage-path-list.component.ts b/src-ui/src/app/components/manage/storage-path-list/storage-path-list.component.ts index 10d20e1b6..76a22748d 100644 --- a/src-ui/src/app/components/manage/storage-path-list/storage-path-list.component.ts +++ b/src-ui/src/app/components/manage/storage-path-list/storage-path-list.component.ts @@ -1,7 +1,13 @@ +import { NgClass, TitleCasePipe } from '@angular/common' import { Component } from '@angular/core' -import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { NgbModal, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { FILTER_HAS_STORAGE_PATH_ANY } from 'src/app/data/filter-rule-type' import { StoragePath } from 'src/app/data/storage-path' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' +import { SortableDirective } from 'src/app/directives/sortable.directive' +import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { PermissionsService, @@ -10,13 +16,25 @@ import { import { StoragePathService } from 'src/app/services/rest/storage-path.service' import { ToastService } from 'src/app/services/toast.service' import { StoragePathEditDialogComponent } from '../../common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' import { ManagementListComponent } from '../management-list/management-list.component' @Component({ selector: 'pngx-storage-path-list', templateUrl: './../management-list/management-list.component.html', styleUrls: ['./../management-list/management-list.component.scss'], - standalone: false, + imports: [ + SortableDirective, + PageHeaderComponent, + TitleCasePipe, + IfPermissionsDirective, + SafeHtmlPipe, + FormsModule, + ReactiveFormsModule, + NgClass, + NgbPaginationModule, + NgxBootstrapIconsModule, + ], }) export class StoragePathListComponent extends ManagementListComponent { constructor( diff --git a/src-ui/src/app/components/manage/tag-list/tag-list.component.spec.ts b/src-ui/src/app/components/manage/tag-list/tag-list.component.spec.ts index 687fe38d7..4e723993c 100644 --- a/src-ui/src/app/components/manage/tag-list/tag-list.component.spec.ts +++ b/src-ui/src/app/components/manage/tag-list/tag-list.component.spec.ts @@ -20,18 +20,16 @@ describe('TagListComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [ - TagListComponent, - SortableDirective, - PageHeaderComponent, - IfPermissionsDirective, - SafeHtmlPipe, - ], imports: [ NgbPaginationModule, FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule.pick(allIcons), + TagListComponent, + SortableDirective, + PageHeaderComponent, + IfPermissionsDirective, + SafeHtmlPipe, ], providers: [ DatePipe, diff --git a/src-ui/src/app/components/manage/tag-list/tag-list.component.ts b/src-ui/src/app/components/manage/tag-list/tag-list.component.ts index 8633b1965..b94718d4b 100644 --- a/src-ui/src/app/components/manage/tag-list/tag-list.component.ts +++ b/src-ui/src/app/components/manage/tag-list/tag-list.component.ts @@ -1,7 +1,13 @@ +import { NgClass, TitleCasePipe } from '@angular/common' import { Component } from '@angular/core' -import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { NgbModal, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { FILTER_HAS_TAGS_ALL } from 'src/app/data/filter-rule-type' import { Tag } from 'src/app/data/tag' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' +import { SortableDirective } from 'src/app/directives/sortable.directive' +import { SafeHtmlPipe } from 'src/app/pipes/safehtml.pipe' import { DocumentListViewService } from 'src/app/services/document-list-view.service' import { PermissionsService, @@ -10,13 +16,25 @@ import { import { TagService } from 'src/app/services/rest/tag.service' import { ToastService } from 'src/app/services/toast.service' import { TagEditDialogComponent } from '../../common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' import { ManagementListComponent } from '../management-list/management-list.component' @Component({ selector: 'pngx-tag-list', templateUrl: './../management-list/management-list.component.html', styleUrls: ['./../management-list/management-list.component.scss'], - standalone: false, + imports: [ + SortableDirective, + PageHeaderComponent, + TitleCasePipe, + IfPermissionsDirective, + SafeHtmlPipe, + FormsModule, + ReactiveFormsModule, + NgClass, + NgbPaginationModule, + NgxBootstrapIconsModule, + ], }) export class TagListComponent extends ManagementListComponent { constructor( diff --git a/src-ui/src/app/components/manage/workflows/workflows.component.spec.ts b/src-ui/src/app/components/manage/workflows/workflows.component.spec.ts index 61f1238cc..9f97ab743 100644 --- a/src-ui/src/app/components/manage/workflows/workflows.component.spec.ts +++ b/src-ui/src/app/components/manage/workflows/workflows.component.spec.ts @@ -81,12 +81,6 @@ describe('WorkflowsComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [ - WorkflowsComponent, - IfPermissionsDirective, - PageHeaderComponent, - ConfirmDialogComponent, - ], imports: [ NgbPaginationModule, FormsModule, @@ -94,6 +88,10 @@ describe('WorkflowsComponent', () => { NgbModalModule, NgbPopoverModule, NgxBootstrapIconsModule.pick(allIcons), + WorkflowsComponent, + IfPermissionsDirective, + PageHeaderComponent, + ConfirmDialogComponent, ], providers: [ { diff --git a/src-ui/src/app/components/manage/workflows/workflows.component.ts b/src-ui/src/app/components/manage/workflows/workflows.component.ts index 0a028188d..a74fd0232 100644 --- a/src-ui/src/app/components/manage/workflows/workflows.component.ts +++ b/src-ui/src/app/components/manage/workflows/workflows.component.ts @@ -1,7 +1,10 @@ import { Component, OnInit } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { delay, takeUntil, tap } from 'rxjs' import { Workflow } from 'src/app/data/workflow' +import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive' import { PermissionsService } from 'src/app/services/permissions.service' import { WorkflowService } from 'src/app/services/rest/workflow.service' import { ToastService } from 'src/app/services/toast.service' @@ -11,13 +14,20 @@ import { WORKFLOW_TYPE_OPTIONS, WorkflowEditDialogComponent, } from '../../common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component' +import { PageHeaderComponent } from '../../common/page-header/page-header.component' import { LoadingComponentWithPermissions } from '../../loading-component/loading.component' @Component({ selector: 'pngx-workflows', templateUrl: './workflows.component.html', styleUrls: ['./workflows.component.scss'], - standalone: false, + imports: [ + PageHeaderComponent, + IfPermissionsDirective, + FormsModule, + ReactiveFormsModule, + NgxBootstrapIconsModule, + ], }) export class WorkflowsComponent extends LoadingComponentWithPermissions diff --git a/src-ui/src/app/components/not-found/not-found.component.spec.ts b/src-ui/src/app/components/not-found/not-found.component.spec.ts index 3c8f08d8e..58861da44 100644 --- a/src-ui/src/app/components/not-found/not-found.component.spec.ts +++ b/src-ui/src/app/components/not-found/not-found.component.spec.ts @@ -12,8 +12,11 @@ describe('NotFoundComponent', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [NotFoundComponent, LogoComponent], - imports: [NgxBootstrapIconsModule.pick(allIcons)], + imports: [ + NgxBootstrapIconsModule.pick(allIcons), + NotFoundComponent, + LogoComponent, + ], providers: [ provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting(), diff --git a/src-ui/src/app/components/not-found/not-found.component.ts b/src-ui/src/app/components/not-found/not-found.component.ts index 07f2fca36..dc381d265 100644 --- a/src-ui/src/app/components/not-found/not-found.component.ts +++ b/src-ui/src/app/components/not-found/not-found.component.ts @@ -1,10 +1,12 @@ import { Component } from '@angular/core' +import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' +import { LogoComponent } from '../common/logo/logo.component' @Component({ selector: 'pngx-not-found', templateUrl: './not-found.component.html', styleUrls: ['./not-found.component.scss'], - standalone: false, + imports: [LogoComponent, NgxBootstrapIconsModule], }) export class NotFoundComponent { constructor() {} diff --git a/src-ui/src/app/directives/if-object-permissions.directive.spec.ts b/src-ui/src/app/directives/if-object-permissions.directive.spec.ts index df85c9fd1..2bd9fb06a 100644 --- a/src-ui/src/app/directives/if-object-permissions.directive.spec.ts +++ b/src-ui/src/app/directives/if-object-permissions.directive.spec.ts @@ -16,7 +16,7 @@ import { IfObjectPermissionsDirective } from './if-object-permissions.directive'
`, - standalone: false, + imports: [IfObjectPermissionsDirective], }) class TestComponent {} @@ -26,7 +26,7 @@ describe('IfObjectPermissionsDirective', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [IfObjectPermissionsDirective, TestComponent], + imports: [IfObjectPermissionsDirective, TestComponent], providers: [PermissionsService], }) permissionsService = TestBed.inject(PermissionsService) diff --git a/src-ui/src/app/directives/if-object-permissions.directive.ts b/src-ui/src/app/directives/if-object-permissions.directive.ts index 036369087..72256da68 100644 --- a/src-ui/src/app/directives/if-object-permissions.directive.ts +++ b/src-ui/src/app/directives/if-object-permissions.directive.ts @@ -15,7 +15,6 @@ import { @Directive({ selector: '[pngxIfObjectPermissions]', - standalone: false, }) export class IfObjectPermissionsDirective implements OnInit, OnChanges { // The role the user must have diff --git a/src-ui/src/app/directives/if-owner.directive.spec.ts b/src-ui/src/app/directives/if-owner.directive.spec.ts index 836df8f8c..ce3c753c0 100644 --- a/src-ui/src/app/directives/if-owner.directive.spec.ts +++ b/src-ui/src/app/directives/if-owner.directive.spec.ts @@ -9,7 +9,7 @@ import { IfOwnerDirective } from './if-owner.directive'
`, - standalone: false, + imports: [IfOwnerDirective], }) class TestComponent {} @@ -19,7 +19,7 @@ describe('IfOwnerDirective', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [IfOwnerDirective, TestComponent], + imports: [IfOwnerDirective, TestComponent], providers: [PermissionsService], }) permissionsService = TestBed.inject(PermissionsService) diff --git a/src-ui/src/app/directives/if-owner.directive.ts b/src-ui/src/app/directives/if-owner.directive.ts index 2fd1469a9..7c9743fd6 100644 --- a/src-ui/src/app/directives/if-owner.directive.ts +++ b/src-ui/src/app/directives/if-owner.directive.ts @@ -12,7 +12,6 @@ import { PermissionsService } from '../services/permissions.service' @Directive({ selector: '[pngxIfOwner]', - standalone: false, }) export class IfOwnerDirective implements OnInit, OnChanges { // The role the user must have diff --git a/src-ui/src/app/directives/if-permissions.directive.spec.ts b/src-ui/src/app/directives/if-permissions.directive.spec.ts index 0ec2535f4..a4f6a4809 100644 --- a/src-ui/src/app/directives/if-permissions.directive.spec.ts +++ b/src-ui/src/app/directives/if-permissions.directive.spec.ts @@ -11,7 +11,7 @@ import { IfPermissionsDirective } from './if-permissions.directive'
`, - standalone: false, + imports: [IfPermissionsDirective], }) class TestComponent {} @@ -21,7 +21,7 @@ describe('IfPermissionsDirective', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [IfPermissionsDirective, TestComponent], + imports: [IfPermissionsDirective, TestComponent], providers: [PermissionsService], }) permissionsService = TestBed.inject(PermissionsService) diff --git a/src-ui/src/app/directives/if-permissions.directive.ts b/src-ui/src/app/directives/if-permissions.directive.ts index 01d779006..f3a6e3376 100644 --- a/src-ui/src/app/directives/if-permissions.directive.ts +++ b/src-ui/src/app/directives/if-permissions.directive.ts @@ -13,7 +13,6 @@ import { @Directive({ selector: '[pngxIfPermissions]', - standalone: false, }) export class IfPermissionsDirective implements OnInit { @Input() diff --git a/src-ui/src/app/directives/sortable.directive.spec.ts b/src-ui/src/app/directives/sortable.directive.spec.ts index e173d75c4..8ce5d9b8d 100644 --- a/src-ui/src/app/directives/sortable.directive.spec.ts +++ b/src-ui/src/app/directives/sortable.directive.spec.ts @@ -24,7 +24,7 @@ import { SortEvent, SortableDirective } from './sortable.directive' `, - standalone: false, + imports: [SortableDirective], }) class TestComponent {} @@ -35,7 +35,7 @@ describe('SortableDirective', () => { beforeEach(() => { fixture = TestBed.configureTestingModule({ - declarations: [SortableDirective, TestComponent], + imports: [SortableDirective, TestComponent], }).createComponent(TestComponent) fixture.detectChanges() // initial binding diff --git a/src-ui/src/app/directives/sortable.directive.ts b/src-ui/src/app/directives/sortable.directive.ts index 57fc37fbb..ac306faca 100644 --- a/src-ui/src/app/directives/sortable.directive.ts +++ b/src-ui/src/app/directives/sortable.directive.ts @@ -14,7 +14,6 @@ export interface SortEvent { @Directive({ selector: 'th[pngxSortable]', - standalone: false, }) export class SortableDirective { constructor() {} diff --git a/src-ui/src/app/guards/dirty-doc.guard.spec.ts b/src-ui/src/app/guards/dirty-doc.guard.spec.ts index a76b61819..efda03db0 100644 --- a/src-ui/src/app/guards/dirty-doc.guard.spec.ts +++ b/src-ui/src/app/guards/dirty-doc.guard.spec.ts @@ -5,9 +5,7 @@ import { NgbModal, NgbModule } from '@ng-bootstrap/ng-bootstrap' import { routes } from '../app-routing.module' import { ComponentCanDeactivate, DirtyDocGuard } from './dirty-doc.guard' -@Component({ - standalone: false, -}) +@Component({ imports: [NgbModule] }) class GenericDirtyDocComponent implements ComponentCanDeactivate { canDeactivate: () => boolean } @@ -19,8 +17,11 @@ describe('DirtyDocGuard', () => { beforeEach(() => { TestBed.configureTestingModule({ providers: [DirtyDocGuard, NgbModal, GenericDirtyDocComponent], - imports: [RouterTestingModule.withRoutes(routes), NgbModule], - declarations: [GenericDirtyDocComponent], + imports: [ + RouterTestingModule.withRoutes(routes), + NgbModule, + GenericDirtyDocComponent, + ], }).compileComponents() guard = TestBed.inject(DirtyDocGuard) diff --git a/src-ui/src/app/guards/dirty-form.guard.spec.ts b/src-ui/src/app/guards/dirty-form.guard.spec.ts index 95fae4d2e..5f81b2292 100644 --- a/src-ui/src/app/guards/dirty-form.guard.spec.ts +++ b/src-ui/src/app/guards/dirty-form.guard.spec.ts @@ -8,9 +8,7 @@ import { routes } from '../app-routing.module' import { ConfirmDialogComponent } from '../components/common/confirm-dialog/confirm-dialog.component' import { DirtyFormGuard } from './dirty-form.guard' -@Component({ - standalone: false, -}) +@Component({ imports: [NgbModule] }) class GenericDirtyComponent implements DirtyComponent { isDirty$: boolean } @@ -34,8 +32,12 @@ describe('DirtyFormGuard', () => { }, GenericDirtyComponent, ], - imports: [RouterTestingModule.withRoutes(routes), NgbModule], - declarations: [ConfirmDialogComponent, GenericDirtyComponent], + imports: [ + RouterTestingModule.withRoutes(routes), + NgbModule, + ConfirmDialogComponent, + GenericDirtyComponent, + ], }).compileComponents() guard = TestBed.inject(DirtyFormGuard) diff --git a/src-ui/src/app/guards/dirty-saved-view.guard.spec.ts b/src-ui/src/app/guards/dirty-saved-view.guard.spec.ts index a745f919b..a430d8ac7 100644 --- a/src-ui/src/app/guards/dirty-saved-view.guard.spec.ts +++ b/src-ui/src/app/guards/dirty-saved-view.guard.spec.ts @@ -3,6 +3,7 @@ import { provideHttpClientTesting } from '@angular/common/http/testing' import { TestBed } from '@angular/core/testing' import { RouterTestingModule } from '@angular/router/testing' import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' +import { allIcons, NgxBootstrapIconsModule } from 'ngx-bootstrap-icons' import { routes } from '../app-routing.module' import { ConfirmDialogComponent } from '../components/common/confirm-dialog/confirm-dialog.component' import { DocumentListComponent } from '../components/document-list/document-list.component' @@ -17,8 +18,11 @@ describe('DirtySavedViewGuard', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [ConfirmDialogComponent], - imports: [RouterTestingModule.withRoutes(routes)], + imports: [ + RouterTestingModule.withRoutes(routes), + ConfirmDialogComponent, + NgxBootstrapIconsModule.pick(allIcons), + ], providers: [ DirtySavedViewGuard, SettingsService, diff --git a/src-ui/src/app/pipes/custom-date.pipe.ts b/src-ui/src/app/pipes/custom-date.pipe.ts index 2df8d7a53..69e054a84 100644 --- a/src-ui/src/app/pipes/custom-date.pipe.ts +++ b/src-ui/src/app/pipes/custom-date.pipe.ts @@ -44,7 +44,6 @@ const INTERVALS = { @Pipe({ name: 'customDate', - standalone: false, }) export class CustomDatePipe implements PipeTransform { private defaultLocale: string diff --git a/src-ui/src/app/pipes/document-title.pipe.ts b/src-ui/src/app/pipes/document-title.pipe.ts index f31f5db4f..e9611a926 100644 --- a/src-ui/src/app/pipes/document-title.pipe.ts +++ b/src-ui/src/app/pipes/document-title.pipe.ts @@ -2,7 +2,6 @@ import { Pipe, PipeTransform } from '@angular/core' @Pipe({ name: 'documentTitle', - standalone: false, }) export class DocumentTitlePipe implements PipeTransform { transform(value: string): string { diff --git a/src-ui/src/app/pipes/file-size.pipe.ts b/src-ui/src/app/pipes/file-size.pipe.ts index 8d43373ea..83f07d837 100644 --- a/src-ui/src/app/pipes/file-size.pipe.ts +++ b/src-ui/src/app/pipes/file-size.pipe.ts @@ -53,10 +53,7 @@ const defaultPrecisionMap: unitPrecisionMap = { * // returns 1.46 KB * {{ 1500 | fileSize:2 }} */ -@Pipe({ - name: 'fileSize', - standalone: false, -}) +@Pipe({ name: 'fileSize' }) export class FileSizePipe implements PipeTransform { private readonly units: unit[] = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB'] diff --git a/src-ui/src/app/pipes/filter.pipe.ts b/src-ui/src/app/pipes/filter.pipe.ts index 178fe2db8..90ac3da1c 100644 --- a/src-ui/src/app/pipes/filter.pipe.ts +++ b/src-ui/src/app/pipes/filter.pipe.ts @@ -3,7 +3,6 @@ import { MatchingModel } from '../data/matching-model' @Pipe({ name: 'filter', - standalone: false, }) export class FilterPipe implements PipeTransform { transform( diff --git a/src-ui/src/app/pipes/is-number.pipe.ts b/src-ui/src/app/pipes/is-number.pipe.ts index 8570cfc5a..2e1014ade 100644 --- a/src-ui/src/app/pipes/is-number.pipe.ts +++ b/src-ui/src/app/pipes/is-number.pipe.ts @@ -2,7 +2,6 @@ import { Pipe, PipeTransform } from '@angular/core' @Pipe({ name: 'isNumber', - standalone: false, }) export class IsNumberPipe implements PipeTransform { transform(value: any): boolean { diff --git a/src-ui/src/app/pipes/safehtml.pipe.ts b/src-ui/src/app/pipes/safehtml.pipe.ts index 9200a175c..6fba1e75e 100644 --- a/src-ui/src/app/pipes/safehtml.pipe.ts +++ b/src-ui/src/app/pipes/safehtml.pipe.ts @@ -3,7 +3,6 @@ import { DomSanitizer } from '@angular/platform-browser' @Pipe({ name: 'safeHtml', - standalone: false, }) export class SafeHtmlPipe implements PipeTransform { constructor(private sanitizer: DomSanitizer) {} diff --git a/src-ui/src/app/pipes/safeurl.pipe.ts b/src-ui/src/app/pipes/safeurl.pipe.ts index 81f71afb2..4d19d099f 100644 --- a/src-ui/src/app/pipes/safeurl.pipe.ts +++ b/src-ui/src/app/pipes/safeurl.pipe.ts @@ -3,7 +3,6 @@ import { DomSanitizer } from '@angular/platform-browser' @Pipe({ name: 'safeUrl', - standalone: false, }) export class SafeUrlPipe implements PipeTransform { constructor(private sanitizer: DomSanitizer) {} diff --git a/src-ui/src/app/pipes/username.pipe.ts b/src-ui/src/app/pipes/username.pipe.ts index 838ad7426..54e8385d8 100644 --- a/src-ui/src/app/pipes/username.pipe.ts +++ b/src-ui/src/app/pipes/username.pipe.ts @@ -9,7 +9,6 @@ import { UserService } from '../services/rest/user.service' @Pipe({ name: 'username', - standalone: false, }) export class UsernamePipe implements PipeTransform { users: User[] diff --git a/src-ui/src/app/pipes/yes-no.pipe.ts b/src-ui/src/app/pipes/yes-no.pipe.ts index 1c684b60c..3912e9a92 100644 --- a/src-ui/src/app/pipes/yes-no.pipe.ts +++ b/src-ui/src/app/pipes/yes-no.pipe.ts @@ -2,7 +2,6 @@ import { Pipe, PipeTransform } from '@angular/core' @Pipe({ name: 'yesno', - standalone: false, }) export class YesNoPipe implements PipeTransform { transform(value: boolean): unknown { diff --git a/src-ui/src/app/services/document-list-view.service.spec.ts b/src-ui/src/app/services/document-list-view.service.spec.ts index d93acc521..b4be8bfcf 100644 --- a/src-ui/src/app/services/document-list-view.service.spec.ts +++ b/src-ui/src/app/services/document-list-view.service.spec.ts @@ -92,9 +92,8 @@ describe('DocumentListViewService', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [ConfirmDialogComponent], teardown: { destroyAfterEach: true }, - imports: [RouterTestingModule.withRoutes(routes)], + imports: [RouterTestingModule.withRoutes(routes), ConfirmDialogComponent], providers: [ DocumentListViewService, PermissionsGuard, diff --git a/src-ui/src/app/services/open-documents.service.spec.ts b/src-ui/src/app/services/open-documents.service.spec.ts index d34199b1e..73e452d5a 100644 --- a/src-ui/src/app/services/open-documents.service.spec.ts +++ b/src-ui/src/app/services/open-documents.service.spec.ts @@ -56,8 +56,7 @@ describe('OpenDocumentsService', () => { beforeEach(() => { TestBed.configureTestingModule({ - declarations: [ConfirmDialogComponent], - imports: [], + imports: [ConfirmDialogComponent], providers: [ OpenDocumentsService, NgbModal, diff --git a/src-ui/src/app/services/settings.service.spec.ts b/src-ui/src/app/services/settings.service.spec.ts index a887df995..df44013f4 100644 --- a/src-ui/src/app/services/settings.service.spec.ts +++ b/src-ui/src/app/services/settings.service.spec.ts @@ -10,7 +10,6 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap' import { CookieService } from 'ngx-cookie-service' import { of, Subscription } from 'rxjs' import { environment } from 'src/environments/environment' -import { AppModule } from '../app.module' import { CustomFieldDataType } from '../data/custom-field' import { DEFAULT_DISPLAY_FIELDS, DisplayField } from '../data/document' import { SavedView } from '../data/saved-view' @@ -92,7 +91,6 @@ describe('SettingsService', () => { NgbModule, FormsModule, ReactiveFormsModule, - AppModule, ], providers: [ SettingsService, @@ -108,6 +106,8 @@ describe('SettingsService', () => { permissionService = TestBed.inject(PermissionsService) settingsService = TestBed.inject(SettingsService) toastService = TestBed.inject(ToastService) + // Normally done in app initializer + settingsService.initializeSettings().subscribe() }) afterEach(() => { diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts index 274537fe8..a6d8afb26 100644 --- a/src-ui/src/main.ts +++ b/src-ui/src/main.ts @@ -1,13 +1,378 @@ -import { enableProdMode } from '@angular/core' -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' +import { + APP_INITIALIZER, + enableProdMode, + importProvidersFrom, +} from '@angular/core' -import { AppModule } from './app/app.module' +import { DragDropModule } from '@angular/cdk/drag-drop' +import { DatePipe, registerLocaleData } from '@angular/common' +import { + HTTP_INTERCEPTORS, + provideHttpClient, + withInterceptorsFromDi, +} from '@angular/common/http' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { BrowserModule, bootstrapApplication } from '@angular/platform-browser' +import { + NgbDateAdapter, + NgbDateParserFormatter, + NgbModule, +} from '@ng-bootstrap/ng-bootstrap' +import { NgSelectModule } from '@ng-select/ng-select' +import { PdfViewerModule } from 'ng2-pdf-viewer' +import { + NgxBootstrapIconsModule, + airplane, + archive, + arrowClockwise, + arrowCounterclockwise, + arrowDown, + arrowLeft, + arrowRepeat, + arrowRight, + arrowRightShort, + arrowUpRight, + asterisk, + bodyText, + boxArrowUp, + boxArrowUpRight, + boxes, + braces, + calendar, + calendarEvent, + calendarEventFill, + cardChecklist, + cardHeading, + caretDown, + caretUp, + chatLeftText, + check, + check2All, + checkAll, + checkCircleFill, + checkLg, + chevronDoubleLeft, + chevronDoubleRight, + clipboard, + clipboardCheck, + clipboardCheckFill, + clipboardFill, + dash, + dashCircle, + diagram3, + dice5, + doorOpen, + download, + envelope, + envelopeAt, + envelopeAtFill, + exclamationCircleFill, + exclamationTriangle, + exclamationTriangleFill, + eye, + fileEarmark, + fileEarmarkCheck, + fileEarmarkFill, + fileEarmarkLock, + fileEarmarkMinus, + fileEarmarkRichtext, + fileText, + files, + filter, + folder, + folderFill, + funnel, + gear, + google, + grid, + gripVertical, + hash, + hddStack, + house, + infoCircle, + journals, + link, + listTask, + listUl, + microsoft, + nodePlus, + pencil, + people, + peopleFill, + person, + personCircle, + personFill, + personFillLock, + personLock, + personSquare, + plus, + plusCircle, + questionCircle, + scissors, + search, + slashCircle, + sliders2Vertical, + sortAlphaDown, + sortAlphaUpAlt, + tag, + tagFill, + tags, + textIndentLeft, + textLeft, + threeDots, + threeDotsVertical, + trash, + uiRadios, + upcScan, + windowStack, + x, + xCircle, + xLg, +} from 'ngx-bootstrap-icons' +import { ColorSliderModule } from 'ngx-color/slider' +import { CookieService } from 'ngx-cookie-service' +import { NgxFileDropModule } from 'ngx-file-drop' +import { TourNgBootstrapModule } from 'ngx-ui-tour-ng-bootstrap' +import { AppRoutingModule } from './app/app-routing.module' +import { AppComponent } from './app/app.component' +import { DirtyDocGuard } from './app/guards/dirty-doc.guard' +import { DirtySavedViewGuard } from './app/guards/dirty-saved-view.guard' +import { PermissionsGuard } from './app/guards/permissions.guard' +import { ApiVersionInterceptor } from './app/interceptors/api-version.interceptor' +import { CsrfInterceptor } from './app/interceptors/csrf.interceptor' +import { DocumentTitlePipe } from './app/pipes/document-title.pipe' +import { FilterPipe } from './app/pipes/filter.pipe' +import { UsernamePipe } from './app/pipes/username.pipe' +import { SettingsService } from './app/services/settings.service' +import { LocalizedDateParserFormatter } from './app/utils/ngb-date-parser-formatter' +import { ISODateAdapter } from './app/utils/ngb-iso-date-adapter' import { environment } from './environments/environment' +import localeAf from '@angular/common/locales/af' +import localeAr from '@angular/common/locales/ar' +import localeBe from '@angular/common/locales/be' +import localeBg from '@angular/common/locales/bg' +import localeCa from '@angular/common/locales/ca' +import localeCs from '@angular/common/locales/cs' +import localeDa from '@angular/common/locales/da' +import localeDe from '@angular/common/locales/de' +import localeEl from '@angular/common/locales/el' +import localeEnGb from '@angular/common/locales/en-GB' +import localeEs from '@angular/common/locales/es' +import localeFi from '@angular/common/locales/fi' +import localeFr from '@angular/common/locales/fr' +import localeHu from '@angular/common/locales/hu' +import localeIt from '@angular/common/locales/it' +import localeJa from '@angular/common/locales/ja' +import localeKo from '@angular/common/locales/ko' +import localeLb from '@angular/common/locales/lb' +import localeNl from '@angular/common/locales/nl' +import localeNo from '@angular/common/locales/no' +import localePl from '@angular/common/locales/pl' +import localePt from '@angular/common/locales/pt' +import localeRo from '@angular/common/locales/ro' +import localeRu from '@angular/common/locales/ru' +import localeSk from '@angular/common/locales/sk' +import localeSl from '@angular/common/locales/sl' +import localeSr from '@angular/common/locales/sr' +import localeSv from '@angular/common/locales/sv' +import localeTr from '@angular/common/locales/tr' +import localeUk from '@angular/common/locales/uk' +import localeZh from '@angular/common/locales/zh' + +registerLocaleData(localeAf) +registerLocaleData(localeAr) +registerLocaleData(localeBe) +registerLocaleData(localeBg) +registerLocaleData(localeCa) +registerLocaleData(localeCs) +registerLocaleData(localeDa) +registerLocaleData(localeDe) +registerLocaleData(localeEl) +registerLocaleData(localeEnGb) +registerLocaleData(localeEs) +registerLocaleData(localeFi) +registerLocaleData(localeFr) +registerLocaleData(localeHu) +registerLocaleData(localeIt) +registerLocaleData(localeJa) +registerLocaleData(localeKo) +registerLocaleData(localeLb) +registerLocaleData(localeNl) +registerLocaleData(localeNo) +registerLocaleData(localePl) +registerLocaleData(localePt, 'pt-BR') +registerLocaleData(localePt, 'pt-PT') +registerLocaleData(localeRo) +registerLocaleData(localeRu) +registerLocaleData(localeSk) +registerLocaleData(localeSl) +registerLocaleData(localeSr) +registerLocaleData(localeSv) +registerLocaleData(localeTr) +registerLocaleData(localeUk) +registerLocaleData(localeZh) + +function initializeApp(settings: SettingsService) { + return () => { + return settings.initializeSettings() + } +} +const icons = { + airplane, + archive, + arrowClockwise, + arrowCounterclockwise, + arrowDown, + arrowLeft, + arrowRepeat, + arrowRight, + arrowRightShort, + arrowUpRight, + asterisk, + braces, + bodyText, + boxArrowUp, + boxArrowUpRight, + boxes, + calendar, + calendarEvent, + calendarEventFill, + cardChecklist, + cardHeading, + caretDown, + caretUp, + chatLeftText, + check, + check2All, + checkAll, + checkCircleFill, + checkLg, + chevronDoubleLeft, + chevronDoubleRight, + clipboard, + clipboardCheck, + clipboardCheckFill, + clipboardFill, + dash, + dashCircle, + diagram3, + dice5, + doorOpen, + download, + envelope, + envelopeAt, + envelopeAtFill, + exclamationCircleFill, + exclamationTriangle, + exclamationTriangleFill, + eye, + fileEarmark, + fileEarmarkCheck, + fileEarmarkFill, + fileEarmarkLock, + fileEarmarkMinus, + fileEarmarkRichtext, + files, + fileText, + filter, + folder, + folderFill, + funnel, + gear, + google, + grid, + gripVertical, + hash, + hddStack, + house, + infoCircle, + journals, + link, + listTask, + listUl, + microsoft, + nodePlus, + pencil, + people, + peopleFill, + person, + personCircle, + personFill, + personFillLock, + personLock, + personSquare, + plus, + plusCircle, + questionCircle, + scissors, + search, + slashCircle, + sliders2Vertical, + sortAlphaDown, + sortAlphaUpAlt, + tagFill, + tag, + tags, + textIndentLeft, + textLeft, + threeDots, + threeDotsVertical, + trash, + uiRadios, + upcScan, + windowStack, + x, + xCircle, + xLg, +} + if (environment.production) { enableProdMode() } -platformBrowserDynamic() - .bootstrapModule(AppModule) - .catch((err) => console.error(err)) +bootstrapApplication(AppComponent, { + providers: [ + importProvidersFrom( + BrowserModule, + AppRoutingModule, + NgbModule, + FormsModule, + ReactiveFormsModule, + PdfViewerModule, + NgxFileDropModule, + NgSelectModule, + ColorSliderModule, + TourNgBootstrapModule, + DragDropModule, + NgxBootstrapIconsModule.pick(icons) + ), + { + provide: APP_INITIALIZER, + useFactory: initializeApp, + deps: [SettingsService], + multi: true, + }, + DatePipe, + CookieService, + { + provide: HTTP_INTERCEPTORS, + useClass: CsrfInterceptor, + multi: true, + }, + { + provide: HTTP_INTERCEPTORS, + useClass: ApiVersionInterceptor, + multi: true, + }, + FilterPipe, + DocumentTitlePipe, + { provide: NgbDateAdapter, useClass: ISODateAdapter }, + { provide: NgbDateParserFormatter, useClass: LocalizedDateParserFormatter }, + PermissionsGuard, + DirtyDocGuard, + DirtySavedViewGuard, + UsernamePipe, + provideHttpClient(withInterceptorsFromDi()), + ], +}).catch((err) => console.error(err))