@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,7 +1,7 @@
1
1
  import { AXTranslationService } from '@acorex/core/translation';
2
2
  import * as i0 from '@angular/core';
3
3
  import { inject, Injectable } from '@angular/core';
4
- import { A as AXPArchiveEntityCommandHelper, n as normalizeArchiveSingleInput, b as buildArchivePatch, a as buildArchiveRefreshMeta } from './acorex-platform-module-common-client-archive-entity.command.util-DrW2EjNj.mjs';
4
+ import { A as AXPArchiveEntityCommandHelper, n as normalizeArchiveSingleInput, b as buildArchivePatch, a as buildArchiveRefreshMeta } from './acorex-platform-module-common-client-archive-entity.command.util-DgnEcrDL.mjs';
5
5
 
6
6
  class AXPArchiveEntityCommand {
7
7
  constructor() {
@@ -48,4 +48,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
48
48
  }] });
49
49
 
50
50
  export { AXPArchiveEntityCommand };
51
- //# sourceMappingURL=acorex-platform-module-common-client-archive-entity.command-D0TFxo2b.mjs.map
51
+ //# sourceMappingURL=acorex-platform-module-common-client-archive-entity.command-P-8WPEaC.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-archive-entity.command-D0TFxo2b.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/archive-plugin/commands/archive-entity.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPArchiveEntityCommandHelper } from './archive-entity.command.helper';\nimport { buildArchivePatch, buildArchiveRefreshMeta, normalizeArchiveSingleInput } from './archive-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPArchiveEntityCommand implements AXPCommand<AXPContextData, void> {\n private readonly helper = inject(AXPArchiveEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(input: AXPContextData): AXPCommandExecuteResultPromise<void> {\n const context = normalizeArchiveSingleInput(input);\n if (!context) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n const confirmed = await this.helper.confirm(\n '@general:actions.archive.confirm.title',\n '@general:actions.archive.confirm.message',\n );\n if (!confirmed) {\n return { success: false };\n }\n\n const loadingDialog = this.helper.showLoading(\n await this.translationService.translateAsync('@general:actions.archive.confirm.processing'),\n 'Archiving...',\n );\n\n try {\n const entityDefinition = await this.helper.resolveEntity(context.refType);\n const patch = buildArchivePatch(true);\n await this.helper.applyPatch(context.refType, context.refId, patch);\n\n const meta = buildArchiveRefreshMeta(entityDefinition, context.rowData);\n this.helper.dispatchArchived(context.refType, context.refId, meta);\n loadingDialog.close();\n await this.helper.showSuccessToast(\n '@general:workflow.entity-archived',\n '@general:workflow.entity-archived-body',\n );\n\n return { success: true, kind: 'object', data: undefined, metadata: { refresh: false } };\n } catch (error) {\n loadingDialog.close();\n await this.helper.showErrorToastFor(error, '@general:messages.generic.error.description');\n return { success: false };\n }\n }\n}\n"],"names":[],"mappings":";;;;;MASa,uBAAuB,CAAA;AADpC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAC9C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AA8CnE,IAAA;IA5CC,MAAM,OAAO,CAAC,KAAqB,EAAA;AACjC,QAAA,MAAM,OAAO,GAAG,2BAA2B,CAAC,KAAK,CAAC;QAClD,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,uCAAuC,CAAC;AAC5F,iBAAA;aACF;QACH;AAEA,QAAA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CACzC,wCAAwC,EACxC,0CAA0C,CAC3C;QACD,IAAI,CAAC,SAAS,EAAE;AACd,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3B;QAEA,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAC3C,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc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,cADV,MAAM,EAAA,CAAA,CAAA;;2FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
1
+ {"version":3,"file":"acorex-platform-module-common-client-archive-entity.command-P-8WPEaC.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/archive-plugin/commands/archive-entity.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPArchiveEntityCommandHelper } from './archive-entity.command.helper';\nimport { buildArchivePatch, buildArchiveRefreshMeta, normalizeArchiveSingleInput } from './archive-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPArchiveEntityCommand implements AXPCommand<AXPContextData, void> {\n private readonly helper = inject(AXPArchiveEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(input: AXPContextData): AXPCommandExecuteResultPromise<void> {\n const context = normalizeArchiveSingleInput(input);\n if (!context) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n const confirmed = await this.helper.confirm(\n '@general:actions.archive.confirm.title',\n '@general:actions.archive.confirm.message',\n );\n if (!confirmed) {\n return { success: false };\n }\n\n const loadingDialog = this.helper.showLoading(\n await this.translationService.translateAsync('@general:actions.archive.confirm.processing'),\n 'Archiving...',\n );\n\n try {\n const entityDefinition = await this.helper.resolveEntity(context.refType);\n const patch = buildArchivePatch(true);\n await this.helper.applyPatch(context.refType, context.refId, patch);\n\n const meta = buildArchiveRefreshMeta(entityDefinition, context.rowData);\n this.helper.dispatchArchived(context.refType, context.refId, meta);\n loadingDialog.close();\n await this.helper.showSuccessToast(\n '@general:workflow.entity-archived',\n '@general:workflow.entity-archived-body',\n );\n\n return { success: true, kind: 'object', data: undefined, metadata: { refresh: false } };\n } catch (error) {\n loadingDialog.close();\n await this.helper.showErrorToastFor(error, '@general:messages.generic.error.description');\n return { success: false };\n }\n }\n}\n"],"names":[],"mappings":";;;;;MASa,uBAAuB,CAAA;AADpC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAC9C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AA8CnE,IAAA;IA5CC,MAAM,OAAO,CAAC,KAAqB,EAAA;AACjC,QAAA,MAAM,OAAO,GAAG,2BAA2B,CAAC,KAAK,CAAC;QAClD,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,uCAAuC,CAAC;AAC5F,iBAAA;aACF;QACH;AAEA,QAAA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CACzC,wCAAwC,EACxC,0CAA0C,CAC3C;QACD,IAAI,CAAC,SAAS,EAAE;AACd,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3B;QAEA,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAC3C,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,6CAA6C,CAAC,EAC3F,cAAc,CACf;AAED,QAAA,IAAI;AACF,YAAA,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC;AACzE,YAAA,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,CAAC;AACrC,YAAA,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;YAEnE,MAAM,IAAI,GAAG,uBAAuB,CAAC,gBAAgB,EAAE,OAAO,CAAC,OAAO,CAAC;AACvE,YAAA,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC;YAClE,aAAa,CAAC,KAAK,EAAE;YACrB,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAChC,mCAAmC,EACnC,wCAAwC,CACzC;YAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;QACzF;QAAE,OAAO,KAAK,EAAE;YACd,aAAa,CAAC,KAAK,EAAE;YACrB,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,KAAK,EAAE,6CAA6C,CAAC;AACzF,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3B;IACF;8GA/CW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cADV,MAAM,EAAA,CAAA,CAAA;;2FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -7,7 +7,7 @@ import { AXPEntityBroadcastService } from '@acorex-platform/framework-client/cor
7
7
  import { AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';
8
8
  import * as i0 from '@angular/core';
9
9
  import { inject, Injectable } from '@angular/core';
10
- import { A as AXP_ENTITY_ARCHIVE_OVERRIDES } from './acorex-platform-module-common-client-acorex-platform-module-common-client-BmGXSWg4.mjs';
10
+ import { A as AXP_ENTITY_ARCHIVE_OVERRIDES } from './acorex-platform-module-common-client-acorex-platform-module-common-client-BzK6gnbq.mjs';
11
11
  import { resolveEntityActionRef, resolveEntityActionBulkRef } from '@acorex-platform/framework-shared/runtime';
12
12
 
13
13
  /**
@@ -153,4 +153,4 @@ function buildArchiveRefreshMeta(entityDefinition, rowData) {
153
153
  }
154
154
 
155
155
  export { AXPArchiveEntityCommandHelper as A, buildArchiveRefreshMeta as a, buildArchivePatch as b, normalizeArchiveBulkInput as c, normalizeArchiveSingleInput as n };
156
- //# sourceMappingURL=acorex-platform-module-common-client-archive-entity.command.util-DrW2EjNj.mjs.map
156
+ //# sourceMappingURL=acorex-platform-module-common-client-archive-entity.command.util-DgnEcrDL.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-archive-entity.command.util-DrW2EjNj.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/archive-plugin/commands/archive-entity.command.helper.ts","../../../../libs/modules/common/client/src/lib/features/archive-plugin/commands/archive-entity.command.util.ts"],"sourcesContent":["import { AXDialogService } from '@acorex/components/dialog';\nimport { AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport {\n AXPCommonSettings,\n AXPSettingsService,\n extractRequestErrorInfo,\n platformErrorI18nKey,\n throwIfCommandFailed,\n} from '@acorex-platform/framework-client/common';\nimport { AXPEntityBroadcastService } from '@acorex-platform/framework-client/core';\nimport { AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';\nimport type { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXP_ENTITY_ARCHIVE_OVERRIDES } from '../archive-entity.override';\n\n/**\n * Injectable helper for archive commands: confirmation UI, persistence, toasts, and refresh events.\n * Pure input/patch logic lives in {@link archive-entity.command.util}.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPArchiveEntityCommandHelper {\n private readonly entityRegistry = inject(AXPEntityDefinitionRegistryService);\n private readonly dialogService = inject(AXDialogService);\n private readonly loadingDialog = inject(AXLoadingDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly entityEvents = inject(AXPEntityBroadcastService);\n private readonly archiveOverrides = inject(AXP_ENTITY_ARCHIVE_OVERRIDES, { optional: true }) ?? [];\n\n async resolveEntity(refType: string): Promise<AXPEntity> {\n const [moduleName, entityName] = refType.split('.');\n return this.entityRegistry.resolve(moduleName, entityName);\n }\n\n async applyPatch(refType: string, refId: string, patch: AXPContextData): Promise<void> {\n const override = this.archiveOverrides.find((entry) => entry.refType === refType);\n if (override) {\n const archived = patch['isArchived'] === true;\n if (archived) {\n await override.archive(refId);\n } else {\n await override.restore(refId);\n }\n return;\n }\n\n const entityDefinition = await this.resolveEntity(refType);\n const updateExec = entityDefinition.commands?.update?.execute as\n | ((payload: AXPContextData) => Promise<unknown>)\n | undefined;\n\n if (!updateExec) {\n throw new Error('Entity does not support update operation');\n }\n\n const result = await updateExec({ id: refId, ...patch });\n throwIfCommandFailed(result);\n }\n\n async confirm(titleKey: string, messageKey: string, messageParams?: AXPContextData): Promise<boolean> {\n const dialogResult = await this.dialogService.confirm(\n await this.translationService.translateAsync(titleKey),\n await this.translationService.translateAsync(messageKey, { params: messageParams }),\n 'warning',\n 'horizontal',\n false,\n 'cancel',\n );\n return dialogResult.result === true;\n }\n\n showLoading(title: string, status: string) {\n return this.loadingDialog.show({\n title,\n mode: 'indeterminate',\n status,\n });\n }\n\n async showSuccessToast(titleKey: string, contentKey?: string): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled) {\n return;\n }\n\n this.toastService.show({\n color: 'success',\n title: await this.translationService.translateAsync(titleKey),\n content: contentKey ? await this.translationService.translateAsync(contentKey) : undefined,\n });\n }\n\n async showErrorToastFor(error: unknown, fallbackKey: string): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled) {\n return;\n }\n\n const info = extractRequestErrorInfo(error);\n const contentKey =\n platformErrorI18nKey(info?.code) ??\n (typeof info?.message === 'string' && info.message.startsWith('@')\n ? info.message\n : null) ??\n fallbackKey;\n const content = contentKey.startsWith('@')\n ? await this.translationService.translateAsync(contentKey)\n : contentKey;\n\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content,\n closeButton: true,\n timeOut: 6000,\n timeOutProgress: true,\n });\n }\n\n dispatchArchived(refType: string, id: string, meta?: AXPContextData): void {\n this.entityEvents.publishLayoutRefresh(refType, meta as Record<string, unknown> | undefined);\n }\n\n dispatchUnarchived(refType: string, id: string, meta?: AXPContextData): void {\n this.entityEvents.publishLayoutRefresh(refType, meta as Record<string, unknown> | undefined);\n }\n\n dispatchBulkArchived(refType: string, ids: string[], meta?: AXPContextData): void {\n this.entityEvents.publishLayoutRefresh(refType, { refreshType: 'bulk-archive', ...(meta ?? {}) });\n }\n\n dispatchBulkUnarchived(refType: string, ids: string[], meta?: AXPContextData): void {\n this.entityEvents.publishLayoutRefresh(refType, { refreshType: 'bulk-unarchive', ...(meta ?? {}) });\n }\n}\n","import type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { resolveEntityActionBulkRef, resolveEntityActionRef } from '@acorex-platform/framework-shared/runtime';\n\nexport const DEFAULT_ARCHIVE_FIELD = 'isArchived';\nexport const ARCHIVE_TIMESTAMP_FIELD = 'archivedAt';\n\nexport interface AXPArchiveCommandContext {\n refId: string;\n refType: string;\n rowData?: AXPContextData;\n}\n\nexport interface AXPBulkArchiveCommandContext {\n refType: string;\n ids: string[];\n rows: AXPContextData[];\n}\n\nexport function normalizeArchiveSingleInput(input: AXPContextData): AXPArchiveCommandContext | null {\n const resolved = resolveEntityActionRef(input);\n if (!resolved) {\n return null;\n }\n\n return {\n refId: resolved.refId,\n refType: resolved.refType,\n rowData: resolved.rowData as AXPContextData | undefined,\n };\n}\n\nexport function normalizeArchiveBulkInput(input: AXPContextData): AXPBulkArchiveCommandContext | null {\n const resolved = resolveEntityActionBulkRef(input);\n if (!resolved) {\n return null;\n }\n\n return {\n refType: resolved.refType,\n ids: resolved.ids,\n rows: resolved.rows as AXPContextData[],\n };\n}\n\nexport function buildArchivePatch(archived: boolean): AXPContextData {\n if (archived) {\n return { [DEFAULT_ARCHIVE_FIELD]: true, [ARCHIVE_TIMESTAMP_FIELD]: new Date() };\n }\n return { [DEFAULT_ARCHIVE_FIELD]: false, [ARCHIVE_TIMESTAMP_FIELD]: null };\n}\n\nexport function buildArchiveRefreshMeta(\n entityDefinition: AXPEntity,\n rowData?: AXPContextData,\n): AXPContextData {\n const meta: AXPContextData = {};\n if (entityDefinition.parentKey && rowData?.[entityDefinition.parentKey] != null) {\n meta['refreshTargetId'] = rowData[entityDefinition.parentKey];\n }\n return meta;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAmBA;;;AAGG;MAEU,6BAA6B,CAAA;AAD1C,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,kCAAkC,CAAC;AAC3D,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAC9C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,YAAY,GAA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AE;AACZ,QAAA,OAAO,EAAE,CAAC,qBAAqB,GAAG,IAAI,EAAE,CAAC,uBAAuB,GAAG,IAAI,IAAI,EAAE,EAAE;IACjF;AACA,IAAA,OAAO,EAAE,CAAC,qBAAqB,GAAG,KAAK,EAAE,CAAC,uBAAuB,GAAG,IAAI,EAAE;AAC5E;AAEM,SAAU,uBAAuB,CACrC,gBAA2B,EAC3B,OAAwB,EAAA;IAExB,MAAM,IAAI,GAAmB,EAAE;AAC/B,IAAA,IAAI,gBAAgB,CAAC,SAAS,IAAI,OAAO,GAAG,gBAAgB,CAAC,SAAS,CAAC,IAAI,IAAI,EAAE;QAC/E,IAAI,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,SAAS,CAAC;IAC/D;AACA,IAAA,OAAO,IAAI;AACb;;"}
1
+ {"version":3,"file":"acorex-platform-module-common-client-archive-entity.command.util-DgnEcrDL.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/archive-plugin/commands/archive-entity.command.helper.ts","../../../../libs/modules/common/client/src/lib/features/archive-plugin/commands/archive-entity.command.util.ts"],"sourcesContent":["import { AXDialogService } from '@acorex/components/dialog';\nimport { AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport {\n AXPCommonSettings,\n AXPSettingsService,\n extractRequestErrorInfo,\n platformErrorI18nKey,\n throwIfCommandFailed,\n} from '@acorex-platform/framework-client/common';\nimport { AXPEntityBroadcastService } from '@acorex-platform/framework-client/core';\nimport { AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';\nimport type { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXP_ENTITY_ARCHIVE_OVERRIDES } from '../archive-entity.override';\n\n/**\n * Injectable helper for archive commands: confirmation UI, persistence, toasts, and refresh events.\n * Pure input/patch logic lives in {@link archive-entity.command.util}.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPArchiveEntityCommandHelper {\n private readonly entityRegistry = inject(AXPEntityDefinitionRegistryService);\n private readonly dialogService = inject(AXDialogService);\n private readonly loadingDialog = inject(AXLoadingDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly entityEvents = inject(AXPEntityBroadcastService);\n private readonly archiveOverrides = inject(AXP_ENTITY_ARCHIVE_OVERRIDES, { optional: true }) ?? [];\n\n async resolveEntity(refType: string): Promise<AXPEntity> {\n const [moduleName, entityName] = refType.split('.');\n return this.entityRegistry.resolve(moduleName, entityName);\n }\n\n async applyPatch(refType: string, refId: string, patch: AXPContextData): Promise<void> {\n const override = this.archiveOverrides.find((entry) => entry.refType === refType);\n if (override) {\n const archived = patch['isArchived'] === true;\n if (archived) {\n await override.archive(refId);\n } else {\n await override.restore(refId);\n }\n return;\n }\n\n const entityDefinition = await this.resolveEntity(refType);\n const updateExec = entityDefinition.commands?.update?.execute as\n | ((payload: AXPContextData) => Promise<unknown>)\n | undefined;\n\n if (!updateExec) {\n throw new Error('Entity does not support update operation');\n }\n\n const result = await updateExec({ id: refId, ...patch });\n throwIfCommandFailed(result);\n }\n\n async confirm(titleKey: string, messageKey: string, messageParams?: AXPContextData): Promise<boolean> {\n const dialogResult = await this.dialogService.confirm(\n await this.translationService.translateAsync(titleKey),\n await this.translationService.translateAsync(messageKey, { params: messageParams }),\n 'warning',\n 'horizontal',\n false,\n 'cancel',\n );\n return dialogResult.result === true;\n }\n\n showLoading(title: string, status: string) {\n return this.loadingDialog.show({\n title,\n mode: 'indeterminate',\n status,\n });\n }\n\n async showSuccessToast(titleKey: string, contentKey?: string): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled) {\n return;\n }\n\n this.toastService.show({\n color: 'success',\n title: await this.translationService.translateAsync(titleKey),\n content: contentKey ? await this.translationService.translateAsync(contentKey) : undefined,\n });\n }\n\n async showErrorToastFor(error: unknown, fallbackKey: string): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled) {\n return;\n }\n\n const info = extractRequestErrorInfo(error);\n const contentKey =\n platformErrorI18nKey(info?.code) ??\n (typeof info?.message === 'string' && info.message.startsWith('@')\n ? info.message\n : null) ??\n fallbackKey;\n const content = contentKey.startsWith('@')\n ? await this.translationService.translateAsync(contentKey)\n : contentKey;\n\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content,\n closeButton: true,\n timeOut: 6000,\n timeOutProgress: true,\n });\n }\n\n dispatchArchived(refType: string, id: string, meta?: AXPContextData): void {\n this.entityEvents.publishLayoutRefresh(refType, meta as Record<string, unknown> | undefined);\n }\n\n dispatchUnarchived(refType: string, id: string, meta?: AXPContextData): void {\n this.entityEvents.publishLayoutRefresh(refType, meta as Record<string, unknown> | undefined);\n }\n\n dispatchBulkArchived(refType: string, ids: string[], meta?: AXPContextData): void {\n this.entityEvents.publishLayoutRefresh(refType, { refreshType: 'bulk-archive', ...(meta ?? {}) });\n }\n\n dispatchBulkUnarchived(refType: string, ids: string[], meta?: AXPContextData): void {\n this.entityEvents.publishLayoutRefresh(refType, { refreshType: 'bulk-unarchive', ...(meta ?? {}) });\n }\n}\n","import type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { resolveEntityActionBulkRef, resolveEntityActionRef } from '@acorex-platform/framework-shared/runtime';\n\nexport const DEFAULT_ARCHIVE_FIELD = 'isArchived';\nexport const ARCHIVE_TIMESTAMP_FIELD = 'archivedAt';\n\nexport interface AXPArchiveCommandContext {\n refId: string;\n refType: string;\n rowData?: AXPContextData;\n}\n\nexport interface AXPBulkArchiveCommandContext {\n refType: string;\n ids: string[];\n rows: AXPContextData[];\n}\n\nexport function normalizeArchiveSingleInput(input: AXPContextData): AXPArchiveCommandContext | null {\n const resolved = resolveEntityActionRef(input);\n if (!resolved) {\n return null;\n }\n\n return {\n refId: resolved.refId,\n refType: resolved.refType,\n rowData: resolved.rowData as AXPContextData | undefined,\n };\n}\n\nexport function normalizeArchiveBulkInput(input: AXPContextData): AXPBulkArchiveCommandContext | null {\n const resolved = resolveEntityActionBulkRef(input);\n if (!resolved) {\n return null;\n }\n\n return {\n refType: resolved.refType,\n ids: resolved.ids,\n rows: resolved.rows as AXPContextData[],\n };\n}\n\nexport function buildArchivePatch(archived: boolean): AXPContextData {\n if (archived) {\n return { [DEFAULT_ARCHIVE_FIELD]: true, [ARCHIVE_TIMESTAMP_FIELD]: new Date() };\n }\n return { [DEFAULT_ARCHIVE_FIELD]: false, [ARCHIVE_TIMESTAMP_FIELD]: null };\n}\n\nexport function buildArchiveRefreshMeta(\n entityDefinition: AXPEntity,\n rowData?: AXPContextData,\n): AXPContextData {\n const meta: AXPContextData = {};\n if (entityDefinition.parentKey && rowData?.[entityDefinition.parentKey] != null) {\n meta['refreshTargetId'] = rowData[entityDefinition.parentKey];\n }\n return meta;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAmBA;;;AAGG;MAEU,6BAA6B,CAAA;AAD1C,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,kCAAkC,CAAC;AAC3D,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAC9C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,yB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AAO,EAAE,CAAC,qBAAqB,GAAG,IAAI,EAAE,CAAC,uBAAuB,GAAG,IAAI,IAAI,EAAE,EAAE;IACjF;AACA,IAAA,OAAO,EAAE,CAAC,qBAAqB,GAAG,KAAK,EAAE,CAAC,uBAAuB,GAAG,IAAI,EAAE;AAC5E;AAEM,SAAU,uBAAuB,CACrC,gBAA2B,EAC3B,OAAwB,EAAA;IAExB,MAAM,IAAI,GAAmB,EAAE;AAC/B,IAAA,IAAI,gBAAgB,CAAC,SAAS,IAAI,OAAO,GAAG,gBAAgB,CAAC,SAAS,CAAC,IAAI,IAAI,EAAE;QAC/E,IAAI,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,SAAS,CAAC;IAC/D;AACA,IAAA,OAAO,IAAI;AACb;;"}
@@ -158,7 +158,7 @@ class AXPAuditInfoColumnComponent extends AXPColumnWidgetComponent {
158
158
  });
159
159
  }
160
160
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPAuditInfoColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
161
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPAuditInfoColumnComponent, isStandalone: true, selector: "axp-audit-info-column", inputs: { rawValue: "rawValue", rowData: "rowData" }, viewQueries: [{ propertyName: "infoButton", first: true, predicate: ["infoButton"], descendants: true, isSignal: true }, { propertyName: "infoPopover", first: true, predicate: ["infoPopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"flex items-center gap-1.5\">\n @if (hasAuditInfo()) {\n <div class=\"flex items-center gap-1.5 cursor-pointer hover:opacity-80 transition-opacity\"\n (click)=\"showInfo()\" [title]=\"displayText()\" #infoButton>\n <i class=\"fa-light fa-calendar-circle-exclamation\"></i>\n <span class=\"text-xs\" [dir]=\"'ltr'\">{{ displayDate() }}</span>\n </div>\n } @else {\n <span class=\"text-muted\">---</span>\n }\n</div>\n\n<!-- Audit Info Popover -->\n<ax-popover [openOn]=\"'manual'\" #infoPopover (openChange)=\"onPopoverOpenChange($event)\" [adaptivityEnabled]=\"true\">\n <div class=\"lightest-surface border rounded-lg shadow-lg p-3 min-w-[280px]\">\n <div class=\"mb-3 pb-2 border-b\">\n <h3 class=\"text-sm font-semibold\">\n {{ '@general:terms.audit.section-title' | translate | async }}\n </h3>\n </div>\n <div class=\"space-y-2.5\">\n <!-- Created -->\n @if (createdEvent()) {\n <div>\n <div class=\"text-xs mb-1 font-semibold\">\n {{ '@general:terms.audit.created' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (createdEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(createdEvent()?.at)) }}</span>\n @if (createdEvent()?.by) {\n <span class=\"text-muted\"> \u2022 {{ formatUser($safeNavigationMigration(createdEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (createdEvent()?.reason) {\n <div class=\"text-muted\">{{ createdEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n\n <!-- Updated -->\n @if (updatedEvent()) {\n <div>\n <div class=\"text-xs mb-1 font-semibold\">\n {{ '@general:terms.audit.updated' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (updatedEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(updatedEvent()?.at)) }}</span>\n @if (updatedEvent()?.by) {\n <span class=\"text-muted\"> \u2022 {{ formatUser($safeNavigationMigration(updatedEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (updatedEvent()?.reason) {\n <div class=\"text-muted\">{{ updatedEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n\n <!-- Deleted -->\n @if (deletedEvent()) {\n <div>\n <div class=\"text-xs text-muted mb-1 font-semibold\">\n {{ '@general:terms.audit.deleted' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (deletedEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(deletedEvent()?.at)) }}</span>\n @if (deletedEvent()?.by) {\n <span class=\"text-muted\"> \u2022 {{ formatUser($safeNavigationMigration(deletedEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (deletedEvent()?.reason) {\n <div class=\"text-muted\">{{ deletedEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n </div>\n @if (hasHistoryPlugin()) {\n <div class=\"mt-3 pt-3 border-t ax-sm\">\n <ax-button [text]=\"'@general:terms.audit.history' | translate | async\" (click)=\"showHistory()\" class=\"w-full\">\n </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2$1.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "visualContextScope", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
161
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPAuditInfoColumnComponent, isStandalone: true, selector: "axp-audit-info-column", inputs: { rawValue: "rawValue", rowData: "rowData" }, viewQueries: [{ propertyName: "infoButton", first: true, predicate: ["infoButton"], descendants: true, isSignal: true }, { propertyName: "infoPopover", first: true, predicate: ["infoPopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"flex items-center gap-1.5\">\n @if (hasAuditInfo()) {\n <div class=\"flex items-center gap-1.5 cursor-pointer hover:opacity-80 transition-opacity\"\n (click)=\"showInfo()\" [title]=\"displayText()\" #infoButton>\n <i class=\"fa-light fa-calendar-circle-exclamation\"></i>\n <span class=\"text-xs\" [dir]=\"'ltr'\">{{ displayDate() }}</span>\n </div>\n } @else {\n <span class=\"text-muted\">---</span>\n }\n</div>\n\n<!-- Audit Info Popover -->\n<ax-popover [openOn]=\"'manual'\" #infoPopover (openChange)=\"onPopoverOpenChange($event)\" [adaptivityEnabled]=\"true\">\n <div class=\"lightest-surface border rounded-lg shadow-lg p-3 min-w-[280px]\">\n <div class=\"mb-3 pb-2 border-b\">\n <h3 class=\"text-sm font-semibold\">\n {{ '@general:terms.audit.section-title' | translate | async }}\n </h3>\n </div>\n <div class=\"space-y-2.5\">\n <!-- Created -->\n @if (createdEvent()) {\n <div>\n <div class=\"text-xs mb-1 font-semibold\">\n {{ '@general:terms.audit.created' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (createdEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(createdEvent()?.at)) }}</span>\n @if (createdEvent()?.by) {\n <span class=\"text-muted\"> \u2022 {{ formatUser($safeNavigationMigration(createdEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (createdEvent()?.reason) {\n <div class=\"text-muted\">{{ createdEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n\n <!-- Updated -->\n @if (updatedEvent()) {\n <div>\n <div class=\"text-xs mb-1 font-semibold\">\n {{ '@general:terms.audit.updated' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (updatedEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(updatedEvent()?.at)) }}</span>\n @if (updatedEvent()?.by) {\n <span class=\"text-muted\"> \u2022 {{ formatUser($safeNavigationMigration(updatedEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (updatedEvent()?.reason) {\n <div class=\"text-muted\">{{ updatedEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n\n <!-- Deleted -->\n @if (deletedEvent()) {\n <div>\n <div class=\"text-xs text-muted mb-1 font-semibold\">\n {{ '@general:terms.audit.deleted' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (deletedEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(deletedEvent()?.at)) }}</span>\n @if (deletedEvent()?.by) {\n <span class=\"text-muted\"> \u2022 {{ formatUser($safeNavigationMigration(deletedEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (deletedEvent()?.reason) {\n <div class=\"text-muted\">{{ deletedEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n </div>\n @if (hasHistoryPlugin()) {\n <div class=\"mt-3 pt-3 border-t ax-sm\">\n <ax-button [text]=\"'@general:terms.audit.history' | translate | async\" (click)=\"showHistory()\" class=\"w-full\">\n </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2$1.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "visualContextScope", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "closeOnNavigation", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
162
162
  }
163
163
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPAuditInfoColumnComponent, decorators: [{
164
164
  type: Component,
@@ -166,4 +166,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
166
166
  }], propDecorators: { infoButton: [{ type: i0.ViewChild, args: ['infoButton', { isSignal: true }] }], infoPopover: [{ type: i0.ViewChild, args: ['infoPopover', { isSignal: true }] }] } });
167
167
 
168
168
  export { AXPAuditInfoColumnComponent };
169
- //# sourceMappingURL=acorex-platform-module-common-client-audit-info-column.component-tMlIVjiu.mjs.map
169
+ //# sourceMappingURL=acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-audit-info-column.component-tMlIVjiu.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/history-plugin/components/audit-info-column.component.ts","../../../../libs/modules/common/client/src/lib/features/history-plugin/components/audit-info-column.component.html"],"sourcesContent":["import { AXPAuditEvent, AXPRecordAuditInfo } from '@acorex-platform/framework-shared/entity';\nimport { AXBadgeModule } from '@acorex/components/badge';\nimport { AXPColumnWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXPopoverComponent, AXPopoverModule } from '@acorex/components/popover';\nimport { AXFormatService } from '@acorex/core/format';\n\nimport { ChangeDetectionStrategy, Component, computed, ElementRef, inject, signal, viewChild } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\n\nconst SHOW_VERSION_HISTORY_POPUP_COMMAND = 'show-version-history-popup';\n\n@Component({\n selector: 'axp-audit-info-column',\n templateUrl: './audit-info-column.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, AXBadgeModule, AXButtonModule, AXPopoverModule, AXTranslationModule],\n inputs: ['rawValue', 'rowData'],\n})\nexport class AXPAuditInfoColumnComponent extends AXPColumnWidgetComponent<AXPRecordAuditInfo> {\n //#region ---- Dependencies ----\n\n private readonly formatService = inject(AXFormatService);\n private readonly commandService = inject(AXPCommandService);\n\n //#endregion\n\n //#region ---- View Children ----\n\n protected infoButton = viewChild<ElementRef>('infoButton');\n protected infoPopover = viewChild<AXPopoverComponent>('infoPopover');\n\n //#endregion\n\n //#region ---- Properties ----\n\n protected host = inject(ElementRef);\n protected isPopoverOpen = signal(false);\n\n //#endregion\n\n //#region ---- Computed Properties ----\n\n protected auditInfo = computed<AXPRecordAuditInfo | null>(() => {\n const value = this.rawValue;\n return value && typeof value === 'object' ? (value as AXPRecordAuditInfo) : null;\n });\n\n protected displayText = computed<string>(() => {\n const info = this.auditInfo();\n if (!info) {\n return '---';\n }\n\n if (info.updated?.at) {\n return this.formatAuditEvent(info.updated, 'updated');\n } else if (info.created?.at) {\n return this.formatAuditEvent(info.created, 'created');\n }\n\n return '---';\n });\n\n protected displayDate = computed<string>(() => {\n const info = this.auditInfo();\n if (!info) {\n return '';\n }\n\n if (info.updated?.at) {\n return this.formatDate(info.updated.at);\n } else if (info.created?.at) {\n return this.formatDate(info.created.at);\n }\n\n return '';\n });\n\n protected hasAuditInfo = computed<boolean>(() => {\n const info = this.auditInfo();\n return !!(info?.created || info?.updated || info?.deleted);\n });\n\n protected createdEvent = computed<AXPAuditEvent | null>(() => {\n return this.auditInfo()?.created ?? null;\n });\n\n protected updatedEvent = computed<AXPAuditEvent | null>(() => {\n return this.auditInfo()?.updated ?? null;\n });\n\n protected deletedEvent = computed<AXPAuditEvent | null>(() => {\n return this.auditInfo()?.deleted ?? null;\n });\n\n //#endregion\n\n //#region ---- Public Methods ----\n\n protected showInfo(): void {\n this.openPopover();\n }\n\n protected onPopoverOpenChange(event: any): void {\n this.isPopoverOpen.set(event);\n }\n\n protected formatDate(date: Date | string | undefined): string {\n if (!date) {\n return '---';\n }\n\n try {\n const dateObj = typeof date === 'string' ? new Date(date) : date;\n return this.formatService.format(dateObj, 'datetime', {\n format: 'short',\n });\n } catch {\n return '---';\n }\n }\n\n protected formatUser(user: any): string {\n if (!user) {\n return '---';\n }\n\n return user.fullName || user.username || user.id || '---';\n }\n\n protected formatAuditEvent(event: AXPAuditEvent, type: 'created' | 'updated' | 'deleted'): string {\n if (!event?.at) {\n return '---';\n }\n\n const dateStr = this.formatDate(event.at);\n const userStr = this.formatUser(event.by);\n return `${dateStr}${userStr !== '---' ? ` by ${userStr}` : ''}`;\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private openPopover(): void {\n if (this.infoPopover() && this.infoButton()) {\n this.infoPopover()!.target = this.infoButton()!.nativeElement;\n this.infoPopover()!.open();\n this.isPopoverOpen.set(true);\n }\n }\n\n protected hasHistoryPlugin = computed<boolean>(() => {\n const hasHistoryPlugin = (this.options as any)?.hasHistoryPlugin ?? false;\n return hasHistoryPlugin && this.commandService.exists(SHOW_VERSION_HISTORY_POPUP_COMMAND);\n });\n\n protected async showHistory(): Promise<void> {\n if (!this.hasHistoryPlugin()) {\n return;\n }\n\n const rowData = this.rowData as Record<string, any>;\n const entityId = rowData?.['id'];\n\n if (!entityId) {\n return;\n }\n\n const entityInfo = (this.options as any)?.entityInfo || rowData?.['__entityInfo'];\n const refType = entityInfo?.source || entityInfo?.refType;\n\n if (!refType) {\n return;\n }\n\n const fieldTitles = entityInfo?.fieldTitles || {};\n\n await this.commandService.execute(SHOW_VERSION_HISTORY_POPUP_COMMAND, {\n options: {\n refId: entityId,\n refType,\n fieldTitles,\n },\n });\n }\n\n //#endregion\n}\n","<div class=\"flex items-center gap-1.5\">\n @if (hasAuditInfo()) {\n <div class=\"flex items-center gap-1.5 cursor-pointer hover:opacity-80 transition-opacity\"\n (click)=\"showInfo()\" [title]=\"displayText()\" #infoButton>\n <i class=\"fa-light fa-calendar-circle-exclamation\"></i>\n <span class=\"text-xs\" [dir]=\"'ltr'\">{{ displayDate() }}</span>\n </div>\n } @else {\n <span class=\"text-muted\">---</span>\n }\n</div>\n\n<!-- Audit Info Popover -->\n<ax-popover [openOn]=\"'manual'\" #infoPopover (openChange)=\"onPopoverOpenChange($event)\" [adaptivityEnabled]=\"true\">\n <div class=\"lightest-surface border rounded-lg shadow-lg p-3 min-w-[280px]\">\n <div class=\"mb-3 pb-2 border-b\">\n <h3 class=\"text-sm font-semibold\">\n {{ '@general:terms.audit.section-title' | translate | async }}\n </h3>\n </div>\n <div class=\"space-y-2.5\">\n <!-- Created -->\n @if (createdEvent()) {\n <div>\n <div class=\"text-xs mb-1 font-semibold\">\n {{ '@general:terms.audit.created' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (createdEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(createdEvent()?.at)) }}</span>\n @if (createdEvent()?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(createdEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (createdEvent()?.reason) {\n <div class=\"text-muted\">{{ createdEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n\n <!-- Updated -->\n @if (updatedEvent()) {\n <div>\n <div class=\"text-xs mb-1 font-semibold\">\n {{ '@general:terms.audit.updated' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (updatedEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(updatedEvent()?.at)) }}</span>\n @if (updatedEvent()?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(updatedEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (updatedEvent()?.reason) {\n <div class=\"text-muted\">{{ updatedEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n\n <!-- Deleted -->\n @if (deletedEvent()) {\n <div>\n <div class=\"text-xs text-muted mb-1 font-semibold\">\n {{ '@general:terms.audit.deleted' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (deletedEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(deletedEvent()?.at)) }}</span>\n @if (deletedEvent()?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(deletedEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (deletedEvent()?.reason) {\n <div class=\"text-muted\">{{ deletedEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n </div>\n @if (hasHistoryPlugin()) {\n <div class=\"mt-3 pt-3 border-t ax-sm\">\n <ax-button [text]=\"'@general:terms.audit.history' | translate | async\" (click)=\"showHistory()\" class=\"w-full\">\n </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;AAYA,MAAM,kCAAkC,GAAG,4BAA4B;AASjE,MAAO,2BAA4B,SAAQ,wBAA4C,CAAA;AAP7F,IAAA,WAAA,GAAA;;;AAUmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;;;QAMjD,IAAA,CAAA,UAAU,GAAG,SAAS,CAAa,YAAY;uFAAC;QAChD,IAAA,CAAA,WAAW,GAAG,SAAS,CAAqB,aAAa;wFAAC;;;AAM1D,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;QACzB,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,KAAK;0FAAC;;;AAM7B,QAAA,IAAA,CAAA,SAAS,GAAG,QAAQ,CAA4B,MAAK;AAC7D,YAAA,MAAM,KAAK,GAAG,IAAI,CA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AA,EAAA,CAAA;kBAPvC,SAAS;+BACE,uBAAuB,EAAA,eAAA,EAEhB,uBAAuB,CAAC,MAAM,WACtC,CAAC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,mBAAmB,CAAC,UACpF,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,k8GAAA,EAAA;AAYc,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,YAAY,qEACH,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
1
+ {"version":3,"file":"acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/history-plugin/components/audit-info-column.component.ts","../../../../libs/modules/common/client/src/lib/features/history-plugin/components/audit-info-column.component.html"],"sourcesContent":["import { AXPAuditEvent, AXPRecordAuditInfo } from '@acorex-platform/framework-shared/entity';\nimport { AXBadgeModule } from '@acorex/components/badge';\nimport { AXPColumnWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXPopoverComponent, AXPopoverModule } from '@acorex/components/popover';\nimport { AXFormatService } from '@acorex/core/format';\n\nimport { ChangeDetectionStrategy, Component, computed, ElementRef, inject, signal, viewChild } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\n\nconst SHOW_VERSION_HISTORY_POPUP_COMMAND = 'show-version-history-popup';\n\n@Component({\n selector: 'axp-audit-info-column',\n templateUrl: './audit-info-column.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, AXBadgeModule, AXButtonModule, AXPopoverModule, AXTranslationModule],\n inputs: ['rawValue', 'rowData'],\n})\nexport class AXPAuditInfoColumnComponent extends AXPColumnWidgetComponent<AXPRecordAuditInfo> {\n //#region ---- Dependencies ----\n\n private readonly formatService = inject(AXFormatService);\n private readonly commandService = inject(AXPCommandService);\n\n //#endregion\n\n //#region ---- View Children ----\n\n protected infoButton = viewChild<ElementRef>('infoButton');\n protected infoPopover = viewChild<AXPopoverComponent>('infoPopover');\n\n //#endregion\n\n //#region ---- Properties ----\n\n protected host = inject(ElementRef);\n protected isPopoverOpen = signal(false);\n\n //#endregion\n\n //#region ---- Computed Properties ----\n\n protected auditInfo = computed<AXPRecordAuditInfo | null>(() => {\n const value = this.rawValue;\n return value && typeof value === 'object' ? (value as AXPRecordAuditInfo) : null;\n });\n\n protected displayText = computed<string>(() => {\n const info = this.auditInfo();\n if (!info) {\n return '---';\n }\n\n if (info.updated?.at) {\n return this.formatAuditEvent(info.updated, 'updated');\n } else if (info.created?.at) {\n return this.formatAuditEvent(info.created, 'created');\n }\n\n return '---';\n });\n\n protected displayDate = computed<string>(() => {\n const info = this.auditInfo();\n if (!info) {\n return '';\n }\n\n if (info.updated?.at) {\n return this.formatDate(info.updated.at);\n } else if (info.created?.at) {\n return this.formatDate(info.created.at);\n }\n\n return '';\n });\n\n protected hasAuditInfo = computed<boolean>(() => {\n const info = this.auditInfo();\n return !!(info?.created || info?.updated || info?.deleted);\n });\n\n protected createdEvent = computed<AXPAuditEvent | null>(() => {\n return this.auditInfo()?.created ?? null;\n });\n\n protected updatedEvent = computed<AXPAuditEvent | null>(() => {\n return this.auditInfo()?.updated ?? null;\n });\n\n protected deletedEvent = computed<AXPAuditEvent | null>(() => {\n return this.auditInfo()?.deleted ?? null;\n });\n\n //#endregion\n\n //#region ---- Public Methods ----\n\n protected showInfo(): void {\n this.openPopover();\n }\n\n protected onPopoverOpenChange(event: any): void {\n this.isPopoverOpen.set(event);\n }\n\n protected formatDate(date: Date | string | undefined): string {\n if (!date) {\n return '---';\n }\n\n try {\n const dateObj = typeof date === 'string' ? new Date(date) : date;\n return this.formatService.format(dateObj, 'datetime', {\n format: 'short',\n });\n } catch {\n return '---';\n }\n }\n\n protected formatUser(user: any): string {\n if (!user) {\n return '---';\n }\n\n return user.fullName || user.username || user.id || '---';\n }\n\n protected formatAuditEvent(event: AXPAuditEvent, type: 'created' | 'updated' | 'deleted'): string {\n if (!event?.at) {\n return '---';\n }\n\n const dateStr = this.formatDate(event.at);\n const userStr = this.formatUser(event.by);\n return `${dateStr}${userStr !== '---' ? ` by ${userStr}` : ''}`;\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private openPopover(): void {\n if (this.infoPopover() && this.infoButton()) {\n this.infoPopover()!.target = this.infoButton()!.nativeElement;\n this.infoPopover()!.open();\n this.isPopoverOpen.set(true);\n }\n }\n\n protected hasHistoryPlugin = computed<boolean>(() => {\n const hasHistoryPlugin = (this.options as any)?.hasHistoryPlugin ?? false;\n return hasHistoryPlugin && this.commandService.exists(SHOW_VERSION_HISTORY_POPUP_COMMAND);\n });\n\n protected async showHistory(): Promise<void> {\n if (!this.hasHistoryPlugin()) {\n return;\n }\n\n const rowData = this.rowData as Record<string, any>;\n const entityId = rowData?.['id'];\n\n if (!entityId) {\n return;\n }\n\n const entityInfo = (this.options as any)?.entityInfo || rowData?.['__entityInfo'];\n const refType = entityInfo?.source || entityInfo?.refType;\n\n if (!refType) {\n return;\n }\n\n const fieldTitles = entityInfo?.fieldTitles || {};\n\n await this.commandService.execute(SHOW_VERSION_HISTORY_POPUP_COMMAND, {\n options: {\n refId: entityId,\n refType,\n fieldTitles,\n },\n });\n }\n\n //#endregion\n}\n","<div class=\"flex items-center gap-1.5\">\n @if (hasAuditInfo()) {\n <div class=\"flex items-center gap-1.5 cursor-pointer hover:opacity-80 transition-opacity\"\n (click)=\"showInfo()\" [title]=\"displayText()\" #infoButton>\n <i class=\"fa-light fa-calendar-circle-exclamation\"></i>\n <span class=\"text-xs\" [dir]=\"'ltr'\">{{ displayDate() }}</span>\n </div>\n } @else {\n <span class=\"text-muted\">---</span>\n }\n</div>\n\n<!-- Audit Info Popover -->\n<ax-popover [openOn]=\"'manual'\" #infoPopover (openChange)=\"onPopoverOpenChange($event)\" [adaptivityEnabled]=\"true\">\n <div class=\"lightest-surface border rounded-lg shadow-lg p-3 min-w-[280px]\">\n <div class=\"mb-3 pb-2 border-b\">\n <h3 class=\"text-sm font-semibold\">\n {{ '@general:terms.audit.section-title' | translate | async }}\n </h3>\n </div>\n <div class=\"space-y-2.5\">\n <!-- Created -->\n @if (createdEvent()) {\n <div>\n <div class=\"text-xs mb-1 font-semibold\">\n {{ '@general:terms.audit.created' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (createdEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(createdEvent()?.at)) }}</span>\n @if (createdEvent()?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(createdEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (createdEvent()?.reason) {\n <div class=\"text-muted\">{{ createdEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n\n <!-- Updated -->\n @if (updatedEvent()) {\n <div>\n <div class=\"text-xs mb-1 font-semibold\">\n {{ '@general:terms.audit.updated' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (updatedEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(updatedEvent()?.at)) }}</span>\n @if (updatedEvent()?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(updatedEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (updatedEvent()?.reason) {\n <div class=\"text-muted\">{{ updatedEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n\n <!-- Deleted -->\n @if (deletedEvent()) {\n <div>\n <div class=\"text-xs text-muted mb-1 font-semibold\">\n {{ '@general:terms.audit.deleted' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (deletedEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(deletedEvent()?.at)) }}</span>\n @if (deletedEvent()?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(deletedEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (deletedEvent()?.reason) {\n <div class=\"text-muted\">{{ deletedEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n </div>\n @if (hasHistoryPlugin()) {\n <div class=\"mt-3 pt-3 border-t ax-sm\">\n <ax-button [text]=\"'@general:terms.audit.history' | translate | async\" (click)=\"showHistory()\" class=\"w-full\">\n </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;AAYA,MAAM,kCAAkC,GAAG,4BAA4B;AASjE,MAAO,2BAA4B,SAAQ,wBAA4C,CAAA;AAP7F,IAAA,WAAA,GAAA;;;AAUmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;;;QAMjD,IAAA,CAAA,UAAU,GAAG,SAAS,CAAa,YAAY;uFAAC;QAChD,IAAA,CAAA,WAAW,GAAG,SAAS,CAAqB,aAAa;wFAAC;;;AAM1D,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;QACzB,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,KAAK;0FAAC;;;AAM7B,QAAA,IAAA,CAAA,SAAS,GAAG,QAAQ,CAA4B,MAAK;AAC7D,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ;AAC3B,YAAA,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,GAAI,KAA4B,GAAG,IAAI;QAClF,CAAC;sFAAC;AAEQ,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAS,MAAK;AAC5C,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;YAC7B,IAAI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AAA;AAYc,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,YAAY,qEACH,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
@@ -3,7 +3,7 @@ import { AXTranslationService } from '@acorex/core/translation';
3
3
  import { AXPEntityBulkPatchPerformService } from '@acorex-platform/framework-client/layout/entity';
4
4
  import * as i0 from '@angular/core';
5
5
  import { inject, Injectable } from '@angular/core';
6
- import { A as AXPArchiveEntityCommandHelper, c as normalizeArchiveBulkInput, b as buildArchivePatch } from './acorex-platform-module-common-client-archive-entity.command.util-DrW2EjNj.mjs';
6
+ import { A as AXPArchiveEntityCommandHelper, c as normalizeArchiveBulkInput, b as buildArchivePatch } from './acorex-platform-module-common-client-archive-entity.command.util-DgnEcrDL.mjs';
7
7
 
8
8
  class AXPBulkArchiveEntityCommand {
9
9
  constructor() {
@@ -63,4 +63,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
63
63
  }] });
64
64
 
65
65
  export { AXPBulkArchiveEntityCommand };
66
- //# sourceMappingURL=acorex-platform-module-common-client-bulk-archive-entity.command-LNJekir_.mjs.map
66
+ //# sourceMappingURL=acorex-platform-module-common-client-bulk-archive-entity.command-njV_WseD.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-bulk-archive-entity.command-LNJekir_.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/archive-plugin/commands/bulk-archive-entity.command.ts"],"sourcesContent":["import { runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPRuntimeCommandResult, type AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityBulkPatchPerformService } from '@acorex-platform/framework-client/layout/entity';\nimport type { AXPBulkCommandResultData } from '@acorex-platform/framework-shared/runtime';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPArchiveEntityCommandHelper } from './archive-entity.command.helper';\nimport { buildArchivePatch, normalizeArchiveBulkInput } from './archive-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPBulkArchiveEntityCommand\n implements AXPCommand<AXPContextData, AXPBulkCommandResultData>\n{\n private readonly helper = inject(AXPArchiveEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n private readonly bulkPatch = inject(AXPEntityBulkPatchPerformService);\n\n async execute(\n input: AXPContextData,\n ): AXPCommandExecuteResultPromise<AXPBulkCommandResultData> {\n const context = normalizeArchiveBulkInput(input);\n if (!context) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n const confirmed = await this.helper.confirm(\n '@general:actions.bulk-archive.confirm.title',\n '@general:actions.bulk-archive.confirm.message',\n { count: context.ids.length },\n );\n if (!confirmed) {\n return { success: false };\n }\n\n const result = await this.bulkPatch.perform({\n entity: context.refType,\n ids: context.ids,\n patch: buildArchivePatch(true),\n loadingTitleKey: '@general:actions.bulk-archive.confirm.processing',\n successTitleKey: '@general:workflow.entity-bulk-archived',\n successBodyKey: '@general:workflow.entity-bulk-archived-body',\n partialTitleKey: '@general:workflow.bulk.partial-title',\n partialBodyKey: '@general:workflow.bulk.partial-body',\n partialBodyWithReasonKey: '@general:workflow.bulk.partial-body-with-reason',\n failTitleKey: '@general:workflow.bulk.fail-title',\n failBodyKey: '@general:workflow.bulk.fail-body',\n failBodyWithReasonKey: '@general:workflow.bulk.fail-body-with-reason',\n });\n\n const data = runtimeCommandPayloadData(result);\n if ((data?.succeeded ?? 0) > 0) {\n this.helper.dispatchBulkArchived(context.refType, context.ids, {\n failedIds: (data?.results ?? [])\n .filter((item: { success: boolean; id: string }) => !item.success)\n .map((item: { success: boolean; id: string }) => item.id),\n totalProcessed: data?.succeeded,\n totalFailed: data?.failed,\n });\n }\n\n // Dialog already presented — omit message to avoid toast middleware double-fire.\n return result.success\n ? { success: true, kind: 'object' as const, data: data!, metadata: { refresh: false } }\n : { success: false, message: result.message };\n }\n}\n"],"names":[],"mappings":";;;;;;;MAYa,2BAA2B,CAAA;AADxC,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAC9C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,gCAAgC,CAAC;AAuDtE,IAAA;IArDC,MAAM,OAAO,CACX,KAAqB,EAAA;AAErB,QAAA,MAAM,OAAO,GAAG,yBAAyB,CAAC,KAAK,CAAC;QAChD,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,uCAAuC,CAAC;AAC5F,iBAAA;aACF;QACH;QAEA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CACzC,6CAA6C,EAC7C,+CAA+C,EAC/C,EAAE,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAC9B;QACD,IAAI,CAAC,SAAS,EAAE;AACd,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3B;QAEA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YAC1C,MAAM,EAAE,OAAO,CAAC,OAAO;YACvB,GAAG,EAAE,OAAO,CAAC,GAAG;AAChB,YAAA,KAAK,EAAE,iBAAiB,CAAC,IAAI,CAAC;AAC9B,YAAA,eAAe,EAAE,kDAAkD;AACnE,YAAA,eAAe,EAAE,wCAA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,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,cADd,MAAM,EAAA,CAAA,CAAA;;2FACnB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
1
+ {"version":3,"file":"acorex-platform-module-common-client-bulk-archive-entity.command-njV_WseD.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/archive-plugin/commands/bulk-archive-entity.command.ts"],"sourcesContent":["import { runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPRuntimeCommandResult, type AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityBulkPatchPerformService } from '@acorex-platform/framework-client/layout/entity';\nimport type { AXPBulkCommandResultData } from '@acorex-platform/framework-shared/runtime';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPArchiveEntityCommandHelper } from './archive-entity.command.helper';\nimport { buildArchivePatch, normalizeArchiveBulkInput } from './archive-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPBulkArchiveEntityCommand\n implements AXPCommand<AXPContextData, AXPBulkCommandResultData>\n{\n private readonly helper = inject(AXPArchiveEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n private readonly bulkPatch = inject(AXPEntityBulkPatchPerformService);\n\n async execute(\n input: AXPContextData,\n ): AXPCommandExecuteResultPromise<AXPBulkCommandResultData> {\n const context = normalizeArchiveBulkInput(input);\n if (!context) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n const confirmed = await this.helper.confirm(\n '@general:actions.bulk-archive.confirm.title',\n '@general:actions.bulk-archive.confirm.message',\n { count: context.ids.length },\n );\n if (!confirmed) {\n return { success: false };\n }\n\n const result = await this.bulkPatch.perform({\n entity: context.refType,\n ids: context.ids,\n patch: buildArchivePatch(true),\n loadingTitleKey: '@general:actions.bulk-archive.confirm.processing',\n successTitleKey: '@general:workflow.entity-bulk-archived',\n successBodyKey: '@general:workflow.entity-bulk-archived-body',\n partialTitleKey: '@general:workflow.bulk.partial-title',\n partialBodyKey: '@general:workflow.bulk.partial-body',\n partialBodyWithReasonKey: '@general:workflow.bulk.partial-body-with-reason',\n failTitleKey: '@general:workflow.bulk.fail-title',\n failBodyKey: '@general:workflow.bulk.fail-body',\n failBodyWithReasonKey: '@general:workflow.bulk.fail-body-with-reason',\n });\n\n const data = runtimeCommandPayloadData(result);\n if ((data?.succeeded ?? 0) > 0) {\n this.helper.dispatchBulkArchived(context.refType, context.ids, {\n failedIds: (data?.results ?? [])\n .filter((item: { success: boolean; id: string }) => !item.success)\n .map((item: { success: boolean; id: string }) => item.id),\n totalProcessed: data?.succeeded,\n totalFailed: data?.failed,\n });\n }\n\n // Dialog already presented — omit message to avoid toast middleware double-fire.\n return result.success\n ? { success: true, kind: 'object' as const, data: data!, metadata: { refresh: false } }\n : { success: false, message: result.message };\n }\n}\n"],"names":[],"mappings":";;;;;;;MAYa,2BAA2B,CAAA;AADxC,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAC9C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,gCAAgC,CAAC;AAuDtE,IAAA;IArDC,MAAM,OAAO,CACX,KAAqB,EAAA;AAErB,QAAA,MAAM,OAAO,GAAG,yBAAyB,CAAC,KAAK,CAAC;QAChD,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,uCAAuC,CAAC;AAC5F,iBAAA;a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IAAI,EAAE,MAAM;AAC1B,aAAA,CAAC;QACJ;;QAGA,OAAO,MAAM,CAAC;cACV,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAiB,EAAE,IAAI,EAAE,IAAK,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;AACrF,cAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE;IACjD;8GA3DW,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,cADd,MAAM,EAAA,CAAA,CAAA;;2FACnB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -3,7 +3,7 @@ import { AXTranslationService } from '@acorex/core/translation';
3
3
  import { AXPEntityBulkPatchPerformService } from '@acorex-platform/framework-client/layout/entity';
4
4
  import * as i0 from '@angular/core';
5
5
  import { inject, Injectable } from '@angular/core';
6
- import { A as AXPArchiveEntityCommandHelper, c as normalizeArchiveBulkInput, b as buildArchivePatch } from './acorex-platform-module-common-client-archive-entity.command.util-DrW2EjNj.mjs';
6
+ import { A as AXPArchiveEntityCommandHelper, c as normalizeArchiveBulkInput, b as buildArchivePatch } from './acorex-platform-module-common-client-archive-entity.command.util-DgnEcrDL.mjs';
7
7
 
8
8
  class AXPBulkRestoreArchiveEntityCommand {
9
9
  constructor() {
@@ -62,4 +62,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
62
62
  }] });
63
63
 
64
64
  export { AXPBulkRestoreArchiveEntityCommand };
65
- //# sourceMappingURL=acorex-platform-module-common-client-bulk-restore-archive-entity.command-DV81VX8K.mjs.map
65
+ //# sourceMappingURL=acorex-platform-module-common-client-bulk-restore-archive-entity.command-t2AYXaLk.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-bulk-restore-archive-entity.command-DV81VX8K.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/archive-plugin/commands/bulk-restore-archive-entity.command.ts"],"sourcesContent":["import { runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPRuntimeCommandResult, type AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityBulkPatchPerformService } from '@acorex-platform/framework-client/layout/entity';\nimport type { AXPBulkCommandResultData } from '@acorex-platform/framework-shared/runtime';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPArchiveEntityCommandHelper } from './archive-entity.command.helper';\nimport { buildArchivePatch, normalizeArchiveBulkInput } from './archive-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPBulkRestoreArchiveEntityCommand\n implements AXPCommand<AXPContextData, AXPBulkCommandResultData>\n{\n private readonly helper = inject(AXPArchiveEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n private readonly bulkPatch = inject(AXPEntityBulkPatchPerformService);\n\n async execute(\n input: AXPContextData,\n ): AXPCommandExecuteResultPromise<AXPBulkCommandResultData> {\n const context = normalizeArchiveBulkInput(input);\n if (!context) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n const confirmed = await this.helper.confirm(\n '@general:actions.bulk-restore-archive.confirm.title',\n '@general:actions.bulk-restore-archive.confirm.message',\n { count: context.ids.length },\n );\n if (!confirmed) {\n return { success: false };\n }\n\n const result = await this.bulkPatch.perform({\n entity: context.refType,\n ids: context.ids,\n patch: buildArchivePatch(false),\n loadingTitleKey: '@general:actions.bulk-restore-archive.confirm.processing',\n successTitleKey: '@general:workflow.entity-bulk-unarchived',\n successBodyKey: '@general:workflow.entity-bulk-unarchived-body',\n partialTitleKey: '@general:workflow.bulk.partial-title',\n partialBodyKey: '@general:workflow.bulk.partial-body',\n partialBodyWithReasonKey: '@general:workflow.bulk.partial-body-with-reason',\n failTitleKey: '@general:workflow.bulk.fail-title',\n failBodyKey: '@general:workflow.bulk.fail-body',\n failBodyWithReasonKey: '@general:workflow.bulk.fail-body-with-reason',\n });\n\n const data = runtimeCommandPayloadData(result);\n if ((data?.succeeded ?? 0) > 0) {\n this.helper.dispatchBulkUnarchived(context.refType, context.ids, {\n failedIds: (data?.results ?? [])\n .filter((item: { success: boolean; id: string }) => !item.success)\n .map((item: { success: boolean; id: string }) => item.id),\n totalProcessed: data?.succeeded,\n totalFailed: data?.failed,\n });\n }\n\n return result.success\n ? { success: true, kind: 'object' as const, data: data!, metadata: { refresh: false } }\n : { success: false, message: result.message };\n }\n}"],"names":[],"mappings":";;;;;;;MAYa,kCAAkC,CAAA;AAD/C,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAC9C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,gCAAgC,CAAC;AAsDtE,IAAA;IApDC,MAAM,OAAO,CACX,KAAqB,EAAA;AAErB,QAAA,MAAM,OAAO,GAAG,yBAAyB,CAAC,KAAK,CAAC;QAChD,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,uCAAuC,CAAC;AAC5F,iBAAA;aACF;QACH;QAEA,MAAM,SAAS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aAAA,CAAC;QACJ;QAEA,OAAO,MAAM,CAAC;cACV,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAiB,EAAE,IAAI,EAAE,IAAK,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;AACrF,cAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE;IACjD;8GA1DW,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kCAAkC,cADrB,MAAM,EAAA,CAAA,CAAA;;2FACnB,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAD9C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
1
+ {"version":3,"file":"acorex-platform-module-common-client-bulk-restore-archive-entity.command-t2AYXaLk.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/archive-plugin/commands/bulk-restore-archive-entity.command.ts"],"sourcesContent":["import { runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPRuntimeCommandResult, type AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityBulkPatchPerformService } from '@acorex-platform/framework-client/layout/entity';\nimport type { AXPBulkCommandResultData } from '@acorex-platform/framework-shared/runtime';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPArchiveEntityCommandHelper } from './archive-entity.command.helper';\nimport { buildArchivePatch, normalizeArchiveBulkInput } from './archive-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPBulkRestoreArchiveEntityCommand\n implements AXPCommand<AXPContextData, AXPBulkCommandResultData>\n{\n private readonly helper = inject(AXPArchiveEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n private readonly bulkPatch = inject(AXPEntityBulkPatchPerformService);\n\n async execute(\n input: AXPContextData,\n ): AXPCommandExecuteResultPromise<AXPBulkCommandResultData> {\n const context = normalizeArchiveBulkInput(input);\n if (!context) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n const confirmed = await this.helper.confirm(\n '@general:actions.bulk-restore-archive.confirm.title',\n '@general:actions.bulk-restore-archive.confirm.message',\n { count: context.ids.length },\n );\n if (!confirmed) {\n return { success: false };\n }\n\n const result = await this.bulkPatch.perform({\n entity: context.refType,\n ids: context.ids,\n patch: buildArchivePatch(false),\n loadingTitleKey: '@general:actions.bulk-restore-archive.confirm.processing',\n successTitleKey: '@general:workflow.entity-bulk-unarchived',\n successBodyKey: '@general:workflow.entity-bulk-unarchived-body',\n partialTitleKey: '@general:workflow.bulk.partial-title',\n partialBodyKey: '@general:workflow.bulk.partial-body',\n partialBodyWithReasonKey: '@general:workflow.bulk.partial-body-with-reason',\n failTitleKey: '@general:workflow.bulk.fail-title',\n failBodyKey: '@general:workflow.bulk.fail-body',\n failBodyWithReasonKey: '@general:workflow.bulk.fail-body-with-reason',\n });\n\n const data = runtimeCommandPayloadData(result);\n if ((data?.succeeded ?? 0) > 0) {\n this.helper.dispatchBulkUnarchived(context.refType, context.ids, {\n failedIds: (data?.results ?? [])\n .filter((item: { success: boolean; id: string }) => !item.success)\n .map((item: { success: boolean; id: string }) => item.id),\n totalProcessed: data?.succeeded,\n totalFailed: data?.failed,\n });\n }\n\n return result.success\n ? { success: true, kind: 'object' as const, data: data!, metadata: { refresh: false } }\n : { success: false, message: result.message };\n }\n}"],"names":[],"mappings":";;;;;;;MAYa,kCAAkC,CAAA;AAD/C,IAAA,WAAA,GAAA;AAImB,QAAA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EntityBroadcastService } from '@acorex-platform/framework-client/core';
9
9
  import { AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';
10
10
  import { resolveEntityActionRef } from '@acorex-platform/framework-shared/runtime';
11
- import { t as toVariableName, i as isValidVariableName } from './acorex-platform-module-common-client-acorex-platform-module-common-client-BmGXSWg4.mjs';
11
+ import { t as toVariableName, i as isValidVariableName } from './acorex-platform-module-common-client-acorex-platform-module-common-client-BzK6gnbq.mjs';
12
12
 
13
13
  class AXPCloneEntityCommandHelper {
14
14
  constructor() {
@@ -223,4 +223,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
223
223
  }] });
224
224
 
225
225
  export { AXPCloneEntityCommand };
226
- //# sourceMappingURL=acorex-platform-module-common-client-clone-entity.command-CcjD0iDW.mjs.map
226
+ //# sourceMappingURL=acorex-platform-module-common-client-clone-entity.command-UyUOYAxp.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-clone-entity.command-CcjD0iDW.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/clone-plugin/commands/clone-entity.command.helper.ts","../../../../libs/modules/common/client/src/lib/features/clone-plugin/clone-identifier-fields.util.ts","../../../../libs/modules/common/client/src/lib/features/clone-plugin/commands/clone-entity.command.util.ts","../../../../libs/modules/common/client/src/lib/features/clone-plugin/commands/clone-entity.command.ts"],"sourcesContent":["import { AXDialogService } from '@acorex/components/dialog';\nimport { AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { AXPCommonSettings, AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityBroadcastService } from '@acorex-platform/framework-client/core';\nimport { AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';\nimport type { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { inject, Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPCloneEntityCommandHelper {\n private readonly entityRegistry = inject(AXPEntityDefinitionRegistryService);\n private readonly dialogService = inject(AXDialogService);\n private readonly loadingDialog = inject(AXLoadingDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly entityEvents = inject(AXPEntityBroadcastService);\n\n async resolveEntity(refType: string): Promise<AXPEntity> {\n const [moduleName, entityName] = refType.split('.');\n return this.entityRegistry.resolve(moduleName, entityName);\n }\n\n async fetchEntityData(refType: string, refId: string): Promise<AXPContextData> {\n const entityDefinition = await this.resolveEntity(refType);\n\n if (entityDefinition.queries?.byKey) {\n const queryExec = entityDefinition.queries.byKey.execute as\n | ((id: string) => Promise<AXPContextData>)\n | undefined;\n\n if (!queryExec) {\n throw new Error('Entity byKey query is not executable');\n }\n\n return queryExec(refId);\n }\n\n return { id: refId };\n }\n\n async createEntity(refType: string, data: AXPContextData): Promise<string> {\n const entityDefinition = await this.resolveEntity(refType);\n const createExec = entityDefinition.commands?.create?.execute as\n | ((payload: AXPContextData) => Promise<string>)\n | undefined;\n\n if (!createExec) {\n throw new Error('Entity does not support create operation');\n }\n\n return createExec(data);\n }\n\n async confirm(titleKey: string, messageKey: string, messageParams?: AXPContextData): Promise<boolean> {\n const dialogResult = await this.dialogService.confirm(\n await this.translationService.translateAsync(titleKey),\n await this.translationService.translateAsync(messageKey, { params: messageParams }),\n 'warning',\n 'horizontal',\n false,\n 'cancel',\n );\n return dialogResult.result === true;\n }\n\n showLoading(title: string, status: string) {\n return this.loadingDialog.show({\n title,\n mode: 'indeterminate',\n status,\n });\n }\n\n async showSuccessToast(titleKey: string, contentKey?: string): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled) {\n return;\n }\n\n this.toastService.show({\n color: 'success',\n title: await this.translationService.translateAsync(titleKey),\n content: contentKey ? await this.translationService.translateAsync(contentKey) : undefined,\n });\n }\n\n dispatchCloned(refType: string, _originalId: string, newId: string, meta?: AXPContextData): void {\n this.entityEvents.publishLayoutRefresh(refType, {\n ...(meta as Record<string, unknown> | undefined),\n highlightRowId: newId,\n resetPagination: true,\n });\n }\n}\n","import type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { isValidVariableName, toVariableName } from '../../validations/utils/variable-name.util';\nimport { AXPDerivedNameExtension } from '../derived-name-plugin/derived-name.plugin';\n\n//#region ---- Constants ----\n\nexport const CLONE_TITLE_SUFFIX = ' (Copy)';\nexport const CLONE_CODE_SUFFIX = '_copy';\n\n//#endregion\n\n//#region ---- Clone Identifier Field Preparation ----\n\n/**\n * Adjusts common identifier fields after cloning.\n * Uses entity metadata (derived-name plugin, variable-name validation) to pick a safe strategy.\n */\nexport function prepareCloneIdentifierFields(\n clonedData: AXPContextData,\n entityDefinition: AXPEntity,\n): void {\n const derivedName = (entityDefinition as { extensions?: { derivedName?: AXPDerivedNameExtension } }).extensions\n ?.derivedName;\n const properties = entityDefinition.properties ?? [];\n\n const propertyHasVariableNameRule = (fieldName: string): boolean =>\n properties.some(\n (prop) =>\n prop.name === fieldName && prop.validations?.some((validation) => validation.rule === 'variable-name'),\n );\n\n const title = clonedData['title'];\n if (typeof title === 'string' && title.trim()) {\n clonedData['title'] = `${title.trim()}${CLONE_TITLE_SUFFIX}`;\n }\n\n if (Object.prototype.hasOwnProperty.call(clonedData, 'name')) {\n clonedData['name'] = resolveClonedName(clonedData, derivedName, propertyHasVariableNameRule('name'));\n }\n\n const code = clonedData['code'];\n if (typeof code === 'string' && code.trim()) {\n clonedData['code'] = `${code.trim()}${CLONE_CODE_SUFFIX}`;\n }\n}\n\nfunction resolveClonedName(\n clonedData: AXPContextData,\n derivedName: AXPDerivedNameExtension | undefined,\n hasVariableNameValidation: boolean,\n): string {\n const sourceField = derivedName?.sourceField ?? 'title';\n const sourceValue = clonedData[sourceField];\n\n if (derivedName || hasVariableNameValidation) {\n const fromSource = toVariableName(sourceValue);\n if (fromSource) {\n return fromSource;\n }\n }\n\n const currentName = clonedData['name'];\n if (typeof currentName === 'string' && currentName.trim()) {\n const suffixed = `${currentName.trim()}${CLONE_CODE_SUFFIX}`;\n if (isValidVariableName(suffixed)) {\n return suffixed;\n }\n\n const fromTitle = toVariableName(clonedData['title']);\n if (fromTitle) {\n return fromTitle;\n }\n\n return toVariableName(currentName, 'clone');\n }\n\n return toVariableName(clonedData['title'], 'clone');\n}\n\n//#endregion\n","import type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { resolveEntityActionRef } from '@acorex-platform/framework-shared/runtime';\n\nimport { prepareCloneIdentifierFields } from '../clone-identifier-fields.util';\n\nexport interface AXPCloneCommandContext {\n refId: string;\n refType: string;\n rowData?: AXPContextData;\n}\n\nexport function normalizeCloneInput(input: AXPContextData): AXPCloneCommandContext | null {\n const resolved = resolveEntityActionRef(input);\n if (!resolved) {\n return null;\n }\n\n return {\n refId: resolved.refId,\n refType: resolved.refType,\n rowData: resolved.rowData as AXPContextData | undefined,\n };\n}\n\nexport function prepareClonedData(originalData: AXPContextData, entityDefinition: AXPEntity): AXPContextData {\n const clonedData = { ...originalData };\n\n delete clonedData['id'];\n delete clonedData['createdAt'];\n delete clonedData['updatedAt'];\n delete clonedData['createdBy'];\n delete clonedData['updatedBy'];\n delete clonedData['version'];\n delete clonedData['isArchived'];\n delete clonedData['archivedAt'];\n delete clonedData['isDisabled'];\n delete clonedData['disabledAt'];\n\n prepareCloneIdentifierFields(clonedData, entityDefinition);\n\n if (clonedData['isActive'] !== undefined) {\n clonedData['isActive'] = true;\n }\n if (clonedData['status'] !== undefined) {\n clonedData['status'] = 'draft';\n }\n\n return clonedData;\n}\n\nexport function buildCloneRefreshMeta(\n entityDefinition: AXPEntity,\n clonedData: AXPContextData,\n): AXPContextData {\n const meta: AXPContextData = {};\n if (entityDefinition.parentKey && clonedData[entityDefinition.parentKey] != null) {\n meta['refreshTargetId'] = clonedData[entityDefinition.parentKey];\n }\n return meta;\n}\n","import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPRuntimeCommandResult, type AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPCloneEntityCommandHelper } from './clone-entity.command.helper';\nimport {\n buildCloneRefreshMeta,\n normalizeCloneInput,\n prepareClonedData,\n} from './clone-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPCloneEntityCommand implements AXPCommand<AXPContextData, { newId: string }> {\n private readonly helper = inject(AXPCloneEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(input: AXPContextData): AXPCommandExecuteResultPromise<{ newId: string }> {\n const context = normalizeCloneInput(input);\n if (!context) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n const confirmed = await this.helper.confirm(\n '@general:actions.clone.confirm.title',\n '@general:actions.clone.confirm.message',\n );\n if (!confirmed) {\n return { success: false };\n }\n\n const loadingDialog = this.helper.showLoading(\n await this.translationService.translateAsync('@general:actions.clone.confirm.processing'),\n 'Cloning...',\n );\n\n try {\n const entityDefinition = await this.helper.resolveEntity(context.refType);\n const originalData = await this.helper.fetchEntityData(context.refType, context.refId);\n const clonedData = prepareClonedData(originalData, entityDefinition);\n const newId = await this.helper.createEntity(context.refType, clonedData);\n\n const meta = buildCloneRefreshMeta(entityDefinition, clonedData);\n this.helper.dispatchCloned(context.refType, context.refId, newId, meta);\n await this.helper.showSuccessToast('@general:workflow.entity-cloned', '@general:workflow.entity-cloned-body');\n\n return { success: true, kind: 'object', data: { newId } };\n } catch (error) {\n console.error('Clone operation failed:', error);\n return {\n success: false,\n message: {\n text: error instanceof Error ? error.message : 'Clone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Y,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB;AACxE,iBAAA;aACF;QACH;gBAAU;YACR,aAAa,CAAC,KAAK,EAAE;QACvB;IACF;8GAlDW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cADR,MAAM,EAAA,CAAA,CAAA;;2FACnB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
1
+ {"version":3,"file":"acorex-platform-module-common-client-clone-entity.command-UyUOYAxp.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/clone-plugin/commands/clone-entity.command.helper.ts","../../../../libs/modules/common/client/src/lib/features/clone-plugin/clone-identifier-fields.util.ts","../../../../libs/modules/common/client/src/lib/features/clone-plugin/commands/clone-entity.command.util.ts","../../../../libs/modules/common/client/src/lib/features/clone-plugin/commands/clone-entity.command.ts"],"sourcesContent":["import { AXDialogService } from '@acorex/components/dialog';\nimport { AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { AXPCommonSettings, AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityBroadcastService } from '@acorex-platform/framework-client/core';\nimport { AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';\nimport type { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { inject, Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPCloneEntityCommandHelper {\n private readonly entityRegistry = inject(AXPEntityDefinitionRegistryService);\n private readonly dialogService = inject(AXDialogService);\n private readonly loadingDialog = inject(AXLoadingDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly entityEvents = inject(AXPEntityBroadcastService);\n\n async resolveEntity(refType: string): Promise<AXPEntity> {\n const [moduleName, entityName] = refType.split('.');\n return this.entityRegistry.resolve(moduleName, entityName);\n }\n\n async fetchEntityData(refType: string, refId: string): Promise<AXPContextData> {\n const entityDefinition = await this.resolveEntity(refType);\n\n if (entityDefinition.queries?.byKey) {\n const queryExec = entityDefinition.queries.byKey.execute as\n | ((id: string) => Promise<AXPContextData>)\n | undefined;\n\n if (!queryExec) {\n throw new Error('Entity byKey query is not executable');\n }\n\n return queryExec(refId);\n }\n\n return { id: refId };\n }\n\n async createEntity(refType: string, data: AXPContextData): Promise<string> {\n const entityDefinition = await this.resolveEntity(refType);\n const createExec = entityDefinition.commands?.create?.execute as\n | ((payload: AXPContextData) => Promise<string>)\n | undefined;\n\n if (!createExec) {\n throw new Error('Entity does not support create operation');\n }\n\n return createExec(data);\n }\n\n async confirm(titleKey: string, messageKey: string, messageParams?: AXPContextData): Promise<boolean> {\n const dialogResult = await this.dialogService.confirm(\n await this.translationService.translateAsync(titleKey),\n await this.translationService.translateAsync(messageKey, { params: messageParams }),\n 'warning',\n 'horizontal',\n false,\n 'cancel',\n );\n return dialogResult.result === true;\n }\n\n showLoading(title: string, status: string) {\n return this.loadingDialog.show({\n title,\n mode: 'indeterminate',\n status,\n });\n }\n\n async showSuccessToast(titleKey: string, contentKey?: string): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled) {\n return;\n }\n\n this.toastService.show({\n color: 'success',\n title: await this.translationService.translateAsync(titleKey),\n content: contentKey ? await this.translationService.translateAsync(contentKey) : undefined,\n });\n }\n\n dispatchCloned(refType: string, _originalId: string, newId: string, meta?: AXPContextData): void {\n this.entityEvents.publishLayoutRefresh(refType, {\n ...(meta as Record<string, unknown> | undefined),\n highlightRowId: newId,\n resetPagination: true,\n });\n }\n}\n","import type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { isValidVariableName, toVariableName } from '../../validations/utils/variable-name.util';\nimport { AXPDerivedNameExtension } from '../derived-name-plugin/derived-name.plugin';\n\n//#region ---- Constants ----\n\nexport const CLONE_TITLE_SUFFIX = ' (Copy)';\nexport const CLONE_CODE_SUFFIX = '_copy';\n\n//#endregion\n\n//#region ---- Clone Identifier Field Preparation ----\n\n/**\n * Adjusts common identifier fields after cloning.\n * Uses entity metadata (derived-name plugin, variable-name validation) to pick a safe strategy.\n */\nexport function prepareCloneIdentifierFields(\n clonedData: AXPContextData,\n entityDefinition: AXPEntity,\n): void {\n const derivedName = (entityDefinition as { extensions?: { derivedName?: AXPDerivedNameExtension } }).extensions\n ?.derivedName;\n const properties = entityDefinition.properties ?? [];\n\n const propertyHasVariableNameRule = (fieldName: string): boolean =>\n properties.some(\n (prop) =>\n prop.name === fieldName && prop.validations?.some((validation) => validation.rule === 'variable-name'),\n );\n\n const title = clonedData['title'];\n if (typeof title === 'string' && title.trim()) {\n clonedData['title'] = `${title.trim()}${CLONE_TITLE_SUFFIX}`;\n }\n\n if (Object.prototype.hasOwnProperty.call(clonedData, 'name')) {\n clonedData['name'] = resolveClonedName(clonedData, derivedName, propertyHasVariableNameRule('name'));\n }\n\n const code = clonedData['code'];\n if (typeof code === 'string' && code.trim()) {\n clonedData['code'] = `${code.trim()}${CLONE_CODE_SUFFIX}`;\n }\n}\n\nfunction resolveClonedName(\n clonedData: AXPContextData,\n derivedName: AXPDerivedNameExtension | undefined,\n hasVariableNameValidation: boolean,\n): string {\n const sourceField = derivedName?.sourceField ?? 'title';\n const sourceValue = clonedData[sourceField];\n\n if (derivedName || hasVariableNameValidation) {\n const fromSource = toVariableName(sourceValue);\n if (fromSource) {\n return fromSource;\n }\n }\n\n const currentName = clonedData['name'];\n if (typeof currentName === 'string' && currentName.trim()) {\n const suffixed = `${currentName.trim()}${CLONE_CODE_SUFFIX}`;\n if (isValidVariableName(suffixed)) {\n return suffixed;\n }\n\n const fromTitle = toVariableName(clonedData['title']);\n if (fromTitle) {\n return fromTitle;\n }\n\n return toVariableName(currentName, 'clone');\n }\n\n return toVariableName(clonedData['title'], 'clone');\n}\n\n//#endregion\n","import type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { resolveEntityActionRef } from '@acorex-platform/framework-shared/runtime';\n\nimport { prepareCloneIdentifierFields } from '../clone-identifier-fields.util';\n\nexport interface AXPCloneCommandContext {\n refId: string;\n refType: string;\n rowData?: AXPContextData;\n}\n\nexport function normalizeCloneInput(input: AXPContextData): AXPCloneCommandContext | null {\n const resolved = resolveEntityActionRef(input);\n if (!resolved) {\n return null;\n }\n\n return {\n refId: resolved.refId,\n refType: resolved.refType,\n rowData: resolved.rowData as AXPContextData | undefined,\n };\n}\n\nexport function prepareClonedData(originalData: AXPContextData, entityDefinition: AXPEntity): AXPContextData {\n const clonedData = { ...originalData };\n\n delete clonedData['id'];\n delete clonedData['createdAt'];\n delete clonedData['updatedAt'];\n delete clonedData['createdBy'];\n delete clonedData['updatedBy'];\n delete clonedData['version'];\n delete clonedData['isArchived'];\n delete clonedData['archivedAt'];\n delete clonedData['isDisabled'];\n delete clonedData['disabledAt'];\n\n prepareCloneIdentifierFields(clonedData, entityDefinition);\n\n if (clonedData['isActive'] !== undefined) {\n clonedData['isActive'] = true;\n }\n if (clonedData['status'] !== undefined) {\n clonedData['status'] = 'draft';\n }\n\n return clonedData;\n}\n\nexport function buildCloneRefreshMeta(\n entityDefinition: AXPEntity,\n clonedData: AXPContextData,\n): AXPContextData {\n const meta: AXPContextData = {};\n if (entityDefinition.parentKey && clonedData[entityDefinition.parentKey] != null) {\n meta['refreshTargetId'] = clonedData[entityDefinition.parentKey];\n }\n return meta;\n}\n","import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPRuntimeCommandResult, type AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPCloneEntityCommandHelper } from './clone-entity.command.helper';\nimport {\n buildCloneRefreshMeta,\n normalizeCloneInput,\n prepareClonedData,\n} from './clone-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPCloneEntityCommand implements AXPCommand<AXPContextData, { newId: string }> {\n private readonly helper = inject(AXPCloneEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(input: AXPContextData): AXPCommandExecuteResultPromise<{ newId: string }> {\n const context = normalizeCloneInput(input);\n if (!context) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n const confirmed = await this.helper.confirm(\n '@general:actions.clone.confirm.title',\n '@general:actions.clone.confirm.message',\n );\n if (!confirmed) {\n return { success: false };\n }\n\n const loadingDialog = this.helper.showLoading(\n await this.translationService.translateAsync('@general:actions.clone.confirm.processing'),\n 'Cloning...',\n );\n\n try {\n const entityDefinition = await this.helper.resolveEntity(context.refType);\n const originalData = await this.helper.fetchEntityData(context.refType, context.refId);\n const clonedData = prepareClonedData(originalData, entityDefinition);\n const newId = await this.helper.createEntity(context.refType, clonedData);\n\n const meta = buildCloneRefreshMeta(entityDefinition, clonedData);\n this.helper.dispatchCloned(context.refType, context.refId, newId, meta);\n await this.helper.showSuccessToast('@general:workflow.entity-cloned', '@general:workflow.entity-cloned-body');\n\n return { success: true, kind: 'object', data: { newId } };\n } catch (error) {\n console.error('Clone operation failed:', error);\n return {\n success: false,\n message: {\n text: error instanceof Error ? error.message : 'Clone operation failed',\n },\n };\n } finally {\n loadingDialog.close();\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;MAYa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,aAAa,CAAC,KAAK,EAAE;QACvB;IACF;8GAlDW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cADR,MAAM,EAAA,CAAA,CAAA;;2FACnB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -45,6 +45,19 @@ async function factoryRecordLock() {
45
45
  name: RootConfig.entities.recordLock.name,
46
46
  title: RootConfig.entities.recordLock.title,
47
47
  icon: RootConfig.entities.recordLock.icon,
48
+ searchTags: [
49
+ 'record-lock',
50
+ 'edit-lock',
51
+ 'locking',
52
+ 'concurrent-edit',
53
+ 'pessimistic-lock',
54
+ 'lock-expiry',
55
+ 'locked-by',
56
+ 'قفل رکورد',
57
+ 'قفل ویرایش',
58
+ 'قفل',
59
+ 'ویرایش همزمان',
60
+ ],
48
61
  formats: {
49
62
  individual: RootConfig.entities.recordLock.title,
50
63
  plural: RootConfig.entities.recordLock.titlePlural,
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-contracts-entities-record-lock.mjs","sources":["../../../../libs/modules/common/contracts/src/root-config.ts","../../../../libs/modules/common/contracts/src/entities/record-lock/record-lock.entity.ts","../../../../libs/modules/common/contracts/src/acorex-platform-module-common-client-contracts-entities-record-lock.ts"],"sourcesContent":["const config = {\n i18n: 'common',\n module: 'Common',\n};\n\nexport const RootConfig = {\n config,\n module: {\n route: 'common',\n name: config.module,\n title: '@general:common.module.title',\n icon: 'fa-light fa-file-invoice',\n },\n entities: {\n recordLock: {\n name: 'RecordLock',\n title: 'Record Lock',\n titlePlural: 'Record Locks',\n icon: 'fa-light fa-lock',\n source: `${config.module}.RecordLock`,\n },\n versionStream: {\n name: 'VersionStream',\n title: 'Version Stream',\n titlePlural: 'Version Streams',\n icon: 'fa-light fa-code-branch',\n source: `${config.module}.VersionStream`,\n },\n versionEntry: {\n name: 'VersionEntry',\n title: 'Version Entry',\n titlePlural: 'Version Entries',\n icon: 'fa-light fa-clock-rotate-left',\n source: `${config.module}.VersionEntry`,\n },\n },\n} as const;\n","import { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';\nimport { AXPEntity, createAllQueryView } from '@acorex-platform/framework-shared/entity';\nimport { RootConfig } from '../../root-config';\n\n//#region ---- Record lock entity (edit locks) ----\n\nexport async function factoryRecordLock(): Promise<AXPEntity | null> {\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.recordLock.name,\n title: RootConfig.entities.recordLock.title,\n icon: RootConfig.entities.recordLock.icon,\n formats: {\n individual: RootConfig.entities.recordLock.title,\n plural: RootConfig.entities.recordLock.titlePlural,\n searchResult: {\n title: '{{ refType }} / {{ refId }}',\n description: '{{ type }}',\n },\n },\n groups: [{ id: 'overview', title: 'Overview' }],\n properties: [\n {\n name: 'id',\n title: 'ID',\n groupId: 'overview',\n schema: {\n dataType: 'uuid',\n visible: false,\n nullable: false,\n readonly: true,\n unique: { enabled: true },\n },\n },\n {\n name: 'refId',\n title: 'Reference Id',\n groupId: 'overview',\n schema: { dataType: 'string', interface: { type: AXPWidgetsCatalog.text }, readonly: true },\n },\n {\n name: 'refType',\n title: 'Reference Type',\n groupId: 'overview',\n schema: { dataType: 'string', interface: { type: AXPWidgetsCatalog.text }, readonly: true },\n },\n {\n name: 'type',\n title: 'Lock Type',\n groupId: 'overview',\n schema: { dataType: 'string', interface: { type: AXPWidgetsCatalog.text }, readonly: true },\n },\n {\n name: 'date',\n title: 'Lock Date',\n groupId: 'overview',\n schema: { dataType: 'string', interface: { type: AXPWidgetsCatalog.text }, readonly: true },\n },\n {\n name: 'expireAt',\n title: 'Expires At',\n groupId: 'overview',\n schema: {\n dataType: 'datetime',\n interface: { type: AXPWidgetsCatalog.dateTime, options: { format: 'datetime' } },\n readonly: true,\n },\n },\n {\n name: 'lockedBy',\n title: 'Locked By',\n groupId: 'overview',\n schema: { dataType: 'object', interface: { type: 'json' }, readonly: true },\n },\n ],\n columns: [\n { name: 'refType' },\n { name: 'refId' },\n { name: 'type' },\n { name: 'expireAt' },\n ],\n interfaces: {\n master: {\n list: {\n actions: [],\n views: [createAllQueryView({})],\n },\n },\n },\n };\n\n return entityDef;\n}\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './entity-entry.record-lock';\n"],"names":[],"mappings":";;;AAAA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,MAAM,EAAE,QAAQ;CACjB;AAEM,MAAM,UAAU,GAAG;IACxB,MAAM;AACN,IAAA,MAAM,EAAE;AACN,QAAA,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,MAAM,CAAC,MAAM;AACnB,QAAA,KAAK,EAAE,8BAA8B;AACrC,QAAA,IAAI,EAAE,0BAA0B;AACjC,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,UAAU,EAAE;AACV,YAAA,IAAI,EAAE,YAAY;AAClB,YAAA,KAAK,EAAE,aAAa;AACpB,YAAA,WAAW,EAAE,cAAc;AAC3B,YAAA,IAAI,EAAE,kBAAkB;AACxB,YAAA,MAAM,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,WAAA,CAAa;AACtC,SAAA;AACD,QAAA,aAAa,EAAE;AACb,YAAA,IAAI,EAAE,eAAe;AACrB,YAAA,KAAK,EAAE,gBAAgB;AACvB,YAAA,WAAW,EAAE,iBAAiB;AAC9B,YAAA,IAAI,EAAE,yBAAyB;AAC/B,YAAA,MAAM,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,cAAA,CAAgB;AACzC,SAAA;AACD,QAAA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AAQ,EAAE,UAAU;AACpB,oBAAA,SAAS,EAAE,EAAE,IAAI,EAAE,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE;AAChF,oBAAA,QAAQ,EAAE,IAAI;AACf,iBAAA;AACF,aAAA;AACD,YAAA;AACE,gBAAA,IAAI,EAAE,UAAU;AAChB,gBAAA,KAAK,EAAE,WAAW;AAClB,gBAAA,OAAO,EAAE,UAAU;AACnB,gBAAA,MAAM,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;AAC5E,aAAA;AACF,SAAA;AACD,QAAA,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,SAAS,EAAE;YACnB,EAAE,IAAI,EAAE,OAAO,EAAE;YACjB,EAAE,IAAI,EAAE,MAAM,EAAE;YAChB,EAAE,IAAI,EAAE,UAAU,EAAE;AACrB,SAAA;AACD,QAAA,UAAU,EAAE;AACV,YAAA,MAAM,EAAE;AACN,gBAAA,IAAI,EAAE;AACJ,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,KAAK,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;AAChC,iBAAA;AACF,aAAA;AACF,SAAA;KACF;AAED,IAAA,OAAO,SAAS;AAClB;AAEA;;AC9FA;;AAEG;;"}
1
+ {"version":3,"file":"acorex-platform-module-common-client-contracts-entities-record-lock.mjs","sources":["../../../../libs/modules/common/contracts/src/root-config.ts","../../../../libs/modules/common/contracts/src/entities/record-lock/record-lock.entity.ts","../../../../libs/modules/common/contracts/src/acorex-platform-module-common-client-contracts-entities-record-lock.ts"],"sourcesContent":["const config = {\n i18n: 'common',\n module: 'Common',\n};\n\nexport const RootConfig = {\n config,\n module: {\n route: 'common',\n name: config.module,\n title: '@general:common.module.title',\n icon: 'fa-light fa-file-invoice',\n },\n entities: {\n recordLock: {\n name: 'RecordLock',\n title: 'Record Lock',\n titlePlural: 'Record Locks',\n icon: 'fa-light fa-lock',\n source: `${config.module}.RecordLock`,\n },\n versionStream: {\n name: 'VersionStream',\n title: 'Version Stream',\n titlePlural: 'Version Streams',\n icon: 'fa-light fa-code-branch',\n source: `${config.module}.VersionStream`,\n },\n versionEntry: {\n name: 'VersionEntry',\n title: 'Version Entry',\n titlePlural: 'Version Entries',\n icon: 'fa-light fa-clock-rotate-left',\n source: `${config.module}.VersionEntry`,\n },\n },\n} as const;\n","import { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';\nimport { AXPEntity, createAllQueryView } from '@acorex-platform/framework-shared/entity';\nimport { RootConfig } from '../../root-config';\n\n//#region ---- Record lock entity (edit locks) ----\n\nexport async function factoryRecordLock(): Promise<AXPEntity | null> {\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.recordLock.name,\n title: RootConfig.entities.recordLock.title,\n icon: RootConfig.entities.recordLock.icon,\n searchTags: [\n 'record-lock',\n 'edit-lock',\n 'locking',\n 'concurrent-edit',\n 'pessimistic-lock',\n 'lock-expiry',\n 'locked-by',\n 'قفل رکورد',\n 'قفل ویرایش',\n 'قفل',\n 'ویرایش همزمان',\n ],\n formats: {\n individual: RootConfig.entities.recordLock.title,\n plural: RootConfig.entities.recordLock.titlePlural,\n searchResult: {\n title: '{{ refType }} / {{ refId }}',\n description: '{{ type }}',\n },\n },\n groups: [{ id: 'overview', title: 'Overview' }],\n properties: [\n {\n name: 'id',\n title: 'ID',\n groupId: 'overview',\n schema: {\n dataType: 'uuid',\n visible: false,\n nullable: false,\n readonly: true,\n unique: { enabled: true },\n },\n },\n {\n name: 'refId',\n title: 'Reference Id',\n groupId: 'overview',\n schema: { dataType: 'string', interface: { type: AXPWidgetsCatalog.text }, readonly: true },\n },\n {\n name: 'refType',\n title: 'Reference Type',\n groupId: 'overview',\n schema: { dataType: 'string', interface: { type: AXPWidgetsCatalog.text }, readonly: true },\n },\n {\n name: 'type',\n title: 'Lock Type',\n groupId: 'overview',\n schema: { dataType: 'string', interface: { type: AXPWidgetsCatalog.text }, readonly: true },\n },\n {\n name: 'date',\n title: 'Lock Date',\n groupId: 'overview',\n schema: { dataType: 'string', interface: { type: AXPWidgetsCatalog.text }, readonly: true },\n },\n {\n name: 'expireAt',\n title: 'Expires At',\n groupId: 'overview',\n schema: {\n dataType: 'datetime',\n interface: { type: AXPWidgetsCatalog.dateTime, options: { format: 'datetime' } },\n readonly: true,\n },\n },\n {\n name: 'lockedBy',\n title: 'Locked By',\n groupId: 'overview',\n schema: { dataType: 'object', interface: { type: 'json' }, readonly: true },\n },\n ],\n columns: [\n { name: 'refType' },\n { name: 'refId' },\n { name: 'type' },\n { name: 'expireAt' },\n ],\n interfaces: {\n master: {\n list: {\n actions: [],\n views: [createAllQueryView({})],\n },\n },\n },\n };\n\n return entityDef;\n}\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './entity-entry.record-lock';\n"],"names":[],"mappings":";;;AAAA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,MAAM,EAAE,QAAQ;CACjB;AAEM,MAAM,UAAU,GAAG;IACxB,MAAM;AACN,IAAA,MAAM,EAAE;AACN,QAAA,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,MAAM,CAAC,MAAM;AACnB,QAAA,KAAK,EAAE,8BAA8B;AACrC,QAAA,IAAI,EAAE,0BAA0B;AACjC,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,UAAU,EAAE;AACV,YAAA,IAAI,EAAE,YAAY;AAClB,YAAA,KAAK,EAAE,aAAa;AACpB,YAAA,WAAW,EAAE,cAAc;AAC3B,YAAA,IAAI,EAAE,kBAAkB;AACxB,YAAA,MAAM,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,WAAA,CAAa;AACtC,SAAA;AACD,QAAA,aAAa,EAAE;AACb,YAAA,IAAI,EAAE,eAAe;AACr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AEG;;"}
@@ -46,6 +46,20 @@ async function factoryVersionEntry() {
46
46
  name: RootConfig.entities.versionEntry.name,
47
47
  title: `@${i18n}:version-history.entities.version-entry.title`,
48
48
  icon: RootConfig.entities.versionEntry.icon,
49
+ searchTags: [
50
+ 'version-entry',
51
+ 'version-history',
52
+ 'change-log',
53
+ 'audit-trail',
54
+ 'snapshot',
55
+ 'patch',
56
+ 'change-type',
57
+ 'entity-version',
58
+ 'ورودی نسخه',
59
+ 'تاریخچه نسخه',
60
+ 'تغییر',
61
+ 'نگهداری نسخه',
62
+ ],
49
63
  formats: {
50
64
  individual: `@${i18n}:version-history.entities.version-entry.title`,
51
65
  plural: `@${i18n}:version-history.entities.version-entry.plural`,