@wikicasa-dev/components 2.2.8-alpha.13 → 2.2.8-alpha.15

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,5 +1,5 @@
1
1
  import { Autoplay as t } from "swiper/modules";
2
- import '../assets/swiper-keyboard.css';/* empty css */
2
+ import '../assets/swiper-thumbs.css';/* empty css */
3
3
  export {
4
4
  t as Autoplay
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Controller as e } from "swiper/modules";
2
- import '../assets/swiper-keyboard.css';/* empty css */
2
+ import '../assets/swiper-thumbs.css';/* empty css */
3
3
  export {
4
4
  e as Controller
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Keyboard as m } from "swiper/modules";
2
- import '../assets/swiper-keyboard.css';/* empty css */
2
+ import '../assets/swiper-thumbs.css';/* empty css */
3
3
  export {
4
4
  m as Keyboard
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Thumbs as p } from "swiper/modules";
2
- import '../assets/swiper-keyboard.css';/* empty css */
2
+ import '../assets/swiper-thumbs.css';/* empty css */
3
3
  export {
4
4
  p as Thumbs
5
5
  };
@@ -4,6 +4,7 @@ import { Nullable } from '@wikicasa-dev/types';
4
4
  export interface ClearableAutocompleteProps<TID extends string | number | undefined, TPayload> {
5
5
  dataCy?: string;
6
6
  placeholder?: string;
7
+ enableKeyboardController?: boolean;
7
8
  triggerWrapperClasses?: ClassTypeProp;
8
9
  inputWrapperClasses?: ClassTypeProp;
9
10
  inputClasses?: ClassTypeProp;
@@ -1,44 +1,40 @@
1
1
  import { ClassTypeProp } from '../types';
2
- type EventPayload = {
3
- id: string | number;
4
- label: string | number;
5
- checked: boolean;
6
- };
7
- type __VLS_Props = {
8
- id?: string | number;
9
- dataCy?: string;
10
- disabled?: boolean;
11
- /**
12
- * @deprecated Use v-model instead
13
- */
14
- checked?: boolean;
15
- required?: boolean;
16
- inputClass?: ClassTypeProp;
17
- label?: string | number;
18
- modelValue?: boolean;
19
- };
20
- declare function __VLS_template(): {
21
- attrs: Partial<{}>;
2
+ declare const _default: <TID extends string | number, TLabel extends string | number>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
+ readonly "onUpdate:modelValue"?: ((args_0: boolean) => any) | undefined;
5
+ readonly onClick?: ((args_0: MouseEvent) => any) | undefined;
6
+ readonly onChange?: ((args_0: {
7
+ id: TID;
8
+ label: TLabel;
9
+ checked: boolean;
10
+ }) => any) | undefined;
11
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onClick" | "onChange"> & {
12
+ id?: TID;
13
+ dataCy?: string;
14
+ disabled?: boolean;
15
+ /**
16
+ * @deprecated Use v-model instead
17
+ */
18
+ checked?: boolean;
19
+ required?: boolean;
20
+ inputClass?: ClassTypeProp;
21
+ label?: TLabel;
22
+ modelValue?: boolean;
23
+ } & Partial<{}>> & import('vue').PublicProps;
24
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
25
+ attrs: any;
22
26
  slots: {
23
27
  label?(_: {}): any;
24
28
  };
25
- refs: {};
26
- rootEl: HTMLLabelElement;
29
+ emit: ((evt: "update:modelValue", args_0: boolean) => void) & ((evt: "click", args_0: MouseEvent) => void) & ((evt: "change", args_0: {
30
+ id: TID;
31
+ label: TLabel;
32
+ checked: boolean;
33
+ }) => void);
34
+ }>) => import('vue').VNode & {
35
+ __ctx?: Awaited<typeof __VLS_setup>;
27
36
  };
28
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
29
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
30
- "update:modelValue": (args_0: boolean) => any;
31
- click: (args_0: MouseEvent) => any;
32
- change: (args_0: EventPayload) => any;
33
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
34
- "onUpdate:modelValue"?: ((args_0: boolean) => any) | undefined;
35
- onClick?: ((args_0: MouseEvent) => any) | undefined;
36
- onChange?: ((args_0: EventPayload) => any) | undefined;
37
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLabelElement>;
38
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
39
37
  export default _default;
