@acorex/platform 21.0.0-next.85 → 21.0.0-next.88

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 (74) hide show
  1. package/fesm2022/acorex-platform-auth.mjs +1 -1
  2. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  3. package/fesm2022/{acorex-platform-common-common-settings.provider-Ytey9uhY.mjs → acorex-platform-common-common-settings.provider-VfmZct9H.mjs} +43 -3
  4. package/fesm2022/acorex-platform-common-common-settings.provider-VfmZct9H.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-common.mjs +1709 -870
  6. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-contracts.mjs +1160 -9
  8. package/fesm2022/acorex-platform-contracts.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-core.mjs +210 -131
  10. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-domain-contracts.mjs +58 -0
  12. package/fesm2022/acorex-platform-domain-contracts.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-domain.mjs +2 -50
  14. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  15. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  16. package/fesm2022/acorex-platform-layout-components.mjs +59 -23
  17. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  18. package/fesm2022/acorex-platform-layout-designer.mjs +3 -2
  19. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  20. package/fesm2022/acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs.map +1 -1
  21. package/fesm2022/acorex-platform-layout-entity-contracts.mjs +1114 -0
  22. package/fesm2022/acorex-platform-layout-entity-contracts.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs.map +1 -1
  24. package/fesm2022/acorex-platform-layout-entity.mjs +661 -742
  25. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  26. package/fesm2022/acorex-platform-layout-views.mjs +333 -119
  27. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  28. package/fesm2022/acorex-platform-layout-widget-core.mjs +11 -105
  29. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  30. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-CFyfix31.mjs +513 -0
  31. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-CFyfix31.mjs.map +1 -0
  32. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-DjpZU6gz.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-D4MOHEpI.mjs} +4 -4
  33. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-D4MOHEpI.mjs.map +1 -0
  34. package/fesm2022/acorex-platform-layout-widgets.mjs +868 -57
  35. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  36. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  37. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs → acorex-platform-themes-default-entity-master-single-view.component-DrUwqKKA.mjs} +2 -3
  38. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DrUwqKKA.mjs.map +1 -0
  39. package/fesm2022/acorex-platform-themes-default.mjs +740 -96
  40. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  41. package/fesm2022/{acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs → acorex-platform-themes-shared-settings.provider-BUwPqwUS.mjs} +3 -3
  42. package/fesm2022/acorex-platform-themes-shared-settings.provider-BUwPqwUS.mjs.map +1 -0
  43. package/fesm2022/acorex-platform-themes-shared.mjs +4 -3
  44. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  45. package/fesm2022/acorex-platform-workflow.mjs +6 -8
  46. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  47. package/package.json +9 -5
  48. package/types/acorex-platform-auth.d.ts +2 -1
  49. package/types/acorex-platform-common.d.ts +419 -1083
  50. package/types/acorex-platform-contracts.d.ts +1791 -260
  51. package/types/acorex-platform-core.d.ts +2153 -2806
  52. package/types/acorex-platform-domain-contracts.d.ts +416 -0
  53. package/types/acorex-platform-domain.d.ts +4 -415
  54. package/types/acorex-platform-layout-builder.d.ts +2 -1
  55. package/types/acorex-platform-layout-components.d.ts +15 -4
  56. package/types/acorex-platform-layout-designer.d.ts +2 -1
  57. package/types/acorex-platform-layout-entity-contracts.d.ts +864 -0
  58. package/types/acorex-platform-layout-entity.d.ts +88 -269
  59. package/types/acorex-platform-layout-views.d.ts +48 -14
  60. package/types/acorex-platform-layout-widget-core.d.ts +9 -5
  61. package/types/acorex-platform-layout-widgets.d.ts +89 -13
  62. package/types/acorex-platform-runtime.d.ts +1 -1
  63. package/types/acorex-platform-themes-default.d.ts +173 -70
  64. package/types/acorex-platform-workflow.d.ts +5 -18
  65. package/fesm2022/acorex-platform-common-common-settings.provider-Ytey9uhY.mjs.map +0 -1
  66. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs +0 -116
  67. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs.map +0 -1
  68. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DjpZU6gz.mjs.map +0 -1
  69. package/fesm2022/acorex-platform-native.mjs +0 -155
  70. package/fesm2022/acorex-platform-native.mjs.map +0 -1
  71. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs.map +0 -1
  72. package/fesm2022/acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs.map +0 -1
  73. package/native/README.md +0 -4
  74. package/types/acorex-platform-native.d.ts +0 -28
