@acorex-platform/module-application-management-client 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/fesm2022/acorex-platform-module-application-management-client-application-status.provider-DqPlbWuW.mjs +71 -0
  2. package/fesm2022/acorex-platform-module-application-management-client-application-status.provider-DqPlbWuW.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-application-management-client-assign-features.command-BheloAKT.mjs +151 -0
  4. package/fesm2022/acorex-platform-module-application-management-client-assign-features.command-BheloAKT.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-application-management-client-contracts.mjs +2027 -0
  6. package/fesm2022/acorex-platform-module-application-management-client-contracts.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-application-management-client-feature-definition.provider-Depetn50.mjs +22 -0
  8. package/fesm2022/acorex-platform-module-application-management-client-feature-definition.provider-Depetn50.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-application-management-client-features-editor.component-DNc_GH0v.mjs +548 -0
  10. package/fesm2022/acorex-platform-module-application-management-client-features-editor.component-DNc_GH0v.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-application-management-client-features-widget-column.component-CiBGmw6I.mjs +46 -0
  12. package/fesm2022/acorex-platform-module-application-management-client-features-widget-column.component-CiBGmw6I.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-application-management-client-features-widget-designer.component-nStj9BAw.mjs +20 -0
  14. package/fesm2022/acorex-platform-module-application-management-client-features-widget-designer.component-nStj9BAw.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-application-management-client-features-widget-edit.component-D1MzYI_s.mjs +42 -0
  16. package/fesm2022/acorex-platform-module-application-management-client-features-widget-edit.component-D1MzYI_s.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-application-management-client-features-widget-print.component-C6Z9uzRr.mjs +21 -0
  18. package/fesm2022/acorex-platform-module-application-management-client-features-widget-print.component-C6Z9uzRr.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-application-management-client-features-widget-view.component-ysM1jD08.mjs +128 -0
  20. package/fesm2022/acorex-platform-module-application-management-client-features-widget-view.component-ysM1jD08.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-application-management-client-permission-definition.provider-Dn5WiubC.mjs +32 -0
  22. package/fesm2022/acorex-platform-module-application-management-client-permission-definition.provider-Dn5WiubC.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-application-management-client.mjs +1030 -0
  24. package/fesm2022/acorex-platform-module-application-management-client.mjs.map +1 -0
  25. package/package.json +28 -0
  26. package/types/acorex-platform-module-application-management-client-contracts.d.ts +161 -0
  27. package/types/acorex-platform-module-application-management-client.d.ts +57 -0
