@ironsource/shared-ui 2.1.11-test.27 → 2.1.11-test.44
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/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_04b9d6b3_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_a1c626cd_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_6744325c_lang.css +1 -0
- package/CheckboxV4.vue_vue_type_style_index_0_scoped_af4ae3c3_lang.css +1 -0
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e43ac1c9_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_8f96cf5a_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_26488faf_lang.css +1 -0
- package/DataGridMenu.vue_vue_type_style_index_0_scoped_ddfaf207_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_75002075_lang.css +1 -0
- package/EmptyStateV4.vue_vue_type_style_index_0_scoped_18728498_lang.css +1 -0
- package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_383011d3_lang.css +1 -0
- package/FormCard.vue_vue_type_style_index_0_scoped_86feae7b_lang.css +1 -0
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_89fe8aa1_lang.css +1 -0
- package/SortableItem.vue_vue_type_style_index_0_scoped_7cb676f1_lang.css +1 -0
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css +1 -0
- package/SortableList.vue_vue_type_style_index_0_scoped_156c01ca_lang.css +1 -0
- package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_a898b632_lang.css +1 -0
- package/Typography.vue_vue_type_style_index_0_scoped_a14013a5_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +11 -3
- package/components/chart/Chart.vue.js +2 -2
- package/components/chart/Chart.vue2.js +108 -96
- package/components/chart/ChartHeader.vue.d.ts +13 -6
- package/components/chart/ChartHeader.vue.js +2 -2
- package/components/chart/ChartHeader.vue2.js +32 -29
- package/components/chart/ChartLegend.vue.d.ts +5 -0
- package/components/chart/ChartLegend.vue.js +3 -3
- package/components/chart/ChartLegend.vue2.js +99 -49
- package/components/chart/ChartTooltip.vue.d.ts +4 -5
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +64 -43
- package/components/chart/index.d.ts +36 -16
- package/components/chart/mockData.d.ts +15 -2
- package/components/chart/types.d.ts +15 -1
- package/components/chart/utils/utils.js +5 -5
- package/components/checkbox/v4/CheckboxV4.vue.js +3 -3
- package/components/checkbox/v4/CheckboxV4.vue2.js +2 -2
- package/components/dialog/v4/DialogV4.vue.d.ts +15 -0
- package/components/dialog/v4/DialogV4.vue.js +3 -3
- package/components/dialog/v4/DialogV4.vue2.js +80 -73
- package/components/dialog/v4/index.d.ts +58 -1
- package/components/dropdown/common/Dropdown.common.js +36 -34
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +15 -0
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +42 -20
- package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +55 -40
- package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +20 -0
- package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +136 -97
- package/components/dropdown/v4/DropdownV4.vue.d.ts +2 -0
- package/components/dropdown/v4/DropdownV4.vue.js +2 -2
- package/components/dropdown/v4/DropdownV4.vue2.js +7 -7
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +5 -0
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +165 -158
- package/components/dropdown/v4/index.d.ts +67 -2
- package/components/emptyState/v4/EmptyStateV4.vue.js +3 -3
- package/components/emptyState/v4/EmptyStateV4.vue2.js +1 -1
- package/components/filtersPanel/v4/FiltersPanelV4.vue.js +3 -3
- package/components/filtersPanel/v4/FiltersPanelV4.vue2.js +1 -1
- package/components/forms/FormCard.vue.js +3 -3
- package/components/forms/FormCard.vue2.js +1 -1
- package/components/snackbar/v4/SnackbarV4.vue.d.ts +7 -116
- package/components/snackbar/v4/SnackbarV4.vue.js +5 -5
- package/components/snackbar/v4/SnackbarV4.vue2.js +62 -60
- package/components/sortableList/SortableItem.vue.js +3 -3
- package/components/sortableList/SortableItem.vue2.js +57 -56
- package/components/sortableList/SortableItemLabel.vue.js +3 -3
- package/components/sortableList/SortableItemLabel.vue2.js +20 -23
- package/components/sortableList/SortableList.vue.js +3 -3
- package/components/sortableList/SortableList.vue2.js +82 -76
- package/components/table/common/Table.common.d.ts +1 -1
- package/components/table/common/Table.common.js +78 -70
- package/components/table/common/consts.d.ts +4 -0
- package/components/table/common/consts.js +7 -0
- package/components/table/v4/DataGrid.vue.d.ts +10 -5
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +173 -171
- package/components/table/v4/DataGridMenu.vue.js +5 -5
- package/components/table/v4/DataGridMenu.vue2.js +1 -1
- package/components/table/v4/index.d.ts +39 -20
- package/components/table-cells/common/Editable.common.js +24 -19
- package/components/typography/v4/Typography.vue.js +3 -3
- package/components/typography/v4/Typography.vue2.js +24 -18
- package/index.d.ts +386 -47
- package/index.js +1 -1
- package/package.json +1 -1
- package/style/v4/grid.css +1 -1
- package/style/v4/grid.css.map +1 -1
- package/style/v4/spacings.scss +1 -0
- package/testids/index.d.ts +1 -0
- package/testids/index.js +13 -13
- package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_f9a13e27_lang.css +0 -1
- package/Chart.vue_vue_type_style_index_0_scoped_8f471697_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_4c37736e_lang.css +0 -1
- package/ChartLegend.vue_vue_type_style_index_0_scoped_c0f71a49_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css +0 -1
- package/CheckboxV4.vue_vue_type_style_index_0_scoped_8e5b619a_lang.css +0 -1
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_039dd922_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_2aee12ad_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_2406226b_lang.css +0 -1
- package/DataGridMenu.vue_vue_type_style_index_0_scoped_a6e4672f_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_09c488cf_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_6466948d_lang.css +0 -1
- package/EmptyStateV4.vue_vue_type_style_index_0_scoped_24001caa_lang.css +0 -1
- package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_111b200a_lang.css +0 -1
- package/FormCard.vue_vue_type_style_index_0_scoped_c7965a69_lang.css +0 -1
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_49c5ccea_lang.css +0 -1
- package/SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css +0 -1
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css +0 -1
- package/SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_bdfb0aef_lang.css +0 -1
- package/Typography.vue_vue_type_style_index_0_scoped_992962bc_lang.css +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "../../SortableItem.
|
|
1
|
+
import "../../SortableItem.vue_vue_type_style_index_0_scoped_7cb676f1_lang.css"; import { defineComponent as P, useSlots as E, computed as x, watch as $, ref as I, openBlock as l, createElementBlock as i, normalizeClass as f, unref as e, withModifiers as u, createElementVNode as a, createVNode as h, createBlock as r, withCtx as b, createTextVNode as S, toDisplayString as w, createCommentVNode as d, renderSlot as R, mergeProps as F, normalizeProps as D, Fragment as j, renderList as q } from "vue";
|
|
2
2
|
import V from "../typography/v4/Typography.vue.js";
|
|
3
3
|
import m from "../icon/v4/IconV4.vue.js";
|
|
4
4
|
import L from "../icon/v4/IconFlag.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import { useVirtualList as
|
|
7
|
-
import { matchString as
|
|
8
|
-
import { useHoverEffect as
|
|
9
|
-
const
|
|
5
|
+
import A from "./SortableItemLabel.vue.js";
|
|
6
|
+
import { useVirtualList as G } from "@vueuse/core";
|
|
7
|
+
import { matchString as J } from "../../utils/search.js";
|
|
8
|
+
import { useHoverEffect as K } from "./composables/useHoverEffect.js";
|
|
9
|
+
const U = { class: "draggable-handle" }, W = { class: "item__prefix" }, X = ["onClick"], Y = { class: "item__text" }, Z = ["onClick"], ae = /* @__PURE__ */ P({
|
|
10
10
|
__name: "SortableItem",
|
|
11
11
|
props: {
|
|
12
12
|
item: null,
|
|
@@ -20,121 +20,122 @@ const J = { class: "draggable-handle" }, K = { class: "item__prefix" }, U = ["on
|
|
|
20
20
|
},
|
|
21
21
|
emits: ["toggle", "select", "selectChild"],
|
|
22
22
|
setup(t, { emit: y }) {
|
|
23
|
-
const n = t, Q = () => {
|
|
23
|
+
const n = t, Q = E(), B = () => {
|
|
24
24
|
y("toggle", !n.isOpen);
|
|
25
25
|
}, g = x(() => (n.item.children || []).filter(
|
|
26
|
-
(
|
|
27
|
-
)),
|
|
28
|
-
list:
|
|
29
|
-
containerProps:
|
|
30
|
-
wrapperProps:
|
|
26
|
+
(o) => n.searchHandler ? n.searchHandler(o, n.searchQuery) : J(o.displayText, n.searchQuery)
|
|
27
|
+
)), k = x(() => g.value.length > 0), H = (c) => c.id === n.selectedChildId, {
|
|
28
|
+
list: M,
|
|
29
|
+
containerProps: T,
|
|
30
|
+
wrapperProps: z,
|
|
31
31
|
scrollTo: N
|
|
32
|
-
} =
|
|
32
|
+
} = G(g, {
|
|
33
33
|
itemHeight: 34
|
|
34
34
|
});
|
|
35
|
-
|
|
35
|
+
$(
|
|
36
36
|
() => n.searchQuery,
|
|
37
37
|
() => N(0)
|
|
38
38
|
);
|
|
39
|
-
const
|
|
40
|
-
|
|
39
|
+
const p = I(null), { handleMouseout: v, handleMouseover: C } = K(
|
|
40
|
+
p,
|
|
41
41
|
"sortable-item--hovered"
|
|
42
42
|
);
|
|
43
|
-
return (
|
|
43
|
+
return (c, o) => (l(), i("div", {
|
|
44
44
|
ref_key: "itemRef",
|
|
45
|
-
ref:
|
|
45
|
+
ref: p,
|
|
46
46
|
class: f(["sortable-item", { "sortable-item--selected": t.isSelected }]),
|
|
47
|
-
onMouseover:
|
|
48
|
-
(...
|
|
49
|
-
onMouseout:
|
|
50
|
-
(...
|
|
51
|
-
onClick:
|
|
47
|
+
onMouseover: o[1] || (o[1] = //@ts-ignore
|
|
48
|
+
(...s) => e(C) && e(C)(...s)),
|
|
49
|
+
onMouseout: o[2] || (o[2] = //@ts-ignore
|
|
50
|
+
(...s) => e(v) && e(v)(...s)),
|
|
51
|
+
onClick: o[3] || (o[3] = u((s) => y("select"), ["stop"]))
|
|
52
52
|
}, [
|
|
53
|
-
|
|
53
|
+
a("div", {
|
|
54
54
|
class: f(["item", { "drag-allowed": !t.item.isLocked && !t.searchQuery }])
|
|
55
55
|
}, [
|
|
56
|
-
|
|
56
|
+
a("div", U, [
|
|
57
57
|
h(e(m), {
|
|
58
58
|
name: "dots-six-vertical",
|
|
59
59
|
width: "20px",
|
|
60
60
|
type: "bold"
|
|
61
61
|
})
|
|
62
62
|
]),
|
|
63
|
-
|
|
64
|
-
t.item.isLocked ? (
|
|
63
|
+
a("div", W, [
|
|
64
|
+
t.item.isLocked ? (l(), r(e(m), {
|
|
65
65
|
key: 1,
|
|
66
66
|
class: "locked-icon",
|
|
67
67
|
name: "lock",
|
|
68
68
|
width: "16px"
|
|
69
|
-
})) : (
|
|
69
|
+
})) : (l(), r(e(V), {
|
|
70
70
|
key: 0,
|
|
71
71
|
class: "order-num",
|
|
72
72
|
variant: "subtitle2"
|
|
73
73
|
}, {
|
|
74
74
|
default: b(() => [
|
|
75
|
-
w(
|
|
75
|
+
S(w(t.index + 1) + ". ", 1)
|
|
76
76
|
]),
|
|
77
77
|
_: 1
|
|
78
78
|
}))
|
|
79
79
|
]),
|
|
80
|
-
e(
|
|
80
|
+
e(k) && !t.searchQuery ? (l(), i("div", {
|
|
81
81
|
key: 0,
|
|
82
82
|
class: "expand-icon",
|
|
83
|
-
onClick:
|
|
83
|
+
onClick: u(B, ["stop"])
|
|
84
84
|
}, [
|
|
85
|
-
t.isOpen ? (
|
|
85
|
+
t.isOpen ? (l(), r(e(m), {
|
|
86
86
|
key: 0,
|
|
87
87
|
name: "caret-down",
|
|
88
|
-
|
|
89
|
-
})) : (
|
|
88
|
+
size: "16px"
|
|
89
|
+
})) : (l(), r(e(m), {
|
|
90
90
|
key: 1,
|
|
91
91
|
name: "caret-right",
|
|
92
|
-
|
|
92
|
+
size: "16px"
|
|
93
93
|
}))
|
|
94
|
-
], 8,
|
|
95
|
-
|
|
96
|
-
t.item.countryFlag ? (
|
|
94
|
+
], 8, X)) : d("", !0),
|
|
95
|
+
a("div", Y, [
|
|
96
|
+
t.item.countryFlag ? (l(), r(e(L), {
|
|
97
97
|
key: 0,
|
|
98
98
|
class: "country-flag",
|
|
99
99
|
"country-code": t.item.countryFlag
|
|
100
|
-
}, null, 8, ["country-code"])) :
|
|
101
|
-
h(
|
|
100
|
+
}, null, 8, ["country-code"])) : d("", !0),
|
|
101
|
+
h(A, {
|
|
102
102
|
"display-value": t.displayValue,
|
|
103
103
|
item: t.item
|
|
104
104
|
}, null, 8, ["display-value", "item"])
|
|
105
105
|
]),
|
|
106
|
-
|
|
106
|
+
e(Q).menu ? (l(), i("div", {
|
|
107
|
+
key: 1,
|
|
107
108
|
class: "item__menu",
|
|
108
|
-
onClick:
|
|
109
|
+
onClick: o[0] || (o[0] = u(() => {
|
|
109
110
|
}, ["stop"]))
|
|
110
111
|
}, [
|
|
111
|
-
|
|
112
|
-
])
|
|
112
|
+
R(c.$slots, "menu", {}, void 0, !0)
|
|
113
|
+
])) : d("", !0)
|
|
113
114
|
], 2),
|
|
114
|
-
|
|
115
|
-
e(
|
|
116
|
-
(
|
|
115
|
+
a("div", F(e(T), { class: "child-list" }), [
|
|
116
|
+
e(k) && t.isOpen ? (l(), i("ul", D(F({ key: 0 }, e(z))), [
|
|
117
|
+
(l(!0), i(j, null, q(e(M), ({ data: s, index: O }) => (l(), i("li", {
|
|
117
118
|
key: O,
|
|
118
|
-
class: f({ selected:
|
|
119
|
-
onClick:
|
|
119
|
+
class: f({ selected: H(s) }),
|
|
120
|
+
onClick: u((_) => y("selectChild", s), ["stop"])
|
|
120
121
|
}, [
|
|
121
|
-
|
|
122
|
+
s.countryFlag ? (l(), r(e(L), {
|
|
122
123
|
key: 0,
|
|
123
124
|
class: "country-flag",
|
|
124
|
-
"country-code":
|
|
125
|
-
}, null, 8, ["country-code"])) :
|
|
125
|
+
"country-code": s.countryFlag
|
|
126
|
+
}, null, 8, ["country-code"])) : d("", !0),
|
|
126
127
|
h(e(V), { variant: "body2" }, {
|
|
127
128
|
default: b(() => [
|
|
128
|
-
w(
|
|
129
|
+
S(w(t.displayValue(s)), 1)
|
|
129
130
|
]),
|
|
130
131
|
_: 2
|
|
131
132
|
}, 1024)
|
|
132
|
-
], 10,
|
|
133
|
-
], 16)) :
|
|
133
|
+
], 10, Z))), 128))
|
|
134
|
+
], 16)) : d("", !0)
|
|
134
135
|
], 16)
|
|
135
136
|
], 34));
|
|
136
137
|
}
|
|
137
138
|
});
|
|
138
139
|
export {
|
|
139
|
-
|
|
140
|
+
ae as default
|
|
140
141
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./SortableItemLabel.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../SortableItemLabel.
|
|
4
|
-
const
|
|
3
|
+
// import "../../SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css"; //*');
|
|
4
|
+
const a = /* @__PURE__ */ o(e, [["__scopeId", "data-v-f2ced2f4"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import "../../SortableItemLabel.
|
|
1
|
+
import "../../SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css"; import { defineComponent as m, openBlock as a, createBlock as p, unref as l, withCtx as e, createElementVNode as u, createElementBlock as d, Fragment as f, renderList as h, createVNode as i, createTextVNode as o, toDisplayString as r } from "vue";
|
|
2
2
|
import n from "../typography/v4/Typography.vue.js";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import _ from "../tooltip/v4/TooltipV4.vue.js";
|
|
4
|
+
const x = { class: "tooltip-content" }, g = /* @__PURE__ */ m({
|
|
5
5
|
__name: "SortableItemLabel",
|
|
6
6
|
props: {
|
|
7
7
|
item: null,
|
|
8
8
|
displayValue: null
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
return (
|
|
10
|
+
setup(t) {
|
|
11
|
+
return (y, b) => (a(), p(l(_), {
|
|
12
12
|
class: "item-label",
|
|
13
13
|
placement: "right",
|
|
14
|
-
disabled: !
|
|
14
|
+
disabled: !t.item.helpText
|
|
15
15
|
}, {
|
|
16
|
-
tooltip:
|
|
17
|
-
|
|
18
|
-
(a(!0),
|
|
19
|
-
key:
|
|
16
|
+
tooltip: e(() => [
|
|
17
|
+
u("div", x, [
|
|
18
|
+
(a(!0), d(f, null, h(t.item.helpText, (c, s) => (a(), d("div", {
|
|
19
|
+
key: s,
|
|
20
20
|
class: "help"
|
|
21
21
|
}, [
|
|
22
22
|
i(l(n), {
|
|
23
23
|
class: "help__title",
|
|
24
24
|
variant: "h5"
|
|
25
25
|
}, {
|
|
26
|
-
default:
|
|
27
|
-
o(r(
|
|
26
|
+
default: e(() => [
|
|
27
|
+
o(r(c.title), 1)
|
|
28
28
|
]),
|
|
29
29
|
_: 2
|
|
30
30
|
}, 1024),
|
|
@@ -32,29 +32,26 @@ const _ = { class: "tooltip-content" }, k = /* @__PURE__ */ m({
|
|
|
32
32
|
class: "help__text",
|
|
33
33
|
variant: "body2"
|
|
34
34
|
}, {
|
|
35
|
-
default:
|
|
36
|
-
o(r(
|
|
35
|
+
default: e(() => [
|
|
36
|
+
o(r(c.text), 1)
|
|
37
37
|
]),
|
|
38
38
|
_: 2
|
|
39
39
|
}, 1024)
|
|
40
40
|
]))), 128))
|
|
41
41
|
])
|
|
42
42
|
]),
|
|
43
|
-
default:
|
|
44
|
-
i(l(n), {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}, {
|
|
48
|
-
default: t(() => [
|
|
49
|
-
o(r(e.displayValue(e.item)), 1)
|
|
43
|
+
default: e(() => [
|
|
44
|
+
i(l(n), { variant: "body2" }, {
|
|
45
|
+
default: e(() => [
|
|
46
|
+
o(r(t.displayValue(t.item)), 1)
|
|
50
47
|
]),
|
|
51
48
|
_: 1
|
|
52
|
-
}
|
|
49
|
+
})
|
|
53
50
|
]),
|
|
54
51
|
_: 1
|
|
55
52
|
}, 8, ["disabled"]));
|
|
56
53
|
}
|
|
57
54
|
});
|
|
58
55
|
export {
|
|
59
|
-
|
|
56
|
+
g as default
|
|
60
57
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SortableList.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../SortableList.
|
|
4
|
-
const c = /* @__PURE__ */
|
|
2
|
+
/* empty css */import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../SortableList.vue_vue_type_style_index_0_scoped_156c01ca_lang.css"; //*');
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-156c01ca"]]);
|
|
5
5
|
export {
|
|
6
6
|
c as default
|
|
7
7
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import "../../SortableList.
|
|
2
|
-
import { VueDraggable as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useVModel as
|
|
8
|
-
import { matchString as
|
|
9
|
-
import { useTestIdAttrs as
|
|
1
|
+
import "../../SortableList.vue_vue_type_style_index_0_scoped_156c01ca_lang.css"; import { defineComponent as G, useSlots as U, computed as p, ref as M, openBlock as s, createElementBlock as i, mergeProps as T, unref as l, createBlock as g, isRef as $, createCommentVNode as m, withCtx as y, Fragment as V, renderList as D, createSlots as w, renderSlot as S, createElementVNode as K, createVNode as x, createTextVNode as Q, toDisplayString as j } from "vue";
|
|
2
|
+
import { VueDraggable as z } from "vue-draggable-plus";
|
|
3
|
+
import q from "./SortableItem.vue.js";
|
|
4
|
+
import J from "../search/v4/SearchV4.vue.js";
|
|
5
|
+
import W from "../typography/v4/Typography.vue.js";
|
|
6
|
+
import X from "../skeleton/v4/SkeletonV4.vue.js";
|
|
7
|
+
import { useVModel as Y } from "@vueuse/core";
|
|
8
|
+
import { matchString as H } from "../../utils/search.js";
|
|
9
|
+
import { useTestIdAttrs as Z } from "../../utils/testIds.js";
|
|
10
10
|
import { SortableListTestIdModifiers as I } from "../../testids/index.js";
|
|
11
|
-
import { DRAG_CURSOR_CSS_CLASS as
|
|
12
|
-
const
|
|
11
|
+
import { DRAG_CURSOR_CSS_CLASS as O } from "./consts.js";
|
|
12
|
+
const _ = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "sortable-list-container"
|
|
15
|
-
},
|
|
15
|
+
}, ee = { class: "loader-bars" }, te = {
|
|
16
16
|
key: 3,
|
|
17
17
|
class: "empty-state-title"
|
|
18
|
-
},
|
|
18
|
+
}, fe = /* @__PURE__ */ G({
|
|
19
19
|
__name: "SortableList",
|
|
20
20
|
props: {
|
|
21
21
|
items: { default: () => [] },
|
|
@@ -34,127 +34,133 @@ const X = {
|
|
|
34
34
|
},
|
|
35
35
|
emits: ["sortableItemDragged", "update:items", "update:openId", "update:selectedId", "update:selectedChildId", "update:search", "clearSearch"],
|
|
36
36
|
setup(d, { emit: o }) {
|
|
37
|
-
const
|
|
37
|
+
const r = d, R = U(), u = Y(r, "search", o), v = p(() => !!u.value?.trim()), C = p(() => v.value ? r.items.filter((t) => {
|
|
38
38
|
const a = t.children || [], e = u.value;
|
|
39
|
-
return
|
|
40
|
-
a.some((
|
|
41
|
-
}) :
|
|
39
|
+
return r.searchHandler ? r.searchHandler(t, e) : H(t.displayText, e) || // match parent item
|
|
40
|
+
a.some((n) => H(n.displayText, e));
|
|
41
|
+
}) : r.items), h = p({
|
|
42
42
|
get() {
|
|
43
43
|
return C.value.filter((t) => !t.isLocked);
|
|
44
44
|
},
|
|
45
45
|
set(t) {
|
|
46
|
-
o("update:items", [...t, ...
|
|
46
|
+
o("update:items", [...t, ...k.value]);
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
48
|
+
}), k = p(
|
|
49
49
|
() => C.value.filter((t) => t.isLocked)
|
|
50
|
-
),
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
const { target: a, item: e, newIndex:
|
|
54
|
-
|
|
50
|
+
), b = M(!1), F = (t) => {
|
|
51
|
+
b.value = !0, setTimeout(() => t.target.classList.add(O), 50);
|
|
52
|
+
}, P = (t) => {
|
|
53
|
+
const { target: a, item: e, newIndex: n } = t;
|
|
54
|
+
b.value = !1, a.classList.remove(O);
|
|
55
55
|
const c = e.attributes["data-id"]?.value;
|
|
56
|
-
o("sortableItemDragged", { id: c, newIndex:
|
|
57
|
-
},
|
|
56
|
+
o("sortableItemDragged", { id: c, newIndex: n });
|
|
57
|
+
}, A = (t) => (v.value || t.id === r.openId) && !b.value, B = (t, a) => {
|
|
58
58
|
a ? o("update:openId", t.id) : o("update:openId", null);
|
|
59
|
-
},
|
|
59
|
+
}, f = (t) => t.id === r.selectedId, E = (t) => {
|
|
60
60
|
o("update:selectedId", t.id), o("update:selectedChildId", null);
|
|
61
|
-
},
|
|
61
|
+
}, N = (t, a) => {
|
|
62
62
|
o("update:selectedChildId", t.id), o("update:selectedId", a.id), o("update:openId", a.id);
|
|
63
|
-
}, L =
|
|
63
|
+
}, L = Z(r.testId, I);
|
|
64
64
|
return (t, a) => (s(), i("div", T({ class: "sortable-list-and-search-container" }, l(L)[l(I).CONTAINER]), [
|
|
65
|
-
d.showSearch ? (s(), g(l(
|
|
65
|
+
d.showSearch ? (s(), g(l(J), {
|
|
66
66
|
key: 0,
|
|
67
67
|
modelValue: l(u),
|
|
68
|
-
"onUpdate:modelValue": a[0] || (a[0] = (e) =>
|
|
68
|
+
"onUpdate:modelValue": a[0] || (a[0] = (e) => $(u) ? u.value = e : null),
|
|
69
69
|
class: "list-search",
|
|
70
70
|
placeholder: d.searchPlaceholder,
|
|
71
71
|
"test-id": d.testId,
|
|
72
72
|
onOnClear: a[1] || (a[1] = (e) => o("clearSearch"))
|
|
73
|
-
}, null, 8, ["modelValue", "placeholder", "test-id"])) :
|
|
73
|
+
}, null, 8, ["modelValue", "placeholder", "test-id"])) : m("", !0),
|
|
74
74
|
d.isLoading ? S(t.$slots, "loader", { key: 2 }, () => [
|
|
75
|
-
|
|
75
|
+
K("div", ee, [
|
|
76
76
|
(s(!0), i(V, null, D(d.loadingRowCount, (e) => (s(), i("div", { key: e }, [
|
|
77
|
-
|
|
77
|
+
x(l(X), {
|
|
78
78
|
round: "",
|
|
79
79
|
class: "loader-bar"
|
|
80
80
|
})
|
|
81
81
|
]))), 128))
|
|
82
82
|
])
|
|
83
|
-
], !0) : (s(), i("div",
|
|
84
|
-
l(h).length ? (s(), g(l(
|
|
83
|
+
], !0) : (s(), i("div", _, [
|
|
84
|
+
l(h).length ? (s(), g(l(z), T({
|
|
85
85
|
key: 0,
|
|
86
86
|
modelValue: l(h),
|
|
87
|
-
"onUpdate:modelValue": a[2] || (a[2] = (e) =>
|
|
87
|
+
"onUpdate:modelValue": a[2] || (a[2] = (e) => $(h) ? h.value = e : null),
|
|
88
88
|
class: "sortable-list",
|
|
89
89
|
filter: ".expand-icon",
|
|
90
90
|
animation: 150,
|
|
91
91
|
handle: ".draggable-handle",
|
|
92
92
|
disabled: l(v)
|
|
93
93
|
}, l(L)[l(I).DRAGGABLE_LIST], {
|
|
94
|
-
onStart:
|
|
95
|
-
onEnd:
|
|
94
|
+
onStart: F,
|
|
95
|
+
onEnd: P
|
|
96
96
|
}), {
|
|
97
|
-
default:
|
|
98
|
-
(s(!0), i(V, null, D(l(h), (e,
|
|
97
|
+
default: y(() => [
|
|
98
|
+
(s(!0), i(V, null, D(l(h), (e, n) => (s(), g(q, {
|
|
99
99
|
key: e.id,
|
|
100
100
|
"data-id": e.id,
|
|
101
101
|
item: e,
|
|
102
|
-
index:
|
|
103
|
-
"is-open":
|
|
104
|
-
"is-selected":
|
|
105
|
-
"selected-child-id":
|
|
102
|
+
index: n,
|
|
103
|
+
"is-open": A(e),
|
|
104
|
+
"is-selected": f(e),
|
|
105
|
+
"selected-child-id": f(e) ? d.selectedChildId : null,
|
|
106
106
|
"display-value": d.displayValue,
|
|
107
107
|
"search-query": l(u),
|
|
108
108
|
"search-handler": d.searchHandler,
|
|
109
|
-
onToggle: (c) =>
|
|
110
|
-
onSelect: (c) =>
|
|
111
|
-
onSelectChild: (c) =>
|
|
112
|
-
}, {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
onToggle: (c) => B(e, c),
|
|
110
|
+
onSelect: (c) => E(e),
|
|
111
|
+
onSelectChild: (c) => N(c, e)
|
|
112
|
+
}, w({ _: 2 }, [
|
|
113
|
+
l(R).menu ? {
|
|
114
|
+
name: "menu",
|
|
115
|
+
fn: y(() => [
|
|
116
|
+
S(t.$slots, "menu", { item: e }, void 0, !0)
|
|
117
|
+
]),
|
|
118
|
+
key: "0"
|
|
119
|
+
} : void 0
|
|
120
|
+
]), 1032, ["data-id", "item", "index", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "search-handler", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
118
121
|
]),
|
|
119
122
|
_: 3
|
|
120
|
-
}, 16, ["modelValue", "disabled"])) :
|
|
121
|
-
l(
|
|
123
|
+
}, 16, ["modelValue", "disabled"])) : m("", !0),
|
|
124
|
+
l(k).length ? (s(), i("div", T({
|
|
122
125
|
key: 1,
|
|
123
126
|
class: "locked-list"
|
|
124
127
|
}, l(L)[l(I).LOCKED_LIST]), [
|
|
125
|
-
(s(!0), i(V, null, D(l(
|
|
128
|
+
(s(!0), i(V, null, D(l(k), (e) => (s(), g(q, {
|
|
126
129
|
key: e.id,
|
|
127
130
|
item: e,
|
|
128
|
-
"is-open":
|
|
129
|
-
"is-selected":
|
|
130
|
-
"selected-child-id":
|
|
131
|
+
"is-open": A(e),
|
|
132
|
+
"is-selected": f(e),
|
|
133
|
+
"selected-child-id": f(e) ? d.selectedChildId : null,
|
|
131
134
|
"display-value": d.displayValue,
|
|
132
135
|
"search-query": l(u),
|
|
133
136
|
"on-search": d.searchHandler,
|
|
134
|
-
onToggle: (
|
|
135
|
-
onSelect: (
|
|
136
|
-
onSelectChild: (
|
|
137
|
-
}, {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
onToggle: (n) => B(e, n),
|
|
138
|
+
onSelect: (n) => E(e),
|
|
139
|
+
onSelectChild: (n) => N(n, e)
|
|
140
|
+
}, w({ _: 2 }, [
|
|
141
|
+
l(R).menu ? {
|
|
142
|
+
name: "menu",
|
|
143
|
+
fn: y(() => [
|
|
144
|
+
S(t.$slots, "menu", { item: e }, void 0, !0)
|
|
145
|
+
]),
|
|
146
|
+
key: "0"
|
|
147
|
+
} : void 0
|
|
148
|
+
]), 1032, ["item", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "on-search", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
149
|
+
], 16)) : m("", !0)
|
|
144
150
|
])),
|
|
145
|
-
!l(C).length && !d.isLoading ? (s(), i("div",
|
|
151
|
+
!l(C).length && !d.isLoading ? (s(), i("div", te, [
|
|
146
152
|
S(t.$slots, "empty-state", {}, () => [
|
|
147
|
-
|
|
148
|
-
default:
|
|
149
|
-
|
|
153
|
+
x(l(W), { variant: "body2" }, {
|
|
154
|
+
default: y(() => [
|
|
155
|
+
Q(j(d.emptyStateTitle), 1)
|
|
150
156
|
]),
|
|
151
157
|
_: 1
|
|
152
158
|
})
|
|
153
159
|
], !0)
|
|
154
|
-
])) :
|
|
160
|
+
])) : m("", !0)
|
|
155
161
|
], 16));
|
|
156
162
|
}
|
|
157
163
|
});
|
|
158
164
|
export {
|
|
159
|
-
|
|
165
|
+
fe as default
|
|
160
166
|
};
|
|
@@ -19,7 +19,7 @@ export declare const tableCommon: (props: any, emit: any) => {
|
|
|
19
19
|
floatingActionRef: import("vue").Ref<HTMLDivElement>;
|
|
20
20
|
scrollToTop: () => void;
|
|
21
21
|
toggleSortOrder: (column: Column) => void;
|
|
22
|
-
columnsStickyPositions: import("vue").ComputedRef<Record<string,
|
|
22
|
+
columnsStickyPositions: import("vue").ComputedRef<Record<string, CSSProperties>>;
|
|
23
23
|
hasSearchSlot: import("vue").ComputedRef<boolean>;
|
|
24
24
|
showBackToTopButton: import("vue").ComputedRef<boolean>;
|
|
25
25
|
containerStyle: import("vue").ComputedRef<CSSProperties>;
|