@acorex-platform/module-platform-management-client 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-V_ao4WVM.mjs +4599 -0
- package/fesm2022/acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-V_ao4WVM.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts.mjs +179 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.command-2Qu7aoCp.mjs +1542 -0
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.command-2Qu7aoCp.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.types-DdygAori.mjs +71 -0
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.types-DdygAori.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-customize-menu.command-2319iHsD.mjs +231 -0
- package/fesm2022/acorex-platform-module-platform-management-client-customize-menu.command-2319iHsD.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-CJVpqPmY.mjs +52 -0
- package/fesm2022/acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-CJVpqPmY.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs +55 -0
- package/fesm2022/acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-execute-token.command-DNuHR-0y.mjs +152 -0
- package/fesm2022/acorex-platform-module-platform-management-client-execute-token.command-DNuHR-0y.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-catalog-scopes.query-ByhDTWE6.mjs +71 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-catalog-scopes.query-ByhDTWE6.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-editor-widgets.query-DITPMmbw.mjs +68 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-editor-widgets.query-DITPMmbw.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-2oHMITw-.mjs +194 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-2oHMITw-.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-DjStd3a8.mjs +136 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-DjStd3a8.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-registered-queries.query-C-IfkTel.mjs +122 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-registered-queries.query-C-IfkTel.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-menu-list.component-C5HH5-Dw.mjs +524 -0
- package/fesm2022/acorex-platform-module-platform-management-client-menu-list.component-C5HH5-Dw.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-platform-console-charts.queries-CQ34R13-.mjs +216 -0
- package/fesm2022/acorex-platform-module-platform-management-client-platform-console-charts.queries-CQ34R13-.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs +81 -0
- package/fesm2022/acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-platform-console-kpi.queries-BkPdhVq_.mjs +137 -0
- package/fesm2022/acorex-platform-module-platform-management-client-platform-console-kpi.queries-BkPdhVq_.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-CYb2zOSj.mjs +45 -0
- package/fesm2022/acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-CYb2zOSj.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-BBwrzcXa.mjs +178 -0
- package/fesm2022/acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-BBwrzcXa.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-DBlZVz6u.mjs +45 -0
- package/fesm2022/acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-DBlZVz6u.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client.mjs +2 -0
- package/fesm2022/acorex-platform-module-platform-management-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-platform-management-client-contracts.d.ts +258 -0
- package/types/acorex-platform-module-platform-management-client.d.ts +548 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-customize-menu.command-2319iHsD.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/menu-management/components/menu-customizer-popup/menu-customizer-popup.component.ts","../../../../libs/modules/platform-management/client/src/lib/features/menu-management/commands/customize-menu.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPActionMenuItem, AXPExecuteCommand } from '@acorex-platform/framework-shared/core';\nimport { AXTreeViewDragArea, AXTreeViewDragBehavior } from '@acorex/components/tree-view';\nimport { AXTranslationModule } from '@acorex/core/translation';\n\nimport { AXPMenuCustomizerComponent, AXPThemeLayoutBlockComponent } from '@acorex-platform/framework-client/layout/components';\nimport {\n AXPPopupLayoutBase,\n AXPPopupLayoutBaseComponent,\n AXPPopupLayoutComponent,\n} from '@acorex-platform/framework-client/layout/views';\n\nimport { Component, computed, signal, viewChild, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';\n\n//#endregion\n\n//#region ---- Menu Customizer Popup Component ----\n\n/**\n * Popup wrapper for the menu customizer component.\n * Provides a popup layout with actions for managing menu customizations.\n *\n * Pass the following data when opening the popup:\n * - scopeKey: string - The scope key for menu customizations\n * - showToolbar?: boolean - Whether to show the toolbar (default: true)\n * - allowAddItems?: boolean - Whether to allow adding items (default: true)\n * - dragBehavior?: AXTreeViewDragBehavior - Drag behavior (default: 'move')\n * - dragArea?: AXTreeViewDragArea - Drag area (default: 'handler')\n */\n@Component({\n selector: 'axp-menu-customizer-popup',\n template: `\n <axp-popup-layout>\n <axp-page-content>\n @if (isReady()) {\n <axp-menu-customizer\n [scopeKey]=\"scopeKey()\"\n [showToolbar]=\"showToolbar()\"\n [allowAddItems]=\"allowAddItems()\"\n [dragBehavior]=\"dragBehavior()\"\n [dragArea]=\"dragArea()\"\n (saved)=\"onSaved()\"\n (cancelled)=\"onCancelled()\"\n ></axp-menu-customizer>\n }\n </axp-page-content>\n </axp-popup-layout>\n `,\n imports: [\n AXTranslationModule,\n AXPPopupLayoutComponent,\n AXPThemeLayoutBlockComponent,\n AXPMenuCustomizerComponent\n],\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXPPopupLayoutBase,\n useExisting: AXPMenuCustomizerPopupComponent,\n },\n ],\n changeDetection: ChangeDetectionStrategy.Eager,\n host: { class: 'axp-menu-customizer-popup' },\n})\nexport class AXPMenuCustomizerPopupComponent extends AXPPopupLayoutBaseComponent {\n //#region ---- Component State ----\n\n /** Reference to the menu customizer component */\n protected menuCustomizer = viewChild(AXPMenuCustomizerComponent);\n\n /** The scope key for menu customizations (set by popup service) */\n scopeKey = signal<string>('');\n\n /** Whether to show the toolbar */\n showToolbar = signal<boolean>(true);\n\n /** Whether to allow adding custom items */\n allowAddItems = signal<boolean>(true);\n\n /** Drag behavior for the tree view */\n dragBehavior = signal<AXTreeViewDragBehavior>('both');\n\n /** Drag area for the tree view */\n dragArea = signal<AXTreeViewDragArea>('handler');\n\n /** Whether the component is ready to render (scopeKey is set) */\n protected isReady = computed(() => this.scopeKey() !== '');\n\n //#endregion\n\n //#region ---- Lifecycle Methods ----\n\n override async ngOnInit(): Promise<void> {\n await super.ngOnInit();\n // Popup-specific initialization can go here\n }\n\n //#endregion\n\n //#region ---- UI Handlers ----\n\n /**\n * Returns the primary menu items for the popup layout.\n */\n protected override getPrimaryMenuItems(): AXPActionMenuItem[] | Promise<AXPActionMenuItem[]> {\n return [\n {\n title: '@general:actions.close.title',\n icon: 'fa-solid fa-xmark',\n command: {\n name: 'close',\n },\n },\n ];\n }\n\n /**\n * Handles when changes are saved\n */\n protected onSaved(): void {\n this.close(true);\n }\n\n /**\n * Handles when customization is cancelled\n */\n protected onCancelled(): void {\n this.close(false);\n }\n\n /**\n * Executes popup commands\n */\n override execute(command: AXPExecuteCommand): void | Promise<void> {\n if (command.name === 'close') {\n this.close(false);\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPopupService } from '@acorex/components/popup';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPCommonSettings, AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport {\n AXPCommand,\n entityActionDataRecord,\n resolveEntityActionCommandInput,\n type AXPCommandExecuteResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport { inject, Injectable, signal } from '@angular/core';\n\nimport { AXPMenuCustomizerPopupComponent } from '../components/menu-customizer-popup/menu-customizer-popup.component';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface AXMCustomizeMenuCommandOptions {\n scopePrefix?: string;\n title?: string;\n showToolbar?: boolean;\n allowAddItems?: boolean;\n dragBehavior?: 'none' | 'move' | 'copy' | 'both';\n dragArea?: 'node' | 'handler';\n}\n\nexport interface AXMCustomizeMenuCommandInput {\n data?: Record<string, unknown>;\n options?: AXMCustomizeMenuCommandOptions;\n}\n\n//#endregion\n\n//#region ---- Helpers ----\n\nfunction resolveCustomizeMenuInput(input: AXMCustomizeMenuCommandInput = {}) {\n const resolved = resolveEntityActionCommandInput(input);\n const data = (entityActionDataRecord(resolved.data) ?? {}) as Record<string, unknown>;\n const options = (resolved.options ?? {}) as AXMCustomizeMenuCommandOptions;\n\n return { data, options };\n}\n\n//#endregion\n\n//#region ---- Customize menu command ----\n\n/**\n * Opens the menu customizer popup for an entity scope and shows a success toast on save.\n * Replaces the former `customize-menu` workflow (popup step + success toast).\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMCustomizeMenuCommand implements AXPCommand<AXMCustomizeMenuCommandInput> {\n private readonly popupService = inject(AXPopupService);\n private readonly translateService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n\n async execute(input: AXMCustomizeMenuCommandInput = {}): AXPCommandExecuteResultPromise {\n const { data, options } = resolveCustomizeMenuInput(input);\n const entityId = data['id'];\n\n if (!entityId) {\n return {\n success: false,\n message: { text: 'Menu customizer requires entity data with an id property.' },\n };\n }\n\n const scopePrefix = options.scopePrefix ?? 'entity';\n const scopeKey = `${scopePrefix}:${String(entityId)}`;\n\n const customTitle = options.title;\n const defaultTitle = await this.translateService.translateAsync(\n '@platform-management:menu-management.components.menu-customizer-popup.title',\n );\n const entityTitle = data['title'] ?? data['name'] ?? entityId;\n const title = customTitle ?? `${defaultTitle} - ${entityTitle}`;\n\n const result = await this.popupService.open(AXPMenuCustomizerPopupComponent, {\n title,\n size: 'lg',\n data: {\n scopeKey: signal(scopeKey),\n showToolbar: signal(options.showToolbar ?? true),\n allowAddItems: signal(options.allowAddItems ?? true),\n dragBehavior: signal(options.dragBehavior ?? 'both'),\n dragArea: signal(options.dragArea ?? 'handler'),\n },\n });\n\n if (result?.data !== true) {\n return { success: true, kind: 'object', data: { saved: false } };\n }\n\n await this.showSuccessToast();\n\n return { success: true, kind: 'object', data: { saved: true } };\n }\n\n private async showSuccessToast(): Promise<void> {\n const enableOperationToasts = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enableOperationToasts) {\n return;\n }\n\n this.toastService.show({\n color: 'success',\n title: await this.translateService.translateAsync(\n '@platform-management:menu-management.messages.success.customization-saved',\n ),\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n }\n}\n\n//#endregion\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AA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cADV,MAAM,EAAA,CAAA,CAAA;;2FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AXPEntityDefinitionRegistryService, AXPEntityDataSelectorService } from '@acorex-platform/framework-client/layout/entity';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, Injectable } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region ---- Command ----
|
|
7
|
+
/**
|
|
8
|
+
* Opens the standard entity data-selector; returns selected rows for data-list header `command` actions.
|
|
9
|
+
* Registered as `PlatformManagement:DataListPickEntityItem`.
|
|
10
|
+
*/
|
|
11
|
+
class AXPDataListPickEntityItemCommand {
|
|
12
|
+
constructor() {
|
|
13
|
+
//#region ---- Services & Dependencies ----
|
|
14
|
+
this.registry = inject(AXPEntityDefinitionRegistryService);
|
|
15
|
+
this.selector = inject(AXPEntityDataSelectorService);
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ---- Execution ----
|
|
19
|
+
async execute(input) {
|
|
20
|
+
const key = input.entity?.trim() ?? '';
|
|
21
|
+
const dot = key.indexOf('.');
|
|
22
|
+
if (dot < 0 || dot === key.length - 1) {
|
|
23
|
+
return {
|
|
24
|
+
success: false,
|
|
25
|
+
message: { text: 'Invalid entity identifier' },
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const moduleName = key.slice(0, dot);
|
|
29
|
+
const entityName = key.slice(dot + 1);
|
|
30
|
+
const entity = await this.registry.resolve(moduleName, entityName);
|
|
31
|
+
const defaultTitle = typeof entity.title === 'string' ? entity.title : entity.name;
|
|
32
|
+
const result = await this.selector.open({
|
|
33
|
+
entity,
|
|
34
|
+
title: input.title ?? defaultTitle,
|
|
35
|
+
columns: input.columns,
|
|
36
|
+
});
|
|
37
|
+
const items = (result?.items ?? []);
|
|
38
|
+
if (!items.length) {
|
|
39
|
+
return { success: false };
|
|
40
|
+
}
|
|
41
|
+
return { success: true, kind: 'object', data: { items } };
|
|
42
|
+
}
|
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPDataListPickEntityItemCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
44
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPDataListPickEntityItemCommand, providedIn: 'root' }); }
|
|
45
|
+
}
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPDataListPickEntityItemCommand, decorators: [{
|
|
47
|
+
type: Injectable,
|
|
48
|
+
args: [{ providedIn: 'root' }]
|
|
49
|
+
}] });
|
|
50
|
+
|
|
51
|
+
export { AXPDataListPickEntityItemCommand };
|
|
52
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-CJVpqPmY.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-CJVpqPmY.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/commands/data-list-pick-entity-item.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\n\nimport { AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';\n\nimport { Injectable, inject } from '@angular/core';\n\n//#region ---- Types ----\n\n/** Input for {@link AXPDataListPickEntityItemCommand} (also used from data-list `headerActions` payloads). */\nexport interface AXPDataListPickEntityItemInput {\n /** Full entity key e.g. `PlatformManagement.PropertyDefinition` */\n entity: string;\n title?: string;\n columns?: string[];\n /**\n * Optional context from the host data-list (form list value and paths).\n * Commands may ignore this or use it for advanced flows.\n */\n __dataListContext?: {\n value?: unknown;\n fullPath?: string | null;\n parentPath?: string | null;\n };\n}\n\nexport interface AXPDataListPickEntityItemOutput {\n items: Record<string, unknown>[];\n}\n\n//#endregion\n\n//#region ---- Command ----\n\n/**\n * Opens the standard entity data-selector; returns selected rows for data-list header `command` actions.\n * Registered as `PlatformManagement:DataListPickEntityItem`.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXPDataListPickEntityItemCommand\n implements AXPCommand<AXPDataListPickEntityItemInput, AXPDataListPickEntityItemOutput>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly registry = inject(AXPEntityDefinitionRegistryService);\n private readonly selector = inject(AXPEntityDataSelectorService);\n\n //#endregion\n\n //#region ---- Execution ----\n\n async execute(\n input: AXPDataListPickEntityItemInput,\n ): AXPCommandExecuteResultPromise<AXPDataListPickEntityItemOutput> {\n const key = input.entity?.trim() ?? '';\n const dot = key.indexOf('.');\n if (dot < 0 || dot === key.length - 1) {\n return {\n success: false,\n message: { text: 'Invalid entity identifier' },\n };\n }\n\n const moduleName = key.slice(0, dot);\n const entityName = key.slice(dot + 1);\n const entity = await this.registry.resolve(moduleName, entityName);\n const defaultTitle = typeof entity.title === 'string' ? entity.title : entity.name;\n\n const result = await this.selector.open({\n entity,\n title: input.title ?? defaultTitle,\n columns: input.columns,\n });\n\n const items = (result?.items ?? []) as Record<string, unknown>[];\n if (!items.length) {\n return { success: false };\n }\n\n return { success: true, kind: 'object', data: { items } };\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AA8BA;AAEA;AAEA;;;AAGG;MAEU,gCAAgC,CAAA;AAD7C,IAAA,WAAA,GAAA;;AAMmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,kCAAkC,CAAC;AACrD,QAAA,IAAA,CAAA,QA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EAAE;IAC3D;8GAzCW,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,cADnB,MAAM,EAAA,CAAA,CAAA;;2FACnB,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAD5C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//#endregion
|
|
2
|
+
//#region ---- Helpers ----
|
|
3
|
+
function resolveCommandName(action) {
|
|
4
|
+
const cmd = action.command;
|
|
5
|
+
if (typeof cmd === 'object' && cmd != null && typeof cmd.name === 'string') {
|
|
6
|
+
return cmd.name.trim() || undefined;
|
|
7
|
+
}
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
function collectActionsRecursive(actions, translate, out, depth = 0) {
|
|
11
|
+
if (!actions?.length || depth > 10) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
for (const a of actions) {
|
|
15
|
+
const cmdName = resolveCommandName(a);
|
|
16
|
+
try {
|
|
17
|
+
out.push({
|
|
18
|
+
resolvedTitle: translate(a.title),
|
|
19
|
+
titleKey: a.title,
|
|
20
|
+
...(cmdName ? { commandName: cmdName } : {}),
|
|
21
|
+
...(typeof a.type === 'string' && a.type.trim().length ? { actionKind: a.type } : {}),
|
|
22
|
+
...(typeof a.scope === 'string' ? { actionScope: a.scope } : {}),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
out.push({
|
|
27
|
+
resolvedTitle: a.title,
|
|
28
|
+
titleKey: a.title,
|
|
29
|
+
...(cmdName ? { commandName: cmdName } : {}),
|
|
30
|
+
...(typeof a.type === 'string' && a.type.trim().length ? { actionKind: a.type } : {}),
|
|
31
|
+
...(typeof a.scope === 'string' ? { actionScope: a.scope } : {}),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
if (a.items?.length) {
|
|
35
|
+
collectActionsRecursive(a.items, translate, out, depth + 1);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Builds stable action labels derived from {@link AXPEntity.interfaces.master} list/single layouts.
|
|
41
|
+
*/
|
|
42
|
+
function axmSummarizeMasterUiActionsForAi(entity, translateWithFallback) {
|
|
43
|
+
const listToolbar = [];
|
|
44
|
+
const recordToolbar = [];
|
|
45
|
+
collectActionsRecursive(entity.interfaces?.master?.list?.actions, translateWithFallback, listToolbar);
|
|
46
|
+
collectActionsRecursive(entity.interfaces?.master?.single?.actions, translateWithFallback, recordToolbar);
|
|
47
|
+
return {
|
|
48
|
+
listToolbar,
|
|
49
|
+
recordToolbar,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
|
|
54
|
+
export { axmSummarizeMasterUiActionsForAi as a };
|
|
55
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/queries/entity-master-actions-for-ai.util.ts"],"sourcesContent":["import { AXPEntity, AXPEntityAction } from '@acorex-platform/framework-shared/entity';\n//#region ---- Imports ----\n\n//#endregion\n\n//#region ---- Types ----\n\n/**\n * Resolved master UI action for AI grounding — list toolbar vs detail (single) toolbar.\n */\nexport interface AXMEntityMasterActionAiSummary {\n /** User-visible caption (resolved from {@link AXPEntityAction.title} when possible). */\n resolvedTitle: string;\n /** Original entity action title (often `@scope:key`). */\n titleKey: string;\n /** Typical command key when known (see {@link AXPEntityAction.command}). */\n commandName?: string;\n /** {@link AXPEntityAction.type} (e.g. create, delete, view). */\n actionKind?: string;\n /** {@link AXPEntityAction.scope}. */\n actionScope?: string;\n}\n\n//#endregion\n\n//#region ---- Helpers ----\n\nfunction resolveCommandName(action: AXPEntityAction): string | undefined {\n const cmd = action.command;\n if (typeof cmd === 'object' && cmd != null && typeof cmd.name === 'string') {\n return cmd.name.trim() || undefined;\n }\n return undefined;\n}\n\nfunction collectActionsRecursive(\n actions: AXPEntityAction[] | undefined,\n translate: (key: string) => string,\n out: AXMEntityMasterActionAiSummary[],\n depth = 0,\n): void {\n if (!actions?.length || depth > 10) {\n return;\n }\n for (const a of actions) {\n const cmdName = resolveCommandName(a);\n try {\n out.push({\n resolvedTitle: translate(a.title),\n titleKey: a.title,\n ...(cmdName ? { commandName: cmdName } : {}),\n ...(typeof a.type === 'string' && a.type.trim().length ? { actionKind: a.type } : {}),\n ...(typeof a.scope === 'string' ? { actionScope: a.scope } : {}),\n });\n } catch {\n out.push({\n resolvedTitle: a.title,\n titleKey: a.title,\n ...(cmdName ? { commandName: cmdName } : {}),\n ...(typeof a.type === 'string' && a.type.trim().length ? { actionKind: a.type } : {}),\n ...(typeof a.scope === 'string' ? { actionScope: a.scope } : {}),\n });\n }\n if (a.items?.length) {\n collectActionsRecursive(a.items, translate, out, depth + 1);\n }\n }\n}\n\n//#endregion\n\n//#region ---- Public API ----\n\n/** Master interface list + detail (single) actions from an entity definition, for read-only grounding. */\nexport interface AXMEntityMasterUiActionsForAi {\n listToolbar: AXMEntityMasterActionAiSummary[];\n recordToolbar: AXMEntityMasterActionAiSummary[];\n}\n\n/**\n * Builds stable action labels derived from {@link AXPEntity.interfaces.master} list/single layouts.\n */\nexport function axmSummarizeMasterUiActionsForAi(\n entity: AXPEntity,\n translateWithFallback: (key: string) => string,\n): AXMEntityMasterUiActionsForAi {\n const listToolbar: AXMEntityMasterActionAiSummary[] = [];\n const recordToolbar: AXMEntityMasterActionAiSummary[] = [];\n\n collectActionsRecursive(\n entity.interfaces?.master?.list?.actions,\n translateWithFallback,\n listToolbar,\n );\n collectActionsRecursive(\n entity.interfaces?.master?.single?.actions,\n translateWithFallback,\n recordToolbar,\n );\n\n return {\n listToolbar,\n recordToolbar,\n };\n}\n\n//#endregion\n"],"names":[],"mappings":"AAuBA;AAEA;AAEA,SAAS,kBAAkB,CAAC,MAAuB,EAAA;AACjD,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO;AAC1B,IAAA,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;QAC1E,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,SAAS;IACrC;AACA,IAAA,OAAO,SAAS;AAClB;AAEA,SAAS,uBAAuB,CAC9B,OAAsC,EACtC,SAAkC,EAClC,GAAqC,EACrC,KAAK,GAAG,CAAC,EAAA;IAET,IAAI,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,GAAG,EAAE,EAAE;QAClC;IACF;AACA,IAAA,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE;AACvB,QAAA,MAAM,OAAO,GAAG,kBAAkB,CAAC,CAAC,CAAC;AACrC,QAAA,IAAI;YACF,GAAG,CAAC,IAAI,CAAC;AACP,gBAAA,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;gBACjC,QAAQ,EAAE,CAAC,CAAC,KAAK;AACjB,gBAAA,IAAI,OAAO,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;AAC5C,gBAAA,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC;gBACrF,IAAI,OAAO,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0,0 +1,152 @@
|
|
|
1
|
+
import { runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
import { AXPCommandExecutor } from '@acorex-platform/framework-client/runtime';
|
|
3
|
+
import { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';
|
|
4
|
+
import { AXToastService } from '@acorex/components/toast';
|
|
5
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
6
|
+
import * as i0 from '@angular/core';
|
|
7
|
+
import { inject, Injectable } from '@angular/core';
|
|
8
|
+
import { AXM_TOKEN_RESOLVE_COMMAND_KEY } from '@acorex-platform/module-platform-management-client/contracts';
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ----- Execute Token Command -----
|
|
12
|
+
/**
|
|
13
|
+
* UI command: resolves token value on the server, then shows the result in a dialog.
|
|
14
|
+
*/
|
|
15
|
+
class ExecuteTokenCommand {
|
|
16
|
+
constructor() {
|
|
17
|
+
//#region ----- Services & Dependencies -----
|
|
18
|
+
this.commandExecutor = inject(AXPCommandExecutor);
|
|
19
|
+
this.layoutBuilder = inject(AXPLayoutBuilderService);
|
|
20
|
+
this.toastService = inject(AXToastService);
|
|
21
|
+
this.translationService = inject(AXTranslationService);
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region ----- Command Implementation -----
|
|
25
|
+
async execute(raw) {
|
|
26
|
+
try {
|
|
27
|
+
const input = resolveExecuteTokenInput(raw);
|
|
28
|
+
const tokenName = input.tokenName?.trim() ?? '';
|
|
29
|
+
if (!tokenName) {
|
|
30
|
+
const failedTitle = await this.translationService.translateAsync('@platform-management:tokens.messages.execute-failed.title');
|
|
31
|
+
const failedContent = await this.translationService.translateAsync('@platform-management:tokens.messages.execute-failed.content', { params: { tokenName: 'undefined' } });
|
|
32
|
+
this.toastService.show({
|
|
33
|
+
color: 'warning',
|
|
34
|
+
title: failedTitle,
|
|
35
|
+
content: failedContent,
|
|
36
|
+
closeButton: true,
|
|
37
|
+
timeOut: 5000,
|
|
38
|
+
});
|
|
39
|
+
return {
|
|
40
|
+
success: false,
|
|
41
|
+
message: { text: failedContent },
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const resolveResult = await this.commandExecutor.execute(AXM_TOKEN_RESOLVE_COMMAND_KEY, { tokenName });
|
|
45
|
+
const __d_resolveResult = runtimeCommandPayloadData(resolveResult);
|
|
46
|
+
const tokenValue = __d_resolveResult?.value;
|
|
47
|
+
const serverMessage = typeof resolveResult?.message?.text === 'string' ? resolveResult.message.text.trim() : '';
|
|
48
|
+
if (!resolveResult?.success || tokenValue === undefined || tokenValue === null) {
|
|
49
|
+
const failedTitle = await this.translationService.translateAsync('@platform-management:tokens.messages.execute-failed.title');
|
|
50
|
+
const fallbackContent = await this.translationService.translateAsync('@platform-management:tokens.messages.execute-failed.content', { params: { tokenName } });
|
|
51
|
+
// Prefer the server reason (e.g. missing expression scope) over the generic empty-value copy.
|
|
52
|
+
const failedContent = serverMessage || fallbackContent;
|
|
53
|
+
this.toastService.show({
|
|
54
|
+
color: 'warning',
|
|
55
|
+
title: failedTitle,
|
|
56
|
+
content: failedContent,
|
|
57
|
+
closeButton: true,
|
|
58
|
+
timeOut: 5000,
|
|
59
|
+
});
|
|
60
|
+
return {
|
|
61
|
+
success: false,
|
|
62
|
+
message: {
|
|
63
|
+
text: failedContent,
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const isObjectValue = tokenValue !== null && typeof tokenValue === 'object';
|
|
68
|
+
const displayValue = isObjectValue ? tokenValue : this.formatValueAsString(tokenValue);
|
|
69
|
+
const dialogTitleKey = '@platform-management:tokens.components.execute-token-dialog.title';
|
|
70
|
+
const dialogTitleBase = await this.translationService.translateAsync(dialogTitleKey);
|
|
71
|
+
const dialogTitle = `${dialogTitleBase}: ${tokenName}`;
|
|
72
|
+
await this.layoutBuilder
|
|
73
|
+
.create()
|
|
74
|
+
.dialog((dialog) => {
|
|
75
|
+
dialog
|
|
76
|
+
.setTitle(dialogTitle)
|
|
77
|
+
.setSize('lg')
|
|
78
|
+
.setCloseButton(true)
|
|
79
|
+
.content((content) => {
|
|
80
|
+
content.customWidget('json-viewer', (widget) => {
|
|
81
|
+
widget.path('value');
|
|
82
|
+
});
|
|
83
|
+
})
|
|
84
|
+
.setContext({
|
|
85
|
+
value: displayValue,
|
|
86
|
+
})
|
|
87
|
+
.setActions((actions) => {
|
|
88
|
+
actions.cancel('@general:actions.close.title');
|
|
89
|
+
});
|
|
90
|
+
})
|
|
91
|
+
.show();
|
|
92
|
+
return {
|
|
93
|
+
success: true,
|
|
94
|
+
kind: 'object',
|
|
95
|
+
data: undefined,
|
|
96
|
+
metadata: { refresh: false },
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
const errorTitle = await this.translationService.translateAsync('@platform-management:tokens.messages.execute-error.title');
|
|
101
|
+
const errorContent = await this.translationService.translateAsync('@platform-management:tokens.messages.execute-error.content', { params: { error: error.message || 'Unknown error' } });
|
|
102
|
+
this.toastService.show({
|
|
103
|
+
color: 'danger',
|
|
104
|
+
title: errorTitle,
|
|
105
|
+
content: errorContent,
|
|
106
|
+
closeButton: true,
|
|
107
|
+
timeOut: 5000,
|
|
108
|
+
});
|
|
109
|
+
return {
|
|
110
|
+
success: false,
|
|
111
|
+
message: {
|
|
112
|
+
text: errorContent,
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region ----- Utility Methods -----
|
|
119
|
+
formatValueAsString(value) {
|
|
120
|
+
if (value === null || value === undefined) {
|
|
121
|
+
return '';
|
|
122
|
+
}
|
|
123
|
+
if (typeof value === 'string') {
|
|
124
|
+
return value;
|
|
125
|
+
}
|
|
126
|
+
if (typeof value === 'object') {
|
|
127
|
+
try {
|
|
128
|
+
return JSON.stringify(value, null, 2);
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
return String(value);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return String(value);
|
|
135
|
+
}
|
|
136
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ExecuteTokenCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
137
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ExecuteTokenCommand }); }
|
|
138
|
+
}
|
|
139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ExecuteTokenCommand, decorators: [{
|
|
140
|
+
type: Injectable
|
|
141
|
+
}] });
|
|
142
|
+
function resolveExecuteTokenInput(raw) {
|
|
143
|
+
const options = raw?.options;
|
|
144
|
+
const data = raw?.data;
|
|
145
|
+
return {
|
|
146
|
+
tokenName: options?.tokenName ?? raw?.tokenName ?? data?.name ?? '',
|
|
147
|
+
tokenTitle: options?.tokenTitle ?? raw?.tokenTitle ?? data?.title,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export { ExecuteTokenCommand };
|
|
152
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-execute-token.command-DNuHR-0y.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-execute-token.command-DNuHR-0y.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/token/commands/execute-token.command.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';\nimport { AXPCommandExecutor } from '@acorex-platform/framework-client/runtime';\nimport { AXPLayoutBuilderService, IWidgetBuilder } from '@acorex-platform/framework-client/layout/builder';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { Injectable, inject } from '@angular/core';\nimport {\n AXM_TOKEN_RESOLVE_COMMAND_KEY,\n type AXMTokenResolveRequest,\n type AXMTokenResolveResult,\n} from '@acorex-platform/module-platform-management-client/contracts';\n\n//#endregion\n\n//#region ----- Command Input/Output Types -----\n\n/**\n * Input for ExecuteToken command.\n */\nexport interface ExecuteTokenCommandInput {\n /**\n * Token name to execute.\n */\n tokenName?: string;\n\n /**\n * Token title (for display).\n */\n tokenTitle?: string;\n data?: { name?: string; title?: string };\n options?: Partial<ExecuteTokenCommandInput>;\n}\n\n//#endregion\n\n//#region ----- Execute Token Command -----\n\n/**\n * UI command: resolves token value on the server, then shows the result in a dialog.\n */\n@Injectable()\nexport class ExecuteTokenCommand implements AXPCommand<ExecuteTokenCommandInput, void> {\n //#region ----- Services & Dependencies -----\n\n private readonly commandExecutor = inject(AXPCommandExecutor);\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Command Implementation -----\n\n async execute(raw: ExecuteTokenCommandInput): AXPCommandExecuteResultPromise<void> {\n try {\n const input = resolveExecuteTokenInput(raw);\n const tokenName = input.tokenName?.trim() ?? '';\n\n if (!tokenName) {\n const failedTitle = await this.translationService.translateAsync(\n '@platform-management:tokens.messages.execute-failed.title',\n );\n const failedContent = await this.translationService.translateAsync(\n '@platform-management:tokens.messages.execute-failed.content',\n { params: { tokenName: 'undefined' } },\n );\n\n this.toastService.show({\n color: 'warning',\n title: failedTitle,\n content: failedContent,\n closeButton: true,\n timeOut: 5000,\n });\n\n return {\n success: false,\n message: { text: failedContent },\n };\n }\n\n const resolveResult = await this.commandExecutor.execute<\n AXMTokenResolveRequest,\n AXMTokenResolveResult\n >(AXM_TOKEN_RESOLVE_COMMAND_KEY, { tokenName });\n\n const __d_resolveResult = runtimeCommandPayloadData(resolveResult);\n const tokenValue = __d_resolveResult?.value;\n const serverMessage =\n typeof resolveResult?.message?.text === 'string' ? resolveResult.message.text.trim() : '';\n\n if (!resolveResult?.success || tokenValue === undefined || tokenValue === null) {\n const failedTitle = await this.translationService.translateAsync(\n '@platform-management:tokens.messages.execute-failed.title',\n );\n const fallbackContent = await this.translationService.translateAsync(\n '@platform-management:tokens.messages.execute-failed.content',\n { params: { tokenName } },\n );\n // Prefer the server reason (e.g. missing expression scope) over the generic empty-value copy.\n const failedContent = serverMessage || fallbackContent;\n\n this.toastService.show({\n color: 'warning',\n title: failedTitle,\n content: failedContent,\n closeButton: true,\n timeOut: 5000,\n });\n\n return {\n success: false,\n message: {\n text: failedContent,\n },\n };\n }\n\n const isObjectValue = tokenValue !== null && typeof tokenValue === 'object';\n const displayValue = isObjectValue ? tokenValue : this.formatValueAsString(tokenValue);\n\n const dialogTitleKey = '@platform-management:tokens.components.execute-token-dialog.title';\n const dialogTitleBase = await this.translationService.translateAsync(dialogTitleKey);\n const dialogTitle = `${dialogTitleBase}: ${tokenName}`;\n\n await this.layoutBuilder\n .create()\n .dialog((dialog) => {\n dialog\n .setTitle(dialogTitle)\n .setSize('lg')\n .setCloseButton(true)\n .content((content) => {\n content.customWidget('json-viewer', (widget: IWidgetBuilder) => {\n widget.path('value');\n });\n })\n .setContext({\n value: displayValue,\n })\n .setActions((actions) => {\n actions.cancel('@general:actions.close.title');\n });\n })\n .show();\n\n return {\n success: true,\n kind: 'object',\n data: undefined,\n metadata: { refresh: false },\n };\n } catch (error: any) {\n const errorTitle = await this.translationService.translateAsync(\n '@platform-management:tokens.messages.execute-error.title',\n );\n const errorContent = await this.translationService.translateAsync(\n '@platform-management:tokens.messages.execute-error.content',\n { params: { error: error.message || 'Unknown error' } },\n );\n\n this.toastService.show({\n color: 'danger',\n title: errorTitle,\n content: errorContent,\n closeButton: true,\n timeOut: 5000,\n });\n\n return {\n success: false,\n message: {\n text: errorContent,\n },\n };\n }\n }\n\n //#endregion\n\n //#region ----- Utility Methods -----\n\n private formatValueAsString(value: any): string {\n if (value === null || value === undefined) {\n return '';\n }\n\n if (typeof value === 'string') {\n return value;\n }\n\n if (typeof value === 'object') {\n try {\n return JSON.stringify(value, null, 2);\n } catch {\n return String(value);\n }\n }\n\n return String(value);\n }\n\n //#endregion\n}\n\nfunction resolveExecuteTokenInput(raw: ExecuteTokenCommandInput): ExecuteTokenCommandInput {\n const options = raw?.options;\n const data = raw?.data;\n return {\n tokenName: options?.tokenName ?? raw?.tokenName ?? data?.name ?? '',\n tokenTitle: options?.tokenTitle ?? raw?.tokenTitle ?? data?.title,\n };\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;AAoCA;AAEA;AAEA;;AAEG;MAEU,mBAAmB,CAAA;AADhC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC/C,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AA4JnE,IAAA;;;IAtJC,MAAM,OAAO,CAAC,GAA6B,EAAA;AACzC,QAAA,IAAI;AACF,YAAA,MAAM,KAAK,GAAG,wBAAwB,CAAC,GAAG,CAAC;YAC3C,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE;YAE/C,IAAI,CAAC,SAAS,EAAE;gBACd,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAC9D,2DAA2D,CAC5D;gBACD,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAChE,6DAA6D,EAC7D,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,CACvC;AAED,gBAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;AACrB,oBAAA,KAA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AAA,CAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B;;AAqKD,SAAS,wBAAwB,CAAC,GAA6B,EAAA;AAC7D,IAAA,MAAM,OAAO,GAAG,GAAG,EAAE,OAAO;AAC5B,IAAA,MAAM,IAAI,GAAG,GAAG,EAAE,IAAI;IACtB,OAAO;AACL,QAAA,SAAS,EAAE,OAAO,EAAE,SAAS,IAAI,GAAG,EAAE,SAAS,IAAI,IAAI,EAAE,IAAI,IAAI,EAAE;QACnE,UAAU,EAAE,OAAO,EAAE,UAAU,IAAI,GAAG,EAAE,UAAU,IAAI,IAAI,EAAE,KAAK;KAClE;AACH;;;;"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { resolveCollectionSkip, resolveCollectionTake } from '@acorex-platform/framework-shared/runtime';
|
|
2
|
+
import { runtimeQuerySuccessCollection, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
|
|
3
|
+
import { AXPCatalogScopeDefinitionProviderService, applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { inject, Injectable } from '@angular/core';
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region ---- Query ----
|
|
9
|
+
/**
|
|
10
|
+
* Lists catalog-scope definitions registered with {@link AXPCatalogScopeDefinitionProviderService}.
|
|
11
|
+
* Same row shape as the former `platform-catalog-scopes` registry data source.
|
|
12
|
+
*/
|
|
13
|
+
class AXMListCatalogScopesQuery {
|
|
14
|
+
constructor() {
|
|
15
|
+
//#region ---- Services & Dependencies ----
|
|
16
|
+
this.catalogScopeRegistry = inject(AXPCatalogScopeDefinitionProviderService);
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region ---- Query Execution ----
|
|
20
|
+
async fetch(input) {
|
|
21
|
+
try {
|
|
22
|
+
const all = await this.catalogScopeRegistry.items();
|
|
23
|
+
const target = input?.target?.trim() || this.readTargetFilter(input?.filter);
|
|
24
|
+
let items = all
|
|
25
|
+
.filter((scope) => !target || scope.targets?.includes(target))
|
|
26
|
+
.map((scope) => ({
|
|
27
|
+
name: scope.name,
|
|
28
|
+
title: this.catalogScopeRegistry.resolveTitle(scope),
|
|
29
|
+
description: scope.description,
|
|
30
|
+
targets: scope.targets,
|
|
31
|
+
icon: scope.icon,
|
|
32
|
+
cssClass: scope.cssClass,
|
|
33
|
+
}));
|
|
34
|
+
if (input?.filter && this.readTargetFilter(input.filter) == null) {
|
|
35
|
+
items = applyFilterArray(items, [input.filter]);
|
|
36
|
+
}
|
|
37
|
+
const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];
|
|
38
|
+
const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'name', dir: 'asc' }];
|
|
39
|
+
items = applySortArray(items, sortOpt);
|
|
40
|
+
const skip = resolveCollectionSkip(input?.skip);
|
|
41
|
+
const take = resolveCollectionTake(input?.take);
|
|
42
|
+
const total = items.length;
|
|
43
|
+
const page = items.slice(skip, skip + take);
|
|
44
|
+
return runtimeQuerySuccessCollection({ items: page, total });
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
return runtimeQueryFailure(error instanceof Error ? error.message : 'Unknown error occurred');
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region ---- Helpers ----
|
|
52
|
+
readTargetFilter(filter) {
|
|
53
|
+
if (!filter || typeof filter !== 'object') {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
const f = filter;
|
|
57
|
+
if (f.field === 'targets' && typeof f.value === 'string' && f.value.trim()) {
|
|
58
|
+
return f.value.trim();
|
|
59
|
+
}
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListCatalogScopesQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
63
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListCatalogScopesQuery, providedIn: 'root' }); }
|
|
64
|
+
}
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListCatalogScopesQuery, decorators: [{
|
|
66
|
+
type: Injectable,
|
|
67
|
+
args: [{ providedIn: 'root' }]
|
|
68
|
+
}] });
|
|
69
|
+
|
|
70
|
+
export { AXMListCatalogScopesQuery };
|
|
71
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-list-catalog-scopes.query-ByhDTWE6.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-list-catalog-scopes.query-ByhDTWE6.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/queries/list-catalog-scopes.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport {\n applyFilterArray,\n applySortArray,\n AXPCatalogScopeDefinitionProviderService,\n type AXPCatalogScopeDefinition,\n} from '@acorex-platform/framework-client/core';\n\nimport { Injectable, inject } from '@angular/core';\n\n//#region ---- Types ----\n\nexport interface AXMListCatalogScopesQueryInput extends AXPCollectionQueryInput {\n /** Optional `Module.Entity` — keep scopes whose `targets` include this ref. */\n target?: string;\n}\n\nexport interface AXMListCatalogScopesQueryItem {\n name: string;\n title: string;\n description?: AXPCatalogScopeDefinition['description'];\n targets: string[];\n icon?: string;\n cssClass?: string;\n}\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Lists catalog-scope definitions registered with {@link AXPCatalogScopeDefinitionProviderService}.\n * Same row shape as the former `platform-catalog-scopes` registry data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListCatalogScopesQuery\n implements AXPCollectionQuery<AXMListCatalogScopesQueryInput, AXMListCatalogScopesQueryItem>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly catalogScopeRegistry = inject(AXPCatalogScopeDefinitionProviderService);\n\n //#endregion\n\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListCatalogScopesQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListCatalogScopesQueryItem> {\n try {\n const all = await this.catalogScopeRegistry.items();\n const target = input?.target?.trim() || this.readTargetFilter(input?.filter);\n\n let items: AXMListCatalogScopesQueryItem[] = all\n .filter((scope) => !target || scope.targets?.includes(target))\n .map((scope) => ({\n name: scope.name,\n title: this.catalogScopeRegistry.resolveTitle(scope),\n description: scope.description,\n targets: scope.targets,\n icon: scope.icon,\n cssClass: scope.cssClass,\n }));\n\n if (input?.filter && this.readTargetFilter(input.filter) == null) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'name' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n private readTargetFilter(filter: unknown): string | undefined {\n if (!filter || typeof filter !== 'object') {\n return undefined;\n }\n const f = filter as { field?: string; value?: unknown };\n if (f.field === 'targets' && typeof f.value === 'string' && f.value.trim()) {\n return f.value.trim();\n }\n return undefined;\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AAoCA;AAEA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CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,cADZ,MAAM,EAAA,CAAA,CAAA;;2FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { resolveCollectionSkip, resolveCollectionTake } from '@acorex-platform/framework-shared/runtime';
|
|
2
|
+
import { runtimeQuerySuccessCollection, runtimeQueryFailure, resolveMultiLanguageString } from '@acorex-platform/framework-shared/core';
|
|
3
|
+
import { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';
|
|
4
|
+
import { AXPWidgetRegistryService } from '@acorex-platform/framework-client/layout/widget-core';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { inject, Injectable } from '@angular/core';
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region ---- Query ----
|
|
10
|
+
/**
|
|
11
|
+
* Lists client-registered editor widgets from {@link AXPWidgetRegistryService}.
|
|
12
|
+
* Same catalog slice as the former `editor-widgets` registry data source.
|
|
13
|
+
*/
|
|
14
|
+
class AXMListEditorWidgetsQuery {
|
|
15
|
+
constructor() {
|
|
16
|
+
//#region ---- Services & Dependencies ----
|
|
17
|
+
this.widgetRegistry = inject(AXPWidgetRegistryService);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region ---- Query Execution ----
|
|
21
|
+
async fetch(input) {
|
|
22
|
+
try {
|
|
23
|
+
let items = this.widgetRegistry
|
|
24
|
+
.all()
|
|
25
|
+
.filter((widget) => String(widget.type ?? '').startsWith('editor'))
|
|
26
|
+
.map((widget) => ({
|
|
27
|
+
name: String(widget.name),
|
|
28
|
+
title: this.resolveWidgetTitle(widget.title),
|
|
29
|
+
type: String(widget.type ?? ''),
|
|
30
|
+
}));
|
|
31
|
+
if (input?.filter) {
|
|
32
|
+
items = applyFilterArray(items, [input.filter]);
|
|
33
|
+
}
|
|
34
|
+
const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];
|
|
35
|
+
const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'title', dir: 'asc' }];
|
|
36
|
+
items = applySortArray(items, sortOpt);
|
|
37
|
+
const skip = resolveCollectionSkip(input?.skip);
|
|
38
|
+
const take = resolveCollectionTake(input?.take);
|
|
39
|
+
const total = items.length;
|
|
40
|
+
const page = items.slice(skip, skip + take);
|
|
41
|
+
return runtimeQuerySuccessCollection({ items: page, total });
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
return runtimeQueryFailure(error instanceof Error ? error.message : 'Unknown error occurred');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region ---- Helpers ----
|
|
49
|
+
/**
|
|
50
|
+
* Keep string i18n keys intact so select-editor translate can resolve them;
|
|
51
|
+
* flatten MLS maps to a display string.
|
|
52
|
+
*/
|
|
53
|
+
resolveWidgetTitle(title) {
|
|
54
|
+
if (typeof title === 'string') {
|
|
55
|
+
return title;
|
|
56
|
+
}
|
|
57
|
+
return resolveMultiLanguageString(title, 'en-US');
|
|
58
|
+
}
|
|
59
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListEditorWidgetsQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
60
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListEditorWidgetsQuery, providedIn: 'root' }); }
|
|
61
|
+
}
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListEditorWidgetsQuery, decorators: [{
|
|
63
|
+
type: Injectable,
|
|
64
|
+
args: [{ providedIn: 'root' }]
|
|
65
|
+
}] });
|
|
66
|
+
|
|
67
|
+
export { AXMListEditorWidgetsQuery };
|
|
68
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-list-editor-widgets.query-DITPMmbw.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-list-editor-widgets.query-DITPMmbw.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/queries/list-editor-widgets.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n resolveMultiLanguageString,\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\nimport { AXPWidgetRegistryService } from '@acorex-platform/framework-client/layout/widget-core';\n\nimport { Injectable, inject } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListEditorWidgetsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListEditorWidgetsQueryItem {\n /** Widget registry name — store as column `type`. */\n name: string;\n /** Display title (i18n key string when the widget uses one). */\n title: string;\n /** Widget type (always starts with `editor` for this query). */\n type: string;\n}\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Lists client-registered editor widgets from {@link AXPWidgetRegistryService}.\n * Same catalog slice as the former `editor-widgets` registry data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListEditorWidgetsQuery\n implements AXPCollectionQuery<AXMListEditorWidgetsQueryInput, AXMListEditorWidgetsQueryItem>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly widgetRegistry = inject(AXPWidgetRegistryService);\n\n //#endregion\n\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListEditorWidgetsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListEditorWidgetsQueryItem> {\n try {\n let items: AXMListEditorWidgetsQueryItem[] = this.widgetRegistry\n .all()\n .filter((widget) => String(widget.type ?? '').startsWith('editor'))\n .map((widget) => ({\n name: String(widget.name),\n title: this.resolveWidgetTitle(widget.title),\n type: String(widget.type ?? ''),\n }));\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'title' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n /**\n * Keep string i18n keys intact so select-editor translate can resolve them;\n * flatten MLS maps to a display string.\n */\n private resolveWidgetTitle(title: unknown): string {\n if (typeof title === 'string') {\n return title;\n }\n return resolveMultiLanguageString(title, 'en-US');\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AA8BA;AAEA;AAEA;;;AAGG;MAEU,yBAAyB,CAAA;AADtC,IAAA,WAAA,GAAA;;AAMmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAwDnE,IAAA;;;IAlDC,MAAM,KAAK,CACT,KAA6C,EAAA;AAE7C,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAoC,IAAI,CAAC;AAC/C,iBAAA,GAAG;AACH,iBAAA,MAAM,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC;AACjE,iBAAA,GAAG,CAAC,CAAC,MAAM,MAAM;AAChB,gBAAA,IAAI,EAAE,MAAM,CA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