diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index d0a2ad41e..bdc803132 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -240,18 +240,18 @@ Document was added to Paperless-ngx. src/app/app.component.ts - 83 + 81 src/app/app.component.ts - 92 + 90 Open document src/app/app.component.ts - 85 + 83 src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html @@ -262,109 +262,28 @@ Could not add : src/app/app.component.ts - 107 + 105 Document is being processed by Paperless-ngx. src/app/app.component.ts - 122 - - - - Dashboard - - src/app/app.component.ts - 129 - - - src/app/components/app-frame/app-frame.component.html - 81 - - - src/app/components/app-frame/app-frame.component.html - 83 - - - src/app/components/dashboard/dashboard.component.html - 1 - - - - Documents - - src/app/app.component.ts - 140 - - - src/app/components/app-frame/app-frame.component.html - 88 - - - src/app/components/app-frame/app-frame.component.html - 90 - - - src/app/components/document-list/document-list.component.ts - 128 - - - src/app/components/manage/management-list/management-list.component.html - 90 - - - src/app/components/manage/management-list/management-list.component.html - 90 - - - src/app/components/manage/management-list/management-list.component.html - 90 - - - src/app/components/manage/management-list/management-list.component.html - 90 - - - - Settings - - src/app/app.component.ts - 152 - - - src/app/components/admin/settings/settings.component.html - 2 - - - src/app/components/admin/settings/settings.component.html - 323 - - - src/app/components/app-frame/app-frame.component.html - 50 - - - src/app/components/app-frame/app-frame.component.html - 228 - - - src/app/components/app-frame/app-frame.component.html - 230 + 120 Prev src/app/app.component.ts - 158 + 126 Next src/app/app.component.ts - 159 + 127 src/app/components/document-detail/document-detail.component.html @@ -375,56 +294,56 @@ End src/app/app.component.ts - 160 + 128 The dashboard can be used to show saved views, such as an 'Inbox'. Those settings are found under Settings > Saved Views once you have created some. src/app/app.component.ts - 166 + 134 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 - 173 + 141 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 - 178 + 146 The filtering tools allow you to quickly find documents using various searches, dates, tags, etc. src/app/app.component.ts - 185 + 153 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 - 191 + 159 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 - 196 + 164 Manage e-mail accounts and rules for automatically importing documents. src/app/app.component.ts - 204 + 172 src/app/components/manage/mail/mail.component.html @@ -435,14 +354,14 @@ Workflows give you more control over the document pipeline. src/app/app.component.ts - 212 + 180 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 - 220 + 188 src/app/components/admin/tasks/tasks.component.html @@ -453,28 +372,28 @@ Check out the settings for various tweaks to the web app and toggle settings for saved views. src/app/app.component.ts - 228 + 196 Thank you! 🙏 src/app/app.component.ts - 236 + 204 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 - 238 + 206 Lastly, on behalf of every contributor to this community-supported project, thank you for using Paperless-ngx! src/app/app.component.ts - 240 + 208 @@ -547,7 +466,7 @@ src/app/components/admin/settings/settings.component.html - 403 + 395 src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html @@ -652,11 +571,11 @@ src/app/components/app-frame/app-frame.component.html - 263 + 272 src/app/components/app-frame/app-frame.component.html - 266 + 275 @@ -689,7 +608,7 @@ src/app/components/admin/settings/settings.component.html - 391 + 383 src/app/components/admin/tasks/tasks.component.html @@ -752,6 +671,29 @@ 51 + + Settings + + src/app/components/admin/settings/settings.component.html + 2 + + + src/app/components/admin/settings/settings.component.html + 315 + + + src/app/components/app-frame/app-frame.component.html + 59 + + + src/app/components/app-frame/app-frame.component.html + 237 + + + src/app/components/app-frame/app-frame.component.html + 239 + + Options to customize appearance, notifications, saved views and more. Settings apply to the <strong>current user only</strong>. @@ -1001,29 +943,11 @@ 196 - - Global search - - src/app/components/admin/settings/settings.component.html - 200 - - - src/app/components/app-frame/global-search/global-search.component.ts - 92 - - - - Search database only (do not include advanced search results) - - src/app/components/admin/settings/settings.component.html - 204 - - Notes src/app/components/admin/settings/settings.component.html - 208 + 200 src/app/components/document-list/document-list.component.html @@ -1042,14 +966,14 @@ Enable notes src/app/components/admin/settings/settings.component.html - 212 + 204 Permissions src/app/components/admin/settings/settings.component.html - 220 + 212 src/app/components/common/edit-dialog/group-edit-dialog/group-edit-dialog.component.html @@ -1069,11 +993,11 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 100 + 96 src/app/components/document-list/filter-editor/filter-editor.component.html - 110 + 96 src/app/components/manage/mail/mail.component.html @@ -1104,28 +1028,28 @@ Default Permissions src/app/components/admin/settings/settings.component.html - 223 + 215 Settings apply to this user account for objects (Tags, Mail Rules, etc.) created via the web UI src/app/components/admin/settings/settings.component.html - 227,229 + 219,221 Default Owner src/app/components/admin/settings/settings.component.html - 234 + 226 Objects without an owner can be viewed and edited by all users src/app/components/admin/settings/settings.component.html - 238 + 230 src/app/components/common/input/permissions/permissions-form/permissions-form.component.html @@ -1136,18 +1060,18 @@ Default View Permissions src/app/components/admin/settings/settings.component.html - 243 + 235 Users: src/app/components/admin/settings/settings.component.html - 248 + 240 src/app/components/admin/settings/settings.component.html - 275 + 267 src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html @@ -1178,11 +1102,11 @@ Groups: src/app/components/admin/settings/settings.component.html - 258 + 250 src/app/components/admin/settings/settings.component.html - 285 + 277 src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html @@ -1213,14 +1137,14 @@ Default Edit Permissions src/app/components/admin/settings/settings.component.html - 270 + 262 Edit permissions also grant viewing permissions src/app/components/admin/settings/settings.component.html - 294 + 286 src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html @@ -1239,74 +1163,74 @@ Notifications src/app/components/admin/settings/settings.component.html - 302 + 294 Document processing src/app/components/admin/settings/settings.component.html - 305 + 297 Show notifications when new documents are detected src/app/components/admin/settings/settings.component.html - 309 + 301 Show notifications when document processing completes successfully src/app/components/admin/settings/settings.component.html - 310 + 302 Show notifications when document processing fails src/app/components/admin/settings/settings.component.html - 311 + 303 Suppress notifications on dashboard src/app/components/admin/settings/settings.component.html - 312 + 304 This will suppress all messages about document processing status on the dashboard. src/app/components/admin/settings/settings.component.html - 312 + 304 Saved views src/app/components/admin/settings/settings.component.html - 320 + 312 src/app/components/app-frame/app-frame.component.html - 98 + 107 Show warning when closing saved views with unsaved changes src/app/components/admin/settings/settings.component.html - 326 + 318 Views src/app/components/admin/settings/settings.component.html - 330 + 322 src/app/components/document-list/document-list.component.html @@ -1317,7 +1241,7 @@ Show on dashboard src/app/components/admin/settings/settings.component.html - 343 + 335 src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html @@ -1328,7 +1252,7 @@ Show in sidebar src/app/components/admin/settings/settings.component.html - 347 + 339 src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html @@ -1339,7 +1263,7 @@ Actions src/app/components/admin/settings/settings.component.html - 351 + 343 src/app/components/admin/tasks/tasks.component.html @@ -1363,7 +1287,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 106 + 102 src/app/components/manage/custom-fields/custom-fields.component.html @@ -1402,7 +1326,7 @@ Delete src/app/components/admin/settings/settings.component.html - 353 + 345 src/app/components/admin/users-groups/users-groups.component.html @@ -1438,7 +1362,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 160 + 156 src/app/components/manage/custom-fields/custom-fields.component.html @@ -1513,42 +1437,42 @@ Documents page size src/app/components/admin/settings/settings.component.html - 364 + 356 Display as src/app/components/admin/settings/settings.component.html - 367 + 359 Table src/app/components/admin/settings/settings.component.html - 369 + 361 Small Cards src/app/components/admin/settings/settings.component.html - 370 + 362 Large Cards src/app/components/admin/settings/settings.component.html - 371 + 363 Show src/app/components/admin/settings/settings.component.html - 375 + 367 src/app/components/document-list/document-list.component.html @@ -1559,7 +1483,7 @@ Default src/app/components/admin/settings/settings.component.html - 375 + 367 src/app/components/document-detail/document-detail.component.html @@ -1570,14 +1494,14 @@ No saved views defined. src/app/components/admin/settings/settings.component.html - 384 + 376 Cancel src/app/components/admin/settings/settings.component.html - 404 + 396 src/app/components/common/confirm-dialog/confirm-dialog.component.ts @@ -1662,7 +1586,7 @@ Error retrieving users src/app/components/admin/settings/settings.component.ts - 189 + 188 src/app/components/admin/users-groups/users-groups.component.ts @@ -1673,7 +1597,7 @@ Error retrieving groups src/app/components/admin/settings/settings.component.ts - 208 + 207 src/app/components/admin/users-groups/users-groups.component.ts @@ -1684,46 +1608,46 @@ Saved view "" deleted. src/app/components/admin/settings/settings.component.ts - 423 + 421 Settings were saved successfully. src/app/components/admin/settings/settings.component.ts - 553 + 547 Settings were saved successfully. Reload is required to apply some changes. src/app/components/admin/settings/settings.component.ts - 557 + 551 Reload now src/app/components/admin/settings/settings.component.ts - 558 + 552 An error occurred while saving settings. src/app/components/admin/settings/settings.component.ts - 568 + 562 src/app/components/app-frame/app-frame.component.ts - 126 + 140 Error while storing settings on server. src/app/components/admin/settings/settings.component.ts - 602 + 596 @@ -1734,11 +1658,11 @@ src/app/components/app-frame/app-frame.component.html - 251 + 260 src/app/components/app-frame/app-frame.component.html - 253 + 262 @@ -2035,11 +1959,11 @@ src/app/components/app-frame/app-frame.component.html - 242 + 251 src/app/components/app-frame/app-frame.component.html - 244 + 253 @@ -2107,14 +2031,6 @@ src/app/components/admin/users-groups/users-groups.component.html 73 - - src/app/components/app-frame/global-search/global-search.component.html - 50 - - - src/app/components/app-frame/global-search/global-search.component.html - 66 - src/app/components/common/input/permissions/permissions-form/permissions-form.component.html 53 @@ -2245,15 +2161,15 @@ src/app/components/document-detail/document-detail.component.ts - 805 + 773 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 714 + 711 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 753 + 750 src/app/components/manage/custom-fields/custom-fields.component.ts @@ -2288,27 +2204,27 @@ src/app/components/document-detail/document-detail.component.ts - 807 + 775 src/app/components/document-detail/document-detail.component.ts - 1100 + 1068 src/app/components/document-detail/document-detail.component.ts - 1138 + 1106 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 755 + 752 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 788 + 785 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 807 + 804 src/app/components/manage/custom-fields/custom-fields.component.ts @@ -2394,76 +2310,129 @@ 20 + + Search documents + + src/app/components/app-frame/app-frame.component.html + 31 + + Logged in as src/app/components/app-frame/app-frame.component.html - 42 + 51 My Profile src/app/components/app-frame/app-frame.component.html - 46 + 55 Logout src/app/components/app-frame/app-frame.component.html - 53 + 62 Documentation src/app/components/app-frame/app-frame.component.html - 58 + 67 src/app/components/app-frame/app-frame.component.html - 272 + 281 src/app/components/app-frame/app-frame.component.html - 275 + 284 + + + + Dashboard + + src/app/components/app-frame/app-frame.component.html + 90 + + + src/app/components/app-frame/app-frame.component.html + 92 + + + src/app/components/dashboard/dashboard.component.html + 1 + + + + Documents + + src/app/components/app-frame/app-frame.component.html + 97 + + + src/app/components/app-frame/app-frame.component.html + 99 + + + src/app/components/document-list/document-list.component.ts + 126 + + + src/app/components/manage/management-list/management-list.component.html + 90 + + + src/app/components/manage/management-list/management-list.component.html + 90 + + + src/app/components/manage/management-list/management-list.component.html + 90 + + + src/app/components/manage/management-list/management-list.component.html + 90 Open documents src/app/components/app-frame/app-frame.component.html - 128 + 137 Close all src/app/components/app-frame/app-frame.component.html - 148 + 157 src/app/components/app-frame/app-frame.component.html - 150 + 159 Manage src/app/components/app-frame/app-frame.component.html - 159 + 168 Correspondents src/app/components/app-frame/app-frame.component.html - 165 + 174 src/app/components/app-frame/app-frame.component.html - 167 + 176 src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html @@ -2474,11 +2443,11 @@ Tags src/app/components/app-frame/app-frame.component.html - 172 + 181 src/app/components/app-frame/app-frame.component.html - 175 + 184 src/app/components/common/input/tags/tags.component.ts @@ -2498,7 +2467,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.html - 39 + 33 src/app/data/document.ts @@ -2509,11 +2478,11 @@ Document Types src/app/components/app-frame/app-frame.component.html - 181 + 190 src/app/components/app-frame/app-frame.component.html - 183 + 192 src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html @@ -2524,11 +2493,11 @@ Storage Paths src/app/components/app-frame/app-frame.component.html - 188 + 197 src/app/components/app-frame/app-frame.component.html - 190 + 199 src/app/components/dashboard/widgets/statistics-widget/statistics-widget.component.html @@ -2539,11 +2508,11 @@ Custom Fields src/app/components/app-frame/app-frame.component.html - 195 + 204 src/app/components/app-frame/app-frame.component.html - 197 + 206 src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.html @@ -2558,11 +2527,11 @@ Workflows src/app/components/app-frame/app-frame.component.html - 204 + 213 src/app/components/app-frame/app-frame.component.html - 206 + 215 src/app/components/manage/workflows/workflows.component.html @@ -2573,268 +2542,92 @@ Mail src/app/components/app-frame/app-frame.component.html - 211 + 220 src/app/components/app-frame/app-frame.component.html - 214 + 223 Administration src/app/components/app-frame/app-frame.component.html - 222 + 231 Configuration src/app/components/app-frame/app-frame.component.html - 235 + 244 src/app/components/app-frame/app-frame.component.html - 237 + 246 GitHub src/app/components/app-frame/app-frame.component.html - 282 + 291 is available. src/app/components/app-frame/app-frame.component.html - 291,292 + 300,301 Click to view. src/app/components/app-frame/app-frame.component.html - 292 + 301 Paperless-ngx can automatically check for updates src/app/components/app-frame/app-frame.component.html - 296 + 305 How does this work? src/app/components/app-frame/app-frame.component.html - 303,305 + 312,314 Update available src/app/components/app-frame/app-frame.component.html - 316 + 325 Sidebar views updated src/app/components/app-frame/app-frame.component.ts - 209 + 282 Error updating sidebar views src/app/components/app-frame/app-frame.component.ts - 212 + 285 An error occurred while saving update checking settings. src/app/components/app-frame/app-frame.component.ts - 233 - - - - Search - - src/app/components/app-frame/global-search/global-search.component.html - 8 - - - - Advanced search - - src/app/components/app-frame/global-search/global-search.component.html - 19 - - - src/app/components/document-list/filter-editor/filter-editor.component.ts - 143 - - - - Open - - src/app/components/app-frame/global-search/global-search.component.html - 44 - - - src/app/components/app-frame/global-search/global-search.component.html - 47 - - - - Filter documents - - src/app/components/app-frame/global-search/global-search.component.html - 53 - - - - Download - - src/app/components/app-frame/global-search/global-search.component.html - 63 - - - src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html - 79 - - - src/app/components/document-detail/document-detail.component.html - 29 - - - src/app/components/document-list/bulk-editor/bulk-editor.component.html - 132 - - - src/app/components/document-list/document-card-large/document-card-large.component.html - 68 - - - src/app/components/document-list/document-card-small/document-card-small.component.html - 131 - - - - No results - - src/app/components/app-frame/global-search/global-search.component.html - 76 - - - - Documents - - src/app/components/app-frame/global-search/global-search.component.html - 79 - - - - Saved Views - - src/app/components/app-frame/global-search/global-search.component.html - 85 - - - - Tags - - src/app/components/app-frame/global-search/global-search.component.html - 92 - - - - Correspondents - - src/app/components/app-frame/global-search/global-search.component.html - 99 - - - - Document types - - src/app/components/app-frame/global-search/global-search.component.html - 106 - - - - Storage paths - - src/app/components/app-frame/global-search/global-search.component.html - 113 - - - - Users - - src/app/components/app-frame/global-search/global-search.component.html - 120 - - - - Groups - - src/app/components/app-frame/global-search/global-search.component.html - 127 - - - - Custom fields - - src/app/components/app-frame/global-search/global-search.component.html - 134 - - - - Mail accounts - - src/app/components/app-frame/global-search/global-search.component.html - 141 - - - - Mail rules - - src/app/components/app-frame/global-search/global-search.component.html - 148 - - - - Workflows - - src/app/components/app-frame/global-search/global-search.component.html - 155 - - - - Successfully updated object. - - src/app/components/app-frame/global-search/global-search.component.ts - 168 - - - src/app/components/app-frame/global-search/global-search.component.ts - 206 - - - - Error occurred saving object. - - src/app/components/app-frame/global-search/global-search.component.ts - 171 - - - src/app/components/app-frame/global-search/global-search.component.ts - 209 + 306 @@ -2886,23 +2679,23 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 401 + 398 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 441 + 438 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 479 + 476 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 517 + 514 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 579 + 576 @@ -2992,39 +2785,25 @@ 62 - - Create New Field + + Search fields src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.html - 22 + 10 - - Add to document + + Create new field src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.html - 25 - - - - Choose field - - src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts - 52 - - - - No unused fields found - - src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts - 56 + 21 Saved field "". src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts - 120 + 124 src/app/components/manage/custom-fields/custom-fields.component.ts @@ -3035,7 +2814,7 @@ Error saving field. src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.ts - 128 + 133 src/app/components/manage/custom-fields/custom-fields.component.ts @@ -4347,24 +4126,10 @@ Not assigned src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts - 340 + 337 Filter drop down element to filter for documents with no correspondent/type/tag assigned - - Open filter - - src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts - 452 - - - - Keyboard shortcuts - - src/app/components/common/hotkey-dialog/hotkey-dialog.component.ts - 20 - - Remove @@ -5157,6 +4922,29 @@ 71 + + Download + + src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html + 79 + + + src/app/components/document-detail/document-detail.component.html + 29 + + + src/app/components/document-list/bulk-editor/bulk-editor.component.html + 128 + + + src/app/components/document-list/document-card-large/document-card-large.component.html + 68 + + + src/app/components/document-list/document-card-small/document-card-small.component.html + 131 + + No documents @@ -5279,7 +5067,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 346 + 343 this string is used to separate processing, failed and added on the file upload widget @@ -5354,7 +5142,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 110 + 106 @@ -5383,7 +5171,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 113 + 109 @@ -5394,7 +5182,7 @@ src/app/components/document-detail/document-detail.component.ts - 1156 + 1124 src/app/guards/dirty-saved-view.guard.ts @@ -5427,7 +5215,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.ts - 131 + 121 src/app/data/document.ts @@ -5460,7 +5248,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 37 + 36 src/app/components/document-list/document-list.component.html @@ -5468,7 +5256,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.html - 52 + 44 src/app/data/document.ts @@ -5487,7 +5275,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 52 + 50 src/app/components/document-list/document-list.component.html @@ -5495,7 +5283,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.html - 64 + 54 src/app/data/document.ts @@ -5514,7 +5302,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 67 + 64 src/app/components/document-list/document-list.component.html @@ -5522,7 +5310,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.html - 76 + 64 src/app/data/document.ts @@ -5670,110 +5458,78 @@ An error occurred loading content: src/app/components/document-detail/document-detail.component.ts - 330,332 + 328,330 Document changes detected src/app/components/document-detail/document-detail.component.ts - 353 + 351 The version of this document in your browser session appears older than the existing version. src/app/components/document-detail/document-detail.component.ts - 354 + 352 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 - 355 + 353 Ok src/app/components/document-detail/document-detail.component.ts - 357 - - - - Next document - - src/app/components/document-detail/document-detail.component.ts - 464 - - - - Previous document - - src/app/components/document-detail/document-detail.component.ts - 474 - - - - Close document - - src/app/components/document-detail/document-detail.component.ts - 482 - - - src/app/services/open-documents.service.ts - 116 - - - - Save document - - src/app/components/document-detail/document-detail.component.ts - 489 + 355 Error retrieving metadata src/app/components/document-detail/document-detail.component.ts - 531 + 495 Error retrieving suggestions. src/app/components/document-detail/document-detail.component.ts - 556 + 520 Document saved successfully. src/app/components/document-detail/document-detail.component.ts - 677 + 642 src/app/components/document-detail/document-detail.component.ts - 688 + 656 Error saving document src/app/components/document-detail/document-detail.component.ts - 692 + 660 src/app/components/document-detail/document-detail.component.ts - 733 + 701 Confirm delete src/app/components/document-detail/document-detail.component.ts - 760 + 728 src/app/components/manage/management-list/management-list.component.ts @@ -5788,138 +5544,138 @@ Do you really want to delete document ""? src/app/components/document-detail/document-detail.component.ts - 761 + 729 The files for this document will be deleted permanently. This operation cannot be undone. src/app/components/document-detail/document-detail.component.ts - 762 + 730 Delete document src/app/components/document-detail/document-detail.component.ts - 764 + 732 Error deleting document src/app/components/document-detail/document-detail.component.ts - 783 + 751 Redo OCR confirm src/app/components/document-detail/document-detail.component.ts - 803 + 771 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 751 + 748 This operation will permanently redo OCR for this document. src/app/components/document-detail/document-detail.component.ts - 804 + 772 Redo OCR 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 - 815 + 783 Error executing operation src/app/components/document-detail/document-detail.component.ts - 826 + 794 Page Fit src/app/components/document-detail/document-detail.component.ts - 895 + 863 Split confirm src/app/components/document-detail/document-detail.component.ts - 1098 + 1066 This operation will split the selected document(s) into new documents. src/app/components/document-detail/document-detail.component.ts - 1099 + 1067 Split operation will begin in the background. src/app/components/document-detail/document-detail.component.ts - 1114 + 1082 Error executing split operation src/app/components/document-detail/document-detail.component.ts - 1123 + 1091 Rotate confirm src/app/components/document-detail/document-detail.component.ts - 1135 + 1103 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 784 + 781 This operation will permanently rotate the original version of the current document. src/app/components/document-detail/document-detail.component.ts - 1136 + 1104 This will alter the original copy. src/app/components/document-detail/document-detail.component.ts - 1137 + 1105 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 786 + 783 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 - 1153 + 1121 Error executing rotate operation src/app/components/document-detail/document-detail.component.ts - 1165 + 1133 @@ -5951,126 +5707,126 @@ src/app/components/document-list/filter-editor/filter-editor.component.html - 40 + 34 Filter correspondents src/app/components/document-list/bulk-editor/bulk-editor.component.html - 38 + 37 src/app/components/document-list/filter-editor/filter-editor.component.html - 53 + 45 Filter document types src/app/components/document-list/bulk-editor/bulk-editor.component.html - 53 + 51 src/app/components/document-list/filter-editor/filter-editor.component.html - 65 + 55 Filter storage paths src/app/components/document-list/bulk-editor/bulk-editor.component.html - 68 + 65 src/app/components/document-list/filter-editor/filter-editor.component.html - 77 + 65 Custom fields src/app/components/document-list/bulk-editor/bulk-editor.component.html - 82 + 78 src/app/components/document-list/filter-editor/filter-editor.component.html - 89 + 75 src/app/components/document-list/filter-editor/filter-editor.component.ts - 139 + 129 Filter custom fields src/app/components/document-list/bulk-editor/bulk-editor.component.html - 83 + 79 src/app/components/document-list/filter-editor/filter-editor.component.html - 90 + 76 Merge src/app/components/document-list/bulk-editor/bulk-editor.component.html - 116 + 112 Include: src/app/components/document-list/bulk-editor/bulk-editor.component.html - 138 + 134 Archived files src/app/components/document-list/bulk-editor/bulk-editor.component.html - 142 + 138 Original files src/app/components/document-list/bulk-editor/bulk-editor.component.html - 146 + 142 Use formatted filename src/app/components/document-list/bulk-editor/bulk-editor.component.html - 151 + 147 Error executing bulk operation src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 250 + 247 "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 338 + 335 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 344 + 341 "" and "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 340 + 337 This is for messages like 'modify "tag1" and "tag2"' @@ -6078,7 +5834,7 @@ and "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 348,350 + 345,347 this is for messages like 'modify "tag1", "tag2" and "tag3"' @@ -6086,14 +5842,14 @@ Confirm tags assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 365 + 362 This operation will add the tag "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 371 + 368 @@ -6102,14 +5858,14 @@ )"/> to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 376,378 + 373,375 This operation will remove the tag "" from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 384 + 381 @@ -6118,7 +5874,7 @@ )"/> from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 389,391 + 386,388 @@ -6129,84 +5885,84 @@ )"/> on selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 393,397 + 390,394 Confirm correspondent assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 434 + 431 This operation will assign the correspondent "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 436 + 433 This operation will remove the correspondent from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 438 + 435 Confirm document type assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 472 + 469 This operation will assign the document type "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 474 + 471 This operation will remove the document type from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 476 + 473 Confirm storage path assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 510 + 507 This operation will assign the storage path "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 512 + 509 This operation will remove the storage path from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 514 + 511 Confirm custom field assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 543 + 540 This operation will assign the custom field "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 549 + 546 @@ -6215,14 +5971,14 @@ )"/> to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 554,556 + 551,553 This operation will remove the custom field "" from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 562 + 559 @@ -6231,7 +5987,7 @@ )"/> from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 567,569 + 564,566 @@ -6242,63 +5998,63 @@ )"/> on selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 571,575 + 568,572 Delete confirm src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 712 + 709 This operation will permanently delete selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 713 + 710 Delete document(s) src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 716 + 713 This operation will permanently redo OCR for selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 752 + 749 This operation will permanently rotate the original version of document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 785 + 782 Merge confirm src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 805 + 802 This operation will merge selected documents into a new document. src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 806 + 803 Merged document will be queued for consumption. src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 819 + 816 @@ -6471,10 +6227,6 @@ src/app/components/document-list/document-list.component.html 10 - - src/app/components/document-list/document-list.component.ts - 243 - Select all @@ -6482,10 +6234,6 @@ src/app/components/document-list/document-list.component.html 11 - - src/app/components/document-list/document-list.component.ts - 236 - Sort @@ -6537,7 +6285,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.html - 116 + 102 @@ -6562,7 +6310,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.ts - 136 + 126 src/app/data/document.ts @@ -6680,88 +6428,81 @@ 8 - - Reset filters / selection - - src/app/components/document-list/document-list.component.ts - 224 - - - - Open first [selected] document - - src/app/components/document-list/document-list.component.ts - 252 - - View "" saved successfully. src/app/components/document-list/document-list.component.ts - 288 + 242 View "" created successfully. src/app/components/document-list/document-list.component.ts - 331 + 285 Dates src/app/components/document-list/filter-editor/filter-editor.component.html - 100 + 86 Title & content src/app/components/document-list/filter-editor/filter-editor.component.ts - 134 + 124 + + + + Advanced search + + src/app/components/document-list/filter-editor/filter-editor.component.ts + 133 More like src/app/components/document-list/filter-editor/filter-editor.component.ts - 149 + 139 equals src/app/components/document-list/filter-editor/filter-editor.component.ts - 155 + 145 is empty src/app/components/document-list/filter-editor/filter-editor.component.ts - 159 + 149 is not empty src/app/components/document-list/filter-editor/filter-editor.component.ts - 163 + 153 greater than src/app/components/document-list/filter-editor/filter-editor.component.ts - 167 + 157 less than src/app/components/document-list/filter-editor/filter-editor.component.ts - 171 + 161 @@ -6770,14 +6511,14 @@ )?.name"/> src/app/components/document-list/filter-editor/filter-editor.component.ts - 191,193 + 181,183 Without correspondent src/app/components/document-list/filter-editor/filter-editor.component.ts - 195 + 185 @@ -6786,14 +6527,14 @@ )?.name"/> src/app/components/document-list/filter-editor/filter-editor.component.ts - 201,203 + 191,193 Without document type src/app/components/document-list/filter-editor/filter-editor.component.ts - 205 + 195 @@ -6802,14 +6543,14 @@ )?.name"/> src/app/components/document-list/filter-editor/filter-editor.component.ts - 211,213 + 201,203 Without storage path src/app/components/document-list/filter-editor/filter-editor.component.ts - 215 + 205 @@ -6817,14 +6558,14 @@ ?.name"/> src/app/components/document-list/filter-editor/filter-editor.component.ts - 219,220 + 209,210 Without any tag src/app/components/document-list/filter-editor/filter-editor.component.ts - 224 + 214 @@ -6833,49 +6574,49 @@ )?.name"/> src/app/components/document-list/filter-editor/filter-editor.component.ts - 228,230 + 218,220 Without any custom field src/app/components/document-list/filter-editor/filter-editor.component.ts - 234 + 224 Title: src/app/components/document-list/filter-editor/filter-editor.component.ts - 238 + 228 ASN: src/app/components/document-list/filter-editor/filter-editor.component.ts - 241 + 231 Owner: src/app/components/document-list/filter-editor/filter-editor.component.ts - 244 + 234 Owner not in: src/app/components/document-list/filter-editor/filter-editor.component.ts - 247 + 237 Without an owner src/app/components/document-list/filter-editor/filter-editor.component.ts - 250 + 240 @@ -7842,11 +7583,11 @@ src/app/services/open-documents.service.ts - 108 + 104 src/app/services/open-documents.service.ts - 135 + 131 @@ -7857,7 +7598,7 @@ src/app/services/open-documents.service.ts - 136 + 132 @@ -8106,28 +7847,35 @@ You have unsaved changes to the document src/app/services/open-documents.service.ts - 110 + 106 Are you sure you want to close this document? src/app/services/open-documents.service.ts - 114 + 110 + + + + Close document + + src/app/services/open-documents.service.ts + 112 Are you sure you want to close all documents? src/app/services/open-documents.service.ts - 137 + 133 Close documents src/app/services/open-documents.service.ts - 139 + 135 diff --git a/src-ui/package-lock.json b/src-ui/package-lock.json index 38622c6b5..1f202938c 100644 --- a/src-ui/package-lock.json +++ b/src-ui/package-lock.json @@ -9,15 +9,15 @@ "version": "0.0.0", "hasInstallScript": true, "dependencies": { - "@angular/cdk": "^17.3.2", - "@angular/common": "~17.3.2", - "@angular/compiler": "~17.3.2", - "@angular/core": "~17.3.2", - "@angular/forms": "~17.3.2", - "@angular/localize": "~17.3.2", - "@angular/platform-browser": "~17.3.2", - "@angular/platform-browser-dynamic": "~17.3.2", - "@angular/router": "~17.3.2", + "@angular/cdk": "^17.3.6", + "@angular/common": "~17.3.7", + "@angular/compiler": "~17.3.7", + "@angular/core": "~17.3.7", + "@angular/forms": "~17.3.7", + "@angular/localize": "~17.3.7", + "@angular/platform-browser": "~17.3.7", + "@angular/platform-browser-dynamic": "~17.3.7", + "@angular/router": "~17.3.7", "@ng-bootstrap/ng-bootstrap": "^16.0.0", "@ng-select/ng-select": "^12.0.7", "@ngneat/dirty-check-forms": "^3.0.3", @@ -38,14 +38,14 @@ "zone.js": "^0.14.4" }, "devDependencies": { - "@angular-builders/jest": "17.0.2", - "@angular-devkit/build-angular": "~17.3.2", + "@angular-builders/jest": "17.0.3", + "@angular-devkit/build-angular": "~17.3.6", "@angular-eslint/builder": "17.3.0", "@angular-eslint/eslint-plugin": "17.3.0", "@angular-eslint/eslint-plugin-template": "17.3.0", "@angular-eslint/schematics": "17.3.0", "@angular-eslint/template-parser": "17.3.0", - "@angular/cli": "~17.3.2", + "@angular/cli": "~17.3.6", "@angular/compiler-cli": "~17.3.2", "@playwright/test": "^1.42.1", "@types/jest": "^29.5.12", @@ -86,9 +86,9 @@ } }, "node_modules/@angular-builders/common": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@angular-builders/common/-/common-1.0.1.tgz", - "integrity": "sha512-qPgTjz3ISdGIY+vOIiUzpZRXwchdL/HEhCRzM2QKdqz/c5AB06X9wKhvXezabtzpYSq4lN9fliPYCntqimefFw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@angular-builders/common/-/common-1.0.2.tgz", + "integrity": "sha512-lUusRq6jN1It5LcUTLS6Q+AYAYGTo/EEN8hV0M6Ek9qXzweAouJaSEnwv7p04/pD7yJTl0YOCbN79u+wGm3x4g==", "dev": true, "dependencies": { "@angular-devkit/core": "^17.1.0", @@ -100,12 +100,12 @@ } }, "node_modules/@angular-builders/jest": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/@angular-builders/jest/-/jest-17.0.2.tgz", - "integrity": "sha512-IoEDqudGTpPBhUv0R7TU0eewASVDMIj+pFZTyHCSb2Y17DkE98mo5wp/GXRBl09LO6VK63bHNBB56oXbKG93fA==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@angular-builders/jest/-/jest-17.0.3.tgz", + "integrity": "sha512-LW4s8t+NLnWR7Aud+EZup8dOBfQF8rfOIncsarDtP/48rz/Ucnzvum7xEt/NYAlZ6y/Dpk7wO6SlqAsaOPf8mA==", "dev": true, "dependencies": { - "@angular-builders/common": "1.0.1", + "@angular-builders/common": "1.0.2", "@angular-devkit/architect": ">=0.1700.0 < 0.1800.0", "@angular-devkit/core": "^17.0.0", "jest-preset-angular": "14.0.3", @@ -123,12 +123,12 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.1703.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1703.2.tgz", - "integrity": "sha512-fT5gSzwDHOyGv8zF97t8rjeoYSGSxXjWWstl3rN1nXdO0qgJ5m6Sv0fupON+HltdXDCBLRH+2khNpqx/Fh0Qww==", + "version": "0.1703.6", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1703.6.tgz", + "integrity": "sha512-Ck501FD/QuOjeKVFs7hU92w8+Ffetv0d5Sq09XY2/uygo5c/thMzp9nkevaIWBxUSeU5RqYZizDrhFVgYzbbOw==", "dev": true, "dependencies": { - "@angular-devkit/core": "17.3.2", + "@angular-devkit/core": "17.3.6", "rxjs": "7.8.1" }, "engines": { @@ -138,15 +138,15 @@ } }, "node_modules/@angular-devkit/build-angular": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-17.3.2.tgz", - "integrity": "sha512-muPCUyL0uHvRkLH4NLWiccER6P2vCm/Q5DDvqyN4XOzzY3tAHHLrKrpvY87sgd2oNJ6Ci8x7GPNcfzR5KELCnw==", + "version": "17.3.6", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-17.3.6.tgz", + "integrity": "sha512-K4CEZvhQZUUOpmXPVoI1YBM8BARbIlqE6FZRxakmnr+YOtVTYE5s+Dr1wgja8hZIohNz6L7j167G9Aut7oPU/w==", "dev": true, "dependencies": { "@ampproject/remapping": "2.3.0", - "@angular-devkit/architect": "0.1703.2", - "@angular-devkit/build-webpack": "0.1703.2", - "@angular-devkit/core": "17.3.2", + "@angular-devkit/architect": "0.1703.6", + "@angular-devkit/build-webpack": "0.1703.6", + "@angular-devkit/core": "17.3.6", "@babel/core": "7.24.0", "@babel/generator": "7.23.6", "@babel/helper-annotate-as-pure": "7.22.5", @@ -157,7 +157,7 @@ "@babel/preset-env": "7.24.0", "@babel/runtime": "7.24.0", "@discoveryjs/json-ext": "0.5.7", - "@ngtools/webpack": "17.3.2", + "@ngtools/webpack": "17.3.6", "@vitejs/plugin-basic-ssl": "1.1.0", "ansi-colors": "4.1.3", "autoprefixer": "10.4.18", @@ -198,8 +198,8 @@ "terser": "5.29.1", "tree-kill": "1.2.2", "tslib": "2.6.2", - "undici": "6.7.1", - "vite": "5.1.5", + "undici": "6.11.1", + "vite": "5.1.7", "watchpack": "2.4.0", "webpack": "5.90.3", "webpack-dev-middleware": "6.1.2", @@ -725,12 +725,12 @@ "dev": true }, "node_modules/@angular-devkit/build-webpack": { - "version": "0.1703.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1703.2.tgz", - "integrity": "sha512-w7rVFQcZK4iTCd/MLfQWIkDkwBOfAs++txNQyS9qYID8KvLs1V+oWYd2qDBRelRv1u3YtaCIS1pQx3GFKBC3OA==", + "version": "0.1703.6", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1703.6.tgz", + "integrity": "sha512-pJu0et2SiF0kfXenHSTtAART0omzbWpLgBfeUo4hBh4uwX5IaT+mRpYpr8gCXMq+qsjoQp3HobSU3lPDeBn+bg==", "dev": true, "dependencies": { - "@angular-devkit/architect": "0.1703.2", + "@angular-devkit/architect": "0.1703.6", "rxjs": "7.8.1" }, "engines": { @@ -744,9 +744,9 @@ } }, "node_modules/@angular-devkit/core": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-17.3.2.tgz", - "integrity": "sha512-1vxKo9+pdSwTOwqPDSYQh84gZYmCJo6OgR5+AZoGLGMZSeqvi9RG5RiUcOMLQYOnuYv0arlhlWxz0ZjyR8ApKw==", + "version": "17.3.6", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-17.3.6.tgz", + "integrity": "sha512-FVbkT9dEwHEvjnxr4mvMNSMg2bCFoGoP4X68xXU9dhLEUpC05opLvfbaR3Qh543eCJ5AstosBFVzB/krfIkOvA==", "dev": true, "dependencies": { "ajv": "8.12.0", @@ -777,12 +777,12 @@ "dev": true }, "node_modules/@angular-devkit/schematics": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-17.3.2.tgz", - "integrity": "sha512-AYO6oc6QpFGigc1KiDzEVT1CeLnwvnIedU5Q/U3JDZ/Yqmvgc09D64g9XXER2kg6tV7iEgLxiYnonIAQOHq7eA==", + "version": "17.3.6", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-17.3.6.tgz", + "integrity": "sha512-2G1YuPInd8znG7uUgKOS7z72Aku50lTzB/2csWkWPJLAFkh7vKC8QZ40x8S1nC9npVYPhI5CRLX/HVpBh9CyxA==", "dev": true, "dependencies": { - "@angular-devkit/core": "17.3.2", + "@angular-devkit/core": "17.3.6", "jsonc-parser": "3.2.1", "magic-string": "0.30.8", "ora": "5.4.1", @@ -1287,9 +1287,9 @@ } }, "node_modules/@angular/cdk": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-17.3.2.tgz", - "integrity": "sha512-mC2U7aoIf7RSpGgIwVyfQEbaPDDX59plQt88KeTz15wjF8vosLt2DG0rZEoV8Mq14YS47J+jI76q/LJfd6/GCw==", + "version": "17.3.6", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-17.3.6.tgz", + "integrity": "sha512-7eKrC61/6pmMAxllU/vYKadZRF7x7GxUYpA5G70fNaQsIUUiZvxx/SJN9AuZEoPGAtF6atKlJD8QVmFoDzv/Lw==", "dependencies": { "tslib": "^2.3.0" }, @@ -1303,15 +1303,15 @@ } }, "node_modules/@angular/cli": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-17.3.2.tgz", - "integrity": "sha512-g6r4XZyGnh9P6GmWgaFh8RmR4L6UdQ408e3SpG3rjncuPRD57Ur8806GfCLPt6HIA9TARiKmaJ0EJ3RsIjag0g==", + "version": "17.3.6", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-17.3.6.tgz", + "integrity": "sha512-poKaRPeI+hFqX+AxIaEriaIggFVcC3XqlT9E1/uBC2rfHirE1n5F9Z7xqEDtMHduKwLbNXhQIPoKIKya8+Hnew==", "dev": true, "dependencies": { - "@angular-devkit/architect": "0.1703.2", - "@angular-devkit/core": "17.3.2", - "@angular-devkit/schematics": "17.3.2", - "@schematics/angular": "17.3.2", + "@angular-devkit/architect": "0.1703.6", + "@angular-devkit/core": "17.3.6", + "@angular-devkit/schematics": "17.3.6", + "@schematics/angular": "17.3.6", "@yarnpkg/lockfile": "1.1.0", "ansi-colors": "4.1.3", "ini": "4.1.2", @@ -1343,9 +1343,9 @@ "dev": true }, "node_modules/@angular/common": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-17.3.2.tgz", - "integrity": "sha512-7fo+hrQEzo+VX0fJAKK+P4YNeiEnpdMOAkyIdwweyAeUZYeFIs6TKtax3CiJAubnkIkhQ/52uxiusDhK3Wg/WQ==", + "version": "17.3.7", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-17.3.7.tgz", + "integrity": "sha512-A7LRJu1vVCGGgrfZXjU+njz50SiU4weheKCar5PIUprcdIofS1IrHAJDqYh+kwXxkjXbZMOr/ijQY0+AESLEsw==", "dependencies": { "tslib": "^2.3.0" }, @@ -1353,14 +1353,14 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/core": "17.3.2", + "@angular/core": "17.3.7", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/compiler": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-17.3.2.tgz", - "integrity": "sha512-+/l/FQpVsOPbxZzSKyqEra+yxoI/r8LlTRqshVACv10+DKMWJMHnDkVUrNxvWHutfn4RszpGMtbtHp3yM9rxcA==", + "version": "17.3.7", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-17.3.7.tgz", + "integrity": "sha512-AlKiqPoxnrpQ0hn13fIaQPSVodaVAIjBW4vpFyuKFqs2LBKg6iolwZ21s8rEI0KR2gXl+8ugj0/UZ6YADiVM5w==", "dependencies": { "tslib": "^2.3.0" }, @@ -1368,7 +1368,7 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/core": "17.3.2" + "@angular/core": "17.3.7" }, "peerDependenciesMeta": { "@angular/core": { @@ -1377,9 +1377,9 @@ } }, "node_modules/@angular/compiler-cli": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-17.3.2.tgz", - "integrity": "sha512-PG81BrJjeF679tkafjt+t9VEBE1rPq39cdLoBTnPY7Q+E/thVoem5JTRG6hmnLmwEc0xxY6sfYpvx2BB5ywUSA==", + "version": "17.3.7", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-17.3.7.tgz", + "integrity": "sha512-vSg5IQZ9jGmvYjpbfH8KbH4Sl1IVeE+Mr1ogcxkGEsURSRvKo7EWc0K7LSEI9+gg0VLamMiP9EyCJdPxiJeLJQ==", "dependencies": { "@babel/core": "7.23.9", "@jridgewell/sourcemap-codec": "^1.4.14", @@ -1399,14 +1399,14 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/compiler": "17.3.2", + "@angular/compiler": "17.3.7", "typescript": ">=5.2 <5.5" } }, "node_modules/@angular/core": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-17.3.2.tgz", - "integrity": "sha512-eylatBGaN8uihKomEcXkaSHmAea5bEqu1OXifEoVOJiJpJA9Dbt/VcLXkIRFnRGH2NWUT5W79vSoU9GRvPMk5w==", + "version": "17.3.7", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-17.3.7.tgz", + "integrity": "sha512-HWcrbxqnvIMSxFuQdN0KPt08bc87hqr0LKm89yuRTUwx/2sNJlNQUobk6aJj4trswGBttcRDT+GOS4DQP2Nr4g==", "dependencies": { "tslib": "^2.3.0" }, @@ -1419,9 +1419,9 @@ } }, "node_modules/@angular/forms": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-17.3.2.tgz", - "integrity": "sha512-sbHYjAEeEWW+02YDEKuuuTEUukm6AayQuHiAu37vACj/2q/2RWQar49IoRcSJfAwP2ckqRSK4mmLoDX4IG/KSg==", + "version": "17.3.7", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-17.3.7.tgz", + "integrity": "sha512-FEhXh/VmT++XCoO8i7bBtzxG7Am/cE1zrr9aF+fWW+4jpWvJvVN1IaSiJxgBB+iPsOJ9lTBRwfRW3onlcDkhrw==", "dependencies": { "tslib": "^2.3.0" }, @@ -1429,16 +1429,16 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/common": "17.3.2", - "@angular/core": "17.3.2", - "@angular/platform-browser": "17.3.2", + "@angular/common": "17.3.7", + "@angular/core": "17.3.7", + "@angular/platform-browser": "17.3.7", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/localize": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular/localize/-/localize-17.3.2.tgz", - "integrity": "sha512-8DMdpWqBZwj367jdT2fSnD406wyNP6WD9wmZr1gzDyViGsM6xUM4udbIJHQ+EABkriSKj3usHqZw6LAzO9kepw==", + "version": "17.3.7", + "resolved": "https://registry.npmjs.org/@angular/localize/-/localize-17.3.7.tgz", + "integrity": "sha512-GidwcxquawJBZXNQs6cJ3GvmyowupW9JFkG5sVsS6KG4yu9SIt4FZC+EbrVtYDhXI3U2wxGkm+9vDKvkSGzG0g==", "dependencies": { "@babel/core": "7.23.9", "@types/babel__core": "7.20.5", @@ -1454,14 +1454,14 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/compiler": "17.3.2", - "@angular/compiler-cli": "17.3.2" + "@angular/compiler": "17.3.7", + "@angular/compiler-cli": "17.3.7" } }, "node_modules/@angular/platform-browser": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-17.3.2.tgz", - "integrity": "sha512-rBVmpJ/uh+CTjYef3Nib1K+31GFbM4mZaw2R2PowKZLgWOT3MWXKy41i44NEyM8qY1dxESmzMzy4NuGfZol42Q==", + "version": "17.3.7", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-17.3.7.tgz", + "integrity": "sha512-Nn8ZMaftAvO9dEwribWdNv+QBHhYIBrRkv85G6et80AXfXoYAr/xcfnQECRFtZgPmANqHC5auv/xrmExQG+Yeg==", "dependencies": { "tslib": "^2.3.0" }, @@ -1469,9 +1469,9 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/animations": "17.3.2", - "@angular/common": "17.3.2", - "@angular/core": "17.3.2" + "@angular/animations": "17.3.7", + "@angular/common": "17.3.7", + "@angular/core": "17.3.7" }, "peerDependenciesMeta": { "@angular/animations": { @@ -1480,9 +1480,9 @@ } }, "node_modules/@angular/platform-browser-dynamic": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.3.2.tgz", - "integrity": "sha512-fcGo9yQ+t9VaG9zPgjQW5HIizbYOKj+9kVk9FPru+uJbYyvJUwEDgpD3aI0DUrQy/OvSf4NMzY/Ucgw1AUknQw==", + "version": "17.3.7", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.3.7.tgz", + "integrity": "sha512-9c2I4u0L1p2v1/lW8qy+WaNHisUWbyy6wqsv2v9FfCaSM49Lxymgo9LPFPC4qEG5ei5nE+eIQ2ocRiXXsf5QkQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -1490,16 +1490,16 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/common": "17.3.2", - "@angular/compiler": "17.3.2", - "@angular/core": "17.3.2", - "@angular/platform-browser": "17.3.2" + "@angular/common": "17.3.7", + "@angular/compiler": "17.3.7", + "@angular/core": "17.3.7", + "@angular/platform-browser": "17.3.7" } }, "node_modules/@angular/router": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-17.3.2.tgz", - "integrity": "sha512-BJiaG7zldhe8FPsg3Xv1o2xsmWNMIuntubRiSt2NlSceAr/NEgHoARpZfAGKTaFSngl6jc407wHOmBBPPALECw==", + "version": "17.3.7", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-17.3.7.tgz", + "integrity": "sha512-lMkuRrc1ZjP5JPDxNHqoAhB0uAnfPQ/q6mJrw1s8IZoVV6VyM+FxR5r13ajNcXWC38xy/YhBjpXPF1vBdxuLXg==", "dependencies": { "tslib": "^2.3.0" }, @@ -1507,9 +1507,9 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/common": "17.3.2", - "@angular/core": "17.3.2", - "@angular/platform-browser": "17.3.2", + "@angular/common": "17.3.7", + "@angular/core": "17.3.7", + "@angular/platform-browser": "17.3.7", "rxjs": "^6.5.3 || ^7.4.0" } }, @@ -4844,9 +4844,9 @@ } }, "node_modules/@ngtools/webpack": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-17.3.2.tgz", - "integrity": "sha512-E8zejFF4aJ8l2XcF+GgnE/1IqsZepnPT1xzulLB4LXtjVuXLFLoF9xkHQwxs7cJWWZsxd/SlNsCIcn/ezrYBcQ==", + "version": "17.3.6", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-17.3.6.tgz", + "integrity": "sha512-equxbgh2DKzZtiFMoVf1KD4yJcH1q8lpqQ/GSPPQUvONcmHrr+yqdRUdaJ7oZCyCYmXF/nByBxtMKtJr6nKZVg==", "dev": true, "engines": { "node": "^18.13.0 || >=20.9.0", @@ -5604,13 +5604,13 @@ ] }, "node_modules/@schematics/angular": { - "version": "17.3.2", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-17.3.2.tgz", - "integrity": "sha512-zPINvow0Qo6ionnDl25ZzSSLDyDxBjqRPEJWGHU70expbjXK4A2caQT9P/8ImhapbJAXJCfxg4GF9z1d/sWe4w==", + "version": "17.3.6", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-17.3.6.tgz", + "integrity": "sha512-jCNZdjHSVrI8TrrCnCoXC8GYvQRj7zh+SDdmm91Ve8dbikYNmBOKYLuPaCTsmojWx7ytv962yLlgKzpaa2bbfw==", "dev": true, "dependencies": { - "@angular-devkit/core": "17.3.2", - "@angular-devkit/schematics": "17.3.2", + "@angular-devkit/core": "17.3.6", + "@angular-devkit/schematics": "17.3.6", "jsonc-parser": "3.2.1" }, "engines": { @@ -5935,9 +5935,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.43", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz", - "integrity": "sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.0.tgz", + "integrity": "sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ==", "dev": true, "dependencies": { "@types/node": "*", @@ -6046,9 +6046,9 @@ } }, "node_modules/@types/qs": { - "version": "6.9.14", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.14.tgz", - "integrity": "sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA==", + "version": "6.9.15", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz", + "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==", "dev": true }, "node_modules/@types/range-parser": { @@ -6089,14 +6089,14 @@ } }, "node_modules/@types/serve-static": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz", - "integrity": "sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==", + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", "dev": true, "dependencies": { "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" + "@types/node": "*", + "@types/send": "*" } }, "node_modules/@types/sockjs": { @@ -9100,9 +9100,9 @@ "dev": true }, "node_modules/ejs": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", - "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "dev": true, "dependencies": { "jake": "^10.8.5" @@ -11056,9 +11056,9 @@ "dev": true }, "node_modules/ipaddr.js": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz", - "integrity": "sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", + "integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==", "dev": true, "engines": { "node": ">= 10" @@ -18066,9 +18066,9 @@ } }, "node_modules/undici": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.7.1.tgz", - "integrity": "sha512-+Wtb9bAQw6HYWzCnxrPTMVEV3Q1QjYanI0E4q02ehReMuquQdLTEFEYbfs7hcImVYKcQkWSwT6buEmSVIiDDtQ==", + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.11.1.tgz", + "integrity": "sha512-KyhzaLJnV1qa3BSHdj4AZ2ndqI0QWPxYzaIOio0WzcEJB9gvuysprJSLtpvc2D9mhR9jPDUk7xlJlZbH2KR5iw==", "dev": true, "engines": { "node": ">=18.0" @@ -18295,9 +18295,9 @@ } }, "node_modules/vite": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.5.tgz", - "integrity": "sha512-BdN1xh0Of/oQafhU+FvopafUp6WaYenLU/NFoL5WyJL++GxkNfieKzBhM24H3HVsPQrlAqB7iJYTHabzaRed5Q==", + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.7.tgz", + "integrity": "sha512-sgnEEFTZYMui/sTlH1/XEnVNHMujOahPLGMxn1+5sIT45Xjng1Ec1K78jRP15dSmVgg5WBin9yO81j3o9OxofA==", "dev": true, "dependencies": { "esbuild": "^0.19.3", diff --git a/src-ui/package.json b/src-ui/package.json index b6b0678ee..af8187877 100644 --- a/src-ui/package.json +++ b/src-ui/package.json @@ -11,15 +11,15 @@ }, "private": true, "dependencies": { - "@angular/cdk": "^17.3.2", - "@angular/common": "~17.3.2", - "@angular/compiler": "~17.3.2", - "@angular/core": "~17.3.2", - "@angular/forms": "~17.3.2", - "@angular/localize": "~17.3.2", - "@angular/platform-browser": "~17.3.2", - "@angular/platform-browser-dynamic": "~17.3.2", - "@angular/router": "~17.3.2", + "@angular/cdk": "^17.3.6", + "@angular/common": "~17.3.7", + "@angular/compiler": "~17.3.7", + "@angular/core": "~17.3.7", + "@angular/forms": "~17.3.7", + "@angular/localize": "~17.3.7", + "@angular/platform-browser": "~17.3.7", + "@angular/platform-browser-dynamic": "~17.3.7", + "@angular/router": "~17.3.7", "@ng-bootstrap/ng-bootstrap": "^16.0.0", "@ng-select/ng-select": "^12.0.7", "@ngneat/dirty-check-forms": "^3.0.3", @@ -40,14 +40,14 @@ "zone.js": "^0.14.4" }, "devDependencies": { - "@angular-builders/jest": "17.0.2", - "@angular-devkit/build-angular": "~17.3.2", + "@angular-builders/jest": "17.0.3", + "@angular-devkit/build-angular": "~17.3.6", "@angular-eslint/builder": "17.3.0", "@angular-eslint/eslint-plugin": "17.3.0", "@angular-eslint/eslint-plugin-template": "17.3.0", "@angular-eslint/schematics": "17.3.0", "@angular-eslint/template-parser": "17.3.0", - "@angular/cli": "~17.3.2", + "@angular/cli": "~17.3.6", "@angular/compiler-cli": "~17.3.2", "@playwright/test": "^1.42.1", "@types/jest": "^29.5.12", diff --git a/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.html b/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.html index 2489c995a..9111a4b29 100644 --- a/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.html +++ b/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.html @@ -1,31 +1,27 @@ -
+
-
    -
  • - - -
  • -
