@acorex/platform 21.0.0-next.3 → 21.0.0-next.34
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 +295 -45
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-zhqNP3xb.mjs → acorex-platform-common-common-settings.provider-G9XcXXOG.mjs} +60 -4
- package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +960 -319
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +1352 -832
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +554 -826
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +530 -154
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs +121 -0
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +5969 -2347
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +169 -154
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +15380 -9274
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +393 -110
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +511 -450
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs → acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs} +10 -10
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs → acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs} +39 -16
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs → acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs} +6 -7
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs → acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs} +12 -12
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.mjs +111 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +7865 -4026
- 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 +220 -169
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs → acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs} +18 -25
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-401.component-cfREo88K.mjs → acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs → acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +1717 -66
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs → acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs} +11 -11
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs} +9 -9
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +563 -561
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +1735 -1750
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/package.json +31 -31
- package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +247 -10
- package/{common/index.d.ts → types/acorex-platform-common.d.ts} +492 -31
- package/{core/index.d.ts → types/acorex-platform-core.d.ts} +606 -392
- package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +719 -413
- package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +128 -56
- package/types/acorex-platform-layout-components.d.ts +2927 -0
- package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +9 -3
- package/{layout/entity/index.d.ts → types/acorex-platform-layout-entity.d.ts} +1133 -237
- package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +90 -31
- package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +206 -102
- package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +942 -137
- package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
- package/{runtime/index.d.ts → types/acorex-platform-runtime.d.ts} +237 -74
- package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +113 -5
- package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +1 -1
- package/types/acorex-platform-workflow.d.ts +1806 -0
- package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs +0 -157
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs +0 -1542
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs +0 -101
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-cfREo88K.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs.map +0 -1
- package/layout/components/index.d.ts +0 -1669
- package/workflow/index.d.ts +0 -2443
- /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
|
@@ -7,33 +7,30 @@ import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
|
7
7
|
import * as i1 from '@angular/common';
|
|
8
8
|
import { CommonModule } from '@angular/common';
|
|
9
9
|
import * as i0 from '@angular/core';
|
|
10
|
-
import { computed, inject, Component, InjectionToken, Injectable,
|
|
10
|
+
import { computed, inject, ChangeDetectionStrategy, Component, InjectionToken, Injectable, Input, signal, effect, Injector, NgModule } from '@angular/core';
|
|
11
11
|
import { AXPSettingsService, AXP_SETTING_DEFINITION_PROVIDER } from '@acorex/platform/common';
|
|
12
|
-
import * as i1$
|
|
13
|
-
import { AXPScreenSize, AXPPlatformScope } from '@acorex/platform/core';
|
|
12
|
+
import * as i1$3 from '@acorex/platform/core';
|
|
13
|
+
import { AXPScreenSize, AXPPlatformScope, AXPComponentSlotModule } from '@acorex/platform/core';
|
|
14
14
|
import { HttpClient } from '@angular/common/http';
|
|
15
15
|
import { signalStore, withState, withComputed, withMethods, patchState, withHooks } from '@ngrx/signals';
|
|
16
16
|
import { timer, firstValueFrom, filter } from 'rxjs';
|
|
17
17
|
import * as i5 from '@acorex/core/translation';
|
|
18
18
|
import { AXTranslationModule } from '@acorex/core/translation';
|
|
19
|
-
import
|
|
20
|
-
import { AXPValueWidgetComponent, AXP_WIDGETS_LAYOUT_CATEGORY, AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';
|
|
21
|
-
import * as i2$3 from '@acorex/platform/layout/components';
|
|
22
|
-
import { AXPComponentSlotModule } from '@acorex/platform/layout/components';
|
|
23
|
-
import * as i2$1 from '@acorex/components/form';
|
|
24
|
-
import { AXFormModule } from '@acorex/components/form';
|
|
25
|
-
import * as i4$1 from '@acorex/components/search-box';
|
|
26
|
-
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
27
|
-
import * as i1$1 from '@acorex/components/select-box';
|
|
28
|
-
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
|
29
|
-
import * as i5$1 from '@angular/forms';
|
|
30
|
-
import { FormsModule } from '@angular/forms';
|
|
31
|
-
import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY } from '@acorex/platform/layout/widgets';
|
|
32
|
-
import { AXSelectionCdkModule } from '@acorex/cdk/selection';
|
|
19
|
+
import { AXPValueWidgetComponent, AXP_WIDGETS_LAYOUT_CATEGORY, AXPWidgetCoreModule, AXP_WIDGET_DEFINITION_PROVIDER } from '@acorex/platform/layout/widget-core';
|
|
33
20
|
import { AXPopupService } from '@acorex/components/popup';
|
|
34
|
-
import * as i2$
|
|
21
|
+
import * as i2$1 from '@acorex/components/button-group';
|
|
35
22
|
import { AXButtonGroupModule } from '@acorex/components/button-group';
|
|
36
23
|
import { AXBasePageComponent } from '@acorex/components/page';
|
|
24
|
+
import * as i1$1 from '@acorex/components/search-box';
|
|
25
|
+
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
26
|
+
import { 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 i5$1 from '@angular/forms';
|
|
29
|
+
import { FormsModule } from '@angular/forms';
|
|
30
|
+
import * as i2$2 from '@acorex/components/form';
|
|
31
|
+
import { AXFormModule } from '@acorex/components/form';
|
|
32
|
+
import * as i1$2 from '@acorex/components/select-box';
|
|
33
|
+
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
|
37
34
|
|
|
38
35
|
var AXPThemeLayoutSetting;
|
|
39
36
|
(function (AXPThemeLayoutSetting) {
|
|
@@ -341,8 +338,8 @@ class AXPThemeSlotComponent {
|
|
|
341
338
|
this.store = inject(AXPLayoutThemeService);
|
|
342
339
|
this.variants = AXPThemeMode;
|
|
343
340
|
}
|
|
344
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
345
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
341
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
342
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPThemeSlotComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
|
|
346
343
|
<ax-button color="primary">
|
|
347
344
|
<ax-icon
|
|
348
345
|
class="fa-regular "
|
|
@@ -385,9 +382,9 @@ class AXPThemeSlotComponent {
|
|
|
385
382
|
</ax-button-item-list>
|
|
386
383
|
</ax-dropdown-panel>
|
|
387
384
|
</ax-button>
|
|
388
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }] }); }
|
|
385
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i5.AXTranslatorDirective, selector: "[translate]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
389
386
|
}
|
|
390
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeSlotComponent, decorators: [{
|
|
391
388
|
type: Component,
|
|
392
389
|
args: [{
|
|
393
390
|
template: `
|
|
@@ -434,7 +431,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
434
431
|
</ax-dropdown-panel>
|
|
435
432
|
</ax-button>
|
|
436
433
|
`,
|
|
437
|
-
imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXDropdownModule, AXTranslationModule]
|
|
434
|
+
imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXDropdownModule, AXTranslationModule],
|
|
435
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
438
436
|
}]
|
|
439
437
|
}] });
|
|
440
438
|
|
|
@@ -467,505 +465,131 @@ class AXPThemePaletteProviderDefault {
|
|
|
467
465
|
}
|
|
468
466
|
}
|
|
469
467
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
// ,'default'
|
|
487
|
-
];
|
|
488
|
-
for (const style of styles) {
|
|
489
|
-
for (const variant of variants) {
|
|
490
|
-
let name;
|
|
491
|
-
let colorClass;
|
|
492
|
-
// if (variant === 'default') {
|
|
493
|
-
// name = `${style}-${variant}`;
|
|
494
|
-
// colorClass = `ax-text-${style}-${variant}`;
|
|
495
|
-
// } else {
|
|
496
|
-
name = `${style}-${variant}`;
|
|
497
|
-
colorClass = `ax-text-${style}-on-${variant}`;
|
|
498
|
-
// }
|
|
499
|
-
colors.push({
|
|
500
|
-
title: titleCase(variant === 'surface' ? style : titleCase(name)),
|
|
501
|
-
name: name,
|
|
502
|
-
color: colorClass,
|
|
503
|
-
background: `ax-bg-${name}`,
|
|
504
|
-
border: `ax-border-${name}`,
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
return colors;
|
|
468
|
+
//#region ---- Injection Tokens ----
|
|
469
|
+
/**
|
|
470
|
+
* Injection token for icon providers.
|
|
471
|
+
* Use multi: true to register multiple providers.
|
|
472
|
+
*/
|
|
473
|
+
const AXP_ICON_PROVIDER = new InjectionToken('AXP_ICON_PROVIDER');
|
|
474
|
+
/**
|
|
475
|
+
* Injection token for icon style providers.
|
|
476
|
+
* Use multi: true to register multiple providers.
|
|
477
|
+
*/
|
|
478
|
+
const AXP_ICON_STYLE_PROVIDER = new InjectionToken('AXP_ICON_STYLE_PROVIDER');
|
|
479
|
+
//#endregion
|
|
480
|
+
|
|
481
|
+
//#endregion
|
|
482
|
+
//#region ---- Abstract Providers ----
|
|
483
|
+
class AXPIconProvider {
|
|
509
484
|
}
|
|
510
|
-
|
|
511
|
-
class AXPColorProviderDefault extends AXPColorProvider {
|
|
512
|
-
async provide() {
|
|
513
|
-
return DEFAULT_COLORS;
|
|
514
|
-
}
|
|
485
|
+
class AXPIconStyleProvider {
|
|
515
486
|
}
|
|
516
|
-
|
|
517
|
-
|
|
487
|
+
//#endregion
|
|
488
|
+
//#region ---- Service ----
|
|
489
|
+
class AXPIconChooserService {
|
|
518
490
|
constructor() {
|
|
519
|
-
|
|
520
|
-
this.
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
}
|
|
525
|
-
const providers = Array.isArray(injected) ? injected : [injected];
|
|
526
|
-
return [...providers, this.defaultProvider];
|
|
527
|
-
})();
|
|
528
|
-
this.cache = null;
|
|
491
|
+
//#region ---- Properties ----
|
|
492
|
+
this.iconProviders = inject(AXP_ICON_PROVIDER, { optional: true }) ?? [];
|
|
493
|
+
this.styleProviders = inject(AXP_ICON_STYLE_PROVIDER, { optional: true }) ?? [];
|
|
494
|
+
this.iconsCache = null;
|
|
495
|
+
this.stylesCache = null;
|
|
529
496
|
}
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
497
|
+
//#endregion
|
|
498
|
+
//#region ---- Public Methods ----
|
|
499
|
+
/**
|
|
500
|
+
* Get all available icon styles from registered providers.
|
|
501
|
+
* Results are cached after first call.
|
|
502
|
+
*/
|
|
503
|
+
async getStyles() {
|
|
504
|
+
if (this.stylesCache) {
|
|
505
|
+
return this.stylesCache;
|
|
533
506
|
}
|
|
534
|
-
const
|
|
535
|
-
for (const
|
|
536
|
-
const result = await
|
|
537
|
-
|
|
507
|
+
const allStyles = [];
|
|
508
|
+
for (const provider of this.styleProviders) {
|
|
509
|
+
const result = await provider.provide();
|
|
510
|
+
allStyles.push(...result);
|
|
538
511
|
}
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
512
|
+
// Remove duplicates based on style name
|
|
513
|
+
const uniqueStyles = allStyles.filter((style, index, self) => index === self.findIndex((s) => s.name === style.name));
|
|
514
|
+
this.stylesCache = uniqueStyles;
|
|
515
|
+
return uniqueStyles;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Get all available icons from registered providers.
|
|
519
|
+
* Icons from multiple providers are merged, with duplicates removed.
|
|
520
|
+
* Results are cached after first call.
|
|
521
|
+
*/
|
|
522
|
+
async getIcons() {
|
|
523
|
+
if (this.iconsCache) {
|
|
524
|
+
return this.iconsCache;
|
|
525
|
+
}
|
|
526
|
+
const allIcons = [];
|
|
527
|
+
for (const provider of this.iconProviders) {
|
|
528
|
+
const result = await provider.provide();
|
|
529
|
+
allIcons.push(...result);
|
|
530
|
+
}
|
|
531
|
+
// Remove duplicates based on icon name, keeping first occurrence
|
|
532
|
+
const uniqueIcons = allIcons.filter((icon, index, self) => index === self.findIndex((i) => i.name === icon.name));
|
|
533
|
+
this.iconsCache = uniqueIcons;
|
|
534
|
+
return uniqueIcons;
|
|
542
535
|
}
|
|
543
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
544
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
536
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
537
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserService, providedIn: 'root' }); }
|
|
545
538
|
}
|
|
546
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
539
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserService, decorators: [{
|
|
547
540
|
type: Injectable,
|
|
548
|
-
args: [{
|
|
549
|
-
providedIn: 'root',
|
|
550
|
-
}]
|
|
541
|
+
args: [{ providedIn: 'root' }]
|
|
551
542
|
}] });
|
|
552
543
|
|
|
553
|
-
class
|
|
544
|
+
class AXPIconChooserPopupComponent extends AXBasePageComponent {
|
|
554
545
|
constructor() {
|
|
555
546
|
super(...arguments);
|
|
556
|
-
this.
|
|
557
|
-
this.
|
|
558
|
-
this.
|
|
559
|
-
this.
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
}
|
|
572
|
-
// Otherwise value is an object
|
|
573
|
-
return value.name;
|
|
574
|
-
}, ...(ngDevMode ? [{ debugName: "selectedColor" }] : []));
|
|
547
|
+
this.icons = [];
|
|
548
|
+
this.filteredIcons = [];
|
|
549
|
+
this.searchQuery = '';
|
|
550
|
+
this.viewModes = [
|
|
551
|
+
{ value: 'square', text: '@general:widgets.icon-chooser.view-mode.square', icon: 'fa-solid fa-border-all' },
|
|
552
|
+
{
|
|
553
|
+
value: 'rectangle',
|
|
554
|
+
text: '@general:widgets.icon-chooser.view-mode.rectangle',
|
|
555
|
+
icon: 'fa-solid fa-list',
|
|
556
|
+
},
|
|
557
|
+
];
|
|
558
|
+
this.selectedViewMode = 'square';
|
|
559
|
+
this.iconTypes = [];
|
|
560
|
+
this.selectedIconType = 'fa-solid';
|
|
561
|
+
this.popupService = inject(AXPIconChooserService);
|
|
575
562
|
}
|
|
576
563
|
async ngOnInit() {
|
|
577
|
-
|
|
578
|
-
this.
|
|
579
|
-
|
|
564
|
+
this.iconTypes = await this.popupService.getStyles();
|
|
565
|
+
this.icons = await this.popupService.getIcons();
|
|
566
|
+
this.applyFilters();
|
|
567
|
+
this.cdr.detectChanges();
|
|
580
568
|
}
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
this.setValue(undefined);
|
|
585
|
-
return;
|
|
586
|
-
}
|
|
587
|
-
const color = event.component.selectedItems[0];
|
|
588
|
-
// Always store as ordered string: "color background border"
|
|
589
|
-
const stringValue = `${color.color} ${color.background} ${color.border}`;
|
|
590
|
-
this.setValue(stringValue);
|
|
591
|
-
}
|
|
569
|
+
handleSearch(event) {
|
|
570
|
+
this.searchQuery = event.value?.toLowerCase();
|
|
571
|
+
this.applyFilters();
|
|
592
572
|
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
573
|
+
handleViewModeChange(mode) {
|
|
574
|
+
this.selectedViewMode = mode.value;
|
|
575
|
+
}
|
|
576
|
+
handleIconTypeChange(type) {
|
|
577
|
+
this.selectedIconType = type.name;
|
|
578
|
+
this.applyFilters();
|
|
579
|
+
}
|
|
580
|
+
applyFilters() {
|
|
581
|
+
let result = this.icons;
|
|
582
|
+
if (this.searchQuery) {
|
|
583
|
+
result = result.filter((icon) => icon.label.toLowerCase().includes(this.searchQuery) ||
|
|
584
|
+
icon.tags?.some((tag) => tag.toLowerCase().includes(this.searchQuery)));
|
|
597
585
|
}
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
<ax-form-field>
|
|
606
|
-
<ax-select-box
|
|
607
|
-
[dataSource]="colors()"
|
|
608
|
-
textField="title"
|
|
609
|
-
valueField="name"
|
|
610
|
-
[placeholder]="placeholder()"
|
|
611
|
-
[itemTemplate]="customItemTemplate"
|
|
612
|
-
[ngModel]="selectedColor()"
|
|
613
|
-
(onValueChanged)="handleValueChange($event)"
|
|
614
|
-
[selectedTemplate]="customItemTemplate"
|
|
615
|
-
>
|
|
616
|
-
<ng-template #customItemTemplate let-item>
|
|
617
|
-
<div class="ax-flex ax-items-center ax-gap-2 ax-p-2">
|
|
618
|
-
<div
|
|
619
|
-
class="ax-w-6 ax-h-6 ax-rounded ax-flex ax-items-center ax-justify-center ax-border ax-border-dashed ax-border-black dark:ax-border-white"
|
|
620
|
-
[ngClass]="item.data.background"
|
|
621
|
-
>
|
|
622
|
-
<span [ngClass]="item.data.color">Aa</span>
|
|
623
|
-
</div>
|
|
624
|
-
<span>{{ item.data.title }}</span>
|
|
625
|
-
</div>
|
|
626
|
-
</ng-template>
|
|
627
|
-
<ax-search-box look="fill"></ax-search-box>
|
|
628
|
-
<ax-validation-rule message="field can't be empty" rule="required"></ax-validation-rule>
|
|
629
|
-
</ax-select-box>
|
|
630
|
-
</ax-form-field>
|
|
631
|
-
</ax-form>
|
|
632
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i1$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i2$1.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i2$1.AXFormComponent, selector: "ax-form", inputs: ["disabled", "readonly", "labelMode", "look", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "directive", type: i2$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i4$1.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
633
|
-
}
|
|
634
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPColorChooserWidgetEditComponent, decorators: [{
|
|
635
|
-
type: Component,
|
|
636
|
-
args: [{
|
|
637
|
-
selector: 'ax-color-chooser-widget',
|
|
638
|
-
template: `
|
|
639
|
-
<ax-form [messageStyle]="'float'" [updateOn]="'change'">
|
|
640
|
-
<ax-form-field>
|
|
641
|
-
<ax-select-box
|
|
642
|
-
[dataSource]="colors()"
|
|
643
|
-
textField="title"
|
|
644
|
-
valueField="name"
|
|
645
|
-
[placeholder]="placeholder()"
|
|
646
|
-
[itemTemplate]="customItemTemplate"
|
|
647
|
-
[ngModel]="selectedColor()"
|
|
648
|
-
(onValueChanged)="handleValueChange($event)"
|
|
649
|
-
[selectedTemplate]="customItemTemplate"
|
|
650
|
-
>
|
|
651
|
-
<ng-template #customItemTemplate let-item>
|
|
652
|
-
<div class="ax-flex ax-items-center ax-gap-2 ax-p-2">
|
|
653
|
-
<div
|
|
654
|
-
class="ax-w-6 ax-h-6 ax-rounded ax-flex ax-items-center ax-justify-center ax-border ax-border-dashed ax-border-black dark:ax-border-white"
|
|
655
|
-
[ngClass]="item.data.background"
|
|
656
|
-
>
|
|
657
|
-
<span [ngClass]="item.data.color">Aa</span>
|
|
658
|
-
</div>
|
|
659
|
-
<span>{{ item.data.title }}</span>
|
|
660
|
-
</div>
|
|
661
|
-
</ng-template>
|
|
662
|
-
<ax-search-box look="fill"></ax-search-box>
|
|
663
|
-
<ax-validation-rule message="field can't be empty" rule="required"></ax-validation-rule>
|
|
664
|
-
</ax-select-box>
|
|
665
|
-
</ax-form-field>
|
|
666
|
-
</ax-form>
|
|
667
|
-
`,
|
|
668
|
-
imports: [AXSelectBoxModule, AXFormModule, CommonModule, AXSearchBoxModule, AXButtonModule, FormsModule],
|
|
669
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
670
|
-
}]
|
|
671
|
-
}] });
|
|
672
|
-
|
|
673
|
-
var themeColorChooserEdit_component = /*#__PURE__*/Object.freeze({
|
|
674
|
-
__proto__: null,
|
|
675
|
-
AXPColorChooserWidgetEditComponent: AXPColorChooserWidgetEditComponent
|
|
676
|
-
});
|
|
677
|
-
|
|
678
|
-
const AXPThemeColorChooserWidgetConfig = {
|
|
679
|
-
name: 'theme-color-chooser',
|
|
680
|
-
title: 'Theme Color Chooser',
|
|
681
|
-
icon: 'fa-solid fa-palette',
|
|
682
|
-
type: 'editor',
|
|
683
|
-
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
684
|
-
properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
|
|
685
|
-
components: {
|
|
686
|
-
edit: {
|
|
687
|
-
component: () => Promise.resolve().then(function () { return themeColorChooserEdit_component; }).then((c) => c.AXPColorChooserWidgetEditComponent),
|
|
688
|
-
},
|
|
689
|
-
column: {
|
|
690
|
-
component: () => import('./acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs').then((c) => c.AXPColorChooserWidgetColumnComponent),
|
|
691
|
-
},
|
|
692
|
-
view: {
|
|
693
|
-
component: () => import('./acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs').then((c) => c.AXPColorChooserWidgetViewComponent),
|
|
694
|
-
},
|
|
695
|
-
},
|
|
696
|
-
};
|
|
697
|
-
|
|
698
|
-
class AXPFontSizeChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
699
|
-
constructor() {
|
|
700
|
-
super(...arguments);
|
|
701
|
-
this.sizes = signal(['small', 'medium', 'large', 'x-large'], ...(ngDevMode ? [{ debugName: "sizes" }] : []));
|
|
702
|
-
this.selectedSize = signal(null, ...(ngDevMode ? [{ debugName: "selectedSize" }] : []));
|
|
703
|
-
this.#eff = effect(() => {
|
|
704
|
-
if (this.getValue()) {
|
|
705
|
-
this.selectedSize.set(this.sizes().find((s) => s === this.getValue()) ?? this.sizes()[0]);
|
|
706
|
-
}
|
|
707
|
-
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
708
|
-
}
|
|
709
|
-
#eff;
|
|
710
|
-
onSizeClick(size) {
|
|
711
|
-
this.setValue(size);
|
|
712
|
-
}
|
|
713
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
714
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPFontSizeChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
715
|
-
@for (size of sizes(); track size) {
|
|
716
|
-
<div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
|
|
717
|
-
<div>
|
|
718
|
-
<span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
|
|
719
|
-
</div>
|
|
720
|
-
</div>
|
|
721
|
-
}
|
|
722
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
723
|
-
}
|
|
724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, decorators: [{
|
|
725
|
-
type: Component,
|
|
726
|
-
args: [{ template: `
|
|
727
|
-
@for (size of sizes(); track size) {
|
|
728
|
-
<div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
|
|
729
|
-
<div>
|
|
730
|
-
<span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
|
|
731
|
-
</div>
|
|
732
|
-
</div>
|
|
733
|
-
}
|
|
734
|
-
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, AXSelectionCdkModule, AXTranslationModule], styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}\n"] }]
|
|
735
|
-
}] });
|
|
736
|
-
|
|
737
|
-
var fontSizeChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
738
|
-
__proto__: null,
|
|
739
|
-
AXPFontSizeChooserWidgetComponent: AXPFontSizeChooserWidgetComponent
|
|
740
|
-
});
|
|
741
|
-
|
|
742
|
-
const AXPFontSizeChooserWidget = {
|
|
743
|
-
name: "font-size-chooser",
|
|
744
|
-
title: "Font Size Chooser",
|
|
745
|
-
icon: "fa-light fa-text-size",
|
|
746
|
-
type: 'editor',
|
|
747
|
-
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
748
|
-
properties: [
|
|
749
|
-
AXP_NAME_PROPERTY,
|
|
750
|
-
AXP_DATA_PATH_PROPERTY,
|
|
751
|
-
AXP_DISABLED_PROPERTY,
|
|
752
|
-
],
|
|
753
|
-
components: {
|
|
754
|
-
edit: {
|
|
755
|
-
component: () => Promise.resolve().then(function () { return fontSizeChooserWidget_component; }).then((c) => c.AXPFontSizeChooserWidgetComponent),
|
|
756
|
-
},
|
|
757
|
-
}
|
|
758
|
-
};
|
|
759
|
-
|
|
760
|
-
class AXPFontStyleChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
761
|
-
constructor() {
|
|
762
|
-
super(...arguments);
|
|
763
|
-
this.fonts = signal([
|
|
764
|
-
{ id: 'system-ui', title: 'Default' },
|
|
765
|
-
{ id: 'serif', title: 'Serif' },
|
|
766
|
-
{ id: 'sans-serif', title: 'Sans-serif' },
|
|
767
|
-
{ id: 'monospace', title: 'Monospace' },
|
|
768
|
-
{ id: 'arial', title: 'Arial' },
|
|
769
|
-
{ id: 'verdana', title: 'Verdana' },
|
|
770
|
-
{ id: 'tahoma', title: 'Tahoma' },
|
|
771
|
-
{ id: 'times-new-roman', title: 'Times New Roman' },
|
|
772
|
-
{ id: 'georgia', title: 'Georgia' },
|
|
773
|
-
{ id: 'helvetica', title: 'Helvetica' },
|
|
774
|
-
{ id: 'calibri', title: 'Calibri' },
|
|
775
|
-
{ id: 'cursive', title: 'Cursive' },
|
|
776
|
-
{ id: 'vazirmatn', title: 'Vazir وزیر' },
|
|
777
|
-
], ...(ngDevMode ? [{ debugName: "fonts" }] : []));
|
|
778
|
-
this.selectedFont = signal(null, ...(ngDevMode ? [{ debugName: "selectedFont" }] : []));
|
|
779
|
-
this.#eff = effect(() => {
|
|
780
|
-
if (this.getValue()) {
|
|
781
|
-
this.selectedFont.set(this.fonts().find((f) => f.id === this.getValue()) ?? this.fonts()[0]);
|
|
782
|
-
}
|
|
783
|
-
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
784
|
-
}
|
|
785
|
-
#eff;
|
|
786
|
-
onFontClick(font) {
|
|
787
|
-
this.setValue(font.id);
|
|
788
|
-
}
|
|
789
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
790
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPFontStyleChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
791
|
-
@for (font of fonts(); track font.id) {
|
|
792
|
-
<div
|
|
793
|
-
(click)="onFontClick(font)"
|
|
794
|
-
[class.--selected]="font.id === selectedFont()?.id"
|
|
795
|
-
[style.font-family]="font.id"
|
|
796
|
-
>
|
|
797
|
-
<div>
|
|
798
|
-
<span>{{ font.title }}</span>
|
|
799
|
-
</div>
|
|
800
|
-
</div>
|
|
801
|
-
}
|
|
802
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
803
|
-
}
|
|
804
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, decorators: [{
|
|
805
|
-
type: Component,
|
|
806
|
-
args: [{ template: `
|
|
807
|
-
@for (font of fonts(); track font.id) {
|
|
808
|
-
<div
|
|
809
|
-
(click)="onFontClick(font)"
|
|
810
|
-
[class.--selected]="font.id === selectedFont()?.id"
|
|
811
|
-
[style.font-family]="font.id"
|
|
812
|
-
>
|
|
813
|
-
<div>
|
|
814
|
-
<span>{{ font.title }}</span>
|
|
815
|
-
</div>
|
|
816
|
-
</div>
|
|
817
|
-
}
|
|
818
|
-
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, AXSelectionCdkModule], styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}\n"] }]
|
|
819
|
-
}] });
|
|
820
|
-
|
|
821
|
-
var fontStyleChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
822
|
-
__proto__: null,
|
|
823
|
-
AXPFontStyleChooserWidgetComponent: AXPFontStyleChooserWidgetComponent
|
|
824
|
-
});
|
|
825
|
-
|
|
826
|
-
const AXPFontStyleChooserWidget = {
|
|
827
|
-
name: "font-style-chooser",
|
|
828
|
-
title: "Font Style Chooser",
|
|
829
|
-
icon: "fa-light fa-font",
|
|
830
|
-
type: 'editor',
|
|
831
|
-
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
832
|
-
properties: [
|
|
833
|
-
AXP_NAME_PROPERTY,
|
|
834
|
-
AXP_DATA_PATH_PROPERTY,
|
|
835
|
-
AXP_DISABLED_PROPERTY,
|
|
836
|
-
],
|
|
837
|
-
components: {
|
|
838
|
-
edit: {
|
|
839
|
-
component: () => Promise.resolve().then(function () { return fontStyleChooserWidget_component; }).then((c) => c.AXPFontStyleChooserWidgetComponent),
|
|
840
|
-
},
|
|
841
|
-
}
|
|
842
|
-
};
|
|
843
|
-
|
|
844
|
-
//#region ---- Injection Tokens ----
|
|
845
|
-
/**
|
|
846
|
-
* Injection token for icon providers.
|
|
847
|
-
* Use multi: true to register multiple providers.
|
|
848
|
-
*/
|
|
849
|
-
const AXP_ICON_PROVIDER = new InjectionToken('AXP_ICON_PROVIDER');
|
|
850
|
-
/**
|
|
851
|
-
* Injection token for icon style providers.
|
|
852
|
-
* Use multi: true to register multiple providers.
|
|
853
|
-
*/
|
|
854
|
-
const AXP_ICON_STYLE_PROVIDER = new InjectionToken('AXP_ICON_STYLE_PROVIDER');
|
|
855
|
-
//#endregion
|
|
856
|
-
|
|
857
|
-
//#endregion
|
|
858
|
-
//#region ---- Abstract Providers ----
|
|
859
|
-
class AXPIconProvider {
|
|
860
|
-
}
|
|
861
|
-
class AXPIconStyleProvider {
|
|
862
|
-
}
|
|
863
|
-
//#endregion
|
|
864
|
-
//#region ---- Service ----
|
|
865
|
-
class AXPIconChooserService {
|
|
866
|
-
constructor() {
|
|
867
|
-
//#region ---- Properties ----
|
|
868
|
-
this.iconProviders = inject(AXP_ICON_PROVIDER, { optional: true }) ?? [];
|
|
869
|
-
this.styleProviders = inject(AXP_ICON_STYLE_PROVIDER, { optional: true }) ?? [];
|
|
870
|
-
this.iconsCache = null;
|
|
871
|
-
this.stylesCache = null;
|
|
872
|
-
}
|
|
873
|
-
//#endregion
|
|
874
|
-
//#region ---- Public Methods ----
|
|
875
|
-
/**
|
|
876
|
-
* Get all available icon styles from registered providers.
|
|
877
|
-
* Results are cached after first call.
|
|
878
|
-
*/
|
|
879
|
-
async getStyles() {
|
|
880
|
-
if (this.stylesCache) {
|
|
881
|
-
return this.stylesCache;
|
|
882
|
-
}
|
|
883
|
-
const allStyles = [];
|
|
884
|
-
for (const provider of this.styleProviders) {
|
|
885
|
-
const result = await provider.provide();
|
|
886
|
-
allStyles.push(...result);
|
|
887
|
-
}
|
|
888
|
-
// Remove duplicates based on style name
|
|
889
|
-
const uniqueStyles = allStyles.filter((style, index, self) => index === self.findIndex((s) => s.name === style.name));
|
|
890
|
-
this.stylesCache = uniqueStyles;
|
|
891
|
-
return uniqueStyles;
|
|
892
|
-
}
|
|
893
|
-
/**
|
|
894
|
-
* Get all available icons from registered providers.
|
|
895
|
-
* Icons from multiple providers are merged, with duplicates removed.
|
|
896
|
-
* Results are cached after first call.
|
|
897
|
-
*/
|
|
898
|
-
async getIcons() {
|
|
899
|
-
if (this.iconsCache) {
|
|
900
|
-
return this.iconsCache;
|
|
901
|
-
}
|
|
902
|
-
const allIcons = [];
|
|
903
|
-
for (const provider of this.iconProviders) {
|
|
904
|
-
const result = await provider.provide();
|
|
905
|
-
allIcons.push(...result);
|
|
906
|
-
}
|
|
907
|
-
// Remove duplicates based on icon name, keeping first occurrence
|
|
908
|
-
const uniqueIcons = allIcons.filter((icon, index, self) => index === self.findIndex((i) => i.name === icon.name));
|
|
909
|
-
this.iconsCache = uniqueIcons;
|
|
910
|
-
return uniqueIcons;
|
|
911
|
-
}
|
|
912
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPIconChooserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
913
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPIconChooserService, providedIn: 'root' }); }
|
|
914
|
-
}
|
|
915
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPIconChooserService, decorators: [{
|
|
916
|
-
type: Injectable,
|
|
917
|
-
args: [{ providedIn: 'root' }]
|
|
918
|
-
}] });
|
|
919
|
-
|
|
920
|
-
class AXPIconChooserPopupComponent extends AXBasePageComponent {
|
|
921
|
-
constructor() {
|
|
922
|
-
super(...arguments);
|
|
923
|
-
this.icons = [];
|
|
924
|
-
this.filteredIcons = [];
|
|
925
|
-
this.searchQuery = '';
|
|
926
|
-
this.viewModes = [
|
|
927
|
-
{ value: 'square', text: '@general:widgets.icon-chooser.view-mode.square', icon: 'fa-solid fa-border-all' },
|
|
928
|
-
{
|
|
929
|
-
value: 'rectangle',
|
|
930
|
-
text: '@general:widgets.icon-chooser.view-mode.rectangle',
|
|
931
|
-
icon: 'fa-solid fa-list',
|
|
932
|
-
},
|
|
933
|
-
];
|
|
934
|
-
this.selectedViewMode = 'square';
|
|
935
|
-
this.iconTypes = [];
|
|
936
|
-
this.selectedIconType = 'fa-solid';
|
|
937
|
-
this.popupService = inject(AXPIconChooserService);
|
|
938
|
-
}
|
|
939
|
-
async ngOnInit() {
|
|
940
|
-
this.iconTypes = await this.popupService.getStyles();
|
|
941
|
-
this.icons = await this.popupService.getIcons();
|
|
942
|
-
this.applyFilters();
|
|
943
|
-
this.cdr.detectChanges();
|
|
944
|
-
}
|
|
945
|
-
handleSearch(event) {
|
|
946
|
-
this.searchQuery = event.value?.toLowerCase();
|
|
947
|
-
this.applyFilters();
|
|
948
|
-
}
|
|
949
|
-
handleViewModeChange(mode) {
|
|
950
|
-
this.selectedViewMode = mode.value;
|
|
951
|
-
}
|
|
952
|
-
handleIconTypeChange(type) {
|
|
953
|
-
this.selectedIconType = type.name;
|
|
954
|
-
this.applyFilters();
|
|
955
|
-
}
|
|
956
|
-
applyFilters() {
|
|
957
|
-
let result = this.icons;
|
|
958
|
-
if (this.searchQuery) {
|
|
959
|
-
result = result.filter((icon) => icon.label.toLowerCase().includes(this.searchQuery) ||
|
|
960
|
-
icon.tags?.some((tag) => tag.toLowerCase().includes(this.searchQuery)));
|
|
961
|
-
}
|
|
962
|
-
result = result.filter((icon) => {
|
|
963
|
-
if (!icon.supportedStyle || icon.supportedStyle.length === 0) {
|
|
964
|
-
return true;
|
|
965
|
-
}
|
|
966
|
-
return icon.supportedStyle.includes(this.selectedIconType);
|
|
967
|
-
});
|
|
968
|
-
this.filteredIcons = result;
|
|
586
|
+
result = result.filter((icon) => {
|
|
587
|
+
if (!icon.supportedStyle || icon.supportedStyle.length === 0) {
|
|
588
|
+
return true;
|
|
589
|
+
}
|
|
590
|
+
return icon.supportedStyle.includes(this.selectedIconType);
|
|
591
|
+
});
|
|
592
|
+
this.filteredIcons = result;
|
|
969
593
|
}
|
|
970
594
|
selectIcon(icon) {
|
|
971
595
|
this.close({
|
|
@@ -977,8 +601,8 @@ class AXPIconChooserPopupComponent extends AXBasePageComponent {
|
|
|
977
601
|
getIconClass(icon) {
|
|
978
602
|
return `${this.selectedIconType} fa-${icon.name}`;
|
|
979
603
|
}
|
|
980
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
981
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
604
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
605
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPIconChooserPopupComponent, isStandalone: true, selector: "ng-component", inputs: { value: "value" }, usesInheritance: true, ngImport: i0, template: `
|
|
982
606
|
<div class="ax-flex ax-flex-col ax-h-full ax-bg-lightest">
|
|
983
607
|
<!-- Fixed Header Section -->
|
|
984
608
|
<div class="ax-sticky ax-top-0 ax-z-10 ax-bg-lightest ax-border-b ax-p-4 ax-gap-4 ax-flex ax-flex-col">
|
|
@@ -1053,9 +677,9 @@ class AXPIconChooserPopupComponent extends AXBasePageComponent {
|
|
|
1053
677
|
</div>
|
|
1054
678
|
</div>
|
|
1055
679
|
</div>
|
|
1056
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type:
|
|
680
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i1$1.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "component", type: i2$1.AXButtonGroupComponent, selector: "ax-button-group", inputs: ["disabled", "color", "look", "fitParent", "selection"], outputs: ["onBlur", "onFocus", "lookChange", "colorChange", "disabledChange", "onClick", "selectionChange", "selectedButtonChange"] }, { kind: "component", type: i2$1.AXButtonGroupItemComponent, selector: "ax-button-group-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1057
681
|
}
|
|
1058
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
682
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserPopupComponent, decorators: [{
|
|
1059
683
|
type: Component,
|
|
1060
684
|
args: [{
|
|
1061
685
|
template: `
|
|
@@ -1160,7 +784,7 @@ class AXPIconChooserWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
1160
784
|
}
|
|
1161
785
|
}
|
|
1162
786
|
return value;
|
|
1163
|
-
}, ...(ngDevMode ? [{ debugName: "computedValue" }] : []));
|
|
787
|
+
}, ...(ngDevMode ? [{ debugName: "computedValue" }] : /* istanbul ignore next */ []));
|
|
1164
788
|
}
|
|
1165
789
|
async openPopup() {
|
|
1166
790
|
const result = await this.popupService.open(AXPIconChooserPopupComponent, {
|
|
@@ -1185,8 +809,8 @@ class AXPIconChooserWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
1185
809
|
editIcon() {
|
|
1186
810
|
this.openPopup();
|
|
1187
811
|
}
|
|
1188
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1189
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
812
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
813
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPIconChooserWidgetEditComponent, isStandalone: true, selector: "ax-icon-chooser-edit", usesInheritance: true, ngImport: i0, template: `
|
|
1190
814
|
<div
|
|
1191
815
|
class="ax-grid ax-grid-cols-[6rem_auto] ax-items-center ax-rounded-md ax-text-3xl ax-w-fit"
|
|
1192
816
|
[class.ax-border]="getValue()"
|
|
@@ -1217,7 +841,7 @@ class AXPIconChooserWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
1217
841
|
</div>
|
|
1218
842
|
`, isInline: true, styles: [".icon-container{background-color:rgba(var(--ax-sys-color-primary-300),10%);background-image:linear-gradient(135deg,rgba(var(--ax-sys-color-primary-300),50%) 10%,transparent 0,transparent 50%,rgba(var(--ax-sys-color-primary-300),50%) 0,rgba(var(--ax-sys-color-primary-300),50%) 60%,transparent 0,transparent);background-size:7.5px 7.5px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1219
843
|
}
|
|
1220
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
844
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIconChooserWidgetEditComponent, decorators: [{
|
|
1221
845
|
type: Component,
|
|
1222
846
|
args: [{ selector: 'ax-icon-chooser-edit', template: `
|
|
1223
847
|
<div
|
|
@@ -1268,10 +892,10 @@ const AXPIconChooserWidget = {
|
|
|
1268
892
|
component: () => Promise.resolve().then(function () { return iconChooserEdit_component; }).then((c) => c.AXPIconChooserWidgetEditComponent),
|
|
1269
893
|
},
|
|
1270
894
|
column: {
|
|
1271
|
-
component: () => import('./acorex-platform-themes-shared-icon-chooser-column.component-
|
|
895
|
+
component: () => import('./acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs').then((c) => c.AXPIconChooserWidgetColumnComponent),
|
|
1272
896
|
},
|
|
1273
897
|
view: {
|
|
1274
|
-
component: () => import('./acorex-platform-themes-shared-icon-chooser-view.component-
|
|
898
|
+
component: () => import('./acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs').then((c) => c.AXPIconChooserWidgetViewComponent),
|
|
1275
899
|
},
|
|
1276
900
|
},
|
|
1277
901
|
};
|
|
@@ -1816,26 +1440,172 @@ function provideCustomIconStyleProvider(providerClass) {
|
|
|
1816
1440
|
}
|
|
1817
1441
|
//#endregion
|
|
1818
1442
|
|
|
1443
|
+
class AXPFontSizeChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
1444
|
+
constructor() {
|
|
1445
|
+
super(...arguments);
|
|
1446
|
+
this.sizes = signal(['small', 'medium', 'large', 'x-large'], ...(ngDevMode ? [{ debugName: "sizes" }] : /* istanbul ignore next */ []));
|
|
1447
|
+
this.selectedSize = signal(null, ...(ngDevMode ? [{ debugName: "selectedSize" }] : /* istanbul ignore next */ []));
|
|
1448
|
+
this.#eff = effect(() => {
|
|
1449
|
+
if (this.getValue()) {
|
|
1450
|
+
this.selectedSize.set(this.sizes().find((s) => s === this.getValue()) ?? this.sizes()[0]);
|
|
1451
|
+
}
|
|
1452
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
|
|
1453
|
+
}
|
|
1454
|
+
#eff;
|
|
1455
|
+
onSizeClick(size) {
|
|
1456
|
+
this.setValue(size);
|
|
1457
|
+
}
|
|
1458
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1459
|
+
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: `
|
|
1460
|
+
@for (size of sizes(); track size) {
|
|
1461
|
+
<div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
|
|
1462
|
+
<div>
|
|
1463
|
+
<span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
|
|
1464
|
+
</div>
|
|
1465
|
+
</div>
|
|
1466
|
+
}
|
|
1467
|
+
`, 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 }); }
|
|
1468
|
+
}
|
|
1469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontSizeChooserWidgetComponent, decorators: [{
|
|
1470
|
+
type: Component,
|
|
1471
|
+
args: [{ template: `
|
|
1472
|
+
@for (size of sizes(); track size) {
|
|
1473
|
+
<div (click)="onSizeClick(size)" [style.font-size]="size" [class.--selected]="size === selectedSize()">
|
|
1474
|
+
<div>
|
|
1475
|
+
<span>{{ '@layout:terms.font-sizes.' + size | translate | async }}</span>
|
|
1476
|
+
</div>
|
|
1477
|
+
</div>
|
|
1478
|
+
}
|
|
1479
|
+
`, 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"] }]
|
|
1480
|
+
}] });
|
|
1481
|
+
|
|
1482
|
+
var fontSizeChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
1483
|
+
__proto__: null,
|
|
1484
|
+
AXPFontSizeChooserWidgetComponent: AXPFontSizeChooserWidgetComponent
|
|
1485
|
+
});
|
|
1486
|
+
|
|
1487
|
+
const AXPFontSizeChooserWidget = {
|
|
1488
|
+
name: "font-size-chooser",
|
|
1489
|
+
title: "Font Size Chooser",
|
|
1490
|
+
icon: "fa-light fa-text-size",
|
|
1491
|
+
type: 'editor',
|
|
1492
|
+
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
1493
|
+
properties: [
|
|
1494
|
+
AXP_NAME_PROPERTY,
|
|
1495
|
+
AXP_DATA_PATH_PROPERTY,
|
|
1496
|
+
AXP_DISABLED_PROPERTY,
|
|
1497
|
+
],
|
|
1498
|
+
components: {
|
|
1499
|
+
edit: {
|
|
1500
|
+
component: () => Promise.resolve().then(function () { return fontSizeChooserWidget_component; }).then((c) => c.AXPFontSizeChooserWidgetComponent),
|
|
1501
|
+
},
|
|
1502
|
+
}
|
|
1503
|
+
};
|
|
1504
|
+
|
|
1505
|
+
class AXPFontStyleChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
1506
|
+
constructor() {
|
|
1507
|
+
super(...arguments);
|
|
1508
|
+
this.fonts = signal([
|
|
1509
|
+
{ id: 'system-ui', title: 'Default' },
|
|
1510
|
+
{ id: 'serif', title: 'Serif' },
|
|
1511
|
+
{ id: 'sans-serif', title: 'Sans-serif' },
|
|
1512
|
+
{ id: 'monospace', title: 'Monospace' },
|
|
1513
|
+
{ id: 'arial', title: 'Arial' },
|
|
1514
|
+
{ id: 'verdana', title: 'Verdana' },
|
|
1515
|
+
{ id: 'tahoma', title: 'Tahoma' },
|
|
1516
|
+
{ id: 'times-new-roman', title: 'Times New Roman' },
|
|
1517
|
+
{ id: 'georgia', title: 'Georgia' },
|
|
1518
|
+
{ id: 'helvetica', title: 'Helvetica' },
|
|
1519
|
+
{ id: 'calibri', title: 'Calibri' },
|
|
1520
|
+
{ id: 'cursive', title: 'Cursive' },
|
|
1521
|
+
{ id: 'vazirmatn', title: 'Vazir وزیر' },
|
|
1522
|
+
], ...(ngDevMode ? [{ debugName: "fonts" }] : /* istanbul ignore next */ []));
|
|
1523
|
+
this.selectedFont = signal(null, ...(ngDevMode ? [{ debugName: "selectedFont" }] : /* istanbul ignore next */ []));
|
|
1524
|
+
this.#eff = effect(() => {
|
|
1525
|
+
if (this.getValue()) {
|
|
1526
|
+
this.selectedFont.set(this.fonts().find((f) => f.id === this.getValue()) ?? this.fonts()[0]);
|
|
1527
|
+
}
|
|
1528
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
|
|
1529
|
+
}
|
|
1530
|
+
#eff;
|
|
1531
|
+
onFontClick(font) {
|
|
1532
|
+
this.setValue(font.id);
|
|
1533
|
+
}
|
|
1534
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1535
|
+
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: `
|
|
1536
|
+
@for (font of fonts(); track font.id) {
|
|
1537
|
+
<div
|
|
1538
|
+
(click)="onFontClick(font)"
|
|
1539
|
+
[class.--selected]="font.id === selectedFont()?.id"
|
|
1540
|
+
[style.font-family]="font.id"
|
|
1541
|
+
>
|
|
1542
|
+
<div>
|
|
1543
|
+
<span>{{ font.title }}</span>
|
|
1544
|
+
</div>
|
|
1545
|
+
</div>
|
|
1546
|
+
}
|
|
1547
|
+
`, 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 }); }
|
|
1548
|
+
}
|
|
1549
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPFontStyleChooserWidgetComponent, decorators: [{
|
|
1550
|
+
type: Component,
|
|
1551
|
+
args: [{ template: `
|
|
1552
|
+
@for (font of fonts(); track font.id) {
|
|
1553
|
+
<div
|
|
1554
|
+
(click)="onFontClick(font)"
|
|
1555
|
+
[class.--selected]="font.id === selectedFont()?.id"
|
|
1556
|
+
[style.font-family]="font.id"
|
|
1557
|
+
>
|
|
1558
|
+
<div>
|
|
1559
|
+
<span>{{ font.title }}</span>
|
|
1560
|
+
</div>
|
|
1561
|
+
</div>
|
|
1562
|
+
}
|
|
1563
|
+
`, 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"] }]
|
|
1564
|
+
}] });
|
|
1565
|
+
|
|
1566
|
+
var fontStyleChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
1567
|
+
__proto__: null,
|
|
1568
|
+
AXPFontStyleChooserWidgetComponent: AXPFontStyleChooserWidgetComponent
|
|
1569
|
+
});
|
|
1570
|
+
|
|
1571
|
+
const AXPFontStyleChooserWidget = {
|
|
1572
|
+
name: "font-style-chooser",
|
|
1573
|
+
title: "Font Style Chooser",
|
|
1574
|
+
icon: "fa-light fa-font",
|
|
1575
|
+
type: 'editor',
|
|
1576
|
+
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
1577
|
+
properties: [
|
|
1578
|
+
AXP_NAME_PROPERTY,
|
|
1579
|
+
AXP_DATA_PATH_PROPERTY,
|
|
1580
|
+
AXP_DISABLED_PROPERTY,
|
|
1581
|
+
],
|
|
1582
|
+
components: {
|
|
1583
|
+
edit: {
|
|
1584
|
+
component: () => Promise.resolve().then(function () { return fontStyleChooserWidget_component; }).then((c) => c.AXPFontStyleChooserWidgetComponent),
|
|
1585
|
+
},
|
|
1586
|
+
}
|
|
1587
|
+
};
|
|
1588
|
+
|
|
1819
1589
|
class AXPMenuOrientationChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
1820
1590
|
constructor() {
|
|
1821
1591
|
super(...arguments);
|
|
1822
1592
|
this.orientations = signal([
|
|
1823
1593
|
{ id: 'vertical', icon: 'fa-regular fa-square-ellipsis-vertical' },
|
|
1824
1594
|
{ id: 'horizontal', icon: 'fa-regular fa-square-ellipsis' },
|
|
1825
|
-
], ...(ngDevMode ? [{ debugName: "orientations" }] : []));
|
|
1826
|
-
this.selectedOrientation = signal(null, ...(ngDevMode ? [{ debugName: "selectedOrientation" }] : []));
|
|
1595
|
+
], ...(ngDevMode ? [{ debugName: "orientations" }] : /* istanbul ignore next */ []));
|
|
1596
|
+
this.selectedOrientation = signal(null, ...(ngDevMode ? [{ debugName: "selectedOrientation" }] : /* istanbul ignore next */ []));
|
|
1827
1597
|
this.#eff = effect(() => {
|
|
1828
1598
|
if (this.getValue()) {
|
|
1829
1599
|
this.selectedOrientation.set(this.orientations().find((o) => o.id === this.getValue()) ?? this.orientations()[0]);
|
|
1830
1600
|
}
|
|
1831
|
-
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
1601
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
|
|
1832
1602
|
}
|
|
1833
1603
|
#eff;
|
|
1834
1604
|
onOrientationClick(orientation) {
|
|
1835
1605
|
this.setValue(orientation.id);
|
|
1836
1606
|
}
|
|
1837
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1838
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1607
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuOrientationChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1608
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPMenuOrientationChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
1839
1609
|
@for (orientation of orientations(); track orientation.id) {
|
|
1840
1610
|
<div (click)="onOrientationClick(orientation)" [class.--selected]="orientation.id === selectedOrientation()?.id">
|
|
1841
1611
|
<div>
|
|
@@ -1846,7 +1616,7 @@ class AXPMenuOrientationChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
|
1846
1616
|
}
|
|
1847
1617
|
`, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{padding-top:.25rem!important;padding-bottom:.25rem!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1848
1618
|
}
|
|
1849
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1619
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMenuOrientationChooserWidgetComponent, decorators: [{
|
|
1850
1620
|
type: Component,
|
|
1851
1621
|
args: [{ template: `
|
|
1852
1622
|
@for (orientation of orientations(); track orientation.id) {
|
|
@@ -1883,6 +1653,234 @@ const AXPMenuOrientationChooserWidget = {
|
|
|
1883
1653
|
}
|
|
1884
1654
|
};
|
|
1885
1655
|
|
|
1656
|
+
class AXPColorProvider {
|
|
1657
|
+
}
|
|
1658
|
+
function titleCase(str) {
|
|
1659
|
+
return str.replace(/-/g, ' ').replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());
|
|
1660
|
+
}
|
|
1661
|
+
function generateDefaultColors() {
|
|
1662
|
+
const colors = [];
|
|
1663
|
+
const styles = ['primary', 'secondary', 'success', 'warning', 'danger'];
|
|
1664
|
+
const variants = [
|
|
1665
|
+
'lightest',
|
|
1666
|
+
'lighter',
|
|
1667
|
+
'light',
|
|
1668
|
+
'surface',
|
|
1669
|
+
'dark',
|
|
1670
|
+
'darker',
|
|
1671
|
+
'darkest',
|
|
1672
|
+
// ,'default'
|
|
1673
|
+
];
|
|
1674
|
+
for (const style of styles) {
|
|
1675
|
+
for (const variant of variants) {
|
|
1676
|
+
let name;
|
|
1677
|
+
let colorClass;
|
|
1678
|
+
// if (variant === 'default') {
|
|
1679
|
+
// name = `${style}-${variant}`;
|
|
1680
|
+
// colorClass = `ax-text-${style}-${variant}`;
|
|
1681
|
+
// } else {
|
|
1682
|
+
name = `${style}-${variant}`;
|
|
1683
|
+
colorClass = `ax-text-${style}-on-${variant}`;
|
|
1684
|
+
// }
|
|
1685
|
+
colors.push({
|
|
1686
|
+
title: titleCase(variant === 'surface' ? style : titleCase(name)),
|
|
1687
|
+
name: name,
|
|
1688
|
+
color: colorClass,
|
|
1689
|
+
background: `ax-bg-${name}`,
|
|
1690
|
+
border: `ax-border-${name}`,
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
return colors;
|
|
1695
|
+
}
|
|
1696
|
+
const DEFAULT_COLORS = generateDefaultColors();
|
|
1697
|
+
class AXPColorProviderDefault extends AXPColorProvider {
|
|
1698
|
+
async provide() {
|
|
1699
|
+
return DEFAULT_COLORS;
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
const AXP_COLOR_PROVIDER = new InjectionToken('AXP_COLOR_PROVIDER');
|
|
1703
|
+
class AXPColorChooserService {
|
|
1704
|
+
constructor() {
|
|
1705
|
+
this.defaultProvider = new AXPColorProviderDefault();
|
|
1706
|
+
this.providers = (() => {
|
|
1707
|
+
const injected = inject(AXP_COLOR_PROVIDER, { optional: true });
|
|
1708
|
+
if (!injected) {
|
|
1709
|
+
return [this.defaultProvider];
|
|
1710
|
+
}
|
|
1711
|
+
const providers = Array.isArray(injected) ? injected : [injected];
|
|
1712
|
+
return [...providers, this.defaultProvider];
|
|
1713
|
+
})();
|
|
1714
|
+
this.cache = null;
|
|
1715
|
+
}
|
|
1716
|
+
async getColors() {
|
|
1717
|
+
if (this.cache) {
|
|
1718
|
+
return this.cache;
|
|
1719
|
+
}
|
|
1720
|
+
const allColors = [];
|
|
1721
|
+
for (const resolver of this.providers) {
|
|
1722
|
+
const result = await resolver.provide();
|
|
1723
|
+
allColors.push(...result);
|
|
1724
|
+
}
|
|
1725
|
+
const uniqueColors = allColors.filter((color, index, self) => index === self.findIndex((c) => c.title === color.title));
|
|
1726
|
+
this.cache = uniqueColors;
|
|
1727
|
+
return uniqueColors;
|
|
1728
|
+
}
|
|
1729
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1730
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserService, providedIn: 'root' }); }
|
|
1731
|
+
}
|
|
1732
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserService, decorators: [{
|
|
1733
|
+
type: Injectable,
|
|
1734
|
+
args: [{
|
|
1735
|
+
providedIn: 'root',
|
|
1736
|
+
}]
|
|
1737
|
+
}] });
|
|
1738
|
+
|
|
1739
|
+
class AXPColorChooserWidgetEditComponent extends AXPValueWidgetComponent {
|
|
1740
|
+
constructor() {
|
|
1741
|
+
super(...arguments);
|
|
1742
|
+
this.colorService = inject(AXPColorChooserService);
|
|
1743
|
+
this.colors = signal([], ...(ngDevMode ? [{ debugName: "colors" }] : /* istanbul ignore next */ []));
|
|
1744
|
+
this.placeholder = computed(() => this.options()['placeholder'] ?? '', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
1745
|
+
this.selectedColor = computed(() => {
|
|
1746
|
+
const value = this.getValue();
|
|
1747
|
+
if (!value) {
|
|
1748
|
+
return this.colors()[0];
|
|
1749
|
+
}
|
|
1750
|
+
// If value is a string in the format: "ax-text-* ax-bg-* ax-border-*"
|
|
1751
|
+
if (typeof value === 'string') {
|
|
1752
|
+
const parsed = this.parseStringValue(value);
|
|
1753
|
+
if (parsed) {
|
|
1754
|
+
return parsed;
|
|
1755
|
+
}
|
|
1756
|
+
return this.colors()[0];
|
|
1757
|
+
}
|
|
1758
|
+
// Otherwise value is an object
|
|
1759
|
+
return value.name;
|
|
1760
|
+
}, ...(ngDevMode ? [{ debugName: "selectedColor" }] : /* istanbul ignore next */ []));
|
|
1761
|
+
}
|
|
1762
|
+
async ngOnInit() {
|
|
1763
|
+
const allColors = await this.colorService.getColors();
|
|
1764
|
+
this.colors.set(allColors);
|
|
1765
|
+
super.ngOnInit();
|
|
1766
|
+
}
|
|
1767
|
+
handleValueChange(event) {
|
|
1768
|
+
if (event.isUserInteraction) {
|
|
1769
|
+
if (!event.value) {
|
|
1770
|
+
this.setValue(undefined);
|
|
1771
|
+
return;
|
|
1772
|
+
}
|
|
1773
|
+
const color = event.component.selectedItems[0];
|
|
1774
|
+
// Always store as ordered string: "color background border"
|
|
1775
|
+
const stringValue = `${color.color} ${color.background} ${color.border}`;
|
|
1776
|
+
this.setValue(stringValue);
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
parseStringValue(value) {
|
|
1780
|
+
const parts = value.trim().split(/\s+/);
|
|
1781
|
+
if (parts.length !== 3) {
|
|
1782
|
+
return null;
|
|
1783
|
+
}
|
|
1784
|
+
const [color, background, border] = parts;
|
|
1785
|
+
const match = this.colors().find((c) => c.color === color && c.background === background && c.border === border);
|
|
1786
|
+
return match?.name ?? null;
|
|
1787
|
+
}
|
|
1788
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1789
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPColorChooserWidgetEditComponent, isStandalone: true, selector: "ax-color-chooser-widget", usesInheritance: true, ngImport: i0, template: `
|
|
1790
|
+
<ax-form [messageStyle]="'float'" [updateOn]="'change'">
|
|
1791
|
+
<ax-form-field>
|
|
1792
|
+
<ax-select-box
|
|
1793
|
+
[dataSource]="colors()"
|
|
1794
|
+
textField="title"
|
|
1795
|
+
valueField="name"
|
|
1796
|
+
[placeholder]="placeholder()"
|
|
1797
|
+
[itemTemplate]="customItemTemplate"
|
|
1798
|
+
[ngModel]="selectedColor()"
|
|
1799
|
+
(onValueChanged)="handleValueChange($event)"
|
|
1800
|
+
[selectedTemplate]="customItemTemplate"
|
|
1801
|
+
>
|
|
1802
|
+
<ng-template #customItemTemplate let-item>
|
|
1803
|
+
<div class="ax-flex ax-items-center ax-gap-2 ax-p-2">
|
|
1804
|
+
<div
|
|
1805
|
+
class="ax-w-6 ax-h-6 ax-rounded ax-flex ax-items-center ax-justify-center ax-border ax-border-dashed ax-border-black dark:ax-border-white"
|
|
1806
|
+
[ngClass]="item.data.background"
|
|
1807
|
+
>
|
|
1808
|
+
<span [ngClass]="item.data.color">Aa</span>
|
|
1809
|
+
</div>
|
|
1810
|
+
<span>{{ item.data.title }}</span>
|
|
1811
|
+
</div>
|
|
1812
|
+
</ng-template>
|
|
1813
|
+
<ax-search-box look="fill"></ax-search-box>
|
|
1814
|
+
<ax-validation-rule message="field can't be empty" rule="required"></ax-validation-rule>
|
|
1815
|
+
</ax-select-box>
|
|
1816
|
+
</ax-form-field>
|
|
1817
|
+
</ax-form>
|
|
1818
|
+
`, 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: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1819
|
+
}
|
|
1820
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserWidgetEditComponent, decorators: [{
|
|
1821
|
+
type: Component,
|
|
1822
|
+
args: [{
|
|
1823
|
+
selector: 'ax-color-chooser-widget',
|
|
1824
|
+
template: `
|
|
1825
|
+
<ax-form [messageStyle]="'float'" [updateOn]="'change'">
|
|
1826
|
+
<ax-form-field>
|
|
1827
|
+
<ax-select-box
|
|
1828
|
+
[dataSource]="colors()"
|
|
1829
|
+
textField="title"
|
|
1830
|
+
valueField="name"
|
|
1831
|
+
[placeholder]="placeholder()"
|
|
1832
|
+
[itemTemplate]="customItemTemplate"
|
|
1833
|
+
[ngModel]="selectedColor()"
|
|
1834
|
+
(onValueChanged)="handleValueChange($event)"
|
|
1835
|
+
[selectedTemplate]="customItemTemplate"
|
|
1836
|
+
>
|
|
1837
|
+
<ng-template #customItemTemplate let-item>
|
|
1838
|
+
<div class="ax-flex ax-items-center ax-gap-2 ax-p-2">
|
|
1839
|
+
<div
|
|
1840
|
+
class="ax-w-6 ax-h-6 ax-rounded ax-flex ax-items-center ax-justify-center ax-border ax-border-dashed ax-border-black dark:ax-border-white"
|
|
1841
|
+
[ngClass]="item.data.background"
|
|
1842
|
+
>
|
|
1843
|
+
<span [ngClass]="item.data.color">Aa</span>
|
|
1844
|
+
</div>
|
|
1845
|
+
<span>{{ item.data.title }}</span>
|
|
1846
|
+
</div>
|
|
1847
|
+
</ng-template>
|
|
1848
|
+
<ax-search-box look="fill"></ax-search-box>
|
|
1849
|
+
<ax-validation-rule message="field can't be empty" rule="required"></ax-validation-rule>
|
|
1850
|
+
</ax-select-box>
|
|
1851
|
+
</ax-form-field>
|
|
1852
|
+
</ax-form>
|
|
1853
|
+
`,
|
|
1854
|
+
imports: [AXSelectBoxModule, AXFormModule, CommonModule, AXSearchBoxModule, AXButtonModule, FormsModule],
|
|
1855
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1856
|
+
}]
|
|
1857
|
+
}] });
|
|
1858
|
+
|
|
1859
|
+
var themeColorChooserEdit_component = /*#__PURE__*/Object.freeze({
|
|
1860
|
+
__proto__: null,
|
|
1861
|
+
AXPColorChooserWidgetEditComponent: AXPColorChooserWidgetEditComponent
|
|
1862
|
+
});
|
|
1863
|
+
|
|
1864
|
+
const AXPThemeColorChooserWidgetConfig = {
|
|
1865
|
+
name: 'theme-color-chooser',
|
|
1866
|
+
title: 'Theme Color Chooser',
|
|
1867
|
+
icon: 'fa-solid fa-palette',
|
|
1868
|
+
type: 'editor',
|
|
1869
|
+
categories: AXP_WIDGETS_LAYOUT_CATEGORY,
|
|
1870
|
+
properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
|
|
1871
|
+
components: {
|
|
1872
|
+
edit: {
|
|
1873
|
+
component: () => Promise.resolve().then(function () { return themeColorChooserEdit_component; }).then((c) => c.AXPColorChooserWidgetEditComponent),
|
|
1874
|
+
},
|
|
1875
|
+
column: {
|
|
1876
|
+
component: () => import('./acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs').then((c) => c.AXPColorChooserWidgetColumnComponent),
|
|
1877
|
+
},
|
|
1878
|
+
view: {
|
|
1879
|
+
component: () => import('./acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs').then((c) => c.AXPColorChooserWidgetViewComponent),
|
|
1880
|
+
},
|
|
1881
|
+
},
|
|
1882
|
+
};
|
|
1883
|
+
|
|
1886
1884
|
class AXPThemeModeChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
1887
1885
|
constructor() {
|
|
1888
1886
|
super(...arguments);
|
|
@@ -1890,20 +1888,20 @@ class AXPThemeModeChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
|
1890
1888
|
{ id: AXPThemeMode.Light, icon: 'fa-light fa-brightness' },
|
|
1891
1889
|
{ id: AXPThemeMode.Dark, icon: 'fa-light fa-moon' },
|
|
1892
1890
|
{ id: AXPThemeMode.System, icon: 'fa-light fa-desktop' },
|
|
1893
|
-
], ...(ngDevMode ? [{ debugName: "modes" }] : []));
|
|
1894
|
-
this.selectedMode = signal(null, ...(ngDevMode ? [{ debugName: "selectedMode" }] : []));
|
|
1891
|
+
], ...(ngDevMode ? [{ debugName: "modes" }] : /* istanbul ignore next */ []));
|
|
1892
|
+
this.selectedMode = signal(null, ...(ngDevMode ? [{ debugName: "selectedMode" }] : /* istanbul ignore next */ []));
|
|
1895
1893
|
this.#eff = effect(() => {
|
|
1896
1894
|
if (this.getValue()) {
|
|
1897
1895
|
this.selectedMode.set(this.modes().find((m) => m.id === this.getValue()) ?? this.modes()[0]);
|
|
1898
1896
|
}
|
|
1899
|
-
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
1897
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
|
|
1900
1898
|
}
|
|
1901
1899
|
#eff;
|
|
1902
1900
|
onModeClick(mode) {
|
|
1903
1901
|
this.setValue(mode.id);
|
|
1904
1902
|
}
|
|
1905
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1906
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1903
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeModeChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1904
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPThemeModeChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
1907
1905
|
@for (mode of modes(); track mode.id) {
|
|
1908
1906
|
<div (click)="onModeClick(mode)" [class.--selected]="mode.id === selectedMode()?.id">
|
|
1909
1907
|
<div>
|
|
@@ -1914,7 +1912,7 @@ class AXPThemeModeChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
|
1914
1912
|
}
|
|
1915
1913
|
`, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{padding-top:.25rem!important;padding-bottom:.25rem!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1916
1914
|
}
|
|
1917
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1915
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemeModeChooserWidgetComponent, decorators: [{
|
|
1918
1916
|
type: Component,
|
|
1919
1917
|
args: [{ template: `
|
|
1920
1918
|
@for (mode of modes(); track mode.id) {
|
|
@@ -1955,15 +1953,15 @@ class AXPThemePaletteChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
|
1955
1953
|
constructor() {
|
|
1956
1954
|
super(...arguments);
|
|
1957
1955
|
this.paletteService = inject(AXP_THEME_PALETTE_PROVIDER);
|
|
1958
|
-
this.palettes = signal([], ...(ngDevMode ? [{ debugName: "palettes" }] : []));
|
|
1959
|
-
this.selectedPalette = signal(null, ...(ngDevMode ? [{ debugName: "selectedPalette" }] : []));
|
|
1956
|
+
this.palettes = signal([], ...(ngDevMode ? [{ debugName: "palettes" }] : /* istanbul ignore next */ []));
|
|
1957
|
+
this.selectedPalette = signal(null, ...(ngDevMode ? [{ debugName: "selectedPalette" }] : /* istanbul ignore next */ []));
|
|
1960
1958
|
this.#eff = effect(() => {
|
|
1961
1959
|
if (this.getValue()) {
|
|
1962
1960
|
this.selectedPalette.set(this.palettes().find((p) => p.name === this.getValue()) ??
|
|
1963
1961
|
this.palettes().find((p) => p.name === 'default') ??
|
|
1964
1962
|
this.palettes()[0]);
|
|
1965
1963
|
}
|
|
1966
|
-
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
1964
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : /* istanbul ignore next */ []));
|
|
1967
1965
|
}
|
|
1968
1966
|
#eff;
|
|
1969
1967
|
async ngOnInit() {
|
|
@@ -1974,8 +1972,8 @@ class AXPThemePaletteChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
|
1974
1972
|
onPaletteClick(palette) {
|
|
1975
1973
|
this.setValue(palette.name);
|
|
1976
1974
|
}
|
|
1977
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1978
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1975
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemePaletteChooserWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1976
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPThemePaletteChooserWidgetComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
1979
1977
|
@for (palette of palettes(); track palette.name) {
|
|
1980
1978
|
<div (click)="onPaletteClick(palette)" [class.--selected]="palette.name === selectedPalette()?.name">
|
|
1981
1979
|
<span>{{ palette.title }}</span>
|
|
@@ -1986,9 +1984,9 @@ class AXPThemePaletteChooserWidgetComponent extends AXPValueWidgetComponent {
|
|
|
1986
1984
|
</div>
|
|
1987
1985
|
</div>
|
|
1988
1986
|
}
|
|
1989
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{height:3rem;min-width:100%}@media
|
|
1987
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{height:3rem;min-width:100%}@media(min-width:768px){:host>div{min-width:16rem}}:host>div>div{position:relative;height:100%;width:fit-content}:host>div>div div{position:absolute;height:2rem;width:2rem;border-radius:9999px;border-width:1px;border-color:#ffffff80;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectionCdkModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1990
1988
|
}
|
|
1991
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemePaletteChooserWidgetComponent, decorators: [{
|
|
1992
1990
|
type: Component,
|
|
1993
1991
|
args: [{ template: `
|
|
1994
1992
|
@for (palette of palettes(); track palette.name) {
|
|
@@ -2001,7 +1999,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
2001
1999
|
</div>
|
|
2002
2000
|
</div>
|
|
2003
2001
|
}
|
|
2004
|
-
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, AXSelectionCdkModule], styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{height:3rem;min-width:100%}@media
|
|
2002
|
+
`, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, AXSelectionCdkModule], styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}:host>div{display:flex;cursor:pointer;flex-direction:row;align-items:center;justify-content:space-between;gap:.5rem;border-radius:.5rem;padding:.5rem 1rem;background-color:rgb(var(--ax-sys-color-light-surface));color:rgb(var(--ax-sys-color-on-light-surface));border-color:rgb(var(--ax-sys-color-border-light-surface))}:host>div:is(.ax-dark *){background-color:rgb(var(--ax-sys-color-surface));color:rgb(var(--ax-sys-color-on-surface));border-color:rgb(var(--ax-sys-color-border-surface))}:host>div{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}:host>div:hover{background-color:rgb(var(--ax-sys-color-dark-surface));color:rgb(var(--ax-sys-color-on-dark-surface));border-color:rgb(var(--ax-sys-color-border-dark-surface))}:host>div.--selected{background-color:rgb(var(--ax-sys-color-primary-lighter-surface));color:rgb(var(--ax-sys-color-on-primary-lighter-surface));border-color:rgb(var(--ax-sys-color-border-primary-lighter-surface))}:host>div>div{display:flex;align-items:center;justify-content:center}:host>div>div i{font-size:1.25rem;line-height:1.75rem}:host>div>span{font-size:.875rem;line-height:1.25rem;font-weight:600;line-height:1.625}:host>div{height:3rem;min-width:100%}@media(min-width:768px){:host>div{min-width:16rem}}:host>div>div{position:relative;height:100%;width:fit-content}:host>div>div div{position:absolute;height:2rem;width:2rem;border-radius:9999px;border-width:1px;border-color:#ffffff80;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}\n"] }]
|
|
2005
2003
|
}] });
|
|
2006
2004
|
|
|
2007
2005
|
var themePaletteChooserWidget_component = /*#__PURE__*/Object.freeze({
|
|
@@ -2027,6 +2025,28 @@ const AXPThemePaletteChooserWidget = {
|
|
|
2027
2025
|
}
|
|
2028
2026
|
};
|
|
2029
2027
|
|
|
2028
|
+
//#endregion
|
|
2029
|
+
//#region ---- Theme Widgets Provider ----
|
|
2030
|
+
const WIDGETS = [
|
|
2031
|
+
AXPThemePaletteChooserWidget,
|
|
2032
|
+
AXPThemeModeChooserWidget,
|
|
2033
|
+
AXPMenuOrientationChooserWidget,
|
|
2034
|
+
AXPFontSizeChooserWidget,
|
|
2035
|
+
AXPFontStyleChooserWidget,
|
|
2036
|
+
AXPIconChooserWidget,
|
|
2037
|
+
AXPThemeColorChooserWidgetConfig,
|
|
2038
|
+
];
|
|
2039
|
+
class AXPThemesSharedWidgetsProvider {
|
|
2040
|
+
getWidgets() {
|
|
2041
|
+
return WIDGETS;
|
|
2042
|
+
}
|
|
2043
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedWidgetsProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2044
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedWidgetsProvider }); }
|
|
2045
|
+
}
|
|
2046
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedWidgetsProvider, decorators: [{
|
|
2047
|
+
type: Injectable
|
|
2048
|
+
}] });
|
|
2049
|
+
|
|
2030
2050
|
class AXPThemesSharedModule {
|
|
2031
2051
|
constructor(appInitService, injector) {
|
|
2032
2052
|
const service = injector.get(AXPLayoutThemeService);
|
|
@@ -2039,9 +2059,10 @@ class AXPThemesSharedModule {
|
|
|
2039
2059
|
},
|
|
2040
2060
|
});
|
|
2041
2061
|
}
|
|
2042
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2043
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2044
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2062
|
+
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 }); }
|
|
2063
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedModule, imports: [i1$3.AXPComponentSlotModule, AXPWidgetCoreModule] }); }
|
|
2064
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedModule, providers: [
|
|
2065
|
+
{ provide: AXP_WIDGET_DEFINITION_PROVIDER, useClass: AXPThemesSharedWidgetsProvider, multi: true },
|
|
2045
2066
|
{
|
|
2046
2067
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
2047
2068
|
useFactory: async () => {
|
|
@@ -2061,19 +2082,9 @@ class AXPThemesSharedModule {
|
|
|
2061
2082
|
},
|
|
2062
2083
|
],
|
|
2063
2084
|
}),
|
|
2064
|
-
AXPWidgetCoreModule
|
|
2065
|
-
widgets: [
|
|
2066
|
-
AXPThemePaletteChooserWidget,
|
|
2067
|
-
AXPThemeModeChooserWidget,
|
|
2068
|
-
AXPMenuOrientationChooserWidget,
|
|
2069
|
-
AXPFontSizeChooserWidget,
|
|
2070
|
-
AXPFontStyleChooserWidget,
|
|
2071
|
-
AXPIconChooserWidget,
|
|
2072
|
-
AXPThemeColorChooserWidgetConfig,
|
|
2073
|
-
],
|
|
2074
|
-
})] }); }
|
|
2085
|
+
AXPWidgetCoreModule] }); }
|
|
2075
2086
|
}
|
|
2076
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2087
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPThemesSharedModule, decorators: [{
|
|
2077
2088
|
type: NgModule,
|
|
2078
2089
|
args: [{
|
|
2079
2090
|
imports: [
|
|
@@ -2086,21 +2097,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
2086
2097
|
},
|
|
2087
2098
|
],
|
|
2088
2099
|
}),
|
|
2089
|
-
AXPWidgetCoreModule
|
|
2090
|
-
widgets: [
|
|
2091
|
-
AXPThemePaletteChooserWidget,
|
|
2092
|
-
AXPThemeModeChooserWidget,
|
|
2093
|
-
AXPMenuOrientationChooserWidget,
|
|
2094
|
-
AXPFontSizeChooserWidget,
|
|
2095
|
-
AXPFontStyleChooserWidget,
|
|
2096
|
-
AXPIconChooserWidget,
|
|
2097
|
-
AXPThemeColorChooserWidgetConfig,
|
|
2098
|
-
],
|
|
2099
|
-
}),
|
|
2100
|
+
AXPWidgetCoreModule,
|
|
2100
2101
|
],
|
|
2101
2102
|
exports: [],
|
|
2102
2103
|
declarations: [],
|
|
2103
2104
|
providers: [
|
|
2105
|
+
{ provide: AXP_WIDGET_DEFINITION_PROVIDER, useClass: AXPThemesSharedWidgetsProvider, multi: true },
|
|
2104
2106
|
{
|
|
2105
2107
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
2106
2108
|
useFactory: async () => {
|
|
@@ -2113,7 +2115,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
2113
2115
|
...provideDefaultIconChooser(),
|
|
2114
2116
|
],
|
|
2115
2117
|
}]
|
|
2116
|
-
}], ctorParameters: () => [{ type: i1$
|
|
2118
|
+
}], ctorParameters: () => [{ type: i1$3.AXPAppStartUpService }, { type: i0.Injector }] });
|
|
2117
2119
|
|
|
2118
2120
|
/**
|
|
2119
2121
|
* Generated bundle index. Do not edit.
|