eco-vue-js 0.11.5 → 0.11.7
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/WButtonDropdown.vue.d.ts +0 -2
- package/dist/components/Button/WButtonDropdown.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonDropdown.vue.js +2 -6
- package/dist/components/Button/WButtonMore.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonMore.vue.js +0 -2
- package/dist/components/Button/WButtonSelection.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonSelection.vue.js +0 -2
- package/dist/components/Button/types.d.ts +1 -1
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Dropdown/WDropdown.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/WDropdown.vue.js +29 -47
- package/dist/components/Dropdown/types.d.ts +0 -7
- package/dist/components/Dropdown/types.d.ts.map +1 -1
- package/dist/components/Dropdown/utils/DropdownStyle.d.ts +35 -75
- package/dist/components/Dropdown/utils/DropdownStyle.d.ts.map +1 -1
- package/dist/components/Dropdown/utils/DropdownStyle.js +97 -164
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts +0 -4
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts.map +1 -1
- package/dist/components/DropdownMenu/WDropdownMenu.vue.js +1 -5
- package/dist/components/FormAsync/WFormAsyncSelect.vue.js +0 -2
- package/dist/components/FormAsync/WFormAsyncSelectInfiniteSingle.vue.js +0 -2
- package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.js +0 -2
- package/dist/components/FormAsync/WFormAsyncSelectStringified.vue.js +0 -2
- package/dist/components/Input/WInput.vue.d.ts +10 -1
- package/dist/components/Input/WInput.vue.d.ts.map +1 -1
- package/dist/components/Input/WInput.vue.js +8 -1
- package/dist/components/Input/WInputDate.vue.d.ts +16 -6
- package/dist/components/Input/WInputDate.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputDate.vue.js +0 -2
- package/dist/components/Input/WInputOptions.vue.js +0 -2
- package/dist/components/Input/WInputSuggest.vue.d.ts +11 -3
- package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputSuggest.vue.js +21 -18
- package/dist/components/Input/components/ContentEditable.vue.d.ts +7 -0
- package/dist/components/Input/components/ContentEditable.vue.d.ts.map +1 -1
- package/dist/components/Input/components/ContentEditable.vue.js +52 -37
- package/dist/components/Input/types.d.ts +4 -0
- package/dist/components/Input/types.d.ts.map +1 -1
- package/dist/components/List/components/HeaderSettings.vue.d.ts.map +1 -1
- package/dist/components/List/components/HeaderSettings.vue.js +0 -2
- package/dist/components/List/components/HeaderSort.vue.d.ts.map +1 -1
- package/dist/components/List/components/HeaderSort.vue.js +0 -2
- package/dist/components/List/components/ListFilterSelect.vue.d.ts.map +1 -1
- package/dist/components/List/components/ListFilterSelect.vue.js +0 -2
- package/dist/components/Nav/WNavItemExpand.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItemExpand.vue.js +0 -2
- package/dist/components/Select/WSelect.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelect.vue.js +75 -74
- package/dist/components/Select/WSelectAsync.vue.d.ts +2 -2
- package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsync.vue.js +1 -2
- package/dist/components/Select/WSelectAsyncSingle.vue.js +0 -2
- package/dist/components/Select/WSelectSingle.vue.d.ts +5 -1
- package/dist/components/Select/WSelectSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectSingle.vue.js +8 -6
- package/dist/components/Select/WSelectStringified.vue.js +0 -2
- package/dist/components/Select/components/SelectAsyncList.vue.js +1 -1
- package/dist/components/Tooltip/WTooltipContainer.vue.d.ts +0 -2
- package/dist/components/Tooltip/WTooltipContainer.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/WTooltipContainer.vue.js +1 -3
- package/dist/utils/HorizontalAlign.d.ts +0 -1
- package/dist/utils/HorizontalAlign.d.ts.map +1 -1
- package/dist/utils/HorizontalAlign.js +0 -1
- package/package.json +1 -1
- package/tailwind-base/plugins/default.ts +14 -8
@@ -1,176 +1,109 @@
|
|
1
|
+
import { markRaw } from 'vue';
|
1
2
|
import { HorizontalAlign } from '../../../utils/HorizontalAlign.js';
|
2
3
|
|
3
|
-
const
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
isTop
|
27
|
-
origin
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
origin = "content-center" /* CENTER */;
|
38
|
-
styleGetter(parentRect) {
|
39
|
-
return Math.round(parentRect.top + parentRect.height / 2);
|
40
|
-
}
|
41
|
-
marginGetter() {
|
42
|
-
return 0;
|
43
|
-
}
|
44
|
-
heightStyleGetter() {
|
45
|
-
return void 0;
|
46
|
-
}
|
47
|
-
}
|
48
|
-
class TopOuter extends VerticalGetter {
|
49
|
-
isTop = true;
|
50
|
-
origin = "content-end" /* BOTTOM */;
|
51
|
-
styleGetter(parentRect) {
|
52
|
-
return Math.round(parentRect.top);
|
53
|
-
}
|
54
|
-
marginGetter(parentRect, maxHeight) {
|
55
|
-
return Math.round(parentRect.top - maxHeight - EDGE);
|
56
|
-
}
|
57
|
-
}
|
58
|
-
class TopInner extends VerticalGetter {
|
59
|
-
isTop = true;
|
60
|
-
origin = "content-end" /* BOTTOM */;
|
61
|
-
styleGetter(parentRect) {
|
62
|
-
return Math.round(parentRect.bottom);
|
63
|
-
}
|
64
|
-
marginGetter(parentRect, maxHeight) {
|
65
|
-
return Math.round(parentRect.bottom - maxHeight - EDGE);
|
66
|
-
}
|
67
|
-
}
|
4
|
+
const EDGE_FACTOR = 0.66;
|
5
|
+
const BOTTOM_EDGE = window.innerHeight * EDGE_FACTOR;
|
6
|
+
const BottomInner = markRaw({
|
7
|
+
isTop: false,
|
8
|
+
origin: "content-start" /* TOP */,
|
9
|
+
style: { maxHeight: "calc(100vh - var(--dropdown-y, 0px) - var(--w-bottom-inner, 0px) - var(--inner-margin, 0px))" },
|
10
|
+
y: (parentRect) => Math.round(parentRect.top),
|
11
|
+
isEdge: (parentRect) => parentRect.top > BOTTOM_EDGE
|
12
|
+
});
|
13
|
+
const BottomOuter = markRaw({
|
14
|
+
...BottomInner,
|
15
|
+
y: (parentRect) => Math.round(parentRect.bottom),
|
16
|
+
isEdge: (parentRect) => parentRect.bottom > BOTTOM_EDGE
|
17
|
+
});
|
18
|
+
const VerticalCenter = markRaw({
|
19
|
+
isTop: false,
|
20
|
+
origin: "content-center" /* CENTER */,
|
21
|
+
style: void 0,
|
22
|
+
y: (parentRect) => Math.round(parentRect.top + parentRect.height / 2),
|
23
|
+
isEdge: void 0
|
24
|
+
});
|
25
|
+
const TOP_EDGE = window.innerHeight * (1 - EDGE_FACTOR);
|
26
|
+
const TopOuter = markRaw({
|
27
|
+
isTop: true,
|
28
|
+
origin: "content-end" /* BOTTOM */,
|
29
|
+
style: { maxHeight: "calc(var(--dropdown-y, 0px) - var(--w-top-inner, 0px) - var(--inner-margin, 0px))" },
|
30
|
+
y: (parentRect) => Math.round(parentRect.top),
|
31
|
+
isEdge: (parentRect) => parentRect.top < TOP_EDGE
|
32
|
+
});
|
33
|
+
const TopInner = markRaw({
|
34
|
+
...TopOuter,
|
35
|
+
y: (parentRect) => Math.round(parentRect.bottom),
|
36
|
+
isEdge: (parentRect) => parentRect.bottom < TOP_EDGE
|
37
|
+
});
|
68
38
|
var OriginX = /* @__PURE__ */ ((OriginX2) => {
|
69
39
|
OriginX2["LEFT"] = "justify-start";
|
70
40
|
OriginX2["RIGHT"] = "justify-end";
|
71
41
|
OriginX2["CENTER"] = "justify-center";
|
72
42
|
return OriginX2;
|
73
43
|
})(OriginX || {});
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
}
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
verticalGetterOrder
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
}
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
verticalGetterOrder
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
widthStyleGetter() {
|
125
|
-
return void 0;
|
126
|
-
}
|
127
|
-
}
|
128
|
-
class LeftInner extends HorizontalGetter {
|
129
|
-
verticalGetterOrder = [new BottomOuter(), new TopOuter()];
|
130
|
-
origin = "justify-end" /* RIGHT */;
|
131
|
-
styleGetter(parentRect) {
|
132
|
-
return Math.round(parentRect.right);
|
133
|
-
}
|
134
|
-
marginGetter(parentRect, maxWidth) {
|
135
|
-
return Math.round(parentRect.right - maxWidth - EDGE);
|
136
|
-
}
|
137
|
-
}
|
138
|
-
class LeftOuter extends HorizontalGetter {
|
139
|
-
verticalGetterOrder = [new BottomInner(), new TopInner()];
|
140
|
-
origin = "justify-end" /* RIGHT */;
|
141
|
-
styleGetter(parentRect) {
|
142
|
-
return Math.round(parentRect.left);
|
143
|
-
}
|
144
|
-
marginGetter(parentRect, maxWidth) {
|
145
|
-
return Math.round(parentRect.left - maxWidth - EDGE);
|
146
|
-
}
|
147
|
-
}
|
148
|
-
class LeftCenter extends LeftOuter {
|
149
|
-
verticalGetterOrder = [new VerticalCenter()];
|
150
|
-
}
|
44
|
+
const RIGHT_EDGE = window.innerWidth * EDGE_FACTOR;
|
45
|
+
const RightOuter = markRaw({
|
46
|
+
verticalGetterOrder: [BottomInner, TopInner],
|
47
|
+
origin: "justify-start" /* LEFT */,
|
48
|
+
style: { maxWidth: "calc(100vw - var(--dropdown-x, 0px) - var(--w-right-inner, 0px))" },
|
49
|
+
x: (parentRect) => Math.round(parentRect.right),
|
50
|
+
isEdge: (parentRect) => parentRect.right > RIGHT_EDGE
|
51
|
+
});
|
52
|
+
const RightInner = markRaw({
|
53
|
+
...RightOuter,
|
54
|
+
verticalGetterOrder: [BottomOuter, TopOuter],
|
55
|
+
x: (parentRect) => Math.round(parentRect.left),
|
56
|
+
isEdge: (parentRect) => parentRect.left > RIGHT_EDGE
|
57
|
+
});
|
58
|
+
const RightCenter = markRaw({
|
59
|
+
...RightOuter,
|
60
|
+
verticalGetterOrder: [VerticalCenter]
|
61
|
+
});
|
62
|
+
const Fill = markRaw({
|
63
|
+
verticalGetterOrder: [BottomOuter, TopOuter],
|
64
|
+
origin: "justify-start" /* LEFT */,
|
65
|
+
style: { minWidth: "var(--dropdown-width)", maxWidth: "var(--dropdown-width)" },
|
66
|
+
styleGetter: (parentRect) => ({ "--dropdown-width": `${Math.round(parentRect.right - parentRect.left)}px` }),
|
67
|
+
x: (parentRect) => Math.round(parentRect.left),
|
68
|
+
isEdge: void 0
|
69
|
+
});
|
70
|
+
const Center = markRaw({
|
71
|
+
verticalGetterOrder: [BottomOuter, TopOuter],
|
72
|
+
origin: "justify-center" /* CENTER */,
|
73
|
+
x: (parentRect) => Math.round(parentRect.left + parentRect.width / 2),
|
74
|
+
isEdge: void 0
|
75
|
+
});
|
76
|
+
const LEFT_EDGE = window.innerWidth * (1 - EDGE_FACTOR);
|
77
|
+
const LeftInner = markRaw({
|
78
|
+
verticalGetterOrder: [BottomOuter, TopOuter],
|
79
|
+
origin: "justify-end" /* RIGHT */,
|
80
|
+
style: { maxWidth: "calc(var(--dropdown-x, 0px) - var(--w-left-inner, 0px))" },
|
81
|
+
x: (parentRect) => Math.round(parentRect.right),
|
82
|
+
isEdge: (parentRect) => parentRect.right < LEFT_EDGE
|
83
|
+
});
|
84
|
+
const LeftOuter = markRaw({
|
85
|
+
...LeftInner,
|
86
|
+
verticalGetterOrder: [BottomInner, TopInner],
|
87
|
+
x: (parentRect) => Math.round(parentRect.left),
|
88
|
+
isEdge: (parentRect) => parentRect.left < LEFT_EDGE
|
89
|
+
});
|
90
|
+
const LeftCenter = markRaw({
|
91
|
+
...LeftOuter,
|
92
|
+
verticalGetterOrder: [VerticalCenter]
|
93
|
+
});
|
151
94
|
const horizontalGetterOrderMap = {
|
152
|
-
[HorizontalAlign.RIGHT_OUTER]: [
|
153
|
-
[HorizontalAlign.RIGHT_CENTER]: [
|
154
|
-
[HorizontalAlign.RIGHT_INNER]: [
|
155
|
-
[HorizontalAlign.FILL]: [
|
156
|
-
[HorizontalAlign.
|
157
|
-
[HorizontalAlign.
|
158
|
-
[HorizontalAlign.
|
159
|
-
[HorizontalAlign.
|
160
|
-
[HorizontalAlign.LEFT_OUTER]: [new LeftOuter(), new RightOuter(), new LeftInner(), new RightInner()]
|
95
|
+
[HorizontalAlign.RIGHT_OUTER]: [RightOuter, LeftOuter],
|
96
|
+
[HorizontalAlign.RIGHT_CENTER]: [RightCenter, LeftCenter],
|
97
|
+
[HorizontalAlign.RIGHT_INNER]: [RightInner, LeftInner],
|
98
|
+
[HorizontalAlign.FILL]: [Fill],
|
99
|
+
[HorizontalAlign.CENTER]: [Center],
|
100
|
+
[HorizontalAlign.LEFT_INNER]: [LeftInner, RightInner],
|
101
|
+
[HorizontalAlign.LEFT_CENTER]: [LeftCenter, RightCenter],
|
102
|
+
[HorizontalAlign.LEFT_OUTER]: [LeftOuter, RightOuter]
|
161
103
|
};
|
162
|
-
function searchStyleGetter(order, parentRect
|
163
|
-
|
164
|
-
return order
|
165
|
-
const margin = item.marginGetter(parentRect, maxHeightOrWidth);
|
166
|
-
margins.push(margin);
|
167
|
-
return margin >= 0;
|
168
|
-
}) || order[margins.indexOf(Math.max(...margins))];
|
169
|
-
}
|
170
|
-
function _maxHeightOrWidthGetter(getter, parentRect, maxHeightOrWidth) {
|
171
|
-
const margin = getter.marginGetter(parentRect, maxHeightOrWidth);
|
172
|
-
if (margin > 0) return Math.round(maxHeightOrWidth);
|
173
|
-
else return Math.round(maxHeightOrWidth + margin);
|
104
|
+
function searchStyleGetter(order, parentRect) {
|
105
|
+
if (order[1] && order[0].isEdge?.(parentRect)) return order[1];
|
106
|
+
return order[0];
|
174
107
|
}
|
175
108
|
|
176
|
-
export {
|
109
|
+
export { LeftCenter, LeftInner, LeftOuter, OriginX, RightInner, RightOuter, horizontalGetterOrderMap, searchStyleGetter };
|
@@ -22,8 +22,6 @@ declare function __VLS_template(): {
|
|
22
22
|
$: import('vue').ComponentInternalInstance;
|
23
23
|
$data: {};
|
24
24
|
$props: {
|
25
|
-
readonly maxHeight: number;
|
26
|
-
readonly maxWidth: number;
|
27
25
|
readonly horizontalAlign: import('../../main').HorizontalAlign;
|
28
26
|
readonly top?: boolean | undefined;
|
29
27
|
readonly bottom?: boolean | undefined;
|
@@ -101,8 +99,6 @@ declare const __VLS_component: import('vue').DefineComponent<DropdownMenuProps,
|
|
101
99
|
$: import('vue').ComponentInternalInstance;
|
102
100
|
$data: {};
|
103
101
|
$props: {
|
104
|
-
readonly maxHeight: number;
|
105
|
-
readonly maxWidth: number;
|
106
102
|
readonly horizontalAlign: import('../../main').HorizontalAlign;
|
107
103
|
readonly top?: boolean | undefined;
|
108
104
|
readonly bottom?: boolean | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WDropdownMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/DropdownMenu/WDropdownMenu.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WDropdownMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/DropdownMenu/WDropdownMenu.vue"],"names":[],"mappings":"AA+BA;AAsEA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAC9C,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,6BAA6B,CAAA;AAEzE,OAAO,EAAC,KAAK,KAAK,EAAmC,MAAM,KAAK,CAAA;AAyChE,iBAAS,cAAc;WAyFT,OAAO,IAA6B;;iBA1GvC,CAAC,KAAK,EAAE;YAAC,KAAK,EAAE,OAAO,CAAC;YAAC,WAAW,EAAE,SAAS,CAAA;SAAC,KAAK,KAAK,EAAE;kBAC3D,CAAC,KAAK,EAAE,wBAAwB,KAAK,KAAK,EAAE;;iBAD7C,CAAC,KAAK,EAAE;YAAC,KAAK,EAAE,OAAO,CAAC;YAAC,WAAW,EAAE,SAAS,CAAA;SAAC,KAAK,KAAK,EAAE;kBAC3D,CAAC,KAAK,EAAE,wBAAwB,KAAK,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAsJw0iB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;EAxCr/iB;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAwB22iB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;OAfp/iB,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"}
|
@@ -7,8 +7,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
props: {
|
8
8
|
isOpen: { type: Boolean },
|
9
9
|
parentElement: {},
|
10
|
-
maxHeight: {},
|
11
|
-
maxWidth: {},
|
12
10
|
horizontalAlign: {},
|
13
11
|
top: { type: Boolean },
|
14
12
|
bottom: { type: Boolean },
|
@@ -40,8 +38,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
40
38
|
"parent-element": _ctx.parentElement ?? element.value,
|
41
39
|
"horizontal-align": _ctx.horizontalAlign,
|
42
40
|
"update-align": _ctx.updateAlign,
|
43
|
-
"max-height": _ctx.maxHeight,
|
44
|
-
"max-width": _ctx.maxWidth,
|
45
41
|
"emit-update": _ctx.emitUpdate,
|
46
42
|
style: normalizeStyle({ zIndex: unref(baseZIndex) + unref(BASE_ZINDEX_DROPDOWN) }),
|
47
43
|
top: _ctx.top,
|
@@ -51,7 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
51
47
|
renderSlot(_ctx.$slots, "content", normalizeProps(guardReactiveProps(defaultScope)))
|
52
48
|
]),
|
53
49
|
_: 3
|
54
|
-
}, 8, ["parent-element", "horizontal-align", "update-align", "
|
50
|
+
}, 8, ["parent-element", "horizontal-align", "update-align", "emit-update", "style", "top"])) : createCommentVNode("", true)
|
55
51
|
], 8, ["disabled"]))
|
56
52
|
], 64);
|
57
53
|
};
|
@@ -1,9 +1,15 @@
|
|
1
|
-
import { InputProps } from './types';
|
1
|
+
import { InputProps, WrapSelection } from './types';
|
2
2
|
declare const _default: <Type extends InputType = "text">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
3
3
|
props: __VLS_PrettifyLocal<any & InputProps<Type> & Partial<{}>> & import('vue').PublicProps;
|
4
4
|
expose(exposed: import('vue').ShallowUnwrapRef<{
|
5
5
|
focus: () => void;
|
6
6
|
blur: () => void;
|
7
|
+
wrapSelection: (value: WrapSelection) => void;
|
8
|
+
setCaret: (indexStart: number, indexEnd?: number) => void;
|
9
|
+
getSelectionOffsets: () => {
|
10
|
+
start: number;
|
11
|
+
end: number;
|
12
|
+
} | undefined;
|
7
13
|
fieldRef: import('vue').ComputedRef<HTMLDivElement | null | undefined>;
|
8
14
|
scrollToInput: () => void;
|
9
15
|
}>): void;
|
@@ -15,6 +21,9 @@ declare const _default: <Type extends InputType = "text">(__VLS_props: NonNullab
|
|
15
21
|
prefix?(_: {
|
16
22
|
modelValue: (Type extends "number" ? number : string) | undefined;
|
17
23
|
}): any;
|
24
|
+
toolbar?(_: {
|
25
|
+
wrapSelection: (value: WrapSelection) => void;
|
26
|
+
}): any;
|
18
27
|
before?(_: {
|
19
28
|
modelValue: (Type extends "number" ? number : string) | undefined;
|
20
29
|
}): any;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue"],"names":[],"mappings":"AAoOA;AAidA,OAAO,KAAK,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,SAAS,CAAA;yBAarC,IAAI,SAAS,SAAS,GAAG,MAAM,EAC/C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WA8qBO,mBAAmB,CAAC,oCAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;qBAjkB7B,IAAI;oBAOL,IAAI;+BA2DS,aAAa;+BACb,MAAM,aAAa,MAAM;;;;;;;MA8fc,GAAG,IAAI;WACpE,GAAG;;uBA1DgB,GAAG;0BACA,GAAG;wBACJ,GAAG;;;YAEH,GAAG;;mCA1cF,aAAa;YAycb,GAAG;;;YAEJ,GAAG;uBACJ,GAAG;wBACF,GAAG;uBACJ,GAAG;uBACH,GAAG;wBACF,GAAG;;;YA9mB1B,oBAAoB,SAAS,4CAAa,SAAS,GAAG,IAAI;YAC1D,gBAAgB,SAAS,aAAa,GAAG,IAAI;YAC7C,aAAa,SAAS,aAAa,GAAG,IAAI;YAC1C,eAAe,SAAS,aAAa,GAAG,IAAI;YAC5C,iBAAiB,SAAS,aAAa,GAAG,IAAI;YAC9C,oBAAoB,SAAS,aAAa,GAAG,IAAI;YACjD,aAAa,GAAG,IAAI;YACpB,OAAO,SAAS,UAAU,GAAG,SAAS,GAAG,IAAI;YAC7C,MAAM,SAAS,UAAU,GAAG,IAAI;YAChC,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,WAAW,SAAS,UAAU,GAAG,IAAI;YACrC,cAAc,SAAS,UAAU,GAAG,IAAI;YACxC,cAAc,SAAS,KAAK,GAAG,IAAI;YACnC,OAAO,GAAG,IAAI;;EAqpBhB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAzrBzE,wBAyrB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, useTemplateRef, ref, watch, nextTick, onMounted, onBeforeUnmount, computed, createBlock, openBlock, mergeProps, createSlots, withCtx, renderSlot, unref, createElementVNode, normalizeClass, createElementBlock, createCommentVNode, toDisplayString,
|
1
|
+
import { defineComponent, useTemplateRef, ref, watch, nextTick, onMounted, onBeforeUnmount, computed, createBlock, openBlock, mergeProps, createSlots, withCtx, renderSlot, unref, createElementVNode, normalizeClass, createElementBlock, createCommentVNode, toDisplayString, normalizeProps, guardReactiveProps, resolveDynamicComponent, withModifiers, withKeys } from 'vue';
|
2
2
|
import _sfc_main$1 from '../FieldWrapper/WFieldWrapper.vue.js';
|
3
3
|
import { useTabActiveListener } from '../Tabs/use/useTabActiveListener.js';
|
4
4
|
import { Notify } from '../../utils/Notify.js';
|
@@ -166,6 +166,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
166
166
|
if (!contentRef.value || !inputRef.value) return;
|
167
167
|
contentRef.value.scrollTo({ left: contentRef.value.scrollWidth - inputRef.value.offsetWidth - 40 });
|
168
168
|
};
|
169
|
+
const wrapSelection = (value) => inputRef.value && "wrapSelection" in inputRef.value ? inputRef.value.wrapSelection(value) : void 0;
|
170
|
+
const setCaret = (indexStart, indexEnd) => inputRef.value && "setCaret" in inputRef.value ? inputRef.value.setCaret(indexStart, indexEnd) : void 0;
|
171
|
+
const getSelectionOffsets = () => inputRef.value && "getSelectionOffsets" in inputRef.value ? inputRef.value.getSelectionOffsets() : void 0;
|
169
172
|
let timeout;
|
170
173
|
const autofocusDebounced = () => {
|
171
174
|
if (timeout) clearTimeout(timeout);
|
@@ -193,6 +196,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
193
196
|
__expose({
|
194
197
|
focus,
|
195
198
|
blur,
|
199
|
+
wrapSelection,
|
200
|
+
setCaret,
|
201
|
+
getSelectionOffsets,
|
196
202
|
fieldRef: computed(() => fieldWrapperRef.value?.fieldRef),
|
197
203
|
scrollToInput
|
198
204
|
});
|
@@ -255,6 +261,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
255
261
|
}]),
|
256
262
|
onClick: focus
|
257
263
|
}, [
|
264
|
+
renderSlot(_ctx.$slots, "toolbar", normalizeProps(guardReactiveProps({ wrapSelection }))),
|
258
265
|
_ctx.icon ? (openBlock(), createElementBlock("div", {
|
259
266
|
key: 0,
|
260
267
|
class: normalizeClass(["flex h-full w-[--w-input-height,2.75rem] select-none items-center justify-center", {
|
@@ -10,10 +10,16 @@ declare function __VLS_template(): {
|
|
10
10
|
refs: {
|
11
11
|
inputComponent: import('vue').ShallowUnwrapRef<{
|
12
12
|
focus: () => void;
|
13
|
-
blur: () => void;
|
13
|
+
blur: () => void | undefined;
|
14
14
|
close: () => void;
|
15
15
|
updateDropdown: () => void;
|
16
|
-
scrollToInput: () => void;
|
16
|
+
scrollToInput: () => void | undefined;
|
17
|
+
wrapSelection: (value: import('./types').WrapSelection) => void | undefined;
|
18
|
+
setCaret: (indexStart: number, indexEnd?: number) => void | undefined;
|
19
|
+
getSelectionOffsets: () => {
|
20
|
+
start: number;
|
21
|
+
end: number;
|
22
|
+
} | undefined;
|
17
23
|
}> | null;
|
18
24
|
};
|
19
25
|
rootEl: any;
|
@@ -26,20 +32,24 @@ declare const __VLS_component: import('vue').DefineComponent<InputDateProps, {},
|
|
26
32
|
}>, {
|
27
33
|
skeleton: boolean;
|
28
34
|
readonly: boolean;
|
29
|
-
maxHeight: number;
|
30
35
|
disabled: boolean;
|
31
36
|
modelValue: Date;
|
32
|
-
maxWidth: number;
|
33
37
|
horizontalAlign: HorizontalAlign;
|
34
38
|
minDate: Date;
|
35
39
|
maxDate: Date;
|
36
40
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
37
41
|
inputComponent: import('vue').ShallowUnwrapRef<{
|
38
42
|
focus: () => void;
|
39
|
-
blur: () => void;
|
43
|
+
blur: () => void | undefined;
|
40
44
|
close: () => void;
|
41
45
|
updateDropdown: () => void;
|
42
|
-
scrollToInput: () => void;
|
46
|
+
scrollToInput: () => void | undefined;
|
47
|
+
wrapSelection: (value: import('./types').WrapSelection) => void | undefined;
|
48
|
+
setCaret: (indexStart: number, indexEnd?: number) => void | undefined;
|
49
|
+
getSelectionOffsets: () => {
|
50
|
+
start: number;
|
51
|
+
end: number;
|
52
|
+
} | undefined;
|
43
53
|
}> | null;
|
44
54
|
}, any>;
|
45
55
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInputDate.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputDate.vue"],"names":[],"mappings":"AAiDA;AAmHA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAO3C,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAuEvD,iBAAS,cAAc;WA6HT,OAAO,IAA6B;;uBAbtB,GAAG;0BACA,GAAG;uBACN,GAAG
|
1
|
+
{"version":3,"file":"WInputDate.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputDate.vue"],"names":[],"mappings":"AAiDA;AAmHA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAO3C,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;AAuEvD,iBAAS,cAAc;WA6HT,OAAO,IAA6B;;uBAbtB,GAAG;0BACA,GAAG;uBACN,GAAG;;;;;;;;;;;;;;;;;;EAgB9B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;OASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
@@ -62,8 +62,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
62
62
|
savedText: {},
|
63
63
|
topText: { type: Boolean },
|
64
64
|
parentElement: {},
|
65
|
-
maxHeight: { default: 440 },
|
66
|
-
maxWidth: { default: 480 },
|
67
65
|
horizontalAlign: { default: HorizontalAlign.RIGHT_INNER },
|
68
66
|
top: { type: Boolean },
|
69
67
|
bottom: { type: Boolean }
|
@@ -1,19 +1,26 @@
|
|
1
|
-
import { InputSuggestProps } from './types';
|
1
|
+
import { InputSuggestProps, WrapSelection } from './types';
|
2
2
|
import { VNode } from 'vue';
|
3
3
|
declare const _default: <Type extends InputType = "text">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
4
4
|
props: __VLS_PrettifyLocal<any & InputSuggestProps<Type> & Partial<{}>> & import('vue').PublicProps;
|
5
5
|
expose(exposed: import('vue').ShallowUnwrapRef<{
|
6
6
|
focus: () => void;
|
7
|
-
blur: () => void;
|
7
|
+
blur: () => void | undefined;
|
8
8
|
close: () => void;
|
9
9
|
updateDropdown: () => void;
|
10
|
-
scrollToInput: () => void;
|
10
|
+
scrollToInput: () => void | undefined;
|
11
|
+
wrapSelection: (value: WrapSelection) => void | undefined;
|
12
|
+
setCaret: (indexStart: number, indexEnd?: number) => void | undefined;
|
13
|
+
getSelectionOffsets: () => {
|
14
|
+
start: number;
|
15
|
+
end: number;
|
16
|
+
} | undefined;
|
11
17
|
}>): void;
|
12
18
|
attrs: any;
|
13
19
|
slots: Readonly<{
|
14
20
|
title?: () => void;
|
15
21
|
bottom?: () => void;
|
16
22
|
subtitle?: () => void;
|
23
|
+
toolbar?: () => void;
|
17
24
|
prefix?: (props: {
|
18
25
|
unclickable?: boolean | null;
|
19
26
|
}) => void;
|
@@ -23,6 +30,7 @@ declare const _default: <Type extends InputType = "text">(__VLS_props: NonNullab
|
|
23
30
|
title?: () => void;
|
24
31
|
bottom?: () => void;
|
25
32
|
subtitle?: () => void;
|
33
|
+
toolbar?: () => void;
|
26
34
|
prefix?: (props: {
|
27
35
|
unclickable?: boolean | null;
|
28
36
|
}) => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInputSuggest.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputSuggest.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WInputSuggest.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputSuggest.vue"],"names":[],"mappings":"AAyHA;AAqOA,OAAO,KAAK,EAAC,iBAAiB,EAAE,aAAa,EAAC,MAAM,SAAS,CAAA;AAE7D,OAAO,EAAC,KAAK,KAAK,EAAgC,MAAM,KAAK,CAAA;yBAe5C,IAAI,SAAS,SAAS,GAAG,MAAM,EAC/C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WA4ZO,mBAAmB,CAAC,2CAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;;;;;+BA9VjB,aAAa;+BACb,MAAM,aAAa,MAAM;;;;;MA6Vc,GAAG,IAAI;WACpE,GAAG;;gBAnUD,MAAM,IAAI;iBACT,MAAM,IAAI;mBACR,MAAM,IAAI;kBACX,MAAM,IAAI;iBACX,CAAC,KAAK,EAAE;YAAC,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;SAAC,KAAK,IAAI;gBAChD,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;kBACpC,MAAM,KAAK,EAAE;;gBANf,MAAM,IAAI;iBACT,MAAM,IAAI;mBACR,MAAM,IAAI;kBACX,MAAM,IAAI;iBACX,CAAC,KAAK,EAAE;YAAC,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;SAAC,KAAK,IAAI;gBAChD,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;kBACpC,MAAM,KAAK,EAAE;;;YA9EnB,oBAAoB,mDAAsB,IAAI;YAC9C,gBAAgB,SAAS,aAAa,GAAG,IAAI;YAC7C,aAAa,SAAS,aAAa,GAAG,IAAI;YAC1C,eAAe,SAAS,aAAa,GAAG,IAAI;YAC5C,iBAAiB,SAAS,aAAa,GAAG,IAAI;YAC9C,MAAM,GAAG,IAAI;YACb,OAAO,GAAG,IAAI;YACd,aAAa,GAAG,IAAI;YACpB,OAAO,SAAS,UAAU,GAAG,SAAS,GAAG,IAAI;YAC7C,MAAM,SAAS,UAAU,GAAG,IAAI;;EAsYlC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAvazE,wBAua4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|