@acorex-platform/module-common-client 0.0.37 → 0.0.46

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 (54) hide show
  1. package/fesm2022/{acorex-platform-module-common-client-acorex-platform-module-common-client-BmGXSWg4.mjs → acorex-platform-module-common-client-acorex-platform-module-common-client-BzK6gnbq.mjs} +258 -63
  2. package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-BzK6gnbq.mjs.map +1 -0
  3. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-D0TFxo2b.mjs → acorex-platform-module-common-client-archive-entity.command-P-8WPEaC.mjs} +2 -2
  4. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-D0TFxo2b.mjs.map → acorex-platform-module-common-client-archive-entity.command-P-8WPEaC.mjs.map} +1 -1
  5. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-DrW2EjNj.mjs → acorex-platform-module-common-client-archive-entity.command.util-DgnEcrDL.mjs} +2 -2
  6. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-DrW2EjNj.mjs.map → acorex-platform-module-common-client-archive-entity.command.util-DgnEcrDL.mjs.map} +1 -1
  7. package/fesm2022/{acorex-platform-module-common-client-audit-info-column.component-tMlIVjiu.mjs → acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs} +2 -2
  8. package/fesm2022/{acorex-platform-module-common-client-audit-info-column.component-tMlIVjiu.mjs.map → acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs.map} +1 -1
  9. package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-LNJekir_.mjs → acorex-platform-module-common-client-bulk-archive-entity.command-njV_WseD.mjs} +2 -2
  10. package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-LNJekir_.mjs.map → acorex-platform-module-common-client-bulk-archive-entity.command-njV_WseD.mjs.map} +1 -1
  11. package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-DV81VX8K.mjs → acorex-platform-module-common-client-bulk-restore-archive-entity.command-t2AYXaLk.mjs} +2 -2
  12. package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-DV81VX8K.mjs.map → acorex-platform-module-common-client-bulk-restore-archive-entity.command-t2AYXaLk.mjs.map} +1 -1
  13. package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-CcjD0iDW.mjs → acorex-platform-module-common-client-clone-entity.command-UyUOYAxp.mjs} +2 -2
  14. package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-CcjD0iDW.mjs.map → acorex-platform-module-common-client-clone-entity.command-UyUOYAxp.mjs.map} +1 -1
  15. package/fesm2022/acorex-platform-module-common-client-contracts-entities-record-lock.mjs +13 -0
  16. package/fesm2022/acorex-platform-module-common-client-contracts-entities-record-lock.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-entry.mjs +14 -0
  18. package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-entry.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-stream.mjs +13 -0
  20. package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-stream.mjs.map +1 -1
  21. package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-C2WFbRne.mjs → acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-8_tVyorm.mjs} +4 -4
  22. package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-C2WFbRne.mjs.map → acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-8_tVyorm.mjs.map} +1 -1
  23. package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-CY6jfaD7.mjs → acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-DLA5qjPs.mjs} +15 -2
  24. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-DLA5qjPs.mjs.map +1 -0
  25. package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-DCBxAIMJ.mjs → acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-C07SlyK0.mjs} +16 -2
  26. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-C07SlyK0.mjs.map +1 -0
  27. package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-DbSB34vz.mjs → acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-C7LJK2Gt.mjs} +15 -2
  28. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-C7LJK2Gt.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog.mjs +1 -1
  30. package/fesm2022/acorex-platform-module-common-client-contracts.mjs +110 -4
  31. package/fesm2022/acorex-platform-module-common-client-contracts.mjs.map +1 -1
  32. package/fesm2022/acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs +46 -0
  33. package/fesm2022/acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs.map +1 -0
  34. package/fesm2022/acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs +54 -0
  35. package/fesm2022/acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs.map +1 -0
  36. package/fesm2022/acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs +58 -0
  37. package/fesm2022/acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs.map +1 -0
  38. package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-CWJPmL4o.mjs → acorex-platform-module-common-client-restore-archive-entity.command-Dyix1Ecm.mjs} +2 -2
  39. package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-CWJPmL4o.mjs.map → acorex-platform-module-common-client-restore-archive-entity.command-Dyix1Ecm.mjs.map} +1 -1
  40. package/fesm2022/{acorex-platform-module-common-client-search-popup.component-CNJmksXt.mjs → acorex-platform-module-common-client-search-popup.component-j0h_8fec.mjs} +2 -2
  41. package/fesm2022/{acorex-platform-module-common-client-search-popup.component-CNJmksXt.mjs.map → acorex-platform-module-common-client-search-popup.component-j0h_8fec.mjs.map} +1 -1
  42. package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-DDpyY7mO.mjs → acorex-platform-module-common-client-timeline-version-history-popup.component-ysTJlOCx.mjs} +2 -2
  43. package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-DDpyY7mO.mjs.map → acorex-platform-module-common-client-timeline-version-history-popup.component-ysTJlOCx.mjs.map} +1 -1
  44. package/fesm2022/acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs +122 -0
  45. package/fesm2022/acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs.map +1 -0
  46. package/fesm2022/acorex-platform-module-common-client.mjs +2 -1
  47. package/fesm2022/acorex-platform-module-common-client.mjs.map +1 -1
  48. package/package.json +1 -1
  49. package/types/acorex-platform-module-common-client-contracts.d.ts +80 -4
  50. package/types/acorex-platform-module-common-client.d.ts +13 -10
  51. package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-BmGXSWg4.mjs.map +0 -1
  52. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-CY6jfaD7.mjs.map +0 -1
  53. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-DCBxAIMJ.mjs.map +0 -1
  54. package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-DbSB34vz.mjs.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { AXP_PERMISSION_DEFINITION_PROVIDER, AXPSessionService, AXP_PERMISSION_MODULES_RESOLVER } from '@acorex-platform/framework-client/auth';
