@acorex-platform/module-common-client 0.0.37 → 0.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{acorex-platform-module-common-client-acorex-platform-module-common-client-BmGXSWg4.mjs → acorex-platform-module-common-client-acorex-platform-module-common-client-BzK6gnbq.mjs} +258 -63
- package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-BzK6gnbq.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-D0TFxo2b.mjs → acorex-platform-module-common-client-archive-entity.command-P-8WPEaC.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command-D0TFxo2b.mjs.map → acorex-platform-module-common-client-archive-entity.command-P-8WPEaC.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-DrW2EjNj.mjs → acorex-platform-module-common-client-archive-entity.command.util-DgnEcrDL.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-archive-entity.command.util-DrW2EjNj.mjs.map → acorex-platform-module-common-client-archive-entity.command.util-DgnEcrDL.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-audit-info-column.component-tMlIVjiu.mjs → acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-audit-info-column.component-tMlIVjiu.mjs.map → acorex-platform-module-common-client-audit-info-column.component-DihrUmRM.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-LNJekir_.mjs → acorex-platform-module-common-client-bulk-archive-entity.command-njV_WseD.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-bulk-archive-entity.command-LNJekir_.mjs.map → acorex-platform-module-common-client-bulk-archive-entity.command-njV_WseD.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-DV81VX8K.mjs → acorex-platform-module-common-client-bulk-restore-archive-entity.command-t2AYXaLk.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-bulk-restore-archive-entity.command-DV81VX8K.mjs.map → acorex-platform-module-common-client-bulk-restore-archive-entity.command-t2AYXaLk.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-CcjD0iDW.mjs → acorex-platform-module-common-client-clone-entity.command-UyUOYAxp.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-clone-entity.command-CcjD0iDW.mjs.map → acorex-platform-module-common-client-clone-entity.command-UyUOYAxp.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-common-client-contracts-entities-record-lock.mjs +13 -0
- package/fesm2022/acorex-platform-module-common-client-contracts-entities-record-lock.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-entry.mjs +14 -0
- package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-entry.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-stream.mjs +13 -0
- package/fesm2022/acorex-platform-module-common-client-contracts-entities-version-stream.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-C2WFbRne.mjs → acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-8_tVyorm.mjs} +4 -4
- package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-C2WFbRne.mjs.map → acorex-platform-module-common-client-contracts-entity-catalog-acorex-platform-module-common-client-contracts-entity-catalog-8_tVyorm.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-CY6jfaD7.mjs → acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-DLA5qjPs.mjs} +15 -2
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-DLA5qjPs.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-DCBxAIMJ.mjs → acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-C07SlyK0.mjs} +16 -2
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-C07SlyK0.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-DbSB34vz.mjs → acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-C7LJK2Gt.mjs} +15 -2
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-C7LJK2Gt.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog.mjs +1 -1
- package/fesm2022/acorex-platform-module-common-client-contracts.mjs +110 -4
- 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 +46 -0
- package/fesm2022/acorex-platform-module-common-client-create-entity-version-draft.command-DLNMbq3M.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs +54 -0
- package/fesm2022/acorex-platform-module-common-client-delete-entity-version-draft.command-Dq0zjfak.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs +58 -0
- package/fesm2022/acorex-platform-module-common-client-publish-entity-version.command-BtyWjtJj.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-CWJPmL4o.mjs → acorex-platform-module-common-client-restore-archive-entity.command-Dyix1Ecm.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-restore-archive-entity.command-CWJPmL4o.mjs.map → acorex-platform-module-common-client-restore-archive-entity.command-Dyix1Ecm.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-search-popup.component-CNJmksXt.mjs → acorex-platform-module-common-client-search-popup.component-j0h_8fec.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-search-popup.component-CNJmksXt.mjs.map → acorex-platform-module-common-client-search-popup.component-j0h_8fec.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-DDpyY7mO.mjs → acorex-platform-module-common-client-timeline-version-history-popup.component-ysTJlOCx.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-common-client-timeline-version-history-popup.component-DDpyY7mO.mjs.map → acorex-platform-module-common-client-timeline-version-history-popup.component-ysTJlOCx.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs +122 -0
- package/fesm2022/acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-common-client.mjs +2 -1
- package/fesm2022/acorex-platform-module-common-client.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-module-common-client-contracts.d.ts +80 -4
- package/types/acorex-platform-module-common-client.d.ts +13 -10
- package/fesm2022/acorex-platform-module-common-client-acorex-platform-module-common-client-BmGXSWg4.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-record-lock.entity-CY6jfaD7.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-entry.entity-DCBxAIMJ.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-common-client-contracts-entity-catalog-version-stream.entity-DbSB34vz.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-ysTJlOCx.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,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,mBAAmB,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DED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { AXDialogService } from '@acorex/components/dialog';
|
|
2
|
+
import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
|
|
3
|
+
import { AXToastService } from '@acorex/components/toast';
|
|
4
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
5
|
+
import { AXPSettingsService, AXPCommonSettings, extractRequestErrorInfo } from '@acorex-platform/framework-client/common';
|
|
6
|
+
import { AXPEntityBroadcastService } from '@acorex-platform/framework-client/core';
|
|
7
|
+
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
8
|
+
import { AXPVersioningField, AXPVersioningStatus, AXP_VERSIONING_ERROR_I18N, versionCompanionEntityName } from '@acorex-platform/module-common-client/contracts';
|
|
9
|
+
import * as i0 from '@angular/core';
|
|
10
|
+
import { inject, Injectable } from '@angular/core';
|
|
11
|
+
import { resolveEntityActionRef, pickInputOrOptionsField } from '@acorex-platform/framework-shared/runtime';
|
|
12
|
+
|
|
13
|
+
class AXPVersioningEntityCommandHelper {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.entityService = inject(AXPEntityService);
|
|
16
|
+
this.dialogService = inject(AXDialogService);
|
|
17
|
+
this.loadingDialog = inject(AXLoadingDialogService);
|
|
18
|
+
this.translationService = inject(AXTranslationService);
|
|
19
|
+
this.toastService = inject(AXToastService);
|
|
20
|
+
this.settingsService = inject(AXPSettingsService);
|
|
21
|
+
this.entityEvents = inject(AXPEntityBroadcastService);
|
|
22
|
+
}
|
|
23
|
+
hostData(refType) {
|
|
24
|
+
const [moduleName, entityName] = refType.split('.');
|
|
25
|
+
return this.entityService
|
|
26
|
+
.withEntity(moduleName, entityName)
|
|
27
|
+
.data();
|
|
28
|
+
}
|
|
29
|
+
companionData(companionEntity) {
|
|
30
|
+
const [moduleName, entityName] = companionEntity.split('.');
|
|
31
|
+
return this.entityService
|
|
32
|
+
.withEntity(moduleName, entityName)
|
|
33
|
+
.data();
|
|
34
|
+
}
|
|
35
|
+
async findDraft(companionEntity, sourceId) {
|
|
36
|
+
const result = await this.companionData(companionEntity).query({
|
|
37
|
+
skip: 0,
|
|
38
|
+
take: 1,
|
|
39
|
+
filter: {
|
|
40
|
+
logic: 'and',
|
|
41
|
+
filters: [
|
|
42
|
+
{ field: AXPVersioningField.SourceId, operator: { type: 'equal' }, value: sourceId },
|
|
43
|
+
{
|
|
44
|
+
field: AXPVersioningField.VersioningStatus,
|
|
45
|
+
operator: { type: 'equal' },
|
|
46
|
+
value: AXPVersioningStatus.Draft,
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
const row = result?.items?.[0];
|
|
52
|
+
return row ?? null;
|
|
53
|
+
}
|
|
54
|
+
async confirm(titleKey, messageKey) {
|
|
55
|
+
const dialogResult = await this.dialogService.confirm(await this.translationService.translateAsync(titleKey), await this.translationService.translateAsync(messageKey), 'warning', 'horizontal', false, 'cancel');
|
|
56
|
+
return dialogResult.result === true;
|
|
57
|
+
}
|
|
58
|
+
showLoading(title, status) {
|
|
59
|
+
return this.loadingDialog.show({
|
|
60
|
+
title,
|
|
61
|
+
mode: 'indeterminate',
|
|
62
|
+
status,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
async showSuccessToast(titleKey, contentKey) {
|
|
66
|
+
const enabled = await this.settingsService.get(AXPCommonSettings.EnableOperationToasts);
|
|
67
|
+
if (!enabled) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.toastService.show({
|
|
71
|
+
color: 'success',
|
|
72
|
+
title: await this.translationService.translateAsync(titleKey),
|
|
73
|
+
content: contentKey ? await this.translationService.translateAsync(contentKey) : undefined,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
async showErrorToastFor(error, fallbackKey) {
|
|
77
|
+
const enabled = await this.settingsService.get(AXPCommonSettings.EnableOperationToasts);
|
|
78
|
+
if (!enabled) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const info = extractRequestErrorInfo(error);
|
|
82
|
+
const contentKey = (info?.code ? AXP_VERSIONING_ERROR_I18N[info.code] : undefined) ??
|
|
83
|
+
(typeof info?.message === 'string' && info.message.startsWith('@') ? info.message : null) ??
|
|
84
|
+
fallbackKey;
|
|
85
|
+
const content = contentKey.startsWith('@')
|
|
86
|
+
? await this.translationService.translateAsync(contentKey)
|
|
87
|
+
: contentKey;
|
|
88
|
+
this.toastService.show({
|
|
89
|
+
color: 'danger',
|
|
90
|
+
title: await this.translationService.translateAsync('@general:messages.generic.error.title'),
|
|
91
|
+
content,
|
|
92
|
+
closeButton: true,
|
|
93
|
+
timeOut: 6000,
|
|
94
|
+
timeOutProgress: true,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
dispatchRefresh(refType) {
|
|
98
|
+
this.entityEvents.publishLayoutRefresh(refType);
|
|
99
|
+
}
|
|
100
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningEntityCommandHelper, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
101
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningEntityCommandHelper, providedIn: 'root' }); }
|
|
102
|
+
}
|
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPVersioningEntityCommandHelper, decorators: [{
|
|
104
|
+
type: Injectable,
|
|
105
|
+
args: [{ providedIn: 'root' }]
|
|
106
|
+
}] });
|
|
107
|
+
|
|
108
|
+
function normalizeVersioningInput(input) {
|
|
109
|
+
const resolved = resolveEntityActionRef(input);
|
|
110
|
+
if (!resolved) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
refId: resolved.refId,
|
|
115
|
+
refType: resolved.refType,
|
|
116
|
+
companionEntity: versionCompanionEntityName(resolved.refType),
|
|
117
|
+
skipConfirm: Boolean(pickInputOrOptionsField(input, 'skipConfirm')),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export { AXPVersioningEntityCommandHelper as A, normalizeVersioningInput as n };
|
|
122
|
+
//# sourceMappingURL=acorex-platform-module-common-client-versioning-entity.command.util-CKlJNPHa.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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;QAC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AAO,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,2 +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,
|
|
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 getActiveStatuses, M as getFinalStatuses, N as getInitialStatuses, O as getStatusByName, P as getTransitionsFromStatus, Q as getTransitionsToStatus, R as historyPlugin, W as humanizeChange, X as isValidTransition, i as isValidVariableName, Y as mapChangeType, Z as mapOpToAction, _ as resolvePathKey, $ as statusPlugin, t as toVariableName, a0 as uniqueFieldsPlugin, v as versionEntriesToActivityLogs, a1 as versioningPlugin } from './acorex-platform-module-common-client-acorex-platform-module-common-client-BzK6gnbq.mjs';
|
|
2
|
+
export { CommonManifest } from '@acorex-platform/module-common-client/contracts';
|
|
2
3
|
//# sourceMappingURL=acorex-platform-module-common-client.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-common-client.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-common-client.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/package.json
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { AXPModuleManifest, AXPExpression } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
import { AXPEntityDetailDto } from '@acorex-platform/framework-shared/entity';
|
|
3
|
+
|
|
1
4
|
/** Cross-module catalog scope for shared questionnaires, question bank items, and workflows. */
|
|
2
5
|
declare const COMMON_CATALOG_SCOPE_GENERAL = "common.general";
|
|
3
6
|
|
|
@@ -28,6 +31,11 @@ declare const AXPCommonCommandKeys: {
|
|
|
28
31
|
readonly Lock: "lock-popup";
|
|
29
32
|
readonly Unlock: "unlock-confirm";
|
|
30
33
|
};
|
|
34
|
+
readonly Versioning: {
|
|
35
|
+
readonly CreateDraft: "create-entity-version-draft";
|
|
36
|
+
readonly Publish: "publish-entity-version";
|
|
37
|
+
readonly DeleteDraft: "delete-entity-version-draft";
|
|
38
|
+
};
|
|
31
39
|
};
|
|
32
40
|
|
|
33
41
|
declare const AXPCommonFeatureKeys: {
|
|
@@ -230,8 +238,8 @@ declare const AXPPermissionDomainModules: {
|
|
|
230
238
|
readonly ProjectsWork: readonly ["ProjectManagement", "TaskManagement", "TimesheetManagement"];
|
|
231
239
|
readonly AssetsMaintenance: readonly ["AssetManagement", "MaintenanceManagement", "MeasurementCore"];
|
|
232
240
|
readonly Collaboration: readonly ["Conversation", "CalendarManagement", "MeetingManagement", "CommunicationManagement", "BulletinManagement", "ReservationManagement", "HelpDesk", "ContactCore"];
|
|
233
|
-
readonly ContentDocuments: readonly ["DocumentManagement", "ContentManagement", "
|
|
234
|
-
readonly InsightsReporting: readonly ["ReportManagement", "DataManagement", "ActivityInsight"];
|
|
241
|
+
readonly ContentDocuments: readonly ["DocumentManagement", "ContentManagement", "AssessmentManagement"];
|
|
242
|
+
readonly InsightsReporting: readonly ["ReportManagement", "DataManagement", "ActivityInsight", "TestManagement"];
|
|
235
243
|
readonly SalesCustomers: readonly ["CustomerManagement", "ProductCatalog", "OrderManagement", "SubscriptionManagement", "BusinessCore"];
|
|
236
244
|
readonly Procurement: readonly ["SupplierManagement", "ProcurementManagement"];
|
|
237
245
|
readonly Learning: readonly ["LearningManagement"];
|
|
@@ -311,5 +319,73 @@ declare const RootConfig: {
|
|
|
311
319
|
};
|
|
312
320
|
};
|
|
313
321
|
|
|
314
|
-
|
|
315
|
-
|
|
322
|
+
/**
|
|
323
|
+
* Common Module Manifest.
|
|
324
|
+
* Defines module metadata, features, and provider references.
|
|
325
|
+
*/
|
|
326
|
+
declare const CommonManifest: AXPModuleManifest;
|
|
327
|
+
|
|
328
|
+
/** Entity plugin name. Independent from the `history` plugin. */
|
|
329
|
+
declare const AXP_VERSIONING_PLUGIN_NAME = "versioning";
|
|
330
|
+
declare const AXPVersioningField: {
|
|
331
|
+
readonly Version: "version";
|
|
332
|
+
readonly VersionId: "versionId";
|
|
333
|
+
readonly VersioningEnabled: "versioningEnabled";
|
|
334
|
+
readonly SourceId: "sourceId";
|
|
335
|
+
readonly VersionNumber: "versionNumber";
|
|
336
|
+
readonly VersioningStatus: "versioningStatus";
|
|
337
|
+
};
|
|
338
|
+
declare const AXPVersioningStatus: {
|
|
339
|
+
readonly Draft: "draft";
|
|
340
|
+
readonly Published: "published";
|
|
341
|
+
};
|
|
342
|
+
type AXPVersioningStatusValue = (typeof AXPVersioningStatus)[keyof typeof AXPVersioningStatus];
|
|
343
|
+
declare const AXP_VERSIONING_ERROR_CODES: {
|
|
344
|
+
readonly DraftExists: "VERSIONING_DRAFT_EXISTS";
|
|
345
|
+
readonly NotEligible: "VERSIONING_NOT_ELIGIBLE";
|
|
346
|
+
readonly PublishedImmutable: "VERSIONING_PUBLISHED_IMMUTABLE";
|
|
347
|
+
readonly HostContentLocked: "VERSIONING_HOST_CONTENT_LOCKED";
|
|
348
|
+
readonly NoDraft: "VERSIONING_NO_DRAFT";
|
|
349
|
+
readonly InvalidPublish: "VERSIONING_INVALID_PUBLISH";
|
|
350
|
+
};
|
|
351
|
+
declare const AXP_VERSIONING_ERROR_I18N: Record<string, string>;
|
|
352
|
+
/** Fields that live only on the host published row. */
|
|
353
|
+
declare const AXP_VERSIONING_HOST_OWN_FIELDS: Set<string>;
|
|
354
|
+
/** Fields that live only on the companion version row. */
|
|
355
|
+
declare const AXP_VERSIONING_COMPANION_OWN_FIELDS: Set<string>;
|
|
356
|
+
/**
|
|
357
|
+
* Host fields that may change while a published version is current
|
|
358
|
+
* (move in a folder, entity binding). Content fields are blocked when versioning is on.
|
|
359
|
+
*/
|
|
360
|
+
declare const AXP_VERSIONING_STRUCTURAL_FIELDS: Set<string>;
|
|
361
|
+
declare function versionCompanionEntityName(hostEntityName: string): string;
|
|
362
|
+
declare function hostEntityNameFromCompanion(companionEntityName: string): string | null;
|
|
363
|
+
declare function isVersionCompanionEntityName(entityName: string): boolean;
|
|
364
|
+
|
|
365
|
+
interface AXPVersioningPluginOptions {
|
|
366
|
+
/**
|
|
367
|
+
* Host field that marks whether this record uses draft/publish versioning.
|
|
368
|
+
* Default: `versioningEnabled`.
|
|
369
|
+
*/
|
|
370
|
+
enabledField?: string;
|
|
371
|
+
/**
|
|
372
|
+
* Optional expression evaluated against the host row (client action hide).
|
|
373
|
+
* Server still uses {@link enabledField}.
|
|
374
|
+
*/
|
|
375
|
+
enabledWhen?: AXPExpression | string;
|
|
376
|
+
}
|
|
377
|
+
/** Host row for versioning commands (generic plugin; extra fields allowed). */
|
|
378
|
+
interface AXPVersioningHostDto extends AXPEntityDetailDto<string> {
|
|
379
|
+
version?: number;
|
|
380
|
+
versionId?: string;
|
|
381
|
+
versioningEnabled?: boolean;
|
|
382
|
+
}
|
|
383
|
+
/** Companion `{Entity}Version` row. Create may send only `sourceId`. */
|
|
384
|
+
interface AXPVersioningCompanionDto extends AXPEntityDetailDto<string> {
|
|
385
|
+
sourceId?: string;
|
|
386
|
+
versionNumber?: number;
|
|
387
|
+
versioningStatus?: string;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export { AXMCommonSettings, AXMLockSystemSettings, AXPCommonCommandKeys, AXPCommonFeatureKeys, AXPCommonMenuKeys, AXPCommonPermissionGroupKeys, AXPPermissionDomainModules, AXPPermissionKeyModules, AXPVersionHistorySettings, AXPVersioningField, AXPVersioningStatus, AXP_VERSIONING_COMPANION_OWN_FIELDS, AXP_VERSIONING_ERROR_CODES, AXP_VERSIONING_ERROR_I18N, AXP_VERSIONING_HOST_OWN_FIELDS, AXP_VERSIONING_PLUGIN_NAME, AXP_VERSIONING_STRUCTURAL_FIELDS, AXP_VERSION_HISTORY_SETTING_DEFAULTS, COMMON_CATALOG_SCOPE_GENERAL, CommonManifest, RootConfig, hostEntityNameFromCompanion, humanizePermissionCapability, isPermissionEnabledForModules, isVersionCompanionEntityName, resolvePermissionI18nKeys, resolvePermissionModules, resolvePermissionTitleDisplay, versionCompanionEntityName };
|
|
391
|
+
export type { AXPPermissionModulesResolver, AXPVersioningCompanionDto, AXPVersioningHostDto, AXPVersioningPluginOptions, AXPVersioningStatusValue };
|
|
@@ -4,10 +4,11 @@ import { AXBasePageComponent } from '@acorex/components/page';
|
|
|
4
4
|
import { AXPCompareViewInputs, AXPCompareViewMode, AXPActivityLogCompareRequest } from '@acorex-platform/framework-client/layout/components';
|
|
5
5
|
import * as i1 from '@acorex/core/validation';
|
|
6
6
|
import { AXValidationRuleOptions, AXValidationRule, AXValidationRuleResult } from '@acorex/core/validation';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i24 from '@acorex-platform/framework-client/layout/widgets';
|
|
8
8
|
import { AXPMenuProvider, AXPMenuProviderContext, AXPSettingDefinitionProvider, AXPSettingDefinitionProviderContext, AXPSearchDisplayGroupResult, AXPSearchDisplayResult, AXPVersionEntry, AXVChangeType } from '@acorex-platform/framework-client/common';
|
|
9
9
|
import * as i1$1 from '@acorex-platform/framework-client/core';
|
|
10
|
-
import { AXPFeatureDefinitionProvider, AXPFeatureDefinitionProviderContext,
|
|
10
|
+
import { AXPFeatureDefinitionProvider, AXPFeatureDefinitionProviderContext, AXPActivityLog } from '@acorex-platform/framework-client/core';
|
|
11
|
+
export { CommonManifest } from '@acorex-platform/module-common-client/contracts';
|
|
11
12
|
import { Subject } from 'rxjs';
|
|
12
13
|
import { AXPEntityActionPlugin } from '@acorex-platform/framework-client/layout/entity';
|
|
13
14
|
import { AXPWidgetConfig } from '@acorex-platform/framework-shared/widget-core';
|
|
@@ -52,6 +53,12 @@ declare class AXPArchivePluginModule {
|
|
|
52
53
|
static ɵinj: i0.ɵɵInjectorDeclaration<AXPArchivePluginModule>;
|
|
53
54
|
}
|
|
54
55
|
|
|
56
|
+
declare class AXPVersioningPluginModule {
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPVersioningPluginModule, never>;
|
|
58
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXPVersioningPluginModule, never, never, never>;
|
|
59
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXPVersioningPluginModule>;
|
|
60
|
+
}
|
|
61
|
+
|
|
55
62
|
declare class AXPDisablePluginModule {
|
|
56
63
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPDisablePluginModule, never>;
|
|
57
64
|
static ɵmod: i0.ɵɵNgModuleDeclaration<AXPDisablePluginModule, never, never, never>;
|
|
@@ -186,7 +193,7 @@ declare class AXMCommonMiddlewaresModule {
|
|
|
186
193
|
|
|
187
194
|
declare class AXMCommonModule {
|
|
188
195
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXMCommonModule, never>;
|
|
189
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AXMCommonModule, never, [typeof AXPCategoryModule, typeof AXPCatalogScopePluginModule, typeof AXMLockSystemModule, typeof AXPHistoryModule, typeof AXPClonePluginModule, typeof AXPArchivePluginModule, typeof AXPDisablePluginModule, typeof AXPDefaultPluginModule, typeof AXPPrimaryPluginModule, typeof AXPUniqueFieldsPluginModule, typeof AXPNamePluginModule, typeof AXPDerivedNamePluginModule, typeof AXPTitlePluginModule, typeof AXPNotesPluginModule, typeof AXPDescriptionPluginModule, typeof AXPIconPluginModule, typeof AXPColorPluginModule, typeof AXPAvatarPluginModule, typeof AXPCompareModule, typeof AXPStatusPluginModule, typeof AXPComputedPropertiesModule, typeof AXPValidationRulesModule, typeof
|
|
196
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXMCommonModule, never, [typeof AXPCategoryModule, typeof AXPCatalogScopePluginModule, typeof AXMLockSystemModule, typeof AXPHistoryModule, typeof AXPClonePluginModule, typeof AXPArchivePluginModule, typeof AXPVersioningPluginModule, typeof AXPDisablePluginModule, typeof AXPDefaultPluginModule, typeof AXPPrimaryPluginModule, typeof AXPUniqueFieldsPluginModule, typeof AXPNamePluginModule, typeof AXPDerivedNamePluginModule, typeof AXPTitlePluginModule, typeof AXPNotesPluginModule, typeof AXPDescriptionPluginModule, typeof AXPIconPluginModule, typeof AXPColorPluginModule, typeof AXPAvatarPluginModule, typeof AXPCompareModule, typeof AXPStatusPluginModule, typeof AXPComputedPropertiesModule, typeof AXPValidationRulesModule, typeof i24.AXPWidgetsModule, typeof AXMCommonMiddlewaresModule], never>;
|
|
190
197
|
static ɵinj: i0.ɵɵInjectorDeclaration<AXMCommonModule>;
|
|
191
198
|
}
|
|
192
199
|
|
|
@@ -211,12 +218,6 @@ declare class AXPCommonFeatureDefinitionProvider implements AXPFeatureDefinition
|
|
|
211
218
|
provide(context: AXPFeatureDefinitionProviderContext): Promise<void>;
|
|
212
219
|
}
|
|
213
220
|
|
|
214
|
-
/**
|
|
215
|
-
* Common Module Manifest.
|
|
216
|
-
* Defines module metadata, features, and provider references.
|
|
217
|
-
*/
|
|
218
|
-
declare const CommonManifest: AXPModuleManifest;
|
|
219
|
-
|
|
220
221
|
interface AXPGlobalSearchConfigs {
|
|
221
222
|
window: () => Type<any>;
|
|
222
223
|
}
|
|
@@ -732,6 +733,8 @@ interface AXPEntityArchiveOverride {
|
|
|
732
733
|
}
|
|
733
734
|
declare const AXP_ENTITY_ARCHIVE_OVERRIDES: InjectionToken<AXPEntityArchiveOverride[]>;
|
|
734
735
|
|
|
736
|
+
declare const versioningPlugin: AXPEntityActionPlugin;
|
|
737
|
+
|
|
735
738
|
/**
|
|
736
739
|
* Configuration for the resource appointment page.
|
|
737
740
|
* Provide via AXP_RESOURCE_APPOINTMENT_PAGE_CONFIG to customize title, description, breadcrumbs, and board options.
|
|
@@ -769,5 +772,5 @@ declare class AXPResourceAppointmentPageComponent extends AXPPageLayoutBaseCompo
|
|
|
769
772
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXPResourceAppointmentPageComponent, "axp-resource-appointment-page", never, {}, {}, never, never, true, never>;
|
|
770
773
|
}
|
|
771
774
|
|
|
772
|
-
export { AXMCommonModule, AXMMenuProvider, AXMSettingProvider, AXMVersionHistoryPageComponent, AXPArchivePluginModule, AXPCommonFeatureDefinitionProvider, AXPDerivedNamePluginModule, AXPDisablePluginModule, AXPGlobalSearchModule, AXPGlobalSearchViewModel, AXPHistoryAuditInfoWidget, AXPHistoryModule, AXPLockEntityCommand, AXPResourceAppointmentPageComponent, AXPStatusPluginModule, AXPUniqueFieldsPluginModule, AXPUnlockEntityCommand, AXPValidationRulesModule, AXP_ENTITY_ARCHIVE_OVERRIDES, AXP_GLOBAL_SEARCH_CONFIG_TOKEN, AXP_RESOURCE_APPOINTMENT_PAGE_CONFIG, ApprovalStatusProvider, AtLeastOneOfValidationRule,
|
|
775
|
+
export { AXMCommonModule, AXMMenuProvider, AXMSettingProvider, AXMVersionHistoryPageComponent, AXPArchivePluginModule, AXPCommonFeatureDefinitionProvider, AXPDerivedNamePluginModule, AXPDisablePluginModule, AXPGlobalSearchModule, AXPGlobalSearchViewModel, AXPHistoryAuditInfoWidget, AXPHistoryModule, AXPLockEntityCommand, AXPResourceAppointmentPageComponent, AXPStatusPluginModule, AXPUniqueFieldsPluginModule, AXPUnlockEntityCommand, AXPValidationRulesModule, AXPVersioningPluginModule, AXP_ENTITY_ARCHIVE_OVERRIDES, AXP_GLOBAL_SEARCH_CONFIG_TOKEN, AXP_RESOURCE_APPOINTMENT_PAGE_CONFIG, ApprovalStatusProvider, AtLeastOneOfValidationRule, HISTORY_PAGE_COMPONENT_KEY, ShowVersionHistoryPopupCommand, StateStatusProvider, TaskStatusProvider, UniqueValidationRule, VARIABLE_NAME_VALIDATION_PATTERN, VariableNameValidationRule, aggregateVersionHistoryBarChartItems, archivePlugin, buildEntityFieldHistoryLineChartSeries, buildProductBasePriceHistoryLineChartSeries, derivedNamePlugin, disablePlugin, getActiveStatuses, getFinalStatuses, getInitialStatuses, getStatusByName, getTransitionsFromStatus, getTransitionsToStatus, historyPlugin, humanizeChange, isValidTransition, isValidVariableName, mapChangeType, mapOpToAction, resolvePathKey, statusPlugin, toVariableName, uniqueFieldsPlugin, versionEntriesToActivityLogs, versioningPlugin };
|
|
773
776
|
export type { AXAtLeastOneOfValidationRuleOptions, AXPArchivePluginOptions, AXPDerivedNameExtension, AXPDerivedNamePluginOptions, AXPDisablePluginOptions, AXPEntityArchiveOverride, AXPEntityHistoryBarChartItem, AXPEntityHistoryLineChartPoint, AXPEntityHistoryLineChartSeries, AXPGlobalSearchConfigs, AXPHistoryPluginOptions, AXPLockEntityCommandOutput, AXPResourceAppointmentPageConfig, AXPStatusPluginGenerateOptions, AXPStatusPluginGenerateViewsOptions, AXPStatusPluginOptions, AXPUnlockEntityCommandOutput, AXVariableNameValidationRuleOptions, GetHistoryLayoutResolver, HistoryDisplayMode, ShowVersionHistoryPopupInput, UniqueFieldsPluginOptions };
|