@acorex/platform 21.0.0-next.92 → 21.0.0-next.93

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 (58) hide show
  1. package/fesm2022/acorex-platform-common.mjs +9 -4
  2. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  3. package/fesm2022/acorex-platform-contracts.mjs +12 -1
  4. package/fesm2022/acorex-platform-contracts.mjs.map +1 -1
  5. package/fesm2022/acorex-platform-core.mjs +2 -16
  6. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-domain-contracts.mjs +0 -1
  8. package/fesm2022/acorex-platform-domain-contracts.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  10. package/fesm2022/acorex-platform-layout-builder.mjs +4 -4
  11. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  12. package/fesm2022/acorex-platform-layout-components.mjs +4 -3
  13. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  14. package/fesm2022/acorex-platform-layout-designer.mjs +4 -3
  15. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  16. package/fesm2022/acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-layout-entity-contracts.mjs.map +1 -1
  18. package/fesm2022/acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-layout-entity.mjs +24 -4
  20. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  21. package/fesm2022/acorex-platform-layout-views.mjs +5 -4
  22. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  23. package/fesm2022/acorex-platform-layout-widget-core-contracts.mjs +141 -0
  24. package/fesm2022/acorex-platform-layout-widget-core-contracts.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-layout-widget-core.mjs +5 -132
  26. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  27. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-BvFykMTH.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DIDziLAT.mjs} +2 -2
  28. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DIDziLAT.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-layout-widgets.mjs +13 -440
  30. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  31. package/fesm2022/acorex-platform-runtime-contracts.mjs +166 -0
  32. package/fesm2022/acorex-platform-runtime-contracts.mjs.map +1 -0
  33. package/fesm2022/acorex-platform-runtime.mjs +1 -163
  34. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  35. package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs → acorex-platform-themes-default-entity-master-modify-view.component-BP2dVnBQ.mjs} +3 -2
  36. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BP2dVnBQ.mjs.map +1 -0
  37. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DrUwqKKA.mjs.map +1 -1
  38. package/fesm2022/acorex-platform-themes-default.mjs +4 -3
  39. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  40. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  41. package/package.json +14 -6
  42. package/types/acorex-platform-common.d.ts +15 -5
  43. package/types/acorex-platform-contracts.d.ts +106 -4
  44. package/types/acorex-platform-core.d.ts +4 -101
  45. package/types/acorex-platform-layout-builder.d.ts +3 -3
  46. package/types/acorex-platform-layout-components.d.ts +4 -3
  47. package/types/acorex-platform-layout-designer.d.ts +2 -1
  48. package/types/acorex-platform-layout-entity-contracts.d.ts +2 -3
  49. package/types/acorex-platform-layout-entity.d.ts +12 -10
  50. package/types/acorex-platform-layout-views.d.ts +10 -9
  51. package/types/acorex-platform-layout-widget-core-contracts.d.ts +299 -0
  52. package/types/acorex-platform-layout-widget-core.d.ts +9 -301
  53. package/types/acorex-platform-layout-widgets.d.ts +55 -80
  54. package/types/acorex-platform-runtime-contracts.d.ts +275 -0
  55. package/types/acorex-platform-runtime.d.ts +4 -274
  56. package/types/acorex-platform-themes-default.d.ts +3 -3
  57. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-BvFykMTH.mjs.map +0 -1
  58. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-layout-entity-contracts.mjs","sources":["../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-action.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-property.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-definition.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-model.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-storage.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-formats.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-property-list.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-display-field.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-card-field.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-query-view.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-master-list.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-detail-list.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-layout-view.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-related-layout.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-list-filter.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/lookup-widget.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/index.ts","../../../../libs/platform/layout/entity-contracts/src/lib/helpers/entity-action.helpers.ts","../../../../libs/platform/layout/entity-contracts/src/lib/helpers/index.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-display-template.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-property-display-path.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-search-title-context.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-quick-search-paths.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-merge-detail-list-properties.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-list-filter-definitions.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-list-sortable-fields.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-workflow-record.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/lookup-create-options.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/index.ts","../../../../libs/platform/layout/entity-contracts/src/lib/constants/entity-display.constants.ts","../../../../libs/platform/layout/entity-contracts/src/lib/constants/entity-datasource.keys.ts","../../../../libs/platform/layout/entity-contracts/src/lib/constants/entity-events.keys.ts","../../../../libs/platform/layout/entity-contracts/src/lib/constants/index.ts","../../../../libs/platform/layout/entity-contracts/src/lib/index.ts","../../../../libs/platform/layout/entity-contracts/src/acorex-platform-layout-entity-contracts.ts"],"sourcesContent":["//#region ---- Entity actions ----\n\nimport {\n type AXPMetaData,\n AXPSystemActionType,\n} from '@acorex/platform/contracts';\nimport type { AXPopupSizeType, AXStyleColorType } from '@acorex/platform/contracts';\n\nexport enum AXPEntityCommandScope {\n TypeLevel = 'typeLevel',\n Selected = 'selected',\n Individual = 'individual',\n Section = 'section',\n}\n\nexport enum AXPEntityQueryType {\n Single = 'single',\n List = 'list',\n}\n\nexport interface AXPEntityCommand {\n execute: string | Function; // As runnable expression\n permissions?: string[];\n}\n\nexport interface AXPEntityQuery {\n execute: string | Function; // As runnable expression\n type: AXPEntityQueryType;\n}\n\nexport type AXPCommandActionType = AXPSystemActionType;\n\nexport interface AXPCommandActionLook {\n color: AXStyleColorType;\n icon: string;\n}\n\nexport type AXPCommandActionPriority = 'primary' | 'secondary';\n\n//TODO: remove extra props\nexport type AXPCommandActionCallback =\n | string\n | {\n name: string;\n options?: {\n decoration?: {\n header?: {\n title?: string;\n };\n };\n process?: {\n data?: any;\n [name: string]: any;\n };\n layout?: {\n size?: AXPopupSizeType;\n };\n [name: string]: any;\n };\n metadata?: AXPMetaData;\n };\n\nexport interface AXPCommandActionDisplay extends Partial<AXPCommandActionLook> {\n name?: string;\n command: AXPCommandActionCallback;\n title: string;\n type: AXPSystemActionType | string;\n priority: 'primary' | 'secondary' | 'none';\n separated?: boolean;\n permissions?: string[];\n hidden?: boolean | string;\n disabled?: boolean | string;\n default?: boolean;\n order?: number;\n /**\n * Keyboard chords for this action (e.g. `'ctrl+shift+a'`).\n * Pass `[]` to disable shortcuts. When omitted, platform defaults may apply for known commands.\n */\n shortcuts?: string[];\n}\n\nexport interface AXPEntityAction extends AXPCommandActionDisplay {\n scope: AXPEntityCommandScope;\n /** Child actions for dropdown submenu */\n items?: AXPEntityAction[];\n}\n\n//#endregion\n","//#region ---- Entity properties ----\n\nimport type {\n AXPExpression,\n AXPGridLayoutOptions,\n AXPValidationRules,\n AXPValueTransformerFunctions,\n} from '@acorex/platform/contracts';\n\nimport type { AXPEntityPropertyListOptions } from './entity-property-list.types';\n\nexport interface AXEntityPropertyWidget {\n type: string;\n path?: string;\n id?: string;\n children?: AXEntityPropertyWidget[];\n mode: 'view' | 'edit';\n options?: Record<string, any>;\n triggers?: { event: string; action: string; disabled?: boolean }[];\n valueTransforms?: AXPValueTransformerFunctions;\n}\n\nexport interface AXPEntityPropertyLayoutConfig extends AXPGridLayoutOptions {\n label?: {\n visible?: boolean;\n };\n order?: number;\n visible?: boolean | AXPExpression;\n}\n\nexport interface AXPEntityPropertyGroup {\n id: string;\n title: string;\n description?: string;\n permissions?: string[];\n icon?: string;\n}\n\nexport interface AXPEntityPropertyView {\n name: string;\n dataPath?: string;\n permissions?: string[];\n layout?: AXPEntityPropertyLayoutConfig;\n}\n\nexport interface AXPEntityPropertyUpdateView extends AXPEntityPropertyView {}\n\nexport interface AXPEntityPropertyCreateView extends AXPEntityPropertyView {\n defaultValue?: any;\n}\n\nexport interface AXPEntitySectionView {\n id: string;\n order?: number;\n collapsed?: boolean;\n layout?: AXPEntityPropertyLayoutConfig;\n}\n\nexport interface AXPEntityProperty {\n name: string;\n title: string;\n description?: string;\n groupId?: string;\n schema: {\n dataType: string;\n nullable?: boolean;\n readonly?: boolean | string;\n visible?: boolean | string;\n defaultValue?: any | string | ((context: any | null) => any);\n unique?: {\n enabled: boolean;\n };\n interface?: Partial<AXEntityPropertyWidget>;\n };\n options?: AXPEntityPropertyListOptions;\n validations?: AXPValidationRules;\n}\n\n//#endregion\n","//#region ---- Entity definition ----\n\nimport type {\n AXPExpression,\n AXPOptionsData,\n AXPValidationRules,\n AXPMultiLanguageString,\n} from '@acorex/platform/contracts';\n\nimport type { AXPEntityDetailListView } from './entity-detail-list.types';\nimport type { AXPEntityFormats } from './entity-formats.types';\nimport type { AXPEntityTableColumn } from './entity-display-field.types';\nimport type {\n AXPEntityMasterCreateLayoutView,\n AXPEntityMasterSingleLayoutView,\n AXPEntityMasterUpdateLayoutView,\n} from './entity-layout-view.types';\nimport type { AXPEntityMasterListView } from './entity-master-list.types';\nimport type { AXPRelatedEntity } from './entity-related-layout.types';\nimport type { AXPQueryFilter } from './entity-query-view.types';\nimport type { AXPEntityCommand, AXPEntityQuery } from './entity-action.types';\nimport type { AXPEntityProperty, AXPEntityPropertyGroup } from './entity-property.types';\n\nexport enum AXPRelationshipKind {\n Association,\n Composition,\n Aggregation,\n}\n\nexport enum AXPRelationshipCardinality {\n OneToOne,\n OneToMany,\n ManyToMany,\n}\n\nexport interface AXPRelationship {\n id: string;\n from: string;\n to: string;\n kind: AXPRelationshipKind;\n cardinality: AXPRelationshipCardinality;\n}\n\nexport interface AXPEntity {\n plugins?: { name: string; options?: AXPOptionsData }[];\n /**\n * High-level rules: when expression evaluates true, apply actions to the given targets\n * (property/section/action). Reduces repetition of the same condition across many properties.\n * Evaluation context: form data, user, entity; precedence vs property-level visible/readonly\n * must be defined where rules are applied.\n */\n rules?: Array<{\n name: string;\n expression: AXPExpression;\n actions: Array<{\n target: {\n type: 'property' | 'section' | 'action';\n name: string;\n };\n values: AXPOptionsData;\n }>;\n }>;\n module: string;\n name: string;\n icon?: string;\n parentKey?: string;\n category?: AXPEntityCategoryPlugin;\n title: string;\n formats: AXPEntityFormats;\n relatedEntities?: AXPRelatedEntity[];\n pages?: AXPEntityPage[];\n groups?: AXPEntityPropertyGroup[];\n properties: AXPEntityProperty[];\n columns?: AXPEntityTableColumn[];\n commands?: {\n create?: AXPEntityCommand | undefined;\n update?: AXPEntityCommand | undefined;\n delete?: AXPEntityCommand | undefined;\n [name: string]: AXPEntityCommand | undefined;\n };\n queries?: {\n byKey?: AXPEntityQuery;\n list?: AXPEntityQuery;\n lookup?: AXPEntityQuery;\n history?: AXPEntityQuery;\n comments?: AXPEntityQuery;\n [name: string]: AXPEntityQuery | undefined;\n };\n validations?: AXPValidationRules;\n interfaces?: {\n master?: {\n single?: AXPEntityMasterSingleLayoutView;\n list?: AXPEntityMasterListView;\n create?: AXPEntityMasterCreateLayoutView;\n update?: AXPEntityMasterUpdateLayoutView;\n };\n detail?: {\n list?: AXPEntityDetailListView;\n };\n };\n}\n\nfunction kebabCase(value: string): string {\n return value\n .replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n .replace(/([A-Z])([A-Z][a-z])/g, '$1-$2')\n .replace(/[\\s_]+/g, '-')\n .replace(/-+/g, '-')\n .toLowerCase();\n}\n\nexport function getEntityInfo(entity: AXPEntity) {\n return {\n source: `${entity.module}.${entity.name}`,\n module: {\n route: kebabCase(entity.module),\n },\n entity: {\n route: kebabCase(entity.name),\n },\n };\n}\n\nexport interface AXPEntityPage {\n componentKey: string;\n field?: string;\n title?: AXPMultiLanguageString;\n icon?: string;\n description?: AXPMultiLanguageString;\n layout?: {\n order?: number;\n position?: 'before' | 'after' | 'middle';\n };\n hidden?: boolean | string;\n permissions?: string[];\n appearOn?: {\n create?: boolean;\n update?: boolean;\n };\n options?: Record<string, any>;\n}\n\nexport interface AXPEntityCategoryPlugin {\n entity: string;\n title?: string;\n textField?: string;\n valueField?: string;\n conditions?: AXPQueryFilter[];\n applyConditions?: AXPQueryFilter[];\n}\n\nexport interface AXPEntityVersionHistory {\n enabled?: boolean;\n showInList?: boolean;\n showInDetail?: boolean;\n}\n\nexport interface AXPAggregate {\n id: string;\n name: string;\n title: AXPMultiLanguageString;\n entities: AXPEntity[];\n}\n\nexport interface AXPModule {\n name: string;\n title: AXPMultiLanguageString;\n aggregates: AXPAggregate[];\n relationships?: AXPRelationship[];\n}\n\nexport interface AXPApplication {\n name: string;\n title: AXPMultiLanguageString;\n modules: AXPModule[];\n}\n\nexport enum AXPEntityType {\n Entity,\n AggregateRoot,\n ValueObject,\n}\n\nexport interface AXPEntityV2 {\n version: 2;\n module: string;\n aggregate: string;\n name: string;\n type: AXPEntityType;\n icon?: string;\n title: string;\n description?: string;\n plugins?: { name: string; options?: AXPOptionsData }[];\n pages?: AXPEntityPage[];\n groups?: AXPEntityPropertyGroup[];\n properties: AXPEntityProperty[];\n formats: AXPEntityFormats;\n columns?: AXPEntityTableColumn[];\n validations?: AXPValidationRules;\n interfaces?: {\n master?: {\n single?: AXPEntityMasterSingleLayoutView;\n list?: AXPEntityMasterListView;\n create?: AXPEntityMasterCreateLayoutView;\n update?: AXPEntityMasterUpdateLayoutView;\n };\n detail?: {\n list?: AXPEntityDetailListView;\n };\n };\n}\n\n//#endregion\n","//#region ---- Entity model & DTO types ----\n\nimport type { AXPUserReference } from '@acorex/platform/contracts';\n\nexport interface AXPAuditEvent {\n at?: Date;\n by?: AXPUserReference;\n reason?: string;\n source?: string;\n}\n\nexport interface AXPRecordAuditInfo {\n created?: AXPAuditEvent;\n updated?: AXPAuditEvent;\n deleted?: AXPAuditEvent;\n}\n\nexport interface AXPRecordStateInfo {\n isHidden?: boolean;\n isSystem?: boolean;\n isImmutable?: boolean;\n /** @deprecated Prefer explicit domain modeling over this flag. */\n isDistributed?: boolean;\n}\n\nexport interface AXPRecordOwnershipInfo {\n tenantId?: string;\n applicationId?: string;\n userId?: string;\n}\n\nexport interface AXPRecordWorkflowInfo {\n instanceId?: string | null;\n definitionId?: string | null;\n correlationId?: string | null;\n pinnedVersion?: number | null;\n}\n\nexport interface AXPEntityModel<Id> {\n id: Id;\n auditInfo?: AXPRecordAuditInfo;\n stateInfo?: AXPRecordStateInfo;\n ownershipInfo?: AXPRecordOwnershipInfo;\n workflowInfo?: AXPRecordWorkflowInfo;\n}\n\nexport interface AXPEntityCreateDto {}\n\nexport interface AXPEntityUpdateDto<Id> {\n id: Id;\n}\n\nexport interface AXPEntityOutputDto<Id> {\n id: Id;\n}\n\nexport interface AXPEntityDetailDto<Id> extends AXPEntityOutputDto<Id> {}\n\nexport interface AXPEntityListItemDto<Id> extends AXPEntityOutputDto<Id> {}\n\nexport interface AXPMockDto<Id> extends AXPEntityModel<Id> {}\n\n//#endregion\n","import type { AXPQueryRequest } from '@acorex/platform/core';\n\n//#region ---- Aggregate ----\n\nexport type AXPEntityAggregateReducerType = 'count' | 'sum' | 'min' | 'max' | 'avg';\n\nexport interface AXPEntityAggregateMeasure {\n reducer: AXPEntityAggregateReducerType;\n /** Required for sum, min, max, and avg. Ignored for count (rows per group). */\n field?: string;\n /** Result column name; defaults are derived from the reducer and field. */\n alias?: string;\n}\n\n/**\n * Aggregate stored rows after the same filter/sort pipeline as {@link AXPQueryRequest}.\n * Group keys use dotted field paths (same as lodash-style getters).\n */\nexport interface AXPEntityAggregateRequest extends Pick<AXPQueryRequest, 'filter' | 'sort'> {\n groupBy: string[];\n measures: AXPEntityAggregateMeasure[];\n}\n\nexport interface AXPEntityAggregateResult {\n rows: Record<string, unknown>[];\n}\n\n//#endregion\n\n//#region ---- Query all ----\n\nexport interface AXPEntityQueryAllOptions {\n /**\n * Page size for backends that read page-by-page (HTTP API).\n * In-memory backends load the filtered set once and ignore this.\n */\n pageSize?: number;\n /** Maximum rows to return or scan (safety cap). */\n maxRows?: number;\n}\n\nexport interface AXPEntityQueryAllResult<T> {\n items: T[];\n /** Row count matching filter/sort before applying maxRows. */\n total: number;\n /** True when maxRows prevented returning every matching row. */\n truncated: boolean;\n}\n\n//#endregion\n\n//#region ---- Aggregate scan cap ----\n\nexport interface AXPEntityAggregateOptions {\n /** Maximum rows to load for aggregation when the backend pages remotely (default 50_000). */\n maxRows?: number;\n /** Page size for remote paging during aggregate (default 500). */\n pageSize?: number;\n}\n\n//#endregion\n","//#region ---- Entity formats ----\n\nexport interface AXPEntitySearchResultFormat {\n title: string;\n description?: string;\n}\n\nexport interface AXPEntityFormats {\n individual: string;\n plural: string;\n lookup?: string;\n displayName?: string;\n searchResult?: AXPEntitySearchResultFormat;\n}\n\n//#endregion\n","//#region ---- Entity property list options ----\n\nexport interface AXPEntityPropertyFilterOptions {\n advance?: {\n enabled?: boolean;\n widgetType?: string;\n };\n inline?: {\n enabled?: boolean;\n };\n preload?: {\n enabled?: boolean;\n required?: boolean;\n };\n}\n\nexport interface AXPEntityPropertySortOptions {\n enabled?: boolean;\n}\n\nexport interface AXPEntityPropertyListOptions {\n filter?: AXPEntityPropertyFilterOptions;\n sort?: AXPEntityPropertySortOptions;\n}\n\n//#endregion\n","//#region ---- Entity display fields ----\n\n/** Logical alignment for table column header/cell (respects RTL). */\nexport type AXPColumnContentAlign = 'start' | 'center' | 'end';\n\n/**\n * Column alignment: shorthand applies to both header and cell;\n * object form sets each side independently (omitted keys default to start).\n */\nexport type AXPColumnAlign =\n | AXPColumnContentAlign\n | {\n header?: AXPColumnContentAlign;\n cell?: AXPColumnContentAlign;\n };\n\n/** Shared field definition for list layouts (table columns, card fields, etc.). */\nexport interface AXPEntityDisplayField {\n name: string;\n title?: string;\n showAs?: {\n type: string;\n options?: Record<string, any>;\n };\n options?: {\n /** When string, evaluate against parent detail context (e.g. related list). */\n visible?: boolean | string;\n /** Optional dataPath override for field binding. */\n dataPath?: string;\n [name: string]: any;\n };\n}\n\nexport interface AXPEntityTableColumn extends AXPEntityDisplayField {\n options?: AXPEntityDisplayField['options'] & {\n /** Initial column width (overrides widget column width when set). */\n width?: string;\n /** Header/cell alignment (shorthand or per-side). */\n align?: AXPColumnAlign;\n };\n}\n\n//#endregion\n","//#region ---- Entity card fields ----\n\nimport type { AXPExpression } from '@acorex/platform/contracts';\nimport type { AXStyleColorType } from '@acorex/platform/contracts';\n\nimport type { AXPEntityPropertyLayoutConfig } from './entity-property.types';\n\nimport type { AXPEntityDisplayField } from './entity-display-field.types';\n\n/** Card layout field presentation in master list card view. */\nexport type AXPCardFieldDisplay = 'simple' | 'badge';\n\n/** Badge color: semantic token or per-row expression (`{{ context.eval(...) }}`). */\nexport type AXPCardBadgeColor = AXStyleColorType | AXPExpression;\n\nexport interface AXPCardBadgeDisplayOptions {\n /** Semantic color or expression evaluated against row context. */\n color?: AXPCardBadgeColor;\n}\n\nexport interface AXPCardBadgeDisplay {\n type: 'badge';\n options?: AXPCardBadgeDisplayOptions;\n}\n\n/** Shorthand (`badge` / `simple`) or structured badge config with optional per-row color. */\nexport type AXPCardFieldDisplayConfig = AXPCardFieldDisplay | AXPCardBadgeDisplay;\n\n/** Card layout field in master list view. */\nexport type AXPCardField = AXPEntityDisplayField & {\n layout?: AXPEntityPropertyLayoutConfig;\n /**\n * Field presentation. Default: `simple` (card body).\n * Use `badge` or `{ type: 'badge', options: { color } }` for header chips beside title.\n */\n display?: AXPCardFieldDisplayConfig;\n /**\n * Badge color when presentation is badge-shaped.\n * Prefer `display: { type: 'badge', options: { color } }` for new definitions.\n * Omit for status fields — color is resolved from the status definition per row.\n */\n badgeColor?: AXPCardBadgeColor;\n};\n\n/** Whether the card field is shown as a header badge (not in the card body). */\nexport function isCardFieldBadgeDisplay(\n display: AXPCardFieldDisplayConfig | undefined,\n): display is 'badge' | AXPCardBadgeDisplay {\n if (display === 'badge') {\n return true;\n }\n return typeof display === 'object' && display !== null && display.type === 'badge';\n}\n\n/** Resolves static badge color config from {@link AXPCardField.display} and legacy {@link AXPCardField.badgeColor}. */\nexport function resolveCardFieldBadgeColor(\n field: Pick<AXPCardField, 'display' | 'badgeColor'>,\n): AXPCardBadgeColor | undefined {\n if (typeof field.display === 'object' && field.display.type === 'badge') {\n return field.display.options?.color ?? field.badgeColor;\n }\n if (field.display === 'badge') {\n return field.badgeColor;\n }\n return undefined;\n}\n\n//#endregion\n","//#region ---- Entity query views ----\n\nimport type { AXDataSourceOperator } from '@acorex/platform/contracts';\n\nexport interface AXPQueryFilter {\n name: string; // entity property name\n operator: AXDataSourceOperator;\n value: any;\n}\n\nexport interface AXPQuerySort {\n name: string; // entity property name\n dir: 'asc' | 'desc';\n}\n\nexport interface AXPQueryView {\n name: string;\n fixed: boolean;\n title: string;\n columns: string[];\n conditions: AXPQueryFilter[];\n sorts: AXPQuerySort[];\n indexCol?: boolean;\n pageSize?: number;\n visible?: boolean;\n}\n\nexport function createQueryView(\n name: string,\n title: string,\n fixed: boolean,\n params: { columns?: string[]; conditions?: any[]; sorts?: AXPQuerySort[] } = {\n columns: [],\n conditions: [],\n sorts: [],\n },\n): AXPQueryView {\n params = Object.assign({ columns: [], sorts: [], conditions: [] }, params);\n return {\n name,\n title,\n fixed,\n columns: params.columns ?? [],\n conditions: params.conditions ?? [],\n sorts: params.sorts ?? [],\n };\n}\n\nexport function createAllQueryView(\n params: { columns?: string[]; conditions?: AXPQueryFilter[]; sorts?: AXPQuerySort[] } | undefined = {\n columns: [],\n sorts: [],\n conditions: [],\n },\n): AXPQueryView {\n params = Object.assign({ columns: [], sorts: [], conditions: [] }, params);\n return createQueryView('all', '@general:terms.interface.selection.all-items', true, {\n columns: params.columns ?? [],\n conditions: params.conditions ?? [],\n sorts: params.sorts ?? [],\n });\n}\n\n//#endregion\n","//#region ---- Entity master list views ----\n\nimport type { AXPEntityAction } from './entity-action.types';\n\nimport { AXPExpression } from '@acorex/platform/contracts';\nimport type { AXPCardField } from './entity-card-field.types';\nimport type { AXPEntityTableColumn } from './entity-display-field.types';\nimport type { AXPQueryView } from './entity-query-view.types';\n\nexport interface AXPEntityMasterListView {\n title?: string;\n description?: string;\n actions?: AXPEntityAction[];\n views: AXPQueryView[];\n layouts?: {\n table?: {\n enabled?: boolean;\n columns: AXPEntityTableColumn[];\n cssClass?: {\n row?: AXPExpression;\n cell?: AXPExpression;\n };\n };\n card?: {\n enabled?: boolean;\n header: {\n /** Property path, expression (`{{ ... }}`), or literal — evaluated per row. */\n title?: string;\n description?: string;\n icon?: string;\n };\n fields: AXPCardField[];\n };\n };\n}\n\nexport type AXPEntityMasterListLayoutType = 'table' | 'card';\n\n/** Master list presentation: table or card with compact (collapsed) / expanded bodies. */\nexport type AXPEntityMasterListDisplayMode = 'table' | 'card-compact' | 'card-expanded';\n\nexport interface AXPEntityMasterListLayoutOption {\n id: AXPEntityMasterListLayoutType;\n title: string;\n icon?: string;\n}\n\n/** Resolves master list layouts that are currently enabled. */\nexport function resolveEnabledMasterListLayouts(\n layouts?: AXPEntityMasterListView['layouts'],\n): AXPEntityMasterListLayoutType[] {\n if (!layouts) {\n return ['table'];\n }\n\n const enabled: AXPEntityMasterListLayoutType[] = [];\n\n if (layouts.table?.enabled !== false) {\n enabled.push('table');\n }\n\n if (layouts.card && layouts.card.enabled !== false) {\n enabled.push('card');\n }\n\n return enabled.length > 0 ? enabled : ['table'];\n}\n\n/** First enabled layout; used as the default when no user preference is stored. */\nexport function resolveDefaultMasterListLayout(\n layouts?: AXPEntityMasterListView['layouts'],\n): AXPEntityMasterListLayoutType {\n return resolveEnabledMasterListLayouts(layouts)[0];\n}\n\n//#endregion\n","//#region ---- Entity detail list views ----\n\nimport type { AXPEntityAction } from './entity-action.types';\n\nimport type { AXPEntityTableColumn } from './entity-display-field.types';\n\nexport interface AXPEntityDetailListView {\n title?: string;\n description?: string;\n columns: AXPEntityTableColumn[];\n actions?: AXPEntityAction[];\n}\n\n//#endregion\n","//#region ---- Entity layout views ----\n\nimport type { AXPEntityAction } from './entity-action.types';\nimport type {\n AXPEntityPropertyLayoutConfig,\n AXPEntityPropertyView,\n AXPEntitySectionView,\n} from './entity-property.types';\nimport type { AXPopupSizeType } from '@acorex/platform/contracts';\n\nexport interface AXPEntityMasterLayoutView {\n title?: string;\n sections: AXPEntitySectionView[];\n properties?: AXPEntityPropertyView[];\n}\n\n/** Quick create config for lookup widgets (+ button) - uses subset of create form */\nexport interface AXPEntityQuickCreate {\n enabled?: boolean;\n properties?: string[];\n layout?: {\n size?: AXPopupSizeType;\n };\n excludeProperties?: string[];\n}\n\nexport interface AXPEntityMasterCreateLayoutView extends AXPEntityMasterLayoutView {\n steps?: {\n id: string;\n title: string;\n description?: string;\n };\n /** Quick create config for lookup widgets - uses subset of create form */\n quickCreate?: AXPEntityQuickCreate;\n}\n\nexport interface AXPEntityMasterUpdateLayoutView extends AXPEntityMasterLayoutView {}\n\nexport interface AXPEntityMasterSingleLayoutView extends AXPEntityMasterLayoutView {\n title: string;\n description?: string;\n actions?: AXPEntityAction[];\n}\n\n//#endregion\n","//#region ---- Related entity layout ----\n\nimport type { AXPExpression } from '@acorex/platform/contracts';\nimport type { AXPEntityAction } from './entity-action.types';\n\nimport type { AXPEntityTableColumn } from './entity-display-field.types';\nimport type { AXPEntityListFilterDefinition } from './entity-list-filter.types';\nimport type { AXPQueryFilter } from './entity-query-view.types';\n\nexport interface AXPRelatedEntityLayout {\n type: 'tab-detail' | 'tab-list' | 'page-detail' | 'page-list' | 'merge-detail';\n order?: number;\n position?: 'before' | 'after' | 'middle';\n}\n\nexport interface AXPRelatedEntityPersistence {\n strategy?: 'embedded' | 'referenced';\n idField?: string;\n dataPath?: string;\n map?: Record<string, string>;\n hydrate?: 'eager' | 'lazy';\n cascade?: { delete?: 'none' | 'orphans' | 'all' };\n foreignKeyField?: string;\n}\n\nexport interface AXPRelatedEntity {\n entity: string;\n title?: string;\n icon?: string;\n columns?: string[] | AXPEntityTableColumn[];\n properties?: string[];\n excludeProperties?: string[];\n layout?: AXPRelatedEntityLayout;\n conditions?: AXPQueryFilter[];\n customFilterDefinitions?: Partial<AXPEntityListFilterDefinition>[];\n hidden?: boolean | AXPExpression;\n actions?: AXPEntityAction[];\n /**\n * Controls inclusion on the host entity master **create** / **update** form.\n * Defaults depend on layout:\n * - **merge-detail**: omitted flags behave as **true** (opt-out with `false`).\n * - **tab-list** / **page-list**: omitted flags behave as **false** (opt-in with `true`).\n */\n appearOn?: {\n /** Include on host create form (see defaults above per layout type). */\n create?: boolean;\n /** Include on host update form (see defaults above per layout type). */\n update?: boolean;\n };\n /**\n * Host master-list filter policy for merge-detail related data.\n * When omitted, filterable related properties referenced by host columns (or `properties`) are included.\n */\n filter?: {\n /** Include related filterable properties on the host list (default: true). */\n enabled?: boolean;\n };\n /**\n * Relationship-level persistence strategy for merge-detail data.\n * Defaults:\n * - strategy: 'embedded'\n * - idField: last segment of dataPath + 'Id' (or 'relatedId' when dataPath is missing)\n * - map: undefined (pass-through)\n * - hydrate: 'eager' (applies to getOne only in mock)\n * - cascade.delete: 'none'\n */\n persistence?: AXPRelatedEntityPersistence;\n}\n\n//#endregion\n","//#region ---- Entity list filters ----\n\nimport type { AXPFilterDefinition } from '@acorex/platform/contracts';\n\nexport interface AXPEntityListFilterDefinition extends AXPFilterDefinition {\n /**\n * Lodash-get path for inline `contains` queries on lookup/select properties.\n * Keeps `field` as the property name for advance filters and filter widget binding.\n */\n inlineQueryField?: string;\n /**\n * Flat filter UI context key when `field` contains dots (merge-detail paths).\n * Widget binding uses this key; storage queries still use `field`.\n */\n contextField?: string;\n}\n\n/** Encodes a dotted storage path as a flat filter context key (e.g. `person.lastName` → `person__lastName`). */\nexport function encodeEntityListFilterContextField(queryField: string): string {\n return queryField.replace(/\\./g, '__');\n}\n\n/**\n * Resolves the flat context key used by query-filters / widget binding for a filter definition.\n */\nexport function resolveEntityListFilterContextField(\n filter: Pick<AXPEntityListFilterDefinition, 'field' | 'contextField'>,\n): string {\n const explicit = filter.contextField?.trim();\n if (explicit) {\n return explicit;\n }\n\n const field = filter.field?.trim();\n if (!field) {\n return '';\n }\n\n return field.includes('.') ? encodeEntityListFilterContextField(field) : field;\n}\n\n/**\n * Maps an entity list filter definition to the storage query field.\n * Inline `contains` filters on lookup/select use `inlineQueryField` (display text path).\n */\nexport function resolveEntityListFilterQueryField(\n filter: Pick<AXPFilterDefinition, 'field' | 'operator'> & Pick<AXPEntityListFilterDefinition, 'inlineQueryField'>,\n operator?: { type?: string },\n): string | undefined {\n const operatorType = operator?.type ?? filter.operator?.type;\n if (operatorType === 'contains' && filter.inlineQueryField) {\n return filter.inlineQueryField;\n }\n return filter.field;\n}\n\n//#endregion\n","import type { AXPContextData, AXPExpression } from '@acorex/platform/contracts';\n\n//#region ---- Lookup widget types ----\n\nexport interface AXPLookupWidgetCreateOptions {\n enable?: boolean;\n context?: AXPContextData;\n}\n\nexport interface ResolvedLookupCreateOptions {\n enabled: boolean;\n mode: 'none' | 'full' | 'quick';\n context?: AXPContextData;\n}\n\nexport type AXPLookupWidgetLookType = 'select' | 'lookup';\n\n/**\n * How the lookup column resolves related items for display in entity lists.\n * - `hydrated`: titles (and optional ids) are already on the row; inline preview + overflow popover use row data only.\n * - `idsWithCount`: ids and optional count live on the row; the cell shows a count summary and loads titles via entity `byKey` when the popover opens.\n * - `countOnly`: only a count is on the row; the popover loads ids/titles via a registered `AXPQuery` when opened.\n */\nexport type AXPLookupColumnResolveStrategy = 'hydrated' | 'idsWithCount' | 'countOnly';\n\n/**\n * Column list only: controls how the lookup column loads and displays related items in grids.\n * Omitted or empty strategy defaults to `hydrated` at runtime.\n */\nexport interface AXPLookupColumnResolveOptions {\n /** Default `hydrated` when omitted. */\n strategy?: AXPLookupColumnResolveStrategy;\n /** Lodash-style path on `rowData` for the displayed count (e.g. `rolesCount`). */\n countFieldPath?: string;\n /** Lodash-style path on `rowData` for the related id list (`idsWithCount`). If omitted, the column `rawValue` is used. */\n idsPath?: string;\n /** Registered query key for `AXPQueryExecutor.fetch` when using `countOnly`. */\n queryKey?: string;\n /**\n * Maps query input property names to lodash-style paths on `rowData` (e.g. `{ \"userId\": \"id\" }`).\n * May be a JSON string when set from the layout designer text field.\n */\n queryParams?: Record<string, string> | string;\n /**\n * Dot path into the named query result for the items array. Defaults to `items` when the result is an object.\n * If the query returns an array directly, leave unset and handle at runtime.\n */\n queryResultItemsPath?: string;\n}\n\nexport interface AXPLookupDisplayOptions {\n displayFormat?: string;\n textField?: string;\n isMultiLanguage?: (value: unknown) => boolean;\n}\n\n/** Column list: entity detail popover when clicking a lookup value. */\nexport interface AXPLookupPopoverOptions {\n /** When `false`, lookup values are not clickable and the detail popover does not open. Default `true`. */\n enabled?: boolean;\n}\n\n/** Row actions to show in the lookup data selector popup (subset of entity list actions). */\nexport interface AXPLookupSelectorRowActionsConfig {\n /** Primary icon buttons (e.g. preview). Match full command name or suffix such as `:Preview`. */\n primary?: string[];\n /** Secondary actions in the row dropdown menu. */\n secondary?: string[];\n}\n\nexport interface AXPLookupWidgetOptions {\n disabled?: boolean | AXPExpression;\n readonly?: boolean | AXPExpression;\n placeholder?: string;\n expose?: string | string[];\n look?: AXPLookupWidgetLookType;\n allowClear?: boolean;\n /** Inline entity create configuration. */\n create?: AXPLookupWidgetCreateOptions;\n /** @deprecated Use create.enable; still supported for create mode (quick/full). */\n allowCreate?: 'none' | 'full' | 'quick';\n displayFormat?: string;\n /** Column list: entity detail popover behavior. */\n popover?: AXPLookupPopoverOptions;\n /** Column list: lazy resolve and summary behavior. */\n columnResolve?: AXPLookupColumnResolveOptions;\n /** Lookup selector popup: entity row actions to display. */\n selectorRowActions?: AXPLookupSelectorRowActionsConfig;\n}\n\n//#endregion\n","//#region ---- Types barrel ----\n\nexport * from './entity-action.types';\nexport * from './entity-property.types';\nexport * from './entity-definition.types';\nexport * from './entity-model.types';\nexport * from './entity-storage.types';\nexport * from './entity-formats.types';\nexport * from './entity-property-list.types';\nexport * from './entity-display-field.types';\nexport * from './entity-card-field.types';\nexport * from './entity-query-view.types';\nexport * from './entity-master-list.types';\nexport * from './entity-detail-list.types';\nexport * from './entity-layout-view.types';\nexport * from './entity-related-layout.types';\nexport * from './entity-list-filter.types';\nexport * from './lookup-widget.types';\n\n//#endregion\n","//#region ---- Entity action helpers (pure data, no Angular) ----\n\nimport type { AXPEntityAction } from '../types/entity-action.types';\nimport type { AXPQueryFilter, AXPRelatedEntity } from '../types';\nimport { AXPEntityCommandScope } from '../types/entity-action.types';\nimport { AXPSystemActionType } from '@acorex/platform/contracts';\n\n//#region Master\n\nexport function entityMasterCreateAction(): AXPEntityAction {\n return {\n title: '@general:actions.create.title',\n command: {\n name: 'Entity:Create',\n },\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n };\n}\n\nexport function entityMasterEditAction(): AXPEntityAction {\n return {\n title: '@general:actions.edit.title',\n command: 'Entity:Update',\n priority: 'secondary',\n type: AXPSystemActionType.Update,\n scope: AXPEntityCommandScope.Individual,\n default: true,\n };\n}\n\nexport function entityMasterBulkDeleteAction(): AXPEntityAction {\n return {\n title: '@general:actions.delete-items.title',\n command: 'delete-entity',\n priority: 'primary',\n type: AXPSystemActionType.Delete,\n scope: AXPEntityCommandScope.Selected,\n order: 100,\n };\n}\n\nexport function entityMasterViewAction(): AXPEntityAction {\n return {\n title: '@general:actions.view.title',\n command: 'open-entity',\n priority: 'secondary',\n type: AXPSystemActionType.View,\n scope: AXPEntityCommandScope.Individual,\n default: true,\n };\n}\n\nexport function entityMasterDeleteAction(): AXPEntityAction {\n return {\n title: '@general:actions.delete.title',\n command: 'delete-entity',\n priority: 'secondary',\n type: AXPSystemActionType.Delete,\n scope: AXPEntityCommandScope.Individual,\n order: 100,\n shortcuts: ['ctrl+shift+delete'],\n };\n}\n\nexport function entityMasterCrudActions(options?: {\n create?: boolean;\n delete?: boolean;\n view?: boolean;\n edit?: boolean;\n}): AXPEntityAction[] {\n const opts = {\n create: true,\n delete: true,\n view: true,\n edit: false,\n ...options,\n };\n const actions: AXPEntityAction[] = [];\n\n if (opts.create) {\n actions.push(entityMasterCreateAction());\n }\n if (opts.delete) {\n actions.push(entityMasterBulkDeleteAction());\n actions.push(entityMasterDeleteAction());\n }\n if (opts.view) {\n actions.push(entityMasterViewAction());\n }\n\n if (opts.edit) {\n actions.push(entityMasterEditAction());\n }\n\n return actions;\n}\n\nexport function entityMasterRecordActions(): AXPEntityAction[] {\n return [entityMasterDeleteAction()];\n}\n\n//#endregion\n\n//#region Details\n\nexport function entityDetailsCreateActions(parentId: string): AXPEntityAction {\n return {\n title: '@general:actions.create.title',\n command: {\n name: 'Entity:Create',\n options: {\n process: {\n redirect: false,\n canCreateNewOne: true,\n data: {\n [parentId]: '{{context.eval(\"id\")}}',\n },\n },\n },\n },\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n };\n}\n\nexport function entityDetailsCreateActionsDeferredParent(): AXPEntityAction {\n return {\n title: '@general:actions.create.title',\n command: {\n name: 'Entity:Create',\n options: {\n process: {\n redirect: false,\n canCreateNewOne: true,\n data: {},\n },\n },\n },\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n };\n}\n\nexport function mergeForeignKeyFieldIntoCreateActions(\n foreignKeyField: string | undefined,\n actions: AXPEntityAction[] | undefined,\n): AXPEntityAction[] {\n if (!foreignKeyField || !actions?.length) {\n return actions ?? [];\n }\n return actions.map((a) => {\n const cmd = a.command;\n if (\n typeof cmd !== 'object' ||\n !cmd ||\n cmd.name !== 'Entity:Create' ||\n a.scope !== AXPEntityCommandScope.TypeLevel\n ) {\n return a;\n }\n const opts = (cmd.options ?? {}) as Record<string, unknown>;\n const proc = (opts['process'] ?? {}) as Record<string, unknown>;\n const data = { ...((proc['data'] as Record<string, unknown>) ?? {}) };\n if (data[foreignKeyField] === undefined || data[foreignKeyField] === null || data[foreignKeyField] === '') {\n data[foreignKeyField] = '{{ context.eval(\"id\") }}';\n }\n return {\n ...a,\n command: {\n ...cmd,\n options: { ...opts, process: { ...proc, data } },\n },\n } as AXPEntityAction;\n });\n}\n\nexport function collectNestedCreateHiddenProperties(relatedEntity: AXPRelatedEntity): string[] | undefined {\n const fk = relatedEntity.persistence?.foreignKeyField;\n const merged = [...(relatedEntity.excludeProperties ?? [])];\n if (fk) {\n merged.push(fk);\n }\n const unique = [...new Set(merged)];\n return unique.length ? unique : undefined;\n}\n\nexport function entityDetailsSimpleCondition(fk: string): AXPQueryFilter {\n return {\n name: fk,\n operator: { type: 'equal' },\n value: '{{context.eval(\"id\")}}',\n };\n}\n\nexport function entityDetailsReferenceCondition(type: string): AXPQueryFilter[] {\n return [\n {\n name: 'reference.id',\n operator: { type: 'equal' },\n value: '{{context.eval(\"id\")}}',\n },\n {\n name: 'reference.type',\n operator: { type: 'equal' },\n value: type,\n },\n ];\n}\n\nexport function entityDetailsEditAction(): AXPEntityAction {\n return {\n title: '@general:actions.edit.title',\n command: 'Entity:Update',\n priority: 'secondary',\n type: AXPSystemActionType.Update,\n default: true,\n scope: AXPEntityCommandScope.Individual,\n };\n}\n\nexport function entityDetailsNewEditAction(): AXPEntityAction {\n return {\n title: 'New Edit',\n command: {\n name: 'Entity:Update',\n },\n priority: 'secondary',\n type: AXPSystemActionType.Update,\n default: true,\n scope: AXPEntityCommandScope.Individual,\n };\n}\n\nexport function entityOverrideDetailsViewAction(): AXPEntityAction {\n return {\n title: '@general:actions.view.title',\n command: 'open-entity',\n priority: 'secondary',\n hidden: true,\n type: AXPSystemActionType.View,\n scope: AXPEntityCommandScope.Individual,\n };\n}\n\nexport function entityDetailsCrudActions(\n parentId?: string,\n options?: {\n create?: boolean;\n delete?: boolean;\n view?: boolean;\n edit?: boolean;\n },\n): AXPEntityAction[] {\n const opts = {\n create: true,\n delete: true,\n view: true,\n edit: true,\n ...options,\n };\n const actions: AXPEntityAction[] = [];\n if (opts.create) {\n if (parentId) {\n actions.push(entityDetailsCreateActions(parentId));\n } else {\n actions.push(entityDetailsCreateActionsDeferredParent());\n }\n }\n if (opts.edit) {\n actions.push(entityDetailsEditAction());\n }\n if (opts.view) {\n actions.push(entityOverrideDetailsViewAction());\n }\n return actions;\n}\n\nexport function entityDetailsReferenceCreateActions(type: string): AXPEntityAction[] {\n return [\n {\n title: '@general:actions.create.title',\n command: {\n name: 'Entity:Create',\n options: {\n process: {\n redirect: false,\n canCreateNewOne: true,\n data: {\n reference: {\n id: '{{context.eval(\"id\")}}',\n type: type,\n },\n },\n },\n },\n },\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n entityDetailsEditAction(),\n entityOverrideDetailsViewAction(),\n ];\n}\n\n//#endregion\n","//#region ---- Helpers barrel ----\n\nexport * from './entity-action.helpers';\n\n//#endregion\n","//#region ---- Template normalization ----\n\n/**\n * Normalizes display templates before expression evaluation.\n * Converts simple dot paths (e.g. `{{ position.title }}`) to `context.eval(\"position.title\")`.\n */\nexport function normalizeExpressionTemplate(template: string): string {\n let normalized = template.replace(\n /\\{\\{\\s*context\\.eval\\(['\"]([^'\"]+)['\"]\\)\\s*\\}\\}/g,\n '{{ context.eval(\"$1\") }}',\n );\n\n if (!normalized.includes('{{')) {\n normalized = normalized.replace(/\\{/g, '{{').replace(/\\}/g, '}}');\n }\n\n return normalized.replace(\n /\\{\\{\\s*(?!context\\.)([\\w]+(?:\\.[\\w]+)*)\\s*\\}\\}/g,\n '{{ context.eval(\"$1\") }}',\n );\n}\n\n/** @see normalizeExpressionTemplate */\nexport const normalizeEntityDisplayTemplate = normalizeExpressionTemplate;\n\n/** True when formatted text still contains unresolved template markers. */\nexport function isUnresolvedEntityDisplayTemplate(value: string): boolean {\n return /\\{\\{/.test(value) || /context\\.eval\\s*\\(/.test(value) || value === '[object Object]';\n}\n\n/**\n * Strips literal `undefined` / `null` tokens produced when expression segments are missing.\n */\nexport function sanitizeResolvedEntityDisplayTitle(value: string): string {\n const trimmed = value.trim();\n if (!trimmed) {\n return '';\n }\n\n const withoutLiterals = trimmed\n .replace(/\\bundefined\\b/gi, ' ')\n .replace(/\\bnull\\b/gi, ' ')\n .replace(/\\s+/g, ' ')\n .trim();\n\n return withoutLiterals\n .replace(/^[\\s\\-–—·|/,()+]+|[\\s\\-–—·|/,()+]+$/g, '')\n .trim();\n}\n\n/** True when a resolved title is non-empty and safe to show in search or entity chrome. */\nexport function isMeaningfulEntityDisplayTitle(value: string): boolean {\n const sanitized = sanitizeResolvedEntityDisplayTitle(value);\n return sanitized.length > 0 && !isUnresolvedEntityDisplayTemplate(sanitized);\n}\n\nexport function isRowBoundEntityDisplayTemplate(template: string): boolean {\n const trimmed = template.trim();\n if (!trimmed || trimmed.startsWith('@')) {\n return false;\n }\n return trimmed.includes('{{') || trimmed.includes('{');\n}\n\n//#endregion\n","import type { AXPEntity } from '../types/entity-definition.types';\n\n//#region ---- Types ----\n\nexport interface AXPEntityPropertyExposeEntry {\n source: string;\n target: string;\n}\n\nexport type AXPEntityPropertyLike = {\n name: string;\n schema?: {\n interface?: {\n options?: Record<string, unknown>;\n };\n };\n};\n\n//#endregion\n\n//#region ---- Expose parsing ----\n\n/**\n * Parses lookup/select `expose` entries from a property interface options object.\n */\nexport function parsePropertyExposeEntries(\n options: Record<string, unknown> | undefined,\n): AXPEntityPropertyExposeEntry[] {\n const expose = options?.['expose'];\n if (!Array.isArray(expose)) {\n return [];\n }\n\n return expose.filter(\n (row): row is AXPEntityPropertyExposeEntry =>\n row != null &&\n typeof row === 'object' &&\n typeof (row as { source?: unknown }).source === 'string' &&\n typeof (row as { target?: unknown }).target === 'string',\n );\n}\n\n/**\n * Collects all non-empty `expose[].target` paths from a property.\n */\nexport function collectPropertyExposeTargetPaths(property: AXPEntityPropertyLike): string[] {\n const opts = property.schema?.interface?.options;\n if (!opts || typeof opts !== 'object') {\n return [];\n }\n\n const paths = new Set<string>();\n for (const entry of parsePropertyExposeEntries(opts)) {\n const target = entry.target.trim();\n if (target) {\n paths.add(target);\n }\n }\n return [...paths];\n}\n\n/**\n * Resolves list column `options.dataPath` for a property when explicitly set.\n */\nexport function resolveEntityColumnDataPath(\n entity: AXPEntity | null | undefined,\n propertyName: string,\n): string | undefined {\n const column = entity?.columns?.find((c) => c.name === propertyName);\n const rawDataPath = column?.options?.['dataPath'];\n if (typeof rawDataPath !== 'string') {\n return undefined;\n }\n\n const dataPath = rawDataPath.trim();\n if (!dataPath || dataPath === propertyName) {\n return undefined;\n }\n return dataPath;\n}\n\n/**\n * Resolves the lodash-get path for lookup/select display text from expose metadata.\n */\nexport function resolvePropertyExposeDisplayTarget(\n options: Record<string, unknown> | undefined,\n): string | undefined {\n if (!options) {\n return undefined;\n }\n\n const textField = typeof options['textField'] === 'string' ? options['textField'].trim() : '';\n const valueField = typeof options['valueField'] === 'string' ? options['valueField'].trim() : 'id';\n const entries = parsePropertyExposeEntries(options);\n\n if (textField) {\n const match = entries.find((entry) => entry.source === textField);\n if (match?.target.trim()) {\n return match.target.trim();\n }\n }\n\n const displayEntry = entries.find(\n (entry) => entry.source !== valueField && entry.source !== 'id' && entry.target.trim(),\n );\n return displayEntry?.target.trim();\n}\n\n/**\n * Resolves the lodash-get path used for inline `contains` filters on lookup/select properties.\n * Prefers list column `dataPath`, then lookup `expose` target for `textField` (or first non-id expose).\n * Returns `undefined` when the property name should be used as-is (e.g. plain text fields).\n */\nexport function resolveEntityPropertyInlineFilterField(\n entity: AXPEntity | null | undefined,\n property: AXPEntityPropertyLike,\n): string | undefined {\n if (!entity || !property?.name) {\n return undefined;\n }\n\n const dataPath = resolveEntityColumnDataPath(entity, property.name);\n if (dataPath) {\n return dataPath;\n }\n\n const opts = property.schema?.interface?.options;\n if (!opts || typeof opts !== 'object') {\n return undefined;\n }\n\n return resolvePropertyExposeDisplayTarget(opts);\n}\n\n//#endregion\n","import type { AXPEntity } from '../types/entity-definition.types';\n\nimport {\n isRowBoundEntityDisplayTemplate,\n normalizeEntityDisplayTemplate,\n} from './entity-display-template.util';\n\n//#region ---- Types ----\n\nexport interface AXPEntitySearchTitleContext {\n /** Templates tried after the primary `searchResult.title` fails (`single.title`, lookup, individual). */\n fallbackTemplates: string[];\n /** Entity property paths tried when templates do not resolve (`lookup`, identifier, common fields). */\n fallbackFields: string[];\n}\n\n//#endregion\n\n//#region ---- Entity metadata ----\n\nconst DEFAULT_DISPLAY_FIELD_CANDIDATES = [\n 'title',\n 'name',\n 'code',\n 'fullName',\n 'displayName',\n 'subject',\n 'description',\n] as const;\n\nfunction entityHasProperty(entity: AXPEntity, path: string): boolean {\n const root = path.split('.')[0];\n return entity.properties?.some((property) => property.name === root) ?? false;\n}\n\nfunction resolveEntityDisplayPropertyPaths(entity: AXPEntity): string[] {\n const paths: string[] = [];\n const add = (path?: string) => {\n const trimmed = path?.trim();\n if (!trimmed || trimmed.includes('{') || paths.includes(trimmed)) {\n return;\n }\n if (entityHasProperty(entity, trimmed)) {\n paths.push(trimmed);\n }\n };\n\n const lookupFormat = entity.formats?.lookup?.trim();\n if (lookupFormat && !lookupFormat.includes('{')) {\n add(lookupFormat);\n }\n\n for (const candidate of DEFAULT_DISPLAY_FIELD_CANDIDATES) {\n add(candidate);\n }\n\n const identifierPlugin = entity.plugins?.find((plugin) => plugin.name === 'identifier');\n const identifierField = identifierPlugin?.options?.['field'];\n if (typeof identifierField === 'string') {\n add(identifierField);\n }\n\n if (paths.length === 0) {\n const firstStringProperty = entity.properties?.find(\n (property) => property.schema?.dataType === 'string' && property.name !== 'id',\n );\n add(firstStringProperty?.name);\n }\n\n return paths;\n}\n\n/**\n * Builds entity-scoped fallback metadata for global search (registered on each entity search definition).\n */\nexport function buildEntitySearchTitleContext(\n entity: AXPEntity,\n primaryTemplate?: string,\n): AXPEntitySearchTitleContext {\n const fallbackTemplates: string[] = [];\n const normalizedPrimary = primaryTemplate?.trim()\n ? normalizeEntityDisplayTemplate(primaryTemplate.trim())\n : undefined;\n\n const addTemplate = (raw?: string) => {\n const trimmed = raw?.trim();\n if (!trimmed || !isRowBoundEntityDisplayTemplate(trimmed)) {\n return;\n }\n const normalized = normalizeEntityDisplayTemplate(trimmed);\n if (!normalized || normalized === normalizedPrimary || fallbackTemplates.includes(normalized)) {\n return;\n }\n fallbackTemplates.push(normalized);\n };\n\n addTemplate(entity.interfaces?.master?.single?.title);\n addTemplate(entity.formats?.lookup);\n addTemplate(entity.formats?.individual);\n\n return {\n fallbackTemplates,\n fallbackFields: resolveEntityDisplayPropertyPaths(entity),\n };\n}\n\n/**\n * Row title template chain aligned with entity layouts.\n * Priority: `interfaces.master.single.title` → `formats.searchResult.title` → `formats.individual`.\n */\nexport function resolveEntityRowTitleTemplate(entity: AXPEntity | null | undefined): string | undefined {\n if (!entity) {\n return undefined;\n }\n\n const singleTitle = entity.interfaces?.master?.single?.title?.trim();\n if (singleTitle && isRowBoundEntityDisplayTemplate(singleTitle)) {\n return normalizeEntityDisplayTemplate(singleTitle);\n }\n\n const searchTitle = entity.formats?.searchResult?.title?.trim();\n if (searchTitle && isRowBoundEntityDisplayTemplate(searchTitle)) {\n return normalizeEntityDisplayTemplate(searchTitle);\n }\n\n const lookupFormat = entity.formats?.lookup?.trim();\n if (lookupFormat && isRowBoundEntityDisplayTemplate(lookupFormat)) {\n return normalizeEntityDisplayTemplate(lookupFormat);\n }\n\n const individual = entity.formats?.individual?.trim();\n if (individual && isRowBoundEntityDisplayTemplate(individual)) {\n return normalizeEntityDisplayTemplate(individual);\n }\n\n return undefined;\n}\n\n/**\n * Record title template for modify popups: `interfaces.master.update.title` → `single.title`.\n */\nexport function resolveEntityModifyRecordTitleTemplate(\n entity: AXPEntity | null | undefined,\n): string | undefined {\n if (!entity) {\n return undefined;\n }\n\n const updateTitle = entity.interfaces?.master?.update?.title?.trim();\n if (updateTitle && isRowBoundEntityDisplayTemplate(updateTitle)) {\n return normalizeEntityDisplayTemplate(updateTitle);\n }\n\n const singleTitle = entity.interfaces?.master?.single?.title?.trim();\n if (singleTitle && isRowBoundEntityDisplayTemplate(singleTitle)) {\n return normalizeEntityDisplayTemplate(singleTitle);\n }\n\n return undefined;\n}\n\n//#endregion\n","import type { AXPEntity } from '../types/entity-definition.types';\n\nimport { collectPropertyExposeTargetPaths } from './entity-property-display-path.util';\n\n//#region ---- Types ----\n\nexport type AXPCollectEntityQuickSearchPathsResolver = (\n moduleName: string,\n entityName: string,\n) => Promise<AXPEntity | null>;\n\n//#endregion\n\n//#region ---- Quick search: schema-driven field paths ----\n\nconst NON_TEXT_DATATYPES = new Set([\n 'number',\n 'integer',\n 'int',\n 'long',\n 'float',\n 'double',\n 'decimal',\n 'money',\n 'currency',\n 'boolean',\n 'bool',\n 'date',\n 'datetime',\n 'time',\n 'object',\n 'array',\n 'json',\n 'image',\n 'file',\n 'binary',\n]);\n\n/**\n * Whether an entity property likely stores free text worth a `contains` quick-search clause.\n */\nfunction isTextLikeDataType(dataType: string | undefined): boolean {\n const dt = (dataType ?? 'string').toLowerCase().trim();\n if (!dt || NON_TEXT_DATATYPES.has(dt)) {\n return false;\n }\n return true;\n}\n\n/**\n * Lodash-get paths for quick search from a single entity definition: string-like property names\n * plus lookup `expose[].target` paths (e.g. `brand.title`).\n */\nexport function collectQuickSearchPathsFromSingleEntityDefinition(entity: AXPEntity | null | undefined): string[] {\n if (!entity?.properties?.length) {\n return [];\n }\n\n const paths = new Set<string>();\n\n for (const property of entity.properties) {\n if (isTextLikeDataType(property.schema?.dataType)) {\n paths.add(property.name);\n }\n\n for (const target of collectPropertyExposeTargetPaths(property)) {\n paths.add(target);\n }\n }\n\n return [...paths];\n}\n\n//#endregion\n\n//#region ---- Column-derived nested paths ----\n\n/**\n * Adds dotted paths from master columns (`name` or `options.dataPath`), e.g. `person.fullName`, `jobDefinition.title`.\n */\nexport function collectNestedFieldPathsFromEntityColumns(entity: AXPEntity | null | undefined): string[] {\n if (!entity?.columns?.length) {\n return [];\n }\n\n const paths = new Set<string>();\n\n for (const col of entity.columns) {\n const name = col.name.trim();\n if (name.includes('.')) {\n paths.add(name);\n }\n\n const rawDp = col.options?.['dataPath'];\n if (typeof rawDp === 'string') {\n const dp = rawDp.trim();\n if (dp.includes('.')) {\n paths.add(dp);\n }\n }\n }\n\n return [...paths];\n}\n\n//#endregion\n\n//#region ---- Related merge-detail paths ----\n\nfunction parseRelatedEntityFullName(fullName: string): { moduleName: string; entityName: string } | null {\n const t = fullName.trim();\n const idx = t.indexOf('.');\n if (idx <= 0 || idx >= t.length - 1) {\n return null;\n }\n return {\n moduleName: t.slice(0, idx),\n entityName: t.slice(idx + 1),\n };\n}\n\n//#endregion\n\n//#region ---- Public API ----\n\n/**\n * Collects lodash-get field paths used for mock/API quick search (`contains` / OR filters):\n * host properties and lookup expose targets, dotted column paths, and merge-detail related entities\n * prefixed with the related entity merge `persistence.dataPath` (e.g. `person.firstName`).\n */\nexport async function collectEntityQuickSearchFieldPaths(\n entity: AXPEntity | null | undefined,\n resolveRelatedDefinition: AXPCollectEntityQuickSearchPathsResolver,\n): Promise<string[]> {\n if (!entity) {\n return [];\n }\n\n const paths = new Set<string>();\n\n for (const p of collectQuickSearchPathsFromSingleEntityDefinition(entity)) {\n paths.add(p);\n }\n\n for (const p of collectNestedFieldPathsFromEntityColumns(entity)) {\n paths.add(p);\n }\n\n const related = entity.relatedEntities ?? [];\n for (const rel of related) {\n const dataPath = rel.persistence?.dataPath?.trim();\n if (!dataPath || rel.layout?.type !== 'merge-detail') {\n continue;\n }\n\n const parsed = rel.entity ? parseRelatedEntityFullName(rel.entity) : null;\n if (!parsed) {\n continue;\n }\n\n const relatedDef = await resolveRelatedDefinition(parsed.moduleName, parsed.entityName);\n if (!relatedDef) {\n continue;\n }\n\n for (const p of collectQuickSearchPathsFromSingleEntityDefinition(relatedDef)) {\n paths.add(`${dataPath}.${p}`);\n }\n\n for (const p of collectNestedFieldPathsFromEntityColumns(relatedDef)) {\n paths.add(`${dataPath}.${p}`);\n }\n }\n\n return [...paths];\n}\n\nexport { resolveEntityPropertyInlineFilterField } from './entity-property-display-path.util';\n\n//#endregion\n","import type { AXPEntity } from '../types/entity-definition.types';\nimport type { AXPRelatedEntity } from '../types/entity-related-layout.types';\n\n//#region ---- Related entity helpers ----\n\nexport function parseRelatedEntityFullName(fullName: string): { moduleName: string; entityName: string } | null {\n const trimmed = fullName.trim();\n const idx = trimmed.indexOf('.');\n if (idx <= 0 || idx >= trimmed.length - 1) {\n return null;\n }\n return {\n moduleName: trimmed.slice(0, idx),\n entityName: trimmed.slice(idx + 1),\n };\n}\n\nexport function parseDottedFieldPath(fieldPath: string): { dataPath: string; propertyName: string } | null {\n const trimmed = fieldPath.trim();\n const dotIndex = trimmed.indexOf('.');\n if (dotIndex <= 0 || dotIndex >= trimmed.length - 1) {\n return null;\n }\n return {\n dataPath: trimmed.slice(0, dotIndex),\n propertyName: trimmed.slice(dotIndex + 1),\n };\n}\n\n//#endregion\n\n//#region ---- Merge-detail property discovery ----\n\n/**\n * Resolves related property names eligible for host list columns/filters/sorts:\n * host columns under `dataPath`, optional `related.properties` allowlist, minus `excludeProperties`.\n */\nexport function collectMergeDetailListPropertyNames(\n hostEntity: AXPEntity,\n dataPath: string,\n relatedEntity: AXPRelatedEntity,\n): Set<string> {\n const names = new Set<string>();\n const prefix = `${dataPath}.`;\n\n if (relatedEntity.properties?.length) {\n for (const name of relatedEntity.properties) {\n const trimmed = name.trim();\n if (trimmed) {\n names.add(trimmed);\n }\n }\n }\n\n for (const column of hostEntity.columns ?? []) {\n const columnName = column.name.trim();\n if (columnName.startsWith(prefix)) {\n const tail = columnName.slice(prefix.length);\n const leaf = tail.split('.')[0]?.trim();\n if (leaf) {\n names.add(leaf);\n }\n }\n\n const rawDataPath = column.options?.['dataPath'];\n if (typeof rawDataPath === 'string') {\n const dp = rawDataPath.trim();\n if (dp.startsWith(prefix)) {\n const tail = dp.slice(prefix.length);\n const leaf = tail.split('.')[0]?.trim();\n if (leaf) {\n names.add(leaf);\n }\n }\n }\n }\n\n const excluded = new Set((relatedEntity.excludeProperties ?? []).map((n) => n.trim()).filter(Boolean));\n for (const name of excluded) {\n names.delete(name);\n }\n\n return names;\n}\n\n//#endregion\n","import type { AXPFilterDefinition } from '@acorex/platform/contracts';\nimport type { AXPWidgetTypesMap } from '@acorex/platform/layout/widget-core';\nimport { omit } from 'lodash-es';\n\nimport type { AXPEntity } from '../types/entity-definition.types';\nimport type { AXPEntityListFilterDefinition } from '../types/entity-list-filter.types';\nimport { encodeEntityListFilterContextField } from '../types/entity-list-filter.types';\nimport type { AXPEntityProperty } from '../types/entity-property.types';\nimport {\n collectMergeDetailListPropertyNames,\n parseRelatedEntityFullName,\n} from './entity-merge-detail-list-properties.util';\nimport {\n resolveEntityColumnDataPath,\n resolveEntityPropertyInlineFilterField,\n resolvePropertyExposeDisplayTarget,\n} from './entity-property-display-path.util';\nimport type { AXPCollectEntityQuickSearchPathsResolver } from './entity-quick-search-paths.util';\n\n//#region ---- Types ----\n\nexport interface AXPBuildEntityListFilterDefinitionsDeps {\n resolveWidget?: (\n type: AXPWidgetTypesMap[keyof AXPWidgetTypesMap],\n ) => { icon?: string; defaultFilterWidgetName?: string } | undefined;\n}\n\n//#endregion\n\n//#region ---- Property filter helpers ----\n\nfunction isPropertyFilterEnabled(property: AXPEntityProperty): boolean {\n const filter = property.options?.filter;\n return !!(\n filter?.advance?.enabled ||\n filter?.inline?.enabled ||\n filter?.preload?.enabled\n );\n}\n\n//#endregion\n\n//#region ---- Merge-detail property discovery ----\n\nfunction resolveMergedRelatedInlineFilterField(\n dataPath: string,\n relatedEntityDef: AXPEntity,\n property: AXPEntityProperty,\n): string | undefined {\n const columnDataPath = resolveEntityColumnDataPath(relatedEntityDef, property.name);\n if (columnDataPath) {\n return `${dataPath}.${columnDataPath}`;\n }\n\n const exposeTarget = resolvePropertyExposeDisplayTarget(property.schema?.interface?.options);\n if (exposeTarget) {\n return `${dataPath}.${exposeTarget}`;\n }\n\n return undefined;\n}\n\n//#endregion\n\n//#region ---- Filter definition builder ----\n\nfunction buildFilterDefinitionFromProperty(\n hostEntity: AXPEntity,\n property: AXPEntityProperty,\n options: {\n field: string;\n inlineQueryField?: string;\n },\n deps?: AXPBuildEntityListFilterDefinitionsDeps,\n): AXPEntityListFilterDefinition | null {\n if (!isPropertyFilterEnabled(property)) {\n return null;\n }\n\n const iface = property.schema.interface ?? {};\n const interfaceType = iface.type as AXPWidgetTypesMap[keyof AXPWidgetTypesMap] | undefined;\n const widgetConfig = interfaceType ? deps?.resolveWidget?.(interfaceType) : undefined;\n\n const type = (property.options?.filter?.advance?.widgetType ||\n widgetConfig?.defaultFilterWidgetName ||\n interfaceType) as AXPWidgetTypesMap[keyof AXPWidgetTypesMap];\n\n const inlineQueryField =\n options.inlineQueryField ??\n resolveEntityPropertyInlineFilterField(hostEntity, property);\n\n const preloadRequired = property.options?.filter?.preload?.required;\n const validations = preloadRequired\n ? [\n {\n rule: 'required',\n message: 'This field is required',\n options: {},\n },\n ]\n : [];\n\n const widgetOptions = {\n ...(iface.options ?? {}),\n ...(validations.length ? { validations } : {}),\n };\n\n const contextField = options.field.includes('.')\n ? encodeEntityListFilterContextField(options.field)\n : undefined;\n\n return {\n title: property.title,\n field: options.field,\n ...(contextField ? { contextField } : {}),\n ...(inlineQueryField && inlineQueryField !== options.field ? { inlineQueryField } : {}),\n operator: {\n type: 'contains',\n },\n widget: {\n ...omit(iface as object, 'triggers'),\n path: contextField ?? options.field,\n type,\n options: widgetOptions,\n } as AXPFilterDefinition['widget'],\n filters: [],\n isParametric: false,\n icon: widgetConfig?.icon,\n filterType: {\n advance: property.options?.filter?.advance?.enabled ?? false,\n inline: property.options?.filter?.inline?.enabled ?? false,\n preload: property.options?.filter?.preload,\n },\n triggers: iface.triggers,\n };\n}\n\nasync function collectHostPropertyFilterDefinitions(\n entity: AXPEntity,\n deps?: AXPBuildEntityListFilterDefinitionsDeps,\n): Promise<AXPEntityListFilterDefinition[]> {\n const definitions: AXPEntityListFilterDefinition[] = [];\n\n for (const property of entity.properties ?? []) {\n const definition = buildFilterDefinitionFromProperty(\n entity,\n property,\n { field: property.name },\n deps,\n );\n if (definition) {\n definitions.push(definition);\n }\n }\n\n return definitions;\n}\n\nasync function collectMergeDetailFilterDefinitions(\n hostEntity: AXPEntity,\n resolveRelatedDefinition: AXPCollectEntityQuickSearchPathsResolver,\n deps?: AXPBuildEntityListFilterDefinitionsDeps,\n): Promise<AXPEntityListFilterDefinition[]> {\n const definitions: AXPEntityListFilterDefinition[] = [];\n\n for (const related of hostEntity.relatedEntities ?? []) {\n if (related.layout?.type !== 'merge-detail') {\n continue;\n }\n\n if (related.filter?.enabled === false) {\n continue;\n }\n\n const dataPath = related.persistence?.dataPath?.trim();\n if (!dataPath) {\n continue;\n }\n\n const parsed = related.entity ? parseRelatedEntityFullName(related.entity) : null;\n if (!parsed) {\n continue;\n }\n\n const relatedDef = await resolveRelatedDefinition(parsed.moduleName, parsed.entityName);\n if (!relatedDef) {\n continue;\n }\n\n const propertyNames = collectMergeDetailListPropertyNames(hostEntity, dataPath, related);\n if (propertyNames.size === 0) {\n continue;\n }\n\n for (const propertyName of propertyNames) {\n const property = relatedDef.properties?.find((p) => p.name === propertyName);\n if (!property) {\n continue;\n }\n\n const queryField = `${dataPath}.${propertyName}`;\n const inlineQueryField = resolveMergedRelatedInlineFilterField(dataPath, relatedDef, property);\n\n const definition = buildFilterDefinitionFromProperty(\n hostEntity,\n property,\n {\n field: queryField,\n inlineQueryField,\n },\n deps,\n );\n\n if (definition) {\n definitions.push(definition);\n }\n }\n }\n\n return definitions;\n}\n\n//#endregion\n\n//#region ---- Public API ----\n\n/**\n * Builds master-list filter definitions from host properties and merge-detail related entities.\n * Related filters use `{dataPath}.{property}` query fields (e.g. `person.firstName`).\n */\nexport async function collectEntityListFilterDefinitions(\n entity: AXPEntity | null | undefined,\n resolveRelatedDefinition: AXPCollectEntityQuickSearchPathsResolver,\n deps?: AXPBuildEntityListFilterDefinitionsDeps,\n): Promise<AXPEntityListFilterDefinition[]> {\n if (!entity) {\n return [];\n }\n\n const hostDefinitions = await collectHostPropertyFilterDefinitions(entity, deps);\n const relatedDefinitions = await collectMergeDetailFilterDefinitions(\n entity,\n resolveRelatedDefinition,\n deps,\n );\n\n return [...hostDefinitions, ...relatedDefinitions];\n}\n\n//#endregion\n","import type { AXPEntity } from '../types/entity-definition.types';\nimport type { AXPEntityProperty } from '../types/entity-property.types';\n\nimport {\n collectMergeDetailListPropertyNames,\n parseRelatedEntityFullName,\n} from './entity-merge-detail-list-properties.util';\nimport type { AXPCollectEntityQuickSearchPathsResolver } from './entity-quick-search-paths.util';\n\n//#region ---- Types ----\n\nexport interface AXPEntityListSortableField {\n name: string;\n title: string;\n}\n\n//#endregion\n\n//#region ---- Property sort helpers ----\n\nfunction isPropertySortEnabled(property: AXPEntityProperty): boolean {\n return !!property.options?.sort?.enabled;\n}\n\nfunction resolveHostColumnTitle(hostEntity: AXPEntity, fieldName: string): string | undefined {\n const column = hostEntity.columns?.find((c) => c.name === fieldName);\n return column?.title;\n}\n\nfunction collectHostSortableFields(entity: AXPEntity): AXPEntityListSortableField[] {\n return (entity.properties ?? [])\n .filter(isPropertySortEnabled)\n .map((property) => ({\n name: property.name,\n title: resolveHostColumnTitle(entity, property.name) ?? property.title,\n }));\n}\n\nasync function collectMergeDetailSortableFields(\n hostEntity: AXPEntity,\n resolveRelatedDefinition: AXPCollectEntityQuickSearchPathsResolver,\n): Promise<AXPEntityListSortableField[]> {\n const fields: AXPEntityListSortableField[] = [];\n\n for (const related of hostEntity.relatedEntities ?? []) {\n if (related.layout?.type !== 'merge-detail') {\n continue;\n }\n\n const dataPath = related.persistence?.dataPath?.trim();\n if (!dataPath) {\n continue;\n }\n\n const parsed = related.entity ? parseRelatedEntityFullName(related.entity) : null;\n if (!parsed) {\n continue;\n }\n\n const relatedDef = await resolveRelatedDefinition(parsed.moduleName, parsed.entityName);\n if (!relatedDef) {\n continue;\n }\n\n const propertyNames = collectMergeDetailListPropertyNames(hostEntity, dataPath, related);\n for (const propertyName of propertyNames) {\n const property = relatedDef.properties?.find((p) => p.name === propertyName);\n if (!property || !isPropertySortEnabled(property)) {\n continue;\n }\n\n const queryField = `${dataPath}.${propertyName}`;\n fields.push({\n name: queryField,\n title: resolveHostColumnTitle(hostEntity, queryField) ?? property.title,\n });\n }\n }\n\n return fields;\n}\n\n//#endregion\n\n//#region ---- Public API ----\n\n/**\n * Builds master-list sortable fields from host properties and merge-detail related entities.\n * Related sorts use `{dataPath}.{property}` query fields (e.g. `person.firstName`).\n */\nexport async function collectEntityListSortableFields(\n entity: AXPEntity | null | undefined,\n resolveRelatedDefinition: AXPCollectEntityQuickSearchPathsResolver,\n): Promise<AXPEntityListSortableField[]> {\n if (!entity) {\n return [];\n }\n\n const hostFields = collectHostSortableFields(entity);\n const relatedFields = await collectMergeDetailSortableFields(entity, resolveRelatedDefinition);\n\n const seen = new Set<string>();\n const result: AXPEntityListSortableField[] = [];\n\n for (const field of [...hostFields, ...relatedFields]) {\n if (seen.has(field.name)) {\n continue;\n }\n seen.add(field.name);\n result.push(field);\n }\n\n return result;\n}\n\nexport function isEntityPropertySortEnabled(property: AXPEntityProperty | null | undefined): boolean {\n return property != null && isPropertySortEnabled(property);\n}\n\n//#endregion\n","//#region ---- Workflow record helpers ----\n\nimport type { AXPRecordWorkflowInfo } from '../types/entity-model.types';\n\n/** Entity query filter field for {@link AXPRecordWorkflowInfo.instanceId}. */\nexport const AXP_RECORD_WORKFLOW_INFO_INSTANCE_ID_FIELD = 'workflowInfo.instanceId' as const;\n\n/** Entity query filter field for {@link AXPRecordWorkflowInfo.correlationId}. */\nexport const AXP_RECORD_WORKFLOW_INFO_CORRELATION_ID_FIELD = 'workflowInfo.correlationId' as const;\n\n/** Entity query filter field for {@link AXPRecordWorkflowInfo.definitionId}. */\nexport const AXP_RECORD_WORKFLOW_INFO_DEFINITION_ID_FIELD = 'workflowInfo.definitionId' as const;\n\n/** Returns a trimmed workflow instance id from a record, if present. */\nexport function getRecordWorkflowInstanceId(\n record: { workflowInfo?: AXPRecordWorkflowInfo | null } | null | undefined,\n): string | null {\n const id = record?.workflowInfo?.instanceId?.trim();\n return id && id.length > 0 ? id : null;\n}\n\n/** Returns a trimmed workflow correlation id from a record, if present. */\nexport function getRecordWorkflowCorrelationId(\n record: { workflowInfo?: AXPRecordWorkflowInfo | null } | null | undefined,\n): string | null {\n const id = record?.workflowInfo?.correlationId?.trim();\n return id && id.length > 0 ? id : null;\n}\n\n/** Builds canonical workflow metadata for a domain record (engine / middleware). */\nexport function buildAXPRecordWorkflowInfo(params: {\n instanceId: string;\n definitionId?: string | null;\n correlationId?: string | null;\n pinnedVersion?: number | null;\n}): AXPRecordWorkflowInfo {\n const instanceId = params.instanceId?.trim();\n if (!instanceId) {\n return {};\n }\n const definitionId = params.definitionId?.trim();\n const correlationId = params.correlationId?.trim();\n return {\n instanceId,\n ...(definitionId ? { definitionId } : { definitionId: null }),\n ...(correlationId ? { correlationId } : { correlationId: null }),\n ...(params.pinnedVersion != null ? { pinnedVersion: params.pinnedVersion } : {}),\n };\n}\n\n//#endregion\n","import type { AXPLookupWidgetCreateOptions, ResolvedLookupCreateOptions } from '../types/lookup-widget.types';\n\n//#region ---- Resolution ----\n\n/**\n * Resolves lookup create options from `create` and legacy `allowCreate` (mode).\n */\nexport function resolveLookupWidgetCreateOptions(options: {\n create?: AXPLookupWidgetCreateOptions;\n /** @deprecated Use create.enable; still supported for create mode (quick/full). */\n allowCreate?: 'none' | 'full' | 'quick';\n}): ResolvedLookupCreateOptions {\n const create = options.create;\n const legacyMode = options.allowCreate;\n const context = create?.context;\n\n if (create?.enable !== undefined) {\n if (!create.enable) {\n return { enabled: false, mode: 'none', context };\n }\n\n const mode = legacyMode && legacyMode !== 'none' ? legacyMode : 'quick';\n return { enabled: true, mode, context };\n }\n\n const mode = legacyMode ?? 'none';\n return {\n enabled: mode !== 'none',\n mode,\n context,\n };\n}\n\n//#endregion\n","//#region ---- Utils barrel ----\n\nexport * from './entity-display-template.util';\nexport * from './entity-property-display-path.util';\nexport * from './entity-search-title-context.util';\nexport * from './entity-quick-search-paths.util';\nexport * from './entity-list-filter-definitions.util';\nexport * from './entity-list-sortable-fields.util';\nexport * from './entity-merge-detail-list-properties.util';\nexport * from './entity-workflow-record.util';\nexport * from './lookup-create-options.util';\n\n//#endregion\n","//#region ---- Entity display constants ----\n\n/** Row path used when context carries a nested entity layout title. */\nexport const ENTITY_LAYOUT_SINGLE_TITLE_PATH = 'entity.layout.single.title';\n\n/** Widget option for a pre-evaluated or template entity row title (entity list column mappers). */\nexport const ENTITY_ROW_POPUP_TITLE_OPTION = 'popupTitle';\n\n/** Widget option alias for entity row title templates in view/edit forms. */\nexport const ENTITY_ROW_TITLE_TEMPLATE_OPTION = 'titleTemplate';\n\n//#endregion\n","//#region ---- Entity datasource keys ----\n\n/** Platform entity layout datasource registry names. */\nexport const AXPEntityDataSourceKeys = {\n Entities: 'entities',\n} as const;\n\n//#endregion\n","//#region ---- Entity events ----\n\nexport const AXPEntityEventsKeys = {\n REFRESH_LAYOUT: 'entity:refresh-layout',\n REFRESH_DATA: 'entity:refresh-data',\n} as const;\n\n//#endregion\n","//#region ---- Constants barrel ----\n\nexport * from './entity-display.constants';\nexport * from './entity-datasource.keys';\nexport * from './entity-events.keys';\n\n//#endregion\n","//#region ---- Barrel ----\n\nexport * from './types';\nexport * from './helpers';\nexport * from './utils';\nexport * from './constants';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["parseRelatedEntityFullName"],"mappings":";;;AAAA;IAQY;AAAZ,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,qBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,qBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,qBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EALW,qBAAqB,KAArB,qBAAqB,GAAA,EAAA,CAAA,CAAA;IAOrB;AAAZ,CAAA,UAAY,kB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PA;AAMA;;ACNA;AAOA;;ACPA;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-platform-layout-entity-contracts.mjs","sources":["../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-action.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-property.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-definition.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-model.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-storage.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-formats.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-property-list.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-display-field.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-card-field.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-query-view.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-master-list.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-detail-list.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-layout-view.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-related-layout.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/entity-list-filter.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/lookup-widget.types.ts","../../../../libs/platform/layout/entity-contracts/src/lib/types/index.ts","../../../../libs/platform/layout/entity-contracts/src/lib/helpers/entity-action.helpers.ts","../../../../libs/platform/layout/entity-contracts/src/lib/helpers/index.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-display-template.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-property-display-path.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-search-title-context.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-quick-search-paths.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-merge-detail-list-properties.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-list-filter-definitions.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-list-sortable-fields.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/entity-workflow-record.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/lookup-create-options.util.ts","../../../../libs/platform/layout/entity-contracts/src/lib/utils/index.ts","../../../../libs/platform/layout/entity-contracts/src/lib/constants/entity-display.constants.ts","../../../../libs/platform/layout/entity-contracts/src/lib/constants/entity-datasource.keys.ts","../../../../libs/platform/layout/entity-contracts/src/lib/constants/entity-events.keys.ts","../../../../libs/platform/layout/entity-contracts/src/lib/constants/index.ts","../../../../libs/platform/layout/entity-contracts/src/lib/index.ts","../../../../libs/platform/layout/entity-contracts/src/acorex-platform-layout-entity-contracts.ts"],"sourcesContent":["import { type AXPMetaData, type AXPopupSizeType, AXPSystemActionType, type AXStyleColorType } from '@acorex/platform/contracts';\n//#region ---- Entity actions ----\n\nexport enum AXPEntityCommandScope {\n TypeLevel = 'typeLevel',\n Selected = 'selected',\n Individual = 'individual',\n Section = 'section',\n}\n\nexport enum AXPEntityQueryType {\n Single = 'single',\n List = 'list',\n}\n\nexport interface AXPEntityCommand {\n execute: string | Function; // As runnable expression\n permissions?: string[];\n}\n\nexport interface AXPEntityQuery {\n execute: string | Function; // As runnable expression\n type: AXPEntityQueryType;\n}\n\nexport type AXPCommandActionType = AXPSystemActionType;\n\nexport interface AXPCommandActionLook {\n color: AXStyleColorType;\n icon: string;\n}\n\nexport type AXPCommandActionPriority = 'primary' | 'secondary';\n\n//TODO: remove extra props\nexport type AXPCommandActionCallback =\n | string\n | {\n name: string;\n options?: {\n decoration?: {\n header?: {\n title?: string;\n };\n };\n process?: {\n data?: any;\n [name: string]: any;\n };\n layout?: {\n size?: AXPopupSizeType;\n };\n [name: string]: any;\n };\n metadata?: AXPMetaData;\n };\n\nexport interface AXPCommandActionDisplay extends Partial<AXPCommandActionLook> {\n name?: string;\n command: AXPCommandActionCallback;\n title: string;\n type: AXPSystemActionType | string;\n priority: 'primary' | 'secondary' | 'none';\n separated?: boolean;\n permissions?: string[];\n hidden?: boolean | string;\n disabled?: boolean | string;\n default?: boolean;\n order?: number;\n /**\n * Keyboard chords for this action (e.g. `'ctrl+shift+a'`).\n * Pass `[]` to disable shortcuts. When omitted, platform defaults may apply for known commands.\n */\n shortcuts?: string[];\n}\n\nexport interface AXPEntityAction extends AXPCommandActionDisplay {\n scope: AXPEntityCommandScope;\n /** Child actions for dropdown submenu */\n items?: AXPEntityAction[];\n}\n\n//#endregion\n","//#region ---- Entity properties ----\n\nimport type { AXPExpression, AXPGridLayoutOptions, AXPValidationRules, AXPValueTransformerFunctions } from '@acorex/platform/contracts';\n\nimport type { AXPEntityPropertyListOptions } from './entity-property-list.types';\n\nexport interface AXEntityPropertyWidget {\n type: string;\n path?: string;\n id?: string;\n children?: AXEntityPropertyWidget[];\n mode: 'view' | 'edit';\n options?: Record<string, any>;\n triggers?: { event: string; action: string; disabled?: boolean }[];\n valueTransforms?: AXPValueTransformerFunctions;\n}\n\nexport interface AXPEntityPropertyLayoutConfig extends AXPGridLayoutOptions {\n label?: {\n visible?: boolean;\n };\n order?: number;\n visible?: boolean | AXPExpression;\n}\n\nexport interface AXPEntityPropertyGroup {\n id: string;\n title: string;\n description?: string;\n permissions?: string[];\n icon?: string;\n}\n\nexport interface AXPEntityPropertyView {\n name: string;\n dataPath?: string;\n permissions?: string[];\n layout?: AXPEntityPropertyLayoutConfig;\n}\n\nexport interface AXPEntityPropertyUpdateView extends AXPEntityPropertyView {}\n\nexport interface AXPEntityPropertyCreateView extends AXPEntityPropertyView {\n defaultValue?: any;\n}\n\nexport interface AXPEntitySectionView {\n id: string;\n order?: number;\n collapsed?: boolean;\n layout?: AXPEntityPropertyLayoutConfig;\n}\n\nexport interface AXPEntityProperty {\n name: string;\n title: string;\n description?: string;\n groupId?: string;\n schema: {\n dataType: string;\n nullable?: boolean;\n readonly?: boolean | string;\n visible?: boolean | string;\n defaultValue?: any | string | ((context: any | null) => any);\n unique?: {\n enabled: boolean;\n };\n interface?: Partial<AXEntityPropertyWidget>;\n };\n options?: AXPEntityPropertyListOptions;\n validations?: AXPValidationRules;\n}\n\n//#endregion\n","//#region ---- Entity definition ----\n\nimport type { AXPExpression, AXPMultiLanguageString, AXPOptionsData, AXPValidationRules } from '@acorex/platform/contracts';\n\nimport type { AXPEntityDetailListView } from './entity-detail-list.types';\nimport type { AXPEntityFormats } from './entity-formats.types';\nimport type { AXPEntityTableColumn } from './entity-display-field.types';\nimport type {\n AXPEntityMasterCreateLayoutView,\n AXPEntityMasterSingleLayoutView,\n AXPEntityMasterUpdateLayoutView,\n} from './entity-layout-view.types';\nimport type { AXPEntityMasterListView } from './entity-master-list.types';\nimport type { AXPRelatedEntity } from './entity-related-layout.types';\nimport type { AXPQueryFilter } from './entity-query-view.types';\nimport type { AXPEntityCommand, AXPEntityQuery } from './entity-action.types';\nimport type { AXPEntityProperty, AXPEntityPropertyGroup } from './entity-property.types';\n\nexport enum AXPRelationshipKind {\n Association,\n Composition,\n Aggregation,\n}\n\nexport enum AXPRelationshipCardinality {\n OneToOne,\n OneToMany,\n ManyToMany,\n}\n\nexport interface AXPRelationship {\n id: string;\n from: string;\n to: string;\n kind: AXPRelationshipKind;\n cardinality: AXPRelationshipCardinality;\n}\n\nexport interface AXPEntity {\n plugins?: { name: string; options?: AXPOptionsData }[];\n /**\n * High-level rules: when expression evaluates true, apply actions to the given targets\n * (property/section/action). Reduces repetition of the same condition across many properties.\n * Evaluation context: form data, user, entity; precedence vs property-level visible/readonly\n * must be defined where rules are applied.\n */\n rules?: Array<{\n name: string;\n expression: AXPExpression;\n actions: Array<{\n target: {\n type: 'property' | 'section' | 'action';\n name: string;\n };\n values: AXPOptionsData;\n }>;\n }>;\n module: string;\n name: string;\n icon?: string;\n parentKey?: string;\n category?: AXPEntityCategoryPlugin;\n title: string;\n formats: AXPEntityFormats;\n relatedEntities?: AXPRelatedEntity[];\n pages?: AXPEntityPage[];\n groups?: AXPEntityPropertyGroup[];\n properties: AXPEntityProperty[];\n columns?: AXPEntityTableColumn[];\n commands?: {\n create?: AXPEntityCommand | undefined;\n update?: AXPEntityCommand | undefined;\n delete?: AXPEntityCommand | undefined;\n [name: string]: AXPEntityCommand | undefined;\n };\n queries?: {\n byKey?: AXPEntityQuery;\n list?: AXPEntityQuery;\n lookup?: AXPEntityQuery;\n history?: AXPEntityQuery;\n comments?: AXPEntityQuery;\n [name: string]: AXPEntityQuery | undefined;\n };\n validations?: AXPValidationRules;\n interfaces?: {\n master?: {\n single?: AXPEntityMasterSingleLayoutView;\n list?: AXPEntityMasterListView;\n create?: AXPEntityMasterCreateLayoutView;\n update?: AXPEntityMasterUpdateLayoutView;\n };\n detail?: {\n list?: AXPEntityDetailListView;\n };\n };\n}\n\nfunction kebabCase(value: string): string {\n return value\n .replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n .replace(/([A-Z])([A-Z][a-z])/g, '$1-$2')\n .replace(/[\\s_]+/g, '-')\n .replace(/-+/g, '-')\n .toLowerCase();\n}\n\nexport function getEntityInfo(entity: AXPEntity) {\n return {\n source: `${entity.module}.${entity.name}`,\n module: {\n route: kebabCase(entity.module),\n },\n entity: {\n route: kebabCase(entity.name),\n },\n };\n}\n\nexport interface AXPEntityPage {\n componentKey: string;\n field?: string;\n title?: AXPMultiLanguageString;\n icon?: string;\n description?: AXPMultiLanguageString;\n layout?: {\n order?: number;\n position?: 'before' | 'after' | 'middle';\n };\n hidden?: boolean | string;\n permissions?: string[];\n appearOn?: {\n create?: boolean;\n update?: boolean;\n };\n options?: Record<string, any>;\n}\n\nexport interface AXPEntityCategoryPlugin {\n entity: string;\n title?: string;\n textField?: string;\n valueField?: string;\n conditions?: AXPQueryFilter[];\n applyConditions?: AXPQueryFilter[];\n}\n\nexport interface AXPEntityVersionHistory {\n enabled?: boolean;\n showInList?: boolean;\n showInDetail?: boolean;\n}\n\nexport interface AXPAggregate {\n id: string;\n name: string;\n title: AXPMultiLanguageString;\n entities: AXPEntity[];\n}\n\nexport interface AXPModule {\n name: string;\n title: AXPMultiLanguageString;\n aggregates: AXPAggregate[];\n relationships?: AXPRelationship[];\n}\n\nexport interface AXPApplication {\n name: string;\n title: AXPMultiLanguageString;\n modules: AXPModule[];\n}\n\nexport enum AXPEntityType {\n Entity,\n AggregateRoot,\n ValueObject,\n}\n\nexport interface AXPEntityV2 {\n version: 2;\n module: string;\n aggregate: string;\n name: string;\n type: AXPEntityType;\n icon?: string;\n title: string;\n description?: string;\n plugins?: { name: string; options?: AXPOptionsData }[];\n pages?: AXPEntityPage[];\n groups?: AXPEntityPropertyGroup[];\n properties: AXPEntityProperty[];\n formats: AXPEntityFormats;\n columns?: AXPEntityTableColumn[];\n validations?: AXPValidationRules;\n interfaces?: {\n master?: {\n single?: AXPEntityMasterSingleLayoutView;\n list?: AXPEntityMasterListView;\n create?: AXPEntityMasterCreateLayoutView;\n update?: AXPEntityMasterUpdateLayoutView;\n };\n detail?: {\n list?: AXPEntityDetailListView;\n };\n };\n}\n\n//#endregion\n","//#region ---- Entity model & DTO types ----\n\nimport type { AXPUserReference } from '@acorex/platform/contracts';\n\nexport interface AXPAuditEvent {\n at?: Date;\n by?: AXPUserReference;\n reason?: string;\n source?: string;\n}\n\nexport interface AXPRecordAuditInfo {\n created?: AXPAuditEvent;\n updated?: AXPAuditEvent;\n deleted?: AXPAuditEvent;\n}\n\nexport interface AXPRecordStateInfo {\n isHidden?: boolean;\n isSystem?: boolean;\n isImmutable?: boolean;\n /** @deprecated Prefer explicit domain modeling over this flag. */\n isDistributed?: boolean;\n}\n\nexport interface AXPRecordOwnershipInfo {\n tenantId?: string;\n applicationId?: string;\n userId?: string;\n}\n\nexport interface AXPRecordWorkflowInfo {\n instanceId?: string | null;\n definitionId?: string | null;\n correlationId?: string | null;\n pinnedVersion?: number | null;\n}\n\nexport interface AXPEntityModel<Id> {\n id: Id;\n auditInfo?: AXPRecordAuditInfo;\n stateInfo?: AXPRecordStateInfo;\n ownershipInfo?: AXPRecordOwnershipInfo;\n workflowInfo?: AXPRecordWorkflowInfo;\n}\n\nexport interface AXPEntityCreateDto {}\n\nexport interface AXPEntityUpdateDto<Id> {\n id: Id;\n}\n\nexport interface AXPEntityOutputDto<Id> {\n id: Id;\n}\n\nexport interface AXPEntityDetailDto<Id> extends AXPEntityOutputDto<Id> {}\n\nexport interface AXPEntityListItemDto<Id> extends AXPEntityOutputDto<Id> {}\n\nexport interface AXPMockDto<Id> extends AXPEntityModel<Id> {}\n\n//#endregion\n","import type { AXPQueryRequest } from '@acorex/platform/contracts';\n\n//#region ---- Aggregate ----\n\nexport type AXPEntityAggregateReducerType = 'count' | 'sum' | 'min' | 'max' | 'avg';\n\nexport interface AXPEntityAggregateMeasure {\n reducer: AXPEntityAggregateReducerType;\n /** Required for sum, min, max, and avg. Ignored for count (rows per group). */\n field?: string;\n /** Result column name; defaults are derived from the reducer and field. */\n alias?: string;\n}\n\n/**\n * Aggregate stored rows after the same filter/sort pipeline as {@link AXPQueryRequest}.\n * Group keys use dotted field paths (same as lodash-style getters).\n */\nexport interface AXPEntityAggregateRequest extends Pick<AXPQueryRequest, 'filter' | 'sort'> {\n groupBy: string[];\n measures: AXPEntityAggregateMeasure[];\n}\n\nexport interface AXPEntityAggregateResult {\n rows: Record<string, unknown>[];\n}\n\n//#endregion\n\n//#region ---- Query all ----\n\nexport interface AXPEntityQueryAllOptions {\n /**\n * Page size for backends that read page-by-page (HTTP API).\n * In-memory backends load the filtered set once and ignore this.\n */\n pageSize?: number;\n /** Maximum rows to return or scan (safety cap). */\n maxRows?: number;\n}\n\nexport interface AXPEntityQueryAllResult<T> {\n items: T[];\n /** Row count matching filter/sort before applying maxRows. */\n total: number;\n /** True when maxRows prevented returning every matching row. */\n truncated: boolean;\n}\n\n//#endregion\n\n//#region ---- Aggregate scan cap ----\n\nexport interface AXPEntityAggregateOptions {\n /** Maximum rows to load for aggregation when the backend pages remotely (default 50_000). */\n maxRows?: number;\n /** Page size for remote paging during aggregate (default 500). */\n pageSize?: number;\n}\n\n//#endregion\n","//#region ---- Entity formats ----\n\nexport interface AXPEntitySearchResultFormat {\n title: string;\n description?: string;\n}\n\nexport interface AXPEntityFormats {\n individual: string;\n plural: string;\n lookup?: string;\n displayName?: string;\n searchResult?: AXPEntitySearchResultFormat;\n}\n\n//#endregion\n","//#region ---- Entity property list options ----\n\nexport interface AXPEntityPropertyFilterOptions {\n advance?: {\n enabled?: boolean;\n widgetType?: string;\n };\n inline?: {\n enabled?: boolean;\n };\n preload?: {\n enabled?: boolean;\n required?: boolean;\n };\n}\n\nexport interface AXPEntityPropertySortOptions {\n enabled?: boolean;\n}\n\nexport interface AXPEntityPropertyListOptions {\n filter?: AXPEntityPropertyFilterOptions;\n sort?: AXPEntityPropertySortOptions;\n}\n\n//#endregion\n","//#region ---- Entity display fields ----\n\n/** Logical alignment for table column header/cell (respects RTL). */\nexport type AXPColumnContentAlign = 'start' | 'center' | 'end';\n\n/**\n * Column alignment: shorthand applies to both header and cell;\n * object form sets each side independently (omitted keys default to start).\n */\nexport type AXPColumnAlign =\n | AXPColumnContentAlign\n | {\n header?: AXPColumnContentAlign;\n cell?: AXPColumnContentAlign;\n };\n\n/** Shared field definition for list layouts (table columns, card fields, etc.). */\nexport interface AXPEntityDisplayField {\n name: string;\n title?: string;\n showAs?: {\n type: string;\n options?: Record<string, any>;\n };\n options?: {\n /** When string, evaluate against parent detail context (e.g. related list). */\n visible?: boolean | string;\n /** Optional dataPath override for field binding. */\n dataPath?: string;\n [name: string]: any;\n };\n}\n\nexport interface AXPEntityTableColumn extends AXPEntityDisplayField {\n options?: AXPEntityDisplayField['options'] & {\n /** Initial column width (overrides widget column width when set). */\n width?: string;\n /** Header/cell alignment (shorthand or per-side). */\n align?: AXPColumnAlign;\n };\n}\n\n//#endregion\n","//#region ---- Entity card fields ----\n\nimport type { AXPExpression, AXStyleColorType } from '@acorex/platform/contracts';\nimport type { AXPEntityPropertyLayoutConfig } from './entity-property.types';\n\nimport type { AXPEntityDisplayField } from './entity-display-field.types';\n\n/** Card layout field presentation in master list card view. */\nexport type AXPCardFieldDisplay = 'simple' | 'badge';\n\n/** Badge color: semantic token or per-row expression (`{{ context.eval(...) }}`). */\nexport type AXPCardBadgeColor = AXStyleColorType | AXPExpression;\n\nexport interface AXPCardBadgeDisplayOptions {\n /** Semantic color or expression evaluated against row context. */\n color?: AXPCardBadgeColor;\n}\n\nexport interface AXPCardBadgeDisplay {\n type: 'badge';\n options?: AXPCardBadgeDisplayOptions;\n}\n\n/** Shorthand (`badge` / `simple`) or structured badge config with optional per-row color. */\nexport type AXPCardFieldDisplayConfig = AXPCardFieldDisplay | AXPCardBadgeDisplay;\n\n/** Card layout field in master list view. */\nexport type AXPCardField = AXPEntityDisplayField & {\n layout?: AXPEntityPropertyLayoutConfig;\n /**\n * Field presentation. Default: `simple` (card body).\n * Use `badge` or `{ type: 'badge', options: { color } }` for header chips beside title.\n */\n display?: AXPCardFieldDisplayConfig;\n /**\n * Badge color when presentation is badge-shaped.\n * Prefer `display: { type: 'badge', options: { color } }` for new definitions.\n * Omit for status fields — color is resolved from the status definition per row.\n */\n badgeColor?: AXPCardBadgeColor;\n};\n\n/** Whether the card field is shown as a header badge (not in the card body). */\nexport function isCardFieldBadgeDisplay(\n display: AXPCardFieldDisplayConfig | undefined,\n): display is 'badge' | AXPCardBadgeDisplay {\n if (display === 'badge') {\n return true;\n }\n return typeof display === 'object' && display !== null && display.type === 'badge';\n}\n\n/** Resolves static badge color config from {@link AXPCardField.display} and legacy {@link AXPCardField.badgeColor}. */\nexport function resolveCardFieldBadgeColor(\n field: Pick<AXPCardField, 'display' | 'badgeColor'>,\n): AXPCardBadgeColor | undefined {\n if (typeof field.display === 'object' && field.display.type === 'badge') {\n return field.display.options?.color ?? field.badgeColor;\n }\n if (field.display === 'badge') {\n return field.badgeColor;\n }\n return undefined;\n}\n\n//#endregion\n","//#region ---- Entity query views ----\n\nimport type { AXDataSourceOperator } from '@acorex/platform/contracts';\n\nexport interface AXPQueryFilter {\n name: string; // entity property name\n operator: AXDataSourceOperator;\n value: any;\n}\n\nexport interface AXPQuerySort {\n name: string; // entity property name\n dir: 'asc' | 'desc';\n}\n\nexport interface AXPQueryView {\n name: string;\n fixed: boolean;\n title: string;\n columns: string[];\n conditions: AXPQueryFilter[];\n sorts: AXPQuerySort[];\n indexCol?: boolean;\n pageSize?: number;\n visible?: boolean;\n}\n\nexport function createQueryView(\n name: string,\n title: string,\n fixed: boolean,\n params: { columns?: string[]; conditions?: any[]; sorts?: AXPQuerySort[] } = {\n columns: [],\n conditions: [],\n sorts: [],\n },\n): AXPQueryView {\n params = Object.assign({ columns: [], sorts: [], conditions: [] }, params);\n return {\n name,\n title,\n fixed,\n columns: params.columns ?? [],\n conditions: params.conditions ?? [],\n sorts: params.sorts ?? [],\n };\n}\n\nexport function createAllQueryView(\n params: { columns?: string[]; conditions?: AXPQueryFilter[]; sorts?: AXPQuerySort[] } | undefined = {\n columns: [],\n sorts: [],\n conditions: [],\n },\n): AXPQueryView {\n params = Object.assign({ columns: [], sorts: [], conditions: [] }, params);\n return createQueryView('all', '@general:terms.interface.selection.all-items', true, {\n columns: params.columns ?? [],\n conditions: params.conditions ?? [],\n sorts: params.sorts ?? [],\n });\n}\n\n//#endregion\n","//#region ---- Entity master list views ----\n\nimport type { AXPEntityAction } from './entity-action.types';\n\nimport { AXPExpression } from '@acorex/platform/contracts';\nimport type { AXPCardField } from './entity-card-field.types';\nimport type { AXPEntityTableColumn } from './entity-display-field.types';\nimport type { AXPQueryView } from './entity-query-view.types';\n\nexport interface AXPEntityMasterListView {\n title?: string;\n description?: string;\n actions?: AXPEntityAction[];\n views: AXPQueryView[];\n layouts?: {\n table?: {\n enabled?: boolean;\n columns: AXPEntityTableColumn[];\n cssClass?: {\n row?: AXPExpression;\n cell?: AXPExpression;\n };\n };\n card?: {\n enabled?: boolean;\n header: {\n /** Property path, expression (`{{ ... }}`), or literal — evaluated per row. */\n title?: string;\n description?: string;\n icon?: string;\n };\n fields: AXPCardField[];\n };\n };\n}\n\nexport type AXPEntityMasterListLayoutType = 'table' | 'card';\n\n/** Master list presentation: table or card with compact (collapsed) / expanded bodies. */\nexport type AXPEntityMasterListDisplayMode = 'table' | 'card-compact' | 'card-expanded';\n\nexport interface AXPEntityMasterListLayoutOption {\n id: AXPEntityMasterListLayoutType;\n title: string;\n icon?: string;\n}\n\n/** Resolves master list layouts that are currently enabled. */\nexport function resolveEnabledMasterListLayouts(\n layouts?: AXPEntityMasterListView['layouts'],\n): AXPEntityMasterListLayoutType[] {\n if (!layouts) {\n return ['table'];\n }\n\n const enabled: AXPEntityMasterListLayoutType[] = [];\n\n if (layouts.table?.enabled !== false) {\n enabled.push('table');\n }\n\n if (layouts.card && layouts.card.enabled !== false) {\n enabled.push('card');\n }\n\n return enabled.length > 0 ? enabled : ['table'];\n}\n\n/** First enabled layout; used as the default when no user preference is stored. */\nexport function resolveDefaultMasterListLayout(\n layouts?: AXPEntityMasterListView['layouts'],\n): AXPEntityMasterListLayoutType {\n return resolveEnabledMasterListLayouts(layouts)[0];\n}\n\n//#endregion\n","//#region ---- Entity detail list views ----\n\nimport type { AXPEntityAction } from './entity-action.types';\n\nimport type { AXPEntityTableColumn } from './entity-display-field.types';\n\nexport interface AXPEntityDetailListView {\n title?: string;\n description?: string;\n columns: AXPEntityTableColumn[];\n actions?: AXPEntityAction[];\n}\n\n//#endregion\n","//#region ---- Entity layout views ----\n\nimport type { AXPEntityAction } from './entity-action.types';\nimport type {\n AXPEntityPropertyLayoutConfig,\n AXPEntityPropertyView,\n AXPEntitySectionView,\n} from './entity-property.types';\nimport type { AXPopupSizeType } from '@acorex/platform/contracts';\n\nexport interface AXPEntityMasterLayoutView {\n title?: string;\n sections: AXPEntitySectionView[];\n properties?: AXPEntityPropertyView[];\n}\n\n/** Quick create config for lookup widgets (+ button) - uses subset of create form */\nexport interface AXPEntityQuickCreate {\n enabled?: boolean;\n properties?: string[];\n layout?: {\n size?: AXPopupSizeType;\n };\n excludeProperties?: string[];\n}\n\nexport interface AXPEntityMasterCreateLayoutView extends AXPEntityMasterLayoutView {\n steps?: {\n id: string;\n title: string;\n description?: string;\n };\n /** Quick create config for lookup widgets - uses subset of create form */\n quickCreate?: AXPEntityQuickCreate;\n}\n\nexport interface AXPEntityMasterUpdateLayoutView extends AXPEntityMasterLayoutView {}\n\nexport interface AXPEntityMasterSingleLayoutView extends AXPEntityMasterLayoutView {\n title: string;\n description?: string;\n actions?: AXPEntityAction[];\n}\n\n//#endregion\n","//#region ---- Related entity layout ----\n\nimport type { AXPExpression } from '@acorex/platform/contracts';\nimport type { AXPEntityAction } from './entity-action.types';\n\nimport type { AXPEntityTableColumn } from './entity-display-field.types';\nimport type { AXPEntityListFilterDefinition } from './entity-list-filter.types';\nimport type { AXPQueryFilter } from './entity-query-view.types';\n\nexport interface AXPRelatedEntityLayout {\n type: 'tab-detail' | 'tab-list' | 'page-detail' | 'page-list' | 'merge-detail';\n order?: number;\n position?: 'before' | 'after' | 'middle';\n}\n\nexport interface AXPRelatedEntityPersistence {\n strategy?: 'embedded' | 'referenced';\n idField?: string;\n dataPath?: string;\n map?: Record<string, string>;\n hydrate?: 'eager' | 'lazy';\n cascade?: { delete?: 'none' | 'orphans' | 'all' };\n foreignKeyField?: string;\n}\n\nexport interface AXPRelatedEntity {\n entity: string;\n title?: string;\n icon?: string;\n columns?: string[] | AXPEntityTableColumn[];\n properties?: string[];\n excludeProperties?: string[];\n layout?: AXPRelatedEntityLayout;\n conditions?: AXPQueryFilter[];\n customFilterDefinitions?: Partial<AXPEntityListFilterDefinition>[];\n hidden?: boolean | AXPExpression;\n actions?: AXPEntityAction[];\n /**\n * Controls inclusion on the host entity master **create** / **update** form.\n * Defaults depend on layout:\n * - **merge-detail**: omitted flags behave as **true** (opt-out with `false`).\n * - **tab-list** / **page-list**: omitted flags behave as **false** (opt-in with `true`).\n */\n appearOn?: {\n /** Include on host create form (see defaults above per layout type). */\n create?: boolean;\n /** Include on host update form (see defaults above per layout type). */\n update?: boolean;\n };\n /**\n * Host master-list filter policy for merge-detail related data.\n * When omitted, filterable related properties referenced by host columns (or `properties`) are included.\n */\n filter?: {\n /** Include related filterable properties on the host list (default: true). */\n enabled?: boolean;\n };\n /**\n * Relationship-level persistence strategy for merge-detail data.\n * Defaults:\n * - strategy: 'embedded'\n * - idField: last segment of dataPath + 'Id' (or 'relatedId' when dataPath is missing)\n * - map: undefined (pass-through)\n * - hydrate: 'eager' (applies to getOne only in mock)\n * - cascade.delete: 'none'\n */\n persistence?: AXPRelatedEntityPersistence;\n}\n\n//#endregion\n","//#region ---- Entity list filters ----\n\nimport type { AXPFilterDefinition } from '@acorex/platform/contracts';\n\nexport interface AXPEntityListFilterDefinition extends AXPFilterDefinition {\n /**\n * Lodash-get path for inline `contains` queries on lookup/select properties.\n * Keeps `field` as the property name for advance filters and filter widget binding.\n */\n inlineQueryField?: string;\n /**\n * Flat filter UI context key when `field` contains dots (merge-detail paths).\n * Widget binding uses this key; storage queries still use `field`.\n */\n contextField?: string;\n}\n\n/** Encodes a dotted storage path as a flat filter context key (e.g. `person.lastName` → `person__lastName`). */\nexport function encodeEntityListFilterContextField(queryField: string): string {\n return queryField.replace(/\\./g, '__');\n}\n\n/**\n * Resolves the flat context key used by query-filters / widget binding for a filter definition.\n */\nexport function resolveEntityListFilterContextField(\n filter: Pick<AXPEntityListFilterDefinition, 'field' | 'contextField'>,\n): string {\n const explicit = filter.contextField?.trim();\n if (explicit) {\n return explicit;\n }\n\n const field = filter.field?.trim();\n if (!field) {\n return '';\n }\n\n return field.includes('.') ? encodeEntityListFilterContextField(field) : field;\n}\n\n/**\n * Maps an entity list filter definition to the storage query field.\n * Inline `contains` filters on lookup/select use `inlineQueryField` (display text path).\n */\nexport function resolveEntityListFilterQueryField(\n filter: Pick<AXPFilterDefinition, 'field' | 'operator'> & Pick<AXPEntityListFilterDefinition, 'inlineQueryField'>,\n operator?: { type?: string },\n): string | undefined {\n const operatorType = operator?.type ?? filter.operator?.type;\n if (operatorType === 'contains' && filter.inlineQueryField) {\n return filter.inlineQueryField;\n }\n return filter.field;\n}\n\n//#endregion\n","import type { AXPContextData, AXPExpression } from '@acorex/platform/contracts';\n\n//#region ---- Lookup widget types ----\n\nexport interface AXPLookupWidgetCreateOptions {\n enable?: boolean;\n context?: AXPContextData;\n}\n\nexport interface ResolvedLookupCreateOptions {\n enabled: boolean;\n mode: 'none' | 'full' | 'quick';\n context?: AXPContextData;\n}\n\nexport type AXPLookupWidgetLookType = 'select' | 'lookup';\n\n/**\n * How the lookup column resolves related items for display in entity lists.\n * - `hydrated`: titles (and optional ids) are already on the row; inline preview + overflow popover use row data only.\n * - `idsWithCount`: ids and optional count live on the row; the cell shows a count summary and loads titles via entity `byKey` when the popover opens.\n * - `countOnly`: only a count is on the row; the popover loads ids/titles via a registered `AXPQuery` when opened.\n */\nexport type AXPLookupColumnResolveStrategy = 'hydrated' | 'idsWithCount' | 'countOnly';\n\n/**\n * Column list only: controls how the lookup column loads and displays related items in grids.\n * Omitted or empty strategy defaults to `hydrated` at runtime.\n */\nexport interface AXPLookupColumnResolveOptions {\n /** Default `hydrated` when omitted. */\n strategy?: AXPLookupColumnResolveStrategy;\n /** Lodash-style path on `rowData` for the displayed count (e.g. `rolesCount`). */\n countFieldPath?: string;\n /** Lodash-style path on `rowData` for the related id list (`idsWithCount`). If omitted, the column `rawValue` is used. */\n idsPath?: string;\n /** Registered query key for `AXPQueryExecutor.fetch` when using `countOnly`. */\n queryKey?: string;\n /**\n * Maps query input property names to lodash-style paths on `rowData` (e.g. `{ \"userId\": \"id\" }`).\n * May be a JSON string when set from the layout designer text field.\n */\n queryParams?: Record<string, string> | string;\n /**\n * Dot path into the named query result for the items array. Defaults to `items` when the result is an object.\n * If the query returns an array directly, leave unset and handle at runtime.\n */\n queryResultItemsPath?: string;\n}\n\nexport interface AXPLookupDisplayOptions {\n displayFormat?: string;\n textField?: string;\n isMultiLanguage?: (value: unknown) => boolean;\n}\n\n/** Column list: entity detail popover when clicking a lookup value. */\nexport interface AXPLookupPopoverOptions {\n /** When `false`, lookup values are not clickable and the detail popover does not open. Default `true`. */\n enabled?: boolean;\n}\n\n/** Row actions to show in the lookup data selector popup (subset of entity list actions). */\nexport interface AXPLookupSelectorRowActionsConfig {\n /** Primary icon buttons (e.g. preview). Match full command name or suffix such as `:Preview`. */\n primary?: string[];\n /** Secondary actions in the row dropdown menu. */\n secondary?: string[];\n}\n\nexport interface AXPLookupWidgetOptions {\n disabled?: boolean | AXPExpression;\n readonly?: boolean | AXPExpression;\n placeholder?: string;\n expose?: string | string[];\n look?: AXPLookupWidgetLookType;\n allowClear?: boolean;\n /** Inline entity create configuration. */\n create?: AXPLookupWidgetCreateOptions;\n /** @deprecated Use create.enable; still supported for create mode (quick/full). */\n allowCreate?: 'none' | 'full' | 'quick';\n displayFormat?: string;\n /** Column list: entity detail popover behavior. */\n popover?: AXPLookupPopoverOptions;\n /** Column list: lazy resolve and summary behavior. */\n columnResolve?: AXPLookupColumnResolveOptions;\n /** Lookup selector popup: entity row actions to display. */\n selectorRowActions?: AXPLookupSelectorRowActionsConfig;\n}\n\n//#endregion\n","//#region ---- Types barrel ----\n\nexport * from './entity-action.types';\nexport * from './entity-property.types';\nexport * from './entity-definition.types';\nexport * from './entity-model.types';\nexport * from './entity-storage.types';\nexport * from './entity-formats.types';\nexport * from './entity-property-list.types';\nexport * from './entity-display-field.types';\nexport * from './entity-card-field.types';\nexport * from './entity-query-view.types';\nexport * from './entity-master-list.types';\nexport * from './entity-detail-list.types';\nexport * from './entity-layout-view.types';\nexport * from './entity-related-layout.types';\nexport * from './entity-list-filter.types';\nexport * from './lookup-widget.types';\n\n//#endregion\n","//#region ---- Entity action helpers (pure data, no Angular) ----\n\nimport type { AXPEntityAction } from '../types/entity-action.types';\nimport type { AXPQueryFilter, AXPRelatedEntity } from '../types';\nimport { AXPEntityCommandScope } from '../types/entity-action.types';\nimport { AXPSystemActionType } from '@acorex/platform/contracts';\n\n//#region Master\n\nexport function entityMasterCreateAction(): AXPEntityAction {\n return {\n title: '@general:actions.create.title',\n command: {\n name: 'Entity:Create',\n },\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n };\n}\n\nexport function entityMasterEditAction(): AXPEntityAction {\n return {\n title: '@general:actions.edit.title',\n command: 'Entity:Update',\n priority: 'secondary',\n type: AXPSystemActionType.Update,\n scope: AXPEntityCommandScope.Individual,\n default: true,\n };\n}\n\nexport function entityMasterBulkDeleteAction(): AXPEntityAction {\n return {\n title: '@general:actions.delete-items.title',\n command: 'delete-entity',\n priority: 'primary',\n type: AXPSystemActionType.Delete,\n scope: AXPEntityCommandScope.Selected,\n order: 100,\n };\n}\n\nexport function entityMasterViewAction(): AXPEntityAction {\n return {\n title: '@general:actions.view.title',\n command: 'open-entity',\n priority: 'secondary',\n type: AXPSystemActionType.View,\n scope: AXPEntityCommandScope.Individual,\n default: true,\n };\n}\n\nexport function entityMasterDeleteAction(): AXPEntityAction {\n return {\n title: '@general:actions.delete.title',\n command: 'delete-entity',\n priority: 'secondary',\n type: AXPSystemActionType.Delete,\n scope: AXPEntityCommandScope.Individual,\n order: 100,\n shortcuts: ['ctrl+shift+delete'],\n };\n}\n\nexport function entityMasterCrudActions(options?: {\n create?: boolean;\n delete?: boolean;\n view?: boolean;\n edit?: boolean;\n}): AXPEntityAction[] {\n const opts = {\n create: true,\n delete: true,\n view: true,\n edit: false,\n ...options,\n };\n const actions: AXPEntityAction[] = [];\n\n if (opts.create) {\n actions.push(entityMasterCreateAction());\n }\n if (opts.delete) {\n actions.push(entityMasterBulkDeleteAction());\n actions.push(entityMasterDeleteAction());\n }\n if (opts.view) {\n actions.push(entityMasterViewAction());\n }\n\n if (opts.edit) {\n actions.push(entityMasterEditAction());\n }\n\n return actions;\n}\n\nexport function entityMasterRecordActions(): AXPEntityAction[] {\n return [entityMasterDeleteAction()];\n}\n\n//#endregion\n\n//#region Details\n\nexport function entityDetailsCreateActions(parentId: string): AXPEntityAction {\n return {\n title: '@general:actions.create.title',\n command: {\n name: 'Entity:Create',\n options: {\n process: {\n redirect: false,\n canCreateNewOne: true,\n data: {\n [parentId]: '{{context.eval(\"id\")}}',\n },\n },\n },\n },\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n };\n}\n\nexport function entityDetailsCreateActionsDeferredParent(): AXPEntityAction {\n return {\n title: '@general:actions.create.title',\n command: {\n name: 'Entity:Create',\n options: {\n process: {\n redirect: false,\n canCreateNewOne: true,\n data: {},\n },\n },\n },\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n };\n}\n\nexport function mergeForeignKeyFieldIntoCreateActions(\n foreignKeyField: string | undefined,\n actions: AXPEntityAction[] | undefined,\n): AXPEntityAction[] {\n if (!foreignKeyField || !actions?.length) {\n return actions ?? [];\n }\n return actions.map((a) => {\n const cmd = a.command;\n if (\n typeof cmd !== 'object' ||\n !cmd ||\n cmd.name !== 'Entity:Create' ||\n a.scope !== AXPEntityCommandScope.TypeLevel\n ) {\n return a;\n }\n const opts = (cmd.options ?? {}) as Record<string, unknown>;\n const proc = (opts['process'] ?? {}) as Record<string, unknown>;\n const data = { ...((proc['data'] as Record<string, unknown>) ?? {}) };\n if (data[foreignKeyField] === undefined || data[foreignKeyField] === null || data[foreignKeyField] === '') {\n data[foreignKeyField] = '{{ context.eval(\"id\") }}';\n }\n return {\n ...a,\n command: {\n ...cmd,\n options: { ...opts, process: { ...proc, data } },\n },\n } as AXPEntityAction;\n });\n}\n\nexport function collectNestedCreateHiddenProperties(relatedEntity: AXPRelatedEntity): string[] | undefined {\n const fk = relatedEntity.persistence?.foreignKeyField;\n const merged = [...(relatedEntity.excludeProperties ?? [])];\n if (fk) {\n merged.push(fk);\n }\n const unique = [...new Set(merged)];\n return unique.length ? unique : undefined;\n}\n\nexport function entityDetailsSimpleCondition(fk: string): AXPQueryFilter {\n return {\n name: fk,\n operator: { type: 'equal' },\n value: '{{context.eval(\"id\")}}',\n };\n}\n\nexport function entityDetailsReferenceCondition(type: string): AXPQueryFilter[] {\n return [\n {\n name: 'reference.id',\n operator: { type: 'equal' },\n value: '{{context.eval(\"id\")}}',\n },\n {\n name: 'reference.type',\n operator: { type: 'equal' },\n value: type,\n },\n ];\n}\n\nexport function entityDetailsEditAction(): AXPEntityAction {\n return {\n title: '@general:actions.edit.title',\n command: 'Entity:Update',\n priority: 'secondary',\n type: AXPSystemActionType.Update,\n default: true,\n scope: AXPEntityCommandScope.Individual,\n };\n}\n\nexport function entityDetailsNewEditAction(): AXPEntityAction {\n return {\n title: 'New Edit',\n command: {\n name: 'Entity:Update',\n },\n priority: 'secondary',\n type: AXPSystemActionType.Update,\n default: true,\n scope: AXPEntityCommandScope.Individual,\n };\n}\n\nexport function entityOverrideDetailsViewAction(): AXPEntityAction {\n return {\n title: '@general:actions.view.title',\n command: 'open-entity',\n priority: 'secondary',\n hidden: true,\n type: AXPSystemActionType.View,\n scope: AXPEntityCommandScope.Individual,\n };\n}\n\nexport function entityDetailsCrudActions(\n parentId?: string,\n options?: {\n create?: boolean;\n delete?: boolean;\n view?: boolean;\n edit?: boolean;\n },\n): AXPEntityAction[] {\n const opts = {\n create: true,\n delete: true,\n view: true,\n edit: true,\n ...options,\n };\n const actions: AXPEntityAction[] = [];\n if (opts.create) {\n if (parentId) {\n actions.push(entityDetailsCreateActions(parentId));\n } else {\n actions.push(entityDetailsCreateActionsDeferredParent());\n }\n }\n if (opts.edit) {\n actions.push(entityDetailsEditAction());\n }\n if (opts.view) {\n actions.push(entityOverrideDetailsViewAction());\n }\n return actions;\n}\n\nexport function entityDetailsReferenceCreateActions(type: string): AXPEntityAction[] {\n return [\n {\n title: '@general:actions.create.title',\n command: {\n name: 'Entity:Create',\n options: {\n process: {\n redirect: false,\n canCreateNewOne: true,\n data: {\n reference: {\n id: '{{context.eval(\"id\")}}',\n type: type,\n },\n },\n },\n },\n },\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n entityDetailsEditAction(),\n entityOverrideDetailsViewAction(),\n ];\n}\n\n//#endregion\n","//#region ---- Helpers barrel ----\n\nexport * from './entity-action.helpers';\n\n//#endregion\n","//#region ---- Template normalization ----\n\n/**\n * Normalizes display templates before expression evaluation.\n * Converts simple dot paths (e.g. `{{ position.title }}`) to `context.eval(\"position.title\")`.\n */\nexport function normalizeExpressionTemplate(template: string): string {\n let normalized = template.replace(\n /\\{\\{\\s*context\\.eval\\(['\"]([^'\"]+)['\"]\\)\\s*\\}\\}/g,\n '{{ context.eval(\"$1\") }}',\n );\n\n if (!normalized.includes('{{')) {\n normalized = normalized.replace(/\\{/g, '{{').replace(/\\}/g, '}}');\n }\n\n return normalized.replace(\n /\\{\\{\\s*(?!context\\.)([\\w]+(?:\\.[\\w]+)*)\\s*\\}\\}/g,\n '{{ context.eval(\"$1\") }}',\n );\n}\n\n/** @see normalizeExpressionTemplate */\nexport const normalizeEntityDisplayTemplate = normalizeExpressionTemplate;\n\n/** True when formatted text still contains unresolved template markers. */\nexport function isUnresolvedEntityDisplayTemplate(value: string): boolean {\n return /\\{\\{/.test(value) || /context\\.eval\\s*\\(/.test(value) || value === '[object Object]';\n}\n\n/**\n * Strips literal `undefined` / `null` tokens produced when expression segments are missing.\n */\nexport function sanitizeResolvedEntityDisplayTitle(value: string): string {\n const trimmed = value.trim();\n if (!trimmed) {\n return '';\n }\n\n const withoutLiterals = trimmed\n .replace(/\\bundefined\\b/gi, ' ')\n .replace(/\\bnull\\b/gi, ' ')\n .replace(/\\s+/g, ' ')\n .trim();\n\n return withoutLiterals\n .replace(/^[\\s\\-–—·|/,()+]+|[\\s\\-–—·|/,()+]+$/g, '')\n .trim();\n}\n\n/** True when a resolved title is non-empty and safe to show in search or entity chrome. */\nexport function isMeaningfulEntityDisplayTitle(value: string): boolean {\n const sanitized = sanitizeResolvedEntityDisplayTitle(value);\n return sanitized.length > 0 && !isUnresolvedEntityDisplayTemplate(sanitized);\n}\n\nexport function isRowBoundEntityDisplayTemplate(template: string): boolean {\n const trimmed = template.trim();\n if (!trimmed || trimmed.startsWith('@')) {\n return false;\n }\n return trimmed.includes('{{') || trimmed.includes('{');\n}\n\n//#endregion\n","import type { AXPEntity } from '../types/entity-definition.types';\n\n//#region ---- Types ----\n\nexport interface AXPEntityPropertyExposeEntry {\n source: string;\n target: string;\n}\n\nexport type AXPEntityPropertyLike = {\n name: string;\n schema?: {\n interface?: {\n options?: Record<string, unknown>;\n };\n };\n};\n\n//#endregion\n\n//#region ---- Expose parsing ----\n\n/**\n * Parses lookup/select `expose` entries from a property interface options object.\n */\nexport function parsePropertyExposeEntries(\n options: Record<string, unknown> | undefined,\n): AXPEntityPropertyExposeEntry[] {\n const expose = options?.['expose'];\n if (!Array.isArray(expose)) {\n return [];\n }\n\n return expose.filter(\n (row): row is AXPEntityPropertyExposeEntry =>\n row != null &&\n typeof row === 'object' &&\n typeof (row as { source?: unknown }).source === 'string' &&\n typeof (row as { target?: unknown }).target === 'string',\n );\n}\n\n/**\n * Collects all non-empty `expose[].target` paths from a property.\n */\nexport function collectPropertyExposeTargetPaths(property: AXPEntityPropertyLike): string[] {\n const opts = property.schema?.interface?.options;\n if (!opts || typeof opts !== 'object') {\n return [];\n }\n\n const paths = new Set<string>();\n for (const entry of parsePropertyExposeEntries(opts)) {\n const target = entry.target.trim();\n if (target) {\n paths.add(target);\n }\n }\n return [...paths];\n}\n\n/**\n * Resolves list column `options.dataPath` for a property when explicitly set.\n */\nexport function resolveEntityColumnDataPath(\n entity: AXPEntity | null | undefined,\n propertyName: string,\n): string | undefined {\n const column = entity?.columns?.find((c) => c.name === propertyName);\n const rawDataPath = column?.options?.['dataPath'];\n if (typeof rawDataPath !== 'string') {\n return undefined;\n }\n\n const dataPath = rawDataPath.trim();\n if (!dataPath || dataPath === propertyName) {\n return undefined;\n }\n return dataPath;\n}\n\n/**\n * Resolves the lodash-get path for lookup/select display text from expose metadata.\n */\nexport function resolvePropertyExposeDisplayTarget(\n options: Record<string, unknown> | undefined,\n): string | undefined {\n if (!options) {\n return undefined;\n }\n\n const textField = typeof options['textField'] === 'string' ? options['textField'].trim() : '';\n const valueField = typeof options['valueField'] === 'string' ? options['valueField'].trim() : 'id';\n const entries = parsePropertyExposeEntries(options);\n\n if (textField) {\n const match = entries.find((entry) => entry.source === textField);\n if (match?.target.trim()) {\n return match.target.trim();\n }\n }\n\n const displayEntry = entries.find(\n (entry) => entry.source !== valueField && entry.source !== 'id' && entry.target.trim(),\n );\n return displayEntry?.target.trim();\n}\n\n/**\n * Resolves the lodash-get path used for inline `contains` filters on lookup/select properties.\n * Prefers list column `dataPath`, then lookup `expose` target for `textField` (or first non-id expose).\n * Returns `undefined` when the property name should be used as-is (e.g. plain text fields).\n */\nexport function resolveEntityPropertyInlineFilterField(\n entity: AXPEntity | null | undefined,\n property: AXPEntityPropertyLike,\n): string | undefined {\n if (!entity || !property?.name) {\n return undefined;\n }\n\n const dataPath = resolveEntityColumnDataPath(entity, property.name);\n if (dataPath) {\n return dataPath;\n }\n\n const opts = property.schema?.interface?.options;\n if (!opts || typeof opts !== 'object') {\n return undefined;\n }\n\n return resolvePropertyExposeDisplayTarget(opts);\n}\n\n//#endregion\n","import type { AXPEntity } from '../types/entity-definition.types';\n\nimport {\n isRowBoundEntityDisplayTemplate,\n normalizeEntityDisplayTemplate,\n} from './entity-display-template.util';\n\n//#region ---- Types ----\n\nexport interface AXPEntitySearchTitleContext {\n /** Templates tried after the primary `searchResult.title` fails (`single.title`, lookup, individual). */\n fallbackTemplates: string[];\n /** Entity property paths tried when templates do not resolve (`lookup`, identifier, common fields). */\n fallbackFields: string[];\n}\n\n//#endregion\n\n//#region ---- Entity metadata ----\n\nconst DEFAULT_DISPLAY_FIELD_CANDIDATES = [\n 'title',\n 'name',\n 'code',\n 'fullName',\n 'displayName',\n 'subject',\n 'description',\n] as const;\n\nfunction entityHasProperty(entity: AXPEntity, path: string): boolean {\n const root = path.split('.')[0];\n return entity.properties?.some((property) => property.name === root) ?? false;\n}\n\nfunction resolveEntityDisplayPropertyPaths(entity: AXPEntity): string[] {\n const paths: string[] = [];\n const add = (path?: string) => {\n const trimmed = path?.trim();\n if (!trimmed || trimmed.includes('{') || paths.includes(trimmed)) {\n return;\n }\n if (entityHasProperty(entity, trimmed)) {\n paths.push(trimmed);\n }\n };\n\n const lookupFormat = entity.formats?.lookup?.trim();\n if (lookupFormat && !lookupFormat.includes('{')) {\n add(lookupFormat);\n }\n\n for (const candidate of DEFAULT_DISPLAY_FIELD_CANDIDATES) {\n add(candidate);\n }\n\n const identifierPlugin = entity.plugins?.find((plugin) => plugin.name === 'identifier');\n const identifierField = identifierPlugin?.options?.['field'];\n if (typeof identifierField === 'string') {\n add(identifierField);\n }\n\n if (paths.length === 0) {\n const firstStringProperty = entity.properties?.find(\n (property) => property.schema?.dataType === 'string' && property.name !== 'id',\n );\n add(firstStringProperty?.name);\n }\n\n return paths;\n}\n\n/**\n * Builds entity-scoped fallback metadata for global search (registered on each entity search definition).\n */\nexport function buildEntitySearchTitleContext(\n entity: AXPEntity,\n primaryTemplate?: string,\n): AXPEntitySearchTitleContext {\n const fallbackTemplates: string[] = [];\n const normalizedPrimary = primaryTemplate?.trim()\n ? normalizeEntityDisplayTemplate(primaryTemplate.trim())\n : undefined;\n\n const addTemplate = (raw?: string) => {\n const trimmed = raw?.trim();\n if (!trimmed || !isRowBoundEntityDisplayTemplate(trimmed)) {\n return;\n }\n const normalized = normalizeEntityDisplayTemplate(trimmed);\n if (!normalized || normalized === normalizedPrimary || fallbackTemplates.includes(normalized)) {\n return;\n }\n fallbackTemplates.push(normalized);\n };\n\n addTemplate(entity.interfaces?.master?.single?.title);\n addTemplate(entity.formats?.lookup);\n addTemplate(entity.formats?.individual);\n\n return {\n fallbackTemplates,\n fallbackFields: resolveEntityDisplayPropertyPaths(entity),\n };\n}\n\n/**\n * Row title template chain aligned with entity layouts.\n * Priority: `interfaces.master.single.title` → `formats.searchResult.title` → `formats.individual`.\n */\nexport function resolveEntityRowTitleTemplate(entity: AXPEntity | null | undefined): string | undefined {\n if (!entity) {\n return undefined;\n }\n\n const singleTitle = entity.interfaces?.master?.single?.title?.trim();\n if (singleTitle && isRowBoundEntityDisplayTemplate(singleTitle)) {\n return normalizeEntityDisplayTemplate(singleTitle);\n }\n\n const searchTitle = entity.formats?.searchResult?.title?.trim();\n if (searchTitle && isRowBoundEntityDisplayTemplate(searchTitle)) {\n return normalizeEntityDisplayTemplate(searchTitle);\n }\n\n const lookupFormat = entity.formats?.lookup?.trim();\n if (lookupFormat && isRowBoundEntityDisplayTemplate(lookupFormat)) {\n return normalizeEntityDisplayTemplate(lookupFormat);\n }\n\n const individual = entity.formats?.individual?.trim();\n if (individual && isRowBoundEntityDisplayTemplate(individual)) {\n return normalizeEntityDisplayTemplate(individual);\n }\n\n return undefined;\n}\n\n/**\n * Record title template for modify popups: `interfaces.master.update.title` → `single.title`.\n */\nexport function resolveEntityModifyRecordTitleTemplate(\n entity: AXPEntity | null | undefined,\n): string | undefined {\n if (!entity) {\n return undefined;\n }\n\n const updateTitle = entity.interfaces?.master?.update?.title?.trim();\n if (updateTitle && isRowBoundEntityDisplayTemplate(updateTitle)) {\n return normalizeEntityDisplayTemplate(updateTitle);\n }\n\n const singleTitle = entity.interfaces?.master?.single?.title?.trim();\n if (singleTitle && isRowBoundEntityDisplayTemplate(singleTitle)) {\n return normalizeEntityDisplayTemplate(singleTitle);\n }\n\n return undefined;\n}\n\n//#endregion\n","import type { AXPEntity } from '../types/entity-definition.types';\n\nimport { collectPropertyExposeTargetPaths } from './entity-property-display-path.util';\n\n//#region ---- Types ----\n\nexport type AXPCollectEntityQuickSearchPathsResolver = (\n moduleName: string,\n entityName: string,\n) => Promise<AXPEntity | null>;\n\n//#endregion\n\n//#region ---- Quick search: schema-driven field paths ----\n\nconst NON_TEXT_DATATYPES = new Set([\n 'number',\n 'integer',\n 'int',\n 'long',\n 'float',\n 'double',\n 'decimal',\n 'money',\n 'currency',\n 'boolean',\n 'bool',\n 'date',\n 'datetime',\n 'time',\n 'object',\n 'array',\n 'json',\n 'image',\n 'file',\n 'binary',\n]);\n\n/**\n * Whether an entity property likely stores free text worth a `contains` quick-search clause.\n */\nfunction isTextLikeDataType(dataType: string | undefined): boolean {\n const dt = (dataType ?? 'string').toLowerCase().trim();\n if (!dt || NON_TEXT_DATATYPES.has(dt)) {\n return false;\n }\n return true;\n}\n\n/**\n * Lodash-get paths for quick search from a single entity definition: string-like property names\n * plus lookup `expose[].target` paths (e.g. `brand.title`).\n */\nexport function collectQuickSearchPathsFromSingleEntityDefinition(entity: AXPEntity | null | undefined): string[] {\n if (!entity?.properties?.length) {\n return [];\n }\n\n const paths = new Set<string>();\n\n for (const property of entity.properties) {\n if (isTextLikeDataType(property.schema?.dataType)) {\n paths.add(property.name);\n }\n\n for (const target of collectPropertyExposeTargetPaths(property)) {\n paths.add(target);\n }\n }\n\n return [...paths];\n}\n\n//#endregion\n\n//#region ---- Column-derived nested paths ----\n\n/**\n * Adds dotted paths from master columns (`name` or `options.dataPath`), e.g. `person.fullName`, `jobDefinition.title`.\n */\nexport function collectNestedFieldPathsFromEntityColumns(entity: AXPEntity | null | undefined): string[] {\n if (!entity?.columns?.length) {\n return [];\n }\n\n const paths = new Set<string>();\n\n for (const col of entity.columns) {\n const name = col.name.trim();\n if (name.includes('.')) {\n paths.add(name);\n }\n\n const rawDp = col.options?.['dataPath'];\n if (typeof rawDp === 'string') {\n const dp = rawDp.trim();\n if (dp.includes('.')) {\n paths.add(dp);\n }\n }\n }\n\n return [...paths];\n}\n\n//#endregion\n\n//#region ---- Related merge-detail paths ----\n\nfunction parseRelatedEntityFullName(fullName: string): { moduleName: string; entityName: string } | null {\n const t = fullName.trim();\n const idx = t.indexOf('.');\n if (idx <= 0 || idx >= t.length - 1) {\n return null;\n }\n return {\n moduleName: t.slice(0, idx),\n entityName: t.slice(idx + 1),\n };\n}\n\n//#endregion\n\n//#region ---- Public API ----\n\n/**\n * Collects lodash-get field paths used for mock/API quick search (`contains` / OR filters):\n * host properties and lookup expose targets, dotted column paths, and merge-detail related entities\n * prefixed with the related entity merge `persistence.dataPath` (e.g. `person.firstName`).\n */\nexport async function collectEntityQuickSearchFieldPaths(\n entity: AXPEntity | null | undefined,\n resolveRelatedDefinition: AXPCollectEntityQuickSearchPathsResolver,\n): Promise<string[]> {\n if (!entity) {\n return [];\n }\n\n const paths = new Set<string>();\n\n for (const p of collectQuickSearchPathsFromSingleEntityDefinition(entity)) {\n paths.add(p);\n }\n\n for (const p of collectNestedFieldPathsFromEntityColumns(entity)) {\n paths.add(p);\n }\n\n const related = entity.relatedEntities ?? [];\n for (const rel of related) {\n const dataPath = rel.persistence?.dataPath?.trim();\n if (!dataPath || rel.layout?.type !== 'merge-detail') {\n continue;\n }\n\n const parsed = rel.entity ? parseRelatedEntityFullName(rel.entity) : null;\n if (!parsed) {\n continue;\n }\n\n const relatedDef = await resolveRelatedDefinition(parsed.moduleName, parsed.entityName);\n if (!relatedDef) {\n continue;\n }\n\n for (const p of collectQuickSearchPathsFromSingleEntityDefinition(relatedDef)) {\n paths.add(`${dataPath}.${p}`);\n }\n\n for (const p of collectNestedFieldPathsFromEntityColumns(relatedDef)) {\n paths.add(`${dataPath}.${p}`);\n }\n }\n\n return [...paths];\n}\n\nexport { resolveEntityPropertyInlineFilterField } from './entity-property-display-path.util';\n\n//#endregion\n","import type { AXPEntity } from '../types/entity-definition.types';\nimport type { AXPRelatedEntity } from '../types/entity-related-layout.types';\n\n//#region ---- Related entity helpers ----\n\nexport function parseRelatedEntityFullName(fullName: string): { moduleName: string; entityName: string } | null {\n const trimmed = fullName.trim();\n const idx = trimmed.indexOf('.');\n if (idx <= 0 || idx >= trimmed.length - 1) {\n return null;\n }\n return {\n moduleName: trimmed.slice(0, idx),\n entityName: trimmed.slice(idx + 1),\n };\n}\n\nexport function parseDottedFieldPath(fieldPath: string): { dataPath: string; propertyName: string } | null {\n const trimmed = fieldPath.trim();\n const dotIndex = trimmed.indexOf('.');\n if (dotIndex <= 0 || dotIndex >= trimmed.length - 1) {\n return null;\n }\n return {\n dataPath: trimmed.slice(0, dotIndex),\n propertyName: trimmed.slice(dotIndex + 1),\n };\n}\n\n//#endregion\n\n//#region ---- Merge-detail property discovery ----\n\n/**\n * Resolves related property names eligible for host list columns/filters/sorts:\n * host columns under `dataPath`, optional `related.properties` allowlist, minus `excludeProperties`.\n */\nexport function collectMergeDetailListPropertyNames(\n hostEntity: AXPEntity,\n dataPath: string,\n relatedEntity: AXPRelatedEntity,\n): Set<string> {\n const names = new Set<string>();\n const prefix = `${dataPath}.`;\n\n if (relatedEntity.properties?.length) {\n for (const name of relatedEntity.properties) {\n const trimmed = name.trim();\n if (trimmed) {\n names.add(trimmed);\n }\n }\n }\n\n for (const column of hostEntity.columns ?? []) {\n const columnName = column.name.trim();\n if (columnName.startsWith(prefix)) {\n const tail = columnName.slice(prefix.length);\n const leaf = tail.split('.')[0]?.trim();\n if (leaf) {\n names.add(leaf);\n }\n }\n\n const rawDataPath = column.options?.['dataPath'];\n if (typeof rawDataPath === 'string') {\n const dp = rawDataPath.trim();\n if (dp.startsWith(prefix)) {\n const tail = dp.slice(prefix.length);\n const leaf = tail.split('.')[0]?.trim();\n if (leaf) {\n names.add(leaf);\n }\n }\n }\n }\n\n const excluded = new Set((relatedEntity.excludeProperties ?? []).map((n) => n.trim()).filter(Boolean));\n for (const name of excluded) {\n names.delete(name);\n }\n\n return names;\n}\n\n//#endregion\n","import type { AXPWidgetTypesMap } from '@acorex/platform/layout/widget-core-contracts';\nimport type { AXPFilterDefinition } from '@acorex/platform/contracts';\n\nimport { omit } from 'lodash-es';\n\nimport type { AXPEntity } from '../types/entity-definition.types';\nimport type { AXPEntityListFilterDefinition } from '../types/entity-list-filter.types';\nimport { encodeEntityListFilterContextField } from '../types/entity-list-filter.types';\nimport type { AXPEntityProperty } from '../types/entity-property.types';\nimport {\n collectMergeDetailListPropertyNames,\n parseRelatedEntityFullName,\n} from './entity-merge-detail-list-properties.util';\nimport {\n resolveEntityColumnDataPath,\n resolveEntityPropertyInlineFilterField,\n resolvePropertyExposeDisplayTarget,\n} from './entity-property-display-path.util';\nimport type { AXPCollectEntityQuickSearchPathsResolver } from './entity-quick-search-paths.util';\n\n//#region ---- Types ----\n\nexport interface AXPBuildEntityListFilterDefinitionsDeps {\n resolveWidget?: (\n type: AXPWidgetTypesMap[keyof AXPWidgetTypesMap],\n ) => { icon?: string; defaultFilterWidgetName?: string } | undefined;\n}\n\n//#endregion\n\n//#region ---- Property filter helpers ----\n\nfunction isPropertyFilterEnabled(property: AXPEntityProperty): boolean {\n const filter = property.options?.filter;\n return !!(\n filter?.advance?.enabled ||\n filter?.inline?.enabled ||\n filter?.preload?.enabled\n );\n}\n\n//#endregion\n\n//#region ---- Merge-detail property discovery ----\n\nfunction resolveMergedRelatedInlineFilterField(\n dataPath: string,\n relatedEntityDef: AXPEntity,\n property: AXPEntityProperty,\n): string | undefined {\n const columnDataPath = resolveEntityColumnDataPath(relatedEntityDef, property.name);\n if (columnDataPath) {\n return `${dataPath}.${columnDataPath}`;\n }\n\n const exposeTarget = resolvePropertyExposeDisplayTarget(property.schema?.interface?.options);\n if (exposeTarget) {\n return `${dataPath}.${exposeTarget}`;\n }\n\n return undefined;\n}\n\n//#endregion\n\n//#region ---- Filter definition builder ----\n\nfunction buildFilterDefinitionFromProperty(\n hostEntity: AXPEntity,\n property: AXPEntityProperty,\n options: {\n field: string;\n inlineQueryField?: string;\n },\n deps?: AXPBuildEntityListFilterDefinitionsDeps,\n): AXPEntityListFilterDefinition | null {\n if (!isPropertyFilterEnabled(property)) {\n return null;\n }\n\n const iface = property.schema.interface ?? {};\n const interfaceType = iface.type as AXPWidgetTypesMap[keyof AXPWidgetTypesMap] | undefined;\n const widgetConfig = interfaceType ? deps?.resolveWidget?.(interfaceType) : undefined;\n\n const type = (property.options?.filter?.advance?.widgetType ||\n widgetConfig?.defaultFilterWidgetName ||\n interfaceType) as AXPWidgetTypesMap[keyof AXPWidgetTypesMap];\n\n const inlineQueryField =\n options.inlineQueryField ??\n resolveEntityPropertyInlineFilterField(hostEntity, property);\n\n const preloadRequired = property.options?.filter?.preload?.required;\n const validations = preloadRequired\n ? [\n {\n rule: 'required',\n message: 'This field is required',\n options: {},\n },\n ]\n : [];\n\n const widgetOptions = {\n ...(iface.options ?? {}),\n ...(validations.length ? { validations } : {}),\n };\n\n const contextField = options.field.includes('.')\n ? encodeEntityListFilterContextField(options.field)\n : undefined;\n\n return {\n title: property.title,\n field: options.field,\n ...(contextField ? { contextField } : {}),\n ...(inlineQueryField && inlineQueryField !== options.field ? { inlineQueryField } : {}),\n operator: {\n type: 'contains',\n },\n widget: {\n ...omit(iface as object, 'triggers'),\n path: contextField ?? options.field,\n type,\n options: widgetOptions,\n } as AXPFilterDefinition['widget'],\n filters: [],\n isParametric: false,\n icon: widgetConfig?.icon,\n filterType: {\n advance: property.options?.filter?.advance?.enabled ?? false,\n inline: property.options?.filter?.inline?.enabled ?? false,\n preload: property.options?.filter?.preload,\n },\n triggers: iface.triggers,\n };\n}\n\nasync function collectHostPropertyFilterDefinitions(\n entity: AXPEntity,\n deps?: AXPBuildEntityListFilterDefinitionsDeps,\n): Promise<AXPEntityListFilterDefinition[]> {\n const definitions: AXPEntityListFilterDefinition[] = [];\n\n for (const property of entity.properties ?? []) {\n const definition = buildFilterDefinitionFromProperty(\n entity,\n property,\n { field: property.name },\n deps,\n );\n if (definition) {\n definitions.push(definition);\n }\n }\n\n return definitions;\n}\n\nasync function collectMergeDetailFilterDefinitions(\n hostEntity: AXPEntity,\n resolveRelatedDefinition: AXPCollectEntityQuickSearchPathsResolver,\n deps?: AXPBuildEntityListFilterDefinitionsDeps,\n): Promise<AXPEntityListFilterDefinition[]> {\n const definitions: AXPEntityListFilterDefinition[] = [];\n\n for (const related of hostEntity.relatedEntities ?? []) {\n if (related.layout?.type !== 'merge-detail') {\n continue;\n }\n\n if (related.filter?.enabled === false) {\n continue;\n }\n\n const dataPath = related.persistence?.dataPath?.trim();\n if (!dataPath) {\n continue;\n }\n\n const parsed = related.entity ? parseRelatedEntityFullName(related.entity) : null;\n if (!parsed) {\n continue;\n }\n\n const relatedDef = await resolveRelatedDefinition(parsed.moduleName, parsed.entityName);\n if (!relatedDef) {\n continue;\n }\n\n const propertyNames = collectMergeDetailListPropertyNames(hostEntity, dataPath, related);\n if (propertyNames.size === 0) {\n continue;\n }\n\n for (const propertyName of propertyNames) {\n const property = relatedDef.properties?.find((p) => p.name === propertyName);\n if (!property) {\n continue;\n }\n\n const queryField = `${dataPath}.${propertyName}`;\n const inlineQueryField = resolveMergedRelatedInlineFilterField(dataPath, relatedDef, property);\n\n const definition = buildFilterDefinitionFromProperty(\n hostEntity,\n property,\n {\n field: queryField,\n inlineQueryField,\n },\n deps,\n );\n\n if (definition) {\n definitions.push(definition);\n }\n }\n }\n\n return definitions;\n}\n\n//#endregion\n\n//#region ---- Public API ----\n\n/**\n * Builds master-list filter definitions from host properties and merge-detail related entities.\n * Related filters use `{dataPath}.{property}` query fields (e.g. `person.firstName`).\n */\nexport async function collectEntityListFilterDefinitions(\n entity: AXPEntity | null | undefined,\n resolveRelatedDefinition: AXPCollectEntityQuickSearchPathsResolver,\n deps?: AXPBuildEntityListFilterDefinitionsDeps,\n): Promise<AXPEntityListFilterDefinition[]> {\n if (!entity) {\n return [];\n }\n\n const hostDefinitions = await collectHostPropertyFilterDefinitions(entity, deps);\n const relatedDefinitions = await collectMergeDetailFilterDefinitions(\n entity,\n resolveRelatedDefinition,\n deps,\n );\n\n return [...hostDefinitions, ...relatedDefinitions];\n}\n\n//#endregion\n","import type { AXPEntity } from '../types/entity-definition.types';\nimport type { AXPEntityProperty } from '../types/entity-property.types';\n\nimport {\n collectMergeDetailListPropertyNames,\n parseRelatedEntityFullName,\n} from './entity-merge-detail-list-properties.util';\nimport type { AXPCollectEntityQuickSearchPathsResolver } from './entity-quick-search-paths.util';\n\n//#region ---- Types ----\n\nexport interface AXPEntityListSortableField {\n name: string;\n title: string;\n}\n\n//#endregion\n\n//#region ---- Property sort helpers ----\n\nfunction isPropertySortEnabled(property: AXPEntityProperty): boolean {\n return !!property.options?.sort?.enabled;\n}\n\nfunction resolveHostColumnTitle(hostEntity: AXPEntity, fieldName: string): string | undefined {\n const column = hostEntity.columns?.find((c) => c.name === fieldName);\n return column?.title;\n}\n\nfunction collectHostSortableFields(entity: AXPEntity): AXPEntityListSortableField[] {\n return (entity.properties ?? [])\n .filter(isPropertySortEnabled)\n .map((property) => ({\n name: property.name,\n title: resolveHostColumnTitle(entity, property.name) ?? property.title,\n }));\n}\n\nasync function collectMergeDetailSortableFields(\n hostEntity: AXPEntity,\n resolveRelatedDefinition: AXPCollectEntityQuickSearchPathsResolver,\n): Promise<AXPEntityListSortableField[]> {\n const fields: AXPEntityListSortableField[] = [];\n\n for (const related of hostEntity.relatedEntities ?? []) {\n if (related.layout?.type !== 'merge-detail') {\n continue;\n }\n\n const dataPath = related.persistence?.dataPath?.trim();\n if (!dataPath) {\n continue;\n }\n\n const parsed = related.entity ? parseRelatedEntityFullName(related.entity) : null;\n if (!parsed) {\n continue;\n }\n\n const relatedDef = await resolveRelatedDefinition(parsed.moduleName, parsed.entityName);\n if (!relatedDef) {\n continue;\n }\n\n const propertyNames = collectMergeDetailListPropertyNames(hostEntity, dataPath, related);\n for (const propertyName of propertyNames) {\n const property = relatedDef.properties?.find((p) => p.name === propertyName);\n if (!property || !isPropertySortEnabled(property)) {\n continue;\n }\n\n const queryField = `${dataPath}.${propertyName}`;\n fields.push({\n name: queryField,\n title: resolveHostColumnTitle(hostEntity, queryField) ?? property.title,\n });\n }\n }\n\n return fields;\n}\n\n//#endregion\n\n//#region ---- Public API ----\n\n/**\n * Builds master-list sortable fields from host properties and merge-detail related entities.\n * Related sorts use `{dataPath}.{property}` query fields (e.g. `person.firstName`).\n */\nexport async function collectEntityListSortableFields(\n entity: AXPEntity | null | undefined,\n resolveRelatedDefinition: AXPCollectEntityQuickSearchPathsResolver,\n): Promise<AXPEntityListSortableField[]> {\n if (!entity) {\n return [];\n }\n\n const hostFields = collectHostSortableFields(entity);\n const relatedFields = await collectMergeDetailSortableFields(entity, resolveRelatedDefinition);\n\n const seen = new Set<string>();\n const result: AXPEntityListSortableField[] = [];\n\n for (const field of [...hostFields, ...relatedFields]) {\n if (seen.has(field.name)) {\n continue;\n }\n seen.add(field.name);\n result.push(field);\n }\n\n return result;\n}\n\nexport function isEntityPropertySortEnabled(property: AXPEntityProperty | null | undefined): boolean {\n return property != null && isPropertySortEnabled(property);\n}\n\n//#endregion\n","//#region ---- Workflow record helpers ----\n\nimport type { AXPRecordWorkflowInfo } from '../types/entity-model.types';\n\n/** Entity query filter field for {@link AXPRecordWorkflowInfo.instanceId}. */\nexport const AXP_RECORD_WORKFLOW_INFO_INSTANCE_ID_FIELD = 'workflowInfo.instanceId' as const;\n\n/** Entity query filter field for {@link AXPRecordWorkflowInfo.correlationId}. */\nexport const AXP_RECORD_WORKFLOW_INFO_CORRELATION_ID_FIELD = 'workflowInfo.correlationId' as const;\n\n/** Entity query filter field for {@link AXPRecordWorkflowInfo.definitionId}. */\nexport const AXP_RECORD_WORKFLOW_INFO_DEFINITION_ID_FIELD = 'workflowInfo.definitionId' as const;\n\n/** Returns a trimmed workflow instance id from a record, if present. */\nexport function getRecordWorkflowInstanceId(\n record: { workflowInfo?: AXPRecordWorkflowInfo | null } | null | undefined,\n): string | null {\n const id = record?.workflowInfo?.instanceId?.trim();\n return id && id.length > 0 ? id : null;\n}\n\n/** Returns a trimmed workflow correlation id from a record, if present. */\nexport function getRecordWorkflowCorrelationId(\n record: { workflowInfo?: AXPRecordWorkflowInfo | null } | null | undefined,\n): string | null {\n const id = record?.workflowInfo?.correlationId?.trim();\n return id && id.length > 0 ? id : null;\n}\n\n/** Builds canonical workflow metadata for a domain record (engine / middleware). */\nexport function buildAXPRecordWorkflowInfo(params: {\n instanceId: string;\n definitionId?: string | null;\n correlationId?: string | null;\n pinnedVersion?: number | null;\n}): AXPRecordWorkflowInfo {\n const instanceId = params.instanceId?.trim();\n if (!instanceId) {\n return {};\n }\n const definitionId = params.definitionId?.trim();\n const correlationId = params.correlationId?.trim();\n return {\n instanceId,\n ...(definitionId ? { definitionId } : { definitionId: null }),\n ...(correlationId ? { correlationId } : { correlationId: null }),\n ...(params.pinnedVersion != null ? { pinnedVersion: params.pinnedVersion } : {}),\n };\n}\n\n//#endregion\n","import type { AXPLookupWidgetCreateOptions, ResolvedLookupCreateOptions } from '../types/lookup-widget.types';\n\n//#region ---- Resolution ----\n\n/**\n * Resolves lookup create options from `create` and legacy `allowCreate` (mode).\n */\nexport function resolveLookupWidgetCreateOptions(options: {\n create?: AXPLookupWidgetCreateOptions;\n /** @deprecated Use create.enable; still supported for create mode (quick/full). */\n allowCreate?: 'none' | 'full' | 'quick';\n}): ResolvedLookupCreateOptions {\n const create = options.create;\n const legacyMode = options.allowCreate;\n const context = create?.context;\n\n if (create?.enable !== undefined) {\n if (!create.enable) {\n return { enabled: false, mode: 'none', context };\n }\n\n const mode = legacyMode && legacyMode !== 'none' ? legacyMode : 'quick';\n return { enabled: true, mode, context };\n }\n\n const mode = legacyMode ?? 'none';\n return {\n enabled: mode !== 'none',\n mode,\n context,\n };\n}\n\n//#endregion\n","//#region ---- Utils barrel ----\n\nexport * from './entity-display-template.util';\nexport * from './entity-property-display-path.util';\nexport * from './entity-search-title-context.util';\nexport * from './entity-quick-search-paths.util';\nexport * from './entity-list-filter-definitions.util';\nexport * from './entity-list-sortable-fields.util';\nexport * from './entity-merge-detail-list-properties.util';\nexport * from './entity-workflow-record.util';\nexport * from './lookup-create-options.util';\n\n//#endregion\n","//#region ---- Entity display constants ----\n\n/** Row path used when context carries a nested entity layout title. */\nexport const ENTITY_LAYOUT_SINGLE_TITLE_PATH = 'entity.layout.single.title';\n\n/** Widget option for a pre-evaluated or template entity row title (entity list column mappers). */\nexport const ENTITY_ROW_POPUP_TITLE_OPTION = 'popupTitle';\n\n/** Widget option alias for entity row title templates in view/edit forms. */\nexport const ENTITY_ROW_TITLE_TEMPLATE_OPTION = 'titleTemplate';\n\n//#endregion\n","//#region ---- Entity datasource keys ----\n\n/** Platform entity layout datasource registry names. */\nexport const AXPEntityDataSourceKeys = {\n Entities: 'entities',\n} as const;\n\n//#endregion\n","//#region ---- Entity events ----\n\nexport const AXPEntityEventsKeys = {\n REFRESH_LAYOUT: 'entity:refresh-layout',\n REFRESH_DATA: 'entity:refresh-data',\n} as const;\n\n//#endregion\n","//#region ---- Constants barrel ----\n\nexport * from './entity-display.constants';\nexport * from './entity-datasource.keys';\nexport * from './entity-events.keys';\n\n//#endregion\n","//#region ---- Barrel ----\n\nexport * from './types';\nexport * from './helpers';\nexport * from './utils';\nexport * from './constants';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["parseRelatedEntityFullName"],"mappings":";;;AACA;IAEY;AAAZ,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,qBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,qBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,qBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EALW,qBAAqB,KAArB,qBAAqB,GAAA,EAAA,CAAA,CAAA;IAOrB;AAAZ,CAAA,UAAY,kBAAkB,EAAA;AAC5B,IAAA,kBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,kBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,GAAA,EAAA,CAAA,CAAA;AAwE9B;;AClFA;AAyEA;;ACzEA;IAkBY;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AAC7B,IAAA,mBAAA,CAAA,mBAAA,CAAA,aAAA,CAAA,GAAA,CAAA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