@acorex/modules 21.0.0-next.16 → 21.0.0-next.18
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/data-management/index.d.ts +153 -9
- package/document-management/index.d.ts +167 -374
- package/fesm2022/acorex-modules-common.mjs +11 -3
- package/fesm2022/acorex-modules-common.mjs.map +1 -1
- package/fesm2022/acorex-modules-content-management.mjs +15 -4
- package/fesm2022/acorex-modules-content-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-data-management.mjs +1877 -1648
- package/fesm2022/acorex-modules-data-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-ovwhHP2n.mjs → acorex-modules-document-management-drive-choose.component-BOeZ9mpL.mjs} +3 -7
- package/fesm2022/acorex-modules-document-management-drive-choose.component-BOeZ9mpL.mjs.map +1 -0
- package/fesm2022/acorex-modules-document-management.mjs +655 -2995
- package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-BDSyXKSF.mjs → acorex-modules-human-capital-management-leave-request.entity-CviI9xJC.mjs} +2 -2
- package/fesm2022/acorex-modules-human-capital-management-leave-request.entity-CviI9xJC.mjs.map +1 -0
- package/fesm2022/acorex-modules-human-capital-management.mjs +350 -695
- package/fesm2022/acorex-modules-human-capital-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-person-core-education-level.entity-BiXdPA-Z.mjs +120 -0
- package/fesm2022/acorex-modules-person-core-education-level.entity-BiXdPA-Z.mjs.map +1 -0
- package/fesm2022/acorex-modules-person-core-marital-status.entity-j6sMTtTS.mjs +120 -0
- package/fesm2022/acorex-modules-person-core-marital-status.entity-j6sMTtTS.mjs.map +1 -0
- package/fesm2022/acorex-modules-person-core-person-identifier-type.entity-BIFiRZ2d.mjs +191 -0
- package/fesm2022/acorex-modules-person-core-person-identifier-type.entity-BIFiRZ2d.mjs.map +1 -0
- package/fesm2022/acorex-modules-person-core-person-relationship-type.entity-2qysKjU5.mjs +119 -0
- package/fesm2022/acorex-modules-person-core-person-relationship-type.entity-2qysKjU5.mjs.map +1 -0
- package/fesm2022/acorex-modules-person-core.mjs +290 -0
- package/fesm2022/acorex-modules-person-core.mjs.map +1 -0
- package/fesm2022/{acorex-modules-person-management-person-identifier.entity-CI8u0Ro6.mjs → acorex-modules-person-management-person-identifier.entity-HBmiUahC.mjs} +4 -3
- package/fesm2022/acorex-modules-person-management-person-identifier.entity-HBmiUahC.mjs.map +1 -0
- package/fesm2022/{acorex-modules-person-management-person-relationship.entity-DK3mYVFv.mjs → acorex-modules-person-management-person-relationship.entity-DbcXasEe.mjs} +4 -3
- package/fesm2022/acorex-modules-person-management-person-relationship.entity-DbcXasEe.mjs.map +1 -0
- package/fesm2022/acorex-modules-person-management.mjs +11 -259
- package/fesm2022/acorex-modules-person-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-task-management-task-board.page-CuP9U1h8.mjs → acorex-modules-task-management-task-board.page-BOOY3qla.mjs} +47 -54
- package/fesm2022/acorex-modules-task-management-task-board.page-BOOY3qla.mjs.map +1 -0
- package/fesm2022/acorex-modules-task-management.mjs +39 -11
- package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-workflow-management-activity-definition.entity-BbBEPTBa.mjs +258 -0
- package/fesm2022/acorex-modules-workflow-management-activity-definition.entity-BbBEPTBa.mjs.map +1 -0
- package/fesm2022/acorex-modules-workflow-management-workflow-definition.entity-nJMBL0qt.mjs +371 -0
- package/fesm2022/acorex-modules-workflow-management-workflow-definition.entity-nJMBL0qt.mjs.map +1 -0
- package/fesm2022/acorex-modules-workflow-management-workflow-instance.entity-Pso0oRN5.mjs +313 -0
- package/fesm2022/acorex-modules-workflow-management-workflow-instance.entity-Pso0oRN5.mjs.map +1 -0
- package/fesm2022/acorex-modules-workflow-management.mjs +710 -2536
- package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
- package/human-capital-management/index.d.ts +19 -79
- package/package.json +14 -10
- package/person-core/index.d.ts +117 -0
- package/person-management/index.d.ts +1 -25
- package/task-management/index.d.ts +12 -1
- package/workflow-management/index.d.ts +220 -265
- package/fesm2022/acorex-modules-document-management-drive-choose.component-ovwhHP2n.mjs.map +0 -1
- package/fesm2022/acorex-modules-human-capital-management-leave-request-task-popover.component-yGvT9kSL.mjs +0 -381
- package/fesm2022/acorex-modules-human-capital-management-leave-request-task-popover.component-yGvT9kSL.mjs.map +0 -1
- package/fesm2022/acorex-modules-human-capital-management-leave-request.entity-BDSyXKSF.mjs.map +0 -1
- package/fesm2022/acorex-modules-person-management-person-identifier-type.entity-VchCczk-.mjs +0 -498
- package/fesm2022/acorex-modules-person-management-person-identifier-type.entity-VchCczk-.mjs.map +0 -1
- package/fesm2022/acorex-modules-person-management-person-identifier.entity-CI8u0Ro6.mjs.map +0 -1
- package/fesm2022/acorex-modules-person-management-person-relationship.entity-DK3mYVFv.mjs.map +0 -1
- package/fesm2022/acorex-modules-task-management-task-board.page-CuP9U1h8.mjs.map +0 -1
- package/fesm2022/acorex-modules-workflow-management-cartable-page.component-Bso0XRkJ.mjs +0 -296
- package/fesm2022/acorex-modules-workflow-management-cartable-page.component-Bso0XRkJ.mjs.map +0 -1
- package/fesm2022/acorex-modules-workflow-management-index-xB36g4F1.mjs +0 -469
- package/fesm2022/acorex-modules-workflow-management-index-xB36g4F1.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AXPSessionService, AXPAuthGuard, AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
|
|
2
2
|
import { AXPEntityService, AXMEntityCrudServiceImpl, entityMasterCrudActions, entityMasterRecordActions, cloneLayoutArrays, ensureLayoutSection, ensureLayoutPropertyView, ensureListActions, actionExists, AXPEntityDefinitionRegistryService, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_STORAGE_MIDDLEWARE, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
|
3
3
|
import { AXPHookService, AXPPlatformScope, AXPDataGenerator, AXP_MODULE_MANIFEST_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXPDeviceService, resolvePlatformScopeKey, resolvePlatformScopeName } from '@acorex/platform/core';
|
|
4
|
-
import { AXPSearchCommandProvider, createAllQueryView,
|
|
4
|
+
import { AXPSearchCommandProvider, createAllQueryView, AXPFileTypeProviderService, AXP_FILE_TYPE_INFO_PROVIDER, AXPFileStorageService, AXPFilterOperatorMiddlewareService, AXPSettingsService, AXPLockService, UploadFromComputerActionProvider, AXP_FILE_ACTION_PROVIDER, AXPEntityCommandScope, AXP_MENU_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { Injectable, inject, Injector, NgModule, ChangeDetectionStrategy, Component, signal, computed, viewChild, input, effect, ViewEncapsulation, untracked, HostListener } from '@angular/core';
|
|
7
7
|
import * as i3$2 from '@acorex/core/translation';
|
|
@@ -10,7 +10,6 @@ import { firstValueFrom } from 'rxjs';
|
|
|
10
10
|
import * as i6 from '@acorex/platform/layout/widget-core';
|
|
11
11
|
import { AXPWidgetsCatalog, AXPValueWidgetComponent, AXPWidgetCoreModule, AXP_WIDGETS_ADVANCE_CATEGORY } from '@acorex/platform/layout/widget-core';
|
|
12
12
|
import { RouterModule, ROUTES, Router, ActivatedRoute } from '@angular/router';
|
|
13
|
-
import { set, castArray, get as get$1 } from 'lodash-es';
|
|
14
13
|
import { AXDataSource } from '@acorex/cdk/common';
|
|
15
14
|
import * as i7 from '@acorex/components/collapse';
|
|
16
15
|
import { AXCollapseModule } from '@acorex/components/collapse';
|
|
@@ -25,8 +24,15 @@ import { AXSelectBoxModule } from '@acorex/components/select-box';
|
|
|
25
24
|
import * as i2 from '@angular/forms';
|
|
26
25
|
import { FormsModule } from '@angular/forms';
|
|
27
26
|
import get from 'lodash-es/get';
|
|
28
|
-
import set
|
|
27
|
+
import set from 'lodash-es/set';
|
|
29
28
|
import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY } from '@acorex/platform/layout/widgets';
|
|
29
|
+
import { AXDialogService } from '@acorex/components/dialog';
|
|
30
|
+
import { AXPopupService } from '@acorex/components/popup';
|
|
31
|
+
import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
32
|
+
import * as i3$1 from '@acorex/platform/workflow';
|
|
33
|
+
import { AXPWorkflowService, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
34
|
+
import { AXFileService, AXFileModule } from '@acorex/core/file';
|
|
35
|
+
import { castArray, get as get$1, set as set$1 } from 'lodash-es';
|
|
30
36
|
import * as i2$2 from '@acorex/components/media-viewer';
|
|
31
37
|
import { AXMediaViewerModule } from '@acorex/components/media-viewer';
|
|
32
38
|
import * as i1$1 from '@acorex/components/button';
|
|
@@ -42,12 +48,6 @@ import { AXPStateMessageComponent, AXPThemeLayoutBlockComponent } from '@acorex/
|
|
|
42
48
|
import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
|
|
43
49
|
import * as i1$2 from '@angular/common';
|
|
44
50
|
import { CommonModule } from '@angular/common';
|
|
45
|
-
import { AXDialogService } from '@acorex/components/dialog';
|
|
46
|
-
import { AXPopupService } from '@acorex/components/popup';
|
|
47
|
-
import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
48
|
-
import * as i3$1 from '@acorex/platform/workflow';
|
|
49
|
-
import { AXPWorkflowService, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
50
|
-
import { AXFileService, AXFileModule } from '@acorex/core/file';
|
|
51
51
|
import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
|
|
52
52
|
import { AXUploaderService } from '@acorex/cdk/uploader';
|
|
53
53
|
import { AXBadgeModule } from '@acorex/components/badge';
|
|
@@ -72,18 +72,6 @@ const RootConfig = {
|
|
|
72
72
|
icon: 'fa-light fa-books',
|
|
73
73
|
},
|
|
74
74
|
entities: {
|
|
75
|
-
documentRelated: {
|
|
76
|
-
name: 'DocumentRelated',
|
|
77
|
-
title: `@${config.i18n}:entities.document.title`,
|
|
78
|
-
titlePlural: `@${config.i18n}:entities.document.title-plural`,
|
|
79
|
-
icon: 'fa-light fa-default',
|
|
80
|
-
},
|
|
81
|
-
review: {
|
|
82
|
-
name: 'Review',
|
|
83
|
-
title: `@${config.i18n}:entities.review.title`,
|
|
84
|
-
titlePlural: `@${config.i18n}:entities.review.title-plural`,
|
|
85
|
-
icon: 'fa-light fa-file-pen',
|
|
86
|
-
},
|
|
87
75
|
folder: {
|
|
88
76
|
name: 'Folder',
|
|
89
77
|
title: `@${config.i18n}:entities.folder.title`,
|
|
@@ -102,24 +90,6 @@ const RootConfig = {
|
|
|
102
90
|
titlePlural: `@${config.i18n}:entities.document-type.title-plural`,
|
|
103
91
|
icon: 'fa-light fa-books',
|
|
104
92
|
},
|
|
105
|
-
documentTypeMetaDefinition: {
|
|
106
|
-
name: 'documentTypeMeta',
|
|
107
|
-
title: `@${config.i18n}:entities.document-type-meta.title`,
|
|
108
|
-
titlePlural: `@${config.i18n}:entities.document-type-meta.title-plural`,
|
|
109
|
-
icon: 'fa-light fa-meta',
|
|
110
|
-
},
|
|
111
|
-
documentTypeMetaValue: {
|
|
112
|
-
name: 'documentTypeMetaValue',
|
|
113
|
-
title: `@${config.i18n}:entities.document-type-meta-value.title`,
|
|
114
|
-
titlePlural: `@${config.i18n}:entities.document-type-meta-value.title-plural`,
|
|
115
|
-
icon: 'fa-light fa-meta',
|
|
116
|
-
},
|
|
117
|
-
documentTypeStatus: {
|
|
118
|
-
name: 'documentTypeStatus',
|
|
119
|
-
title: `@${config.i18n}:entities.document-type-status.title`,
|
|
120
|
-
titlePlural: `@${config.i18n}:entities.document-type-status.title-plural`,
|
|
121
|
-
icon: 'fa-light fa-status',
|
|
122
|
-
},
|
|
123
93
|
},
|
|
124
94
|
};
|
|
125
95
|
|
|
@@ -194,13 +164,6 @@ const AXMPermissionsKeys = {
|
|
|
194
164
|
Delete: 'DocumentManagement:Permission:Driver.Delete',
|
|
195
165
|
Create: 'DocumentManagement:Permission:Driver.Create',
|
|
196
166
|
},
|
|
197
|
-
Review: {
|
|
198
|
-
Management: 'DocumentManagement:Permission:Review.Management',
|
|
199
|
-
View: 'DocumentManagement:Permission:Review.View',
|
|
200
|
-
Edit: 'DocumentManagement:Permission:Review.Edit',
|
|
201
|
-
Delete: 'DocumentManagement:Permission:Review.Delete',
|
|
202
|
-
Create: 'DocumentManagement:Permission:Review.Create',
|
|
203
|
-
},
|
|
204
167
|
},
|
|
205
168
|
};
|
|
206
169
|
|
|
@@ -226,13 +189,6 @@ class AXMPermissionDefinitionProvider {
|
|
|
226
189
|
.addChild(keys.Driver.Edit, await trans('driver.edit.title'), await trans('driver.edit.description'))
|
|
227
190
|
.addChild(keys.Driver.Delete, await trans('driver.delete.title'), await trans('driver.delete.description'))
|
|
228
191
|
.addChild(keys.Driver.Create, await trans('driver.create.title'), await trans('driver.create.description'))
|
|
229
|
-
.endPermission()
|
|
230
|
-
//
|
|
231
|
-
.addPermission(keys.Review.Management, await trans('review.manage.title'), await trans('review.manage.description'))
|
|
232
|
-
.addChild(keys.Review.View, await trans('review.view.title'), await trans('review.view.description'))
|
|
233
|
-
.addChild(keys.Review.Edit, await trans('review.edit.title'), await trans('review.edit.description'))
|
|
234
|
-
.addChild(keys.Review.Delete, await trans('review.delete.title'), await trans('review.delete.description'))
|
|
235
|
-
.addChild(keys.Review.Create, await trans('review.create.title'), await trans('review.create.description'))
|
|
236
192
|
.endPermission();
|
|
237
193
|
//
|
|
238
194
|
}
|
|
@@ -333,25 +289,21 @@ class AXMEntityProvider {
|
|
|
333
289
|
}));
|
|
334
290
|
}
|
|
335
291
|
async get(moduleName, entityName) {
|
|
336
|
-
if (moduleName
|
|
292
|
+
if (moduleName === RootConfig.module.name) {
|
|
337
293
|
switch (entityName) {
|
|
338
|
-
case RootConfig.entities.document.name:
|
|
339
|
-
return (await Promise.resolve().then(function () { return index; })).documentFactory(this.injector);
|
|
340
294
|
case RootConfig.entities.documentType.name:
|
|
341
295
|
return (await Promise.resolve().then(function () { return index; })).documentTypeFactory(this.injector);
|
|
342
296
|
case RootConfig.entities.folder.name:
|
|
343
|
-
return (await Promise.resolve().then(function () { return
|
|
344
|
-
case RootConfig.entities.
|
|
345
|
-
return (await Promise.resolve().then(function () { return
|
|
346
|
-
case RootConfig.entities.documentRelated.name:
|
|
347
|
-
return (await Promise.resolve().then(function () { return index; })).documentRelatedFactory(this.injector);
|
|
297
|
+
return (await Promise.resolve().then(function () { return folder_entity; })).folderEntityFactory(this.injector);
|
|
298
|
+
case RootConfig.entities.document.name:
|
|
299
|
+
return (await Promise.resolve().then(function () { return document_entity; })).documentEntityFactory(this.injector);
|
|
348
300
|
}
|
|
349
301
|
}
|
|
350
302
|
return null;
|
|
351
303
|
}
|
|
352
304
|
async list() {
|
|
353
305
|
const m = RootConfig.module.name;
|
|
354
|
-
const entities =
|
|
306
|
+
const entities = [RootConfig.entities.documentType];
|
|
355
307
|
return Promise.resolve(entities.map((e) => ({ name: e.name, module: m })));
|
|
356
308
|
}
|
|
357
309
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMEntityProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -380,6 +332,37 @@ class AXMSearchCommandProvider extends AXPSearchCommandProvider {
|
|
|
380
332
|
}
|
|
381
333
|
}
|
|
382
334
|
|
|
335
|
+
/**
|
|
336
|
+
* Minimal entity definition for Document so the entity registry can resolve
|
|
337
|
+
* DocumentManagement.Document. Used by AXMDocumentService (AXMEntityCrudServiceImpl).
|
|
338
|
+
* No list/form UI; documents are handled by document-explorer.
|
|
339
|
+
*/
|
|
340
|
+
async function documentEntityFactory(_injector) {
|
|
341
|
+
const entityDef = {
|
|
342
|
+
module: RootConfig.module.name,
|
|
343
|
+
name: RootConfig.entities.document.name,
|
|
344
|
+
title: RootConfig.entities.document.title,
|
|
345
|
+
parentKey: 'parentId',
|
|
346
|
+
formats: {
|
|
347
|
+
individual: RootConfig.entities.document.title,
|
|
348
|
+
plural: RootConfig.entities.document.titlePlural,
|
|
349
|
+
searchResult: {
|
|
350
|
+
title: '{{ title }}',
|
|
351
|
+
description: RootConfig.module.title,
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
relatedEntities: [],
|
|
355
|
+
groups: [],
|
|
356
|
+
properties: [],
|
|
357
|
+
};
|
|
358
|
+
return entityDef;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
var document_entity = /*#__PURE__*/Object.freeze({
|
|
362
|
+
__proto__: null,
|
|
363
|
+
documentEntityFactory: documentEntityFactory
|
|
364
|
+
});
|
|
365
|
+
|
|
383
366
|
class AXMDocumentService extends AXMEntityCrudServiceImpl {
|
|
384
367
|
}
|
|
385
368
|
class AXMDocumentServiceImpl extends AXMDocumentService {
|
|
@@ -393,23 +376,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
393
376
|
type: Injectable
|
|
394
377
|
}], ctorParameters: () => [] });
|
|
395
378
|
|
|
396
|
-
|
|
397
|
-
__proto__: null,
|
|
398
|
-
AXMDocumentService: AXMDocumentService,
|
|
399
|
-
AXMDocumentServiceImpl: AXMDocumentServiceImpl
|
|
400
|
-
});
|
|
401
|
-
|
|
402
|
-
async function documentFactory(injector) {
|
|
403
|
-
const dataService = injector.get(AXMDocumentService);
|
|
379
|
+
async function documentTypeFactory(injector) {
|
|
404
380
|
const i18n = RootConfig.config.i18n;
|
|
405
381
|
const entityDef = {
|
|
406
382
|
module: RootConfig.module.name,
|
|
407
|
-
name: RootConfig.entities.
|
|
408
|
-
title: RootConfig.entities.
|
|
409
|
-
icon: RootConfig.entities.document.icon,
|
|
383
|
+
name: RootConfig.entities.documentType.name,
|
|
384
|
+
title: RootConfig.entities.documentType.title,
|
|
410
385
|
formats: {
|
|
411
|
-
individual: RootConfig.entities.
|
|
412
|
-
plural: RootConfig.entities.
|
|
386
|
+
individual: RootConfig.entities.documentType.title,
|
|
387
|
+
plural: RootConfig.entities.documentType.titlePlural,
|
|
413
388
|
searchResult: {
|
|
414
389
|
title: '{{ title }}',
|
|
415
390
|
description: RootConfig.module.title,
|
|
@@ -418,62 +393,34 @@ async function documentFactory(injector) {
|
|
|
418
393
|
plugins: [
|
|
419
394
|
{ name: 'history' },
|
|
420
395
|
{
|
|
421
|
-
name: '
|
|
422
|
-
options: {
|
|
423
|
-
multiple: false,
|
|
424
|
-
field: 'fileId',
|
|
425
|
-
},
|
|
396
|
+
name: 'meta-data-selector'
|
|
426
397
|
},
|
|
427
|
-
{ name: 'meta-data-form', options: { path: 'typeId' } }
|
|
428
398
|
],
|
|
429
|
-
relatedEntities: [
|
|
399
|
+
relatedEntities: [],
|
|
400
|
+
groups: [
|
|
430
401
|
{
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
{
|
|
434
|
-
name: 'documentId',
|
|
435
|
-
operator: {
|
|
436
|
-
type: 'equal',
|
|
437
|
-
},
|
|
438
|
-
value: '{{context.eval("id")}}',
|
|
439
|
-
},
|
|
440
|
-
],
|
|
441
|
-
// hidden: '{{context.eval("toggle")}}',
|
|
442
|
-
actions: [],
|
|
402
|
+
id: 'basic-info',
|
|
403
|
+
title: RootConfig.entities.documentType.title,
|
|
443
404
|
},
|
|
444
|
-
],
|
|
445
|
-
groups: [
|
|
446
405
|
{
|
|
447
|
-
id: '
|
|
448
|
-
title:
|
|
406
|
+
id: 'management',
|
|
407
|
+
title: `@${i18n}:terms.common.management`,
|
|
449
408
|
},
|
|
450
409
|
],
|
|
451
410
|
properties: [
|
|
452
411
|
{
|
|
453
412
|
name: 'name',
|
|
454
413
|
title: '@general:terms.common.name',
|
|
455
|
-
groupId: '
|
|
414
|
+
groupId: 'basic-info',
|
|
456
415
|
options: {
|
|
457
416
|
sort: {
|
|
458
417
|
enabled: true,
|
|
459
418
|
},
|
|
460
|
-
filter: {
|
|
461
|
-
inline: {
|
|
462
|
-
enabled: true,
|
|
463
|
-
},
|
|
464
|
-
advance: {
|
|
465
|
-
enabled: true,
|
|
466
|
-
},
|
|
467
|
-
},
|
|
468
419
|
},
|
|
469
420
|
schema: {
|
|
470
421
|
dataType: 'string',
|
|
471
|
-
readonly: true,
|
|
472
422
|
interface: {
|
|
473
423
|
type: AXPWidgetsCatalog.text,
|
|
474
|
-
options: {
|
|
475
|
-
placeholder: '@general:terms.common.name',
|
|
476
|
-
},
|
|
477
424
|
},
|
|
478
425
|
},
|
|
479
426
|
validations: [
|
|
@@ -483,17 +430,13 @@ async function documentFactory(injector) {
|
|
|
483
430
|
],
|
|
484
431
|
},
|
|
485
432
|
{
|
|
486
|
-
name: '
|
|
487
|
-
title: '@general:terms.common.
|
|
488
|
-
groupId: '
|
|
433
|
+
name: 'title',
|
|
434
|
+
title: '@general:terms.common.title',
|
|
435
|
+
groupId: 'basic-info',
|
|
489
436
|
schema: {
|
|
490
437
|
dataType: 'string',
|
|
491
|
-
readonly: true,
|
|
492
438
|
interface: {
|
|
493
|
-
type: AXPWidgetsCatalog.
|
|
494
|
-
options: {
|
|
495
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.documentType.name}`,
|
|
496
|
-
},
|
|
439
|
+
type: AXPWidgetsCatalog.text,
|
|
497
440
|
},
|
|
498
441
|
},
|
|
499
442
|
validations: [
|
|
@@ -503,110 +446,130 @@ async function documentFactory(injector) {
|
|
|
503
446
|
],
|
|
504
447
|
},
|
|
505
448
|
{
|
|
506
|
-
name: '
|
|
507
|
-
title: `@${i18n}:terms.
|
|
508
|
-
groupId: '
|
|
449
|
+
name: 'maxSize',
|
|
450
|
+
title: `@${i18n}:terms.document.max-size`,
|
|
451
|
+
groupId: 'basic-info',
|
|
509
452
|
schema: {
|
|
510
453
|
dataType: 'number',
|
|
511
|
-
readonly: true,
|
|
512
454
|
interface: {
|
|
513
|
-
type: AXPWidgetsCatalog.
|
|
514
|
-
options: {
|
|
455
|
+
type: AXPWidgetsCatalog.numberUnit,
|
|
456
|
+
options: {
|
|
457
|
+
textField: 'name',
|
|
458
|
+
valueField: 'value',
|
|
459
|
+
dataSource: [
|
|
460
|
+
{
|
|
461
|
+
name: 'kb',
|
|
462
|
+
value: 'KB',
|
|
463
|
+
calUnit: 1,
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
name: 'mb',
|
|
467
|
+
value: 'MB',
|
|
468
|
+
calUnit: 1024,
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
name: 'gb',
|
|
472
|
+
value: 'GB',
|
|
473
|
+
calUnit: 1024 * 1024,
|
|
474
|
+
},
|
|
475
|
+
],
|
|
476
|
+
mainUnit: 'kb',
|
|
477
|
+
},
|
|
515
478
|
},
|
|
516
479
|
},
|
|
480
|
+
validations: [
|
|
481
|
+
{
|
|
482
|
+
rule: 'required',
|
|
483
|
+
},
|
|
484
|
+
],
|
|
517
485
|
},
|
|
518
486
|
{
|
|
519
|
-
name: '
|
|
520
|
-
title: `@${i18n}:terms.
|
|
487
|
+
name: 'isEncrypted',
|
|
488
|
+
title: `@${i18n}:terms.document.is-encrypted`,
|
|
489
|
+
groupId: 'basic-info',
|
|
521
490
|
schema: {
|
|
522
|
-
dataType: '
|
|
523
|
-
readonly: true,
|
|
491
|
+
dataType: 'boolean',
|
|
524
492
|
interface: {
|
|
525
|
-
type: AXPWidgetsCatalog.
|
|
526
|
-
options: {},
|
|
493
|
+
type: AXPWidgetsCatalog.toggle,
|
|
527
494
|
},
|
|
528
495
|
},
|
|
529
496
|
},
|
|
530
497
|
{
|
|
531
|
-
name: '
|
|
532
|
-
title: `@${i18n}:terms.
|
|
533
|
-
groupId: '
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
498
|
+
name: 'enableExpiration',
|
|
499
|
+
title: `@${i18n}:terms.document.enable-expiration`,
|
|
500
|
+
groupId: 'management',
|
|
501
|
+
schema: {
|
|
502
|
+
dataType: 'boolean',
|
|
503
|
+
interface: {
|
|
504
|
+
type: AXPWidgetsCatalog.toggle,
|
|
537
505
|
},
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
name: 'requiresReview',
|
|
510
|
+
title: `@${i18n}:terms.document.requires-review`,
|
|
511
|
+
groupId: 'management',
|
|
512
|
+
schema: {
|
|
513
|
+
dataType: 'boolean',
|
|
514
|
+
interface: {
|
|
515
|
+
type: AXPWidgetsCatalog.toggle,
|
|
545
516
|
},
|
|
546
517
|
},
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
name: 'enableVersioning',
|
|
521
|
+
title: `@${i18n}:terms.document.enable-versioning`,
|
|
522
|
+
groupId: 'management',
|
|
547
523
|
schema: {
|
|
548
|
-
dataType: '
|
|
549
|
-
readonly: true,
|
|
524
|
+
dataType: 'boolean',
|
|
550
525
|
interface: {
|
|
551
|
-
type: AXPWidgetsCatalog.
|
|
526
|
+
type: AXPWidgetsCatalog.toggle,
|
|
552
527
|
options: {
|
|
553
|
-
|
|
528
|
+
disabled: '{{ !!context.eval("requiresReview") }}',
|
|
554
529
|
},
|
|
530
|
+
triggers: [
|
|
531
|
+
{
|
|
532
|
+
event: "{{ events.context('requiresReview') }}",
|
|
533
|
+
action: "{{ context.set('enableVersioning', true) }}",
|
|
534
|
+
},
|
|
535
|
+
],
|
|
555
536
|
},
|
|
556
537
|
},
|
|
557
538
|
},
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
{
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
{
|
|
580
|
-
field: 'documentType.requiresReview',
|
|
581
|
-
operator: { type: 'equal' },
|
|
582
|
-
value: true,
|
|
583
|
-
},
|
|
584
|
-
];
|
|
585
|
-
// Check if e.filter has filters array with items
|
|
586
|
-
const hasAdditionalFilters = filter?.filters && Array.isArray(filter.filters) && filter.filters.length > 0;
|
|
587
|
-
// Combine filters if additional filters exist
|
|
588
|
-
const allFilters = hasAdditionalFilters
|
|
589
|
-
? [...baseFilters, ...filter.filters]
|
|
590
|
-
: baseFilters;
|
|
591
|
-
const x = await dataService.query({
|
|
592
|
-
skip: e.skip,
|
|
593
|
-
take: e.take,
|
|
594
|
-
filter: {
|
|
595
|
-
logic: 'and',
|
|
596
|
-
filters: allFilters,
|
|
597
|
-
},
|
|
598
|
-
});
|
|
599
|
-
return x;
|
|
539
|
+
// {
|
|
540
|
+
// name: 'meta',
|
|
541
|
+
// title: `t("metaTitle", { scope: "${i18n}" })`,
|
|
542
|
+
// groupId: 'section',
|
|
543
|
+
// schema: {
|
|
544
|
+
// dataType: 'object',
|
|
545
|
+
// interface: {
|
|
546
|
+
// type: 'meta-selector-editor',
|
|
547
|
+
// },
|
|
548
|
+
// },
|
|
549
|
+
// },
|
|
550
|
+
{
|
|
551
|
+
name: 'type',
|
|
552
|
+
title: `@${i18n}:terms.common.type`,
|
|
553
|
+
groupId: 'basic-info',
|
|
554
|
+
schema: {
|
|
555
|
+
dataType: 'object',
|
|
556
|
+
interface: {
|
|
557
|
+
type: AXPWidgetsCatalog.fileTypeExtension,
|
|
558
|
+
options: {},
|
|
559
|
+
},
|
|
600
560
|
},
|
|
601
|
-
type: AXPEntityQueryType.List,
|
|
602
561
|
},
|
|
603
|
-
|
|
562
|
+
],
|
|
563
|
+
columns: [{ name: 'name' }, { name: 'title' }],
|
|
604
564
|
interfaces: {
|
|
605
565
|
master: {
|
|
606
566
|
create: {
|
|
607
567
|
sections: [
|
|
608
568
|
{
|
|
609
|
-
id: '
|
|
569
|
+
id: 'basic-info',
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
id: 'management',
|
|
610
573
|
},
|
|
611
574
|
],
|
|
612
575
|
properties: [
|
|
@@ -621,83 +584,27 @@ async function documentFactory(injector) {
|
|
|
621
584
|
},
|
|
622
585
|
},
|
|
623
586
|
{
|
|
624
|
-
name: '
|
|
587
|
+
name: 'title',
|
|
625
588
|
layout: {
|
|
626
589
|
positions: {
|
|
627
590
|
lg: {
|
|
628
|
-
colSpan:
|
|
591
|
+
colSpan: 6,
|
|
629
592
|
},
|
|
630
593
|
},
|
|
631
594
|
},
|
|
632
595
|
},
|
|
633
|
-
],
|
|
634
|
-
},
|
|
635
|
-
// update: {
|
|
636
|
-
// sections: [
|
|
637
|
-
// {
|
|
638
|
-
// id: 'section',
|
|
639
|
-
// },
|
|
640
|
-
// ],
|
|
641
|
-
// properties: [
|
|
642
|
-
// {
|
|
643
|
-
// name: 'name',
|
|
644
|
-
// layout: {
|
|
645
|
-
// positions: {
|
|
646
|
-
// lg: {
|
|
647
|
-
// colSpan: 6,
|
|
648
|
-
// },
|
|
649
|
-
// },
|
|
650
|
-
// },
|
|
651
|
-
// },
|
|
652
|
-
// {
|
|
653
|
-
// name: 'type',
|
|
654
|
-
// layout: {
|
|
655
|
-
// positions: {
|
|
656
|
-
// lg: {
|
|
657
|
-
// colSpan: 12,
|
|
658
|
-
// },
|
|
659
|
-
// },
|
|
660
|
-
// },
|
|
661
|
-
// },
|
|
662
|
-
// {
|
|
663
|
-
// name: 'metaData',
|
|
664
|
-
// layout: {
|
|
665
|
-
// positions: {
|
|
666
|
-
// lg: {
|
|
667
|
-
// colSpan: 12,
|
|
668
|
-
// },
|
|
669
|
-
// },
|
|
670
|
-
// },
|
|
671
|
-
// },
|
|
672
|
-
// {
|
|
673
|
-
// name: 'file',
|
|
674
|
-
// layout: {
|
|
675
|
-
// positions: {
|
|
676
|
-
// lg: {
|
|
677
|
-
// colSpan: 12,
|
|
678
|
-
// },
|
|
679
|
-
// },
|
|
680
|
-
// },
|
|
681
|
-
// },
|
|
682
|
-
// ],
|
|
683
|
-
// },
|
|
684
|
-
single: {
|
|
685
|
-
title: '{{title}}',
|
|
686
|
-
sections: [
|
|
687
596
|
{
|
|
688
|
-
|
|
597
|
+
name: 'maxSize',
|
|
689
598
|
layout: {
|
|
690
599
|
positions: {
|
|
691
600
|
lg: {
|
|
692
|
-
colSpan:
|
|
601
|
+
colSpan: 6,
|
|
693
602
|
},
|
|
694
603
|
},
|
|
695
604
|
},
|
|
696
605
|
},
|
|
697
|
-
],
|
|
698
|
-
properties: [
|
|
699
606
|
{
|
|
700
|
-
name: '
|
|
607
|
+
name: 'isEncrypted',
|
|
701
608
|
layout: {
|
|
702
609
|
positions: {
|
|
703
610
|
lg: {
|
|
@@ -707,7 +614,7 @@ async function documentFactory(injector) {
|
|
|
707
614
|
},
|
|
708
615
|
},
|
|
709
616
|
{
|
|
710
|
-
name: '
|
|
617
|
+
name: 'enableExpiration',
|
|
711
618
|
layout: {
|
|
712
619
|
positions: {
|
|
713
620
|
lg: {
|
|
@@ -716,28 +623,8 @@ async function documentFactory(injector) {
|
|
|
716
623
|
},
|
|
717
624
|
},
|
|
718
625
|
},
|
|
719
|
-
// {
|
|
720
|
-
// name: 'fileId',
|
|
721
|
-
// layout: {
|
|
722
|
-
// positions: {
|
|
723
|
-
// lg: {
|
|
724
|
-
// colSpan: 12,
|
|
725
|
-
// },
|
|
726
|
-
// },
|
|
727
|
-
// },
|
|
728
|
-
// },
|
|
729
|
-
// {
|
|
730
|
-
// name: 'file',
|
|
731
|
-
// layout: {
|
|
732
|
-
// positions: {
|
|
733
|
-
// lg: {
|
|
734
|
-
// colSpan: 12,
|
|
735
|
-
// },
|
|
736
|
-
// },
|
|
737
|
-
// },
|
|
738
|
-
// },
|
|
739
626
|
{
|
|
740
|
-
name: '
|
|
627
|
+
name: 'requiresReview',
|
|
741
628
|
layout: {
|
|
742
629
|
positions: {
|
|
743
630
|
lg: {
|
|
@@ -747,7 +634,7 @@ async function documentFactory(injector) {
|
|
|
747
634
|
},
|
|
748
635
|
},
|
|
749
636
|
{
|
|
750
|
-
name: '
|
|
637
|
+
name: 'enableVersioning',
|
|
751
638
|
layout: {
|
|
752
639
|
positions: {
|
|
753
640
|
lg: {
|
|
@@ -756,2285 +643,135 @@ async function documentFactory(injector) {
|
|
|
756
643
|
},
|
|
757
644
|
},
|
|
758
645
|
},
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
646
|
+
// {
|
|
647
|
+
// name: 'meta',
|
|
648
|
+
// layout: {
|
|
649
|
+
// positions: {
|
|
650
|
+
// lg: {
|
|
651
|
+
// colSpan: 12,
|
|
652
|
+
// },
|
|
653
|
+
// },
|
|
654
|
+
// },
|
|
655
|
+
// },
|
|
764
656
|
{
|
|
765
|
-
|
|
766
|
-
command: 'open-entity',
|
|
767
|
-
priority: 'secondary',
|
|
768
|
-
type: 'view',
|
|
769
|
-
default: true,
|
|
770
|
-
scope: AXPEntityCommandScope.Individual,
|
|
771
|
-
},
|
|
772
|
-
],
|
|
773
|
-
views: [
|
|
774
|
-
createAllQueryView({ sorts: [{ name: 'name', dir: 'asc' }] }),
|
|
775
|
-
createQueryView('Draft', `@${i18n}:terms.workflow.draft`, true, {
|
|
776
|
-
conditions: [
|
|
777
|
-
{
|
|
778
|
-
name: 'status',
|
|
779
|
-
operator: {
|
|
780
|
-
type: 'equal',
|
|
781
|
-
},
|
|
782
|
-
value: 'Draft',
|
|
783
|
-
},
|
|
784
|
-
],
|
|
785
|
-
}),
|
|
786
|
-
createQueryView('PendingReview', `@${i18n}:terms.workflow.pending`, true, {
|
|
787
|
-
conditions: [
|
|
788
|
-
{
|
|
789
|
-
name: 'status',
|
|
790
|
-
operator: {
|
|
791
|
-
type: 'equal',
|
|
792
|
-
},
|
|
793
|
-
value: 'PendingReview',
|
|
794
|
-
},
|
|
795
|
-
],
|
|
796
|
-
}),
|
|
797
|
-
createQueryView('Reviewed', `@${i18n}:terms.workflow.reviewed`, true, {
|
|
798
|
-
conditions: [
|
|
799
|
-
{
|
|
800
|
-
name: 'status',
|
|
801
|
-
operator: {
|
|
802
|
-
type: 'equal',
|
|
803
|
-
},
|
|
804
|
-
value: 'Reviewed',
|
|
805
|
-
},
|
|
806
|
-
],
|
|
807
|
-
}),
|
|
808
|
-
],
|
|
809
|
-
},
|
|
810
|
-
},
|
|
811
|
-
},
|
|
812
|
-
};
|
|
813
|
-
return entityDef;
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
class AXMDocumentManagementDocumentEntityModule {
|
|
817
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
818
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentEntityModule }); }
|
|
819
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentEntityModule, providers: [
|
|
820
|
-
{
|
|
821
|
-
provide: AXMDocumentService,
|
|
822
|
-
useClass: AXMDocumentServiceImpl,
|
|
823
|
-
},
|
|
824
|
-
] }); }
|
|
825
|
-
}
|
|
826
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentEntityModule, decorators: [{
|
|
827
|
-
type: NgModule,
|
|
828
|
-
args: [{
|
|
829
|
-
imports: [],
|
|
830
|
-
exports: [],
|
|
831
|
-
declarations: [],
|
|
832
|
-
providers: [
|
|
833
|
-
{
|
|
834
|
-
provide: AXMDocumentService,
|
|
835
|
-
useClass: AXMDocumentServiceImpl,
|
|
836
|
-
},
|
|
837
|
-
],
|
|
838
|
-
}]
|
|
839
|
-
}] });
|
|
840
|
-
|
|
841
|
-
function getNextStatus(options) {
|
|
842
|
-
const { current, requiresReview, reviewFirst, reviewResult, } = options;
|
|
843
|
-
switch (current) {
|
|
844
|
-
case 'Draft':
|
|
845
|
-
if (requiresReview)
|
|
846
|
-
return 'PendingReview';
|
|
847
|
-
return 'Completed';
|
|
848
|
-
case 'PendingReview':
|
|
849
|
-
if (reviewResult === 'rejected')
|
|
850
|
-
return 'Rejected';
|
|
851
|
-
if (reviewResult === 'approved') {
|
|
852
|
-
return 'Completed';
|
|
853
|
-
}
|
|
854
|
-
return null;
|
|
855
|
-
case 'Reviewed':
|
|
856
|
-
return 'Completed';
|
|
857
|
-
default:
|
|
858
|
-
return null;
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
const AXMDocumentWorkflowTransitionMap = {
|
|
862
|
-
Draft: ['PendingReview', 'Completed'],
|
|
863
|
-
PendingReview: ['Reviewed', 'Rejected'],
|
|
864
|
-
Rejected: ['PendingReview'], // پس از اصلاح
|
|
865
|
-
Reviewed: ['Completed', 'Distributed'],
|
|
866
|
-
Distributed: ['Completed'],
|
|
867
|
-
Completed: [],
|
|
868
|
-
};
|
|
869
|
-
function canTransition(from, to) {
|
|
870
|
-
return AXMDocumentWorkflowTransitionMap[from]?.includes(to) ?? false;
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
async function documentTypeFactory(injector) {
|
|
874
|
-
const i18n = RootConfig.config.i18n;
|
|
875
|
-
const entityDef = {
|
|
876
|
-
module: RootConfig.module.name,
|
|
877
|
-
name: RootConfig.entities.documentType.name,
|
|
878
|
-
title: RootConfig.entities.documentType.title,
|
|
879
|
-
formats: {
|
|
880
|
-
individual: RootConfig.entities.documentType.title,
|
|
881
|
-
plural: RootConfig.entities.documentType.titlePlural,
|
|
882
|
-
searchResult: {
|
|
883
|
-
title: '{{ title }}',
|
|
884
|
-
description: RootConfig.module.title,
|
|
885
|
-
},
|
|
886
|
-
},
|
|
887
|
-
plugins: [
|
|
888
|
-
{ name: 'history' },
|
|
889
|
-
{
|
|
890
|
-
name: 'meta-data-selector'
|
|
891
|
-
},
|
|
892
|
-
],
|
|
893
|
-
relatedEntities: [],
|
|
894
|
-
groups: [
|
|
895
|
-
{
|
|
896
|
-
id: 'basic-info',
|
|
897
|
-
title: RootConfig.entities.documentType.title,
|
|
898
|
-
},
|
|
899
|
-
{
|
|
900
|
-
id: 'management',
|
|
901
|
-
title: `@${i18n}:terms.common.management`,
|
|
902
|
-
},
|
|
903
|
-
],
|
|
904
|
-
properties: [
|
|
905
|
-
{
|
|
906
|
-
name: 'name',
|
|
907
|
-
title: '@general:terms.common.name',
|
|
908
|
-
groupId: 'basic-info',
|
|
909
|
-
options: {
|
|
910
|
-
sort: {
|
|
911
|
-
enabled: true,
|
|
912
|
-
},
|
|
913
|
-
},
|
|
914
|
-
schema: {
|
|
915
|
-
dataType: 'string',
|
|
916
|
-
interface: {
|
|
917
|
-
type: AXPWidgetsCatalog.text,
|
|
918
|
-
},
|
|
919
|
-
},
|
|
920
|
-
validations: [
|
|
921
|
-
{
|
|
922
|
-
rule: 'required',
|
|
923
|
-
},
|
|
924
|
-
],
|
|
925
|
-
},
|
|
926
|
-
{
|
|
927
|
-
name: 'title',
|
|
928
|
-
title: '@general:terms.common.title',
|
|
929
|
-
groupId: 'basic-info',
|
|
930
|
-
schema: {
|
|
931
|
-
dataType: 'string',
|
|
932
|
-
interface: {
|
|
933
|
-
type: AXPWidgetsCatalog.text,
|
|
934
|
-
},
|
|
935
|
-
},
|
|
936
|
-
validations: [
|
|
937
|
-
{
|
|
938
|
-
rule: 'required',
|
|
939
|
-
},
|
|
940
|
-
],
|
|
941
|
-
},
|
|
942
|
-
{
|
|
943
|
-
name: 'maxSize',
|
|
944
|
-
title: `@${i18n}:terms.document.max-size`,
|
|
945
|
-
groupId: 'basic-info',
|
|
946
|
-
schema: {
|
|
947
|
-
dataType: 'number',
|
|
948
|
-
interface: {
|
|
949
|
-
type: AXPWidgetsCatalog.numberUnit,
|
|
950
|
-
options: {
|
|
951
|
-
textField: 'name',
|
|
952
|
-
valueField: 'value',
|
|
953
|
-
dataSource: [
|
|
954
|
-
{
|
|
955
|
-
name: 'kb',
|
|
956
|
-
value: 'KB',
|
|
957
|
-
calUnit: 1,
|
|
958
|
-
},
|
|
959
|
-
{
|
|
960
|
-
name: 'mb',
|
|
961
|
-
value: 'MB',
|
|
962
|
-
calUnit: 1024,
|
|
963
|
-
},
|
|
964
|
-
{
|
|
965
|
-
name: 'gb',
|
|
966
|
-
value: 'GB',
|
|
967
|
-
calUnit: 1024 * 1024,
|
|
968
|
-
},
|
|
969
|
-
],
|
|
970
|
-
mainUnit: 'kb',
|
|
971
|
-
},
|
|
972
|
-
},
|
|
973
|
-
},
|
|
974
|
-
validations: [
|
|
975
|
-
{
|
|
976
|
-
rule: 'required',
|
|
977
|
-
},
|
|
978
|
-
],
|
|
979
|
-
},
|
|
980
|
-
{
|
|
981
|
-
name: 'isEncrypted',
|
|
982
|
-
title: `@${i18n}:terms.document.is-encrypted`,
|
|
983
|
-
groupId: 'basic-info',
|
|
984
|
-
schema: {
|
|
985
|
-
dataType: 'boolean',
|
|
986
|
-
interface: {
|
|
987
|
-
type: AXPWidgetsCatalog.toggle,
|
|
988
|
-
},
|
|
989
|
-
},
|
|
990
|
-
},
|
|
991
|
-
{
|
|
992
|
-
name: 'enableExpiration',
|
|
993
|
-
title: `@${i18n}:terms.document.enable-expiration`,
|
|
994
|
-
groupId: 'management',
|
|
995
|
-
schema: {
|
|
996
|
-
dataType: 'boolean',
|
|
997
|
-
interface: {
|
|
998
|
-
type: AXPWidgetsCatalog.toggle,
|
|
999
|
-
},
|
|
1000
|
-
},
|
|
1001
|
-
},
|
|
1002
|
-
{
|
|
1003
|
-
name: 'requiresReview',
|
|
1004
|
-
title: `@${i18n}:terms.document.requires-review`,
|
|
1005
|
-
groupId: 'management',
|
|
1006
|
-
schema: {
|
|
1007
|
-
dataType: 'boolean',
|
|
1008
|
-
interface: {
|
|
1009
|
-
type: AXPWidgetsCatalog.toggle,
|
|
1010
|
-
},
|
|
1011
|
-
},
|
|
1012
|
-
},
|
|
1013
|
-
{
|
|
1014
|
-
name: 'enableVersioning',
|
|
1015
|
-
title: `@${i18n}:terms.document.enable-versioning`,
|
|
1016
|
-
groupId: 'management',
|
|
1017
|
-
schema: {
|
|
1018
|
-
dataType: 'boolean',
|
|
1019
|
-
interface: {
|
|
1020
|
-
type: AXPWidgetsCatalog.toggle,
|
|
1021
|
-
options: {
|
|
1022
|
-
disabled: '{{ !!context.eval("requiresReview") }}',
|
|
1023
|
-
},
|
|
1024
|
-
triggers: [
|
|
1025
|
-
{
|
|
1026
|
-
event: "{{ events.context('requiresReview') }}",
|
|
1027
|
-
action: "{{ context.set('enableVersioning', true) }}",
|
|
1028
|
-
},
|
|
1029
|
-
],
|
|
1030
|
-
},
|
|
1031
|
-
},
|
|
1032
|
-
},
|
|
1033
|
-
// {
|
|
1034
|
-
// name: 'meta',
|
|
1035
|
-
// title: `t("metaTitle", { scope: "${i18n}" })`,
|
|
1036
|
-
// groupId: 'section',
|
|
1037
|
-
// schema: {
|
|
1038
|
-
// dataType: 'object',
|
|
1039
|
-
// interface: {
|
|
1040
|
-
// type: 'meta-selector-editor',
|
|
1041
|
-
// },
|
|
1042
|
-
// },
|
|
1043
|
-
// },
|
|
1044
|
-
{
|
|
1045
|
-
name: 'type',
|
|
1046
|
-
title: `@${i18n}:terms.common.type`,
|
|
1047
|
-
groupId: 'basic-info',
|
|
1048
|
-
schema: {
|
|
1049
|
-
dataType: 'object',
|
|
1050
|
-
interface: {
|
|
1051
|
-
type: AXPWidgetsCatalog.fileTypeExtension,
|
|
1052
|
-
options: {},
|
|
1053
|
-
},
|
|
1054
|
-
},
|
|
1055
|
-
},
|
|
1056
|
-
],
|
|
1057
|
-
columns: [{ name: 'name' }, { name: 'title' }],
|
|
1058
|
-
interfaces: {
|
|
1059
|
-
master: {
|
|
1060
|
-
create: {
|
|
1061
|
-
sections: [
|
|
1062
|
-
{
|
|
1063
|
-
id: 'basic-info',
|
|
1064
|
-
},
|
|
1065
|
-
{
|
|
1066
|
-
id: 'management',
|
|
1067
|
-
},
|
|
1068
|
-
],
|
|
1069
|
-
properties: [
|
|
1070
|
-
{
|
|
1071
|
-
name: 'name',
|
|
1072
|
-
layout: {
|
|
1073
|
-
positions: {
|
|
1074
|
-
lg: {
|
|
1075
|
-
colSpan: 6,
|
|
1076
|
-
},
|
|
1077
|
-
},
|
|
1078
|
-
},
|
|
1079
|
-
},
|
|
1080
|
-
{
|
|
1081
|
-
name: 'title',
|
|
1082
|
-
layout: {
|
|
1083
|
-
positions: {
|
|
1084
|
-
lg: {
|
|
1085
|
-
colSpan: 6,
|
|
1086
|
-
},
|
|
1087
|
-
},
|
|
1088
|
-
},
|
|
1089
|
-
},
|
|
1090
|
-
{
|
|
1091
|
-
name: 'maxSize',
|
|
1092
|
-
layout: {
|
|
1093
|
-
positions: {
|
|
1094
|
-
lg: {
|
|
1095
|
-
colSpan: 6,
|
|
1096
|
-
},
|
|
1097
|
-
},
|
|
1098
|
-
},
|
|
1099
|
-
},
|
|
1100
|
-
{
|
|
1101
|
-
name: 'isEncrypted',
|
|
1102
|
-
layout: {
|
|
1103
|
-
positions: {
|
|
1104
|
-
lg: {
|
|
1105
|
-
colSpan: 6,
|
|
1106
|
-
},
|
|
1107
|
-
},
|
|
1108
|
-
},
|
|
1109
|
-
},
|
|
1110
|
-
{
|
|
1111
|
-
name: 'enableExpiration',
|
|
1112
|
-
layout: {
|
|
1113
|
-
positions: {
|
|
1114
|
-
lg: {
|
|
1115
|
-
colSpan: 6,
|
|
1116
|
-
},
|
|
1117
|
-
},
|
|
1118
|
-
},
|
|
1119
|
-
},
|
|
1120
|
-
{
|
|
1121
|
-
name: 'requiresReview',
|
|
1122
|
-
layout: {
|
|
1123
|
-
positions: {
|
|
1124
|
-
lg: {
|
|
1125
|
-
colSpan: 6,
|
|
1126
|
-
},
|
|
1127
|
-
},
|
|
1128
|
-
},
|
|
1129
|
-
},
|
|
1130
|
-
{
|
|
1131
|
-
name: 'enableVersioning',
|
|
1132
|
-
layout: {
|
|
1133
|
-
positions: {
|
|
1134
|
-
lg: {
|
|
1135
|
-
colSpan: 6,
|
|
1136
|
-
},
|
|
1137
|
-
},
|
|
1138
|
-
},
|
|
1139
|
-
},
|
|
1140
|
-
// {
|
|
1141
|
-
// name: 'meta',
|
|
1142
|
-
// layout: {
|
|
1143
|
-
// positions: {
|
|
1144
|
-
// lg: {
|
|
1145
|
-
// colSpan: 12,
|
|
1146
|
-
// },
|
|
1147
|
-
// },
|
|
1148
|
-
// },
|
|
1149
|
-
// },
|
|
1150
|
-
{
|
|
1151
|
-
name: 'type',
|
|
1152
|
-
layout: {
|
|
1153
|
-
positions: {
|
|
1154
|
-
lg: {
|
|
1155
|
-
colSpan: 12,
|
|
1156
|
-
},
|
|
1157
|
-
},
|
|
1158
|
-
},
|
|
1159
|
-
},
|
|
1160
|
-
],
|
|
1161
|
-
},
|
|
1162
|
-
update: {
|
|
1163
|
-
sections: [
|
|
1164
|
-
{
|
|
1165
|
-
id: 'basic-info',
|
|
1166
|
-
},
|
|
1167
|
-
{
|
|
1168
|
-
id: 'management',
|
|
1169
|
-
},
|
|
1170
|
-
],
|
|
1171
|
-
properties: [
|
|
1172
|
-
{
|
|
1173
|
-
name: 'name',
|
|
1174
|
-
layout: {
|
|
1175
|
-
positions: {
|
|
1176
|
-
lg: {
|
|
1177
|
-
colSpan: 6,
|
|
1178
|
-
},
|
|
1179
|
-
},
|
|
1180
|
-
},
|
|
1181
|
-
},
|
|
1182
|
-
{
|
|
1183
|
-
name: 'title',
|
|
1184
|
-
layout: {
|
|
1185
|
-
positions: {
|
|
1186
|
-
lg: {
|
|
1187
|
-
colSpan: 6,
|
|
1188
|
-
},
|
|
1189
|
-
},
|
|
1190
|
-
},
|
|
1191
|
-
},
|
|
1192
|
-
{
|
|
1193
|
-
name: 'maxSize',
|
|
1194
|
-
layout: {
|
|
1195
|
-
positions: {
|
|
1196
|
-
lg: {
|
|
1197
|
-
colSpan: 6,
|
|
1198
|
-
},
|
|
1199
|
-
},
|
|
1200
|
-
},
|
|
1201
|
-
},
|
|
1202
|
-
{
|
|
1203
|
-
name: 'isEncrypted',
|
|
1204
|
-
layout: {
|
|
1205
|
-
positions: {
|
|
1206
|
-
lg: {
|
|
1207
|
-
colSpan: 6,
|
|
1208
|
-
},
|
|
1209
|
-
},
|
|
1210
|
-
},
|
|
1211
|
-
},
|
|
1212
|
-
{
|
|
1213
|
-
name: 'enableExpiration',
|
|
1214
|
-
layout: {
|
|
1215
|
-
positions: {
|
|
1216
|
-
lg: {
|
|
1217
|
-
colSpan: 6,
|
|
1218
|
-
},
|
|
1219
|
-
},
|
|
1220
|
-
},
|
|
1221
|
-
},
|
|
1222
|
-
{
|
|
1223
|
-
name: 'requiresReview',
|
|
1224
|
-
layout: {
|
|
1225
|
-
positions: {
|
|
1226
|
-
lg: {
|
|
1227
|
-
colSpan: 6,
|
|
1228
|
-
},
|
|
1229
|
-
},
|
|
1230
|
-
},
|
|
1231
|
-
},
|
|
1232
|
-
{
|
|
1233
|
-
name: 'enableVersioning',
|
|
1234
|
-
layout: {
|
|
1235
|
-
positions: {
|
|
1236
|
-
lg: {
|
|
1237
|
-
colSpan: 6,
|
|
1238
|
-
},
|
|
1239
|
-
},
|
|
1240
|
-
},
|
|
1241
|
-
},
|
|
1242
|
-
{
|
|
1243
|
-
name: 'type',
|
|
1244
|
-
layout: {
|
|
1245
|
-
positions: {
|
|
1246
|
-
lg: {
|
|
1247
|
-
colSpan: 12,
|
|
1248
|
-
},
|
|
1249
|
-
},
|
|
1250
|
-
},
|
|
1251
|
-
},
|
|
1252
|
-
],
|
|
1253
|
-
},
|
|
1254
|
-
single: {
|
|
1255
|
-
title: '{{title}}',
|
|
1256
|
-
sections: [
|
|
1257
|
-
{
|
|
1258
|
-
id: 'basic-info',
|
|
1259
|
-
layout: {
|
|
1260
|
-
positions: {
|
|
1261
|
-
lg: {
|
|
1262
|
-
colSpan: 12,
|
|
1263
|
-
},
|
|
1264
|
-
},
|
|
1265
|
-
},
|
|
1266
|
-
},
|
|
1267
|
-
{
|
|
1268
|
-
id: 'management',
|
|
1269
|
-
layout: {
|
|
1270
|
-
positions: {
|
|
1271
|
-
lg: {
|
|
1272
|
-
colSpan: 12,
|
|
1273
|
-
},
|
|
1274
|
-
},
|
|
1275
|
-
},
|
|
1276
|
-
},
|
|
1277
|
-
],
|
|
1278
|
-
properties: [
|
|
1279
|
-
{
|
|
1280
|
-
name: 'name',
|
|
1281
|
-
layout: {
|
|
1282
|
-
positions: {
|
|
1283
|
-
lg: {
|
|
1284
|
-
colSpan: 6,
|
|
1285
|
-
},
|
|
1286
|
-
},
|
|
1287
|
-
},
|
|
1288
|
-
},
|
|
1289
|
-
{
|
|
1290
|
-
name: 'title',
|
|
1291
|
-
layout: {
|
|
1292
|
-
positions: {
|
|
1293
|
-
lg: {
|
|
1294
|
-
colSpan: 6,
|
|
1295
|
-
},
|
|
1296
|
-
},
|
|
1297
|
-
},
|
|
1298
|
-
},
|
|
1299
|
-
{
|
|
1300
|
-
name: 'maxSize',
|
|
1301
|
-
layout: {
|
|
1302
|
-
positions: {
|
|
1303
|
-
lg: {
|
|
1304
|
-
colSpan: 6,
|
|
1305
|
-
},
|
|
1306
|
-
},
|
|
1307
|
-
},
|
|
1308
|
-
},
|
|
1309
|
-
{
|
|
1310
|
-
name: 'isEncrypted',
|
|
1311
|
-
layout: {
|
|
1312
|
-
positions: {
|
|
1313
|
-
lg: {
|
|
1314
|
-
colSpan: 6,
|
|
1315
|
-
},
|
|
1316
|
-
},
|
|
1317
|
-
},
|
|
1318
|
-
},
|
|
1319
|
-
{
|
|
1320
|
-
name: 'enableExpiration',
|
|
1321
|
-
layout: {
|
|
1322
|
-
positions: {
|
|
1323
|
-
lg: {
|
|
1324
|
-
colSpan: 6,
|
|
1325
|
-
},
|
|
1326
|
-
},
|
|
1327
|
-
},
|
|
1328
|
-
},
|
|
1329
|
-
{
|
|
1330
|
-
name: 'requiresReview',
|
|
1331
|
-
layout: {
|
|
1332
|
-
positions: {
|
|
1333
|
-
lg: {
|
|
1334
|
-
colSpan: 6,
|
|
1335
|
-
},
|
|
1336
|
-
},
|
|
1337
|
-
},
|
|
1338
|
-
},
|
|
1339
|
-
{
|
|
1340
|
-
name: 'enableVersioning',
|
|
1341
|
-
layout: {
|
|
1342
|
-
positions: {
|
|
1343
|
-
lg: {
|
|
1344
|
-
colSpan: 6,
|
|
1345
|
-
},
|
|
1346
|
-
},
|
|
1347
|
-
},
|
|
1348
|
-
},
|
|
1349
|
-
// {
|
|
1350
|
-
// name: 'meta',
|
|
1351
|
-
// layout: {
|
|
1352
|
-
// positions: {
|
|
1353
|
-
// lg: {
|
|
1354
|
-
// colSpan: 12,
|
|
1355
|
-
// },
|
|
1356
|
-
// },
|
|
1357
|
-
// },
|
|
1358
|
-
// },
|
|
1359
|
-
{
|
|
1360
|
-
name: 'type',
|
|
1361
|
-
layout: {
|
|
1362
|
-
positions: {
|
|
1363
|
-
lg: {
|
|
1364
|
-
colSpan: 12,
|
|
1365
|
-
},
|
|
1366
|
-
},
|
|
1367
|
-
},
|
|
1368
|
-
},
|
|
1369
|
-
],
|
|
1370
|
-
actions: [...entityMasterRecordActions()],
|
|
1371
|
-
},
|
|
1372
|
-
list: {
|
|
1373
|
-
actions: [...entityMasterCrudActions({ edit: true })],
|
|
1374
|
-
views: [createAllQueryView()],
|
|
1375
|
-
},
|
|
1376
|
-
},
|
|
1377
|
-
},
|
|
1378
|
-
};
|
|
1379
|
-
return entityDef;
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
class AXMDocumentTypeService extends AXMEntityCrudServiceImpl {
|
|
1383
|
-
}
|
|
1384
|
-
class AXMDocumentTypeServiceImpl extends AXMDocumentTypeService {
|
|
1385
|
-
constructor() {
|
|
1386
|
-
super(`${RootConfig.module.name}.${RootConfig.entities.documentType.name}`);
|
|
1387
|
-
}
|
|
1388
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentTypeServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1389
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentTypeServiceImpl }); }
|
|
1390
|
-
}
|
|
1391
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentTypeServiceImpl, decorators: [{
|
|
1392
|
-
type: Injectable
|
|
1393
|
-
}], ctorParameters: () => [] });
|
|
1394
|
-
|
|
1395
|
-
class AXMDocumentManagementDocumentTypeEntityModule {
|
|
1396
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1397
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule }); }
|
|
1398
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, providers: [
|
|
1399
|
-
{
|
|
1400
|
-
provide: AXMDocumentTypeService,
|
|
1401
|
-
useClass: AXMDocumentTypeServiceImpl,
|
|
1402
|
-
},
|
|
1403
|
-
] }); }
|
|
1404
|
-
}
|
|
1405
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, decorators: [{
|
|
1406
|
-
type: NgModule,
|
|
1407
|
-
args: [{
|
|
1408
|
-
imports: [],
|
|
1409
|
-
exports: [],
|
|
1410
|
-
declarations: [],
|
|
1411
|
-
providers: [
|
|
1412
|
-
{
|
|
1413
|
-
provide: AXMDocumentTypeService,
|
|
1414
|
-
useClass: AXMDocumentTypeServiceImpl,
|
|
1415
|
-
},
|
|
1416
|
-
],
|
|
1417
|
-
}]
|
|
1418
|
-
}] });
|
|
1419
|
-
|
|
1420
|
-
async function documentTypeMetaDefinitionfactory(injector) {
|
|
1421
|
-
const entityDef = {
|
|
1422
|
-
module: RootConfig.module.name,
|
|
1423
|
-
name: RootConfig.entities.document.name,
|
|
1424
|
-
title: RootConfig.entities.document.title,
|
|
1425
|
-
formats: {
|
|
1426
|
-
individual: RootConfig.entities.document.title,
|
|
1427
|
-
plural: RootConfig.entities.document.titlePlural,
|
|
1428
|
-
searchResult: {
|
|
1429
|
-
title: '{{ title }}',
|
|
1430
|
-
description: RootConfig.module.title,
|
|
1431
|
-
},
|
|
1432
|
-
},
|
|
1433
|
-
relatedEntities: [],
|
|
1434
|
-
groups: [
|
|
1435
|
-
{
|
|
1436
|
-
id: 'section',
|
|
1437
|
-
title: RootConfig.entities.document.title,
|
|
1438
|
-
},
|
|
1439
|
-
],
|
|
1440
|
-
properties: [
|
|
1441
|
-
{
|
|
1442
|
-
name: 'name',
|
|
1443
|
-
title: '@general:terms.common.name',
|
|
1444
|
-
groupId: 'section',
|
|
1445
|
-
options: {
|
|
1446
|
-
sort: {
|
|
1447
|
-
enabled: true,
|
|
1448
|
-
},
|
|
1449
|
-
},
|
|
1450
|
-
schema: {
|
|
1451
|
-
dataType: 'string',
|
|
1452
|
-
interface: {
|
|
1453
|
-
type: AXPWidgetsCatalog.text,
|
|
1454
|
-
},
|
|
1455
|
-
},
|
|
1456
|
-
validations: [
|
|
1457
|
-
{
|
|
1458
|
-
rule: 'required',
|
|
1459
|
-
},
|
|
1460
|
-
],
|
|
1461
|
-
},
|
|
1462
|
-
{
|
|
1463
|
-
name: 'title',
|
|
1464
|
-
title: '@general:terms.common.title',
|
|
1465
|
-
groupId: 'section',
|
|
1466
|
-
schema: {
|
|
1467
|
-
dataType: 'string',
|
|
1468
|
-
interface: {
|
|
1469
|
-
type: AXPWidgetsCatalog.text,
|
|
1470
|
-
},
|
|
1471
|
-
},
|
|
1472
|
-
validations: [
|
|
1473
|
-
{
|
|
1474
|
-
rule: 'required',
|
|
1475
|
-
},
|
|
1476
|
-
],
|
|
1477
|
-
},
|
|
1478
|
-
],
|
|
1479
|
-
columns: [{ name: 'name' }, { name: 'title' }],
|
|
1480
|
-
interfaces: {
|
|
1481
|
-
master: {
|
|
1482
|
-
create: {
|
|
1483
|
-
sections: [
|
|
1484
|
-
{
|
|
1485
|
-
id: 'section',
|
|
1486
|
-
},
|
|
1487
|
-
],
|
|
1488
|
-
properties: [
|
|
1489
|
-
{
|
|
1490
|
-
name: 'name',
|
|
1491
|
-
layout: {
|
|
1492
|
-
positions: {
|
|
1493
|
-
lg: {
|
|
1494
|
-
colSpan: 6,
|
|
1495
|
-
},
|
|
1496
|
-
},
|
|
1497
|
-
},
|
|
1498
|
-
},
|
|
1499
|
-
{
|
|
1500
|
-
name: 'title',
|
|
1501
|
-
layout: {
|
|
1502
|
-
positions: {
|
|
1503
|
-
lg: {
|
|
1504
|
-
colSpan: 6,
|
|
1505
|
-
},
|
|
1506
|
-
},
|
|
1507
|
-
},
|
|
1508
|
-
},
|
|
1509
|
-
],
|
|
1510
|
-
},
|
|
1511
|
-
update: {
|
|
1512
|
-
sections: [
|
|
1513
|
-
{
|
|
1514
|
-
id: 'section',
|
|
1515
|
-
},
|
|
1516
|
-
],
|
|
1517
|
-
properties: [
|
|
1518
|
-
{
|
|
1519
|
-
name: 'name',
|
|
1520
|
-
layout: {
|
|
1521
|
-
positions: {
|
|
1522
|
-
lg: {
|
|
1523
|
-
colSpan: 6,
|
|
1524
|
-
},
|
|
1525
|
-
},
|
|
1526
|
-
},
|
|
1527
|
-
},
|
|
1528
|
-
{
|
|
1529
|
-
name: 'title',
|
|
1530
|
-
layout: {
|
|
1531
|
-
positions: {
|
|
1532
|
-
lg: {
|
|
1533
|
-
colSpan: 6,
|
|
1534
|
-
},
|
|
1535
|
-
},
|
|
1536
|
-
},
|
|
1537
|
-
},
|
|
1538
|
-
],
|
|
1539
|
-
},
|
|
1540
|
-
single: {
|
|
1541
|
-
title: '{{title}}',
|
|
1542
|
-
sections: [
|
|
1543
|
-
{
|
|
1544
|
-
id: 'section',
|
|
1545
|
-
layout: {
|
|
1546
|
-
positions: {
|
|
1547
|
-
lg: {
|
|
1548
|
-
colSpan: 12,
|
|
1549
|
-
},
|
|
1550
|
-
},
|
|
1551
|
-
},
|
|
1552
|
-
},
|
|
1553
|
-
],
|
|
1554
|
-
properties: [
|
|
1555
|
-
{
|
|
1556
|
-
name: 'name',
|
|
1557
|
-
layout: {
|
|
1558
|
-
positions: {
|
|
1559
|
-
lg: {
|
|
1560
|
-
colSpan: 6,
|
|
1561
|
-
},
|
|
1562
|
-
},
|
|
1563
|
-
},
|
|
1564
|
-
},
|
|
1565
|
-
{
|
|
1566
|
-
name: 'title',
|
|
1567
|
-
layout: {
|
|
1568
|
-
positions: {
|
|
1569
|
-
lg: {
|
|
1570
|
-
colSpan: 6,
|
|
1571
|
-
},
|
|
1572
|
-
},
|
|
1573
|
-
},
|
|
1574
|
-
},
|
|
1575
|
-
],
|
|
1576
|
-
actions: [...entityMasterRecordActions()],
|
|
1577
|
-
},
|
|
1578
|
-
list: {
|
|
1579
|
-
actions: [...entityMasterCrudActions()],
|
|
1580
|
-
views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
|
|
1581
|
-
},
|
|
1582
|
-
},
|
|
1583
|
-
},
|
|
1584
|
-
};
|
|
1585
|
-
return entityDef;
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
class AXMDocumentManagementDocumentTypeMetaDefinitionEntityService extends AXMEntityCrudServiceImpl {
|
|
1589
|
-
}
|
|
1590
|
-
class AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl extends AXMDocumentManagementDocumentTypeMetaDefinitionEntityService {
|
|
1591
|
-
constructor() {
|
|
1592
|
-
super(`${RootConfig.module.name}.${RootConfig.entities.documentTypeMetaDefinition}`);
|
|
1593
|
-
}
|
|
1594
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1595
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl }); }
|
|
1596
|
-
}
|
|
1597
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl, decorators: [{
|
|
1598
|
-
type: Injectable
|
|
1599
|
-
}], ctorParameters: () => [] });
|
|
1600
|
-
|
|
1601
|
-
class AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule {
|
|
1602
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1603
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule }); }
|
|
1604
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule, providers: [
|
|
1605
|
-
{
|
|
1606
|
-
provide: AXMDocumentManagementDocumentTypeMetaDefinitionEntityService,
|
|
1607
|
-
useClass: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl,
|
|
1608
|
-
},
|
|
1609
|
-
] }); }
|
|
1610
|
-
}
|
|
1611
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule, decorators: [{
|
|
1612
|
-
type: NgModule,
|
|
1613
|
-
args: [{
|
|
1614
|
-
imports: [],
|
|
1615
|
-
exports: [],
|
|
1616
|
-
declarations: [],
|
|
1617
|
-
providers: [
|
|
1618
|
-
{
|
|
1619
|
-
provide: AXMDocumentManagementDocumentTypeMetaDefinitionEntityService,
|
|
1620
|
-
useClass: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl,
|
|
1621
|
-
},
|
|
1622
|
-
],
|
|
1623
|
-
}]
|
|
1624
|
-
}] });
|
|
1625
|
-
|
|
1626
|
-
async function documentTypeMetaValueFactory(injector) {
|
|
1627
|
-
const entityDef = {
|
|
1628
|
-
module: RootConfig.module.name,
|
|
1629
|
-
name: RootConfig.entities.document.name,
|
|
1630
|
-
title: RootConfig.entities.document.title,
|
|
1631
|
-
formats: {
|
|
1632
|
-
individual: RootConfig.entities.document.title,
|
|
1633
|
-
plural: RootConfig.entities.document.titlePlural,
|
|
1634
|
-
searchResult: {
|
|
1635
|
-
title: '{{ title }}',
|
|
1636
|
-
description: RootConfig.module.title,
|
|
1637
|
-
},
|
|
1638
|
-
},
|
|
1639
|
-
relatedEntities: [],
|
|
1640
|
-
groups: [
|
|
1641
|
-
{
|
|
1642
|
-
id: 'section',
|
|
1643
|
-
title: RootConfig.entities.document.title,
|
|
1644
|
-
},
|
|
1645
|
-
],
|
|
1646
|
-
properties: [
|
|
1647
|
-
{
|
|
1648
|
-
name: 'name',
|
|
1649
|
-
title: '@general:terms.common.name',
|
|
1650
|
-
groupId: 'section',
|
|
1651
|
-
options: {
|
|
1652
|
-
sort: {
|
|
1653
|
-
enabled: true,
|
|
1654
|
-
},
|
|
1655
|
-
},
|
|
1656
|
-
schema: {
|
|
1657
|
-
dataType: 'string',
|
|
1658
|
-
interface: {
|
|
1659
|
-
type: AXPWidgetsCatalog.text,
|
|
1660
|
-
},
|
|
1661
|
-
},
|
|
1662
|
-
validations: [
|
|
1663
|
-
{
|
|
1664
|
-
rule: 'required',
|
|
1665
|
-
},
|
|
1666
|
-
],
|
|
1667
|
-
},
|
|
1668
|
-
{
|
|
1669
|
-
name: 'title',
|
|
1670
|
-
title: '@general:terms.common.title',
|
|
1671
|
-
groupId: 'section',
|
|
1672
|
-
schema: {
|
|
1673
|
-
dataType: 'string',
|
|
1674
|
-
interface: {
|
|
1675
|
-
type: AXPWidgetsCatalog.text,
|
|
1676
|
-
},
|
|
1677
|
-
},
|
|
1678
|
-
validations: [
|
|
1679
|
-
{
|
|
1680
|
-
rule: 'required',
|
|
1681
|
-
},
|
|
1682
|
-
],
|
|
1683
|
-
},
|
|
1684
|
-
],
|
|
1685
|
-
columns: [{ name: 'name' }, { name: 'title' }],
|
|
1686
|
-
interfaces: {
|
|
1687
|
-
master: {
|
|
1688
|
-
create: {
|
|
1689
|
-
sections: [
|
|
1690
|
-
{
|
|
1691
|
-
id: 'section',
|
|
1692
|
-
},
|
|
1693
|
-
],
|
|
1694
|
-
properties: [
|
|
1695
|
-
{
|
|
1696
|
-
name: 'name',
|
|
1697
|
-
layout: {
|
|
1698
|
-
positions: {
|
|
1699
|
-
lg: {
|
|
1700
|
-
colSpan: 6,
|
|
1701
|
-
},
|
|
1702
|
-
},
|
|
1703
|
-
},
|
|
1704
|
-
},
|
|
1705
|
-
{
|
|
1706
|
-
name: 'title',
|
|
1707
|
-
layout: {
|
|
1708
|
-
positions: {
|
|
1709
|
-
lg: {
|
|
1710
|
-
colSpan: 6,
|
|
1711
|
-
},
|
|
1712
|
-
},
|
|
1713
|
-
},
|
|
1714
|
-
},
|
|
1715
|
-
],
|
|
1716
|
-
},
|
|
1717
|
-
update: {
|
|
1718
|
-
sections: [
|
|
1719
|
-
{
|
|
1720
|
-
id: 'section',
|
|
1721
|
-
},
|
|
1722
|
-
],
|
|
1723
|
-
properties: [
|
|
1724
|
-
{
|
|
1725
|
-
name: 'name',
|
|
1726
|
-
layout: {
|
|
1727
|
-
positions: {
|
|
1728
|
-
lg: {
|
|
1729
|
-
colSpan: 6,
|
|
1730
|
-
},
|
|
1731
|
-
},
|
|
1732
|
-
},
|
|
1733
|
-
},
|
|
1734
|
-
{
|
|
1735
|
-
name: 'title',
|
|
1736
|
-
layout: {
|
|
1737
|
-
positions: {
|
|
1738
|
-
lg: {
|
|
1739
|
-
colSpan: 6,
|
|
1740
|
-
},
|
|
1741
|
-
},
|
|
1742
|
-
},
|
|
1743
|
-
},
|
|
1744
|
-
],
|
|
1745
|
-
},
|
|
1746
|
-
single: {
|
|
1747
|
-
title: '{{title}}',
|
|
1748
|
-
sections: [
|
|
1749
|
-
{
|
|
1750
|
-
id: 'section',
|
|
1751
|
-
layout: {
|
|
1752
|
-
positions: {
|
|
1753
|
-
lg: {
|
|
1754
|
-
colSpan: 12,
|
|
1755
|
-
},
|
|
1756
|
-
},
|
|
1757
|
-
},
|
|
1758
|
-
},
|
|
1759
|
-
],
|
|
1760
|
-
properties: [
|
|
1761
|
-
{
|
|
1762
|
-
name: 'name',
|
|
1763
|
-
layout: {
|
|
1764
|
-
positions: {
|
|
1765
|
-
lg: {
|
|
1766
|
-
colSpan: 6,
|
|
1767
|
-
},
|
|
1768
|
-
},
|
|
1769
|
-
},
|
|
1770
|
-
},
|
|
1771
|
-
{
|
|
1772
|
-
name: 'title',
|
|
1773
|
-
layout: {
|
|
1774
|
-
positions: {
|
|
1775
|
-
lg: {
|
|
1776
|
-
colSpan: 6,
|
|
1777
|
-
},
|
|
1778
|
-
},
|
|
1779
|
-
},
|
|
1780
|
-
},
|
|
1781
|
-
],
|
|
1782
|
-
actions: [...entityMasterRecordActions()],
|
|
1783
|
-
},
|
|
1784
|
-
list: {
|
|
1785
|
-
actions: [...entityMasterCrudActions()],
|
|
1786
|
-
views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
|
|
1787
|
-
},
|
|
1788
|
-
},
|
|
1789
|
-
},
|
|
1790
|
-
};
|
|
1791
|
-
return entityDef;
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
class AXMDocumentManagementDocumentTypeMetaValueEntityService extends AXMEntityCrudServiceImpl {
|
|
1795
|
-
}
|
|
1796
|
-
class AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl extends AXMDocumentManagementDocumentTypeMetaValueEntityService {
|
|
1797
|
-
constructor() {
|
|
1798
|
-
super(`${RootConfig.module.name}.${RootConfig.entities.documentTypeMetaValue}`);
|
|
1799
|
-
}
|
|
1800
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1801
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl }); }
|
|
1802
|
-
}
|
|
1803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl, decorators: [{
|
|
1804
|
-
type: Injectable
|
|
1805
|
-
}], ctorParameters: () => [] });
|
|
1806
|
-
|
|
1807
|
-
class AXMDocumentManagementDocumentTypeMetaValueEntityModule {
|
|
1808
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1809
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityModule }); }
|
|
1810
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityModule, providers: [
|
|
1811
|
-
{
|
|
1812
|
-
provide: AXMDocumentManagementDocumentTypeMetaValueEntityService,
|
|
1813
|
-
useClass: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl,
|
|
1814
|
-
},
|
|
1815
|
-
] }); }
|
|
1816
|
-
}
|
|
1817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityModule, decorators: [{
|
|
1818
|
-
type: NgModule,
|
|
1819
|
-
args: [{
|
|
1820
|
-
imports: [],
|
|
1821
|
-
exports: [],
|
|
1822
|
-
declarations: [],
|
|
1823
|
-
providers: [
|
|
1824
|
-
{
|
|
1825
|
-
provide: AXMDocumentManagementDocumentTypeMetaValueEntityService,
|
|
1826
|
-
useClass: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl,
|
|
1827
|
-
},
|
|
1828
|
-
],
|
|
1829
|
-
}]
|
|
1830
|
-
}] });
|
|
1831
|
-
|
|
1832
|
-
async function documentTypeStatusDefinitionFactory(injector) {
|
|
1833
|
-
const entityDef = {
|
|
1834
|
-
module: RootConfig.module.name,
|
|
1835
|
-
name: RootConfig.entities.document.name,
|
|
1836
|
-
title: RootConfig.entities.document.title,
|
|
1837
|
-
formats: {
|
|
1838
|
-
individual: RootConfig.entities.document.title,
|
|
1839
|
-
plural: RootConfig.entities.document.titlePlural,
|
|
1840
|
-
searchResult: {
|
|
1841
|
-
title: '{{ title }}',
|
|
1842
|
-
description: RootConfig.module.title,
|
|
1843
|
-
},
|
|
1844
|
-
},
|
|
1845
|
-
relatedEntities: [],
|
|
1846
|
-
groups: [
|
|
1847
|
-
{
|
|
1848
|
-
id: 'section',
|
|
1849
|
-
title: RootConfig.entities.document.title,
|
|
1850
|
-
},
|
|
1851
|
-
],
|
|
1852
|
-
properties: [
|
|
1853
|
-
{
|
|
1854
|
-
name: 'name',
|
|
1855
|
-
title: '@general:terms.common.name',
|
|
1856
|
-
groupId: 'section',
|
|
1857
|
-
options: {
|
|
1858
|
-
sort: {
|
|
1859
|
-
enabled: true,
|
|
1860
|
-
},
|
|
1861
|
-
},
|
|
1862
|
-
schema: {
|
|
1863
|
-
dataType: 'string',
|
|
1864
|
-
interface: {
|
|
1865
|
-
type: AXPWidgetsCatalog.text,
|
|
1866
|
-
},
|
|
1867
|
-
},
|
|
1868
|
-
validations: [
|
|
1869
|
-
{
|
|
1870
|
-
rule: 'required',
|
|
1871
|
-
},
|
|
1872
|
-
],
|
|
1873
|
-
},
|
|
1874
|
-
{
|
|
1875
|
-
name: 'title',
|
|
1876
|
-
title: '@general:terms.common.title',
|
|
1877
|
-
groupId: 'section',
|
|
1878
|
-
schema: {
|
|
1879
|
-
dataType: 'string',
|
|
1880
|
-
interface: {
|
|
1881
|
-
type: AXPWidgetsCatalog.text,
|
|
1882
|
-
},
|
|
1883
|
-
},
|
|
1884
|
-
validations: [
|
|
1885
|
-
{
|
|
1886
|
-
rule: 'required',
|
|
1887
|
-
},
|
|
1888
|
-
],
|
|
1889
|
-
},
|
|
1890
|
-
],
|
|
1891
|
-
columns: [{ name: 'name' }, { name: 'title' }],
|
|
1892
|
-
interfaces: {
|
|
1893
|
-
master: {
|
|
1894
|
-
create: {
|
|
1895
|
-
sections: [
|
|
1896
|
-
{
|
|
1897
|
-
id: 'section',
|
|
1898
|
-
},
|
|
1899
|
-
],
|
|
1900
|
-
properties: [
|
|
1901
|
-
{
|
|
1902
|
-
name: 'name',
|
|
1903
|
-
layout: {
|
|
1904
|
-
positions: {
|
|
1905
|
-
lg: {
|
|
1906
|
-
colSpan: 6,
|
|
1907
|
-
},
|
|
1908
|
-
},
|
|
1909
|
-
},
|
|
1910
|
-
},
|
|
1911
|
-
{
|
|
1912
|
-
name: 'title',
|
|
1913
|
-
layout: {
|
|
1914
|
-
positions: {
|
|
1915
|
-
lg: {
|
|
1916
|
-
colSpan: 6,
|
|
1917
|
-
},
|
|
1918
|
-
},
|
|
1919
|
-
},
|
|
1920
|
-
},
|
|
1921
|
-
],
|
|
1922
|
-
},
|
|
1923
|
-
update: {
|
|
1924
|
-
sections: [
|
|
1925
|
-
{
|
|
1926
|
-
id: 'section',
|
|
1927
|
-
},
|
|
1928
|
-
],
|
|
1929
|
-
properties: [
|
|
1930
|
-
{
|
|
1931
|
-
name: 'name',
|
|
1932
|
-
layout: {
|
|
1933
|
-
positions: {
|
|
1934
|
-
lg: {
|
|
1935
|
-
colSpan: 6,
|
|
1936
|
-
},
|
|
1937
|
-
},
|
|
1938
|
-
},
|
|
1939
|
-
},
|
|
1940
|
-
{
|
|
1941
|
-
name: 'title',
|
|
1942
|
-
layout: {
|
|
1943
|
-
positions: {
|
|
1944
|
-
lg: {
|
|
1945
|
-
colSpan: 6,
|
|
1946
|
-
},
|
|
1947
|
-
},
|
|
1948
|
-
},
|
|
1949
|
-
},
|
|
1950
|
-
],
|
|
1951
|
-
},
|
|
1952
|
-
single: {
|
|
1953
|
-
title: '{{title}}',
|
|
1954
|
-
sections: [
|
|
1955
|
-
{
|
|
1956
|
-
id: 'section',
|
|
1957
|
-
layout: {
|
|
1958
|
-
positions: {
|
|
1959
|
-
lg: {
|
|
1960
|
-
colSpan: 12,
|
|
1961
|
-
},
|
|
1962
|
-
},
|
|
1963
|
-
},
|
|
1964
|
-
},
|
|
1965
|
-
],
|
|
1966
|
-
properties: [
|
|
1967
|
-
{
|
|
1968
|
-
name: 'name',
|
|
1969
|
-
layout: {
|
|
1970
|
-
positions: {
|
|
1971
|
-
lg: {
|
|
1972
|
-
colSpan: 6,
|
|
1973
|
-
},
|
|
1974
|
-
},
|
|
1975
|
-
},
|
|
1976
|
-
},
|
|
1977
|
-
{
|
|
1978
|
-
name: 'title',
|
|
1979
|
-
layout: {
|
|
1980
|
-
positions: {
|
|
1981
|
-
lg: {
|
|
1982
|
-
colSpan: 6,
|
|
1983
|
-
},
|
|
1984
|
-
},
|
|
1985
|
-
},
|
|
1986
|
-
},
|
|
1987
|
-
],
|
|
1988
|
-
actions: [...entityMasterRecordActions()],
|
|
1989
|
-
},
|
|
1990
|
-
list: {
|
|
1991
|
-
actions: [...entityMasterCrudActions()],
|
|
1992
|
-
views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
|
|
1993
|
-
},
|
|
1994
|
-
},
|
|
1995
|
-
},
|
|
1996
|
-
};
|
|
1997
|
-
return entityDef;
|
|
1998
|
-
}
|
|
1999
|
-
|
|
2000
|
-
class AXMDocumentManagementDocumentTypeStatusDefinitionEntityService extends AXMEntityCrudServiceImpl {
|
|
2001
|
-
}
|
|
2002
|
-
class AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl extends AXMDocumentManagementDocumentTypeStatusDefinitionEntityService {
|
|
2003
|
-
constructor() {
|
|
2004
|
-
super(`${RootConfig.module.name}.${RootConfig.entities.documentTypeStatus}`);
|
|
2005
|
-
}
|
|
2006
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2007
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl }); }
|
|
2008
|
-
}
|
|
2009
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl, decorators: [{
|
|
2010
|
-
type: Injectable
|
|
2011
|
-
}], ctorParameters: () => [] });
|
|
2012
|
-
|
|
2013
|
-
class AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule {
|
|
2014
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2015
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule }); }
|
|
2016
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule, providers: [
|
|
2017
|
-
{
|
|
2018
|
-
provide: AXMDocumentManagementDocumentTypeStatusDefinitionEntityService,
|
|
2019
|
-
useClass: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl,
|
|
2020
|
-
},
|
|
2021
|
-
] }); }
|
|
2022
|
-
}
|
|
2023
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule, decorators: [{
|
|
2024
|
-
type: NgModule,
|
|
2025
|
-
args: [{
|
|
2026
|
-
imports: [],
|
|
2027
|
-
exports: [],
|
|
2028
|
-
declarations: [],
|
|
2029
|
-
providers: [
|
|
2030
|
-
{
|
|
2031
|
-
provide: AXMDocumentManagementDocumentTypeStatusDefinitionEntityService,
|
|
2032
|
-
useClass: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl,
|
|
2033
|
-
},
|
|
2034
|
-
],
|
|
2035
|
-
}]
|
|
2036
|
-
}] });
|
|
2037
|
-
|
|
2038
|
-
async function documentRelatedFactory(injector) {
|
|
2039
|
-
const i18n = RootConfig.config.i18n;
|
|
2040
|
-
const entityDef = {
|
|
2041
|
-
module: RootConfig.module.name,
|
|
2042
|
-
name: RootConfig.entities.documentRelated.name,
|
|
2043
|
-
title: RootConfig.entities.documentRelated.title,
|
|
2044
|
-
icon: RootConfig.entities.documentRelated.icon,
|
|
2045
|
-
formats: {
|
|
2046
|
-
individual: RootConfig.entities.documentRelated.title,
|
|
2047
|
-
plural: RootConfig.entities.documentRelated.titlePlural,
|
|
2048
|
-
searchResult: {
|
|
2049
|
-
title: '{{ title }}',
|
|
2050
|
-
description: RootConfig.module.title,
|
|
2051
|
-
},
|
|
2052
|
-
},
|
|
2053
|
-
relatedEntities: [],
|
|
2054
|
-
groups: [
|
|
2055
|
-
{
|
|
2056
|
-
id: 'section',
|
|
2057
|
-
title: RootConfig.entities.documentRelated.title,
|
|
2058
|
-
},
|
|
2059
|
-
],
|
|
2060
|
-
properties: [
|
|
2061
|
-
{
|
|
2062
|
-
name: 'name',
|
|
2063
|
-
title: '@general:terms.common.name',
|
|
2064
|
-
groupId: 'section',
|
|
2065
|
-
schema: {
|
|
2066
|
-
dataType: 'string',
|
|
2067
|
-
readonly: true,
|
|
2068
|
-
interface: {
|
|
2069
|
-
type: AXPWidgetsCatalog.text,
|
|
2070
|
-
options: {
|
|
2071
|
-
placeholder: '@general:terms.common.name',
|
|
2072
|
-
},
|
|
2073
|
-
},
|
|
2074
|
-
},
|
|
2075
|
-
},
|
|
2076
|
-
{
|
|
2077
|
-
name: 'size',
|
|
2078
|
-
title: '@general:terms.common.size',
|
|
2079
|
-
groupId: 'section',
|
|
2080
|
-
schema: {
|
|
2081
|
-
dataType: 'string',
|
|
2082
|
-
readonly: true,
|
|
2083
|
-
interface: {
|
|
2084
|
-
type: AXPWidgetsCatalog.number,
|
|
2085
|
-
options: {},
|
|
2086
|
-
},
|
|
2087
|
-
},
|
|
2088
|
-
validations: [
|
|
2089
|
-
{
|
|
2090
|
-
rule: 'required',
|
|
2091
|
-
},
|
|
2092
|
-
],
|
|
2093
|
-
},
|
|
2094
|
-
{
|
|
2095
|
-
name: 'type',
|
|
2096
|
-
title: '@general:terms.common.type',
|
|
2097
|
-
groupId: 'section',
|
|
2098
|
-
schema: {
|
|
2099
|
-
dataType: 'string',
|
|
2100
|
-
readonly: true,
|
|
2101
|
-
interface: {
|
|
2102
|
-
type: AXPWidgetsCatalog.lookup,
|
|
2103
|
-
options: {
|
|
2104
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.documentType.name}`,
|
|
2105
|
-
expose: 'type',
|
|
2106
|
-
},
|
|
2107
|
-
},
|
|
2108
|
-
},
|
|
2109
|
-
validations: [
|
|
2110
|
-
{
|
|
2111
|
-
rule: 'required',
|
|
2112
|
-
},
|
|
2113
|
-
],
|
|
2114
|
-
},
|
|
2115
|
-
{
|
|
2116
|
-
name: 'metaData',
|
|
2117
|
-
title: `@${i18n}:terms.common.meta-data`,
|
|
2118
|
-
groupId: 'section',
|
|
2119
|
-
schema: {
|
|
2120
|
-
dataType: 'object',
|
|
2121
|
-
readonly: true,
|
|
2122
|
-
interface: {
|
|
2123
|
-
type: AXPWidgetsCatalog.blockLayout,
|
|
2124
|
-
options: {},
|
|
2125
|
-
// children: 'context.eval("type.meta")'
|
|
2126
|
-
children: []
|
|
2127
|
-
},
|
|
2128
|
-
},
|
|
2129
|
-
validations: [
|
|
2130
|
-
{
|
|
2131
|
-
rule: 'required',
|
|
2132
|
-
},
|
|
2133
|
-
],
|
|
2134
|
-
},
|
|
2135
|
-
{
|
|
2136
|
-
name: 'fileId',
|
|
2137
|
-
title: `@${i18n}:terms.common.file`,
|
|
2138
|
-
groupId: 'section',
|
|
2139
|
-
schema: {
|
|
2140
|
-
dataType: 'string',
|
|
2141
|
-
readonly: true,
|
|
2142
|
-
interface: {
|
|
2143
|
-
type: AXPWidgetsCatalog.fileUploader,
|
|
2144
|
-
options: {
|
|
2145
|
-
maxFileSize: ` {{context.eval("type.maxSize")}} `,
|
|
2146
|
-
multiple: ` {{context.eval("type.multiple")}} `,
|
|
2147
|
-
// accept: ` {{context.eval("type.multiple")}} `,
|
|
2148
|
-
},
|
|
2149
|
-
},
|
|
2150
|
-
},
|
|
2151
|
-
validations: [
|
|
2152
|
-
{
|
|
2153
|
-
rule: 'required',
|
|
2154
|
-
},
|
|
2155
|
-
],
|
|
2156
|
-
},
|
|
2157
|
-
],
|
|
2158
|
-
columns: [
|
|
2159
|
-
{ name: 'name' },
|
|
2160
|
-
{ name: 'fileId' },
|
|
2161
|
-
{ name: 'type' },
|
|
2162
|
-
{ name: 'size' }
|
|
2163
|
-
],
|
|
2164
|
-
interfaces: {
|
|
2165
|
-
master: {
|
|
2166
|
-
create: {
|
|
2167
|
-
sections: [
|
|
2168
|
-
{
|
|
2169
|
-
id: 'section',
|
|
2170
|
-
},
|
|
2171
|
-
],
|
|
2172
|
-
properties: [
|
|
2173
|
-
{
|
|
2174
|
-
name: 'metaData',
|
|
2175
|
-
layout: {
|
|
2176
|
-
positions: {
|
|
2177
|
-
lg: {
|
|
2178
|
-
colSpan: 12,
|
|
2179
|
-
},
|
|
2180
|
-
},
|
|
2181
|
-
},
|
|
2182
|
-
},
|
|
2183
|
-
{
|
|
2184
|
-
name: 'fileId',
|
|
2185
|
-
layout: {
|
|
2186
|
-
positions: {
|
|
2187
|
-
lg: {
|
|
2188
|
-
colSpan: 12,
|
|
2189
|
-
},
|
|
2190
|
-
},
|
|
2191
|
-
},
|
|
2192
|
-
},
|
|
2193
|
-
],
|
|
2194
|
-
},
|
|
2195
|
-
update: {
|
|
2196
|
-
sections: [
|
|
2197
|
-
{
|
|
2198
|
-
id: 'section',
|
|
2199
|
-
},
|
|
2200
|
-
],
|
|
2201
|
-
properties: [
|
|
2202
|
-
{
|
|
2203
|
-
name: 'name',
|
|
2204
|
-
layout: {
|
|
2205
|
-
positions: {
|
|
2206
|
-
lg: {
|
|
2207
|
-
colSpan: 6,
|
|
2208
|
-
},
|
|
2209
|
-
},
|
|
2210
|
-
},
|
|
2211
|
-
},
|
|
2212
|
-
{
|
|
2213
|
-
name: 'type',
|
|
2214
|
-
layout: {
|
|
2215
|
-
positions: {
|
|
2216
|
-
lg: {
|
|
2217
|
-
colSpan: 12,
|
|
2218
|
-
},
|
|
2219
|
-
},
|
|
2220
|
-
},
|
|
2221
|
-
},
|
|
2222
|
-
{
|
|
2223
|
-
name: 'metaData',
|
|
2224
|
-
layout: {
|
|
2225
|
-
positions: {
|
|
2226
|
-
lg: {
|
|
2227
|
-
colSpan: 12,
|
|
2228
|
-
},
|
|
2229
|
-
},
|
|
2230
|
-
},
|
|
2231
|
-
},
|
|
2232
|
-
{
|
|
2233
|
-
name: 'file',
|
|
2234
|
-
layout: {
|
|
2235
|
-
positions: {
|
|
2236
|
-
lg: {
|
|
2237
|
-
colSpan: 12,
|
|
2238
|
-
},
|
|
2239
|
-
},
|
|
2240
|
-
},
|
|
2241
|
-
},
|
|
2242
|
-
],
|
|
2243
|
-
},
|
|
2244
|
-
single: {
|
|
2245
|
-
title: '{{title}}',
|
|
2246
|
-
sections: [
|
|
2247
|
-
{
|
|
2248
|
-
id: 'section',
|
|
2249
|
-
layout: {
|
|
2250
|
-
positions: {
|
|
2251
|
-
lg: {
|
|
2252
|
-
colSpan: 12,
|
|
2253
|
-
},
|
|
2254
|
-
},
|
|
2255
|
-
},
|
|
2256
|
-
},
|
|
2257
|
-
],
|
|
2258
|
-
properties: [
|
|
2259
|
-
{
|
|
2260
|
-
name: 'metaData',
|
|
2261
|
-
layout: {
|
|
2262
|
-
positions: {
|
|
2263
|
-
lg: {
|
|
2264
|
-
colSpan: 6,
|
|
2265
|
-
},
|
|
2266
|
-
}
|
|
2267
|
-
},
|
|
2268
|
-
},
|
|
2269
|
-
{
|
|
2270
|
-
name: 'fileId',
|
|
2271
|
-
layout: {
|
|
2272
|
-
positions: {
|
|
2273
|
-
lg: {
|
|
2274
|
-
colSpan: 12,
|
|
2275
|
-
},
|
|
2276
|
-
},
|
|
2277
|
-
},
|
|
2278
|
-
},
|
|
2279
|
-
],
|
|
2280
|
-
actions: [],
|
|
2281
|
-
},
|
|
2282
|
-
list: {
|
|
2283
|
-
actions: [
|
|
2284
|
-
{
|
|
2285
|
-
title: '@general:actions.detail.title',
|
|
2286
|
-
command: 'open-entity',
|
|
2287
|
-
priority: 'secondary',
|
|
2288
|
-
type: 'view',
|
|
2289
|
-
default: true,
|
|
2290
|
-
scope: AXPEntityCommandScope.Individual,
|
|
2291
|
-
},
|
|
2292
|
-
],
|
|
2293
|
-
views: [
|
|
2294
|
-
createAllQueryView({ sorts: [{ name: 'name', dir: 'asc' }] }),
|
|
2295
|
-
createQueryView('Draft', `@${i18n}:terms.workflow.draft`, true, {
|
|
2296
|
-
conditions: [
|
|
2297
|
-
{
|
|
2298
|
-
name: 'status',
|
|
2299
|
-
operator: {
|
|
2300
|
-
type: 'equal',
|
|
2301
|
-
},
|
|
2302
|
-
value: 'Draft',
|
|
2303
|
-
},
|
|
2304
|
-
],
|
|
2305
|
-
}),
|
|
2306
|
-
createQueryView('PendingReview', `@${i18n}:terms.workflow.pending`, true, {
|
|
2307
|
-
conditions: [
|
|
2308
|
-
{
|
|
2309
|
-
name: 'status',
|
|
2310
|
-
operator: {
|
|
2311
|
-
type: 'equal',
|
|
2312
|
-
},
|
|
2313
|
-
value: 'PendingReview',
|
|
2314
|
-
},
|
|
2315
|
-
],
|
|
2316
|
-
}),
|
|
2317
|
-
createQueryView('Reviewed', `@${i18n}:terms.workflow.reviewed`, true, {
|
|
2318
|
-
conditions: [
|
|
2319
|
-
{
|
|
2320
|
-
name: 'status',
|
|
2321
|
-
operator: {
|
|
2322
|
-
type: 'equal',
|
|
2323
|
-
},
|
|
2324
|
-
value: 'Reviewed',
|
|
2325
|
-
},
|
|
2326
|
-
],
|
|
2327
|
-
}),
|
|
2328
|
-
],
|
|
2329
|
-
},
|
|
2330
|
-
},
|
|
2331
|
-
},
|
|
2332
|
-
};
|
|
2333
|
-
return entityDef;
|
|
2334
|
-
}
|
|
2335
|
-
|
|
2336
|
-
class AXMFolderService extends AXMEntityCrudServiceImpl {
|
|
2337
|
-
}
|
|
2338
|
-
class AXMFolderServiceImpl extends AXMFolderService {
|
|
2339
|
-
constructor() {
|
|
2340
|
-
super(`${RootConfig.module.name}.${RootConfig.entities.folder.name}`);
|
|
2341
|
-
}
|
|
2342
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2343
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderServiceImpl }); }
|
|
2344
|
-
}
|
|
2345
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderServiceImpl, decorators: [{
|
|
2346
|
-
type: Injectable
|
|
2347
|
-
}], ctorParameters: () => [] });
|
|
2348
|
-
|
|
2349
|
-
async function folderFactory(injector) {
|
|
2350
|
-
const dataService = injector.get(AXMFolderService);
|
|
2351
|
-
const entityDef = {
|
|
2352
|
-
module: RootConfig.module.name,
|
|
2353
|
-
name: RootConfig.entities.folder.name,
|
|
2354
|
-
title: RootConfig.entities.folder.title,
|
|
2355
|
-
formats: {
|
|
2356
|
-
individual: RootConfig.entities.folder.title,
|
|
2357
|
-
plural: RootConfig.entities.folder.titlePlural,
|
|
2358
|
-
searchResult: {
|
|
2359
|
-
title: '{{ title }}',
|
|
2360
|
-
description: RootConfig.module.title,
|
|
2361
|
-
},
|
|
2362
|
-
},
|
|
2363
|
-
relatedEntities: [],
|
|
2364
|
-
groups: [
|
|
2365
|
-
{
|
|
2366
|
-
id: 'section',
|
|
2367
|
-
title: RootConfig.entities.folder.title,
|
|
2368
|
-
},
|
|
2369
|
-
],
|
|
2370
|
-
properties: [
|
|
2371
|
-
{
|
|
2372
|
-
name: 'name',
|
|
2373
|
-
title: '@general:terms.common.name',
|
|
2374
|
-
groupId: 'section',
|
|
2375
|
-
options: {
|
|
2376
|
-
sort: {
|
|
2377
|
-
enabled: true,
|
|
2378
|
-
},
|
|
2379
|
-
},
|
|
2380
|
-
schema: {
|
|
2381
|
-
dataType: 'string',
|
|
2382
|
-
interface: {
|
|
2383
|
-
type: AXPWidgetsCatalog.text,
|
|
2384
|
-
},
|
|
2385
|
-
},
|
|
2386
|
-
validations: [
|
|
2387
|
-
{
|
|
2388
|
-
rule: 'required',
|
|
2389
|
-
},
|
|
2390
|
-
],
|
|
2391
|
-
},
|
|
2392
|
-
{
|
|
2393
|
-
name: 'title',
|
|
2394
|
-
title: '@general:terms.common.title',
|
|
2395
|
-
groupId: 'section',
|
|
2396
|
-
schema: {
|
|
2397
|
-
dataType: 'string',
|
|
2398
|
-
interface: {
|
|
2399
|
-
type: AXPWidgetsCatalog.text,
|
|
2400
|
-
},
|
|
2401
|
-
},
|
|
2402
|
-
validations: [
|
|
2403
|
-
{
|
|
2404
|
-
rule: 'required',
|
|
2405
|
-
},
|
|
2406
|
-
],
|
|
2407
|
-
},
|
|
2408
|
-
],
|
|
2409
|
-
columns: [{ name: 'name' }, { name: 'title' }],
|
|
2410
|
-
commands: {
|
|
2411
|
-
create: {
|
|
2412
|
-
execute: async (data) => {
|
|
2413
|
-
const res = await dataService.insertOne(data);
|
|
2414
|
-
return { id: res };
|
|
2415
|
-
},
|
|
2416
|
-
},
|
|
2417
|
-
delete: {
|
|
2418
|
-
execute: async (id) => {
|
|
2419
|
-
return await dataService.deleteOne(id);
|
|
2420
|
-
},
|
|
2421
|
-
},
|
|
2422
|
-
update: {
|
|
2423
|
-
execute: async (data) => {
|
|
2424
|
-
return await dataService.updateOne(data.id, data);
|
|
2425
|
-
},
|
|
2426
|
-
},
|
|
2427
|
-
},
|
|
2428
|
-
queries: {
|
|
2429
|
-
byKey: {
|
|
2430
|
-
execute: async (id) => {
|
|
2431
|
-
return await dataService.getOne(id);
|
|
2432
|
-
},
|
|
2433
|
-
type: AXPEntityQueryType.Single,
|
|
2434
|
-
},
|
|
2435
|
-
list: {
|
|
2436
|
-
execute: async (e) => {
|
|
2437
|
-
return await dataService.query(e);
|
|
2438
|
-
},
|
|
2439
|
-
type: AXPEntityQueryType.List,
|
|
2440
|
-
},
|
|
2441
|
-
},
|
|
2442
|
-
interfaces: {
|
|
2443
|
-
master: {
|
|
2444
|
-
create: {
|
|
2445
|
-
sections: [
|
|
2446
|
-
{
|
|
2447
|
-
id: 'section',
|
|
2448
|
-
},
|
|
2449
|
-
],
|
|
2450
|
-
properties: [
|
|
2451
|
-
{
|
|
2452
|
-
name: 'name',
|
|
2453
|
-
layout: {
|
|
2454
|
-
positions: {
|
|
2455
|
-
lg: {
|
|
2456
|
-
colSpan: 6,
|
|
2457
|
-
},
|
|
2458
|
-
},
|
|
2459
|
-
},
|
|
2460
|
-
},
|
|
2461
|
-
{
|
|
2462
|
-
name: 'title',
|
|
2463
|
-
layout: {
|
|
2464
|
-
positions: {
|
|
2465
|
-
lg: {
|
|
2466
|
-
colSpan: 6,
|
|
2467
|
-
},
|
|
2468
|
-
},
|
|
2469
|
-
},
|
|
2470
|
-
},
|
|
2471
|
-
],
|
|
2472
|
-
},
|
|
2473
|
-
update: {
|
|
2474
|
-
sections: [
|
|
2475
|
-
{
|
|
2476
|
-
id: 'section',
|
|
2477
|
-
},
|
|
2478
|
-
],
|
|
2479
|
-
properties: [
|
|
2480
|
-
{
|
|
2481
|
-
name: 'name',
|
|
2482
|
-
layout: {
|
|
2483
|
-
positions: {
|
|
2484
|
-
lg: {
|
|
2485
|
-
colSpan: 6,
|
|
2486
|
-
},
|
|
2487
|
-
},
|
|
2488
|
-
},
|
|
2489
|
-
},
|
|
2490
|
-
{
|
|
2491
|
-
name: 'title',
|
|
2492
|
-
layout: {
|
|
2493
|
-
positions: {
|
|
2494
|
-
lg: {
|
|
2495
|
-
colSpan: 6,
|
|
2496
|
-
},
|
|
2497
|
-
},
|
|
2498
|
-
},
|
|
2499
|
-
},
|
|
2500
|
-
],
|
|
2501
|
-
},
|
|
2502
|
-
single: {
|
|
2503
|
-
title: '{{title}}',
|
|
2504
|
-
sections: [
|
|
2505
|
-
{
|
|
2506
|
-
id: 'section',
|
|
2507
|
-
layout: {
|
|
2508
|
-
positions: {
|
|
2509
|
-
lg: {
|
|
2510
|
-
colSpan: 12,
|
|
2511
|
-
},
|
|
2512
|
-
},
|
|
2513
|
-
},
|
|
2514
|
-
},
|
|
2515
|
-
],
|
|
2516
|
-
properties: [
|
|
2517
|
-
{
|
|
2518
|
-
name: 'name',
|
|
2519
|
-
layout: {
|
|
2520
|
-
positions: {
|
|
2521
|
-
lg: {
|
|
2522
|
-
colSpan: 6,
|
|
2523
|
-
},
|
|
2524
|
-
},
|
|
2525
|
-
},
|
|
2526
|
-
},
|
|
2527
|
-
{
|
|
2528
|
-
name: 'title',
|
|
657
|
+
name: 'type',
|
|
2529
658
|
layout: {
|
|
2530
659
|
positions: {
|
|
2531
660
|
lg: {
|
|
2532
|
-
colSpan:
|
|
2533
|
-
},
|
|
2534
|
-
},
|
|
2535
|
-
},
|
|
2536
|
-
},
|
|
2537
|
-
],
|
|
2538
|
-
actions: [...entityMasterRecordActions()],
|
|
2539
|
-
},
|
|
2540
|
-
list: {
|
|
2541
|
-
actions: [...entityMasterCrudActions()],
|
|
2542
|
-
views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
|
|
2543
|
-
},
|
|
2544
|
-
},
|
|
2545
|
-
},
|
|
2546
|
-
};
|
|
2547
|
-
return entityDef;
|
|
2548
|
-
}
|
|
2549
|
-
|
|
2550
|
-
class AXMFolderEntityModule {
|
|
2551
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2552
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderEntityModule }); }
|
|
2553
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderEntityModule, providers: [
|
|
2554
|
-
{
|
|
2555
|
-
provide: AXMFolderService,
|
|
2556
|
-
useClass: AXMFolderServiceImpl,
|
|
2557
|
-
},
|
|
2558
|
-
] }); }
|
|
2559
|
-
}
|
|
2560
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderEntityModule, decorators: [{
|
|
2561
|
-
type: NgModule,
|
|
2562
|
-
args: [{
|
|
2563
|
-
imports: [],
|
|
2564
|
-
exports: [],
|
|
2565
|
-
declarations: [],
|
|
2566
|
-
providers: [
|
|
2567
|
-
{
|
|
2568
|
-
provide: AXMFolderService,
|
|
2569
|
-
useClass: AXMFolderServiceImpl,
|
|
2570
|
-
},
|
|
2571
|
-
],
|
|
2572
|
-
}]
|
|
2573
|
-
}] });
|
|
2574
|
-
|
|
2575
|
-
class AXMReviewService extends AXMEntityCrudServiceImpl {
|
|
2576
|
-
}
|
|
2577
|
-
class AXMReviewServiceImpl extends AXMReviewService {
|
|
2578
|
-
constructor() {
|
|
2579
|
-
super(`${RootConfig.module.name}.${RootConfig.entities.review.name}`);
|
|
2580
|
-
}
|
|
2581
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMReviewServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2582
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMReviewServiceImpl }); }
|
|
2583
|
-
}
|
|
2584
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMReviewServiceImpl, decorators: [{
|
|
2585
|
-
type: Injectable
|
|
2586
|
-
}], ctorParameters: () => [] });
|
|
2587
|
-
|
|
2588
|
-
// Helper function to update document status based on review status
|
|
2589
|
-
async function updateDocumentStatus(documentId, reviewStatus, injector) {
|
|
2590
|
-
try {
|
|
2591
|
-
// Import document service dynamically to avoid circular dependencies
|
|
2592
|
-
const { AXMDocumentService } = await Promise.resolve().then(function () { return document_service; });
|
|
2593
|
-
const documentService = injector.get(AXMDocumentService);
|
|
2594
|
-
// Map review status to document workflow phase
|
|
2595
|
-
let documentStatus;
|
|
2596
|
-
switch (reviewStatus) {
|
|
2597
|
-
case 'Approved':
|
|
2598
|
-
documentStatus = 'Reviewed';
|
|
2599
|
-
break;
|
|
2600
|
-
case 'Rejected':
|
|
2601
|
-
documentStatus = 'Rejected';
|
|
2602
|
-
break;
|
|
2603
|
-
case 'Pending':
|
|
2604
|
-
documentStatus = 'PendingReview';
|
|
2605
|
-
break;
|
|
2606
|
-
default:
|
|
2607
|
-
documentStatus = 'PendingReview';
|
|
2608
|
-
}
|
|
2609
|
-
// Update the document status
|
|
2610
|
-
await documentService.updateOne(documentId, { status: documentStatus });
|
|
2611
|
-
}
|
|
2612
|
-
catch (error) {
|
|
2613
|
-
console.error('Failed to update document status:', error);
|
|
2614
|
-
// Don't throw error to avoid breaking the review process
|
|
2615
|
-
}
|
|
2616
|
-
}
|
|
2617
|
-
async function reviewFactory(injector) {
|
|
2618
|
-
const dataService = injector.get(AXMReviewService);
|
|
2619
|
-
const i18n = RootConfig.config.i18n;
|
|
2620
|
-
const entityDef = {
|
|
2621
|
-
module: RootConfig.module.name,
|
|
2622
|
-
name: RootConfig.entities.review.name,
|
|
2623
|
-
title: RootConfig.entities.review.title,
|
|
2624
|
-
icon: RootConfig.entities.review.icon,
|
|
2625
|
-
formats: {
|
|
2626
|
-
individual: RootConfig.entities.review.title,
|
|
2627
|
-
plural: RootConfig.entities.review.titlePlural,
|
|
2628
|
-
searchResult: {
|
|
2629
|
-
title: '{{ title }}',
|
|
2630
|
-
description: RootConfig.module.title,
|
|
2631
|
-
},
|
|
2632
|
-
},
|
|
2633
|
-
relatedEntities: [],
|
|
2634
|
-
groups: [
|
|
2635
|
-
{
|
|
2636
|
-
id: 'section',
|
|
2637
|
-
title: RootConfig.entities.review.title,
|
|
2638
|
-
},
|
|
2639
|
-
],
|
|
2640
|
-
properties: [
|
|
2641
|
-
{
|
|
2642
|
-
name: 'version',
|
|
2643
|
-
title: `@${i18n}:terms.common.version`,
|
|
2644
|
-
groupId: 'section',
|
|
2645
|
-
schema: {
|
|
2646
|
-
dataType: 'number',
|
|
2647
|
-
interface: {
|
|
2648
|
-
type: AXPWidgetsCatalog.textBlockLayout,
|
|
2649
|
-
options: {
|
|
2650
|
-
content: `{{ context.eval('version') }}`,
|
|
2651
|
-
},
|
|
2652
|
-
},
|
|
2653
|
-
},
|
|
2654
|
-
},
|
|
2655
|
-
{
|
|
2656
|
-
name: 'documentId',
|
|
2657
|
-
groupId: 'section',
|
|
2658
|
-
title: `@${i18n}:entities.document.title`,
|
|
2659
|
-
options: {
|
|
2660
|
-
sort: {
|
|
2661
|
-
enabled: true,
|
|
2662
|
-
},
|
|
2663
|
-
filter: {
|
|
2664
|
-
advance: {
|
|
2665
|
-
enabled: true,
|
|
2666
|
-
},
|
|
2667
|
-
inline: {
|
|
2668
|
-
enabled: true,
|
|
2669
|
-
},
|
|
2670
|
-
},
|
|
2671
|
-
},
|
|
2672
|
-
schema: {
|
|
2673
|
-
dataType: 'string',
|
|
2674
|
-
interface: {
|
|
2675
|
-
type: AXPWidgetsCatalog.lookup,
|
|
2676
|
-
options: {
|
|
2677
|
-
entity: `${RootConfig.module.name}.${RootConfig.entities.document.name}`,
|
|
2678
|
-
multiple: false,
|
|
2679
|
-
filter: "{{ { logic:'and' , filters: [ { field:'documentType.requiresReview' , value: true , operator: { type:'equal' } },] } }}",
|
|
2680
|
-
textField: 'name',
|
|
2681
|
-
valueField: 'id',
|
|
2682
|
-
expose: [
|
|
2683
|
-
{ source: 'id', target: 'document.id' },
|
|
2684
|
-
{ source: 'name', target: 'document.name' },
|
|
2685
|
-
{ source: 'title', target: 'document.title' },
|
|
2686
|
-
{ source: 'version', target: 'document.version' },
|
|
2687
|
-
],
|
|
2688
|
-
},
|
|
2689
|
-
triggers: [
|
|
2690
|
-
{
|
|
2691
|
-
event: "{{ events.context('documentId') }}",
|
|
2692
|
-
action: "{{ context.set('version' , context.eval('document').version ) }}",
|
|
2693
|
-
},
|
|
2694
|
-
],
|
|
2695
|
-
},
|
|
2696
|
-
},
|
|
2697
|
-
validations: [
|
|
2698
|
-
{
|
|
2699
|
-
rule: 'required',
|
|
2700
|
-
},
|
|
2701
|
-
],
|
|
2702
|
-
},
|
|
2703
|
-
{
|
|
2704
|
-
name: 'reviewerId',
|
|
2705
|
-
title: `@${i18n}:terms.common.reviewer`,
|
|
2706
|
-
groupId: 'section',
|
|
2707
|
-
schema: {
|
|
2708
|
-
dataType: 'string',
|
|
2709
|
-
defaultValue: '{{ session.currentUser().id }}',
|
|
2710
|
-
interface: {
|
|
2711
|
-
type: AXPWidgetsCatalog.lookup,
|
|
2712
|
-
options: {
|
|
2713
|
-
entity: 'SecurityManagement.User',
|
|
2714
|
-
multiple: false,
|
|
2715
|
-
textField: 'username',
|
|
2716
|
-
valueField: 'id',
|
|
2717
|
-
expose: [
|
|
2718
|
-
{ source: 'id', target: 'reviewer.id' },
|
|
2719
|
-
{ source: 'username', target: 'reviewer.username' },
|
|
2720
|
-
],
|
|
2721
|
-
},
|
|
2722
|
-
},
|
|
2723
|
-
},
|
|
2724
|
-
validations: [
|
|
2725
|
-
{
|
|
2726
|
-
rule: 'required',
|
|
2727
|
-
},
|
|
2728
|
-
],
|
|
2729
|
-
},
|
|
2730
|
-
{
|
|
2731
|
-
name: 'status',
|
|
2732
|
-
title: `@${i18n}:terms.workflow.approve`,
|
|
2733
|
-
groupId: 'section',
|
|
2734
|
-
schema: {
|
|
2735
|
-
dataType: 'string',
|
|
2736
|
-
interface: {
|
|
2737
|
-
type: AXPWidgetsCatalog.toggle,
|
|
2738
|
-
options: {},
|
|
2739
|
-
},
|
|
2740
|
-
},
|
|
2741
|
-
validations: [
|
|
2742
|
-
{
|
|
2743
|
-
rule: 'required',
|
|
2744
|
-
},
|
|
2745
|
-
],
|
|
2746
|
-
},
|
|
2747
|
-
{
|
|
2748
|
-
name: 'comment',
|
|
2749
|
-
title: `@${i18n}:terms.common.comment`,
|
|
2750
|
-
groupId: 'section',
|
|
2751
|
-
schema: {
|
|
2752
|
-
dataType: 'string',
|
|
2753
|
-
interface: {
|
|
2754
|
-
type: AXPWidgetsCatalog.richText,
|
|
2755
|
-
},
|
|
2756
|
-
},
|
|
2757
|
-
},
|
|
2758
|
-
{
|
|
2759
|
-
name: 'reviewedAt',
|
|
2760
|
-
title: `@${i18n}:terms.timestamps.reviewed-at`,
|
|
2761
|
-
groupId: 'section',
|
|
2762
|
-
options: {
|
|
2763
|
-
sort: {
|
|
2764
|
-
enabled: true,
|
|
2765
|
-
},
|
|
2766
|
-
filter: {
|
|
2767
|
-
advance: {
|
|
2768
|
-
enabled: true,
|
|
2769
|
-
},
|
|
2770
|
-
inline: {
|
|
2771
|
-
enabled: false,
|
|
2772
|
-
},
|
|
2773
|
-
},
|
|
2774
|
-
},
|
|
2775
|
-
schema: {
|
|
2776
|
-
defaultValue: '{{ variables.execute("now") }}',
|
|
2777
|
-
dataType: 'date',
|
|
2778
|
-
interface: {
|
|
2779
|
-
type: AXPWidgetsCatalog.dateTime,
|
|
2780
|
-
options: {
|
|
2781
|
-
showTime: true,
|
|
2782
|
-
},
|
|
2783
|
-
},
|
|
2784
|
-
},
|
|
2785
|
-
validations: [
|
|
2786
|
-
{
|
|
2787
|
-
rule: 'required',
|
|
2788
|
-
},
|
|
2789
|
-
],
|
|
2790
|
-
},
|
|
2791
|
-
{
|
|
2792
|
-
name: 'auditInfo.updated.at',
|
|
2793
|
-
title: `@${i18n}:terms.timestamps.modified-at`,
|
|
2794
|
-
groupId: 'section',
|
|
2795
|
-
options: {
|
|
2796
|
-
sort: {
|
|
2797
|
-
enabled: true,
|
|
2798
|
-
},
|
|
2799
|
-
filter: {
|
|
2800
|
-
advance: {
|
|
2801
|
-
enabled: true,
|
|
2802
|
-
},
|
|
2803
|
-
inline: {
|
|
2804
|
-
enabled: false,
|
|
2805
|
-
},
|
|
2806
|
-
},
|
|
2807
|
-
},
|
|
2808
|
-
schema: {
|
|
2809
|
-
dataType: 'date',
|
|
2810
|
-
interface: {
|
|
2811
|
-
type: AXPWidgetsCatalog.dateTime,
|
|
2812
|
-
options: {
|
|
2813
|
-
showTime: true,
|
|
2814
|
-
},
|
|
2815
|
-
},
|
|
2816
|
-
},
|
|
2817
|
-
},
|
|
2818
|
-
{
|
|
2819
|
-
name: 'auditInfo.updated.by',
|
|
2820
|
-
title: `@${i18n}:terms.timestamps.modified-by`,
|
|
2821
|
-
groupId: 'section',
|
|
2822
|
-
options: {
|
|
2823
|
-
sort: {
|
|
2824
|
-
enabled: true,
|
|
2825
|
-
},
|
|
2826
|
-
filter: {
|
|
2827
|
-
advance: {
|
|
2828
|
-
enabled: true,
|
|
2829
|
-
},
|
|
2830
|
-
inline: {
|
|
2831
|
-
enabled: true,
|
|
2832
|
-
},
|
|
2833
|
-
},
|
|
2834
|
-
},
|
|
2835
|
-
schema: {
|
|
2836
|
-
dataType: 'string',
|
|
2837
|
-
interface: {
|
|
2838
|
-
type: AXPWidgetsCatalog.lookup,
|
|
2839
|
-
options: {
|
|
2840
|
-
entity: 'SecurityManagement.User',
|
|
2841
|
-
multiple: false,
|
|
2842
|
-
textField: 'username',
|
|
2843
|
-
valueField: 'id',
|
|
2844
|
-
expose: [
|
|
2845
|
-
{ source: 'id', target: 'auditInfo.updated.by.id' },
|
|
2846
|
-
{ source: 'username', target: 'auditInfo.updated.by.username' },
|
|
2847
|
-
],
|
|
661
|
+
colSpan: 12,
|
|
662
|
+
},
|
|
663
|
+
},
|
|
664
|
+
},
|
|
2848
665
|
},
|
|
2849
|
-
|
|
2850
|
-
},
|
|
2851
|
-
},
|
|
2852
|
-
],
|
|
2853
|
-
columns: [
|
|
2854
|
-
{ name: 'reviewerId', options: { dataPath: 'reviewer.title' } },
|
|
2855
|
-
{ name: 'status' },
|
|
2856
|
-
{ name: 'comment' },
|
|
2857
|
-
{ name: 'reviewedAt' },
|
|
2858
|
-
{ name: 'auditInfo.updated.at' },
|
|
2859
|
-
{ name: 'auditInfo.updated.by', options: { dataPath: 'auditInfo.updated.by.fullName' } },
|
|
2860
|
-
],
|
|
2861
|
-
commands: {
|
|
2862
|
-
create: {
|
|
2863
|
-
execute: async (data) => {
|
|
2864
|
-
// Set reviewedAt to current date if not provided
|
|
2865
|
-
if (!data.reviewedAt) {
|
|
2866
|
-
data.reviewedAt = new Date();
|
|
2867
|
-
}
|
|
2868
|
-
//TODO for test
|
|
2869
|
-
data.reviewStatus = 'Approved';
|
|
2870
|
-
// Create the review record
|
|
2871
|
-
const res = await dataService.insertOne(data);
|
|
2872
|
-
// Update document status based on review status
|
|
2873
|
-
await updateDocumentStatus(data.documentId, data.reviewStatus, injector);
|
|
2874
|
-
return { id: res };
|
|
2875
|
-
},
|
|
2876
|
-
},
|
|
2877
|
-
delete: {
|
|
2878
|
-
execute: async (id) => {
|
|
2879
|
-
return await dataService.deleteOne(id);
|
|
2880
|
-
},
|
|
2881
|
-
},
|
|
2882
|
-
update: {
|
|
2883
|
-
execute: async (data) => {
|
|
2884
|
-
// Update reviewedAt to current date
|
|
2885
|
-
data.reviewedAt = new Date();
|
|
2886
|
-
//TODO for test
|
|
2887
|
-
data.reviewStatus = 'Approved';
|
|
2888
|
-
// Update the review record
|
|
2889
|
-
const result = await dataService.updateOne(data.id, data);
|
|
2890
|
-
// Update document status based on review status
|
|
2891
|
-
await updateDocumentStatus(data.documentId, data.reviewStatus, injector);
|
|
2892
|
-
return result;
|
|
2893
|
-
},
|
|
2894
|
-
},
|
|
2895
|
-
},
|
|
2896
|
-
queries: {
|
|
2897
|
-
byKey: {
|
|
2898
|
-
execute: async (id) => {
|
|
2899
|
-
const review = await dataService.getOne(id);
|
|
2900
|
-
return {
|
|
2901
|
-
...review,
|
|
2902
|
-
reviewedAt: review.reviewedAt ?? new Date(),
|
|
2903
|
-
};
|
|
2904
|
-
},
|
|
2905
|
-
type: AXPEntityQueryType.Single,
|
|
2906
|
-
},
|
|
2907
|
-
list: {
|
|
2908
|
-
execute: async (e) => {
|
|
2909
|
-
return await dataService.query(e);
|
|
666
|
+
],
|
|
2910
667
|
},
|
|
2911
|
-
|
|
2912
|
-
},
|
|
2913
|
-
},
|
|
2914
|
-
interfaces: {
|
|
2915
|
-
master: {
|
|
2916
|
-
create: {
|
|
668
|
+
update: {
|
|
2917
669
|
sections: [
|
|
2918
670
|
{
|
|
2919
|
-
id: '
|
|
671
|
+
id: 'basic-info',
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
id: 'management',
|
|
2920
675
|
},
|
|
2921
676
|
],
|
|
2922
677
|
properties: [
|
|
2923
678
|
{
|
|
2924
|
-
name: '
|
|
679
|
+
name: 'name',
|
|
2925
680
|
layout: {
|
|
2926
681
|
positions: {
|
|
2927
682
|
lg: {
|
|
2928
|
-
colSpan:
|
|
2929
|
-
order: 1,
|
|
683
|
+
colSpan: 6,
|
|
2930
684
|
},
|
|
2931
685
|
},
|
|
2932
686
|
},
|
|
2933
687
|
},
|
|
2934
688
|
{
|
|
2935
|
-
name: '
|
|
689
|
+
name: 'title',
|
|
2936
690
|
layout: {
|
|
2937
691
|
positions: {
|
|
2938
692
|
lg: {
|
|
2939
693
|
colSpan: 6,
|
|
2940
|
-
order: 5,
|
|
2941
694
|
},
|
|
2942
695
|
},
|
|
2943
696
|
},
|
|
2944
697
|
},
|
|
2945
698
|
{
|
|
2946
|
-
name: '
|
|
699
|
+
name: 'maxSize',
|
|
2947
700
|
layout: {
|
|
2948
701
|
positions: {
|
|
2949
702
|
lg: {
|
|
2950
703
|
colSpan: 6,
|
|
2951
|
-
order: 2,
|
|
2952
704
|
},
|
|
2953
705
|
},
|
|
2954
706
|
},
|
|
2955
707
|
},
|
|
2956
708
|
{
|
|
2957
|
-
name: '
|
|
709
|
+
name: 'isEncrypted',
|
|
2958
710
|
layout: {
|
|
2959
711
|
positions: {
|
|
2960
712
|
lg: {
|
|
2961
713
|
colSpan: 6,
|
|
2962
|
-
order: 3,
|
|
2963
714
|
},
|
|
2964
715
|
},
|
|
2965
716
|
},
|
|
2966
717
|
},
|
|
2967
718
|
{
|
|
2968
|
-
name: '
|
|
719
|
+
name: 'enableExpiration',
|
|
2969
720
|
layout: {
|
|
2970
721
|
positions: {
|
|
2971
722
|
lg: {
|
|
2972
|
-
colSpan:
|
|
2973
|
-
order: 4,
|
|
723
|
+
colSpan: 6,
|
|
2974
724
|
},
|
|
2975
725
|
},
|
|
2976
726
|
},
|
|
2977
727
|
},
|
|
2978
728
|
{
|
|
2979
|
-
name: '
|
|
729
|
+
name: 'requiresReview',
|
|
2980
730
|
layout: {
|
|
2981
731
|
positions: {
|
|
2982
732
|
lg: {
|
|
2983
733
|
colSpan: 6,
|
|
2984
|
-
order: 6,
|
|
2985
734
|
},
|
|
2986
735
|
},
|
|
2987
736
|
},
|
|
2988
737
|
},
|
|
2989
|
-
],
|
|
2990
|
-
},
|
|
2991
|
-
update: {
|
|
2992
|
-
sections: [
|
|
2993
|
-
{
|
|
2994
|
-
id: 'section',
|
|
2995
|
-
},
|
|
2996
|
-
],
|
|
2997
|
-
properties: [
|
|
2998
738
|
{
|
|
2999
|
-
name: '
|
|
739
|
+
name: 'enableVersioning',
|
|
3000
740
|
layout: {
|
|
3001
741
|
positions: {
|
|
3002
742
|
lg: {
|
|
3003
743
|
colSpan: 6,
|
|
3004
|
-
order: 5,
|
|
3005
744
|
},
|
|
3006
745
|
},
|
|
3007
746
|
},
|
|
3008
747
|
},
|
|
3009
748
|
{
|
|
3010
|
-
name: '
|
|
749
|
+
name: 'type',
|
|
3011
750
|
layout: {
|
|
3012
751
|
positions: {
|
|
3013
752
|
lg: {
|
|
3014
753
|
colSpan: 12,
|
|
3015
|
-
order: 4,
|
|
3016
754
|
},
|
|
3017
755
|
},
|
|
3018
756
|
},
|
|
3019
757
|
},
|
|
758
|
+
],
|
|
759
|
+
},
|
|
760
|
+
single: {
|
|
761
|
+
title: '{{title}}',
|
|
762
|
+
sections: [
|
|
3020
763
|
{
|
|
3021
|
-
|
|
764
|
+
id: 'basic-info',
|
|
3022
765
|
layout: {
|
|
3023
766
|
positions: {
|
|
3024
767
|
lg: {
|
|
3025
|
-
colSpan:
|
|
3026
|
-
order: 6,
|
|
768
|
+
colSpan: 12,
|
|
3027
769
|
},
|
|
3028
770
|
},
|
|
3029
771
|
},
|
|
3030
772
|
},
|
|
3031
|
-
],
|
|
3032
|
-
},
|
|
3033
|
-
single: {
|
|
3034
|
-
title: '{{document.name}} - Review',
|
|
3035
|
-
sections: [
|
|
3036
773
|
{
|
|
3037
|
-
id: '
|
|
774
|
+
id: 'management',
|
|
3038
775
|
layout: {
|
|
3039
776
|
positions: {
|
|
3040
777
|
lg: {
|
|
@@ -3046,104 +783,101 @@ async function reviewFactory(injector) {
|
|
|
3046
783
|
],
|
|
3047
784
|
properties: [
|
|
3048
785
|
{
|
|
3049
|
-
name: '
|
|
3050
|
-
dataPath: 'document',
|
|
786
|
+
name: 'name',
|
|
3051
787
|
layout: {
|
|
3052
788
|
positions: {
|
|
3053
789
|
lg: {
|
|
3054
|
-
colSpan:
|
|
3055
|
-
order: 1,
|
|
790
|
+
colSpan: 6,
|
|
3056
791
|
},
|
|
3057
792
|
},
|
|
3058
793
|
},
|
|
3059
794
|
},
|
|
3060
795
|
{
|
|
3061
|
-
name: '
|
|
796
|
+
name: 'title',
|
|
3062
797
|
layout: {
|
|
3063
798
|
positions: {
|
|
3064
799
|
lg: {
|
|
3065
800
|
colSpan: 6,
|
|
3066
|
-
order: 5,
|
|
3067
801
|
},
|
|
3068
802
|
},
|
|
3069
803
|
},
|
|
3070
804
|
},
|
|
3071
805
|
{
|
|
3072
|
-
name: '
|
|
806
|
+
name: 'maxSize',
|
|
3073
807
|
layout: {
|
|
3074
808
|
positions: {
|
|
3075
809
|
lg: {
|
|
3076
810
|
colSpan: 6,
|
|
3077
|
-
order: 2,
|
|
3078
811
|
},
|
|
3079
812
|
},
|
|
3080
813
|
},
|
|
3081
814
|
},
|
|
3082
815
|
{
|
|
3083
|
-
name: '
|
|
816
|
+
name: 'isEncrypted',
|
|
3084
817
|
layout: {
|
|
3085
818
|
positions: {
|
|
3086
819
|
lg: {
|
|
3087
820
|
colSpan: 6,
|
|
3088
|
-
order: 3,
|
|
3089
821
|
},
|
|
3090
822
|
},
|
|
3091
823
|
},
|
|
3092
824
|
},
|
|
3093
825
|
{
|
|
3094
|
-
name: '
|
|
826
|
+
name: 'enableExpiration',
|
|
3095
827
|
layout: {
|
|
3096
828
|
positions: {
|
|
3097
829
|
lg: {
|
|
3098
|
-
colSpan:
|
|
3099
|
-
order: 4,
|
|
830
|
+
colSpan: 6,
|
|
3100
831
|
},
|
|
3101
832
|
},
|
|
3102
833
|
},
|
|
3103
834
|
},
|
|
3104
835
|
{
|
|
3105
|
-
name: '
|
|
836
|
+
name: 'requiresReview',
|
|
3106
837
|
layout: {
|
|
3107
838
|
positions: {
|
|
3108
839
|
lg: {
|
|
3109
840
|
colSpan: 6,
|
|
3110
|
-
order: 6,
|
|
3111
841
|
},
|
|
3112
842
|
},
|
|
3113
843
|
},
|
|
3114
844
|
},
|
|
3115
845
|
{
|
|
3116
|
-
name: '
|
|
846
|
+
name: 'enableVersioning',
|
|
3117
847
|
layout: {
|
|
3118
848
|
positions: {
|
|
3119
849
|
lg: {
|
|
3120
850
|
colSpan: 6,
|
|
3121
|
-
order: 7,
|
|
3122
851
|
},
|
|
3123
852
|
},
|
|
3124
853
|
},
|
|
3125
854
|
},
|
|
855
|
+
// {
|
|
856
|
+
// name: 'meta',
|
|
857
|
+
// layout: {
|
|
858
|
+
// positions: {
|
|
859
|
+
// lg: {
|
|
860
|
+
// colSpan: 12,
|
|
861
|
+
// },
|
|
862
|
+
// },
|
|
863
|
+
// },
|
|
864
|
+
// },
|
|
3126
865
|
{
|
|
3127
|
-
name: '
|
|
866
|
+
name: 'type',
|
|
3128
867
|
layout: {
|
|
3129
868
|
positions: {
|
|
3130
869
|
lg: {
|
|
3131
|
-
colSpan:
|
|
3132
|
-
order: 8,
|
|
870
|
+
colSpan: 12,
|
|
3133
871
|
},
|
|
3134
872
|
},
|
|
3135
873
|
},
|
|
3136
874
|
},
|
|
3137
875
|
],
|
|
3138
|
-
actions: [],
|
|
876
|
+
actions: [...entityMasterRecordActions()],
|
|
3139
877
|
},
|
|
3140
878
|
list: {
|
|
3141
|
-
actions: [],
|
|
3142
|
-
views: [
|
|
3143
|
-
createAllQueryView({
|
|
3144
|
-
sorts: [{ name: 'reviewedAt', dir: 'desc' }],
|
|
3145
|
-
}),
|
|
3146
|
-
],
|
|
879
|
+
actions: [...entityMasterCrudActions({ edit: true })],
|
|
880
|
+
views: [createAllQueryView()],
|
|
3147
881
|
},
|
|
3148
882
|
},
|
|
3149
883
|
},
|
|
@@ -3151,17 +885,30 @@ async function reviewFactory(injector) {
|
|
|
3151
885
|
return entityDef;
|
|
3152
886
|
}
|
|
3153
887
|
|
|
3154
|
-
class
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
888
|
+
class AXMDocumentTypeService extends AXMEntityCrudServiceImpl {
|
|
889
|
+
}
|
|
890
|
+
class AXMDocumentTypeServiceImpl extends AXMDocumentTypeService {
|
|
891
|
+
constructor() {
|
|
892
|
+
super(`${RootConfig.module.name}.${RootConfig.entities.documentType.name}`);
|
|
893
|
+
}
|
|
894
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentTypeServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
895
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentTypeServiceImpl }); }
|
|
896
|
+
}
|
|
897
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentTypeServiceImpl, decorators: [{
|
|
898
|
+
type: Injectable
|
|
899
|
+
}], ctorParameters: () => [] });
|
|
900
|
+
|
|
901
|
+
class AXMDocumentManagementDocumentTypeEntityModule {
|
|
902
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
903
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule }); }
|
|
904
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, providers: [
|
|
3158
905
|
{
|
|
3159
|
-
provide:
|
|
3160
|
-
useClass:
|
|
906
|
+
provide: AXMDocumentTypeService,
|
|
907
|
+
useClass: AXMDocumentTypeServiceImpl,
|
|
3161
908
|
},
|
|
3162
909
|
] }); }
|
|
3163
910
|
}
|
|
3164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
911
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, decorators: [{
|
|
3165
912
|
type: NgModule,
|
|
3166
913
|
args: [{
|
|
3167
914
|
imports: [],
|
|
@@ -3169,64 +916,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3169
916
|
declarations: [],
|
|
3170
917
|
providers: [
|
|
3171
918
|
{
|
|
3172
|
-
provide:
|
|
3173
|
-
useClass:
|
|
919
|
+
provide: AXMDocumentTypeService,
|
|
920
|
+
useClass: AXMDocumentTypeServiceImpl,
|
|
3174
921
|
},
|
|
3175
922
|
],
|
|
3176
923
|
}]
|
|
3177
924
|
}] });
|
|
3178
925
|
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
926
|
+
/**
|
|
927
|
+
* Minimal entity definition for Folder so the entity registry can resolve
|
|
928
|
+
* DocumentManagement.Folder. Used by AXMFolderService (AXMEntityCrudServiceImpl).
|
|
929
|
+
* No list/form UI; folder tree is handled by document-explorer.
|
|
930
|
+
*/
|
|
931
|
+
async function folderEntityFactory(_injector) {
|
|
932
|
+
const entityDef = {
|
|
933
|
+
module: RootConfig.module.name,
|
|
934
|
+
name: RootConfig.entities.folder.name,
|
|
935
|
+
title: RootConfig.entities.folder.title,
|
|
936
|
+
parentKey: 'parentId',
|
|
937
|
+
formats: {
|
|
938
|
+
individual: RootConfig.entities.folder.title,
|
|
939
|
+
plural: RootConfig.entities.folder.titlePlural,
|
|
940
|
+
searchResult: {
|
|
941
|
+
title: '{{ title }}',
|
|
942
|
+
description: RootConfig.module.title,
|
|
943
|
+
},
|
|
944
|
+
},
|
|
945
|
+
relatedEntities: [],
|
|
946
|
+
groups: [],
|
|
947
|
+
properties: [],
|
|
948
|
+
};
|
|
949
|
+
return entityDef;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
var folder_entity = /*#__PURE__*/Object.freeze({
|
|
953
|
+
__proto__: null,
|
|
954
|
+
folderEntityFactory: folderEntityFactory
|
|
955
|
+
});
|
|
956
|
+
|
|
957
|
+
class AXMFolderService extends AXMEntityCrudServiceImpl {
|
|
3183
958
|
}
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
959
|
+
class AXMFolderServiceImpl extends AXMFolderService {
|
|
960
|
+
constructor() {
|
|
961
|
+
super(`${RootConfig.module.name}.${RootConfig.entities.folder.name}`);
|
|
962
|
+
}
|
|
963
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
964
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderServiceImpl }); }
|
|
965
|
+
}
|
|
966
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFolderServiceImpl, decorators: [{
|
|
967
|
+
type: Injectable
|
|
968
|
+
}], ctorParameters: () => [] });
|
|
3193
969
|
|
|
3194
970
|
// Entity Services
|
|
3195
971
|
|
|
3196
972
|
var index = /*#__PURE__*/Object.freeze({
|
|
3197
973
|
__proto__: null,
|
|
3198
|
-
AXMDocumentManagementDocumentEntityModule: AXMDocumentManagementDocumentEntityModule,
|
|
3199
974
|
AXMDocumentManagementDocumentTypeEntityModule: AXMDocumentManagementDocumentTypeEntityModule,
|
|
3200
|
-
AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
|
|
3201
|
-
AXMDocumentManagementDocumentTypeMetaDefinitionEntityService: AXMDocumentManagementDocumentTypeMetaDefinitionEntityService,
|
|
3202
|
-
AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl,
|
|
3203
|
-
AXMDocumentManagementDocumentTypeMetaValueEntityModule: AXMDocumentManagementDocumentTypeMetaValueEntityModule,
|
|
3204
|
-
AXMDocumentManagementDocumentTypeMetaValueEntityService: AXMDocumentManagementDocumentTypeMetaValueEntityService,
|
|
3205
|
-
AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl,
|
|
3206
|
-
AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule,
|
|
3207
|
-
AXMDocumentManagementDocumentTypeStatusDefinitionEntityService: AXMDocumentManagementDocumentTypeStatusDefinitionEntityService,
|
|
3208
|
-
AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl,
|
|
3209
|
-
AXMDocumentReletedEntityModule: AXMDocumentReletedEntityModule,
|
|
3210
975
|
AXMDocumentService: AXMDocumentService,
|
|
3211
976
|
AXMDocumentServiceImpl: AXMDocumentServiceImpl,
|
|
3212
977
|
AXMDocumentTypeService: AXMDocumentTypeService,
|
|
3213
978
|
AXMDocumentTypeServiceImpl: AXMDocumentTypeServiceImpl,
|
|
3214
|
-
AXMFolderEntityModule: AXMFolderEntityModule,
|
|
3215
979
|
AXMFolderService: AXMFolderService,
|
|
3216
980
|
AXMFolderServiceImpl: AXMFolderServiceImpl,
|
|
3217
|
-
|
|
3218
|
-
AXMReviewService: AXMReviewService,
|
|
3219
|
-
AXMReviewServiceImpl: AXMReviewServiceImpl,
|
|
3220
|
-
canTransition: canTransition,
|
|
3221
|
-
documentFactory: documentFactory,
|
|
3222
|
-
documentRelatedFactory: documentRelatedFactory,
|
|
981
|
+
documentEntityFactory: documentEntityFactory,
|
|
3223
982
|
documentTypeFactory: documentTypeFactory,
|
|
3224
|
-
|
|
3225
|
-
documentTypeMetaValueFactory: documentTypeMetaValueFactory,
|
|
3226
|
-
documentTypeStatusDefinitionFactory: documentTypeStatusDefinitionFactory,
|
|
3227
|
-
folderFactory: folderFactory,
|
|
3228
|
-
getNextStatus: getNextStatus,
|
|
3229
|
-
reviewFactory: reviewFactory
|
|
983
|
+
folderEntityFactory: folderEntityFactory
|
|
3230
984
|
});
|
|
3231
985
|
|
|
3232
986
|
class AXMImageFileTypeProvider {
|
|
@@ -3671,14 +1425,14 @@ class AXMFileTypeExtensionWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
3671
1425
|
if (extension.meta) {
|
|
3672
1426
|
for (const meta of extension.meta) {
|
|
3673
1427
|
if (!get(meta, '__node__')) {
|
|
3674
|
-
set
|
|
1428
|
+
set(meta, '__node__', typeof meta.interface == 'function' ? await meta.interface() : meta.interface);
|
|
3675
1429
|
}
|
|
3676
1430
|
}
|
|
3677
1431
|
}
|
|
3678
1432
|
if (fileType.meta) {
|
|
3679
1433
|
for (const meta of fileType.meta) {
|
|
3680
1434
|
if (!get(meta, '__node__')) {
|
|
3681
|
-
set
|
|
1435
|
+
set(meta, '__node__', typeof meta.interface == 'function' ? await meta.interface() : meta.interface);
|
|
3682
1436
|
}
|
|
3683
1437
|
}
|
|
3684
1438
|
}
|
|
@@ -3971,113 +1725,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3971
1725
|
multi: true,
|
|
3972
1726
|
},
|
|
3973
1727
|
{
|
|
3974
|
-
provide: AXP_FILE_TYPE_INFO_PROVIDER,
|
|
3975
|
-
useClass: AXMVideoFileTypeProvider,
|
|
3976
|
-
multi: true,
|
|
3977
|
-
},
|
|
3978
|
-
{
|
|
3979
|
-
provide: AXP_FILE_TYPE_INFO_PROVIDER,
|
|
3980
|
-
useClass: AXMDocumentFileTypeProvider,
|
|
3981
|
-
multi: true,
|
|
3982
|
-
},
|
|
3983
|
-
{
|
|
3984
|
-
provide: AXP_FILE_TYPE_INFO_PROVIDER,
|
|
3985
|
-
useClass: AXMAudioFileTypeProvider,
|
|
3986
|
-
multi: true,
|
|
3987
|
-
},
|
|
3988
|
-
{
|
|
3989
|
-
provide: AXP_FILE_TYPE_INFO_PROVIDER,
|
|
3990
|
-
useClass: AXMCodeFileTypeProvider,
|
|
3991
|
-
multi: true,
|
|
3992
|
-
},
|
|
3993
|
-
{
|
|
3994
|
-
provide: AXP_FILE_TYPE_INFO_PROVIDER,
|
|
3995
|
-
useClass: AXMArchiveFileTypeProvider,
|
|
3996
|
-
multi: true,
|
|
3997
|
-
},
|
|
3998
|
-
],
|
|
3999
|
-
}]
|
|
4000
|
-
}] });
|
|
4001
|
-
|
|
4002
|
-
//#region ---- Imports ----
|
|
4003
|
-
//#endregion
|
|
4004
|
-
/**
|
|
4005
|
-
* File gallery popup component that displays files using the gallery widget.
|
|
4006
|
-
* This component replaces the old file-viewer-popup and uses the same
|
|
4007
|
-
* gallery widget pattern as test8.
|
|
4008
|
-
*/
|
|
4009
|
-
class AXMFileGalleryPopupComponent extends AXBasePageComponent {
|
|
4010
|
-
constructor() {
|
|
4011
|
-
super(...arguments);
|
|
4012
|
-
//#region ---- Class Properties ----
|
|
4013
|
-
/** File list items received from popup data */
|
|
4014
|
-
this.files = signal([], ...(ngDevMode ? [{ debugName: "files" }] : []));
|
|
4015
|
-
/** Starting index for the media viewer */
|
|
4016
|
-
this.startIndex = 0;
|
|
4017
|
-
/** Widget context for the gallery */
|
|
4018
|
-
this.context = signal({}, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
4019
|
-
//#endregion
|
|
4020
|
-
//#region ---- Computed Properties ----
|
|
4021
|
-
/**
|
|
4022
|
-
* Gallery widget node configuration
|
|
4023
|
-
*/
|
|
4024
|
-
this.galleryNode = computed(() => ({
|
|
4025
|
-
type: 'gallery',
|
|
4026
|
-
path: 'galleryFiles',
|
|
4027
|
-
defaultValue: this.files(),
|
|
4028
|
-
options: {
|
|
4029
|
-
thumbnail: true,
|
|
4030
|
-
header: true,
|
|
4031
|
-
fileInfo: true,
|
|
4032
|
-
fullScreenButton: true,
|
|
4033
|
-
allowUpload: false,
|
|
4034
|
-
height: '100%',
|
|
4035
|
-
},
|
|
4036
|
-
}), ...(ngDevMode ? [{ debugName: "galleryNode" }] : []));
|
|
4037
|
-
}
|
|
4038
|
-
//#endregion
|
|
4039
|
-
//#region ---- UI Handlers ----
|
|
4040
|
-
/**
|
|
4041
|
-
* Close the popup
|
|
4042
|
-
*/
|
|
4043
|
-
onClose() {
|
|
4044
|
-
this.close();
|
|
4045
|
-
}
|
|
4046
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFileGalleryPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4047
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AXMFileGalleryPopupComponent, isStandalone: true, selector: "axm-file-gallery-popup", usesInheritance: true, ngImport: i0, template: `
|
|
4048
|
-
<ax-content>
|
|
4049
|
-
<axp-widgets-container class="ax-block ax-h-full" [context]="context()">
|
|
4050
|
-
<ng-container axp-widget-renderer [node]="galleryNode()" [mode]="'edit'"></ng-container>
|
|
4051
|
-
</axp-widgets-container>
|
|
4052
|
-
</ax-content>
|
|
4053
|
-
<ax-footer>
|
|
4054
|
-
<ax-suffix>
|
|
4055
|
-
<ax-button [text]="'close'" (click)="onClose()" />
|
|
4056
|
-
</ax-suffix>
|
|
4057
|
-
</ax-footer>
|
|
4058
|
-
`, isInline: true, styles: [":host{display:block;height:100%}ax-content{height:calc(100% - 60px)}\n"], dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i6.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i6.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4059
|
-
}
|
|
4060
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFileGalleryPopupComponent, decorators: [{
|
|
4061
|
-
type: Component,
|
|
4062
|
-
args: [{ selector: 'axm-file-gallery-popup', template: `
|
|
4063
|
-
<ax-content>
|
|
4064
|
-
<axp-widgets-container class="ax-block ax-h-full" [context]="context()">
|
|
4065
|
-
<ng-container axp-widget-renderer [node]="galleryNode()" [mode]="'edit'"></ng-container>
|
|
4066
|
-
</axp-widgets-container>
|
|
4067
|
-
</ax-content>
|
|
4068
|
-
<ax-footer>
|
|
4069
|
-
<ax-suffix>
|
|
4070
|
-
<ax-button [text]="'close'" (click)="onClose()" />
|
|
4071
|
-
</ax-suffix>
|
|
4072
|
-
</ax-footer>
|
|
4073
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXDecoratorModule, AXButtonModule, AXPWidgetCoreModule], styles: [":host{display:block;height:100%}ax-content{height:calc(100% - 60px)}\n"] }]
|
|
1728
|
+
provide: AXP_FILE_TYPE_INFO_PROVIDER,
|
|
1729
|
+
useClass: AXMVideoFileTypeProvider,
|
|
1730
|
+
multi: true,
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
provide: AXP_FILE_TYPE_INFO_PROVIDER,
|
|
1734
|
+
useClass: AXMDocumentFileTypeProvider,
|
|
1735
|
+
multi: true,
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
provide: AXP_FILE_TYPE_INFO_PROVIDER,
|
|
1739
|
+
useClass: AXMAudioFileTypeProvider,
|
|
1740
|
+
multi: true,
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
provide: AXP_FILE_TYPE_INFO_PROVIDER,
|
|
1744
|
+
useClass: AXMCodeFileTypeProvider,
|
|
1745
|
+
multi: true,
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
provide: AXP_FILE_TYPE_INFO_PROVIDER,
|
|
1749
|
+
useClass: AXMArchiveFileTypeProvider,
|
|
1750
|
+
multi: true,
|
|
1751
|
+
},
|
|
1752
|
+
],
|
|
1753
|
+
}]
|
|
4074
1754
|
}] });
|
|
4075
1755
|
|
|
4076
|
-
var fileGalleryPopup_component = /*#__PURE__*/Object.freeze({
|
|
4077
|
-
__proto__: null,
|
|
4078
|
-
AXMFileGalleryPopupComponent: AXMFileGalleryPopupComponent
|
|
4079
|
-
});
|
|
4080
|
-
|
|
4081
1756
|
class AXPDocumentManagementService {
|
|
4082
1757
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPDocumentManagementService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4083
1758
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPDocumentManagementService }); }
|
|
@@ -4169,13 +1844,12 @@ class AXMDocumentDialogService {
|
|
|
4169
1844
|
const promises = (ctx?.['files']).map(async (item, index) => {
|
|
4170
1845
|
const f = fileList[index];
|
|
4171
1846
|
const newId = await this.documentService.insertOne({
|
|
4172
|
-
|
|
1847
|
+
fileInfo: f,
|
|
4173
1848
|
name: f?.name,
|
|
4174
1849
|
title: f?.title ?? f?.name,
|
|
4175
1850
|
description: f?.description,
|
|
4176
1851
|
documentType,
|
|
4177
1852
|
parentId,
|
|
4178
|
-
size: f?.size || 0,
|
|
4179
1853
|
status: 'Draft',
|
|
4180
1854
|
version: (version ?? 0) + 1,
|
|
4181
1855
|
metaDataForm: ctx?.[`file-${index}`]?.['metaDataForm'],
|
|
@@ -4337,7 +2011,9 @@ class DocumentAttachmentsService {
|
|
|
4337
2011
|
parentId: options?.folderId ?? '',
|
|
4338
2012
|
version: 0,
|
|
4339
2013
|
};
|
|
4340
|
-
const title = await this.translateService.translateAsync('@document-management:dialogs.attach-file.title', {
|
|
2014
|
+
const title = await this.translateService.translateAsync('@document-management:dialogs.attach-file.title', {
|
|
2015
|
+
params: { title: fileTypeEntity.title },
|
|
2016
|
+
});
|
|
4341
2017
|
const result = await this.documentDialog.openAttachmentDialog(title, popupData);
|
|
4342
2018
|
return this.handlePopupResult(result);
|
|
4343
2019
|
}
|
|
@@ -4346,10 +2022,10 @@ class DocumentAttachmentsService {
|
|
|
4346
2022
|
if (!file) {
|
|
4347
2023
|
throw new Error('File not found');
|
|
4348
2024
|
}
|
|
4349
|
-
|
|
2025
|
+
const documentTypeEntity = await this.resolveFileType(file.documentType);
|
|
4350
2026
|
const popupData = {
|
|
4351
|
-
documentType:
|
|
4352
|
-
files: [file.
|
|
2027
|
+
documentType: documentTypeEntity,
|
|
2028
|
+
files: [file.fileInfo],
|
|
4353
2029
|
parentId: options?.folderId ?? '',
|
|
4354
2030
|
metaData: file.metaDataForm,
|
|
4355
2031
|
documentId: fileId,
|
|
@@ -4367,15 +2043,16 @@ class DocumentAttachmentsService {
|
|
|
4367
2043
|
if (!document) {
|
|
4368
2044
|
throw new Error('File not found');
|
|
4369
2045
|
}
|
|
2046
|
+
const documentTypeEntity = await this.resolveFileType(document.documentType);
|
|
4370
2047
|
// Choose a single new file based on document type constraints
|
|
4371
|
-
const files = await this.chooseFiles(
|
|
2048
|
+
const files = await this.chooseFiles(documentTypeEntity, false);
|
|
4372
2049
|
if (!files || files.length === 0) {
|
|
4373
2050
|
return false;
|
|
4374
2051
|
}
|
|
4375
2052
|
const mapped = this.mapFilesToFileListItems(files);
|
|
4376
2053
|
// Open a lightweight dialog to edit metadata (no auto-save); then apply update with new file
|
|
4377
2054
|
const result = await this.documentDialog.openAttachmentDialogWithoutSave('@document-management:dialogs.manage-version.upload-new-version', {
|
|
4378
|
-
documentType:
|
|
2055
|
+
documentType: documentTypeEntity,
|
|
4379
2056
|
files: mapped,
|
|
4380
2057
|
parentId: document.parentId,
|
|
4381
2058
|
metaData: document.metaDataForm,
|
|
@@ -4388,8 +2065,7 @@ class DocumentAttachmentsService {
|
|
|
4388
2065
|
const metaDataForm = document.metaDataForm;
|
|
4389
2066
|
const newName = files[0]?.name ?? document.name;
|
|
4390
2067
|
await this.documentService.updateOne(fileId, {
|
|
4391
|
-
|
|
4392
|
-
size: files[0]?.size ?? document.size,
|
|
2068
|
+
fileInfo: mapped[0],
|
|
4393
2069
|
version: (document.version ?? 0) + 1,
|
|
4394
2070
|
metaDataForm,
|
|
4395
2071
|
name: newName,
|
|
@@ -4403,19 +2079,16 @@ class DocumentAttachmentsService {
|
|
|
4403
2079
|
}
|
|
4404
2080
|
}
|
|
4405
2081
|
async resolveFileType(fileType) {
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
throw new Error('File type not found');
|
|
4411
|
-
}
|
|
4412
|
-
return fileTypeEntity;
|
|
2082
|
+
const id = typeof fileType === 'string' ? fileType : fileType.id;
|
|
2083
|
+
const entity = await this.documentTypeService.getOne(id);
|
|
2084
|
+
if (!entity) {
|
|
2085
|
+
throw new Error(`Document type not found: ${id}`);
|
|
4413
2086
|
}
|
|
4414
|
-
return
|
|
2087
|
+
return entity;
|
|
4415
2088
|
}
|
|
4416
2089
|
async chooseFiles(fileTypeEntity, multiple) {
|
|
4417
|
-
|
|
4418
|
-
const acceptTypes =
|
|
2090
|
+
const selectedItems = fileTypeEntity.type?.selectedItems ?? [];
|
|
2091
|
+
const acceptTypes = selectedItems.map((item) => `.${item.name.split('.')[1]}`).join(',');
|
|
4419
2092
|
return await this.fileService.choose({
|
|
4420
2093
|
multiple: multiple ?? false,
|
|
4421
2094
|
accept: acceptTypes,
|
|
@@ -4452,12 +2125,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4452
2125
|
|
|
4453
2126
|
//#region ---- Imports ----
|
|
4454
2127
|
//#endregion
|
|
4455
|
-
//#region ---- Service
|
|
2128
|
+
//#region ---- Contract (Abstract Service) ----
|
|
4456
2129
|
/**
|
|
4457
|
-
*
|
|
2130
|
+
* Contract for document drive service. Inject this token; implementation is provided by the module.
|
|
4458
2131
|
*/
|
|
4459
2132
|
class AXMDocumentManagerService {
|
|
2133
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2134
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagerService }); }
|
|
2135
|
+
}
|
|
2136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagerService, decorators: [{
|
|
2137
|
+
type: Injectable
|
|
2138
|
+
}] });
|
|
2139
|
+
//#endregion
|
|
2140
|
+
//#region ---- Service Implementation ----
|
|
2141
|
+
/**
|
|
2142
|
+
* Default implementation of document drive service.
|
|
2143
|
+
*/
|
|
2144
|
+
class AXMDocumentManagerServiceImpl extends AXMDocumentManagerService {
|
|
4460
2145
|
constructor() {
|
|
2146
|
+
super(...arguments);
|
|
4461
2147
|
//#region ---- Services & Dependencies ----
|
|
4462
2148
|
this.folderService = inject(AXMFolderService);
|
|
4463
2149
|
this.sessionService = inject(AXPSessionService);
|
|
@@ -4471,7 +2157,6 @@ class AXMDocumentManagerService {
|
|
|
4471
2157
|
this.workflow = inject(AXPWorkflowService);
|
|
4472
2158
|
this.translate = inject(AXTranslationService);
|
|
4473
2159
|
this.layoutBuilder = inject(AXPLayoutBuilderService);
|
|
4474
|
-
this.reviewService = inject(AXMReviewService);
|
|
4475
2160
|
this.attachmentsService = inject(DocumentAttachmentsService);
|
|
4476
2161
|
this.filterMiddlewareService = inject(AXPFilterOperatorMiddlewareService);
|
|
4477
2162
|
this.hooks = inject(AXPHookService, { optional: true });
|
|
@@ -4487,13 +2172,13 @@ class AXMDocumentManagerService {
|
|
|
4487
2172
|
this.mapFolderDtoToFolderNode = (folder) => {
|
|
4488
2173
|
return {
|
|
4489
2174
|
id: folder.id,
|
|
4490
|
-
name: folder.
|
|
2175
|
+
name: folder.title,
|
|
4491
2176
|
type: 'folder',
|
|
4492
2177
|
parentId: folder.parentId || null,
|
|
4493
2178
|
modifiedAt: folder?.updated?.at,
|
|
4494
2179
|
createdAt: folder?.created?.at,
|
|
4495
2180
|
description: folder.description,
|
|
4496
|
-
childrenCount: folder.
|
|
2181
|
+
childrenCount: folder.childrenCount,
|
|
4497
2182
|
size: folder.size,
|
|
4498
2183
|
documentTypes: folder.documentTypes || [],
|
|
4499
2184
|
storageType: 'physical',
|
|
@@ -4508,98 +2193,14 @@ class AXMDocumentManagerService {
|
|
|
4508
2193
|
//#endregion
|
|
4509
2194
|
//#region ---- Scope Management Methods ----
|
|
4510
2195
|
/**
|
|
4511
|
-
* Creates a scoped drive service for the specified platform scope
|
|
4512
|
-
|
|
4513
|
-
scope(scope, options) {
|
|
4514
|
-
const cacheKey = this.getScopeCacheKey(scope, options);
|
|
4515
|
-
if (!this.scopedDriveCache.has(cacheKey)) {
|
|
4516
|
-
this.scopedDriveCache.set(cacheKey, new ScopedDriveService(this, scope, options));
|
|
4517
|
-
}
|
|
4518
|
-
return this.scopedDriveCache.get(cacheKey);
|
|
4519
|
-
}
|
|
4520
|
-
/**
|
|
4521
|
-
* Generates a cache key for the scoped drive service
|
|
4522
|
-
*/
|
|
4523
|
-
getScopeCacheKey(scope, options) {
|
|
4524
|
-
return scope;
|
|
4525
|
-
}
|
|
4526
|
-
//#endregion
|
|
4527
|
-
//#region ---- Private Helper Methods ----
|
|
4528
|
-
/**
|
|
4529
|
-
* Gets the platform root folder (top-level folder)
|
|
4530
|
-
*/
|
|
4531
|
-
async getPlatformRootFolder() {
|
|
4532
|
-
const result = await this.folderService.query({
|
|
4533
|
-
skip: 0,
|
|
4534
|
-
take: 1,
|
|
4535
|
-
filter: {
|
|
4536
|
-
operator: null,
|
|
4537
|
-
logic: 'and',
|
|
4538
|
-
filters: [
|
|
4539
|
-
{ field: 'parentId', operator: { type: 'isNull' } },
|
|
4540
|
-
{ field: 'tenantId', operator: { type: 'isNull' } },
|
|
4541
|
-
{ field: 'userId', operator: { type: 'isNull' } },
|
|
4542
|
-
],
|
|
4543
|
-
},
|
|
4544
|
-
});
|
|
4545
|
-
if (result.items.length === 0) {
|
|
4546
|
-
throw new Error('Platform root folder not found');
|
|
4547
|
-
}
|
|
4548
|
-
return result.items[0];
|
|
4549
|
-
}
|
|
4550
|
-
/**
|
|
4551
|
-
* Gets the tenant root folder
|
|
4552
|
-
*/
|
|
4553
|
-
async getTenantRootFolder(rootFolder, tenantId) {
|
|
4554
|
-
if (!tenantId) {
|
|
4555
|
-
throw new Error('Tenant ID is required');
|
|
4556
|
-
}
|
|
4557
|
-
const result = await this.folderService.query({
|
|
4558
|
-
skip: 0,
|
|
4559
|
-
take: 1,
|
|
4560
|
-
filter: {
|
|
4561
|
-
operator: null,
|
|
4562
|
-
logic: 'and',
|
|
4563
|
-
filters: this.filterMiddlewareService.transformFilters([
|
|
4564
|
-
{
|
|
4565
|
-
field: 'parentId',
|
|
4566
|
-
operator: { type: 'equal' },
|
|
4567
|
-
value: rootFolder.folders?.find((f) => f.name === 'Tenants')?.id,
|
|
4568
|
-
},
|
|
4569
|
-
{ field: 'tenantId', operator: { type: 'equal' }, value: tenantId },
|
|
4570
|
-
{ field: 'userId', operator: { type: 'isNull' } },
|
|
4571
|
-
]),
|
|
4572
|
-
},
|
|
4573
|
-
});
|
|
4574
|
-
if (result.items.length === 0) {
|
|
4575
|
-
throw new Error('Tenant root folder not found');
|
|
4576
|
-
}
|
|
4577
|
-
return result.items[0];
|
|
4578
|
-
}
|
|
4579
|
-
/**
|
|
4580
|
-
* Gets the user root folder
|
|
2196
|
+
* Creates a scoped drive service for the specified platform scope.
|
|
2197
|
+
* Backend resolves tenant/user from request context (client sends only scope).
|
|
4581
2198
|
*/
|
|
4582
|
-
|
|
4583
|
-
if (!
|
|
4584
|
-
|
|
2199
|
+
scope(scope) {
|
|
2200
|
+
if (!this.scopedDriveCache.has(scope)) {
|
|
2201
|
+
this.scopedDriveCache.set(scope, new ScopedDriveService(this, scope));
|
|
4585
2202
|
}
|
|
4586
|
-
|
|
4587
|
-
skip: 0,
|
|
4588
|
-
take: 1,
|
|
4589
|
-
filter: {
|
|
4590
|
-
operator: null,
|
|
4591
|
-
logic: 'and',
|
|
4592
|
-
filters: this.filterMiddlewareService.transformFilters([
|
|
4593
|
-
{ field: 'parentId', operator: { type: 'equal' }, value: tenantFolderId },
|
|
4594
|
-
{ field: 'tenantId', operator: { type: 'equal' }, value: tenantId },
|
|
4595
|
-
{ field: 'userId', operator: { type: 'equal' }, value: userId },
|
|
4596
|
-
]),
|
|
4597
|
-
},
|
|
4598
|
-
});
|
|
4599
|
-
if (result.items.length === 0) {
|
|
4600
|
-
throw new Error('User root folder not found');
|
|
4601
|
-
}
|
|
4602
|
-
return result.items[0];
|
|
2203
|
+
return this.scopedDriveCache.get(scope);
|
|
4603
2204
|
}
|
|
4604
2205
|
/**
|
|
4605
2206
|
* Maps file entity to document explorer node
|
|
@@ -4612,8 +2213,8 @@ class AXMDocumentManagerService {
|
|
|
4612
2213
|
parentId: file.parentId,
|
|
4613
2214
|
modifiedAt: file?.updated?.at,
|
|
4614
2215
|
createdAt: file?.created?.at,
|
|
4615
|
-
size: file.size,
|
|
4616
|
-
fileId: file.
|
|
2216
|
+
size: file.fileInfo?.size ?? 0,
|
|
2217
|
+
fileId: file.fileInfo,
|
|
4617
2218
|
storageType: 'physical',
|
|
4618
2219
|
meta: file.metaDataForm ? Object.values(file.metaDataForm) : undefined,
|
|
4619
2220
|
documentTypes: file.documentType ? [file.documentType] : [],
|
|
@@ -4623,33 +2224,46 @@ class AXMDocumentManagerService {
|
|
|
4623
2224
|
* Maps document to media viewer data
|
|
4624
2225
|
*/
|
|
4625
2226
|
async mapDocumentToMediaViewerData(doc, fileInfosMap) {
|
|
4626
|
-
|
|
4627
|
-
|
|
2227
|
+
const f = doc.fileInfo ?? doc.fileId;
|
|
2228
|
+
const fileIdStr = f == null
|
|
2229
|
+
? undefined
|
|
2230
|
+
: typeof f === 'string'
|
|
2231
|
+
? f
|
|
2232
|
+
: f.source?.kind === 'fileId' &&
|
|
2233
|
+
typeof f.source?.value === 'string'
|
|
2234
|
+
? f.source.value
|
|
2235
|
+
: typeof f.id === 'string'
|
|
2236
|
+
? f.id
|
|
2237
|
+
: undefined;
|
|
2238
|
+
if (fileIdStr) {
|
|
4628
2239
|
let fileInfo;
|
|
4629
2240
|
if (fileInfosMap) {
|
|
4630
|
-
|
|
4631
|
-
fileInfo = fileInfosMap.get(fileId);
|
|
2241
|
+
fileInfo = fileInfosMap.get(fileIdStr);
|
|
4632
2242
|
}
|
|
4633
2243
|
else {
|
|
4634
|
-
|
|
4635
|
-
fileInfo = await this.fileService.getInfo(fileId);
|
|
2244
|
+
fileInfo = await this.fileService.getInfo(fileIdStr);
|
|
4636
2245
|
}
|
|
2246
|
+
const resolvedSize = fileInfo?.size ?? doc?.fileId?.size ?? 0;
|
|
4637
2247
|
return {
|
|
4638
2248
|
id: doc.id ?? '',
|
|
4639
2249
|
name: doc.name,
|
|
4640
2250
|
type: doc.name.endsWith('.pdf') ? 'pdf' : 'image',
|
|
4641
2251
|
url: fileInfo?.url ?? '',
|
|
4642
|
-
size:
|
|
2252
|
+
size: resolvedSize.toString(),
|
|
4643
2253
|
thumbnailUrl: fileInfo?.url ?? '',
|
|
4644
2254
|
};
|
|
4645
2255
|
}
|
|
2256
|
+
const fallbackUrl = doc?.fileId?.source?.kind === 'url' && typeof doc.fileId.source.value === 'string'
|
|
2257
|
+
? doc.fileId.source.value
|
|
2258
|
+
: '';
|
|
2259
|
+
const fallbackSize = doc?.fileId?.size ?? 0;
|
|
4646
2260
|
return {
|
|
4647
2261
|
id: doc.id ?? '',
|
|
4648
2262
|
name: doc.name,
|
|
4649
2263
|
type: doc.meta?.['type'] ?? 'image',
|
|
4650
|
-
url:
|
|
4651
|
-
size:
|
|
4652
|
-
thumbnailUrl:
|
|
2264
|
+
url: fallbackUrl,
|
|
2265
|
+
size: fallbackSize.toString(),
|
|
2266
|
+
thumbnailUrl: fallbackUrl,
|
|
4653
2267
|
};
|
|
4654
2268
|
}
|
|
4655
2269
|
//#endregion
|
|
@@ -4687,9 +2301,8 @@ class AXMDocumentManagerService {
|
|
|
4687
2301
|
return `${nameWithoutExt} copy${extension}`;
|
|
4688
2302
|
}
|
|
4689
2303
|
/**
|
|
4690
|
-
* Prepares file for copy operation by downloading from storage and converting to blob source
|
|
4691
|
-
*
|
|
4692
|
-
* by downloading the file from storage and changing source to blob with uploading status
|
|
2304
|
+
* Prepares file for copy operation by downloading from storage and converting to blob source.
|
|
2305
|
+
* Accepts document fileId (AXPFileListItem or legacy string) and returns AXPFileListItem with blob source.
|
|
4693
2306
|
*/
|
|
4694
2307
|
async prepareFileForCopy(fileId, fileName) {
|
|
4695
2308
|
try {
|
|
@@ -4709,9 +2322,6 @@ class AXMDocumentManagerService {
|
|
|
4709
2322
|
fileIdString = fileId.id;
|
|
4710
2323
|
existingFileItem = fileId;
|
|
4711
2324
|
}
|
|
4712
|
-
else if (fileId.fileId && typeof fileId.fileId === 'string') {
|
|
4713
|
-
fileIdString = fileId.fileId;
|
|
4714
|
-
}
|
|
4715
2325
|
}
|
|
4716
2326
|
if (!fileIdString) {
|
|
4717
2327
|
console.warn('Could not extract fileId from:', fileId);
|
|
@@ -4760,45 +2370,20 @@ class AXMDocumentManagerService {
|
|
|
4760
2370
|
//#endregion
|
|
4761
2371
|
//#region ---- Root and Folder Operations ----
|
|
4762
2372
|
/**
|
|
4763
|
-
* Gets the root folder
|
|
2373
|
+
* Gets the root folder for the given scope.
|
|
2374
|
+
* Backend returns only the root folder; path is built here for the explorer.
|
|
4764
2375
|
*/
|
|
4765
|
-
async getRoot(scope
|
|
4766
|
-
const rootFolder = await this.
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
switch (scope) {
|
|
4770
|
-
case AXPPlatformScope.Platform:
|
|
4771
|
-
result = this.mapFolderDtoToFolderNode(rootFolder);
|
|
4772
|
-
path = await this.buildPath(result);
|
|
4773
|
-
break;
|
|
4774
|
-
case AXPPlatformScope.Tenant: {
|
|
4775
|
-
if (!options?.tenantId) {
|
|
4776
|
-
throw new Error('Tenant ID is required for tenant scope');
|
|
4777
|
-
}
|
|
4778
|
-
const tenantRoot = await this.getTenantRootFolder(rootFolder, options.tenantId);
|
|
4779
|
-
result = this.mapFolderDtoToFolderNode(tenantRoot);
|
|
4780
|
-
path = await this.buildPath(result, tenantRoot.id);
|
|
4781
|
-
break;
|
|
4782
|
-
}
|
|
4783
|
-
case AXPPlatformScope.User: {
|
|
4784
|
-
if (!options?.tenantId || !options?.userId) {
|
|
4785
|
-
throw new Error('Both Tenant ID and User ID are required for user scope');
|
|
4786
|
-
}
|
|
4787
|
-
const tenantFolder = await this.getTenantRootFolder(rootFolder, options.tenantId);
|
|
4788
|
-
const userRoot = await this.getUserRootFolder(tenantFolder.folders?.find((f) => f.name === 'Users')?.id, options.tenantId, options.userId);
|
|
4789
|
-
result = this.mapFolderDtoToFolderNode(userRoot);
|
|
4790
|
-
path = await this.buildPath(result, userRoot.id);
|
|
4791
|
-
break;
|
|
4792
|
-
}
|
|
4793
|
-
default:
|
|
4794
|
-
throw new Error(`Invalid scope: ${scope}`);
|
|
4795
|
-
}
|
|
2376
|
+
async getRoot(scope) {
|
|
2377
|
+
const rootFolder = await this.documentManagementService.getRoot(scope);
|
|
2378
|
+
const result = this.mapFolderDtoToFolderNode(rootFolder);
|
|
2379
|
+
const path = await this.buildPath(result);
|
|
4796
2380
|
return { path, result };
|
|
4797
2381
|
}
|
|
4798
2382
|
/**
|
|
4799
|
-
* Gets a specific folder by ID
|
|
2383
|
+
* Gets a specific folder by ID.
|
|
2384
|
+
* Root for path is resolved from current session (security: only scope is used).
|
|
4800
2385
|
*/
|
|
4801
|
-
async getFolder(scope, folderId
|
|
2386
|
+
async getFolder(scope, folderId) {
|
|
4802
2387
|
if (!folderId) {
|
|
4803
2388
|
throw new Error('Folder ID is required');
|
|
4804
2389
|
}
|
|
@@ -4807,7 +2392,7 @@ class AXMDocumentManagerService {
|
|
|
4807
2392
|
throw new Error('Folder not found');
|
|
4808
2393
|
}
|
|
4809
2394
|
const result = this.mapFolderDtoToFolderNode(folder);
|
|
4810
|
-
const path = await this.buildPath(result, (await this.getRoot(scope
|
|
2395
|
+
const path = await this.buildPath(result, (await this.getRoot(scope)).result.id);
|
|
4811
2396
|
return { path, result };
|
|
4812
2397
|
}
|
|
4813
2398
|
/**
|
|
@@ -4820,12 +2405,14 @@ class AXMDocumentManagerService {
|
|
|
4820
2405
|
const userRef = { id: userId, type: 'user' };
|
|
4821
2406
|
const folderToCreate = {
|
|
4822
2407
|
...data,
|
|
2408
|
+
title: data.title,
|
|
2409
|
+
childrenCount: 0,
|
|
4823
2410
|
created: { at: now, user: userRef },
|
|
4824
2411
|
updated: { at: now, user: userRef },
|
|
4825
2412
|
isSystem: false,
|
|
4826
2413
|
isHidden: false,
|
|
4827
2414
|
isDeleted: false,
|
|
4828
|
-
size: 0,
|
|
2415
|
+
size: data.size ?? 0,
|
|
4829
2416
|
};
|
|
4830
2417
|
const createdFolder = (await this.folderService.insertOne(folderToCreate));
|
|
4831
2418
|
let folder;
|
|
@@ -5049,12 +2636,15 @@ class AXMDocumentManagerService {
|
|
|
5049
2636
|
// Extract needed properties without id
|
|
5050
2637
|
const { id, ...fileDataWithoutId } = originalFile;
|
|
5051
2638
|
// Prepare file for copy by downloading from storage and converting to blob source
|
|
5052
|
-
const fileListItem = await this.prepareFileForCopy(originalFile.
|
|
2639
|
+
const fileListItem = await this.prepareFileForCopy(originalFile.fileInfo, newName);
|
|
2640
|
+
if (!fileListItem) {
|
|
2641
|
+
throw new Error('Could not prepare file for copy');
|
|
2642
|
+
}
|
|
5053
2643
|
const fileData = {
|
|
5054
2644
|
...fileDataWithoutId,
|
|
5055
2645
|
name: newName,
|
|
5056
2646
|
title: newName,
|
|
5057
|
-
|
|
2647
|
+
fileInfo: fileListItem,
|
|
5058
2648
|
};
|
|
5059
2649
|
// Create the new file
|
|
5060
2650
|
return await this.createFile(fileData);
|
|
@@ -5070,7 +2660,7 @@ class AXMDocumentManagerService {
|
|
|
5070
2660
|
const { id, ...folderDataWithoutId } = originalFolder;
|
|
5071
2661
|
const folderData = {
|
|
5072
2662
|
...folderDataWithoutId,
|
|
5073
|
-
|
|
2663
|
+
title: newName,
|
|
5074
2664
|
};
|
|
5075
2665
|
// Create the new folder
|
|
5076
2666
|
return await this.createFolder(folderData);
|
|
@@ -5083,7 +2673,7 @@ class AXMDocumentManagerService {
|
|
|
5083
2673
|
* Moves a node to another location
|
|
5084
2674
|
*/
|
|
5085
2675
|
async moveTo(options) {
|
|
5086
|
-
const comp = (await import('./acorex-modules-document-management-drive-choose.component-
|
|
2676
|
+
const comp = (await import('./acorex-modules-document-management-drive-choose.component-BOeZ9mpL.mjs')).AXMDocumentDriveChooseComponent;
|
|
5087
2677
|
const popup = await this.popupService.open(comp, {
|
|
5088
2678
|
title: `Choose ${options.browseMode == 'file' ? 'File' : 'Folder'}`,
|
|
5089
2679
|
data: {
|
|
@@ -5116,7 +2706,7 @@ class AXMDocumentManagerService {
|
|
|
5116
2706
|
* Copies a node to another location
|
|
5117
2707
|
*/
|
|
5118
2708
|
async copyTo(options) {
|
|
5119
|
-
const comp = (await import('./acorex-modules-document-management-drive-choose.component-
|
|
2709
|
+
const comp = (await import('./acorex-modules-document-management-drive-choose.component-BOeZ9mpL.mjs')).AXMDocumentDriveChooseComponent;
|
|
5120
2710
|
const popup = await this.popupService.open(comp, {
|
|
5121
2711
|
title: `Choose ${options.browseMode == 'file' ? 'File' : 'Folder'}`,
|
|
5122
2712
|
data: {
|
|
@@ -5131,7 +2721,7 @@ class AXMDocumentManagerService {
|
|
|
5131
2721
|
if (selectedFolder) {
|
|
5132
2722
|
if (options.node.type === 'folder') {
|
|
5133
2723
|
await this.createFolder({
|
|
5134
|
-
|
|
2724
|
+
title: options.node.name,
|
|
5135
2725
|
parentId: selectedFolder.id,
|
|
5136
2726
|
color: '#ffffff',
|
|
5137
2727
|
size: options.node.size,
|
|
@@ -5145,13 +2735,15 @@ class AXMDocumentManagerService {
|
|
|
5145
2735
|
throw new Error(`File with ID ${options.node.id} not found`);
|
|
5146
2736
|
}
|
|
5147
2737
|
// Prepare file for copy by downloading from storage and converting to blob source
|
|
5148
|
-
const fileListItem = await this.prepareFileForCopy(originalFile.
|
|
2738
|
+
const fileListItem = await this.prepareFileForCopy(originalFile.fileInfo, options.node.name);
|
|
2739
|
+
if (!fileListItem) {
|
|
2740
|
+
throw new Error('Could not prepare file for copy');
|
|
2741
|
+
}
|
|
5149
2742
|
await this.createFile({
|
|
5150
2743
|
title: options.node.name,
|
|
5151
2744
|
name: options.node.name,
|
|
5152
2745
|
parentId: selectedFolder.id,
|
|
5153
|
-
|
|
5154
|
-
size: originalFile.size ?? options.node.size ?? 0,
|
|
2746
|
+
fileInfo: fileListItem,
|
|
5155
2747
|
documentType: options.node.documentTypes[0],
|
|
5156
2748
|
status: 'Draft',
|
|
5157
2749
|
});
|
|
@@ -5169,27 +2761,29 @@ class AXMDocumentManagerService {
|
|
|
5169
2761
|
//#endregion
|
|
5170
2762
|
//#region ---- Search Operations ----
|
|
5171
2763
|
/**
|
|
5172
|
-
* Searches for folders by term within a scope
|
|
2764
|
+
* Searches for folders by term within a scope.
|
|
2765
|
+
* Root is resolved from current session when folderId is not provided.
|
|
5173
2766
|
*/
|
|
5174
2767
|
async searchFolders(searchTerm, scope, options) {
|
|
5175
2768
|
const { result: rootNode } = options?.folderId
|
|
5176
|
-
? await this.getFolder(scope, options.folderId
|
|
5177
|
-
: await this.getRoot(scope
|
|
2769
|
+
? await this.getFolder(scope, options.folderId)
|
|
2770
|
+
: await this.getRoot(scope);
|
|
5178
2771
|
const folders = await this.documentManagementService.searchFolders(searchTerm, rootNode.id);
|
|
5179
2772
|
return folders.map((folder) => this.mapFolderDtoToFolderNode(folder));
|
|
5180
2773
|
}
|
|
5181
2774
|
/**
|
|
5182
|
-
* Searches for files by term within a scope
|
|
2775
|
+
* Searches for files by term within a scope.
|
|
2776
|
+
* Root is resolved from current session when folderId is not provided.
|
|
5183
2777
|
*/
|
|
5184
2778
|
async searchFiles(searchTerm, scope, options) {
|
|
5185
2779
|
const { result: rootNode } = options?.folderId
|
|
5186
|
-
? await this.getFolder(scope, options.folderId
|
|
5187
|
-
: await this.getRoot(scope
|
|
2780
|
+
? await this.getFolder(scope, options.folderId)
|
|
2781
|
+
: await this.getRoot(scope);
|
|
5188
2782
|
const files = await this.documentManagementService.searchFiles(searchTerm, rootNode.id);
|
|
5189
2783
|
return files.map((file) => this.mapFileToNode(file));
|
|
5190
2784
|
}
|
|
5191
2785
|
/**
|
|
5192
|
-
* Searches for both files and folders by term within a scope
|
|
2786
|
+
* Searches for both files and folders by term within a scope.
|
|
5193
2787
|
*/
|
|
5194
2788
|
async searchNodes(searchTerm, scope, options) {
|
|
5195
2789
|
const [folders, files] = await Promise.all([
|
|
@@ -5397,7 +2991,7 @@ class AXMDocumentManagerService {
|
|
|
5397
2991
|
const selected = Array.isArray(form.documentTypes) ? form.documentTypes : [];
|
|
5398
2992
|
const selectedTypes = selected.map((v) => typeof v === 'object' ? v : items.find((it) => it.name === v) || { name: v, title: v, id: v });
|
|
5399
2993
|
await this.updateFolder(node.id, {
|
|
5400
|
-
|
|
2994
|
+
title: form.title ?? form.name,
|
|
5401
2995
|
description: form.description,
|
|
5402
2996
|
inherit: form.inherit,
|
|
5403
2997
|
documentTypes: selectedTypes,
|
|
@@ -5421,12 +3015,12 @@ class AXMDocumentManagerService {
|
|
|
5421
3015
|
.dialog((dialog) => {
|
|
5422
3016
|
dialog
|
|
5423
3017
|
.setTitle('@document-management:actions.create-folder')
|
|
5424
|
-
.setContext({
|
|
3018
|
+
.setContext({ title: '', description: '', inherit: 'None', documentTypes: [], color: '#FFFFFF' })
|
|
5425
3019
|
.content((flex) => {
|
|
5426
3020
|
flex
|
|
5427
3021
|
.setDirection('column')
|
|
5428
|
-
.formField('@general:terms.common.
|
|
5429
|
-
field.path('
|
|
3022
|
+
.formField('@general:terms.common.title', (field) => {
|
|
3023
|
+
field.path('title');
|
|
5430
3024
|
field.textBox({ validations: [{ rule: 'required' }] });
|
|
5431
3025
|
})
|
|
5432
3026
|
.formField('@general:terms.common.description', (field) => {
|
|
@@ -5470,16 +3064,22 @@ class AXMDocumentManagerService {
|
|
|
5470
3064
|
return null;
|
|
5471
3065
|
}
|
|
5472
3066
|
const form = context;
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
3067
|
+
try {
|
|
3068
|
+
const folder = await this.createFolder({
|
|
3069
|
+
title: form.title,
|
|
3070
|
+
color: form.color,
|
|
3071
|
+
parentId,
|
|
3072
|
+
description: form.description,
|
|
3073
|
+
documentTypes: form.documentTypes,
|
|
3074
|
+
size: 0,
|
|
3075
|
+
inherit: form.inherit,
|
|
3076
|
+
});
|
|
3077
|
+
return folder;
|
|
3078
|
+
}
|
|
3079
|
+
catch (err) {
|
|
3080
|
+
console.error('[showCreateFolderDialog] createFolder failed', err);
|
|
3081
|
+
throw err;
|
|
3082
|
+
}
|
|
5483
3083
|
});
|
|
5484
3084
|
})
|
|
5485
3085
|
.show();
|
|
@@ -5520,7 +3120,7 @@ class AXMDocumentManagerService {
|
|
|
5520
3120
|
dialogRef.setLoading(true);
|
|
5521
3121
|
try {
|
|
5522
3122
|
if (node.type === 'folder') {
|
|
5523
|
-
return await this.updateFolder(node.id, {
|
|
3123
|
+
return await this.updateFolder(node.id, { title: formData.name });
|
|
5524
3124
|
}
|
|
5525
3125
|
await this.updateFileName(node, formData.name);
|
|
5526
3126
|
return await this.updateFile(node.id, { name: formData.name });
|
|
@@ -5549,7 +3149,7 @@ class AXMDocumentManagerService {
|
|
|
5549
3149
|
* Shows choose file dialog
|
|
5550
3150
|
*/
|
|
5551
3151
|
async showChooseFileDialog(scope) {
|
|
5552
|
-
const comp = (await import('./acorex-modules-document-management-drive-choose.component-
|
|
3152
|
+
const comp = (await import('./acorex-modules-document-management-drive-choose.component-BOeZ9mpL.mjs')).AXMDocumentDriveChooseComponent;
|
|
5553
3153
|
const result = await this.popupService.open(comp, {
|
|
5554
3154
|
title: await this.translate.translateAsync('@document-management:actions.choose-from-drive'),
|
|
5555
3155
|
data: {
|
|
@@ -5571,7 +3171,7 @@ class AXMDocumentManagerService {
|
|
|
5571
3171
|
if (!item.name || item.type !== 'file')
|
|
5572
3172
|
return false;
|
|
5573
3173
|
const ext = item.name.split('.').pop()?.toLowerCase();
|
|
5574
|
-
return ext &&
|
|
3174
|
+
return ext && AXMDocumentManagerServiceImpl.GALLERY_EXTENSIONS.includes(ext);
|
|
5575
3175
|
});
|
|
5576
3176
|
}
|
|
5577
3177
|
/**
|
|
@@ -5579,7 +3179,7 @@ class AXMDocumentManagerService {
|
|
|
5579
3179
|
*/
|
|
5580
3180
|
async showFileViewerPopup(node, options) {
|
|
5581
3181
|
const isVirtualFolder = node.parentId === 'virtual';
|
|
5582
|
-
const parentFolderName = isVirtualFolder ? 'Virtual' : (await this.folderService.getOne(node.parentId)).
|
|
3182
|
+
const parentFolderName = isVirtualFolder ? 'Virtual' : (await this.folderService.getOne(node.parentId)).title;
|
|
5583
3183
|
const documents = isVirtualFolder
|
|
5584
3184
|
? (options?.folderVirtualFiles ?? [])
|
|
5585
3185
|
: ((await this.folderService.getOne(node.parentId)).documents ?? []);
|
|
@@ -5588,16 +3188,19 @@ class AXMDocumentManagerService {
|
|
|
5588
3188
|
if (!item.name)
|
|
5589
3189
|
return false;
|
|
5590
3190
|
const ext = item.name.split('.').pop()?.toLowerCase();
|
|
5591
|
-
return ext &&
|
|
3191
|
+
return ext && AXMDocumentManagerServiceImpl.GALLERY_EXTENSIONS.includes(ext);
|
|
5592
3192
|
});
|
|
5593
3193
|
// Convert documents to AXPFileListItem[] format for the gallery widget
|
|
5594
|
-
const fileListItems = filteredDocuments.map((doc) =>
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
3194
|
+
const fileListItems = filteredDocuments.map((doc) => {
|
|
3195
|
+
const fileInfo = doc.fileInfo ?? doc.fileId;
|
|
3196
|
+
return {
|
|
3197
|
+
id: doc.id ?? '',
|
|
3198
|
+
name: doc.name,
|
|
3199
|
+
size: fileInfo?.size ?? 0,
|
|
3200
|
+
status: 'attached',
|
|
3201
|
+
source: fileInfo?.source,
|
|
3202
|
+
};
|
|
3203
|
+
});
|
|
5601
3204
|
// Calculate start index
|
|
5602
3205
|
const startIndex = isVirtualFolder
|
|
5603
3206
|
? (options?.folderVirtualFiles?.findIndex((f) => f.id === node.id) ?? 0)
|
|
@@ -5625,71 +3228,43 @@ class AXMDocumentManagerService {
|
|
|
5625
3228
|
return node;
|
|
5626
3229
|
}
|
|
5627
3230
|
}
|
|
5628
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
5629
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
3231
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagerServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3232
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagerServiceImpl }); }
|
|
5630
3233
|
}
|
|
5631
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type:
|
|
5632
|
-
type: Injectable
|
|
5633
|
-
args: [{
|
|
5634
|
-
providedIn: 'root',
|
|
5635
|
-
}]
|
|
3234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagerServiceImpl, decorators: [{
|
|
3235
|
+
type: Injectable
|
|
5636
3236
|
}] });
|
|
5637
3237
|
//#endregion
|
|
5638
3238
|
//#region ---- Scoped Drive Service ----
|
|
5639
3239
|
/**
|
|
5640
|
-
* Scoped drive service for specific platform scopes
|
|
3240
|
+
* Scoped drive service for specific platform scopes.
|
|
3241
|
+
* Backend resolves tenant/user from request context (client sends only scope).
|
|
5641
3242
|
*/
|
|
5642
3243
|
class ScopedDriveService {
|
|
5643
3244
|
//#region ---- Constructor ----
|
|
5644
|
-
constructor(parent, scope
|
|
3245
|
+
constructor(parent, scope) {
|
|
5645
3246
|
this.parent = parent;
|
|
5646
3247
|
this.scope = scope;
|
|
5647
|
-
this.options = options;
|
|
5648
|
-
this.validateScopeOptions();
|
|
5649
|
-
}
|
|
5650
|
-
//#endregion
|
|
5651
|
-
//#region ---- Validation Methods ----
|
|
5652
|
-
/**
|
|
5653
|
-
* Validates the scope options are appropriate for the selected scope
|
|
5654
|
-
*/
|
|
5655
|
-
validateScopeOptions() {
|
|
5656
|
-
switch (this.scope) {
|
|
5657
|
-
case AXPPlatformScope.Tenant:
|
|
5658
|
-
if (!this.options?.tenantId) {
|
|
5659
|
-
throw new Error('Tenant ID is required for tenant scope');
|
|
5660
|
-
}
|
|
5661
|
-
break;
|
|
5662
|
-
case AXPPlatformScope.User:
|
|
5663
|
-
if (!this.options?.tenantId || !this.options?.userId) {
|
|
5664
|
-
throw new Error('Both Tenant ID and User ID are required for user scope');
|
|
5665
|
-
}
|
|
5666
|
-
break;
|
|
5667
|
-
}
|
|
5668
3248
|
}
|
|
5669
3249
|
//#endregion
|
|
5670
3250
|
//#region ---- Scoped Operations ----
|
|
5671
3251
|
/**
|
|
5672
|
-
* Gets root folder for this scope
|
|
3252
|
+
* Gets root folder for this scope (tenant/user from session).
|
|
5673
3253
|
*/
|
|
5674
3254
|
async getRoot() {
|
|
5675
|
-
return this.parent.getRoot(this.scope
|
|
3255
|
+
return this.parent.getRoot(this.scope);
|
|
5676
3256
|
}
|
|
5677
3257
|
/**
|
|
5678
|
-
* Gets folder for this scope
|
|
3258
|
+
* Gets folder for this scope.
|
|
5679
3259
|
*/
|
|
5680
3260
|
async getFolder(folderId) {
|
|
5681
|
-
return this.parent.getFolder(this.scope, folderId
|
|
3261
|
+
return this.parent.getFolder(this.scope, folderId);
|
|
5682
3262
|
}
|
|
5683
3263
|
/**
|
|
5684
|
-
* Creates folder in this scope
|
|
3264
|
+
* Creates folder in this scope. Backend sets tenant/user from request context.
|
|
5685
3265
|
*/
|
|
5686
3266
|
async createFolder(data) {
|
|
5687
|
-
|
|
5688
|
-
...data,
|
|
5689
|
-
tenantId: this.options?.tenantId,
|
|
5690
|
-
userId: this.options?.userId,
|
|
5691
|
-
};
|
|
5692
|
-
return this.parent.createFolder(folderData);
|
|
3267
|
+
return this.parent.createFolder(data);
|
|
5693
3268
|
}
|
|
5694
3269
|
/**
|
|
5695
3270
|
* Updates folder in this scope
|
|
@@ -5712,33 +3287,108 @@ class ScopedDriveService {
|
|
|
5712
3287
|
/**
|
|
5713
3288
|
* Searches folders in this scope
|
|
5714
3289
|
*/
|
|
5715
|
-
async searchFolders(searchTerm) {
|
|
5716
|
-
this.
|
|
5717
|
-
return this.parent.searchFolders(searchTerm, this.scope, this.options);
|
|
3290
|
+
async searchFolders(searchTerm, options) {
|
|
3291
|
+
return this.parent.searchFolders(searchTerm, this.scope, options);
|
|
5718
3292
|
}
|
|
5719
3293
|
/**
|
|
5720
3294
|
* Searches files in this scope
|
|
5721
3295
|
*/
|
|
5722
|
-
async searchFiles(searchTerm) {
|
|
5723
|
-
this.
|
|
5724
|
-
return this.parent.searchFiles(searchTerm, this.scope, this.options);
|
|
3296
|
+
async searchFiles(searchTerm, options) {
|
|
3297
|
+
return this.parent.searchFiles(searchTerm, this.scope, options);
|
|
5725
3298
|
}
|
|
5726
3299
|
/**
|
|
5727
3300
|
* Searches nodes in this scope
|
|
5728
3301
|
*/
|
|
5729
|
-
async searchNodes(searchTerm) {
|
|
5730
|
-
this.
|
|
5731
|
-
return this.parent.searchNodes(searchTerm, this.scope, this.options);
|
|
3302
|
+
async searchNodes(searchTerm, options) {
|
|
3303
|
+
return this.parent.searchNodes(searchTerm, this.scope, options);
|
|
5732
3304
|
}
|
|
5733
3305
|
/**
|
|
5734
3306
|
* Creates a copy of a node in this scope
|
|
5735
3307
|
*/
|
|
5736
3308
|
async copy(node) {
|
|
5737
|
-
this.validateScopeOptions();
|
|
5738
3309
|
return this.parent.copy(node);
|
|
5739
3310
|
}
|
|
5740
3311
|
}
|
|
5741
3312
|
|
|
3313
|
+
//#region ---- Imports ----
|
|
3314
|
+
//#endregion
|
|
3315
|
+
/**
|
|
3316
|
+
* File gallery popup component that displays files using the gallery widget.
|
|
3317
|
+
* This component replaces the old file-viewer-popup and uses the same
|
|
3318
|
+
* gallery widget pattern as test8.
|
|
3319
|
+
*/
|
|
3320
|
+
class AXMFileGalleryPopupComponent extends AXBasePageComponent {
|
|
3321
|
+
constructor() {
|
|
3322
|
+
super(...arguments);
|
|
3323
|
+
//#region ---- Class Properties ----
|
|
3324
|
+
/** File list items received from popup data */
|
|
3325
|
+
this.files = signal([], ...(ngDevMode ? [{ debugName: "files" }] : []));
|
|
3326
|
+
/** Starting index for the media viewer */
|
|
3327
|
+
this.startIndex = 0;
|
|
3328
|
+
/** Widget context for the gallery */
|
|
3329
|
+
this.context = signal({}, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
3330
|
+
//#endregion
|
|
3331
|
+
//#region ---- Computed Properties ----
|
|
3332
|
+
/**
|
|
3333
|
+
* Gallery widget node configuration
|
|
3334
|
+
*/
|
|
3335
|
+
this.galleryNode = computed(() => ({
|
|
3336
|
+
type: 'gallery',
|
|
3337
|
+
path: 'galleryFiles',
|
|
3338
|
+
defaultValue: this.files(),
|
|
3339
|
+
options: {
|
|
3340
|
+
thumbnail: true,
|
|
3341
|
+
header: true,
|
|
3342
|
+
fileInfo: true,
|
|
3343
|
+
fullScreenButton: true,
|
|
3344
|
+
allowUpload: false,
|
|
3345
|
+
height: '100%',
|
|
3346
|
+
},
|
|
3347
|
+
}), ...(ngDevMode ? [{ debugName: "galleryNode" }] : []));
|
|
3348
|
+
}
|
|
3349
|
+
//#endregion
|
|
3350
|
+
//#region ---- UI Handlers ----
|
|
3351
|
+
/**
|
|
3352
|
+
* Close the popup
|
|
3353
|
+
*/
|
|
3354
|
+
onClose() {
|
|
3355
|
+
this.close();
|
|
3356
|
+
}
|
|
3357
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFileGalleryPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3358
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AXMFileGalleryPopupComponent, isStandalone: true, selector: "axm-file-gallery-popup", usesInheritance: true, ngImport: i0, template: `
|
|
3359
|
+
<ax-content>
|
|
3360
|
+
<axp-widgets-container class="ax-block ax-h-full" [context]="context()">
|
|
3361
|
+
<ng-container axp-widget-renderer [node]="galleryNode()" [mode]="'edit'"></ng-container>
|
|
3362
|
+
</axp-widgets-container>
|
|
3363
|
+
</ax-content>
|
|
3364
|
+
<ax-footer>
|
|
3365
|
+
<ax-suffix>
|
|
3366
|
+
<ax-button [text]="'close'" (click)="onClose()" />
|
|
3367
|
+
</ax-suffix>
|
|
3368
|
+
</ax-footer>
|
|
3369
|
+
`, isInline: true, styles: [":host{display:block;height:100%}ax-content{height:calc(100% - 60px)}\n"], dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i6.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i6.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3370
|
+
}
|
|
3371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMFileGalleryPopupComponent, decorators: [{
|
|
3372
|
+
type: Component,
|
|
3373
|
+
args: [{ selector: 'axm-file-gallery-popup', template: `
|
|
3374
|
+
<ax-content>
|
|
3375
|
+
<axp-widgets-container class="ax-block ax-h-full" [context]="context()">
|
|
3376
|
+
<ng-container axp-widget-renderer [node]="galleryNode()" [mode]="'edit'"></ng-container>
|
|
3377
|
+
</axp-widgets-container>
|
|
3378
|
+
</ax-content>
|
|
3379
|
+
<ax-footer>
|
|
3380
|
+
<ax-suffix>
|
|
3381
|
+
<ax-button [text]="'close'" (click)="onClose()" />
|
|
3382
|
+
</ax-suffix>
|
|
3383
|
+
</ax-footer>
|
|
3384
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXDecoratorModule, AXButtonModule, AXPWidgetCoreModule], styles: [":host{display:block;height:100%}ax-content{height:calc(100% - 60px)}\n"] }]
|
|
3385
|
+
}] });
|
|
3386
|
+
|
|
3387
|
+
var fileGalleryPopup_component = /*#__PURE__*/Object.freeze({
|
|
3388
|
+
__proto__: null,
|
|
3389
|
+
AXMFileGalleryPopupComponent: AXMFileGalleryPopupComponent
|
|
3390
|
+
});
|
|
3391
|
+
|
|
5742
3392
|
var AXPDocumentExplorerSettings;
|
|
5743
3393
|
(function (AXPDocumentExplorerSettings) {
|
|
5744
3394
|
AXPDocumentExplorerSettings["ViewMode"] = "DocumentManagement:Setting:DocumentExplorer.Layout.ViewMode";
|
|
@@ -5807,7 +3457,7 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
|
5807
3457
|
isMultiSelect: computed(() => store.selectionMode() === 'multiple'),
|
|
5808
3458
|
selectedNode: computed(() => store.selectedNodes()[0] ?? null),
|
|
5809
3459
|
isDetailPanelOpen: computed(() => store.detailPanel()),
|
|
5810
|
-
})), withMethods((store, fileTypeService = inject(AXPFileTypeProviderService),
|
|
3460
|
+
})), withMethods((store, fileTypeService = inject(AXPFileTypeProviderService), driveService = inject(AXMDocumentManagerService), settingsService = inject(AXPSettingsService), translateService = inject(AXTranslationService), lockService = inject(AXPLockService)) => ({
|
|
5811
3461
|
async initialize(options) {
|
|
5812
3462
|
// Load file types
|
|
5813
3463
|
const fileTypes = await fileTypeService.items();
|
|
@@ -5834,10 +3484,7 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
|
5834
3484
|
patchState(store, { loadingFolderId: folderId, isLoading: true });
|
|
5835
3485
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
5836
3486
|
try {
|
|
5837
|
-
const node = await driveService.getFolder(store.scope(), folderId
|
|
5838
|
-
tenantId: sessionService.tenant?.id,
|
|
5839
|
-
userId: sessionService.user?.id,
|
|
5840
|
-
});
|
|
3487
|
+
const node = await driveService.getFolder(store.scope(), folderId);
|
|
5841
3488
|
// Sort with direction
|
|
5842
3489
|
const sortField = store.sortField();
|
|
5843
3490
|
const sortDirection = store.sortDirection();
|
|
@@ -6291,29 +3938,30 @@ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withSta
|
|
|
6291
3938
|
},
|
|
6292
3939
|
];
|
|
6293
3940
|
// Manage versions (only if document type has versioning enabled)
|
|
6294
|
-
const docType = node.documentTypes?.[0];
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
}
|
|
3941
|
+
// const docType = node.documentTypes?.[0];
|
|
3942
|
+
//TODO handle versioning
|
|
3943
|
+
// if (docType?.enableVersioning) {
|
|
3944
|
+
// menuItems.push({
|
|
3945
|
+
// name: 'manage-versions',
|
|
3946
|
+
// text: await trans('menus.context.manage-versions'),
|
|
3947
|
+
// icon: 'fa-light fa-clock-rotate-left',
|
|
3948
|
+
// items: [
|
|
3949
|
+
// {
|
|
3950
|
+
// name: 'upload-new-version',
|
|
3951
|
+
// text: await trans('menus.context.upload-new-version'),
|
|
3952
|
+
// icon: 'fa-light fa-file-circle-plus',
|
|
3953
|
+
// data: node,
|
|
3954
|
+
// },
|
|
3955
|
+
// {
|
|
3956
|
+
// name: 'show-version-history',
|
|
3957
|
+
// text: await trans('menus.context.show-version-history'),
|
|
3958
|
+
// icon: 'fa-light fa-timeline',
|
|
3959
|
+
// data: node,
|
|
3960
|
+
// },
|
|
3961
|
+
// ],
|
|
3962
|
+
// break: true,
|
|
3963
|
+
// });
|
|
3964
|
+
// }
|
|
6317
3965
|
// Information submenu items
|
|
6318
3966
|
const infoSubItems = [
|
|
6319
3967
|
{
|
|
@@ -7074,8 +4722,11 @@ const attachmentsPlugin = {
|
|
|
7074
4722
|
multiple: opts.multiple ?? true,
|
|
7075
4723
|
accept: opts.accept,
|
|
7076
4724
|
fileEditable: opts.fileEditable ?? true,
|
|
4725
|
+
showEditDialogAfterSelect: opts.showEditDialogAfterSelect ?? false,
|
|
4726
|
+
enableTitleDescription: opts.enableTitleDescription ?? false,
|
|
7077
4727
|
fileIds: `{{ Array.isArray(context.eval("${field}")) ? context.eval("${field}") : [context.eval("${field}")] }}`,
|
|
7078
4728
|
plugins: opts.plugins ?? [],
|
|
4729
|
+
excludePlugins: opts.excludePlugins ?? [],
|
|
7079
4730
|
},
|
|
7080
4731
|
},
|
|
7081
4732
|
},
|
|
@@ -7153,14 +4804,15 @@ const attachmentsPlugin = {
|
|
|
7153
4804
|
},
|
|
7154
4805
|
};
|
|
7155
4806
|
|
|
7156
|
-
|
|
7157
|
-
function getMetaDataFormForServer(item) {
|
|
4807
|
+
function getDocumentMetaDataForm(item) {
|
|
7158
4808
|
if (item?.meta?.metaDataForm != null)
|
|
7159
4809
|
return item.meta.metaDataForm;
|
|
7160
4810
|
if (item?.metaDataForm != null)
|
|
7161
4811
|
return item.metaDataForm;
|
|
7162
|
-
if (item?.meta != null && typeof item.meta === 'object' && !Array.isArray(item.meta))
|
|
7163
|
-
|
|
4812
|
+
if (item?.meta != null && typeof item.meta === 'object' && !Array.isArray(item.meta)) {
|
|
4813
|
+
const m = item.meta;
|
|
4814
|
+
return m['metaDataForm'] ?? m;
|
|
4815
|
+
}
|
|
7164
4816
|
return undefined;
|
|
7165
4817
|
}
|
|
7166
4818
|
/** Resolve list of attachment field names from entity extensions.attachments. */
|
|
@@ -7209,7 +4861,7 @@ const attachmentsUploadMiddleware = {
|
|
|
7209
4861
|
pendingByField[field] = [];
|
|
7210
4862
|
const normalized = [];
|
|
7211
4863
|
for (const item of list) {
|
|
7212
|
-
const metaDataForm =
|
|
4864
|
+
const metaDataForm = getDocumentMetaDataForm(item);
|
|
7213
4865
|
if (item?.source?.kind === 'blob' && item.source.value instanceof Blob) {
|
|
7214
4866
|
const blob = item.source.value;
|
|
7215
4867
|
const name = item.name || `file-${Date.now()}`;
|
|
@@ -7264,7 +4916,7 @@ const attachmentsUploadMiddleware = {
|
|
|
7264
4916
|
continue;
|
|
7265
4917
|
const finalRefs = (ctx.data[field] ?? []).filter((x) => x.status !== 'pending_upload');
|
|
7266
4918
|
for (const { fileItem, blob } of pending) {
|
|
7267
|
-
const metaDataForm = fileItem.metaDataForm ??
|
|
4919
|
+
const metaDataForm = fileItem.metaDataForm ?? getDocumentMetaDataForm(fileItem);
|
|
7268
4920
|
try {
|
|
7269
4921
|
const info = await storage.save({
|
|
7270
4922
|
file: blob,
|
|
@@ -7325,6 +4977,17 @@ const attachmentsUploadMiddleware = {
|
|
|
7325
4977
|
},
|
|
7326
4978
|
};
|
|
7327
4979
|
|
|
4980
|
+
function getFileIdFromFileInfo(fileInfo) {
|
|
4981
|
+
if (fileInfo == null)
|
|
4982
|
+
return undefined;
|
|
4983
|
+
if (typeof fileInfo === 'string')
|
|
4984
|
+
return fileInfo;
|
|
4985
|
+
if (fileInfo.source?.kind === 'fileId' && typeof fileInfo.source.value === 'string')
|
|
4986
|
+
return fileInfo.source.value;
|
|
4987
|
+
if (typeof fileInfo.id === 'string')
|
|
4988
|
+
return fileInfo.id;
|
|
4989
|
+
return undefined;
|
|
4990
|
+
}
|
|
7328
4991
|
//#region ---- Plugin Guard Utilities ----
|
|
7329
4992
|
/**
|
|
7330
4993
|
* Check if the 'document' plugin is active (enabled and not excluded) in the payload.
|
|
@@ -7422,6 +5085,11 @@ const DocumentFileUploaderActionsByTypeProvider = {
|
|
|
7422
5085
|
});
|
|
7423
5086
|
if (files.length === 0)
|
|
7424
5087
|
return;
|
|
5088
|
+
const documentType = {
|
|
5089
|
+
id: docType?.id ?? '',
|
|
5090
|
+
name: typeName,
|
|
5091
|
+
title: docType?.title ?? typeName,
|
|
5092
|
+
};
|
|
7425
5093
|
const fileItems = files.map((file) => ({
|
|
7426
5094
|
id: AXPDataGenerator.uuid(),
|
|
7427
5095
|
name: file.name,
|
|
@@ -7429,7 +5097,7 @@ const DocumentFileUploaderActionsByTypeProvider = {
|
|
|
7429
5097
|
type: file.type,
|
|
7430
5098
|
status: 'attached',
|
|
7431
5099
|
source: { kind: 'blob', value: file },
|
|
7432
|
-
|
|
5100
|
+
meta: { documentType },
|
|
7433
5101
|
}));
|
|
7434
5102
|
if (hasMeta) {
|
|
7435
5103
|
const result = await documentDialogService.openAttachmentDialogWithoutSave('Document Type Choose File', {
|
|
@@ -7438,8 +5106,15 @@ const DocumentFileUploaderActionsByTypeProvider = {
|
|
|
7438
5106
|
});
|
|
7439
5107
|
if (result.data?.cancel != null && !result.data.cancel && result.data?.files) {
|
|
7440
5108
|
result.data.files.forEach((f, i) => {
|
|
7441
|
-
if (fileItems[i])
|
|
7442
|
-
|
|
5109
|
+
if (fileItems[i]) {
|
|
5110
|
+
const meta = {
|
|
5111
|
+
...fileItems[i].meta,
|
|
5112
|
+
documentType,
|
|
5113
|
+
metaDataForm: f?.metaDataForm,
|
|
5114
|
+
};
|
|
5115
|
+
set$1(fileItems[i], 'meta', meta);
|
|
5116
|
+
set$1(fileItems[i], 'metaDataForm', f?.metaDataForm);
|
|
5117
|
+
}
|
|
7443
5118
|
});
|
|
7444
5119
|
}
|
|
7445
5120
|
else if (result.data?.cancel) {
|
|
@@ -7455,29 +5130,13 @@ const DocumentFileUploaderActionsByTypeProvider = {
|
|
|
7455
5130
|
return payload;
|
|
7456
5131
|
},
|
|
7457
5132
|
};
|
|
7458
|
-
// ---------------
|
|
5133
|
+
// --------------- Before Files Added: no-op (dialog moved into uploader) ---------------
|
|
5134
|
+
// When the uploader option "showEditDialogAfterSelect" is true, the uploader shows the edit dialog (with EditDialog hooks) per file before adding.
|
|
5135
|
+
// When false, files are added directly and the user opens the same edit dialog via the Edit button. The document metadata form is injected via EditDialogAfterFormProvider (below the main form). This provider no longer opens a separate dialog.
|
|
7459
5136
|
const DocumentFileUploaderBeforeFilesAddedProvider = {
|
|
7460
5137
|
key: 'file-uploader.beforeFilesAdded',
|
|
7461
5138
|
priority: 0,
|
|
7462
5139
|
async execute(payload) {
|
|
7463
|
-
const opts = getDocumentPluginOptions(payload);
|
|
7464
|
-
const docTypeName = payload.newFiles[0]?.__documentTypeName ??
|
|
7465
|
-
opts?.docTypeName;
|
|
7466
|
-
if (!docTypeName)
|
|
7467
|
-
return payload;
|
|
7468
|
-
const injector = inject(Injector);
|
|
7469
|
-
const documentManagementService = injector.get(AXPDocumentManagementService);
|
|
7470
|
-
const docType = await documentManagementService.getDocumentTypeByName(docTypeName);
|
|
7471
|
-
const documentDialogService = injector.get(AXMDocumentDialogService);
|
|
7472
|
-
const result = await documentDialogService.openAttachmentDialogWithoutSave('Document Type Choose File', {
|
|
7473
|
-
documentType: docType,
|
|
7474
|
-
files: payload.newFiles,
|
|
7475
|
-
});
|
|
7476
|
-
if (result.data?.cancel != null && !result.data.cancel && result.data?.files) {
|
|
7477
|
-
payload.newFiles.forEach((file, i) => {
|
|
7478
|
-
set(file, 'metaDataForm', result.data?.files?.[i]?.metaDataForm);
|
|
7479
|
-
});
|
|
7480
|
-
}
|
|
7481
5140
|
return payload;
|
|
7482
5141
|
},
|
|
7483
5142
|
};
|
|
@@ -7486,9 +5145,10 @@ const DocumentFileUploaderEditDialogAfterFormProvider = {
|
|
|
7486
5145
|
key: 'file-uploader.edit-dialog.groups.after-form',
|
|
7487
5146
|
priority: 0,
|
|
7488
5147
|
async execute(payload) {
|
|
7489
|
-
const
|
|
5148
|
+
const fileMeta = payload.file.meta;
|
|
5149
|
+
const metaObj = (fileMeta?.metaDataForm ?? payload.file.metaDataForm);
|
|
7490
5150
|
const opts = getDocumentPluginOptions(payload);
|
|
7491
|
-
const docTypeName =
|
|
5151
|
+
const docTypeName = fileMeta?.documentType?.name ?? opts?.docTypeName;
|
|
7492
5152
|
const injector = inject(Injector);
|
|
7493
5153
|
const documentManagementService = injector.get(AXPDocumentManagementService);
|
|
7494
5154
|
const docType = docTypeName
|
|
@@ -7540,9 +5200,8 @@ const DocumentFileUploaderDownloadReferenceProvider = {
|
|
|
7540
5200
|
console.error('Document not found for reference:', payload.reference);
|
|
7541
5201
|
return payload;
|
|
7542
5202
|
}
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
if (!fileId || typeof fileId !== 'string') {
|
|
5203
|
+
const fileId = getFileIdFromFileInfo(document.fileInfo);
|
|
5204
|
+
if (!fileId) {
|
|
7546
5205
|
console.error('Document does not have a valid fileId:', document);
|
|
7547
5206
|
return payload;
|
|
7548
5207
|
}
|
|
@@ -7601,13 +5260,7 @@ class AXMDocumentManagementModule {
|
|
|
7601
5260
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7602
5261
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementModule, imports: [AXMDriveChooseModule,
|
|
7603
5262
|
// Entity Modules
|
|
7604
|
-
|
|
7605
|
-
AXMDocumentManagementDocumentTypeMetaValueEntityModule,
|
|
7606
|
-
AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
|
|
7607
|
-
AXMDocumentManagementDocumentTypeEntityModule,
|
|
7608
|
-
AXMDocumentManagementDocumentEntityModule,
|
|
7609
|
-
AXMFolderEntityModule,
|
|
7610
|
-
AXMReviewEntityModule, i6.AXPWidgetCoreModule, i2$2.AXMediaViewerModule, i3$1.AXPWorkflowModule] }); }
|
|
5263
|
+
AXMDocumentManagementDocumentTypeEntityModule, i6.AXPWidgetCoreModule, i2$2.AXMediaViewerModule, i3$1.AXPWorkflowModule] }); }
|
|
7611
5264
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMDocumentManagementModule, providers: [
|
|
7612
5265
|
// Module-specific providers (not part of manifest system)
|
|
7613
5266
|
{ provide: AXP_ENTITY_ACTION_PLUGIN, multi: true, useValue: attachmentsPlugin },
|
|
@@ -7659,15 +5312,21 @@ class AXMDocumentManagementModule {
|
|
|
7659
5312
|
useClass: AXMSearchCommandProvider,
|
|
7660
5313
|
multi: true,
|
|
7661
5314
|
},
|
|
5315
|
+
{
|
|
5316
|
+
provide: AXMDocumentService,
|
|
5317
|
+
useClass: AXMDocumentServiceImpl,
|
|
5318
|
+
},
|
|
5319
|
+
{
|
|
5320
|
+
provide: AXMFolderService,
|
|
5321
|
+
useClass: AXMFolderServiceImpl,
|
|
5322
|
+
},
|
|
5323
|
+
{
|
|
5324
|
+
provide: AXMDocumentManagerService,
|
|
5325
|
+
useClass: AXMDocumentManagerServiceImpl,
|
|
5326
|
+
},
|
|
7662
5327
|
], imports: [AXMDriveChooseModule,
|
|
7663
5328
|
// Entity Modules
|
|
7664
|
-
AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule,
|
|
7665
|
-
AXMDocumentManagementDocumentTypeMetaValueEntityModule,
|
|
7666
|
-
AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
|
|
7667
5329
|
AXMDocumentManagementDocumentTypeEntityModule,
|
|
7668
|
-
AXMDocumentManagementDocumentEntityModule,
|
|
7669
|
-
AXMFolderEntityModule,
|
|
7670
|
-
AXMReviewEntityModule,
|
|
7671
5330
|
AXPWidgetCoreModule.forChild({
|
|
7672
5331
|
widgets: [AXmFileTypeExtensionWidget],
|
|
7673
5332
|
}),
|
|
@@ -7689,13 +5348,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
7689
5348
|
imports: [
|
|
7690
5349
|
AXMDriveChooseModule,
|
|
7691
5350
|
// Entity Modules
|
|
7692
|
-
AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule,
|
|
7693
|
-
AXMDocumentManagementDocumentTypeMetaValueEntityModule,
|
|
7694
|
-
AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
|
|
7695
5351
|
AXMDocumentManagementDocumentTypeEntityModule,
|
|
7696
|
-
AXMDocumentManagementDocumentEntityModule,
|
|
7697
|
-
AXMFolderEntityModule,
|
|
7698
|
-
AXMReviewEntityModule,
|
|
7699
5352
|
AXPWidgetCoreModule.forChild({
|
|
7700
5353
|
widgets: [AXmFileTypeExtensionWidget],
|
|
7701
5354
|
}),
|
|
@@ -7763,6 +5416,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
7763
5416
|
useClass: AXMSearchCommandProvider,
|
|
7764
5417
|
multi: true,
|
|
7765
5418
|
},
|
|
5419
|
+
{
|
|
5420
|
+
provide: AXMDocumentService,
|
|
5421
|
+
useClass: AXMDocumentServiceImpl,
|
|
5422
|
+
},
|
|
5423
|
+
{
|
|
5424
|
+
provide: AXMFolderService,
|
|
5425
|
+
useClass: AXMFolderServiceImpl,
|
|
5426
|
+
},
|
|
5427
|
+
{
|
|
5428
|
+
provide: AXMDocumentManagerService,
|
|
5429
|
+
useClass: AXMDocumentManagerServiceImpl,
|
|
5430
|
+
},
|
|
7766
5431
|
],
|
|
7767
5432
|
}]
|
|
7768
5433
|
}] });
|
|
@@ -7952,8 +5617,6 @@ class AXMDocumentDriveComponent extends AXPPageLayoutBaseComponent {
|
|
|
7952
5617
|
this.previousFolderId = currentNode?.id ?? null;
|
|
7953
5618
|
}
|
|
7954
5619
|
const result = await this.driveService.searchNodes(searchValue, this.vm.scope(), {
|
|
7955
|
-
tenantId: this.sessionService.tenant?.id,
|
|
7956
|
-
userId: this.sessionService.user?.id,
|
|
7957
5620
|
folderId: this.vm.isVirtual() ? (this.previousFolderId ?? undefined) : (this.vm.currentNode()?.id ?? undefined),
|
|
7958
5621
|
});
|
|
7959
5622
|
// Get the folder ID to use as parentId for the virtual folder
|
|
@@ -7990,10 +5653,7 @@ class AXMDocumentDriveComponent extends AXPPageLayoutBaseComponent {
|
|
|
7990
5653
|
}
|
|
7991
5654
|
else {
|
|
7992
5655
|
// TODO: get root from tenant or user by scope
|
|
7993
|
-
const root = await this.driveService.getRoot(this.vm.scope()
|
|
7994
|
-
tenantId: this.sessionService.tenant?.id,
|
|
7995
|
-
userId: this.sessionService.user?.id,
|
|
7996
|
-
});
|
|
5656
|
+
const root = await this.driveService.getRoot(this.vm.scope());
|
|
7997
5657
|
if (root.result) {
|
|
7998
5658
|
await this.router.navigate([
|
|
7999
5659
|
`${this.sessionService.application?.name}/drive/${resolvePlatformScopeName(this.vm.scope())}/${root.result.id}`,
|
|
@@ -8238,5 +5898,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
8238
5898
|
* Generated bundle index. Do not edit.
|
|
8239
5899
|
*/
|
|
8240
5900
|
|
|
8241
|
-
export { AXMArchiveFileTypeProvider, AXMAudioFileTypeProvider, AXMCodeFileTypeProvider, AXMDocumentDriveComponent, AXMDocumentExplorerComponent, AXMDocumentFileTypeProvider,
|
|
5901
|
+
export { AXMArchiveFileTypeProvider, AXMAudioFileTypeProvider, AXMCodeFileTypeProvider, AXMDocumentDriveComponent, AXMDocumentExplorerComponent, AXMDocumentFileTypeProvider, AXMDocumentManagementDocumentTypeEntityModule, AXMDocumentManagementModule, AXMDocumentManagerService, AXMDocumentManagerServiceImpl, AXMDocumentService, AXMDocumentServiceImpl, AXMDocumentTypeService, AXMDocumentTypeServiceImpl, AXMEntityProvider, AXMFileGalleryPopupComponent, AXMFileTypeExtensionWidgetColumnComponent, AXMFileTypeExtensionWidgetDesignerComponent, AXMFileTypeExtensionWidgetEditComponent, AXMFileTypeExtensionWidgetViewComponent, AXMFileTypeModule, AXMFolderPathBreadcrumbsComponent, AXMFolderService, AXMFolderServiceImpl, AXMImageFileTypeProvider, AXMMenuProvider, AXMPermissionsKeys, AXMSearchCommandProvider, AXMSettingProvider, AXMVideoFileTypeProvider, AXPDocumentExplorerSettings, AXPDocumentExplorerViewModel, AXPDocumentManagementFeatureKeys, AXPDocumentManagementMenuKeys, AXPDocumentManagementService, AXmFileTypeExtensionWidget, RootConfig, ScopedDriveService, documentEntityFactory, documentTypeFactory, folderEntityFactory };
|
|
8242
5902
|
//# sourceMappingURL=acorex-modules-document-management.mjs.map
|