2
2
  import { AXPVersioningService, AXVChangeType, AXPSettingsService, AXPCommonSettings, AXPLockService, AXPStatusDefinitionProviderService, platformErrorI18nKey, AXPHomePageService, ALL_DEFAULT_OPERATORS, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_STATUS_PROVIDERS, AXPTabNavigationService, AXPSearchService } from '@acorex-platform/framework-client/common';
3
3
  import * as i1$3 from '@acorex-platform/framework-client/core';
4
- import { AXPCatalogScopeDefinitionProviderService, AXPExpressionEvaluatorService, AXPContextEvalFactory, AXPEntityBroadcastService, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXP_MODULE_MANIFEST_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER, AXP_CATALOG_SCOPE_DEFINITION_PROVIDER, AXPKeyboardShortcutRegistry, chordToKbdItemKeys, AXPComponentSlotModule } from '@acorex-platform/framework-client/core';
4
+ import { AXPCatalogScopeDefinitionProviderService, AXPExpressionEvaluatorService, AXPContextEvalFactory, AXPEntityBroadcastService, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER, AXP_CATALOG_SCOPE_DEFINITION_PROVIDER, AXPKeyboardShortcutRegistry, chordToKbdItemKeys, AXPComponentSlotModule } from '@acorex-platform/framework-client/core';
5
5
  import { provideCommandSetups, AXPQueryService, provideCommandMiddleware, AXPCommandExecutor } from '@acorex-platform/framework-client/runtime';
6
- import { RootConfig, AXPCommonCommandKeys, AXPCommonMenuKeys, AXPCommonFeatureKeys, COMMON_CATALOG_SCOPE_GENERAL, resolvePermissionModules } from '@acorex-platform/module-common-client/contracts';
6
+ import { AXPCommonCommandKeys, AXPVersioningField, AXP_VERSIONING_PLUGIN_NAME, RootConfig, AXPCommonMenuKeys, AXPCommonFeatureKeys, COMMON_CATALOG_SCOPE_GENERAL, resolvePermissionModules } from '@acorex-platform/module-common-client/contracts';
7
7
  import { AXPWidgetsModule } from '@acorex-platform/framework-client/layout/widgets';
8
8
  import * as i0 from '@angular/core';
9
9
  import { NgModule, InjectionToken, inject, Injectable, input, signal, computed, Injector, ChangeDetectionStrategy, Component, runInInjectionContext, ViewEncapsulation, DestroyRef } from '@angular/core';
@@ -40,26 +40,6 @@ import { firstValueFrom, Subject } from 'rxjs';
40
40
  import { AXKBDComponent, AXKBDItemComponent } from '@acorex/components/kbd';
41
41
  import { AXPLayoutThemeService } from '@acorex-platform/framework-client/themes/shared';
42
42
 
43
- //#region ---- Imports ----
44
- //#endregion
45
- //#region ---- Manifest Definition ----
46
- /**
47
- * Common Module Manifest.
48
- * Defines module metadata, features, and provider references.
49
- */
50
- const CommonManifest = {
51
- name: RootConfig.module.name,
52
- version: '1.0.0',
53
- title: RootConfig.module.title,
54
- icon: RootConfig.module.icon,
55
- i18n: RootConfig.config.i18n,
56
- type: 'platform',
57
- domain: 'platform',
58
- required: true,
59
- // Module dependencies (optional)
60
- };
61
- //#endregion
62
-
63
43
  const DEFAULT_ARCHIVE_FIELD_NAME = 'isArchived';
64
44
  //#endregion
