@acorex/platform 21.0.0-next.7 → 21.0.0-next.70
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-auth.mjs +281 -23
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs +163 -0
- package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +1370 -276
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +1185 -514
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +557 -826
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +832 -189
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs +121 -0
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +6309 -1956
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +456 -204
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity-attachments-page.component-D8iQnT-R.mjs +371 -0
- package/fesm2022/acorex-platform-layout-entity-attachments-page.component-D8iQnT-R.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-entity-file-list-popup.component-_yrP5SQe.mjs +100 -0
- package/fesm2022/acorex-platform-layout-entity-file-list-popup.component-_yrP5SQe.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-entity.mjs +22488 -10232
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +564 -170
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +2084 -481
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs → acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs} +10 -10
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs → acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs} +6 -7
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs → acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs} +12 -12
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs +116 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-BcpRkpJp.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-BcpRkpJp.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-DQtK4lxl.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DQtK4lxl.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +10326 -7981
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +8 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +391 -166
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CWLfNqV0.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CWLfNqV0.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs → acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs} +21 -28
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-401.component-cfREo88K.mjs → acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs → acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +2283 -83
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs → acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs} +52 -33
- package/fesm2022/acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +94 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs +86 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +767 -609
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +978 -238
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/package.json +40 -38
- package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +241 -4
- package/{common/index.d.ts → types/acorex-platform-common.d.ts} +822 -89
- package/{core/index.d.ts → types/acorex-platform-core.d.ts} +658 -133
- package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +744 -412
- package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +194 -49
- package/types/acorex-platform-layout-components.d.ts +3253 -0
- package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +96 -18
- package/types/acorex-platform-layout-entity.d.ts +4439 -0
- package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +179 -56
- package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +398 -127
- package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +1120 -501
- package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
- package/types/acorex-platform-runtime.d.ts +571 -0
- package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +233 -6
- package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +24 -2
- package/{workflow/index.d.ts → types/acorex-platform-workflow.d.ts} +620 -617
- package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs +0 -71
- package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs +0 -135
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs +0 -157
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DfJEx_bs.mjs +0 -1542
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DfJEx_bs.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs +0 -101
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-cfREo88K.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs +0 -65
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs +0 -64
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs.map +0 -1
- package/layout/components/index.d.ts +0 -1669
- package/layout/entity/index.d.ts +0 -2287
- package/runtime/index.d.ts +0 -307
- /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Injectable, Injector, makeEnvironmentProviders, NgModule, ErrorHandler, EventEmitter, Input, Output, Directive, Component, ViewEncapsulation, Inject,
|
|
2
|
+
import { InjectionToken, inject, Injectable, Injector, signal, makeEnvironmentProviders, NgModule, ErrorHandler, EventEmitter, Input, Output, Directive, ChangeDetectionStrategy, Component, ViewEncapsulation, Inject, runInInjectionContext, model, linkedSignal, afterNextRender } from '@angular/core';
|
|
3
3
|
import { kebabCase, merge, sortBy, cloneDeep, get, omit } from 'lodash-es';
|
|
4
4
|
import { Router, ROUTES, RouterModule } from '@angular/router';
|
|
5
5
|
import { AXPSessionService, AXPSessionStatus } from '@acorex/platform/auth';
|
|
6
6
|
import { Subject, distinctUntilChanged, merge as merge$1 } from 'rxjs';
|
|
7
|
-
import { AXPPlatformScope, AXPBroadcastEventService, objectKeyValueTransforms, AXPSystemActionType, AXPModuleManifestModule, AXPAppStartUpProvider, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXPModuleManifestRegistry } from '@acorex/platform/core';
|
|
8
|
-
import { AXTranslationService } from '@acorex/core/translation';
|
|
7
|
+
import { unwrapValueProperty, coerceUnknownToDate, coerceUnknownToFiniteNumber, coerceUnknownToBoolean, coerceUnknownToTrimmedString, AXPPlatformScope, AXPBroadcastEventService, objectKeyValueTransforms, AXPSystemActionType, searchInMultiLanguageString, AXPModuleManifestModule, AXPAppStartUpProvider, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXPHookService, AXPDataGenerator, AXPModuleManifestRegistry } from '@acorex/platform/core';
|
|
9
8
|
import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
|
|
10
9
|
import { AXPopupModule, AXPopupService } from '@acorex/components/popup';
|
|
11
10
|
import { AXToastService, AXToastModule } from '@acorex/components/toast';
|
|
12
11
|
import { AXDateTimeModule } from '@acorex/core/date-time';
|
|
13
12
|
import * as i1 from '@acorex/platform/workflow';
|
|
14
13
|
import { AXPWorkflowService, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowError, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
14
|
+
import { AXDataSource } from '@acorex/cdk/common';
|
|
15
15
|
import { AXPCommandExecutor, AXPCommandService } from '@acorex/platform/runtime';
|
|
16
16
|
import { signalStore, withState, withMethods, patchState, withHooks } from '@ngrx/signals';
|
|
17
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
17
18
|
import { AXFormatService } from '@acorex/core/format';
|
|
18
19
|
import { AXDialogService } from '@acorex/components/dialog';
|
|
20
|
+
import { AXFileService } from '@acorex/core/file';
|
|
19
21
|
import * as i5 from '@acorex/components/button';
|
|
20
22
|
import { AXButtonModule } from '@acorex/components/button';
|
|
21
23
|
import { AXCheckBoxModule } from '@acorex/components/check-box';
|
|
@@ -32,6 +34,84 @@ import { AXTextBoxModule } from '@acorex/components/text-box';
|
|
|
32
34
|
import * as i1$1 from '@angular/forms';
|
|
33
35
|
import { FormsModule } from '@angular/forms';
|
|
34
36
|
|
|
37
|
+
//#region ---- Output kind & segment ----
|
|
38
|
+
/** Default structured retry count when `structuredRetries` is omitted on structured kinds. */
|
|
39
|
+
const AXP_AGENT_OUTPUT_CONTRACT_DEFAULT_STRUCTURED_RETRIES = 2;
|
|
40
|
+
//#endregion
|
|
41
|
+
|
|
42
|
+
const AXP_OUTPUT_CONTRACT_TRANSCRIPT_SEGMENT_PROVIDER = new InjectionToken('AXP_OUTPUT_CONTRACT_TRANSCRIPT_SEGMENT_PROVIDER', {
|
|
43
|
+
factory: () => [],
|
|
44
|
+
});
|
|
45
|
+
//#endregion
|
|
46
|
+
|
|
47
|
+
//#region ---- Imports ----
|
|
48
|
+
//#endregion
|
|
49
|
+
class AXPOutputContractTranscriptSegmentService {
|
|
50
|
+
constructor() {
|
|
51
|
+
//#region ---- Dependencies & cache ----
|
|
52
|
+
this.segmentProviders = inject(AXP_OUTPUT_CONTRACT_TRANSCRIPT_SEGMENT_PROVIDER, { optional: true }) ?? [];
|
|
53
|
+
this.definitionsByName = new Map();
|
|
54
|
+
this.loadPromise = null;
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region ---- Public API ----
|
|
58
|
+
/** All registered transcript segment definitions (deduped by `name`). */
|
|
59
|
+
async getAll() {
|
|
60
|
+
await this.ensureLoaded();
|
|
61
|
+
return [...this.definitionsByName.values()];
|
|
62
|
+
}
|
|
63
|
+
/** Lookup by segment id (`text`, `node`, `followUp`). */
|
|
64
|
+
async get(name) {
|
|
65
|
+
await this.ensureLoaded();
|
|
66
|
+
return this.definitionsByName.get(name);
|
|
67
|
+
}
|
|
68
|
+
/** Default `outputContract` for a segment, or `undefined` when not registered. */
|
|
69
|
+
async getContractPreset(name) {
|
|
70
|
+
const definition = await this.get(name);
|
|
71
|
+
return definition?.contract;
|
|
72
|
+
}
|
|
73
|
+
/** Clears the in-memory registry (e.g. after hot reload in dev). */
|
|
74
|
+
clearCache() {
|
|
75
|
+
this.definitionsByName.clear();
|
|
76
|
+
this.loadPromise = null;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region ---- Load ----
|
|
80
|
+
async ensureLoaded() {
|
|
81
|
+
if (this.loadPromise) {
|
|
82
|
+
return this.loadPromise;
|
|
83
|
+
}
|
|
84
|
+
this.loadPromise = this.loadDefinitions();
|
|
85
|
+
return this.loadPromise;
|
|
86
|
+
}
|
|
87
|
+
async loadDefinitions() {
|
|
88
|
+
const resolvedProviders = await Promise.all(this.segmentProviders);
|
|
89
|
+
for (const provider of resolvedProviders) {
|
|
90
|
+
if (!provider) {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
const definitions = await Promise.resolve(provider.provide());
|
|
94
|
+
for (const definition of definitions) {
|
|
95
|
+
if (!definition?.name) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
if (this.definitionsByName.has(definition.name)) {
|
|
99
|
+
console.warn(`[AXPOutputContractTranscriptSegmentService] Segment "${definition.name}" already registered; overwriting.`);
|
|
100
|
+
}
|
|
101
|
+
this.definitionsByName.set(definition.name, definition);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPOutputContractTranscriptSegmentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
106
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPOutputContractTranscriptSegmentService, providedIn: 'root' }); }
|
|
107
|
+
}
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPOutputContractTranscriptSegmentService, decorators: [{
|
|
109
|
+
type: Injectable,
|
|
110
|
+
args: [{
|
|
111
|
+
providedIn: 'root',
|
|
112
|
+
}]
|
|
113
|
+
}] });
|
|
114
|
+
|
|
35
115
|
const AXP_APP_VERSION_PROVIDER = new InjectionToken('AXP_APP_VERSION_PROVIDER', {
|
|
36
116
|
providedIn: 'root',
|
|
37
117
|
factory: () => {
|
|
@@ -54,10 +134,10 @@ class AXPAppVersionService {
|
|
|
54
134
|
async getAppVersion() {
|
|
55
135
|
return this.provider.provider();
|
|
56
136
|
}
|
|
57
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
58
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
137
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAppVersionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
138
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAppVersionService, providedIn: 'root' }); }
|
|
59
139
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAppVersionService, decorators: [{
|
|
61
141
|
type: Injectable,
|
|
62
142
|
args: [{
|
|
63
143
|
providedIn: 'root',
|
|
@@ -88,6 +168,23 @@ var AXPEntityQueryType;
|
|
|
88
168
|
AXPEntityQueryType["Single"] = "single";
|
|
89
169
|
AXPEntityQueryType["List"] = "list";
|
|
90
170
|
})(AXPEntityQueryType || (AXPEntityQueryType = {}));
|
|
171
|
+
/** Whether the card field is shown as a header badge (not in the card body). */
|
|
172
|
+
function isCardFieldBadgeDisplay(display) {
|
|
173
|
+
if (display === 'badge') {
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
return typeof display === 'object' && display !== null && display.type === 'badge';
|
|
177
|
+
}
|
|
178
|
+
/** Resolves static badge color config from {@link AXPCardField.display} and legacy {@link AXPCardField.badgeColor}. */
|
|
179
|
+
function resolveCardFieldBadgeColor(field) {
|
|
180
|
+
if (typeof field.display === 'object' && field.display.type === 'badge') {
|
|
181
|
+
return field.display.options?.color ?? field.badgeColor;
|
|
182
|
+
}
|
|
183
|
+
if (field.display === 'badge') {
|
|
184
|
+
return field.badgeColor;
|
|
185
|
+
}
|
|
186
|
+
return undefined;
|
|
187
|
+
}
|
|
91
188
|
function getEntityInfo(entity) {
|
|
92
189
|
return {
|
|
93
190
|
source: `${entity.module}.${entity.name}`,
|
|
@@ -126,6 +223,31 @@ function createAllQueryView(params = {
|
|
|
126
223
|
sorts: params.sorts ?? [],
|
|
127
224
|
});
|
|
128
225
|
}
|
|
226
|
+
/** Resolves master list layouts that are currently enabled. */
|
|
227
|
+
function resolveEnabledMasterListLayouts(layouts) {
|
|
228
|
+
if (!layouts) {
|
|
229
|
+
return ['table'];
|
|
230
|
+
}
|
|
231
|
+
const enabled = [];
|
|
232
|
+
if (layouts.table?.enabled !== false) {
|
|
233
|
+
enabled.push('table');
|
|
234
|
+
}
|
|
235
|
+
if (layouts.card && layouts.card.enabled !== false) {
|
|
236
|
+
enabled.push('card');
|
|
237
|
+
}
|
|
238
|
+
return enabled.length > 0 ? enabled : ['table'];
|
|
239
|
+
}
|
|
240
|
+
/** First enabled layout; used as the default when no user preference is stored. */
|
|
241
|
+
function resolveDefaultMasterListLayout(layouts) {
|
|
242
|
+
return resolveEnabledMasterListLayouts(layouts)[0];
|
|
243
|
+
}
|
|
244
|
+
// new version
|
|
245
|
+
var AXPEntityType;
|
|
246
|
+
(function (AXPEntityType) {
|
|
247
|
+
AXPEntityType[AXPEntityType["Entity"] = 0] = "Entity";
|
|
248
|
+
AXPEntityType[AXPEntityType["AggregateRoot"] = 1] = "AggregateRoot";
|
|
249
|
+
AXPEntityType[AXPEntityType["ValueObject"] = 2] = "ValueObject";
|
|
250
|
+
})(AXPEntityType || (AXPEntityType = {}));
|
|
129
251
|
|
|
130
252
|
const EQ_OPER = { name: 'equal', title: '@general:terms.operators.equal', hasValue: true };
|
|
131
253
|
const NOT_EQ_OPER = { name: 'notEqual', title: '@general:terms.operators.not-equal', hasValue: true };
|
|
@@ -171,6 +293,7 @@ const BOOLEAN_OPERATORS = [EQ_OPER];
|
|
|
171
293
|
const DATE_OPERATORS = [
|
|
172
294
|
EQ_OPER,
|
|
173
295
|
NOT_EQ_OPER,
|
|
296
|
+
BETWEEN_OPER,
|
|
174
297
|
GT_OPER,
|
|
175
298
|
GTE_OPER,
|
|
176
299
|
LT_OPER,
|
|
@@ -195,22 +318,183 @@ const ALL_DEFAULT_OPERATORS = [
|
|
|
195
318
|
BETWEEN_OPER,
|
|
196
319
|
];
|
|
197
320
|
|
|
321
|
+
const DEFAULT_DATE_FILTER_PRESETS = [
|
|
322
|
+
{ id: 'today', title: '@general:terms.date-presets.today', kind: 'computed' },
|
|
323
|
+
{ id: 'this-week', title: '@general:terms.date-presets.this-week', kind: 'computed' },
|
|
324
|
+
{ id: 'this-month', title: '@general:terms.date-presets.this-month', kind: 'computed' },
|
|
325
|
+
{ id: 'yesterday', title: '@general:terms.date-presets.yesterday', kind: 'computed' },
|
|
326
|
+
{ id: 'last-week', title: '@general:terms.date-presets.last-week', kind: 'computed' },
|
|
327
|
+
{ id: 'last-month', title: '@general:terms.date-presets.last-month', kind: 'computed' },
|
|
328
|
+
{ id: 'tomorrow', title: '@general:terms.date-presets.tomorrow', kind: 'computed' },
|
|
329
|
+
{ id: 'next-week', title: '@general:terms.date-presets.next-week', kind: 'computed' },
|
|
330
|
+
{ id: 'next-month', title: '@general:terms.date-presets.next-month', kind: 'computed' },
|
|
331
|
+
{ id: 'between', title: BETWEEN_OPER.title, kind: 'manual', operationType: 'between' },
|
|
332
|
+
{ id: 'greater-than', title: '@general:terms.operators.greater-than', kind: 'manual', operationType: 'greaterThan' },
|
|
333
|
+
{ id: 'less-than', title: '@general:terms.operators.less-than', kind: 'manual', operationType: 'lessThan' },
|
|
334
|
+
];
|
|
335
|
+
function resolveDateFilterPresets(customPresets, presetIds) {
|
|
336
|
+
let presets = customPresets?.length ? customPresets : DEFAULT_DATE_FILTER_PRESETS;
|
|
337
|
+
if (presetIds?.length) {
|
|
338
|
+
presets = presets.filter((p) => presetIds.includes(p.id));
|
|
339
|
+
}
|
|
340
|
+
return presets;
|
|
341
|
+
}
|
|
342
|
+
function applyDateFilterPreset(presetId, calendarService) {
|
|
343
|
+
const currentDate = calendarService.now().date;
|
|
344
|
+
const calendar = calendarService.calendar;
|
|
345
|
+
switch (presetId) {
|
|
346
|
+
case 'today':
|
|
347
|
+
return {
|
|
348
|
+
operation: { type: 'between' },
|
|
349
|
+
value: {
|
|
350
|
+
from: calendar.startOf(currentDate, 'day').date.toISOString(),
|
|
351
|
+
to: calendar.endOf(currentDate, 'day').date.toISOString(),
|
|
352
|
+
},
|
|
353
|
+
};
|
|
354
|
+
case 'this-week':
|
|
355
|
+
return {
|
|
356
|
+
operation: { type: 'between' },
|
|
357
|
+
value: {
|
|
358
|
+
from: calendar.startOf(currentDate, 'week').date.toISOString(),
|
|
359
|
+
to: calendar.endOf(currentDate, 'week').date.toISOString(),
|
|
360
|
+
},
|
|
361
|
+
};
|
|
362
|
+
case 'this-month':
|
|
363
|
+
return {
|
|
364
|
+
operation: { type: 'between' },
|
|
365
|
+
value: {
|
|
366
|
+
from: calendar.startOf(currentDate, 'month').date.toISOString(),
|
|
367
|
+
to: calendar.endOf(currentDate, 'month').date.toISOString(),
|
|
368
|
+
},
|
|
369
|
+
};
|
|
370
|
+
case 'yesterday': {
|
|
371
|
+
const yesterday = calendar.add(currentDate, 'day', -1);
|
|
372
|
+
return {
|
|
373
|
+
operation: { type: 'between' },
|
|
374
|
+
value: {
|
|
375
|
+
from: yesterday.startOf('day').date.toISOString(),
|
|
376
|
+
to: yesterday.endOf('day').date.toISOString(),
|
|
377
|
+
},
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
case 'last-week': {
|
|
381
|
+
const lastWeek = calendar.add(currentDate, 'week', -1);
|
|
382
|
+
return {
|
|
383
|
+
operation: { type: 'between' },
|
|
384
|
+
value: {
|
|
385
|
+
from: lastWeek.startOf('week').date.toISOString(),
|
|
386
|
+
to: lastWeek.endOf('week').date.toISOString(),
|
|
387
|
+
},
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
case 'last-month': {
|
|
391
|
+
const lastMonth = calendar.add(currentDate, 'month', -1);
|
|
392
|
+
return {
|
|
393
|
+
operation: { type: 'between' },
|
|
394
|
+
value: {
|
|
395
|
+
from: lastMonth.startOf('month').date.toISOString(),
|
|
396
|
+
to: lastMonth.endOf('month').date.toISOString(),
|
|
397
|
+
},
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
case 'tomorrow': {
|
|
401
|
+
const tomorrow = calendar.add(currentDate, 'day', 1);
|
|
402
|
+
return {
|
|
403
|
+
operation: { type: 'between' },
|
|
404
|
+
value: {
|
|
405
|
+
from: tomorrow.startOf('day').date.toISOString(),
|
|
406
|
+
to: tomorrow.endOf('day').date.toISOString(),
|
|
407
|
+
},
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
case 'next-week': {
|
|
411
|
+
const nextWeek = calendar.add(currentDate, 'week', 1);
|
|
412
|
+
return {
|
|
413
|
+
operation: { type: 'between' },
|
|
414
|
+
value: {
|
|
415
|
+
from: nextWeek.startOf('week').date.toISOString(),
|
|
416
|
+
to: nextWeek.endOf('week').date.toISOString(),
|
|
417
|
+
},
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
case 'next-month': {
|
|
421
|
+
const nextMonth = calendar.add(currentDate, 'month', 1);
|
|
422
|
+
return {
|
|
423
|
+
operation: { type: 'between' },
|
|
424
|
+
value: {
|
|
425
|
+
from: nextMonth.startOf('month').date.toISOString(),
|
|
426
|
+
to: nextMonth.endOf('month').date.toISOString(),
|
|
427
|
+
},
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
case 'between':
|
|
431
|
+
return undefined;
|
|
432
|
+
case 'greater-than':
|
|
433
|
+
return { operation: { type: 'greaterThan' } };
|
|
434
|
+
case 'less-than':
|
|
435
|
+
return { operation: { type: 'lessThan' } };
|
|
436
|
+
default:
|
|
437
|
+
return {
|
|
438
|
+
operation: { type: 'between' },
|
|
439
|
+
value: { from: '', to: '' },
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
function findManualPresetIdByOperation(operationType, presets) {
|
|
444
|
+
if (!operationType) {
|
|
445
|
+
return undefined;
|
|
446
|
+
}
|
|
447
|
+
return presets.find((p) => p.kind === 'manual' && p.operationType === operationType)?.id;
|
|
448
|
+
}
|
|
449
|
+
|
|
198
450
|
const AXP_HOME_PAGES = new InjectionToken('AXP_HOME_PAGES');
|
|
199
451
|
const AXP_HOME_PAGE_DEFAULT_KEY = new InjectionToken('AXP_HOME_PAGE_DEFAULT_KEY', {
|
|
200
452
|
factory: () => 'home'
|
|
201
453
|
});
|
|
202
454
|
|
|
455
|
+
/**
|
|
456
|
+
* Regional and locale-related setting keys used by platform widgets and components.
|
|
457
|
+
* Most values use the `LocaleManagement:Setting:Regional.*` prefix; definitions live in the locale-management module where applicable.
|
|
458
|
+
*/
|
|
459
|
+
var AXPRegionalSetting;
|
|
460
|
+
(function (AXPRegionalSetting) {
|
|
461
|
+
AXPRegionalSetting["LocaleProfile"] = "LocaleManagement:Setting:Regional.LocaleProfile";
|
|
462
|
+
AXPRegionalSetting["TimeZone"] = "LocaleManagement:Setting:Regional.TimeZone";
|
|
463
|
+
AXPRegionalSetting["Language"] = "LocaleManagement:Setting:Regional.Language";
|
|
464
|
+
AXPRegionalSetting["Country"] = "LocaleManagement:Setting:Regional.Country";
|
|
465
|
+
AXPRegionalSetting["Calendar"] = "LocaleManagement:Setting:Regional.Calendar";
|
|
466
|
+
AXPRegionalSetting["FirstDayOfWeek"] = "LocaleManagement:Setting:Regional.FirstDayOfWeek";
|
|
467
|
+
AXPRegionalSetting["WeekendDays"] = "LocaleManagement:Setting:Regional.WeekendDays";
|
|
468
|
+
AXPRegionalSetting["ShortDate"] = "LocaleManagement:Setting:Regional.ShortDate";
|
|
469
|
+
AXPRegionalSetting["MediumDate"] = "LocaleManagement:Setting:Regional.MediumDate";
|
|
470
|
+
AXPRegionalSetting["LongDate"] = "LocaleManagement:Setting:Regional.LongDate";
|
|
471
|
+
AXPRegionalSetting["ShortTime"] = "LocaleManagement:Setting:Regional.ShortTime";
|
|
472
|
+
AXPRegionalSetting["MediumTime"] = "LocaleManagement:Setting:Regional.MediumTime";
|
|
473
|
+
AXPRegionalSetting["LongTime"] = "LocaleManagement:Setting:Regional.LongTime";
|
|
474
|
+
AXPRegionalSetting["MeasurementUnits"] = "LocaleManagement:Setting:Regional.MeasurementUnits";
|
|
475
|
+
AXPRegionalSetting["TemperatureUnits"] = "LocaleManagement:Setting:Regional.TemperatureUnits";
|
|
476
|
+
AXPRegionalSetting["DistanceUnits"] = "LocaleManagement:Setting:Regional.DistanceUnits";
|
|
477
|
+
AXPRegionalSetting["WeightUnits"] = "LocaleManagement:Setting:Regional.WeightUnits";
|
|
478
|
+
AXPRegionalSetting["VolumeUnits"] = "LocaleManagement:Setting:Regional.VolumeUnits";
|
|
479
|
+
AXPRegionalSetting["SpeedUnits"] = "LocaleManagement:Setting:Regional.SpeedUnits";
|
|
480
|
+
AXPRegionalSetting["AreaUnits"] = "LocaleManagement:Setting:Regional.AreaUnits";
|
|
481
|
+
/** Default multi-language behavior for standard text field names; defined in locale-management `AXMRegionalSettingProvider`. */
|
|
482
|
+
AXPRegionalSetting["MultiLanguageSupport"] = "LocaleManagement:Setting:Regional.MultiLanguageSupport";
|
|
483
|
+
})(AXPRegionalSetting || (AXPRegionalSetting = {}));
|
|
484
|
+
|
|
203
485
|
class AXPSettingDefinitionProviderContext {
|
|
204
486
|
constructor() {
|
|
205
487
|
this.rootGroups = [];
|
|
206
488
|
this.groupMap = new Map();
|
|
207
489
|
}
|
|
208
|
-
addGroup(name, title, description, icon) {
|
|
490
|
+
addGroup(name, title, description, icon, pageTitle, priority) {
|
|
209
491
|
const newGroup = {
|
|
210
492
|
name,
|
|
211
493
|
title,
|
|
494
|
+
pageTitle,
|
|
212
495
|
description,
|
|
213
496
|
icon,
|
|
497
|
+
priority,
|
|
214
498
|
groups: [],
|
|
215
499
|
sections: [],
|
|
216
500
|
};
|
|
@@ -259,12 +543,14 @@ class AXPSettingDefinitionGroupBuilder {
|
|
|
259
543
|
}
|
|
260
544
|
return new AXPSettingDefinitionSectionBuilder(this, foundSection);
|
|
261
545
|
}
|
|
262
|
-
addGroup(name, title, description, icon) {
|
|
546
|
+
addGroup(name, title, description, icon, pageTitle, priority) {
|
|
263
547
|
const newGroup = {
|
|
264
548
|
name,
|
|
265
549
|
title,
|
|
550
|
+
pageTitle,
|
|
266
551
|
description: description,
|
|
267
552
|
icon,
|
|
553
|
+
priority,
|
|
268
554
|
groups: [],
|
|
269
555
|
sections: [],
|
|
270
556
|
};
|
|
@@ -289,11 +575,12 @@ class AXPSettingDefinitionSectionBuilder {
|
|
|
289
575
|
name: setting.key,
|
|
290
576
|
title: setting.title,
|
|
291
577
|
description: setting.description,
|
|
578
|
+
searchTagKeys: setting.searchTagKeys,
|
|
292
579
|
isRequired: setting.isRequired ?? false,
|
|
293
580
|
isInherited: setting.isInherited ?? false,
|
|
294
581
|
isEncrypted: setting.isEncrypted ?? false,
|
|
295
582
|
defaultValue: setting.defaultValue,
|
|
296
|
-
scope: setting.scope ?? '
|
|
583
|
+
scope: setting.scope ?? 'P',
|
|
297
584
|
layout: setting.widget.layout,
|
|
298
585
|
widget: {
|
|
299
586
|
type: setting.widget.type,
|
|
@@ -356,13 +643,14 @@ class AXPSettingDefinitionProviderService {
|
|
|
356
643
|
if (!this.cache) {
|
|
357
644
|
return [];
|
|
358
645
|
}
|
|
359
|
-
const scopeOrder = ['
|
|
646
|
+
const scopeOrder = ['P', 'T', 'U']; // Scopes hierarchy in ascending order
|
|
360
647
|
const filterByScope = (groups, currentScope) => {
|
|
361
648
|
const currentScopeIndex = scopeOrder.indexOf(currentScope);
|
|
362
649
|
return groups
|
|
363
650
|
.map((group) => ({
|
|
364
651
|
...group,
|
|
365
|
-
sections: group.sections
|
|
652
|
+
sections: group.sections
|
|
653
|
+
.map((section) => ({
|
|
366
654
|
...section,
|
|
367
655
|
settings: section.settings.filter((setting) => {
|
|
368
656
|
const settingScopeIndex = scopeOrder.indexOf(setting.scope);
|
|
@@ -379,12 +667,13 @@ class AXPSettingDefinitionProviderService {
|
|
|
379
667
|
// 3. Exclude settings with a lower or irrelevant scope.
|
|
380
668
|
return false;
|
|
381
669
|
}),
|
|
382
|
-
}))
|
|
670
|
+
}))
|
|
671
|
+
.filter((section) => section.settings.length > 0), // Keep only sections with settings
|
|
383
672
|
groups: filterByScope(group.groups, currentScope), // Recursively filter nested groups
|
|
384
673
|
}))
|
|
385
674
|
.filter((group) => group.sections.length > 0 || group.groups.length > 0); // Keep groups with valid sections or nested groups
|
|
386
675
|
};
|
|
387
|
-
return sortBy(filterByScope(this.cache, scope), 'title');
|
|
676
|
+
return sortBy(filterByScope(this.cache, scope), [(group) => group.priority ?? 1000, 'title']);
|
|
388
677
|
}
|
|
389
678
|
async defaultValues() {
|
|
390
679
|
const defaults = {};
|
|
@@ -406,12 +695,33 @@ class AXPSettingDefinitionProviderService {
|
|
|
406
695
|
collectDefaults(this.cache);
|
|
407
696
|
return defaults;
|
|
408
697
|
}
|
|
698
|
+
async settingScopeByKey() {
|
|
699
|
+
const scopes = {};
|
|
700
|
+
const collect = (groups) => {
|
|
701
|
+
groups.forEach((group) => {
|
|
702
|
+
group.sections.forEach((section) => {
|
|
703
|
+
section.settings.forEach((setting) => {
|
|
704
|
+
scopes[setting.name] = setting.scope;
|
|
705
|
+
});
|
|
706
|
+
});
|
|
707
|
+
collect(group.groups);
|
|
708
|
+
});
|
|
709
|
+
};
|
|
710
|
+
if (!this.cache) {
|
|
711
|
+
await this.load();
|
|
712
|
+
}
|
|
713
|
+
collect(this.cache);
|
|
714
|
+
return scopes;
|
|
715
|
+
}
|
|
409
716
|
findGroup(scope, groupName) {
|
|
410
717
|
return this.searchRecursive(this.getList(scope), groupName, []); // Initialize with an empty breadcrumb
|
|
411
718
|
}
|
|
412
719
|
searchRecursive(groups, groupName, breadcrumb) {
|
|
413
720
|
for (const group of groups) {
|
|
414
|
-
const currentBreadcrumb = [
|
|
721
|
+
const currentBreadcrumb = [
|
|
722
|
+
...breadcrumb,
|
|
723
|
+
{ name: group.name, title: group.title, description: group.description },
|
|
724
|
+
];
|
|
415
725
|
// If the group name matches, return its details
|
|
416
726
|
if (group.name === groupName) {
|
|
417
727
|
return {
|
|
@@ -430,13 +740,13 @@ class AXPSettingDefinitionProviderService {
|
|
|
430
740
|
return {
|
|
431
741
|
breadcrumb: [],
|
|
432
742
|
groups: [],
|
|
433
|
-
sections: []
|
|
743
|
+
sections: [],
|
|
434
744
|
};
|
|
435
745
|
}
|
|
436
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
437
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
746
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
747
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefinitionProviderService, providedIn: 'root' }); }
|
|
438
748
|
}
|
|
439
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefinitionProviderService, decorators: [{
|
|
440
750
|
type: Injectable,
|
|
441
751
|
args: [{ providedIn: 'root' }]
|
|
442
752
|
}] });
|
|
@@ -451,38 +761,113 @@ class AXPSettingDefaultValuesAggregatorService {
|
|
|
451
761
|
this.definitionService = inject(AXPSettingDefinitionProviderService);
|
|
452
762
|
this.providers = inject(AXP_SETTING_DEFAULT_VALUES_PROVIDERS, { optional: true }) ?? [];
|
|
453
763
|
}
|
|
454
|
-
async
|
|
764
|
+
async getMerged() {
|
|
455
765
|
const baseDefaults = await this.definitionService.defaultValues();
|
|
456
766
|
const ordered = [...this.providers].sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
|
|
457
767
|
const merged = { ...baseDefaults };
|
|
768
|
+
const seedScopeByKey = {};
|
|
458
769
|
for (const provider of ordered) {
|
|
459
770
|
try {
|
|
460
771
|
const overrideMap = await provider.provide();
|
|
461
772
|
Object.assign(merged, overrideMap);
|
|
773
|
+
if (provider.scope) {
|
|
774
|
+
for (const key of Object.keys(overrideMap)) {
|
|
775
|
+
seedScopeByKey[key] = provider.scope;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
462
778
|
}
|
|
463
779
|
catch (err) {
|
|
464
780
|
console.error('AXPSettingDefaultValuesProvider failed:', err);
|
|
465
781
|
}
|
|
466
782
|
}
|
|
467
|
-
return merged;
|
|
783
|
+
return { defaults: merged, seedScopeByKey };
|
|
468
784
|
}
|
|
469
|
-
|
|
470
|
-
|
|
785
|
+
async getDefaults() {
|
|
786
|
+
const { defaults } = await this.getMerged();
|
|
787
|
+
return defaults;
|
|
788
|
+
}
|
|
789
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefaultValuesAggregatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
790
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefaultValuesAggregatorService, providedIn: 'root' }); }
|
|
471
791
|
}
|
|
472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
792
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefaultValuesAggregatorService, decorators: [{
|
|
473
793
|
type: Injectable,
|
|
474
794
|
args: [{ providedIn: 'root' }]
|
|
475
795
|
}] });
|
|
476
796
|
|
|
797
|
+
//#region ---- Imports ----
|
|
798
|
+
//#endregion
|
|
799
|
+
//#region ---- Kind inference ----
|
|
800
|
+
/**
|
|
801
|
+
* If the payload uses the common `{ value: T }` shape from setting widgets, returns the inner value; otherwise returns `raw`.
|
|
802
|
+
*/
|
|
803
|
+
function peelSettingValueKey(raw) {
|
|
804
|
+
return unwrapValueProperty(raw);
|
|
805
|
+
}
|
|
806
|
+
function coercionKindFromScalarSample(v) {
|
|
807
|
+
if (v === null || v === undefined) {
|
|
808
|
+
return null;
|
|
809
|
+
}
|
|
810
|
+
if (typeof v === 'boolean') {
|
|
811
|
+
return 'boolean';
|
|
812
|
+
}
|
|
813
|
+
if (typeof v === 'number' && Number.isFinite(v)) {
|
|
814
|
+
return 'number';
|
|
815
|
+
}
|
|
816
|
+
if (v instanceof Date) {
|
|
817
|
+
return 'date';
|
|
818
|
+
}
|
|
819
|
+
if (typeof v === 'string') {
|
|
820
|
+
if (v === 'true' || v === 'false') {
|
|
821
|
+
return 'boolean';
|
|
822
|
+
}
|
|
823
|
+
return 'string';
|
|
824
|
+
}
|
|
825
|
+
return null;
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* Picks a primitive coercion kind from the setting definition default and/or the effective stored value.
|
|
829
|
+
* Type argument `T` on the settings service `get` method is compile-time only; runtime behavior follows this inference.
|
|
830
|
+
*/
|
|
831
|
+
function inferSettingCoercionKind(defaultSample, effective) {
|
|
832
|
+
const fromDefault = coercionKindFromScalarSample(defaultSample);
|
|
833
|
+
if (fromDefault) {
|
|
834
|
+
return fromDefault;
|
|
835
|
+
}
|
|
836
|
+
return coercionKindFromScalarSample(unwrapValueProperty(effective));
|
|
837
|
+
}
|
|
838
|
+
//#endregion
|
|
839
|
+
//#region ---- Value coercion ----
|
|
840
|
+
function coerceAXPSettingRawValueByKind(raw, kind) {
|
|
841
|
+
switch (kind) {
|
|
842
|
+
case 'string':
|
|
843
|
+
return coerceUnknownToTrimmedString(raw);
|
|
844
|
+
case 'boolean':
|
|
845
|
+
return coerceUnknownToBoolean(raw);
|
|
846
|
+
case 'number':
|
|
847
|
+
return coerceUnknownToFiniteNumber(raw);
|
|
848
|
+
case 'date':
|
|
849
|
+
return coerceUnknownToDate(raw);
|
|
850
|
+
default: {
|
|
851
|
+
const _exhaustive = kind;
|
|
852
|
+
return _exhaustive;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
function coerceAXPSettingRawValue(raw, kind) {
|
|
857
|
+
return coerceAXPSettingRawValueByKind(raw, kind);
|
|
858
|
+
}
|
|
859
|
+
//#endregion
|
|
860
|
+
|
|
477
861
|
const AXP_SETTING_VALUE_PROVIDER = new InjectionToken('AXP_SETTING_VALUE_PROVIDER', {
|
|
478
862
|
providedIn: 'root',
|
|
479
863
|
factory: () => {
|
|
480
864
|
const injector = inject(Injector);
|
|
481
865
|
return [
|
|
866
|
+
new AXPSettingValueProviderDefault(AXPPlatformScope.Platform, injector),
|
|
482
867
|
new AXPSettingValueProviderDefault(AXPPlatformScope.Tenant, injector),
|
|
483
|
-
new AXPSettingValueProviderDefault(AXPPlatformScope.User, injector)
|
|
868
|
+
new AXPSettingValueProviderDefault(AXPPlatformScope.User, injector),
|
|
484
869
|
];
|
|
485
|
-
}
|
|
870
|
+
},
|
|
486
871
|
});
|
|
487
872
|
class AXPSettingValueProviderDefault {
|
|
488
873
|
constructor(_scope, injector) {
|
|
@@ -491,16 +876,22 @@ class AXPSettingValueProviderDefault {
|
|
|
491
876
|
this.cache = new Map();
|
|
492
877
|
this.localStorageKey = null;
|
|
493
878
|
this.sessionService = this.injector.get(AXPSessionService);
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
879
|
+
// Platform scope doesn't depend on session, initialize immediately
|
|
880
|
+
if (this.scope === AXPPlatformScope.Platform) {
|
|
881
|
+
this.localStorageKey = `AXP_SETTINGS_SCOPE(P)`;
|
|
882
|
+
}
|
|
883
|
+
else {
|
|
884
|
+
this.sessionService.status$.subscribe((status) => {
|
|
885
|
+
if (status === AXPSessionStatus.Authorized || status === AXPSessionStatus.Authenticated) {
|
|
886
|
+
if (this.scope === AXPPlatformScope.User) {
|
|
887
|
+
this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.sessionService.user?.id ?? 'U'})`;
|
|
888
|
+
}
|
|
889
|
+
else if (this.scope === AXPPlatformScope.Tenant) {
|
|
890
|
+
this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.sessionService.tenant?.id ?? 'T'})`;
|
|
891
|
+
}
|
|
501
892
|
}
|
|
502
|
-
}
|
|
503
|
-
}
|
|
893
|
+
});
|
|
894
|
+
}
|
|
504
895
|
}
|
|
505
896
|
get scope() {
|
|
506
897
|
return this._scope;
|
|
@@ -516,7 +907,7 @@ class AXPSettingValueProviderDefault {
|
|
|
516
907
|
Object.entries(parsedSettings).forEach(([key, value]) => {
|
|
517
908
|
this.cache.set(key, value);
|
|
518
909
|
});
|
|
519
|
-
return Promise.resolve(Array.from(this.cache.entries()).map(c => ({ key: c[0], value: c[1] })));
|
|
910
|
+
return Promise.resolve(Array.from(this.cache.entries()).map((c) => ({ key: c[0], value: c[1] })));
|
|
520
911
|
}
|
|
521
912
|
return Promise.resolve([]);
|
|
522
913
|
}
|
|
@@ -561,12 +952,7 @@ class AXPSettingsService {
|
|
|
561
952
|
this.onChanged = new Subject();
|
|
562
953
|
this.onLoaded = new Subject();
|
|
563
954
|
// Initialize scoped caches for dynamic scopes
|
|
564
|
-
const staticScopes = [
|
|
565
|
-
AXPPlatformScope.Environment,
|
|
566
|
-
AXPPlatformScope.Global,
|
|
567
|
-
AXPPlatformScope.Tenant,
|
|
568
|
-
AXPPlatformScope.User,
|
|
569
|
-
];
|
|
955
|
+
const staticScopes = [AXPPlatformScope.Platform, AXPPlatformScope.Tenant, AXPPlatformScope.User];
|
|
570
956
|
staticScopes.forEach((scope) => {
|
|
571
957
|
if (!this.scopedSettingsCache.has(scope)) {
|
|
572
958
|
this.scopedSettingsCache.set(scope, new Map());
|
|
@@ -601,6 +987,7 @@ class AXPSettingsService {
|
|
|
601
987
|
});
|
|
602
988
|
settingsList.push(...providerSettings);
|
|
603
989
|
}
|
|
990
|
+
await this.seedMissingDefaults();
|
|
604
991
|
this.onLoaded.next();
|
|
605
992
|
return settingsList;
|
|
606
993
|
}
|
|
@@ -609,35 +996,45 @@ class AXPSettingsService {
|
|
|
609
996
|
throw error;
|
|
610
997
|
}
|
|
611
998
|
}
|
|
999
|
+
/**
|
|
1000
|
+
* Returns the effective setting value. Primitive coercion (string, boolean, number, date) is inferred from the
|
|
1001
|
+
* definition default and/or the stored shape (including `{ value: ... }`). Type argument `T` is compile-time only;
|
|
1002
|
+
* it is not read at runtime—use it to document the expected result (e.g. `get<boolean>(key)`).
|
|
1003
|
+
*/
|
|
612
1004
|
async get(key) {
|
|
1005
|
+
const { effective, defaultSample } = await this.resolveEffectiveAndDefault(key);
|
|
1006
|
+
const kind = inferSettingCoercionKind(defaultSample, effective);
|
|
1007
|
+
if (kind !== null) {
|
|
1008
|
+
return coerceAXPSettingRawValueByKind(effective, kind);
|
|
1009
|
+
}
|
|
1010
|
+
if (effective === undefined) {
|
|
1011
|
+
return effective;
|
|
1012
|
+
}
|
|
1013
|
+
return cloneDeep(effective);
|
|
1014
|
+
}
|
|
1015
|
+
/**
|
|
1016
|
+
* Effective value (user → tenant → platform) when set; otherwise the definition default. Used for reads and coercion hints.
|
|
1017
|
+
*/
|
|
1018
|
+
async resolveEffectiveAndDefault(key) {
|
|
613
1019
|
if (this.scopedSettingsCache.size === 0) {
|
|
614
1020
|
await this.load();
|
|
615
1021
|
}
|
|
616
|
-
const
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
AXPPlatformScope.Global,
|
|
620
|
-
AXPPlatformScope.Environment,
|
|
621
|
-
];
|
|
1022
|
+
const defaults = await this.injector.get(AXPSettingDefaultValuesAggregatorService).getDefaults();
|
|
1023
|
+
const defaultSample = get(defaults, key);
|
|
1024
|
+
const scopeOrder = [AXPPlatformScope.User, AXPPlatformScope.Tenant, AXPPlatformScope.Platform];
|
|
622
1025
|
for (const scope of scopeOrder) {
|
|
623
1026
|
const scopeCache = this.scopedSettingsCache.get(scope);
|
|
624
1027
|
if (scopeCache && scopeCache.has(key)) {
|
|
625
1028
|
const value = scopeCache.get(key);
|
|
626
1029
|
if (value !== undefined && value !== null) {
|
|
627
|
-
return
|
|
1030
|
+
return { effective: value, defaultSample };
|
|
628
1031
|
}
|
|
629
1032
|
}
|
|
630
1033
|
}
|
|
631
|
-
|
|
632
|
-
return get(defaults, key); // Fallback if no value is found
|
|
1034
|
+
return { effective: defaultSample, defaultSample };
|
|
633
1035
|
}
|
|
634
1036
|
async defaultValues(scope) {
|
|
635
|
-
let scopeOrder = [
|
|
636
|
-
AXPPlatformScope.Environment,
|
|
637
|
-
AXPPlatformScope.Global,
|
|
638
|
-
AXPPlatformScope.Tenant,
|
|
639
|
-
AXPPlatformScope.User,
|
|
640
|
-
].reverse();
|
|
1037
|
+
let scopeOrder = [AXPPlatformScope.Platform, AXPPlatformScope.Tenant, AXPPlatformScope.User].reverse();
|
|
641
1038
|
const scopeIndex = scopeOrder.indexOf(scope);
|
|
642
1039
|
if (scopeIndex === -1) {
|
|
643
1040
|
throw new Error(`Invalid scope: ${scope}`);
|
|
@@ -671,10 +1068,36 @@ class AXPSettingsService {
|
|
|
671
1068
|
this.onChanged.next(event);
|
|
672
1069
|
this.eventService.publish('AXPSettingChangedEvent', event);
|
|
673
1070
|
}
|
|
674
|
-
|
|
675
|
-
|
|
1071
|
+
async seedMissingDefaults() {
|
|
1072
|
+
const definitionService = this.injector.get(AXPSettingDefinitionProviderService);
|
|
1073
|
+
const aggregator = this.injector.get(AXPSettingDefaultValuesAggregatorService);
|
|
1074
|
+
const [{ defaults, seedScopeByKey }, scopeByKey] = await Promise.all([
|
|
1075
|
+
aggregator.getMerged(),
|
|
1076
|
+
definitionService.settingScopeByKey(),
|
|
1077
|
+
]);
|
|
1078
|
+
const persistedKeysByScope = new Map(await Promise.all(this.providers.map(async (provider) => {
|
|
1079
|
+
const stored = await provider.load();
|
|
1080
|
+
return [provider.scope, new Set(stored.map((s) => s.key))];
|
|
1081
|
+
})));
|
|
1082
|
+
const toPersist = {};
|
|
1083
|
+
for (const [key, value] of Object.entries(defaults)) {
|
|
1084
|
+
const scope = seedScopeByKey[key] ?? scopeByKey[key];
|
|
1085
|
+
if (!scope || value === undefined || persistedKeysByScope.get(scope)?.has(key)) {
|
|
1086
|
+
continue;
|
|
1087
|
+
}
|
|
1088
|
+
toPersist[scope] ??= {};
|
|
1089
|
+
toPersist[scope][key] = value;
|
|
1090
|
+
}
|
|
1091
|
+
for (const [scope, values] of Object.entries(toPersist)) {
|
|
1092
|
+
if (Object.keys(values).length > 0) {
|
|
1093
|
+
await this.scope(scope).set(values);
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1098
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsService, providedIn: 'root' }); }
|
|
676
1099
|
}
|
|
677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsService, decorators: [{
|
|
678
1101
|
type: Injectable,
|
|
679
1102
|
args: [{
|
|
680
1103
|
providedIn: 'root',
|
|
@@ -689,7 +1112,17 @@ class ScopedSettingService {
|
|
|
689
1112
|
async get(key) {
|
|
690
1113
|
const settings = await this.provider.load();
|
|
691
1114
|
const setting = settings.find((s) => s.key === key);
|
|
692
|
-
|
|
1115
|
+
const effective = setting?.value;
|
|
1116
|
+
const defaults = await this.parent.defaultValues(this.provider.scope);
|
|
1117
|
+
const defaultSample = get(defaults, key);
|
|
1118
|
+
const kind = inferSettingCoercionKind(defaultSample, effective);
|
|
1119
|
+
if (kind !== null) {
|
|
1120
|
+
return coerceAXPSettingRawValueByKind(effective, kind);
|
|
1121
|
+
}
|
|
1122
|
+
if (effective === undefined) {
|
|
1123
|
+
return effective;
|
|
1124
|
+
}
|
|
1125
|
+
return cloneDeep(effective);
|
|
693
1126
|
}
|
|
694
1127
|
async all() {
|
|
695
1128
|
const settings = await this.provider.load();
|
|
@@ -730,34 +1163,219 @@ class ScopedSettingService {
|
|
|
730
1163
|
}
|
|
731
1164
|
}
|
|
732
1165
|
|
|
1166
|
+
const DEFAULT_APPLY_DEFAULT_MULTILANGUAGE = true;
|
|
733
1167
|
/**
|
|
734
|
-
*
|
|
735
|
-
*
|
|
736
|
-
*
|
|
1168
|
+
* Synchronous access to default multi-language behavior for named entity fields and widget
|
|
1169
|
+
* property bindings. Mirrors {@link AXPLayoutOrderingConfigService}: avoids async in entity
|
|
1170
|
+
* modifiers and startup deadlocks.
|
|
737
1171
|
*/
|
|
738
|
-
|
|
739
|
-
(
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
}
|
|
1172
|
+
class AXPDefaultMultiLanguageConfigService {
|
|
1173
|
+
constructor() {
|
|
1174
|
+
this.settingsService = inject(AXPSettingsService);
|
|
1175
|
+
this._applyDefault = signal(DEFAULT_APPLY_DEFAULT_MULTILANGUAGE, ...(ngDevMode ? [{ debugName: "_applyDefault" }] : /* istanbul ignore next */ []));
|
|
1176
|
+
this.syncScheduled = false;
|
|
1177
|
+
this.settingsService.onLoaded.subscribe(() => this.syncFromSettings());
|
|
1178
|
+
this.settingsService.onChanged.subscribe(() => this.syncFromSettings());
|
|
1179
|
+
}
|
|
1180
|
+
getApplyDefaultMultiLanguage() {
|
|
1181
|
+
if (!this.syncScheduled) {
|
|
1182
|
+
this.syncScheduled = true;
|
|
1183
|
+
this.settingsService
|
|
1184
|
+
.get(AXPRegionalSetting.MultiLanguageSupport)
|
|
1185
|
+
.then((value) => this._applyDefault.set(value ?? DEFAULT_APPLY_DEFAULT_MULTILANGUAGE))
|
|
1186
|
+
.catch(() => this._applyDefault.set(DEFAULT_APPLY_DEFAULT_MULTILANGUAGE));
|
|
1187
|
+
}
|
|
1188
|
+
return this._applyDefault();
|
|
1189
|
+
}
|
|
1190
|
+
async syncFromSettings() {
|
|
1191
|
+
try {
|
|
1192
|
+
const value = await this.settingsService.get(AXPRegionalSetting.MultiLanguageSupport);
|
|
1193
|
+
this._applyDefault.set(value ?? DEFAULT_APPLY_DEFAULT_MULTILANGUAGE);
|
|
1194
|
+
}
|
|
1195
|
+
catch {
|
|
1196
|
+
this._applyDefault.set(DEFAULT_APPLY_DEFAULT_MULTILANGUAGE);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultMultiLanguageConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1200
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultMultiLanguageConfigService, providedIn: 'root' }); }
|
|
1201
|
+
}
|
|
1202
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultMultiLanguageConfigService, decorators: [{
|
|
1203
|
+
type: Injectable,
|
|
1204
|
+
args: [{ providedIn: 'root' }]
|
|
1205
|
+
}], ctorParameters: () => [] });
|
|
1206
|
+
|
|
1207
|
+
//#region ---- Constants ----
|
|
1208
|
+
/**
|
|
1209
|
+
* Widget types that support the multiLanguage option (text / rich text editors).
|
|
1210
|
+
*/
|
|
1211
|
+
const MULTILANGUAGE_CAPABLE_WIDGET_TYPES = new Set([
|
|
1212
|
+
'text-editor',
|
|
1213
|
+
'large-text-editor',
|
|
1214
|
+
'rich-text-editor',
|
|
1215
|
+
'template-content-editor',
|
|
1216
|
+
]);
|
|
1217
|
+
/**
|
|
1218
|
+
* Common property names / binding path segments that are usually translatable when the feature is
|
|
1219
|
+
* enabled in settings. Explicit `multiLanguage` on the property still wins.
|
|
1220
|
+
*/
|
|
1221
|
+
const DEFAULT_MULTILANGUAGE_FIELD_NAMES = new Set([
|
|
1222
|
+
'title',
|
|
1223
|
+
'description',
|
|
1224
|
+
'note',
|
|
1225
|
+
'content',
|
|
1226
|
+
/** e.g. `post.summaryContent` — last path segment */
|
|
1227
|
+
'summaryContent',
|
|
1228
|
+
'question',
|
|
1229
|
+
'summary',
|
|
1230
|
+
'body',
|
|
1231
|
+
'caption',
|
|
1232
|
+
'remarks',
|
|
1233
|
+
'subtitle',
|
|
1234
|
+
'label',
|
|
1235
|
+
'placeholder',
|
|
1236
|
+
'message',
|
|
1237
|
+
'subject',
|
|
1238
|
+
]);
|
|
1239
|
+
//#endregion
|
|
1240
|
+
//#region ---- Helpers ----
|
|
1241
|
+
function interfacePathLastSegment(path) {
|
|
1242
|
+
if (path == null || typeof path !== 'string' || !path.length) {
|
|
1243
|
+
return null;
|
|
1244
|
+
}
|
|
1245
|
+
const seg = path.includes('.') ? path.split('.').pop() : path;
|
|
1246
|
+
return seg && seg.length ? seg : null;
|
|
1247
|
+
}
|
|
1248
|
+
function shouldApplyDefaultMultiLanguageToEntityProperty(prop) {
|
|
1249
|
+
if (prop.schema.dataType !== 'string') {
|
|
1250
|
+
return false;
|
|
1251
|
+
}
|
|
1252
|
+
if (!DEFAULT_MULTILANGUAGE_FIELD_NAMES.has(prop.name)) {
|
|
1253
|
+
return false;
|
|
1254
|
+
}
|
|
1255
|
+
const widgetType = prop.schema.interface?.type;
|
|
1256
|
+
if (typeof widgetType !== 'string' || !MULTILANGUAGE_CAPABLE_WIDGET_TYPES.has(widgetType)) {
|
|
1257
|
+
return false;
|
|
1258
|
+
}
|
|
1259
|
+
const opts = prop.schema.interface?.options;
|
|
1260
|
+
if (opts && 'multiLanguage' in opts) {
|
|
1261
|
+
return false;
|
|
1262
|
+
}
|
|
1263
|
+
return true;
|
|
1264
|
+
}
|
|
1265
|
+
function shouldApplyDefaultMultiLanguageToWidgetProperty(prop) {
|
|
1266
|
+
if (prop.schema.dataType !== 'string') {
|
|
1267
|
+
return false;
|
|
1268
|
+
}
|
|
1269
|
+
const key = interfacePathLastSegment(prop.schema.interface.path);
|
|
1270
|
+
if (!key || !DEFAULT_MULTILANGUAGE_FIELD_NAMES.has(key)) {
|
|
1271
|
+
return false;
|
|
1272
|
+
}
|
|
1273
|
+
const widgetType = prop.schema.interface.type;
|
|
1274
|
+
if (typeof widgetType !== 'string' || !MULTILANGUAGE_CAPABLE_WIDGET_TYPES.has(widgetType)) {
|
|
1275
|
+
return false;
|
|
1276
|
+
}
|
|
1277
|
+
const opts = prop.schema.interface.options;
|
|
1278
|
+
if (opts && 'multiLanguage' in opts) {
|
|
1279
|
+
return false;
|
|
1280
|
+
}
|
|
1281
|
+
return true;
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* Leaf widget nodes in entity `schema.interface` trees (e.g. GridLayout → RichText under `pre` /
|
|
1285
|
+
* `post`) — same path/type rules as {@link shouldApplyDefaultMultiLanguageToWidgetProperty}, without
|
|
1286
|
+
* `schema.dataType` (nodes do not carry entity schema).
|
|
1287
|
+
*/
|
|
1288
|
+
function shouldApplyDefaultMultiLanguageToWidgetNode(node) {
|
|
1289
|
+
const widgetType = node.type;
|
|
1290
|
+
if (typeof widgetType !== 'string' || !MULTILANGUAGE_CAPABLE_WIDGET_TYPES.has(widgetType)) {
|
|
1291
|
+
return false;
|
|
1292
|
+
}
|
|
1293
|
+
const key = interfacePathLastSegment(node.path);
|
|
1294
|
+
if (!key || !DEFAULT_MULTILANGUAGE_FIELD_NAMES.has(key)) {
|
|
1295
|
+
return false;
|
|
1296
|
+
}
|
|
1297
|
+
const opts = node.options;
|
|
1298
|
+
if (opts && 'multiLanguage' in opts) {
|
|
1299
|
+
return false;
|
|
1300
|
+
}
|
|
1301
|
+
return true;
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* When {@link AXPDefaultMultiLanguageConfigService#getApplyDefaultMultiLanguage} is true, sets
|
|
1305
|
+
* `options.multiLanguage` on eligible editor leaves inside an entity property's widget tree
|
|
1306
|
+
* (including nested layouts). Used by entity middleware so object fields (e.g. `pre`, `post`) are
|
|
1307
|
+
* covered, not only top-level string properties.
|
|
1308
|
+
*/
|
|
1309
|
+
function withDefaultMultiLanguageOnWidgetNodeTree(root, applyDefault) {
|
|
1310
|
+
if (root == null || !applyDefault) {
|
|
1311
|
+
return root ?? undefined;
|
|
1312
|
+
}
|
|
1313
|
+
return visitWidgetNodeForDefaultMultiLanguage(root);
|
|
1314
|
+
}
|
|
1315
|
+
function visitWidgetNodeForDefaultMultiLanguage(node) {
|
|
1316
|
+
let next = node;
|
|
1317
|
+
if (node.children?.length) {
|
|
1318
|
+
const newChildren = node.children.map((child) => visitWidgetNodeForDefaultMultiLanguage(child));
|
|
1319
|
+
if (newChildren.some((c, i) => c !== node.children[i])) {
|
|
1320
|
+
next = { ...node, children: newChildren };
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
if (shouldApplyDefaultMultiLanguageToWidgetNode(next)) {
|
|
1324
|
+
return {
|
|
1325
|
+
...next,
|
|
1326
|
+
options: {
|
|
1327
|
+
...(next.options ?? {}),
|
|
1328
|
+
multiLanguage: true,
|
|
1329
|
+
},
|
|
1330
|
+
};
|
|
1331
|
+
}
|
|
1332
|
+
return next;
|
|
1333
|
+
}
|
|
1334
|
+
/**
|
|
1335
|
+
* When {@link AXPDefaultMultiLanguageConfigService#getApplyDefaultMultiLanguage} is true, sets
|
|
1336
|
+
* `schema.interface.options.multiLanguage` for eligible string widget properties (same rules as
|
|
1337
|
+
* entity middleware), unless the property already specifies `multiLanguage`.
|
|
1338
|
+
*/
|
|
1339
|
+
function withDefaultMultiLanguageOnWidgetProperty(prop, applyDefault) {
|
|
1340
|
+
if (!applyDefault || !shouldApplyDefaultMultiLanguageToWidgetProperty(prop)) {
|
|
1341
|
+
return prop;
|
|
1342
|
+
}
|
|
1343
|
+
const iface = prop.schema.interface;
|
|
1344
|
+
const existingOpts = (iface.options ?? {});
|
|
1345
|
+
return {
|
|
1346
|
+
...prop,
|
|
1347
|
+
schema: {
|
|
1348
|
+
...prop.schema,
|
|
1349
|
+
interface: {
|
|
1350
|
+
...iface,
|
|
1351
|
+
options: {
|
|
1352
|
+
...existingOpts,
|
|
1353
|
+
multiLanguage: true,
|
|
1354
|
+
},
|
|
1355
|
+
},
|
|
1356
|
+
},
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1359
|
+
//#endregion
|
|
1360
|
+
|
|
1361
|
+
//#region ---- Settings expression scope ----
|
|
1362
|
+
/**
|
|
1363
|
+
* Exposes platform settings in expression strings, e.g.
|
|
1364
|
+
* `{{ settings.get('Common:Setting:Entity.ShowPageBadge') }}`.
|
|
1365
|
+
*/
|
|
1366
|
+
class AXPSettingsEvaluatorScopeProvider {
|
|
1367
|
+
constructor() {
|
|
1368
|
+
this.settingsService = inject(AXPSettingsService);
|
|
1369
|
+
}
|
|
1370
|
+
async provide(context) {
|
|
1371
|
+
context.addScope('settings', {
|
|
1372
|
+
get: async (key) => {
|
|
1373
|
+
return await this.settingsService.get(key);
|
|
1374
|
+
},
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
//#endregion
|
|
761
1379
|
|
|
762
1380
|
var AXPHomePageSettings;
|
|
763
1381
|
(function (AXPHomePageSettings) {
|
|
@@ -815,9 +1433,7 @@ class AXPHomePageService {
|
|
|
815
1433
|
{ ...home?.route, ...{ data: { key: home?.key, title: home?.title, path: fullPath } } },
|
|
816
1434
|
];
|
|
817
1435
|
}
|
|
818
|
-
return [
|
|
819
|
-
{ path: '', redirectTo: this.loginPath, pathMatch: 'full' },
|
|
820
|
-
];
|
|
1436
|
+
return [{ path: '', redirectTo: this.loginPath, pathMatch: 'full' }];
|
|
821
1437
|
}
|
|
822
1438
|
getCurrent() {
|
|
823
1439
|
const key = this.userHomePageKey ?? this.defaultHomePageKey;
|
|
@@ -865,30 +1481,24 @@ class AXPHomePageService {
|
|
|
865
1481
|
// Filter the original routes to drop the old home placeholders.
|
|
866
1482
|
// We know your dynamic routes always have path === '' or ':app'
|
|
867
1483
|
// or carry a `data.key` matching one of your home-page keys.
|
|
868
|
-
const otherRoutes = (this.originalConfig ?? [])
|
|
869
|
-
.filter(r => r.path !== '' &&
|
|
870
|
-
r.path !== ':app' &&
|
|
871
|
-
!(r.data && typeof r.data['key'] === 'string'));
|
|
1484
|
+
const otherRoutes = (this.originalConfig ?? []).filter((r) => r.path !== '' && r.path !== ':app' && !(r.data && typeof r.data['key'] === 'string'));
|
|
872
1485
|
// Build the new merged tree
|
|
873
|
-
const merged = [
|
|
874
|
-
...newHomeRoutes,
|
|
875
|
-
...otherRoutes
|
|
876
|
-
];
|
|
1486
|
+
const merged = [...newHomeRoutes, ...otherRoutes];
|
|
877
1487
|
// TODO: check this for custom menu like :app/terms
|
|
878
1488
|
router.resetConfig(merged);
|
|
879
1489
|
}
|
|
880
1490
|
async navigateTo() {
|
|
881
|
-
// wait for the router to be initialized
|
|
1491
|
+
// wait for the router to be initialized
|
|
882
1492
|
setTimeout(() => {
|
|
883
1493
|
const router = this.injector.get(Router);
|
|
884
1494
|
const current = this.getCurrent();
|
|
885
|
-
router.navigate([current.path]);
|
|
1495
|
+
router.navigate([current.path], { onSameUrlNavigation: 'reload' });
|
|
886
1496
|
}, 100);
|
|
887
1497
|
}
|
|
888
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
889
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1498
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1499
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageService, providedIn: 'root' }); }
|
|
890
1500
|
}
|
|
891
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1501
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageService, decorators: [{
|
|
892
1502
|
type: Injectable,
|
|
893
1503
|
args: [{
|
|
894
1504
|
providedIn: 'root',
|
|
@@ -909,28 +1519,27 @@ function provideDynamicHomePage() {
|
|
|
909
1519
|
]);
|
|
910
1520
|
}
|
|
911
1521
|
|
|
1522
|
+
const I18N = '@general:settings';
|
|
912
1523
|
class AXPHomePageSettingProvider {
|
|
913
1524
|
constructor(injector) {
|
|
914
1525
|
this.injector = injector;
|
|
915
|
-
this.translateService = this.injector.get(AXTranslationService);
|
|
916
1526
|
this.homePageService = this.injector.get(AXPHomePageService);
|
|
917
1527
|
this.defaultHomePageKey = inject(AXP_HOME_PAGE_DEFAULT_KEY, { optional: true }) ?? 'home';
|
|
918
1528
|
}
|
|
919
1529
|
async provide(context) {
|
|
920
|
-
const
|
|
921
|
-
const list = await this.homePageService.getRegisteredList().map((c) => ({ id: c.key, title: c.title }));
|
|
1530
|
+
const list = this.homePageService.getRegisteredList().map((c) => ({ id: c.key, title: c.title }));
|
|
922
1531
|
if (list.length === 0) {
|
|
923
1532
|
return;
|
|
924
1533
|
}
|
|
925
1534
|
// Define the 'General Settings' group
|
|
926
1535
|
context
|
|
927
|
-
.addGroup('general',
|
|
1536
|
+
.addGroup('general', `${I18N}.general.nav-title`, `${I18N}.general.description`, 'fa-light fa-palette', `${I18N}.general.title`, 1)
|
|
928
1537
|
// Add the 'Startup' section
|
|
929
|
-
.addSection('startup',
|
|
1538
|
+
.addSection('startup', `${I18N}.general.startup.title`, `${I18N}.general.startup.description`)
|
|
930
1539
|
// Add the 'Home Page' setting
|
|
931
1540
|
.addSetting({
|
|
932
1541
|
key: AXPHomePageSettings.UserHomePath,
|
|
933
|
-
title:
|
|
1542
|
+
title: `${I18N}.general.startup.home-page.title`,
|
|
934
1543
|
scope: AXPPlatformScope.User,
|
|
935
1544
|
isInherited: true,
|
|
936
1545
|
defaultValue: this.defaultHomePageKey || list[0].id,
|
|
@@ -943,24 +1552,24 @@ class AXPHomePageSettingProvider {
|
|
|
943
1552
|
dataSource: list,
|
|
944
1553
|
},
|
|
945
1554
|
},
|
|
946
|
-
description:
|
|
1555
|
+
description: `${I18N}.general.startup.home-page.description`,
|
|
947
1556
|
})
|
|
948
1557
|
// End the 'Startup' section
|
|
949
1558
|
.endSection()
|
|
950
1559
|
// End the 'General Settings' group
|
|
951
1560
|
.endGroup();
|
|
952
1561
|
}
|
|
953
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
954
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1562
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageSettingProvider, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1563
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageSettingProvider }); }
|
|
955
1564
|
}
|
|
956
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1565
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageSettingProvider, decorators: [{
|
|
957
1566
|
type: Injectable
|
|
958
1567
|
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
959
1568
|
|
|
960
1569
|
class AXPHomePageModule {
|
|
961
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
962
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
963
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1570
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1571
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule }); }
|
|
1572
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule, providers: [
|
|
964
1573
|
{
|
|
965
1574
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
966
1575
|
useClass: AXPHomePageSettingProvider,
|
|
@@ -968,7 +1577,7 @@ class AXPHomePageModule {
|
|
|
968
1577
|
},
|
|
969
1578
|
] }); }
|
|
970
1579
|
}
|
|
971
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule, decorators: [{
|
|
972
1581
|
type: NgModule,
|
|
973
1582
|
args: [{
|
|
974
1583
|
imports: [],
|
|
@@ -991,10 +1600,10 @@ class AXPCustomOperatorServiceImpl extends AXPCustomOperatorService {
|
|
|
991
1600
|
getCustomOperators() {
|
|
992
1601
|
return {};
|
|
993
1602
|
}
|
|
994
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
995
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1603
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCustomOperatorServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1604
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCustomOperatorServiceImpl }); }
|
|
996
1605
|
}
|
|
997
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1606
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCustomOperatorServiceImpl, decorators: [{
|
|
998
1607
|
type: Injectable
|
|
999
1608
|
}] });
|
|
1000
1609
|
|
|
@@ -1039,10 +1648,10 @@ class AXPFilterOperatorMiddlewareServiceImpl extends AXPFilterOperatorMiddleware
|
|
|
1039
1648
|
return acc;
|
|
1040
1649
|
}, {});
|
|
1041
1650
|
}
|
|
1042
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1043
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1651
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1652
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl }); }
|
|
1044
1653
|
}
|
|
1045
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl, decorators: [{
|
|
1046
1655
|
type: Injectable
|
|
1047
1656
|
}] });
|
|
1048
1657
|
|
|
@@ -1063,10 +1672,10 @@ class AXPErrorHandlerRegistryService {
|
|
|
1063
1672
|
get handlers() {
|
|
1064
1673
|
return this.errorHandlers;
|
|
1065
1674
|
}
|
|
1066
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1067
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1675
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPErrorHandlerRegistryService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1676
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPErrorHandlerRegistryService, providedIn: 'root' }); }
|
|
1068
1677
|
}
|
|
1069
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPErrorHandlerRegistryService, decorators: [{
|
|
1070
1679
|
type: Injectable,
|
|
1071
1680
|
args: [{
|
|
1072
1681
|
providedIn: 'root'
|
|
@@ -1097,10 +1706,10 @@ class AXPGlobalErrorHandler extends ErrorHandler {
|
|
|
1097
1706
|
}
|
|
1098
1707
|
handleErrorRecursively(0, error);
|
|
1099
1708
|
}
|
|
1100
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1101
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1709
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGlobalErrorHandler, deps: [{ token: i0.Injector }, { token: AXPErrorHandlerRegistryService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1710
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGlobalErrorHandler, providedIn: 'root' }); }
|
|
1102
1711
|
}
|
|
1103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1712
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGlobalErrorHandler, decorators: [{
|
|
1104
1713
|
type: Injectable,
|
|
1105
1714
|
args: [{ providedIn: 'root' }]
|
|
1106
1715
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: AXPErrorHandlerRegistryService }] });
|
|
@@ -1171,10 +1780,10 @@ class AXPTokenDefinitionService {
|
|
|
1171
1780
|
clearDefinitionsCache() {
|
|
1172
1781
|
this.definitionsByName.clear();
|
|
1173
1782
|
}
|
|
1174
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1175
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1783
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTokenDefinitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1784
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTokenDefinitionService, providedIn: 'root' }); }
|
|
1176
1785
|
}
|
|
1177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1786
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTokenDefinitionService, decorators: [{
|
|
1178
1787
|
type: Injectable,
|
|
1179
1788
|
args: [{
|
|
1180
1789
|
providedIn: 'root',
|
|
@@ -1212,32 +1821,24 @@ class AXPStickyDirective {
|
|
|
1212
1821
|
this.stickyOffset = 100;
|
|
1213
1822
|
this.isStickyChange = new EventEmitter();
|
|
1214
1823
|
this._isSticky = false;
|
|
1824
|
+
this.onWindowResize = () => {
|
|
1825
|
+
this.applyStickyStateFromScrollPosition();
|
|
1826
|
+
};
|
|
1215
1827
|
this.onParentScroll = () => {
|
|
1216
|
-
this.
|
|
1217
|
-
const scrollTop = this.parentElement === window ? window.scrollY : this.parentElement.scrollTop;
|
|
1218
|
-
const shouldStick = scrollTop + this.stickyOffset >= this.topOffset;
|
|
1219
|
-
if (shouldStick !== this.isSticky) {
|
|
1220
|
-
this.zone.run(() => {
|
|
1221
|
-
this.isSticky = shouldStick;
|
|
1222
|
-
this.toggleStickyClasses(shouldStick);
|
|
1223
|
-
this.cdr.markForCheck();
|
|
1224
|
-
});
|
|
1225
|
-
}
|
|
1226
|
-
});
|
|
1828
|
+
this.applyStickyStateFromScrollPosition();
|
|
1227
1829
|
};
|
|
1228
1830
|
}
|
|
1229
1831
|
ngAfterViewInit() {
|
|
1230
1832
|
this.initSticky();
|
|
1231
1833
|
// Add mutation observer for dynamic content
|
|
1232
1834
|
this.mutationObserver = new MutationObserver(() => {
|
|
1233
|
-
this.
|
|
1835
|
+
this.applyStickyStateFromScrollPosition();
|
|
1234
1836
|
});
|
|
1235
1837
|
this.mutationObserver.observe(this.element.nativeElement, {
|
|
1236
1838
|
childList: true,
|
|
1237
1839
|
subtree: true,
|
|
1238
1840
|
});
|
|
1239
|
-
|
|
1240
|
-
window.addEventListener('resize', this.updateTopOffset.bind(this));
|
|
1841
|
+
window.addEventListener('resize', this.onWindowResize);
|
|
1241
1842
|
}
|
|
1242
1843
|
initSticky() {
|
|
1243
1844
|
if (this.stickyParent instanceof HTMLElement) {
|
|
@@ -1247,13 +1848,42 @@ class AXPStickyDirective {
|
|
|
1247
1848
|
this.parentElement = document.querySelector(this.stickyParent) || window;
|
|
1248
1849
|
}
|
|
1249
1850
|
this.targetElement = document.querySelector(this.stickyTarget) || this.element.nativeElement;
|
|
1250
|
-
this.updateTopOffset();
|
|
1251
1851
|
this.parentElement.addEventListener('scroll', this.onParentScroll);
|
|
1852
|
+
this.applyStickyStateFromScrollPosition();
|
|
1853
|
+
}
|
|
1854
|
+
getScrollTop() {
|
|
1855
|
+
return this.parentElement === window ? window.scrollY : this.parentElement.scrollTop;
|
|
1856
|
+
}
|
|
1857
|
+
/**
|
|
1858
|
+
* Toggle stuck styling only while this element is visually pinned (matches `position: sticky; top: 0`).
|
|
1859
|
+
* Scroll-offset thresholds would stay true for every section already passed, so multiple stacked stickies
|
|
1860
|
+
* would all keep `--stuck`; geometry fixes that.
|
|
1861
|
+
*/
|
|
1862
|
+
computeShouldStick() {
|
|
1863
|
+
if (this.getScrollTop() <= 0) {
|
|
1864
|
+
return false;
|
|
1865
|
+
}
|
|
1866
|
+
const tRect = this.targetElement.getBoundingClientRect();
|
|
1867
|
+
const epsilon = 3;
|
|
1868
|
+
let limitY;
|
|
1869
|
+
if (this.parentElement === window) {
|
|
1870
|
+
limitY = this.stickyOffset;
|
|
1871
|
+
}
|
|
1872
|
+
else {
|
|
1873
|
+
limitY = this.parentElement.getBoundingClientRect().top;
|
|
1874
|
+
}
|
|
1875
|
+
return tRect.top <= limitY + epsilon && tRect.top >= limitY - epsilon;
|
|
1252
1876
|
}
|
|
1253
|
-
|
|
1877
|
+
applyStickyStateFromScrollPosition() {
|
|
1254
1878
|
this.zone.runOutsideAngular(() => {
|
|
1255
|
-
const
|
|
1256
|
-
|
|
1879
|
+
const shouldStick = this.computeShouldStick();
|
|
1880
|
+
if (shouldStick !== this.isSticky) {
|
|
1881
|
+
this.zone.run(() => {
|
|
1882
|
+
this.isSticky = shouldStick;
|
|
1883
|
+
this.toggleStickyClasses(shouldStick);
|
|
1884
|
+
this.cdr.markForCheck();
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1257
1887
|
});
|
|
1258
1888
|
}
|
|
1259
1889
|
toggleStickyClasses(isSticky) {
|
|
@@ -1269,15 +1899,15 @@ class AXPStickyDirective {
|
|
|
1269
1899
|
}
|
|
1270
1900
|
ngOnDestroy() {
|
|
1271
1901
|
this.parentElement.removeEventListener('scroll', this.onParentScroll);
|
|
1272
|
-
window.removeEventListener('resize', this.
|
|
1902
|
+
window.removeEventListener('resize', this.onWindowResize);
|
|
1273
1903
|
if (this.mutationObserver) {
|
|
1274
1904
|
this.mutationObserver.disconnect();
|
|
1275
1905
|
}
|
|
1276
1906
|
}
|
|
1277
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1278
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1907
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStickyDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1908
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: AXPStickyDirective, isStandalone: true, selector: "[axpSticky]", inputs: { stickyClass: ["axpSticky", "stickyClass"], stickyOffset: "stickyOffset", stickyParent: "stickyParent", stickyTarget: "stickyTarget" }, outputs: { isStickyChange: "isStickyChange" }, exportAs: ["axpSticky"], ngImport: i0 }); }
|
|
1279
1909
|
}
|
|
1280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1910
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStickyDirective, decorators: [{
|
|
1281
1911
|
type: Directive,
|
|
1282
1912
|
args: [{
|
|
1283
1913
|
selector: '[axpSticky]',
|
|
@@ -1620,10 +2250,10 @@ class AXPMenuMiddlewareRegistry {
|
|
|
1620
2250
|
clear() {
|
|
1621
2251
|
this.manualMiddlewares.clear();
|
|
1622
2252
|
}
|
|
1623
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1624
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2253
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuMiddlewareRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2254
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuMiddlewareRegistry, providedIn: 'root' }); }
|
|
1625
2255
|
}
|
|
1626
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2256
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuMiddlewareRegistry, decorators: [{
|
|
1627
2257
|
type: Injectable,
|
|
1628
2258
|
args: [{ providedIn: 'root' }]
|
|
1629
2259
|
}] });
|
|
@@ -1642,6 +2272,7 @@ class AXPMenuProviderService {
|
|
|
1642
2272
|
this.pendingRemovals = [];
|
|
1643
2273
|
this.pendingUpdates = [];
|
|
1644
2274
|
this.pendingAdditions = [];
|
|
2275
|
+
this.pendingMoves = [];
|
|
1645
2276
|
/**
|
|
1646
2277
|
* Observable for menu reload events
|
|
1647
2278
|
* Emits when menu cache is cleared and consumers should reload
|
|
@@ -1673,10 +2304,11 @@ class AXPMenuProviderService {
|
|
|
1673
2304
|
// If provider is a direct instance, use it directly
|
|
1674
2305
|
await provider.provide(context);
|
|
1675
2306
|
}
|
|
2307
|
+
// Apply pending operations after each provider so subsequent providers
|
|
2308
|
+
// can find items added by earlier providers (e.g. Tokens under Data Definitions)
|
|
2309
|
+
this.applyPendingOperations(items);
|
|
1676
2310
|
}
|
|
1677
2311
|
}
|
|
1678
|
-
// Apply pending operations
|
|
1679
|
-
this.applyPendingOperations(items);
|
|
1680
2312
|
// Sort items by priority
|
|
1681
2313
|
items.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
|
|
1682
2314
|
// Apply middlewares using registry (sorted by priority)
|
|
@@ -1706,10 +2338,10 @@ class AXPMenuProviderService {
|
|
|
1706
2338
|
// If provider is a direct instance, use it directly
|
|
1707
2339
|
await provider.provide(context);
|
|
1708
2340
|
}
|
|
2341
|
+
// Apply pending operations after each provider
|
|
2342
|
+
this.applyPendingOperations(items);
|
|
1709
2343
|
}
|
|
1710
2344
|
}
|
|
1711
|
-
// Apply pending operations
|
|
1712
|
-
this.applyPendingOperations(items);
|
|
1713
2345
|
// Sort items by priority
|
|
1714
2346
|
items.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
|
|
1715
2347
|
// ADD level property to items (but NO middleware)
|
|
@@ -1726,6 +2358,7 @@ class AXPMenuProviderService {
|
|
|
1726
2358
|
this.pendingRemovals = [];
|
|
1727
2359
|
this.pendingUpdates = [];
|
|
1728
2360
|
this.pendingAdditions = [];
|
|
2361
|
+
this.pendingMoves = [];
|
|
1729
2362
|
// Notify subscribers that menu should be reloaded
|
|
1730
2363
|
this.menuReloadSubject.next();
|
|
1731
2364
|
}
|
|
@@ -1787,7 +2420,14 @@ class AXPMenuProviderService {
|
|
|
1787
2420
|
},
|
|
1788
2421
|
addItems: (newItems) => {
|
|
1789
2422
|
this.pendingAdditions.push({ target, newItems });
|
|
1790
|
-
}
|
|
2423
|
+
},
|
|
2424
|
+
moveTo: (destination, position = 'inside') => {
|
|
2425
|
+
this.pendingMoves.push({
|
|
2426
|
+
source: target,
|
|
2427
|
+
destination,
|
|
2428
|
+
position: position ?? 'inside',
|
|
2429
|
+
});
|
|
2430
|
+
},
|
|
1791
2431
|
};
|
|
1792
2432
|
}
|
|
1793
2433
|
};
|
|
@@ -1894,11 +2534,15 @@ class AXPMenuProviderService {
|
|
|
1894
2534
|
}
|
|
1895
2535
|
}
|
|
1896
2536
|
}
|
|
2537
|
+
for (const move of this.pendingMoves) {
|
|
2538
|
+
this.applyPendingMove(items, move.source, move.destination, move.position);
|
|
2539
|
+
}
|
|
1897
2540
|
// Clear pending operations after applying them
|
|
1898
2541
|
this.pendingInserts = [];
|
|
1899
2542
|
this.pendingRemovals = [];
|
|
1900
2543
|
this.pendingUpdates = [];
|
|
1901
2544
|
this.pendingAdditions = [];
|
|
2545
|
+
this.pendingMoves = [];
|
|
1902
2546
|
}
|
|
1903
2547
|
findItemWithParent(items, target, parentItems = items) {
|
|
1904
2548
|
for (const item of items) {
|
|
@@ -1931,6 +2575,66 @@ class AXPMenuProviderService {
|
|
|
1931
2575
|
}
|
|
1932
2576
|
return null;
|
|
1933
2577
|
}
|
|
2578
|
+
applyPendingMove(items, sourceName, destName, position) {
|
|
2579
|
+
if (sourceName === destName) {
|
|
2580
|
+
console.warn(`moveTo: source and destination are the same ("${sourceName}"), ignored.`);
|
|
2581
|
+
return;
|
|
2582
|
+
}
|
|
2583
|
+
const sourceInfo = this.findItemWithParent(items, sourceName);
|
|
2584
|
+
const { foundItem: sourceItem, parentItems: sourceParent } = sourceInfo;
|
|
2585
|
+
if (!sourceItem) {
|
|
2586
|
+
console.warn(`moveTo: source "${sourceName}" not found.`);
|
|
2587
|
+
return;
|
|
2588
|
+
}
|
|
2589
|
+
const destInfo = this.findItemWithParent(items, destName);
|
|
2590
|
+
const { foundItem: destItem, parentItems: destParent } = destInfo;
|
|
2591
|
+
if (!destItem) {
|
|
2592
|
+
console.warn(`moveTo: destination "${destName}" not found.`);
|
|
2593
|
+
return;
|
|
2594
|
+
}
|
|
2595
|
+
if (this.itemIsInSubtreeOf(sourceItem, destItem)) {
|
|
2596
|
+
console.warn(`moveTo: cannot move "${sourceName}" because "${destName}" is inside the source subtree.`);
|
|
2597
|
+
return;
|
|
2598
|
+
}
|
|
2599
|
+
const sourceIndex = sourceParent.indexOf(sourceItem);
|
|
2600
|
+
if (sourceIndex === -1) {
|
|
2601
|
+
console.warn(`moveTo: source "${sourceName}" not in parent list (inconsistent).`);
|
|
2602
|
+
return;
|
|
2603
|
+
}
|
|
2604
|
+
sourceParent.splice(sourceIndex, 1);
|
|
2605
|
+
if (position === 'inside') {
|
|
2606
|
+
if (!destItem.children) {
|
|
2607
|
+
destItem.children = [];
|
|
2608
|
+
}
|
|
2609
|
+
destItem.children.push(sourceItem);
|
|
2610
|
+
return;
|
|
2611
|
+
}
|
|
2612
|
+
const destIndexInParent = destParent.indexOf(destItem);
|
|
2613
|
+
if (destIndexInParent === -1) {
|
|
2614
|
+
console.warn(`moveTo: destination "${destName}" not in parent list, reverting source removal.`);
|
|
2615
|
+
sourceParent.splice(sourceIndex, 0, sourceItem);
|
|
2616
|
+
return;
|
|
2617
|
+
}
|
|
2618
|
+
const insertIndex = position === 'before' ? destIndexInParent : destIndexInParent + 1;
|
|
2619
|
+
destParent.splice(insertIndex, 0, sourceItem);
|
|
2620
|
+
}
|
|
2621
|
+
itemIsInSubtreeOf(root, candidate) {
|
|
2622
|
+
if (root === candidate) {
|
|
2623
|
+
return true;
|
|
2624
|
+
}
|
|
2625
|
+
if (!root.children?.length) {
|
|
2626
|
+
return false;
|
|
2627
|
+
}
|
|
2628
|
+
for (const child of root.children) {
|
|
2629
|
+
if (child === candidate) {
|
|
2630
|
+
return true;
|
|
2631
|
+
}
|
|
2632
|
+
if (this.itemIsInSubtreeOf(child, candidate)) {
|
|
2633
|
+
return true;
|
|
2634
|
+
}
|
|
2635
|
+
}
|
|
2636
|
+
return false;
|
|
2637
|
+
}
|
|
1934
2638
|
/**
|
|
1935
2639
|
* Merge new item properties into existing item, handling children merge
|
|
1936
2640
|
*/
|
|
@@ -1978,10 +2682,10 @@ class AXPMenuProviderService {
|
|
|
1978
2682
|
}
|
|
1979
2683
|
}
|
|
1980
2684
|
}
|
|
1981
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1982
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2685
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2686
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuProviderService, providedIn: 'root' }); }
|
|
1983
2687
|
}
|
|
1984
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2688
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuProviderService, decorators: [{
|
|
1985
2689
|
type: Injectable,
|
|
1986
2690
|
args: [{ providedIn: 'root' }]
|
|
1987
2691
|
}] });
|
|
@@ -2001,6 +2705,90 @@ function setMenuItemMeta(items, parentIndex = '', depth = 0) {
|
|
|
2001
2705
|
});
|
|
2002
2706
|
}
|
|
2003
2707
|
|
|
2708
|
+
//#region ---- Imports ----
|
|
2709
|
+
//#endregion
|
|
2710
|
+
//#region ---- Helpers ----
|
|
2711
|
+
function flattenMenuItems(items, depth) {
|
|
2712
|
+
const rows = [];
|
|
2713
|
+
let index = 0;
|
|
2714
|
+
for (const it of items) {
|
|
2715
|
+
const fallback = `menu-${depth}-${index}`;
|
|
2716
|
+
index += 1;
|
|
2717
|
+
const id = it.name ?? it.path ?? fallback;
|
|
2718
|
+
rows.push({ id, title: it.text });
|
|
2719
|
+
if (it.children?.length) {
|
|
2720
|
+
rows.push(...flattenMenuItems(it.children, depth + 1));
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
return rows;
|
|
2724
|
+
}
|
|
2725
|
+
//#endregion
|
|
2726
|
+
//#region ---- Menu items data source ----
|
|
2727
|
+
/**
|
|
2728
|
+
* Registered menu items (raw tree flattened) for select widgets via dataSource name {@link MENU_ITEMS_DATASOURCE_NAME}.
|
|
2729
|
+
*/
|
|
2730
|
+
const MENU_ITEMS_DATASOURCE_NAME = 'platform-menu-items';
|
|
2731
|
+
/**
|
|
2732
|
+
* Data source definition for menu items from {@link AXPMenuProviderService#rawItems}.
|
|
2733
|
+
*/
|
|
2734
|
+
class AXPMenuItemsDataSourceDefinition {
|
|
2735
|
+
constructor() {
|
|
2736
|
+
//#region ---- Services & Dependencies ----
|
|
2737
|
+
this.menuProviderService = inject(AXPMenuProviderService);
|
|
2738
|
+
//#endregion
|
|
2739
|
+
}
|
|
2740
|
+
//#endregion
|
|
2741
|
+
//#region ---- Public API ----
|
|
2742
|
+
async items() {
|
|
2743
|
+
return [
|
|
2744
|
+
{
|
|
2745
|
+
name: MENU_ITEMS_DATASOURCE_NAME,
|
|
2746
|
+
title: 'Menu items',
|
|
2747
|
+
source: () => new AXDataSource({
|
|
2748
|
+
key: 'id',
|
|
2749
|
+
load: async () => {
|
|
2750
|
+
const raw = await this.menuProviderService.rawItems();
|
|
2751
|
+
const list = flattenMenuItems(raw, 0);
|
|
2752
|
+
return { items: list, total: list.length };
|
|
2753
|
+
},
|
|
2754
|
+
byKey: async (key) => {
|
|
2755
|
+
const raw = await this.menuProviderService.rawItems();
|
|
2756
|
+
const list = flattenMenuItems(raw, 0);
|
|
2757
|
+
return list.find((item) => item.id === key);
|
|
2758
|
+
},
|
|
2759
|
+
pageSize: 1000,
|
|
2760
|
+
}),
|
|
2761
|
+
columns: [
|
|
2762
|
+
{
|
|
2763
|
+
name: 'id',
|
|
2764
|
+
title: 'ID',
|
|
2765
|
+
datatype: 'string',
|
|
2766
|
+
type: AXPWidgetsCatalog.text,
|
|
2767
|
+
},
|
|
2768
|
+
{
|
|
2769
|
+
name: 'title',
|
|
2770
|
+
title: 'Title',
|
|
2771
|
+
datatype: 'string',
|
|
2772
|
+
type: AXPWidgetsCatalog.text,
|
|
2773
|
+
},
|
|
2774
|
+
],
|
|
2775
|
+
filters: [
|
|
2776
|
+
{
|
|
2777
|
+
field: 'title',
|
|
2778
|
+
title: 'Title',
|
|
2779
|
+
operator: { type: 'equal' },
|
|
2780
|
+
widget: { type: AXPWidgetsCatalog.text },
|
|
2781
|
+
filterType: { advance: true, inline: true },
|
|
2782
|
+
},
|
|
2783
|
+
],
|
|
2784
|
+
textField: { name: 'title', title: 'Title' },
|
|
2785
|
+
valueField: { name: 'id', title: 'ID' },
|
|
2786
|
+
},
|
|
2787
|
+
];
|
|
2788
|
+
}
|
|
2789
|
+
}
|
|
2790
|
+
//#endregion
|
|
2791
|
+
|
|
2004
2792
|
//#region ---- Menu Middleware Provider Helper ----
|
|
2005
2793
|
/**
|
|
2006
2794
|
* Helper function to provide menu middlewares with proper DI setup
|
|
@@ -2295,10 +3083,10 @@ class AXPMenuVisibilityService {
|
|
|
2295
3083
|
// Otherwise, don't render empty menu items
|
|
2296
3084
|
return false;
|
|
2297
3085
|
}
|
|
2298
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2299
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3086
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuVisibilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3087
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuVisibilityService, providedIn: 'root' }); }
|
|
2300
3088
|
}
|
|
2301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3089
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuVisibilityService, decorators: [{
|
|
2302
3090
|
type: Injectable,
|
|
2303
3091
|
args: [{ providedIn: 'root' }]
|
|
2304
3092
|
}] });
|
|
@@ -2332,21 +3120,23 @@ class AXPMenuSearchProvider {
|
|
|
2332
3120
|
title: item.text, // Use `text` for the `title`
|
|
2333
3121
|
icon: item.icon, // Include the `icon` if present
|
|
2334
3122
|
data: omit(item, ['parent', 'children']), // Include all data except `parent` and `children`
|
|
2335
|
-
command: item.path
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
type: 'router',
|
|
3123
|
+
command: item.path
|
|
3124
|
+
? {
|
|
3125
|
+
name: 'navigate',
|
|
2339
3126
|
options: {
|
|
2340
|
-
|
|
3127
|
+
type: 'router',
|
|
3128
|
+
options: {
|
|
3129
|
+
path: item.path,
|
|
3130
|
+
},
|
|
2341
3131
|
},
|
|
2342
3132
|
}
|
|
2343
|
-
|
|
3133
|
+
: item.command,
|
|
2344
3134
|
parent: item.parent
|
|
2345
3135
|
? {
|
|
2346
3136
|
title: item.parent.text,
|
|
2347
3137
|
}
|
|
2348
3138
|
: undefined,
|
|
2349
|
-
})), [(o) => this.translateService.translateSync(o.title)]);
|
|
3139
|
+
})), [(o) => this.translateService.translateSync(String(o.title ?? ''))]);
|
|
2350
3140
|
}
|
|
2351
3141
|
/**
|
|
2352
3142
|
* Recursively searches AXPMenuItem and its children for a matching text.
|
|
@@ -2375,18 +3165,19 @@ class AXPMenuSearchProvider {
|
|
|
2375
3165
|
}
|
|
2376
3166
|
|
|
2377
3167
|
class AXPFooterTextSlotComponent {
|
|
2378
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2379
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3168
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFooterTextSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3169
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPFooterTextSlotComponent, isStandalone: true, selector: "ng-component", inputs: { text: "text" }, ngImport: i0, template: `
|
|
2380
3170
|
<small class="ax-text-sm" [innerHTML]="text"></small>
|
|
2381
|
-
`, isInline: true }); }
|
|
3171
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2382
3172
|
}
|
|
2383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFooterTextSlotComponent, decorators: [{
|
|
2384
3174
|
type: Component,
|
|
2385
3175
|
args: [{
|
|
2386
3176
|
template: `
|
|
2387
3177
|
<small class="ax-text-sm" [innerHTML]="text"></small>
|
|
2388
3178
|
`,
|
|
2389
|
-
standalone: true
|
|
3179
|
+
standalone: true,
|
|
3180
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2390
3181
|
}]
|
|
2391
3182
|
}], propDecorators: { text: [{
|
|
2392
3183
|
type: Input
|
|
@@ -2397,8 +3188,8 @@ class AXPNavBarSlotComponent {
|
|
|
2397
3188
|
// if (action)
|
|
2398
3189
|
// this.store.dispatch(action)
|
|
2399
3190
|
}
|
|
2400
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2401
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3191
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPNavBarSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3192
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPNavBarSlotComponent, isStandalone: true, selector: "ng-component", inputs: { items: "items" }, ngImport: i0, template: `
|
|
2402
3193
|
<div class="ax-flex ax-items-center ax-justify-between ax-gap-5">
|
|
2403
3194
|
@for (link of items; track link) {
|
|
2404
3195
|
<a (click)="handleCommand(link.command)" >{{ link.text }}</a>
|
|
@@ -2406,7 +3197,7 @@ class AXPNavBarSlotComponent {
|
|
|
2406
3197
|
</div>
|
|
2407
3198
|
`, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2408
3199
|
}
|
|
2409
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPNavBarSlotComponent, decorators: [{
|
|
2410
3201
|
type: Component,
|
|
2411
3202
|
args: [{
|
|
2412
3203
|
template: `
|
|
@@ -2540,17 +3331,21 @@ class AXPSearchDefinitionProviderService {
|
|
|
2540
3331
|
}
|
|
2541
3332
|
return definition;
|
|
2542
3333
|
}
|
|
2543
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2544
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3334
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3335
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchDefinitionProviderService, providedIn: 'root' }); }
|
|
2545
3336
|
}
|
|
2546
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchDefinitionProviderService, decorators: [{
|
|
2547
3338
|
type: Injectable,
|
|
2548
3339
|
args: [{ providedIn: 'root' }]
|
|
2549
3340
|
}] });
|
|
2550
3341
|
|
|
2551
3342
|
class AXPSearchCommandProvider {
|
|
3343
|
+
constructor() {
|
|
3344
|
+
this.translationService = inject(AXTranslationService);
|
|
3345
|
+
}
|
|
2552
3346
|
async search(text) {
|
|
2553
|
-
|
|
3347
|
+
const locale = this.translationService.getActiveLang() ?? 'en-US';
|
|
3348
|
+
return this.commands.filter((command) => searchInMultiLanguageString(command.title, text, locale));
|
|
2554
3349
|
}
|
|
2555
3350
|
}
|
|
2556
3351
|
|
|
@@ -2561,6 +3356,7 @@ class AXPSearchService {
|
|
|
2561
3356
|
this.providers = inject(AXP_SEARCH_PROVIDER, { optional: true });
|
|
2562
3357
|
this.definitionService = inject(AXPSearchDefinitionProviderService);
|
|
2563
3358
|
this.formatService = inject(AXFormatService);
|
|
3359
|
+
this.translationService = inject(AXTranslationService);
|
|
2564
3360
|
}
|
|
2565
3361
|
async search(text) {
|
|
2566
3362
|
//TODO better handle this
|
|
@@ -2579,8 +3375,12 @@ class AXPSearchService {
|
|
|
2579
3375
|
if (allProviders.length === 0) {
|
|
2580
3376
|
throw new Error('No search providers available');
|
|
2581
3377
|
}
|
|
3378
|
+
const providersWithSearch = allProviders.filter((provider) => provider != null && typeof provider.search === 'function');
|
|
3379
|
+
if (providersWithSearch.length === 0) {
|
|
3380
|
+
throw new Error('No search providers with a valid search method available');
|
|
3381
|
+
}
|
|
2582
3382
|
const mergeData = [];
|
|
2583
|
-
const promises =
|
|
3383
|
+
const promises = providersWithSearch.map((provider) => provider.search(text));
|
|
2584
3384
|
const results = await Promise.all(promises);
|
|
2585
3385
|
for (const resultArray of results) {
|
|
2586
3386
|
for (const result of resultArray) {
|
|
@@ -2599,10 +3399,7 @@ class AXPSearchService {
|
|
|
2599
3399
|
(definition.format.description
|
|
2600
3400
|
? this.formatService.format(definition.format.description, 'string', result.data)
|
|
2601
3401
|
: undefined),
|
|
2602
|
-
icon: result.icon ??
|
|
2603
|
-
(result.icon
|
|
2604
|
-
? this.formatService.format(definition.format.icon, 'string', result.data)
|
|
2605
|
-
: definition.icon),
|
|
3402
|
+
icon: result.icon ?? definition.icon,
|
|
2606
3403
|
data: result.data,
|
|
2607
3404
|
command: result.command,
|
|
2608
3405
|
actions: definition.actions,
|
|
@@ -2615,11 +3412,17 @@ class AXPSearchService {
|
|
|
2615
3412
|
}
|
|
2616
3413
|
}
|
|
2617
3414
|
}
|
|
3415
|
+
const locale = this.translationService.getActiveLang() ?? 'en-US';
|
|
3416
|
+
const normalizedQuery = text.trim();
|
|
3417
|
+
const visibleData = normalizedQuery.length === 0
|
|
3418
|
+
? mergeData
|
|
3419
|
+
: mergeData.filter((item) => searchInMultiLanguageString(item.title, normalizedQuery, locale) ||
|
|
3420
|
+
searchInMultiLanguageString(item.description, normalizedQuery, locale));
|
|
2618
3421
|
// Group data
|
|
2619
3422
|
const groupedData = [];
|
|
2620
3423
|
const groupMap = {};
|
|
2621
3424
|
// Create groups
|
|
2622
|
-
for (const item of
|
|
3425
|
+
for (const item of visibleData) {
|
|
2623
3426
|
const groupName = item.definitionName; // Change this to the property you want to group by
|
|
2624
3427
|
if (!groupMap[groupName]) {
|
|
2625
3428
|
groupMap[groupName] = {
|
|
@@ -2636,18 +3439,64 @@ class AXPSearchService {
|
|
|
2636
3439
|
groupedData.sort((a, b) => a.order - b.order);
|
|
2637
3440
|
return groupedData;
|
|
2638
3441
|
}
|
|
2639
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2640
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3442
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3443
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchService, providedIn: 'root' }); }
|
|
2641
3444
|
}
|
|
2642
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchService, decorators: [{
|
|
2643
3446
|
type: Injectable,
|
|
2644
3447
|
args: [{ providedIn: 'root' }]
|
|
2645
3448
|
}] });
|
|
2646
3449
|
|
|
3450
|
+
/**
|
|
3451
|
+
* Shared utility for creating Entity:Create command options used in search command providers.
|
|
3452
|
+
* Use with command: { name: 'Entity:Create', options: createEntityCommandOptions(...) }
|
|
3453
|
+
*/
|
|
3454
|
+
function createEntityCommandOptions(entityKey, entityInfo) {
|
|
3455
|
+
return {
|
|
3456
|
+
__context__: {
|
|
3457
|
+
entity: entityKey,
|
|
3458
|
+
entityInfo: {
|
|
3459
|
+
name: entityInfo.name,
|
|
3460
|
+
module: entityInfo.module,
|
|
3461
|
+
title: entityInfo.title,
|
|
3462
|
+
parentKey: undefined,
|
|
3463
|
+
source: entityKey,
|
|
3464
|
+
},
|
|
3465
|
+
data: {},
|
|
3466
|
+
options: {},
|
|
3467
|
+
},
|
|
3468
|
+
};
|
|
3469
|
+
}
|
|
3470
|
+
/**
|
|
3471
|
+
* Creates a search command for "Create {Entity}" with consistent i18n pattern.
|
|
3472
|
+
* Use titleKey/descriptionKey from module (e.g. @module:entity.permissions.create.title).
|
|
3473
|
+
* Standard: "Create {Entity}" for title, "Create new {entities}" for description.
|
|
3474
|
+
*/
|
|
3475
|
+
function createEntitySearchCommand(config) {
|
|
3476
|
+
return {
|
|
3477
|
+
id: config.id,
|
|
3478
|
+
group: 'command',
|
|
3479
|
+
title: config.titleKey,
|
|
3480
|
+
description: config.descriptionKey ?? config.titleKey,
|
|
3481
|
+
icon: config.icon,
|
|
3482
|
+
command: {
|
|
3483
|
+
name: 'Entity:Create',
|
|
3484
|
+
options: createEntityCommandOptions(config.entityKey, config.entityInfo),
|
|
3485
|
+
},
|
|
3486
|
+
};
|
|
3487
|
+
}
|
|
3488
|
+
|
|
2647
3489
|
var AXPCommonSettings;
|
|
2648
3490
|
(function (AXPCommonSettings) {
|
|
2649
3491
|
AXPCommonSettings["EnableOperationToasts"] = "Common:Setting:Notifications.EnableOperationToasts";
|
|
2650
3492
|
AXPCommonSettings["EntityFilterApplyMode"] = "Common:Setting:Entity.FilterApplyMode";
|
|
3493
|
+
AXPCommonSettings["ShowCategoryColumnsByDefault"] = "Common:Setting:Entity.ShowCategoryColumnsByDefault";
|
|
3494
|
+
AXPCommonSettings["ApplyLayoutOrdering"] = "Common:Setting:Entity.ApplyLayoutOrdering";
|
|
3495
|
+
AXPCommonSettings["RedirectToDetailsAfterCreate"] = "Common:Setting:Entity.RedirectToDetailsAfterCreate";
|
|
3496
|
+
AXPCommonSettings["ShowPageBadge"] = "Common:Setting:Entity.ShowPageBadge";
|
|
3497
|
+
AXPCommonSettings["DebugMode"] = "PlatformDevTools:Setting:Developer.DebugMode";
|
|
3498
|
+
AXPCommonSettings["ShowRowIndexColumn"] = "Common:Setting:Entity.ShowRowIndexColumn";
|
|
3499
|
+
AXPCommonSettings["EntityListPersistenceMode"] = "Common:Setting:Entity.ListPersistenceMode";
|
|
2651
3500
|
})(AXPCommonSettings || (AXPCommonSettings = {}));
|
|
2652
3501
|
|
|
2653
3502
|
//TODO Loading, Redirect, Drawer, Show toast
|
|
@@ -2672,10 +3521,10 @@ class AXPWorkflowNavigateAction extends AXPWorkflowAction {
|
|
|
2672
3521
|
this.router.navigate([payload.commands], payload.extras);
|
|
2673
3522
|
}
|
|
2674
3523
|
}
|
|
2675
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2676
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3524
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3525
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowNavigateAction }); }
|
|
2677
3526
|
}
|
|
2678
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowNavigateAction, decorators: [{
|
|
2679
3528
|
type: Injectable
|
|
2680
3529
|
}] });
|
|
2681
3530
|
class AXPDialogConfirmAction extends AXPWorkflowAction {
|
|
@@ -2691,10 +3540,10 @@ class AXPDialogConfirmAction extends AXPWorkflowAction {
|
|
|
2691
3540
|
const dialogResult = await this.dialogService.confirm(await this.translationService.translateAsync(this.title), await this.translationService.translateAsync(this.message), (await this.translationService.translateAsync(this.type)), 'horizontal', false, 'cancel');
|
|
2692
3541
|
context.setOutput('result', dialogResult.result);
|
|
2693
3542
|
}
|
|
2694
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2695
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3543
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogConfirmAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3544
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogConfirmAction }); }
|
|
2696
3545
|
}
|
|
2697
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3546
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogConfirmAction, decorators: [{
|
|
2698
3547
|
type: Injectable
|
|
2699
3548
|
}] });
|
|
2700
3549
|
class AXPToastAction extends AXPWorkflowAction {
|
|
@@ -2717,20 +3566,20 @@ class AXPToastAction extends AXPWorkflowAction {
|
|
|
2717
3566
|
});
|
|
2718
3567
|
}
|
|
2719
3568
|
}
|
|
2720
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2721
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3569
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPToastAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3570
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPToastAction }); }
|
|
2722
3571
|
}
|
|
2723
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPToastAction, decorators: [{
|
|
2724
3573
|
type: Injectable
|
|
2725
3574
|
}] });
|
|
2726
3575
|
class AXPReloadAction extends AXPWorkflowAction {
|
|
2727
3576
|
async execute(context) {
|
|
2728
3577
|
this.dispatch(AXPReloadEvent({ entity: context.getVariable('entity'), meta: context.getVariable('meta') }));
|
|
2729
3578
|
}
|
|
2730
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2731
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3579
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReloadAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3580
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReloadAction }); }
|
|
2732
3581
|
}
|
|
2733
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3582
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReloadAction, decorators: [{
|
|
2734
3583
|
type: Injectable
|
|
2735
3584
|
}] });
|
|
2736
3585
|
|
|
@@ -2742,6 +3591,10 @@ class AXPWorkflowRouterNavigateAction extends AXPWorkflowAction {
|
|
|
2742
3591
|
async execute(context) {
|
|
2743
3592
|
const command = context.getVariable();
|
|
2744
3593
|
const path = command.options.path;
|
|
3594
|
+
if (!path) {
|
|
3595
|
+
console.error('Path is required for navigate workflow');
|
|
3596
|
+
return;
|
|
3597
|
+
}
|
|
2745
3598
|
if (path?.toLowerCase()?.startsWith('http') || command.options?.extras?.target === 'blank') {
|
|
2746
3599
|
window.open(path, '_blank');
|
|
2747
3600
|
}
|
|
@@ -2770,10 +3623,10 @@ class AXPWorkflowRouterNavigateAction extends AXPWorkflowAction {
|
|
|
2770
3623
|
return params;
|
|
2771
3624
|
}, {});
|
|
2772
3625
|
}
|
|
2773
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2774
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3626
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRouterNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3627
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRouterNavigateAction }); }
|
|
2775
3628
|
}
|
|
2776
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3629
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRouterNavigateAction, decorators: [{
|
|
2777
3630
|
type: Injectable
|
|
2778
3631
|
}] });
|
|
2779
3632
|
const AXPNavigateWorkflow = {
|
|
@@ -2798,13 +3651,61 @@ class AXMWorkflowErrorHandler {
|
|
|
2798
3651
|
next(error);
|
|
2799
3652
|
}
|
|
2800
3653
|
}
|
|
2801
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2802
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3654
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMWorkflowErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3655
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMWorkflowErrorHandler }); }
|
|
3656
|
+
}
|
|
3657
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMWorkflowErrorHandler, decorators: [{
|
|
3658
|
+
type: Injectable
|
|
3659
|
+
}] });
|
|
3660
|
+
|
|
3661
|
+
class AXPFileStorageService {
|
|
3662
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3663
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileStorageService }); }
|
|
2803
3664
|
}
|
|
2804
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileStorageService, decorators: [{
|
|
2805
3666
|
type: Injectable
|
|
2806
3667
|
}] });
|
|
2807
3668
|
|
|
3669
|
+
var AXPFileStorageStatus;
|
|
3670
|
+
(function (AXPFileStorageStatus) {
|
|
3671
|
+
AXPFileStorageStatus["Temporary"] = "temporary";
|
|
3672
|
+
AXPFileStorageStatus["Committed"] = "committed";
|
|
3673
|
+
AXPFileStorageStatus["PendingDeletion"] = "pendingDeletion";
|
|
3674
|
+
AXPFileStorageStatus["Archived"] = "archived";
|
|
3675
|
+
AXPFileStorageStatus["Error"] = "error";
|
|
3676
|
+
})(AXPFileStorageStatus || (AXPFileStorageStatus = {}));
|
|
3677
|
+
|
|
3678
|
+
class AXPFileStorageEvaluatorScopeProvider {
|
|
3679
|
+
constructor() {
|
|
3680
|
+
this.fileStorageService = inject(AXPFileStorageService);
|
|
3681
|
+
}
|
|
3682
|
+
async provide(context) {
|
|
3683
|
+
console.log('fileStorageEvaluatorScopeProvider', context);
|
|
3684
|
+
//
|
|
3685
|
+
context.addScope('fileStorage', {
|
|
3686
|
+
getFiles: async (entityType, entityId) => {
|
|
3687
|
+
console.log('getFiles', entityType, entityId);
|
|
3688
|
+
const filesFromService = await this.fileStorageService.find({
|
|
3689
|
+
category: '',
|
|
3690
|
+
refId: entityId,
|
|
3691
|
+
refType: entityType,
|
|
3692
|
+
});
|
|
3693
|
+
const mappedFiles = filesFromService?.map((file) => ({
|
|
3694
|
+
id: file.id ?? '',
|
|
3695
|
+
name: file.name,
|
|
3696
|
+
size: file.size,
|
|
3697
|
+
status: 'remote',
|
|
3698
|
+
source: {
|
|
3699
|
+
kind: 'fileId',
|
|
3700
|
+
value: file.fileId,
|
|
3701
|
+
},
|
|
3702
|
+
}));
|
|
3703
|
+
return mappedFiles;
|
|
3704
|
+
},
|
|
3705
|
+
});
|
|
3706
|
+
}
|
|
3707
|
+
}
|
|
3708
|
+
|
|
2808
3709
|
class AXPCommonModule {
|
|
2809
3710
|
static forRoot(configs) {
|
|
2810
3711
|
return {
|
|
@@ -2846,12 +3747,12 @@ class AXPCommonModule {
|
|
|
2846
3747
|
f();
|
|
2847
3748
|
});
|
|
2848
3749
|
}
|
|
2849
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2850
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
3750
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, deps: [{ token: 'AXPCommonModuleFactory' }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3751
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, imports: [i1.AXPWorkflowModule, AXPopupModule,
|
|
2851
3752
|
AXDateTimeModule,
|
|
2852
3753
|
AXToastModule,
|
|
2853
3754
|
AXPModuleManifestModule], exports: [RouterModule] }); }
|
|
2854
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
3755
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, providers: [
|
|
2855
3756
|
AXPAppStartUpProvider,
|
|
2856
3757
|
{
|
|
2857
3758
|
provide: ErrorHandler,
|
|
@@ -2880,11 +3781,21 @@ class AXPCommonModule {
|
|
|
2880
3781
|
useClass: AXPTokenEvaluatorScopeProvider,
|
|
2881
3782
|
multi: true,
|
|
2882
3783
|
},
|
|
3784
|
+
{
|
|
3785
|
+
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
3786
|
+
useClass: AXPSettingsEvaluatorScopeProvider,
|
|
3787
|
+
multi: true,
|
|
3788
|
+
},
|
|
3789
|
+
{
|
|
3790
|
+
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
3791
|
+
useClass: AXPFileStorageEvaluatorScopeProvider,
|
|
3792
|
+
multi: true,
|
|
3793
|
+
},
|
|
2883
3794
|
{
|
|
2884
3795
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
2885
3796
|
useFactory: async () => {
|
|
2886
3797
|
const injector = inject(Injector);
|
|
2887
|
-
const provider = (await import('./acorex-platform-common-common-settings.provider-
|
|
3798
|
+
const provider = (await import('./acorex-platform-common-common-settings.provider-Bi1RYif5.mjs')).AXPCommonSettingProvider;
|
|
2888
3799
|
return new provider(injector);
|
|
2889
3800
|
},
|
|
2890
3801
|
multi: true,
|
|
@@ -2905,7 +3816,7 @@ class AXPCommonModule {
|
|
|
2905
3816
|
AXToastModule,
|
|
2906
3817
|
AXPModuleManifestModule, RouterModule] }); }
|
|
2907
3818
|
}
|
|
2908
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3819
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, decorators: [{
|
|
2909
3820
|
type: NgModule,
|
|
2910
3821
|
args: [{
|
|
2911
3822
|
imports: [
|
|
@@ -2955,11 +3866,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
2955
3866
|
useClass: AXPTokenEvaluatorScopeProvider,
|
|
2956
3867
|
multi: true,
|
|
2957
3868
|
},
|
|
3869
|
+
{
|
|
3870
|
+
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
3871
|
+
useClass: AXPSettingsEvaluatorScopeProvider,
|
|
3872
|
+
multi: true,
|
|
3873
|
+
},
|
|
3874
|
+
{
|
|
3875
|
+
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
3876
|
+
useClass: AXPFileStorageEvaluatorScopeProvider,
|
|
3877
|
+
multi: true,
|
|
3878
|
+
},
|
|
2958
3879
|
{
|
|
2959
3880
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
2960
3881
|
useFactory: async () => {
|
|
2961
3882
|
const injector = inject(Injector);
|
|
2962
|
-
const provider = (await import('./acorex-platform-common-common-settings.provider-
|
|
3883
|
+
const provider = (await import('./acorex-platform-common-common-settings.provider-Bi1RYif5.mjs')).AXPCommonSettingProvider;
|
|
2963
3884
|
return new provider(injector);
|
|
2964
3885
|
},
|
|
2965
3886
|
multi: true,
|
|
@@ -2991,22 +3912,165 @@ function configPlatform(config = AXPPlatformDefaultConfigs) {
|
|
|
2991
3912
|
|
|
2992
3913
|
const AXP_ROOT_CONFIG_TOKEN = new InjectionToken('AXP_ROOT_CONFIG_TOKEN');
|
|
2993
3914
|
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
3915
|
+
//#endregion
|
|
3916
|
+
//#region ---- Injection Token ----
|
|
3917
|
+
/**
|
|
3918
|
+
* Multi-provider injection token for file action providers.
|
|
3919
|
+
* Modules can provide multiple implementations using this token.
|
|
3920
|
+
*/
|
|
3921
|
+
const AXP_FILE_ACTION_PROVIDER = new InjectionToken('AXP_FILE_ACTION_PROVIDER');
|
|
3922
|
+
//#endregion
|
|
3923
|
+
|
|
3924
|
+
//#region ---- Service ----
|
|
3925
|
+
/**
|
|
3926
|
+
* Service for managing file uploader actions.
|
|
3927
|
+
* Aggregates actions from multiple providers and filters them based on plugin configuration.
|
|
3928
|
+
* Wraps the hook system for backward compatibility.
|
|
3929
|
+
*/
|
|
3930
|
+
class AXPFileActionsService {
|
|
3931
|
+
constructor() {
|
|
3932
|
+
//#region ---- Dependencies ----
|
|
3933
|
+
this.actionProviders = inject(AXP_FILE_ACTION_PROVIDER, { optional: true }) || [];
|
|
3934
|
+
this.hookService = inject(AXPHookService);
|
|
3935
|
+
this.injector = inject(Injector);
|
|
3936
|
+
}
|
|
3937
|
+
//#endregion
|
|
3938
|
+
//#region ---- Public API ----
|
|
3939
|
+
/**
|
|
3940
|
+
* Get all actions from providers, filtered based on plugin configuration.
|
|
3941
|
+
* Wraps the hook system for backward compatibility.
|
|
3942
|
+
* @param payload Initial payload with capabilities and plugin configuration.
|
|
3943
|
+
* @returns Filtered list of actions.
|
|
3944
|
+
*/
|
|
3945
|
+
async getActions(payload) {
|
|
3946
|
+
// First, run hook system for backward compatibility
|
|
3947
|
+
// Note: Hook system may still use old format with 'host', but we pass capabilities
|
|
3948
|
+
// Hook providers that need host will need to be migrated to use capabilities
|
|
3949
|
+
let hookPayload;
|
|
3950
|
+
try {
|
|
3951
|
+
hookPayload = await this.hookService.runAsync('file-uploader.actions', {
|
|
3952
|
+
...payload,
|
|
3953
|
+
// For backward compatibility, hooks might expect 'host' but we're using capabilities
|
|
3954
|
+
// Old hook providers will need to be migrated
|
|
3955
|
+
});
|
|
3956
|
+
}
|
|
3957
|
+
catch (err) {
|
|
3958
|
+
// If hook fails, continue with new system
|
|
3959
|
+
console.warn('[AXPFileActionsService] Hook system failed, continuing with providers only', err);
|
|
3960
|
+
}
|
|
3961
|
+
// Merge hook actions into payload (if any)
|
|
3962
|
+
const mergedPayload = {
|
|
3963
|
+
...payload,
|
|
3964
|
+
actions: hookPayload?.actions ?? payload.actions ?? [],
|
|
3965
|
+
};
|
|
3966
|
+
// Resolve all providers (handle both direct and Promise<provider>)
|
|
3967
|
+
const providers = await this.resolveProviders();
|
|
3968
|
+
// Filter providers by key
|
|
3969
|
+
const matchingProviders = providers
|
|
3970
|
+
.filter((p) => p.key === 'file-uploader.actions')
|
|
3971
|
+
.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
|
|
3972
|
+
// Execute providers sequentially (waterfall pattern)
|
|
3973
|
+
let currentPayload = { ...mergedPayload, actions: [...mergedPayload.actions] };
|
|
3974
|
+
for (const provider of matchingProviders) {
|
|
3975
|
+
try {
|
|
3976
|
+
currentPayload = await Promise.resolve(runInInjectionContext(this.injector, () => provider.execute(currentPayload)));
|
|
3977
|
+
}
|
|
3978
|
+
catch (err) {
|
|
3979
|
+
console.error(`[AXPFileActionsService] Provider '${provider.key}' failed`, err);
|
|
3980
|
+
}
|
|
3981
|
+
}
|
|
3982
|
+
// Filter actions based on plugin configuration
|
|
3983
|
+
return this.filterActions(currentPayload.actions, payload.plugins, payload.excludePlugins);
|
|
3984
|
+
}
|
|
3985
|
+
//#endregion
|
|
3986
|
+
//#region ---- Private Methods ----
|
|
3987
|
+
/**
|
|
3988
|
+
* Resolve all providers (handle both direct providers and Promise<provider>).
|
|
3989
|
+
*/
|
|
3990
|
+
async resolveProviders() {
|
|
3991
|
+
return Promise.all(this.actionProviders.map((p) => (p instanceof Promise ? p : Promise.resolve(p))));
|
|
3992
|
+
}
|
|
3993
|
+
/**
|
|
3994
|
+
* Filter actions based on enabled plugins and exclude list.
|
|
3995
|
+
*/
|
|
3996
|
+
filterActions(actions, enabledPlugins, excludePlugins) {
|
|
3997
|
+
const enabledPluginNames = enabledPlugins?.map((p) => p.name) ?? [];
|
|
3998
|
+
const excludedPluginNames = excludePlugins ?? [];
|
|
3999
|
+
return actions.filter((action) => {
|
|
4000
|
+
// Exclude if in exclude list
|
|
4001
|
+
if (excludedPluginNames.includes(action.plugin)) {
|
|
4002
|
+
return false;
|
|
4003
|
+
}
|
|
4004
|
+
// Include if global
|
|
4005
|
+
if (action.global === true) {
|
|
4006
|
+
return true;
|
|
4007
|
+
}
|
|
4008
|
+
// Include if plugin is explicitly enabled
|
|
4009
|
+
if (enabledPluginNames.length > 0 && enabledPluginNames.includes(action.plugin)) {
|
|
4010
|
+
return true;
|
|
4011
|
+
}
|
|
4012
|
+
// If no plugins are enabled, only show global actions
|
|
4013
|
+
if (enabledPluginNames.length === 0) {
|
|
4014
|
+
return !!action.global;
|
|
4015
|
+
}
|
|
4016
|
+
return false;
|
|
4017
|
+
});
|
|
4018
|
+
}
|
|
4019
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileActionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4020
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileActionsService, providedIn: 'root' }); }
|
|
2997
4021
|
}
|
|
2998
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2999
|
-
type: Injectable
|
|
4022
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileActionsService, decorators: [{
|
|
4023
|
+
type: Injectable,
|
|
4024
|
+
args: [{
|
|
4025
|
+
providedIn: 'root',
|
|
4026
|
+
}]
|
|
3000
4027
|
}] });
|
|
3001
4028
|
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
4029
|
+
//#endregion
|
|
4030
|
+
|
|
4031
|
+
const UploadFromComputerActionProvider = {
|
|
4032
|
+
key: 'file-uploader.actions',
|
|
4033
|
+
priority: 1, // Higher priority than upload-from-drive to show first
|
|
4034
|
+
execute: (payload) => {
|
|
4035
|
+
const fileService = inject(AXFileService);
|
|
4036
|
+
// Capture widget options for use in the action
|
|
4037
|
+
const widgetOptions = payload.options;
|
|
4038
|
+
payload.actions = [
|
|
4039
|
+
...payload.actions,
|
|
4040
|
+
{
|
|
4041
|
+
plugin: 'upload-from-computer',
|
|
4042
|
+
global: true,
|
|
4043
|
+
textKey: '@document-management:actions.upload-from-device',
|
|
4044
|
+
icon: 'fa-light fa-file-arrow-up',
|
|
4045
|
+
run: async (capabilities) => {
|
|
4046
|
+
// Open file picker with widget options
|
|
4047
|
+
const files = await fileService.choose({
|
|
4048
|
+
multiple: widgetOptions?.multiple ?? true,
|
|
4049
|
+
accept: widgetOptions?.accept,
|
|
4050
|
+
});
|
|
4051
|
+
// If no files are selected, return
|
|
4052
|
+
if (files.length === 0) {
|
|
4053
|
+
return;
|
|
4054
|
+
}
|
|
4055
|
+
// Create file list items from selected files
|
|
4056
|
+
const fileItems = files.map((file) => ({
|
|
4057
|
+
id: AXPDataGenerator.uuid(),
|
|
4058
|
+
name: file.name,
|
|
4059
|
+
size: file.size,
|
|
4060
|
+
status: 'attached',
|
|
4061
|
+
source: {
|
|
4062
|
+
kind: 'blob',
|
|
4063
|
+
value: file,
|
|
4064
|
+
},
|
|
4065
|
+
}));
|
|
4066
|
+
// Add files using capabilities
|
|
4067
|
+
capabilities.addFiles(fileItems);
|
|
4068
|
+
},
|
|
4069
|
+
},
|
|
4070
|
+
];
|
|
4071
|
+
return payload;
|
|
4072
|
+
},
|
|
4073
|
+
};
|
|
3010
4074
|
|
|
3011
4075
|
const AXP_FILE_TYPE_INFO_PROVIDER = new InjectionToken('AXP_FILE_TYPE_INFO_PROVIDER');
|
|
3012
4076
|
class AXPFileTypeProviderService {
|
|
@@ -3025,19 +4089,19 @@ class AXPFileTypeProviderService {
|
|
|
3025
4089
|
async get(name) {
|
|
3026
4090
|
return (await this.items()).find((c) => c.name == name);
|
|
3027
4091
|
}
|
|
3028
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3029
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4092
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileTypeProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4093
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileTypeProviderService, providedIn: 'root' }); }
|
|
3030
4094
|
}
|
|
3031
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4095
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileTypeProviderService, decorators: [{
|
|
3032
4096
|
type: Injectable,
|
|
3033
4097
|
args: [{ providedIn: 'root' }]
|
|
3034
4098
|
}] });
|
|
3035
4099
|
|
|
3036
4100
|
class AXPLockService {
|
|
3037
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3038
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4102
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLockService }); }
|
|
3039
4103
|
}
|
|
3040
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLockService, decorators: [{
|
|
3041
4105
|
type: Injectable
|
|
3042
4106
|
}] });
|
|
3043
4107
|
|
|
@@ -3090,7 +4154,7 @@ const AXP_STATUS_PROVIDERS = new InjectionToken('AXP_STATUS_PROVIDERS');
|
|
|
3090
4154
|
* }
|
|
3091
4155
|
*
|
|
3092
4156
|
* // Later, get the status:
|
|
3093
|
-
* const status = statusService.getStatus('task-management.status');
|
|
4157
|
+
* const status = await statusService.getStatus('task-management.status');
|
|
3094
4158
|
* if (status) {
|
|
3095
4159
|
* console.log('Statuses:', status.statuses);
|
|
3096
4160
|
* console.log('Transitions:', status.transitions);
|
|
@@ -3098,8 +4162,6 @@ const AXP_STATUS_PROVIDERS = new InjectionToken('AXP_STATUS_PROVIDERS');
|
|
|
3098
4162
|
* ```
|
|
3099
4163
|
*/
|
|
3100
4164
|
class AXPStatusDefinitionProviderService {
|
|
3101
|
-
//#endregion
|
|
3102
|
-
//#region ---- Initialization ----
|
|
3103
4165
|
constructor() {
|
|
3104
4166
|
//#region ---- Dependencies ----
|
|
3105
4167
|
this.providers = inject(AXP_STATUS_PROVIDERS, { optional: true }) ?? [];
|
|
@@ -3109,8 +4171,9 @@ class AXPStatusDefinitionProviderService {
|
|
|
3109
4171
|
this.statusMap = new Map();
|
|
3110
4172
|
this.initializationPromise = null;
|
|
3111
4173
|
this.isInitialized = false;
|
|
3112
|
-
this.initialize();
|
|
3113
4174
|
}
|
|
4175
|
+
//#endregion
|
|
4176
|
+
//#region ---- Initialization ----
|
|
3114
4177
|
/**
|
|
3115
4178
|
* Initialize providers (resolve promises if needed)
|
|
3116
4179
|
* Called lazily on first access
|
|
@@ -3148,22 +4211,22 @@ class AXPStatusDefinitionProviderService {
|
|
|
3148
4211
|
//#region ---- Public API ----
|
|
3149
4212
|
/**
|
|
3150
4213
|
* Get a status provider by key
|
|
3151
|
-
*
|
|
3152
|
-
* including lazy-loaded providers (promises) which are resolved during initialization.
|
|
4214
|
+
* Ensures initialization is complete before accessing the status map.
|
|
3153
4215
|
*
|
|
3154
4216
|
* @param key - Status key (e.g., 'task-management.status')
|
|
3155
|
-
* @returns
|
|
4217
|
+
* @returns Promise that resolves to status provider with all statuses and transitions, or undefined if not found
|
|
3156
4218
|
*
|
|
3157
4219
|
* @example
|
|
3158
4220
|
* ```typescript
|
|
3159
|
-
* const status = statusService.getStatus('task-management.status');
|
|
4221
|
+
* const status = await statusService.getStatus('task-management.status');
|
|
3160
4222
|
* if (status) {
|
|
3161
4223
|
* console.log('Statuses:', status.statuses);
|
|
3162
4224
|
* console.log('Transitions:', status.transitions);
|
|
3163
4225
|
* }
|
|
3164
4226
|
* ```
|
|
3165
4227
|
*/
|
|
3166
|
-
getStatus(key) {
|
|
4228
|
+
async getStatus(key) {
|
|
4229
|
+
await this.initialize();
|
|
3167
4230
|
return this.statusMap.get(key);
|
|
3168
4231
|
}
|
|
3169
4232
|
/**
|
|
@@ -3208,7 +4271,7 @@ class AXPStatusDefinitionProviderService {
|
|
|
3208
4271
|
}
|
|
3209
4272
|
else {
|
|
3210
4273
|
// Use default Entity:UpdateStatus command
|
|
3211
|
-
const entity = context['entityName'] ?? context['__meta__']?.config?.name;
|
|
4274
|
+
const entity = context['entity'] ?? context['entityName'] ?? context['__meta__']?.config?.name;
|
|
3212
4275
|
if (!entity) {
|
|
3213
4276
|
throw new Error('Entity name is required in context when using default status update command');
|
|
3214
4277
|
}
|
|
@@ -3221,7 +4284,7 @@ class AXPStatusDefinitionProviderService {
|
|
|
3221
4284
|
commandOptions = {
|
|
3222
4285
|
entity,
|
|
3223
4286
|
status: transition.to,
|
|
3224
|
-
statusField: context['statusField'] ?? 'statusId',
|
|
4287
|
+
statusField: context['statusField'] ?? context['fieldName'] ?? 'statusId',
|
|
3225
4288
|
...(id ? { id } : {}),
|
|
3226
4289
|
...(ids ? { ids } : {}),
|
|
3227
4290
|
};
|
|
@@ -3229,7 +4292,8 @@ class AXPStatusDefinitionProviderService {
|
|
|
3229
4292
|
// Execute the command
|
|
3230
4293
|
const result = await this.commandService.execute(commandName, commandOptions);
|
|
3231
4294
|
if (!result?.success) {
|
|
3232
|
-
|
|
4295
|
+
const text = this.commandMessageTextForError(result?.message?.text);
|
|
4296
|
+
throw new Error(text || 'Failed to execute status transition command');
|
|
3233
4297
|
}
|
|
3234
4298
|
}
|
|
3235
4299
|
/**
|
|
@@ -3239,13 +4303,30 @@ class AXPStatusDefinitionProviderService {
|
|
|
3239
4303
|
isValidTransition(provider, from, to) {
|
|
3240
4304
|
return provider.transitions.some((transition) => transition.from === from && transition.to === to);
|
|
3241
4305
|
}
|
|
3242
|
-
|
|
3243
|
-
|
|
4306
|
+
/**
|
|
4307
|
+
* Best-effort plain string for {@link Error} messages (no i18n lookup).
|
|
4308
|
+
*/
|
|
4309
|
+
commandMessageTextForError(value) {
|
|
4310
|
+
if (value == null) {
|
|
4311
|
+
return '';
|
|
4312
|
+
}
|
|
4313
|
+
if (typeof value === 'string') {
|
|
4314
|
+
return value;
|
|
4315
|
+
}
|
|
4316
|
+
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
4317
|
+
const values = Object.values(value);
|
|
4318
|
+
const first = values.find((v) => typeof v === 'string' && v.length > 0);
|
|
4319
|
+
return first ?? '';
|
|
4320
|
+
}
|
|
4321
|
+
return String(value);
|
|
4322
|
+
}
|
|
4323
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStatusDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4324
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStatusDefinitionProviderService, providedIn: 'root' }); }
|
|
3244
4325
|
}
|
|
3245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStatusDefinitionProviderService, decorators: [{
|
|
3246
4327
|
type: Injectable,
|
|
3247
4328
|
args: [{ providedIn: 'root' }]
|
|
3248
|
-
}]
|
|
4329
|
+
}] });
|
|
3249
4330
|
|
|
3250
4331
|
/**
|
|
3251
4332
|
* Standard system status types
|
|
@@ -3263,6 +4344,7 @@ var AXPSystemStatusType;
|
|
|
3263
4344
|
AXPSystemStatusType["Cancelled"] = "cancelled";
|
|
3264
4345
|
AXPSystemStatusType["Draft"] = "draft";
|
|
3265
4346
|
AXPSystemStatusType["PendingReview"] = "pending-review";
|
|
4347
|
+
AXPSystemStatusType["WaitingSignOff"] = "waiting-sign-off";
|
|
3266
4348
|
AXPSystemStatusType["Approved"] = "approved";
|
|
3267
4349
|
AXPSystemStatusType["Published"] = "published";
|
|
3268
4350
|
AXPSystemStatusType["Archived"] = "archived";
|
|
@@ -3383,6 +4465,16 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
3383
4465
|
isInitial: false,
|
|
3384
4466
|
isFinal: false,
|
|
3385
4467
|
},
|
|
4468
|
+
WaitingSignOff: {
|
|
4469
|
+
name: AXPSystemStatusType.WaitingSignOff,
|
|
4470
|
+
title: i18n('waiting-sign-off.title'),
|
|
4471
|
+
icon: 'fa-light fa-clock',
|
|
4472
|
+
color: 'warning',
|
|
4473
|
+
description: i18n('waiting-sign-off.description'),
|
|
4474
|
+
order: 3,
|
|
4475
|
+
isInitial: false,
|
|
4476
|
+
isFinal: false,
|
|
4477
|
+
},
|
|
3386
4478
|
Approved: {
|
|
3387
4479
|
name: AXPSystemStatusType.Approved,
|
|
3388
4480
|
title: i18n('approved.title'),
|
|
@@ -3589,10 +4681,10 @@ class AXPClipBoardService {
|
|
|
3589
4681
|
navigator.clipboard.writeText(value);
|
|
3590
4682
|
this.toast.success(`${title} copied!`);
|
|
3591
4683
|
}
|
|
3592
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3593
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4684
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPClipBoardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4685
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPClipBoardService, providedIn: 'root' }); }
|
|
3594
4686
|
}
|
|
3595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4687
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPClipBoardService, decorators: [{
|
|
3596
4688
|
type: Injectable,
|
|
3597
4689
|
args: [{
|
|
3598
4690
|
providedIn: 'root',
|
|
@@ -3706,10 +4798,10 @@ class AXPDebugService {
|
|
|
3706
4798
|
console.error('[AXPDebugService] Failed to display user access info:', error);
|
|
3707
4799
|
}
|
|
3708
4800
|
}
|
|
3709
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3710
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4801
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDebugService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4802
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDebugService, providedIn: 'root' }); }
|
|
3711
4803
|
}
|
|
3712
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDebugService, decorators: [{
|
|
3713
4805
|
type: Injectable,
|
|
3714
4806
|
args: [{
|
|
3715
4807
|
providedIn: 'root',
|
|
@@ -3719,15 +4811,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
3719
4811
|
class AXMOrgChartPrintPage extends AXBasePageComponent {
|
|
3720
4812
|
constructor() {
|
|
3721
4813
|
super(...arguments);
|
|
3722
|
-
this.ratio = signal(false, ...(ngDevMode ? [{ debugName: "ratio" }] : []));
|
|
3723
|
-
this.baseWidth = signal(undefined, ...(ngDevMode ? [{ debugName: "baseWidth" }] : []));
|
|
3724
|
-
this.baseHeight = signal(undefined, ...(ngDevMode ? [{ debugName: "baseHeight" }] : []));
|
|
3725
|
-
this.bgcolor = model(...(ngDevMode ? [undefined, { debugName: "bgcolor" }] : []));
|
|
3726
|
-
this.width = model(...(ngDevMode ? [undefined, { debugName: "width" }] : []));
|
|
3727
|
-
this.height = model(...(ngDevMode ? [undefined, { debugName: "height" }] : []));
|
|
3728
|
-
this.quality = model(...(ngDevMode ? [undefined, { debugName: "quality" }] : []));
|
|
3729
|
-
this.qualityComputed = linkedSignal(() => (this.data.quality ?? 1) * 100, ...(ngDevMode ? [{ debugName: "qualityComputed" }] : []));
|
|
3730
|
-
this.scale = model(...(ngDevMode ? [undefined, { debugName: "scale" }] : []));
|
|
4814
|
+
this.ratio = signal(false, ...(ngDevMode ? [{ debugName: "ratio" }] : /* istanbul ignore next */ []));
|
|
4815
|
+
this.baseWidth = signal(undefined, ...(ngDevMode ? [{ debugName: "baseWidth" }] : /* istanbul ignore next */ []));
|
|
4816
|
+
this.baseHeight = signal(undefined, ...(ngDevMode ? [{ debugName: "baseHeight" }] : /* istanbul ignore next */ []));
|
|
4817
|
+
this.bgcolor = model(...(ngDevMode ? [undefined, { debugName: "bgcolor" }] : /* istanbul ignore next */ []));
|
|
4818
|
+
this.width = model(...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
|
|
4819
|
+
this.height = model(...(ngDevMode ? [undefined, { debugName: "height" }] : /* istanbul ignore next */ []));
|
|
4820
|
+
this.quality = model(...(ngDevMode ? [undefined, { debugName: "quality" }] : /* istanbul ignore next */ []));
|
|
4821
|
+
this.qualityComputed = linkedSignal(() => (this.data.quality ?? 1) * 100, ...(ngDevMode ? [{ debugName: "qualityComputed" }] : /* istanbul ignore next */ []));
|
|
4822
|
+
this.scale = model(...(ngDevMode ? [undefined, { debugName: "scale" }] : /* istanbul ignore next */ []));
|
|
3731
4823
|
this.#init = afterNextRender(() => {
|
|
3732
4824
|
this.bgcolor.set(this.data.bgcolor);
|
|
3733
4825
|
this.width.set(this.data.width);
|
|
@@ -3764,8 +4856,8 @@ class AXMOrgChartPrintPage extends AXBasePageComponent {
|
|
|
3764
4856
|
isCanceled,
|
|
3765
4857
|
});
|
|
3766
4858
|
}
|
|
3767
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3768
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
4859
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOrgChartPrintPage, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4860
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AXMOrgChartPrintPage, isStandalone: true, selector: "ng-component", inputs: { bgcolor: { classPropertyName: "bgcolor", publicName: "bgcolor", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, quality: { classPropertyName: "quality", publicName: "quality", isSignal: true, isRequired: false, transformFunction: null }, scale: { classPropertyName: "scale", publicName: "scale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { bgcolor: "bgcolorChange", width: "widthChange", height: "heightChange", quality: "qualityChange", scale: "scaleChange" }, usesInheritance: true, ngImport: i0, template: ` <div class="ax-grid ax-grid-cols-[auto_18rem] ax-gap-4 ax-justify-center ax-p-4 ax-items-center">
|
|
3769
4861
|
<ax-label>Resolution (px)</ax-label>
|
|
3770
4862
|
<div class="ax-flex ax-gap-2 ax-items-center">
|
|
3771
4863
|
<ax-number-box
|
|
@@ -3816,7 +4908,7 @@ class AXMOrgChartPrintPage extends AXBasePageComponent {
|
|
|
3816
4908
|
</ax-suffix>
|
|
3817
4909
|
</ax-footer>`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXNumberBoxModule }, { kind: "component", type: i2.AXNumberBoxComponent, selector: "ax-number-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "minValue", "maxValue", "showSpinButtons", "thousandsSeparator", "decimals", "changeOnScroll", "step"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "thousandsSeparatorChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.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: i5.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: AXColorBoxModule }, { kind: "component", type: i6.AXColorBoxComponent, selector: "ax-color-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "showBadge", "showValue", "showClearButton", "showIcon"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }] }); }
|
|
3818
4910
|
}
|
|
3819
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4911
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOrgChartPrintPage, decorators: [{
|
|
3820
4912
|
type: Component,
|
|
3821
4913
|
args: [{
|
|
3822
4914
|
template: ` <div class="ax-grid ax-grid-cols-[auto_18rem] ax-gap-4 ax-justify-center ax-p-4 ax-items-center">
|
|
@@ -3930,10 +5022,10 @@ class AXPExportService {
|
|
|
3930
5022
|
document.body.removeChild(link);
|
|
3931
5023
|
URL.revokeObjectURL(link.href);
|
|
3932
5024
|
}
|
|
3933
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3934
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
5025
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5026
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExportService, providedIn: 'root' }); }
|
|
3935
5027
|
}
|
|
3936
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5028
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExportService, decorators: [{
|
|
3937
5029
|
type: Injectable,
|
|
3938
5030
|
args: [{
|
|
3939
5031
|
providedIn: 'root',
|
|
@@ -3963,6 +5055,8 @@ function AXPCleanNestedFilters(filters) {
|
|
|
3963
5055
|
.filter(Boolean);
|
|
3964
5056
|
}
|
|
3965
5057
|
|
|
5058
|
+
const AXP_LOCALE_MANAGEMENT_PORT = new InjectionToken('AXP_LOCALE_MANAGEMENT_PORT');
|
|
5059
|
+
|
|
3966
5060
|
//#region ---- Versioning Types ----
|
|
3967
5061
|
var AXVChangeType;
|
|
3968
5062
|
(function (AXVChangeType) {
|
|
@@ -3980,5 +5074,5 @@ class AXPVersioningService {
|
|
|
3980
5074
|
* Generated bundle index. Do not edit.
|
|
3981
5075
|
*/
|
|
3982
5076
|
|
|
3983
|
-
export { ALL_DEFAULT_OPERATORS, AXMWorkflowErrorHandler, AXPAppVersionService, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPCommonSettings, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataProvider, AXPDebugService, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityQueryType, AXPErrorHandlerRegistryService, AXPExportService, AXPFileStorageService, AXPFileStorageStatus, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPHomePageModule, AXPHomePageService, AXPLockService, AXPMenuMiddlewareRegistry, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPMenuVisibilityService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRegionalSetting, AXPRelationshipCardinality, AXPRelationshipKind, AXPReloadAction, AXPReloadEvent, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValuesAggregatorService, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingsService, AXPStatusDefinitionProviderService, AXPStatusProvider, AXPStickyDirective, AXPSystemStatusType, AXPSystemStatuses, AXPToastAction, AXPTokenDefinitionService, AXPTokenEvaluatorScopeProvider, AXPVersioningService, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_APP_VERSION_PROVIDER, AXP_FILE_TYPE_INFO_PROVIDER, AXP_HOME_PAGES, AXP_HOME_PAGE_DEFAULT_KEY, AXP_MENU_MIDDLEWARE, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFAULT_VALUES_PROVIDERS, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, AXP_STATUS_PROVIDERS, AXP_TOKEN_DEFINITION_PROVIDER, AXVChangeType, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IN_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, configPlatform, createAllQueryView, createMenuContext, createMenuMiddleware, createQueryView, getEntityInfo, getStatusInfo, getSystemStatus, provideDynamicHomePage, provideMenuMiddleware, resolveStatusLook, systemStatusToDefinition };
|
|
5077
|
+
export { ALL_DEFAULT_OPERATORS, AXMWorkflowErrorHandler, AXPAppVersionService, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPCommonSettings, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataProvider, AXPDebugService, AXPDefaultMultiLanguageConfigService, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityQueryType, AXPEntityType, AXPErrorHandlerRegistryService, AXPExportService, AXPFileActionsService, AXPFileStorageEvaluatorScopeProvider, AXPFileStorageService, AXPFileStorageStatus, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPHomePageModule, AXPHomePageService, AXPLockService, AXPMenuItemsDataSourceDefinition, AXPMenuMiddlewareRegistry, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPMenuVisibilityService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPOutputContractTranscriptSegmentService, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRegionalSetting, AXPRelationshipCardinality, AXPRelationshipKind, AXPReloadAction, AXPReloadEvent, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValuesAggregatorService, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingsEvaluatorScopeProvider, AXPSettingsService, AXPStatusDefinitionProviderService, AXPStatusProvider, AXPStickyDirective, AXPSystemStatusType, AXPSystemStatuses, AXPToastAction, AXPTokenDefinitionService, AXPTokenEvaluatorScopeProvider, AXPVersioningService, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_AGENT_OUTPUT_CONTRACT_DEFAULT_STRUCTURED_RETRIES, AXP_APP_VERSION_PROVIDER, AXP_FILE_ACTION_PROVIDER, AXP_FILE_TYPE_INFO_PROVIDER, AXP_HOME_PAGES, AXP_HOME_PAGE_DEFAULT_KEY, AXP_LOCALE_MANAGEMENT_PORT, AXP_MENU_MIDDLEWARE, AXP_MENU_PROVIDER, AXP_OUTPUT_CONTRACT_TRANSCRIPT_SEGMENT_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFAULT_VALUES_PROVIDERS, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, AXP_STATUS_PROVIDERS, AXP_TOKEN_DEFINITION_PROVIDER, AXVChangeType, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, DEFAULT_DATE_FILTER_PRESETS, DEFAULT_MULTILANGUAGE_FIELD_NAMES, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IN_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, MENU_ITEMS_DATASOURCE_NAME, MULTILANGUAGE_CAPABLE_WIDGET_TYPES, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, UploadFromComputerActionProvider, applyDateFilterPreset, coerceAXPSettingRawValue, coerceAXPSettingRawValueByKind, configPlatform, createAllQueryView, createEntityCommandOptions, createEntitySearchCommand, createMenuContext, createMenuMiddleware, createQueryView, findManualPresetIdByOperation, getEntityInfo, getStatusInfo, getSystemStatus, inferSettingCoercionKind, isCardFieldBadgeDisplay, peelSettingValueKey, provideDynamicHomePage, provideMenuMiddleware, resolveCardFieldBadgeColor, resolveDateFilterPresets, resolveDefaultMasterListLayout, resolveEnabledMasterListLayouts, resolveStatusLook, shouldApplyDefaultMultiLanguageToEntityProperty, shouldApplyDefaultMultiLanguageToWidgetNode, shouldApplyDefaultMultiLanguageToWidgetProperty, systemStatusToDefinition, withDefaultMultiLanguageOnWidgetNodeTree, withDefaultMultiLanguageOnWidgetProperty };
|
|
3984
5078
|
//# sourceMappingURL=acorex-platform-common.mjs.map
|