tsv2-library 1.0.61-beta.73 → 1.0.61-beta.75
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.
- package/dist/tsv2-library.es.js +19 -9
- package/dist/tsv2-library.umd.js +2 -2
- package/package.json +1 -1
package/dist/tsv2-library.es.js
CHANGED
|
@@ -68444,7 +68444,10 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
68444
68444
|
}
|
|
68445
68445
|
});
|
|
68446
68446
|
const { handleSubmit, values, resetForm, errors, setErrors, setFieldError } = useForm$1();
|
|
68447
|
-
const isSubmitting =
|
|
68447
|
+
const isSubmitting = inject(
|
|
68448
|
+
"isSubmitting",
|
|
68449
|
+
shallowRef(false)
|
|
68450
|
+
);
|
|
68448
68451
|
provide("isSubmitting", isSubmitting);
|
|
68449
68452
|
const formState = shallowRef("submit");
|
|
68450
68453
|
const formElement = ref();
|
|
@@ -68698,6 +68701,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
68698
68701
|
const props = __props;
|
|
68699
68702
|
const emit = __emit;
|
|
68700
68703
|
const slots = useSlots();
|
|
68704
|
+
const isSubmitting = shallowRef(false);
|
|
68705
|
+
provide("isSubmitting", isSubmitting);
|
|
68701
68706
|
const form = ref();
|
|
68702
68707
|
const dialogForm = ref();
|
|
68703
68708
|
const fieldsKey = ref(0);
|
|
@@ -68715,9 +68720,14 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
68715
68720
|
emit("update:visible", false);
|
|
68716
68721
|
emit("close");
|
|
68717
68722
|
};
|
|
68718
|
-
const onButtonSubmitClicked = () => {
|
|
68723
|
+
const onButtonSubmitClicked = async () => {
|
|
68719
68724
|
if (form.value && !props.invalid && !props.validatorMessage) {
|
|
68720
|
-
|
|
68725
|
+
isSubmitting.value = true;
|
|
68726
|
+
try {
|
|
68727
|
+
await form.value.submit();
|
|
68728
|
+
} finally {
|
|
68729
|
+
isSubmitting.value = false;
|
|
68730
|
+
}
|
|
68721
68731
|
}
|
|
68722
68732
|
};
|
|
68723
68733
|
const clearField = () => {
|
|
@@ -78112,17 +78122,17 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
78112
78122
|
return true;
|
|
78113
78123
|
};
|
|
78114
78124
|
const checkForAvailability = debounce$1(async () => {
|
|
78115
|
-
var _a2, _b, _c, _d;
|
|
78116
|
-
if (field2.value != props.value) {
|
|
78117
|
-
if ((
|
|
78118
|
-
const available = await ((
|
|
78125
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
78126
|
+
if (((_a2 = field2.value) == null ? void 0 : _a2.trim()) != ((_b = props.value) == null ? void 0 : _b.trim())) {
|
|
78127
|
+
if ((_c = field2.value) == null ? void 0 : _c.trim().length) {
|
|
78128
|
+
const available = await ((_e = props.checkAvailability) == null ? void 0 : _e.call(props, (_d = field2.value) == null ? void 0 : _d.trim()));
|
|
78119
78129
|
if (!available) {
|
|
78120
|
-
return (
|
|
78130
|
+
return (_f = field2.setErrors) == null ? void 0 : _f.call(field2, existErrorMessage.value);
|
|
78121
78131
|
}
|
|
78122
78132
|
}
|
|
78123
78133
|
}
|
|
78124
78134
|
if (field2.errorMessage === CHECK_AVAILABILITY_ERROR_MESSAGE) {
|
|
78125
|
-
(
|
|
78135
|
+
(_g = field2.setErrors) == null ? void 0 : _g.call(field2, "");
|
|
78126
78136
|
}
|
|
78127
78137
|
}, 300);
|
|
78128
78138
|
const setMaxValue = (value) => {
|