@acorex/platform 21.0.0-next.7 → 21.0.0-next.70

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 (126) hide show
  1. package/fesm2022/acorex-platform-auth.mjs +281 -23
  2. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  3. package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs +163 -0
  4. package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-common.mjs +1370 -276
  6. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-core.mjs +1185 -514
  8. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-domain.mjs +557 -826
  10. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-builder.mjs +832 -189
  12. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs +121 -0
  14. package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-layout-components.mjs +6309 -1956
  16. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-layout-designer.mjs +456 -204
  18. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-layout-entity-attachments-page.component-D8iQnT-R.mjs +371 -0
  20. package/fesm2022/acorex-platform-layout-entity-attachments-page.component-D8iQnT-R.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-layout-entity-file-list-popup.component-_yrP5SQe.mjs +100 -0
  22. package/fesm2022/acorex-platform-layout-entity-file-list-popup.component-_yrP5SQe.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-layout-entity.mjs +22488 -10232
  24. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  25. package/fesm2022/acorex-platform-layout-views.mjs +564 -170
  26. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  27. package/fesm2022/acorex-platform-layout-widget-core.mjs +2084 -481
  28. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  29. package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs → acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs} +10 -10
  30. package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +1 -0
  31. package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs → acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs} +6 -7
  32. package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +1 -0
  33. package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs → acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs} +12 -12
  34. package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs +116 -0
  36. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs.map +1 -0
  37. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-BcpRkpJp.mjs} +6 -6
  38. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-BcpRkpJp.mjs.map +1 -0
  39. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-DQtK4lxl.mjs} +5 -5
  40. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DQtK4lxl.mjs.map +1 -0
  41. package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs} +6 -6
  42. package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +1 -0
  43. package/fesm2022/acorex-platform-layout-widgets.mjs +10326 -7981
  44. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  45. package/fesm2022/acorex-platform-native.mjs +8 -7
  46. package/fesm2022/acorex-platform-native.mjs.map +1 -1
  47. package/fesm2022/acorex-platform-runtime.mjs +391 -166
  48. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  49. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CWLfNqV0.mjs +160 -0
  50. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CWLfNqV0.mjs.map +1 -0
  51. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs +120 -0
  52. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs.map +1 -0
  53. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs → acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs} +21 -28
  54. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs.map +1 -0
  55. package/fesm2022/{acorex-platform-themes-default-error-401.component-cfREo88K.mjs → acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs} +4 -4
  56. package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +1 -0
  57. package/fesm2022/{acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs → acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs} +4 -4
  58. package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs.map +1 -0
  59. package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +19 -0
  60. package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +1 -0
  61. package/fesm2022/acorex-platform-themes-default.mjs +2283 -83
  62. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  63. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs → acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs} +6 -6
  64. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +1 -0
  65. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs} +6 -6
  66. package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +1 -0
  67. package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs} +52 -33
  68. package/fesm2022/acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs.map +1 -0
  69. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +94 -0
  70. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +1 -0
  71. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs +86 -0
  72. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +1 -0
  73. package/fesm2022/acorex-platform-themes-shared.mjs +767 -609
  74. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  75. package/fesm2022/acorex-platform-workflow.mjs +978 -238
  76. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  77. package/fesm2022/acorex-platform.mjs.map +1 -1
  78. package/package.json +40 -38
  79. package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +241 -4
  80. package/{common/index.d.ts → types/acorex-platform-common.d.ts} +822 -89
  81. package/{core/index.d.ts → types/acorex-platform-core.d.ts} +658 -133
  82. package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +744 -412
  83. package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +194 -49
  84. package/types/acorex-platform-layout-components.d.ts +3253 -0
  85. package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +96 -18
  86. package/types/acorex-platform-layout-entity.d.ts +4439 -0
  87. package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +179 -56
  88. package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +398 -127
  89. package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +1120 -501
  90. package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
  91. package/types/acorex-platform-runtime.d.ts +571 -0
  92. package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +233 -6
  93. package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +24 -2
  94. package/{workflow/index.d.ts → types/acorex-platform-workflow.d.ts} +620 -617
  95. package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs +0 -71
  96. package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs.map +0 -1
  97. package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs.map +0 -1
  98. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs +0 -135
  99. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs.map +0 -1
  100. package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs.map +0 -1
  101. package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs.map +0 -1
  102. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs.map +0 -1
  103. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs.map +0 -1
  104. package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs.map +0 -1
  105. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs +0 -157
  106. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs.map +0 -1
  107. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DfJEx_bs.mjs +0 -1542
  108. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DfJEx_bs.mjs.map +0 -1
  109. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs +0 -101
  110. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs.map +0 -1
  111. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs.map +0 -1
  112. package/fesm2022/acorex-platform-themes-default-error-401.component-cfREo88K.mjs.map +0 -1
  113. package/fesm2022/acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs.map +0 -1
  114. package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs +0 -19
  115. package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs.map +0 -1
  116. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +0 -1
  117. package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs.map +0 -1
  118. package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +0 -1
  119. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs +0 -65
  120. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs.map +0 -1
  121. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs +0 -64
  122. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs.map +0 -1
  123. package/layout/components/index.d.ts +0 -1669
  124. package/layout/entity/index.d.ts +0 -2287
  125. package/runtime/index.d.ts +0 -307
  126. /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
@@ -1,8 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, Injectable, computed, input, effect, Directive, EventEmitter, HostListener, Output, ViewContainerRef, ElementRef, signal, output, DestroyRef, Renderer2, untracked, Injector, runInInjectionContext, provideAppInitializer, NgModule, Pipe } from '@angular/core';
2
+ import { InjectionToken, inject, Injectable, Directive, computed, Injector, ChangeDetectionStrategy, Component, input, ElementRef, ViewContainerRef, signal, effect, runInInjectionContext, Optional, Inject, NgModule, EventEmitter, HostListener, Output, provideAppInitializer, Pipe } from '@angular/core';
3
+ import { get, isPlainObject, set, isNil, isEmpty, isArray, merge, isObjectLike, transform, isEqual, differenceWith, union, cloneDeep, has, sortBy, isUndefined, endsWith, startsWith, includes, lte, gte, lt, gt, orderBy } from 'lodash-es';
3
4
  import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
4
- import { get, isPlainObject, set, isArray, merge, isNil, isObjectLike, transform, isEmpty, isEqual, differenceWith, union, cloneDeep, isUndefined, endsWith, startsWith, includes, lte, gte, lt, gt, orderBy } from 'lodash-es';
5
+ import * as i1 from '@acorex/components/skeleton';
6
+ import { AXSkeletonModule } from '@acorex/components/skeleton';
5
7
  import { Subject, interval, fromEvent } from 'rxjs';
8
+ import { AXDataSource } from '@acorex/cdk/common';
9
+ import { AXTranslationService, resolveMultiLanguageString } from '@acorex/core/translation';
6
10
  import { AXCalendarService } from '@acorex/core/date-time';
7
11
  import { startWith, map, debounceTime } from 'rxjs/operators';
8
12
 
@@ -17,10 +21,10 @@ class AXPActivityLogService {
17
21
  async getHistoryByIds(refId, refType, ids) {
18
22
  return (await Promise.all(this.providers?.map((p) => p.getHistoryByIds(refId, refType, ids)) ?? [])).flat();
19
23
  }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityLogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
21
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityLogService, providedIn: 'root' }); }
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPActivityLogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
25
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPActivityLogService, providedIn: 'root' }); }
22
26
  }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityLogService, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPActivityLogService, decorators: [{
24
28
  type: Injectable,
25
29
  args: [{ providedIn: 'root' }]
26
30
  }] });
@@ -170,10 +174,10 @@ class AXPColorPaletteService {
170
174
  const uniquePalettes = allPalettes.filter((palette, index, self) => index === self.findIndex((p) => p.name === palette.name));
171
175
  this.cache = uniquePalettes;
172
176
  }
173
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColorPaletteService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
174
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColorPaletteService, providedIn: 'root' }); }
177
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorPaletteService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
178
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorPaletteService, providedIn: 'root' }); }
175
179
  }
176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColorPaletteService, decorators: [{
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorPaletteService, decorators: [{
177
181
  type: Injectable,
178
182
  args: [{
179
183
  providedIn: 'root',
@@ -288,13 +292,241 @@ class AXPDefaultColorPalettesProvider extends AXPColorPaletteProvider {
288
292
  },
289
293
  ];
290
294
  }
291
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDefaultColorPalettesProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
292
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDefaultColorPalettesProvider }); }
295
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultColorPalettesProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
296
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultColorPalettesProvider }); }
293
297
  }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDefaultColorPalettesProvider, decorators: [{
298
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultColorPalettesProvider, decorators: [{
295
299
  type: Injectable
296
300
  }] });
297
301
 
