@acorex-platform/module-common-client 0.0.53 → 0.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{acorex-platform-module-common-client-acorex-platform-module-common-client-Cd7vTe3G.mjs → acorex-platform-module-common-client-acorex-platform-module-common-client-BtSt1xRl.mjs} +232 -39
- package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-BtSt1xRl.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-DiOJ6IkD.mjs → acorex-platform-module-common-client-archive-entity.command-BOV-yh5h.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-DiOJ6IkD.mjs.map → acorex-platform-module-common-client-archive-entity.command-BOV-yh5h.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-DhCNqo2R.mjs → acorex-platform-module-common-client-archive-entity.command.util-Cd65r7rb.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-DhCNqo2R.mjs.map → acorex-platform-module-common-client-archive-entity.command.util-Cd65r7rb.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs → acorex-platform-module-common-client-audit-info-column.component-DhYUlBgr.mjs} +9 -4
- package/fesm2022/acorex-platform-module-common-client-audit-info-column.component-DhYUlBgr.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-audit-info-edit.component-COMMBgsX.mjs → acorex-platform-module-common-client-audit-info-edit.component-aCgPXlef.mjs} +23 -2
- package/fesm2022/acorex-platform-module-common-client-audit-info-edit.component-aCgPXlef.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-audit-info-view.component-UOTT-ir_.mjs → acorex-platform-module-common-client-audit-info-view.component-lgzqcHCv.mjs} +23 -2
- package/fesm2022/acorex-platform-module-common-client-audit-info-view.component-lgzqcHCv.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-common-client-audit-info.util-CUlUTX8l.mjs +9 -0
- package/fesm2022/acorex-platform-module-common-client-audit-info.util-CUlUTX8l.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-D01227SB.mjs → acorex-platform-module-common-client-bulk-archive-entity.command-B-S45xY1.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-D01227SB.mjs.map → acorex-platform-module-common-client-bulk-archive-entity.command-B-S45xY1.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-CaTT2Rqd.mjs → acorex-platform-module-common-client-bulk-restore-archive-entity.command-CqZxZrkm.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-CaTT2Rqd.mjs.map → acorex-platform-module-common-client-bulk-restore-archive-entity.command-CqZxZrkm.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-BxT9kdpw.mjs → acorex-platform-module-common-client-clone-entity.command-DmmdZyoL.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-BxT9kdpw.mjs.map → acorex-platform-module-common-client-clone-entity.command-DmmdZyoL.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-common-client-contracts.mjs +57 -1
- package/fesm2022/acorex-platform-module-common-client-contracts.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs → acorex-platform-module-common-client-create-entity-version-draft.command-CbLI7jvZ.mjs} +14 -2
- package/fesm2022/acorex-platform-module-common-client-create-entity-version-draft.command-CbLI7jvZ.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs → acorex-platform-module-common-client-delete-entity-version-draft.command-CLWHs4DO.mjs} +14 -2
- package/fesm2022/acorex-platform-module-common-client-delete-entity-version-draft.command-CLWHs4DO.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs → acorex-platform-module-common-client-publish-entity-version.command-JNy0K1ZR.mjs} +14 -2
- package/fesm2022/acorex-platform-module-common-client-publish-entity-version.command-JNy0K1ZR.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-BWF8iH1Z.mjs → acorex-platform-module-common-client-restore-archive-entity.command-Bami3ybY.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-BWF8iH1Z.mjs.map → acorex-platform-module-common-client-restore-archive-entity.command-Bami3ybY.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-search-popup.component-B4LA5yh1.mjs → acorex-platform-module-common-client-search-popup.component-DVE0Hc3g.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-search-popup.component-B4LA5yh1.mjs.map → acorex-platform-module-common-client-search-popup.component-DVE0Hc3g.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-common-client-show-entity-version-history.command-CoFbuUYP.mjs +553 -0
- package/fesm2022/acorex-platform-module-common-client-show-entity-version-history.command-CoFbuUYP.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-CPmN0kme.mjs → acorex-platform-module-common-client-timeline-version-history-popup.component-Ap83-gMD.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-CPmN0kme.mjs.map → acorex-platform-module-common-client-timeline-version-history-popup.component-Ap83-gMD.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs → acorex-platform-module-common-client-versioning-entity.command.util-Bibv8EgV.mjs} +18 -1
- package/fesm2022/acorex-platform-module-common-client-versioning-entity.command.util-Bibv8EgV.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-common-client.mjs +1 -1
- package/i18n/en-AU/_feature-sample.json +47 -0
- package/i18n/en-AU/_module-sample.json +114 -0
- package/i18n/en-AU/common.json +1164 -0
- package/i18n/en-AU/global-search.json +38 -0
- package/i18n/en-AU/lock-system.json +66 -0
- package/i18n/en-US/_feature-sample.json +47 -0
- package/i18n/en-US/_module-sample.json +114 -0
- package/i18n/en-US/common.json +1164 -0
- package/i18n/en-US/global-search.json +38 -0
- package/i18n/en-US/lock-system.json +66 -0
- package/i18n/fa-IR/_feature-sample.json +48 -0
- package/i18n/fa-IR/_module-sample.json +115 -0
- package/i18n/fa-IR/common.json +1164 -0
- package/i18n/fa-IR/global-search.json +38 -0
- package/i18n/fa-IR/lock-system.json +66 -0
- package/package.json +1 -1
- package/types/acorex-platform-module-common-client-contracts.d.ts +42 -2
- package/types/acorex-platform-module-common-client.d.ts +5 -1
- package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-Cd7vTe3G.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-audit-info-edit.component-COMMBgsX.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-audit-info-view.component-UOTT-ir_.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs.map +0 -1
package/fesm2022/acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/history-plugin/components/audit-info-column.component.ts","../../../../libs/modules/common/client/src/lib/features/history-plugin/components/audit-info-column.component.html"],"sourcesContent":["import { AXPAuditEvent, AXPRecordAuditInfo } from '@acorex-platform/framework-shared/entity';\nimport { AXBadgeModule } from '@acorex/components/badge';\nimport { AXPColumnWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXPopoverComponent, AXPopoverModule } from '@acorex/components/popover';\nimport { AXFormatService } from '@acorex/core/format';\n\nimport { ChangeDetectionStrategy, Component, computed, ElementRef, inject, signal, viewChild } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\n\nconst SHOW_VERSION_HISTORY_POPUP_COMMAND = 'show-version-history-popup';\n\n@Component({\n selector: 'axp-audit-info-column',\n templateUrl: './audit-info-column.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, AXBadgeModule, AXButtonModule, AXPopoverModule, AXTranslationModule],\n inputs: ['rawValue', 'rowData'],\n})\nexport class AXPAuditInfoColumnComponent extends AXPColumnWidgetComponent<AXPRecordAuditInfo> {\n //#region ---- Dependencies ----\n\n private readonly formatService = inject(AXFormatService);\n private readonly commandService = inject(AXPCommandService);\n\n //#endregion\n\n //#region ---- View Children ----\n\n protected infoButton = viewChild<ElementRef>('infoButton');\n protected infoPopover = viewChild<AXPopoverComponent>('infoPopover');\n\n //#endregion\n\n //#region ---- Properties ----\n\n protected host = inject(ElementRef);\n protected isPopoverOpen = signal(false);\n\n //#endregion\n\n //#region ---- Computed Properties ----\n\n protected auditInfo = computed<AXPRecordAuditInfo | null>(() => {\n const value = this.rawValue;\n return value && typeof value === 'object' ? (value as AXPRecordAuditInfo) : null;\n });\n\n protected displayText = computed<string>(() => {\n const info = this.auditInfo();\n if (!info) {\n return '---';\n }\n\n if (info.updated?.at) {\n return this.formatAuditEvent(info.updated, 'updated');\n } else if (info.created?.at) {\n return this.formatAuditEvent(info.created, 'created');\n }\n\n return '---';\n });\n\n protected displayDate = computed<string>(() => {\n const info = this.auditInfo();\n if (!info) {\n return '';\n }\n\n if (info.updated?.at) {\n return this.formatDate(info.updated.at);\n } else if (info.created?.at) {\n return this.formatDate(info.created.at);\n }\n\n return '';\n });\n\n protected hasAuditInfo = computed<boolean>(() => {\n const info = this.auditInfo();\n return !!(info?.created || info?.updated || info?.deleted);\n });\n\n protected createdEvent = computed<AXPAuditEvent | null>(() => {\n return this.auditInfo()?.created ?? null;\n });\n\n protected updatedEvent = computed<AXPAuditEvent | null>(() => {\n return this.auditInfo()?.updated ?? null;\n });\n\n protected deletedEvent = computed<AXPAuditEvent | null>(() => {\n return this.auditInfo()?.deleted ?? null;\n });\n\n //#endregion\n\n //#region ---- Public Methods ----\n\n protected showInfo(): void {\n this.openPopover();\n }\n\n protected onPopoverOpenChange(event: any): void {\n this.isPopoverOpen.set(event);\n }\n\n protected formatDate(date: Date | string | undefined): string {\n if (!date) {\n return '---';\n }\n\n try {\n const dateObj = typeof date === 'string' ? new Date(date) : date;\n return this.formatService.format(dateObj, 'datetime', {\n format: 'short',\n });\n } catch {\n return '---';\n }\n }\n\n protected formatUser(user: any): string {\n if (!user) {\n return '---';\n }\n\n return user.fullName || user.username || user.id || '---';\n }\n\n protected formatAuditEvent(event: AXPAuditEvent, type: 'created' | 'updated' | 'deleted'): string {\n if (!event?.at) {\n return '---';\n }\n\n const dateStr = this.formatDate(event.at);\n const userStr = this.formatUser(event.by);\n return `${dateStr}${userStr !== '---' ? ` by ${userStr}` : ''}`;\n }\n\n //#endregion\n\n //#region ---- Private Methods ----\n\n private openPopover(): void {\n if (this.infoPopover() && this.infoButton()) {\n this.infoPopover()!.target = this.infoButton()!.nativeElement;\n this.infoPopover()!.open();\n this.isPopoverOpen.set(true);\n }\n }\n\n protected hasHistoryPlugin = computed<boolean>(() => {\n const hasHistoryPlugin = (this.options as any)?.hasHistoryPlugin ?? false;\n return hasHistoryPlugin && this.commandService.exists(SHOW_VERSION_HISTORY_POPUP_COMMAND);\n });\n\n protected async showHistory(): Promise<void> {\n if (!this.hasHistoryPlugin()) {\n return;\n }\n\n const rowData = this.rowData as Record<string, any>;\n const entityId = rowData?.['id'];\n\n if (!entityId) {\n return;\n }\n\n const entityInfo = (this.options as any)?.entityInfo || rowData?.['__entityInfo'];\n const refType = entityInfo?.source || entityInfo?.refType;\n\n if (!refType) {\n return;\n }\n\n const fieldTitles = entityInfo?.fieldTitles || {};\n\n await this.commandService.execute(SHOW_VERSION_HISTORY_POPUP_COMMAND, {\n options: {\n refId: entityId,\n refType,\n fieldTitles,\n },\n });\n }\n\n //#endregion\n}\n","<div class=\"flex items-center gap-1.5\">\n @if (hasAuditInfo()) {\n <div class=\"flex items-center gap-1.5 cursor-pointer hover:opacity-80 transition-opacity\"\n (click)=\"showInfo()\" [title]=\"displayText()\" #infoButton>\n <i class=\"fa-light fa-calendar-circle-exclamation\"></i>\n <span class=\"text-xs\" [dir]=\"'ltr'\">{{ displayDate() }}</span>\n </div>\n } @else {\n <span class=\"text-muted\">---</span>\n }\n</div>\n\n<!-- Audit Info Popover -->\n<ax-popover [openOn]=\"'manual'\" #infoPopover (openChange)=\"onPopoverOpenChange($event)\" [adaptivityEnabled]=\"true\">\n <div class=\"lightest-surface border rounded-lg shadow-lg p-3 min-w-[280px]\">\n <div class=\"mb-3 pb-2 border-b\">\n <h3 class=\"text-sm font-semibold\">\n {{ '@general:terms.audit.section-title' | translate | async }}\n </h3>\n </div>\n <div class=\"space-y-2.5\">\n <!-- Created -->\n @if (createdEvent()) {\n <div>\n <div class=\"text-xs mb-1 font-semibold\">\n {{ '@general:terms.audit.created' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (createdEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(createdEvent()?.at)) }}</span>\n @if (createdEvent()?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(createdEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (createdEvent()?.reason) {\n <div class=\"text-muted\">{{ createdEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n\n <!-- Updated -->\n @if (updatedEvent()) {\n <div>\n <div class=\"text-xs mb-1 font-semibold\">\n {{ '@general:terms.audit.updated' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (updatedEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(updatedEvent()?.at)) }}</span>\n @if (updatedEvent()?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(updatedEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (updatedEvent()?.reason) {\n <div class=\"text-muted\">{{ updatedEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n\n <!-- Deleted -->\n @if (deletedEvent()) {\n <div>\n <div class=\"text-xs text-muted mb-1 font-semibold\">\n {{ '@general:terms.audit.deleted' | translate | async }}\n </div>\n <div class=\"text-xs space-y-0.5\">\n @if (deletedEvent()?.at) {\n <div>\n <span [dir]=\"'ltr'\">{{ formatDate($safeNavigationMigration(deletedEvent()?.at)) }}</span>\n @if (deletedEvent()?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(deletedEvent()?.by)) }}</span>\n }\n </div>\n }\n @if (deletedEvent()?.reason) {\n <div class=\"text-muted\">{{ deletedEvent()?.reason }}</div>\n }\n </div>\n </div>\n }\n </div>\n @if (hasHistoryPlugin()) {\n <div class=\"mt-3 pt-3 border-t ax-sm\">\n <ax-button [text]=\"'@general:terms.audit.history' | translate | async\" (click)=\"showHistory()\" class=\"w-full\">\n </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;AAYA,MAAM,kCAAkC,GAAG,4BAA4B;AASjE,MAAO,2BAA4B,SAAQ,wBAA4C,CAAA;AAP7F,IAAA,WAAA,GAAA;;;AAUmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAi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AAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGhF,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAPvC,SAAS;+BACE,uBAAuB,EAAA,eAAA,EAEhB,uBAAuB,CAAC,MAAM,WACtC,CAAC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,mBAAmB,CAAC,UACpF,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,k8GAAA,EAAA;AAYc,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,YAAY,qEACH,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
|
package/fesm2022/acorex-platform-module-common-client-audit-info-edit.component-COMMBgsX.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-common-client-audit-info-edit.component-COMMBgsX.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($safeNavigationMigration(auditInfo()?.created?.at)) }}</span>\n @if (auditInfo()?.created?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(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($safeNavigationMigration(auditInfo()?.updated?.at)) }}</span>\n @if (auditInfo()?.updated?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(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($safeNavigationMigration(auditInfo()?.deleted?.at)) }}</span>\n @if (auditInfo()?.deleted?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(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;QAClF,CAAC;sFAAC;AAEQ,QAAA,IAAA,CAAA,eAAe,GAAG,QAAQ,CAAU,MAAK;AACjD,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAC7B,YAAA,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,IAAI,IAAI,EAAE,OAAO,IAAI,IAAI,EAAE,OAAO,CAAC;QAC5D,CAAC;4FAAC;AAwBH,IAAA;AAtBW,IAAA,UAAU,CAAC,IAA+B,EAAA;QAClD,IAAI,CAAC,IAAI,EAAE;AACT,YAAA,OAAO,KAAK;QACd;AAEA,QAAA,IAAI;AACF,YAAA,MAAM,OAAO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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;;;"}
|
package/fesm2022/acorex-platform-module-common-client-audit-info-view.component-UOTT-ir_.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-common-client-audit-info-view.component-UOTT-ir_.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($safeNavigationMigration(auditInfo()?.created?.at)) }}</span>\n @if (auditInfo()?.created?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(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($safeNavigationMigration(auditInfo()?.updated?.at)) }}</span>\n @if (auditInfo()?.updated?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(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($safeNavigationMigration(auditInfo()?.deleted?.at)) }}</span>\n @if (auditInfo()?.deleted?.by) {\n <span class=\"text-muted\"> • {{ formatUser($safeNavigationMigration(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,IAAA,WAAA,GAAA;;AAuCmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AAE9C,QAAA,IAAA,CAAA,SAAS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/modules/common/client/src/lib/features/versioning-plugin/commands/create-entity-version-draft.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPVersioningEntityCommandHelper } from './versioning-entity.command.helper';\nimport { normalizeVersioningInput } from './versioning-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPCreateEntityVersionDraftCommand implements AXPCommand<AXPContextData, { versionId: string }> {\n private readonly helper = inject(AXPVersioningEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(input: AXPContextData): AXPCommandExecuteResultPromise<{ versionId: string }> {\n const context = normalizeVersioningInput(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 loadingDialog = this.helper.showLoading(\n await this.translationService.translateAsync('@general:actions.versioning.create-draft.processing'),\n 'Creating version...',\n );\n\n try {\n const versionId = await this.helper.companionData(context.companionEntity).create({\n sourceId: context.refId,\n });\n this.helper.dispatchRefresh(context.refType);\n loadingDialog.close();\n await this.helper.showSuccessToast(\n '@general:actions.versioning.create-draft.success.title',\n '@general:actions.versioning.create-draft.success.description',\n );\n return { success: true, kind: 'object', data: { versionId: String(versionId) } };\n } catch (error) {\n loadingDialog.close();\n await this.helper.showErrorToastFor(error, '@general:messages.generic.error.description');\n return { success: false };\n }\n }\n}\n"],"names":[],"mappings":";;;;;MASa,kCAAkC,CAAA;AAD/C,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,gCAAgC,CAAC;AACjD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAmCnE,IAAA;IAjCC,MAAM,OAAO,CAAC,KAAqB,EAAA;AACjC,QAAA,MAAM,OAAO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,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-delete-entity-version-draft.command-Dq0zjfak.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/versioning-plugin/commands/delete-entity-version-draft.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPVersioningEntityCommandHelper } from './versioning-entity.command.helper';\nimport { normalizeVersioningInput } from './versioning-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPDeleteEntityVersionDraftCommand implements AXPCommand<AXPContextData, void> {\n private readonly helper = inject(AXPVersioningEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(input: AXPContextData): AXPCommandExecuteResultPromise<void> {\n const context = normalizeVersioningInput(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.versioning.delete-draft.confirm.title',\n '@general:actions.versioning.delete-draft.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.versioning.delete-draft.processing'),\n 'Deleting draft...',\n );\n\n try {\n const draft = await this.helper.findDraft(context.companionEntity, context.refId);\n if (!draft?.id) {\n loadingDialog.close();\n await this.helper.showErrorToastFor(\n { error: { code: 'VERSIONING_NO_DRAFT', message: '@general:errors.versioning.no-draft' } },\n '@general:errors.versioning.no-draft',\n );\n return { success: false };\n }\n\n await this.helper.companionData(context.companionEntity).delete(String(draft.id));\n this.helper.dispatchRefresh(context.refType);\n loadingDialog.close();\n await this.helper.showSuccessToast(\n '@general:actions.versioning.delete-draft.success.title',\n '@general:actions.versioning.delete-draft.success.description',\n );\n return { success: true, kind: 'object', data: undefined };\n } catch (error) {\n loadingDialog.close();\n await this.helper.showErrorToastFor(error, '@general:messages.generic.error.description');\n return { success: false };\n }\n }\n}\n"],"names":[],"mappings":";;;;;MASa,kCAAkC,CAAA;AAD/C,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,gCAAgC,CAAC;AACjD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAmDnE,IAAA;IAjDC,MAAM,OAAO,CAAC,KAAqB,EAAA;AACjC,QAAA,MAAM,OAAO,GAAG,wBAAwB,CAAC,KAAK,CAAC;QAC/C,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,wDAAwD,EACxD,0DAA0D,CAC3D;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,qDAAqD,CAAC,EACnG,mBAAmB,CACpB;AAED,QAAA,IAAI;AACF,YAAA,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,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,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-publish-entity-version.command-BtyWjtJj.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/versioning-plugin/commands/publish-entity-version.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXPVersioningEntityCommandHelper } from './versioning-entity.command.helper';\nimport { normalizeVersioningInput } from './versioning-entity.command.util';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPPublishEntityVersionCommand implements AXPCommand<AXPContextData, void> {\n private readonly helper = inject(AXPVersioningEntityCommandHelper);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(input: AXPContextData): AXPCommandExecuteResultPromise<void> {\n const context = normalizeVersioningInput(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 if (!context.skipConfirm) {\n const confirmed = await this.helper.confirm(\n '@general:actions.versioning.publish.confirm.title',\n '@general:actions.versioning.publish.confirm.message',\n );\n if (!confirmed) {\n return { success: false };\n }\n }\n\n const loadingDialog = this.helper.showLoading(\n await this.translationService.translateAsync('@general:actions.versioning.publish.processing'),\n 'Publishing...',\n );\n\n try {\n const draft = await this.helper.findDraft(context.companionEntity, context.refId);\n if (!draft?.id) {\n loadingDialog.close();\n await this.helper.showErrorToastFor(\n { error: { code: 'VERSIONING_NO_DRAFT', message: '@general:errors.versioning.no-draft' } },\n '@general:errors.versioning.no-draft',\n );\n return { success: false };\n }\n\n await this.helper.hostData(context.refType).update(context.refId, {\n versionId: draft.id,\n });\n this.helper.dispatchRefresh(context.refType);\n loadingDialog.close();\n await this.helper.showSuccessToast(\n '@general:actions.versioning.publish.success.title',\n '@general:actions.versioning.publish.success.description',\n );\n return { success: true, kind: 'object', data: undefined };\n } catch (error) {\n loadingDialog.close();\n await this.helper.showErrorToastFor(error, '@general:messages.generic.error.description');\n return { success: false };\n }\n }\n}\n"],"names":[],"mappings":";;;;;MASa,8BAA8B,CAAA;AAD3C,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,gCAAgC,CAAC;AACjD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAuDnE,IAAA;IArDC,MAAM,OAAO,CAAC,KAAqB,EAAA;AACjC,QAAA,MAAM,OAAO,GAAG,wBAAwB,CAAC,KAAK,CAAC;QAC/C,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,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;AACxB,YAAA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CACzC,mDAAmD,EACnD,qDAAqD,CACtD;YACD,IAAI,CAAC,SAAS,EAAE;AACd,gBAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;YAC3B;QACF;QAEA,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAC3C,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,gDAAgD,CAAC,EAC9F,eAAe,CAChB;AAED,QAAA,IAAI;AACF,YAAA,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,eAAe,EAAE,OAAO,CAAC,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AM,EAAA,CAAA,CAAA;;2FACnB,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAD1C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/versioning-plugin/commands/versioning-entity.command.helper.ts","../../../../libs/modules/common/client/src/lib/features/versioning-plugin/commands/versioning-entity.command.util.ts"],"sourcesContent":["import { AXDialogService } from '@acorex/components/dialog';\nimport { AXLoadingDialogService } from '@acorex/components/loading-dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport {\n AXPCommonSettings,\n AXPSettingsService,\n extractRequestErrorInfo,\n} from '@acorex-platform/framework-client/common';\nimport { AXPEntityBroadcastService } from '@acorex-platform/framework-client/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport {\n AXPVersioningField,\n AXPVersioningStatus,\n AXP_VERSIONING_ERROR_I18N,\n type AXPVersioningCompanionDto,\n type AXPVersioningHostDto,\n} from '@acorex-platform/module-common-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPVersioningEntityCommandHelper {\n private readonly entityService = inject(AXPEntityService);\n private readonly dialogService = inject(AXDialogService);\n private readonly loadingDialog = inject(AXLoadingDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly entityEvents = inject(AXPEntityBroadcastService);\n\n hostData(refType: string) {\n const [moduleName, entityName] = refType.split('.');\n return this.entityService\n .withEntity(moduleName, entityName)\n .data<string, AXPVersioningHostDto, AXPVersioningHostDto>();\n }\n\n companionData(companionEntity: string) {\n const [moduleName, entityName] = companionEntity.split('.');\n return this.entityService\n .withEntity(moduleName, entityName)\n .data<string, AXPVersioningCompanionDto, AXPVersioningCompanionDto>();\n }\n\n async findDraft(companionEntity: string, sourceId: string): Promise<AXPVersioningCompanionDto | null> {\n const result = await this.companionData(companionEntity).query({\n skip: 0,\n take: 1,\n filter: {\n logic: 'and',\n filters: [\n { field: AXPVersioningField.SourceId, operator: { type: 'equal' }, value: sourceId },\n {\n field: AXPVersioningField.VersioningStatus,\n operator: { type: 'equal' },\n value: AXPVersioningStatus.Draft,\n },\n ],\n },\n });\n const row = result?.items?.[0];\n return row ?? null;\n }\n\n async confirm(titleKey: string, messageKey: string): Promise<boolean> {\n const dialogResult = await this.dialogService.confirm(\n await this.translationService.translateAsync(titleKey),\n await this.translationService.translateAsync(messageKey),\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 this.toastService.show({\n color: 'success',\n title: await this.translationService.translateAsync(titleKey),\n content: contentKey ? await this.translationService.translateAsync(contentKey) : undefined,\n });\n }\n\n async showErrorToastFor(error: unknown, fallbackKey: string): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled) {\n return;\n }\n const info = extractRequestErrorInfo(error);\n const contentKey =\n (info?.code ? AXP_VERSIONING_ERROR_I18N[info.code] : undefined) ??\n (typeof info?.message === 'string' && info.message.startsWith('@') ? info.message : null) ??\n fallbackKey;\n const content = contentKey.startsWith('@')\n ? await this.translationService.translateAsync(contentKey)\n : contentKey;\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content,\n closeButton: true,\n timeOut: 6000,\n timeOutProgress: true,\n });\n }\n\n dispatchRefresh(refType: string): void {\n this.entityEvents.publishLayoutRefresh(refType);\n }\n}\n","import type { AXPContextData } from '@acorex-platform/framework-shared/core';\nimport { pickInputOrOptionsField, resolveEntityActionRef } from '@acorex-platform/framework-shared/runtime';\nimport { versionCompanionEntityName } from '@acorex-platform/module-common-client/contracts';\n\nexport interface AXPVersioningCommandContext {\n refId: string;\n refType: string;\n companionEntity: string;\n /** When true, skip the command’s own confirm (caller already asked). */\n skipConfirm?: boolean;\n}\n\nexport function normalizeVersioningInput(input: AXPContextData): AXPVersioningCommandContext | null {\n const resolved = resolveEntityActionRef(input);\n if (!resolved) {\n return null;\n }\n return {\n refId: resolved.refId,\n refType: resolved.refType,\n companionEntity: versionCompanionEntityName(resolved.refType),\n skipConfirm: Boolean(pickInputOrOptionsField(input, 'skipConfirm')),\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;MAqBa,gCAAgC,CAAA;AAD7C,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAC9C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,yBAAyB,CAAC;AA8FlE,IAAA;AA5FC,IAAA,QAAQ,CAAC,OAAe,EAAA;AACtB,QAAA,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;QACnD,OAAO,IAAI,CAAC;AACT,aAAA,UAAU,CAAC,UAAU,EAAE,UAAU;AACjC,aAAA,IAAI,EAAsD;IAC/D;AAEA,IAAA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