@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.
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog.mjs +1 -1
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/fesm2022/acorex-platform-module-platform-management-client.mjs +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/queries/list-registered-entities.query.ts"],"sourcesContent":["import { AXPQuery, type AXPQueryFetchResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n AXP_ENTITY_CATALOG_SEARCH_MAX_ROWS,\n axpMatchEntityCatalogSearch,\n axpResolveEntityCatalogByFullName,\n collectEntityQuickSearchFieldPaths,\n type AXPEntity,\n type AXPEntityProperty,\n} from '@acorex-platform/framework-shared/entity';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessObject,\n} from '@acorex-platform/framework-shared/core';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPEntityResolver } from '@acorex-platform/framework-client/layout/entity';\n\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 AXMListRegisteredEntitiesQueryInput {\n /**\n * Optional `ModuleName.EntityName`. When set, the result is resolved to that entity\n * (exact, then case-insensitive, then bare name).\n */\n entityFullName?: string;\n /** Broad catalog search: name, fullName, translated titles, and `searchTags`. */\n search?: string;\n /** Match only entity-definition `searchTags`. */\n searchTag?: string;\n /**\n * When false, never include `properties`.\n * When true or omitted: include `properties` only if exactly one entity matched.\n * Multiple matches never include `properties`. Catalog dump never includes `properties`.\n */\n includeDetails?: boolean;\n}\n\nexport interface AXMRegisteredEntityPropertySummary {\n name: string;\n title: string;\n dataType: string;\n /** True when the entity property has `validations: [{ rule: 'required' }]`. */\n required: boolean;\n /** Editor/widget type when present (e.g. lookup). */\n interfaceType?: string;\n /** For lookup-like fields: related catalog entity as `Module.Entity`. */\n lookupEntity?: string;\n /**\n * Denormalized value paths on stored rows (lodash `get` paths for filters), e.g. `brand.title` alongside `brandId`.\n */\n filterValuePaths?: string[];\n}\n\nexport interface AXMListRegisteredEntitiesQueryItem {\n /** Module key as registered on entity loaders (first segment of fullName). */\n module: string;\n /** Entity name (second segment of fullName). */\n name: string;\n /** Canonical `ModuleName.EntityName` string; use this value for Entity:GetDetails `entity`. */\n fullName: string;\n title?: string;\n searchTags?: string[];\n /**\n * Present when exactly one entity matched and `includeDetails` was not false.\n */\n properties?: AXMRegisteredEntityPropertySummary[];\n /**\n * Master **list** and **detail (single)** toolbar actions when `properties` are included.\n */\n masterUiActions?: AXMEntityMasterUiActionsForAi;\n /**\n * lodash-get paths included in mock storage **`quickSearch`** when `properties` are included.\n */\n quickSearchPaths?: string[];\n}\n\n/** How the result relates to the filter; omitted when success is false. */\nexport type AXMListRegisteredEntitiesMatchStatus = 'none' | 'single' | 'multiple' | 'catalog';\n\nexport interface AXMListRegisteredEntitiesQueryResult {\n /** Documents catalog vs filter match cardinality for agents. */\n matchStatus: AXMListRegisteredEntitiesMatchStatus;\n entities: AXMListRegisteredEntitiesQueryItem[];\n /** Pre-cap match count for `search` / `searchTag`. */\n totalMatched?: number;\n}\n\n//#endregion\n\n//#region ----- Property summary -----\n\nfunction hasRequiredValidation(validations: AXPEntityProperty['validations']): boolean {\n return Array.isArray(validations) && validations.some((v) => v.rule === 'required');\n}\n\nfunction toRegisteredEntityPropertySummary(prop: AXPEntityProperty): AXMRegisteredEntityPropertySummary {\n const iface = prop.schema?.interface;\n const rawType = iface?.type;\n const interfaceType = typeof rawType === 'string' ? rawType : undefined;\n const opts = iface?.options as Record<string, unknown> | undefined;\n\n let lookupEntity: string | undefined;\n let filterValuePaths: string[] | undefined;\n\n if (opts && typeof opts['entity'] === 'string' && opts['entity'].trim()) {\n lookupEntity = opts['entity'].trim();\n }\n\n const expose = opts?.['expose'];\n if (Array.isArray(expose)) {\n const paths = expose\n .map((row) => (row && typeof row === 'object' ? (row as { target?: unknown }).target : undefined))\n .filter((t): t is string => typeof t === 'string' && t.length > 0);\n if (paths.length) {\n filterValuePaths = paths;\n }\n }\n\n const required = hasRequiredValidation(prop.validations);\n\n return {\n name: prop.name,\n title: prop.title,\n dataType: prop.schema?.dataType ?? 'unknown',\n required,\n ...(interfaceType ? { interfaceType } : {}),\n ...(lookupEntity ? { lookupEntity } : {}),\n ...(filterValuePaths ? { filterValuePaths } : {}),\n };\n}\n\nfunction matchStatusForCount(count: number): Exclude<AXMListRegisteredEntitiesMatchStatus, 'catalog'> {\n if (count === 0) {\n return 'none';\n }\n if (count === 1) {\n return 'single';\n }\n return 'multiple';\n}\n\nfunction coerceOptionalBoolean(value: unknown): boolean | undefined {\n if (value === true || value === 'true' || value === 1 || value === '1') {\n return true;\n }\n if (value === false || value === 'false' || value === 0 || value === '0') {\n return false;\n }\n return undefined;\n}\n\n//#endregion\n\n//#region ----- List Registered Entities Query -----\n\n/**\n * Lists registered entities. Omit filters for a lightweight full catalog (no `properties`).\n * Pass `search` / `searchTag` to bound the list; `properties` only when exactly one entity matches.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListRegisteredEntitiesQuery\n implements AXPQuery<AXMListRegisteredEntitiesQueryInput, AXMListRegisteredEntitiesQueryResult>\n{\n //#region ----- Services & Dependencies -----\n\n private readonly entityResolver = inject(AXPEntityResolver);\n private readonly translation = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Query Execution -----\n\n async fetch(\n input?: AXMListRegisteredEntitiesQueryInput | null,\n ): AXPQueryFetchResultPromise<AXMListRegisteredEntitiesQueryResult> {\n try {\n const opts = input ?? {};\n const targetFullName = opts.entityFullName?.trim();\n const search = opts.search?.trim();\n const searchTag = opts.searchTag?.trim();\n const includeDetails = coerceOptionalBoolean(opts.includeDetails);\n const entries = await this.entityResolver.listAll();\n\n const sorted = [...entries].sort((a, b) => {\n const byModule = a.module.localeCompare(b.module);\n if (byModule !== 0) {\n return byModule;\n }\n return a.name.localeCompare(b.name);\n });\n\n let matched = sorted;\n let matchStatus: AXMListRegisteredEntitiesMatchStatus;\n let totalMatched: number | undefined;\n let includeCatalogHints = false;\n\n if (targetFullName) {\n matched = axpResolveEntityCatalogByFullName(sorted, targetFullName);\n matchStatus = matchStatusForCount(matched.length);\n includeCatalogHints = true;\n } else if (search || searchTag) {\n const scored: Array<{ entry: (typeof sorted)[number]; def: AXPEntity | null; score: number }> = [];\n for (const entry of sorted) {\n const def = await this.entityResolver.get(entry.module, entry.name);\n const extraTexts = def\n ? [\n this.resolveEntityCopy(def.title),\n this.resolveEntityCopy(def.formats.individual),\n this.resolveEntityCopy(def.formats.plural),\n ]\n : [];\n const { score } = axpMatchEntityCatalogSearch(\n {\n module: entry.module,\n name: entry.name,\n fullName: entry.fullName,\n title: def?.title,\n formatsIndividual: def?.formats?.individual,\n formatsPlural: def?.formats?.plural,\n searchTags: def?.searchTags,\n extraTexts,\n },\n search,\n searchTag,\n );\n if (score > 0) {\n scored.push({ entry, def, score });\n }\n }\n scored.sort((a, b) => b.score - a.score || a.entry.fullName.localeCompare(b.entry.fullName));\n totalMatched = scored.length;\n matched = scored.slice(0, AXP_ENTITY_CATALOG_SEARCH_MAX_ROWS).map((row) => row.entry);\n matchStatus = matchStatusForCount(totalMatched);\n includeCatalogHints = true;\n } else {\n matchStatus = 'catalog';\n }\n\n const includeProperties = includeDetails !== false && matchStatus === 'single';\n const entities: AXMListRegisteredEntitiesQueryItem[] = [];\n\n for (const entry of matched) {\n const base: AXMListRegisteredEntitiesQueryItem = {\n module: entry.module,\n name: entry.name,\n fullName: entry.fullName,\n };\n\n const needDef = includeProperties || includeCatalogHints;\n const def = needDef ? await this.entityResolver.get(entry.module, entry.name) : null;\n\n if (includeCatalogHints && def) {\n const resolvedTitle = this.resolveEntityCopy(def.title);\n if (resolvedTitle) {\n base.title = resolvedTitle;\n }\n if (def.searchTags?.length) {\n base.searchTags = def.searchTags;\n }\n }\n\n if (includeProperties && def) {\n const props = def.properties?.map(toRegisteredEntityPropertySummary) ?? [];\n const masterUiActions = axmSummarizeMasterUiActionsForAi(def, (k) => this.resolveEntityCopy(k));\n const quickSearchPaths = await collectEntityQuickSearchFieldPaths(def, (m, n) =>\n this.entityResolver.get(m, n),\n );\n entities.push({\n ...base,\n properties: props,\n ...(quickSearchPaths?.length ? { quickSearchPaths } : {}),\n ...(masterUiActions ? { masterUiActions } : {}),\n });\n } else {\n entities.push(base);\n }\n }\n\n return runtimeQuerySuccessObject({\n matchStatus,\n entities,\n ...(totalMatched != null ? { totalMatched } : {}),\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 helpers -----\n\n private resolveEntityCopy(text: string): string {\n try {\n return this.translation.translateSync(text);\n } catch {\n return text;\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;AA2FA;AAEA;AAEA,SAAS,qBAAqB,CAAC,WAA6C,EAAA;IAC1E,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC;AACrF;AAEA,SAAS,iCAAiC,CAAC,IAAuB,EAAA;AAChE,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,SAAS;AACpC,IAAA,MAAM,OAAO,GAAG,KAAK,EAAE,IAAI;AAC3B,IAAA,MAAM,aAAa,GAAG,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,SAAS;AACvE,IAAA,MAAM,IAAI,GAAG,KAAK,EAAE,OAA8C;AAElE,IAAA,IAAI,YAAgC;AACpC,IAAA,IAAI,gBAAsC;AAE1C,IAAA,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,C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AO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;;;AAMQ,IAAA,iBAAiB,CAAC,IAAY,EAAA;AACpC,QAAA,IAAI;YACF,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC;QAC7C;AAAE,QAAA,MAAM;AACN,YAAA,OAAO,IAAI;QACb;IACF;8GA5IW,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA9B,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,8BAA8B,cADjB,MAAM,EAAA,CAAA,CAAA;;2FACnB,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAD1C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-list-registered-entities.query-01gokkyo.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/queries/list-registered-entities.query.ts"],"sourcesContent":["import { AXPQuery, type AXPQueryFetchResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n AXP_ENTITY_CATALOG_SEARCH_MAX_ROWS,\n axpMatchEntityCatalogSearch,\n axpResolveEntityCatalogByFullName,\n collectEntityQuickSearchFieldPaths,\n type AXPEntity,\n type AXPEntityProperty,\n} from '@acorex-platform/framework-shared/entity';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessObject,\n} from '@acorex-platform/framework-shared/core';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPEntityResolver } from '@acorex-platform/framework-client/layout/entity';\n\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 AXMListRegisteredEntitiesQueryInput {\n /**\n * Optional `ModuleName.EntityName`. When set, the result is resolved to that entity\n * (exact, then case-insensitive, then bare name).\n */\n entityFullName?: string;\n /** Broad catalog search: name, fullName, translated titles, and `searchTags`. */\n search?: string;\n /** Match only entity-definition `searchTags`. */\n searchTag?: string;\n /**\n * When false, never include `properties`.\n * When true or omitted: include `properties` only if exactly one entity matched.\n * Multiple matches never include `properties`. Catalog dump never includes `properties`.\n */\n includeDetails?: boolean;\n}\n\nexport interface AXMRegisteredEntityPropertySummary {\n name: string;\n title: string;\n dataType: string;\n /** True when the entity property has `validations: [{ rule: 'required' }]`. */\n required: boolean;\n /** Editor/widget type when present (e.g. lookup). */\n interfaceType?: string;\n /** For lookup-like fields: related catalog entity as `Module.Entity`. */\n lookupEntity?: string;\n /**\n * Denormalized value paths on stored rows (lodash `get` paths for filters), e.g. `brand.title` alongside `brandId`.\n */\n filterValuePaths?: string[];\n}\n\nexport interface AXMListRegisteredEntitiesQueryItem {\n /** Module key as registered on entity loaders (first segment of fullName). */\n module: string;\n /** Entity name (second segment of fullName). */\n name: string;\n /** Canonical `ModuleName.EntityName` string; use this value for Entity:GetDetails `entity`. */\n fullName: string;\n title?: string;\n searchTags?: string[];\n /**\n * Present when exactly one entity matched and `includeDetails` was not false.\n */\n properties?: AXMRegisteredEntityPropertySummary[];\n /**\n * Master **list** and **detail (single)** toolbar actions when `properties` are included.\n */\n masterUiActions?: AXMEntityMasterUiActionsForAi;\n /**\n * lodash-get paths included in mock storage **`quickSearch`** when `properties` are included.\n */\n quickSearchPaths?: string[];\n}\n\n/** How the result relates to the filter; omitted when success is false. */\nexport type AXMListRegisteredEntitiesMatchStatus = 'none' | 'single' | 'multiple' | 'catalog';\n\nexport interface AXMListRegisteredEntitiesQueryResult {\n /** Documents catalog vs filter match cardinality for agents. */\n matchStatus: AXMListRegisteredEntitiesMatchStatus;\n entities: AXMListRegisteredEntitiesQueryItem[];\n /** Pre-cap match count for `search` / `searchTag`. */\n totalMatched?: number;\n}\n\n//#endregion\n\n//#region ----- Property summary -----\n\nfunction hasRequiredValidation(validations: AXPEntityProperty['validations']): boolean {\n return Array.isArray(validations) && validations.some((v) => v.rule === 'required');\n}\n\nfunction toRegisteredEntityPropertySummary(prop: AXPEntityProperty): AXMRegisteredEntityPropertySummary {\n const iface = prop.schema?.interface;\n const rawType = iface?.type;\n const interfaceType = typeof rawType === 'string' ? rawType : undefined;\n const opts = iface?.options as Record<string, unknown> | undefined;\n\n let lookupEntity: string | undefined;\n let filterValuePaths: string[] | undefined;\n\n if (opts && typeof opts['entity'] === 'string' && opts['entity'].trim()) {\n lookupEntity = opts['entity'].trim();\n }\n\n const expose = opts?.['expose'];\n if (Array.isArray(expose)) {\n const paths = expose\n .map((row) => (row && typeof row === 'object' ? (row as { target?: unknown }).target : undefined))\n .filter((t): t is string => typeof t === 'string' && t.length > 0);\n if (paths.length) {\n filterValuePaths = paths;\n }\n }\n\n const required = hasRequiredValidation(prop.validations);\n\n return {\n name: prop.name,\n title: prop.title,\n dataType: prop.schema?.dataType ?? 'unknown',\n required,\n ...(interfaceType ? { interfaceType } : {}),\n ...(lookupEntity ? { lookupEntity } : {}),\n ...(filterValuePaths ? { filterValuePaths } : {}),\n };\n}\n\nfunction matchStatusForCount(count: number): Exclude<AXMListRegisteredEntitiesMatchStatus, 'catalog'> {\n if (count === 0) {\n return 'none';\n }\n if (count === 1) {\n return 'single';\n }\n return 'multiple';\n}\n\nfunction coerceOptionalBoolean(value: unknown): boolean | undefined {\n if (value === true || value === 'true' || value === 1 || value === '1') {\n return true;\n }\n if (value === false || value === 'false' || value === 0 || value === '0') {\n return false;\n }\n return undefined;\n}\n\n//#endregion\n\n//#region ----- List Registered Entities Query -----\n\n/**\n * Lists registered entities. Omit filters for a lightweight full catalog (no `properties`).\n * Pass `search` / `searchTag` to bound the list; `properties` only when exactly one entity matches.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListRegisteredEntitiesQuery\n implements AXPQuery<AXMListRegisteredEntitiesQueryInput, AXMListRegisteredEntitiesQueryResult>\n{\n //#region ----- Services & Dependencies -----\n\n private readonly entityResolver = inject(AXPEntityResolver);\n private readonly translation = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Query Execution -----\n\n async fetch(\n input?: AXMListRegisteredEntitiesQueryInput | null,\n ): AXPQueryFetchResultPromise<AXMListRegisteredEntitiesQueryResult> {\n try {\n const opts = input ?? {};\n const targetFullName = opts.entityFullName?.trim();\n const search = opts.search?.trim();\n const searchTag = opts.searchTag?.trim();\n const includeDetails = coerceOptionalBoolean(opts.includeDetails);\n const entries = await this.entityResolver.listAll();\n\n const sorted = [...entries].sort((a, b) => {\n const byModule = a.module.localeCompare(b.module);\n if (byModule !== 0) {\n return byModule;\n }\n return a.name.localeCompare(b.name);\n });\n\n let matched = sorted;\n let matchStatus: AXMListRegisteredEntitiesMatchStatus;\n let totalMatched: number | undefined;\n let includeCatalogHints = false;\n\n if (targetFullName) {\n matched = axpResolveEntityCatalogByFullName(sorted, targetFullName);\n matchStatus = matchStatusForCount(matched.length);\n includeCatalogHints = true;\n } else if (search || searchTag) {\n const scored: Array<{ entry: (typeof sorted)[number]; def: AXPEntity | null; score: number }> = [];\n for (const entry of sorted) {\n const def = await this.entityResolver.get(entry.module, entry.name);\n const extraTexts = def\n ? [\n this.resolveEntityCopy(def.title),\n this.resolveEntityCopy(def.formats.individual),\n this.resolveEntityCopy(def.formats.plural),\n ]\n : [];\n const { score } = axpMatchEntityCatalogSearch(\n {\n module: entry.module,\n name: entry.name,\n fullName: entry.fullName,\n title: def?.title,\n formatsIndividual: def?.formats?.individual,\n formatsPlural: def?.formats?.plural,\n searchTags: def?.searchTags,\n extraTexts,\n },\n search,\n searchTag,\n );\n if (score > 0) {\n scored.push({ entry, def, score });\n }\n }\n scored.sort((a, b) => b.score - a.score || a.entry.fullName.localeCompare(b.entry.fullName));\n totalMatched = scored.length;\n matched = scored.slice(0, AXP_ENTITY_CATALOG_SEARCH_MAX_ROWS).map((row) => row.entry);\n matchStatus = matchStatusForCount(totalMatched);\n includeCatalogHints = true;\n } else {\n matchStatus = 'catalog';\n }\n\n const includeProperties = includeDetails !== false && matchStatus === 'single';\n const entities: AXMListRegisteredEntitiesQueryItem[] = [];\n\n for (const entry of matched) {\n const base: AXMListRegisteredEntitiesQueryItem = {\n module: entry.module,\n name: entry.name,\n fullName: entry.fullName,\n };\n\n const needDef = includeProperties || includeCatalogHints;\n const def = needDef ? await this.entityResolver.get(entry.module, entry.name) : null;\n\n if (includeCatalogHints && def) {\n const resolvedTitle = this.resolveEntityCopy(def.title);\n if (resolvedTitle) {\n base.title = resolvedTitle;\n }\n if (def.searchTags?.length) {\n base.searchTags = def.searchTags;\n }\n }\n\n if (includeProperties && def) {\n const props = def.properties?.map(toRegisteredEntityPropertySummary) ?? [];\n const masterUiActions = axmSummarizeMasterUiActionsForAi(def, (k) => this.resolveEntityCopy(k));\n const quickSearchPaths = await collectEntityQuickSearchFieldPaths(def, (m, n) =>\n this.entityResolver.get(m, n),\n );\n entities.push({\n ...base,\n properties: props,\n ...(quickSearchPaths?.length ? { quickSearchPaths } : {}),\n ...(masterUiActions ? { masterUiActions } : {}),\n });\n } else {\n entities.push(base);\n }\n }\n\n return runtimeQuerySuccessObject({\n matchStatus,\n entities,\n ...(totalMatched != null ? { totalMatched } : {}),\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 helpers -----\n\n private resolveEntityCopy(text: string): string {\n try {\n return this.translation.translateSync(text);\n } catch {\n return text;\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;AA2FA;AAEA;AAEA,SAAS,qBAAqB,CAAC,WAA6C,EAAA;IAC1E,O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EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -119,4 +119,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
119
119
|
}] });
|
|
120
120
|
|
|
121
121
|
export { AXMListRegisteredQueriesQuery };
|
|
122
|
-
//# sourceMappingURL=acorex-platform-module-platform-management-client-list-registered-queries.query-
|
|
122
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-list-registered-queries.query-CqpTep6_.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-platform-management-client-list-registered-queries.query-C-IfkTel.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/queries/list-registered-queries.query.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n type AXPQueryKind,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport type { AXPPropertyDefinition } from '@acorex-platform/framework-shared/domain';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-platform-management-client/contracts';\nimport type { AXMQueryDefinitionEntityModel } from '@acorex-platform/module-platform-management-client/contracts';\nimport type { AXDataSourceFilterOption } from '@acorex/cdk/common';\n\nimport { Injectable, inject } from '@angular/core';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface AXMListRegisteredQueriesQueryInput extends AXPCollectionQueryInput {\n /** Optional exact result DTO id (e.g. `AXPBarChartQueryResult`) to filter catalog rows. */\n resultType?: string;\n /** Optional exact query key (same string used in `options.dataSource` / `options.query`). */\n queryName?: string;\n /** Optional result kind (`value` | `object` | `collection`). Select pickers should pass `collection`. */\n kind?: AXPQueryKind;\n}\n\nexport interface AXMRegisteredQueryCatalogItem {\n name: string;\n title: string;\n kind?: AXPQueryKind;\n resultType?: string;\n description?: string;\n /** Collection select/lookup binding from query metadata. */\n binding?: { valueField: string; textField: string };\n /** Result field schema for object/collection queries. */\n columns?: AXPPropertyDefinition[];\n /** Flattened binding helpers for designers / AI. */\n valueFieldName?: string;\n textFieldName?: string;\n columnNames?: string[];\n}\n\nexport type AXMListRegisteredQueriesQueryResult = AXMRegisteredQueryCatalogItem;\n\n//#endregion\n\n//#region ----- Query -----\n\n/**\n * Lists {@link AXMQueryDefinitionEntityModel} rows from entity storage for designers and pickers.\n * Optional {@link AXMListRegisteredQueriesQueryInput.resultType} / `queryName` / `kind` filters rows.\n * Returns `kind: 'collection'` so select-editors can bind `options.dataSource` to this key.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListRegisteredQueriesQuery\n implements AXPCollectionQuery<AXMListRegisteredQueriesQueryInput, AXMListRegisteredQueriesQueryResult>\n{\n //#region ----- Services & Dependencies -----\n\n private readonly entityService = inject(AXPEntityService);\n\n //#endregion\n\n //#region ----- Query Execution -----\n\n async fetch(\n input?: AXMListRegisteredQueriesQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListRegisteredQueriesQueryResult> {\n try {\n const entityData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.queryDefinition.name)\n .data<string, AXMQueryDefinitionEntityModel>();\n\n const resultType = input?.resultType?.trim();\n const queryName = input?.queryName?.trim();\n const kind = this.normalizeKind(input?.kind);\n const filters: AXDataSourceFilterOption[] = [];\n if (resultType) {\n filters.push({ field: 'resultType', operator: { type: 'equal' }, value: resultType });\n }\n if (queryName) {\n filters.push({ field: 'name', operator: { type: 'equal' }, value: queryName });\n }\n if (kind) {\n filters.push({ field: 'kind', operator: { type: 'equal' }, value: kind });\n }\n\n const result = await entityData.query({\n skip: 0,\n take: 5000,\n fields: ['id', 'name', 'catalogTitle', 'description', 'resultType', 'kind', 'binding', 'columns'],\n ...(filters.length\n ? { filter: { logic: 'and' as const, filters } }\n : {}),\n });\n\n let rows: AXMListRegisteredQueriesQueryResult[] = (result.items ?? []).map((row) =>\n this.mapRow(row, !!queryName),\n );\n if (kind) {\n rows = rows.filter((row) => row.kind === kind);\n }\n\n rows = rows.sort((a, b) => a.title.localeCompare(b.title));\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = rows.length;\n const items = rows.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items, 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 mapRow(\n row: AXMQueryDefinitionEntityModel,\n includeColumnNames: boolean,\n ): AXMRegisteredQueryCatalogItem {\n const binding = this.resolveBinding(row.binding);\n const columns = this.resolveColumns(row.columns);\n const kind = this.normalizeKind(row.kind);\n const base: AXMRegisteredQueryCatalogItem = {\n name: row.name,\n title: row.catalogTitle ?? row.name,\n ...(kind ? { kind } : {}),\n ...(row.resultType ? { resultType: row.resultType } : {}),\n ...(row.description ? { description: row.description } : {}),\n ...(binding ? { binding } : {}),\n ...(columns.length ? { columns } : {}),\n ...(binding?.valueField ? { valueFieldName: binding.valueField } : {}),\n ...(binding?.textField ? { textFieldName: binding.textField } : {}),\n };\n if (includeColumnNames && columns.length) {\n base.columnNames = columns.map((c) => c.name).filter(Boolean);\n }\n return base;\n }\n\n private normalizeKind(value: unknown): AXPQueryKind | undefined {\n return value === 'value' || value === 'object' || value === 'collection' ? value : undefined;\n }\n\n private resolveBinding(raw: unknown): { valueField: string; textField: string } | undefined {\n if (!raw || typeof raw !== 'object') {\n return undefined;\n }\n const record = raw as { valueField?: unknown; textField?: unknown };\n const valueField = typeof record.valueField === 'string' ? record.valueField.trim() : '';\n const textField = typeof record.textField === 'string' ? record.textField.trim() : '';\n if (!valueField && !textField) {\n return undefined;\n }\n return {\n valueField: valueField || 'id',\n textField: textField || 'title',\n };\n }\n\n private resolveColumns(raw: unknown): AXPPropertyDefinition[] {\n if (Array.isArray(raw)) {\n return raw.filter(\n (col): col is AXPPropertyDefinition =>\n !!col && typeof col === 'object' && typeof (col as AXPPropertyDefinition).name === 'string',\n );\n }\n if (raw && typeof raw === 'object' && Array.isArray((raw as { definition?: unknown }).definition)) {\n return this.resolveColumns((raw as { definition: unknown }).definition);\n }\n return [];\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAAA;AAqDA;AAEA;AAEA;;;;AAIG;MAEU,6BAA6B,CAAA;AAD1C,IAAA,WAAA,GAAA;;AAMmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAyH1D,IAAA;;;IAnHC,MAAM,KAAK,CACT,KAAiD,EAAA;AAEjD,QAAA,IAAI;AACF,YAAA,MAAM,UAAU,GAAG,IAAI,CAAC;AACrB,iBAAA,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI;AAC3E,iBAAA,IAAI,EAAyC;YAEhD,MAAM,UAAU,GAAG,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;YAC5C,MAAM,SAAS,GAAG,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE;YAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC;YAC5C,MAAM,OAAO,GAA+B,EAAE;YAC9C,IAAI,UAAU,EAAE;gBACd,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;YACvF;YACA,IAAI,SAAS,EAAE;gBACb,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;Y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I,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAE,GAAgC,CAAC,UAAU,CAAC,EAAE;YACjG,OAAO,IAAI,CAAC,cAAc,CAAE,GAA+B,CAAC,UAAU,CAAC;QACzE;AACA,QAAA,OAAO,EAAE;IACX;8GA3HW,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA7B,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,6BAA6B,cADhB,MAAM,EAAA,CAAA,CAAA;;2FACnB,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBADzC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-list-registered-queries.query-CqpTep6_.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/queries/list-registered-queries.query.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n type AXPQueryKind,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport type { AXPPropertyDefinition } from '@acorex-platform/framework-shared/domain';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-platform-management-client/contracts';\nimport type { AXMQueryDefinitionEntityModel } from '@acorex-platform/module-platform-management-client/contracts';\nimport type { AXDataSourceFilterOption } from '@acorex/cdk/common';\n\nimport { Injectable, inject } from '@angular/core';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface AXMListRegisteredQueriesQueryInput extends AXPCollectionQueryInput {\n /** Optional exact result DTO id (e.g. `AXPBarChartQueryResult`) to filter catalog rows. */\n resultType?: string;\n /** Optional exact query key (same string used in `options.dataSource` / `options.query`). */\n queryName?: string;\n /** Optional result kind (`value` | `object` | `collection`). Select pickers should pass `collection`. */\n kind?: AXPQueryKind;\n}\n\nexport interface AXMRegisteredQueryCatalogItem {\n name: string;\n title: string;\n kind?: AXPQueryKind;\n resultType?: string;\n description?: string;\n /** Collection select/lookup binding from query metadata. */\n binding?: { valueField: string; textField: string };\n /** Result field schema for object/collection queries. */\n columns?: AXPPropertyDefinition[];\n /** Flattened binding helpers for designers / AI. */\n valueFieldName?: string;\n textFieldName?: string;\n columnNames?: string[];\n}\n\nexport type AXMListRegisteredQueriesQueryResult = AXMRegisteredQueryCatalogItem;\n\n//#endregion\n\n//#region ----- Query -----\n\n/**\n * Lists {@link AXMQueryDefinitionEntityModel} rows from entity storage for designers and pickers.\n * Optional {@link AXMListRegisteredQueriesQueryInput.resultType} / `queryName` / `kind` filters rows.\n * Returns `kind: 'collection'` so select-editors can bind `options.dataSource` to this key.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListRegisteredQueriesQuery\n implements AXPCollectionQuery<AXMListRegisteredQueriesQueryInput, AXMListRegisteredQueriesQueryResult>\n{\n //#region ----- Services & Dependencies -----\n\n private readonly entityService = inject(AXPEntityService);\n\n //#endregion\n\n //#region ----- Query Execution -----\n\n async fetch(\n input?: AXMListRegisteredQueriesQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListRegisteredQueriesQueryResult> {\n try {\n const entityData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.queryDefinition.name)\n .data<string, AXMQueryDefinitionEntityModel>();\n\n const resultType = input?.resultType?.trim();\n const queryName = input?.queryName?.trim();\n const kind = this.normalizeKind(input?.kind);\n const filters: AXDataSourceFilterOption[] = [];\n if (resultType) {\n filters.push({ field: 'resultType', operator: { type: 'equal' }, value: resultType });\n }\n if (queryName) {\n filters.push({ field: 'name', operator: { type: 'equal' }, value: queryName });\n }\n if (kind) {\n filters.push({ field: 'kind', operator: { type: 'equal' }, value: kind });\n }\n\n const result = await entityData.query({\n skip: 0,\n take: 5000,\n fields: ['id', 'name', 'catalogTitle', 'description', 'resultType', 'kind', 'binding', 'columns'],\n ...(filters.length\n ? { filter: { logic: 'and' as const, filters } }\n : {}),\n });\n\n let rows: AXMListRegisteredQueriesQueryResult[] = (result.items ?? []).map((row) =>\n this.mapRow(row, !!queryName),\n );\n if (kind) {\n rows = rows.filter((row) => row.kind === kind);\n }\n\n rows = rows.sort((a, b) => a.title.localeCompare(b.title));\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = rows.length;\n const items = rows.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items, 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 mapRow(\n row: AXMQueryDefinitionEntityModel,\n includeColumnNames: boolean,\n ): AXMRegisteredQueryCatalogItem {\n const binding = this.resolveBinding(row.binding);\n const columns = this.resolveColumns(row.columns);\n const kind = this.normalizeKind(row.kind);\n const base: AXMRegisteredQueryCatalogItem = {\n name: row.name,\n title: row.catalogTitle ?? row.name,\n ...(kind ? { kind } : {}),\n ...(row.resultType ? { resultType: row.resultType } : {}),\n ...(row.description ? { description: row.description } : {}),\n ...(binding ? { binding } : {}),\n ...(columns.length ? { columns } : {}),\n ...(binding?.valueField ? { valueFieldName: binding.valueField } : {}),\n ...(binding?.textField ? { textFieldName: binding.textField } : {}),\n };\n if (includeColumnNames && columns.length) {\n base.columnNames = columns.map((c) => c.name).filter(Boolean);\n }\n return base;\n }\n\n private normalizeKind(value: unknown): AXPQueryKind | undefined {\n return value === 'value' || value === 'object' || value === 'collection' ? value : undefined;\n }\n\n private resolveBinding(raw: unknown): { valueField: string; textField: string } | undefined {\n if (!raw || typeof raw !== 'object') {\n return undefined;\n }\n const record = raw as { valueField?: unknown; textField?: unknown };\n const valueField = typeof record.valueField === 'string' ? record.valueField.trim() : '';\n const textField = typeof record.textField === 'string' ? record.textField.trim() : '';\n if (!valueField && !textField) {\n return undefined;\n }\n return {\n valueField: valueField || 'id',\n textField: textField || 'title',\n };\n }\n\n private resolveColumns(raw: unknown): AXPPropertyDefinition[] {\n if (Array.isArray(raw)) {\n return raw.filter(\n (col): col is AXPPropertyDefinition =>\n !!col && typeof col === 'object' && typeof (col as AXPPropertyDefinition).name === 'string',\n );\n }\n if (raw && typeof raw === 'object' && Array.isArray((raw as { definition?: unknown }).definition)) {\n return this.resolveColumns((raw as { definition: unknown }).definition);\n }\n return [];\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAAA;AAqDA;AAEA;AAEA;;;;AAIG;MAEU,6BAA6B,CAAA;AAD1C,IAAA,WAAA,GAAA;;AAMmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAyH1D,IAAA;;;IAnHC,MAAM,KAAK,CACT,KAAiD,EAAA;AAEjD,QAAA,IAAI;AACF,YAAA,MAAM,UAAU,GAAG,IAAI,CAAC;AACrB,iBAAA,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI;AAC3E,iBAAA,IAAI,EAAyC;YAEhD,MAAM,UAAU,GAAG,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;YAC5C,MAAM,SAAS,GAAG,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE;YAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC;YAC5C,MAAM,OAAO,GAA+B,EAAE;YAC9C,IAAI,UAAU,EAAE;gBACd,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,Y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A,cAAc,CAAC,GAAY,EAAA;AACjC,QAAA,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACtB,OAAO,GAAG,CAAC,MAAM,CACf,CAAC,GAAG,KACF,CAAC,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAQ,GAA6B,CAAC,IAAI,KAAK,QAAQ,CAC9F;QACH;AACA,QAAA,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAE,GAAgC,CAAC,UAAU,CAAC,EAAE;YACjG,OAAO,IAAI,CAAC,cAAc,CAAE,GAA+B,CAAC,UAAU,CAAC;QACzE;AACA,QAAA,OAAO,EAAE;IACX;8GA3HW,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA7B,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,6BAA6B,cADhB,MAAM,EAAA,CAAA,CAAA;;2FACnB,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBADzC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -22,7 +22,7 @@ import * as i0 from '@angular/core';
|
|
|
22
22
|
import { inject, viewChild, signal, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
23
23
|
import { ActivatedRoute } from '@angular/router';
|
|
24
24
|
import { Subject, takeUntil } from 'rxjs';
|
|
25
|
-
import { A as AXPMenuManagementService } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-
|
|
25
|
+
import { A as AXPMenuManagementService } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CesvNlI9.mjs';
|
|
26
26
|
|
|
27
27
|
//#region ---- Menu List Component ----
|
|
28
28
|
class AXMMenuListComponent extends AXPPageLayoutBaseComponent {
|
|
@@ -496,7 +496,7 @@ class AXMMenuListComponent extends AXPPageLayoutBaseComponent {
|
|
|
496
496
|
provide: AXPPageLayoutBase,
|
|
497
497
|
useExisting: AXMMenuListComponent,
|
|
498
498
|
},
|
|
499
|
-
], viewQueries: [{ propertyName: "tree", first: true, predicate: AXTreeViewComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<axp-page-layout>\n <axp-page-content>\n @if (isLoading()) {\n <!-- Loading State -->\n <axp-state-message\n mode=\"loading\"\n icon=\"fa-light fa-spinner-third fa-spin\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.description'\n | translate\n | async)!\n \"\n />\n } @else if (error()) {\n <!-- Error State -->\n <axp-state-message\n mode=\"error\"\n icon=\"fa-light fa-circle-exclamation\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@general:actions.retry.title' | translate | async\"\n [look]=\"'outline'\"\n [color]=\"'primary'\"\n (onClick)=\"loadMenuItems()\"\n >\n <i class=\"fa-light fa-rotate-left\"></i>\n </ax-button>\n </axp-state-message>\n } @else if (treeNodes().length === 0) {\n <!-- Empty State -->\n <axp-state-message\n mode=\"empty\"\n icon=\"fa-light fa-bars\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@platform-management:menu-management.actions.add-root.title' | translate | async\"\n [look]=\"'solid'\"\n [color]=\"'primary'\"\n (onClick)=\"addRootMenuItem()\"\n >\n <i class=\"fa-light fa-plus\"></i>\n </ax-button>\n </axp-state-message>\n } @else {\n <!-- Menu Tree Content -->\n <div class=\"axm-menu-list__container\">\n <!-- Menu Tree -->\n <div class=\"axm-menu-list__tree\">\n <ax-tree-view\n [(datasource)]=\"treeNodes\"\n [look]=\"'default'\"\n [nodeTemplate]=\"itemTemplate\"\n [selectMode]=\"'none'\"\n [showIcons]=\"false\"\n [showChildrenBadge]=\"false\"\n [dragBehavior]=\"'move'\"\n [dragArea]=\"'handler'\"\n (onBeforeDrop)=\"handleBeforeDrop($event)\"\n (onItemsChange)=\"handleAfterDrop($event)\"\n ></ax-tree-view>\n </div>\n </div>\n }\n </axp-page-content>\n</axp-page-layout>\n\n<!-- Custom Item Template -->\n<ng-template #itemTemplate let-node=\"node\" let-level=\"level\">\n @let nodeData = node['data'];\n @let item = nodeData.menuItem;\n @let metadata = nodeData.metadata;\n <div\n class=\"axm-menu-tree-item__wrapper\"\n [class.axm-menu-tree-item__wrapper--hidden]=\"metadata.isHidden\"\n [class.axm-menu-tree-item__wrapper--custom]=\"metadata.isCustom\"\n [class.axm-menu-tree-item__wrapper--group]=\"item.type === 'group'\"\n >\n <!-- Icon (hidden for groups) -->\n @if (item.icon && item.type !== 'group') {\n <i class=\"axm-menu-tree-item__icon\" [class]=\"item.icon\"></i>\n }\n\n <!-- Text or Info -->\n @if (item.type === 'group') {\n <!-- Group Heading -->\n <span class=\"axm-menu-tree-item__group\">\n <i class=\"fa-light fa-layer-group\"></i>\n {{ item.text | translate | async }}\n </span>\n } @else if (item.type === 'break') {\n <!-- Divider -->\n <span class=\"axm-menu-tree-item__divider\">\n <i class=\"fa-light fa-minus\"></i>\n {{ '@platform-management:menu-management.states.divider' | translate | async }}\n </span>\n } @else if (item.text) {\n <!-- Regular Menu Item -->\n <span class=\"axm-menu-tree-item__text\">\n {{ item.text | translate | async }}\n </span>\n } @else if (item.path) {\n <!-- Path-only Item -->\n <span class=\"axm-menu-tree-item__path\">\n <i class=\"fa-light fa-link\"></i>\n {{ item.path }}\n </span>\n }\n\n <!-- Menu Name/Key -->\n @if (item.name) {\n <code class=\"axm-menu-tree-item__name\">{{ item.name }}</code>\n }\n\n <!-- Status Badges -->\n @if (metadata.isHidden) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.hidden' | translate | async)!\"\n color=\"danger\"\n ></ax-badge>\n } @else if (metadata.isCustom) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.custom' | translate | async)!\"\n color=\"success\"\n ></ax-badge>\n } @else if (metadata.isBuiltIn) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.built-in' | translate | async)!\"\n color=\"primary\"\n ></ax-badge>\n }\n\n <!-- Actions Dropdown -->\n <ax-button class=\"axm-menu-tree-item__actions ax-sm\" [look]=\"'blank'\" [iconOnly]=\"true\">\n <ax-prefix>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </ax-prefix>\n\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <!-- Edit (only for items with names) -->\n @if (item.name) {\n <ax-button-item\n [text]=\"('@general:actions.edit.title' | translate | async)!\"\n (onClick)=\"onAction('edit', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-edit\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Show/Hide (only for items with names) -->\n @if (item.name && metadata.isBuiltIn) {\n @if (metadata.isHidden) {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.show.title' | translate | async)!\"\n (onClick)=\"onAction('show', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye\"></i>\n </ax-prefix>\n </ax-button-item>\n } @else {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.hide.title' | translate | async)!\"\n (onClick)=\"onAction('hide', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye-slash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n }\n\n @if (!item.path && (item.type === 'menu' || !item.type)) {\n <!-- Add Child -->\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.add-child.title' | translate | async)!\"\n (onClick)=\"onAction('add-child', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-plus\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Delete (only for custom items with names) -->\n @if (item.name && metadata.isCustom) {\n <ax-divider></ax-divider>\n <ax-button-item\n [color]=\"'danger'\"\n [text]=\"('@general:actions.delete.title' | translate | async)!\"\n (onClick)=\"onAction('delete', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-trash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Info message for items without names -->\n @if (!item.name) {\n <ax-divider></ax-divider>\n <div class=\"p-2 text-xs text-neutral-500 italic\">\n {{ '@platform-management:menu-management.messages.info.no-name' | translate | async }}\n </div>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n</ng-template>\n", styles: ["@layer properties;.axm-menu-list-page .axm-menu-list__container{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4);padding:calc(var(--spacing, .25rem) * 6)}.axm-menu-list-page .axm-menu-list__tree{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-menu-list-page .axm-menu-tree-item__wrapper{display:flex;flex:1;align-items:center;gap:calc(var(--spacing, .25rem) * 4);border-radius:var(--radius-md, .375rem);border-style:var(--tw-border-style);border-width:1px;background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest);padding:calc(var(--spacing, .25rem) * 2);transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s))}.axm-menu-list-page .axm-menu-tree-item__wrapper:hover{background-color:var(--color-lighter);color:var(--color-on-lighter);border-color:var(--color-border-lighter)}.axm-menu-list-page .axm-menu-tree-item__wrapper--hidden{opacity:50%}.axm-menu-list-page .axm-menu-tree-item__wrapper--custom{border-color:rgba(var(--ax-sys-color-primary-surface))}.axm-menu-list-page .axm-menu-tree-item__wrapper--group{padding-block:calc(var(--spacing, .25rem) * 3)}.axm-menu-list-page .axm-menu-tree-item__icon{display:flex;height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);align-items:center;justify-content:center;color:rgba(var(--ax-sys-color-primary-surface))}.axm-menu-list-page .axm-menu-tree-item__text{flex:1;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.axm-menu-list-page .axm-menu-tree-item__group,.axm-menu-list-page .axm-menu-tree-item__divider,.axm-menu-list-page .axm-menu-tree-item__path{display:flex;flex:1;align-items:center;gap:calc(var(--spacing, .25rem) * 2);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:var(--color-neutral-500, oklch(55.6% 0 none));font-style:italic}:is(.axm-menu-list-page .axm-menu-tree-item__divider,.axm-menu-list-page .axm-menu-tree-item__path) i{color:var(--color-neutral-400, oklch(70.8% 0 none))}.axm-menu-list-page .axm-menu-tree-item__name{display:flex;align-items:center;border-radius:.25rem;border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-neutral-200, oklch(92.2% 0 none));background-color:var(--color-neutral-100, oklch(97% 0 none));padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);font-family:var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);white-space:nowrap;color:var(--color-neutral-700, oklch(37.1% 0 none));-webkit-user-select:all;user-select:all}.axm-menu-list-page .axm-menu-tree-item__actions{margin-left:calc(var(--spacing, .25rem) * 2)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i3.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXTreeViewComponent, selector: "ax-tree-view", inputs: ["datasource", "selectMode", "selectionBehavior", "dragArea", "dragBehavior", "showIcons", "showChildrenBadge", "expandedIcon", "collapsedIcon", "indentSize", "look", "alternate", "nodeTemplate", "idField", "titleField", "highlightText", "tooltipField", "iconField", "expandedField", "selectedField", "indeterminateField", "disabledField", "hiddenField", "childrenField", "childrenCountField", "dataField", "inheritDisabled", "expandOnDoubleClick", "doubleClickDuration", "tooltipDelay", "controlledSelection", "selectedIds"], outputs: ["datasourceChange", "selectedIdsChange", "onBeforeDrop", "onNodeToggle", "onNodeSelect", "onNodeDoubleClick", "onNodeClick", "onSelectionChange", "onOrderChange", "onMoveChange", "onItemsChange"] }, { kind: "component", type: AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "titleParams", "descriptionParams", "look"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i4.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
499
|
+
], viewQueries: [{ propertyName: "tree", first: true, predicate: AXTreeViewComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<axp-page-layout>\n <axp-page-content>\n @if (isLoading()) {\n <!-- Loading State -->\n <axp-state-message\n mode=\"loading\"\n icon=\"fa-light fa-spinner-third fa-spin\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.description'\n | translate\n | async)!\n \"\n />\n } @else if (error()) {\n <!-- Error State -->\n <axp-state-message\n mode=\"error\"\n icon=\"fa-light fa-circle-exclamation\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@general:actions.retry.title' | translate | async\"\n [look]=\"'outline'\"\n [color]=\"'primary'\"\n (onClick)=\"loadMenuItems()\"\n >\n <i class=\"fa-light fa-rotate-left\"></i>\n </ax-button>\n </axp-state-message>\n } @else if (treeNodes().length === 0) {\n <!-- Empty State -->\n <axp-state-message\n mode=\"empty\"\n icon=\"fa-light fa-bars\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@platform-management:menu-management.actions.add-root.title' | translate | async\"\n [look]=\"'solid'\"\n [color]=\"'primary'\"\n (onClick)=\"addRootMenuItem()\"\n >\n <i class=\"fa-light fa-plus\"></i>\n </ax-button>\n </axp-state-message>\n } @else {\n <!-- Menu Tree Content -->\n <div class=\"axm-menu-list__container\">\n <!-- Menu Tree -->\n <div class=\"axm-menu-list__tree\">\n <ax-tree-view\n [(datasource)]=\"treeNodes\"\n [look]=\"'default'\"\n [nodeTemplate]=\"itemTemplate\"\n [selectMode]=\"'none'\"\n [showIcons]=\"false\"\n [showChildrenBadge]=\"false\"\n [dragBehavior]=\"'move'\"\n [dragArea]=\"'handler'\"\n (onBeforeDrop)=\"handleBeforeDrop($event)\"\n (onItemsChange)=\"handleAfterDrop($event)\"\n ></ax-tree-view>\n </div>\n </div>\n }\n </axp-page-content>\n</axp-page-layout>\n\n<!-- Custom Item Template -->\n<ng-template #itemTemplate let-node=\"node\" let-level=\"level\">\n @let nodeData = node['data'];\n @let item = nodeData.menuItem;\n @let metadata = nodeData.metadata;\n <div\n class=\"axm-menu-tree-item__wrapper\"\n [class.axm-menu-tree-item__wrapper--hidden]=\"metadata.isHidden\"\n [class.axm-menu-tree-item__wrapper--custom]=\"metadata.isCustom\"\n [class.axm-menu-tree-item__wrapper--group]=\"item.type === 'group'\"\n >\n <!-- Icon (hidden for groups) -->\n @if (item.icon && item.type !== 'group') {\n <i class=\"axm-menu-tree-item__icon\" [class]=\"item.icon\"></i>\n }\n\n <!-- Text or Info -->\n @if (item.type === 'group') {\n <!-- Group Heading -->\n <span class=\"axm-menu-tree-item__group\">\n <i class=\"fa-light fa-layer-group\"></i>\n {{ item.text | translate | async }}\n </span>\n } @else if (item.type === 'break') {\n <!-- Divider -->\n <span class=\"axm-menu-tree-item__divider\">\n <i class=\"fa-light fa-minus\"></i>\n {{ '@platform-management:menu-management.states.divider' | translate | async }}\n </span>\n } @else if (item.text) {\n <!-- Regular Menu Item -->\n <span class=\"axm-menu-tree-item__text\">\n {{ item.text | translate | async }}\n </span>\n } @else if (item.path) {\n <!-- Path-only Item -->\n <span class=\"axm-menu-tree-item__path\">\n <i class=\"fa-light fa-link\"></i>\n {{ item.path }}\n </span>\n }\n\n <!-- Menu Name/Key -->\n @if (item.name) {\n <code class=\"axm-menu-tree-item__name\">{{ item.name }}</code>\n }\n\n <!-- Status Badges -->\n @if (metadata.isHidden) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.hidden' | translate | async)!\"\n color=\"danger\"\n ></ax-badge>\n } @else if (metadata.isCustom) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.custom' | translate | async)!\"\n color=\"success\"\n ></ax-badge>\n } @else if (metadata.isBuiltIn) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.built-in' | translate | async)!\"\n color=\"primary\"\n ></ax-badge>\n }\n\n <!-- Actions Dropdown -->\n <ax-button class=\"axm-menu-tree-item__actions ax-sm\" [look]=\"'blank'\" [iconOnly]=\"true\">\n <ax-prefix>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </ax-prefix>\n\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <!-- Edit (only for items with names) -->\n @if (item.name) {\n <ax-button-item\n [text]=\"('@general:actions.edit.title' | translate | async)!\"\n (onClick)=\"onAction('edit', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-edit\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Show/Hide (only for items with names) -->\n @if (item.name && metadata.isBuiltIn) {\n @if (metadata.isHidden) {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.show.title' | translate | async)!\"\n (onClick)=\"onAction('show', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye\"></i>\n </ax-prefix>\n </ax-button-item>\n } @else {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.hide.title' | translate | async)!\"\n (onClick)=\"onAction('hide', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye-slash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n }\n\n @if (!item.path && (item.type === 'menu' || !item.type)) {\n <!-- Add Child -->\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.add-child.title' | translate | async)!\"\n (onClick)=\"onAction('add-child', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-plus\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Delete (only for custom items with names) -->\n @if (item.name && metadata.isCustom) {\n <ax-divider></ax-divider>\n <ax-button-item\n [color]=\"'danger'\"\n [text]=\"('@general:actions.delete.title' | translate | async)!\"\n (onClick)=\"onAction('delete', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-trash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Info message for items without names -->\n @if (!item.name) {\n <ax-divider></ax-divider>\n <div class=\"p-2 text-xs text-neutral-500 italic\">\n {{ '@platform-management:menu-management.messages.info.no-name' | translate | async }}\n </div>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n</ng-template>\n", styles: ["@layer properties;.axm-menu-list-page .axm-menu-list__container{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4);padding:calc(var(--spacing, .25rem) * 6)}.axm-menu-list-page .axm-menu-list__tree{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-menu-list-page .axm-menu-tree-item__wrapper{display:flex;flex:1;align-items:center;gap:calc(var(--spacing, .25rem) * 4);border-radius:var(--radius-md, .375rem);border-style:var(--tw-border-style);border-width:1px;background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest);padding:calc(var(--spacing, .25rem) * 2);transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s))}.axm-menu-list-page .axm-menu-tree-item__wrapper:hover{background-color:var(--color-lighter);color:var(--color-on-lighter);border-color:var(--color-border-lighter)}.axm-menu-list-page .axm-menu-tree-item__wrapper--hidden{opacity:50%}.axm-menu-list-page .axm-menu-tree-item__wrapper--custom{border-color:rgba(var(--ax-sys-color-primary-surface))}.axm-menu-list-page .axm-menu-tree-item__wrapper--group{padding-block:calc(var(--spacing, .25rem) * 3)}.axm-menu-list-page .axm-menu-tree-item__icon{display:flex;height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);align-items:center;justify-content:center;color:rgba(var(--ax-sys-color-primary-surface))}.axm-menu-list-page .axm-menu-tree-item__text{flex:1;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.axm-menu-list-page .axm-menu-tree-item__group,.axm-menu-list-page .axm-menu-tree-item__divider,.axm-menu-list-page .axm-menu-tree-item__path{display:flex;flex:1;align-items:center;gap:calc(var(--spacing, .25rem) * 2);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:var(--color-neutral-500, oklch(55.6% 0 none));font-style:italic}:is(.axm-menu-list-page .axm-menu-tree-item__divider,.axm-menu-list-page .axm-menu-tree-item__path) i{color:var(--color-neutral-400, oklch(70.8% 0 none))}.axm-menu-list-page .axm-menu-tree-item__name{display:flex;align-items:center;border-radius:.25rem;border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-neutral-200, oklch(92.2% 0 none));background-color:var(--color-neutral-100, oklch(97% 0 none));padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);font-family:var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);white-space:nowrap;color:var(--color-neutral-700, oklch(37.1% 0 none));-webkit-user-select:all;user-select:all}.axm-menu-list-page .axm-menu-tree-item__actions{margin-left:calc(var(--spacing, .25rem) * 2)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i3.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXTreeViewComponent, selector: "ax-tree-view", inputs: ["datasource", "selectMode", "selectionBehavior", "dragArea", "dragBehavior", "showIcons", "showChildrenBadge", "expandedIcon", "collapsedIcon", "indentSize", "look", "alternate", "nodeTemplate", "idField", "titleField", "highlightText", "tooltipField", "iconField", "expandedField", "selectedField", "indeterminateField", "disabledField", "hiddenField", "childrenField", "childrenCountField", "dataField", "inheritDisabled", "expandOnDoubleClick", "doubleClickDuration", "tooltipDelay", "controlledSelection", "selectedIds"], outputs: ["datasourceChange", "selectedIdsChange", "onBeforeDrop", "onNodeToggle", "onNodeSelect", "onNodeDoubleClick", "onNodeClick", "onSelectionChange", "onOrderChange", "onMoveChange", "onItemsChange"] }, { kind: "component", type: AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "titleParams", "descriptionParams", "look"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i4.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
500
500
|
}
|
|
501
501
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMMenuListComponent, decorators: [{
|
|
502
502
|
type: Component,
|
|
@@ -517,8 +517,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
517
517
|
provide: AXPPageLayoutBase,
|
|
518
518
|
useExisting: AXMMenuListComponent,
|
|
519
519
|
},
|
|
520
|
-
], host: { class: 'axm-menu-list-page' }, template: "<axp-page-layout>\n <axp-page-content>\n @if (isLoading()) {\n <!-- Loading State -->\n <axp-state-message\n mode=\"loading\"\n icon=\"fa-light fa-spinner-third fa-spin\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.description'\n | translate\n | async)!\n \"\n />\n } @else if (error()) {\n <!-- Error State -->\n <axp-state-message\n mode=\"error\"\n icon=\"fa-light fa-circle-exclamation\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@general:actions.retry.title' | translate | async\"\n [look]=\"'outline'\"\n [color]=\"'primary'\"\n (onClick)=\"loadMenuItems()\"\n >\n <i class=\"fa-light fa-rotate-left\"></i>\n </ax-button>\n </axp-state-message>\n } @else if (treeNodes().length === 0) {\n <!-- Empty State -->\n <axp-state-message\n mode=\"empty\"\n icon=\"fa-light fa-bars\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@platform-management:menu-management.actions.add-root.title' | translate | async\"\n [look]=\"'solid'\"\n [color]=\"'primary'\"\n (onClick)=\"addRootMenuItem()\"\n >\n <i class=\"fa-light fa-plus\"></i>\n </ax-button>\n </axp-state-message>\n } @else {\n <!-- Menu Tree Content -->\n <div class=\"axm-menu-list__container\">\n <!-- Menu Tree -->\n <div class=\"axm-menu-list__tree\">\n <ax-tree-view\n [(datasource)]=\"treeNodes\"\n [look]=\"'default'\"\n [nodeTemplate]=\"itemTemplate\"\n [selectMode]=\"'none'\"\n [showIcons]=\"false\"\n [showChildrenBadge]=\"false\"\n [dragBehavior]=\"'move'\"\n [dragArea]=\"'handler'\"\n (onBeforeDrop)=\"handleBeforeDrop($event)\"\n (onItemsChange)=\"handleAfterDrop($event)\"\n ></ax-tree-view>\n </div>\n </div>\n }\n </axp-page-content>\n</axp-page-layout>\n\n<!-- Custom Item Template -->\n<ng-template #itemTemplate let-node=\"node\" let-level=\"level\">\n @let nodeData = node['data'];\n @let item = nodeData.menuItem;\n @let metadata = nodeData.metadata;\n <div\n class=\"axm-menu-tree-item__wrapper\"\n [class.axm-menu-tree-item__wrapper--hidden]=\"metadata.isHidden\"\n [class.axm-menu-tree-item__wrapper--custom]=\"metadata.isCustom\"\n [class.axm-menu-tree-item__wrapper--group]=\"item.type === 'group'\"\n >\n <!-- Icon (hidden for groups) -->\n @if (item.icon && item.type !== 'group') {\n <i class=\"axm-menu-tree-item__icon\" [class]=\"item.icon\"></i>\n }\n\n <!-- Text or Info -->\n @if (item.type === 'group') {\n <!-- Group Heading -->\n <span class=\"axm-menu-tree-item__group\">\n <i class=\"fa-light fa-layer-group\"></i>\n {{ item.text | translate | async }}\n </span>\n } @else if (item.type === 'break') {\n <!-- Divider -->\n <span class=\"axm-menu-tree-item__divider\">\n <i class=\"fa-light fa-minus\"></i>\n {{ '@platform-management:menu-management.states.divider' | translate | async }}\n </span>\n } @else if (item.text) {\n <!-- Regular Menu Item -->\n <span class=\"axm-menu-tree-item__text\">\n {{ item.text | translate | async }}\n </span>\n } @else if (item.path) {\n <!-- Path-only Item -->\n <span class=\"axm-menu-tree-item__path\">\n <i class=\"fa-light fa-link\"></i>\n {{ item.path }}\n </span>\n }\n\n <!-- Menu Name/Key -->\n @if (item.name) {\n <code class=\"axm-menu-tree-item__name\">{{ item.name }}</code>\n }\n\n <!-- Status Badges -->\n @if (metadata.isHidden) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.hidden' | translate | async)!\"\n color=\"danger\"\n ></ax-badge>\n } @else if (metadata.isCustom) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.custom' | translate | async)!\"\n color=\"success\"\n ></ax-badge>\n } @else if (metadata.isBuiltIn) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.built-in' | translate | async)!\"\n color=\"primary\"\n ></ax-badge>\n }\n\n <!-- Actions Dropdown -->\n <ax-button class=\"axm-menu-tree-item__actions ax-sm\" [look]=\"'blank'\" [iconOnly]=\"true\">\n <ax-prefix>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </ax-prefix>\n\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <!-- Edit (only for items with names) -->\n @if (item.name) {\n <ax-button-item\n [text]=\"('@general:actions.edit.title' | translate | async)!\"\n (onClick)=\"onAction('edit', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-edit\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Show/Hide (only for items with names) -->\n @if (item.name && metadata.isBuiltIn) {\n @if (metadata.isHidden) {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.show.title' | translate | async)!\"\n (onClick)=\"onAction('show', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye\"></i>\n </ax-prefix>\n </ax-button-item>\n } @else {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.hide.title' | translate | async)!\"\n (onClick)=\"onAction('hide', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye-slash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n }\n\n @if (!item.path && (item.type === 'menu' || !item.type)) {\n <!-- Add Child -->\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.add-child.title' | translate | async)!\"\n (onClick)=\"onAction('add-child', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-plus\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Delete (only for custom items with names) -->\n @if (item.name && metadata.isCustom) {\n <ax-divider></ax-divider>\n <ax-button-item\n [color]=\"'danger'\"\n [text]=\"('@general:actions.delete.title' | translate | async)!\"\n (onClick)=\"onAction('delete', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-trash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Info message for items without names -->\n @if (!item.name) {\n <ax-divider></ax-divider>\n <div class=\"p-2 text-xs text-neutral-500 italic\">\n {{ '@platform-management:menu-management.messages.info.no-name' | translate | async }}\n </div>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n</ng-template>\n", styles: ["@layer properties;.axm-menu-list-page .axm-menu-list__container{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4);padding:calc(var(--spacing, .25rem) * 6)}.axm-menu-list-page .axm-menu-list__tree{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-menu-list-page .axm-menu-tree-item__wrapper{display:flex;flex:1;align-items:center;gap:calc(var(--spacing, .25rem) * 4);border-radius:var(--radius-md, .375rem);border-style:var(--tw-border-style);border-width:1px;background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest);padding:calc(var(--spacing, .25rem) * 2);transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s))}.axm-menu-list-page .axm-menu-tree-item__wrapper:hover{background-color:var(--color-lighter);color:var(--color-on-lighter);border-color:var(--color-border-lighter)}.axm-menu-list-page .axm-menu-tree-item__wrapper--hidden{opacity:50%}.axm-menu-list-page .axm-menu-tree-item__wrapper--custom{border-color:rgba(var(--ax-sys-color-primary-surface))}.axm-menu-list-page .axm-menu-tree-item__wrapper--group{padding-block:calc(var(--spacing, .25rem) * 3)}.axm-menu-list-page .axm-menu-tree-item__icon{display:flex;height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);align-items:center;justify-content:center;color:rgba(var(--ax-sys-color-primary-surface))}.axm-menu-list-page .axm-menu-tree-item__text{flex:1;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.axm-menu-list-page .axm-menu-tree-item__group,.axm-menu-list-page .axm-menu-tree-item__divider,.axm-menu-list-page .axm-menu-tree-item__path{display:flex;flex:1;align-items:center;gap:calc(var(--spacing, .25rem) * 2);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:var(--color-neutral-500, oklch(55.6% 0 none));font-style:italic}:is(.axm-menu-list-page .axm-menu-tree-item__divider,.axm-menu-list-page .axm-menu-tree-item__path) i{color:var(--color-neutral-400, oklch(70.8% 0 none))}.axm-menu-list-page .axm-menu-tree-item__name{display:flex;align-items:center;border-radius:.25rem;border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-neutral-200, oklch(92.2% 0 none));background-color:var(--color-neutral-100, oklch(97% 0 none));padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);font-family:var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);white-space:nowrap;color:var(--color-neutral-700, oklch(37.1% 0 none));-webkit-user-select:all;user-select:all}.axm-menu-list-page .axm-menu-tree-item__actions{margin-left:calc(var(--spacing, .25rem) * 2)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
520
|
+
], host: { class: 'axm-menu-list-page' }, template: "<axp-page-layout>\n <axp-page-content>\n @if (isLoading()) {\n <!-- Loading State -->\n <axp-state-message\n mode=\"loading\"\n icon=\"fa-light fa-spinner-third fa-spin\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.description'\n | translate\n | async)!\n \"\n />\n } @else if (error()) {\n <!-- Error State -->\n <axp-state-message\n mode=\"error\"\n icon=\"fa-light fa-circle-exclamation\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@general:actions.retry.title' | translate | async\"\n [look]=\"'outline'\"\n [color]=\"'primary'\"\n (onClick)=\"loadMenuItems()\"\n >\n <i class=\"fa-light fa-rotate-left\"></i>\n </ax-button>\n </axp-state-message>\n } @else if (treeNodes().length === 0) {\n <!-- Empty State -->\n <axp-state-message\n mode=\"empty\"\n icon=\"fa-light fa-bars\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@platform-management:menu-management.actions.add-root.title' | translate | async\"\n [look]=\"'solid'\"\n [color]=\"'primary'\"\n (onClick)=\"addRootMenuItem()\"\n >\n <i class=\"fa-light fa-plus\"></i>\n </ax-button>\n </axp-state-message>\n } @else {\n <!-- Menu Tree Content -->\n <div class=\"axm-menu-list__container\">\n <!-- Menu Tree -->\n <div class=\"axm-menu-list__tree\">\n <ax-tree-view\n [(datasource)]=\"treeNodes\"\n [look]=\"'default'\"\n [nodeTemplate]=\"itemTemplate\"\n [selectMode]=\"'none'\"\n [showIcons]=\"false\"\n [showChildrenBadge]=\"false\"\n [dragBehavior]=\"'move'\"\n [dragArea]=\"'handler'\"\n (onBeforeDrop)=\"handleBeforeDrop($event)\"\n (onItemsChange)=\"handleAfterDrop($event)\"\n ></ax-tree-view>\n </div>\n </div>\n }\n </axp-page-content>\n</axp-page-layout>\n\n<!-- Custom Item Template -->\n<ng-template #itemTemplate let-node=\"node\" let-level=\"level\">\n @let nodeData = node['data'];\n @let item = nodeData.menuItem;\n @let metadata = nodeData.metadata;\n <div\n class=\"axm-menu-tree-item__wrapper\"\n [class.axm-menu-tree-item__wrapper--hidden]=\"metadata.isHidden\"\n [class.axm-menu-tree-item__wrapper--custom]=\"metadata.isCustom\"\n [class.axm-menu-tree-item__wrapper--group]=\"item.type === 'group'\"\n >\n <!-- Icon (hidden for groups) -->\n @if (item.icon && item.type !== 'group') {\n <i class=\"axm-menu-tree-item__icon\" [class]=\"item.icon\"></i>\n }\n\n <!-- Text or Info -->\n @if (item.type === 'group') {\n <!-- Group Heading -->\n <span class=\"axm-menu-tree-item__group\">\n <i class=\"fa-light fa-layer-group\"></i>\n {{ item.text | translate | async }}\n </span>\n } @else if (item.type === 'break') {\n <!-- Divider -->\n <span class=\"axm-menu-tree-item__divider\">\n <i class=\"fa-light fa-minus\"></i>\n {{ '@platform-management:menu-management.states.divider' | translate | async }}\n </span>\n } @else if (item.text) {\n <!-- Regular Menu Item -->\n <span class=\"axm-menu-tree-item__text\">\n {{ item.text | translate | async }}\n </span>\n } @else if (item.path) {\n <!-- Path-only Item -->\n <span class=\"axm-menu-tree-item__path\">\n <i class=\"fa-light fa-link\"></i>\n {{ item.path }}\n </span>\n }\n\n <!-- Menu Name/Key -->\n @if (item.name) {\n <code class=\"axm-menu-tree-item__name\">{{ item.name }}</code>\n }\n\n <!-- Status Badges -->\n @if (metadata.isHidden) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.hidden' | translate | async)!\"\n color=\"danger\"\n ></ax-badge>\n } @else if (metadata.isCustom) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.custom' | translate | async)!\"\n color=\"success\"\n ></ax-badge>\n } @else if (metadata.isBuiltIn) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.built-in' | translate | async)!\"\n color=\"primary\"\n ></ax-badge>\n }\n\n <!-- Actions Dropdown -->\n <ax-button class=\"axm-menu-tree-item__actions ax-sm\" [look]=\"'blank'\" [iconOnly]=\"true\">\n <ax-prefix>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </ax-prefix>\n\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <!-- Edit (only for items with names) -->\n @if (item.name) {\n <ax-button-item\n [text]=\"('@general:actions.edit.title' | translate | async)!\"\n (onClick)=\"onAction('edit', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-edit\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Show/Hide (only for items with names) -->\n @if (item.name && metadata.isBuiltIn) {\n @if (metadata.isHidden) {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.show.title' | translate | async)!\"\n (onClick)=\"onAction('show', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye\"></i>\n </ax-prefix>\n </ax-button-item>\n } @else {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.hide.title' | translate | async)!\"\n (onClick)=\"onAction('hide', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye-slash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n }\n\n @if (!item.path && (item.type === 'menu' || !item.type)) {\n <!-- Add Child -->\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.add-child.title' | translate | async)!\"\n (onClick)=\"onAction('add-child', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-plus\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Delete (only for custom items with names) -->\n @if (item.name && metadata.isCustom) {\n <ax-divider></ax-divider>\n <ax-button-item\n [color]=\"'danger'\"\n [text]=\"('@general:actions.delete.title' | translate | async)!\"\n (onClick)=\"onAction('delete', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-trash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Info message for items without names -->\n @if (!item.name) {\n <ax-divider></ax-divider>\n <div class=\"p-2 text-xs text-neutral-500 italic\">\n {{ '@platform-management:menu-management.messages.info.no-name' | translate | async }}\n </div>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n</ng-template>\n", styles: ["@layer properties;.axm-menu-list-page .axm-menu-list__container{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4);padding:calc(var(--spacing, .25rem) * 6)}.axm-menu-list-page .axm-menu-list__tree{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-menu-list-page .axm-menu-tree-item__wrapper{display:flex;flex:1;align-items:center;gap:calc(var(--spacing, .25rem) * 4);border-radius:var(--radius-md, .375rem);border-style:var(--tw-border-style);border-width:1px;background-color:var(--color-lightest);color:var(--color-on-lightest);border-color:var(--color-border-lightest);padding:calc(var(--spacing, .25rem) * 2);transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s))}.axm-menu-list-page .axm-menu-tree-item__wrapper:hover{background-color:var(--color-lighter);color:var(--color-on-lighter);border-color:var(--color-border-lighter)}.axm-menu-list-page .axm-menu-tree-item__wrapper--hidden{opacity:50%}.axm-menu-list-page .axm-menu-tree-item__wrapper--custom{border-color:rgba(var(--ax-sys-color-primary-surface))}.axm-menu-list-page .axm-menu-tree-item__wrapper--group{padding-block:calc(var(--spacing, .25rem) * 3)}.axm-menu-list-page .axm-menu-tree-item__icon{display:flex;height:calc(var(--spacing, .25rem) * 6);width:calc(var(--spacing, .25rem) * 6);align-items:center;justify-content:center;color:rgba(var(--ax-sys-color-primary-surface))}.axm-menu-list-page .axm-menu-tree-item__text{flex:1;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}.axm-menu-list-page .axm-menu-tree-item__group,.axm-menu-list-page .axm-menu-tree-item__divider,.axm-menu-list-page .axm-menu-tree-item__path{display:flex;flex:1;align-items:center;gap:calc(var(--spacing, .25rem) * 2);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:var(--color-neutral-500, oklch(55.6% 0 none));font-style:italic}:is(.axm-menu-list-page .axm-menu-tree-item__divider,.axm-menu-list-page .axm-menu-tree-item__path) i{color:var(--color-neutral-400, oklch(70.8% 0 none))}.axm-menu-list-page .axm-menu-tree-item__name{display:flex;align-items:center;border-radius:.25rem;border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-neutral-200, oklch(92.2% 0 none));background-color:var(--color-neutral-100, oklch(97% 0 none));padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);font-family:var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-normal, 400);font-weight:var(--font-weight-normal, 400);white-space:nowrap;color:var(--color-neutral-700, oklch(37.1% 0 none));-webkit-user-select:all;user-select:all}.axm-menu-list-page .axm-menu-tree-item__actions{margin-left:calc(var(--spacing, .25rem) * 2)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"] }]
|
|
521
521
|
}], propDecorators: { tree: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXTreeViewComponent), { isSignal: true }] }] } });
|
|
522
522
|
|
|
523
523
|
export { AXMMenuListComponent };
|
|
524
|
-
//# sourceMappingURL=acorex-platform-module-platform-management-client-menu-list.component-
|
|
524
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-menu-list.component-CZf5cHCK.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-platform-management-client-menu-list.component-SnvQ2KbJ.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/menu-management/pages/menu-list/menu-list.component.ts","../../../../libs/modules/platform-management/client/src/lib/features/menu-management/pages/menu-list/menu-list.component.html"],"sourcesContent":["\nimport { AXPActionMenuItem, AXPExecuteCommand, AXPPlatformScope } from '@acorex-platform/framework-shared/core';\nimport { AXBadgeModule } from '@acorex/components/badge';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXDropdownButtonModule } from '@acorex/components/dropdown-button';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTreeViewBeforeDropEvent, AXTreeViewComponent, AXTreeViewDropEvent, AXTreeViewNode } from '@acorex/components/tree-view';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPMenuItem } from '@acorex-platform/framework-client/common';\n\nimport { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';\nimport { AXPStateMessageComponent, AXPThemeLayoutBlockComponent } from '@acorex-platform/framework-client/layout/components';\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent, AXPPageLayoutComponent } from '@acorex-platform/framework-client/layout/views';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n OnDestroy,\n OnInit,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { Subject, takeUntil } from 'rxjs';\nimport { AXPMenuItemAction } from '../../menu-customization.types';\nimport { AXPMenuManagementService, AXPMenuTreeNodeData } from '../../menu-management.service';\n\n//#region ---- Menu List Component ----\n\n@Component({\n selector: 'axm-menu-list',\n imports: [\n CommonModule,\n AXButtonModule,\n AXDecoratorModule,\n AXDropdownButtonModule,\n AXDropdownModule,\n AXTranslationModule,\n AXTreeViewComponent,\n AXPPageLayoutComponent,\n AXPThemeLayoutBlockComponent,\n AXPStateMessageComponent,\n AXBadgeModule,\n ],\n templateUrl: './menu-list.component.html',\n styleUrls: ['./menu-list.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMMenuListComponent,\n },\n ],\n host: { class: 'axm-menu-list-page' },\n})\nexport class AXMMenuListComponent extends AXPPageLayoutBaseComponent implements OnInit, OnDestroy {\n //#region ---- Dependencies ----\n\n private menuManagementService = inject(AXPMenuManagementService);\n private layoutBuilder = inject(AXPLayoutBuilderService);\n protected dialogService = inject(AXDialogService);\n protected override toastService = inject(AXToastService);\n private translationService = inject(AXTranslationService);\n private route = inject(ActivatedRoute);\n\n //#endregion\n\n //#region ---- Component State ----\n\n protected tree = viewChild(AXTreeViewComponent);\n protected treeNodes = signal<AXTreeViewNode[]>([]);\n protected isLoading = signal<boolean>(false);\n protected error = signal<string>('');\n protected currentScope = signal<AXPPlatformScope>(AXPPlatformScope.User);\n private isSyncing = false; // Prevent concurrent sync operations\n private destroy$ = new Subject<void>(); // For subscription cleanup\n\n //#endregion\n\n //#region ---- Lifecycle ----\n\n override async ngOnInit(): Promise<void> {\n await super.ngOnInit();\n\n // Get scope from route (with memory leak prevention)\n this.route.params.pipe(takeUntil(this.destroy$)).subscribe(async (params) => {\n const scope = params['scope'] as AXPPlatformScope;\n if (scope) {\n this.currentScope.set(scope);\n await this.loadMenuItems();\n this.recompute(); // Update page header after loading\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n //#endregion\n\n //#region ---- Event Handlers ----\n\n /**\n * Handle before drop validation\n */\n async handleBeforeDrop(e: AXTreeViewBeforeDropEvent): Promise<void> {\n console.log('[handleBeforeDrop] Event triggered!', {\n movedNode: e.movedNode?.['id'],\n previousParent: e.previousParent?.['id'],\n currentParent: e.currentParent?.['id'],\n previousIndex: e.previousIndex,\n currentIndex: e.currentIndex,\n });\n\n const targetParent = (e.currentParent?.['data'] as AXPMenuTreeNodeData) || null;\n\n // Prevent dropping into items with paths (leaf nodes)\n if (targetParent?.menuItem?.path) {\n e.canceled = true;\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.move',\n );\n this.toastService.warning(message);\n return;\n }\n\n // Note: Circular reference validation is handled by the tree component itself\n // Additional validation can be added here if needed based on business rules\n }\n\n /**\n * Handle after drop event to sync changes\n * The event contains information about the moved node and its new position\n */\n async handleAfterDrop(event: AXTreeViewDropEvent): Promise<void> {\n console.log('[handleAfterDrop] Event triggered!', {\n movedNode: event.node?.['id'],\n movedNodeData: event.node?.['data'],\n previousParent: event.previousParent?.['id'],\n currentParent: event.currentParent?.['id'],\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n });\n\n // Check what the tree component has\n const treeComp = this.tree();\n if (treeComp) {\n console.log('[handleAfterDrop] Tree component datasource:', treeComp.datasource);\n }\n\n // Check our signal\n console.log('[handleAfterDrop] Our treeNodes signal:', this.treeNodes());\n\n await this.syncTreeChanges();\n }\n\n //#endregion\n\n //#region ---- Data Loading ----\n\n /**\n * Load menu tree for current scope\n */\n protected async loadMenuItems(): Promise<void> {\n try {\n this.isLoading.set(true);\n this.error.set('');\n\n const treeNodes = await this.menuManagementService.getMenuTreeByScope(this.currentScope());\n this.treeNodes.set(treeNodes);\n this.recompute();\n } catch (error) {\n this.error.set(error instanceof Error ? error.message : 'Failed to load menu items');\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.load',\n );\n this.toastService.danger(message);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n /**\n * Sync tree changes to backend\n */\n private async syncTreeChanges(): Promise<void> {\n // Prevent concurrent sync operations\n if (this.isSyncing) {\n return;\n }\n\n try {\n this.isSyncing = true;\n const scope = this.currentScope();\n\n // Get nodes from signal - the tree component mutates the array in place\n // so this.treeNodes() will have the updated structure after drag-drop\n const nodes = this.treeNodes();\n\n console.log('[syncTreeChanges] nodes count:', nodes?.length);\n \n // Log detailed node structure\n const logNode = (n: any, level: number = 0): any => ({\n id: n['id'],\n title: n['title'],\n level,\n childrenCount: (n['children'] as any[])?.length ?? 0,\n children: (n['children'] as any[])?.map((c: any) => logNode(c, level + 1)) ?? [],\n });\n console.log('[syncTreeChanges] Full tree structure:', JSON.stringify(nodes?.map(n => logNode(n)), null, 2));\n\n if (!nodes || nodes.length === 0) {\n console.log('[syncTreeChanges] No nodes to sync');\n return;\n }\n\n await this.menuManagementService.syncTreeChangesByScope(scope, nodes);\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.success.reorder',\n );\n this.toastService.success(message);\n } catch (error) {\n console.error('Failed to sync tree changes:', error);\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.sync',\n );\n this.toastService.danger(message);\n } finally {\n this.isSyncing = false;\n }\n }\n\n //#endregion\n\n //#region ---- Page Layout Interface ----\n\n /**\n * Get page title\n */\n override async getPageTitle(): Promise<string> {\n const scopeName = this.currentScope();\n const scopeKey = scopeName === AXPPlatformScope.User ? 'user' : 'tenant';\n return this.translationService.translateAsync(`@platform-management:menu-management.menus.${scopeKey}.title`);\n }\n\n /**\n * Get page description\n */\n override async getPageDescription(): Promise<string> {\n return this.translationService.translateAsync(\n '@platform-management:menu-management.components.menu-list.description',\n );\n }\n\n /**\n * Get primary menu items (actions)\n */\n override async getPrimaryMenuItems(): Promise<AXPActionMenuItem[]> {\n return [\n {\n title: await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.add-root.title',\n ),\n icon: 'fa-light fa-plus',\n color: 'primary',\n command: { name: 'add-root' },\n },\n ];\n }\n\n /**\n * Get secondary menu items\n */\n override async getSecondaryMenuItems(): Promise<AXPActionMenuItem[]> {\n return [\n {\n title: await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.collapse.title',\n ),\n icon: 'fa-light fa-minus-square',\n command: { name: 'collapse' },\n },\n\n {\n title: await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.expand.title',\n ),\n icon: 'fa-light fa-plus-square',\n command: { name: 'expand' },\n break: true,\n },\n {\n title: await this.translationService.translateAsync('@platform-management:menu-management.actions.reset.title'),\n icon: 'fa-light fa-rotate-left',\n color: 'danger',\n command: { name: 'reset' },\n },\n ];\n }\n\n /**\n * Execute commands from page actions\n */\n override async execute(command: AXPExecuteCommand): Promise<void> {\n switch (command.name) {\n case 'add-root':\n await this.addRootMenuItem();\n break;\n case 'collapse':\n this.tree()?.collapseAll();\n break;\n case 'expand':\n this.tree()?.expandAll();\n break;\n case 'reset':\n await this.resetCustomizations();\n break;\n }\n }\n\n //#endregion\n\n //#region ---- Action Handlers ----\n\n /**\n * Handle menu item action\n */\n protected async onAction(action: AXPMenuItemAction, nodeData: AXPMenuTreeNodeData): Promise<void> {\n switch (action) {\n case 'show':\n await this.showMenuItem(nodeData);\n break;\n case 'hide':\n await this.hideMenuItem(nodeData);\n break;\n case 'edit':\n await this.editMenuItem(nodeData);\n break;\n case 'delete':\n await this.deleteMenuItem(nodeData);\n break;\n case 'add-child':\n await this.addChildMenuItem(nodeData);\n break;\n }\n }\n\n /**\n * Add new root menu item\n */\n protected async addRootMenuItem(): Promise<void> {\n await this.showMenuItemDialog(null, null);\n }\n\n /**\n * Add new child menu item\n */\n protected async addChildMenuItem(parentNodeData: AXPMenuTreeNodeData): Promise<void> {\n await this.showMenuItemDialog(null, parentNodeData.menuItem.name);\n }\n\n /**\n * Reset customizations\n */\n protected async resetCustomizations(): Promise<void> {\n const title = await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.reset.confirm.title',\n );\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.reset.confirm.message',\n );\n const confirmed = await this.dialogService.confirm(title, message);\n\n if (!confirmed) return;\n\n try {\n // Reset customizations for current scope\n await this.menuManagementService.resetCustomizationsByScope(this.currentScope());\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.success.reset',\n );\n this.toastService.success(message);\n } catch (error) {\n console.error('Failed to reset customizations:', error);\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.reset',\n );\n this.toastService.danger(message);\n } finally {\n // Reload anyway to show current state\n await this.loadMenuItems();\n }\n }\n\n //#endregion\n\n //#region ---- Menu Item Actions ----\n\n /**\n * Show menu item\n */\n private async showMenuItem(nodeData: AXPMenuTreeNodeData): Promise<void> {\n await this.executeMenuAction(\n () => this.menuManagementService.showMenuItemByScope(this.currentScope(), nodeData.menuItem.name!),\n '@platform-management:menu-management.messages.success.show',\n '@platform-management:menu-management.messages.error.show',\n );\n }\n\n /**\n * Hide menu item\n */\n private async hideMenuItem(nodeData: AXPMenuTreeNodeData): Promise<void> {\n await this.executeMenuAction(\n () => this.menuManagementService.hideMenuItemByScope(this.currentScope(), nodeData.menuItem.name!),\n '@platform-management:menu-management.messages.success.hide',\n '@platform-management:menu-management.messages.error.hide',\n );\n }\n\n /**\n * Edit menu item\n */\n private async editMenuItem(nodeData: AXPMenuTreeNodeData): Promise<void> {\n await this.showMenuItemDialog(nodeData);\n }\n\n /**\n * Delete custom menu item\n */\n private async deleteMenuItem(nodeData: AXPMenuTreeNodeData): Promise<void> {\n const title = await this.translationService.translateAsync('@general:actions.delete.title');\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.delete.confirm.message',\n );\n const confirmed = await this.dialogService.confirm(title, message);\n\n if (!confirmed) return;\n\n try {\n const item = nodeData.menuItem;\n if (!item.name) return;\n\n await this.menuManagementService.deleteCustomMenuItemByScope(this.currentScope(), item.name);\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.success.delete',\n );\n this.toastService.success(message);\n await this.loadMenuItems();\n } catch (error) {\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.delete',\n );\n this.toastService.danger(message);\n }\n }\n\n //#endregion\n\n //#region ---- Dialog Helpers ----\n\n /**\n * Show menu item dialog (add/edit)\n */\n private async showMenuItemDialog(\n nodeData: AXPMenuTreeNodeData | null,\n parentName: string | null = null,\n ): Promise<void> {\n const item = nodeData?.menuItem;\n const isEdit = !!item;\n const title = isEdit\n ? '@platform-management:menu-management.components.edit-dialog.title'\n : '@platform-management:menu-management.components.add-dialog.title';\n\n const context = {\n name: item?.name || '',\n text: item?.text || '',\n type: item?.type || 'menu',\n icon: item?.icon || '',\n path: item?.path || '',\n priority: item?.priority || 0,\n description: item?.description || '',\n };\n\n const dialogRef: any = await this.layoutBuilder\n .create()\n .dialog((dialog: any) => {\n dialog\n .setTitle(title)\n .setContext(context)\n .content((flex: any) => {\n flex\n .setDirection('column')\n .formField('@platform-management:menu-management.fields.name', (field: any) => {\n field.path('name');\n field.textBox({\n placeholder: '@platform-management:menu-management.fields.name',\n validations: [{ rule: 'required' }],\n disabled: isEdit && nodeData?.metadata?.isBuiltIn,\n });\n })\n .formField('@platform-management:menu-management.fields.text', (field: any) => {\n field.path('text');\n field.textBox({\n placeholder: '@platform-management:menu-management.fields.text',\n validations: [{ rule: 'required' }],\n });\n })\n .formField('@platform-management:menu-management.fields.icon', (field: any) => {\n field.path('icon');\n field.customWidget('icon-chooser', {});\n })\n .formField('@platform-management:menu-management.fields.path', (field: any) => {\n field.path('path');\n field.textBox({\n placeholder: '@platform-management:menu-management.fields.path',\n disabled: isEdit && nodeData?.metadata?.isBuiltIn,\n });\n })\n .formField('@platform-management:menu-management.fields.priority', (field: any) => {\n field.path('priority');\n field.numberBox({\n placeholder: '@platform-management:menu-management.fields.priority',\n step: 10,\n });\n })\n .formField('@platform-management:menu-management.fields.description', (field: any) => {\n field.path('description');\n field.largeTextBox({\n placeholder: '@platform-management:menu-management.fields.description',\n rows: 3,\n });\n });\n })\n .setActions((actions: any) => {\n actions.cancel('@general:actions.cancel.title').submit('@general:actions.save.title');\n });\n })\n .show();\n\n const action = dialogRef.action();\n if (action === 'cancel') {\n dialogRef.close();\n return;\n }\n\n const formData = dialogRef.context() as Partial<AXPMenuItem>;\n\n try {\n if (isEdit && item?.name) {\n // Update existing item\n if (nodeData?.metadata?.isCustom) {\n await this.menuManagementService.updateCustomMenuItemByScope(\n this.currentScope(),\n item.name,\n formData as AXPMenuItem,\n );\n } else {\n await this.menuManagementService.updateMenuPropertiesByScope(this.currentScope(), item.name, formData);\n }\n } else {\n // Add new custom item\n const newItem: AXPMenuItem = {\n name: formData.name!,\n text: formData.text!,\n icon: formData.icon,\n path: formData.path,\n priority: formData.priority,\n description: formData.description,\n };\n\n // If parent is specified, add as child\n if (parentName) {\n // Add custom item as child of parent\n await this.menuManagementService.addCustomMenuItemByScope(this.currentScope(), newItem, parentName);\n } else {\n // Add as root level item\n await this.menuManagementService.addCustomMenuItemByScope(this.currentScope(), newItem, null);\n }\n }\n\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.success.save',\n );\n this.toastService.success(message);\n await this.loadMenuItems();\n dialogRef.close();\n } catch (error) {\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.save',\n );\n this.toastService.danger(message);\n }\n }\n\n /**\n * Execute a menu action with common error handling\n */\n private async executeMenuAction(\n action: () => Promise<void>,\n successMessageKey: string,\n errorMessageKey: string,\n ): Promise<void> {\n try {\n await action();\n const message = await this.translationService.translateAsync(successMessageKey);\n this.toastService.success(message);\n await this.loadMenuItems();\n } catch (error) {\n console.error('Menu action failed:', error);\n const message = await this.translationService.translateAsync(errorMessageKey);\n this.toastService.danger(message);\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","<axp-page-layout>\n <axp-page-content>\n @if (isLoading()) {\n <!-- Loading State -->\n <axp-state-message\n mode=\"loading\"\n icon=\"fa-light fa-spinner-third fa-spin\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.description'\n | translate\n | async)!\n \"\n />\n } @else if (error()) {\n <!-- Error State -->\n <axp-state-message\n mode=\"error\"\n icon=\"fa-light fa-circle-exclamation\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@general:actions.retry.title' | translate | async\"\n [look]=\"'outline'\"\n [color]=\"'primary'\"\n (onClick)=\"loadMenuItems()\"\n >\n <i class=\"fa-light fa-rotate-left\"></i>\n </ax-button>\n </axp-state-message>\n } @else if (treeNodes().length === 0) {\n <!-- Empty State -->\n <axp-state-message\n mode=\"empty\"\n icon=\"fa-light fa-bars\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@platform-management:menu-management.actions.add-root.title' | translate | async\"\n [look]=\"'solid'\"\n [color]=\"'primary'\"\n (onClick)=\"addRootMenuItem()\"\n >\n <i class=\"fa-light fa-plus\"></i>\n </ax-button>\n </axp-state-message>\n } @else {\n <!-- Menu Tree Content -->\n <div class=\"axm-menu-list__container\">\n <!-- Menu Tree -->\n <div class=\"axm-menu-list__tree\">\n <ax-tree-view\n [(datasource)]=\"treeNodes\"\n [look]=\"'default'\"\n [nodeTemplate]=\"itemTemplate\"\n [selectMode]=\"'none'\"\n [showIcons]=\"false\"\n [showChildrenBadge]=\"false\"\n [dragBehavior]=\"'move'\"\n [dragArea]=\"'handler'\"\n (onBeforeDrop)=\"handleBeforeDrop($event)\"\n (onItemsChange)=\"handleAfterDrop($event)\"\n ></ax-tree-view>\n </div>\n </div>\n }\n </axp-page-content>\n</axp-page-layout>\n\n<!-- Custom Item Template -->\n<ng-template #itemTemplate let-node=\"node\" let-level=\"level\">\n @let nodeData = node['data'];\n @let item = nodeData.menuItem;\n @let metadata = nodeData.metadata;\n <div\n class=\"axm-menu-tree-item__wrapper\"\n [class.axm-menu-tree-item__wrapper--hidden]=\"metadata.isHidden\"\n [class.axm-menu-tree-item__wrapper--custom]=\"metadata.isCustom\"\n [class.axm-menu-tree-item__wrapper--group]=\"item.type === 'group'\"\n >\n <!-- Icon (hidden for groups) -->\n @if (item.icon && item.type !== 'group') {\n <i class=\"axm-menu-tree-item__icon\" [class]=\"item.icon\"></i>\n }\n\n <!-- Text or Info -->\n @if (item.type === 'group') {\n <!-- Group Heading -->\n <span class=\"axm-menu-tree-item__group\">\n <i class=\"fa-light fa-layer-group\"></i>\n {{ item.text | translate | async }}\n </span>\n } @else if (item.type === 'break') {\n <!-- Divider -->\n <span class=\"axm-menu-tree-item__divider\">\n <i class=\"fa-light fa-minus\"></i>\n {{ '@platform-management:menu-management.states.divider' | translate | async }}\n </span>\n } @else if (item.text) {\n <!-- Regular Menu Item -->\n <span class=\"axm-menu-tree-item__text\">\n {{ item.text | translate | async }}\n </span>\n } @else if (item.path) {\n <!-- Path-only Item -->\n <span class=\"axm-menu-tree-item__path\">\n <i class=\"fa-light fa-link\"></i>\n {{ item.path }}\n </span>\n }\n\n <!-- Menu Name/Key -->\n @if (item.name) {\n <code class=\"axm-menu-tree-item__name\">{{ item.name }}</code>\n }\n\n <!-- Status Badges -->\n @if (metadata.isHidden) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.hidden' | translate | async)!\"\n color=\"danger\"\n ></ax-badge>\n } @else if (metadata.isCustom) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.custom' | translate | async)!\"\n color=\"success\"\n ></ax-badge>\n } @else if (metadata.isBuiltIn) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.built-in' | translate | async)!\"\n color=\"primary\"\n ></ax-badge>\n }\n\n <!-- Actions Dropdown -->\n <ax-button class=\"axm-menu-tree-item__actions ax-sm\" [look]=\"'blank'\" [iconOnly]=\"true\">\n <ax-prefix>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </ax-prefix>\n\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <!-- Edit (only for items with names) -->\n @if (item.name) {\n <ax-button-item\n [text]=\"('@general:actions.edit.title' | translate | async)!\"\n (onClick)=\"onAction('edit', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-edit\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Show/Hide (only for items with names) -->\n @if (item.name && metadata.isBuiltIn) {\n @if (metadata.isHidden) {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.show.title' | translate | async)!\"\n (onClick)=\"onAction('show', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye\"></i>\n </ax-prefix>\n </ax-button-item>\n } @else {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.hide.title' | translate | async)!\"\n (onClick)=\"onAction('hide', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye-slash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n }\n\n @if (!item.path && (item.type === 'menu' || !item.type)) {\n <!-- Add Child -->\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.add-child.title' | translate | async)!\"\n (onClick)=\"onAction('add-child', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-plus\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Delete (only for custom items with names) -->\n @if (item.name && metadata.isCustom) {\n <ax-divider></ax-divider>\n <ax-button-item\n [color]=\"'danger'\"\n [text]=\"('@general:actions.delete.title' | translate | async)!\"\n (onClick)=\"onAction('delete', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-trash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Info message for items without names -->\n @if (!item.name) {\n <ax-divider></ax-divider>\n <div class=\"p-2 text-xs text-neutral-500 italic\">\n {{ '@platform-management:menu-management.messages.info.no-name' | translate | async }}\n </div>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n</ng-template>\n"],"names":["i5","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA;AA6BM,MAAO,oBAAqB,SAAQ,0BAA0B,CAAA;AA3BpE,IAAA,WAA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AAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAcJ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBA3BhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAAA,OAAA,EAChB;wBACP,YAAY;wBACZ,cAAc;wBACd,iBAAiB;wBACjB,sBAAsB;wBACtB,gBAAgB;wBAChB,mBAAmB;wBACnB,mBAAmB;wBACnB,sBAAsB;wBACtB,4BAA4B;wBAC5B,wBAAwB;wBACxB,aAAa;AACd,qBAAA,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAAA,SAAA,EAC1B;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,oBAAsB;AAClC,yBAAA;AACF,qBAAA,EAAA,IAAA,EACK,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAA,QAAA,EAAA,0vQAAA,EAAA,MAAA,EAAA,CAAA,mnHAAA,CAAA,EAAA;sFAgBV,mBAAmB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-menu-list.component-CZf5cHCK.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/menu-management/pages/menu-list/menu-list.component.ts","../../../../libs/modules/platform-management/client/src/lib/features/menu-management/pages/menu-list/menu-list.component.html"],"sourcesContent":["\nimport { AXPActionMenuItem, AXPExecuteCommand, AXPPlatformScope } from '@acorex-platform/framework-shared/core';\nimport { AXBadgeModule } from '@acorex/components/badge';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXDropdownButtonModule } from '@acorex/components/dropdown-button';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTreeViewBeforeDropEvent, AXTreeViewComponent, AXTreeViewDropEvent, AXTreeViewNode } from '@acorex/components/tree-view';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPMenuItem } from '@acorex-platform/framework-client/common';\n\nimport { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';\nimport { AXPStateMessageComponent, AXPThemeLayoutBlockComponent } from '@acorex-platform/framework-client/layout/components';\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent, AXPPageLayoutComponent } from '@acorex-platform/framework-client/layout/views';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n OnDestroy,\n OnInit,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { Subject, takeUntil } from 'rxjs';\nimport { AXPMenuItemAction } from '../../menu-customization.types';\nimport { AXPMenuManagementService, AXPMenuTreeNodeData } from '../../menu-management.service';\n\n//#region ---- Menu List Component ----\n\n@Component({\n selector: 'axm-menu-list',\n imports: [\n CommonModule,\n AXButtonModule,\n AXDecoratorModule,\n AXDropdownButtonModule,\n AXDropdownModule,\n AXTranslationModule,\n AXTreeViewComponent,\n AXPPageLayoutComponent,\n AXPThemeLayoutBlockComponent,\n AXPStateMessageComponent,\n AXBadgeModule,\n ],\n templateUrl: './menu-list.component.html',\n styleUrls: ['./menu-list.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMMenuListComponent,\n },\n ],\n host: { class: 'axm-menu-list-page' },\n})\nexport class AXMMenuListComponent extends AXPPageLayoutBaseComponent implements OnInit, OnDestroy {\n //#region ---- Dependencies ----\n\n private menuManagementService = inject(AXPMenuManagementService);\n private layoutBuilder = inject(AXPLayoutBuilderService);\n protected dialogService = inject(AXDialogService);\n protected override toastService = inject(AXToastService);\n private translationService = inject(AXTranslationService);\n private route = inject(ActivatedRoute);\n\n //#endregion\n\n //#region ---- Component State ----\n\n protected tree = viewChild(AXTreeViewComponent);\n protected treeNodes = signal<AXTreeViewNode[]>([]);\n protected isLoading = signal<boolean>(false);\n protected error = signal<string>('');\n protected currentScope = signal<AXPPlatformScope>(AXPPlatformScope.User);\n private isSyncing = false; // Prevent concurrent sync operations\n private destroy$ = new Subject<void>(); // For subscription cleanup\n\n //#endregion\n\n //#region ---- Lifecycle ----\n\n override async ngOnInit(): Promise<void> {\n await super.ngOnInit();\n\n // Get scope from route (with memory leak prevention)\n this.route.params.pipe(takeUntil(this.destroy$)).subscribe(async (params) => {\n const scope = params['scope'] as AXPPlatformScope;\n if (scope) {\n this.currentScope.set(scope);\n await this.loadMenuItems();\n this.recompute(); // Update page header after loading\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n //#endregion\n\n //#region ---- Event Handlers ----\n\n /**\n * Handle before drop validation\n */\n async handleBeforeDrop(e: AXTreeViewBeforeDropEvent): Promise<void> {\n console.log('[handleBeforeDrop] Event triggered!', {\n movedNode: e.movedNode?.['id'],\n previousParent: e.previousParent?.['id'],\n currentParent: e.currentParent?.['id'],\n previousIndex: e.previousIndex,\n currentIndex: e.currentIndex,\n });\n\n const targetParent = (e.currentParent?.['data'] as AXPMenuTreeNodeData) || null;\n\n // Prevent dropping into items with paths (leaf nodes)\n if (targetParent?.menuItem?.path) {\n e.canceled = true;\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.move',\n );\n this.toastService.warning(message);\n return;\n }\n\n // Note: Circular reference validation is handled by the tree component itself\n // Additional validation can be added here if needed based on business rules\n }\n\n /**\n * Handle after drop event to sync changes\n * The event contains information about the moved node and its new position\n */\n async handleAfterDrop(event: AXTreeViewDropEvent): Promise<void> {\n console.log('[handleAfterDrop] Event triggered!', {\n movedNode: event.node?.['id'],\n movedNodeData: event.node?.['data'],\n previousParent: event.previousParent?.['id'],\n currentParent: event.currentParent?.['id'],\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n });\n\n // Check what the tree component has\n const treeComp = this.tree();\n if (treeComp) {\n console.log('[handleAfterDrop] Tree component datasource:', treeComp.datasource);\n }\n\n // Check our signal\n console.log('[handleAfterDrop] Our treeNodes signal:', this.treeNodes());\n\n await this.syncTreeChanges();\n }\n\n //#endregion\n\n //#region ---- Data Loading ----\n\n /**\n * Load menu tree for current scope\n */\n protected async loadMenuItems(): Promise<void> {\n try {\n this.isLoading.set(true);\n this.error.set('');\n\n const treeNodes = await this.menuManagementService.getMenuTreeByScope(this.currentScope());\n this.treeNodes.set(treeNodes);\n this.recompute();\n } catch (error) {\n this.error.set(error instanceof Error ? error.message : 'Failed to load menu items');\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.load',\n );\n this.toastService.danger(message);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n /**\n * Sync tree changes to backend\n */\n private async syncTreeChanges(): Promise<void> {\n // Prevent concurrent sync operations\n if (this.isSyncing) {\n return;\n }\n\n try {\n this.isSyncing = true;\n const scope = this.currentScope();\n\n // Get nodes from signal - the tree component mutates the array in place\n // so this.treeNodes() will have the updated structure after drag-drop\n const nodes = this.treeNodes();\n\n console.log('[syncTreeChanges] nodes count:', nodes?.length);\n \n // Log detailed node structure\n const logNode = (n: any, level: number = 0): any => ({\n id: n['id'],\n title: n['title'],\n level,\n childrenCount: (n['children'] as any[])?.length ?? 0,\n children: (n['children'] as any[])?.map((c: any) => logNode(c, level + 1)) ?? [],\n });\n console.log('[syncTreeChanges] Full tree structure:', JSON.stringify(nodes?.map(n => logNode(n)), null, 2));\n\n if (!nodes || nodes.length === 0) {\n console.log('[syncTreeChanges] No nodes to sync');\n return;\n }\n\n await this.menuManagementService.syncTreeChangesByScope(scope, nodes);\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.success.reorder',\n );\n this.toastService.success(message);\n } catch (error) {\n console.error('Failed to sync tree changes:', error);\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.sync',\n );\n this.toastService.danger(message);\n } finally {\n this.isSyncing = false;\n }\n }\n\n //#endregion\n\n //#region ---- Page Layout Interface ----\n\n /**\n * Get page title\n */\n override async getPageTitle(): Promise<string> {\n const scopeName = this.currentScope();\n const scopeKey = scopeName === AXPPlatformScope.User ? 'user' : 'tenant';\n return this.translationService.translateAsync(`@platform-management:menu-management.menus.${scopeKey}.title`);\n }\n\n /**\n * Get page description\n */\n override async getPageDescription(): Promise<string> {\n return this.translationService.translateAsync(\n '@platform-management:menu-management.components.menu-list.description',\n );\n }\n\n /**\n * Get primary menu items (actions)\n */\n override async getPrimaryMenuItems(): Promise<AXPActionMenuItem[]> {\n return [\n {\n title: await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.add-root.title',\n ),\n icon: 'fa-light fa-plus',\n color: 'primary',\n command: { name: 'add-root' },\n },\n ];\n }\n\n /**\n * Get secondary menu items\n */\n override async getSecondaryMenuItems(): Promise<AXPActionMenuItem[]> {\n return [\n {\n title: await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.collapse.title',\n ),\n icon: 'fa-light fa-minus-square',\n command: { name: 'collapse' },\n },\n\n {\n title: await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.expand.title',\n ),\n icon: 'fa-light fa-plus-square',\n command: { name: 'expand' },\n break: true,\n },\n {\n title: await this.translationService.translateAsync('@platform-management:menu-management.actions.reset.title'),\n icon: 'fa-light fa-rotate-left',\n color: 'danger',\n command: { name: 'reset' },\n },\n ];\n }\n\n /**\n * Execute commands from page actions\n */\n override async execute(command: AXPExecuteCommand): Promise<void> {\n switch (command.name) {\n case 'add-root':\n await this.addRootMenuItem();\n break;\n case 'collapse':\n this.tree()?.collapseAll();\n break;\n case 'expand':\n this.tree()?.expandAll();\n break;\n case 'reset':\n await this.resetCustomizations();\n break;\n }\n }\n\n //#endregion\n\n //#region ---- Action Handlers ----\n\n /**\n * Handle menu item action\n */\n protected async onAction(action: AXPMenuItemAction, nodeData: AXPMenuTreeNodeData): Promise<void> {\n switch (action) {\n case 'show':\n await this.showMenuItem(nodeData);\n break;\n case 'hide':\n await this.hideMenuItem(nodeData);\n break;\n case 'edit':\n await this.editMenuItem(nodeData);\n break;\n case 'delete':\n await this.deleteMenuItem(nodeData);\n break;\n case 'add-child':\n await this.addChildMenuItem(nodeData);\n break;\n }\n }\n\n /**\n * Add new root menu item\n */\n protected async addRootMenuItem(): Promise<void> {\n await this.showMenuItemDialog(null, null);\n }\n\n /**\n * Add new child menu item\n */\n protected async addChildMenuItem(parentNodeData: AXPMenuTreeNodeData): Promise<void> {\n await this.showMenuItemDialog(null, parentNodeData.menuItem.name);\n }\n\n /**\n * Reset customizations\n */\n protected async resetCustomizations(): Promise<void> {\n const title = await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.reset.confirm.title',\n );\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.reset.confirm.message',\n );\n const confirmed = await this.dialogService.confirm(title, message);\n\n if (!confirmed) return;\n\n try {\n // Reset customizations for current scope\n await this.menuManagementService.resetCustomizationsByScope(this.currentScope());\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.success.reset',\n );\n this.toastService.success(message);\n } catch (error) {\n console.error('Failed to reset customizations:', error);\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.reset',\n );\n this.toastService.danger(message);\n } finally {\n // Reload anyway to show current state\n await this.loadMenuItems();\n }\n }\n\n //#endregion\n\n //#region ---- Menu Item Actions ----\n\n /**\n * Show menu item\n */\n private async showMenuItem(nodeData: AXPMenuTreeNodeData): Promise<void> {\n await this.executeMenuAction(\n () => this.menuManagementService.showMenuItemByScope(this.currentScope(), nodeData.menuItem.name!),\n '@platform-management:menu-management.messages.success.show',\n '@platform-management:menu-management.messages.error.show',\n );\n }\n\n /**\n * Hide menu item\n */\n private async hideMenuItem(nodeData: AXPMenuTreeNodeData): Promise<void> {\n await this.executeMenuAction(\n () => this.menuManagementService.hideMenuItemByScope(this.currentScope(), nodeData.menuItem.name!),\n '@platform-management:menu-management.messages.success.hide',\n '@platform-management:menu-management.messages.error.hide',\n );\n }\n\n /**\n * Edit menu item\n */\n private async editMenuItem(nodeData: AXPMenuTreeNodeData): Promise<void> {\n await this.showMenuItemDialog(nodeData);\n }\n\n /**\n * Delete custom menu item\n */\n private async deleteMenuItem(nodeData: AXPMenuTreeNodeData): Promise<void> {\n const title = await this.translationService.translateAsync('@general:actions.delete.title');\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.actions.delete.confirm.message',\n );\n const confirmed = await this.dialogService.confirm(title, message);\n\n if (!confirmed) return;\n\n try {\n const item = nodeData.menuItem;\n if (!item.name) return;\n\n await this.menuManagementService.deleteCustomMenuItemByScope(this.currentScope(), item.name);\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.success.delete',\n );\n this.toastService.success(message);\n await this.loadMenuItems();\n } catch (error) {\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.delete',\n );\n this.toastService.danger(message);\n }\n }\n\n //#endregion\n\n //#region ---- Dialog Helpers ----\n\n /**\n * Show menu item dialog (add/edit)\n */\n private async showMenuItemDialog(\n nodeData: AXPMenuTreeNodeData | null,\n parentName: string | null = null,\n ): Promise<void> {\n const item = nodeData?.menuItem;\n const isEdit = !!item;\n const title = isEdit\n ? '@platform-management:menu-management.components.edit-dialog.title'\n : '@platform-management:menu-management.components.add-dialog.title';\n\n const context = {\n name: item?.name || '',\n text: item?.text || '',\n type: item?.type || 'menu',\n icon: item?.icon || '',\n path: item?.path || '',\n priority: item?.priority || 0,\n description: item?.description || '',\n };\n\n const dialogRef: any = await this.layoutBuilder\n .create()\n .dialog((dialog: any) => {\n dialog\n .setTitle(title)\n .setContext(context)\n .content((flex: any) => {\n flex\n .setDirection('column')\n .formField('@platform-management:menu-management.fields.name', (field: any) => {\n field.path('name');\n field.textBox({\n placeholder: '@platform-management:menu-management.fields.name',\n validations: [{ rule: 'required' }],\n disabled: isEdit && nodeData?.metadata?.isBuiltIn,\n });\n })\n .formField('@platform-management:menu-management.fields.text', (field: any) => {\n field.path('text');\n field.textBox({\n placeholder: '@platform-management:menu-management.fields.text',\n validations: [{ rule: 'required' }],\n });\n })\n .formField('@platform-management:menu-management.fields.icon', (field: any) => {\n field.path('icon');\n field.customWidget('icon-chooser', {});\n })\n .formField('@platform-management:menu-management.fields.path', (field: any) => {\n field.path('path');\n field.textBox({\n placeholder: '@platform-management:menu-management.fields.path',\n disabled: isEdit && nodeData?.metadata?.isBuiltIn,\n });\n })\n .formField('@platform-management:menu-management.fields.priority', (field: any) => {\n field.path('priority');\n field.numberBox({\n placeholder: '@platform-management:menu-management.fields.priority',\n step: 10,\n });\n })\n .formField('@platform-management:menu-management.fields.description', (field: any) => {\n field.path('description');\n field.largeTextBox({\n placeholder: '@platform-management:menu-management.fields.description',\n rows: 3,\n });\n });\n })\n .setActions((actions: any) => {\n actions.cancel('@general:actions.cancel.title').submit('@general:actions.save.title');\n });\n })\n .show();\n\n const action = dialogRef.action();\n if (action === 'cancel') {\n dialogRef.close();\n return;\n }\n\n const formData = dialogRef.context() as Partial<AXPMenuItem>;\n\n try {\n if (isEdit && item?.name) {\n // Update existing item\n if (nodeData?.metadata?.isCustom) {\n await this.menuManagementService.updateCustomMenuItemByScope(\n this.currentScope(),\n item.name,\n formData as AXPMenuItem,\n );\n } else {\n await this.menuManagementService.updateMenuPropertiesByScope(this.currentScope(), item.name, formData);\n }\n } else {\n // Add new custom item\n const newItem: AXPMenuItem = {\n name: formData.name!,\n text: formData.text!,\n icon: formData.icon,\n path: formData.path,\n priority: formData.priority,\n description: formData.description,\n };\n\n // If parent is specified, add as child\n if (parentName) {\n // Add custom item as child of parent\n await this.menuManagementService.addCustomMenuItemByScope(this.currentScope(), newItem, parentName);\n } else {\n // Add as root level item\n await this.menuManagementService.addCustomMenuItemByScope(this.currentScope(), newItem, null);\n }\n }\n\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.success.save',\n );\n this.toastService.success(message);\n await this.loadMenuItems();\n dialogRef.close();\n } catch (error) {\n const message = await this.translationService.translateAsync(\n '@platform-management:menu-management.messages.error.save',\n );\n this.toastService.danger(message);\n }\n }\n\n /**\n * Execute a menu action with common error handling\n */\n private async executeMenuAction(\n action: () => Promise<void>,\n successMessageKey: string,\n errorMessageKey: string,\n ): Promise<void> {\n try {\n await action();\n const message = await this.translationService.translateAsync(successMessageKey);\n this.toastService.success(message);\n await this.loadMenuItems();\n } catch (error) {\n console.error('Menu action failed:', error);\n const message = await this.translationService.translateAsync(errorMessageKey);\n this.toastService.danger(message);\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","<axp-page-layout>\n <axp-page-content>\n @if (isLoading()) {\n <!-- Loading State -->\n <axp-state-message\n mode=\"loading\"\n icon=\"fa-light fa-spinner-third fa-spin\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.loading.description'\n | translate\n | async)!\n \"\n />\n } @else if (error()) {\n <!-- Error State -->\n <axp-state-message\n mode=\"error\"\n icon=\"fa-light fa-circle-exclamation\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.error.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@general:actions.retry.title' | translate | async\"\n [look]=\"'outline'\"\n [color]=\"'primary'\"\n (onClick)=\"loadMenuItems()\"\n >\n <i class=\"fa-light fa-rotate-left\"></i>\n </ax-button>\n </axp-state-message>\n } @else if (treeNodes().length === 0) {\n <!-- Empty State -->\n <axp-state-message\n mode=\"empty\"\n icon=\"fa-light fa-bars\"\n [title]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.title' | translate | async)!\n \"\n [description]=\"\n ('@platform-management:menu-management.components.menu-list.empty-states.no-data.description'\n | translate\n | async)!\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@platform-management:menu-management.actions.add-root.title' | translate | async\"\n [look]=\"'solid'\"\n [color]=\"'primary'\"\n (onClick)=\"addRootMenuItem()\"\n >\n <i class=\"fa-light fa-plus\"></i>\n </ax-button>\n </axp-state-message>\n } @else {\n <!-- Menu Tree Content -->\n <div class=\"axm-menu-list__container\">\n <!-- Menu Tree -->\n <div class=\"axm-menu-list__tree\">\n <ax-tree-view\n [(datasource)]=\"treeNodes\"\n [look]=\"'default'\"\n [nodeTemplate]=\"itemTemplate\"\n [selectMode]=\"'none'\"\n [showIcons]=\"false\"\n [showChildrenBadge]=\"false\"\n [dragBehavior]=\"'move'\"\n [dragArea]=\"'handler'\"\n (onBeforeDrop)=\"handleBeforeDrop($event)\"\n (onItemsChange)=\"handleAfterDrop($event)\"\n ></ax-tree-view>\n </div>\n </div>\n }\n </axp-page-content>\n</axp-page-layout>\n\n<!-- Custom Item Template -->\n<ng-template #itemTemplate let-node=\"node\" let-level=\"level\">\n @let nodeData = node['data'];\n @let item = nodeData.menuItem;\n @let metadata = nodeData.metadata;\n <div\n class=\"axm-menu-tree-item__wrapper\"\n [class.axm-menu-tree-item__wrapper--hidden]=\"metadata.isHidden\"\n [class.axm-menu-tree-item__wrapper--custom]=\"metadata.isCustom\"\n [class.axm-menu-tree-item__wrapper--group]=\"item.type === 'group'\"\n >\n <!-- Icon (hidden for groups) -->\n @if (item.icon && item.type !== 'group') {\n <i class=\"axm-menu-tree-item__icon\" [class]=\"item.icon\"></i>\n }\n\n <!-- Text or Info -->\n @if (item.type === 'group') {\n <!-- Group Heading -->\n <span class=\"axm-menu-tree-item__group\">\n <i class=\"fa-light fa-layer-group\"></i>\n {{ item.text | translate | async }}\n </span>\n } @else if (item.type === 'break') {\n <!-- Divider -->\n <span class=\"axm-menu-tree-item__divider\">\n <i class=\"fa-light fa-minus\"></i>\n {{ '@platform-management:menu-management.states.divider' | translate | async }}\n </span>\n } @else if (item.text) {\n <!-- Regular Menu Item -->\n <span class=\"axm-menu-tree-item__text\">\n {{ item.text | translate | async }}\n </span>\n } @else if (item.path) {\n <!-- Path-only Item -->\n <span class=\"axm-menu-tree-item__path\">\n <i class=\"fa-light fa-link\"></i>\n {{ item.path }}\n </span>\n }\n\n <!-- Menu Name/Key -->\n @if (item.name) {\n <code class=\"axm-menu-tree-item__name\">{{ item.name }}</code>\n }\n\n <!-- Status Badges -->\n @if (metadata.isHidden) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.hidden' | translate | async)!\"\n color=\"danger\"\n ></ax-badge>\n } @else if (metadata.isCustom) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.custom' | translate | async)!\"\n color=\"success\"\n ></ax-badge>\n } @else if (metadata.isBuiltIn) {\n <ax-badge\n [text]=\"('@platform-management:menu-management.states.built-in' | translate | async)!\"\n color=\"primary\"\n ></ax-badge>\n }\n\n <!-- Actions Dropdown -->\n <ax-button class=\"axm-menu-tree-item__actions ax-sm\" [look]=\"'blank'\" [iconOnly]=\"true\">\n <ax-prefix>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </ax-prefix>\n\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <!-- Edit (only for items with names) -->\n @if (item.name) {\n <ax-button-item\n [text]=\"('@general:actions.edit.title' | translate | async)!\"\n (onClick)=\"onAction('edit', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-edit\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Show/Hide (only for items with names) -->\n @if (item.name && metadata.isBuiltIn) {\n @if (metadata.isHidden) {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.show.title' | translate | async)!\"\n (onClick)=\"onAction('show', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye\"></i>\n </ax-prefix>\n </ax-button-item>\n } @else {\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.hide.title' | translate | async)!\"\n (onClick)=\"onAction('hide', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-eye-slash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n }\n\n @if (!item.path && (item.type === 'menu' || !item.type)) {\n <!-- Add Child -->\n <ax-button-item\n [text]=\"('@platform-management:menu-management.actions.add-child.title' | translate | async)!\"\n (onClick)=\"onAction('add-child', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-plus\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Delete (only for custom items with names) -->\n @if (item.name && metadata.isCustom) {\n <ax-divider></ax-divider>\n <ax-button-item\n [color]=\"'danger'\"\n [text]=\"('@general:actions.delete.title' | translate | async)!\"\n (onClick)=\"onAction('delete', nodeData); panel.close()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-trash\"></i>\n </ax-prefix>\n </ax-button-item>\n }\n\n <!-- Info message for items without names -->\n @if (!item.name) {\n <ax-divider></ax-divider>\n <div class=\"p-2 text-xs text-neutral-500 italic\">\n {{ '@platform-management:menu-management.messages.info.no-name' | translate | async }}\n </div>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n</ng-template>\n"],"names":["i5","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA;AA6BM,MAAO,oBAAqB,SAAQ,0BAA0B,CAAA;AA3BpE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