@katlux/toolkit 0.1.1-alpha.112 → 0.1.1-alpha.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/compiled/utils/PresetResolver.mjs +10 -0
  2. package/dist/compiled/utils/PresetResolver.spec.mjs +68 -0
  3. package/dist/module.json +1 -1
  4. package/dist/runtime/components/KButton/KButton.global.d.vue.ts +1 -1
  5. package/dist/runtime/components/KButton/KButton.global.vue.d.ts +1 -1
  6. package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +1 -1
  7. package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +1 -1
  8. package/dist/runtime/components/KContextMenu/KContextMenu.global.d.vue.ts +1 -1
  9. package/dist/runtime/components/KContextMenu/KContextMenu.global.vue.d.ts +1 -1
  10. package/dist/runtime/components/KDatatable/KDataIterator.global.d.vue.ts +1 -1
  11. package/dist/runtime/components/KDatatable/KDataIterator.global.vue.d.ts +1 -1
  12. package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +9 -9
  13. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +2 -2
  14. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +9 -9
  15. package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +4 -4
  16. package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +2 -2
  17. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +9 -9
  18. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +2 -2
  19. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +9 -9
  20. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +4 -4
  21. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +2 -2
  22. package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +1 -1
  23. package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +1 -1
  24. package/dist/runtime/components/KSlider/KSlider.global.d.vue.ts +1 -1
  25. package/dist/runtime/components/KSlider/KSlider.global.vue.d.ts +1 -1
  26. package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +1 -1
  27. package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +1 -1
  28. package/dist/runtime/components/KTree/KTree.global.d.vue.ts +1 -1
  29. package/dist/runtime/components/KTree/KTree.global.vue.d.ts +1 -1
  30. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +3 -3
  31. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +3 -3
  32. package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +3 -3
  33. package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +3 -3
  34. package/dist/runtime/plugins/PresetPlugin.js +13 -2
  35. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +2 -2
  36. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +3 -3
  37. package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +2 -2
  38. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +2 -2
  39. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +3 -3
  40. package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +2 -2
  41. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.d.vue.ts +2 -2
  42. package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +2 -2
  43. package/dist/runtime/presets/default/components/KTree/KTree.d.vue.ts +1 -1
  44. package/dist/runtime/presets/default/components/KTree/KTree.vue.d.ts +1 -1
  45. package/dist/runtime/utils/PresetResolver.js +10 -0
  46. package/package.json +1 -1
@@ -22,6 +22,9 @@ export class PresetResolver {
22
22
  } catch {
23
23
  this.activePreset = presetCookie.value;
24
24
  }
25
+ if (appConfig.katluxToolkit) {
26
+ appConfig.katluxToolkit.activePreset = this.activePreset;
27
+ }
25
28
  } else if (appConfig.katluxToolkit?.activePreset) {
26
29
  this.activePreset = appConfig.katluxToolkit.activePreset;
27
30
  }
