@acorex/platform 19.2.19 → 19.3.0-next.0
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/common/index.d.ts +1 -0
- package/common/lib/app/application.types.d.ts +13 -3
- package/common/lib/file-storage/file-storage.types.d.ts +20 -12
- package/common/lib/filters/filters.types.d.ts +5 -0
- package/common/lib/layout/menu/badge-helper.d.ts +7 -0
- package/common/lib/layout/menu/index.d.ts +1 -0
- package/common/lib/layout/menu/menu.types.d.ts +1 -0
- package/common/lib/layout/task-badge/index.d.ts +2 -0
- package/common/lib/layout/task-badge/task-badge.service.d.ts +11 -0
- package/common/lib/layout/task-badge/task-badge.type.d.ts +6 -0
- package/common/lib/settings/setting-definition.provider.d.ts +7 -5
- package/common/lib/settings/setting.builder.d.ts +8 -5
- package/common/lib/settings/settings.service.d.ts +6 -5
- package/common/lib/settings/settings.types.d.ts +6 -10
- package/core/lib/data/index.d.ts +1 -0
- package/core/lib/data/value-transformer.d.ts +6 -0
- package/core/lib/types/core.types.d.ts +18 -0
- package/{layout/entity/lib → core/lib/types}/data.types.d.ts +3 -1
- package/core/lib/types/element.types.d.ts +6 -0
- package/core/lib/types/index.d.ts +6 -0
- package/core/lib/types/interactive.types.d.ts +44 -0
- package/core/lib/types/scope.types.d.ts +10 -0
- package/core/lib/types/validation.types.d.ts +7 -0
- package/core/lib/utils/index.d.ts +1 -0
- package/core/lib/utils/object-util.d.ts +3 -0
- package/fesm2022/acorex-platform-common.mjs +79 -35
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +151 -6
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +44 -55
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +77 -35
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +243 -415
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-search.mjs +7 -26
- package/fesm2022/acorex-platform-layout-search.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-setting.mjs +211 -278
- package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-LKhN00ob.mjs → acorex-platform-themes-default-entity-master-create-view.component-3gmbdeJ_.mjs} +4 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-3gmbdeJ_.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DnEL7Ej-.mjs +741 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DnEL7Ej-.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-8DdICjNs.mjs +91 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-8DdICjNs.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DadBeY1I.mjs +164 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DadBeY1I.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-search-popup.component-CGARdU4C.mjs → acorex-platform-themes-default-search-popup.component-BADEuoeJ.mjs} +9 -9
- package/fesm2022/{acorex-platform-themes-default-search-popup.component-CGARdU4C.mjs.map → acorex-platform-themes-default-search-popup.component-BADEuoeJ.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default-setting-page.component-Cj73brIK.mjs +219 -0
- package/fesm2022/acorex-platform-themes-default-setting-page.component-Cj73brIK.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-setting-view.component-rrAq6hg2.mjs +103 -0
- package/fesm2022/acorex-platform-themes-default-setting-view.component-rrAq6hg2.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +237 -73
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared-setting.provider-CXiRmniv.mjs +168 -0
- package/fesm2022/acorex-platform-themes-shared-setting.provider-CXiRmniv.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +502 -322
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +4109 -1487
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/lib/builder/builder.service.d.ts +1 -1
- package/layout/builder/lib/builder/index.d.ts +2 -1
- package/layout/builder/lib/builder/widget-categories.d.ts +10 -0
- package/layout/builder/lib/builder/widget-group.types.d.ts +10 -0
- package/layout/builder/lib/builder/widget-map.d.ts +8 -1
- package/layout/builder/lib/builder/widget-status.types.d.ts +2 -0
- package/layout/builder/lib/builder/widget.types.d.ts +11 -27
- package/layout/designer/lib/designer/components/widget-picker/widget-picker.component.d.ts +7 -3
- package/layout/designer/lib/designer/components/widget-picker/widget-picker.service.d.ts +12 -0
- package/layout/designer/lib/designer/index.d.ts +1 -0
- package/layout/designer/lib/designer/shared/designer.service.d.ts +1 -0
- package/layout/designer/lib/property-viewer/widget-property-viewer.component.d.ts +2 -1
- package/layout/entity/lib/entity-data-seeder.d.ts +2 -2
- package/layout/entity/lib/entity-master-list.viewmodel.d.ts +4 -7
- package/layout/entity/lib/entity-storage-service.d.ts +39 -55
- package/layout/entity/lib/entity.types.d.ts +21 -0
- package/layout/entity/lib/index.d.ts +1 -2
- package/layout/entity/lib/widgets/lookup-widget/index.d.ts +0 -2
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-column.component.d.ts +4 -0
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +7 -9
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-selector.component.d.ts +5 -2
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-selector.viewmodel.d.ts +11 -3
- package/layout/search/lib/search.viewmodel.d.ts +0 -2
- package/layout/setting/lib/setting.viewmodel.d.ts +45 -111
- package/package.json +1 -1
- package/themes/default/lib/layouts/base/base-page.component.d.ts +39 -13
- package/themes/default/lib/layouts/base/base-page.types.d.ts +15 -3
- package/themes/default/lib/layouts/base/index.d.ts +1 -0
- package/themes/default/lib/layouts/base/page-layout/index.d.ts +1 -0
- package/themes/default/lib/{pages/theme-palette-preview/theme-palette-preview.page.d.ts → layouts/base/page-layout/page-layout.component.d.ts} +13 -26
- package/themes/default/lib/layouts/base/simple-page/simple-page.layout.d.ts +2 -2
- package/themes/default/lib/layouts/entity-layouts/entity-category/entity-category.component.d.ts +16 -0
- package/themes/default/lib/layouts/entity-layouts/entity-detail-list-view/entity-detail-list-view.component.d.ts +2 -2
- package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.d.ts +10 -8
- package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.d.ts +12 -4
- package/themes/default/lib/layouts/entity-layouts/entity-master-toolbar-view/entity-master-toolbar-view.component.d.ts +7 -0
- package/themes/default/lib/layouts/entity-layouts/entity-master-toolbar-view/filters/entity-filter-toolbar.component.d.ts +48 -0
- package/themes/default/lib/layouts/entity-layouts/entity-master-toolbar-view/views/entity-view-toolbar.component.d.ts +12 -0
- package/themes/default/lib/layouts/root-layout/components/header/header.component.d.ts +2 -2
- package/themes/default/lib/layouts/root-layout/components/horizontal-menu/horizontal-menu.component.d.ts +9 -3
- package/themes/default/lib/layouts/root-layout/components/side-menu/side-menu.component.d.ts +7 -1
- package/themes/default/lib/layouts/root-layout/horizontal/horizontal-layout.component.d.ts +2 -2
- package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +2 -2
- package/themes/default/lib/layouts/root-layout/vertical/vertical-layout.component.d.ts +2 -2
- package/themes/default/lib/layouts/setting-layout/setting-page/setting-page.component.d.ts +61 -5
- package/themes/default/lib/layouts/setting-layout/setting-view/setting-view.component.d.ts +68 -6
- package/themes/shared/index.d.ts +1 -1
- package/themes/shared/lib/components/badge/badge.directive.d.ts +14 -0
- package/themes/shared/lib/components/layout-elements/layout-blocks.component.d.ts +4 -1
- package/themes/shared/lib/components/layout-elements/layout-side.component.d.ts +2 -2
- package/themes/shared/lib/components/slots/theme-slot.component.d.ts +2 -2
- package/themes/shared/lib/palette.provider.d.ts +1 -1
- package/themes/shared/lib/setting.keys.d.ts +2 -1
- package/themes/shared/lib/setting.provider.d.ts +4 -1
- package/themes/shared/lib/theme.service.d.ts +2 -2
- package/themes/shared/lib/theme.types.d.ts +11 -2
- package/themes/shared/lib/widgets/font-size-chooser/font-size-chooser-widget.component.d.ts +10 -0
- package/themes/shared/lib/widgets/font-size-chooser/font-size-chooser-widget.config.d.ts +7 -0
- package/themes/shared/lib/widgets/font-size-chooser/index.d.ts +2 -0
- package/themes/shared/lib/widgets/font-style-chooser/font-style-chooser-widget.component.d.ts +15 -0
- package/themes/shared/lib/widgets/font-style-chooser/font-style-chooser-widget.config.d.ts +7 -0
- package/themes/shared/lib/widgets/font-style-chooser/index.d.ts +2 -0
- package/themes/shared/lib/widgets/menu-orientation-chooser/index.d.ts +2 -0
- package/themes/shared/lib/widgets/menu-orientation-chooser/menu-orientation-chooser-widget.component.d.ts +15 -0
- package/themes/shared/lib/widgets/menu-orientation-chooser/menu-orientation-chooser-widget.config.d.ts +7 -0
- package/themes/shared/lib/widgets/theme-mode-chooser/index.d.ts +2 -0
- package/themes/shared/lib/widgets/theme-mode-chooser/theme-mode-chooser-widget.component.d.ts +16 -0
- package/themes/shared/lib/widgets/theme-mode-chooser/theme-mode-chooser-widget.config.d.ts +7 -0
- package/themes/shared/lib/widgets/theme-palette-chooser/index.d.ts +2 -0
- package/themes/shared/lib/widgets/theme-palette-chooser/theme-palette-chooser-widget.component.d.ts +13 -0
- package/themes/shared/lib/widgets/{theme-color-selection/theme-color-selection-widget.config.d.ts → theme-palette-chooser/theme-palette-chooser-widget.config.d.ts} +2 -2
- package/widgets/lib/properties/groups.d.ts +2 -0
- package/widgets/lib/widgets/advance/file/file-box-widget-edit.component.d.ts +5 -5
- package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget.component.d.ts +52 -0
- package/widgets/lib/widgets/charts/bar-chart/bar-chart.type.d.ts +29 -11
- package/widgets/lib/widgets/charts/bar-chart/index.d.ts +1 -1
- package/widgets/lib/widgets/charts/chart.type.d.ts +3 -0
- package/widgets/lib/widgets/charts/clock-calendar/clock-calendar-widget.component.d.ts +40 -0
- package/widgets/lib/widgets/charts/clock-calendar/clock-calendar-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/charts/clock-calendar/clock-calendar.types.d.ts +50 -0
- package/widgets/lib/widgets/charts/clock-calendar/index.d.ts +3 -0
- package/widgets/lib/widgets/charts/donut-chart/donut-chart-widget.component.d.ts +54 -0
- package/widgets/lib/widgets/charts/donut-chart/donut-chart.type.d.ts +31 -21
- package/widgets/lib/widgets/charts/donut-chart/index.d.ts +1 -1
- package/widgets/lib/widgets/charts/gauge-chart/{gauge-chart-widget-edit.component.d.ts → gauge-chart-widget.component.d.ts} +3 -3
- package/widgets/lib/widgets/charts/gauge-chart/gauge-chart.type.d.ts +26 -11
- package/widgets/lib/widgets/charts/gauge-chart/index.d.ts +2 -1
- package/widgets/lib/widgets/charts/shared/chart-base.component.d.ts +44 -0
- package/widgets/lib/widgets/charts/shared/chart-base.type.d.ts +37 -0
- package/widgets/lib/widgets/charts/sticky-note/index.d.ts +1 -1
- package/widgets/lib/widgets/charts/sticky-note/{sticky-note-widget-edit.component.d.ts → sticky-note-widget.component.d.ts} +3 -3
- package/widgets/lib/widgets/charts/weather/index.d.ts +4 -0
- package/widgets/lib/widgets/charts/weather/weather-services/index.d.ts +3 -0
- package/widgets/lib/widgets/charts/weather/weather-services/weather-api.abstract.d.ts +174 -0
- package/widgets/lib/widgets/charts/weather/weather-services/weather-api.key.d.ts +2 -0
- package/widgets/lib/widgets/charts/weather/weather-services/weather-api.mock.service.d.ts +47 -0
- package/widgets/lib/widgets/charts/weather/weather-services/weather-api.service.d.ts +48 -0
- package/widgets/lib/widgets/charts/weather/weather-widget.component.d.ts +109 -0
- package/widgets/lib/widgets/charts/weather/weather-widget.config.d.ts +14 -0
- package/widgets/lib/widgets/charts/weather/weather.module.d.ts +11 -0
- package/widgets/lib/widgets/editors/select/select-box-widget-column.component.d.ts +0 -1
- package/widgets/lib/widgets/editors/select/select-box-widget-edit.component.d.ts +4 -1
- package/widgets/lib/widgets/editors/template-box/index.d.ts +6 -0
- package/widgets/lib/widgets/editors/template-box/template-box-widget-column.component.d.ts +10 -0
- package/widgets/lib/widgets/editors/template-box/template-box-widget-edit.component.d.ts +29 -0
- package/widgets/lib/widgets/editors/template-box/template-box-widget-filter.component.d.ts +6 -0
- package/widgets/lib/widgets/editors/template-box/template-box-widget-print.component.d.ts +10 -0
- package/widgets/lib/widgets/editors/template-box/template-box-widget-view.component.d.ts +11 -0
- package/widgets/lib/widgets/editors/template-box/template-box-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/filters/select-filter/select-filter-widget-edit.component.d.ts +2 -5
- package/widgets/lib/widgets/index.d.ts +3 -0
- package/core/lib/types.d.ts +0 -57
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-LKhN00ob.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CdC4eF25.mjs +0 -400
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CdC4eF25.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-B9TUh-2S.mjs +0 -91
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-B9TUh-2S.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-ZfUaIxUa.mjs +0 -135
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-ZfUaIxUa.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-setting-page.component-Cd2yaPEZ.mjs +0 -74
- package/fesm2022/acorex-platform-themes-default-setting-page.component-Cd2yaPEZ.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-setting-view.component-B3Aob67f.mjs +0 -73
- package/fesm2022/acorex-platform-themes-default-setting-view.component-B3Aob67f.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-theme-palette-preview.page-DqAngWCf.mjs +0 -146
- package/fesm2022/acorex-platform-themes-default-theme-palette-preview.page-DqAngWCf.mjs.map +0 -1
- package/layout/builder/lib/builder/widget-groups.d.ts +0 -9
- package/layout/entity/lib/dexie-storage.service.d.ts +0 -16
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-filter.component.d.ts +0 -6
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-print.component.d.ts +0 -6
- package/themes/default/lib/layouts/filters-layout/simple-filter-builder/filters-view.component.d.ts +0 -13
- package/themes/shared/lib/components/drawer/drawer.directive.d.ts +0 -22
- package/themes/shared/lib/components/drawer/index.d.ts +0 -1
- package/themes/shared/lib/widgets/theme-color-selection/index.d.ts +0 -2
- package/themes/shared/lib/widgets/theme-color-selection/theme-color-selection-widget-edit.component.d.ts +0 -6
- package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget-edit.component.d.ts +0 -40
- package/widgets/lib/widgets/charts/donut-chart/donut-chart-widget-edit.component.d.ts +0 -44
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { AXPThemeMode, AXPThemeLayoutSetting } from './acorex-platform-themes-shared.mjs';
|
|
2
|
+
import { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
|
|
3
|
+
import { objectKeyValueTransforms, AXPPlatformScope } from '@acorex/platform/core';
|
|
4
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
5
|
+
|
|
6
|
+
class AXPThemeSettingProvider {
|
|
7
|
+
constructor(injector) {
|
|
8
|
+
this.injector = injector;
|
|
9
|
+
this.translateService = this.injector.get(AXTranslationService);
|
|
10
|
+
}
|
|
11
|
+
async provide(context) {
|
|
12
|
+
const trans = async (key) => await this.translateService.translateAsync(`settings.${key}`, { scope: 'layout' });
|
|
13
|
+
// Define the 'Appearance Settings' group
|
|
14
|
+
context.addGroup('appearance', await trans('appearance.title'), await trans('appearance.description'), 'fa-light fa-palette')
|
|
15
|
+
// Add the 'Brightness & Color' section
|
|
16
|
+
.addSection('color', await trans('appearance.color.title'), await trans('appearance.color.description'))
|
|
17
|
+
// Add the 'Theme Mode' setting
|
|
18
|
+
.addSetting({
|
|
19
|
+
key: AXPThemeLayoutSetting.Mode,
|
|
20
|
+
title: await trans('appearance.color.mode.title'),
|
|
21
|
+
scope: AXPPlatformScope.User,
|
|
22
|
+
isInherited: true,
|
|
23
|
+
defaultValue: AXPThemeMode.Light,
|
|
24
|
+
valueTransforms: objectKeyValueTransforms('id'),
|
|
25
|
+
widget: {
|
|
26
|
+
type: AXPWidgetsCatalog.themeModeChooser,
|
|
27
|
+
layout: {
|
|
28
|
+
positions: {
|
|
29
|
+
default: {
|
|
30
|
+
colSpan: 12,
|
|
31
|
+
},
|
|
32
|
+
md: {
|
|
33
|
+
colSpan: 6,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
description: await trans('appearance.color.mode.description'),
|
|
39
|
+
})
|
|
40
|
+
.addSetting({
|
|
41
|
+
key: AXPThemeLayoutSetting.Palette,
|
|
42
|
+
title: await trans('appearance.color.palette.title'),
|
|
43
|
+
scope: AXPPlatformScope.User,
|
|
44
|
+
isInherited: true,
|
|
45
|
+
defaultValue: 'default',
|
|
46
|
+
valueTransforms: objectKeyValueTransforms('name'),
|
|
47
|
+
widget: {
|
|
48
|
+
type: AXPWidgetsCatalog.themePaletteChooser,
|
|
49
|
+
layout: {
|
|
50
|
+
positions: {
|
|
51
|
+
default: {
|
|
52
|
+
colSpan: 12,
|
|
53
|
+
},
|
|
54
|
+
xxl: {
|
|
55
|
+
colSpan: 9,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
description: await trans('appearance.color.palette.description'),
|
|
61
|
+
})
|
|
62
|
+
// End the 'Brightness & Color' section
|
|
63
|
+
.endSection()
|
|
64
|
+
// Add the 'Root Menu' section
|
|
65
|
+
.addSection('root-menu', await trans('appearance.root-menu.title'), await trans('appearance.root-menu.description'))
|
|
66
|
+
// Add the 'Menu Orientation' setting
|
|
67
|
+
.addSetting({
|
|
68
|
+
key: AXPThemeLayoutSetting.MenuOrientation,
|
|
69
|
+
title: await trans('appearance.root-menu.title'),
|
|
70
|
+
scope: AXPPlatformScope.User,
|
|
71
|
+
isInherited: true,
|
|
72
|
+
defaultValue: 'vertical',
|
|
73
|
+
valueTransforms: objectKeyValueTransforms('id'),
|
|
74
|
+
widget: {
|
|
75
|
+
type: AXPWidgetsCatalog.menuOrientationChooser,
|
|
76
|
+
layout: {
|
|
77
|
+
positions: {
|
|
78
|
+
default: {
|
|
79
|
+
colSpan: 12,
|
|
80
|
+
},
|
|
81
|
+
md: {
|
|
82
|
+
colSpan: 6,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
description: await trans('appearance.root-menu.description'),
|
|
88
|
+
})
|
|
89
|
+
// Add the 'Menu Badge Visibility' setting
|
|
90
|
+
.addSetting({
|
|
91
|
+
key: AXPThemeLayoutSetting.MenuBadgeVisible,
|
|
92
|
+
title: await trans('appearance.root-menu.badge.title'),
|
|
93
|
+
scope: AXPPlatformScope.User,
|
|
94
|
+
isInherited: true,
|
|
95
|
+
defaultValue: true,
|
|
96
|
+
widget: {
|
|
97
|
+
type: AXPWidgetsCatalog.toggle,
|
|
98
|
+
layout: {
|
|
99
|
+
positions: {
|
|
100
|
+
default: {
|
|
101
|
+
colSpan: 12,
|
|
102
|
+
},
|
|
103
|
+
md: {
|
|
104
|
+
colSpan: 6,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
description: await trans('appearance.root-menu.badge.description'),
|
|
110
|
+
})
|
|
111
|
+
.endSection()
|
|
112
|
+
// Add the 'Scale & Layout' section
|
|
113
|
+
.addSection('layout', await trans('appearance.layout.title'), await trans('appearance.layout.description'))
|
|
114
|
+
// Add the 'Font Style' setting
|
|
115
|
+
.addSetting({
|
|
116
|
+
key: AXPThemeLayoutSetting.Font,
|
|
117
|
+
title: await trans('appearance.layout.font.title'),
|
|
118
|
+
scope: AXPPlatformScope.User,
|
|
119
|
+
isInherited: true,
|
|
120
|
+
defaultValue: 'system-ui',
|
|
121
|
+
valueTransforms: objectKeyValueTransforms('id'),
|
|
122
|
+
widget: {
|
|
123
|
+
type: AXPWidgetsCatalog.fontStyleChooser,
|
|
124
|
+
layout: {
|
|
125
|
+
positions: {
|
|
126
|
+
default: {
|
|
127
|
+
colSpan: 12,
|
|
128
|
+
},
|
|
129
|
+
md: {
|
|
130
|
+
colSpan: 6,
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
description: await trans('appearance.layout.font.description'),
|
|
136
|
+
})
|
|
137
|
+
// Add the 'Font Size' setting
|
|
138
|
+
.addSetting({
|
|
139
|
+
key: AXPThemeLayoutSetting.FontSize,
|
|
140
|
+
title: await trans('appearance.layout.size.title'),
|
|
141
|
+
scope: AXPPlatformScope.User,
|
|
142
|
+
isInherited: true,
|
|
143
|
+
defaultValue: 'medium',
|
|
144
|
+
valueTransforms: objectKeyValueTransforms('id'),
|
|
145
|
+
widget: {
|
|
146
|
+
type: AXPWidgetsCatalog.fontSizeChooser,
|
|
147
|
+
layout: {
|
|
148
|
+
positions: {
|
|
149
|
+
default: {
|
|
150
|
+
colSpan: 12,
|
|
151
|
+
},
|
|
152
|
+
md: {
|
|
153
|
+
colSpan: 6,
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
description: await trans('appearance.layout.size.description'),
|
|
159
|
+
})
|
|
160
|
+
// End the 'Scale & Layout' section
|
|
161
|
+
.endSection()
|
|
162
|
+
// End the 'Appearance Settings' group
|
|
163
|
+
.endGroup();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export { AXPThemeSettingProvider };
|
|
168
|
+
//# sourceMappingURL=acorex-platform-themes-shared-setting.provider-CXiRmniv.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-themes-shared-setting.provider-CXiRmniv.mjs","sources":["../../../../libs/platform/themes/shared/src/lib/setting.provider.ts"],"sourcesContent":["import { AXPSettingDefinitionProvider, AXPSettingDefinitionProviderContext } from '@acorex/platform/common';\nimport { AXPThemeLayoutSetting } from './setting.keys';\nimport { AXPWidgetsCatalog } from '@acorex/platform/layout/builder';\nimport { AXPThemeMode } from './theme.types';\nimport { Injector } from '@angular/core';\nimport { AXPPlatformScope, objectKeyValueTransforms } from '@acorex/platform/core';\nimport { AXTranslationService } from '@acorex/core/translation';\n\nexport class AXPThemeSettingProvider implements AXPSettingDefinitionProvider {\n\n private readonly translateService = this.injector.get(AXTranslationService);\n\n constructor(private injector: Injector) {\n\n }\n\n async provide(context: AXPSettingDefinitionProviderContext): Promise<void> {\n\n const trans = async (key: string) => await this.translateService.translateAsync(`settings.${key}`, { scope: 'layout' });\n\n // Define the 'Appearance Settings' group\n context.addGroup('appearance', await trans('appearance.title'), await trans('appearance.description'), 'fa-light fa-palette')\n\n // Add the 'Brightness & Color' section\n .addSection('color', await trans('appearance.color.title'), await trans('appearance.color.description'))\n\n // Add the 'Theme Mode' setting\n .addSetting({\n key: AXPThemeLayoutSetting.Mode,\n title: await trans('appearance.color.mode.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: AXPThemeMode.Light,\n valueTransforms: objectKeyValueTransforms('id'),\n widget: {\n type: AXPWidgetsCatalog.themeModeChooser,\n layout: {\n positions: {\n default: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: await trans('appearance.color.mode.description'),\n })\n\n .addSetting({\n key: AXPThemeLayoutSetting.Palette,\n title: await trans('appearance.color.palette.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: 'default',\n valueTransforms: objectKeyValueTransforms('name'),\n widget: {\n type: AXPWidgetsCatalog.themePaletteChooser,\n layout: {\n positions: {\n default: {\n colSpan: 12,\n },\n xxl: {\n colSpan: 9,\n },\n },\n },\n },\n description: await trans('appearance.color.palette.description'),\n })\n\n // End the 'Brightness & Color' section\n .endSection()\n\n // Add the 'Root Menu' section\n .addSection('root-menu', await trans('appearance.root-menu.title'), await trans('appearance.root-menu.description'))\n\n // Add the 'Menu Orientation' setting\n .addSetting({\n key: AXPThemeLayoutSetting.MenuOrientation,\n title: await trans('appearance.root-menu.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: 'vertical',\n valueTransforms: objectKeyValueTransforms('id'),\n widget: {\n type: AXPWidgetsCatalog.menuOrientationChooser,\n layout: {\n positions: {\n default: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: await trans('appearance.root-menu.description'),\n })\n\n // Add the 'Menu Badge Visibility' setting\n .addSetting({\n key: AXPThemeLayoutSetting.MenuBadgeVisible,\n title: await trans('appearance.root-menu.badge.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: true,\n widget: {\n type: AXPWidgetsCatalog.toggle,\n layout: {\n positions: {\n default: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: await trans('appearance.root-menu.badge.description'),\n })\n .endSection()\n\n // Add the 'Scale & Layout' section\n .addSection('layout', await trans('appearance.layout.title'), await trans('appearance.layout.description'))\n\n // Add the 'Font Style' setting\n .addSetting({\n key: AXPThemeLayoutSetting.Font,\n title: await trans('appearance.layout.font.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: 'system-ui',\n valueTransforms: objectKeyValueTransforms('id'),\n widget: {\n type: AXPWidgetsCatalog.fontStyleChooser,\n layout: {\n positions: {\n default: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: await trans('appearance.layout.font.description'),\n })\n\n // Add the 'Font Size' setting\n .addSetting({\n key: AXPThemeLayoutSetting.FontSize,\n title: await trans('appearance.layout.size.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: 'medium',\n valueTransforms: objectKeyValueTransforms('id'),\n widget: {\n type: AXPWidgetsCatalog.fontSizeChooser,\n layout: {\n positions: {\n default: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: await trans('appearance.layout.size.description'),\n })\n\n // End the 'Scale & Layout' section\n .endSection()\n\n // End the 'Appearance Settings' group\n .endGroup();\n\n\n }\n}\n"],"names":[],"mappings":";;;;;MAQa,uBAAuB,CAAA;AAIlC,IAAA,WAAA,CAAoB,QAAkB,EAAA;QAAlB,IAAQ,CAAA,QAAA,GAAR,QAAQ;QAFX,IAAgB,CAAA,gBAAA,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,oBAAoB,CAAC;;IAM3E,MAAM,OAAO,CAAC,OAA4C,EAAA;QAExD,MAAM,KAAK,GAAG,OAAO,GAAW,KAAK,MAAM,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAY,SAAA,EAAA,GAAG,CAAE,CAAA,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;;AAGvH,QAAA,OAAO,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,KAAK,CAAC,kBAAkB,CAAC,EAAE,MAAM,KAAK,CAAC,wBAAwB,CAAC,EAAE,qBAAqB;;AAGzH,aAAA,UAAU,CAAC,OAAO,EAAE,MAAM,KAAK,CAAC,wBAAwB,CAAC,EAAE,MAAM,KAAK,CAAC,8BAA8B,CAAC;;AAGtG,aAAA,UAAU,CAAC;YACV,GAAG,EAAE,qBAAqB,CAAC,IAAI;AAC/B,YAAA,KAAK,EAAE,MAAM,KAAK,CAAC,6BAA6B,CAAC;YACjD,KAAK,EAAE,gBAAgB,CAAC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