@acorex/platform 21.0.0-next.3 → 21.0.0-next.33
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 +295 -45
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-zhqNP3xb.mjs → acorex-platform-common-common-settings.provider-G9XcXXOG.mjs} +60 -4
- package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +960 -319
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +1352 -832
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +554 -826
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +530 -154
- 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 +5969 -2347
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +169 -154
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +15380 -9274
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +393 -110
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +511 -450
- 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-CxrsI6Hn.mjs → acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs} +39 -16
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.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-BGQqY5Mw.mjs +111 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.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 +7865 -4026
- 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 +220 -169
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.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-C2z5Lq9y.mjs} +18 -25
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.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 +1717 -66
- 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.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs} +11 -11
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs} +9 -9
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +563 -561
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +1735 -1750
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/package.json +31 -31
- package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +247 -10
- package/{common/index.d.ts → types/acorex-platform-common.d.ts} +492 -31
- package/{core/index.d.ts → types/acorex-platform-core.d.ts} +606 -392
- package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +719 -413
- package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +128 -56
- package/types/acorex-platform-layout-components.d.ts +2927 -0
- package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +9 -3
- package/{layout/entity/index.d.ts → types/acorex-platform-layout-entity.d.ts} +1133 -237
- package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +90 -31
- package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +206 -102
- package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +942 -137
- package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
- package/{runtime/index.d.ts → types/acorex-platform-runtime.d.ts} +237 -74
- package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +113 -5
- package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +1 -1
- package/types/acorex-platform-workflow.d.ts +1806 -0
- 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.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-theme-color-chooser-column.component-DTnfRy5f.mjs.map +0 -1
- 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/workflow/index.d.ts +0 -2443
- /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
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 {
|
|
7
|
+
import { AXPPlatformScope, AXPBroadcastEventService, objectKeyValueTransforms, AXPSystemActionType, AXPModuleManifestModule, AXPAppStartUpProvider, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXPHookService, AXPDataGenerator, AXPModuleManifestRegistry } from '@acorex/platform/core';
|
|
8
8
|
import { AXTranslationService } from '@acorex/core/translation';
|
|
9
9
|
import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
|
|
10
10
|
import { AXPopupModule, AXPopupService } from '@acorex/components/popup';
|
|
@@ -12,10 +12,12 @@ import { AXToastService, AXToastModule } from '@acorex/components/toast';
|
|
|
12
12
|
import { AXDateTimeModule } from '@acorex/core/date-time';
|
|
13
13
|
import * as i1 from '@acorex/platform/workflow';
|
|
14
14
|
import { AXPWorkflowService, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowError, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
15
|
+
import { AXDataSource } from '@acorex/cdk/common';
|
|
15
16
|
import { AXPCommandExecutor, AXPCommandService } from '@acorex/platform/runtime';
|
|
16
17
|
import { signalStore, withState, withMethods, patchState, withHooks } from '@ngrx/signals';
|
|
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,6 +209,120 @@ 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
|
+
|
|
242
|
+
const AXP_SETTING_VALUE_PROVIDER = new InjectionToken('AXP_SETTING_VALUE_PROVIDER', {
|
|
243
|
+
providedIn: 'root',
|
|
244
|
+
factory: () => {
|
|
245
|
+
const injector = inject(Injector);
|
|
246
|
+
return [
|
|
247
|
+
new AXPSettingValueProviderDefault(AXPPlatformScope.Platform, injector),
|
|
248
|
+
new AXPSettingValueProviderDefault(AXPPlatformScope.Tenant, injector),
|
|
249
|
+
new AXPSettingValueProviderDefault(AXPPlatformScope.User, injector)
|
|
250
|
+
];
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
class AXPSettingValueProviderDefault {
|
|
254
|
+
constructor(_scope, injector) {
|
|
255
|
+
this._scope = _scope;
|
|
256
|
+
this.injector = injector;
|
|
257
|
+
this.cache = new Map();
|
|
258
|
+
this.localStorageKey = null;
|
|
259
|
+
this.sessionService = this.injector.get(AXPSessionService);
|
|
260
|
+
// Platform scope doesn't depend on session, initialize immediately
|
|
261
|
+
if (this.scope === AXPPlatformScope.Platform) {
|
|
262
|
+
this.localStorageKey = `AXP_SETTINGS_SCOPE(P)`;
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
this.sessionService.status$.subscribe((status) => {
|
|
266
|
+
if (status === AXPSessionStatus.Authorized || status === AXPSessionStatus.Authenticated) {
|
|
267
|
+
if (this.scope === AXPPlatformScope.User) {
|
|
268
|
+
this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.sessionService.user?.id ?? 'U'})`;
|
|
269
|
+
}
|
|
270
|
+
else if (this.scope === AXPPlatformScope.Tenant) {
|
|
271
|
+
this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.sessionService.tenant?.id ?? 'T'})`;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
get scope() {
|
|
278
|
+
return this._scope;
|
|
279
|
+
}
|
|
280
|
+
async load() {
|
|
281
|
+
if (!this.localStorageKey) {
|
|
282
|
+
return Promise.resolve([]);
|
|
283
|
+
}
|
|
284
|
+
// Load settings from localStorage as a single key
|
|
285
|
+
const storedSettings = localStorage.getItem(this.localStorageKey);
|
|
286
|
+
if (storedSettings) {
|
|
287
|
+
const parsedSettings = JSON.parse(storedSettings);
|
|
288
|
+
Object.entries(parsedSettings).forEach(([key, value]) => {
|
|
289
|
+
this.cache.set(key, value);
|
|
290
|
+
});
|
|
291
|
+
return Promise.resolve(Array.from(this.cache.entries()).map(c => ({ key: c[0], value: c[1] })));
|
|
292
|
+
}
|
|
293
|
+
return Promise.resolve([]);
|
|
294
|
+
}
|
|
295
|
+
async set(keyOrValues, value) {
|
|
296
|
+
if (typeof keyOrValues === 'string') {
|
|
297
|
+
// Single value update
|
|
298
|
+
this.cache.set(keyOrValues, value);
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
// Bulk update
|
|
302
|
+
for (const [key, val] of Object.entries(keyOrValues)) {
|
|
303
|
+
this.cache.set(key, val);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
await this.saveToLocalStorage();
|
|
307
|
+
}
|
|
308
|
+
async saveToLocalStorage() {
|
|
309
|
+
if (!this.localStorageKey) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
const settingsObject = {};
|
|
313
|
+
this.cache.forEach((value, key) => {
|
|
314
|
+
settingsObject[key] = value;
|
|
315
|
+
});
|
|
316
|
+
localStorage.setItem(this.localStorageKey, JSON.stringify(settingsObject));
|
|
317
|
+
}
|
|
318
|
+
async clear() {
|
|
319
|
+
if (!this.localStorageKey) {
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
localStorage.removeItem(this.localStorageKey);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
203
326
|
class AXPSettingDefinitionProviderContext {
|
|
204
327
|
constructor() {
|
|
205
328
|
this.rootGroups = [];
|
|
@@ -293,7 +416,7 @@ class AXPSettingDefinitionSectionBuilder {
|
|
|
293
416
|
isInherited: setting.isInherited ?? false,
|
|
294
417
|
isEncrypted: setting.isEncrypted ?? false,
|
|
295
418
|
defaultValue: setting.defaultValue,
|
|
296
|
-
scope: setting.scope ?? '
|
|
419
|
+
scope: setting.scope ?? 'P',
|
|
297
420
|
layout: setting.widget.layout,
|
|
298
421
|
widget: {
|
|
299
422
|
type: setting.widget.type,
|
|
@@ -321,7 +444,6 @@ const AXP_SETTING_DEFINITION_PROVIDER = new InjectionToken('AXP_SETTING_DEFINITI
|
|
|
321
444
|
class AXPSettingDefinitionProviderService {
|
|
322
445
|
constructor() {
|
|
323
446
|
this.providers = inject(AXP_SETTING_DEFINITION_PROVIDER, { optional: true });
|
|
324
|
-
this.providerRegistry = inject(AXPModuleProviderRegistry);
|
|
325
447
|
this.cache = null;
|
|
326
448
|
}
|
|
327
449
|
async load() {
|
|
@@ -329,7 +451,7 @@ class AXPSettingDefinitionProviderService {
|
|
|
329
451
|
return;
|
|
330
452
|
}
|
|
331
453
|
const context = new AXPSettingDefinitionProviderContext();
|
|
332
|
-
// Load providers from DI tokens
|
|
454
|
+
// Load providers from DI tokens
|
|
333
455
|
if (Array.isArray(this.providers)) {
|
|
334
456
|
for (const provider of this.providers) {
|
|
335
457
|
if (provider instanceof Promise) {
|
|
@@ -343,11 +465,6 @@ class AXPSettingDefinitionProviderService {
|
|
|
343
465
|
}
|
|
344
466
|
}
|
|
345
467
|
}
|
|
346
|
-
// Load providers from registry (manifest-based, conditionally loaded)
|
|
347
|
-
const registryProviders = this.providerRegistry.getSettingProviders();
|
|
348
|
-
for (const provider of registryProviders) {
|
|
349
|
-
await provider.provide(context);
|
|
350
|
-
}
|
|
351
468
|
this.cache = context.getGroups();
|
|
352
469
|
}
|
|
353
470
|
async reload() {
|
|
@@ -362,7 +479,7 @@ class AXPSettingDefinitionProviderService {
|
|
|
362
479
|
if (!this.cache) {
|
|
363
480
|
return [];
|
|
364
481
|
}
|
|
365
|
-
const scopeOrder = ['
|
|
482
|
+
const scopeOrder = ['P', 'T', 'U']; // Scopes hierarchy in ascending order
|
|
366
483
|
const filterByScope = (groups, currentScope) => {
|
|
367
484
|
const currentScopeIndex = scopeOrder.indexOf(currentScope);
|
|
368
485
|
return groups
|
|
@@ -439,10 +556,10 @@ class AXPSettingDefinitionProviderService {
|
|
|
439
556
|
sections: []
|
|
440
557
|
};
|
|
441
558
|
}
|
|
442
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
443
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
559
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
560
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefinitionProviderService, providedIn: 'root' }); }
|
|
444
561
|
}
|
|
445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
562
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefinitionProviderService, decorators: [{
|
|
446
563
|
type: Injectable,
|
|
447
564
|
args: [{ providedIn: 'root' }]
|
|
448
565
|
}] });
|
|
@@ -472,91 +589,14 @@ class AXPSettingDefaultValuesAggregatorService {
|
|
|
472
589
|
}
|
|
473
590
|
return merged;
|
|
474
591
|
}
|
|
475
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
476
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
592
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefaultValuesAggregatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
593
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefaultValuesAggregatorService, providedIn: 'root' }); }
|
|
477
594
|
}
|
|
478
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
595
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefaultValuesAggregatorService, decorators: [{
|
|
479
596
|
type: Injectable,
|
|
480
597
|
args: [{ providedIn: 'root' }]
|
|
481
598
|
}] });
|
|
482
599
|
|
|
483
|
-
const AXP_SETTING_VALUE_PROVIDER = new InjectionToken('AXP_SETTING_VALUE_PROVIDER', {
|
|
484
|
-
providedIn: 'root',
|
|
485
|
-
factory: () => {
|
|
486
|
-
const injector = inject(Injector);
|
|
487
|
-
return [
|
|
488
|
-
new AXPSettingValueProviderDefault(AXPPlatformScope.Tenant, injector),
|
|
489
|
-
new AXPSettingValueProviderDefault(AXPPlatformScope.User, injector)
|
|
490
|
-
];
|
|
491
|
-
}
|
|
492
|
-
});
|
|
493
|
-
class AXPSettingValueProviderDefault {
|
|
494
|
-
constructor(_scope, injector) {
|
|
495
|
-
this._scope = _scope;
|
|
496
|
-
this.injector = injector;
|
|
497
|
-
this.cache = new Map();
|
|
498
|
-
this.localStorageKey = null;
|
|
499
|
-
this.sessionService = this.injector.get(AXPSessionService);
|
|
500
|
-
this.sessionService.status$.subscribe((status) => {
|
|
501
|
-
if (status === AXPSessionStatus.Authorized || status === AXPSessionStatus.Authenticated) {
|
|
502
|
-
if (this.scope === AXPPlatformScope.User) {
|
|
503
|
-
this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.sessionService.user?.id ?? 'U'})`;
|
|
504
|
-
}
|
|
505
|
-
else {
|
|
506
|
-
this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.sessionService.tenant?.id ?? 'T'})`;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
}
|
|
511
|
-
get scope() {
|
|
512
|
-
return this._scope;
|
|
513
|
-
}
|
|
514
|
-
async load() {
|
|
515
|
-
if (!this.localStorageKey) {
|
|
516
|
-
return Promise.resolve([]);
|
|
517
|
-
}
|
|
518
|
-
// Load settings from localStorage as a single key
|
|
519
|
-
const storedSettings = localStorage.getItem(this.localStorageKey);
|
|
520
|
-
if (storedSettings) {
|
|
521
|
-
const parsedSettings = JSON.parse(storedSettings);
|
|
522
|
-
Object.entries(parsedSettings).forEach(([key, value]) => {
|
|
523
|
-
this.cache.set(key, value);
|
|
524
|
-
});
|
|
525
|
-
return Promise.resolve(Array.from(this.cache.entries()).map(c => ({ key: c[0], value: c[1] })));
|
|
526
|
-
}
|
|
527
|
-
return Promise.resolve([]);
|
|
528
|
-
}
|
|
529
|
-
async set(keyOrValues, value) {
|
|
530
|
-
if (typeof keyOrValues === 'string') {
|
|
531
|
-
// Single value update
|
|
532
|
-
this.cache.set(keyOrValues, value);
|
|
533
|
-
}
|
|
534
|
-
else {
|
|
535
|
-
// Bulk update
|
|
536
|
-
for (const [key, val] of Object.entries(keyOrValues)) {
|
|
537
|
-
this.cache.set(key, val);
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
await this.saveToLocalStorage();
|
|
541
|
-
}
|
|
542
|
-
async saveToLocalStorage() {
|
|
543
|
-
if (!this.localStorageKey) {
|
|
544
|
-
return;
|
|
545
|
-
}
|
|
546
|
-
const settingsObject = {};
|
|
547
|
-
this.cache.forEach((value, key) => {
|
|
548
|
-
settingsObject[key] = value;
|
|
549
|
-
});
|
|
550
|
-
localStorage.setItem(this.localStorageKey, JSON.stringify(settingsObject));
|
|
551
|
-
}
|
|
552
|
-
async clear() {
|
|
553
|
-
if (!this.localStorageKey) {
|
|
554
|
-
return;
|
|
555
|
-
}
|
|
556
|
-
localStorage.removeItem(this.localStorageKey);
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
|
|
560
600
|
class AXPSettingsService {
|
|
561
601
|
constructor() {
|
|
562
602
|
this.providers = inject(AXP_SETTING_VALUE_PROVIDER);
|
|
@@ -568,8 +608,7 @@ class AXPSettingsService {
|
|
|
568
608
|
this.onLoaded = new Subject();
|
|
569
609
|
// Initialize scoped caches for dynamic scopes
|
|
570
610
|
const staticScopes = [
|
|
571
|
-
AXPPlatformScope.
|
|
572
|
-
AXPPlatformScope.Global,
|
|
611
|
+
AXPPlatformScope.Platform,
|
|
573
612
|
AXPPlatformScope.Tenant,
|
|
574
613
|
AXPPlatformScope.User,
|
|
575
614
|
];
|
|
@@ -622,8 +661,7 @@ class AXPSettingsService {
|
|
|
622
661
|
const scopeOrder = [
|
|
623
662
|
AXPPlatformScope.User,
|
|
624
663
|
AXPPlatformScope.Tenant,
|
|
625
|
-
AXPPlatformScope.
|
|
626
|
-
AXPPlatformScope.Environment,
|
|
664
|
+
AXPPlatformScope.Platform,
|
|
627
665
|
];
|
|
628
666
|
for (const scope of scopeOrder) {
|
|
629
667
|
const scopeCache = this.scopedSettingsCache.get(scope);
|
|
@@ -639,8 +677,7 @@ class AXPSettingsService {
|
|
|
639
677
|
}
|
|
640
678
|
async defaultValues(scope) {
|
|
641
679
|
let scopeOrder = [
|
|
642
|
-
AXPPlatformScope.
|
|
643
|
-
AXPPlatformScope.Global,
|
|
680
|
+
AXPPlatformScope.Platform,
|
|
644
681
|
AXPPlatformScope.Tenant,
|
|
645
682
|
AXPPlatformScope.User,
|
|
646
683
|
].reverse();
|
|
@@ -677,10 +714,10 @@ class AXPSettingsService {
|
|
|
677
714
|
this.onChanged.next(event);
|
|
678
715
|
this.eventService.publish('AXPSettingChangedEvent', event);
|
|
679
716
|
}
|
|
680
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
681
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
717
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
718
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsService, providedIn: 'root' }); }
|
|
682
719
|
}
|
|
683
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsService, decorators: [{
|
|
684
721
|
type: Injectable,
|
|
685
722
|
args: [{
|
|
686
723
|
providedIn: 'root',
|
|
@@ -736,34 +773,219 @@ class ScopedSettingService {
|
|
|
736
773
|
}
|
|
737
774
|
}
|
|
738
775
|
|
|
776
|
+
const DEFAULT_APPLY_DEFAULT_MULTILANGUAGE = true;
|
|
739
777
|
/**
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
778
|
+
* Synchronous access to default multi-language behavior for named entity fields and widget
|
|
779
|
+
* property bindings. Mirrors {@link AXPLayoutOrderingConfigService}: avoids async in entity
|
|
780
|
+
* modifiers and startup deadlocks.
|
|
743
781
|
*/
|
|
744
|
-
|
|
745
|
-
(
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
}
|
|
782
|
+
class AXPDefaultMultiLanguageConfigService {
|
|
783
|
+
constructor() {
|
|
784
|
+
this.settingsService = inject(AXPSettingsService);
|
|
785
|
+
this._applyDefault = signal(DEFAULT_APPLY_DEFAULT_MULTILANGUAGE, ...(ngDevMode ? [{ debugName: "_applyDefault" }] : /* istanbul ignore next */ []));
|
|
786
|
+
this.syncScheduled = false;
|
|
787
|
+
this.settingsService.onLoaded.subscribe(() => this.syncFromSettings());
|
|
788
|
+
this.settingsService.onChanged.subscribe(() => this.syncFromSettings());
|
|
789
|
+
}
|
|
790
|
+
getApplyDefaultMultiLanguage() {
|
|
791
|
+
if (!this.syncScheduled) {
|
|
792
|
+
this.syncScheduled = true;
|
|
793
|
+
this.settingsService
|
|
794
|
+
.get(AXPRegionalSetting.MultiLanguageSupport)
|
|
795
|
+
.then((value) => this._applyDefault.set(value ?? DEFAULT_APPLY_DEFAULT_MULTILANGUAGE))
|
|
796
|
+
.catch(() => this._applyDefault.set(DEFAULT_APPLY_DEFAULT_MULTILANGUAGE));
|
|
797
|
+
}
|
|
798
|
+
return this._applyDefault();
|
|
799
|
+
}
|
|
800
|
+
async syncFromSettings() {
|
|
801
|
+
try {
|
|
802
|
+
const value = await this.settingsService.get(AXPRegionalSetting.MultiLanguageSupport);
|
|
803
|
+
this._applyDefault.set(value ?? DEFAULT_APPLY_DEFAULT_MULTILANGUAGE);
|
|
804
|
+
}
|
|
805
|
+
catch {
|
|
806
|
+
this._applyDefault.set(DEFAULT_APPLY_DEFAULT_MULTILANGUAGE);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultMultiLanguageConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
810
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultMultiLanguageConfigService, providedIn: 'root' }); }
|
|
811
|
+
}
|
|
812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultMultiLanguageConfigService, decorators: [{
|
|
813
|
+
type: Injectable,
|
|
814
|
+
args: [{ providedIn: 'root' }]
|
|
815
|
+
}], ctorParameters: () => [] });
|
|
816
|
+
|
|
817
|
+
//#region ---- Constants ----
|
|
818
|
+
/**
|
|
819
|
+
* Widget types that support the multiLanguage option (text / rich text editors).
|
|
820
|
+
*/
|
|
821
|
+
const MULTILANGUAGE_CAPABLE_WIDGET_TYPES = new Set([
|
|
822
|
+
'text-editor',
|
|
823
|
+
'large-text-editor',
|
|
824
|
+
'rich-text-editor',
|
|
825
|
+
'template-content-editor',
|
|
826
|
+
]);
|
|
827
|
+
/**
|
|
828
|
+
* Common property names / binding path segments that are usually translatable when the feature is
|
|
829
|
+
* enabled in settings. Explicit `multiLanguage` on the property still wins.
|
|
830
|
+
*/
|
|
831
|
+
const DEFAULT_MULTILANGUAGE_FIELD_NAMES = new Set([
|
|
832
|
+
'title',
|
|
833
|
+
'description',
|
|
834
|
+
'note',
|
|
835
|
+
'content',
|
|
836
|
+
/** e.g. `post.summaryContent` — last path segment */
|
|
837
|
+
'summaryContent',
|
|
838
|
+
'question',
|
|
839
|
+
'summary',
|
|
840
|
+
'body',
|
|
841
|
+
'caption',
|
|
842
|
+
'remarks',
|
|
843
|
+
'subtitle',
|
|
844
|
+
'label',
|
|
845
|
+
'placeholder',
|
|
846
|
+
'message',
|
|
847
|
+
'subject',
|
|
848
|
+
]);
|
|
849
|
+
//#endregion
|
|
850
|
+
//#region ---- Helpers ----
|
|
851
|
+
function interfacePathLastSegment(path) {
|
|
852
|
+
if (path == null || typeof path !== 'string' || !path.length) {
|
|
853
|
+
return null;
|
|
854
|
+
}
|
|
855
|
+
const seg = path.includes('.') ? path.split('.').pop() : path;
|
|
856
|
+
return seg && seg.length ? seg : null;
|
|
857
|
+
}
|
|
858
|
+
function shouldApplyDefaultMultiLanguageToEntityProperty(prop) {
|
|
859
|
+
if (prop.schema.dataType !== 'string') {
|
|
860
|
+
return false;
|
|
861
|
+
}
|
|
862
|
+
if (!DEFAULT_MULTILANGUAGE_FIELD_NAMES.has(prop.name)) {
|
|
863
|
+
return false;
|
|
864
|
+
}
|
|
865
|
+
const widgetType = prop.schema.interface?.type;
|
|
866
|
+
if (typeof widgetType !== 'string' || !MULTILANGUAGE_CAPABLE_WIDGET_TYPES.has(widgetType)) {
|
|
867
|
+
return false;
|
|
868
|
+
}
|
|
869
|
+
const opts = prop.schema.interface?.options;
|
|
870
|
+
if (opts && 'multiLanguage' in opts) {
|
|
871
|
+
return false;
|
|
872
|
+
}
|
|
873
|
+
return true;
|
|
874
|
+
}
|
|
875
|
+
function shouldApplyDefaultMultiLanguageToWidgetProperty(prop) {
|
|
876
|
+
if (prop.schema.dataType !== 'string') {
|
|
877
|
+
return false;
|
|
878
|
+
}
|
|
879
|
+
const key = interfacePathLastSegment(prop.schema.interface.path);
|
|
880
|
+
if (!key || !DEFAULT_MULTILANGUAGE_FIELD_NAMES.has(key)) {
|
|
881
|
+
return false;
|
|
882
|
+
}
|
|
883
|
+
const widgetType = prop.schema.interface.type;
|
|
884
|
+
if (typeof widgetType !== 'string' || !MULTILANGUAGE_CAPABLE_WIDGET_TYPES.has(widgetType)) {
|
|
885
|
+
return false;
|
|
886
|
+
}
|
|
887
|
+
const opts = prop.schema.interface.options;
|
|
888
|
+
if (opts && 'multiLanguage' in opts) {
|
|
889
|
+
return false;
|
|
890
|
+
}
|
|
891
|
+
return true;
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* Leaf widget nodes in entity `schema.interface` trees (e.g. GridLayout → RichText under `pre` /
|
|
895
|
+
* `post`) — same path/type rules as {@link shouldApplyDefaultMultiLanguageToWidgetProperty}, without
|
|
896
|
+
* `schema.dataType` (nodes do not carry entity schema).
|
|
897
|
+
*/
|
|
898
|
+
function shouldApplyDefaultMultiLanguageToWidgetNode(node) {
|
|
899
|
+
const widgetType = node.type;
|
|
900
|
+
if (typeof widgetType !== 'string' || !MULTILANGUAGE_CAPABLE_WIDGET_TYPES.has(widgetType)) {
|
|
901
|
+
return false;
|
|
902
|
+
}
|
|
903
|
+
const key = interfacePathLastSegment(node.path);
|
|
904
|
+
if (!key || !DEFAULT_MULTILANGUAGE_FIELD_NAMES.has(key)) {
|
|
905
|
+
return false;
|
|
906
|
+
}
|
|
907
|
+
const opts = node.options;
|
|
908
|
+
if (opts && 'multiLanguage' in opts) {
|
|
909
|
+
return false;
|
|
910
|
+
}
|
|
911
|
+
return true;
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* When {@link AXPDefaultMultiLanguageConfigService#getApplyDefaultMultiLanguage} is true, sets
|
|
915
|
+
* `options.multiLanguage` on eligible editor leaves inside an entity property's widget tree
|
|
916
|
+
* (including nested layouts). Used by entity middleware so object fields (e.g. `pre`, `post`) are
|
|
917
|
+
* covered, not only top-level string properties.
|
|
918
|
+
*/
|
|
919
|
+
function withDefaultMultiLanguageOnWidgetNodeTree(root, applyDefault) {
|
|
920
|
+
if (root == null || !applyDefault) {
|
|
921
|
+
return root ?? undefined;
|
|
922
|
+
}
|
|
923
|
+
return visitWidgetNodeForDefaultMultiLanguage(root);
|
|
924
|
+
}
|
|
925
|
+
function visitWidgetNodeForDefaultMultiLanguage(node) {
|
|
926
|
+
let next = node;
|
|
927
|
+
if (node.children?.length) {
|
|
928
|
+
const newChildren = node.children.map((child) => visitWidgetNodeForDefaultMultiLanguage(child));
|
|
929
|
+
if (newChildren.some((c, i) => c !== node.children[i])) {
|
|
930
|
+
next = { ...node, children: newChildren };
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
if (shouldApplyDefaultMultiLanguageToWidgetNode(next)) {
|
|
934
|
+
return {
|
|
935
|
+
...next,
|
|
936
|
+
options: {
|
|
937
|
+
...(next.options ?? {}),
|
|
938
|
+
multiLanguage: true,
|
|
939
|
+
},
|
|
940
|
+
};
|
|
941
|
+
}
|
|
942
|
+
return next;
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* When {@link AXPDefaultMultiLanguageConfigService#getApplyDefaultMultiLanguage} is true, sets
|
|
946
|
+
* `schema.interface.options.multiLanguage` for eligible string widget properties (same rules as
|
|
947
|
+
* entity middleware), unless the property already specifies `multiLanguage`.
|
|
948
|
+
*/
|
|
949
|
+
function withDefaultMultiLanguageOnWidgetProperty(prop, applyDefault) {
|
|
950
|
+
if (!applyDefault || !shouldApplyDefaultMultiLanguageToWidgetProperty(prop)) {
|
|
951
|
+
return prop;
|
|
952
|
+
}
|
|
953
|
+
const iface = prop.schema.interface;
|
|
954
|
+
const existingOpts = (iface.options ?? {});
|
|
955
|
+
return {
|
|
956
|
+
...prop,
|
|
957
|
+
schema: {
|
|
958
|
+
...prop.schema,
|
|
959
|
+
interface: {
|
|
960
|
+
...iface,
|
|
961
|
+
options: {
|
|
962
|
+
...existingOpts,
|
|
963
|
+
multiLanguage: true,
|
|
964
|
+
},
|
|
965
|
+
},
|
|
966
|
+
},
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
//#endregion
|
|
970
|
+
|
|
971
|
+
//#region ---- Settings expression scope ----
|
|
972
|
+
/**
|
|
973
|
+
* Exposes platform settings in expression strings, e.g.
|
|
974
|
+
* `{{ settings.get('Common:Setting:Entity.ShowPageBadge') }}`.
|
|
975
|
+
*/
|
|
976
|
+
class AXPSettingsEvaluatorScopeProvider {
|
|
977
|
+
constructor() {
|
|
978
|
+
this.settingsService = inject(AXPSettingsService);
|
|
979
|
+
}
|
|
980
|
+
async provide(context) {
|
|
981
|
+
context.addScope('settings', {
|
|
982
|
+
get: async (key) => {
|
|
983
|
+
return await this.settingsService.get(key);
|
|
984
|
+
},
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
//#endregion
|
|
767
989
|
|
|
768
990
|
var AXPHomePageSettings;
|
|
769
991
|
(function (AXPHomePageSettings) {
|
|
@@ -821,9 +1043,7 @@ class AXPHomePageService {
|
|
|
821
1043
|
{ ...home?.route, ...{ data: { key: home?.key, title: home?.title, path: fullPath } } },
|
|
822
1044
|
];
|
|
823
1045
|
}
|
|
824
|
-
return [
|
|
825
|
-
{ path: '', redirectTo: this.loginPath, pathMatch: 'full' },
|
|
826
|
-
];
|
|
1046
|
+
return [{ path: '', redirectTo: this.loginPath, pathMatch: 'full' }];
|
|
827
1047
|
}
|
|
828
1048
|
getCurrent() {
|
|
829
1049
|
const key = this.userHomePageKey ?? this.defaultHomePageKey;
|
|
@@ -871,30 +1091,24 @@ class AXPHomePageService {
|
|
|
871
1091
|
// Filter the original routes to drop the old home placeholders.
|
|
872
1092
|
// We know your dynamic routes always have path === '' or ':app'
|
|
873
1093
|
// or carry a `data.key` matching one of your home-page keys.
|
|
874
|
-
const otherRoutes = (this.originalConfig ?? [])
|
|
875
|
-
.filter(r => r.path !== '' &&
|
|
876
|
-
r.path !== ':app' &&
|
|
877
|
-
!(r.data && typeof r.data['key'] === 'string'));
|
|
1094
|
+
const otherRoutes = (this.originalConfig ?? []).filter((r) => r.path !== '' && r.path !== ':app' && !(r.data && typeof r.data['key'] === 'string'));
|
|
878
1095
|
// Build the new merged tree
|
|
879
|
-
const merged = [
|
|
880
|
-
...newHomeRoutes,
|
|
881
|
-
...otherRoutes
|
|
882
|
-
];
|
|
1096
|
+
const merged = [...newHomeRoutes, ...otherRoutes];
|
|
883
1097
|
// TODO: check this for custom menu like :app/terms
|
|
884
1098
|
router.resetConfig(merged);
|
|
885
1099
|
}
|
|
886
1100
|
async navigateTo() {
|
|
887
|
-
// wait for the router to be initialized
|
|
1101
|
+
// wait for the router to be initialized
|
|
888
1102
|
setTimeout(() => {
|
|
889
1103
|
const router = this.injector.get(Router);
|
|
890
1104
|
const current = this.getCurrent();
|
|
891
|
-
router.navigate([current.path]);
|
|
1105
|
+
router.navigate([current.path], { onSameUrlNavigation: 'reload' });
|
|
892
1106
|
}, 100);
|
|
893
1107
|
}
|
|
894
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
895
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1109
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageService, providedIn: 'root' }); }
|
|
896
1110
|
}
|
|
897
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageService, decorators: [{
|
|
898
1112
|
type: Injectable,
|
|
899
1113
|
args: [{
|
|
900
1114
|
providedIn: 'root',
|
|
@@ -956,17 +1170,17 @@ class AXPHomePageSettingProvider {
|
|
|
956
1170
|
// End the 'General Settings' group
|
|
957
1171
|
.endGroup();
|
|
958
1172
|
}
|
|
959
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
960
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1173
|
+
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 }); }
|
|
1174
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageSettingProvider }); }
|
|
961
1175
|
}
|
|
962
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageSettingProvider, decorators: [{
|
|
963
1177
|
type: Injectable
|
|
964
1178
|
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
965
1179
|
|
|
966
1180
|
class AXPHomePageModule {
|
|
967
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
968
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
969
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1181
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1182
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule }); }
|
|
1183
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule, providers: [
|
|
970
1184
|
{
|
|
971
1185
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
972
1186
|
useClass: AXPHomePageSettingProvider,
|
|
@@ -974,7 +1188,7 @@ class AXPHomePageModule {
|
|
|
974
1188
|
},
|
|
975
1189
|
] }); }
|
|
976
1190
|
}
|
|
977
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule, decorators: [{
|
|
978
1192
|
type: NgModule,
|
|
979
1193
|
args: [{
|
|
980
1194
|
imports: [],
|
|
@@ -997,10 +1211,10 @@ class AXPCustomOperatorServiceImpl extends AXPCustomOperatorService {
|
|
|
997
1211
|
getCustomOperators() {
|
|
998
1212
|
return {};
|
|
999
1213
|
}
|
|
1000
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1001
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1214
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCustomOperatorServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1215
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCustomOperatorServiceImpl }); }
|
|
1002
1216
|
}
|
|
1003
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1217
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCustomOperatorServiceImpl, decorators: [{
|
|
1004
1218
|
type: Injectable
|
|
1005
1219
|
}] });
|
|
1006
1220
|
|
|
@@ -1045,10 +1259,10 @@ class AXPFilterOperatorMiddlewareServiceImpl extends AXPFilterOperatorMiddleware
|
|
|
1045
1259
|
return acc;
|
|
1046
1260
|
}, {});
|
|
1047
1261
|
}
|
|
1048
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1049
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1262
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1263
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl }); }
|
|
1050
1264
|
}
|
|
1051
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl, decorators: [{
|
|
1052
1266
|
type: Injectable
|
|
1053
1267
|
}] });
|
|
1054
1268
|
|
|
@@ -1069,10 +1283,10 @@ class AXPErrorHandlerRegistryService {
|
|
|
1069
1283
|
get handlers() {
|
|
1070
1284
|
return this.errorHandlers;
|
|
1071
1285
|
}
|
|
1072
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1073
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1286
|
+
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 }); }
|
|
1287
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPErrorHandlerRegistryService, providedIn: 'root' }); }
|
|
1074
1288
|
}
|
|
1075
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPErrorHandlerRegistryService, decorators: [{
|
|
1076
1290
|
type: Injectable,
|
|
1077
1291
|
args: [{
|
|
1078
1292
|
providedIn: 'root'
|
|
@@ -1103,10 +1317,10 @@ class AXPGlobalErrorHandler extends ErrorHandler {
|
|
|
1103
1317
|
}
|
|
1104
1318
|
handleErrorRecursively(0, error);
|
|
1105
1319
|
}
|
|
1106
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1107
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1320
|
+
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 }); }
|
|
1321
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGlobalErrorHandler, providedIn: 'root' }); }
|
|
1108
1322
|
}
|
|
1109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1323
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGlobalErrorHandler, decorators: [{
|
|
1110
1324
|
type: Injectable,
|
|
1111
1325
|
args: [{ providedIn: 'root' }]
|
|
1112
1326
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: AXPErrorHandlerRegistryService }] });
|
|
@@ -1177,10 +1391,10 @@ class AXPTokenDefinitionService {
|
|
|
1177
1391
|
clearDefinitionsCache() {
|
|
1178
1392
|
this.definitionsByName.clear();
|
|
1179
1393
|
}
|
|
1180
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1181
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1394
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTokenDefinitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1395
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTokenDefinitionService, providedIn: 'root' }); }
|
|
1182
1396
|
}
|
|
1183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1397
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTokenDefinitionService, decorators: [{
|
|
1184
1398
|
type: Injectable,
|
|
1185
1399
|
args: [{
|
|
1186
1400
|
providedIn: 'root',
|
|
@@ -1218,32 +1432,24 @@ class AXPStickyDirective {
|
|
|
1218
1432
|
this.stickyOffset = 100;
|
|
1219
1433
|
this.isStickyChange = new EventEmitter();
|
|
1220
1434
|
this._isSticky = false;
|
|
1435
|
+
this.onWindowResize = () => {
|
|
1436
|
+
this.applyStickyStateFromScrollPosition();
|
|
1437
|
+
};
|
|
1221
1438
|
this.onParentScroll = () => {
|
|
1222
|
-
this.
|
|
1223
|
-
const scrollTop = this.parentElement === window ? window.scrollY : this.parentElement.scrollTop;
|
|
1224
|
-
const shouldStick = scrollTop + this.stickyOffset >= this.topOffset;
|
|
1225
|
-
if (shouldStick !== this.isSticky) {
|
|
1226
|
-
this.zone.run(() => {
|
|
1227
|
-
this.isSticky = shouldStick;
|
|
1228
|
-
this.toggleStickyClasses(shouldStick);
|
|
1229
|
-
this.cdr.markForCheck();
|
|
1230
|
-
});
|
|
1231
|
-
}
|
|
1232
|
-
});
|
|
1439
|
+
this.applyStickyStateFromScrollPosition();
|
|
1233
1440
|
};
|
|
1234
1441
|
}
|
|
1235
1442
|
ngAfterViewInit() {
|
|
1236
1443
|
this.initSticky();
|
|
1237
1444
|
// Add mutation observer for dynamic content
|
|
1238
1445
|
this.mutationObserver = new MutationObserver(() => {
|
|
1239
|
-
this.
|
|
1446
|
+
this.applyStickyStateFromScrollPosition();
|
|
1240
1447
|
});
|
|
1241
1448
|
this.mutationObserver.observe(this.element.nativeElement, {
|
|
1242
1449
|
childList: true,
|
|
1243
1450
|
subtree: true,
|
|
1244
1451
|
});
|
|
1245
|
-
|
|
1246
|
-
window.addEventListener('resize', this.updateTopOffset.bind(this));
|
|
1452
|
+
window.addEventListener('resize', this.onWindowResize);
|
|
1247
1453
|
}
|
|
1248
1454
|
initSticky() {
|
|
1249
1455
|
if (this.stickyParent instanceof HTMLElement) {
|
|
@@ -1253,13 +1459,42 @@ class AXPStickyDirective {
|
|
|
1253
1459
|
this.parentElement = document.querySelector(this.stickyParent) || window;
|
|
1254
1460
|
}
|
|
1255
1461
|
this.targetElement = document.querySelector(this.stickyTarget) || this.element.nativeElement;
|
|
1256
|
-
this.updateTopOffset();
|
|
1257
1462
|
this.parentElement.addEventListener('scroll', this.onParentScroll);
|
|
1463
|
+
this.applyStickyStateFromScrollPosition();
|
|
1464
|
+
}
|
|
1465
|
+
getScrollTop() {
|
|
1466
|
+
return this.parentElement === window ? window.scrollY : this.parentElement.scrollTop;
|
|
1258
1467
|
}
|
|
1259
|
-
|
|
1468
|
+
/**
|
|
1469
|
+
* Toggle stuck styling only while this element is visually pinned (matches `position: sticky; top: 0`).
|
|
1470
|
+
* Scroll-offset thresholds would stay true for every section already passed, so multiple stacked stickies
|
|
1471
|
+
* would all keep `--stuck`; geometry fixes that.
|
|
1472
|
+
*/
|
|
1473
|
+
computeShouldStick() {
|
|
1474
|
+
if (this.getScrollTop() <= 0) {
|
|
1475
|
+
return false;
|
|
1476
|
+
}
|
|
1477
|
+
const tRect = this.targetElement.getBoundingClientRect();
|
|
1478
|
+
const epsilon = 3;
|
|
1479
|
+
let limitY;
|
|
1480
|
+
if (this.parentElement === window) {
|
|
1481
|
+
limitY = this.stickyOffset;
|
|
1482
|
+
}
|
|
1483
|
+
else {
|
|
1484
|
+
limitY = this.parentElement.getBoundingClientRect().top;
|
|
1485
|
+
}
|
|
1486
|
+
return tRect.top <= limitY + epsilon && tRect.top >= limitY - epsilon;
|
|
1487
|
+
}
|
|
1488
|
+
applyStickyStateFromScrollPosition() {
|
|
1260
1489
|
this.zone.runOutsideAngular(() => {
|
|
1261
|
-
const
|
|
1262
|
-
|
|
1490
|
+
const shouldStick = this.computeShouldStick();
|
|
1491
|
+
if (shouldStick !== this.isSticky) {
|
|
1492
|
+
this.zone.run(() => {
|
|
1493
|
+
this.isSticky = shouldStick;
|
|
1494
|
+
this.toggleStickyClasses(shouldStick);
|
|
1495
|
+
this.cdr.markForCheck();
|
|
1496
|
+
});
|
|
1497
|
+
}
|
|
1263
1498
|
});
|
|
1264
1499
|
}
|
|
1265
1500
|
toggleStickyClasses(isSticky) {
|
|
@@ -1275,15 +1510,15 @@ class AXPStickyDirective {
|
|
|
1275
1510
|
}
|
|
1276
1511
|
ngOnDestroy() {
|
|
1277
1512
|
this.parentElement.removeEventListener('scroll', this.onParentScroll);
|
|
1278
|
-
window.removeEventListener('resize', this.
|
|
1513
|
+
window.removeEventListener('resize', this.onWindowResize);
|
|
1279
1514
|
if (this.mutationObserver) {
|
|
1280
1515
|
this.mutationObserver.disconnect();
|
|
1281
1516
|
}
|
|
1282
1517
|
}
|
|
1283
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1284
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1518
|
+
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 }); }
|
|
1519
|
+
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 }); }
|
|
1285
1520
|
}
|
|
1286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1521
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStickyDirective, decorators: [{
|
|
1287
1522
|
type: Directive,
|
|
1288
1523
|
args: [{
|
|
1289
1524
|
selector: '[axpSticky]',
|
|
@@ -1626,10 +1861,10 @@ class AXPMenuMiddlewareRegistry {
|
|
|
1626
1861
|
clear() {
|
|
1627
1862
|
this.manualMiddlewares.clear();
|
|
1628
1863
|
}
|
|
1629
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1630
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1864
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuMiddlewareRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1865
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuMiddlewareRegistry, providedIn: 'root' }); }
|
|
1631
1866
|
}
|
|
1632
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1867
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuMiddlewareRegistry, decorators: [{
|
|
1633
1868
|
type: Injectable,
|
|
1634
1869
|
args: [{ providedIn: 'root' }]
|
|
1635
1870
|
}] });
|
|
@@ -1640,7 +1875,6 @@ class AXPMenuProviderService {
|
|
|
1640
1875
|
constructor() {
|
|
1641
1876
|
//#region ---- Dependencies ----
|
|
1642
1877
|
this.providers = inject(AXP_MENU_PROVIDER, { optional: true });
|
|
1643
|
-
this.providerRegistry = inject(AXPModuleProviderRegistry);
|
|
1644
1878
|
this.middlewareRegistry = inject(AXPMenuMiddlewareRegistry);
|
|
1645
1879
|
//#endregion
|
|
1646
1880
|
//#region ---- State ----
|
|
@@ -1649,6 +1883,7 @@ class AXPMenuProviderService {
|
|
|
1649
1883
|
this.pendingRemovals = [];
|
|
1650
1884
|
this.pendingUpdates = [];
|
|
1651
1885
|
this.pendingAdditions = [];
|
|
1886
|
+
this.pendingMoves = [];
|
|
1652
1887
|
/**
|
|
1653
1888
|
* Observable for menu reload events
|
|
1654
1889
|
* Emits when menu cache is cleared and consumers should reload
|
|
@@ -1668,19 +1903,23 @@ class AXPMenuProviderService {
|
|
|
1668
1903
|
}
|
|
1669
1904
|
const items = [];
|
|
1670
1905
|
const context = this.createMenuProviderContext(items);
|
|
1671
|
-
// Load providers from DI tokens
|
|
1906
|
+
// Load providers from DI tokens
|
|
1672
1907
|
if (Array.isArray(this.providers)) {
|
|
1673
1908
|
for (const provider of this.providers) {
|
|
1674
|
-
|
|
1909
|
+
if (provider instanceof Promise) {
|
|
1910
|
+
// If provider is a promise, resolve it
|
|
1911
|
+
const resolvedProvider = await provider;
|
|
1912
|
+
await resolvedProvider.provide(context);
|
|
1913
|
+
}
|
|
1914
|
+
else {
|
|
1915
|
+
// If provider is a direct instance, use it directly
|
|
1916
|
+
await provider.provide(context);
|
|
1917
|
+
}
|
|
1918
|
+
// Apply pending operations after each provider so subsequent providers
|
|
1919
|
+
// can find items added by earlier providers (e.g. Tokens under Data Definitions)
|
|
1920
|
+
this.applyPendingOperations(items);
|
|
1675
1921
|
}
|
|
1676
1922
|
}
|
|
1677
|
-
// Load providers from registry (manifest-based, conditionally loaded)
|
|
1678
|
-
const registryProviders = this.providerRegistry.getMenuProviders();
|
|
1679
|
-
for (const provider of registryProviders) {
|
|
1680
|
-
await provider.provide(context);
|
|
1681
|
-
}
|
|
1682
|
-
// Apply pending operations
|
|
1683
|
-
this.applyPendingOperations(items);
|
|
1684
1923
|
// Sort items by priority
|
|
1685
1924
|
items.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
|
|
1686
1925
|
// Apply middlewares using registry (sorted by priority)
|
|
@@ -1698,19 +1937,22 @@ class AXPMenuProviderService {
|
|
|
1698
1937
|
async rawItems() {
|
|
1699
1938
|
const items = [];
|
|
1700
1939
|
const context = this.createMenuProviderContext(items);
|
|
1701
|
-
// Load providers from DI tokens
|
|
1940
|
+
// Load providers from DI tokens
|
|
1702
1941
|
if (Array.isArray(this.providers)) {
|
|
1703
1942
|
for (const provider of this.providers) {
|
|
1704
|
-
|
|
1943
|
+
if (provider instanceof Promise) {
|
|
1944
|
+
// If provider is a promise, resolve it
|
|
1945
|
+
const resolvedProvider = await provider;
|
|
1946
|
+
await resolvedProvider.provide(context);
|
|
1947
|
+
}
|
|
1948
|
+
else {
|
|
1949
|
+
// If provider is a direct instance, use it directly
|
|
1950
|
+
await provider.provide(context);
|
|
1951
|
+
}
|
|
1952
|
+
// Apply pending operations after each provider
|
|
1953
|
+
this.applyPendingOperations(items);
|
|
1705
1954
|
}
|
|
1706
1955
|
}
|
|
1707
|
-
// Load providers from registry (manifest-based, conditionally loaded)
|
|
1708
|
-
const registryProviders = this.providerRegistry.getMenuProviders();
|
|
1709
|
-
for (const provider of registryProviders) {
|
|
1710
|
-
await provider.provide(context);
|
|
1711
|
-
}
|
|
1712
|
-
// Apply pending operations
|
|
1713
|
-
this.applyPendingOperations(items);
|
|
1714
1956
|
// Sort items by priority
|
|
1715
1957
|
items.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
|
|
1716
1958
|
// ADD level property to items (but NO middleware)
|
|
@@ -1727,6 +1969,7 @@ class AXPMenuProviderService {
|
|
|
1727
1969
|
this.pendingRemovals = [];
|
|
1728
1970
|
this.pendingUpdates = [];
|
|
1729
1971
|
this.pendingAdditions = [];
|
|
1972
|
+
this.pendingMoves = [];
|
|
1730
1973
|
// Notify subscribers that menu should be reloaded
|
|
1731
1974
|
this.menuReloadSubject.next();
|
|
1732
1975
|
}
|
|
@@ -1788,7 +2031,14 @@ class AXPMenuProviderService {
|
|
|
1788
2031
|
},
|
|
1789
2032
|
addItems: (newItems) => {
|
|
1790
2033
|
this.pendingAdditions.push({ target, newItems });
|
|
1791
|
-
}
|
|
2034
|
+
},
|
|
2035
|
+
moveTo: (destination, position = 'inside') => {
|
|
2036
|
+
this.pendingMoves.push({
|
|
2037
|
+
source: target,
|
|
2038
|
+
destination,
|
|
2039
|
+
position: position ?? 'inside',
|
|
2040
|
+
});
|
|
2041
|
+
},
|
|
1792
2042
|
};
|
|
1793
2043
|
}
|
|
1794
2044
|
};
|
|
@@ -1895,11 +2145,15 @@ class AXPMenuProviderService {
|
|
|
1895
2145
|
}
|
|
1896
2146
|
}
|
|
1897
2147
|
}
|
|
2148
|
+
for (const move of this.pendingMoves) {
|
|
2149
|
+
this.applyPendingMove(items, move.source, move.destination, move.position);
|
|
2150
|
+
}
|
|
1898
2151
|
// Clear pending operations after applying them
|
|
1899
2152
|
this.pendingInserts = [];
|
|
1900
2153
|
this.pendingRemovals = [];
|
|
1901
2154
|
this.pendingUpdates = [];
|
|
1902
2155
|
this.pendingAdditions = [];
|
|
2156
|
+
this.pendingMoves = [];
|
|
1903
2157
|
}
|
|
1904
2158
|
findItemWithParent(items, target, parentItems = items) {
|
|
1905
2159
|
for (const item of items) {
|
|
@@ -1932,6 +2186,66 @@ class AXPMenuProviderService {
|
|
|
1932
2186
|
}
|
|
1933
2187
|
return null;
|
|
1934
2188
|
}
|
|
2189
|
+
applyPendingMove(items, sourceName, destName, position) {
|
|
2190
|
+
if (sourceName === destName) {
|
|
2191
|
+
console.warn(`moveTo: source and destination are the same ("${sourceName}"), ignored.`);
|
|
2192
|
+
return;
|
|
2193
|
+
}
|
|
2194
|
+
const sourceInfo = this.findItemWithParent(items, sourceName);
|
|
2195
|
+
const { foundItem: sourceItem, parentItems: sourceParent } = sourceInfo;
|
|
2196
|
+
if (!sourceItem) {
|
|
2197
|
+
console.warn(`moveTo: source "${sourceName}" not found.`);
|
|
2198
|
+
return;
|
|
2199
|
+
}
|
|
2200
|
+
const destInfo = this.findItemWithParent(items, destName);
|
|
2201
|
+
const { foundItem: destItem, parentItems: destParent } = destInfo;
|
|
2202
|
+
if (!destItem) {
|
|
2203
|
+
console.warn(`moveTo: destination "${destName}" not found.`);
|
|
2204
|
+
return;
|
|
2205
|
+
}
|
|
2206
|
+
if (this.itemIsInSubtreeOf(sourceItem, destItem)) {
|
|
2207
|
+
console.warn(`moveTo: cannot move "${sourceName}" because "${destName}" is inside the source subtree.`);
|
|
2208
|
+
return;
|
|
2209
|
+
}
|
|
2210
|
+
const sourceIndex = sourceParent.indexOf(sourceItem);
|
|
2211
|
+
if (sourceIndex === -1) {
|
|
2212
|
+
console.warn(`moveTo: source "${sourceName}" not in parent list (inconsistent).`);
|
|
2213
|
+
return;
|
|
2214
|
+
}
|
|
2215
|
+
sourceParent.splice(sourceIndex, 1);
|
|
2216
|
+
if (position === 'inside') {
|
|
2217
|
+
if (!destItem.children) {
|
|
2218
|
+
destItem.children = [];
|
|
2219
|
+
}
|
|
2220
|
+
destItem.children.push(sourceItem);
|
|
2221
|
+
return;
|
|
2222
|
+
}
|
|
2223
|
+
const destIndexInParent = destParent.indexOf(destItem);
|
|
2224
|
+
if (destIndexInParent === -1) {
|
|
2225
|
+
console.warn(`moveTo: destination "${destName}" not in parent list, reverting source removal.`);
|
|
2226
|
+
sourceParent.splice(sourceIndex, 0, sourceItem);
|
|
2227
|
+
return;
|
|
2228
|
+
}
|
|
2229
|
+
const insertIndex = position === 'before' ? destIndexInParent : destIndexInParent + 1;
|
|
2230
|
+
destParent.splice(insertIndex, 0, sourceItem);
|
|
2231
|
+
}
|
|
2232
|
+
itemIsInSubtreeOf(root, candidate) {
|
|
2233
|
+
if (root === candidate) {
|
|
2234
|
+
return true;
|
|
2235
|
+
}
|
|
2236
|
+
if (!root.children?.length) {
|
|
2237
|
+
return false;
|
|
2238
|
+
}
|
|
2239
|
+
for (const child of root.children) {
|
|
2240
|
+
if (child === candidate) {
|
|
2241
|
+
return true;
|
|
2242
|
+
}
|
|
2243
|
+
if (this.itemIsInSubtreeOf(child, candidate)) {
|
|
2244
|
+
return true;
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
return false;
|
|
2248
|
+
}
|
|
1935
2249
|
/**
|
|
1936
2250
|
* Merge new item properties into existing item, handling children merge
|
|
1937
2251
|
*/
|
|
@@ -1979,10 +2293,10 @@ class AXPMenuProviderService {
|
|
|
1979
2293
|
}
|
|
1980
2294
|
}
|
|
1981
2295
|
}
|
|
1982
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1983
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2296
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2297
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuProviderService, providedIn: 'root' }); }
|
|
1984
2298
|
}
|
|
1985
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuProviderService, decorators: [{
|
|
1986
2300
|
type: Injectable,
|
|
1987
2301
|
args: [{ providedIn: 'root' }]
|
|
1988
2302
|
}] });
|
|
@@ -2002,6 +2316,90 @@ function setMenuItemMeta(items, parentIndex = '', depth = 0) {
|
|
|
2002
2316
|
});
|
|
2003
2317
|
}
|
|
2004
2318
|
|
|
2319
|
+
//#region ---- Imports ----
|
|
2320
|
+
//#endregion
|
|
2321
|
+
//#region ---- Helpers ----
|
|
2322
|
+
function flattenMenuItems(items, depth) {
|
|
2323
|
+
const rows = [];
|
|
2324
|
+
let index = 0;
|
|
2325
|
+
for (const it of items) {
|
|
2326
|
+
const fallback = `menu-${depth}-${index}`;
|
|
2327
|
+
index += 1;
|
|
2328
|
+
const id = it.name ?? it.path ?? fallback;
|
|
2329
|
+
rows.push({ id, title: it.text });
|
|
2330
|
+
if (it.children?.length) {
|
|
2331
|
+
rows.push(...flattenMenuItems(it.children, depth + 1));
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
return rows;
|
|
2335
|
+
}
|
|
2336
|
+
//#endregion
|
|
2337
|
+
//#region ---- Menu items data source ----
|
|
2338
|
+
/**
|
|
2339
|
+
* Registered menu items (raw tree flattened) for select widgets via dataSource name {@link MENU_ITEMS_DATASOURCE_NAME}.
|
|
2340
|
+
*/
|
|
2341
|
+
const MENU_ITEMS_DATASOURCE_NAME = 'platform-menu-items';
|
|
2342
|
+
/**
|
|
2343
|
+
* Data source definition for menu items from {@link AXPMenuProviderService#rawItems}.
|
|
2344
|
+
*/
|
|
2345
|
+
class AXPMenuItemsDataSourceDefinition {
|
|
2346
|
+
constructor() {
|
|
2347
|
+
//#region ---- Services & Dependencies ----
|
|
2348
|
+
this.menuProviderService = inject(AXPMenuProviderService);
|
|
2349
|
+
//#endregion
|
|
2350
|
+
}
|
|
2351
|
+
//#endregion
|
|
2352
|
+
//#region ---- Public API ----
|
|
2353
|
+
async items() {
|
|
2354
|
+
return [
|
|
2355
|
+
{
|
|
2356
|
+
name: MENU_ITEMS_DATASOURCE_NAME,
|
|
2357
|
+
title: 'Menu items',
|
|
2358
|
+
source: () => new AXDataSource({
|
|
2359
|
+
key: 'id',
|
|
2360
|
+
load: async () => {
|
|
2361
|
+
const raw = await this.menuProviderService.rawItems();
|
|
2362
|
+
const list = flattenMenuItems(raw, 0);
|
|
2363
|
+
return { items: list, total: list.length };
|
|
2364
|
+
},
|
|
2365
|
+
byKey: async (key) => {
|
|
2366
|
+
const raw = await this.menuProviderService.rawItems();
|
|
2367
|
+
const list = flattenMenuItems(raw, 0);
|
|
2368
|
+
return list.find((item) => item.id === key);
|
|
2369
|
+
},
|
|
2370
|
+
pageSize: 1000,
|
|
2371
|
+
}),
|
|
2372
|
+
columns: [
|
|
2373
|
+
{
|
|
2374
|
+
name: 'id',
|
|
2375
|
+
title: 'ID',
|
|
2376
|
+
datatype: 'string',
|
|
2377
|
+
type: AXPWidgetsCatalog.text,
|
|
2378
|
+
},
|
|
2379
|
+
{
|
|
2380
|
+
name: 'title',
|
|
2381
|
+
title: 'Title',
|
|
2382
|
+
datatype: 'string',
|
|
2383
|
+
type: AXPWidgetsCatalog.text,
|
|
2384
|
+
},
|
|
2385
|
+
],
|
|
2386
|
+
filters: [
|
|
2387
|
+
{
|
|
2388
|
+
field: 'title',
|
|
2389
|
+
title: 'Title',
|
|
2390
|
+
operator: { type: 'equal' },
|
|
2391
|
+
widget: { type: AXPWidgetsCatalog.text },
|
|
2392
|
+
filterType: { advance: true, inline: true },
|
|
2393
|
+
},
|
|
2394
|
+
],
|
|
2395
|
+
textField: { name: 'title', title: 'Title' },
|
|
2396
|
+
valueField: { name: 'id', title: 'ID' },
|
|
2397
|
+
},
|
|
2398
|
+
];
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2401
|
+
//#endregion
|
|
2402
|
+
|
|
2005
2403
|
//#region ---- Menu Middleware Provider Helper ----
|
|
2006
2404
|
/**
|
|
2007
2405
|
* Helper function to provide menu middlewares with proper DI setup
|
|
@@ -2296,10 +2694,10 @@ class AXPMenuVisibilityService {
|
|
|
2296
2694
|
// Otherwise, don't render empty menu items
|
|
2297
2695
|
return false;
|
|
2298
2696
|
}
|
|
2299
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2300
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2697
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuVisibilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2698
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuVisibilityService, providedIn: 'root' }); }
|
|
2301
2699
|
}
|
|
2302
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2700
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuVisibilityService, decorators: [{
|
|
2303
2701
|
type: Injectable,
|
|
2304
2702
|
args: [{ providedIn: 'root' }]
|
|
2305
2703
|
}] });
|
|
@@ -2376,18 +2774,19 @@ class AXPMenuSearchProvider {
|
|
|
2376
2774
|
}
|
|
2377
2775
|
|
|
2378
2776
|
class AXPFooterTextSlotComponent {
|
|
2379
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2380
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2777
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFooterTextSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2778
|
+
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: `
|
|
2381
2779
|
<small class="ax-text-sm" [innerHTML]="text"></small>
|
|
2382
|
-
`, isInline: true }); }
|
|
2780
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2383
2781
|
}
|
|
2384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2782
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFooterTextSlotComponent, decorators: [{
|
|
2385
2783
|
type: Component,
|
|
2386
2784
|
args: [{
|
|
2387
2785
|
template: `
|
|
2388
2786
|
<small class="ax-text-sm" [innerHTML]="text"></small>
|
|
2389
2787
|
`,
|
|
2390
|
-
standalone: true
|
|
2788
|
+
standalone: true,
|
|
2789
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2391
2790
|
}]
|
|
2392
2791
|
}], propDecorators: { text: [{
|
|
2393
2792
|
type: Input
|
|
@@ -2398,8 +2797,8 @@ class AXPNavBarSlotComponent {
|
|
|
2398
2797
|
// if (action)
|
|
2399
2798
|
// this.store.dispatch(action)
|
|
2400
2799
|
}
|
|
2401
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2402
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2800
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPNavBarSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2801
|
+
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: `
|
|
2403
2802
|
<div class="ax-flex ax-items-center ax-justify-between ax-gap-5">
|
|
2404
2803
|
@for (link of items; track link) {
|
|
2405
2804
|
<a (click)="handleCommand(link.command)" >{{ link.text }}</a>
|
|
@@ -2407,7 +2806,7 @@ class AXPNavBarSlotComponent {
|
|
|
2407
2806
|
</div>
|
|
2408
2807
|
`, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2409
2808
|
}
|
|
2410
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2809
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPNavBarSlotComponent, decorators: [{
|
|
2411
2810
|
type: Component,
|
|
2412
2811
|
args: [{
|
|
2413
2812
|
template: `
|
|
@@ -2498,7 +2897,6 @@ const AXP_SEARCH_DEFINITION_PROVIDER = new InjectionToken('AXP_SEARCH_DEFINITION
|
|
|
2498
2897
|
class AXPSearchDefinitionProviderService {
|
|
2499
2898
|
constructor() {
|
|
2500
2899
|
this.providers = inject(AXP_SEARCH_DEFINITION_PROVIDER, { optional: true });
|
|
2501
|
-
this.providerRegistry = inject(AXPModuleProviderRegistry);
|
|
2502
2900
|
this.cache = null;
|
|
2503
2901
|
}
|
|
2504
2902
|
async load() {
|
|
@@ -2542,10 +2940,10 @@ class AXPSearchDefinitionProviderService {
|
|
|
2542
2940
|
}
|
|
2543
2941
|
return definition;
|
|
2544
2942
|
}
|
|
2545
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2546
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2943
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2944
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchDefinitionProviderService, providedIn: 'root' }); }
|
|
2547
2945
|
}
|
|
2548
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2946
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchDefinitionProviderService, decorators: [{
|
|
2549
2947
|
type: Injectable,
|
|
2550
2948
|
args: [{ providedIn: 'root' }]
|
|
2551
2949
|
}] });
|
|
@@ -2561,33 +2959,33 @@ const AXP_SEARCH_PROVIDER = new InjectionToken('AXP_SEARCH_PROVIDER');
|
|
|
2561
2959
|
class AXPSearchService {
|
|
2562
2960
|
constructor() {
|
|
2563
2961
|
this.providers = inject(AXP_SEARCH_PROVIDER, { optional: true });
|
|
2564
|
-
this.providerRegistry = inject(AXPModuleProviderRegistry);
|
|
2565
2962
|
this.definitionService = inject(AXPSearchDefinitionProviderService);
|
|
2566
2963
|
this.formatService = inject(AXFormatService);
|
|
2964
|
+
this.translationService = inject(AXTranslationService);
|
|
2567
2965
|
}
|
|
2568
2966
|
async search(text) {
|
|
2569
2967
|
//TODO better handle this
|
|
2570
2968
|
if (this.definitionService.getList().length == 0) {
|
|
2571
2969
|
await this.definitionService.getListAsync();
|
|
2572
2970
|
}
|
|
2573
|
-
// Collect providers from
|
|
2971
|
+
// Collect providers from DI tokens
|
|
2574
2972
|
const allProviders = [];
|
|
2575
|
-
// Load from DI tokens
|
|
2973
|
+
// Load from DI tokens
|
|
2576
2974
|
if (Array.isArray(this.providers)) {
|
|
2577
2975
|
allProviders.push(...this.providers);
|
|
2578
2976
|
}
|
|
2579
2977
|
else if (this.providers) {
|
|
2580
2978
|
allProviders.push(this.providers);
|
|
2581
2979
|
}
|
|
2582
|
-
// Load from registry (manifest-based, conditionally loaded)
|
|
2583
|
-
// Note: Registry stores AXPSearchCommandProvider which implements AXPSearchProvider
|
|
2584
|
-
const registryProviders = this.providerRegistry.getSearchProviders();
|
|
2585
|
-
allProviders.push(...registryProviders);
|
|
2586
2980
|
if (allProviders.length === 0) {
|
|
2587
2981
|
throw new Error('No search providers available');
|
|
2588
2982
|
}
|
|
2983
|
+
const providersWithSearch = allProviders.filter((provider) => provider != null && typeof provider.search === 'function');
|
|
2984
|
+
if (providersWithSearch.length === 0) {
|
|
2985
|
+
throw new Error('No search providers with a valid search method available');
|
|
2986
|
+
}
|
|
2589
2987
|
const mergeData = [];
|
|
2590
|
-
const promises =
|
|
2988
|
+
const promises = providersWithSearch.map((provider) => provider.search(text));
|
|
2591
2989
|
const results = await Promise.all(promises);
|
|
2592
2990
|
for (const resultArray of results) {
|
|
2593
2991
|
for (const result of resultArray) {
|
|
@@ -2606,10 +3004,7 @@ class AXPSearchService {
|
|
|
2606
3004
|
(definition.format.description
|
|
2607
3005
|
? this.formatService.format(definition.format.description, 'string', result.data)
|
|
2608
3006
|
: undefined),
|
|
2609
|
-
icon: result.icon ??
|
|
2610
|
-
(result.icon
|
|
2611
|
-
? this.formatService.format(definition.format.icon, 'string', result.data)
|
|
2612
|
-
: definition.icon),
|
|
3007
|
+
icon: result.icon ?? definition.icon,
|
|
2613
3008
|
data: result.data,
|
|
2614
3009
|
command: result.command,
|
|
2615
3010
|
actions: definition.actions,
|
|
@@ -2643,18 +3038,62 @@ class AXPSearchService {
|
|
|
2643
3038
|
groupedData.sort((a, b) => a.order - b.order);
|
|
2644
3039
|
return groupedData;
|
|
2645
3040
|
}
|
|
2646
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2647
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3041
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3042
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchService, providedIn: 'root' }); }
|
|
2648
3043
|
}
|
|
2649
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchService, decorators: [{
|
|
2650
3045
|
type: Injectable,
|
|
2651
3046
|
args: [{ providedIn: 'root' }]
|
|
2652
3047
|
}] });
|
|
2653
3048
|
|
|
3049
|
+
/**
|
|
3050
|
+
* Shared utility for creating Entity:Create command options used in search command providers.
|
|
3051
|
+
* Use with command: { name: 'Entity:Create', options: createEntityCommandOptions(...) }
|
|
3052
|
+
*/
|
|
3053
|
+
function createEntityCommandOptions(entityKey, entityInfo) {
|
|
3054
|
+
return {
|
|
3055
|
+
__context__: {
|
|
3056
|
+
entity: entityKey,
|
|
3057
|
+
entityInfo: {
|
|
3058
|
+
name: entityInfo.name,
|
|
3059
|
+
module: entityInfo.module,
|
|
3060
|
+
title: entityInfo.title,
|
|
3061
|
+
parentKey: undefined,
|
|
3062
|
+
source: entityKey,
|
|
3063
|
+
},
|
|
3064
|
+
data: {},
|
|
3065
|
+
options: {},
|
|
3066
|
+
},
|
|
3067
|
+
};
|
|
3068
|
+
}
|
|
3069
|
+
/**
|
|
3070
|
+
* Creates a search command for "Create {Entity}" with consistent i18n pattern.
|
|
3071
|
+
* Use titleKey/descriptionKey from module (e.g. @module:entity.permissions.create.title).
|
|
3072
|
+
* Standard: "Create {Entity}" for title, "Create new {entities}" for description.
|
|
3073
|
+
*/
|
|
3074
|
+
function createEntitySearchCommand(config) {
|
|
3075
|
+
return {
|
|
3076
|
+
id: config.id,
|
|
3077
|
+
group: 'command',
|
|
3078
|
+
title: config.titleKey,
|
|
3079
|
+
description: config.descriptionKey ?? config.titleKey,
|
|
3080
|
+
icon: config.icon,
|
|
3081
|
+
command: {
|
|
3082
|
+
name: 'Entity:Create',
|
|
3083
|
+
options: createEntityCommandOptions(config.entityKey, config.entityInfo),
|
|
3084
|
+
},
|
|
3085
|
+
};
|
|
3086
|
+
}
|
|
3087
|
+
|
|
2654
3088
|
var AXPCommonSettings;
|
|
2655
3089
|
(function (AXPCommonSettings) {
|
|
2656
3090
|
AXPCommonSettings["EnableOperationToasts"] = "Common:Setting:Notifications.EnableOperationToasts";
|
|
2657
3091
|
AXPCommonSettings["EntityFilterApplyMode"] = "Common:Setting:Entity.FilterApplyMode";
|
|
3092
|
+
AXPCommonSettings["ShowCategoryColumnsByDefault"] = "Common:Setting:Entity.ShowCategoryColumnsByDefault";
|
|
3093
|
+
AXPCommonSettings["ApplyLayoutOrdering"] = "Common:Setting:Entity.ApplyLayoutOrdering";
|
|
3094
|
+
AXPCommonSettings["RedirectToDetailsAfterCreate"] = "Common:Setting:Entity.RedirectToDetailsAfterCreate";
|
|
3095
|
+
AXPCommonSettings["ShowPageBadge"] = "Common:Setting:Entity.ShowPageBadge";
|
|
3096
|
+
AXPCommonSettings["DebugMode"] = "PlatformDevTools:Setting:Developer.DebugMode";
|
|
2658
3097
|
})(AXPCommonSettings || (AXPCommonSettings = {}));
|
|
2659
3098
|
|
|
2660
3099
|
//TODO Loading, Redirect, Drawer, Show toast
|
|
@@ -2679,10 +3118,10 @@ class AXPWorkflowNavigateAction extends AXPWorkflowAction {
|
|
|
2679
3118
|
this.router.navigate([payload.commands], payload.extras);
|
|
2680
3119
|
}
|
|
2681
3120
|
}
|
|
2682
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2683
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3121
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3122
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowNavigateAction }); }
|
|
2684
3123
|
}
|
|
2685
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowNavigateAction, decorators: [{
|
|
2686
3125
|
type: Injectable
|
|
2687
3126
|
}] });
|
|
2688
3127
|
class AXPDialogConfirmAction extends AXPWorkflowAction {
|
|
@@ -2698,10 +3137,10 @@ class AXPDialogConfirmAction extends AXPWorkflowAction {
|
|
|
2698
3137
|
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');
|
|
2699
3138
|
context.setOutput('result', dialogResult.result);
|
|
2700
3139
|
}
|
|
2701
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2702
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3140
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogConfirmAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3141
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogConfirmAction }); }
|
|
2703
3142
|
}
|
|
2704
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogConfirmAction, decorators: [{
|
|
2705
3144
|
type: Injectable
|
|
2706
3145
|
}] });
|
|
2707
3146
|
class AXPToastAction extends AXPWorkflowAction {
|
|
@@ -2724,20 +3163,20 @@ class AXPToastAction extends AXPWorkflowAction {
|
|
|
2724
3163
|
});
|
|
2725
3164
|
}
|
|
2726
3165
|
}
|
|
2727
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2728
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3166
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPToastAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3167
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPToastAction }); }
|
|
2729
3168
|
}
|
|
2730
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPToastAction, decorators: [{
|
|
2731
3170
|
type: Injectable
|
|
2732
3171
|
}] });
|
|
2733
3172
|
class AXPReloadAction extends AXPWorkflowAction {
|
|
2734
3173
|
async execute(context) {
|
|
2735
3174
|
this.dispatch(AXPReloadEvent({ entity: context.getVariable('entity'), meta: context.getVariable('meta') }));
|
|
2736
3175
|
}
|
|
2737
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2738
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3176
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReloadAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3177
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReloadAction }); }
|
|
2739
3178
|
}
|
|
2740
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3179
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReloadAction, decorators: [{
|
|
2741
3180
|
type: Injectable
|
|
2742
3181
|
}] });
|
|
2743
3182
|
|
|
@@ -2777,10 +3216,10 @@ class AXPWorkflowRouterNavigateAction extends AXPWorkflowAction {
|
|
|
2777
3216
|
return params;
|
|
2778
3217
|
}, {});
|
|
2779
3218
|
}
|
|
2780
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2781
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3219
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRouterNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3220
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRouterNavigateAction }); }
|
|
2782
3221
|
}
|
|
2783
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRouterNavigateAction, decorators: [{
|
|
2784
3223
|
type: Injectable
|
|
2785
3224
|
}] });
|
|
2786
3225
|
const AXPNavigateWorkflow = {
|
|
@@ -2805,10 +3244,10 @@ class AXMWorkflowErrorHandler {
|
|
|
2805
3244
|
next(error);
|
|
2806
3245
|
}
|
|
2807
3246
|
}
|
|
2808
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2809
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3247
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMWorkflowErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3248
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMWorkflowErrorHandler }); }
|
|
2810
3249
|
}
|
|
2811
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMWorkflowErrorHandler, decorators: [{
|
|
2812
3251
|
type: Injectable
|
|
2813
3252
|
}] });
|
|
2814
3253
|
|
|
@@ -2853,12 +3292,12 @@ class AXPCommonModule {
|
|
|
2853
3292
|
f();
|
|
2854
3293
|
});
|
|
2855
3294
|
}
|
|
2856
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2857
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
3295
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, deps: [{ token: 'AXPCommonModuleFactory' }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3296
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, imports: [i1.AXPWorkflowModule, AXPopupModule,
|
|
2858
3297
|
AXDateTimeModule,
|
|
2859
3298
|
AXToastModule,
|
|
2860
3299
|
AXPModuleManifestModule], exports: [RouterModule] }); }
|
|
2861
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
3300
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, providers: [
|
|
2862
3301
|
AXPAppStartUpProvider,
|
|
2863
3302
|
{
|
|
2864
3303
|
provide: ErrorHandler,
|
|
@@ -2887,11 +3326,16 @@ class AXPCommonModule {
|
|
|
2887
3326
|
useClass: AXPTokenEvaluatorScopeProvider,
|
|
2888
3327
|
multi: true,
|
|
2889
3328
|
},
|
|
3329
|
+
{
|
|
3330
|
+
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
3331
|
+
useClass: AXPSettingsEvaluatorScopeProvider,
|
|
3332
|
+
multi: true,
|
|
3333
|
+
},
|
|
2890
3334
|
{
|
|
2891
3335
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
2892
3336
|
useFactory: async () => {
|
|
2893
3337
|
const injector = inject(Injector);
|
|
2894
|
-
const provider = (await import('./acorex-platform-common-common-settings.provider-
|
|
3338
|
+
const provider = (await import('./acorex-platform-common-common-settings.provider-G9XcXXOG.mjs')).AXPCommonSettingProvider;
|
|
2895
3339
|
return new provider(injector);
|
|
2896
3340
|
},
|
|
2897
3341
|
multi: true,
|
|
@@ -2912,7 +3356,7 @@ class AXPCommonModule {
|
|
|
2912
3356
|
AXToastModule,
|
|
2913
3357
|
AXPModuleManifestModule, RouterModule] }); }
|
|
2914
3358
|
}
|
|
2915
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, decorators: [{
|
|
2916
3360
|
type: NgModule,
|
|
2917
3361
|
args: [{
|
|
2918
3362
|
imports: [
|
|
@@ -2962,11 +3406,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
2962
3406
|
useClass: AXPTokenEvaluatorScopeProvider,
|
|
2963
3407
|
multi: true,
|
|
2964
3408
|
},
|
|
3409
|
+
{
|
|
3410
|
+
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
3411
|
+
useClass: AXPSettingsEvaluatorScopeProvider,
|
|
3412
|
+
multi: true,
|
|
3413
|
+
},
|
|
2965
3414
|
{
|
|
2966
3415
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
2967
3416
|
useFactory: async () => {
|
|
2968
3417
|
const injector = inject(Injector);
|
|
2969
|
-
const provider = (await import('./acorex-platform-common-common-settings.provider-
|
|
3418
|
+
const provider = (await import('./acorex-platform-common-common-settings.provider-G9XcXXOG.mjs')).AXPCommonSettingProvider;
|
|
2970
3419
|
return new provider(injector);
|
|
2971
3420
|
},
|
|
2972
3421
|
multi: true,
|
|
@@ -2999,10 +3448,10 @@ function configPlatform(config = AXPPlatformDefaultConfigs) {
|
|
|
2999
3448
|
const AXP_ROOT_CONFIG_TOKEN = new InjectionToken('AXP_ROOT_CONFIG_TOKEN');
|
|
3000
3449
|
|
|
3001
3450
|
class AXPFileStorageService {
|
|
3002
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3003
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3451
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3452
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileStorageService }); }
|
|
3004
3453
|
}
|
|
3005
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileStorageService, decorators: [{
|
|
3006
3455
|
type: Injectable
|
|
3007
3456
|
}] });
|
|
3008
3457
|
|
|
@@ -3015,6 +3464,166 @@ var AXPFileStorageStatus;
|
|
|
3015
3464
|
AXPFileStorageStatus["Error"] = "error";
|
|
3016
3465
|
})(AXPFileStorageStatus || (AXPFileStorageStatus = {}));
|
|
3017
3466
|
|
|
3467
|
+
//#endregion
|
|
3468
|
+
//#region ---- Injection Token ----
|
|
3469
|
+
/**
|
|
3470
|
+
* Multi-provider injection token for file action providers.
|
|
3471
|
+
* Modules can provide multiple implementations using this token.
|
|
3472
|
+
*/
|
|
3473
|
+
const AXP_FILE_ACTION_PROVIDER = new InjectionToken('AXP_FILE_ACTION_PROVIDER');
|
|
3474
|
+
//#endregion
|
|
3475
|
+
|
|
3476
|
+
//#region ---- Service ----
|
|
3477
|
+
/**
|
|
3478
|
+
* Service for managing file uploader actions.
|
|
3479
|
+
* Aggregates actions from multiple providers and filters them based on plugin configuration.
|
|
3480
|
+
* Wraps the hook system for backward compatibility.
|
|
3481
|
+
*/
|
|
3482
|
+
class AXPFileActionsService {
|
|
3483
|
+
constructor() {
|
|
3484
|
+
//#region ---- Dependencies ----
|
|
3485
|
+
this.actionProviders = inject(AXP_FILE_ACTION_PROVIDER, { optional: true }) || [];
|
|
3486
|
+
this.hookService = inject(AXPHookService);
|
|
3487
|
+
this.injector = inject(Injector);
|
|
3488
|
+
}
|
|
3489
|
+
//#endregion
|
|
3490
|
+
//#region ---- Public API ----
|
|
3491
|
+
/**
|
|
3492
|
+
* Get all actions from providers, filtered based on plugin configuration.
|
|
3493
|
+
* Wraps the hook system for backward compatibility.
|
|
3494
|
+
* @param payload Initial payload with capabilities and plugin configuration.
|
|
3495
|
+
* @returns Filtered list of actions.
|
|
3496
|
+
*/
|
|
3497
|
+
async getActions(payload) {
|
|
3498
|
+
// First, run hook system for backward compatibility
|
|
3499
|
+
// Note: Hook system may still use old format with 'host', but we pass capabilities
|
|
3500
|
+
// Hook providers that need host will need to be migrated to use capabilities
|
|
3501
|
+
let hookPayload;
|
|
3502
|
+
try {
|
|
3503
|
+
hookPayload = await this.hookService.runAsync('file-uploader.actions', {
|
|
3504
|
+
...payload,
|
|
3505
|
+
// For backward compatibility, hooks might expect 'host' but we're using capabilities
|
|
3506
|
+
// Old hook providers will need to be migrated
|
|
3507
|
+
});
|
|
3508
|
+
}
|
|
3509
|
+
catch (err) {
|
|
3510
|
+
// If hook fails, continue with new system
|
|
3511
|
+
console.warn('[AXPFileActionsService] Hook system failed, continuing with providers only', err);
|
|
3512
|
+
}
|
|
3513
|
+
// Merge hook actions into payload (if any)
|
|
3514
|
+
const mergedPayload = {
|
|
3515
|
+
...payload,
|
|
3516
|
+
actions: hookPayload?.actions ?? payload.actions ?? [],
|
|
3517
|
+
};
|
|
3518
|
+
// Resolve all providers (handle both direct and Promise<provider>)
|
|
3519
|
+
const providers = await this.resolveProviders();
|
|
3520
|
+
// Filter providers by key
|
|
3521
|
+
const matchingProviders = providers
|
|
3522
|
+
.filter((p) => p.key === 'file-uploader.actions')
|
|
3523
|
+
.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
|
|
3524
|
+
// Execute providers sequentially (waterfall pattern)
|
|
3525
|
+
let currentPayload = { ...mergedPayload, actions: [...mergedPayload.actions] };
|
|
3526
|
+
for (const provider of matchingProviders) {
|
|
3527
|
+
try {
|
|
3528
|
+
currentPayload = await Promise.resolve(runInInjectionContext(this.injector, () => provider.execute(currentPayload)));
|
|
3529
|
+
}
|
|
3530
|
+
catch (err) {
|
|
3531
|
+
console.error(`[AXPFileActionsService] Provider '${provider.key}' failed`, err);
|
|
3532
|
+
}
|
|
3533
|
+
}
|
|
3534
|
+
// Filter actions based on plugin configuration
|
|
3535
|
+
return this.filterActions(currentPayload.actions, payload.plugins, payload.excludePlugins);
|
|
3536
|
+
}
|
|
3537
|
+
//#endregion
|
|
3538
|
+
//#region ---- Private Methods ----
|
|
3539
|
+
/**
|
|
3540
|
+
* Resolve all providers (handle both direct providers and Promise<provider>).
|
|
3541
|
+
*/
|
|
3542
|
+
async resolveProviders() {
|
|
3543
|
+
return Promise.all(this.actionProviders.map((p) => (p instanceof Promise ? p : Promise.resolve(p))));
|
|
3544
|
+
}
|
|
3545
|
+
/**
|
|
3546
|
+
* Filter actions based on enabled plugins and exclude list.
|
|
3547
|
+
*/
|
|
3548
|
+
filterActions(actions, enabledPlugins, excludePlugins) {
|
|
3549
|
+
const enabledPluginNames = enabledPlugins?.map((p) => p.name) ?? [];
|
|
3550
|
+
const excludedPluginNames = excludePlugins ?? [];
|
|
3551
|
+
return actions.filter((action) => {
|
|
3552
|
+
// Exclude if in exclude list
|
|
3553
|
+
if (excludedPluginNames.includes(action.plugin)) {
|
|
3554
|
+
return false;
|
|
3555
|
+
}
|
|
3556
|
+
// Include if global
|
|
3557
|
+
if (action.global === true) {
|
|
3558
|
+
return true;
|
|
3559
|
+
}
|
|
3560
|
+
// Include if plugin is explicitly enabled
|
|
3561
|
+
if (enabledPluginNames.length > 0 && enabledPluginNames.includes(action.plugin)) {
|
|
3562
|
+
return true;
|
|
3563
|
+
}
|
|
3564
|
+
// If no plugins are enabled, only show global actions
|
|
3565
|
+
if (enabledPluginNames.length === 0) {
|
|
3566
|
+
return !!action.global;
|
|
3567
|
+
}
|
|
3568
|
+
return false;
|
|
3569
|
+
});
|
|
3570
|
+
}
|
|
3571
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileActionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3572
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileActionsService, providedIn: 'root' }); }
|
|
3573
|
+
}
|
|
3574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileActionsService, decorators: [{
|
|
3575
|
+
type: Injectable,
|
|
3576
|
+
args: [{
|
|
3577
|
+
providedIn: 'root',
|
|
3578
|
+
}]
|
|
3579
|
+
}] });
|
|
3580
|
+
|
|
3581
|
+
//#endregion
|
|
3582
|
+
|
|
3583
|
+
const UploadFromComputerActionProvider = {
|
|
3584
|
+
key: 'file-uploader.actions',
|
|
3585
|
+
priority: 1, // Higher priority than upload-from-drive to show first
|
|
3586
|
+
execute: (payload) => {
|
|
3587
|
+
const fileService = inject(AXFileService);
|
|
3588
|
+
// Capture widget options for use in the action
|
|
3589
|
+
const widgetOptions = payload.options;
|
|
3590
|
+
payload.actions = [
|
|
3591
|
+
...payload.actions,
|
|
3592
|
+
{
|
|
3593
|
+
plugin: 'upload-from-computer',
|
|
3594
|
+
global: true,
|
|
3595
|
+
textKey: '@document-management:actions.upload-from-device',
|
|
3596
|
+
icon: 'fa-light fa-file-arrow-up',
|
|
3597
|
+
run: async (capabilities) => {
|
|
3598
|
+
// Open file picker with widget options
|
|
3599
|
+
const files = await fileService.choose({
|
|
3600
|
+
multiple: widgetOptions?.multiple ?? true,
|
|
3601
|
+
accept: widgetOptions?.accept,
|
|
3602
|
+
});
|
|
3603
|
+
// If no files are selected, return
|
|
3604
|
+
if (files.length === 0) {
|
|
3605
|
+
return;
|
|
3606
|
+
}
|
|
3607
|
+
// Create file list items from selected files
|
|
3608
|
+
const fileItems = files.map((file) => ({
|
|
3609
|
+
id: AXPDataGenerator.uuid(),
|
|
3610
|
+
name: file.name,
|
|
3611
|
+
size: file.size,
|
|
3612
|
+
status: 'attached',
|
|
3613
|
+
source: {
|
|
3614
|
+
kind: 'blob',
|
|
3615
|
+
value: file,
|
|
3616
|
+
},
|
|
3617
|
+
}));
|
|
3618
|
+
// Add files using capabilities
|
|
3619
|
+
capabilities.addFiles(fileItems);
|
|
3620
|
+
},
|
|
3621
|
+
},
|
|
3622
|
+
];
|
|
3623
|
+
return payload;
|
|
3624
|
+
},
|
|
3625
|
+
};
|
|
3626
|
+
|
|
3018
3627
|
const AXP_FILE_TYPE_INFO_PROVIDER = new InjectionToken('AXP_FILE_TYPE_INFO_PROVIDER');
|
|
3019
3628
|
class AXPFileTypeProviderService {
|
|
3020
3629
|
constructor() {
|
|
@@ -3032,19 +3641,19 @@ class AXPFileTypeProviderService {
|
|
|
3032
3641
|
async get(name) {
|
|
3033
3642
|
return (await this.items()).find((c) => c.name == name);
|
|
3034
3643
|
}
|
|
3035
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3036
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3644
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileTypeProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3645
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileTypeProviderService, providedIn: 'root' }); }
|
|
3037
3646
|
}
|
|
3038
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3647
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileTypeProviderService, decorators: [{
|
|
3039
3648
|
type: Injectable,
|
|
3040
3649
|
args: [{ providedIn: 'root' }]
|
|
3041
3650
|
}] });
|
|
3042
3651
|
|
|
3043
3652
|
class AXPLockService {
|
|
3044
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3045
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3653
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3654
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLockService }); }
|
|
3046
3655
|
}
|
|
3047
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3656
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLockService, decorators: [{
|
|
3048
3657
|
type: Injectable
|
|
3049
3658
|
}] });
|
|
3050
3659
|
|
|
@@ -3097,7 +3706,7 @@ const AXP_STATUS_PROVIDERS = new InjectionToken('AXP_STATUS_PROVIDERS');
|
|
|
3097
3706
|
* }
|
|
3098
3707
|
*
|
|
3099
3708
|
* // Later, get the status:
|
|
3100
|
-
* const status = statusService.getStatus('task-management.status');
|
|
3709
|
+
* const status = await statusService.getStatus('task-management.status');
|
|
3101
3710
|
* if (status) {
|
|
3102
3711
|
* console.log('Statuses:', status.statuses);
|
|
3103
3712
|
* console.log('Transitions:', status.transitions);
|
|
@@ -3105,8 +3714,6 @@ const AXP_STATUS_PROVIDERS = new InjectionToken('AXP_STATUS_PROVIDERS');
|
|
|
3105
3714
|
* ```
|
|
3106
3715
|
*/
|
|
3107
3716
|
class AXPStatusDefinitionProviderService {
|
|
3108
|
-
//#endregion
|
|
3109
|
-
//#region ---- Constructor ----
|
|
3110
3717
|
constructor() {
|
|
3111
3718
|
//#region ---- Dependencies ----
|
|
3112
3719
|
this.providers = inject(AXP_STATUS_PROVIDERS, { optional: true }) ?? [];
|
|
@@ -3114,33 +3721,64 @@ class AXPStatusDefinitionProviderService {
|
|
|
3114
3721
|
//#endregion
|
|
3115
3722
|
//#region ---- State ----
|
|
3116
3723
|
this.statusMap = new Map();
|
|
3117
|
-
|
|
3724
|
+
this.initializationPromise = null;
|
|
3725
|
+
this.isInitialized = false;
|
|
3726
|
+
}
|
|
3727
|
+
//#endregion
|
|
3728
|
+
//#region ---- Initialization ----
|
|
3729
|
+
/**
|
|
3730
|
+
* Initialize providers (resolve promises if needed)
|
|
3731
|
+
* Called lazily on first access
|
|
3732
|
+
*/
|
|
3733
|
+
async initialize() {
|
|
3734
|
+
if (this.isInitialized) {
|
|
3735
|
+
return;
|
|
3736
|
+
}
|
|
3737
|
+
if (this.initializationPromise) {
|
|
3738
|
+
return this.initializationPromise;
|
|
3739
|
+
}
|
|
3740
|
+
this.initializationPromise = this._doInitialize();
|
|
3741
|
+
await this.initializationPromise;
|
|
3742
|
+
}
|
|
3743
|
+
async _doInitialize() {
|
|
3744
|
+
// Register all providers, resolving promises if needed
|
|
3118
3745
|
for (const provider of this.providers) {
|
|
3119
|
-
|
|
3120
|
-
|
|
3746
|
+
let resolvedProvider;
|
|
3747
|
+
if (provider instanceof Promise) {
|
|
3748
|
+
// If provider is a promise, resolve it
|
|
3749
|
+
resolvedProvider = await provider;
|
|
3750
|
+
}
|
|
3751
|
+
else {
|
|
3752
|
+
// If provider is a direct instance, use it directly
|
|
3753
|
+
resolvedProvider = provider;
|
|
3754
|
+
}
|
|
3755
|
+
if (this.statusMap.has(resolvedProvider.key)) {
|
|
3756
|
+
console.warn(`Status with key "${resolvedProvider.key}" already exists. Overwriting with new status.`);
|
|
3121
3757
|
}
|
|
3122
|
-
this.statusMap.set(
|
|
3758
|
+
this.statusMap.set(resolvedProvider.key, resolvedProvider);
|
|
3123
3759
|
}
|
|
3760
|
+
this.isInitialized = true;
|
|
3124
3761
|
}
|
|
3125
3762
|
//#endregion
|
|
3126
3763
|
//#region ---- Public API ----
|
|
3127
3764
|
/**
|
|
3128
3765
|
* Get a status provider by key
|
|
3129
|
-
*
|
|
3766
|
+
* Ensures initialization is complete before accessing the status map.
|
|
3130
3767
|
*
|
|
3131
3768
|
* @param key - Status key (e.g., 'task-management.status')
|
|
3132
|
-
* @returns
|
|
3769
|
+
* @returns Promise that resolves to status provider with all statuses and transitions, or undefined if not found
|
|
3133
3770
|
*
|
|
3134
3771
|
* @example
|
|
3135
3772
|
* ```typescript
|
|
3136
|
-
* const status = statusService.getStatus('task-management.status');
|
|
3773
|
+
* const status = await statusService.getStatus('task-management.status');
|
|
3137
3774
|
* if (status) {
|
|
3138
3775
|
* console.log('Statuses:', status.statuses);
|
|
3139
3776
|
* console.log('Transitions:', status.transitions);
|
|
3140
3777
|
* }
|
|
3141
3778
|
* ```
|
|
3142
3779
|
*/
|
|
3143
|
-
getStatus(key) {
|
|
3780
|
+
async getStatus(key) {
|
|
3781
|
+
await this.initialize();
|
|
3144
3782
|
return this.statusMap.get(key);
|
|
3145
3783
|
}
|
|
3146
3784
|
/**
|
|
@@ -3163,7 +3801,8 @@ class AXPStatusDefinitionProviderService {
|
|
|
3163
3801
|
* ```
|
|
3164
3802
|
*/
|
|
3165
3803
|
async executeTransition(definitionKey, transition, context) {
|
|
3166
|
-
|
|
3804
|
+
await this.initialize();
|
|
3805
|
+
const provider = this.statusMap.get(definitionKey);
|
|
3167
3806
|
if (!provider) {
|
|
3168
3807
|
throw new Error(`Status provider with key "${definitionKey}" not found.`);
|
|
3169
3808
|
}
|
|
@@ -3215,13 +3854,13 @@ class AXPStatusDefinitionProviderService {
|
|
|
3215
3854
|
isValidTransition(provider, from, to) {
|
|
3216
3855
|
return provider.transitions.some((transition) => transition.from === from && transition.to === to);
|
|
3217
3856
|
}
|
|
3218
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3219
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3857
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStatusDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3858
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStatusDefinitionProviderService, providedIn: 'root' }); }
|
|
3220
3859
|
}
|
|
3221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3860
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStatusDefinitionProviderService, decorators: [{
|
|
3222
3861
|
type: Injectable,
|
|
3223
3862
|
args: [{ providedIn: 'root' }]
|
|
3224
|
-
}]
|
|
3863
|
+
}] });
|
|
3225
3864
|
|
|
3226
3865
|
/**
|
|
3227
3866
|
* Standard system status types
|
|
@@ -3565,10 +4204,10 @@ class AXPClipBoardService {
|
|
|
3565
4204
|
navigator.clipboard.writeText(value);
|
|
3566
4205
|
this.toast.success(`${title} copied!`);
|
|
3567
4206
|
}
|
|
3568
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3569
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4207
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPClipBoardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4208
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPClipBoardService, providedIn: 'root' }); }
|
|
3570
4209
|
}
|
|
3571
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPClipBoardService, decorators: [{
|
|
3572
4211
|
type: Injectable,
|
|
3573
4212
|
args: [{
|
|
3574
4213
|
providedIn: 'root',
|
|
@@ -3682,10 +4321,10 @@ class AXPDebugService {
|
|
|
3682
4321
|
console.error('[AXPDebugService] Failed to display user access info:', error);
|
|
3683
4322
|
}
|
|
3684
4323
|
}
|
|
3685
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3686
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4324
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDebugService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4325
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDebugService, providedIn: 'root' }); }
|
|
3687
4326
|
}
|
|
3688
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDebugService, decorators: [{
|
|
3689
4328
|
type: Injectable,
|
|
3690
4329
|
args: [{
|
|
3691
4330
|
providedIn: 'root',
|
|
@@ -3695,15 +4334,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
3695
4334
|
class AXMOrgChartPrintPage extends AXBasePageComponent {
|
|
3696
4335
|
constructor() {
|
|
3697
4336
|
super(...arguments);
|
|
3698
|
-
this.ratio = signal(false, ...(ngDevMode ? [{ debugName: "ratio" }] : []));
|
|
3699
|
-
this.baseWidth = signal(undefined, ...(ngDevMode ? [{ debugName: "baseWidth" }] : []));
|
|
3700
|
-
this.baseHeight = signal(undefined, ...(ngDevMode ? [{ debugName: "baseHeight" }] : []));
|
|
3701
|
-
this.bgcolor = model(...(ngDevMode ? [undefined, { debugName: "bgcolor" }] : []));
|
|
3702
|
-
this.width = model(...(ngDevMode ? [undefined, { debugName: "width" }] : []));
|
|
3703
|
-
this.height = model(...(ngDevMode ? [undefined, { debugName: "height" }] : []));
|
|
3704
|
-
this.quality = model(...(ngDevMode ? [undefined, { debugName: "quality" }] : []));
|
|
3705
|
-
this.qualityComputed = linkedSignal(() => (this.data.quality ?? 1) * 100, ...(ngDevMode ? [{ debugName: "qualityComputed" }] : []));
|
|
3706
|
-
this.scale = model(...(ngDevMode ? [undefined, { debugName: "scale" }] : []));
|
|
4337
|
+
this.ratio = signal(false, ...(ngDevMode ? [{ debugName: "ratio" }] : /* istanbul ignore next */ []));
|
|
4338
|
+
this.baseWidth = signal(undefined, ...(ngDevMode ? [{ debugName: "baseWidth" }] : /* istanbul ignore next */ []));
|
|
4339
|
+
this.baseHeight = signal(undefined, ...(ngDevMode ? [{ debugName: "baseHeight" }] : /* istanbul ignore next */ []));
|
|
4340
|
+
this.bgcolor = model(...(ngDevMode ? [undefined, { debugName: "bgcolor" }] : /* istanbul ignore next */ []));
|
|
4341
|
+
this.width = model(...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
|
|
4342
|
+
this.height = model(...(ngDevMode ? [undefined, { debugName: "height" }] : /* istanbul ignore next */ []));
|
|
4343
|
+
this.quality = model(...(ngDevMode ? [undefined, { debugName: "quality" }] : /* istanbul ignore next */ []));
|
|
4344
|
+
this.qualityComputed = linkedSignal(() => (this.data.quality ?? 1) * 100, ...(ngDevMode ? [{ debugName: "qualityComputed" }] : /* istanbul ignore next */ []));
|
|
4345
|
+
this.scale = model(...(ngDevMode ? [undefined, { debugName: "scale" }] : /* istanbul ignore next */ []));
|
|
3707
4346
|
this.#init = afterNextRender(() => {
|
|
3708
4347
|
this.bgcolor.set(this.data.bgcolor);
|
|
3709
4348
|
this.width.set(this.data.width);
|
|
@@ -3740,8 +4379,8 @@ class AXMOrgChartPrintPage extends AXBasePageComponent {
|
|
|
3740
4379
|
isCanceled,
|
|
3741
4380
|
});
|
|
3742
4381
|
}
|
|
3743
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3744
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
4382
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOrgChartPrintPage, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4383
|
+
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">
|
|
3745
4384
|
<ax-label>Resolution (px)</ax-label>
|
|
3746
4385
|
<div class="ax-flex ax-gap-2 ax-items-center">
|
|
3747
4386
|
<ax-number-box
|
|
@@ -3792,7 +4431,7 @@ class AXMOrgChartPrintPage extends AXBasePageComponent {
|
|
|
3792
4431
|
</ax-suffix>
|
|
3793
4432
|
</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"] }] }); }
|
|
3794
4433
|
}
|
|
3795
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOrgChartPrintPage, decorators: [{
|
|
3796
4435
|
type: Component,
|
|
3797
4436
|
args: [{
|
|
3798
4437
|
template: ` <div class="ax-grid ax-grid-cols-[auto_18rem] ax-gap-4 ax-justify-center ax-p-4 ax-items-center">
|
|
@@ -3906,10 +4545,10 @@ class AXPExportService {
|
|
|
3906
4545
|
document.body.removeChild(link);
|
|
3907
4546
|
URL.revokeObjectURL(link.href);
|
|
3908
4547
|
}
|
|
3909
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3910
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4548
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4549
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExportService, providedIn: 'root' }); }
|
|
3911
4550
|
}
|
|
3912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4551
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExportService, decorators: [{
|
|
3913
4552
|
type: Injectable,
|
|
3914
4553
|
args: [{
|
|
3915
4554
|
providedIn: 'root',
|
|
@@ -3939,6 +4578,8 @@ function AXPCleanNestedFilters(filters) {
|
|
|
3939
4578
|
.filter(Boolean);
|
|
3940
4579
|
}
|
|
3941
4580
|
|
|
4581
|
+
const AXP_LOCALE_MANAGEMENT_PORT = new InjectionToken('AXP_LOCALE_MANAGEMENT_PORT');
|
|
4582
|
+
|
|
3942
4583
|
//#region ---- Versioning Types ----
|
|
3943
4584
|
var AXVChangeType;
|
|
3944
4585
|
(function (AXVChangeType) {
|
|
@@ -3956,5 +4597,5 @@ class AXPVersioningService {
|
|
|
3956
4597
|
* Generated bundle index. Do not edit.
|
|
3957
4598
|
*/
|
|
3958
4599
|
|
|
3959
|
-
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 };
|
|
4600
|
+
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, configPlatform, createAllQueryView, createEntityCommandOptions, createEntitySearchCommand, createMenuContext, createMenuMiddleware, createQueryView, getEntityInfo, getStatusInfo, getSystemStatus, provideDynamicHomePage, provideMenuMiddleware, resolveStatusLook, shouldApplyDefaultMultiLanguageToEntityProperty, shouldApplyDefaultMultiLanguageToWidgetNode, shouldApplyDefaultMultiLanguageToWidgetProperty, systemStatusToDefinition, withDefaultMultiLanguageOnWidgetNodeTree, withDefaultMultiLanguageOnWidgetProperty };
|
|
3960
4601
|
//# sourceMappingURL=acorex-platform-common.mjs.map
|