@acorex/modules 21.0.0-next.1 → 21.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/auth/index.d.ts +21 -25
  2. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-Xhv636ad.mjs → acorex-modules-auth-acorex-modules-auth-DyMrPzio.mjs} +128 -173
  3. package/fesm2022/acorex-modules-auth-acorex-modules-auth-DyMrPzio.mjs.map +1 -0
  4. package/fesm2022/{acorex-modules-auth-app-chooser.component-CVTPqwuU.mjs → acorex-modules-auth-app-chooser.component-CeTkWuU7.mjs} +2 -2
  5. package/fesm2022/{acorex-modules-auth-app-chooser.component-CVTPqwuU.mjs.map → acorex-modules-auth-app-chooser.component-CeTkWuU7.mjs.map} +1 -1
  6. package/fesm2022/{acorex-modules-auth-login.module-D-OyMAOZ.mjs → acorex-modules-auth-login.module-DanUC1V9.mjs} +4 -4
  7. package/fesm2022/{acorex-modules-auth-login.module-D-OyMAOZ.mjs.map → acorex-modules-auth-login.module-DanUC1V9.mjs.map} +1 -1
  8. package/fesm2022/{acorex-modules-auth-master.layout-Daxd7Nh7.mjs → acorex-modules-auth-master.layout-StFhVYaW.mjs} +2 -2
  9. package/fesm2022/{acorex-modules-auth-master.layout-Daxd7Nh7.mjs.map → acorex-modules-auth-master.layout-StFhVYaW.mjs.map} +1 -1
  10. package/fesm2022/{acorex-modules-auth-oauth-callback.component-DrpoLauM.mjs → acorex-modules-auth-oauth-callback.component-BYZyzG0Q.mjs} +2 -2
  11. package/fesm2022/{acorex-modules-auth-oauth-callback.component-DrpoLauM.mjs.map → acorex-modules-auth-oauth-callback.component-BYZyzG0Q.mjs.map} +1 -1
  12. package/fesm2022/{acorex-modules-auth-password.component-Ce1GT_9U.mjs → acorex-modules-auth-password.component-CshkJ94Y.mjs} +2 -2
  13. package/fesm2022/{acorex-modules-auth-password.component-Ce1GT_9U.mjs.map → acorex-modules-auth-password.component-CshkJ94Y.mjs.map} +1 -1
  14. package/fesm2022/{acorex-modules-auth-password.component-OFNLNftl.mjs → acorex-modules-auth-password.component-Cwnmr_K3.mjs} +2 -2
  15. package/fesm2022/{acorex-modules-auth-password.component-OFNLNftl.mjs.map → acorex-modules-auth-password.component-Cwnmr_K3.mjs.map} +1 -1
  16. package/fesm2022/{acorex-modules-auth-routes-nKIv8r0R.mjs → acorex-modules-auth-routes-QmD6HTen.mjs} +2 -2
  17. package/fesm2022/{acorex-modules-auth-routes-nKIv8r0R.mjs.map → acorex-modules-auth-routes-QmD6HTen.mjs.map} +1 -1
  18. package/fesm2022/{acorex-modules-auth-two-factor.module-CxhH6CxU.mjs → acorex-modules-auth-two-factor.module-CUrjDJKb.mjs} +2 -2
  19. package/fesm2022/{acorex-modules-auth-two-factor.module-CxhH6CxU.mjs.map → acorex-modules-auth-two-factor.module-CUrjDJKb.mjs.map} +1 -1
  20. package/fesm2022/{acorex-modules-auth-user-sessions.component-CMIlSHxl.mjs → acorex-modules-auth-user-sessions.component-f5tjvO2x.mjs} +2 -2
  21. package/fesm2022/{acorex-modules-auth-user-sessions.component-CMIlSHxl.mjs.map → acorex-modules-auth-user-sessions.component-f5tjvO2x.mjs.map} +1 -1
  22. package/fesm2022/acorex-modules-auth.mjs +1 -1
  23. package/fesm2022/{acorex-modules-document-management-acorex-modules-document-management-CHubrWiR.mjs → acorex-modules-document-management-acorex-modules-document-management-BUV6euwQ.mjs} +18 -382
  24. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-BUV6euwQ.mjs.map +1 -0
  25. package/fesm2022/{acorex-modules-document-management-attachment-widget.component-DeLipvyw.mjs → acorex-modules-document-management-attachment-widget.component-y_nPA03O.mjs} +2 -2
  26. package/fesm2022/{acorex-modules-document-management-attachment-widget.component-DeLipvyw.mjs.map → acorex-modules-document-management-attachment-widget.component-y_nPA03O.mjs.map} +1 -1
  27. package/fesm2022/{acorex-modules-document-management-details-view.component-Cnh-LFjB.mjs → acorex-modules-document-management-details-view.component-CMlHf8Um.mjs} +2 -2
  28. package/fesm2022/{acorex-modules-document-management-details-view.component-Cnh-LFjB.mjs.map → acorex-modules-document-management-details-view.component-CMlHf8Um.mjs.map} +1 -1
  29. package/fesm2022/{acorex-modules-document-management-document-signature-popup.component-BHELpzzB.mjs → acorex-modules-document-management-document-signature-popup.component-Cq00rYaJ.mjs} +2 -2
  30. package/fesm2022/{acorex-modules-document-management-document-signature-popup.component-BHELpzzB.mjs.map → acorex-modules-document-management-document-signature-popup.component-Cq00rYaJ.mjs.map} +1 -1
  31. package/fesm2022/{acorex-modules-document-management-drive-choose.component-CjVfyBBA.mjs → acorex-modules-document-management-drive-choose.component-pehj7js2.mjs} +2 -2
  32. package/fesm2022/{acorex-modules-document-management-drive-choose.component-CjVfyBBA.mjs.map → acorex-modules-document-management-drive-choose.component-pehj7js2.mjs.map} +1 -1
  33. package/fesm2022/{acorex-modules-document-management-drive.component-a7AMnvvu.mjs → acorex-modules-document-management-drive.component-dvSTOy_3.mjs} +2 -2
  34. package/fesm2022/{acorex-modules-document-management-drive.component-a7AMnvvu.mjs.map → acorex-modules-document-management-drive.component-dvSTOy_3.mjs.map} +1 -1
  35. package/fesm2022/{acorex-modules-document-management-feature-definition.provider-B4hCKUul.mjs → acorex-modules-document-management-feature-definition.provider-De2RD_N_.mjs} +2 -2
  36. package/fesm2022/{acorex-modules-document-management-feature-definition.provider-B4hCKUul.mjs.map → acorex-modules-document-management-feature-definition.provider-De2RD_N_.mjs.map} +1 -1
  37. package/fesm2022/{acorex-modules-document-management-large-icons-view.component-CETjs5Az.mjs → acorex-modules-document-management-large-icons-view.component-CcIhr_aU.mjs} +2 -2
  38. package/fesm2022/{acorex-modules-document-management-large-icons-view.component-CETjs5Az.mjs.map → acorex-modules-document-management-large-icons-view.component-CcIhr_aU.mjs.map} +1 -1
  39. package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-7agAfinH.mjs → acorex-modules-document-management-large-tiles-view.component-DP4pGOCz.mjs} +2 -2
  40. package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-7agAfinH.mjs.map → acorex-modules-document-management-large-tiles-view.component-DP4pGOCz.mjs.map} +1 -1
  41. package/fesm2022/{acorex-modules-document-management-list-view.component-CMfX3G8l.mjs → acorex-modules-document-management-list-view.component-BC5vi2Cj.mjs} +2 -2
  42. package/fesm2022/{acorex-modules-document-management-list-view.component-CMfX3G8l.mjs.map → acorex-modules-document-management-list-view.component-BC5vi2Cj.mjs.map} +1 -1
  43. package/fesm2022/{acorex-modules-document-management-permission-definition.provider-v7SvdUQO.mjs → acorex-modules-document-management-permission-definition.provider-B1P5TVdF.mjs} +2 -2
  44. package/fesm2022/{acorex-modules-document-management-permission-definition.provider-v7SvdUQO.mjs.map → acorex-modules-document-management-permission-definition.provider-B1P5TVdF.mjs.map} +1 -1
  45. package/fesm2022/{acorex-modules-document-management-small-icons-view.component-BL-IoyfV.mjs → acorex-modules-document-management-small-icons-view.component-C8Gf9Ea4.mjs} +2 -2
  46. package/fesm2022/{acorex-modules-document-management-small-icons-view.component-BL-IoyfV.mjs.map → acorex-modules-document-management-small-icons-view.component-C8Gf9Ea4.mjs.map} +1 -1
  47. package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-B3QYcehJ.mjs → acorex-modules-document-management-small-tiles-view.component-Czr_jJb-.mjs} +2 -2
  48. package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-B3QYcehJ.mjs.map → acorex-modules-document-management-small-tiles-view.component-Czr_jJb-.mjs.map} +1 -1
  49. package/fesm2022/acorex-modules-document-management.mjs +1 -1
  50. package/fesm2022/acorex-modules-settings-management.mjs +13 -3
  51. package/fesm2022/acorex-modules-settings-management.mjs.map +1 -1
  52. package/fesm2022/acorex-modules-workflow-management.mjs +0 -152
  53. package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
  54. package/package.json +6 -6
  55. package/settings-management/index.d.ts +2 -3
  56. package/fesm2022/acorex-modules-auth-acorex-modules-auth-Xhv636ad.mjs.map +0 -1
  57. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-CHubrWiR.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
