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

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 (133) hide show
  1. package/contracts/README.md +3 -0
  2. package/fesm2022/acorex-platform-auth.mjs +201 -81
  3. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  4. package/fesm2022/acorex-platform-common-common-settings.provider-Ytey9uhY.mjs +177 -0
  5. package/fesm2022/acorex-platform-common-common-settings.provider-Ytey9uhY.mjs.map +1 -0
  6. package/fesm2022/acorex-platform-common.mjs +4490 -880
  7. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  8. package/fesm2022/acorex-platform-contracts.mjs +38 -0
  9. package/fesm2022/acorex-platform-contracts.mjs.map +1 -0
  10. package/fesm2022/acorex-platform-core.mjs +2612 -667
  11. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  12. package/fesm2022/acorex-platform-domain.mjs +557 -826
  13. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  14. package/fesm2022/acorex-platform-layout-builder.mjs +1255 -209
  15. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  16. package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs +121 -0
  17. package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +1 -0
  18. package/fesm2022/acorex-platform-layout-components.mjs +6493 -1920
  19. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  20. package/fesm2022/acorex-platform-layout-designer.mjs +612 -287
  21. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  22. package/fesm2022/acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs +376 -0
  23. package/fesm2022/acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs.map +1 -0
  24. package/fesm2022/acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs +100 -0
  25. package/fesm2022/acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs.map +1 -0
  26. package/fesm2022/acorex-platform-layout-entity.mjs +22502 -9964
  27. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  28. package/fesm2022/acorex-platform-layout-views.mjs +1395 -387
  29. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  30. package/fesm2022/acorex-platform-layout-widget-core.mjs +2226 -524
  31. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  32. 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
  33. package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +1 -0
  34. package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs → acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs} +6 -7
  35. package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +1 -0
  36. package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs → acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs} +12 -12
  37. package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +1 -0
  38. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs +116 -0
  39. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs.map +1 -0
  40. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DjpZU6gz.mjs} +6 -6
  41. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DjpZU6gz.mjs.map +1 -0
  42. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-gX-3Kx9I.mjs} +5 -5
  43. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-gX-3Kx9I.mjs.map +1 -0
  44. 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
  45. package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +1 -0
  46. package/fesm2022/acorex-platform-layout-widgets.mjs +18746 -16718
  47. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  48. package/fesm2022/acorex-platform-native.mjs +8 -7
  49. package/fesm2022/acorex-platform-native.mjs.map +1 -1
  50. package/fesm2022/acorex-platform-runtime.mjs +391 -166
  51. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  52. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CWLfNqV0.mjs +160 -0
  53. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CWLfNqV0.mjs.map +1 -0
  54. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs +120 -0
  55. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs.map +1 -0
  56. 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
  57. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs.map +1 -0
  58. package/fesm2022/acorex-platform-themes-default-error-401.component-B1nsdpTY.mjs +48 -0
  59. package/fesm2022/acorex-platform-themes-default-error-401.component-B1nsdpTY.mjs.map +1 -0
  60. package/fesm2022/acorex-platform-themes-default-error-404.component-D4UvRe8u.mjs +42 -0
  61. package/fesm2022/acorex-platform-themes-default-error-404.component-D4UvRe8u.mjs.map +1 -0
  62. package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +19 -0
  63. package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +1 -0
  64. package/fesm2022/acorex-platform-themes-default.mjs +2337 -94
  65. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  66. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs → acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs} +6 -6
  67. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +1 -0
  68. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs} +6 -6
  69. package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +1 -0
  70. package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs} +52 -33
  71. package/fesm2022/acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs.map +1 -0
  72. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +94 -0
  73. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +1 -0
  74. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs +86 -0
  75. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +1 -0
  76. package/fesm2022/acorex-platform-themes-shared.mjs +793 -612
  77. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  78. package/fesm2022/acorex-platform-workflow.mjs +997 -274
  79. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  80. package/fesm2022/acorex-platform.mjs.map +1 -1
  81. package/package.json +41 -35
  82. package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +40 -19
  83. package/types/acorex-platform-common.d.ts +3673 -0
  84. package/types/acorex-platform-contracts.d.ts +940 -0
  85. package/{core/index.d.ts → types/acorex-platform-core.d.ts} +1029 -170
  86. package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +744 -412
  87. package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +262 -55
  88. package/types/acorex-platform-layout-components.d.ts +3329 -0
  89. package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +96 -18
  90. package/types/acorex-platform-layout-entity.d.ts +4512 -0
  91. package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +334 -91
  92. package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +438 -162
  93. package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +1152 -507
  94. package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
  95. package/types/acorex-platform-runtime.d.ts +571 -0
  96. package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +268 -11
  97. package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +30 -2
  98. package/{workflow/index.d.ts → types/acorex-platform-workflow.d.ts} +436 -748
  99. package/common/index.d.ts +0 -2470
  100. package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs +0 -71
  101. package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs.map +0 -1
  102. package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs.map +0 -1
  103. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs +0 -135
  104. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs.map +0 -1
  105. package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs.map +0 -1
  106. package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs.map +0 -1
  107. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs.map +0 -1
  108. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs.map +0 -1
  109. package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs.map +0 -1
  110. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs +0 -157
  111. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs.map +0 -1
  112. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D3qZa5fM.mjs +0 -1542
  113. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D3qZa5fM.mjs.map +0 -1
  114. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs +0 -101
  115. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs.map +0 -1
  116. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs.map +0 -1
  117. package/fesm2022/acorex-platform-themes-default-error-401.component-cfREo88K.mjs +0 -31
  118. package/fesm2022/acorex-platform-themes-default-error-401.component-cfREo88K.mjs.map +0 -1
  119. package/fesm2022/acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs +0 -25
  120. package/fesm2022/acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs.map +0 -1
  121. package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs +0 -19
  122. package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs.map +0 -1
  123. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +0 -1
  124. package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs.map +0 -1
  125. package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +0 -1
  126. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-Dz0cylyQ.mjs +0 -65
  127. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-Dz0cylyQ.mjs.map +0 -1
  128. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs +0 -64
  129. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs.map +0 -1
  130. package/layout/components/index.d.ts +0 -1670
  131. package/layout/entity/index.d.ts +0 -2294
  132. package/runtime/index.d.ts +0 -307
  133. /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,134 @@ 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 ---- Contracts barrel ----