@@ -0,0 +1,864 @@
1
+ import { AXStyleColorType, AXPopupSizeType, AXPMetaData, AXPSystemActionType, AXPValueTransformerFunctions, AXPValidationRules, AXPGridLayoutOptions, AXPExpression, AXDataSourceOperator, AXPFilterDefinition, AXPMultiLanguageString, AXPOptionsData, AXPUserReference } from '@acorex/platform/contracts';
2
+ import { AXPQueryRequest } from '@acorex/platform/core';
3
+ import { AXPWidgetTypesMap } from '@acorex/platform/layout/widget-core';
4
+
5
+ declare enum AXPEntityCommandScope {
6
+ TypeLevel = "typeLevel",
7
+ Selected = "selected",
8
+ Individual = "individual",
9
+ Section = "section"
10
+ }
11
+ declare enum AXPEntityQueryType {
12
+ Single = "single",
13
+ List = "list"
14
+ }
15
+ interface AXPEntityCommand {
16
+ execute: string | Function;
17
+ permissions?: string[];
18
+ }
19
+ interface AXPEntityQuery {
20
+ execute: string | Function;
21
+ type: AXPEntityQueryType;
22
+ }
23
+ type AXPCommandActionType = AXPSystemActionType;
24
+ interface AXPCommandActionLook {
25
+ color: AXStyleColorType;
26
+ icon: string;
27
+ }
28
+ type AXPCommandActionPriority = 'primary' | 'secondary';
29
+ type AXPCommandActionCallback = string | {
30
+ name: string;
31
+ options?: {
32
+ decoration?: {
33
+ header?: {
34
+ title?: string;
35
+ };
36
+ };
37
+ process?: {
38
+ data?: any;
39
+ [name: string]: any;
40
+ };
41
+ layout?: {
42
+ size?: AXPopupSizeType;
43
+ };
44
+ [name: string]: any;
45
+ };
46
+ metadata?: AXPMetaData;
47
+ };
48
+ interface AXPCommandActionDisplay extends Partial<AXPCommandActionLook> {
49
+ name?: string;
50
+ command: AXPCommandActionCallback;
51
+ title: string;
52
+ type: AXPSystemActionType | string;
53
+ priority: 'primary' | 'secondary' | 'none';
54
+ separated?: boolean;
55
+ permissions?: string[];
56
+ hidden?: boolean | string;
57
+ disabled?: boolean | string;
58
+ default?: boolean;
59
+ order?: number;
60
+ /**
61
+ * Keyboard chords for this action (e.g. `'ctrl+shift+a'`).
62
+ * Pass `[]` to disable shortcuts. When omitted, platform defaults may apply for known commands.
63
+ */
64
+ shortcuts?: string[];
65
+ }
66
+ interface AXPEntityAction extends AXPCommandActionDisplay {
67
+ scope: AXPEntityCommandScope;
68
+ /** Child actions for dropdown submenu */
69
+ items?: AXPEntityAction[];
70
+ }
71
+
72
+ interface AXPEntityPropertyFilterOptions {
73
+ advance?: {
74
+ enabled?: boolean;
75
+ widgetType?: string;
76
+ };
77
+ inline?: {
78
+ enabled?: boolean;
79
+ };
80
+ preload?: {
81
+ enabled?: boolean;
82
+ required?: boolean;
83
+ };
84
+ }
85
+ interface AXPEntityPropertySortOptions {
86
+ enabled?: boolean;
87
+ }
88
+ interface AXPEntityPropertyListOptions {
89
+ filter?: AXPEntityPropertyFilterOptions;
90
+ sort?: AXPEntityPropertySortOptions;
91
+ }
92
+
93
+ interface AXEntityPropertyWidget {
94
+ type: string;
95
+ path?: string;
96
+ id?: string;
97
+ children?: AXEntityPropertyWidget[];
98
+ mode: 'view' | 'edit';
99
+ options?: Record<string, any>;
100
+ triggers?: {
101
+ event: string;
102
+ action: string;
103
+ disabled?: boolean;
104
+ }[];
105
+ valueTransforms?: AXPValueTransformerFunctions;
106
+ }
107
+ interface AXPEntityPropertyLayoutConfig extends AXPGridLayoutOptions {
108
+ label?: {
109
+ visible?: boolean;
110
+ };
111
+ order?: number;
112
+ visible?: boolean | AXPExpression;
113
+ }
114
+ interface AXPEntityPropertyGroup {
115
+ id: string;
116
+ title: string;
117
+ description?: string;
118
+ permissions?: string[];
119
+ icon?: string;
120
+ }
121
+ interface AXPEntityPropertyView {
122
+ name: string;
123
+ dataPath?: string;
124
+ permissions?: string[];
125
+ layout?: AXPEntityPropertyLayoutConfig;
126
+ }
127
+ interface AXPEntityPropertyUpdateView extends AXPEntityPropertyView {
128
+ }
129
+ interface AXPEntityPropertyCreateView extends AXPEntityPropertyView {
130
+ defaultValue?: any;
131
+ }
132
+ interface AXPEntitySectionView {
133
+ id: string;
134
+ order?: number;
135
+ collapsed?: boolean;
136
+ layout?: AXPEntityPropertyLayoutConfig;
137
+ }
138
+ interface AXPEntityProperty {
139
+ name: string;
140
+ title: string;
141
+ description?: string;
142
+ groupId?: string;
143
+ schema: {
144
+ dataType: string;
145
+ nullable?: boolean;
146
+ readonly?: boolean | string;
147
+ visible?: boolean | string;
148
+ defaultValue?: any | string | ((context: any | null) => any);
149
+ unique?: {
150
+ enabled: boolean;
151
+ };
152
+ interface?: Partial<AXEntityPropertyWidget>;
153
+ };
154
+ options?: AXPEntityPropertyListOptions;
155
+ validations?: AXPValidationRules;
156
+ }
157
+
158
+ /** Logical alignment for table column header/cell (respects RTL). */
159
+ type AXPColumnContentAlign = 'start' | 'center' | 'end';
160
+ /**
161
+ * Column alignment: shorthand applies to both header and cell;
162
+ * object form sets each side independently (omitted keys default to start).
163
+ */
164
+ type AXPColumnAlign = AXPColumnContentAlign | {
165
+ header?: AXPColumnContentAlign;
166
+ cell?: AXPColumnContentAlign;
167
+ };
168
+ /** Shared field definition for list layouts (table columns, card fields, etc.). */
169
+ interface AXPEntityDisplayField {
170
+ name: string;
171
+ title?: string;
172
+ showAs?: {
173
+ type: string;
174
+ options?: Record<string, any>;
175
+ };
176
+ options?: {
177
+ /** When string, evaluate against parent detail context (e.g. related list). */
178
+ visible?: boolean | string;
179
+ /** Optional dataPath override for field binding. */
180
+ dataPath?: string;
181
+ [name: string]: any;
182
+ };
183
+ }
184
+ interface AXPEntityTableColumn extends AXPEntityDisplayField {
185
+ options?: AXPEntityDisplayField['options'] & {
186
+ /** Initial column width (overrides widget column width when set). */
187
+ width?: string;
188
+ /** Header/cell alignment (shorthand or per-side). */
189
+ align?: AXPColumnAlign;
190
+ };
191
+ }
192
+
193
+ interface AXPEntityDetailListView {
194
+ title?: string;
195
+ description?: string;
196
+ columns: AXPEntityTableColumn[];
197
+ actions?: AXPEntityAction[];
198
+ }
199
+
200
+ interface AXPEntitySearchResultFormat {
201
+ title: string;
202
+ description?: string;
203
+ }
204
+ interface AXPEntityFormats {
205
+ individual: string;
206
+ plural: string;
207
+ lookup?: string;
208
+ displayName?: string;
209
+ searchResult?: AXPEntitySearchResultFormat;
210
+ }
211
+
212
+ interface AXPEntityMasterLayoutView {
213
+ title?: string;
214
+ sections: AXPEntitySectionView[];
215
+ properties?: AXPEntityPropertyView[];
216
+ }
217
+ /** Quick create config for lookup widgets (+ button) - uses subset of create form */
218
+ interface AXPEntityQuickCreate {
219
+ enabled?: boolean;
220
+ properties?: string[];
221
+ layout?: {
222
+ size?: AXPopupSizeType;
223
+ };
224
+ excludeProperties?: string[];
225
+ }
226
+ interface AXPEntityMasterCreateLayoutView extends AXPEntityMasterLayoutView {
227
+ steps?: {
228
+ id: string;
229
+ title: string;
230
+ description?: string;
231
+ };
232
+ /** Quick create config for lookup widgets - uses subset of create form */
233
+ quickCreate?: AXPEntityQuickCreate;
234
+ }
235
+ interface AXPEntityMasterUpdateLayoutView extends AXPEntityMasterLayoutView {
236
+ }
237
+ interface AXPEntityMasterSingleLayoutView extends AXPEntityMasterLayoutView {
238
+ title: string;
239
+ description?: string;
240
+ actions?: AXPEntityAction[];
241
+ }
242
+
243
+ /** Card layout field presentation in master list card view. */
244
+ type AXPCardFieldDisplay = 'simple' | 'badge';
245
+ /** Badge color: semantic token or per-row expression (`{{ context.eval(...) }}`). */
246
+ type AXPCardBadgeColor = AXStyleColorType | AXPExpression;
247
+ interface AXPCardBadgeDisplayOptions {
248
+ /** Semantic color or expression evaluated against row context. */
249
+ color?: AXPCardBadgeColor;
250
+ }
251
+ interface AXPCardBadgeDisplay {
252
+ type: 'badge';
253
+ options?: AXPCardBadgeDisplayOptions;
254
+ }
255
+ /** Shorthand (`badge` / `simple`) or structured badge config with optional per-row color. */
256
+ type AXPCardFieldDisplayConfig = AXPCardFieldDisplay | AXPCardBadgeDisplay;
257
+ /** Card layout field in master list view. */
258
+ type AXPCardField = AXPEntityDisplayField & {
259
+ layout?: AXPEntityPropertyLayoutConfig;
260
+ /**
261
+ * Field presentation. Default: `simple` (card body).
262
+ * Use `badge` or `{ type: 'badge', options: { color } }` for header chips beside title.
263
+ */
264
+ display?: AXPCardFieldDisplayConfig;
265
+ /**
266
+ * Badge color when presentation is badge-shaped.
267
+ * Prefer `display: { type: 'badge', options: { color } }` for new definitions.
268
+ * Omit for status fields — color is resolved from the status definition per row.
269
+ */
270
+ badgeColor?: AXPCardBadgeColor;
271
+ };
272
+ /** Whether the card field is shown as a header badge (not in the card body). */
273
+ declare function isCardFieldBadgeDisplay(display: AXPCardFieldDisplayConfig | undefined): display is 'badge' | AXPCardBadgeDisplay;
274
+ /** Resolves static badge color config from {@link AXPCardField.display} and legacy {@link AXPCardField.badgeColor}. */
275
+ declare function resolveCardFieldBadgeColor(field: Pick<AXPCardField, 'display' | 'badgeColor'>): AXPCardBadgeColor | undefined;
276
+
277
+ interface AXPQueryFilter {
278
+ name: string;
279
+ operator: AXDataSourceOperator;
280
+ value: any;
281
+ }
282
+ interface AXPQuerySort {
283
+ name: string;
284
+ dir: 'asc' | 'desc';
285
+ }
286
+ interface AXPQueryView {
287
+ name: string;
288
+ fixed: boolean;
289
+ title: string;
290
+ columns: string[];
291
+ conditions: AXPQueryFilter[];
292
+ sorts: AXPQuerySort[];
293
+ indexCol?: boolean;
294
+ pageSize?: number;
295
+ visible?: boolean;
296
+ }
297
+ declare function createQueryView(name: string, title: string, fixed: boolean, params?: {
298
+ columns?: string[];
299
+ conditions?: any[];
300
+ sorts?: AXPQuerySort[];
301
+ }): AXPQueryView;
302
+ declare function createAllQueryView(params?: {
303
+ columns?: string[];
304
+ conditions?: AXPQueryFilter[];
305
+ sorts?: AXPQuerySort[];
306
+ } | undefined): AXPQueryView;
307
+
308
+ interface AXPEntityMasterListView {
309
+ title?: string;
310
+ description?: string;
311
+ actions?: AXPEntityAction[];
312
+ views: AXPQueryView[];
313
+ layouts?: {
314
+ table?: {
315
+ enabled?: boolean;
316
+ columns: AXPEntityTableColumn[];
317
+ };
318
+ card?: {
319
+ enabled?: boolean;
320
+ header: {
321
+ /** Property path, expression (`{{ ... }}`), or literal — evaluated per row. */
322
+ title?: string;
323
+ description?: string;
324
+ icon?: string;
325
+ };
326
+ fields: AXPCardField[];
327
+ };
328
+ };
329
+ }
330
+ type AXPEntityMasterListLayoutType = 'table' | 'card';
331
+ /** Master list presentation: table or card with compact (collapsed) / expanded bodies. */
332
+ type AXPEntityMasterListDisplayMode = 'table' | 'card-compact' | 'card-expanded';
333
+ interface AXPEntityMasterListLayoutOption {
334
+ id: AXPEntityMasterListLayoutType;
335
+ title: string;
336
+ icon?: string;
337
+ }
338
+ /** Resolves master list layouts that are currently enabled. */
339
+ declare function resolveEnabledMasterListLayouts(layouts?: AXPEntityMasterListView['layouts']): AXPEntityMasterListLayoutType[];
340
+ /** First enabled layout; used as the default when no user preference is stored. */
341
+ declare function resolveDefaultMasterListLayout(layouts?: AXPEntityMasterListView['layouts']): AXPEntityMasterListLayoutType;
342
+
343
+ interface AXPEntityListFilterDefinition extends AXPFilterDefinition {
344
+ /**
345
+ * Lodash-get path for inline `contains` queries on lookup/select properties.
346
+ * Keeps `field` as the property name for advance filters and filter widget binding.
347
+ */
348
+ inlineQueryField?: string;
349
+ /**
350
+ * Flat filter UI context key when `field` contains dots (merge-detail paths).
351
+ * Widget binding uses this key; storage queries still use `field`.
352
+ */
353
+ contextField?: string;
354
+ }
355
+ /** Encodes a dotted storage path as a flat filter context key (e.g. `person.lastName` → `person__lastName`). */
356
+ declare function encodeEntityListFilterContextField(queryField: string): string;
357
+ /**
358
+ * Resolves the flat context key used by query-filters / widget binding for a filter definition.
359
+ */
360
+ declare function resolveEntityListFilterContextField(filter: Pick<AXPEntityListFilterDefinition, 'field' | 'contextField'>): string;
361
+ /**
362
+ * Maps an entity list filter definition to the storage query field.
363
+ * Inline `contains` filters on lookup/select use `inlineQueryField` (display text path).
364
+ */
365
+ declare function resolveEntityListFilterQueryField(filter: Pick<AXPFilterDefinition, 'field' | 'operator'> & Pick<AXPEntityListFilterDefinition, 'inlineQueryField'>, operator?: {
366
+ type?: string;
367
+ }): string | undefined;
368
+
369
+ interface AXPRelatedEntityLayout {
370
+ type: 'tab-detail' | 'tab-list' | 'page-detail' | 'page-list' | 'merge-detail';
371
+ order?: number;
372
+ position?: 'before' | 'after' | 'middle';
373
+ }
374
+ interface AXPRelatedEntityPersistence {
375
+ strategy?: 'embedded' | 'referenced';
376
+ idField?: string;
377
+ dataPath?: string;
378
+ map?: Record<string, string>;
379
+ hydrate?: 'eager' | 'lazy';
380
+ cascade?: {
381
+ delete?: 'none' | 'orphans' | 'all';
382
+ };
383
+ foreignKeyField?: string;
384
+ }
385
+ interface AXPRelatedEntity {
386
+ entity: string;
387
+ title?: string;
388
+ icon?: string;
389
+ columns?: string[] | AXPEntityTableColumn[];
390
+ properties?: string[];
391
+ excludeProperties?: string[];
392
+ layout?: AXPRelatedEntityLayout;
393
+ conditions?: AXPQueryFilter[];
394
+ customFilterDefinitions?: Partial<AXPEntityListFilterDefinition>[];
395
+ hidden?: boolean | AXPExpression;
396
+ actions?: AXPEntityAction[];
397
+ /**
398
+ * Controls inclusion on the host entity master **create** / **update** form.
399
+ * Defaults depend on layout:
400
+ * - **merge-detail**: omitted flags behave as **true** (opt-out with `false`).
401
+ * - **tab-list** / **page-list**: omitted flags behave as **false** (opt-in with `true`).
402
+ */
403
+ appearOn?: {
404
+ /** Include on host create form (see defaults above per layout type). */
405
+ create?: boolean;
406
+ /** Include on host update form (see defaults above per layout type). */
407
+ update?: boolean;
408
+ };
409
+ /**
410
+ * Host master-list filter policy for merge-detail related data.
411
+ * When omitted, filterable related properties referenced by host columns (or `properties`) are included.
412
+ */
413
+ filter?: {
414
+ /** Include related filterable properties on the host list (default: true). */
415
+ enabled?: boolean;
416
+ };
417
+ /**
418
+ * Relationship-level persistence strategy for merge-detail data.
419
+ * Defaults:
420
+ * - strategy: 'embedded'
421
+ * - idField: last segment of dataPath + 'Id' (or 'relatedId' when dataPath is missing)
422
+ * - map: undefined (pass-through)
423
+ * - hydrate: 'eager' (applies to getOne only in mock)
424
+ * - cascade.delete: 'none'
425
+ */
426
+ persistence?: AXPRelatedEntityPersistence;
427
+ }
428
+
429
+ declare enum AXPRelationshipKind {
430
+ Association = 0,
431
+ Composition = 1,
432
+ Aggregation = 2
433
+ }
434
+ declare enum AXPRelationshipCardinality {
435
+ OneToOne = 0,
436
+ OneToMany = 1,
437
+ ManyToMany = 2
438
+ }
439
+ interface AXPRelationship {
440
+ id: string;
441
+ from: string;
442
+ to: string;
443
+ kind: AXPRelationshipKind;
444
+ cardinality: AXPRelationshipCardinality;
445
+ }
446
+ interface AXPEntity {
447
+ plugins?: {
448
+ name: string;
449
+ options?: AXPOptionsData;
450
+ }[];
451
+ /**
452
+ * High-level rules: when expression evaluates true, apply actions to the given targets
453
+ * (property/section/action). Reduces repetition of the same condition across many properties.
454
+ * Evaluation context: form data, user, entity; precedence vs property-level visible/readonly
455
+ * must be defined where rules are applied.
456
+ */
457
+ rules?: Array<{
458
+ name: string;
459
+ expression: AXPExpression;
460
+ actions: Array<{
461
+ target: {
462
+ type: 'property' | 'section' | 'action';
463
+ name: string;
464
+ };
465
+ values: AXPOptionsData;
466
+ }>;
467
+ }>;
468
+ module: string;
469
+ name: string;
470
+ icon?: string;
471
+ parentKey?: string;
472
+ category?: AXPEntityCategoryPlugin;
473
+ title: string;
474
+ formats: AXPEntityFormats;
475
+ relatedEntities?: AXPRelatedEntity[];
476
+ pages?: AXPEntityPage[];
477
+ groups?: AXPEntityPropertyGroup[];
478
+ properties: AXPEntityProperty[];
479
+ columns?: AXPEntityTableColumn[];
480
+ commands?: {
481
+ create?: AXPEntityCommand | undefined;
482
+ update?: AXPEntityCommand | undefined;
483
+ delete?: AXPEntityCommand | undefined;
484
+ [name: string]: AXPEntityCommand | undefined;
485
+ };
486
+ queries?: {
487
+ byKey?: AXPEntityQuery;
488
+ list?: AXPEntityQuery;
489
+ lookup?: AXPEntityQuery;
490
+ history?: AXPEntityQuery;
491
+ comments?: AXPEntityQuery;
492
+ [name: string]: AXPEntityQuery | undefined;
493
+ };
494
+ validations?: AXPValidationRules;
495
+ interfaces?: {
496
+ master?: {
497
+ single?: AXPEntityMasterSingleLayoutView;
498
+ list?: AXPEntityMasterListView;
499
+ create?: AXPEntityMasterCreateLayoutView;
500
+ update?: AXPEntityMasterUpdateLayoutView;
501
+ };
502
+ detail?: {
503
+ list?: AXPEntityDetailListView;
504
+ };
505
+ };
506
+ }
507
+ declare function getEntityInfo(entity: AXPEntity): {
508
+ source: string;
509
+ module: {
510
+ route: string;
511
+ };
512
+ entity: {
513
+ route: string;
514
+ };
515
+ };
516
+ interface AXPEntityPage {
517
+ componentKey: string;
518
+ field?: string;
519
+ title?: AXPMultiLanguageString;
520
+ icon?: string;
521
+ description?: AXPMultiLanguageString;
522
+ layout?: {
523
+ order?: number;
524
+ position?: 'before' | 'after' | 'middle';
525
+ };
526
+ hidden?: boolean | string;
527
+ permissions?: string[];
528
+ appearOn?: {
529
+ create?: boolean;
530
+ update?: boolean;
531
+ };
532
+ options?: Record<string, any>;
533
+ }
534
+ interface AXPEntityCategoryPlugin {
535
+ entity: string;
536
+ title?: string;
537
+ textField?: string;
538
+ valueField?: string;
539
+ conditions?: AXPQueryFilter[];
540
+ applyConditions?: AXPQueryFilter[];
541
+ }
542
+ interface AXPEntityVersionHistory {
543
+ enabled?: boolean;
544
+ showInList?: boolean;
545
+ showInDetail?: boolean;
546
+ }
547
+ interface AXPAggregate {
548
+ id: string;
549
+ name: string;
550
+ title: AXPMultiLanguageString;
551
+ entities: AXPEntity[];
552
+ }
553
+ interface AXPModule {
554
+ name: string;
555
+ title: AXPMultiLanguageString;
556
+ aggregates: AXPAggregate[];
557
+ relationships?: AXPRelationship[];
558
+ }
559
+ interface AXPApplication {
560
+ name: string;
561
+ title: AXPMultiLanguageString;
562
+ modules: AXPModule[];
563
+ }
564
+ declare enum AXPEntityType {
565
+ Entity = 0,
566
+ AggregateRoot = 1,
567
+ ValueObject = 2
568
+ }
569
+ interface AXPEntityV2 {
570
+ version: 2;
571
+ module: string;
572
+ aggregate: string;
573
+ name: string;
574
+ type: AXPEntityType;
575
+ icon?: string;
576
+ title: string;
577
+ description?: string;
578
+ plugins?: {
579
+ name: string;
580
+ options?: AXPOptionsData;
581
+ }[];
582
+ pages?: AXPEntityPage[];
583
+ groups?: AXPEntityPropertyGroup[];
584
+ properties: AXPEntityProperty[];
585
+ formats: AXPEntityFormats;
586
+ columns?: AXPEntityTableColumn[];
587
+ validations?: AXPValidationRules;
588
+ interfaces?: {
589
+ master?: {
590
+ single?: AXPEntityMasterSingleLayoutView;
591
+ list?: AXPEntityMasterListView;
592
+ create?: AXPEntityMasterCreateLayoutView;
593
+ update?: AXPEntityMasterUpdateLayoutView;
594
+ };
595
+ detail?: {
596
+ list?: AXPEntityDetailListView;
597
+ };
598
+ };
599
+ }
600
+
601
+ interface AXPAuditEvent {
602
+ at?: Date;
603
+ by?: AXPUserReference;
604
+ reason?: string;
605
+ source?: string;
606
+ }
607
+ interface AXPRecordAuditInfo {
608
+ created?: AXPAuditEvent;
609
+ updated?: AXPAuditEvent;
610
+ deleted?: AXPAuditEvent;
611
+ }
612
+ interface AXPRecordStateInfo {
613
+ isHidden?: boolean;
614
+ isSystem?: boolean;
615
+ isImmutable?: boolean;
616
+ /** @deprecated Prefer explicit domain modeling over this flag. */
617
+ isDistributed?: boolean;
618
+ }
619
+ interface AXPRecordOwnershipInfo {
620
+ tenantId?: string;
621
+ applicationId?: string;
622
+ userId?: string;
623
+ }
624
+ interface AXPRecordWorkflowInfo {
625
+ instanceId?: string | null;
626
+ definitionId?: string | null;
627
+ correlationId?: string | null;
628
+ pinnedVersion?: number | null;
629
+ }
630
+ interface AXPEntityModel<Id> {
631
+ id: Id;
632
+ auditInfo?: AXPRecordAuditInfo;
633
+ stateInfo?: AXPRecordStateInfo;
634
+ ownershipInfo?: AXPRecordOwnershipInfo;
635
+ workflowInfo?: AXPRecordWorkflowInfo;
636
+ }
637
+ interface AXPEntityCreateDto {
638
+ }
639
+ interface AXPEntityUpdateDto<Id> {
640
+ id: Id;
641
+ }
642
+ interface AXPEntityOutputDto<Id> {
643
+ id: Id;
644
+ }
645
+ interface AXPEntityDetailDto<Id> extends AXPEntityOutputDto<Id> {
646
+ }
647
+ interface AXPEntityListItemDto<Id> extends AXPEntityOutputDto<Id> {
648
+ }
649
+ interface AXPMockDto<Id> extends AXPEntityModel<Id> {
650
+ }
651
+
652
+ type AXPEntityAggregateReducerType = 'count' | 'sum' | 'min' | 'max' | 'avg';
653
+ interface AXPEntityAggregateMeasure {
654
+ reducer: AXPEntityAggregateReducerType;
655
+ /** Required for sum, min, max, and avg. Ignored for count (rows per group). */
656
+ field?: string;
657
+ /** Result column name; defaults are derived from the reducer and field. */
658
+ alias?: string;
659
+ }
660
+ /**
661
+ * Aggregate stored rows after the same filter/sort pipeline as {@link AXPQueryRequest}.
662
+ * Group keys use dotted field paths (same as lodash-style getters).
663
+ */
664
+ interface AXPEntityAggregateRequest extends Pick<AXPQueryRequest, 'filter' | 'sort'> {
665
+ groupBy: string[];
666
+ measures: AXPEntityAggregateMeasure[];
667
+ }
668
+ interface AXPEntityAggregateResult {
669
+ rows: Record<string, unknown>[];
670
+ }
671
+ interface AXPEntityQueryAllOptions {
672
+ /**
673
+ * Page size for backends that read page-by-page (HTTP API).
674
+ * In-memory backends load the filtered set once and ignore this.
675
+ */
676
+ pageSize?: number;
677
+ /** Maximum rows to return or scan (safety cap). */
678
+ maxRows?: number;
679
+ }
680
+ interface AXPEntityQueryAllResult<T> {
681
+ items: T[];
682
+ /** Row count matching filter/sort before applying maxRows. */
683
+ total: number;
684
+ /** True when maxRows prevented returning every matching row. */
685
+ truncated: boolean;
686
+ }
687
+ interface AXPEntityAggregateOptions {
688
+ /** Maximum rows to load for aggregation when the backend pages remotely (default 50_000). */
689
+ maxRows?: number;
690
+ /** Page size for remote paging during aggregate (default 500). */
691
+ pageSize?: number;
692
+ }
693
+
694
+ declare function entityMasterCreateAction(): AXPEntityAction;
695
+ declare function entityMasterEditAction(): AXPEntityAction;
696
+ declare function entityMasterBulkDeleteAction(): AXPEntityAction;
697
+ declare function entityMasterViewAction(): AXPEntityAction;
698
+ declare function entityMasterDeleteAction(): AXPEntityAction;
699
+ declare function entityMasterCrudActions(options?: {
700
+ create?: boolean;
701
+ delete?: boolean;
702
+ view?: boolean;
703
+ edit?: boolean;
704
+ }): AXPEntityAction[];
705
+ declare function entityMasterRecordActions(): AXPEntityAction[];
706
+ declare function entityDetailsCreateActions(parentId: string): AXPEntityAction;
707
+ declare function entityDetailsCreateActionsDeferredParent(): AXPEntityAction;
708
+ declare function mergeForeignKeyFieldIntoCreateActions(foreignKeyField: string | undefined, actions: AXPEntityAction[] | undefined): AXPEntityAction[];
709
+ declare function collectNestedCreateHiddenProperties(relatedEntity: AXPRelatedEntity): string[] | undefined;
710
+ declare function entityDetailsSimpleCondition(fk: string): AXPQueryFilter;
711
+ declare function entityDetailsReferenceCondition(type: string): AXPQueryFilter[];
712
+ declare function entityDetailsEditAction(): AXPEntityAction;
713
+ declare function entityDetailsNewEditAction(): AXPEntityAction;
714
+ declare function entityOverrideDetailsViewAction(): AXPEntityAction;
715
+ declare function entityDetailsCrudActions(parentId?: string, options?: {
716
+ create?: boolean;
717
+ delete?: boolean;
718
+ view?: boolean;
719
+ edit?: boolean;
720
+ }): AXPEntityAction[];
721
+ declare function entityDetailsReferenceCreateActions(type: string): AXPEntityAction[];
722
+
723
+ /**
724
+ * Normalizes display templates before expression evaluation.
725
+ * Converts simple dot paths (e.g. `{{ position.title }}`) to `context.eval("position.title")`.
726
+ */
727
+ declare function normalizeExpressionTemplate(template: string): string;
728
+ /** @see normalizeExpressionTemplate */
729
+ declare const normalizeEntityDisplayTemplate: typeof normalizeExpressionTemplate;
730
+ /** True when formatted text still contains unresolved template markers. */
731
+ declare function isUnresolvedEntityDisplayTemplate(value: string): boolean;
732
+ /**
733
+ * Strips literal `undefined` / `null` tokens produced when expression segments are missing.
734
+ */
735
+ declare function sanitizeResolvedEntityDisplayTitle(value: string): string;
736
+ /** True when a resolved title is non-empty and safe to show in search or entity chrome. */
737
+ declare function isMeaningfulEntityDisplayTitle(value: string): boolean;
738
+ declare function isRowBoundEntityDisplayTemplate(template: string): boolean;
739
+
740
+ interface AXPEntityPropertyExposeEntry {
741
+ source: string;
742
+ target: string;
743
+ }
744
+ type AXPEntityPropertyLike = {
745
+ name: string;
746
+ schema?: {
747
+ interface?: {
748
+ options?: Record<string, unknown>;
749
+ };
750
+ };
751
+ };
752
+ /**
753
+ * Parses lookup/select `expose` entries from a property interface options object.
754
+ */
755
+ declare function parsePropertyExposeEntries(options: Record<string, unknown> | undefined): AXPEntityPropertyExposeEntry[];
756
+ /**
757
+ * Collects all non-empty `expose[].target` paths from a property.
758
+ */
759
+ declare function collectPropertyExposeTargetPaths(property: AXPEntityPropertyLike): string[];
760
+ /**
761
+ * Resolves list column `options.dataPath` for a property when explicitly set.
762
+ */
763
+ declare function resolveEntityColumnDataPath(entity: AXPEntity | null | undefined, propertyName: string): string | undefined;
764
+ /**
765
+ * Resolves the lodash-get path for lookup/select display text from expose metadata.
766
+ */
767
+ declare function resolvePropertyExposeDisplayTarget(options: Record<string, unknown> | undefined): string | undefined;
768
+ /**
769
+ * Resolves the lodash-get path used for inline `contains` filters on lookup/select properties.
770
+ * Prefers list column `dataPath`, then lookup `expose` target for `textField` (or first non-id expose).
771
+ * Returns `undefined` when the property name should be used as-is (e.g. plain text fields).
772
+ */
773
+ declare function resolveEntityPropertyInlineFilterField(entity: AXPEntity | null | undefined, property: AXPEntityPropertyLike): string | undefined;
774
+
775
+ interface AXPEntitySearchTitleContext {
776
+ /** Templates tried after the primary `searchResult.title` fails (`single.title`, lookup, individual). */
777
+ fallbackTemplates: string[];
778
+ /** Entity property paths tried when templates do not resolve (`lookup`, identifier, common fields). */
779
+ fallbackFields: string[];
780
+ }
781
+ /**
782
+ * Builds entity-scoped fallback metadata for global search (registered on each entity search definition).
783
+ */
784
+ declare function buildEntitySearchTitleContext(entity: AXPEntity, primaryTemplate?: string): AXPEntitySearchTitleContext;
785
+ /**
786
+ * Row title template chain aligned with entity layouts.
787
+ * Priority: `interfaces.master.single.title` → `formats.searchResult.title` → `formats.individual`.
788
+ */
789
+ declare function resolveEntityRowTitleTemplate(entity: AXPEntity | null | undefined): string | undefined;
790
+ /**
791
+ * Record title template for modify popups: `interfaces.master.update.title` → `single.title`.
792
+ */
793
+ declare function resolveEntityModifyRecordTitleTemplate(entity: AXPEntity | null | undefined): string | undefined;
794
+
795
+ type AXPCollectEntityQuickSearchPathsResolver = (moduleName: string, entityName: string) => Promise<AXPEntity | null>;
796
+ /**
797
+ * Lodash-get paths for quick search from a single entity definition: string-like property names
798
+ * plus lookup `expose[].target` paths (e.g. `brand.title`).
799
+ */
800
+ declare function collectQuickSearchPathsFromSingleEntityDefinition(entity: AXPEntity | null | undefined): string[];
801
+ /**
802
+ * Adds dotted paths from master columns (`name` or `options.dataPath`), e.g. `person.fullName`, `jobDefinition.title`.
803
+ */
804
+ declare function collectNestedFieldPathsFromEntityColumns(entity: AXPEntity | null | undefined): string[];
805
+ /**
806
+ * Collects lodash-get field paths used for mock/API quick search (`contains` / OR filters):
807
+ * host properties and lookup expose targets, dotted column paths, and merge-detail related entities
808
+ * prefixed with the related entity merge `persistence.dataPath` (e.g. `person.firstName`).
809
+ */
810
+ declare function collectEntityQuickSearchFieldPaths(entity: AXPEntity | null | undefined, resolveRelatedDefinition: AXPCollectEntityQuickSearchPathsResolver): Promise<string[]>;
811
+
812
+ interface AXPBuildEntityListFilterDefinitionsDeps {
813
+ resolveWidget?: (type: AXPWidgetTypesMap[keyof AXPWidgetTypesMap]) => {
814
+ icon?: string;
815
+ defaultFilterWidgetName?: string;
816
+ } | undefined;
817
+ }
818
+ /**
819
+ * Builds master-list filter definitions from host properties and merge-detail related entities.
820
+ * Related filters use `{dataPath}.{property}` query fields (e.g. `person.firstName`).
821
+ */
822
+ declare function collectEntityListFilterDefinitions(entity: AXPEntity | null | undefined, resolveRelatedDefinition: AXPCollectEntityQuickSearchPathsResolver, deps?: AXPBuildEntityListFilterDefinitionsDeps): Promise<AXPEntityListFilterDefinition[]>;
823
+
824
+ /** Entity query filter field for {@link AXPRecordWorkflowInfo.instanceId}. */
825
+ declare const AXP_RECORD_WORKFLOW_INFO_INSTANCE_ID_FIELD: "workflowInfo.instanceId";
826
+ /** Entity query filter field for {@link AXPRecordWorkflowInfo.correlationId}. */
827
+ declare const AXP_RECORD_WORKFLOW_INFO_CORRELATION_ID_FIELD: "workflowInfo.correlationId";
828
+ /** Entity query filter field for {@link AXPRecordWorkflowInfo.definitionId}. */
829
+ declare const AXP_RECORD_WORKFLOW_INFO_DEFINITION_ID_FIELD: "workflowInfo.definitionId";
830
+ /** Returns a trimmed workflow instance id from a record, if present. */
831
+ declare function getRecordWorkflowInstanceId(record: {
832
+ workflowInfo?: AXPRecordWorkflowInfo | null;
833
+ } | null | undefined): string | null;
834
+ /** Returns a trimmed workflow correlation id from a record, if present. */
835
+ declare function getRecordWorkflowCorrelationId(record: {
836
+ workflowInfo?: AXPRecordWorkflowInfo | null;
837
+ } | null | undefined): string | null;
838
+ /** Builds canonical workflow metadata for a domain record (engine / middleware). */
839
+ declare function buildAXPRecordWorkflowInfo(params: {
840
+ instanceId: string;
841
+ definitionId?: string | null;
842
+ correlationId?: string | null;
843
+ pinnedVersion?: number | null;
844
+ }): AXPRecordWorkflowInfo;
845
+
846
+ /** Row path used when context carries a nested entity layout title. */
847
+ declare const ENTITY_LAYOUT_SINGLE_TITLE_PATH = "entity.layout.single.title";
848
+ /** Widget option for a pre-evaluated or template entity row title (entity list column mappers). */
849
+ declare const ENTITY_ROW_POPUP_TITLE_OPTION = "popupTitle";
850
+ /** Widget option alias for entity row title templates in view/edit forms. */
851
+ declare const ENTITY_ROW_TITLE_TEMPLATE_OPTION = "titleTemplate";
852
+
853
+ /** Platform entity layout datasource registry names. */
854
+ declare const AXPEntityDataSourceKeys: {
855
+ readonly Entities: "entities";
856
+ };
857
+
858
+ declare const AXPEntityEventsKeys: {
859
+ readonly REFRESH_LAYOUT: "entity:refresh-layout";
860
+ readonly REFRESH_DATA: "entity:refresh-data";
861
+ };
862
+
863
+ export { AXPEntityCommandScope, AXPEntityDataSourceKeys, AXPEntityEventsKeys, AXPEntityQueryType, AXPEntityType, AXPRelationshipCardinality, AXPRelationshipKind, AXP_RECORD_WORKFLOW_INFO_CORRELATION_ID_FIELD, AXP_RECORD_WORKFLOW_INFO_DEFINITION_ID_FIELD, AXP_RECORD_WORKFLOW_INFO_INSTANCE_ID_FIELD, ENTITY_LAYOUT_SINGLE_TITLE_PATH, ENTITY_ROW_POPUP_TITLE_OPTION, ENTITY_ROW_TITLE_TEMPLATE_OPTION, buildAXPRecordWorkflowInfo, buildEntitySearchTitleContext, collectEntityListFilterDefinitions, collectEntityQuickSearchFieldPaths, collectNestedCreateHiddenProperties, collectNestedFieldPathsFromEntityColumns, collectPropertyExposeTargetPaths, collectQuickSearchPathsFromSingleEntityDefinition, createAllQueryView, createQueryView, encodeEntityListFilterContextField, entityDetailsCreateActions, entityDetailsCreateActionsDeferredParent, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsNewEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterEditAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, getEntityInfo, getRecordWorkflowCorrelationId, getRecordWorkflowInstanceId, isCardFieldBadgeDisplay, isMeaningfulEntityDisplayTitle, isRowBoundEntityDisplayTemplate, isUnresolvedEntityDisplayTemplate, mergeForeignKeyFieldIntoCreateActions, normalizeEntityDisplayTemplate, normalizeExpressionTemplate, parsePropertyExposeEntries, resolveCardFieldBadgeColor, resolveDefaultMasterListLayout, resolveEnabledMasterListLayouts, resolveEntityColumnDataPath, resolveEntityListFilterContextField, resolveEntityListFilterQueryField, resolveEntityModifyRecordTitleTemplate, resolveEntityPropertyInlineFilterField, resolveEntityRowTitleTemplate, resolvePropertyExposeDisplayTarget, sanitizeResolvedEntityDisplayTitle };
864
+ export type { AXEntityPropertyWidget, AXPAggregate, AXPApplication, AXPAuditEvent, AXPBuildEntityListFilterDefinitionsDeps, AXPCardBadgeColor, AXPCardBadgeDisplay, AXPCardBadgeDisplayOptions, AXPCardField, AXPCardFieldDisplay, AXPCardFieldDisplayConfig, AXPCollectEntityQuickSearchPathsResolver, AXPColumnAlign, AXPColumnContentAlign, AXPCommandActionCallback, AXPCommandActionDisplay, AXPCommandActionLook, AXPCommandActionPriority, AXPCommandActionType, AXPEntity, AXPEntityAction, AXPEntityAggregateMeasure, AXPEntityAggregateOptions, AXPEntityAggregateReducerType, AXPEntityAggregateRequest, AXPEntityAggregateResult, AXPEntityCategoryPlugin, AXPEntityCommand, AXPEntityCreateDto, AXPEntityDetailDto, AXPEntityDetailListView, AXPEntityDisplayField, AXPEntityFormats, AXPEntityListFilterDefinition, AXPEntityListItemDto, AXPEntityMasterCreateLayoutView, AXPEntityMasterLayoutView, AXPEntityMasterListDisplayMode, AXPEntityMasterListLayoutOption, AXPEntityMasterListLayoutType, AXPEntityMasterListView, AXPEntityMasterSingleLayoutView, AXPEntityMasterUpdateLayoutView, AXPEntityModel, AXPEntityOutputDto, AXPEntityPage, AXPEntityProperty, AXPEntityPropertyCreateView, AXPEntityPropertyExposeEntry, AXPEntityPropertyFilterOptions, AXPEntityPropertyGroup, AXPEntityPropertyLayoutConfig, AXPEntityPropertyLike, AXPEntityPropertyListOptions, AXPEntityPropertySortOptions, AXPEntityPropertyUpdateView, AXPEntityPropertyView, AXPEntityQuery, AXPEntityQueryAllOptions, AXPEntityQueryAllResult, AXPEntityQuickCreate, AXPEntitySearchResultFormat, AXPEntitySearchTitleContext, AXPEntitySectionView, AXPEntityTableColumn, AXPEntityUpdateDto, AXPEntityV2, AXPEntityVersionHistory, AXPMockDto, AXPModule, AXPQueryFilter, AXPQuerySort, AXPQueryView, AXPRecordAuditInfo, AXPRecordOwnershipInfo, AXPRecordStateInfo, AXPRecordWorkflowInfo, AXPRelatedEntity, AXPRelatedEntityLayout, AXPRelatedEntityPersistence, AXPRelationship };