@wikicasa-dev/components 1.2.48 → 1.2.49

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,4 +1,4 @@
1
- import { _ as f } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.C5jcwwv6.js";
1
+ import { _ as f } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.Kpz4rw2R.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -48,9 +48,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
48
48
  autoCheckResetEmpty: boolean;
49
49
  getKey: GetterIdType;
50
50
  }, {}>, {
51
- checkboxElement?(_: {
51
+ default?(_: {
52
52
  isActive: (elem: CheckboxButtonType) => boolean;
53
53
  handleChange: (checkboxValue: CheckboxButtonType) => void;
54
+ checkboxesData: Record<string, CheckboxButtonType>;
54
55
  }): any;
55
56
  }>;
56
57
  export default _default;
@@ -1,8 +1,8 @@
1
- import { defineComponent as v, useAttrs as y, reactive as C, computed as d, watch as g, onBeforeMount as V, openBlock as u, createElementBlock as k, normalizeClass as B, renderSlot as $, Fragment as A, renderList as K, createBlock as w, unref as E, createCommentVNode as L } from "vue";
2
- import { i as R } from "./ObjectUtils.B1Dk4qsM.js";
1
+ import { defineComponent as v, useAttrs as y, reactive as C, computed as d, watch as g, onBeforeMount as V, openBlock as u, createElementBlock as k, normalizeClass as B, renderSlot as $, Fragment as A, renderList as K, createBlock as w, unref as L, createCommentVNode as R } from "vue";
2
+ import { i as E } from "./ObjectUtils.B1Dk4qsM.js";
3
3
  import "./js.cookie.BaTT4o7s.js";
4
4
  import G from "../CheckboxBtn.js";
5
- const I = (a = "") => !a || !a.trim() ? "" : (a = a.trim(), a.replace(" ", "-").toLowerCase()), _ = ["id", "data-cy"], q = /* @__PURE__ */ v({
5
+ const I = (a = "") => !a || !a.trim() ? "" : (a = a.trim(), a.replace(" ", "-").toLowerCase()), z = ["id", "data-cy"], _ = /* @__PURE__ */ v({
6
6
  inheritAttrs: !1,
7
7
  __name: "CheckboxGroup",
8
8
  props: {
@@ -29,7 +29,7 @@ const I = (a = "") => !a || !a.trim() ? "" : (a = a.trim(), a.replace(" ", "-").
29
29
  return c;
30
30
  }
31
31
  return null;
32
- }), m = d(
32
+ }), p = d(
33
33
  () => Object.keys(t.valuesObj).length
34
34
  ), i = d(
35
35
  () => Object.values(s.checkedValuesObj).reduce(
@@ -51,11 +51,11 @@ const I = (a = "") => !a || !a.trim() ? "" : (a = a.trim(), a.replace(" ", "-").
51
51
  const h = () => {
52
52
  for (const e in s.checkedValuesObj)
53
53
  s.checkedValuesObj[e].checked = !1;
54
- }, n = (e) => s.checkedValuesObj[t.getKey(e)].checked, p = (e) => {
54
+ }, n = (e) => s.checkedValuesObj[t.getKey(e)].checked, m = (e) => {
55
55
  s.checkedValuesObj[e.id].checked = !n(e);
56
56
  }, j = (e) => {
57
- if (!(!t.valuesObj || R(t.valuesObj))) {
58
- if (t.valuesObj[e.id].reset && e.checked ? h() : l.value && !t.valuesObj[e.id].reset && (s.checkedValuesObj[t.getKey(l.value)].checked = !1), s.checkedValuesObj[e.id].checked = !!e.checked, t.autoCheckResetAll && l.value && i.value === m.value - 1)
57
+ if (!(!t.valuesObj || E(t.valuesObj))) {
58
+ if (t.valuesObj[e.id].reset && e.checked ? h() : l.value && !t.valuesObj[e.id].reset && (s.checkedValuesObj[t.getKey(l.value)].checked = !1), s.checkedValuesObj[e.id].checked = !!e.checked, t.autoCheckResetAll && l.value && i.value === p.value - 1)
59
59
  for (const c in s.checkedValuesObj)
60
60
  s.checkedValuesObj[c].checked = !!s.checkedValuesObj[c].reset;
61
61
  t.autoCheckResetEmpty && l.value && !i.value && (s.checkedValuesObj[t.getKey(l.value)].checked = !0), o(
@@ -71,24 +71,25 @@ const I = (a = "") => !a || !a.trim() ? "" : (a = a.trim(), a.replace(" ", "-").
71
71
  class: B(["checkbox-group-container", e.$attrs.class || ""]),
72
72
  "data-cy": e.$attrs["data-cy"] || ""
73
73
  }, [
74
- $(e.$slots, "checkboxElement", {
74
+ $(e.$slots, "default", {
75
75
  isActive: n,
76
- handleChange: p
76
+ handleChange: m,
77
+ checkboxesData: e.valuesObj
77
78
  }, () => [
78
- e.valuesObj ? (u(!0), k(A, { key: 0 }, K(e.valuesObj, (r, z, O) => (u(), w(G, {
79
+ e.valuesObj ? (u(!0), k(A, { key: 0 }, K(e.valuesObj, (r, D, O) => (u(), w(G, {
79
80
  id: e.getKey(r),
80
81
  key: O,
81
- "data-cy": `checkbox_${E(I)(`${r.label}`)}`,
82
+ "data-cy": `checkbox_${L(I)(`${r.label}`)}`,
82
83
  label: r.label,
83
84
  inline: e.formCheckInline,
84
85
  "wrapper-margin-y": e.$attrs["checkbox-padding-y"],
85
86
  "model-value": n(r),
86
87
  onChange: j
87
- }, null, 8, ["id", "data-cy", "label", "inline", "wrapper-margin-y", "model-value"]))), 128)) : L("", !0)
88
+ }, null, 8, ["id", "data-cy", "label", "inline", "wrapper-margin-y", "model-value"]))), 128)) : R("", !0)
88
89
  ])
89
- ], 10, _));
90
+ ], 10, z));
90
91
  }
91
92
  });
92
93
  export {
93
- q as _
94
+ _
94
95
  };
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { _ as f } from "./chunks/BaseAccordionContent.vue_vue_type_script_setup_
5
5
  import { _ as m } from "./chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.B6RfqbZ9.js";
6
6
  import { _ as l } from "./chunks/SelectItem.vue_vue_type_script_setup_true_lang.BOLdDTLM.js";
7
7
  import { default as B } from "./CheckboxBtn.js";
8
- import { _ as n } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.C5jcwwv6.js";
8
+ import { _ as n } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.Kpz4rw2R.js";
9
9
  import { default as c } from "./RadioButton.js";
10
10
  import { default as b } from "./RadioGroup.js";
11
11
  import { _ as A } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.lyHlWiC5.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "1.2.48",
3
+ "version": "1.2.49",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",