2
2
  import { AXMEntityCrudServiceImpl, entityMasterCrudActions, entityMasterRecordActions, cloneLayoutArrays, ensureLayoutSection, ensureLayoutPropertyView, ensureListActions, actionExists, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXPEntityService } from '@acorex/platform/layout/entity';
3
- import { AXPPlatformScope, AXPDataGenerator, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXPDistributedEventListenerService, AXP_MODULE_MANIFEST_PROVIDER } from '@acorex/platform/core';
3
+ import { AXPPlatformScope, AXPDataGenerator, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXP_MODULE_MANIFEST_PROVIDER } from '@acorex/platform/core';
4
4
  import * as i0 from '@angular/core';
5
5
  import { Injectable, NgModule, ChangeDetectionStrategy, Component, inject, signal, viewChild, afterNextRender, computed, input, effect, ViewEncapsulation, Injector } from '@angular/core';
6
6
  import * as i1$2 from '@acorex/platform/layout/widget-core';
@@ -40,15 +40,13 @@ import { AXBasePageComponent } from '@acorex/components/page';
40
40
  import { AXLoadingModule } from '@acorex/components/loading';
41
41
  import * as i2$2 from '@acorex/components/menu';
42
42
  import { AXMenuModule } from '@acorex/components/menu';
43
- import { AXDateTimeModule, AXCalendarService } from '@acorex/core/date-time';
43
+ import { AXDateTimeModule } from '@acorex/core/date-time';
44
44
  import { AXFormatModule } from '@acorex/core/format';
