@ironsource/shared-ui 2.1.12-test.98 → 2.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Chart.vue_vue_type_style_index_0_scoped_060d02be_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_d90c583e_lang.css +1 -0
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_ca558859_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_9c4df598_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_a685cf5e_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_9623dbbd_lang.css +1 -0
- package/ColumnConfigurator.vue_vue_type_style_index_0_scoped_702ad52e_lang.css +1 -0
- package/ColumnPicker.vue_vue_type_style_index_0_scoped_ea8c7024_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_8cc86a27_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_cd41c5ca_lang.css +1 -0
- package/DataGridContainer.vue_vue_type_style_index_0_scoped_9a30b10c_lang.css +1 -0
- package/DataGridHeader.vue_vue_type_style_index_0_scoped_0e826456_lang.css +1 -0
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_e38c881a_lang.css +1 -0
- package/DialogFooter.vue_vue_type_style_index_0_scoped_8b7f64fe_lang.css +1 -0
- package/DialogHeader.vue_vue_type_style_index_0_scoped_9a814ec3_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_cc99f1e3_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_a594c97e_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_1_lang.css +1 -1
- package/EmptyStateV4.vue_vue_type_style_index_0_scoped_76757f22_lang.css +1 -0
- package/Link.vue_vue_type_style_index_0_scoped_1a766750_lang.css +1 -0
- package/LoaderBars.vue_vue_type_style_index_0_scoped_d976ec65_lang.css +1 -0
- package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_3caa1d7b_lang.css +1 -0
- package/OptionChip.vue_vue_type_style_index_0_scoped_538e4a21_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_752a357d_lang.css +1 -0
- package/RadioButton.vue_vue_type_style_index_0_scoped_dac25b9f_lang.css +1 -0
- package/RemoveButton.vue_vue_type_style_index_0_scoped_ca7fc11d_lang.css +1 -0
- package/SectionDropdown.vue_vue_type_style_index_0_scoped_cfad60a8_lang.css +1 -0
- package/SectionHeaderText.vue_vue_type_style_index_0_scoped_0b8d3d79_lang.css +1 -0
- package/{SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_lang.css → SettingsHeader.vue_vue_type_style_index_0_scoped_a869d327_lang.css} +1 -1
- package/ShowMoreLink.vue_vue_type_style_index_0_scoped_9fc3bc1b_lang.css +1 -0
- package/SortableItem.vue_vue_type_style_index_0_scoped_c72be7ed_lang.css +1 -0
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_a534c7af_lang.css +1 -0
- package/SortableList.vue_vue_type_style_index_0_scoped_9aec4e9b_lang.css +1 -0
- package/SortableSelectableList.vue_vue_type_style_index_0_scoped_40b0a4de_lang.css +1 -0
- package/TagsField.vue_vue_type_style_index_0_scoped_9760426b_lang.css +1 -0
- package/TagsFieldChip.vue_vue_type_style_index_0_scoped_d186b7ef_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_3b7a3661_lang.css +1 -0
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_da3532aa_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_0_scoped_8a451e54_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_63dc057e_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +21 -1
- package/components/chart/Chart.vue.js +3 -3
- package/components/chart/Chart.vue2.js +130 -114
- package/components/chart/ChartHeader.vue.d.ts +5 -0
- package/components/chart/ChartHeader.vue.js +3 -3
- package/components/chart/ChartHeader.vue2.js +49 -44
- package/components/chart/ChartHeaderTrend.vue.d.ts +5 -0
- package/components/chart/ChartHeaderTrend.vue.js +2 -2
- package/components/chart/ChartHeaderTrend.vue2.js +43 -39
- package/components/chart/ChartLegend.vue.d.ts +5 -0
- package/components/chart/ChartLegend.vue.js +3 -3
- package/components/chart/ChartLegend.vue2.js +76 -71
- package/components/chart/ChartPlane.vue.d.ts +15 -0
- package/components/chart/ChartPlane.vue.js +5 -5
- package/components/chart/ChartPlane.vue2.js +173 -156
- package/components/chart/ChartStoryArgs.d.ts +17 -0
- package/components/chart/ChartTooltip.vue.d.ts +5 -0
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +39 -35
- package/components/chart/LegendSorting.vue.d.ts +5 -0
- package/components/chart/LegendSorting.vue.js +16 -14
- package/components/chart/SettingsHeader.vue.d.ts +19 -3
- package/components/chart/SettingsHeader.vue.js +3 -3
- package/components/chart/SettingsHeader.vue2.js +36 -29
- package/components/chart/TooltipHeader.vue.js +3 -3
- package/components/chart/TooltipHeader.vue2.js +26 -26
- package/components/chart/colorPalette.d.ts +2 -1
- package/components/chart/colorPalette.js +47 -33
- package/components/chart/composables/useColorsMap.d.ts +3 -1
- package/components/chart/composables/useColorsMap.js +32 -30
- package/components/chart/consts.d.ts +5 -1
- package/components/chart/consts.js +30 -26
- package/components/chart/index.d.ts +77 -1
- package/components/chart/mockData.d.ts +15 -0
- package/components/chart/types.d.ts +3 -1
- package/components/chart/types.js +5 -5
- package/components/chart/utils/utils.d.ts +1 -1
- package/components/chart/utils/utils.js +20 -14
- package/components/columnConfigurator/ColumnConfigurator.types.d.ts +12 -0
- package/components/columnConfigurator/ColumnConfigurator.vue.d.ts +61 -0
- package/components/columnConfigurator/ColumnConfigurator.vue.js +7 -0
- package/components/columnConfigurator/ColumnConfigurator.vue2.js +113 -0
- package/components/columnConfigurator/SectionDropdown.vue.d.ts +39 -0
- package/components/columnConfigurator/SectionDropdown.vue.js +7 -0
- package/components/columnConfigurator/SectionDropdown.vue2.js +57 -0
- package/components/columnConfigurator/SectionHeaderText.vue.d.ts +34 -0
- package/components/columnConfigurator/SectionHeaderText.vue.js +7 -0
- package/components/columnConfigurator/SectionHeaderText.vue2.js +22 -0
- package/components/columnConfigurator/ShowMoreLink.vue.d.ts +33 -0
- package/components/columnConfigurator/ShowMoreLink.vue.js +7 -0
- package/components/columnConfigurator/ShowMoreLink.vue2.js +41 -0
- package/components/columnConfigurator/consts.d.ts +1 -0
- package/components/columnConfigurator/consts.js +4 -0
- package/components/columnConfigurator/index.d.ts +73 -0
- package/components/columnConfigurator/index.js +6 -0
- package/components/columnConfigurator/mockData.d.ts +30 -0
- package/components/columnConfigurator/utils.d.ts +2 -0
- package/components/columnConfigurator/utils.js +18 -0
- package/components/columnPicker/ColumnPicker.vue.d.ts +119 -0
- package/components/columnPicker/ColumnPicker.vue.js +7 -0
- package/components/columnPicker/ColumnPicker.vue2.js +322 -0
- package/components/columnPicker/OptionChip.vue.d.ts +53 -0
- package/components/columnPicker/OptionChip.vue.js +7 -0
- package/components/columnPicker/OptionChip.vue2.js +46 -0
- package/components/columnPicker/RemoveButton.vue.d.ts +38 -0
- package/components/columnPicker/RemoveButton.vue.js +7 -0
- package/components/columnPicker/RemoveButton.vue2.js +35 -0
- package/components/columnPicker/index.d.ts +388 -0
- package/components/columnPicker/index.js +6 -0
- package/components/columnPicker/mockData.d.ts +8 -0
- package/components/dateRange/common/DateRange.common.js +60 -60
- package/components/dialog/v3/Dialog.vue.d.ts +3 -3
- package/components/dialog/v3/index.d.ts +46 -46
- package/components/dialog/v4/DialogFooter.vue.d.ts +78 -0
- package/components/dialog/v4/DialogFooter.vue.js +7 -0
- package/components/dialog/v4/DialogFooter.vue2.js +60 -0
- package/components/dialog/v4/DialogHeader.vue.d.ts +60 -0
- package/components/dialog/v4/DialogHeader.vue.js +7 -0
- package/components/dialog/v4/DialogHeader.vue2.js +58 -0
- package/components/dialog/v4/DialogV4.vue.d.ts +9 -9
- package/components/dialog/v4/DialogV4.vue.js +3 -3
- package/components/dialog/v4/DialogV4.vue2.js +65 -107
- package/components/dialog/v4/index.d.ts +157 -157
- package/components/dropdown/v3/Dropdown.vue.d.ts +1 -1
- package/components/dropdown/v3/index.d.ts +20 -20
- package/components/dropdown/v4/ConditionalDropdown.vue.js +3 -3
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +194 -187
- package/components/dropdown/v4/DropdownV4.vue.d.ts +7 -0
- package/components/dropdown/v4/DropdownV4.vue.js +3 -3
- package/components/dropdown/v4/DropdownV4.vue2.js +118 -107
- package/components/dropdown/v4/OptionV4.vue.d.ts +5 -0
- package/components/dropdown/v4/OptionV4.vue.js +3 -3
- package/components/dropdown/v4/OptionV4.vue2.js +83 -70
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +10 -0
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +155 -151
- package/components/dropdown/v4/index.d.ts +81 -3
- package/components/emptyState/v4/EmptyStateV4.vue.d.ts +5 -0
- package/components/emptyState/v4/EmptyStateV4.vue.js +2 -2
- package/components/emptyState/v4/EmptyStateV4.vue2.js +37 -34
- package/components/emptyState/v4/index.d.ts +20 -1
- package/components/includeExclude/IncludeExcludeChipFilter.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeOption.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeOptionDraggable.vue.d.ts +1 -1
- package/components/includeExclude/index.d.ts +70 -70
- package/components/input/v4/TextField.vue.d.ts +12 -0
- package/components/input/v4/TextField.vue.js +3 -3
- package/components/input/v4/TextField.vue2.js +129 -105
- package/components/input/v4/index.d.ts +46 -2
- package/components/link/Link.vue.d.ts +95 -0
- package/components/link/Link.vue.js +7 -0
- package/components/link/Link.vue2.js +65 -0
- package/components/link/index.d.ts +296 -0
- package/components/link/index.js +6 -0
- package/components/radioButton/v3/RadioButton.vue.d.ts +5 -0
- package/components/radioButton/v3/RadioButton.vue.js +3 -3
- package/components/radioButton/v3/RadioButton.vue2.js +42 -39
- package/components/radioButton/v3/index.d.ts +20 -1
- package/components/sortableList/LoaderBars.vue.d.ts +34 -0
- package/components/sortableList/LoaderBars.vue.js +7 -0
- package/components/sortableList/LoaderBars.vue2.js +25 -0
- package/components/sortableList/SortableItem.vue.d.ts +17 -2
- package/components/sortableList/SortableItem.vue.js +5 -5
- package/components/sortableList/SortableItem.vue2.js +86 -70
- package/components/sortableList/SortableItemLabel.vue.js +3 -3
- package/components/sortableList/SortableItemLabel.vue2.js +26 -23
- package/components/sortableList/SortableList.types.d.ts +1 -0
- package/components/sortableList/SortableList.vue.d.ts +12 -2
- package/components/sortableList/SortableList.vue.js +5 -5
- package/components/sortableList/SortableList.vue2.js +111 -113
- package/components/sortableList/SortableSelectableList.vue.d.ts +107 -0
- package/components/sortableList/SortableSelectableList.vue.js +7 -0
- package/components/sortableList/SortableSelectableList.vue2.js +128 -0
- package/components/sortableList/composables/useDraggableHelpers.d.ts +5 -0
- package/components/sortableList/composables/useDraggableHelpers.js +20 -0
- package/components/sortableList/composables/useHoverEffect.js +1 -1
- package/components/sortableList/consts.d.ts +2 -0
- package/components/sortableList/consts.js +4 -2
- package/components/sortableList/index.d.ts +77 -39
- package/components/table/common/consts.d.ts +2 -0
- package/components/table/common/consts.js +6 -4
- package/components/table/v4/DataGrid.vue.d.ts +12 -7
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +273 -268
- package/components/table/v4/DataGridContainer.vue.d.ts +10 -0
- package/components/table/v4/DataGridContainer.vue.js +7 -0
- package/components/table/v4/DataGridContainer.vue2.js +19 -0
- package/components/table/v4/DataGridHeader.vue.d.ts +85 -0
- package/components/table/v4/DataGridHeader.vue.js +7 -0
- package/components/table/v4/DataGridHeader.vue2.js +84 -0
- package/components/table/v4/DataGridRowsCounter.vue.js +3 -3
- package/components/table/v4/DataGridRowsCounter.vue2.js +12 -12
- package/components/table/v4/MultipleDataGrid.vue.d.ts +8 -7
- package/components/table/v4/MultipleDataGrid.vue.js +2 -2
- package/components/table/v4/MultipleDataGrid.vue2.js +92 -90
- package/components/table/v4/index.d.ts +646 -332
- package/components/table/v4/index.js +11 -5
- package/components/table/v4/storyUtils.d.ts +25 -0
- package/components/tagsField/TagsField.types.d.ts +4 -0
- package/components/tagsField/TagsField.vue.d.ts +65 -0
- package/components/tagsField/TagsField.vue.js +7 -0
- package/components/tagsField/TagsField.vue2.js +90 -0
- package/components/tagsField/TagsFieldChip.vue.d.ts +45 -0
- package/components/tagsField/TagsFieldChip.vue.js +7 -0
- package/components/tagsField/TagsFieldChip.vue2.js +81 -0
- package/components/tagsField/consts.d.ts +1 -0
- package/components/tagsField/consts.js +4 -0
- package/components/tagsField/index.d.ts +75 -0
- package/components/tagsField/index.js +6 -0
- package/components/tooltip/v4/TooltipV4.vue.d.ts +5 -0
- package/components/tooltip/v4/TooltipV4.vue.js +2 -2
- package/components/tooltip/v4/TooltipV4.vue2.js +18 -17
- package/components/tooltip/v4/index.d.ts +20 -1
- package/index.d.ts +2675 -1649
- package/index.js +137 -121
- package/package.json +18 -1
- package/testids/index.d.ts +47 -1
- package/testids/index.js +40 -32
- package/utils/date.d.ts +1 -0
- package/utils/date.js +9 -0
- package/utils/formatNumbers.d.ts +1 -1
- package/utils/formatNumbers.js +38 -21
- package/utils/object.d.ts +2 -0
- package/utils/object.js +9 -5
- package/utils/search.js +1 -1
- package/Chart.vue_vue_type_style_index_0_scoped_e8f25a03_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_af520313_lang.css +0 -1
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_db8a902c_lang.css +0 -1
- package/ChartLegend.vue_vue_type_style_index_0_scoped_6103d8bd_lang.css +0 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_4f67d41d_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_e53c6287_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_f5204c04_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_b21a79b1_lang.css +0 -1
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_ef699ec5_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_eb226e31_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_934163c0_lang.css +0 -1
- package/EmptyStateV4.vue_vue_type_style_index_0_scoped_18728498_lang.css +0 -1
- package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_020a9896_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_0287cebf_lang.css +0 -1
- package/RadioButton.vue_vue_type_style_index_0_scoped_3c6b715c_lang.css +0 -1
- package/SortableItem.vue_vue_type_style_index_0_scoped_48542664_lang.css +0 -1
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css +0 -1
- package/SortableList.vue_vue_type_style_index_0_scoped_8f267f88_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_fce3948c_lang.css +0 -1
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_bcb40ed4_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../TreeDropdown.
|
|
1
|
+
import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_63dc057e_lang.css"; import { defineComponent as te, provide as ne, ref as s, computed as m, onMounted as le, watch as b, openBlock as K, createBlock as D, unref as a, withCtx as f, createVNode as k, mergeProps as z, createSlots as ie, renderSlot as oe, createElementVNode as M, withModifiers as E, createTextVNode as ae, createElementBlock as B, withDirectives as de, Fragment as re, renderList as ce, vShow as se, createCommentVNode as ue } from "vue";
|
|
2
2
|
import pe from "./DropdownV4.vue.js";
|
|
3
3
|
import ye from "./DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "./IconButtonDropdownTrigger.vue.js";
|
|
@@ -7,16 +7,16 @@ import "./AppDropdownTrigger.vue.js";
|
|
|
7
7
|
import "./ButtonDropdownTrigger.vue.js";
|
|
8
8
|
import "./ButtonFilterDropdownTrigger.vue.js";
|
|
9
9
|
import "./TreeDropdown.vue.js";
|
|
10
|
-
import
|
|
10
|
+
import S from "./OptionV4.vue.js";
|
|
11
11
|
import "./ConditionalDropdown.vue.js";
|
|
12
|
-
import { useChildOptions as
|
|
13
|
-
import
|
|
12
|
+
import { useChildOptions as fe } from "../composables/useChildOptions.js";
|
|
13
|
+
import he from "../../search/v4/SearchV4.vue.js";
|
|
14
14
|
import { useTestIdAttrs as ve } from "../../../utils/testIds.js";
|
|
15
|
-
import { DropdownTestIdModifiers as
|
|
16
|
-
const
|
|
15
|
+
import { DropdownTestIdModifiers as F } from "../../../testids/index.js";
|
|
16
|
+
const ge = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "child-options"
|
|
19
|
-
},
|
|
19
|
+
}, Ve = /* @__PURE__ */ te({
|
|
20
20
|
__name: "TreeDropdown",
|
|
21
21
|
props: {
|
|
22
22
|
options: null,
|
|
@@ -39,230 +39,234 @@ const me = {
|
|
|
39
39
|
disabledOptionKey: { default: "disabled" },
|
|
40
40
|
optionChildrenKey: null,
|
|
41
41
|
optionUniqueIdKey: null,
|
|
42
|
-
preExpandedOptions: null
|
|
42
|
+
preExpandedOptions: null,
|
|
43
|
+
triggerFeedbackText: { default: "" },
|
|
44
|
+
triggerFeedbackVariant: { default: null }
|
|
43
45
|
},
|
|
44
46
|
emits: ["update:selected", "update:isOpen"],
|
|
45
|
-
setup(
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
const
|
|
47
|
+
setup(l, { emit: w }) {
|
|
48
|
+
const t = l;
|
|
49
|
+
ne("isTreeDropdown", !0);
|
|
50
|
+
const g = s([]), u = s([]), T = s({}), x = s(!1), o = s([...t.selected]), p = s(""), O = s(!0), N = m(() => u.value.reduce((e, i) => (i[t.optionChildrenKey] && i[t.optionChildrenKey].length && i[t.optionChildrenKey].forEach(() => {
|
|
49
51
|
e = e + 1;
|
|
50
|
-
}),
|
|
51
|
-
|
|
52
|
-
e[
|
|
53
|
-
...e[
|
|
52
|
+
}), i[t.optionChildrenKey] || (e = e + 1), e), 0)), U = () => {
|
|
53
|
+
t.options.forEach((e) => {
|
|
54
|
+
e[t.optionChildrenKey] && e[t.optionChildrenKey].length && (T.value[e[t.optionUniqueIdKey]] = [
|
|
55
|
+
...e[t.optionChildrenKey]
|
|
54
56
|
]);
|
|
55
|
-
}),
|
|
56
|
-
}, { hasChildren:
|
|
57
|
-
if (
|
|
58
|
-
|
|
59
|
-
(
|
|
60
|
-
) :
|
|
61
|
-
...
|
|
57
|
+
}), g.value = [...t.options], u.value = [...t.options];
|
|
58
|
+
}, { hasChildren: h, getChildren: v, allChildrenSelected: C, someChildrenSelected: $ } = fe(o, t.optionChildrenKey), q = (e) => {
|
|
59
|
+
if (h(e)) {
|
|
60
|
+
C(e) ? o.value = o.value.filter(
|
|
61
|
+
(i) => !v(e).includes(i)
|
|
62
|
+
) : o.value = [
|
|
63
|
+
...o.value.filter((i) => !v(e).includes(i)),
|
|
62
64
|
...v(e)
|
|
63
65
|
];
|
|
64
66
|
return;
|
|
65
67
|
}
|
|
66
|
-
|
|
67
|
-
(
|
|
68
|
-
) :
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
|
|
68
|
+
o.value.includes(e) ? o.value = o.value.filter(
|
|
69
|
+
(i) => i !== e
|
|
70
|
+
) : o.value = [...o.value, e];
|
|
71
|
+
}, V = (e) => o.value.includes(e), P = (e) => 1 + (h(e) ? v(e).length : 0), J = () => {
|
|
72
|
+
w("update:selected", o.value), A.value = y.value;
|
|
73
|
+
}, j = () => {
|
|
74
|
+
o.value = [];
|
|
73
75
|
}, G = () => {
|
|
74
76
|
const e = /* @__PURE__ */ new Set([]);
|
|
75
|
-
u.value.forEach((
|
|
76
|
-
if (
|
|
77
|
-
e.add(
|
|
78
|
-
else if (
|
|
79
|
-
for (const
|
|
80
|
-
if (
|
|
81
|
-
e.add(
|
|
77
|
+
u.value.forEach((n) => {
|
|
78
|
+
if (t.selected?.includes(n))
|
|
79
|
+
e.add(n);
|
|
80
|
+
else if (n[t.optionChildrenKey] && n[t.optionChildrenKey].length) {
|
|
81
|
+
for (const r of n[t.optionChildrenKey])
|
|
82
|
+
if (t.selected?.includes(r)) {
|
|
83
|
+
e.add(n);
|
|
82
84
|
break;
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
87
|
});
|
|
86
|
-
const
|
|
87
|
-
return u.value.forEach((
|
|
88
|
-
!
|
|
89
|
-
}),
|
|
88
|
+
const i = Array.from(e);
|
|
89
|
+
return u.value.forEach((n) => {
|
|
90
|
+
!t.selected.includes(n) && !e.has(n) && i.push(n);
|
|
91
|
+
}), i;
|
|
90
92
|
};
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
le(() => {
|
|
94
|
+
x.value || (U(), x.value = !0, t.preExpandedOptions && t.preExpandedOptions.forEach((e) => {
|
|
95
|
+
d.value[e] = 1;
|
|
94
96
|
}));
|
|
95
|
-
}),
|
|
96
|
-
() =>
|
|
97
|
+
}), b(
|
|
98
|
+
() => t.options,
|
|
97
99
|
() => {
|
|
98
100
|
U();
|
|
99
101
|
}
|
|
100
|
-
),
|
|
101
|
-
() =>
|
|
102
|
-
(e,
|
|
103
|
-
JSON.stringify(e) !== JSON.stringify(
|
|
102
|
+
), b(
|
|
103
|
+
() => t.selected,
|
|
104
|
+
(e, i) => {
|
|
105
|
+
JSON.stringify(e) !== JSON.stringify(i) && (o.value = [...t.selected]);
|
|
104
106
|
}
|
|
105
107
|
);
|
|
106
|
-
const y =
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
|
|
108
|
+
const y = m(() => o.value.length < N.value ? !1 : o.value.length === N.value), H = m(() => !y.value && o.value.length > 0), A = s(y.value), Q = (e) => {
|
|
109
|
+
w("update:isOpen", e), t.isOpen ? g.value = G() : (o.value = [...t.selected], p.value = "");
|
|
110
|
+
}, d = s({}), R = (e) => {
|
|
111
|
+
d.value[e[t.optionUniqueIdKey]] ? delete d.value[e[t.optionUniqueIdKey]] : d.value[e[t.optionUniqueIdKey]] = 1;
|
|
110
112
|
};
|
|
111
|
-
function W(e,
|
|
112
|
-
const
|
|
113
|
-
return
|
|
114
|
-
const
|
|
115
|
-
(ee) => ee[
|
|
113
|
+
function W(e, i) {
|
|
114
|
+
const n = e.toLowerCase(), r = [];
|
|
115
|
+
return i.value.forEach((c) => {
|
|
116
|
+
const I = c[t.optionNameKey].toLowerCase().includes(n), L = T.value[c[t.optionUniqueIdKey]]?.filter(
|
|
117
|
+
(ee) => ee[t.optionNameKey].toLowerCase().includes(n)
|
|
116
118
|
) || [];
|
|
117
|
-
(
|
|
118
|
-
}),
|
|
119
|
+
(I || L.length > 0) && (c[t.optionChildrenKey] = L, r.push(c));
|
|
120
|
+
}), r;
|
|
119
121
|
}
|
|
120
122
|
const X = (e) => {
|
|
121
|
-
const
|
|
122
|
-
e && (Object.keys(
|
|
123
|
-
delete
|
|
124
|
-
}),
|
|
125
|
-
Array.isArray(
|
|
126
|
-
})),
|
|
127
|
-
}, Y =
|
|
128
|
-
const e =
|
|
129
|
-
(
|
|
123
|
+
const i = W(e, u);
|
|
124
|
+
e && (Object.keys(d.value).forEach((n) => {
|
|
125
|
+
delete d.value[n];
|
|
126
|
+
}), i.forEach((n) => {
|
|
127
|
+
Array.isArray(n[t.optionChildrenKey]) && n[t.optionChildrenKey].length && (d.value[n[t.optionUniqueIdKey]] = 1);
|
|
128
|
+
})), g.value = i;
|
|
129
|
+
}, Y = m(() => {
|
|
130
|
+
const e = t.options.length, i = t.options.reduce(
|
|
131
|
+
(n, r) => (d.value[r[t.optionUniqueIdKey]] && (n = n + r[t.optionChildrenKey].length), n),
|
|
130
132
|
0
|
|
131
133
|
);
|
|
132
|
-
return e +
|
|
134
|
+
return e + i;
|
|
133
135
|
});
|
|
134
|
-
|
|
136
|
+
b(
|
|
135
137
|
() => p.value,
|
|
136
138
|
() => {
|
|
137
|
-
X(p.value),
|
|
139
|
+
X(p.value), O.value = !p.value;
|
|
138
140
|
}
|
|
139
141
|
);
|
|
140
142
|
const Z = () => {
|
|
141
|
-
y.value ?
|
|
142
|
-
if (e[
|
|
143
|
-
for (const
|
|
144
|
-
|
|
143
|
+
y.value ? o.value = [] : (o.value = [], u.value.forEach((e) => {
|
|
144
|
+
if (e[t.optionChildrenKey] && e[t.optionChildrenKey].length)
|
|
145
|
+
for (const i of e[t.optionChildrenKey])
|
|
146
|
+
o.value = [i, ...o.value];
|
|
145
147
|
else
|
|
146
|
-
|
|
148
|
+
o.value = [e, ...o.value];
|
|
147
149
|
}));
|
|
148
|
-
}, _ = ve(
|
|
149
|
-
return (e,
|
|
150
|
+
}, _ = ve(t.testId, F);
|
|
151
|
+
return (e, i) => (K(), D(a(pe), {
|
|
150
152
|
multi: "",
|
|
151
153
|
class: "tree-dropdown",
|
|
152
|
-
"show-select-all":
|
|
153
|
-
"is-open":
|
|
154
|
-
options:
|
|
155
|
-
selected:
|
|
156
|
-
"display-value":
|
|
157
|
-
placeholder:
|
|
154
|
+
"show-select-all": O.value,
|
|
155
|
+
"is-open": l.isOpen,
|
|
156
|
+
options: g.value,
|
|
157
|
+
selected: l.selected,
|
|
158
|
+
"display-value": l.displayValue,
|
|
159
|
+
placeholder: l.placeholder,
|
|
158
160
|
"inline-search": "",
|
|
159
|
-
"inline-search-placeholder":
|
|
160
|
-
"option-name-key":
|
|
161
|
-
size:
|
|
162
|
-
"test-id":
|
|
163
|
-
disabled:
|
|
161
|
+
"inline-search-placeholder": l.inlineSearchPlaceholder,
|
|
162
|
+
"option-name-key": l.optionNameKey,
|
|
163
|
+
size: l.size,
|
|
164
|
+
"test-id": l.testId,
|
|
165
|
+
disabled: l.disabled,
|
|
164
166
|
"disable-virtual-scroll": "",
|
|
165
|
-
"override-option-count-calculation":
|
|
167
|
+
"override-option-count-calculation": P,
|
|
166
168
|
"trigger-show-all-selected-text": !1,
|
|
167
169
|
"predefined-trigger": "default",
|
|
168
|
-
"custom-number-of-displayed-options":
|
|
170
|
+
"custom-number-of-displayed-options": a(Y),
|
|
171
|
+
"trigger-feedback-text": l.triggerFeedbackText,
|
|
172
|
+
"trigger-feedback-variant": l.triggerFeedbackVariant,
|
|
169
173
|
"onUpdate:isOpen": Q,
|
|
170
|
-
onApply:
|
|
171
|
-
onClear:
|
|
174
|
+
onApply: J,
|
|
175
|
+
onClear: j
|
|
172
176
|
}, {
|
|
173
|
-
"dropdown-trigger":
|
|
174
|
-
|
|
175
|
-
"all-selected":
|
|
177
|
+
"dropdown-trigger": f(({ defaultTriggerProps: n }) => [
|
|
178
|
+
k(a(ye), z(n, {
|
|
179
|
+
"all-selected": A.value,
|
|
176
180
|
"show-all-selected-text": ""
|
|
177
|
-
}),
|
|
181
|
+
}), ie({ _: 2 }, [
|
|
178
182
|
e.$slots["trigger-end-icon"] ? {
|
|
179
183
|
name: "end-icon",
|
|
180
|
-
fn:
|
|
181
|
-
|
|
184
|
+
fn: f(() => [
|
|
185
|
+
oe(e.$slots, "trigger-end-icon", {}, void 0, !0)
|
|
182
186
|
]),
|
|
183
187
|
key: "0"
|
|
184
188
|
} : void 0
|
|
185
189
|
]), 1040, ["all-selected"])
|
|
186
190
|
]),
|
|
187
|
-
"inline-search":
|
|
188
|
-
|
|
191
|
+
"inline-search": f(() => [
|
|
192
|
+
k(a(he), {
|
|
189
193
|
modelValue: p.value,
|
|
190
|
-
"onUpdate:modelValue":
|
|
194
|
+
"onUpdate:modelValue": i[0] || (i[0] = (n) => p.value = n),
|
|
191
195
|
class: "tree-search",
|
|
192
|
-
placeholder:
|
|
196
|
+
placeholder: l.inlineSearchPlaceholder,
|
|
193
197
|
variant: "transparent",
|
|
194
198
|
size: "md",
|
|
195
199
|
"auto-focus": "",
|
|
196
|
-
"test-id":
|
|
200
|
+
"test-id": l.testId
|
|
197
201
|
}, null, 8, ["modelValue", "placeholder", "test-id"])
|
|
198
202
|
]),
|
|
199
|
-
"select-all":
|
|
203
|
+
"select-all": f(() => [
|
|
200
204
|
M("li", null, [
|
|
201
|
-
|
|
202
|
-
"aria-selected":
|
|
203
|
-
"aria-disabled": !!
|
|
204
|
-
"selected-prop":
|
|
205
|
-
"is-indeterminate":
|
|
205
|
+
k(a(S), z({
|
|
206
|
+
"aria-selected": a(y),
|
|
207
|
+
"aria-disabled": !!l.disabled,
|
|
208
|
+
"selected-prop": a(y),
|
|
209
|
+
"is-indeterminate": a(H),
|
|
206
210
|
"is-multi": "",
|
|
207
211
|
"select-all-option": ""
|
|
208
|
-
},
|
|
209
|
-
onClick:
|
|
212
|
+
}, a(_)[a(F).SELECT_ALL], {
|
|
213
|
+
onClick: i[1] || (i[1] = E((n) => Z(), ["stop"]))
|
|
210
214
|
}), {
|
|
211
|
-
default:
|
|
212
|
-
|
|
215
|
+
default: f(() => [
|
|
216
|
+
ae(" Select all ")
|
|
213
217
|
]),
|
|
214
218
|
_: 1
|
|
215
219
|
}, 16, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate"])
|
|
216
220
|
])
|
|
217
221
|
]),
|
|
218
|
-
default:
|
|
219
|
-
|
|
220
|
-
option:
|
|
221
|
-
"selected-prop":
|
|
222
|
-
"is-indeterminate": !
|
|
223
|
-
disabled: l
|
|
224
|
-
"name-key":
|
|
225
|
-
"image-key":
|
|
226
|
-
"icon-key":
|
|
227
|
-
"icon-type":
|
|
228
|
-
"end-icon-key":
|
|
229
|
-
"end-icon-type":
|
|
230
|
-
"end-text-icon-key":
|
|
231
|
-
"tree-main-option":
|
|
232
|
-
"tree-main-option-expanded":
|
|
222
|
+
default: f(({ option: n, index: r }) => [
|
|
223
|
+
k(a(S), {
|
|
224
|
+
option: n,
|
|
225
|
+
"selected-prop": a(h)(n) ? a(C)(n) : V(n),
|
|
226
|
+
"is-indeterminate": !a(C)(n) && a($)(n),
|
|
227
|
+
disabled: n[l.disabledOptionKey],
|
|
228
|
+
"name-key": l.optionNameKey,
|
|
229
|
+
"image-key": l.optionImageKey,
|
|
230
|
+
"icon-key": l.optionIconKey,
|
|
231
|
+
"icon-type": l.optionIconType,
|
|
232
|
+
"end-icon-key": l.optionEndIconKey,
|
|
233
|
+
"end-icon-type": l.optionEndIconType,
|
|
234
|
+
"end-text-icon-key": l.optionEndTextIconKey,
|
|
235
|
+
"tree-main-option": a(h)(n),
|
|
236
|
+
"tree-main-option-expanded": d.value[n[l.optionUniqueIdKey]],
|
|
233
237
|
"stop-option-click-event-propagation": "",
|
|
234
238
|
"is-multi": "",
|
|
235
|
-
onClick:
|
|
239
|
+
onClick: E(() => q(n), ["stop"]),
|
|
236
240
|
onToggleTreeCollapse: R
|
|
237
241
|
}, 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"]),
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
(
|
|
241
|
-
key: `${
|
|
242
|
-
option:
|
|
243
|
-
"selected-prop":
|
|
244
|
-
disabled:
|
|
245
|
-
"name-key":
|
|
246
|
-
"image-key":
|
|
247
|
-
"icon-key":
|
|
248
|
-
"icon-type":
|
|
249
|
-
"end-icon-key":
|
|
250
|
-
"end-icon-type":
|
|
251
|
-
"end-text-icon-key":
|
|
252
|
-
"tree-child-shown":
|
|
242
|
+
a(h)(n) ? (K(), B("div", ge, [
|
|
243
|
+
de(M("div", null, [
|
|
244
|
+
(K(!0), B(re, null, ce(a(v)(n), (c, I) => (K(), D(a(S), {
|
|
245
|
+
key: `${r}-${I}`,
|
|
246
|
+
option: c,
|
|
247
|
+
"selected-prop": V(c),
|
|
248
|
+
disabled: c[l.disabledOptionKey],
|
|
249
|
+
"name-key": l.optionNameKey,
|
|
250
|
+
"image-key": l.optionImageKey,
|
|
251
|
+
"icon-key": l.optionIconKey,
|
|
252
|
+
"icon-type": l.optionIconType,
|
|
253
|
+
"end-icon-key": l.optionEndIconKey,
|
|
254
|
+
"end-icon-type": l.optionEndIconType,
|
|
255
|
+
"end-text-icon-key": l.optionEndTextIconKey,
|
|
256
|
+
"tree-child-shown": d.value[n[l.optionUniqueIdKey]],
|
|
253
257
|
"stop-option-click-event-propagation": "",
|
|
254
258
|
"is-multi": "",
|
|
255
|
-
onClick:
|
|
259
|
+
onClick: E(() => q(c), ["stop"])
|
|
256
260
|
}, 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))
|
|
257
261
|
], 512), [
|
|
258
|
-
[
|
|
262
|
+
[se, d.value[n[l.optionUniqueIdKey]]]
|
|
259
263
|
])
|
|
260
264
|
])) : ue("", !0)
|
|
261
265
|
]),
|
|
262
266
|
_: 3
|
|
263
|
-
}, 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"]));
|
|
267
|
+
}, 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", "trigger-feedback-text", "trigger-feedback-variant"]));
|
|
264
268
|
}
|
|
265
269
|
});
|
|
266
270
|
export {
|
|
267
|
-
|
|
271
|
+
Ve as default
|
|
268
272
|
};
|