@@ -76,6 +79,13 @@ export class PresetResolver {
76
79
  if (JSON.stringify(this.activePreset) !== JSON.stringify(presetName)) {
77
80
  this.activePreset = presetName;
78
81
  this.clearCache();
82
+ try {
83
+ const appConfig = useAppConfig();
84
+ if (appConfig?.katluxToolkit) {
85
+ appConfig.katluxToolkit.activePreset = presetName;
86
+ }
87
+ } catch {
88
+ }
79
89
  try {
80
90
  const activePresetState = useState("katlux-active-preset-state");
81
91
  activePresetState.value = presetName;
@@ -0,0 +1,68 @@
1
+ import { describe, it, expect, beforeEach, vi } from "vitest";
2
+ import * as appMock from "#app";
3
+ import { PresetResolver } from "./PresetResolver.mjs";
4
+ describe("PresetResolver Unit Tests", () => {
5
+ beforeEach(() => {
6
+ vi.restoreAllMocks();
7
+ });
8
+ it("initializes from appConfig when no cookie is set", () => {
9
+ vi.spyOn(appMock, "useCookie").mockReturnValue({ value: "" });
10
+ vi.spyOn(appMock, "useAppConfig").mockReturnValue({
11
+ katluxToolkit: {
12
+ activePreset: "default"
13
+ }
14
+ });
15
+ const resolver = new PresetResolver();
16
+ expect(resolver.getActivePreset()).toBe("default");
17
+ });
18
+ it("initializes from cookie and synchronizes appConfig when cookie is present", () => {
19
+ const appConfigObj = {
20
+ katluxToolkit: {
21
+ activePreset: "default"
22
+ }
23
+ };
24
+ vi.spyOn(appMock, "useCookie").mockReturnValue({ value: "modern" });
25
+ vi.spyOn(appMock, "useAppConfig").mockReturnValue(appConfigObj);
26
+ const resolver = new PresetResolver();
27
+ expect(resolver.getActivePreset()).toBe("modern");
28
+ expect(appConfigObj.katluxToolkit.activePreset).toBe("modern");
29
+ });
30
+ it("parses JSON stringified array preset from cookie", () => {
31
+ const appConfigObj = {
32
+ katluxToolkit: {
33
+ activePreset: "default"
34
+ }
35
+ };
36
+ vi.spyOn(appMock, "useCookie").mockReturnValue({ value: JSON.stringify(["dark", "modern"]) });
37
+ vi.spyOn(appMock, "useAppConfig").mockReturnValue(appConfigObj);
38
+ const resolver = new PresetResolver();
39
+ expect(resolver.getActivePreset()).toEqual(["dark", "modern"]);
40
+ expect(appConfigObj.katluxToolkit.activePreset).toEqual(["dark", "modern"]);
41
+ });
42
+ it("setActivePreset updates state, cookie, appConfig, and invalidates cache", () => {
43
+ const appConfigObj = {
44
+ katluxToolkit: {
45
+ activePreset: "default"
46
+ }
47
+ };
48
+ const cookieObj = { value: "default" };
49
+ const stateObj = { value: "default" };
50
+ vi.spyOn(appMock, "useCookie").mockReturnValue(cookieObj);
51
+ vi.spyOn(appMock, "useAppConfig").mockReturnValue(appConfigObj);
52
+ vi.spyOn(appMock, "useState").mockReturnValue(stateObj);
53
+ const resolver = new PresetResolver();
54
+ expect(resolver.getActivePreset()).toBe("default");
55
+ const meta1 = resolver.resolvePreset("KButton");
56
+ expect(meta1.hasCustomPreset).toBe(false);
57
+ expect(resolver.getCachedPresets()["default:KButton"]).toBeDefined();
58
+ resolver.setActivePreset("modern");
59
+ expect(resolver.getActivePreset()).toBe("modern");
60
+ expect(appConfigObj.katluxToolkit.activePreset).toBe("modern");
61
+ expect(stateObj.value).toBe("modern");
62
+ expect(cookieObj.value).toBe("modern");
63
+ expect(resolver.getCachedPresets()["default:KButton"]).toBeUndefined();
64
+ const meta2 = resolver.resolvePreset("KButton");
65
+ expect(meta2.hasCustomPreset).toBe(true);
66
+ expect(meta2.presetPath).toBe("~/presets/modern/KButton.pug");
67
+ });
68
+ });
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
3
  "configKey": "katluxToolkit",
4
- "version": "0.1.1-alpha.112",
4
+ "version": "0.1.1-alpha.114",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -56,10 +56,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
56
56
  }>, {
57
57
  size: "small" | "large" | "medium" | undefined;
58
58
  type: "default" | "info" | "success" | "warning" | "danger" | "primary" | "light" | "dark" | undefined;
59
- loading: boolean;
60
59
  iconOnly: boolean;
61
60
  disabled: boolean;
62
61
  href: string;
62
+ loading: boolean;
63
63
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
64
64
  declare const _default: typeof __VLS_export;
65
65
  export default _default;
@@ -56,10 +56,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
56
56
  }>, {
57
57
  size: "small" | "large" | "medium" | undefined;
58
58
  type: "default" | "info" | "success" | "warning" | "danger" | "primary" | "light" | "dark" | undefined;
59
- loading: boolean;
60
59
  iconOnly: boolean;
61
60
  disabled: boolean;
62
61
  href: string;
62
+ loading: boolean;
63
63
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
64
64
  declare const _default: typeof __VLS_export;
65
65
  export default _default;
@@ -54,9 +54,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
54
54
  }>> & Readonly<{
55
55
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
56
56
  }>, {
57
- value: any;
58
57
  label: string;
59
58
  disabled: boolean;
59
+ value: any;
60
60
  validation: "error" | "success" | "warning" | null | undefined;
61
61
  validationText: string;
62
62
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -54,9 +54,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
54
54
  }>> & Readonly<{
55
55
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
56
56
  }>, {
57
- value: any;
58
57
  label: string;
59
58
  disabled: boolean;
59
+ value: any;
60
60
  validation: "error" | "success" | "warning" | null | undefined;
61
61
  validationText: string;
62
62
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -46,8 +46,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
46
46
  "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
47
47
  }>, {
48
48
  isOpen: boolean;
49
- x: number;
50
49
  teleportTo: string;
50
+ x: number;
51
51
  y: number;
52
52
  target: string | HTMLElement;
53
53
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -46,8 +46,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
46
46
  "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
47
47
  }>, {
48
48
  isOpen: boolean;
49
- x: number;
50
49
  teleportTo: string;
50
+ x: number;
51
51
  y: number;
52
52
  target: string | HTMLElement;
53
53
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -12,8 +12,8 @@ interface Props {
12
12
  }
13
13
  declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
14
14
  search: string;
15
- loading: boolean;
16
15
  bulkActions: IKDatatableAction[];
16
+ loading: boolean;
17
17
  visibleFields: Array<string> | null;
18
18
  rowActions: IKDatatableAction[];
19
19
  itemsPerPage: number;
@@ -12,8 +12,8 @@ interface Props {
12
12
  }
13
13
  declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
14
14
  search: string;
15
- loading: boolean;
16
15
  bulkActions: IKDatatableAction[];
16
+ loading: boolean;
17
17
  visibleFields: Array<string> | null;
18
18
  rowActions: IKDatatableAction[];
19
19
  itemsPerPage: number;
@@ -24,11 +24,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
24
24
  type: BooleanConstructor;
25
25
  default: boolean;
26
26
  };
27
- calendarDefinedDays: {
27
+ definedDays: {
28
28
  type: import("vue").PropType<import("../KCalendar/types.js").IDefinedDay[]>;
29
29
  default: () => never[];
30
30
  };
31
- calendarMarkedDays: {
31
+ markedDays: {
32
32
  type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
33
33
  default: () => never[];
34
34
  };
@@ -55,10 +55,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
55
55
  };
56
56
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
57
57
  "update:modelValue": (value: string | Date) => any;
58
+ "update:isOpen": (value: boolean) => any;
58
59
  "update:maskedModel": (value: string) => any;
59
60
  "update:calendarShow": (value: boolean) => any;
60
61
  "update:day": (value: string | Date) => any;
61
- "update:isOpen": (value: boolean) => any;
62
62
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
63
63
  label: {
64
64
  type: StringConstructor;
@@ -84,11 +84,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
84
84
  type: BooleanConstructor;
85
85
  default: boolean;
86
86
  };
87
- calendarDefinedDays: {
87
+ definedDays: {
88
88
  type: import("vue").PropType<import("../KCalendar/types.js").IDefinedDay[]>;
89
89
  default: () => never[];
90
90
  };
91
- calendarMarkedDays: {
91
+ markedDays: {
92
92
  type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
93
93
  default: () => never[];
94
94
  };
@@ -115,24 +115,24 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
115
115
  };
116
116
  }>> & Readonly<{
117
117
  "onUpdate:modelValue"?: ((value: string | Date) => any) | undefined;
118
+ "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
118
119
  "onUpdate:maskedModel"?: ((value: string) => any) | undefined;
119
120
  "onUpdate:calendarShow"?: ((value: boolean) => any) | undefined;
120
121
  "onUpdate:day"?: ((value: string | Date) => any) | undefined;
121
- "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
122
122
  }>, {
123
123
  isOpen: boolean;
124
124
  label: string;
125
+ definedDays: import("../KCalendar/types.js").IDefinedDay[];
126
+ markedDays: import("../KCalendar/types.js").IMarkedDay[];
127
+ day: string | Date;
125
128
  validation: "error" | "success" | "warning" | null | undefined;
126
129
  placeholder: string;
127
130
  teleportTo: string;
128
131
  validationText: string;
129
132
  modelValue: string | Date;
130
- day: string | Date;
131
133
  showClear: boolean;
132
134
  align: "left" | "right" | undefined;
133
135
  format: string;
134
- calendarDefinedDays: import("../KCalendar/types.js").IDefinedDay[];
135
- calendarMarkedDays: import("../KCalendar/types.js").IMarkedDay[];
136
136
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
137
137
  declare const _default: typeof __VLS_export;
138
138
  export default _default;
@@ -22,8 +22,8 @@ const templateProps = computed(() => ({
22
22
  calendarDay: calendarDay.value,
23
23
  format: props.format,
24
24
  showClear: props.showClear,
25
- calendarDefinedDays: props.calendarDefinedDays,
26
- calendarMarkedDays: props.calendarMarkedDays,
25
+ definedDays: props.definedDays,
26
+ markedDays: props.markedDays,
27
27
  textboxClicked,
28
28
  onClear: handleClear,
29
29
  dateSelected: handleDateSelected,
@@ -24,11 +24,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
24
24
  type: BooleanConstructor;
25
25
  default: boolean;
26
26
  };
27
- calendarDefinedDays: {
27
+ definedDays: {
28
28
  type: import("vue").PropType<import("../KCalendar/types.js").IDefinedDay[]>;
29
29
  default: () => never[];
30
30
  };
31
- calendarMarkedDays: {
31
+ markedDays: {
32
32
  type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
33
33
  default: () => never[];
34
34
  };
@@ -55,10 +55,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
55
55
  };
56
56
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
57
57
  "update:modelValue": (value: string | Date) => any;
58
+ "update:isOpen": (value: boolean) => any;
58
59
  "update:maskedModel": (value: string) => any;
59
60
  "update:calendarShow": (value: boolean) => any;
60
61
  "update:day": (value: string | Date) => any;
61
- "update:isOpen": (value: boolean) => any;
62
62
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
63
63
  label: {
64
64
  type: StringConstructor;
@@ -84,11 +84,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
84
84
  type: BooleanConstructor;
85
85
  default: boolean;
86
86
  };
87
- calendarDefinedDays: {
87
+ definedDays: {
88
88
  type: import("vue").PropType<import("../KCalendar/types.js").IDefinedDay[]>;
89
89
  default: () => never[];
90
90
  };
91
- calendarMarkedDays: {
91
+ markedDays: {
92
92
  type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
93
93
  default: () => never[];
94
94
  };
@@ -115,24 +115,24 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
115
115
  };
116
116
  }>> & Readonly<{
117
117
  "onUpdate:modelValue"?: ((value: string | Date) => any) | undefined;
118
+ "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
118
119
  "onUpdate:maskedModel"?: ((value: string) => any) | undefined;
119
120
  "onUpdate:calendarShow"?: ((value: boolean) => any) | undefined;
120
121
  "onUpdate:day"?: ((value: string | Date) => any) | undefined;
121
- "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
122
122
  }>, {
123
123
  isOpen: boolean;
124
124
  label: string;
125
+ definedDays: import("../KCalendar/types.js").IDefinedDay[];
126
+ markedDays: import("../KCalendar/types.js").IMarkedDay[];
127
+ day: string | Date;
125
128
  validation: "error" | "success" | "warning" | null | undefined;
126
129
  placeholder: string;
127
130
  teleportTo: string;
128
131
  validationText: string;
129
132
  modelValue: string | Date;
130
- day: string | Date;
131
133
  showClear: boolean;
132
134
  align: "left" | "right" | undefined;
133
135
  format: string;
134
- calendarDefinedDays: import("../KCalendar/types.js").IDefinedDay[];
135
- calendarMarkedDays: import("../KCalendar/types.js").IMarkedDay[];
136
136
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
137
137
  declare const _default: typeof __VLS_export;
138
138
  export default _default;
@@ -7,8 +7,8 @@ export interface KDatePickerProps {
7
7
  modelValue?: Date | string;
8
8
  isOpen?: boolean;
9
9
  showClear?: boolean;
10
- calendarDefinedDays: IDefinedDay[];
11
- calendarMarkedDays: IMarkedDay[];
10
+ definedDays?: IDefinedDay[];
11
+ markedDays?: IMarkedDay[];
12
12
  teleportTo?: string;
13
13
  placeholder?: string;
14
14
  validation?: 'success' | 'warning' | 'error' | null;
@@ -40,11 +40,11 @@ export declare const KDatePickerDefaultProps: {
40
40
  type: BooleanConstructor;
41
41
  default: boolean;
42
42
  };
43
- calendarDefinedDays: {
43
+ definedDays: {
44
44
  type: PropType<IDefinedDay[]>;
45
45
  default: () => never[];
46
46
  };
47
- calendarMarkedDays: {
47
+ markedDays: {
48
48
  type: PropType<IMarkedDay[]>;
49
49
  default: () => never[];
50
50
  };
@@ -24,11 +24,11 @@ export const KDatePickerDefaultProps = {
24
24
  type: Boolean,
25
25
  default: false
26
26
  },
27
- calendarDefinedDays: {
27
+ definedDays: {
28
28
  type: Array,
29
29
  default: () => []
30
30
  },
31
- calendarMarkedDays: {
31
+ markedDays: {
32
32
  type: Array,
33
33
  default: () => []
34
34
  },
@@ -32,11 +32,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
32
32
  type: NumberConstructor;
33
33
  default: number;
34
34
  };
35
- calendarDefinedDays: {
35
+ definedDays: {
36
36
  type: import("vue").PropType<import("../KCalendar/types.js").IDefinedDay[]>;
37
37
  default: () => never[];
38
38
  };
39
- calendarMarkedDays: {
39
+ markedDays: {
40
40
  type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
41
41
  default: () => never[];
42
42
  };
@@ -59,9 +59,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
59
59
  };
60
60
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
61
61
  "update:modelValue": (value: string | Date) => any;
62
+ "update:isOpen": (value: boolean) => any;
62
63
  "update:maskedModel": (value: string) => any;
63
64
  "update:calendarShow": (value: boolean) => any;
64
- "update:isOpen": (value: boolean) => any;
65
65
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
66
66
  label: {
67
67
  type: StringConstructor;
@@ -95,11 +95,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
95
95
  type: NumberConstructor;
96
96
  default: number;
97
97
  };
98
- calendarDefinedDays: {
98
+ definedDays: {
99
99
  type: import("vue").PropType<import("../KCalendar/types.js").IDefinedDay[]>;
100
100
  default: () => never[];
101
101
  };
102
- calendarMarkedDays: {
102
+ markedDays: {
103
103
  type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
104
104
  default: () => never[];
105
105
  };
@@ -122,22 +122,22 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
122
122
  };
123
123
  }>> & Readonly<{
124
124
  "onUpdate:modelValue"?: ((value: string | Date) => any) | undefined;
125
+ "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
125
126
  "onUpdate:maskedModel"?: ((value: string) => any) | undefined;
126
127
  "onUpdate:calendarShow"?: ((value: boolean) => any) | undefined;
127
- "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
128
128
  }>, {
129
129
  isOpen: boolean;
130
130
  label: string;
131
+ definedDays: import("../KCalendar/types.js").IDefinedDay[];
132
+ markedDays: import("../KCalendar/types.js").IMarkedDay[];
133
+ day: string | Date;
131
134
  validation: "error" | "success" | "warning" | null | undefined;
132
135
  placeholder: string;
133
136
  teleportTo: string;
134
137
  validationText: string;
135
138
  modelValue: string | Date;
136
- day: string | Date;
137
139
  showClear: boolean;
138
140
  format: string;
139
- calendarDefinedDays: import("../KCalendar/types.js").IDefinedDay[];
140
- calendarMarkedDays: import("../KCalendar/types.js").IMarkedDay[];
141
141
  timeFormat: string;
142
142
  timeStep: number;
143
143
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -26,8 +26,8 @@ const templateProps = computed(() => ({
26
26
  format: props.format,
27
27
  timeFormat: props.timeFormat,
28
28
  timeStep: props.timeStep,
29
- calendarDefinedDays: props.calendarDefinedDays,
30
- calendarMarkedDays: props.calendarMarkedDays,
29
+ definedDays: props.definedDays,
30
+ markedDays: props.markedDays,
31
31
  showClear: props.showClear,
32
32
  textboxClicked,
33
33
  onClear: handleClear,
@@ -32,11 +32,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
32
32
  type: NumberConstructor;
33
33
  default: number;
34
34
  };
35
- calendarDefinedDays: {
35
+ definedDays: {
36
36
  type: import("vue").PropType<import("../KCalendar/types.js").IDefinedDay[]>;
37
37
  default: () => never[];
38
38
  };
39
- calendarMarkedDays: {
39
+ markedDays: {
40
40
  type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
41
41
  default: () => never[];
42
42
  };
@@ -59,9 +59,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
59
59
  };
60
60
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
61
61
  "update:modelValue": (value: string | Date) => any;
62
+ "update:isOpen": (value: boolean) => any;
62
63
  "update:maskedModel": (value: string) => any;
63
64
  "update:calendarShow": (value: boolean) => any;
64
- "update:isOpen": (value: boolean) => any;
65
65
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
66
66
  label: {
67
67
  type: StringConstructor;
@@ -95,11 +95,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
95
95
  type: NumberConstructor;
96
96
  default: number;
97
97
  };
98
- calendarDefinedDays: {
98
+ definedDays: {
99
99
  type: import("vue").PropType<import("../KCalendar/types.js").IDefinedDay[]>;
100
100
  default: () => never[];
101
101
  };
102
- calendarMarkedDays: {
102
+ markedDays: {
103
103
  type: import("vue").PropType<import("../KCalendar/types.js").IMarkedDay[]>;
104
104
  default: () => never[];
105
105
  };
@@ -122,22 +122,22 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
122
122
  };
123
123
  }>> & Readonly<{
124
124
  "onUpdate:modelValue"?: ((value: string | Date) => any) | undefined;
125
+ "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
125
126
  "onUpdate:maskedModel"?: ((value: string) => any) | undefined;
126
127
  "onUpdate:calendarShow"?: ((value: boolean) => any) | undefined;
127
- "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
128
128
  }>, {
129
129
  isOpen: boolean;
130
130
  label: string;
131
+ definedDays: import("../KCalendar/types.js").IDefinedDay[];
132
+ markedDays: import("../KCalendar/types.js").IMarkedDay[];
133
+ day: string | Date;
131
134
  validation: "error" | "success" | "warning" | null | undefined;
132
135
  placeholder: string;
133
136
  teleportTo: string;
134
137
  validationText: string;
135
138
  modelValue: string | Date;
136
- day: string | Date;
137
139
  showClear: boolean;
138
140
  format: string;
139
- calendarDefinedDays: import("../KCalendar/types.js").IDefinedDay[];
140
- calendarMarkedDays: import("../KCalendar/types.js").IMarkedDay[];
141
141
  timeFormat: string;
142
142
  timeStep: number;
143
143
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -9,8 +9,8 @@ export interface KDateTimePickerProps {
9
9
  isOpen?: boolean;
10
10
  showClear?: boolean;
11
11
  timeStep?: number;
12
- calendarDefinedDays?: IDefinedDay[];
13
- calendarMarkedDays?: IMarkedDay[];
12
+ definedDays?: IDefinedDay[];
13
+ markedDays?: IMarkedDay[];
14
14
  teleportTo?: string;
15
15
  placeholder?: string;
16
16
  validation?: 'success' | 'warning' | 'error' | null;
@@ -49,11 +49,11 @@ export declare const KDateTimePickerDefaultProps: {
49
49
  type: NumberConstructor;
50
50
  default: number;
51
51
  };
52
- calendarDefinedDays: {
52
+ definedDays: {
53
53
  type: PropType<IDefinedDay[]>;
54
54
  default: () => never[];
55
55
  };
56
- calendarMarkedDays: {
56
+ markedDays: {
57
57
  type: PropType<IMarkedDay[]>;
58
58
  default: () => never[];
59
59
  };
@@ -32,11 +32,11 @@ export const KDateTimePickerDefaultProps = {
32
32
  type: Number,
33
33
  default: 30
34
34
  },
35
- calendarDefinedDays: {
35
+ definedDays: {
36
36
  type: Array,
37
37
  default: () => []
38
38
  },
39
- calendarMarkedDays: {
39
+ markedDays: {
40
40
  type: Array,
41
41
  default: () => []
42
42
  },
@@ -1,8 +1,8 @@
1
1
  import { type KGridProps } from './KGrid.logic.js';
2
2
  declare const __VLS_export: import("vue").DefineComponent<KGridProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KGridProps> & Readonly<{}>, {
3
3
  direction: "row" | "column";
4
- align: "start" | "center" | "end" | "stretch" | "baseline";
5
4
  noGap: boolean;
5
+ align: "start" | "center" | "end" | "stretch" | "baseline";
6
6
  wrap: "wrap" | "nowrap";
7
7
  flexChild: boolean;
8
8
  justify: "start" | "center" | "end" | "space-between" | "around" | "evenly";
@@ -1,8 +1,8 @@
1
1
  import { type KGridProps } from './KGrid.logic.js';
2
2
  declare const __VLS_export: import("vue").DefineComponent<KGridProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KGridProps> & Readonly<{}>, {
3
3
  direction: "row" | "column";
4
- align: "start" | "center" | "end" | "stretch" | "baseline";
5
4
  noGap: boolean;
5
+ align: "start" | "center" | "end" | "stretch" | "baseline";
6
6
  wrap: "wrap" | "nowrap";
7
7
  flexChild: boolean;
8
8
  justify: "start" | "center" | "end" | "space-between" | "around" | "evenly";
@@ -53,9 +53,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
53
53
  }>> & Readonly<{
54
54
  "onUpdate:value"?: ((value: any) => any) | undefined;
55
55
  }>, {
56
- value: number;
57
56
  label: string;
58
57
  disabled: boolean;
58
+ value: number;
59
59
  step: number;
60
60
  min: number;
61
61
  max: number;
@@ -53,9 +53,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
53
53
  }>> & Readonly<{
54
54
  "onUpdate:value"?: ((value: any) => any) | undefined;
55
55
  }>, {
56
- value: number;
57
56
  label: string;
58
57
  disabled: boolean;
58
+ value: number;
59
59
  step: number;
60
60
  min: number;
61
61
  max: number;
@@ -57,10 +57,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
57
57
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
58
58
  }>, {
59
59
  label: string;
60
- rows: number;
61
60
  validation: "error" | "success" | "warning" | null | undefined;
62
61
  placeholder: string;
63
62
  validationText: string;
63
+ rows: number;
64
64
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
65
65
  declare const _default: typeof __VLS_export;
66
66
  export default _default;
@@ -57,10 +57,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
57
57
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
58
58
  }>, {
59
59
  label: string;
60
- rows: number;
61
60
  validation: "error" | "success" | "warning" | null | undefined;
62
61
  placeholder: string;
63
62
  validationText: string;
63
+ rows: number;
64
64
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
65
65
  declare const _default: typeof __VLS_export;
66
66
  export default _default;
@@ -73,12 +73,12 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
73
73
  default: string;
74
74
  };
75
75
  }>> & Readonly<{}>, {
76
- idKey: string;
77
76
  disabled: boolean;
78
77
  searchtext: string;
79
78
  labelField: string;
80
79
  multiSelect: boolean;
81
80
  iconField: string;
81
+ idKey: string;
82
82
  isNodeSelected: (node: any) => boolean;
83
83
  selectable: boolean;
84
84
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -73,12 +73,12 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
73
73
  default: string;
74
74
  };
75
75
  }>> & Readonly<{}>, {
76
- idKey: string;
77
76
  disabled: boolean;
78
77
  searchtext: string;
79
78
  labelField: string;
80
79
  multiSelect: boolean;
81
80
  iconField: string;
81
+ idKey: string;
82
82
  isNodeSelected: (node: any) => boolean;
83
83
  selectable: boolean;
84
84
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -164,11 +164,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
164
164
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
165
165
  "onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
166
166
  }>, {
167
- parentKey: string;
168
- loading: boolean;
169
- idKey: string;
170
167
  label: string;
171
168
  disabled: boolean;
169
+ loading: boolean;
172
170
  validation: "error" | "success" | "warning" | null | undefined;
173
171
  searchbox: boolean;
174
172
  searchPlaceholder: string;
@@ -180,7 +178,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
180
178
  multiSelect: boolean;
181
179
  valueField: string;
182
180
  modelValue: any;
181
+ parentKey: string;
183
182
  iconField: string;
183
+ idKey: string;
184
184
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
185
185
  declare const _default: typeof __VLS_export;
186
186
  export default _default;
@@ -164,11 +164,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
164
164
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
165
165
  "onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
166
166
  }>, {
167
- parentKey: string;
168
- loading: boolean;
169
- idKey: string;
170
167
  label: string;
171
168
  disabled: boolean;
169
+ loading: boolean;
172
170
  validation: "error" | "success" | "warning" | null | undefined;
173
171
  searchbox: boolean;
174
172
  searchPlaceholder: string;
@@ -180,7 +178,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
180
178
  multiSelect: boolean;
181
179
  valueField: string;
182
180
  modelValue: any;
181
+ parentKey: string;
183
182
  iconField: string;
183
+ idKey: string;
184
184
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
185
185
  declare const _default: typeof __VLS_export;
186
186
  export default _default;
@@ -103,16 +103,16 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
103
103
  "onUpdate:selectedRows"?: ((value: any[]) => any) | undefined;
104
104
  "onUpdate:selectAll"?: ((value: boolean) => any) | undefined;
105
105
  }>, {
106
- parentKey: string;
107
- idKey: string;
108
- expandedByDefault: boolean;
109
106
  bulkActions: import("@katlux/providers").IKDatatableAction[];
110
107
  selectedRows: any[];
111
108
  selectAll: boolean;
112
109
  rowActions: import("@katlux/providers").IKDatatableAction[];
113
110
  cellSlots: Record<string, any>;
114
111
  headerSlots: Record<string, any>;
112
+ parentKey: string;
113
+ expandedByDefault: boolean;
115
114
  treeColumnIndex: number;
115
+ idKey: string;
116
116
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
117
117
  declare const _default: typeof __VLS_export;
118
118
  export default _default;
@@ -103,16 +103,16 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
103
103
  "onUpdate:selectedRows"?: ((value: any[]) => any) | undefined;
104
104
  "onUpdate:selectAll"?: ((value: boolean) => any) | undefined;
105
105
  }>, {
106
- parentKey: string;
107
- idKey: string;
108
- expandedByDefault: boolean;
109
106
  bulkActions: import("@katlux/providers").IKDatatableAction[];
110
107
  selectedRows: any[];
111
108
  selectAll: boolean;
112
109
  rowActions: import("@katlux/providers").IKDatatableAction[];
113
110
  cellSlots: Record<string, any>;
114
111
  headerSlots: Record<string, any>;
112
+ parentKey: string;
113
+ expandedByDefault: boolean;
115
114
  treeColumnIndex: number;
115
+ idKey: string;
116
116
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
117
117
  declare const _default: typeof __VLS_export;
118
118
  export default _default;
@@ -5,6 +5,9 @@ export default defineNuxtPlugin((nuxtApp) => {
5
5
  const resolver = new PresetResolver();
6
6
  const appConfig = useAppConfig();
7
7
  const activePresetState = useState("katlux-active-preset-state", () => resolver.getActivePreset());
8
+ if (appConfig?.katluxToolkit && activePresetState.value) {
9
+ appConfig.katluxToolkit.activePreset = activePresetState.value;
10
+ }
8
11
  const resolvePresetString = (val) => Array.isArray(val) ? val[0] ?? "default" : val;
9
12
  const currentPreset = ref(resolvePresetString(activePresetState.value));
10
13
  useHead({
@@ -15,13 +18,21 @@ export default defineNuxtPlugin((nuxtApp) => {
15
18
  watch(activePresetState, (newPreset) => {
16
19
  if (newPreset) {
17
20
  currentPreset.value = resolvePresetString(newPreset);
21
+ if (appConfig?.katluxToolkit && JSON.stringify(appConfig.katluxToolkit.activePreset) !== JSON.stringify(newPreset)) {
22
+ appConfig.katluxToolkit.activePreset = newPreset;
23
+ }
24
+ nuxtApp.runWithContext(() => {
25
+ resolver.setActivePreset(newPreset);
26
+ });
18
27
  }
19
28
  });
20
- if (appConfig.katluxToolkit) {
29
+ if (appConfig?.katluxToolkit) {
21
30
  watch(() => appConfig.katluxToolkit?.activePreset, (newPreset) => {
22
31
  if (newPreset) {
23
32
  currentPreset.value = resolvePresetString(newPreset);
24
- activePresetState.value = newPreset;
33
+ if (JSON.stringify(activePresetState.value) !== JSON.stringify(newPreset)) {
34
+ activePresetState.value = newPreset;
35
+ }
25
36
  nuxtApp.runWithContext(() => {
26
37
  resolver.setActivePreset(newPreset);
27
38
  });
@@ -7,8 +7,8 @@ type __VLS_Props = {
7
7
  calendarDay: Date | string;
8
8
  format: string;
9
9
  showClear: boolean;
10
- calendarDefinedDays: IDefinedDay[];
11
- calendarMarkedDays: IMarkedDay[];
10
+ definedDays?: IDefinedDay[];
11
+ markedDays?: IMarkedDay[];
12
12
  textboxClicked: () => void;
13
13
  onClear?: () => void;
14
14
  dateSelected: (date: Date) => void;
@@ -13,7 +13,7 @@
13
13
  :validationText="validationText"
14
14
  )
15
15
  KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef" :teleportTo="teleportTo" :align="align")
16
- KCalendar(view="month" :viewCount="1" :day="calendarDay" :selectedDay="_date" @dayClicked="dateSelected" :definedDays="calendarDefinedDays" :markedDays="calendarMarkedDays")
16
+ KCalendar(view="month" :viewCount="1" :day="calendarDay" :selectedDay="_date" @dayClicked="dateSelected" :definedDays="definedDays" :markedDays="markedDays")
17
17
  </template>
18
18
 
19
19
  <script lang="ts" setup>
@@ -32,8 +32,8 @@ const props = defineProps<{
32
32
  calendarDay: Date | string
33
33
  format: string
34
34
  showClear: boolean
35
- calendarDefinedDays: IDefinedDay[]
36
- calendarMarkedDays: IMarkedDay[]
35
+ definedDays?: IDefinedDay[]
36
+ markedDays?: IMarkedDay[]
37
37
  textboxClicked: () => void
38
38
  onClear?: () => void
39
39
  dateSelected: (date: Date) => void
@@ -7,8 +7,8 @@ type __VLS_Props = {
7
7
  calendarDay: Date | string;
8
8
  format: string;
9
9
  showClear: boolean;
10
- calendarDefinedDays: IDefinedDay[];
11
- calendarMarkedDays: IMarkedDay[];
10
+ definedDays?: IDefinedDay[];
11
+ markedDays?: IMarkedDay[];
12
12
  textboxClicked: () => void;
13
13
  onClear?: () => void;
14
14
  dateSelected: (date: Date) => void;
@@ -9,8 +9,8 @@ type __VLS_Props = {
9
9
  format: string;
10
10
  timeFormat: string;
11
11
  timeStep: number;
12
- calendarDefinedDays: IDefinedDay[];
13
- calendarMarkedDays: IMarkedDay[];
12
+ definedDays?: IDefinedDay[];
13
+ markedDays?: IMarkedDay[];
14
14
  showClear: boolean;
15
15
  textboxClicked: () => void;
16
16
  onClear?: () => void;
@@ -15,7 +15,7 @@
15
15
  KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef" :teleportTo="teleportTo")
16
16
  KGrid(direction="row" align="start" :noGap="false" wrap="nowrap").datetime-picker-grid
17
17
  .calendar-section
18
- KCalendar(view="month" :viewCount="1" :day="calendarDay" :selectedDay="_date" @dayClicked="dateSelected" :definedDays="calendarDefinedDays" :markedDays="calendarMarkedDays")
18
+ KCalendar(view="month" :viewCount="1" :day="calendarDay" :selectedDay="_date" @dayClicked="dateSelected" :definedDays="definedDays" :markedDays="markedDays")
19
19
  .time-section
20
20
  KHourSelect(v-model="_time" :format="timeFormat" :step="timeStep" @update:modelValue="timeSelected")
21
21
  </template>
@@ -38,8 +38,8 @@ const props = defineProps<{
38
38
  format: string
39
39
  timeFormat: string
40
40
  timeStep: number
41
- calendarDefinedDays: IDefinedDay[]
42
- calendarMarkedDays: IMarkedDay[]
41
+ definedDays?: IDefinedDay[]
42
+ markedDays?: IMarkedDay[]
43
43
  showClear: boolean
44
44
  textboxClicked: () => void
45
45
  onClear?: () => void
@@ -9,8 +9,8 @@ type __VLS_Props = {
9
9
  format: string;
10
10
  timeFormat: string;
11
11
  timeStep: number;
12
- calendarDefinedDays: IDefinedDay[];
13
- calendarMarkedDays: IMarkedDay[];
12
+ definedDays?: IDefinedDay[];
13
+ markedDays?: IMarkedDay[];
14
14
  showClear: boolean;
15
15
  textboxClicked: () => void;
16
16
  onClear?: () => void;
@@ -17,11 +17,11 @@ type __VLS_Props = {
17
17
  validationText?: string;
18
18
  };
19
19
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
20
- "update:maskedModel": (value: string) => any;
21
20
  "update:isOpen": (value: boolean) => any;
21
+ "update:maskedModel": (value: string) => any;
22
22
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
23
- "onUpdate:maskedModel"?: ((value: string) => any) | undefined;
24
23
  "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
24
+ "onUpdate:maskedModel"?: ((value: string) => any) | undefined;
25
25
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
26
  declare const _default: typeof __VLS_export;
27
27
  export default _default;
@@ -17,11 +17,11 @@ type __VLS_Props = {
17
17
  validationText?: string;
18
18
  };
19
19
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
20
- "update:maskedModel": (value: string) => any;
21
20
  "update:isOpen": (value: boolean) => any;
21
+ "update:maskedModel": (value: string) => any;
22
22
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
23
- "onUpdate:maskedModel"?: ((value: string) => any) | undefined;
24
23
  "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
24
+ "onUpdate:maskedModel"?: ((value: string) => any) | undefined;
25
25
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
26
  declare const _default: typeof __VLS_export;
27
27
  export default _default;
@@ -21,11 +21,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
21
21
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
22
  onSelect?: ((row: TTreeRow) => any) | undefined;
23
23
  }>, {
24
- idKey: string;
25
24
  disabled: boolean;
26
25
  labelField: string;
27
26
  multiSelect: boolean;
28
27
  iconField: string;
28
+ idKey: string;
29
29
  isNodeSelected: (node: any) => boolean;
30
30
  selectable: boolean;
31
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -21,11 +21,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
21
21
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
22
  onSelect?: ((row: TTreeRow) => any) | undefined;
23
23
  }>, {
24
- idKey: string;
25
24
  disabled: boolean;
26
25
  labelField: string;
27
26
  multiSelect: boolean;
28
27
  iconField: string;
28
+ idKey: string;
29
29
  isNodeSelected: (node: any) => boolean;
30
30
  selectable: boolean;
31
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -22,6 +22,9 @@ export class PresetResolver {
22
22
  } catch {
23
23
  this.activePreset = presetCookie.value;
24
24
  }
25
+ if (appConfig.katluxToolkit) {
26
+ appConfig.katluxToolkit.activePreset = this.activePreset;
27
+ }
25
28
  } else if (appConfig.katluxToolkit?.activePreset) {
26
29
  this.activePreset = appConfig.katluxToolkit.activePreset;
27
30
  }
@@ -76,6 +79,13 @@ export class PresetResolver {
76
79
  if (JSON.stringify(this.activePreset) !== JSON.stringify(presetName)) {
77
80
  this.activePreset = presetName;
78
81
  this.clearCache();
82
+ try {
83
+ const appConfig = useAppConfig();
84
+ if (appConfig?.katluxToolkit) {
85
+ appConfig.katluxToolkit.activePreset = presetName;
86
+ }
87
+ } catch {
88
+ }
79
89
  try {
80
90
  const activePresetState = useState("katlux-active-preset-state");
81
91
  activePresetState.value = presetName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
- "version": "0.1.1-alpha.112",
3
+ "version": "0.1.1-alpha.114",
4
4
  "description": "Core UI toolkit and utilities for the Katlux ecosystem",
5
5
  "author": "Katlux",
6
6
  "license": "Apache-2.0",