@acorex-platform/module-platform-management-client 0.0.38 → 0.0.46
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-BGVhn6wv.mjs → acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-YuJijjKh.mjs} +465 -101
- package/fesm2022/acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-YuJijjKh.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-command-definition.mjs +20 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-command-definition.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-entity-access-policy.mjs +20 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-entity-access-policy.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-entity-definition.mjs +1499 -30
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-entity-definition.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-module-definition.mjs +396 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-module-definition.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-plugin-definition.mjs +20 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-plugin-definition.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-query-definition.mjs +49 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-query-definition.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-token.mjs +20 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-token.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-widget.mjs +20 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-widget.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-BOwC5Ns9.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-HWczTPH2.mjs} +15 -8
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-HWczTPH2.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-CdvQlwAk.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-C3B1_QMs.mjs} +16 -2
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-C3B1_QMs.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-Dye4aSKE.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-BPkJloHy.mjs} +16 -2
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-BPkJloHy.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-BL1I9pmK.mjs +1621 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-BL1I9pmK.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-Cknl0vbc.mjs +299 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-Cknl0vbc.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-CwU5hMjI.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-BxABTl8L.mjs} +16 -2
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-BxABTl8L.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-DGK684Q1.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-Cv6HVQOU.mjs} +45 -3
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-Cv6HVQOU.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-DI_k6-ha.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-BV8iSuoK.mjs} +16 -2
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-BV8iSuoK.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-C18msniH.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-BYH6SIqU.mjs} +16 -2
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-BYH6SIqU.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog.mjs +1 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts.mjs +1664 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query-contract.util-D_af2BUi.mjs +586 -0
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query-contract.util-D_af2BUi.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query.command-9Ku7C1BC.mjs → acorex-platform-module-platform-management-client-create-user-query.command-Bh49QHkl.mjs} +374 -324
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.command-Bh49QHkl.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-entity-definition-form-page.component-BgBWob9p.mjs +329 -0
- package/fesm2022/acorex-platform-module-platform-management-client-entity-definition-form-page.component-BgBWob9p.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-entity-definition-form-page.provider-hLzgoJu3.mjs +23 -0
- package/fesm2022/acorex-platform-module-platform-management-client-entity-definition-form-page.provider-hLzgoJu3.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs +197 -0
- package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-local-entities.mjs +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-local-entities.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-menu-list.component-uF5w1c7t.mjs → acorex-platform-module-platform-management-client-menu-list.component-iMEnFPEY.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-menu-list.component-uF5w1c7t.mjs.map → acorex-platform-module-platform-management-client-menu-list.component-iMEnFPEY.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-column.component-COfOzMGh.mjs +45 -0
- package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-column.component-COfOzMGh.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BW2pBOeg.mjs +166 -0
- package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BW2pBOeg.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs +45 -0
- package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-B0g6dweQ.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-DRkE2a7n.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-B0g6dweQ.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-DRkE2a7n.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-A0v5MWRU.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-CXI6fJi3.mjs} +2 -3
- package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-A0v5MWRU.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-CXI6fJi3.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-RR5zcsnI.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-C3iHgoC2.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-RR5zcsnI.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-C3iHgoC2.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs +144 -0
- package/fesm2022/acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-platform-management-client.mjs +1 -1
- package/package.json +7 -3
- package/types/acorex-platform-module-platform-management-client-contracts-entities-module-definition.d.ts +5 -0
- package/types/acorex-platform-module-platform-management-client-contracts.d.ts +225 -5
- package/types/acorex-platform-module-platform-management-client.d.ts +35 -3
- package/fesm2022/acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-BGVhn6wv.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-BOwC5Ns9.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-CdvQlwAk.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-Dye4aSKE.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-CcJ58vfr.mjs +0 -158
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-CcJ58vfr.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-CwU5hMjI.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-DGK684Q1.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-DI_k6-ha.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-C18msniH.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.command-9Ku7C1BC.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.types-DdygAori.mjs +0 -71
- package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.types-DdygAori.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-DjStd3a8.mjs +0 -136
- package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-DjStd3a8.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-entity-definition-form-page.component-BgBWob9p.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/entity-definition/build-entity-definition-page-layout.util.ts","../../../../libs/modules/platform-management/client/src/lib/features/entity-definition/entity-definition-form-page.component.ts"],"sourcesContent":["//#region ----- Imports -----\r\n\r\nimport { AXPWidgetsList, type AXPWidgetNode } from '@acorex-platform/framework-shared/core';\r\nimport type { AXPEntityProperty, AXPEntityPropertyGroup } from '@acorex-platform/framework-shared/entity';\r\n\r\nimport {\r\n buildEntityDefinitionEntity,\r\n flattenEntityContentToDesignerForm,\r\n flattenProperties,\r\n} from '@acorex-platform/module-platform-management-client/contracts';\r\n\r\n//#endregion\r\n\r\n//#region ----- Public API -----\r\n\r\nexport function buildEntityDefinitionWizardPageLayout(propertyNames: readonly string[]): AXPWidgetNode {\r\n const entity = buildEntityDefinitionEntity();\r\n const allowed = new Set(propertyNames);\r\n const properties = entity.properties.filter((property) => allowed.has(property.name));\r\n const groups = entity.groups ?? [];\r\n const grouped = new Map<string, AXPEntityProperty[]>();\r\n\r\n for (const property of properties) {\r\n const groupId = property.groupId ?? 'basic-info';\r\n const bucket = grouped.get(groupId) ?? [];\r\n bucket.push(property);\r\n grouped.set(groupId, bucket);\r\n }\r\n\r\n const fieldsets: AXPWidgetNode[] = [];\r\n for (const group of groups) {\r\n const groupProperties = grouped.get(group.id);\r\n if (!groupProperties?.length) {\r\n continue;\r\n }\r\n fieldsets.push(buildFieldset(group, groupProperties));\r\n }\r\n\r\n return {\r\n type: AXPWidgetsList.Layouts.BlockLayout,\r\n mode: 'edit',\r\n options: { gap: '1rem' },\r\n children: fieldsets,\r\n };\r\n}\r\n\r\nexport function defaultWizardValuesFromContext(\r\n propertyNames: readonly string[],\r\n root: Record<string, unknown>,\r\n): Record<string, unknown> {\r\n const content =\r\n root['content'] && typeof root['content'] === 'object' && !Array.isArray(root['content'])\r\n ? (root['content'] as Record<string, unknown>)\r\n : {};\r\n const flattened = flattenEntityContentToDesignerForm(content);\r\n const next: Record<string, unknown> = { ...root };\r\n\r\n for (const name of propertyNames) {\r\n if (root[name] !== undefined) {\r\n next[name] = root[name];\r\n } else if (flattened[name] !== undefined) {\r\n next[name] = flattened[name];\r\n } else {\r\n next[name] = defaultForProperty(name);\r\n }\r\n }\r\n\r\n const properties = flattenProperties(root['properties'] ?? flattened['properties'] ?? content['properties']);\r\n const groups = readObjectArray(root['groups'] ?? flattened['groups'] ?? content['groups']);\r\n next['properties'] = properties;\r\n next['groups'] = groups;\r\n\r\n if (propertyNames.includes('columns')) {\r\n next['columns'] = syncRowsToSource(\r\n readObjectArray(next['columns']),\r\n properties,\r\n 'name',\r\n (property) => ({\r\n name: property['name'],\r\n title: property['title'] ?? property['name'],\r\n widgetType: readWidgetType(property),\r\n }),\r\n );\r\n }\r\n\r\n if (propertyNames.includes('createSections')) {\r\n next['createSections'] = syncRowsToSource(\r\n readObjectArray(next['createSections']),\r\n groups,\r\n 'id',\r\n (group) => ({ id: group['id'] }),\r\n );\r\n }\r\n\r\n if (propertyNames.includes('createProperties')) {\r\n next['createProperties'] = syncRowsToSource(\r\n readObjectArray(next['createProperties']),\r\n properties,\r\n 'name',\r\n (property) => ({\r\n name: property['name'],\r\n colSpan: 6,\r\n }),\r\n );\r\n }\r\n\r\n return next;\r\n}\r\n\r\n//#endregion\r\n\r\n//#region ----- Helpers -----\r\n\r\nfunction buildFieldset(group: AXPEntityPropertyGroup, properties: AXPEntityProperty[]): AXPWidgetNode {\r\n return {\r\n type: AXPWidgetsList.Layouts.FieldsetLayout,\r\n mode: 'edit',\r\n options: {\r\n title: group.title,\r\n look: 'fieldset',\r\n cols: 12,\r\n showHeader: true,\r\n },\r\n children: properties.map((property) => buildFormField(property)),\r\n };\r\n}\r\n\r\nfunction buildFormField(property: AXPEntityProperty): AXPWidgetNode {\r\n const widget = property.schema?.interface;\r\n const child: AXPWidgetNode = {\r\n type: widget?.type || AXPWidgetsList.Editors.TextBox,\r\n mode: 'edit',\r\n path: property.name,\r\n name: property.name,\r\n options: widget?.options ?? {},\r\n children: (widget?.children as AXPWidgetNode[] | undefined) ?? undefined,\r\n };\r\n\r\n return {\r\n type: AXPWidgetsList.Layouts.FormField,\r\n mode: 'edit',\r\n options: {\r\n label: property.title,\r\n showLabel: true,\r\n },\r\n children: [child],\r\n };\r\n}\r\n\r\nfunction defaultForProperty(name: string): unknown {\r\n if (\r\n name === 'rules' ||\r\n name === 'validations' ||\r\n name === 'commandsJson' ||\r\n name === 'queriesJson'\r\n ) {\r\n return '';\r\n }\r\n return [];\r\n}\r\n\r\nfunction syncRowsToSource(\r\n existing: Record<string, unknown>[],\r\n source: Record<string, unknown>[],\r\n key: string,\r\n buildDefault: (item: Record<string, unknown>) => Record<string, unknown>,\r\n): Record<string, unknown>[] {\r\n if (!source.length) {\r\n return existing;\r\n }\r\n const byKey = new Map(existing.map((row) => [String(row[key] ?? ''), row]));\r\n return source\r\n .map((item) => {\r\n const id = String(item[key] ?? item['name'] ?? item['id'] ?? '');\r\n if (!id) {\r\n return null;\r\n }\r\n return byKey.get(id) ?? buildDefault(item);\r\n })\r\n .filter((row): row is Record<string, unknown> => !!row);\r\n}\r\n\r\nfunction readObjectArray(value: unknown): Record<string, unknown>[] {\r\n if (!Array.isArray(value)) {\r\n return [];\r\n }\r\n return value.filter((item) => item && typeof item === 'object' && !Array.isArray(item)) as Record<\r\n string,\r\n unknown\r\n >[];\r\n}\r\n\r\nfunction readWidgetType(property: Record<string, unknown>): string | undefined {\r\n const schema = property['schema'];\r\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\r\n const iface = property['interface'];\r\n if (iface && typeof iface === 'object' && !Array.isArray(iface)) {\r\n const type = (iface as Record<string, unknown>)['type'];\r\n return typeof type === 'string' ? type : undefined;\r\n }\r\n return typeof property['widgetType'] === 'string' ? property['widgetType'] : undefined;\r\n }\r\n const iface = (schema as Record<string, unknown>)['interface'];\r\n if (iface && typeof iface === 'object' && !Array.isArray(iface)) {\r\n const type = (iface as Record<string, unknown>)['type'];\r\n return typeof type === 'string' ? type : undefined;\r\n }\r\n return undefined;\r\n}\r\n\r\n//#endregion\r\n","//#region ----- Imports -----\r\n\r\nimport { AXPExecuteCommand, type AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\r\nimport { AXPLayoutRendererComponent } from '@acorex-platform/framework-client/layout/builder';\r\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\r\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';\r\nimport {\r\n ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES,\r\n ENTITY_DEFINITION_SURFACES_PROPERTY_NAMES,\r\n RootConfig,\r\n} from '@acorex-platform/module-platform-management-client/contracts';\r\n\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n signal,\r\n untracked,\r\n} from '@angular/core';\r\nimport { isEqual } from 'lodash-es';\r\n\r\nimport {\r\n buildEntityDefinitionWizardPageLayout,\r\n defaultWizardValuesFromContext,\r\n} from './build-entity-definition-page-layout.util';\r\n\r\n//#endregion\r\n\r\n//#region ----- Constants -----\r\n\r\nconst SAVE_COMMAND = 'EntityDefinition:SaveWizardStep';\r\nconst ENTITY_FULL_NAME = `${RootConfig.module.name}.${RootConfig.entities.entityDefinition.name}`;\r\n\r\n//#endregion\r\n\r\n//#region ----- Component -----\r\n\r\n@Component({\r\n selector: 'axm-entity-definition-form-page',\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [AXPLayoutRendererComponent],\r\n providers: [\r\n {\r\n provide: AXPPageLayoutBase,\r\n useExisting: AXMEntityDefinitionFormPageComponent,\r\n },\r\n ],\r\n template: `\r\n <div class=\"flex min-h-0 flex-1 flex-col overflow-auto p-1\">\r\n <axp-layout-renderer [layout]=\"pageLayout()\" [(context)]=\"editorContext\" mode=\"edit\" />\r\n </div>\r\n `,\r\n host: {\r\n class: 'flex h-full min-h-0 flex-1 flex-col overflow-hidden',\r\n },\r\n})\r\nexport class AXMEntityDefinitionFormPageComponent extends AXPPageLayoutBaseComponent {\r\n //#region ----- Inputs -----\r\n\r\n rootContext = input<Record<string, unknown>>();\r\n pageConfig = input<Record<string, unknown>>();\r\n options = input<Record<string, unknown>>();\r\n\r\n //#endregion\r\n\r\n //#region ----- Services -----\r\n\r\n private readonly entityService = inject(AXPEntityService);\r\n\r\n //#endregion\r\n\r\n //#region ----- State -----\r\n\r\n protected readonly editorContext = signal<Record<string, unknown>>({});\r\n private readonly baseline = signal<Record<string, unknown>>({});\r\n private readonly seededRootKey = signal<string>('');\r\n\r\n //#endregion\r\n\r\n //#region ----- Computed -----\r\n\r\n protected readonly propertyNames = computed(() => {\r\n const fromOptions = this.options()?.['propertyNames'];\r\n if (Array.isArray(fromOptions) && fromOptions.every((item) => typeof item === 'string')) {\r\n return fromOptions as string[];\r\n }\r\n const field = this.pageConfig()?.['field'];\r\n if (field === 'properties') {\r\n return [...ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES];\r\n }\r\n if (field === 'interfaces') {\r\n return [...ENTITY_DEFINITION_SURFACES_PROPERTY_NAMES];\r\n }\r\n return [...ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES];\r\n });\r\n\r\n protected readonly pageLayout = computed(() =>\r\n buildEntityDefinitionWizardPageLayout(this.propertyNames()),\r\n );\r\n\r\n //#endregion\r\n\r\n //#region ----- Lifecycle -----\r\n\r\n constructor() {\r\n super();\r\n effect(() => {\r\n const root = this.rootContext() ?? {};\r\n const names = this.propertyNames();\r\n const properties = Array.isArray(root['properties']) ? root['properties'] : [];\r\n const groups = Array.isArray(root['groups']) ? root['groups'] : [];\r\n const fingerprint = [\r\n ...properties.map((item) =>\r\n item && typeof item === 'object' ? String((item as Record<string, unknown>)['name'] ?? '') : '',\r\n ),\r\n ...groups.map((item) =>\r\n item && typeof item === 'object' ? String((item as Record<string, unknown>)['id'] ?? '') : '',\r\n ),\r\n ].join('|');\r\n const seedKey = `${String(root['id'] ?? '')}:${names.join(',')}:${fingerprint}`;\r\n if (seedKey === untracked(() => this.seededRootKey())) {\r\n return;\r\n }\r\n const seeded = defaultWizardValuesFromContext(names, root);\r\n this.seededRootKey.set(seedKey);\r\n this.editorContext.set(seeded);\r\n this.baseline.set(this.pickOwned(seeded, names));\r\n });\r\n }\r\n\r\n //#endregion\r\n\r\n //#region ----- Wizard / page contract -----\r\n\r\n override hasUnsavedChanges(): boolean {\r\n return !isEqual(this.pickOwned(this.editorContext(), this.propertyNames()), this.baseline());\r\n }\r\n\r\n override getWizardStepContext(): Record<string, unknown> {\r\n return this.pickOwned(this.editorContext(), this.propertyNames());\r\n }\r\n\r\n getWizardStepContinueCommand(): AXPExecuteCommand {\r\n return { name: SAVE_COMMAND };\r\n }\r\n\r\n override async getPrimaryMenuItems() {\r\n return [\r\n {\r\n title: '@general:actions.save.title',\r\n icon: 'fa-light fa-floppy-disk',\r\n command: { name: SAVE_COMMAND },\r\n priority: 'primary' as const,\r\n zone: 'footer' as const,\r\n },\r\n ];\r\n }\r\n\r\n override execute(command: AXPExecuteCommand): void | Promise<void> {\r\n if (command.name !== SAVE_COMMAND) {\r\n return;\r\n }\r\n return this.saveOwnedFields() as unknown as Promise<void>;\r\n }\r\n\r\n //#endregion\r\n\r\n //#region ----- Persistence -----\r\n\r\n private async saveOwnedFields(): Promise<AXPRuntimeCommandResult> {\r\n const root = this.rootContext() ?? {};\r\n const id = typeof root['id'] === 'string' ? root['id'] : '';\r\n const patch = this.getWizardStepContext();\r\n\r\n if (!id) {\r\n this.baseline.set(patch);\r\n this.recompute();\r\n return { success: true, kind: 'object', data: patch };\r\n }\r\n\r\n try {\r\n const dataAccessor = this.entityService.withEntity(ENTITY_FULL_NAME).data<any, any>();\r\n await dataAccessor.update(id, patch);\r\n this.baseline.set(patch);\r\n this.recompute();\r\n return { success: true, kind: 'object', data: patch };\r\n } catch (error) {\r\n return {\r\n success: false,\r\n message: {\r\n text: error instanceof Error ? error.message : '@general:messages.generic.error.description',\r\n },\r\n };\r\n }\r\n }\r\n\r\n private pickOwned(source: Record<string, unknown>, names: readonly string[]): Record<string, unknown> {\r\n const next: Record<string, unknown> = {};\r\n for (const name of names) {\r\n next[name] = source[name];\r\n }\r\n return next;\r\n }\r\n\r\n //#endregion\r\n}\r\n\r\n//#endregion\r\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAWA;AAEA;AAEM,SAAU,qCAAqC,CAAC,aAAgC,EAAA;AACpF,IAAA,MAAM,MAAM,GAAG,2BAA2B,EAAE;AAC5C,IAAA,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC;IACtC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,GAAG,CAAC,QAAQ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,EAAA,WAAA,EAAA,IAAA,EAXS,0BAA0B,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,EAAA,kBAAA,EAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAgBzB,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBApBhD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iCAAiC;AAC3C,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,0BAA0B,CAAC;AACrC,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,oCAAsC;AAClD,yBAAA;AACF,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA;;;;AAIT,EAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,qDAAqD;AAC7D,qBAAA;AACF,iBAAA;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY, ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY } from '@acorex-platform/module-platform-management-client/contracts';
|
|
4
|
+
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region ----- Provider -----
|
|
7
|
+
class AXMEntityDefinitionFormPageComponentProvider {
|
|
8
|
+
async components() {
|
|
9
|
+
const loader = () => import('./acorex-platform-module-platform-management-client-entity-definition-form-page.component-BgBWob9p.mjs').then((m) => m.AXMEntityDefinitionFormPageComponent);
|
|
10
|
+
return [
|
|
11
|
+
{ key: ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY, loader },
|
|
12
|
+
{ key: ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY, loader },
|
|
13
|
+
];
|
|
14
|
+
}
|
|
15
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMEntityDefinitionFormPageComponentProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
16
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMEntityDefinitionFormPageComponentProvider }); }
|
|
17
|
+
}
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMEntityDefinitionFormPageComponentProvider, decorators: [{
|
|
19
|
+
type: Injectable
|
|
20
|
+
}] });
|
|
21
|
+
|
|
22
|
+
export { AXMEntityDefinitionFormPageComponentProvider };
|
|
23
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-entity-definition-form-page.provider-hLzgoJu3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-entity-definition-form-page.provider-hLzgoJu3.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/entity-definition/entity-definition-form-page.provider.ts"],"sourcesContent":["//#region ----- Imports -----\r\n\r\nimport {\r\n AXPPageComponentDefinition,\r\n AXPPageComponentProvider,\r\n} from '@acorex-platform/framework-client/layout/components';\r\nimport { Injectable } from '@angular/core';\r\nimport {\r\n ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY,\r\n ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY,\r\n} from '@acorex-platform/module-platform-management-client/contracts';\r\n\r\n//#endregion\r\n\r\n//#region ----- Provider -----\r\n\r\n@Injectable()\r\nexport class AXMEntityDefinitionFormPageComponentProvider implements AXPPageComponentProvider {\r\n async components(): Promise<AXPPageComponentDefinition[]> {\r\n const loader = () =>\r\n import('./entity-definition-form-page.component').then((m) => m.AXMEntityDefinitionFormPageComponent);\r\n\r\n return [\r\n { key: ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY, loader },\r\n { key: ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY, loader },\r\n ];\r\n }\r\n}\r\n\r\n//#endregion\r\n"],"names":[],"mappings":";;;;AAYA;AAEA;MAGa,4CAA4C,CAAA;AACvD,IAAA,MAAM,UAAU,GAAA;QACd,MAAM,MAAM,GAAG,MACb,OAAO,wGAAyC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,oCAAoC,CAAC;QAEvG,OAAO;AACL,YAAA,EAAE,GAAG,EAAE,2CAA2C,EAAE,MAAM,EAAE;AAC5D,YAAA,EAAE,GAAG,EAAE,6CAA6C,EAAE,MAAM,EAAE;SAC/D;IACH;8GATW,4CAA4C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA5C,4CAA4C,EAAA,CAAA,CAAA;;2FAA5C,4CAA4C,EAAA,UAAA,EAAA,CAAA;kBADxD;;;"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { axpResolveEntityCatalogByFullName, axpMatchEntityCatalogSearch, AXP_ENTITY_CATALOG_SEARCH_MAX_ROWS, collectEntityQuickSearchFieldPaths } from '@acorex-platform/framework-shared/entity';
|
|
2
|
+
import { runtimeQuerySuccessObject, runtimeQueryFailure } from '@acorex-platform/framework-shared/core';
|
|
3
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
4
|
+
import { AXPEntityResolver } from '@acorex-platform/framework-client/layout/entity';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { inject, Injectable } from '@angular/core';
|
|
7
|
+
import { a as axmSummarizeMasterUiActionsForAi } from './acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs';
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ----- Property summary -----
|
|
11
|
+
function hasRequiredValidation(validations) {
|
|
12
|
+
return Array.isArray(validations) && validations.some((v) => v.rule === 'required');
|
|
13
|
+
}
|
|
14
|
+
function toRegisteredEntityPropertySummary(prop) {
|
|
15
|
+
const iface = prop.schema?.interface;
|
|
16
|
+
const rawType = iface?.type;
|
|
17
|
+
const interfaceType = typeof rawType === 'string' ? rawType : undefined;
|
|
18
|
+
const opts = iface?.options;
|
|
19
|
+
let lookupEntity;
|
|
20
|
+
let filterValuePaths;
|
|
21
|
+
if (opts && typeof opts['entity'] === 'string' && opts['entity'].trim()) {
|
|
22
|
+
lookupEntity = opts['entity'].trim();
|
|
23
|
+
}
|
|
24
|
+
const expose = opts?.['expose'];
|
|
25
|
+
if (Array.isArray(expose)) {
|
|
26
|
+
const paths = expose
|
|
27
|
+
.map((row) => (row && typeof row === 'object' ? row.target : undefined))
|
|
28
|
+
.filter((t) => typeof t === 'string' && t.length > 0);
|
|
29
|
+
if (paths.length) {
|
|
30
|
+
filterValuePaths = paths;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const required = hasRequiredValidation(prop.validations);
|
|
34
|
+
return {
|
|
35
|
+
name: prop.name,
|
|
36
|
+
title: prop.title,
|
|
37
|
+
dataType: prop.schema?.dataType ?? 'unknown',
|
|
38
|
+
required,
|
|
39
|
+
...(interfaceType ? { interfaceType } : {}),
|
|
40
|
+
...(lookupEntity ? { lookupEntity } : {}),
|
|
41
|
+
...(filterValuePaths ? { filterValuePaths } : {}),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function matchStatusForCount(count) {
|
|
45
|
+
if (count === 0) {
|
|
46
|
+
return 'none';
|
|
47
|
+
}
|
|
48
|
+
if (count === 1) {
|
|
49
|
+
return 'single';
|
|
50
|
+
}
|
|
51
|
+
return 'multiple';
|
|
52
|
+
}
|
|
53
|
+
function coerceOptionalBoolean(value) {
|
|
54
|
+
if (value === true || value === 'true' || value === 1 || value === '1') {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
if (value === false || value === 'false' || value === 0 || value === '0') {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region ----- List Registered Entities Query -----
|
|
64
|
+
/**
|
|
65
|
+
* Lists registered entities. Omit filters for a lightweight full catalog (no `properties`).
|
|
66
|
+
* Pass `search` / `searchTag` to bound the list; `properties` only when exactly one entity matches.
|
|
67
|
+
*/
|
|
68
|
+
class AXMListRegisteredEntitiesQuery {
|
|
69
|
+
constructor() {
|
|
70
|
+
//#region ----- Services & Dependencies -----
|
|
71
|
+
this.entityResolver = inject(AXPEntityResolver);
|
|
72
|
+
this.translation = inject(AXTranslationService);
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region ----- Query Execution -----
|
|
76
|
+
async fetch(input) {
|
|
77
|
+
try {
|
|
78
|
+
const opts = input ?? {};
|
|
79
|
+
const targetFullName = opts.entityFullName?.trim();
|
|
80
|
+
const search = opts.search?.trim();
|
|
81
|
+
const searchTag = opts.searchTag?.trim();
|
|
82
|
+
const includeDetails = coerceOptionalBoolean(opts.includeDetails);
|
|
83
|
+
const entries = await this.entityResolver.listAll();
|
|
84
|
+
const sorted = [...entries].sort((a, b) => {
|
|
85
|
+
const byModule = a.module.localeCompare(b.module);
|
|
86
|
+
if (byModule !== 0) {
|
|
87
|
+
return byModule;
|
|
88
|
+
}
|
|
89
|
+
return a.name.localeCompare(b.name);
|
|
90
|
+
});
|
|
91
|
+
let matched = sorted;
|
|
92
|
+
let matchStatus;
|
|
93
|
+
let totalMatched;
|
|
94
|
+
let includeCatalogHints = false;
|
|
95
|
+
if (targetFullName) {
|
|
96
|
+
matched = axpResolveEntityCatalogByFullName(sorted, targetFullName);
|
|
97
|
+
matchStatus = matchStatusForCount(matched.length);
|
|
98
|
+
includeCatalogHints = true;
|
|
99
|
+
}
|
|
100
|
+
else if (search || searchTag) {
|
|
101
|
+
const scored = [];
|
|
102
|
+
for (const entry of sorted) {
|
|
103
|
+
const def = await this.entityResolver.get(entry.module, entry.name);
|
|
104
|
+
const extraTexts = def
|
|
105
|
+
? [
|
|
106
|
+
this.resolveEntityCopy(def.title),
|
|
107
|
+
this.resolveEntityCopy(def.formats.individual),
|
|
108
|
+
this.resolveEntityCopy(def.formats.plural),
|
|
109
|
+
]
|
|
110
|
+
: [];
|
|
111
|
+
const { score } = axpMatchEntityCatalogSearch({
|
|
112
|
+
module: entry.module,
|
|
113
|
+
name: entry.name,
|
|
114
|
+
fullName: entry.fullName,
|
|
115
|
+
title: def?.title,
|
|
116
|
+
formatsIndividual: def?.formats?.individual,
|
|
117
|
+
formatsPlural: def?.formats?.plural,
|
|
118
|
+
searchTags: def?.searchTags,
|
|
119
|
+
extraTexts,
|
|
120
|
+
}, search, searchTag);
|
|
121
|
+
if (score > 0) {
|
|
122
|
+
scored.push({ entry, def, score });
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
scored.sort((a, b) => b.score - a.score || a.entry.fullName.localeCompare(b.entry.fullName));
|
|
126
|
+
totalMatched = scored.length;
|
|
127
|
+
matched = scored.slice(0, AXP_ENTITY_CATALOG_SEARCH_MAX_ROWS).map((row) => row.entry);
|
|
128
|
+
matchStatus = matchStatusForCount(totalMatched);
|
|
129
|
+
includeCatalogHints = true;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
matchStatus = 'catalog';
|
|
133
|
+
}
|
|
134
|
+
const includeProperties = includeDetails !== false && matchStatus === 'single';
|
|
135
|
+
const entities = [];
|
|
136
|
+
for (const entry of matched) {
|
|
137
|
+
const base = {
|
|
138
|
+
module: entry.module,
|
|
139
|
+
name: entry.name,
|
|
140
|
+
fullName: entry.fullName,
|
|
141
|
+
};
|
|
142
|
+
const needDef = includeProperties || includeCatalogHints;
|
|
143
|
+
const def = needDef ? await this.entityResolver.get(entry.module, entry.name) : null;
|
|
144
|
+
if (includeCatalogHints && def) {
|
|
145
|
+
const resolvedTitle = this.resolveEntityCopy(def.title);
|
|
146
|
+
if (resolvedTitle) {
|
|
147
|
+
base.title = resolvedTitle;
|
|
148
|
+
}
|
|
149
|
+
if (def.searchTags?.length) {
|
|
150
|
+
base.searchTags = def.searchTags;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (includeProperties && def) {
|
|
154
|
+
const props = def.properties?.map(toRegisteredEntityPropertySummary) ?? [];
|
|
155
|
+
const masterUiActions = axmSummarizeMasterUiActionsForAi(def, (k) => this.resolveEntityCopy(k));
|
|
156
|
+
const quickSearchPaths = await collectEntityQuickSearchFieldPaths(def, (m, n) => this.entityResolver.get(m, n));
|
|
157
|
+
entities.push({
|
|
158
|
+
...base,
|
|
159
|
+
properties: props,
|
|
160
|
+
...(quickSearchPaths?.length ? { quickSearchPaths } : {}),
|
|
161
|
+
...(masterUiActions ? { masterUiActions } : {}),
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
entities.push(base);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return runtimeQuerySuccessObject({
|
|
169
|
+
matchStatus,
|
|
170
|
+
entities,
|
|
171
|
+
...(totalMatched != null ? { totalMatched } : {}),
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
return runtimeQueryFailure(error instanceof Error ? error.message : 'Unknown error occurred');
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region ----- Private helpers -----
|
|
180
|
+
resolveEntityCopy(text) {
|
|
181
|
+
try {
|
|
182
|
+
return this.translation.translateSync(text);
|
|
183
|
+
}
|
|
184
|
+
catch {
|
|
185
|
+
return text;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListRegisteredEntitiesQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
189
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListRegisteredEntitiesQuery, providedIn: 'root' }); }
|
|
190
|
+
}
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMListRegisteredEntitiesQuery, decorators: [{
|
|
192
|
+
type: Injectable,
|
|
193
|
+
args: [{ providedIn: 'root' }]
|
|
194
|
+
}] });
|
|
195
|
+
|
|
196
|
+
export { AXMListRegisteredEntitiesQuery };
|
|
197
|
+
//# sourceMappingURL=acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs.map
|
|
@@ -0,0 +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,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
|
|
16
16
|
moduleName: RootConfig.module.name,
|
|
17
17
|
loaders: {
|
|
18
|
+
[RootConfig.entities.moduleDefinition.name]: () => import('@acorex-platform/module-platform-management-client/contracts/entities/module-definition').then((m) => m.moduleDefinitionEntityFactory()),
|
|
18
19
|
[RootConfig.entities.commandDefinition.name]: () => import('@acorex-platform/module-platform-management-client/contracts/entities/command-definition').then((m) => m.commandDefinitionEntityFactory()),
|
|
19
20
|
[RootConfig.entities.entityAccessPolicy.name]: () => import('@acorex-platform/module-platform-management-client/contracts/entities/entity-access-policy').then((m) => m.entityAccessPolicyEntityFactory()),
|
|
20
21
|
[RootConfig.entities.entityDefinition.name]: () => import('@acorex-platform/module-platform-management-client/contracts/entities/entity-definition').then((m) => m.entityDefinitionEntityFactory()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-platform-management-client-local-entities.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/provide-local-entities.ts","../../../../libs/modules/platform-management/client/src/lib/acorex-platform-module-platform-management-client-local-entities.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { provideLocalEntityCatalog } from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-platform-management-client/contracts';\n\n//#endregion\n\n//#region ----- Provide local entities -----\n\n/**\n * Registers platform-management layouts on the client from packaged factories.\n * Each `import()` targets a secondary entry so unused entities stay out of the\n * bundle. Do not add this to the demo app; demo continues to load layouts via\n * `Domain:GetEntityLayout`.\n */\nexport function providePlatformManagementLocalEntities() {\n return provideLocalEntityCatalog({\n moduleName: RootConfig.module.name,\n loaders: {\n [RootConfig.entities.commandDefinition.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/command-definition').then((m) => m.commandDefinitionEntityFactory()),\n [RootConfig.entities.entityAccessPolicy.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/entity-access-policy').then((m) => m.entityAccessPolicyEntityFactory()),\n [RootConfig.entities.entityDefinition.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/entity-definition').then((m) => m.entityDefinitionEntityFactory()),\n [RootConfig.entities.pluginDefinition.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/plugin-definition').then((m) => m.pluginDefinitionEntityFactory()),\n [RootConfig.entities.queryDefinition.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/query-definition').then((m) => m.queryDefinitionEntityFactory()),\n [RootConfig.entities.token.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/token').then((m) => m.tokenEntityFactory()),\n [RootConfig.entities.widget.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/widget').then((m) => m.widgetEntityFactory()),\n },\n });\n}\n\nexport { platformManagementLocalEntityCatalog } from '@acorex-platform/module-platform-management-client/contracts/entity-catalog';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './provide-local-entities';\n"],"names":[],"mappings":";;;;AAAA;AAKA;AAEA;AAEA;;;;;AAKG;SACa,sCAAsC,GAAA;AACpD,IAAA,OAAO,yBAAyB,CAAC;AAC/B,QAAA,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAClC,QAAA,OAAO,EAAE;AACP,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,GAAG,MAC5C,OAAO,0FAA0F,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,8BAA8B,EAAE,CAAC;AACpJ,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,kBAAkB,CAAC,IAAI,GAAG,MAC7C,OAAO,4FAA4F,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,+BAA+B,EAAE,CAAC;AACvJ,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,GAAG,MAC3C,OAAO,yFAAyF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,6BAA6B,EAAE,CAAC;AAClJ,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,GAAG,MAC3C,OAAO,yFAAyF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,6BAA6B,EAAE,CAAC;AAClJ,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,GAAG,MAC1C,OAAO,wFAAwF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,4BAA4B,EAAE,CAAC;AAChJ,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAG,MAChC,OAAO,6EAA6E,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,kBAAkB,EAAE,CAAC;AAC3H,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAG,MACjC,OAAO,8EAA8E,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,mBAAmB,EAAE,CAAC;AAC9H,SAAA;AACF,KAAA,CAAC;AACJ;AAIA;;
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-platform-management-client-local-entities.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/provide-local-entities.ts","../../../../libs/modules/platform-management/client/src/lib/acorex-platform-module-platform-management-client-local-entities.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { provideLocalEntityCatalog } from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-platform-management-client/contracts';\n\n//#endregion\n\n//#region ----- Provide local entities -----\n\n/**\n * Registers platform-management layouts on the client from packaged factories.\n * Each `import()` targets a secondary entry so unused entities stay out of the\n * bundle. Do not add this to the demo app; demo continues to load layouts via\n * `Domain:GetEntityLayout`.\n */\nexport function providePlatformManagementLocalEntities() {\n return provideLocalEntityCatalog({\n moduleName: RootConfig.module.name,\n loaders: {\n [RootConfig.entities.moduleDefinition.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/module-definition').then((m) => m.moduleDefinitionEntityFactory()),\n [RootConfig.entities.commandDefinition.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/command-definition').then((m) => m.commandDefinitionEntityFactory()),\n [RootConfig.entities.entityAccessPolicy.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/entity-access-policy').then((m) => m.entityAccessPolicyEntityFactory()),\n [RootConfig.entities.entityDefinition.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/entity-definition').then((m) => m.entityDefinitionEntityFactory()),\n [RootConfig.entities.pluginDefinition.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/plugin-definition').then((m) => m.pluginDefinitionEntityFactory()),\n [RootConfig.entities.queryDefinition.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/query-definition').then((m) => m.queryDefinitionEntityFactory()),\n [RootConfig.entities.token.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/token').then((m) => m.tokenEntityFactory()),\n [RootConfig.entities.widget.name]: () =>\n import('@acorex-platform/module-platform-management-client/contracts/entities/widget').then((m) => m.widgetEntityFactory()),\n },\n });\n}\n\nexport { platformManagementLocalEntityCatalog } from '@acorex-platform/module-platform-management-client/contracts/entity-catalog';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './provide-local-entities';\n"],"names":[],"mappings":";;;;AAAA;AAKA;AAEA;AAEA;;;;;AAKG;SACa,sCAAsC,GAAA;AACpD,IAAA,OAAO,yBAAyB,CAAC;AAC/B,QAAA,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAClC,QAAA,OAAO,EAAE;AACP,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,GAAG,MAC3C,OAAO,yFAAyF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,6BAA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G;;"}
|
|
@@ -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-YuJijjKh.mjs';
|
|
26
26
|
|
|
27
27
|
//#region ---- Menu List Component ----
|
|
28
28
|
class AXMMenuListComponent extends AXPPageLayoutBaseComponent {
|
|
@@ -521,4 +521,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
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-iMEnFPEY.mjs.map
|