45
45
  import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
46
46
  import * as i1$3 from '@angular/common';
47
47
  import { CommonModule } from '@angular/common';
48
48
  import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
49
49
  import { AXUploaderService } from '@acorex/cdk/uploader';
50
- import { AXPWorkflowTaskProvider, AXP_WORKFLOW_TASK_PROVIDER } from '@acorex/modules/task-management';
51
- import { AXPCommandExecutor } from '@acorex/platform/runtime';
52
50
  import { firstValueFrom } from 'rxjs';
53
51
 
54
52
  const config = {
@@ -141,10 +139,10 @@ const DocumentManagementManifest = {
141
139
  i18n: RootConfig.config.i18n,
142
140
  // Provider references (lazy-loaded)
143
141
  features: {
144
- provider: () => import('./acorex-modules-document-management-feature-definition.provider-B4hCKUul.mjs').then(m => m.AXPDocumentManagementFeatureDefinitionProvider),
142
+ provider: () => import('./acorex-modules-document-management-feature-definition.provider-De2RD_N_.mjs').then(m => m.AXPDocumentManagementFeatureDefinitionProvider),
145
143
  },
146
144
  permissions: {
147
- provider: () => import('./acorex-modules-document-management-permission-definition.provider-v7SvdUQO.mjs').then(m => m.AXMPermissionDefinitionProvider),
145
+ provider: () => import('./acorex-modules-document-management-permission-definition.provider-B1P5TVdF.mjs').then(m => m.AXMPermissionDefinitionProvider),
148
146
  },
149
147
  menus: {
150
148
  provider: () => Promise.resolve().then(function () { return menu_provider; }).then(m => m.AXMMenuProvider),
@@ -5630,7 +5628,7 @@ class AXMDocumentManagerService {
5630
5628
  * Moves a node to another location
5631
5629
  */
5632
5630
  async moveTo(options) {
5633
- const comp = (await import('./acorex-modules-document-management-drive-choose.component-CjVfyBBA.mjs')).AXMDocumentDriveChooseComponent;
5631
+ const comp = (await import('./acorex-modules-document-management-drive-choose.component-pehj7js2.mjs')).AXMDocumentDriveChooseComponent;
5634
5632
  const popup = await this.popupService.open(comp, {
5635
5633
  title: `Choose ${options.browseMode == 'file' ? 'File' : 'Folder'}`,
5636
5634
  data: {
@@ -5663,7 +5661,7 @@ class AXMDocumentManagerService {
5663
5661
  * Copies a node to another location
5664
5662
  */
5665
5663
  async copyTo(options) {
5666
- const comp = (await import('./acorex-modules-document-management-drive-choose.component-CjVfyBBA.mjs')).AXMDocumentDriveChooseComponent;
5664
+ const comp = (await import('./acorex-modules-document-management-drive-choose.component-pehj7js2.mjs')).AXMDocumentDriveChooseComponent;
5667
5665
  const popup = await this.popupService.open(comp, {
5668
5666
  title: `Choose ${options.browseMode == 'file' ? 'File' : 'Folder'}`,
5669
5667
  data: {
@@ -6116,7 +6114,7 @@ class AXMDocumentManagerService {
6116
6114
  * Shows choose file dialog
6117
6115
  */
6118
6116
  async showChooseFileDialog(scope) {
6119
- const comp = (await import('./acorex-modules-document-management-drive-choose.component-CjVfyBBA.mjs')).AXMDocumentDriveChooseComponent;
6117
+ const comp = (await import('./acorex-modules-document-management-drive-choose.component-pehj7js2.mjs')).AXMDocumentDriveChooseComponent;
6120
6118
  const result = await this.popupService.open(comp, {
6121
6119
  title: await this.translate.translateAsync('@document-management:actions.choose-from-drive'),
6122
6120
  data: {
@@ -7324,13 +7322,13 @@ class AXMDocumentExplorerComponent {
7324
7322
  this.showContextMenu = input(true, ...(ngDevMode ? [{ debugName: "showContextMenu" }] : []));
7325
7323
  this.view = signal(null, ...(ngDevMode ? [{ debugName: "view" }] : []));
7326
7324
  this.viewMap = {
7327
- list: async () => (await import('./acorex-modules-document-management-list-view.component-CMfX3G8l.mjs')).AXMDocumentExplorerListViewComponent,
7328
- 'small-tiles': async () => (await import('./acorex-modules-document-management-small-tiles-view.component-B3QYcehJ.mjs')).AXMDocumentExplorerSmallTilesViewComponent,
7329
- 'large-tiles': async () => (await import('./acorex-modules-document-management-large-tiles-view.component-7agAfinH.mjs')).AXMDocumentExplorerLargeTilesViewComponent,
7330
- details: async () => (await import('./acorex-modules-document-management-details-view.component-Cnh-LFjB.mjs')).AXMDocumentExplorerDetailsViewComponent,
7331
- 'large-icons': async () => (await import('./acorex-modules-document-management-large-icons-view.component-CETjs5Az.mjs')).AXMDocumentExplorerLargeIconsViewComponent,
7332
- 'small-icons': async () => (await import('./acorex-modules-document-management-small-icons-view.component-BL-IoyfV.mjs')).AXMDocumentExplorerSmallIconsViewComponent,
7333
- 'attachment': async () => (await import('./acorex-modules-document-management-attachment-widget.component-DeLipvyw.mjs')).AXMDocumentExplorerAttachmentComponent,
7325
+ list: async () => (await import('./acorex-modules-document-management-list-view.component-BC5vi2Cj.mjs')).AXMDocumentExplorerListViewComponent,
7326
+ 'small-tiles': async () => (await import('./acorex-modules-document-management-small-tiles-view.component-Czr_jJb-.mjs')).AXMDocumentExplorerSmallTilesViewComponent,
7327
+ 'large-tiles': async () => (await import('./acorex-modules-document-management-large-tiles-view.component-DP4pGOCz.mjs')).AXMDocumentExplorerLargeTilesViewComponent,
7328
+ details: async () => (await import('./acorex-modules-document-management-details-view.component-CMlHf8Um.mjs')).AXMDocumentExplorerDetailsViewComponent,
7329
+ 'large-icons': async () => (await import('./acorex-modules-document-management-large-icons-view.component-CcIhr_aU.mjs')).AXMDocumentExplorerLargeIconsViewComponent,
7330
+ 'small-icons': async () => (await import('./acorex-modules-document-management-small-icons-view.component-C8Gf9Ea4.mjs')).AXMDocumentExplorerSmallIconsViewComponent,
7331
+ 'attachment': async () => (await import('./acorex-modules-document-management-attachment-widget.component-y_nPA03O.mjs')).AXMDocumentExplorerAttachmentComponent,
7334
7332
  };
7335
7333
  this.#effect = effect(() => {
7336
7334
  if (this.vm.loadingFolderId() == null) {
@@ -7916,7 +7914,7 @@ class AXMDocumentSignaturePopupAction extends AXPWorkflowAction {
7916
7914
  const documentId = context.getVariable('options.id');
7917
7915
  const documentTitle = context.getVariable('options.title');
7918
7916
  const fileId = context.getVariable('options.fileId');
7919
- const comp = await import('./acorex-modules-document-management-document-signature-popup.component-BHELpzzB.mjs')
7917
+ const comp = await import('./acorex-modules-document-management-document-signature-popup.component-Cq00rYaJ.mjs')
7920
7918
  .then(x => x.AXMDocumentSignaturePopupComponent);
7921
7919
  console.log(fileId);
7922
7920
  const result = await this.popupService.open(comp, {
@@ -8247,348 +8245,6 @@ const attachmentsPlugin = {
8247
8245
  },
8248
8246
  };
8249
8247
 
8250
- class AXMDocumentDistributionTaskProvider extends AXPWorkflowTaskProvider {
8251
- constructor() {
8252
- super(...arguments);
8253
- this.documentService = inject(AXMDistributionService);
8254
- this.workflowService = inject(AXPWorkflowService);
8255
- }
8256
- get name() {
8257
- return 'document-distribution';
8258
- }
8259
- get title() {
8260
- return 'Document Distribution';
8261
- }
8262
- get icon() {
8263
- return 'fa-light fa-file-pen';
8264
- }
8265
- /**
8266
- * Retrieves a list of tasks, optionally filtered by a date range.
8267
- * If a date range is provided in the options, only tasks that overlap with that range will be returned.
8268
- * @param options Filtering options, primarily containing a date range.
8269
- * @returns An array of filtered tasks.
8270
- */
8271
- async getTasks(options) {
8272
- const baseFilter = {
8273
- logic: 'and',
8274
- filters: [],
8275
- };
8276
- if (options?.range?.from) {
8277
- baseFilter.filters?.push({
8278
- field: 'distributionDate',
8279
- operator: { type: 'gte' },
8280
- value: options.range.from,
8281
- });
8282
- }
8283
- if (options?.range?.end) {
8284
- baseFilter.filters?.push({
8285
- field: 'distributionDate',
8286
- operator: { type: 'lte' },
8287
- value: options.range.end,
8288
- });
8289
- }
8290
- const filteredList = await this.documentService.query({
8291
- skip: options?.skip ?? 0,
8292
- take: options?.take ?? 10,
8293
- filter: baseFilter,
8294
- });
8295
- return {
8296
- items: filteredList.items.map((item) => ({
8297
- id: item.id,
8298
- title: item.document?.title ?? '' + ' - ' + item.version,
8299
- startDate: item.auditInfo?.created?.at ?? new Date(),
8300
- endDate: item.dueDate ?? new Date(),
8301
- index: 0,
8302
- status: {
8303
- id: 0,
8304
- title: 'Pending',
8305
- },
8306
- priority: 'high',
8307
- reporter: {
8308
- id: item.auditInfo?.created?.by?.id ?? '',
8309
- type: 'user',
8310
- fullName: item.auditInfo?.created?.by?.fullName ?? '',
8311
- },
8312
- data: item,
8313
- })),
8314
- total: filteredList.total,
8315
- };
8316
- }
8317
- /**
8318
- * Updates one or more tasks in the provider's list.
8319
- * This method finds each task by its ID and applies the new properties from the input.
8320
- * It also automatically recalculates the `allDay` flag based on the task's duration.
8321
- * @param tasksToUpdate An array of task objects to update. Each object must have an `id`.
8322
- * @returns An array of the tasks that were successfully updated.
8323
- */
8324
- async updateTasks(tasksToUpdate) {
8325
- console.log(tasksToUpdate);
8326
- return tasksToUpdate;
8327
- }
8328
- async executeCommand(command) {
8329
- if (command.name === 'document-signature') {
8330
- this.workflowService.execute(command.name, command);
8331
- }
8332
- return { success: true };
8333
- }
8334
- async getActions(task) {
8335
- const edit = {
8336
- title: `@${RootConfig.config.i18n}:workflows.documentDistribution.sign`,
8337
- command: {
8338
- name: 'document-signature',
8339
- options: {
8340
- id: task?.id,
8341
- title: task?.title,
8342
- fileId: task?.data?.document?.fileId,
8343
- },
8344
- },
8345
- };
8346
- return [edit];
8347
- }
8348
- async getExtraFields() {
8349
- return [];
8350
- }
8351
- async getStatuses() {
8352
- return [
8353
- { index: 0, key: 'pending', title: 'Pending' },
8354
- { index: 1, key: 'in-progress', title: 'In Progress' },
8355
- { index: 2, key: 'done', title: 'Done' },
8356
- { index: 3, key: 'canceled', title: 'Canceled' },
8357
- ];
8358
- }
8359
- }
8360
-
8361
- class AXMDocumentReviewTaskProvider extends AXPWorkflowTaskProvider {
8362
- constructor() {
8363
- super(...arguments);
8364
- this.documentReviewService = inject(AXMReviewService);
8365
- this.commandExecutor = inject(AXPCommandExecutor);
8366
- this.translationService = inject(AXTranslationService);
8367
- this.calendarService = inject(AXCalendarService);
8368
- this.workflowService = inject(AXPWorkflowService);
8369
- this.eventService = inject(AXPDistributedEventListenerService);
8370
- //#endregion
8371
- }
8372
- get name() {
8373
- return 'document-review';
8374
- }
8375
- get title() {
8376
- return '@document-management:review.plural-title';
8377
- }
8378
- get icon() {
8379
- return 'fa-light fa-file-pen';
8380
- }
8381
- async getTasks(options) {
8382
- try {
8383
- const baseFilter = { logic: 'and', filters: [] };
8384
- // Exclude completed items from task board
8385
- baseFilter.filters?.push({
8386
- field: 'reviewStatus',
8387
- operator: { type: 'equal', negative: true },
8388
- value: 'Approved'
8389
- });
8390
- baseFilter.filters?.push({
8391
- field: 'reviewStatus',
8392
- operator: { type: 'equal', negative: true },
8393
- value: 'Rejected'
8394
- });
8395
- // Handle date range filtering
8396
- if (options?.range?.from) {
8397
- baseFilter.filters?.push({
8398
- field: 'auditInfo.created.at',
8399
- operator: { type: 'gte' },
8400
- value: options.range.from
8401
- });
8402
- }
8403
- if (options?.range?.end) {
8404
- baseFilter.filters?.push({
8405
- field: 'auditInfo.created.at',
8406
- operator: { type: 'lte' },
8407
- value: options.range.end
8408
- });
8409
- }
8410
- // Handle assignee filtering
8411
- if (options?.assigneeIds && options.assigneeIds.length > 0) {
8412
- baseFilter.filters?.push({
8413
- field: 'reviewerId',
8414
- operator: { type: 'in' },
8415
- value: options.assigneeIds
8416
- });
8417
- }
8418
- const { items, total } = await this.documentReviewService.query({
8419
- skip: options?.skip ?? 0,
8420
- take: options?.take ?? 20,
8421
- filter: baseFilter,
8422
- });
8423
- const tasks = await Promise.all(items.map(async (item) => ({
8424
- id: item.id,
8425
- title: `${item.document?.title ?? 'Document'} - v${item.version}`,
8426
- description: item.document?.description ?? 'Document Review',
8427
- startDate: this.calendarService.create(item?.auditInfo?.created?.at ?? new Date()).startOf('day').date,
8428
- endDate: this.calendarService.create(item?.auditInfo?.created?.at ?? new Date()).endOf('day').date,
8429
- assignee: {
8430
- id: item.reviewerId ?? '',
8431
- type: 'user',
8432
- fullName: item.reviewer?.displayName ?? 'Unassigned',
8433
- },
8434
- index: this.getTaskIndex(item.reviewStatus),
8435
- status: {
8436
- id: item.reviewStatus ?? 'Pending',
8437
- title: await this.getStatusTitle(item.reviewStatus ?? 'Pending'),
8438
- },
8439
- priority: this.getTaskPriority(item.reviewStatus),
8440
- reporter: {
8441
- id: item?.auditInfo?.created?.by?.id ?? '',
8442
- type: 'user',
8443
- fullName: item?.auditInfo?.created?.by?.displayName ?? 'Unknown',
8444
- },
8445
- payload: item,
8446
- })));
8447
- return { items: tasks, total };
8448
- }
8449
- catch (error) {
8450
- console.error('Error fetching document review tasks:', error);
8451
- return { items: [], total: 0 };
8452
- }
8453
- }
8454
- async updateTasks(tasksToUpdate) {
8455
- return tasksToUpdate;
8456
- }
8457
- async executeCommand(command) {
8458
- if (!command?.name)
8459
- return { success: true };
8460
- const id = command.options?.['id'] ?? '';
8461
- const title = command.options?.['title'] ?? '';
8462
- switch (command.name) {
8463
- case 'submitReview':
8464
- return (await this.commandExecutor.execute('DocumentManagement.Review:Submit', { id, title })) ?? { success: true };
8465
- case 'approveReview':
8466
- return (await this.commandExecutor.execute('DocumentManagement.Review:Approve', { id, title })) ?? { success: true };
8467
- case 'rejectReview':
8468
- return (await this.commandExecutor.execute('DocumentManagement.Review:Reject', { id, title })) ?? { success: true };
8469
- case 'open':
8470
- return ((await this.commandExecutor.execute('Entity:OpenDetails', {
8471
- entity: 'DocumentManagement.Review',
8472
- data: { id },
8473
- })) ?? { success: true });
8474
- }
8475
- return { success: true };
8476
- }
8477
- async getActions(task) {
8478
- const actions = [];
8479
- actions.push({
8480
- name: 'open',
8481
- title: this.translationService.translateSync('@general:actions.view.title'),
8482
- icon: 'fa-light fa-eye',
8483
- color: 'primary',
8484
- break: true,
8485
- command: { name: 'open', options: { id: task?.id ?? '' } },
8486
- });
8487
- // Submit review action - available for pending reviews
8488
- if (task?.status?.id === 'Pending') {
8489
- actions.push({
8490
- name: 'submitReview',
8491
- title: this.translationService.translateSync('@document-management:review.actions.submit'),
8492
- icon: 'fa-light fa-pen-to-square',
8493
- color: 'primary',
8494
- command: { name: 'submitReview', options: { id: task?.id ?? '' } },
8495
- });
8496
- }
8497
- // Approve action - available for pending reviews
8498
- if (task?.status?.id === 'Pending') {
8499
- actions.push({
8500
- name: 'approveReview',
8501
- title: this.translationService.translateSync('@general:actions.approve.title'),
8502
- icon: 'fa-light fa-check',
8503
- color: 'success',
8504
- command: { name: 'approveReview', options: { id: task?.id ?? '' } },
8505
- });
8506
- }
8507
- // Reject action - available for pending reviews
8508
- if (task?.status?.id === 'Pending') {
8509
- actions.push({
8510
- name: 'rejectReview',
8511
- title: this.translationService.translateSync('@general:actions.reject.title'),
8512
- icon: 'fa-light fa-xmark',
8513
- color: 'danger',
8514
- command: { name: 'rejectReview', options: { id: task?.id ?? '' } },
8515
- });
8516
- }
8517
- return actions;
8518
- }
8519
- async getExtraFields() {
8520
- return [];
8521
- }
8522
- async getStatuses() {
8523
- return [
8524
- {
8525
- index: 0,
8526
- key: 'Pending',
8527
- title: await this.translationService.translateAsync('@document-management:review.pending'),
8528
- color: 'warning',
8529
- },
8530
- {
8531
- index: 1,
8532
- key: 'Approved',
8533
- title: await this.translationService.translateAsync('@document-management:review.approved'),
8534
- color: 'success',
8535
- },
8536
- {
8537
- index: 2,
8538
- key: 'Rejected',
8539
- title: await this.translationService.translateAsync('@document-management:review.rejected'),
8540
- color: 'danger',
8541
- },
8542
- ];
8543
- }
8544
- //#region ---- Helper Methods ----
8545
- /**
8546
- * Get task index based on status for ordering
8547
- */
8548
- getTaskIndex(status) {
8549
- switch (status) {
8550
- case 'Pending':
8551
- return 0;
8552
- case 'Approved':
8553
- return 1;
8554
- case 'Rejected':
8555
- return 2;
8556
- default:
8557
- return 0;
8558
- }
8559
- }
8560
- /**
8561
- * Get task priority based on status
8562
- */
8563
- getTaskPriority(status) {
8564
- switch (status) {
8565
- case 'Pending':
8566
- return 'high';
8567
- case 'Approved':
8568
- return 'lowest';
8569
- case 'Rejected':
8570
- return 'medium';
8571
- default:
8572
- return 'medium';
8573
- }
8574
- }
8575
- /**
8576
- * Get translated status title
8577
- */
8578
- async getStatusTitle(status) {
8579
- switch (status) {
8580
- case 'Pending':
8581
- return await this.translationService.translateAsync('@document-management:review.pending');
8582
- case 'Approved':
8583
- return await this.translationService.translateAsync('@document-management:review.approved');
8584
- case 'Rejected':
8585
- return await this.translationService.translateAsync('@document-management:review.rejected');
8586
- default:
8587
- return status;
8588
- }
8589
- }
8590
- }
8591
-
8592
8248
  // ---------------- Configure: set accept based on docTypeId ----------------
8593
8249
  const DocumentFileUploaderConfigureProvider = {
8594
8250
  key: 'file-uploader.configure',
@@ -8843,11 +8499,11 @@ function routesFacory() {
8843
8499
  children: [
8844
8500
  {
8845
8501
  path: '',
8846
- loadComponent: () => import('./acorex-modules-document-management-drive.component-a7AMnvvu.mjs').then((c) => c.AXMDocumentDriveComponent),
8502
+ loadComponent: () => import('./acorex-modules-document-management-drive.component-dvSTOy_3.mjs').then((c) => c.AXMDocumentDriveComponent),
8847
8503
  },
8848
8504
  {
8849
8505
  path: ':id',
8850
- loadComponent: () => import('./acorex-modules-document-management-drive.component-a7AMnvvu.mjs').then((c) => c.AXMDocumentDriveComponent),
8506
+ loadComponent: () => import('./acorex-modules-document-management-drive.component-dvSTOy_3.mjs').then((c) => c.AXMDocumentDriveComponent),
8851
8507
  },
8852
8508
  ],
8853
8509
  },
@@ -8874,16 +8530,6 @@ class AXMDocumentManagementModule {
8874
8530
  useClass: AXMDocumentReviewBadgeProvider,
8875
8531
  multi: true,
8876
8532
  },
8877
- {
8878
- provide: AXP_WORKFLOW_TASK_PROVIDER,
8879
- useClass: AXMDocumentReviewTaskProvider,
8880
- multi: true,
8881
- },
8882
- {
8883
- provide: AXP_WORKFLOW_TASK_PROVIDER,
8884
- useClass: AXMDocumentDistributionTaskProvider,
8885
- multi: true,
8886
- },
8887
8533
  { provide: AXP_ENTITY_ACTION_PLUGIN, multi: true, useValue: attachmentsPlugin },
8888
8534
  {
8889
8535
  provide: ROUTES,
@@ -8991,16 +8637,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
8991
8637
  useClass: AXMDocumentReviewBadgeProvider,
8992
8638
  multi: true,
8993
8639
  },
8994
- {
8995
- provide: AXP_WORKFLOW_TASK_PROVIDER,
8996
- useClass: AXMDocumentReviewTaskProvider,
8997
- multi: true,
8998
- },
8999
- {
9000
- provide: AXP_WORKFLOW_TASK_PROVIDER,
9001
- useClass: AXMDocumentDistributionTaskProvider,
9002
- multi: true,
9003
- },
9004
8640
  { provide: AXP_ENTITY_ACTION_PLUGIN, multi: true, useValue: attachmentsPlugin },
9005
8641
  {
9006
8642
  provide: ROUTES,
@@ -9247,4 +8883,4 @@ const AXPDocumentManagementFeatureKeys = {
9247
8883
  */
9248
8884
 
9249
8885
  export { AXPDocumentExplorerViewModel as A, AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule as B, AXMDocumentManagementDocumentTypeStatusDefinitionEntityService as C, AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl as D, documentRelatedFactory as E, folderFactory as F, AXMFolderService as G, AXMFolderServiceImpl as H, AXMFolderEntityModule as I, reviewFactory as J, AXMReviewService as K, AXMReviewServiceImpl as L, AXMReviewEntityModule as M, distributionFactory as N, AXMDistributionService as O, AXMDistributionServiceImpl as P, AXMDistributionEntityModule as Q, RootConfig as R, distributionInteractionFactory as S, AXMDistributionInteractionServiceImpl as T, AXMDistributionInteractionEntityModule as U, AXMDocumentReletedEntityModule as V, AXMEntityProvider as W, AXMMenuProvider as X, AXMSearchCommandProvider as Y, AXMSettingProvider as Z, AXPDocumentManagementMenuKeys as _, AXMDocumentManagerService as a, AXMDocumentExplorerComponent as b, AXPDocumentManagementFeatureKeys as c, AXMPermissionsKeys as d, AXMDistributionInteractionService as e, AXMFolderPathBreadcrumbsComponent as f, AXMDocumentManagementModule as g, documentFactory as h, AXMDocumentManagementDocumentEntityModule as i, AXMDocumentService as j, AXMDocumentServiceImpl as k, getNextStatus as l, canTransition as m, documentTypeFactory as n, AXMDocumentManagementDocumentTypeEntityModule as o, AXMDocumentTypeService as p, AXMDocumentTypeServiceImpl as q, documentTypeMetaDefinitionfactory as r, AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule as s, AXMDocumentManagementDocumentTypeMetaDefinitionEntityService as t, AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl as u, documentTypeMetaValueFactory as v, AXMDocumentManagementDocumentTypeMetaValueEntityModule as w, AXMDocumentManagementDocumentTypeMetaValueEntityService as x, AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl as y, documentTypeStatusDefinitionFactory as z };
9250
- //# sourceMappingURL=acorex-modules-document-management-acorex-modules-document-management-CHubrWiR.mjs.map
8886
+ //# sourceMappingURL=acorex-modules-document-management-acorex-modules-document-management-BUV6euwQ.mjs.map