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

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 +1381 -276
  6. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-core.mjs +1538 -611
  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 +1372 -210
  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 +6298 -1929
  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 +22537 -9975
  24. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  25. package/fesm2022/acorex-platform-layout-views.mjs +865 -218
  26. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  27. package/fesm2022/acorex-platform-layout-widget-core.mjs +2138 -487
  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 +10434 -7982
  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 +2289 -90
  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 +790 -612
  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} +833 -89
  81. package/{core/index.d.ts → types/acorex-platform-core.d.ts} +779 -164
  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} +277 -55
  84. package/types/acorex-platform-layout-components.d.ts +3257 -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 +4492 -0
  87. package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +247 -62
  88. package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +437 -131
  89. package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +1140 -506
  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} +254 -7
  93. package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +30 -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
@@ -7,33 +7,29 @@ import { AXDropdownModule } from '@acorex/components/dropdown';
7
7
  import * as i1 from '@angular/common';
8
8
  import { CommonModule } from '@angular/common';
9
9
  import * as i0 from '@angular/core';
10
- import { computed, inject, Component, InjectionToken, Injectable, signal, ChangeDetectionStrategy, effect, Input, Injector, NgModule } from '@angular/core';
10
+ import { computed, inject, effect, ChangeDetectionStrategy, Component, InjectionToken, Injectable, Input, signal, Injector, NgModule } from '@angular/core';
11
11
  import { AXPSettingsService, AXP_SETTING_DEFINITION_PROVIDER } from '@acorex/platform/common';
12
- import * as i1$2 from '@acorex/platform/core';
13
- import { AXPScreenSize, AXPPlatformScope } from '@acorex/platform/core';
12
+ import * as i1$3 from '@acorex/platform/core';
13
+ import { AXPScreenSize, AXPDeviceService, AXPPlatformScope, AXPComponentSlotModule } from '@acorex/platform/core';
14
14
  import { HttpClient } from '@angular/common/http';
15
15
  import { signalStore, withState, withComputed, withMethods, patchState, withHooks } from '@ngrx/signals';
16
16
  import { timer, firstValueFrom, filter } from 'rxjs';
17
17
  import * as i5 from '@acorex/core/translation';
18
18
  import { AXTranslationModule } from '@acorex/core/translation';
19
- import * as i3$1 from '@acorex/platform/layout/widget-core';
20
- import { AXPValueWidgetComponent, AXP_WIDGETS_LAYOUT_CATEGORY, AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';
21
- import * as i2$3 from '@acorex/platform/layout/components';
22
- import { AXPComponentSlotModule } from '@acorex/platform/layout/components';
23
- import * as i2$1 from '@acorex/components/form';
24
- import { AXFormModule } from '@acorex/components/form';
25
- import * as i4$1 from '@acorex/components/search-box';
26
- import { AXSearchBoxModule } from '@acorex/components/search-box';
27
- import * as i1$1 from '@acorex/components/select-box';
28
- import { AXSelectBoxModule } from '@acorex/components/select-box';
29
- import * as i5$1 from '@angular/forms';
30
- import { FormsModule } from '@angular/forms';
31
- import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY } from '@acorex/platform/layout/widgets';
32
- import { AXSelectionCdkModule } from '@acorex/cdk/selection';
19
+ import { AXPValueWidgetComponent, AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY, AXP_WIDGETS_LAYOUT_CATEGORY, AXPWidgetCoreModule, AXP_WIDGET_DEFINITION_PROVIDER } from '@acorex/platform/layout/widget-core';
33
20
  import { AXPopupService } from '@acorex/components/popup';
34
- import * as i2$2 from '@acorex/components/button-group';
21
+ import * as i2$1 from '@acorex/components/button-group';
35
22
  import { AXButtonGroupModule } from '@acorex/components/button-group';
36
23
  import { AXBasePageComponent } from '@acorex/components/page';
24
+ import * as i1$1 from '@acorex/components/search-box';
25
+ import { AXSearchBoxModule } from '@acorex/components/search-box';
26
+ import { AXSelectionCdkModule } from '@acorex/cdk/selection';
27
+ import * as i4$1 from '@angular/forms';
28
+ import { FormsModule } from '@angular/forms';
29
+ import * as i2$2 from '@acorex/components/form';
30
+ import { AXFormModule } from '@acorex/components/form';
31
+ import * as i1$2 from '@acorex/components/select-box';
32
+ import { AXSelectBoxModule } from '@acorex/components/select-box';
37
33
 
38
34
  var AXPThemeLayoutSetting;
39
35
  (function (AXPThemeLayoutSetting) {
@@ -45,7 +41,9 @@ var AXPThemeLayoutSetting;
45
41
  AXPThemeLayoutSetting["Mode"] = "Common:Setting:Layout.Mode";
46
42
  AXPThemeLayoutSetting["SideMenuStatus"] = "Common:Setting:Layout.SideMenu.Status";
47
43
  AXPThemeLayoutSetting["SideMenuWidth"] = "Common:Setting:Layout.SideMenu.Width";
44
+ AXPThemeLayoutSetting["SideMenuCompactWidth"] = "Common:Setting:Layout.SideMenu.CompactWidth";
48
45
  AXPThemeLayoutSetting["MenuOrientation"] = "Common:Setting:Layout.RootMenu.Direction";
46
+ AXPThemeLayoutSetting["MenuVerticalMode"] = "Common:Setting:Layout.RootMenu.VerticalMode";
49
47
  AXPThemeLayoutSetting["MenuBadgeVisible"] = "Common:Setting:Layout.RootMenu.Badge";
50
48
  })(AXPThemeLayoutSetting || (AXPThemeLayoutSetting = {}));
51
49
 
@@ -68,7 +66,27 @@ var AXPMenuOrientation;
68
66
  AXPMenuOrientation["Vertical"] = "vertical";
69
67
  AXPMenuOrientation["Horizontal"] = "horizontal";
70
68
  })(AXPMenuOrientation || (AXPMenuOrientation = {}));
69
+ // Vertical side menu display mode
70
+ var AXPMenuVerticalMode;
71
+ (function (AXPMenuVerticalMode) {
72
+ AXPMenuVerticalMode["Compact"] = "compact";
73
+ AXPMenuVerticalMode["Full"] = "full";
74
+ })(AXPMenuVerticalMode || (AXPMenuVerticalMode = {}));
75
+ const AXP_SIDE_MENU_FULL_DEFAULT_WIDTH = 300;
76
+ const AXP_SIDE_MENU_COMPACT_WIDTH = 80;
71
77
 
78
+ function normalizeMenuVerticalMode(value, fallback) {
79
+ if (value === AXPMenuVerticalMode.Compact || value === AXPMenuVerticalMode.Full) {
80
+ return value;
81
+ }
82
+ if (typeof value === 'object' && value !== null && 'id' in value) {
83
+ const id = value.id;
84
+ if (id === AXPMenuVerticalMode.Compact || id === AXPMenuVerticalMode.Full) {
85
+ return id;
86
+ }
87
+ }
88
+ return fallback;
89
+ }
72
90
  // ThemeStore - Manages theme settings, system changes, and loading states
