@acorex-platform/module-common-client 0.0.54 → 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-common-client-timeline-version-history-popup.component-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-common-client-timeline-version-history-popup.component-Ap83-gMD.mjs","sources":["../../../../libs/modules/common/client/src/lib/features/history-plugin/components/timeline-version-history-popup/timeline-version-history-popup.component.ts","../../../../libs/modules/common/client/src/lib/features/history-plugin/components/timeline-version-history-popup/timeline-version-history-popup.component.html"],"sourcesContent":["import { Component, inject, Injector, signal, ViewEncapsulation, computed, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport {\n AXPActivityLogCompareRequest,\n AXPActivityLogComponent,\n} from '@acorex-platform/framework-client/layout/components';\nimport { AXPVersionEntry, AXPVersioningService } from '@acorex-platform/framework-client/common';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { versionEntriesToActivityLogs } from '../../utils/version-history.utils';\nimport { openActivityLogVersionCompare } from '../../utils/open-activity-log-compare.util';\n\n@Component({\n selector: 'axp-timeline-version-history-popup',\n templateUrl: './timeline-version-history-popup.component.html',\n imports: [\n CommonModule,\n AXDecoratorModule,\n AXButtonModule,\n AXTranslationModule,\n AXPActivityLogComponent,\n ],\n changeDetection: ChangeDetectionStrategy.Eager,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXMTimelineVersionHistoryPopupComponent extends AXBasePageComponent {\n refId!: string;\n refType!: string;\n fieldTitles?: Record<string, string>;\n fromDate!: Date;\n toDate!: Date;\n limit!: number;\n offset!: number;\n\n protected isBusy = signal(false);\n\n protected versioning = inject(AXPVersioningService);\n private readonly injector = inject(Injector);\n private readonly translation = inject(AXTranslationService);\n protected versions = signal<AXPVersionEntry[]>([]);\n protected activities = computed(() =>\n versionEntriesToActivityLogs(\n this.versions(),\n this.refId,\n this.refType,\n this.fieldTitles,\n undefined,\n this.translation.getActiveLang?.() ?? 'en-US',\n )\n );\n\n override async ngOnInit(): Promise<void> {\n this.isBusy.set(true);\n super.ngOnInit();\n const streamId = await this.versioning.getStreamIdIfExists(this.refType, this.refId);\n if (streamId) {\n const entries = await this.versioning.listEntries(streamId, {\n limit: this.limit,\n offset: this.offset,\n });\n this.versions.set(entries);\n } else {\n this.versions.set([]);\n }\n this.isBusy.set(false);\n }\n\n protected async onCompareRequested(event: AXPActivityLogCompareRequest): Promise<void> {\n await openActivityLogVersionCompare(this.injector, event);\n }\n}\n","<ax-content>\n <div class=\"p-6 min-h-[30vh] overflow-y-auto\">\n <axp-activity-log\n [activities]=\"activities()\"\n [loading]=\"isBusy()\"\n [enableCompare]=\"true\"\n [showActionType]=\"false\"\n (compareRequested)=\"onCompareRequested($event)\"\n ></axp-activity-log>\n </div>\n</ax-content>\n<ax-footer>\n <ax-prefix></ax-prefix>\n <ax-suffix>\n <ax-button\n [text]=\"'@general:actions.close.title' | translate | async\"\n look=\"solid\"\n color=\"primary\"\n (onClick)=\"close()\"\n >\n </ax-button>\n </ax-suffix>\n</ax-footer>\n"],"names":["i3"],"mappings":";;;;;;;;;;;;;;;AA4BM,MAAO,uCAAwC,SAAQ,mBAAmB,CAAA;AAbhF,IAAA,WAAA,GAAA;;QAsBY,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,KAAK;mFAAC;AAEtB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAClC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,oBAAoB,CAAC;QACjD,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAoB,EAAE;qFAAC;AACxC,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAC9B,4BAA4B,CAC1B,IAAI,CAAC,QAAQ,EAAE,EACf,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,WAAW,EAChB,SAAS,EACT,IAAI,CAAC,WAAW,CAAC,aAAa,IAAI,IAAI,OAAO,CAC9C;uFACF;AAqBF,IAAA;AAnBU,IAAA,MAAM,QAAQ,GAAA;AACrB,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;QACrB,KAAK,CAAC,QAAQ,EAAE;AAChB,QAAA,MAAM,QAAQ,GA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,23 @@ class AXPVersioningEntityCommandHelper {
|
|
|
32
32
|
.withEntity(moduleName, entityName)
|
|
33
33
|
.data();
|
|
34
34
|
}
|
|
35
|
+
async listCompanions(companionEntity, sourceId) {
|
|
36
|
+
const result = await this.companionData(companionEntity).query({
|
|
37
|
+
skip: 0,
|
|
38
|
+
take: 200,
|
|
39
|
+
sort: [{ field: AXPVersioningField.VersionNumber, dir: 'desc' }],
|
|
40
|
+
filter: {
|
|
41
|
+
field: AXPVersioningField.SourceId,
|
|
42
|
+
operator: { type: 'equal' },
|
|
43
|
+
value: sourceId,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
return [...(result?.items ?? [])].sort((left, right) => {
|
|
47
|
+
const leftNumber = Number(left.versionNumber ?? 0);
|
|
48
|
+
const rightNumber = Number(right.versionNumber ?? 0);
|
|
49
|
+
return rightNumber - leftNumber;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
35
52
|
async findDraft(companionEntity, sourceId) {
|
|
36
53
|
const result = await this.companionData(companionEntity).query({
|
|
37
54
|
skip: 0,
|
|
@@ -119,4 +136,4 @@ function normalizeVersioningInput(input) {
|
|
|
119
136
|
}
|
|
120
137
|
|
|
121
138
|
export { AXPVersioningEntityCommandHelper as A, normalizeVersioningInput as n };
|
|
122
|
-
//# sourceMappingURL=acorex-platform-module-common-client-versioning-entity.command.util-
|
|
139
|
+
//# sourceMappingURL=acorex-platform-module-common-client-versioning-entity.command.util-Bibv8EgV.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-common-client-versioning-entity.command.util-Bibv8EgV.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 listCompanions(\n companionEntity: string,\n sourceId: string,\n ): Promise<AXPVersioningCompanionDto[]> {\n const result = await this.companionData(companionEntity).query({\n skip: 0,\n take: 200,\n sort: [{ field: AXPVersioningField.VersionNumber, dir: 'desc' }],\n filter: {\n field: AXPVersioningField.SourceId,\n operator: { type: 'equal' },\n value: sourceId,\n },\n });\n return [...(result?.items ?? [])].sort((left, right) => {\n const leftNumber = Number(left.versionNumber ?? 0);\n const rightNumber = Number(right.versionNumber ?? 0);\n return rightNumber - leftNumber;\n });\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;AAmHlE,IAAA;AAjHC,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,aAAa,CAAC,eAAuB,EAAA;AACnC,QAAA,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,GAA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C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhC,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,gCAAgC,cADnB,MAAM,EAAA,CAAA,CAAA;;2FACnB,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAD5C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACR5B,SAAU,wBAAwB,CAAC,KAAqB,EAAA;AAC5D,IAAA,MAAM,QAAQ,GAAG,sBAAsB,CAAC,KAAK,CAAC;IAC9C,IAAI,CAAC,QAAQ,EAAE;AACb,QAAA,OAAO,IAAI;IACb;IACA,OAAO;QACL,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,OAAO,EAAE,QAAQ,CAAC,OAAO;AACzB,QAAA,eAAe,EAAE,0BAA0B,CAAC,QAAQ,CAAC,OAAO,CAAC;QAC7D,WAAW,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;KACpE;AACH;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { b as AXMCommonModule, c as AXMMenuProvider, d as AXMSettingProvider, e as AXMVersionHistoryPageComponent, f as AXPArchivePluginModule, g as AXPCommonFeatureDefinitionProvider, h as AXPDerivedNamePluginModule, j as AXPDisablePluginModule, k as AXPGlobalSearchModule, a as AXPGlobalSearchViewModel, l as AXPHistoryAuditInfoWidget, m as AXPHistoryModule, n as AXPLockEntityCommand, p as AXPResourceAppointmentPageComponent, q as AXPStatusPluginModule, r as AXPUniqueFieldsPluginModule, s as AXPUnlockEntityCommand, u as AXPValidationRulesModule, w as AXPVersioningPluginModule, A as AXP_ENTITY_ARCHIVE_OVERRIDES, x as AXP_GLOBAL_SEARCH_CONFIG_TOKEN, y as AXP_RESOURCE_APPOINTMENT_PAGE_CONFIG, z as ApprovalStatusProvider, B as AtLeastOneOfValidationRule, H as HISTORY_PAGE_COMPONENT_KEY, S as ShowVersionHistoryPopupCommand, C as StateStatusProvider, T as TaskStatusProvider, U as UniqueValidationRule, V as VARIABLE_NAME_VALIDATION_PATTERN, D as VariableNameValidationRule, E as aggregateVersionHistoryBarChartItems, F as archivePlugin, G as buildEntityFieldHistoryLineChartSeries, I as buildProductBasePriceHistoryLineChartSeries, J as derivedNamePlugin, K as disablePlugin, L as
|
|
1
|
+
export { b as AXMCommonModule, c as AXMMenuProvider, d as AXMSettingProvider, e as AXMVersionHistoryPageComponent, f as AXPArchivePluginModule, g as AXPCommonFeatureDefinitionProvider, h as AXPDerivedNamePluginModule, j as AXPDisablePluginModule, k as AXPGlobalSearchModule, a as AXPGlobalSearchViewModel, l as AXPHistoryAuditInfoWidget, m as AXPHistoryModule, n as AXPLockEntityCommand, p as AXPResourceAppointmentPageComponent, q as AXPStatusPluginModule, r as AXPUniqueFieldsPluginModule, s as AXPUnlockEntityCommand, u as AXPValidationRulesModule, w as AXPVersioningPluginModule, A as AXP_ENTITY_ARCHIVE_OVERRIDES, x as AXP_GLOBAL_SEARCH_CONFIG_TOKEN, y as AXP_RESOURCE_APPOINTMENT_PAGE_CONFIG, z as ApprovalStatusProvider, B as AtLeastOneOfValidationRule, H as HISTORY_PAGE_COMPONENT_KEY, S as ShowVersionHistoryPopupCommand, C as StateStatusProvider, T as TaskStatusProvider, U as UniqueValidationRule, V as VARIABLE_NAME_VALIDATION_PATTERN, D as VariableNameValidationRule, E as aggregateVersionHistoryBarChartItems, F as archivePlugin, G as buildEntityFieldHistoryLineChartSeries, I as buildProductBasePriceHistoryLineChartSeries, J as derivedNamePlugin, K as disablePlugin, L as formatVersionHistoryReplaceSummary, M as getActiveStatuses, N as getFinalStatuses, O as getInitialStatuses, P as getStatusByName, Q as getTransitionsFromStatus, R as getTransitionsToStatus, W as historyPlugin, X as humanizeChange, Y as isRtlHistoryLocale, Z as isValidTransition, i as isValidVariableName, _ as mapChangeType, $ as mapOpToAction, a0 as resolvePathKey, a1 as statusPlugin, t as toVariableName, a2 as uniqueFieldsPlugin, v as versionEntriesToActivityLogs, a3 as versioningPlugin } from './acorex-platform-module-common-client-acorex-platform-module-common-client-BtSt1xRl.mjs';
|
|
2
2
|
export { CommonManifest } from '@acorex-platform/module-common-client/contracts';
|
|
3
3
|
//# sourceMappingURL=acorex-platform-module-common-client.mjs.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"feature": {
|
|
3
|
+
"title": "Feature Sample",
|
|
4
|
+
"description": "Sample standalone feature for common functionality"
|
|
5
|
+
},
|
|
6
|
+
"terms": {
|
|
7
|
+
"term-key1": "Term Key 1",
|
|
8
|
+
"term-key2": {
|
|
9
|
+
"sub-key": "Term Key 2 Sub Key"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"components": {
|
|
13
|
+
"component-key": {
|
|
14
|
+
"title": "Component Title",
|
|
15
|
+
"description": "Component description (sample help text).",
|
|
16
|
+
"empty-states": {
|
|
17
|
+
"no-data": {
|
|
18
|
+
"title": "No Data Found",
|
|
19
|
+
"description": "No data available"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"actions": {
|
|
25
|
+
"action-key": {
|
|
26
|
+
"title": "Action Title",
|
|
27
|
+
"description": "Action description (short hint for the user)."
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"messages": {
|
|
31
|
+
"success": {
|
|
32
|
+
"message-key": "Success Message"
|
|
33
|
+
},
|
|
34
|
+
"error": {
|
|
35
|
+
"message-key": "Error Message"
|
|
36
|
+
},
|
|
37
|
+
"warning": {
|
|
38
|
+
"message-key": "Warning Message"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"states": {
|
|
42
|
+
"state-key": "State Label"
|
|
43
|
+
},
|
|
44
|
+
"validations": {
|
|
45
|
+
"validation-key": "Validation Message"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"module": {
|
|
3
|
+
"title": "Module Sample",
|
|
4
|
+
"description": "Sample description for a module in this file.",
|
|
5
|
+
"terms": {
|
|
6
|
+
"shared-term": "Shared Term Value"
|
|
7
|
+
},
|
|
8
|
+
"menus": {
|
|
9
|
+
"root": {
|
|
10
|
+
"title": "Root Menu Title",
|
|
11
|
+
"description": "Description text for the root menu entry."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"feature-key": {
|
|
16
|
+
"terms": {
|
|
17
|
+
"term-key1": "Term Key 1",
|
|
18
|
+
"term-key2": {
|
|
19
|
+
"sub-key": "Term Key 2 Sub Key"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"menus": {
|
|
23
|
+
"menu-key": {
|
|
24
|
+
"title": "Menu Title",
|
|
25
|
+
"description": "Description text for a menu item."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"entities": {
|
|
29
|
+
"entity-key": {
|
|
30
|
+
"title": "Entity Title",
|
|
31
|
+
"plural": "Entities",
|
|
32
|
+
"fields": {
|
|
33
|
+
"field-key": {
|
|
34
|
+
"title": "Field Title",
|
|
35
|
+
"description": "Field description (help or hint text).",
|
|
36
|
+
"placeholder": "Field Placeholder"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"groups": {
|
|
40
|
+
"group-key": "Group Title"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"components": {
|
|
45
|
+
"component-key": {
|
|
46
|
+
"title": "Component Title",
|
|
47
|
+
"description": "Component description (help or hint text).",
|
|
48
|
+
"empty-states": {
|
|
49
|
+
"no-data": {
|
|
50
|
+
"title": "No Data Found",
|
|
51
|
+
"description": "No data available"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"settings": {
|
|
57
|
+
"section-key": {
|
|
58
|
+
"title": "Section Title",
|
|
59
|
+
"description": "Settings section description.",
|
|
60
|
+
"items": {
|
|
61
|
+
"item-key": {
|
|
62
|
+
"title": "Item Title",
|
|
63
|
+
"description": "Setting item description."
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"permissions": {
|
|
69
|
+
"resource-key": {
|
|
70
|
+
"title": "Resource Title",
|
|
71
|
+
"actions": {
|
|
72
|
+
"view": {
|
|
73
|
+
"title": "View"
|
|
74
|
+
},
|
|
75
|
+
"create": {
|
|
76
|
+
"title": "Create"
|
|
77
|
+
},
|
|
78
|
+
"edit": {
|
|
79
|
+
"title": "Edit"
|
|
80
|
+
},
|
|
81
|
+
"delete": {
|
|
82
|
+
"title": "Delete"
|
|
83
|
+
},
|
|
84
|
+
"manage": {
|
|
85
|
+
"title": "Manage"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"actions": {
|
|
91
|
+
"action-key": {
|
|
92
|
+
"title": "Action Title",
|
|
93
|
+
"description": "Action description (short hint for the user)."
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"messages": {
|
|
97
|
+
"success": {
|
|
98
|
+
"message-key": "Success Message"
|
|
99
|
+
},
|
|
100
|
+
"error": {
|
|
101
|
+
"message-key": "Error Message"
|
|
102
|
+
},
|
|
103
|
+
"warning": {
|
|
104
|
+
"message-key": "Warning Message"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"states": {
|
|
108
|
+
"state-key": "State Label"
|
|
109
|
+
},
|
|
110
|
+
"validations": {
|
|
111
|
+
"validation-key": "Validation Message"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|