65
45
  const archivePlugin = {
@@ -267,19 +247,19 @@ class AXPArchivePluginModule {
267
247
  provideCommandSetups([
268
248
  {
269
249
  key: AXPCommonCommandKeys.Archive.Archive,
270
- command: () => import('./acorex-platform-module-common-client-archive-entity.command-D0TFxo2b.mjs').then((m) => m.AXPArchiveEntityCommand),
250
+ command: () => import('./acorex-platform-module-common-client-archive-entity.command-P-8WPEaC.mjs').then((m) => m.AXPArchiveEntityCommand),
271
251
  },
272
252
  {
273
253
  key: AXPCommonCommandKeys.Archive.Restore,
274
- command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-CWJPmL4o.mjs').then((m) => m.AXPRestoreArchiveEntityCommand),
254
+ command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-Dyix1Ecm.mjs').then((m) => m.AXPRestoreArchiveEntityCommand),
275
255
  },
276
256
  {
277
257
  key: AXPCommonCommandKeys.Archive.BulkArchive,
278
- command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-LNJekir_.mjs').then((m) => m.AXPBulkArchiveEntityCommand),
258
+ command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-njV_WseD.mjs').then((m) => m.AXPBulkArchiveEntityCommand),
279
259
  },
280
260
  {
281
261
  key: AXPCommonCommandKeys.Archive.BulkRestore,
282
- command: () => import('./acorex-platform-module-common-client-bulk-restore-archive-entity.command-DV81VX8K.mjs').then((m) => m.AXPBulkRestoreArchiveEntityCommand),
262
+ command: () => import('./acorex-platform-module-common-client-bulk-restore-archive-entity.command-t2AYXaLk.mjs').then((m) => m.AXPBulkRestoreArchiveEntityCommand),
283
263
  },
284
264
  ]),
285
265
  ] }); }
@@ -292,19 +272,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
292
272
  provideCommandSetups([
293
273
  {
294
274
  key: AXPCommonCommandKeys.Archive.Archive,
295
- command: () => import('./acorex-platform-module-common-client-archive-entity.command-D0TFxo2b.mjs').then((m) => m.AXPArchiveEntityCommand),
275
+ command: () => import('./acorex-platform-module-common-client-archive-entity.command-P-8WPEaC.mjs').then((m) => m.AXPArchiveEntityCommand),
296
276
  },
297
277
  {
298
278
  key: AXPCommonCommandKeys.Archive.Restore,
299
- command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-CWJPmL4o.mjs').then((m) => m.AXPRestoreArchiveEntityCommand),
279
+ command: () => import('./acorex-platform-module-common-client-restore-archive-entity.command-Dyix1Ecm.mjs').then((m) => m.AXPRestoreArchiveEntityCommand),
300
280
  },
301
281
  {
302
282
  key: AXPCommonCommandKeys.Archive.BulkArchive,
303
- command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-LNJekir_.mjs').then((m) => m.AXPBulkArchiveEntityCommand),
283
+ command: () => import('./acorex-platform-module-common-client-bulk-archive-entity.command-njV_WseD.mjs').then((m) => m.AXPBulkArchiveEntityCommand),
304
284
  },
305
285
  {
306
286
  key: AXPCommonCommandKeys.Archive.BulkRestore,
307
- command: () => import('./acorex-platform-module-common-client-bulk-restore-archive-entity.command-DV81VX8K.mjs').then((m) => m.AXPBulkRestoreArchiveEntityCommand),
287
+ command: () => import('./acorex-platform-module-common-client-bulk-restore-archive-entity.command-t2AYXaLk.mjs').then((m) => m.AXPBulkRestoreArchiveEntityCommand),
308
288
  },
309
289
  ]),
310
290
  ],
@@ -314,6 +294,221 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
314
294
  const AXP_ENTITY_ARCHIVE_OVERRIDES = new InjectionToken('AXP_ENTITY_ARCHIVE_OVERRIDES');
315
295
  //#endregion
316
296
 
