@acorex-platform/module-platform-management-client 2.0.0-next.50 → 2.0.0-next.54

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.
Files changed (71) hide show
  1. package/fesm2022/{acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-mS8l_Uk1.mjs → acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CesvNlI9.mjs} +50 -50
  2. package/fesm2022/{acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-mS8l_Uk1.mjs.map → acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CesvNlI9.mjs.map} +1 -1
  3. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-HWczTPH2.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-CbzyYYWN.mjs} +9 -9
  4. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-HWczTPH2.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-CbzyYYWN.mjs.map} +1 -1
  5. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-C3B1_QMs.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-DwENR7lZ.mjs} +2 -2
  6. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-C3B1_QMs.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-DwENR7lZ.mjs.map} +1 -1
  7. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-BPkJloHy.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-CXqUxond.mjs} +2 -2
  8. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-BPkJloHy.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-CXqUxond.mjs.map} +1 -1
  9. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-BL1I9pmK.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-NWCJQrKZ.mjs} +2 -2
  10. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-BL1I9pmK.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-NWCJQrKZ.mjs.map} +1 -1
  11. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-Cknl0vbc.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-CPv52ji_.mjs} +2 -2
  12. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-Cknl0vbc.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-CPv52ji_.mjs.map} +1 -1
  13. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-BxABTl8L.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-C0RT988C.mjs} +2 -2
  14. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-BxABTl8L.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-C0RT988C.mjs.map} +1 -1
  15. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-Cv6HVQOU.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-DOIP7h0R.mjs} +2 -2
  16. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-Cv6HVQOU.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-DOIP7h0R.mjs.map} +1 -1
  17. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-BV8iSuoK.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-CgEWIzYU.mjs} +2 -2
  18. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-BV8iSuoK.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-CgEWIzYU.mjs.map} +1 -1
  19. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-BYH6SIqU.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-CYeauxBL.mjs} +2 -2
  20. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-BYH6SIqU.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-CYeauxBL.mjs.map} +1 -1
  21. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog.mjs +1 -1
  22. package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query-contract.util-D_af2BUi.mjs → acorex-platform-module-platform-management-client-create-user-query-contract.util-DYslIuJb.mjs} +1 -1
  23. package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query-contract.util-D_af2BUi.mjs.map → acorex-platform-module-platform-management-client-create-user-query-contract.util-DYslIuJb.mjs.map} +1 -1
  24. package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query.command-CvUgyzEk.mjs → acorex-platform-module-platform-management-client-create-user-query.command-BgG5SEjW.mjs} +3 -3
  25. package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query.command-CvUgyzEk.mjs.map → acorex-platform-module-platform-management-client-create-user-query.command-BgG5SEjW.mjs.map} +1 -1
  26. package/fesm2022/{acorex-platform-module-platform-management-client-customize-menu.command-B_Ld4IRz.mjs → acorex-platform-module-platform-management-client-customize-menu.command-DLLZuS10.mjs} +1 -1
  27. package/fesm2022/{acorex-platform-module-platform-management-client-customize-menu.command-B_Ld4IRz.mjs.map → acorex-platform-module-platform-management-client-customize-menu.command-DLLZuS10.mjs.map} +1 -1
  28. package/fesm2022/{acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-CJVpqPmY.mjs → acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-BSYxNi74.mjs} +1 -1
  29. package/fesm2022/{acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-CJVpqPmY.mjs.map → acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-BSYxNi74.mjs.map} +1 -1
  30. package/fesm2022/{acorex-platform-module-platform-management-client-entity-definition-form-page.component-BB3e3REg.mjs → acorex-platform-module-platform-management-client-entity-definition-form-page.component-D3eE4jLj.mjs} +1 -1
  31. package/fesm2022/{acorex-platform-module-platform-management-client-entity-definition-form-page.component-BB3e3REg.mjs.map → acorex-platform-module-platform-management-client-entity-definition-form-page.component-D3eE4jLj.mjs.map} +1 -1
  32. package/fesm2022/{acorex-platform-module-platform-management-client-entity-definition-form-page.provider-CZYT6Trb.mjs → acorex-platform-module-platform-management-client-entity-definition-form-page.provider-DO3W-Hx1.mjs} +2 -2
  33. package/fesm2022/{acorex-platform-module-platform-management-client-entity-definition-form-page.provider-CZYT6Trb.mjs.map → acorex-platform-module-platform-management-client-entity-definition-form-page.provider-DO3W-Hx1.mjs.map} +1 -1
  34. package/fesm2022/{acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs → acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-CZBJ4dXs.mjs} +1 -1
  35. package/fesm2022/{acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs.map → acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-CZBJ4dXs.mjs.map} +1 -1
  36. package/fesm2022/{acorex-platform-module-platform-management-client-execute-token.command-B_xwW9lb.mjs → acorex-platform-module-platform-management-client-execute-token.command-D-6zPkdc.mjs} +1 -1
  37. package/fesm2022/{acorex-platform-module-platform-management-client-execute-token.command-B_xwW9lb.mjs.map → acorex-platform-module-platform-management-client-execute-token.command-D-6zPkdc.mjs.map} +1 -1
  38. package/fesm2022/{acorex-platform-module-platform-management-client-list-catalog-scopes.query-ByhDTWE6.mjs → acorex-platform-module-platform-management-client-list-catalog-scopes.query-BXoGbG82.mjs} +1 -1
  39. package/fesm2022/{acorex-platform-module-platform-management-client-list-catalog-scopes.query-ByhDTWE6.mjs.map → acorex-platform-module-platform-management-client-list-catalog-scopes.query-BXoGbG82.mjs.map} +1 -1
  40. package/fesm2022/{acorex-platform-module-platform-management-client-list-editor-widgets.query-DITPMmbw.mjs → acorex-platform-module-platform-management-client-list-editor-widgets.query-Bmzf4dYS.mjs} +1 -1
  41. package/fesm2022/{acorex-platform-module-platform-management-client-list-editor-widgets.query-DITPMmbw.mjs.map → acorex-platform-module-platform-management-client-list-editor-widgets.query-Bmzf4dYS.mjs.map} +1 -1
  42. package/fesm2022/{acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-2oHMITw-.mjs → acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-7_-GTKQw.mjs} +2 -2
  43. package/fesm2022/{acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-2oHMITw-.mjs.map → acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-7_-GTKQw.mjs.map} +1 -1
  44. package/fesm2022/{acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs → acorex-platform-module-platform-management-client-list-registered-entities.query-01gokkyo.mjs} +2 -2
  45. package/fesm2022/{acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs.map → acorex-platform-module-platform-management-client-list-registered-entities.query-01gokkyo.mjs.map} +1 -1
  46. package/fesm2022/{acorex-platform-module-platform-management-client-list-registered-queries.query-C-IfkTel.mjs → acorex-platform-module-platform-management-client-list-registered-queries.query-CqpTep6_.mjs} +1 -1
  47. package/fesm2022/{acorex-platform-module-platform-management-client-list-registered-queries.query-C-IfkTel.mjs.map → acorex-platform-module-platform-management-client-list-registered-queries.query-CqpTep6_.mjs.map} +1 -1
  48. package/fesm2022/{acorex-platform-module-platform-management-client-menu-list.component-SnvQ2KbJ.mjs → acorex-platform-module-platform-management-client-menu-list.component-CZf5cHCK.mjs} +4 -4
  49. package/fesm2022/{acorex-platform-module-platform-management-client-menu-list.component-SnvQ2KbJ.mjs.map → acorex-platform-module-platform-management-client-menu-list.component-CZf5cHCK.mjs.map} +1 -1
  50. package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-charts.queries-CQ34R13-.mjs → acorex-platform-module-platform-management-client-platform-console-charts.queries-CXoMSE_r.mjs} +2 -2
  51. package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-charts.queries-CQ34R13-.mjs.map → acorex-platform-module-platform-management-client-platform-console-charts.queries-CXoMSE_r.mjs.map} +1 -1
  52. package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs → acorex-platform-module-platform-management-client-platform-console-data.util-Zh8mHsDg.mjs} +1 -1
  53. package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs.map → acorex-platform-module-platform-management-client-platform-console-data.util-Zh8mHsDg.mjs.map} +1 -1
  54. package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-kpi.queries-BkPdhVq_.mjs → acorex-platform-module-platform-management-client-platform-console-kpi.queries-BfjJfn8V.mjs} +2 -2
  55. package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-kpi.queries-BkPdhVq_.mjs.map → acorex-platform-module-platform-management-client-platform-console-kpi.queries-BfjJfn8V.mjs.map} +1 -1
  56. package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-column.component-COfOzMGh.mjs → acorex-platform-module-platform-management-client-query-contract-widget-column.component-2W2BHT3F.mjs} +2 -2
  57. package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-column.component-COfOzMGh.mjs.map → acorex-platform-module-platform-management-client-query-contract-widget-column.component-2W2BHT3F.mjs.map} +1 -1
  58. package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-edit.component-DJDUE6lF.mjs → acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BEluyLyx.mjs} +5 -5
  59. package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-edit.component-DJDUE6lF.mjs.map → acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BEluyLyx.mjs.map} +1 -1
  60. package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs → acorex-platform-module-platform-management-client-query-contract-widget-view.component-DkLf08HM.mjs} +2 -2
  61. package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs.map → acorex-platform-module-platform-management-client-query-contract-widget-view.component-DkLf08HM.mjs.map} +1 -1
  62. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-DCfCyide.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-Ctb-F0qE.mjs} +2 -2
  63. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-DCfCyide.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-Ctb-F0qE.mjs.map} +1 -1
  64. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-BIhejA5a.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-DMivRLvp.mjs} +4 -4
  65. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-BIhejA5a.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-DMivRLvp.mjs.map} +1 -1
  66. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-TMZbJDMf.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-DAEUuDBa.mjs} +2 -2
  67. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-TMZbJDMf.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-DAEUuDBa.mjs.map} +1 -1
  68. package/fesm2022/{acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs → acorex-platform-module-platform-management-client-run-user-query.command-CmO6zxh8.mjs} +1 -1
  69. package/fesm2022/{acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs.map → acorex-platform-module-platform-management-client-run-user-query.command-CmO6zxh8.mjs.map} +1 -1
  70. package/fesm2022/acorex-platform-module-platform-management-client.mjs +1 -1
  71. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-platform-management-client-customize-menu.command-B_Ld4IRz.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 { AXPDialogOpener } from '@acorex-platform/framework-client/core';\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 dialogOpener = inject(AXPDialogOpener);\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.dialogOpener.openPopup({\n load: () => Promise.resolve(AXPMenuCustomizerPopupComponent),\n data: { scopeKey },\n show: (component) =>\n this.popupService.open(component, {\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\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\n"],"names":[],"mappings":";;;;;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AAI;AACtB,SAAA,CAAC;IACJ;8GArEW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,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,uBAAuB,cADV,MAAM,EAAA,CAAA,CAAA;;2FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-customize-menu.command-DLLZuS10.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 { AXPDialogOpener } from '@acorex-platform/framework-client/core';\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 dialogOpener = inject(AXPDialogOpener);\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.dialogOpener.openPopup({\n load: () => Promise.resolve(AXPMenuCustomizerPopupComponent),\n data: { scopeKey },\n show: (component) =>\n this.popupService.open(component, {\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\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\n"],"names":[],"mappings":";;;;;;;;;;;AAeA;AAEA;AAEA;;;;;;;;;;AAUG;AAoCG,MAAO,+BAAgC,SAAQ,2BAA2B,CAAA;AAnChF,IAAA,WAAA,GAAA;;;;QAuCY,IAAA,CAAA,cAAc,GAAG,SAAS,CAAC,0BAA0B;2FAAC;;QAGhE,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAS,EAAE;qFAAC;;QAG7B,IAAA,CAAA,WAAW,GAAG,MAAM,CAAU,IAAI;wFAAC;;QAGnC,IAAA,CAAA,aAAa,GAAG,MAAM,CAAU,IAAI;0FAAC;;QAGrC,IAAA,CAAA,YAAY,GAAG,MAAM,CAAyB,MAAM;yFAAC;;QAGrD,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAqB,SAAS;qFAAC;;QAGtC,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE;oFAAC;AAsD3D,IAAA;;;AAhDU,IAAA,MAAM,QAAQ,GAAA;AACrB,QAAA,MAAM,KAAK,CAAC,QAAQ,EAAE;;IAExB;;;AAMA;;AAEG;IACgB,mBAAmB,GAAA;QACpC,OAAO;AACL,YAAA;AACE,gBAAA,KAAK,EAAE,8BAA8B;AACrC,gBAAA,IAAI,EAAE,mBAAmB;AACzB,gBAAA,OAAO,EAAE;AACP,oBAAA,IAAI,EAAE,OAAO;AACd,iBAAA;AACF,aAAA;SACF;IACH;AAEA;;AAEG;IACO,OAAO,GAAA;AACf,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IAClB;AAEA;;AAEG;IACO,WAAW,GAAA;AACnB,QAAA,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IACnB;AAEA;;AAEG;AACM,IAAA,OAAO,CAAC,OAA0B,EAAA;AACzC,QAAA,IAAI,OA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,CAAC,cAAc,CAC/C,2EAA2E,CAC5E;AACD,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,eAAe,EAAE,IAAI;AACtB,SAAA,CAAC;IACJ;8GArEW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,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,uBAAuB,cADV,MAAM,EAAA,CAAA,CAAA;;2FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -49,4 +49,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
49
49
  }] });
50
50
 
51
51
  export { AXPDataListPickEntityItemCommand };
52
- //# sourceMappingURL=acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-CJVpqPmY.mjs.map
52
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-BSYxNi74.mjs.map
@@ -1 +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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AAQ,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,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;;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-BSYxNi74.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,QAAQ,GAAG,MAAM,CAAC,4BAA4B,CAAC;AAsCjE,IAAA;;;IAhCC,MAAM,OAAO,CACX,KAAqC,EAAA;QAErC,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE;QACtC,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC;AAC5B,QAAA,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;YACrC,OAAO;A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AAgC,EAAA,UAAA,EAAA,CAAA;kBAD5C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -326,4 +326,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
326
326
  }], ctorParameters: () => [], propDecorators: { rootContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootContext", required: false }] }], pageConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageConfig", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
327
327
 
328
328
  export { AXMEntityDefinitionFormPageComponent };
329
- //# sourceMappingURL=acorex-platform-module-platform-management-client-entity-definition-form-page.component-BB3e3REg.mjs.map
329
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-entity-definition-form-page.component-D3eE4jLj.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-platform-management-client-entity-definition-form-page.component-BB3e3REg.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/entity-definition/build-entity-definition-page-layout.util.ts","../../../../libs/modules/platform-management/client/src/lib/features/entity-definition/entity-definition-form-page.component.ts"],"sourcesContent":["//#region ----- Imports -----\r\n\r\nimport { AXPWidgetsList, type AXPWidgetNode } from '@acorex-platform/framework-shared/core';\r\nimport type { AXPEntityProperty, AXPEntityPropertyGroup } from '@acorex-platform/framework-shared/entity';\r\n\r\nimport {\r\n buildEntityDefinitionEntity,\r\n flattenEntityContentToDesignerForm,\r\n flattenProperties,\r\n} from '@acorex-platform/module-platform-management-client/contracts';\r\n\r\n//#endregion\r\n\r\n//#region ----- Public API -----\r\n\r\nexport function buildEntityDefinitionWizardPageLayout(propertyNames: readonly string[]): AXPWidgetNode {\r\n const entity = buildEntityDefinitionEntity();\r\n const allowed = new Set(propertyNames);\r\n const properties = entity.properties.filter((property) => allowed.has(property.name));\r\n const groups = entity.groups ?? [];\r\n const grouped = new Map<string, AXPEntityProperty[]>();\r\n\r\n for (const property of properties) {\r\n const groupId = property.groupId ?? 'basic-info';\r\n const bucket = grouped.get(groupId) ?? [];\r\n bucket.push(property);\r\n grouped.set(groupId, bucket);\r\n }\r\n\r\n const fieldsets: AXPWidgetNode[] = [];\r\n for (const group of groups) {\r\n const groupProperties = grouped.get(group.id);\r\n if (!groupProperties?.length) {\r\n continue;\r\n }\r\n fieldsets.push(buildFieldset(group, groupProperties));\r\n }\r\n\r\n return {\r\n type: AXPWidgetsList.Layouts.BlockLayout,\r\n mode: 'edit',\r\n options: { gap: '1rem' },\r\n children: fieldsets,\r\n };\r\n}\r\n\r\nexport function defaultWizardValuesFromContext(\r\n propertyNames: readonly string[],\r\n root: Record<string, unknown>,\r\n): Record<string, unknown> {\r\n const content =\r\n root['content'] && typeof root['content'] === 'object' && !Array.isArray(root['content'])\r\n ? (root['content'] as Record<string, unknown>)\r\n : {};\r\n const flattened = flattenEntityContentToDesignerForm(content);\r\n const next: Record<string, unknown> = { ...root };\r\n\r\n for (const name of propertyNames) {\r\n if (root[name] !== undefined) {\r\n next[name] = root[name];\r\n } else if (flattened[name] !== undefined) {\r\n next[name] = flattened[name];\r\n } else {\r\n next[name] = defaultForProperty(name);\r\n }\r\n }\r\n\r\n const properties = flattenProperties(root['properties'] ?? flattened['properties'] ?? content['properties']);\r\n const groups = readObjectArray(root['groups'] ?? flattened['groups'] ?? content['groups']);\r\n next['properties'] = properties;\r\n next['groups'] = groups;\r\n\r\n if (propertyNames.includes('columns')) {\r\n next['columns'] = syncRowsToSource(\r\n readObjectArray(next['columns']),\r\n properties,\r\n 'name',\r\n (property) => ({\r\n name: property['name'],\r\n title: property['title'] ?? property['name'],\r\n widgetType: readWidgetType(property),\r\n }),\r\n );\r\n }\r\n\r\n if (propertyNames.includes('createSections')) {\r\n next['createSections'] = syncRowsToSource(\r\n readObjectArray(next['createSections']),\r\n groups,\r\n 'id',\r\n (group) => ({ id: group['id'] }),\r\n );\r\n }\r\n\r\n if (propertyNames.includes('createProperties')) {\r\n next['createProperties'] = syncRowsToSource(\r\n readObjectArray(next['createProperties']),\r\n properties,\r\n 'name',\r\n (property) => ({\r\n name: property['name'],\r\n colSpan: 6,\r\n }),\r\n );\r\n }\r\n\r\n return next;\r\n}\r\n\r\n//#endregion\r\n\r\n//#region ----- Helpers -----\r\n\r\nfunction buildFieldset(group: AXPEntityPropertyGroup, properties: AXPEntityProperty[]): AXPWidgetNode {\r\n return {\r\n type: AXPWidgetsList.Layouts.FieldsetLayout,\r\n mode: 'edit',\r\n options: {\r\n title: group.title,\r\n look: 'fieldset',\r\n cols: 12,\r\n showHeader: true,\r\n },\r\n children: properties.map((property) => buildFormField(property)),\r\n };\r\n}\r\n\r\nfunction buildFormField(property: AXPEntityProperty): AXPWidgetNode {\r\n const widget = property.schema?.interface;\r\n const child: AXPWidgetNode = {\r\n type: widget?.type || AXPWidgetsList.Editors.TextBox,\r\n mode: 'edit',\r\n path: property.name,\r\n name: property.name,\r\n options: widget?.options ?? {},\r\n children: (widget?.children as AXPWidgetNode[] | undefined) ?? undefined,\r\n };\r\n\r\n return {\r\n type: AXPWidgetsList.Layouts.FormField,\r\n mode: 'edit',\r\n options: {\r\n label: property.title,\r\n showLabel: true,\r\n },\r\n children: [child],\r\n };\r\n}\r\n\r\nfunction defaultForProperty(name: string): unknown {\r\n if (\r\n name === 'rules' ||\r\n name === 'validations' ||\r\n name === 'commandsJson' ||\r\n name === 'queriesJson'\r\n ) {\r\n return '';\r\n }\r\n return [];\r\n}\r\n\r\nfunction syncRowsToSource(\r\n existing: Record<string, unknown>[],\r\n source: Record<string, unknown>[],\r\n key: string,\r\n buildDefault: (item: Record<string, unknown>) => Record<string, unknown>,\r\n): Record<string, unknown>[] {\r\n if (!source.length) {\r\n return existing;\r\n }\r\n const byKey = new Map(existing.map((row) => [String(row[key] ?? ''), row]));\r\n return source\r\n .map((item) => {\r\n const id = String(item[key] ?? item['name'] ?? item['id'] ?? '');\r\n if (!id) {\r\n return null;\r\n }\r\n return byKey.get(id) ?? buildDefault(item);\r\n })\r\n .filter((row): row is Record<string, unknown> => !!row);\r\n}\r\n\r\nfunction readObjectArray(value: unknown): Record<string, unknown>[] {\r\n if (!Array.isArray(value)) {\r\n return [];\r\n }\r\n return value.filter((item) => item && typeof item === 'object' && !Array.isArray(item)) as Record<\r\n string,\r\n unknown\r\n >[];\r\n}\r\n\r\nfunction readWidgetType(property: Record<string, unknown>): string | undefined {\r\n const schema = property['schema'];\r\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\r\n const iface = property['interface'];\r\n if (iface && typeof iface === 'object' && !Array.isArray(iface)) {\r\n const type = (iface as Record<string, unknown>)['type'];\r\n return typeof type === 'string' ? type : undefined;\r\n }\r\n return typeof property['widgetType'] === 'string' ? property['widgetType'] : undefined;\r\n }\r\n const iface = (schema as Record<string, unknown>)['interface'];\r\n if (iface && typeof iface === 'object' && !Array.isArray(iface)) {\r\n const type = (iface as Record<string, unknown>)['type'];\r\n return typeof type === 'string' ? type : undefined;\r\n }\r\n return undefined;\r\n}\r\n\r\n//#endregion\r\n","//#region ----- Imports -----\r\n\r\nimport { AXPExecuteCommand, type AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\r\nimport { AXPLayoutRendererComponent } from '@acorex-platform/framework-client/layout/builder';\r\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\r\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';\r\nimport {\r\n ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES,\r\n ENTITY_DEFINITION_SURFACES_PROPERTY_NAMES,\r\n RootConfig,\r\n} from '@acorex-platform/module-platform-management-client/contracts';\r\n\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n signal,\r\n untracked,\r\n} from '@angular/core';\r\nimport { isEqual } from 'lodash-es';\r\n\r\nimport {\r\n buildEntityDefinitionWizardPageLayout,\r\n defaultWizardValuesFromContext,\r\n} from './build-entity-definition-page-layout.util';\r\n\r\n//#endregion\r\n\r\n//#region ----- Constants -----\r\n\r\nconst SAVE_COMMAND = 'EntityDefinition:SaveWizardStep';\r\nconst ENTITY_FULL_NAME = `${RootConfig.module.name}.${RootConfig.entities.entityDefinition.name}`;\r\n\r\n//#endregion\r\n\r\n//#region ----- Component -----\r\n\r\n@Component({\r\n selector: 'axm-entity-definition-form-page',\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [AXPLayoutRendererComponent],\r\n providers: [\r\n {\r\n provide: AXPPageLayoutBase,\r\n useExisting: AXMEntityDefinitionFormPageComponent,\r\n },\r\n ],\r\n template: `\r\n <div class=\"flex min-h-0 flex-1 flex-col overflow-auto p-1\">\r\n <axp-layout-renderer [layout]=\"pageLayout()\" [(context)]=\"editorContext\" mode=\"edit\" />\r\n </div>\r\n `,\r\n host: {\r\n class: 'flex h-full min-h-0 flex-1 flex-col overflow-hidden',\r\n },\r\n})\r\nexport class AXMEntityDefinitionFormPageComponent extends AXPPageLayoutBaseComponent {\r\n //#region ----- Inputs -----\r\n\r\n rootContext = input<Record<string, unknown>>();\r\n pageConfig = input<Record<string, unknown>>();\r\n options = input<Record<string, unknown>>();\r\n\r\n //#endregion\r\n\r\n //#region ----- Services -----\r\n\r\n private readonly entityService = inject(AXPEntityService);\r\n\r\n //#endregion\r\n\r\n //#region ----- State -----\r\n\r\n protected readonly editorContext = signal<Record<string, unknown>>({});\r\n private readonly baseline = signal<Record<string, unknown>>({});\r\n private readonly seededRootKey = signal<string>('');\r\n\r\n //#endregion\r\n\r\n //#region ----- Computed -----\r\n\r\n protected readonly propertyNames = computed(() => {\r\n const fromOptions = this.options()?.['propertyNames'];\r\n if (Array.isArray(fromOptions) && fromOptions.every((item) => typeof item === 'string')) {\r\n return fromOptions as string[];\r\n }\r\n const field = this.pageConfig()?.['field'];\r\n if (field === 'properties') {\r\n return [...ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES];\r\n }\r\n if (field === 'interfaces') {\r\n return [...ENTITY_DEFINITION_SURFACES_PROPERTY_NAMES];\r\n }\r\n return [...ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES];\r\n });\r\n\r\n protected readonly pageLayout = computed(() =>\r\n buildEntityDefinitionWizardPageLayout(this.propertyNames()),\r\n );\r\n\r\n //#endregion\r\n\r\n //#region ----- Lifecycle -----\r\n\r\n constructor() {\r\n super();\r\n effect(() => {\r\n const root = this.rootContext() ?? {};\r\n const names = this.propertyNames();\r\n const properties = Array.isArray(root['properties']) ? root['properties'] : [];\r\n const groups = Array.isArray(root['groups']) ? root['groups'] : [];\r\n const fingerprint = [\r\n ...properties.map((item) =>\r\n item && typeof item === 'object' ? String((item as Record<string, unknown>)['name'] ?? '') : '',\r\n ),\r\n ...groups.map((item) =>\r\n item && typeof item === 'object' ? String((item as Record<string, unknown>)['id'] ?? '') : '',\r\n ),\r\n ].join('|');\r\n const seedKey = `${String(root['id'] ?? '')}:${names.join(',')}:${fingerprint}`;\r\n if (seedKey === untracked(() => this.seededRootKey())) {\r\n return;\r\n }\r\n const seeded = defaultWizardValuesFromContext(names, root);\r\n this.seededRootKey.set(seedKey);\r\n this.editorContext.set(seeded);\r\n this.baseline.set(this.pickOwned(seeded, names));\r\n });\r\n }\r\n\r\n //#endregion\r\n\r\n //#region ----- Wizard / page contract -----\r\n\r\n override hasUnsavedChanges(): boolean {\r\n return !isEqual(this.pickOwned(this.editorContext(), this.propertyNames()), this.baseline());\r\n }\r\n\r\n override getWizardStepContext(): Record<string, unknown> {\r\n return this.pickOwned(this.editorContext(), this.propertyNames());\r\n }\r\n\r\n getWizardStepContinueCommand(): AXPExecuteCommand {\r\n return { name: SAVE_COMMAND };\r\n }\r\n\r\n override async getPrimaryMenuItems() {\r\n return [\r\n {\r\n title: '@general:actions.save.title',\r\n icon: 'fa-light fa-floppy-disk',\r\n command: { name: SAVE_COMMAND },\r\n priority: 'primary' as const,\r\n zone: 'footer' as const,\r\n },\r\n ];\r\n }\r\n\r\n override execute(command: AXPExecuteCommand): void | Promise<void> {\r\n if (command.name !== SAVE_COMMAND) {\r\n return;\r\n }\r\n return this.saveOwnedFields() as unknown as Promise<void>;\r\n }\r\n\r\n //#endregion\r\n\r\n //#region ----- Persistence -----\r\n\r\n private async saveOwnedFields(): Promise<AXPRuntimeCommandResult> {\r\n const root = this.rootContext() ?? {};\r\n const id = typeof root['id'] === 'string' ? root['id'] : '';\r\n const patch = this.getWizardStepContext();\r\n\r\n if (!id) {\r\n this.baseline.set(patch);\r\n this.recompute();\r\n return { success: true, kind: 'object', data: patch };\r\n }\r\n\r\n try {\r\n const dataAccessor = this.entityService.withEntity(ENTITY_FULL_NAME).data<any, any>();\r\n await dataAccessor.update(id, patch);\r\n this.baseline.set(patch);\r\n this.recompute();\r\n return { success: true, kind: 'object', data: patch };\r\n } catch (error) {\r\n return {\r\n success: false,\r\n message: {\r\n text: error instanceof Error ? error.message : '@general:messages.generic.error.description',\r\n },\r\n };\r\n }\r\n }\r\n\r\n private pickOwned(source: Record<string, unknown>, names: readonly string[]): Record<string, unknown> {\r\n const next: Record<string, unknown> = {};\r\n for (const name of names) {\r\n next[name] = source[name];\r\n }\r\n return next;\r\n }\r\n\r\n //#endregion\r\n}\r\n\r\n//#endregion\r\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAWA;AAEA;AAEM,SAAU,qCAAqC,CAAC,aAAgC,EAAA;AACpF,IAAA,MAAM,MAAM,GAAG,2BAA2B,EAAE;AAC5C,IAAA,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC;IACtC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACrF,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE;AAClC,IAAA,MAAM,OAAO,GAAG,IAAI,GAAG,EAA+B;AAEtD,I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AAA,EAAA,OAAA,EAAA,CAAA,eAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAgBzB,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBApBhD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iCAAiC;AAC3C,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,0BAA0B,CAAC;AACrC,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,oCAAsC;AAClD,yBAAA;AACF,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA;;;;AAIT,EAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,qDAAqD;AAC7D,qBAAA;AACF,iBAAA;;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-entity-definition-form-page.component-D3eE4jLj.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/entity-definition/build-entity-definition-page-layout.util.ts","../../../../libs/modules/platform-management/client/src/lib/features/entity-definition/entity-definition-form-page.component.ts"],"sourcesContent":["//#region ----- Imports -----\r\n\r\nimport { AXPWidgetsList, type AXPWidgetNode } from '@acorex-platform/framework-shared/core';\r\nimport type { AXPEntityProperty, AXPEntityPropertyGroup } from '@acorex-platform/framework-shared/entity';\r\n\r\nimport {\r\n buildEntityDefinitionEntity,\r\n flattenEntityContentToDesignerForm,\r\n flattenProperties,\r\n} from '@acorex-platform/module-platform-management-client/contracts';\r\n\r\n//#endregion\r\n\r\n//#region ----- Public API -----\r\n\r\nexport function buildEntityDefinitionWizardPageLayout(propertyNames: readonly string[]): AXPWidgetNode {\r\n const entity = buildEntityDefinitionEntity();\r\n const allowed = new Set(propertyNames);\r\n const properties = entity.properties.filter((property) => allowed.has(property.name));\r\n const groups = entity.groups ?? [];\r\n const grouped = new Map<string, AXPEntityProperty[]>();\r\n\r\n for (const property of properties) {\r\n const groupId = property.groupId ?? 'basic-info';\r\n const bucket = grouped.get(groupId) ?? [];\r\n bucket.push(property);\r\n grouped.set(groupId, bucket);\r\n }\r\n\r\n const fieldsets: AXPWidgetNode[] = [];\r\n for (const group of groups) {\r\n const groupProperties = grouped.get(group.id);\r\n if (!groupProperties?.length) {\r\n continue;\r\n }\r\n fieldsets.push(buildFieldset(group, groupProperties));\r\n }\r\n\r\n return {\r\n type: AXPWidgetsList.Layouts.BlockLayout,\r\n mode: 'edit',\r\n options: { gap: '1rem' },\r\n children: fieldsets,\r\n };\r\n}\r\n\r\nexport function defaultWizardValuesFromContext(\r\n propertyNames: readonly string[],\r\n root: Record<string, unknown>,\r\n): Record<string, unknown> {\r\n const content =\r\n root['content'] && typeof root['content'] === 'object' && !Array.isArray(root['content'])\r\n ? (root['content'] as Record<string, unknown>)\r\n : {};\r\n const flattened = flattenEntityContentToDesignerForm(content);\r\n const next: Record<string, unknown> = { ...root };\r\n\r\n for (const name of propertyNames) {\r\n if (root[name] !== undefined) {\r\n next[name] = root[name];\r\n } else if (flattened[name] !== undefined) {\r\n next[name] = flattened[name];\r\n } else {\r\n next[name] = defaultForProperty(name);\r\n }\r\n }\r\n\r\n const properties = flattenProperties(root['properties'] ?? flattened['properties'] ?? content['properties']);\r\n const groups = readObjectArray(root['groups'] ?? flattened['groups'] ?? content['groups']);\r\n next['properties'] = properties;\r\n next['groups'] = groups;\r\n\r\n if (propertyNames.includes('columns')) {\r\n next['columns'] = syncRowsToSource(\r\n readObjectArray(next['columns']),\r\n properties,\r\n 'name',\r\n (property) => ({\r\n name: property['name'],\r\n title: property['title'] ?? property['name'],\r\n widgetType: readWidgetType(property),\r\n }),\r\n );\r\n }\r\n\r\n if (propertyNames.includes('createSections')) {\r\n next['createSections'] = syncRowsToSource(\r\n readObjectArray(next['createSections']),\r\n groups,\r\n 'id',\r\n (group) => ({ id: group['id'] }),\r\n );\r\n }\r\n\r\n if (propertyNames.includes('createProperties')) {\r\n next['createProperties'] = syncRowsToSource(\r\n readObjectArray(next['createProperties']),\r\n properties,\r\n 'name',\r\n (property) => ({\r\n name: property['name'],\r\n colSpan: 6,\r\n }),\r\n );\r\n }\r\n\r\n return next;\r\n}\r\n\r\n//#endregion\r\n\r\n//#region ----- Helpers -----\r\n\r\nfunction buildFieldset(group: AXPEntityPropertyGroup, properties: AXPEntityProperty[]): AXPWidgetNode {\r\n return {\r\n type: AXPWidgetsList.Layouts.FieldsetLayout,\r\n mode: 'edit',\r\n options: {\r\n title: group.title,\r\n look: 'fieldset',\r\n cols: 12,\r\n showHeader: true,\r\n },\r\n children: properties.map((property) => buildFormField(property)),\r\n };\r\n}\r\n\r\nfunction buildFormField(property: AXPEntityProperty): AXPWidgetNode {\r\n const widget = property.schema?.interface;\r\n const child: AXPWidgetNode = {\r\n type: widget?.type || AXPWidgetsList.Editors.TextBox,\r\n mode: 'edit',\r\n path: property.name,\r\n name: property.name,\r\n options: widget?.options ?? {},\r\n children: (widget?.children as AXPWidgetNode[] | undefined) ?? undefined,\r\n };\r\n\r\n return {\r\n type: AXPWidgetsList.Layouts.FormField,\r\n mode: 'edit',\r\n options: {\r\n label: property.title,\r\n showLabel: true,\r\n },\r\n children: [child],\r\n };\r\n}\r\n\r\nfunction defaultForProperty(name: string): unknown {\r\n if (\r\n name === 'rules' ||\r\n name === 'validations' ||\r\n name === 'commandsJson' ||\r\n name === 'queriesJson'\r\n ) {\r\n return '';\r\n }\r\n return [];\r\n}\r\n\r\nfunction syncRowsToSource(\r\n existing: Record<string, unknown>[],\r\n source: Record<string, unknown>[],\r\n key: string,\r\n buildDefault: (item: Record<string, unknown>) => Record<string, unknown>,\r\n): Record<string, unknown>[] {\r\n if (!source.length) {\r\n return existing;\r\n }\r\n const byKey = new Map(existing.map((row) => [String(row[key] ?? ''), row]));\r\n return source\r\n .map((item) => {\r\n const id = String(item[key] ?? item['name'] ?? item['id'] ?? '');\r\n if (!id) {\r\n return null;\r\n }\r\n return byKey.get(id) ?? buildDefault(item);\r\n })\r\n .filter((row): row is Record<string, unknown> => !!row);\r\n}\r\n\r\nfunction readObjectArray(value: unknown): Record<string, unknown>[] {\r\n if (!Array.isArray(value)) {\r\n return [];\r\n }\r\n return value.filter((item) => item && typeof item === 'object' && !Array.isArray(item)) as Record<\r\n string,\r\n unknown\r\n >[];\r\n}\r\n\r\nfunction readWidgetType(property: Record<string, unknown>): string | undefined {\r\n const schema = property['schema'];\r\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\r\n const iface = property['interface'];\r\n if (iface && typeof iface === 'object' && !Array.isArray(iface)) {\r\n const type = (iface as Record<string, unknown>)['type'];\r\n return typeof type === 'string' ? type : undefined;\r\n }\r\n return typeof property['widgetType'] === 'string' ? property['widgetType'] : undefined;\r\n }\r\n const iface = (schema as Record<string, unknown>)['interface'];\r\n if (iface && typeof iface === 'object' && !Array.isArray(iface)) {\r\n const type = (iface as Record<string, unknown>)['type'];\r\n return typeof type === 'string' ? type : undefined;\r\n }\r\n return undefined;\r\n}\r\n\r\n//#endregion\r\n","//#region ----- Imports -----\r\n\r\nimport { AXPExecuteCommand, type AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\r\nimport { AXPLayoutRendererComponent } from '@acorex-platform/framework-client/layout/builder';\r\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\r\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';\r\nimport {\r\n ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES,\r\n ENTITY_DEFINITION_SURFACES_PROPERTY_NAMES,\r\n RootConfig,\r\n} from '@acorex-platform/module-platform-management-client/contracts';\r\n\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n signal,\r\n untracked,\r\n} from '@angular/core';\r\nimport { isEqual } from 'lodash-es';\r\n\r\nimport {\r\n buildEntityDefinitionWizardPageLayout,\r\n defaultWizardValuesFromContext,\r\n} from './build-entity-definition-page-layout.util';\r\n\r\n//#endregion\r\n\r\n//#region ----- Constants -----\r\n\r\nconst SAVE_COMMAND = 'EntityDefinition:SaveWizardStep';\r\nconst ENTITY_FULL_NAME = `${RootConfig.module.name}.${RootConfig.entities.entityDefinition.name}`;\r\n\r\n//#endregion\r\n\r\n//#region ----- Component -----\r\n\r\n@Component({\r\n selector: 'axm-entity-definition-form-page',\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [AXPLayoutRendererComponent],\r\n providers: [\r\n {\r\n provide: AXPPageLayoutBase,\r\n useExisting: AXMEntityDefinitionFormPageComponent,\r\n },\r\n ],\r\n template: `\r\n <div class=\"flex min-h-0 flex-1 flex-col overflow-auto p-1\">\r\n <axp-layout-renderer [layout]=\"pageLayout()\" [(context)]=\"editorContext\" mode=\"edit\" />\r\n </div>\r\n `,\r\n host: {\r\n class: 'flex h-full min-h-0 flex-1 flex-col overflow-hidden',\r\n },\r\n})\r\nexport class AXMEntityDefinitionFormPageComponent extends AXPPageLayoutBaseComponent {\r\n //#region ----- Inputs -----\r\n\r\n rootContext = input<Record<string, unknown>>();\r\n pageConfig = input<Record<string, unknown>>();\r\n options = input<Record<string, unknown>>();\r\n\r\n //#endregion\r\n\r\n //#region ----- Services -----\r\n\r\n private readonly entityService = inject(AXPEntityService);\r\n\r\n //#endregion\r\n\r\n //#region ----- State -----\r\n\r\n protected readonly editorContext = signal<Record<string, unknown>>({});\r\n private readonly baseline = signal<Record<string, unknown>>({});\r\n private readonly seededRootKey = signal<string>('');\r\n\r\n //#endregion\r\n\r\n //#region ----- Computed -----\r\n\r\n protected readonly propertyNames = computed(() => {\r\n const fromOptions = this.options()?.['propertyNames'];\r\n if (Array.isArray(fromOptions) && fromOptions.every((item) => typeof item === 'string')) {\r\n return fromOptions as string[];\r\n }\r\n const field = this.pageConfig()?.['field'];\r\n if (field === 'properties') {\r\n return [...ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES];\r\n }\r\n if (field === 'interfaces') {\r\n return [...ENTITY_DEFINITION_SURFACES_PROPERTY_NAMES];\r\n }\r\n return [...ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES];\r\n });\r\n\r\n protected readonly pageLayout = computed(() =>\r\n buildEntityDefinitionWizardPageLayout(this.propertyNames()),\r\n );\r\n\r\n //#endregion\r\n\r\n //#region ----- Lifecycle -----\r\n\r\n constructor() {\r\n super();\r\n effect(() => {\r\n const root = this.rootContext() ?? {};\r\n const names = this.propertyNames();\r\n const properties = Array.isArray(root['properties']) ? root['properties'] : [];\r\n const groups = Array.isArray(root['groups']) ? root['groups'] : [];\r\n const fingerprint = [\r\n ...properties.map((item) =>\r\n item && typeof item === 'object' ? String((item as Record<string, unknown>)['name'] ?? '') : '',\r\n ),\r\n ...groups.map((item) =>\r\n item && typeof item === 'object' ? String((item as Record<string, unknown>)['id'] ?? '') : '',\r\n ),\r\n ].join('|');\r\n const seedKey = `${String(root['id'] ?? '')}:${names.join(',')}:${fingerprint}`;\r\n if (seedKey === untracked(() => this.seededRootKey())) {\r\n return;\r\n }\r\n const seeded = defaultWizardValuesFromContext(names, root);\r\n this.seededRootKey.set(seedKey);\r\n this.editorContext.set(seeded);\r\n this.baseline.set(this.pickOwned(seeded, names));\r\n });\r\n }\r\n\r\n //#endregion\r\n\r\n //#region ----- Wizard / page contract -----\r\n\r\n override hasUnsavedChanges(): boolean {\r\n return !isEqual(this.pickOwned(this.editorContext(), this.propertyNames()), this.baseline());\r\n }\r\n\r\n override getWizardStepContext(): Record<string, unknown> {\r\n return this.pickOwned(this.editorContext(), this.propertyNames());\r\n }\r\n\r\n getWizardStepContinueCommand(): AXPExecuteCommand {\r\n return { name: SAVE_COMMAND };\r\n }\r\n\r\n override async getPrimaryMenuItems() {\r\n return [\r\n {\r\n title: '@general:actions.save.title',\r\n icon: 'fa-light fa-floppy-disk',\r\n command: { name: SAVE_COMMAND },\r\n priority: 'primary' as const,\r\n zone: 'footer' as const,\r\n },\r\n ];\r\n }\r\n\r\n override execute(command: AXPExecuteCommand): void | Promise<void> {\r\n if (command.name !== SAVE_COMMAND) {\r\n return;\r\n }\r\n return this.saveOwnedFields() as unknown as Promise<void>;\r\n }\r\n\r\n //#endregion\r\n\r\n //#region ----- Persistence -----\r\n\r\n private async saveOwnedFields(): Promise<AXPRuntimeCommandResult> {\r\n const root = this.rootContext() ?? {};\r\n const id = typeof root['id'] === 'string' ? root['id'] : '';\r\n const patch = this.getWizardStepContext();\r\n\r\n if (!id) {\r\n this.baseline.set(patch);\r\n this.recompute();\r\n return { success: true, kind: 'object', data: patch };\r\n }\r\n\r\n try {\r\n const dataAccessor = this.entityService.withEntity(ENTITY_FULL_NAME).data<any, any>();\r\n await dataAccessor.update(id, patch);\r\n this.baseline.set(patch);\r\n this.recompute();\r\n return { success: true, kind: 'object', data: patch };\r\n } catch (error) {\r\n return {\r\n success: false,\r\n message: {\r\n text: error instanceof Error ? error.message : '@general:messages.generic.error.description',\r\n },\r\n };\r\n }\r\n }\r\n\r\n private pickOwned(source: Record<string, unknown>, names: readonly string[]): Record<string, unknown> {\r\n const next: Record<string, unknown> = {};\r\n for (const name of names) {\r\n next[name] = source[name];\r\n }\r\n return next;\r\n }\r\n\r\n //#endregion\r\n}\r\n\r\n//#endregion\r\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAWA;AAEA;AAEM,SAAU,qCAAqC,CAAC,aAAgC,EAAA;AACpF,IAAA,MAAM,MAAM,GAAG,2BAA2B,EAAE;AAC5C,IAAA,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC;IACtC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC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IAAA,EAXS,0BAA0B,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAgBzB,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBApBhD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iCAAiC;AAC3C,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,0BAA0B,CAAC;AACrC,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,oCAAsC;AAClD,yBAAA;AACF,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA;;;;AAIT,EAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,qDAAqD;AAC7D,qBAAA;AACF,iBAAA;;;"}
@@ -6,7 +6,7 @@ import { ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY, ENTITY_DEFINITION_SURFACES
6
6
  //#region ----- Provider -----
7
7
  class AXMEntityDefinitionFormPageComponentProvider {
8
8
  async components() {
9
- const loader = () => import('./acorex-platform-module-platform-management-client-entity-definition-form-page.component-BB3e3REg.mjs').then((m) => m.AXMEntityDefinitionFormPageComponent);
9
+ const loader = () => import('./acorex-platform-module-platform-management-client-entity-definition-form-page.component-D3eE4jLj.mjs').then((m) => m.AXMEntityDefinitionFormPageComponent);
10
10
  return [
11
11
  { key: ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY, loader },
12
12
  { key: ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY, loader },
@@ -20,4 +20,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
20
20
  }] });
21
21
 
22
22
  export { AXMEntityDefinitionFormPageComponentProvider };
23
- //# sourceMappingURL=acorex-platform-module-platform-management-client-entity-definition-form-page.provider-CZYT6Trb.mjs.map
23
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-entity-definition-form-page.provider-DO3W-Hx1.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-platform-management-client-entity-definition-form-page.provider-CZYT6Trb.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/entity-definition/entity-definition-form-page.provider.ts"],"sourcesContent":["//#region ----- Imports -----\r\n\r\nimport {\r\n AXPPageComponentDefinition,\r\n AXPPageComponentProvider,\r\n} from '@acorex-platform/framework-client/layout/components';\r\nimport { Injectable } from '@angular/core';\r\nimport {\r\n ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY,\r\n ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY,\r\n} from '@acorex-platform/module-platform-management-client/contracts';\r\n\r\n//#endregion\r\n\r\n//#region ----- Provider -----\r\n\r\n@Injectable()\r\nexport class AXMEntityDefinitionFormPageComponentProvider implements AXPPageComponentProvider {\r\n async components(): Promise<AXPPageComponentDefinition[]> {\r\n const loader = () =>\r\n import('./entity-definition-form-page.component').then((m) => m.AXMEntityDefinitionFormPageComponent);\r\n\r\n return [\r\n { key: ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY, loader },\r\n { key: ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY, loader },\r\n ];\r\n }\r\n}\r\n\r\n//#endregion\r\n"],"names":[],"mappings":";;;;AAYA;AAEA;MAGa,4CAA4C,CAAA;AACvD,IAAA,MAAM,UAAU,GAAA;QACd,MAAM,MAAM,GAAG,MACb,OAAO,wGAAyC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,oCAAoC,CAAC;QAEvG,OAAO;AACL,YAAA,EAAE,GAAG,EAAE,2CAA2C,EAAE,MAAM,EAAE;AAC5D,YAAA,EAAE,GAAG,EAAE,6CAA6C,EAAE,MAAM,EAAE;SAC/D;IACH;8GATW,4CAA4C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA5C,4CAA4C,EAAA,CAAA,CAAA;;2FAA5C,4CAA4C,EAAA,UAAA,EAAA,CAAA;kBADxD;;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-entity-definition-form-page.provider-DO3W-Hx1.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/entity-definition/entity-definition-form-page.provider.ts"],"sourcesContent":["//#region ----- Imports -----\r\n\r\nimport {\r\n AXPPageComponentDefinition,\r\n AXPPageComponentProvider,\r\n} from '@acorex-platform/framework-client/layout/components';\r\nimport { Injectable } from '@angular/core';\r\nimport {\r\n ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY,\r\n ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY,\r\n} from '@acorex-platform/module-platform-management-client/contracts';\r\n\r\n//#endregion\r\n\r\n//#region ----- Provider -----\r\n\r\n@Injectable()\r\nexport class AXMEntityDefinitionFormPageComponentProvider implements AXPPageComponentProvider {\r\n async components(): Promise<AXPPageComponentDefinition[]> {\r\n const loader = () =>\r\n import('./entity-definition-form-page.component').then((m) => m.AXMEntityDefinitionFormPageComponent);\r\n\r\n return [\r\n { key: ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY, loader },\r\n { key: ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY, loader },\r\n ];\r\n }\r\n}\r\n\r\n//#endregion\r\n"],"names":[],"mappings":";;;;AAYA;AAEA;MAGa,4CAA4C,CAAA;AACvD,IAAA,MAAM,UAAU,GAAA;QACd,MAAM,MAAM,GAAG,MACb,OAAO,wGAAyC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,oCAAoC,CAAC;QAEvG,OAAO;AACL,YAAA,EAAE,GAAG,EAAE,2CAA2C,EAAE,MAAM,EAAE;AAC5D,YAAA,EAAE,GAAG,EAAE,6CAA6C,EAAE,MAAM,EAAE;SAC/D;IACH;8GATW,4CAA4C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA5C,4CAA4C,EAAA,CAAA,CAAA;;2FAA5C,4CAA4C,EAAA,UAAA,EAAA,CAAA;kBADxD;;;"}
@@ -52,4 +52,4 @@ function axmSummarizeMasterUiActionsForAi(entity, translateWithFallback) {
52
52
  //#endregion
53
53
 
54
54
  export { axmSummarizeMasterUiActionsForAi as a };
55
- //# sourceMappingURL=acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs.map
55
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-CZBJ4dXs.mjs.map
@@ -1 +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?.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AA,MAAM;YACN,GAAG,CAAC,IAAI,CAAC;gBACP,aAAa,EAAE,CAAC,CAAC,KAAK;gBACtB,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,CAAC,CAAC,KAAK,KAAK,QAAQ,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;AACjE,aAAA,CAAC;QACJ;AACA,QAAA,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE;AACnB,YAAA,uBAAuB,CAAC,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC;QAC7D;IACF;AACF;AAYA;;AAEG;AACG,SAAU,gCAAgC,CAC9C,MAAiB,EACjB,qBAA8C,EAAA;IAE9C,MAAM,WAAW,GAAqC,EAAE;IACxD,MAAM,aAAa,GAAqC,EAAE;AAE1D,IAAA,uBAAuB,CACrB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EACxC,qBAAqB,EACrB,WAAW,CACZ;AACD,IAAA,uBAAuB,CACrB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAC1C,qBAAqB,EACrB,aAAa,CACd;IAED,OAAO;QACL,WAAW;QACX,aAAa;KACd;AACH;AAEA;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-CZBJ4dXs.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,G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AAU,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EACxC,qBAAqB,EACrB,WAAW,CACZ;AACD,IAAA,uBAAuB,CACrB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAC1C,qBAAqB,EACrB,aAAa,CACd;IAED,OAAO;QACL,WAAW;QACX,aAAa;KACd;AACH;AAEA;;"}
@@ -146,4 +146,4 @@ function resolveExecuteTokenInput(raw) {
146
146
  }
147
147
 
148
148
  export { ExecuteTokenCommand };
149
- //# sourceMappingURL=acorex-platform-module-platform-management-client-execute-token.command-B_xwW9lb.mjs.map
149
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-execute-token.command-D-6zPkdc.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-platform-management-client-execute-token.command-B_xwW9lb.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 })\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,CAA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OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE;AACP,oBAAA,IAAI,EAAE,YAAY;AACnB,iBAAA;aACF;QACH;IACF;;;AAMQ,IAAA,mBAAmB,CAAC,KAAU,EAAA;QACpC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;AACzC,YAAA,OAAO,EAAE;QACX;AAEA,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC7B,YAAA,OAAO,KAAK;QACd;AAEA,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC7B,YAAA,IAAI;gBACF,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YACvC;AAAE,YAAA,MAAM;AACN,gBAAA,OAAO,MAAM,CAAC,KAAK,CAAC;YACtB;QACF;AAEA,QAAA,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB;8GA5JW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAnB,mBAAmB,EAAA,CAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B;;AAkKD,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;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-execute-token.command-D-6zPkdc.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 })\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;AAyJnE,IAAA;;;IAnJC,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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;IACtB;8GA5JW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAnB,mBAAmB,EAAA,CAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B;;AAkKD,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;;"}
@@ -68,4 +68,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
68
68
  }] });