+
+ @for (field of filteredFields; track field.id) { + + } + @if (!filterText?.length || filteredFields.length === 0) { + + } +
diff --git a/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.scss b/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.scss index 3240063aa..302dbfe77 100644 --- a/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.scss +++ b/src-ui/src/app/components/common/custom-fields-dropdown/custom-fields-dropdown.component.scss @@ -1,5 +1,5 @@ .custom-fields-dropdown { - min-width: 380px; + min-width: 300px; // correct position on mobile @media (max-width: 575.98px) { @@ -8,13 +8,3 @@ } } } - -::ng-deep .custom-fields-dropdown .ng-select .ng-select-container .ng-value-container .ng-placeholder, -::ng-deep .custom-fields-dropdown .ng-select .ng-option, -::ng-deep .custom-fields-dropdown .ng-select .ng-select-container .ng-value-container .ng-value { - font-size: 0.875rem; -} - -::ng-deep .custom-fields-dropdown .paperless-input-select .ng-select .ng-select-container .ng-value-container .ng-input { - top: 4px; -} 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 7c24578e6..121591ef1 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 @@ -1,5 +1,9 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing' - +import { + ComponentFixture, + TestBed, + fakeAsync, + tick, +} from '@angular/core/testing' import { CustomFieldsDropdownComponent } from './custom-fields-dropdown.component' import { HttpClientTestingModule } from '@angular/common/http/testing' import { ToastService } from 'src/app/services/toast.service' @@ -71,28 +75,33 @@ describe('CustomFieldsDropdownComponent', () => { let addedField component.added.subscribe((f) => (addedField = f)) component.documentId = 11 - component.field = fields[0].id - component.addField() + component.addField({ field: fields[0].id } as any) expect(addedField).not.toBeUndefined() }) - it('should clear field on open / close, updated unused fields', () => { - component.field = fields[1].id - component.onOpenClose() - expect(component.field).toBeUndefined() - - expect(component.unusedFields).toEqual(fields) - const updateSpy = jest.spyOn( - CustomFieldsDropdownComponent.prototype as any, - 'updateUnusedFields' - ) - component.existingFields = [{ field: fields[1].id } as any] - component.onOpenClose() - expect(updateSpy).toHaveBeenCalled() - expect(component.unusedFields).toEqual([fields[0]]) + it('should support filtering fields', () => { + const input = fixture.debugElement.query(By.css('input')) + input.nativeElement.value = 'Field 1' + input.triggerEventHandler('input', { target: input.nativeElement }) + fixture.detectChanges() + expect(component.filteredFields.length).toEqual(1) + expect(component.filteredFields[0].name).toEqual('Field 1') }) - it('should support creating field, show error if necessary', () => { + it('should support update unused fields', () => { + component.existingFields = [{ field: fields[0].id } as any] + component['updateUnusedFields']() + expect(component['unusedFields'].length).toEqual(1) + expect(component['unusedFields'][0].name).toEqual('Field 2') + }) + + it('should support getting data type label', () => { + expect(component.getDataTypeLabel(CustomFieldDataType.Integer)).toEqual( + 'Integer' + ) + }) + + it('should support creating field, show error if necessary, then add', fakeAsync(() => { let modal: NgbModalRef modalService.activeInstances.subscribe((m) => (modal = m[m.length - 1])) const toastErrorSpy = jest.spyOn(toastService, 'showError') @@ -101,8 +110,9 @@ describe('CustomFieldsDropdownComponent', () => { CustomFieldsDropdownComponent.prototype as any, 'getFields' ) + const addFieldSpy = jest.spyOn(component, 'addField') - const createButton = fixture.debugElement.queryAll(By.css('button'))[1] + const createButton = fixture.debugElement.queryAll(By.css('button'))[3] createButton.triggerEventHandler('click') expect(modal).not.toBeUndefined() @@ -115,9 +125,11 @@ describe('CustomFieldsDropdownComponent', () => { // succeed editDialog.succeeded.emit(fields[0]) + tick(100) expect(toastInfoSpy).toHaveBeenCalled() expect(getFieldsSpy).toHaveBeenCalled() - }) + expect(addFieldSpy).toHaveBeenCalled() + })) it('should support creating field with name', () => { let modal: NgbModalRef @@ -128,4 +140,106 @@ describe('CustomFieldsDropdownComponent', () => { const editDialog = modal.componentInstance as CustomFieldEditDialogComponent expect(editDialog.object.name).toEqual('Foo bar') }) + + it('should support arrow keyboard navigation', fakeAsync(() => { + fixture.nativeElement + .querySelector('button') + .dispatchEvent(new MouseEvent('click')) // open + fixture.detectChanges() + tick(100) + const filterInputEl: HTMLInputElement = + component.listFilterTextInput.nativeElement + expect(document.activeElement).toEqual(filterInputEl) + const itemButtons = Array.from( + (fixture.nativeElement as HTMLDivElement).querySelectorAll( + '.custom-fields-dropdown button' + ) + ).filter((b) => b.textContent.includes('Field')) + filterInputEl.dispatchEvent( + new KeyboardEvent('keydown', { key: 'ArrowDown', bubbles: true }) + ) + expect(document.activeElement).toEqual(itemButtons[0]) + itemButtons[0].dispatchEvent( + new KeyboardEvent('keydown', { key: 'ArrowDown', bubbles: true }) + ) + expect(document.activeElement).toEqual(itemButtons[1]) + itemButtons[1].dispatchEvent( + new KeyboardEvent('keydown', { key: 'ArrowUp', bubbles: true }) + ) + expect(document.activeElement).toEqual(itemButtons[0]) + itemButtons[0].dispatchEvent( + new KeyboardEvent('keydown', { key: 'ArrowUp', bubbles: true }) + ) + expect(document.activeElement).toEqual(filterInputEl) + filterInputEl.value = 'foo' + component.filterText = 'foo' + + // dont move focus if we're traversing the field + filterInputEl.selectionStart = 1 + expect(document.activeElement).toEqual(filterInputEl) + + // now we're at end, so move focus + filterInputEl.selectionStart = 3 + filterInputEl.dispatchEvent( + new KeyboardEvent('keydown', { key: 'ArrowDown', bubbles: true }) + ) + expect(document.activeElement).toEqual(itemButtons[0]) + })) + + it('should support arrow keyboard navigation after tab keyboard navigation', fakeAsync(() => { + fixture.nativeElement + .querySelector('button') + .dispatchEvent(new MouseEvent('click')) // open + fixture.detectChanges() + tick(100) + const filterInputEl: HTMLInputElement = + component.listFilterTextInput.nativeElement + expect(document.activeElement).toEqual(filterInputEl) + const itemButtons = Array.from( + (fixture.nativeElement as HTMLDivElement).querySelectorAll( + '.custom-fields-dropdown button' + ) + ).filter((b) => b.textContent.includes('Field')) + filterInputEl.dispatchEvent( + new KeyboardEvent('keydown', { key: 'Tab', bubbles: true }) + ) + itemButtons[0]['focus']() // normally handled by browser + itemButtons[0].dispatchEvent( + new KeyboardEvent('keydown', { key: 'Tab', bubbles: true }) + ) + itemButtons[1]['focus']() // normally handled by browser + itemButtons[1].dispatchEvent( + new KeyboardEvent('keydown', { + key: 'Tab', + shiftKey: true, + bubbles: true, + }) + ) + itemButtons[0]['focus']() // normally handled by browser + itemButtons[0].dispatchEvent( + new KeyboardEvent('keydown', { key: 'ArrowDown', bubbles: true }) + ) + expect(document.activeElement).toEqual(itemButtons[1]) + })) + + it('should support enter keyboard navigation', fakeAsync(() => { + jest.spyOn(component, 'canCreateFields', 'get').mockReturnValue(true) + const addFieldSpy = jest.spyOn(component, 'addField') + const createFieldSpy = jest.spyOn(component, 'createField') + component.filterText = 'Field 1' + component.listFilterEnter() + expect(addFieldSpy).toHaveBeenCalled() + + component.filterText = 'Field 3' + component.listFilterEnter() + expect(createFieldSpy).toHaveBeenCalledWith('Field 3') + + addFieldSpy.mockClear() + createFieldSpy.mockClear() + + component.filterText = undefined + component.listFilterEnter() + expect(createFieldSpy).not.toHaveBeenCalled() + expect(addFieldSpy).not.toHaveBeenCalled() + })) }) 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 79c0d1b58..652d7f3d8 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 @@ -1,13 +1,17 @@ import { Component, + ElementRef, EventEmitter, Input, OnDestroy, Output, + QueryList, + ViewChild, + ViewChildren, } from '@angular/core' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' import { Subject, first, takeUntil } from 'rxjs' -import { CustomField } from 'src/app/data/custom-field' +import { CustomField, DATA_TYPE_LABELS } from 'src/app/data/custom-field' import { CustomFieldInstance } from 'src/app/data/custom-field-instance' import { CustomFieldsService } from 'src/app/services/rest/custom-fields.service' import { ToastService } from 'src/app/services/toast.service' @@ -39,23 +43,25 @@ export class CustomFieldsDropdownComponent implements OnDestroy { @Output() created: EventEmitter = new EventEmitter() + @ViewChild('listFilterTextInput') listFilterTextInput: ElementRef + @ViewChildren('button') buttons: QueryList + private customFields: CustomField[] = [] - public unusedFields: CustomField[] + private unusedFields: CustomField[] = [] + private keyboardIndex: number - public name: string + public get filteredFields(): CustomField[] { + return this.unusedFields.filter( + (f) => + !this.filterText || + f.name.toLowerCase().includes(this.filterText.toLowerCase()) + ) + } - public field: number + public filterText: string private unsubscribeNotifier: Subject = new Subject() - get placeholderText(): string { - return $localize`Choose field` - } - - get notFoundText(): string { - return $localize`No unused fields found` - } - get canCreateFields(): boolean { return this.permissionsService.currentUserCan( PermissionAction.Add, @@ -87,28 +93,26 @@ export class CustomFieldsDropdownComponent implements OnDestroy { }) } - public getCustomFieldFromInstance( - instance: CustomFieldInstance - ): CustomField { - return this.customFields.find((f) => f.id === instance.field) - } - private updateUnusedFields() { this.unusedFields = this.customFields.filter( - (f) => - !this.existingFields?.find( - (e) => this.getCustomFieldFromInstance(e)?.id === f.id - ) + (f) => !this.existingFields?.find((e) => e.field === f.id) ) } - onOpenClose() { - this.field = undefined + onOpenClose(open: boolean) { + if (open) { + setTimeout(() => { + this.listFilterTextInput.nativeElement.focus() + }, 100) + } else { + this.filterText = undefined + } this.updateUnusedFields() } - addField() { - this.added.emit(this.customFields.find((f) => f.id === this.field)) + addField(field: CustomField) { + this.added.emit(field) + this.updateUnusedFields() } createField(newName: string = null) { @@ -121,6 +125,7 @@ export class CustomFieldsDropdownComponent implements OnDestroy { this.customFieldsService.clearCache() this.getFields() this.created.emit(newField) + setTimeout(() => this.addField(newField), 100) }) modal.componentInstance.failed .pipe(takeUntil(this.unsubscribeNotifier)) @@ -128,4 +133,82 @@ export class CustomFieldsDropdownComponent implements OnDestroy { this.toastService.showError($localize`Error saving field.`, e) }) } + + getDataTypeLabel(dataType: string) { + return DATA_TYPE_LABELS.find((l) => l.id === dataType)?.name + } + + public listFilterEnter() { + if (this.filteredFields.length === 1) { + this.addField(this.filteredFields[0]) + } else if ( + this.filterText && + this.filteredFields.length === 0 && + this.canCreateFields + ) { + this.createField(this.filterText) + } + } + + private focusNextButtonItem(setFocus: boolean = true) { + this.keyboardIndex = Math.min( + this.buttons.length - 1, + this.keyboardIndex + 1 + ) + if (setFocus) this.setButtonItemFocus() + } + + focusPreviousButtonItem(setFocus: boolean = true) { + this.keyboardIndex = Math.max(0, this.keyboardIndex - 1) + if (setFocus) this.setButtonItemFocus() + } + + setButtonItemFocus() { + this.buttons.get(this.keyboardIndex)?.nativeElement.focus() + } + + public listKeyDown(event: KeyboardEvent) { + switch (event.key) { + case 'ArrowDown': + if (event.target instanceof HTMLInputElement) { + if ( + !this.filterText || + event.target.selectionStart === this.filterText.length + ) { + this.keyboardIndex = -1 + this.focusNextButtonItem() + event.preventDefault() + } + } else if (event.target instanceof HTMLButtonElement) { + this.focusNextButtonItem() + event.preventDefault() + } + break + case 'ArrowUp': + if (event.target instanceof HTMLButtonElement) { + if (this.keyboardIndex === 0) { + this.listFilterTextInput.nativeElement.focus() + } else { + this.focusPreviousButtonItem() + } + event.preventDefault() + } + break + case 'Tab': + // just track the index in case user uses arrows + if (event.target instanceof HTMLInputElement) { + this.keyboardIndex = 0 + } else if (event.target instanceof HTMLButtonElement) { + if (event.shiftKey) { + if (this.keyboardIndex > 0) { + this.focusPreviousButtonItem(false) + } + } else { + this.focusNextButtonItem(false) + } + } + default: + break + } + } } 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 facced036..a0c02a688 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 @@ -949,9 +949,9 @@ describe('DocumentDetailComponent', () => { fixture.detectChanges() expect(component.document.custom_fields).toHaveLength(initialLength - 1) expect(component.customFieldFormFields).toHaveLength(initialLength - 1) - expect(fixture.debugElement.nativeElement.textContent).not.toContain( - 'Field 1' - ) + expect( + fixture.debugElement.query(By.css('form')).nativeElement.textContent + ).not.toContain('Field 1') const updateSpy = jest.spyOn(documentService, 'update') component.save(true) expect(updateSpy.mock.lastCall[0].custom_fields).toHaveLength( 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 115d8ac52..5e3b6c2a7 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 @@ -674,13 +674,17 @@ export class DocumentDetailComponent this.documentForm.patchValue(docValues) this.store.next(this.documentForm.value) this.openDocumentService.setDirty(this.document, false) + this.openDocumentService.save() this.toastService.showInfo($localize`Document saved successfully.`) this.networkActive = false this.error = null - close && + if (close) { this.close(() => this.openDocumentService.refreshDocument(this.documentId) ) + } else { + this.openDocumentService.refreshDocument(this.documentId) + } }, error: (error) => { this.networkActive = false diff --git a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html index 254814d0d..99ef0cdc7 100644 --- a/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html +++ b/src-ui/src/app/components/document-list/filter-editor/filter-editor.component.html @@ -72,7 +72,7 @@ [disabled]="disabled" shortcutKey="u"> } - @if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.StoragePath)) { + @if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.StoragePath) && storagePaths.length > 0) { } - @if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.CustomField)) { + @if (permissionsService.currentUserCan(PermissionAction.View, PermissionType.CustomField) && customFields.length > 0) { { const notNow = new Date(now) notNow.setDate(now.getDate() - 1) expect(datePipe.transform(notNow, 'relative')).toEqual('1 day ago') - notNow.setDate(now.getDate() - 2) - expect(datePipe.transform(notNow, 'relative')).toEqual('2 days ago') + notNow.setDate(now.getDate()) + notNow.setMonth(now.getMonth() - 1) + expect(datePipe.transform(notNow, 'relative')).toEqual('1 month ago') expect(datePipe.transform(now, 'relative')).toEqual('Just now') }) })