@acorex/platform 19.1.7 → 19.1.9
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/common/lib/app/application.types.d.ts +4 -0
- package/common/lib/common.module.d.ts +8 -9
- package/common/lib/layout/menu/menu.types.d.ts +3 -2
- package/common/lib/layout/menu/search.provider.d.ts +2 -2
- package/common/lib/search/search-definition.builder.d.ts +5 -2
- package/common/lib/search/search.provider.d.ts +4 -0
- package/common/lib/search/search.service.d.ts +1 -0
- package/common/lib/search/search.types.d.ts +21 -5
- package/common/lib/settings/settings.service.d.ts +11 -5
- package/common/lib/store/common.actions.d.ts +0 -12
- package/common/lib/store/index.d.ts +0 -1
- package/common/lib/workflows/index.d.ts +1 -0
- package/common/lib/workflows/navigate.workflow.d.ts +13 -0
- package/core/lib/types.d.ts +19 -0
- package/fesm2022/acorex-platform-common.mjs +696 -705
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +2 -0
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +3 -3
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +172 -40
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-search.mjs +87 -15
- package/fesm2022/acorex-platform-layout-search.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-setting.mjs +111 -5
- package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-BUL6ti4U.mjs → acorex-platform-themes-default-entity-master-list-view.component-BDjcOo6R.mjs} +3 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BDjcOo6R.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-search-popup.component-gkiSZXm-.mjs +122 -0
- package/fesm2022/acorex-platform-themes-default-search-popup.component-gkiSZXm-.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +11 -11
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +9 -9
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +1188 -509
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +10 -3
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/lib/builder/widget-map.d.ts +2 -0
- package/layout/designer/lib/preview/preview.component.d.ts +2 -2
- package/layout/entity/lib/entity-master-single.viewmodel.d.ts +6 -6
- package/layout/entity/lib/entity-registery.service.d.ts +16 -0
- package/layout/entity/lib/entity.config.d.ts +2 -2
- package/layout/entity/lib/entity.module.d.ts +3 -0
- package/layout/entity/lib/search-definition-command.provider.d.ts +4 -0
- package/layout/entity/lib/search-definition.provider.d.ts +6 -0
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +1 -1
- package/layout/search/lib/search.viewmodel.d.ts +21 -1
- package/layout/search/lib/workflows/search.workflow.d.ts +2 -1
- package/layout/setting/index.d.ts +1 -0
- package/{common/lib/settings → layout/setting/lib}/search-definition.provider.d.ts +1 -1
- package/layout/setting/lib/search.provider.d.ts +9 -0
- package/layout/setting/lib/settings.module.d.ts +9 -0
- package/package.json +5 -5
- package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/list-view-option-columns/list-view-option-columns.component.d.ts +2 -2
- package/themes/default/lib/layouts/search-layout/search-popup.component.d.ts +10 -1
- package/themes/shared/lib/components/layout-elements/layout-list.component.d.ts +3 -3
- package/widgets/lib/properties/layout.props.d.ts +1 -0
- package/widgets/lib/widgets/index.d.ts +2 -0
- package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-designer.component.d.ts +29 -0
- package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-view.component.d.ts +9 -0
- package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/layout/advanced-grid/index.d.ts +3 -0
- package/widgets/lib/widgets/layout/grid/grid-widget-designer.component.d.ts +7 -2
- package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +6 -6
- package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget-editor.component.d.ts +50 -0
- package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget.type.d.ts +21 -0
- package/widgets/lib/widgets/property-editors/grid-options/index.d.ts +3 -0
- package/widgets/lib/widgets/property-editors/property-editor-helper.d.ts +17 -2
- package/widgets/lib/widgets/property-editors/property-editor.type.d.ts +5 -0
- package/workflow/lib/workflow.service.d.ts +1 -0
- package/workflow/lib/workflow.types.d.ts +1 -1
- package/common/lib/settings/search.provider.d.ts +0 -10
- package/common/lib/store/common.effects.d.ts +0 -13
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BUL6ti4U.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-search-popup.component-Blpan821.mjs +0 -62
- package/fesm2022/acorex-platform-themes-default-search-popup.component-Blpan821.mjs.map +0 -1
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, provideAppInitializer, inject, RendererFactory2, InjectionToken, Injector, ErrorHandler, Directive, Input, EventEmitter, Output, runInInjectionContext, NgModule, Optional, Inject, Component, ViewEncapsulation } from '@angular/core';
|
|
3
|
-
import { kebabCase, sortBy, merge, cloneDeep, get
|
|
3
|
+
import { kebabCase, sortBy, omit, merge, cloneDeep, get } from 'lodash-es';
|
|
4
4
|
import { AXPopupModule } from '@acorex/components/popup';
|
|
5
5
|
import { AXToastService, AXToastModule } from '@acorex/components/toast';
|
|
6
6
|
import { AXDateTimeModule } from '@acorex/core/date-time';
|
|
7
|
-
import * as
|
|
8
|
-
import { createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowError, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
9
|
-
import * as i2$1 from '@angular/router';
|
|
7
|
+
import * as i4 from '@acorex/platform/workflow';
|
|
8
|
+
import { AXPWorkflowService, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowError, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
10
9
|
import { Router, RouterModule } from '@angular/router';
|
|
11
|
-
import * as i1$1 from '@ngrx/effects';
|
|
12
|
-
import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
|
13
10
|
import { applySortArray, applyFilterArray } from '@acorex/platform/core';
|
|
14
11
|
import Dexie from 'dexie';
|
|
15
12
|
import * as i3 from '@acorex/components/decorators';
|
|
@@ -19,9 +16,10 @@ import { AXImageModule } from '@acorex/components/image';
|
|
|
19
16
|
import * as i1 from '@angular/common';
|
|
20
17
|
import { CommonModule } from '@angular/common';
|
|
21
18
|
import { signalStore, withState, withMethods, patchState, withHooks } from '@ngrx/signals';
|
|
22
|
-
import { createAction, props, Store } from '@ngrx/store';
|
|
23
|
-
import { Subject, switchMap, of } from 'rxjs';
|
|
24
19
|
import { AXTranslationService } from '@acorex/core/translation';
|
|
20
|
+
import { Store, createAction } from '@ngrx/store';
|
|
21
|
+
import { AXFormatService } from '@acorex/core/format';
|
|
22
|
+
import { Subject } from 'rxjs';
|
|
25
23
|
import { AXDialogService } from '@acorex/components/dialog';
|
|
26
24
|
|
|
27
25
|
class AXPAppStartUpService {
|
|
@@ -1277,471 +1275,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
1277
1275
|
args: [{ providedIn: 'root' }]
|
|
1278
1276
|
}] });
|
|
1279
1277
|
|
|
1280
|
-
const AXPNavigateAction = createAction('[Navigate] Action', props());
|
|
1281
|
-
const AXPSignOutAction = createAction('[SignOut] Action');
|
|
1282
|
-
const AXPSignInAction = createAction('[SignIn] Action');
|
|
1283
|
-
|
|
1284
|
-
var AXPSettingScope;
|
|
1285
|
-
(function (AXPSettingScope) {
|
|
1286
|
-
AXPSettingScope["Environment"] = "C";
|
|
1287
|
-
AXPSettingScope["Global"] = "G";
|
|
1288
|
-
AXPSettingScope["Tenant"] = "T";
|
|
1289
|
-
AXPSettingScope["User"] = "U";
|
|
1290
|
-
})(AXPSettingScope || (AXPSettingScope = {}));
|
|
1291
|
-
;
|
|
1292
|
-
|
|
1293
|
-
class AXPSettingDefinitionProviderContext {
|
|
1294
|
-
constructor() {
|
|
1295
|
-
this.rootGroups = [];
|
|
1296
|
-
this.groupMap = new Map();
|
|
1297
|
-
}
|
|
1298
|
-
addGroup(name, title, description, icon) {
|
|
1299
|
-
const newGroup = {
|
|
1300
|
-
name,
|
|
1301
|
-
title,
|
|
1302
|
-
description,
|
|
1303
|
-
icon,
|
|
1304
|
-
groups: [],
|
|
1305
|
-
sections: [],
|
|
1306
|
-
};
|
|
1307
|
-
this.rootGroups.push(newGroup);
|
|
1308
|
-
this.groupMap.set(name, newGroup); // Index by name
|
|
1309
|
-
return new AXPSettingDefinitionGroupBuilder(this, newGroup);
|
|
1310
|
-
}
|
|
1311
|
-
group(name) {
|
|
1312
|
-
const foundGroup = this.groupMap.get(name);
|
|
1313
|
-
if (!foundGroup) {
|
|
1314
|
-
throw new Error(`Group with name "${name}" not found.`);
|
|
1315
|
-
}
|
|
1316
|
-
return new AXPSettingDefinitionGroupBuilder(this, foundGroup);
|
|
1317
|
-
}
|
|
1318
|
-
getGroups() {
|
|
1319
|
-
return this.rootGroups;
|
|
1320
|
-
}
|
|
1321
|
-
// Expose groupMap for controlled access
|
|
1322
|
-
hasGroup(name) {
|
|
1323
|
-
return this.groupMap.has(name);
|
|
1324
|
-
}
|
|
1325
|
-
getGroup(name) {
|
|
1326
|
-
return this.groupMap.get(name);
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
|
-
class AXPSettingDefinitionGroupBuilder {
|
|
1330
|
-
constructor(context, group) {
|
|
1331
|
-
this.context = context;
|
|
1332
|
-
this.group = group;
|
|
1333
|
-
}
|
|
1334
|
-
addSection(name, title, description) {
|
|
1335
|
-
const newSection = {
|
|
1336
|
-
name,
|
|
1337
|
-
title,
|
|
1338
|
-
description: description,
|
|
1339
|
-
settings: [],
|
|
1340
|
-
};
|
|
1341
|
-
this.group.sections.push(newSection);
|
|
1342
|
-
return new AXPSettingDefinitionSectionBuilder(this, newSection);
|
|
1343
|
-
}
|
|
1344
|
-
section(name) {
|
|
1345
|
-
const foundSection = this.group.sections.find((section) => section.name === name);
|
|
1346
|
-
if (!foundSection) {
|
|
1347
|
-
throw new Error(`Section with name "${name}" not found in group "${this.group.name}".`);
|
|
1348
|
-
}
|
|
1349
|
-
return new AXPSettingDefinitionSectionBuilder(this, foundSection);
|
|
1350
|
-
}
|
|
1351
|
-
addGroup(name, title, description, icon) {
|
|
1352
|
-
const newGroup = {
|
|
1353
|
-
name,
|
|
1354
|
-
title,
|
|
1355
|
-
description: description,
|
|
1356
|
-
icon,
|
|
1357
|
-
groups: [],
|
|
1358
|
-
sections: [],
|
|
1359
|
-
};
|
|
1360
|
-
this.group.groups.push(newGroup);
|
|
1361
|
-
if (this.context.hasGroup(name)) {
|
|
1362
|
-
throw new Error(`Group with name "${name}" already exists.`);
|
|
1363
|
-
}
|
|
1364
|
-
this.context['groupMap'].set(name, newGroup);
|
|
1365
|
-
return new AXPSettingDefinitionGroupBuilder(this.context, newGroup);
|
|
1366
|
-
}
|
|
1367
|
-
endGroup() {
|
|
1368
|
-
return this.context;
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
class AXPSettingDefinitionSectionBuilder {
|
|
1372
|
-
constructor(groupBuilder, section) {
|
|
1373
|
-
this.groupBuilder = groupBuilder;
|
|
1374
|
-
this.section = section;
|
|
1375
|
-
}
|
|
1376
|
-
addSetting(setting) {
|
|
1377
|
-
const newSetting = {
|
|
1378
|
-
name: setting.key,
|
|
1379
|
-
title: setting.title,
|
|
1380
|
-
description: setting.description,
|
|
1381
|
-
isRequired: setting.isRequired ?? false,
|
|
1382
|
-
isInherited: setting.isInherited ?? false,
|
|
1383
|
-
isEncrypted: setting.isEncrypted ?? false,
|
|
1384
|
-
defaultValue: setting.defaultValue,
|
|
1385
|
-
scope: setting.scope ?? 'G',
|
|
1386
|
-
widget: {
|
|
1387
|
-
type: setting.widget.type,
|
|
1388
|
-
name: setting.key,
|
|
1389
|
-
path: setting.key,
|
|
1390
|
-
defaultValue: setting.defaultValue,
|
|
1391
|
-
options: merge(setting.widget.options ?? {}, {
|
|
1392
|
-
label: setting.widget.options?.['label'] ?? setting.title,
|
|
1393
|
-
validationRules: setting.validationRules ?? [],
|
|
1394
|
-
}),
|
|
1395
|
-
valueTransforms: setting.valueTransforms,
|
|
1396
|
-
triggers: setting.widget.triggers,
|
|
1397
|
-
},
|
|
1398
|
-
};
|
|
1399
|
-
this.section.settings.push(newSetting);
|
|
1400
|
-
return this;
|
|
1401
|
-
}
|
|
1402
|
-
endSection() {
|
|
1403
|
-
return this.groupBuilder;
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
// Injection token for setting providers
|
|
1408
|
-
const AXP_SETTING_DEFINITION_PROVIDER = new InjectionToken('AXP_SETTING_DEFINITION_PROVIDER');
|
|
1409
|
-
class AXPSettingDefinitionProviderService {
|
|
1410
|
-
constructor() {
|
|
1411
|
-
this.providers = inject(AXP_SETTING_DEFINITION_PROVIDER, { optional: true });
|
|
1412
|
-
this.cache = null;
|
|
1413
|
-
}
|
|
1414
|
-
async load() {
|
|
1415
|
-
if (this.cache) {
|
|
1416
|
-
return;
|
|
1417
|
-
}
|
|
1418
|
-
const context = new AXPSettingDefinitionProviderContext();
|
|
1419
|
-
if (Array.isArray(this.providers)) {
|
|
1420
|
-
for (const provider of this.providers) {
|
|
1421
|
-
await provider.provide(context);
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
this.cache = context.getGroups();
|
|
1425
|
-
}
|
|
1426
|
-
async getListAsync(scope) {
|
|
1427
|
-
await this.load();
|
|
1428
|
-
return this.getList(scope);
|
|
1429
|
-
}
|
|
1430
|
-
getList(scope) {
|
|
1431
|
-
if (!this.cache) {
|
|
1432
|
-
return [];
|
|
1433
|
-
}
|
|
1434
|
-
const scopeOrder = ['C', 'G', 'T', 'U']; // Scopes hierarchy in ascending order
|
|
1435
|
-
const filterByScope = (groups, currentScope) => {
|
|
1436
|
-
const currentScopeIndex = scopeOrder.indexOf(currentScope);
|
|
1437
|
-
return groups
|
|
1438
|
-
.map((group) => ({
|
|
1439
|
-
...group,
|
|
1440
|
-
sections: group.sections.map((section) => ({
|
|
1441
|
-
...section,
|
|
1442
|
-
settings: section.settings.filter((setting) => {
|
|
1443
|
-
const settingScopeIndex = scopeOrder.indexOf(setting.scope);
|
|
1444
|
-
// Include settings where:
|
|
1445
|
-
// 1. The scope matches the requested scope.
|
|
1446
|
-
if (setting.scope === currentScope)
|
|
1447
|
-
return true;
|
|
1448
|
-
// 2. The setting scope is higher (closer to 'U') and is inherited.
|
|
1449
|
-
if (setting.isInherited &&
|
|
1450
|
-
settingScopeIndex > currentScopeIndex // Higher scope
|
|
1451
|
-
) {
|
|
1452
|
-
return true;
|
|
1453
|
-
}
|
|
1454
|
-
// 3. Exclude settings with a lower or irrelevant scope.
|
|
1455
|
-
return false;
|
|
1456
|
-
}),
|
|
1457
|
-
})).filter((section) => section.settings.length > 0), // Keep only sections with settings
|
|
1458
|
-
groups: filterByScope(group.groups, currentScope), // Recursively filter nested groups
|
|
1459
|
-
}))
|
|
1460
|
-
.filter((group) => group.sections.length > 0 || group.groups.length > 0); // Keep groups with valid sections or nested groups
|
|
1461
|
-
};
|
|
1462
|
-
return filterByScope(this.cache, scope);
|
|
1463
|
-
}
|
|
1464
|
-
async defaultValues() {
|
|
1465
|
-
const defaults = {};
|
|
1466
|
-
const collectDefaults = (groups) => {
|
|
1467
|
-
groups.forEach((group) => {
|
|
1468
|
-
group.sections.forEach((section) => {
|
|
1469
|
-
section.settings.forEach((setting) => {
|
|
1470
|
-
if (setting.defaultValue !== undefined) {
|
|
1471
|
-
defaults[setting.name] = setting.defaultValue;
|
|
1472
|
-
}
|
|
1473
|
-
});
|
|
1474
|
-
});
|
|
1475
|
-
collectDefaults(group.groups);
|
|
1476
|
-
});
|
|
1477
|
-
};
|
|
1478
|
-
if (!this.cache) {
|
|
1479
|
-
await this.load();
|
|
1480
|
-
}
|
|
1481
|
-
collectDefaults(this.cache);
|
|
1482
|
-
return defaults;
|
|
1483
|
-
}
|
|
1484
|
-
findGroup(scope, groupName) {
|
|
1485
|
-
return this.searchRecursive(this.getList(scope), groupName, []); // Initialize with an empty breadcrumb
|
|
1486
|
-
}
|
|
1487
|
-
searchRecursive(groups, groupName, breadcrumb) {
|
|
1488
|
-
for (const group of groups) {
|
|
1489
|
-
const currentBreadcrumb = [...breadcrumb, { name: group.name, title: group.title, description: group.description }];
|
|
1490
|
-
// If the group name matches, return its details
|
|
1491
|
-
if (group.name === groupName) {
|
|
1492
|
-
return {
|
|
1493
|
-
breadcrumb: currentBreadcrumb,
|
|
1494
|
-
sections: group.sections.length > 0 ? group.sections : null,
|
|
1495
|
-
groups: group.groups.length > 0 ? group.groups : null,
|
|
1496
|
-
};
|
|
1497
|
-
}
|
|
1498
|
-
// Recursively search in nested groups
|
|
1499
|
-
const nestedResult = this.searchRecursive(group.groups, groupName, currentBreadcrumb);
|
|
1500
|
-
if (nestedResult.breadcrumb.length > 0) {
|
|
1501
|
-
return nestedResult;
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
// If no matching group is found
|
|
1505
|
-
return {
|
|
1506
|
-
breadcrumb: [],
|
|
1507
|
-
groups: [],
|
|
1508
|
-
sections: []
|
|
1509
|
-
};
|
|
1510
|
-
}
|
|
1511
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1512
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, providedIn: 'root' }); }
|
|
1513
|
-
}
|
|
1514
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, decorators: [{
|
|
1515
|
-
type: Injectable,
|
|
1516
|
-
args: [{ providedIn: 'root' }]
|
|
1517
|
-
}] });
|
|
1518
|
-
class AXPSettingDefaultValueProvider {
|
|
1519
|
-
constructor() {
|
|
1520
|
-
this.definitionProvider = inject(AXPSettingDefinitionProviderService);
|
|
1521
|
-
}
|
|
1522
|
-
get scope() {
|
|
1523
|
-
return AXPSettingScope.Global;
|
|
1524
|
-
}
|
|
1525
|
-
async load() {
|
|
1526
|
-
return Object.entries(await this.definitionProvider.defaultValues()).map(c => ({ key: c[0], value: c[1] }));
|
|
1527
|
-
}
|
|
1528
|
-
set(key, value) {
|
|
1529
|
-
throw new Error('Method not implemented.');
|
|
1530
|
-
}
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
const AXP_SETTING_VALUE_PROVIDER = new InjectionToken('AXP_SETTING_VALUE_PROVIDER', {
|
|
1534
|
-
providedIn: 'root',
|
|
1535
|
-
factory: () => {
|
|
1536
|
-
return [
|
|
1537
|
-
//new AXPSettingDefaultValueProvider(),
|
|
1538
|
-
new AXPSettingValueProviderDefault(AXPSettingScope.Tenant),
|
|
1539
|
-
new AXPSettingValueProviderDefault(AXPSettingScope.User)
|
|
1540
|
-
];
|
|
1541
|
-
}
|
|
1542
|
-
});
|
|
1543
|
-
class AXPSettingValueProviderDefault {
|
|
1544
|
-
get scope() {
|
|
1545
|
-
return this._scope;
|
|
1546
|
-
}
|
|
1547
|
-
constructor(_scope) {
|
|
1548
|
-
this._scope = _scope;
|
|
1549
|
-
this.cache = new Map();
|
|
1550
|
-
this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.scope})`;
|
|
1551
|
-
}
|
|
1552
|
-
async load() {
|
|
1553
|
-
// Load settings from localStorage as a single key
|
|
1554
|
-
const storedSettings = localStorage.getItem(this.localStorageKey);
|
|
1555
|
-
if (storedSettings) {
|
|
1556
|
-
const parsedSettings = JSON.parse(storedSettings);
|
|
1557
|
-
Object.entries(parsedSettings).forEach(([key, value]) => {
|
|
1558
|
-
this.cache.set(key, value);
|
|
1559
|
-
});
|
|
1560
|
-
return Promise.resolve(Array.from(this.cache.entries()).map(c => ({ key: c[0], value: c[1] })));
|
|
1561
|
-
}
|
|
1562
|
-
return Promise.resolve([]);
|
|
1563
|
-
}
|
|
1564
|
-
async set(keyOrValues, value) {
|
|
1565
|
-
if (typeof keyOrValues === 'string') {
|
|
1566
|
-
// Single value update
|
|
1567
|
-
this.cache.set(keyOrValues, value);
|
|
1568
|
-
}
|
|
1569
|
-
else {
|
|
1570
|
-
// Bulk update
|
|
1571
|
-
for (const [key, val] of Object.entries(keyOrValues)) {
|
|
1572
|
-
this.cache.set(key, val);
|
|
1573
|
-
}
|
|
1574
|
-
}
|
|
1575
|
-
await this.saveToLocalStorage();
|
|
1576
|
-
}
|
|
1577
|
-
async saveToLocalStorage() {
|
|
1578
|
-
const settingsObject = {};
|
|
1579
|
-
this.cache.forEach((value, key) => {
|
|
1580
|
-
settingsObject[key] = value;
|
|
1581
|
-
});
|
|
1582
|
-
localStorage.setItem(this.localStorageKey, JSON.stringify(settingsObject));
|
|
1583
|
-
}
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
class AXPSettingValueProviderService {
|
|
1587
|
-
constructor() {
|
|
1588
|
-
this.providers = inject(AXP_SETTING_VALUE_PROVIDER);
|
|
1589
|
-
this.definitionService = inject(AXPSettingDefinitionProviderService);
|
|
1590
|
-
this.scopedSettingsCache = new Map();
|
|
1591
|
-
this.onChanged = new Subject();
|
|
1592
|
-
// Initialize scoped caches for dynamic scopes
|
|
1593
|
-
const staticScopes = [AXPSettingScope.Environment, AXPSettingScope.Global, AXPSettingScope.Tenant, AXPSettingScope.User];
|
|
1594
|
-
staticScopes.forEach((scope) => {
|
|
1595
|
-
if (!this.scopedSettingsCache.has(scope)) {
|
|
1596
|
-
this.scopedSettingsCache.set(scope, new Map());
|
|
1597
|
-
}
|
|
1598
|
-
});
|
|
1599
|
-
}
|
|
1600
|
-
async load() {
|
|
1601
|
-
try {
|
|
1602
|
-
const settingsList = [];
|
|
1603
|
-
for (const provider of this.providers) {
|
|
1604
|
-
const scopeCache = this.scopedSettingsCache.get(provider.scope);
|
|
1605
|
-
const providerSettings = await provider.load();
|
|
1606
|
-
providerSettings.forEach((setting) => {
|
|
1607
|
-
scopeCache.set(setting.key, setting.value);
|
|
1608
|
-
});
|
|
1609
|
-
settingsList.push(...providerSettings);
|
|
1610
|
-
}
|
|
1611
|
-
return settingsList;
|
|
1612
|
-
}
|
|
1613
|
-
catch (error) {
|
|
1614
|
-
console.error('Error loading settings', error);
|
|
1615
|
-
throw error;
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
async get(key) {
|
|
1619
|
-
if (this.scopedSettingsCache.size === 0) {
|
|
1620
|
-
await this.load();
|
|
1621
|
-
}
|
|
1622
|
-
const scopeOrder = [AXPSettingScope.User, AXPSettingScope.Tenant, AXPSettingScope.Global, AXPSettingScope.Environment];
|
|
1623
|
-
for (const scope of scopeOrder) {
|
|
1624
|
-
const scopeCache = this.scopedSettingsCache.get(scope);
|
|
1625
|
-
if (scopeCache && scopeCache.has(key)) {
|
|
1626
|
-
const value = scopeCache.get(key);
|
|
1627
|
-
if (value !== undefined && value !== null) {
|
|
1628
|
-
return cloneDeep(value);
|
|
1629
|
-
}
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
const defaults = await this.definitionService.defaultValues();
|
|
1633
|
-
return get(defaults, key); // Fallback if no value is found
|
|
1634
|
-
}
|
|
1635
|
-
async defaultValues(scope) {
|
|
1636
|
-
let scopeOrder = [AXPSettingScope.Environment, AXPSettingScope.Global, AXPSettingScope.Tenant, AXPSettingScope.User].reverse();
|
|
1637
|
-
const scopeIndex = scopeOrder.indexOf(scope);
|
|
1638
|
-
if (scopeIndex === -1) {
|
|
1639
|
-
throw new Error(`Invalid scope: ${scope}`);
|
|
1640
|
-
}
|
|
1641
|
-
scopeOrder = scopeOrder.slice(scopeIndex + 1);
|
|
1642
|
-
// Accumulate defaults from the current scope and higher scopes
|
|
1643
|
-
const accumulatedDefaults = {};
|
|
1644
|
-
for (let i = scopeIndex; i < scopeOrder.length; i++) {
|
|
1645
|
-
const currentScope = scopeOrder[i];
|
|
1646
|
-
const scopeCache = this.scopedSettingsCache.get(currentScope);
|
|
1647
|
-
if (scopeCache) {
|
|
1648
|
-
scopeCache.forEach((value, key) => {
|
|
1649
|
-
if (!(key in accumulatedDefaults)) {
|
|
1650
|
-
accumulatedDefaults[key] = value;
|
|
1651
|
-
}
|
|
1652
|
-
});
|
|
1653
|
-
}
|
|
1654
|
-
}
|
|
1655
|
-
// Merge with global default values from the definition service
|
|
1656
|
-
const globalDefaults = await this.definitionService.defaultValues();
|
|
1657
|
-
return { ...globalDefaults, ...accumulatedDefaults };
|
|
1658
|
-
}
|
|
1659
|
-
scope(scope) {
|
|
1660
|
-
const provider = this.providers.find((p) => p.scope === scope);
|
|
1661
|
-
if (!provider) {
|
|
1662
|
-
throw new Error(`No provider found for scope: ${scope}`);
|
|
1663
|
-
}
|
|
1664
|
-
return new ScopedSettingService(this, provider, this.onChanged, this.scopedSettingsCache.get(scope));
|
|
1665
|
-
}
|
|
1666
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingValueProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1667
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingValueProviderService, providedIn: 'root' }); }
|
|
1668
|
-
}
|
|
1669
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingValueProviderService, decorators: [{
|
|
1670
|
-
type: Injectable,
|
|
1671
|
-
args: [{
|
|
1672
|
-
providedIn: 'root',
|
|
1673
|
-
}]
|
|
1674
|
-
}], ctorParameters: () => [] });
|
|
1675
|
-
class ScopedSettingService {
|
|
1676
|
-
constructor(parent, provider, onChanged, scopeCache) {
|
|
1677
|
-
this.parent = parent;
|
|
1678
|
-
this.provider = provider;
|
|
1679
|
-
this.onChanged = onChanged;
|
|
1680
|
-
this.scopeCache = scopeCache;
|
|
1681
|
-
}
|
|
1682
|
-
async get(key) {
|
|
1683
|
-
const settings = await this.provider.load();
|
|
1684
|
-
const setting = settings.find((s) => s.key === key);
|
|
1685
|
-
return setting ? cloneDeep(setting.value) : undefined;
|
|
1686
|
-
}
|
|
1687
|
-
async all() {
|
|
1688
|
-
const settings = await this.provider.load();
|
|
1689
|
-
return Object.fromEntries(settings.map((s) => [s.key, cloneDeep(s.value)]));
|
|
1690
|
-
}
|
|
1691
|
-
async defaultValues() {
|
|
1692
|
-
return this.parent.defaultValues(this.provider.scope);
|
|
1693
|
-
}
|
|
1694
|
-
async set(keyOrValues, value) {
|
|
1695
|
-
if (typeof keyOrValues === 'string') {
|
|
1696
|
-
// Single key-value pair
|
|
1697
|
-
await this.provider.set(keyOrValues, value);
|
|
1698
|
-
this.scopeCache.set(keyOrValues, value); // Sync the cache
|
|
1699
|
-
this.onChanged.next({
|
|
1700
|
-
scope: this.provider.scope,
|
|
1701
|
-
keys: [keyOrValues],
|
|
1702
|
-
values: { [keyOrValues]: value },
|
|
1703
|
-
entries: [{ key: keyOrValues, value }],
|
|
1704
|
-
});
|
|
1705
|
-
}
|
|
1706
|
-
else {
|
|
1707
|
-
// Multiple key-value pairs
|
|
1708
|
-
await this.provider.set(keyOrValues);
|
|
1709
|
-
Object.entries(keyOrValues).forEach(([key, val]) => this.scopeCache.set(key, val)); // Sync the cache
|
|
1710
|
-
const entries = Object.entries(keyOrValues).map(([key, val]) => ({ key, value: val }));
|
|
1711
|
-
this.onChanged.next({
|
|
1712
|
-
scope: this.provider.scope,
|
|
1713
|
-
keys: Object.keys(keyOrValues),
|
|
1714
|
-
values: keyOrValues,
|
|
1715
|
-
entries,
|
|
1716
|
-
});
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
class AXPCommonEffects {
|
|
1722
|
-
constructor(actions$, router, settingService) {
|
|
1723
|
-
this.actions$ = actions$;
|
|
1724
|
-
this.router = router;
|
|
1725
|
-
this.settingService = settingService;
|
|
1726
|
-
this.command$ = createEffect(() => this.actions$.pipe(ofType(AXPNavigateAction), switchMap((action) => {
|
|
1727
|
-
if (Array.isArray(action.payload.commands))
|
|
1728
|
-
this.router.navigate(action.payload.commands, action.payload.extras);
|
|
1729
|
-
else {
|
|
1730
|
-
if (action.payload.commands.toLowerCase().startsWith('http'))
|
|
1731
|
-
window.open(action.payload.commands, '_blank');
|
|
1732
|
-
else
|
|
1733
|
-
this.router.navigate([action.payload.commands], action.payload.extras);
|
|
1734
|
-
}
|
|
1735
|
-
return of();
|
|
1736
|
-
})), { dispatch: false });
|
|
1737
|
-
}
|
|
1738
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonEffects, deps: [{ token: i1$1.Actions }, { token: i2$1.Router }, { token: AXPSettingValueProviderService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1739
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonEffects }); }
|
|
1740
|
-
}
|
|
1741
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonEffects, decorators: [{
|
|
1742
|
-
type: Injectable
|
|
1743
|
-
}], ctorParameters: () => [{ type: i1$1.Actions }, { type: i2$1.Router }, { type: AXPSettingValueProviderService }] });
|
|
1744
|
-
|
|
1745
1278
|
const AXPMenuService = signalStore({ providedIn: 'root' },
|
|
1746
1279
|
// Initial State
|
|
1747
1280
|
withState((router = inject(Router)) => {
|
|
@@ -1754,7 +1287,7 @@ withState((router = inject(Router)) => {
|
|
|
1754
1287
|
};
|
|
1755
1288
|
}),
|
|
1756
1289
|
// Methods for State Management
|
|
1757
|
-
withMethods((store, router = inject(Router),
|
|
1290
|
+
withMethods((store, router = inject(Router), workflow = inject(AXPWorkflowService)) => {
|
|
1758
1291
|
return {
|
|
1759
1292
|
setMenuItems(items) {
|
|
1760
1293
|
patchState(store, { items: items });
|
|
@@ -1812,11 +1345,11 @@ withMethods((store, router = inject(Router), globalStore = inject(Store)) => {
|
|
|
1812
1345
|
patchState(store, { selectedMenuItem: { item, isFullMatch: !isPartialMatch } });
|
|
1813
1346
|
},
|
|
1814
1347
|
executeCommand(item) {
|
|
1815
|
-
if (item.
|
|
1816
|
-
|
|
1348
|
+
if (item.path) {
|
|
1349
|
+
workflow.execute('navigate', { type: 'router', options: { path: item.path } });
|
|
1817
1350
|
}
|
|
1818
|
-
|
|
1819
|
-
|
|
1351
|
+
if (item.command) {
|
|
1352
|
+
workflow.execute('navigate', item.command);
|
|
1820
1353
|
}
|
|
1821
1354
|
patchState(store, { selectedMenuItem: { item, isFullMatch: true } });
|
|
1822
1355
|
},
|
|
@@ -1847,39 +1380,49 @@ withMethods((store, router = inject(Router), globalStore = inject(Store)) => {
|
|
|
1847
1380
|
|
|
1848
1381
|
class AXPMenuSearchDefinitionProvider {
|
|
1849
1382
|
async provide(context) {
|
|
1850
|
-
context.addDefinition('menu', 'Menu', 'fa-thin fa-bars',
|
|
1851
|
-
{
|
|
1852
|
-
|
|
1853
|
-
command: {
|
|
1854
|
-
name: 'view',
|
|
1855
|
-
options: {},
|
|
1856
|
-
},
|
|
1857
|
-
type: 'view',
|
|
1858
|
-
priority: 'primary',
|
|
1383
|
+
context.addDefinition('menu', 'Menu', 'fa-thin fa-bars', 2, {
|
|
1384
|
+
format: {
|
|
1385
|
+
id: '{{data.name}}',
|
|
1859
1386
|
},
|
|
1860
|
-
|
|
1387
|
+
actions: [
|
|
1388
|
+
{
|
|
1389
|
+
name: 'navigate',
|
|
1390
|
+
type: 'view',
|
|
1391
|
+
priority: 'primary',
|
|
1392
|
+
},
|
|
1393
|
+
],
|
|
1394
|
+
});
|
|
1861
1395
|
}
|
|
1862
1396
|
}
|
|
1863
1397
|
|
|
1864
1398
|
class AXPMenuSearchProvider {
|
|
1865
1399
|
constructor() {
|
|
1866
1400
|
this.menuService = inject(AXPMenuProviderService);
|
|
1867
|
-
this.
|
|
1401
|
+
this.translateService = inject(AXTranslationService);
|
|
1868
1402
|
}
|
|
1869
1403
|
async search(text) {
|
|
1870
1404
|
const menuItems = await this.searchMenuItems(await this.menuService.items(), text);
|
|
1871
1405
|
return sortBy(menuItems.map((item) => ({
|
|
1872
|
-
|
|
1406
|
+
group: 'menu', // Use `name` or empty string if undefined
|
|
1873
1407
|
title: item.text, // Use `text` for the `title`
|
|
1874
1408
|
icon: item.icon, // Include the `icon` if present
|
|
1875
|
-
data: item,
|
|
1409
|
+
data: omit(item, ['parent', 'children']), // Include all data except `parent` and `children`
|
|
1410
|
+
commands: {
|
|
1411
|
+
navigate: {
|
|
1412
|
+
...(item.command ?? {
|
|
1413
|
+
type: 'router',
|
|
1414
|
+
options: {
|
|
1415
|
+
path: item.path,
|
|
1416
|
+
},
|
|
1417
|
+
}),
|
|
1418
|
+
},
|
|
1419
|
+
},
|
|
1876
1420
|
parent: item.parent
|
|
1877
1421
|
? {
|
|
1878
1422
|
title: item.parent.text,
|
|
1879
|
-
data: item.parent,
|
|
1880
1423
|
}
|
|
1881
1424
|
: undefined,
|
|
1882
|
-
})), [(o) => this.
|
|
1425
|
+
})), [(o) => this.translateService.translateSync(o.title)]);
|
|
1883
1426
|
}
|
|
1884
1427
|
/**
|
|
1885
1428
|
* Recursively searches AXPMenuItem and its children for a matching text.
|
|
@@ -1894,7 +1437,7 @@ class AXPMenuSearchProvider {
|
|
|
1894
1437
|
// Check if the current item's text matches the search text
|
|
1895
1438
|
if (item.type != 'group' &&
|
|
1896
1439
|
(item.children?.length ?? 0) == 0 &&
|
|
1897
|
-
(await this.
|
|
1440
|
+
(await this.translateService.translateAsync(item.text)).toLowerCase().includes(searchText.toLowerCase())) {
|
|
1898
1441
|
result.push(item);
|
|
1899
1442
|
}
|
|
1900
1443
|
// Recursively search in children if they exist
|
|
@@ -1960,12 +1503,19 @@ class AXPSearchDefinitionProviderContext {
|
|
|
1960
1503
|
this.definitions = [];
|
|
1961
1504
|
this.definitionMap = new Map();
|
|
1962
1505
|
}
|
|
1963
|
-
addDefinition(name, title, icon,
|
|
1506
|
+
addDefinition(name, title, icon, order, options) {
|
|
1964
1507
|
const definitionSearch = {
|
|
1965
1508
|
name,
|
|
1966
1509
|
title,
|
|
1967
1510
|
icon,
|
|
1968
|
-
|
|
1511
|
+
order,
|
|
1512
|
+
format: {
|
|
1513
|
+
title: options?.format?.title ?? '{{ title }}',
|
|
1514
|
+
description: options?.format?.description ?? undefined,
|
|
1515
|
+
icon: options?.format?.icon ?? undefined,
|
|
1516
|
+
id: options?.format?.id ?? '{{ id }}',
|
|
1517
|
+
},
|
|
1518
|
+
actions: options?.actions ?? [],
|
|
1969
1519
|
};
|
|
1970
1520
|
this.definitions.push(definitionSearch);
|
|
1971
1521
|
this.definitionMap.set(name, definitionSearch); // Index by name
|
|
@@ -1982,227 +1532,641 @@ class AXPSearchDefinitionProviderContext {
|
|
|
1982
1532
|
return this.definitions;
|
|
1983
1533
|
}
|
|
1984
1534
|
// Expose groupMap for controlled access
|
|
1985
|
-
hasEntity(name) {
|
|
1986
|
-
return this.definitionMap.has(name);
|
|
1535
|
+
hasEntity(name) {
|
|
1536
|
+
return this.definitionMap.has(name);
|
|
1537
|
+
}
|
|
1538
|
+
getDefinition(name) {
|
|
1539
|
+
return this.definitionMap.get(name);
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
class AXPSearchDefinitionBuilder {
|
|
1543
|
+
constructor(context, definition) {
|
|
1544
|
+
this.context = context;
|
|
1545
|
+
this.definition = definition;
|
|
1546
|
+
}
|
|
1547
|
+
addAction(name) {
|
|
1548
|
+
const newAction = {
|
|
1549
|
+
name,
|
|
1550
|
+
type: 'view',
|
|
1551
|
+
priority: 'primary',
|
|
1552
|
+
};
|
|
1553
|
+
this.definition.actions.push(newAction);
|
|
1554
|
+
return new AXPSearchDefinitionActionBuilder(this);
|
|
1555
|
+
}
|
|
1556
|
+
action(name) {
|
|
1557
|
+
const foundAction = this.definition.actions.find((action) => action.name === name);
|
|
1558
|
+
if (!foundAction) {
|
|
1559
|
+
throw new Error(`action with name "${name}" not found in entity "${this.definition.name}".`);
|
|
1560
|
+
}
|
|
1561
|
+
return new AXPSearchDefinitionActionBuilder(this);
|
|
1562
|
+
}
|
|
1563
|
+
// addGroup(name: string, title: string, description?: string, icon?: string): AXPTextSearchEntityBuilder {
|
|
1564
|
+
// const newGroup: AXPTextSearchEntity = {
|
|
1565
|
+
// name,
|
|
1566
|
+
// title,
|
|
1567
|
+
// description: description,
|
|
1568
|
+
// icon,
|
|
1569
|
+
// groups: [],
|
|
1570
|
+
// sections: [],
|
|
1571
|
+
// };
|
|
1572
|
+
// this.entity.groups.push(newGroup);
|
|
1573
|
+
// if (this.context.hasGroup(name)) {
|
|
1574
|
+
// throw new Error(`Group with name "${name}" already exists.`);
|
|
1575
|
+
// }
|
|
1576
|
+
// this.context['groupMap'].set(name, newGroup);
|
|
1577
|
+
// return new AXPTextSearchEntityBuilder(this.context, newGroup);
|
|
1578
|
+
// }
|
|
1579
|
+
endEntity() {
|
|
1580
|
+
return this.context;
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
class AXPSearchDefinitionActionBuilder {
|
|
1584
|
+
constructor(entityBuilder) {
|
|
1585
|
+
this.entityBuilder = entityBuilder;
|
|
1586
|
+
}
|
|
1587
|
+
endAction() {
|
|
1588
|
+
return this.entityBuilder;
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
// Injection token for setting providers
|
|
1593
|
+
const AXP_SEARCH_DEFINITION_PROVIDER = new InjectionToken('AXP_SEARCH_DEFINITION_PROVIDER');
|
|
1594
|
+
class AXPSearchDefinitionProviderService {
|
|
1595
|
+
constructor() {
|
|
1596
|
+
this.providers = inject(AXP_SEARCH_DEFINITION_PROVIDER, { optional: true });
|
|
1597
|
+
this.cache = null;
|
|
1598
|
+
}
|
|
1599
|
+
async load() {
|
|
1600
|
+
if (this.cache) {
|
|
1601
|
+
return;
|
|
1602
|
+
}
|
|
1603
|
+
const context = new AXPSearchDefinitionProviderContext();
|
|
1604
|
+
if (Array.isArray(this.providers)) {
|
|
1605
|
+
for (const provider of this.providers) {
|
|
1606
|
+
await provider.provide(context);
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
this.cache = context.getDefinitions();
|
|
1610
|
+
}
|
|
1611
|
+
async getListAsync() {
|
|
1612
|
+
await this.load();
|
|
1613
|
+
return this.getList();
|
|
1614
|
+
}
|
|
1615
|
+
getList() {
|
|
1616
|
+
if (!this.cache) {
|
|
1617
|
+
return [];
|
|
1618
|
+
}
|
|
1619
|
+
else {
|
|
1620
|
+
return this.cache;
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
findDefinition(definitionName) {
|
|
1624
|
+
const definition = this.getList().find((definition) => definition.name === definitionName);
|
|
1625
|
+
if (!definition) {
|
|
1626
|
+
throw new Error(`Definition with name ${definitionName} not found`);
|
|
1627
|
+
}
|
|
1628
|
+
return definition;
|
|
1629
|
+
}
|
|
1630
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1631
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, providedIn: 'root' }); }
|
|
1632
|
+
}
|
|
1633
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, decorators: [{
|
|
1634
|
+
type: Injectable,
|
|
1635
|
+
args: [{ providedIn: 'root' }]
|
|
1636
|
+
}] });
|
|
1637
|
+
|
|
1638
|
+
class AXPSearchCommandProvider {
|
|
1639
|
+
async search(text) {
|
|
1640
|
+
return this.commands.filter((command) => command.title.toLowerCase().includes(text.toLowerCase()));
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
// Injection token for setting providers
|
|
1645
|
+
const AXP_SEARCH_PROVIDER = new InjectionToken('AXP_SEARCH_PROVIDER');
|
|
1646
|
+
class AXPSearchService {
|
|
1647
|
+
constructor() {
|
|
1648
|
+
this.providers = inject(AXP_SEARCH_PROVIDER, { optional: true });
|
|
1649
|
+
this.definitionService = inject(AXPSearchDefinitionProviderService);
|
|
1650
|
+
this.formatService = inject(AXFormatService);
|
|
1651
|
+
}
|
|
1652
|
+
async search(text) {
|
|
1653
|
+
//TODO better handle this
|
|
1654
|
+
if (this.definitionService.getList().length == 0) {
|
|
1655
|
+
await this.definitionService.getListAsync();
|
|
1656
|
+
}
|
|
1657
|
+
if (!this.providers || (this.providers?.length || 0) === 0) {
|
|
1658
|
+
throw new Error('No search providers available'); // No providers available
|
|
1659
|
+
}
|
|
1660
|
+
const mergeData = [];
|
|
1661
|
+
const promises = this.providers.map((provider) => provider.search(text));
|
|
1662
|
+
const results = await Promise.all(promises);
|
|
1663
|
+
for (const resultArray of results) {
|
|
1664
|
+
for (const result of resultArray) {
|
|
1665
|
+
try {
|
|
1666
|
+
const definition = this.definitionService.findDefinition(result.group);
|
|
1667
|
+
mergeData.push({
|
|
1668
|
+
definitionName: definition.name,
|
|
1669
|
+
definitionTitle: definition.title,
|
|
1670
|
+
name: result.group,
|
|
1671
|
+
id: `${definition.name}:${this.formatService.format(definition.format.id, 'string', result)}`,
|
|
1672
|
+
title: result.title ??
|
|
1673
|
+
(definition.format.title
|
|
1674
|
+
? this.formatService.format(definition.format.title, 'string', result.data)
|
|
1675
|
+
: 'Unknown'),
|
|
1676
|
+
description: result.description ??
|
|
1677
|
+
(definition.format.description
|
|
1678
|
+
? this.formatService.format(definition.format.description, 'string', result.data)
|
|
1679
|
+
: undefined),
|
|
1680
|
+
icon: result.icon ??
|
|
1681
|
+
(result.icon
|
|
1682
|
+
? this.formatService.format(definition.format.icon, 'string', result.data)
|
|
1683
|
+
: definition.icon),
|
|
1684
|
+
data: result.data,
|
|
1685
|
+
commands: result.commands,
|
|
1686
|
+
actions: definition.actions,
|
|
1687
|
+
parent: result.parent,
|
|
1688
|
+
order: definition.order,
|
|
1689
|
+
});
|
|
1690
|
+
}
|
|
1691
|
+
catch (e) {
|
|
1692
|
+
//console.error(e);
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
// Group data
|
|
1697
|
+
const groupedData = [];
|
|
1698
|
+
const groupMap = {};
|
|
1699
|
+
// Create groups
|
|
1700
|
+
for (const item of mergeData) {
|
|
1701
|
+
const groupName = item.definitionName; // Change this to the property you want to group by
|
|
1702
|
+
if (!groupMap[groupName]) {
|
|
1703
|
+
groupMap[groupName] = {
|
|
1704
|
+
name: groupName,
|
|
1705
|
+
title: item.definitionTitle, // You can adjust the title logic if needed
|
|
1706
|
+
order: item.order, // Add order to the group
|
|
1707
|
+
children: [],
|
|
1708
|
+
};
|
|
1709
|
+
groupedData.push(groupMap[groupName]);
|
|
1710
|
+
}
|
|
1711
|
+
groupMap[groupName].children.push(omit(item, ['definitionName', 'definitionTitle', 'order']));
|
|
1712
|
+
}
|
|
1713
|
+
// Sort groups by order
|
|
1714
|
+
groupedData.sort((a, b) => a.order - b.order);
|
|
1715
|
+
return groupedData;
|
|
1716
|
+
}
|
|
1717
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1718
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, providedIn: 'root' }); }
|
|
1719
|
+
}
|
|
1720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, decorators: [{
|
|
1721
|
+
type: Injectable,
|
|
1722
|
+
args: [{ providedIn: 'root' }]
|
|
1723
|
+
}] });
|
|
1724
|
+
|
|
1725
|
+
var AXPSettingScope;
|
|
1726
|
+
(function (AXPSettingScope) {
|
|
1727
|
+
AXPSettingScope["Environment"] = "C";
|
|
1728
|
+
AXPSettingScope["Global"] = "G";
|
|
1729
|
+
AXPSettingScope["Tenant"] = "T";
|
|
1730
|
+
AXPSettingScope["User"] = "U";
|
|
1731
|
+
})(AXPSettingScope || (AXPSettingScope = {}));
|
|
1732
|
+
;
|
|
1733
|
+
|
|
1734
|
+
class AXPSettingDefinitionProviderContext {
|
|
1735
|
+
constructor() {
|
|
1736
|
+
this.rootGroups = [];
|
|
1737
|
+
this.groupMap = new Map();
|
|
1738
|
+
}
|
|
1739
|
+
addGroup(name, title, description, icon) {
|
|
1740
|
+
const newGroup = {
|
|
1741
|
+
name,
|
|
1742
|
+
title,
|
|
1743
|
+
description,
|
|
1744
|
+
icon,
|
|
1745
|
+
groups: [],
|
|
1746
|
+
sections: [],
|
|
1747
|
+
};
|
|
1748
|
+
this.rootGroups.push(newGroup);
|
|
1749
|
+
this.groupMap.set(name, newGroup); // Index by name
|
|
1750
|
+
return new AXPSettingDefinitionGroupBuilder(this, newGroup);
|
|
1751
|
+
}
|
|
1752
|
+
group(name) {
|
|
1753
|
+
const foundGroup = this.groupMap.get(name);
|
|
1754
|
+
if (!foundGroup) {
|
|
1755
|
+
throw new Error(`Group with name "${name}" not found.`);
|
|
1756
|
+
}
|
|
1757
|
+
return new AXPSettingDefinitionGroupBuilder(this, foundGroup);
|
|
1758
|
+
}
|
|
1759
|
+
getGroups() {
|
|
1760
|
+
return this.rootGroups;
|
|
1761
|
+
}
|
|
1762
|
+
// Expose groupMap for controlled access
|
|
1763
|
+
hasGroup(name) {
|
|
1764
|
+
return this.groupMap.has(name);
|
|
1987
1765
|
}
|
|
1988
|
-
|
|
1989
|
-
return this.
|
|
1766
|
+
getGroup(name) {
|
|
1767
|
+
return this.groupMap.get(name);
|
|
1990
1768
|
}
|
|
1991
1769
|
}
|
|
1992
|
-
class
|
|
1993
|
-
constructor(context,
|
|
1770
|
+
class AXPSettingDefinitionGroupBuilder {
|
|
1771
|
+
constructor(context, group) {
|
|
1994
1772
|
this.context = context;
|
|
1995
|
-
this.
|
|
1773
|
+
this.group = group;
|
|
1996
1774
|
}
|
|
1997
|
-
|
|
1998
|
-
const
|
|
1775
|
+
addSection(name, title, description) {
|
|
1776
|
+
const newSection = {
|
|
1999
1777
|
name,
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
1778
|
+
title,
|
|
1779
|
+
description: description,
|
|
1780
|
+
settings: [],
|
|
2003
1781
|
};
|
|
2004
|
-
this.
|
|
2005
|
-
return new
|
|
1782
|
+
this.group.sections.push(newSection);
|
|
1783
|
+
return new AXPSettingDefinitionSectionBuilder(this, newSection);
|
|
2006
1784
|
}
|
|
2007
|
-
|
|
2008
|
-
const
|
|
2009
|
-
if (!
|
|
2010
|
-
throw new Error(`
|
|
1785
|
+
section(name) {
|
|
1786
|
+
const foundSection = this.group.sections.find((section) => section.name === name);
|
|
1787
|
+
if (!foundSection) {
|
|
1788
|
+
throw new Error(`Section with name "${name}" not found in group "${this.group.name}".`);
|
|
2011
1789
|
}
|
|
2012
|
-
return new
|
|
1790
|
+
return new AXPSettingDefinitionSectionBuilder(this, foundSection);
|
|
2013
1791
|
}
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
1792
|
+
addGroup(name, title, description, icon) {
|
|
1793
|
+
const newGroup = {
|
|
1794
|
+
name,
|
|
1795
|
+
title,
|
|
1796
|
+
description: description,
|
|
1797
|
+
icon,
|
|
1798
|
+
groups: [],
|
|
1799
|
+
sections: [],
|
|
1800
|
+
};
|
|
1801
|
+
this.group.groups.push(newGroup);
|
|
1802
|
+
if (this.context.hasGroup(name)) {
|
|
1803
|
+
throw new Error(`Group with name "${name}" already exists.`);
|
|
1804
|
+
}
|
|
1805
|
+
this.context['groupMap'].set(name, newGroup);
|
|
1806
|
+
return new AXPSettingDefinitionGroupBuilder(this.context, newGroup);
|
|
1807
|
+
}
|
|
1808
|
+
endGroup() {
|
|
2031
1809
|
return this.context;
|
|
2032
1810
|
}
|
|
2033
1811
|
}
|
|
2034
|
-
class
|
|
2035
|
-
constructor(
|
|
2036
|
-
this.
|
|
1812
|
+
class AXPSettingDefinitionSectionBuilder {
|
|
1813
|
+
constructor(groupBuilder, section) {
|
|
1814
|
+
this.groupBuilder = groupBuilder;
|
|
1815
|
+
this.section = section;
|
|
2037
1816
|
}
|
|
2038
|
-
|
|
2039
|
-
|
|
1817
|
+
addSetting(setting) {
|
|
1818
|
+
const newSetting = {
|
|
1819
|
+
name: setting.key,
|
|
1820
|
+
title: setting.title,
|
|
1821
|
+
description: setting.description,
|
|
1822
|
+
isRequired: setting.isRequired ?? false,
|
|
1823
|
+
isInherited: setting.isInherited ?? false,
|
|
1824
|
+
isEncrypted: setting.isEncrypted ?? false,
|
|
1825
|
+
defaultValue: setting.defaultValue,
|
|
1826
|
+
scope: setting.scope ?? 'G',
|
|
1827
|
+
widget: {
|
|
1828
|
+
type: setting.widget.type,
|
|
1829
|
+
name: setting.key,
|
|
1830
|
+
path: setting.key,
|
|
1831
|
+
defaultValue: setting.defaultValue,
|
|
1832
|
+
options: merge(setting.widget.options ?? {}, {
|
|
1833
|
+
label: setting.widget.options?.['label'] ?? setting.title,
|
|
1834
|
+
validationRules: setting.validationRules ?? [],
|
|
1835
|
+
}),
|
|
1836
|
+
valueTransforms: setting.valueTransforms,
|
|
1837
|
+
triggers: setting.widget.triggers,
|
|
1838
|
+
},
|
|
1839
|
+
};
|
|
1840
|
+
this.section.settings.push(newSetting);
|
|
1841
|
+
return this;
|
|
1842
|
+
}
|
|
1843
|
+
endSection() {
|
|
1844
|
+
return this.groupBuilder;
|
|
2040
1845
|
}
|
|
2041
1846
|
}
|
|
2042
1847
|
|
|
2043
1848
|
// Injection token for setting providers
|
|
2044
|
-
const
|
|
2045
|
-
class
|
|
1849
|
+
const AXP_SETTING_DEFINITION_PROVIDER = new InjectionToken('AXP_SETTING_DEFINITION_PROVIDER');
|
|
1850
|
+
class AXPSettingDefinitionProviderService {
|
|
2046
1851
|
constructor() {
|
|
2047
|
-
this.providers = inject(
|
|
1852
|
+
this.providers = inject(AXP_SETTING_DEFINITION_PROVIDER, { optional: true });
|
|
2048
1853
|
this.cache = null;
|
|
2049
1854
|
}
|
|
2050
1855
|
async load() {
|
|
2051
1856
|
if (this.cache) {
|
|
2052
1857
|
return;
|
|
2053
1858
|
}
|
|
2054
|
-
const context = new
|
|
1859
|
+
const context = new AXPSettingDefinitionProviderContext();
|
|
2055
1860
|
if (Array.isArray(this.providers)) {
|
|
2056
1861
|
for (const provider of this.providers) {
|
|
2057
|
-
|
|
1862
|
+
if (provider instanceof Promise) {
|
|
1863
|
+
// If provider is a promise, resolve it
|
|
1864
|
+
const resolvedProvider = await provider;
|
|
1865
|
+
await resolvedProvider.provide(context);
|
|
1866
|
+
}
|
|
1867
|
+
else {
|
|
1868
|
+
// If provider is a direct instance, use it directly
|
|
1869
|
+
await provider.provide(context);
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
this.cache = context.getGroups();
|
|
1874
|
+
}
|
|
1875
|
+
async getListAsync(scope) {
|
|
1876
|
+
await this.load();
|
|
1877
|
+
return this.getList(scope);
|
|
1878
|
+
}
|
|
1879
|
+
getList(scope) {
|
|
1880
|
+
if (!this.cache) {
|
|
1881
|
+
return [];
|
|
1882
|
+
}
|
|
1883
|
+
const scopeOrder = ['C', 'G', 'T', 'U']; // Scopes hierarchy in ascending order
|
|
1884
|
+
const filterByScope = (groups, currentScope) => {
|
|
1885
|
+
const currentScopeIndex = scopeOrder.indexOf(currentScope);
|
|
1886
|
+
return groups
|
|
1887
|
+
.map((group) => ({
|
|
1888
|
+
...group,
|
|
1889
|
+
sections: group.sections.map((section) => ({
|
|
1890
|
+
...section,
|
|
1891
|
+
settings: section.settings.filter((setting) => {
|
|
1892
|
+
const settingScopeIndex = scopeOrder.indexOf(setting.scope);
|
|
1893
|
+
// Include settings where:
|
|
1894
|
+
// 1. The scope matches the requested scope.
|
|
1895
|
+
if (setting.scope === currentScope)
|
|
1896
|
+
return true;
|
|
1897
|
+
// 2. The setting scope is higher (closer to 'U') and is inherited.
|
|
1898
|
+
if (setting.isInherited &&
|
|
1899
|
+
settingScopeIndex > currentScopeIndex // Higher scope
|
|
1900
|
+
) {
|
|
1901
|
+
return true;
|
|
1902
|
+
}
|
|
1903
|
+
// 3. Exclude settings with a lower or irrelevant scope.
|
|
1904
|
+
return false;
|
|
1905
|
+
}),
|
|
1906
|
+
})).filter((section) => section.settings.length > 0), // Keep only sections with settings
|
|
1907
|
+
groups: filterByScope(group.groups, currentScope), // Recursively filter nested groups
|
|
1908
|
+
}))
|
|
1909
|
+
.filter((group) => group.sections.length > 0 || group.groups.length > 0); // Keep groups with valid sections or nested groups
|
|
1910
|
+
};
|
|
1911
|
+
return filterByScope(this.cache, scope);
|
|
1912
|
+
}
|
|
1913
|
+
async defaultValues() {
|
|
1914
|
+
const defaults = {};
|
|
1915
|
+
const collectDefaults = (groups) => {
|
|
1916
|
+
groups.forEach((group) => {
|
|
1917
|
+
group.sections.forEach((section) => {
|
|
1918
|
+
section.settings.forEach((setting) => {
|
|
1919
|
+
if (setting.defaultValue !== undefined) {
|
|
1920
|
+
defaults[setting.name] = setting.defaultValue;
|
|
1921
|
+
}
|
|
1922
|
+
});
|
|
1923
|
+
});
|
|
1924
|
+
collectDefaults(group.groups);
|
|
1925
|
+
});
|
|
1926
|
+
};
|
|
1927
|
+
if (!this.cache) {
|
|
1928
|
+
await this.load();
|
|
1929
|
+
}
|
|
1930
|
+
collectDefaults(this.cache);
|
|
1931
|
+
return defaults;
|
|
1932
|
+
}
|
|
1933
|
+
findGroup(scope, groupName) {
|
|
1934
|
+
return this.searchRecursive(this.getList(scope), groupName, []); // Initialize with an empty breadcrumb
|
|
1935
|
+
}
|
|
1936
|
+
searchRecursive(groups, groupName, breadcrumb) {
|
|
1937
|
+
for (const group of groups) {
|
|
1938
|
+
const currentBreadcrumb = [...breadcrumb, { name: group.name, title: group.title, description: group.description }];
|
|
1939
|
+
// If the group name matches, return its details
|
|
1940
|
+
if (group.name === groupName) {
|
|
1941
|
+
return {
|
|
1942
|
+
breadcrumb: currentBreadcrumb,
|
|
1943
|
+
sections: group.sections.length > 0 ? group.sections : null,
|
|
1944
|
+
groups: group.groups.length > 0 ? group.groups : null,
|
|
1945
|
+
};
|
|
1946
|
+
}
|
|
1947
|
+
// Recursively search in nested groups
|
|
1948
|
+
const nestedResult = this.searchRecursive(group.groups, groupName, currentBreadcrumb);
|
|
1949
|
+
if (nestedResult.breadcrumb.length > 0) {
|
|
1950
|
+
return nestedResult;
|
|
2058
1951
|
}
|
|
2059
1952
|
}
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
1953
|
+
// If no matching group is found
|
|
1954
|
+
return {
|
|
1955
|
+
breadcrumb: [],
|
|
1956
|
+
groups: [],
|
|
1957
|
+
sections: []
|
|
1958
|
+
};
|
|
1959
|
+
}
|
|
1960
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1961
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, providedIn: 'root' }); }
|
|
1962
|
+
}
|
|
1963
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingDefinitionProviderService, decorators: [{
|
|
1964
|
+
type: Injectable,
|
|
1965
|
+
args: [{ providedIn: 'root' }]
|
|
1966
|
+
}] });
|
|
1967
|
+
class AXPSettingDefaultValueProvider {
|
|
1968
|
+
constructor() {
|
|
1969
|
+
this.definitionProvider = inject(AXPSettingDefinitionProviderService);
|
|
1970
|
+
}
|
|
1971
|
+
get scope() {
|
|
1972
|
+
return AXPSettingScope.Global;
|
|
1973
|
+
}
|
|
1974
|
+
async load() {
|
|
1975
|
+
return Object.entries(await this.definitionProvider.defaultValues()).map(c => ({ key: c[0], value: c[1] }));
|
|
1976
|
+
}
|
|
1977
|
+
set(key, value) {
|
|
1978
|
+
throw new Error('Method not implemented.');
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
const AXP_SETTING_VALUE_PROVIDER = new InjectionToken('AXP_SETTING_VALUE_PROVIDER', {
|
|
1983
|
+
providedIn: 'root',
|
|
1984
|
+
factory: () => {
|
|
1985
|
+
return [
|
|
1986
|
+
//new AXPSettingDefaultValueProvider(),
|
|
1987
|
+
new AXPSettingValueProviderDefault(AXPSettingScope.Tenant),
|
|
1988
|
+
new AXPSettingValueProviderDefault(AXPSettingScope.User)
|
|
1989
|
+
];
|
|
1990
|
+
}
|
|
1991
|
+
});
|
|
1992
|
+
class AXPSettingValueProviderDefault {
|
|
1993
|
+
get scope() {
|
|
1994
|
+
return this._scope;
|
|
1995
|
+
}
|
|
1996
|
+
constructor(_scope) {
|
|
1997
|
+
this._scope = _scope;
|
|
1998
|
+
this.cache = new Map();
|
|
1999
|
+
this.localStorageKey = `AXP_SETTINGS_SCOPE(${this.scope})`;
|
|
2000
|
+
}
|
|
2001
|
+
async load() {
|
|
2002
|
+
// Load settings from localStorage as a single key
|
|
2003
|
+
const storedSettings = localStorage.getItem(this.localStorageKey);
|
|
2004
|
+
if (storedSettings) {
|
|
2005
|
+
const parsedSettings = JSON.parse(storedSettings);
|
|
2006
|
+
Object.entries(parsedSettings).forEach(([key, value]) => {
|
|
2007
|
+
this.cache.set(key, value);
|
|
2008
|
+
});
|
|
2009
|
+
return Promise.resolve(Array.from(this.cache.entries()).map(c => ({ key: c[0], value: c[1] })));
|
|
2010
|
+
}
|
|
2011
|
+
return Promise.resolve([]);
|
|
2065
2012
|
}
|
|
2066
|
-
|
|
2067
|
-
if (
|
|
2068
|
-
|
|
2013
|
+
async set(keyOrValues, value) {
|
|
2014
|
+
if (typeof keyOrValues === 'string') {
|
|
2015
|
+
// Single value update
|
|
2016
|
+
this.cache.set(keyOrValues, value);
|
|
2069
2017
|
}
|
|
2070
2018
|
else {
|
|
2071
|
-
|
|
2019
|
+
// Bulk update
|
|
2020
|
+
for (const [key, val] of Object.entries(keyOrValues)) {
|
|
2021
|
+
this.cache.set(key, val);
|
|
2022
|
+
}
|
|
2072
2023
|
}
|
|
2024
|
+
await this.saveToLocalStorage();
|
|
2073
2025
|
}
|
|
2074
|
-
|
|
2075
|
-
const
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2026
|
+
async saveToLocalStorage() {
|
|
2027
|
+
const settingsObject = {};
|
|
2028
|
+
this.cache.forEach((value, key) => {
|
|
2029
|
+
settingsObject[key] = value;
|
|
2030
|
+
});
|
|
2031
|
+
localStorage.setItem(this.localStorageKey, JSON.stringify(settingsObject));
|
|
2080
2032
|
}
|
|
2081
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2082
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, providedIn: 'root' }); }
|
|
2083
2033
|
}
|
|
2084
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchDefinitionProviderService, decorators: [{
|
|
2085
|
-
type: Injectable,
|
|
2086
|
-
args: [{ providedIn: 'root' }]
|
|
2087
|
-
}] });
|
|
2088
2034
|
|
|
2089
|
-
|
|
2090
|
-
const AXP_SEARCH_PROVIDER = new InjectionToken('AXP_SEARCH_PROVIDER');
|
|
2091
|
-
class AXPSearchService {
|
|
2035
|
+
class AXPSettingService {
|
|
2092
2036
|
constructor() {
|
|
2093
|
-
this.providers = inject(
|
|
2094
|
-
|
|
2037
|
+
this.providers = inject(AXP_SETTING_VALUE_PROVIDER);
|
|
2038
|
+
//private readonly definitionService = inject(AXPSettingDefinitionProviderService);
|
|
2039
|
+
this.injector = inject(Injector);
|
|
2040
|
+
this.scopedSettingsCache = new Map();
|
|
2041
|
+
this.onChanged = new Subject();
|
|
2042
|
+
// Initialize scoped caches for dynamic scopes
|
|
2043
|
+
const staticScopes = [AXPSettingScope.Environment, AXPSettingScope.Global, AXPSettingScope.Tenant, AXPSettingScope.User];
|
|
2044
|
+
staticScopes.forEach((scope) => {
|
|
2045
|
+
if (!this.scopedSettingsCache.has(scope)) {
|
|
2046
|
+
this.scopedSettingsCache.set(scope, new Map());
|
|
2047
|
+
}
|
|
2048
|
+
});
|
|
2095
2049
|
}
|
|
2096
|
-
async
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2050
|
+
async load() {
|
|
2051
|
+
try {
|
|
2052
|
+
const settingsList = [];
|
|
2053
|
+
for (const provider of this.providers) {
|
|
2054
|
+
const scopeCache = this.scopedSettingsCache.get(provider.scope);
|
|
2055
|
+
const providerSettings = await provider.load();
|
|
2056
|
+
providerSettings.forEach((setting) => {
|
|
2057
|
+
scopeCache.set(setting.key, setting.value);
|
|
2058
|
+
});
|
|
2059
|
+
settingsList.push(...providerSettings);
|
|
2060
|
+
}
|
|
2061
|
+
return settingsList;
|
|
2100
2062
|
}
|
|
2101
|
-
|
|
2102
|
-
|
|
2063
|
+
catch (error) {
|
|
2064
|
+
console.error('Error loading settings', error);
|
|
2065
|
+
throw error;
|
|
2103
2066
|
}
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
icon: result.icon ?? definition.icon,
|
|
2117
|
-
data: result.data,
|
|
2118
|
-
actions: definition.actions,
|
|
2119
|
-
description: result.description,
|
|
2120
|
-
parent: result.parent,
|
|
2121
|
-
});
|
|
2122
|
-
}
|
|
2123
|
-
catch (e) {
|
|
2124
|
-
console.error(e);
|
|
2067
|
+
}
|
|
2068
|
+
async get(key) {
|
|
2069
|
+
if (this.scopedSettingsCache.size === 0) {
|
|
2070
|
+
await this.load();
|
|
2071
|
+
}
|
|
2072
|
+
const scopeOrder = [AXPSettingScope.User, AXPSettingScope.Tenant, AXPSettingScope.Global, AXPSettingScope.Environment];
|
|
2073
|
+
for (const scope of scopeOrder) {
|
|
2074
|
+
const scopeCache = this.scopedSettingsCache.get(scope);
|
|
2075
|
+
if (scopeCache && scopeCache.has(key)) {
|
|
2076
|
+
const value = scopeCache.get(key);
|
|
2077
|
+
if (value !== undefined && value !== null) {
|
|
2078
|
+
return cloneDeep(value);
|
|
2125
2079
|
}
|
|
2126
2080
|
}
|
|
2127
2081
|
}
|
|
2128
|
-
|
|
2129
|
-
const
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2082
|
+
const definitionService = this.injector.get(AXPSettingDefinitionProviderService);
|
|
2083
|
+
const defaults = await definitionService.defaultValues();
|
|
2084
|
+
return get(defaults, key); // Fallback if no value is found
|
|
2085
|
+
}
|
|
2086
|
+
async defaultValues(scope) {
|
|
2087
|
+
let scopeOrder = [AXPSettingScope.Environment, AXPSettingScope.Global, AXPSettingScope.Tenant, AXPSettingScope.User].reverse();
|
|
2088
|
+
const scopeIndex = scopeOrder.indexOf(scope);
|
|
2089
|
+
if (scopeIndex === -1) {
|
|
2090
|
+
throw new Error(`Invalid scope: ${scope}`);
|
|
2091
|
+
}
|
|
2092
|
+
scopeOrder = scopeOrder.slice(scopeIndex + 1);
|
|
2093
|
+
// Accumulate defaults from the current scope and higher scopes
|
|
2094
|
+
const accumulatedDefaults = {};
|
|
2095
|
+
for (let i = scopeIndex; i < scopeOrder.length; i++) {
|
|
2096
|
+
const currentScope = scopeOrder[i];
|
|
2097
|
+
const scopeCache = this.scopedSettingsCache.get(currentScope);
|
|
2098
|
+
if (scopeCache) {
|
|
2099
|
+
scopeCache.forEach((value, key) => {
|
|
2100
|
+
if (!(key in accumulatedDefaults)) {
|
|
2101
|
+
accumulatedDefaults[key] = value;
|
|
2102
|
+
}
|
|
2103
|
+
});
|
|
2141
2104
|
}
|
|
2142
|
-
groupMap[groupName].children.push(omit(item, ['definitionName', 'definitionTitle']));
|
|
2143
2105
|
}
|
|
2144
|
-
|
|
2106
|
+
// Merge with global default values from the definition service
|
|
2107
|
+
const definitionService = this.injector.get(AXPSettingDefinitionProviderService);
|
|
2108
|
+
const globalDefaults = await definitionService.defaultValues();
|
|
2109
|
+
return { ...globalDefaults, ...accumulatedDefaults };
|
|
2145
2110
|
}
|
|
2146
|
-
|
|
2147
|
-
|
|
2111
|
+
scope(scope) {
|
|
2112
|
+
const provider = this.providers.find((p) => p.scope === scope);
|
|
2113
|
+
if (!provider) {
|
|
2114
|
+
throw new Error(`No provider found for scope: ${scope}`);
|
|
2115
|
+
}
|
|
2116
|
+
return new ScopedSettingService(this, provider, this.onChanged, this.scopedSettingsCache.get(scope));
|
|
2117
|
+
}
|
|
2118
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2119
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingService, providedIn: 'root' }); }
|
|
2148
2120
|
}
|
|
2149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type:
|
|
2121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingService, decorators: [{
|
|
2150
2122
|
type: Injectable,
|
|
2151
|
-
args: [{
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
options: {},
|
|
2162
|
-
},
|
|
2163
|
-
type: 'view',
|
|
2164
|
-
priority: 'primary',
|
|
2165
|
-
},
|
|
2166
|
-
]);
|
|
2123
|
+
args: [{
|
|
2124
|
+
providedIn: 'root',
|
|
2125
|
+
}]
|
|
2126
|
+
}], ctorParameters: () => [] });
|
|
2127
|
+
class ScopedSettingService {
|
|
2128
|
+
constructor(parent, provider, onChanged, scopeCache) {
|
|
2129
|
+
this.parent = parent;
|
|
2130
|
+
this.provider = provider;
|
|
2131
|
+
this.onChanged = onChanged;
|
|
2132
|
+
this.scopeCache = scopeCache;
|
|
2167
2133
|
}
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
this.settingService = inject(AXPSettingDefinitionProviderService);
|
|
2134
|
+
async get(key) {
|
|
2135
|
+
const settings = await this.provider.load();
|
|
2136
|
+
const setting = settings.find((s) => s.key === key);
|
|
2137
|
+
return setting ? cloneDeep(setting.value) : undefined;
|
|
2173
2138
|
}
|
|
2174
|
-
async
|
|
2175
|
-
const
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2139
|
+
async all() {
|
|
2140
|
+
const settings = await this.provider.load();
|
|
2141
|
+
return Object.fromEntries(settings.map((s) => [s.key, cloneDeep(s.value)]));
|
|
2142
|
+
}
|
|
2143
|
+
async defaultValues() {
|
|
2144
|
+
return this.parent.defaultValues(this.provider.scope);
|
|
2145
|
+
}
|
|
2146
|
+
async set(keyOrValues, value) {
|
|
2147
|
+
if (typeof keyOrValues === 'string') {
|
|
2148
|
+
// Single key-value pair
|
|
2149
|
+
await this.provider.set(keyOrValues, value);
|
|
2150
|
+
this.scopeCache.set(keyOrValues, value); // Sync the cache
|
|
2151
|
+
this.onChanged.next({
|
|
2152
|
+
scope: this.provider.scope,
|
|
2153
|
+
keys: [keyOrValues],
|
|
2154
|
+
values: { [keyOrValues]: value },
|
|
2155
|
+
entries: [{ key: keyOrValues, value }],
|
|
2156
|
+
});
|
|
2157
|
+
}
|
|
2158
|
+
else {
|
|
2159
|
+
// Multiple key-value pairs
|
|
2160
|
+
await this.provider.set(keyOrValues);
|
|
2161
|
+
Object.entries(keyOrValues).forEach(([key, val]) => this.scopeCache.set(key, val)); // Sync the cache
|
|
2162
|
+
const entries = Object.entries(keyOrValues).map(([key, val]) => ({ key, value: val }));
|
|
2163
|
+
this.onChanged.next({
|
|
2164
|
+
scope: this.provider.scope,
|
|
2165
|
+
keys: Object.keys(keyOrValues),
|
|
2166
|
+
values: keyOrValues,
|
|
2167
|
+
entries,
|
|
2168
|
+
});
|
|
2191
2169
|
}
|
|
2192
|
-
// Step 3: Search settings by title
|
|
2193
|
-
const searchResults = allSettings.filter((setting) => setting.title.toLowerCase().includes(text.toLowerCase()));
|
|
2194
|
-
return sortBy(searchResults.map((setting) => ({
|
|
2195
|
-
title: setting.title,
|
|
2196
|
-
description: setting.description,
|
|
2197
|
-
name: 'setting',
|
|
2198
|
-
data: setting,
|
|
2199
|
-
parent: setting.group
|
|
2200
|
-
? {
|
|
2201
|
-
title: setting.group.title,
|
|
2202
|
-
data: setting.group,
|
|
2203
|
-
}
|
|
2204
|
-
: undefined,
|
|
2205
|
-
})), ['title']);
|
|
2206
2170
|
}
|
|
2207
2171
|
}
|
|
2208
2172
|
|
|
@@ -2273,6 +2237,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2273
2237
|
type: Injectable
|
|
2274
2238
|
}] });
|
|
2275
2239
|
|
|
2240
|
+
class AXPWorkflowRouterNavigateAction extends AXPWorkflowAction {
|
|
2241
|
+
constructor() {
|
|
2242
|
+
super(...arguments);
|
|
2243
|
+
this.router = inject(Router);
|
|
2244
|
+
}
|
|
2245
|
+
async execute(context) {
|
|
2246
|
+
const command = context.getVariable();
|
|
2247
|
+
const path = command.options.path;
|
|
2248
|
+
if (path.toLowerCase().startsWith('http') || command.options?.extras?.target === 'blank') {
|
|
2249
|
+
window.open(path, '_blank');
|
|
2250
|
+
}
|
|
2251
|
+
else {
|
|
2252
|
+
const [basePathAndFragment, queryString] = path.split('?');
|
|
2253
|
+
const [basePath, fragment] = basePathAndFragment.split('#'); // Extract fragment if present
|
|
2254
|
+
const queryParams = this.parseQueryParams(queryString);
|
|
2255
|
+
this.router.navigate([basePath], {
|
|
2256
|
+
...command.options.extras,
|
|
2257
|
+
queryParams, // Pass query parameters separately
|
|
2258
|
+
fragment, // Pass fragment explicitly
|
|
2259
|
+
});
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
/**
|
|
2263
|
+
* Parses query parameters from a query string into an object.
|
|
2264
|
+
*/
|
|
2265
|
+
parseQueryParams(queryString) {
|
|
2266
|
+
if (!queryString)
|
|
2267
|
+
return undefined;
|
|
2268
|
+
return queryString
|
|
2269
|
+
.split('&')
|
|
2270
|
+
.map(pair => pair.split('='))
|
|
2271
|
+
.reduce((params, [key, value]) => {
|
|
2272
|
+
params[decodeURIComponent(key)] = decodeURIComponent(value);
|
|
2273
|
+
return params;
|
|
2274
|
+
}, {});
|
|
2275
|
+
}
|
|
2276
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowRouterNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2277
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowRouterNavigateAction }); }
|
|
2278
|
+
}
|
|
2279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowRouterNavigateAction, decorators: [{
|
|
2280
|
+
type: Injectable
|
|
2281
|
+
}] });
|
|
2282
|
+
const AXPNavigateWorkflow = {
|
|
2283
|
+
startStepId: 'start',
|
|
2284
|
+
steps: {
|
|
2285
|
+
'start': {
|
|
2286
|
+
action: 'navigate-router',
|
|
2287
|
+
},
|
|
2288
|
+
},
|
|
2289
|
+
};
|
|
2290
|
+
|
|
2276
2291
|
class AXMWorkflowErrorHandler {
|
|
2277
2292
|
constructor() {
|
|
2278
2293
|
this.dialog = inject(AXDialogService);
|
|
@@ -2333,17 +2348,6 @@ class AXPCommonModule {
|
|
|
2333
2348
|
instances.forEach((f) => {
|
|
2334
2349
|
f();
|
|
2335
2350
|
});
|
|
2336
|
-
// appInitService.registerTask({
|
|
2337
|
-
// name: 'Modules',
|
|
2338
|
-
// statusText: 'Initializing Modules ...',
|
|
2339
|
-
// run: () =>
|
|
2340
|
-
// new Promise<void>((resolve) => {
|
|
2341
|
-
// setTimeout(() => {
|
|
2342
|
-
// resolve();
|
|
2343
|
-
// }, 250);
|
|
2344
|
-
// }),
|
|
2345
|
-
// });
|
|
2346
|
-
//
|
|
2347
2351
|
appInitService.registerTask({
|
|
2348
2352
|
name: 'Settings',
|
|
2349
2353
|
statusText: 'Loading Settings ...',
|
|
@@ -2361,8 +2365,8 @@ class AXPCommonModule {
|
|
|
2361
2365
|
},
|
|
2362
2366
|
});
|
|
2363
2367
|
}
|
|
2364
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, deps: [{ token: 'AXPCommonModuleFactory' }, { token: AXPAppStartUpService }, { token:
|
|
2365
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, imports: [
|
|
2368
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, deps: [{ token: 'AXPCommonModuleFactory' }, { token: AXPAppStartUpService }, { token: AXPSettingService }, { token: AXPDataSeederService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2369
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, imports: [i4.AXPWorkflowModule, AXPopupModule,
|
|
2366
2370
|
AXDateTimeModule,
|
|
2367
2371
|
AXToastModule], exports: [RouterModule] }); }
|
|
2368
2372
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, providers: [
|
|
@@ -2379,33 +2383,25 @@ class AXPCommonModule {
|
|
|
2379
2383
|
provide: AXPFilterOperatorMiddlewareService,
|
|
2380
2384
|
useClass: AXPFilterOperatorMiddlewareServiceImpl,
|
|
2381
2385
|
},
|
|
2382
|
-
{
|
|
2383
|
-
provide: AXP_SEARCH_PROVIDER,
|
|
2384
|
-
useClass: AXPSettingSearchProvider,
|
|
2385
|
-
multi: true,
|
|
2386
|
-
},
|
|
2387
2386
|
{
|
|
2388
2387
|
provide: AXP_SEARCH_PROVIDER,
|
|
2389
2388
|
useClass: AXPMenuSearchProvider,
|
|
2390
2389
|
multi: true,
|
|
2391
2390
|
},
|
|
2392
|
-
{
|
|
2393
|
-
provide: AXP_SEARCH_DEFINITION_PROVIDER,
|
|
2394
|
-
useClass: AXPSettingSearchDefinitionProvider,
|
|
2395
|
-
multi: true,
|
|
2396
|
-
},
|
|
2397
2391
|
{
|
|
2398
2392
|
provide: AXP_SEARCH_DEFINITION_PROVIDER,
|
|
2399
2393
|
useClass: AXPMenuSearchDefinitionProvider,
|
|
2400
2394
|
multi: true,
|
|
2401
2395
|
},
|
|
2402
|
-
], imports: [
|
|
2403
|
-
AXPWorkflowModule.forChild({
|
|
2396
|
+
], imports: [AXPWorkflowModule.forChild({
|
|
2404
2397
|
actions: {
|
|
2405
|
-
navigate:
|
|
2398
|
+
'navigate-router': AXPWorkflowRouterNavigateAction,
|
|
2406
2399
|
'show-prompt-dialog': AXPDialogConfirmAction,
|
|
2407
2400
|
'show-toast': AXPToastAction,
|
|
2408
2401
|
},
|
|
2402
|
+
workflows: {
|
|
2403
|
+
'navigate': AXPNavigateWorkflow
|
|
2404
|
+
}
|
|
2409
2405
|
}),
|
|
2410
2406
|
AXPopupModule,
|
|
2411
2407
|
AXDateTimeModule,
|
|
@@ -2415,13 +2411,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2415
2411
|
type: NgModule,
|
|
2416
2412
|
args: [{
|
|
2417
2413
|
imports: [
|
|
2418
|
-
EffectsModule.forFeature([AXPCommonEffects]),
|
|
2419
2414
|
AXPWorkflowModule.forChild({
|
|
2420
2415
|
actions: {
|
|
2421
|
-
navigate:
|
|
2416
|
+
'navigate-router': AXPWorkflowRouterNavigateAction,
|
|
2422
2417
|
'show-prompt-dialog': AXPDialogConfirmAction,
|
|
2423
2418
|
'show-toast': AXPToastAction,
|
|
2424
2419
|
},
|
|
2420
|
+
workflows: {
|
|
2421
|
+
'navigate': AXPNavigateWorkflow
|
|
2422
|
+
}
|
|
2425
2423
|
}),
|
|
2426
2424
|
AXPopupModule,
|
|
2427
2425
|
AXDateTimeModule,
|
|
@@ -2442,21 +2440,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2442
2440
|
provide: AXPFilterOperatorMiddlewareService,
|
|
2443
2441
|
useClass: AXPFilterOperatorMiddlewareServiceImpl,
|
|
2444
2442
|
},
|
|
2445
|
-
{
|
|
2446
|
-
provide: AXP_SEARCH_PROVIDER,
|
|
2447
|
-
useClass: AXPSettingSearchProvider,
|
|
2448
|
-
multi: true,
|
|
2449
|
-
},
|
|
2450
2443
|
{
|
|
2451
2444
|
provide: AXP_SEARCH_PROVIDER,
|
|
2452
2445
|
useClass: AXPMenuSearchProvider,
|
|
2453
2446
|
multi: true,
|
|
2454
2447
|
},
|
|
2455
|
-
{
|
|
2456
|
-
provide: AXP_SEARCH_DEFINITION_PROVIDER,
|
|
2457
|
-
useClass: AXPSettingSearchDefinitionProvider,
|
|
2458
|
-
multi: true,
|
|
2459
|
-
},
|
|
2460
2448
|
{
|
|
2461
2449
|
provide: AXP_SEARCH_DEFINITION_PROVIDER,
|
|
2462
2450
|
useClass: AXPMenuSearchDefinitionProvider,
|
|
@@ -2467,7 +2455,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2467
2455
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2468
2456
|
type: Inject,
|
|
2469
2457
|
args: ['AXPCommonModuleFactory']
|
|
2470
|
-
}] }, { type: AXPAppStartUpService }, { type:
|
|
2458
|
+
}] }, { type: AXPAppStartUpService }, { type: AXPSettingService }, { type: AXPDataSeederService }] });
|
|
2471
2459
|
|
|
2472
2460
|
const ENVIRONMENT = new InjectionToken('ENVIRONMENT');
|
|
2473
2461
|
const AXP_PLATFORM_CONFIG_TOKEN = new InjectionToken('AXP_PLATFORM_CONFIG_TOKEN', {
|
|
@@ -2528,9 +2516,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2528
2516
|
}]
|
|
2529
2517
|
}] });
|
|
2530
2518
|
|
|
2519
|
+
const AXPSignOutAction = createAction('[SignOut] Action');
|
|
2520
|
+
const AXPSignInAction = createAction('[SignIn] Action');
|
|
2521
|
+
|
|
2531
2522
|
/**
|
|
2532
2523
|
* Generated bundle index. Do not edit.
|
|
2533
2524
|
*/
|
|
2534
2525
|
|
|
2535
|
-
export { ALL_DEFAULT_OPERATORS, AXMEntityCrudService, AXMEntityCrudServiceImpl, AXMWorkflowErrorHandler, AXPAppStartUpProvider, AXPAppStartUpService, AXPClipBoardService,
|
|
2526
|
+
export { ALL_DEFAULT_OPERATORS, AXMEntityCrudService, AXMEntityCrudServiceImpl, AXMWorkflowErrorHandler, AXPAppStartUpProvider, AXPAppStartUpService, AXPClipBoardService, AXPCommonModule, AXPComponentLogoConfig, AXPComponentSlotDirective, AXPComponentSlotLoaderService, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataGenerator, AXPDataProvider, AXPDataSeederService, AXPDexieEntityStorageService, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityQueryType, AXPEntityStorageService, AXPErrorHandlerRegistryService, AXPFileStorageService, AXPFileStorageStatus, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFiltersProviderService, AXPFontIconLogoConfig, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPGridLayoutDirective, AXPImageUrlLogoConfig, AXPLogoComponent, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPdfPageSize, AXPPdfService, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRelationshipCardinality, AXPRelationshipKind, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValueProvider, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingScope, AXPSettingService, AXPSignInAction, AXPSignOutAction, AXPStickyDirective, AXPTextLogoConfig, AXPToastAction, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_DATA_SEEDER_TOKEN, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, configPlatform, getEntityInfo, resolveActionLook };
|
|
2536
2527
|
//# sourceMappingURL=acorex-platform-common.mjs.map
|