40
- type __VLS_WithTemplateSlots<T, S> = T & {
41
- new (): {
42
- $slots: S;
43
- };
44
- };
38
+ type __VLS_PrettifyLocal<T> = {
39
+ [K in keyof T]: T[K];
40
+ } & {};
@@ -7,9 +7,6 @@ export type CheckboxButtonType<TID = string | number, TLabel = string | number,
7
7
  payload?: TPayload;
8
8
  dataCy?: string;
9
9
  };
10
- export type CheckboxButtonTypeObj = Omit<CheckboxButtonType, "checked"> & {
11
- checked: boolean;
12
- };
13
10
  export type GetterIdType<T = CheckboxButtonType | string | number> = (checkboxBtn: T) => string;
14
11
  export type CheckboxGroupProps<TID = string | number, TLabel = string | number, TPayload = unknown> = {
15
12
  checkboxData?: CheckboxButtonType<TID, TLabel, TPayload>[];
@@ -36,7 +33,7 @@ export type CheckboxGroupProps<TID = string | number, TLabel = string | number,
36
33
  };
37
34
  declare const _default: <TID extends string | number, TLabel extends string | number, TPayload>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
38
35
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
39
- readonly "onUpdate:modelValue"?: ((args_0: CheckboxButtonType<string | number, string | number, unknown>[]) => any) | undefined;
36
+ readonly "onUpdate:modelValue"?: ((args_0: CheckboxButtonType<TID, TLabel, TPayload>[]) => any) | undefined;
40
37
  readonly onResetted?: (() => any) | undefined;
41
38
  readonly onCheckedGroup?: ((args_0: string) => any) | undefined;
42
39
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onResetted" | "onCheckedGroup"> & CheckboxGroupProps<TID, TLabel, TPayload> & Partial<{}>> & import('vue').PublicProps;
@@ -44,18 +41,18 @@ declare const _default: <TID extends string | number, TLabel extends string | nu
44
41
  attrs: any;
45
42
  slots: {
46
43
  default?(_: {
47
- isActive: (elem: CheckboxButtonType | string | number) => boolean;
48
- handleChange: (checkboxValue: CheckboxButtonType) => void;
44
+ isActive: (elem: CheckboxButtonType<TID, TLabel, TPayload> | string | number) => boolean;
45
+ handleChange: (checkboxValue: CheckboxButtonType<TID, TLabel, TPayload>) => void;
49
46
  checkboxesData: CheckboxButtonType<TID, TLabel, TPayload>[];
50
47
  }): any;
51
48
  checkbox_elements?(_: {
52
- isActive: (elem: CheckboxButtonType | string | number) => boolean;
53
- handleChange: (checkboxValue: CheckboxButtonType) => void;
49
+ isActive: (elem: CheckboxButtonType<TID, TLabel, TPayload> | string | number) => boolean;
50
+ handleChange: (checkboxValue: CheckboxButtonType<TID, TLabel, TPayload>) => void;
54
51
  checkboxesData: CheckboxButtonType<TID, TLabel, TPayload>[];
55
52
  reset: () => void;
56
53
  }): any;
57
54
  };
58
- emit: ((evt: "update:modelValue", args_0: CheckboxButtonType<string | number, string | number, unknown>[]) => void) & ((evt: "resetted") => void) & ((evt: "checkedGroup", args_0: string) => void);
55
+ emit: ((evt: "update:modelValue", args_0: CheckboxButtonType<TID, TLabel, TPayload>[]) => void) & ((evt: "resetted") => void) & ((evt: "checkedGroup", args_0: string) => void);
59
56
  }>) => import('vue').VNode & {
60
57
  __ctx?: Awaited<typeof __VLS_setup>;
61
58
  };
@@ -1,13 +1,14 @@
1
- import { defineComponent as L, mergeModels as M, useModel as V, useTemplateRef as C, shallowRef as r, onBeforeMount as N, watch as b, nextTick as O, createBlock as $, openBlock as p, withCtx as y, createElementBlock as B, Fragment as U, renderList as D, renderSlot as c, createElementVNode as d, normalizeClass as v, withDirectives as H, createCommentVNode as A, vModelText as P, toDisplayString as X, normalizeStyle as j, createTextVNode as q } from "vue";
1
+ import { defineComponent as L, mergeModels as V, useModel as M, useTemplateRef as C, shallowRef as s, onBeforeMount as N, watch as b, nextTick as O, createBlock as $, openBlock as c, withCtx as y, createElementBlock as B, Fragment as U, renderList as D, renderSlot as v, createElementVNode as d, normalizeClass as f, withDirectives as H, createCommentVNode as A, vModelText as P, toDisplayString as X, normalizeStyle as j, createTextVNode as q } from "vue";
2
2
  import G from "../BaseDropDown.vue.js";
