@acorex/platform 20.8.5 → 21.0.0-beta.1
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.
- package/fesm2022/acorex-platform-auth.mjs +121 -27
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-41RhWqb4.mjs → acorex-platform-common-common-settings.provider-G9XcXXOG.mjs} +4 -4
- package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +669 -268
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +333 -140
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +557 -826
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +539 -110
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs → acorex-platform-layout-components-binding-expression-editor-popup.component-CWV4XD36.mjs} +15 -15
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CWV4XD36.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +3285 -1035
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +488 -284
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +15955 -11978
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +410 -170
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +548 -474
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs → acorex-platform-layout-widgets-button-widget-designer.component-fLjWiSFE.mjs} +11 -11
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-fLjWiSFE.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs → acorex-platform-layout-widgets-file-list-popup.component-3oRAKxTo.mjs} +22 -77
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-3oRAKxTo.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs → acorex-platform-layout-widgets-image-preview.popup-CazpERbX.mjs} +8 -9
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-CazpERbX.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs → acorex-platform-layout-widgets-page-widget-designer.component-BQ4G6aYf.mjs} +17 -17
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BQ4G6aYf.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-DWuWxUF_.mjs +116 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-DWuWxUF_.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-fV94u3t2.mjs} +25 -19
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-fV94u3t2.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-DyuvQhgN.mjs} +9 -9
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DyuvQhgN.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-EJMMdpIs.mjs} +7 -7
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-EJMMdpIs.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +6396 -4058
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +8 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +328 -166
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CkptOSO3.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CkptOSO3.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DXC2qtvK.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DXC2qtvK.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs → acorex-platform-themes-default-entity-master-single-view.component-DYyunzKZ.mjs} +16 -23
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DYyunzKZ.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-401.component-C5lQECDP.mjs +31 -0
- package/fesm2022/acorex-platform-themes-default-error-401.component-C5lQECDP.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-404.component-D5wBXAB-.mjs +25 -0
- package/fesm2022/acorex-platform-themes-default-error-404.component-D5wBXAB-.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-AhDiY3DI.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-AhDiY3DI.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +1687 -69
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs → acorex-platform-themes-shared-icon-chooser-column.component-QL2-ZUVg.mjs} +8 -8
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-QL2-ZUVg.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BXydqPt_.mjs} +8 -8
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BXydqPt_.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs} +2 -2
- package/fesm2022/acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-Cb9iY6k9.mjs +88 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-Cb9iY6k9.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-KP4-BND5.mjs +80 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-KP4-BND5.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +572 -465
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +276 -98
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/package.json +38 -38
- package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +14 -2
- package/{common/index.d.ts → types/acorex-platform-common.d.ts} +261 -24
- package/{core/index.d.ts → types/acorex-platform-core.d.ts} +163 -42
- package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +744 -412
- package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +137 -38
- package/{layout/components/index.d.ts → types/acorex-platform-layout-components.d.ts} +808 -131
- package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +96 -18
- package/{layout/entity/index.d.ts → types/acorex-platform-layout-entity.d.ts} +686 -61
- package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +80 -47
- package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +274 -197
- package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +583 -104
- package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
- package/types/acorex-platform-runtime.d.ts +565 -0
- package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +105 -4
- package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +14 -5
- package/{workflow/index.d.ts → types/acorex-platform-workflow.d.ts} +96 -81
- package/fesm2022/acorex-platform-common-common-settings.provider-41RhWqb4.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs +0 -111
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs +0 -160
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CLDoygoI.mjs +0 -1610
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CLDoygoI.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs +0 -120
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-53VB-PS_.mjs +0 -31
- package/fesm2022/acorex-platform-themes-default-error-401.component-53VB-PS_.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-DVF9soT5.mjs +0 -25
- package/fesm2022/acorex-platform-themes-default-error-404.component-DVF9soT5.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs +0 -65
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs +0 -64
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs.map +0 -1
- package/runtime/index.d.ts +0 -307
- /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
|
@@ -7,7 +7,7 @@ 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,
|
|
10
|
+
import { InjectionToken, computed, inject, ChangeDetectionStrategy, Component, Injectable, Input, signal, effect, Injector, NgModule } from '@angular/core';
|
|
11
11
|
import { AXPSettingsService, AXP_SETTING_DEFINITION_PROVIDER } from '@acorex/platform/common';
|
|
12
12
|
import * as i1$3 from '@acorex/platform/core';
|
|
13
13
|
import { AXPScreenSize, AXPPlatformScope, AXPComponentSlotModule } from '@acorex/platform/core';
|
|
@@ -16,23 +16,59 @@ import { signalStore, withState, withComputed, withMethods, patchState, withHook
|
|
|
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
|
|
20
|
-
import { AXPValueWidgetComponent, AXP_WIDGETS_LAYOUT_CATEGORY, AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';
|
|
21
|
-
import { AXSelectionCdkModule } from '@acorex/cdk/selection';
|
|
22
|
-
import * as i5$1 from '@angular/forms';
|
|
23
|
-
import { FormsModule } from '@angular/forms';
|
|
24
|
-
import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY } from '@acorex/platform/layout/widgets';
|
|
19
|
+
import { AXPValueWidgetComponent, AXP_WIDGETS_LAYOUT_CATEGORY, AXPWidgetCoreModule, AXP_WIDGET_DEFINITION_PROVIDER } from '@acorex/platform/layout/widget-core';
|
|
25
20
|
import { AXPopupService } from '@acorex/components/popup';
|
|
26
21
|
import * as i2$1 from '@acorex/components/button-group';
|
|
27
22
|
import { AXButtonGroupModule } from '@acorex/components/button-group';
|
|
28
23
|
import { AXBasePageComponent } from '@acorex/components/page';
|
|
29
24
|
import * as i1$1 from '@acorex/components/search-box';
|
|
30
25
|
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
26
|
+
import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY } from '@acorex/platform/layout/widgets';
|
|
27
|
+
import { AXSelectionCdkModule } from '@acorex/cdk/selection';
|
|
28
|
+
import * as i4$1 from '@angular/forms';
|
|
29
|
+
import { FormsModule } from '@angular/forms';
|
|
31
30
|
import * as i2$2 from '@acorex/components/form';
|
|
32
31
|
import { AXFormModule } from '@acorex/components/form';
|
|
33
32
|
import * as i1$2 from '@acorex/components/select-box';
|
|
34
33
|
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
|
35
34
|
|
|
35
|
+
//#region ---- Theme palette provider ----
|
|
36
|
+
/** Base path for optional runtime CSS overrides (never load `default` at runtime — use the entry bundle, e.g. `@import '@acorex/styles/themes/default.css'`). */
|
|
37
|
+
const AXP_THEME_PALETTE_CSS_BASE_PATH = '/assets/themes/palettes/css';
|
|
38
|
+
//#endregion
|
|
39
|
+
const AXP_THEME_PALETTE_PROVIDER = new InjectionToken('AXP_THEME_PALETTE_PROVIDER', {
|
|
40
|
+
providedIn: 'root',
|
|
41
|
+
factory: async () => {
|
|
42
|
+
return new AXPThemePaletteProviderDefault();
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
class AXPThemePaletteProviderDefault {
|
|
46
|
+
getList() {
|
|
47
|
+
return Promise.resolve([
|
|
48
|
+
{
|
|
49
|
+
name: 'default',
|
|
50
|
+
title: 'Default',
|
|
51
|
+
colors: {
|
|
52
|
+
primary: '#113b53',
|
|
53
|
+
secondary: '#1a6ab1',
|
|
54
|
+
success: '#2d9c67',
|
|
55
|
+
warning: '#e9a01b',
|
|
56
|
+
danger: '#c02f1d',
|
|
57
|
+
accents: ['#d6a7a6', '#a0897e', '#8bf4d9'],
|
|
58
|
+
dark: '#2a2d30',
|
|
59
|
+
light: '#ffffff',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
]);
|
|
63
|
+
}
|
|
64
|
+
getCssHref(paletteName) {
|
|
65
|
+
if (!paletteName || paletteName === 'default') {
|
|
66
|
+
return Promise.resolve(null);
|
|
67
|
+
}
|
|
68
|
+
return Promise.resolve(`${AXP_THEME_PALETTE_CSS_BASE_PATH}/${paletteName}.css`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
36
72
|
var AXPThemeLayoutSetting;
|
|
37
73
|
(function (AXPThemeLayoutSetting) {
|
|
38
74
|
AXPThemeLayoutSetting["Name"] = "Common:Setting:Layout.Name";
|
|
@@ -67,6 +103,8 @@ var AXPMenuOrientation;
|
|
|
67
103
|
AXPMenuOrientation["Horizontal"] = "horizontal";
|
|
68
104
|
})(AXPMenuOrientation || (AXPMenuOrientation = {}));
|
|
69
105
|
|
|
106
|
+
/** Attribute on injected `<style>` tags for runtime palette overrides (non-default themes). */
|
|
107
|
+
const RUNTIME_PALETTE_STYLE_ATTR = 'data-ax-palette';
|
|
70
108
|
// ThemeStore - Manages theme settings, system changes, and loading states
|
|
71
109
|
const AXPLayoutThemeService = signalStore({ providedIn: 'root' },
|
|
72
110
|
// Initial State
|
|
@@ -122,6 +160,7 @@ withComputed(({ currentMode: currentTheme, systemThemeMode: systemTheme, sideMen
|
|
|
122
160
|
})),
|
|
123
161
|
// Methods for State Management
|
|
124
162
|
withMethods((store, http = inject(HttpClient), settingsService = inject(AXPSettingsService)) => {
|
|
163
|
+
const paletteProviderLoader = inject(AXP_THEME_PALETTE_PROVIDER);
|
|
125
164
|
const _applySettings = async () => {
|
|
126
165
|
// Initialize theme and side menu setting from storage
|
|
127
166
|
const settingThemeMode = (await settingsService.get(AXPThemeLayoutSetting.Mode)) ?? AXPThemeMode.Light;
|
|
@@ -144,6 +183,7 @@ withMethods((store, http = inject(HttpClient), settingsService = inject(AXPSetti
|
|
|
144
183
|
const sideMenuWidth = await settingsService.get(AXPThemeLayoutSetting.SideMenuWidth);
|
|
145
184
|
patchState(store, { sideMenuWidth });
|
|
146
185
|
await _updateHtmlClass();
|
|
186
|
+
await _applyThemePalette(store.currentPalette());
|
|
147
187
|
};
|
|
148
188
|
// Update HTML class based on theme
|
|
149
189
|
const _updateHtmlClass = async () => {
|
|
@@ -153,8 +193,6 @@ withMethods((store, http = inject(HttpClient), settingsService = inject(AXPSetti
|
|
|
153
193
|
//
|
|
154
194
|
html.style.fontFamily = store.font().family;
|
|
155
195
|
html.style.fontSize = store.font().size;
|
|
156
|
-
//
|
|
157
|
-
await _applyThemePalette(store.currentPalette());
|
|
158
196
|
};
|
|
159
197
|
const _setOverlayLoading = async (value, delay = 0) => {
|
|
160
198
|
if (value) {
|
|
@@ -208,33 +246,45 @@ withMethods((store, http = inject(HttpClient), settingsService = inject(AXPSetti
|
|
|
208
246
|
}
|
|
209
247
|
}
|
|
210
248
|
};
|
|
211
|
-
|
|
249
|
+
const _clearRuntimePaletteStyles = () => {
|
|
250
|
+
document.querySelectorAll(`style[${RUNTIME_PALETTE_STYLE_ATTR}]`).forEach((el) => el.remove());
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Loads palette override CSS from the app host (`/assets/...`).
|
|
254
|
+
* The bundled theme from the app entry (`@acorex/styles/themes/default.css`) stays in the build; non-`default` palettes inject overrides only.
|
|
255
|
+
*/
|
|
212
256
|
const _applyThemePalette = async (name) => {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
257
|
+
const provider = await paletteProviderLoader;
|
|
258
|
+
let href;
|
|
259
|
+
if (provider.getCssHref) {
|
|
260
|
+
href = await provider.getCssHref(name);
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
href = !name || name === 'default' ? null : `${AXP_THEME_PALETTE_CSS_BASE_PATH}/${name}.css`;
|
|
264
|
+
}
|
|
265
|
+
if (!href) {
|
|
266
|
+
_clearRuntimePaletteStyles();
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
const existingStyle = document.querySelector(`style[${RUNTIME_PALETTE_STYLE_ATTR}="${CSS.escape(name)}"]`);
|
|
217
270
|
if (existingStyle) {
|
|
218
|
-
return;
|
|
271
|
+
return;
|
|
219
272
|
}
|
|
220
273
|
_setNavigationLoading(true);
|
|
221
274
|
try {
|
|
222
|
-
|
|
223
|
-
const cssText = await firstValueFrom(http.get(path, { responseType: 'text' }));
|
|
224
|
-
// Create a new <style> tag and apply the CSS
|
|
275
|
+
const cssText = await firstValueFrom(http.get(href, { responseType: 'text' }));
|
|
225
276
|
const style = document.createElement('style');
|
|
226
|
-
style.setAttribute(
|
|
277
|
+
style.setAttribute(RUNTIME_PALETTE_STYLE_ATTR, name);
|
|
227
278
|
style.textContent = cssText;
|
|
228
279
|
document.head.appendChild(style);
|
|
229
|
-
|
|
230
|
-
document.querySelectorAll('style[data-theme]').forEach((existing) => {
|
|
280
|
+
document.querySelectorAll(`style[${RUNTIME_PALETTE_STYLE_ATTR}]`).forEach((existing) => {
|
|
231
281
|
if (existing !== style) {
|
|
232
282
|
existing.remove();
|
|
233
283
|
}
|
|
234
284
|
});
|
|
235
285
|
}
|
|
236
286
|
catch (error) {
|
|
237
|
-
console.error(`
|
|
287
|
+
console.error(`Failed to load theme palette CSS from ${href}:`, error);
|
|
238
288
|
}
|
|
239
289
|
finally {
|
|
240
290
|
_setNavigationLoading(false);
|
|
@@ -339,11 +389,11 @@ class AXPThemeSlotComponent {
|
|
|
339
389
|
this.store = inject(AXPLayoutThemeService);
|
|
340
390
|
this.variants = AXPThemeMode;
|
|
341
391
|
}
|
|
342
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
343
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
392
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
393
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPThemeSlotComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
|
|
344
394
|
<ax-button color="primary">
|
|
345
395
|
<ax-icon
|
|
346
|
-
class="fa-regular
|
|
396
|
+
class="fa-regular"
|
|
347
397
|
[ngClass]="{
|
|
348
398
|
'fa-desktop':store.isSystemMode(),
|
|
349
399
|
'fa-moon':!store.isSystemMode() && store.isDarkMode(),
|
|
@@ -383,15 +433,15 @@ class AXPThemeSlotComponent {
|
|
|
383
433
|
</ax-button-item-list>
|
|
384
434
|
</ax-dropdown-panel>
|
|
385
435
|
</ax-button>
|
|
386
|
-
`, 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" }] }); }
|
|
436
|
+
`, 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 }); }
|
|
387
437
|
}
|
|
388
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
438
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeSlotComponent, decorators: [{
|
|
389
439
|
type: Component,
|
|
390
440
|
args: [{
|
|
391
441
|
template: `
|
|
392
442
|
<ax-button color="primary">
|
|
393
443
|
<ax-icon
|
|
394
|
-
class="fa-regular
|
|
444
|
+
class="fa-regular"
|
|
395
445
|
[ngClass]="{
|
|
396
446
|
'fa-desktop':store.isSystemMode(),
|
|
397
447
|
'fa-moon':!store.isSystemMode() && store.isDarkMode(),
|
|
@@ -432,185 +482,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
432
482
|
</ax-dropdown-panel>
|
|
433
483
|
</ax-button>
|
|
434
484
|
`,
|
|
435
|
-
imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXDropdownModule, AXTranslationModule]
|
|
485
|
+
imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXDropdownModule, AXTranslationModule],
|
|
486
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
436
487
|
}]
|
|
437
488
|
}] });
|
|
438
489
|
|
|
439
|
-
const AXP_THEME_PALETTE_PROVIDER = new InjectionToken('AXP_THEME_PALETTE_PROVIDER', {
|
|
440
|
-
providedIn: 'root',
|
|
441
|
-
factory: async () => {
|
|
442
|
-
return new AXPThemePaletteProviderDefault();
|
|
443
|
-
},
|
|
444
|
-
});
|
|
445
|
-
class AXPThemePaletteProviderDefault {
|
|
446
|
-
getList() {
|
|
447
|
-
return Promise.resolve([
|
|
448
|
-
{
|
|
449
|
-
name: 'default',
|
|
450
|
-
title: 'Default',
|
|
451
|
-
path: '/assets/themes/palletes/default.css',
|
|
452
|
-
colors: {
|
|
453
|
-
primary: '#113b53',
|
|
454
|
-
secondary: '#1a6ab1',
|
|
455
|
-
neutral: '#606c76',
|
|
456
|
-
success: '#2d9c67',
|
|
457
|
-
warning: '#e9a01b',
|
|
458
|
-
danger: '#c02f1d',
|
|
459
|
-
accents: ['#d6a7a6', '#a0897e', '#8bf4d9'],
|
|
460
|
-
dark: '#2a2d30',
|
|
461
|
-
light: '#ffffff',
|
|
462
|
-
},
|
|
463
|
-
},
|
|
464
|
-
]);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
class AXPFontSizeChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
469
|
-
constructor() {
|
|
470
|
-
super(...arguments);
|
|
471
|
-
this.sizes = signal(['small', 'medium', 'large', 'x-large'], ...(ngDevMode ? [{ debugName: "sizes" }] : []));
|
|
472
|
-
this.selectedSize = signal(null, ...(ngDevMode ? [{ debugName: "selectedSize" }] : []));
|
|
473
|
-
this.#eff = effect(() => {
|
|
474
|
-
if (this.getValue()) {
|
|
475
|
-
this.selectedSize.set(this.sizes().find((s) => s === this.getValue()) ?? this.sizes()[0]);
|
|
476
|
-
}
|
|
477
|
-
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
478
|
-
}
|
|
479
|
-
#eff;
|
|
480
|
-
onSizeClick(size) {
|
|
481
|
-
this.setValue(size);
|
|
482
|
-
}
|
|
483
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
484
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AXPFontSizeChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
485
|
-
@for (size of sizes(); track size) {
|
|
486
|
-
<div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
|
|
487
|
-
<div>
|
|
488
|
-
<span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
|
|
489
|
-
</div>
|
|
490
|
-
</div>
|
|
491
|
-
}
|
|
492
|
-
`, 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 }); }
|
|
493
|
-
}
|
|
494
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, decorators: [{
|
|
495
|
-
type: Component,
|
|
496
|
-
args: [{ template: `
|
|
497
|
-
@for (size of sizes(); track size) {
|
|
498
|
-
<div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
|
|
499
|
-
<div>
|
|
500
|
-
<span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
|
|
501
|
-
</div>
|
|
502
|
-
</div>
|
|
503
|
-
}
|
|
504
|
-
`, 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"] }]
|
|
505
|
-
}] });
|
|
506
|
-
|
|
507
|
-
var fontSizeChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
508
|
-
__proto__: null,
|
|
509
|
-
AXPFontSizeChooserWidgetComponent: AXPFontSizeChooserWidgetComponent
|
|
510
|
-
});
|
|
511
|
-
|
|
512
|
-
const AXPFontSizeChooserWidget = {
|
|
513
|
-
name: "font-size-chooser",
|
|
514
|
-
title: "Font Size Chooser",
|
|
515
|
-
icon: "fa-light fa-text-size",
|
|
516
|
-
type: 'editor',
|
|
517
|
-
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
518
|
-
properties: [
|
|
519
|
-
AXP_NAME_PROPERTY,
|
|
520
|
-
AXP_DATA_PATH_PROPERTY,
|
|
521
|
-
AXP_DISABLED_PROPERTY,
|
|
522
|
-
],
|
|
523
|
-
components: {
|
|
524
|
-
edit: {
|
|
525
|
-
component: () => Promise.resolve().then(function () { return fontSizeChooserWidget_component; }).then((c) => c.AXPFontSizeChooserWidgetComponent),
|
|
526
|
-
},
|
|
527
|
-
}
|
|
528
|
-
};
|
|
529
|
-
|
|
530
|
-
class AXPFontStyleChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
531
|
-
constructor() {
|
|
532
|
-
super(...arguments);
|
|
533
|
-
this.fonts = signal([
|
|
534
|
-
{ id: 'system-ui', title: 'Default' },
|
|
535
|
-
{ id: 'serif', title: 'Serif' },
|
|
536
|
-
{ id: 'sans-serif', title: 'Sans-serif' },
|
|
537
|
-
{ id: 'monospace', title: 'Monospace' },
|
|
538
|
-
{ id: 'arial', title: 'Arial' },
|
|
539
|
-
{ id: 'verdana', title: 'Verdana' },
|
|
540
|
-
{ id: 'tahoma', title: 'Tahoma' },
|
|
541
|
-
{ id: 'times-new-roman', title: 'Times New Roman' },
|
|
542
|
-
{ id: 'georgia', title: 'Georgia' },
|
|
543
|
-
{ id: 'helvetica', title: 'Helvetica' },
|
|
544
|
-
{ id: 'calibri', title: 'Calibri' },
|
|
545
|
-
{ id: 'cursive', title: 'Cursive' },
|
|
546
|
-
{ id: 'vazirmatn', title: 'Vazir وزیر' },
|
|
547
|
-
], ...(ngDevMode ? [{ debugName: "fonts" }] : []));
|
|
548
|
-
this.selectedFont = signal(null, ...(ngDevMode ? [{ debugName: "selectedFont" }] : []));
|
|
549
|
-
this.#eff = effect(() => {
|
|
550
|
-
if (this.getValue()) {
|
|
551
|
-
this.selectedFont.set(this.fonts().find((f) => f.id === this.getValue()) ?? this.fonts()[0]);
|
|
552
|
-
}
|
|
553
|
-
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
554
|
-
}
|
|
555
|
-
#eff;
|
|
556
|
-
onFontClick(font) {
|
|
557
|
-
this.setValue(font.id);
|
|
558
|
-
}
|
|
559
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
560
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AXPFontStyleChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
561
|
-
@for (font of fonts(); track font.id) {
|
|
562
|
-
<div
|
|
563
|
-
(click)="onFontClick(font)"
|
|
564
|
-
[class.--selected]="font.id === selectedFont()?.id"
|
|
565
|
-
[style.font-family]="font.id"
|
|
566
|
-
>
|
|
567
|
-
<div>
|
|
568
|
-
<span>{{ font.title }}</span>
|
|
569
|
-
</div>
|
|
570
|
-
</div>
|
|
571
|
-
}
|
|
572
|
-
`, 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 }); }
|
|
573
|
-
}
|
|
574
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, decorators: [{
|
|
575
|
-
type: Component,
|
|
576
|
-
args: [{ template: `
|
|
577
|
-
@for (font of fonts(); track font.id) {
|
|
578
|
-
<div
|
|
579
|
-
(click)="onFontClick(font)"
|
|
580
|
-
[class.--selected]="font.id === selectedFont()?.id"
|
|
581
|
-
[style.font-family]="font.id"
|
|
582
|
-
>
|
|
583
|
-
<div>
|
|
584
|
-
<span>{{ font.title }}</span>
|
|
585
|
-
</div>
|
|
586
|
-
</div>
|
|
587
|
-
}
|
|
588
|
-
`, 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"] }]
|
|
589
|
-
}] });
|
|
590
|
-
|
|
591
|
-
var fontStyleChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
592
|
-
__proto__: null,
|
|
593
|
-
AXPFontStyleChooserWidgetComponent: AXPFontStyleChooserWidgetComponent
|
|
594
|
-
});
|
|
595
|
-
|
|
596
|
-
const AXPFontStyleChooserWidget = {
|
|
597
|
-
name: "font-style-chooser",
|
|
598
|
-
title: "Font Style Chooser",
|
|
599
|
-
icon: "fa-light fa-font",
|
|
600
|
-
type: 'editor',
|
|
601
|
-
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
602
|
-
properties: [
|
|
603
|
-
AXP_NAME_PROPERTY,
|
|
604
|
-
AXP_DATA_PATH_PROPERTY,
|
|
605
|
-
AXP_DISABLED_PROPERTY,
|
|
606
|
-
],
|
|
607
|
-
components: {
|
|
608
|
-
edit: {
|
|
609
|
-
component: () => Promise.resolve().then(function () { return fontStyleChooserWidget_component; }).then((c) => c.AXPFontStyleChooserWidgetComponent),
|
|
610
|
-
},
|
|
611
|
-
}
|
|
612
|
-
};
|
|
613
|
-
|
|
614
490
|
//#region ---- Injection Tokens ----
|
|
615
491
|
/**
|
|
616
492
|
* Injection token for icon providers.
|
|
@@ -679,10 +555,10 @@ class AXPIconChooserService {
|
|
|
679
555
|
this.iconsCache = uniqueIcons;
|
|
680
556
|
return uniqueIcons;
|
|
681
557
|
}
|
|
682
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
683
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
558
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
559
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserService, providedIn: 'root' }); }
|
|
684
560
|
}
|
|
685
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
561
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserService, decorators: [{
|
|
686
562
|
type: Injectable,
|
|
687
563
|
args: [{ providedIn: 'root' }]
|
|
688
564
|
}] });
|
|
@@ -747,22 +623,22 @@ class AXPIconChooserPopupComponent extends AXBasePageComponent {
|
|
|
747
623
|
getIconClass(icon) {
|
|
748
624
|
return `${this.selectedIconType} fa-${icon.name}`;
|
|
749
625
|
}
|
|
750
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
751
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
752
|
-
<div class="
|
|
626
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
627
|
+
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: `
|
|
628
|
+
<div class="flex flex-col h-full bg-lightest">
|
|
753
629
|
<!-- Fixed Header Section -->
|
|
754
|
-
<div class="
|
|
630
|
+
<div class="sticky top-0 z-10 bg-lightest border-b p-4 gap-4 flex flex-col">
|
|
755
631
|
<!-- Search Bar -->
|
|
756
|
-
<div class="
|
|
632
|
+
<div class="flex justify-center">
|
|
757
633
|
<ax-search-box
|
|
758
|
-
class="
|
|
634
|
+
class="w-full"
|
|
759
635
|
(onValueChanged)="handleSearch($event)"
|
|
760
636
|
[placeholder]="'@general:widgets.icon-chooser.search-placeholder' | translate | async"
|
|
761
637
|
></ax-search-box>
|
|
762
638
|
</div>
|
|
763
639
|
|
|
764
640
|
<!-- Controls Row -->
|
|
765
|
-
<div class="
|
|
641
|
+
<div class="flex justify-between items-center flex-wrap gap-2">
|
|
766
642
|
<!-- Icon Style Filter -->
|
|
767
643
|
<ax-button-group selection="single" look="outline">
|
|
768
644
|
@for (item of iconTypes; track item.name) {
|
|
@@ -791,30 +667,30 @@ class AXPIconChooserPopupComponent extends AXBasePageComponent {
|
|
|
791
667
|
</div>
|
|
792
668
|
|
|
793
669
|
<!-- Scrollable Content Area -->
|
|
794
|
-
<div class="
|
|
670
|
+
<div class="flex-1 overflow-y-auto p-4 pt-2">
|
|
795
671
|
<div
|
|
796
|
-
class="
|
|
672
|
+
class="grid gap-1"
|
|
797
673
|
[ngClass]="
|
|
798
674
|
selectedViewMode === 'square'
|
|
799
|
-
? '
|
|
800
|
-
: '
|
|
675
|
+
? 'grid-cols-[repeat(auto-fill,minmax(6rem,1fr))]'
|
|
676
|
+
: 'grid-cols-1 md:grid-cols-2'
|
|
801
677
|
"
|
|
802
678
|
>
|
|
803
679
|
@for (icon of filteredIcons; track icon) {
|
|
804
680
|
<div
|
|
805
|
-
class="
|
|
681
|
+
class="p-4 border border-transparent rounded-lg flex items-center justify-center gap-2 cursor-pointer transition-all duration-200 ease-in-out hover:border-primary hover:shadow-md"
|
|
806
682
|
[ngClass]="{
|
|
807
|
-
'
|
|
808
|
-
'
|
|
683
|
+
'flex-col': selectedViewMode === 'square',
|
|
684
|
+
'flex-row justify-start': selectedViewMode === 'rectangle',
|
|
809
685
|
}"
|
|
810
686
|
(click)="selectIcon(icon)"
|
|
811
687
|
>
|
|
812
|
-
<i [class]="getIconClass(icon) + '
|
|
688
|
+
<i [class]="getIconClass(icon) + ' text-3xl'"></i>
|
|
813
689
|
<span
|
|
814
|
-
class="
|
|
690
|
+
class="text-xs w-full overflow-hidden text-ellipsis whitespace-nowrap"
|
|
815
691
|
[ngClass]="{
|
|
816
|
-
'
|
|
817
|
-
'
|
|
692
|
+
'text-center': selectedViewMode === 'square',
|
|
693
|
+
'text-left': selectedViewMode === 'rectangle',
|
|
818
694
|
}"
|
|
819
695
|
>{{ icon.label }}</span
|
|
820
696
|
>
|
|
@@ -823,26 +699,26 @@ class AXPIconChooserPopupComponent extends AXBasePageComponent {
|
|
|
823
699
|
</div>
|
|
824
700
|
</div>
|
|
825
701
|
</div>
|
|
826
|
-
`, 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", "
|
|
702
|
+
`, 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", "fitParent", "color", "look", "class", "selection"], outputs: ["onBlur", "onFocus", "lookChange", "colorChange", "disabledChange", "onClick", "selectionChange", "selectedButtonChange"] }, { kind: "component", type: i2$1.AXButtonGroupItemComponent, selector: "ax-button-group-item", inputs: ["disabled", "color", "text", "class", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange", "classChange"] }, { 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 }); }
|
|
827
703
|
}
|
|
828
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserPopupComponent, decorators: [{
|
|
829
705
|
type: Component,
|
|
830
706
|
args: [{
|
|
831
707
|
template: `
|
|
832
|
-
<div class="
|
|
708
|
+
<div class="flex flex-col h-full bg-lightest">
|
|
833
709
|
<!-- Fixed Header Section -->
|
|
834
|
-
<div class="
|
|
710
|
+
<div class="sticky top-0 z-10 bg-lightest border-b p-4 gap-4 flex flex-col">
|
|
835
711
|
<!-- Search Bar -->
|
|
836
|
-
<div class="
|
|
712
|
+
<div class="flex justify-center">
|
|
837
713
|
<ax-search-box
|
|
838
|
-
class="
|
|
714
|
+
class="w-full"
|
|
839
715
|
(onValueChanged)="handleSearch($event)"
|
|
840
716
|
[placeholder]="'@general:widgets.icon-chooser.search-placeholder' | translate | async"
|
|
841
717
|
></ax-search-box>
|
|
842
718
|
</div>
|
|
843
719
|
|
|
844
720
|
<!-- Controls Row -->
|
|
845
|
-
<div class="
|
|
721
|
+
<div class="flex justify-between items-center flex-wrap gap-2">
|
|
846
722
|
<!-- Icon Style Filter -->
|
|
847
723
|
<ax-button-group selection="single" look="outline">
|
|
848
724
|
@for (item of iconTypes; track item.name) {
|
|
@@ -871,30 +747,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
871
747
|
</div>
|
|
872
748
|
|
|
873
749
|
<!-- Scrollable Content Area -->
|
|
874
|
-
<div class="
|
|
750
|
+
<div class="flex-1 overflow-y-auto p-4 pt-2">
|
|
875
751
|
<div
|
|
876
|
-
class="
|
|
752
|
+
class="grid gap-1"
|
|
877
753
|
[ngClass]="
|
|
878
754
|
selectedViewMode === 'square'
|
|
879
|
-
? '
|
|
880
|
-
: '
|
|
755
|
+
? 'grid-cols-[repeat(auto-fill,minmax(6rem,1fr))]'
|
|
756
|
+
: 'grid-cols-1 md:grid-cols-2'
|
|
881
757
|
"
|
|
882
758
|
>
|
|
883
759
|
@for (icon of filteredIcons; track icon) {
|
|
884
760
|
<div
|
|
885
|
-
class="
|
|
761
|
+
class="p-4 border border-transparent rounded-lg flex items-center justify-center gap-2 cursor-pointer transition-all duration-200 ease-in-out hover:border-primary hover:shadow-md"
|
|
886
762
|
[ngClass]="{
|
|
887
|
-
'
|
|
888
|
-
'
|
|
763
|
+
'flex-col': selectedViewMode === 'square',
|
|
764
|
+
'flex-row justify-start': selectedViewMode === 'rectangle',
|
|
889
765
|
}"
|
|
890
766
|
(click)="selectIcon(icon)"
|
|
891
767
|
>
|
|
892
|
-
<i [class]="getIconClass(icon) + '
|
|
768
|
+
<i [class]="getIconClass(icon) + ' text-3xl'"></i>
|
|
893
769
|
<span
|
|
894
|
-
class="
|
|
770
|
+
class="text-xs w-full overflow-hidden text-ellipsis whitespace-nowrap"
|
|
895
771
|
[ngClass]="{
|
|
896
|
-
'
|
|
897
|
-
'
|
|
772
|
+
'text-center': selectedViewMode === 'square',
|
|
773
|
+
'text-left': selectedViewMode === 'rectangle',
|
|
898
774
|
}"
|
|
899
775
|
>{{ icon.label }}</span
|
|
900
776
|
>
|
|
@@ -930,7 +806,7 @@ class AXPIconChooserWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
930
806
|
}
|
|
931
807
|
}
|
|
932
808
|
return value;
|
|
933
|
-
}, ...(ngDevMode ? [{ debugName: "computedValue" }] : []));
|
|
809
|
+
}, ...(ngDevMode ? [{ debugName: "computedValue" }] : /* istanbul ignore next */ []));
|
|
934
810
|
}
|
|
935
811
|
async openPopup() {
|
|
936
812
|
const result = await this.popupService.open(AXPIconChooserPopupComponent, {
|
|
@@ -955,16 +831,13 @@ class AXPIconChooserWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
955
831
|
editIcon() {
|
|
956
832
|
this.openPopup();
|
|
957
833
|
}
|
|
958
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
959
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
960
|
-
<div
|
|
961
|
-
class="ax-grid ax-grid-cols-[6rem_auto] ax-items-center ax-rounded-md ax-text-3xl ax-w-fit"
|
|
962
|
-
[class.ax-border]="getValue()"
|
|
963
|
-
>
|
|
834
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
835
|
+
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: `
|
|
836
|
+
<div class="grid grid-cols-[6rem_auto] items-center rounded-md text-3xl w-fit" [class.border]="getValue()">
|
|
964
837
|
<!-- Left: Add or Selected Icon -->
|
|
965
838
|
<div
|
|
966
|
-
class="
|
|
967
|
-
[class]="getValue() ? '
|
|
839
|
+
class="grid place-items-center w-24 h-24"
|
|
840
|
+
[class]="getValue() ? 'border-e cursor-default' : 'icon-container cursor-pointer'"
|
|
968
841
|
(click)="addIcon()"
|
|
969
842
|
>
|
|
970
843
|
<i [class]="getValue() ? computedValue().styleClass + ' ' + computedValue().iconClass : 'fa-solid fa-plus'"></i>
|
|
@@ -972,32 +845,26 @@ class AXPIconChooserWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
972
845
|
|
|
973
846
|
<!-- Right: Edit & Delete (only if value exists) -->
|
|
974
847
|
@if (getValue()) {
|
|
975
|
-
<div class="
|
|
976
|
-
<div class="
|
|
977
|
-
<i class="fa-light fa-edit
|
|
848
|
+
<div class="flex flex-col w-16 text-2xl">
|
|
849
|
+
<div class="h-12 grid place-items-center cursor-pointer hover:bg-surface" (click)="editIcon()">
|
|
850
|
+
<i class="fa-light fa-edit text-primary-400"></i>
|
|
978
851
|
</div>
|
|
979
|
-
<div
|
|
980
|
-
class="
|
|
981
|
-
(click)="deleteIcon()"
|
|
982
|
-
>
|
|
983
|
-
<i class="fa-light fa-trash-can ax-text-danger-400"></i>
|
|
852
|
+
<div class="h-12 grid place-items-center cursor-pointer border-t hover:bg-surface" (click)="deleteIcon()">
|
|
853
|
+
<i class="fa-light fa-trash-can text-danger-400"></i>
|
|
984
854
|
</div>
|
|
985
855
|
</div>
|
|
986
856
|
}
|
|
987
857
|
</div>
|
|
988
|
-
|
|
858
|
+
`, isInline: true, styles: [".icon-container{background-color:theme(\"colors.primary.300 / 10%\");background-image:linear-gradient(135deg,theme(\"colors.primary.300 / 50%\") 10%,transparent 0,transparent 50%,theme(\"colors.primary.300 / 50%\") 0,theme(\"colors.primary.300 / 50%\") 60%,transparent 0,transparent);background-size:7.5px 7.5px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
989
859
|
}
|
|
990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
860
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserWidgetEditComponent, decorators: [{
|
|
991
861
|
type: Component,
|
|
992
862
|
args: [{ selector: 'ax-icon-chooser-edit', template: `
|
|
993
|
-
<div
|
|
994
|
-
class="ax-grid ax-grid-cols-[6rem_auto] ax-items-center ax-rounded-md ax-text-3xl ax-w-fit"
|
|
995
|
-
[class.ax-border]="getValue()"
|
|
996
|
-
>
|
|
863
|
+
<div class="grid grid-cols-[6rem_auto] items-center rounded-md text-3xl w-fit" [class.border]="getValue()">
|
|
997
864
|
<!-- Left: Add or Selected Icon -->
|
|
998
865
|
<div
|
|
999
|
-
class="
|
|
1000
|
-
[class]="getValue() ? '
|
|
866
|
+
class="grid place-items-center w-24 h-24"
|
|
867
|
+
[class]="getValue() ? 'border-e cursor-default' : 'icon-container cursor-pointer'"
|
|
1001
868
|
(click)="addIcon()"
|
|
1002
869
|
>
|
|
1003
870
|
<i [class]="getValue() ? computedValue().styleClass + ' ' + computedValue().iconClass : 'fa-solid fa-plus'"></i>
|
|
@@ -1005,20 +872,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
1005
872
|
|
|
1006
873
|
<!-- Right: Edit & Delete (only if value exists) -->
|
|
1007
874
|
@if (getValue()) {
|
|
1008
|
-
<div class="
|
|
1009
|
-
<div class="
|
|
1010
|
-
<i class="fa-light fa-edit
|
|
875
|
+
<div class="flex flex-col w-16 text-2xl">
|
|
876
|
+
<div class="h-12 grid place-items-center cursor-pointer hover:bg-surface" (click)="editIcon()">
|
|
877
|
+
<i class="fa-light fa-edit text-primary-400"></i>
|
|
1011
878
|
</div>
|
|
1012
|
-
<div
|
|
1013
|
-
class="
|
|
1014
|
-
(click)="deleteIcon()"
|
|
1015
|
-
>
|
|
1016
|
-
<i class="fa-light fa-trash-can ax-text-danger-400"></i>
|
|
879
|
+
<div class="h-12 grid place-items-center cursor-pointer border-t hover:bg-surface" (click)="deleteIcon()">
|
|
880
|
+
<i class="fa-light fa-trash-can text-danger-400"></i>
|
|
1017
881
|
</div>
|
|
1018
882
|
</div>
|
|
1019
883
|
}
|
|
1020
884
|
</div>
|
|
1021
|
-
|
|
885
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".icon-container{background-color:theme(\"colors.primary.300 / 10%\");background-image:linear-gradient(135deg,theme(\"colors.primary.300 / 50%\") 10%,transparent 0,transparent 50%,theme(\"colors.primary.300 / 50%\") 0,theme(\"colors.primary.300 / 50%\") 60%,transparent 0,transparent);background-size:7.5px 7.5px}\n"] }]
|
|
1022
886
|
}] });
|
|
1023
887
|
|
|
1024
888
|
var iconChooserEdit_component = /*#__PURE__*/Object.freeze({
|
|
@@ -1029,7 +893,7 @@ var iconChooserEdit_component = /*#__PURE__*/Object.freeze({
|
|
|
1029
893
|
const AXPIconChooserWidget = {
|
|
1030
894
|
name: 'icon-chooser',
|
|
1031
895
|
title: 'Icon Chooser',
|
|
1032
|
-
icon: 'fa-
|
|
896
|
+
icon: 'fa-light fa-icons',
|
|
1033
897
|
type: 'editor',
|
|
1034
898
|
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
1035
899
|
properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
|
|
@@ -1038,10 +902,10 @@ const AXPIconChooserWidget = {
|
|
|
1038
902
|
component: () => Promise.resolve().then(function () { return iconChooserEdit_component; }).then((c) => c.AXPIconChooserWidgetEditComponent),
|
|
1039
903
|
},
|
|
1040
904
|
column: {
|
|
1041
|
-
component: () => import('./acorex-platform-themes-shared-icon-chooser-column.component-
|
|
905
|
+
component: () => import('./acorex-platform-themes-shared-icon-chooser-column.component-QL2-ZUVg.mjs').then((c) => c.AXPIconChooserWidgetColumnComponent),
|
|
1042
906
|
},
|
|
1043
907
|
view: {
|
|
1044
|
-
component: () => import('./acorex-platform-themes-shared-icon-chooser-view.component-
|
|
908
|
+
component: () => import('./acorex-platform-themes-shared-icon-chooser-view.component-BXydqPt_.mjs').then((c) => c.AXPIconChooserWidgetViewComponent),
|
|
1045
909
|
},
|
|
1046
910
|
},
|
|
1047
911
|
};
|
|
@@ -1586,26 +1450,172 @@ function provideCustomIconStyleProvider(providerClass) {
|
|
|
1586
1450
|
}
|
|
1587
1451
|
//#endregion
|
|
1588
1452
|
|
|
1453
|
+
class AXPFontSizeChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
1454
|
+
constructor() {
|
|
1455
|
+
super(...arguments);
|
|
1456
|
+
this.sizes = signal(['small', 'medium', 'large', 'x-large'], ...(ngDevMode ? [{ debugName: "sizes" }] : /* istanbul ignore next */ []));
|
|
1457
|
+
this.selectedSize = signal(null, ...(ngDevMode ? [{ debugName: "selectedSize" }] : /* istanbul ignore next */ []));
|
|
1458
|
+
this.#eff = effect(() => {
|
|
1459
|
+
if (this.getValue()) {
|
|
1460
|
+
this.selectedSize.set(this.sizes().find((s) => s === this.getValue()) ?? this.sizes()[0]);
|
|
1461
|
+
}
|
|
1462
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
|
|
1463
|
+
}
|
|
1464
|
+
#eff;
|
|
1465
|
+
onSizeClick(size) {
|
|
1466
|
+
this.setValue(size);
|
|
1467
|
+
}
|
|
1468
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1469
|
+
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: `
|
|
1470
|
+
@for (size of sizes(); track size) {
|
|
1471
|
+
<div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
|
|
1472
|
+
<div>
|
|
1473
|
+
<span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
|
|
1474
|
+
</div>
|
|
1475
|
+
</div>
|
|
1476
|
+
}
|
|
1477
|
+
`, isInline: true, styles: ["@layer properties;:host{display:flex;flex-direction:row;flex-wrap:wrap;gap:calc(var(--spacing, .25rem) * 2)}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);border-radius:var(--radius-lg, .5rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);background-color:var(--color-light);color:var(--color-on-light);border-color:var(--color-border-light);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s}:host>div:where(.ax-dark,.ax-dark *){background-color:var(--color-surface);color:var(--color-on-surface);border-color:var(--color-border-surface)}:host>div:hover{background-color:var(--color-dark);color:var(--color-on-dark);border-color:var(--color-border-dark)}:host>div.--selected{background-color:var(--color-primary-lighter);color:var(--color-on-primary-lighter);border-color:var(--color-border-primary-lighter)}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:var(--text-xl, 1.25rem);line-height:var(--tw-leading, var(--text-xl--line-height, calc(1.75 / 1.25)))}:host>div>span{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */\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 }); }
|
|
1478
|
+
}
|
|
1479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, decorators: [{
|
|
1480
|
+
type: Component,
|
|
1481
|
+
args: [{ template: `
|
|
1482
|
+
@for (size of sizes(); track size) {
|
|
1483
|
+
<div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
|
|
1484
|
+
<div>
|
|
1485
|
+
<span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
|
|
1486
|
+
</div>
|
|
1487
|
+
</div>
|
|
1488
|
+
}
|
|
1489
|
+
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, AXSelectionCdkModule, AXTranslationModule], styles: ["@layer properties;:host{display:flex;flex-direction:row;flex-wrap:wrap;gap:calc(var(--spacing, .25rem) * 2)}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);border-radius:var(--radius-lg, .5rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);background-color:var(--color-light);color:var(--color-on-light);border-color:var(--color-border-light);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s}:host>div:where(.ax-dark,.ax-dark *){background-color:var(--color-surface);color:var(--color-on-surface);border-color:var(--color-border-surface)}:host>div:hover{background-color:var(--color-dark);color:var(--color-on-dark);border-color:var(--color-border-dark)}:host>div.--selected{background-color:var(--color-primary-lighter);color:var(--color-on-primary-lighter);border-color:var(--color-border-primary-lighter)}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:var(--text-xl, 1.25rem);line-height:var(--tw-leading, var(--text-xl--line-height, calc(1.75 / 1.25)))}:host>div>span{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */\n"] }]
|
|
1490
|
+
}] });
|
|
1491
|
+
|
|
1492
|
+
var fontSizeChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
1493
|
+
__proto__: null,
|
|
1494
|
+
AXPFontSizeChooserWidgetComponent: AXPFontSizeChooserWidgetComponent
|
|
1495
|
+
});
|
|
1496
|
+
|
|
1497
|
+
const AXPFontSizeChooserWidget = {
|
|
1498
|
+
name: "font-size-chooser",
|
|
1499
|
+
title: "Font Size Chooser",
|
|
1500
|
+
icon: "fa-light fa-text-size",
|
|
1501
|
+
type: 'editor',
|
|
1502
|
+
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
1503
|
+
properties: [
|
|
1504
|
+
AXP_NAME_PROPERTY,
|
|
1505
|
+
AXP_DATA_PATH_PROPERTY,
|
|
1506
|
+
AXP_DISABLED_PROPERTY,
|
|
1507
|
+
],
|
|
1508
|
+
components: {
|
|
1509
|
+
edit: {
|
|
1510
|
+
component: () => Promise.resolve().then(function () { return fontSizeChooserWidget_component; }).then((c) => c.AXPFontSizeChooserWidgetComponent),
|
|
1511
|
+
},
|
|
1512
|
+
}
|
|
1513
|
+
};
|
|
1514
|
+
|
|
1515
|
+
class AXPFontStyleChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
1516
|
+
constructor() {
|
|
1517
|
+
super(...arguments);
|
|
1518
|
+
this.fonts = signal([
|
|
1519
|
+
{ id: 'system-ui', title: 'Default' },
|
|
1520
|
+
{ id: 'serif', title: 'Serif' },
|
|
1521
|
+
{ id: 'sans-serif', title: 'Sans-serif' },
|
|
1522
|
+
{ id: 'monospace', title: 'Monospace' },
|
|
1523
|
+
{ id: 'arial', title: 'Arial' },
|
|
1524
|
+
{ id: 'verdana', title: 'Verdana' },
|
|
1525
|
+
{ id: 'tahoma', title: 'Tahoma' },
|
|
1526
|
+
{ id: 'times-new-roman', title: 'Times New Roman' },
|
|
1527
|
+
{ id: 'georgia', title: 'Georgia' },
|
|
1528
|
+
{ id: 'helvetica', title: 'Helvetica' },
|
|
1529
|
+
{ id: 'calibri', title: 'Calibri' },
|
|
1530
|
+
{ id: 'cursive', title: 'Cursive' },
|
|
1531
|
+
{ id: 'vazirmatn', title: 'Vazir وزیر' },
|
|
1532
|
+
], ...(ngDevMode ? [{ debugName: "fonts" }] : /* istanbul ignore next */ []));
|
|
1533
|
+
this.selectedFont = signal(null, ...(ngDevMode ? [{ debugName: "selectedFont" }] : /* istanbul ignore next */ []));
|
|
1534
|
+
this.#eff = effect(() => {
|
|
1535
|
+
if (this.getValue()) {
|
|
1536
|
+
this.selectedFont.set(this.fonts().find((f) => f.id === this.getValue()) ?? this.fonts()[0]);
|
|
1537
|
+
}
|
|
1538
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
|
|
1539
|
+
}
|
|
1540
|
+
#eff;
|
|
1541
|
+
onFontClick(font) {
|
|
1542
|
+
this.setValue(font.id);
|
|
1543
|
+
}
|
|
1544
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1545
|
+
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: `
|
|
1546
|
+
@for (font of fonts(); track font.id) {
|
|
1547
|
+
<div
|
|
1548
|
+
(click)="onFontClick(font)"
|
|
1549
|
+
[class.--selected]="font.id === selectedFont()?.id"
|
|
1550
|
+
[style.font-family]="font.id"
|
|
1551
|
+
>
|
|
1552
|
+
<div>
|
|
1553
|
+
<span>{{ font.title }}</span>
|
|
1554
|
+
</div>
|
|
1555
|
+
</div>
|
|
1556
|
+
}
|
|
1557
|
+
`, isInline: true, styles: ["@layer properties;:host{display:flex;flex-direction:row;flex-wrap:wrap;gap:calc(var(--spacing, .25rem) * 2)}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);border-radius:var(--radius-lg, .5rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);background-color:var(--color-light);color:var(--color-on-light);border-color:var(--color-border-light);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s}:host>div:where(.ax-dark,.ax-dark *){background-color:var(--color-surface);color:var(--color-on-surface);border-color:var(--color-border-surface)}:host>div:hover{background-color:var(--color-dark);color:var(--color-on-dark);border-color:var(--color-border-dark)}:host>div.--selected{background-color:var(--color-primary-lighter);color:var(--color-on-primary-lighter);border-color:var(--color-border-primary-lighter)}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:var(--text-xl, 1.25rem);line-height:var(--tw-leading, var(--text-xl--line-height, calc(1.75 / 1.25)))}:host>div>span{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1558
|
+
}
|
|
1559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, decorators: [{
|
|
1560
|
+
type: Component,
|
|
1561
|
+
args: [{ template: `
|
|
1562
|
+
@for (font of fonts(); track font.id) {
|
|
1563
|
+
<div
|
|
1564
|
+
(click)="onFontClick(font)"
|
|
1565
|
+
[class.--selected]="font.id === selectedFont()?.id"
|
|
1566
|
+
[style.font-family]="font.id"
|
|
1567
|
+
>
|
|
1568
|
+
<div>
|
|
1569
|
+
<span>{{ font.title }}</span>
|
|
1570
|
+
</div>
|
|
1571
|
+
</div>
|
|
1572
|
+
}
|
|
1573
|
+
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, AXSelectionCdkModule], styles: ["@layer properties;:host{display:flex;flex-direction:row;flex-wrap:wrap;gap:calc(var(--spacing, .25rem) * 2)}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);border-radius:var(--radius-lg, .5rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);background-color:var(--color-light);color:var(--color-on-light);border-color:var(--color-border-light);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s}:host>div:where(.ax-dark,.ax-dark *){background-color:var(--color-surface);color:var(--color-on-surface);border-color:var(--color-border-surface)}:host>div:hover{background-color:var(--color-dark);color:var(--color-on-dark);border-color:var(--color-border-dark)}:host>div.--selected{background-color:var(--color-primary-lighter);color:var(--color-on-primary-lighter);border-color:var(--color-border-primary-lighter)}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:var(--text-xl, 1.25rem);line-height:var(--tw-leading, var(--text-xl--line-height, calc(1.75 / 1.25)))}:host>div>span{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */\n"] }]
|
|
1574
|
+
}] });
|
|
1575
|
+
|
|
1576
|
+
var fontStyleChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
1577
|
+
__proto__: null,
|
|
1578
|
+
AXPFontStyleChooserWidgetComponent: AXPFontStyleChooserWidgetComponent
|
|
1579
|
+
});
|
|
1580
|
+
|
|
1581
|
+
const AXPFontStyleChooserWidget = {
|
|
1582
|
+
name: "font-style-chooser",
|
|
1583
|
+
title: "Font Style Chooser",
|
|
1584
|
+
icon: "fa-light fa-font",
|
|
1585
|
+
type: 'editor',
|
|
1586
|
+
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
1587
|
+
properties: [
|
|
1588
|
+
AXP_NAME_PROPERTY,
|
|
1589
|
+
AXP_DATA_PATH_PROPERTY,
|
|
1590
|
+
AXP_DISABLED_PROPERTY,
|
|
1591
|
+
],
|
|
1592
|
+
components: {
|
|
1593
|
+
edit: {
|
|
1594
|
+
component: () => Promise.resolve().then(function () { return fontStyleChooserWidget_component; }).then((c) => c.AXPFontStyleChooserWidgetComponent),
|
|
1595
|
+
},
|
|
1596
|
+
}
|
|
1597
|
+
};
|
|
1598
|
+
|
|
1589
1599
|
class AXPMenuOrientationChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
1590
1600
|
constructor() {
|
|
1591
1601
|
super(...arguments);
|
|
1592
1602
|
this.orientations = signal([
|
|
1593
1603
|
{ id: 'vertical', icon: 'fa-regular fa-square-ellipsis-vertical' },
|
|
1594
1604
|
{ id: 'horizontal', icon: 'fa-regular fa-square-ellipsis' },
|
|
1595
|
-
], ...(ngDevMode ? [{ debugName: "orientations" }] : []));
|
|
1596
|
-
this.selectedOrientation = signal(null, ...(ngDevMode ? [{ debugName: "selectedOrientation" }] : []));
|
|
1605
|
+
], ...(ngDevMode ? [{ debugName: "orientations" }] : /* istanbul ignore next */ []));
|
|
1606
|
+
this.selectedOrientation = signal(null, ...(ngDevMode ? [{ debugName: "selectedOrientation" }] : /* istanbul ignore next */ []));
|
|
1597
1607
|
this.#eff = effect(() => {
|
|
1598
1608
|
if (this.getValue()) {
|
|
1599
1609
|
this.selectedOrientation.set(this.orientations().find((o) => o.id === this.getValue()) ?? this.orientations()[0]);
|
|
1600
1610
|
}
|
|
1601
|
-
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
1611
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
|
|
1602
1612
|
}
|
|
1603
1613
|
#eff;
|
|
1604
1614
|
onOrientationClick(orientation) {
|
|
1605
1615
|
this.setValue(orientation.id);
|
|
1606
1616
|
}
|
|
1607
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1608
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1617
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuOrientationChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1618
|
+
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: `
|
|
1609
1619
|
@for (orientation of orientations(); track orientation.id) {
|
|
1610
1620
|
<div (click)="onOrientationClick(orientation)" [class.--selected]="orientation.id === selectedOrientation()?.id">
|
|
1611
1621
|
<div>
|
|
@@ -1614,9 +1624,9 @@ class AXPMenuOrientationChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
|
1614
1624
|
<span>{{ '@layout:terms.menu-modes.' + orientation.id | translate | async }}</span>
|
|
1615
1625
|
</div>
|
|
1616
1626
|
}
|
|
1617
|
-
`, isInline: true, styles: ["
|
|
1627
|
+
`, isInline: true, styles: ["@layer properties;:host{display:flex;flex-direction:row;flex-wrap:wrap;gap:calc(var(--spacing, .25rem) * 2)}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);border-radius:var(--radius-lg, .5rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);background-color:var(--color-light);color:var(--color-on-light);border-color:var(--color-border-light);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s}:host>div:where(.ax-dark,.ax-dark *){background-color:var(--color-surface);color:var(--color-on-surface);border-color:var(--color-border-surface)}:host>div:hover{background-color:var(--color-dark);color:var(--color-on-dark);border-color:var(--color-border-dark)}:host>div.--selected{background-color:var(--color-primary-lighter);color:var(--color-on-primary-lighter);border-color:var(--color-border-primary-lighter)}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:var(--text-xl, 1.25rem);line-height:var(--tw-leading, var(--text-xl--line-height, calc(1.75 / 1.25)))}:host>div>span{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}:host>div{padding-block:calc(var(--spacing, .25rem) * 1)}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */\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 }); }
|
|
1618
1628
|
}
|
|
1619
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1629
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuOrientationChooserWidgetComponent, decorators: [{
|
|
1620
1630
|
type: Component,
|
|
1621
1631
|
args: [{ template: `
|
|
1622
1632
|
@for (orientation of orientations(); track orientation.id) {
|
|
@@ -1627,7 +1637,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
1627
1637
|
<span>{{ '@layout:terms.menu-modes.' + orientation.id | translate | async }}</span>
|
|
1628
1638
|
</div>
|
|
1629
1639
|
}
|
|
1630
|
-
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, AXSelectionCdkModule, AXTranslationModule], styles: ["
|
|
1640
|
+
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, AXSelectionCdkModule, AXTranslationModule], styles: ["@layer properties;:host{display:flex;flex-direction:row;flex-wrap:wrap;gap:calc(var(--spacing, .25rem) * 2)}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);border-radius:var(--radius-lg, .5rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);background-color:var(--color-light);color:var(--color-on-light);border-color:var(--color-border-light);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s}:host>div:where(.ax-dark,.ax-dark *){background-color:var(--color-surface);color:var(--color-on-surface);border-color:var(--color-border-surface)}:host>div:hover{background-color:var(--color-dark);color:var(--color-on-dark);border-color:var(--color-border-dark)}:host>div.--selected{background-color:var(--color-primary-lighter);color:var(--color-on-primary-lighter);border-color:var(--color-border-primary-lighter)}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:var(--text-xl, 1.25rem);line-height:var(--tw-leading, var(--text-xl--line-height, calc(1.75 / 1.25)))}:host>div>span{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}:host>div{padding-block:calc(var(--spacing, .25rem) * 1)}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */\n"] }]
|
|
1631
1641
|
}] });
|
|
1632
1642
|
|
|
1633
1643
|
var menuOrientationChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
@@ -1653,83 +1663,152 @@ const AXPMenuOrientationChooserWidget = {
|
|
|
1653
1663
|
}
|
|
1654
1664
|
};
|
|
1655
1665
|
|
|
1656
|
-
|
|
1666
|
+
//#endregion
|
|
1667
|
+
//#region ---- Color utilities ----
|
|
1668
|
+
function hexToRgb(hex) {
|
|
1669
|
+
const normalized = hex.trim().replace(/^#/, '');
|
|
1670
|
+
const full = normalized.length === 3
|
|
1671
|
+
? normalized
|
|
1672
|
+
.split('')
|
|
1673
|
+
.map((c) => c + c)
|
|
1674
|
+
.join('')
|
|
1675
|
+
: normalized;
|
|
1676
|
+
return [parseInt(full.slice(0, 2), 16), parseInt(full.slice(2, 4), 16), parseInt(full.slice(4, 6), 16)];
|
|
1677
|
+
}
|
|
1678
|
+
function rgbToHex(r, g, b) {
|
|
1679
|
+
const clamp = (n) => Math.max(0, Math.min(255, Math.round(n)));
|
|
1680
|
+
return `#${[clamp(r), clamp(g), clamp(b)].map((c) => c.toString(16).padStart(2, '0')).join('')}`;
|
|
1681
|
+
}
|
|
1682
|
+
/**
|
|
1683
|
+
* Linear RGB mix: ratio 0 → `from`, ratio 1 → `to`.
|
|
1684
|
+
*/
|
|
1685
|
+
function mixHex(from, to, ratio) {
|
|
1686
|
+
const t = Math.max(0, Math.min(1, ratio));
|
|
1687
|
+
const [r0, g0, b0] = hexToRgb(from);
|
|
1688
|
+
const [r1, g1, b1] = hexToRgb(to);
|
|
1689
|
+
return rgbToHex(r0 + (r1 - r0) * t, g0 + (g1 - g0) * t, b0 + (b1 - b0) * t);
|
|
1690
|
+
}
|
|
1691
|
+
function relativeLuminance(hex) {
|
|
1692
|
+
const [r, g, b] = hexToRgb(hex).map((c) => {
|
|
1693
|
+
const s = c / 255;
|
|
1694
|
+
return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
|
|
1695
|
+
});
|
|
1696
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
1697
|
+
}
|
|
1698
|
+
function contrastForeground(backgroundHex) {
|
|
1699
|
+
return relativeLuminance(backgroundHex) > 0.55 ? '#171717' : '#ffffff';
|
|
1657
1700
|
}
|
|
1658
1701
|
function titleCase(str) {
|
|
1659
|
-
return str.replace(/-/g, ' ').replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.
|
|
1702
|
+
return str.replace(/-/g, ' ').replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.slice(1).toLowerCase());
|
|
1660
1703
|
}
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
'
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
name: name,
|
|
1688
|
-
color: colorClass,
|
|
1689
|
-
background: `ax-bg-${name}`,
|
|
1690
|
-
border: `ax-border-${name}`,
|
|
1691
|
-
});
|
|
1704
|
+
//#endregion
|
|
1705
|
+
//#region ---- Surface variants (palette-synchronized) ----
|
|
1706
|
+
/**
|
|
1707
|
+
* Seven tonal steps per semantic color. Backgrounds are mixed in RGB using the **same palette’s**
|
|
1708
|
+
* canvas `light` and `dark` as poles so swatches stay aligned with `AXPThemePaletteProvider` data.
|
|
1709
|
+
*/
|
|
1710
|
+
const SURFACE_VARIANTS = ['lightest', 'lighter', 'light', 'surface', 'dark', 'darker', 'darkest'];
|
|
1711
|
+
function tonalBackgroundHex(base, variant, canvas) {
|
|
1712
|
+
switch (variant) {
|
|
1713
|
+
case 'lightest':
|
|
1714
|
+
return mixHex(base, canvas.light, 0.85);
|
|
1715
|
+
case 'lighter':
|
|
1716
|
+
return mixHex(base, canvas.light, 0.62);
|
|
1717
|
+
case 'light':
|
|
1718
|
+
return mixHex(base, canvas.light, 0.38);
|
|
1719
|
+
case 'surface':
|
|
1720
|
+
return base;
|
|
1721
|
+
case 'dark':
|
|
1722
|
+
return mixHex(base, canvas.dark, 0.35);
|
|
1723
|
+
case 'darker':
|
|
1724
|
+
return mixHex(base, canvas.dark, 0.58);
|
|
1725
|
+
case 'darkest':
|
|
1726
|
+
return mixHex(base, canvas.dark, 0.8);
|
|
1727
|
+
default: {
|
|
1728
|
+
const _exhaustive = variant;
|
|
1729
|
+
return _exhaustive;
|
|
1692
1730
|
}
|
|
1693
1731
|
}
|
|
1694
|
-
return colors;
|
|
1695
1732
|
}
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
return
|
|
1733
|
+
function styleTitlePrefix(style) {
|
|
1734
|
+
const accentMatch = /^accent(\d+)$/.exec(style);
|
|
1735
|
+
if (accentMatch) {
|
|
1736
|
+
return `Accent ${accentMatch[1]}`;
|
|
1700
1737
|
}
|
|
1738
|
+
return titleCase(style);
|
|
1701
1739
|
}
|
|
1702
|
-
|
|
1740
|
+
function surfaceVariantTitle(style, variant) {
|
|
1741
|
+
if (variant === 'surface') {
|
|
1742
|
+
return styleTitlePrefix(style);
|
|
1743
|
+
}
|
|
1744
|
+
return `${styleTitlePrefix(style)} ${titleCase(variant)}`;
|
|
1745
|
+
}
|
|
1746
|
+
function pushVariantScale(entries, styleKey, baseHex, canvas) {
|
|
1747
|
+
for (const variant of SURFACE_VARIANTS) {
|
|
1748
|
+
const background = tonalBackgroundHex(baseHex, variant, canvas);
|
|
1749
|
+
const color = contrastForeground(background);
|
|
1750
|
+
const name = `${styleKey}-${variant}`;
|
|
1751
|
+
entries.push({
|
|
1752
|
+
title: surfaceVariantTitle(styleKey, variant),
|
|
1753
|
+
name,
|
|
1754
|
+
color,
|
|
1755
|
+
background,
|
|
1756
|
+
border: background,
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
function pushFlatSwatch(entries, title, name, hex) {
|
|
1761
|
+
const color = contrastForeground(hex);
|
|
1762
|
+
entries.push({ title, name, color, background: hex, border: hex });
|
|
1763
|
+
}
|
|
1764
|
+
/**
|
|
1765
|
+
* Builds the full chooser list from a single `AXPThemePalette` (colors object only).
|
|
1766
|
+
*/
|
|
1767
|
+
function buildColorsFromThemePalette(palette) {
|
|
1768
|
+
const colors = palette.colors;
|
|
1769
|
+
const canvas = { light: colors.light, dark: colors.dark };
|
|
1770
|
+
const entries = [];
|
|
1771
|
+
const core = ['primary', 'secondary', 'success', 'warning', 'danger'];
|
|
1772
|
+
for (const key of core) {
|
|
1773
|
+
pushVariantScale(entries, key, colors[key], canvas);
|
|
1774
|
+
}
|
|
1775
|
+
const neutral = colors.neutral;
|
|
1776
|
+
if (neutral) {
|
|
1777
|
+
pushVariantScale(entries, 'neutral', neutral, canvas);
|
|
1778
|
+
}
|
|
1779
|
+
colors.accents.forEach((hex, index) => {
|
|
1780
|
+
pushVariantScale(entries, `accent${index + 1}`, hex, canvas);
|
|
1781
|
+
});
|
|
1782
|
+
pushFlatSwatch(entries, 'Canvas Light', 'canvas-light', colors.light);
|
|
1783
|
+
pushFlatSwatch(entries, 'Canvas Dark', 'canvas-dark', colors.dark);
|
|
1784
|
+
return entries;
|
|
1785
|
+
}
|
|
1786
|
+
//#endregion
|
|
1787
|
+
//#region ---- Service ----
|
|
1703
1788
|
class AXPColorChooserService {
|
|
1704
1789
|
constructor() {
|
|
1705
|
-
this.
|
|
1706
|
-
this.
|
|
1707
|
-
|
|
1708
|
-
if (!injected) {
|
|
1709
|
-
return [this.defaultProvider];
|
|
1710
|
-
}
|
|
1711
|
-
const providers = Array.isArray(injected) ? injected : [injected];
|
|
1712
|
-
return [...providers, this.defaultProvider];
|
|
1713
|
-
})();
|
|
1790
|
+
this.themeStore = inject(AXPLayoutThemeService);
|
|
1791
|
+
this.palettePromise = inject(AXP_THEME_PALETTE_PROVIDER);
|
|
1792
|
+
this.cacheKey = null;
|
|
1714
1793
|
this.cache = null;
|
|
1715
1794
|
}
|
|
1716
1795
|
async getColors() {
|
|
1717
|
-
|
|
1796
|
+
const paletteName = this.themeStore.currentPalette();
|
|
1797
|
+
if (this.cache && this.cacheKey === paletteName) {
|
|
1718
1798
|
return this.cache;
|
|
1719
1799
|
}
|
|
1720
|
-
const
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
return uniqueColors;
|
|
1800
|
+
const provider = await this.palettePromise;
|
|
1801
|
+
const list = await provider.getList();
|
|
1802
|
+
const palette = list.find((p) => p.name === paletteName) ?? list.find((p) => p.name === 'default') ?? list[0] ?? null;
|
|
1803
|
+
const colors = palette ? buildColorsFromThemePalette(palette) : [];
|
|
1804
|
+
this.cacheKey = paletteName;
|
|
1805
|
+
this.cache = colors;
|
|
1806
|
+
return colors;
|
|
1728
1807
|
}
|
|
1729
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1730
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1808
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1809
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserService, providedIn: 'root' }); }
|
|
1731
1810
|
}
|
|
1732
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1811
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserService, decorators: [{
|
|
1733
1812
|
type: Injectable,
|
|
1734
1813
|
args: [{
|
|
1735
1814
|
providedIn: 'root',
|
|
@@ -1740,24 +1819,23 @@ class AXPColorChooserWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
1740
1819
|
constructor() {
|
|
1741
1820
|
super(...arguments);
|
|
1742
1821
|
this.colorService = inject(AXPColorChooserService);
|
|
1743
|
-
this.colors = signal([], ...(ngDevMode ? [{ debugName: "colors" }] : []));
|
|
1744
|
-
this.placeholder = computed(() => this.options()['placeholder'] ?? '', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
1822
|
+
this.colors = signal([], ...(ngDevMode ? [{ debugName: "colors" }] : /* istanbul ignore next */ []));
|
|
1823
|
+
this.placeholder = computed(() => this.options()['placeholder'] ?? '', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
1745
1824
|
this.selectedColor = computed(() => {
|
|
1746
1825
|
const value = this.getValue();
|
|
1826
|
+
const fallbackName = () => this.colors()[0]?.name;
|
|
1747
1827
|
if (!value) {
|
|
1748
|
-
return
|
|
1828
|
+
return fallbackName();
|
|
1749
1829
|
}
|
|
1750
|
-
// If value is a string in the format: "ax-text-* ax-bg-* ax-border-*"
|
|
1751
1830
|
if (typeof value === 'string') {
|
|
1752
1831
|
const parsed = this.parseStringValue(value);
|
|
1753
1832
|
if (parsed) {
|
|
1754
1833
|
return parsed;
|
|
1755
1834
|
}
|
|
1756
|
-
return
|
|
1835
|
+
return fallbackName();
|
|
1757
1836
|
}
|
|
1758
|
-
// Otherwise value is an object
|
|
1759
1837
|
return value.name;
|
|
1760
|
-
}, ...(ngDevMode ? [{ debugName: "selectedColor" }] : []));
|
|
1838
|
+
}, ...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
|
|
1761
1839
|
}
|
|
1762
1840
|
async ngOnInit() {
|
|
1763
1841
|
const allColors = await this.colorService.getColors();
|
|
@@ -1776,6 +1854,9 @@ class AXPColorChooserWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
1776
1854
|
this.setValue(stringValue);
|
|
1777
1855
|
}
|
|
1778
1856
|
}
|
|
1857
|
+
isHexSwatch(color) {
|
|
1858
|
+
return color.background.startsWith('#');
|
|
1859
|
+
}
|
|
1779
1860
|
parseStringValue(value) {
|
|
1780
1861
|
const parts = value.trim().split(/\s+/);
|
|
1781
1862
|
if (parts.length !== 3) {
|
|
@@ -1785,71 +1866,93 @@ class AXPColorChooserWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
1785
1866
|
const match = this.colors().find((c) => c.color === color && c.background === background && c.border === border);
|
|
1786
1867
|
return match?.name ?? null;
|
|
1787
1868
|
}
|
|
1788
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1789
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1869
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1870
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPColorChooserWidgetEditComponent, isStandalone: true, selector: "ax-color-chooser-widget", usesInheritance: true, ngImport: i0, template: `
|
|
1871
|
+
<ax-form [messageStyle]="'float'" [updateOn]="'change'">
|
|
1872
|
+
<ax-form-field>
|
|
1873
|
+
<ax-select-box
|
|
1874
|
+
[dataSource]="colors()"
|
|
1875
|
+
textField="title"
|
|
1876
|
+
valueField="name"
|
|
1877
|
+
[placeholder]="placeholder()"
|
|
1878
|
+
[itemTemplate]="customItemTemplate"
|
|
1879
|
+
[ngModel]="selectedColor()"
|
|
1880
|
+
(onValueChanged)="handleValueChange($event)"
|
|
1881
|
+
[selectedTemplate]="customItemTemplate"
|
|
1882
|
+
>
|
|
1883
|
+
<ng-template #customItemTemplate let-item>
|
|
1884
|
+
<div class="flex items-center gap-2 p-2">
|
|
1885
|
+
@if (isHexSwatch(item.data)) {
|
|
1886
|
+
<div
|
|
1887
|
+
class="w-6 h-6 rounded flex items-center justify-center border border-solid"
|
|
1888
|
+
[style.background-color]="item.data.background"
|
|
1889
|
+
[style.border-color]="item.data.border"
|
|
1890
|
+
[style.color]="item.data.color"
|
|
1891
|
+
>
|
|
1892
|
+
<span>Aa</span>
|
|
1893
|
+
</div>
|
|
1894
|
+
} @else {
|
|
1804
1895
|
<div
|
|
1805
|
-
class="
|
|
1806
|
-
[
|
|
1896
|
+
class="w-6 h-6 rounded flex items-center justify-center border border-dashed border-black dark:border-white"
|
|
1897
|
+
[class]="item.data.background"
|
|
1807
1898
|
>
|
|
1808
|
-
<span [
|
|
1899
|
+
<span [class]="item.data.color">Aa</span>
|
|
1809
1900
|
</div>
|
|
1810
|
-
|
|
1811
|
-
</
|
|
1812
|
-
</
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
</ax-
|
|
1817
|
-
</ax-form>
|
|
1818
|
-
|
|
1901
|
+
}
|
|
1902
|
+
<span>{{ item.data.title }}</span>
|
|
1903
|
+
</div>
|
|
1904
|
+
</ng-template>
|
|
1905
|
+
<ax-search-box look="fill"></ax-search-box>
|
|
1906
|
+
<ax-validation-rule message="field can't be empty" rule="required"></ax-validation-rule>
|
|
1907
|
+
</ax-select-box>
|
|
1908
|
+
</ax-form-field>
|
|
1909
|
+
</ax-form>
|
|
1910
|
+
`, 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 }); }
|
|
1819
1911
|
}
|
|
1820
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1912
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserWidgetEditComponent, decorators: [{
|
|
1821
1913
|
type: Component,
|
|
1822
1914
|
args: [{
|
|
1823
1915
|
selector: 'ax-color-chooser-widget',
|
|
1824
1916
|
template: `
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1917
|
+
<ax-form [messageStyle]="'float'" [updateOn]="'change'">
|
|
1918
|
+
<ax-form-field>
|
|
1919
|
+
<ax-select-box
|
|
1920
|
+
[dataSource]="colors()"
|
|
1921
|
+
textField="title"
|
|
1922
|
+
valueField="name"
|
|
1923
|
+
[placeholder]="placeholder()"
|
|
1924
|
+
[itemTemplate]="customItemTemplate"
|
|
1925
|
+
[ngModel]="selectedColor()"
|
|
1926
|
+
(onValueChanged)="handleValueChange($event)"
|
|
1927
|
+
[selectedTemplate]="customItemTemplate"
|
|
1928
|
+
>
|
|
1929
|
+
<ng-template #customItemTemplate let-item>
|
|
1930
|
+
<div class="flex items-center gap-2 p-2">
|
|
1931
|
+
@if (isHexSwatch(item.data)) {
|
|
1932
|
+
<div
|
|
1933
|
+
class="w-6 h-6 rounded flex items-center justify-center border border-solid"
|
|
1934
|
+
[style.background-color]="item.data.background"
|
|
1935
|
+
[style.border-color]="item.data.border"
|
|
1936
|
+
[style.color]="item.data.color"
|
|
1937
|
+
>
|
|
1938
|
+
<span>Aa</span>
|
|
1939
|
+
</div>
|
|
1940
|
+
} @else {
|
|
1839
1941
|
<div
|
|
1840
|
-
class="
|
|
1841
|
-
[
|
|
1942
|
+
class="w-6 h-6 rounded flex items-center justify-center border border-dashed border-black dark:border-white"
|
|
1943
|
+
[class]="item.data.background"
|
|
1842
1944
|
>
|
|
1843
|
-
<span [
|
|
1945
|
+
<span [class]="item.data.color">Aa</span>
|
|
1844
1946
|
</div>
|
|
1845
|
-
|
|
1846
|
-
</
|
|
1847
|
-
</
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
</ax-
|
|
1852
|
-
</ax-form>
|
|
1947
|
+
}
|
|
1948
|
+
<span>{{ item.data.title }}</span>
|
|
1949
|
+
</div>
|
|
1950
|
+
</ng-template>
|
|
1951
|
+
<ax-search-box look="fill"></ax-search-box>
|
|
1952
|
+
<ax-validation-rule message="field can't be empty" rule="required"></ax-validation-rule>
|
|
1953
|
+
</ax-select-box>
|
|
1954
|
+
</ax-form-field>
|
|
1955
|
+
</ax-form>
|
|
1853
1956
|
`,
|
|
1854
1957
|
imports: [AXSelectBoxModule, AXFormModule, CommonModule, AXSearchBoxModule, AXButtonModule, FormsModule],
|
|
1855
1958
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1864,7 +1967,7 @@ var themeColorChooserEdit_component = /*#__PURE__*/Object.freeze({
|
|
|
1864
1967
|
const AXPThemeColorChooserWidgetConfig = {
|
|
1865
1968
|
name: 'theme-color-chooser',
|
|
1866
1969
|
title: 'Theme Color Chooser',
|
|
1867
|
-
icon: 'fa-
|
|
1970
|
+
icon: 'fa-light fa-palette',
|
|
1868
1971
|
type: 'editor',
|
|
1869
1972
|
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
1870
1973
|
properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
|
|
@@ -1873,10 +1976,10 @@ const AXPThemeColorChooserWidgetConfig = {
|
|
|
1873
1976
|
component: () => Promise.resolve().then(function () { return themeColorChooserEdit_component; }).then((c) => c.AXPColorChooserWidgetEditComponent),
|
|
1874
1977
|
},
|
|
1875
1978
|
column: {
|
|
1876
|
-
component: () => import('./acorex-platform-themes-shared-theme-color-chooser-column.component-
|
|
1979
|
+
component: () => import('./acorex-platform-themes-shared-theme-color-chooser-column.component-Cb9iY6k9.mjs').then((c) => c.AXPColorChooserWidgetColumnComponent),
|
|
1877
1980
|
},
|
|
1878
1981
|
view: {
|
|
1879
|
-
component: () => import('./acorex-platform-themes-shared-theme-color-chooser-view.component-
|
|
1982
|
+
component: () => import('./acorex-platform-themes-shared-theme-color-chooser-view.component-KP4-BND5.mjs').then((c) => c.AXPColorChooserWidgetViewComponent),
|
|
1880
1983
|
},
|
|
1881
1984
|
},
|
|
1882
1985
|
};
|
|
@@ -1888,20 +1991,20 @@ class AXPThemeModeChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
|
1888
1991
|
{ id: AXPThemeMode.Light, icon: 'fa-light fa-brightness' },
|
|
1889
1992
|
{ id: AXPThemeMode.Dark, icon: 'fa-light fa-moon' },
|
|
1890
1993
|
{ id: AXPThemeMode.System, icon: 'fa-light fa-desktop' },
|
|
1891
|
-
], ...(ngDevMode ? [{ debugName: "modes" }] : []));
|
|
1892
|
-
this.selectedMode = signal(null, ...(ngDevMode ? [{ debugName: "selectedMode" }] : []));
|
|
1994
|
+
], ...(ngDevMode ? [{ debugName: "modes" }] : /* istanbul ignore next */ []));
|
|
1995
|
+
this.selectedMode = signal(null, ...(ngDevMode ? [{ debugName: "selectedMode" }] : /* istanbul ignore next */ []));
|
|
1893
1996
|
this.#eff = effect(() => {
|
|
1894
1997
|
if (this.getValue()) {
|
|
1895
1998
|
this.selectedMode.set(this.modes().find((m) => m.id === this.getValue()) ?? this.modes()[0]);
|
|
1896
1999
|
}
|
|
1897
|
-
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
2000
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
|
|
1898
2001
|
}
|
|
1899
2002
|
#eff;
|
|
1900
2003
|
onModeClick(mode) {
|
|
1901
2004
|
this.setValue(mode.id);
|
|
1902
2005
|
}
|
|
1903
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1904
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2006
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeModeChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2007
|
+
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: `
|
|
1905
2008
|
@for (mode of modes(); track mode.id) {
|
|
1906
2009
|
<div (click)="onModeClick(mode)" [class.--selected]="mode.id === selectedMode()?.id">
|
|
1907
2010
|
<div>
|
|
@@ -1910,9 +2013,9 @@ class AXPThemeModeChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
|
1910
2013
|
<span>{{ '@layout:terms.theme-modes.' + mode.id | translate | async }}</span>
|
|
1911
2014
|
</div>
|
|
1912
2015
|
}
|
|
1913
|
-
`, isInline: true, styles: ["
|
|
2016
|
+
`, isInline: true, styles: ["@layer properties;:host{display:flex;flex-direction:row;flex-wrap:wrap;gap:calc(var(--spacing, .25rem) * 2)}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);border-radius:var(--radius-lg, .5rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);background-color:var(--color-light);color:var(--color-on-light);border-color:var(--color-border-light);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s}:host>div:where(.ax-dark,.ax-dark *){background-color:var(--color-surface);color:var(--color-on-surface);border-color:var(--color-border-surface)}:host>div:hover{background-color:var(--color-dark);color:var(--color-on-dark);border-color:var(--color-border-dark)}:host>div.--selected{background-color:var(--color-primary-lighter);color:var(--color-on-primary-lighter);border-color:var(--color-border-primary-lighter)}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:var(--text-xl, 1.25rem);line-height:var(--tw-leading, var(--text-xl--line-height, calc(1.75 / 1.25)))}:host>div>span{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}:host>div{padding-block:calc(var(--spacing, .25rem) * 1)}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */\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 }); }
|
|
1914
2017
|
}
|
|
1915
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2018
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeModeChooserWidgetComponent, decorators: [{
|
|
1916
2019
|
type: Component,
|
|
1917
2020
|
args: [{ template: `
|
|
1918
2021
|
@for (mode of modes(); track mode.id) {
|
|
@@ -1923,7 +2026,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
1923
2026
|
<span>{{ '@layout:terms.theme-modes.' + mode.id | translate | async }}</span>
|
|
1924
2027
|
</div>
|
|
1925
2028
|
}
|
|
1926
|
-
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, AXSelectionCdkModule, AXTranslationModule], styles: ["
|
|
2029
|
+
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, AXSelectionCdkModule, AXTranslationModule], styles: ["@layer properties;:host{display:flex;flex-direction:row;flex-wrap:wrap;gap:calc(var(--spacing, .25rem) * 2)}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);border-radius:var(--radius-lg, .5rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);background-color:var(--color-light);color:var(--color-on-light);border-color:var(--color-border-light);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s}:host>div:where(.ax-dark,.ax-dark *){background-color:var(--color-surface);color:var(--color-on-surface);border-color:var(--color-border-surface)}:host>div:hover{background-color:var(--color-dark);color:var(--color-on-dark);border-color:var(--color-border-dark)}:host>div.--selected{background-color:var(--color-primary-lighter);color:var(--color-on-primary-lighter);border-color:var(--color-border-primary-lighter)}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:var(--text-xl, 1.25rem);line-height:var(--tw-leading, var(--text-xl--line-height, calc(1.75 / 1.25)))}:host>div>span{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}:host>div{padding-block:calc(var(--spacing, .25rem) * 1)}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */\n"] }]
|
|
1927
2030
|
}] });
|
|
1928
2031
|
|
|
1929
2032
|
var themeModeChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
@@ -1934,7 +2037,7 @@ var themeModeChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
|
1934
2037
|
const AXPThemeModeChooserWidget = {
|
|
1935
2038
|
name: "theme-mode-chooser",
|
|
1936
2039
|
title: "Theme Mode Chooser",
|
|
1937
|
-
icon: "fa-
|
|
2040
|
+
icon: "fa-light fa-square",
|
|
1938
2041
|
type: 'editor',
|
|
1939
2042
|
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
1940
2043
|
properties: [
|
|
@@ -1953,15 +2056,15 @@ class AXPThemePaletteChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
|
1953
2056
|
constructor() {
|
|
1954
2057
|
super(...arguments);
|
|
1955
2058
|
this.paletteService = inject(AXP_THEME_PALETTE_PROVIDER);
|
|
1956
|
-
this.palettes = signal([], ...(ngDevMode ? [{ debugName: "palettes" }] : []));
|
|
1957
|
-
this.selectedPalette = signal(null, ...(ngDevMode ? [{ debugName: "selectedPalette" }] : []));
|
|
2059
|
+
this.palettes = signal([], ...(ngDevMode ? [{ debugName: "palettes" }] : /* istanbul ignore next */ []));
|
|
2060
|
+
this.selectedPalette = signal(null, ...(ngDevMode ? [{ debugName: "selectedPalette" }] : /* istanbul ignore next */ []));
|
|
1958
2061
|
this.#eff = effect(() => {
|
|
1959
2062
|
if (this.getValue()) {
|
|
1960
2063
|
this.selectedPalette.set(this.palettes().find((p) => p.name === this.getValue()) ??
|
|
1961
2064
|
this.palettes().find((p) => p.name === 'default') ??
|
|
1962
2065
|
this.palettes()[0]);
|
|
1963
2066
|
}
|
|
1964
|
-
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
2067
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
|
|
1965
2068
|
}
|
|
1966
2069
|
#eff;
|
|
1967
2070
|
async ngOnInit() {
|
|
@@ -1972,34 +2075,34 @@ class AXPThemePaletteChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
|
1972
2075
|
onPaletteClick(palette) {
|
|
1973
2076
|
this.setValue(palette.name);
|
|
1974
2077
|
}
|
|
1975
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1976
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2078
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemePaletteChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2079
|
+
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: `
|
|
1977
2080
|
@for (palette of palettes(); track palette.name) {
|
|
1978
2081
|
<div (click)="onPaletteClick(palette)" [class.--selected]="palette.name === selectedPalette()?.name">
|
|
1979
2082
|
<span>{{ palette.title }}</span>
|
|
1980
2083
|
<div>
|
|
1981
|
-
<div [style.background-color]="palette.colors.primary" class="
|
|
1982
|
-
<div [style.background-color]="palette.colors.secondary" class="
|
|
1983
|
-
<div [style.background-color]="palette.colors.accents[0]" class="
|
|
2084
|
+
<div [style.background-color]="palette.colors.primary" class="end-7 z-[2]"></div>
|
|
2085
|
+
<div [style.background-color]="palette.colors.secondary" class="end-3.5 z-[1]"></div>
|
|
2086
|
+
<div [style.background-color]="palette.colors.accents[0]" class="end-0 z-0"></div>
|
|
1984
2087
|
</div>
|
|
1985
2088
|
</div>
|
|
1986
2089
|
}
|
|
1987
|
-
`, isInline: true, styles: ["
|
|
2090
|
+
`, isInline: true, styles: ["@layer properties;:host{display:flex;flex-direction:row;flex-wrap:wrap;gap:calc(var(--spacing, .25rem) * 2)}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);border-radius:var(--radius-lg, .5rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);background-color:var(--color-light);color:var(--color-on-light);border-color:var(--color-border-light);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s}:host>div:where(.ax-dark,.ax-dark *){background-color:var(--color-surface);color:var(--color-on-surface);border-color:var(--color-border-surface)}:host>div:hover{background-color:var(--color-dark);color:var(--color-on-dark);border-color:var(--color-border-dark)}:host>div.--selected{background-color:var(--color-primary-lighter);color:var(--color-on-primary-lighter);border-color:var(--color-border-primary-lighter)}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:var(--text-xl, 1.25rem);line-height:var(--tw-leading, var(--text-xl--line-height, calc(1.75 / 1.25)))}:host>div>span{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}:host>div{height:calc(var(--spacing, .25rem) * 12);min-width:100%}@media(width>=48rem){:host>div{min-width:calc(var(--spacing, .25rem) * 64)}}:host>div>div{position:relative;height:100%;width:fit-content}:host>div>div div{position:absolute;height:calc(var(--spacing, .25rem) * 8);width:calc(var(--spacing, .25rem) * 8);border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:1px;border-color:color-mix(in srgb,#fff 50%,transparent);--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@supports (color: color-mix(in lab,red,red)){:host>div>div div{border-color:color-mix(in oklab,var(--color-white, #fff) 50%,transparent)}}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial;--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1988
2091
|
}
|
|
1989
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2092
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemePaletteChooserWidgetComponent, decorators: [{
|
|
1990
2093
|
type: Component,
|
|
1991
2094
|
args: [{ template: `
|
|
1992
2095
|
@for (palette of palettes(); track palette.name) {
|
|
1993
2096
|
<div (click)="onPaletteClick(palette)" [class.--selected]="palette.name === selectedPalette()?.name">
|
|
1994
2097
|
<span>{{ palette.title }}</span>
|
|
1995
2098
|
<div>
|
|
1996
|
-
<div [style.background-color]="palette.colors.primary" class="
|
|
1997
|
-
<div [style.background-color]="palette.colors.secondary" class="
|
|
1998
|
-
<div [style.background-color]="palette.colors.accents[0]" class="
|
|
2099
|
+
<div [style.background-color]="palette.colors.primary" class="end-7 z-[2]"></div>
|
|
2100
|
+
<div [style.background-color]="palette.colors.secondary" class="end-3.5 z-[1]"></div>
|
|
2101
|
+
<div [style.background-color]="palette.colors.accents[0]" class="end-0 z-0"></div>
|
|
1999
2102
|
</div>
|
|
2000
2103
|
</div>
|
|
2001
2104
|
}
|
|
2002
|
-
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, AXSelectionCdkModule], styles: ["
|
|
2105
|
+
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, AXSelectionCdkModule], styles: ["@layer properties;:host{display:flex;flex-direction:row;flex-wrap:wrap;gap:calc(var(--spacing, .25rem) * 2)}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);border-radius:var(--radius-lg, .5rem);padding-inline:calc(var(--spacing, .25rem) * 4);padding-block:calc(var(--spacing, .25rem) * 2);background-color:var(--color-light);color:var(--color-on-light);border-color:var(--color-border-light);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s}:host>div:where(.ax-dark,.ax-dark *){background-color:var(--color-surface);color:var(--color-on-surface);border-color:var(--color-border-surface)}:host>div:hover{background-color:var(--color-dark);color:var(--color-on-dark);border-color:var(--color-border-dark)}:host>div.--selected{background-color:var(--color-primary-lighter);color:var(--color-on-primary-lighter);border-color:var(--color-border-primary-lighter)}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:var(--text-xl, 1.25rem);line-height:var(--tw-leading, var(--text-xl--line-height, calc(1.75 / 1.25)))}:host>div>span{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}:host>div{height:calc(var(--spacing, .25rem) * 12);min-width:100%}@media(width>=48rem){:host>div{min-width:calc(var(--spacing, .25rem) * 64)}}:host>div>div{position:relative;height:100%;width:fit-content}:host>div>div div{position:absolute;height:calc(var(--spacing, .25rem) * 8);width:calc(var(--spacing, .25rem) * 8);border-radius:calc(infinity * 1px);border-style:var(--tw-border-style);border-width:1px;border-color:color-mix(in srgb,#fff 50%,transparent);--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@supports (color: color-mix(in lab,red,red)){:host>div>div div{border-color:color-mix(in oklab,var(--color-white, #fff) 50%,transparent)}}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial;--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */\n"] }]
|
|
2003
2106
|
}] });
|
|
2004
2107
|
|
|
2005
2108
|
var themePaletteChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
@@ -2010,7 +2113,7 @@ var themePaletteChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
|
2010
2113
|
const AXPThemePaletteChooserWidget = {
|
|
2011
2114
|
name: "theme-palette-chooser",
|
|
2012
2115
|
title: "Theme Palette Chooser",
|
|
2013
|
-
icon: "fa-
|
|
2116
|
+
icon: "fa-light fa-square",
|
|
2014
2117
|
type: 'editor',
|
|
2015
2118
|
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
2016
2119
|
properties: [
|
|
@@ -2025,6 +2128,28 @@ const AXPThemePaletteChooserWidget = {
|
|
|
2025
2128
|
}
|
|
2026
2129
|
};
|
|
2027
2130
|
|
|
2131
|
+
//#endregion
|
|
2132
|
+
//#region ---- Theme Widgets Provider ----
|
|
2133
|
+
const WIDGETS = [
|
|
2134
|
+
AXPThemePaletteChooserWidget,
|
|
2135
|
+
AXPThemeModeChooserWidget,
|
|
2136
|
+
AXPMenuOrientationChooserWidget,
|
|
2137
|
+
AXPFontSizeChooserWidget,
|
|
2138
|
+
AXPFontStyleChooserWidget,
|
|
2139
|
+
AXPIconChooserWidget,
|
|
2140
|
+
AXPThemeColorChooserWidgetConfig,
|
|
2141
|
+
];
|
|
2142
|
+
class AXPThemesSharedWidgetsProvider {
|
|
2143
|
+
getWidgets() {
|
|
2144
|
+
return WIDGETS;
|
|
2145
|
+
}
|
|
2146
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedWidgetsProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2147
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedWidgetsProvider }); }
|
|
2148
|
+
}
|
|
2149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedWidgetsProvider, decorators: [{
|
|
2150
|
+
type: Injectable
|
|
2151
|
+
}] });
|
|
2152
|
+
|
|
2028
2153
|
class AXPThemesSharedModule {
|
|
2029
2154
|
constructor(appInitService, injector) {
|
|
2030
2155
|
const service = injector.get(AXPLayoutThemeService);
|
|
@@ -2037,14 +2162,15 @@ class AXPThemesSharedModule {
|
|
|
2037
2162
|
},
|
|
2038
2163
|
});
|
|
2039
2164
|
}
|
|
2040
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2041
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2042
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2165
|
+
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 }); }
|
|
2166
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedModule, imports: [i1$3.AXPComponentSlotModule, AXPWidgetCoreModule] }); }
|
|
2167
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedModule, providers: [
|
|
2168
|
+
{ provide: AXP_WIDGET_DEFINITION_PROVIDER, useClass: AXPThemesSharedWidgetsProvider, multi: true },
|
|
2043
2169
|
{
|
|
2044
2170
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
2045
2171
|
useFactory: async () => {
|
|
2046
2172
|
const injector = inject(Injector);
|
|
2047
|
-
const provider = (await import('./acorex-platform-themes-shared-settings.provider-
|
|
2173
|
+
const provider = (await import('./acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs')).AXPThemeSettingProvider;
|
|
2048
2174
|
return new provider(injector);
|
|
2049
2175
|
},
|
|
2050
2176
|
multi: true,
|
|
@@ -2059,19 +2185,9 @@ class AXPThemesSharedModule {
|
|
|
2059
2185
|
},
|
|
2060
2186
|
],
|
|
2061
2187
|
}),
|
|
2062
|
-
AXPWidgetCoreModule
|
|
2063
|
-
widgets: [
|
|
2064
|
-
AXPThemePaletteChooserWidget,
|
|
2065
|
-
AXPThemeModeChooserWidget,
|
|
2066
|
-
AXPMenuOrientationChooserWidget,
|
|
2067
|
-
AXPFontSizeChooserWidget,
|
|
2068
|
-
AXPFontStyleChooserWidget,
|
|
2069
|
-
AXPIconChooserWidget,
|
|
2070
|
-
AXPThemeColorChooserWidgetConfig,
|
|
2071
|
-
],
|
|
2072
|
-
})] }); }
|
|
2188
|
+
AXPWidgetCoreModule] }); }
|
|
2073
2189
|
}
|
|
2074
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedModule, decorators: [{
|
|
2075
2191
|
type: NgModule,
|
|
2076
2192
|
args: [{
|
|
2077
2193
|
imports: [
|
|
@@ -2084,26 +2200,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
2084
2200
|
},
|
|
2085
2201
|
],
|
|
2086
2202
|
}),
|
|
2087
|
-
AXPWidgetCoreModule
|
|
2088
|
-
widgets: [
|
|
2089
|
-
AXPThemePaletteChooserWidget,
|
|
2090
|
-
AXPThemeModeChooserWidget,
|
|
2091
|
-
AXPMenuOrientationChooserWidget,
|
|
2092
|
-
AXPFontSizeChooserWidget,
|
|
2093
|
-
AXPFontStyleChooserWidget,
|
|
2094
|
-
AXPIconChooserWidget,
|
|
2095
|
-
AXPThemeColorChooserWidgetConfig,
|
|
2096
|
-
],
|
|
2097
|
-
}),
|
|
2203
|
+
AXPWidgetCoreModule,
|
|
2098
2204
|
],
|
|
2099
2205
|
exports: [],
|
|
2100
2206
|
declarations: [],
|
|
2101
2207
|
providers: [
|
|
2208
|
+
{ provide: AXP_WIDGET_DEFINITION_PROVIDER, useClass: AXPThemesSharedWidgetsProvider, multi: true },
|
|
2102
2209
|
{
|
|
2103
2210
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
2104
2211
|
useFactory: async () => {
|
|
2105
2212
|
const injector = inject(Injector);
|
|
2106
|
-
const provider = (await import('./acorex-platform-themes-shared-settings.provider-
|
|
2213
|
+
const provider = (await import('./acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs')).AXPThemeSettingProvider;
|
|
2107
2214
|
return new provider(injector);
|
|
2108
2215
|
},
|
|
2109
2216
|
multi: true,
|
|
@@ -2117,5 +2224,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
2117
2224
|
* Generated bundle index. Do not edit.
|
|
2118
2225
|
*/
|
|
2119
2226
|
|
|
2120
|
-
export { AXPLayoutThemeService, AXPMenuOrientation, AXPSideMenuState, AXPThemeLayoutSetting, AXPThemeMode, AXPThemePaletteProviderDefault, AXPThemeSlotComponent, AXPThemesSharedModule, AXP_THEME_PALETTE_PROVIDER };
|
|
2227
|
+
export { AXPLayoutThemeService, AXPMenuOrientation, AXPSideMenuState, AXPThemeLayoutSetting, AXPThemeMode, AXPThemePaletteProviderDefault, AXPThemeSlotComponent, AXPThemesSharedModule, AXP_THEME_PALETTE_CSS_BASE_PATH, AXP_THEME_PALETTE_PROVIDER };
|
|
2121
2228
|
//# sourceMappingURL=acorex-platform-themes-shared.mjs.map
|