@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.
Files changed (87) hide show
  1. 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
  2. package/fesm2022/acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-YuJijjKh.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-command-definition.mjs +20 -0
  4. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-command-definition.mjs.map +1 -1
  5. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-entity-access-policy.mjs +20 -0
  6. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-entity-access-policy.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-entity-definition.mjs +1499 -30
  8. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-entity-definition.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-module-definition.mjs +396 -0
  10. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-module-definition.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-plugin-definition.mjs +20 -0
  12. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-plugin-definition.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-query-definition.mjs +49 -1
  14. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-query-definition.mjs.map +1 -1
  15. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-token.mjs +20 -0
  16. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-token.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-widget.mjs +20 -0
  18. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-widget.mjs.map +1 -1
  19. 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
  20. 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
  21. 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
  22. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-C3B1_QMs.mjs.map +1 -0
  23. 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
  24. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-BPkJloHy.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-BL1I9pmK.mjs +1621 -0
  26. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-BL1I9pmK.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-Cknl0vbc.mjs +299 -0
  28. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-Cknl0vbc.mjs.map +1 -0
  29. 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
  30. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-BxABTl8L.mjs.map +1 -0
  31. 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
  32. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-Cv6HVQOU.mjs.map +1 -0
  33. 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
  34. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-BV8iSuoK.mjs.map +1 -0
  35. 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
  36. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-BYH6SIqU.mjs.map +1 -0
  37. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog.mjs +1 -1
  38. package/fesm2022/acorex-platform-module-platform-management-client-contracts.mjs +1664 -1
  39. package/fesm2022/acorex-platform-module-platform-management-client-contracts.mjs.map +1 -1
  40. package/fesm2022/acorex-platform-module-platform-management-client-create-user-query-contract.util-D_af2BUi.mjs +586 -0
  41. package/fesm2022/acorex-platform-module-platform-management-client-create-user-query-contract.util-D_af2BUi.mjs.map +1 -0
  42. 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
  43. package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.command-Bh49QHkl.mjs.map +1 -0
  44. package/fesm2022/acorex-platform-module-platform-management-client-entity-definition-form-page.component-BgBWob9p.mjs +329 -0
  45. package/fesm2022/acorex-platform-module-platform-management-client-entity-definition-form-page.component-BgBWob9p.mjs.map +1 -0
  46. package/fesm2022/acorex-platform-module-platform-management-client-entity-definition-form-page.provider-hLzgoJu3.mjs +23 -0
  47. package/fesm2022/acorex-platform-module-platform-management-client-entity-definition-form-page.provider-hLzgoJu3.mjs.map +1 -0
  48. package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs +197 -0
  49. package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs.map +1 -0
  50. package/fesm2022/acorex-platform-module-platform-management-client-local-entities.mjs +1 -0
  51. package/fesm2022/acorex-platform-module-platform-management-client-local-entities.mjs.map +1 -1
  52. 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
  53. 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
  54. package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-column.component-COfOzMGh.mjs +45 -0
  55. package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-column.component-COfOzMGh.mjs.map +1 -0
  56. package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BW2pBOeg.mjs +166 -0
  57. package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BW2pBOeg.mjs.map +1 -0
  58. package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs +45 -0
  59. package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs.map +1 -0
  60. 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
  61. 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
  62. 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
  63. 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
  64. 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
  65. 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
  66. package/fesm2022/acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs +144 -0
  67. package/fesm2022/acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs.map +1 -0
  68. package/fesm2022/acorex-platform-module-platform-management-client.mjs +1 -1
  69. package/package.json +7 -3
  70. package/types/acorex-platform-module-platform-management-client-contracts-entities-module-definition.d.ts +5 -0
  71. package/types/acorex-platform-module-platform-management-client-contracts.d.ts +225 -5
  72. package/types/acorex-platform-module-platform-management-client.d.ts +35 -3
  73. package/fesm2022/acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-BGVhn6wv.mjs.map +0 -1
  74. 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
  75. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-CdvQlwAk.mjs.map +0 -1
  76. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-Dye4aSKE.mjs.map +0 -1
  77. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-CcJ58vfr.mjs +0 -158
  78. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-CcJ58vfr.mjs.map +0 -1
  79. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-CwU5hMjI.mjs.map +0 -1
  80. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-DGK684Q1.mjs.map +0 -1
  81. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-DI_k6-ha.mjs.map +0 -1
  82. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-C18msniH.mjs.map +0 -1
  83. package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.command-9Ku7C1BC.mjs.map +0 -1
  84. package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.types-DdygAori.mjs +0 -71
  85. package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.types-DdygAori.mjs.map +0 -1
  86. package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-DjStd3a8.mjs +0 -136
  87. 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-contracts-entity-catalog-entity-definition.entity-BL1I9pmK.mjs","sources":["../../../../libs/modules/platform-management/contracts/src/entities/entity-definition/entity-definition-page.keys.ts","../../../../libs/modules/platform-management/contracts/src/entities/entity-definition/entity-definition-repeater.widgets.ts","../../../../libs/modules/platform-management/contracts/src/entities/entity-definition/entity-definition-content.util.ts","../../../../libs/modules/platform-management/contracts/src/entities/entity-definition/entity-definition.entity.ts"],"sourcesContent":["//#region ----- Entity definition wizard page keys -----\r\n\r\n/** Schema step: plugins, groups, and properties. */\r\nexport const ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY = 'entity-definition-schema-page';\r\n\r\n/** Surfaces step: columns, layouts, actions, related entities. */\r\nexport const ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY = 'entity-definition-surfaces-page';\r\n\r\nexport const ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES = ['plugins', 'groups', 'properties'] as const;\r\n\r\nexport const ENTITY_DEFINITION_SURFACES_PROPERTY_NAMES = [\r\n 'columns',\r\n 'relatedEntities',\r\n 'createSections',\r\n 'createProperties',\r\n 'listActions',\r\n 'singleActions',\r\n 'pages',\r\n 'rules',\r\n 'validations',\r\n 'commandsJson',\r\n 'queriesJson',\r\n] as const;\r\n\r\nexport const ENTITY_DEFINITION_DESIGNER_FORM_KEYS = [\r\n 'title',\r\n 'icon',\r\n 'module',\r\n 'parentKey',\r\n 'searchTags',\r\n 'formatIndividual',\r\n 'formatPlural',\r\n 'formatDisplayName',\r\n 'formatSearchTitle',\r\n 'formatSearchDescription',\r\n 'categoryEntity',\r\n 'categoryTextField',\r\n 'categoryValueField',\r\n 'plugins',\r\n 'groups',\r\n 'properties',\r\n 'columns',\r\n 'relatedEntities',\r\n 'createSections',\r\n 'createProperties',\r\n 'listActions',\r\n 'singleActions',\r\n 'pages',\r\n 'rules',\r\n 'validations',\r\n 'commandsJson',\r\n 'queriesJson',\r\n] as const;\r\n\r\n//#endregion\r\n","//#region ----- Imports -----\r\n\r\nimport { AXPWidgetsList } from '@acorex-platform/framework-shared/core';\r\nimport { ENTITY_CREATE_UI, ENTITY_EDIT_UI, ENTITY_REMOVE_UI } from '@acorex-platform/framework-shared/runtime';\r\n\r\nimport { RootConfig } from '../../root-config';\r\n\r\n//#endregion\r\n\r\n//#region ----- Constants -----\r\n\r\nconst i18n = RootConfig.config.i18n;\r\nconst field = (name: string) =>\r\n `@${i18n}:entity-definitions.entities.entity-definition.fields.${name}.title`;\r\n\r\nconst PLUGIN_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.pluginDefinition.name}`;\r\nconst ENTITY_DEFINITION_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.entityDefinition.name}`;\r\nconst MODULE_DEFINITION_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.moduleDefinition.name}`;\r\n\r\nconst PROPERTIES_DATASOURCE = \"{{ context.eval('properties') || [] }}\";\r\nconst GROUPS_DATASOURCE = \"{{ context.eval('groups') || [] }}\";\r\n\r\n//#endregion\r\n\r\n//#region ----- Layout helpers -----\r\n\r\nfunction gridRow(children: Record<string, unknown>[]) {\r\n return {\r\n type: AXPWidgetsList.Layouts.GridLayout,\r\n mode: 'edit' as const,\r\n options: {\r\n grid: {\r\n default: { columns: 12, gap: '0.75rem' },\r\n },\r\n },\r\n children,\r\n };\r\n}\r\n\r\nfunction gridItem(colSpan: number, child: Record<string, unknown>) {\r\n return {\r\n type: AXPWidgetsList.Layouts.GridItemLayout,\r\n mode: 'edit' as const,\r\n options: { colSpan },\r\n children: [child],\r\n };\r\n}\r\n\r\nfunction formField(label: string, editor: Record<string, unknown>) {\r\n return {\r\n type: AXPWidgetsList.Layouts.FormField,\r\n mode: 'edit' as const,\r\n options: { label, showLabel: true },\r\n children: [editor],\r\n };\r\n}\r\n\r\nfunction textEditor(path: string, required = false) {\r\n return {\r\n type: AXPWidgetsList.Editors.TextBox,\r\n mode: 'edit' as const,\r\n path,\r\n name: path,\r\n options: required ? { required: true } : {},\r\n };\r\n}\r\n\r\nfunction largeTextEditor(path: string, rows = 2) {\r\n return {\r\n type: AXPWidgetsList.Editors.LargeTextBox,\r\n mode: 'edit' as const,\r\n path,\r\n name: path,\r\n options: { rows },\r\n };\r\n}\r\n\r\nfunction toggleEditor(path: string) {\r\n return {\r\n type: AXPWidgetsList.Editors.ToggleSwitch,\r\n mode: 'edit' as const,\r\n path,\r\n name: path,\r\n };\r\n}\r\n\r\nfunction numberEditor(path: string, defaultValue?: number) {\r\n return {\r\n type: AXPWidgetsList.Editors.NumberBox,\r\n mode: 'edit' as const,\r\n path,\r\n name: path,\r\n options: defaultValue == null ? {} : { defaultValue },\r\n };\r\n}\r\n\r\nfunction iconEditor(path: string) {\r\n return {\r\n type: AXPWidgetsList.Theme.IconChooser,\r\n mode: 'edit' as const,\r\n path,\r\n name: path,\r\n };\r\n}\r\n\r\nfunction codeEditor(path: string, height = 'h-32') {\r\n return {\r\n type: AXPWidgetsList.Advanced.CodeEditor,\r\n mode: 'edit' as const,\r\n path,\r\n name: path,\r\n options: { language: 'json', height },\r\n };\r\n}\r\n\r\nfunction selectEditor(\r\n path: string,\r\n options: {\r\n dataSource: unknown;\r\n valueField: string;\r\n textField: string;\r\n required?: boolean;\r\n allowSearch?: boolean;\r\n },\r\n) {\r\n return {\r\n type: AXPWidgetsList.Editors.SelectBox,\r\n mode: 'edit' as const,\r\n path,\r\n name: path,\r\n options: {\r\n valueField: options.valueField,\r\n textField: options.textField,\r\n dataSource: options.dataSource,\r\n allowSearch: options.allowSearch ?? true,\r\n required: options.required ?? false,\r\n },\r\n };\r\n}\r\n\r\nfunction lookupEditor(\r\n path: string,\r\n options: {\r\n entity: string;\r\n valueField: string;\r\n textField: string;\r\n columns: string[];\r\n },\r\n) {\r\n return {\r\n type: AXPWidgetsList.Editors.LookupBox,\r\n mode: 'edit' as const,\r\n path,\r\n name: path,\r\n options: {\r\n entity: options.entity,\r\n valueField: options.valueField,\r\n textField: options.textField,\r\n look: 'select',\r\n allowSearch: true,\r\n columns: options.columns,\r\n },\r\n };\r\n}\r\n\r\n//#endregion\r\n\r\n//#region ----- Repeater children -----\r\n\r\nexport const PLUGIN_REPEATER_CHILDREN = [\r\n gridRow([\r\n gridItem(\r\n 6,\r\n formField(\r\n field('plugin-name'),\r\n lookupEditor('name', {\r\n entity: PLUGIN_ENTITY,\r\n valueField: 'name',\r\n textField: 'catalogTitle',\r\n columns: ['catalogTitle', 'name'],\r\n }),\r\n ),\r\n ),\r\n gridItem(6, formField(field('plugin-options'), codeEditor('options'))),\r\n ]),\r\n];\r\n\r\nexport const GROUP_REPEATER_CHILDREN = [\r\n gridRow([\r\n gridItem(4, formField(field('group-id'), textEditor('id', true))),\r\n gridItem(5, formField(field('group-title'), textEditor('title', true))),\r\n gridItem(3, formField(field('group-icon'), iconEditor('icon'))),\r\n gridItem(12, formField(field('group-description'), largeTextEditor('description', 2))),\r\n ]),\r\n];\r\n\r\nexport const PROPERTY_REPEATER_CHILDREN = [\r\n gridRow([\r\n gridItem(4, formField('@general:terms.common.name', textEditor('name', true))),\r\n gridItem(4, formField('@general:terms.common.title', textEditor('title', true))),\r\n gridItem(\r\n 4,\r\n formField(\r\n field('group-id'),\r\n selectEditor('groupId', {\r\n dataSource: GROUPS_DATASOURCE,\r\n valueField: 'id',\r\n textField: 'title',\r\n }),\r\n ),\r\n ),\r\n gridItem(12, formField('@general:terms.common.description', largeTextEditor('description', 2))),\r\n gridItem(\r\n 12,\r\n formField(field('property-interface'), {\r\n type: AXPWidgetsList.Advanced.WidgetFieldConfigurator,\r\n mode: 'edit' as const,\r\n path: 'interface',\r\n name: 'interface',\r\n options: {\r\n fieldName: \"{{ context.eval('name') }}\",\r\n fieldTitle: \"{{ context.eval('title') }}\",\r\n },\r\n }),\r\n ),\r\n gridItem(\r\n 3,\r\n formField(\r\n field('property-data-type'),\r\n selectEditor('dataType', {\r\n dataSource: [\r\n { value: 'string', text: field('data-type-string') },\r\n { value: 'number', text: field('data-type-number') },\r\n { value: 'boolean', text: field('data-type-boolean') },\r\n { value: 'date', text: field('data-type-date') },\r\n { value: 'uuid', text: field('data-type-uuid') },\r\n { value: 'object', text: field('data-type-object') },\r\n { value: 'array', text: field('data-type-array') },\r\n ],\r\n valueField: 'value',\r\n textField: 'text',\r\n allowSearch: false,\r\n }),\r\n ),\r\n ),\r\n gridItem(3, formField(field('property-required'), toggleEditor('required'))),\r\n gridItem(3, formField(field('property-nullable'), toggleEditor('nullable'))),\r\n gridItem(3, formField(field('property-readonly'), toggleEditor('readonly'))),\r\n gridItem(3, formField(field('property-unique'), toggleEditor('unique'))),\r\n gridItem(3, formField(field('property-visible'), toggleEditor('visible'))),\r\n gridItem(9, formField(field('property-default-value'), textEditor('defaultValue'))),\r\n ]),\r\n];\r\n\r\nexport const COLUMN_REPEATER_CHILDREN = [\r\n gridRow([\r\n gridItem(\r\n 4,\r\n formField(\r\n field('column-name'),\r\n selectEditor('name', {\r\n dataSource: PROPERTIES_DATASOURCE,\r\n valueField: 'name',\r\n textField: 'title',\r\n required: true,\r\n }),\r\n ),\r\n ),\r\n gridItem(4, formField('@general:terms.common.title', textEditor('title'))),\r\n gridItem(\r\n 4,\r\n formField(\r\n field('column-widget'),\r\n selectEditor('widgetType', {\r\n dataSource: 'PlatformManagement:ListEditorWidgets',\r\n valueField: 'name',\r\n textField: 'title',\r\n }),\r\n ),\r\n ),\r\n ]),\r\n];\r\n\r\nexport const RELATED_ENTITY_REPEATER_CHILDREN = [\r\n gridRow([\r\n gridItem(\r\n 6,\r\n formField(\r\n field('related-entity'),\r\n lookupEditor('entity', {\r\n entity: ENTITY_DEFINITION_ENTITY,\r\n valueField: 'name',\r\n textField: 'name',\r\n columns: ['name'],\r\n }),\r\n ),\r\n ),\r\n gridItem(4, formField('@general:terms.common.title', textEditor('title'))),\r\n gridItem(2, formField('@general:terms.common.icon', iconEditor('icon'))),\r\n gridItem(\r\n 4,\r\n formField(\r\n field('related-layout-type'),\r\n selectEditor('layoutType', {\r\n dataSource: [\r\n { value: 'page-list', text: field('layout-type-page-list') },\r\n { value: 'tab-list', text: field('layout-type-tab-list') },\r\n { value: 'merge-detail', text: field('layout-type-merge-detail') },\r\n { value: 'page-detail', text: field('layout-type-page-detail') },\r\n { value: 'tab-detail', text: field('layout-type-tab-detail') },\r\n ],\r\n valueField: 'value',\r\n textField: 'text',\r\n allowSearch: false,\r\n }),\r\n ),\r\n ),\r\n gridItem(\r\n 4,\r\n formField(\r\n field('related-persistence-strategy'),\r\n selectEditor('persistenceStrategy', {\r\n dataSource: [\r\n { value: 'referenced', text: field('persistence-referenced') },\r\n { value: 'embedded', text: field('persistence-embedded') },\r\n ],\r\n valueField: 'value',\r\n textField: 'text',\r\n allowSearch: false,\r\n }),\r\n ),\r\n ),\r\n gridItem(4, formField(field('related-foreign-key'), textEditor('foreignKeyField'))),\r\n gridItem(4, formField(field('related-data-path'), textEditor('dataPath'))),\r\n gridItem(4, formField(field('related-id-field'), textEditor('idField'))),\r\n gridItem(2, formField(field('appear-on-create'), toggleEditor('appearOnCreate'))),\r\n gridItem(2, formField(field('appear-on-update'), toggleEditor('appearOnUpdate'))),\r\n ]),\r\n];\r\n\r\nexport const CREATE_SECTION_REPEATER_CHILDREN = [\r\n gridRow([\r\n gridItem(\r\n 12,\r\n formField(\r\n field('section-id'),\r\n selectEditor('id', {\r\n dataSource: GROUPS_DATASOURCE,\r\n valueField: 'id',\r\n textField: 'title',\r\n required: true,\r\n }),\r\n ),\r\n ),\r\n ]),\r\n];\r\n\r\nexport const CREATE_PROPERTY_LAYOUT_REPEATER_CHILDREN = [\r\n gridRow([\r\n gridItem(\r\n 8,\r\n formField(\r\n field('layout-property-name'),\r\n selectEditor('name', {\r\n dataSource: PROPERTIES_DATASOURCE,\r\n valueField: 'name',\r\n textField: 'title',\r\n required: true,\r\n }),\r\n ),\r\n ),\r\n gridItem(4, formField(field('layout-col-span'), numberEditor('colSpan', 6))),\r\n ]),\r\n];\r\n\r\nconst ACTION_COMMAND_DATASOURCE = [\r\n { value: ENTITY_CREATE_UI, text: '@general:actions.create.title' },\r\n { value: 'Entity:OpenDetails', text: '@general:actions.view.title' },\r\n { value: ENTITY_EDIT_UI, text: '@general:actions.edit.title' },\r\n { value: ENTITY_REMOVE_UI, text: '@general:actions.delete.title' },\r\n];\r\n\r\nconst ACTION_TYPE_DATASOURCE = [\r\n { value: 'create', text: '@general:actions.create.title' },\r\n { value: 'view', text: '@general:actions.view.title' },\r\n { value: 'update', text: '@general:actions.edit.title' },\r\n { value: 'delete', text: '@general:actions.delete.title' },\r\n];\r\n\r\nconst ACTION_PRIORITY_DATASOURCE = [\r\n { value: 'primary', text: field('priority-primary') },\r\n { value: 'secondary', text: field('priority-secondary') },\r\n { value: 'none', text: field('priority-none') },\r\n];\r\n\r\nconst ACTION_SCOPE_DATASOURCE = [\r\n { value: 'typeLevel', text: field('scope-type-level') },\r\n { value: 'individual', text: field('scope-individual') },\r\n { value: 'selected', text: field('scope-selected') },\r\n];\r\n\r\nexport const ACTION_REPEATER_CHILDREN = [\r\n gridRow([\r\n gridItem(4, formField('@general:terms.common.title', textEditor('title', true))),\r\n gridItem(\r\n 4,\r\n formField(\r\n field('action-command'),\r\n selectEditor('command', {\r\n dataSource: ACTION_COMMAND_DATASOURCE,\r\n valueField: 'value',\r\n textField: 'text',\r\n required: true,\r\n }),\r\n ),\r\n ),\r\n gridItem(4, formField(field('action-icon'), iconEditor('icon'))),\r\n gridItem(\r\n 4,\r\n formField(\r\n field('action-type'),\r\n selectEditor('type', {\r\n dataSource: ACTION_TYPE_DATASOURCE,\r\n valueField: 'value',\r\n textField: 'text',\r\n allowSearch: false,\r\n }),\r\n ),\r\n ),\r\n gridItem(\r\n 4,\r\n formField(\r\n field('action-priority'),\r\n selectEditor('priority', {\r\n dataSource: ACTION_PRIORITY_DATASOURCE,\r\n valueField: 'value',\r\n textField: 'text',\r\n allowSearch: false,\r\n }),\r\n ),\r\n ),\r\n gridItem(\r\n 4,\r\n formField(\r\n field('action-scope'),\r\n selectEditor('scope', {\r\n dataSource: ACTION_SCOPE_DATASOURCE,\r\n valueField: 'value',\r\n textField: 'text',\r\n allowSearch: false,\r\n }),\r\n ),\r\n ),\r\n ]),\r\n];\r\n\r\nexport const PAGE_REPEATER_CHILDREN = [\r\n gridRow([\r\n gridItem(4, formField(field('page-component-key'), textEditor('componentKey', true))),\r\n gridItem(4, formField('@general:terms.common.title', textEditor('title'))),\r\n gridItem(4, formField('@general:terms.common.icon', iconEditor('icon'))),\r\n gridItem(4, formField(field('page-field'), textEditor('field'))),\r\n gridItem(4, formField(field('page-order'), numberEditor('order', 1))),\r\n gridItem(2, formField(field('appear-on-create'), toggleEditor('appearOnCreate'))),\r\n gridItem(2, formField(field('appear-on-update'), toggleEditor('appearOnUpdate'))),\r\n ]),\r\n];\r\n\r\nexport { MODULE_DEFINITION_ENTITY };\r\n\r\n//#endregion\r\n","//#region ----- Imports -----\r\n\r\nimport { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';\r\nimport {\r\n createAllQueryView,\r\n entityMasterCrudActions,\r\n entityMasterRecordActions,\r\n type AXPEntity,\r\n type AXPEntityAction,\r\n type AXPEntityProperty,\r\n type AXPEntityPropertyGroup,\r\n type AXPEntityTableColumn,\r\n type AXPRelatedEntity,\r\n type AXEntityPropertyWidget,\r\n} from '@acorex-platform/framework-shared/entity';\r\n\r\nimport { RootConfig } from '../../root-config';\r\nimport { ENTITY_DEFINITION_DESIGNER_FORM_KEYS } from './entity-definition-page.keys';\r\n\r\n//#endregion\r\n\r\n//#region ----- Types -----\r\n\r\nexport type AssembleEntityDefinitionResult =\r\n | { ok: true; record: Record<string, unknown> }\r\n | { ok: false; message: string; code: string };\r\n\r\n//#endregion\r\n\r\n//#region ----- Constants -----\r\n\r\nconst i18n = RootConfig.config.i18n;\r\n\r\nexport const ENTITY_DEFINITION_CREATE_ERROR = {\r\n nameRequired: `@${i18n}:entity-definitions.messages.name-required`,\r\n moduleRequired: `@${i18n}:entity-definitions.messages.module-required`,\r\n nameInvalid: `@${i18n}:entity-definitions.messages.name-invalid`,\r\n nameDuplicate: `@${i18n}:entity-definitions.messages.name-duplicate`,\r\n} as const;\r\n\r\nconst ENTITY_NAME_PATTERN = /^[A-Za-z][A-Za-z0-9]*$/;\r\nconst DEFAULT_ENTITY_ICON = 'fa-light fa-cube';\r\n\r\nconst WIDGET_DATA_TYPE: Record<string, string> = {\r\n 'number-editor': 'number',\r\n 'number-unit-editor': 'number',\r\n 'toggle-editor': 'boolean',\r\n 'checkbox-editor': 'boolean',\r\n 'date-time-editor': 'date',\r\n 'repeater-layout': 'array',\r\n 'tag-editor': 'array',\r\n 'lookup-editor': 'uuid',\r\n 'contact-editor': 'object',\r\n attachments: 'array',\r\n 'widget-field-configurator': 'object',\r\n};\r\n\r\n//#endregion\r\n\r\n//#region ----- Assemble store row -----\r\n\r\n/**\r\n * Turns a create/update-form payload into the EntityDefinition store shape\r\n * `{ name: Module.Entity, content: AXPEntity }`.\r\n */\r\nexport function assembleEntityDefinitionStoreRecord(\r\n input: Record<string, unknown>,\r\n previous?: Record<string, unknown> | null,\r\n): AssembleEntityDefinitionResult {\r\n const merged = { ...(previous ?? {}), ...input };\r\n const previousContent = readContent(previous ?? {}) ?? readContent(merged);\r\n const moduleName =\r\n readTrimmed(merged['module']) || readTrimmed(previousContent?.['module']);\r\n const rawName = readTrimmed(merged['name']) || readTrimmed(previousContent?.['name']);\r\n const title =\r\n readTrimmed(merged['title']) ||\r\n readTrimmed(previousContent?.['title']) ||\r\n rawName;\r\n const icon =\r\n readTrimmed(merged['icon']) ||\r\n readTrimmed(previousContent?.['icon']) ||\r\n DEFAULT_ENTITY_ICON;\r\n\r\n if (!rawName) {\r\n return {\r\n ok: false,\r\n message: ENTITY_DEFINITION_CREATE_ERROR.nameRequired,\r\n code: 'ENTITY_DEFINITION_NAME_REQUIRED',\r\n };\r\n }\r\n if (!moduleName) {\r\n return {\r\n ok: false,\r\n message: ENTITY_DEFINITION_CREATE_ERROR.moduleRequired,\r\n code: 'ENTITY_DEFINITION_MODULE_REQUIRED',\r\n };\r\n }\r\n\r\n const parsed = parseEntityName(rawName, moduleName);\r\n if (!ENTITY_NAME_PATTERN.test(parsed.entityName)) {\r\n return {\r\n ok: false,\r\n message: ENTITY_DEFINITION_CREATE_ERROR.nameInvalid,\r\n code: 'ENTITY_DEFINITION_NAME_INVALID',\r\n };\r\n }\r\n\r\n const identity = {\r\n module: parsed.moduleName,\r\n name: parsed.entityName,\r\n title: title || parsed.entityName,\r\n icon,\r\n };\r\n\r\n const content = overlayDesignerFields(\r\n previousContent ?? buildStubEntityContent(identity),\r\n merged,\r\n identity,\r\n );\r\n\r\n const record = omitDesignerFormFields(merged);\r\n record['name'] = parsed.storeName;\r\n record['content'] = content;\r\n return { ok: true, record };\r\n}\r\n\r\n//#endregion\r\n\r\n//#region ----- Overlay designer fields -----\r\n\r\nfunction overlayDesignerFields(\r\n existing: Record<string, unknown>,\r\n input: Record<string, unknown>,\r\n identity: { module: string; name: string; title: string; icon: string },\r\n): Record<string, unknown> {\r\n const groups = readArray(input['groups']);\r\n const propertyRows = readArray(input['properties']);\r\n const pluginRows = input['plugins'] !== undefined ? readArray(input['plugins']) : undefined;\r\n const columnRows = input['columns'] !== undefined ? readArray(input['columns']) : undefined;\r\n const relatedRows =\r\n input['relatedEntities'] !== undefined ? readArray(input['relatedEntities']) : undefined;\r\n const createSections =\r\n input['createSections'] !== undefined ? readArray(input['createSections']) : undefined;\r\n const createProperties =\r\n input['createProperties'] !== undefined ? readArray(input['createProperties']) : undefined;\r\n const listActions =\r\n input['listActions'] !== undefined ? readArray(input['listActions']) : undefined;\r\n const singleActions =\r\n input['singleActions'] !== undefined ? readArray(input['singleActions']) : undefined;\r\n const pages = input['pages'] !== undefined ? readArray(input['pages']) : undefined;\r\n\r\n const mappedGroups: AXPEntityPropertyGroup[] = groups.length\r\n ? groups.map(mapGroup)\r\n : readExistingArray<AXPEntityPropertyGroup>(existing['groups']);\r\n const mappedProperties = propertyRows.length\r\n ? propertyRows.map((row) => mapProperty(row, mappedGroups))\r\n : readExistingArray<AXPEntityProperty>(existing['properties']);\r\n\r\n const content: Record<string, unknown> = {\r\n ...existing,\r\n module: identity.module,\r\n name: identity.name,\r\n title: identity.title,\r\n icon: identity.icon,\r\n };\r\n\r\n const parentKey = readTrimmed(input['parentKey']);\r\n if (parentKey) {\r\n content['parentKey'] = parentKey;\r\n } else if (input['parentKey'] !== undefined) {\r\n delete content['parentKey'];\r\n }\r\n\r\n const searchTags = input['searchTags'];\r\n if (searchTags !== undefined) {\r\n content['searchTags'] = Array.isArray(searchTags)\r\n ? searchTags.filter((tag) => typeof tag === 'string' && tag.trim())\r\n : [];\r\n }\r\n\r\n overlayFormats(content, input, identity.title);\r\n overlayCategory(content, input);\r\n\r\n if (pluginRows) {\r\n content['plugins'] = pluginRows.map(mapPlugin).filter((plugin) => plugin.name);\r\n }\r\n\r\n if (mappedGroups.length) {\r\n content['groups'] = mappedGroups;\r\n }\r\n\r\n if (mappedProperties.length) {\r\n content['properties'] = mappedProperties;\r\n }\r\n\r\n const resolvedProperties = (content['properties'] as AXPEntityProperty[] | undefined) ?? [];\r\n\r\n if (columnRows) {\r\n content['columns'] = columnRows.length\r\n ? columnRows.map((row) => mapColumn(row, resolvedProperties))\r\n : defaultColumns(resolvedProperties);\r\n } else if (!Array.isArray(existing['columns']) && resolvedProperties.length) {\r\n content['columns'] = defaultColumns(resolvedProperties);\r\n }\r\n\r\n if (relatedRows) {\r\n content['relatedEntities'] = relatedRows.map(mapRelatedEntity).filter((row) => row.entity);\r\n }\r\n\r\n const schemaChanged = groups.length > 0 || propertyRows.length > 0;\r\n const layoutExplicit = createSections !== undefined || createProperties !== undefined;\r\n const actionsExplicit = listActions !== undefined || singleActions !== undefined;\r\n if (schemaChanged || layoutExplicit || actionsExplicit) {\r\n overlayInterfaces(content, {\r\n groups: (content['groups'] as AXPEntityPropertyGroup[] | undefined) ?? [],\r\n properties: resolvedProperties,\r\n createSections,\r\n createProperties,\r\n listActions,\r\n singleActions,\r\n schemaChanged,\r\n layoutExplicit,\r\n });\r\n }\r\n\r\n if (pages) {\r\n content['pages'] = pages.map(mapPage).filter((page) => page['componentKey']);\r\n }\r\n\r\n overlayJsonKey(content, input, 'rules', 'rules');\r\n overlayJsonKey(content, input, 'validations', 'validations');\r\n overlayJsonKey(content, input, 'commandsJson', 'commands');\r\n overlayJsonKey(content, input, 'queriesJson', 'queries');\r\n\r\n return content;\r\n}\r\n\r\nfunction overlayFormats(\r\n content: Record<string, unknown>,\r\n input: Record<string, unknown>,\r\n fallbackTitle: string,\r\n): void {\r\n const current = (content['formats'] as Record<string, unknown> | undefined) ?? {};\r\n const individual =\r\n readTrimmed(input['formatIndividual']) || String(current['individual'] ?? fallbackTitle);\r\n const plural = readTrimmed(input['formatPlural']) || String(current['plural'] ?? fallbackTitle);\r\n const displayName =\r\n readTrimmed(input['formatDisplayName']) ||\r\n (typeof current['displayName'] === 'string' ? current['displayName'] : undefined);\r\n const searchTitle =\r\n readTrimmed(input['formatSearchTitle']) ||\r\n String((current['searchResult'] as Record<string, unknown> | undefined)?.['title'] ?? '{{ name }}');\r\n const searchDescription =\r\n readTrimmed(input['formatSearchDescription']) ||\r\n String(\r\n (current['searchResult'] as Record<string, unknown> | undefined)?.['description'] ??\r\n String(content['module'] ?? ''),\r\n );\r\n\r\n content['formats'] = {\r\n ...current,\r\n individual,\r\n plural,\r\n ...(displayName ? { displayName } : {}),\r\n searchResult: {\r\n title: searchTitle,\r\n description: searchDescription,\r\n },\r\n };\r\n}\r\n\r\nfunction overlayCategory(content: Record<string, unknown>, input: Record<string, unknown>): void {\r\n const entityName = readTrimmed(input['categoryEntity']);\r\n if (!entityName) {\r\n if (input['categoryEntity'] !== undefined) {\r\n delete content['category'];\r\n }\r\n return;\r\n }\r\n\r\n content['category'] = {\r\n entity: entityName,\r\n textField: readTrimmed(input['categoryTextField']) || 'title',\r\n valueField: readTrimmed(input['categoryValueField']) || 'id',\r\n };\r\n}\r\n\r\nfunction overlayInterfaces(\r\n content: Record<string, unknown>,\r\n args: {\r\n groups: AXPEntityPropertyGroup[];\r\n properties: AXPEntityProperty[];\r\n createSections: Record<string, unknown>[] | undefined;\r\n createProperties: Record<string, unknown>[] | undefined;\r\n listActions: Record<string, unknown>[] | undefined;\r\n singleActions: Record<string, unknown>[] | undefined;\r\n schemaChanged: boolean;\r\n layoutExplicit: boolean;\r\n },\r\n): void {\r\n const existing = (content['interfaces'] as Record<string, unknown> | undefined) ?? {};\r\n const master = (existing['master'] as Record<string, unknown> | undefined) ?? {};\r\n const existingList = (master['list'] as Record<string, unknown> | undefined) ?? {};\r\n const existingCreate = (master['create'] as Record<string, unknown> | undefined) ?? {};\r\n const existingSingle = (master['single'] as Record<string, unknown> | undefined) ?? {};\r\n\r\n let sections = existingCreate['sections'];\r\n let propertyLayouts = existingCreate['properties'];\r\n\r\n if (args.layoutExplicit || args.schemaChanged) {\r\n const sectionIds = resolveSectionIds(args.createSections, args.groups);\r\n sections = sectionIds.map((id) => ({\r\n id,\r\n layout: { positions: { lg: { colSpan: 12 } } },\r\n }));\r\n propertyLayouts = resolvePropertyLayouts(args.createProperties, args.properties);\r\n }\r\n\r\n const listActions = args.listActions\r\n ? args.listActions.map(mapAction).filter((action) => action.command)\r\n : ((existingList['actions'] as AXPEntityAction[] | undefined) ?? [...entityMasterCrudActions()]);\r\n\r\n const singleActions = args.singleActions\r\n ? args.singleActions.map(mapAction).filter((action) => action.command)\r\n : ((existingSingle['actions'] as AXPEntityAction[] | undefined) ?? [...entityMasterRecordActions()]);\r\n\r\n content['interfaces'] = {\r\n ...existing,\r\n master: {\r\n ...master,\r\n list: {\r\n ...existingList,\r\n views: existingList['views'] ?? [createAllQueryView({ sorts: [{ name: 'name', dir: 'asc' }] })],\r\n actions: listActions.length ? listActions : [...entityMasterCrudActions()],\r\n },\r\n create: {\r\n ...existingCreate,\r\n sections,\r\n properties: propertyLayouts,\r\n },\r\n update: {\r\n ...((master['update'] as Record<string, unknown> | undefined) ?? {}),\r\n sections,\r\n properties: propertyLayouts,\r\n },\r\n single: {\r\n ...existingSingle,\r\n title: String(existingSingle['title'] ?? '{{ title || name }}') || '{{ title || name }}',\r\n sections,\r\n properties: propertyLayouts,\r\n actions: singleActions.length ? singleActions : [...entityMasterRecordActions()],\r\n },\r\n },\r\n };\r\n}\r\n\r\nfunction overlayJsonKey(\r\n content: Record<string, unknown>,\r\n input: Record<string, unknown>,\r\n formKey: string,\r\n contentKey: string,\r\n): void {\r\n if (input[formKey] === undefined) {\r\n return;\r\n }\r\n const parsed = parseJsonValue(input[formKey]);\r\n if (parsed === undefined) {\r\n return;\r\n }\r\n content[contentKey] = parsed;\r\n}\r\n\r\n//#endregion\r\n\r\n//#region ----- Row mappers -----\r\n\r\nfunction mapGroup(row: Record<string, unknown>): AXPEntityPropertyGroup {\r\n const id = readTrimmed(row['id']);\r\n return {\r\n id,\r\n title: readTrimmed(row['title']) || id,\r\n ...(readTrimmed(row['description']) ? { description: readTrimmed(row['description']) } : {}),\r\n ...(readTrimmed(row['icon']) ? { icon: readTrimmed(row['icon']) } : {}),\r\n };\r\n}\r\n\r\nfunction mapProperty(\r\n row: Record<string, unknown>,\r\n groups: AXPEntityPropertyGroup[],\r\n): AXPEntityProperty {\r\n const name = readTrimmed(row['name']);\r\n const widget = mapWidgetInterface(row['interface']);\r\n const dataType =\r\n readTrimmed(row['dataType']) || inferDataType(widget?.type) || 'string';\r\n const required = row['required'] === true;\r\n const unique = row['unique'] === true;\r\n const groupId =\r\n readTrimmed(row['groupId']) || groups[0]?.id || 'basic-info';\r\n const defaultValue = row['defaultValue'];\r\n\r\n return {\r\n name,\r\n title: readTrimmed(row['title']) || name,\r\n ...(readTrimmed(row['description']) ? { description: readTrimmed(row['description']) } : {}),\r\n groupId,\r\n schema: {\r\n dataType,\r\n ...(row['nullable'] === true ? { nullable: true } : {}),\r\n ...(row['readonly'] === true ? { readonly: true } : {}),\r\n ...(row['visible'] === false ? { visible: false } : {}),\r\n ...(defaultValue !== undefined && defaultValue !== '' ? { defaultValue } : {}),\r\n ...(unique ? { unique: { enabled: true } } : {}),\r\n ...(widget ? { interface: widget } : { interface: { type: AXPWidgetsCatalog.text } }),\r\n },\r\n ...(required ? { validations: [{ rule: 'required' as const }] } : {}),\r\n options: {\r\n filter: { inline: { enabled: true }, advance: { enabled: true } },\r\n sort: { enabled: true },\r\n },\r\n };\r\n}\r\n\r\nfunction mapWidgetInterface(value: unknown): Partial<AXEntityPropertyWidget> | null {\r\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\r\n return null;\r\n }\r\n const node = value as Record<string, unknown>;\r\n const type = readTrimmed(node['type']);\r\n if (!type) {\r\n return null;\r\n }\r\n const mapped: Partial<AXEntityPropertyWidget> = { type };\r\n if (node['options'] && typeof node['options'] === 'object' && !Array.isArray(node['options'])) {\r\n mapped.options = node['options'] as Record<string, unknown>;\r\n }\r\n if (Array.isArray(node['children'])) {\r\n mapped.children = node['children'] as AXEntityPropertyWidget[];\r\n }\r\n if (node['mode'] === 'view' || node['mode'] === 'edit') {\r\n mapped.mode = node['mode'];\r\n }\r\n return mapped;\r\n}\r\n\r\nfunction inferDataType(widgetType: string | undefined): string | undefined {\r\n if (!widgetType) {\r\n return undefined;\r\n }\r\n return WIDGET_DATA_TYPE[widgetType];\r\n}\r\n\r\nfunction mapPlugin(row: unknown): { name: string; options?: Record<string, unknown> } {\r\n if (typeof row === 'string') {\r\n return { name: row.trim() };\r\n }\r\n if (!row || typeof row !== 'object' || Array.isArray(row)) {\r\n return { name: '' };\r\n }\r\n const record = row as Record<string, unknown>;\r\n const name = readTrimmed(record['name']);\r\n const options = parseJsonValue(record['options']);\r\n if (options && typeof options === 'object' && !Array.isArray(options)) {\r\n return { name, options: options as Record<string, unknown> };\r\n }\r\n return { name };\r\n}\r\n\r\nfunction mapColumn(row: Record<string, unknown>, properties: AXPEntityProperty[]): AXPEntityTableColumn {\r\n const name = readTrimmed(row['name']);\r\n const property = properties.find((item) => item.name === name);\r\n const title = readTrimmed(row['title']) || property?.title || name;\r\n const widgetType =\r\n readTrimmed(row['widgetType']) ||\r\n String(property?.schema?.interface?.type ?? AXPWidgetsCatalog.text);\r\n return {\r\n name,\r\n title,\r\n showAs: { type: widgetType },\r\n };\r\n}\r\n\r\nfunction defaultColumns(properties: AXPEntityProperty[]): AXPEntityTableColumn[] {\r\n return properties\r\n .filter((property) => property.schema?.visible !== false)\r\n .slice(0, 6)\r\n .map((property) => ({\r\n name: property.name,\r\n title: property.title,\r\n showAs: { type: property.schema?.interface?.type || AXPWidgetsCatalog.text },\r\n }));\r\n}\r\n\r\nfunction mapRelatedEntity(row: Record<string, unknown>): AXPRelatedEntity {\r\n const layoutType = readTrimmed(row['layoutType']) || 'page-list';\r\n const related: AXPRelatedEntity = {\r\n entity: readTrimmed(row['entity']),\r\n ...(readTrimmed(row['title']) ? { title: readTrimmed(row['title']) } : {}),\r\n ...(readTrimmed(row['icon']) ? { icon: readTrimmed(row['icon']) } : {}),\r\n layout: {\r\n type: layoutType as NonNullable<AXPRelatedEntity['layout']>['type'],\r\n position: 'after',\r\n },\r\n };\r\n const persistence: NonNullable<AXPRelatedEntity['persistence']> = {};\r\n const foreignKey = readTrimmed(row['foreignKeyField']);\r\n const dataPath = readTrimmed(row['dataPath']);\r\n const idField = readTrimmed(row['idField']);\r\n const strategy = readTrimmed(row['persistenceStrategy']);\r\n if (foreignKey) {\r\n persistence.foreignKeyField = foreignKey;\r\n }\r\n if (dataPath) {\r\n persistence.dataPath = dataPath;\r\n }\r\n if (idField) {\r\n persistence.idField = idField;\r\n }\r\n if (strategy === 'embedded' || strategy === 'referenced') {\r\n persistence.strategy = strategy;\r\n }\r\n if (Object.keys(persistence).length) {\r\n related.persistence = persistence;\r\n }\r\n if (row['appearOnCreate'] === true || row['appearOnUpdate'] === true) {\r\n related.appearOn = {\r\n ...(row['appearOnCreate'] === true ? { create: true } : {}),\r\n ...(row['appearOnUpdate'] === true ? { update: true } : {}),\r\n };\r\n }\r\n return related;\r\n}\r\n\r\nfunction mapAction(row: Record<string, unknown>): AXPEntityAction {\r\n const command = readTrimmed(row['command']);\r\n return {\r\n title: readTrimmed(row['title']) || command,\r\n command,\r\n type: (readTrimmed(row['type']) || 'view') as AXPEntityAction['type'],\r\n priority: (readTrimmed(row['priority']) || 'secondary') as AXPEntityAction['priority'],\r\n scope: (readTrimmed(row['scope']) || 'individual') as AXPEntityAction['scope'],\r\n ...(readTrimmed(row['icon']) ? { icon: readTrimmed(row['icon']) } : {}),\r\n };\r\n}\r\n\r\nfunction mapPage(row: Record<string, unknown>): Record<string, unknown> {\r\n const order = Number(row['order']);\r\n return {\r\n componentKey: readTrimmed(row['componentKey']),\r\n ...(readTrimmed(row['title']) ? { title: readTrimmed(row['title']) } : {}),\r\n ...(readTrimmed(row['icon']) ? { icon: readTrimmed(row['icon']) } : {}),\r\n ...(readTrimmed(row['field']) ? { field: readTrimmed(row['field']) } : {}),\r\n ...(Number.isFinite(order) ? { layout: { order, position: 'after' } } : {}),\r\n ...(row['appearOnCreate'] === true || row['appearOnUpdate'] === true\r\n ? {\r\n appearOn: {\r\n ...(row['appearOnCreate'] === true ? { create: true } : {}),\r\n ...(row['appearOnUpdate'] === true ? { update: true } : {}),\r\n },\r\n }\r\n : {}),\r\n };\r\n}\r\n\r\nfunction resolveSectionIds(\r\n createSections: Record<string, unknown>[] | undefined,\r\n groups: AXPEntityPropertyGroup[],\r\n): string[] {\r\n if (createSections?.length) {\r\n return createSections.map((row) => readTrimmed(row['id'])).filter(Boolean);\r\n }\r\n if (groups.length) {\r\n return groups.map((group) => group.id);\r\n }\r\n return ['basic-info'];\r\n}\r\n\r\nfunction resolvePropertyLayouts(\r\n createProperties: Record<string, unknown>[] | undefined,\r\n properties: AXPEntityProperty[],\r\n): Array<{ name: string; layout: { positions: { lg: { colSpan: number } } } }> {\r\n const source = createProperties?.length\r\n ? createProperties\r\n : properties\r\n .filter((property) => property.schema?.visible !== false)\r\n .map((property) => ({ name: property.name, colSpan: 6 }));\r\n\r\n return source\r\n .map((row) => {\r\n const name = readTrimmed(row['name']);\r\n const colSpan = Number(row['colSpan']);\r\n return {\r\n name,\r\n layout: {\r\n positions: { lg: { colSpan: Number.isFinite(colSpan) && colSpan > 0 ? colSpan : 6 } },\r\n },\r\n };\r\n })\r\n .filter((row) => row.name);\r\n}\r\n\r\n//#endregion\r\n\r\n//#region ----- Stub content -----\r\n\r\nfunction buildStubEntityContent(identity: {\r\n module: string;\r\n name: string;\r\n title: string;\r\n icon: string;\r\n}): Record<string, unknown> {\r\n const sections = [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }];\r\n const propertyLayouts = [\r\n { name: 'name', layout: { positions: { lg: { colSpan: 6 } } } },\r\n { name: 'title', layout: { positions: { lg: { colSpan: 6 } } } },\r\n ];\r\n\r\n const stub: AXPEntity = {\r\n module: identity.module,\r\n name: identity.name,\r\n title: identity.title,\r\n icon: identity.icon,\r\n plugins: [],\r\n formats: {\r\n individual: identity.title,\r\n plural: identity.title,\r\n searchResult: {\r\n title: '{{ name }}',\r\n description: identity.module,\r\n },\r\n },\r\n groups: [{ id: 'basic-info', title: '@general:terms.interface.basic-info' }],\r\n properties: [\r\n {\r\n name: 'name',\r\n title: '@general:terms.common.name',\r\n groupId: 'basic-info',\r\n schema: {\r\n dataType: 'string',\r\n interface: { type: AXPWidgetsCatalog.text },\r\n },\r\n validations: [{ rule: 'required' }],\r\n },\r\n {\r\n name: 'title',\r\n title: '@general:terms.common.title',\r\n groupId: 'basic-info',\r\n schema: {\r\n dataType: 'string',\r\n interface: { type: AXPWidgetsCatalog.text },\r\n },\r\n validations: [{ rule: 'required' }],\r\n },\r\n ],\r\n columns: [\r\n { name: 'name', title: '@general:terms.common.name', showAs: { type: AXPWidgetsCatalog.text } },\r\n { name: 'title', title: '@general:terms.common.title', showAs: { type: AXPWidgetsCatalog.text } },\r\n ],\r\n interfaces: {\r\n master: {\r\n list: {\r\n views: [createAllQueryView({ sorts: [{ name: 'name', dir: 'asc' }] })],\r\n actions: [...entityMasterCrudActions()],\r\n },\r\n create: {\r\n sections,\r\n properties: propertyLayouts,\r\n },\r\n single: {\r\n title: '{{ title || name }}',\r\n sections,\r\n properties: propertyLayouts,\r\n actions: [...entityMasterRecordActions()],\r\n },\r\n },\r\n },\r\n };\r\n\r\n return stub as unknown as Record<string, unknown>;\r\n}\r\n\r\nfunction parseEntityName(\r\n rawName: string,\r\n moduleName: string,\r\n): { moduleName: string; entityName: string; storeName: string } {\r\n if (!rawName.includes('.')) {\r\n return {\r\n moduleName,\r\n entityName: rawName,\r\n storeName: `${moduleName}.${rawName}`,\r\n };\r\n }\r\n\r\n const lastDot = rawName.lastIndexOf('.');\r\n const maybeModule = rawName.slice(0, lastDot).trim();\r\n const entityName = rawName.slice(lastDot + 1).trim();\r\n const resolvedModule = moduleName || maybeModule;\r\n return {\r\n moduleName: resolvedModule,\r\n entityName,\r\n storeName: `${resolvedModule}.${entityName}`,\r\n };\r\n}\r\n\r\nfunction readContent(input: Record<string, unknown>): Record<string, unknown> | null {\r\n const value = input['content'];\r\n if (typeof value === 'string' && value.trim()) {\r\n try {\r\n const parsed = JSON.parse(value) as unknown;\r\n if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {\r\n return parsed as Record<string, unknown>;\r\n }\r\n } catch {\r\n return null;\r\n }\r\n }\r\n if (value && typeof value === 'object' && !Array.isArray(value)) {\r\n return value as Record<string, unknown>;\r\n }\r\n return null;\r\n}\r\n\r\nfunction omitDesignerFormFields(input: Record<string, unknown>): Record<string, unknown> {\r\n const next = { ...input };\r\n for (const key of ENTITY_DEFINITION_DESIGNER_FORM_KEYS) {\r\n delete next[key];\r\n }\r\n return next;\r\n}\r\n\r\nfunction readArray(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 readExistingArray<T>(value: unknown): T[] {\r\n return Array.isArray(value) ? (value as T[]) : [];\r\n}\r\n\r\nfunction parseJsonValue(value: unknown): unknown {\r\n if (value == null || value === '') {\r\n return undefined;\r\n }\r\n if (typeof value === 'string') {\r\n const trimmed = value.trim();\r\n if (!trimmed) {\r\n return undefined;\r\n }\r\n try {\r\n return JSON.parse(trimmed);\r\n } catch {\r\n return undefined;\r\n }\r\n }\r\n return value;\r\n}\r\n\r\nfunction readTrimmed(value: unknown): string {\r\n return typeof value === 'string' ? value.trim() : '';\r\n}\r\n\r\n//#endregion\r\n\r\n//#region ----- Flatten content to designer form -----\r\n\r\n/**\r\n * Maps stored `AXPEntity` content back onto the wizard form fields\r\n * (repeaters, JSON editors, identity extras).\r\n */\r\nexport function flattenEntityContentToDesignerForm(\r\n content: Record<string, unknown> | null | undefined,\r\n): Record<string, unknown> {\r\n if (!content) {\r\n return {};\r\n }\r\n\r\n const formats = asRecord(content['formats']);\r\n const searchResult = asRecord(formats['searchResult']);\r\n const category = asRecord(content['category']);\r\n const interfaces = asRecord(content['interfaces']);\r\n const master = asRecord(interfaces['master']);\r\n const create = asRecord(master['create']);\r\n const list = asRecord(master['list']);\r\n const single = asRecord(master['single']);\r\n\r\n return {\r\n parentKey: readTrimmed(content['parentKey']),\r\n searchTags: Array.isArray(content['searchTags']) ? content['searchTags'] : [],\r\n formatIndividual: readTrimmed(formats['individual']),\r\n formatPlural: readTrimmed(formats['plural']),\r\n formatDisplayName: readTrimmed(formats['displayName']),\r\n formatSearchTitle: readTrimmed(searchResult['title']),\r\n formatSearchDescription: readTrimmed(searchResult['description']),\r\n categoryEntity: readTrimmed(category['entity']),\r\n categoryTextField: readTrimmed(category['textField']) || 'title',\r\n categoryValueField: readTrimmed(category['valueField']) || 'id',\r\n plugins: flattenPlugins(content['plugins']),\r\n groups: readArray(content['groups']),\r\n properties: flattenProperties(content['properties']),\r\n columns: flattenColumns(content['columns']),\r\n relatedEntities: flattenRelatedEntities(content['relatedEntities']),\r\n createSections: flattenSections(create['sections']),\r\n createProperties: flattenPropertyLayouts(create['properties']),\r\n listActions: flattenActions(list['actions']),\r\n singleActions: flattenActions(single['actions']),\r\n pages: flattenPages(content['pages']),\r\n rules: stringifyJson(content['rules']),\r\n validations: stringifyJson(content['validations']),\r\n commandsJson: stringifyJson(content['commands']),\r\n queriesJson: stringifyJson(content['queries']),\r\n };\r\n}\r\n\r\nexport function flattenProperties(value: unknown): Record<string, unknown>[] {\r\n return readArray(value).map((row) => {\r\n const schema = asRecord(row['schema']);\r\n if (!Object.keys(schema).length) {\r\n return row;\r\n }\r\n const unique = asRecord(schema['unique']);\r\n const validations = Array.isArray(row['validations']) ? row['validations'] : [];\r\n const required = validations.some(\r\n (item) => item && typeof item === 'object' && (item as Record<string, unknown>)['rule'] === 'required',\r\n );\r\n return {\r\n name: readTrimmed(row['name']),\r\n title: readTrimmed(row['title']) || readTrimmed(row['name']),\r\n description: readTrimmed(row['description']),\r\n groupId: readTrimmed(row['groupId']),\r\n interface: schema['interface'] ?? { type: AXPWidgetsCatalog.text },\r\n dataType: readTrimmed(schema['dataType']) || 'string',\r\n required,\r\n nullable: schema['nullable'] === true,\r\n readonly: schema['readonly'] === true,\r\n unique: unique['enabled'] === true,\r\n visible: schema['visible'] !== false,\r\n defaultValue: schema['defaultValue'] ?? '',\r\n };\r\n });\r\n}\r\n\r\nfunction flattenPlugins(value: unknown): Record<string, unknown>[] {\r\n if (!Array.isArray(value)) {\r\n return [];\r\n }\r\n const rows: Record<string, unknown>[] = [];\r\n for (const item of value) {\r\n if (typeof item === 'string') {\r\n const name = item.trim();\r\n if (name) {\r\n rows.push({ name, options: '' });\r\n }\r\n continue;\r\n }\r\n if (!item || typeof item !== 'object' || Array.isArray(item)) {\r\n continue;\r\n }\r\n const row = item as Record<string, unknown>;\r\n const name = readTrimmed(row['name']);\r\n if (!name) {\r\n continue;\r\n }\r\n rows.push({\r\n name,\r\n options: stringifyJson(row['options']),\r\n });\r\n }\r\n return rows;\r\n}\r\n\r\nfunction flattenColumns(value: unknown): Record<string, unknown>[] {\r\n return readArray(value).map((row) => {\r\n const showAs = asRecord(row['showAs']);\r\n return {\r\n name: readTrimmed(row['name']),\r\n title: readTrimmed(row['title']),\r\n widgetType: readTrimmed(row['widgetType']) || readTrimmed(showAs['type']),\r\n };\r\n });\r\n}\r\n\r\nfunction flattenRelatedEntities(value: unknown): Record<string, unknown>[] {\r\n return readArray(value).map((row) => {\r\n const layout = asRecord(row['layout']);\r\n const persistence = asRecord(row['persistence']);\r\n const appearOn = asRecord(row['appearOn']);\r\n return {\r\n entity: readTrimmed(row['entity']),\r\n title: readTrimmed(row['title']),\r\n icon: readTrimmed(row['icon']),\r\n layoutType: readTrimmed(layout['type']) || 'page-list',\r\n foreignKeyField: readTrimmed(persistence['foreignKeyField']),\r\n dataPath: readTrimmed(persistence['dataPath']),\r\n idField: readTrimmed(persistence['idField']),\r\n persistenceStrategy: readTrimmed(persistence['strategy']),\r\n appearOnCreate: appearOn['create'] === true,\r\n appearOnUpdate: appearOn['update'] === true,\r\n };\r\n });\r\n}\r\n\r\nfunction flattenSections(value: unknown): Record<string, unknown>[] {\r\n return readArray(value).map((row) => ({ id: readTrimmed(row['id']) })).filter((row) => row.id);\r\n}\r\n\r\nfunction flattenPropertyLayouts(value: unknown): Record<string, unknown>[] {\r\n return readArray(value).map((row) => {\r\n const layout = asRecord(row['layout']);\r\n const positions = asRecord(layout['positions']);\r\n const lg = asRecord(positions['lg']);\r\n const colSpan = Number(lg['colSpan']);\r\n return {\r\n name: readTrimmed(row['name']),\r\n colSpan: Number.isFinite(colSpan) && colSpan > 0 ? colSpan : 6,\r\n };\r\n });\r\n}\r\n\r\nfunction flattenActions(value: unknown): Record<string, unknown>[] {\r\n return readArray(value).map((row) => {\r\n const command = row['command'];\r\n const commandName =\r\n typeof command === 'string'\r\n ? command\r\n : command && typeof command === 'object' && !Array.isArray(command)\r\n ? readTrimmed((command as Record<string, unknown>)['name'])\r\n : '';\r\n return {\r\n title: readTrimmed(row['title']),\r\n command: commandName,\r\n icon: readTrimmed(row['icon']),\r\n type: readTrimmed(row['type']) || 'view',\r\n priority: readTrimmed(row['priority']) || 'secondary',\r\n scope: readTrimmed(row['scope']) || 'individual',\r\n };\r\n });\r\n}\r\n\r\nfunction flattenPages(value: unknown): Record<string, unknown>[] {\r\n return readArray(value).map((row) => {\r\n const appearOn = asRecord(row['appearOn']);\r\n const layout = asRecord(row['layout']);\r\n return {\r\n componentKey: readTrimmed(row['componentKey']),\r\n title: readTrimmed(row['title']),\r\n icon: readTrimmed(row['icon']),\r\n field: readTrimmed(row['field']),\r\n order: layout['order'] ?? '',\r\n appearOnCreate: appearOn['create'] === true,\r\n appearOnUpdate: appearOn['update'] === true,\r\n };\r\n });\r\n}\r\n\r\nfunction stringifyJson(value: unknown): string {\r\n if (value == null || value === '') {\r\n return '';\r\n }\r\n if (typeof value === 'string') {\r\n return value;\r\n }\r\n try {\r\n return JSON.stringify(value, null, 2);\r\n } catch {\r\n return '';\r\n }\r\n}\r\n\r\nfunction asRecord(value: unknown): Record<string, unknown> {\r\n if (value && typeof value === 'object' && !Array.isArray(value)) {\r\n return value as Record<string, unknown>;\r\n }\r\n return {};\r\n}\r\n\r\n//#endregion\r\n","//#region ----- Imports -----\n\nimport { AXPWidgetsCatalog, AXPWidgetsList } from '@acorex-platform/framework-shared/core';\nimport {\n AXPEntity,\n createAllQueryView,\n entityMasterCreateAction,\n entityMasterRecordActions,\n entityMasterViewAction,\n} from '@acorex-platform/framework-shared/entity';\n\nimport { RootConfig } from '../../root-config';\nimport {\n ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY,\n ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES,\n ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY,\n ENTITY_DEFINITION_SURFACES_PROPERTY_NAMES,\n} from './entity-definition-page.keys';\nimport {\n ACTION_REPEATER_CHILDREN,\n COLUMN_REPEATER_CHILDREN,\n CREATE_PROPERTY_LAYOUT_REPEATER_CHILDREN,\n CREATE_SECTION_REPEATER_CHILDREN,\n GROUP_REPEATER_CHILDREN,\n MODULE_DEFINITION_ENTITY,\n PAGE_REPEATER_CHILDREN,\n PLUGIN_REPEATER_CHILDREN,\n PROPERTY_REPEATER_CHILDREN,\n RELATED_ENTITY_REPEATER_CHILDREN,\n} from './entity-definition-repeater.widgets';\n\nexport {\n ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY,\n ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES,\n ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY,\n ENTITY_DEFINITION_SURFACES_PROPERTY_NAMES,\n} from './entity-definition-page.keys';\nexport {\n flattenEntityContentToDesignerForm,\n flattenProperties,\n} from './entity-definition-content.util';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst LIST_FILTER_SORT = {\n filter: { inline: { enabled: true }, advance: { enabled: true } },\n sort: { enabled: true },\n} as const;\n\nconst i18nScope = RootConfig.config.i18n;\n\nfunction fieldTitle(name: string): string {\n return `@${i18nScope}:entity-definitions.entities.entity-definition.fields.${name}.title`;\n}\n\nfunction groupTitle(name: string): string {\n return `@${i18nScope}:entity-definitions.entities.entity-definition.groups.${name}`;\n}\n\nfunction pageTitle(name: string): string {\n return `@${i18nScope}:entity-definitions.entities.entity-definition.pages.${name}.title`;\n}\n\nfunction repeaterProperty(\n name: string,\n groupId: string,\n children: unknown[],\n) {\n return {\n name,\n title: fieldTitle(name),\n groupId,\n schema: {\n dataType: 'array' as const,\n defaultValue: [],\n interface: {\n type: AXPWidgetsList.Layouts.RepeaterLayout,\n options: { hasControls: true, allowReorder: true },\n children: children as never,\n },\n },\n };\n}\n\n//#endregion\n\n//#region ----- Entity -----\n\nexport function buildEntityDefinitionEntity(): AXPEntity {\n const identityLayout = [\n { name: 'name', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'module', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'title', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'icon', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'parentKey', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'searchTags', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'formatIndividual', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'formatPlural', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'formatDisplayName', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'formatSearchTitle', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'formatSearchDescription', layout: { positions: { lg: { colSpan: 12 } } } },\n { name: 'categoryEntity', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'categoryTextField', layout: { positions: { lg: { colSpan: 3 } } } },\n { name: 'categoryValueField', layout: { positions: { lg: { colSpan: 3 } } } },\n ];\n\n const entityDef = {\n module: RootConfig.module.name,\n name: RootConfig.entities.entityDefinition.name,\n title: RootConfig.entities.entityDefinition.title,\n icon: RootConfig.entities.entityDefinition.icon,\n formats: {\n individual: RootConfig.entities.entityDefinition.title,\n plural: RootConfig.entities.entityDefinition.titlePlural,\n searchResult: {\n title: '{{ name }}',\n description: '{{ content.module }}',\n },\n },\n plugins: [],\n pages: [\n {\n componentKey: ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY,\n field: 'properties',\n title: pageTitle('schema'),\n icon: 'fa-light fa-list',\n layout: { order: 1, position: 'after' as const },\n appearOn: { create: true, update: true },\n options: { propertyNames: [...ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES] },\n },\n {\n componentKey: ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY,\n field: 'interfaces',\n title: pageTitle('surfaces'),\n icon: 'fa-light fa-table-columns',\n layout: { order: 2, position: 'after' as const },\n appearOn: { create: true, update: true },\n options: { propertyNames: [...ENTITY_DEFINITION_SURFACES_PROPERTY_NAMES] },\n },\n ],\n groups: [\n { id: 'basic-info', title: groupTitle('basic-info') },\n { id: 'formats', title: groupTitle('formats') },\n { id: 'category', title: groupTitle('category') },\n { id: 'plugins', title: groupTitle('plugins') },\n { id: 'groups', title: groupTitle('groups') },\n { id: 'properties', title: groupTitle('properties') },\n { id: 'columns', title: groupTitle('columns') },\n { id: 'related-entities', title: groupTitle('related-entities') },\n { id: 'layouts', title: groupTitle('layouts') },\n { id: 'actions', title: groupTitle('actions') },\n { id: 'advanced', title: groupTitle('advanced') },\n { id: 'schema', title: groupTitle('schema') },\n ],\n properties: [\n {\n name: 'id',\n title: '@general:terms.common.id',\n schema: {\n dataType: 'uuid',\n visible: false,\n nullable: false,\n readonly: true,\n unique: { enabled: true },\n },\n },\n {\n name: 'name',\n title: '@general:terms.common.name',\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n interface: { type: AXPWidgetsCatalog.text },\n },\n validations: [{ rule: 'required' }],\n options: LIST_FILTER_SORT,\n },\n {\n name: 'module',\n title: fieldTitle('module-id'),\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsCatalog.lookup,\n options: {\n entity: MODULE_DEFINITION_ENTITY,\n textField: 'title',\n valueField: 'name',\n look: 'select',\n allowSearch: true,\n columns: ['title', 'name'],\n },\n },\n },\n validations: [{ rule: 'required' }],\n options: LIST_FILTER_SORT,\n },\n {\n name: 'title',\n title: '@general:terms.common.title',\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n interface: { type: AXPWidgetsCatalog.text },\n },\n validations: [{ rule: 'required' }],\n options: LIST_FILTER_SORT,\n },\n {\n name: 'icon',\n title: '@general:terms.common.icon',\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n interface: { type: AXPWidgetsCatalog.iconChooser },\n },\n },\n {\n name: 'parentKey',\n title: fieldTitle('parent-key'),\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n interface: { type: AXPWidgetsCatalog.text },\n },\n },\n {\n name: 'searchTags',\n title: fieldTitle('search-tags'),\n groupId: 'basic-info',\n schema: {\n dataType: 'array',\n defaultValue: [],\n interface: { type: AXPWidgetsList.Editors.TagEditor },\n },\n },\n {\n name: 'formatIndividual',\n title: fieldTitle('format-individual'),\n groupId: 'formats',\n schema: {\n dataType: 'string',\n interface: { type: AXPWidgetsCatalog.text },\n },\n },\n {\n name: 'formatPlural',\n title: fieldTitle('format-plural'),\n groupId: 'formats',\n schema: {\n dataType: 'string',\n interface: { type: AXPWidgetsCatalog.text },\n },\n },\n {\n name: 'formatDisplayName',\n title: fieldTitle('format-display-name'),\n groupId: 'formats',\n schema: {\n dataType: 'string',\n interface: { type: AXPWidgetsCatalog.text },\n },\n },\n {\n name: 'formatSearchTitle',\n title: fieldTitle('format-search-title'),\n groupId: 'formats',\n schema: {\n dataType: 'string',\n interface: { type: AXPWidgetsCatalog.text },\n },\n },\n {\n name: 'formatSearchDescription',\n title: fieldTitle('format-search-description'),\n groupId: 'formats',\n schema: {\n dataType: 'string',\n interface: { type: AXPWidgetsCatalog.largeText, options: { rows: 2 } },\n },\n },\n {\n name: 'categoryEntity',\n title: fieldTitle('category-entity'),\n groupId: 'category',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsCatalog.lookup,\n options: {\n entity: `${RootConfig.module.name}.${RootConfig.entities.entityDefinition.name}`,\n textField: 'name',\n valueField: 'name',\n look: 'select',\n allowSearch: true,\n columns: ['name'],\n },\n },\n },\n },\n {\n name: 'categoryTextField',\n title: fieldTitle('category-text-field'),\n groupId: 'category',\n schema: {\n dataType: 'string',\n defaultValue: 'title',\n interface: { type: AXPWidgetsCatalog.text },\n },\n },\n {\n name: 'categoryValueField',\n title: fieldTitle('category-value-field'),\n groupId: 'category',\n schema: {\n dataType: 'string',\n defaultValue: 'id',\n interface: { type: AXPWidgetsCatalog.text },\n },\n },\n {\n ...repeaterProperty('plugins', 'plugins', PLUGIN_REPEATER_CHILDREN),\n },\n {\n ...repeaterProperty('groups', 'groups', GROUP_REPEATER_CHILDREN),\n },\n {\n ...repeaterProperty('properties', 'properties', PROPERTY_REPEATER_CHILDREN),\n },\n {\n ...repeaterProperty('columns', 'columns', COLUMN_REPEATER_CHILDREN),\n },\n {\n ...repeaterProperty('relatedEntities', 'related-entities', RELATED_ENTITY_REPEATER_CHILDREN),\n title: fieldTitle('related-entities'),\n },\n {\n ...repeaterProperty('createSections', 'layouts', CREATE_SECTION_REPEATER_CHILDREN),\n title: fieldTitle('create-sections'),\n },\n {\n ...repeaterProperty('createProperties', 'layouts', CREATE_PROPERTY_LAYOUT_REPEATER_CHILDREN),\n title: fieldTitle('create-properties'),\n },\n {\n ...repeaterProperty('listActions', 'actions', ACTION_REPEATER_CHILDREN),\n title: fieldTitle('list-actions'),\n },\n {\n ...repeaterProperty('singleActions', 'actions', ACTION_REPEATER_CHILDREN),\n title: fieldTitle('single-actions'),\n },\n {\n ...repeaterProperty('pages', 'advanced', PAGE_REPEATER_CHILDREN),\n title: fieldTitle('pages'),\n },\n {\n name: 'rules',\n title: fieldTitle('rules'),\n groupId: 'advanced',\n schema: {\n dataType: 'object',\n interface: {\n type: AXPWidgetsList.Advanced.CodeEditor,\n options: { language: 'json', height: 'h-40' },\n },\n },\n },\n {\n name: 'validations',\n title: fieldTitle('validations'),\n groupId: 'advanced',\n schema: {\n dataType: 'object',\n interface: {\n type: AXPWidgetsList.Advanced.CodeEditor,\n options: { language: 'json', height: 'h-40' },\n },\n },\n },\n {\n name: 'commandsJson',\n title: fieldTitle('commands'),\n groupId: 'advanced',\n schema: {\n dataType: 'object',\n interface: {\n type: AXPWidgetsList.Advanced.CodeEditor,\n options: { language: 'json', height: 'h-40' },\n },\n },\n },\n {\n name: 'queriesJson',\n title: fieldTitle('queries'),\n groupId: 'advanced',\n schema: {\n dataType: 'object',\n interface: {\n type: AXPWidgetsList.Advanced.CodeEditor,\n options: { language: 'json', height: 'h-40' },\n },\n },\n },\n {\n name: 'content',\n title: fieldTitle('content'),\n groupId: 'schema',\n schema: {\n dataType: 'object',\n readonly: true,\n interface: {\n type: AXPWidgetsList.Advanced.CodeEditor,\n options: { language: 'json', readOnly: true, height: 'h-96' },\n },\n },\n },\n ],\n columns: [\n { name: 'name', title: '@general:terms.common.name', showAs: { type: AXPWidgetsCatalog.text } },\n {\n name: 'module',\n title: fieldTitle('module-id'),\n showAs: { type: AXPWidgetsCatalog.text },\n options: { dataPath: 'content.module' },\n },\n {\n name: 'title',\n title: '@general:terms.common.title',\n showAs: { type: AXPWidgetsCatalog.text },\n options: { dataPath: 'content.title' },\n },\n {\n name: 'icon',\n title: '@general:terms.common.icon',\n showAs: { type: AXPWidgetsCatalog.iconChooser },\n options: { dataPath: 'content.icon' },\n },\n ],\n interfaces: {\n master: {\n list: {\n views: [createAllQueryView({ sorts: [{ name: 'name', dir: 'asc' }] })],\n actions: [entityMasterCreateAction(), entityMasterViewAction()],\n },\n create: {\n sections: [\n { id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } },\n { id: 'formats', layout: { positions: { lg: { colSpan: 12 } } } },\n { id: 'category', layout: { positions: { lg: { colSpan: 12 } } } },\n ],\n properties: identityLayout,\n },\n update: {\n sections: [\n { id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } },\n { id: 'formats', layout: { positions: { lg: { colSpan: 12 } } } },\n { id: 'category', layout: { positions: { lg: { colSpan: 12 } } } },\n ],\n properties: identityLayout,\n },\n single: {\n title: '{{ name }}',\n sections: [\n { id: 'basic-info' },\n { id: 'formats' },\n { id: 'schema' },\n ],\n properties: [\n { name: 'name', dataPath: 'content.name', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'module', dataPath: 'content.module', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'title', dataPath: 'content.title', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'icon', dataPath: 'content.icon', layout: { positions: { lg: { colSpan: 6 } } } },\n {\n name: 'parentKey',\n dataPath: 'content.parentKey',\n layout: { positions: { lg: { colSpan: 6 } } },\n },\n { name: 'content', layout: { positions: { lg: { colSpan: 12 } } } },\n ],\n actions: [...entityMasterRecordActions()],\n },\n },\n },\n };\n\n return entityDef as AXPEntity;\n}\n\nexport async function entityDefinitionEntityFactory(): Promise<AXPEntity | null> {\n return buildEntityDefinitionEntity();\n}\n\n//#endregion\n"],"names":["i18n"],"mappings":";;;;;AAAA;AAEA;AACO,MAAM,2CAA2C,GAAG;AAE3D;AACO,MAAM,6CAA6C,GAAG;AAEtD,MAAM,uCAAuC,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,YAAY;AAElF,MAAM,yCAAyC,GAAG;IACvD,SAAS;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ACD,wBAAA,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;AACpE,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,GAAG,yBAAyB,EAAE,CAAC;AAC1C,iBAAA;AACF,aAAA;AACF,SAAA;KACF;AAED,IAAA,OAAO,SAAsB;AAC/B;AAEO,eAAe,6BAA6B,GAAA;IACjD,OAAO,2BAA2B,EAAE;AACtC;AAEA;;"}
