@acorex/platform 19.1.8 → 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 +2 -2
- package/common/lib/layout/menu/menu.types.d.ts +2 -1
- package/common/lib/search/search-definition.builder.d.ts +5 -2
- package/common/lib/search/search.provider.d.ts +1 -1
- 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/workflows/navigate.workflow.d.ts +4 -0
- package/fesm2022/acorex-platform-common.mjs +105 -126
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +1 -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 +107 -62
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-search.mjs +76 -17
- 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 +1236 -832
- 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 +1 -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/search-definition-command.provider.d.ts +4 -0
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +1 -1
- package/layout/search/lib/search.viewmodel.d.ts +17 -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 +9 -9
- 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 +7 -0
- package/themes/shared/lib/components/layout-elements/layout-list.component.d.ts +3 -3
- package/widgets/lib/widgets/index.d.ts +1 -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 +6 -3
- 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 +23 -12
- package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget.type.d.ts +4 -2
- package/widgets/lib/widgets/property-editors/property-editor-helper.d.ts +2 -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/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BUL6ti4U.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-search-popup.component-BiKt6Mvr.mjs +0 -84
- package/fesm2022/acorex-platform-themes-default-search-popup.component-BiKt6Mvr.mjs.map +0 -1
- package/layout/entity/lib/search.provider.d.ts +0 -4
|
@@ -169,6 +169,10 @@ export interface AXPEntity {
|
|
|
169
169
|
individual: string;
|
|
170
170
|
plural: string;
|
|
171
171
|
lookup?: string;
|
|
172
|
+
searchResult?: {
|
|
173
|
+
title: string;
|
|
174
|
+
description?: string;
|
|
175
|
+
};
|
|
172
176
|
};
|
|
173
177
|
relatedEntities?: AXPRelatedEntity[];
|
|
174
178
|
groups?: AXPEntityPropertyGroup[];
|
|
@@ -2,7 +2,7 @@ import { ModuleWithProviders } from '@angular/core';
|
|
|
2
2
|
import { AXPAppStartUpService } from './app/app-startup.service';
|
|
3
3
|
import { AXPDataSeederService } from './data';
|
|
4
4
|
import { AXPErrorHandler } from './errors';
|
|
5
|
-
import {
|
|
5
|
+
import { AXPSettingService } from './settings';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
import * as i1 from "@acorex/platform/workflow";
|
|
8
8
|
import * as i2 from "@acorex/components/popup";
|
|
@@ -18,7 +18,7 @@ export declare class AXPCommonModule {
|
|
|
18
18
|
/**
|
|
19
19
|
* @ignore
|
|
20
20
|
*/
|
|
21
|
-
constructor(instances: any[], appInitService: AXPAppStartUpService, settingsService:
|
|
21
|
+
constructor(instances: any[], appInitService: AXPAppStartUpService, settingsService: AXPSettingService, seederService: AXPDataSeederService);
|
|
22
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPCommonModule, never>;
|
|
23
23
|
static ɵmod: i0.ɵɵNgModuleDeclaration<AXPCommonModule, never, [typeof i1.AXPWorkflowModule, typeof i2.AXPopupModule, typeof i3.AXDateTimeModule, typeof i4.AXToastModule], [typeof i5.RouterModule]>;
|
|
24
24
|
static ɵinj: i0.ɵɵInjectorDeclaration<AXPCommonModule>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { AXPNavigateActionCommand } from
|
|
1
|
+
import { AXPNavigateActionCommand } from '@acorex/platform/core';
|
|
2
2
|
export interface AXPMenuItem {
|
|
3
3
|
text: string;
|
|
4
4
|
type?: 'menu' | 'group';
|
|
5
5
|
name?: string;
|
|
6
|
+
description?: string;
|
|
6
7
|
icon?: string;
|
|
7
8
|
priority?: number;
|
|
8
9
|
opened?: boolean;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { AXPSearchAction, AXPSearchDefinition } from './search.types';
|
|
1
|
+
import { AXPSearchAction, AXPSearchDefinition, AXPSearchDefinitionDisplayFormat } from './search.types';
|
|
2
2
|
export declare class AXPSearchDefinitionProviderContext {
|
|
3
3
|
private definitions;
|
|
4
4
|
private definitionMap;
|
|
5
|
-
addDefinition(name: string, title: string, icon: string,
|
|
5
|
+
addDefinition(name: string, title: string, icon: string, order: number, options?: {
|
|
6
|
+
format?: AXPSearchDefinitionDisplayFormat;
|
|
7
|
+
actions?: AXPSearchAction[];
|
|
8
|
+
}): AXPSearchDefinitionBuilder;
|
|
6
9
|
definition(name: string): AXPSearchDefinitionBuilder | null;
|
|
7
10
|
getDefinitions(): AXPSearchDefinition[];
|
|
8
11
|
hasEntity(name: string): boolean;
|
|
@@ -2,7 +2,7 @@ import { AXPSearchResult } from './search.types';
|
|
|
2
2
|
export interface AXPSearchProvider {
|
|
3
3
|
search(text: string): Promise<AXPSearchResult[]>;
|
|
4
4
|
}
|
|
5
|
-
export declare abstract class
|
|
5
|
+
export declare abstract class AXPSearchCommandProvider {
|
|
6
6
|
abstract commands: AXPSearchResult[];
|
|
7
7
|
search(text: string): Promise<AXPSearchResult[]>;
|
|
8
8
|
}
|
|
@@ -6,6 +6,7 @@ export declare const AXP_SEARCH_PROVIDER: InjectionToken<AXPSearchProvider[]>;
|
|
|
6
6
|
export declare class AXPSearchService {
|
|
7
7
|
private providers;
|
|
8
8
|
private definitionService;
|
|
9
|
+
private formatService;
|
|
9
10
|
search(text: string): Promise<AXPSearchDisplayGroupResult[]>;
|
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPSearchService, never>;
|
|
11
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXPSearchService>;
|
|
@@ -1,28 +1,43 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AXPCommandActionLook, AXPCommandActionPriority, AXPCommandActionType } from '../app';
|
|
2
|
+
export interface AXPSearchDefinitionDisplayFormat {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
}
|
|
2
8
|
export interface AXPSearchDefinition {
|
|
3
9
|
name: string;
|
|
4
10
|
title: string;
|
|
5
11
|
icon: string;
|
|
12
|
+
order: number;
|
|
13
|
+
format: AXPSearchDefinitionDisplayFormat;
|
|
6
14
|
actions: AXPSearchAction[];
|
|
7
15
|
}
|
|
8
16
|
export interface AXPSearchParentResult {
|
|
9
17
|
title: string;
|
|
10
18
|
data?: any;
|
|
11
19
|
}
|
|
20
|
+
export type AXPSearchCommands = {
|
|
21
|
+
[name: string]: any;
|
|
22
|
+
};
|
|
12
23
|
export interface AXPSearchResult {
|
|
13
|
-
|
|
14
|
-
|
|
24
|
+
id?: string;
|
|
25
|
+
group: string;
|
|
26
|
+
data?: any;
|
|
27
|
+
title?: string;
|
|
15
28
|
description?: string;
|
|
16
29
|
icon?: string;
|
|
17
|
-
|
|
30
|
+
commands?: AXPSearchCommands;
|
|
18
31
|
parent?: AXPSearchParentResult;
|
|
19
32
|
}
|
|
20
33
|
export interface AXPSearchDisplayGroupResult {
|
|
21
34
|
name: string;
|
|
22
35
|
title: string;
|
|
36
|
+
order: number;
|
|
23
37
|
children: AXPSearchDisplayResult[];
|
|
24
38
|
}
|
|
25
39
|
export interface AXPSearchDisplayResult {
|
|
40
|
+
id: string;
|
|
26
41
|
definitionName?: string;
|
|
27
42
|
definitionTitle?: string;
|
|
28
43
|
name: string;
|
|
@@ -30,12 +45,13 @@ export interface AXPSearchDisplayResult {
|
|
|
30
45
|
description?: string;
|
|
31
46
|
icon: string;
|
|
32
47
|
data?: any;
|
|
48
|
+
order?: any;
|
|
49
|
+
commands?: AXPSearchCommands;
|
|
33
50
|
parent?: AXPSearchParentResult;
|
|
34
51
|
actions: AXPSearchAction[];
|
|
35
52
|
}
|
|
36
53
|
export interface AXPSearchAction extends Partial<AXPCommandActionLook> {
|
|
37
54
|
name: string;
|
|
38
|
-
command: AXPCommandActionCallback;
|
|
39
55
|
type: AXPCommandActionType;
|
|
40
56
|
priority: AXPCommandActionPriority;
|
|
41
57
|
separated?: boolean;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { Subject } from 'rxjs';
|
|
2
2
|
import { AXPSettingChangedEvent, AXPSettingScope, AXPSettingValue, AXPSettingValueProvider } from './settings.types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export
|
|
4
|
+
export interface AXPSettingServiceInterface {
|
|
5
|
+
load(): Promise<AXPSettingValue[]>;
|
|
6
|
+
get<T = any>(key: string): Promise<T>;
|
|
7
|
+
defaultValues(scope: AXPSettingScope): Promise<Record<string, unknown>>;
|
|
8
|
+
scope(scope: AXPSettingScope): ScopedSettingService;
|
|
9
|
+
}
|
|
10
|
+
export declare class AXPSettingService implements AXPSettingServiceInterface {
|
|
5
11
|
private readonly providers;
|
|
6
|
-
private readonly
|
|
12
|
+
private readonly injector;
|
|
7
13
|
private scopedSettingsCache;
|
|
8
14
|
readonly onChanged: Subject<AXPSettingChangedEvent>;
|
|
9
15
|
constructor();
|
|
@@ -11,15 +17,15 @@ export declare class AXPSettingValueProviderService {
|
|
|
11
17
|
get<T = any>(key: string): Promise<T>;
|
|
12
18
|
defaultValues(scope: AXPSettingScope): Promise<Record<string, unknown>>;
|
|
13
19
|
scope(scope: AXPSettingScope): ScopedSettingService;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPSettingService, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPSettingService>;
|
|
16
22
|
}
|
|
17
23
|
declare class ScopedSettingService {
|
|
18
24
|
private parent;
|
|
19
25
|
private provider;
|
|
20
26
|
private onChanged;
|
|
21
27
|
private scopeCache;
|
|
22
|
-
constructor(parent:
|
|
28
|
+
constructor(parent: AXPSettingService, provider: AXPSettingValueProvider, onChanged: Subject<AXPSettingChangedEvent>, scopeCache: Map<string, any>);
|
|
23
29
|
get<T = any>(key: string): Promise<T>;
|
|
24
30
|
all(): Promise<any>;
|
|
25
31
|
defaultValues(): Promise<Record<string, unknown>>;
|
|
@@ -3,6 +3,10 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
export declare class AXPWorkflowRouterNavigateAction extends AXPWorkflowAction {
|
|
4
4
|
private router;
|
|
5
5
|
execute(context: AXPWorkflowContext): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* Parses query parameters from a query string into an object.
|
|
8
|
+
*/
|
|
9
|
+
private parseQueryParams;
|
|
6
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowRouterNavigateAction, never>;
|
|
7
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowRouterNavigateAction>;
|
|
8
12
|
}
|
|
@@ -18,6 +18,7 @@ import { CommonModule } from '@angular/common';
|
|
|
18
18
|
import { signalStore, withState, withMethods, patchState, withHooks } from '@ngrx/signals';
|
|
19
19
|
import { AXTranslationService } from '@acorex/core/translation';
|
|
20
20
|
import { Store, createAction } from '@ngrx/store';
|
|
21
|
+
import { AXFormatService } from '@acorex/core/format';
|
|
21
22
|
import { Subject } from 'rxjs';
|
|
22
23
|
import { AXDialogService } from '@acorex/components/dialog';
|
|
23
24
|
|
|
@@ -1345,10 +1346,10 @@ withMethods((store, router = inject(Router), workflow = inject(AXPWorkflowServic
|
|
|
1345
1346
|
},
|
|
1346
1347
|
executeCommand(item) {
|
|
1347
1348
|
if (item.path) {
|
|
1348
|
-
workflow.execute('navigate', {
|
|
1349
|
+
workflow.execute('navigate', { type: 'router', options: { path: item.path } });
|
|
1349
1350
|
}
|
|
1350
1351
|
if (item.command) {
|
|
1351
|
-
workflow.execute('navigate',
|
|
1352
|
+
workflow.execute('navigate', item.command);
|
|
1352
1353
|
}
|
|
1353
1354
|
patchState(store, { selectedMenuItem: { item, isFullMatch: true } });
|
|
1354
1355
|
},
|
|
@@ -1379,17 +1380,18 @@ withMethods((store, router = inject(Router), workflow = inject(AXPWorkflowServic
|
|
|
1379
1380
|
|
|
1380
1381
|
class AXPMenuSearchDefinitionProvider {
|
|
1381
1382
|
async provide(context) {
|
|
1382
|
-
context.addDefinition('menu', 'Menu', 'fa-thin fa-bars',
|
|
1383
|
-
{
|
|
1384
|
-
|
|
1385
|
-
command: {
|
|
1386
|
-
name: 'view',
|
|
1387
|
-
options: {},
|
|
1388
|
-
},
|
|
1389
|
-
type: 'view',
|
|
1390
|
-
priority: 'primary',
|
|
1383
|
+
context.addDefinition('menu', 'Menu', 'fa-thin fa-bars', 2, {
|
|
1384
|
+
format: {
|
|
1385
|
+
id: '{{data.name}}',
|
|
1391
1386
|
},
|
|
1392
|
-
|
|
1387
|
+
actions: [
|
|
1388
|
+
{
|
|
1389
|
+
name: 'navigate',
|
|
1390
|
+
type: 'view',
|
|
1391
|
+
priority: 'primary',
|
|
1392
|
+
},
|
|
1393
|
+
],
|
|
1394
|
+
});
|
|
1393
1395
|
}
|
|
1394
1396
|
}
|
|
1395
1397
|
|
|
@@ -1401,26 +1403,23 @@ class AXPMenuSearchProvider {
|
|
|
1401
1403
|
async search(text) {
|
|
1402
1404
|
const menuItems = await this.searchMenuItems(await this.menuService.items(), text);
|
|
1403
1405
|
return sortBy(menuItems.map((item) => ({
|
|
1404
|
-
|
|
1406
|
+
group: 'menu', // Use `name` or empty string if undefined
|
|
1405
1407
|
title: item.text, // Use `text` for the `title`
|
|
1406
1408
|
icon: item.icon, // Include the `icon` if present
|
|
1407
|
-
data:
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
}
|
|
1417
|
-
}
|
|
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
1418
|
},
|
|
1419
1419
|
},
|
|
1420
1420
|
parent: item.parent
|
|
1421
1421
|
? {
|
|
1422
1422
|
title: item.parent.text,
|
|
1423
|
-
data: item.parent,
|
|
1424
1423
|
}
|
|
1425
1424
|
: undefined,
|
|
1426
1425
|
})), [(o) => this.translateService.translateSync(o.title)]);
|
|
@@ -1504,12 +1503,19 @@ class AXPSearchDefinitionProviderContext {
|
|
|
1504
1503
|
this.definitions = [];
|
|
1505
1504
|
this.definitionMap = new Map();
|
|
1506
1505
|
}
|
|
1507
|
-
addDefinition(name, title, icon,
|
|
1506
|
+
addDefinition(name, title, icon, order, options) {
|
|
1508
1507
|
const definitionSearch = {
|
|
1509
1508
|
name,
|
|
1510
1509
|
title,
|
|
1511
1510
|
icon,
|
|
1512
|
-
|
|
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 ?? [],
|
|
1513
1519
|
};
|
|
1514
1520
|
this.definitions.push(definitionSearch);
|
|
1515
1521
|
this.definitionMap.set(name, definitionSearch); // Index by name
|
|
@@ -1542,7 +1548,6 @@ class AXPSearchDefinitionBuilder {
|
|
|
1542
1548
|
const newAction = {
|
|
1543
1549
|
name,
|
|
1544
1550
|
type: 'view',
|
|
1545
|
-
command: '',
|
|
1546
1551
|
priority: 'primary',
|
|
1547
1552
|
};
|
|
1548
1553
|
this.definition.actions.push(newAction);
|
|
@@ -1630,7 +1635,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
1630
1635
|
args: [{ providedIn: 'root' }]
|
|
1631
1636
|
}] });
|
|
1632
1637
|
|
|
1633
|
-
class
|
|
1638
|
+
class AXPSearchCommandProvider {
|
|
1634
1639
|
async search(text) {
|
|
1635
1640
|
return this.commands.filter((command) => command.title.toLowerCase().includes(text.toLowerCase()));
|
|
1636
1641
|
}
|
|
@@ -1642,6 +1647,7 @@ class AXPSearchService {
|
|
|
1642
1647
|
constructor() {
|
|
1643
1648
|
this.providers = inject(AXP_SEARCH_PROVIDER, { optional: true });
|
|
1644
1649
|
this.definitionService = inject(AXPSearchDefinitionProviderService);
|
|
1650
|
+
this.formatService = inject(AXFormatService);
|
|
1645
1651
|
}
|
|
1646
1652
|
async search(text) {
|
|
1647
1653
|
//TODO better handle this
|
|
@@ -1657,21 +1663,33 @@ class AXPSearchService {
|
|
|
1657
1663
|
for (const resultArray of results) {
|
|
1658
1664
|
for (const result of resultArray) {
|
|
1659
1665
|
try {
|
|
1660
|
-
const definition = this.definitionService.findDefinition(result.
|
|
1666
|
+
const definition = this.definitionService.findDefinition(result.group);
|
|
1661
1667
|
mergeData.push({
|
|
1662
1668
|
definitionName: definition.name,
|
|
1663
1669
|
definitionTitle: definition.title,
|
|
1664
|
-
name: result.
|
|
1665
|
-
|
|
1666
|
-
|
|
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),
|
|
1667
1684
|
data: result.data,
|
|
1685
|
+
commands: result.commands,
|
|
1668
1686
|
actions: definition.actions,
|
|
1669
|
-
description: result.description,
|
|
1670
1687
|
parent: result.parent,
|
|
1688
|
+
order: definition.order,
|
|
1671
1689
|
});
|
|
1672
1690
|
}
|
|
1673
1691
|
catch (e) {
|
|
1674
|
-
console.error(e);
|
|
1692
|
+
//console.error(e);
|
|
1675
1693
|
}
|
|
1676
1694
|
}
|
|
1677
1695
|
}
|
|
@@ -1685,12 +1703,15 @@ class AXPSearchService {
|
|
|
1685
1703
|
groupMap[groupName] = {
|
|
1686
1704
|
name: groupName,
|
|
1687
1705
|
title: item.definitionTitle, // You can adjust the title logic if needed
|
|
1706
|
+
order: item.order, // Add order to the group
|
|
1688
1707
|
children: [],
|
|
1689
1708
|
};
|
|
1690
1709
|
groupedData.push(groupMap[groupName]);
|
|
1691
1710
|
}
|
|
1692
|
-
groupMap[groupName].children.push(omit(item, ['definitionName', 'definitionTitle']));
|
|
1711
|
+
groupMap[groupName].children.push(omit(item, ['definitionName', 'definitionTitle', 'order']));
|
|
1693
1712
|
}
|
|
1713
|
+
// Sort groups by order
|
|
1714
|
+
groupedData.sort((a, b) => a.order - b.order);
|
|
1694
1715
|
return groupedData;
|
|
1695
1716
|
}
|
|
1696
1717
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSearchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -1838,7 +1859,15 @@ class AXPSettingDefinitionProviderService {
|
|
|
1838
1859
|
const context = new AXPSettingDefinitionProviderContext();
|
|
1839
1860
|
if (Array.isArray(this.providers)) {
|
|
1840
1861
|
for (const provider of this.providers) {
|
|
1841
|
-
|
|
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
|
+
}
|
|
1842
1871
|
}
|
|
1843
1872
|
}
|
|
1844
1873
|
this.cache = context.getGroups();
|
|
@@ -2003,10 +2032,11 @@ class AXPSettingValueProviderDefault {
|
|
|
2003
2032
|
}
|
|
2004
2033
|
}
|
|
2005
2034
|
|
|
2006
|
-
class
|
|
2035
|
+
class AXPSettingService {
|
|
2007
2036
|
constructor() {
|
|
2008
2037
|
this.providers = inject(AXP_SETTING_VALUE_PROVIDER);
|
|
2009
|
-
|
|
2038
|
+
//private readonly definitionService = inject(AXPSettingDefinitionProviderService);
|
|
2039
|
+
this.injector = inject(Injector);
|
|
2010
2040
|
this.scopedSettingsCache = new Map();
|
|
2011
2041
|
this.onChanged = new Subject();
|
|
2012
2042
|
// Initialize scoped caches for dynamic scopes
|
|
@@ -2049,7 +2079,8 @@ class AXPSettingValueProviderService {
|
|
|
2049
2079
|
}
|
|
2050
2080
|
}
|
|
2051
2081
|
}
|
|
2052
|
-
const
|
|
2082
|
+
const definitionService = this.injector.get(AXPSettingDefinitionProviderService);
|
|
2083
|
+
const defaults = await definitionService.defaultValues();
|
|
2053
2084
|
return get(defaults, key); // Fallback if no value is found
|
|
2054
2085
|
}
|
|
2055
2086
|
async defaultValues(scope) {
|
|
@@ -2073,7 +2104,8 @@ class AXPSettingValueProviderService {
|
|
|
2073
2104
|
}
|
|
2074
2105
|
}
|
|
2075
2106
|
// Merge with global default values from the definition service
|
|
2076
|
-
const
|
|
2107
|
+
const definitionService = this.injector.get(AXPSettingDefinitionProviderService);
|
|
2108
|
+
const globalDefaults = await definitionService.defaultValues();
|
|
2077
2109
|
return { ...globalDefaults, ...accumulatedDefaults };
|
|
2078
2110
|
}
|
|
2079
2111
|
scope(scope) {
|
|
@@ -2083,10 +2115,10 @@ class AXPSettingValueProviderService {
|
|
|
2083
2115
|
}
|
|
2084
2116
|
return new ScopedSettingService(this, provider, this.onChanged, this.scopedSettingsCache.get(scope));
|
|
2085
2117
|
}
|
|
2086
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type:
|
|
2087
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type:
|
|
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' }); }
|
|
2088
2120
|
}
|
|
2089
|
-
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: [{
|
|
2090
2122
|
type: Injectable,
|
|
2091
2123
|
args: [{
|
|
2092
2124
|
providedIn: 'root',
|
|
@@ -2138,61 +2170,6 @@ class ScopedSettingService {
|
|
|
2138
2170
|
}
|
|
2139
2171
|
}
|
|
2140
2172
|
|
|
2141
|
-
class AXPSettingSearchDefinitionProvider {
|
|
2142
|
-
async provide(context) {
|
|
2143
|
-
context.addDefinition('setting', 'Setting', 'fa-solid fa-gear', [
|
|
2144
|
-
{
|
|
2145
|
-
name: 'open',
|
|
2146
|
-
command: {
|
|
2147
|
-
name: 'view',
|
|
2148
|
-
options: {},
|
|
2149
|
-
},
|
|
2150
|
-
type: 'view',
|
|
2151
|
-
priority: 'primary',
|
|
2152
|
-
},
|
|
2153
|
-
]);
|
|
2154
|
-
}
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2157
|
-
class AXPSettingSearchProvider {
|
|
2158
|
-
constructor() {
|
|
2159
|
-
this.settingService = inject(AXPSettingDefinitionProviderService);
|
|
2160
|
-
}
|
|
2161
|
-
async search(text) {
|
|
2162
|
-
const groupsSetting = this.settingService.getList(AXPSettingScope.User);
|
|
2163
|
-
if (groupsSetting.length == 0) {
|
|
2164
|
-
groupsSetting.push(...(await this.settingService.getListAsync(AXPSettingScope.User)));
|
|
2165
|
-
}
|
|
2166
|
-
// Step 2: Flatten settings from groups
|
|
2167
|
-
const allSettings = [];
|
|
2168
|
-
const extractSettings = (group) => {
|
|
2169
|
-
for (const section of group.sections) {
|
|
2170
|
-
allSettings.push(...section.settings.map((x) => ({ ...x, group })));
|
|
2171
|
-
}
|
|
2172
|
-
for (const subGroup of group.groups) {
|
|
2173
|
-
extractSettings(subGroup); // Recursive extraction
|
|
2174
|
-
}
|
|
2175
|
-
};
|
|
2176
|
-
for (const group of groupsSetting) {
|
|
2177
|
-
extractSettings(group);
|
|
2178
|
-
}
|
|
2179
|
-
// Step 3: Search settings by title
|
|
2180
|
-
const searchResults = allSettings.filter((setting) => setting.title.toLowerCase().includes(text.toLowerCase()));
|
|
2181
|
-
return sortBy(searchResults.map((setting) => ({
|
|
2182
|
-
title: setting.title,
|
|
2183
|
-
description: setting.description,
|
|
2184
|
-
name: 'setting',
|
|
2185
|
-
data: setting,
|
|
2186
|
-
parent: setting.group
|
|
2187
|
-
? {
|
|
2188
|
-
title: setting.group.title,
|
|
2189
|
-
data: setting.group,
|
|
2190
|
-
}
|
|
2191
|
-
: undefined,
|
|
2192
|
-
})), ['title']);
|
|
2193
|
-
}
|
|
2194
|
-
}
|
|
2195
|
-
|
|
2196
2173
|
//TODO Loading, Redirect, Drawer, Show toast
|
|
2197
2174
|
const AXPRedirectEvent = createWorkFlowEvent('Redirect Event Fired');
|
|
2198
2175
|
const AXPRefreshEvent = createWorkFlowEvent('Refresh Event Fired');
|
|
@@ -2266,14 +2243,36 @@ class AXPWorkflowRouterNavigateAction extends AXPWorkflowAction {
|
|
|
2266
2243
|
this.router = inject(Router);
|
|
2267
2244
|
}
|
|
2268
2245
|
async execute(context) {
|
|
2269
|
-
const command = context.getVariable(
|
|
2270
|
-
|
|
2271
|
-
|
|
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');
|
|
2272
2250
|
}
|
|
2273
2251
|
else {
|
|
2274
|
-
|
|
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
|
+
});
|
|
2275
2260
|
}
|
|
2276
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
|
+
}
|
|
2277
2276
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowRouterNavigateAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2278
2277
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWorkflowRouterNavigateAction }); }
|
|
2279
2278
|
}
|
|
@@ -2366,7 +2365,7 @@ class AXPCommonModule {
|
|
|
2366
2365
|
},
|
|
2367
2366
|
});
|
|
2368
2367
|
}
|
|
2369
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, deps: [{ token: 'AXPCommonModuleFactory' }, { token: AXPAppStartUpService }, { token:
|
|
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 }); }
|
|
2370
2369
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPCommonModule, imports: [i4.AXPWorkflowModule, AXPopupModule,
|
|
2371
2370
|
AXDateTimeModule,
|
|
2372
2371
|
AXToastModule], exports: [RouterModule] }); }
|
|
@@ -2384,21 +2383,11 @@ class AXPCommonModule {
|
|
|
2384
2383
|
provide: AXPFilterOperatorMiddlewareService,
|
|
2385
2384
|
useClass: AXPFilterOperatorMiddlewareServiceImpl,
|
|
2386
2385
|
},
|
|
2387
|
-
{
|
|
2388
|
-
provide: AXP_SEARCH_PROVIDER,
|
|
2389
|
-
useClass: AXPSettingSearchProvider,
|
|
2390
|
-
multi: true,
|
|
2391
|
-
},
|
|
2392
2386
|
{
|
|
2393
2387
|
provide: AXP_SEARCH_PROVIDER,
|
|
2394
2388
|
useClass: AXPMenuSearchProvider,
|
|
2395
2389
|
multi: true,
|
|
2396
2390
|
},
|
|
2397
|
-
{
|
|
2398
|
-
provide: AXP_SEARCH_DEFINITION_PROVIDER,
|
|
2399
|
-
useClass: AXPSettingSearchDefinitionProvider,
|
|
2400
|
-
multi: true,
|
|
2401
|
-
},
|
|
2402
2391
|
{
|
|
2403
2392
|
provide: AXP_SEARCH_DEFINITION_PROVIDER,
|
|
2404
2393
|
useClass: AXPMenuSearchDefinitionProvider,
|
|
@@ -2451,21 +2440,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2451
2440
|
provide: AXPFilterOperatorMiddlewareService,
|
|
2452
2441
|
useClass: AXPFilterOperatorMiddlewareServiceImpl,
|
|
2453
2442
|
},
|
|
2454
|
-
{
|
|
2455
|
-
provide: AXP_SEARCH_PROVIDER,
|
|
2456
|
-
useClass: AXPSettingSearchProvider,
|
|
2457
|
-
multi: true,
|
|
2458
|
-
},
|
|
2459
2443
|
{
|
|
2460
2444
|
provide: AXP_SEARCH_PROVIDER,
|
|
2461
2445
|
useClass: AXPMenuSearchProvider,
|
|
2462
2446
|
multi: true,
|
|
2463
2447
|
},
|
|
2464
|
-
{
|
|
2465
|
-
provide: AXP_SEARCH_DEFINITION_PROVIDER,
|
|
2466
|
-
useClass: AXPSettingSearchDefinitionProvider,
|
|
2467
|
-
multi: true,
|
|
2468
|
-
},
|
|
2469
2448
|
{
|
|
2470
2449
|
provide: AXP_SEARCH_DEFINITION_PROVIDER,
|
|
2471
2450
|
useClass: AXPMenuSearchDefinitionProvider,
|
|
@@ -2476,7 +2455,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2476
2455
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2477
2456
|
type: Inject,
|
|
2478
2457
|
args: ['AXPCommonModuleFactory']
|
|
2479
|
-
}] }, { type: AXPAppStartUpService }, { type:
|
|
2458
|
+
}] }, { type: AXPAppStartUpService }, { type: AXPSettingService }, { type: AXPDataSeederService }] });
|
|
2480
2459
|
|
|
2481
2460
|
const ENVIRONMENT = new InjectionToken('ENVIRONMENT');
|
|
2482
2461
|
const AXP_PLATFORM_CONFIG_TOKEN = new InjectionToken('AXP_PLATFORM_CONFIG_TOKEN', {
|
|
@@ -2544,5 +2523,5 @@ const AXPSignInAction = createAction('[SignIn] Action');
|
|
|
2544
2523
|
* Generated bundle index. Do not edit.
|
|
2545
2524
|
*/
|
|
2546
2525
|
|
|
2547
|
-
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 };
|
|
2548
2527
|
//# sourceMappingURL=acorex-platform-common.mjs.map
|