@ironsource/shared-ui 2.1.7-test.1 → 2.1.7-test.2
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/Chart.vue_vue_type_style_index_0_scoped_f06a4764_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_88d4532f_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_efc608f9_lang.css +1 -0
- package/ChartLoader.vue_vue_type_style_index_0_scoped_142c444a_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css +1 -0
- package/FieldMaxLength.vue_vue_type_style_index_0_scoped_47877984_lang.css +1 -0
- package/SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css +1 -0
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css +1 -0
- package/SortableList.vue_vue_type_style_index_0_scoped_21842d59_lang.css +1 -0
- package/TextAreaV4.vue_vue_type_style_index_0_scoped_4114ef89_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_052b1a0c_lang.css +1 -0
- package/components/chart/Chart.vue.js +7 -0
- package/components/chart/Chart.vue2.js +281 -0
- package/components/chart/ChartHeader.vue.js +7 -0
- package/components/chart/ChartHeader.vue2.js +51 -0
- package/components/chart/ChartLegend.vue.js +7 -0
- package/components/chart/ChartLegend.vue2.js +65 -0
- package/components/chart/ChartLoader.vue.js +25 -0
- package/components/chart/ChartLoader.vue2.js +0 -0
- package/components/chart/ChartTooltip.vue.js +7 -0
- package/components/chart/ChartTooltip.vue2.js +81 -0
- package/components/chart/composables/useChartValues.js +32 -0
- package/components/chart/composables/useTooltipPosition.js +22 -0
- package/components/chart/consts.js +21 -0
- package/components/chart/index.js +6 -0
- package/components/chart/plugins/HoverVerticalLine.js +12 -0
- package/components/chart/types.js +4 -0
- package/components/chart/utils/formatNumber.js +11 -0
- package/components/chart/utils/utils.js +12 -0
- package/components/input/v4/TextField.vue.d.ts +6 -1
- package/components/input/v4/TextField.vue.js +3 -3
- package/components/input/v4/TextField.vue2.js +91 -90
- package/components/input/v4/index.d.ts +20 -1
- package/components/shared/FieldMaxLength.vue.js +3 -3
- package/components/shared/FieldMaxLength.vue2.js +2 -2
- package/components/shared/commonTypes.d.ts +2 -0
- package/components/sortableList/SortableItem.vue.js +7 -0
- package/components/sortableList/SortableItem.vue2.js +140 -0
- package/components/sortableList/SortableItemLabel.vue.js +7 -0
- package/components/sortableList/SortableItemLabel.vue2.js +60 -0
- package/components/sortableList/SortableList.vue.js +7 -0
- package/components/sortableList/SortableList.vue2.js +120 -0
- package/components/sortableList/composables/useHoverEffect.js +19 -0
- package/components/sortableList/consts.js +4 -0
- package/components/sortableList/index.js +6 -0
- package/components/textArea/v4/TextAreaV4.vue.d.ts +6 -1
- package/components/textArea/v4/TextAreaV4.vue.js +3 -3
- package/components/textArea/v4/TextAreaV4.vue2.js +18 -12
- package/components/textArea/v4/index.d.ts +9 -0
- package/index.d.ts +651 -2
- package/index.js +131 -126
- package/package.json +9 -1
- package/testids/index.js +5 -4
- package/utils/search.js +4 -0
- package/FieldMaxLength.vue_vue_type_style_index_0_scoped_f3c4001a_lang.css +0 -1
- package/TextAreaV4.vue_vue_type_style_index_0_scoped_f3b2c01d_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_a6457440_lang.css +0 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import "../../SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css"; import { defineComponent as P, computed as x, watch as E, ref as $, openBlock as o, createElementBlock as a, normalizeClass as f, unref as e, withModifiers as c, createElementVNode as r, createVNode as h, createBlock as s, withCtx as b, createTextVNode as w, toDisplayString as F, createCommentVNode as u, renderSlot as z, mergeProps as S, normalizeProps as I, Fragment as R, renderList as D } from "vue";
|
|
2
|
+
import V from "../typography/v4/Typography.vue.js";
|
|
3
|
+
import m from "../icon/v4/IconV4.vue.js";
|
|
4
|
+
import L from "../icon/v4/IconFlag.vue.js";
|
|
5
|
+
import j from "./SortableItemLabel.vue.js";
|
|
6
|
+
import { useVirtualList as q } from "@vueuse/core";
|
|
7
|
+
import { matchString as A } from "../../utils/search.js";
|
|
8
|
+
import { useHoverEffect as G } from "./composables/useHoverEffect.js";
|
|
9
|
+
const J = { class: "draggable-handle" }, K = { class: "item__prefix" }, U = ["onClick"], W = { class: "item__text" }, X = ["onClick"], re = /* @__PURE__ */ P({
|
|
10
|
+
__name: "SortableItem",
|
|
11
|
+
props: {
|
|
12
|
+
item: null,
|
|
13
|
+
index: { default: null },
|
|
14
|
+
isOpen: { type: Boolean, default: !1 },
|
|
15
|
+
isSelected: { type: Boolean, default: !1 },
|
|
16
|
+
selectedChildId: { default: null },
|
|
17
|
+
searchQuery: { default: null },
|
|
18
|
+
searchHandler: { type: Function, default: null },
|
|
19
|
+
displayValue: null
|
|
20
|
+
},
|
|
21
|
+
emits: ["toggle", "select", "selectChild"],
|
|
22
|
+
setup(t, { emit: y }) {
|
|
23
|
+
const n = t, Q = () => {
|
|
24
|
+
y("toggle", !n.isOpen);
|
|
25
|
+
}, g = x(() => (n.item.children || []).filter(
|
|
26
|
+
(l) => n.searchHandler ? n.searchHandler(l, n.searchQuery) : A(l.displayText, n.searchQuery)
|
|
27
|
+
)), p = x(() => g.value.length > 0), B = (d) => d.id === n.selectedChildId, {
|
|
28
|
+
list: H,
|
|
29
|
+
containerProps: M,
|
|
30
|
+
wrapperProps: T,
|
|
31
|
+
scrollTo: N
|
|
32
|
+
} = q(g, {
|
|
33
|
+
itemHeight: 34
|
|
34
|
+
});
|
|
35
|
+
E(
|
|
36
|
+
() => n.searchQuery,
|
|
37
|
+
() => N(0)
|
|
38
|
+
);
|
|
39
|
+
const k = $(null), { handleMouseout: v, handleMouseover: C } = G(
|
|
40
|
+
k,
|
|
41
|
+
"sortable-item--hovered"
|
|
42
|
+
);
|
|
43
|
+
return (d, l) => (o(), a("div", {
|
|
44
|
+
ref_key: "itemRef",
|
|
45
|
+
ref: k,
|
|
46
|
+
class: f(["sortable-item", { "sortable-item--selected": t.isSelected }]),
|
|
47
|
+
onMouseover: l[1] || (l[1] = //@ts-ignore
|
|
48
|
+
(...i) => e(C) && e(C)(...i)),
|
|
49
|
+
onMouseout: l[2] || (l[2] = //@ts-ignore
|
|
50
|
+
(...i) => e(v) && e(v)(...i)),
|
|
51
|
+
onClick: l[3] || (l[3] = c((i) => y("select"), ["stop"]))
|
|
52
|
+
}, [
|
|
53
|
+
r("div", {
|
|
54
|
+
class: f(["item", { "drag-allowed": !t.item.isLocked && !t.searchQuery }])
|
|
55
|
+
}, [
|
|
56
|
+
r("div", J, [
|
|
57
|
+
h(e(m), {
|
|
58
|
+
name: "dots-six-vertical",
|
|
59
|
+
width: "20px",
|
|
60
|
+
type: "bold"
|
|
61
|
+
})
|
|
62
|
+
]),
|
|
63
|
+
r("div", K, [
|
|
64
|
+
t.item.isLocked ? (o(), s(e(m), {
|
|
65
|
+
key: 1,
|
|
66
|
+
class: "locked-icon",
|
|
67
|
+
name: "lock",
|
|
68
|
+
width: "16px"
|
|
69
|
+
})) : (o(), s(e(V), {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: "order-num",
|
|
72
|
+
variant: "subtitle2"
|
|
73
|
+
}, {
|
|
74
|
+
default: b(() => [
|
|
75
|
+
w(F(t.index + 1) + ". ", 1)
|
|
76
|
+
]),
|
|
77
|
+
_: 1
|
|
78
|
+
}))
|
|
79
|
+
]),
|
|
80
|
+
e(p) && !t.searchQuery ? (o(), a("div", {
|
|
81
|
+
key: 0,
|
|
82
|
+
class: "expand-icon",
|
|
83
|
+
onClick: c(Q, ["stop"])
|
|
84
|
+
}, [
|
|
85
|
+
t.isOpen ? (o(), s(e(m), {
|
|
86
|
+
key: 0,
|
|
87
|
+
name: "caret-down",
|
|
88
|
+
width: "16px"
|
|
89
|
+
})) : (o(), s(e(m), {
|
|
90
|
+
key: 1,
|
|
91
|
+
name: "caret-right",
|
|
92
|
+
width: "16px"
|
|
93
|
+
}))
|
|
94
|
+
], 8, U)) : u("", !0),
|
|
95
|
+
r("div", W, [
|
|
96
|
+
t.item.countryFlag ? (o(), s(e(L), {
|
|
97
|
+
key: 0,
|
|
98
|
+
class: "country-flag",
|
|
99
|
+
"country-code": t.item.countryFlag
|
|
100
|
+
}, null, 8, ["country-code"])) : u("", !0),
|
|
101
|
+
h(j, {
|
|
102
|
+
"display-value": t.displayValue,
|
|
103
|
+
item: t.item
|
|
104
|
+
}, null, 8, ["display-value", "item"])
|
|
105
|
+
]),
|
|
106
|
+
r("div", {
|
|
107
|
+
class: "item__menu",
|
|
108
|
+
onClick: l[0] || (l[0] = c(() => {
|
|
109
|
+
}, ["stop"]))
|
|
110
|
+
}, [
|
|
111
|
+
z(d.$slots, "menu", {}, void 0, !0)
|
|
112
|
+
])
|
|
113
|
+
], 2),
|
|
114
|
+
r("div", S(e(M), { class: "child-list" }), [
|
|
115
|
+
e(p) && t.isOpen ? (o(), a("ul", I(S({ key: 0 }, e(T))), [
|
|
116
|
+
(o(!0), a(R, null, D(e(H), ({ data: i, index: O }) => (o(), a("li", {
|
|
117
|
+
key: O,
|
|
118
|
+
class: f({ selected: B(i) }),
|
|
119
|
+
onClick: c((Y) => y("selectChild", i), ["stop"])
|
|
120
|
+
}, [
|
|
121
|
+
i.countryFlag ? (o(), s(e(L), {
|
|
122
|
+
key: 0,
|
|
123
|
+
class: "country-flag",
|
|
124
|
+
"country-code": i.countryFlag
|
|
125
|
+
}, null, 8, ["country-code"])) : u("", !0),
|
|
126
|
+
h(e(V), { variant: "body2" }, {
|
|
127
|
+
default: b(() => [
|
|
128
|
+
w(F(t.displayValue(i)), 1)
|
|
129
|
+
]),
|
|
130
|
+
_: 2
|
|
131
|
+
}, 1024)
|
|
132
|
+
], 10, X))), 128))
|
|
133
|
+
], 16)) : u("", !0)
|
|
134
|
+
], 16)
|
|
135
|
+
], 34));
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
export {
|
|
139
|
+
re as default
|
|
140
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./SortableItemLabel.vue2.js";
|
|
2
|
+
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-1386ae20"]]);
|
|
5
|
+
export {
|
|
6
|
+
s as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import "../../SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css"; import { defineComponent as m, openBlock as a, createBlock as u, unref as l, withCtx as t, createElementVNode as p, createElementBlock as c, Fragment as h, renderList as f, createVNode as i, createTextVNode as o, toDisplayString as r, normalizeClass as x } from "vue";
|
|
2
|
+
import n from "../typography/v4/Typography.vue.js";
|
|
3
|
+
import y from "../tooltip/v4/TooltipV4.vue.js";
|
|
4
|
+
const _ = { class: "tooltip-content" }, k = /* @__PURE__ */ m({
|
|
5
|
+
__name: "SortableItemLabel",
|
|
6
|
+
props: {
|
|
7
|
+
item: null,
|
|
8
|
+
displayValue: null
|
|
9
|
+
},
|
|
10
|
+
setup(e) {
|
|
11
|
+
return (b, T) => (a(), u(l(y), {
|
|
12
|
+
class: "item-label",
|
|
13
|
+
placement: "right",
|
|
14
|
+
disabled: !e.item.helpText
|
|
15
|
+
}, {
|
|
16
|
+
tooltip: t(() => [
|
|
17
|
+
p("div", _, [
|
|
18
|
+
(a(!0), c(h, null, f(e.item.helpText, (s, d) => (a(), c("div", {
|
|
19
|
+
key: d,
|
|
20
|
+
class: "help"
|
|
21
|
+
}, [
|
|
22
|
+
i(l(n), {
|
|
23
|
+
class: "help__title",
|
|
24
|
+
variant: "h5"
|
|
25
|
+
}, {
|
|
26
|
+
default: t(() => [
|
|
27
|
+
o(r(s.title), 1)
|
|
28
|
+
]),
|
|
29
|
+
_: 2
|
|
30
|
+
}, 1024),
|
|
31
|
+
i(l(n), {
|
|
32
|
+
class: "help__text",
|
|
33
|
+
variant: "body2"
|
|
34
|
+
}, {
|
|
35
|
+
default: t(() => [
|
|
36
|
+
o(r(s.text), 1)
|
|
37
|
+
]),
|
|
38
|
+
_: 2
|
|
39
|
+
}, 1024)
|
|
40
|
+
]))), 128))
|
|
41
|
+
])
|
|
42
|
+
]),
|
|
43
|
+
default: t(() => [
|
|
44
|
+
i(l(n), {
|
|
45
|
+
variant: "body2",
|
|
46
|
+
class: x({ "decorated-text": e.item.helpText?.length })
|
|
47
|
+
}, {
|
|
48
|
+
default: t(() => [
|
|
49
|
+
o(r(e.displayValue(e.item)), 1)
|
|
50
|
+
]),
|
|
51
|
+
_: 1
|
|
52
|
+
}, 8, ["class"])
|
|
53
|
+
]),
|
|
54
|
+
_: 1
|
|
55
|
+
}, 8, ["disabled"]));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
k as default
|
|
60
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import o from "./SortableList.vue2.js";
|
|
2
|
+
/* empty css */import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../SortableList.vue_vue_type_style_index_0_scoped_21842d59_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-21842d59"]]);
|
|
5
|
+
export {
|
|
6
|
+
p as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import "../../SortableList.vue_vue_type_style_index_0_scoped_21842d59_lang.css"; import { defineComponent as $, computed as p, ref as F, openBlock as c, createElementBlock as m, mergeProps as v, unref as t, createBlock as y, isRef as E, createCommentVNode as P, createVNode as w, withCtx as C, Fragment as x, renderList as B, renderSlot as D, createElementVNode as G } from "vue";
|
|
2
|
+
import { VueDraggable as U } from "vue-draggable-plus";
|
|
3
|
+
import R from "./SortableItem.vue.js";
|
|
4
|
+
import M from "../search/v4/SearchV4.vue.js";
|
|
5
|
+
import { useVModel as K } from "@vueuse/core";
|
|
6
|
+
import { matchString as q } from "../../utils/search.js";
|
|
7
|
+
import { useTestIdAttrs as Q } from "../../utils/testIds.js";
|
|
8
|
+
import { SortableListTestIdModifiers as f } from "../../testids/index.js";
|
|
9
|
+
import { DRAG_CURSOR_CSS_CLASS as H } from "./consts.js";
|
|
10
|
+
const le = /* @__PURE__ */ $({
|
|
11
|
+
__name: "SortableList",
|
|
12
|
+
props: {
|
|
13
|
+
items: { default: () => [] },
|
|
14
|
+
displayValue: { type: Function, default: (d) => d.displayText || d.toString() },
|
|
15
|
+
openId: { default: null },
|
|
16
|
+
selectedId: { default: null },
|
|
17
|
+
selectedChildId: { default: null },
|
|
18
|
+
search: { default: null },
|
|
19
|
+
showSearch: { type: Boolean, default: !1 },
|
|
20
|
+
searchPlaceholder: { default: "Search" },
|
|
21
|
+
searchHandler: { type: Function, default: null },
|
|
22
|
+
testId: { default: "" }
|
|
23
|
+
},
|
|
24
|
+
emits: ["update:items", "update:openId", "update:selectedId", "update:selectedChildId", "update:search", "clearSearch"],
|
|
25
|
+
setup(d, { emit: s }) {
|
|
26
|
+
const r = d, o = K(r, "search", s), S = p(() => !!o.value?.trim()), L = p(() => S.value ? r.items.filter((l) => {
|
|
27
|
+
const a = l.children || [], e = o.value;
|
|
28
|
+
return r.searchHandler ? r.searchHandler(l, e) : q(l.displayText, e) || // match parent item
|
|
29
|
+
a.some((n) => q(n.displayText, e));
|
|
30
|
+
}) : r.items), u = p({
|
|
31
|
+
get() {
|
|
32
|
+
return L.value.filter((l) => !l.isLocked);
|
|
33
|
+
},
|
|
34
|
+
set(l) {
|
|
35
|
+
s("update:items", [...l, ...V.value]);
|
|
36
|
+
}
|
|
37
|
+
}), V = p(
|
|
38
|
+
() => L.value.filter((l) => l.isLocked)
|
|
39
|
+
), I = F(!1), N = (l) => {
|
|
40
|
+
I.value = !0, setTimeout(() => l.target.classList.add(H), 50);
|
|
41
|
+
}, O = (l) => {
|
|
42
|
+
I.value = !1, l.target.classList.remove(H);
|
|
43
|
+
}, T = (l) => (S.value || l.id === r.openId) && !I.value, b = (l, a) => {
|
|
44
|
+
a ? s("update:openId", l.id) : s("update:openId", null);
|
|
45
|
+
}, i = (l) => l.id === r.selectedId, k = (l) => {
|
|
46
|
+
s("update:selectedId", l.id), s("update:selectedChildId", null);
|
|
47
|
+
}, A = (l, a) => {
|
|
48
|
+
s("update:selectedChildId", l.id), s("update:selectedId", a.id), s("update:openId", a.id);
|
|
49
|
+
}, g = Q(r.testId, f);
|
|
50
|
+
return (l, a) => (c(), m("div", v({ class: "sortable-list-container" }, t(g)[t(f).CONTAINER]), [
|
|
51
|
+
d.showSearch ? (c(), y(t(M), {
|
|
52
|
+
key: 0,
|
|
53
|
+
modelValue: t(o),
|
|
54
|
+
"onUpdate:modelValue": a[0] || (a[0] = (e) => E(o) ? o.value = e : null),
|
|
55
|
+
class: "list-search",
|
|
56
|
+
placeholder: d.searchPlaceholder,
|
|
57
|
+
"test-id": d.testId,
|
|
58
|
+
onOnClear: a[1] || (a[1] = (e) => s("clearSearch"))
|
|
59
|
+
}, null, 8, ["modelValue", "placeholder", "test-id"])) : P("", !0),
|
|
60
|
+
w(t(U), v({
|
|
61
|
+
modelValue: t(u),
|
|
62
|
+
"onUpdate:modelValue": a[2] || (a[2] = (e) => E(u) ? u.value = e : null),
|
|
63
|
+
class: "sortable-list",
|
|
64
|
+
filter: ".expand-icon",
|
|
65
|
+
animation: 150,
|
|
66
|
+
handle: ".draggable-handle",
|
|
67
|
+
disabled: t(S)
|
|
68
|
+
}, t(g)[t(f).DRAGGABLE_LIST], {
|
|
69
|
+
onStart: N,
|
|
70
|
+
onEnd: O
|
|
71
|
+
}), {
|
|
72
|
+
default: C(() => [
|
|
73
|
+
(c(!0), m(x, null, B(t(u), (e, n) => (c(), y(R, {
|
|
74
|
+
key: e.id,
|
|
75
|
+
item: e,
|
|
76
|
+
index: n,
|
|
77
|
+
"is-open": T(e),
|
|
78
|
+
"is-selected": i(e),
|
|
79
|
+
"selected-child-id": i(e) ? d.selectedChildId : null,
|
|
80
|
+
"display-value": d.displayValue,
|
|
81
|
+
"search-query": t(o),
|
|
82
|
+
"search-handler": d.searchHandler,
|
|
83
|
+
onToggle: (h) => b(e, h),
|
|
84
|
+
onSelect: (h) => k(e),
|
|
85
|
+
onSelectChild: (h) => A(h, e)
|
|
86
|
+
}, {
|
|
87
|
+
menu: C(() => [
|
|
88
|
+
D(l.$slots, "menu", { item: e }, void 0, !0)
|
|
89
|
+
]),
|
|
90
|
+
_: 2
|
|
91
|
+
}, 1032, ["item", "index", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "search-handler", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
92
|
+
]),
|
|
93
|
+
_: 3
|
|
94
|
+
}, 16, ["modelValue", "disabled"]),
|
|
95
|
+
G("div", v({ class: "locked-list" }, t(g)[t(f).LOCKED_LIST]), [
|
|
96
|
+
(c(!0), m(x, null, B(t(V), (e) => (c(), y(R, {
|
|
97
|
+
key: e.id,
|
|
98
|
+
item: e,
|
|
99
|
+
"is-open": T(e),
|
|
100
|
+
"is-selected": i(e),
|
|
101
|
+
"selected-child-id": i(e) ? d.selectedChildId : null,
|
|
102
|
+
"display-value": d.displayValue,
|
|
103
|
+
"search-query": t(o),
|
|
104
|
+
"on-search": d.searchHandler,
|
|
105
|
+
onToggle: (n) => b(e, n),
|
|
106
|
+
onSelect: (n) => k(e),
|
|
107
|
+
onSelectChild: (n) => A(n, e)
|
|
108
|
+
}, {
|
|
109
|
+
menu: C(() => [
|
|
110
|
+
D(l.$slots, "menu", { item: e }, void 0, !0)
|
|
111
|
+
]),
|
|
112
|
+
_: 2
|
|
113
|
+
}, 1032, ["item", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "on-search", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
114
|
+
], 16)
|
|
115
|
+
], 16));
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
export {
|
|
119
|
+
le as default
|
|
120
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { computed as t } from "vue";
|
|
2
|
+
const d = (e, r) => {
|
|
3
|
+
const s = t(() => e.value ? Array.from(e.value.parentElement?.children || []) : []);
|
|
4
|
+
return {
|
|
5
|
+
handleMouseover: (n) => {
|
|
6
|
+
s.value.forEach(
|
|
7
|
+
(o) => o.classList.remove(r)
|
|
8
|
+
), s.value.some(
|
|
9
|
+
(o) => o.classList.contains("sortable-chosen")
|
|
10
|
+
) || n.currentTarget.classList.add(r);
|
|
11
|
+
},
|
|
12
|
+
handleMouseout: () => {
|
|
13
|
+
e.value.classList.remove(r);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
d as useHoverEffect
|
|
19
|
+
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { TooltipPositions } from '@/components/tooltip/common/Tooltip.types';
|
|
2
|
-
import { FeedbackVariant } from '@/components/shared/commonTypes';
|
|
2
|
+
import { FeedbackVariant, MaxLengthCounterPositions } from '@/components/shared/commonTypes';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
4
4
|
modelValue?: string;
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
label?: string;
|
|
8
8
|
maxLength?: number;
|
|
9
|
+
maxLengthCounterPosition?: MaxLengthCounterPositions;
|
|
9
10
|
mandatory?: boolean;
|
|
10
11
|
hoverHelpText?: string;
|
|
11
12
|
hoverHelpTextPlacement?: TooltipPositions;
|
|
@@ -21,6 +22,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
21
22
|
disabled: boolean;
|
|
22
23
|
label: string;
|
|
23
24
|
maxLength: any;
|
|
25
|
+
maxLengthCounterPosition: string;
|
|
24
26
|
mandatory: boolean;
|
|
25
27
|
hoverHelpText: string;
|
|
26
28
|
hoverHelpTextPlacement: string;
|
|
@@ -38,6 +40,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
38
40
|
disabled?: boolean;
|
|
39
41
|
label?: string;
|
|
40
42
|
maxLength?: number;
|
|
43
|
+
maxLengthCounterPosition?: MaxLengthCounterPositions;
|
|
41
44
|
mandatory?: boolean;
|
|
42
45
|
hoverHelpText?: string;
|
|
43
46
|
hoverHelpTextPlacement?: TooltipPositions;
|
|
@@ -53,6 +56,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
53
56
|
disabled: boolean;
|
|
54
57
|
label: string;
|
|
55
58
|
maxLength: any;
|
|
59
|
+
maxLengthCounterPosition: string;
|
|
56
60
|
mandatory: boolean;
|
|
57
61
|
hoverHelpText: string;
|
|
58
62
|
hoverHelpTextPlacement: string;
|
|
@@ -76,6 +80,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
76
80
|
maxLength: number;
|
|
77
81
|
modelValue: string;
|
|
78
82
|
placeholder: string;
|
|
83
|
+
maxLengthCounterPosition: MaxLengthCounterPositions;
|
|
79
84
|
feedbackText: string;
|
|
80
85
|
feedbackVariant: FeedbackVariant;
|
|
81
86
|
showFeedbackTextIcon: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./TextAreaV4.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../TextAreaV4.
|
|
4
|
-
const
|
|
3
|
+
// import "../../../TextAreaV4.vue_vue_type_style_index_0_scoped_4114ef89_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-4114ef89"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../../../TextAreaV4.
|
|
1
|
+
import "../../../TextAreaV4.vue_vue_type_style_index_0_scoped_4114ef89_lang.css"; import { defineComponent as f, computed as b, openBlock as t, createElementBlock as r, mergeProps as c, unref as a, createBlock as d, createCommentVNode as l, createElementVNode as g } from "vue";
|
|
2
2
|
import v from "../../shared/FieldLabel.vue.js";
|
|
3
3
|
import k from "../../shared/FieldMaxLength.vue.js";
|
|
4
4
|
import T from "../../shared/FieldHelpText.vue.js";
|
|
5
|
-
import { TextAreaTestIdModifiers as
|
|
5
|
+
import { TextAreaTestIdModifiers as i } from "../../../testids/index.js";
|
|
6
6
|
import { useTestIdAttrs as V } from "../../../utils/testIds.js";
|
|
7
7
|
const y = ["value", "placeholder", "disabled", "maxlength"], I = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "footer"
|
|
10
|
-
}, w = /* @__PURE__ */
|
|
10
|
+
}, w = /* @__PURE__ */ f({
|
|
11
11
|
__name: "TextAreaV4",
|
|
12
12
|
props: {
|
|
13
13
|
modelValue: { default: "" },
|
|
@@ -15,6 +15,7 @@ const y = ["value", "placeholder", "disabled", "maxlength"], I = {
|
|
|
15
15
|
disabled: { type: Boolean, default: !1 },
|
|
16
16
|
label: { default: "" },
|
|
17
17
|
maxLength: { default: null },
|
|
18
|
+
maxLengthCounterPosition: { default: "inside" },
|
|
18
19
|
mandatory: { type: Boolean, default: !1 },
|
|
19
20
|
hoverHelpText: { default: "" },
|
|
20
21
|
hoverHelpTextPlacement: { default: "top" },
|
|
@@ -27,11 +28,15 @@ const y = ["value", "placeholder", "disabled", "maxlength"], I = {
|
|
|
27
28
|
},
|
|
28
29
|
emits: ["update:modelValue"],
|
|
29
30
|
setup(e, { emit: h }) {
|
|
30
|
-
const
|
|
31
|
-
h("update:modelValue",
|
|
32
|
-
}, x = b(() => (
|
|
33
|
-
return (
|
|
34
|
-
|
|
31
|
+
const u = e, m = (n) => {
|
|
32
|
+
h("update:modelValue", n.target.value);
|
|
33
|
+
}, x = b(() => (u.modelValue || "").length), o = V(u.testId, i);
|
|
34
|
+
return (n, s) => (t(), r("div", c({
|
|
35
|
+
class: ["textarea-field", {
|
|
36
|
+
"textarea-field--counter-inside": e.maxLength && e.maxLengthCounterPosition === "inside"
|
|
37
|
+
}]
|
|
38
|
+
}, a(o)[a(i).WRAPPER]), [
|
|
39
|
+
e.label ? (t(), d(v, {
|
|
35
40
|
key: 0,
|
|
36
41
|
class: "textarea-label",
|
|
37
42
|
label: e.label,
|
|
@@ -51,17 +56,18 @@ const y = ["value", "placeholder", "disabled", "maxlength"], I = {
|
|
|
51
56
|
placeholder: e.placeholder,
|
|
52
57
|
disabled: e.disabled,
|
|
53
58
|
maxlength: e.maxLength
|
|
54
|
-
}, a(
|
|
55
|
-
e.feedbackText || e.maxLength ? (t(),
|
|
56
|
-
e.feedbackText ? (t(),
|
|
59
|
+
}, a(o)[a(i).FIELD], { onInput: m }), null, 16, y),
|
|
60
|
+
e.feedbackText || e.maxLength ? (t(), r("div", I, [
|
|
61
|
+
e.feedbackText ? (t(), d(T, {
|
|
57
62
|
key: 0,
|
|
58
63
|
text: e.feedbackText,
|
|
59
64
|
variant: e.feedbackVariant,
|
|
60
65
|
"show-icon": e.showFeedbackTextIcon,
|
|
61
66
|
"test-id": e.testId
|
|
62
67
|
}, null, 8, ["text", "variant", "show-icon", "test-id"])) : l("", !0),
|
|
63
|
-
e.maxLength ? (t(),
|
|
68
|
+
e.maxLength ? (t(), d(k, {
|
|
64
69
|
key: 1,
|
|
70
|
+
class: "max-length-counter",
|
|
65
71
|
"current-length": a(x),
|
|
66
72
|
"max-length": e.maxLength
|
|
67
73
|
}, null, 8, ["current-length", "max-length"])) : l("", !0)
|
|
@@ -43,6 +43,10 @@ declare const TextAreaTypes: () => import("vue").DefineComponent<{
|
|
|
43
43
|
type: import("vue").PropType<string>;
|
|
44
44
|
default: string;
|
|
45
45
|
};
|
|
46
|
+
maxLengthCounterPosition: {
|
|
47
|
+
type: import("vue").PropType<"inside" | "outside">;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
46
50
|
feedbackText: {
|
|
47
51
|
type: import("vue").PropType<string>;
|
|
48
52
|
default: string;
|
|
@@ -102,6 +106,10 @@ declare const TextAreaTypes: () => import("vue").DefineComponent<{
|
|
|
102
106
|
type: import("vue").PropType<string>;
|
|
103
107
|
default: string;
|
|
104
108
|
};
|
|
109
|
+
maxLengthCounterPosition: {
|
|
110
|
+
type: import("vue").PropType<"inside" | "outside">;
|
|
111
|
+
default: string;
|
|
112
|
+
};
|
|
105
113
|
feedbackText: {
|
|
106
114
|
type: import("vue").PropType<string>;
|
|
107
115
|
default: string;
|
|
@@ -128,6 +136,7 @@ declare const TextAreaTypes: () => import("vue").DefineComponent<{
|
|
|
128
136
|
maxLength: number;
|
|
129
137
|
modelValue: string;
|
|
130
138
|
placeholder: string;
|
|
139
|
+
maxLengthCounterPosition: "inside" | "outside";
|
|
131
140
|
feedbackText: string;
|
|
132
141
|
feedbackVariant: "success" | "warning" | "error";
|
|
133
142
|
showFeedbackTextIcon: boolean;
|