3
3
  import '../../../../../assets/BaseDropDown.css';/* empty css */
4
4
  import J from "../BaseSelect/SelectItem.vue.js";
5
5
  import { debounce as Q } from "@wikicasa-dev/utilities";
6
6
  const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L({
7
7
  __name: "ClearableAutocomplete",
8
- props: /* @__PURE__ */ M({
8
+ props: /* @__PURE__ */ V({
9
9
  dataCy: {},
10
10
  placeholder: {},
11
+ enableKeyboardController: { type: Boolean, default: !0 },
11
12
  triggerWrapperClasses: {},
12
13
  inputWrapperClasses: {},
13
14
  inputClasses: {},
@@ -22,12 +23,12 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L
22
23
  modelValue: { default: null },
23
24
  modelModifiers: {}
24
25
  }),
25
- emits: /* @__PURE__ */ M(["click", "update:inputValue", "keydown"], ["update:open", "update:modelValue"]),
26
+ emits: /* @__PURE__ */ V(["click", "update:inputValue", "keydown"], ["update:open", "update:modelValue"]),
26
27
  setup(l, { expose: x, emit: R }) {
27
- const u = V(l, "open"), i = V(l, "modelValue"), f = R, T = C("inputRef"), o = r(""), w = r(0), k = r(!1), h = r(null), a = r([]), z = C("dropdownRef"), m = C("hiddenSpan"), W = () => {
28
- o.value = "", i.value = null;
29
- }, I = async (t) => {
30
- if (f("update:inputValue", t), !t) {
28
+ const u = M(l, "open"), i = M(l, "modelValue"), p = R, T = C("inputRef"), o = s(""), w = s(0), k = s(!1), h = s(null), a = s([]), z = C("dropdownRef"), m = C("hiddenSpan"), K = () => {
29
+ o.value = "", i.value = null, p("update:inputValue", "");
30
+ }, W = async (t) => {
31
+ if (p("update:inputValue", t), !t) {
31
32
  a.value = [], u.value = !1;
32
33
  return;
33
34
  }
@@ -35,7 +36,7 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L
35
36
  }, S = (t = -1) => {
36
37
  const e = a.value[t];
37
38
  !e || e.id === i.value?.id || (l.onOptionSelectedCb?.(e), o.value = e.label, u.value = !1, i.value = e, a.value = []);
38
- }, E = () => {
39
+ }, I = () => {
39
40
  T.value?.select();
40
41
  };
41
42
  return N(() => {
@@ -57,8 +58,8 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L
57
58
  },
58
59
  { immediate: !0 }
59
60
  ), x({
60
- select: E
61
- }), (t, e) => (p(), $(G, {
61
+ select: I
62
+ }), (t, e) => (c(), $(G, {
62
63
  ref: "dropdownRef",
63
64
  class: "uikit-clearable-autocomplete",
64
65
  "data-cy": l.dataCy,
@@ -66,33 +67,34 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L
66
67
  "dropdown-classes": ["uikit-z-30", l.dropdownClasses],
67
68
  "open-dropdown": u.value,
68
69
  "keep-state": !a.value.length || l.keepState === "closed" ? "closed" : "opened",
70
+ "activate-keyboard-controller": l.enableKeyboardController,
69
71
  "reset-keyboard-controller": k.value,
70
72
  "onUpdate:resetKeyboardController": e[2] || (e[2] = (n) => k.value = n),
71
73
  "onUpdate:dropdownState": e[3] || (e[3] = (n) => u.value = n),
72
- onClick: e[4] || (e[4] = (n) => f("click"))
74
+ onClick: e[4] || (e[4] = (n) => p("click"))
73
75
  }, {
74
76
  btn_slot: y(() => [
75
77
  d("div", {
76
- class: v(["uikit-text-16", l.triggerWrapperClasses])
78
+ class: f(["uikit-text-16", l.triggerWrapperClasses])
77
79
  }, [
78
- c(t.$slots, "left-icon"),
80
+ v(t.$slots, "left-icon"),
79
81
  d("div", {
80
- class: v(["uikit-relative", l.inputWrapperClasses])
82
+ class: f(["uikit-relative", l.inputWrapperClasses])
81
83
  }, [
82
84
  H(d("input", {
83
85
  ref: "inputRef",
84
86
  "onUpdate:modelValue": [
85
87
  e[0] || (e[0] = (n) => o.value = n),
86
- I
88
+ W
87
89
  ],
88
90
  readonly: !!i.value?.label,
89
- class: v(["uikit-w-full uikit-border-none focus-visible:uikit-outline-none", l.inputClasses]),
91
+ class: f(["uikit-w-full uikit-border-none focus-visible:uikit-outline-none", l.inputClasses]),
90
92
  style: {
91
93
  font: "inherit",
92
94
  fontSize: "inherit"
93
95
  },
94
96
  placeholder: l.placeholder,
95
- onKeydown: e[1] || (e[1] = (n) => f("keydown", n))
97
+ onKeydown: e[1] || (e[1] = (n) => p("keydown", n))
96
98
  }, null, 42, Y), [
97
99
  [P, o.value]
98
100
  ]),
@@ -105,36 +107,36 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L
105
107
  fontSize: "inherit"
106
108
  }
107
109
  }, X(o.value), 513),
108
- i.value?.label ? (p(), B("button", {
110
+ i.value?.label ? (c(), B("button", {
109
111
  key: 0,
110
112
  type: "button",
111
- class: v(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none", l.clearButtonClasses]),
113
+ class: f(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none", l.clearButtonClasses]),
112
114
  "aria-label": "Clear input",
113
115
  style: j({
114
116
  left: `${w.value + 16}px`
115
117
  }),
116
- onClick: W
118
+ onClick: K
117
119
  }, [
118
- c(t.$slots, "clear-icon", {}, () => [
120
+ v(t.$slots, "clear-icon", {}, () => [
119
121
  e[5] || (e[5] = q("X", -1))
120
122
  ])
121
123
  ], 6)) : A("", !0)
122
124
  ], 2),
123
- c(t.$slots, "right-icon")
125
+ v(t.$slots, "right-icon")
124
126
  ], 2)
125
127
  ]),
126
- default: y(({ activeIdx: n, setActiveIdx: F }) => [
127
- (p(!0), B(U, null, D(a.value, (g, s) => (p(), $(J, {
128
- key: s,
129
- active: n === s,
128
+ default: y(({ activeIdx: n, setActiveIdx: E }) => [
129
+ (c(!0), B(U, null, D(a.value, (g, r) => (c(), $(J, {
130
+ key: r,
131
+ active: n === r,
130
132
  class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
131
- onClick: (K) => S(s),
132
- onMouseover: (K) => F(s)
133
+ onClick: (F) => S(r),
134
+ onMouseover: (F) => E(r)
133
135
  }, {
134
136
  default: y(() => [
135
- c(t.$slots, "option-content", {
137
+ v(t.$slots, "option-content", {
136
138
  option: g,
137
- idx: s
139
+ idx: r
138
140
  }, () => [
139
141
  d("span", {
140
142
  innerHTML: g.label
@@ -145,7 +147,7 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L
145
147
  }, 1032, ["active", "onClick", "onMouseover"]))), 128))
146
148
  ]),
147
149
  _: 3
148
- }, 8, ["data-cy", "dropdown-classes", "open-dropdown", "keep-state", "reset-keyboard-controller"]));
150
+ }, 8, ["data-cy", "dropdown-classes", "open-dropdown", "keep-state", "activate-keyboard-controller", "reset-keyboard-controller"]));
149
151
  }
150
152
  });
151
153
  export {
@@ -14,7 +14,7 @@ const N = ["for"], j = /* @__PURE__ */ m({
14
14
  label: { default: "" },
15
15
  modelValue: { type: Boolean, default: !1 }
16
16
  },
17
- emits: ["click", "change", "update:modelValue"],
17
+ emits: ["click", "update:modelValue", "change"],
18
18
  setup(e, { emit: r }) {
19
19
  const l = f(), d = h(() => `${e.id ?? l}`), a = r;
20
20
  b(
@@ -40,7 +40,7 @@ const N = ["for"], j = /* @__PURE__ */ m({
40
40
  "model-value": e.modelValue,
41
41
  "data-cy": e.dataCy,
42
42
  disabled: e.disabled,
43
- class: y(["data-[state='unchecked']:uikit-border-w-lightgray uikit-inline-flex uikit-size-[20px] uikit-items-center uikit-justify-center uikit-rounded-[4px] uikit-p-0 data-[state='unchecked']:uikit-border data-[state='unchecked']:uikit-border-solid", [
43
+ class: y(["uikit-inline-flex uikit-size-[20px] uikit-items-center uikit-justify-center uikit-rounded-[4px] uikit-p-0 data-[state='unchecked']:uikit-border data-[state='unchecked']:uikit-border-solid data-[state='unchecked']:uikit-border-w-lightgray", [
44
44
  {
45
45
  "uikit-bg-white": !e.modelValue,
46
46
  "uikit-bg-w-primary": e.modelValue
@@ -1,7 +1,7 @@
1
- import { defineComponent as x, ref as p, computed as h, watch as v, renderSlot as b, createElementVNode as D, normalizeClass as E, createElementBlock as $, createCommentVNode as B, openBlock as g, Fragment as A, renderList as I, createBlock as R, unref as K } from "vue";
2
- import { stringToHyphened as V, isArrNullOrEmpty as L } from "@wikicasa-dev/utilities";
3
- import G from "./CheckboxBtn.vue.js";
4
- const N = ["id", "data-cy"], O = /* @__PURE__ */ x({
1
+ import { defineComponent as p, ref as v, computed as h, watch as D, renderSlot as b, createElementVNode as E, normalizeClass as $, createElementBlock as B, createCommentVNode as A, openBlock as g, Fragment as I, renderList as R, createBlock as K, unref as V } from "vue";
2
+ import { stringToHyphened as L, isArrNullOrEmpty as G } from "@wikicasa-dev/utilities";
3
+ import N from "./CheckboxBtn.vue.js";
4
+ const T = ["id", "data-cy"], S = /* @__PURE__ */ p({
5
5
  inheritAttrs: !1,
6
6
  __name: "CheckboxGroup",
7
7
  props: {
@@ -14,36 +14,38 @@ const N = ["id", "data-cy"], O = /* @__PURE__ */ x({
14
14
  autoCheckResetAll: { type: Boolean, default: !1 },
15
15
  autoCheckResetEmpty: { type: Boolean, default: !1 },
16
16
  manualToggleResetButton: { type: Boolean, default: !1 },
17
- getKey: { type: Function, default: (t) => typeof t == "string" || typeof t == "number" ? `${t}` : `${t.id}` },
17
+ getKey: { type: Function, default: (a) => typeof a == "string" || typeof a == "number" ? `${a}` : `${a.id}` },
18
18
  groupId: { default: "" },
19
19
  dataCy: { default: "" }
20
20
  },
21
21
  emits: ["resetted", "update:modelValue", "checkedGroup"],
22
- setup(t, { emit: C }) {
23
- const o = t, s = C, l = p(/* @__PURE__ */ new Map()), r = h(() => {
22
+ setup(a, { emit: C }) {
23
+ const o = a, s = C, l = v(
24
+ /* @__PURE__ */ new Map()
25
+ ), r = h(() => {
24
26
  for (const e of o.checkboxData)
25
27
  if (e.reset) return e;
26
28
  return null;
27
29
  }), y = h(() => o.checkboxData.length), f = h(() => {
28
30
  let e = 0;
29
- return l.value.forEach((a) => {
30
- a.checked && e++;
31
+ return l.value.forEach((t) => {
32
+ t.checked && e++;
31
33
  }), e;
32
34
  });
33
35
  (() => {
34
36
  const e = [];
35
- for (const a of o.checkboxData)
36
- a.checked = !!a.checked, l.value.set(
37
- `${a.id}`,
38
- a
39
- ), a.checked && e.push(a);
37
+ for (const t of o.checkboxData)
38
+ l.value.set(`${t.id}`, {
39
+ ...t,
40
+ checked: !!t.checked
41
+ }), t.checked && e.push(t);
40
42
  s("update:modelValue", e);
41
43
  })();
42
- const u = (e, a) => {
44
+ const u = (e, t) => {
43
45
  const c = l.value.get(e);
44
46
  if (c) {
45
- if (a) {
46
- l.value.set(e, { ...c, ...a });
47
+ if (t) {
48
+ l.value.set(e, { ...c, ...t });
47
49
  return;
48
50
  }
49
51
  l.value.set(e, { ...c, checked: !c.checked });
@@ -55,55 +57,55 @@ const N = ["id", "data-cy"], O = /* @__PURE__ */ x({
55
57
  }, m = () => {
56
58
  k(), s("update:modelValue", []), s("resetted");
57
59
  }, d = (e) => l.value.get(o.getKey(e))?.checked ?? !1, i = (e) => {
58
- if (L(o.checkboxData)) return;
59
- const a = l.value.get(e.id);
60
- a?.reset && e.checked ? k() : r.value && !a?.reset && u(o.getKey(r.value), { checked: !1 }), u(`${e.id}`), o.autoCheckResetAll && r.value && f.value === y.value - 1 && l.value.forEach((n) => {
60
+ if (G(o.checkboxData)) return;
61
+ const t = l.value.get(e.id);
62
+ t?.reset && e.checked ? k() : r.value && !t?.reset && u(o.getKey(r.value), { checked: !1 }), u(`${e.id}`), o.autoCheckResetAll && r.value && f.value === y.value - 1 && l.value.forEach((n) => {
61
63
  n.checked = !!n.reset;
62
- }), o.autoCheckResetEmpty && r.value && !f.value && (!o.manualToggleResetButton || !a?.reset) && u(o.getKey(r.value), { checked: !0 });
64
+ }), o.autoCheckResetEmpty && r.value && !f.value && (!o.manualToggleResetButton || !t?.reset) && u(o.getKey(r.value), { checked: !0 });
63
65
  const c = [];
64
66
  l.value.forEach((n) => {
65
67
  n.checked && c.push(n);
66
68
  }), s("update:modelValue", c), s("checkedGroup", o.groupId);
67
69
  };
68
- return v(
70
+ return D(
69
71
  () => o.reset,
70
72
  (e) => {
71
73
  e && m();
72
74
  }
73
- ), (e, a) => b(e.$slots, "default", {
75
+ ), (e, t) => b(e.$slots, "default", {
74
76
  isActive: d,
75
77
  handleChange: i,
76
- checkboxesData: t.checkboxData
78
+ checkboxesData: a.checkboxData
77
79
  }, () => [
78
- D("div", {
79
- id: t.groupId,
80
- class: E(["checkbox-group-container", e.$attrs.class || ""]),
81
- "data-cy": t.dataCy
80
+ E("div", {
81
+ id: a.groupId,
82
+ class: $(["checkbox-group-container", e.$attrs.class || ""]),
83
+ "data-cy": a.dataCy
82
84
  }, [
83
85
  b(e.$slots, "checkbox_elements", {
84
86
  isActive: d,
85
87
  handleChange: i,
86
- checkboxesData: t.checkboxData,
88
+ checkboxesData: a.checkboxData,
87
89
  reset: m
88
90
  }, () => [
89
- t.checkboxData ? (g(!0), $(A, { key: 0 }, I(t.checkboxData, (c, n) => (g(), R(G, {
90
- id: t.getKey(c),
91
+ a.checkboxData ? (g(!0), B(I, { key: 0 }, R(a.checkboxData, (c, n) => (g(), K(N, {
92
+ id: a.getKey(c),
91
93
  key: n,
92
- "data-cy": c.dataCy ?? `checkbox_${K(V)(`${c.label}`)}`,
94
+ "data-cy": c.dataCy ?? `checkbox_${V(L)(`${c.label}`)}`,
93
95
  label: c.label,
94
- inline: t.formCheckInline,
96
+ inline: a.formCheckInline,
95
97
  "model-value": d(c),
96
98
  "container-class": [
97
- t.formCheckInline ? "uikit-mr-10px" : "uikit-mb-10px",
98
- t.checkboxContainerClasses
99
+ a.formCheckInline ? "uikit-mr-10px" : "uikit-mb-10px",
100
+ a.checkboxContainerClasses
99
101
  ],
100
- onChange: i
101
- }, null, 8, ["id", "data-cy", "label", "inline", "model-value", "container-class"]))), 128)) : B("", !0)
102
+ onChange: t[0] || (t[0] = (x) => i(x))
103
+ }, null, 8, ["id", "data-cy", "label", "inline", "model-value", "container-class"]))), 128)) : A("", !0)
102
104
  ])
103
- ], 10, N)
105
+ ], 10, T)
104
106
  ]);
105
107
  }
106
108
  });
107
109
  export {
108
- O as default
110
+ S as default
109
111
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.2.8-alpha.13",
3
+ "version": "2.2.8-alpha.15",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",