302
+ //#region ---- Column Width Provider ----
303
+ /**
304
+ * Injection token for column width providers
305
+ * Use this to register multiple column width providers with multi: true
306
+ *
307
+ * @example
308
+ * ```typescript
309
+ * providers: [
310
+ * {
311
+ * provide: AXP_COLUMN_WIDTH_PROVIDER,
312
+ * useValue: {
313
+ * matchers: [
314
+ * { name: 'title', width: '300px', priority: 10 },
315
+ * { widgetType: /text-box/i, width: '200px' }
316
+ * ],
317
+ * priority: 150
318
+ * },
319
+ * multi: true
320
+ * }
321
+ * ]
322
+ * ```
323
+ */
324
+ const AXP_COLUMN_WIDTH_PROVIDER = new InjectionToken('AXP_COLUMN_WIDTH_PROVIDER');
325
+ //#endregion
326
+
327
+ //#region ---- Column Width Service ----
328
+ /**
329
+ * Service for resolving column widths based on registered providers
330
+ * Supports matching by column name (priority) and widget type (fallback)
331
+ * Uses multi-provider pattern for extensibility
332
+ */
333
+ class AXPColumnWidthService {
334
+ constructor() {
335
+ //#region ---- Services & Dependencies ----
336
+ this.providers = inject(AXP_COLUMN_WIDTH_PROVIDER, {
337
+ optional: true,
338
+ }) ?? [];
339
+ }
340
+ //#region ---- Public Methods ----
341
+ /**
342
+ * Resolve width for a column based on registered providers
343
+ * Only returns a width if column doesn't already have one set
344
+ *
345
+ * @param column Column to resolve width for
346
+ * @returns Resolved width string (normalized) or undefined if no match or column already has width
347
+ */
348
+ resolveWidth(column) {
349
+ // If column already has a width set, don't override
350
+ const existingWidth = column.width || column.options?.width;
351
+ if (existingWidth) {
352
+ return undefined;
353
+ }
354
+ // Get widget type from column (support both widget.type and showAs.type)
355
+ const widgetType = column.widget?.type || column.showAs?.type;
356
+ // Collect all matchers from all providers
357
+ const allMatchers = this.collectMatchers();
358
+ // Try name-based matches first (higher priority)
359
+ const nameMatch = this.findNameMatch(column.name, allMatchers);
360
+ if (nameMatch) {
361
+ return this.normalizeWidth(nameMatch.width);
362
+ }
363
+ // Fallback to widget-type matches (case-insensitive)
364
+ if (widgetType) {
365
+ const widgetMatch = this.findWidgetTypeMatch(widgetType, allMatchers);
366
+ if (widgetMatch) {
367
+ return this.normalizeWidth(widgetMatch.width);
368
+ }
369
+ }
370
+ return undefined;
371
+ }
372
+ /**
373
+ * Apply resolved width to a column (mutates the column)
374
+ * Only applies if column doesn't already have a width
375
+ *
376
+ * @param column Column to apply width to
377
+ * @returns true if width was applied, false if column already had width or no match found
378
+ */
379
+ applyWidth(column) {
380
+ const width = this.resolveWidth(column);
381
+ if (!width) {
382
+ return false;
383
+ }
384
+ // Apply to the appropriate property
385
+ if (column.options) {
386
+ column.options.width = width;
387
+ }
388
+ else {
389
+ column.width = width;
390
+ }
391
+ return true;
392
+ }
393
+ //#endregion
394
+ //#region ---- Private Methods ----
395
+ /**
396
+ * Collect all matchers from all providers, sorted by provider priority and matcher priority
397
+ */
398
+ collectMatchers() {
399
+ const allMatchers = [];
400
+ for (const provider of this.providers) {
401
+ const providerPriority = provider.priority ?? 100;
402
+ for (const matcher of provider.matchers) {
403
+ allMatchers.push({
404
+ matcher,
405
+ providerPriority,
406
+ });
407
+ }
408
+ }
409
+ // Sort by provider priority (descending), then by matcher priority (descending)
410
+ allMatchers.sort((a, b) => {
411
+ if (a.providerPriority !== b.providerPriority) {
412
+ return b.providerPriority - a.providerPriority; // Higher priority first
413
+ }
414
+ const priorityA = a.matcher.priority ?? 0;
415
+ const priorityB = b.matcher.priority ?? 0;
416
+ return priorityB - priorityA; // Higher priority first
417
+ });
418
+ return allMatchers;
419
+ }
420
+ /**
421
+ * Find first matching matcher by column name
422
+ * Name matches take precedence over widget type matches
423
+ */
424
+ findNameMatch(columnName, allMatchers) {
425
+ for (const { matcher } of allMatchers) {
426
+ if (!matcher.name) {
427
+ continue; // Skip if no name matcher
428
+ }
429
+ if (typeof matcher.name === 'string') {
430
+ // Exact string match (case-sensitive for names)
431
+ if (matcher.name === columnName) {
432
+ return matcher;
433
+ }
434
+ }
435
+ else if (matcher.name instanceof RegExp) {
436
+ // RegExp match
437
+ if (matcher.name.test(columnName)) {
438
+ return matcher;
439
+ }
440
+ }
441
+ }
442
+ return undefined;
443
+ }
444
+ /**
445
+ * Find first matching matcher by widget type (case-insensitive)
446
+ */
447
+ findWidgetTypeMatch(widgetType, allMatchers) {
448
+ const widgetTypeLower = widgetType.toLowerCase();
449
+ for (const { matcher } of allMatchers) {
450
+ if (!matcher.widgetType) {
451
+ continue; // Skip if no widget type matcher
452
+ }
453
+ if (typeof matcher.widgetType === 'string') {
454
+ // Case-insensitive string match
455
+ if (matcher.widgetType.toLowerCase() === widgetTypeLower) {
456
+ return matcher;
457
+ }
458
+ }
459
+ else if (matcher.widgetType instanceof RegExp) {
460
+ // RegExp match (should already be case-insensitive if needed, but we'll test case-insensitively)
461
+ // Create a new regex with case-insensitive flag if not already present
462
+ let regex = matcher.widgetType;
463
+ if (!regex.flags.includes('i')) {
464
+ regex = new RegExp(regex.source, regex.flags + 'i');
465
+ }
466
+ if (regex.test(widgetType)) {
467
+ return matcher;
468
+ }
469
+ }
470
+ }
471
+ return undefined;
472
+ }
473
+ /**
474
+ * Normalize width value to string format
475
+ * Numbers are converted to pixels (e.g., 150 -> '150px')
476
+ * Strings are preserved as-is (supports any CSS unit)
477
+ */
478
+ normalizeWidth(width) {
479
+ if (typeof width === 'number') {
480
+ return `${width}px`;
481
+ }
482
+ return width;
483
+ }
484
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
485
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidthService, providedIn: 'root' }); }
486
+ }
487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColumnWidthService, decorators: [{
488
+ type: Injectable,
489
+ args: [{
490
+ providedIn: 'root',
491
+ }]
492
+ }] });
493
+
494
+ //#region ---- Column Width Types ----
495
+ //#endregion
496
+
497
+ //#region ---- Default Column Width Provider ----
498
+ /**
499
+ * Default column width configuration
500
+ * Migrated from DEFAULT_COLUMN_WIDTHS in column-width.middleware.ts
501
+ * Provides sensible defaults for common column names
502
+ */
503
+ const defaultColumnWidthProvider = {
504
+ priority: 100,
505
+ matchers: [
506
+ // Priority: name-based matches (higher priority = more specific)
507
+ { name: 'code', width: '150px', priority: 10 },
508
+ { name: 'name', width: '250px', priority: 10 },
509
+ { name: 'title', width: '250px', priority: 10 },
510
+ { name: 'description', width: '350px', priority: 10 },
511
+ { name: 'note', width: '350px', priority: 10 },
512
+ { name: 'notes', width: '350px', priority: 10 },
513
+ { name: 'content', width: '500px', priority: 10 },
514
+ { name: 'level', width: '100px', priority: 10 },
515
+ { name: 'order', width: '100px', priority: 10 },
516
+ { name: 'phones', width: '300px', priority: 10 },
517
+ { name: 'emails', width: '300px', priority: 10 },
518
+ ],
519
+ };
520
+ //#endregion
521
+
522
+ class AXPComponentSlot {
523
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPComponentSlot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
524
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: AXPComponentSlot, isStandalone: true, ngImport: i0 }); }
525
+ }
526
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPComponentSlot, decorators: [{
527
+ type: Directive
528
+ }] });
529
+
298
530
  function extractNestedFieldsWildcard(obj, basePath, fields) {
299
531
  const result = {};
300
532
  if (fields.length === 1 && fields[0] === '*') {
@@ -313,7 +545,41 @@ function setSmart(obj, smartPath, value) {
313
545
  const lastPart = pathParts[pathParts.length - 1];
314
546
  const fieldMatch = lastPart.match(/^\{(.+)\}$/);
315
547
  if (!fieldMatch) {
548
+ // Fix: If value is undefined and we're setting a nested property,
549
+ // check if the parent object exists and if setting this would result in
550
+ // all properties being undefined. If so, set the parent to null instead.
551
+ if (isNil(value) && pathParts.length > 1) {
552
+ const parentPath = pathParts.slice(0, -1).join('.');
553
+ const parentObj = get(obj, parentPath);
554
+ // If parent is already null/undefined, don't recreate the object structure
555
+ if (isNil(parentObj)) {
556
+ return obj;
557
+ }
558
+ // Check if parent is a plain object (not array, not null)
559
+ if (isPlainObject(parentObj)) {
560
+ const existingKeys = Object.keys(parentObj);
561
+ // Check if all existing properties are null/undefined using lodash
562
+ const allNil = isEmpty(existingKeys) || existingKeys.every((key) => isNil(parentObj[key]));
563
+ if (allNil) {
564
+ // Set parent to null instead of creating/keeping an object with all undefined properties
565
+ set(obj, parentPath, null);
566
+ return obj;
567
+ }
568
+ }
569
+ }
316
570
  set(obj, smartPath, value);
571
+ // After setting, check again if parent should be null using lodash
572
+ if (isNil(value) && pathParts.length > 1) {
573
+ const parentPath = pathParts.slice(0, -1).join('.');
574
+ const parentObj = get(obj, parentPath);
575
+ if (isPlainObject(parentObj)) {
576
+ // Use lodash to check if all properties are null/undefined
577
+ const allNil = Object.keys(parentObj).every((key) => isNil(parentObj[key]));
578
+ if (allNil) {
579
+ set(obj, parentPath, null);
580
+ }
581
+ }
582
+ }
317
583
  return obj;
318
584
  }
319
585
  const fields = fieldMatch[1].split(',').map((f) => f.trim());
@@ -525,9 +791,10 @@ function getEnumValues(enumType) {
525
791
 
526
792
  class AXPContextChangeEvent {
527
793
  }
528
- const AXPContextStore = signalStore({
529
- providedIn: 'root',
530
- },
794
+ //#endregion
795
+ //#region ---- Context signal store ----
796
+ // Shared reactive context: root injector has a default instance; widget/layout trees
797
+ const AXPContextStore = signalStore(
531
798
  // Initial State
532
799
  withState(() => ({
533
800
  data: {}, // Shared context data
@@ -577,7 +844,7 @@ withMethods((store) => ({
577
844
  lastChange: changeEvent,
578
845
  });
579
846
  },
580
- patch(context) {
847
+ patch(context, skipDirtyTracking = false) {
581
848
  const currentData = cloneDeep(store.data());
582
849
  // Update the value and prepare the change event
583
850
  const updatedData = { ...currentData, ...context };
@@ -587,7 +854,7 @@ withMethods((store) => ({
587
854
  };
588
855
  // Patch the state
589
856
  patchState(store, {
590
- previousSnapshot: store.snapshot(), // Save the previous state
857
+ ...(skipDirtyTracking ? {} : { previousSnapshot: store.snapshot() }),
591
858
  data: updatedData,
592
859
  state: 'changed',
593
860
  lastChange: changeEvent,
@@ -635,7 +902,473 @@ withMethods((store) => ({
635
902
  getValue(path) {
636
903
  return getSmart(store.data(), path);
637
904
  },
905
+ // Check if a path exists in the context
906
+ hasValue(path) {
907
+ return has(store.data(), path);
908
+ },
638
909
  })));
910
+ //#endregion
911
+
912
+ class AXPExpressionEvaluatorScopeProviderContext {
913
+ constructor() {
914
+ this.scopes = {};
915
+ }
916
+ addScope(namespace, functions) {
917
+ this.scopes[namespace] = { ...this.scopes[namespace], ...functions };
918
+ }
919
+ getScopes() {
920
+ return this.scopes;
921
+ }
922
+ }
923
+ const AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER = new InjectionToken('AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER');
924
+ class AXPExpressionEvaluatorScopeProviderService {
925
+ constructor() {
926
+ this.injector = inject(Injector);
927
+ this.cache = null;
928
+ }
929
+ async load() {
930
+ if (this.cache)
931
+ return;
932
+ const raw = this.injector.get(AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, [], { optional: true });
933
+ const providers = Array.isArray(raw)
934
+ ? raw
935
+ : typeof raw === 'function'
936
+ ? raw()
937
+ : [];
938
+ const context = new AXPExpressionEvaluatorScopeProviderContext();
939
+ for (const provider of providers) {
940
+ // Resolve lazy-loaded providers (provideLazyProvider useFactory returns Promise<Provider>)
941
+ const resolved = await Promise.resolve(provider);
942
+ if (!resolved || typeof resolved.provide !== 'function') {
943
+ continue;
944
+ }
945
+ await resolved.provide(context);
946
+ }
947
+ this.cache = context.getScopes();
948
+ }
949
+ async getScopesAsync() {
950
+ await this.load();
951
+ return this.cache || {};
952
+ }
953
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExpressionEvaluatorScopeProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
954
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExpressionEvaluatorScopeProviderService, providedIn: 'root' }); }
955
+ }
956
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExpressionEvaluatorScopeProviderService, decorators: [{
957
+ type: Injectable,
958
+ args: [{ providedIn: 'root' }]
959
+ }] });
960
+
961
+ class AXPExpressionEvaluatorService {
962
+ constructor() {
963
+ // Memoization cache for compiled expressions
964
+ this.expressionCache = new Map();
965
+ this.providerService = inject(AXPExpressionEvaluatorScopeProviderService);
966
+ }
967
+ getOrCompileFunction(expression) {
968
+ if (!this.expressionCache.has(expression)) {
969
+ // Check if expression contains multiple statements (has semicolons or newlines)
970
+ const hasMultipleStatements = expression.includes(';') || expression.includes('\n');
971
+ let fn;
972
+ if (hasMultipleStatements) {
973
+ // For multiple statements, execute them in sequence and return the last expression
974
+ fn = new Function('scope', `with (scope) { return (async function() { ${expression} })(); }`);
975
+ }
976
+ else {
977
+ // For single expressions, use return
978
+ fn = new Function('scope', `with (scope) { return (async function() { return ${expression}; })(); }`);
979
+ }
980
+ this.expressionCache.set(expression, fn);
981
+ }
982
+ return this.expressionCache.get(expression);
983
+ }
984
+ async getMergedScope(userScope) {
985
+ const pluginScopes = await this.providerService.getScopesAsync();
986
+ // Merge pluginScopes and userScope (userScope takes precedence)
987
+ return { ...pluginScopes, ...userScope };
988
+ }
989
+ async evaluate(source, scope = {}) {
990
+ try {
991
+ const mergedScope = await this.getMergedScope(scope);
992
+ if (typeof source === 'string' && source.includes('{{')) {
993
+ return await this.evaluateStringExpression(source, mergedScope);
994
+ }
995
+ else if (Array.isArray(source)) {
996
+ const evaluatedArray = [];
997
+ for (const item of source) {
998
+ evaluatedArray.push(await this.evaluate(item, mergedScope));
999
+ }
1000
+ return evaluatedArray;
1001
+ }
1002
+ else if (typeof source === 'object' && source !== null) {
1003
+ const evaluatedObject = {};
1004
+ for (const key in source) {
1005
+ if (source.hasOwnProperty(key)) {
1006
+ evaluatedObject[key] = await this.evaluate(source[key], mergedScope);
1007
+ }
1008
+ }
1009
+ return evaluatedObject;
1010
+ }
1011
+ else {
1012
+ return source;
1013
+ }
1014
+ }
1015
+ catch (error) {
1016
+ console.error('Expression evaluator - Error evaluating expression:', source, error);
1017
+ return false;
1018
+ }
1019
+ }
1020
+ async evaluateStringExpression(templateExpression, scope) {
1021
+ // Check if the input is exactly a single {{ ... }} expression (handle multiline)
1022
+ const exactMatch = templateExpression.match(/^\s*\{\{\s*([\s\S]*?)\s*\}\}\s*$/);
1023
+ if (exactMatch) {
1024
+ const expression = exactMatch[1];
1025
+ const sandbox = this.getOrCompileFunction(expression);
1026
+ const result = await sandbox(scope);
1027
+ return result;
1028
+ }
1029
+ // Otherwise, interpolate all {{ ... }} expressions in the string
1030
+ const regex = /\{\{\s*([\s\S]*?)\s*\}\}/g;
1031
+ // Collect all matches and their positions
1032
+ const matches = [];
1033
+ let match;
1034
+ while ((match = regex.exec(templateExpression)) !== null) {
1035
+ matches.push({
1036
+ expression: match[1],
1037
+ start: match.index,
1038
+ end: regex.lastIndex,
1039
+ raw: match[0],
1040
+ });
1041
+ }
1042
+ // Evaluate all expressions in parallel
1043
+ const values = await Promise.all(matches.map((m) => {
1044
+ const sandbox = this.getOrCompileFunction(m.expression);
1045
+ return sandbox(scope);
1046
+ }));
1047
+ // Reconstruct the string with evaluated values
1048
+ let result = '';
1049
+ let lastIndex = 0;
1050
+ matches.forEach((m, i) => {
1051
+ result += templateExpression.slice(lastIndex, m.start);
1052
+ const value = values[i];
1053
+ result += value !== undefined && value !== null ? value : '';
1054
+ lastIndex = m.end;
1055
+ });
1056
+ result += templateExpression.slice(lastIndex);
1057
+ return result;
1058
+ }
1059
+ isExpression(expression) {
1060
+ if (typeof expression === 'string') {
1061
+ return expression.trim().startsWith('{{') && expression.trim().endsWith('}}');
1062
+ }
1063
+ return false;
1064
+ }
1065
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExpressionEvaluatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1066
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExpressionEvaluatorService, providedIn: 'root' }); }
1067
+ }
1068
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPExpressionEvaluatorService, decorators: [{
1069
+ type: Injectable,
1070
+ args: [{ providedIn: 'root' }]
1071
+ }] });
1072
+
1073
+ class AXPComponentSlotPlaceholderComponent {
1074
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPComponentSlotPlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1075
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPComponentSlotPlaceholderComponent, isStandalone: true, selector: "axp-component-slot-placeholder", ngImport: i0, template: `<div>
1076
+ <ax-skeleton class="ax-w-full ax-h-10 ax-rounded-md"></ax-skeleton>
1077
+ </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1078
+ }
1079
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPComponentSlotPlaceholderComponent, decorators: [{
1080
+ type: Component,
1081
+ args: [{
1082
+ selector: 'axp-component-slot-placeholder',
1083
+ template: `<div>
1084
+ <ax-skeleton class="ax-w-full ax-h-10 ax-rounded-md"></ax-skeleton>
1085
+ </div>`,
1086
+ changeDetection: ChangeDetectionStrategy.OnPush,
1087
+ imports: [AXSkeletonModule],
1088
+ standalone: true,
1089
+ }]
1090
+ }] });
1091
+
1092
+ class AXPComponentSlotRegistryService {
1093
+ constructor() {
1094
+ this.registry = new Map();
1095
+ }
1096
+ register(slotName, config) {
1097
+ let configs = this.registry.get(slotName) || [];
1098
+ // Check if the component is already registered in this slot
1099
+ const isDuplicate = configs.some(existingConfig => existingConfig.name === config.name);
1100
+ if (!isDuplicate) {
1101
+ configs = [...configs, config]; // Add the new configuration
1102
+ this.registry.set(slotName, configs);
1103
+ }
1104
+ }
1105
+ get(slotName) {
1106
+ return this.registry.get(slotName) || [];
1107
+ }
1108
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPComponentSlotRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1109
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPComponentSlotRegistryService, providedIn: 'root' }); }
1110
+ }
1111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPComponentSlotRegistryService, decorators: [{
1112
+ type: Injectable,
1113
+ args: [{
1114
+ providedIn: 'root'
1115
+ }]
1116
+ }] });
1117
+
1118
+ class AXPComponentSlotDirective {
1119
+ constructor() {
1120
+ this.name = input.required(...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
1121
+ this.host = input(...(ngDevMode ? [undefined, { debugName: "host" }] : /* istanbul ignore next */ []));
1122
+ this.context = input(...(ngDevMode ? [undefined, { debugName: "context" }] : /* istanbul ignore next */ []));
1123
+ this.elementRef = inject(ElementRef);
1124
+ this.registryService = inject(AXPComponentSlotRegistryService);
1125
+ this.injector = inject(Injector);
1126
+ this.evaluator = inject(AXPExpressionEvaluatorService);
1127
+ this.viewContainerRef = inject(ViewContainerRef);
1128
+ this.contextStore = inject(AXPContextStore);
1129
+ this.isEmpty = computed(() => this._viewCount() === 0, ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
1130
+ // Create a signal to store the count of children
1131
+ this._viewCount = signal(0, ...(ngDevMode ? [{ debugName: "_viewCount" }] : /* istanbul ignore next */ []));
1132
+ // Track component references for updates
1133
+ this.componentRefs = [];
1134
+ // Track placeholder references for replacement
1135
+ this.placeholderRefs = new Map();
1136
+ // Watch for context changes and update component instances
1137
+ effect(() => {
1138
+ const currentContext = this.context();
1139
+ const currentHost = this.host();
1140
+ // Update all component references with new context and host
1141
+ this.componentRefs.forEach((componentRef) => {
1142
+ if (componentRef.instance) {
1143
+ Object.assign(componentRef.instance, {
1144
+ host: currentHost,
1145
+ context: currentContext,
1146
+ });
1147
+ }
1148
+ });
1149
+ });
1150
+ }
1151
+ async ngOnInit() {
1152
+ await this.loadComponents();
1153
+ // Update the signal after loading
1154
+ this._viewCount.set(this.viewContainerRef.length);
1155
+ }
1156
+ async loadComponents() {
1157
+ this.viewContainerRef.clear();
1158
+ // Clear previous component references
1159
+ this.componentRefs = [];
1160
+ this.placeholderRefs.clear();
1161
+ const configs = sortBy(this.registryService.get(this.name()), (c) => c.priority ?? 0);
1162
+ if (!configs) {
1163
+ console.error(`No component found for slot ${this.name()}`);
1164
+ return;
1165
+ }
1166
+ // Evaluate conditions and check features in parallel for performance
1167
+ const results = await Promise.all(configs.map(async (c) => {
1168
+ // Check condition if provided
1169
+ const conditionPassed = c.condition ? await this.evaluateCondition(c.condition) : true;
1170
+ // Check features if provided
1171
+ // const featuresPassed =
1172
+ // c.features && c.features.length > 0 ? this.sessionService.isFeatureEnabled(...c.features) : true;
1173
+ return {
1174
+ config: c,
1175
+ // visible: conditionPassed && featuresPassed,
1176
+ visible: conditionPassed,
1177
+ };
1178
+ }));
1179
+ // Filter visible components while preserving priority order
1180
+ const slots = results.filter((r) => r.visible).map((r) => r.config);
1181
+ // Create skeleton placeholders immediately in priority order
1182
+ slots.forEach((config, index) => {
1183
+ const placeholderRef = this.viewContainerRef.createComponent(AXPComponentSlotPlaceholderComponent);
1184
+ this.placeholderRefs.set(index, placeholderRef);
1185
+ });
1186
+ // Load all components in parallel and replace placeholders as they become ready
1187
+ const loadPromises = slots.map(async (config, index) => {
1188
+ let component;
1189
+ let options = {};
1190
+ // load component
1191
+ if (typeof config.loadComponent === 'function') {
1192
+ await runInInjectionContext(this.injector, async () => {
1193
+ component = await config.loadComponent?.();
1194
+ });
1195
+ }
1196
+ else if (config.component) {
1197
+ component = config.component;
1198
+ }
1199
+ // load options
1200
+ if (typeof config.options === 'function') {
1201
+ await runInInjectionContext(this.injector, async () => {
1202
+ const fun = config.options;
1203
+ options = await fun();
1204
+ });
1205
+ }
1206
+ else if (config.options) {
1207
+ options = await this.evaluator.evaluate(config.options, {});
1208
+ }
1209
+ // Replace placeholder with actual component as soon as it's ready
1210
+ if (!component) {
1211
+ console.warn(`Component failed to load for slot ${this.name()} at index ${index}`);
1212
+ // Remove placeholder if component failed to load
1213
+ const placeholderRef = this.placeholderRefs.get(index);
1214
+ if (placeholderRef) {
1215
+ placeholderRef.destroy();
1216
+ this.placeholderRefs.delete(index);
1217
+ }
1218
+ return;
1219
+ }
1220
+ // Get the placeholder reference at this index
1221
+ const placeholderRef = this.placeholderRefs.get(index);
1222
+ if (!placeholderRef) {
1223
+ console.warn(`Placeholder not found for index ${index}`);
1224
+ return;
1225
+ }
1226
+ // Get the index of the placeholder in the view container
1227
+ const placeholderIndex = this.viewContainerRef.indexOf(placeholderRef.hostView);
1228
+ // Remove the placeholder
1229
+ placeholderRef.destroy();
1230
+ this.placeholderRefs.delete(index);
1231
+ // Create the actual component at the same position
1232
+ const componentRef = this.viewContainerRef.createComponent(component, { index: placeholderIndex });
1233
+ // Store the component reference for future updates
1234
+ this.componentRefs.push(componentRef);
1235
+ Object.assign(componentRef.instance, {
1236
+ host: this.host(),
1237
+ context: this.context(),
1238
+ ...options,
1239
+ });
1240
+ });
1241
+ // Wait for all components to finish loading (they render as they become ready)
1242
+ await Promise.all(loadPromises);
1243
+ }
1244
+ async evaluateCondition(condition) {
1245
+ if (typeof condition === 'string') {
1246
+ const result = await this.evaluator.evaluate(condition, {});
1247
+ return result;
1248
+ }
1249
+ return condition(this.contextStore.data());
1250
+ //return condition(this.context());
1251
+ }
1252
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPComponentSlotDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1253
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: AXPComponentSlotDirective, isStandalone: false, selector: "axp-component-slot", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, host: { classPropertyName: "host", publicName: "host", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["slot"], ngImport: i0 }); }
1254
+ }
1255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPComponentSlotDirective, decorators: [{
1256
+ type: Directive,
1257
+ args: [{
1258
+ selector: 'axp-component-slot',
1259
+ standalone: false,
1260
+ exportAs: 'slot',
1261
+ }]
1262
+ }], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], host: [{ type: i0.Input, args: [{ isSignal: true, alias: "host", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }] } });
1263
+
1264
+ class AXPComponentSlotModule {
1265
+ static forRoot(configs) {
1266
+ return {
1267
+ ngModule: AXPComponentSlotModule,
1268
+ providers: [
1269
+ {
1270
+ provide: 'AXPComponentSlotModuleFactory',
1271
+ useFactory: (registry) => () => {
1272
+ if (configs) {
1273
+ for (const [key, value] of Object.entries(configs)) {
1274
+ value.forEach(v => {
1275
+ registry.register(key, v);
1276
+ });
1277
+ }
1278
+ }
1279
+ },
1280
+ deps: [AXPComponentSlotRegistryService],
1281
+ multi: true
1282
+ }
1283
+ ]
1284
+ };
1285
+ }
1286
+ static forChild(configs) {
1287
+ return {
1288
+ ngModule: AXPComponentSlotModule,
1289
+ providers: [
1290
+ {
1291
+ provide: 'AXPComponentSlotModuleFactory',
1292
+ useFactory: (registry) => () => {
1293
+ if (configs) {
1294
+ for (const [key, value] of Object.entries(configs)) {
1295
+ value.forEach(v => {
1296
+ registry.register(key, v);
1297
+ });
1298
+ }
1299
+ }
1300
+ },
1301
+ deps: [AXPComponentSlotRegistryService],
1302
+ multi: true
1303
+ }
1304
+ ]
1305
+ };
1306
+ }
1307
+ /**
1308
+ * @ignore
1309
+ */
1310
+ constructor(instances) {
1311
+ instances?.forEach(f => {
1312
+ f();
1313
+ });
1314
+ }
1315
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPComponentSlotModule, deps: [{ token: 'AXPComponentSlotModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
1316
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPComponentSlotModule, declarations: [AXPComponentSlotDirective], exports: [AXPComponentSlotDirective] }); }
1317
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPComponentSlotModule }); }
1318
+ }
1319
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPComponentSlotModule, decorators: [{
1320
+ type: NgModule,
1321
+ args: [{
1322
+ declarations: [AXPComponentSlotDirective],
1323
+ exports: [AXPComponentSlotDirective]
1324
+ }]
1325
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1326
+ type: Optional
1327
+ }, {
1328
+ type: Inject,
1329
+ args: ['AXPComponentSlotModuleFactory']
1330
+ }] }] });
1331
+
1332
+ //#region ---- AI metadata ----
1333
+ //#endregion
1334
+
1335
+ const AXP_CONTEXT_DEFINITION_PROVIDER = new InjectionToken('AXP_CONTEXT_DEFINITION_PROVIDER');
1336
+ //#endregion
1337
+
1338
+ //#region ---- Aggregator service ----
1339
+ /**
1340
+ * Collects {@link AXPContextDefinition} entries from all registered {@link AXPContextDefinitionProvider} instances.
1341
+ */
1342
+ class AXPContextDefinitionProviderService {
1343
+ constructor() {
1344
+ //#region ---- Services & Dependencies ----
1345
+ this.providers = inject(AXP_CONTEXT_DEFINITION_PROVIDER, { optional: true });
1346
+ }
1347
+ //#endregion
1348
+ //#region ---- Public API ----
1349
+ async items() {
1350
+ const items = [];
1351
+ if (!Array.isArray(this.providers)) {
1352
+ return items;
1353
+ }
1354
+ for (const raw of this.providers) {
1355
+ const provider = await Promise.resolve(raw);
1356
+ if (provider && typeof provider.items === 'function') {
1357
+ items.push(...(await provider.items()));
1358
+ }
1359
+ }
1360
+ return items;
1361
+ }
1362
+ async get(name) {
1363
+ return (await this.items()).find((d) => d.name === name);
1364
+ }
1365
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPContextDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1366
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPContextDefinitionProviderService, providedIn: 'root' }); }
1367
+ }
1368
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPContextDefinitionProviderService, decorators: [{
1369
+ type: Injectable,
1370
+ args: [{ providedIn: 'root' }]
1371
+ }] });
639
1372
 
640
1373
  class AXPDataGenerator {
641
1374
  static uuid() {
@@ -829,11 +1562,14 @@ class AXPDataSourceDefinitionProviderService {
829
1562
  }
830
1563
  async items() {
831
1564
  const items = [];
832
- // Load from DI tokens
1565
+ // Load from DI tokens; resolve lazy providers (provideLazyProvider uses useFactory that returns Promise<T>)
833
1566
  if (Array.isArray(this.providers)) {
834
- for (const provider of this.providers) {
835
- set(provider, '__parent__', this);
836
- items.push(...(await provider.items()));
1567
+ for (const raw of this.providers) {
1568
+ const provider = await Promise.resolve(raw);
1569
+ if (provider && typeof provider.items === 'function') {
1570
+ set(provider, '__parent__', this);
1571
+ items.push(...(await provider.items()));
1572
+ }
837
1573
  }
838
1574
  }
839
1575
  return items;
@@ -841,52 +1577,32 @@ class AXPDataSourceDefinitionProviderService {
841
1577
  async get(name) {
842
1578
  return (await this.items()).find((c) => c.name == name);
843
1579
  }
844
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDataSourceDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
845
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDataSourceDefinitionProviderService, providedIn: 'root' }); }
1580
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataSourceDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1581
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataSourceDefinitionProviderService, providedIn: 'root' }); }
846
1582
  }
847
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDataSourceDefinitionProviderService, decorators: [{
1583
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDataSourceDefinitionProviderService, decorators: [{
848
1584
  type: Injectable,
849
1585
  args: [{ providedIn: 'root' }]
850
1586
  }] });
851
1587
 
852
- class AXPElementDataDirective {
853
- constructor(elementRef) {
854
- this.elementRef = elementRef;
855
- this.data = input(null, ...(ngDevMode ? [{ debugName: "data", alias: 'axp-data' }] : [{ alias: 'axp-data' }]));
856
- this.path = input('__data__', ...(ngDevMode ? [{ debugName: "path", alias: 'axp-data-path' }] : [{ alias: 'axp-data-path' }]));
857
- // Effect to update element data when inputs change
858
- this.updateEffect = effect(() => {
859
- const currentData = this.data();
860
- const currentPath = this.path();
861
- set(this.elementRef.nativeElement, currentPath, currentData);
862
- }, ...(ngDevMode ? [{ debugName: "updateEffect" }] : []));
863
- }
864
- ngOnInit() {
865
- // Initial data setup
866
- set(this.elementRef.nativeElement, this.path(), this.data());
867
- }
868
- /**
869
- * Get data from the element
870
- */
871
- getData() {
872
- return get(this.elementRef.nativeElement, this.path());
873
- }
874
- /**
875
- * Update data at runtime
876
- */
877
- setData(data) {
878
- set(this.elementRef.nativeElement, this.path(), data);
1588
+ // src/app/directives/grid-layout.directive.ts
1589
+ class AXPContentCheckerDirective {
1590
+ constructor() {
1591
+ this.viewContainerRef = inject(ViewContainerRef);
1592
+ this.elementRef = inject((ElementRef));
1593
+ this.isEmpty = computed(() => this.viewContainerRef.length === 0, ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
879
1594
  }
880
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPElementDataDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
881
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.12", type: AXPElementDataDirective, isStandalone: true, selector: "[axp-data]", inputs: { data: { classPropertyName: "data", publicName: "axp-data", isSignal: true, isRequired: false, transformFunction: null }, path: { classPropertyName: "path", publicName: "axp-data-path", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1595
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPContentCheckerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1596
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: AXPContentCheckerDirective, isStandalone: true, selector: "[axp-content-checker]", exportAs: ["checker"], ngImport: i0 }); }
882
1597
  }
883
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPElementDataDirective, decorators: [{
1598
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPContentCheckerDirective, decorators: [{
884
1599
  type: Directive,
885
1600
  args: [{
886
- selector: '[axp-data]',
887
- standalone: true
1601
+ selector: '[axp-content-checker]',
1602
+ standalone: true,
1603
+ exportAs: 'checker'
888
1604
  }]
889
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "axp-data", required: false }] }], path: [{ type: i0.Input, args: [{ isSignal: true, alias: "axp-data-path", required: false }] }] } });
1605
+ }] });
890
1606
 
891
1607
  class AXPDblClickDirective {
892
1608
  constructor() {
@@ -909,10 +1625,10 @@ class AXPDblClickDirective {
909
1625
  }
910
1626
  this.lastTap = currentTime;
911
1627
  }
912
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDblClickDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
913
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: AXPDblClickDirective, isStandalone: true, selector: "[onDblClick]", outputs: { onDblClick: "onDblClick" }, host: { listeners: { "dblclick": "handleOnDblClick($event)", "touchend": "onTouchEnd($event)" } }, ngImport: i0 }); }
1628
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDblClickDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1629
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: AXPDblClickDirective, isStandalone: true, selector: "[onDblClick]", outputs: { onDblClick: "onDblClick" }, host: { listeners: { "dblclick": "handleOnDblClick($event)", "touchend": "onTouchEnd($event)" } }, ngImport: i0 }); }
914
1630
  }
915
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDblClickDirective, decorators: [{
1631
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDblClickDirective, decorators: [{
916
1632
  type: Directive,
917
1633
  args: [{
918
1634
  selector: '[onDblClick]'
@@ -927,12 +1643,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
927
1643
  args: ['touchend', ['$event']]
928
1644
  }] } });
929
1645
 
1646
+ class AXPElementDataDirective {
1647
+ constructor(elementRef) {
1648
+ this.elementRef = elementRef;
1649
+ this.data = input(null, { ...(ngDevMode ? { debugName: "data" } : /* istanbul ignore next */ {}), alias: 'axp-data' });
1650
+ this.path = input('__data__', { ...(ngDevMode ? { debugName: "path" } : /* istanbul ignore next */ {}), alias: 'axp-data-path' });
1651
+ // Effect to update element data when inputs change
1652
+ this.updateEffect = effect(() => {
1653
+ const currentData = this.data();
1654
+ const currentPath = this.path();
1655
+ set(this.elementRef.nativeElement, currentPath, currentData);
1656
+ }, ...(ngDevMode ? [{ debugName: "updateEffect" }] : /* istanbul ignore next */ []));
1657
+ }
1658
+ ngOnInit() {
1659
+ // Initial data setup
1660
+ set(this.elementRef.nativeElement, this.path(), this.data());
1661
+ }
1662
+ /**
1663
+ * Get data from the element
1664
+ */
1665
+ getData() {
1666
+ return get(this.elementRef.nativeElement, this.path());
1667
+ }
1668
+ /**
1669
+ * Update data at runtime
1670
+ */
1671
+ setData(data) {
1672
+ set(this.elementRef.nativeElement, this.path(), data);
1673
+ }
1674
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPElementDataDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1675
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: AXPElementDataDirective, isStandalone: true, selector: "[axp-data]", inputs: { data: { classPropertyName: "data", publicName: "axp-data", isSignal: true, isRequired: false, transformFunction: null }, path: { classPropertyName: "path", publicName: "axp-data-path", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1676
+ }
1677
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPElementDataDirective, decorators: [{
1678
+ type: Directive,
1679
+ args: [{
1680
+ selector: '[axp-data]',
1681
+ standalone: true
1682
+ }]
1683
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "axp-data", required: false }] }], path: [{ type: i0.Input, args: [{ isSignal: true, alias: "axp-data-path", required: false }] }] } });
1684
+
930
1685
  // src/app/directives/grid-layout.directive.ts
931
1686
  class AXPGridLayoutDirective {
932
1687
  constructor(el, renderer) {
933
1688
  this.el = el;
934
1689
  this.renderer = renderer;
935
- this.options = input.required(...(ngDevMode ? [{ debugName: "options", alias: 'axp-grid-layout' }] : [{ alias: 'axp-grid-layout' }]));
1690
+ this.options = input.required({ ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), alias: 'axp-grid-layout' });
936
1691
  }
937
1692
  ngOnChanges(changes) {
938
1693
  if (changes['options']) {
@@ -976,232 +1731,16 @@ class AXPGridLayoutDirective {
976
1731
  }
977
1732
  });
978
1733
  }
979
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGridLayoutDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
980
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.12", type: AXPGridLayoutDirective, isStandalone: true, selector: "[axp-grid-layout]", inputs: { options: { classPropertyName: "options", publicName: "axp-grid-layout", isSignal: true, isRequired: true, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
1734
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridLayoutDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1735
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: AXPGridLayoutDirective, isStandalone: true, selector: "[axp-grid-layout]", inputs: { options: { classPropertyName: "options", publicName: "axp-grid-layout", isSignal: true, isRequired: true, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
981
1736
  }
982
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGridLayoutDirective, decorators: [{
1737
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPGridLayoutDirective, decorators: [{
983
1738
  type: Directive,
984
1739
  args: [{
985
1740
  selector: '[axp-grid-layout]',
986
1741
  standalone: true,
987
1742
  }]
988
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "axp-grid-layout", required: true }] }] } });
989
-
990
- // src/app/directives/grid-layout.directive.ts
991
- class AXPContentCheckerDirective {
992
- constructor() {
993
- this.viewContainerRef = inject(ViewContainerRef);
994
- this.elementRef = inject((ElementRef));
995
- this.isEmpty = computed(() => this.viewContainerRef.length === 0, ...(ngDevMode ? [{ debugName: "isEmpty" }] : []));
996
- }
997
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPContentCheckerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
998
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: AXPContentCheckerDirective, isStandalone: true, selector: "[axp-content-checker]", exportAs: ["checker"], ngImport: i0 }); }
999
- }
1000
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPContentCheckerDirective, decorators: [{
1001
- type: Directive,
1002
- args: [{
1003
- selector: '[axp-content-checker]',
1004
- standalone: true,
1005
- exportAs: 'checker'
1006
- }]
1007
- }] });
1008
-
1009
- //#region ---- Imports ----
1010
- //#endregion
1011
- //#region ---- Directive ----
1012
- /**
1013
- * Fullscreen directive that provides CSS-based fullscreen functionality
1014
- * Usage: <element axFullscreen #fullscreen="axFullscreen"></element>
1015
- * Then: fullscreen.toggle() or fullscreen.enter() or fullscreen.exit()
1016
- */
1017
- class AXFullscreenDirective {
1018
- constructor(elementRef) {
1019
- this.elementRef = elementRef;
1020
- //#region ---- Properties ----
1021
- /**
1022
- * Current fullscreen state
1023
- */
1024
- this.isFullscreenState = signal(false, ...(ngDevMode ? [{ debugName: "isFullscreenState" }] : []));
1025
- /**
1026
- * Original element styles to restore
1027
- */
1028
- this.originalStyles = {};
1029
- /**
1030
- * Original parent element reference
1031
- */
1032
- this.originalParent = null;
1033
- /**
1034
- * Fullscreen container element
1035
- */
1036
- this.fullscreenContainer = null;
1037
- /**
1038
- * Fullscreen change event
1039
- */
1040
- this.fullscreenChange = output();
1041
- //#endregion
1042
- //#region ---- Constructor ----
1043
- this.destroyRef = inject(DestroyRef);
1044
- this.renderer = inject(Renderer2);
1045
- // Sync state changes to output
1046
- effect(() => {
1047
- const isFullscreen = this.isFullscreenState();
1048
- untracked(() => {
1049
- this.fullscreenChange.emit(isFullscreen);
1050
- });
1051
- });
1052
- }
1053
- //#endregion
1054
- //#region ---- Public API ----
1055
- /**
1056
- * Toggle fullscreen state
1057
- */
1058
- async toggle() {
1059
- if (this.isFullscreenState()) {
1060
- await this.exit();
1061
- }
1062
- else {
1063
- await this.enter();
1064
- }
1065
- }
1066
- /**
1067
- * Enter fullscreen mode using CSS
1068
- */
1069
- async enter() {
1070
- if (this.isFullscreenState()) {
1071
- return;
1072
- }
1073
- const element = this.elementRef.nativeElement;
1074
- try {
1075
- // Store original styles and parent
1076
- this.storeOriginalStyles(element);
1077
- this.originalParent = element.parentElement;
1078
- // Create fullscreen container
1079
- this.fullscreenContainer = this.renderer.createElement('div');
1080
- this.renderer.setStyle(this.fullscreenContainer, 'position', 'fixed');
1081
- this.renderer.setStyle(this.fullscreenContainer, 'top', '0');
1082
- this.renderer.setStyle(this.fullscreenContainer, 'left', '0');
1083
- this.renderer.setStyle(this.fullscreenContainer, 'width', '100vw');
1084
- this.renderer.setStyle(this.fullscreenContainer, 'height', '100vh');
1085
- this.renderer.setStyle(this.fullscreenContainer, 'z-index', '9999');
1086
- this.renderer.setStyle(this.fullscreenContainer, 'background-color', '#ffffff');
1087
- this.renderer.setStyle(this.fullscreenContainer, 'overflow', 'auto');
1088
- // Move element to container
1089
- this.renderer.appendChild(this.fullscreenContainer, element);
1090
- // Apply fullscreen styles to element
1091
- this.renderer.setStyle(element, 'position', 'relative');
1092
- this.renderer.setStyle(element, 'width', '100%');
1093
- this.renderer.setStyle(element, 'height', '100%');
1094
- this.renderer.setStyle(element, 'margin', '0');
1095
- this.renderer.setStyle(element, 'padding', '0');
1096
- // Append container to body
1097
- this.renderer.appendChild(document.body, this.fullscreenContainer);
1098
- // Prevent body scroll
1099
- this.renderer.setStyle(document.body, 'overflow', 'hidden');
1100
- this.isFullscreenState.set(true);
1101
- }
1102
- catch (error) {
1103
- console.error('Error entering fullscreen:', error);
1104
- this.restoreOriginalStyles(element);
1105
- }
1106
- }
1107
- /**
1108
- * Exit fullscreen mode
1109
- */
1110
- async exit() {
1111
- if (!this.isFullscreenState()) {
1112
- return;
1113
- }
1114
- const element = this.elementRef.nativeElement;
1115
- try {
1116
- // Restore body scroll
1117
- this.renderer.removeStyle(document.body, 'overflow');
1118
- // Move element back to original parent
1119
- if (this.fullscreenContainer && this.originalParent) {
1120
- this.renderer.removeChild(this.fullscreenContainer, element);
1121
- this.renderer.appendChild(this.originalParent, element);
1122
- // Remove container
1123
- this.renderer.removeChild(document.body, this.fullscreenContainer);
1124
- this.fullscreenContainer = null;
1125
- }
1126
- // Restore original styles
1127
- this.restoreOriginalStyles(element);
1128
- this.isFullscreenState.set(false);
1129
- }
1130
- catch (error) {
1131
- console.error('Error exiting fullscreen:', error);
1132
- }
1133
- }
1134
- /**
1135
- * Check if currently in fullscreen mode
1136
- */
1137
- isFullscreen() {
1138
- return this.isFullscreenState();
1139
- }
1140
- //#endregion
1141
- //#region ---- Private Methods ----
1142
- /**
1143
- * Store original element styles
1144
- */
1145
- storeOriginalStyles(element) {
1146
- const computedStyle = window.getComputedStyle(element);
1147
- this.originalStyles = {
1148
- position: computedStyle.position,
1149
- top: computedStyle.top,
1150
- left: computedStyle.left,
1151
- width: computedStyle.width,
1152
- height: computedStyle.height,
1153
- zIndex: computedStyle.zIndex,
1154
- backgroundColor: computedStyle.backgroundColor,
1155
- margin: computedStyle.margin,
1156
- padding: computedStyle.padding,
1157
- };
1158
- }
1159
- /**
1160
- * Restore original element styles
1161
- */
1162
- restoreOriginalStyles(element) {
1163
- if (!this.originalStyles) {
1164
- return;
1165
- }
1166
- // Restore each style property
1167
- Object.entries(this.originalStyles).forEach(([key, value]) => {
1168
- const styleKey = this.camelToKebabCase(key);
1169
- if (value) {
1170
- this.renderer.setStyle(element, styleKey, value);
1171
- }
1172
- else {
1173
- this.renderer.removeStyle(element, styleKey);
1174
- }
1175
- });
1176
- this.originalStyles = {};
1177
- }
1178
- /**
1179
- * Convert camelCase to kebab-case for CSS properties
1180
- */
1181
- camelToKebabCase(str) {
1182
- return str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();
1183
- }
1184
- //#endregion
1185
- //#region ---- Lifecycle ----
1186
- ngOnDestroy() {
1187
- // Exit fullscreen if still active
1188
- if (this.isFullscreenState()) {
1189
- this.exit().catch(() => {
1190
- // Ignore errors during cleanup
1191
- });
1192
- }
1193
- }
1194
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXFullscreenDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1195
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: AXFullscreenDirective, isStandalone: true, selector: "[axFullscreen]", outputs: { fullscreenChange: "fullscreenChange" }, exportAs: ["axFullscreen"], ngImport: i0 }); }
1196
- }
1197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXFullscreenDirective, decorators: [{
1198
- type: Directive,
1199
- args: [{
1200
- selector: '[axFullscreen]',
1201
- standalone: true,
1202
- exportAs: 'axFullscreen',
1203
- }]
1204
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { fullscreenChange: [{ type: i0.Output, args: ["fullscreenChange"] }] } });
1743
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "axp-grid-layout", required: true }] }] } });
1205
1744
 
1206
1745
  const AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER = new InjectionToken('AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER');
1207
1746
 
@@ -1339,10 +1878,10 @@ class AXPDistributedEventListenerService {
1339
1878
  this.listenersByKey.clear();
1340
1879
  this.providersLoaded = false;
1341
1880
  }
1342
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDistributedEventListenerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1343
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDistributedEventListenerService, providedIn: 'root' }); }
1881
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDistributedEventListenerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1882
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDistributedEventListenerService, providedIn: 'root' }); }
1344
1883
  }
1345
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDistributedEventListenerService, decorators: [{
1884
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDistributedEventListenerService, decorators: [{
1346
1885
  type: Injectable,
1347
1886
  args: [{
1348
1887
  providedIn: 'root',
@@ -1466,168 +2005,16 @@ class AXPBroadcastEventService {
1466
2005
  // Cleanup multi-tab event history
1467
2006
  this.multiTabEventHistory.clear();
1468
2007
  }
1469
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBroadcastEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1470
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBroadcastEventService, providedIn: 'root' }); }
2008
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBroadcastEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2009
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBroadcastEventService, providedIn: 'root' }); }
1471
2010
  }
1472
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPBroadcastEventService, decorators: [{
2011
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBroadcastEventService, decorators: [{
1473
2012
  type: Injectable,
1474
2013
  args: [{
1475
2014
  providedIn: 'root',
1476
2015
  }]
1477
2016
  }], ctorParameters: () => [] });
1478
2017
 
1479
- class AXPExpressionEvaluatorScopeProviderContext {
1480
- constructor() {
1481
- this.scopes = {};
1482
- }
1483
- addScope(namespace, functions) {
1484
- this.scopes[namespace] = { ...this.scopes[namespace], ...functions };
1485
- }
1486
- getScopes() {
1487
- return this.scopes;
1488
- }
1489
- }
1490
- const AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER = new InjectionToken('AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER');
1491
- class AXPExpressionEvaluatorScopeProviderService {
1492
- constructor() {
1493
- this.providers = inject(AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, { optional: true });
1494
- this.cache = null;
1495
- }
1496
- async load() {
1497
- if (this.cache)
1498
- return;
1499
- const context = new AXPExpressionEvaluatorScopeProviderContext();
1500
- if (Array.isArray(this.providers)) {
1501
- for (const provider of this.providers) {
1502
- await provider.provide(context);
1503
- }
1504
- }
1505
- this.cache = context.getScopes();
1506
- }
1507
- async getScopesAsync() {
1508
- await this.load();
1509
- return this.cache || {};
1510
- }
1511
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPExpressionEvaluatorScopeProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1512
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPExpressionEvaluatorScopeProviderService, providedIn: 'root' }); }
1513
- }
1514
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPExpressionEvaluatorScopeProviderService, decorators: [{
1515
- type: Injectable,
1516
- args: [{ providedIn: 'root' }]
1517
- }] });
1518
-
1519
- class AXPExpressionEvaluatorService {
1520
- constructor() {
1521
- // Memoization cache for compiled expressions
1522
- this.expressionCache = new Map();
1523
- this.providerService = inject(AXPExpressionEvaluatorScopeProviderService);
1524
- }
1525
- getOrCompileFunction(expression) {
1526
- if (!this.expressionCache.has(expression)) {
1527
- // Check if expression contains multiple statements (has semicolons or newlines)
1528
- const hasMultipleStatements = expression.includes(';') || expression.includes('\n');
1529
- let fn;
1530
- if (hasMultipleStatements) {
1531
- // For multiple statements, execute them in sequence and return the last expression
1532
- fn = new Function('scope', `with (scope) { return (async function() { ${expression} })(); }`);
1533
- }
1534
- else {
1535
- // For single expressions, use return
1536
- fn = new Function('scope', `with (scope) { return (async function() { return ${expression}; })(); }`);
1537
- }
1538
- this.expressionCache.set(expression, fn);
1539
- }
1540
- return this.expressionCache.get(expression);
1541
- }
1542
- async getMergedScope(userScope) {
1543
- const pluginScopes = await this.providerService.getScopesAsync();
1544
- // Merge pluginScopes and userScope (userScope takes precedence)
1545
- return { ...pluginScopes, ...userScope };
1546
- }
1547
- async evaluate(source, scope = {}) {
1548
- try {
1549
- const mergedScope = await this.getMergedScope(scope);
1550
- if (typeof source === 'string' && source.includes('{{')) {
1551
- return await this.evaluateStringExpression(source, mergedScope);
1552
- }
1553
- else if (Array.isArray(source)) {
1554
- const evaluatedArray = [];
1555
- for (const item of source) {
1556
- evaluatedArray.push(await this.evaluate(item, mergedScope));
1557
- }
1558
- return evaluatedArray;
1559
- }
1560
- else if (typeof source === 'object' && source !== null) {
1561
- const evaluatedObject = {};
1562
- for (const key in source) {
1563
- if (source.hasOwnProperty(key)) {
1564
- evaluatedObject[key] = await this.evaluate(source[key], mergedScope);
1565
- }
1566
- }
1567
- return evaluatedObject;
1568
- }
1569
- else {
1570
- return source;
1571
- }
1572
- }
1573
- catch (error) {
1574
- console.error('Expression evaluator - Error evaluating expression:', source, error);
1575
- return false;
1576
- }
1577
- }
1578
- async evaluateStringExpression(templateExpression, scope) {
1579
- // Check if the input is exactly a single {{ ... }} expression (handle multiline)
1580
- const exactMatch = templateExpression.match(/^\s*\{\{\s*([\s\S]*?)\s*\}\}\s*$/);
1581
- if (exactMatch) {
1582
- const expression = exactMatch[1];
1583
- const sandbox = this.getOrCompileFunction(expression);
1584
- const result = await sandbox(scope);
1585
- return result;
1586
- }
1587
- // Otherwise, interpolate all {{ ... }} expressions in the string
1588
- const regex = /\{\{\s*([\s\S]*?)\s*\}\}/g;
1589
- // Collect all matches and their positions
1590
- const matches = [];
1591
- let match;
1592
- while ((match = regex.exec(templateExpression)) !== null) {
1593
- matches.push({
1594
- expression: match[1],
1595
- start: match.index,
1596
- end: regex.lastIndex,
1597
- raw: match[0],
1598
- });
1599
- }
1600
- // Evaluate all expressions in parallel
1601
- const values = await Promise.all(matches.map((m) => {
1602
- const sandbox = this.getOrCompileFunction(m.expression);
1603
- return sandbox(scope);
1604
- }));
1605
- // Reconstruct the string with evaluated values
1606
- let result = '';
1607
- let lastIndex = 0;
1608
- matches.forEach((m, i) => {
1609
- result += templateExpression.slice(lastIndex, m.start);
1610
- const value = values[i];
1611
- result += value !== undefined && value !== null ? value : '';
1612
- lastIndex = m.end;
1613
- });
1614
- result += templateExpression.slice(lastIndex);
1615
- return result;
1616
- }
1617
- isExpression(expression) {
1618
- if (typeof expression === 'string') {
1619
- return expression.includes('{{');
1620
- }
1621
- return false;
1622
- }
1623
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPExpressionEvaluatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1624
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPExpressionEvaluatorService, providedIn: 'root' }); }
1625
- }
1626
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPExpressionEvaluatorService, decorators: [{
1627
- type: Injectable,
1628
- args: [{ providedIn: 'root' }]
1629
- }] });
1630
-
1631
2018
  class AXPHookService {
1632
2019
  constructor() {
1633
2020
  this.listenerProviders = inject(AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, { optional: true }) || [];
@@ -1674,10 +2061,10 @@ class AXPHookService {
1674
2061
  }
1675
2062
  return data;
1676
2063
  }
1677
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPHookService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1678
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPHookService, providedIn: 'root' }); }
2064
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHookService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2065
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHookService, providedIn: 'root' }); }
1679
2066
  }
1680
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPHookService, decorators: [{
2067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHookService, decorators: [{
1681
2068
  type: Injectable,
1682
2069
  args: [{ providedIn: 'root' }]
1683
2070
  }] });
@@ -1957,16 +2344,88 @@ class AXPModuleManifestRegistry {
1957
2344
  }
1958
2345
  return { missingModules, missingFeatures };
1959
2346
  }
1960
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPModuleManifestRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1961
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPModuleManifestRegistry, providedIn: 'root' }); }
2347
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPModuleManifestRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2348
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPModuleManifestRegistry, providedIn: 'root' }); }
1962
2349
  }
1963
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPModuleManifestRegistry, decorators: [{
2350
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPModuleManifestRegistry, decorators: [{
1964
2351
  type: Injectable,
1965
2352
  args: [{ providedIn: 'root' }]
1966
2353
  }] });
1967
2354
 
2355
+ //#region ---- Imports ----
2356
+ //#endregion
2357
+ //#region ---- Module manifests data source ----
2358
+ /**
2359
+ * Registered module manifests for select widgets via dataSource name {@link MODULE_MANIFESTS_DATASOURCE_NAME}.
2360
+ */
2361
+ const MODULE_MANIFESTS_DATASOURCE_NAME = 'platform-module-manifests';
2362
+ /**
2363
+ * Data source definition for module names/titles from {@link AXPModuleManifestRegistry}.
2364
+ */
2365
+ class AXPModuleManifestsDataSourceDefinition {
2366
+ constructor() {
2367
+ //#region ---- Services & Dependencies ----
2368
+ this.manifestRegistry = inject(AXPModuleManifestRegistry);
2369
+ //#endregion
2370
+ }
2371
+ //#endregion
2372
+ //#region ---- Public API ----
2373
+ async items() {
2374
+ return [
2375
+ {
2376
+ name: MODULE_MANIFESTS_DATASOURCE_NAME,
2377
+ title: 'Module manifests',
2378
+ source: () => new AXDataSource({
2379
+ key: 'id',
2380
+ load: async () => {
2381
+ await this.manifestRegistry.initialize();
2382
+ const list = this.manifestRegistry.getAll().map((m) => ({
2383
+ id: m.name,
2384
+ title: m.title || m.name,
2385
+ }));
2386
+ return { items: list, total: list.length };
2387
+ },
2388
+ byKey: async (key) => {
2389
+ await this.manifestRegistry.initialize();
2390
+ const m = this.manifestRegistry.getAll().find((x) => x.name === key);
2391
+ return m ? { id: m.name, title: m.title || m.name } : undefined;
2392
+ },
2393
+ pageSize: 1000,
2394
+ }),
2395
+ columns: [
2396
+ {
2397
+ name: 'id',
2398
+ title: 'ID',
2399
+ datatype: 'string',
2400
+ type: 'text-editor',
2401
+ },
2402
+ {
2403
+ name: 'title',
2404
+ title: 'Title',
2405
+ datatype: 'string',
2406
+ type: 'text-editor',
2407
+ },
2408
+ ],
2409
+ filters: [
2410
+ {
2411
+ field: 'title',
2412
+ title: 'Title',
2413
+ operator: { type: 'equal' },
2414
+ widget: { type: 'text-editor' },
2415
+ filterType: { advance: true, inline: true },
2416
+ },
2417
+ ],
2418
+ textField: { name: 'title', title: 'Title' },
2419
+ valueField: { name: 'id', title: 'ID' },
2420
+ },
2421
+ ];
2422
+ }
2423
+ }
2424
+ //#endregion
2425
+
1968
2426
  class AXPAppStartUpService {
1969
2427
  constructor() {
2428
+ this.translationService = inject(AXTranslationService);
1970
2429
  this.tasks = [];
1971
2430
  }
1972
2431
  registerTask(task) {
@@ -1974,20 +2433,21 @@ class AXPAppStartUpService {
1974
2433
  }
1975
2434
  async runAllTasks() {
1976
2435
  for (const task of this.tasks.sort((a, b) => a.priority - b.priority)) {
1977
- this.updateStatus(task.statusText);
2436
+ await this.updateStatus(task.statusText);
1978
2437
  await task.run();
1979
2438
  }
1980
2439
  }
1981
- updateStatus(status) {
2440
+ async updateStatus(status) {
1982
2441
  const loadingText = document.querySelector('#loadingText');
1983
2442
  if (loadingText) {
1984
- loadingText.innerHTML = status;
2443
+ const translatedStatus = this.translationService.resolve(status);
2444
+ loadingText.innerHTML = await this.translationService.translateAsync(translatedStatus);
1985
2445
  }
1986
2446
  }
1987
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPAppStartUpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1988
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPAppStartUpService, providedIn: 'root' }); }
2447
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAppStartUpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2448
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAppStartUpService, providedIn: 'root' }); }
1989
2449
  }
1990
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPAppStartUpService, decorators: [{
2450
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPAppStartUpService, decorators: [{
1991
2451
  type: Injectable,
1992
2452
  args: [{
1993
2453
  providedIn: 'root',
@@ -2018,24 +2478,57 @@ class AXPModuleManifestModule {
2018
2478
  // Register manifest initialization task
2019
2479
  appInitService.registerTask({
2020
2480
  name: 'ModuleManifests',
2021
- statusText: 'Loading module manifests...',
2481
+ statusText: '@general:app-startup.loading-module-manifests',
2022
2482
  priority: 1, // Load early, before features/permissions
2023
2483
  run: async () => {
2024
2484
  await manifestRegistry.initialize();
2025
2485
  },
2026
2486
  });
2027
2487
  }
2028
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPModuleManifestModule, deps: [{ token: AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
2029
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPModuleManifestModule }); }
2030
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPModuleManifestModule }); }
2488
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPModuleManifestModule, deps: [{ token: AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
2489
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPModuleManifestModule }); }
2490
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPModuleManifestModule }); }
2031
2491
  }
2032
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPModuleManifestModule, decorators: [{
2492
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPModuleManifestModule, decorators: [{
2033
2493
  type: NgModule,
2034
2494
  args: [{
2035
2495
  providers: [],
2036
2496
  }]
2037
2497
  }], ctorParameters: () => [{ type: AXPAppStartUpService }, { type: i0.Injector }] });
2038
2498
 
2499
+ //#region ---- Imports ----
2500
+ //#endregion
2501
+ //#region ---- Compare & sort ----
2502
+ const DEFAULT_COLLATOR_OPTIONS = { sensitivity: 'base' };
2503
+ /**
2504
+ * Locale-aware comparison of {@link AXPMultiLanguageString} values (plain string, `@scope:key`, or locale map).
2505
+ * Resolves each side with {@link resolveMultiLanguageString} for `locale`, then compares with `String#localeCompare`.
2506
+ */
2507
+ function compareMultiLanguageStrings(a, b, locale, collatorOptions = DEFAULT_COLLATOR_OPTIONS) {
2508
+ const sa = resolveMultiLanguageString(a ?? '', locale);
2509
+ const sb = resolveMultiLanguageString(b ?? '', locale);
2510
+ return sa.localeCompare(sb, locale, collatorOptions);
2511
+ }
2512
+ /**
2513
+ * Stable sort copy: orders items by resolved string for `getValue(item)` using the active `locale`.
2514
+ */
2515
+ function sortByMultiLanguageString(items, getValue, locale, collatorOptions) {
2516
+ return [...items].sort((x, y) => compareMultiLanguageStrings(getValue(x), getValue(y), locale, collatorOptions));
2517
+ }
2518
+ /**
2519
+ * True when the resolved value contains `query` (case-insensitive) for `locale`.
2520
+ * Useful for search/filter flows over {@link AXPMultiLanguageString}.
2521
+ */
2522
+ function searchInMultiLanguageString(value, query, locale) {
2523
+ const q = query.trim().toLocaleLowerCase(locale);
2524
+ if (!q) {
2525
+ return true;
2526
+ }
2527
+ const text = resolveMultiLanguageString(value ?? '', locale).toLocaleLowerCase(locale);
2528
+ return text.includes(q);
2529
+ }
2530
+ //#endregion
2531
+
2039
2532
  //#region ---- Tag Types ----
2040
2533
  //#endregion
2041
2534
 
@@ -2187,10 +2680,10 @@ class AXPTagService {
2187
2680
  const uniqueTags = allTags.filter((tag, index, self) => index === self.findIndex((t) => t.title.toLowerCase() === tag.title.toLowerCase()));
2188
2681
  this.cache = uniqueTags;
2189
2682
  }
2190
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTagService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2191
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTagService, providedIn: 'root' }); }
2683
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTagService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2684
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTagService, providedIn: 'root' }); }
2192
2685
  }