73
91
  const AXPLayoutThemeService = signalStore({ providedIn: 'root' },
74
92
  // Initial State
@@ -98,7 +116,11 @@ withState(() => {
98
116
  sideMenuState: (getInitialScreenSize() === AXPScreenSize.Large
99
117
  ? AXPSideMenuState.Opened
100
118
  : AXPSideMenuState.Closed),
101
- sideMenuWidth: 288,
119
+ /** Ephemeral overlay drawer state on small/medium viewports; never persisted. */
120
+ overlaySideMenuOpen: false,
121
+ sideMenuWidth: AXP_SIDE_MENU_FULL_DEFAULT_WIDTH,
122
+ sideMenuCompactWidth: AXP_SIDE_MENU_COMPACT_WIDTH,
123
+ menuVerticalMode: AXPMenuVerticalMode.Full,
102
124
  menuOrientation: 'vertical',
103
125
  _listener: null,
104
126
  isPrinting: false,
@@ -106,24 +128,36 @@ withState(() => {
106
128
  return state;
107
129
  }),
108
130
  // Computed Signals
109
- withComputed(({ currentMode: currentTheme, systemThemeMode: systemTheme, sideMenuState, overlayLoading, navigationLoading, menuOrientation, isPrinting, }) => ({
110
- isDarkMode: computed(() => {
111
- if (isPrinting()) {
112
- return false;
131
+ withComputed(({ currentMode: currentTheme, systemThemeMode: systemTheme, sideMenuState, overlaySideMenuOpen, overlayLoading, navigationLoading, menuOrientation, menuVerticalMode, sideMenuWidth, sideMenuCompactWidth, isPrinting, }, deviceService = inject(AXPDeviceService)) => {
132
+ const effectiveMenuVerticalMode = computed(() => {
133
+ if (!deviceService.isLarge()) {
134
+ return AXPMenuVerticalMode.Full;
113
135
  }
114
- return (currentTheme() === AXPThemeMode.Dark ||
115
- (currentTheme() === AXPThemeMode.System && systemTheme() === AXPThemeMode.Dark));
116
- }),
117
- isLightMode: computed(() => currentTheme() === AXPThemeMode.Light ||
118
- (currentTheme() === AXPThemeMode.System && systemTheme() === AXPThemeMode.Light)),
119
- isSystemMode: computed(() => currentTheme() === AXPThemeMode.System),
120
- isSideMenuOpen: computed(() => sideMenuState() === AXPSideMenuState.Opened),
121
- isOverlayLoading: computed(() => overlayLoading()),
122
- isNavigationLoading: computed(() => navigationLoading()),
123
- isMenuHorizontal: computed(() => menuOrientation() === AXPMenuOrientation.Horizontal),
124
- })),
136
+ return normalizeMenuVerticalMode(menuVerticalMode(), AXPMenuVerticalMode.Full);
137
+ }, ...(ngDevMode ? [{ debugName: "effectiveMenuVerticalMode" }] : /* istanbul ignore next */ []));
138
+ return {
139
+ isDarkMode: computed(() => {
140
+ if (isPrinting()) {
141
+ return false;
142
+ }
143
+ return (currentTheme() === AXPThemeMode.Dark ||
144
+ (currentTheme() === AXPThemeMode.System && systemTheme() === AXPThemeMode.Dark));
145
+ }),
146
+ isLightMode: computed(() => currentTheme() === AXPThemeMode.Light ||
147
+ (currentTheme() === AXPThemeMode.System && systemTheme() === AXPThemeMode.Light)),
148
+ isSystemMode: computed(() => currentTheme() === AXPThemeMode.System),
149
+ isSideMenuOpen: computed(() => deviceService.isLarge()
150
+ ? sideMenuState() === AXPSideMenuState.Opened
151
+ : overlaySideMenuOpen()),
152
+ isOverlayLoading: computed(() => overlayLoading()),
153
+ isNavigationLoading: computed(() => navigationLoading()),
154
+ isMenuHorizontal: computed(() => menuOrientation() === AXPMenuOrientation.Horizontal),
155
+ effectiveMenuVerticalMode,
156
+ sideMenuDrawerWidth: computed(() => effectiveMenuVerticalMode() === AXPMenuVerticalMode.Compact ? sideMenuCompactWidth() : sideMenuWidth()),
157
+ };
158
+ }),
125
159
  // Methods for State Management
126
- withMethods((store, http = inject(HttpClient), settingsService = inject(AXPSettingsService)) => {
160
+ withMethods((store, http = inject(HttpClient), settingsService = inject(AXPSettingsService), deviceService = inject(AXPDeviceService)) => {
127
161
  const _applySettings = async () => {
128
162
  // Initialize theme and side menu setting from storage
129
163
  const settingThemeMode = (await settingsService.get(AXPThemeLayoutSetting.Mode)) ?? AXPThemeMode.Light;
@@ -139,12 +173,19 @@ withMethods((store, http = inject(HttpClient), settingsService = inject(AXPSetti
139
173
  store.menuOrientation();
140
174
  patchState(store, { menuOrientation: settingMenuOrientation });
141
175
  //
176
+ const settingMenuVerticalMode = normalizeMenuVerticalMode(await settingsService.get(AXPThemeLayoutSetting.MenuVerticalMode), store.menuVerticalMode());
177
+ patchState(store, { menuVerticalMode: settingMenuVerticalMode });
178
+ //
142
179
  const fontFamily = await settingsService.get(AXPThemeLayoutSetting.Font);
143
180
  const fontSize = await settingsService.get(AXPThemeLayoutSetting.FontSize);
144
181
  patchState(store, { font: { family: fontFamily, size: fontSize } });
145
182
  //
146
- const sideMenuWidth = await settingsService.get(AXPThemeLayoutSetting.SideMenuWidth);
183
+ const sideMenuWidth = (await settingsService.get(AXPThemeLayoutSetting.SideMenuWidth)) ?? store.sideMenuWidth();
147
184
  patchState(store, { sideMenuWidth });
185
+ //
186
+ const sideMenuCompactWidth = (await settingsService.get(AXPThemeLayoutSetting.SideMenuCompactWidth)) ??
187
+ store.sideMenuCompactWidth();
188
+ patchState(store, { sideMenuCompactWidth });
148
189
  await _updateHtmlClass();
149
190
  };
150
191
  // Update HTML class based on theme
@@ -243,6 +284,15 @@ withMethods((store, http = inject(HttpClient), settingsService = inject(AXPSetti
243
284
  }
244
285
  };
245
286
  const minimumDisplayTime = 500; // milliseconds
287
+ const setSideMenuOpen = (opened) => {
288
+ if (!deviceService.isLarge()) {
289
+ patchState(store, { overlaySideMenuOpen: opened });
290
+ return;
291
+ }
292
+ const sideMenuState = opened ? AXPSideMenuState.Opened : AXPSideMenuState.Closed;
293
+ patchState(store, { sideMenuState });
294
+ settingsService.scope(AXPPlatformScope.User).set(AXPThemeLayoutSetting.SideMenuStatus, sideMenuState);
295
+ };
246
296
  return {
247
297
  // Change theme and update HTML class
248
298
  changeThemeMode(theme) {
@@ -252,24 +302,36 @@ withMethods((store, http = inject(HttpClient), settingsService = inject(AXPSetti
252
302
  },
253
303
  // Open side menu
254
304
  openSideMenu() {
255
- patchState(store, { sideMenuState: AXPSideMenuState.Opened });
256
- settingsService.scope(AXPPlatformScope.User).set(AXPThemeLayoutSetting.SideMenuStatus, AXPSideMenuState.Opened);
305
+ setSideMenuOpen(true);
257
306
  },
258
307
  // Close side menu
259
308
  closeSideMenu() {
260
- patchState(store, { sideMenuState: AXPSideMenuState.Closed });
261
- settingsService.scope(AXPPlatformScope.User).set(AXPThemeLayoutSetting.SideMenuStatus, AXPSideMenuState.Closed);
309
+ setSideMenuOpen(false);
262
310
  },
263
- // Set side menu width
311
+ // Set side menu width in full vertical mode
264
312
  setSideMenuWidth(width) {
265
313
  patchState(store, { sideMenuWidth: width });
266
314
  settingsService.scope(AXPPlatformScope.User).set(AXPThemeLayoutSetting.SideMenuWidth, width);
267
315
  },
316
+ // Set side menu width in compact vertical mode
317
+ setSideMenuCompactWidth(width) {
318
+ patchState(store, { sideMenuCompactWidth: width });
319
+ settingsService.scope(AXPPlatformScope.User).set(AXPThemeLayoutSetting.SideMenuCompactWidth, width);
320
+ },
321
+ // Persist drawer width for the active vertical menu mode
322
+ setSideMenuDrawerWidth(width) {
323
+ if (normalizeMenuVerticalMode(store.menuVerticalMode(), AXPMenuVerticalMode.Full) === AXPMenuVerticalMode.Compact) {
324
+ patchState(store, { sideMenuCompactWidth: width });
325
+ settingsService.scope(AXPPlatformScope.User).set(AXPThemeLayoutSetting.SideMenuCompactWidth, width);
326
+ }
327
+ else {
328
+ patchState(store, { sideMenuWidth: width });
329
+ settingsService.scope(AXPPlatformScope.User).set(AXPThemeLayoutSetting.SideMenuWidth, width);
330
+ }
331
+ },
268
332
  // Toggle side menu state
269
333
  toggleSideMenu() {
270
- const newSideMenuState = store.sideMenuState() === AXPSideMenuState.Opened ? AXPSideMenuState.Closed : AXPSideMenuState.Opened;
271
- patchState(store, { sideMenuState: newSideMenuState });
272
- settingsService.scope(AXPPlatformScope.User).set(AXPThemeLayoutSetting.SideMenuStatus, newSideMenuState);
334
+ setSideMenuOpen(!store.isSideMenuOpen());
273
335
  },
274
336
  // Set navigation loading state with a task counter
275
337
  setNavigationLoading(value, delay) {
@@ -302,12 +364,28 @@ withMethods((store, http = inject(HttpClient), settingsService = inject(AXPSetti
302
364
  };
303
365
  }),
304
366
  // Lifecycle Hooks
305
- withHooks((store, settingsService = inject(AXPSettingsService)) => ({
367
+ withHooks((store, settingsService = inject(AXPSettingsService), deviceService = inject(AXPDeviceService)) => ({
306
368
  onInit() {
307
- //
308
- settingsService.onChanged.pipe(filter((c) => c.scope == AXPPlatformScope.User)).subscribe(async (changes) => {
369
+ effect(() => {
370
+ if (!deviceService.isLarge()) {
371
+ patchState(store, { overlaySideMenuOpen: false });
372
+ }
373
+ });
374
+ settingsService.onChanged
375
+ .pipe(filter((c) => [AXPPlatformScope.Platform, AXPPlatformScope.Tenant, AXPPlatformScope.User].includes(c.scope)))
376
+ .subscribe(async (changes) => {
309
377
  const keys = Object.values(AXPThemeLayoutSetting);
310
- if (changes.keys.some((key) => keys.includes(key))) {
378
+ if (!changes.keys.some((key) => keys.includes(key))) {
379
+ return;
380
+ }
381
+ if (changes.keys.includes(AXPThemeLayoutSetting.MenuVerticalMode)) {
382
+ patchState(store, {
383
+ menuVerticalMode: normalizeMenuVerticalMode(changes.values[AXPThemeLayoutSetting.MenuVerticalMode], store.menuVerticalMode()),
384
+ });
385
+ }
386
+ const shouldReloadSettings = changes.keys.some((key) => keys.includes(key) &&
387
+ key !== AXPThemeLayoutSetting.MenuVerticalMode);
388
+ if (shouldReloadSettings) {
311
389
  await store['loadSettings']();
312
390
  }
313
391
  });
@@ -341,8 +419,8 @@ class AXPThemeSlotComponent {
341
419
  this.store = inject(AXPLayoutThemeService);
342
420
  this.variants = AXPThemeMode;
343
421
  }
344
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPThemeSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
345
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPThemeSlotComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
422
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
423
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPThemeSlotComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
346
424
  <ax-button color="primary">
347
425
  <ax-icon
348
426
  class="fa-regular "
@@ -385,9 +463,9 @@ class AXPThemeSlotComponent {
385
463
  </ax-button-item-list>
386
464
  </ax-dropdown-panel>
387
465
  </ax-button>
388
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }] }); }
466
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
389
467
  }
390
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPThemeSlotComponent, decorators: [{
468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeSlotComponent, decorators: [{
391
469
  type: Component,
392
470
  args: [{
393
471
  template: `
@@ -434,7 +512,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
434
512
  </ax-dropdown-panel>
435
513
  </ax-button>
436
514
  `,
437
- imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXDropdownModule, AXTranslationModule]
515
+ imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXDropdownModule, AXTranslationModule],
516
+ changeDetection: ChangeDetectionStrategy.OnPush,
438
517
  }]
439
518
  }] });
440
519
 
@@ -467,505 +546,131 @@ class AXPThemePaletteProviderDefault {
467
546
  }
468
547
  }
469
548
 
470
- class AXPColorProvider {
471
- }
472
- function titleCase(str) {
473
- return str.replace(/-/g, ' ').replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());
474
- }
475
- function generateDefaultColors() {
476
- const colors = [];
477
- const styles = ['primary', 'secondary', 'success', 'warning', 'danger'];
478
- const variants = [
479
- 'lightest',
480
- 'lighter',
481
- 'light',
482
- 'surface',
483
- 'dark',
484
- 'darker',
485
- 'darkest',
486
- // ,'default'
487
- ];
488
- for (const style of styles) {
489
- for (const variant of variants) {
490
- let name;
491
- let colorClass;
492
- // if (variant === 'default') {
493
- // name = `${style}-${variant}`;
494
- // colorClass = `ax-text-${style}-${variant}`;
495
- // } else {
496
- name = `${style}-${variant}`;
497
- colorClass = `ax-text-${style}-on-${variant}`;
498
- // }
499
- colors.push({
500
- title: titleCase(variant === 'surface' ? style : titleCase(name)),
501
- name: name,
502
- color: colorClass,
503
- background: `ax-bg-${name}`,
504
- border: `ax-border-${name}`,
505
- });
506
- }
507
- }
508
- return colors;
549
+ //#region ---- Injection Tokens ----
550
+ /**
551
+ * Injection token for icon providers.
552
+ * Use multi: true to register multiple providers.
553
+ */
554
+ const AXP_ICON_PROVIDER = new InjectionToken('AXP_ICON_PROVIDER');
555
+ /**
556
+ * Injection token for icon style providers.
557
+ * Use multi: true to register multiple providers.
558
+ */
559
+ const AXP_ICON_STYLE_PROVIDER = new InjectionToken('AXP_ICON_STYLE_PROVIDER');
560
+ //#endregion
561
+
562
+ //#endregion
563
+ //#region ---- Abstract Providers ----
564
+ class AXPIconProvider {
509
565
  }
510
- const DEFAULT_COLORS = generateDefaultColors();
511
- class AXPColorProviderDefault extends AXPColorProvider {
512
- async provide() {
513
- return DEFAULT_COLORS;
514
- }
566
+ class AXPIconStyleProvider {
515
567
  }
516
- const AXP_COLOR_PROVIDER = new InjectionToken('AXP_COLOR_PROVIDER');
517
- class AXPColorChooserService {
568
+ //#endregion
569
+ //#region ---- Service ----
570
+ class AXPIconChooserService {
518
571
  constructor() {
519
- this.defaultProvider = new AXPColorProviderDefault();
520
- this.providers = (() => {
521
- const injected = inject(AXP_COLOR_PROVIDER, { optional: true });
522
- if (!injected) {
523
- return [this.defaultProvider];
524
- }
525
- const providers = Array.isArray(injected) ? injected : [injected];
526
- return [...providers, this.defaultProvider];
527
- })();
528
- this.cache = null;
572
+ //#region ---- Properties ----
573
+ this.iconProviders = inject(AXP_ICON_PROVIDER, { optional: true }) ?? [];
574
+ this.styleProviders = inject(AXP_ICON_STYLE_PROVIDER, { optional: true }) ?? [];
575
+ this.iconsCache = null;
576
+ this.stylesCache = null;
529
577
  }
530
- async getColors() {
531
- if (this.cache) {
532
- return this.cache;
578
+ //#endregion
579
+ //#region ---- Public Methods ----
580
+ /**
581
+ * Get all available icon styles from registered providers.
582
+ * Results are cached after first call.
583
+ */
584
+ async getStyles() {
585
+ if (this.stylesCache) {
586
+ return this.stylesCache;
587
+ }
588
+ const allStyles = [];
589
+ for (const provider of this.styleProviders) {
590
+ const result = await provider.provide();
591
+ allStyles.push(...result);
592
+ }
593
+ // Remove duplicates based on style name
594
+ const uniqueStyles = allStyles.filter((style, index, self) => index === self.findIndex((s) => s.name === style.name));
595
+ this.stylesCache = uniqueStyles;
596
+ return uniqueStyles;
597
+ }
598
+ /**
599
+ * Get all available icons from registered providers.
600
+ * Icons from multiple providers are merged, with duplicates removed.
601
+ * Results are cached after first call.
602
+ */
603
+ async getIcons() {
604
+ if (this.iconsCache) {
605
+ return this.iconsCache;
533
606
  }
534
- const allColors = [];
535
- for (const resolver of this.providers) {
536
- const result = await resolver.provide();
537
- allColors.push(...result);
607
+ const allIcons = [];
608
+ for (const provider of this.iconProviders) {
609
+ const result = await provider.provide();
610
+ allIcons.push(...result);
538
611
  }
539
- const uniqueColors = allColors.filter((color, index, self) => index === self.findIndex((c) => c.title === color.title));
540
- this.cache = uniqueColors;
541
- return uniqueColors;
612
+ // Remove duplicates based on icon name, keeping first occurrence
613
+ const uniqueIcons = allIcons.filter((icon, index, self) => index === self.findIndex((i) => i.name === icon.name));
614
+ this.iconsCache = uniqueIcons;
615
+ return uniqueIcons;
542
616
  }
543
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColorChooserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
544
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColorChooserService, providedIn: 'root' }); }
617
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
618
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserService, providedIn: 'root' }); }
545
619
  }
546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColorChooserService, decorators: [{
620
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserService, decorators: [{
547
621
  type: Injectable,
548
- args: [{
549
- providedIn: 'root',
550
- }]
622
+ args: [{ providedIn: 'root' }]
551
623
  }] });
552
624
 
553
- class AXPColorChooserWidgetEditComponent extends AXPValueWidgetComponent {
625
+ class AXPIconChooserPopupComponent extends AXBasePageComponent {
554
626
  constructor() {
555
627
  super(...arguments);
556
- this.colorService = inject(AXPColorChooserService);
557
- this.colors = signal([], ...(ngDevMode ? [{ debugName: "colors" }] : []));
558
- this.placeholder = computed(() => this.options()['placeholder'] ?? '', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
559
- this.selectedColor = computed(() => {
560
- const value = this.getValue();
561
- if (!value) {
562
- return this.colors()[0];
563
- }
564
- // If value is a string in the format: "ax-text-* ax-bg-* ax-border-*"
565
- if (typeof value === 'string') {
566
- const parsed = this.parseStringValue(value);
567
- if (parsed) {
568
- return parsed;
569
- }
570
- return this.colors()[0];
571
- }
572
- // Otherwise value is an object
573
- return value.name;
574
- }, ...(ngDevMode ? [{ debugName: "selectedColor" }] : []));
628
+ this.icons = [];
629
+ this.filteredIcons = [];
630
+ this.searchQuery = '';
631
+ this.viewModes = [
632
+ { value: 'square', text: '@general:widgets.icon-chooser.view-mode.square', icon: 'fa-solid fa-border-all' },
633
+ {
634
+ value: 'rectangle',
635
+ text: '@general:widgets.icon-chooser.view-mode.rectangle',
636
+ icon: 'fa-solid fa-list',
637
+ },
638
+ ];
639
+ this.selectedViewMode = 'square';
640
+ this.iconTypes = [];
641
+ this.selectedIconType = 'fa-solid';
642
+ this.popupService = inject(AXPIconChooserService);
575
643
  }
576
644
  async ngOnInit() {
577
- const allColors = await this.colorService.getColors();
578
- this.colors.set(allColors);
579
- super.ngOnInit();
645
+ this.iconTypes = await this.popupService.getStyles();
646
+ this.icons = await this.popupService.getIcons();
647
+ this.applyFilters();
648
+ this.cdr.detectChanges();
580
649
  }
581
- handleValueChange(event) {
582
- if (event.isUserInteraction) {
583
- if (!event.value) {
584
- this.setValue(undefined);
585
- return;
586
- }
587
- const color = event.component.selectedItems[0];
588
- // Always store as ordered string: "color background border"
589
- const stringValue = `${color.color} ${color.background} ${color.border}`;
590
- this.setValue(stringValue);
591
- }
650
+ handleSearch(event) {
651
+ this.searchQuery = event.value?.toLowerCase();
652
+ this.applyFilters();
592
653
  }
593
- parseStringValue(value) {
594
- const parts = value.trim().split(/\s+/);
595
- if (parts.length !== 3) {
596
- return null;
654
+ handleViewModeChange(mode) {
655
+ this.selectedViewMode = mode.value;
656
+ }
657
+ handleIconTypeChange(type) {
658
+ this.selectedIconType = type.name;
659
+ this.applyFilters();
660
+ }
661
+ applyFilters() {
662
+ let result = this.icons;
663
+ if (this.searchQuery) {
664
+ result = result.filter((icon) => icon.label.toLowerCase().includes(this.searchQuery) ||
665
+ icon.tags?.some((tag) => tag.toLowerCase().includes(this.searchQuery)));
597
666
  }
598
- const [color, background, border] = parts;
599
- const match = this.colors().find((c) => c.color === color && c.background === background && c.border === border);
600
- return match?.name ?? null;
601
- }
602
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColorChooserWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
603
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPColorChooserWidgetEditComponent, isStandalone: true, selector: "ax-color-chooser-widget", usesInheritance: true, ngImport: i0, template: `
604
- <ax-form [messageStyle]="'float'" [updateOn]="'change'">
605
- <ax-form-field>
606
- <ax-select-box
607
- [dataSource]="colors()"
608
- textField="title"
609
- valueField="name"
610
- [placeholder]="placeholder()"
611
- [itemTemplate]="customItemTemplate"
612
- [ngModel]="selectedColor()"
613
- (onValueChanged)="handleValueChange($event)"
614
- [selectedTemplate]="customItemTemplate"
615
- >
616
- <ng-template #customItemTemplate let-item>
617
- <div class="ax-flex ax-items-center ax-gap-2 ax-p-2">
618
- <div
619
- class="ax-w-6 ax-h-6 ax-rounded ax-flex ax-items-center ax-justify-center ax-border ax-border-dashed ax-border-black dark:ax-border-white"
620
- [ngClass]="item.data.background"
621
- >
622
- <span [ngClass]="item.data.color">Aa</span>
623
- </div>
624
- <span>{{ item.data.title }}</span>
625
- </div>
626
- </ng-template>
627
- <ax-search-box look="fill"></ax-search-box>
628
- <ax-validation-rule message="field can't be empty" rule="required"></ax-validation-rule>
629
- </ax-select-box>
630
- </ax-form-field>
631
- </ax-form>
632
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i1$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$1.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i2$1.AXFormComponent, selector: "ax-form", inputs: ["disabled", "readonly", "labelMode", "look", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "directive", type: i2$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i4$1.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
633
- }
634
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColorChooserWidgetEditComponent, decorators: [{
635
- type: Component,
636
- args: [{
637
- selector: 'ax-color-chooser-widget',
638
- template: `
639
- <ax-form [messageStyle]="'float'" [updateOn]="'change'">
640
- <ax-form-field>
641
- <ax-select-box
642
- [dataSource]="colors()"
643
- textField="title"
644
- valueField="name"
645
- [placeholder]="placeholder()"
646
- [itemTemplate]="customItemTemplate"
647
- [ngModel]="selectedColor()"
648
- (onValueChanged)="handleValueChange($event)"
649
- [selectedTemplate]="customItemTemplate"
650
- >
651
- <ng-template #customItemTemplate let-item>
652
- <div class="ax-flex ax-items-center ax-gap-2 ax-p-2">
653
- <div
654
- class="ax-w-6 ax-h-6 ax-rounded ax-flex ax-items-center ax-justify-center ax-border ax-border-dashed ax-border-black dark:ax-border-white"
655
- [ngClass]="item.data.background"
656
- >
657
- <span [ngClass]="item.data.color">Aa</span>
658
- </div>
659
- <span>{{ item.data.title }}</span>
660
- </div>
661
- </ng-template>
662
- <ax-search-box look="fill"></ax-search-box>
663
- <ax-validation-rule message="field can't be empty" rule="required"></ax-validation-rule>
664
- </ax-select-box>
665
- </ax-form-field>
666
- </ax-form>
667
- `,
668
- imports: [AXSelectBoxModule, AXFormModule, CommonModule, AXSearchBoxModule, AXButtonModule, FormsModule],
669
- changeDetection: ChangeDetectionStrategy.OnPush,
670
- }]
671
- }] });
672
-
673
- var themeColorChooserEdit_component = /*#__PURE__*/Object.freeze({
674
- __proto__: null,
675
- AXPColorChooserWidgetEditComponent: AXPColorChooserWidgetEditComponent
676
- });
677
-
678
- const AXPThemeColorChooserWidgetConfig = {
679
- name: 'theme-color-chooser',
680
- title: 'Theme Color Chooser',
681
- icon: 'fa-solid fa-palette',
682
- type: 'editor',
683
- categories: AXP_WIDGETS_LAYOUT_CATEGORY,
684
- properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
685
- components: {
686
- edit: {
687
- component: () => Promise.resolve().then(function () { return themeColorChooserEdit_component; }).then((c) => c.AXPColorChooserWidgetEditComponent),
688
- },
689
- column: {
690
- component: () => import('./acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs').then((c) => c.AXPColorChooserWidgetColumnComponent),
691
- },
692
- view: {
693
- component: () => import('./acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs').then((c) => c.AXPColorChooserWidgetViewComponent),
694
- },
695
- },
696
- };
697
-
698
- class AXPFontSizeChooserWidgetComponent extends AXPValueWidgetComponent {
699
- constructor() {
700
- super(...arguments);
701
- this.sizes = signal(['small', 'medium', 'large', 'x-large'], ...(ngDevMode ? [{ debugName: "sizes" }] : []));
702
- this.selectedSize = signal(null, ...(ngDevMode ? [{ debugName: "selectedSize" }] : []));
703
- this.#eff = effect(() => {
704
- if (this.getValue()) {
705
- this.selectedSize.set(this.sizes().find((s) => s === this.getValue()) ?? this.sizes()[0]);
706
- }
707
- }, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
708
- }
709
- #eff;
710
- onSizeClick(size) {
711
- this.setValue(size);
712
- }
713
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
714
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPFontSizeChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
715
- @for (size of sizes(); track size) {
716
- <div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
717
- <div>
718
- <span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
719
- </div>
720
- </div>
721
- }
722
- `, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
723
- }
724
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, decorators: [{
725
- type: Component,
726
- args: [{ template: `
727
- @for (size of sizes(); track size) {
728
- <div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
729
- <div>
730
- <span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
731
- </div>
732
- </div>
733
- }
734
- `, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, AXSelectionCdkModule, AXTranslationModule], styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}\n"] }]
735
- }] });
736
-
737
- var fontSizeChooserWidget_component = /*#__PURE__*/Object.freeze({
738
- __proto__: null,
739
- AXPFontSizeChooserWidgetComponent: AXPFontSizeChooserWidgetComponent
740
- });
741
-
742
- const AXPFontSizeChooserWidget = {
743
- name: "font-size-chooser",
744
- title: "Font Size Chooser",
745
- icon: "fa-light fa-text-size",
746
- type: 'editor',
747
- categories: AXP_WIDGETS_LAYOUT_CATEGORY,
748
- properties: [
749
- AXP_NAME_PROPERTY,
750
- AXP_DATA_PATH_PROPERTY,
751
- AXP_DISABLED_PROPERTY,
752
- ],
753
- components: {
754
- edit: {
755
- component: () => Promise.resolve().then(function () { return fontSizeChooserWidget_component; }).then((c) => c.AXPFontSizeChooserWidgetComponent),
756
- },
757
- }
758
- };
759
-
760
- class AXPFontStyleChooserWidgetComponent extends AXPValueWidgetComponent {
761
- constructor() {
762
- super(...arguments);
763
- this.fonts = signal([
764
- { id: 'system-ui', title: 'Default' },
765
- { id: 'serif', title: 'Serif' },
766
- { id: 'sans-serif', title: 'Sans-serif' },
767
- { id: 'monospace', title: 'Monospace' },
768
- { id: 'arial', title: 'Arial' },
769
- { id: 'verdana', title: 'Verdana' },
770
- { id: 'tahoma', title: 'Tahoma' },
771
- { id: 'times-new-roman', title: 'Times New Roman' },
772
- { id: 'georgia', title: 'Georgia' },
773
- { id: 'helvetica', title: 'Helvetica' },
774
- { id: 'calibri', title: 'Calibri' },
775
- { id: 'cursive', title: 'Cursive' },
776
- { id: 'vazirmatn', title: 'Vazir وزیر' },
777
- ], ...(ngDevMode ? [{ debugName: "fonts" }] : []));
778
- this.selectedFont = signal(null, ...(ngDevMode ? [{ debugName: "selectedFont" }] : []));
779
- this.#eff = effect(() => {
780
- if (this.getValue()) {
781
- this.selectedFont.set(this.fonts().find((f) => f.id === this.getValue()) ?? this.fonts()[0]);
782
- }
783
- }, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
784
- }
785
- #eff;
786
- onFontClick(font) {
787
- this.setValue(font.id);
788
- }
789
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
790
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPFontStyleChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
791
- @for (font of fonts(); track font.id) {
792
- <div
793
- (click)="onFontClick(font)"
794
- [class.--selected]="font.id === selectedFont()?.id"
795
- [style.font-family]="font.id"
796
- >
797
- <div>
798
- <span>{{ font.title }}</span>
799
- </div>
800
- </div>
801
- }
802
- `, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
803
- }
804
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, decorators: [{
805
- type: Component,
806
- args: [{ template: `
807
- @for (font of fonts(); track font.id) {
808
- <div
809
- (click)="onFontClick(font)"
810
- [class.--selected]="font.id === selectedFont()?.id"
811
- [style.font-family]="font.id"
812
- >
813
- <div>
814
- <span>{{ font.title }}</span>
815
- </div>
816
- </div>
817
- }
818
- `, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, AXSelectionCdkModule], styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}\n"] }]
819
- }] });
820
-
821
- var fontStyleChooserWidget_component = /*#__PURE__*/Object.freeze({
822
- __proto__: null,
823
- AXPFontStyleChooserWidgetComponent: AXPFontStyleChooserWidgetComponent
824
- });
825
-
826
- const AXPFontStyleChooserWidget = {
827
- name: "font-style-chooser",
828
- title: "Font Style Chooser",
829
- icon: "fa-light fa-font",
830
- type: 'editor',
831
- categories: AXP_WIDGETS_LAYOUT_CATEGORY,
832
- properties: [
833
- AXP_NAME_PROPERTY,
834
- AXP_DATA_PATH_PROPERTY,
835
- AXP_DISABLED_PROPERTY,
836
- ],
837
- components: {
838
- edit: {
839
- component: () => Promise.resolve().then(function () { return fontStyleChooserWidget_component; }).then((c) => c.AXPFontStyleChooserWidgetComponent),
840
- },
841
- }
842
- };
843
-
844
- //#region ---- Injection Tokens ----
845
- /**
846
- * Injection token for icon providers.
847
- * Use multi: true to register multiple providers.
848
- */
849
- const AXP_ICON_PROVIDER = new InjectionToken('AXP_ICON_PROVIDER');
850
- /**
851
- * Injection token for icon style providers.
852
- * Use multi: true to register multiple providers.
853
- */
854
- const AXP_ICON_STYLE_PROVIDER = new InjectionToken('AXP_ICON_STYLE_PROVIDER');
855
- //#endregion
856
-
857
- //#endregion
858
- //#region ---- Abstract Providers ----
859
- class AXPIconProvider {
860
- }
861
- class AXPIconStyleProvider {
862
- }
863
- //#endregion
864
- //#region ---- Service ----
865
- class AXPIconChooserService {
866
- constructor() {
867
- //#region ---- Properties ----
868
- this.iconProviders = inject(AXP_ICON_PROVIDER, { optional: true }) ?? [];
869
- this.styleProviders = inject(AXP_ICON_STYLE_PROVIDER, { optional: true }) ?? [];
870
- this.iconsCache = null;
871
- this.stylesCache = null;
872
- }
873
- //#endregion
874
- //#region ---- Public Methods ----
875
- /**
876
- * Get all available icon styles from registered providers.
877
- * Results are cached after first call.
878
- */
879
- async getStyles() {
880
- if (this.stylesCache) {
881
- return this.stylesCache;
882
- }
883
- const allStyles = [];
884
- for (const provider of this.styleProviders) {
885
- const result = await provider.provide();
886
- allStyles.push(...result);
887
- }
888
- // Remove duplicates based on style name
889
- const uniqueStyles = allStyles.filter((style, index, self) => index === self.findIndex((s) => s.name === style.name));
890
- this.stylesCache = uniqueStyles;
891
- return uniqueStyles;
892
- }
893
- /**
894
- * Get all available icons from registered providers.
895
- * Icons from multiple providers are merged, with duplicates removed.
896
- * Results are cached after first call.
897
- */
898
- async getIcons() {
899
- if (this.iconsCache) {
900
- return this.iconsCache;
901
- }
902
- const allIcons = [];
903
- for (const provider of this.iconProviders) {
904
- const result = await provider.provide();
905
- allIcons.push(...result);
906
- }
907
- // Remove duplicates based on icon name, keeping first occurrence
908
- const uniqueIcons = allIcons.filter((icon, index, self) => index === self.findIndex((i) => i.name === icon.name));
909
- this.iconsCache = uniqueIcons;
910
- return uniqueIcons;
911
- }
912
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPIconChooserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
913
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPIconChooserService, providedIn: 'root' }); }
914
- }
915
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPIconChooserService, decorators: [{
916
- type: Injectable,
917
- args: [{ providedIn: 'root' }]
918
- }] });
919
-
920
- class AXPIconChooserPopupComponent extends AXBasePageComponent {
921
- constructor() {
922
- super(...arguments);
923
- this.icons = [];
924
- this.filteredIcons = [];
925
- this.searchQuery = '';
926
- this.viewModes = [
927
- { value: 'square', text: '@general:widgets.icon-chooser.view-mode.square', icon: 'fa-solid fa-border-all' },
928
- {
929
- value: 'rectangle',
930
- text: '@general:widgets.icon-chooser.view-mode.rectangle',
931
- icon: 'fa-solid fa-list',
932
- },
933
- ];
934
- this.selectedViewMode = 'square';
935
- this.iconTypes = [];
936
- this.selectedIconType = 'fa-solid';
937
- this.popupService = inject(AXPIconChooserService);
938
- }
939
- async ngOnInit() {
940
- this.iconTypes = await this.popupService.getStyles();
941
- this.icons = await this.popupService.getIcons();
942
- this.applyFilters();
943
- this.cdr.detectChanges();
944
- }
945
- handleSearch(event) {
946
- this.searchQuery = event.value?.toLowerCase();
947
- this.applyFilters();
948
- }
949
- handleViewModeChange(mode) {
950
- this.selectedViewMode = mode.value;
951
- }
952
- handleIconTypeChange(type) {
953
- this.selectedIconType = type.name;
954
- this.applyFilters();
955
- }
956
- applyFilters() {
957
- let result = this.icons;
958
- if (this.searchQuery) {
959
- result = result.filter((icon) => icon.label.toLowerCase().includes(this.searchQuery) ||
960
- icon.tags?.some((tag) => tag.toLowerCase().includes(this.searchQuery)));
961
- }
962
- result = result.filter((icon) => {
963
- if (!icon.supportedStyle || icon.supportedStyle.length === 0) {
964
- return true;
965
- }
966
- return icon.supportedStyle.includes(this.selectedIconType);
967
- });
968
- this.filteredIcons = result;
667
+ result = result.filter((icon) => {
668
+ if (!icon.supportedStyle || icon.supportedStyle.length === 0) {
669
+ return true;
670
+ }
671
+ return icon.supportedStyle.includes(this.selectedIconType);
672
+ });
673
+ this.filteredIcons = result;
969
674
  }
970
675
  selectIcon(icon) {
971
676
  this.close({
@@ -977,8 +682,8 @@ class AXPIconChooserPopupComponent extends AXBasePageComponent {
977
682
  getIconClass(icon) {
978
683
  return `${this.selectedIconType} fa-${icon.name}`;
979
684
  }
980
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPIconChooserPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
981
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPIconChooserPopupComponent, isStandalone: true, selector: "ng-component", inputs: { value: "value" }, usesInheritance: true, ngImport: i0, template: `
685
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
686
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPIconChooserPopupComponent, isStandalone: true, selector: "ng-component", inputs: { value: "value" }, usesInheritance: true, ngImport: i0, template: `
982
687
  <div class="ax-flex ax-flex-col ax-h-full ax-bg-lightest">
983
688
  <!-- Fixed Header Section -->
984
689
  <div class="ax-sticky ax-top-0 ax-z-10 ax-bg-lightest ax-border-b ax-p-4 ax-gap-4 ax-flex ax-flex-col">
@@ -1053,9 +758,9 @@ class AXPIconChooserPopupComponent extends AXBasePageComponent {
1053
758
  </div>
1054
759
  </div>
1055
760
  </div>
1056
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i4$1.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "component", type: i2$2.AXButtonGroupComponent, selector: "ax-button-group", inputs: ["disabled", "color", "look", "fitParent", "selection"], outputs: ["onBlur", "onFocus", "lookChange", "colorChange", "disabledChange", "onClick", "selectionChange", "selectedButtonChange"] }, { kind: "component", type: i2$2.AXButtonGroupItemComponent, selector: "ax-button-group-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
761
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i1$1.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "component", type: i2$1.AXButtonGroupComponent, selector: "ax-button-group", inputs: ["disabled", "color", "look", "fitParent", "selection"], outputs: ["onBlur", "onFocus", "lookChange", "colorChange", "disabledChange", "onClick", "selectionChange", "selectedButtonChange"] }, { kind: "component", type: i2$1.AXButtonGroupItemComponent, selector: "ax-button-group-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1057
762
  }
1058
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPIconChooserPopupComponent, decorators: [{
763
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserPopupComponent, decorators: [{
1059
764
  type: Component,
1060
765
  args: [{
1061
766
  template: `
@@ -1160,7 +865,7 @@ class AXPIconChooserWidgetEditComponent extends AXPValueWidgetComponent {
1160
865
  }
1161
866
  }
1162
867
  return value;
1163
- }, ...(ngDevMode ? [{ debugName: "computedValue" }] : []));
868
+ }, ...(ngDevMode ? [{ debugName: "computedValue" }] : /* istanbul ignore next */ []));
1164
869
  }
1165
870
  async openPopup() {
1166
871
  const result = await this.popupService.open(AXPIconChooserPopupComponent, {
@@ -1185,8 +890,8 @@ class AXPIconChooserWidgetEditComponent extends AXPValueWidgetComponent {
1185
890
  editIcon() {
1186
891
  this.openPopup();
1187
892
  }
1188
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPIconChooserWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1189
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPIconChooserWidgetEditComponent, isStandalone: true, selector: "ax-icon-chooser-edit", usesInheritance: true, ngImport: i0, template: `
893
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
894
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPIconChooserWidgetEditComponent, isStandalone: true, selector: "ax-icon-chooser-edit", usesInheritance: true, ngImport: i0, template: `
1190
895
  <div
1191
896
  class="ax-grid ax-grid-cols-[6rem_auto] ax-items-center ax-rounded-md ax-text-3xl ax-w-fit"
1192
897
  [class.ax-border]="getValue()"
@@ -1217,7 +922,7 @@ class AXPIconChooserWidgetEditComponent extends AXPValueWidgetComponent {
1217
922
  </div>
1218
923
  `, isInline: true, styles: [".icon-container{background-color:rgba(var(--ax-sys-color-primary-300),10%);background-image:linear-gradient(135deg,rgba(var(--ax-sys-color-primary-300),50%) 10%,transparent 0,transparent 50%,rgba(var(--ax-sys-color-primary-300),50%) 0,rgba(var(--ax-sys-color-primary-300),50%) 60%,transparent 0,transparent);background-size:7.5px 7.5px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1219
924
  }
1220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPIconChooserWidgetEditComponent, decorators: [{
925
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserWidgetEditComponent, decorators: [{
1221
926
  type: Component,
1222
927
  args: [{ selector: 'ax-icon-chooser-edit', template: `
1223
928
  <div
@@ -1259,7 +964,7 @@ var iconChooserEdit_component = /*#__PURE__*/Object.freeze({
1259
964
  const AXPIconChooserWidget = {
1260
965
  name: 'icon-chooser',
1261
966
  title: 'Icon Chooser',
1262
- icon: 'fa-solid fa-icons',
967
+ icon: 'fa-light fa-icons',
1263
968
  type: 'editor',
1264
969
  categories: AXP_WIDGETS_LAYOUT_CATEGORY,
1265
970
  properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
@@ -1268,10 +973,10 @@ const AXPIconChooserWidget = {
1268
973
  component: () => Promise.resolve().then(function () { return iconChooserEdit_component; }).then((c) => c.AXPIconChooserWidgetEditComponent),
1269
974
  },
1270
975
  column: {
1271
- component: () => import('./acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs').then((c) => c.AXPIconChooserWidgetColumnComponent),
976
+ component: () => import('./acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs').then((c) => c.AXPIconChooserWidgetColumnComponent),
1272
977
  },
1273
978
  view: {
1274
- component: () => import('./acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs').then((c) => c.AXPIconChooserWidgetViewComponent),
979
+ component: () => import('./acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs').then((c) => c.AXPIconChooserWidgetViewComponent),
1275
980
  },
1276
981
  },
1277
982
  };
@@ -1814,50 +1519,207 @@ function provideCustomIconStyleProvider(providerClass) {
1814
1519
  multi: true,
1815
1520
  };
1816
1521
  }
1817
- //#endregion
1522
+ //#endregion
1523
+
1524
+ class AXPFontSizeChooserWidgetComponent extends AXPValueWidgetComponent {
1525
+ constructor() {
1526
+ super(...arguments);
1527
+ this.sizes = signal(['small', 'medium', 'large', 'x-large'], ...(ngDevMode ? [{ debugName: "sizes" }] : /* istanbul ignore next */ []));
1528
+ this.selectedSize = signal(null, ...(ngDevMode ? [{ debugName: "selectedSize" }] : /* istanbul ignore next */ []));
1529
+ this.#eff = effect(() => {
1530
+ if (this.getValue()) {
1531
+ this.selectedSize.set(this.sizes().find((s) => s === this.getValue()) ?? this.sizes()[0]);
1532
+ }
1533
+ }, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
1534
+ }
1535
+ #eff;
1536
+ onSizeClick(size) {
1537
+ this.setValue(size);
1538
+ }
1539
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1540
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPFontSizeChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1541
+ @for (size of sizes(); track size) {
1542
+ <div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
1543
+ <div>
1544
+ <span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
1545
+ </div>
1546
+ </div>
1547
+ }
1548
+ `, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1549
+ }
1550
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, decorators: [{
1551
+ type: Component,
1552
+ args: [{ template: `
1553
+ @for (size of sizes(); track size) {
1554
+ <div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
1555
+ <div>
1556
+ <span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
1557
+ </div>
1558
+ </div>
1559
+ }
1560
+ `, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, AXSelectionCdkModule, AXTranslationModule], styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}\n"] }]
1561
+ }] });
1562
+
1563
+ var fontSizeChooserWidget_component = /*#__PURE__*/Object.freeze({
1564
+ __proto__: null,
1565
+ AXPFontSizeChooserWidgetComponent: AXPFontSizeChooserWidgetComponent
1566
+ });
1567
+
1568
+ const AXPFontSizeChooserWidget = {
1569
+ name: "font-size-chooser",
1570
+ title: "Font Size Chooser",
1571
+ icon: "fa-light fa-text-size",
1572
+ type: 'editor',
1573
+ categories: AXP_WIDGETS_LAYOUT_CATEGORY,
1574
+ properties: [
1575
+ AXP_NAME_PROPERTY,
1576
+ AXP_DATA_PATH_PROPERTY,
1577
+ AXP_DISABLED_PROPERTY,
1578
+ ],
1579
+ components: {
1580
+ edit: {
1581
+ component: () => Promise.resolve().then(function () { return fontSizeChooserWidget_component; }).then((c) => c.AXPFontSizeChooserWidgetComponent),
1582
+ },
1583
+ }
1584
+ };
1585
+
1586
+ class AXPFontStyleChooserWidgetComponent extends AXPValueWidgetComponent {
1587
+ constructor() {
1588
+ super(...arguments);
1589
+ this.fonts = signal([
1590
+ { id: 'system-ui', title: 'Default' },
1591
+ { id: 'serif', title: 'Serif' },
1592
+ { id: 'sans-serif', title: 'Sans-serif' },
1593
+ { id: 'monospace', title: 'Monospace' },
1594
+ { id: 'arial', title: 'Arial' },
1595
+ { id: 'verdana', title: 'Verdana' },
1596
+ { id: 'tahoma', title: 'Tahoma' },
1597
+ { id: 'times-new-roman', title: 'Times New Roman' },
1598
+ { id: 'georgia', title: 'Georgia' },
1599
+ { id: 'helvetica', title: 'Helvetica' },
1600
+ { id: 'calibri', title: 'Calibri' },
1601
+ { id: 'cursive', title: 'Cursive' },
1602
+ { id: 'vazirmatn', title: 'Vazir وزیر' },
1603
+ ], ...(ngDevMode ? [{ debugName: "fonts" }] : /* istanbul ignore next */ []));
1604
+ this.selectedFont = signal(null, ...(ngDevMode ? [{ debugName: "selectedFont" }] : /* istanbul ignore next */ []));
1605
+ this.#eff = effect(() => {
1606
+ if (this.getValue()) {
1607
+ this.selectedFont.set(this.fonts().find((f) => f.id === this.getValue()) ?? this.fonts()[0]);
1608
+ }
1609
+ }, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
1610
+ }
1611
+ #eff;
1612
+ onFontClick(font) {
1613
+ this.setValue(font.id);
1614
+ }
1615
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1616
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPFontStyleChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1617
+ @for (font of fonts(); track font.id) {
1618
+ <div
1619
+ (click)="onFontClick(font)"
1620
+ [class.--selected]="font.id === selectedFont()?.id"
1621
+ [style.font-family]="font.id"
1622
+ >
1623
+ <div>
1624
+ <span>{{ font.title }}</span>
1625
+ </div>
1626
+ </div>
1627
+ }
1628
+ `, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1629
+ }
1630
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, decorators: [{
1631
+ type: Component,
1632
+ args: [{ template: `
1633
+ @for (font of fonts(); track font.id) {
1634
+ <div
1635
+ (click)="onFontClick(font)"
1636
+ [class.--selected]="font.id === selectedFont()?.id"
1637
+ [style.font-family]="font.id"
1638
+ >
1639
+ <div>
1640
+ <span>{{ font.title }}</span>
1641
+ </div>
1642
+ </div>
1643
+ }
1644
+ `, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, AXSelectionCdkModule], styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}\n"] }]
1645
+ }] });
1646
+
1647
+ var fontStyleChooserWidget_component = /*#__PURE__*/Object.freeze({
1648
+ __proto__: null,
1649
+ AXPFontStyleChooserWidgetComponent: AXPFontStyleChooserWidgetComponent
1650
+ });
1651
+
1652
+ const AXPFontStyleChooserWidget = {
1653
+ name: "font-style-chooser",
1654
+ title: "Font Style Chooser",
1655
+ icon: "fa-light fa-font",
1656
+ type: 'editor',
1657
+ categories: AXP_WIDGETS_LAYOUT_CATEGORY,
1658
+ properties: [
1659
+ AXP_NAME_PROPERTY,
1660
+ AXP_DATA_PATH_PROPERTY,
1661
+ AXP_DISABLED_PROPERTY,
1662
+ ],
1663
+ components: {
1664
+ edit: {
1665
+ component: () => Promise.resolve().then(function () { return fontStyleChooserWidget_component; }).then((c) => c.AXPFontStyleChooserWidgetComponent),
1666
+ },
1667
+ }
1668
+ };
1818
1669
 
1819
1670
  class AXPMenuOrientationChooserWidgetComponent extends AXPValueWidgetComponent {
1820
1671
  constructor() {
1821
1672
  super(...arguments);
1822
- this.orientations = signal([
1823
- { id: 'vertical', icon: 'fa-regular fa-square-ellipsis-vertical' },
1824
- { id: 'horizontal', icon: 'fa-regular fa-square-ellipsis' },
1825
- ], ...(ngDevMode ? [{ debugName: "orientations" }] : []));
1826
- this.selectedOrientation = signal(null, ...(ngDevMode ? [{ debugName: "selectedOrientation" }] : []));
1673
+ this.orientations = computed(() => this.options()['chooser'] === 'vertical-mode'
1674
+ ? [
1675
+ { id: 'compact', image: '/assets/images/menu-mode/compact.svg' },
1676
+ { id: 'full', image: '/assets/images/menu-mode/full.svg' },
1677
+ ]
1678
+ : [
1679
+ { id: 'vertical', icon: 'fa-regular fa-square-ellipsis-vertical' },
1680
+ { id: 'horizontal', icon: 'fa-regular fa-square-ellipsis' },
1681
+ ], ...(ngDevMode ? [{ debugName: "orientations" }] : /* istanbul ignore next */ []));
1682
+ this.selectedOrientation = signal(null, ...(ngDevMode ? [{ debugName: "selectedOrientation" }] : /* istanbul ignore next */ []));
1827
1683
  this.#eff = effect(() => {
1828
- if (this.getValue()) {
1829
- this.selectedOrientation.set(this.orientations().find((o) => o.id === this.getValue()) ?? this.orientations()[0]);
1684
+ const options = this.orientations();
1685
+ const value = this.getValue();
1686
+ if (value) {
1687
+ this.selectedOrientation.set(options.find((o) => o.id === value) ?? options[0]);
1830
1688
  }
1831
- }, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
1689
+ }, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
1832
1690
  }
1833
1691
  #eff;
1834
1692
  onOrientationClick(orientation) {
1835
1693
  this.setValue(orientation.id);
1836
1694
  }
1837
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMenuOrientationChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1838
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPMenuOrientationChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1695
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuOrientationChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1696
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPMenuOrientationChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1839
1697
  @for (orientation of orientations(); track orientation.id) {
1840
1698
  <div (click)="onOrientationClick(orientation)" [class.--selected]="orientation.id === selectedOrientation()?.id">
1841
- <div>
1699
+ @if (orientation.image) {
1700
+ <img [src]="orientation.image" alt="" />
1701
+ } @else {
1842
1702
  <i [class]="orientation.icon"></i>
1843
- </div>
1844
- <span>{{ '@layout:terms.menu-modes.' + orientation.id | translate | async }}</span>
1703
+ <span>{{ '@layout:terms.menu-modes.' + orientation.id | translate | async }}</span>
1704
+ }
1845
1705
  </div>
1846
1706
  }
1847
- `, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{padding-top:.25rem!important;padding-bottom:.25rem!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1707
+ `, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>div img{height:2rem;width:auto}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{padding-top:.25rem!important;padding-bottom:.25rem!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1848
1708
  }
1849
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMenuOrientationChooserWidgetComponent, decorators: [{
1709
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuOrientationChooserWidgetComponent, decorators: [{
1850
1710
  type: Component,
1851
1711
  args: [{ template: `
1852
1712
  @for (orientation of orientations(); track orientation.id) {
1853
1713
  <div (click)="onOrientationClick(orientation)" [class.--selected]="orientation.id === selectedOrientation()?.id">
1854
- <div>
1714
+ @if (orientation.image) {
1715
+ <img [src]="orientation.image" alt="" />
1716
+ } @else {
1855
1717
  <i [class]="orientation.icon"></i>
1856
- </div>
1857
- <span>{{ '@layout:terms.menu-modes.' + orientation.id | translate | async }}</span>
1718
+ <span>{{ '@layout:terms.menu-modes.' + orientation.id | translate | async }}</span>
1719
+ }
1858
1720
  </div>
1859
1721
  }
1860
- `, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, AXSelectionCdkModule, AXTranslationModule], styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{padding-top:.25rem!important;padding-bottom:.25rem!important}\n"] }]
1722
+ `, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, AXSelectionCdkModule, AXTranslationModule], styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>div img{height:2rem;width:auto}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{padding-top:.25rem!important;padding-bottom:.25rem!important}\n"] }]
1861
1723
  }] });
1862
1724
 
1863
1725
  var menuOrientationChooserWidget_component = /*#__PURE__*/Object.freeze({
@@ -1883,6 +1745,318 @@ const AXPMenuOrientationChooserWidget = {
1883
1745
  }
1884
1746
  };
1885
1747
 
1748
+ //#endregion
1749
+ //#region ---- Color utilities ----
1750
+ function hexToRgb(hex) {
1751
+ const normalized = hex.trim().replace(/^#/, '');
1752
+ const full = normalized.length === 3
1753
+ ? normalized
1754
+ .split('')
1755
+ .map((c) => c + c)
1756
+ .join('')
1757
+ : normalized;
1758
+ return [
1759
+ parseInt(full.slice(0, 2), 16),
1760
+ parseInt(full.slice(2, 4), 16),
1761
+ parseInt(full.slice(4, 6), 16),
1762
+ ];
1763
+ }
1764
+ function relativeLuminance(hex) {
1765
+ const [r, g, b] = hexToRgb(hex).map((c) => {
1766
+ const s = c / 255;
1767
+ return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
1768
+ });
1769
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
1770
+ }
1771
+ function contrastForeground(backgroundHex) {
1772
+ return relativeLuminance(backgroundHex) > 0.55 ? '#171717' : '#ffffff';
1773
+ }
1774
+ function titleCase(str) {
1775
+ return str.replace(/-/g, ' ').replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.slice(1).toLowerCase());
1776
+ }
1777
+ //#endregion
1778
+ //#region ---- Surface variants (palette-synchronized) ----
1779
+ /**
1780
+ * Seven tonal steps per semantic color. Backgrounds are mixed in RGB using the **same palette’s**
1781
+ * canvas `light` and `dark` as poles so swatches stay aligned with `AXPThemePaletteProvider` data.
1782
+ */
1783
+ const SURFACE_VARIANTS = ['lightest', 'lighter', 'light', 'surface', 'dark', 'darker', 'darkest'];
1784
+ function styleTitlePrefix(style) {
1785
+ const accentMatch = /^accent(\d+)$/.exec(style);
1786
+ if (accentMatch) {
1787
+ return `Accent ${accentMatch[1]}`;
1788
+ }
1789
+ return titleCase(style);
1790
+ }
1791
+ function surfaceVariantTitle(style, variant) {
1792
+ if (variant === 'surface') {
1793
+ return styleTitlePrefix(style);
1794
+ }
1795
+ return `${styleTitlePrefix(style)} ${titleCase(variant)}`;
1796
+ }
1797
+ /** Tailwind utility triplet stored by theme-color-chooser and outcome display rules. */
1798
+ function buildThemeSurfaceColorTriplet(styleKey, variant) {
1799
+ return {
1800
+ color: `ax-text-${styleKey}-on-${variant}`,
1801
+ background: `ax-bg-${styleKey}-${variant}`,
1802
+ border: `ax-border-${styleKey}-${variant}`,
1803
+ };
1804
+ }
1805
+ /** Ordered `"foreground background border"` string for theme-color-chooser values. */
1806
+ function buildThemeSurfaceColorValue(styleKey, variant = 'lightest') {
1807
+ const triplet = buildThemeSurfaceColorTriplet(styleKey, variant);
1808
+ return `${triplet.color} ${triplet.background} ${triplet.border}`;
1809
+ }
1810
+ function pushVariantScale(entries, styleKey, _baseHex, _canvas) {
1811
+ for (const variant of SURFACE_VARIANTS) {
1812
+ const name = `${styleKey}-${variant}`;
1813
+ entries.push({
1814
+ title: surfaceVariantTitle(styleKey, variant),
1815
+ name,
1816
+ ...buildThemeSurfaceColorTriplet(styleKey, variant),
1817
+ });
1818
+ }
1819
+ }
1820
+ function pushFlatSwatch(entries, title, name, hex) {
1821
+ const color = contrastForeground(hex);
1822
+ entries.push({ title, name, color, background: hex, border: hex });
1823
+ }
1824
+ /**
1825
+ * Builds the full chooser list from a single `AXPThemePalette` (colors object only).
1826
+ */
1827
+ function buildColorsFromThemePalette(palette) {
1828
+ const colors = palette.colors;
1829
+ const canvas = { light: colors.light, dark: colors.dark };
1830
+ const entries = [];
1831
+ const core = ['primary', 'secondary', 'success', 'warning', 'danger'];
1832
+ for (const key of core) {
1833
+ pushVariantScale(entries, key, colors[key], canvas);
1834
+ }
1835
+ const neutral = colors.neutral;
1836
+ if (neutral) {
1837
+ pushVariantScale(entries, 'neutral', neutral, canvas);
1838
+ }
1839
+ colors.accents.forEach((hex, index) => {
1840
+ pushVariantScale(entries, `accent${index + 1}`, hex, canvas);
1841
+ });
1842
+ pushFlatSwatch(entries, 'Canvas Light', 'canvas-light', colors.light);
1843
+ pushFlatSwatch(entries, 'Canvas Dark', 'canvas-dark', colors.dark);
1844
+ return entries;
1845
+ }
1846
+ //#endregion
1847
+ //#region ---- Service ----
1848
+ class AXPColorChooserService {
1849
+ constructor() {
1850
+ this.themeStore = inject(AXPLayoutThemeService);
1851
+ this.palettePromise = inject(AXP_THEME_PALETTE_PROVIDER);
1852
+ this.cacheKey = null;
1853
+ this.cache = null;
1854
+ }
1855
+ async getColors() {
1856
+ const paletteName = this.themeStore.currentPalette();
1857
+ if (this.cache && this.cacheKey === paletteName) {
1858
+ return this.cache;
1859
+ }
1860
+ const provider = await this.palettePromise;
1861
+ const list = await provider.getList();
1862
+ const palette = list.find((p) => p.name === paletteName) ?? list.find((p) => p.name === 'default') ?? list[0] ?? null;
1863
+ const colors = palette ? buildColorsFromThemePalette(palette) : [];
1864
+ this.cacheKey = paletteName;
1865
+ this.cache = colors;
1866
+ return colors;
1867
+ }
1868
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1869
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserService, providedIn: 'root' }); }
1870
+ }
1871
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserService, decorators: [{
1872
+ type: Injectable,
1873
+ args: [{
1874
+ providedIn: 'root',
1875
+ }]
1876
+ }] });
1877
+
1878
+ class AXPColorChooserWidgetEditComponent extends AXPValueWidgetComponent {
1879
+ constructor() {
1880
+ super(...arguments);
1881
+ this.colorService = inject(AXPColorChooserService);
1882
+ this.colors = signal([], ...(ngDevMode ? [{ debugName: "colors" }] : /* istanbul ignore next */ []));
1883
+ this.placeholder = computed(() => this.options()['placeholder'] ?? '', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
1884
+ this.selectedColor = computed(() => {
1885
+ const value = this.getValue();
1886
+ const fallbackName = () => this.colors()[0]?.name;
1887
+ if (!value) {
1888
+ return fallbackName();
1889
+ }
1890
+ if (typeof value === 'string') {
1891
+ const parsed = this.parseStringValue(value);
1892
+ if (parsed) {
1893
+ return parsed;
1894
+ }
1895
+ return fallbackName();
1896
+ }
1897
+ return value.name;
1898
+ }, ...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
1899
+ }
1900
+ async ngOnInit() {
1901
+ const allColors = await this.colorService.getColors();
1902
+ this.colors.set(allColors);
1903
+ super.ngOnInit();
1904
+ }
1905
+ handleValueChange(event) {
1906
+ if (event.isUserInteraction) {
1907
+ if (!event.value) {
1908
+ this.setValue(undefined);
1909
+ return;
1910
+ }
1911
+ const color = event.component.selectedItems[0];
1912
+ // Always store as ordered string: "color background border"
1913
+ const stringValue = `${color.color} ${color.background} ${color.border}`;
1914
+ this.setValue(stringValue);
1915
+ }
1916
+ }
1917
+ isHexSwatch(color) {
1918
+ return color.background.startsWith('#');
1919
+ }
1920
+ parseStringValue(value) {
1921
+ const parts = value.trim().split(/\s+/);
1922
+ if (parts.length !== 3) {
1923
+ return null;
1924
+ }
1925
+ const [color, background, border] = parts;
1926
+ const exactMatch = this.colors().find((entry) => entry.color === color && entry.background === background && entry.border === border);
1927
+ if (exactMatch) {
1928
+ return exactMatch.name;
1929
+ }
1930
+ const backgroundMatch = /^ax-bg-(.+)-(.+)$/.exec(background);
1931
+ if (backgroundMatch) {
1932
+ const name = `${backgroundMatch[1]}-${backgroundMatch[2]}`;
1933
+ if (this.colors().some((entry) => entry.name === name)) {
1934
+ return name;
1935
+ }
1936
+ }
1937
+ return null;
1938
+ }
1939
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1940
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPColorChooserWidgetEditComponent, isStandalone: true, selector: "ax-color-chooser-widget", host: { classAttribute: "ax-block ax-flex-1 ax-w-full" }, usesInheritance: true, ngImport: i0, template: `
1941
+ <ax-form [messageStyle]="'float'" [updateOn]="'change'">
1942
+ <ax-form-field>
1943
+ <ax-select-box
1944
+ [dataSource]="colors()"
1945
+ textField="title"
1946
+ valueField="name"
1947
+ [placeholder]="placeholder()"
1948
+ [itemTemplate]="customItemTemplate"
1949
+ [ngModel]="selectedColor()"
1950
+ (onValueChanged)="handleValueChange($event)"
1951
+ [selectedTemplate]="customItemTemplate"
1952
+ >
1953
+ <ng-template #customItemTemplate let-item>
1954
+ <div class="ax-flex ax-items-center ax-gap-2 ax-p-2">
1955
+ @if (isHexSwatch(item.data)) {
1956
+ <div
1957
+ class="ax-w-6 ax-h-6 ax-rounded ax-flex ax-items-center ax-justify-center ax-border ax-border-solid"
1958
+ [style.background-color]="item.data.background"
1959
+ [style.border-color]="item.data.border"
1960
+ [style.color]="item.data.color"
1961
+ >
1962
+ <span>Aa</span>
1963
+ </div>
1964
+ } @else {
1965
+ <div
1966
+ class="ax-w-6 ax-h-6 ax-rounded ax-flex ax-items-center ax-justify-center ax-border ax-border-dashed ax-border-black dark:ax-border-white"
1967
+ [class]="item.data.background"
1968
+ >
1969
+ <span [class]="item.data.color">Aa</span>
1970
+ </div>
1971
+ }
1972
+ <span>{{ item.data.title }}</span>
1973
+ </div>
1974
+ </ng-template>
1975
+ <ax-search-box look="fill"></ax-search-box>
1976
+ <ax-validation-rule message="field can't be empty" rule="required"></ax-validation-rule>
1977
+ </ax-select-box>
1978
+ </ax-form-field>
1979
+ </ax-form>
1980
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i1$2.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$2.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i2$2.AXFormComponent, selector: "ax-form", inputs: ["disabled", "readonly", "labelMode", "look", "messageStyle", "updateOn", "inUserInteractionActive"], outputs: ["onValidate", "updateOnChange"] }, { kind: "directive", type: i2$2.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i1$1.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1981
+ }
1982
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserWidgetEditComponent, decorators: [{
1983
+ type: Component,
1984
+ args: [{
1985
+ selector: 'ax-color-chooser-widget',
1986
+ template: `
1987
+ <ax-form [messageStyle]="'float'" [updateOn]="'change'">
1988
+ <ax-form-field>
1989
+ <ax-select-box
1990
+ [dataSource]="colors()"
1991
+ textField="title"
1992
+ valueField="name"
1993
+ [placeholder]="placeholder()"
1994
+ [itemTemplate]="customItemTemplate"
1995
+ [ngModel]="selectedColor()"
1996
+ (onValueChanged)="handleValueChange($event)"
1997
+ [selectedTemplate]="customItemTemplate"
1998
+ >
1999
+ <ng-template #customItemTemplate let-item>
2000
+ <div class="ax-flex ax-items-center ax-gap-2 ax-p-2">
2001
+ @if (isHexSwatch(item.data)) {
2002
+ <div
2003
+ class="ax-w-6 ax-h-6 ax-rounded ax-flex ax-items-center ax-justify-center ax-border ax-border-solid"
2004
+ [style.background-color]="item.data.background"
2005
+ [style.border-color]="item.data.border"
2006
+ [style.color]="item.data.color"
2007
+ >
2008
+ <span>Aa</span>
2009
+ </div>
2010
+ } @else {
2011
+ <div
2012
+ class="ax-w-6 ax-h-6 ax-rounded ax-flex ax-items-center ax-justify-center ax-border ax-border-dashed ax-border-black dark:ax-border-white"
2013
+ [class]="item.data.background"
2014
+ >
2015
+ <span [class]="item.data.color">Aa</span>
2016
+ </div>
2017
+ }
2018
+ <span>{{ item.data.title }}</span>
2019
+ </div>
2020
+ </ng-template>
2021
+ <ax-search-box look="fill"></ax-search-box>
2022
+ <ax-validation-rule message="field can't be empty" rule="required"></ax-validation-rule>
2023
+ </ax-select-box>
2024
+ </ax-form-field>
2025
+ </ax-form>
2026
+ `,
2027
+ host: {
2028
+ class: 'ax-block ax-flex-1 ax-w-full',
2029
+ },
2030
+ imports: [AXSelectBoxModule, AXFormModule, CommonModule, AXSearchBoxModule, AXButtonModule, FormsModule],
2031
+ changeDetection: ChangeDetectionStrategy.OnPush,
2032
+ }]
2033
+ }] });
2034
+
2035
+ var themeColorChooserEdit_component = /*#__PURE__*/Object.freeze({
2036
+ __proto__: null,
2037
+ AXPColorChooserWidgetEditComponent: AXPColorChooserWidgetEditComponent
2038
+ });
2039
+
2040
+ const AXPThemeColorChooserWidgetConfig = {
2041
+ name: 'theme-color-chooser',
2042
+ title: 'Theme Color Chooser',
2043
+ icon: 'fa-light fa-palette',
2044
+ type: 'editor',
2045
+ categories: AXP_WIDGETS_LAYOUT_CATEGORY,
2046
+ properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
2047
+ components: {
2048
+ edit: {
2049
+ component: () => Promise.resolve().then(function () { return themeColorChooserEdit_component; }).then((c) => c.AXPColorChooserWidgetEditComponent),
2050
+ },
2051
+ column: {
2052
+ component: () => import('./acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs').then((c) => c.AXPColorChooserWidgetColumnComponent),
2053
+ },
2054
+ view: {
2055
+ component: () => import('./acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs').then((c) => c.AXPColorChooserWidgetViewComponent),
2056
+ },
2057
+ },
2058
+ };
2059
+
1886
2060
  class AXPThemeModeChooserWidgetComponent extends AXPValueWidgetComponent {
1887
2061
  constructor() {
1888
2062
  super(...arguments);
@@ -1890,20 +2064,20 @@ class AXPThemeModeChooserWidgetComponent extends AXPValueWidgetComponent {
1890
2064
  { id: AXPThemeMode.Light, icon: 'fa-light fa-brightness' },
1891
2065
  { id: AXPThemeMode.Dark, icon: 'fa-light fa-moon' },
1892
2066
  { id: AXPThemeMode.System, icon: 'fa-light fa-desktop' },
1893
- ], ...(ngDevMode ? [{ debugName: "modes" }] : []));
1894
- this.selectedMode = signal(null, ...(ngDevMode ? [{ debugName: "selectedMode" }] : []));
2067
+ ], ...(ngDevMode ? [{ debugName: "modes" }] : /* istanbul ignore next */ []));
2068
+ this.selectedMode = signal(null, ...(ngDevMode ? [{ debugName: "selectedMode" }] : /* istanbul ignore next */ []));
1895
2069
  this.#eff = effect(() => {
1896
2070
  if (this.getValue()) {
1897
2071
  this.selectedMode.set(this.modes().find((m) => m.id === this.getValue()) ?? this.modes()[0]);
1898
2072
  }
1899
- }, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
2073
+ }, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
1900
2074
  }
1901
2075
  #eff;
1902
2076
  onModeClick(mode) {
1903
2077
  this.setValue(mode.id);
1904
2078
  }
1905
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPThemeModeChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1906
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPThemeModeChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
2079
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeModeChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2080
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPThemeModeChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1907
2081
  @for (mode of modes(); track mode.id) {
1908
2082
  <div (click)="onModeClick(mode)" [class.--selected]="mode.id === selectedMode()?.id">
1909
2083
  <div>
@@ -1914,7 +2088,7 @@ class AXPThemeModeChooserWidgetComponent extends AXPValueWidgetComponent {
1914
2088
  }
1915
2089
  `, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{padding-top:.25rem!important;padding-bottom:.25rem!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1916
2090
  }
1917
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPThemeModeChooserWidgetComponent, decorators: [{
2091
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeModeChooserWidgetComponent, decorators: [{
1918
2092
  type: Component,
1919
2093
  args: [{ template: `
1920
2094
  @for (mode of modes(); track mode.id) {
@@ -1936,7 +2110,7 @@ var themeModeChooserWidget_component = /*#__PURE__*/Object.freeze({
1936
2110
  const AXPThemeModeChooserWidget = {
1937
2111
  name: "theme-mode-chooser",
1938
2112
  title: "Theme Mode Chooser",
1939
- icon: "fa-solid fa-square",
2113
+ icon: "fa-light fa-square",
1940
2114
  type: 'editor',
1941
2115
  categories: AXP_WIDGETS_LAYOUT_CATEGORY,
1942
2116
  properties: [
@@ -1955,15 +2129,15 @@ class AXPThemePaletteChooserWidgetComponent extends AXPValueWidgetComponent {
1955
2129
  constructor() {
1956
2130
  super(...arguments);
1957
2131
  this.paletteService = inject(AXP_THEME_PALETTE_PROVIDER);
1958
- this.palettes = signal([], ...(ngDevMode ? [{ debugName: "palettes" }] : []));
1959
- this.selectedPalette = signal(null, ...(ngDevMode ? [{ debugName: "selectedPalette" }] : []));
2132
+ this.palettes = signal([], ...(ngDevMode ? [{ debugName: "palettes" }] : /* istanbul ignore next */ []));
2133
+ this.selectedPalette = signal(null, ...(ngDevMode ? [{ debugName: "selectedPalette" }] : /* istanbul ignore next */ []));
1960
2134
  this.#eff = effect(() => {
1961
2135
  if (this.getValue()) {
1962
2136
  this.selectedPalette.set(this.palettes().find((p) => p.name === this.getValue()) ??
1963
2137
  this.palettes().find((p) => p.name === 'default') ??
1964
2138
  this.palettes()[0]);
1965
2139
  }
1966
- }, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
2140
+ }, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
1967
2141
  }
1968
2142
  #eff;
1969
2143
  async ngOnInit() {
@@ -1974,8 +2148,8 @@ class AXPThemePaletteChooserWidgetComponent extends AXPValueWidgetComponent {
1974
2148
  onPaletteClick(palette) {
1975
2149
  this.setValue(palette.name);
1976
2150
  }
1977
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPThemePaletteChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1978
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPThemePaletteChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
2151
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemePaletteChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2152
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPThemePaletteChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1979
2153
  @for (palette of palettes(); track palette.name) {
1980
2154
  <div (click)="onPaletteClick(palette)" [class.--selected]="palette.name === selectedPalette()?.name">
1981
2155
  <span>{{ palette.title }}</span>
@@ -1986,9 +2160,9 @@ class AXPThemePaletteChooserWidgetComponent extends AXPValueWidgetComponent {
1986
2160
  </div>
1987
2161
  </div>
1988
2162
  }
1989
- `, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{height:3rem;min-width:100%}@media (min-width: 768px){:host>div{min-width:16rem}}:host>div>div{position:relative;height:100%;width:fit-content}:host>div>div div{position:absolute;height:2rem;width:2rem;border-radius:9999px;border-width:1px;border-color:#ffffff80;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2163
+ `, isInline: true, styles: [":host{display:flex;width:100%;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{height:3rem;min-width:100%}@media(min-width:768px){:host>div{min-width:16rem}}:host>div>div{position:relative;height:100%;width:fit-content}:host>div>div div{position:absolute;height:2rem;width:2rem;border-radius:9999px;border-width:1px;border-color:#ffffff80;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1990
2164
  }
1991
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPThemePaletteChooserWidgetComponent, decorators: [{
2165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemePaletteChooserWidgetComponent, decorators: [{
1992
2166
  type: Component,
1993
2167
  args: [{ template: `
1994
2168
  @for (palette of palettes(); track palette.name) {
@@ -2001,7 +2175,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2001
2175
  </div>
2002
2176
  </div>
2003
2177
  }
2004
- `, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, AXSelectionCdkModule], styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{height:3rem;min-width:100%}@media (min-width: 768px){:host>div{min-width:16rem}}:host>div>div{position:relative;height:100%;width:fit-content}:host>div>div div{position:absolute;height:2rem;width:2rem;border-radius:9999px;border-width:1px;border-color:#ffffff80;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}\n"] }]
2178
+ `, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, AXSelectionCdkModule], styles: [":host{display:flex;width:100%;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{height:3rem;min-width:100%}@media(min-width:768px){:host>div{min-width:16rem}}:host>div>div{position:relative;height:100%;width:fit-content}:host>div>div div{position:absolute;height:2rem;width:2rem;border-radius:9999px;border-width:1px;border-color:#ffffff80;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}\n"] }]
2005
2179
  }] });
2006
2180
 
2007
2181
  var themePaletteChooserWidget_component = /*#__PURE__*/Object.freeze({
@@ -2012,7 +2186,7 @@ var themePaletteChooserWidget_component = /*#__PURE__*/Object.freeze({
2012
2186
  const AXPThemePaletteChooserWidget = {
2013
2187
  name: "theme-palette-chooser",
2014
2188
  title: "Theme Palette Chooser",
2015
- icon: "fa-solid fa-square",
2189
+ icon: "fa-light fa-square",
2016
2190
  type: 'editor',
2017
2191
  categories: AXP_WIDGETS_LAYOUT_CATEGORY,
2018
2192
  properties: [
@@ -2027,26 +2201,49 @@ const AXPThemePaletteChooserWidget = {
2027
2201
  }
2028
2202
  };
2029
2203
 
2204
+ //#endregion
2205
+ //#region ---- Theme Widgets Provider ----
2206
+ const WIDGETS = [
2207
+ AXPThemePaletteChooserWidget,
2208
+ AXPThemeModeChooserWidget,
2209
+ AXPMenuOrientationChooserWidget,
2210
+ AXPFontSizeChooserWidget,
2211
+ AXPFontStyleChooserWidget,
2212
+ AXPIconChooserWidget,
2213
+ AXPThemeColorChooserWidgetConfig,
2214
+ ];
2215
+ class AXPThemesSharedWidgetsProvider {
2216
+ getWidgets() {
2217
+ return WIDGETS;
2218
+ }
2219
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedWidgetsProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2220
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedWidgetsProvider }); }
2221
+ }
2222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedWidgetsProvider, decorators: [{
2223
+ type: Injectable
2224
+ }] });
2225
+
2030
2226
  class AXPThemesSharedModule {
2031
2227
  constructor(appInitService, injector) {
2032
2228
  const service = injector.get(AXPLayoutThemeService);
2033
2229
  appInitService.registerTask({
2034
2230
  name: 'layout-theme',
2035
- statusText: 'Applying layout theme settings ...',
2231
+ statusText: '@layout:app-startup.applying-theme-settings',
2036
2232
  priority: 100,
2037
2233
  run: async () => {
2038
2234
  await service.loadSettings();
2039
2235
  },
2040
2236
  });
2041
2237
  }
2042
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPThemesSharedModule, deps: [{ token: i1$2.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
2043
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPThemesSharedModule, imports: [i2$3.AXPComponentSlotModule, i3$1.AXPWidgetCoreModule] }); }
2044
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPThemesSharedModule, providers: [
2238
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedModule, deps: [{ token: i1$3.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
2239
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedModule, imports: [i1$3.AXPComponentSlotModule, AXPWidgetCoreModule] }); }
2240
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedModule, providers: [
2241
+ { provide: AXP_WIDGET_DEFINITION_PROVIDER, useClass: AXPThemesSharedWidgetsProvider, multi: true },
2045
2242
  {
2046
2243
  provide: AXP_SETTING_DEFINITION_PROVIDER,
2047
2244
  useFactory: async () => {
2048
2245
  const injector = inject(Injector);
2049
- const provider = (await import('./acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs')).AXPThemeSettingProvider;
2246
+ const provider = (await import('./acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs')).AXPThemeSettingProvider;
2050
2247
  return new provider(injector);
2051
2248
  },
2052
2249
  multi: true,
@@ -2061,19 +2258,9 @@ class AXPThemesSharedModule {
2061
2258
  },
2062
2259
  ],
2063
2260
  }),
2064
- AXPWidgetCoreModule.forChild({
2065
- widgets: [
2066
- AXPThemePaletteChooserWidget,
2067
- AXPThemeModeChooserWidget,
2068
- AXPMenuOrientationChooserWidget,
2069
- AXPFontSizeChooserWidget,
2070
- AXPFontStyleChooserWidget,
2071
- AXPIconChooserWidget,
2072
- AXPThemeColorChooserWidgetConfig,
2073
- ],
2074
- })] }); }
2261
+ AXPWidgetCoreModule] }); }
2075
2262
  }
2076
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPThemesSharedModule, decorators: [{
2263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedModule, decorators: [{
2077
2264
  type: NgModule,
2078
2265
  args: [{
2079
2266
  imports: [
@@ -2086,26 +2273,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2086
2273
  },
2087
2274
  ],
2088
2275
  }),
2089
- AXPWidgetCoreModule.forChild({
2090
- widgets: [
2091
- AXPThemePaletteChooserWidget,
2092
- AXPThemeModeChooserWidget,
2093
- AXPMenuOrientationChooserWidget,
2094
- AXPFontSizeChooserWidget,
2095
- AXPFontStyleChooserWidget,
2096
- AXPIconChooserWidget,
2097
- AXPThemeColorChooserWidgetConfig,
2098
- ],
2099
- }),
2276
+ AXPWidgetCoreModule,
2100
2277
  ],
2101
2278
  exports: [],
2102
2279
  declarations: [],
2103
2280
  providers: [
2281
+ { provide: AXP_WIDGET_DEFINITION_PROVIDER, useClass: AXPThemesSharedWidgetsProvider, multi: true },
2104
2282
  {
2105
2283
  provide: AXP_SETTING_DEFINITION_PROVIDER,
2106
2284
  useFactory: async () => {
2107
2285
  const injector = inject(Injector);
2108
- const provider = (await import('./acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs')).AXPThemeSettingProvider;
2286
+ const provider = (await import('./acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs')).AXPThemeSettingProvider;
2109
2287
  return new provider(injector);
2110
2288
  },
2111
2289
  multi: true,
@@ -2113,11 +2291,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2113
2291
  ...provideDefaultIconChooser(),
2114
2292
  ],
2115
2293
  }]
2116
- }], ctorParameters: () => [{ type: i1$2.AXPAppStartUpService }, { type: i0.Injector }] });
2294
+ }], ctorParameters: () => [{ type: i1$3.AXPAppStartUpService }, { type: i0.Injector }] });
2117
2295
 
2118
2296
  /**
2119
2297
  * Generated bundle index. Do not edit.
2120
2298
  */
2121
2299
 
2122
- export { AXPLayoutThemeService, AXPMenuOrientation, AXPSideMenuState, AXPThemeLayoutSetting, AXPThemeMode, AXPThemePaletteProviderDefault, AXPThemeSlotComponent, AXPThemesSharedModule, AXP_THEME_PALETTE_PROVIDER };
2300
+ export { AXPLayoutThemeService, AXPMenuOrientation, AXPMenuVerticalMode, AXPSideMenuState, AXPThemeLayoutSetting, AXPThemeMode, AXPThemePaletteProviderDefault, AXPThemeSlotComponent, AXPThemesSharedModule, AXP_SIDE_MENU_COMPACT_WIDTH, AXP_SIDE_MENU_FULL_DEFAULT_WIDTH, AXP_THEME_PALETTE_PROVIDER };
2123
2301
  //# sourceMappingURL=acorex-platform-themes-shared.mjs.map