69
69
 
70
70
  export { AXMListCatalogScopesQuery };
71
- //# sourceMappingURL=acorex-platform-module-platform-management-client-list-catalog-scopes.query-ByhDTWE6.mjs.map
71
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-list-catalog-scopes.query-BXoGbG82.mjs.map
@@ -1 +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;AAEA;;;AAGG;MAEU,yBAAyB,CAAA;AADtC,IAAA,WAAA,GAAA;;AAMmB,QAAA,IAAA,CAAA,oBAAoB,GAAG,MAAM,CAAC,wCAAwC,CAAC;AA6DzF,IAAA;;;IAvDC,MAAM,KAAK,CACT,KAA6C,EAAA;AAE7C,QAAA,IAAI;YACF,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,KAAK,EAAE;AACnD,YAAA,MAAM,MAAM,GAAG,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC;YAE5E,IAAI,KAAK,GAAoC;AAC1C,iBAAA,MAAM,CAAC,CAAC,KAAK,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC;AAC5D,iBAAA,GAAG,CAAC,CAAC,KAAK,MAAM;gBACf,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,KAAK,EAAE,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,KAAK,CAAC;gBACpD,WAAW,EAAE,KAAK,CAAC,WAAW;gBAC9B,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ;AACzB,aAAA,CAAC,CAAC;AAEL,YAAA,IAAI,KAAK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,IAAI,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE;AAC1E,YAAA,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE;QACvB;AACA,QAAA,OAAO,SAAS;IAClB;8GA/DW,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzB,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,yBAAyB,cADZ,MAAM,EAAA,CAAA,CAAA;;2FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-list-catalog-scopes.query-BXoGbG82.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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AAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzB,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,yBAAyB,cADZ,MAAM,EAAA,CAAA,CAAA;;2FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -65,4 +65,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
65
65
  }] });
