@acorex-platform/module-document-management-client 2.0.0-next.15 → 2.0.0-next.17
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.
- package/fesm2022/{acorex-platform-module-document-management-client-acorex-platform-module-document-management-client-C_TdVup5.mjs → acorex-platform-module-document-management-client-acorex-platform-module-document-management-client-ouqn86NW.mjs} +27 -27
- package/fesm2022/{acorex-platform-module-document-management-client-acorex-platform-module-document-management-client-C_TdVup5.mjs.map → acorex-platform-module-document-management-client-acorex-platform-module-document-management-client-ouqn86NW.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-attachment-view-skeleton.component-B-MJAd6K.mjs → acorex-platform-module-document-management-client-attachment-view-skeleton.component-BJiGxy0q.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-attachment-view-skeleton.component-B-MJAd6K.mjs.map → acorex-platform-module-document-management-client-attachment-view-skeleton.component-BJiGxy0q.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-attachment-widget.component-BcxGDjeF.mjs → acorex-platform-module-document-management-client-attachment-widget.component-B0apv8oL.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-attachment-widget.component-BcxGDjeF.mjs.map → acorex-platform-module-document-management-client-attachment-widget.component-B0apv8oL.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-details-view.component-TKzt2KvO.mjs → acorex-platform-module-document-management-client-details-view.component-e0-r7tOA.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-details-view.component-TKzt2KvO.mjs.map → acorex-platform-module-document-management-client-details-view.component-e0-r7tOA.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-distribute-document.command-DoQC3ylx.mjs → acorex-platform-module-document-management-client-distribute-document.command-ClaZpJxL.mjs} +49 -6
- package/fesm2022/acorex-platform-module-document-management-client-distribute-document.command-ClaZpJxL.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-document-management-client-distribute-document.command.util-HCkpx2Hk.mjs → acorex-platform-module-document-management-client-distribute-document.command.util-BH09ggCd.mjs} +34 -8
- package/fesm2022/acorex-platform-module-document-management-client-distribute-document.command.util-BH09ggCd.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-document-management-client-drive-choose.component-B4BDB97X.mjs → acorex-platform-module-document-management-client-drive-choose.component-ByQZpkzB.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-drive-choose.component-B4BDB97X.mjs.map → acorex-platform-module-document-management-client-drive-choose.component-ByQZpkzB.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-large-icons-view-skeleton.component-q5QaDA3U.mjs → acorex-platform-module-document-management-client-large-icons-view-skeleton.component-BfUGecdc.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-large-icons-view-skeleton.component-q5QaDA3U.mjs.map → acorex-platform-module-document-management-client-large-icons-view-skeleton.component-BfUGecdc.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-large-icons-view.component-DWuhN497.mjs → acorex-platform-module-document-management-client-large-icons-view.component-BAR0i7Fe.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-large-icons-view.component-DWuhN497.mjs.map → acorex-platform-module-document-management-client-large-icons-view.component-BAR0i7Fe.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-large-tiles-view.component-ClRmDSXY.mjs → acorex-platform-module-document-management-client-large-tiles-view.component-D-lTrz1r.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-large-tiles-view.component-ClRmDSXY.mjs.map → acorex-platform-module-document-management-client-large-tiles-view.component-D-lTrz1r.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-list-view-skeleton.component-uO3rSIL6.mjs → acorex-platform-module-document-management-client-list-view-skeleton.component-DuwOFiOX.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-list-view-skeleton.component-uO3rSIL6.mjs.map → acorex-platform-module-document-management-client-list-view-skeleton.component-DuwOFiOX.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-list-view.component-DOqc7vC9.mjs → acorex-platform-module-document-management-client-list-view.component-0Rp9eJI4.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-list-view.component-DOqc7vC9.mjs.map → acorex-platform-module-document-management-client-list-view.component-0Rp9eJI4.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-open-document.command-B87Xj3s6.mjs → acorex-platform-module-document-management-client-open-document.command-C1p9kzNu.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-open-document.command-B87Xj3s6.mjs.map → acorex-platform-module-document-management-client-open-document.command-C1p9kzNu.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-request-document-review.command-MLT9W3J0.mjs → acorex-platform-module-document-management-client-request-document-review.command-CkbGudeb.mjs} +12 -5
- package/fesm2022/acorex-platform-module-document-management-client-request-document-review.command-CkbGudeb.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-document-management-client-sign-distributed-document.command-BqLS0leG.mjs → acorex-platform-module-document-management-client-sign-distributed-document.command-vGwi8Ssi.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-sign-distributed-document.command-BqLS0leG.mjs.map → acorex-platform-module-document-management-client-sign-distributed-document.command-vGwi8Ssi.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-sign-document-review.command-Ccl9iY7j.mjs → acorex-platform-module-document-management-client-sign-document-review.command-C1cy6Ivm.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-sign-document-review.command-Ccl9iY7j.mjs.map → acorex-platform-module-document-management-client-sign-document-review.command-C1cy6Ivm.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-small-icons-view-skeleton.component-DCjsVs5n.mjs → acorex-platform-module-document-management-client-small-icons-view-skeleton.component-C8FPhbsI.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-small-icons-view-skeleton.component-DCjsVs5n.mjs.map → acorex-platform-module-document-management-client-small-icons-view-skeleton.component-C8FPhbsI.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-small-icons-view.component-DbO9rbel.mjs → acorex-platform-module-document-management-client-small-icons-view.component-Di6dWcxr.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-small-icons-view.component-DbO9rbel.mjs.map → acorex-platform-module-document-management-client-small-icons-view.component-Di6dWcxr.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-small-tiles-view-skeleton.component-CO9d4ytu.mjs → acorex-platform-module-document-management-client-small-tiles-view-skeleton.component-DuonROkJ.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-small-tiles-view-skeleton.component-CO9d4ytu.mjs.map → acorex-platform-module-document-management-client-small-tiles-view-skeleton.component-DuonROkJ.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-small-tiles-view.component-Ci2m67vw.mjs → acorex-platform-module-document-management-client-small-tiles-view.component-BqToMMgD.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-small-tiles-view.component-Ci2m67vw.mjs.map → acorex-platform-module-document-management-client-small-tiles-view.component-BqToMMgD.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-document-management-client-upload-document.command-BsziEhNt.mjs → acorex-platform-module-document-management-client-upload-document.command-tfOxVVer.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-document-management-client-upload-document.command-BsziEhNt.mjs.map → acorex-platform-module-document-management-client-upload-document.command-tfOxVVer.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-document-management-client.mjs +1 -1
- package/package.json +2 -2
- package/fesm2022/acorex-platform-module-document-management-client-distribute-document.command-DoQC3ylx.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-document-management-client-distribute-document.command.util-HCkpx2Hk.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-document-management-client-request-document-review.command-MLT9W3J0.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-document-management-client-small-tiles-view-skeleton.component-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-document-management-client-small-tiles-view-skeleton.component-DuonROkJ.mjs","sources":["../../../../libs/modules/document-management/client/src/lib/features/document-explorer/views/small-tiles/small-tiles-view-skeleton.component.ts","../../../../libs/modules/document-management/client/src/lib/features/document-explorer/views/small-tiles/small-tiles-view-skeleton.component.html"],"sourcesContent":["import { AXSkeletonModule } from '@acorex/components/skeleton';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { AXPDocumentExplorerViewModel } from '../../document-explorer.viewmodel';\n\n@Component({\n selector: 'axm-document-explorer-small-tiles-view-skeleton',\n templateUrl: './small-tiles-view-skeleton.component.html',\n styleUrl: './small-tiles-view-skeleton.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, AXSkeletonModule, AXTranslationModule],\n})\nexport class AXMDocumentExplorerSmallTilesViewSkeletonComponent {\n protected readonly vm = inject(AXPDocumentExplorerViewModel);\n\n protected readonly folderPlaceholders = [0, 1, 2];\n protected readonly filePlaceholders = [0, 1];\n protected readonly flatPlaceholders = [0, 1, 2, 3, 4];\n}\n","@if (vm.groupByType()) {\n <div class=\"__section\">\n <div class=\"__header\">\n <h3 class=\"__title\">{{ '@document-management:terms.common.folders' | translate | async }}</h3>\n </div>\n <div class=\"__content\">\n @for (item of folderPlaceholders; track item) {\n <div class=\"__item\">\n <ax-skeleton [animated]=\"true\" class=\"__icon\"></ax-skeleton>\n <div class=\"__details\">\n <ax-skeleton [animated]=\"true\" class=\"__name\"></ax-skeleton>\n <div class=\"__info\">\n <ax-skeleton [animated]=\"true\" class=\"__meta\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__meta --short\"></ax-skeleton>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n <div class=\"__section\">\n <div class=\"__header\">\n <h3 class=\"__title\">{{ '@document-management:terms.common.files' | translate | async }}</h3>\n </div>\n <div class=\"__content\">\n @for (item of filePlaceholders; track item) {\n <div class=\"__item\">\n <ax-skeleton [animated]=\"true\" class=\"__icon\"></ax-skeleton>\n <div class=\"__details\">\n <ax-skeleton [animated]=\"true\" class=\"__name\"></ax-skeleton>\n <div class=\"__info\">\n <ax-skeleton [animated]=\"true\" class=\"__meta\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__meta --short\"></ax-skeleton>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n} @else {\n <div class=\"__section\">\n <div class=\"__content\">\n @for (item of flatPlaceholders; track item) {\n <div class=\"__item\">\n <ax-skeleton [animated]=\"true\" class=\"__icon\"></ax-skeleton>\n <div class=\"__details\">\n <ax-skeleton [animated]=\"true\" class=\"__name\"></ax-skeleton>\n <div class=\"__info\">\n <ax-skeleton [animated]=\"true\" class=\"__meta\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"__meta --short\"></ax-skeleton>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n}\n"],"names":["i2"],"mappings":";;;;;;;;;;MAaa,kDAAkD,CAAA;AAP/D,IAAA,WAAA,GAAA;AAQqB,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,4BAA4B,CAAC;QAEzC,IAAA,CAAA,kBAAkB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC9B,QAAA,IAAA,CAAA,gBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AACzB,QAAA,IAAA,CAAA,gBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACtD,IAAA;8GANY,kDAAkD,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAlD,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kDAAkD,2GCb/D,iqEAyDA,EAAA,MAAA,EAAA,CAAA,ggEAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED9CY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,gBAAgB,kIAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAElD,kDAAkD,EAAA,UAAA,EAAA,CAAA;kBAP9D,SAAS;+BACE,iDAAiD,EAAA,eAAA,EAG1C,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,CAAC,EAAA,QAAA,EAAA,iqEAAA,EAAA,MAAA,EAAA,CAAA,ggEAAA,CAAA,EAAA;;;"}
|
|
@@ -3,7 +3,7 @@ import { inject, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { AXPElementDataDirective, AXPDblClickDirective } from '@acorex-platform/framework-client/core';
|
|
6
|
-
import { A as AXPDocumentExplorerViewModel, a as AXMDocumentExpirationBadgeComponent, b as AXMDocumentVersionBadgeComponent, c as AXMFolderExpirationBadgesComponent } from './acorex-platform-module-document-management-client-acorex-platform-module-document-management-client-
|
|
6
|
+
import { A as AXPDocumentExplorerViewModel, a as AXMDocumentExpirationBadgeComponent, b as AXMDocumentVersionBadgeComponent, c as AXMFolderExpirationBadgesComponent } from './acorex-platform-module-document-management-client-acorex-platform-module-document-management-client-ouqn86NW.mjs';
|
|
7
7
|
import * as i2 from '@acorex/core/format';
|
|
8
8
|
import { AXFormatModule } from '@acorex/core/format';
|
|
9
9
|
import { AXDateTimeModule } from '@acorex/core/date-time';
|
|
@@ -33,4 +33,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
33
33
|
}] });
|
|
34
34
|
|
|
35
35
|
export { AXMDocumentExplorerSmallTilesViewComponent };
|
|
36
|
-
//# sourceMappingURL=acorex-platform-module-document-management-client-small-tiles-view.component-
|
|
36
|
+
//# sourceMappingURL=acorex-platform-module-document-management-client-small-tiles-view.component-BqToMMgD.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-document-management-client-small-tiles-view.component-Ci2m67vw.mjs","sources":["../../../../libs/modules/document-management/client/src/lib/features/document-explorer/views/small-tiles/small-tiles-view.component.ts","../../../../libs/modules/document-management/client/src/lib/features/document-explorer/views/small-tiles/small-tiles-view.component.html"],"sourcesContent":["import { Component, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXPElementDataDirective, AXPDblClickDirective } from '@acorex-platform/framework-client/core';\nimport { AXPDocumentExplorerViewModel } from '../../document-explorer.viewmodel';\nimport { AXFormatModule } from '@acorex/core/format';\nimport { AXDateTimeModule } from '@acorex/core/date-time';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXMDocumentExpirationBadgeComponent } from '../../../shared/components/document-expiration-badge/document-expiration-badge.component';\nimport { AXMDocumentVersionBadgeComponent } from '../../../shared/components/document-version-badge/document-version-badge.component';\nimport { AXMFolderExpirationBadgesComponent } from '../../../shared/components/folder-expiration-badges/folder-expiration-badges.component';\n\n@Component({\n selector: 'axm-document-explorer-small-tiles-view',\n templateUrl: './small-tiles-view.component.html',\n styleUrls: ['./small-tiles-view.component.css'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [\n CommonModule,\n AXPElementDataDirective,\n AXPDblClickDirective,\n AXFormatModule,\n AXDateTimeModule,\n AXTranslationModule,\n AXMDocumentExpirationBadgeComponent,\n AXMDocumentVersionBadgeComponent,\n AXMFolderExpirationBadgesComponent,\n ],\n})\nexport class AXMDocumentExplorerSmallTilesViewComponent {\n protected vm = inject(AXPDocumentExplorerViewModel);\n} ","@if (vm.groupByType()) {\n @if (vm.filteredFolders().length > 0) {\n <div class=\"__section\">\n <div class=\"__header\">\n <h3 class=\"__title\">\n {{ '@document-management:terms.common.folders' | translate | async }}\n </h3>\n </div>\n <div class=\"__content\">\n @for (folder of vm.filteredFolders(); track folder.id) {\n @let folderDisplay = vm.getNodeDisplayInfo(folder);\n <div\n class=\"__explorer-item\"\n [class.--selected]=\"vm.isItemSelected(folder)\"\n [axp-data]=\"folder\"\n (click)=\"vm.toggleSelect(folder)\"\n (onDblClick)=\"vm.navigateToFolder(folder.id)\"\n >\n <div\n class=\"__icon fa-2x\"\n [style.color]=\"vm.getFolderColor(folder)\"\n [class.__shortcut]=\"folderDisplay.isShortcut\"\n >\n @if (vm.isLoadingFolder(folder.id)) {\n <i class=\"fa-light fa-spinner fa-spin-pulse\"></i>\n } @else {\n <i class=\"fas fa-folder-closed\"></i>\n }\n @if (folderDisplay.isShortcut) {\n <i\n class=\"__shortcut-arrow fa-light fa-up-right-from-square\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n <div class=\"__details\">\n <div class=\"__name\">{{ folder.name }}</div>\n <div class=\"__info\">\n <div class=\"inline-flex items-center gap-1\">\n <span>{{ (folder.childrenCount ?? 0) + (folder.itemsCount ?? 0) }} items</span>\n <!-- ----- Expiration counts after item count ----- -->\n <axm-folder-expiration-badges [node]=\"folder\" />\n </div>\n <span>{{\n folder.modifiedAt\n | format: 'datetime' : { format: 'datetime' }\n | async\n }}</span>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @if (vm.filteredFiles().length > 0) {\n <div class=\"__section\">\n <div class=\"__header\">\n <h3 class=\"__title\">\n {{ '@document-management:terms.common.files' | translate | async }}\n </h3>\n </div>\n <div class=\"__content\">\n @for (file of vm.filteredFiles(); track file.id) {\n @let fileDisplay = vm.getNodeDisplayInfo(file);\n <div\n class=\"__explorer-item\"\n [class.--selected]=\"vm.isItemSelected(file)\"\n [axp-data]=\"file\"\n (click)=\"vm.toggleSelect(file)\"\n (onDblClick)=\"vm.openFileOnDoubleClick(file)\"\n >\n <axm-document-version-badge class=\"__version-badge\" [node]=\"file\" />\n <div\n class=\"__icon fa-2x\"\n [class.__shortcut]=\"fileDisplay.isShortcut\"\n >\n <i class=\"fa-fw {{ fileDisplay.icon }}\"></i>\n @if (fileDisplay.isShortcut) {\n <i\n class=\"__shortcut-arrow fa-light fa-up-right-from-square\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n <div class=\"__details\">\n <div class=\"flex min-w-0 items-center gap-1.5\">\n <div class=\"__name\">{{ file.title || file.name }}</div>\n <axm-document-expiration-badge [node]=\"file\" />\n </div>\n <div class=\"__info\">\n <span>{{ file.size | format: 'filesize' | async }}</span>\n <span>{{\n file.modifiedAt\n | format: 'datetime' : { format: 'datetime' }\n | async\n }}</span>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n} @else {\n <div class=\"__section\">\n <div class=\"__content\">\n @for (folder of vm.filteredFolders(); track folder.id) {\n @let folderDisplay = vm.getNodeDisplayInfo(folder);\n <div\n class=\"__explorer-item\"\n [class.--selected]=\"vm.isItemSelected(folder)\"\n [axp-data]=\"folder\"\n (click)=\"vm.toggleSelect(folder)\"\n (onDblClick)=\"vm.navigateToFolder(folder.id)\"\n >\n <div\n class=\"__icon fa-2x\"\n [style.color]=\"vm.getFolderColor(folder)\"\n [class.__shortcut]=\"folderDisplay.isShortcut\"\n >\n @if (vm.isLoadingFolder(folder.id)) {\n <i class=\"fa-light fa-spinner fa-spin-pulse\"></i>\n } @else {\n <i class=\"fas fa-folder-closed\"></i>\n }\n @if (folderDisplay.isShortcut) {\n <i\n class=\"__shortcut-arrow fa-light fa-up-right-from-square\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n <div class=\"__details\">\n <div class=\"__name\">{{ folder.name }}</div>\n <div class=\"__info\">\n <div class=\"inline-flex items-center gap-1\">\n <span>{{ (folder.childrenCount ?? 0) + (folder.itemsCount ?? 0) }} items</span>\n <!-- ----- Expiration counts after item count ----- -->\n <axm-folder-expiration-badges [node]=\"folder\" />\n </div>\n <span>{{\n folder.modifiedAt\n | format: 'datetime' : { format: 'datetime' }\n | async\n }}</span>\n </div>\n </div>\n </div>\n }\n @for (file of vm.filteredFiles(); track file.id) {\n @let fileDisplay = vm.getNodeDisplayInfo(file);\n <div\n class=\"__explorer-item\"\n [class.--selected]=\"vm.isItemSelected(file)\"\n [axp-data]=\"file\"\n (click)=\"vm.toggleSelect(file)\"\n (onDblClick)=\"vm.openFileOnDoubleClick(file)\"\n >\n <axm-document-version-badge class=\"__version-badge\" [node]=\"file\" />\n <div class=\"__icon fa-2x\" [class.__shortcut]=\"fileDisplay.isShortcut\">\n <i class=\"fa-fw {{ fileDisplay.icon }}\"></i>\n @if (fileDisplay.isShortcut) {\n <i\n class=\"__shortcut-arrow fa-light fa-up-right-from-square\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n <div class=\"__details\">\n <div class=\"flex min-w-0 items-center gap-1.5\">\n <div class=\"__name\">{{ file.title || file.name }}</div>\n <axm-document-expiration-badge [node]=\"file\" />\n </div>\n <div class=\"__info\">\n <span>{{ file.size | format: 'filesize' | async }}</span>\n <span>{{\n file.modifiedAt\n | format: 'datetime' : { format: 'datetime' }\n | async\n }}</span>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n}\n"],"names":[],"mappings":";;;;;;;;;;;;MA6Ba,0CAA0C,CAAA;A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AAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,CAAA,CAAA;;2FAG3B,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBAlBtD,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wCAAwC,cAGtC,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,KAAK,EAAA,OAAA,EACrC;wBACP,YAAY;wBACZ,uBAAuB;wBACvB,oBAAoB;wBACpB,cAAc;wBACd,gBAAgB;wBAChB,mBAAmB;wBACnB,mCAAmC;wBACnC,gCAAgC;wBAChC,kCAAkC;AACnC,qBAAA,EAAA,QAAA,EAAA,0jOAAA,EAAA,MAAA,EAAA,CAAA,u4FAAA,CAAA,EAAA;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-document-management-client-small-tiles-view.component-BqToMMgD.mjs","sources":["../../../../libs/modules/document-management/client/src/lib/features/document-explorer/views/small-tiles/small-tiles-view.component.ts","../../../../libs/modules/document-management/client/src/lib/features/document-explorer/views/small-tiles/small-tiles-view.component.html"],"sourcesContent":["import { Component, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXPElementDataDirective, AXPDblClickDirective } from '@acorex-platform/framework-client/core';\nimport { AXPDocumentExplorerViewModel } from '../../document-explorer.viewmodel';\nimport { AXFormatModule } from '@acorex/core/format';\nimport { AXDateTimeModule } from '@acorex/core/date-time';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXMDocumentExpirationBadgeComponent } from '../../../shared/components/document-expiration-badge/document-expiration-badge.component';\nimport { AXMDocumentVersionBadgeComponent } from '../../../shared/components/document-version-badge/document-version-badge.component';\nimport { AXMFolderExpirationBadgesComponent } from '../../../shared/components/folder-expiration-badges/folder-expiration-badges.component';\n\n@Component({\n selector: 'axm-document-explorer-small-tiles-view',\n templateUrl: './small-tiles-view.component.html',\n styleUrls: ['./small-tiles-view.component.css'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [\n CommonModule,\n AXPElementDataDirective,\n AXPDblClickDirective,\n AXFormatModule,\n AXDateTimeModule,\n AXTranslationModule,\n AXMDocumentExpirationBadgeComponent,\n AXMDocumentVersionBadgeComponent,\n AXMFolderExpirationBadgesComponent,\n ],\n})\nexport class AXMDocumentExplorerSmallTilesViewComponent {\n protected vm = inject(AXPDocumentExplorerViewModel);\n} ","@if (vm.groupByType()) {\n @if (vm.filteredFolders().length > 0) {\n <div class=\"__section\">\n <div class=\"__header\">\n <h3 class=\"__title\">\n {{ '@document-management:terms.common.folders' | translate | async }}\n </h3>\n </div>\n <div class=\"__content\">\n @for (folder of vm.filteredFolders(); track folder.id) {\n @let folderDisplay = vm.getNodeDisplayInfo(folder);\n <div\n class=\"__explorer-item\"\n [class.--selected]=\"vm.isItemSelected(folder)\"\n [axp-data]=\"folder\"\n (click)=\"vm.toggleSelect(folder)\"\n (onDblClick)=\"vm.navigateToFolder(folder.id)\"\n >\n <div\n class=\"__icon fa-2x\"\n [style.color]=\"vm.getFolderColor(folder)\"\n [class.__shortcut]=\"folderDisplay.isShortcut\"\n >\n @if (vm.isLoadingFolder(folder.id)) {\n <i class=\"fa-light fa-spinner fa-spin-pulse\"></i>\n } @else {\n <i class=\"fas fa-folder-closed\"></i>\n }\n @if (folderDisplay.isShortcut) {\n <i\n class=\"__shortcut-arrow fa-light fa-up-right-from-square\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n <div class=\"__details\">\n <div class=\"__name\">{{ folder.name }}</div>\n <div class=\"__info\">\n <div class=\"inline-flex items-center gap-1\">\n <span>{{ (folder.childrenCount ?? 0) + (folder.itemsCount ?? 0) }} items</span>\n <!-- ----- Expiration counts after item count ----- -->\n <axm-folder-expiration-badges [node]=\"folder\" />\n </div>\n <span>{{\n folder.modifiedAt\n | format: 'datetime' : { format: 'datetime' }\n | async\n }}</span>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @if (vm.filteredFiles().length > 0) {\n <div class=\"__section\">\n <div class=\"__header\">\n <h3 class=\"__title\">\n {{ '@document-management:terms.common.files' | translate | async }}\n </h3>\n </div>\n <div class=\"__content\">\n @for (file of vm.filteredFiles(); track file.id) {\n @let fileDisplay = vm.getNodeDisplayInfo(file);\n <div\n class=\"__explorer-item\"\n [class.--selected]=\"vm.isItemSelected(file)\"\n [axp-data]=\"file\"\n (click)=\"vm.toggleSelect(file)\"\n (onDblClick)=\"vm.openFileOnDoubleClick(file)\"\n >\n <axm-document-version-badge class=\"__version-badge\" [node]=\"file\" />\n <div\n class=\"__icon fa-2x\"\n [class.__shortcut]=\"fileDisplay.isShortcut\"\n >\n <i class=\"fa-fw {{ fileDisplay.icon }}\"></i>\n @if (fileDisplay.isShortcut) {\n <i\n class=\"__shortcut-arrow fa-light fa-up-right-from-square\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n <div class=\"__details\">\n <div class=\"flex min-w-0 items-center gap-1.5\">\n <div class=\"__name\">{{ file.title || file.name }}</div>\n <axm-document-expiration-badge [node]=\"file\" />\n </div>\n <div class=\"__info\">\n <span>{{ file.size | format: 'filesize' | async }}</span>\n <span>{{\n file.modifiedAt\n | format: 'datetime' : { format: 'datetime' }\n | async\n }}</span>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n} @else {\n <div class=\"__section\">\n <div class=\"__content\">\n @for (folder of vm.filteredFolders(); track folder.id) {\n @let folderDisplay = vm.getNodeDisplayInfo(folder);\n <div\n class=\"__explorer-item\"\n [class.--selected]=\"vm.isItemSelected(folder)\"\n [axp-data]=\"folder\"\n (click)=\"vm.toggleSelect(folder)\"\n (onDblClick)=\"vm.navigateToFolder(folder.id)\"\n >\n <div\n class=\"__icon fa-2x\"\n [style.color]=\"vm.getFolderColor(folder)\"\n [class.__shortcut]=\"folderDisplay.isShortcut\"\n >\n @if (vm.isLoadingFolder(folder.id)) {\n <i class=\"fa-light fa-spinner fa-spin-pulse\"></i>\n } @else {\n <i class=\"fas fa-folder-closed\"></i>\n }\n @if (folderDisplay.isShortcut) {\n <i\n class=\"__shortcut-arrow fa-light fa-up-right-from-square\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n <div class=\"__details\">\n <div class=\"__name\">{{ folder.name }}</div>\n <div class=\"__info\">\n <div class=\"inline-flex items-center gap-1\">\n <span>{{ (folder.childrenCount ?? 0) + (folder.itemsCount ?? 0) }} items</span>\n <!-- ----- Expiration counts after item count ----- -->\n <axm-folder-expiration-badges [node]=\"folder\" />\n </div>\n <span>{{\n folder.modifiedAt\n | format: 'datetime' : { format: 'datetime' }\n | async\n }}</span>\n </div>\n </div>\n </div>\n }\n @for (file of vm.filteredFiles(); track file.id) {\n @let fileDisplay = vm.getNodeDisplayInfo(file);\n <div\n class=\"__explorer-item\"\n [class.--selected]=\"vm.isItemSelected(file)\"\n [axp-data]=\"file\"\n (click)=\"vm.toggleSelect(file)\"\n (onDblClick)=\"vm.openFileOnDoubleClick(file)\"\n >\n <axm-document-version-badge class=\"__version-badge\" [node]=\"file\" />\n <div class=\"__icon fa-2x\" [class.__shortcut]=\"fileDisplay.isShortcut\">\n <i class=\"fa-fw {{ fileDisplay.icon }}\"></i>\n @if (fileDisplay.isShortcut) {\n <i\n class=\"__shortcut-arrow fa-light fa-up-right-from-square\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n <div class=\"__details\">\n <div class=\"flex min-w-0 items-center gap-1.5\">\n <div class=\"__name\">{{ file.title || file.name }}</div>\n <axm-document-expiration-badge [node]=\"file\" />\n </div>\n <div class=\"__info\">\n <span>{{ file.size | format: 'filesize' | async }}</span>\n <span>{{\n file.modifiedAt\n | format: 'datetime' : { format: 'datetime' }\n | async\n }}</span>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n}\n"],"names":[],"mappings":";;;;;;;;;;;;MA6Ba,0CAA0C,CAAA;AAlB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,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,CAAA,CAAA;;2FAG3B,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBAlBtD,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wCAAwC,cAGtC,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,KAAK,EAAA,OAAA,EACrC;wBACP,YAAY;wBACZ,uBAAuB;wBACvB,oBAAoB;wBACpB,cAAc;wBACd,gBAAgB;wBAChB,mBAAmB;wBACnB,mCAAmC;wBACnC,gCAAgC;wBAChC,kCAAkC;AACnC,qBAAA,EAAA,QAAA,EAAA,0jOAAA,EAAA,MAAA,EAAA,CAAA,u4FAAA,CAAA,EAAA;;;"}
|
|
@@ -5,7 +5,7 @@ import { AXFileService } from '@acorex/core/file';
|
|
|
5
5
|
import { RootConfig } from '@acorex-platform/module-document-management-client/contracts';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
7
|
import { inject, Injectable } from '@angular/core';
|
|
8
|
-
import { k as AXMDocumentDialogService, l as buildFileChooserOptionsFromDocumentType } from './acorex-platform-module-document-management-client-acorex-platform-module-document-management-client-
|
|
8
|
+
import { k as AXMDocumentDialogService, l as buildFileChooserOptionsFromDocumentType } from './acorex-platform-module-document-management-client-acorex-platform-module-document-management-client-ouqn86NW.mjs';
|
|
9
9
|
|
|
10
10
|
//#region ---- Imports ----
|
|
11
11
|
//#endregion
|
|
@@ -85,4 +85,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
85
85
|
}] });
|
|
86
86
|
|
|
87
87
|
export { AXMUploadDocumentCommand };
|
|
88
|
-
//# sourceMappingURL=acorex-platform-module-document-management-client-upload-document.command-
|
|
88
|
+
//# sourceMappingURL=acorex-platform-module-document-management-client-upload-document.command-tfOxVVer.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-document-management-client-upload-document.command-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-document-management-client-upload-document.command-tfOxVVer.mjs","sources":["../../../../libs/modules/document-management/client/src/lib/features/commands/upload-document.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPFileChooserService } from '@acorex-platform/framework-client/layout/components';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult, AXPPlatformScope } from '@acorex-platform/framework-shared/core';\nimport { AXFileService } from '@acorex/core/file';\nimport { AXMDocumentDocDto } from '@acorex-platform/module-document-management-client/contracts';\nimport { RootConfig } from '@acorex-platform/module-document-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\nimport { buildFileChooserOptionsFromDocumentType } from '../shared/document-type-accept.util';\nimport { AXMDocumentDialogService } from '../shared/services/document-dialog.service';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface AXMUploadDocumentCommandInput {\n documentType?: AXMDocumentDocDto;\n documentTypeId?: string;\n data?: {\n documentType?: AXMDocumentDocDto;\n documentTypeId?: string;\n };\n options?: {\n documentType?: AXMDocumentDocDto;\n documentTypeId?: string;\n };\n}\n\n//#endregion\n\n//#region ---- Helpers ----\n\nfunction resolveUploadDocumentInput(input: AXMUploadDocumentCommandInput = {}) {\n const data = input.data ?? {};\n const options = input.options ?? {};\n\n return {\n documentType: input.documentType ?? data.documentType ?? options.documentType,\n documentTypeId: input.documentTypeId ?? data.documentTypeId ?? options.documentTypeId,\n };\n}\n\n//#endregion\n\n//#region ---- Upload document command ----\n\n/**\n * Resolves document type (optional picker), then opens the file chooser for drive upload.\n * Replaces the former upload-document workflow (check type → choose type → choose file).\n * Registered as DocumentManagement.Document:Upload.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMUploadDocumentCommand implements AXPCommand<AXMUploadDocumentCommandInput> {\n private readonly documentDialog = inject(AXMDocumentDialogService);\n private readonly entityService = inject(AXPEntityService);\n private readonly chooserService = inject(AXPFileChooserService);\n private readonly fileService = inject(AXFileService);\n\n private readonly documentTypeService = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.documentType.name)\n .data<string, AXMDocumentDocDto>();\n\n async execute(input: AXMUploadDocumentCommandInput = {}): AXPCommandExecuteResultPromise {\n let { documentType, documentTypeId } = resolveUploadDocumentInput(input);\n\n if (!documentType) {\n const chooseTypeResult = await this.documentDialog.chooseDocumentType();\n if (chooseTypeResult.cancelled) {\n return { success: true, kind: 'object', data: { cancelled: true } };\n }\n documentTypeId = chooseTypeResult.documentTypeId;\n }\n\n let resolvedDocumentType = documentType;\n if (!resolvedDocumentType && documentTypeId) {\n resolvedDocumentType = (await this.documentTypeService.byKey(documentTypeId)) ?? undefined;\n }\n\n if (!resolvedDocumentType) {\n return {\n success: false,\n message: { text: '@document-management:validation.upload.document-type-required' },\n };\n }\n\n const { accept, fileType } = await buildFileChooserOptionsFromDocumentType(\n resolvedDocumentType,\n this.fileService,\n );\n const chosen = await this.chooserService.promptChoose({\n options: {\n multiple: false,\n accept: accept || undefined,\n fileType: fileType.length ? fileType : undefined,\n scope: AXPPlatformScope.Tenant,\n browseMode: 'file',\n destination: 'drive',\n },\n items: [],\n });\n\n if (!chosen?.length) {\n return { success: true, kind: 'object', data: { cancelled: true } };\n }\n\n return { success: true, kind: 'object',\n data: {\n documentType: resolvedDocumentType,\n chosenFiles: chosen,\n },\n };\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;AAAA;AA+BA;AAEA;AAEA,SAAS,0BAA0B,CAAC,KAAA,GAAuC,EAAE,EAAA;AAC3E,IAAA,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE;AAC7B,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,EAAE;IAE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AAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cADX,MAAM,EAAA,CAAA,CAAA;;2FACnB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { t as AXMDocumentDriveComponent, u as AXMDocumentDrivePageComponent, v as AXMDocumentDrivePageComponentProvider, a as AXMDocumentExpirationBadgeComponent, w as AXMDocumentExpirationStatusProvider, p as AXMDocumentExplorerComponent, x as AXMDocumentManagementApiService, y as AXMDocumentManagementFileTypeProvider, z as AXMDocumentManagementModule, j as AXMDocumentManagerService, B as AXMDocumentManagerServiceImpl, b as AXMDocumentVersionBadgeComponent, C as AXMFileTypeExtensionWidgetColumnComponent, D as AXMFileTypeExtensionWidgetDesignerComponent, E as AXMFileTypeExtensionWidgetEditComponent, F as AXMFileTypeExtensionWidgetViewComponent, G as AXMFileTypeModule, c as AXMFolderExpirationBadgesComponent, q as AXMFolderPathBreadcrumbsComponent, H as AXMMenuProvider, I as AXMSearchCommandProvider, J as AXM_DOCUMENT_ATTACHMENT_DIALOG_ON_ACTION_HOOK_KEY, K as AXM_DOCUMENT_DIALOG_SURFACE_ATTACHMENT, L as AXM_DOCUMENT_DIALOG_SURFACE_ATTACHMENT_NO_SAVE, M as AXM_DOCUMENT_EXPIRATION_STATUS, N as AXM_DOCUMENT_EXPIRATION_STATUS_DEFINITION_KEY, A as AXPDocumentExplorerViewModel, m as AXPDocumentManagementService, O as AXPDocumentManagementSettingProvider, P as AXmFileTypeExtensionWidget, Q as DM_AUDIO_EXTENSION_ICONS, R as DM_DOCUMENT_EXTENSION_ICONS, S as DM_FILE_EXTENSION_ICONS, T as DM_FILE_TYPE_ICONS, U as DM_VIDEO_EXTENSION_ICONS, V as DOCUMENT_DRIVE_PAGE_COMPONENT_KEY, W as ScopedDriveService, X as buildDocumentManagementFileTypeCatalog, Y as documentPlugin, Z as resolveDocumentExpirationBadge, _ as resolveDocumentVersionNumber, $ as resolveFolderExpirationCountBadges } from './acorex-platform-module-document-management-client-acorex-platform-module-document-management-client-
|
|
1
|
+
export { t as AXMDocumentDriveComponent, u as AXMDocumentDrivePageComponent, v as AXMDocumentDrivePageComponentProvider, a as AXMDocumentExpirationBadgeComponent, w as AXMDocumentExpirationStatusProvider, p as AXMDocumentExplorerComponent, x as AXMDocumentManagementApiService, y as AXMDocumentManagementFileTypeProvider, z as AXMDocumentManagementModule, j as AXMDocumentManagerService, B as AXMDocumentManagerServiceImpl, b as AXMDocumentVersionBadgeComponent, C as AXMFileTypeExtensionWidgetColumnComponent, D as AXMFileTypeExtensionWidgetDesignerComponent, E as AXMFileTypeExtensionWidgetEditComponent, F as AXMFileTypeExtensionWidgetViewComponent, G as AXMFileTypeModule, c as AXMFolderExpirationBadgesComponent, q as AXMFolderPathBreadcrumbsComponent, H as AXMMenuProvider, I as AXMSearchCommandProvider, J as AXM_DOCUMENT_ATTACHMENT_DIALOG_ON_ACTION_HOOK_KEY, K as AXM_DOCUMENT_DIALOG_SURFACE_ATTACHMENT, L as AXM_DOCUMENT_DIALOG_SURFACE_ATTACHMENT_NO_SAVE, M as AXM_DOCUMENT_EXPIRATION_STATUS, N as AXM_DOCUMENT_EXPIRATION_STATUS_DEFINITION_KEY, A as AXPDocumentExplorerViewModel, m as AXPDocumentManagementService, O as AXPDocumentManagementSettingProvider, P as AXmFileTypeExtensionWidget, Q as DM_AUDIO_EXTENSION_ICONS, R as DM_DOCUMENT_EXTENSION_ICONS, S as DM_FILE_EXTENSION_ICONS, T as DM_FILE_TYPE_ICONS, U as DM_VIDEO_EXTENSION_ICONS, V as DOCUMENT_DRIVE_PAGE_COMPONENT_KEY, W as ScopedDriveService, X as buildDocumentManagementFileTypeCatalog, Y as documentPlugin, Z as resolveDocumentExpirationBadge, _ as resolveDocumentVersionNumber, $ as resolveFolderExpirationCountBadges } from './acorex-platform-module-document-management-client-acorex-platform-module-document-management-client-ouqn86NW.mjs';
|
|
2
2
|
export { AXM_DOCUMENT_EXPIRATION_NEAR_DAYS, toDocumentExpirationDate } from '@acorex-platform/module-document-management-client/contracts';
|
|
3
3
|
//# sourceMappingURL=acorex-platform-module-document-management-client.mjs.map
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex-platform/module-document-management-client",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.17",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@acorex-platform/module-data-management-client": "2.0.0-next.
|
|
6
|
+
"@acorex-platform/module-data-management-client": "2.0.0-next.17",
|
|
7
7
|
"@angular/common": "^21.0.0 || ^22.0.0",
|
|
8
8
|
"@angular/core": "^21.0.0 || ^22.0.0"
|
|
9
9
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-document-management-client-distribute-document.command-DoQC3ylx.mjs","sources":["../../../../libs/modules/document-management/client/src/lib/features/commands/distribute-document.command.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport {\n AXPLayoutBuilderService,\n resolveLayoutBuilderDialogResult,\n} from '@acorex-platform/framework-client/layout/builder';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPWorkflowManager } from '@acorex-platform/framework-client/workflow';\nimport type { AXPEntityReference } from '@acorex-platform/framework-shared/core';\nimport { buildAXPRecordWorkflowInfo } from '@acorex-platform/framework-shared/entity';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n AXPContentDocumentsPermissionKeys,\n DOCUMENT_DISTRIBUTION_WORKFLOW_NAME,\n highestDocumentVersionNumber,\n isDocumentReviewMetadataComplete,\n isDocumentReviewRequired,\n RootConfig,\n stampDocumentDistributionFormValues,\n AXM_DOCUMENT_DISTRIBUTION_VERSION_FIELD_NAME,\n type AXMDocumentDto,\n type AXMDocumentManagementFolderEntityModel,\n} from '@acorex-platform/module-document-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXMDocumentManagerService } from '../shared/document-manager.service';\nimport { AXPDocumentManagementService } from '../shared/document-management.service';\nimport type { AXMDocumentExplorerNode } from '../shared/document-manager.types';\nimport { sourcesAllowDocumentDistribution } from '../shared/document-distribution.util';\nimport { collectDocumentTypeKeys } from '../shared/document-review.util';\nimport {\n asDisplayName,\n asTrimmedId,\n asUserIds,\n mapWithConcurrency,\n resolveCreatedEntityId,\n} from './distribute-document.command.util';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface AXMDistributeDocumentCommandInput {\n documentId?: string;\n folderId?: string;\n data?: AXMDocumentExplorerNode | { documentId?: string; folderId?: string; id?: string; type?: string };\n options?: { documentId?: string; folderId?: string };\n}\n\ninterface DistributeDialogResult {\n title: string;\n description?: string;\n dueDate: Date | string;\n assigneeIds: string[];\n}\n\ninterface TaskTypeRow {\n id: string;\n title?: string;\n workflowConfig?: {\n workflowDefinitionId?: string;\n workflowName?: string;\n } | null;\n}\n\ninterface TaskStatusRow {\n id: string;\n name?: string;\n title?: string;\n color?: string;\n icon?: string;\n isDefault?: boolean;\n isFinal?: boolean;\n taskTypeId?: string;\n}\n\ninterface DistributionSetup {\n taskType: TaskTypeRow;\n openStatus: TaskStatusRow;\n signOffStatus: TaskStatusRow | undefined;\n completedStatus: TaskStatusRow | undefined;\n workflowId: string;\n}\n\ninterface LoadingDialogRef {\n close: () => void;\n setProgressText?: (text: string) => void;\n}\n\ninterface DistributionSubject {\n kind: 'file' | 'folder';\n id: string;\n title: string;\n record: Record<string, unknown>;\n}\n\ninterface DocumentTypeRow {\n id: string;\n requiresReview?: unknown;\n enableDistributionCapability?: unknown;\n metaDataList?: unknown;\n}\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst TASK_MODULE = 'TaskManagement';\nconst TASK_ENTITY = 'Task';\nconst TASK_ENTITY_NAME = `${TASK_MODULE}.${TASK_ENTITY}`;\nconst TASK_TYPE_ENTITY = 'TaskType';\nconst TASK_STATUS_ENTITY = 'TaskStatus';\nconst TASK_ASSIGNMENT_ENTITY = 'TaskAssignment';\nconst MOCK_DOCUMENT_DISTRIBUTION_TASK_TYPE_ID = 'pm-mock-task-type-document-distribution';\nconst DOCUMENT_ENTITY_NAME = `${RootConfig.module.name}.${RootConfig.entities.document.name}`;\nconst FOLDER_ENTITY_NAME = `${RootConfig.module.name}.${RootConfig.entities.folder.name}`;\nconst I18N = '@document-management:distribute';\nconst ASSIGNEE_CREATE_CONCURRENCY = 3;\n\n//#endregion\n\n//#region ----- Helpers -----\n\nfunction asItems<T>(value: unknown): T[] {\n if (Array.isArray(value)) {\n return value as T[];\n }\n if (value && typeof value === 'object' && Array.isArray((value as { items?: unknown }).items)) {\n return (value as { items: T[] }).items;\n }\n return [];\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> | null {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return null;\n }\n return value as Record<string, unknown>;\n}\n\nfunction statusRef(\n row: TaskStatusRow | undefined,\n): { id: string; title?: string; color?: string; icon?: string } | undefined {\n const id = asTrimmedId(row?.id);\n if (!id) {\n return undefined;\n }\n return { id, title: row?.title, color: row?.color, icon: row?.icon };\n}\n\nfunction resolveSubject(input: AXMDistributeDocumentCommandInput = {}): {\n kind: 'file' | 'folder';\n id: string;\n title: string;\n} | null {\n const data = input.data;\n const nodeType =\n data && typeof data === 'object' && 'type' in data ? (data as { type?: unknown }).type : undefined;\n const fromDataId =\n data && typeof data === 'object' ? asTrimmedId((data as { id?: unknown }).id) : undefined;\n const documentId =\n asTrimmedId(input.options?.documentId) ??\n asTrimmedId(input.documentId) ??\n (data && typeof data === 'object' ? asTrimmedId((data as { documentId?: unknown }).documentId) : undefined);\n const folderId =\n asTrimmedId(input.options?.folderId) ??\n asTrimmedId(input.folderId) ??\n (data && typeof data === 'object' ? asTrimmedId((data as { folderId?: unknown }).folderId) : undefined);\n\n if (nodeType === 'folder' && fromDataId) {\n return { kind: 'folder', id: fromDataId, title: asDisplayName((data as { name?: unknown }).name) ?? fromDataId };\n }\n if (nodeType === 'file' && fromDataId) {\n return { kind: 'file', id: fromDataId, title: asDisplayName((data as { name?: unknown }).name) ?? fromDataId };\n }\n if (folderId) {\n return { kind: 'folder', id: folderId, title: folderId };\n }\n if (documentId) {\n return { kind: 'file', id: documentId, title: documentId };\n }\n return null;\n}\n\nfunction metaDataFormOf(record: Record<string, unknown>): Record<string, unknown> | undefined {\n const form = record['metaDataForm'];\n return asRecord(form) ?? undefined;\n}\n\n//#endregion\n\n//#region ----- Distribute document command -----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMDistributeDocumentCommand implements AXPCommand<AXMDistributeDocumentCommandInput> {\n //#region ----- Services & Dependencies -----\n\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly entityService = inject(AXPEntityService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n private readonly workflowManager = inject(AXPWorkflowManager);\n private readonly driveService = inject(AXMDocumentManagerService);\n private readonly documentApi = inject(AXPDocumentManagementService);\n private readonly loadingDialog = inject(AXLoadingDialogService);\n\n private readonly documentData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.document.name)\n .data<string, AXMDocumentDto>();\n private readonly folderData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.folder.name)\n .data<string, AXMDocumentManagementFolderEntityModel>();\n private readonly taskTypeData = this.entityService.withEntity(TASK_MODULE, TASK_TYPE_ENTITY).data<string, TaskTypeRow>();\n private readonly taskStatusData = this.entityService\n .withEntity(TASK_MODULE, TASK_STATUS_ENTITY)\n .data<string, TaskStatusRow>();\n private readonly taskData = this.entityService.withEntity(TASK_MODULE, TASK_ENTITY).data<string>();\n private readonly assignmentData = this.entityService.withEntity(TASK_MODULE, TASK_ASSIGNMENT_ENTITY).data<string>();\n private readonly documentTypeData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.documentType.name)\n .data<string, DocumentTypeRow>();\n\n //#endregion\n\n //#region ----- Command Implementation -----\n\n async execute(input: AXMDistributeDocumentCommandInput = {}): AXPCommandExecuteResultPromise {\n if (!this.sessionService.authorize(AXPContentDocumentsPermissionKeys.DistributeDocuments)) {\n await this.toastError('errors.forbidden');\n return { success: false, message: { text: `${I18N}.errors.forbidden` } };\n }\n\n const subjectHint = resolveSubject(input);\n if (!subjectHint) {\n await this.toastError('errors.subject-required');\n return { success: false, message: { text: `${I18N}.errors.subject-required` } };\n }\n\n const subject = await this.loadSubject(subjectHint);\n if (!subject) {\n await this.toastError('errors.subject-required');\n return { success: false, message: { text: `${I18N}.errors.subject-required` } };\n }\n\n const typeLoader = {\n byNames: (names: string[]) => this.driveService.getDocumentTypesByNames(names),\n byKey: (id: string) => this.documentTypeData.byKey(id),\n };\n const appliesTo = subject.kind === 'folder' ? 'folder' : 'document';\n const allowsDistribution = await sourcesAllowDocumentDistribution(\n [subject.record, input.data],\n typeLoader,\n appliesTo,\n );\n if (!allowsDistribution) {\n await this.toastError('errors.not-enabled');\n return { success: false, message: { text: `${I18N}.errors.not-enabled` } };\n }\n\n if (await this.requiresUnfinishedReview(subject, typeLoader)) {\n await this.toastError('errors.review-required');\n return { success: false, message: { text: `${I18N}.errors.review-required` } };\n }\n\n const setupPromise = this.loadDistributionSetup();\n const form = await this.openDialog(subject.title);\n if (!form) {\n return { success: true, kind: 'object', data: { cancelled: true } };\n }\n\n const loading = await this.showDistributeLoading(form.assigneeIds.length);\n try {\n const setup = await setupPromise;\n if (!setup?.taskType?.id) {\n await this.toastError('errors.task-type-missing');\n return { success: false, message: { text: `${I18N}.errors.task-type-missing` } };\n }\n if (!setup.openStatus?.id) {\n await this.toastError('errors.status-missing');\n return { success: false, message: { text: `${I18N}.errors.status-missing` } };\n }\n\n const version = await this.resolveHighestVersion(subject);\n const created = await this.createParentAndSubtasks({\n form,\n setup,\n subject,\n version,\n loading,\n });\n\n if (created.pinFailed) {\n await this.toastWarning('warnings.pin-failed');\n }\n\n const [title, content] = await Promise.all([\n this.translationService.translateAsync(`${I18N}.success.title`),\n this.translationService.translateAsync(`${I18N}.success.description`),\n ]);\n this.toastService.show({ color: 'success', title, content, timeOut: 3000 });\n return {\n success: true,\n kind: 'object',\n data: {\n parentTaskId: created.parentTaskId,\n taskIds: created.taskIds,\n instanceIds: created.instanceIds,\n },\n };\n } catch (error) {\n const message = error instanceof Error ? error.message : undefined;\n await this.toastError('errors.failed', message);\n return { success: false, message: { text: message ?? `${I18N}.errors.failed` } };\n } finally {\n loading.close();\n }\n }\n\n //#endregion\n\n //#region ----- Dialog -----\n\n private async openDialog(defaultTitle: string): Promise<DistributeDialogResult | null> {\n const dueDate = new Date();\n dueDate.setHours(0, 0, 0, 0);\n const result = await this.layoutBuilder\n .create()\n .dialog<DistributeDialogResult | null>((dialog) => {\n dialog\n .setTitle(`${I18N}.dialog.title`)\n .setSize('md')\n .setCloseButton(true)\n .setContext({\n title: defaultTitle,\n description: '',\n dueDate,\n assigneeIds: [],\n })\n .content((flex) => {\n flex\n .setDirection('column')\n .setGap('12px')\n .formField(`${I18N}.fields.title`, (field) => {\n field.path('title');\n field.textBox({ validations: [{ rule: 'required' }] });\n })\n .formField(`${I18N}.fields.description`, (field) => {\n field.path('description');\n field.textBox({});\n })\n .formField(`${I18N}.fields.due-date`, (field) => {\n field.path('dueDate');\n field.dateTimeBox({ type: 'date', validations: [{ rule: 'required' }] });\n })\n .formField(`${I18N}.fields.assignees`, (field) => {\n field.path('assigneeIds');\n field.lookupBox({\n entity: 'SecurityManagement.User',\n multiple: true,\n look: 'lookup',\n validations: [{ rule: 'required' }],\n });\n });\n })\n .setActions((actions) => {\n actions.cancel('@general:actions.cancel.title');\n actions.submit(`${I18N}.dialog.submit`);\n })\n .onAction(async (dialogRef) => {\n if (dialogRef.action() === 'cancel') {\n return null;\n }\n const ctx = dialogRef.context() as {\n title?: string;\n description?: string;\n dueDate?: Date | string | null;\n assigneeIds?: unknown;\n };\n const title = (ctx.title ?? '').trim();\n const assigneeIds = asUserIds(ctx.assigneeIds);\n if (!title) {\n throw new Error(`${I18N}.errors.title-required`);\n }\n if (!ctx.dueDate) {\n throw new Error(`${I18N}.errors.due-date-required`);\n }\n if (assigneeIds.length === 0) {\n throw new Error(`${I18N}.errors.assignees-required`);\n }\n dialogRef.setLoading(true);\n return {\n title,\n description: (ctx.description ?? '').trim() || undefined,\n dueDate: ctx.dueDate,\n assigneeIds,\n };\n });\n })\n .show();\n\n return resolveLayoutBuilderDialogResult<DistributeDialogResult>(result);\n }\n\n //#endregion\n\n //#region ----- Create parent and sub-tasks -----\n\n private async createParentAndSubtasks(params: {\n form: DistributeDialogResult;\n setup: DistributionSetup;\n subject: DistributionSubject;\n version: number;\n loading: LoadingDialogRef;\n }): Promise<{ parentTaskId: string; taskIds: string[]; instanceIds: string[]; pinFailed: boolean }> {\n const initiatorId = this.sessionService.user?.id ?? params.form.assigneeIds[0];\n const subjectRef: AXPEntityReference = {\n type: params.subject.kind === 'folder' ? FOLDER_ENTITY_NAME : DOCUMENT_ENTITY_NAME,\n id: params.subject.id,\n title: params.subject.title,\n };\n const versionForm = stampDocumentDistributionFormValues(undefined, {\n [AXM_DOCUMENT_DISTRIBUTION_VERSION_FIELD_NAME]: params.version,\n });\n\n const parentTask = await this.taskData.create({\n title: params.form.title,\n description: params.form.description,\n taskTypeId: params.setup.taskType.id,\n taskType: { id: params.setup.taskType.id, title: params.setup.taskType.title },\n statusId: params.setup.openStatus.id,\n status: statusRef(params.setup.openStatus),\n priority: 'medium',\n progress: 0,\n order: 0,\n startDate: params.form.dueDate,\n dueDate: params.form.dueDate,\n assigneeId: initiatorId,\n assignee: { id: initiatorId },\n subjectRef,\n metaDataForm: versionForm,\n isArchived: false,\n } as never);\n const parentTaskId = resolveCreatedEntityId(parentTask);\n\n let pinFailed = false;\n await this.pinSubjectOnTask(parentTaskId, params.subject).catch((error) => {\n console.warn('[AXMDistributeDocumentCommand] pin parent shortcut failed', error);\n pinFailed = true;\n });\n\n const total = params.form.assigneeIds.length;\n let completed = 0;\n const created = await mapWithConcurrency(params.form.assigneeIds, ASSIGNEE_CREATE_CONCURRENCY, async (userId) => {\n const row = await this.createAndStartForAssignee({\n userId,\n assignedBy: initiatorId,\n form: params.form,\n setup: params.setup,\n subject: params.subject,\n subjectRef,\n parentTaskId,\n parentTitle: params.form.title,\n versionForm,\n });\n completed += 1;\n await this.updateDistributeLoadingProgress(params.loading, completed, total);\n return row;\n });\n\n return {\n parentTaskId,\n taskIds: created.map((row) => row.taskId),\n instanceIds: created\n .map((row) => row.instanceId)\n .filter((id): id is string => typeof id === 'string' && id.length > 0),\n pinFailed: pinFailed || created.some((row) => row.pinFailed),\n };\n }\n\n private async createAndStartForAssignee(params: {\n userId: string;\n assignedBy: string;\n form: DistributeDialogResult;\n setup: DistributionSetup;\n subject: DistributionSubject;\n subjectRef: AXPEntityReference;\n parentTaskId: string;\n parentTitle: string;\n versionForm: Record<string, unknown>;\n }): Promise<{ taskId: string; instanceId?: string; pinFailed: boolean }> {\n const createdTask = await this.taskData.create({\n title: params.form.title,\n description: params.form.description,\n taskTypeId: params.setup.taskType.id,\n taskType: { id: params.setup.taskType.id, title: params.setup.taskType.title },\n statusId: params.setup.openStatus.id,\n status: statusRef(params.setup.openStatus),\n priority: 'medium',\n progress: 0,\n order: 0,\n startDate: params.form.dueDate,\n dueDate: params.form.dueDate,\n assigneeId: params.userId,\n assignee: { id: params.userId },\n subjectRef: params.subjectRef,\n parentTaskId: params.parentTaskId,\n parentTask: { id: params.parentTaskId, title: params.parentTitle },\n metaDataForm: params.versionForm,\n isArchived: false,\n } as never);\n const taskId = resolveCreatedEntityId(createdTask);\n\n let pinFailed = false;\n const assignmentPromise = this.assignmentData.create({\n taskId,\n assignmentRef: {\n sourceKey: 'employee-user',\n refId: params.userId,\n displayName: params.userId,\n },\n role: 'reviewer',\n assignedBy: params.assignedBy,\n assignedAt: new Date(),\n isActive: true,\n } as never);\n\n const pinPromise = this.pinSubjectOnTask(taskId, params.subject).catch((error) => {\n console.warn('[AXMDistributeDocumentCommand] pin document shortcut failed', error);\n pinFailed = true;\n });\n\n const [, , instanceId] = await Promise.all([\n assignmentPromise,\n pinPromise,\n this.startWorkflowForAssignee(taskId, params),\n ]);\n return { taskId, instanceId, pinFailed };\n }\n\n private async startWorkflowForAssignee(\n taskId: string,\n params: {\n userId: string;\n assignedBy: string;\n form: DistributeDialogResult;\n setup: DistributionSetup;\n subject: DistributionSubject;\n parentTaskId: string;\n },\n ): Promise<string | undefined> {\n const startResult = await this.workflowManager.start(params.setup.workflowId, {\n taskId,\n taskTitle: params.form.title,\n documentId: params.subject.kind === 'file' ? params.subject.id : '',\n folderId: params.subject.kind === 'folder' ? params.subject.id : '',\n parentTaskId: params.parentTaskId,\n signerUserId: params.userId,\n signerUserIds: [params.userId],\n initiatorUserId: params.assignedBy,\n openStatusId: params.setup.openStatus.id,\n openStatus: statusRef(params.setup.openStatus),\n signOffStatusId: params.setup.signOffStatus?.id ?? params.setup.openStatus.id,\n signOffStatus: statusRef(params.setup.signOffStatus) ?? statusRef(params.setup.openStatus),\n completedStatusId: params.setup.completedStatus?.id ?? params.setup.openStatus.id,\n completedStatus: statusRef(params.setup.completedStatus) ?? statusRef(params.setup.openStatus),\n correlationId: taskId,\n refId: taskId,\n refType: TASK_ENTITY_NAME,\n dueDate: params.form.dueDate,\n });\n\n if (!startResult.success) {\n throw new Error(startResult.error ?? 'workflow-failed');\n }\n\n if (startResult.instanceId) {\n try {\n await this.taskData.update(taskId, {\n workflowInfo: buildAXPRecordWorkflowInfo({\n instanceId: startResult.instanceId,\n definitionId: params.setup.workflowId,\n correlationId: taskId,\n }),\n } as never);\n } catch (error) {\n console.warn('[AXMDistributeDocumentCommand] stamp workflowInfo failed', error);\n }\n }\n\n return startResult.instanceId;\n }\n\n //#endregion\n\n //#region ----- Pin subject -----\n\n private async pinSubjectOnTask(taskId: string, subject: DistributionSubject): Promise<void> {\n const folder = await this.driveService.getRootByEntityRef(`${TASK_MODULE}.${TASK_ENTITY}`, taskId);\n const folderId = folder?.result?.id;\n if (!folderId) {\n throw new Error('Task document folder was not provisioned');\n }\n await this.driveService.createShortcut(subject.id, subject.kind === 'folder' ? 'folder' : 'file', folderId, {\n nameOverride: subject.title,\n });\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async loadSubject(\n subject: { kind: 'file' | 'folder'; id: string; title: string },\n ): Promise<DistributionSubject | null> {\n if (subject.kind === 'folder') {\n const folder = await this.folderData.byKey(subject.id);\n if (!folder?.id) {\n return null;\n }\n return {\n kind: 'folder',\n id: folder.id,\n title: asDisplayName(folder.title) ?? subject.title,\n record: folder as unknown as Record<string, unknown>,\n };\n }\n const document = await this.documentData.byKey(subject.id);\n if (!document?.id) {\n return null;\n }\n return {\n kind: 'file',\n id: document.id,\n title: asDisplayName(document.name) ?? asDisplayName(document.title) ?? subject.title,\n record: document as unknown as Record<string, unknown>,\n };\n }\n\n private async requiresUnfinishedReview(\n subject: DistributionSubject,\n load: {\n byNames: (names: string[]) => Promise<DocumentTypeRow[]>;\n byKey: (id: string) => Promise<DocumentTypeRow | null | undefined>;\n },\n ): Promise<boolean> {\n const types = await this.loadSubjectTypes(subject, load);\n if (!types.some((type) => isDocumentReviewRequired(type.requiresReview))) {\n return false;\n }\n return !isDocumentReviewMetadataComplete(metaDataFormOf(subject.record));\n }\n\n private async loadSubjectTypes(\n subject: DistributionSubject,\n load: {\n byNames: (names: string[]) => Promise<DocumentTypeRow[]>;\n byKey: (id: string) => Promise<DocumentTypeRow | null | undefined>;\n },\n ): Promise<DocumentTypeRow[]> {\n const keys = collectDocumentTypeKeys(subject.record);\n const found: DocumentTypeRow[] = [];\n for (const id of keys.ids) {\n try {\n const type = await load.byKey(id);\n if (type) {\n found.push(type);\n }\n } catch {\n // Keep checking remaining types when one lookup misses.\n }\n }\n if (keys.names.length) {\n const byName = await load.byNames(keys.names);\n found.push(...byName);\n }\n return found;\n }\n\n private async resolveHighestVersion(subject: DistributionSubject): Promise<number> {\n if (subject.kind === 'file') {\n return highestDocumentVersionNumber([subject.record]);\n }\n try {\n const documents = await this.documentApi.listFolderReviewDocuments(subject.id);\n return highestDocumentVersionNumber(documents);\n } catch (error) {\n console.warn('[AXMDistributeDocumentCommand] list folder documents for version failed', error);\n return 1;\n }\n }\n\n private async loadDistributionSetup(): Promise<DistributionSetup | null> {\n const taskType = await this.loadDistributionTaskType();\n if (!taskType?.id) {\n return null;\n }\n const statuses = await this.loadStatuses(taskType.id);\n const openStatus = statuses.find((row) => row.isDefault) ?? statuses[0];\n const signOffStatus = statuses.find((row) => row.name === 'sign-off') ?? openStatus;\n const completedStatus = statuses.find((row) => row.isFinal) ?? signOffStatus;\n return {\n taskType,\n openStatus,\n signOffStatus,\n completedStatus,\n workflowId: taskType.workflowConfig?.workflowName?.trim() || DOCUMENT_DISTRIBUTION_WORKFLOW_NAME,\n };\n }\n\n private async loadDistributionTaskType(): Promise<TaskTypeRow | null> {\n try {\n const byId = await this.taskTypeData.byKey(MOCK_DOCUMENT_DISTRIBUTION_TASK_TYPE_ID);\n if (byId?.id) {\n return byId;\n }\n } catch {\n // hashed tenant copies use different ids\n }\n\n const result = await this.taskTypeData.query({ skip: 0, take: 200 });\n return (\n asItems<TaskTypeRow>(result).find(\n (row) => row.workflowConfig?.workflowName?.trim() === DOCUMENT_DISTRIBUTION_WORKFLOW_NAME,\n ) ?? null\n );\n }\n\n private async loadStatuses(taskTypeId: string): Promise<TaskStatusRow[]> {\n const result = await this.taskStatusData.query({\n skip: 0,\n take: 50,\n filter: { field: 'taskTypeId', operator: { type: 'equal' }, value: taskTypeId },\n });\n const rows = asItems<TaskStatusRow>(result);\n return rows.some((row) => row.taskTypeId === taskTypeId)\n ? rows.filter((row) => row.taskTypeId === taskTypeId)\n : rows;\n }\n\n private async showDistributeLoading(assigneeCount: number): Promise<LoadingDialogRef> {\n const [title, text] = await Promise.all([\n this.translationService.translateAsync(`${I18N}.loading.title`),\n this.translationService.translateAsync(`${I18N}.loading.description`, {\n params: { count: assigneeCount },\n }),\n ]);\n return this.loadingDialog.show({\n title,\n mode: 'indeterminate',\n progressColor: 'primary',\n text,\n }) as LoadingDialogRef;\n }\n\n private async updateDistributeLoadingProgress(\n loading: LoadingDialogRef,\n current: number,\n total: number,\n ): Promise<void> {\n if (!loading.setProgressText) {\n return;\n }\n const text = await this.translationService.translateAsync(`${I18N}.loading.progress`, {\n params: { current, total },\n });\n loading.setProgressText(text);\n }\n\n private async toastError(key: string, detail?: string): Promise<void> {\n const [title, fallback] = await Promise.all([\n this.translationService.translateAsync(`${I18N}.errors.title`),\n this.translationService.translateAsync(`${I18N}.${key}`),\n ]);\n this.toastService.show({\n color: 'danger',\n title,\n content: detail?.trim() || fallback,\n closeButton: true,\n timeOut: 5000,\n });\n }\n\n private async toastWarning(key: string): Promise<void> {\n const [title, content] = await Promise.all([\n this.translationService.translateAsync(`${I18N}.warnings.title`),\n this.translationService.translateAsync(`${I18N}.${key}`),\n ]);\n this.toastService.show({\n color: 'warning',\n title,\n content,\n closeButton: true,\n timeOut: 5000,\n });\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;AA2GA;AAEA;AAEA,MAAM,WAAW,GAAG,gBAAgB;AACpC,MAAM,WAAW,GAAG,MAAM;AAC1B,MAAM,gBAAgB,GAAG,CAAA,EAAG,WAAW,CAAA,CAAA,EAAI,WAAW,EAAE;AACxD,MAAM,gBAAgB,GAAG,UAAU;AACnC,MAAM,kBAAk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,EAAE,IAAI,QAAQ;AACnC,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,OAAO,EAAE,IAAI;AACd,SAAA,CAAC;IACJ;IAEQ,MAAM,YAAY,CAAC,GAAW,EAAA;QACpC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACzC,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAA,EAAG,IAAI,iBAAiB,CAAC;YAChE,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,GAAG,IAAI,CAAA,CAAA,EAAI,GAAG,CAAA,CAAE,CAAC;AACzD,SAAA,CAAC;AACF,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;AACrB,YAAA,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,OAAO;AACP,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,OAAO,EAAE,IAAI;AACd,SAAA,CAAC;IACJ;8GAzlBW,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA5B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,cADf,MAAM,EAAA,CAAA,CAAA;;2FACnB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-document-management-client-distribute-document.command.util-HCkpx2Hk.mjs","sources":["../../../../libs/modules/document-management/client/src/lib/features/commands/distribute-document.command.util.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { coerceUnknownToMultiLanguageString, resolveMultiLanguageString } from '@acorex-platform/framework-shared/core';\n\n//#endregion\n\n//#region ----- Helpers -----\n\nexport function asTrimmedId(value: unknown): string | undefined {\n if (typeof value === 'string' && value.trim()) {\n return value.trim();\n }\n if (value && typeof value === 'object' && 'id' in value) {\n const id = (value as { id?: unknown }).id;\n if (typeof id === 'string' && id.trim()) {\n return id.trim();\n }\n }\n return undefined;\n}\n\nexport function asUserIds(value: unknown): string[] {\n if (value == null || value === '') {\n return [];\n }\n const source = Array.isArray(value)\n ? value\n : value && typeof value === 'object' && Array.isArray((value as { selectedItems?: unknown }).selectedItems)\n ? ((value as { selectedItems: unknown[] }).selectedItems)\n : [value];\n const ids: string[] = [];\n for (const row of source) {\n const id = asTrimmedId(row);\n if (id && !ids.includes(id)) {\n ids.push(id);\n }\n }\n return ids;\n}\n\nexport function resolveCreatedEntityId(created: unknown): string {\n if (typeof created === 'string' && created.trim()) {\n return created.trim();\n }\n if (created && typeof created === 'object' && 'result' in created) {\n return resolveCreatedEntityId((created as { result: unknown }).result);\n }\n const id = asTrimmedId(created);\n if (!id) {\n throw new Error('Failed to resolve created entity id');\n }\n return id;\n}\n\nexport function isTruthyFlag(value: unknown): boolean {\n return value === true || value === 'true' || value === 1 || value === '1';\n}\n\nexport function asDisplayName(value: unknown): string | undefined {\n const resolved = resolveMultiLanguageString(coerceUnknownToMultiLanguageString(value), 'en-US').trim();\n return resolved || undefined;\n}\n\nexport async function mapWithConcurrency<T, R>(\n items: readonly T[],\n limit: number,\n mapper: (item: T, index: number) => Promise<R>,\n): Promise<R[]> {\n if (items.length === 0) {\n return [];\n }\n const results: R[] = new Array(items.length);\n let nextIndex = 0;\n const workerCount = Math.min(Math.max(1, limit), items.length);\n await Promise.all(\n Array.from({ length: workerCount }, async () => {\n for (;;) {\n const index = nextIndex;\n nextIndex += 1;\n if (index >= items.length) {\n return;\n }\n results[index] = await mapper(items[index], index);\n }\n }),\n );\n return results;\n}\n\n//#endregion\n"],"names":[],"mappings":";;AAAA;AAIA;AAEA;AAEM,SAAU,WAAW,CAAC,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K,CAAC,MAAM,EAAE;gBACzB;YACF;AACA,YAAA,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;QACpD;IACF,CAAC,CAAC,CACH;AACD,IAAA,OAAO,OAAO;AAChB;AAEA;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-document-management-client-request-document-review.command-MLT9W3J0.mjs","sources":["../../../../libs/modules/document-management/client/src/lib/features/commands/request-document-review.command.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport {\n AXPLayoutBuilderService,\n resolveLayoutBuilderDialogResult,\n} from '@acorex-platform/framework-client/layout/builder';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPWorkflowManager } from '@acorex-platform/framework-client/workflow';\nimport type { AXPEntityReference } from '@acorex-platform/framework-shared/core';\nimport { buildAXPRecordWorkflowInfo } from '@acorex-platform/framework-shared/entity';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n AXPContentDocumentsPermissionKeys,\n RootConfig,\n type AXMDocumentDto,\n type AXMDocumentManagementFolderEntityModel,\n} from '@acorex-platform/module-document-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXMDocumentManagerService } from '../shared/document-manager.service';\nimport type { AXMDocumentExplorerNode } from '../shared/document-manager.types';\nimport { sourcesAllowDocumentReview } from '../shared/document-review.util';\nimport {\n asDisplayName,\n asTrimmedId,\n asUserIds,\n resolveCreatedEntityId,\n} from './distribute-document.command.util';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface AXMRequestDocumentReviewCommandInput {\n documentId?: string;\n folderId?: string;\n data?: AXMDocumentExplorerNode | { documentId?: string; folderId?: string; id?: string; type?: string };\n options?: { documentId?: string; folderId?: string };\n}\n\ninterface ReviewDialogResult {\n title: string;\n description?: string;\n dueDate: Date | string;\n reviewerId: string;\n}\n\ninterface TaskTypeRow {\n id: string;\n title?: string;\n workflowConfig?: {\n workflowDefinitionId?: string;\n workflowName?: string;\n } | null;\n}\n\ninterface TaskStatusRow {\n id: string;\n name?: string;\n title?: string;\n color?: string;\n icon?: string;\n isDefault?: boolean;\n isFinal?: boolean;\n taskTypeId?: string;\n}\n\ninterface ReviewSetup {\n taskType: TaskTypeRow;\n openStatus: TaskStatusRow;\n signOffStatus: TaskStatusRow | undefined;\n completedStatus: TaskStatusRow | undefined;\n workflowId: string;\n}\n\ninterface LoadingDialogRef {\n close: () => void;\n}\n\ninterface ReviewSubject {\n kind: 'file' | 'folder';\n id: string;\n title: string;\n}\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst TASK_MODULE = 'TaskManagement';\nconst TASK_ENTITY = 'Task';\nconst TASK_ENTITY_NAME = `${TASK_MODULE}.${TASK_ENTITY}`;\nconst TASK_TYPE_ENTITY = 'TaskType';\nconst TASK_STATUS_ENTITY = 'TaskStatus';\nconst TASK_ASSIGNMENT_ENTITY = 'TaskAssignment';\nconst DOCUMENT_REVIEW_WORKFLOW_NAME = 'document-review';\nconst MOCK_DOCUMENT_REVIEW_TASK_TYPE_ID = 'pm-mock-task-type-document-review';\nconst DOCUMENT_ENTITY_NAME = `${RootConfig.module.name}.${RootConfig.entities.document.name}`;\nconst FOLDER_ENTITY_NAME = `${RootConfig.module.name}.${RootConfig.entities.folder.name}`;\nconst I18N = '@document-management:review';\n\n//#endregion\n\n//#region ----- Helpers -----\n\nfunction asItems<T>(value: unknown): T[] {\n if (Array.isArray(value)) {\n return value as T[];\n }\n if (value && typeof value === 'object' && Array.isArray((value as { items?: unknown }).items)) {\n return (value as { items: T[] }).items;\n }\n return [];\n}\n\nfunction statusRef(\n row: TaskStatusRow | undefined,\n): { id: string; title?: string; color?: string; icon?: string } | undefined {\n const id = asTrimmedId(row?.id);\n if (!id) {\n return undefined;\n }\n return { id, title: row?.title, color: row?.color, icon: row?.icon };\n}\n\nfunction resolveSubject(input: AXMRequestDocumentReviewCommandInput = {}): ReviewSubject | null {\n const data = input.data;\n const nodeType =\n data && typeof data === 'object' && 'type' in data ? (data as { type?: unknown }).type : undefined;\n const fromDataId =\n data && typeof data === 'object' ? asTrimmedId((data as { id?: unknown }).id) : undefined;\n const documentId =\n asTrimmedId(input.options?.documentId) ??\n asTrimmedId(input.documentId) ??\n (data && typeof data === 'object' ? asTrimmedId((data as { documentId?: unknown }).documentId) : undefined);\n const folderId =\n asTrimmedId(input.options?.folderId) ??\n asTrimmedId(input.folderId) ??\n (data && typeof data === 'object' ? asTrimmedId((data as { folderId?: unknown }).folderId) : undefined);\n\n if (nodeType === 'folder' && fromDataId) {\n return { kind: 'folder', id: fromDataId, title: asDisplayName((data as { name?: unknown }).name) ?? fromDataId };\n }\n if (nodeType === 'file' && fromDataId) {\n return { kind: 'file', id: fromDataId, title: asDisplayName((data as { name?: unknown }).name) ?? fromDataId };\n }\n if (folderId) {\n return { kind: 'folder', id: folderId, title: folderId };\n }\n if (documentId) {\n return { kind: 'file', id: documentId, title: documentId };\n }\n return null;\n}\n\n//#endregion\n\n//#region ----- Request document review command -----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMRequestDocumentReviewCommand implements AXPCommand<AXMRequestDocumentReviewCommandInput> {\n //#region ----- Services & Dependencies -----\n\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly entityService = inject(AXPEntityService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n private readonly workflowManager = inject(AXPWorkflowManager);\n private readonly driveService = inject(AXMDocumentManagerService);\n private readonly loadingDialog = inject(AXLoadingDialogService);\n\n private readonly documentData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.document.name)\n .data<string, AXMDocumentDto>();\n private readonly folderData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.folder.name)\n .data<string, AXMDocumentManagementFolderEntityModel>();\n private readonly taskTypeData = this.entityService.withEntity(TASK_MODULE, TASK_TYPE_ENTITY).data<string, TaskTypeRow>();\n private readonly taskStatusData = this.entityService\n .withEntity(TASK_MODULE, TASK_STATUS_ENTITY)\n .data<string, TaskStatusRow>();\n private readonly taskData = this.entityService.withEntity(TASK_MODULE, TASK_ENTITY).data<string>();\n private readonly assignmentData = this.entityService.withEntity(TASK_MODULE, TASK_ASSIGNMENT_ENTITY).data<string>();\n private readonly documentTypeData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.documentType.name)\n .data<string, { id: string; requiresReview?: unknown; metaDataList?: unknown }>();\n\n //#endregion\n\n //#region ----- Command Implementation -----\n\n async execute(input: AXMRequestDocumentReviewCommandInput = {}): AXPCommandExecuteResultPromise {\n if (!this.sessionService.authorize(AXPContentDocumentsPermissionKeys.ManageDocumentReview)) {\n await this.toastError('errors.forbidden');\n return { success: false, message: { text: `${I18N}.errors.forbidden` } };\n }\n\n const subject = resolveSubject(input);\n if (!subject) {\n await this.toastError('errors.subject-required');\n return { success: false, message: { text: `${I18N}.errors.subject-required` } };\n }\n\n const loaded = await this.loadSubject(subject);\n if (!loaded) {\n await this.toastError('errors.subject-required');\n return { success: false, message: { text: `${I18N}.errors.subject-required` } };\n }\n\n const allowsReview = await sourcesAllowDocumentReview(\n [loaded.record, input.data],\n {\n byNames: (names) => this.driveService.getDocumentTypesByNames(names),\n byKey: (id) => this.documentTypeData.byKey(id),\n },\n loaded.kind === 'folder' ? 'folder' : 'document',\n );\n if (!allowsReview) {\n await this.toastError('errors.not-enabled');\n return { success: false, message: { text: `${I18N}.errors.not-enabled` } };\n }\n\n const setupPromise = this.loadReviewSetup();\n const form = await this.openDialog(loaded.title);\n if (!form) {\n return { success: true, kind: 'object', data: { cancelled: true } };\n }\n\n const loading = await this.showLoading();\n try {\n const setup = await setupPromise;\n if (!setup?.taskType?.id) {\n await this.toastError('errors.task-type-missing');\n return { success: false, message: { text: `${I18N}.errors.task-type-missing` } };\n }\n if (!setup.openStatus?.id) {\n await this.toastError('errors.status-missing');\n return { success: false, message: { text: `${I18N}.errors.status-missing` } };\n }\n\n const created = await this.createAndStart({\n form,\n setup,\n subject: loaded,\n });\n\n if (created.pinFailed) {\n await this.toastWarning('warnings.pin-failed');\n }\n\n const [title, content] = await Promise.all([\n this.translationService.translateAsync(`${I18N}.success.title`),\n this.translationService.translateAsync(`${I18N}.success.description`),\n ]);\n this.toastService.show({ color: 'success', title, content, timeOut: 3000 });\n return { success: true, kind: 'object', data: { taskId: created.taskId, instanceId: created.instanceId } };\n } catch (error) {\n const message = error instanceof Error ? error.message : undefined;\n await this.toastError('errors.failed', message);\n return { success: false, message: { text: message ?? `${I18N}.errors.failed` } };\n } finally {\n loading.close();\n }\n }\n\n //#endregion\n\n //#region ----- Dialog -----\n\n private async openDialog(defaultTitle: string): Promise<ReviewDialogResult | null> {\n const dueDate = new Date();\n dueDate.setHours(0, 0, 0, 0);\n const result = await this.layoutBuilder\n .create()\n .dialog<ReviewDialogResult | null>((dialog) => {\n dialog\n .setTitle(`${I18N}.dialog.title`)\n .setSize('md')\n .setCloseButton(true)\n .setContext({\n title: defaultTitle,\n description: '',\n dueDate,\n reviewerId: null,\n })\n .content((flex) => {\n flex\n .setDirection('column')\n .setGap('12px')\n .formField(`${I18N}.fields.title`, (field) => {\n field.path('title');\n field.textBox({ validations: [{ rule: 'required' }] });\n })\n .formField(`${I18N}.fields.description`, (field) => {\n field.path('description');\n field.textBox({});\n })\n .formField(`${I18N}.fields.due-date`, (field) => {\n field.path('dueDate');\n field.dateTimeBox({ type: 'date', validations: [{ rule: 'required' }] });\n })\n .formField(`${I18N}.fields.reviewer`, (field) => {\n field.path('reviewerId');\n field.lookupBox({\n entity: 'SecurityManagement.User',\n multiple: false,\n look: 'lookup',\n validations: [{ rule: 'required' }],\n });\n });\n })\n .setActions((actions) => {\n actions.cancel('@general:actions.cancel.title');\n actions.submit(`${I18N}.dialog.submit`);\n })\n .onAction(async (dialogRef) => {\n if (dialogRef.action() === 'cancel') {\n return null;\n }\n const ctx = dialogRef.context() as {\n title?: string;\n description?: string;\n dueDate?: Date | string | null;\n reviewerId?: unknown;\n };\n const title = (ctx.title ?? '').trim();\n const reviewerId = asUserIds(ctx.reviewerId)[0];\n if (!title) {\n throw new Error(`${I18N}.errors.title-required`);\n }\n if (!ctx.dueDate) {\n throw new Error(`${I18N}.errors.due-date-required`);\n }\n if (!reviewerId) {\n throw new Error(`${I18N}.errors.reviewer-required`);\n }\n dialogRef.setLoading(true);\n return {\n title,\n description: (ctx.description ?? '').trim() || undefined,\n dueDate: ctx.dueDate,\n reviewerId,\n };\n });\n })\n .show();\n\n return resolveLayoutBuilderDialogResult<ReviewDialogResult>(result);\n }\n\n //#endregion\n\n //#region ----- Create and start -----\n\n private async createAndStart(params: {\n form: ReviewDialogResult;\n setup: ReviewSetup;\n subject: ReviewSubject;\n }): Promise<{ taskId: string; instanceId?: string; pinFailed: boolean }> {\n const assignedBy = this.sessionService.user?.id ?? params.form.reviewerId;\n const subjectRef: AXPEntityReference = {\n type: params.subject.kind === 'folder' ? FOLDER_ENTITY_NAME : DOCUMENT_ENTITY_NAME,\n id: params.subject.id,\n title: params.subject.title,\n };\n\n const createdTask = await this.taskData.create({\n title: params.form.title,\n description: params.form.description,\n taskTypeId: params.setup.taskType.id,\n taskType: { id: params.setup.taskType.id, title: params.setup.taskType.title },\n statusId: params.setup.openStatus.id,\n status: statusRef(params.setup.openStatus),\n priority: 'medium',\n progress: 0,\n order: 0,\n startDate: params.form.dueDate,\n dueDate: params.form.dueDate,\n assigneeId: params.form.reviewerId,\n assignee: { id: params.form.reviewerId },\n subjectRef,\n isArchived: false,\n } as never);\n const taskId = resolveCreatedEntityId(createdTask);\n\n let pinFailed = false;\n const assignmentPromise = this.assignmentData.create({\n taskId,\n assignmentRef: {\n sourceKey: 'employee-user',\n refId: params.form.reviewerId,\n displayName: params.form.reviewerId,\n },\n role: 'reviewer',\n assignedBy,\n assignedAt: new Date(),\n isActive: true,\n } as never);\n\n const pinPromise = this.pinSubjectOnTask(taskId, params.subject).catch((error) => {\n console.warn('[AXMRequestDocumentReviewCommand] pin shortcut failed', error);\n pinFailed = true;\n });\n\n const [, , instanceId] = await Promise.all([\n assignmentPromise,\n pinPromise,\n this.startWorkflow(taskId, params),\n ]);\n return { taskId, instanceId, pinFailed };\n }\n\n private async startWorkflow(\n taskId: string,\n params: { form: ReviewDialogResult; setup: ReviewSetup; subject: ReviewSubject },\n ): Promise<string | undefined> {\n const startResult = await this.workflowManager.start(params.setup.workflowId, {\n taskId,\n taskTitle: params.form.title,\n documentId: params.subject.kind === 'file' ? params.subject.id : '',\n folderId: params.subject.kind === 'folder' ? params.subject.id : '',\n signerUserId: params.form.reviewerId,\n initiatorUserId: this.sessionService.user?.id,\n openStatusId: params.setup.openStatus.id,\n openStatus: statusRef(params.setup.openStatus),\n signOffStatusId: params.setup.signOffStatus?.id ?? params.setup.openStatus.id,\n signOffStatus: statusRef(params.setup.signOffStatus) ?? statusRef(params.setup.openStatus),\n completedStatusId: params.setup.completedStatus?.id ?? params.setup.openStatus.id,\n completedStatus: statusRef(params.setup.completedStatus) ?? statusRef(params.setup.openStatus),\n correlationId: taskId,\n refId: taskId,\n refType: TASK_ENTITY_NAME,\n dueDate: params.form.dueDate,\n });\n\n if (!startResult.success) {\n throw new Error(startResult.error ?? 'workflow-failed');\n }\n\n if (startResult.instanceId) {\n try {\n await this.taskData.update(taskId, {\n workflowInfo: buildAXPRecordWorkflowInfo({\n instanceId: startResult.instanceId,\n definitionId: params.setup.workflowId,\n correlationId: taskId,\n }),\n } as never);\n } catch (error) {\n console.warn('[AXMRequestDocumentReviewCommand] stamp workflowInfo failed', error);\n }\n }\n\n return startResult.instanceId;\n }\n\n //#endregion\n\n //#region ----- Pin subject -----\n\n private async pinSubjectOnTask(taskId: string, subject: ReviewSubject): Promise<void> {\n const folder = await this.driveService.getRootByEntityRef(`${TASK_MODULE}.${TASK_ENTITY}`, taskId);\n const folderId = folder?.result?.id;\n if (!folderId) {\n throw new Error('Task document folder was not provisioned');\n }\n await this.driveService.createShortcut(subject.id, subject.kind === 'folder' ? 'folder' : 'file', folderId, {\n nameOverride: subject.title,\n });\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async loadSubject(\n subject: ReviewSubject,\n ): Promise<{ kind: 'file' | 'folder'; id: string; title: string; record: unknown } | null> {\n if (subject.kind === 'folder') {\n const folder = await this.folderData.byKey(subject.id);\n if (!folder?.id) {\n return null;\n }\n return {\n kind: 'folder',\n id: folder.id,\n title: asDisplayName(folder.title) ?? subject.title,\n record: folder,\n };\n }\n const document = await this.documentData.byKey(subject.id);\n if (!document?.id) {\n return null;\n }\n return {\n kind: 'file',\n id: document.id,\n title: asDisplayName(document.name) ?? asDisplayName(document.title) ?? subject.title,\n record: document,\n };\n }\n\n private async loadReviewSetup(): Promise<ReviewSetup | null> {\n const taskType = await this.loadReviewTaskType();\n if (!taskType?.id) {\n return null;\n }\n const statuses = await this.loadStatuses(taskType.id);\n const openStatus = statuses.find((row) => row.isDefault) ?? statuses[0];\n const signOffStatus = statuses.find((row) => row.name === 'sign-off') ?? openStatus;\n const completedStatus = statuses.find((row) => row.isFinal) ?? signOffStatus;\n return {\n taskType,\n openStatus,\n signOffStatus,\n completedStatus,\n workflowId: taskType.workflowConfig?.workflowName?.trim() || DOCUMENT_REVIEW_WORKFLOW_NAME,\n };\n }\n\n private async loadReviewTaskType(): Promise<TaskTypeRow | null> {\n try {\n const byId = await this.taskTypeData.byKey(MOCK_DOCUMENT_REVIEW_TASK_TYPE_ID);\n if (byId?.id) {\n return byId;\n }\n } catch {\n // hashed tenant copies use different ids\n }\n\n const result = await this.taskTypeData.query({ skip: 0, take: 200 });\n return (\n asItems<TaskTypeRow>(result).find(\n (row) => row.workflowConfig?.workflowName?.trim() === DOCUMENT_REVIEW_WORKFLOW_NAME,\n ) ?? null\n );\n }\n\n private async loadStatuses(taskTypeId: string): Promise<TaskStatusRow[]> {\n const result = await this.taskStatusData.query({\n skip: 0,\n take: 50,\n filter: { field: 'taskTypeId', operator: { type: 'equal' }, value: taskTypeId },\n });\n const rows = asItems<TaskStatusRow>(result);\n return rows.some((row) => row.taskTypeId === taskTypeId)\n ? rows.filter((row) => row.taskTypeId === taskTypeId)\n : rows;\n }\n\n private async showLoading(): Promise<LoadingDialogRef> {\n const [title, text] = await Promise.all([\n this.translationService.translateAsync(`${I18N}.loading.title`),\n this.translationService.translateAsync(`${I18N}.loading.description`),\n ]);\n return this.loadingDialog.show({\n title,\n mode: 'indeterminate',\n progressColor: 'primary',\n text,\n }) as LoadingDialogRef;\n }\n\n private async toastError(key: string, detail?: string): Promise<void> {\n const [title, fallback] = await Promise.all([\n this.translationService.translateAsync(`${I18N}.errors.title`),\n this.translationService.translateAsync(`${I18N}.${key}`),\n ]);\n this.toastService.show({\n color: 'danger',\n title,\n content: detail?.trim() || fallback,\n closeButton: true,\n timeOut: 5000,\n });\n }\n\n private async toastWarning(key: string): Promise<void> {\n const [title, content] = await Promise.all([\n this.translationService.translateAsync(`${I18N}.warnings.title`),\n this.translationService.translateAsync(`${I18N}.${key}`),\n ]);\n this.toastService.show({\n color: 'warning',\n title,\n content,\n closeButton: true,\n timeOut: 5000,\n });\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;AAyFA;AAEA;AAEA,MAAM,WAAW,GAAG,gBAAgB;AACpC,MAAM,WAAW,GAAG,MAAM;AAC1B,MAAM,gBAAgB,GAAG,CAAA,EAAG,WAAW,CAAA,CAAA,EAAI,WAAW,EAAE;AACxD,MAAM,gBAAgB,GAAG,UAAU;AACnC,MAAM,kBAAkB,GAAG,YAAY;AACvC,MAAM,sBAAsB,GAAG,gBAAgB;AAC/C,MAAM,6BAA6B,GAAG,iBAAiB;AACvD,MAA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