eco-vue-js 0.9.28 → 0.9.29

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 +1 @@
1
- {"version":3,"file":"WInputAsync.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Input/WInputAsync.vue"],"names":[],"mappings":"AAoSA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;yBAiB3B,IAAI,SAAS,SAAS,wBACzB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAgfxD,mBAAmB,CAAC;;mKAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;uBA/Ce,GAAG;0BACA,GAAG;uBACN,GAAG;;cA1bzB,mBAAmB,SAAS,4CAAa,SAAS,KAAG,IAAI;;;;YA4enB,OAAO,CAAC,OAAO,WAAW,CAAC;;AA1fvE,wBA0f4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"WInputAsync.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Input/WInputAsync.vue"],"names":[],"mappings":"AAuSA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;yBAiB3B,IAAI,SAAS,SAAS,wBACzB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAmfxD,mBAAmB,CAAC;;mKAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;uBA/Ce,GAAG;0BACA,GAAG;uBACN,GAAG;;cA7bzB,mBAAmB,SAAS,4CAAa,SAAS,KAAG,IAAI;;;;YA+enB,OAAO,CAAC,OAAO,WAAW,CAAC;;AA7fvE,wBA6f4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -122,7 +122,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
122
122
  });
123
123
  });
124
124
  } else if (props.debounce) {
125
- emitUpdateModelValue(value.value);
125
+ if (canSave.value) emitUpdateModelValue(value.value);
126
126
  } else {
127
127
  value.value = props.modelValue;
128
128
  focused.value = false;
@@ -160,21 +160,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
160
160
  doClearTimeout();
161
161
  event.stopPropagation();
162
162
  event.preventDefault();
163
- emitUpdateModelValue(value.value);
163
+ if (canSave.value) emitUpdateModelValue(value.value);
164
164
  };
165
165
  const handlePaste = () => {
166
166
  doClearTimeout();
167
167
  if (!value.value) return;
168
- if (hasChangesValue.value || props.textSecure && focused.value) {
169
- emitUpdateModelValue(value.value);
170
- }
168
+ if (canSave.value) emitUpdateModelValue(value.value);
171
169
  };
172
170
  const saveDebounced = () => {
173
- emit("update:modelValue", value.value);
171
+ if (canSave.value) emit("update:modelValue", value.value);
174
172
  timeout.value = null;
175
173
  };
176
174
  const updateModelValueDebounced = () => {
177
175
  if (timeout.value) clearTimeout(timeout.value);
176
+ if (!canSave.value) {
177
+ timeout.value = null;
178
+ return;
179
+ }
178
180
  timeout.value = setTimeout(saveDebounced, props.debounce);
179
181
  };
180
182
  if (props.debounce) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.9.28",
7
+ "version": "0.9.29",
8
8
  "scripts": {
9
9
  "build": "run-p type-check \"build-only {@}\" --",
10
10
  "preview": "vite preview",