66
66
 
67
67
  export { AXMListEditorWidgetsQuery };
68
- //# sourceMappingURL=acorex-platform-module-platform-management-client-list-editor-widgets.query-DITPMmbw.mjs.map
68
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-list-editor-widgets.query-Bmzf4dYS.mjs.map
@@ -1 +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;MA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,CAAC,KAAK,EAAE,IAAI,CAAC;AAC/C,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM;AAC1B,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;;;AAMA;;;AAGG;AACK,IAAA,kBAAkB,CAAC,KAAc,EAAA;AACvC,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC7B,YAAA,OAAO,KAAK;QACd;AACA,QAAA,OAAO,0BAA0B,CAAC,KAAK,EAAE,OAAO,CAAC;IACnD;8GA1DW,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzB,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,yBAAyB,cADZ,MAAM,EAAA,CAAA,CAAA;;2FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-list-editor-widgets.query-Bmzf4dYS.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,CAAC,MAAM,CAAC,IAAI,CAAC;gBACzB,KAAK,EAAE,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC;gBAC5C,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;AAChC,aAAA,CAAC,CAAC;AAEL,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD;AAEA,YAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,G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AAA,CAAA,CAAA;;2FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -4,7 +4,7 @@ import { runtimeQuerySuccessObject, runtimeQueryFailure } from '@acorex-platform
4
4
  import { AXPEntityResolver } from '@acorex-platform/framework-client/layout/entity';