550
+ //#endregion
551
+
552
+ //#region ---- Injection Tokens ----
553
+ /**
554
+ * Injection token for icon providers.
555
+ * Use multi: true to register multiple providers.
556
+ */
557
+ const AXP_ICON_PROVIDER = new InjectionToken('AXP_ICON_PROVIDER');
558
+ /**
559
+ * Injection token for icon style providers.
560
+ * Use multi: true to register multiple providers.
561
+ */
562
+ const AXP_ICON_STYLE_PROVIDER = new InjectionToken('AXP_ICON_STYLE_PROVIDER');
563
+ //#endregion
564
+
565
+ //#endregion
566
+ //#region ---- Abstract Providers ----
567
+ class AXPIconProvider {
509
568
  }
510
- const DEFAULT_COLORS = generateDefaultColors();
511
- class AXPColorProviderDefault extends AXPColorProvider {
512
- async provide() {
513
- return DEFAULT_COLORS;
514
- }
569
+ class AXPIconStyleProvider {
515
570
  }
516
- const AXP_COLOR_PROVIDER = new InjectionToken('AXP_COLOR_PROVIDER');
517
- class AXPColorChooserService {
571
+ //#endregion
572
+ //#region ---- Service ----
573
+ class AXPIconChooserService {
518
574
  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;
575
+ //#region ---- Properties ----
576
+ this.iconProviders = inject(AXP_ICON_PROVIDER, { optional: true }) ?? [];
577
+ this.styleProviders = inject(AXP_ICON_STYLE_PROVIDER, { optional: true }) ?? [];
578
+ this.iconsCache = null;
579
+ this.stylesCache = null;
529
580
  }
530
- async getColors() {
531
- if (this.cache) {
532
- return this.cache;
581
+ //#endregion
582
+ //#region ---- Public Methods ----
583
+ /**
584
+ * Get all available icon styles from registered providers.
585
+ * Results are cached after first call.
586
+ */
587
+ async getStyles() {
588
+ if (this.stylesCache) {
589
+ return this.stylesCache;
590
+ }
591
+ const allStyles = [];
592
+ for (const provider of this.styleProviders) {
593
+ const result = await provider.provide();
594
+ allStyles.push(...result);
595
+ }
596
+ // Remove duplicates based on style name
597
+ const uniqueStyles = allStyles.filter((style, index, self) => index === self.findIndex((s) => s.name === style.name));
598
+ this.stylesCache = uniqueStyles;
599
+ return uniqueStyles;
600
+ }
601
+ /**
602
+ * Get all available icons from registered providers.
603
+ * Icons from multiple providers are merged, with duplicates removed.
604
+ * Results are cached after first call.
605
+ */
606
+ async getIcons() {
607
+ if (this.iconsCache) {
608
+ return this.iconsCache;
533
609
  }
534
- const allColors = [];
535
- for (const resolver of this.providers) {
536
- const result = await resolver.provide();
537
- allColors.push(...result);
610
+ const allIcons = [];
611
+ for (const provider of this.iconProviders) {
612
+ const result = await provider.provide();
613
+ allIcons.push(...result);
538
614
  }
539
- const uniqueColors = allColors.filter((color, index, self) => index === self.findIndex((c) => c.title === color.title));
540
- this.cache = uniqueColors;
541
- return uniqueColors;
615
+ // Remove duplicates based on icon name, keeping first occurrence
616
+ const uniqueIcons = allIcons.filter((icon, index, self) => index === self.findIndex((i) => i.name === icon.name));
617
+ this.iconsCache = uniqueIcons;
618
+ return uniqueIcons;
542
619
  }
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' }); }
620
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
621
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserService, providedIn: 'root' }); }
545
622
  }
546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColorChooserService, decorators: [{
623
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserService, decorators: [{
547
624
  type: Injectable,
548
- args: [{
549
- providedIn: 'root',
550
- }]
625
+ args: [{ providedIn: 'root' }]
551
626
  }] });
552
627
 
553
- class AXPColorChooserWidgetEditComponent extends AXPValueWidgetComponent {
628
+ class AXPIconChooserPopupComponent extends AXBasePageComponent {
554
629
  constructor() {
555
630
  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" }] : []));
631
+ this.icons = [];
632
+ this.filteredIcons = [];
633
+ this.searchQuery = '';
634
+ this.viewModes = [
635
+ { value: 'square', text: '@general:widgets.icon-chooser.view-mode.square', icon: 'fa-solid fa-border-all' },
636
+ {
637
+ value: 'rectangle',
638
+ text: '@general:widgets.icon-chooser.view-mode.rectangle',
639
+ icon: 'fa-solid fa-list',
640
+ },
641
+ ];
642
+ this.selectedViewMode = 'square';
643
+ this.iconTypes = [];
644
+ this.selectedIconType = 'fa-solid';
645
+ this.popupService = inject(AXPIconChooserService);
575
646
  }
576
647
  async ngOnInit() {
577
- const allColors = await this.colorService.getColors();
578
- this.colors.set(allColors);
579
- super.ngOnInit();
648
+ this.iconTypes = await this.popupService.getStyles();
649
+ this.icons = await this.popupService.getIcons();
650
+ this.applyFilters();
651
+ this.cdr.detectChanges();
580
652
  }
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
- }
653
+ handleSearch(event) {
654
+ this.searchQuery = event.value?.toLowerCase();
655
+ this.applyFilters();
592
656
  }
593
- parseStringValue(value) {
594
- const parts = value.trim().split(/\s+/);
595
- if (parts.length !== 3) {
596
- return null;
657
+ handleViewModeChange(mode) {
658
+ this.selectedViewMode = mode.value;
659
+ }
660
+ handleIconTypeChange(type) {
661
+ this.selectedIconType = type.name;
662
+ this.applyFilters();
663
+ }
664
+ applyFilters() {
665
+ let result = this.icons;
666
+ if (this.searchQuery) {
667
+ result = result.filter((icon) => icon.label.toLowerCase().includes(this.searchQuery) ||
668
+ icon.tags?.some((tag) => tag.toLowerCase().includes(this.searchQuery)));
597
669
  }
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-Dz0cylyQ.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;
670
+ result = result.filter((icon) => {
671
+ if (!icon.supportedStyle || icon.supportedStyle.length === 0) {
672
+ return true;
673
+ }
674
+ return icon.supportedStyle.includes(this.selectedIconType);
675
+ });
676
+ this.filteredIcons = result;
969
677
  }
970
678
  selectIcon(icon) {
971
679
  this.close({
@@ -977,8 +685,8 @@ class AXPIconChooserPopupComponent extends AXBasePageComponent {
977
685
  getIconClass(icon) {
978
686
  return `${this.selectedIconType} fa-${icon.name}`;
979
687
  }
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: `
688
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
689
+ 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
690
  <div class="ax-flex ax-flex-col ax-h-full ax-bg-lightest">
983
691
  <!-- Fixed Header Section -->
984
692
  <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 +761,9 @@ class AXPIconChooserPopupComponent extends AXBasePageComponent {
1053
761
  </div>
1054
762
  </div>
1055
763
  </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 }); }
764
+ `, 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
765
  }
1058
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPIconChooserPopupComponent, decorators: [{
766
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserPopupComponent, decorators: [{
1059
767
  type: Component,
1060
768
  args: [{
1061
769
  template: `
@@ -1160,7 +868,7 @@ class AXPIconChooserWidgetEditComponent extends AXPValueWidgetComponent {
1160
868
  }
1161
869
  }
1162
870
  return value;
1163
- }, ...(ngDevMode ? [{ debugName: "computedValue" }] : []));
871
+ }, ...(ngDevMode ? [{ debugName: "computedValue" }] : /* istanbul ignore next */ []));
1164
872
  }
1165
873
  async openPopup() {
1166
874
  const result = await this.popupService.open(AXPIconChooserPopupComponent, {
@@ -1185,8 +893,8 @@ class AXPIconChooserWidgetEditComponent extends AXPValueWidgetComponent {
1185
893
  editIcon() {
1186
894
  this.openPopup();
1187
895
  }
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: `
896
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
897
+ 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
898
  <div
1191
899
  class="ax-grid ax-grid-cols-[6rem_auto] ax-items-center ax-rounded-md ax-text-3xl ax-w-fit"
1192
900
  [class.ax-border]="getValue()"
@@ -1217,7 +925,7 @@ class AXPIconChooserWidgetEditComponent extends AXPValueWidgetComponent {
1217
925
  </div>
1218
926
  `, 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
927
  }
1220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPIconChooserWidgetEditComponent, decorators: [{
928
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserWidgetEditComponent, decorators: [{
1221
929
  type: Component,
1222
930
  args: [{ selector: 'ax-icon-chooser-edit', template: `
1223
931
  <div
@@ -1259,7 +967,7 @@ var iconChooserEdit_component = /*#__PURE__*/Object.freeze({
1259
967
  const AXPIconChooserWidget = {
1260
968
  name: 'icon-chooser',
1261
969
  title: 'Icon Chooser',
1262
- icon: 'fa-solid fa-icons',
970
+ icon: 'fa-light fa-icons',
1263
971
  type: 'editor',
1264
972
  categories: AXP_WIDGETS_LAYOUT_CATEGORY,
1265
973
  properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
@@ -1268,10 +976,10 @@ const AXPIconChooserWidget = {
1268
976
  component: () => Promise.resolve().then(function () { return iconChooserEdit_component; }).then((c) => c.AXPIconChooserWidgetEditComponent),
1269
977
  },
1270
978
  column: {
1271
- component: () => import('./acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs').then((c) => c.AXPIconChooserWidgetColumnComponent),
979
+ component: () => import('./acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs').then((c) => c.AXPIconChooserWidgetColumnComponent),
1272
980
  },
1273
981
  view: {
1274
- component: () => import('./acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs').then((c) => c.AXPIconChooserWidgetViewComponent),
982
+ component: () => import('./acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs').then((c) => c.AXPIconChooserWidgetViewComponent),
1275
983
  },
1276
984
  },
1277
985
  };
@@ -1814,50 +1522,207 @@ function provideCustomIconStyleProvider(providerClass) {
1814
1522
  multi: true,
1815
1523
  };
1816
1524
  }
1817
- //#endregion
1525
+ //#endregion
1526
+
1527
+ class AXPFontSizeChooserWidgetComponent extends AXPValueWidgetComponent {
1528
+ constructor() {
1529
+ super(...arguments);
1530
+ this.sizes = signal(['small', 'medium', 'large', 'x-large'], ...(ngDevMode ? [{ debugName: "sizes" }] : /* istanbul ignore next */ []));
1531
+ this.selectedSize = signal(null, ...(ngDevMode ? [{ debugName: "selectedSize" }] : /* istanbul ignore next */ []));
1532
+ this.#eff = effect(() => {
1533
+ if (this.getValue()) {
1534
+ this.selectedSize.set(this.sizes().find((s) => s === this.getValue()) ?? this.sizes()[0]);
1535
+ }
1536
+ }, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
1537
+ }
1538
+ #eff;
1539
+ onSizeClick(size) {
1540
+ this.setValue(size);
1541
+ }
1542
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1543
+ 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: `
1544
+ @for (size of sizes(); track size) {
1545
+ <div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
1546
+ <div>
1547
+ <span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
1548
+ </div>
1549
+ </div>
1550
+ }
1551
+ `, 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 }); }
1552
+ }
1553
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, decorators: [{
1554
+ type: Component,
1555
+ args: [{ template: `
1556
+ @for (size of sizes(); track size) {
1557
+ <div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
1558
+ <div>
1559
+ <span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
1560
+ </div>
1561
+ </div>
1562
+ }
1563
+ `, 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"] }]
1564
+ }] });
1565
+
1566
+ var fontSizeChooserWidget_component = /*#__PURE__*/Object.freeze({
1567
+ __proto__: null,
1568
+ AXPFontSizeChooserWidgetComponent: AXPFontSizeChooserWidgetComponent
1569
+ });
1570
+
1571
+ const AXPFontSizeChooserWidget = {
1572
+ name: "font-size-chooser",
1573
+ title: "Font Size Chooser",
1574
+ icon: "fa-light fa-text-size",
1575
+ type: 'editor',
1576
+ categories: AXP_WIDGETS_LAYOUT_CATEGORY,
1577
+ properties: [
1578
+ AXP_NAME_PROPERTY,
1579
+ AXP_DATA_PATH_PROPERTY,
1580
+ AXP_DISABLED_PROPERTY,
1581
+ ],
1582
+ components: {
1583
+ edit: {
1584
+ component: () => Promise.resolve().then(function () { return fontSizeChooserWidget_component; }).then((c) => c.AXPFontSizeChooserWidgetComponent),
1585
+ },
1586
+ }
1587
+ };
1588
+
1589
+ class AXPFontStyleChooserWidgetComponent extends AXPValueWidgetComponent {
1590
+ constructor() {
1591
+ super(...arguments);
1592
+ this.fonts = signal([
1593
+ { id: 'system-ui', title: 'Default' },
1594
+ { id: 'serif', title: 'Serif' },
1595
+ { id: 'sans-serif', title: 'Sans-serif' },
1596
+ { id: 'monospace', title: 'Monospace' },
1597
+ { id: 'arial', title: 'Arial' },
1598
+ { id: 'verdana', title: 'Verdana' },
1599
+ { id: 'tahoma', title: 'Tahoma' },
1600
+ { id: 'times-new-roman', title: 'Times New Roman' },
1601
+ { id: 'georgia', title: 'Georgia' },
1602
+ { id: 'helvetica', title: 'Helvetica' },
1603
+ { id: 'calibri', title: 'Calibri' },
1604
+ { id: 'cursive', title: 'Cursive' },
1605
+ { id: 'vazirmatn', title: 'Vazir وزیر' },
1606
+ ], ...(ngDevMode ? [{ debugName: "fonts" }] : /* istanbul ignore next */ []));
1607
+ this.selectedFont = signal(null, ...(ngDevMode ? [{ debugName: "selectedFont" }] : /* istanbul ignore next */ []));
1608
+ this.#eff = effect(() => {
1609
+ if (this.getValue()) {
1610
+ this.selectedFont.set(this.fonts().find((f) => f.id === this.getValue()) ?? this.fonts()[0]);
1611
+ }
1612
+ }, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
1613
+ }
1614
+ #eff;
1615
+ onFontClick(font) {
1616
+ this.setValue(font.id);
1617
+ }
1618
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1619
+ 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: `
1620
+ @for (font of fonts(); track font.id) {
1621
+ <div
1622
+ (click)="onFontClick(font)"
1623
+ [class.--selected]="font.id === selectedFont()?.id"
1624
+ [style.font-family]="font.id"
1625
+ >
1626
+ <div>
1627
+ <span>{{ font.title }}</span>
1628
+ </div>
1629
+ </div>
1630
+ }
1631
+ `, 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 }); }
1632
+ }
1633
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, decorators: [{
1634
+ type: Component,
1635
+ args: [{ template: `
1636
+ @for (font of fonts(); track font.id) {
1637
+ <div
1638
+ (click)="onFontClick(font)"
1639
+ [class.--selected]="font.id === selectedFont()?.id"
1640
+ [style.font-family]="font.id"
1641
+ >
1642
+ <div>
1643
+ <span>{{ font.title }}</span>
1644
+ </div>
1645
+ </div>
1646
+ }
1647
+ `, 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"] }]
1648
+ }] });
1649
+
1650
+ var fontStyleChooserWidget_component = /*#__PURE__*/Object.freeze({
1651
+ __proto__: null,
1652
+ AXPFontStyleChooserWidgetComponent: AXPFontStyleChooserWidgetComponent
1653
+ });
1654
+
1655
+ const AXPFontStyleChooserWidget = {
1656
+ name: "font-style-chooser",
1657
+ title: "Font Style Chooser",
1658
+ icon: "fa-light fa-font",
1659
+ type: 'editor',
1660
+ categories: AXP_WIDGETS_LAYOUT_CATEGORY,
1661
+ properties: [
1662
+ AXP_NAME_PROPERTY,
1663
+ AXP_DATA_PATH_PROPERTY,
1664
+ AXP_DISABLED_PROPERTY,
1665
+ ],
1666
+ components: {
1667
+ edit: {
1668
+ component: () => Promise.resolve().then(function () { return fontStyleChooserWidget_component; }).then((c) => c.AXPFontStyleChooserWidgetComponent),
1669
+ },
1670
+ }
1671
+ };
1818
1672
 
1819
1673
  class AXPMenuOrientationChooserWidgetComponent extends AXPValueWidgetComponent {
1820
1674
  constructor() {
1821
1675
  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" }] : []));
1676
+ this.orientations = computed(() => this.options()['chooser'] === 'vertical-mode'
1677
+ ? [
1678
+ { id: 'compact', image: '/assets/images/menu-mode/compact.svg' },
1679
+ { id: 'full', image: '/assets/images/menu-mode/full.svg' },
1680
+ ]
1681
+ : [
1682
+ { id: 'vertical', icon: 'fa-regular fa-square-ellipsis-vertical' },
1683
+ { id: 'horizontal', icon: 'fa-regular fa-square-ellipsis' },
1684
+ ], ...(ngDevMode ? [{ debugName: "orientations" }] : /* istanbul ignore next */ []));
1685
+ this.selectedOrientation = signal(null, ...(ngDevMode ? [{ debugName: "selectedOrientation" }] : /* istanbul ignore next */ []));
1827
1686
  this.#eff = effect(() => {
1828
- if (this.getValue()) {
1829
- this.selectedOrientation.set(this.orientations().find((o) => o.id === this.getValue()) ?? this.orientations()[0]);
1687
+ const options = this.orientations();
1688
+ const value = this.getValue();
1689
+ if (value) {
1690
+ this.selectedOrientation.set(options.find((o) => o.id === value) ?? options[0]);
1830
1691
  }
1831
- }, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
1692
+ }, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
1832
1693
  }
1833
1694
  #eff;
1834
1695
  onOrientationClick(orientation) {
1835
1696
  this.setValue(orientation.id);
1836
1697
  }
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: `
1698
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuOrientationChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1699
+ 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
1700
  @for (orientation of orientations(); track orientation.id) {
1840
1701
  <div (click)="onOrientationClick(orientation)" [class.--selected]="orientation.id === selectedOrientation()?.id">
1841
- <div>
1702
+ @if (orientation.image) {
1703
+ <img [src]="orientation.image" alt="" />
1704
+ } @else {
1842
1705
  <i [class]="orientation.icon"></i>
1843
- </div>
1844
- <span>{{ '@layout:terms.menu-modes.' + orientation.id | translate | async }}</span>
1706
+ <span>{{ '@layout:terms.menu-modes.' + orientation.id | translate | async }}</span>
1707
+ }
1845
1708
  </div>
1846
1709
  }
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 }); }
1710
+ `, 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
1711
  }
1849
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMenuOrientationChooserWidgetComponent, decorators: [{
1712
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuOrientationChooserWidgetComponent, decorators: [{
1850
1713
  type: Component,
1851
1714
  args: [{ template: `
1852
1715
  @for (orientation of orientations(); track orientation.id) {
1853
1716
  <div (click)="onOrientationClick(orientation)" [class.--selected]="orientation.id === selectedOrientation()?.id">
1854
- <div>
1717
+ @if (orientation.image) {
1718
+ <img [src]="orientation.image" alt="" />
1719
+ } @else {
1855
1720
  <i [class]="orientation.icon"></i>
1856
- </div>
1857
- <span>{{ '@layout:terms.menu-modes.' + orientation.id | translate | async }}</span>
1721
+ <span>{{ '@layout:terms.menu-modes.' + orientation.id | translate | async }}</span>
1722
+ }
1858
1723
  </div>
1859
1724
  }
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"] }]
1725
+ `, 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
1726
  }] });
1862
1727
 
1863
1728
  var menuOrientationChooserWidget_component = /*#__PURE__*/Object.freeze({
@@ -1883,6 +1748,318 @@ const AXPMenuOrientationChooserWidget = {
1883
1748
  }
1884
1749
  };
1885
1750
 
1751
+ //#endregion
1752
+ //#region ---- Color utilities ----
1753
+ function hexToRgb(hex) {
1754
+ const normalized = hex.trim().replace(/^#/, '');
1755
+ const full = normalized.length === 3
1756
+ ? normalized
1757
+ .split('')
1758
+ .map((c) => c + c)
1759
+ .join('')
1760
+ : normalized;
1761
+ return [
1762
+ parseInt(full.slice(0, 2), 16),
1763
+ parseInt(full.slice(2, 4), 16),
1764
+ parseInt(full.slice(4, 6), 16),
1765
+ ];
1766
+ }
1767
+ function relativeLuminance(hex) {
1768
+ const [r, g, b] = hexToRgb(hex).map((c) => {
1769
+ const s = c / 255;
1770
+ return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
1771
+ });
1772
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
1773
+ }
1774
+ function contrastForeground(backgroundHex) {
1775
+ return relativeLuminance(backgroundHex) > 0.55 ? '#171717' : '#ffffff';
1776
+ }
1777
+ function titleCase(str) {
1778
+ return str.replace(/-/g, ' ').replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.slice(1).toLowerCase());
1779
+ }
1780
+ //#endregion
1781
+ //#region ---- Surface variants (palette-synchronized) ----
1782
+ /**
1783
+ * Seven tonal steps per semantic color. Backgrounds are mixed in RGB using the **same palette’s**
1784
+ * canvas `light` and `dark` as poles so swatches stay aligned with `AXPThemePaletteProvider` data.
1785
+ */
1786
+ const SURFACE_VARIANTS = ['lightest', 'lighter', 'light', 'surface', 'dark', 'darker', 'darkest'];
1787
+ function styleTitlePrefix(style) {
1788
+ const accentMatch = /^accent(\d+)$/.exec(style);
1789
+ if (accentMatch) {
1790
+ return `Accent ${accentMatch[1]}`;
1791
+ }
1792
+ return titleCase(style);
1793
+ }
1794
+ function surfaceVariantTitle(style, variant) {
1795
+ if (variant === 'surface') {
1796
+ return styleTitlePrefix(style);
1797
+ }
1798
+ return `${styleTitlePrefix(style)} ${titleCase(variant)}`;
1799
+ }
1800
+ /** Tailwind utility triplet stored by theme-color-chooser and outcome display rules. */
1801
+ function buildThemeSurfaceColorTriplet(styleKey, variant) {
1802
+ return {
1803
+ color: `ax-text-${styleKey}-on-${variant}`,
1804
+ background: `ax-bg-${styleKey}-${variant}`,
1805
+ border: `ax-border-${styleKey}-${variant}`,
1806
+ };
1807
+ }
1808
+ /** Ordered `"foreground background border"` string for theme-color-chooser values. */
1809
+ function buildThemeSurfaceColorValue(styleKey, variant = 'lightest') {
1810
+ const triplet = buildThemeSurfaceColorTriplet(styleKey, variant);
1811
+ return `${triplet.color} ${triplet.background} ${triplet.border}`;
1812
+ }
1813
+ function pushVariantScale(entries, styleKey, _baseHex, _canvas) {
1814
+ for (const variant of SURFACE_VARIANTS) {
1815
+ const name = `${styleKey}-${variant}`;
1816
+ entries.push({
1817
+ title: surfaceVariantTitle(styleKey, variant),
1818
+ name,
1819
+ ...buildThemeSurfaceColorTriplet(styleKey, variant),
1820
+ });
1821
+ }
1822
+ }
1823
+ function pushFlatSwatch(entries, title, name, hex) {
1824
+ const color = contrastForeground(hex);
1825
+ entries.push({ title, name, color, background: hex, border: hex });
1826
+ }
1827
+ /**
1828
+ * Builds the full chooser list from a single `AXPThemePalette` (colors object only).
1829
+ */
1830
+ function buildColorsFromThemePalette(palette) {
1831
+ const colors = palette.colors;
1832
+ const canvas = { light: colors.light, dark: colors.dark };
1833
+ const entries = [];
1834
+ const core = ['primary', 'secondary', 'success', 'warning', 'danger'];
1835
+ for (const key of core) {
1836
+ pushVariantScale(entries, key, colors[key], canvas);
1837
+ }
1838
+ const neutral = colors.neutral;
1839
+ if (neutral) {
1840
+ pushVariantScale(entries, 'neutral', neutral, canvas);
1841
+ }
1842
+ colors.accents.forEach((hex, index) => {
1843
+ pushVariantScale(entries, `accent${index + 1}`, hex, canvas);
1844
+ });
1845
+ pushFlatSwatch(entries, 'Canvas Light', 'canvas-light', colors.light);
1846
+ pushFlatSwatch(entries, 'Canvas Dark', 'canvas-dark', colors.dark);
1847
+ return entries;
1848
+ }
1849
+ //#endregion
1850
+ //#region ---- Service ----
1851
+ class AXPColorChooserService {
1852
+ constructor() {
1853
+ this.themeStore = inject(AXPLayoutThemeService);
1854
+ this.palettePromise = inject(AXP_THEME_PALETTE_PROVIDER);
1855
+ this.cacheKey = null;
1856
+ this.cache = null;
1857
+ }
1858
+ async getColors() {
1859
+ const paletteName = this.themeStore.currentPalette();
1860
+ if (this.cache && this.cacheKey === paletteName) {
1861
+ return this.cache;
1862
+ }
1863
+ const provider = await this.palettePromise;
1864
+ const list = await provider.getList();
1865
+ const palette = list.find((p) => p.name === paletteName) ?? list.find((p) => p.name === 'default') ?? list[0] ?? null;
1866
+ const colors = palette ? buildColorsFromThemePalette(palette) : [];
1867
+ this.cacheKey = paletteName;
1868
+ this.cache = colors;
1869
+ return colors;
1870
+ }
1871
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1872
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserService, providedIn: 'root' }); }
1873
+ }
1874
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserService, decorators: [{
1875
+ type: Injectable,
1876
+ args: [{
1877
+ providedIn: 'root',
1878
+ }]
1879
+ }] });
1880
+
1881
+ class AXPColorChooserWidgetEditComponent extends AXPValueWidgetComponent {
1882
+ constructor() {
1883
+ super(...arguments);
1884
+ this.colorService = inject(AXPColorChooserService);
1885
+ this.colors = signal([], ...(ngDevMode ? [{ debugName: "colors" }] : /* istanbul ignore next */ []));
1886
+ this.placeholder = computed(() => this.options()['placeholder'] ?? '', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
1887
+ this.selectedColor = computed(() => {
1888
+ const value = this.getValue();
1889
+ const fallbackName = () => this.colors()[0]?.name;
1890
+ if (!value) {
1891
+ return fallbackName();
1892
+ }
1893
+ if (typeof value === 'string') {
1894
+ const parsed = this.parseStringValue(value);
1895
+ if (parsed) {
1896
+ return parsed;
1897
+ }
1898
+ return fallbackName();
1899
+ }
1900
+ return value.name;
1901
+ }, ...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
1902
+ }
1903
+ async ngOnInit() {
1904
+ const allColors = await this.colorService.getColors();
1905
+ this.colors.set(allColors);
1906
+ super.ngOnInit();
1907
+ }
1908
+ handleValueChange(event) {
1909
+ if (event.isUserInteraction) {
1910
+ if (!event.value) {
1911
+ this.setValue(undefined);
1912
+ return;
1913
+ }
1914
+ const color = event.component.selectedItems[0];
1915
+ // Always store as ordered string: "color background border"
1916
+ const stringValue = `${color.color} ${color.background} ${color.border}`;
1917
+ this.setValue(stringValue);
1918
+ }
1919
+ }
1920
+ isHexSwatch(color) {
1921
+ return color.background.startsWith('#');
1922
+ }
1923
+ parseStringValue(value) {
1924
+ const parts = value.trim().split(/\s+/);
1925
+ if (parts.length !== 3) {
1926
+ return null;
1927
+ }
1928
+ const [color, background, border] = parts;
1929
+ const exactMatch = this.colors().find((entry) => entry.color === color && entry.background === background && entry.border === border);
1930
+ if (exactMatch) {
1931
+ return exactMatch.name;
1932
+ }
1933
+ const backgroundMatch = /^ax-bg-(.+)-(.+)$/.exec(background);
1934
+ if (backgroundMatch) {
1935
+ const name = `${backgroundMatch[1]}-${backgroundMatch[2]}`;
1936
+ if (this.colors().some((entry) => entry.name === name)) {
1937
+ return name;
1938
+ }
1939
+ }
1940
+ return null;
1941
+ }
1942
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1943
+ 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: `
1944
+ <ax-form [messageStyle]="'float'" [updateOn]="'change'">
1945
+ <ax-form-field>
1946
+ <ax-select-box
1947
+ [dataSource]="colors()"
1948
+ textField="title"
1949
+ valueField="name"
1950
+ [placeholder]="placeholder()"
1951
+ [itemTemplate]="customItemTemplate"
1952
+ [ngModel]="selectedColor()"
1953
+ (onValueChanged)="handleValueChange($event)"
1954
+ [selectedTemplate]="customItemTemplate"
1955
+ >
1956
+ <ng-template #customItemTemplate let-item>
1957
+ <div class="ax-flex ax-items-center ax-gap-2 ax-p-2">
1958
+ @if (isHexSwatch(item.data)) {
1959
+ <div
1960
+ class="ax-w-6 ax-h-6 ax-rounded ax-flex ax-items-center ax-justify-center ax-border ax-border-solid"
1961
+ [style.background-color]="item.data.background"
1962
+ [style.border-color]="item.data.border"
1963
+ [style.color]="item.data.color"
1964
+ >
1965
+ <span>Aa</span>
1966
+ </div>
1967
+ } @else {
1968
+ <div
1969
+ 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"
1970
+ [class]="item.data.background"
1971
+ >
1972
+ <span [class]="item.data.color">Aa</span>
1973
+ </div>
1974
+ }
1975
+ <span>{{ item.data.title }}</span>
1976
+ </div>
1977
+ </ng-template>
1978
+ <ax-search-box look="fill"></ax-search-box>
1979
+ <ax-validation-rule message="field can't be empty" rule="required"></ax-validation-rule>
1980
+ </ax-select-box>
1981
+ </ax-form-field>
1982
+ </ax-form>
1983
+ `, 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 }); }
1984
+ }
1985
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserWidgetEditComponent, decorators: [{
1986
+ type: Component,
1987
+ args: [{
1988
+ selector: 'ax-color-chooser-widget',
1989
+ template: `
1990
+ <ax-form [messageStyle]="'float'" [updateOn]="'change'">
1991
+ <ax-form-field>
1992
+ <ax-select-box
1993
+ [dataSource]="colors()"
1994
+ textField="title"
1995
+ valueField="name"
1996
+ [placeholder]="placeholder()"
1997
+ [itemTemplate]="customItemTemplate"
1998
+ [ngModel]="selectedColor()"
1999
+ (onValueChanged)="handleValueChange($event)"
2000
+ [selectedTemplate]="customItemTemplate"
2001
+ >
2002
+ <ng-template #customItemTemplate let-item>
2003
+ <div class="ax-flex ax-items-center ax-gap-2 ax-p-2">
2004
+ @if (isHexSwatch(item.data)) {
2005
+ <div
2006
+ class="ax-w-6 ax-h-6 ax-rounded ax-flex ax-items-center ax-justify-center ax-border ax-border-solid"
2007
+ [style.background-color]="item.data.background"
2008
+ [style.border-color]="item.data.border"
2009
+ [style.color]="item.data.color"
2010
+ >
2011
+ <span>Aa</span>
2012
+ </div>
2013
+ } @else {
2014
+ <div
2015
+ 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"
2016
+ [class]="item.data.background"
2017
+ >
2018
+ <span [class]="item.data.color">Aa</span>
2019
+ </div>
2020
+ }
2021
+ <span>{{ item.data.title }}</span>
2022
+ </div>
2023
+ </ng-template>
2024
+ <ax-search-box look="fill"></ax-search-box>
2025
+ <ax-validation-rule message="field can't be empty" rule="required"></ax-validation-rule>
2026
+ </ax-select-box>
2027
+ </ax-form-field>
2028
+ </ax-form>
2029
+ `,
2030
+ host: {
2031
+ class: 'ax-block ax-flex-1 ax-w-full',
2032
+ },
2033
+ imports: [AXSelectBoxModule, AXFormModule, CommonModule, AXSearchBoxModule, AXButtonModule, FormsModule],
2034
+ changeDetection: ChangeDetectionStrategy.OnPush,
2035
+ }]
2036
+ }] });
2037
+
2038
+ var themeColorChooserEdit_component = /*#__PURE__*/Object.freeze({
2039
+ __proto__: null,
2040
+ AXPColorChooserWidgetEditComponent: AXPColorChooserWidgetEditComponent
2041
+ });
2042
+
2043
+ const AXPThemeColorChooserWidgetConfig = {
2044
+ name: 'theme-color-chooser',
2045
+ title: 'Theme Color Chooser',
2046
+ icon: 'fa-light fa-palette',
2047
+ type: 'editor',
2048
+ categories: AXP_WIDGETS_LAYOUT_CATEGORY,
2049
+ properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
2050
+ components: {
2051
+ edit: {
2052
+ component: () => Promise.resolve().then(function () { return themeColorChooserEdit_component; }).then((c) => c.AXPColorChooserWidgetEditComponent),
2053
+ },
2054
+ column: {
2055
+ component: () => import('./acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs').then((c) => c.AXPColorChooserWidgetColumnComponent),
2056
+ },
2057
+ view: {
2058
+ component: () => import('./acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs').then((c) => c.AXPColorChooserWidgetViewComponent),
2059
+ },
2060
+ },
2061
+ };
2062
+
1886
2063
  class AXPThemeModeChooserWidgetComponent extends AXPValueWidgetComponent {
1887
2064
  constructor() {
1888
2065
  super(...arguments);
@@ -1890,20 +2067,20 @@ class AXPThemeModeChooserWidgetComponent extends AXPValueWidgetComponent {
1890
2067
  { id: AXPThemeMode.Light, icon: 'fa-light fa-brightness' },
1891
2068
  { id: AXPThemeMode.Dark, icon: 'fa-light fa-moon' },
1892
2069
  { id: AXPThemeMode.System, icon: 'fa-light fa-desktop' },
1893
- ], ...(ngDevMode ? [{ debugName: "modes" }] : []));
1894
- this.selectedMode = signal(null, ...(ngDevMode ? [{ debugName: "selectedMode" }] : []));
2070
+ ], ...(ngDevMode ? [{ debugName: "modes" }] : /* istanbul ignore next */ []));
2071
+ this.selectedMode = signal(null, ...(ngDevMode ? [{ debugName: "selectedMode" }] : /* istanbul ignore next */ []));
1895
2072
  this.#eff = effect(() => {