297
+ function notEnabledHiddenExpression(options) {
298
+ const enabledField = options?.enabledField ?? AXPVersioningField.VersioningEnabled;
299
+ const raw = options?.enabledWhen;
300
+ if (typeof raw === 'string' && raw.includes('{{')) {
301
+ const inner = raw.replace(/^\{\{\s*/, '').replace(/\s*\}\}$/, '');
302
+ return `{{ !(${inner}) }}`;
303
+ }
304
+ return `{{ !context.eval("${enabledField}") }}`;
305
+ }
306
+ //#region ----- Entity versioning plugin -----
307
+ const versioningPlugin = {
308
+ name: AXP_VERSIONING_PLUGIN_NAME,
309
+ order: 64,
310
+ apply: (ctx, options) => {
311
+ ensureListActions(ctx);
312
+ const hiddenWhenNotEnabled = notEnabledHiddenExpression(options);
313
+ const groupId = 'basic-info';
314
+ const groups = ctx.groups.list() ?? [];
315
+ if (!groups.some((g) => g.id === groupId)) {
316
+ ctx.groups.add({ id: groupId, title: '@general:terms.interface.basic-info' });
317
+ }
318
+ const props = ctx.properties.list();
319
+ if (!props.some((p) => p.name === AXPVersioningField.Version)) {
320
+ ctx.properties.add({
321
+ name: AXPVersioningField.Version,
322
+ title: '@general:versioning.fields.version.title',
323
+ groupId,
324
+ schema: {
325
+ dataType: 'number',
326
+ readonly: true,
327
+ interface: {
328
+ type: AXPWidgetsList.Editors.NumberBox,
329
+ options: { disabled: true },
330
+ },
331
+ },
332
+ options: {
333
+ sort: { enabled: true },
334
+ filter: { advance: { enabled: true }, inline: { enabled: true } },
335
+ },
336
+ });
337
+ }
338
+ if (!props.some((p) => p.name === AXPVersioningField.VersionId)) {
339
+ ctx.properties.add({
340
+ name: AXPVersioningField.VersionId,
341
+ title: '@general:versioning.fields.version-id.title',
342
+ groupId,
343
+ schema: {
344
+ dataType: 'string',
345
+ readonly: true,
346
+ visible: false,
347
+ interface: { type: AXPWidgetsList.Editors.TextBox },
348
+ },
349
+ });
350
+ }
351
+ const enabledField = options?.enabledField ?? AXPVersioningField.VersioningEnabled;
352
+ if (!props.some((p) => p.name === enabledField)) {
353
+ ctx.properties.add({
354
+ name: enabledField,
355
+ title: '@general:versioning.fields.versioning-enabled.title',
356
+ groupId,
357
+ schema: {
358
+ dataType: 'boolean',
359
+ readonly: true,
360
+ visible: false,
361
+ interface: {
362
+ type: AXPWidgetsList.Editors.ToggleSwitch,
363
+ options: { defaultValue: false, nullValue: false },
364
+ },
365
+ },
366
+ });
367
+ }
368
+ const columns = ctx.columns.list() ?? [];
369
+ if (!columns.some((c) => c.name === AXPVersioningField.Version)) {
370
+ ctx.columns.add({
371
+ name: AXPVersioningField.Version,
372
+ title: '@general:versioning.fields.version.title',
373
+ width: 90,
374
+ sortable: true,
375
+ filterable: true,
376
+ });
377
+ }
378
+ const hostRefType = `${ctx.entity.module}.${ctx.entity.name}`;
379
+ const companionEntity = `${hostRefType}Version`;
380
+ ctx.entity.relatedEntities ??= [];
381
+ const related = ctx.entity.relatedEntities;
382
+ if (!related.some((r) => r.entity === companionEntity)) {
383
+ ctx.entity.relatedEntities.push({
384
+ entity: companionEntity,
385
+ title: '@general:versioning.related-versions.title',
386
+ icon: 'fa-light fa-code-branch',
387
+ conditions: [
388
+ {
389
+ name: AXPVersioningField.SourceId,
390
+ operator: { type: 'equal' },
391
+ value: '{{ context.eval("id") }}',
392
+ },
393
+ ],
394
+ columns: [
395
+ { name: AXPVersioningField.VersionNumber },
396
+ { name: AXPVersioningField.VersioningStatus },
397
+ ],
398
+ excludeProperties: ['sourceId'],
399
+ layout: { type: 'page-list', position: 'after', order: 80 },
400
+ });
401
+ }
402
+ ctx.interfaces.update((interfaces) => {
403
+ const listActions = interfaces.master
404
+ ?.list?.actions;
405
+ const singleActions = interfaces.master
406
+ ?.single?.actions;
407
+ const addActions = (actions) => {
408
+ if (!actions) {
409
+ return;
410
+ }
411
+ if (!actionExists(actions, AXPCommonCommandKeys.Versioning.CreateDraft)) {
412
+ actions.push({
413
+ title: '@general:actions.versioning.create-draft.title',
414
+ command: {
415
+ name: AXPCommonCommandKeys.Versioning.CreateDraft,
416
+ options: {
417
+ refId: '{{ context.eval("id") }}',
418
+ refType: hostRefType,
419
+ },
420
+ },
421
+ priority: 'secondary',
422
+ type: 'update',
423
+ scope: AXPEntityCommandScope.Individual,
424
+ hidden: hiddenWhenNotEnabled,
425
+ });
426
+ }
427
+ if (!actionExists(actions, AXPCommonCommandKeys.Versioning.Publish)) {
428
+ actions.push({
429
+ title: '@general:actions.versioning.publish.title',
430
+ command: {
431
+ name: AXPCommonCommandKeys.Versioning.Publish,
432
+ options: {
433
+ refId: '{{ context.eval("id") }}',
434
+ refType: hostRefType,
435
+ },
436
+ },
437
+ priority: 'secondary',
438
+ type: 'update',
439
+ scope: AXPEntityCommandScope.Individual,
440
+ hidden: hiddenWhenNotEnabled,
441
+ });
442
+ }
443
+ if (!actionExists(actions, AXPCommonCommandKeys.Versioning.DeleteDraft)) {
444
+ actions.push({
445
+ title: '@general:actions.versioning.delete-draft.title',
446
+ command: {
447
+ name: AXPCommonCommandKeys.Versioning.DeleteDraft,
448
+ options: {
449
+ refId: '{{ context.eval("id") }}',
450
+ refType: hostRefType,
451
+ },
452
+ },
453
+ priority: 'secondary',
454
+ type: 'delete',
455
+ scope: AXPEntityCommandScope.Individual,
456
+ hidden: hiddenWhenNotEnabled,
457
+ });
458
+ }
459
+ };
460
+ addActions(listActions);
461
+ addActions(singleActions);
462
+ return interfaces;
463
+ });
464
+ },
465
+ };
466
+ //#endregion
467
+
468
+ class AXPVersioningPluginModule {
469
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
470
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPluginModule }); }
471
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPluginModule, providers: [
472
+ { provide: AXP_ENTITY_ACTION_PLUGIN, multi: true, useValue: versioningPlugin },
473
+ provideCommandSetups([
474
+ {
475
+ key: AXPCommonCommandKeys.Versioning.CreateDraft,
476
+ command: () => import('./acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs').then((m) => m.AXPCreateEntityVersionDraftCommand),
477
+ },
478
+ {
479
+ key: AXPCommonCommandKeys.Versioning.Publish,
480
+ command: () => import('./acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs').then((m) => m.AXPPublishEntityVersionCommand),
481
+ },
482
+ {
483
+ key: AXPCommonCommandKeys.Versioning.DeleteDraft,
484
+ command: () => import('./acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs').then((m) => m.AXPDeleteEntityVersionDraftCommand),
485
+ },
486
+ ]),
487
+ ] }); }
488
+ }
489
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningPluginModule, decorators: [{
490
+ type: NgModule,
491
+ args: [{
492
+ providers: [
493
+ { provide: AXP_ENTITY_ACTION_PLUGIN, multi: true, useValue: versioningPlugin },
494
+ provideCommandSetups([
495
+ {
496
+ key: AXPCommonCommandKeys.Versioning.CreateDraft,
497
+ command: () => import('./acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs').then((m) => m.AXPCreateEntityVersionDraftCommand),
498
+ },
499
+ {
500
+ key: AXPCommonCommandKeys.Versioning.Publish,
501
+ command: () => import('./acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs').then((m) => m.AXPPublishEntityVersionCommand),
502
+ },
503
+ {
504
+ key: AXPCommonCommandKeys.Versioning.DeleteDraft,
505
+ command: () => import('./acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs').then((m) => m.AXPDeleteEntityVersionDraftCommand),
506
+ },
507
+ ]),
508
+ ],
509
+ }]
510
+ }] });
511
+
317
512
  /** Component key used when display is 'page'. Register via AXP_PAGE_COMPONENT_PROVIDER. */