2193
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTagService, decorators: [{
2686
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTagService, decorators: [{
2194
2687
  type: Injectable,
2195
2688
  args: [{
2196
2689
  providedIn: 'root',
@@ -3121,14 +3614,25 @@ function getNestedKeys(obj, prefix = '') {
3121
3614
  }
3122
3615
  return keys;
3123
3616
  }
3617
+ /** Normalizes definition categories to an array for iteration and serialization. */
3618
+ function normalizeDefinitionCategories(categories) {
3619
+ if (categories == null) {
3620
+ return [];
3621
+ }
3622
+ return Array.isArray(categories) ? categories : [categories];
3623
+ }
3624
+
3625
+ //#region ---- Imports ----
3626
+ //#endregion
3124
3627
 
3125
3628
  function applySystemActionDefault(action, type) {
3126
3629
  const systemAction = getSystemActions(type);
3127
3630
  return {
3128
- name: systemAction.key,
3129
- title: systemAction.title,
3130
- icon: systemAction.icon,
3131
- color: systemAction.color,
3631
+ ...action,
3632
+ name: action.name ?? systemAction.key,
3633
+ title: action.title ?? systemAction.title,
3634
+ icon: action.icon ?? systemAction.icon,
3635
+ color: action.color ?? systemAction.color,
3132
3636
  };
3133
3637
  }
3134
3638
 
@@ -3153,8 +3657,6 @@ class AXPIconLogoConfig {
3153
3657
 
3154
3658
  var AXPPlatformScope;
3155
3659
  (function (AXPPlatformScope) {
3156
- AXPPlatformScope["Environment"] = "C";
3157
- AXPPlatformScope["Global"] = "G";
3158
3660
  AXPPlatformScope["Platform"] = "P";
3159
3661
  AXPPlatformScope["Tenant"] = "T";
3160
3662
  AXPPlatformScope["User"] = "U";
@@ -3162,8 +3664,6 @@ var AXPPlatformScope;
3162
3664
  ;
3163
3665
  function resolvePlatformScopeKey(name) {
3164
3666
  const scopeMap = {
3165
- environment: AXPPlatformScope.Environment,
3166
- global: AXPPlatformScope.Global,
3167
3667
  platform: AXPPlatformScope.Platform,
3168
3668
  tenant: AXPPlatformScope.Tenant,
3169
3669
  user: AXPPlatformScope.User,
@@ -3172,8 +3672,6 @@ function resolvePlatformScopeKey(name) {
3172
3672
  }
3173
3673
  function resolvePlatformScopeName(scope) {
3174
3674
  const scopeMap = {
3175
- C: 'environment',
3176
- G: 'global',
3177
3675
  P: 'platform',
3178
3676
  T: 'tenant',
3179
3677
  U: 'user',
@@ -3193,7 +3691,7 @@ var AXPExportTemplateToken;
3193
3691
  class AXPCountdownPipe {
3194
3692
  constructor() {
3195
3693
  this.calendarService = inject(AXCalendarService);
3196
- this.countdownSignal = signal(this.setupTimer(), ...(ngDevMode ? [{ debugName: "countdownSignal" }] : []));
3694
+ this.countdownSignal = signal(this.setupTimer(), ...(ngDevMode ? [{ debugName: "countdownSignal" }] : /* istanbul ignore next */ []));
3197
3695
  this.targetDate = 0;
3198
3696
  this.prevValue = 0;
3199
3697
  }
@@ -3222,10 +3720,10 @@ class AXPCountdownPipe {
3222
3720
  updateTargetDate(value) {
3223
3721
  this.targetDate = new Date(value).getTime();
3224
3722
  }
3225
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPCountdownPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
3226
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPCountdownPipe, isStandalone: true, name: "countdown", pure: false }); }
3723
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCountdownPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
3724
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPCountdownPipe, isStandalone: true, name: "countdown", pure: false }); }
3227
3725
  }
3228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPCountdownPipe, decorators: [{
3726
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCountdownPipe, decorators: [{
3229
3727
  type: Pipe,
3230
3728
  args: [{
3231
3729
  name: 'countdown',
@@ -3235,6 +3733,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
3235
3733
  }] });
3236
3734
 
3237
3735
  const loggingEnabled = false; // Set to true to enable logging, false to disable
3736
+ //#region ---- Multilingual string helpers ----
3737
+ /**
3738
+ * Per-locale string map as produced by multilingual editors (e.g. `{ "en-US": "...", "fa-IR": "..." }`).
3739
+ */
3740
+ function isLocaleStringMap(value) {
3741
+ if (value === null || typeof value !== 'object' || Array.isArray(value) || value instanceof Date) {
3742
+ return false;
3743
+ }
3744
+ const values = Object.values(value);
3745
+ return values.length > 0 && values.every((v) => typeof v === 'string');
3746
+ }
3747
+ /**
3748
+ * Lowercased text for client-side filtering: plain string or all locale values joined.
3749
+ */
3750
+ function toFilterSearchText(value) {
3751
+ if (typeof value === 'string') {
3752
+ return value.toLowerCase();
3753
+ }
3754
+ if (isLocaleStringMap(value)) {
3755
+ return Object.values(value).join(' ').toLowerCase();
3756
+ }
3757
+ return undefined;
3758
+ }
3759
+ function filterValuesAreEqual(itemRaw, condRaw) {
3760
+ if (typeof condRaw === 'string' && isLocaleStringMap(itemRaw)) {
3761
+ return Object.values(itemRaw).some((v) => v.toLowerCase() === condRaw.toLowerCase());
3762
+ }
3763
+ if (typeof itemRaw === 'string' && isLocaleStringMap(condRaw)) {
3764
+ return Object.values(condRaw).some((v) => v.toLowerCase() === itemRaw.toLowerCase());
3765
+ }
3766
+ const itemScalar = typeof itemRaw === 'string' ? itemRaw.toLowerCase() : itemRaw;
3767
+ const condScalar = typeof condRaw === 'string' ? condRaw.toLowerCase() : condRaw;
3768
+ return isEqual(itemScalar, condScalar);
3769
+ }
3770
+ //#endregion
3238
3771
  function applyCondition(item, condition) {
3239
3772
  const rawValue = condition.field ? get(item, condition.field) : null;
3240
3773
  const itemValue = typeof rawValue === 'string' ? rawValue.toLowerCase() : rawValue;
@@ -3255,7 +3788,12 @@ function applyCondition(item, condition) {
3255
3788
  switch (op) {
3256
3789
  case 'equal':
3257
3790
  case 'eq':
3258
- result = isEqual(valueToCompare, conditionValue);
3791
+ if (!isNil(condition.field) && condition.field !== '') {
3792
+ result = filterValuesAreEqual(rawValue, condition.value);
3793
+ }
3794
+ else {
3795
+ result = isEqual(valueToCompare, conditionValue);
3796
+ }
3259
3797
  if (loggingEnabled) {
3260
3798
  console.log('Equal check result:', result);
3261
3799
  }
@@ -3263,7 +3801,12 @@ function applyCondition(item, condition) {
3263
3801
  case 'notEqual':
3264
3802
  case 'ne':
3265
3803
  case 'neq':
3266
- result = !isEqual(valueToCompare, conditionValue);
3804
+ if (!isNil(condition.field) && condition.field !== '') {
3805
+ result = !filterValuesAreEqual(rawValue, condition.value);
3806
+ }
3807
+ else {
3808
+ result = !isEqual(valueToCompare, conditionValue);
3809
+ }
3267
3810
  if (loggingEnabled) {
3268
3811
  console.log('Not equal check result:', result);
3269
3812
  }
@@ -3296,12 +3839,15 @@ function applyCondition(item, condition) {
3296
3839
  console.log('Less than or equal check result:', result);
3297
3840
  }
3298
3841
  break;
3299
- case 'contains':
3300
- if (typeof valueToCompare === 'string') {
3301
- result = includes(valueToCompare, conditionValue);
3842
+ case 'contains': {
3843
+ const needle = toFilterSearchText(condition.value) ??
3844
+ (condition.value == null ? '' : String(condition.value).toLowerCase());
3845
+ const haystack = toFilterSearchText(rawValue);
3846
+ if (haystack !== undefined) {
3847
+ result = includes(haystack, needle);
3302
3848
  }
3303
- else if (Array.isArray(valueToCompare)) {
3304
- result = includes(valueToCompare.map((val) => val.toString().toLowerCase()), conditionValue);
3849
+ else if (Array.isArray(rawValue)) {
3850
+ result = includes(rawValue.map((val) => toFilterSearchText(val) ?? val.toString().toLowerCase()), needle);
3305
3851
  }
3306
3852
  else {
3307
3853
  result = false;
@@ -3310,13 +3856,18 @@ function applyCondition(item, condition) {
3310
3856
  console.log('Contains check result:', result);
3311
3857
  }
3312
3858
  break;
3859
+ }
3313
3860
  case 'in':
3314
3861
  if (Array.isArray(conditionValue)) {
3315
3862
  if (typeof valueToCompare === 'string') {
3316
- result = conditionValue.some(val => typeof val === 'string' ? val.toLowerCase() === valueToCompare : val === valueToCompare);
3863
+ result = conditionValue.some((val) => typeof val === 'string' ? val.toLowerCase() === valueToCompare : val === valueToCompare);
3864
+ }
3865
+ else if (isLocaleStringMap(rawValue)) {
3866
+ const localeValues = Object.values(rawValue).map((v) => v.toLowerCase());
3867
+ result = localeValues.some((localeVal) => conditionValue.some((val) => typeof val === 'string' ? val.toLowerCase() === localeVal : val === localeVal));
3317
3868
  }
3318
3869
  else if (Array.isArray(valueToCompare)) {
3319
- result = valueToCompare.some(val => conditionValue.some(condVal => typeof val === 'string' && typeof condVal === 'string'
3870
+ result = valueToCompare.some((val) => conditionValue.some((condVal) => typeof val === 'string' && typeof condVal === 'string'
3320
3871
  ? val.toLowerCase() === condVal.toLowerCase()
3321
3872
  : val === condVal));
3322
3873
  }
@@ -3331,12 +3882,15 @@ function applyCondition(item, condition) {
3331
3882
  console.log('In check result:', result);
3332
3883
  }
3333
3884
  break;
3334
- case 'notContains':
3335
- if (typeof valueToCompare === 'string') {
3336
- result = !includes(valueToCompare, conditionValue);
3885
+ case 'notContains': {
3886
+ const needleNc = toFilterSearchText(condition.value) ??
3887
+ (condition.value == null ? '' : String(condition.value).toLowerCase());
3888
+ const haystackNc = toFilterSearchText(rawValue);
3889
+ if (haystackNc !== undefined) {
3890
+ result = !includes(haystackNc, needleNc);
3337
3891
  }
3338
- else if (Array.isArray(valueToCompare)) {
3339
- result = !includes(valueToCompare.map((val) => val.toString().toLowerCase()), conditionValue);
3892
+ else if (Array.isArray(rawValue)) {
3893
+ result = !includes(rawValue.map((val) => toFilterSearchText(val) ?? val.toString().toLowerCase()), needleNc);
3340
3894
  }
3341
3895
  else {
3342
3896
  result = false;
@@ -3345,18 +3899,27 @@ function applyCondition(item, condition) {
3345
3899
  console.log('Not contains check result:', result);
3346
3900
  }
3347
3901
  break;
3348
- case 'startsWith':
3349
- result = typeof valueToCompare === 'string' && startsWith(valueToCompare, conditionValue);
3902
+ }
3903
+ case 'startsWith': {
3904
+ const prefix = toFilterSearchText(condition.value) ??
3905
+ (condition.value == null ? '' : String(condition.value).toLowerCase());
3906
+ const haystackSw = toFilterSearchText(rawValue);
3907
+ result = haystackSw !== undefined && startsWith(haystackSw, prefix);
3350
3908
  if (loggingEnabled) {
3351
3909
  console.log('Starts with check result:', result);
3352
3910
  }
3353
3911
  break;
3354
- case 'endsWith':
3355
- result = typeof valueToCompare === 'string' && endsWith(valueToCompare, conditionValue);
3912
+ }
3913
+ case 'endsWith': {
3914
+ const suffix = toFilterSearchText(condition.value) ??
3915
+ (condition.value == null ? '' : String(condition.value).toLowerCase());
3916
+ const haystackEw = toFilterSearchText(rawValue);
3917
+ result = haystackEw !== undefined && endsWith(haystackEw, suffix);
3356
3918
  if (loggingEnabled) {
3357
3919
  console.log('Ends with check result:', result);
3358
3920
  }
3359
3921
  break;
3922
+ }
3360
3923
  case 'isEmpty':
3361
3924
  result = isEmpty(valueToCompare);
3362
3925
  if (loggingEnabled) {
@@ -3508,45 +4071,45 @@ class AXPDeviceService {
3508
4071
  /**
3509
4072
  * Current screen size (Small, Medium, Large)
3510
4073
  */
3511
- this.screenSize = signal(getScreenSize(), ...(ngDevMode ? [{ debugName: "screenSize" }] : []));
4074
+ this.screenSize = signal(getScreenSize(), ...(ngDevMode ? [{ debugName: "screenSize" }] : /* istanbul ignore next */ []));
3512
4075
  /**
3513
4076
  * Current device type (Mobile, Tablet, Desktop)
3514
4077
  */
3515
- this.deviceType = signal(getDeviceType(), ...(ngDevMode ? [{ debugName: "deviceType" }] : []));
4078
+ this.deviceType = signal(getDeviceType(), ...(ngDevMode ? [{ debugName: "deviceType" }] : /* istanbul ignore next */ []));
3516
4079
  /**
3517
4080
  * Whether the device supports touch input
3518
4081
  */
3519
- this.isTouchDevice = signal(isTouchDevice(), ...(ngDevMode ? [{ debugName: "isTouchDevice" }] : []));
4082
+ this.isTouchDevice = signal(isTouchDevice(), ...(ngDevMode ? [{ debugName: "isTouchDevice" }] : /* istanbul ignore next */ []));
3520
4083
  //#endregion
3521
4084
  //#region ---- Computed Signals ----
3522
4085
  /**
3523
4086
  * Whether the screen size is Small
3524
4087
  */
3525
- this.isSmall = computed(() => this.screenSize() === AXPScreenSize.Small, ...(ngDevMode ? [{ debugName: "isSmall" }] : []));
4088
+ this.isSmall = computed(() => this.screenSize() === AXPScreenSize.Small, ...(ngDevMode ? [{ debugName: "isSmall" }] : /* istanbul ignore next */ []));
3526
4089
  /**
3527
4090
  * Whether the screen size is Medium
3528
4091
  */
3529
- this.isMedium = computed(() => this.screenSize() === AXPScreenSize.Medium, ...(ngDevMode ? [{ debugName: "isMedium" }] : []));
4092
+ this.isMedium = computed(() => this.screenSize() === AXPScreenSize.Medium, ...(ngDevMode ? [{ debugName: "isMedium" }] : /* istanbul ignore next */ []));
3530
4093
  /**
3531
4094
  * Whether the screen size is Large
3532
4095
  */
3533
- this.isLarge = computed(() => this.screenSize() === AXPScreenSize.Large, ...(ngDevMode ? [{ debugName: "isLarge" }] : []));
4096
+ this.isLarge = computed(() => this.screenSize() === AXPScreenSize.Large, ...(ngDevMode ? [{ debugName: "isLarge" }] : /* istanbul ignore next */ []));
3534
4097
  /**
3535
4098
  * Whether the device is Mobile
3536
4099
  */
3537
- this.isMobileDevice = computed(() => this.deviceType() === AXPDeviceType.Mobile, ...(ngDevMode ? [{ debugName: "isMobileDevice" }] : []));
4100
+ this.isMobileDevice = computed(() => this.deviceType() === AXPDeviceType.Mobile, ...(ngDevMode ? [{ debugName: "isMobileDevice" }] : /* istanbul ignore next */ []));
3538
4101
  /**
3539
4102
  * Whether the device is Tablet
3540
4103
  */
3541
- this.isTabletDevice = computed(() => this.deviceType() === AXPDeviceType.Tablet, ...(ngDevMode ? [{ debugName: "isTabletDevice" }] : []));
4104
+ this.isTabletDevice = computed(() => this.deviceType() === AXPDeviceType.Tablet, ...(ngDevMode ? [{ debugName: "isTabletDevice" }] : /* istanbul ignore next */ []));
3542
4105
  /**
3543
4106
  * Whether the device is Desktop
3544
4107
  */
3545
- this.isDesktopDevice = computed(() => this.deviceType() === AXPDeviceType.Desktop, ...(ngDevMode ? [{ debugName: "isDesktopDevice" }] : []));
4108
+ this.isDesktopDevice = computed(() => this.deviceType() === AXPDeviceType.Desktop, ...(ngDevMode ? [{ debugName: "isDesktopDevice" }] : /* istanbul ignore next */ []));
3546
4109
  /**
3547
4110
  * Whether the device supports touch (alias for isTouchDevice)
3548
4111
  */
3549
- this.isTouchScreen = computed(() => this.isTouchDevice(), ...(ngDevMode ? [{ debugName: "isTouchScreen" }] : []));
4112
+ this.isTouchScreen = computed(() => this.isTouchDevice(), ...(ngDevMode ? [{ debugName: "isTouchScreen" }] : /* istanbul ignore next */ []));
3550
4113
  //#endregion
3551
4114
  //#region ---- Private Properties ----
3552
4115
  this._resizeListener = null;
@@ -3612,10 +4175,10 @@ class AXPDeviceService {
3612
4175
  destroy() {
3613
4176
  this._removeResizeListener();
3614
4177
  }
3615
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDeviceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3616
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDeviceService, providedIn: 'root' }); }
4178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDeviceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
4179
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDeviceService, providedIn: 'root' }); }
3617
4180
  }
3618
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDeviceService, decorators: [{
4181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDeviceService, decorators: [{
3619
4182
  type: Injectable,
3620
4183
  args: [{
3621
4184
  providedIn: 'root',
@@ -3719,10 +4282,10 @@ class AXHighlightService {
3719
4282
  resultHTML += '</span>';
3720
4283
  return resultHTML;
3721
4284
  }
3722
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXHighlightService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3723
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXHighlightService, providedIn: 'root' }); }
4285
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXHighlightService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
4286
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXHighlightService, providedIn: 'root' }); }
3724
4287
  }
3725
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXHighlightService, decorators: [{
4288
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXHighlightService, decorators: [{
3726
4289
  type: Injectable,
3727
4290
  args: [{
3728
4291
  providedIn: 'root',
@@ -3754,17 +4317,23 @@ async function createProviderWithInjectionContext(loader) {
3754
4317
  *
3755
4318
  * @param token - The injection token to provide
3756
4319
  * @param loader - Function that returns a promise resolving to the provider class
3757
- * @param multi - Whether the provider is multi-provider (defaults to true)
4320
+ * @param multi - Optional. Whether the provider is a multi-provider (array of values). Defaults to `true`. Pass `false` for a single provider.
3758
4321
  * @returns Provider configuration object
3759
4322
  *
3760
4323
  * @example
3761
4324
  * ```typescript
3762
- * providers: [
3763
- * provideLazyProvider(
3764
- * AXP_SETTING_DEFINITION_PROVIDER,
3765
- * () => import('./settings.provider').then(m => m.AXMSettingProvider)
3766
- * )
3767
- * ]
4325
+ * // Multi-provider (default)
4326
+ * provideLazyProvider(
4327
+ * AXP_DATASOURCE_DEFINITION_PROVIDER,
4328
+ * () => import('./datasource.provider').then(m => m.AXMDataSourceProvider)
4329
+ * )
4330
+ *
4331
+ * // Single provider
4332
+ * provideLazyProvider(
4333
+ * SOME_TOKEN,
4334
+ * () => import('./my.provider').then(m => m.MyProvider),
4335
+ * false
4336
+ * )
3768
4337
  * ```
3769
4338
  */
3770
4339
  function provideLazyProvider(token, loader, multi = true) {
@@ -3775,11 +4344,113 @@ function provideLazyProvider(token, loader, multi = true) {
3775
4344
  };
3776
4345
  }
3777
4346
 
4347
+ //#region ---- Unwrapping ----
4348
+ /**
4349
+ * If `raw` is a plain non-array object with a `value` property, returns `value`; otherwise returns `raw`.
4350
+ */
4351
+ function unwrapValueProperty(raw) {
4352
+ if (raw && typeof raw === 'object' && !Array.isArray(raw) && !(raw instanceof Date) && 'value' in raw) {
4353
+ return raw.value;
4354
+ }
4355
+ return raw;
4356
+ }
4357
+ //#endregion
4358
+ //#region ---- Scalar coercion ----
4359
+ /**
4360
+ * Coerces to a trimmed string. Plain objects may carry `{ value }` from setting widgets or `{ id }` from select payloads using `valueField: 'id'`.
4361
+ */
4362
+ function coerceUnknownToTrimmedString(raw) {
4363
+ if (typeof raw === 'string') {
4364
+ return raw.trim();
4365
+ }
4366
+ if (raw && typeof raw === 'object' && !Array.isArray(raw) && !(raw instanceof Date)) {
4367
+ const r = raw;
4368
+ if ('value' in r && r['value'] != null) {
4369
+ return String(r['value']).trim();
4370
+ }
4371
+ if ('id' in r && r['id'] != null) {
4372
+ return String(r['id']).trim();
4373
+ }
4374
+ }
4375
+ return '';
4376
+ }
4377
+ /**
4378
+ * Coerces to boolean: direct booleans pass through; wrapped `{ value: true | 'true' }` is respected; otherwise false.
4379
+ */
4380
+ function coerceUnknownToBoolean(raw) {
4381
+ if (typeof raw === 'boolean') {
4382
+ return raw;
4383
+ }
4384
+ if (raw && typeof raw === 'object' && 'value' in raw) {
4385
+ const v = raw.value;
4386
+ return v === true || v === 'true';
4387
+ }
4388
+ return false;
4389
+ }
4390
+ /** Parses a finite number after optional `{ value }` unwrap; non-finite or empty string yields NaN. */
4391
+ function coerceUnknownToFiniteNumber(raw) {
4392
+ const v = unwrapValueProperty(raw);
4393
+ if (v === null || v === undefined) {
4394
+ return NaN;
4395
+ }
4396
+ if (typeof v === 'number') {
4397
+ return Number.isFinite(v) ? v : NaN;
4398
+ }
4399
+ if (typeof v === 'boolean') {
4400
+ return v ? 1 : 0;
4401
+ }
4402
+ if (typeof v === 'string') {
4403
+ const t = v.trim();
4404
+ if (t === '') {
4405
+ return NaN;
4406
+ }
4407
+ const n = Number(t);
4408
+ return Number.isFinite(n) ? n : NaN;
4409
+ }
4410
+ return NaN;
4411
+ }
4412
+ /** Parses a Date after optional `{ value }` unwrap; invalid input yields Invalid Date. */
4413
+ function coerceUnknownToDate(raw) {
4414
+ const v = unwrapValueProperty(raw);
4415
+ if (v === null || v === undefined) {
4416
+ return new Date(NaN);
4417
+ }
4418
+ if (v instanceof Date) {
4419
+ return new Date(v.getTime());
4420
+ }
4421
+ if (typeof v === 'number' && Number.isFinite(v)) {
4422
+ return new Date(v);
4423
+ }
4424
+ if (typeof v === 'string') {
4425
+ const t = v.trim();
4426
+ if (t === '') {
4427
+ return new Date(NaN);
4428
+ }
4429
+ return new Date(t);
4430
+ }
4431
+ return new Date(NaN);
4432
+ }
4433
+ //#endregion
4434
+
3778
4435
  function extractTextFromHtml(value) {
3779
4436
  const div = document.createElement('div');
3780
4437
  div.innerHTML = value;
3781
4438
  return div.textContent || div.innerText || '';
3782
4439
  }
4440
+ /**
4441
+ * True when the string likely contains HTML markup (e.g. `<p>`, `<ul>`), as opposed to plain text.
4442
+ * Used to choose innerHTML vs text interpolation for multilingual fields.
4443
+ */
4444
+ function containsHtmlMarkup(value) {
4445
+ if (value == null) {
4446
+ return false;
4447
+ }
4448
+ const t = value.trim();
4449
+ if (!t) {
4450
+ return false;
4451
+ }
4452
+ return /<\/?[a-z][\s\S]*?>/i.test(t);
4453
+ }
3783
4454
  /**
3784
4455
  * Generate kebab-case group name from title
3785
4456
  */
@@ -3797,5 +4468,5 @@ function generateKebabCase(title) {
3797
4468
  * Generated bundle index. Do not edit.
3798
4469
  */
3799
4470
 
3800
- export { AXFullscreenDirective, AXHighlightService, AXPActivityLogProvider, AXPActivityLogService, AXPAppStartUpProvider, AXPAppStartUpService, AXPBroadcastEventService, AXPColorPaletteProvider, AXPColorPaletteService, AXPComponentLogoConfig, AXPContentCheckerDirective, AXPContextChangeEvent, AXPContextStore, AXPCountdownPipe, AXPDataGenerator, AXPDataSourceDefinitionProviderService, AXPDblClickDirective, AXPDefaultColorPalettesProvider, AXPDeviceService, AXPDeviceType, AXPDistributedEventListenerService, AXPElementDataDirective, AXPExportTemplateToken, AXPExpressionEvaluatorScopeProviderContext, AXPExpressionEvaluatorScopeProviderService, AXPExpressionEvaluatorService, AXPFeatureDefinitionProviderContext, AXPGridLayoutDirective, AXPHookService, AXPIconLogoConfig, AXPImageUrlLogoConfig, AXPModuleManifestModule, AXPModuleManifestRegistry, AXPPlatformScope, AXPScreenSize, AXPSystemActionType, AXPSystemActions, AXPTagProvider, AXPTagService, AXP_ACTIVITY_LOG_PROVIDER, AXP_COLOR_PALETTE_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER, AXP_MODULE_MANIFEST_PROVIDER, AXP_SESSION_SERVICE, AXP_TAG_PROVIDER, applyFilterArray, applyPagination, applyQueryArray, applySortArray, applySystemActionDefault, cleanDeep, createProviderWithInjectionContext, extractNestedFieldsWildcard, extractTextFromHtml, extractValue, generateKebabCase, getActionButton, getChangedPaths, getDetailedChanges, getEnumValues, getNestedKeys, getSmart, getSystemActions, objectKeyValueTransforms, provideLazyProvider, resolveActionLook, resolvePlatformScopeKey, resolvePlatformScopeName, setSmart };
4471
+ export { AXHighlightService, AXPActivityLogProvider, AXPActivityLogService, AXPAppStartUpProvider, AXPAppStartUpService, AXPBroadcastEventService, AXPColorPaletteProvider, AXPColorPaletteService, AXPColumnWidthService, AXPComponentLogoConfig, AXPComponentSlot, AXPComponentSlotDirective, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPContentCheckerDirective, AXPContextChangeEvent, AXPContextDefinitionProviderService, AXPContextStore, AXPCountdownPipe, AXPDataGenerator, AXPDataSourceDefinitionProviderService, AXPDblClickDirective, AXPDefaultColorPalettesProvider, AXPDeviceService, AXPDeviceType, AXPDistributedEventListenerService, AXPElementDataDirective, AXPExportTemplateToken, AXPExpressionEvaluatorScopeProviderContext, AXPExpressionEvaluatorScopeProviderService, AXPExpressionEvaluatorService, AXPFeatureDefinitionProviderContext, AXPGridLayoutDirective, AXPHookService, AXPIconLogoConfig, AXPImageUrlLogoConfig, AXPModuleManifestModule, AXPModuleManifestRegistry, AXPModuleManifestsDataSourceDefinition, AXPPlatformScope, AXPScreenSize, AXPSystemActionType, AXPSystemActions, AXPTagProvider, AXPTagService, AXP_ACTIVITY_LOG_PROVIDER, AXP_COLOR_PALETTE_PROVIDER, AXP_COLUMN_WIDTH_PROVIDER, AXP_CONTEXT_DEFINITION_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER, AXP_MODULE_MANIFEST_PROVIDER, AXP_SESSION_SERVICE, AXP_TAG_PROVIDER, MODULE_MANIFESTS_DATASOURCE_NAME, applyFilterArray, applyPagination, applyQueryArray, applySortArray, applySystemActionDefault, cleanDeep, coerceUnknownToBoolean, coerceUnknownToDate, coerceUnknownToFiniteNumber, coerceUnknownToTrimmedString, compareMultiLanguageStrings, containsHtmlMarkup, createProviderWithInjectionContext, defaultColumnWidthProvider, extractNestedFieldsWildcard, extractTextFromHtml, extractValue, generateKebabCase, getActionButton, getChangedPaths, getDetailedChanges, getEnumValues, getNestedKeys, getSmart, getSystemActions, normalizeDefinitionCategories, objectKeyValueTransforms, provideLazyProvider, resolveActionLook, resolvePlatformScopeKey, resolvePlatformScopeName, searchInMultiLanguageString, setSmart, sortByMultiLanguageString, unwrapValueProperty };
3801
4472
  //# sourceMappingURL=acorex-platform-core.mjs.map