eco-vue-js 0.26.6 → 0.26.8
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/Button/WButtonMoreItem.vue.d.ts +6 -0
- package/dist/components/Button/WButtonMoreItem.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonMoreItem.vue_vue_type_script_setup_true_lang.js +9 -0
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts.map +1 -1
- package/dist/components/FieldWrapper/WFieldWrapper.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/FieldWrapper/components/FilterButton.vue.d.ts.map +1 -1
- package/dist/components/FieldWrapper/components/FilterButton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/Input/WInput.vue.d.ts +1 -0
- package/dist/components/Input/WInput.vue.d.ts.map +1 -1
- package/dist/components/Input/WInput.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/MenuItem/WMenuItem.vue.d.ts +8 -0
- package/dist/components/MenuItem/WMenuItem.vue.d.ts.map +1 -1
- package/dist/components/MenuItem/WMenuItem.vue_vue_type_script_setup_true_lang.js +12 -2
- package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue_vue_type_script_setup_true_lang.js +9 -1
- package/dist/components/Uniform/WUniform.vue.d.ts +1 -1
- package/dist/components/Uniform/WUniform.vue.d.ts.map +1 -1
- package/dist/components/Uniform/WUniform.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/Uniform/use/useUniformField.d.ts +1 -0
- package/dist/components/Uniform/use/useUniformField.d.ts.map +1 -1
- package/dist/components/Uniform/use/useUniformField.js +5 -1
- package/dist/components/Uniform/use/useUniformModel.d.ts +1 -1
- package/dist/components/Uniform/use/useUniformModel.d.ts.map +1 -1
- package/dist/components/Uniform/use/useUniformModel.js +6 -3
- package/docs/components/form.md +2 -2
- package/docs/llms.txt +1 -1
- package/package.json +1 -1
|
@@ -11,6 +11,12 @@ interface Props extends Partial<LinkProps> {
|
|
|
11
11
|
href?: string;
|
|
12
12
|
/** Native `download` attribute, with `href`. */
|
|
13
13
|
download?: string;
|
|
14
|
+
/** With `to`, replaces the current history entry instead of pushing a new one. */
|
|
15
|
+
replace?: boolean;
|
|
16
|
+
/** Native `target` of the link, with `href` or `to`. */
|
|
17
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
18
|
+
/** Native `rel` of the link, with `href` or `to`. */
|
|
19
|
+
rel?: string;
|
|
14
20
|
/** Tooltip over the item. */
|
|
15
21
|
tooltipText?: string;
|
|
16
22
|
/** Color of the item. Types other than `primary` and `secondary` color the text at rest — a red "Delete". */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WButtonMoreItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonMoreItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WButtonMoreItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonMoreItem.vue"],"names":[],"mappings":"AA6BA;AA0EA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAItD,UAAU,KAAM,SAAQ,OAAO,CAAC,SAAS,CAAC;IACxC,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kFAAkF;IAClF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,wDAAwD;IACxD,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAA;IAChD,qDAAqD;IACrD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,6GAA6G;IAC7G,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B;AAWD,KAAK,WAAW,GAAG;IACjB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;CAClB,CAAC;AAqFF,QAAA,MAAM,UAAU;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -10,6 +10,9 @@ var WButtonMoreItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
10
10
|
disabled: { type: Boolean },
|
|
11
11
|
href: {},
|
|
12
12
|
download: {},
|
|
13
|
+
replace: { type: Boolean },
|
|
14
|
+
target: {},
|
|
15
|
+
rel: {},
|
|
13
16
|
tooltipText: {},
|
|
14
17
|
semanticType: {},
|
|
15
18
|
to: {}
|
|
@@ -21,6 +24,9 @@ var WButtonMoreItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
21
24
|
to: __props.to,
|
|
22
25
|
href: __props.href,
|
|
23
26
|
download: __props.download,
|
|
27
|
+
replace: __props.replace,
|
|
28
|
+
target: __props.target,
|
|
29
|
+
rel: __props.rel,
|
|
24
30
|
disabled: __props.disabled,
|
|
25
31
|
"tooltip-text": __props.tooltipText,
|
|
26
32
|
"semantic-type": __props.semanticType,
|
|
@@ -35,6 +41,9 @@ var WButtonMoreItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
35
41
|
"to",
|
|
36
42
|
"href",
|
|
37
43
|
"download",
|
|
44
|
+
"replace",
|
|
45
|
+
"target",
|
|
46
|
+
"rel",
|
|
38
47
|
"disabled",
|
|
39
48
|
"tooltip-text",
|
|
40
49
|
"semantic-type"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WFieldWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldWrapper/WFieldWrapper.vue"],"names":[],"mappings":"AAqLA;AAkUA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAkB,KAAK,KAAK,EAAuE,MAAM,KAAK,CAAA;AAerH,KAAK,WAAW,GAAG,iBAAiB,GAAG;IACnC,uJAAuJ;IACvJ,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;AAyGJ,KAAK,WAAW,GAAG;IACjB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,KAAK,EAAE,CAAA;IACrB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,KAAK,EAAE,CAAA;IACvB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,KAAK,EAAE,CAAA;IACrB,qDAAqD;IACrD,MAAM,EAAE,MAAM,KAAK,EAAE,CAAA;IACrB,2JAA2J;IAC3J,KAAK,EAAE,CAAC,KAAK,EAAE;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAC,KAAK,KAAK,EAAE,CAAA;IACpH,sGAAsG;IACtG,OAAO,EAAE,CAAC,KAAK,EAAE;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAC,KAAK,K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AY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -128,7 +128,7 @@ var WFieldWrapper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
128
128
|
showMessage
|
|
129
129
|
});
|
|
130
130
|
return (_ctx, _cache) => {
|
|
131
|
-
return openBlock(), createElementBlock("div", mergeProps({ class: "relative" }, __props.allowDropFile ? {
|
|
131
|
+
return openBlock(), createElementBlock("div", mergeProps({ class: "relative group/field" }, __props.allowDropFile ? {
|
|
132
132
|
style: _ctx.$attrs.style,
|
|
133
133
|
onDragover,
|
|
134
134
|
onDragleave,
|
|
@@ -167,7 +167,7 @@ var WFieldWrapper_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
167
167
|
createElementVNode("div", {
|
|
168
168
|
ref: "field",
|
|
169
169
|
class: normalizeClass(["grid", {
|
|
170
|
-
"pr-
|
|
170
|
+
"pr-7": !__props.title && !_ctx.$slots.title && __props.filterField,
|
|
171
171
|
"col-start-2 -col-end-1 row-start-1 -row-end-3 grid-cols-subgrid": __props.subgrid,
|
|
172
172
|
"grid-cols-[1fr_auto]": !__props.subgrid,
|
|
173
173
|
"px-[max(0px,calc(--spacing(3)-var(--w-frame-padding,0px)))]": __props.embedded
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterButton.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/FieldWrapper/components/FilterButton.vue"],"names":[],"mappings":"AAoBA;AAiCA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAAG,SAAS,CAAA;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"FilterButton.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/FieldWrapper/components/FilterButton.vue"],"names":[],"mappings":"AAoBA;AAiCA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAAG,SAAS,CAAA;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAmEF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
package/dist/components/FieldWrapper/components/FilterButton.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -18,7 +18,7 @@ var FilterButton_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
18
18
|
return __props.skeleton || !__props.encodedQueryParam ? (openBlock(), createElementBlock("div", _hoisted_1)) : (openBlock(), createElementBlock("button", {
|
|
19
19
|
key: 1,
|
|
20
20
|
class: normalizeClass(["w-ripple w-ripple-hover rounded p-[0.125em]", {
|
|
21
|
-
"text-description": _ctx.$route.query[__props.filterField] !== __props.encodedQueryParam,
|
|
21
|
+
"text-description opacity-0 group-hover/field:opacity-100": _ctx.$route.query[__props.filterField] !== __props.encodedQueryParam,
|
|
22
22
|
"tone-primary surface-fill": _ctx.$route.query[__props.filterField] === __props.encodedQueryParam
|
|
23
23
|
}]),
|
|
24
24
|
"aria-pressed": _ctx.$route.query[__props.filterField] === __props.encodedQueryParam,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue"],"names":[],"mappings":"AA0XA;
|
|
1
|
+
{"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue"],"names":[],"mappings":"AA0XA;AA62BA,OAAO,KAAK,EAAC,eAAe,EAAE,UAAU,EAA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AG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -432,7 +432,8 @@ var WInput_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
432
432
|
scrollToInput,
|
|
433
433
|
undo,
|
|
434
434
|
redo,
|
|
435
|
-
showMessage
|
|
435
|
+
showMessage,
|
|
436
|
+
cancel: asyncState.cancel
|
|
436
437
|
});
|
|
437
438
|
return (_ctx, _cache) => {
|
|
438
439
|
return openBlock(), createBlock(WFieldWrapper_default, mergeProps({ ref: "fieldWrapper" }, props, {
|
|
@@ -7,6 +7,12 @@ interface Props extends Partial<LinkProps> {
|
|
|
7
7
|
href?: string;
|
|
8
8
|
/** `download` attribute of the `href` link — the file name to save it as. */
|
|
9
9
|
download?: string;
|
|
10
|
+
/** With `to`, replaces the current history entry instead of pushing a new one. */
|
|
11
|
+
replace?: boolean;
|
|
12
|
+
/** Native `target` of the link, with `href` or `to`. */
|
|
13
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
14
|
+
/** Native `rel` of the link, with `href` or `to`. */
|
|
15
|
+
rel?: string;
|
|
10
16
|
/** Marks the item as picked, with primary text and a check. `false` leaves room for the check, to line up with picked items. */
|
|
11
17
|
active?: boolean;
|
|
12
18
|
/** Tooltip text on the left of the item. */
|
|
@@ -28,6 +34,8 @@ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
28
34
|
tooltipText: string;
|
|
29
35
|
semanticType: SemanticType;
|
|
30
36
|
href: string;
|
|
37
|
+
target: "_self" | "_blank" | "_parent" | "_top";
|
|
38
|
+
rel: string;
|
|
31
39
|
download: string;
|
|
32
40
|
active: boolean;
|
|
33
41
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WMenuItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/MenuItem/WMenuItem.vue"],"names":[],"mappings":"AA4DA;
|
|
1
|
+
{"version":3,"file":"WMenuItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/MenuItem/WMenuItem.vue"],"names":[],"mappings":"AA4DA;AA8HA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAS5C,OAAO,EAAC,YAAY,EAAyB,MAAM,sBAAsB,CAAA;AAIzE,UAAU,KAAM,SAAQ,OAAO,CAAC,SAAS,CAAC;IACxC,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kFAAkF;IAClF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,wDAAwD;IACxD,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAA;IAChD,qDAAqD;IACrD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,gIAAgI;IAChI,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wDAAwD;IACxD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,6GAA6G;IAC7G,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B;AAsBD,KAAK,WAAW,GAAG;IACjB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAC;AAkNF,QAAA,MAAM,UAAU;;;;;iBAhPA,MAAM;kBAIL,YAAY;UAhBpB,MAAM;YAMJ,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM;SAE1C,MAAM;cAND,MAAM;YAQR,OAAO;6EAsPhB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -20,6 +20,9 @@ var WMenuItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
20
20
|
disabled: { type: Boolean },
|
|
21
21
|
href: { default: void 0 },
|
|
22
22
|
download: { default: void 0 },
|
|
23
|
+
replace: { type: Boolean },
|
|
24
|
+
target: { default: void 0 },
|
|
25
|
+
rel: { default: void 0 },
|
|
23
26
|
active: {
|
|
24
27
|
type: Boolean,
|
|
25
28
|
default: void 0
|
|
@@ -35,9 +38,16 @@ var WMenuItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
35
38
|
const semanticTypeTextMap = useSemanticTypeTextMap();
|
|
36
39
|
const toned = computed(() => props.semanticType !== SemanticType.PRIMARY && props.semanticType !== SemanticType.SECONDARY);
|
|
37
40
|
return (_ctx, _cache) => {
|
|
38
|
-
return openBlock(), createBlock(resolveDynamicComponent(__props.disabled || __props.loading ? "div" : __props.to ? WRouterLink_default : __props.href ? "a" : "button"), mergeProps(__props.disabled || __props.loading ? void 0 : __props.to ? {
|
|
41
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.disabled || __props.loading ? "div" : __props.to ? WRouterLink_default : __props.href ? "a" : "button"), mergeProps(__props.disabled || __props.loading ? void 0 : __props.to ? {
|
|
42
|
+
to: __props.to,
|
|
43
|
+
replace: __props.replace,
|
|
44
|
+
target: __props.target,
|
|
45
|
+
rel: __props.rel
|
|
46
|
+
} : __props.href ? {
|
|
39
47
|
href: __props.href,
|
|
40
|
-
download: __props.download
|
|
48
|
+
download: __props.download,
|
|
49
|
+
target: __props.target,
|
|
50
|
+
rel: __props.rel
|
|
41
51
|
} : void 0, {
|
|
42
52
|
class: ["w-ripple-trigger relative block w-full select-none items-center justify-start px-2 text-start outline-none first:pt-2 last:pb-2", {
|
|
43
53
|
[unref(semanticTypeTextMap)[__props.semanticType]]: toned.value && !__props.disabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"AA+KA;
|
|
1
|
+
{"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"AA+KA;AAilBA,OAAO,KAAK,EAAgB,SAAS,EAAC,MAAM,SAAS,CAAA;AAErD,OAAO,EAA0D,KAAK,KAAK,EAAqH,MAAM,KAAK,CAAA;AAmD3M,KAAK,WAAW,GAAG;IACjB,2EAA2E;IAC3E,OAAO,EAAE,MAAM,KAAK,EAAE,CAAA;CACvB,CAAC;AAsyBF,QAAA,MAAM,UAAU;2BAprBc,MAAM;yBAIR,MAAM;gCAyFG,OAAO,CAAC,IAAI,CAAC;oBAM7B,IAAI;iBAIL,MAAM,UAAU,OAAO;;;;;;;;;;;;;;;;;;;;;kFAilBzC,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { debounce, getHasScrollbar, getPropValue, throttle, unwrapSlots } from "../../utils/utils.js";
|
|
1
|
+
import { debounce, getHasScrollbar, getPropValue, getScrollParent, throttle, unwrapSlots } from "../../utils/utils.js";
|
|
2
2
|
import { useIsMobile } from "../../utils/mobile.js";
|
|
3
3
|
import { wTabItemListener, wTabItemUnlistener } from "./models/injection.js";
|
|
4
4
|
import { Notify } from "../../utils/Notify.js";
|
|
@@ -157,8 +157,16 @@ var WTabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
157
157
|
timeout = null;
|
|
158
158
|
}, 300);
|
|
159
159
|
};
|
|
160
|
+
const resetHorizontalScroll = () => {
|
|
161
|
+
const parent = containerRef.value && (getScrollParent(containerRef.value) ?? document.scrollingElement);
|
|
162
|
+
if (parent?.scrollLeft) parent.scrollTo({
|
|
163
|
+
left: 0,
|
|
164
|
+
behavior: "instant"
|
|
165
|
+
});
|
|
166
|
+
};
|
|
160
167
|
const setCurrent = (value) => {
|
|
161
168
|
if (current.value === value || !defaultSlotsKeys.value.includes(value)) return;
|
|
169
|
+
resetHorizontalScroll();
|
|
162
170
|
isDirect.value = defaultSlotsKeys.value.indexOf(current.value) < defaultSlotsKeys.value.indexOf(value);
|
|
163
171
|
current.value = value;
|
|
164
172
|
scrollToTabContent();
|
|
@@ -44,7 +44,7 @@ declare const __VLS_export: <Model, QueryParams, Field extends keyof NonNullable
|
|
|
44
44
|
initHasError?: boolean;
|
|
45
45
|
/** Never reports unsaved changes. */
|
|
46
46
|
noChanges?: boolean;
|
|
47
|
-
/** Returns the props of a confirm modal to show before a change is applied. The change is dropped on cancel; returning nothing applies it at once. */
|
|
47
|
+
/** Returns the props of a confirm modal to show before a change is applied. The change is dropped on cancel, along with the field's unsaved draft; returning nothing applies it at once. */
|
|
48
48
|
confimGetter?: (payload: ResultModel, data: Model) => ConfirmProps | Promise<ConfirmProps | undefined> | undefined;
|
|
49
49
|
} & ({
|
|
50
50
|
useQueryFn?: never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WUniform.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Uniform/WUniform.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WUniform.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Uniform/WUniform.vue"],"names":[],"mappings":"AAwTA,OAAO,KAAK,EAAC,mBAAmB,EAAE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AAE,YAAY,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,KAAK,EAAE;;;YAhB/D,oBAAoB,SAAS,WAAW,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,IAAI;YAE5E,SAAS,SAAS,UAAU,GAAG,IAAI;YAEnC,WAAW,MAAM,MAAM,GAAG,IAAI;YAE9B,YAAY,GAAG,IAAI;;EAqPrB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAA;CAAI,CAAC;wBACpE,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -79,7 +79,7 @@ var WUniform_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
79
79
|
if (partial) scopeModel.initFields(result, payload);
|
|
80
80
|
else scopeModel.initModel(result ?? payload);
|
|
81
81
|
}, (message, onlyChanged, fields) => scope?.showMessage(message, onlyChanged, fields), () => props.noInit, () => props.async, () => props.fullPayload) : void 0;
|
|
82
|
-
const scopeModel = useUniformModel(toRef(props, "modelValue"), toRef(props, "modelValueInit"), computed(() => props.field), props.useQueryFn, props.noParams ? void 0 : toRef(() => props.queryParams), props.initData, props.confimGetter, () => props.async, (value, fields) => emit("update:model-value", value, fields), () => void scopeSubmit?.submit(), () => emit("init-model"), slots.field ? (value) => scopeField?.validateFieldOnUpdate(value) : void 0);
|
|
82
|
+
const scopeModel = useUniformModel(toRef(props, "modelValue"), toRef(props, "modelValueInit"), computed(() => props.field), props.useQueryFn, props.noParams ? void 0 : toRef(() => props.queryParams), props.initData, props.confimGetter, () => props.async, (value, fields) => emit("update:model-value", value, fields), () => void scopeSubmit?.submit(), () => emit("init-model"), slots.field ? (value) => scopeField?.validateFieldOnUpdate(value) : void 0, slots.field ? () => scopeField?.cancelField() : void 0);
|
|
83
83
|
const scopeField = slots.field ? useUniformField(scopeModel.modelValue, scopeModel.modelValueInit, () => props.field, () => props.title, toRef(() => props.required), toRef(() => props.mandatory), props.validate, props.noChanges) : void 0;
|
|
84
84
|
const scopeForm = slots.default ? useUniformForm(() => props.field, () => props.title) : void 0;
|
|
85
85
|
const scope = scopeField ?? scopeForm;
|
|
@@ -14,6 +14,7 @@ export declare const useUniformField: <Model>(modelValue: Ref<Model>, modelValue
|
|
|
14
14
|
getInvalidatePayload: () => InvalidatePayload | undefined;
|
|
15
15
|
showMessage: (message: string, onlyChanged?: boolean) => void;
|
|
16
16
|
getFieldChanged: (field: string) => boolean;
|
|
17
|
+
cancelField: () => void;
|
|
17
18
|
};
|
|
18
19
|
export {};
|
|
19
20
|
//# sourceMappingURL=useUniformField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUniformField.d.ts","sourceRoot":"","sources":["../../../../../src/components/Uniform/use/useUniformField.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAE,eAAe,EAAC,MAAM,UAAU,CAAA;AAEhE,OAAO,EAAC,KAAK,GAAG,EAA0B,MAAM,KAAK,CAAA;AAQrD,KAAK,cAAc,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,GAAG,SAAS,CAAA;AAEjE,eAAO,MAAM,eAAe,GAAI,KAAK,EACnC,YAAY,GAAG,CAAC,KAAK,CAAC,EACtB,gBAAgB,GAAG,CAAC,KAAK,CAAC,EAC1B,aAAa,MAAM,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,EACvD,aAAa,MAAM,MAAM,GAAG,SAAS,EACrC,UAAU,G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@@ -80,6 +80,9 @@ var useUniformField = (modelValue, modelValueInit, fieldGetter, titleGetter, req
|
|
|
80
80
|
const showMessageField = (message, onlyChanged) => {
|
|
81
81
|
if (!onlyChanged || hasChanges?.value) showMessage(message);
|
|
82
82
|
};
|
|
83
|
+
const cancelField = () => {
|
|
84
|
+
for (const instance of Array.isArray(fieldRef.value) ? fieldRef.value : [fieldRef.value]) if (instance && "cancel" in instance && typeof instance.cancel === "function") instance.cancel();
|
|
85
|
+
};
|
|
83
86
|
const getFieldChanged = (field) => {
|
|
84
87
|
if (fieldGetter() === field) return hasChanges?.value ?? false;
|
|
85
88
|
return false;
|
|
@@ -96,7 +99,8 @@ var useUniformField = (modelValue, modelValueInit, fieldGetter, titleGetter, req
|
|
|
96
99
|
invalidate,
|
|
97
100
|
getInvalidatePayload,
|
|
98
101
|
showMessage: showMessageField,
|
|
99
|
-
getFieldChanged
|
|
102
|
+
getFieldChanged,
|
|
103
|
+
cancelField
|
|
100
104
|
};
|
|
101
105
|
};
|
|
102
106
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
export declare const useUniformModel: <ParentModel, Field extends keyof NonNullable<ParentModel>, InnerModel, QueryParams, ResultModel>(parentModel: Ref<ParentModel>, parentModelInit: Ref<ParentModel>, field: Ref<Field | undefined>, useQueryFn: UseQueryDefault<InnerModel, QueryParams> | undefined, queryParams: Ref<QueryParams | undefined> | undefined, initFn: ((value: InnerModel) => ResultModel) | undefined, confimGetter: ((payload: ResultModel, data: ParentModel) => ConfirmProps | Promise<ConfirmProps | undefined> | undefined) | undefined, asyncGetter: () => boolean, emitModelValue: (value: ResultModel, fields: (string | number)[]) => void, submit: () => void, emitInitModel: () => void, validateOnUpdate: ((newValue: ResultModel) => void) | undefined) => {
|
|
2
|
+
export declare const useUniformModel: <ParentModel, Field extends keyof NonNullable<ParentModel>, InnerModel, QueryParams, ResultModel>(parentModel: Ref<ParentModel>, parentModelInit: Ref<ParentModel>, field: Ref<Field | undefined>, useQueryFn: UseQueryDefault<InnerModel, QueryParams> | undefined, queryParams: Ref<QueryParams | undefined> | undefined, initFn: ((value: InnerModel) => ResultModel) | undefined, confimGetter: ((payload: ResultModel, data: ParentModel) => ConfirmProps | Promise<ConfirmProps | undefined> | undefined) | undefined, asyncGetter: () => boolean, emitModelValue: (value: ResultModel, fields: (string | number)[]) => void, submit: () => void, emitInitModel: () => void, validateOnUpdate: ((newValue: ResultModel) => void) | undefined, onConfirmCancel: (() => void) | undefined) => {
|
|
3
3
|
modelValue: Ref<ResultModel, ResultModel>;
|
|
4
4
|
modelValueInit: Ref<ParentModel, ParentModel> | ([ResultModel] extends [Ref<any, any>] ? import('@vue/shared').IfAny<ResultModel, Ref<ResultModel, ResultModel>, ResultModel> : Ref<import('vue').UnwrapRef<ResultModel>, ResultModel | import('vue').UnwrapRef<ResultModel>>) | import('vue').ComputedRef<NonNullable<ParentModel>[keyof ParentModel] | undefined>;
|
|
5
5
|
modelValueList: import('vue').ComputedRef<Record<string, ResultModel extends unknown[] ? ResultModel[number] : never>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUniformModel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Uniform/use/useUniformModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,GAAG,EAAyD,MAAM,KAAK,CAAA;AAmDpF,eAAO,MAAM,eAAe,GAAI,WAAW,EAAE,KAAK,SAAS,MAAM,WAAW,CAAC,WAAW,CAAC,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAC7H,aAAa,GAAG,CAAC,WAAW,CAAC,EAC7B,iBAAiB,GAAG,CAAC,WAAW,CAAC,EACjC,OAAO,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,EAC7B,YAAY,eAAe,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,SAAS,EAChE,aAAa,GAAG,CAAC,WAAW,GAAG,SAAS,CAAC,GAAG,SAAS,EACrD,QA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aAAa,MAAM,OAAO,EAC1B,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,IAAI,EACzE,QAAQ,MAAM,IAAI,EAClB,eAAe,MAAM,IAAI,EACzB,kBAAkB,CAAC,CAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC,GAAG,SAAS,EAC/D,iBAAiB,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS;;;;;;wBA2Ed,UAAU;wBAsBV,UAAU,GAAG,SAAS,WAAW,OAAO,CAAC,WAAW,CAAC;uBAgDtD,WAAW,SAAS,OAAO,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,KAAK,KAAG,IAAI;yBAMhE,WAAW,SAAS,OAAO,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,KAAK,KAAG,IAAI;iCAQ1D,WAAW,GAAG,SAAS,KAAG,OAAO,CAAC,IAAI,CAAC;sCAIlC,WAAW,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE;CAsClF,CAAA"}
|
|
@@ -29,7 +29,7 @@ var keepChanges = (next, current, init) => {
|
|
|
29
29
|
}
|
|
30
30
|
return current;
|
|
31
31
|
};
|
|
32
|
-
var useUniformModel = (parentModel, parentModelInit, field, useQueryFn, queryParams, initFn, confimGetter, asyncGetter, emitModelValue, submit, emitInitModel, validateOnUpdate) => {
|
|
32
|
+
var useUniformModel = (parentModel, parentModelInit, field, useQueryFn, queryParams, initFn, confimGetter, asyncGetter, emitModelValue, submit, emitInitModel, validateOnUpdate, onConfirmCancel) => {
|
|
33
33
|
const query = useQueryFn ? useQueryFn(queryParams, { enabled: computed(() => !parentModel.value) }) : void 0;
|
|
34
34
|
const getParentValue = () => field.value !== void 0 ? parentModel.value?.[field.value] : parentModel.value;
|
|
35
35
|
const innerModel = query ? computed(() => getParentValue() ?? query.data.value) : computed(getParentValue);
|
|
@@ -111,10 +111,13 @@ var useUniformModel = (parentModel, parentModelInit, field, useQueryFn, queryPar
|
|
|
111
111
|
let confirmProps = confimGetter?.(value, parentModel.value);
|
|
112
112
|
if (confirmProps instanceof Promise) confirmProps = await confirmProps;
|
|
113
113
|
if (!confirmProps) return emitValue(value);
|
|
114
|
-
return new Promise((resolve
|
|
114
|
+
return new Promise((resolve) => {
|
|
115
115
|
closeModal = Modal.addConfirm({
|
|
116
116
|
...confirmProps,
|
|
117
|
-
onCancel:
|
|
117
|
+
onCancel: () => {
|
|
118
|
+
onConfirmCancel?.();
|
|
119
|
+
resolve();
|
|
120
|
+
},
|
|
118
121
|
onAccept: () => resolve(emitValue(value))
|
|
119
122
|
}, () => closeModal = null);
|
|
120
123
|
});
|
package/docs/components/form.md
CHANGED
|
@@ -130,7 +130,7 @@ A form in a modal usually has its buttons in the modal's `actions` slot, outside
|
|
|
130
130
|
|
|
131
131
|
## Auto-save
|
|
132
132
|
|
|
133
|
-
`async` saves every change right away, one field at a time. The changed field shows a spinner while it is saved, and the rest of the form stays editable. `confimGetter` asks before a change is applied — the change is dropped
|
|
133
|
+
`async` saves every change right away, one field at a time. The changed field shows a spinner while it is saved, and the rest of the form stays editable. `confimGetter` asks before a change is applied — on cancel the change is dropped and the field shows the saved value again.
|
|
134
134
|
|
|
135
135
|
Only the changed fields are validated and sent. An invalid one shows its error at once and keeps its value without being saved, and changes to other fields are still saved. The value is sent once it is fixed. A change made while a save is in progress is sent when that save ends. When `apiMethod` returns nothing, the sent values become the initial ones for their fields. Fields that weren't sent keep their unsaved changes. `fullPayload` sends the whole model instead and waits until every field is valid.
|
|
136
136
|
|
|
@@ -364,7 +364,7 @@ import WUniform from 'eco-vue-js/dist/components/Uniform/WUniform.vue'
|
|
|
364
364
|
| `initHasValue` | `boolean \| null` | — | Overrides the `hasValue` state reported to the parent, e.g. while the fields are not mounted. |
|
|
365
365
|
| `initHasError` | `boolean` | — | Overrides the error state reported to the parent, e.g. while the fields are not mounted. |
|
|
366
366
|
| `noChanges` | `boolean` | — | Never reports unsaved changes. |
|
|
367
|
-
| `confimGetter` | `((payload: ResultModel, data: Model) => ConfirmProps \| Promise<ConfirmProps \| undefined> \| undefined)` | — | Returns the props of a confirm modal to show before a change is applied. The change is dropped on cancel; returning nothing applies it at once. |
|
|
367
|
+
| `confimGetter` | `((payload: ResultModel, data: Model) => ConfirmProps \| Promise<ConfirmProps \| undefined> \| undefined)` | — | Returns the props of a confirm modal to show before a change is applied. The change is dropped on cancel, along with the field's unsaved draft; returning nothing applies it at once. |
|
|
368
368
|
| `useQueryFn` | `UseQueryDefault<InnerModel, QueryParams> \| UseQueryDefault<InnerModel, undefined>` | — | Query that loads the model when `modelValue` is not given. The form shows skeletons until it loads. |
|
|
369
369
|
| `queryParams` | `QueryParams` | — | Params of `useQueryFn`. |
|
|
370
370
|
| `noParams` | `true` | — | `useQueryFn` takes no params. |
|
package/docs/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# eco-vue-js
|
|
2
2
|
|
|
3
|
-
> Vue 3 UI kit with Tailwind v4 — components, utilities, icons and recipes. These are the docs of version 0.26.
|
|
3
|
+
> Vue 3 UI kit with Tailwind v4 — components, utilities, icons and recipes. These are the docs of version 0.26.8, the one installed next to them. Start with Getting started and Conventions; each component page lists its props, events and slots with examples.
|
|
4
4
|
|
|
5
5
|
Release notes, for what changed between versions: https://github.com/rsmple/eco-vue-js/releases. The docs site, with live demos: https://rsmple.github.io/eco-vue-js/
|
|
6
6
|
|