@edsis/angular 22.0.72 → 22.0.74

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.
@@ -1,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, effect, Service, InjectionToken, makeEnvironmentProviders, provideEnvironmentInitializer, Injector, linkedSignal, computed, afterNextRender, input, output, Component, ElementRef, signal, DestroyRef, Directive } from '@angular/core';
2
+ import { inject, effect, Service, InjectionToken, makeEnvironmentProviders, provideEnvironmentInitializer, Injector, linkedSignal, computed, afterNextRender, input, output, Component, ElementRef, signal, DestroyRef, Directive, provideAppInitializer } from '@angular/core';
3
3
  import { NavigationService } from '@edsis/navigation/service';
4
- import { LayoutService, isUiLayoutType, isUiLayoutWidth, isUiLayoutSurface, isUiLayoutStyle } from '@edsis/theme/layout';
5
- import { ThemeStyleService, ThemeModeService, ThemeSpaceService, ThemeRadiusService, ThemeColorService, ThemeBrandService, isThemeMode, isThemeSpace, isThemeRadius, isThemeColor, isThemeBrand, themeStylePresetEntry, DEFAULT_THEME_MODE, DEFAULT_THEME_COLOR, DEFAULT_THEME_BRAND, THEME_STYLES, THEME_MODES, THEME_COLORS, THEME_BRANDS, THEME_SPACES, THEME_RADII, isThemeStyle, isThemeStyleSettingLocked } from '@edsis/theme/styles';
6
- import { LAYOUT_DEFAULT_TYPE, LAYOUT_DEFAULT_WIDTH, LAYOUT_DEFAULT_SURFACE, LAYOUT_DEFAULT_STYLE } from '@edsis/theme/layout/types';
4
+ import { LayoutService, isUiLayoutType, isUiLayoutWidth, isUiLayoutSurface } from '@edsis/theme/layout';
5
+ import { ThemeAppearanceService, ThemeModeService, ThemeSpaceService, ThemeRadiusService, ThemeColorService, ThemeBrandService, isThemeMode, isThemeSpace, isThemeRadius, isThemeColor, isThemeBrand, themeAppearancePresetEntry, DEFAULT_THEME_MODE, DEFAULT_THEME_COLOR, DEFAULT_THEME_BRAND, THEME_APPEARANCES, THEME_MODES, THEME_COLORS, THEME_BRANDS, THEME_SPACES, THEME_RADII, isThemeAppearance, isThemeAppearanceSettingLocked, ThemeDeviceService } from '@edsis/theme/styles';
6
+ import { LAYOUT_DEFAULT_TYPE, LAYOUT_DEFAULT_WIDTH, LAYOUT_DEFAULT_SURFACE } from '@edsis/theme/layout/types';
7
7
  import { DOCUMENT } from '@angular/common';
8
8
  import { SheetComponent } from '@edsis/component/sheet';
9
9
  import { LayoutService as LayoutService$1 } from '@edsis/theme/layout/services';
@@ -12,15 +12,16 @@ import { IconComponent } from '@edsis/component/icon';
12
12
  import { PageComponent, PageContentComponent, PageFooterComponent, PageHeaderComponent } from '@edsis/theme/page';
13
13
  import { ToggleGroupComponent, ToggleGroupItemDirective } from '@edsis/component/toggle-group';
14
14
  import { TooltipDirective } from '@edsis/component/tooltip';
15
+ import { RuntimeContextService } from '@edsis/angular/services/runtime';
15
16
 
16
17
  const PRIMARY_NAVIGATION_ID$2 = 'main';
17
18
  const NAVIGATION_TYPES = ['sidebar', 'dockbar', 'navbar', 'flyout'];
18
19
  const NAVIGATION_ORIENTATIONS = ['vertical', 'horizontal'];
19
20
  const NAVIGATION_POSITIONS = ['left', 'right', 'top', 'bottom'];
20
21
  const NAVIGATION_DOCKBAR_MODES = ['default', 'drawer', 'sticky'];