@@ -0,0 +1,1030 @@
1
+ import { AXPSettingsService, AXP_APP_VERSION_PROVIDER, AXPSearchCommandProvider, createEntityCommandOptions, AXPNavBarSlotComponent, AXPFooterTextSlotComponent, AXP_PLATFORM_CONFIG_TOKEN, AXP_SETTING_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_STATUS_PROVIDERS, AXP_MENU_PROVIDER } from '@acorex-platform/framework-client/common';
2
+ import { AXPPlatformScope, AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';
3
+ import * as i2$2 from '@acorex-platform/framework-client/core';
4
+ import { objectKeyValueTransforms, AXPAppStartUpService, AXPComponentSlotModule, AXP_MODULE_MANIFEST_PROVIDER, AXP_CONTEXT_DEFINITION_PROVIDER, provideLazyProvider, AXP_FEATURE_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/core';
5
+ import { AXPSessionService, AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';
6
+ import { AXPEntityService, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER } from '@acorex-platform/framework-client/layout/entity';
7
+ import { AXPCommandService, provideCommandSetups } from '@acorex-platform/framework-client/runtime';
8
+ import * as i0 from '@angular/core';
9
+ import { ChangeDetectionStrategy, Component, inject, Injectable, signal, HostListener, NgModule } from '@angular/core';
10
+ import { ROUTES } from '@angular/router';
11
+ import { AXPopupService } from '@acorex/components/popup';
12
+ import * as i4 from '@acorex/components/button';
13
+ import { AXButtonModule } from '@acorex/components/button';
14
+ import * as i2 from '@acorex/components/check-box';
15
+ import { AXCheckBoxModule } from '@acorex/components/check-box';
16
+ import * as i3 from '@acorex/components/decorators';
17
+ import { AXDecoratorModule } from '@acorex/components/decorators';
18
+ import * as i1 from '@acorex/components/label';
19
+ import { AXLabelModule } from '@acorex/components/label';
20
+ import { AXBasePageComponent } from '@acorex/components/page';
21
+ import { AXSafePipe } from '@acorex/core/pipes';
22
+ import * as i6 from '@acorex/core/translation';
23
+ import { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';
24
+ import * as i1$1 from '@angular/common';
25
+ import { CommonModule } from '@angular/common';
26
+ import { RootConfig, AXPApplicationInfoSettings, AXMPermissionsKeys, AXPApplicationManagementMenuKeys } from '@acorex-platform/module-application-management-client/contracts';
27
+ import { defineCommand, AXP_COMMAND_DEFINITION_CATEGORY_PLATFORM } from '@acorex-platform/framework-shared/runtime';
28
+ import { DomSanitizer } from '@angular/platform-browser';
29
+ import * as i1$2 from '@acorex/components/time-line';
30
+ import { AXTimeLineModule } from '@acorex/components/time-line';
31
+ import { AXDateTimeModule } from '@acorex/core/date-time';
32
+ import * as i4$1 from '@acorex/core/format';
33
+ import { AXFormatService, AXFormatModule } from '@acorex/core/format';
34
+ import { AXOutlineContainerDirective } from '@acorex/cdk/outline';
35
+ import * as i2$1 from '@acorex/components/side-menu';
36
+ import { AXSideMenuModule, AXOutlineSideMenuDirective } from '@acorex/components/side-menu';
37
+ import { AXPThemeLayoutBlockComponent } from '@acorex-platform/framework-client/layout/components';
38
+ import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase } from '@acorex-platform/framework-client/layout/views';
39
+ import { AXPWidgetCoreModule, AXP_WIDGET_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/layout/widget-core';
40
+ import { AXPWidgetGroupEnum } from '@acorex-platform/framework-shared/widget-core';
41
+ import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY } from '@acorex-platform/framework-client/layout/widgets';
42
+
43
+ class AXMNotifyAppTermComponent extends AXBasePageComponent {
44
+ constructor() {
45
+ super(...arguments);
46
+ this.isConfirm = false;
47
+ this.i18n = RootConfig.config.i18n;
48
+ }
49
+ transformContent(content) {
50
+ return content.replace(/\n/g, '<br>');
51
+ }
52
+ send() {
53
+ this.close({ data: this.data });
54
+ }
55
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotifyAppTermComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
56
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMNotifyAppTermComponent, isStandalone: true, selector: "axm-notify-app-term", usesInheritance: true, ngImport: i0, template: "@for (item of data; track $index) {\n <ax-content class=\"block px-4 py-4 font-bold\">{{ item.title }}</ax-content>\n <ax-content\n class=\"block px-4 pb-4 text-base/6\"\n [innerHTML]=\"transformContent(item.content) | safe: 'html'\"\n ></ax-content>\n}\n<ax-footer class=\"flex items-center justify-between p-2\">\n <ax-check-box [(value)]=\"isConfirm\">\n <ax-label>{{ 'agreeTerm' | translate: { scope: i18n } | async }}</ax-label>\n </ax-check-box>\n <ax-button\n (click)=\"send()\"\n [text]=\"'@general:actions.ok.title' | translate | async\"\n [disabled]=\"!isConfirm\"\n color=\"primary\"\n ></ax-button>\n</ax-footer>\n\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i2.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AXSafePipe, name: "safe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
57
+ }
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotifyAppTermComponent, decorators: [{
59
+ type: Component,
60
+ args: [{ selector: 'axm-notify-app-term', imports: [
61
+ CommonModule,
62
+ AXLabelModule,
63
+ AXCheckBoxModule,
64
+ AXDecoratorModule,
65
+ AXButtonModule,
66
+ AXTranslationModule,
67
+ AXSafePipe,
68
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (item of data; track $index) {\n <ax-content class=\"block px-4 py-4 font-bold\">{{ item.title }}</ax-content>\n <ax-content\n class=\"block px-4 pb-4 text-base/6\"\n [innerHTML]=\"transformContent(item.content) | safe: 'html'\"\n ></ax-content>\n}\n<ax-footer class=\"flex items-center justify-between p-2\">\n <ax-check-box [(value)]=\"isConfirm\">\n <ax-label>{{ 'agreeTerm' | translate: { scope: i18n } | async }}</ax-label>\n </ax-check-box>\n <ax-button\n (click)=\"send()\"\n [text]=\"'@general:actions.ok.title' | translate | async\"\n [disabled]=\"!isConfirm\"\n color=\"primary\"\n ></ax-button>\n</ax-footer>\n\n" }]
69
+ }] });
70
+
71
+ //#endregion
72
+ //#region ---- Helpers ----
73
+ function resolveTerms(input) {
74
+ if (!input) {
75
+ return [];
76
+ }
77
+ if (Array.isArray(input)) {
78
+ return input;
79
+ }
80
+ return input.terms ?? [];
81
+ }
82
+ //#endregion
83
+ //#region ---- New term command ----
84
+ /**
85
+ * Shows the terms confirmation popup, then marks each term as confirmed in user settings.
86
+ * Replaces the former `new-term` workflow (popup step + settings step).
87
+ */
88
+ class AXMNewTermCommand {
89
+ constructor() {
90
+ this.popupService = inject(AXPopupService);
91
+ this.settingsService = inject(AXPSettingsService);
92
+ }
93
+ async execute(input = []) {
94
+ const dataList = resolveTerms(input);
95
+ if (dataList.length === 0) {
96
+ return { success: true };
97
+ }
98
+ await this.popupService.open(AXMNotifyAppTermComponent, {
99
+ title: 'New Terms And Conditions',
100
+ data: { data: dataList },
101
+ closeButton: false,
102
+ });
103
+ for (const term of dataList) {
104
+ await this.settingsService.scope(AXPPlatformScope.User).set(`is-confirm-term-${term.id}`, true);
105
+ }
106
+ return { success: true };
107
+ }
108
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNewTermCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
109
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNewTermCommand, providedIn: 'root' }); }
110
+ }
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNewTermCommand, decorators: [{
112
+ type: Injectable,
113
+ args: [{ providedIn: 'root' }]
114
+ }] });
115
+
116
+ var newTerm_command = /*#__PURE__*/Object.freeze({
117
+ __proto__: null,
118
+ AXMNewTermCommand: AXMNewTermCommand
119
+ });
120
+
121
+ /**
122
+ * Build-time only. Do not import from Angular modules.
123
+ */
124
+ const axmNewTermCommandDefinition = defineCommand({
125
+ key: 'new-term',
126
+ title: 'Confirm new terms and conditions',
127
+ description: 'AXMNewTermCommand opens AXMNotifyAppTermComponent for unconfirmed terms, then sets is-confirm-term-{id} in user settings.',
128
+ executionMode: 'frontend',
129
+ inputs: [
130
+ {
131
+ name: 'terms',
132
+ title: 'Terms',
133
+ description: 'AXMAppTermEntityModel[] (or pass the array as root input from startup).',
134
+ interface: { name: 'text-editor' },
135
+ },
136
+ ],
137
+ outcomes: {
138
+ mode: 'static',
139
+ values: ['success', 'failure'],
140
+ },
141
+ ai: {
142
+ tags: ['application-management', 'terms', 'popup'],
143
+ },
144
+ categories: [AXP_COMMAND_DEFINITION_CATEGORY_PLATFORM],
145
+ });
146
+
147
+ //#region ---- Show release notes command ----
148
+ class AXMShowReleaseNotesCommand {
149
+ constructor() {
150
+ this.popupService = inject(AXPopupService);
151
+ this.translateService = inject(AXTranslationService);
152
+ }
153
+ async execute() {
154
+ const comp = (await Promise.resolve().then(function () { return listVersion_component; })).AXMListVersionComponent;
155
+ await this.popupService.open(comp, {
156
+ title: await this.translateService.translateAsync('@application-management:application-info.menus.release-notes.title'),
157
+ });
158
+ return { success: true };
159
+ }
160
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMShowReleaseNotesCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
161
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMShowReleaseNotesCommand, providedIn: 'root' }); }
162
+ }
163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMShowReleaseNotesCommand, decorators: [{
164
+ type: Injectable,
165
+ args: [{ providedIn: 'root' }]
166
+ }] });
167
+
168
+ var showReleaseNotes_command = /*#__PURE__*/Object.freeze({
169
+ __proto__: null,
170
+ AXMShowReleaseNotesCommand: AXMShowReleaseNotesCommand
171
+ });
172
+
173
+ /**
174
+ * Build-time only. Do not import from Angular modules.
175
+ */
176
+ const axmShowReleaseNotesCommandDefinition = defineCommand({
177
+ key: 'show-release-notes',
178
+ title: 'Show release notes',
179
+ description: 'AXMShowReleaseNotesCommand opens AXMListVersionComponent in a popup (version timeline).',
180
+ executionMode: 'frontend',
181
+ inputs: [],
182
+ outcomes: {
183
+ mode: 'static',
184
+ values: ['success', 'failure'],
185
+ },
186
+ ai: {
187
+ tags: ['application-management', 'release-notes', 'popup'],
188
+ },
189
+ categories: [AXP_COMMAND_DEFINITION_CATEGORY_PLATFORM],
190
+ });
191
+
192
+ class AXMNotifyAppVersionComponent extends AXBasePageComponent {
193
+ constructor() {
194
+ super(...arguments);
195
+ this.isShowAgain = true;
196
+ this.sanitize = inject(DomSanitizer);
197
+ }
198
+ ngOnInit() {
199
+ super.ngOnInit();
200
+ this.safeData = this.sanitize.bypassSecurityTrustHtml(this.data.changeLog);
201
+ }
202
+ send() {
203
+ this.close({ data: this.data, isShowAgain: !this.isShowAgain });
204
+ }
205
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotifyAppVersionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
206
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXMNotifyAppVersionComponent, isStandalone: true, selector: "axm-notify-app-version", usesInheritance: true, ngImport: i0, template: "<ax-content class=\"block px-4 py-4 text-base/6\" [innerHTML]=\"safeData\"></ax-content>\n<ax-footer class=\"flex items-center justify-between p-2\">\n <ax-check-box [(value)]=\"isShowAgain\">\n <ax-label>Don't Show Again</ax-label>\n </ax-check-box>\n <ax-button color=\"primary\" (click)=\"send()\" [text]=\"'@general:actions.ok.title' | translate | async\"></ax-button>\n</ax-footer>\n\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i2.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
207
+ }
208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotifyAppVersionComponent, decorators: [{
209
+ type: Component,
210
+ args: [{ selector: 'axm-notify-app-version', imports: [CommonModule, AXLabelModule, AXCheckBoxModule, AXDecoratorModule, AXButtonModule, AXTranslationModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ax-content class=\"block px-4 py-4 text-base/6\" [innerHTML]=\"safeData\"></ax-content>\n<ax-footer class=\"flex items-center justify-between p-2\">\n <ax-check-box [(value)]=\"isShowAgain\">\n <ax-label>Don't Show Again</ax-label>\n </ax-check-box>\n <ax-button color=\"primary\" (click)=\"send()\" [text]=\"'@general:actions.ok.title' | translate | async\"></ax-button>\n</ax-footer>\n\n" }]
211
+ }] });
212
+
213
+ class AXMListVersionComponent extends AXBasePageComponent {
214
+ constructor() {
215
+ super(...arguments);
216
+ this.entityService = inject(AXPEntityService);
217
+ this.appVersionService = this.entityService.withEntity(RootConfig.module.name, RootConfig.entities.appVersion.name).data();
218
+ this.formatService = inject(AXFormatService);
219
+ this.sanitize = inject(DomSanitizer);
220
+ this.versions = signal([], ...(ngDevMode ? [{ debugName: "versions" }] : /* istanbul ignore next */ []));
221
+ }
222
+ async ngOnInit() {
223
+ const result = await this.appVersionService.query({
224
+ take: 1000,
225
+ skip: 0,
226
+ });
227
+ const mappedItems = result.items.map((item) => ({
228
+ id: item.id,
229
+ //TODO to translate
230
+ title: `Version ${item.versionNumber} Published at ${this.formatService.format(item.publishDate, 'datetime', {
231
+ format: 'date',
232
+ })}`,
233
+ content: this.sanitize.bypassSecurityTrustHtml(item.changeLog) ?? '',
234
+ }));
235
+ this.versions.set(mappedItems);
236
+ }
237
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMListVersionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
238
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMListVersionComponent, isStandalone: true, selector: "axm-list-version", usesInheritance: true, ngImport: i0, template: "<div class=\"px-12 min-h-96\">\n <ax-time-line>\n @for (version of versions(); track version.id) {\n <ax-time-line-item [text]=\"version.title\" [isCollapsed]=\"$index == 0 ? false : true\">\n <ax-icon class=\"fa-solid fa-flag-checkered\"></ax-icon>\n <ax-content class=\"px-8 py-2 text-base/6\" [innerHtml]=\"version.content\"></ax-content>\n </ax-time-line-item>\n }\n </ax-time-line>\n</div>\n<ax-footer class=\"flex justify-end!\"\n ><ax-button\n [text]=\"'@general:actions.ok.title' | translate | async\"\n color=\"primary\"\n (onClick)=\"this.close()\"\n ></ax-button\n></ax-footer>\n\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXTimeLineModule }, { kind: "component", type: i1$2.AXTimeLineComponent, selector: "ax-time-line", inputs: ["mode"] }, { kind: "component", type: i1$2.AXTimeLineItemComponent, selector: "ax-time-line-item", inputs: ["text", "isActive", "isCollapsed"], outputs: ["isCollapsedChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXDateTimeModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
239
+ }
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMListVersionComponent, decorators: [{
241
+ type: Component,
242
+ args: [{ selector: 'axm-list-version', imports: [
243
+ CommonModule,
244
+ AXTimeLineModule,
245
+ AXDecoratorModule,
246
+ AXFormatModule,
247
+ AXDateTimeModule,
248
+ AXButtonModule,
249
+ AXTranslationModule,
250
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"px-12 min-h-96\">\n <ax-time-line>\n @for (version of versions(); track version.id) {\n <ax-time-line-item [text]=\"version.title\" [isCollapsed]=\"$index == 0 ? false : true\">\n <ax-icon class=\"fa-solid fa-flag-checkered\"></ax-icon>\n <ax-content class=\"px-8 py-2 text-base/6\" [innerHtml]=\"version.content\"></ax-content>\n </ax-time-line-item>\n }\n </ax-time-line>\n</div>\n<ax-footer class=\"flex justify-end!\"\n ><ax-button\n [text]=\"'@general:actions.ok.title' | translate | async\"\n color=\"primary\"\n (onClick)=\"this.close()\"\n ></ax-button\n></ax-footer>\n\n" }]
251
+ }] });
252
+
253
+ var listVersion_component = /*#__PURE__*/Object.freeze({
254
+ __proto__: null,
255
+ AXMListVersionComponent: AXMListVersionComponent
256
+ });
257
+
258
+ //#endregion
259
+ //#region ---- Component ----
260
+ class AXMApplicationInfoSlotComponent {
261
+ constructor() {
262
+ this.entityService = inject(AXPEntityService);
263
+ //#region ---- Services & Dependencies ----
264
+ this.versionProvider = inject(AXP_APP_VERSION_PROVIDER);
265
+ this.commandService = inject(AXPCommandService);
266
+ this.sessionService = inject(AXPSessionService);
267
+ this.settingsService = inject(AXPSettingsService);
268
+ this.editionService = this.entityService.withEntity(RootConfig.module.name, RootConfig.entities.edition.name).data();
269
+ this.applicationService = this.entityService.withEntity(RootConfig.module.name, RootConfig.entities.application.name).data();
270
+ //#endregion
271
+ //#region ---- Properties ----
272
+ this.displayText = signal('', ...(ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []));
273
+ }
274
+ //#endregion
275
+ //#region ---- Lifecycle Methods ----
276
+ async ngOnInit() {
277
+ await this.loadDisplayText();
278
+ }
279
+ //#endregion
280
+ //#region ---- UI Handlers ----
281
+ openPopup() {
282
+ void this.commandService.execute('show-release-notes', {});
283
+ }
284
+ //#endregion
285
+ //#region ---- Private Methods ----
286
+ async loadDisplayText() {
287
+ const application = this.sessionService.application;
288
+ if (!application) {
289
+ this.displayText.set('');
290
+ return;
291
+ }
292
+ // Get version
293
+ const versionInfo = await this.versionProvider.provider();
294
+ const version = versionInfo.version;
295
+ // Get application title
296
+ const appTitle = application.title || application.name || '';
297
+ // Check if application has multiple editions
298
+ let editionName = '';
299
+ const hasMultipleEditions = await this.checkMultipleEditions(application.id);
300
+ if (hasMultipleEditions && application.edition?.title) {
301
+ editionName = application.edition.title;
302
+ }
303
+ // Get display pattern from settings
304
+ const pattern = await this.settingsService
305
+ .scope(AXPPlatformScope.Platform)
306
+ .get(AXPApplicationInfoSettings.DisplayPattern);
307
+ const displayPattern = pattern || '{appTitle} {[editionName]} v{version}';
308
+ // Replace placeholders
309
+ this.displayText.set(displayPattern
310
+ .replace(/\{appTitle\}/g, appTitle)
311
+ .replace(/\{\[editionName\]\}/g, editionName ? `[${editionName}]` : '')
312
+ .replace(/\{editionName\}/g, editionName)
313
+ .replace(/\{version\}/g, version)
314
+ .trim());
315
+ }
316
+ async checkMultipleEditions(applicationId) {
317
+ try {
318
+ // Get full application entity to access editionIds
319
+ const application = await this.applicationService.byKey(applicationId);
320
+ if (!application || !application.editionIds || application.editionIds.length === 0) {
321
+ return false;
322
+ }
323
+ // Query editions that belong to this application
324
+ const editionsResult = await this.editionService.query({
325
+ skip: 0,
326
+ take: 2, // We only need to know if there are more than 1
327
+ filter: {
328
+ logic: 'and',
329
+ filters: [
330
+ {
331
+ field: 'id',
332
+ operator: { type: 'in' },
333
+ value: application.editionIds,
334
+ },
335
+ ],
336
+ },
337
+ });
338
+ return editionsResult.items.length > 1;
339
+ }
340
+ catch (error) {
341
+ console.error('Error checking multiple editions:', error);
342
+ return false;
343
+ }
344
+ }
345
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMApplicationInfoSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
346
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXMApplicationInfoSlotComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: ` <small class="text-sm cursor-pointer" (click)="openPopup()">{{ displayText() }}</small> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
347
+ }
348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMApplicationInfoSlotComponent, decorators: [{
349
+ type: Component,
350
+ args: [{
351
+ template: ` <small class="text-sm cursor-pointer" (click)="openPopup()">{{ displayText() }}</small> `,
352
+ standalone: true,
353
+ changeDetection: ChangeDetectionStrategy.OnPush,
354
+ }]
355
+ }] });
356
+
357
+ class AXMListTermsComponent extends AXPPageLayoutBaseComponent {
358
+ constructor() {
359
+ super(...arguments);
360
+ this.entityService = inject(AXPEntityService);
361
+ this.service = this.entityService.withEntity(RootConfig.module.name, RootConfig.entities.appTerm.name).data();
362
+ this.terms = [];
363
+ this.loaded = signal(false, ...(ngDevMode ? [{ debugName: "loaded" }] : /* istanbul ignore next */ []));
364
+ this.showScrollSide = signal(true, ...(ngDevMode ? [{ debugName: "showScrollSide" }] : /* istanbul ignore next */ []));
365
+ }
366
+ ngAfterViewInit() {
367
+ this.checkScroll();
368
+ }
369
+ onResize() {
370
+ this.checkScroll();
371
+ }
372
+ checkScroll() {
373
+ const contentElement = document.getElementById('contentDiv');
374
+ if (contentElement != null) {
375
+ this.showScrollSide.set(contentElement.offsetHeight > window.innerHeight - 140);
376
+ }
377
+ }
378
+ async ngOnInit() {
379
+ super.ngOnInit();
380
+ const result = await this.service.query({
381
+ skip: 0,
382
+ take: 1000,
383
+ });
384
+ this.terms = result.items.map((term) => {
385
+ return {
386
+ ...term,
387
+ content: term.content.replace(/\n/g, '<br>'),
388
+ };
389
+ });
390
+ this.loaded.set(true);
391
+ setTimeout(() => this.checkScroll(), 50);
392
+ }
393
+ getPageTitle() {
394
+ return `t("app-term.page-title", {scope:"${RootConfig.config.i18n}"})`;
395
+ }
396
+ getPageDescription() {
397
+ return `t("app-term.page-description", {scope:"${RootConfig.config.i18n}"})`;
398
+ }
399
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMListTermsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
400
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMListTermsComponent, isStandalone: true, selector: "ng-component", host: { listeners: { "window:resize": "onResize()" } }, providers: [
401
+ {
402
+ provide: AXPPageLayoutBase,
403
+ useExisting: AXMListTermsComponent,
404
+ },
405
+ ], usesInheritance: true, ngImport: i0, template: "<axp-page-layout *translate=\"let t\">\n @if(loaded()){\n <axp-page-content id=\"contentDiv\" axOutlineContainer target=\"h2\" [scrollableElementId]=\"'axp-page-layout'\"\n [activationOffset]=\"120\" class=\"flex flex-row\">\n <div class=\"flex flex-col\">\n @for (term of terms; track term.id) {\n <div class=\"flex flex-col\">\n <h2 class=\"px-4 font-semibold text-xl\">{{ term.title }}</h2>\n <p class=\"px-4 text-sm leading-5 opacity-65\">\n {{ term.effectiveDate | format : 'datetime' | async }}\n </p>\n <div class=\"pt-3 pb-6 px-4 text-base/6\" [innerHTML]=\"term.content | safe:'html'\"></div>\n </div>\n }\n </div>\n @if(showScrollSide()){\n <div class=\"hidden lg:block min-w-60\">\n <ax-side-menu axOutlineSideMenu look=\"with-line\" class=\"w-full sticky top-24\"></ax-side-menu>\n </div>\n }\n </axp-page-content>\n }\n</axp-page-layout>\n\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i6.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXSideMenuModule }, { kind: "component", type: i2$1.AXSideMenuComponent, selector: "ax-side-menu", inputs: ["items", "look", "location", "mode"], outputs: ["itemsChange"] }, { kind: "directive", type: i2$1.AXOutlineSideMenuDirective, selector: "[axOutlineSideMenu]", exportAs: ["axOutlineSideMenu"] }, { kind: "component", type: AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "directive", type: AXOutlineContainerDirective, selector: "[axOutlineContainer]", inputs: ["target", "smoothScroll", "showHashItem", "activationOffset", "copyUrlOnClick", "activateLastAtBottom", "scrollableElementId"], exportAs: ["axOutlineContainer"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.AXFormatPipe, name: "format" }, { kind: "pipe", type: AXSafePipe, name: "safe" }] }); }
406
+ }
407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMListTermsComponent, decorators: [{
408
+ type: Component,
409
+ args: [{ imports: [
410
+ CommonModule,
411
+ AXDecoratorModule,
412
+ AXFormatModule,
413
+ AXPThemeLayoutBlockComponent,
414
+ AXTranslationModule,
415
+ AXSideMenuModule,
416
+ AXPPageLayoutComponent,
417
+ AXSafePipe,
418
+ AXOutlineContainerDirective,
419
+ AXOutlineSideMenuDirective,
420
+ ], providers: [
421
+ {
422
+ provide: AXPPageLayoutBase,
423
+ useExisting: AXMListTermsComponent,
424
+ },
425
+ ], template: "<axp-page-layout *translate=\"let t\">\n @if(loaded()){\n <axp-page-content id=\"contentDiv\" axOutlineContainer target=\"h2\" [scrollableElementId]=\"'axp-page-layout'\"\n [activationOffset]=\"120\" class=\"flex flex-row\">\n <div class=\"flex flex-col\">\n @for (term of terms; track term.id) {\n <div class=\"flex flex-col\">\n <h2 class=\"px-4 font-semibold text-xl\">{{ term.title }}</h2>\n <p class=\"px-4 text-sm leading-5 opacity-65\">\n {{ term.effectiveDate | format : 'datetime' | async }}\n </p>\n <div class=\"pt-3 pb-6 px-4 text-base/6\" [innerHTML]=\"term.content | safe:'html'\"></div>\n </div>\n }\n </div>\n @if(showScrollSide()){\n <div class=\"hidden lg:block min-w-60\">\n <ax-side-menu axOutlineSideMenu look=\"with-line\" class=\"w-full sticky top-24\"></ax-side-menu>\n </div>\n }\n </axp-page-content>\n }\n</axp-page-layout>\n\n" }]
426
+ }], propDecorators: { onResize: [{
427
+ type: HostListener,
428
+ args: ['window:resize']
429
+ }] } });
430
+
431
+ var listTerms_component = /*#__PURE__*/Object.freeze({
432
+ __proto__: null,
433
+ AXMListTermsComponent: AXMListTermsComponent
434
+ });
435
+
436
+ //#region ---- Imports ----
437
+ //#endregion
438
+ //#region ---- Setting Provider ----
439
+ const I18N_APP = '@application-management:application-info.settings';
440
+ const I18N_GENERAL = '@general:settings';
441
+ class AXPApplicationInfoSettingProvider {
442
+ async provide(context) {
443
+ // Find the 'Experience' settings group
444
+ const group = context.group('experience');
445
+ if (!group) {
446
+ return;
447
+ }
448
+ // Find the 'Startup' section
449
+ const section = group.section('startup');
450
+ if (!section) {
451
+ return;
452
+ }
453
+ // Add the 'Application Info Display Pattern' setting
454
+ section.addSetting({
455
+ key: AXPApplicationInfoSettings.DisplayPattern,
456
+ title: `${I18N_APP}.display-pattern.title`,
457
+ scope: AXPPlatformScope.Platform,
458
+ overridableAt: [],
459
+ isInherited: false,
460
+ defaultValue: '{appTitle} {[editionName]} v{version}',
461
+ widget: {
462
+ type: AXPWidgetsCatalog.text,
463
+ options: {
464
+ placeholder: `${I18N_APP}.display-pattern.placeholder`,
465
+ },
466
+ },
467
+ description: `${I18N_APP}.display-pattern.description`,
468
+ });
469
+ // Add the 'Application Terms' setting
470
+ section.addSetting({
471
+ key: AXPApplicationInfoSettings.ApplicationTerms,
472
+ title: `${I18N_GENERAL}.experience.startup.application-terms.title`,
473
+ scope: AXPPlatformScope.Platform,
474
+ overridableAt: [],
475
+ isInherited: false,
476
+ defaultValue: false,
477
+ valueTransforms: objectKeyValueTransforms('id'),
478
+ widget: {
479
+ type: AXPWidgetsCatalog.toggle,
480
+ options: {
481
+ label: null,
482
+ },
483
+ },
484
+ description: `${I18N_GENERAL}.experience.startup.application-terms.description`,
485
+ });
486
+ // Add the 'Release Notes' setting
487
+ section.addSetting({
488
+ key: AXPApplicationInfoSettings.ReleaseNotes,
489
+ title: `${I18N_GENERAL}.experience.startup.release-notes.title`,
490
+ scope: AXPPlatformScope.User,
491
+ overridableAt: [],
492
+ isInherited: true,
493
+ defaultValue: false,
494
+ valueTransforms: objectKeyValueTransforms('id'),
495
+ widget: {
496
+ type: AXPWidgetsCatalog.toggle,
497
+ options: {
498
+ label: null,
499
+ },
500
+ },
501
+ description: `${I18N_GENERAL}.experience.startup.release-notes.description`,
502
+ });
503
+ section.endSection();
504
+ }
505
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPApplicationInfoSettingProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
506
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPApplicationInfoSettingProvider }); }
507
+ }
508
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPApplicationInfoSettingProvider, decorators: [{
509
+ type: Injectable
510
+ }] });
511
+
512
+ class AXMAppTermsCheckService {
513
+ constructor() {
514
+ this.entityService = inject(AXPEntityService);
515
+ this.settingsService = inject(AXPSettingsService);
516
+ this.commandService = inject(AXPCommandService);
517
+ this.appTermService = this.entityService.withEntity(RootConfig.module.name, RootConfig.entities.appTerm.name).data();
518
+ this.appInitService = inject(AXPAppStartUpService);
519
+ this.sessionService = inject(AXPSessionService);
520
+ this.appInitService.registerTask({
521
+ name: 'Terms',
522
+ statusText: '@application-management:app-startup.checking-terms',
523
+ priority: 6,
524
+ run: async () => {
525
+ this.sessionService.application$.subscribe(async (app) => {
526
+ if (app != null) {
527
+ const filterTerms = [];
528
+ const terms = await this.appTermService.query();
529
+ for (const term of terms.items) {
530
+ const isConfirm = await this.settingsService
531
+ .scope(AXPPlatformScope.User)
532
+ .get(`is-confirm-term-${term.id}`);
533
+ const isEnableToShow = await this.settingsService
534
+ .scope(AXPPlatformScope.Platform)
535
+ .get(AXPApplicationInfoSettings.ApplicationTerms);
536
+ if (!isConfirm && isEnableToShow) {
537
+ filterTerms.push(term);
538
+ }
539
+ }
540
+ if (filterTerms.length > 0) {
541
+ setTimeout(() => {
542
+ void this.commandService.execute('new-term', filterTerms);
543
+ }, 500);
544
+ }
545
+ }
546
+ });
547
+ },
548
+ });
549
+ }
550
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMAppTermsCheckService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
551
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMAppTermsCheckService }); }
552
+ }
553
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMAppTermsCheckService, decorators: [{
554
+ type: Injectable
555
+ }], ctorParameters: () => [] });
556
+
557
+ const AXPModuleFeatureEditorWidget = {
558
+ name: 'module-feature-editor',
559
+ title: 'Module & Features Editor',
560
+ description: 'Widget for managing module selection and their features with full editor interface',
561
+ type: 'view',
562
+ categories: [],
563
+ groups: [AXPWidgetGroupEnum.EntityWidget],
564
+ icon: 'fa-light fa-star',
565
+ properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
566
+ components: {
567
+ view: {
568
+ component: () => import('./acorex-platform-module-application-management-client-features-widget-view.component-ysM1jD08.mjs').then((c) => c.AXPFeaturesWidgetViewComponent),
569
+ },
570
+ edit: {
571
+ component: () => import('./acorex-platform-module-application-management-client-features-widget-edit.component-D1MzYI_s.mjs').then((c) => c.AXPModuleFeatureEditorWidgetEditComponent),
572
+ },
573
+ column: {
574
+ component: () => import('./acorex-platform-module-application-management-client-features-widget-column.component-CiBGmw6I.mjs').then((c) => c.AXPFeaturesWidgetColumnComponent),
575
+ },
576
+ print: {
577
+ component: () => import('./acorex-platform-module-application-management-client-features-widget-print.component-C6Z9uzRr.mjs').then((c) => c.AXPFeaturesWidgetPrintComponent),
578
+ },
579
+ designer: {
580
+ component: () => import('./acorex-platform-module-application-management-client-features-widget-designer.component-nStj9BAw.mjs').then((c) => c.AXPFeaturesWidgetDesignerComponent),
581
+ },
582
+ },
583
+ };
584
+
585
+ //#endregion
586
+ //#region ---- Features Widgets Provider ----
587
+ const WIDGETS = [AXPModuleFeatureEditorWidget];
588
+ class AXPFeaturesWidgetsProvider {
589
+ getWidgets() {
590
+ return WIDGETS;
591
+ }
592
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFeaturesWidgetsProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
593
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFeaturesWidgetsProvider }); }
594
+ }
595
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFeaturesWidgetsProvider, decorators: [{
596
+ type: Injectable
597
+ }] });
598
+
599
+ class AXMFeaturesModule {
600
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMFeaturesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
601
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXMFeaturesModule, imports: [AXPWidgetCoreModule] }); }
602
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMFeaturesModule, providers: [
603
+ { provide: AXP_WIDGET_DEFINITION_PROVIDER, useClass: AXPFeaturesWidgetsProvider, multi: true },
604
+ ], imports: [AXPWidgetCoreModule] }); }
605
+ }
606
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMFeaturesModule, decorators: [{
607
+ type: NgModule,
608
+ args: [{
609
+ imports: [
610
+ AXPWidgetCoreModule,
611
+ ],
612
+ providers: [
613
+ { provide: AXP_WIDGET_DEFINITION_PROVIDER, useClass: AXPFeaturesWidgetsProvider, multi: true },
614
+ ],
615
+ }]
616
+ }] });
617
+
618
+ //#region ---- Imports ----
619
+ //#endregion
620
+ //#region ---- Manifest Definition ----
621
+ /**
622
+ * Application Management Module Manifest.
623
+ * Defines module metadata, features, and provider references.
624
+ */
625
+ const ApplicationManagementManifest = {
626
+ name: RootConfig.module.name,
627
+ version: '1.0.0',
628
+ title: RootConfig.module.title,
629
+ icon: RootConfig.module.icon,
630
+ i18n: RootConfig.config.i18n,
631
+ required: true,
632
+ // Module dependencies (optional)
633
+ };
634
+ //#endregion
635
+
636
+ class AXMSearchCommandProvider extends AXPSearchCommandProvider {
637
+ constructor() {
638
+ super(...arguments);
639
+ this.commands = [
640
+ {
641
+ id: 'create-application',
642
+ group: 'command',
643
+ title: RootConfig.entities.application.title,
644
+ icon: RootConfig.entities.application.icon,
645
+ description: RootConfig.entities.application.titlePlural,
646
+ command: {
647
+ name: 'Entity:Create',
648
+ options: createEntityCommandOptions(`${RootConfig.module.name}.${RootConfig.entities.application.name}`, {
649
+ name: RootConfig.entities.application.name,
650
+ module: RootConfig.module.name,
651
+ title: RootConfig.entities.application.title,
652
+ }),
653
+ },
654
+ },
655
+ ];
656
+ }
657
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMSearchCommandProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
658
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMSearchCommandProvider }); }
659
+ }
660
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMSearchCommandProvider, decorators: [{
661
+ type: Injectable
662
+ }] });
663
+
664
+ //#region ---- Application context definitions ----
665
+ class AXMApplicationManagementContextDefinitionProvider {
666
+ async items() {
667
+ return [
668
+ {
669
+ name: 'applicationId',
670
+ title: 'Application ID',
671
+ description: 'Identifier of the application edition currently selected in the session. Narrows features, menus, and permissions.',
672
+ ai: {
673
+ promptLabel: 'Application id',
674
+ usageHint: 'Scope product-specific behavior to this application unless the user names another app.',
675
+ valueKind: 'string',
676
+ order: 30,
677
+ },
678
+ },
679
+ {
680
+ name: 'applicationTitle',
681
+ title: 'Application title',
682
+ description: 'Display name of the active application from the session (title or name).',
683
+ ai: {
684
+ promptLabel: 'Application title',
685
+ usageHint: 'Use when referring to the product or app shell the user is working in.',
686
+ valueKind: 'string',
687
+ order: 31,
688
+ },
689
+ },
690
+ ];
691
+ }
692
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMApplicationManagementContextDefinitionProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
693
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMApplicationManagementContextDefinitionProvider }); }
694
+ }
695
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMApplicationManagementContextDefinitionProvider, decorators: [{
696
+ type: Injectable
697
+ }] });
698
+
699
+ class AXMApplicationManagementModule {
700
+ constructor(appTermsCheck) { }
701
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMApplicationManagementModule, deps: [{ token: AXMAppTermsCheckService }], target: i0.ɵɵFactoryTarget.NgModule }); }
702
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXMApplicationManagementModule, imports: [
703
+ // Entity Modules
704
+ // Features Modules
705
+ AXMFeaturesModule, i2$2.AXPComponentSlotModule] }); }
706
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMApplicationManagementModule, providers: [
707
+ {
708
+ provide: ROUTES,
709
+ multi: true,
710
+ useFactory: () => {
711
+ const config = inject(AXP_ENTITY_CONFIG_TOKEN);
712
+ const routes = [
713
+ {
714
+ path: ':app/terms',
715
+ loadComponent: () => {
716
+ return config.viewers.root();
717
+ },
718
+ data: { rootLayout: true },
719
+ children: [
720
+ {
721
+ path: '',
722
+ loadComponent: () => Promise.resolve().then(function () { return listTerms_component; }).then((c) => c.AXMListTermsComponent),
723
+ },
724
+ ],
725
+ },
726
+ ];
727
+ return routes;
728
+ },
729
+ },
730
+ // Module-specific providers (not part of manifest system)
731
+ // Provide edition service using interface token for platform/core to avoid circular dependency
732
+ {
733
+ provide: AXP_SETTING_DEFINITION_PROVIDER,
734
+ useClass: AXPApplicationInfoSettingProvider,
735
+ multi: true,
736
+ },
737
+ AXMAppTermsCheckService,
738
+ provideCommandSetups([
739
+ {
740
+ key: 'new-term',
741
+ command: () => Promise.resolve().then(function () { return newTerm_command; }).then((c) => c.AXMNewTermCommand),
742
+ },
743
+ {
744
+ key: 'show-release-notes',
745
+ command: () => Promise.resolve().then(function () { return showReleaseNotes_command; }).then((c) => c.AXMShowReleaseNotesCommand),
746
+ },
747
+ {
748
+ key: 'assign-features',
749
+ command: () => import('./acorex-platform-module-application-management-client-assign-features.command-BheloAKT.mjs').then((c) => c.AXMAssignFeaturesCommand),
750
+ },
751
+ ]),
752
+ // Module Manifest Provider
753
+ {
754
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
755
+ useValue: ApplicationManagementManifest,
756
+ multi: true,
757
+ },
758
+ // Provider references (now using tokens)
759
+ provideLazyProvider(AXP_STATUS_PROVIDERS, () => import('./acorex-platform-module-application-management-client-application-status.provider-DqPlbWuW.mjs').then(m => m.AXMApplicationStatusProvider)),
760
+ provideLazyProvider(AXP_FEATURE_DEFINITION_PROVIDER, () => import('./acorex-platform-module-application-management-client-feature-definition.provider-Depetn50.mjs').then(m => m.AXPApplicationManagementFeatureDefinitionProvider)),
761
+ provideLazyProvider(AXP_PERMISSION_DEFINITION_PROVIDER, () => import('./acorex-platform-module-application-management-client-permission-definition.provider-Dn5WiubC.mjs').then(m => m.AXMPermissionDefinitionProvider)),
762
+ provideLazyProvider(AXP_MENU_PROVIDER, () => Promise.resolve().then(function () { return menu_provider; }).then(m => m.AXMApplicationManagmentModuleMenuProvider)),
763
+ provideLazyProvider(AXP_ENTITY_DEFINITION_LOADER, () => Promise.resolve().then(function () { return entity_provider; }).then(m => m.AXMEntityProvider)),
764
+ {
765
+ provide: AXP_SEARCH_PROVIDER,
766
+ useClass: AXMSearchCommandProvider,
767
+ multi: true,
768
+ },
769
+ {
770
+ provide: AXP_CONTEXT_DEFINITION_PROVIDER,
771
+ useClass: AXMApplicationManagementContextDefinitionProvider,
772
+ multi: true,
773
+ },
774
+ ], imports: [
775
+ // Entity Modules
776
+ // Features Modules
777
+ AXMFeaturesModule,
778
+ AXPComponentSlotModule.forRoot({
779
+ 'root-footer-start': [
780
+ {
781
+ name: 'application-info',
782
+ component: AXMApplicationInfoSlotComponent,
783
+ priority: 1,
784
+ },
785
+ {
786
+ name: 'copyright',
787
+ component: AXPFooterTextSlotComponent,
788
+ options: async () => {
789
+ const platformConfig = inject(AXP_PLATFORM_CONFIG_TOKEN);
790
+ const settingsService = inject(AXPSettingsService);
791
+ const copyrightText = await settingsService
792
+ .scope(AXPPlatformScope.Tenant)
793
+ .get('organization:copyright-text');
794
+ return { text: copyrightText ?? platformConfig.copyright };
795
+ },
796
+ priority: 2,
797
+ },
798
+ ],
799
+ 'auth-footer-links': [
800
+ {
801
+ name: 'links',
802
+ component: AXPNavBarSlotComponent,
803
+ },
804
+ ],
805
+ })] }); }
806
+ }
807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMApplicationManagementModule, decorators: [{
808
+ type: NgModule,
809
+ args: [{
810
+ imports: [
811
+ // Entity Modules
812
+ // Features Modules
813
+ AXMFeaturesModule,
814
+ AXPComponentSlotModule.forRoot({
815
+ 'root-footer-start': [
816
+ {
817
+ name: 'application-info',
818
+ component: AXMApplicationInfoSlotComponent,
819
+ priority: 1,
820
+ },
821
+ {
822
+ name: 'copyright',
823
+ component: AXPFooterTextSlotComponent,
824
+ options: async () => {
825
+ const platformConfig = inject(AXP_PLATFORM_CONFIG_TOKEN);
826
+ const settingsService = inject(AXPSettingsService);
827
+ const copyrightText = await settingsService
828
+ .scope(AXPPlatformScope.Tenant)
829
+ .get('organization:copyright-text');
830
+ return { text: copyrightText ?? platformConfig.copyright };
831
+ },
832
+ priority: 2,
833
+ },
834
+ ],
835
+ 'auth-footer-links': [
836
+ {
837
+ name: 'links',
838
+ component: AXPNavBarSlotComponent,
839
+ },
840
+ ],
841
+ }),
842
+ ],
843
+ exports: [],
844
+ declarations: [],
845
+ providers: [
846
+ {
847
+ provide: ROUTES,
848
+ multi: true,
849
+ useFactory: () => {
850
+ const config = inject(AXP_ENTITY_CONFIG_TOKEN);
851
+ const routes = [
852
+ {
853
+ path: ':app/terms',
854
+ loadComponent: () => {
855
+ return config.viewers.root();
856
+ },
857
+ data: { rootLayout: true },
858
+ children: [
859
+ {
860
+ path: '',
861
+ loadComponent: () => Promise.resolve().then(function () { return listTerms_component; }).then((c) => c.AXMListTermsComponent),
862
+ },
863
+ ],
864
+ },
865
+ ];
866
+ return routes;
867
+ },
868
+ },
869
+ // Module-specific providers (not part of manifest system)
870
+ // Provide edition service using interface token for platform/core to avoid circular dependency
871
+ {
872
+ provide: AXP_SETTING_DEFINITION_PROVIDER,
873
+ useClass: AXPApplicationInfoSettingProvider,
874
+ multi: true,
875
+ },
876
+ AXMAppTermsCheckService,
877
+ provideCommandSetups([
878
+ {
879
+ key: 'new-term',
880
+ command: () => Promise.resolve().then(function () { return newTerm_command; }).then((c) => c.AXMNewTermCommand),
881
+ },
882
+ {
883
+ key: 'show-release-notes',
884
+ command: () => Promise.resolve().then(function () { return showReleaseNotes_command; }).then((c) => c.AXMShowReleaseNotesCommand),
885
+ },
886
+ {
887
+ key: 'assign-features',
888
+ command: () => import('./acorex-platform-module-application-management-client-assign-features.command-BheloAKT.mjs').then((c) => c.AXMAssignFeaturesCommand),
889
+ },
890
+ ]),
891
+ // Module Manifest Provider
892
+ {
893
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
894
+ useValue: ApplicationManagementManifest,
895
+ multi: true,
896
+ },
897
+ // Provider references (now using tokens)
898
+ provideLazyProvider(AXP_STATUS_PROVIDERS, () => import('./acorex-platform-module-application-management-client-application-status.provider-DqPlbWuW.mjs').then(m => m.AXMApplicationStatusProvider)),
899
+ provideLazyProvider(AXP_FEATURE_DEFINITION_PROVIDER, () => import('./acorex-platform-module-application-management-client-feature-definition.provider-Depetn50.mjs').then(m => m.AXPApplicationManagementFeatureDefinitionProvider)),
900
+ provideLazyProvider(AXP_PERMISSION_DEFINITION_PROVIDER, () => import('./acorex-platform-module-application-management-client-permission-definition.provider-Dn5WiubC.mjs').then(m => m.AXMPermissionDefinitionProvider)),
901
+ provideLazyProvider(AXP_MENU_PROVIDER, () => Promise.resolve().then(function () { return menu_provider; }).then(m => m.AXMApplicationManagmentModuleMenuProvider)),
902
+ provideLazyProvider(AXP_ENTITY_DEFINITION_LOADER, () => Promise.resolve().then(function () { return entity_provider; }).then(m => m.AXMEntityProvider)),
903
+ {
904
+ provide: AXP_SEARCH_PROVIDER,
905
+ useClass: AXMSearchCommandProvider,
906
+ multi: true,
907
+ },
908
+ {
909
+ provide: AXP_CONTEXT_DEFINITION_PROVIDER,
910
+ useClass: AXMApplicationManagementContextDefinitionProvider,
911
+ multi: true,
912
+ },
913
+ ],
914
+ }]
915
+ }], ctorParameters: () => [{ type: AXMAppTermsCheckService }] });
916
+
917
+ class AXMEntityProvider {
918
+ async get(moduleName, entityName) {
919
+ if (moduleName == RootConfig.module.name) {
920
+ switch (entityName) {
921
+ case RootConfig.entities.application.name: {
922
+ const entity = (await import('@acorex-platform/module-application-management-client/contracts')).applicationEntityFactory;
923
+ return entity();
924
+ }
925
+ case RootConfig.entities.edition.name: {
926
+ const entity = (await import('@acorex-platform/module-application-management-client/contracts')).editionEntityFactory;
927
+ return entity();
928
+ }
929
+ case RootConfig.entities.appVersion.name: {
930
+ const entity = (await import('@acorex-platform/module-application-management-client/contracts')).appVersionEntityEntityFactory;
931
+ return entity();
932
+ }
933
+ case RootConfig.entities.appTerm.name: {
934
+ const entity = (await import('@acorex-platform/module-application-management-client/contracts')).appTermEntityEntityFactory;
935
+ return entity();
936
+ }
937
+ }
938
+ }
939
+ return null;
940
+ }
941
+ async list() {
942
+ const m = RootConfig.module.name;
943
+ return Promise.resolve(Object.values(RootConfig.entities).map((e) => ({ name: e.name, module: m })));
944
+ }
945
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMEntityProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
946
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMEntityProvider }); }
947
+ }
948
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMEntityProvider, decorators: [{
949
+ type: Injectable
950
+ }] });
951
+
952
+ var entity_provider = /*#__PURE__*/Object.freeze({
953
+ __proto__: null,
954
+ AXMEntityProvider: AXMEntityProvider
955
+ });
956
+
957
+ class AXMApplicationManagmentModuleMenuProvider {
958
+ constructor() {
959
+ this.entityService = inject(AXPEntityService);
960
+ this.sessionService = inject(AXPSessionService);
961
+ }
962
+ async provide(context) {
963
+ const scope = RootConfig.config.i18n;
964
+ const module = RootConfig.module;
965
+ const appName = this.sessionService.application?.name;
966
+ context.find('Common:Menu:Platform').addItems([
967
+ {
968
+ name: AXPApplicationManagementMenuKeys.Applications,
969
+ text: RootConfig.entities.application.title,
970
+ path: this.entityService.withEntity(module.name, RootConfig.entities.application.name).createPath(),
971
+ icon: RootConfig.entities.application.icon,
972
+ priority: 1,
973
+ policy: {
974
+ features: [module.name],
975
+ permissions: [AXMPermissionsKeys.ApplicationManagement.Applications],
976
+ },
977
+ },
978
+ {
979
+ name: AXPApplicationManagementMenuKeys.ReleaseNotes,
980
+ priority: 2,
981
+ text: `@${scope}:release-notes.menus.release-notes.title`,
982
+ path: this.entityService.withEntity(module.name, RootConfig.entities.appVersion.name).createPath(),
983
+ icon: RootConfig.entities.appVersion.icon,
984
+ policy: {
985
+ features: [module.name],
986
+ permissions: [AXMPermissionsKeys.ApplicationManagement.ReleaseNotes],
987
+ },
988
+ },
989
+ { name: `${AXPApplicationManagementMenuKeys.Root}:divider1`, text: '', type: 'break', priority: 3 },
990
+ ]);
991
+ //#region ---- Help Menu Extensions ----
992
+ // Help menu is created by common module's menu provider
993
+ context.find('Common:Menu:Help').addItems([
994
+ {
995
+ name: AXPApplicationManagementMenuKeys.HelpReleaseNotes,
996
+ text: `@${scope}:help.menus.release-notes.title`,
997
+ icon: 'fa-light fa-memo-pad',
998
+ command: {
999
+ name: 'show-release-notes',
1000
+ },
1001
+ priority: 900003,
1002
+ },
1003
+ {
1004
+ name: AXPApplicationManagementMenuKeys.HelpTerms,
1005
+ text: `@${scope}:module.menus.terms-page.title`,
1006
+ icon: 'fa-light fa-file-contract',
1007
+ path: `${appName}/terms`,
1008
+ priority: 900004,
1009
+ },
1010
+ ]);
1011
+ //#endregion
1012
+ }
1013
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMApplicationManagmentModuleMenuProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1014
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMApplicationManagmentModuleMenuProvider }); }
1015
+ }
1016
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMApplicationManagmentModuleMenuProvider, decorators: [{
1017
+ type: Injectable
1018
+ }] });
1019
+
1020
+ var menu_provider = /*#__PURE__*/Object.freeze({
1021
+ __proto__: null,
1022
+ AXMApplicationManagmentModuleMenuProvider: AXMApplicationManagmentModuleMenuProvider
1023
+ });
1024
+
1025
+ /**
1026
+ * Generated bundle index. Do not edit.
1027
+ */
1028
+
1029
+ export { AXMApplicationManagementModule, AXMApplicationManagmentModuleMenuProvider, AXMEntityProvider, AXMSearchCommandProvider };
1030
+ //# sourceMappingURL=acorex-platform-module-application-management-client.mjs.map