@acorex-platform/module-common-client 0.0.18 → 0.0.21

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 (66) hide show
  1. package/fesm2022/{acorex-platform-module-common-client-acorex-platform-module-common-client-rqWzT7RI.mjs → acorex-platform-module-common-client-acorex-platform-module-common-client-CkeshVWo.mjs} +765 -417
  2. package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-CkeshVWo.mjs.map +1 -0
  3. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-CKENj9Od.mjs → acorex-platform-module-common-client-archive-entity.command-BZgNdxFS.mjs} +9 -13
  4. package/fesm2022/acorex-platform-module-common-client-archive-entity.command-BZgNdxFS.mjs.map +1 -0
  5. package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-BZrXDNGP.mjs → acorex-platform-module-common-client-archive-entity.command.util-BVrK8ZGy.mjs} +52 -40
  6. package/fesm2022/acorex-platform-module-common-client-archive-entity.command.util-BVrK8ZGy.mjs.map +1 -0
  7. package/fesm2022/{acorex-platform-module-common-client-audit-info-column.component-DuZUwD31.mjs → acorex-platform-module-common-client-audit-info-column.component-CsqKKwwF.mjs} +27 -16
  8. package/fesm2022/acorex-platform-module-common-client-audit-info-column.component-CsqKKwwF.mjs.map +1 -0
  9. package/fesm2022/{acorex-platform-module-common-client-audit-info-edit.component-CSsCG6Dz.mjs → acorex-platform-module-common-client-audit-info-edit.component-COMMBgsX.mjs} +20 -18
  10. package/fesm2022/acorex-platform-module-common-client-audit-info-edit.component-COMMBgsX.mjs.map +1 -0
  11. package/fesm2022/{acorex-platform-module-common-client-audit-info-view.component-WYXsZcLg.mjs → acorex-platform-module-common-client-audit-info-view.component-UOTT-ir_.mjs} +20 -18
  12. package/fesm2022/acorex-platform-module-common-client-audit-info-view.component-UOTT-ir_.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-common-client-bulk-archive-entity.command-EIlMyuII.mjs +66 -0
  14. package/fesm2022/acorex-platform-module-common-client-bulk-archive-entity.command-EIlMyuII.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-common-client-bulk-disable-entity.command-DgoZVXQA.mjs +65 -0
  16. package/fesm2022/acorex-platform-module-common-client-bulk-disable-entity.command-DgoZVXQA.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-common-client-bulk-enable-entity.command-C6fba__g.mjs +65 -0
  18. package/fesm2022/acorex-platform-module-common-client-bulk-enable-entity.command-C6fba__g.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-common-client-bulk-restore-archive-entity.command-C8T0gUAH.mjs +65 -0
  20. package/fesm2022/acorex-platform-module-common-client-bulk-restore-archive-entity.command-C8T0gUAH.mjs.map +1 -0
  21. package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-DFgIeWxX.mjs → acorex-platform-module-common-client-clone-entity.command-rTasIhWx.mjs} +26 -27
  22. package/fesm2022/acorex-platform-module-common-client-clone-entity.command-rTasIhWx.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-common-client-contracts.mjs +420 -8
  24. package/fesm2022/acorex-platform-module-common-client-contracts.mjs.map +1 -1
  25. package/fesm2022/{acorex-platform-module-common-client-disable-entity.command-DWyqAAwo.mjs → acorex-platform-module-common-client-disable-entity.command-Bc1uH38V.mjs} +8 -13
  26. package/fesm2022/acorex-platform-module-common-client-disable-entity.command-Bc1uH38V.mjs.map +1 -0
  27. package/fesm2022/{acorex-platform-module-common-client-disable-entity.command.util-BBwY9Q30.mjs → acorex-platform-module-common-client-disable-entity.command.util-DQl6u2nj.mjs} +49 -44
  28. package/fesm2022/acorex-platform-module-common-client-disable-entity.command.util-DQl6u2nj.mjs.map +1 -0
  29. package/fesm2022/{acorex-platform-module-common-client-enable-entity.command-BP30gOku.mjs → acorex-platform-module-common-client-enable-entity.command-DeTumWIj.mjs} +8 -13
  30. package/fesm2022/acorex-platform-module-common-client-enable-entity.command-DeTumWIj.mjs.map +1 -0
  31. package/fesm2022/{acorex-platform-module-common-client-get-current-time.command-B7hJTMzT.mjs → acorex-platform-module-common-client-get-current-time.command-Ck_SC5Bu.mjs} +6 -8
  32. package/fesm2022/acorex-platform-module-common-client-get-current-time.command-Ck_SC5Bu.mjs.map +1 -0
  33. package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-B0JFf8ms.mjs → acorex-platform-module-common-client-restore-archive-entity.command-Dr1GcC8a.mjs} +8 -13
  34. package/fesm2022/acorex-platform-module-common-client-restore-archive-entity.command-Dr1GcC8a.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-module-common-client-search-popup.component-DH0OQYoQ.mjs +139 -0
  36. package/fesm2022/acorex-platform-module-common-client-search-popup.component-DH0OQYoQ.mjs.map +1 -0
  37. package/fesm2022/acorex-platform-module-common-client-timeline-version-history-popup.component-BqTLeGtG.mjs +63 -0
  38. package/fesm2022/acorex-platform-module-common-client-timeline-version-history-popup.component-BqTLeGtG.mjs.map +1 -0
  39. package/fesm2022/acorex-platform-module-common-client.mjs +1 -1
  40. package/package.json +3 -3
  41. package/types/acorex-platform-module-common-client-contracts.d.ts +207 -3
  42. package/types/acorex-platform-module-common-client.d.ts +9 -13
  43. package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-rqWzT7RI.mjs.map +0 -1
  44. package/fesm2022/acorex-platform-module-common-client-archive-entity.command-CKENj9Od.mjs.map +0 -1
  45. package/fesm2022/acorex-platform-module-common-client-archive-entity.command.util-BZrXDNGP.mjs.map +0 -1
  46. package/fesm2022/acorex-platform-module-common-client-audit-info-column.component-DuZUwD31.mjs.map +0 -1
  47. package/fesm2022/acorex-platform-module-common-client-audit-info-edit.component-CSsCG6Dz.mjs.map +0 -1
  48. package/fesm2022/acorex-platform-module-common-client-audit-info-view.component-WYXsZcLg.mjs.map +0 -1
  49. package/fesm2022/acorex-platform-module-common-client-bulk-archive-entity.command-CPqLp9Ci.mjs +0 -75
  50. package/fesm2022/acorex-platform-module-common-client-bulk-archive-entity.command-CPqLp9Ci.mjs.map +0 -1
  51. package/fesm2022/acorex-platform-module-common-client-bulk-disable-entity.command-0J4vgsFL.mjs +0 -75
  52. package/fesm2022/acorex-platform-module-common-client-bulk-disable-entity.command-0J4vgsFL.mjs.map +0 -1
  53. package/fesm2022/acorex-platform-module-common-client-bulk-enable-entity.command-DsVuaInC.mjs +0 -75
  54. package/fesm2022/acorex-platform-module-common-client-bulk-enable-entity.command-DsVuaInC.mjs.map +0 -1
  55. package/fesm2022/acorex-platform-module-common-client-bulk-restore-archive-entity.command-D2y8h15u.mjs +0 -75
  56. package/fesm2022/acorex-platform-module-common-client-bulk-restore-archive-entity.command-D2y8h15u.mjs.map +0 -1
  57. package/fesm2022/acorex-platform-module-common-client-clone-entity.command-DFgIeWxX.mjs.map +0 -1
  58. package/fesm2022/acorex-platform-module-common-client-disable-entity.command-DWyqAAwo.mjs.map +0 -1
  59. package/fesm2022/acorex-platform-module-common-client-disable-entity.command.util-BBwY9Q30.mjs.map +0 -1
  60. package/fesm2022/acorex-platform-module-common-client-enable-entity.command-BP30gOku.mjs.map +0 -1
  61. package/fesm2022/acorex-platform-module-common-client-get-current-time.command-B7hJTMzT.mjs.map +0 -1
  62. package/fesm2022/acorex-platform-module-common-client-restore-archive-entity.command-B0JFf8ms.mjs.map +0 -1
  63. package/fesm2022/acorex-platform-module-common-client-search-popup.component-BjGrZHnB.mjs +0 -136
  64. package/fesm2022/acorex-platform-module-common-client-search-popup.component-BjGrZHnB.mjs.map +0 -1
  65. package/fesm2022/acorex-platform-module-common-client-timeline-version-history-popup.component-BwGLuNhW.mjs +0 -59
  66. package/fesm2022/acorex-platform-module-common-client-timeline-version-history-popup.component-BwGLuNhW.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-archive-entity.command-CKENj9Od.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/archive-plugin/commands/archive-entity.command.ts"],"sourcesContent":["import { AXPCommand } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult, 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): Promise<AXPExecuteCommandResult<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 await this.helper.showSuccessToast('@general:workflow.entity-archived', '@general:workflow.entity-archived-body');\n\n return { success: true };\n } catch (error) {\n console.error('Archive operation failed:', error);\n return {\n success: false,\n message: {\n text: error instanceof Error ? error.message : 'Archive operation failed',\n },\n };\n } finally {\n loadingDialog.close();\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;AAgDnE,IAAA;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OAAO,KAAK,EAAE;AACd,YAAA,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC;YACjD,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE;AACP,oBAAA,IAAI,EAAE,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,0BAA0B;AAC1E,iBAAA;aACF;QACH;gBAAU;YACR,aAAa,CAAC,KAAK,EAAE;QACvB;IACF;8GAjDW,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;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-archive-entity.command.util-BZrXDNGP.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/archive-plugin/archive-entity.events.ts","../../../../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 { createWorkFlowEvent } from '@acorex-platform/framework-client/workflow';\n\nexport const AXPEntityArchivedEvent = createWorkFlowEvent<{ entity: string; id: string; meta?: unknown }>(\n '[Entity] Archived',\n);\n\nexport const AXPEntityUnarchivedEvent = createWorkFlowEvent<{ entity: string; id: string; meta?: unknown }>(\n '[Entity] Unarchived',\n);\n\nexport const AXPEntityBulkArchivedEvent = createWorkFlowEvent<{\n entity: string;\n ids: string[];\n meta?: unknown;\n}>('[Entity] Bulk Archived');\n\nexport const AXPEntityBulkUnarchivedEvent = createWorkFlowEvent<{\n entity: string;\n ids: string[];\n meta?: unknown;\n}>('[Entity] Bulk Unarchived');\n","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, AXPRefreshEvent, AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPWorkflowEventService } from '@acorex-platform/framework-client/workflow';\nimport type { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { inject, Injectable } from '@angular/core';\n\nimport {\n AXPEntityArchivedEvent,\n AXPEntityBulkArchivedEvent,\n AXPEntityBulkUnarchivedEvent,\n AXPEntityUnarchivedEvent,\n} from '../archive-entity.events';\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 workflowEventService = inject(AXPWorkflowEventService);\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 await updateExec({ id: refId, ...patch });\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 dispatchArchived(refType: string, id: string, meta?: AXPContextData): void {\n this.workflowEventService.dispatch(AXPEntityArchivedEvent({ entity: refType, id, meta }));\n this.workflowEventService.dispatch(AXPRefreshEvent({ entity: refType, meta }));\n }\n\n dispatchUnarchived(refType: string, id: string, meta?: AXPContextData): void {\n this.workflowEventService.dispatch(AXPEntityUnarchivedEvent({ entity: refType, id, meta }));\n this.workflowEventService.dispatch(AXPRefreshEvent({ entity: refType, meta }));\n }\n\n dispatchBulkArchived(refType: string, ids: string[], meta?: AXPContextData): void {\n this.workflowEventService.dispatch(AXPEntityBulkArchivedEvent({ entity: refType, ids, meta }));\n this.workflowEventService.dispatch(\n AXPRefreshEvent({ entity: refType, meta: { refreshType: 'bulk-archive', ...meta } }),\n );\n }\n\n dispatchBulkUnarchived(refType: string, ids: string[], meta?: AXPContextData): void {\n this.workflowEventService.dispatch(AXPEntityBulkUnarchivedEvent({ entity: refType, ids, meta }));\n this.workflowEventService.dispatch(\n AXPRefreshEvent({ entity: refType, meta: { refreshType: 'bulk-unarchive', ...meta } }),\n );\n }\n}\n","import type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntity } from '@acorex-platform/framework-shared/entity';\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 ctx = input['__context__'] as AXPContextData | undefined;\n const options = (input['options'] ?? ctx?.['options'] ?? input) as AXPContextData;\n const data = ctx?.['data'] ?? input;\n const rowData = Array.isArray(data)\n ? (data[0] as AXPContextData | undefined)\n : (data as AXPContextData | undefined);\n\n const refType = String(\n options['refType'] ?? ctx?.['entity'] ?? (ctx?.['entityInfo'] as AXPContextData | undefined)?.['source'] ?? '',\n );\n const rawId = options['refId'] ?? rowData?.['id'] ?? rowData?.['_id'] ?? input['refId'];\n\n if (!refType || rawId == null || rawId === '') {\n return null;\n }\n\n return { refId: String(rawId), refType, rowData };\n}\n\nexport function normalizeArchiveBulkInput(input: AXPContextData): AXPBulkArchiveCommandContext | null {\n const ctx = input['__context__'] as AXPContextData | undefined;\n const options = (input['options'] ?? ctx?.['options'] ?? input) as AXPContextData;\n const data = ctx?.['data'] ?? input['data'] ?? input;\n const rows = (Array.isArray(data) ? data : data ? [data] : []) as AXPContextData[];\n\n const refType = String(\n options['refType'] ?? ctx?.['entity'] ?? (ctx?.['entityInfo'] as AXPContextData | undefined)?.['source'] ?? '',\n );\n const ids = rows.map((row) => row?.['id']).filter((id): id is string => id != null && id !== '');\n\n if (!refType || ids.length === 0) {\n return null;\n }\n\n return { refType, ids, rows };\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":";;;;;;;;;;;AAEO,MAAM,sBAAsB,GAAG,mBAAmB,CACvD,mBAAmB,CACpB;AAEM,MAAM,wBAAwB,GAAG,mBAAmB,CACzD,qBAAqB,CACtB;AAEM,MAAM,0BAA0B,GAAG,mBAAmB,CAI1D,wBAAwB,CAAC;AAErB,MAAM,4BAA4B,GAAG,mBAAmB,CAI5D,0BAA0B,CAAC;;ACD9B;;;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,oBAAoB,GAAG,MAAM,CAAC,uBAAuB,CAAC;AACtD,QAAA,IAAA,CAAA,g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AI,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 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-audit-info-column.component-DuZUwD31.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(createdEvent()?.at) }}</span>\n @if (createdEvent()?.by) {\n <span class=\"text-muted\"> • {{ formatUser(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(updatedEvent()?.at) }}</span>\n @if (updatedEvent()?.by) {\n <span class=\"text-muted\"> • {{ formatUser(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(deletedEvent()?.at) }}</span>\n @if (deletedEvent()?.by) {\n <span class=\"text-muted\"> • {{ formatUser(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]=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"file":"acorex-platform-module-common-client-audit-info-edit.component-CSsCG6Dz.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/history-plugin/components/audit-info-edit.component.ts"],"sourcesContent":["import { AXPRecordAuditInfo } from '@acorex-platform/framework-shared/entity';\nimport { AXFormatService } from '@acorex/core/format';\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\n\nimport { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'axp-audit-info-edit',\n template: `\n @if (auditInfo() && hasAnyAuditInfo()) {\n <div class=\"text-xs space-y-1\">\n @if (auditInfo()?.created) {\n <div>\n <span class=\"text-muted\">{{ '@general:terms.audit.created' | translate | async }}: </span>\n <span [dir]=\"'ltr'\">{{ formatDate(auditInfo()?.created?.at) }}</span>\n @if (auditInfo()?.created?.by) {\n <span class=\"text-muted\"> • {{ formatUser(auditInfo()?.created?.by) }}</span>\n }\n </div>\n }\n @if (auditInfo()?.updated) {\n <div>\n <span class=\"text-muted\">{{ '@general:terms.audit.updated' | translate | async }}: </span>\n <span [dir]=\"'ltr'\">{{ formatDate(auditInfo()?.updated?.at) }}</span>\n @if (auditInfo()?.updated?.by) {\n <span class=\"text-muted\"> • {{ formatUser(auditInfo()?.updated?.by) }}</span>\n }\n </div>\n }\n @if (auditInfo()?.deleted) {\n <div>\n <span class=\"text-muted\">{{ '@general:terms.audit.deleted' | translate | async }}: </span>\n <span [dir]=\"'ltr'\">{{ formatDate(auditInfo()?.deleted?.at) }}</span>\n @if (auditInfo()?.deleted?.by) {\n <span class=\"text-muted\"> • {{ formatUser(auditInfo()?.deleted?.by) }}</span>\n }\n </div>\n }\n </div>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, AXTranslationModule],\n})\nexport class AXPAuditInfoEditComponent extends AXPValueWidgetComponent<AXPRecordAuditInfo> {\n private readonly formatService = inject(AXFormatService);\n\n protected auditInfo = computed<AXPRecordAuditInfo | null>(() => {\n let value = this.getValue();\n\n if (!value) {\n const contextData = this.contextService.data() as Record<string, any>;\n if (contextData && 'auditInfo' in contextData) {\n value = contextData['auditInfo'];\n }\n }\n\n return value && typeof value === 'object' ? (value as AXPRecordAuditInfo) : null;\n });\n\n protected hasAnyAuditInfo = computed<boolean>(() => {\n const info = this.auditInfo();\n return !!(info?.created || info?.updated || info?.deleted);\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"],"names":["i2"],"mappings":";;;;;;;;;AA8CM,MAAO,yBAA0B,SAAQ,uBAA2C,CAAA;AAtC1F,IAAA,WAAA,GAAA;;AAuCmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AAE9C,QAAA,IAAA,CAAA,SAAS,GAAG,QAAQ,CAA4B,MAAK;AAC7D,YAAA,IAAI,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE;YAE3B,IAAI,CAAC,KAAK,EAAE;gBACV,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,EAAyB;AACrE,gBAAA,IAAI,WAAW,IAAI,WAAW,IAAI,WAAW,EAAE;AAC7C,oBAAA,KAAK,GAAG,WAAW,CAAC,WAAW,CAAC;gBAClC;YACF;AAEA,YAAA,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,GAAI,KAA4B,GAAG,IAAI;AAClF,QAAA,CAAC,gFAAC;AAEQ,QAAA,IAAA,CAAA,eAAe,GAAG,QAAQ,CAAU,MAAK;AACjD,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAC7B,YAAA,O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BAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEhC,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAtCrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,CAAC;AAC7C,iBAAA;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-audit-info-view.component-WYXsZcLg.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/history-plugin/components/audit-info-view.component.ts"],"sourcesContent":["import { AXPRecordAuditInfo } from '@acorex-platform/framework-shared/entity';\nimport { AXFormatService } from '@acorex/core/format';\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\n\nimport { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'axp-audit-info-view',\n template: `\n @if (auditInfo() && hasAnyAuditInfo()) {\n <div class=\"text-xs space-y-1\">\n @if (auditInfo()?.created) {\n <div>\n <span class=\"text-muted\">{{ '@general:terms.audit.created' | translate | async }}: </span>\n <span [dir]=\"'ltr'\">{{ formatDate(auditInfo()?.created?.at) }}</span>\n @if (auditInfo()?.created?.by) {\n <span class=\"text-muted\"> • {{ formatUser(auditInfo()?.created?.by) }}</span>\n }\n </div>\n }\n @if (auditInfo()?.updated) {\n <div>\n <span class=\"text-muted\">{{ '@general:terms.audit.updated' | translate | async }}: </span>\n <span [dir]=\"'ltr'\">{{ formatDate(auditInfo()?.updated?.at) }}</span>\n @if (auditInfo()?.updated?.by) {\n <span class=\"text-muted\"> • {{ formatUser(auditInfo()?.updated?.by) }}</span>\n }\n </div>\n }\n @if (auditInfo()?.deleted) {\n <div>\n <span class=\"text-muted\">{{ '@general:terms.audit.deleted' | translate | async }}: </span>\n <span [dir]=\"'ltr'\">{{ formatDate(auditInfo()?.deleted?.at) }}</span>\n @if (auditInfo()?.deleted?.by) {\n <span class=\"text-muted\"> • {{ formatUser(auditInfo()?.deleted?.by) }}</span>\n }\n </div>\n }\n </div>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, AXTranslationModule],\n})\nexport class AXPAuditInfoViewComponent extends AXPValueWidgetComponent<AXPRecordAuditInfo> {\n private readonly formatService = inject(AXFormatService);\n\n protected auditInfo = computed<AXPRecordAuditInfo | null>(() => {\n let value = this.getValue();\n\n if (!value) {\n const contextData = this.contextService.data() as Record<string, any>;\n if (contextData && 'auditInfo' in contextData) {\n value = contextData['auditInfo'];\n }\n }\n\n return value && typeof value === 'object' ? (value as AXPRecordAuditInfo) : null;\n });\n\n protected hasAnyAuditInfo = computed<boolean>(() => {\n const info = this.auditInfo();\n return !!(info?.created || info?.updated || info?.deleted);\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"],"names":["i2"],"mappings":";;;;;;;;;AA8CM,MAAO,yBAA0B,SAAQ,uBAA2C,CAAA;AAtC1F,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C7C,iBAAA;;;;;"}
@@ -1,75 +0,0 @@
1
- import { AXTranslationService } from '@acorex/core/translation';
2
- import * as i0 from '@angular/core';
3
- import { inject, Injectable } from '@angular/core';
4
- import { A as AXPArchiveEntityCommandHelper, c as normalizeArchiveBulkInput, b as buildArchivePatch } from './acorex-platform-module-common-client-archive-entity.command.util-BZrXDNGP.mjs';
5
-
6
- class AXPBulkArchiveEntityCommand {
7
- constructor() {
8
- this.helper = inject(AXPArchiveEntityCommandHelper);
9
- this.translationService = inject(AXTranslationService);
10
- }
11
- async execute(input) {
12
- const context = normalizeArchiveBulkInput(input);
13
- if (!context) {
14
- return {
15
- success: false,
16
- message: {
17
- text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),
18
- },
19
- };
20
- }
21
- const confirmed = await this.helper.confirm('@general:actions.bulk-archive.confirm.title', '@general:actions.bulk-archive.confirm.message', { count: context.ids.length });
22
- if (!confirmed) {
23
- return { success: false };
24
- }
25
- const loadingDialog = this.helper.showLoading(await this.translationService.translateAsync('@general:actions.bulk-archive.confirm.processing'), `Archiving ${context.ids.length} items...`);
26
- const processedIds = [];
27
- const failedIds = [];
28
- const patch = buildArchivePatch(true);
29
- try {
30
- for (const id of context.ids) {
31
- try {
32
- await this.helper.applyPatch(context.refType, id, patch);
33
- processedIds.push(id);
34
- }
35
- catch (error) {
36
- console.error(`Failed to archive entity ${id}:`, error);
37
- failedIds.push(id);
38
- }
39
- }
40
- if (processedIds.length > 0) {
41
- this.helper.dispatchBulkArchived(context.refType, processedIds, {
42
- failedIds,
43
- totalProcessed: processedIds.length,
44
- totalFailed: failedIds.length,
45
- });
46
- await this.helper.showSuccessToast('@general:workflow.entity-bulk-archived', '@general:workflow.entity-bulk-archived-body');
47
- }
48
- return {
49
- success: processedIds.length > 0,
50
- data: { processedIds, failedIds },
51
- };
52
- }
53
- catch (error) {
54
- console.error('Bulk archive operation failed:', error);
55
- return {
56
- success: false,
57
- message: {
58
- text: error instanceof Error ? error.message : 'Bulk archive operation failed',
59
- },
60
- };
61
- }
62
- finally {
63
- loadingDialog.close();
64
- }
65
- }
66
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBulkArchiveEntityCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
67
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBulkArchiveEntityCommand, providedIn: 'root' }); }
68
- }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBulkArchiveEntityCommand, decorators: [{
70
- type: Injectable,
71
- args: [{ providedIn: 'root' }]
72
- }] });
73
-
74
- export { AXPBulkArchiveEntityCommand };
75
- //# sourceMappingURL=acorex-platform-module-common-client-bulk-archive-entity.command-CPqLp9Ci.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-bulk-archive-entity.command-CPqLp9Ci.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/archive-plugin/commands/bulk-archive-entity.command.ts"],"sourcesContent":["import { AXPCommand } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult, type AXPContextData } from '@acorex-platform/framework-shared/core';\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, { processedIds: string[]; failedIds: string[] }>\n{\n private readonly helper = inject(AXPArchiveEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(\n input: AXPContextData,\n ): Promise<AXPExecuteCommandResult<{ processedIds: string[]; failedIds: string[] }>> {\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 loadingDialog = this.helper.showLoading(\n await this.translationService.translateAsync('@general:actions.bulk-archive.confirm.processing'),\n `Archiving ${context.ids.length} items...`,\n );\n\n const processedIds: string[] = [];\n const failedIds: string[] = [];\n const patch = buildArchivePatch(true);\n\n try {\n for (const id of context.ids) {\n try {\n await this.helper.applyPatch(context.refType, id, patch);\n processedIds.push(id);\n } catch (error) {\n console.error(`Failed to archive entity ${id}:`, error);\n failedIds.push(id);\n }\n }\n\n if (processedIds.length > 0) {\n this.helper.dispatchBulkArchived(context.refType, processedIds, {\n failedIds,\n totalProcessed: processedIds.length,\n totalFailed: failedIds.length,\n });\n await this.helper.showSuccessToast(\n '@general:workflow.entity-bulk-archived',\n '@general:workflow.entity-bulk-archived-body',\n );\n }\n\n return {\n success: processedIds.length > 0,\n data: { processedIds, failedIds },\n };\n } catch (error) {\n console.error('Bulk archive operation failed:', error);\n return {\n success: false,\n message: {\n text: error instanceof Error ? error.message : 'Bulk archive operation failed',\n },\n };\n } finally {\n loadingDialog.close();\n }\n }\n}\n"],"names":[],"mappings":";;;;;MASa,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;AAwEnE,IAAA;IAtEC,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,IAA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AAE,YAAY,CAAC,MAAM;oBACnC,WAAW,EAAE,SAAS,CAAC,MAAM;AAC9B,iBAAA,CAAC;gBACF,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAChC,wCAAwC,EACxC,6CAA6C,CAC9C;YACH;YAEA,OAAO;AACL,gBAAA,OAAO,EAAE,YAAY,CAAC,MAAM,GAAG,CAAC;AAChC,gBAAA,IAAI,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE;aAClC;QACH;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,KAAK,CAAC;YACtD,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE;AACP,oBAAA,IAAI,EAAE,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,+BAA+B;AAC/E,iBAAA;aACF;QACH;gBAAU;YACR,aAAa,CAAC,KAAK,EAAE;QACvB;IACF;8GA3EW,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;;;;;"}
@@ -1,75 +0,0 @@
1
- import { AXTranslationService } from '@acorex/core/translation';
2
- import * as i0 from '@angular/core';
3
- import { inject, Injectable } from '@angular/core';
4
- import { A as AXPDisableEntityCommandHelper, c as normalizeDisableBulkInput, b as buildDisablePatch } from './acorex-platform-module-common-client-disable-entity.command.util-BBwY9Q30.mjs';
5
-
6
- class AXPBulkDisableEntityCommand {
7
- constructor() {
8
- this.helper = inject(AXPDisableEntityCommandHelper);
9
- this.translationService = inject(AXTranslationService);
10
- }
11
- async execute(input) {
12
- const context = normalizeDisableBulkInput(input);
13
- if (!context) {
14
- return {
15
- success: false,
16
- message: {
17
- text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),
18
- },
19
- };
20
- }
21
- const confirmed = await this.helper.confirm('@general:actions.bulk-disable.confirm.title', '@general:actions.bulk-disable.confirm.message', { count: context.ids.length });
22
- if (!confirmed) {
23
- return { success: false };
24
- }
25
- const loadingDialog = this.helper.showLoading(await this.translationService.translateAsync('@general:actions.bulk-disable.confirm.processing'), 'Disabling items...');
26
- const processedIds = [];
27
- const failedIds = [];
28
- const patch = buildDisablePatch(true);
29
- try {
30
- for (const id of context.ids) {
31
- try {
32
- await this.helper.applyPatch(context.refType, id, patch);
33
- processedIds.push(id);
34
- }
35
- catch (error) {
36
- console.error(`Failed to disable entity ${id}:`, error);
37
- failedIds.push(id);
38
- }
39
- }
40
- if (processedIds.length > 0) {
41
- this.helper.dispatchBulkDisabled(context.refType, processedIds, {
42
- failedIds,
43
- totalProcessed: processedIds.length,
44
- totalFailed: failedIds.length,
45
- });
46
- await this.helper.showSuccessToast('@general:workflow.entity-bulk-disabled', '@general:workflow.entity-bulk-disabled-body');
47
- }
48
- return {
49
- success: processedIds.length > 0,
50
- data: { processedIds, failedIds },
51
- };
52
- }
53
- catch (error) {
54
- console.error('Bulk disable operation failed:', error);
55
- return {
56
- success: false,
57
- message: {
58
- text: error instanceof Error ? error.message : 'Bulk disable operation failed',
59
- },
60
- };
61
- }
62
- finally {
63
- loadingDialog.close();
64
- }
65
- }
66
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBulkDisableEntityCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
67
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBulkDisableEntityCommand, providedIn: 'root' }); }
68
- }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBulkDisableEntityCommand, decorators: [{
70
- type: Injectable,
71
- args: [{ providedIn: 'root' }]
72
- }] });
73
-
74
- export { AXPBulkDisableEntityCommand };
75
- //# sourceMappingURL=acorex-platform-module-common-client-bulk-disable-entity.command-0J4vgsFL.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-bulk-disable-entity.command-0J4vgsFL.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/disable-plugin/commands/bulk-disable-entity.command.ts"],"sourcesContent":["import { AXPCommand } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult, type AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPDisableEntityCommandHelper } from './disable-entity.command.helper';\nimport { buildDisablePatch, normalizeDisableBulkInput } from './disable-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPBulkDisableEntityCommand\n implements AXPCommand<AXPContextData, { processedIds: string[]; failedIds: string[] }>\n{\n private readonly helper = inject(AXPDisableEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(\n input: AXPContextData,\n ): Promise<AXPExecuteCommandResult<{ processedIds: string[]; failedIds: string[] }>> {\n const context = normalizeDisableBulkInput(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-disable.confirm.title',\n '@general:actions.bulk-disable.confirm.message',\n { count: context.ids.length },\n );\n if (!confirmed) {\n return { success: false };\n }\n\n const loadingDialog = this.helper.showLoading(\n await this.translationService.translateAsync('@general:actions.bulk-disable.confirm.processing'),\n 'Disabling items...',\n );\n\n const processedIds: string[] = [];\n const failedIds: string[] = [];\n const patch = buildDisablePatch(true);\n\n try {\n for (const id of context.ids) {\n try {\n await this.helper.applyPatch(context.refType, id, patch);\n processedIds.push(id);\n } catch (error) {\n console.error(`Failed to disable entity ${id}:`, error);\n failedIds.push(id);\n }\n }\n\n if (processedIds.length > 0) {\n this.helper.dispatchBulkDisabled(context.refType, processedIds, {\n failedIds,\n totalProcessed: processedIds.length,\n totalFailed: failedIds.length,\n });\n await this.helper.showSuccessToast(\n '@general:workflow.entity-bulk-disabled',\n '@general:workflow.entity-bulk-disabled-body',\n );\n }\n\n return {\n success: processedIds.length > 0,\n data: { processedIds, failedIds },\n };\n } catch (error) {\n console.error('Bulk disable operation failed:', error);\n return {\n success: false,\n message: {\n text: error instanceof Error ? error.message : 'Bulk disable operation failed',\n },\n };\n } finally {\n loadingDialog.close();\n }\n }\n}\n"],"names":[],"mappings":";;;;;MASa,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;AAwEnE,IAAA;IAtEC,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,EAA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AAC,KAAK,CAAC,gCAAgC,EAAE,KAAK,CAAC;YACtD,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE;AACP,oBAAA,IAAI,EAAE,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,+BAA+B;AAC/E,iBAAA;aACF;QACH;gBAAU;YACR,aAAa,CAAC,KAAK,EAAE;QACvB;IACF;8GA3EW,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;;;;;"}
@@ -1,75 +0,0 @@
1
- import { AXTranslationService } from '@acorex/core/translation';
2
- import * as i0 from '@angular/core';
3
- import { inject, Injectable } from '@angular/core';
4
- import { A as AXPDisableEntityCommandHelper, c as normalizeDisableBulkInput, b as buildDisablePatch } from './acorex-platform-module-common-client-disable-entity.command.util-BBwY9Q30.mjs';
5
-
6
- class AXPBulkEnableEntityCommand {
7
- constructor() {
8
- this.helper = inject(AXPDisableEntityCommandHelper);
9
- this.translationService = inject(AXTranslationService);
10
- }
11
- async execute(input) {
12
- const context = normalizeDisableBulkInput(input);
13
- if (!context) {
14
- return {
15
- success: false,
16
- message: {
17
- text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),
18
- },
19
- };
20
- }
21
- const confirmed = await this.helper.confirm('@general:actions.bulk-enable.confirm.title', '@general:actions.bulk-enable.confirm.message', { count: context.ids.length }, 'success');
22
- if (!confirmed) {
23
- return { success: false };
24
- }
25
- const loadingDialog = this.helper.showLoading(await this.translationService.translateAsync('@general:actions.bulk-enable.confirm.processing'), 'Enabling items...');
26
- const processedIds = [];
27
- const failedIds = [];
28
- const patch = buildDisablePatch(false);
29
- try {
30
- for (const id of context.ids) {
31
- try {
32
- await this.helper.applyPatch(context.refType, id, patch);
33
- processedIds.push(id);
34
- }
35
- catch (error) {
36
- console.error(`Failed to enable entity ${id}:`, error);
37
- failedIds.push(id);
38
- }
39
- }
40
- if (processedIds.length > 0) {
41
- this.helper.dispatchBulkEnabled(context.refType, processedIds, {
42
- failedIds,
43
- totalProcessed: processedIds.length,
44
- totalFailed: failedIds.length,
45
- });
46
- await this.helper.showSuccessToast('@general:workflow.entity-bulk-enabled', '@general:workflow.entity-bulk-enabled-body');
47
- }
48
- return {
49
- success: processedIds.length > 0,
50
- data: { processedIds, failedIds },
51
- };
52
- }
53
- catch (error) {
54
- console.error('Bulk enable operation failed:', error);
55
- const message = error instanceof Error ? error.message : 'Bulk enable operation failed';
56
- await this.helper.showErrorToast(message);
57
- return {
58
- success: false,
59
- message: { text: message },
60
- };
61
- }
62
- finally {
63
- loadingDialog.close();
64
- }
65
- }
66
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBulkEnableEntityCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
67
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBulkEnableEntityCommand, providedIn: 'root' }); }
68
- }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBulkEnableEntityCommand, decorators: [{
70
- type: Injectable,
71
- args: [{ providedIn: 'root' }]
72
- }] });
73
-
74
- export { AXPBulkEnableEntityCommand };
75
- //# sourceMappingURL=acorex-platform-module-common-client-bulk-enable-entity.command-DsVuaInC.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-bulk-enable-entity.command-DsVuaInC.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/disable-plugin/commands/bulk-enable-entity.command.ts"],"sourcesContent":["import { AXPCommand } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult, type AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPDisableEntityCommandHelper } from './disable-entity.command.helper';\nimport { buildDisablePatch, normalizeDisableBulkInput } from './disable-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPBulkEnableEntityCommand\n implements AXPCommand<AXPContextData, { processedIds: string[]; failedIds: string[] }>\n{\n private readonly helper = inject(AXPDisableEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(\n input: AXPContextData,\n ): Promise<AXPExecuteCommandResult<{ processedIds: string[]; failedIds: string[] }>> {\n const context = normalizeDisableBulkInput(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-enable.confirm.title',\n '@general:actions.bulk-enable.confirm.message',\n { count: context.ids.length },\n 'success',\n );\n if (!confirmed) {\n return { success: false };\n }\n\n const loadingDialog = this.helper.showLoading(\n await this.translationService.translateAsync('@general:actions.bulk-enable.confirm.processing'),\n 'Enabling items...',\n );\n\n const processedIds: string[] = [];\n const failedIds: string[] = [];\n const patch = buildDisablePatch(false);\n\n try {\n for (const id of context.ids) {\n try {\n await this.helper.applyPatch(context.refType, id, patch);\n processedIds.push(id);\n } catch (error) {\n console.error(`Failed to enable entity ${id}:`, error);\n failedIds.push(id);\n }\n }\n\n if (processedIds.length > 0) {\n this.helper.dispatchBulkEnabled(context.refType, processedIds, {\n failedIds,\n totalProcessed: processedIds.length,\n totalFailed: failedIds.length,\n });\n await this.helper.showSuccessToast(\n '@general:workflow.entity-bulk-enabled',\n '@general:workflow.entity-bulk-enabled-body',\n );\n }\n\n return {\n success: processedIds.length > 0,\n data: { processedIds, failedIds },\n };\n } catch (error) {\n console.error('Bulk enable operation failed:', error);\n const message = error instanceof Error ? error.message : 'Bulk enable operation failed';\n await this.helper.showErrorToast(message);\n return {\n success: false,\n message: { text: message },\n };\n } finally {\n loadingDialog.close();\n }\n }\n}\n"],"names":[],"mappings":";;;;;MASa,0BAA0B,CAAA;AADvC,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAC9C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAyEnE,IAAA;IAvEC,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,4CAA4C,EAC5C,8CAA8C,EAC9C,EAAE,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,EAC7B,SAAS,CACV;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,iDAAiD,CAAC,EAC/F,mBAAmB,CACpB;QAED,MAAM,YAAY,GAAa,EAAE;QACjC,MAAM,SAAS,GAAa,EAAE;AAC9B,QAAA,MAAM,KAAK,GAAG,iBAAiB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AE,OAAO,EAAE;aAC3B;QACH;gBAAU;YACR,aAAa,CAAC,KAAK,EAAE;QACvB;IACF;8GA5EW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA1B,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,0BAA0B,cADb,MAAM,EAAA,CAAA,CAAA;;2FACnB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
@@ -1,75 +0,0 @@
1
- import { AXTranslationService } from '@acorex/core/translation';
2
- import * as i0 from '@angular/core';
3
- import { inject, Injectable } from '@angular/core';
4
- import { A as AXPArchiveEntityCommandHelper, c as normalizeArchiveBulkInput, b as buildArchivePatch } from './acorex-platform-module-common-client-archive-entity.command.util-BZrXDNGP.mjs';
5
-
6
- class AXPBulkRestoreArchiveEntityCommand {
7
- constructor() {
8
- this.helper = inject(AXPArchiveEntityCommandHelper);
9
- this.translationService = inject(AXTranslationService);
10
- }
11
- async execute(input) {
12
- const context = normalizeArchiveBulkInput(input);
13
- if (!context) {
14
- return {
15
- success: false,
16
- message: {
17
- text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),
18
- },
19
- };
20
- }
21
- const confirmed = await this.helper.confirm('@general:actions.bulk-restore-archive.confirm.title', '@general:actions.bulk-restore-archive.confirm.message', { count: context.ids.length });
22
- if (!confirmed) {
23
- return { success: false };
24
- }
25
- const loadingDialog = this.helper.showLoading(await this.translationService.translateAsync('@general:actions.bulk-restore-archive.confirm.processing'), `Unarchiving ${context.ids.length} items...`);
26
- const processedIds = [];
27
- const failedIds = [];
28
- const patch = buildArchivePatch(false);
29
- try {
30
- for (const id of context.ids) {
31
- try {
32
- await this.helper.applyPatch(context.refType, id, patch);
33
- processedIds.push(id);
34
- }
35
- catch (error) {
36
- console.error(`Failed to unarchive entity ${id}:`, error);
37
- failedIds.push(id);
38
- }
39
- }
40
- if (processedIds.length > 0) {
41
- this.helper.dispatchBulkUnarchived(context.refType, processedIds, {
42
- failedIds,
43
- totalProcessed: processedIds.length,
44
- totalFailed: failedIds.length,
45
- });
46
- await this.helper.showSuccessToast('@general:workflow.entity-bulk-unarchived', '@general:workflow.entity-bulk-unarchived-body');
47
- }
48
- return {
49
- success: processedIds.length > 0,
50
- data: { processedIds, failedIds },
51
- };
52
- }
53
- catch (error) {
54
- console.error('Bulk unarchive operation failed:', error);
55
- return {
56
- success: false,
57
- message: {
58
- text: error instanceof Error ? error.message : 'Bulk unarchive operation failed',
59
- },
60
- };
61
- }
62
- finally {
63
- loadingDialog.close();
64
- }
65
- }
66
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBulkRestoreArchiveEntityCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
67
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBulkRestoreArchiveEntityCommand, providedIn: 'root' }); }
68
- }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBulkRestoreArchiveEntityCommand, decorators: [{
70
- type: Injectable,
71
- args: [{ providedIn: 'root' }]
72
- }] });
73
-
74
- export { AXPBulkRestoreArchiveEntityCommand };
75
- //# sourceMappingURL=acorex-platform-module-common-client-bulk-restore-archive-entity.command-D2y8h15u.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-bulk-restore-archive-entity.command-D2y8h15u.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/archive-plugin/commands/bulk-restore-archive-entity.command.ts"],"sourcesContent":["import { AXPCommand } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult, type AXPContextData } from '@acorex-platform/framework-shared/core';\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, { processedIds: string[]; failedIds: string[] }>\n{\n private readonly helper = inject(AXPArchiveEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(\n input: AXPContextData,\n ): Promise<AXPExecuteCommandResult<{ processedIds: string[]; failedIds: string[] }>> {\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 loadingDialog = this.helper.showLoading(\n await this.translationService.translateAsync('@general:actions.bulk-restore-archive.confirm.processing'),\n `Unarchiving ${context.ids.length} items...`,\n );\n\n const processedIds: string[] = [];\n const failedIds: string[] = [];\n const patch = buildArchivePatch(false);\n\n try {\n for (const id of context.ids) {\n try {\n await this.helper.applyPatch(context.refType, id, patch);\n processedIds.push(id);\n } catch (error) {\n console.error(`Failed to unarchive entity ${id}:`, error);\n failedIds.push(id);\n }\n }\n\n if (processedIds.length > 0) {\n this.helper.dispatchBulkUnarchived(context.refType, processedIds, {\n failedIds,\n totalProcessed: processedIds.length,\n totalFailed: failedIds.length,\n });\n await this.helper.showSuccessToast(\n '@general:workflow.entity-bulk-unarchived',\n '@general:workflow.entity-bulk-unarchived-body',\n );\n }\n\n return {\n success: processedIds.length > 0,\n data: { processedIds, failedIds },\n };\n } catch (error) {\n console.error('Bulk unarchive operation failed:', error);\n return {\n success: false,\n message: {\n text: error instanceof Error ? error.message : 'Bulk unarchive operation failed',\n },\n };\n } finally {\n loadingDialog.close();\n }\n }\n}\n"],"names":[],"mappings":";;;;;MASa,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;AAwEnE,IAAA;IAtEC,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,qDAAqD,EACrD,uDAAuD,EACvD,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,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAC3C,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,0DAA0D,CAAC,EACxG,CAAA,YAAA,EAAe,OAAO,CAAC,GAAG,CAAC,MAAM,CAAA,SAAA,CAAW,CAC7C;QAED,MAAM,YAAY,GAAa,EAAE;QACjC,MAAM,SAAS,GAAa,EAAE;AAC9B,QAAA,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC;AAEtC,QAAA,IAAI;AACF,YAAA,KAAK,MAAM,EAAE,IAAI,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AA,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 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-clone-entity.command-DFgIeWxX.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/clone-plugin/clone-entity.events.ts","../../../../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 { createWorkFlowEvent } from '@acorex-platform/framework-client/workflow';\n\nexport const AXPEntityClonedEvent = createWorkFlowEvent<{\n entity: string;\n originalId: string;\n newId: string;\n meta?: unknown;\n}>('[Entity] Cloned');\n","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, AXPRefreshEvent, AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPWorkflowEventService } from '@acorex-platform/framework-client/workflow';\nimport type { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPEntityClonedEvent } from '../clone-entity.events';\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 workflowEventService = inject(AXPWorkflowEventService);\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.workflowEventService.dispatch(\n AXPEntityClonedEvent({ entity: refType, originalId, newId, meta }),\n );\n this.workflowEventService.dispatch(AXPRefreshEvent({ entity: refType, meta }));\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';\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 ctx = input['__context__'] as AXPContextData | undefined;\n const options = (input['options'] ?? ctx?.['options'] ?? input) as AXPContextData;\n const data = ctx?.['data'] ?? input;\n const rowData = Array.isArray(data)\n ? (data[0] as AXPContextData | undefined)\n : (data as AXPContextData | undefined);\n\n const refType = String(\n options['refType'] ?? ctx?.['entity'] ?? (ctx?.['entityInfo'] as AXPContextData | undefined)?.['source'] ?? '',\n );\n const rawId = options['refId'] ?? rowData?.['id'] ?? rowData?.['_id'] ?? input['refId'];\n\n if (!refType || rawId == null || rawId === '') {\n return null;\n }\n\n return { refId: String(rawId), refType, rowData };\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 } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult, 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): Promise<AXPExecuteCommandResult<{ 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, 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":";;;;;;;;;;;AAEO,MAAM,oBAAoB,GAAG,mBAAmB,CAKpD,iBAAiB,CAAC;;MCOR,2BAA2B,CAAA;AADxC,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,oBAAoB,GAAG,MAAM,CAAC,uBAAuB,CAAC;AA6ExE,IAAA;IA3EC,MAAM,aAAa,CAAC,OAAe,EAAA;AACjC,QAAA,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;QACnD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC;IAC5D;AAEA,IAAA,MAAM,eAAe,CAAC,OAAe,EAAE,KAAa,EAAA;QAClD,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;AAE1D,QAAA,IAAI,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE;YACnC,MAAM,SAAS,GAAG,gBAAg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,EAAA,IAAA,EAAA,qBAAqB,cADR,MAAM,EAAA,CAAA,CAAA;;2FACnB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-disable-entity.command-DWyqAAwo.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/disable-plugin/commands/disable-entity.command.ts"],"sourcesContent":["import { AXPCommand } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult, type AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPDisableEntityCommandHelper } from './disable-entity.command.helper';\nimport { buildDisablePatch, buildDisableRefreshMeta, normalizeDisableSingleInput } from './disable-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPDisableEntityCommand implements AXPCommand<AXPContextData, void> {\n private readonly helper = inject(AXPDisableEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(input: AXPContextData): Promise<AXPExecuteCommandResult<void>> {\n const context = normalizeDisableSingleInput(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.disable.confirm.title',\n '@general:actions.disable.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.disable.confirm.processing'),\n 'Disabling...',\n );\n\n try {\n const entityDefinition = await this.helper.resolveEntity(context.refType);\n const patch = buildDisablePatch(true);\n await this.helper.applyPatch(context.refType, context.refId, patch);\n\n const meta = buildDisableRefreshMeta(entityDefinition, context.rowData);\n this.helper.dispatchDisabled(context.refType, context.refId, meta);\n await this.helper.showSuccessToast(\n '@general:workflow.entity-disabled',\n '@general:workflow.entity-disabled-body',\n );\n\n return { success: true };\n } catch (error) {\n console.error('Disable operation failed:', error);\n return {\n success: false,\n message: {\n text: error instanceof Error ? error.message : 'Disable operation failed',\n },\n };\n } finally {\n loadingDialog.close();\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;AAmDnE,IAAA;IAjDC,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,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAChC,mCAAmC,EACnC,wCAAwC,CACzC;AAED,YAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;QAC1B;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC;YACjD,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE;AACP,oBAAA,IAAI,EAAE,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,0BAA0B;AAC1E,iBAAA;aACF;QACH;gBAAU;YACR,aAAa,CAAC,KAAK,EAAE;QACvB;IACF;8GApDW,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;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-disable-entity.command.util-BBwY9Q30.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/disable-plugin/disable-entity.events.ts","../../../../libs/modules/common/client/src/lib/features/disable-plugin/commands/disable-entity.command.helper.ts","../../../../libs/modules/common/client/src/lib/features/disable-plugin/commands/disable-entity.command.util.ts"],"sourcesContent":["import { createWorkFlowEvent } from '@acorex-platform/framework-client/workflow';\n\nexport const AXPEntityDisabledEvent = createWorkFlowEvent<{ entity: string; id: string; meta?: unknown }>(\n '[Entity] Disabled',\n);\n\nexport const AXPEntityEnabledEvent = createWorkFlowEvent<{ entity: string; id: string; meta?: unknown }>(\n '[Entity] Enabled',\n);\n\nexport const AXPEntityBulkDisabledEvent = createWorkFlowEvent<{\n entity: string;\n ids: string[];\n meta?: unknown;\n}>('[Entity] Bulk Disabled');\n\nexport const AXPEntityBulkEnabledEvent = createWorkFlowEvent<{\n entity: string;\n ids: string[];\n meta?: unknown;\n}>('[Entity] Bulk Enabled');\n","import { AXDialogService } from '@acorex/components/dialog';\nimport { AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXStyleColorType } from '@acorex/cdk/common';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { AXPCommonSettings, AXPRefreshEvent, AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPWorkflowEventService } from '@acorex-platform/framework-client/workflow';\nimport type { AXPEntity } from '@acorex-platform/framework-shared/entity';\nimport { inject, Injectable } from '@angular/core';\n\nimport {\n AXPEntityBulkDisabledEvent,\n AXPEntityBulkEnabledEvent,\n AXPEntityDisabledEvent,\n AXPEntityEnabledEvent,\n} from '../disable-entity.events';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPDisableEntityCommandHelper {\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 workflowEventService = inject(AXPWorkflowEventService);\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 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 await updateExec({ id: refId, ...patch });\n }\n\n async confirm(\n titleKey: string,\n messageKey: string,\n messageParams?: AXPContextData,\n color: AXStyleColorType = 'warning',\n ): Promise<boolean> {\n const dialogResult = await this.dialogService.confirm(\n await this.translationService.translateAsync(titleKey),\n await this.translationService.translateAsync(messageKey, { params: messageParams }),\n color,\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 showErrorToast(message: string): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled || !message.trim()) {\n return;\n }\n\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:state-message.error.title'),\n content: message,\n closeButton: true,\n timeOut: 6000,\n timeOutProgress: true,\n });\n }\n\n dispatchDisabled(refType: string, id: string, meta?: AXPContextData): void {\n this.workflowEventService.dispatch(AXPEntityDisabledEvent({ entity: refType, id, meta }));\n this.workflowEventService.dispatch(AXPRefreshEvent({ entity: refType, meta }));\n }\n\n dispatchEnabled(refType: string, id: string, meta?: AXPContextData): void {\n this.workflowEventService.dispatch(AXPEntityEnabledEvent({ entity: refType, id, meta }));\n this.workflowEventService.dispatch(AXPRefreshEvent({ entity: refType, meta }));\n }\n\n dispatchBulkDisabled(refType: string, ids: string[], meta?: AXPContextData): void {\n this.workflowEventService.dispatch(AXPEntityBulkDisabledEvent({ entity: refType, ids, meta }));\n this.workflowEventService.dispatch(\n AXPRefreshEvent({ entity: refType, meta: { refreshType: 'bulk-disable', ...meta } }),\n );\n }\n\n dispatchBulkEnabled(refType: string, ids: string[], meta?: AXPContextData): void {\n this.workflowEventService.dispatch(AXPEntityBulkEnabledEvent({ entity: refType, ids, meta }));\n this.workflowEventService.dispatch(\n AXPRefreshEvent({ entity: refType, meta: { refreshType: 'bulk-enable', ...meta } }),\n );\n }\n}\n","import type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntity } from '@acorex-platform/framework-shared/entity';\n\nexport const DEFAULT_DISABLE_FIELD = 'isDisabled';\nexport const DISABLE_TIMESTAMP_FIELD = 'disabledAt';\nexport const ENABLE_TIMESTAMP_FIELD = 'enabledAt';\n\nexport interface AXPDisableCommandContext {\n refId: string;\n refType: string;\n rowData?: AXPContextData;\n}\n\nexport interface AXPBulkDisableCommandContext {\n refType: string;\n ids: string[];\n rows: AXPContextData[];\n}\n\nexport function normalizeDisableSingleInput(input: AXPContextData): AXPDisableCommandContext | null {\n const ctx = input['__context__'] as AXPContextData | undefined;\n const options = (input['options'] ?? ctx?.['options'] ?? input) as AXPContextData;\n const data = ctx?.['data'] ?? input;\n const rowData = Array.isArray(data)\n ? (data[0] as AXPContextData | undefined)\n : (data as AXPContextData | undefined);\n\n const refType = String(\n options['refType'] ?? ctx?.['entity'] ?? (ctx?.['entityInfo'] as AXPContextData | undefined)?.['source'] ?? '',\n );\n const rawId = options['refId'] ?? rowData?.['id'] ?? rowData?.['_id'] ?? input['refId'];\n\n if (!refType || rawId == null || rawId === '') {\n return null;\n }\n\n return { refId: String(rawId), refType, rowData };\n}\n\nexport function normalizeDisableBulkInput(input: AXPContextData): AXPBulkDisableCommandContext | null {\n const ctx = input['__context__'] as AXPContextData | undefined;\n const options = (input['options'] ?? ctx?.['options'] ?? input) as AXPContextData;\n const data = ctx?.['data'] ?? input['data'] ?? input;\n const rows = (Array.isArray(data) ? data : data ? [data] : []) as AXPContextData[];\n\n const refType = String(\n options['refType'] ?? ctx?.['entity'] ?? (ctx?.['entityInfo'] as AXPContextData | undefined)?.['source'] ?? '',\n );\n const ids = rows.map((row) => row?.['id']).filter((id): id is string => id != null && id !== '');\n\n if (!refType || ids.length === 0) {\n return null;\n }\n\n return { refType, ids, rows };\n}\n\nexport function buildDisablePatch(disabled: boolean): AXPContextData {\n if (disabled) {\n return { [DEFAULT_DISABLE_FIELD]: true, [DISABLE_TIMESTAMP_FIELD]: new Date() };\n }\n return {\n [DEFAULT_DISABLE_FIELD]: false,\n [DISABLE_TIMESTAMP_FIELD]: null,\n [ENABLE_TIMESTAMP_FIELD]: new Date(),\n };\n}\n\nexport function buildDisableRefreshMeta(\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":";;;;;;;;;;AAEO,MAAM,sBAAsB,GAAG,mBAAmB,CACvD,mBAAmB,CACpB;AAEM,MAAM,qBAAqB,GAAG,mBAAmB,CACtD,kBAAkB,CACnB;AAEM,MAAM,0BAA0B,GAAG,mBAAmB,CAI1D,wBAAwB,CAAC;AAErB,MAAM,yBAAyB,GAAG,mBAAmB,CAIzD,uBAAuB,CAAC;;MCAd,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,IA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,EAAE,IAAI,EAAE;AAC/B;AAEM,SAAU,iBAAiB,CAAC,QAAiB,EAAA;IACjD,IAAI,QAAQ,EAAE;AACZ,QAAA,OAAO,EAAE,CAAC,qBAAqB,GAAG,IAAI,EAAE,CAAC,uBAAuB,GAAG,IAAI,IAAI,EAAE,EAAE;IACjF;IACA,OAAO;QACL,CAAC,qBAAqB,GAAG,KAAK;QAC9B,CAAC,uBAAuB,GAAG,IAAI;AAC/B,QAAA,CAAC,sBAAsB,GAAG,IAAI,IAAI,EAAE;KACrC;AACH;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 +0,0 @@
1
- {"version":3,"file":"acorex-platform-module-common-client-enable-entity.command-BP30gOku.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/disable-plugin/commands/enable-entity.command.ts"],"sourcesContent":["import { AXPCommand } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult, type AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPDisableEntityCommandHelper } from './disable-entity.command.helper';\nimport { buildDisablePatch, buildDisableRefreshMeta, normalizeDisableSingleInput } from './disable-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPEnableEntityCommand implements AXPCommand<AXPContextData, void> {\n private readonly helper = inject(AXPDisableEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(input: AXPContextData): Promise<AXPExecuteCommandResult<void>> {\n const context = normalizeDisableSingleInput(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.enable.confirm.title',\n '@general:actions.enable.confirm.message',\n undefined,\n 'success',\n );\n if (!confirmed) {\n return { success: false };\n }\n\n const loadingDialog = this.helper.showLoading(\n await this.translationService.translateAsync('@general:actions.enable.confirm.processing'),\n 'Enabling...',\n );\n\n try {\n const entityDefinition = await this.helper.resolveEntity(context.refType);\n const patch = buildDisablePatch(false);\n await this.helper.applyPatch(context.refType, context.refId, patch);\n\n const meta = buildDisableRefreshMeta(entityDefinition, context.rowData);\n this.helper.dispatchEnabled(context.refType, context.refId, meta);\n await this.helper.showSuccessToast(\n '@general:workflow.entity-enabled',\n '@general:workflow.entity-enabled-body',\n );\n\n return { success: true };\n } catch (error) {\n console.error('Enable operation failed:', error);\n const message = error instanceof Error ? error.message : 'Enable operation failed';\n await this.helper.showErrorToast(message);\n return {\n success: false,\n message: { text: message },\n };\n } finally {\n loadingDialog.close();\n }\n }\n}\n"],"names":[],"mappings":";;;;;MASa,sBAAsB,CAAA;AADnC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAC9C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAqDnE,IAAA;IAnDC,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,CAC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