21
- class ThemeStylePresetService {
22
+ class ThemeAppearancePresetService {
22
23
  config = inject(APP_PREFERENCES_CONFIG, { optional: true });
23
- themeStyle = inject(ThemeStyleService);
24
+ themeAppearance = inject(ThemeAppearanceService);
24
25
  themeMode = inject(ThemeModeService);
25
26
  themeSpace = inject(ThemeSpaceService);
26
27
  themeRadius = inject(ThemeRadiusService);
@@ -29,63 +30,60 @@ class ThemeStylePresetService {
29
30
  layout = inject(LayoutService);
30
31
  navigation = inject(NavigationService);
31
32
  constructor() {
32
- let previousStyle = this.themeStyle.style();
33
- if (this.themeStyle.hasStoredStyle()) {
34
- this.enforceLockedValues(previousStyle);
33
+ let previousAppearance = this.themeAppearance.appearance();
34
+ if (this.themeAppearance.hasStoredAppearance()) {
35
+ this.enforceLockedValues(previousAppearance);
35
36
  }
36
37
  else {
37
- this.applyPreset(previousStyle);
38
+ this.applyPreset(previousAppearance);
38
39
  }
39
40
  effect(() => {
40
- const style = this.themeStyle.style();
41
- if (style === previousStyle)
41
+ const appearance = this.themeAppearance.appearance();
42
+ if (appearance === previousAppearance)
42
43
  return;
43
- previousStyle = style;
44
- this.applyPreset(style);
44
+ previousAppearance = appearance;
45
+ this.applyPreset(appearance);
45
46
  });
46
- effect(() => this.enforceLockedValues(this.themeStyle.style()));
47
+ effect(() => this.enforceLockedValues(this.themeAppearance.appearance()));
47
48
  }
48
- applyPreset(style) {
49
- this.applyThemeValues(style);
50
- this.applyLayoutValues(style);
51
- this.applyNavigationValues(style);
49
+ applyPreset(themeAppearance) {
50
+ this.applyThemeValues(themeAppearance);
51
+ this.applyLayoutValues(themeAppearance);
52
+ this.applyNavigationValues(themeAppearance);
52
53
  }
53
- applyThemeValues(style) {
54
- const mode = this.valueFor(style, 'theme-mode', this.defaultMode());
54
+ applyThemeValues(themeAppearance) {
55
+ const mode = this.valueFor(themeAppearance, 'theme-mode', this.defaultMode());
55
56
  if (isThemeMode(mode))
56
57
  this.themeMode.setMode(mode);
57
- const space = this.valueFor(style, 'theme-space', this.defaultSpace());
58
+ const space = this.valueFor(themeAppearance, 'theme-space', this.defaultSpace());
58
59
  if (isThemeSpace(space))
59
60
  this.themeSpace.setSpace(space);
60
- const radius = this.valueFor(style, 'theme-radius', this.defaultRadius());
61
+ const radius = this.valueFor(themeAppearance, 'theme-radius', this.defaultRadius());
61
62
  if (isThemeRadius(radius))
62
63
  this.themeRadius.setRadius(radius);
63
- const color = this.valueFor(style, 'theme-color', this.defaultColor());
64
+ const color = this.valueFor(themeAppearance, 'theme-color', this.defaultColor());
64
65
  if (isThemeColor(color))
65
66
  this.themeColor.setColor(color);
66
- const brand = this.valueFor(style, 'theme-brand', this.defaultBrand());
67
+ const brand = this.valueFor(themeAppearance, 'theme-brand', this.defaultBrand());
67
68
  if (isThemeBrand(brand))
68
69
  this.themeBrand.setBrand(brand);
69
70
  }
70
- applyLayoutValues(style) {
71
- const type = this.valueFor(style, 'layout-type', this.defaultLayoutType());
71
+ applyLayoutValues(themeAppearance) {
72
+ const type = this.valueFor(themeAppearance, 'layout-type', this.defaultLayoutType());
72
73
  if (isUiLayoutType(type))
73
74
  this.layout.setType(type);
74
- const width = this.valueFor(style, 'layout-width', this.defaultLayoutWidth());
75
+ const width = this.valueFor(themeAppearance, 'layout-width', this.defaultLayoutWidth());
75
76
  if (isUiLayoutWidth(width))
76
77
  this.layout.setWidth(width);
77
- const surface = this.valueFor(style, 'layout-surface', this.defaultLayoutSurface());
78
+ const surface = this.valueFor(themeAppearance, 'layout-surface', this.defaultLayoutSurface());
78
79
  if (isUiLayoutSurface(surface))
79
80
  this.layout.setSurface(surface);
80
- const appearance = this.valueFor(style, 'layout-appearance', this.defaultLayoutAppearance());
81
- if (isUiLayoutStyle(appearance))
82
- this.layout.setAppearance(appearance);
83
- }
84
- applyNavigationValues(style) {
85
- const orientation = this.valueFor(style, 'nav-orientation', this.defaultNavigationOrientation());
86
- const type = this.valueFor(style, 'nav-type', this.defaultNavigationType());
87
- const position = this.valueFor(style, 'nav-position', this.defaultNavigationPosition());
88
- const typeMode = this.valueFor(style, 'nav-type-mode', 'default');
81
+ }
82
+ applyNavigationValues(themeAppearance) {
83
+ const orientation = this.valueFor(themeAppearance, 'nav-orientation', this.defaultNavigationOrientation());
84
+ const type = this.valueFor(themeAppearance, 'nav-type', this.defaultNavigationType());
85
+ const position = this.valueFor(themeAppearance, 'nav-position', this.defaultNavigationPosition());
86
+ const typeMode = this.valueFor(themeAppearance, 'nav-type-mode', 'default');
89
87
  this.navigation.update(PRIMARY_NAVIGATION_ID$2, {
90
88
  orientation: isNavigationOrientation(orientation)
91
89
  ? orientation
@@ -102,39 +100,35 @@ class ThemeStylePresetService {
102
100
  : this.defaultNavigationDockbarMode(),
103
101
  });
104
102
  }
105
- enforceLockedValues(style) {
106
- const mode = this.lockedValueFor(style, 'theme-mode');
103
+ enforceLockedValues(themeAppearance) {
104
+ const mode = this.lockedValueFor(themeAppearance, 'theme-mode');
107
105
  if (isThemeMode(mode) && this.themeMode.mode() !== mode)
108
106
  this.themeMode.setMode(mode);
109
- const space = this.lockedValueFor(style, 'theme-space');
107
+ const space = this.lockedValueFor(themeAppearance, 'theme-space');
110
108
  if (isThemeSpace(space) && this.themeSpace.space() !== space)
111
109
  this.themeSpace.setSpace(space);
112
- const radius = this.lockedValueFor(style, 'theme-radius');
110
+ const radius = this.lockedValueFor(themeAppearance, 'theme-radius');
113
111
  if (isThemeRadius(radius) && this.themeRadius.radius() !== radius)
114
112
  this.themeRadius.setRadius(radius);
115
- const color = this.lockedValueFor(style, 'theme-color');
113
+ const color = this.lockedValueFor(themeAppearance, 'theme-color');
116
114
  if (isThemeColor(color) && this.themeColor.color() !== color)
117
115
  this.themeColor.setColor(color);
118
- const brand = this.lockedValueFor(style, 'theme-brand');
116
+ const brand = this.lockedValueFor(themeAppearance, 'theme-brand');
119
117
  if (isThemeBrand(brand) && this.themeBrand.brand() !== brand)
120
118
  this.themeBrand.setBrand(brand);
121
- const type = this.lockedValueFor(style, 'layout-type');
119
+ const type = this.lockedValueFor(themeAppearance, 'layout-type');
122
120
  if (isUiLayoutType(type) && this.layout.type() !== type)
123
121
  this.layout.setType(type);
124
- const width = this.lockedValueFor(style, 'layout-width');
122
+ const width = this.lockedValueFor(themeAppearance, 'layout-width');
125
123
  if (isUiLayoutWidth(width) && this.layout.width() !== width)
126
124
  this.layout.setWidth(width);
127
- const surface = this.lockedValueFor(style, 'layout-surface');
125
+ const surface = this.lockedValueFor(themeAppearance, 'layout-surface');
128
126
  if (isUiLayoutSurface(surface) && this.layout.surface() !== surface)
129
127
  this.layout.setSurface(surface);
130
- const appearance = this.lockedValueFor(style, 'layout-appearance');
131
- if (isUiLayoutStyle(appearance) && this.layout.appearance() !== appearance) {
132
- this.layout.setAppearance(appearance);
133
- }
134
- const orientation = this.lockedValueFor(style, 'nav-orientation');
135
- const navigationType = this.lockedValueFor(style, 'nav-type');
136
- const position = this.lockedValueFor(style, 'nav-position');
137
- const typeMode = this.lockedValueFor(style, 'nav-type-mode');
128
+ const orientation = this.lockedValueFor(themeAppearance, 'nav-orientation');
129
+ const navigationType = this.lockedValueFor(themeAppearance, 'nav-type');
130
+ const position = this.lockedValueFor(themeAppearance, 'nav-position');
131
+ const typeMode = this.lockedValueFor(themeAppearance, 'nav-type-mode');
138
132
  const currentNavigationState = this.navigation.currentState(PRIMARY_NAVIGATION_ID$2);
139
133
  const navigationState = currentNavigationState ?? {
140
134
  id: PRIMARY_NAVIGATION_ID$2,
@@ -175,12 +169,12 @@ class ThemeStylePresetService {
175
169
  this.navigation.update(PRIMARY_NAVIGATION_ID$2, navigationUpdate);
176
170
  }
177
171
  }
178
- lockedValueFor(style, key) {
179
- const entry = themeStylePresetEntry(style, key);
172
+ lockedValueFor(themeAppearance, key) {
173
+ const entry = themeAppearancePresetEntry(themeAppearance, key);
180
174
  return entry.control === 'fix' ? entry.value : null;
181
175
  }
182
- valueFor(style, key, fallback) {
183
- const value = themeStylePresetEntry(style, key).value;
176
+ valueFor(themeAppearance, key, fallback) {
177
+ const value = themeAppearancePresetEntry(themeAppearance, key).value;
184
178
  return value === 'default' ? fallback : value;
185
179
  }
186
180
  defaultMode() {
@@ -207,9 +201,6 @@ class ThemeStylePresetService {
207
201
  defaultLayoutSurface() {
208
202
  return this.config?.defaults?.layout.surface ?? LAYOUT_DEFAULT_SURFACE;
209
203
  }
210
- defaultLayoutAppearance() {
211
- return this.config?.defaults?.layout.appearance ?? LAYOUT_DEFAULT_STYLE;
212
- }
213
204
  defaultNavigationOrientation() {
214
205
  return this.config?.defaults?.navigation.orientation ?? 'vertical';
215
206
  }
@@ -225,10 +216,10 @@ class ThemeStylePresetService {
225
216
  defaultNavigationDockbarMode() {
226
217
  return this.config?.defaults?.navigation.dockbarMode ?? 'default';
227
218
  }
228
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ThemeStylePresetService, deps: [], target: i0.ɵɵFactoryTarget.Service });
229
- static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.7", ngImport: i0, type: ThemeStylePresetService });
219
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ThemeAppearancePresetService, deps: [], target: i0.ɵɵFactoryTarget.Service });
220
+ static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.7", ngImport: i0, type: ThemeAppearancePresetService });
230
221
  }
231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ThemeStylePresetService, decorators: [{
222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ThemeAppearancePresetService, decorators: [{
232
223
  type: Service
233
224
  }], ctorParameters: () => [] });
234
225
  function isNavigationType(value) {
@@ -249,7 +240,7 @@ function provideAppPreferences(config = {}) {
249
240
  return makeEnvironmentProviders([
250
241
  { provide: APP_PREFERENCES_CONFIG, useValue: config },
251
242
  provideEnvironmentInitializer(() => {
252
- inject(ThemeStylePresetService);
243
+ inject(ThemeAppearancePresetService);
253
244
  }),
254
245
  ]);
255
246
  }
@@ -475,11 +466,10 @@ const VERTICAL_NAVIGATION_TYPES = ['sidebar', 'dockbar'];
475
466
  const HORIZONTAL_NAVIGATION_TYPES = ['navbar', 'flyout'];
476
467
  const NAVIGATION_LAYOUT_TYPES = ['vertical', 'horizontal'];
477
468
  const DOCKBAR_MODES = ['default', 'sticky', 'drawer'];
478
- const THEME_STYLE_OPTIONS = {
479
- dinamic: { label: 'Dinamis', icon: 'auto_awesome' },
469
+ const THEME_APPEARANCE_OPTIONS = {
470
+ browser: { label: 'Browser', icon: 'language' },
480
471
  rail: { label: 'Rail', icon: 'view_sidebar' },
481
- ala: { label: 'Ala', icon: 'palette' },
482
- aye: { label: 'Aye', icon: 'visibility' },
472
+ tablet: { label: 'Tablet', icon: 'tablet_android' },
483
473
  desktop: { label: 'Desktop', icon: 'desktop_windows' },
484
474
  };
485
475
  const THEME_MODE_OPTIONS = {
@@ -503,12 +493,6 @@ const THEME_RADIUS_OPTIONS = {
503
493
  medium: { label: 'Sedang', icon: 'rounded_corner' },
504
494
  large: { label: 'Besar', icon: 'rounded_corner' },
505
495
  };
506
- const LAYOUT_APPEARANCE_OPTIONS = {
507
- base: { label: 'Dasar', icon: 'crop_square' },
508
- 'border-rail': { label: 'Border rail', icon: 'border_outer' },
509
- ala: { label: 'Ala', icon: 'space_dashboard' },
510
- desktop: { label: 'Desktop', icon: 'desktop_windows' },
511
- };
512
496
  const LAYOUT_SURFACE_OPTIONS = {
513
497
  base: { label: 'Dasar', icon: 'crop_square' },
514
498
  flat: { label: 'Datar', icon: 'crop_16_9' },
@@ -554,7 +538,7 @@ class AppPreferencesSurfaceComponent {
554
538
  themeMode = inject(ThemeModeService);
555
539
  themeSpace = inject(ThemeSpaceService);
556
540
  themeRadius = inject(ThemeRadiusService);
557
- themeStyle = inject(ThemeStyleService);
541
+ themeAppearanceService = inject(ThemeAppearanceService);
558
542
  themeColor = inject(ThemeColorService);
559
543
  themeBrand = inject(ThemeBrandService);
560
544
  layout = inject(LayoutService);
@@ -569,10 +553,9 @@ class AppPreferencesSurfaceComponent {
569
553
  mode = this.themeMode.mode;
570
554
  space = this.themeSpace.space;
571
555
  radius = this.themeRadius.radius;
572
- style = this.themeStyle.style;
556
+ themeAppearance = this.themeAppearanceService.appearance;
573
557
  color = this.themeColor.color;
574
558
  brand = this.themeBrand.brand;
575
- appearance = this.layout.appearance;
576
559
  surface = this.layout.surface;
577
560
  width = this.layout.width;
578
561
  layoutType = this.layout.type;
@@ -585,13 +568,12 @@ class AppPreferencesSurfaceComponent {
585
568
  dockbarMode: 'default',
586
569
  }, /* @ts-ignore */
587
570
  ...(ngDevMode ? [{ debugName: "navigationState" }] : /* istanbul ignore next */ []));
588
- styleOptions = toOptions(THEME_STYLES, THEME_STYLE_OPTIONS);
571
+ themeAppearanceOptions = toOptions(THEME_APPEARANCES, THEME_APPEARANCE_OPTIONS);
589
572
  modeOptions = toOptions(THEME_MODES, THEME_MODE_OPTIONS);
590
573
  colorOptions = toOptions(THEME_COLORS, THEME_COLOR_OPTIONS);
591
574
  brandOptions = toOptions(THEME_BRANDS, THEME_BRAND_OPTIONS);
592
575
  spaceOptions = toOptions(THEME_SPACES, THEME_SPACE_OPTIONS);
593
576
  radiusOptions = toOptions(THEME_RADII, THEME_RADIUS_OPTIONS);
594
- appearanceOptions = toOptions(['base', 'border-rail', 'ala', 'desktop'], LAYOUT_APPEARANCE_OPTIONS);
595
577
  surfaceOptions = toOptions(['base', 'flat', 'grid'], LAYOUT_SURFACE_OPTIONS);
596
578
  widthOptions = toOptions(['full', 'wide', 'container', 'fluid'], LAYOUT_WIDTH_OPTIONS);
597
579
  layoutTypeOptions = toOptions(NAVIGATION_LAYOUT_TYPES, LAYOUT_TYPE_OPTIONS);
@@ -643,14 +625,14 @@ class AppPreferencesSurfaceComponent {
643
625
  closeButton?.focus({ preventScroll: true });
644
626
  });
645
627
  }
646
- selectStyle(value) {
647
- if (!isThemeStyle(value))
628
+ selectThemeAppearance(value) {
629
+ if (!isThemeAppearance(value))
648
630
  return;
649
- // A style may switch the shell between sidebar and dockbar. Close the
631
+ // An appearance may switch the shell between sidebar and dockbar. Close the
650
632
  // currently projected panel first so the navigation tree and preferences
651
633
  // surface do not transition at the same time.
652
634
  this.preferences.close();
653
- this.themeStyle.setStyle(value);
635
+ this.themeAppearanceService.setAppearance(value);
654
636
  }
655
637
  selectMode(value) {
656
638
  if (!this.isLocked('theme-mode') && isThemeMode(value))
@@ -672,11 +654,6 @@ class AppPreferencesSurfaceComponent {
672
654
  if (!this.isLocked('theme-radius') && isThemeRadius(value))
673
655
  this.themeRadius.setRadius(value);
674
656
  }
675
- selectAppearance(value) {
676
- if (!this.isLocked('layout-appearance') && isUiLayoutStyle(value)) {
677
- this.layout.setAppearance(value);
678
- }
679
- }
680
657
  selectSurface(value) {
681
658
  if (!this.isLocked('layout-surface') && isUiLayoutSurface(value)) {
682
659
  this.layout.setSurface(value);
@@ -758,12 +735,8 @@ class AppPreferencesSurfaceComponent {
758
735
  this.themeRadius.setRadius(defaults.theme.radius);
759
736
  changed = true;
760
737
  }
761
- if (this.style() !== defaults.theme.style) {
762
- this.themeStyle.setStyle(defaults.theme.style);
763
- changed = true;
764
- }
765
- if (!this.isLocked('layout-appearance') && this.appearance() !== defaults.layout.appearance) {
766
- this.layout.setAppearance(defaults.layout.appearance);
738
+ if (this.themeAppearance() !== defaults.theme.appearance) {
739
+ this.themeAppearanceService.setAppearance(defaults.theme.appearance);
767
740
  changed = true;
768
741
  }
769
742
  if (!this.isLocked('layout-surface') && this.surface() !== defaults.layout.surface) {
@@ -807,13 +780,13 @@ class AppPreferencesSurfaceComponent {
807
780
  queueMicrotask(() => this.announcement.set(message));
808
781
  }
809
782
  isLocked(key) {
810
- return isThemeStyleSettingLocked(this.style(), key);
783
+ return isThemeAppearanceSettingLocked(this.themeAppearance(), key);
811
784
  }
812
785
  isLayoutTypeLocked() {
813
786
  return this.isLocked('layout-type') || this.isLocked('nav-orientation');
814
787
  }
815
788
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AppPreferencesSurfaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
816
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: AppPreferencesSurfaceComponent, isStandalone: true, selector: "app-preferences-surface", outputs: { closeRequested: "closeRequested" }, host: { classAttribute: "block h-full min-h-0 w-full" }, ngImport: i0, template: "<Page variant=\"stacked\" height=\"fix\" scroll=\"content\" class=\"bg-background\">\n <PageHeader class=\"h-11 px-3 py-0\">\n <div class=\"flex h-full items-center justify-between gap-3\">\n <h2\n id=\"app-preferences-title\"\n class=\"min-w-0 truncate text-base font-semibold text-foreground\"\n >\n Preferensi aplikasi\n </h2>\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-11 w-11 shrink-0\"\n data-app-preferences-close\n aria-label=\"Tutup preferensi aplikasi\"\n (click)=\"closeRequested.emit()\"\n >\n <Icon name=\"close\" [size]=\"20\" />\n </button>\n </div>\n </PageHeader>\n\n <PageContent class=\"overscroll-contain bg-muted/20\">\n <div class=\"space-y-5 p-3\">\n <p class=\"text-xs leading-4 text-muted-foreground\">\n Sesuaikan tampilan dan navigasi aplikasi.\n </p>\n\n <section aria-labelledby=\"app-preferences-theme\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-theme\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Tema\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-style\"\n title=\"Gaya tema\"\n [activeLabel]=\"styleOptions.find((option) => option.value === style())?.label ?? style()\"\n [options]=\"styleOptions\"\n [selected]=\"style()\"\n (optionSelected)=\"selectStyle($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-mode\"\n title=\"Mode warna\"\n description=\"Sistem mengikuti preferensi perangkat.\"\n [activeLabel]=\"modeOptions.find((option) => option.value === mode())?.label ?? mode()\"\n [options]=\"modeOptions\"\n [selected]=\"mode()\"\n [locked]=\"isLocked('theme-mode')\"\n (optionSelected)=\"selectMode($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-color\"\n title=\"Warna tema\"\n [activeLabel]=\"colorOptions.find((option) => option.value === color())?.label ?? color()\"\n [options]=\"colorOptions\"\n [selected]=\"color()\"\n [locked]=\"isLocked('theme-color')\"\n (optionSelected)=\"selectColor($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-brand\"\n title=\"Brand\"\n [activeLabel]=\"brandOptions.find((option) => option.value === brand())?.label ?? brand()\"\n [options]=\"brandOptions\"\n [selected]=\"brand()\"\n [locked]=\"isLocked('theme-brand')\"\n (optionSelected)=\"selectBrand($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-space\"\n title=\"Kerapatan\"\n [activeLabel]=\"spaceOptions.find((option) => option.value === space())?.label ?? space()\"\n [options]=\"spaceOptions\"\n [selected]=\"space()\"\n [locked]=\"isLocked('theme-space')\"\n (optionSelected)=\"selectSpace($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-radius\"\n title=\"Sudut\"\n [activeLabel]=\"\n radiusOptions.find((option) => option.value === radius())?.label ?? radius()\n \"\n [options]=\"radiusOptions\"\n [selected]=\"radius()\"\n [locked]=\"isLocked('theme-radius')\"\n (optionSelected)=\"selectRadius($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-layout\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-layout\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Layout\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-appearance\"\n title=\"Bingkai\"\n [activeLabel]=\"\n appearanceOptions.find((option) => option.value === appearance())?.label ?? appearance()\n \"\n [options]=\"appearanceOptions\"\n [selected]=\"appearance()\"\n [locked]=\"isLocked('layout-appearance')\"\n (optionSelected)=\"selectAppearance($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-surface\"\n title=\"Latar\"\n [activeLabel]=\"\n surfaceOptions.find((option) => option.value === surface())?.label ?? surface()\n \"\n [options]=\"surfaceOptions\"\n [selected]=\"surface()\"\n [locked]=\"isLocked('layout-surface')\"\n (optionSelected)=\"selectSurface($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-layout-type\"\n title=\"Tipe layout\"\n [activeLabel]=\"\n layoutTypeOptions.find((option) => option.value === layoutType())?.label ?? layoutType()\n \"\n [options]=\"layoutTypeOptions\"\n [selected]=\"layoutType()\"\n [locked]=\"isLayoutTypeLocked()\"\n (optionSelected)=\"selectLayoutType($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-width\"\n title=\"Lebar konten\"\n [activeLabel]=\"widthOptions.find((option) => option.value === width())?.label ?? width()\"\n [options]=\"widthOptions\"\n [selected]=\"width()\"\n [locked]=\"isLocked('layout-width')\"\n (optionSelected)=\"selectWidth($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-navigation\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-navigation\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Navigasi\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-type\"\n title=\"Tipe navigation\"\n [activeLabel]=\"navigationTypeLabel()\"\n [options]=\"navigationTypeOptions()\"\n [selected]=\"navigationState().type\"\n [locked]=\"isLocked('nav-type')\"\n (optionSelected)=\"selectNavigationType($event)\"\n />\n @if (navigationState().orientation === 'vertical') {\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-mode\"\n title=\"Mode navigation\"\n [activeLabel]=\"navigationModeLabel()\"\n [options]=\"navigationModeOptions()\"\n [selected]=\"navigationMode()\"\n [locked]=\"isLocked('nav-type-mode')\"\n (optionSelected)=\"selectNavigationMode($event)\"\n />\n }\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-position\"\n title=\"Posisi navigation\"\n [activeLabel]=\"navigationPositionLabel()\"\n [options]=\"navigationPositionOptions()\"\n [selected]=\"navigationState().position\"\n [locked]=\"isLocked('nav-position')\"\n (optionSelected)=\"selectNavigationPosition($event)\"\n />\n </section>\n </div>\n </PageContent>\n\n @if (hasDefaults()) {\n <PageFooter class=\"px-3 py-0\">\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n class=\"h-full w-full justify-start\"\n (click)=\"resetToDefaults()\"\n >\n <Icon name=\"restart_alt\" [size]=\"18\" />\n Kembalikan default\n </button>\n </PageFooter>\n }\n\n <p class=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</p>\n</Page>\n", dependencies: [{ kind: "component", type: AppPreferenceSettingGroupComponent, selector: "app-preference-setting-group", inputs: ["title", "description", "activeLabel", "options", "selected", "headingId", "locked"], outputs: ["optionSelected"] }, { kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class"] }, { kind: "component", type: IconComponent, selector: "Icon", inputs: ["name", "class", "size", "fill", "weight", "grade", "opticalSize"] }, { kind: "component", type: PageComponent, selector: "Page", inputs: ["variant", "height", "scroll", "position", "sideMode", "sideOpen", "sideWidth", "page-appearance", "class"], outputs: ["sideOpenChange"] }, { kind: "component", type: PageContentComponent, selector: "PageContent", inputs: ["class"] }, { kind: "component", type: PageFooterComponent, selector: "PageFooter", inputs: ["class"] }, { kind: "component", type: PageHeaderComponent, selector: "PageHeader", inputs: ["class"] }] });
789
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: AppPreferencesSurfaceComponent, isStandalone: true, selector: "app-preferences-surface", outputs: { closeRequested: "closeRequested" }, host: { classAttribute: "block h-full min-h-0 w-full" }, ngImport: i0, template: "<Page variant=\"stacked\" height=\"fix\" scroll=\"content\" class=\"bg-background\">\n <PageHeader class=\"h-11 px-3 py-0\">\n <div class=\"flex h-full items-center justify-between gap-3\">\n <h2\n id=\"app-preferences-title\"\n class=\"min-w-0 truncate text-base font-semibold text-foreground\"\n >\n Preferensi aplikasi\n </h2>\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-11 w-11 shrink-0\"\n data-app-preferences-close\n aria-label=\"Tutup preferensi aplikasi\"\n (click)=\"closeRequested.emit()\"\n >\n <Icon name=\"close\" [size]=\"20\" />\n </button>\n </div>\n </PageHeader>\n\n <PageContent class=\"overscroll-contain bg-muted/20\">\n <div class=\"space-y-5 p-3\">\n <p class=\"text-xs leading-4 text-muted-foreground\">\n Sesuaikan tampilan dan navigasi aplikasi.\n </p>\n\n <section aria-labelledby=\"app-preferences-theme\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-theme\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Tema\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-theme-appearance\"\n title=\"Tampilan tema\"\n [activeLabel]=\"\n themeAppearanceOptions.find((option) => option.value === themeAppearance())?.label ??\n themeAppearance()\n \"\n [options]=\"themeAppearanceOptions\"\n [selected]=\"themeAppearance()\"\n (optionSelected)=\"selectThemeAppearance($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-mode\"\n title=\"Mode warna\"\n description=\"Sistem mengikuti preferensi perangkat.\"\n [activeLabel]=\"modeOptions.find((option) => option.value === mode())?.label ?? mode()\"\n [options]=\"modeOptions\"\n [selected]=\"mode()\"\n [locked]=\"isLocked('theme-mode')\"\n (optionSelected)=\"selectMode($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-color\"\n title=\"Warna tema\"\n [activeLabel]=\"colorOptions.find((option) => option.value === color())?.label ?? color()\"\n [options]=\"colorOptions\"\n [selected]=\"color()\"\n [locked]=\"isLocked('theme-color')\"\n (optionSelected)=\"selectColor($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-brand\"\n title=\"Brand\"\n [activeLabel]=\"brandOptions.find((option) => option.value === brand())?.label ?? brand()\"\n [options]=\"brandOptions\"\n [selected]=\"brand()\"\n [locked]=\"isLocked('theme-brand')\"\n (optionSelected)=\"selectBrand($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-space\"\n title=\"Kerapatan\"\n [activeLabel]=\"spaceOptions.find((option) => option.value === space())?.label ?? space()\"\n [options]=\"spaceOptions\"\n [selected]=\"space()\"\n [locked]=\"isLocked('theme-space')\"\n (optionSelected)=\"selectSpace($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-radius\"\n title=\"Sudut\"\n [activeLabel]=\"\n radiusOptions.find((option) => option.value === radius())?.label ?? radius()\n \"\n [options]=\"radiusOptions\"\n [selected]=\"radius()\"\n [locked]=\"isLocked('theme-radius')\"\n (optionSelected)=\"selectRadius($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-layout\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-layout\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Layout\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-surface\"\n title=\"Latar\"\n [activeLabel]=\"\n surfaceOptions.find((option) => option.value === surface())?.label ?? surface()\n \"\n [options]=\"surfaceOptions\"\n [selected]=\"surface()\"\n [locked]=\"isLocked('layout-surface')\"\n (optionSelected)=\"selectSurface($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-layout-type\"\n title=\"Tipe layout\"\n [activeLabel]=\"\n layoutTypeOptions.find((option) => option.value === layoutType())?.label ?? layoutType()\n \"\n [options]=\"layoutTypeOptions\"\n [selected]=\"layoutType()\"\n [locked]=\"isLayoutTypeLocked()\"\n (optionSelected)=\"selectLayoutType($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-width\"\n title=\"Lebar konten\"\n [activeLabel]=\"widthOptions.find((option) => option.value === width())?.label ?? width()\"\n [options]=\"widthOptions\"\n [selected]=\"width()\"\n [locked]=\"isLocked('layout-width')\"\n (optionSelected)=\"selectWidth($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-navigation\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-navigation\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Navigasi\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-type\"\n title=\"Tipe navigation\"\n [activeLabel]=\"navigationTypeLabel()\"\n [options]=\"navigationTypeOptions()\"\n [selected]=\"navigationState().type\"\n [locked]=\"isLocked('nav-type')\"\n (optionSelected)=\"selectNavigationType($event)\"\n />\n @if (navigationState().orientation === 'vertical') {\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-mode\"\n title=\"Mode navigation\"\n [activeLabel]=\"navigationModeLabel()\"\n [options]=\"navigationModeOptions()\"\n [selected]=\"navigationMode()\"\n [locked]=\"isLocked('nav-type-mode')\"\n (optionSelected)=\"selectNavigationMode($event)\"\n />\n }\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-position\"\n title=\"Posisi navigation\"\n [activeLabel]=\"navigationPositionLabel()\"\n [options]=\"navigationPositionOptions()\"\n [selected]=\"navigationState().position\"\n [locked]=\"isLocked('nav-position')\"\n (optionSelected)=\"selectNavigationPosition($event)\"\n />\n </section>\n </div>\n </PageContent>\n\n @if (hasDefaults()) {\n <PageFooter class=\"px-3 py-0\">\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n class=\"h-full w-full justify-start\"\n (click)=\"resetToDefaults()\"\n >\n <Icon name=\"restart_alt\" [size]=\"18\" />\n Kembalikan default\n </button>\n </PageFooter>\n }\n\n <p class=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</p>\n</Page>\n", dependencies: [{ kind: "component", type: AppPreferenceSettingGroupComponent, selector: "app-preference-setting-group", inputs: ["title", "description", "activeLabel", "options", "selected", "headingId", "locked"], outputs: ["optionSelected"] }, { kind: "component", type: ButtonComponent, selector: "button[Button], a[Button]", inputs: ["variant", "size", "class"] }, { kind: "component", type: IconComponent, selector: "Icon", inputs: ["name", "class", "size", "fill", "weight", "grade", "opticalSize"] }, { kind: "component", type: PageComponent, selector: "Page", inputs: ["variant", "height", "scroll", "position", "sideMode", "sideOpen", "sideWidth", "class"], outputs: ["sideOpenChange"] }, { kind: "component", type: PageContentComponent, selector: "PageContent", inputs: ["class"] }, { kind: "component", type: PageFooterComponent, selector: "PageFooter", inputs: ["class"] }, { kind: "component", type: PageHeaderComponent, selector: "PageHeader", inputs: ["class"] }] });
817
790
  }
818
791
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: AppPreferencesSurfaceComponent, decorators: [{
819
792
  type: Component,
@@ -827,7 +800,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
827
800
  PageHeaderComponent,
828
801
  ], host: {
829
802
  class: 'block h-full min-h-0 w-full',
830
- }, template: "<Page variant=\"stacked\" height=\"fix\" scroll=\"content\" class=\"bg-background\">\n <PageHeader class=\"h-11 px-3 py-0\">\n <div class=\"flex h-full items-center justify-between gap-3\">\n <h2\n id=\"app-preferences-title\"\n class=\"min-w-0 truncate text-base font-semibold text-foreground\"\n >\n Preferensi aplikasi\n </h2>\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-11 w-11 shrink-0\"\n data-app-preferences-close\n aria-label=\"Tutup preferensi aplikasi\"\n (click)=\"closeRequested.emit()\"\n >\n <Icon name=\"close\" [size]=\"20\" />\n </button>\n </div>\n </PageHeader>\n\n <PageContent class=\"overscroll-contain bg-muted/20\">\n <div class=\"space-y-5 p-3\">\n <p class=\"text-xs leading-4 text-muted-foreground\">\n Sesuaikan tampilan dan navigasi aplikasi.\n </p>\n\n <section aria-labelledby=\"app-preferences-theme\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-theme\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Tema\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-style\"\n title=\"Gaya tema\"\n [activeLabel]=\"styleOptions.find((option) => option.value === style())?.label ?? style()\"\n [options]=\"styleOptions\"\n [selected]=\"style()\"\n (optionSelected)=\"selectStyle($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-mode\"\n title=\"Mode warna\"\n description=\"Sistem mengikuti preferensi perangkat.\"\n [activeLabel]=\"modeOptions.find((option) => option.value === mode())?.label ?? mode()\"\n [options]=\"modeOptions\"\n [selected]=\"mode()\"\n [locked]=\"isLocked('theme-mode')\"\n (optionSelected)=\"selectMode($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-color\"\n title=\"Warna tema\"\n [activeLabel]=\"colorOptions.find((option) => option.value === color())?.label ?? color()\"\n [options]=\"colorOptions\"\n [selected]=\"color()\"\n [locked]=\"isLocked('theme-color')\"\n (optionSelected)=\"selectColor($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-brand\"\n title=\"Brand\"\n [activeLabel]=\"brandOptions.find((option) => option.value === brand())?.label ?? brand()\"\n [options]=\"brandOptions\"\n [selected]=\"brand()\"\n [locked]=\"isLocked('theme-brand')\"\n (optionSelected)=\"selectBrand($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-space\"\n title=\"Kerapatan\"\n [activeLabel]=\"spaceOptions.find((option) => option.value === space())?.label ?? space()\"\n [options]=\"spaceOptions\"\n [selected]=\"space()\"\n [locked]=\"isLocked('theme-space')\"\n (optionSelected)=\"selectSpace($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-radius\"\n title=\"Sudut\"\n [activeLabel]=\"\n radiusOptions.find((option) => option.value === radius())?.label ?? radius()\n \"\n [options]=\"radiusOptions\"\n [selected]=\"radius()\"\n [locked]=\"isLocked('theme-radius')\"\n (optionSelected)=\"selectRadius($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-layout\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-layout\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Layout\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-appearance\"\n title=\"Bingkai\"\n [activeLabel]=\"\n appearanceOptions.find((option) => option.value === appearance())?.label ?? appearance()\n \"\n [options]=\"appearanceOptions\"\n [selected]=\"appearance()\"\n [locked]=\"isLocked('layout-appearance')\"\n (optionSelected)=\"selectAppearance($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-surface\"\n title=\"Latar\"\n [activeLabel]=\"\n surfaceOptions.find((option) => option.value === surface())?.label ?? surface()\n \"\n [options]=\"surfaceOptions\"\n [selected]=\"surface()\"\n [locked]=\"isLocked('layout-surface')\"\n (optionSelected)=\"selectSurface($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-layout-type\"\n title=\"Tipe layout\"\n [activeLabel]=\"\n layoutTypeOptions.find((option) => option.value === layoutType())?.label ?? layoutType()\n \"\n [options]=\"layoutTypeOptions\"\n [selected]=\"layoutType()\"\n [locked]=\"isLayoutTypeLocked()\"\n (optionSelected)=\"selectLayoutType($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-width\"\n title=\"Lebar konten\"\n [activeLabel]=\"widthOptions.find((option) => option.value === width())?.label ?? width()\"\n [options]=\"widthOptions\"\n [selected]=\"width()\"\n [locked]=\"isLocked('layout-width')\"\n (optionSelected)=\"selectWidth($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-navigation\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-navigation\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Navigasi\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-type\"\n title=\"Tipe navigation\"\n [activeLabel]=\"navigationTypeLabel()\"\n [options]=\"navigationTypeOptions()\"\n [selected]=\"navigationState().type\"\n [locked]=\"isLocked('nav-type')\"\n (optionSelected)=\"selectNavigationType($event)\"\n />\n @if (navigationState().orientation === 'vertical') {\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-mode\"\n title=\"Mode navigation\"\n [activeLabel]=\"navigationModeLabel()\"\n [options]=\"navigationModeOptions()\"\n [selected]=\"navigationMode()\"\n [locked]=\"isLocked('nav-type-mode')\"\n (optionSelected)=\"selectNavigationMode($event)\"\n />\n }\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-position\"\n title=\"Posisi navigation\"\n [activeLabel]=\"navigationPositionLabel()\"\n [options]=\"navigationPositionOptions()\"\n [selected]=\"navigationState().position\"\n [locked]=\"isLocked('nav-position')\"\n (optionSelected)=\"selectNavigationPosition($event)\"\n />\n </section>\n </div>\n </PageContent>\n\n @if (hasDefaults()) {\n <PageFooter class=\"px-3 py-0\">\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n class=\"h-full w-full justify-start\"\n (click)=\"resetToDefaults()\"\n >\n <Icon name=\"restart_alt\" [size]=\"18\" />\n Kembalikan default\n </button>\n </PageFooter>\n }\n\n <p class=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</p>\n</Page>\n" }]
803
+ }, template: "<Page variant=\"stacked\" height=\"fix\" scroll=\"content\" class=\"bg-background\">\n <PageHeader class=\"h-11 px-3 py-0\">\n <div class=\"flex h-full items-center justify-between gap-3\">\n <h2\n id=\"app-preferences-title\"\n class=\"min-w-0 truncate text-base font-semibold text-foreground\"\n >\n Preferensi aplikasi\n </h2>\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-11 w-11 shrink-0\"\n data-app-preferences-close\n aria-label=\"Tutup preferensi aplikasi\"\n (click)=\"closeRequested.emit()\"\n >\n <Icon name=\"close\" [size]=\"20\" />\n </button>\n </div>\n </PageHeader>\n\n <PageContent class=\"overscroll-contain bg-muted/20\">\n <div class=\"space-y-5 p-3\">\n <p class=\"text-xs leading-4 text-muted-foreground\">\n Sesuaikan tampilan dan navigasi aplikasi.\n </p>\n\n <section aria-labelledby=\"app-preferences-theme\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-theme\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Tema\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-theme-appearance\"\n title=\"Tampilan tema\"\n [activeLabel]=\"\n themeAppearanceOptions.find((option) => option.value === themeAppearance())?.label ??\n themeAppearance()\n \"\n [options]=\"themeAppearanceOptions\"\n [selected]=\"themeAppearance()\"\n (optionSelected)=\"selectThemeAppearance($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-mode\"\n title=\"Mode warna\"\n description=\"Sistem mengikuti preferensi perangkat.\"\n [activeLabel]=\"modeOptions.find((option) => option.value === mode())?.label ?? mode()\"\n [options]=\"modeOptions\"\n [selected]=\"mode()\"\n [locked]=\"isLocked('theme-mode')\"\n (optionSelected)=\"selectMode($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-color\"\n title=\"Warna tema\"\n [activeLabel]=\"colorOptions.find((option) => option.value === color())?.label ?? color()\"\n [options]=\"colorOptions\"\n [selected]=\"color()\"\n [locked]=\"isLocked('theme-color')\"\n (optionSelected)=\"selectColor($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-brand\"\n title=\"Brand\"\n [activeLabel]=\"brandOptions.find((option) => option.value === brand())?.label ?? brand()\"\n [options]=\"brandOptions\"\n [selected]=\"brand()\"\n [locked]=\"isLocked('theme-brand')\"\n (optionSelected)=\"selectBrand($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-space\"\n title=\"Kerapatan\"\n [activeLabel]=\"spaceOptions.find((option) => option.value === space())?.label ?? space()\"\n [options]=\"spaceOptions\"\n [selected]=\"space()\"\n [locked]=\"isLocked('theme-space')\"\n (optionSelected)=\"selectSpace($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-radius\"\n title=\"Sudut\"\n [activeLabel]=\"\n radiusOptions.find((option) => option.value === radius())?.label ?? radius()\n \"\n [options]=\"radiusOptions\"\n [selected]=\"radius()\"\n [locked]=\"isLocked('theme-radius')\"\n (optionSelected)=\"selectRadius($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-layout\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-layout\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Layout\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-surface\"\n title=\"Latar\"\n [activeLabel]=\"\n surfaceOptions.find((option) => option.value === surface())?.label ?? surface()\n \"\n [options]=\"surfaceOptions\"\n [selected]=\"surface()\"\n [locked]=\"isLocked('layout-surface')\"\n (optionSelected)=\"selectSurface($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-layout-type\"\n title=\"Tipe layout\"\n [activeLabel]=\"\n layoutTypeOptions.find((option) => option.value === layoutType())?.label ?? layoutType()\n \"\n [options]=\"layoutTypeOptions\"\n [selected]=\"layoutType()\"\n [locked]=\"isLayoutTypeLocked()\"\n (optionSelected)=\"selectLayoutType($event)\"\n />\n <app-preference-setting-group\n headingId=\"app-preferences-width\"\n title=\"Lebar konten\"\n [activeLabel]=\"widthOptions.find((option) => option.value === width())?.label ?? width()\"\n [options]=\"widthOptions\"\n [selected]=\"width()\"\n [locked]=\"isLocked('layout-width')\"\n (optionSelected)=\"selectWidth($event)\"\n />\n </section>\n\n <section aria-labelledby=\"app-preferences-navigation\" class=\"space-y-2\">\n <h2\n id=\"app-preferences-navigation\"\n class=\"text-xs font-semibold tracking-wide text-muted-foreground\"\n >\n Navigasi\n </h2>\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-type\"\n title=\"Tipe navigation\"\n [activeLabel]=\"navigationTypeLabel()\"\n [options]=\"navigationTypeOptions()\"\n [selected]=\"navigationState().type\"\n [locked]=\"isLocked('nav-type')\"\n (optionSelected)=\"selectNavigationType($event)\"\n />\n @if (navigationState().orientation === 'vertical') {\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-mode\"\n title=\"Mode navigation\"\n [activeLabel]=\"navigationModeLabel()\"\n [options]=\"navigationModeOptions()\"\n [selected]=\"navigationMode()\"\n [locked]=\"isLocked('nav-type-mode')\"\n (optionSelected)=\"selectNavigationMode($event)\"\n />\n }\n <app-preference-setting-group\n headingId=\"app-preferences-navigation-position\"\n title=\"Posisi navigation\"\n [activeLabel]=\"navigationPositionLabel()\"\n [options]=\"navigationPositionOptions()\"\n [selected]=\"navigationState().position\"\n [locked]=\"isLocked('nav-position')\"\n (optionSelected)=\"selectNavigationPosition($event)\"\n />\n </section>\n </div>\n </PageContent>\n\n @if (hasDefaults()) {\n <PageFooter class=\"px-3 py-0\">\n <button\n type=\"button\"\n Button\n variant=\"ghost\"\n class=\"h-full w-full justify-start\"\n (click)=\"resetToDefaults()\"\n >\n <Icon name=\"restart_alt\" [size]=\"18\" />\n Kembalikan default\n </button>\n </PageFooter>\n }\n\n <p class=\"sr-only\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</p>\n</Page>\n" }]
831
804
  }], ctorParameters: () => [], propDecorators: { closeRequested: [{ type: i0.Output, args: ["closeRequested"] }] } });
832
805
  function isNavigationTypeForOrientation(value, orientation) {
833
806
  return orientation === 'vertical'
@@ -987,9 +960,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
987
960
  }]
988
961
  }] });
989
962
 
963
+ /** Registers the immutable runtime device without replacing a stored theme preference. */
964
+ function provideRuntimeThemeDevice() {
965
+ return makeEnvironmentProviders([
966
+ provideAppInitializer(() => {
967
+ const runtime = inject(RuntimeContextService);
968
+ const themeDevice = inject(ThemeDeviceService);
969
+ return runtime.initialize().then(() => {
970
+ themeDevice.registerType(runtime.deviceType());
971
+ });
972
+ }),
973
+ ]);
974
+ }
975
+
990
976
  /**
991
977
  * Generated bundle index. Do not edit.
992
978
  */
993
979
 
994
- export { APP_PREFERENCES_CONFIG, AppPreferencesComponent, AppPreferencesPanelService, AppPreferencesTriggerDirective, provideAppPreferences };
980
+ export { APP_PREFERENCES_CONFIG, AppPreferencesComponent, AppPreferencesPanelService, AppPreferencesTriggerDirective, provideAppPreferences, provideRuntimeThemeDevice };
995
981
  //# sourceMappingURL=edsis-angular-block-themes.mjs.map