@ironsource/shared-ui 2.1.11-test.5 → 2.1.11-test.50
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/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_1aa6df01_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_277fde76_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_27802170_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/DateRangeV4.vue_vue_type_style_index_0_scoped_309e5351_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/EditableV4.vue_vue_type_style_index_0_scoped_1bbe222a_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/IconFlag.vue_vue_type_style_index_0_scoped_be9dc7bb_lang.css +1 -0
- package/InlineCopy.vue_vue_type_style_index_0_scoped_ad48b61e_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_2c2947b3_lang.css +1 -0
- package/PopoverV4.vue_vue_type_style_index_0_scoped_66694b4e_lang.css +1 -0
- package/README.md +4 -15
- package/SnackbarV4.vue_vue_type_style_index_0_scoped_89fe8aa1_lang.css +1 -0
- package/SortableItem.vue_vue_type_style_index_0_scoped_2ca7b24c_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_8f267f88_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_fce3948c_lang.css +1 -0
- package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
- package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_c81a7d3e_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_1_lang.css +1 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +1 -0
- package/Typography.vue_vue_type_style_index_0_scoped_5714d43e_lang.css +1 -0
- package/components/autocomplete/Autocomplete.vue2.js +3 -2
- package/components/button/v4/ToggleButtonGroupAB.vue.d.ts +3 -1
- package/components/button/v4/ToggleButtonGroupAB.vue.js +2 -2
- package/components/button/v4/ToggleButtonGroupAB.vue2.js +44 -39
- package/components/button/v4/index.d.ts +9 -3
- package/components/chart/Chart.vue.d.ts +16 -3
- package/components/chart/Chart.vue.js +5 -5
- package/components/chart/Chart.vue2.js +127 -110
- 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/SettingsHeader.vue2.js +3 -2
- package/components/chart/index.d.ts +55 -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/datePicker/v4/DatePickerV4.vue2.js +8 -7
- package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
- package/components/dateRange/v4/DateRangeV4.vue2.js +9 -9
- 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 +200 -189
- package/components/dropdown/v3/Dropdown.vue.d.ts +2 -2
- package/components/dropdown/v3/index.d.ts +39 -39
- package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +1 -1
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.d.ts +15 -0
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +42 -20
- package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +7 -7
- package/components/dropdown/v4/ChipDropdownTrigger.vue.d.ts +10 -0
- package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +88 -47
- package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +110 -0
- package/components/dropdown/v4/ConditionalDropdown.vue.js +7 -0
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +224 -0
- package/components/dropdown/v4/DropdownV4.vue.d.ts +32 -11
- package/components/dropdown/v4/DropdownV4.vue.js +3 -3
- package/components/dropdown/v4/DropdownV4.vue2.js +153 -138
- package/components/dropdown/v4/OptionV4.vue.d.ts +10 -0
- package/components/dropdown/v4/OptionV4.vue.js +2 -2
- package/components/dropdown/v4/OptionV4.vue2.js +135 -98
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +6 -1
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +165 -120
- package/components/dropdown/v4/index.d.ts +443 -110
- package/components/dropdown/v4/index.js +6 -3
- 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 +2 -2
- package/components/filtersPanel/v4/FiltersPanelV4.vue2.js +8 -9
- package/components/forms/FormCard.vue.js +3 -3
- package/components/forms/FormCard.vue2.js +1 -1
- package/components/icon/v4/IconFlag.vue.js +3 -3
- package/components/icon/v4/IconFlag.vue2.js +1 -1
- package/components/icon/v4/consts.d.ts +1 -1
- package/components/icon/v4/consts.js +1 -1
- package/components/inlineCopy/InlineCopy.vue.d.ts +5 -0
- package/components/inlineCopy/InlineCopy.vue.js +2 -2
- package/components/inlineCopy/InlineCopy.vue2.js +24 -22
- package/components/inlineCopy/index.d.ts +9 -0
- package/components/input/v4/TextField.vue.js +3 -3
- package/components/input/v4/TextField.vue2.js +185 -165
- package/components/multibar/MultiBarMenu.vue2.js +3 -2
- package/components/popover/v4/PopoverV4.vue.d.ts +14 -2
- package/components/popover/v4/PopoverV4.vue.js +4 -3
- package/components/popover/v4/PopoverV4.vue2.js +40 -24
- package/components/popover/v4/index.d.ts +55 -11
- 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.d.ts +5 -0
- package/components/sortableList/SortableItem.vue.js +2 -2
- package/components/sortableList/SortableItem.vue2.js +86 -70
- package/components/sortableList/SortableItemLabel.vue.js +3 -3
- package/components/sortableList/SortableItemLabel.vue2.js +20 -23
- package/components/sortableList/SortableList.vue.d.ts +17 -1
- package/components/sortableList/SortableList.vue.js +4 -4
- package/components/sortableList/SortableList.vue2.js +113 -94
- package/components/sortableList/index.d.ts +63 -5
- package/components/table/common/Table.common.d.ts +1 -1
- package/components/table/common/Table.common.js +83 -77
- package/components/table/common/Table.types.d.ts +1 -1
- package/components/table/common/consts.d.ts +4 -0
- package/components/table/common/consts.js +7 -0
- package/components/table/v3/Table.vue.d.ts +1 -1
- package/components/table/v3/index.d.ts +5 -5
- package/components/table/v4/DataGrid.vue.d.ts +12 -2
- package/components/table/v4/DataGrid.vue.js +2 -2
- package/components/table/v4/DataGrid.vue2.js +164 -155
- package/components/table/v4/DataGridMenu.vue.js +5 -5
- package/components/table/v4/DataGridMenu.vue2.js +4 -3
- package/components/table/v4/MultipleDataGrid.vue.d.ts +1 -1
- package/components/table/v4/index.d.ts +84 -46
- package/components/table-cells/common/Editable.common.js +29 -23
- 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 +3 -3
- package/components/table-cells/v4/EditableV4.vue2.js +11 -10
- package/components/table-cells/v4/index.d.ts +20 -1
- package/components/tooltip/v4/TooltipV4.vue.d.ts +10 -0
- package/components/tooltip/v4/TooltipV4.vue.js +3 -3
- package/components/tooltip/v4/TooltipV4.vue2.js +24 -21
- package/components/tooltip/v4/index.d.ts +39 -1
- package/components/typography/v4/Typography.vue.js +3 -3
- package/components/typography/v4/Typography.vue2.js +24 -18
- package/design-foundation.stories/icons/iconsData.d.ts +1 -1
- package/index.d.ts +1626 -366
- package/index.js +1 -1
- package/mocks/options.d.ts +48 -6
- package/mocks/words.d.ts +1 -1
- package/package.json +2 -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 +2 -0
- package/testids/index.js +13 -13
- package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_76c74f58_lang.css +0 -1
- package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_7f750550_lang.css +0 -1
- package/Chart.vue_vue_type_style_index_0_scoped_ea1e5c3e_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_49bd7193_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_0cd8af73_lang.css +0 -1
- package/DataGridMenu.vue_vue_type_style_index_0_scoped_a6e4672f_lang.css +0 -1
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_f81413ec_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_e899ec7a_lang.css +0 -1
- package/EditableV4.vue_vue_type_style_index_0_scoped_e0c047b4_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_39061862_lang.css +0 -1
- package/FormCard.vue_vue_type_style_index_0_scoped_c7965a69_lang.css +0 -1
- package/IconFlag.vue_vue_type_style_index_0_scoped_7b09cc85_lang.css +0 -1
- package/InlineCopy.vue_vue_type_style_index_0_scoped_893a203c_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_4070942a_lang.css +0 -1
- package/PopoverV4.vue_vue_type_style_index_0_scoped_74bbce13_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/TextField.vue_vue_type_style_index_0_scoped_4d9bf5b2_lang.css +0 -1
- package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_9d9e51c0_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_fcdb9d02_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_6ac5f602_lang.css +0 -1
- package/Typography.vue_vue_type_style_index_0_scoped_992962bc_lang.css +0 -1
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import "../../../TreeDropdown.
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css"; import { defineComponent as ee, provide as ne, ref as c, computed as K, onMounted as le, watch as g, openBlock as C, createBlock as D, unref as d, withCtx as f, createVNode as I, mergeProps as z, createSlots as te, renderSlot as oe, createElementVNode as M, withModifiers as S, createTextVNode as ie, createElementBlock as B, withDirectives as de, Fragment as ae, renderList as re, vShow as se, createCommentVNode as ce } from "vue";
|
|
2
|
+
import ue from "./DropdownV4.vue.js";
|
|
3
|
+
import pe from "./DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "./IconButtonDropdownTrigger.vue.js";
|
|
5
5
|
import "./ChipDropdownTrigger.vue.js";
|
|
6
6
|
import "./AppDropdownTrigger.vue.js";
|
|
7
7
|
import "./ButtonDropdownTrigger.vue.js";
|
|
8
8
|
import "./ButtonFilterDropdownTrigger.vue.js";
|
|
9
9
|
import "./TreeDropdown.vue.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
10
|
+
import w from "./OptionV4.vue.js";
|
|
11
|
+
import "./ConditionalDropdown.vue.js";
|
|
12
|
+
import { useChildOptions as ye } from "../composables/useChildOptions.js";
|
|
13
|
+
import fe from "../../search/v4/SearchV4.vue.js";
|
|
14
|
+
import { useTestIdAttrs as he } from "../../../utils/testIds.js";
|
|
15
|
+
import { DropdownTestIdModifiers as $ } from "../../../testids/index.js";
|
|
16
|
+
const ve = {
|
|
14
17
|
key: 0,
|
|
15
18
|
class: "child-options"
|
|
16
|
-
},
|
|
19
|
+
}, qe = /* @__PURE__ */ ee({
|
|
17
20
|
__name: "TreeDropdown",
|
|
18
21
|
props: {
|
|
19
22
|
options: null,
|
|
@@ -31,6 +34,7 @@ const ae = {
|
|
|
31
34
|
optionIconType: { default: null },
|
|
32
35
|
optionEndIconKey: { default: "" },
|
|
33
36
|
optionEndIconType: { default: null },
|
|
37
|
+
optionEndTextIconKey: { default: null },
|
|
34
38
|
valueToCopy: { default: null },
|
|
35
39
|
disabledOptionKey: { default: "disabled" },
|
|
36
40
|
optionChildrenKey: null,
|
|
@@ -38,107 +42,121 @@ const ae = {
|
|
|
38
42
|
preExpandedOptions: null
|
|
39
43
|
},
|
|
40
44
|
emits: ["update:selected", "update:isOpen"],
|
|
41
|
-
setup(t, { emit:
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
setup(t, { emit: b }) {
|
|
46
|
+
const n = t;
|
|
47
|
+
ne("isTreeDropdown", !0);
|
|
48
|
+
const m = c([]), u = c([]), T = c({}), O = c(!1), i = c([...n.selected]), p = c(""), x = c(!0), N = K(() => u.value.reduce((e, o) => (o[n.optionChildrenKey] && o[n.optionChildrenKey].length && o[n.optionChildrenKey].forEach(() => {
|
|
49
|
+
e = e + 1;
|
|
50
|
+
}), o[n.optionChildrenKey] || (e = e + 1), e), 0)), U = () => {
|
|
51
|
+
n.options.forEach((e) => {
|
|
52
|
+
e[n.optionChildrenKey] && e[n.optionChildrenKey].length && (T.value[e[n.optionUniqueIdKey]] = [
|
|
53
|
+
...e[n.optionChildrenKey]
|
|
48
54
|
]);
|
|
49
|
-
}),
|
|
50
|
-
}, { hasChildren:
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
(
|
|
55
|
+
}), m.value = [...n.options], u.value = [...n.options];
|
|
56
|
+
}, { hasChildren: h, getChildren: v, allChildrenSelected: k, someChildrenSelected: P } = ye(i, n.optionChildrenKey), q = (e) => {
|
|
57
|
+
if (h(e)) {
|
|
58
|
+
k(e) ? i.value = i.value.filter(
|
|
59
|
+
(o) => !v(e).includes(o)
|
|
54
60
|
) : i.value = [
|
|
55
|
-
...i.value.filter((
|
|
56
|
-
...
|
|
61
|
+
...i.value.filter((o) => !v(e).includes(o)),
|
|
62
|
+
...v(e)
|
|
57
63
|
];
|
|
58
64
|
return;
|
|
59
65
|
}
|
|
60
|
-
i.value.includes(
|
|
61
|
-
(
|
|
62
|
-
) : i.value = [...i.value,
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
+
i.value.includes(e) ? i.value = i.value.filter(
|
|
67
|
+
(o) => o !== e
|
|
68
|
+
) : i.value = [...i.value, e];
|
|
69
|
+
}, A = (e) => i.value.includes(e), J = (e) => 1 + (h(e) ? v(e).length : 0), j = () => {
|
|
70
|
+
b("update:selected", i.value), L.value = y.value;
|
|
71
|
+
}, F = () => {
|
|
66
72
|
i.value = [];
|
|
67
|
-
},
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
if (
|
|
71
|
-
|
|
72
|
-
else if (
|
|
73
|
-
for (const
|
|
74
|
-
if (
|
|
75
|
-
|
|
73
|
+
}, G = () => {
|
|
74
|
+
const e = /* @__PURE__ */ new Set([]);
|
|
75
|
+
u.value.forEach((l) => {
|
|
76
|
+
if (n.selected?.includes(l))
|
|
77
|
+
e.add(l);
|
|
78
|
+
else if (l[n.optionChildrenKey] && l[n.optionChildrenKey].length) {
|
|
79
|
+
for (const r of l[n.optionChildrenKey])
|
|
80
|
+
if (n.selected?.includes(r)) {
|
|
81
|
+
e.add(l);
|
|
76
82
|
break;
|
|
77
83
|
}
|
|
78
84
|
}
|
|
79
85
|
});
|
|
80
|
-
const
|
|
81
|
-
return
|
|
82
|
-
!
|
|
83
|
-
}),
|
|
86
|
+
const o = Array.from(e);
|
|
87
|
+
return u.value.forEach((l) => {
|
|
88
|
+
!n.selected.includes(l) && !e.has(l) && o.push(l);
|
|
89
|
+
}), o;
|
|
84
90
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
a.value[
|
|
91
|
+
le(() => {
|
|
92
|
+
O.value || (U(), O.value = !0, n.preExpandedOptions && n.preExpandedOptions.forEach((e) => {
|
|
93
|
+
a.value[e] = 1;
|
|
88
94
|
}));
|
|
89
|
-
}),
|
|
90
|
-
() =>
|
|
95
|
+
}), g(
|
|
96
|
+
() => n.options,
|
|
91
97
|
() => {
|
|
92
|
-
|
|
98
|
+
U();
|
|
93
99
|
}
|
|
94
|
-
),
|
|
95
|
-
() =>
|
|
96
|
-
() => {
|
|
97
|
-
i.value = [...
|
|
100
|
+
), g(
|
|
101
|
+
() => n.selected,
|
|
102
|
+
(e, o) => {
|
|
103
|
+
JSON.stringify(e) !== JSON.stringify(o) && (i.value = [...n.selected]);
|
|
98
104
|
}
|
|
99
|
-
)
|
|
100
|
-
|
|
105
|
+
);
|
|
106
|
+
const y = K(() => i.value.length < N.value ? !1 : i.value.length === N.value), H = K(() => !y.value && i.value.length > 0), L = c(y.value);
|
|
107
|
+
g(
|
|
108
|
+
() => n.isOpen,
|
|
101
109
|
() => {
|
|
102
|
-
|
|
110
|
+
n.isOpen ? m.value = G() : (i.value = [...n.selected], p.value = "");
|
|
103
111
|
}
|
|
104
112
|
);
|
|
105
|
-
const a = c({}),
|
|
106
|
-
a.value[n
|
|
113
|
+
const a = c({}), Q = (e) => {
|
|
114
|
+
a.value[e[n.optionUniqueIdKey]] ? delete a.value[e[n.optionUniqueIdKey]] : a.value[e[n.optionUniqueIdKey]] = 1;
|
|
107
115
|
};
|
|
108
|
-
function
|
|
109
|
-
const
|
|
110
|
-
return
|
|
111
|
-
const
|
|
112
|
-
(
|
|
116
|
+
function R(e, o) {
|
|
117
|
+
const l = e.toLowerCase(), r = [];
|
|
118
|
+
return o.value.forEach((s) => {
|
|
119
|
+
const E = s[n.optionNameKey].toLowerCase().includes(l), V = T.value[s[n.optionUniqueIdKey]]?.filter(
|
|
120
|
+
(_) => _[n.optionNameKey].toLowerCase().includes(l)
|
|
113
121
|
) || [];
|
|
114
|
-
(
|
|
115
|
-
}),
|
|
122
|
+
(E || V.length > 0) && (s[n.optionChildrenKey] = V, r.push(s));
|
|
123
|
+
}), r;
|
|
116
124
|
}
|
|
117
|
-
const
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
delete a.value[
|
|
121
|
-
}),
|
|
122
|
-
Array.isArray(
|
|
123
|
-
})),
|
|
124
|
-
},
|
|
125
|
-
const
|
|
126
|
-
(
|
|
125
|
+
const W = (e) => {
|
|
126
|
+
const o = R(e, u);
|
|
127
|
+
e && (Object.keys(a.value).forEach((l) => {
|
|
128
|
+
delete a.value[l];
|
|
129
|
+
}), o.forEach((l) => {
|
|
130
|
+
Array.isArray(l[n.optionChildrenKey]) && l[n.optionChildrenKey].length && (a.value[l[n.optionUniqueIdKey]] = 1);
|
|
131
|
+
})), m.value = o;
|
|
132
|
+
}, X = K(() => {
|
|
133
|
+
const e = n.options.length, o = n.options.reduce(
|
|
134
|
+
(l, r) => (a.value[r[n.optionUniqueIdKey]] && (l = l + r[n.optionChildrenKey].length), l),
|
|
127
135
|
0
|
|
128
136
|
);
|
|
129
|
-
return
|
|
137
|
+
return e + o;
|
|
130
138
|
});
|
|
131
|
-
|
|
132
|
-
() =>
|
|
139
|
+
g(
|
|
140
|
+
() => p.value,
|
|
133
141
|
() => {
|
|
134
|
-
|
|
142
|
+
W(p.value), x.value = !p.value;
|
|
135
143
|
}
|
|
136
|
-
)
|
|
144
|
+
);
|
|
145
|
+
const Y = () => {
|
|
146
|
+
y.value ? i.value = [] : (i.value = [], u.value.forEach((e) => {
|
|
147
|
+
if (e[n.optionChildrenKey] && e[n.optionChildrenKey].length)
|
|
148
|
+
for (const o of e[n.optionChildrenKey])
|
|
149
|
+
i.value = [o, ...i.value];
|
|
150
|
+
else
|
|
151
|
+
i.value = [e, ...i.value];
|
|
152
|
+
}));
|
|
153
|
+
}, Z = he(n.testId, $);
|
|
154
|
+
return (e, o) => (C(), D(d(ue), {
|
|
137
155
|
multi: "",
|
|
138
156
|
class: "tree-dropdown",
|
|
139
|
-
"show-select-all":
|
|
157
|
+
"show-select-all": x.value,
|
|
140
158
|
"is-open": t.isOpen,
|
|
141
|
-
options:
|
|
159
|
+
options: m.value,
|
|
142
160
|
selected: t.selected,
|
|
143
161
|
"display-value": t.displayValue,
|
|
144
162
|
placeholder: t.placeholder,
|
|
@@ -149,29 +167,33 @@ const ae = {
|
|
|
149
167
|
"test-id": t.testId,
|
|
150
168
|
disabled: t.disabled,
|
|
151
169
|
"disable-virtual-scroll": "",
|
|
152
|
-
"override-option-count-calculation":
|
|
170
|
+
"override-option-count-calculation": J,
|
|
153
171
|
"trigger-show-all-selected-text": !1,
|
|
154
172
|
"predefined-trigger": "default",
|
|
155
|
-
"custom-number-of-displayed-options": d(
|
|
156
|
-
"onUpdate:isOpen":
|
|
157
|
-
onApply:
|
|
158
|
-
onClear:
|
|
173
|
+
"custom-number-of-displayed-options": d(X),
|
|
174
|
+
"onUpdate:isOpen": o[2] || (o[2] = (l) => b("update:isOpen", l)),
|
|
175
|
+
onApply: j,
|
|
176
|
+
onClear: F
|
|
159
177
|
}, {
|
|
160
|
-
"dropdown-trigger":
|
|
161
|
-
|
|
162
|
-
|
|
178
|
+
"dropdown-trigger": f(({ defaultTriggerProps: l }) => [
|
|
179
|
+
I(d(pe), z(l, {
|
|
180
|
+
"all-selected": L.value,
|
|
181
|
+
"show-all-selected-text": ""
|
|
182
|
+
}), te({ _: 2 }, [
|
|
183
|
+
e.$slots["trigger-end-icon"] ? {
|
|
163
184
|
name: "end-icon",
|
|
164
|
-
fn:
|
|
165
|
-
|
|
185
|
+
fn: f(() => [
|
|
186
|
+
oe(e.$slots, "trigger-end-icon", {}, void 0, !0)
|
|
166
187
|
]),
|
|
167
188
|
key: "0"
|
|
168
189
|
} : void 0
|
|
169
|
-
]), 1040)
|
|
190
|
+
]), 1040, ["all-selected"])
|
|
170
191
|
]),
|
|
171
|
-
"inline-search":
|
|
172
|
-
|
|
173
|
-
modelValue:
|
|
174
|
-
"onUpdate:modelValue":
|
|
192
|
+
"inline-search": f(() => [
|
|
193
|
+
I(d(fe), {
|
|
194
|
+
modelValue: p.value,
|
|
195
|
+
"onUpdate:modelValue": o[0] || (o[0] = (l) => p.value = l),
|
|
196
|
+
class: "tree-search",
|
|
175
197
|
placeholder: t.inlineSearchPlaceholder,
|
|
176
198
|
variant: "transparent",
|
|
177
199
|
size: "md",
|
|
@@ -179,50 +201,73 @@ const ae = {
|
|
|
179
201
|
"test-id": t.testId
|
|
180
202
|
}, null, 8, ["modelValue", "placeholder", "test-id"])
|
|
181
203
|
]),
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
204
|
+
"select-all": f(() => [
|
|
205
|
+
M("li", null, [
|
|
206
|
+
I(d(w), z({
|
|
207
|
+
"aria-selected": d(y),
|
|
208
|
+
"aria-disabled": !!t.disabled,
|
|
209
|
+
"selected-prop": d(y),
|
|
210
|
+
"is-indeterminate": d(H),
|
|
211
|
+
"is-multi": "",
|
|
212
|
+
"select-all-option": ""
|
|
213
|
+
}, d(Z)[d($).SELECT_ALL], {
|
|
214
|
+
onClick: o[1] || (o[1] = S((l) => Y(), ["stop"]))
|
|
215
|
+
}), {
|
|
216
|
+
default: f(() => [
|
|
217
|
+
ie(" Select all ")
|
|
218
|
+
]),
|
|
219
|
+
_: 1
|
|
220
|
+
}, 16, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate"])
|
|
221
|
+
])
|
|
222
|
+
]),
|
|
223
|
+
default: f(({ option: l, index: r }) => [
|
|
224
|
+
I(d(w), {
|
|
225
|
+
option: l,
|
|
226
|
+
"selected-prop": d(h)(l) ? d(k)(l) : A(l),
|
|
227
|
+
"is-indeterminate": !d(k)(l) && d(P)(l),
|
|
228
|
+
disabled: l[t.disabledOptionKey],
|
|
188
229
|
"name-key": t.optionNameKey,
|
|
189
230
|
"image-key": t.optionImageKey,
|
|
190
231
|
"icon-key": t.optionIconKey,
|
|
191
232
|
"icon-type": t.optionIconType,
|
|
192
233
|
"end-icon-key": t.optionEndIconKey,
|
|
193
234
|
"end-icon-type": t.optionEndIconType,
|
|
194
|
-
"
|
|
195
|
-
"tree-main-option
|
|
235
|
+
"end-text-icon-key": t.optionEndTextIconKey,
|
|
236
|
+
"tree-main-option": d(h)(l),
|
|
237
|
+
"tree-main-option-expanded": a.value[l[t.optionUniqueIdKey]],
|
|
196
238
|
"stop-option-click-event-propagation": "",
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
239
|
+
"is-multi": "",
|
|
240
|
+
onClick: S(() => q(l), ["stop"]),
|
|
241
|
+
onToggleTreeCollapse: Q
|
|
242
|
+
}, null, 8, ["option", "selected-prop", "is-indeterminate", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "end-text-icon-key", "tree-main-option", "tree-main-option-expanded", "onClick"]),
|
|
243
|
+
d(h)(l) ? (C(), B("div", ve, [
|
|
244
|
+
de(M("div", null, [
|
|
245
|
+
(C(!0), B(ae, null, re(d(v)(l), (s, E) => (C(), D(d(w), {
|
|
246
|
+
key: `${r}-${E}`,
|
|
247
|
+
option: s,
|
|
248
|
+
"selected-prop": A(s),
|
|
249
|
+
disabled: s[t.disabledOptionKey],
|
|
207
250
|
"name-key": t.optionNameKey,
|
|
208
251
|
"image-key": t.optionImageKey,
|
|
209
252
|
"icon-key": t.optionIconKey,
|
|
210
253
|
"icon-type": t.optionIconType,
|
|
211
254
|
"end-icon-key": t.optionEndIconKey,
|
|
212
255
|
"end-icon-type": t.optionEndIconType,
|
|
213
|
-
"
|
|
256
|
+
"end-text-icon-key": t.optionEndTextIconKey,
|
|
257
|
+
"tree-child-shown": a.value[l[t.optionUniqueIdKey]],
|
|
214
258
|
"stop-option-click-event-propagation": "",
|
|
215
|
-
|
|
216
|
-
|
|
259
|
+
"is-multi": "",
|
|
260
|
+
onClick: S(() => q(s), ["stop"])
|
|
261
|
+
}, null, 8, ["option", "selected-prop", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "end-text-icon-key", "tree-child-shown", "onClick"]))), 128))
|
|
217
262
|
], 512), [
|
|
218
|
-
[
|
|
263
|
+
[se, a.value[l[t.optionUniqueIdKey]]]
|
|
219
264
|
])
|
|
220
|
-
])) :
|
|
265
|
+
])) : ce("", !0)
|
|
221
266
|
]),
|
|
222
267
|
_: 3
|
|
223
|
-
}, 8, ["is-open", "options", "selected", "display-value", "placeholder", "inline-search-placeholder", "option-name-key", "size", "test-id", "disabled", "custom-number-of-displayed-options"]));
|
|
268
|
+
}, 8, ["show-select-all", "is-open", "options", "selected", "display-value", "placeholder", "inline-search-placeholder", "option-name-key", "size", "test-id", "disabled", "custom-number-of-displayed-options"]));
|
|
224
269
|
}
|
|
225
270
|
});
|
|
226
271
|
export {
|
|
227
|
-
|
|
272
|
+
qe as default
|
|
228
273
|
};
|