5
5
  import * as i0 from '@angular/core';
6
6
  import { inject, Injectable } from '@angular/core';
7
- import { a as axmSummarizeMasterUiActionsForAi } from './acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs';
7
+ import { a as axmSummarizeMasterUiActionsForAi } from './acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-CZBJ4dXs.mjs';
8
8
 
9
9
  //#endregion
10
10
  //#region ---- Helpers ----
@@ -191,4 +191,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
191
191
  }] });
192
192
 
193
193
  export { AXMListPlatformNavigationForAiQuery };
194
- //# sourceMappingURL=acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-2oHMITw-.mjs.map
194
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-7_-GTKQw.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-2oHMITw-.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/queries/list-platform-navigation-for-ai.query.ts"],"sourcesContent":["import { AXTranslationService } from '@acorex/core/translation';\nimport type { AXPMenuItem } from '@acorex-platform/framework-client/common';\nimport { AXPMenuProviderService } from '@acorex-platform/framework-client/common';\nimport type { AXPQuery, AXPQueryFetchResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessObject,\n type AXPRuntimeQueryResult,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPEntityResolver } from '@acorex-platform/framework-client/layout/entity';\nimport { Injectable, inject } from '@angular/core';\n\nimport type { AXMEntityMasterUiActionsForAi } from './entity-master-actions-for-ai.util';\nimport { axmSummarizeMasterUiActionsForAi } from './entity-master-actions-for-ai.util';\n\n//#region ---- Types ----\n\nexport interface AXMListPlatformNavigationForAiQueryInput {\n /**\n * Single-line filter against resolved titles, `titleKey`, `menuName`, routing `path`,\n * and hierarchical path text (case-insensitive substring match).\n * When omitted, all visible menu rows after middleware are returned (truncated via `limit`).\n */\n quickSearch?: string;\n /**\n * Soft cap after filtering; enforced between 40 and 500. Omit for default **300**.\n */\n limit?: number;\n /**\n * When set to exact `ModuleName.EntityName`, the result includes **`entityMasterUiActions`**\n * (toolbar labels from registered entity layouts) alongside navigation rows — same derivation as **`ListRegisteredEntities`**.\n */\n entityFullName?: string;\n /**\n * When true, the result includes **`registeredEntitiesNotInSidebarMenu`** — resolver catalog entries whose\n * standard master path segment **`/m/{module}/e/{entity}/`** does not appear in any flattened menu **`path`**.\n * Heuristic (see result field); pair with **`ListRegisteredEntities`** for the full catalog.\n */\n includeRegisteredEntitiesNotInSidebarMenu?: boolean;\n}\n\n/** One flattened row from the middleware-applied sidebar / shell menu tree. */\nexport interface AXMPlatformNavigationAiRow {\n /** Stable menu item key when present (often useful for correlate with manifests). */\n menuName?: string;\n /** User-visible title resolved with {@link AXTranslationService.translateSync} when possible. */\n title: string;\n /** Original `text` from the menu definition (typically a `@scope:key` token). */\n titleKey: string;\n /** Breadcrumb of resolved ancestor titles separated by › (current item included last). */\n hierarchyPath: string;\n depth: number;\n /** Entity / page route fragment when navigable via router. */\n path?: string;\n /** `menu` | `group` | `break` when present — folder vs leaf-ish chrome. */\n menuType?: string;\n}\n\n/** `catalog`: no filter. `filtered`: `quickSearch` applied. `empty`: matched nothing. */\nexport type AXMPlatformNavigationAiMatchStatus = 'catalog' | 'filtered' | 'empty';\n\nexport interface AXMListPlatformNavigationForAiQueryResult {\n matchStatus: AXMPlatformNavigationAiMatchStatus;\n /** Flattened menu rows sorted by hierarchy path — how-to answers should cite these verbatim. */\n navigation: AXMPlatformNavigationAiRow[];\n truncated: boolean;\n /**\n * Present when **`entityFullName`** was supplied: master list + detail toolbar action labels from the resolver.\n * `null` when the entity did not resolve.\n */\n entityMasterUiActions?: AXMEntityMasterUiActionsForAi | null;\n entityMasterUiActionsMatch?: AXMNavigationEntityUiActionsMatch;\n /**\n * Present when **`includeRegisteredEntitiesNotInSidebarMenu`** was true: `Module.Entity` keys from\n * {@link AXPEntityResolver.listAll} with no matching **`/m/{module}/e/{entity}/`** segment in any menu **`path`**.\n * Entities reachable only via lookups, merge-detail, related lists, or **`command`** navigation (no `path`) can appear here.\n */\n registeredEntitiesNotInSidebarMenu?: string[];\n}\n\n/** Resolver outcome for optional {@link AXMListPlatformNavigationForAiQueryInput.entityFullName}. */\nexport type AXMNavigationEntityUiActionsMatch = 'none' | 'single';\n\n//#endregion\n\n//#region ---- Helpers ----\n\nconst DEFAULT_ROW_LIMIT = 300;\nconst MIN_ROW_LIMIT = 40;\nconst MAX_ROW_LIMIT = 500;\n\nfunction normalizeLimit(raw: unknown): number {\n if (typeof raw === 'number' && Number.isFinite(raw)) {\n const n = Math.floor(raw);\n return Math.min(MAX_ROW_LIMIT, Math.max(MIN_ROW_LIMIT, n));\n }\n if (typeof raw === 'string') {\n const parsed = Number.parseInt(raw.trim(), 10);\n if (Number.isFinite(parsed)) {\n return Math.min(MAX_ROW_LIMIT, Math.max(MIN_ROW_LIMIT, parsed));\n }\n }\n return DEFAULT_ROW_LIMIT;\n}\n\nfunction matchesFold(haystack: string, needle: string): boolean {\n return haystack.toLocaleUpperCase().includes(needle.toLocaleUpperCase());\n}\n\n/** Expects **`Module.Entity`** (`SecurityManagement.User`). */\nfunction parseRegisteredEntityFullName(fullName: string): { module: string; name: string } | null {\n const trimmed = fullName.trim();\n const dot = trimmed.indexOf('.');\n if (dot <= 0 || dot >= trimmed.length - 1) {\n return null;\n }\n return { module: trimmed.slice(0, dot), name: trimmed.slice(dot + 1) };\n}\n\n/**\n * Collects `Module.Entity` keys implied by entity master router paths on menu rows\n * (`/{app}/m/{module}/e/{entity}/...`).\n */\nfunction collectEntityFullNamesFromMenuPaths(paths: Iterable<string | undefined>): Set<string> {\n const seen = new Set<string>();\n const re = /\\/m\\/([^/?#]+)\\/e\\/([^/?#]+)\\//g;\n for (const raw of paths) {\n if (!raw) {\n continue;\n }\n re.lastIndex = 0;\n let m: RegExpExecArray | null;\n while ((m = re.exec(raw)) !== null) {\n seen.add(`${m[1]}.${m[2]}`);\n }\n }\n return seen;\n}\n\n//#endregion\n\n//#region ---- List platform navigation for AI ----\n\n/**\n * Builds a flattened, searchable view of visible platform menu entries (middleware-filtered snapshot)\n * for product “how‑to” and navigation assistants. Intended for **read-only grounding** —\n * callers should complement with entity schema tools when field-level detail matters.\n * **Sidebar menus are not the full entity catalog** — use optional **`includeRegisteredEntitiesNotInSidebarMenu`**\n * or **`ListRegisteredEntities`** when assistants must not equate “in the menu” with “all registered entities”.\n * Optional **`entityFullName`** (`Module.Entity`) adds toolbar action labels from that entity’s master interfaces.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListPlatformNavigationForAiQuery\n implements AXPQuery<AXMListPlatformNavigationForAiQueryInput, AXMListPlatformNavigationForAiQueryResult>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly menuProviders = inject(AXPMenuProviderService);\n private readonly translation = inject(AXTranslationService);\n private readonly entityResolver = inject(AXPEntityResolver);\n\n //#endregion\n\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListPlatformNavigationForAiQueryInput | null,\n ): AXPQueryFetchResultPromise<AXMListPlatformNavigationForAiQueryResult> {\n try {\n const opts = input ?? {};\n const limit = normalizeLimit(opts.limit);\n const search = opts.quickSearch?.trim();\n\n const entityFullName = opts.entityFullName?.trim();\n\n const tree = await this.menuProviders.items();\n const flattened = this.flattenMenus(tree);\n const linkedFromMenuPaths = collectEntityFullNamesFromMenuPaths(flattened.map((r) => r.path));\n\n let rows = flattened;\n if (search) {\n rows = flattened.filter((r) =>\n matchesFold(`${r.menuName ?? ''}|${r.title}|${r.titleKey}|${r.path ?? ''}|${r.hierarchyPath}`, search),\n );\n }\n\n rows.sort((a, b) => a.hierarchyPath.localeCompare(b.hierarchyPath));\n\n let matchStatus: AXMPlatformNavigationAiMatchStatus;\n if (search && rows.length === 0) {\n matchStatus = 'empty';\n } else if (search) {\n matchStatus = 'filtered';\n } else {\n matchStatus = 'catalog';\n }\n\n const truncated = rows.length > limit;\n\n let entityMasterUiActions: AXMEntityMasterUiActionsForAi | null | undefined;\n let entityMasterUiActionsMatch: AXMNavigationEntityUiActionsMatch | undefined;\n\n if (entityFullName) {\n const parsed = parseRegisteredEntityFullName(entityFullName);\n if (!parsed) {\n entityMasterUiActions = null;\n entityMasterUiActionsMatch = 'none';\n } else {\n const def = await this.entityResolver.get(parsed.module, parsed.name);\n if (def) {\n entityMasterUiActions = axmSummarizeMasterUiActionsForAi(def, (key) =>\n this.resolveMenuTitle(key),\n );\n entityMasterUiActionsMatch = 'single';\n } else {\n entityMasterUiActions = null;\n entityMasterUiActionsMatch = 'none';\n }\n }\n }\n\n let registeredEntitiesNotInSidebarMenu: string[] | undefined;\n if (opts.includeRegisteredEntitiesNotInSidebarMenu) {\n const catalog = await this.entityResolver.listAll();\n const sortedCatalog = [...catalog].sort((a, b) => {\n const byModule = a.module.localeCompare(b.module);\n return byModule !== 0 ? byModule : a.name.localeCompare(b.name);\n });\n registeredEntitiesNotInSidebarMenu = sortedCatalog\n .filter((e) => !linkedFromMenuPaths.has(e.fullName))\n .map((e) => e.fullName);\n }\n\n return runtimeQuerySuccessObject({\n matchStatus,\n truncated,\n navigation: rows.slice(0, limit),\n ...(entityFullName\n ? {\n entityMasterUiActions: entityMasterUiActions ?? null,\n entityMasterUiActionsMatch,\n }\n : {}),\n ...(registeredEntitiesNotInSidebarMenu !== undefined\n ? { registeredEntitiesNotInSidebarMenu }\n : {}),\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n\n //#region ---- Private ----\n\n private resolveMenuTitle(text: string): string {\n try {\n return this.translation.translateSync(text);\n } catch {\n return text;\n }\n }\n\n private flattenMenus(items: AXPMenuItem[]): AXMPlatformNavigationAiRow[] {\n const rows: AXMPlatformNavigationAiRow[] = [];\n\n const walk = (nodes: AXPMenuItem[], ancestorsResolved: string[]): void => {\n for (const item of nodes) {\n const title = this.resolveMenuTitle(item.text);\n const ancestors = [...ancestorsResolved, title];\n\n rows.push({\n menuName: item.name,\n title,\n titleKey: item.text,\n hierarchyPath: ancestors.join(' › '),\n depth: ancestorsResolved.length,\n ...(item.path ? { path: item.path } : {}),\n ...(item.type ? { menuType: item.type } : {}),\n });\n\n if (item.children?.length) {\n walk(item.children, ancestors);\n }\n }\n };\n\n walk(items, []);\n return rows;\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;AAmFA;AAEA;AAEA,MAAM,iBAAiB,GAAG,GAAG;AAC7B,MAAM,aAAa,GAAG,EAAE;AACxB,MAAM,aAAa,GAAG,GAAG;AAEzB,SAAS,cAAc,CAAC,GAAY,EAAA;AAClC,IAAA,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACnD,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;AACzB,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;IAC5D;AACA,IAAA,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AAC3B,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC;AAC9C,QAAA,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC3B,YAAA,OAAO,IAAI,CAAC,G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;;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-7_-GTKQw.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/queries/list-platform-navigation-for-ai.query.ts"],"sourcesContent":["import { AXTranslationService } from '@acorex/core/translation';\nimport type { AXPMenuItem } from '@acorex-platform/framework-client/common';\nimport { AXPMenuProviderService } from '@acorex-platform/framework-client/common';\nimport type { AXPQuery, AXPQueryFetchResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessObject,\n type AXPRuntimeQueryResult,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPEntityResolver } from '@acorex-platform/framework-client/layout/entity';\nimport { Injectable, inject } from '@angular/core';\n\nimport type { AXMEntityMasterUiActionsForAi } from './entity-master-actions-for-ai.util';\nimport { axmSummarizeMasterUiActionsForAi } from './entity-master-actions-for-ai.util';\n\n//#region ---- Types ----\n\nexport interface AXMListPlatformNavigationForAiQueryInput {\n /**\n * Single-line filter against resolved titles, `titleKey`, `menuName`, routing `path`,\n * and hierarchical path text (case-insensitive substring match).\n * When omitted, all visible menu rows after middleware are returned (truncated via `limit`).\n */\n quickSearch?: string;\n /**\n * Soft cap after filtering; enforced between 40 and 500. Omit for default **300**.\n */\n limit?: number;\n /**\n * When set to exact `ModuleName.EntityName`, the result includes **`entityMasterUiActions`**\n * (toolbar labels from registered entity layouts) alongside navigation rows — same derivation as **`ListRegisteredEntities`**.\n */\n entityFullName?: string;\n /**\n * When true, the result includes **`registeredEntitiesNotInSidebarMenu`** — resolver catalog entries whose\n * standard master path segment **`/m/{module}/e/{entity}/`** does not appear in any flattened menu **`path`**.\n * Heuristic (see result field); pair with **`ListRegisteredEntities`** for the full catalog.\n */\n includeRegisteredEntitiesNotInSidebarMenu?: boolean;\n}\n\n/** One flattened row from the middleware-applied sidebar / shell menu tree. */\nexport interface AXMPlatformNavigationAiRow {\n /** Stable menu item key when present (often useful for correlate with manifests). */\n menuName?: string;\n /** User-visible title resolved with {@link AXTranslationService.translateSync} when possible. */\n title: string;\n /** Original `text` from the menu definition (typically a `@scope:key` token). */\n titleKey: string;\n /** Breadcrumb of resolved ancestor titles separated by › (current item included last). */\n hierarchyPath: string;\n depth: number;\n /** Entity / page route fragment when navigable via router. */\n path?: string;\n /** `menu` | `group` | `break` when present — folder vs leaf-ish chrome. */\n menuType?: string;\n}\n\n/** `catalog`: no filter. `filtered`: `quickSearch` applied. `empty`: matched nothing. */\nexport type AXMPlatformNavigationAiMatchStatus = 'catalog' | 'filtered' | 'empty';\n\nexport interface AXMListPlatformNavigationForAiQueryResult {\n matchStatus: AXMPlatformNavigationAiMatchStatus;\n /** Flattened menu rows sorted by hierarchy path — how-to answers should cite these verbatim. */\n navigation: AXMPlatformNavigationAiRow[];\n truncated: boolean;\n /**\n * Present when **`entityFullName`** was supplied: master list + detail toolbar action labels from the resolver.\n * `null` when the entity did not resolve.\n */\n entityMasterUiActions?: AXMEntityMasterUiActionsForAi | null;\n entityMasterUiActionsMatch?: AXMNavigationEntityUiActionsMatch;\n /**\n * Present when **`includeRegisteredEntitiesNotInSidebarMenu`** was true: `Module.Entity` keys from\n * {@link AXPEntityResolver.listAll} with no matching **`/m/{module}/e/{entity}/`** segment in any menu **`path`**.\n * Entities reachable only via lookups, merge-detail, related lists, or **`command`** navigation (no `path`) can appear here.\n */\n registeredEntitiesNotInSidebarMenu?: string[];\n}\n\n/** Resolver outcome for optional {@link AXMListPlatformNavigationForAiQueryInput.entityFullName}. */\nexport type AXMNavigationEntityUiActionsMatch = 'none' | 'single';\n\n//#endregion\n\n//#region ---- Helpers ----\n\nconst DEFAULT_ROW_LIMIT = 300;\nconst MIN_ROW_LIMIT = 40;\nconst MAX_ROW_LIMIT = 500;\n\nfunction normalizeLimit(raw: unknown): number {\n if (typeof raw === 'number' && Number.isFinite(raw)) {\n const n = Math.floor(raw);\n return Math.min(MAX_ROW_LIMIT, Math.max(MIN_ROW_LIMIT, n));\n }\n if (typeof raw === 'string') {\n const parsed = Number.parseInt(raw.trim(), 10);\n if (Number.isFinite(parsed)) {\n return Math.min(MAX_ROW_LIMIT, Math.max(MIN_ROW_LIMIT, parsed));\n }\n }\n return DEFAULT_ROW_LIMIT;\n}\n\nfunction matchesFold(haystack: string, needle: string): boolean {\n return haystack.toLocaleUpperCase().includes(needle.toLocaleUpperCase());\n}\n\n/** Expects **`Module.Entity`** (`SecurityManagement.User`). */\nfunction parseRegisteredEntityFullName(fullName: string): { module: string; name: string } | null {\n const trimmed = fullName.trim();\n const dot = trimmed.indexOf('.');\n if (dot <= 0 || dot >= trimmed.length - 1) {\n return null;\n }\n return { module: trimmed.slice(0, dot), name: trimmed.slice(dot + 1) };\n}\n\n/**\n * Collects `Module.Entity` keys implied by entity master router paths on menu rows\n * (`/{app}/m/{module}/e/{entity}/...`).\n */\nfunction collectEntityFullNamesFromMenuPaths(paths: Iterable<string | undefined>): Set<string> {\n const seen = new Set<string>();\n const re = /\\/m\\/([^/?#]+)\\/e\\/([^/?#]+)\\//g;\n for (const raw of paths) {\n if (!raw) {\n continue;\n }\n re.lastIndex = 0;\n let m: RegExpExecArray | null;\n while ((m = re.exec(raw)) !== null) {\n seen.add(`${m[1]}.${m[2]}`);\n }\n }\n return seen;\n}\n\n//#endregion\n\n//#region ---- List platform navigation for AI ----\n\n/**\n * Builds a flattened, searchable view of visible platform menu entries (middleware-filtered snapshot)\n * for product “how‑to” and navigation assistants. Intended for **read-only grounding** —\n * callers should complement with entity schema tools when field-level detail matters.\n * **Sidebar menus are not the full entity catalog** — use optional **`includeRegisteredEntitiesNotInSidebarMenu`**\n * or **`ListRegisteredEntities`** when assistants must not equate “in the menu” with “all registered entities”.\n * Optional **`entityFullName`** (`Module.Entity`) adds toolbar action labels from that entity’s master interfaces.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListPlatformNavigationForAiQuery\n implements AXPQuery<AXMListPlatformNavigationForAiQueryInput, AXMListPlatformNavigationForAiQueryResult>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly menuProviders = inject(AXPMenuProviderService);\n private readonly translation = inject(AXTranslationService);\n private readonly entityResolver = inject(AXPEntityResolver);\n\n //#endregion\n\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListPlatformNavigationForAiQueryInput | null,\n ): AXPQueryFetchResultPromise<AXMListPlatformNavigationForAiQueryResult> {\n try {\n const opts = input ?? {};\n const limit = normalizeLimit(opts.limit);\n const search = opts.quickSearch?.trim();\n\n const entityFullName = opts.entityFullName?.trim();\n\n const tree = await this.menuProviders.items();\n const flattened = this.flattenMenus(tree);\n const linkedFromMenuPaths = collectEntityFullNamesFromMenuPaths(flattened.map((r) => r.path));\n\n let rows = flattened;\n if (search) {\n rows = flattened.filter((r) =>\n matchesFold(`${r.menuName ?? ''}|${r.title}|${r.titleKey}|${r.path ?? ''}|${r.hierarchyPath}`, search),\n );\n }\n\n rows.sort((a, b) => a.hierarchyPath.localeCompare(b.hierarchyPath));\n\n let matchStatus: AXMPlatformNavigationAiMatchStatus;\n if (search && rows.length === 0) {\n matchStatus = 'empty';\n } else if (search) {\n matchStatus = 'filtered';\n } else {\n matchStatus = 'catalog';\n }\n\n const truncated = rows.length > limit;\n\n let entityMasterUiActions: AXMEntityMasterUiActionsForAi | null | undefined;\n let entityMasterUiActionsMatch: AXMNavigationEntityUiActionsMatch | undefined;\n\n if (entityFullName) {\n const parsed = parseRegisteredEntityFullName(entityFullName);\n if (!parsed) {\n entityMasterUiActions = null;\n entityMasterUiActionsMatch = 'none';\n } else {\n const def = await this.entityResolver.get(parsed.module, parsed.name);\n if (def) {\n entityMasterUiActions = axmSummarizeMasterUiActionsForAi(def, (key) =>\n this.resolveMenuTitle(key),\n );\n entityMasterUiActionsMatch = 'single';\n } else {\n entityMasterUiActions = null;\n entityMasterUiActionsMatch = 'none';\n }\n }\n }\n\n let registeredEntitiesNotInSidebarMenu: string[] | undefined;\n if (opts.includeRegisteredEntitiesNotInSidebarMenu) {\n const catalog = await this.entityResolver.listAll();\n const sortedCatalog = [...catalog].sort((a, b) => {\n const byModule = a.module.localeCompare(b.module);\n return byModule !== 0 ? byModule : a.name.localeCompare(b.name);\n });\n registeredEntitiesNotInSidebarMenu = sortedCatalog\n .filter((e) => !linkedFromMenuPaths.has(e.fullName))\n .map((e) => e.fullName);\n }\n\n return runtimeQuerySuccessObject({\n matchStatus,\n truncated,\n navigation: rows.slice(0, limit),\n ...(entityFullName\n ? {\n entityMasterUiActions: entityMasterUiActions ?? null,\n entityMasterUiActionsMatch,\n }\n : {}),\n ...(registeredEntitiesNotInSidebarMenu !== undefined\n ? { registeredEntitiesNotInSidebarMenu }\n : {}),\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n\n //#region ---- Private ----\n\n private resolveMenuTitle(text: string): string {\n try {\n return this.translation.translateSync(text);\n } catch {\n return text;\n }\n }\n\n private flattenMenus(items: AXPMenuItem[]): AXMPlatformNavigationAiRow[] {\n const rows: AXMPlatformNavigationAiRow[] = [];\n\n const walk = (nodes: AXPMenuItem[], ancestorsResolved: string[]): void => {\n for (const item of nodes) {\n const title = this.resolveMenuTitle(item.text);\n const ancestors = [...ancestorsResolved, title];\n\n rows.push({\n menuName: item.name,\n title,\n titleKey: item.text,\n hierarchyPath: ancestors.join(' › '),\n depth: ancestorsResolved.length,\n ...(item.path ? { path: item.path } : {}),\n ...(item.type ? { menuType: item.type } : {}),\n });\n\n if (item.children?.length) {\n walk(item.children, ancestors);\n }\n }\n };\n\n walk(items, []);\n return rows;\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;AAmFA;AAEA;AAEA,MAAM,iBAAiB,GAAG,GAAG;AAC7B,MAAM,aAAa,GAAG,EAAE;AACxB,MAAM,aAAa,GAAG,GAAG;AAEzB,SAAS,cAAc,CAAC,GAAY,EAAA;AAClC,IAAA,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,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,CAAC,KAAK,EAAE,EAAE,CAAC;AACf,QAAA,OAAO,IAAI;IACb;8GA5IW,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnC,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,mCAAmC,cADtB,MAAM,EAAA,CAAA,CAAA;;2FACnB,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAD/C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -4,7 +4,7 @@ import { AXTranslationService } from '@acorex/core/translation';
4
4
  import { AXPEntityResolver } from '@acorex-platform/framework-client/layout/entity';
5
5
  import * as i0 from '@angular/core';
6
6
  import { inject, Injectable } from '@angular/core';
7
- import { a as axmSummarizeMasterUiActionsForAi } from './acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs';
7
+ import { a as axmSummarizeMasterUiActionsForAi } from './acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-CZBJ4dXs.mjs';
8
8
 
9
9
  //#endregion
10
10
  //#region ----- Property summary -----
@@ -194,4 +194,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
194
194
  }] });
195
195
 
196
196
  export { AXMListRegisteredEntitiesQuery };
197
- //# sourceMappingURL=acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs.map
197
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-list-registered-entities.query-01gokkyo.mjs.map