@acorex/modules 19.2.15 → 19.2.17-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/common/README.md +3 -0
  2. package/common/index.d.ts +6 -0
  3. package/common/lib/common.module.d.ts +6 -0
  4. package/common/lib/const.d.ts +25 -0
  5. package/common/lib/entities/dashboard/dashboard.entity.d.ts +3 -0
  6. package/common/lib/entities/dashboard/dashboard.service.d.ts +10 -0
  7. package/common/lib/entities/dashboard/dashboard.types.d.ts +8 -0
  8. package/common/lib/entities/dashboard/index.d.ts +3 -0
  9. package/common/lib/entities/dashboard-widget-data/dashboard-widget-data.entity.d.ts +3 -0
  10. package/common/lib/entities/dashboard-widget-data/dashboard-widget-data.service.d.ts +10 -0
  11. package/common/lib/entities/dashboard-widget-data/dashboard-widget-data.types.d.ts +9 -0
  12. package/common/lib/entities/dashboard-widget-data/index.d.ts +3 -0
  13. package/common/lib/entities/index.d.ts +2 -0
  14. package/common/lib/entity.provider.d.ts +10 -0
  15. package/common/lib/features/home/dashboard-home.d.ts +5 -0
  16. package/common/lib/features/home/index.d.ts +1 -0
  17. package/common/lib/menu.provider.d.ts +5 -0
  18. package/common/lib/permission.provider.d.ts +4 -0
  19. package/common/lib/search-command.provider.d.ts +4 -0
  20. package/common/lib/setting.provider.d.ts +4 -0
  21. package/document-management/lib/entities/document/document.service.d.ts +7 -0
  22. package/document-management/lib/entities/folder/folder.service.d.ts +7 -0
  23. package/document-management/lib/features/document-explorer/components/rename-node-dialog/rename-node-dialog.component.d.ts +14 -0
  24. package/document-management/lib/features/document-explorer/document-explorer.component.d.ts +12 -9
  25. package/document-management/lib/features/document-explorer/document-explorer.viewmodel.d.ts +2 -2
  26. package/document-management/lib/features/drive/drive.component.d.ts +3 -2
  27. package/document-management/lib/features/shared/document-manager.service.d.ts +80 -1
  28. package/document-management/lib/features/shared/document-manager.types.d.ts +1 -1
  29. package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-column.component.d.ts +6 -0
  30. package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-edit.component.d.ts +6 -0
  31. package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-filter.component.d.ts +6 -0
  32. package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-print.component.d.ts +6 -0
  33. package/document-management/lib/features/widgets/document-attachment/document-attachment-widget-view.component.d.ts +6 -0
  34. package/document-management/lib/features/widgets/document-attachment/document-attachment-widget.config.d.ts +7 -0
  35. package/document-management/lib/features/widgets/document-attachment/index.d.ts +6 -0
  36. package/document-management/lib/features/widgets/index.d.ts +1 -0
  37. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-CZ_nTBkL.mjs → acorex-modules-auth-acorex-modules-auth-DTje3YIv.mjs} +8 -8
  38. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-CZ_nTBkL.mjs.map → acorex-modules-auth-acorex-modules-auth-DTje3YIv.mjs.map} +1 -1
  39. package/fesm2022/{acorex-modules-auth-app-chooser.component-CGSygSjS.mjs → acorex-modules-auth-app-chooser.component-CZxX5-T_.mjs} +2 -2
  40. package/fesm2022/{acorex-modules-auth-app-chooser.component-CGSygSjS.mjs.map → acorex-modules-auth-app-chooser.component-CZxX5-T_.mjs.map} +1 -1
  41. package/fesm2022/{acorex-modules-auth-login.module-B1sF3B_O.mjs → acorex-modules-auth-login.module-B9P2XpfQ.mjs} +4 -4
  42. package/fesm2022/{acorex-modules-auth-login.module-B1sF3B_O.mjs.map → acorex-modules-auth-login.module-B9P2XpfQ.mjs.map} +1 -1
  43. package/fesm2022/{acorex-modules-auth-master.layout-CK4nyS8D.mjs → acorex-modules-auth-master.layout-BYC0FYq1.mjs} +2 -2
  44. package/fesm2022/{acorex-modules-auth-master.layout-CK4nyS8D.mjs.map → acorex-modules-auth-master.layout-BYC0FYq1.mjs.map} +1 -1
  45. package/fesm2022/{acorex-modules-auth-password.component-DC_zi8bV.mjs → acorex-modules-auth-password.component-C7Yp-ioT.mjs} +2 -2
  46. package/fesm2022/{acorex-modules-auth-password.component-DC_zi8bV.mjs.map → acorex-modules-auth-password.component-C7Yp-ioT.mjs.map} +1 -1
  47. package/fesm2022/{acorex-modules-auth-password.component-DqvmIMDR.mjs → acorex-modules-auth-password.component-DzrYH4yM.mjs} +3 -3
  48. package/fesm2022/acorex-modules-auth-password.component-DzrYH4yM.mjs.map +1 -0
  49. package/fesm2022/{acorex-modules-auth-routes-DwHgPrDP.mjs → acorex-modules-auth-routes-Bu-xB4O6.mjs} +2 -2
  50. package/fesm2022/{acorex-modules-auth-routes-DwHgPrDP.mjs.map → acorex-modules-auth-routes-Bu-xB4O6.mjs.map} +1 -1
  51. package/fesm2022/{acorex-modules-auth-two-factor.module-BatKQRdJ.mjs → acorex-modules-auth-two-factor.module-YRh6_YcG.mjs} +2 -2
  52. package/fesm2022/{acorex-modules-auth-two-factor.module-BatKQRdJ.mjs.map → acorex-modules-auth-two-factor.module-YRh6_YcG.mjs.map} +1 -1
  53. package/fesm2022/acorex-modules-auth.mjs +1 -1
  54. package/fesm2022/acorex-modules-common-index-zaFxpV8u.mjs +14 -0
  55. package/fesm2022/acorex-modules-common-index-zaFxpV8u.mjs.map +1 -0
  56. package/fesm2022/acorex-modules-common.mjs +1095 -0
  57. package/fesm2022/acorex-modules-common.mjs.map +1 -0
  58. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-C9ZCejjs.mjs +4092 -0
  59. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-C9ZCejjs.mjs.map +1 -0
  60. package/fesm2022/acorex-modules-document-management-create-folder-dialog.component-BnRaCq_Q.mjs +92 -0
  61. package/fesm2022/acorex-modules-document-management-create-folder-dialog.component-BnRaCq_Q.mjs.map +1 -0
  62. package/fesm2022/acorex-modules-document-management-drive.component-Sz198sA6.mjs +165 -0
  63. package/fesm2022/acorex-modules-document-management-drive.component-Sz198sA6.mjs.map +1 -0
  64. package/fesm2022/acorex-modules-document-management-index--I8MGeDs.mjs +2 -0
  65. package/fesm2022/acorex-modules-document-management-index--I8MGeDs.mjs.map +1 -0
  66. package/fesm2022/acorex-modules-document-management-rename-node-dialog.component-EBf1XqU8.mjs +101 -0
  67. package/fesm2022/acorex-modules-document-management-rename-node-dialog.component-EBf1XqU8.mjs.map +1 -0
  68. package/fesm2022/acorex-modules-document-management.mjs +1 -3093
  69. package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
  70. package/package.json +5 -1
  71. package/document-management/lib/features/drive/index.d.ts +0 -3
  72. package/fesm2022/acorex-modules-auth-password.component-DqvmIMDR.mjs.map +0 -1
  73. package/fesm2022/acorex-modules-document-management-drive.component-bjnFFaLS.mjs +0 -951
  74. package/fesm2022/acorex-modules-document-management-drive.component-bjnFFaLS.mjs.map +0 -1
