@ironsource/shared-ui 2.1.11-test.41 → 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/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/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/dialog/v4/DialogV4.vue.d.ts +5 -0
- package/components/dialog/v4/DialogV4.vue.js +3 -3
- package/components/dialog/v4/DialogV4.vue2.js +52 -49
- package/components/dialog/v4/index.d.ts +20 -1
- package/components/dropdown/common/Dropdown.common.js +36 -34
- 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/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 +252 -46
- 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/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_c65df8d7_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/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,7 +1,7 @@
|
|
|
1
1
|
import o from "./ChipDropdownTrigger.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../ChipDropdownTrigger.
|
|
4
|
-
const
|
|
3
|
+
// import "../../../ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e43ac1c9_lang.css"; //*');
|
|
4
|
+
const c = /* @__PURE__ */ e(o, [["__scopeId", "data-v-e43ac1c9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../../../ChipDropdownTrigger.
|
|
2
|
-
import
|
|
1
|
+
import "../../../ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e43ac1c9_lang.css"; import { defineComponent as k, ref as f, computed as m, watch as D, openBlock as I, createBlock as S, unref as t, withCtx as y, createElementVNode as c, mergeProps as p, createVNode as d, createTextVNode as V, toDisplayString as v, withDirectives as x, vShow as _, withModifiers as $ } from "vue";
|
|
2
|
+
import b from "../../icon/v4/IconV4.vue.js";
|
|
3
3
|
import "../../icon/v4/IconFlag.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import { DropdownTestIdModifiers as
|
|
6
|
-
import { useTestIdAttrs as
|
|
7
|
-
import { isElementTruncated as
|
|
8
|
-
import { promiseTimeout as
|
|
9
|
-
import
|
|
10
|
-
const
|
|
4
|
+
import C from "../../typography/v4/Typography.vue.js";
|
|
5
|
+
import { DropdownTestIdModifiers as i } from "../../../testids/index.js";
|
|
6
|
+
import { useTestIdAttrs as E } from "../../../utils/testIds.js";
|
|
7
|
+
import { isElementTruncated as U } from "../../../utils/text.js";
|
|
8
|
+
import { promiseTimeout as F } from "@vueuse/core";
|
|
9
|
+
import L from "../../tooltip/v4/TooltipV4.vue.js";
|
|
10
|
+
const R = { class: "chip-trigger--icon" }, z = ["onClick"], K = /* @__PURE__ */ k({
|
|
11
11
|
__name: "ChipDropdownTrigger",
|
|
12
12
|
props: {
|
|
13
13
|
label: { default: "Status" },
|
|
@@ -25,17 +25,20 @@ const z = { class: "chip-trigger--icon" }, L = ["onClick"], K = /* @__PURE__ */
|
|
|
25
25
|
displayValueInQuotes: { type: Boolean, default: !1 }
|
|
26
26
|
},
|
|
27
27
|
emits: ["clear"],
|
|
28
|
-
setup(
|
|
29
|
-
const e =
|
|
30
|
-
|
|
31
|
-
}, o =
|
|
28
|
+
setup(u, { emit: A }) {
|
|
29
|
+
const e = u, B = () => {
|
|
30
|
+
A("clear");
|
|
31
|
+
}, o = f(null), r = f(!0), T = f(!1), h = (l) => {
|
|
32
32
|
let a = l;
|
|
33
|
-
Array.isArray(l) && (l.length > 1 ? a = `${l[0]}
|
|
34
|
-
let
|
|
35
|
-
return e.displayValueInQuotes && (
|
|
36
|
-
},
|
|
33
|
+
Array.isArray(l) && (l.length > 1 ? a = `${l[0]}` : a = l[0] ? `${l[0]}` : ""), r.value = !!a;
|
|
34
|
+
let O = a;
|
|
35
|
+
return e.displayValueInQuotes && (O = `"${a}"`), a ? `${e.label}: ${O}` : e.label;
|
|
36
|
+
}, g = (l) => {
|
|
37
|
+
let a = "";
|
|
38
|
+
return Array.isArray(l) && l.length > 1 && (a = `, +${l[1]}`), a;
|
|
39
|
+
}, N = m(
|
|
37
40
|
() => e.feedbackVariant ? `state-${e.feedbackVariant}` : ""
|
|
38
|
-
),
|
|
41
|
+
), s = E(e.testId, i), n = m(() => {
|
|
39
42
|
if (!e.multi)
|
|
40
43
|
return e.selectedOption ? e.displayValue(e.selectedOption) : "";
|
|
41
44
|
if (Array.isArray(e.selectedOption))
|
|
@@ -44,50 +47,62 @@ const z = { class: "chip-trigger--icon" }, L = ["onClick"], K = /* @__PURE__ */
|
|
|
44
47
|
e.selectedOption.length - 1
|
|
45
48
|
] : [];
|
|
46
49
|
});
|
|
47
|
-
|
|
48
|
-
await
|
|
50
|
+
D([() => e.selectedOption, o], async () => {
|
|
51
|
+
await F(100), T.value = o.value && U(o.value);
|
|
49
52
|
});
|
|
50
|
-
const w =
|
|
51
|
-
|
|
53
|
+
const w = m(() => T.value ? `${h(n.value)}${g(
|
|
54
|
+
n.value
|
|
55
|
+
)}` : "");
|
|
56
|
+
return (l, a) => (I(), S(t(L), {
|
|
52
57
|
text: t(w),
|
|
53
|
-
class: "tooltip-option"
|
|
58
|
+
class: "tooltip-option",
|
|
59
|
+
placement: "top"
|
|
54
60
|
}, {
|
|
55
|
-
default:
|
|
56
|
-
|
|
57
|
-
class: ["chip-trigger", [t(
|
|
58
|
-
}, t(
|
|
59
|
-
|
|
61
|
+
default: y(() => [
|
|
62
|
+
c("div", p({
|
|
63
|
+
class: ["chip-trigger", [t(N), { active: r.value, disabled: u.disabled, open: u.open }]]
|
|
64
|
+
}, t(s)[t(i).BUTTON]), [
|
|
65
|
+
c("div", {
|
|
60
66
|
ref_key: "textContainerRef",
|
|
61
67
|
ref: o,
|
|
62
68
|
class: "chip-trigger--content"
|
|
63
69
|
}, [
|
|
64
|
-
|
|
70
|
+
d(t(C), p({
|
|
65
71
|
class: "chip-trigger--text",
|
|
66
72
|
variant: "chipLabel"
|
|
67
|
-
}, t(
|
|
68
|
-
default:
|
|
69
|
-
|
|
73
|
+
}, t(s)[t(i).BUTTON_CONTENT]), {
|
|
74
|
+
default: y(() => [
|
|
75
|
+
V(v(h(t(n))), 1)
|
|
70
76
|
]),
|
|
71
77
|
_: 1
|
|
72
78
|
}, 16),
|
|
73
|
-
|
|
74
|
-
|
|
79
|
+
d(t(C), p({
|
|
80
|
+
class: "chip-trigger--suffix",
|
|
81
|
+
variant: "chipLabel"
|
|
82
|
+
}, t(s)[t(i).BUTTON_CONTENT_SUFFIX]), {
|
|
83
|
+
default: y(() => [
|
|
84
|
+
V(v(g(t(n))), 1)
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
}, 16),
|
|
88
|
+
x(c("div", R, [
|
|
89
|
+
d(t(b), {
|
|
75
90
|
name: "caret-down",
|
|
76
91
|
size: "16px"
|
|
77
92
|
})
|
|
78
93
|
], 512), [
|
|
79
|
-
[
|
|
94
|
+
[_, !r.value]
|
|
80
95
|
]),
|
|
81
|
-
|
|
82
|
-
onClick:
|
|
96
|
+
x(c("div", p({ class: "x-circle-wrapper" }, t(s)[t(i).BUTTON_CLEAR], {
|
|
97
|
+
onClick: $(B, ["stop"])
|
|
83
98
|
}), [
|
|
84
|
-
|
|
99
|
+
d(t(b), {
|
|
85
100
|
name: "x-circle",
|
|
86
101
|
size: "16px",
|
|
87
102
|
type: "fill"
|
|
88
103
|
})
|
|
89
|
-
], 16,
|
|
90
|
-
[
|
|
104
|
+
], 16, z), [
|
|
105
|
+
[_, r.value]
|
|
91
106
|
])
|
|
92
107
|
], 512)
|
|
93
108
|
], 16)
|
|
@@ -17,6 +17,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
17
17
|
searchQuery?: string;
|
|
18
18
|
loadMoreFn?: () => Promise<void>;
|
|
19
19
|
infiniteLoading?: boolean;
|
|
20
|
+
fetchDataDebounceTime?: number;
|
|
21
|
+
autoFocusSearch?: boolean;
|
|
22
|
+
groupedOptions?: boolean;
|
|
23
|
+
optionFlagKey?: string;
|
|
20
24
|
}>, {
|
|
21
25
|
label: string;
|
|
22
26
|
testId: string;
|
|
@@ -27,6 +31,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
27
31
|
searchQuery: string;
|
|
28
32
|
loadMoreFn: any;
|
|
29
33
|
infiniteLoading: boolean;
|
|
34
|
+
fetchDataDebounceTime: number;
|
|
35
|
+
autoFocusSearch: boolean;
|
|
36
|
+
groupedOptions: boolean;
|
|
37
|
+
optionFlagKey: string;
|
|
30
38
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
39
|
"update:selectedCondition": (value: SelectedCondition) => void;
|
|
32
40
|
"update:appliedSelections": (value: unknown) => void;
|
|
@@ -45,6 +53,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
45
53
|
searchQuery?: string;
|
|
46
54
|
loadMoreFn?: () => Promise<void>;
|
|
47
55
|
infiniteLoading?: boolean;
|
|
56
|
+
fetchDataDebounceTime?: number;
|
|
57
|
+
autoFocusSearch?: boolean;
|
|
58
|
+
groupedOptions?: boolean;
|
|
59
|
+
optionFlagKey?: string;
|
|
48
60
|
}>, {
|
|
49
61
|
label: string;
|
|
50
62
|
testId: string;
|
|
@@ -55,6 +67,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
55
67
|
searchQuery: string;
|
|
56
68
|
loadMoreFn: any;
|
|
57
69
|
infiniteLoading: boolean;
|
|
70
|
+
fetchDataDebounceTime: number;
|
|
71
|
+
autoFocusSearch: boolean;
|
|
72
|
+
groupedOptions: boolean;
|
|
73
|
+
optionFlagKey: string;
|
|
58
74
|
}>>> & {
|
|
59
75
|
onClear?: () => any;
|
|
60
76
|
"onUpdate:selectedCondition"?: (value: SelectedCondition) => any;
|
|
@@ -65,10 +81,14 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
65
81
|
isOpen: boolean;
|
|
66
82
|
infiniteLoading: boolean;
|
|
67
83
|
optionNameKey: string;
|
|
84
|
+
optionFlagKey: string;
|
|
85
|
+
groupedOptions: boolean;
|
|
68
86
|
comparingKey: string;
|
|
69
87
|
minCharsToStart: number;
|
|
70
88
|
searchQuery: string;
|
|
71
89
|
loadMoreFn: () => Promise<void>;
|
|
90
|
+
fetchDataDebounceTime: number;
|
|
91
|
+
autoFocusSearch: boolean;
|
|
72
92
|
}>;
|
|
73
93
|
export default _default;
|
|
74
94
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ConditionalDropdown.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../../ConditionalDropdown.
|
|
4
|
-
const
|
|
2
|
+
/* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_8f96cf5a_lang.css"; //*');
|
|
4
|
+
const n = /* @__PURE__ */ _(o, [["__scopeId", "data-v-8f96cf5a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
n as default
|
|
7
7
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import "../../../ConditionalDropdown.
|
|
2
|
-
import
|
|
1
|
+
import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_8f96cf5a_lang.css"; import { defineComponent as $, computed as C, ref as s, watch as w, onMounted as I, openBlock as T, createBlock as j, unref as d, withCtx as f, createVNode as y, mergeProps as q, createElementVNode as G, isRef as H, normalizeProps as J, guardReactiveProps as W, createElementBlock as X, createTextVNode as Y, toDisplayString as Z, createCommentVNode as _ } from "vue";
|
|
2
|
+
import A from "./DropdownV4.vue.js";
|
|
3
3
|
import "./DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "./IconButtonDropdownTrigger.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import ee from "./ChipDropdownTrigger.vue.js";
|
|
6
6
|
import "./AppDropdownTrigger.vue.js";
|
|
7
|
-
import
|
|
7
|
+
import le from "./ButtonDropdownTrigger.vue.js";
|
|
8
8
|
import "./ButtonFilterDropdownTrigger.vue.js";
|
|
9
9
|
import "./TreeDropdown.vue.js";
|
|
10
10
|
import "./OptionV4.vue.js";
|
|
11
11
|
import "./ConditionalDropdown.vue.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { useDebounceFn as
|
|
15
|
-
const
|
|
12
|
+
import ae from "../../search/v4/SearchV4.vue.js";
|
|
13
|
+
import te from "../../typography/v4/Typography.vue.js";
|
|
14
|
+
import { useDebounceFn as oe } from "@vueuse/core";
|
|
15
|
+
const ne = { class: "conditional-container" }, ie = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "custom-list-area"
|
|
18
|
-
},
|
|
18
|
+
}, Oe = /* @__PURE__ */ $({
|
|
19
19
|
__name: "ConditionalDropdown",
|
|
20
20
|
props: {
|
|
21
21
|
selectedCondition: null,
|
|
@@ -30,156 +30,195 @@ const Z = { class: "conditional-container" }, _ = {
|
|
|
30
30
|
isOpen: { type: Boolean, default: !1 },
|
|
31
31
|
searchQuery: { default: "" },
|
|
32
32
|
loadMoreFn: { type: Function, default: null },
|
|
33
|
-
infiniteLoading: { type: Boolean, default: !1 }
|
|
33
|
+
infiniteLoading: { type: Boolean, default: !1 },
|
|
34
|
+
fetchDataDebounceTime: { default: 400 },
|
|
35
|
+
autoFocusSearch: { type: Boolean, default: !0 },
|
|
36
|
+
groupedOptions: { type: Boolean, default: !1 },
|
|
37
|
+
optionFlagKey: { default: "" }
|
|
34
38
|
},
|
|
35
39
|
emits: ["update:selectedCondition", "update:appliedSelections", "clear"],
|
|
36
|
-
setup(
|
|
37
|
-
const e =
|
|
40
|
+
setup(r, { emit: O }) {
|
|
41
|
+
const e = r, h = C({
|
|
38
42
|
get: () => e.appliedSelections,
|
|
39
|
-
set: (
|
|
40
|
-
|
|
43
|
+
set: (l) => {
|
|
44
|
+
O("update:appliedSelections", l);
|
|
41
45
|
}
|
|
42
|
-
}),
|
|
46
|
+
}), n = C({
|
|
43
47
|
get: () => e.selectedCondition || e.conditionalOptions[0],
|
|
44
|
-
set: (
|
|
45
|
-
|
|
48
|
+
set: (l) => {
|
|
49
|
+
O("update:selectedCondition", l);
|
|
46
50
|
}
|
|
47
|
-
}),
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
}), k = s(null), p = s(!0), t = s([]), u = s([]), K = s(!0), c = s(!1), S = s(!1), i = s(e.searchQuery), N = s(""), m = s(e.label), D = s([]), L = C(() => (!i.value || i.value?.length < e.minCharsToStart) && !t.value.length ? `Enter at least ${e.minCharsToStart} keywords to begin` : "No results found"), F = C(() => {
|
|
52
|
+
const l = p.value ? 4 : 4.5, o = t.value.length > 4 ? t.value.length : l;
|
|
53
|
+
if (e.groupedOptions) {
|
|
54
|
+
let a = 0;
|
|
55
|
+
return t.value.forEach((g) => {
|
|
56
|
+
g.options && (a = a + g.options.length);
|
|
57
|
+
}), a > 4 ? a : l;
|
|
58
|
+
}
|
|
59
|
+
return o > l ? o : l;
|
|
60
|
+
}), U = (l, o) => {
|
|
61
|
+
if (e.infiniteLoading && n.value.multi && Array.isArray(u.value) && u.value.length && l && o.length) {
|
|
62
|
+
const a = [], g = u.value.filter(
|
|
63
|
+
(v) => v[e.optionNameKey].includes(l)
|
|
64
|
+
);
|
|
65
|
+
return o.forEach((v) => {
|
|
66
|
+
g.find(
|
|
67
|
+
(z) => z[e.comparingKey] === v[e.comparingKey]
|
|
68
|
+
) && a.push(v[e.comparingKey]);
|
|
69
|
+
}), g.filter(
|
|
70
|
+
(v) => !a.includes(v[e.comparingKey])
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
return [];
|
|
74
|
+
}, B = async (l) => {
|
|
51
75
|
try {
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
76
|
+
c.value = !0;
|
|
77
|
+
const o = await e.fetchFnCallback(l), a = U(
|
|
78
|
+
l,
|
|
79
|
+
o
|
|
80
|
+
);
|
|
81
|
+
t.value = [...a, ...o], c.value = !1;
|
|
82
|
+
} catch (o) {
|
|
83
|
+
c.value = !1, console.error("Error fetching data:", o);
|
|
57
84
|
}
|
|
58
|
-
},
|
|
85
|
+
}, M = async () => {
|
|
59
86
|
if (e.infiniteLoading)
|
|
60
87
|
try {
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
} catch (
|
|
65
|
-
|
|
88
|
+
S.value = !0;
|
|
89
|
+
const l = await e.loadMoreFn();
|
|
90
|
+
S.value = !1, Array.isArray(l) && (t.value = [...t.value, ...l]);
|
|
91
|
+
} catch (l) {
|
|
92
|
+
S.value = !1, console.error("Error fetching data:", l);
|
|
66
93
|
}
|
|
67
|
-
},
|
|
68
|
-
|
|
94
|
+
}, E = oe(
|
|
95
|
+
B,
|
|
96
|
+
e.fetchDataDebounceTime
|
|
97
|
+
), b = (l) => {
|
|
98
|
+
l.length >= e.minCharsToStart ? (E(l), k.value?.scrollTo(0)) : e.infiniteLoading && n.value.multi ? t.value = D.value || [] : t.value = [];
|
|
69
99
|
}, V = () => {
|
|
70
|
-
|
|
71
|
-
name:
|
|
100
|
+
i.value && t.value.length && !c.value && !n.value.multi ? t.value[0].conditionalOptions ? t.value[0] = {
|
|
101
|
+
name: i.value,
|
|
72
102
|
conditionalOptions: !0,
|
|
73
|
-
conditionalName:
|
|
74
|
-
[e.comparingKey]:
|
|
75
|
-
} :
|
|
103
|
+
conditionalName: n.value.label,
|
|
104
|
+
[e.comparingKey]: i.value
|
|
105
|
+
} : t.value = [
|
|
76
106
|
{
|
|
77
|
-
name:
|
|
107
|
+
name: i.value,
|
|
78
108
|
conditionalOptions: !0,
|
|
79
|
-
conditionalName:
|
|
80
|
-
[e.comparingKey]:
|
|
109
|
+
conditionalName: n.value.label,
|
|
110
|
+
[e.comparingKey]: i.value
|
|
81
111
|
},
|
|
82
|
-
...
|
|
83
|
-
] :
|
|
112
|
+
...t.value
|
|
113
|
+
] : t.value.length && t.value[0].conditionalOptions && t.value.shift();
|
|
84
114
|
};
|
|
85
|
-
w(
|
|
86
|
-
|
|
87
|
-
}), w([
|
|
115
|
+
w(i, () => {
|
|
116
|
+
b(i.value);
|
|
117
|
+
}), w([n, t], () => {
|
|
88
118
|
V();
|
|
89
119
|
});
|
|
90
120
|
const x = () => {
|
|
91
|
-
p.value && u.value.length === 0 ? (
|
|
121
|
+
p.value && u.value.length === 0 ? (n.value = null, h.value = [], n.value = null, m.value = e.label) : (N.value = i.value, m.value = `${e.label} ${n.value.label.toLowerCase()}`, h.value = p.value ? [...u.value] : { ...u.value }, K.value = p.value);
|
|
92
122
|
};
|
|
93
|
-
w(
|
|
94
|
-
|
|
95
|
-
|
|
123
|
+
w(n, (l, o) => {
|
|
124
|
+
n.value.multi ? (c.value = !0, !o.multi && l.multi && Array.isArray(e.appliedSelections) && (u.value = e.appliedSelections), setTimeout(() => {
|
|
125
|
+
c.value = !1, p.value = !0;
|
|
96
126
|
}, 100)) : setTimeout(() => {
|
|
97
127
|
p.value = !1;
|
|
98
128
|
}, 100);
|
|
99
129
|
});
|
|
100
|
-
const
|
|
101
|
-
|
|
130
|
+
const Q = (l) => {
|
|
131
|
+
D.value = l;
|
|
132
|
+
}, P = () => {
|
|
133
|
+
u.value = [], h.value = [], n.value = null, m.value = e.label, i.value = "", O("clear");
|
|
134
|
+
}, R = (l) => {
|
|
135
|
+
l && n.value.multi && e.infiniteLoading && u.value && (t.value = u.value, i.value && b(i.value));
|
|
102
136
|
};
|
|
103
|
-
return
|
|
104
|
-
e.searchQuery &&
|
|
105
|
-
}), (
|
|
137
|
+
return I(() => {
|
|
138
|
+
(e.searchQuery || !e.infiniteLoading) && b(e.searchQuery);
|
|
139
|
+
}), (l, o) => (T(), j(d(A), {
|
|
106
140
|
ref_key: "dropdownRef",
|
|
107
|
-
ref:
|
|
141
|
+
ref: k,
|
|
108
142
|
selected: u.value,
|
|
109
|
-
"onUpdate:selected":
|
|
143
|
+
"onUpdate:selected": o[2] || (o[2] = (a) => u.value = a),
|
|
110
144
|
"predefined-trigger": "chip",
|
|
111
|
-
"display-value": (
|
|
145
|
+
"display-value": (a) => a?.[r.optionNameKey],
|
|
112
146
|
multi: p.value,
|
|
113
|
-
options:
|
|
147
|
+
options: t.value,
|
|
114
148
|
placeholder: m.value,
|
|
115
149
|
"search-placeholder": "Search",
|
|
116
|
-
"option-name-key":
|
|
150
|
+
"option-name-key": r.optionNameKey,
|
|
117
151
|
"with-conditions": "",
|
|
118
152
|
"inline-search": "",
|
|
119
|
-
"custom-number-of-displayed-options":
|
|
153
|
+
"custom-number-of-displayed-options": d(F),
|
|
120
154
|
"options-list-width": "330px",
|
|
121
|
-
loading:
|
|
122
|
-
"load-more-loading":
|
|
123
|
-
"comparing-key":
|
|
124
|
-
"is-open":
|
|
125
|
-
"infinite-loading":
|
|
126
|
-
|
|
155
|
+
loading: c.value,
|
|
156
|
+
"load-more-loading": S.value,
|
|
157
|
+
"comparing-key": r.comparingKey,
|
|
158
|
+
"is-open": r.isOpen,
|
|
159
|
+
"infinite-loading": r.infiniteLoading,
|
|
160
|
+
"show-select-all": !r.infiniteLoading && !i.value,
|
|
161
|
+
"grouped-options": r.groupedOptions,
|
|
162
|
+
"option-flag-key": r.optionFlagKey,
|
|
163
|
+
"onUpdate:isOpen": R,
|
|
164
|
+
onOnsearch: b,
|
|
127
165
|
onApply: x,
|
|
128
|
-
onLoadMore:
|
|
166
|
+
onLoadMore: M,
|
|
167
|
+
onUnsavedSelectionUpdate: Q
|
|
129
168
|
}, {
|
|
130
|
-
"dropdown-trigger":
|
|
131
|
-
|
|
169
|
+
"dropdown-trigger": f(({ defaultTriggerProps: a }) => [
|
|
170
|
+
y(d(ee), q(a, {
|
|
132
171
|
label: m.value,
|
|
133
|
-
"selected-option":
|
|
134
|
-
multi:
|
|
172
|
+
"selected-option": d(h),
|
|
173
|
+
multi: K.value,
|
|
135
174
|
"cancel-all-selected-display": "",
|
|
136
175
|
"display-value-in-quotes": !Array.isArray(u.value) && u.value.conditionalOptions,
|
|
137
|
-
onClear:
|
|
176
|
+
onClear: P
|
|
138
177
|
}), null, 16, ["label", "selected-option", "multi", "display-value-in-quotes"])
|
|
139
178
|
]),
|
|
140
|
-
"dropdown-conditions":
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
selected:
|
|
144
|
-
"onUpdate:selected":
|
|
145
|
-
options:
|
|
179
|
+
"dropdown-conditions": f(() => [
|
|
180
|
+
G("div", ne, [
|
|
181
|
+
y(d(A), {
|
|
182
|
+
selected: d(n),
|
|
183
|
+
"onUpdate:selected": o[0] || (o[0] = (a) => H(n) ? n.value = a : null),
|
|
184
|
+
options: r.conditionalOptions,
|
|
146
185
|
"option-name-key": "label",
|
|
147
|
-
"display-value": (
|
|
186
|
+
"display-value": (a) => a?.label,
|
|
148
187
|
container: ".conditional-container",
|
|
149
188
|
size: "small"
|
|
150
189
|
}, {
|
|
151
|
-
"dropdown-trigger":
|
|
152
|
-
|
|
190
|
+
"dropdown-trigger": f(({ buttonTriggerProps: a }) => [
|
|
191
|
+
y(d(le), J(W(a)), null, 16)
|
|
153
192
|
]),
|
|
154
193
|
_: 1
|
|
155
194
|
}, 8, ["selected", "options", "display-value"])
|
|
156
195
|
])
|
|
157
196
|
]),
|
|
158
|
-
"inline-search":
|
|
159
|
-
|
|
160
|
-
modelValue:
|
|
161
|
-
"onUpdate:modelValue":
|
|
197
|
+
"inline-search": f(() => [
|
|
198
|
+
y(d(ae), {
|
|
199
|
+
modelValue: i.value,
|
|
200
|
+
"onUpdate:modelValue": o[1] || (o[1] = (a) => i.value = a),
|
|
162
201
|
class: "inline-search",
|
|
163
202
|
placeholder: "Search",
|
|
164
203
|
variant: "transparent",
|
|
165
204
|
size: "md",
|
|
166
|
-
"auto-focus":
|
|
167
|
-
}, null, 8, ["modelValue"])
|
|
205
|
+
"auto-focus": r.autoFocusSearch
|
|
206
|
+
}, null, 8, ["modelValue", "auto-focus"])
|
|
168
207
|
]),
|
|
169
|
-
"custom-list-area":
|
|
170
|
-
!
|
|
171
|
-
|
|
172
|
-
default:
|
|
173
|
-
|
|
208
|
+
"custom-list-area": f(() => [
|
|
209
|
+
!t.value.length && !c.value ? (T(), X("div", ie, [
|
|
210
|
+
y(te, { variant: "body1" }, {
|
|
211
|
+
default: f(() => [
|
|
212
|
+
Y(Z(d(L)), 1)
|
|
174
213
|
]),
|
|
175
214
|
_: 1
|
|
176
215
|
})
|
|
177
|
-
])) :
|
|
216
|
+
])) : _("", !0)
|
|
178
217
|
]),
|
|
179
218
|
_: 1
|
|
180
|
-
}, 8, ["selected", "display-value", "multi", "options", "placeholder", "option-name-key", "custom-number-of-displayed-options", "loading", "load-more-loading", "comparing-key", "is-open", "infinite-loading"]));
|
|
219
|
+
}, 8, ["selected", "display-value", "multi", "options", "placeholder", "option-name-key", "custom-number-of-displayed-options", "loading", "load-more-loading", "comparing-key", "is-open", "infinite-loading", "show-select-all", "grouped-options", "option-flag-key"]));
|
|
181
220
|
}
|
|
182
221
|
});
|
|
183
222
|
export {
|
|
184
|
-
|
|
223
|
+
Oe as default
|
|
185
224
|
};
|
|
@@ -134,6 +134,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
134
134
|
onsearch: (value: string) => void;
|
|
135
135
|
loadMore: () => void;
|
|
136
136
|
allSelectedChanged: (value: boolean) => void;
|
|
137
|
+
unsavedSelectionUpdate: (value: unknown[]) => void;
|
|
137
138
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
138
139
|
modelValue?: unknown;
|
|
139
140
|
selected?: unknown;
|
|
@@ -264,6 +265,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
264
265
|
"onUpdate:isOpen"?: (value: unknown) => any;
|
|
265
266
|
onOnsearch?: (value: string) => any;
|
|
266
267
|
onLoadMore?: () => any;
|
|
268
|
+
onUnsavedSelectionUpdate?: (value: unknown[]) => any;
|
|
267
269
|
onOpened?: () => any;
|
|
268
270
|
onClosed?: () => any;
|
|
269
271
|
}, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "./DropdownV4.vue2.js";
|
|
2
2
|
/* empty css *//* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../DropdownV4.
|
|
3
|
+
// import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_75002075_lang.css"; //*');
|
|
4
4
|
// import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; //');
|
|
5
|
-
const r = /* @__PURE__ */ _(o, [["__scopeId", "data-v-
|
|
5
|
+
const r = /* @__PURE__ */ _(o, [["__scopeId", "data-v-75002075"]]);
|
|
6
6
|
export {
|
|
7
7
|
r as default
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../DropdownV4.
|
|
1
|
+
import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_75002075_lang.css"; import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; import { defineComponent as fe, computed as U, openBlock as n, createElementBlock as r, mergeProps as y, unref as t, renderSlot as f, createElementVNode as m, createVNode as i, withCtx as u, Transition as me, normalizeClass as O, normalizeStyle as pe, createTextVNode as T, createCommentVNode as a, isRef as ge, toDisplayString as G, withModifiers as W, Fragment as Te, renderList as ke, toRaw as C, createBlock as X, resolveDynamicComponent as he } from "vue";
|
|
2
2
|
import L from "../../button/v4/ButtonV4.vue.js";
|
|
3
3
|
import "../../button/v4/IconButtonV4.vue.js";
|
|
4
4
|
import "../../button/v4/ButtonGroup.vue.js";
|
|
@@ -36,7 +36,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
|
|
|
36
36
|
}, Me = {
|
|
37
37
|
key: 1,
|
|
38
38
|
class: "actions-wrapper"
|
|
39
|
-
}, He = { class: "actions-clear-all" },
|
|
39
|
+
}, He = { class: "actions-clear-all" }, Ue = { class: "actions-apply-cancel" }, Tt = /* @__PURE__ */ fe({
|
|
40
40
|
__name: "DropdownV4",
|
|
41
41
|
props: {
|
|
42
42
|
modelValue: { default: null },
|
|
@@ -101,7 +101,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
|
|
|
101
101
|
overrideOptionCountCalculation: { type: Function, default: null },
|
|
102
102
|
withConditions: { type: Boolean, default: !1 }
|
|
103
103
|
},
|
|
104
|
-
emits: ["update:selected", "update:isOpen", "closed", "opened", "apply", "selectAll", "clear", "copyToClipboard", "onsearch", "loadMore", "allSelectedChanged"],
|
|
104
|
+
emits: ["update:selected", "update:isOpen", "closed", "opened", "apply", "selectAll", "clear", "copyToClipboard", "onsearch", "loadMore", "allSelectedChanged", "unsavedSelectionUpdate"],
|
|
105
105
|
setup(e, { expose: j, emit: B }) {
|
|
106
106
|
const d = e, F = {
|
|
107
107
|
MULTILINE_LIST_HEIGHT: 48,
|
|
@@ -142,7 +142,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
|
|
|
142
142
|
onClearAllSelections: z,
|
|
143
143
|
clearAll: ue,
|
|
144
144
|
isGroup: ce
|
|
145
|
-
} = Ke(d, B, F), g = Ae(d.testId, p), $ =
|
|
145
|
+
} = Ke(d, B, F), g = Ae(d.testId, p), $ = U(() => !d.predefinedTrigger || d.predefinedTrigger === k.DEFAULT ? be : d.predefinedTrigger === k.APP ? ve : null), { width: M } = Ee(R), ye = U(() => d.optionsListWidth ? d.optionsListWidth : !d.predefinedTrigger || d.predefinedTrigger === k.DEFAULT || d.predefinedTrigger === k.APP ? M.value - 2 > 240 ? `${M.value - 2}px` : `${F.DROPLIST_MIN_WIDTH}px` : "auto"), H = () => {
|
|
146
146
|
I();
|
|
147
147
|
};
|
|
148
148
|
return j({
|
|
@@ -242,7 +242,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
|
|
|
242
242
|
!t(_).length && !e.loading && !e.withConditions ? (n(), r("li", Re, [
|
|
243
243
|
i(t(Y), y({ variant: "body2" }, t(g)[t(p).NO_RESULT]), {
|
|
244
244
|
default: u(() => [
|
|
245
|
-
T(
|
|
245
|
+
T(G(e.noResultsText), 1)
|
|
246
246
|
]),
|
|
247
247
|
_: 1
|
|
248
248
|
}, 16)
|
|
@@ -279,7 +279,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
|
|
|
279
279
|
e.groupedOptions && t(ce)(o) ? f(c.$slots, "group-option", { key: 0 }, () => [
|
|
280
280
|
i(Le, null, {
|
|
281
281
|
default: u(() => [
|
|
282
|
-
T(
|
|
282
|
+
T(G(e.displayValue(o) || o[e.optionNameKey]), 1)
|
|
283
283
|
]),
|
|
284
284
|
_: 2
|
|
285
285
|
}, 1024)
|
|
@@ -339,7 +339,7 @@ const Be = ["tabindex"], Fe = { style: { width: "100%" } }, Ne = { key: 0 }, Ve
|
|
|
339
339
|
_: 1
|
|
340
340
|
}, 16)
|
|
341
341
|
]),
|
|
342
|
-
m("div",
|
|
342
|
+
m("div", Ue, [
|
|
343
343
|
i(t(L), y(
|
|
344
344
|
{
|
|
345
345
|
ref_key: "cancel",
|