318
513
  const HISTORY_PAGE_COMPONENT_KEY = 'entity-version-history-page';
319
514
  const DEFAULT_COLUMN_WIDTH = '180px';
@@ -521,7 +716,7 @@ class ShowVersionHistoryPopupCommand {
521
716
  },
522
717
  };
523
718
  }
524
- const comp = (await import('./acorex-platform-module-common-client-timeline-version-history-popup.component-DDpyY7mO.mjs')).AXMTimelineVersionHistoryPopupComponent;
719
+ const comp = (await import('./acorex-platform-module-common-client-timeline-version-history-popup.component-ysTJlOCx.mjs')).AXMTimelineVersionHistoryPopupComponent;
525
720
  this.popupService.open(comp, {
526
721
  title: await this.translate.translateAsync('@activity-log:actions.view-history.title'),
527
722
  data: {
@@ -593,7 +788,7 @@ const AXPHistoryAuditInfoWidget = {
593
788
  component: () => import('./acorex-platform-module-common-client-audit-info-edit.component-COMMBgsX.mjs').then((c) => c.AXPAuditInfoEditComponent),
594
789
  },
595
790
  column: {
596
- component: () => import('./acorex-platform-module-common-client-audit-info-column.component-tMlIVjiu.mjs').then((c) => c.AXPAuditInfoColumnComponent),
791
+ component: () => import('./acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs').then((c) => c.AXPAuditInfoColumnComponent),
597
792
  },
598
793
  },
599
794
  };
@@ -1041,15 +1236,26 @@ function formatObjectDisplay(value, locale) {
1041
1236
  return undefined;
1042
1237
  }
1043
1238
  /** Converts a value to a short display string for notification-style summary. */
1044
- function toShortDisplayString(val, meta, side, locale = 'en-US') {
1239
+ function toShortDisplayString(val, meta, side, locale = 'en-US', path) {
1240
+ const kindFile = meta?.['kind'] === 'file';
1241
+ const pathFile = !!path && /(^|\/)(avatar|logo|image|photo|attachments?|files?|fileId|fileInfo)(\/|$)/i.test(path);
1242
+ const hideFileId = (text) => {
1243
+ const trimmed = text.trim();
1244
+ const opaque = /^file:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(trimmed) ||
1245
+ /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(trimmed);
1246
+ if ((kindFile || pathFile) && opaque) {
1247
+ return locale.startsWith('fa') ? 'تصویر' : 'Image';
1248
+ }
1249
+ return trimDisplay(text);
1250
+ };
1045
1251
  if (side === 'old' && typeof meta?.['displayOld'] === 'string' && meta['displayOld'].trim()) {
1046
- return trimDisplay(meta['displayOld']);
1252
+ return hideFileId(meta['displayOld']);
1047
1253
  }
1048
1254
  if (side === 'new' && typeof meta?.['displayNew'] === 'string' && meta['displayNew'].trim()) {
1049
- return trimDisplay(meta['displayNew']);
1255
+ return hideFileId(meta['displayNew']);
1050
1256
  }
1051
1257
  if (typeof meta?.['fileName'] === 'string' && meta['fileName'].trim()) {
1052
- return trimDisplay(meta['fileName']);
1258
+ return hideFileId(meta['fileName']);
1053
1259
  }
1054
1260
  if (val == null)
1055
1261
  return '—';
@@ -1062,13 +1268,13 @@ function toShortDisplayString(val, meta, side, locale = 'en-US') {
1062
1268
  if (typeof val === 'string') {
1063
1269
  if (!val.trim() || val === '[object Object]')
1064
1270
  return '—';
1065
- return trimDisplay(val);
1271
+ return hideFileId(val);
1066
1272
  }
1067
1273
  if (Array.isArray(val)) {
1068
1274
  if (val.length === 0)
1069
1275
  return '—';
1070
1276
  const parts = val
1071
- .map((item) => toShortDisplayString(item, null, undefined, locale))
1277
+ .map((item) => toShortDisplayString(item, null, undefined, locale, path))
1072
1278
  .filter((part) => part && part !== '—');
1073
1279
  return parts.length ? trimDisplay(parts.join(', ')) : '—';
1074
1280
  }
@@ -1087,9 +1293,9 @@ function trimDisplay(value) {
1087
1293
  return value;
1088
1294
  }
1089
1295
  /** Builds a short, human-readable notification-style summary for a change. */
1090
- function buildChangeSummary(op, oldVal, newVal, meta, locale = 'en-US') {
1091
- const oldStr = toShortDisplayString(oldVal, meta, 'old', locale);
1092
- const newStr = toShortDisplayString(newVal, meta, 'new', locale);
1296
+ function buildChangeSummary(op, oldVal, newVal, meta, locale = 'en-US', path) {
1297
+ const oldStr = toShortDisplayString(oldVal, meta, 'old', locale, path);
1298
+ const newStr = toShortDisplayString(newVal, meta, 'new', locale, path);
1093
1299
  switch (op) {
1094
1300
  case 'add':
1095
1301
  return newStr !== '—' ? `Added ${newStr}` : 'Added';
@@ -1122,7 +1328,7 @@ function resolveMls(value, locale) {
1122
1328
  return resolveMultiLanguageString(value, locale) || '';
1123
1329
  }
1124
1330
  function mapServerChangeLines(lines, getHistoryLayout, locale) {
1125
- return lines.slice(0, 20).map((line) => {
1331
+ return lines.slice(0, 50).map((line) => {
1126
1332
  const pathStr = line.path;
1127
1333
  const layout = getHistoryLayout?.(pathStr);
1128
1334
  const fieldLabel = resolveMls(line.field, locale);
@@ -1148,7 +1354,7 @@ function mapPatchChanges(rawChanges, fieldTitles, getHistoryLayout, locale) {
1148
1354
  continue;
1149
1355
  seenFields.add(dedupeKey);
1150
1356
  const layout = getHistoryLayout?.(pathStr);
1151
- const summary = buildChangeSummary(c.op, c.oldValue, c.newValue, c.meta, locale);
1357
+ const summary = buildChangeSummary(c.op, c.oldValue, c.newValue, c.meta, locale, pathStr);
1152
1358
  const fallbackDesc = `${humanizeKeyAsFallback(resolvePathKey(c.path))}: ${c.op}`;
1153
1359
  const fieldLabel = (fieldKeyParams?.['name']
1154
1360
  ? humanizeKeyAsFallback(fieldKeyParams['name'])
@@ -2497,7 +2703,7 @@ class AXPClonePluginModule {
2497
2703
  provideCommandSetups([
2498
2704
  {
2499
2705
  key: AXPCommonCommandKeys.Clone.Clone,
2500
- command: () => import('./acorex-platform-module-common-client-clone-entity.command-CcjD0iDW.mjs').then((m) => m.AXPCloneEntityCommand),
2706
+ command: () => import('./acorex-platform-module-common-client-clone-entity.command-UyUOYAxp.mjs').then((m) => m.AXPCloneEntityCommand),
2501
2707
  },
2502
2708
  ]),
2503
2709
  ] }); }
@@ -2510,7 +2716,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2510
2716
  provideCommandSetups([
2511
2717
  {
2512
2718
  key: AXPCommonCommandKeys.Clone.Clone,
2513
- command: () => import('./acorex-platform-module-common-client-clone-entity.command-CcjD0iDW.mjs').then((m) => m.AXPCloneEntityCommand),
2719
+ command: () => import('./acorex-platform-module-common-client-clone-entity.command-UyUOYAxp.mjs').then((m) => m.AXPCloneEntityCommand),
2514
2720
  },
2515
2721
  ]),
2516
2722
  ],
@@ -6064,6 +6270,7 @@ class AXMCommonModule {
6064
6270
  //#endregion
6065
6271
  //#region ---- Status Management Plugins ----
6066
6272
  AXPArchivePluginModule,
6273
+ AXPVersioningPluginModule,
6067
6274
  AXPDisablePluginModule,
6068
6275
  AXPDefaultPluginModule,
6069
6276
  AXPPrimaryPluginModule,
@@ -6154,13 +6361,6 @@ class AXMCommonModule {
6154
6361
  multi: true,
6155
6362
  },
6156
6363
  //#endregion
6157
- //#region ---- Module Manifest Provider ----
6158
- {
6159
- provide: AXP_MODULE_MANIFEST_PROVIDER,
6160
- useValue: CommonManifest,
6161
- multi: true,
6162
- },
6163
- //#endregion
6164
6364
  //#region ---- Feature Definition Provider ----
6165
6365
  {
6166
6366
  provide: AXP_FEATURE_DEFINITION_PROVIDER,
@@ -6202,6 +6402,7 @@ class AXMCommonModule {
6202
6402
  //#endregion
6203
6403
  //#region ---- Status Management Plugins ----
6204
6404
  AXPArchivePluginModule,
6405
+ AXPVersioningPluginModule,
6205
6406
  AXPDisablePluginModule,
6206
6407
  AXPDefaultPluginModule,
6207
6408
  AXPPrimaryPluginModule,
@@ -6243,6 +6444,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
6243
6444
  //#endregion
6244
6445
  //#region ---- Status Management Plugins ----
6245
6446
  AXPArchivePluginModule,
6447
+ AXPVersioningPluginModule,
6246
6448
  AXPDisablePluginModule,
6247
6449
  AXPDefaultPluginModule,
6248
6450
  AXPPrimaryPluginModule,
@@ -6337,13 +6539,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
6337
6539
  multi: true,
6338
6540
  },
6339
6541
  //#endregion
6340
- //#region ---- Module Manifest Provider ----
6341
- {
6342
- provide: AXP_MODULE_MANIFEST_PROVIDER,
6343
- useValue: CommonManifest,
6344
- multi: true,
6345
- },
6346
- //#endregion
6347
6542
  //#region ---- Feature Definition Provider ----
6348
6543
  {
6349
6544
  provide: AXP_FEATURE_DEFINITION_PROVIDER,
@@ -6586,7 +6781,7 @@ class AXPGlobalSearchModule {
6586
6781
  {
6587
6782
  provide: AXP_GLOBAL_SEARCH_CONFIG_TOKEN,
6588
6783
  useValue: {
6589
- window: () => import('./acorex-platform-module-common-client-search-popup.component-CNJmksXt.mjs').then((c) => c.AXPGlobalSearchPopupComponent),
6784
+ window: () => import('./acorex-platform-module-common-client-search-popup.component-j0h_8fec.mjs').then((c) => c.AXPGlobalSearchPopupComponent),
6590
6785
  },
6591
6786
  },
6592
6787
  AXPGlobalSearchCommand,
@@ -6628,7 +6823,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
6628
6823
  {
6629
6824
  provide: AXP_GLOBAL_SEARCH_CONFIG_TOKEN,
6630
6825
  useValue: {
6631
- window: () => import('./acorex-platform-module-common-client-search-popup.component-CNJmksXt.mjs').then((c) => c.AXPGlobalSearchPopupComponent),
6826
+ window: () => import('./acorex-platform-module-common-client-search-popup.component-j0h_8fec.mjs').then((c) => c.AXPGlobalSearchPopupComponent),
6632
6827
  },
6633
6828
  },
6634
6829
  AXPGlobalSearchCommand,
@@ -6851,5 +7046,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
6851
7046
  * Generated bundle index. Do not edit.
6852
7047
  */
6853
7048
 
6854
- export { statusPlugin as $, AXP_ENTITY_ARCHIVE_OVERRIDES as A, StateStatusProvider as B, CommonManifest as C, VariableNameValidationRule as D, aggregateVersionHistoryBarChartItems as E, archivePlugin as F, buildEntityFieldHistoryLineChartSeries as G, HISTORY_PAGE_COMPONENT_KEY as H, buildProductBasePriceHistoryLineChartSeries as I, derivedNamePlugin as J, disablePlugin as K, getActiveStatuses as L, getFinalStatuses as M, getInitialStatuses as N, getStatusByName as O, getTransitionsFromStatus as P, getTransitionsToStatus as Q, historyPlugin as R, ShowVersionHistoryPopupCommand as S, TaskStatusProvider as T, UniqueValidationRule as U, VARIABLE_NAME_VALIDATION_PATTERN as V, humanizeChange as W, isValidTransition as X, mapChangeType as Y, mapOpToAction as Z, resolvePathKey as _, AXPGlobalSearchViewModel as a, uniqueFieldsPlugin as a0, AXMCommonModule as b, AXMMenuProvider as c, AXMSettingProvider as d, AXMVersionHistoryPageComponent as e, AXPArchivePluginModule as f, AXPCommonFeatureDefinitionProvider as g, AXPDerivedNamePluginModule as h, isValidVariableName as i, AXPDisablePluginModule as j, AXPGlobalSearchModule as k, AXPHistoryAuditInfoWidget as l, AXPHistoryModule as m, AXPLockEntityCommand as n, openActivityLogVersionCompare as o, AXPResourceAppointmentPageComponent as p, AXPStatusPluginModule as q, AXPUniqueFieldsPluginModule as r, AXPUnlockEntityCommand as s, toVariableName as t, AXPValidationRulesModule as u, versionEntriesToActivityLogs as v, AXP_GLOBAL_SEARCH_CONFIG_TOKEN as w, AXP_RESOURCE_APPOINTMENT_PAGE_CONFIG as x, ApprovalStatusProvider as y, AtLeastOneOfValidationRule as z };
6855
- //# sourceMappingURL=acorex-platform-module-common-client-acorex-platform-module-common-client-BmGXSWg4.mjs.map
7049
+ export { statusPlugin as $, AXP_ENTITY_ARCHIVE_OVERRIDES as A, AtLeastOneOfValidationRule as B, StateStatusProvider as C, VariableNameValidationRule as D, aggregateVersionHistoryBarChartItems as E, archivePlugin as F, buildEntityFieldHistoryLineChartSeries as G, HISTORY_PAGE_COMPONENT_KEY as H, buildProductBasePriceHistoryLineChartSeries as I, derivedNamePlugin as J, disablePlugin as K, getActiveStatuses as L, getFinalStatuses as M, getInitialStatuses as N, getStatusByName as O, getTransitionsFromStatus as P, getTransitionsToStatus as Q, historyPlugin as R, ShowVersionHistoryPopupCommand as S, TaskStatusProvider as T, UniqueValidationRule as U, VARIABLE_NAME_VALIDATION_PATTERN as V, humanizeChange as W, isValidTransition as X, mapChangeType as Y, mapOpToAction as Z, resolvePathKey as _, AXPGlobalSearchViewModel as a, uniqueFieldsPlugin as a0, versioningPlugin as a1, AXMCommonModule as b, AXMMenuProvider as c, AXMSettingProvider as d, AXMVersionHistoryPageComponent as e, AXPArchivePluginModule as f, AXPCommonFeatureDefinitionProvider as g, AXPDerivedNamePluginModule as h, isValidVariableName as i, AXPDisablePluginModule as j, AXPGlobalSearchModule as k, AXPHistoryAuditInfoWidget as l, AXPHistoryModule as m, AXPLockEntityCommand as n, openActivityLogVersionCompare as o, AXPResourceAppointmentPageComponent as p, AXPStatusPluginModule as q, AXPUniqueFieldsPluginModule as r, AXPUnlockEntityCommand as s, toVariableName as t, AXPValidationRulesModule as u, versionEntriesToActivityLogs as v, AXPVersioningPluginModule as w, AXP_GLOBAL_SEARCH_CONFIG_TOKEN as x, AXP_RESOURCE_APPOINTMENT_PAGE_CONFIG as y, ApprovalStatusProvider as z };
7050
+ //# sourceMappingURL=acorex-platform-module-common-client-acorex-platform-module-common-client-BzK6gnbq.mjs.map