@@ -0,0 +1,4092 @@
1
+ import { AXPSessionService, AXPAuthGuard, AXP_PERMISSION_PROVIDER } from '@acorex/platform/auth';
2
+ import { AXPSearchCommandProvider, AXPEntityQueryType, AXPEntityCommandScope, createAllQueryView, AXPFileTypeProviderService, AXP_FILE_TYPE_INFO_PROVIDER, AXPSettingScope, AXPSettingService, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
3
+ import { AXPEntityService, AXMEntityCrudServiceImpl, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
4
+ import * as i0 from '@angular/core';
5
+ import { inject, Injector, Injectable, NgModule, Component, ChangeDetectionStrategy, signal, computed, viewChild, effect } from '@angular/core';
6
+ import { firstValueFrom, Subject } from 'rxjs';
7
+ import * as i6 from '@acorex/platform/layout/builder';
8
+ import { AXPWidgetsCatalog, AXPWidgetComponent, AXPLayoutBuilderModule, AXP_WIDGETS_ADVANCE_GROUP, AXP_WIDGETS_EDITOR_GROUP } from '@acorex/platform/layout/builder';
9
+ import { RouterModule, ROUTES } from '@angular/router';
10
+ import { AXDataSource } from '@acorex/components/common';
11
+ import { AXMMetaDataDefinitionService } from '@acorex/modules/platform-management';
12
+ import * as i1$1 from '@angular/common';
13
+ import { CommonModule } from '@angular/common';
14
+ import * as i7$1 from '@acorex/components/collapse';
15
+ import { AXCollapseModule } from '@acorex/components/collapse';
16
+ import * as i5$1 from '@acorex/components/decorators';
17
+ import { AXDecoratorModule } from '@acorex/components/decorators';
18
+ import * as i7 from '@acorex/components/form';
19
+ import { AXFormModule } from '@acorex/components/form';
20
+ import * as i5 from '@acorex/components/label';
21
+ import { AXLabelModule } from '@acorex/components/label';
22
+ import * as i1 from '@acorex/components/select-box';
23
+ import { AXSelectBoxModule } from '@acorex/components/select-box';
24
+ import * as i2 from '@angular/forms';
25
+ import { FormsModule } from '@angular/forms';
26
+ import get from 'lodash-es/get';
27
+ import set from 'lodash-es/set';
28
+ import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY } from '@acorex/platform/widgets';
29
+ import { AXLoadingModule } from '@acorex/components/loading';
30
+ import * as i4 from '@acorex/components/menu';
31
+ import { AXMenuModule } from '@acorex/components/menu';
32
+ import { AXDateTimeModule } from '@acorex/core/date-time';
33
+ import * as i3 from '@acorex/core/format';
34
+ import { AXFormatModule } from '@acorex/core/format';
35
+ import { AXTranslationService } from '@acorex/core/translation';
36
+ import { AXPDataGenerator, AXPElementDataDirective } from '@acorex/platform/core';
37
+ import { get as get$1 } from 'lodash-es';
38
+ import { AXDialogService } from '@acorex/components/dialog';
39
+ import { AXPopupService } from '@acorex/components/popup';
40
+ import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
41
+
42
+ const config = {
43
+ i18n: 'document-management',
44
+ };
45
+ const RootConfig = {
46
+ config,
47
+ module: {
48
+ module: 'DocumentManagement',
49
+ name: 'DocumentManagement',
50
+ title: `t('documentManagement', {scope:"${config.i18n}"})`,
51
+ icon: 'fa-light fa-file-invoice',
52
+ },
53
+ entities: {
54
+ folder: {
55
+ name: 'Folder',
56
+ title: `t("folder", { scope: "${config.i18n}" })`,
57
+ titlePlural: `t("folderPlural", { scope: "${config.i18n}" })`,
58
+ icon: 'fa-light fa-folder',
59
+ },
60
+ document: {
61
+ name: 'Document',
62
+ title: `t("document", { scope: "${config.i18n}" })`,
63
+ titlePlural: `t("documentPlural", { scope: "${config.i18n}" })`,
64
+ icon: 'fa-light fa-file',
65
+ },
66
+ documentType: {
67
+ name: 'DocumentType',
68
+ title: `t("documentType", { scope: "${config.i18n}" })`,
69
+ titlePlural: `t("documentTypePlural", { scope: "${config.i18n}" })`,
70
+ icon: 'fa-light fa-books',
71
+ },
72
+ documentTypeMetaDefinition: {
73
+ name: 'documentTypeMeta',
74
+ title: `t("documentTypeMeta", { scope: "${config.i18n}" })`,
75
+ titlePlural: `t("documentTypeMetaPlural", { scope: "${config.i18n}" })`,
76
+ icon: 'fa-light fa-meta',
77
+ },
78
+ documentTypeMetaValue: {
79
+ name: 'documentTypeMetaValue',
80
+ title: `t("documentTypeMetaValue", { scope: "${config.i18n}" })`,
81
+ titlePlural: `t("documentTypeMetaValuePlural", { scope: "${config.i18n}" })`,
82
+ icon: 'fa-light fa-meta',
83
+ },
84
+ documentTypeStatus: {
85
+ name: 'documentTypeStatus',
86
+ title: `t("documentTypeStatus", { scope: "${config.i18n}" })`,
87
+ titlePlural: `t("documentTypeStatusPlural", { scope: "${config.i18n}" })`,
88
+ icon: 'fa-light fa-status',
89
+ },
90
+ },
91
+ };
92
+
93
+ class AXMEntityProvider {
94
+ constructor() {
95
+ this.injector = inject(Injector);
96
+ }
97
+ preload() {
98
+ const module = RootConfig.module.name;
99
+ return Array.from(Object.values(RootConfig.entities)).map((entity) => ({
100
+ module: module,
101
+ entity: entity.name,
102
+ }));
103
+ }
104
+ async get(moduleName, entityName) {
105
+ if (moduleName == RootConfig.module.name) {
106
+ switch (entityName) {
107
+ case RootConfig.entities.document.name:
108
+ return (await Promise.resolve().then(function () { return index; })).documentFactory(this.injector);
109
+ case RootConfig.entities.documentType.name:
110
+ return (await Promise.resolve().then(function () { return index; })).documentTypeFactory(this.injector);
111
+ case RootConfig.entities.folder.name:
112
+ return (await Promise.resolve().then(function () { return index; })).folderFactory(this.injector);
113
+ }
114
+ }
115
+ return null;
116
+ }
117
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMEntityProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
118
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMEntityProvider }); }
119
+ }
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMEntityProvider, decorators: [{
121
+ type: Injectable
122
+ }] });
123
+
124
+ class AXMMenuProvider {
125
+ constructor() {
126
+ this.entityService = inject(AXPEntityService);
127
+ this.sessionService = inject(AXPSessionService);
128
+ }
129
+ async provide(context) {
130
+ const isAuthorized = await firstValueFrom(this.sessionService.isAuthorized$);
131
+ if (!isAuthorized) {
132
+ return;
133
+ }
134
+ //
135
+ context.addItems([
136
+ {
137
+ priority: 9001,
138
+ text: RootConfig.module.title,
139
+ icon: RootConfig.module.icon,
140
+ children: [
141
+ {
142
+ text: RootConfig.entities.documentType.title,
143
+ path: this.entityService.createPath(RootConfig.module.name, RootConfig.entities.documentType.name),
144
+ icon: RootConfig.entities.documentType.icon,
145
+ priority: 2
146
+ },
147
+ {
148
+ text: RootConfig.entities.document.titlePlural,
149
+ path: `${this.sessionService.application?.name}/drive/company`,
150
+ icon: RootConfig.entities.document.icon,
151
+ priority: 1
152
+ }
153
+ ]
154
+ }
155
+ ]);
156
+ //
157
+ context.find('edit-profile').insert([
158
+ {
159
+ name: 'my-notifications',
160
+ text: `t('my-drive.title', {scope: "${RootConfig.config.i18n}"})`,
161
+ icon: 'fa-light fa-folder-open',
162
+ path: `${this.sessionService.application?.name}/drive/my`,
163
+ data: {
164
+ scope: 'user'
165
+ },
166
+ },
167
+ ], 'after');
168
+ }
169
+ }
170
+
171
+ class AXMPermissionProvider {
172
+ async provide(context) {
173
+ // context.addPermissions([
174
+ // {
175
+ // name: 'view_templates',
176
+ // title: 'Permission to view templates',
177
+ // isArchived: false,
178
+ // },
179
+ // ]);
180
+ }
181
+ }
182
+
183
+ class AXMSearchCommandProvider extends AXPSearchCommandProvider {
184
+ constructor() {
185
+ super(...arguments);
186
+ this.commands = [
187
+ // {
188
+ // group: 'command',
189
+ // title: 'New Form Template',
190
+ // icon: RootConfig.entities.template.icon,
191
+ // description: 'Create a new form template for designing reusable forms.', // Added description
192
+ // commands: {
193
+ // 'create-entity': {
194
+ // entity: `${RootConfig.module.name}.${RootConfig.entities.template.name}`,
195
+ // },
196
+ // },
197
+ // }
198
+ ];
199
+ }
200
+ }
201
+
202
+ class AXMSettingProvider {
203
+ async provide(context) {
204
+ // context
205
+ // // Add Form Template Group
206
+ // .addGroup('form-template', 'Form Template', 'Settings related to form templates.', RootConfig.module.icon)
207
+ // // Start Interface Section
208
+ // .addSection('interface', 'UI Interface', 'Customize the user interface for forms.')
209
+ // .addSetting({
210
+ // key: 'history-panel',
211
+ // title: 'Show History Panel',
212
+ // scope: 'U',
213
+ // isInherited: true,
214
+ // defaultValue: false,
215
+ // widget: {
216
+ // type: AXPWidgetsCatalog.toggle,
217
+ // },
218
+ // description: 'Enable or disable the history panel for forms.',
219
+ // validationRules: [
220
+ // {
221
+ // rule: 'required',
222
+ // },
223
+ // ],
224
+ // })
225
+ // .endSection()
226
+ // .endGroup();
227
+ }
228
+ }
229
+
230
+ class AXMDocumentService extends AXMEntityCrudServiceImpl {
231
+ }
232
+ class AXMDocumentServiceImpl extends AXMDocumentService {
233
+ constructor() {
234
+ super(`${RootConfig.module.name}.${RootConfig.entities.document.name}`);
235
+ }
236
+ async getPath(_) {
237
+ throw new Error('Not implemented');
238
+ }
239
+ async searchFiles(_searchTerm, _rootFolderId) {
240
+ throw new Error('Not implemented');
241
+ }
242
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
243
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentServiceImpl }); }
244
+ }
245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentServiceImpl, decorators: [{
246
+ type: Injectable
247
+ }], ctorParameters: () => [] });
248
+
249
+ async function documentFactory(injector) {
250
+ const dataService = injector.get(AXMDocumentService);
251
+ const i18n = RootConfig.config.i18n;
252
+ const entityDef = {
253
+ module: RootConfig.module.name,
254
+ name: RootConfig.entities.document.name,
255
+ source: '',
256
+ title: RootConfig.entities.document.title,
257
+ formats: {
258
+ individual: RootConfig.entities.document.title,
259
+ plural: RootConfig.entities.document.titlePlural,
260
+ searchResult: {
261
+ title: '{{ title }}',
262
+ description: RootConfig.module.title,
263
+ },
264
+ },
265
+ relatedEntities: [],
266
+ groups: [
267
+ {
268
+ id: 'section',
269
+ title: RootConfig.entities.document.title,
270
+ },
271
+ ],
272
+ properties: [
273
+ {
274
+ name: 'name',
275
+ title: 't("name", { scope: "common" })',
276
+ groupId: 'section',
277
+ options: {
278
+ sort: {
279
+ enabled: true,
280
+ },
281
+ },
282
+ schema: {
283
+ dataType: 'string',
284
+ interface: {
285
+ type: AXPWidgetsCatalog.text,
286
+ },
287
+ },
288
+ validations: [
289
+ {
290
+ rule: 'required',
291
+ },
292
+ ],
293
+ },
294
+ {
295
+ name: 'title',
296
+ title: 't("title", { scope: "common" })',
297
+ groupId: 'section',
298
+ schema: {
299
+ dataType: 'string',
300
+ interface: {
301
+ type: AXPWidgetsCatalog.text,
302
+ },
303
+ },
304
+ validations: [
305
+ {
306
+ rule: 'required',
307
+ },
308
+ ],
309
+ },
310
+ {
311
+ name: 'type',
312
+ title: 't("type", { scope: "common" })',
313
+ groupId: 'section',
314
+ schema: {
315
+ dataType: 'string',
316
+ interface: {
317
+ type: AXPWidgetsCatalog.lookup,
318
+ options: {
319
+ entity: `${RootConfig.module.name}.${RootConfig.entities.documentType.name}`,
320
+ expose: 'type',
321
+ },
322
+ },
323
+ },
324
+ validations: [
325
+ {
326
+ rule: 'required',
327
+ },
328
+ ],
329
+ },
330
+ {
331
+ name: 'metaData',
332
+ title: 't("metaData", { scope: "common" })',
333
+ groupId: 'section',
334
+ schema: {
335
+ dataType: 'string',
336
+ interface: {
337
+ type: AXPWidgetsCatalog.metaData,
338
+ options: {
339
+ listMeta: ` {{context.eval("type.meta")}} `,
340
+ },
341
+ triggers: [
342
+ {
343
+ event: `{{ events.context("type") }}`,
344
+ action: `{{ console.log(context.eval("type")); }}`,
345
+ },
346
+ ],
347
+ },
348
+ },
349
+ validations: [
350
+ {
351
+ rule: 'required',
352
+ },
353
+ ],
354
+ },
355
+ {
356
+ name: 'file',
357
+ title: `t("file", { scope: "${i18n}" })`,
358
+ groupId: 'section',
359
+ schema: {
360
+ dataType: 'string',
361
+ interface: {
362
+ type: AXPWidgetsCatalog.file,
363
+ options: {
364
+ maxFileSize: ` {{context.eval("type.maxSize")}} `,
365
+ multiple: ` {{context.eval("type.multiple")}} `,
366
+ accept: ` {{context.eval("type.multiple")}} `,
367
+ },
368
+ },
369
+ },
370
+ validations: [
371
+ {
372
+ rule: 'required',
373
+ },
374
+ ],
375
+ },
376
+ ],
377
+ columns: [{ name: 'name' }, { name: 'title' }],
378
+ commands: {
379
+ create: {
380
+ execute: async (data) => {
381
+ const res = await dataService.insertOne(data);
382
+ return { id: res };
383
+ },
384
+ },
385
+ delete: {
386
+ execute: async (id) => {
387
+ return await dataService.deleteOne(id);
388
+ },
389
+ },
390
+ update: {
391
+ execute: async (data) => {
392
+ return await dataService.updateOne(data.id, data);
393
+ },
394
+ },
395
+ },
396
+ queries: {
397
+ byKey: {
398
+ execute: async (id) => {
399
+ return await dataService.getOne(id);
400
+ },
401
+ type: AXPEntityQueryType.Single,
402
+ },
403
+ list: {
404
+ execute: async (e) => {
405
+ return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
406
+ },
407
+ type: AXPEntityQueryType.List,
408
+ },
409
+ },
410
+ interfaces: {
411
+ master: {
412
+ create: {
413
+ sections: [
414
+ {
415
+ id: 'section',
416
+ },
417
+ ],
418
+ properties: [
419
+ {
420
+ name: 'name',
421
+ layout: {
422
+ positions: {
423
+ lg: {
424
+ colSpan: 6,
425
+ },
426
+ },
427
+ },
428
+ },
429
+ {
430
+ name: 'title',
431
+ layout: {
432
+ positions: {
433
+ lg: {
434
+ colSpan: 6,
435
+ },
436
+ },
437
+ },
438
+ },
439
+ {
440
+ name: 'type',
441
+ layout: {
442
+ positions: {
443
+ lg: {
444
+ colSpan: 12,
445
+ },
446
+ },
447
+ },
448
+ },
449
+ {
450
+ name: 'metaData',
451
+ layout: {
452
+ positions: {
453
+ lg: {
454
+ colSpan: 12,
455
+ },
456
+ },
457
+ },
458
+ },
459
+ {
460
+ name: 'file',
461
+ layout: {
462
+ positions: {
463
+ lg: {
464
+ colSpan: 12,
465
+ },
466
+ },
467
+ },
468
+ },
469
+ ],
470
+ },
471
+ update: {
472
+ sections: [
473
+ {
474
+ id: 'section',
475
+ },
476
+ ],
477
+ properties: [
478
+ {
479
+ name: 'name',
480
+ layout: {
481
+ positions: {
482
+ lg: {
483
+ colSpan: 6,
484
+ },
485
+ },
486
+ },
487
+ },
488
+ {
489
+ name: 'title',
490
+ layout: {
491
+ positions: {
492
+ lg: {
493
+ colSpan: 6,
494
+ },
495
+ },
496
+ },
497
+ },
498
+ {
499
+ name: 'type',
500
+ layout: {
501
+ positions: {
502
+ lg: {
503
+ colSpan: 12,
504
+ },
505
+ },
506
+ },
507
+ },
508
+ {
509
+ name: 'metaData',
510
+ layout: {
511
+ positions: {
512
+ lg: {
513
+ colSpan: 12,
514
+ },
515
+ },
516
+ },
517
+ },
518
+ {
519
+ name: 'file',
520
+ layout: {
521
+ positions: {
522
+ lg: {
523
+ colSpan: 12,
524
+ },
525
+ },
526
+ },
527
+ },
528
+ ],
529
+ },
530
+ single: {
531
+ title: '{{title}}',
532
+ sections: [
533
+ {
534
+ id: 'section',
535
+ layout: {
536
+ positions: {
537
+ lg: {
538
+ colSpan: 12,
539
+ },
540
+ },
541
+ },
542
+ },
543
+ ],
544
+ properties: [
545
+ {
546
+ name: 'name',
547
+ layout: {
548
+ positions: {
549
+ lg: {
550
+ colSpan: 6,
551
+ },
552
+ },
553
+ },
554
+ },
555
+ {
556
+ name: 'title',
557
+ layout: {
558
+ positions: {
559
+ lg: {
560
+ colSpan: 6,
561
+ },
562
+ },
563
+ },
564
+ },
565
+ {
566
+ name: 'type',
567
+ layout: {
568
+ positions: {
569
+ lg: {
570
+ colSpan: 12,
571
+ },
572
+ },
573
+ },
574
+ },
575
+ {
576
+ name: 'metaData',
577
+ layout: {
578
+ positions: {
579
+ lg: {
580
+ colSpan: 12,
581
+ },
582
+ },
583
+ },
584
+ },
585
+ {
586
+ name: 'file',
587
+ layout: {
588
+ positions: {
589
+ lg: {
590
+ colSpan: 12,
591
+ },
592
+ },
593
+ },
594
+ },
595
+ ],
596
+ actions: [],
597
+ },
598
+ list: {
599
+ actions: [
600
+ {
601
+ title: `t("create", { scope: "common" })`,
602
+ command: 'create-entity',
603
+ priority: 'primary',
604
+ type: 'create',
605
+ scope: AXPEntityCommandScope.TypeLevel,
606
+ },
607
+ {
608
+ title: 't("deleteItems", { scope: "common" })',
609
+ command: 'delete-entity',
610
+ priority: 'primary',
611
+ type: 'delete',
612
+ scope: AXPEntityCommandScope.Selected,
613
+ },
614
+ {
615
+ title: 't("detail", { scope: "common" })',
616
+ command: 'open-entity',
617
+ priority: 'secondary',
618
+ type: 'view',
619
+ scope: AXPEntityCommandScope.Individual,
620
+ },
621
+ {
622
+ title: 't("delete", { scope: "common" })',
623
+ command: 'delete-entity',
624
+ priority: 'secondary',
625
+ type: 'delete',
626
+ scope: AXPEntityCommandScope.Individual,
627
+ },
628
+ ],
629
+ views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
630
+ },
631
+ },
632
+ },
633
+ };
634
+ return entityDef;
635
+ }
636
+
637
+ class AXMDocumentManagementDocumentEntityModule {
638
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
639
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentEntityModule }); }
640
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentEntityModule, providers: [
641
+ {
642
+ provide: AXMDocumentService,
643
+ useClass: AXMDocumentServiceImpl,
644
+ },
645
+ ] }); }
646
+ }
647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentEntityModule, decorators: [{
648
+ type: NgModule,
649
+ args: [{
650
+ imports: [],
651
+ exports: [],
652
+ declarations: [],
653
+ providers: [
654
+ {
655
+ provide: AXMDocumentService,
656
+ useClass: AXMDocumentServiceImpl,
657
+ },
658
+ ],
659
+ }]
660
+ }] });
661
+
662
+ class AXMDocumentManagementDocumentTypeEntityService extends AXMEntityCrudServiceImpl {
663
+ }
664
+ class AXMDocumentManagementDocumentTypeEntityServiceImpl extends AXMDocumentManagementDocumentTypeEntityService {
665
+ constructor() {
666
+ super(`${RootConfig.module.name}.${RootConfig.entities.documentType.name}`);
667
+ }
668
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
669
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityServiceImpl }); }
670
+ }
671
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityServiceImpl, decorators: [{
672
+ type: Injectable
673
+ }], ctorParameters: () => [] });
674
+
675
+ async function documentTypeFactory(injector) {
676
+ const dataService = injector.get(AXMDocumentManagementDocumentTypeEntityService);
677
+ const metaDefinitionService = injector.get(AXMMetaDataDefinitionService);
678
+ const i18n = RootConfig.config.i18n;
679
+ const entityDef = {
680
+ module: RootConfig.module.name,
681
+ name: RootConfig.entities.documentType.name,
682
+ source: '',
683
+ title: RootConfig.entities.documentType.title,
684
+ formats: {
685
+ individual: RootConfig.entities.documentType.title,
686
+ plural: RootConfig.entities.documentType.titlePlural,
687
+ searchResult: {
688
+ title: '{{ title }}',
689
+ description: RootConfig.module.title,
690
+ },
691
+ },
692
+ relatedEntities: [],
693
+ groups: [
694
+ {
695
+ id: 'section',
696
+ title: RootConfig.entities.documentType.title,
697
+ },
698
+ ],
699
+ properties: [
700
+ {
701
+ name: 'name',
702
+ title: 't("name", { scope: "common" })',
703
+ groupId: 'section',
704
+ options: {
705
+ sort: {
706
+ enabled: true,
707
+ },
708
+ },
709
+ schema: {
710
+ dataType: 'string',
711
+ interface: {
712
+ type: AXPWidgetsCatalog.text,
713
+ },
714
+ },
715
+ validations: [
716
+ {
717
+ rule: 'required',
718
+ },
719
+ ],
720
+ },
721
+ {
722
+ name: 'title',
723
+ title: 't("title", { scope: "common" })',
724
+ groupId: 'section',
725
+ schema: {
726
+ dataType: 'string',
727
+ interface: {
728
+ type: AXPWidgetsCatalog.text,
729
+ },
730
+ },
731
+ validations: [
732
+ {
733
+ rule: 'required',
734
+ },
735
+ ],
736
+ },
737
+ {
738
+ name: 'maxSize',
739
+ title: `t("maxSize", { scope: "${i18n}" })`,
740
+ groupId: 'section',
741
+ schema: {
742
+ dataType: 'number',
743
+ interface: {
744
+ type: AXPWidgetsCatalog.numberUnit,
745
+ options: {
746
+ textField: 'name',
747
+ valueField: 'value',
748
+ dataSource: [
749
+ {
750
+ name: 'kb',
751
+ value: 'KB',
752
+ calUnit: 1,
753
+ },
754
+ {
755
+ name: 'mb',
756
+ value: 'MB',
757
+ calUnit: 1024,
758
+ },
759
+ {
760
+ name: 'gb',
761
+ value: 'GB',
762
+ calUnit: 1024 * 1024,
763
+ },
764
+ ],
765
+ mainUnit: 'kb',
766
+ },
767
+ },
768
+ },
769
+ validations: [
770
+ {
771
+ rule: 'required',
772
+ },
773
+ ],
774
+ },
775
+ {
776
+ name: 'isEncrypted',
777
+ title: `t("isEncrypted", { scope: "${i18n}" })`,
778
+ groupId: 'section',
779
+ schema: {
780
+ dataType: 'boolean',
781
+ interface: {
782
+ type: AXPWidgetsCatalog.checkbox,
783
+ },
784
+ },
785
+ },
786
+ {
787
+ name: 'meta',
788
+ title: `t("meta", { scope: "${i18n}" })`,
789
+ groupId: 'section',
790
+ schema: {
791
+ dataType: 'object',
792
+ interface: {
793
+ type: AXPWidgetsCatalog.select,
794
+ options: {
795
+ valueField: 'id',
796
+ textField: 'title',
797
+ //defaultValue: AXMFormTemplateTypes.Form,
798
+ dataSource: new AXDataSource({
799
+ load: async (_) => {
800
+ const metaData = await metaDefinitionService.query();
801
+ return metaData;
802
+ },
803
+ pageSize: 100,
804
+ }),
805
+ multiple: true,
806
+ },
807
+ },
808
+ },
809
+ },
810
+ {
811
+ name: 'type',
812
+ title: `t("type", { scope: "${i18n}" })`,
813
+ groupId: 'section',
814
+ schema: {
815
+ dataType: 'object',
816
+ interface: {
817
+ type: AXPWidgetsCatalog.fileTypeExtension,
818
+ options: {},
819
+ },
820
+ },
821
+ },
822
+ ],
823
+ columns: [{ name: 'name' }, { name: 'title' }],
824
+ commands: {
825
+ create: {
826
+ execute: async (data) => {
827
+ const res = await dataService.insertOne(data);
828
+ return { id: res };
829
+ },
830
+ },
831
+ delete: {
832
+ execute: async (id) => {
833
+ return await dataService.deleteOne(id);
834
+ },
835
+ },
836
+ update: {
837
+ execute: async (data) => {
838
+ return await dataService.updateOne(data.id, data);
839
+ },
840
+ },
841
+ },
842
+ queries: {
843
+ byKey: {
844
+ execute: async (id) => {
845
+ const x = await dataService.getOne(id);
846
+ console.log(x);
847
+ return x;
848
+ },
849
+ type: AXPEntityQueryType.Single,
850
+ },
851
+ list: {
852
+ execute: async (e) => {
853
+ return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
854
+ },
855
+ type: AXPEntityQueryType.List,
856
+ },
857
+ },
858
+ interfaces: {
859
+ master: {
860
+ create: {
861
+ sections: [
862
+ {
863
+ id: 'section',
864
+ },
865
+ ],
866
+ properties: [
867
+ {
868
+ name: 'name',
869
+ layout: {
870
+ positions: {
871
+ lg: {
872
+ colSpan: 6,
873
+ },
874
+ },
875
+ },
876
+ },
877
+ {
878
+ name: 'title',
879
+ layout: {
880
+ positions: {
881
+ lg: {
882
+ colSpan: 6,
883
+ },
884
+ },
885
+ },
886
+ },
887
+ {
888
+ name: 'maxSize',
889
+ layout: {
890
+ positions: {
891
+ lg: {
892
+ colSpan: 6,
893
+ },
894
+ },
895
+ },
896
+ },
897
+ {
898
+ name: 'isEncrypted',
899
+ layout: {
900
+ positions: {
901
+ lg: {
902
+ colSpan: 6,
903
+ },
904
+ },
905
+ },
906
+ },
907
+ {
908
+ name: 'meta',
909
+ layout: {
910
+ positions: {
911
+ lg: {
912
+ colSpan: 12,
913
+ },
914
+ },
915
+ },
916
+ },
917
+ {
918
+ name: 'type',
919
+ layout: {
920
+ positions: {
921
+ lg: {
922
+ colSpan: 12,
923
+ },
924
+ },
925
+ },
926
+ },
927
+ ],
928
+ },
929
+ update: {
930
+ sections: [
931
+ {
932
+ id: 'section',
933
+ },
934
+ ],
935
+ properties: [
936
+ {
937
+ name: 'name',
938
+ layout: {
939
+ positions: {
940
+ lg: {
941
+ colSpan: 6,
942
+ },
943
+ },
944
+ },
945
+ },
946
+ {
947
+ name: 'title',
948
+ layout: {
949
+ positions: {
950
+ lg: {
951
+ colSpan: 6,
952
+ },
953
+ },
954
+ },
955
+ },
956
+ {
957
+ name: 'maxSize',
958
+ layout: {
959
+ positions: {
960
+ lg: {
961
+ colSpan: 6,
962
+ },
963
+ },
964
+ },
965
+ },
966
+ {
967
+ name: 'isEncrypted',
968
+ layout: {
969
+ positions: {
970
+ lg: {
971
+ colSpan: 6,
972
+ },
973
+ },
974
+ },
975
+ },
976
+ {
977
+ name: 'meta',
978
+ layout: {
979
+ positions: {
980
+ lg: {
981
+ colSpan: 12,
982
+ },
983
+ },
984
+ },
985
+ },
986
+ {
987
+ name: 'type',
988
+ layout: {
989
+ positions: {
990
+ lg: {
991
+ colSpan: 12,
992
+ },
993
+ },
994
+ },
995
+ },
996
+ ],
997
+ },
998
+ single: {
999
+ title: '{{title}}',
1000
+ sections: [
1001
+ {
1002
+ id: 'section',
1003
+ layout: {
1004
+ positions: {
1005
+ lg: {
1006
+ colSpan: 12,
1007
+ },
1008
+ },
1009
+ },
1010
+ },
1011
+ ],
1012
+ properties: [
1013
+ {
1014
+ name: 'name',
1015
+ layout: {
1016
+ positions: {
1017
+ lg: {
1018
+ colSpan: 6,
1019
+ },
1020
+ },
1021
+ },
1022
+ },
1023
+ {
1024
+ name: 'title',
1025
+ layout: {
1026
+ positions: {
1027
+ lg: {
1028
+ colSpan: 6,
1029
+ },
1030
+ },
1031
+ },
1032
+ },
1033
+ {
1034
+ name: 'maxSize',
1035
+ layout: {
1036
+ positions: {
1037
+ lg: {
1038
+ colSpan: 6,
1039
+ },
1040
+ },
1041
+ },
1042
+ },
1043
+ {
1044
+ name: 'isEncrypted',
1045
+ layout: {
1046
+ positions: {
1047
+ lg: {
1048
+ colSpan: 6,
1049
+ },
1050
+ },
1051
+ },
1052
+ },
1053
+ {
1054
+ name: 'meta',
1055
+ layout: {
1056
+ positions: {
1057
+ lg: {
1058
+ colSpan: 12,
1059
+ },
1060
+ },
1061
+ },
1062
+ },
1063
+ {
1064
+ name: 'type',
1065
+ layout: {
1066
+ positions: {
1067
+ lg: {
1068
+ colSpan: 12,
1069
+ },
1070
+ },
1071
+ },
1072
+ },
1073
+ ],
1074
+ actions: [],
1075
+ },
1076
+ list: {
1077
+ actions: [
1078
+ {
1079
+ title: `t("create", { scope: "common" })`,
1080
+ command: 'create-entity',
1081
+ priority: 'primary',
1082
+ type: 'create',
1083
+ scope: AXPEntityCommandScope.TypeLevel,
1084
+ },
1085
+ {
1086
+ title: 't("deleteItems", { scope: "common" })',
1087
+ command: 'delete-entity',
1088
+ priority: 'primary',
1089
+ type: 'delete',
1090
+ scope: AXPEntityCommandScope.Selected,
1091
+ },
1092
+ {
1093
+ title: 't("detail", { scope: "common" })',
1094
+ command: 'open-entity',
1095
+ priority: 'secondary',
1096
+ type: 'view',
1097
+ scope: AXPEntityCommandScope.Individual,
1098
+ },
1099
+ {
1100
+ title: 't("delete", { scope: "common" })',
1101
+ command: 'delete-entity',
1102
+ priority: 'secondary',
1103
+ type: 'delete',
1104
+ scope: AXPEntityCommandScope.Individual,
1105
+ },
1106
+ ],
1107
+ views: [createAllQueryView()],
1108
+ },
1109
+ },
1110
+ },
1111
+ };
1112
+ return entityDef;
1113
+ }
1114
+
1115
+ class AXMDocumentManagementDocumentTypeEntityModule {
1116
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1117
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule }); }
1118
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, providers: [
1119
+ {
1120
+ provide: AXMDocumentManagementDocumentTypeEntityService,
1121
+ useClass: AXMDocumentManagementDocumentTypeEntityServiceImpl,
1122
+ },
1123
+ ] }); }
1124
+ }
1125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeEntityModule, decorators: [{
1126
+ type: NgModule,
1127
+ args: [{
1128
+ imports: [],
1129
+ exports: [],
1130
+ declarations: [],
1131
+ providers: [
1132
+ {
1133
+ provide: AXMDocumentManagementDocumentTypeEntityService,
1134
+ useClass: AXMDocumentManagementDocumentTypeEntityServiceImpl,
1135
+ },
1136
+ ],
1137
+ }]
1138
+ }] });
1139
+
1140
+ class AXMDocumentManagementDocumentTypeMetaDefinitionEntityService extends AXMEntityCrudServiceImpl {
1141
+ }
1142
+ class AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl extends AXMDocumentManagementDocumentTypeMetaDefinitionEntityService {
1143
+ constructor() {
1144
+ super(`${RootConfig.module.name}.${RootConfig.entities.documentTypeMetaDefinition}`);
1145
+ }
1146
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1147
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl }); }
1148
+ }
1149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl, decorators: [{
1150
+ type: Injectable
1151
+ }], ctorParameters: () => [] });
1152
+
1153
+ async function documentTypeMetaDefinitionfactory(injector) {
1154
+ const dataService = injector.get(AXMDocumentManagementDocumentTypeMetaDefinitionEntityService);
1155
+ const entityDef = {
1156
+ module: RootConfig.module.name,
1157
+ name: RootConfig.entities.document.name,
1158
+ source: '',
1159
+ title: RootConfig.entities.document.title,
1160
+ formats: {
1161
+ individual: RootConfig.entities.document.title,
1162
+ plural: RootConfig.entities.document.titlePlural,
1163
+ searchResult: {
1164
+ title: '{{ title }}',
1165
+ description: RootConfig.module.title,
1166
+ },
1167
+ },
1168
+ relatedEntities: [],
1169
+ groups: [
1170
+ {
1171
+ id: 'section',
1172
+ title: RootConfig.entities.document.title,
1173
+ },
1174
+ ],
1175
+ properties: [
1176
+ {
1177
+ name: 'name',
1178
+ title: 't("name", { scope: "common" })',
1179
+ groupId: 'section',
1180
+ options: {
1181
+ sort: {
1182
+ enabled: true,
1183
+ },
1184
+ },
1185
+ schema: {
1186
+ dataType: 'string',
1187
+ interface: {
1188
+ type: AXPWidgetsCatalog.text,
1189
+ },
1190
+ },
1191
+ validations: [
1192
+ {
1193
+ rule: 'required',
1194
+ },
1195
+ ],
1196
+ },
1197
+ {
1198
+ name: 'title',
1199
+ title: 't("title", { scope: "common" })',
1200
+ groupId: 'section',
1201
+ schema: {
1202
+ dataType: 'string',
1203
+ interface: {
1204
+ type: AXPWidgetsCatalog.text,
1205
+ },
1206
+ },
1207
+ validations: [
1208
+ {
1209
+ rule: 'required',
1210
+ },
1211
+ ],
1212
+ },
1213
+ ],
1214
+ columns: [{ name: 'name' }, { name: 'title' }],
1215
+ commands: {
1216
+ create: {
1217
+ execute: async (data) => {
1218
+ const res = await dataService.insertOne(data);
1219
+ return { id: res };
1220
+ },
1221
+ },
1222
+ delete: {
1223
+ execute: async (id) => {
1224
+ return await dataService.deleteOne(id);
1225
+ },
1226
+ },
1227
+ update: {
1228
+ execute: async (data) => {
1229
+ return await dataService.updateOne(data.id, data);
1230
+ },
1231
+ },
1232
+ },
1233
+ queries: {
1234
+ byKey: {
1235
+ execute: async (id) => {
1236
+ return await dataService.getOne(id);
1237
+ },
1238
+ type: AXPEntityQueryType.Single,
1239
+ },
1240
+ list: {
1241
+ execute: async (e) => {
1242
+ return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
1243
+ },
1244
+ type: AXPEntityQueryType.List,
1245
+ },
1246
+ },
1247
+ interfaces: {
1248
+ master: {
1249
+ create: {
1250
+ sections: [
1251
+ {
1252
+ id: 'section',
1253
+ },
1254
+ ],
1255
+ properties: [
1256
+ {
1257
+ name: 'name',
1258
+ layout: {
1259
+ positions: {
1260
+ lg: {
1261
+ colSpan: 6,
1262
+ },
1263
+ },
1264
+ },
1265
+ },
1266
+ {
1267
+ name: 'title',
1268
+ layout: {
1269
+ positions: {
1270
+ lg: {
1271
+ colSpan: 6,
1272
+ },
1273
+ },
1274
+ },
1275
+ },
1276
+ ],
1277
+ },
1278
+ update: {
1279
+ sections: [
1280
+ {
1281
+ id: 'section',
1282
+ },
1283
+ ],
1284
+ properties: [
1285
+ {
1286
+ name: 'name',
1287
+ layout: {
1288
+ positions: {
1289
+ lg: {
1290
+ colSpan: 6,
1291
+ },
1292
+ },
1293
+ },
1294
+ },
1295
+ {
1296
+ name: 'title',
1297
+ layout: {
1298
+ positions: {
1299
+ lg: {
1300
+ colSpan: 6,
1301
+ },
1302
+ },
1303
+ },
1304
+ },
1305
+ ],
1306
+ },
1307
+ single: {
1308
+ title: '{{title}}',
1309
+ sections: [
1310
+ {
1311
+ id: 'section',
1312
+ layout: {
1313
+ positions: {
1314
+ lg: {
1315
+ colSpan: 12,
1316
+ },
1317
+ },
1318
+ },
1319
+ },
1320
+ ],
1321
+ properties: [
1322
+ {
1323
+ name: 'name',
1324
+ layout: {
1325
+ positions: {
1326
+ lg: {
1327
+ colSpan: 6,
1328
+ },
1329
+ },
1330
+ },
1331
+ },
1332
+ {
1333
+ name: 'title',
1334
+ layout: {
1335
+ positions: {
1336
+ lg: {
1337
+ colSpan: 6,
1338
+ },
1339
+ },
1340
+ },
1341
+ },
1342
+ ],
1343
+ actions: [],
1344
+ },
1345
+ list: {
1346
+ actions: [
1347
+ {
1348
+ title: `t("create", { scope: "common" })`,
1349
+ command: 'create-entity',
1350
+ priority: 'primary',
1351
+ type: 'create',
1352
+ scope: AXPEntityCommandScope.TypeLevel,
1353
+ },
1354
+ {
1355
+ title: 't("deleteItems", { scope: "common" })',
1356
+ command: 'delete-entity',
1357
+ priority: 'primary',
1358
+ type: 'delete',
1359
+ scope: AXPEntityCommandScope.Selected,
1360
+ },
1361
+ {
1362
+ title: 't("detail", { scope: "common" })',
1363
+ command: 'open-entity',
1364
+ priority: 'secondary',
1365
+ type: 'view',
1366
+ scope: AXPEntityCommandScope.Individual,
1367
+ },
1368
+ {
1369
+ title: 't("delete", { scope: "common" })',
1370
+ command: 'delete-entity',
1371
+ priority: 'secondary',
1372
+ type: 'delete',
1373
+ scope: AXPEntityCommandScope.Individual,
1374
+ },
1375
+ ],
1376
+ views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
1377
+ },
1378
+ },
1379
+ },
1380
+ };
1381
+ return entityDef;
1382
+ }
1383
+
1384
+ class AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule {
1385
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1386
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule }); }
1387
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule, providers: [
1388
+ {
1389
+ provide: AXMDocumentManagementDocumentTypeMetaDefinitionEntityService,
1390
+ useClass: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl,
1391
+ },
1392
+ ] }); }
1393
+ }
1394
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule, decorators: [{
1395
+ type: NgModule,
1396
+ args: [{
1397
+ imports: [],
1398
+ exports: [],
1399
+ declarations: [],
1400
+ providers: [
1401
+ {
1402
+ provide: AXMDocumentManagementDocumentTypeMetaDefinitionEntityService,
1403
+ useClass: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl,
1404
+ },
1405
+ ],
1406
+ }]
1407
+ }] });
1408
+
1409
+ class AXMDocumentManagementDocumentTypeMetaValueEntityService extends AXMEntityCrudServiceImpl {
1410
+ }
1411
+ class AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl extends AXMDocumentManagementDocumentTypeMetaValueEntityService {
1412
+ constructor() {
1413
+ super(`${RootConfig.module.name}.${RootConfig.entities.documentTypeMetaValue}`);
1414
+ }
1415
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1416
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl }); }
1417
+ }
1418
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl, decorators: [{
1419
+ type: Injectable
1420
+ }], ctorParameters: () => [] });
1421
+
1422
+ async function documentTypeMetaValueFactory(injector) {
1423
+ const dataService = injector.get(AXMDocumentManagementDocumentTypeMetaValueEntityService);
1424
+ const entityDef = {
1425
+ module: RootConfig.module.name,
1426
+ name: RootConfig.entities.document.name,
1427
+ source: '',
1428
+ title: RootConfig.entities.document.title,
1429
+ formats: {
1430
+ individual: RootConfig.entities.document.title,
1431
+ plural: RootConfig.entities.document.titlePlural,
1432
+ searchResult: {
1433
+ title: '{{ title }}',
1434
+ description: RootConfig.module.title,
1435
+ },
1436
+ },
1437
+ relatedEntities: [],
1438
+ groups: [
1439
+ {
1440
+ id: 'section',
1441
+ title: RootConfig.entities.document.title,
1442
+ },
1443
+ ],
1444
+ properties: [
1445
+ {
1446
+ name: 'name',
1447
+ title: 't("name", { scope: "common" })',
1448
+ groupId: 'section',
1449
+ options: {
1450
+ sort: {
1451
+ enabled: true,
1452
+ },
1453
+ },
1454
+ schema: {
1455
+ dataType: 'string',
1456
+ interface: {
1457
+ type: AXPWidgetsCatalog.text,
1458
+ },
1459
+ },
1460
+ validations: [
1461
+ {
1462
+ rule: 'required',
1463
+ },
1464
+ ],
1465
+ },
1466
+ {
1467
+ name: 'title',
1468
+ title: 't("title", { scope: "common" })',
1469
+ groupId: 'section',
1470
+ schema: {
1471
+ dataType: 'string',
1472
+ interface: {
1473
+ type: AXPWidgetsCatalog.text,
1474
+ },
1475
+ },
1476
+ validations: [
1477
+ {
1478
+ rule: 'required',
1479
+ },
1480
+ ],
1481
+ },
1482
+ ],
1483
+ columns: [{ name: 'name' }, { name: 'title' }],
1484
+ commands: {
1485
+ create: {
1486
+ execute: async (data) => {
1487
+ const res = await dataService.insertOne(data);
1488
+ return { id: res };
1489
+ },
1490
+ },
1491
+ delete: {
1492
+ execute: async (id) => {
1493
+ return await dataService.deleteOne(id);
1494
+ },
1495
+ },
1496
+ update: {
1497
+ execute: async (data) => {
1498
+ return await dataService.updateOne(data.id, data);
1499
+ },
1500
+ },
1501
+ },
1502
+ queries: {
1503
+ byKey: {
1504
+ execute: async (id) => {
1505
+ return await dataService.getOne(id);
1506
+ },
1507
+ type: AXPEntityQueryType.Single,
1508
+ },
1509
+ list: {
1510
+ execute: async (e) => {
1511
+ return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
1512
+ },
1513
+ type: AXPEntityQueryType.List,
1514
+ },
1515
+ },
1516
+ interfaces: {
1517
+ master: {
1518
+ create: {
1519
+ sections: [
1520
+ {
1521
+ id: 'section',
1522
+ },
1523
+ ],
1524
+ properties: [
1525
+ {
1526
+ name: 'name',
1527
+ layout: {
1528
+ positions: {
1529
+ lg: {
1530
+ colSpan: 6,
1531
+ },
1532
+ },
1533
+ },
1534
+ },
1535
+ {
1536
+ name: 'title',
1537
+ layout: {
1538
+ positions: {
1539
+ lg: {
1540
+ colSpan: 6,
1541
+ },
1542
+ },
1543
+ },
1544
+ },
1545
+ ],
1546
+ },
1547
+ update: {
1548
+ sections: [
1549
+ {
1550
+ id: 'section',
1551
+ },
1552
+ ],
1553
+ properties: [
1554
+ {
1555
+ name: 'name',
1556
+ layout: {
1557
+ positions: {
1558
+ lg: {
1559
+ colSpan: 6,
1560
+ },
1561
+ },
1562
+ },
1563
+ },
1564
+ {
1565
+ name: 'title',
1566
+ layout: {
1567
+ positions: {
1568
+ lg: {
1569
+ colSpan: 6,
1570
+ },
1571
+ },
1572
+ },
1573
+ },
1574
+ ],
1575
+ },
1576
+ single: {
1577
+ title: '{{title}}',
1578
+ sections: [
1579
+ {
1580
+ id: 'section',
1581
+ layout: {
1582
+ positions: {
1583
+ lg: {
1584
+ colSpan: 12,
1585
+ },
1586
+ },
1587
+ },
1588
+ },
1589
+ ],
1590
+ properties: [
1591
+ {
1592
+ name: 'name',
1593
+ layout: {
1594
+ positions: {
1595
+ lg: {
1596
+ colSpan: 6,
1597
+ },
1598
+ },
1599
+ },
1600
+ },
1601
+ {
1602
+ name: 'title',
1603
+ layout: {
1604
+ positions: {
1605
+ lg: {
1606
+ colSpan: 6,
1607
+ },
1608
+ },
1609
+ },
1610
+ },
1611
+ ],
1612
+ actions: [],
1613
+ },
1614
+ list: {
1615
+ actions: [
1616
+ {
1617
+ title: `t("create", { scope: "common" })`,
1618
+ command: 'create-entity',
1619
+ priority: 'primary',
1620
+ type: 'create',
1621
+ scope: AXPEntityCommandScope.TypeLevel,
1622
+ },
1623
+ {
1624
+ title: 't("deleteItems", { scope: "common" })',
1625
+ command: 'delete-entity',
1626
+ priority: 'primary',
1627
+ type: 'delete',
1628
+ scope: AXPEntityCommandScope.Selected,
1629
+ },
1630
+ {
1631
+ title: 't("detail", { scope: "common" })',
1632
+ command: 'open-entity',
1633
+ priority: 'secondary',
1634
+ type: 'view',
1635
+ scope: AXPEntityCommandScope.Individual,
1636
+ },
1637
+ {
1638
+ title: 't("delete", { scope: "common" })',
1639
+ command: 'delete-entity',
1640
+ priority: 'secondary',
1641
+ type: 'delete',
1642
+ scope: AXPEntityCommandScope.Individual,
1643
+ },
1644
+ ],
1645
+ views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
1646
+ },
1647
+ },
1648
+ },
1649
+ };
1650
+ return entityDef;
1651
+ }
1652
+
1653
+ class AXMDocumentManagementDocumentTypeMetaValueEntityModule {
1654
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1655
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityModule }); }
1656
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityModule, providers: [
1657
+ {
1658
+ provide: AXMDocumentManagementDocumentTypeMetaValueEntityService,
1659
+ useClass: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl,
1660
+ },
1661
+ ] }); }
1662
+ }
1663
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeMetaValueEntityModule, decorators: [{
1664
+ type: NgModule,
1665
+ args: [{
1666
+ imports: [],
1667
+ exports: [],
1668
+ declarations: [],
1669
+ providers: [
1670
+ {
1671
+ provide: AXMDocumentManagementDocumentTypeMetaValueEntityService,
1672
+ useClass: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl,
1673
+ },
1674
+ ],
1675
+ }]
1676
+ }] });
1677
+
1678
+ class AXMDocumentManagementDocumentTypeStatusDefinitionEntityService extends AXMEntityCrudServiceImpl {
1679
+ }
1680
+ class AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl extends AXMDocumentManagementDocumentTypeStatusDefinitionEntityService {
1681
+ constructor() {
1682
+ super(`${RootConfig.module.name}.${RootConfig.entities.documentTypeStatus}`);
1683
+ }
1684
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1685
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl }); }
1686
+ }
1687
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl, decorators: [{
1688
+ type: Injectable
1689
+ }], ctorParameters: () => [] });
1690
+
1691
+ async function documentTypeStatusDefinitionFactory(injector) {
1692
+ const dataService = injector.get(AXMDocumentManagementDocumentTypeStatusDefinitionEntityService);
1693
+ const entityDef = {
1694
+ module: RootConfig.module.name,
1695
+ name: RootConfig.entities.document.name,
1696
+ source: '',
1697
+ title: RootConfig.entities.document.title,
1698
+ formats: {
1699
+ individual: RootConfig.entities.document.title,
1700
+ plural: RootConfig.entities.document.titlePlural,
1701
+ searchResult: {
1702
+ title: '{{ title }}',
1703
+ description: RootConfig.module.title,
1704
+ },
1705
+ },
1706
+ relatedEntities: [],
1707
+ groups: [
1708
+ {
1709
+ id: 'section',
1710
+ title: RootConfig.entities.document.title,
1711
+ },
1712
+ ],
1713
+ properties: [
1714
+ {
1715
+ name: 'name',
1716
+ title: 't("name", { scope: "common" })',
1717
+ groupId: 'section',
1718
+ options: {
1719
+ sort: {
1720
+ enabled: true,
1721
+ },
1722
+ },
1723
+ schema: {
1724
+ dataType: 'string',
1725
+ interface: {
1726
+ type: AXPWidgetsCatalog.text,
1727
+ },
1728
+ },
1729
+ validations: [
1730
+ {
1731
+ rule: 'required',
1732
+ },
1733
+ ],
1734
+ },
1735
+ {
1736
+ name: 'title',
1737
+ title: 't("title", { scope: "common" })',
1738
+ groupId: 'section',
1739
+ schema: {
1740
+ dataType: 'string',
1741
+ interface: {
1742
+ type: AXPWidgetsCatalog.text,
1743
+ },
1744
+ },
1745
+ validations: [
1746
+ {
1747
+ rule: 'required',
1748
+ },
1749
+ ],
1750
+ },
1751
+ ],
1752
+ columns: [{ name: 'name' }, { name: 'title' }],
1753
+ commands: {
1754
+ create: {
1755
+ execute: async (data) => {
1756
+ const res = await dataService.insertOne(data);
1757
+ return { id: res };
1758
+ },
1759
+ },
1760
+ delete: {
1761
+ execute: async (id) => {
1762
+ return await dataService.deleteOne(id);
1763
+ },
1764
+ },
1765
+ update: {
1766
+ execute: async (data) => {
1767
+ return await dataService.updateOne(data.id, data);
1768
+ },
1769
+ },
1770
+ },
1771
+ queries: {
1772
+ byKey: {
1773
+ execute: async (id) => {
1774
+ return await dataService.getOne(id);
1775
+ },
1776
+ type: AXPEntityQueryType.Single,
1777
+ },
1778
+ list: {
1779
+ execute: async (e) => {
1780
+ return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
1781
+ },
1782
+ type: AXPEntityQueryType.List,
1783
+ },
1784
+ },
1785
+ interfaces: {
1786
+ master: {
1787
+ create: {
1788
+ sections: [
1789
+ {
1790
+ id: 'section',
1791
+ },
1792
+ ],
1793
+ properties: [
1794
+ {
1795
+ name: 'name',
1796
+ layout: {
1797
+ positions: {
1798
+ lg: {
1799
+ colSpan: 6,
1800
+ },
1801
+ },
1802
+ },
1803
+ },
1804
+ {
1805
+ name: 'title',
1806
+ layout: {
1807
+ positions: {
1808
+ lg: {
1809
+ colSpan: 6,
1810
+ },
1811
+ },
1812
+ },
1813
+ },
1814
+ ],
1815
+ },
1816
+ update: {
1817
+ sections: [
1818
+ {
1819
+ id: 'section',
1820
+ },
1821
+ ],
1822
+ properties: [
1823
+ {
1824
+ name: 'name',
1825
+ layout: {
1826
+ positions: {
1827
+ lg: {
1828
+ colSpan: 6,
1829
+ },
1830
+ },
1831
+ },
1832
+ },
1833
+ {
1834
+ name: 'title',
1835
+ layout: {
1836
+ positions: {
1837
+ lg: {
1838
+ colSpan: 6,
1839
+ },
1840
+ },
1841
+ },
1842
+ },
1843
+ ],
1844
+ },
1845
+ single: {
1846
+ title: '{{title}}',
1847
+ sections: [
1848
+ {
1849
+ id: 'section',
1850
+ layout: {
1851
+ positions: {
1852
+ lg: {
1853
+ colSpan: 12,
1854
+ },
1855
+ },
1856
+ },
1857
+ },
1858
+ ],
1859
+ properties: [
1860
+ {
1861
+ name: 'name',
1862
+ layout: {
1863
+ positions: {
1864
+ lg: {
1865
+ colSpan: 6,
1866
+ },
1867
+ },
1868
+ },
1869
+ },
1870
+ {
1871
+ name: 'title',
1872
+ layout: {
1873
+ positions: {
1874
+ lg: {
1875
+ colSpan: 6,
1876
+ },
1877
+ },
1878
+ },
1879
+ },
1880
+ ],
1881
+ actions: [],
1882
+ },
1883
+ list: {
1884
+ actions: [
1885
+ {
1886
+ title: `t("create", { scope: "common" })`,
1887
+ command: 'create-entity',
1888
+ priority: 'primary',
1889
+ type: 'create',
1890
+ scope: AXPEntityCommandScope.TypeLevel,
1891
+ },
1892
+ {
1893
+ title: 't("deleteItems", { scope: "common" })',
1894
+ command: 'delete-entity',
1895
+ priority: 'primary',
1896
+ type: 'delete',
1897
+ scope: AXPEntityCommandScope.Selected,
1898
+ },
1899
+ {
1900
+ title: 't("detail", { scope: "common" })',
1901
+ command: 'open-entity',
1902
+ priority: 'secondary',
1903
+ type: 'view',
1904
+ scope: AXPEntityCommandScope.Individual,
1905
+ },
1906
+ {
1907
+ title: 't("delete", { scope: "common" })',
1908
+ command: 'delete-entity',
1909
+ priority: 'secondary',
1910
+ type: 'delete',
1911
+ scope: AXPEntityCommandScope.Individual,
1912
+ },
1913
+ ],
1914
+ views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
1915
+ },
1916
+ },
1917
+ },
1918
+ };
1919
+ return entityDef;
1920
+ }
1921
+
1922
+ class AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule {
1923
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1924
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule }); }
1925
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule, providers: [
1926
+ {
1927
+ provide: AXMDocumentManagementDocumentTypeStatusDefinitionEntityService,
1928
+ useClass: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl,
1929
+ },
1930
+ ] }); }
1931
+ }
1932
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule, decorators: [{
1933
+ type: NgModule,
1934
+ args: [{
1935
+ imports: [],
1936
+ exports: [],
1937
+ declarations: [],
1938
+ providers: [
1939
+ {
1940
+ provide: AXMDocumentManagementDocumentTypeStatusDefinitionEntityService,
1941
+ useClass: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl,
1942
+ },
1943
+ ],
1944
+ }]
1945
+ }] });
1946
+
1947
+ class AXMFolderService extends AXMEntityCrudServiceImpl {
1948
+ }
1949
+ class AXMFolderServiceImpl extends AXMFolderService {
1950
+ constructor() {
1951
+ super(`${RootConfig.module.name}.${RootConfig.entities.folder.name}`);
1952
+ }
1953
+ async getPath(_) {
1954
+ throw new Error('Not implemented');
1955
+ }
1956
+ async searchFolders(_searchTerm, _rootFolderId) {
1957
+ throw new Error('Not implemented');
1958
+ }
1959
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFolderServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1960
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFolderServiceImpl }); }
1961
+ }
1962
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFolderServiceImpl, decorators: [{
1963
+ type: Injectable
1964
+ }], ctorParameters: () => [] });
1965
+
1966
+ async function folderFactory(injector) {
1967
+ const dataService = injector.get(AXMFolderService);
1968
+ const entityDef = {
1969
+ module: RootConfig.module.name,
1970
+ name: RootConfig.entities.folder.name,
1971
+ source: '',
1972
+ title: RootConfig.entities.folder.title,
1973
+ formats: {
1974
+ individual: RootConfig.entities.folder.title,
1975
+ plural: RootConfig.entities.folder.titlePlural,
1976
+ searchResult: {
1977
+ title: '{{ title }}',
1978
+ description: RootConfig.module.title,
1979
+ },
1980
+ },
1981
+ relatedEntities: [],
1982
+ groups: [
1983
+ {
1984
+ id: 'section',
1985
+ title: RootConfig.entities.folder.title,
1986
+ },
1987
+ ],
1988
+ properties: [
1989
+ {
1990
+ name: 'name',
1991
+ title: 't("name", { scope: "common" })',
1992
+ groupId: 'section',
1993
+ options: {
1994
+ sort: {
1995
+ enabled: true,
1996
+ },
1997
+ },
1998
+ schema: {
1999
+ dataType: 'string',
2000
+ interface: {
2001
+ type: AXPWidgetsCatalog.text,
2002
+ },
2003
+ },
2004
+ validations: [
2005
+ {
2006
+ rule: 'required',
2007
+ },
2008
+ ],
2009
+ },
2010
+ {
2011
+ name: 'title',
2012
+ title: 't("title", { scope: "common" })',
2013
+ groupId: 'section',
2014
+ schema: {
2015
+ dataType: 'string',
2016
+ interface: {
2017
+ type: AXPWidgetsCatalog.text,
2018
+ },
2019
+ },
2020
+ validations: [
2021
+ {
2022
+ rule: 'required',
2023
+ },
2024
+ ],
2025
+ },
2026
+ ],
2027
+ columns: [{ name: 'name' }, { name: 'title' }],
2028
+ commands: {
2029
+ create: {
2030
+ execute: async (data) => {
2031
+ const res = await dataService.insertOne(data);
2032
+ return { id: res };
2033
+ },
2034
+ },
2035
+ delete: {
2036
+ execute: async (id) => {
2037
+ return await dataService.deleteOne(id);
2038
+ },
2039
+ },
2040
+ update: {
2041
+ execute: async (data) => {
2042
+ return await dataService.updateOne(data.id, data);
2043
+ },
2044
+ },
2045
+ },
2046
+ queries: {
2047
+ byKey: {
2048
+ execute: async (id) => {
2049
+ return await dataService.getOne(id);
2050
+ },
2051
+ type: AXPEntityQueryType.Single,
2052
+ },
2053
+ list: {
2054
+ execute: async (e) => {
2055
+ return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
2056
+ },
2057
+ type: AXPEntityQueryType.List,
2058
+ },
2059
+ },
2060
+ interfaces: {
2061
+ master: {
2062
+ create: {
2063
+ sections: [
2064
+ {
2065
+ id: 'section',
2066
+ },
2067
+ ],
2068
+ properties: [
2069
+ {
2070
+ name: 'name',
2071
+ layout: {
2072
+ positions: {
2073
+ lg: {
2074
+ colSpan: 6,
2075
+ },
2076
+ },
2077
+ },
2078
+ },
2079
+ {
2080
+ name: 'title',
2081
+ layout: {
2082
+ positions: {
2083
+ lg: {
2084
+ colSpan: 6,
2085
+ },
2086
+ },
2087
+ },
2088
+ },
2089
+ ],
2090
+ },
2091
+ update: {
2092
+ sections: [
2093
+ {
2094
+ id: 'section',
2095
+ },
2096
+ ],
2097
+ properties: [
2098
+ {
2099
+ name: 'name',
2100
+ layout: {
2101
+ positions: {
2102
+ lg: {
2103
+ colSpan: 6,
2104
+ },
2105
+ },
2106
+ },
2107
+ },
2108
+ {
2109
+ name: 'title',
2110
+ layout: {
2111
+ positions: {
2112
+ lg: {
2113
+ colSpan: 6,
2114
+ },
2115
+ },
2116
+ },
2117
+ },
2118
+ ],
2119
+ },
2120
+ single: {
2121
+ title: '{{title}}',
2122
+ sections: [
2123
+ {
2124
+ id: 'section',
2125
+ layout: {
2126
+ positions: {
2127
+ lg: {
2128
+ colSpan: 12,
2129
+ },
2130
+ },
2131
+ },
2132
+ },
2133
+ ],
2134
+ properties: [
2135
+ {
2136
+ name: 'name',
2137
+ layout: {
2138
+ positions: {
2139
+ lg: {
2140
+ colSpan: 6,
2141
+ },
2142
+ },
2143
+ },
2144
+ },
2145
+ {
2146
+ name: 'title',
2147
+ layout: {
2148
+ positions: {
2149
+ lg: {
2150
+ colSpan: 6,
2151
+ },
2152
+ },
2153
+ },
2154
+ },
2155
+ ],
2156
+ actions: [],
2157
+ },
2158
+ list: {
2159
+ actions: [
2160
+ {
2161
+ title: `t("create", { scope: "common" })`,
2162
+ command: 'create-entity',
2163
+ priority: 'primary',
2164
+ type: 'create',
2165
+ scope: AXPEntityCommandScope.TypeLevel,
2166
+ },
2167
+ {
2168
+ title: 't("deleteItems", { scope: "common" })',
2169
+ command: 'delete-entity',
2170
+ priority: 'primary',
2171
+ type: 'delete',
2172
+ scope: AXPEntityCommandScope.Selected,
2173
+ },
2174
+ {
2175
+ title: 't("detail", { scope: "common" })',
2176
+ command: 'open-entity',
2177
+ priority: 'secondary',
2178
+ type: 'view',
2179
+ scope: AXPEntityCommandScope.Individual,
2180
+ },
2181
+ {
2182
+ title: 't("delete", { scope: "common" })',
2183
+ command: 'delete-entity',
2184
+ priority: 'secondary',
2185
+ type: 'delete',
2186
+ scope: AXPEntityCommandScope.Individual,
2187
+ },
2188
+ ],
2189
+ views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
2190
+ },
2191
+ },
2192
+ },
2193
+ };
2194
+ return entityDef;
2195
+ }
2196
+
2197
+ var index = /*#__PURE__*/Object.freeze({
2198
+ __proto__: null,
2199
+ AXMDocumentManagementDocumentEntityModule: AXMDocumentManagementDocumentEntityModule,
2200
+ AXMDocumentManagementDocumentTypeEntityModule: AXMDocumentManagementDocumentTypeEntityModule,
2201
+ AXMDocumentManagementDocumentTypeEntityService: AXMDocumentManagementDocumentTypeEntityService,
2202
+ AXMDocumentManagementDocumentTypeEntityServiceImpl: AXMDocumentManagementDocumentTypeEntityServiceImpl,
2203
+ AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule: AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
2204
+ AXMDocumentManagementDocumentTypeMetaDefinitionEntityService: AXMDocumentManagementDocumentTypeMetaDefinitionEntityService,
2205
+ AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl: AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl,
2206
+ AXMDocumentManagementDocumentTypeMetaValueEntityModule: AXMDocumentManagementDocumentTypeMetaValueEntityModule,
2207
+ AXMDocumentManagementDocumentTypeMetaValueEntityService: AXMDocumentManagementDocumentTypeMetaValueEntityService,
2208
+ AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl: AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl,
2209
+ AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule: AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule,
2210
+ AXMDocumentManagementDocumentTypeStatusDefinitionEntityService: AXMDocumentManagementDocumentTypeStatusDefinitionEntityService,
2211
+ AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl: AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl,
2212
+ AXMDocumentService: AXMDocumentService,
2213
+ AXMDocumentServiceImpl: AXMDocumentServiceImpl,
2214
+ AXMFolderService: AXMFolderService,
2215
+ AXMFolderServiceImpl: AXMFolderServiceImpl,
2216
+ documentFactory: documentFactory,
2217
+ documentTypeFactory: documentTypeFactory,
2218
+ documentTypeMetaDefinitionfactory: documentTypeMetaDefinitionfactory,
2219
+ documentTypeMetaValueFactory: documentTypeMetaValueFactory,
2220
+ documentTypeStatusDefinitionFactory: documentTypeStatusDefinitionFactory,
2221
+ folderFactory: folderFactory
2222
+ });
2223
+
2224
+ class AXMImageFileTypeProvider {
2225
+ async items() {
2226
+ return [
2227
+ {
2228
+ name: 'image',
2229
+ title: 'Image',
2230
+ icon: 'fa-light fa-image ax-text-purple-500',
2231
+ extensions: [
2232
+ {
2233
+ name: 'jpg',
2234
+ title: 'JPEG',
2235
+ icon: 'fa-light fa-image ax-text-purple-500',
2236
+ meta: [],
2237
+ },
2238
+ {
2239
+ name: 'png',
2240
+ title: 'PNG',
2241
+ icon: 'fa-light fa-image ax-text-purple-500',
2242
+ meta: [],
2243
+ },
2244
+ {
2245
+ name: 'gif',
2246
+ title: 'GIF',
2247
+ icon: 'fa-light fa-image ax-text-purple-500',
2248
+ meta: [
2249
+ {
2250
+ name: 'duration',
2251
+ title: 'Duration',
2252
+ interface: async () => {
2253
+ return {
2254
+ type: AXPWidgetsCatalog.text,
2255
+ options: {
2256
+ validations: [
2257
+ {
2258
+ rule: "required"
2259
+ }
2260
+ ]
2261
+ },
2262
+ path: 'gift.duration',
2263
+ };
2264
+ },
2265
+ },
2266
+ ],
2267
+ },
2268
+ ],
2269
+ meta: [
2270
+ {
2271
+ name: 'width',
2272
+ title: 'Width',
2273
+ interface: async () => {
2274
+ return {
2275
+ type: AXPWidgetsCatalog.text,
2276
+ options: {
2277
+ validations: [
2278
+ {
2279
+ rule: "required"
2280
+ }
2281
+ ]
2282
+ },
2283
+ path: 'image.width',
2284
+ };
2285
+ },
2286
+ },
2287
+ {
2288
+ name: 'height',
2289
+ title: 'Height',
2290
+ interface: async () => {
2291
+ return {
2292
+ type: AXPWidgetsCatalog.text,
2293
+ options: {},
2294
+ path: 'image.height',
2295
+ };
2296
+ },
2297
+ },
2298
+ ],
2299
+ },
2300
+ ];
2301
+ }
2302
+ }
2303
+
2304
+ class AXMVideoFileTypeProvider {
2305
+ async items() {
2306
+ return [
2307
+ {
2308
+ name: 'video',
2309
+ title: 'Video',
2310
+ icon: 'fa-light fa-video ax-text-red-500',
2311
+ extensions: [
2312
+ {
2313
+ name: 'mp4',
2314
+ title: 'MP4',
2315
+ icon: 'fa-light fa-video ax-text-red-500',
2316
+ meta: [],
2317
+ },
2318
+ {
2319
+ name: 'avi',
2320
+ title: 'AVI',
2321
+ icon: 'fa-light fa-video ax-text-red-500',
2322
+ meta: [],
2323
+ },
2324
+ {
2325
+ name: 'mkv',
2326
+ title: 'MKV',
2327
+ icon: 'fa-light fa-video ax-text-red-500',
2328
+ meta: [],
2329
+ },
2330
+ ],
2331
+ },
2332
+ ];
2333
+ }
2334
+ }
2335
+
2336
+ class AXMDocumentFileTypeProvider {
2337
+ async items() {
2338
+ return [
2339
+ {
2340
+ name: 'document',
2341
+ title: 'Document',
2342
+ icon: 'fa-light fa-file-lines ax-text-blue-600',
2343
+ extensions: [
2344
+ {
2345
+ name: 'pdf',
2346
+ title: 'PDF',
2347
+ icon: 'fa-light fa-file-pdf ax-text-red-600',
2348
+ meta: [],
2349
+ },
2350
+ {
2351
+ name: 'doc',
2352
+ title: 'Word',
2353
+ icon: 'fa-light fa-file-word ax-text-blue-700',
2354
+ meta: [],
2355
+ },
2356
+ {
2357
+ name: 'docx',
2358
+ title: 'Word',
2359
+ icon: 'fa-light fa-file-word ax-text-blue-700',
2360
+ meta: [],
2361
+ },
2362
+ {
2363
+ name: 'xls',
2364
+ title: 'Excel',
2365
+ icon: 'fa-light fa-file-excel ax-text-green-700',
2366
+ meta: [],
2367
+ },
2368
+ {
2369
+ name: 'xlsx',
2370
+ title: 'Excel',
2371
+ icon: 'fa-light fa-file-excel ax-text-green-700',
2372
+ meta: [],
2373
+ },
2374
+ {
2375
+ name: 'ppt',
2376
+ title: 'PowerPoint',
2377
+ icon: 'fa-light fa-file-powerpoint ax-text-orange-700',
2378
+ meta: [],
2379
+ },
2380
+ {
2381
+ name: 'pptx',
2382
+ title: 'PowerPoint',
2383
+ icon: 'fa-light fa-file-powerpoint ax-text-orange-700',
2384
+ meta: [],
2385
+ },
2386
+ {
2387
+ name: 'txt',
2388
+ title: 'Text',
2389
+ icon: 'fa-light fa-file-lines ax-text-blue-600',
2390
+ meta: [],
2391
+ },
2392
+ {
2393
+ name: 'rtf',
2394
+ title: 'Rich Text',
2395
+ icon: 'fa-light fa-file-lines ax-text-blue-600',
2396
+ meta: [],
2397
+ },
2398
+ ],
2399
+ },
2400
+ ];
2401
+ }
2402
+ }
2403
+
2404
+ class AXMAudioFileTypeProvider {
2405
+ async items() {
2406
+ return [
2407
+ {
2408
+ name: 'audio',
2409
+ title: 'Audio',
2410
+ icon: 'fa-light fa-file-audio ax-text-green-500',
2411
+ extensions: [
2412
+ {
2413
+ name: 'mp3',
2414
+ title: 'MP3',
2415
+ icon: 'fa-light fa-file-audio ax-text-green-500',
2416
+ meta: [],
2417
+ },
2418
+ {
2419
+ name: 'wav',
2420
+ title: 'WAV',
2421
+ icon: 'fa-light fa-file-audio ax-text-green-500',
2422
+ meta: [],
2423
+ },
2424
+ {
2425
+ name: 'ogg',
2426
+ title: 'OGG',
2427
+ icon: 'fa-light fa-file-audio ax-text-green-500',
2428
+ meta: [],
2429
+ },
2430
+ {
2431
+ name: 'm4a',
2432
+ title: 'M4A',
2433
+ icon: 'fa-light fa-file-audio ax-text-green-500',
2434
+ meta: [],
2435
+ },
2436
+ {
2437
+ name: 'flac',
2438
+ title: 'FLAC',
2439
+ icon: 'fa-light fa-file-audio ax-text-green-500',
2440
+ meta: [],
2441
+ },
2442
+ ],
2443
+ },
2444
+ ];
2445
+ }
2446
+ }
2447
+
2448
+ class AXMArchiveFileTypeProvider {
2449
+ async items() {
2450
+ return [
2451
+ {
2452
+ name: 'archive',
2453
+ title: 'Archive',
2454
+ icon: 'fa-light fa-file-zipper ax-text-orange-500',
2455
+ extensions: [
2456
+ {
2457
+ name: 'zip',
2458
+ title: 'ZIP',
2459
+ icon: 'fa-light fa-file-zipper ax-text-orange-500',
2460
+ meta: [],
2461
+ },
2462
+ {
2463
+ name: 'rar',
2464
+ title: 'RAR',
2465
+ icon: 'fa-light fa-file-zipper ax-text-orange-500',
2466
+ meta: [],
2467
+ },
2468
+ {
2469
+ name: '7z',
2470
+ title: '7-Zip',
2471
+ icon: 'fa-light fa-file-zipper ax-text-orange-500',
2472
+ meta: [],
2473
+ },
2474
+ {
2475
+ name: 'tar',
2476
+ title: 'TAR',
2477
+ icon: 'fa-light fa-file-zipper ax-text-orange-500',
2478
+ meta: [],
2479
+ },
2480
+ {
2481
+ name: 'gz',
2482
+ title: 'GZIP',
2483
+ icon: 'fa-light fa-file-zipper ax-text-orange-500',
2484
+ meta: [],
2485
+ },
2486
+ ],
2487
+ },
2488
+ ];
2489
+ }
2490
+ }
2491
+
2492
+ class AXMCodeFileTypeProvider {
2493
+ async items() {
2494
+ return [
2495
+ {
2496
+ name: 'code',
2497
+ title: 'Code',
2498
+ icon: 'fa-light fa-file-code ax-text-blue-500',
2499
+ extensions: [
2500
+ {
2501
+ name: 'js',
2502
+ title: 'JavaScript',
2503
+ icon: 'fa-light fa-file-code ax-text-yellow-500',
2504
+ meta: [],
2505
+ },
2506
+ {
2507
+ name: 'ts',
2508
+ title: 'TypeScript',
2509
+ icon: 'fa-light fa-file-code ax-text-blue-600',
2510
+ meta: [],
2511
+ },
2512
+ {
2513
+ name: 'html',
2514
+ title: 'HTML',
2515
+ icon: 'fa-light fa-file-code ax-text-orange-600',
2516
+ meta: [],
2517
+ },
2518
+ {
2519
+ name: 'css',
2520
+ title: 'CSS',
2521
+ icon: 'fa-light fa-file-code ax-text-pink-500',
2522
+ meta: [],
2523
+ },
2524
+ {
2525
+ name: 'json',
2526
+ title: 'JSON',
2527
+ icon: 'fa-light fa-file-code ax-text-green-500',
2528
+ meta: [],
2529
+ },
2530
+ {
2531
+ name: 'xml',
2532
+ title: 'XML',
2533
+ icon: 'fa-light fa-file-code ax-text-green-500',
2534
+ meta: [],
2535
+ },
2536
+ {
2537
+ name: 'py',
2538
+ title: 'Python',
2539
+ icon: 'fa-light fa-file-code ax-text-yellow-500',
2540
+ meta: [],
2541
+ },
2542
+ {
2543
+ name: 'java',
2544
+ title: 'Java',
2545
+ icon: 'fa-light fa-file-code ax-text-red-500',
2546
+ meta: [],
2547
+ },
2548
+ {
2549
+ name: 'cpp',
2550
+ title: 'C++',
2551
+ icon: 'fa-light fa-file-code ax-text-blue-500',
2552
+ meta: [],
2553
+ },
2554
+ {
2555
+ name: 'cs',
2556
+ title: 'C#',
2557
+ icon: 'fa-light fa-file-code ax-text-blue-500',
2558
+ meta: [],
2559
+ },
2560
+ ],
2561
+ },
2562
+ ];
2563
+ }
2564
+ }
2565
+
2566
+ class AXMFileTypeExtensionWidgetColumnComponent extends AXPWidgetComponent {
2567
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeExtensionWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2568
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMFileTypeExtensionWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2569
+ }
2570
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeExtensionWidgetColumnComponent, decorators: [{
2571
+ type: Component,
2572
+ args: [{
2573
+ template: ``,
2574
+ changeDetection: ChangeDetectionStrategy.OnPush,
2575
+ imports: [CommonModule],
2576
+ inputs: ['rawValue'],
2577
+ }]
2578
+ }] });
2579
+
2580
+ var fileTypeExtensionColumn_component = /*#__PURE__*/Object.freeze({
2581
+ __proto__: null,
2582
+ AXMFileTypeExtensionWidgetColumnComponent: AXMFileTypeExtensionWidgetColumnComponent
2583
+ });
2584
+
2585
+ class AXMFileTypeExtensionWidgetDesignerComponent extends AXPWidgetComponent {
2586
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeExtensionWidgetDesignerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2587
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMFileTypeExtensionWidgetDesignerComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2588
+ }
2589
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeExtensionWidgetDesignerComponent, decorators: [{
2590
+ type: Component,
2591
+ args: [{
2592
+ template: ``,
2593
+ changeDetection: ChangeDetectionStrategy.OnPush,
2594
+ imports: [CommonModule],
2595
+ inputs: ['rawValue'],
2596
+ }]
2597
+ }] });
2598
+
2599
+ // @if(allowSearch()) {
2600
+ // <ax-search-box><ax-clear-button></ax-clear-button></ax-search-box>
2601
+ // } @if(hasClearButton()) {
2602
+ // <ax-clear-button></ax-clear-button>
2603
+ // } @for (validation of validationRules(); track $index) {
2604
+ // <ax-validation-rule
2605
+ // [rule]="validation.rule"
2606
+ // [message]="validation.options?.message"
2607
+ // [options]="validation.options"
2608
+ // ></ax-validation-rule>
2609
+ // } @for (validation of validationRules(); track $index) {
2610
+ // <ax-validation-rule
2611
+ // [rule]="validation.rule"
2612
+ // [message]="validation.options?.message"
2613
+ // [options]="validation.options"
2614
+ // ></ax-validation-rule>
2615
+ class AXMFileTypeExtensionWidgetEditComponent extends AXPWidgetComponent {
2616
+ constructor() {
2617
+ super(...arguments);
2618
+ this.fileTypeService = inject(AXPFileTypeProviderService);
2619
+ this.dataSource = new AXDataSource({
2620
+ load: async (_) => {
2621
+ try {
2622
+ const res = await this.fileTypeService.items();
2623
+ const types = res
2624
+ .map((item) => {
2625
+ const { meta, extensions, ...rest } = item;
2626
+ return extensions.map((ext) => {
2627
+ const { meta, ...extRest } = ext;
2628
+ return {
2629
+ ...rest,
2630
+ ...extRest,
2631
+ name: `${item.name}.${ext.name}`,
2632
+ title: `${item.title}/${ext.title}`,
2633
+ };
2634
+ });
2635
+ })
2636
+ .flat();
2637
+ return {
2638
+ items: types,
2639
+ total: types.length,
2640
+ };
2641
+ }
2642
+ catch (e) {
2643
+ console.log(e);
2644
+ }
2645
+ return {
2646
+ items: [],
2647
+ total: 0,
2648
+ };
2649
+ },
2650
+ pageSize: 100,
2651
+ });
2652
+ this.selectedItems = signal(this.getValue()?.selectedItems ?? []);
2653
+ this.context = signal(this.getValue()?.context ?? {});
2654
+ }
2655
+ ngOnInit() {
2656
+ super.ngOnInit();
2657
+ this.selectedItems.set(this.getValue()?.selectedItems ?? []);
2658
+ this.context.set(this.getValue()?.context ?? {});
2659
+ }
2660
+ outputs() {
2661
+ return ['selectedItems', 'context'];
2662
+ }
2663
+ handleOnContextChange(e) {
2664
+ this.context.set(e.data);
2665
+ this.setValue({ ...this.getValue(), context: e.data });
2666
+ }
2667
+ async handleValueChange(e) {
2668
+ const selectItems = e.component.selectedItems;
2669
+ this.setValue({ ...this.getValue(), selectedItems: selectItems });
2670
+ const result = {};
2671
+ for (const item of selectItems) {
2672
+ const type = item.name.split('.')[0];
2673
+ const ext = item.name.split('.')[1];
2674
+ var fileType = await this.fileTypeService.get(type);
2675
+ if (fileType != undefined) {
2676
+ const extension = fileType.extensions.find((extension) => extension.name == ext) || { name: ext, title: '' };
2677
+ if (extension.meta) {
2678
+ for (const meta of extension.meta) {
2679
+ if (!get(meta, '__node__')) {
2680
+ set(meta, '__node__', typeof meta.interface == 'function' ? await meta.interface() : meta.interface);
2681
+ }
2682
+ }
2683
+ }
2684
+ if (fileType.meta) {
2685
+ for (const meta of fileType.meta) {
2686
+ if (!get(meta, '__node__')) {
2687
+ set(meta, '__node__', typeof meta.interface == 'function' ? await meta.interface() : meta.interface);
2688
+ }
2689
+ }
2690
+ }
2691
+ if (result[type]) {
2692
+ result[type] = {
2693
+ ...fileType,
2694
+ extensions: [...result[type].extensions, extension],
2695
+ };
2696
+ }
2697
+ else {
2698
+ result[type] = {
2699
+ ...fileType,
2700
+ extensions: [extension],
2701
+ };
2702
+ }
2703
+ }
2704
+ }
2705
+ this.selectedItems.set(Object.values(result));
2706
+ }
2707
+ getNode(meta) {
2708
+ return get(meta, '__node__');
2709
+ }
2710
+ filedIsRequired(meta) {
2711
+ const node = get(meta, '__node__');
2712
+ if (node && node.options && node.options.validations) {
2713
+ return node.options.validations.some((validation) => validation.rule === 'required');
2714
+ }
2715
+ return false;
2716
+ }
2717
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeExtensionWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2718
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMFileTypeExtensionWidgetEditComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
2719
+ <div>
2720
+ <ax-select-box
2721
+ #dd
2722
+ [dataSource]="dataSource"
2723
+ valueField="name"
2724
+ textField="title"
2725
+ [multiple]="true"
2726
+ [ngModel]="getValue()?.selectedItems"
2727
+ (onValueChanged)="handleValueChange($event)"
2728
+ >
2729
+ </ax-select-box>
2730
+ <div class="ax-py-3"></div>
2731
+ <axp-widgets-container (onContextChanged)="handleOnContextChange($event)" [context]="context()">
2732
+ @if (selectedItems().length > 0) {
2733
+ <ax-collapse-group look="fill">
2734
+ @for (item of selectedItems(); track item.name) {
2735
+ <!-- File Types -->
2736
+ <ax-collapse [caption]="item.title">
2737
+ <div class="ax-flex ax-flex-col ax-gap-5">
2738
+ @if (item.meta && item.meta.length > 0) {
2739
+ <div class="ax-flex ax-flex-col ax-gap-2">
2740
+ <ax-text [textContent]="'Global Meta Data'" class="ax-font-bold ax-text-sm"></ax-text>
2741
+ @for (metaFile of item.meta; track metaFile.name) {
2742
+ <!-- File Meta Data -->
2743
+ <ax-form-field>
2744
+ <ax-label [required]="filedIsRequired(metaFile)">{{ metaFile.title }}</ax-label>
2745
+ <ng-container axp-widget-renderer [node]="getNode(metaFile)" [mode]="'edit'"></ng-container>
2746
+ </ax-form-field>
2747
+ }
2748
+ </div>
2749
+ }
2750
+ @if (item.extensions && item.extensions.length > 0) {
2751
+ <div class="ax-flex ax-flex-col ax-gap-3">
2752
+ @for (ext of item.extensions; track ext.name) {
2753
+ <!-- Extensions -->
2754
+ @if (ext.meta && ext.meta.length > 0) {
2755
+ <ax-text [textContent]="ext.title" class="ax-font-bold ax-text-sm"></ax-text>
2756
+ <div class="ax-flex ax-flex-col ax-gap-2">
2757
+ @for (extMeta of ext.meta; track $index) {
2758
+ <!-- Extension Meta Data -->
2759
+ <ax-form-field>
2760
+ <ax-label [required]="filedIsRequired(extMeta)">{{ extMeta.title }}</ax-label>
2761
+ <ng-container axp-widget-renderer [node]="getNode(extMeta)"
2762
+ [mode]="'edit'"></ng-container>
2763
+ </ax-form-field>
2764
+ }
2765
+ </div>
2766
+ }
2767
+ <!-- End Extension Meta Data -->
2768
+ }
2769
+ </div>
2770
+ <!-- End Extensions -->
2771
+ }
2772
+ </div>
2773
+ </ax-collapse>
2774
+ }
2775
+ <!-- End File Types -->
2776
+ </ax-collapse-group>
2777
+ }
2778
+ </axp-widgets-container>
2779
+ </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i7.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i5.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i5$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: AXPLayoutBuilderModule }, { 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"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXCollapseModule }, { kind: "component", type: i7$1.AXCollapseComponent, selector: "ax-collapse", inputs: ["disabled", "look", "isCollapsed", "showHeader", "caption", "icon", "isLoading", "headerTemplate"], outputs: ["onClick", "isCollapsedChange"] }, { kind: "component", type: i7$1.AXCollapseGroupComponent, selector: "ax-collapse-group", inputs: ["look", "accordion", "activeIndex"], outputs: ["accordionChange", "activeIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2780
+ }
2781
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeExtensionWidgetEditComponent, decorators: [{
2782
+ type: Component,
2783
+ args: [{
2784
+ template: `
2785
+ <div>
2786
+ <ax-select-box
2787
+ #dd
2788
+ [dataSource]="dataSource"
2789
+ valueField="name"
2790
+ textField="title"
2791
+ [multiple]="true"
2792
+ [ngModel]="getValue()?.selectedItems"
2793
+ (onValueChanged)="handleValueChange($event)"
2794
+ >
2795
+ </ax-select-box>
2796
+ <div class="ax-py-3"></div>
2797
+ <axp-widgets-container (onContextChanged)="handleOnContextChange($event)" [context]="context()">
2798
+ @if (selectedItems().length > 0) {
2799
+ <ax-collapse-group look="fill">
2800
+ @for (item of selectedItems(); track item.name) {
2801
+ <!-- File Types -->
2802
+ <ax-collapse [caption]="item.title">
2803
+ <div class="ax-flex ax-flex-col ax-gap-5">
2804
+ @if (item.meta && item.meta.length > 0) {
2805
+ <div class="ax-flex ax-flex-col ax-gap-2">
2806
+ <ax-text [textContent]="'Global Meta Data'" class="ax-font-bold ax-text-sm"></ax-text>
2807
+ @for (metaFile of item.meta; track metaFile.name) {
2808
+ <!-- File Meta Data -->
2809
+ <ax-form-field>
2810
+ <ax-label [required]="filedIsRequired(metaFile)">{{ metaFile.title }}</ax-label>
2811
+ <ng-container axp-widget-renderer [node]="getNode(metaFile)" [mode]="'edit'"></ng-container>
2812
+ </ax-form-field>
2813
+ }
2814
+ </div>
2815
+ }
2816
+ @if (item.extensions && item.extensions.length > 0) {
2817
+ <div class="ax-flex ax-flex-col ax-gap-3">
2818
+ @for (ext of item.extensions; track ext.name) {
2819
+ <!-- Extensions -->
2820
+ @if (ext.meta && ext.meta.length > 0) {
2821
+ <ax-text [textContent]="ext.title" class="ax-font-bold ax-text-sm"></ax-text>
2822
+ <div class="ax-flex ax-flex-col ax-gap-2">
2823
+ @for (extMeta of ext.meta; track $index) {
2824
+ <!-- Extension Meta Data -->
2825
+ <ax-form-field>
2826
+ <ax-label [required]="filedIsRequired(extMeta)">{{ extMeta.title }}</ax-label>
2827
+ <ng-container axp-widget-renderer [node]="getNode(extMeta)"
2828
+ [mode]="'edit'"></ng-container>
2829
+ </ax-form-field>
2830
+ }
2831
+ </div>
2832
+ }
2833
+ <!-- End Extension Meta Data -->
2834
+ }
2835
+ </div>
2836
+ <!-- End Extensions -->
2837
+ }
2838
+ </div>
2839
+ </ax-collapse>
2840
+ }
2841
+ <!-- End File Types -->
2842
+ </ax-collapse-group>
2843
+ }
2844
+ </axp-widgets-container>
2845
+ </div>`,
2846
+ changeDetection: ChangeDetectionStrategy.OnPush,
2847
+ imports: [CommonModule, AXSelectBoxModule, FormsModule, AXFormModule, AXLabelModule, AXDecoratorModule, AXPLayoutBuilderModule, AXCollapseModule],
2848
+ inputs: [],
2849
+ }]
2850
+ }] });
2851
+
2852
+ var fileTypeExtensionEdit_component = /*#__PURE__*/Object.freeze({
2853
+ __proto__: null,
2854
+ AXMFileTypeExtensionWidgetEditComponent: AXMFileTypeExtensionWidgetEditComponent
2855
+ });
2856
+
2857
+ class AXMFileTypeExtensionWidgetViewComponent extends AXPWidgetComponent {
2858
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeExtensionWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2859
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMFileTypeExtensionWidgetViewComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2860
+ }
2861
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeExtensionWidgetViewComponent, decorators: [{
2862
+ type: Component,
2863
+ args: [{
2864
+ template: ``,
2865
+ changeDetection: ChangeDetectionStrategy.OnPush,
2866
+ imports: [CommonModule],
2867
+ inputs: ['rawValue'],
2868
+ }]
2869
+ }] });
2870
+
2871
+ var fileTypeExtensionView_component = /*#__PURE__*/Object.freeze({
2872
+ __proto__: null,
2873
+ AXMFileTypeExtensionWidgetViewComponent: AXMFileTypeExtensionWidgetViewComponent
2874
+ });
2875
+
2876
+ const AXmFileTypeExtensionWidget = {
2877
+ name: 'file-type-extension',
2878
+ title: 'File Type Extension',
2879
+ description: 'Uploads and manages files',
2880
+ icon: 'fa-solid fa-files',
2881
+ group: AXP_WIDGETS_ADVANCE_GROUP,
2882
+ type: 'editor',
2883
+ properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY],
2884
+ components: {
2885
+ view: {
2886
+ component: () => Promise.resolve().then(function () { return fileTypeExtensionView_component; }).then((c) => c.AXMFileTypeExtensionWidgetViewComponent),
2887
+ },
2888
+ edit: {
2889
+ component: () => Promise.resolve().then(function () { return fileTypeExtensionEdit_component; }).then((c) => c.AXMFileTypeExtensionWidgetEditComponent),
2890
+ },
2891
+ // filter: {
2892
+ // component: () => import('./file-type-extension-filter.component').then((c) => c.AXPFileBoxWidgetFilterComponent),
2893
+ // },
2894
+ column: {
2895
+ component: () => Promise.resolve().then(function () { return fileTypeExtensionColumn_component; }).then((c) => c.AXMFileTypeExtensionWidgetColumnComponent),
2896
+ },
2897
+ // print: {
2898
+ // component: () => import('./file-type-extension-print.component').then((c) => c.AXPFileBoxWidgetPrintComponent),
2899
+ // },
2900
+ designer: {
2901
+ component: () => Promise.resolve().then(function () { return fileTypeExtensionEdit_component; }).then((c) => c.AXMFileTypeExtensionWidgetEditComponent),
2902
+ },
2903
+ },
2904
+ };
2905
+
2906
+ class AXMFileTypeModule {
2907
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2908
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeModule }); }
2909
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeModule, providers: [
2910
+ {
2911
+ provide: AXP_FILE_TYPE_INFO_PROVIDER,
2912
+ useClass: AXMImageFileTypeProvider,
2913
+ multi: true,
2914
+ },
2915
+ {
2916
+ provide: AXP_FILE_TYPE_INFO_PROVIDER,
2917
+ useClass: AXMVideoFileTypeProvider,
2918
+ multi: true,
2919
+ },
2920
+ {
2921
+ provide: AXP_FILE_TYPE_INFO_PROVIDER,
2922
+ useClass: AXMDocumentFileTypeProvider,
2923
+ multi: true,
2924
+ },
2925
+ {
2926
+ provide: AXP_FILE_TYPE_INFO_PROVIDER,
2927
+ useClass: AXMAudioFileTypeProvider,
2928
+ multi: true,
2929
+ },
2930
+ {
2931
+ provide: AXP_FILE_TYPE_INFO_PROVIDER,
2932
+ useClass: AXMCodeFileTypeProvider,
2933
+ multi: true,
2934
+ },
2935
+ {
2936
+ provide: AXP_FILE_TYPE_INFO_PROVIDER,
2937
+ useClass: AXMArchiveFileTypeProvider,
2938
+ multi: true,
2939
+ },
2940
+ ] }); }
2941
+ }
2942
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMFileTypeModule, decorators: [{
2943
+ type: NgModule,
2944
+ args: [{
2945
+ providers: [
2946
+ {
2947
+ provide: AXP_FILE_TYPE_INFO_PROVIDER,
2948
+ useClass: AXMImageFileTypeProvider,
2949
+ multi: true,
2950
+ },
2951
+ {
2952
+ provide: AXP_FILE_TYPE_INFO_PROVIDER,
2953
+ useClass: AXMVideoFileTypeProvider,
2954
+ multi: true,
2955
+ },
2956
+ {
2957
+ provide: AXP_FILE_TYPE_INFO_PROVIDER,
2958
+ useClass: AXMDocumentFileTypeProvider,
2959
+ multi: true,
2960
+ },
2961
+ {
2962
+ provide: AXP_FILE_TYPE_INFO_PROVIDER,
2963
+ useClass: AXMAudioFileTypeProvider,
2964
+ multi: true,
2965
+ },
2966
+ {
2967
+ provide: AXP_FILE_TYPE_INFO_PROVIDER,
2968
+ useClass: AXMCodeFileTypeProvider,
2969
+ multi: true,
2970
+ },
2971
+ {
2972
+ provide: AXP_FILE_TYPE_INFO_PROVIDER,
2973
+ useClass: AXMArchiveFileTypeProvider,
2974
+ multi: true,
2975
+ },
2976
+ ],
2977
+ }]
2978
+ }] });
2979
+
2980
+ class AXMDocumentAttachmentWidgetColumnComponent extends AXPWidgetComponent {
2981
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2982
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMDocumentAttachmentWidgetColumnComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2983
+ }
2984
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetColumnComponent, decorators: [{
2985
+ type: Component,
2986
+ args: [{
2987
+ template: ``,
2988
+ changeDetection: ChangeDetectionStrategy.OnPush,
2989
+ imports: [CommonModule],
2990
+ inputs: [],
2991
+ }]
2992
+ }] });
2993
+
2994
+ var documentAttachmentWidgetColumn_component = /*#__PURE__*/Object.freeze({
2995
+ __proto__: null,
2996
+ AXMDocumentAttachmentWidgetColumnComponent: AXMDocumentAttachmentWidgetColumnComponent
2997
+ });
2998
+
2999
+ var AXMDriveScope;
3000
+ (function (AXMDriveScope) {
3001
+ AXMDriveScope["Platform"] = "P";
3002
+ AXMDriveScope["Tenant"] = "T";
3003
+ AXMDriveScope["User"] = "U";
3004
+ })(AXMDriveScope || (AXMDriveScope = {}));
3005
+
3006
+ /**
3007
+ * Service for handling document drive operations
3008
+ */
3009
+ class AXMDocumentManagerService {
3010
+ constructor() {
3011
+ this.folderService = inject(AXMFolderService);
3012
+ this.sessionService = inject(AXPSessionService);
3013
+ this.documentService = inject(AXMDocumentService);
3014
+ this.popupService = inject(AXPopupService);
3015
+ this.dialogService = inject(AXDialogService);
3016
+ this.scopedDriveCache = new Map();
3017
+ }
3018
+ scope(scope, options) {
3019
+ const cacheKey = this.getScopeCacheKey(scope, options);
3020
+ if (!this.scopedDriveCache.has(cacheKey)) {
3021
+ this.scopedDriveCache.set(cacheKey, new ScopedDriveService(this, scope, options));
3022
+ }
3023
+ return this.scopedDriveCache.get(cacheKey);
3024
+ }
3025
+ getScopeCacheKey(scope, options) {
3026
+ // در آینده می‌توان این را برای کش کردن بر اساس ترکیب scope و options گسترش داد
3027
+ return scope;
3028
+ }
3029
+ /**
3030
+ * Gets the platform root folder (top-level folder)
3031
+ * @returns Root folder for the platform
3032
+ */
3033
+ async getPlatformRootFolder() {
3034
+ const result = await this.folderService.query({
3035
+ skip: 0,
3036
+ take: 1,
3037
+ filter: {
3038
+ operator: null,
3039
+ logic: 'and',
3040
+ filters: [
3041
+ { field: 'parentId', operator: { type: 'isNull' } },
3042
+ { field: 'tenantId', operator: { type: 'isNull' } },
3043
+ { field: 'userId', operator: { type: 'isNull' } },
3044
+ ],
3045
+ },
3046
+ });
3047
+ if (result.items.length === 0) {
3048
+ throw new Error('Platform root folder not found');
3049
+ }
3050
+ return result.items[0];
3051
+ }
3052
+ /**
3053
+ * Gets the tenant root folder
3054
+ * @param rootFolderId The platform root folder ID
3055
+ * @param tenantId The tenant ID
3056
+ * @returns Tenant root folder
3057
+ */
3058
+ async getTenantRootFolder(rootFolderId, tenantId) {
3059
+ if (!tenantId) {
3060
+ throw new Error('Tenant ID is required');
3061
+ }
3062
+ const result = await this.folderService.query({
3063
+ skip: 0,
3064
+ take: 1,
3065
+ filter: {
3066
+ operator: null,
3067
+ logic: 'and',
3068
+ filters: [
3069
+ { field: 'parentId', operator: { type: 'equal' }, value: rootFolderId },
3070
+ { field: 'tenantId', operator: { type: 'equal' }, value: tenantId },
3071
+ { field: 'userId', operator: { type: 'isNull' } },
3072
+ ],
3073
+ },
3074
+ });
3075
+ if (result.items.length === 0) {
3076
+ throw new Error('Tenant root folder not found');
3077
+ }
3078
+ return result.items[0];
3079
+ }
3080
+ /**
3081
+ * Gets the user root folder
3082
+ * @param tenantFolderId The tenant folder ID
3083
+ * @param tenantId The tenant ID
3084
+ * @param userId The user ID
3085
+ * @returns User root folder
3086
+ */
3087
+ async getUserRootFolder(tenantFolderId, tenantId, userId) {
3088
+ if (!tenantId || !userId) {
3089
+ throw new Error('Both Tenant ID and User ID are required');
3090
+ }
3091
+ const result = await this.folderService.query({
3092
+ skip: 0,
3093
+ take: 1,
3094
+ filter: {
3095
+ operator: null,
3096
+ logic: 'and',
3097
+ filters: [
3098
+ { field: 'parentId', operator: { type: 'equal' }, value: tenantFolderId },
3099
+ { field: 'tenantId', operator: { type: 'equal' }, value: tenantId },
3100
+ { field: 'userId', operator: { type: 'equal' }, value: userId },
3101
+ ],
3102
+ },
3103
+ });
3104
+ if (result.items.length === 0) {
3105
+ throw new Error('User root folder not found');
3106
+ }
3107
+ return result.items[0];
3108
+ }
3109
+ mapFolderDtoToFolderNode(folder) {
3110
+ return {
3111
+ id: folder.id,
3112
+ name: folder.name,
3113
+ type: 'folder',
3114
+ parentId: folder.parentId || null,
3115
+ lastModified: folder.updatedAt,
3116
+ children: [
3117
+ ...(folder.folders?.map((child) => ({
3118
+ id: child.id,
3119
+ name: child.name,
3120
+ type: 'folder',
3121
+ parentId: child.parentId || null,
3122
+ lastModified: child.updatedAt,
3123
+ size: AXPDataGenerator.number(50, 9000000),
3124
+ })) || []),
3125
+ ...(folder.documents?.map((doc) => ({
3126
+ id: doc.id,
3127
+ name: doc.name,
3128
+ type: 'file',
3129
+ parentId: doc.parentId,
3130
+ lastModified: AXPDataGenerator.date(),
3131
+ size: AXPDataGenerator.number(50, 9000000),
3132
+ })) || []),
3133
+ ],
3134
+ };
3135
+ }
3136
+ async buildPath(node) {
3137
+ if (node.type === 'file') {
3138
+ return (await this.documentService.getPath(node.id)).map(this.mapFolderDtoToFolderNode);
3139
+ }
3140
+ return (await this.folderService.getPath(node.id)).map(this.mapFolderDtoToFolderNode);
3141
+ }
3142
+ async findNodeById(id) {
3143
+ const findNode = (nodes) => {
3144
+ for (const node of nodes) {
3145
+ if (node.id === id) {
3146
+ return node;
3147
+ }
3148
+ if (node.children) {
3149
+ const found = findNode(node.children);
3150
+ if (found)
3151
+ return found;
3152
+ }
3153
+ }
3154
+ return null;
3155
+ };
3156
+ return findNode([(await this.getRoot(AXMDriveScope.Platform)).result]);
3157
+ }
3158
+ /**
3159
+ * Gets the root folder based on the specified scope
3160
+ * @param scope The drive scope (Platform, Tenant, User)
3161
+ * @param options Optional parameters for tenant and user IDs
3162
+ * @returns Root folder for the specified scope
3163
+ */
3164
+ async getRoot(scope, options) {
3165
+ const rootFolder = await this.getPlatformRootFolder();
3166
+ let result;
3167
+ switch (scope) {
3168
+ case AXMDriveScope.Platform:
3169
+ result = this.mapFolderDtoToFolderNode(rootFolder);
3170
+ break;
3171
+ case AXMDriveScope.Tenant: {
3172
+ if (!options?.tenantId) {
3173
+ throw new Error('Tenant ID is required for tenant scope');
3174
+ }
3175
+ const tenantRoot = await this.getTenantRootFolder(rootFolder.id, options.tenantId);
3176
+ result = this.mapFolderDtoToFolderNode(tenantRoot);
3177
+ break;
3178
+ }
3179
+ case AXMDriveScope.User: {
3180
+ if (!options?.tenantId || !options?.userId) {
3181
+ throw new Error('Both Tenant ID and User ID are required for user scope');
3182
+ }
3183
+ const tenantFolder = await this.getTenantRootFolder(rootFolder.id, options.tenantId);
3184
+ const userRoot = await this.getUserRootFolder(tenantFolder.id, options.tenantId, options.userId);
3185
+ result = this.mapFolderDtoToFolderNode(userRoot);
3186
+ break;
3187
+ }
3188
+ default:
3189
+ throw new Error(`Invalid scope: ${scope}`);
3190
+ }
3191
+ const path = await this.buildPath(result);
3192
+ return { path, result };
3193
+ }
3194
+ /**
3195
+ * Gets a specific folder by ID
3196
+ * @param folderId The folder ID to retrieve
3197
+ * @returns The requested folder
3198
+ */
3199
+ async getFolder(folderId) {
3200
+ if (!folderId) {
3201
+ throw new Error('Folder ID is required');
3202
+ }
3203
+ const folder = await this.folderService.getOne(folderId);
3204
+ if (!folder) {
3205
+ throw new Error('Folder not found');
3206
+ }
3207
+ const result = this.mapFolderDtoToFolderNode(folder);
3208
+ const path = await this.buildPath(result);
3209
+ return { path, result };
3210
+ }
3211
+ async createFolder(data) {
3212
+ const now = new Date();
3213
+ const currentUser = this.sessionService.user;
3214
+ const folderToCreate = {
3215
+ ...data,
3216
+ createdAt: now,
3217
+ updatedAt: now,
3218
+ createdBy: currentUser?.id?.toString() ?? 'system',
3219
+ updatedBy: currentUser?.id?.toString() ?? 'system',
3220
+ isSystem: false,
3221
+ isHidden: false,
3222
+ isDeleted: false,
3223
+ };
3224
+ const createdFolder = await this.folderService.insertOne(folderToCreate);
3225
+ const folder = await this.folderService.getOne(createdFolder);
3226
+ return this.mapFolderDtoToFolderNode(folder);
3227
+ }
3228
+ async updateFolder(folderId, data) {
3229
+ const currentUser = this.sessionService.user;
3230
+ const updateData = {
3231
+ ...data,
3232
+ updatedBy: currentUser?.id?.toString() ?? 'system',
3233
+ updatedAt: new Date(),
3234
+ };
3235
+ await this.folderService.updateOne(folderId, updateData);
3236
+ const updatedFolder = await this.folderService.getOne(folderId);
3237
+ return this.mapFolderDtoToFolderNode(updatedFolder);
3238
+ }
3239
+ async deleteFolder(folderId) {
3240
+ await this.folderService.deleteOne(folderId);
3241
+ }
3242
+ async getAvailableSpace() {
3243
+ // For now, return a fixed value of 100GB (56 * 1024 * 1024 * 1024 bytes)
3244
+ // This should be replaced with actual storage quota logic when implemented
3245
+ return 56 * 1024 * 1024 * 1024;
3246
+ }
3247
+ mapFileToNode(file) {
3248
+ return {
3249
+ id: file.id,
3250
+ name: file.name,
3251
+ type: 'file',
3252
+ parentId: file.parentId,
3253
+ lastModified: new Date(),
3254
+ };
3255
+ }
3256
+ async createFile(data) {
3257
+ const fileId = await this.documentService.insertOne(data);
3258
+ const file = await this.documentService.getOne(fileId);
3259
+ return this.mapFileToNode(file);
3260
+ }
3261
+ async updateFile(fileId, data) {
3262
+ const y = await this.documentService.getOne(fileId);
3263
+ console.log(y);
3264
+ debugger;
3265
+ const updatedFile = await this.documentService.updateOne(fileId, data);
3266
+ return this.mapFileToNode(updatedFile);
3267
+ }
3268
+ async deleteFile(fileId) {
3269
+ await this.documentService.deleteOne(fileId);
3270
+ }
3271
+ async deleteNodes(nodeIds) {
3272
+ for (const nodeId of nodeIds) {
3273
+ try {
3274
+ await this.deleteFolder(nodeId);
3275
+ }
3276
+ catch {
3277
+ try {
3278
+ await this.deleteFile(nodeId);
3279
+ }
3280
+ catch (error) {
3281
+ console.error(`Failed to delete node with id ${nodeId}:`, error);
3282
+ }
3283
+ }
3284
+ }
3285
+ }
3286
+ async showCreateFolderDialog(parentId) {
3287
+ const comp = (await import('./acorex-modules-document-management-create-folder-dialog.component-BnRaCq_Q.mjs')).AXMCreateFolderDialog;
3288
+ const popup = await this.popupService.open(comp, {
3289
+ title: 't("actions.create-folder")',
3290
+ data: {
3291
+ parentId,
3292
+ },
3293
+ });
3294
+ return popup.data?.folder;
3295
+ }
3296
+ async rename(node) {
3297
+ const comp = (await import('./acorex-modules-document-management-rename-node-dialog.component-EBf1XqU8.mjs')).AXMRenameNodeDialog;
3298
+ const popup = await this.popupService.open(comp, {
3299
+ title: 't("actions.rename")',
3300
+ data: {
3301
+ node,
3302
+ },
3303
+ });
3304
+ return popup.data?.folder;
3305
+ }
3306
+ async showDeleteNodesDialog(nodeIds) {
3307
+ const subject = new Subject();
3308
+ subject.subscribe((status) => {
3309
+ console.log(`The process has been "${status}".`);
3310
+ });
3311
+ const dialog = this.dialogService.open({
3312
+ content: 'Are you sure?',
3313
+ title: 'Delete',
3314
+ type: 'danger',
3315
+ buttons: [
3316
+ {
3317
+ text: 'Yes',
3318
+ color: 'danger',
3319
+ onClick: async (e) => {
3320
+ e.handled = true;
3321
+ e.source.text = 'Deleting...';
3322
+ e.source.disabled = true;
3323
+ e.source.loading = true;
3324
+ subject.next('Started');
3325
+ await this.deleteNodes(nodeIds);
3326
+ subject.complete();
3327
+ dialog.close();
3328
+ },
3329
+ },
3330
+ {
3331
+ text: 'No',
3332
+ color: 'default',
3333
+ autofocus: true,
3334
+ onClick: () => {
3335
+ dialog.close();
3336
+ },
3337
+ },
3338
+ ],
3339
+ });
3340
+ }
3341
+ /**
3342
+ * جستجوی فولدرها با نام مشخص شده در اسکوپ
3343
+ * @param searchTerm عبارت جستجو
3344
+ * @param scope اسکوپ جستجو
3345
+ * @param options گزینه‌های اضافی مانند tenantId و userId
3346
+ */
3347
+ async searchFolders(searchTerm, scope, options) {
3348
+ const { result: rootNode } = await this.getRoot(scope, options);
3349
+ const folders = await this.folderService.searchFolders(searchTerm, rootNode.id);
3350
+ return folders.map((folder) => this.mapFolderDtoToFolderNode(folder));
3351
+ }
3352
+ /**
3353
+ * جستجوی فایل‌ها با نام مشخص شده در اسکوپ
3354
+ * @param searchTerm عبارت جستجو
3355
+ * @param scope اسکوپ جستجو
3356
+ * @param options گزینه‌های اضافی مانند tenantId و userId
3357
+ */
3358
+ async searchFiles(searchTerm, scope, options) {
3359
+ const { result: rootNode } = await this.getRoot(scope, options);
3360
+ const files = await this.documentService.searchFiles(searchTerm, rootNode.id);
3361
+ return files.map((file) => this.mapFileToNode(file));
3362
+ }
3363
+ /**
3364
+ * جستجوی تمام نودها (فولدرها و فایل‌ها) با نام مشخص شده در اسکوپ
3365
+ * @param searchTerm عبارت جستجو
3366
+ * @param scope اسکوپ جستجو
3367
+ * @param options گزینه‌های اضافی مانند tenantId و userId
3368
+ */
3369
+ async searchNodes(searchTerm, scope, options) {
3370
+ const [folders, files] = await Promise.all([
3371
+ this.searchFolders(searchTerm, scope, options),
3372
+ this.searchFiles(searchTerm, scope, options),
3373
+ ]);
3374
+ return [...folders, ...files];
3375
+ }
3376
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3377
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagerService, providedIn: 'root' }); }
3378
+ }
3379
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagerService, decorators: [{
3380
+ type: Injectable,
3381
+ args: [{
3382
+ providedIn: 'root',
3383
+ }]
3384
+ }] });
3385
+ class ScopedDriveService {
3386
+ constructor(parent, scope, options) {
3387
+ this.parent = parent;
3388
+ this.scope = scope;
3389
+ this.options = options;
3390
+ this.validateScopeOptions();
3391
+ }
3392
+ validateScopeOptions() {
3393
+ switch (this.scope) {
3394
+ case AXMDriveScope.Tenant:
3395
+ if (!this.options?.tenantId) {
3396
+ throw new Error('Tenant ID is required for tenant scope');
3397
+ }
3398
+ break;
3399
+ case AXMDriveScope.User:
3400
+ if (!this.options?.tenantId || !this.options?.userId) {
3401
+ throw new Error('Both Tenant ID and User ID are required for user scope');
3402
+ }
3403
+ break;
3404
+ }
3405
+ }
3406
+ async getRoot() {
3407
+ return this.parent.getRoot(this.scope, this.options);
3408
+ }
3409
+ async getFolder(folderId) {
3410
+ return this.parent.getFolder(folderId);
3411
+ }
3412
+ async createFolder(data) {
3413
+ const folderData = {
3414
+ ...data,
3415
+ tenantId: this.options?.tenantId,
3416
+ userId: this.options?.userId,
3417
+ };
3418
+ return this.parent.createFolder(folderData);
3419
+ }
3420
+ async updateFolder(folderId, data) {
3421
+ return this.parent.updateFolder(folderId, data);
3422
+ }
3423
+ async deleteFolder(folderId) {
3424
+ return this.parent.deleteFolder(folderId);
3425
+ }
3426
+ async getAvailableSpace() {
3427
+ return this.parent.getAvailableSpace();
3428
+ }
3429
+ /**
3430
+ * جستجوی فولدرها با نام مشخص شده در اسکوپ فعلی
3431
+ * @param searchTerm عبارت جستجو
3432
+ */
3433
+ async searchFolders(searchTerm) {
3434
+ this.validateScopeOptions();
3435
+ return this.parent.searchFolders(searchTerm, this.scope, this.options);
3436
+ }
3437
+ /**
3438
+ * جستجوی فایل‌ها با نام مشخص شده در اسکوپ فعلی
3439
+ * @param searchTerm عبارت جستجو
3440
+ */
3441
+ async searchFiles(searchTerm) {
3442
+ this.validateScopeOptions();
3443
+ return this.parent.searchFiles(searchTerm, this.scope, this.options);
3444
+ }
3445
+ /**
3446
+ * جستجوی تمام نودها (فولدرها و فایل‌ها) با نام مشخص شده در اسکوپ فعلی
3447
+ * @param searchTerm عبارت جستجو
3448
+ */
3449
+ async searchNodes(searchTerm) {
3450
+ this.validateScopeOptions();
3451
+ return this.parent.searchNodes(searchTerm, this.scope, this.options);
3452
+ }
3453
+ }
3454
+
3455
+ var AXPDocumentExplorerSettings;
3456
+ (function (AXPDocumentExplorerSettings) {
3457
+ AXPDocumentExplorerSettings["ViewMode"] = "document-explorer:layout:view-mode";
3458
+ AXPDocumentExplorerSettings["SortField"] = "document-explorer:layout:sort-field";
3459
+ AXPDocumentExplorerSettings["SortDirection"] = "document-explorer:layout:sort-direction";
3460
+ })(AXPDocumentExplorerSettings || (AXPDocumentExplorerSettings = {}));
3461
+
3462
+ const AXPDocumentExplorerViewModel = signalStore({ providedIn: 'root' }, withState(() => ({
3463
+ // View State
3464
+ viewMode: 'grid',
3465
+ isLoading: false,
3466
+ // Navigation State
3467
+ currentPath: [],
3468
+ currentNode: null,
3469
+ loadingFolderId: null,
3470
+ navigatingFolderId: null,
3471
+ // Sort State
3472
+ sortField: 'name',
3473
+ sortDirection: 'asc',
3474
+ // Content State
3475
+ folders: [],
3476
+ files: [],
3477
+ itemsCount: 0,
3478
+ availableSpace: 0,
3479
+ // Drive State
3480
+ currentDrive: null,
3481
+ // File Type State
3482
+ fileTypes: [],
3483
+ })), withComputed((store) => ({
3484
+ isRoot: computed(() => {
3485
+ const node = store.currentNode();
3486
+ return node?.id === 'root' || !node?.parentId;
3487
+ }),
3488
+ breadcrumb: computed(() => store.currentPath()),
3489
+ currentFolder: computed(() => store.currentNode()),
3490
+ currentFolderContents: computed(() => ({
3491
+ folders: store.folders(),
3492
+ files: store.files(),
3493
+ })),
3494
+ parentFolder: computed(() => {
3495
+ const currentNode = store.currentNode();
3496
+ return currentNode?.parentId ? store.folders().find((folder) => folder.id === currentNode.parentId) : null;
3497
+ }),
3498
+ isGridView: computed(() => store.viewMode() === 'grid'),
3499
+ isListView: computed(() => store.viewMode() === 'list'),
3500
+ })), withMethods((store, fileTypeService = inject(AXPFileTypeProviderService), driveService = inject(AXMDocumentManagerService), settingService = inject(AXPSettingService)) => ({
3501
+ async initialize(path = 'root') {
3502
+ // Load file types
3503
+ const fileTypes = await fileTypeService.items();
3504
+ patchState(store, { fileTypes });
3505
+ // Load initial settings
3506
+ const viewMode = await settingService.get(AXPDocumentExplorerSettings.ViewMode);
3507
+ const sortField = await settingService.get(AXPDocumentExplorerSettings.SortField);
3508
+ const sortDirection = await settingService.get(AXPDocumentExplorerSettings.SortDirection);
3509
+ patchState(store, {
3510
+ viewMode: viewMode || 'grid',
3511
+ sortField: sortField || 'name',
3512
+ sortDirection: sortDirection || 'asc',
3513
+ });
3514
+ },
3515
+ _load: async (folderId) => {
3516
+ patchState(store, { loadingFolderId: folderId, isLoading: true });
3517
+ await new Promise((resolve) => setTimeout(resolve, 100));
3518
+ try {
3519
+ const node = await driveService.getFolder(folderId);
3520
+ patchState(store, {
3521
+ currentNode: node.result,
3522
+ currentPath: node.path,
3523
+ folders: node.result.children?.filter((item) => item.type === 'folder') || [],
3524
+ files: node.result.children?.filter((item) => item.type === 'file') || [],
3525
+ itemsCount: node.result.children?.length || 0,
3526
+ availableSpace: await driveService.getAvailableSpace(),
3527
+ loadingFolderId: null,
3528
+ isLoading: false,
3529
+ navigatingFolderId: null,
3530
+ });
3531
+ }
3532
+ catch (error) {
3533
+ patchState(store, {
3534
+ loadingFolderId: null,
3535
+ isLoading: false,
3536
+ });
3537
+ throw error;
3538
+ }
3539
+ },
3540
+ navigateToFolder(folderId) {
3541
+ patchState(store, { navigatingFolderId: folderId });
3542
+ },
3543
+ async loadFolderContents(folderId) {
3544
+ await this._load(folderId);
3545
+ },
3546
+ setViewMode(mode) {
3547
+ patchState(store, { viewMode: mode });
3548
+ settingService.scope(AXPSettingScope.User).set(AXPDocumentExplorerSettings.ViewMode, mode);
3549
+ },
3550
+ setSortField(field) {
3551
+ patchState(store, { sortField: field });
3552
+ settingService.scope(AXPSettingScope.User).set(AXPDocumentExplorerSettings.SortField, field);
3553
+ },
3554
+ setSortDirection(direction) {
3555
+ patchState(store, { sortDirection: direction });
3556
+ settingService.scope(AXPSettingScope.User).set(AXPDocumentExplorerSettings.SortDirection, direction);
3557
+ },
3558
+ setDrive(scope) {
3559
+ patchState(store, { currentDrive: scope });
3560
+ },
3561
+ isLoadingFolder(folderId) {
3562
+ return store.loadingFolderId() === folderId;
3563
+ },
3564
+ getFileInfo(fileName) {
3565
+ const fileTypes = store.fileTypes();
3566
+ const extension = fileName.split('.').pop()?.toLowerCase() || '';
3567
+ const extensions = fileTypes.flatMap((type) => type.extensions);
3568
+ const fileType = extensions.find((e) => e.name === extension);
3569
+ return {
3570
+ icon: fileType?.icon || 'fa-light fa-file',
3571
+ type: fileType?.name || 'Unknown',
3572
+ };
3573
+ },
3574
+ sortItems(items) {
3575
+ const field = store.sortField();
3576
+ const direction = store.sortDirection();
3577
+ return [...items].sort((a, b) => {
3578
+ let comparison = 0;
3579
+ switch (field) {
3580
+ case 'name':
3581
+ comparison = a.name.localeCompare(b.name);
3582
+ break;
3583
+ case 'modified':
3584
+ const aDate = a.lastModified ? new Date(a.lastModified) : new Date(0);
3585
+ const bDate = b.lastModified ? new Date(b.lastModified) : new Date(0);
3586
+ comparison = aDate.getTime() - bDate.getTime();
3587
+ break;
3588
+ case 'size':
3589
+ comparison = (a.size || 0) - (b.size || 0);
3590
+ break;
3591
+ }
3592
+ return direction === 'asc' ? comparison : -comparison;
3593
+ });
3594
+ },
3595
+ async refresh() {
3596
+ const currentFolder = store.currentNode();
3597
+ if (currentFolder) {
3598
+ await this._load(currentFolder.id);
3599
+ }
3600
+ },
3601
+ })));
3602
+
3603
+ class AXMDocumentExplorerComponent {
3604
+ constructor() {
3605
+ this.vm = inject(AXPDocumentExplorerViewModel);
3606
+ this.contextMenu = viewChild('itemsContextMenu');
3607
+ this.rootContextMenu = viewChild('rootContextMenu');
3608
+ this.driveService = inject(AXMDocumentManagerService);
3609
+ this.translateService = inject(AXTranslationService);
3610
+ this.#effect = effect(() => {
3611
+ const navigatingFolderId = this.vm.loadingFolderId();
3612
+ if (!navigatingFolderId) {
3613
+ setTimeout(() => {
3614
+ this.contextMenu()?.refresh();
3615
+ this.rootContextMenu()?.refresh();
3616
+ }, 100);
3617
+ }
3618
+ });
3619
+ }
3620
+ #effect;
3621
+ handleNavigateToFolder(folderId) {
3622
+ this.vm.navigateToFolder(folderId);
3623
+ }
3624
+ // Context Menu Handlers
3625
+ async handleContextMenuOnOpening(e) {
3626
+ const node = get$1(e.targetElement, '__data__');
3627
+ if (!node) {
3628
+ return;
3629
+ }
3630
+ const allowedAddItems = node.type === 'folder';
3631
+ const allowDelete = true;
3632
+ const isPasteAvailable = true;
3633
+ const allowPaste = false;
3634
+ const open = node.type == 'file'
3635
+ ? [
3636
+ {
3637
+ name: 'open-file',
3638
+ text: 'Open',
3639
+ icon: this.vm.getFileInfo(node.name).icon,
3640
+ data: node,
3641
+ },
3642
+ {
3643
+ name: 'download',
3644
+ text: 'Download',
3645
+ icon: 'fa-light fa-download',
3646
+ data: node,
3647
+ },
3648
+ ]
3649
+ : [
3650
+ {
3651
+ name: 'open-folder',
3652
+ text: 'Open',
3653
+ icon: 'fa-light fa-folder-open',
3654
+ data: node,
3655
+ },
3656
+ {
3657
+ name: 'upload-file',
3658
+ text: 'Upload File',
3659
+ icon: 'fa-light fa-file-arrow-up',
3660
+ break: true,
3661
+ data: this.vm.currentFolder(),
3662
+ },
3663
+ ];
3664
+ const info = {
3665
+ name: node.type == 'file' ? 'file-info' : 'folder-info',
3666
+ text: 'Information',
3667
+ icon: 'fa-light fa-circle-info',
3668
+ items: [
3669
+ {
3670
+ name: 'rename',
3671
+ text: 'Rename',
3672
+ icon: 'fa-light fa-pencil',
3673
+ data: node,
3674
+ },
3675
+ {
3676
+ name: 'properties',
3677
+ text: 'Properties',
3678
+ icon: 'fa-light fa-memo-circle-info',
3679
+ break: true,
3680
+ data: node,
3681
+ },
3682
+ {
3683
+ name: 'lock ',
3684
+ text: 'Lock',
3685
+ icon: 'fa-light fa-lock',
3686
+ data: node,
3687
+ },
3688
+ ],
3689
+ break: true,
3690
+ };
3691
+ e.items = [
3692
+ ...open,
3693
+ {
3694
+ name: 'share',
3695
+ text: 'Share',
3696
+ icon: 'fa-light fa-share-nodes',
3697
+ items: [
3698
+ {
3699
+ name: 'share',
3700
+ text: 'Share',
3701
+ icon: 'fa-light fa-users',
3702
+ },
3703
+ {
3704
+ name: 'share-with-email',
3705
+ text: 'Share with email',
3706
+ icon: 'fa-light fa-envelope',
3707
+ },
3708
+ {
3709
+ name: 'link',
3710
+ text: 'Link',
3711
+ icon: 'fa-light fa-link',
3712
+ },
3713
+ ],
3714
+ break: true,
3715
+ },
3716
+ info,
3717
+ {
3718
+ name: 'copy',
3719
+ text: 'Make a copy',
3720
+ icon: 'fa-light fa-copy',
3721
+ data: node,
3722
+ },
3723
+ {
3724
+ name: 'copy-to',
3725
+ text: 'Copy to',
3726
+ icon: 'fa-light fa-copy',
3727
+ data: node,
3728
+ },
3729
+ {
3730
+ name: 'move-to',
3731
+ text: 'Move to',
3732
+ icon: 'fa-light fa-arrow-right-arrow-left',
3733
+ break: true,
3734
+ data: node,
3735
+ },
3736
+ {
3737
+ name: 'delete',
3738
+ text: 'Delete',
3739
+ color: 'danger',
3740
+ icon: 'fa-light fa-trash',
3741
+ data: node,
3742
+ },
3743
+ ];
3744
+ }
3745
+ handleContextMenuRootOnOpening(e) {
3746
+ //TODO: check async translate method in acorex
3747
+ const scope = RootConfig.config.i18n;
3748
+ e.items = [
3749
+ {
3750
+ name: 'new-folder',
3751
+ text: this.translateService.translateSync('actions.create-folder', { scope }),
3752
+ icon: 'fa-light fa-folder-plus',
3753
+ },
3754
+ {
3755
+ name: 'upload-file',
3756
+ text: this.translateService.translateSync('actions.upload-file', { scope }),
3757
+ icon: 'fa-light fa-file-arrow-up',
3758
+ break: true,
3759
+ },
3760
+ {
3761
+ name: 'refresh',
3762
+ text: 'Refresh',
3763
+ icon: 'fa-light fa-rotate-right',
3764
+ break: true,
3765
+ },
3766
+ {
3767
+ name: 'delete',
3768
+ text: 'Delete',
3769
+ color: 'danger',
3770
+ icon: 'fa-light fa-trash',
3771
+ },
3772
+ ];
3773
+ }
3774
+ async handleContextMenuItemClick(e) {
3775
+ const node = e.item.data;
3776
+ switch (e.item.name) {
3777
+ case 'open-folder':
3778
+ this.handleNavigateToFolder(node.id);
3779
+ break;
3780
+ case 'new-folder':
3781
+ await this.createFolder(node);
3782
+ // Handle new folder creation
3783
+ break;
3784
+ case 'upload-file':
3785
+ await this.uploadFile(node);
3786
+ break;
3787
+ case 'paste':
3788
+ // Handle paste operation
3789
+ break;
3790
+ case 'rename':
3791
+ this.renameNode(node);
3792
+ break;
3793
+ case 'delete':
3794
+ this.deleteNode(node);
3795
+ break;
3796
+ case 'refresh':
3797
+ this.vm.refresh();
3798
+ break;
3799
+ }
3800
+ }
3801
+ async createFolder(node) {
3802
+ const folderId = node?.id ?? this.vm.currentFolder()?.id;
3803
+ if (folderId) {
3804
+ const result = await this.driveService.showCreateFolderDialog(this.vm.currentFolder()?.id);
3805
+ if (result) {
3806
+ await this.vm.refresh();
3807
+ }
3808
+ }
3809
+ }
3810
+ async deleteNode(node) {
3811
+ if (node) {
3812
+ await this.driveService.showDeleteNodesDialog([node.id]);
3813
+ await this.vm.refresh();
3814
+ }
3815
+ }
3816
+ async renameNode(node) {
3817
+ if (node) {
3818
+ const result = await this.driveService.rename(node);
3819
+ if (result) {
3820
+ await this.vm.refresh();
3821
+ }
3822
+ }
3823
+ }
3824
+ async uploadFile(node) {
3825
+ const folderId = node?.id ?? this.vm.currentFolder()?.id;
3826
+ if (folderId) {
3827
+ // const result = await this.driveService.showCreateFolderDialog(this.vm.currentFolder()?.id);
3828
+ // if (result) {
3829
+ // await this.vm.refresh();
3830
+ // }
3831
+ }
3832
+ }
3833
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentExplorerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3834
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMDocumentExplorerComponent, isStandalone: true, selector: "axm-document-explorer", viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["itemsContextMenu"], descendants: true, isSignal: true }, { propertyName: "rootContextMenu", first: true, predicate: ["rootContextMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Content -->\n<div class=\"content\">\n <!-- Empty State -->\n @if (vm.folders().length === 0 && vm.files().length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-py-16 ax-h-full\">\n <ax-icon icon=\"fa-light fa-folder-open\" class=\"ax-text-6xl ax-mb-4\"></ax-icon>\n <h3 class=\"ax-text-xl ax-font-medium ax-mb-2\">No Items Found</h3>\n <p class=\"\">This folder is empty. Add some files or folders to get started.</p>\n </div>\n } @else {\n <!-- Grid View -->\n @if (vm.isGridView()) {\n <!-- Folders Section -->\n @if (vm.folders().length > 0) {\n <div class=\"section\">\n <h3 class=\"section-title\">Folders</h3>\n <div class=\"items-grid\">\n @for (folder of vm.folders(); track folder.id) {\n <ng-container [ngTemplateOutlet]=\"gridFolderTemplate\" [ngTemplateOutletContext]=\"{ $implicit: folder }\">\n </ng-container>\n }\n </div>\n </div>\n }\n\n <!-- Files Section -->\n @if (vm.files().length > 0) {\n <div class=\"section\">\n <h3 class=\"section-title\">Files</h3>\n <div class=\"items-grid\">\n @for (file of vm.files(); track file.id) {\n <ng-container [ngTemplateOutlet]=\"gridFileTemplate\" [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n }\n </div>\n </div>\n }\n <!-- Grid View End -->\n }\n\n <!-- List View -->\n @if (vm.isListView()) {\n <div class=\"list-view\">\n <table class=\"items-table\">\n <thead>\n <tr>\n <th class=\"name-column\">Name</th>\n <th class=\"type-column\">Type</th>\n <th class=\"size-column\">Size</th>\n <th class=\"date-column\">Last Modified</th>\n </tr>\n </thead>\n <tbody>\n @for (folder of vm.folders(); track folder.id) {\n <ng-container [ngTemplateOutlet]=\"listFolderTemplate\" [ngTemplateOutletContext]=\"{ $implicit: folder }\">\n </ng-container>\n } @for (file of vm.files(); track file.id) {\n <ng-container [ngTemplateOutlet]=\"listFileTemplate\" [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n }\n </tbody>\n </table>\n </div>\n } }\n</div>\n\n<!-- Grid View Templates -->\n<ng-template #gridFolderTemplate let-folder>\n <div class=\"ax-group ax-cursor-pointer axp-explorer-item\" [axp-data]=\"folder\"\n (dblclick)=\"handleNavigateToFolder(folder.id)\">\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-p-4 ax-rounded-lg ax-border ax-lighter-surface\">\n <div class=\"ax-text-yellow-400 fa-3x ax-mb-2\" style=\"--fa-animation-duration: 2s\">\n @if (vm.isLoadingFolder(folder.id)) {\n <ng-container [ngTemplateOutlet]=\"folderLoading\"> </ng-container>\n } @else {\n <ax-icon icon=\"fa-solid fa-folder-closed \"></ax-icon>\n }\n </div>\n <div class=\"ax-flex ax-justify-between ax-font-semibold ax-w-full\">\n <span class=\"ax-text-sm ax-truncate ax-text-start\">{{ folder.name }}</span>\n </div>\n <div class=\"ax-flex ax-justify-between ax-w-full ax-font-semibold ax-opacity-65\">\n <span class=\"ax-text-xs ax-text-neutral\">15 items</span>\n <span class=\"ax-text-xs ax-text-neutral\">{{ folder.lastModified | format : 'datetime' : { format: 'datetime' } |\n async }}</span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #gridFileTemplate let-file>\n @let fileInfo = vm.getFileInfo(file.name);\n <div class=\"ax-group ax-cursor-pointer axp-explorer-item\" [axp-data]=\"file\"\n (dblclick)=\"handleNavigateToFolder(file.id)\">\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-p-4 ax-rounded-lg ax-border ax-lighter-surface\">\n <div class=\"ax-text-yellow-400 fa-3x ax-mb-2\" style=\"--fa-animation-duration: 2s\">\n <i class=\"fa-fw {{ fileInfo.icon }} fa-solid\"></i>\n </div>\n <div class=\"ax-flex ax-justify-between ax-font-semibold ax-w-full\">\n <span class=\"ax-text-sm ax-truncate ax-text-start\">{{ file.name }}</span>\n </div>\n <div class=\"ax-flex ax-justify-between ax-w-full ax-font-semibold ax-opacity-65\">\n <span class=\"ax-text-xs ax-text-neutral\">{{ file.size | format : 'filesize' | async }}</span>\n <span class=\"ax-text-xs ax-text-neutral\">{{ file.lastModified | format : 'datetime' : { format: 'datetime' } |\n async }}</span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<!-- List View Templates -->\n<ng-template #listFolderTemplate let-folder>\n <tr class=\"folder-row\" (dblclick)=\"handleNavigateToFolder(folder.id)\">\n <td class=\"name-column axp-explorer-item\" [axp-data]=\"folder\">\n <div class=\"item-name\">\n @if (vm.isLoadingFolder(folder.id)) {\n <ng-container [ngTemplateOutlet]=\"folderLoading\"> </ng-container>\n } @else {\n <i class=\"fas fa-folder-closed\"></i>\n }\n <span>{{ folder.name }}</span>\n </div>\n </td>\n <td class=\"type-column axp-explorer-item\" [axp-data]=\"folder\">Folder</td>\n <td class=\"size-column axp-explorer-item\" [axp-data]=\"folder\">{{ folder.size | format : 'filesize' | async }}</td>\n <td class=\"date-column axp-explorer-item\" [axp-data]=\"folder\">\n {{ folder.lastModified | format : 'datetime' : { format: 'datetime' } | async }}\n </td>\n </tr>\n</ng-template>\n\n<ng-template #listFileTemplate let-file>\n <tr class=\"file-row\">\n @let fileInfo = vm.getFileInfo(file.name);\n <td class=\"name-column axp-explorer-item\" [axp-data]=\"file\">\n <div class=\"item-name hover:ax-underline\">\n <i class=\"fa-fw {{ fileInfo.icon }} fa-solid\"></i>\n <span>{{ file.name }}</span>\n </div>\n </td>\n <td class=\"type-column axp-explorer-item\" [axp-data]=\"file\">{{ fileInfo.type }}</td>\n <td class=\"size-column axp-explorer-item\" [axp-data]=\"file\">{{ file.size | format : 'filesize' | async }}</td>\n <td class=\"date-column axp-explorer-item\" [axp-data]=\"file\">\n {{ file.lastModified | format : 'datetime' : { format: 'datetime' } | async }}\n </td>\n </tr>\n</ng-template>\n\n<ng-template #folderLoading>\n <i class=\"fa-light fa-spinner fa-spin-pulse ax-text-2xl\"></i>\n</ng-template>\n\n<!-- Context Menu-->\n<ax-context-menu #itemsContextMenu [target]=\"'.axp-explorer-item'\" [orientation]=\"'vertical'\" [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\" (onOpening)=\"handleContextMenuOnOpening($event)\">\n</ax-context-menu>\n\n<ax-context-menu #rootContextMenu [target]=\"'axm-document-explorer'\" [orientation]=\"'vertical'\" [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\" (onOpening)=\"handleContextMenuRootOnOpening($event)\">\n</ax-context-menu>", styles: [":host{display:flex;height:100%;flex:1 1 0%;flex-direction:column;gap:1rem}:host .content{flex:1 1 0%;-webkit-user-select:none;-moz-user-select:-moz-none;user-select:none;overflow-y:auto}:host .content .loading-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:2rem}:host .content .loading-state i{font-size:1.5rem;line-height:2rem}:host .content .section{margin-bottom:2rem}:host .content .section:last-child{margin-bottom:0}:host .content .section .section-title{margin-bottom:1rem;font-size:1.125rem;line-height:1.75rem;font-weight:500}:host .content .section .items-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem}:host .content .list-view .items-table{width:100%;border-collapse:collapse}:host .content .list-view .items-table th{border-bottom-width:1px;padding:.75rem;text-align:start;font-weight:500;background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host .content .list-view .items-table th.name-column{width:50%}:host .content .list-view .items-table th.type-column{width:20%}:host .content .list-view .items-table th.size-column{width:15%}:host .content .list-view .items-table th.date-column{width:15%}:host .content .list-view .items-table td{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-surface),var(--tw-border-opacity, 1));padding:.75rem}:host .content .list-view .items-table td.name-column .item-name{display:flex;align-items:center;gap:.5rem}:host .content .list-view .items-table td.name-column .item-name i{font-size:1.25rem;line-height:1.75rem}:host .content .list-view .items-table tr{cursor:pointer;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host .content .list-view .items-table tr:hover{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lighter-surface),var(--tw-bg-opacity, 1))}:host .content .list-view .items-table tr.folder-row td .item-name i{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i5$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "pipe", type: i3.AXFormatPipe, name: "format" }, { kind: "ngmodule", type: AXDateTimeModule }, { kind: "ngmodule", type: AXMenuModule }, { kind: "component", type: i4.AXContextMenuComponent, selector: "ax-context-menu", inputs: ["orientation", "openOn", "closeOn", "items", "target"], outputs: ["onItemClick", "onOpening"] }, { kind: "directive", type: AXPElementDataDirective, selector: "[axp-data]", inputs: ["axp-data", "axp-data-path"] }] }); }
3835
+ }
3836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentExplorerComponent, decorators: [{
3837
+ type: Component,
3838
+ args: [{ selector: 'axm-document-explorer', standalone: true, imports: [
3839
+ CommonModule,
3840
+ RouterModule,
3841
+ AXDecoratorModule,
3842
+ AXLoadingModule,
3843
+ AXFormatModule,
3844
+ AXDateTimeModule,
3845
+ AXMenuModule,
3846
+ AXPElementDataDirective,
3847
+ ], template: "<!-- Content -->\n<div class=\"content\">\n <!-- Empty State -->\n @if (vm.folders().length === 0 && vm.files().length === 0) {\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center ax-py-16 ax-h-full\">\n <ax-icon icon=\"fa-light fa-folder-open\" class=\"ax-text-6xl ax-mb-4\"></ax-icon>\n <h3 class=\"ax-text-xl ax-font-medium ax-mb-2\">No Items Found</h3>\n <p class=\"\">This folder is empty. Add some files or folders to get started.</p>\n </div>\n } @else {\n <!-- Grid View -->\n @if (vm.isGridView()) {\n <!-- Folders Section -->\n @if (vm.folders().length > 0) {\n <div class=\"section\">\n <h3 class=\"section-title\">Folders</h3>\n <div class=\"items-grid\">\n @for (folder of vm.folders(); track folder.id) {\n <ng-container [ngTemplateOutlet]=\"gridFolderTemplate\" [ngTemplateOutletContext]=\"{ $implicit: folder }\">\n </ng-container>\n }\n </div>\n </div>\n }\n\n <!-- Files Section -->\n @if (vm.files().length > 0) {\n <div class=\"section\">\n <h3 class=\"section-title\">Files</h3>\n <div class=\"items-grid\">\n @for (file of vm.files(); track file.id) {\n <ng-container [ngTemplateOutlet]=\"gridFileTemplate\" [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n }\n </div>\n </div>\n }\n <!-- Grid View End -->\n }\n\n <!-- List View -->\n @if (vm.isListView()) {\n <div class=\"list-view\">\n <table class=\"items-table\">\n <thead>\n <tr>\n <th class=\"name-column\">Name</th>\n <th class=\"type-column\">Type</th>\n <th class=\"size-column\">Size</th>\n <th class=\"date-column\">Last Modified</th>\n </tr>\n </thead>\n <tbody>\n @for (folder of vm.folders(); track folder.id) {\n <ng-container [ngTemplateOutlet]=\"listFolderTemplate\" [ngTemplateOutletContext]=\"{ $implicit: folder }\">\n </ng-container>\n } @for (file of vm.files(); track file.id) {\n <ng-container [ngTemplateOutlet]=\"listFileTemplate\" [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n }\n </tbody>\n </table>\n </div>\n } }\n</div>\n\n<!-- Grid View Templates -->\n<ng-template #gridFolderTemplate let-folder>\n <div class=\"ax-group ax-cursor-pointer axp-explorer-item\" [axp-data]=\"folder\"\n (dblclick)=\"handleNavigateToFolder(folder.id)\">\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-p-4 ax-rounded-lg ax-border ax-lighter-surface\">\n <div class=\"ax-text-yellow-400 fa-3x ax-mb-2\" style=\"--fa-animation-duration: 2s\">\n @if (vm.isLoadingFolder(folder.id)) {\n <ng-container [ngTemplateOutlet]=\"folderLoading\"> </ng-container>\n } @else {\n <ax-icon icon=\"fa-solid fa-folder-closed \"></ax-icon>\n }\n </div>\n <div class=\"ax-flex ax-justify-between ax-font-semibold ax-w-full\">\n <span class=\"ax-text-sm ax-truncate ax-text-start\">{{ folder.name }}</span>\n </div>\n <div class=\"ax-flex ax-justify-between ax-w-full ax-font-semibold ax-opacity-65\">\n <span class=\"ax-text-xs ax-text-neutral\">15 items</span>\n <span class=\"ax-text-xs ax-text-neutral\">{{ folder.lastModified | format : 'datetime' : { format: 'datetime' } |\n async }}</span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #gridFileTemplate let-file>\n @let fileInfo = vm.getFileInfo(file.name);\n <div class=\"ax-group ax-cursor-pointer axp-explorer-item\" [axp-data]=\"file\"\n (dblclick)=\"handleNavigateToFolder(file.id)\">\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-p-4 ax-rounded-lg ax-border ax-lighter-surface\">\n <div class=\"ax-text-yellow-400 fa-3x ax-mb-2\" style=\"--fa-animation-duration: 2s\">\n <i class=\"fa-fw {{ fileInfo.icon }} fa-solid\"></i>\n </div>\n <div class=\"ax-flex ax-justify-between ax-font-semibold ax-w-full\">\n <span class=\"ax-text-sm ax-truncate ax-text-start\">{{ file.name }}</span>\n </div>\n <div class=\"ax-flex ax-justify-between ax-w-full ax-font-semibold ax-opacity-65\">\n <span class=\"ax-text-xs ax-text-neutral\">{{ file.size | format : 'filesize' | async }}</span>\n <span class=\"ax-text-xs ax-text-neutral\">{{ file.lastModified | format : 'datetime' : { format: 'datetime' } |\n async }}</span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<!-- List View Templates -->\n<ng-template #listFolderTemplate let-folder>\n <tr class=\"folder-row\" (dblclick)=\"handleNavigateToFolder(folder.id)\">\n <td class=\"name-column axp-explorer-item\" [axp-data]=\"folder\">\n <div class=\"item-name\">\n @if (vm.isLoadingFolder(folder.id)) {\n <ng-container [ngTemplateOutlet]=\"folderLoading\"> </ng-container>\n } @else {\n <i class=\"fas fa-folder-closed\"></i>\n }\n <span>{{ folder.name }}</span>\n </div>\n </td>\n <td class=\"type-column axp-explorer-item\" [axp-data]=\"folder\">Folder</td>\n <td class=\"size-column axp-explorer-item\" [axp-data]=\"folder\">{{ folder.size | format : 'filesize' | async }}</td>\n <td class=\"date-column axp-explorer-item\" [axp-data]=\"folder\">\n {{ folder.lastModified | format : 'datetime' : { format: 'datetime' } | async }}\n </td>\n </tr>\n</ng-template>\n\n<ng-template #listFileTemplate let-file>\n <tr class=\"file-row\">\n @let fileInfo = vm.getFileInfo(file.name);\n <td class=\"name-column axp-explorer-item\" [axp-data]=\"file\">\n <div class=\"item-name hover:ax-underline\">\n <i class=\"fa-fw {{ fileInfo.icon }} fa-solid\"></i>\n <span>{{ file.name }}</span>\n </div>\n </td>\n <td class=\"type-column axp-explorer-item\" [axp-data]=\"file\">{{ fileInfo.type }}</td>\n <td class=\"size-column axp-explorer-item\" [axp-data]=\"file\">{{ file.size | format : 'filesize' | async }}</td>\n <td class=\"date-column axp-explorer-item\" [axp-data]=\"file\">\n {{ file.lastModified | format : 'datetime' : { format: 'datetime' } | async }}\n </td>\n </tr>\n</ng-template>\n\n<ng-template #folderLoading>\n <i class=\"fa-light fa-spinner fa-spin-pulse ax-text-2xl\"></i>\n</ng-template>\n\n<!-- Context Menu-->\n<ax-context-menu #itemsContextMenu [target]=\"'.axp-explorer-item'\" [orientation]=\"'vertical'\" [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\" (onOpening)=\"handleContextMenuOnOpening($event)\">\n</ax-context-menu>\n\n<ax-context-menu #rootContextMenu [target]=\"'axm-document-explorer'\" [orientation]=\"'vertical'\" [closeOn]=\"'leave'\"\n (onItemClick)=\"handleContextMenuItemClick($event)\" (onOpening)=\"handleContextMenuRootOnOpening($event)\">\n</ax-context-menu>", styles: [":host{display:flex;height:100%;flex:1 1 0%;flex-direction:column;gap:1rem}:host .content{flex:1 1 0%;-webkit-user-select:none;-moz-user-select:-moz-none;user-select:none;overflow-y:auto}:host .content .loading-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:2rem}:host .content .loading-state i{font-size:1.5rem;line-height:2rem}:host .content .section{margin-bottom:2rem}:host .content .section:last-child{margin-bottom:0}:host .content .section .section-title{margin-bottom:1rem;font-size:1.125rem;line-height:1.75rem;font-weight:500}:host .content .section .items-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem}:host .content .list-view .items-table{width:100%;border-collapse:collapse}:host .content .list-view .items-table th{border-bottom-width:1px;padding:.75rem;text-align:start;font-weight:500;background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host .content .list-view .items-table th.name-column{width:50%}:host .content .list-view .items-table th.type-column{width:20%}:host .content .list-view .items-table th.size-column{width:15%}:host .content .list-view .items-table th.date-column{width:15%}:host .content .list-view .items-table td{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-surface),var(--tw-border-opacity, 1));padding:.75rem}:host .content .list-view .items-table td.name-column .item-name{display:flex;align-items:center;gap:.5rem}:host .content .list-view .items-table td.name-column .item-name i{font-size:1.25rem;line-height:1.75rem}:host .content .list-view .items-table tr{cursor:pointer;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host .content .list-view .items-table tr:hover{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lighter-surface),var(--tw-bg-opacity, 1))}:host .content .list-view .items-table tr.folder-row td .item-name i{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}\n"] }]
3848
+ }] });
3849
+
3850
+ class AXMDocumentAttachmentWidgetEditComponent extends AXPWidgetComponent {
3851
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3852
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMDocumentAttachmentWidgetEditComponent, isStandalone: true, selector: "axm-document-attachment-widget", usesInheritance: true, ngImport: i0, template: `<axm-document-explorer></axm-document-explorer>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXMDocumentExplorerComponent, selector: "axm-document-explorer" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3853
+ }
3854
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetEditComponent, decorators: [{
3855
+ type: Component,
3856
+ args: [{
3857
+ selector: 'axm-document-attachment-widget',
3858
+ template: `<axm-document-explorer></axm-document-explorer>`,
3859
+ changeDetection: ChangeDetectionStrategy.OnPush,
3860
+ imports: [CommonModule, AXMDocumentExplorerComponent],
3861
+ inputs: [],
3862
+ }]
3863
+ }] });
3864
+
3865
+ var documentAttachmentWidgetEdit_component = /*#__PURE__*/Object.freeze({
3866
+ __proto__: null,
3867
+ AXMDocumentAttachmentWidgetEditComponent: AXMDocumentAttachmentWidgetEditComponent
3868
+ });
3869
+
3870
+ class AXMDocumentAttachmentWidgetFilterComponent extends AXPWidgetComponent {
3871
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3872
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMDocumentAttachmentWidgetFilterComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3873
+ }
3874
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetFilterComponent, decorators: [{
3875
+ type: Component,
3876
+ args: [{
3877
+ template: ``,
3878
+ changeDetection: ChangeDetectionStrategy.OnPush,
3879
+ imports: [CommonModule, FormsModule],
3880
+ inputs: [],
3881
+ }]
3882
+ }] });
3883
+
3884
+ var documentAttachmentWidgetFilter_component = /*#__PURE__*/Object.freeze({
3885
+ __proto__: null,
3886
+ AXMDocumentAttachmentWidgetFilterComponent: AXMDocumentAttachmentWidgetFilterComponent
3887
+ });
3888
+
3889
+ class AXMDocumentAttachmentWidgetPrintComponent extends AXPWidgetComponent {
3890
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3891
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMDocumentAttachmentWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3892
+ }
3893
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetPrintComponent, decorators: [{
3894
+ type: Component,
3895
+ args: [{
3896
+ template: ``,
3897
+ changeDetection: ChangeDetectionStrategy.OnPush,
3898
+ imports: [CommonModule],
3899
+ inputs: [],
3900
+ }]
3901
+ }] });
3902
+
3903
+ var documentAttachmentWidgetPrint_component = /*#__PURE__*/Object.freeze({
3904
+ __proto__: null,
3905
+ AXMDocumentAttachmentWidgetPrintComponent: AXMDocumentAttachmentWidgetPrintComponent
3906
+ });
3907
+
3908
+ class AXMDocumentAttachmentWidgetViewComponent extends AXPWidgetComponent {
3909
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3910
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMDocumentAttachmentWidgetViewComponent, isStandalone: true, selector: "axp-document-attachment-widget", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3911
+ }
3912
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentAttachmentWidgetViewComponent, decorators: [{
3913
+ type: Component,
3914
+ args: [{
3915
+ selector: 'axp-document-attachment-widget',
3916
+ template: ``,
3917
+ changeDetection: ChangeDetectionStrategy.OnPush,
3918
+ imports: [CommonModule],
3919
+ inputs: [],
3920
+ }]
3921
+ }] });
3922
+
3923
+ var documentAttachmentWidgetView_component = /*#__PURE__*/Object.freeze({
3924
+ __proto__: null,
3925
+ AXMDocumentAttachmentWidgetViewComponent: AXMDocumentAttachmentWidgetViewComponent
3926
+ });
3927
+
3928
+ const AXMDocumentAttachmentWidget = {
3929
+ name: 'document-attachment-editor',
3930
+ title: 'DocumentAttachment',
3931
+ icon: 'fa-solid fa-gallery',
3932
+ description: 'My custom widget',
3933
+ group: AXP_WIDGETS_EDITOR_GROUP,
3934
+ type: 'editor',
3935
+ defaultFilterWidgetName: 'string-filter',
3936
+ properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY],
3937
+ components: {
3938
+ view: {
3939
+ component: () => Promise.resolve().then(function () { return documentAttachmentWidgetView_component; }).then((c) => c.AXMDocumentAttachmentWidgetViewComponent),
3940
+ },
3941
+ edit: {
3942
+ component: () => Promise.resolve().then(function () { return documentAttachmentWidgetEdit_component; }).then((c) => c.AXMDocumentAttachmentWidgetEditComponent),
3943
+ },
3944
+ filter: {
3945
+ component: () => Promise.resolve().then(function () { return documentAttachmentWidgetFilter_component; }).then((c) => c.AXMDocumentAttachmentWidgetFilterComponent),
3946
+ },
3947
+ column: {
3948
+ component: () => Promise.resolve().then(function () { return documentAttachmentWidgetColumn_component; }).then((c) => c.AXMDocumentAttachmentWidgetColumnComponent),
3949
+ },
3950
+ print: {
3951
+ component: () => Promise.resolve().then(function () { return documentAttachmentWidgetPrint_component; }).then((c) => c.AXMDocumentAttachmentWidgetPrintComponent),
3952
+ },
3953
+ designer: {
3954
+ component: () => Promise.resolve().then(function () { return documentAttachmentWidgetEdit_component; }).then((c) => c.AXMDocumentAttachmentWidgetEditComponent),
3955
+ },
3956
+ },
3957
+ };
3958
+
3959
+ function routesFacory() {
3960
+ const config = inject(AXP_ENTITY_CONFIG_TOKEN);
3961
+ const routes = [
3962
+ {
3963
+ path: ':app/drive/:scope',
3964
+ component: config.viewers.root(),
3965
+ canActivate: [AXPAuthGuard],
3966
+ data: { reuse: true },
3967
+ children: [
3968
+ {
3969
+ path: '',
3970
+ loadComponent: () => import('./acorex-modules-document-management-drive.component-Sz198sA6.mjs').then((c) => c.AXMDocumentDriveComponent),
3971
+ },
3972
+ {
3973
+ path: ':id',
3974
+ loadComponent: () => import('./acorex-modules-document-management-drive.component-Sz198sA6.mjs').then((c) => c.AXMDocumentDriveComponent),
3975
+ },
3976
+ ],
3977
+ },
3978
+ ];
3979
+ return routes;
3980
+ }
3981
+ class AXMDocumentManagementModule {
3982
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3983
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementModule, imports: [AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule,
3984
+ AXMDocumentManagementDocumentTypeMetaValueEntityModule,
3985
+ AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
3986
+ AXMDocumentManagementDocumentTypeEntityModule,
3987
+ AXMDocumentManagementDocumentEntityModule, i6.AXPLayoutBuilderModule, AXMFileTypeModule] }); }
3988
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementModule, providers: [
3989
+ {
3990
+ provide: AXMFolderService,
3991
+ useClass: AXMFolderServiceImpl,
3992
+ },
3993
+ {
3994
+ provide: AXP_MENU_PROVIDER,
3995
+ useClass: AXMMenuProvider,
3996
+ multi: true,
3997
+ },
3998
+ {
3999
+ provide: AXP_ENTITY_DEFINITION_LOADER,
4000
+ useClass: AXMEntityProvider,
4001
+ multi: true,
4002
+ },
4003
+ {
4004
+ provide: AXP_SETTING_DEFINITION_PROVIDER,
4005
+ useClass: AXMSettingProvider,
4006
+ multi: true,
4007
+ },
4008
+ {
4009
+ provide: AXP_SEARCH_PROVIDER,
4010
+ useClass: AXMSearchCommandProvider,
4011
+ multi: true,
4012
+ },
4013
+ {
4014
+ provide: AXP_PERMISSION_PROVIDER,
4015
+ useClass: AXMPermissionProvider,
4016
+ multi: true,
4017
+ },
4018
+ {
4019
+ provide: ROUTES,
4020
+ multi: true,
4021
+ useFactory: routesFacory,
4022
+ },
4023
+ ], imports: [AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule,
4024
+ AXMDocumentManagementDocumentTypeMetaValueEntityModule,
4025
+ AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
4026
+ AXMDocumentManagementDocumentTypeEntityModule,
4027
+ AXMDocumentManagementDocumentEntityModule,
4028
+ AXPLayoutBuilderModule.forChild({
4029
+ widgets: [AXmFileTypeExtensionWidget, AXMDocumentAttachmentWidget],
4030
+ }),
4031
+ AXMFileTypeModule] }); }
4032
+ }
4033
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMDocumentManagementModule, decorators: [{
4034
+ type: NgModule,
4035
+ args: [{
4036
+ imports: [
4037
+ AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule,
4038
+ AXMDocumentManagementDocumentTypeMetaValueEntityModule,
4039
+ AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule,
4040
+ AXMDocumentManagementDocumentTypeEntityModule,
4041
+ AXMDocumentManagementDocumentEntityModule,
4042
+ AXPLayoutBuilderModule.forChild({
4043
+ widgets: [AXmFileTypeExtensionWidget, AXMDocumentAttachmentWidget],
4044
+ }),
4045
+ AXMFileTypeModule,
4046
+ ],
4047
+ exports: [],
4048
+ providers: [
4049
+ {
4050
+ provide: AXMFolderService,
4051
+ useClass: AXMFolderServiceImpl,
4052
+ },
4053
+ {
4054
+ provide: AXP_MENU_PROVIDER,
4055
+ useClass: AXMMenuProvider,
4056
+ multi: true,
4057
+ },
4058
+ {
4059
+ provide: AXP_ENTITY_DEFINITION_LOADER,
4060
+ useClass: AXMEntityProvider,
4061
+ multi: true,
4062
+ },
4063
+ {
4064
+ provide: AXP_SETTING_DEFINITION_PROVIDER,
4065
+ useClass: AXMSettingProvider,
4066
+ multi: true,
4067
+ },
4068
+ {
4069
+ provide: AXP_SEARCH_PROVIDER,
4070
+ useClass: AXMSearchCommandProvider,
4071
+ multi: true,
4072
+ },
4073
+ {
4074
+ provide: AXP_PERMISSION_PROVIDER,
4075
+ useClass: AXMPermissionProvider,
4076
+ multi: true,
4077
+ },
4078
+ {
4079
+ provide: ROUTES,
4080
+ multi: true,
4081
+ useFactory: routesFacory,
4082
+ },
4083
+ ],
4084
+ }]
4085
+ }] });
4086
+
4087
+ /**
4088
+ * Generated bundle index. Do not edit.
4089
+ */
4090
+
4091
+ export { AXMDocumentManagerService as A, AXMFolderServiceImpl as B, AXMEntityProvider as C, AXMMenuProvider as D, AXMSearchCommandProvider as E, AXMSettingProvider as F, RootConfig as R, AXPDocumentExplorerViewModel as a, AXMDocumentExplorerComponent as b, AXMDriveScope as c, AXMDocumentManagementModule as d, documentFactory as e, AXMDocumentManagementDocumentEntityModule as f, AXMDocumentService as g, AXMDocumentServiceImpl as h, documentTypeFactory as i, AXMDocumentManagementDocumentTypeEntityModule as j, AXMDocumentManagementDocumentTypeEntityService as k, AXMDocumentManagementDocumentTypeEntityServiceImpl as l, documentTypeMetaDefinitionfactory as m, AXMDocumentManagementDocumentTypeMetaDefinitionEntityModule as n, AXMDocumentManagementDocumentTypeMetaDefinitionEntityService as o, AXMDocumentManagementDocumentTypeMetaDefinitionEntityServiceImpl as p, documentTypeMetaValueFactory as q, AXMDocumentManagementDocumentTypeMetaValueEntityModule as r, AXMDocumentManagementDocumentTypeMetaValueEntityService as s, AXMDocumentManagementDocumentTypeMetaValueEntityServiceImpl as t, documentTypeStatusDefinitionFactory as u, AXMDocumentManagementDocumentTypeStatusDefinitionEntityModule as v, AXMDocumentManagementDocumentTypeStatusDefinitionEntityService as w, AXMDocumentManagementDocumentTypeStatusDefinitionEntityServiceImpl as x, folderFactory as y, AXMFolderService as z };
4092
+ //# sourceMappingURL=acorex-modules-document-management-acorex-modules-document-management-C9ZCejjs.mjs.map