@@ -0,0 +1,299 @@
1
+ import { AXPSystemActionType, AXPWidgetsCatalog, AXP_MODULE_TYPE, AXP_MODULE_DOMAIN } from '@acorex-platform/framework-shared/core';
2
+ import { entityMasterDeleteAction, AXPEntityCommandScope, entityMasterViewAction, entityMasterCreateAction, createAllQueryView } from '@acorex-platform/framework-shared/entity';
3
+ import { ENTITY_CREATE_UI } from '@acorex-platform/framework-shared/runtime';
4
+ import { R as RootConfig } from './acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-HWczTPH2.mjs';
5
+
6
+ //#region ----- Imports -----
7
+ //#endregion
8
+ //#region ----- Constants -----
9
+ const LIST_FILTER_SORT = {
10
+ filter: { inline: { enabled: true }, advance: { enabled: true } },
11
+ sort: { enabled: true },
12
+ };
13
+ const HIDE_DELETE_WHEN_SYSTEM = '{{ context.eval("stateInfo.isSystem") == true }}';
14
+ function moduleFieldTitle(i18n, field) {
15
+ return `@${i18n}:module-definitions.entities.module-definition.fields.${field}.title`;
16
+ }
17
+ function moduleTypeOption(i18n, option) {
18
+ return `@${i18n}:module-definitions.entities.module-definition.fields.type.options.${option}`;
19
+ }
20
+ function moduleDomainOption(i18n, option) {
21
+ return `@${i18n}:module-definitions.entities.module-definition.fields.domain.options.${option}`;
22
+ }
23
+ function moduleDefinitionRecordActions() {
24
+ return [
25
+ {
26
+ ...entityMasterDeleteAction(),
27
+ hidden: HIDE_DELETE_WHEN_SYSTEM,
28
+ },
29
+ ];
30
+ }
31
+ function moduleEntityDefinitionsRelated() {
32
+ const i18n = RootConfig.config.i18n;
33
+ const entity = `${RootConfig.module.name}.${RootConfig.entities.entityDefinition.name}`;
34
+ return [
35
+ {
36
+ entity,
37
+ title: `@${i18n}:module-definitions.entities.module-definition.related-entities.entity-definitions.title`,
38
+ icon: RootConfig.entities.entityDefinition.icon,
39
+ columns: ['name', 'title', 'icon'],
40
+ excludeProperties: ['module'],
41
+ conditions: [
42
+ {
43
+ name: 'content.module',
44
+ operator: { type: 'equal' },
45
+ value: '{{context.eval("name")}}',
46
+ },
47
+ ],
48
+ actions: [
49
+ {
50
+ title: '@general:actions.create.title',
51
+ command: {
52
+ name: ENTITY_CREATE_UI,
53
+ options: {
54
+ process: {
55
+ redirect: false,
56
+ canCreateNewOne: true,
57
+ data: {
58
+ module: '{{context.eval("name")}}',
59
+ },
60
+ },
61
+ },
62
+ },
63
+ priority: 'primary',
64
+ type: AXPSystemActionType.Create,
65
+ scope: AXPEntityCommandScope.TypeLevel,
66
+ },
67
+ entityMasterViewAction(),
68
+ entityMasterDeleteAction(),
69
+ ],
70
+ layout: { type: 'page-list', position: 'after', order: 1 },
71
+ },
72
+ ];
73
+ }
74
+ //#endregion
75
+ //#region ----- Entity -----
76
+ function buildModuleDefinitionEntity() {
77
+ const i18n = RootConfig.config.i18n;
78
+ const sections = [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }];
79
+ const propertyLayouts = [
80
+ { name: 'name', layout: { positions: { lg: { colSpan: 6 } } } },
81
+ { name: 'title', layout: { positions: { lg: { colSpan: 6 } } } },
82
+ { name: 'version', layout: { positions: { lg: { colSpan: 4 } } } },
83
+ { name: 'type', layout: { positions: { lg: { colSpan: 4 } } } },
84
+ { name: 'domain', layout: { positions: { lg: { colSpan: 4 } } } },
85
+ { name: 'icon', layout: { positions: { lg: { colSpan: 6 } } } },
86
+ { name: 'i18n', layout: { positions: { lg: { colSpan: 6 } } } },
87
+ { name: 'required', layout: { positions: { lg: { colSpan: 6 } } } },
88
+ { name: 'description', layout: { positions: { lg: { colSpan: 12 } } } },
89
+ { name: 'dependencies', layout: { positions: { lg: { colSpan: 12 } } } },
90
+ ];
91
+ return {
92
+ module: RootConfig.module.name,
93
+ name: RootConfig.entities.moduleDefinition.name,
94
+ title: RootConfig.entities.moduleDefinition.title,
95
+ icon: RootConfig.entities.moduleDefinition.icon,
96
+ searchTags: [
97
+ 'module-definition',
98
+ 'module-catalog',
99
+ 'module-manifest',
100
+ 'platform-module',
101
+ 'virtual-module',
102
+ 'تعریف ماژول',
103
+ 'کاتالوگ ماژول',
104
+ ],
105
+ formats: {
106
+ individual: RootConfig.entities.moduleDefinition.title,
107
+ plural: RootConfig.entities.moduleDefinition.titlePlural,
108
+ searchResult: {
109
+ title: '{{ title || name }}',
110
+ description: '{{ type }} {{ domain }}',
111
+ },
112
+ },
113
+ plugins: [],
114
+ relatedEntities: moduleEntityDefinitionsRelated(),
115
+ groups: [
116
+ {
117
+ id: 'basic-info',
118
+ title: `@${i18n}:module-definitions.entities.module-definition.groups.basic-info`,
119
+ },
120
+ ],
121
+ properties: [
122
+ {
123
+ name: 'name',
124
+ title: '@general:terms.common.name',
125
+ groupId: 'basic-info',
126
+ schema: {
127
+ dataType: 'string',
128
+ unique: { enabled: true },
129
+ interface: { type: AXPWidgetsCatalog.text },
130
+ },
131
+ validations: [{ rule: 'required' }],
132
+ options: LIST_FILTER_SORT,
133
+ },
134
+ {
135
+ name: 'title',
136
+ title: '@general:terms.common.title',
137
+ groupId: 'basic-info',
138
+ schema: {
139
+ dataType: 'string',
140
+ interface: { type: AXPWidgetsCatalog.text },
141
+ },
142
+ validations: [{ rule: 'required' }],
143
+ options: LIST_FILTER_SORT,
144
+ },
145
+ {
146
+ name: 'version',
147
+ title: moduleFieldTitle(i18n, 'version'),
148
+ groupId: 'basic-info',
149
+ schema: {
150
+ dataType: 'string',
151
+ defaultValue: '1.0.0',
152
+ interface: { type: AXPWidgetsCatalog.text },
153
+ },
154
+ validations: [{ rule: 'required' }],
155
+ options: LIST_FILTER_SORT,
156
+ },
157
+ {
158
+ name: 'type',
159
+ title: moduleFieldTitle(i18n, 'type'),
160
+ groupId: 'basic-info',
161
+ schema: {
162
+ dataType: 'string',
163
+ defaultValue: AXP_MODULE_TYPE.domain,
164
+ interface: {
165
+ type: AXPWidgetsCatalog.select,
166
+ options: {
167
+ valueField: 'value',
168
+ textField: 'text',
169
+ dataSource: [
170
+ { value: AXP_MODULE_TYPE.platform, text: moduleTypeOption(i18n, 'platform') },
171
+ { value: AXP_MODULE_TYPE.domain, text: moduleTypeOption(i18n, 'domain') },
172
+ { value: AXP_MODULE_TYPE.integration, text: moduleTypeOption(i18n, 'integration') },
173
+ ],
174
+ },
175
+ },
176
+ },
177
+ validations: [{ rule: 'required' }],
178
+ options: LIST_FILTER_SORT,
179
+ },
180
+ {
181
+ name: 'domain',
182
+ title: moduleFieldTitle(i18n, 'domain'),
183
+ groupId: 'basic-info',
184
+ schema: {
185
+ dataType: 'string',
186
+ defaultValue: AXP_MODULE_DOMAIN.general,
187
+ interface: {
188
+ type: AXPWidgetsCatalog.select,
189
+ options: {
190
+ valueField: 'value',
191
+ textField: 'text',
192
+ dataSource: Object.values(AXP_MODULE_DOMAIN).map((value) => ({
193
+ value,
194
+ text: moduleDomainOption(i18n, value),
195
+ })),
196
+ },
197
+ },
198
+ },
199
+ options: LIST_FILTER_SORT,
200
+ },
201
+ {
202
+ name: 'icon',
203
+ title: moduleFieldTitle(i18n, 'icon'),
204
+ groupId: 'basic-info',
205
+ schema: {
206
+ dataType: 'string',
207
+ interface: { type: AXPWidgetsCatalog.iconChooser },
208
+ },
209
+ },
210
+ {
211
+ name: 'i18n',
212
+ title: moduleFieldTitle(i18n, 'i18n'),
213
+ groupId: 'basic-info',
214
+ schema: {
215
+ dataType: 'string',
216
+ interface: { type: AXPWidgetsCatalog.text },
217
+ },
218
+ },
219
+ {
220
+ name: 'required',
221
+ title: moduleFieldTitle(i18n, 'required'),
222
+ groupId: 'basic-info',
223
+ schema: {
224
+ dataType: 'boolean',
225
+ defaultValue: false,
226
+ interface: { type: AXPWidgetsCatalog.toggle },
227
+ },
228
+ options: LIST_FILTER_SORT,
229
+ },
230
+ {
231
+ name: 'description',
232
+ title: '@general:terms.common.description',
233
+ groupId: 'basic-info',
234
+ schema: {
235
+ dataType: 'string',
236
+ interface: { type: AXPWidgetsCatalog.largeText, options: { rows: 3 } },
237
+ },
238
+ },
239
+ {
240
+ name: 'dependencies',
241
+ title: moduleFieldTitle(i18n, 'dependencies'),
242
+ groupId: 'basic-info',
243
+ schema: {
244
+ dataType: 'array',
245
+ defaultValue: [],
246
+ interface: {
247
+ type: AXPWidgetsCatalog.lookup,
248
+ options: {
249
+ entity: `${RootConfig.module.name}.${RootConfig.entities.moduleDefinition.name}`,
250
+ textField: 'title',
251
+ valueField: 'name',
252
+ look: 'select',
253
+ multiple: true,
254
+ allowSearch: true,
255
+ columns: ['title', 'name'],
256
+ },
257
+ },
258
+ },
259
+ },
260
+ ],
261
+ columns: [
262
+ { name: 'title', title: '@general:terms.common.title', showAs: { type: AXPWidgetsCatalog.text } },
263
+ { name: 'name', title: '@general:terms.common.name', showAs: { type: AXPWidgetsCatalog.text } },
264
+ { name: 'icon', title: moduleFieldTitle(i18n, 'icon'), showAs: { type: AXPWidgetsCatalog.iconChooser } },
265
+ { name: 'type', title: moduleFieldTitle(i18n, 'type') },
266
+ { name: 'domain', title: moduleFieldTitle(i18n, 'domain') },
267
+ { name: 'version', title: moduleFieldTitle(i18n, 'version') },
268
+ ],
269
+ interfaces: {
270
+ master: {
271
+ list: {
272
+ views: [createAllQueryView({ sorts: [{ name: 'name', dir: 'asc' }] })],
273
+ actions: [
274
+ entityMasterCreateAction(),
275
+ entityMasterViewAction(),
276
+ ...moduleDefinitionRecordActions(),
277
+ ],
278
+ },
279
+ create: {
280
+ sections,
281
+ properties: propertyLayouts,
282
+ },
283
+ single: {
284
+ title: '{{ title || name }}',
285
+ sections,
286
+ properties: propertyLayouts,
287
+ actions: [...moduleDefinitionRecordActions()],
288
+ },
289
+ },
290
+ },
291
+ };
292
+ }
293
+ async function moduleDefinitionEntityFactory() {
294
+ return buildModuleDefinitionEntity();
295
+ }
296
+ //#endregion
297
+
298
+ export { buildModuleDefinitionEntity, moduleDefinitionEntityFactory };
299
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-Cknl0vbc.mjs.map