@funcho/ui 1.1.12 → 1.1.14

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.
@@ -103,6 +103,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
103
103
  box: "border-box"
104
104
  });
105
105
  const props = __props;
106
+ vue.watch(
107
+ () => props.data,
108
+ () => {
109
+ checkAll.value = false;
110
+ indeterminate.value = false;
111
+ queryValue.value = "";
112
+ }
113
+ );
106
114
  const checkAll = vue.ref(false);
107
115
  const indeterminate = vue.ref(false);
108
116
  const queryValue = vue.ref("");
@@ -145,11 +153,27 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
145
153
  if (availableNodes.length === 0) return false;
146
154
  return availableNodes.every((node) => node.checked);
147
155
  };
156
+ const updateMethods = [
157
+ "setCheckedNodes",
158
+ "setCheckedKeys",
159
+ "setChecked",
160
+ "setCurrentKey",
161
+ "setCurrentNode"
162
+ ];
148
163
  __expose(
149
164
  new Proxy(
150
165
  {},
151
166
  {
152
167
  get(_, key) {
168
+ if (updateMethods.includes(key)) {
169
+ return (...args) => {
170
+ const method = treeRef.value?.[key];
171
+ if (method) {
172
+ method(...args);
173
+ handleTreeCheckChange();
174
+ }
175
+ };
176
+ }
153
177
  return treeRef.value?.[key];
154
178
  },
155
179
  has(_, key) {
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const version = "1.1.12";
5
+ const version = "1.1.14";
6
6
 
7
7
  exports.version = version;
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, createElementVNode, createBlock, withKeys, normalizeStyle, createVNode, withCtx, mergeProps } from 'vue';
1
+ import { defineComponent, ref, watch, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, createElementVNode, createBlock, withKeys, normalizeStyle, createVNode, withCtx, mergeProps } from 'vue';
2
2
  import { useNamespace } from '../../hooks/use-namespace.mjs';
3
3
  import '../../components/Button/index.mjs';
4
4
  import '../../components/Dialog/index.mjs';
@@ -99,6 +99,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
99
99
  box: "border-box"
100
100
  });
101
101
  const props = __props;
102
+ watch(
103
+ () => props.data,
104
+ () => {
105
+ checkAll.value = false;
106
+ indeterminate.value = false;
107
+ queryValue.value = "";
108
+ }
109
+ );
102
110
  const checkAll = ref(false);
103
111
  const indeterminate = ref(false);
104
112
  const queryValue = ref("");
@@ -141,11 +149,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
141
149
  if (availableNodes.length === 0) return false;
142
150
  return availableNodes.every((node) => node.checked);
143
151
  };
152
+ const updateMethods = [
153
+ "setCheckedNodes",
154
+ "setCheckedKeys",
155
+ "setChecked",
156
+ "setCurrentKey",
157
+ "setCurrentNode"
158
+ ];
144
159
  __expose(
145
160
  new Proxy(
146
161
  {},
147
162
  {
148
163
  get(_, key) {
164
+ if (updateMethods.includes(key)) {
165
+ return (...args) => {
166
+ const method = treeRef.value?.[key];
167
+ if (method) {
168
+ method(...args);
169
+ handleTreeCheckChange();
170
+ }
171
+ };
172
+ }
149
173
  return treeRef.value?.[key];
150
174
  },
151
175
  has(_, key) {
@@ -1,3 +1,3 @@
1
- const version = "1.1.12";
1
+ const version = "1.1.14";
2
2
 
3
3
  export { version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@funcho/ui",
3
3
  "description": "@funcho ui library",
4
- "version": "1.1.12",
4
+ "version": "1.1.14",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.mjs",