@ironsource/shared-ui 2.1.7-rc.9 → 2.1.7-test.10
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/DataGrid.vue_vue_type_style_index_0_scoped_706b324e_lang.css +1 -0
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_98819e5a_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_00ccab6b_lang.css +1 -0
- package/EditableV4.vue_vue_type_style_index_0_scoped_e0c047b4_lang.css +1 -0
- package/IconV4.vue_vue_type_style_index_0_scoped_dc433d48_lang.css +1 -0
- package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_82ba0e12_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_77509f61_lang.css +1 -0
- package/README.md +1 -1
- package/SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css +1 -0
- package/TabsV4.vue_vue_type_style_index_0_scoped_f9433b11_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_4d9bf5b2_lang.css +1 -0
- package/ThemeWrapper.vue_vue_type_style_index_0_scoped_66bd448a_lang.css +1 -0
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_dbd80d49_lang.css +1 -0
- package/components/ThemeWrapper/ThemeWrapper.vue.js +2 -2
- package/components/ThemeWrapper/ThemeWrapper.vue2.js +5 -5
- package/components/appHeader/AppHeader.vue.d.ts +1 -1
- package/components/appHeader/index.d.ts +9 -9
- package/components/dropdown/common/Dropdown.common.js +89 -89
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +1 -0
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +32 -29
- package/components/dropdown/v4/DropdownV4.vue.d.ts +29 -0
- package/components/dropdown/v4/DropdownV4.vue.js +4 -4
- package/components/dropdown/v4/DropdownV4.vue2.js +186 -158
- package/components/dropdown/v4/OptionV4.vue.d.ts +26 -2
- package/components/dropdown/v4/OptionV4.vue.js +2 -2
- package/components/dropdown/v4/OptionV4.vue2.js +94 -71
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +21 -16
- package/components/dropdown/v4/TreeDropdown.vue.js +3 -3
- package/components/dropdown/v4/TreeDropdown.vue2.js +170 -74
- package/components/dropdown/v4/index.d.ts +451 -82
- package/components/icon/v4/IconV4.vue.d.ts +5 -0
- package/components/icon/v4/IconV4.vue.js +4 -4
- package/components/icon/v4/IconV4.vue2.js +29 -26
- package/components/icon/v4/index.d.ts +20 -1
- package/components/input/v4/TextField.vue.js +3 -3
- package/components/input/v4/TextField.vue2.js +1 -1
- package/components/sortableList/SortableList.vue.d.ts +25 -0
- package/components/sortableList/SortableList.vue.js +4 -4
- package/components/sortableList/SortableList.vue2.js +129 -89
- package/components/sortableList/index.d.ts +88 -2
- package/components/table/v3/Table.vue.d.ts +2 -2
- package/components/table/v3/index.d.ts +39 -39
- package/components/table/v4/DataGrid.vue.d.ts +6 -2
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +131 -122
- package/components/table/v4/MultipleDataGrid.vue.d.ts +16 -3
- package/components/table/v4/MultipleDataGrid.vue.js +5 -5
- package/components/table/v4/MultipleDataGrid.vue2.js +112 -69
- package/components/table/v4/index.d.ts +92 -75
- package/components/table-cells/common/Editable.common.js +37 -26
- package/components/table-cells/common/EditableContext.d.ts +1 -0
- package/components/table-cells/v4/EditableV4.vue.d.ts +5 -0
- package/components/table-cells/v4/EditableV4.vue.js +5 -5
- package/components/table-cells/v4/EditableV4.vue2.js +18 -17
- package/components/table-cells/v4/index.d.ts +20 -1
- package/components/tabs/v4/TabsV4.vue.js +4 -4
- package/components/tabs/v4/TabsV4.vue2.js +37 -40
- package/design-foundation.stories/icons/iconsData.d.ts +6 -2
- package/index.d.ts +1694 -674
- package/mocks/options.d.ts +12 -0
- package/package.json +1 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_63aaf3be_lang.css +0 -1
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_0345d6b1_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_938772ee_lang.css +0 -1
- package/EditableV4.vue_vue_type_style_index_0_scoped_31bfb722_lang.css +0 -1
- package/IconV4.vue_vue_type_style_index_0_scoped_1eea7671_lang.css +0 -1
- package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_1bdca43d_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_b6a06f00_lang.css +0 -1
- package/SortableList.vue_vue_type_style_index_0_scoped_21842d59_lang.css +0 -1
- package/TabsV4.vue_vue_type_style_index_0_scoped_bab40cfe_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_eb472aa3_lang.css +0 -1
- package/ThemeWrapper.vue_vue_type_style_index_0_scoped_b62ee695_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_142eab98_lang.css +0 -1
|
@@ -5,6 +5,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
5
5
|
size?: string;
|
|
6
6
|
height?: string;
|
|
7
7
|
width?: string;
|
|
8
|
+
platform?: string;
|
|
8
9
|
}>, {
|
|
9
10
|
name: any;
|
|
10
11
|
size: any;
|
|
@@ -12,6 +13,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
12
13
|
type: string;
|
|
13
14
|
height: any;
|
|
14
15
|
width: any;
|
|
16
|
+
platform: any;
|
|
15
17
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
16
18
|
type?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
|
|
17
19
|
name?: string;
|
|
@@ -19,6 +21,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
19
21
|
size?: string;
|
|
20
22
|
height?: string;
|
|
21
23
|
width?: string;
|
|
24
|
+
platform?: string;
|
|
22
25
|
}>, {
|
|
23
26
|
name: any;
|
|
24
27
|
size: any;
|
|
@@ -26,6 +29,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
26
29
|
type: string;
|
|
27
30
|
height: any;
|
|
28
31
|
width: any;
|
|
32
|
+
platform: any;
|
|
29
33
|
}>>>, {
|
|
30
34
|
name: string;
|
|
31
35
|
type: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
|
|
@@ -33,6 +37,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
33
37
|
size: string;
|
|
34
38
|
height: string;
|
|
35
39
|
width: string;
|
|
40
|
+
platform: string;
|
|
36
41
|
}>, {
|
|
37
42
|
default?(_: {}): any;
|
|
38
43
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./IconV4.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../../IconV4.
|
|
4
|
-
const
|
|
2
|
+
/* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../IconV4.vue_vue_type_style_index_0_scoped_dc433d48_lang.css"; //*');
|
|
4
|
+
const t = /* @__PURE__ */ _(o, [["__scopeId", "data-v-dc433d48"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
t as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../../../IconV4.
|
|
2
|
-
import { useStorage as
|
|
1
|
+
import "../../../IconV4.vue_vue_type_style_index_0_scoped_dc433d48_lang.css"; import { defineComponent as S, useCssVars as w, unref as s, useSlots as C, computed as o, watch as _, openBlock as u, createElementBlock as f, normalizeClass as b, createCommentVNode as z, renderSlot as I } from "vue";
|
|
2
|
+
import { useStorage as T } from "../../../composables/useStorage.js";
|
|
3
3
|
import { ASSETS_BASE_URL as U } from "./consts.js";
|
|
4
|
-
const V = ["innerHTML"], B = /* @__PURE__ */
|
|
4
|
+
const V = ["innerHTML"], B = /* @__PURE__ */ S({
|
|
5
5
|
__name: "IconV4",
|
|
6
6
|
props: {
|
|
7
7
|
type: { default: "regular" },
|
|
@@ -9,34 +9,37 @@ const V = ["innerHTML"], B = /* @__PURE__ */ $({
|
|
|
9
9
|
color: { default: null },
|
|
10
10
|
size: { default: null },
|
|
11
11
|
height: { default: null },
|
|
12
|
-
width: { default: null }
|
|
12
|
+
width: { default: null },
|
|
13
|
+
platform: { default: null }
|
|
13
14
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const e =
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
15
|
+
setup(r) {
|
|
16
|
+
const e = r;
|
|
17
|
+
w((t) => ({
|
|
18
|
+
"3d423be4": s(d),
|
|
19
|
+
"513646c9": s(m),
|
|
20
|
+
ad86ac0c: r.color
|
|
20
21
|
}));
|
|
21
|
-
const
|
|
22
|
+
const a = window.sharedUIRequestCache = window.sharedUIRequestCache || {}, p = C(), d = o(() => e.size || e.width), m = o(() => e.size || e.height), h = o(
|
|
23
|
+
() => e.platform ? `${e.type}/${e.platform}` : e.type
|
|
24
|
+
), y = o(() => {
|
|
22
25
|
if (!e.name)
|
|
23
26
|
return "";
|
|
24
27
|
const t = e.name.split("/");
|
|
25
28
|
return [e.name ? `icon-name--${t.at(-1)}` : ""];
|
|
26
|
-
}),
|
|
29
|
+
}), c = o(() => {
|
|
27
30
|
if (p.default)
|
|
28
31
|
return "";
|
|
29
32
|
if (!e.name)
|
|
30
33
|
return console.error("Please provided icon name"), "";
|
|
31
34
|
const t = e.type === "regular" || e.type === "bold" || e.type === "fill" ? "ph/" : "v4/", n = e.type === "bold" || e.type === "fill" ? `-${e.type}` : "";
|
|
32
|
-
return `${U}/icons/${t}${
|
|
33
|
-
}),
|
|
35
|
+
return `${U}/icons/${t}${h.value}/${e.name}${n}.svg`;
|
|
36
|
+
}), l = T(`icon-${e.type}--${e.name}`);
|
|
34
37
|
function g(t) {
|
|
35
|
-
return
|
|
36
|
-
delete
|
|
38
|
+
return a[t] || (a[t] = fetch(t).then((n) => n.text()).finally(() => {
|
|
39
|
+
delete a[t];
|
|
37
40
|
}).catch((n) => {
|
|
38
41
|
console.error(n);
|
|
39
|
-
})),
|
|
42
|
+
})), a[t];
|
|
40
43
|
}
|
|
41
44
|
function v(t) {
|
|
42
45
|
return t.replace(
|
|
@@ -45,21 +48,21 @@ const V = ["innerHTML"], B = /* @__PURE__ */ $({
|
|
|
45
48
|
);
|
|
46
49
|
}
|
|
47
50
|
function i() {
|
|
48
|
-
g(
|
|
49
|
-
typeof t == "string" && t.startsWith("<svg") && (
|
|
51
|
+
g(c.value).then((t) => {
|
|
52
|
+
typeof t == "string" && t.startsWith("<svg") && (l.value = t);
|
|
50
53
|
});
|
|
51
54
|
}
|
|
52
|
-
!
|
|
53
|
-
const
|
|
54
|
-
return
|
|
55
|
-
class:
|
|
55
|
+
!l.value && c.value && i();
|
|
56
|
+
const $ = o(() => v(l.value ?? ""));
|
|
57
|
+
return _(() => e.name, i), (t, n) => (u(), f("span", {
|
|
58
|
+
class: b(["icon", s(y)])
|
|
56
59
|
}, [
|
|
57
|
-
t.$slots.default ?
|
|
60
|
+
t.$slots.default ? z("", !0) : (u(), f("span", {
|
|
58
61
|
key: 0,
|
|
59
62
|
class: "icon-wrapper",
|
|
60
|
-
innerHTML:
|
|
63
|
+
innerHTML: s($)
|
|
61
64
|
}, null, 8, V)),
|
|
62
|
-
|
|
65
|
+
I(t.$slots, "default", {}, void 0, !0)
|
|
63
66
|
], 2));
|
|
64
67
|
}
|
|
65
68
|
});
|
|
@@ -10,6 +10,7 @@ declare const IconTypes: () => ({
|
|
|
10
10
|
size: string;
|
|
11
11
|
height: string;
|
|
12
12
|
width: string;
|
|
13
|
+
platform: string;
|
|
13
14
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
14
15
|
name: {
|
|
15
16
|
type: import("vue").PropType<string>;
|
|
@@ -35,7 +36,11 @@ declare const IconTypes: () => ({
|
|
|
35
36
|
type: import("vue").PropType<string>;
|
|
36
37
|
default: any;
|
|
37
38
|
};
|
|
38
|
-
|
|
39
|
+
platform: {
|
|
40
|
+
type: import("vue").PropType<string>;
|
|
41
|
+
default: any;
|
|
42
|
+
};
|
|
43
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "name" | "type" | "color" | "size" | "height" | "width" | "platform">;
|
|
39
44
|
$attrs: {
|
|
40
45
|
[x: string]: unknown;
|
|
41
46
|
};
|
|
@@ -74,6 +79,10 @@ declare const IconTypes: () => ({
|
|
|
74
79
|
type: import("vue").PropType<string>;
|
|
75
80
|
default: any;
|
|
76
81
|
};
|
|
82
|
+
platform: {
|
|
83
|
+
type: import("vue").PropType<string>;
|
|
84
|
+
default: any;
|
|
85
|
+
};
|
|
77
86
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
78
87
|
name: string;
|
|
79
88
|
type: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
|
|
@@ -81,6 +90,7 @@ declare const IconTypes: () => ({
|
|
|
81
90
|
size: string;
|
|
82
91
|
height: string;
|
|
83
92
|
width: string;
|
|
93
|
+
platform: string;
|
|
84
94
|
}, {}, string> & {
|
|
85
95
|
beforeCreate?: (() => void) | (() => void)[];
|
|
86
96
|
created?: (() => void) | (() => void)[];
|
|
@@ -126,6 +136,10 @@ declare const IconTypes: () => ({
|
|
|
126
136
|
type: import("vue").PropType<string>;
|
|
127
137
|
default: any;
|
|
128
138
|
};
|
|
139
|
+
platform: {
|
|
140
|
+
type: import("vue").PropType<string>;
|
|
141
|
+
default: any;
|
|
142
|
+
};
|
|
129
143
|
}>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
130
144
|
__isFragment?: never;
|
|
131
145
|
__isTeleport?: never;
|
|
@@ -155,6 +169,10 @@ declare const IconTypes: () => ({
|
|
|
155
169
|
type: import("vue").PropType<string>;
|
|
156
170
|
default: any;
|
|
157
171
|
};
|
|
172
|
+
platform: {
|
|
173
|
+
type: import("vue").PropType<string>;
|
|
174
|
+
default: any;
|
|
175
|
+
};
|
|
158
176
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
159
177
|
name: string;
|
|
160
178
|
type: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
|
|
@@ -162,6 +180,7 @@ declare const IconTypes: () => ({
|
|
|
162
180
|
size: string;
|
|
163
181
|
height: string;
|
|
164
182
|
width: string;
|
|
183
|
+
platform: string;
|
|
165
184
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
166
185
|
$slots: {
|
|
167
186
|
default?(_: {}): any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./TextField.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../TextField.
|
|
4
|
-
const
|
|
3
|
+
// import "../../../TextField.vue_vue_type_style_index_0_scoped_4d9bf5b2_lang.css"; //*');
|
|
4
|
+
const d = /* @__PURE__ */ o(e, [["__scopeId", "data-v-4d9bf5b2"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
d as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../TextField.
|
|
1
|
+
import "../../../TextField.vue_vue_type_style_index_0_scoped_4d9bf5b2_lang.css"; import { defineComponent as J, computed as f, ref as Q, openBlock as l, createElementBlock as d, mergeProps as c, unref as t, createBlock as r, createCommentVNode as n, createElementVNode as A, normalizeClass as E, renderSlot as F, withCtx as b, createTextVNode as V, toDisplayString as $, withKeys as U, withModifiers as z, normalizeProps as O, createVNode as p } from "vue";
|
|
2
2
|
import v from "../../icon/v4/IconV4.vue.js";
|
|
3
3
|
import "../../icon/v4/IconFlag.vue.js";
|
|
4
4
|
import X from "../../tooltip/v4/TooltipV4.vue.js";
|
|
@@ -9,6 +9,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
9
9
|
showSearch?: boolean;
|
|
10
10
|
searchPlaceholder?: string;
|
|
11
11
|
searchHandler?: (item: SortableListItem, searchQuery: string) => boolean;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
loadingRowCount?: number;
|
|
14
|
+
emptyStateTitle?: string;
|
|
12
15
|
testId?: string;
|
|
13
16
|
}>, {
|
|
14
17
|
items: () => any[];
|
|
@@ -20,8 +23,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
20
23
|
showSearch: boolean;
|
|
21
24
|
searchPlaceholder: string;
|
|
22
25
|
searchHandler: any;
|
|
26
|
+
isLoading: boolean;
|
|
27
|
+
loadingRowCount: number;
|
|
28
|
+
emptyStateTitle: string;
|
|
23
29
|
testId: string;
|
|
24
30
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
sortableItemDragged: (event: {
|
|
32
|
+
id: string;
|
|
33
|
+
newIndex: number;
|
|
34
|
+
}) => void;
|
|
25
35
|
"update:items": (items: SortableListItem[]) => void;
|
|
26
36
|
"update:openId": (id: string | number) => void;
|
|
27
37
|
"update:selectedId": (id: string | number) => void;
|
|
@@ -38,6 +48,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
38
48
|
showSearch?: boolean;
|
|
39
49
|
searchPlaceholder?: string;
|
|
40
50
|
searchHandler?: (item: SortableListItem, searchQuery: string) => boolean;
|
|
51
|
+
isLoading?: boolean;
|
|
52
|
+
loadingRowCount?: number;
|
|
53
|
+
emptyStateTitle?: string;
|
|
41
54
|
testId?: string;
|
|
42
55
|
}>, {
|
|
43
56
|
items: () => any[];
|
|
@@ -49,8 +62,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
49
62
|
showSearch: boolean;
|
|
50
63
|
searchPlaceholder: string;
|
|
51
64
|
searchHandler: any;
|
|
65
|
+
isLoading: boolean;
|
|
66
|
+
loadingRowCount: number;
|
|
67
|
+
emptyStateTitle: string;
|
|
52
68
|
testId: string;
|
|
53
69
|
}>>> & {
|
|
70
|
+
onSortableItemDragged?: (event: {
|
|
71
|
+
id: string;
|
|
72
|
+
newIndex: number;
|
|
73
|
+
}) => any;
|
|
54
74
|
"onUpdate:items"?: (items: SortableListItem[]) => any;
|
|
55
75
|
"onUpdate:openId"?: (id: string | number) => any;
|
|
56
76
|
"onUpdate:selectedId"?: (id: string | number) => any;
|
|
@@ -60,6 +80,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
60
80
|
}, {
|
|
61
81
|
search: string;
|
|
62
82
|
testId: string;
|
|
83
|
+
isLoading: boolean;
|
|
63
84
|
displayValue: (item: SortableListItem) => string;
|
|
64
85
|
searchPlaceholder: string;
|
|
65
86
|
items: SortableListItem[];
|
|
@@ -68,10 +89,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
68
89
|
openId: string | number;
|
|
69
90
|
selectedId: string | number;
|
|
70
91
|
showSearch: boolean;
|
|
92
|
+
loadingRowCount: number;
|
|
93
|
+
emptyStateTitle: string;
|
|
71
94
|
}>, {
|
|
72
95
|
menu?(_: {
|
|
73
96
|
item: SortableListItem;
|
|
74
97
|
}): any;
|
|
98
|
+
loader?(_: {}): any;
|
|
99
|
+
"empty-state"?(_: {}): any;
|
|
75
100
|
}>;
|
|
76
101
|
export default _default;
|
|
77
102
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SortableList.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../SortableList.
|
|
4
|
-
const
|
|
2
|
+
/* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css"; //*');
|
|
4
|
+
const c = /* @__PURE__ */ e(o, [["__scopeId", "data-v-e9cd63b8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
import "../../SortableList.
|
|
2
|
-
import { VueDraggable as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
1
|
+
import "../../SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css"; import { defineComponent as F, computed as f, ref as P, openBlock as s, createElementBlock as i, mergeProps as T, unref as l, createBlock as g, isRef as N, createCommentVNode as y, withCtx as m, Fragment as V, renderList as D, renderSlot as S, createElementVNode as G, createVNode as $, createTextVNode as U, toDisplayString as M } from "vue";
|
|
2
|
+
import { VueDraggable as K } from "vue-draggable-plus";
|
|
3
|
+
import w from "./SortableItem.vue.js";
|
|
4
|
+
import Q from "../search/v4/SearchV4.vue.js";
|
|
5
|
+
import j from "../typography/v4/Typography.vue.js";
|
|
6
|
+
import z from "../skeleton/v4/SkeletonV4.vue.js";
|
|
7
|
+
import { useVModel as J } from "@vueuse/core";
|
|
8
|
+
import { matchString as x } from "../../utils/search.js";
|
|
9
|
+
import { useTestIdAttrs as W } from "../../utils/testIds.js";
|
|
10
|
+
import { SortableListTestIdModifiers as I } from "../../testids/index.js";
|
|
11
|
+
import { DRAG_CURSOR_CSS_CLASS as q } from "./consts.js";
|
|
12
|
+
const X = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "sortable-list-container"
|
|
15
|
+
}, Y = { class: "loader-bars" }, Z = {
|
|
16
|
+
key: 3,
|
|
17
|
+
class: "empty-state-title"
|
|
18
|
+
}, ue = /* @__PURE__ */ F({
|
|
11
19
|
__name: "SortableList",
|
|
12
20
|
props: {
|
|
13
21
|
items: { default: () => [] },
|
|
@@ -19,102 +27,134 @@ const le = /* @__PURE__ */ $({
|
|
|
19
27
|
showSearch: { type: Boolean, default: !1 },
|
|
20
28
|
searchPlaceholder: { default: "Search" },
|
|
21
29
|
searchHandler: { type: Function, default: null },
|
|
30
|
+
isLoading: { type: Boolean, default: !1 },
|
|
31
|
+
loadingRowCount: { default: 3 },
|
|
32
|
+
emptyStateTitle: { default: "No results" },
|
|
22
33
|
testId: { default: "" }
|
|
23
34
|
},
|
|
24
|
-
emits: ["update:items", "update:openId", "update:selectedId", "update:selectedChildId", "update:search", "clearSearch"],
|
|
25
|
-
setup(d, { emit:
|
|
26
|
-
const
|
|
27
|
-
const a =
|
|
28
|
-
return
|
|
29
|
-
a.some((
|
|
30
|
-
}) :
|
|
35
|
+
emits: ["sortableItemDragged", "update:items", "update:openId", "update:selectedId", "update:selectedChildId", "update:search", "clearSearch"],
|
|
36
|
+
setup(d, { emit: o }) {
|
|
37
|
+
const n = d, u = J(n, "search", o), v = f(() => !!u.value?.trim()), C = f(() => v.value ? n.items.filter((t) => {
|
|
38
|
+
const a = t.children || [], e = u.value;
|
|
39
|
+
return n.searchHandler ? n.searchHandler(t, e) : x(t.displayText, e) || // match parent item
|
|
40
|
+
a.some((r) => x(r.displayText, e));
|
|
41
|
+
}) : n.items), h = f({
|
|
31
42
|
get() {
|
|
32
|
-
return
|
|
43
|
+
return C.value.filter((t) => !t.isLocked);
|
|
33
44
|
},
|
|
34
|
-
set(
|
|
35
|
-
|
|
45
|
+
set(t) {
|
|
46
|
+
o("update:items", [...t, ...b.value]);
|
|
36
47
|
}
|
|
37
|
-
}),
|
|
38
|
-
() =>
|
|
39
|
-
),
|
|
40
|
-
|
|
41
|
-
}, O = (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
}), b = f(
|
|
49
|
+
() => C.value.filter((t) => t.isLocked)
|
|
50
|
+
), k = P(!1), H = (t) => {
|
|
51
|
+
k.value = !0, setTimeout(() => t.target.classList.add(q), 50);
|
|
52
|
+
}, O = (t) => {
|
|
53
|
+
const { target: a, item: e, newIndex: r } = t;
|
|
54
|
+
k.value = !1, a.classList.remove(q);
|
|
55
|
+
const c = e.attributes["data-id"]?.value;
|
|
56
|
+
o("sortableItemDragged", { id: c, newIndex: r });
|
|
57
|
+
}, R = (t) => (v.value || t.id === n.openId) && !k.value, A = (t, a) => {
|
|
58
|
+
a ? o("update:openId", t.id) : o("update:openId", null);
|
|
59
|
+
}, p = (t) => t.id === n.selectedId, B = (t) => {
|
|
60
|
+
o("update:selectedId", t.id), o("update:selectedChildId", null);
|
|
61
|
+
}, E = (t, a) => {
|
|
62
|
+
o("update:selectedChildId", t.id), o("update:selectedId", a.id), o("update:openId", a.id);
|
|
63
|
+
}, L = W(n.testId, I);
|
|
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(Q), {
|
|
52
66
|
key: 0,
|
|
53
|
-
modelValue:
|
|
54
|
-
"onUpdate:modelValue": a[0] || (a[0] = (e) =>
|
|
67
|
+
modelValue: l(u),
|
|
68
|
+
"onUpdate:modelValue": a[0] || (a[0] = (e) => N(u) ? u.value = e : null),
|
|
55
69
|
class: "list-search",
|
|
56
70
|
placeholder: d.searchPlaceholder,
|
|
57
71
|
"test-id": d.testId,
|
|
58
|
-
onOnClear: a[1] || (a[1] = (e) =>
|
|
59
|
-
}, null, 8, ["modelValue", "placeholder", "test-id"])) :
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
onOnClear: a[1] || (a[1] = (e) => o("clearSearch"))
|
|
73
|
+
}, null, 8, ["modelValue", "placeholder", "test-id"])) : y("", !0),
|
|
74
|
+
d.isLoading ? S(t.$slots, "loader", { key: 2 }, () => [
|
|
75
|
+
G("div", Y, [
|
|
76
|
+
(s(!0), i(V, null, D(d.loadingRowCount, (e) => (s(), i("div", { key: e }, [
|
|
77
|
+
$(l(z), {
|
|
78
|
+
round: "",
|
|
79
|
+
class: "loader-bar"
|
|
80
|
+
})
|
|
81
|
+
]))), 128))
|
|
82
|
+
])
|
|
83
|
+
], !0) : (s(), i("div", X, [
|
|
84
|
+
l(h).length ? (s(), g(l(K), T({
|
|
85
|
+
key: 0,
|
|
86
|
+
modelValue: l(h),
|
|
87
|
+
"onUpdate:modelValue": a[2] || (a[2] = (e) => N(h) ? h.value = e : null),
|
|
88
|
+
class: "sortable-list",
|
|
89
|
+
filter: ".expand-icon",
|
|
90
|
+
animation: 150,
|
|
91
|
+
handle: ".draggable-handle",
|
|
92
|
+
disabled: l(v)
|
|
93
|
+
}, l(L)[l(I).DRAGGABLE_LIST], {
|
|
94
|
+
onStart: H,
|
|
95
|
+
onEnd: O
|
|
96
|
+
}), {
|
|
97
|
+
default: m(() => [
|
|
98
|
+
(s(!0), i(V, null, D(l(h), (e, r) => (s(), g(w, {
|
|
99
|
+
key: e.id,
|
|
100
|
+
"data-id": e.id,
|
|
101
|
+
item: e,
|
|
102
|
+
index: r,
|
|
103
|
+
"is-open": R(e),
|
|
104
|
+
"is-selected": p(e),
|
|
105
|
+
"selected-child-id": p(e) ? d.selectedChildId : null,
|
|
106
|
+
"display-value": d.displayValue,
|
|
107
|
+
"search-query": l(u),
|
|
108
|
+
"search-handler": d.searchHandler,
|
|
109
|
+
onToggle: (c) => A(e, c),
|
|
110
|
+
onSelect: (c) => B(e),
|
|
111
|
+
onSelectChild: (c) => E(c, e)
|
|
112
|
+
}, {
|
|
113
|
+
menu: m(() => [
|
|
114
|
+
S(t.$slots, "menu", { item: e }, void 0, !0)
|
|
115
|
+
]),
|
|
116
|
+
_: 2
|
|
117
|
+
}, 1032, ["data-id", "item", "index", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "search-handler", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
118
|
+
]),
|
|
119
|
+
_: 3
|
|
120
|
+
}, 16, ["modelValue", "disabled"])) : y("", !0),
|
|
121
|
+
l(b).length ? (s(), i("div", T({
|
|
122
|
+
key: 1,
|
|
123
|
+
class: "locked-list"
|
|
124
|
+
}, l(L)[l(I).LOCKED_LIST]), [
|
|
125
|
+
(s(!0), i(V, null, D(l(b), (e) => (s(), g(w, {
|
|
74
126
|
key: e.id,
|
|
75
127
|
item: e,
|
|
76
|
-
|
|
77
|
-
"is-
|
|
78
|
-
"
|
|
79
|
-
"selected-child-id": i(e) ? d.selectedChildId : null,
|
|
128
|
+
"is-open": R(e),
|
|
129
|
+
"is-selected": p(e),
|
|
130
|
+
"selected-child-id": p(e) ? d.selectedChildId : null,
|
|
80
131
|
"display-value": d.displayValue,
|
|
81
|
-
"search-query":
|
|
82
|
-
"search
|
|
83
|
-
onToggle: (
|
|
84
|
-
onSelect: (
|
|
85
|
-
onSelectChild: (
|
|
132
|
+
"search-query": l(u),
|
|
133
|
+
"on-search": d.searchHandler,
|
|
134
|
+
onToggle: (r) => A(e, r),
|
|
135
|
+
onSelect: (r) => B(e),
|
|
136
|
+
onSelectChild: (r) => E(r, e)
|
|
86
137
|
}, {
|
|
87
|
-
menu:
|
|
88
|
-
|
|
138
|
+
menu: m(() => [
|
|
139
|
+
S(t.$slots, "menu", { item: e }, void 0, !0)
|
|
89
140
|
]),
|
|
90
141
|
_: 2
|
|
91
|
-
}, 1032, ["item", "
|
|
92
|
-
]),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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)
|
|
142
|
+
}, 1032, ["item", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "on-search", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
143
|
+
], 16)) : y("", !0)
|
|
144
|
+
])),
|
|
145
|
+
!l(C).length && !d.isLoading ? (s(), i("div", Z, [
|
|
146
|
+
S(t.$slots, "empty-state", {}, () => [
|
|
147
|
+
$(l(j), { variant: "body2" }, {
|
|
148
|
+
default: m(() => [
|
|
149
|
+
U(M(d.emptyStateTitle), 1)
|
|
150
|
+
]),
|
|
151
|
+
_: 1
|
|
152
|
+
})
|
|
153
|
+
], !0)
|
|
154
|
+
])) : y("", !0)
|
|
115
155
|
], 16));
|
|
116
156
|
}
|
|
117
157
|
});
|
|
118
158
|
export {
|
|
119
|
-
|
|
159
|
+
ue as default
|
|
120
160
|
};
|