eco-vue-js 0.11.48 → 0.11.50
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/components/Form/WFormValidator.vue.js +5 -5
- package/dist/components/Input/components/ContentEditable.vue2.js +1 -1
- package/dist/components/Modal/WModalStepper.vue.d.ts +8 -8
- package/dist/components/Tabs/WTabs.vue.d.ts +2 -2
- package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue.js +4 -4
- package/package.json +1 -1
|
@@ -34,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
34
|
const slots = useSlots();
|
|
35
35
|
const componentSlot = computed(() => slots.default?.()[0]);
|
|
36
36
|
const componentRef = useTemplateRef("component");
|
|
37
|
-
const
|
|
37
|
+
const getModelValue = () => {
|
|
38
38
|
const props2 = componentSlot.value?.props;
|
|
39
39
|
if (!props2) return void 0;
|
|
40
40
|
if ("modelValue" in props2) {
|
|
@@ -44,7 +44,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
44
|
return props2["model-value"];
|
|
45
45
|
}
|
|
46
46
|
return void 0;
|
|
47
|
-
}
|
|
47
|
+
};
|
|
48
|
+
const modelValue = computed(getModelValue);
|
|
48
49
|
const initModelValue = ref(modelValue.value);
|
|
49
50
|
const isErrorShown = ref(false);
|
|
50
51
|
const wasChanged = ref(false);
|
|
@@ -113,8 +114,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
113
114
|
};
|
|
114
115
|
const doValidate = (silent, path) => {
|
|
115
116
|
if (props.name && path && !path[props.name]) return;
|
|
116
|
-
|
|
117
|
-
const message = _validate(modelValue.value);
|
|
117
|
+
const message = _validate(getModelValue());
|
|
118
118
|
errorMessage.value = message;
|
|
119
119
|
if (!silent) {
|
|
120
120
|
isErrorShown.value = message !== void 0;
|
|
@@ -188,7 +188,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
188
188
|
__expose({
|
|
189
189
|
validateOnUpdate() {
|
|
190
190
|
isErrorShown.value = true;
|
|
191
|
-
return validateOnUpdate(
|
|
191
|
+
return validateOnUpdate(getModelValue());
|
|
192
192
|
},
|
|
193
193
|
invalidate(message) {
|
|
194
194
|
errorMessage.value = message;
|
|
@@ -251,7 +251,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
251
251
|
"aria-multiline": "true",
|
|
252
252
|
spellcheck: "false",
|
|
253
253
|
placeholder: _ctx.placeholder,
|
|
254
|
-
class: "relative [
|
|
254
|
+
class: "relative [white-space:var(--w-input-whitespace,pre)]",
|
|
255
255
|
onInput,
|
|
256
256
|
onBeforeinput: _cache[0] || (_cache[0] = ($event) => insertParagraph($event)),
|
|
257
257
|
onPaste: withModifiers(onPaste, ["prevent"]),
|
|
@@ -487,9 +487,9 @@ declare function __VLS_template(): {
|
|
|
487
487
|
}>, {
|
|
488
488
|
updateCurrent: (value: string) => void;
|
|
489
489
|
updateIndex: (value: number) => void;
|
|
490
|
-
next: (
|
|
490
|
+
next: () => void;
|
|
491
491
|
previous: () => void;
|
|
492
|
-
jump: (name: string
|
|
492
|
+
jump: (name: string) => void;
|
|
493
493
|
validate: (name: string, silent?: boolean | undefined, path?: import('../Form/models/utils').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["validate"]>;
|
|
494
494
|
validateIfNoError: (name: string, silent?: boolean | undefined, path?: import('../Form/models/utils').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["validate"]>;
|
|
495
495
|
invalidate: (name: string, messages: Record<string, string | string[] | undefined>) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["invalidate"]>;
|
|
@@ -535,9 +535,9 @@ declare function __VLS_template(): {
|
|
|
535
535
|
}>, "validate" | "invalidate" | "initModel" | "previous" | "next" | "updateCurrent" | "updateIndex" | "jump" | "validateIfNoError"> & import('vue').ShallowUnwrapRef<{
|
|
536
536
|
updateCurrent: (value: string) => void;
|
|
537
537
|
updateIndex: (value: number) => void;
|
|
538
|
-
next: (
|
|
538
|
+
next: () => void;
|
|
539
539
|
previous: () => void;
|
|
540
|
-
jump: (name: string
|
|
540
|
+
jump: (name: string) => void;
|
|
541
541
|
validate: (name: string, silent?: boolean | undefined, path?: import('../Form/models/utils').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["validate"]>;
|
|
542
542
|
validateIfNoError: (name: string, silent?: boolean | undefined, path?: import('../Form/models/utils').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["validate"]>;
|
|
543
543
|
invalidate: (name: string, messages: Record<string, string | string[] | undefined>) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["invalidate"]>;
|
|
@@ -1042,9 +1042,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
1042
1042
|
}>, {
|
|
1043
1043
|
updateCurrent: (value: string) => void;
|
|
1044
1044
|
updateIndex: (value: number) => void;
|
|
1045
|
-
next: (
|
|
1045
|
+
next: () => void;
|
|
1046
1046
|
previous: () => void;
|
|
1047
|
-
jump: (name: string
|
|
1047
|
+
jump: (name: string) => void;
|
|
1048
1048
|
validate: (name: string, silent?: boolean | undefined, path?: import('../Form/models/utils').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["validate"]>;
|
|
1049
1049
|
validateIfNoError: (name: string, silent?: boolean | undefined, path?: import('../Form/models/utils').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["validate"]>;
|
|
1050
1050
|
invalidate: (name: string, messages: Record<string, string | string[] | undefined>) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["invalidate"]>;
|
|
@@ -1090,9 +1090,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
1090
1090
|
}>, "validate" | "invalidate" | "initModel" | "previous" | "next" | "updateCurrent" | "updateIndex" | "jump" | "validateIfNoError"> & import('vue').ShallowUnwrapRef<{
|
|
1091
1091
|
updateCurrent: (value: string) => void;
|
|
1092
1092
|
updateIndex: (value: number) => void;
|
|
1093
|
-
next: (
|
|
1093
|
+
next: () => void;
|
|
1094
1094
|
previous: () => void;
|
|
1095
|
-
jump: (name: string
|
|
1095
|
+
jump: (name: string) => void;
|
|
1096
1096
|
validate: (name: string, silent?: boolean | undefined, path?: import('../Form/models/utils').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["validate"]>;
|
|
1097
1097
|
validateIfNoError: (name: string, silent?: boolean | undefined, path?: import('../Form/models/utils').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["validate"]>;
|
|
1098
1098
|
invalidate: (name: string, messages: Record<string, string | string[] | undefined>) => ReturnType<ComponentInstance<typeof import('../Form/WForm.vue').default>["invalidate"]>;
|
|
@@ -438,9 +438,9 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
438
438
|
declare const __VLS_component: import('vue').DefineComponent<TabsProps, {
|
|
439
439
|
updateCurrent: (value: string) => void;
|
|
440
440
|
updateIndex: (value: number) => void;
|
|
441
|
-
next: (
|
|
441
|
+
next: () => void;
|
|
442
442
|
previous: () => void;
|
|
443
|
-
jump: (name: string
|
|
443
|
+
jump: (name: string) => void;
|
|
444
444
|
validate: (name: string, silent?: boolean | undefined, path?: import('../Form/models/utils').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof WForm>["validate"]>;
|
|
445
445
|
validateIfNoError: (name: string, silent?: boolean | undefined, path?: import('../Form/models/utils').ValidatePath | undefined) => ReturnType<ComponentInstance<typeof WForm>["validate"]>;
|
|
446
446
|
invalidate: (name: string, messages: Record<string, string | string[] | undefined>) => ReturnType<ComponentInstance<typeof WForm>["invalidate"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"AAsIA;AAAA,OA4ZO,KAAK,EAAgB,SAAS,EAAC,MAAM,SAAS,CAAA;AAIrD,OAAO,KAAK,MAAM,6BAA6B,CAAA;AA6R/C,iBAAS,cAAc;WAqST,OAAO,IAA6B;;iBA1SvC,MAAM,IAAI;;iBAAV,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"AAsIA;AAAA,OA4ZO,KAAK,EAAgB,SAAS,EAAC,MAAM,SAAS,CAAA;AAIrD,OAAO,KAAK,MAAM,6BAA6B,CAAA;AA6R/C,iBAAS,cAAc;WAqST,OAAO,IAA6B;;iBA1SvC,MAAM,IAAI;;iBAAV,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAkFd,GAAG,8CAED,GAAG,yBACF,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAH5C,GAAG,8CAED,GAAG,yBACF,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAH5C,GAAG,8CAED,GAAG,yBACF,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAH5C,GAAG,8CAED,GAAG,yBACF,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;OA+PjD,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -102,8 +102,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
102
102
|
current.value = value;
|
|
103
103
|
scrollToTabContent();
|
|
104
104
|
}, 100);
|
|
105
|
-
const next = (
|
|
106
|
-
const errorMessage =
|
|
105
|
+
const next = () => {
|
|
106
|
+
const errorMessage = validate(current.value);
|
|
107
107
|
if (errorMessage) {
|
|
108
108
|
Notify.warn({ title: "Form contains invalid values", caption: errorMessage.length < 200 ? errorMessage : void 0 });
|
|
109
109
|
return;
|
|
@@ -113,9 +113,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
113
113
|
const previous = () => {
|
|
114
114
|
switchTab(defaultSlotsKeys.value[currentIndex.value - 1]);
|
|
115
115
|
};
|
|
116
|
-
const jump = (name
|
|
116
|
+
const jump = (name) => {
|
|
117
117
|
const valid = defaultSlotsKeys.value.slice(currentIndex.value, defaultSlotsKeys.value.indexOf(name)).every((item) => {
|
|
118
|
-
const errorMessage =
|
|
118
|
+
const errorMessage = validate(item);
|
|
119
119
|
if (errorMessage) {
|
|
120
120
|
Notify.warn({ title: "Form contains invalid values", caption: errorMessage.length < 200 ? errorMessage : void 0 });
|
|
121
121
|
return false;
|