@acorex/platform 21.0.0-next.5 → 21.0.0-next.51
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 +1047 -263
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +1138 -510
- 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 +804 -186
- 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 +6208 -2344
- 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.mjs +18632 -10286
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +538 -168
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +720 -456
- 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-file-list-popup.component-CDYAGBku.mjs +103 -0
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.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-BGO75IMz.mjs +116 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.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-DmzNTYiS.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.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-BNG_588B.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.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 +8728 -4269
- 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-Cx1lLUaR.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.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-BfCeUU5F.mjs} +19 -26
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.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 +1836 -67
- 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-DK6R87Lf.mjs} +24 -25
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DK6R87Lf.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 +674 -573
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +1715 -535
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/package.json +37 -37
- package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +241 -4
- package/{common/index.d.ts → types/acorex-platform-common.d.ts} +598 -80
- package/{core/index.d.ts → types/acorex-platform-core.d.ts} +595 -132
- 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} +193 -48
- package/types/acorex-platform-layout-components.d.ts +2979 -0
- package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +96 -18
- package/{layout/entity/index.d.ts → types/acorex-platform-layout-entity.d.ts} +1601 -261
- package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +116 -55
- package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +272 -124
- package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +1055 -157
- 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} +122 -5
- package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +1 -1
- package/types/acorex-platform-workflow.d.ts +1884 -0
- 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-DyDa_hyd.mjs +0 -1542
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.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/runtime/index.d.ts +0 -307
- package/workflow/index.d.ts +0 -1808
- /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';
|
|
@@ -54,10 +56,10 @@ class AXPAppVersionService {
|
|
|
54
56
|
async getAppVersion() {
|
|
55
57
|
return this.provider.provider();
|
|
56
58
|
}
|
|
57
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
58
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
59
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAppVersionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
60
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAppVersionService, providedIn: 'root' }); }
|
|
59
61
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAppVersionService, decorators: [{
|
|
61
63
|
type: Injectable,
|
|
62
64
|
args: [{
|
|
63
65
|
providedIn: 'root',
|
|
@@ -126,6 +128,13 @@ function createAllQueryView(params = {
|
|
|
126
128
|
sorts: params.sorts ?? [],
|
|
127
129
|
});
|
|
128
130
|
}
|
|
131
|
+
// new version
|
|
132
|
+
var AXPEntityType;
|
|
133
|
+
(function (AXPEntityType) {
|
|
134
|
+
AXPEntityType[AXPEntityType["Entity"] = 0] = "Entity";
|
|
135
|
+
AXPEntityType[AXPEntityType["AggregateRoot"] = 1] = "AggregateRoot";
|
|
136
|
+
AXPEntityType[AXPEntityType["ValueObject"] = 2] = "ValueObject";
|
|
137
|
+
})(AXPEntityType || (AXPEntityType = {}));
|
|
129
138
|
|
|
130
139
|
const EQ_OPER = { name: 'equal', title: '@general:terms.operators.equal', hasValue: true };
|
|
131
140
|
const NOT_EQ_OPER = { name: 'notEqual', title: '@general:terms.operators.not-equal', hasValue: true };
|
|
@@ -200,15 +209,46 @@ const AXP_HOME_PAGE_DEFAULT_KEY = new InjectionToken('AXP_HOME_PAGE_DEFAULT_KEY'
|
|
|
200
209
|
factory: () => 'home'
|
|
201
210
|
});
|
|
202
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Regional and locale-related setting keys used by platform widgets and components.
|
|
214
|
+
* Most values use the `LocaleManagement:Setting:Regional.*` prefix; definitions live in the locale-management module where applicable.
|
|
215
|
+
*/
|
|
216
|
+
var AXPRegionalSetting;
|
|
217
|
+
(function (AXPRegionalSetting) {
|
|
218
|
+
AXPRegionalSetting["LocaleProfile"] = "LocaleManagement:Setting:Regional.LocaleProfile";
|
|
219
|
+
AXPRegionalSetting["TimeZone"] = "LocaleManagement:Setting:Regional.TimeZone";
|
|
220
|
+
AXPRegionalSetting["Language"] = "LocaleManagement:Setting:Regional.Language";
|
|
221
|
+
AXPRegionalSetting["Country"] = "LocaleManagement:Setting:Regional.Country";
|
|
222
|
+
AXPRegionalSetting["Calendar"] = "LocaleManagement:Setting:Regional.Calendar";
|
|
223
|
+
AXPRegionalSetting["FirstDayOfWeek"] = "LocaleManagement:Setting:Regional.FirstDayOfWeek";
|
|
224
|
+
AXPRegionalSetting["WeekendDays"] = "LocaleManagement:Setting:Regional.WeekendDays";
|
|
225
|
+
AXPRegionalSetting["ShortDate"] = "LocaleManagement:Setting:Regional.ShortDate";
|
|
226
|
+
AXPRegionalSetting["MediumDate"] = "LocaleManagement:Setting:Regional.MediumDate";
|
|
227
|
+
AXPRegionalSetting["LongDate"] = "LocaleManagement:Setting:Regional.LongDate";
|
|
228
|
+
AXPRegionalSetting["ShortTime"] = "LocaleManagement:Setting:Regional.ShortTime";
|
|
229
|
+
AXPRegionalSetting["MediumTime"] = "LocaleManagement:Setting:Regional.MediumTime";
|
|
230
|
+
AXPRegionalSetting["LongTime"] = "LocaleManagement:Setting:Regional.LongTime";
|
|
231
|
+
AXPRegionalSetting["MeasurementUnits"] = "LocaleManagement:Setting:Regional.MeasurementUnits";
|
|
232
|
+
AXPRegionalSetting["TemperatureUnits"] = "LocaleManagement:Setting:Regional.TemperatureUnits";
|
|
233
|
+
AXPRegionalSetting["DistanceUnits"] = "LocaleManagement:Setting:Regional.DistanceUnits";
|
|
234
|
+
AXPRegionalSetting["WeightUnits"] = "LocaleManagement:Setting:Regional.WeightUnits";
|
|
235
|
+
AXPRegionalSetting["VolumeUnits"] = "LocaleManagement:Setting:Regional.VolumeUnits";
|
|
236
|
+
AXPRegionalSetting["SpeedUnits"] = "LocaleManagement:Setting:Regional.SpeedUnits";
|
|
237
|
+
AXPRegionalSetting["AreaUnits"] = "LocaleManagement:Setting:Regional.AreaUnits";
|
|
238
|
+
/** Default multi-language behavior for standard text field names; defined in locale-management `AXMRegionalSettingProvider`. */
|
|
239
|
+
AXPRegionalSetting["MultiLanguageSupport"] = "LocaleManagement:Setting:Regional.MultiLanguageSupport";
|
|
240
|
+
})(AXPRegionalSetting || (AXPRegionalSetting = {}));
|
|
241
|
+
|
|
203
242
|
class AXPSettingDefinitionProviderContext {
|
|
204
243
|
constructor() {
|
|
205
244
|
this.rootGroups = [];
|
|
206
245
|
this.groupMap = new Map();
|
|
207
246
|
}
|
|
208
|
-
addGroup(name, title, description, icon) {
|
|
247
|
+
addGroup(name, title, description, icon, pageTitle) {
|
|
209
248
|
const newGroup = {
|
|
210
249
|
name,
|
|
211
250
|
title,
|
|
251
|
+
pageTitle,
|
|
212
252
|
description,
|
|
213
253
|
icon,
|
|
214
254
|
groups: [],
|
|
@@ -259,10 +299,11 @@ class AXPSettingDefinitionGroupBuilder {
|
|
|
259
299
|
}
|
|
260
300
|
return new AXPSettingDefinitionSectionBuilder(this, foundSection);
|
|
261
301
|
}
|
|
262
|
-
addGroup(name, title, description, icon) {
|
|
302
|
+
addGroup(name, title, description, icon, pageTitle) {
|
|
263
303
|
const newGroup = {
|
|
264
304
|
name,
|
|
265
305
|
title,
|
|
306
|
+
pageTitle,
|
|
266
307
|
description: description,
|
|
267
308
|
icon,
|
|
268
309
|
groups: [],
|
|
@@ -289,11 +330,12 @@ class AXPSettingDefinitionSectionBuilder {
|
|
|
289
330
|
name: setting.key,
|
|
290
331
|
title: setting.title,
|
|
291
332
|
description: setting.description,
|
|
333
|
+
searchTagKeys: setting.searchTagKeys,
|
|
292
334
|
isRequired: setting.isRequired ?? false,
|
|
293
335
|
isInherited: setting.isInherited ?? false,
|
|
294
336
|
isEncrypted: setting.isEncrypted ?? false,
|
|
295
337
|
defaultValue: setting.defaultValue,
|
|
296
|
-
scope: setting.scope ?? '
|
|
338
|
+
scope: setting.scope ?? 'P',
|
|
297
339
|
layout: setting.widget.layout,
|
|
298
340
|
widget: {
|
|
299
341
|
type: setting.widget.type,
|
|
@@ -356,13 +398,14 @@ class AXPSettingDefinitionProviderService {
|
|
|
356
398
|
if (!this.cache) {
|
|
357
399
|
return [];
|
|
358
400
|
}
|
|
359
|
-
const scopeOrder = ['
|
|
401
|
+
const scopeOrder = ['P', 'T', 'U']; // Scopes hierarchy in ascending order
|
|
360
402
|
const filterByScope = (groups, currentScope) => {
|
|
361
403
|
const currentScopeIndex = scopeOrder.indexOf(currentScope);
|
|
362
404
|
return groups
|
|
363
405
|
.map((group) => ({
|
|
364
406
|
...group,
|
|
365
|
-
sections: group.sections
|
|
407
|
+
sections: group.sections
|
|
408
|
+
.map((section) => ({
|
|
366
409
|
...section,
|
|
367
410
|
settings: section.settings.filter((setting) => {
|
|
368
411
|
const settingScopeIndex = scopeOrder.indexOf(setting.scope);
|
|
@@ -379,7 +422,8 @@ class AXPSettingDefinitionProviderService {
|
|
|
379
422
|
// 3. Exclude settings with a lower or irrelevant scope.
|
|
380
423
|
return false;
|
|
381
424
|
}),
|
|
382
|
-
}))
|
|
425
|
+
}))
|
|
426
|
+
.filter((section) => section.settings.length > 0), // Keep only sections with settings
|
|
383
427
|
groups: filterByScope(group.groups, currentScope), // Recursively filter nested groups
|
|
384
428
|
}))
|
|
385
429
|
.filter((group) => group.sections.length > 0 || group.groups.length > 0); // Keep groups with valid sections or nested groups
|
|
@@ -406,12 +450,33 @@ class AXPSettingDefinitionProviderService {
|
|
|
406
450
|
collectDefaults(this.cache);
|
|
407
451
|
return defaults;
|
|
408
452
|
}
|
|
453
|
+
async settingScopeByKey() {
|
|
454
|
+
const scopes = {};
|
|
455
|
+
const collect = (groups) => {
|
|
456
|
+
groups.forEach((group) => {
|
|
457
|
+
group.sections.forEach((section) => {
|
|
458
|
+
section.settings.forEach((setting) => {
|
|
459
|
+
scopes[setting.name] = setting.scope;
|
|
460
|
+
});
|
|
461
|
+
});
|
|
462
|
+
collect(group.groups);
|
|
463
|
+
});
|
|
464
|
+
};
|
|
465
|
+
if (!this.cache) {
|
|
466
|
+
await this.load();
|
|
467
|
+
}
|
|
468
|
+
collect(this.cache);
|
|
469
|
+
return scopes;
|
|
470
|
+
}
|
|
409
471
|
findGroup(scope, groupName) {
|
|
410
472
|
return this.searchRecursive(this.getList(scope), groupName, []); // Initialize with an empty breadcrumb
|
|
411
473
|
}
|
|
412
474
|
searchRecursive(groups, groupName, breadcrumb) {
|
|
413
475
|
for (const group of groups) {
|
|
414
|
-
const currentBreadcrumb = [
|
|
476
|
+
const currentBreadcrumb = [
|
|
477
|
+
...breadcrumb,
|
|
478
|
+
{ name: group.name, title: group.title, description: group.description },
|
|
479
|
+
];
|
|
415
480
|
// If the group name matches, return its details
|
|
416
481
|
if (group.name === groupName) {
|
|
417
482
|
return {
|
|
@@ -430,13 +495,13 @@ class AXPSettingDefinitionProviderService {
|
|
|
430
495
|
return {
|
|
431
496
|
breadcrumb: [],
|
|
432
497
|
groups: [],
|
|
433
|
-
sections: []
|
|
498
|
+
sections: [],
|
|
434
499
|
};
|
|
435
500
|
}
|
|
436
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
437
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
501
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
502
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefinitionProviderService, providedIn: 'root' }); }
|
|
438
503
|
}
|
|
439
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
504
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefinitionProviderService, decorators: [{
|
|
440
505
|
type: Injectable,
|
|
441
506
|
args: [{ providedIn: 'root' }]
|
|
442
507
|
}] });
|
|
@@ -466,23 +531,88 @@ class AXPSettingDefaultValuesAggregatorService {
|
|
|
466
531
|
}
|
|
467
532
|
return merged;
|
|
468
533
|
}
|
|
469
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
470
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
534
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefaultValuesAggregatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
535
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefaultValuesAggregatorService, providedIn: 'root' }); }
|
|
471
536
|
}
|
|
472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefaultValuesAggregatorService, decorators: [{
|
|
473
538
|
type: Injectable,
|
|
474
539
|
args: [{ providedIn: 'root' }]
|
|
475
540
|
}] });
|
|
476
541
|
|
|
542
|
+
//#region ---- Imports ----
|
|
543
|
+
//#endregion
|
|
544
|
+
//#region ---- Kind inference ----
|
|
545
|
+
/**
|
|
546
|
+
* If the payload uses the common `{ value: T }` shape from setting widgets, returns the inner value; otherwise returns `raw`.
|
|
547
|
+
*/
|
|
548
|
+
function peelSettingValueKey(raw) {
|
|
549
|
+
return unwrapValueProperty(raw);
|
|
550
|
+
}
|
|
551
|
+
function coercionKindFromScalarSample(v) {
|
|
552
|
+
if (v === null || v === undefined) {
|
|
553
|
+
return null;
|
|
554
|
+
}
|
|
555
|
+
if (typeof v === 'boolean') {
|
|
556
|
+
return 'boolean';
|
|
557
|
+
}
|
|
558
|
+
if (typeof v === 'number' && Number.isFinite(v)) {
|
|
559
|
+
return 'number';
|
|
560
|
+
}
|
|
561
|
+
if (v instanceof Date) {
|
|
562
|
+
return 'date';
|
|
563
|
+
}
|
|
564
|
+
if (typeof v === 'string') {
|
|
565
|
+
if (v === 'true' || v === 'false') {
|
|
566
|
+
return 'boolean';
|
|
567
|
+
}
|
|
568
|
+
return 'string';
|
|
569
|
+
}
|
|
570
|
+
return null;
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Picks a primitive coercion kind from the setting definition default and/or the effective stored value.
|
|
574
|
+
* Type argument `T` on the settings service `get` method is compile-time only; runtime behavior follows this inference.
|
|
575
|
+
*/
|
|
576
|
+
function inferSettingCoercionKind(defaultSample, effective) {
|
|
577
|
+
const fromDefault = coercionKindFromScalarSample(defaultSample);
|
|
578
|
+
if (fromDefault) {
|
|
579
|
+
return fromDefault;
|
|
580
|
+
}
|
|
581
|
+
return coercionKindFromScalarSample(unwrapValueProperty(effective));
|
|
582
|
+
}
|
|
583
|
+
//#endregion
|
|
584
|
+
//#region ---- Value coercion ----
|
|
585
|
+
function coerceAXPSettingRawValueByKind(raw, kind) {
|
|
586
|
+
switch (kind) {
|
|
587
|
+
case 'string':
|
|
588
|
+
return coerceUnknownToTrimmedString(raw);
|
|
589
|
+
case 'boolean':
|
|
590
|
+
return coerceUnknownToBoolean(raw);
|
|
591
|
+
case 'number':
|
|
592
|
+
return coerceUnknownToFiniteNumber(raw);
|
|
593
|
+
case 'date':
|
|
594
|
+
return coerceUnknownToDate(raw);
|
|
595
|
+
default: {
|
|
596
|
+
const _exhaustive = kind;
|
|
597
|
+
return _exhaustive;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
function coerceAXPSettingRawValue(raw, kind) {
|
|
602
|
+
return coerceAXPSettingRawValueByKind(raw, kind);
|
|
603
|
+
}
|
|
604
|
+
//#endregion
|
|
605
|
+
|
|
477
606
|
const AXP_SETTING_VALUE_PROVIDER = new InjectionToken('AXP_SETTING_VALUE_PROVIDER', {
|
|
478
607
|
providedIn: 'root',
|
|
479
608
|
factory: () => {
|
|
480
609
|
const injector = inject(Injector);
|
|
481
610
|
return [
|
|
611
|
+
new AXPSettingValueProviderDefault(AXPPlatformScope.Platform, injector),
|
|
482
612
|
new AXPSettingValueProviderDefault(AXPPlatformScope.Tenant, injector),
|
|
483
|
-
new AXPSettingValueProviderDefault(AXPPlatformScope.User, injector)
|
|
613
|
+
new AXPSettingValueProviderDefault(AXPPlatformScope.User, injector),
|
|
484
614
|
];
|
|
485
|
-
}
|
|
615
|
+
},
|
|
486
616
|
});
|
|
487
617
|
class AXPSettingValueProviderDefault {
|
|
488
618
|
constructor(_scope, injector) {
|
|
@@ -491,16 +621,22 @@ class AXPSettingValueProviderDefault {
|
|
|
491
621
|
this.cache = new Map();
|
|
492
622
|
this.localStorageKey = null;
|
|
493
623
|
this.sessionService = this.injector.get(AXPSessionService);
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
624
|
+
// Platform scope doesn't depend on session, initialize immediately
|
|
625
|
+
if (this.scope === AXPPlatformScope.Platform) {
|
|
626
|
+
this.localStorageKey = `AXP_SETTINGS_SCOPE(P)`;
|
|
627
|
+
}
|
|
628
|
+
else {
|
|
629
|
+
this.sessionService.status$.subscribe((status) => {
|
|
630
|
+
if (status === AXPSessionStatus.Authorized || status === AXPSessionStatus.Authenticated) {
|
|
631
|
+
if (this.scope === AXPPlatformScope.User) {
|
|
632
|
+
this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.sessionService.user?.id ?? 'U'})`;
|
|
633
|
+
}
|
|
634
|
+
else if (this.scope === AXPPlatformScope.Tenant) {
|
|
635
|
+
this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.sessionService.tenant?.id ?? 'T'})`;
|
|
636
|
+
}
|
|
501
637
|
}
|
|
502
|
-
}
|
|
503
|
-
}
|
|
638
|
+
});
|
|
639
|
+
}
|
|
504
640
|
}
|
|
505
641
|
get scope() {
|
|
506
642
|
return this._scope;
|
|
@@ -516,7 +652,7 @@ class AXPSettingValueProviderDefault {
|
|
|
516
652
|
Object.entries(parsedSettings).forEach(([key, value]) => {
|
|
517
653
|
this.cache.set(key, value);
|
|
518
654
|
});
|
|
519
|
-
return Promise.resolve(Array.from(this.cache.entries()).map(c => ({ key: c[0], value: c[1] })));
|
|
655
|
+
return Promise.resolve(Array.from(this.cache.entries()).map((c) => ({ key: c[0], value: c[1] })));
|
|
520
656
|
}
|
|
521
657
|
return Promise.resolve([]);
|
|
522
658
|
}
|
|
@@ -561,12 +697,7 @@ class AXPSettingsService {
|
|
|
561
697
|
this.onChanged = new Subject();
|
|
562
698
|
this.onLoaded = new Subject();
|
|
563
699
|
// Initialize scoped caches for dynamic scopes
|
|
564
|
-
const staticScopes = [
|
|
565
|
-
AXPPlatformScope.Environment,
|
|
566
|
-
AXPPlatformScope.Global,
|
|
567
|
-
AXPPlatformScope.Tenant,
|
|
568
|
-
AXPPlatformScope.User,
|
|
569
|
-
];
|
|
700
|
+
const staticScopes = [AXPPlatformScope.Platform, AXPPlatformScope.Tenant, AXPPlatformScope.User];
|
|
570
701
|
staticScopes.forEach((scope) => {
|
|
571
702
|
if (!this.scopedSettingsCache.has(scope)) {
|
|
572
703
|
this.scopedSettingsCache.set(scope, new Map());
|
|
@@ -601,6 +732,7 @@ class AXPSettingsService {
|
|
|
601
732
|
});
|
|
602
733
|
settingsList.push(...providerSettings);
|
|
603
734
|
}
|
|
735
|
+
await this.seedMissingDefaults();
|
|
604
736
|
this.onLoaded.next();
|
|
605
737
|
return settingsList;
|
|
606
738
|
}
|
|
@@ -609,35 +741,45 @@ class AXPSettingsService {
|
|
|
609
741
|
throw error;
|
|
610
742
|
}
|
|
611
743
|
}
|
|
744
|
+
/**
|
|
745
|
+
* Returns the effective setting value. Primitive coercion (string, boolean, number, date) is inferred from the
|
|
746
|
+
* definition default and/or the stored shape (including `{ value: ... }`). Type argument `T` is compile-time only;
|
|
747
|
+
* it is not read at runtime—use it to document the expected result (e.g. `get<boolean>(key)`).
|
|
748
|
+
*/
|
|
612
749
|
async get(key) {
|
|
750
|
+
const { effective, defaultSample } = await this.resolveEffectiveAndDefault(key);
|
|
751
|
+
const kind = inferSettingCoercionKind(defaultSample, effective);
|
|
752
|
+
if (kind !== null) {
|
|
753
|
+
return coerceAXPSettingRawValueByKind(effective, kind);
|
|
754
|
+
}
|
|
755
|
+
if (effective === undefined) {
|
|
756
|
+
return effective;
|
|
757
|
+
}
|
|
758
|
+
return cloneDeep(effective);
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* Effective value (user → tenant → platform) when set; otherwise the definition default. Used for reads and coercion hints.
|
|
762
|
+
*/
|
|
763
|
+
async resolveEffectiveAndDefault(key) {
|
|
613
764
|
if (this.scopedSettingsCache.size === 0) {
|
|
614
765
|
await this.load();
|
|
615
766
|
}
|
|
616
|
-
const
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
AXPPlatformScope.Global,
|
|
620
|
-
AXPPlatformScope.Environment,
|
|
621
|
-
];
|
|
767
|
+
const defaults = await this.injector.get(AXPSettingDefaultValuesAggregatorService).getDefaults();
|
|
768
|
+
const defaultSample = get(defaults, key);
|
|
769
|
+
const scopeOrder = [AXPPlatformScope.User, AXPPlatformScope.Tenant, AXPPlatformScope.Platform];
|
|
622
770
|
for (const scope of scopeOrder) {
|
|
623
771
|
const scopeCache = this.scopedSettingsCache.get(scope);
|
|
624
772
|
if (scopeCache && scopeCache.has(key)) {
|
|
625
773
|
const value = scopeCache.get(key);
|
|
626
774
|
if (value !== undefined && value !== null) {
|
|
627
|
-
return
|
|
775
|
+
return { effective: value, defaultSample };
|
|
628
776
|
}
|
|
629
777
|
}
|
|
630
778
|
}
|
|
631
|
-
|
|
632
|
-
return get(defaults, key); // Fallback if no value is found
|
|
779
|
+
return { effective: defaultSample, defaultSample };
|
|
633
780
|
}
|
|
634
781
|
async defaultValues(scope) {
|
|
635
|
-
let scopeOrder = [
|
|
636
|
-
AXPPlatformScope.Environment,
|
|
637
|
-
AXPPlatformScope.Global,
|
|
638
|
-
AXPPlatformScope.Tenant,
|
|
639
|
-
AXPPlatformScope.User,
|
|
640
|
-
].reverse();
|
|
782
|
+
let scopeOrder = [AXPPlatformScope.Platform, AXPPlatformScope.Tenant, AXPPlatformScope.User].reverse();
|
|
641
783
|
const scopeIndex = scopeOrder.indexOf(scope);
|
|
642
784
|
if (scopeIndex === -1) {
|
|
643
785
|
throw new Error(`Invalid scope: ${scope}`);
|
|
@@ -671,10 +813,33 @@ class AXPSettingsService {
|
|
|
671
813
|
this.onChanged.next(event);
|
|
672
814
|
this.eventService.publish('AXPSettingChangedEvent', event);
|
|
673
815
|
}
|
|
674
|
-
|
|
675
|
-
|
|
816
|
+
async seedMissingDefaults() {
|
|
817
|
+
const definitionService = this.injector.get(AXPSettingDefinitionProviderService);
|
|
818
|
+
const aggregator = this.injector.get(AXPSettingDefaultValuesAggregatorService);
|
|
819
|
+
const [defaults, scopeByKey] = await Promise.all([aggregator.getDefaults(), definitionService.settingScopeByKey()]);
|
|
820
|
+
const persistedKeysByScope = new Map(await Promise.all(this.providers.map(async (provider) => {
|
|
821
|
+
const stored = await provider.load();
|
|
822
|
+
return [provider.scope, new Set(stored.map((s) => s.key))];
|
|
823
|
+
})));
|
|
824
|
+
const toPersist = {};
|
|
825
|
+
for (const [key, value] of Object.entries(defaults)) {
|
|
826
|
+
const scope = scopeByKey[key];
|
|
827
|
+
if (!scope || value === undefined || persistedKeysByScope.get(scope)?.has(key)) {
|
|
828
|
+
continue;
|
|
829
|
+
}
|
|
830
|
+
toPersist[scope] ??= {};
|
|
831
|
+
toPersist[scope][key] = value;
|
|
832
|
+
}
|
|
833
|
+
for (const [scope, values] of Object.entries(toPersist)) {
|
|
834
|
+
if (Object.keys(values).length > 0) {
|
|
835
|
+
await this.scope(scope).set(values);
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
840
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsService, providedIn: 'root' }); }
|
|
676
841
|
}
|
|
677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsService, decorators: [{
|
|
678
843
|
type: Injectable,
|
|
679
844
|
args: [{
|
|
680
845
|
providedIn: 'root',
|
|
@@ -689,7 +854,17 @@ class ScopedSettingService {
|
|
|
689
854
|
async get(key) {
|
|
690
855
|
const settings = await this.provider.load();
|
|
691
856
|
const setting = settings.find((s) => s.key === key);
|
|
692
|
-
|
|
857
|
+
const effective = setting?.value;
|
|
858
|
+
const defaults = await this.parent.defaultValues(this.provider.scope);
|
|
859
|
+
const defaultSample = get(defaults, key);
|
|
860
|
+
const kind = inferSettingCoercionKind(defaultSample, effective);
|
|
861
|
+
if (kind !== null) {
|
|
862
|
+
return coerceAXPSettingRawValueByKind(effective, kind);
|
|
863
|
+
}
|
|
864
|
+
if (effective === undefined) {
|
|
865
|
+
return effective;
|
|
866
|
+
}
|
|
867
|
+
return cloneDeep(effective);
|
|
693
868
|
}
|
|
694
869
|
async all() {
|
|
695
870
|
const settings = await this.provider.load();
|
|
@@ -730,34 +905,219 @@ class ScopedSettingService {
|
|
|
730
905
|
}
|
|
731
906
|
}
|
|
732
907
|
|
|
908
|
+
const DEFAULT_APPLY_DEFAULT_MULTILANGUAGE = true;
|
|
733
909
|
/**
|
|
734
|
-
*
|
|
735
|
-
*
|
|
736
|
-
*
|
|
910
|
+
* Synchronous access to default multi-language behavior for named entity fields and widget
|
|
911
|
+
* property bindings. Mirrors {@link AXPLayoutOrderingConfigService}: avoids async in entity
|
|
912
|
+
* modifiers and startup deadlocks.
|
|
737
913
|
*/
|
|
738
|
-
|
|
739
|
-
(
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
}
|
|
914
|
+
class AXPDefaultMultiLanguageConfigService {
|
|
915
|
+
constructor() {
|
|
916
|
+
this.settingsService = inject(AXPSettingsService);
|
|
917
|
+
this._applyDefault = signal(DEFAULT_APPLY_DEFAULT_MULTILANGUAGE, ...(ngDevMode ? [{ debugName: "_applyDefault" }] : /* istanbul ignore next */ []));
|
|
918
|
+
this.syncScheduled = false;
|
|
919
|
+
this.settingsService.onLoaded.subscribe(() => this.syncFromSettings());
|
|
920
|
+
this.settingsService.onChanged.subscribe(() => this.syncFromSettings());
|
|
921
|
+
}
|
|
922
|
+
getApplyDefaultMultiLanguage() {
|
|
923
|
+
if (!this.syncScheduled) {
|
|
924
|
+
this.syncScheduled = true;
|
|
925
|
+
this.settingsService
|
|
926
|
+
.get(AXPRegionalSetting.MultiLanguageSupport)
|
|
927
|
+
.then((value) => this._applyDefault.set(value ?? DEFAULT_APPLY_DEFAULT_MULTILANGUAGE))
|
|
928
|
+
.catch(() => this._applyDefault.set(DEFAULT_APPLY_DEFAULT_MULTILANGUAGE));
|
|
929
|
+
}
|
|
930
|
+
return this._applyDefault();
|
|
931
|
+
}
|
|
932
|
+
async syncFromSettings() {
|
|
933
|
+
try {
|
|
934
|
+
const value = await this.settingsService.get(AXPRegionalSetting.MultiLanguageSupport);
|
|
935
|
+
this._applyDefault.set(value ?? DEFAULT_APPLY_DEFAULT_MULTILANGUAGE);
|
|
936
|
+
}
|
|
937
|
+
catch {
|
|
938
|
+
this._applyDefault.set(DEFAULT_APPLY_DEFAULT_MULTILANGUAGE);
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultMultiLanguageConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
942
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultMultiLanguageConfigService, providedIn: 'root' }); }
|
|
943
|
+
}
|
|
944
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultMultiLanguageConfigService, decorators: [{
|
|
945
|
+
type: Injectable,
|
|
946
|
+
args: [{ providedIn: 'root' }]
|
|
947
|
+
}], ctorParameters: () => [] });
|
|
948
|
+
|
|
949
|
+
//#region ---- Constants ----
|
|
950
|
+
/**
|
|
951
|
+
* Widget types that support the multiLanguage option (text / rich text editors).
|
|
952
|
+
*/
|
|
953
|
+
const MULTILANGUAGE_CAPABLE_WIDGET_TYPES = new Set([
|
|
954
|
+
'text-editor',
|
|
955
|
+
'large-text-editor',
|
|
956
|
+
'rich-text-editor',
|
|
957
|
+
'template-content-editor',
|
|
958
|
+
]);
|
|
959
|
+
/**
|
|
960
|
+
* Common property names / binding path segments that are usually translatable when the feature is
|
|
961
|
+
* enabled in settings. Explicit `multiLanguage` on the property still wins.
|
|
962
|
+
*/
|
|
963
|
+
const DEFAULT_MULTILANGUAGE_FIELD_NAMES = new Set([
|
|
964
|
+
'title',
|
|
965
|
+
'description',
|
|
966
|
+
'note',
|
|
967
|
+
'content',
|
|
968
|
+
/** e.g. `post.summaryContent` — last path segment */
|
|
969
|
+
'summaryContent',
|
|
970
|
+
'question',
|
|
971
|
+
'summary',
|
|
972
|
+
'body',
|
|
973
|
+
'caption',
|
|
974
|
+
'remarks',
|
|
975
|
+
'subtitle',
|
|
976
|
+
'label',
|
|
977
|
+
'placeholder',
|
|
978
|
+
'message',
|
|
979
|
+
'subject',
|
|
980
|
+
]);
|
|
981
|
+
//#endregion
|
|
982
|
+
//#region ---- Helpers ----
|
|
983
|
+
function interfacePathLastSegment(path) {
|
|
984
|
+
if (path == null || typeof path !== 'string' || !path.length) {
|
|
985
|
+
return null;
|
|
986
|
+
}
|
|
987
|
+
const seg = path.includes('.') ? path.split('.').pop() : path;
|
|
988
|
+
return seg && seg.length ? seg : null;
|
|
989
|
+
}
|
|
990
|
+
function shouldApplyDefaultMultiLanguageToEntityProperty(prop) {
|
|
991
|
+
if (prop.schema.dataType !== 'string') {
|
|
992
|
+
return false;
|
|
993
|
+
}
|
|
994
|
+
if (!DEFAULT_MULTILANGUAGE_FIELD_NAMES.has(prop.name)) {
|
|
995
|
+
return false;
|
|
996
|
+
}
|
|
997
|
+
const widgetType = prop.schema.interface?.type;
|
|
998
|
+
if (typeof widgetType !== 'string' || !MULTILANGUAGE_CAPABLE_WIDGET_TYPES.has(widgetType)) {
|
|
999
|
+
return false;
|
|
1000
|
+
}
|
|
1001
|
+
const opts = prop.schema.interface?.options;
|
|
1002
|
+
if (opts && 'multiLanguage' in opts) {
|
|
1003
|
+
return false;
|
|
1004
|
+
}
|
|
1005
|
+
return true;
|
|
1006
|
+
}
|
|
1007
|
+
function shouldApplyDefaultMultiLanguageToWidgetProperty(prop) {
|
|
1008
|
+
if (prop.schema.dataType !== 'string') {
|
|
1009
|
+
return false;
|
|
1010
|
+
}
|
|
1011
|
+
const key = interfacePathLastSegment(prop.schema.interface.path);
|
|
1012
|
+
if (!key || !DEFAULT_MULTILANGUAGE_FIELD_NAMES.has(key)) {
|
|
1013
|
+
return false;
|
|
1014
|
+
}
|
|
1015
|
+
const widgetType = prop.schema.interface.type;
|
|
1016
|
+
if (typeof widgetType !== 'string' || !MULTILANGUAGE_CAPABLE_WIDGET_TYPES.has(widgetType)) {
|
|
1017
|
+
return false;
|
|
1018
|
+
}
|
|
1019
|
+
const opts = prop.schema.interface.options;
|
|
1020
|
+
if (opts && 'multiLanguage' in opts) {
|
|
1021
|
+
return false;
|
|
1022
|
+
}
|
|
1023
|
+
return true;
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* Leaf widget nodes in entity `schema.interface` trees (e.g. GridLayout → RichText under `pre` /
|
|
1027
|
+
* `post`) — same path/type rules as {@link shouldApplyDefaultMultiLanguageToWidgetProperty}, without
|
|
1028
|
+
* `schema.dataType` (nodes do not carry entity schema).
|
|
1029
|
+
*/
|
|
1030
|
+
function shouldApplyDefaultMultiLanguageToWidgetNode(node) {
|
|
1031
|
+
const widgetType = node.type;
|
|
1032
|
+
if (typeof widgetType !== 'string' || !MULTILANGUAGE_CAPABLE_WIDGET_TYPES.has(widgetType)) {
|
|
1033
|
+
return false;
|
|
1034
|
+
}
|
|
1035
|
+
const key = interfacePathLastSegment(node.path);
|
|
1036
|
+
if (!key || !DEFAULT_MULTILANGUAGE_FIELD_NAMES.has(key)) {
|
|
1037
|
+
return false;
|
|
1038
|
+
}
|
|
1039
|
+
const opts = node.options;
|
|
1040
|
+
if (opts && 'multiLanguage' in opts) {
|
|
1041
|
+
return false;
|
|
1042
|
+
}
|
|
1043
|
+
return true;
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* When {@link AXPDefaultMultiLanguageConfigService#getApplyDefaultMultiLanguage} is true, sets
|
|
1047
|
+
* `options.multiLanguage` on eligible editor leaves inside an entity property's widget tree
|
|
1048
|
+
* (including nested layouts). Used by entity middleware so object fields (e.g. `pre`, `post`) are
|
|
1049
|
+
* covered, not only top-level string properties.
|
|
1050
|
+
*/
|
|
1051
|
+
function withDefaultMultiLanguageOnWidgetNodeTree(root, applyDefault) {
|
|
1052
|
+
if (root == null || !applyDefault) {
|
|
1053
|
+
return root ?? undefined;
|
|
1054
|
+
}
|
|
1055
|
+
return visitWidgetNodeForDefaultMultiLanguage(root);
|
|
1056
|
+
}
|
|
1057
|
+
function visitWidgetNodeForDefaultMultiLanguage(node) {
|
|
1058
|
+
let next = node;
|
|
1059
|
+
if (node.children?.length) {
|
|
1060
|
+
const newChildren = node.children.map((child) => visitWidgetNodeForDefaultMultiLanguage(child));
|
|
1061
|
+
if (newChildren.some((c, i) => c !== node.children[i])) {
|
|
1062
|
+
next = { ...node, children: newChildren };
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
if (shouldApplyDefaultMultiLanguageToWidgetNode(next)) {
|
|
1066
|
+
return {
|
|
1067
|
+
...next,
|
|
1068
|
+
options: {
|
|
1069
|
+
...(next.options ?? {}),
|
|
1070
|
+
multiLanguage: true,
|
|
1071
|
+
},
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
return next;
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* When {@link AXPDefaultMultiLanguageConfigService#getApplyDefaultMultiLanguage} is true, sets
|
|
1078
|
+
* `schema.interface.options.multiLanguage` for eligible string widget properties (same rules as
|
|
1079
|
+
* entity middleware), unless the property already specifies `multiLanguage`.
|
|
1080
|
+
*/
|
|
1081
|
+
function withDefaultMultiLanguageOnWidgetProperty(prop, applyDefault) {
|
|
1082
|
+
if (!applyDefault || !shouldApplyDefaultMultiLanguageToWidgetProperty(prop)) {
|
|
1083
|
+
return prop;
|
|
1084
|
+
}
|
|
1085
|
+
const iface = prop.schema.interface;
|
|
1086
|
+
const existingOpts = (iface.options ?? {});
|
|
1087
|
+
return {
|
|
1088
|
+
...prop,
|
|
1089
|
+
schema: {
|
|
1090
|
+
...prop.schema,
|
|
1091
|
+
interface: {
|
|
1092
|
+
...iface,
|
|
1093
|
+
options: {
|
|
1094
|
+
...existingOpts,
|
|
1095
|
+
multiLanguage: true,
|
|
1096
|
+
},
|
|
1097
|
+
},
|
|
1098
|
+
},
|
|
1099
|
+
};
|
|
1100
|
+
}
|
|
1101
|
+
//#endregion
|
|
1102
|
+
|
|
1103
|
+
//#region ---- Settings expression scope ----
|
|
1104
|
+
/**
|
|
1105
|
+
* Exposes platform settings in expression strings, e.g.
|
|
1106
|
+
* `{{ settings.get('Common:Setting:Entity.ShowPageBadge') }}`.
|
|
1107
|
+
*/
|
|
1108
|
+
class AXPSettingsEvaluatorScopeProvider {
|
|
1109
|
+
constructor() {
|
|
1110
|
+
this.settingsService = inject(AXPSettingsService);
|
|
1111
|
+
}
|
|
1112
|
+
async provide(context) {
|
|
1113
|
+
context.addScope('settings', {
|
|
1114
|
+
get: async (key) => {
|
|
1115
|
+
return await this.settingsService.get(key);
|
|
1116
|
+
},
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
//#endregion
|
|
761
1121
|
|
|
762
1122
|
var AXPHomePageSettings;
|
|
763
1123
|
(function (AXPHomePageSettings) {
|
|
@@ -815,9 +1175,7 @@ class AXPHomePageService {
|
|
|
815
1175
|
{ ...home?.route, ...{ data: { key: home?.key, title: home?.title, path: fullPath } } },
|
|
816
1176
|
];
|
|
817
1177
|
}
|
|
818
|
-
return [
|
|
819
|
-
{ path: '', redirectTo: this.loginPath, pathMatch: 'full' },
|
|
820
|
-
];
|
|
1178
|
+
return [{ path: '', redirectTo: this.loginPath, pathMatch: 'full' }];
|
|
821
1179
|
}
|
|
822
1180
|
getCurrent() {
|
|
823
1181
|
const key = this.userHomePageKey ?? this.defaultHomePageKey;
|
|
@@ -865,30 +1223,24 @@ class AXPHomePageService {
|
|
|
865
1223
|
// Filter the original routes to drop the old home placeholders.
|
|
866
1224
|
// We know your dynamic routes always have path === '' or ':app'
|
|
867
1225
|
// 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'));
|
|
1226
|
+
const otherRoutes = (this.originalConfig ?? []).filter((r) => r.path !== '' && r.path !== ':app' && !(r.data && typeof r.data['key'] === 'string'));
|
|
872
1227
|
// Build the new merged tree
|
|
873
|
-
const merged = [
|
|
874
|
-
...newHomeRoutes,
|
|
875
|
-
...otherRoutes
|
|
876
|
-
];
|
|
1228
|
+
const merged = [...newHomeRoutes, ...otherRoutes];
|
|
877
1229
|
// TODO: check this for custom menu like :app/terms
|
|
878
1230
|
router.resetConfig(merged);
|
|
879
1231
|
}
|
|
880
1232
|
async navigateTo() {
|
|
881
|
-
// wait for the router to be initialized
|
|
1233
|
+
// wait for the router to be initialized
|
|
882
1234
|
setTimeout(() => {
|
|
883
1235
|
const router = this.injector.get(Router);
|
|
884
1236
|
const current = this.getCurrent();
|
|
885
|
-
router.navigate([current.path]);
|
|
1237
|
+
router.navigate([current.path], { onSameUrlNavigation: 'reload' });
|
|
886
1238
|
}, 100);
|
|
887
1239
|
}
|
|
888
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
889
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1240
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1241
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageService, providedIn: 'root' }); }
|
|
890
1242
|
}
|
|
891
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageService, decorators: [{
|
|
892
1244
|
type: Injectable,
|
|
893
1245
|
args: [{
|
|
894
1246
|
providedIn: 'root',
|
|
@@ -909,28 +1261,27 @@ function provideDynamicHomePage() {
|
|
|
909
1261
|
]);
|
|
910
1262
|
}
|
|
911
1263
|
|
|
1264
|
+
const I18N = '@general:settings';
|
|
912
1265
|
class AXPHomePageSettingProvider {
|
|
913
1266
|
constructor(injector) {
|
|
914
1267
|
this.injector = injector;
|
|
915
|
-
this.translateService = this.injector.get(AXTranslationService);
|
|
916
1268
|
this.homePageService = this.injector.get(AXPHomePageService);
|
|
917
1269
|
this.defaultHomePageKey = inject(AXP_HOME_PAGE_DEFAULT_KEY, { optional: true }) ?? 'home';
|
|
918
1270
|
}
|
|
919
1271
|
async provide(context) {
|
|
920
|
-
const
|
|
921
|
-
const list = await this.homePageService.getRegisteredList().map((c) => ({ id: c.key, title: c.title }));
|
|
1272
|
+
const list = this.homePageService.getRegisteredList().map((c) => ({ id: c.key, title: c.title }));
|
|
922
1273
|
if (list.length === 0) {
|
|
923
1274
|
return;
|
|
924
1275
|
}
|
|
925
1276
|
// Define the 'General Settings' group
|
|
926
1277
|
context
|
|
927
|
-
.addGroup('general',
|
|
1278
|
+
.addGroup('general', `${I18N}.general.nav-title`, `${I18N}.general.description`, 'fa-light fa-palette', `${I18N}.general.title`)
|
|
928
1279
|
// Add the 'Startup' section
|
|
929
|
-
.addSection('startup',
|
|
1280
|
+
.addSection('startup', `${I18N}.general.startup.title`, `${I18N}.general.startup.description`)
|
|
930
1281
|
// Add the 'Home Page' setting
|
|
931
1282
|
.addSetting({
|
|
932
1283
|
key: AXPHomePageSettings.UserHomePath,
|
|
933
|
-
title:
|
|
1284
|
+
title: `${I18N}.general.startup.home-page.title`,
|
|
934
1285
|
scope: AXPPlatformScope.User,
|
|
935
1286
|
isInherited: true,
|
|
936
1287
|
defaultValue: this.defaultHomePageKey || list[0].id,
|
|
@@ -943,24 +1294,24 @@ class AXPHomePageSettingProvider {
|
|
|
943
1294
|
dataSource: list,
|
|
944
1295
|
},
|
|
945
1296
|
},
|
|
946
|
-
description:
|
|
1297
|
+
description: `${I18N}.general.startup.home-page.description`,
|
|
947
1298
|
})
|
|
948
1299
|
// End the 'Startup' section
|
|
949
1300
|
.endSection()
|
|
950
1301
|
// End the 'General Settings' group
|
|
951
1302
|
.endGroup();
|
|
952
1303
|
}
|
|
953
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
954
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1304
|
+
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 }); }
|
|
1305
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageSettingProvider }); }
|
|
955
1306
|
}
|
|
956
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageSettingProvider, decorators: [{
|
|
957
1308
|
type: Injectable
|
|
958
1309
|
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
959
1310
|
|
|
960
1311
|
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: "
|
|
1312
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1313
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule }); }
|
|
1314
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule, providers: [
|
|
964
1315
|
{
|
|
965
1316
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
966
1317
|
useClass: AXPHomePageSettingProvider,
|
|
@@ -968,7 +1319,7 @@ class AXPHomePageModule {
|
|
|
968
1319
|
},
|
|
969
1320
|
] }); }
|
|
970
1321
|
}
|
|
971
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule, decorators: [{
|
|
972
1323
|
type: NgModule,
|
|
973
1324
|
args: [{
|
|
974
1325
|
imports: [],
|
|
@@ -991,10 +1342,10 @@ class AXPCustomOperatorServiceImpl extends AXPCustomOperatorService {
|
|
|
991
1342
|
getCustomOperators() {
|
|
992
1343
|
return {};
|
|
993
1344
|
}
|
|
994
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
995
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1345
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCustomOperatorServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1346
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCustomOperatorServiceImpl }); }
|
|
996
1347
|
}
|
|
997
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1348
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCustomOperatorServiceImpl, decorators: [{
|
|
998
1349
|
type: Injectable
|
|
999
1350
|
}] });
|
|
1000
1351
|
|
|
@@ -1039,10 +1390,10 @@ class AXPFilterOperatorMiddlewareServiceImpl extends AXPFilterOperatorMiddleware
|
|
|
1039
1390
|
return acc;
|
|
1040
1391
|
}, {});
|
|
1041
1392
|
}
|
|
1042
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1043
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1393
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1394
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl }); }
|
|
1044
1395
|
}
|
|
1045
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl, decorators: [{
|
|
1046
1397
|
type: Injectable
|
|
1047
1398
|
}] });
|
|
1048
1399
|
|
|
@@ -1063,10 +1414,10 @@ class AXPErrorHandlerRegistryService {
|
|
|
1063
1414
|
get handlers() {
|
|
1064
1415
|
return this.errorHandlers;
|
|
1065
1416
|
}
|
|
1066
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1067
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1417
|
+
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 }); }
|
|
1418
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPErrorHandlerRegistryService, providedIn: 'root' }); }
|
|
1068
1419
|
}
|
|
1069
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1420
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPErrorHandlerRegistryService, decorators: [{
|
|
1070
1421
|
type: Injectable,
|
|
1071
1422
|
args: [{
|
|
1072
1423
|
providedIn: 'root'
|
|
@@ -1097,10 +1448,10 @@ class AXPGlobalErrorHandler extends ErrorHandler {
|
|
|
1097
1448
|
}
|
|
1098
1449
|
handleErrorRecursively(0, error);
|
|
1099
1450
|
}
|
|
1100
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1101
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1451
|
+
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 }); }
|
|
1452
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGlobalErrorHandler, providedIn: 'root' }); }
|
|
1102
1453
|
}
|
|
1103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGlobalErrorHandler, decorators: [{
|
|
1104
1455
|
type: Injectable,
|
|
1105
1456
|
args: [{ providedIn: 'root' }]
|
|
1106
1457
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: AXPErrorHandlerRegistryService }] });
|
|
@@ -1171,10 +1522,10 @@ class AXPTokenDefinitionService {
|
|
|
1171
1522
|
clearDefinitionsCache() {
|
|
1172
1523
|
this.definitionsByName.clear();
|
|
1173
1524
|
}
|
|
1174
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1175
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1525
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTokenDefinitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1526
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTokenDefinitionService, providedIn: 'root' }); }
|
|
1176
1527
|
}
|
|
1177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTokenDefinitionService, decorators: [{
|
|
1178
1529
|
type: Injectable,
|
|
1179
1530
|
args: [{
|
|
1180
1531
|
providedIn: 'root',
|
|
@@ -1212,32 +1563,24 @@ class AXPStickyDirective {
|
|
|
1212
1563
|
this.stickyOffset = 100;
|
|
1213
1564
|
this.isStickyChange = new EventEmitter();
|
|
1214
1565
|
this._isSticky = false;
|
|
1566
|
+
this.onWindowResize = () => {
|
|
1567
|
+
this.applyStickyStateFromScrollPosition();
|
|
1568
|
+
};
|
|
1215
1569
|
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
|
-
});
|
|
1570
|
+
this.applyStickyStateFromScrollPosition();
|
|
1227
1571
|
};
|
|
1228
1572
|
}
|
|
1229
1573
|
ngAfterViewInit() {
|
|
1230
1574
|
this.initSticky();
|
|
1231
1575
|
// Add mutation observer for dynamic content
|
|
1232
1576
|
this.mutationObserver = new MutationObserver(() => {
|
|
1233
|
-
this.
|
|
1577
|
+
this.applyStickyStateFromScrollPosition();
|
|
1234
1578
|
});
|
|
1235
1579
|
this.mutationObserver.observe(this.element.nativeElement, {
|
|
1236
1580
|
childList: true,
|
|
1237
1581
|
subtree: true,
|
|
1238
1582
|
});
|
|
1239
|
-
|
|
1240
|
-
window.addEventListener('resize', this.updateTopOffset.bind(this));
|
|
1583
|
+
window.addEventListener('resize', this.onWindowResize);
|
|
1241
1584
|
}
|
|
1242
1585
|
initSticky() {
|
|
1243
1586
|
if (this.stickyParent instanceof HTMLElement) {
|
|
@@ -1247,13 +1590,42 @@ class AXPStickyDirective {
|
|
|
1247
1590
|
this.parentElement = document.querySelector(this.stickyParent) || window;
|
|
1248
1591
|
}
|
|
1249
1592
|
this.targetElement = document.querySelector(this.stickyTarget) || this.element.nativeElement;
|
|
1250
|
-
this.updateTopOffset();
|
|
1251
1593
|
this.parentElement.addEventListener('scroll', this.onParentScroll);
|
|
1594
|
+
this.applyStickyStateFromScrollPosition();
|
|
1595
|
+
}
|
|
1596
|
+
getScrollTop() {
|
|
1597
|
+
return this.parentElement === window ? window.scrollY : this.parentElement.scrollTop;
|
|
1598
|
+
}
|
|
1599
|
+
/**
|
|
1600
|
+
* Toggle stuck styling only while this element is visually pinned (matches `position: sticky; top: 0`).
|
|
1601
|
+
* Scroll-offset thresholds would stay true for every section already passed, so multiple stacked stickies
|
|
1602
|
+
* would all keep `--stuck`; geometry fixes that.
|
|
1603
|
+
*/
|
|
1604
|
+
computeShouldStick() {
|
|
1605
|
+
if (this.getScrollTop() <= 0) {
|
|
1606
|
+
return false;
|
|
1607
|
+
}
|
|
1608
|
+
const tRect = this.targetElement.getBoundingClientRect();
|
|
1609
|
+
const epsilon = 3;
|
|
1610
|
+
let limitY;
|
|
1611
|
+
if (this.parentElement === window) {
|
|
1612
|
+
limitY = this.stickyOffset;
|
|
1613
|
+
}
|
|
1614
|
+
else {
|
|
1615
|
+
limitY = this.parentElement.getBoundingClientRect().top;
|
|
1616
|
+
}
|
|
1617
|
+
return tRect.top <= limitY + epsilon && tRect.top >= limitY - epsilon;
|
|
1252
1618
|
}
|
|
1253
|
-
|
|
1619
|
+
applyStickyStateFromScrollPosition() {
|
|
1254
1620
|
this.zone.runOutsideAngular(() => {
|
|
1255
|
-
const
|
|
1256
|
-
|
|
1621
|
+
const shouldStick = this.computeShouldStick();
|
|
1622
|
+
if (shouldStick !== this.isSticky) {
|
|
1623
|
+
this.zone.run(() => {
|
|
1624
|
+
this.isSticky = shouldStick;
|
|
1625
|
+
this.toggleStickyClasses(shouldStick);
|
|
1626
|
+
this.cdr.markForCheck();
|
|
1627
|
+
});
|
|
1628
|
+
}
|
|
1257
1629
|
});
|
|
1258
1630
|
}
|
|
1259
1631
|
toggleStickyClasses(isSticky) {
|
|
@@ -1269,15 +1641,15 @@ class AXPStickyDirective {
|
|
|
1269
1641
|
}
|
|
1270
1642
|
ngOnDestroy() {
|
|
1271
1643
|
this.parentElement.removeEventListener('scroll', this.onParentScroll);
|
|
1272
|
-
window.removeEventListener('resize', this.
|
|
1644
|
+
window.removeEventListener('resize', this.onWindowResize);
|
|
1273
1645
|
if (this.mutationObserver) {
|
|
1274
1646
|
this.mutationObserver.disconnect();
|
|
1275
1647
|
}
|
|
1276
1648
|
}
|
|
1277
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1278
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1649
|
+
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 }); }
|
|
1650
|
+
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
1651
|
}
|
|
1280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStickyDirective, decorators: [{
|
|
1281
1653
|
type: Directive,
|
|
1282
1654
|
args: [{
|
|
1283
1655
|
selector: '[axpSticky]',
|
|
@@ -1620,10 +1992,10 @@ class AXPMenuMiddlewareRegistry {
|
|
|
1620
1992
|
clear() {
|
|
1621
1993
|
this.manualMiddlewares.clear();
|
|
1622
1994
|
}
|
|
1623
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1624
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1995
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuMiddlewareRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1996
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuMiddlewareRegistry, providedIn: 'root' }); }
|
|
1625
1997
|
}
|
|
1626
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1998
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuMiddlewareRegistry, decorators: [{
|
|
1627
1999
|
type: Injectable,
|
|
1628
2000
|
args: [{ providedIn: 'root' }]
|
|
1629
2001
|
}] });
|
|
@@ -1642,6 +2014,7 @@ class AXPMenuProviderService {
|
|
|
1642
2014
|
this.pendingRemovals = [];
|
|
1643
2015
|
this.pendingUpdates = [];
|
|
1644
2016
|
this.pendingAdditions = [];
|
|
2017
|
+
this.pendingMoves = [];
|
|
1645
2018
|
/**
|
|
1646
2019
|
* Observable for menu reload events
|
|
1647
2020
|
* Emits when menu cache is cleared and consumers should reload
|
|
@@ -1673,10 +2046,11 @@ class AXPMenuProviderService {
|
|
|
1673
2046
|
// If provider is a direct instance, use it directly
|
|
1674
2047
|
await provider.provide(context);
|
|
1675
2048
|
}
|
|
2049
|
+
// Apply pending operations after each provider so subsequent providers
|
|
2050
|
+
// can find items added by earlier providers (e.g. Tokens under Data Definitions)
|
|
2051
|
+
this.applyPendingOperations(items);
|
|
1676
2052
|
}
|
|
1677
2053
|
}
|
|
1678
|
-
// Apply pending operations
|
|
1679
|
-
this.applyPendingOperations(items);
|
|
1680
2054
|
// Sort items by priority
|
|
1681
2055
|
items.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
|
|
1682
2056
|
// Apply middlewares using registry (sorted by priority)
|
|
@@ -1706,10 +2080,10 @@ class AXPMenuProviderService {
|
|
|
1706
2080
|
// If provider is a direct instance, use it directly
|
|
1707
2081
|
await provider.provide(context);
|
|
1708
2082
|
}
|
|
2083
|
+
// Apply pending operations after each provider
|
|
2084
|
+
this.applyPendingOperations(items);
|
|
1709
2085
|
}
|
|
1710
2086
|
}
|
|
1711
|
-
// Apply pending operations
|
|
1712
|
-
this.applyPendingOperations(items);
|
|
1713
2087
|
// Sort items by priority
|
|
1714
2088
|
items.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
|
|
1715
2089
|
// ADD level property to items (but NO middleware)
|
|
@@ -1726,6 +2100,7 @@ class AXPMenuProviderService {
|
|
|
1726
2100
|
this.pendingRemovals = [];
|
|
1727
2101
|
this.pendingUpdates = [];
|
|
1728
2102
|
this.pendingAdditions = [];
|
|
2103
|
+
this.pendingMoves = [];
|
|
1729
2104
|
// Notify subscribers that menu should be reloaded
|
|
1730
2105
|
this.menuReloadSubject.next();
|
|
1731
2106
|
}
|
|
@@ -1787,7 +2162,14 @@ class AXPMenuProviderService {
|
|
|
1787
2162
|
},
|
|
1788
2163
|
addItems: (newItems) => {
|
|
1789
2164
|
this.pendingAdditions.push({ target, newItems });
|
|
1790
|
-
}
|
|
2165
|
+
},
|
|
2166
|
+
moveTo: (destination, position = 'inside') => {
|
|
2167
|
+
this.pendingMoves.push({
|
|
2168
|
+
source: target,
|
|
2169
|
+
destination,
|
|
2170
|
+
position: position ?? 'inside',
|
|
2171
|
+
});
|
|
2172
|
+
},
|
|
1791
2173
|
};
|
|
1792
2174
|
}
|
|
1793
2175
|
};
|
|
@@ -1894,11 +2276,15 @@ class AXPMenuProviderService {
|
|
|
1894
2276
|
}
|
|
1895
2277
|
}
|
|
1896
2278
|
}
|
|
2279
|
+
for (const move of this.pendingMoves) {
|
|
2280
|
+
this.applyPendingMove(items, move.source, move.destination, move.position);
|
|
2281
|
+
}
|
|
1897
2282
|
// Clear pending operations after applying them
|
|
1898
2283
|
this.pendingInserts = [];
|
|
1899
2284
|
this.pendingRemovals = [];
|
|
1900
2285
|
this.pendingUpdates = [];
|
|
1901
2286
|
this.pendingAdditions = [];
|
|
2287
|
+
this.pendingMoves = [];
|
|
1902
2288
|
}
|
|
1903
2289
|
findItemWithParent(items, target, parentItems = items) {
|
|
1904
2290
|
for (const item of items) {
|
|
@@ -1931,6 +2317,66 @@ class AXPMenuProviderService {
|
|
|
1931
2317
|
}
|
|
1932
2318
|
return null;
|
|
1933
2319
|
}
|
|
2320
|
+
applyPendingMove(items, sourceName, destName, position) {
|
|
2321
|
+
if (sourceName === destName) {
|
|
2322
|
+
console.warn(`moveTo: source and destination are the same ("${sourceName}"), ignored.`);
|
|
2323
|
+
return;
|
|
2324
|
+
}
|
|
2325
|
+
const sourceInfo = this.findItemWithParent(items, sourceName);
|
|
2326
|
+
const { foundItem: sourceItem, parentItems: sourceParent } = sourceInfo;
|
|
2327
|
+
if (!sourceItem) {
|
|
2328
|
+
console.warn(`moveTo: source "${sourceName}" not found.`);
|
|
2329
|
+
return;
|
|
2330
|
+
}
|
|
2331
|
+
const destInfo = this.findItemWithParent(items, destName);
|
|
2332
|
+
const { foundItem: destItem, parentItems: destParent } = destInfo;
|
|
2333
|
+
if (!destItem) {
|
|
2334
|
+
console.warn(`moveTo: destination "${destName}" not found.`);
|
|
2335
|
+
return;
|
|
2336
|
+
}
|
|
2337
|
+
if (this.itemIsInSubtreeOf(sourceItem, destItem)) {
|
|
2338
|
+
console.warn(`moveTo: cannot move "${sourceName}" because "${destName}" is inside the source subtree.`);
|
|
2339
|
+
return;
|
|
2340
|
+
}
|
|
2341
|
+
const sourceIndex = sourceParent.indexOf(sourceItem);
|
|
2342
|
+
if (sourceIndex === -1) {
|
|
2343
|
+
console.warn(`moveTo: source "${sourceName}" not in parent list (inconsistent).`);
|
|
2344
|
+
return;
|
|
2345
|
+
}
|
|
2346
|
+
sourceParent.splice(sourceIndex, 1);
|
|
2347
|
+
if (position === 'inside') {
|
|
2348
|
+
if (!destItem.children) {
|
|
2349
|
+
destItem.children = [];
|
|
2350
|
+
}
|
|
2351
|
+
destItem.children.push(sourceItem);
|
|
2352
|
+
return;
|
|
2353
|
+
}
|
|
2354
|
+
const destIndexInParent = destParent.indexOf(destItem);
|
|
2355
|
+
if (destIndexInParent === -1) {
|
|
2356
|
+
console.warn(`moveTo: destination "${destName}" not in parent list, reverting source removal.`);
|
|
2357
|
+
sourceParent.splice(sourceIndex, 0, sourceItem);
|
|
2358
|
+
return;
|
|
2359
|
+
}
|
|
2360
|
+
const insertIndex = position === 'before' ? destIndexInParent : destIndexInParent + 1;
|
|
2361
|
+
destParent.splice(insertIndex, 0, sourceItem);
|
|
2362
|
+
}
|
|
2363
|
+
itemIsInSubtreeOf(root, candidate) {
|
|
2364
|
+
if (root === candidate) {
|
|
2365
|
+
return true;
|
|
2366
|
+
}
|
|
2367
|
+
if (!root.children?.length) {
|
|
2368
|
+
return false;
|
|
2369
|
+
}
|
|
2370
|
+
for (const child of root.children) {
|
|
2371
|
+
if (child === candidate) {
|
|
2372
|
+
return true;
|
|
2373
|
+
}
|
|
2374
|
+
if (this.itemIsInSubtreeOf(child, candidate)) {
|
|
2375
|
+
return true;
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2378
|
+
return false;
|
|
2379
|
+
}
|
|
1934
2380
|
/**
|
|
1935
2381
|
* Merge new item properties into existing item, handling children merge
|
|
1936
2382
|
*/
|
|
@@ -1978,10 +2424,10 @@ class AXPMenuProviderService {
|
|
|
1978
2424
|
}
|
|
1979
2425
|
}
|
|
1980
2426
|
}
|
|
1981
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1982
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2427
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2428
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuProviderService, providedIn: 'root' }); }
|
|
1983
2429
|
}
|
|
1984
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuProviderService, decorators: [{
|
|
1985
2431
|
type: Injectable,
|
|
1986
2432
|
args: [{ providedIn: 'root' }]
|
|
1987
2433
|
}] });
|
|
@@ -2001,6 +2447,90 @@ function setMenuItemMeta(items, parentIndex = '', depth = 0) {
|
|
|
2001
2447
|
});
|
|
2002
2448
|
}
|
|
2003
2449
|
|
|
2450
|
+
//#region ---- Imports ----
|
|
2451
|
+
//#endregion
|
|
2452
|
+
//#region ---- Helpers ----
|
|
2453
|
+
function flattenMenuItems(items, depth) {
|
|
2454
|
+
const rows = [];
|
|
2455
|
+
let index = 0;
|
|
2456
|
+
for (const it of items) {
|
|
2457
|
+
const fallback = `menu-${depth}-${index}`;
|
|
2458
|
+
index += 1;
|
|
2459
|
+
const id = it.name ?? it.path ?? fallback;
|
|
2460
|
+
rows.push({ id, title: it.text });
|
|
2461
|
+
if (it.children?.length) {
|
|
2462
|
+
rows.push(...flattenMenuItems(it.children, depth + 1));
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2465
|
+
return rows;
|
|
2466
|
+
}
|
|
2467
|
+
//#endregion
|
|
2468
|
+
//#region ---- Menu items data source ----
|
|
2469
|
+
/**
|
|
2470
|
+
* Registered menu items (raw tree flattened) for select widgets via dataSource name {@link MENU_ITEMS_DATASOURCE_NAME}.
|
|
2471
|
+
*/
|
|
2472
|
+
const MENU_ITEMS_DATASOURCE_NAME = 'platform-menu-items';
|
|
2473
|
+
/**
|
|
2474
|
+
* Data source definition for menu items from {@link AXPMenuProviderService#rawItems}.
|
|
2475
|
+
*/
|
|
2476
|
+
class AXPMenuItemsDataSourceDefinition {
|
|
2477
|
+
constructor() {
|
|
2478
|
+
//#region ---- Services & Dependencies ----
|
|
2479
|
+
this.menuProviderService = inject(AXPMenuProviderService);
|
|
2480
|
+
//#endregion
|
|
2481
|
+
}
|
|
2482
|
+
//#endregion
|
|
2483
|
+
//#region ---- Public API ----
|
|
2484
|
+
async items() {
|
|
2485
|
+
return [
|
|
2486
|
+
{
|
|
2487
|
+
name: MENU_ITEMS_DATASOURCE_NAME,
|
|
2488
|
+
title: 'Menu items',
|
|
2489
|
+
source: () => new AXDataSource({
|
|
2490
|
+
key: 'id',
|
|
2491
|
+
load: async () => {
|
|
2492
|
+
const raw = await this.menuProviderService.rawItems();
|
|
2493
|
+
const list = flattenMenuItems(raw, 0);
|
|
2494
|
+
return { items: list, total: list.length };
|
|
2495
|
+
},
|
|
2496
|
+
byKey: async (key) => {
|
|
2497
|
+
const raw = await this.menuProviderService.rawItems();
|
|
2498
|
+
const list = flattenMenuItems(raw, 0);
|
|
2499
|
+
return list.find((item) => item.id === key);
|
|
2500
|
+
},
|
|
2501
|
+
pageSize: 1000,
|
|
2502
|
+
}),
|
|
2503
|
+
columns: [
|
|
2504
|
+
{
|
|
2505
|
+
name: 'id',
|
|
2506
|
+
title: 'ID',
|
|
2507
|
+
datatype: 'string',
|
|
2508
|
+
type: AXPWidgetsCatalog.text,
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
name: 'title',
|
|
2512
|
+
title: 'Title',
|
|
2513
|
+
datatype: 'string',
|
|
2514
|
+
type: AXPWidgetsCatalog.text,
|
|
2515
|
+
},
|
|
2516
|
+
],
|
|
2517
|
+
filters: [
|
|
2518
|
+
{
|
|
2519
|
+
field: 'title',
|
|
2520
|
+
title: 'Title',
|
|
2521
|
+
operator: { type: 'equal' },
|
|
2522
|
+
widget: { type: AXPWidgetsCatalog.text },
|
|
2523
|
+
filterType: { advance: true, inline: true },
|
|
2524
|
+
},
|
|
2525
|
+
],
|
|
2526
|
+
textField: { name: 'title', title: 'Title' },
|
|
2527
|
+
valueField: { name: 'id', title: 'ID' },
|
|
2528
|
+
},
|
|
2529
|
+
];
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
//#endregion
|
|
2533
|
+
|
|
2004
2534
|
//#region ---- Menu Middleware Provider Helper ----
|
|
2005
2535
|
/**
|
|
2006
2536
|
* Helper function to provide menu middlewares with proper DI setup
|
|
@@ -2295,10 +2825,10 @@ class AXPMenuVisibilityService {
|
|
|
2295
2825
|
// Otherwise, don't render empty menu items
|
|
2296
2826
|
return false;
|
|
2297
2827
|
}
|
|
2298
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2299
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2828
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuVisibilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2829
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuVisibilityService, providedIn: 'root' }); }
|
|
2300
2830
|
}
|
|
2301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuVisibilityService, decorators: [{
|
|
2302
2832
|
type: Injectable,
|
|
2303
2833
|
args: [{ providedIn: 'root' }]
|
|
2304
2834
|
}] });
|
|
@@ -2332,21 +2862,23 @@ class AXPMenuSearchProvider {
|
|
|
2332
2862
|
title: item.text, // Use `text` for the `title`
|
|
2333
2863
|
icon: item.icon, // Include the `icon` if present
|
|
2334
2864
|
data: omit(item, ['parent', 'children']), // Include all data except `parent` and `children`
|
|
2335
|
-
command: item.path
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
type: 'router',
|
|
2865
|
+
command: item.path
|
|
2866
|
+
? {
|
|
2867
|
+
name: 'navigate',
|
|
2339
2868
|
options: {
|
|
2340
|
-
|
|
2869
|
+
type: 'router',
|
|
2870
|
+
options: {
|
|
2871
|
+
path: item.path,
|
|
2872
|
+
},
|
|
2341
2873
|
},
|
|
2342
2874
|
}
|
|
2343
|
-
|
|
2875
|
+
: item.command,
|
|
2344
2876
|
parent: item.parent
|
|
2345
2877
|
? {
|
|
2346
2878
|
title: item.parent.text,
|
|
2347
2879
|
}
|
|
2348
2880
|
: undefined,
|
|
2349
|
-
})), [(o) => this.translateService.translateSync(o.title)]);
|
|
2881
|
+
})), [(o) => this.translateService.translateSync(String(o.title ?? ''))]);
|
|
2350
2882
|
}
|
|
2351
2883
|
/**
|
|
2352
2884
|
* Recursively searches AXPMenuItem and its children for a matching text.
|
|
@@ -2375,18 +2907,19 @@ class AXPMenuSearchProvider {
|
|
|
2375
2907
|
}
|
|
2376
2908
|
|
|
2377
2909
|
class AXPFooterTextSlotComponent {
|
|
2378
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2379
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2910
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFooterTextSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2911
|
+
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
2912
|
<small class="ax-text-sm" [innerHTML]="text"></small>
|
|
2381
|
-
`, isInline: true }); }
|
|
2913
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2382
2914
|
}
|
|
2383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2915
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFooterTextSlotComponent, decorators: [{
|
|
2384
2916
|
type: Component,
|
|
2385
2917
|
args: [{
|
|
2386
2918
|
template: `
|
|
2387
2919
|
<small class="ax-text-sm" [innerHTML]="text"></small>
|
|
2388
2920
|
`,
|
|
2389
|
-
standalone: true
|
|
2921
|
+
standalone: true,
|
|
2922
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2390
2923
|
}]
|
|
2391
2924
|
}], propDecorators: { text: [{
|
|
2392
2925
|
type: Input
|
|
@@ -2397,8 +2930,8 @@ class AXPNavBarSlotComponent {
|
|
|
2397
2930
|
// if (action)
|
|
2398
2931
|
// this.store.dispatch(action)
|
|
2399
2932
|
}
|
|
2400
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2401
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2933
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPNavBarSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2934
|
+
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
2935
|
<div class="ax-flex ax-items-center ax-justify-between ax-gap-5">
|
|
2403
2936
|
@for (link of items; track link) {
|
|
2404
2937
|
<a (click)="handleCommand(link.command)" >{{ link.text }}</a>
|
|
@@ -2406,7 +2939,7 @@ class AXPNavBarSlotComponent {
|
|
|
2406
2939
|
</div>
|
|
2407
2940
|
`, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2408
2941
|
}
|
|
2409
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2942
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPNavBarSlotComponent, decorators: [{
|
|
2410
2943
|
type: Component,
|
|
2411
2944
|
args: [{
|
|
2412
2945
|
template: `
|
|
@@ -2540,17 +3073,21 @@ class AXPSearchDefinitionProviderService {
|
|
|
2540
3073
|
}
|
|
2541
3074
|
return definition;
|
|
2542
3075
|
}
|
|
2543
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2544
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3076
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3077
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchDefinitionProviderService, providedIn: 'root' }); }
|
|
2545
3078
|
}
|
|
2546
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3079
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchDefinitionProviderService, decorators: [{
|
|
2547
3080
|
type: Injectable,
|
|
2548
3081
|
args: [{ providedIn: 'root' }]
|
|
2549
3082
|
}] });
|
|
2550
3083
|
|
|
2551
3084
|
class AXPSearchCommandProvider {
|
|
3085
|
+
constructor() {
|
|
3086
|
+
this.translationService = inject(AXTranslationService);
|
|
3087
|
+
}
|
|
2552
3088
|
async search(text) {
|
|
2553
|
-
|
|
3089
|
+
const locale = this.translationService.getActiveLang() ?? 'en-US';
|
|
3090
|
+
return this.commands.filter((command) => searchInMultiLanguageString(command.title, text, locale));
|
|
2554
3091
|
}
|
|
2555
3092
|
}
|
|
2556
3093
|
|
|
@@ -2561,6 +3098,7 @@ class AXPSearchService {
|
|
|
2561
3098
|
this.providers = inject(AXP_SEARCH_PROVIDER, { optional: true });
|
|
2562
3099
|
this.definitionService = inject(AXPSearchDefinitionProviderService);
|
|
2563
3100
|
this.formatService = inject(AXFormatService);
|
|
3101
|
+
this.translationService = inject(AXTranslationService);
|
|
2564
3102
|
}
|
|
2565
3103
|
async search(text) {
|
|
2566
3104
|
//TODO better handle this
|
|
@@ -2579,8 +3117,12 @@ class AXPSearchService {
|
|
|
2579
3117
|
if (allProviders.length === 0) {
|
|
2580
3118
|
throw new Error('No search providers available');
|
|
2581
3119
|
}
|
|
3120
|
+
const providersWithSearch = allProviders.filter((provider) => provider != null && typeof provider.search === 'function');
|
|
3121
|
+
if (providersWithSearch.length === 0) {
|
|
3122
|
+
throw new Error('No search providers with a valid search method available');
|
|
3123
|
+
}
|
|
2582
3124
|
const mergeData = [];
|
|
2583
|
-
const promises =
|
|
3125
|
+
const promises = providersWithSearch.map((provider) => provider.search(text));
|
|
2584
3126
|
const results = await Promise.all(promises);
|
|
2585
3127
|
for (const resultArray of results) {
|
|
2586
3128
|
for (const result of resultArray) {
|
|
@@ -2599,10 +3141,7 @@ class AXPSearchService {
|
|
|
2599
3141
|
(definition.format.description
|
|
2600
3142
|
? this.formatService.format(definition.format.description, 'string', result.data)
|
|
2601
3143
|
: undefined),
|
|
2602
|
-
icon: result.icon ??
|
|
2603
|
-
(result.icon
|
|
2604
|
-
? this.formatService.format(definition.format.icon, 'string', result.data)
|
|
2605
|
-
: definition.icon),
|
|
3144
|
+
icon: result.icon ?? definition.icon,
|
|
2606
3145
|
data: result.data,
|
|
2607
3146
|
command: result.command,
|
|
2608
3147
|
actions: definition.actions,
|
|
@@ -2615,11 +3154,17 @@ class AXPSearchService {
|
|
|
2615
3154
|
}
|
|
2616
3155
|
}
|
|
2617
3156
|
}
|
|
3157
|
+
const locale = this.translationService.getActiveLang() ?? 'en-US';
|
|
3158
|
+
const normalizedQuery = text.trim();
|
|
3159
|
+
const visibleData = normalizedQuery.length === 0
|
|
3160
|
+
? mergeData
|
|
3161
|
+
: mergeData.filter((item) => searchInMultiLanguageString(item.title, normalizedQuery, locale) ||
|
|
3162
|
+
searchInMultiLanguageString(item.description, normalizedQuery, locale));
|
|
2618
3163
|
// Group data
|
|
2619
3164
|
const groupedData = [];
|
|
2620
3165
|
const groupMap = {};
|
|
2621
3166
|
// Create groups
|
|
2622
|
-
for (const item of
|
|
3167
|
+
for (const item of visibleData) {
|
|
2623
3168
|
const groupName = item.definitionName; // Change this to the property you want to group by
|
|
2624
3169
|
if (!groupMap[groupName]) {
|
|
2625
3170
|
groupMap[groupName] = {
|
|
@@ -2636,18 +3181,64 @@ class AXPSearchService {
|
|
|
2636
3181
|
groupedData.sort((a, b) => a.order - b.order);
|
|
2637
3182
|
return groupedData;
|
|
2638
3183
|
}
|
|
2639
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2640
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3184
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3185
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchService, providedIn: 'root' }); }
|
|
2641
3186
|
}
|
|
2642
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchService, decorators: [{
|
|
2643
3188
|
type: Injectable,
|
|
2644
3189
|
args: [{ providedIn: 'root' }]
|
|
2645
3190
|
}] });
|
|
2646
3191
|
|
|
3192
|
+
/**
|
|
3193
|
+
* Shared utility for creating Entity:Create command options used in search command providers.
|
|
3194
|
+
* Use with command: { name: 'Entity:Create', options: createEntityCommandOptions(...) }
|
|
3195
|
+
*/
|
|
3196
|
+
function createEntityCommandOptions(entityKey, entityInfo) {
|
|
3197
|
+
return {
|
|
3198
|
+
__context__: {
|
|
3199
|
+
entity: entityKey,
|
|
3200
|
+
entityInfo: {
|
|
3201
|
+
name: entityInfo.name,
|
|
3202
|
+
module: entityInfo.module,
|
|
3203
|
+
title: entityInfo.title,
|
|
3204
|
+
parentKey: undefined,
|
|
3205
|
+
source: entityKey,
|
|
3206
|
+
},
|
|
3207
|
+
data: {},
|
|
3208
|
+
options: {},
|
|
3209
|
+
},
|
|
3210
|
+
};
|
|
3211
|
+
}
|
|
3212
|
+
/**
|
|
3213
|
+
* Creates a search command for "Create {Entity}" with consistent i18n pattern.
|
|
3214
|
+
* Use titleKey/descriptionKey from module (e.g. @module:entity.permissions.create.title).
|
|
3215
|
+
* Standard: "Create {Entity}" for title, "Create new {entities}" for description.
|
|
3216
|
+
*/
|
|
3217
|
+
function createEntitySearchCommand(config) {
|
|
3218
|
+
return {
|
|
3219
|
+
id: config.id,
|
|
3220
|
+
group: 'command',
|
|
3221
|
+
title: config.titleKey,
|
|
3222
|
+
description: config.descriptionKey ?? config.titleKey,
|
|
3223
|
+
icon: config.icon,
|
|
3224
|
+
command: {
|
|
3225
|
+
name: 'Entity:Create',
|
|
3226
|
+
options: createEntityCommandOptions(config.entityKey, config.entityInfo),
|
|
3227
|
+
},
|
|
3228
|
+
};
|
|
3229
|
+
}
|
|
3230
|
+
|
|
2647
3231
|
var AXPCommonSettings;
|
|
2648
3232
|
(function (AXPCommonSettings) {
|
|
2649
3233
|
AXPCommonSettings["EnableOperationToasts"] = "Common:Setting:Notifications.EnableOperationToasts";
|
|
2650
3234
|
AXPCommonSettings["EntityFilterApplyMode"] = "Common:Setting:Entity.FilterApplyMode";
|
|
3235
|
+
AXPCommonSettings["ShowCategoryColumnsByDefault"] = "Common:Setting:Entity.ShowCategoryColumnsByDefault";
|
|
3236
|
+
AXPCommonSettings["ApplyLayoutOrdering"] = "Common:Setting:Entity.ApplyLayoutOrdering";
|
|
3237
|
+
AXPCommonSettings["RedirectToDetailsAfterCreate"] = "Common:Setting:Entity.RedirectToDetailsAfterCreate";
|
|
3238
|
+
AXPCommonSettings["ShowPageBadge"] = "Common:Setting:Entity.ShowPageBadge";
|
|
3239
|
+
AXPCommonSettings["DebugMode"] = "PlatformDevTools:Setting:Developer.DebugMode";
|
|
3240
|
+
AXPCommonSettings["ShowRowIndexColumn"] = "Common:Setting:Entity.ShowRowIndexColumn";
|
|
3241
|
+
AXPCommonSettings["EntityListPersistenceMode"] = "Common:Setting:Entity.ListPersistenceMode";
|
|
2651
3242
|
})(AXPCommonSettings || (AXPCommonSettings = {}));
|
|
2652
3243
|
|
|
2653
3244
|
//TODO Loading, Redirect, Drawer, Show toast
|
|
@@ -2672,10 +3263,10 @@ class AXPWorkflowNavigateAction extends AXPWorkflowAction {
|
|
|
2672
3263
|
this.router.navigate([payload.commands], payload.extras);
|
|
2673
3264
|
}
|
|
2674
3265
|
}
|
|
2675
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2676
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3266
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3267
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowNavigateAction }); }
|
|
2677
3268
|
}
|
|
2678
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3269
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowNavigateAction, decorators: [{
|
|
2679
3270
|
type: Injectable
|
|
2680
3271
|
}] });
|
|
2681
3272
|
class AXPDialogConfirmAction extends AXPWorkflowAction {
|
|
@@ -2691,10 +3282,10 @@ class AXPDialogConfirmAction extends AXPWorkflowAction {
|
|
|
2691
3282
|
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
3283
|
context.setOutput('result', dialogResult.result);
|
|
2693
3284
|
}
|
|
2694
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2695
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3285
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogConfirmAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3286
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogConfirmAction }); }
|
|
2696
3287
|
}
|
|
2697
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogConfirmAction, decorators: [{
|
|
2698
3289
|
type: Injectable
|
|
2699
3290
|
}] });
|
|
2700
3291
|
class AXPToastAction extends AXPWorkflowAction {
|
|
@@ -2717,20 +3308,20 @@ class AXPToastAction extends AXPWorkflowAction {
|
|
|
2717
3308
|
});
|
|
2718
3309
|
}
|
|
2719
3310
|
}
|
|
2720
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2721
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3311
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPToastAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3312
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPToastAction }); }
|
|
2722
3313
|
}
|
|
2723
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPToastAction, decorators: [{
|
|
2724
3315
|
type: Injectable
|
|
2725
3316
|
}] });
|
|
2726
3317
|
class AXPReloadAction extends AXPWorkflowAction {
|
|
2727
3318
|
async execute(context) {
|
|
2728
3319
|
this.dispatch(AXPReloadEvent({ entity: context.getVariable('entity'), meta: context.getVariable('meta') }));
|
|
2729
3320
|
}
|
|
2730
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2731
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3321
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReloadAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3322
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReloadAction }); }
|
|
2732
3323
|
}
|
|
2733
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReloadAction, decorators: [{
|
|
2734
3325
|
type: Injectable
|
|
2735
3326
|
}] });
|
|
2736
3327
|
|
|
@@ -2742,6 +3333,10 @@ class AXPWorkflowRouterNavigateAction extends AXPWorkflowAction {
|
|
|
2742
3333
|
async execute(context) {
|
|
2743
3334
|
const command = context.getVariable();
|
|
2744
3335
|
const path = command.options.path;
|
|
3336
|
+
if (!path) {
|
|
3337
|
+
console.error('Path is required for navigate workflow');
|
|
3338
|
+
return;
|
|
3339
|
+
}
|
|
2745
3340
|
if (path?.toLowerCase()?.startsWith('http') || command.options?.extras?.target === 'blank') {
|
|
2746
3341
|
window.open(path, '_blank');
|
|
2747
3342
|
}
|
|
@@ -2770,10 +3365,10 @@ class AXPWorkflowRouterNavigateAction extends AXPWorkflowAction {
|
|
|
2770
3365
|
return params;
|
|
2771
3366
|
}, {});
|
|
2772
3367
|
}
|
|
2773
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2774
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3368
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRouterNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3369
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRouterNavigateAction }); }
|
|
2775
3370
|
}
|
|
2776
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRouterNavigateAction, decorators: [{
|
|
2777
3372
|
type: Injectable
|
|
2778
3373
|
}] });
|
|
2779
3374
|
const AXPNavigateWorkflow = {
|
|
@@ -2798,10 +3393,10 @@ class AXMWorkflowErrorHandler {
|
|
|
2798
3393
|
next(error);
|
|
2799
3394
|
}
|
|
2800
3395
|
}
|
|
2801
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2802
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3396
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMWorkflowErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3397
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMWorkflowErrorHandler }); }
|
|
2803
3398
|
}
|
|
2804
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3399
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMWorkflowErrorHandler, decorators: [{
|
|
2805
3400
|
type: Injectable
|
|
2806
3401
|
}] });
|
|
2807
3402
|
|
|
@@ -2846,12 +3441,12 @@ class AXPCommonModule {
|
|
|
2846
3441
|
f();
|
|
2847
3442
|
});
|
|
2848
3443
|
}
|
|
2849
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2850
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
3444
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, deps: [{ token: 'AXPCommonModuleFactory' }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3445
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, imports: [i1.AXPWorkflowModule, AXPopupModule,
|
|
2851
3446
|
AXDateTimeModule,
|
|
2852
3447
|
AXToastModule,
|
|
2853
3448
|
AXPModuleManifestModule], exports: [RouterModule] }); }
|
|
2854
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
3449
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, providers: [
|
|
2855
3450
|
AXPAppStartUpProvider,
|
|
2856
3451
|
{
|
|
2857
3452
|
provide: ErrorHandler,
|
|
@@ -2880,11 +3475,16 @@ class AXPCommonModule {
|
|
|
2880
3475
|
useClass: AXPTokenEvaluatorScopeProvider,
|
|
2881
3476
|
multi: true,
|
|
2882
3477
|
},
|
|
3478
|
+
{
|
|
3479
|
+
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
3480
|
+
useClass: AXPSettingsEvaluatorScopeProvider,
|
|
3481
|
+
multi: true,
|
|
3482
|
+
},
|
|
2883
3483
|
{
|
|
2884
3484
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
2885
3485
|
useFactory: async () => {
|
|
2886
3486
|
const injector = inject(Injector);
|
|
2887
|
-
const provider = (await import('./acorex-platform-common-common-settings.provider-
|
|
3487
|
+
const provider = (await import('./acorex-platform-common-common-settings.provider-Bi1RYif5.mjs')).AXPCommonSettingProvider;
|
|
2888
3488
|
return new provider(injector);
|
|
2889
3489
|
},
|
|
2890
3490
|
multi: true,
|
|
@@ -2905,7 +3505,7 @@ class AXPCommonModule {
|
|
|
2905
3505
|
AXToastModule,
|
|
2906
3506
|
AXPModuleManifestModule, RouterModule] }); }
|
|
2907
3507
|
}
|
|
2908
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, decorators: [{
|
|
2909
3509
|
type: NgModule,
|
|
2910
3510
|
args: [{
|
|
2911
3511
|
imports: [
|
|
@@ -2955,11 +3555,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
2955
3555
|
useClass: AXPTokenEvaluatorScopeProvider,
|
|
2956
3556
|
multi: true,
|
|
2957
3557
|
},
|
|
3558
|
+
{
|
|
3559
|
+
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
3560
|
+
useClass: AXPSettingsEvaluatorScopeProvider,
|
|
3561
|
+
multi: true,
|
|
3562
|
+
},
|
|
2958
3563
|
{
|
|
2959
3564
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
2960
3565
|
useFactory: async () => {
|
|
2961
3566
|
const injector = inject(Injector);
|
|
2962
|
-
const provider = (await import('./acorex-platform-common-common-settings.provider-
|
|
3567
|
+
const provider = (await import('./acorex-platform-common-common-settings.provider-Bi1RYif5.mjs')).AXPCommonSettingProvider;
|
|
2963
3568
|
return new provider(injector);
|
|
2964
3569
|
},
|
|
2965
3570
|
multi: true,
|
|
@@ -2992,10 +3597,10 @@ function configPlatform(config = AXPPlatformDefaultConfigs) {
|
|
|
2992
3597
|
const AXP_ROOT_CONFIG_TOKEN = new InjectionToken('AXP_ROOT_CONFIG_TOKEN');
|
|
2993
3598
|
|
|
2994
3599
|
class AXPFileStorageService {
|
|
2995
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2996
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3600
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3601
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileStorageService }); }
|
|
2997
3602
|
}
|
|
2998
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3603
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileStorageService, decorators: [{
|
|
2999
3604
|
type: Injectable
|
|
3000
3605
|
}] });
|
|
3001
3606
|
|
|
@@ -3008,6 +3613,166 @@ var AXPFileStorageStatus;
|
|
|
3008
3613
|
AXPFileStorageStatus["Error"] = "error";
|
|
3009
3614
|
})(AXPFileStorageStatus || (AXPFileStorageStatus = {}));
|
|
3010
3615
|
|
|
3616
|
+
//#endregion
|
|
3617
|
+
//#region ---- Injection Token ----
|
|
3618
|
+
/**
|
|
3619
|
+
* Multi-provider injection token for file action providers.
|
|
3620
|
+
* Modules can provide multiple implementations using this token.
|
|
3621
|
+
*/
|
|
3622
|
+
const AXP_FILE_ACTION_PROVIDER = new InjectionToken('AXP_FILE_ACTION_PROVIDER');
|
|
3623
|
+
//#endregion
|
|
3624
|
+
|
|
3625
|
+
//#region ---- Service ----
|
|
3626
|
+
/**
|
|
3627
|
+
* Service for managing file uploader actions.
|
|
3628
|
+
* Aggregates actions from multiple providers and filters them based on plugin configuration.
|
|
3629
|
+
* Wraps the hook system for backward compatibility.
|
|
3630
|
+
*/
|
|
3631
|
+
class AXPFileActionsService {
|
|
3632
|
+
constructor() {
|
|
3633
|
+
//#region ---- Dependencies ----
|
|
3634
|
+
this.actionProviders = inject(AXP_FILE_ACTION_PROVIDER, { optional: true }) || [];
|
|
3635
|
+
this.hookService = inject(AXPHookService);
|
|
3636
|
+
this.injector = inject(Injector);
|
|
3637
|
+
}
|
|
3638
|
+
//#endregion
|
|
3639
|
+
//#region ---- Public API ----
|
|
3640
|
+
/**
|
|
3641
|
+
* Get all actions from providers, filtered based on plugin configuration.
|
|
3642
|
+
* Wraps the hook system for backward compatibility.
|
|
3643
|
+
* @param payload Initial payload with capabilities and plugin configuration.
|
|
3644
|
+
* @returns Filtered list of actions.
|
|
3645
|
+
*/
|
|
3646
|
+
async getActions(payload) {
|
|
3647
|
+
// First, run hook system for backward compatibility
|
|
3648
|
+
// Note: Hook system may still use old format with 'host', but we pass capabilities
|
|
3649
|
+
// Hook providers that need host will need to be migrated to use capabilities
|
|
3650
|
+
let hookPayload;
|
|
3651
|
+
try {
|
|
3652
|
+
hookPayload = await this.hookService.runAsync('file-uploader.actions', {
|
|
3653
|
+
...payload,
|
|
3654
|
+
// For backward compatibility, hooks might expect 'host' but we're using capabilities
|
|
3655
|
+
// Old hook providers will need to be migrated
|
|
3656
|
+
});
|
|
3657
|
+
}
|
|
3658
|
+
catch (err) {
|
|
3659
|
+
// If hook fails, continue with new system
|
|
3660
|
+
console.warn('[AXPFileActionsService] Hook system failed, continuing with providers only', err);
|
|
3661
|
+
}
|
|
3662
|
+
// Merge hook actions into payload (if any)
|
|
3663
|
+
const mergedPayload = {
|
|
3664
|
+
...payload,
|
|
3665
|
+
actions: hookPayload?.actions ?? payload.actions ?? [],
|
|
3666
|
+
};
|
|
3667
|
+
// Resolve all providers (handle both direct and Promise<provider>)
|
|
3668
|
+
const providers = await this.resolveProviders();
|
|
3669
|
+
// Filter providers by key
|
|
3670
|
+
const matchingProviders = providers
|
|
3671
|
+
.filter((p) => p.key === 'file-uploader.actions')
|
|
3672
|
+
.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
|
|
3673
|
+
// Execute providers sequentially (waterfall pattern)
|
|
3674
|
+
let currentPayload = { ...mergedPayload, actions: [...mergedPayload.actions] };
|
|
3675
|
+
for (const provider of matchingProviders) {
|
|
3676
|
+
try {
|
|
3677
|
+
currentPayload = await Promise.resolve(runInInjectionContext(this.injector, () => provider.execute(currentPayload)));
|
|
3678
|
+
}
|
|
3679
|
+
catch (err) {
|
|
3680
|
+
console.error(`[AXPFileActionsService] Provider '${provider.key}' failed`, err);
|
|
3681
|
+
}
|
|
3682
|
+
}
|
|
3683
|
+
// Filter actions based on plugin configuration
|
|
3684
|
+
return this.filterActions(currentPayload.actions, payload.plugins, payload.excludePlugins);
|
|
3685
|
+
}
|
|
3686
|
+
//#endregion
|
|
3687
|
+
//#region ---- Private Methods ----
|
|
3688
|
+
/**
|
|
3689
|
+
* Resolve all providers (handle both direct providers and Promise<provider>).
|
|
3690
|
+
*/
|
|
3691
|
+
async resolveProviders() {
|
|
3692
|
+
return Promise.all(this.actionProviders.map((p) => (p instanceof Promise ? p : Promise.resolve(p))));
|
|
3693
|
+
}
|
|
3694
|
+
/**
|
|
3695
|
+
* Filter actions based on enabled plugins and exclude list.
|
|
3696
|
+
*/
|
|
3697
|
+
filterActions(actions, enabledPlugins, excludePlugins) {
|
|
3698
|
+
const enabledPluginNames = enabledPlugins?.map((p) => p.name) ?? [];
|
|
3699
|
+
const excludedPluginNames = excludePlugins ?? [];
|
|
3700
|
+
return actions.filter((action) => {
|
|
3701
|
+
// Exclude if in exclude list
|
|
3702
|
+
if (excludedPluginNames.includes(action.plugin)) {
|
|
3703
|
+
return false;
|
|
3704
|
+
}
|
|
3705
|
+
// Include if global
|
|
3706
|
+
if (action.global === true) {
|
|
3707
|
+
return true;
|
|
3708
|
+
}
|
|
3709
|
+
// Include if plugin is explicitly enabled
|
|
3710
|
+
if (enabledPluginNames.length > 0 && enabledPluginNames.includes(action.plugin)) {
|
|
3711
|
+
return true;
|
|
3712
|
+
}
|
|
3713
|
+
// If no plugins are enabled, only show global actions
|
|
3714
|
+
if (enabledPluginNames.length === 0) {
|
|
3715
|
+
return !!action.global;
|
|
3716
|
+
}
|
|
3717
|
+
return false;
|
|
3718
|
+
});
|
|
3719
|
+
}
|
|
3720
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileActionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3721
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileActionsService, providedIn: 'root' }); }
|
|
3722
|
+
}
|
|
3723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileActionsService, decorators: [{
|
|
3724
|
+
type: Injectable,
|
|
3725
|
+
args: [{
|
|
3726
|
+
providedIn: 'root',
|
|
3727
|
+
}]
|
|
3728
|
+
}] });
|
|
3729
|
+
|
|
3730
|
+
//#endregion
|
|
3731
|
+
|
|
3732
|
+
const UploadFromComputerActionProvider = {
|
|
3733
|
+
key: 'file-uploader.actions',
|
|
3734
|
+
priority: 1, // Higher priority than upload-from-drive to show first
|
|
3735
|
+
execute: (payload) => {
|
|
3736
|
+
const fileService = inject(AXFileService);
|
|
3737
|
+
// Capture widget options for use in the action
|
|
3738
|
+
const widgetOptions = payload.options;
|
|
3739
|
+
payload.actions = [
|
|
3740
|
+
...payload.actions,
|
|
3741
|
+
{
|
|
3742
|
+
plugin: 'upload-from-computer',
|
|
3743
|
+
global: true,
|
|
3744
|
+
textKey: '@document-management:actions.upload-from-device',
|
|
3745
|
+
icon: 'fa-light fa-file-arrow-up',
|
|
3746
|
+
run: async (capabilities) => {
|
|
3747
|
+
// Open file picker with widget options
|
|
3748
|
+
const files = await fileService.choose({
|
|
3749
|
+
multiple: widgetOptions?.multiple ?? true,
|
|
3750
|
+
accept: widgetOptions?.accept,
|
|
3751
|
+
});
|
|
3752
|
+
// If no files are selected, return
|
|
3753
|
+
if (files.length === 0) {
|
|
3754
|
+
return;
|
|
3755
|
+
}
|
|
3756
|
+
// Create file list items from selected files
|
|
3757
|
+
const fileItems = files.map((file) => ({
|
|
3758
|
+
id: AXPDataGenerator.uuid(),
|
|
3759
|
+
name: file.name,
|
|
3760
|
+
size: file.size,
|
|
3761
|
+
status: 'attached',
|
|
3762
|
+
source: {
|
|
3763
|
+
kind: 'blob',
|
|
3764
|
+
value: file,
|
|
3765
|
+
},
|
|
3766
|
+
}));
|
|
3767
|
+
// Add files using capabilities
|
|
3768
|
+
capabilities.addFiles(fileItems);
|
|
3769
|
+
},
|
|
3770
|
+
},
|
|
3771
|
+
];
|
|
3772
|
+
return payload;
|
|
3773
|
+
},
|
|
3774
|
+
};
|
|
3775
|
+
|
|
3011
3776
|
const AXP_FILE_TYPE_INFO_PROVIDER = new InjectionToken('AXP_FILE_TYPE_INFO_PROVIDER');
|
|
3012
3777
|
class AXPFileTypeProviderService {
|
|
3013
3778
|
constructor() {
|
|
@@ -3025,19 +3790,19 @@ class AXPFileTypeProviderService {
|
|
|
3025
3790
|
async get(name) {
|
|
3026
3791
|
return (await this.items()).find((c) => c.name == name);
|
|
3027
3792
|
}
|
|
3028
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3029
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3793
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileTypeProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3794
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileTypeProviderService, providedIn: 'root' }); }
|
|
3030
3795
|
}
|
|
3031
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3796
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileTypeProviderService, decorators: [{
|
|
3032
3797
|
type: Injectable,
|
|
3033
3798
|
args: [{ providedIn: 'root' }]
|
|
3034
3799
|
}] });
|
|
3035
3800
|
|
|
3036
3801
|
class AXPLockService {
|
|
3037
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3038
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3802
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3803
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLockService }); }
|
|
3039
3804
|
}
|
|
3040
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLockService, decorators: [{
|
|
3041
3806
|
type: Injectable
|
|
3042
3807
|
}] });
|
|
3043
3808
|
|
|
@@ -3090,7 +3855,7 @@ const AXP_STATUS_PROVIDERS = new InjectionToken('AXP_STATUS_PROVIDERS');
|
|
|
3090
3855
|
* }
|
|
3091
3856
|
*
|
|
3092
3857
|
* // Later, get the status:
|
|
3093
|
-
* const status = statusService.getStatus('task-management.status');
|
|
3858
|
+
* const status = await statusService.getStatus('task-management.status');
|
|
3094
3859
|
* if (status) {
|
|
3095
3860
|
* console.log('Statuses:', status.statuses);
|
|
3096
3861
|
* console.log('Transitions:', status.transitions);
|
|
@@ -3098,8 +3863,6 @@ const AXP_STATUS_PROVIDERS = new InjectionToken('AXP_STATUS_PROVIDERS');
|
|
|
3098
3863
|
* ```
|
|
3099
3864
|
*/
|
|
3100
3865
|
class AXPStatusDefinitionProviderService {
|
|
3101
|
-
//#endregion
|
|
3102
|
-
//#region ---- Initialization ----
|
|
3103
3866
|
constructor() {
|
|
3104
3867
|
//#region ---- Dependencies ----
|
|
3105
3868
|
this.providers = inject(AXP_STATUS_PROVIDERS, { optional: true }) ?? [];
|
|
@@ -3109,8 +3872,9 @@ class AXPStatusDefinitionProviderService {
|
|
|
3109
3872
|
this.statusMap = new Map();
|
|
3110
3873
|
this.initializationPromise = null;
|
|
3111
3874
|
this.isInitialized = false;
|
|
3112
|
-
this.initialize();
|
|
3113
3875
|
}
|
|
3876
|
+
//#endregion
|
|
3877
|
+
//#region ---- Initialization ----
|
|
3114
3878
|
/**
|
|
3115
3879
|
* Initialize providers (resolve promises if needed)
|
|
3116
3880
|
* Called lazily on first access
|
|
@@ -3148,22 +3912,22 @@ class AXPStatusDefinitionProviderService {
|
|
|
3148
3912
|
//#region ---- Public API ----
|
|
3149
3913
|
/**
|
|
3150
3914
|
* Get a status provider by key
|
|
3151
|
-
*
|
|
3152
|
-
* including lazy-loaded providers (promises) which are resolved during initialization.
|
|
3915
|
+
* Ensures initialization is complete before accessing the status map.
|
|
3153
3916
|
*
|
|
3154
3917
|
* @param key - Status key (e.g., 'task-management.status')
|
|
3155
|
-
* @returns
|
|
3918
|
+
* @returns Promise that resolves to status provider with all statuses and transitions, or undefined if not found
|
|
3156
3919
|
*
|
|
3157
3920
|
* @example
|
|
3158
3921
|
* ```typescript
|
|
3159
|
-
* const status = statusService.getStatus('task-management.status');
|
|
3922
|
+
* const status = await statusService.getStatus('task-management.status');
|
|
3160
3923
|
* if (status) {
|
|
3161
3924
|
* console.log('Statuses:', status.statuses);
|
|
3162
3925
|
* console.log('Transitions:', status.transitions);
|
|
3163
3926
|
* }
|
|
3164
3927
|
* ```
|
|
3165
3928
|
*/
|
|
3166
|
-
getStatus(key) {
|
|
3929
|
+
async getStatus(key) {
|
|
3930
|
+
await this.initialize();
|
|
3167
3931
|
return this.statusMap.get(key);
|
|
3168
3932
|
}
|
|
3169
3933
|
/**
|
|
@@ -3208,7 +3972,7 @@ class AXPStatusDefinitionProviderService {
|
|
|
3208
3972
|
}
|
|
3209
3973
|
else {
|
|
3210
3974
|
// Use default Entity:UpdateStatus command
|
|
3211
|
-
const entity = context['entityName'] ?? context['__meta__']?.config?.name;
|
|
3975
|
+
const entity = context['entity'] ?? context['entityName'] ?? context['__meta__']?.config?.name;
|
|
3212
3976
|
if (!entity) {
|
|
3213
3977
|
throw new Error('Entity name is required in context when using default status update command');
|
|
3214
3978
|
}
|
|
@@ -3221,7 +3985,7 @@ class AXPStatusDefinitionProviderService {
|
|
|
3221
3985
|
commandOptions = {
|
|
3222
3986
|
entity,
|
|
3223
3987
|
status: transition.to,
|
|
3224
|
-
statusField: context['statusField'] ?? 'statusId',
|
|
3988
|
+
statusField: context['statusField'] ?? context['fieldName'] ?? 'statusId',
|
|
3225
3989
|
...(id ? { id } : {}),
|
|
3226
3990
|
...(ids ? { ids } : {}),
|
|
3227
3991
|
};
|
|
@@ -3229,7 +3993,8 @@ class AXPStatusDefinitionProviderService {
|
|
|
3229
3993
|
// Execute the command
|
|
3230
3994
|
const result = await this.commandService.execute(commandName, commandOptions);
|
|
3231
3995
|
if (!result?.success) {
|
|
3232
|
-
|
|
3996
|
+
const text = this.commandMessageTextForError(result?.message?.text);
|
|
3997
|
+
throw new Error(text || 'Failed to execute status transition command');
|
|
3233
3998
|
}
|
|
3234
3999
|
}
|
|
3235
4000
|
/**
|
|
@@ -3239,13 +4004,30 @@ class AXPStatusDefinitionProviderService {
|
|
|
3239
4004
|
isValidTransition(provider, from, to) {
|
|
3240
4005
|
return provider.transitions.some((transition) => transition.from === from && transition.to === to);
|
|
3241
4006
|
}
|
|
3242
|
-
|
|
3243
|
-
|
|
4007
|
+
/**
|
|
4008
|
+
* Best-effort plain string for {@link Error} messages (no i18n lookup).
|
|
4009
|
+
*/
|
|
4010
|
+
commandMessageTextForError(value) {
|
|
4011
|
+
if (value == null) {
|
|
4012
|
+
return '';
|
|
4013
|
+
}
|
|
4014
|
+
if (typeof value === 'string') {
|
|
4015
|
+
return value;
|
|
4016
|
+
}
|
|
4017
|
+
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
4018
|
+
const values = Object.values(value);
|
|
4019
|
+
const first = values.find((v) => typeof v === 'string' && v.length > 0);
|
|
4020
|
+
return first ?? '';
|
|
4021
|
+
}
|
|
4022
|
+
return String(value);
|
|
4023
|
+
}
|
|
4024
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStatusDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4025
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStatusDefinitionProviderService, providedIn: 'root' }); }
|
|
3244
4026
|
}
|
|
3245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4027
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStatusDefinitionProviderService, decorators: [{
|
|
3246
4028
|
type: Injectable,
|
|
3247
4029
|
args: [{ providedIn: 'root' }]
|
|
3248
|
-
}]
|
|
4030
|
+
}] });
|
|
3249
4031
|
|
|
3250
4032
|
/**
|
|
3251
4033
|
* Standard system status types
|
|
@@ -3589,10 +4371,10 @@ class AXPClipBoardService {
|
|
|
3589
4371
|
navigator.clipboard.writeText(value);
|
|
3590
4372
|
this.toast.success(`${title} copied!`);
|
|
3591
4373
|
}
|
|
3592
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3593
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4374
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPClipBoardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4375
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPClipBoardService, providedIn: 'root' }); }
|
|
3594
4376
|
}
|
|
3595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4377
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPClipBoardService, decorators: [{
|
|
3596
4378
|
type: Injectable,
|
|
3597
4379
|
args: [{
|
|
3598
4380
|
providedIn: 'root',
|
|
@@ -3706,10 +4488,10 @@ class AXPDebugService {
|
|
|
3706
4488
|
console.error('[AXPDebugService] Failed to display user access info:', error);
|
|
3707
4489
|
}
|
|
3708
4490
|
}
|
|
3709
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3710
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4491
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDebugService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4492
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDebugService, providedIn: 'root' }); }
|
|
3711
4493
|
}
|
|
3712
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4494
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDebugService, decorators: [{
|
|
3713
4495
|
type: Injectable,
|
|
3714
4496
|
args: [{
|
|
3715
4497
|
providedIn: 'root',
|
|
@@ -3719,15 +4501,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
3719
4501
|
class AXMOrgChartPrintPage extends AXBasePageComponent {
|
|
3720
4502
|
constructor() {
|
|
3721
4503
|
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" }] : []));
|
|
4504
|
+
this.ratio = signal(false, ...(ngDevMode ? [{ debugName: "ratio" }] : /* istanbul ignore next */ []));
|
|
4505
|
+
this.baseWidth = signal(undefined, ...(ngDevMode ? [{ debugName: "baseWidth" }] : /* istanbul ignore next */ []));
|
|
4506
|
+
this.baseHeight = signal(undefined, ...(ngDevMode ? [{ debugName: "baseHeight" }] : /* istanbul ignore next */ []));
|
|
4507
|
+
this.bgcolor = model(...(ngDevMode ? [undefined, { debugName: "bgcolor" }] : /* istanbul ignore next */ []));
|
|
4508
|
+
this.width = model(...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
|
|
4509
|
+
this.height = model(...(ngDevMode ? [undefined, { debugName: "height" }] : /* istanbul ignore next */ []));
|
|
4510
|
+
this.quality = model(...(ngDevMode ? [undefined, { debugName: "quality" }] : /* istanbul ignore next */ []));
|
|
4511
|
+
this.qualityComputed = linkedSignal(() => (this.data.quality ?? 1) * 100, ...(ngDevMode ? [{ debugName: "qualityComputed" }] : /* istanbul ignore next */ []));
|
|
4512
|
+
this.scale = model(...(ngDevMode ? [undefined, { debugName: "scale" }] : /* istanbul ignore next */ []));
|
|
3731
4513
|
this.#init = afterNextRender(() => {
|
|
3732
4514
|
this.bgcolor.set(this.data.bgcolor);
|
|
3733
4515
|
this.width.set(this.data.width);
|
|
@@ -3764,8 +4546,8 @@ class AXMOrgChartPrintPage extends AXBasePageComponent {
|
|
|
3764
4546
|
isCanceled,
|
|
3765
4547
|
});
|
|
3766
4548
|
}
|
|
3767
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3768
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
4549
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOrgChartPrintPage, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4550
|
+
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
4551
|
<ax-label>Resolution (px)</ax-label>
|
|
3770
4552
|
<div class="ax-flex ax-gap-2 ax-items-center">
|
|
3771
4553
|
<ax-number-box
|
|
@@ -3816,7 +4598,7 @@ class AXMOrgChartPrintPage extends AXBasePageComponent {
|
|
|
3816
4598
|
</ax-suffix>
|
|
3817
4599
|
</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
4600
|
}
|
|
3819
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOrgChartPrintPage, decorators: [{
|
|
3820
4602
|
type: Component,
|
|
3821
4603
|
args: [{
|
|
3822
4604
|
template: ` <div class="ax-grid ax-grid-cols-[auto_18rem] ax-gap-4 ax-justify-center ax-p-4 ax-items-center">
|
|
@@ -3930,10 +4712,10 @@ class AXPExportService {
|
|
|
3930
4712
|
document.body.removeChild(link);
|
|
3931
4713
|
URL.revokeObjectURL(link.href);
|
|
3932
4714
|
}
|
|
3933
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3934
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4715
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4716
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExportService, providedIn: 'root' }); }
|
|
3935
4717
|
}
|
|
3936
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExportService, decorators: [{
|
|
3937
4719
|
type: Injectable,
|
|
3938
4720
|
args: [{
|
|
3939
4721
|
providedIn: 'root',
|
|
@@ -3963,6 +4745,8 @@ function AXPCleanNestedFilters(filters) {
|
|
|
3963
4745
|
.filter(Boolean);
|
|
3964
4746
|
}
|
|
3965
4747
|
|
|
4748
|
+
const AXP_LOCALE_MANAGEMENT_PORT = new InjectionToken('AXP_LOCALE_MANAGEMENT_PORT');
|
|
4749
|
+
|
|
3966
4750
|
//#region ---- Versioning Types ----
|
|
3967
4751
|
var AXVChangeType;
|
|
3968
4752
|
(function (AXVChangeType) {
|
|
@@ -3980,5 +4764,5 @@ class AXPVersioningService {
|
|
|
3980
4764
|
* Generated bundle index. Do not edit.
|
|
3981
4765
|
*/
|
|
3982
4766
|
|
|
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 };
|
|
4767
|
+
export { ALL_DEFAULT_OPERATORS, AXMWorkflowErrorHandler, AXPAppVersionService, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPCommonSettings, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataProvider, AXPDebugService, AXPDefaultMultiLanguageConfigService, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityQueryType, AXPEntityType, AXPErrorHandlerRegistryService, AXPExportService, AXPFileActionsService, AXPFileStorageService, AXPFileStorageStatus, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPHomePageModule, AXPHomePageService, AXPLockService, AXPMenuItemsDataSourceDefinition, 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, AXPSettingsEvaluatorScopeProvider, AXPSettingsService, AXPStatusDefinitionProviderService, AXPStatusProvider, AXPStickyDirective, AXPSystemStatusType, AXPSystemStatuses, AXPToastAction, AXPTokenDefinitionService, AXPTokenEvaluatorScopeProvider, AXPVersioningService, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, 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_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_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, coerceAXPSettingRawValue, coerceAXPSettingRawValueByKind, configPlatform, createAllQueryView, createEntityCommandOptions, createEntitySearchCommand, createMenuContext, createMenuMiddleware, createQueryView, getEntityInfo, getStatusInfo, getSystemStatus, inferSettingCoercionKind, peelSettingValueKey, provideDynamicHomePage, provideMenuMiddleware, resolveStatusLook, shouldApplyDefaultMultiLanguageToEntityProperty, shouldApplyDefaultMultiLanguageToWidgetNode, shouldApplyDefaultMultiLanguageToWidgetProperty, systemStatusToDefinition, withDefaultMultiLanguageOnWidgetNodeTree, withDefaultMultiLanguageOnWidgetProperty };
|
|
3984
4768
|
//# sourceMappingURL=acorex-platform-common.mjs.map
|