1896
2073
  if (this.getValue()) {
1897
2074
  this.selectedMode.set(this.modes().find((m) => m.id === this.getValue()) ?? this.modes()[0]);
1898
2075
  }
1899
- }, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
2076
+ }, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
1900
2077
  }
1901
2078
  #eff;
1902
2079
  onModeClick(mode) {
1903
2080
  this.setValue(mode.id);
1904
2081
  }
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: `
2082
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeModeChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2083
+ 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
2084
  @for (mode of modes(); track mode.id) {
1908
2085
  <div (click)="onModeClick(mode)" [class.--selected]="mode.id === selectedMode()?.id">
1909
2086
  <div>
@@ -1914,7 +2091,7 @@ class AXPThemeModeChooserWidgetComponent extends AXPValueWidgetComponent {
1914
2091
  }
1915
2092
  `, 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
2093
  }
1917
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPThemeModeChooserWidgetComponent, decorators: [{
2094
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeModeChooserWidgetComponent, decorators: [{
1918
2095
  type: Component,
1919
2096
  args: [{ template: `
1920
2097
  @for (mode of modes(); track mode.id) {
@@ -1936,7 +2113,7 @@ var themeModeChooserWidget_component = /*#__PURE__*/Object.freeze({
1936
2113
  const AXPThemeModeChooserWidget = {
1937
2114
  name: "theme-mode-chooser",
1938
2115
  title: "Theme Mode Chooser",
1939
- icon: "fa-solid fa-square",
2116
+ icon: "fa-light fa-square",
1940
2117
  type: 'editor',
1941
2118
  categories: AXP_WIDGETS_LAYOUT_CATEGORY,
1942
2119
  properties: [
@@ -1955,15 +2132,15 @@ class AXPThemePaletteChooserWidgetComponent extends AXPValueWidgetComponent {
1955
2132
  constructor() {
1956
2133
  super(...arguments);
1957
2134
  this.paletteService = inject(AXP_THEME_PALETTE_PROVIDER);
1958
- this.palettes = signal([], ...(ngDevMode ? [{ debugName: "palettes" }] : []));
1959
- this.selectedPalette = signal(null, ...(ngDevMode ? [{ debugName: "selectedPalette" }] : []));
2135
+ this.palettes = signal([], ...(ngDevMode ? [{ debugName: "palettes" }] : /* istanbul ignore next */ []));
2136
+ this.selectedPalette = signal(null, ...(ngDevMode ? [{ debugName: "selectedPalette" }] : /* istanbul ignore next */ []));
1960
2137
  this.#eff = effect(() => {
1961
2138
  if (this.getValue()) {
1962
2139
  this.selectedPalette.set(this.palettes().find((p) => p.name === this.getValue()) ??
1963
2140
  this.palettes().find((p) => p.name === 'default') ??
1964
2141
  this.palettes()[0]);
1965
2142
  }
1966
- }, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
2143
+ }, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
1967
2144
  }
1968
2145
  #eff;
1969
2146
  async ngOnInit() {
@@ -1974,8 +2151,8 @@ class AXPThemePaletteChooserWidgetComponent extends AXPValueWidgetComponent {
1974
2151
  onPaletteClick(palette) {
1975
2152
  this.setValue(palette.name);
1976
2153
  }
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: `
2154
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemePaletteChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2155
+ 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
2156
  @for (palette of palettes(); track palette.name) {
1980
2157
  <div (click)="onPaletteClick(palette)" [class.--selected]="palette.name === selectedPalette()?.name">
1981
2158
  <span>{{ palette.title }}</span>
@@ -1986,9 +2163,9 @@ class AXPThemePaletteChooserWidgetComponent extends AXPValueWidgetComponent {
1986
2163
  </div>
1987
2164
  </div>
1988
2165
  }
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 }); }
2166
+ `, 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
2167
  }
1991
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPThemePaletteChooserWidgetComponent, decorators: [{
2168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemePaletteChooserWidgetComponent, decorators: [{
1992
2169
  type: Component,
1993
2170
  args: [{ template: `
1994
2171
  @for (palette of palettes(); track palette.name) {
@@ -2001,7 +2178,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2001
2178
  </div>
2002
2179
  </div>
2003
2180
  }
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"] }]
2181
+ `, 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
2182
  }] });
2006
2183
 
2007
2184
  var themePaletteChooserWidget_component = /*#__PURE__*/Object.freeze({
@@ -2012,7 +2189,7 @@ var themePaletteChooserWidget_component = /*#__PURE__*/Object.freeze({
2012
2189
  const AXPThemePaletteChooserWidget = {
2013
2190
  name: "theme-palette-chooser",
2014
2191
  title: "Theme Palette Chooser",
2015
- icon: "fa-solid fa-square",
2192
+ icon: "fa-light fa-square",
2016
2193
  type: 'editor',
2017
2194
  categories: AXP_WIDGETS_LAYOUT_CATEGORY,
2018
2195
  properties: [
@@ -2027,26 +2204,49 @@ const AXPThemePaletteChooserWidget = {
2027
2204
  }
2028
2205
  };
2029
2206
 
2207
+ //#endregion
2208
+ //#region ---- Theme Widgets Provider ----
2209
+ const WIDGETS = [
2210
+ AXPThemePaletteChooserWidget,
2211
+ AXPThemeModeChooserWidget,
2212
+ AXPMenuOrientationChooserWidget,
2213
+ AXPFontSizeChooserWidget,
2214
+ AXPFontStyleChooserWidget,
2215
+ AXPIconChooserWidget,
2216
+ AXPThemeColorChooserWidgetConfig,
2217
+ ];
2218
+ class AXPThemesSharedWidgetsProvider {
2219
+ getWidgets() {
2220
+ return WIDGETS;
2221
+ }
2222
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedWidgetsProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2223
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedWidgetsProvider }); }
2224
+ }
2225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedWidgetsProvider, decorators: [{
2226
+ type: Injectable
2227
+ }] });
2228
+
2030
2229
  class AXPThemesSharedModule {
2031
2230
  constructor(appInitService, injector) {
2032
2231
  const service = injector.get(AXPLayoutThemeService);
2033
2232
  appInitService.registerTask({
2034
2233
  name: 'layout-theme',
2035
- statusText: 'Applying layout theme settings ...',
2234
+ statusText: '@layout:app-startup.applying-theme-settings',
2036
2235
  priority: 100,
2037
2236
  run: async () => {
2038
2237
  await service.loadSettings();
2039
2238
  },
2040
2239
  });
2041
2240
  }
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: [
2241
+ 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 }); }
2242
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedModule, imports: [i1$3.AXPComponentSlotModule, AXPWidgetCoreModule] }); }
2243
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedModule, providers: [
2244
+ { provide: AXP_WIDGET_DEFINITION_PROVIDER, useClass: AXPThemesSharedWidgetsProvider, multi: true },
2045
2245
  {
2046
2246
  provide: AXP_SETTING_DEFINITION_PROVIDER,
2047
2247
  useFactory: async () => {
2048
2248
  const injector = inject(Injector);
2049
- const provider = (await import('./acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs')).AXPThemeSettingProvider;
2249
+ const provider = (await import('./acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs')).AXPThemeSettingProvider;
2050
2250
  return new provider(injector);
2051
2251
  },
2052
2252
  multi: true,
@@ -2061,19 +2261,9 @@ class AXPThemesSharedModule {
2061
2261
  },
2062
2262
  ],
2063
2263
  }),
2064
- AXPWidgetCoreModule.forChild({
2065
- widgets: [
2066
- AXPThemePaletteChooserWidget,
2067
- AXPThemeModeChooserWidget,
2068
- AXPMenuOrientationChooserWidget,
2069
- AXPFontSizeChooserWidget,
2070
- AXPFontStyleChooserWidget,
2071
- AXPIconChooserWidget,
2072
- AXPThemeColorChooserWidgetConfig,
2073
- ],
2074
- })] }); }
2264
+ AXPWidgetCoreModule] }); }
2075
2265
  }
2076
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPThemesSharedModule, decorators: [{
2266
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedModule, decorators: [{
2077
2267
  type: NgModule,
2078
2268
  args: [{
2079
2269
  imports: [
@@ -2086,26 +2276,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2086
2276
  },
2087
2277
  ],
2088
2278
  }),
2089
- AXPWidgetCoreModule.forChild({
2090
- widgets: [
2091
- AXPThemePaletteChooserWidget,
2092
- AXPThemeModeChooserWidget,
2093
- AXPMenuOrientationChooserWidget,
2094
- AXPFontSizeChooserWidget,
2095
- AXPFontStyleChooserWidget,
2096
- AXPIconChooserWidget,
2097
- AXPThemeColorChooserWidgetConfig,
2098
- ],
2099
- }),
2279
+ AXPWidgetCoreModule,
2100
2280
  ],
2101
2281
  exports: [],
2102
2282
  declarations: [],
2103
2283
  providers: [
2284
+ { provide: AXP_WIDGET_DEFINITION_PROVIDER, useClass: AXPThemesSharedWidgetsProvider, multi: true },
2104
2285
  {
2105
2286
  provide: AXP_SETTING_DEFINITION_PROVIDER,
2106
2287
  useFactory: async () => {
2107
2288
  const injector = inject(Injector);
2108
- const provider = (await import('./acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs')).AXPThemeSettingProvider;
2289
+ const provider = (await import('./acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs')).AXPThemeSettingProvider;
2109
2290
  return new provider(injector);
2110
2291
  },
2111
2292
  multi: true,
@@ -2113,11 +2294,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2113
2294
  ...provideDefaultIconChooser(),
2114
2295
  ],
2115
2296
  }]
2116
- }], ctorParameters: () => [{ type: i1$2.AXPAppStartUpService }, { type: i0.Injector }] });
2297
+ }], ctorParameters: () => [{ type: i1$3.AXPAppStartUpService }, { type: i0.Injector }] });
2117
2298
 
2118
2299
  /**
2119
2300
  * Generated bundle index. Do not edit.
2120
2301
  */
2121
2302
 
2122
- export { AXPLayoutThemeService, AXPMenuOrientation, AXPSideMenuState, AXPThemeLayoutSetting, AXPThemeMode, AXPThemePaletteProviderDefault, AXPThemeSlotComponent, AXPThemesSharedModule, AXP_THEME_PALETTE_PROVIDER };
2303
+ 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
2304
  //# sourceMappingURL=acorex-platform-themes-shared.mjs.map