@acorex/platform 20.8.9 → 20.8.11
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 +125 -27
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-DVvuLUfF.mjs → acorex-platform-common-common-settings.provider-Bi1RYif5.mjs} +30 -32
- package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +711 -205
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +420 -127
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +557 -826
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +634 -114
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs → acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs} +9 -9
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +3365 -880
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +456 -204
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +18667 -14048
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +413 -171
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +507 -441
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.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-Dtv6U3df.mjs → acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs} +21 -76
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.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-CVdssZBD.mjs → acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs} +12 -12
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs +116 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs} +5 -5
- 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-DPGHgXa6.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs} +4 -4
- 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-CdiNW691.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 +6578 -4314
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +8 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +391 -166
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs → acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs} +16 -23
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-401.component-53VB-PS_.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-DVF9soT5.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 +1784 -61
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.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-BHcKkIx0.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs} +24 -25
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +94 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs +86 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +408 -305
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +359 -100
- 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} +14 -2
- package/{common/index.d.ts → types/acorex-platform-common.d.ts} +302 -30
- package/{core/index.d.ts → types/acorex-platform-core.d.ts} +188 -44
- package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +744 -412
- package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +160 -38
- package/{layout/components/index.d.ts → types/acorex-platform-layout-components.d.ts} +854 -125
- package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +96 -18
- package/{layout/entity/index.d.ts → types/acorex-platform-layout-entity.d.ts} +848 -63
- package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +80 -47
- package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +274 -197
- package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +608 -122
- package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
- package/types/acorex-platform-runtime.d.ts +571 -0
- package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +113 -4
- package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +5 -4
- package/{workflow/index.d.ts → types/acorex-platform-workflow.d.ts} +162 -81
- package/fesm2022/acorex-platform-common-common-settings.provider-DVvuLUfF.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs +0 -111
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs +0 -160
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D2CtNrSn.mjs +0 -1716
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D2CtNrSn.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs +0 -120
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-53VB-PS_.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-DVF9soT5.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs +0 -65
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs +0 -64
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs.map +0 -1
- package/runtime/index.d.ts +0 -307
- /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Injectable, Injector, makeEnvironmentProviders, NgModule, ErrorHandler, EventEmitter, Input, Output, Directive, Component, ViewEncapsulation, Inject, runInInjectionContext,
|
|
2
|
+
import { InjectionToken, inject, Injectable, Injector, signal, makeEnvironmentProviders, NgModule, ErrorHandler, EventEmitter, Input, Output, Directive, ChangeDetectionStrategy, Component, ViewEncapsulation, Inject, runInInjectionContext, model, linkedSignal, afterNextRender } from '@angular/core';
|
|
3
3
|
import { kebabCase, merge, sortBy, cloneDeep, get, omit } from 'lodash-es';
|
|
4
4
|
import { Router, ROUTES, RouterModule } from '@angular/router';
|
|
5
5
|
import { AXPSessionService, AXPSessionStatus } from '@acorex/platform/auth';
|
|
6
6
|
import { Subject, distinctUntilChanged, merge as merge$1 } from 'rxjs';
|
|
7
|
-
import { AXPPlatformScope, AXPBroadcastEventService, objectKeyValueTransforms, AXPSystemActionType, AXPModuleManifestModule, AXPAppStartUpProvider, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXPHookService, AXPDataGenerator, AXPModuleManifestRegistry } from '@acorex/platform/core';
|
|
8
|
-
import { AXTranslationService } from '@acorex/core/translation';
|
|
7
|
+
import { unwrapValueProperty, coerceUnknownToDate, coerceUnknownToFiniteNumber, coerceUnknownToBoolean, coerceUnknownToTrimmedString, AXPPlatformScope, AXPBroadcastEventService, objectKeyValueTransforms, AXPSystemActionType, searchInMultiLanguageString, AXPModuleManifestModule, AXPAppStartUpProvider, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXPHookService, AXPDataGenerator, AXPModuleManifestRegistry } from '@acorex/platform/core';
|
|
9
8
|
import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
|
|
10
9
|
import { AXPopupModule, AXPopupService } from '@acorex/components/popup';
|
|
11
10
|
import { AXToastService, AXToastModule } from '@acorex/components/toast';
|
|
12
11
|
import { AXDateTimeModule } from '@acorex/core/date-time';
|
|
13
12
|
import * as i1 from '@acorex/platform/workflow';
|
|
14
13
|
import { AXPWorkflowService, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowError, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
14
|
+
import { AXDataSource } from '@acorex/cdk/common';
|
|
15
15
|
import { AXPCommandExecutor, AXPCommandService } from '@acorex/platform/runtime';
|
|
16
16
|
import { signalStore, withState, withMethods, patchState, withHooks } from '@ngrx/signals';
|
|
17
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
17
18
|
import { AXFormatService } from '@acorex/core/format';
|
|
18
19
|
import { AXDialogService } from '@acorex/components/dialog';
|
|
19
20
|
import { AXFileService } from '@acorex/core/file';
|
|
@@ -55,10 +56,10 @@ class AXPAppVersionService {
|
|
|
55
56
|
async getAppVersion() {
|
|
56
57
|
return this.provider.provider();
|
|
57
58
|
}
|
|
58
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
59
|
-
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' }); }
|
|
60
61
|
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAppVersionService, decorators: [{
|
|
62
63
|
type: Injectable,
|
|
63
64
|
args: [{
|
|
64
65
|
providedIn: 'root',
|
|
@@ -127,6 +128,13 @@ function createAllQueryView(params = {
|
|
|
127
128
|
sorts: params.sorts ?? [],
|
|
128
129
|
});
|
|
129
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 = {}));
|
|
130
138
|
|
|
131
139
|
const EQ_OPER = { name: 'equal', title: '@general:terms.operators.equal', hasValue: true };
|
|
132
140
|
const NOT_EQ_OPER = { name: 'notEqual', title: '@general:terms.operators.not-equal', hasValue: true };
|
|
@@ -201,15 +209,46 @@ const AXP_HOME_PAGE_DEFAULT_KEY = new InjectionToken('AXP_HOME_PAGE_DEFAULT_KEY'
|
|
|
201
209
|
factory: () => 'home'
|
|
202
210
|
});
|
|
203
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
|
+
|
|
204
242
|
class AXPSettingDefinitionProviderContext {
|
|
205
243
|
constructor() {
|
|
206
244
|
this.rootGroups = [];
|
|
207
245
|
this.groupMap = new Map();
|
|
208
246
|
}
|
|
209
|
-
addGroup(name, title, description, icon) {
|
|
247
|
+
addGroup(name, title, description, icon, pageTitle) {
|
|
210
248
|
const newGroup = {
|
|
211
249
|
name,
|
|
212
250
|
title,
|
|
251
|
+
pageTitle,
|
|
213
252
|
description,
|
|
214
253
|
icon,
|
|
215
254
|
groups: [],
|
|
@@ -260,10 +299,11 @@ class AXPSettingDefinitionGroupBuilder {
|
|
|
260
299
|
}
|
|
261
300
|
return new AXPSettingDefinitionSectionBuilder(this, foundSection);
|
|
262
301
|
}
|
|
263
|
-
addGroup(name, title, description, icon) {
|
|
302
|
+
addGroup(name, title, description, icon, pageTitle) {
|
|
264
303
|
const newGroup = {
|
|
265
304
|
name,
|
|
266
305
|
title,
|
|
306
|
+
pageTitle,
|
|
267
307
|
description: description,
|
|
268
308
|
icon,
|
|
269
309
|
groups: [],
|
|
@@ -290,6 +330,7 @@ class AXPSettingDefinitionSectionBuilder {
|
|
|
290
330
|
name: setting.key,
|
|
291
331
|
title: setting.title,
|
|
292
332
|
description: setting.description,
|
|
333
|
+
searchTagKeys: setting.searchTagKeys,
|
|
293
334
|
isRequired: setting.isRequired ?? false,
|
|
294
335
|
isInherited: setting.isInherited ?? false,
|
|
295
336
|
isEncrypted: setting.isEncrypted ?? false,
|
|
@@ -457,10 +498,10 @@ class AXPSettingDefinitionProviderService {
|
|
|
457
498
|
sections: [],
|
|
458
499
|
};
|
|
459
500
|
}
|
|
460
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
461
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
501
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
502
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefinitionProviderService, providedIn: 'root' }); }
|
|
462
503
|
}
|
|
463
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
504
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefinitionProviderService, decorators: [{
|
|
464
505
|
type: Injectable,
|
|
465
506
|
args: [{ providedIn: 'root' }]
|
|
466
507
|
}] });
|
|
@@ -490,14 +531,78 @@ class AXPSettingDefaultValuesAggregatorService {
|
|
|
490
531
|
}
|
|
491
532
|
return merged;
|
|
492
533
|
}
|
|
493
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
494
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
534
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefaultValuesAggregatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
535
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefaultValuesAggregatorService, providedIn: 'root' }); }
|
|
495
536
|
}
|
|
496
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingDefaultValuesAggregatorService, decorators: [{
|
|
497
538
|
type: Injectable,
|
|
498
539
|
args: [{ providedIn: 'root' }]
|
|
499
540
|
}] });
|
|
500
541
|
|
|
542
|
+
//#region ---- Imports ----
|
|
543
|
+
//#endregion
|
|
544
|
+
//#region ---- Kind inference ----
|
|
545
|
+
/**
|
|
546
|
+
* If the payload uses the common `{ value: T }` shape from setting widgets, returns the inner value; otherwise returns `raw`.
|
|
547
|
+
*/
|
|
548
|
+
function peelSettingValueKey(raw) {
|
|
549
|
+
return unwrapValueProperty(raw);
|
|
550
|
+
}
|
|
551
|
+
function coercionKindFromScalarSample(v) {
|
|
552
|
+
if (v === null || v === undefined) {
|
|
553
|
+
return null;
|
|
554
|
+
}
|
|
555
|
+
if (typeof v === 'boolean') {
|
|
556
|
+
return 'boolean';
|
|
557
|
+
}
|
|
558
|
+
if (typeof v === 'number' && Number.isFinite(v)) {
|
|
559
|
+
return 'number';
|
|
560
|
+
}
|
|
561
|
+
if (v instanceof Date) {
|
|
562
|
+
return 'date';
|
|
563
|
+
}
|
|
564
|
+
if (typeof v === 'string') {
|
|
565
|
+
if (v === 'true' || v === 'false') {
|
|
566
|
+
return 'boolean';
|
|
567
|
+
}
|
|
568
|
+
return 'string';
|
|
569
|
+
}
|
|
570
|
+
return null;
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Picks a primitive coercion kind from the setting definition default and/or the effective stored value.
|
|
574
|
+
* Type argument `T` on the settings service `get` method is compile-time only; runtime behavior follows this inference.
|
|
575
|
+
*/
|
|
576
|
+
function inferSettingCoercionKind(defaultSample, effective) {
|
|
577
|
+
const fromDefault = coercionKindFromScalarSample(defaultSample);
|
|
578
|
+
if (fromDefault) {
|
|
579
|
+
return fromDefault;
|
|
580
|
+
}
|
|
581
|
+
return coercionKindFromScalarSample(unwrapValueProperty(effective));
|
|
582
|
+
}
|
|
583
|
+
//#endregion
|
|
584
|
+
//#region ---- Value coercion ----
|
|
585
|
+
function coerceAXPSettingRawValueByKind(raw, kind) {
|
|
586
|
+
switch (kind) {
|
|
587
|
+
case 'string':
|
|
588
|
+
return coerceUnknownToTrimmedString(raw);
|
|
589
|
+
case 'boolean':
|
|
590
|
+
return coerceUnknownToBoolean(raw);
|
|
591
|
+
case 'number':
|
|
592
|
+
return coerceUnknownToFiniteNumber(raw);
|
|
593
|
+
case 'date':
|
|
594
|
+
return coerceUnknownToDate(raw);
|
|
595
|
+
default: {
|
|
596
|
+
const _exhaustive = kind;
|
|
597
|
+
return _exhaustive;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
function coerceAXPSettingRawValue(raw, kind) {
|
|
602
|
+
return coerceAXPSettingRawValueByKind(raw, kind);
|
|
603
|
+
}
|
|
604
|
+
//#endregion
|
|
605
|
+
|
|
501
606
|
const AXP_SETTING_VALUE_PROVIDER = new InjectionToken('AXP_SETTING_VALUE_PROVIDER', {
|
|
502
607
|
providedIn: 'root',
|
|
503
608
|
factory: () => {
|
|
@@ -636,22 +741,42 @@ class AXPSettingsService {
|
|
|
636
741
|
throw error;
|
|
637
742
|
}
|
|
638
743
|
}
|
|
744
|
+
/**
|
|
745
|
+
* Returns the effective setting value. Primitive coercion (string, boolean, number, date) is inferred from the
|
|
746
|
+
* definition default and/or the stored shape (including `{ value: ... }`). Type argument `T` is compile-time only;
|
|
747
|
+
* it is not read at runtime—use it to document the expected result (e.g. `get<boolean>(key)`).
|
|
748
|
+
*/
|
|
639
749
|
async get(key) {
|
|
750
|
+
const { effective, defaultSample } = await this.resolveEffectiveAndDefault(key);
|
|
751
|
+
const kind = inferSettingCoercionKind(defaultSample, effective);
|
|
752
|
+
if (kind !== null) {
|
|
753
|
+
return coerceAXPSettingRawValueByKind(effective, kind);
|
|
754
|
+
}
|
|
755
|
+
if (effective === undefined) {
|
|
756
|
+
return effective;
|
|
757
|
+
}
|
|
758
|
+
return cloneDeep(effective);
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* Effective value (user → tenant → platform) when set; otherwise the definition default. Used for reads and coercion hints.
|
|
762
|
+
*/
|
|
763
|
+
async resolveEffectiveAndDefault(key) {
|
|
640
764
|
if (this.scopedSettingsCache.size === 0) {
|
|
641
765
|
await this.load();
|
|
642
766
|
}
|
|
767
|
+
const defaults = await this.injector.get(AXPSettingDefaultValuesAggregatorService).getDefaults();
|
|
768
|
+
const defaultSample = get(defaults, key);
|
|
643
769
|
const scopeOrder = [AXPPlatformScope.User, AXPPlatformScope.Tenant, AXPPlatformScope.Platform];
|
|
644
770
|
for (const scope of scopeOrder) {
|
|
645
771
|
const scopeCache = this.scopedSettingsCache.get(scope);
|
|
646
772
|
if (scopeCache && scopeCache.has(key)) {
|
|
647
773
|
const value = scopeCache.get(key);
|
|
648
774
|
if (value !== undefined && value !== null) {
|
|
649
|
-
return
|
|
775
|
+
return { effective: value, defaultSample };
|
|
650
776
|
}
|
|
651
777
|
}
|
|
652
778
|
}
|
|
653
|
-
|
|
654
|
-
return get(defaults, key); // Fallback if no value is found
|
|
779
|
+
return { effective: defaultSample, defaultSample };
|
|
655
780
|
}
|
|
656
781
|
async defaultValues(scope) {
|
|
657
782
|
let scopeOrder = [AXPPlatformScope.Platform, AXPPlatformScope.Tenant, AXPPlatformScope.User].reverse();
|
|
@@ -691,10 +816,7 @@ class AXPSettingsService {
|
|
|
691
816
|
async seedMissingDefaults() {
|
|
692
817
|
const definitionService = this.injector.get(AXPSettingDefinitionProviderService);
|
|
693
818
|
const aggregator = this.injector.get(AXPSettingDefaultValuesAggregatorService);
|
|
694
|
-
const [defaults, scopeByKey] = await Promise.all([
|
|
695
|
-
aggregator.getDefaults(),
|
|
696
|
-
definitionService.settingScopeByKey(),
|
|
697
|
-
]);
|
|
819
|
+
const [defaults, scopeByKey] = await Promise.all([aggregator.getDefaults(), definitionService.settingScopeByKey()]);
|
|
698
820
|
const persistedKeysByScope = new Map(await Promise.all(this.providers.map(async (provider) => {
|
|
699
821
|
const stored = await provider.load();
|
|
700
822
|
return [provider.scope, new Set(stored.map((s) => s.key))];
|
|
@@ -714,10 +836,10 @@ class AXPSettingsService {
|
|
|
714
836
|
}
|
|
715
837
|
}
|
|
716
838
|
}
|
|
717
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
718
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
839
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
840
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsService, providedIn: 'root' }); }
|
|
719
841
|
}
|
|
720
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSettingsService, decorators: [{
|
|
721
843
|
type: Injectable,
|
|
722
844
|
args: [{
|
|
723
845
|
providedIn: 'root',
|
|
@@ -732,7 +854,17 @@ class ScopedSettingService {
|
|
|
732
854
|
async get(key) {
|
|
733
855
|
const settings = await this.provider.load();
|
|
734
856
|
const setting = settings.find((s) => s.key === key);
|
|
735
|
-
|
|
857
|
+
const effective = setting?.value;
|
|
858
|
+
const defaults = await this.parent.defaultValues(this.provider.scope);
|
|
859
|
+
const defaultSample = get(defaults, key);
|
|
860
|
+
const kind = inferSettingCoercionKind(defaultSample, effective);
|
|
861
|
+
if (kind !== null) {
|
|
862
|
+
return coerceAXPSettingRawValueByKind(effective, kind);
|
|
863
|
+
}
|
|
864
|
+
if (effective === undefined) {
|
|
865
|
+
return effective;
|
|
866
|
+
}
|
|
867
|
+
return cloneDeep(effective);
|
|
736
868
|
}
|
|
737
869
|
async all() {
|
|
738
870
|
const settings = await this.provider.load();
|
|
@@ -773,34 +905,219 @@ class ScopedSettingService {
|
|
|
773
905
|
}
|
|
774
906
|
}
|
|
775
907
|
|
|
908
|
+
const DEFAULT_APPLY_DEFAULT_MULTILANGUAGE = true;
|
|
776
909
|
/**
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
910
|
+
* Synchronous access to default multi-language behavior for named entity fields and widget
|
|
911
|
+
* property bindings. Mirrors {@link AXPLayoutOrderingConfigService}: avoids async in entity
|
|
912
|
+
* modifiers and startup deadlocks.
|
|
780
913
|
*/
|
|
781
|
-
|
|
782
|
-
(
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
}
|
|
914
|
+
class AXPDefaultMultiLanguageConfigService {
|
|
915
|
+
constructor() {
|
|
916
|
+
this.settingsService = inject(AXPSettingsService);
|
|
917
|
+
this._applyDefault = signal(DEFAULT_APPLY_DEFAULT_MULTILANGUAGE, ...(ngDevMode ? [{ debugName: "_applyDefault" }] : /* istanbul ignore next */ []));
|
|
918
|
+
this.syncScheduled = false;
|
|
919
|
+
this.settingsService.onLoaded.subscribe(() => this.syncFromSettings());
|
|
920
|
+
this.settingsService.onChanged.subscribe(() => this.syncFromSettings());
|
|
921
|
+
}
|
|
922
|
+
getApplyDefaultMultiLanguage() {
|
|
923
|
+
if (!this.syncScheduled) {
|
|
924
|
+
this.syncScheduled = true;
|
|
925
|
+
this.settingsService
|
|
926
|
+
.get(AXPRegionalSetting.MultiLanguageSupport)
|
|
927
|
+
.then((value) => this._applyDefault.set(value ?? DEFAULT_APPLY_DEFAULT_MULTILANGUAGE))
|
|
928
|
+
.catch(() => this._applyDefault.set(DEFAULT_APPLY_DEFAULT_MULTILANGUAGE));
|
|
929
|
+
}
|
|
930
|
+
return this._applyDefault();
|
|
931
|
+
}
|
|
932
|
+
async syncFromSettings() {
|
|
933
|
+
try {
|
|
934
|
+
const value = await this.settingsService.get(AXPRegionalSetting.MultiLanguageSupport);
|
|
935
|
+
this._applyDefault.set(value ?? DEFAULT_APPLY_DEFAULT_MULTILANGUAGE);
|
|
936
|
+
}
|
|
937
|
+
catch {
|
|
938
|
+
this._applyDefault.set(DEFAULT_APPLY_DEFAULT_MULTILANGUAGE);
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultMultiLanguageConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
942
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultMultiLanguageConfigService, providedIn: 'root' }); }
|
|
943
|
+
}
|
|
944
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultMultiLanguageConfigService, decorators: [{
|
|
945
|
+
type: Injectable,
|
|
946
|
+
args: [{ providedIn: 'root' }]
|
|
947
|
+
}], ctorParameters: () => [] });
|
|
948
|
+
|
|
949
|
+
//#region ---- Constants ----
|
|
950
|
+
/**
|
|
951
|
+
* Widget types that support the multiLanguage option (text / rich text editors).
|
|
952
|
+
*/
|
|
953
|
+
const MULTILANGUAGE_CAPABLE_WIDGET_TYPES = new Set([
|
|
954
|
+
'text-editor',
|
|
955
|
+
'large-text-editor',
|
|
956
|
+
'rich-text-editor',
|
|
957
|
+
'template-content-editor',
|
|
958
|
+
]);
|
|
959
|
+
/**
|
|
960
|
+
* Common property names / binding path segments that are usually translatable when the feature is
|
|
961
|
+
* enabled in settings. Explicit `multiLanguage` on the property still wins.
|
|
962
|
+
*/
|
|
963
|
+
const DEFAULT_MULTILANGUAGE_FIELD_NAMES = new Set([
|
|
964
|
+
'title',
|
|
965
|
+
'description',
|
|
966
|
+
'note',
|
|
967
|
+
'content',
|
|
968
|
+
/** e.g. `post.summaryContent` — last path segment */
|
|
969
|
+
'summaryContent',
|
|
970
|
+
'question',
|
|
971
|
+
'summary',
|
|
972
|
+
'body',
|
|
973
|
+
'caption',
|
|
974
|
+
'remarks',
|
|
975
|
+
'subtitle',
|
|
976
|
+
'label',
|
|
977
|
+
'placeholder',
|
|
978
|
+
'message',
|
|
979
|
+
'subject',
|
|
980
|
+
]);
|
|
981
|
+
//#endregion
|
|
982
|
+
//#region ---- Helpers ----
|
|
983
|
+
function interfacePathLastSegment(path) {
|
|
984
|
+
if (path == null || typeof path !== 'string' || !path.length) {
|
|
985
|
+
return null;
|
|
986
|
+
}
|
|
987
|
+
const seg = path.includes('.') ? path.split('.').pop() : path;
|
|
988
|
+
return seg && seg.length ? seg : null;
|
|
989
|
+
}
|
|
990
|
+
function shouldApplyDefaultMultiLanguageToEntityProperty(prop) {
|
|
991
|
+
if (prop.schema.dataType !== 'string') {
|
|
992
|
+
return false;
|
|
993
|
+
}
|
|
994
|
+
if (!DEFAULT_MULTILANGUAGE_FIELD_NAMES.has(prop.name)) {
|
|
995
|
+
return false;
|
|
996
|
+
}
|
|
997
|
+
const widgetType = prop.schema.interface?.type;
|
|
998
|
+
if (typeof widgetType !== 'string' || !MULTILANGUAGE_CAPABLE_WIDGET_TYPES.has(widgetType)) {
|
|
999
|
+
return false;
|
|
1000
|
+
}
|
|
1001
|
+
const opts = prop.schema.interface?.options;
|
|
1002
|
+
if (opts && 'multiLanguage' in opts) {
|
|
1003
|
+
return false;
|
|
1004
|
+
}
|
|
1005
|
+
return true;
|
|
1006
|
+
}
|
|
1007
|
+
function shouldApplyDefaultMultiLanguageToWidgetProperty(prop) {
|
|
1008
|
+
if (prop.schema.dataType !== 'string') {
|
|
1009
|
+
return false;
|
|
1010
|
+
}
|
|
1011
|
+
const key = interfacePathLastSegment(prop.schema.interface.path);
|
|
1012
|
+
if (!key || !DEFAULT_MULTILANGUAGE_FIELD_NAMES.has(key)) {
|
|
1013
|
+
return false;
|
|
1014
|
+
}
|
|
1015
|
+
const widgetType = prop.schema.interface.type;
|
|
1016
|
+
if (typeof widgetType !== 'string' || !MULTILANGUAGE_CAPABLE_WIDGET_TYPES.has(widgetType)) {
|
|
1017
|
+
return false;
|
|
1018
|
+
}
|
|
1019
|
+
const opts = prop.schema.interface.options;
|
|
1020
|
+
if (opts && 'multiLanguage' in opts) {
|
|
1021
|
+
return false;
|
|
1022
|
+
}
|
|
1023
|
+
return true;
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* Leaf widget nodes in entity `schema.interface` trees (e.g. GridLayout → RichText under `pre` /
|
|
1027
|
+
* `post`) — same path/type rules as {@link shouldApplyDefaultMultiLanguageToWidgetProperty}, without
|
|
1028
|
+
* `schema.dataType` (nodes do not carry entity schema).
|
|
1029
|
+
*/
|
|
1030
|
+
function shouldApplyDefaultMultiLanguageToWidgetNode(node) {
|
|
1031
|
+
const widgetType = node.type;
|
|
1032
|
+
if (typeof widgetType !== 'string' || !MULTILANGUAGE_CAPABLE_WIDGET_TYPES.has(widgetType)) {
|
|
1033
|
+
return false;
|
|
1034
|
+
}
|
|
1035
|
+
const key = interfacePathLastSegment(node.path);
|
|
1036
|
+
if (!key || !DEFAULT_MULTILANGUAGE_FIELD_NAMES.has(key)) {
|
|
1037
|
+
return false;
|
|
1038
|
+
}
|
|
1039
|
+
const opts = node.options;
|
|
1040
|
+
if (opts && 'multiLanguage' in opts) {
|
|
1041
|
+
return false;
|
|
1042
|
+
}
|
|
1043
|
+
return true;
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* When {@link AXPDefaultMultiLanguageConfigService#getApplyDefaultMultiLanguage} is true, sets
|
|
1047
|
+
* `options.multiLanguage` on eligible editor leaves inside an entity property's widget tree
|
|
1048
|
+
* (including nested layouts). Used by entity middleware so object fields (e.g. `pre`, `post`) are
|
|
1049
|
+
* covered, not only top-level string properties.
|
|
1050
|
+
*/
|
|
1051
|
+
function withDefaultMultiLanguageOnWidgetNodeTree(root, applyDefault) {
|
|
1052
|
+
if (root == null || !applyDefault) {
|
|
1053
|
+
return root ?? undefined;
|
|
1054
|
+
}
|
|
1055
|
+
return visitWidgetNodeForDefaultMultiLanguage(root);
|
|
1056
|
+
}
|
|
1057
|
+
function visitWidgetNodeForDefaultMultiLanguage(node) {
|
|
1058
|
+
let next = node;
|
|
1059
|
+
if (node.children?.length) {
|
|
1060
|
+
const newChildren = node.children.map((child) => visitWidgetNodeForDefaultMultiLanguage(child));
|
|
1061
|
+
if (newChildren.some((c, i) => c !== node.children[i])) {
|
|
1062
|
+
next = { ...node, children: newChildren };
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
if (shouldApplyDefaultMultiLanguageToWidgetNode(next)) {
|
|
1066
|
+
return {
|
|
1067
|
+
...next,
|
|
1068
|
+
options: {
|
|
1069
|
+
...(next.options ?? {}),
|
|
1070
|
+
multiLanguage: true,
|
|
1071
|
+
},
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
return next;
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* When {@link AXPDefaultMultiLanguageConfigService#getApplyDefaultMultiLanguage} is true, sets
|
|
1078
|
+
* `schema.interface.options.multiLanguage` for eligible string widget properties (same rules as
|
|
1079
|
+
* entity middleware), unless the property already specifies `multiLanguage`.
|
|
1080
|
+
*/
|
|
1081
|
+
function withDefaultMultiLanguageOnWidgetProperty(prop, applyDefault) {
|
|
1082
|
+
if (!applyDefault || !shouldApplyDefaultMultiLanguageToWidgetProperty(prop)) {
|
|
1083
|
+
return prop;
|
|
1084
|
+
}
|
|
1085
|
+
const iface = prop.schema.interface;
|
|
1086
|
+
const existingOpts = (iface.options ?? {});
|
|
1087
|
+
return {
|
|
1088
|
+
...prop,
|
|
1089
|
+
schema: {
|
|
1090
|
+
...prop.schema,
|
|
1091
|
+
interface: {
|
|
1092
|
+
...iface,
|
|
1093
|
+
options: {
|
|
1094
|
+
...existingOpts,
|
|
1095
|
+
multiLanguage: true,
|
|
1096
|
+
},
|
|
1097
|
+
},
|
|
1098
|
+
},
|
|
1099
|
+
};
|
|
1100
|
+
}
|
|
1101
|
+
//#endregion
|
|
1102
|
+
|
|
1103
|
+
//#region ---- Settings expression scope ----
|
|
1104
|
+
/**
|
|
1105
|
+
* Exposes platform settings in expression strings, e.g.
|
|
1106
|
+
* `{{ settings.get('Common:Setting:Entity.ShowPageBadge') }}`.
|
|
1107
|
+
*/
|
|
1108
|
+
class AXPSettingsEvaluatorScopeProvider {
|
|
1109
|
+
constructor() {
|
|
1110
|
+
this.settingsService = inject(AXPSettingsService);
|
|
1111
|
+
}
|
|
1112
|
+
async provide(context) {
|
|
1113
|
+
context.addScope('settings', {
|
|
1114
|
+
get: async (key) => {
|
|
1115
|
+
return await this.settingsService.get(key);
|
|
1116
|
+
},
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
//#endregion
|
|
804
1121
|
|
|
805
1122
|
var AXPHomePageSettings;
|
|
806
1123
|
(function (AXPHomePageSettings) {
|
|
@@ -920,10 +1237,10 @@ class AXPHomePageService {
|
|
|
920
1237
|
router.navigate([current.path], { onSameUrlNavigation: 'reload' });
|
|
921
1238
|
}, 100);
|
|
922
1239
|
}
|
|
923
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
924
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1240
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1241
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageService, providedIn: 'root' }); }
|
|
925
1242
|
}
|
|
926
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageService, decorators: [{
|
|
927
1244
|
type: Injectable,
|
|
928
1245
|
args: [{
|
|
929
1246
|
providedIn: 'root',
|
|
@@ -944,28 +1261,27 @@ function provideDynamicHomePage() {
|
|
|
944
1261
|
]);
|
|
945
1262
|
}
|
|
946
1263
|
|
|
1264
|
+
const I18N = '@general:settings';
|
|
947
1265
|
class AXPHomePageSettingProvider {
|
|
948
1266
|
constructor(injector) {
|
|
949
1267
|
this.injector = injector;
|
|
950
|
-
this.translateService = this.injector.get(AXTranslationService);
|
|
951
1268
|
this.homePageService = this.injector.get(AXPHomePageService);
|
|
952
1269
|
this.defaultHomePageKey = inject(AXP_HOME_PAGE_DEFAULT_KEY, { optional: true }) ?? 'home';
|
|
953
1270
|
}
|
|
954
1271
|
async provide(context) {
|
|
955
|
-
const
|
|
956
|
-
const list = await this.homePageService.getRegisteredList().map((c) => ({ id: c.key, title: c.title }));
|
|
1272
|
+
const list = this.homePageService.getRegisteredList().map((c) => ({ id: c.key, title: c.title }));
|
|
957
1273
|
if (list.length === 0) {
|
|
958
1274
|
return;
|
|
959
1275
|
}
|
|
960
1276
|
// Define the 'General Settings' group
|
|
961
1277
|
context
|
|
962
|
-
.addGroup('general',
|
|
1278
|
+
.addGroup('general', `${I18N}.general.nav-title`, `${I18N}.general.description`, 'fa-light fa-palette', `${I18N}.general.title`)
|
|
963
1279
|
// Add the 'Startup' section
|
|
964
|
-
.addSection('startup',
|
|
1280
|
+
.addSection('startup', `${I18N}.general.startup.title`, `${I18N}.general.startup.description`)
|
|
965
1281
|
// Add the 'Home Page' setting
|
|
966
1282
|
.addSetting({
|
|
967
1283
|
key: AXPHomePageSettings.UserHomePath,
|
|
968
|
-
title:
|
|
1284
|
+
title: `${I18N}.general.startup.home-page.title`,
|
|
969
1285
|
scope: AXPPlatformScope.User,
|
|
970
1286
|
isInherited: true,
|
|
971
1287
|
defaultValue: this.defaultHomePageKey || list[0].id,
|
|
@@ -978,24 +1294,24 @@ class AXPHomePageSettingProvider {
|
|
|
978
1294
|
dataSource: list,
|
|
979
1295
|
},
|
|
980
1296
|
},
|
|
981
|
-
description:
|
|
1297
|
+
description: `${I18N}.general.startup.home-page.description`,
|
|
982
1298
|
})
|
|
983
1299
|
// End the 'Startup' section
|
|
984
1300
|
.endSection()
|
|
985
1301
|
// End the 'General Settings' group
|
|
986
1302
|
.endGroup();
|
|
987
1303
|
}
|
|
988
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
989
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1304
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageSettingProvider, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1305
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageSettingProvider }); }
|
|
990
1306
|
}
|
|
991
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageSettingProvider, decorators: [{
|
|
992
1308
|
type: Injectable
|
|
993
1309
|
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
994
1310
|
|
|
995
1311
|
class AXPHomePageModule {
|
|
996
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
997
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
998
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1312
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1313
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule }); }
|
|
1314
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule, providers: [
|
|
999
1315
|
{
|
|
1000
1316
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
1001
1317
|
useClass: AXPHomePageSettingProvider,
|
|
@@ -1003,7 +1319,7 @@ class AXPHomePageModule {
|
|
|
1003
1319
|
},
|
|
1004
1320
|
] }); }
|
|
1005
1321
|
}
|
|
1006
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHomePageModule, decorators: [{
|
|
1007
1323
|
type: NgModule,
|
|
1008
1324
|
args: [{
|
|
1009
1325
|
imports: [],
|
|
@@ -1026,10 +1342,10 @@ class AXPCustomOperatorServiceImpl extends AXPCustomOperatorService {
|
|
|
1026
1342
|
getCustomOperators() {
|
|
1027
1343
|
return {};
|
|
1028
1344
|
}
|
|
1029
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1030
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1345
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCustomOperatorServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1346
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCustomOperatorServiceImpl }); }
|
|
1031
1347
|
}
|
|
1032
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1348
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCustomOperatorServiceImpl, decorators: [{
|
|
1033
1349
|
type: Injectable
|
|
1034
1350
|
}] });
|
|
1035
1351
|
|
|
@@ -1074,10 +1390,10 @@ class AXPFilterOperatorMiddlewareServiceImpl extends AXPFilterOperatorMiddleware
|
|
|
1074
1390
|
return acc;
|
|
1075
1391
|
}, {});
|
|
1076
1392
|
}
|
|
1077
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1078
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1393
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1394
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl }); }
|
|
1079
1395
|
}
|
|
1080
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFilterOperatorMiddlewareServiceImpl, decorators: [{
|
|
1081
1397
|
type: Injectable
|
|
1082
1398
|
}] });
|
|
1083
1399
|
|
|
@@ -1098,10 +1414,10 @@ class AXPErrorHandlerRegistryService {
|
|
|
1098
1414
|
get handlers() {
|
|
1099
1415
|
return this.errorHandlers;
|
|
1100
1416
|
}
|
|
1101
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1102
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1417
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPErrorHandlerRegistryService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1418
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPErrorHandlerRegistryService, providedIn: 'root' }); }
|
|
1103
1419
|
}
|
|
1104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1420
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPErrorHandlerRegistryService, decorators: [{
|
|
1105
1421
|
type: Injectable,
|
|
1106
1422
|
args: [{
|
|
1107
1423
|
providedIn: 'root'
|
|
@@ -1132,10 +1448,10 @@ class AXPGlobalErrorHandler extends ErrorHandler {
|
|
|
1132
1448
|
}
|
|
1133
1449
|
handleErrorRecursively(0, error);
|
|
1134
1450
|
}
|
|
1135
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1136
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1451
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGlobalErrorHandler, deps: [{ token: i0.Injector }, { token: AXPErrorHandlerRegistryService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1452
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGlobalErrorHandler, providedIn: 'root' }); }
|
|
1137
1453
|
}
|
|
1138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGlobalErrorHandler, decorators: [{
|
|
1139
1455
|
type: Injectable,
|
|
1140
1456
|
args: [{ providedIn: 'root' }]
|
|
1141
1457
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: AXPErrorHandlerRegistryService }] });
|
|
@@ -1206,10 +1522,10 @@ class AXPTokenDefinitionService {
|
|
|
1206
1522
|
clearDefinitionsCache() {
|
|
1207
1523
|
this.definitionsByName.clear();
|
|
1208
1524
|
}
|
|
1209
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1210
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1525
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTokenDefinitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1526
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTokenDefinitionService, providedIn: 'root' }); }
|
|
1211
1527
|
}
|
|
1212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTokenDefinitionService, decorators: [{
|
|
1213
1529
|
type: Injectable,
|
|
1214
1530
|
args: [{
|
|
1215
1531
|
providedIn: 'root',
|
|
@@ -1247,32 +1563,24 @@ class AXPStickyDirective {
|
|
|
1247
1563
|
this.stickyOffset = 100;
|
|
1248
1564
|
this.isStickyChange = new EventEmitter();
|
|
1249
1565
|
this._isSticky = false;
|
|
1566
|
+
this.onWindowResize = () => {
|
|
1567
|
+
this.applyStickyStateFromScrollPosition();
|
|
1568
|
+
};
|
|
1250
1569
|
this.onParentScroll = () => {
|
|
1251
|
-
this.
|
|
1252
|
-
const scrollTop = this.parentElement === window ? window.scrollY : this.parentElement.scrollTop;
|
|
1253
|
-
const shouldStick = scrollTop + this.stickyOffset >= this.topOffset;
|
|
1254
|
-
if (shouldStick !== this.isSticky) {
|
|
1255
|
-
this.zone.run(() => {
|
|
1256
|
-
this.isSticky = shouldStick;
|
|
1257
|
-
this.toggleStickyClasses(shouldStick);
|
|
1258
|
-
this.cdr.markForCheck();
|
|
1259
|
-
});
|
|
1260
|
-
}
|
|
1261
|
-
});
|
|
1570
|
+
this.applyStickyStateFromScrollPosition();
|
|
1262
1571
|
};
|
|
1263
1572
|
}
|
|
1264
1573
|
ngAfterViewInit() {
|
|
1265
1574
|
this.initSticky();
|
|
1266
1575
|
// Add mutation observer for dynamic content
|
|
1267
1576
|
this.mutationObserver = new MutationObserver(() => {
|
|
1268
|
-
this.
|
|
1577
|
+
this.applyStickyStateFromScrollPosition();
|
|
1269
1578
|
});
|
|
1270
1579
|
this.mutationObserver.observe(this.element.nativeElement, {
|
|
1271
1580
|
childList: true,
|
|
1272
1581
|
subtree: true,
|
|
1273
1582
|
});
|
|
1274
|
-
|
|
1275
|
-
window.addEventListener('resize', this.updateTopOffset.bind(this));
|
|
1583
|
+
window.addEventListener('resize', this.onWindowResize);
|
|
1276
1584
|
}
|
|
1277
1585
|
initSticky() {
|
|
1278
1586
|
if (this.stickyParent instanceof HTMLElement) {
|
|
@@ -1282,13 +1590,42 @@ class AXPStickyDirective {
|
|
|
1282
1590
|
this.parentElement = document.querySelector(this.stickyParent) || window;
|
|
1283
1591
|
}
|
|
1284
1592
|
this.targetElement = document.querySelector(this.stickyTarget) || this.element.nativeElement;
|
|
1285
|
-
this.updateTopOffset();
|
|
1286
1593
|
this.parentElement.addEventListener('scroll', this.onParentScroll);
|
|
1594
|
+
this.applyStickyStateFromScrollPosition();
|
|
1287
1595
|
}
|
|
1288
|
-
|
|
1596
|
+
getScrollTop() {
|
|
1597
|
+
return this.parentElement === window ? window.scrollY : this.parentElement.scrollTop;
|
|
1598
|
+
}
|
|
1599
|
+
/**
|
|
1600
|
+
* Toggle stuck styling only while this element is visually pinned (matches `position: sticky; top: 0`).
|
|
1601
|
+
* Scroll-offset thresholds would stay true for every section already passed, so multiple stacked stickies
|
|
1602
|
+
* would all keep `--stuck`; geometry fixes that.
|
|
1603
|
+
*/
|
|
1604
|
+
computeShouldStick() {
|
|
1605
|
+
if (this.getScrollTop() <= 0) {
|
|
1606
|
+
return false;
|
|
1607
|
+
}
|
|
1608
|
+
const tRect = this.targetElement.getBoundingClientRect();
|
|
1609
|
+
const epsilon = 3;
|
|
1610
|
+
let limitY;
|
|
1611
|
+
if (this.parentElement === window) {
|
|
1612
|
+
limitY = this.stickyOffset;
|
|
1613
|
+
}
|
|
1614
|
+
else {
|
|
1615
|
+
limitY = this.parentElement.getBoundingClientRect().top;
|
|
1616
|
+
}
|
|
1617
|
+
return tRect.top <= limitY + epsilon && tRect.top >= limitY - epsilon;
|
|
1618
|
+
}
|
|
1619
|
+
applyStickyStateFromScrollPosition() {
|
|
1289
1620
|
this.zone.runOutsideAngular(() => {
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1621
|
+
const shouldStick = this.computeShouldStick();
|
|
1622
|
+
if (shouldStick !== this.isSticky) {
|
|
1623
|
+
this.zone.run(() => {
|
|
1624
|
+
this.isSticky = shouldStick;
|
|
1625
|
+
this.toggleStickyClasses(shouldStick);
|
|
1626
|
+
this.cdr.markForCheck();
|
|
1627
|
+
});
|
|
1628
|
+
}
|
|
1292
1629
|
});
|
|
1293
1630
|
}
|
|
1294
1631
|
toggleStickyClasses(isSticky) {
|
|
@@ -1304,15 +1641,15 @@ class AXPStickyDirective {
|
|
|
1304
1641
|
}
|
|
1305
1642
|
ngOnDestroy() {
|
|
1306
1643
|
this.parentElement.removeEventListener('scroll', this.onParentScroll);
|
|
1307
|
-
window.removeEventListener('resize', this.
|
|
1644
|
+
window.removeEventListener('resize', this.onWindowResize);
|
|
1308
1645
|
if (this.mutationObserver) {
|
|
1309
1646
|
this.mutationObserver.disconnect();
|
|
1310
1647
|
}
|
|
1311
1648
|
}
|
|
1312
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1313
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1649
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStickyDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1650
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: AXPStickyDirective, isStandalone: true, selector: "[axpSticky]", inputs: { stickyClass: ["axpSticky", "stickyClass"], stickyOffset: "stickyOffset", stickyParent: "stickyParent", stickyTarget: "stickyTarget" }, outputs: { isStickyChange: "isStickyChange" }, exportAs: ["axpSticky"], ngImport: i0 }); }
|
|
1314
1651
|
}
|
|
1315
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStickyDirective, decorators: [{
|
|
1316
1653
|
type: Directive,
|
|
1317
1654
|
args: [{
|
|
1318
1655
|
selector: '[axpSticky]',
|
|
@@ -1655,10 +1992,10 @@ class AXPMenuMiddlewareRegistry {
|
|
|
1655
1992
|
clear() {
|
|
1656
1993
|
this.manualMiddlewares.clear();
|
|
1657
1994
|
}
|
|
1658
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1659
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1995
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuMiddlewareRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1996
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuMiddlewareRegistry, providedIn: 'root' }); }
|
|
1660
1997
|
}
|
|
1661
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1998
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuMiddlewareRegistry, decorators: [{
|
|
1662
1999
|
type: Injectable,
|
|
1663
2000
|
args: [{ providedIn: 'root' }]
|
|
1664
2001
|
}] });
|
|
@@ -2087,10 +2424,10 @@ class AXPMenuProviderService {
|
|
|
2087
2424
|
}
|
|
2088
2425
|
}
|
|
2089
2426
|
}
|
|
2090
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2091
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2427
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2428
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuProviderService, providedIn: 'root' }); }
|
|
2092
2429
|
}
|
|
2093
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuProviderService, decorators: [{
|
|
2094
2431
|
type: Injectable,
|
|
2095
2432
|
args: [{ providedIn: 'root' }]
|
|
2096
2433
|
}] });
|
|
@@ -2110,6 +2447,90 @@ function setMenuItemMeta(items, parentIndex = '', depth = 0) {
|
|
|
2110
2447
|
});
|
|
2111
2448
|
}
|
|
2112
2449
|
|
|
2450
|
+
//#region ---- Imports ----
|
|
2451
|
+
//#endregion
|
|
2452
|
+
//#region ---- Helpers ----
|
|
2453
|
+
function flattenMenuItems(items, depth) {
|
|
2454
|
+
const rows = [];
|
|
2455
|
+
let index = 0;
|
|
2456
|
+
for (const it of items) {
|
|
2457
|
+
const fallback = `menu-${depth}-${index}`;
|
|
2458
|
+
index += 1;
|
|
2459
|
+
const id = it.name ?? it.path ?? fallback;
|
|
2460
|
+
rows.push({ id, title: it.text });
|
|
2461
|
+
if (it.children?.length) {
|
|
2462
|
+
rows.push(...flattenMenuItems(it.children, depth + 1));
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2465
|
+
return rows;
|
|
2466
|
+
}
|
|
2467
|
+
//#endregion
|
|
2468
|
+
//#region ---- Menu items data source ----
|
|
2469
|
+
/**
|
|
2470
|
+
* Registered menu items (raw tree flattened) for select widgets via dataSource name {@link MENU_ITEMS_DATASOURCE_NAME}.
|
|
2471
|
+
*/
|
|
2472
|
+
const MENU_ITEMS_DATASOURCE_NAME = 'platform-menu-items';
|
|
2473
|
+
/**
|
|
2474
|
+
* Data source definition for menu items from {@link AXPMenuProviderService#rawItems}.
|
|
2475
|
+
*/
|
|
2476
|
+
class AXPMenuItemsDataSourceDefinition {
|
|
2477
|
+
constructor() {
|
|
2478
|
+
//#region ---- Services & Dependencies ----
|
|
2479
|
+
this.menuProviderService = inject(AXPMenuProviderService);
|
|
2480
|
+
//#endregion
|
|
2481
|
+
}
|
|
2482
|
+
//#endregion
|
|
2483
|
+
//#region ---- Public API ----
|
|
2484
|
+
async items() {
|
|
2485
|
+
return [
|
|
2486
|
+
{
|
|
2487
|
+
name: MENU_ITEMS_DATASOURCE_NAME,
|
|
2488
|
+
title: 'Menu items',
|
|
2489
|
+
source: () => new AXDataSource({
|
|
2490
|
+
key: 'id',
|
|
2491
|
+
load: async () => {
|
|
2492
|
+
const raw = await this.menuProviderService.rawItems();
|
|
2493
|
+
const list = flattenMenuItems(raw, 0);
|
|
2494
|
+
return { items: list, total: list.length };
|
|
2495
|
+
},
|
|
2496
|
+
byKey: async (key) => {
|
|
2497
|
+
const raw = await this.menuProviderService.rawItems();
|
|
2498
|
+
const list = flattenMenuItems(raw, 0);
|
|
2499
|
+
return list.find((item) => item.id === key);
|
|
2500
|
+
},
|
|
2501
|
+
pageSize: 1000,
|
|
2502
|
+
}),
|
|
2503
|
+
columns: [
|
|
2504
|
+
{
|
|
2505
|
+
name: 'id',
|
|
2506
|
+
title: 'ID',
|
|
2507
|
+
datatype: 'string',
|
|
2508
|
+
type: AXPWidgetsCatalog.text,
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
name: 'title',
|
|
2512
|
+
title: 'Title',
|
|
2513
|
+
datatype: 'string',
|
|
2514
|
+
type: AXPWidgetsCatalog.text,
|
|
2515
|
+
},
|
|
2516
|
+
],
|
|
2517
|
+
filters: [
|
|
2518
|
+
{
|
|
2519
|
+
field: 'title',
|
|
2520
|
+
title: 'Title',
|
|
2521
|
+
operator: { type: 'equal' },
|
|
2522
|
+
widget: { type: AXPWidgetsCatalog.text },
|
|
2523
|
+
filterType: { advance: true, inline: true },
|
|
2524
|
+
},
|
|
2525
|
+
],
|
|
2526
|
+
textField: { name: 'title', title: 'Title' },
|
|
2527
|
+
valueField: { name: 'id', title: 'ID' },
|
|
2528
|
+
},
|
|
2529
|
+
];
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
//#endregion
|
|
2533
|
+
|
|
2113
2534
|
//#region ---- Menu Middleware Provider Helper ----
|
|
2114
2535
|
/**
|
|
2115
2536
|
* Helper function to provide menu middlewares with proper DI setup
|
|
@@ -2404,10 +2825,10 @@ class AXPMenuVisibilityService {
|
|
|
2404
2825
|
// Otherwise, don't render empty menu items
|
|
2405
2826
|
return false;
|
|
2406
2827
|
}
|
|
2407
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2408
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2828
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuVisibilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2829
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuVisibilityService, providedIn: 'root' }); }
|
|
2409
2830
|
}
|
|
2410
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuVisibilityService, decorators: [{
|
|
2411
2832
|
type: Injectable,
|
|
2412
2833
|
args: [{ providedIn: 'root' }]
|
|
2413
2834
|
}] });
|
|
@@ -2441,21 +2862,23 @@ class AXPMenuSearchProvider {
|
|
|
2441
2862
|
title: item.text, // Use `text` for the `title`
|
|
2442
2863
|
icon: item.icon, // Include the `icon` if present
|
|
2443
2864
|
data: omit(item, ['parent', 'children']), // Include all data except `parent` and `children`
|
|
2444
|
-
command: item.path
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
type: 'router',
|
|
2865
|
+
command: item.path
|
|
2866
|
+
? {
|
|
2867
|
+
name: 'navigate',
|
|
2448
2868
|
options: {
|
|
2449
|
-
|
|
2869
|
+
type: 'router',
|
|
2870
|
+
options: {
|
|
2871
|
+
path: item.path,
|
|
2872
|
+
},
|
|
2450
2873
|
},
|
|
2451
2874
|
}
|
|
2452
|
-
|
|
2875
|
+
: item.command,
|
|
2453
2876
|
parent: item.parent
|
|
2454
2877
|
? {
|
|
2455
2878
|
title: item.parent.text,
|
|
2456
2879
|
}
|
|
2457
2880
|
: undefined,
|
|
2458
|
-
})), [(o) => this.translateService.translateSync(o.title)]);
|
|
2881
|
+
})), [(o) => this.translateService.translateSync(String(o.title ?? ''))]);
|
|
2459
2882
|
}
|
|
2460
2883
|
/**
|
|
2461
2884
|
* Recursively searches AXPMenuItem and its children for a matching text.
|
|
@@ -2484,18 +2907,19 @@ class AXPMenuSearchProvider {
|
|
|
2484
2907
|
}
|
|
2485
2908
|
|
|
2486
2909
|
class AXPFooterTextSlotComponent {
|
|
2487
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2488
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2910
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFooterTextSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2911
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPFooterTextSlotComponent, isStandalone: true, selector: "ng-component", inputs: { text: "text" }, ngImport: i0, template: `
|
|
2489
2912
|
<small class="ax-text-sm" [innerHTML]="text"></small>
|
|
2490
|
-
`, isInline: true }); }
|
|
2913
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2491
2914
|
}
|
|
2492
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2915
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFooterTextSlotComponent, decorators: [{
|
|
2493
2916
|
type: Component,
|
|
2494
2917
|
args: [{
|
|
2495
2918
|
template: `
|
|
2496
2919
|
<small class="ax-text-sm" [innerHTML]="text"></small>
|
|
2497
2920
|
`,
|
|
2498
|
-
standalone: true
|
|
2921
|
+
standalone: true,
|
|
2922
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2499
2923
|
}]
|
|
2500
2924
|
}], propDecorators: { text: [{
|
|
2501
2925
|
type: Input
|
|
@@ -2506,8 +2930,8 @@ class AXPNavBarSlotComponent {
|
|
|
2506
2930
|
// if (action)
|
|
2507
2931
|
// this.store.dispatch(action)
|
|
2508
2932
|
}
|
|
2509
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2510
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2933
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPNavBarSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2934
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPNavBarSlotComponent, isStandalone: true, selector: "ng-component", inputs: { items: "items" }, ngImport: i0, template: `
|
|
2511
2935
|
<div class="ax-flex ax-items-center ax-justify-between ax-gap-5">
|
|
2512
2936
|
@for (link of items; track link) {
|
|
2513
2937
|
<a (click)="handleCommand(link.command)" >{{ link.text }}</a>
|
|
@@ -2515,7 +2939,7 @@ class AXPNavBarSlotComponent {
|
|
|
2515
2939
|
</div>
|
|
2516
2940
|
`, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2517
2941
|
}
|
|
2518
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2942
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPNavBarSlotComponent, decorators: [{
|
|
2519
2943
|
type: Component,
|
|
2520
2944
|
args: [{
|
|
2521
2945
|
template: `
|
|
@@ -2649,17 +3073,21 @@ class AXPSearchDefinitionProviderService {
|
|
|
2649
3073
|
}
|
|
2650
3074
|
return definition;
|
|
2651
3075
|
}
|
|
2652
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2653
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3076
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3077
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchDefinitionProviderService, providedIn: 'root' }); }
|
|
2654
3078
|
}
|
|
2655
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3079
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchDefinitionProviderService, decorators: [{
|
|
2656
3080
|
type: Injectable,
|
|
2657
3081
|
args: [{ providedIn: 'root' }]
|
|
2658
3082
|
}] });
|
|
2659
3083
|
|
|
2660
3084
|
class AXPSearchCommandProvider {
|
|
3085
|
+
constructor() {
|
|
3086
|
+
this.translationService = inject(AXTranslationService);
|
|
3087
|
+
}
|
|
2661
3088
|
async search(text) {
|
|
2662
|
-
|
|
3089
|
+
const locale = this.translationService.getActiveLang() ?? 'en-US';
|
|
3090
|
+
return this.commands.filter((command) => searchInMultiLanguageString(command.title, text, locale));
|
|
2663
3091
|
}
|
|
2664
3092
|
}
|
|
2665
3093
|
|
|
@@ -2670,6 +3098,7 @@ class AXPSearchService {
|
|
|
2670
3098
|
this.providers = inject(AXP_SEARCH_PROVIDER, { optional: true });
|
|
2671
3099
|
this.definitionService = inject(AXPSearchDefinitionProviderService);
|
|
2672
3100
|
this.formatService = inject(AXFormatService);
|
|
3101
|
+
this.translationService = inject(AXTranslationService);
|
|
2673
3102
|
}
|
|
2674
3103
|
async search(text) {
|
|
2675
3104
|
//TODO better handle this
|
|
@@ -2712,10 +3141,7 @@ class AXPSearchService {
|
|
|
2712
3141
|
(definition.format.description
|
|
2713
3142
|
? this.formatService.format(definition.format.description, 'string', result.data)
|
|
2714
3143
|
: undefined),
|
|
2715
|
-
icon: result.icon ??
|
|
2716
|
-
(result.icon
|
|
2717
|
-
? this.formatService.format(definition.format.icon, 'string', result.data)
|
|
2718
|
-
: definition.icon),
|
|
3144
|
+
icon: result.icon ?? definition.icon,
|
|
2719
3145
|
data: result.data,
|
|
2720
3146
|
command: result.command,
|
|
2721
3147
|
actions: definition.actions,
|
|
@@ -2728,11 +3154,17 @@ class AXPSearchService {
|
|
|
2728
3154
|
}
|
|
2729
3155
|
}
|
|
2730
3156
|
}
|
|
3157
|
+
const locale = this.translationService.getActiveLang() ?? 'en-US';
|
|
3158
|
+
const normalizedQuery = text.trim();
|
|
3159
|
+
const visibleData = normalizedQuery.length === 0
|
|
3160
|
+
? mergeData
|
|
3161
|
+
: mergeData.filter((item) => searchInMultiLanguageString(item.title, normalizedQuery, locale) ||
|
|
3162
|
+
searchInMultiLanguageString(item.description, normalizedQuery, locale));
|
|
2731
3163
|
// Group data
|
|
2732
3164
|
const groupedData = [];
|
|
2733
3165
|
const groupMap = {};
|
|
2734
3166
|
// Create groups
|
|
2735
|
-
for (const item of
|
|
3167
|
+
for (const item of visibleData) {
|
|
2736
3168
|
const groupName = item.definitionName; // Change this to the property you want to group by
|
|
2737
3169
|
if (!groupMap[groupName]) {
|
|
2738
3170
|
groupMap[groupName] = {
|
|
@@ -2749,14 +3181,53 @@ class AXPSearchService {
|
|
|
2749
3181
|
groupedData.sort((a, b) => a.order - b.order);
|
|
2750
3182
|
return groupedData;
|
|
2751
3183
|
}
|
|
2752
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2753
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3184
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3185
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchService, providedIn: 'root' }); }
|
|
2754
3186
|
}
|
|
2755
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSearchService, decorators: [{
|
|
2756
3188
|
type: Injectable,
|
|
2757
3189
|
args: [{ providedIn: 'root' }]
|
|
2758
3190
|
}] });
|
|
2759
3191
|
|
|
3192
|
+
/**
|
|
3193
|
+
* Shared utility for creating Entity:Create command options used in search command providers.
|
|
3194
|
+
* Use with command: { name: 'Entity:Create', options: createEntityCommandOptions(...) }
|
|
3195
|
+
*/
|
|
3196
|
+
function createEntityCommandOptions(entityKey, entityInfo) {
|
|
3197
|
+
return {
|
|
3198
|
+
__context__: {
|
|
3199
|
+
entity: entityKey,
|
|
3200
|
+
entityInfo: {
|
|
3201
|
+
name: entityInfo.name,
|
|
3202
|
+
module: entityInfo.module,
|
|
3203
|
+
title: entityInfo.title,
|
|
3204
|
+
parentKey: undefined,
|
|
3205
|
+
source: entityKey,
|
|
3206
|
+
},
|
|
3207
|
+
data: {},
|
|
3208
|
+
options: {},
|
|
3209
|
+
},
|
|
3210
|
+
};
|
|
3211
|
+
}
|
|
3212
|
+
/**
|
|
3213
|
+
* Creates a search command for "Create {Entity}" with consistent i18n pattern.
|
|
3214
|
+
* Use titleKey/descriptionKey from module (e.g. @module:entity.permissions.create.title).
|
|
3215
|
+
* Standard: "Create {Entity}" for title, "Create new {entities}" for description.
|
|
3216
|
+
*/
|
|
3217
|
+
function createEntitySearchCommand(config) {
|
|
3218
|
+
return {
|
|
3219
|
+
id: config.id,
|
|
3220
|
+
group: 'command',
|
|
3221
|
+
title: config.titleKey,
|
|
3222
|
+
description: config.descriptionKey ?? config.titleKey,
|
|
3223
|
+
icon: config.icon,
|
|
3224
|
+
command: {
|
|
3225
|
+
name: 'Entity:Create',
|
|
3226
|
+
options: createEntityCommandOptions(config.entityKey, config.entityInfo),
|
|
3227
|
+
},
|
|
3228
|
+
};
|
|
3229
|
+
}
|
|
3230
|
+
|
|
2760
3231
|
var AXPCommonSettings;
|
|
2761
3232
|
(function (AXPCommonSettings) {
|
|
2762
3233
|
AXPCommonSettings["EnableOperationToasts"] = "Common:Setting:Notifications.EnableOperationToasts";
|
|
@@ -2765,6 +3236,7 @@ var AXPCommonSettings;
|
|
|
2765
3236
|
AXPCommonSettings["ApplyLayoutOrdering"] = "Common:Setting:Entity.ApplyLayoutOrdering";
|
|
2766
3237
|
AXPCommonSettings["RedirectToDetailsAfterCreate"] = "Common:Setting:Entity.RedirectToDetailsAfterCreate";
|
|
2767
3238
|
AXPCommonSettings["ShowPageBadge"] = "Common:Setting:Entity.ShowPageBadge";
|
|
3239
|
+
AXPCommonSettings["DebugMode"] = "PlatformDevTools:Setting:Developer.DebugMode";
|
|
2768
3240
|
AXPCommonSettings["ShowRowIndexColumn"] = "Common:Setting:Entity.ShowRowIndexColumn";
|
|
2769
3241
|
AXPCommonSettings["EntityListPersistenceMode"] = "Common:Setting:Entity.ListPersistenceMode";
|
|
2770
3242
|
})(AXPCommonSettings || (AXPCommonSettings = {}));
|
|
@@ -2791,10 +3263,10 @@ class AXPWorkflowNavigateAction extends AXPWorkflowAction {
|
|
|
2791
3263
|
this.router.navigate([payload.commands], payload.extras);
|
|
2792
3264
|
}
|
|
2793
3265
|
}
|
|
2794
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2795
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3266
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3267
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowNavigateAction }); }
|
|
2796
3268
|
}
|
|
2797
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3269
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowNavigateAction, decorators: [{
|
|
2798
3270
|
type: Injectable
|
|
2799
3271
|
}] });
|
|
2800
3272
|
class AXPDialogConfirmAction extends AXPWorkflowAction {
|
|
@@ -2810,10 +3282,10 @@ class AXPDialogConfirmAction extends AXPWorkflowAction {
|
|
|
2810
3282
|
const dialogResult = await this.dialogService.confirm(await this.translationService.translateAsync(this.title), await this.translationService.translateAsync(this.message), (await this.translationService.translateAsync(this.type)), 'horizontal', false, 'cancel');
|
|
2811
3283
|
context.setOutput('result', dialogResult.result);
|
|
2812
3284
|
}
|
|
2813
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2814
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3285
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogConfirmAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3286
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogConfirmAction }); }
|
|
2815
3287
|
}
|
|
2816
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDialogConfirmAction, decorators: [{
|
|
2817
3289
|
type: Injectable
|
|
2818
3290
|
}] });
|
|
2819
3291
|
class AXPToastAction extends AXPWorkflowAction {
|
|
@@ -2836,20 +3308,20 @@ class AXPToastAction extends AXPWorkflowAction {
|
|
|
2836
3308
|
});
|
|
2837
3309
|
}
|
|
2838
3310
|
}
|
|
2839
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2840
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3311
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPToastAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3312
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPToastAction }); }
|
|
2841
3313
|
}
|
|
2842
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPToastAction, decorators: [{
|
|
2843
3315
|
type: Injectable
|
|
2844
3316
|
}] });
|
|
2845
3317
|
class AXPReloadAction extends AXPWorkflowAction {
|
|
2846
3318
|
async execute(context) {
|
|
2847
3319
|
this.dispatch(AXPReloadEvent({ entity: context.getVariable('entity'), meta: context.getVariable('meta') }));
|
|
2848
3320
|
}
|
|
2849
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2850
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3321
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReloadAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3322
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReloadAction }); }
|
|
2851
3323
|
}
|
|
2852
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPReloadAction, decorators: [{
|
|
2853
3325
|
type: Injectable
|
|
2854
3326
|
}] });
|
|
2855
3327
|
|
|
@@ -2861,6 +3333,10 @@ class AXPWorkflowRouterNavigateAction extends AXPWorkflowAction {
|
|
|
2861
3333
|
async execute(context) {
|
|
2862
3334
|
const command = context.getVariable();
|
|
2863
3335
|
const path = command.options.path;
|
|
3336
|
+
if (!path) {
|
|
3337
|
+
console.error('Path is required for navigate workflow');
|
|
3338
|
+
return;
|
|
3339
|
+
}
|
|
2864
3340
|
if (path?.toLowerCase()?.startsWith('http') || command.options?.extras?.target === 'blank') {
|
|
2865
3341
|
window.open(path, '_blank');
|
|
2866
3342
|
}
|
|
@@ -2889,10 +3365,10 @@ class AXPWorkflowRouterNavigateAction extends AXPWorkflowAction {
|
|
|
2889
3365
|
return params;
|
|
2890
3366
|
}, {});
|
|
2891
3367
|
}
|
|
2892
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2893
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3368
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRouterNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3369
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRouterNavigateAction }); }
|
|
2894
3370
|
}
|
|
2895
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRouterNavigateAction, decorators: [{
|
|
2896
3372
|
type: Injectable
|
|
2897
3373
|
}] });
|
|
2898
3374
|
const AXPNavigateWorkflow = {
|
|
@@ -2917,10 +3393,10 @@ class AXMWorkflowErrorHandler {
|
|
|
2917
3393
|
next(error);
|
|
2918
3394
|
}
|
|
2919
3395
|
}
|
|
2920
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2921
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3396
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMWorkflowErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3397
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMWorkflowErrorHandler }); }
|
|
2922
3398
|
}
|
|
2923
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3399
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMWorkflowErrorHandler, decorators: [{
|
|
2924
3400
|
type: Injectable
|
|
2925
3401
|
}] });
|
|
2926
3402
|
|
|
@@ -2965,12 +3441,12 @@ class AXPCommonModule {
|
|
|
2965
3441
|
f();
|
|
2966
3442
|
});
|
|
2967
3443
|
}
|
|
2968
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2969
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
3444
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, deps: [{ token: 'AXPCommonModuleFactory' }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3445
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, imports: [i1.AXPWorkflowModule, AXPopupModule,
|
|
2970
3446
|
AXDateTimeModule,
|
|
2971
3447
|
AXToastModule,
|
|
2972
3448
|
AXPModuleManifestModule], exports: [RouterModule] }); }
|
|
2973
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
3449
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, providers: [
|
|
2974
3450
|
AXPAppStartUpProvider,
|
|
2975
3451
|
{
|
|
2976
3452
|
provide: ErrorHandler,
|
|
@@ -2999,11 +3475,16 @@ class AXPCommonModule {
|
|
|
2999
3475
|
useClass: AXPTokenEvaluatorScopeProvider,
|
|
3000
3476
|
multi: true,
|
|
3001
3477
|
},
|
|
3478
|
+
{
|
|
3479
|
+
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
3480
|
+
useClass: AXPSettingsEvaluatorScopeProvider,
|
|
3481
|
+
multi: true,
|
|
3482
|
+
},
|
|
3002
3483
|
{
|
|
3003
3484
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
3004
3485
|
useFactory: async () => {
|
|
3005
3486
|
const injector = inject(Injector);
|
|
3006
|
-
const provider = (await import('./acorex-platform-common-common-settings.provider-
|
|
3487
|
+
const provider = (await import('./acorex-platform-common-common-settings.provider-Bi1RYif5.mjs')).AXPCommonSettingProvider;
|
|
3007
3488
|
return new provider(injector);
|
|
3008
3489
|
},
|
|
3009
3490
|
multi: true,
|
|
@@ -3024,7 +3505,7 @@ class AXPCommonModule {
|
|
|
3024
3505
|
AXToastModule,
|
|
3025
3506
|
AXPModuleManifestModule, RouterModule] }); }
|
|
3026
3507
|
}
|
|
3027
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommonModule, decorators: [{
|
|
3028
3509
|
type: NgModule,
|
|
3029
3510
|
args: [{
|
|
3030
3511
|
imports: [
|
|
@@ -3074,11 +3555,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
3074
3555
|
useClass: AXPTokenEvaluatorScopeProvider,
|
|
3075
3556
|
multi: true,
|
|
3076
3557
|
},
|
|
3558
|
+
{
|
|
3559
|
+
provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
|
|
3560
|
+
useClass: AXPSettingsEvaluatorScopeProvider,
|
|
3561
|
+
multi: true,
|
|
3562
|
+
},
|
|
3077
3563
|
{
|
|
3078
3564
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
3079
3565
|
useFactory: async () => {
|
|
3080
3566
|
const injector = inject(Injector);
|
|
3081
|
-
const provider = (await import('./acorex-platform-common-common-settings.provider-
|
|
3567
|
+
const provider = (await import('./acorex-platform-common-common-settings.provider-Bi1RYif5.mjs')).AXPCommonSettingProvider;
|
|
3082
3568
|
return new provider(injector);
|
|
3083
3569
|
},
|
|
3084
3570
|
multi: true,
|
|
@@ -3111,10 +3597,10 @@ function configPlatform(config = AXPPlatformDefaultConfigs) {
|
|
|
3111
3597
|
const AXP_ROOT_CONFIG_TOKEN = new InjectionToken('AXP_ROOT_CONFIG_TOKEN');
|
|
3112
3598
|
|
|
3113
3599
|
class AXPFileStorageService {
|
|
3114
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3115
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3600
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3601
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileStorageService }); }
|
|
3116
3602
|
}
|
|
3117
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3603
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileStorageService, decorators: [{
|
|
3118
3604
|
type: Injectable
|
|
3119
3605
|
}] });
|
|
3120
3606
|
|
|
@@ -3231,10 +3717,10 @@ class AXPFileActionsService {
|
|
|
3231
3717
|
return false;
|
|
3232
3718
|
});
|
|
3233
3719
|
}
|
|
3234
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3235
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3720
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileActionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3721
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileActionsService, providedIn: 'root' }); }
|
|
3236
3722
|
}
|
|
3237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileActionsService, decorators: [{
|
|
3238
3724
|
type: Injectable,
|
|
3239
3725
|
args: [{
|
|
3240
3726
|
providedIn: 'root',
|
|
@@ -3304,19 +3790,19 @@ class AXPFileTypeProviderService {
|
|
|
3304
3790
|
async get(name) {
|
|
3305
3791
|
return (await this.items()).find((c) => c.name == name);
|
|
3306
3792
|
}
|
|
3307
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3308
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3793
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileTypeProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3794
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileTypeProviderService, providedIn: 'root' }); }
|
|
3309
3795
|
}
|
|
3310
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3796
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFileTypeProviderService, decorators: [{
|
|
3311
3797
|
type: Injectable,
|
|
3312
3798
|
args: [{ providedIn: 'root' }]
|
|
3313
3799
|
}] });
|
|
3314
3800
|
|
|
3315
3801
|
class AXPLockService {
|
|
3316
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3317
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3802
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3803
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLockService }); }
|
|
3318
3804
|
}
|
|
3319
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLockService, decorators: [{
|
|
3320
3806
|
type: Injectable
|
|
3321
3807
|
}] });
|
|
3322
3808
|
|
|
@@ -3486,7 +3972,7 @@ class AXPStatusDefinitionProviderService {
|
|
|
3486
3972
|
}
|
|
3487
3973
|
else {
|
|
3488
3974
|
// Use default Entity:UpdateStatus command
|
|
3489
|
-
const entity = context['entityName'] ?? context['__meta__']?.config?.name;
|
|
3975
|
+
const entity = context['entity'] ?? context['entityName'] ?? context['__meta__']?.config?.name;
|
|
3490
3976
|
if (!entity) {
|
|
3491
3977
|
throw new Error('Entity name is required in context when using default status update command');
|
|
3492
3978
|
}
|
|
@@ -3499,7 +3985,7 @@ class AXPStatusDefinitionProviderService {
|
|
|
3499
3985
|
commandOptions = {
|
|
3500
3986
|
entity,
|
|
3501
3987
|
status: transition.to,
|
|
3502
|
-
statusField: context['statusField'] ?? 'statusId',
|
|
3988
|
+
statusField: context['statusField'] ?? context['fieldName'] ?? 'statusId',
|
|
3503
3989
|
...(id ? { id } : {}),
|
|
3504
3990
|
...(ids ? { ids } : {}),
|
|
3505
3991
|
};
|
|
@@ -3507,7 +3993,8 @@ class AXPStatusDefinitionProviderService {
|
|
|
3507
3993
|
// Execute the command
|
|
3508
3994
|
const result = await this.commandService.execute(commandName, commandOptions);
|
|
3509
3995
|
if (!result?.success) {
|
|
3510
|
-
|
|
3996
|
+
const text = this.commandMessageTextForError(result?.message?.text);
|
|
3997
|
+
throw new Error(text || 'Failed to execute status transition command');
|
|
3511
3998
|
}
|
|
3512
3999
|
}
|
|
3513
4000
|
/**
|
|
@@ -3517,10 +4004,27 @@ class AXPStatusDefinitionProviderService {
|
|
|
3517
4004
|
isValidTransition(provider, from, to) {
|
|
3518
4005
|
return provider.transitions.some((transition) => transition.from === from && transition.to === to);
|
|
3519
4006
|
}
|
|
3520
|
-
|
|
3521
|
-
|
|
4007
|
+
/**
|
|
4008
|
+
* Best-effort plain string for {@link Error} messages (no i18n lookup).
|
|
4009
|
+
*/
|
|
4010
|
+
commandMessageTextForError(value) {
|
|
4011
|
+
if (value == null) {
|
|
4012
|
+
return '';
|
|
4013
|
+
}
|
|
4014
|
+
if (typeof value === 'string') {
|
|
4015
|
+
return value;
|
|
4016
|
+
}
|
|
4017
|
+
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
4018
|
+
const values = Object.values(value);
|
|
4019
|
+
const first = values.find((v) => typeof v === 'string' && v.length > 0);
|
|
4020
|
+
return first ?? '';
|
|
4021
|
+
}
|
|
4022
|
+
return String(value);
|
|
4023
|
+
}
|
|
4024
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStatusDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4025
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStatusDefinitionProviderService, providedIn: 'root' }); }
|
|
3522
4026
|
}
|
|
3523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4027
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStatusDefinitionProviderService, decorators: [{
|
|
3524
4028
|
type: Injectable,
|
|
3525
4029
|
args: [{ providedIn: 'root' }]
|
|
3526
4030
|
}] });
|
|
@@ -3867,10 +4371,10 @@ class AXPClipBoardService {
|
|
|
3867
4371
|
navigator.clipboard.writeText(value);
|
|
3868
4372
|
this.toast.success(`${title} copied!`);
|
|
3869
4373
|
}
|
|
3870
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3871
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4374
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPClipBoardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4375
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPClipBoardService, providedIn: 'root' }); }
|
|
3872
4376
|
}
|
|
3873
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4377
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPClipBoardService, decorators: [{
|
|
3874
4378
|
type: Injectable,
|
|
3875
4379
|
args: [{
|
|
3876
4380
|
providedIn: 'root',
|
|
@@ -3984,10 +4488,10 @@ class AXPDebugService {
|
|
|
3984
4488
|
console.error('[AXPDebugService] Failed to display user access info:', error);
|
|
3985
4489
|
}
|
|
3986
4490
|
}
|
|
3987
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3988
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4491
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDebugService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4492
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDebugService, providedIn: 'root' }); }
|
|
3989
4493
|
}
|
|
3990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4494
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDebugService, decorators: [{
|
|
3991
4495
|
type: Injectable,
|
|
3992
4496
|
args: [{
|
|
3993
4497
|
providedIn: 'root',
|
|
@@ -3997,15 +4501,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
3997
4501
|
class AXMOrgChartPrintPage extends AXBasePageComponent {
|
|
3998
4502
|
constructor() {
|
|
3999
4503
|
super(...arguments);
|
|
4000
|
-
this.ratio = signal(false, ...(ngDevMode ? [{ debugName: "ratio" }] : []));
|
|
4001
|
-
this.baseWidth = signal(undefined, ...(ngDevMode ? [{ debugName: "baseWidth" }] : []));
|
|
4002
|
-
this.baseHeight = signal(undefined, ...(ngDevMode ? [{ debugName: "baseHeight" }] : []));
|
|
4003
|
-
this.bgcolor = model(...(ngDevMode ? [undefined, { debugName: "bgcolor" }] : []));
|
|
4004
|
-
this.width = model(...(ngDevMode ? [undefined, { debugName: "width" }] : []));
|
|
4005
|
-
this.height = model(...(ngDevMode ? [undefined, { debugName: "height" }] : []));
|
|
4006
|
-
this.quality = model(...(ngDevMode ? [undefined, { debugName: "quality" }] : []));
|
|
4007
|
-
this.qualityComputed = linkedSignal(() => (this.data.quality ?? 1) * 100, ...(ngDevMode ? [{ debugName: "qualityComputed" }] : []));
|
|
4008
|
-
this.scale = model(...(ngDevMode ? [undefined, { debugName: "scale" }] : []));
|
|
4504
|
+
this.ratio = signal(false, ...(ngDevMode ? [{ debugName: "ratio" }] : /* istanbul ignore next */ []));
|
|
4505
|
+
this.baseWidth = signal(undefined, ...(ngDevMode ? [{ debugName: "baseWidth" }] : /* istanbul ignore next */ []));
|
|
4506
|
+
this.baseHeight = signal(undefined, ...(ngDevMode ? [{ debugName: "baseHeight" }] : /* istanbul ignore next */ []));
|
|
4507
|
+
this.bgcolor = model(...(ngDevMode ? [undefined, { debugName: "bgcolor" }] : /* istanbul ignore next */ []));
|
|
4508
|
+
this.width = model(...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
|
|
4509
|
+
this.height = model(...(ngDevMode ? [undefined, { debugName: "height" }] : /* istanbul ignore next */ []));
|
|
4510
|
+
this.quality = model(...(ngDevMode ? [undefined, { debugName: "quality" }] : /* istanbul ignore next */ []));
|
|
4511
|
+
this.qualityComputed = linkedSignal(() => (this.data.quality ?? 1) * 100, ...(ngDevMode ? [{ debugName: "qualityComputed" }] : /* istanbul ignore next */ []));
|
|
4512
|
+
this.scale = model(...(ngDevMode ? [undefined, { debugName: "scale" }] : /* istanbul ignore next */ []));
|
|
4009
4513
|
this.#init = afterNextRender(() => {
|
|
4010
4514
|
this.bgcolor.set(this.data.bgcolor);
|
|
4011
4515
|
this.width.set(this.data.width);
|
|
@@ -4042,8 +4546,8 @@ class AXMOrgChartPrintPage extends AXBasePageComponent {
|
|
|
4042
4546
|
isCanceled,
|
|
4043
4547
|
});
|
|
4044
4548
|
}
|
|
4045
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4046
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
4549
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOrgChartPrintPage, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4550
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AXMOrgChartPrintPage, isStandalone: true, selector: "ng-component", inputs: { bgcolor: { classPropertyName: "bgcolor", publicName: "bgcolor", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, quality: { classPropertyName: "quality", publicName: "quality", isSignal: true, isRequired: false, transformFunction: null }, scale: { classPropertyName: "scale", publicName: "scale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { bgcolor: "bgcolorChange", width: "widthChange", height: "heightChange", quality: "qualityChange", scale: "scaleChange" }, usesInheritance: true, ngImport: i0, template: ` <div class="ax-grid ax-grid-cols-[auto_18rem] ax-gap-4 ax-justify-center ax-p-4 ax-items-center">
|
|
4047
4551
|
<ax-label>Resolution (px)</ax-label>
|
|
4048
4552
|
<div class="ax-flex ax-gap-2 ax-items-center">
|
|
4049
4553
|
<ax-number-box
|
|
@@ -4094,7 +4598,7 @@ class AXMOrgChartPrintPage extends AXBasePageComponent {
|
|
|
4094
4598
|
</ax-suffix>
|
|
4095
4599
|
</ax-footer>`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXNumberBoxModule }, { kind: "component", type: i2.AXNumberBoxComponent, selector: "ax-number-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "minValue", "maxValue", "showSpinButtons", "thousandsSeparator", "decimals", "changeOnScroll", "step"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "thousandsSeparatorChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i5.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXColorBoxModule }, { kind: "component", type: i6.AXColorBoxComponent, selector: "ax-color-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "showBadge", "showValue", "showClearButton", "showIcon"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }] }); }
|
|
4096
4600
|
}
|
|
4097
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOrgChartPrintPage, decorators: [{
|
|
4098
4602
|
type: Component,
|
|
4099
4603
|
args: [{
|
|
4100
4604
|
template: ` <div class="ax-grid ax-grid-cols-[auto_18rem] ax-gap-4 ax-justify-center ax-p-4 ax-items-center">
|
|
@@ -4208,10 +4712,10 @@ class AXPExportService {
|
|
|
4208
4712
|
document.body.removeChild(link);
|
|
4209
4713
|
URL.revokeObjectURL(link.href);
|
|
4210
4714
|
}
|
|
4211
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4212
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
4715
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4716
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExportService, providedIn: 'root' }); }
|
|
4213
4717
|
}
|
|
4214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExportService, decorators: [{
|
|
4215
4719
|
type: Injectable,
|
|
4216
4720
|
args: [{
|
|
4217
4721
|
providedIn: 'root',
|
|
@@ -4241,6 +4745,8 @@ function AXPCleanNestedFilters(filters) {
|
|
|
4241
4745
|
.filter(Boolean);
|
|
4242
4746
|
}
|
|
4243
4747
|
|
|
4748
|
+
const AXP_LOCALE_MANAGEMENT_PORT = new InjectionToken('AXP_LOCALE_MANAGEMENT_PORT');
|
|
4749
|
+
|
|
4244
4750
|
//#region ---- Versioning Types ----
|
|
4245
4751
|
var AXVChangeType;
|
|
4246
4752
|
(function (AXVChangeType) {
|
|
@@ -4258,5 +4764,5 @@ class AXPVersioningService {
|
|
|
4258
4764
|
* Generated bundle index. Do not edit.
|
|
4259
4765
|
*/
|
|
4260
4766
|
|
|
4261
|
-
export { ALL_DEFAULT_OPERATORS, AXMWorkflowErrorHandler, AXPAppVersionService, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPCommonSettings, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataProvider, AXPDebugService, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityQueryType, AXPErrorHandlerRegistryService, AXPExportService, AXPFileActionsService, 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_ACTION_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, UploadFromComputerActionProvider, configPlatform, createAllQueryView, createMenuContext, createMenuMiddleware, createQueryView, getEntityInfo, getStatusInfo, getSystemStatus, provideDynamicHomePage, provideMenuMiddleware, resolveStatusLook, systemStatusToDefinition };
|
|
4767
|
+
export { ALL_DEFAULT_OPERATORS, AXMWorkflowErrorHandler, AXPAppVersionService, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPCommonSettings, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataProvider, AXPDebugService, AXPDefaultMultiLanguageConfigService, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityQueryType, AXPEntityType, AXPErrorHandlerRegistryService, AXPExportService, AXPFileActionsService, AXPFileStorageService, AXPFileStorageStatus, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPHomePageModule, AXPHomePageService, AXPLockService, AXPMenuItemsDataSourceDefinition, AXPMenuMiddlewareRegistry, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPMenuVisibilityService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRegionalSetting, AXPRelationshipCardinality, AXPRelationshipKind, AXPReloadAction, AXPReloadEvent, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValuesAggregatorService, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingsEvaluatorScopeProvider, AXPSettingsService, AXPStatusDefinitionProviderService, AXPStatusProvider, AXPStickyDirective, AXPSystemStatusType, AXPSystemStatuses, AXPToastAction, AXPTokenDefinitionService, AXPTokenEvaluatorScopeProvider, AXPVersioningService, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_APP_VERSION_PROVIDER, AXP_FILE_ACTION_PROVIDER, AXP_FILE_TYPE_INFO_PROVIDER, AXP_HOME_PAGES, AXP_HOME_PAGE_DEFAULT_KEY, AXP_LOCALE_MANAGEMENT_PORT, AXP_MENU_MIDDLEWARE, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFAULT_VALUES_PROVIDERS, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, AXP_STATUS_PROVIDERS, AXP_TOKEN_DEFINITION_PROVIDER, AXVChangeType, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, DEFAULT_MULTILANGUAGE_FIELD_NAMES, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IN_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, MENU_ITEMS_DATASOURCE_NAME, MULTILANGUAGE_CAPABLE_WIDGET_TYPES, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, UploadFromComputerActionProvider, coerceAXPSettingRawValue, coerceAXPSettingRawValueByKind, configPlatform, createAllQueryView, createEntityCommandOptions, createEntitySearchCommand, createMenuContext, createMenuMiddleware, createQueryView, getEntityInfo, getStatusInfo, getSystemStatus, inferSettingCoercionKind, peelSettingValueKey, provideDynamicHomePage, provideMenuMiddleware, resolveStatusLook, shouldApplyDefaultMultiLanguageToEntityProperty, shouldApplyDefaultMultiLanguageToWidgetNode, shouldApplyDefaultMultiLanguageToWidgetProperty, systemStatusToDefinition, withDefaultMultiLanguageOnWidgetNodeTree, withDefaultMultiLanguageOnWidgetProperty };
|
|
4262
4768
|
//# sourceMappingURL=acorex-platform-common.mjs.map
|