@ironsource/shared-ui 2.1.12-rc.2 → 2.1.12-rc.20
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_0123c361_lang.css +1 -0
- package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_0198fee8_lang.css +1 -0
- package/ButtonV4.vue_vue_type_style_index_0_scoped_d7948c77_lang.css +1 -0
- package/Chart.vue_vue_type_style_index_0_scoped_64205c96_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_da34b108_lang.css +1 -0
- package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_79dc2883_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_fd9e4ea2_lang.css +1 -0
- package/ChartPlane.vue_vue_type_style_index_0_scoped_903fc6ae_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_e53c6287_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_8d5521da_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_86ea5d2a_lang.css +1 -0
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_a849128a_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_eb226e31_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_08cb822e_lang.css +1 -0
- package/FieldLabel.vue_vue_type_style_index_0_scoped_921d4087_lang.css +1 -0
- package/FormRow.vue_vue_type_style_index_0_scoped_2d5a3057_lang.css +1 -0
- package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_99e51ecc_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_9cdf3a94_lang.css +1 -0
- package/SettingsHeader.vue_vue_type_style_index_0_scoped_01f78cd7_lang.css +1 -0
- package/SubHeader.vue_vue_type_style_index_0_scoped_e6008b6c_lang.css +1 -0
- package/Tooltip.vue_vue_type_style_index_0_scoped_20630944_lang.css +1 -0
- package/TooltipHeader.vue_vue_type_style_index_0_scoped_3b15c693_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_0_scoped_bcb40ed4_lang.css +1 -0
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css +1 -0
- package/components/appIcon/index.d.ts +3 -3
- package/components/banner/Banner.vue.d.ts +3 -3
- package/components/banner/index.d.ts +7 -7
- package/components/button/common/consts.d.ts +1 -0
- package/components/button/v3/Button.vue.d.ts +3 -3
- package/components/button/v3/ButtonBase.vue.d.ts +3 -3
- package/components/button/v3/IconButton.vue.d.ts +3 -3
- package/components/button/v3/index.d.ts +14 -14
- package/components/button/v4/ButtonV4.vue.d.ts +4 -3
- package/components/button/v4/ButtonV4.vue.js +3 -3
- package/components/button/v4/ButtonV4.vue2.js +1 -1
- package/components/chart/Chart.vue.d.ts +149 -38
- package/components/chart/Chart.vue.js +3 -3
- package/components/chart/Chart.vue2.js +145 -297
- package/components/chart/ChartHeader.vue.d.ts +45 -11
- package/components/chart/ChartHeader.vue.js +3 -3
- package/components/chart/ChartHeader.vue2.js +64 -53
- package/components/chart/ChartHeaderTrend.vue.d.ts +48 -0
- package/components/chart/ChartHeaderTrend.vue.js +7 -0
- package/components/chart/ChartHeaderTrend.vue2.js +95 -0
- package/components/chart/ChartLegend.vue.d.ts +24 -0
- package/components/chart/ChartLegend.vue.js +3 -3
- package/components/chart/ChartLegend.vue2.js +82 -63
- package/components/chart/ChartPlane.vue.d.ts +221 -0
- package/components/chart/ChartPlane.vue.js +7 -0
- package/components/chart/ChartPlane.vue2.js +368 -0
- package/components/chart/ChartStoryArgs.d.ts +179 -0
- package/components/chart/ChartTooltip.vue.d.ts +22 -2
- package/components/chart/ChartTooltip.vue.js +2 -2
- package/components/chart/ChartTooltip.vue2.js +50 -55
- package/components/chart/LegendSorting.vue.d.ts +37 -0
- package/components/chart/LegendSorting.vue.js +45 -0
- package/components/chart/LegendSorting.vue2.js +4 -0
- package/components/chart/SettingsHeader.vue.d.ts +1 -0
- package/components/chart/SettingsHeader.vue.js +3 -3
- package/components/chart/SettingsHeader.vue2.js +17 -16
- package/components/chart/SubHeader.vue.d.ts +52 -0
- package/components/chart/SubHeader.vue.js +7 -0
- package/components/chart/SubHeader.vue2.js +61 -0
- package/components/chart/TooltipHeader.vue.d.ts +50 -0
- package/components/chart/TooltipHeader.vue.js +7 -0
- package/components/chart/TooltipHeader.vue2.js +69 -0
- package/components/chart/colorPalette.d.ts +4 -0
- package/components/chart/colorPalette.js +54 -0
- package/components/chart/composables/useChartHeight.d.ts +5 -0
- package/components/chart/composables/useChartHeight.js +24 -0
- package/components/chart/composables/useColorsMap.d.ts +10 -0
- package/components/chart/composables/useColorsMap.js +46 -0
- package/components/chart/composables/useTooltipPosition.d.ts +1 -1
- package/components/chart/composables/useTooltipPosition.js +11 -15
- package/components/chart/consts.d.ts +29 -7
- package/components/chart/consts.js +41 -21
- package/components/chart/index.d.ts +515 -118
- package/components/chart/mockData.d.ts +44 -5
- package/components/chart/types.d.ts +37 -6
- package/components/chart/types.js +5 -2
- package/components/chart/utils/formatNumber.d.ts +0 -1
- package/components/chart/utils/highlightUtils.d.ts +3 -0
- package/components/chart/utils/highlightUtils.js +18 -0
- package/components/chart/utils/utils.d.ts +3 -2
- package/components/chart/utils/utils.js +23 -8
- package/components/checkbox/v3/Checkbox.vue.d.ts +3 -3
- package/components/checkbox/v3/index.d.ts +7 -7
- package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
- package/components/dateRange/v4/DateRangeV4.vue2.js +1 -1
- package/components/dialog/v4/DialogV4.vue.d.ts +4 -3
- package/components/dialog/v4/DialogV4.vue.js +4 -4
- package/components/dialog/v4/DialogV4.vue2.js +1 -1
- package/components/dialog/v4/index.d.ts +7 -7
- package/components/dropdown/common/Dropdown.common.js +92 -85
- package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +1 -1
- package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +1 -1
- package/components/dropdown/v4/ConditionalDropdown.vue.js +3 -3
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +76 -76
- package/components/dropdown/v4/DropdownV4.vue.d.ts +8 -0
- package/components/dropdown/v4/DropdownV4.vue.js +4 -4
- package/components/dropdown/v4/DropdownV4.vue2.js +105 -95
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue.d.ts +11 -0
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue.js +4 -4
- package/components/dropdown/v4/IconButtonDropdownTrigger.vue2.js +12 -10
- package/components/dropdown/v4/OptionV4.vue.d.ts +8 -0
- package/components/dropdown/v4/OptionV4.vue.js +3 -3
- package/components/dropdown/v4/OptionV4.vue2.js +91 -69
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +68 -73
- package/components/dropdown/v4/index.d.ts +64 -2
- package/components/emptyState/v4/EmptyStateV4.vue.d.ts +3 -3
- package/components/emptyState/v4/index.d.ts +7 -7
- package/components/forms/FormRow.vue.d.ts +9 -2
- package/components/forms/FormRow.vue.js +3 -3
- package/components/forms/FormRow.vue2.js +25 -14
- package/components/forms/index.d.ts +25 -5
- package/components/search/v3/index.d.ts +3 -3
- package/components/shared/FieldLabel.vue.d.ts +19 -7
- package/components/shared/FieldLabel.vue.js +3 -3
- package/components/shared/FieldLabel.vue2.js +50 -37
- package/components/table/v4/DataGrid.vue.d.ts +4 -3
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +151 -142
- package/components/table/v4/MultipleDataGrid.vue.d.ts +3 -3
- package/components/table/v4/index.d.ts +15 -14
- package/components/tabs/v3/Tabs.vue.d.ts +3 -3
- package/components/tabs/v3/index.d.ts +7 -7
- package/components/tooltip/common/Tooltip.types.d.ts +1 -0
- package/components/tooltip/v3/Tooltip.vue.d.ts +4 -4
- package/components/tooltip/v3/Tooltip.vue.js +2 -2
- package/components/tooltip/v3/Tooltip.vue2.js +1 -1
- package/components/tooltip/v3/index.d.ts +7 -7
- package/components/tooltip/v4/TooltipV4.vue.d.ts +4 -4
- package/components/tooltip/v4/TooltipV4.vue.js +2 -2
- package/components/tooltip/v4/TooltipV4.vue2.js +1 -1
- package/components/tooltip/v4/index.d.ts +7 -7
- package/components/typography/Text.vue.d.ts +3 -3
- package/components/typography/index.d.ts +7 -7
- package/composables/useFormValidation.d.ts +1 -0
- package/composables/useFormValidation.js +32 -27
- package/composables/useFullPageHeight.d.ts +10 -0
- package/composables/useFullPageHeight.js +15 -0
- package/consts/common.d.ts +1 -0
- package/consts/common.js +4 -0
- package/consts/regex.d.ts +1 -0
- package/consts/regex.js +2 -1
- package/index.d.ts +211 -81
- package/index.js +106 -100
- package/package.json +1 -1
- package/testids/index.d.ts +2 -1
- package/testids/index.js +10 -10
- package/utils/formatNumbers.d.ts +1 -1
- package/utils/formatNumbers.js +19 -6
- package/utils/index.js +7 -0
- package/utils/text.d.ts +3 -0
- package/utils/text.js +24 -5
- package/utils/totals.d.ts +5 -0
- package/utils/totals.js +9 -0
- package/utils/utils.d.ts +1 -0
- package/utils/utils.js +4 -0
- package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_lang.css +0 -1
- package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_ea1c4589_lang.css +0 -1
- package/ButtonV4.vue_vue_type_style_index_0_scoped_bdfce3aa_lang.css +0 -1
- package/Chart.vue_vue_type_style_index_0_scoped_a641383a_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_b8213498_lang.css +0 -1
- package/ChartLegend.vue_vue_type_style_index_0_scoped_4fe1c7d1_lang.css +0 -1
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_6744325c_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_3a2aeea3_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_020072b0_lang.css +0 -1
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_8a2714eb_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_d154c5da_lang.css +0 -1
- package/FieldLabel.vue_vue_type_style_index_0_scoped_96ee1c98_lang.css +0 -1
- package/FormRow.vue_vue_type_style_index_0_scoped_fc3897fd_lang.css +0 -1
- package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_59fb505a_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_1e8837dc_lang.css +0 -1
- package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css +0 -1
- package/Tooltip.vue_vue_type_style_index_0_scoped_9020a179_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_66eab856_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_b883d1fa_lang.css +0 -1
- package/components/chart/utils/formatNumber.js +0 -11
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { useToggle as Ve } from "../../../composables/useToggle.js";
|
|
2
|
-
import { inject as ke, ref as r, computed as c, watch as b, useSlots as Ge, toRaw as
|
|
2
|
+
import { inject as ke, ref as r, computed as c, watch as b, useSlots as Ge, toRaw as I, nextTick as N, provide as Le, onMounted as Ue } from "vue";
|
|
3
3
|
import { isObjectInArray as ae } from "../../../utils/array.js";
|
|
4
4
|
import { objectsEqual as Be } from "../../../utils/object.js";
|
|
5
5
|
import { useClamp as He, useVirtualList as qe, onClickOutside as ne, useInfiniteScroll as Xe } from "@vueuse/core";
|
|
6
|
-
import { Mode as
|
|
6
|
+
import { Mode as w, Type as U, DropdownContext as $e } from "./DropdownContext.js";
|
|
7
7
|
import { pxToRem as je } from "../../../utils/style.js";
|
|
8
8
|
import { useEditableContext as ze } from "../../table-cells/common/EditableContext.js";
|
|
9
9
|
import { useGroupedOptions as We } from "./useGroupedOptions.js";
|
|
10
|
-
const al = (e,
|
|
10
|
+
const al = (e, d, y) => {
|
|
11
11
|
const B = ke("isTreeDropdown", !1), {
|
|
12
12
|
sortOutGroups: H,
|
|
13
13
|
flattenAndMarkGroupOptions: ue,
|
|
@@ -31,16 +31,16 @@ const al = (e, v, g) => {
|
|
|
31
31
|
return K?.value?.value ?? a.value;
|
|
32
32
|
},
|
|
33
33
|
set(l) {
|
|
34
|
-
K.onChange?.(l), K.onClose?.(),
|
|
34
|
+
K.onChange?.(l), K.onClose?.(), d("update:selected", l);
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
b(
|
|
38
38
|
() => e.selected,
|
|
39
39
|
() => {
|
|
40
|
-
a.value = e.selected,
|
|
40
|
+
a.value = e.selected, v.value = e.selected;
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
|
-
const de = Ge(),
|
|
43
|
+
const de = Ge(), x = r(null), m = r(null), j = r(null), R = r(null), z = r(null), D = r(null), ve = r(), W = r(null), J = r(null), Q = r(null), fe = 8, ge = c(() => D.value ? D.value.getBoundingClientRect().height + fe + e.distance : 0), C = r(!1), h = r([]), T = r(-1), O = r(""), v = r(e.selected || []), Y = () => D.value?.focus(), [S, ye, he] = Ve({
|
|
44
44
|
disabled: e.disabled,
|
|
45
45
|
initialValue: e.defaultOpen
|
|
46
46
|
});
|
|
@@ -57,9 +57,9 @@ const al = (e, v, g) => {
|
|
|
57
57
|
return e.isOpen;
|
|
58
58
|
},
|
|
59
59
|
set(l) {
|
|
60
|
-
|
|
60
|
+
d("update:isOpen", l);
|
|
61
61
|
}
|
|
62
|
-
}), Se = c(() => o.value.length - 1),
|
|
62
|
+
}), Se = c(() => o.value.length - 1), g = He(0, 0, Se), F = c(() => n.value ? e.displayValue(n.value) : ""), me = (l) => {
|
|
63
63
|
if (!l.value.length && !e.multiOptionsPlaceholderPrefix && !e.multiOptionsPlaceholderSuffix)
|
|
64
64
|
return e.placeholder;
|
|
65
65
|
const t = !e.multiOptionsPlaceholderPrefix && !e.multiOptionsPlaceholderSuffix ? `${l.value.length} selected` : `${e.multiOptionsPlaceholderPrefix ?? ""}${l.value.length ?? "0"}${e.multiOptionsPlaceholderSuffix ?? ""}`;
|
|
@@ -76,39 +76,39 @@ const al = (e, v, g) => {
|
|
|
76
76
|
o,
|
|
77
77
|
a
|
|
78
78
|
) : a.value.length > 0 && a.value.length < o.value.length), _ = (l) => {
|
|
79
|
-
|
|
80
|
-
}, M = c(() => e.groupedOptions ? ue(e.options) : e.options),
|
|
79
|
+
O.value = l;
|
|
80
|
+
}, M = c(() => e.groupedOptions ? ue(e.options) : e.options), Te = c(() => {
|
|
81
81
|
if (oe(
|
|
82
82
|
M,
|
|
83
|
-
|
|
83
|
+
v
|
|
84
84
|
))
|
|
85
85
|
return M.value;
|
|
86
86
|
const l = {
|
|
87
87
|
selected: [],
|
|
88
88
|
notSelected: []
|
|
89
89
|
};
|
|
90
|
-
|
|
91
|
-
const u = (e.comparingKey ?
|
|
90
|
+
I(M).value.forEach((i) => {
|
|
91
|
+
const u = (e.comparingKey ? v.value.findIndex(
|
|
92
92
|
(L) => L[e.comparingKey] === i[e.comparingKey]
|
|
93
|
-
) > -1 :
|
|
93
|
+
) > -1 : v.value.includes(i)) ? "selected" : "notSelected";
|
|
94
94
|
l[u].push(i);
|
|
95
95
|
});
|
|
96
96
|
const t = e.groupedOptions ? H(l.notSelected) : l.notSelected;
|
|
97
97
|
return [].concat(l.selected, t);
|
|
98
98
|
}), o = c(() => {
|
|
99
|
-
const l = Array.isArray(
|
|
99
|
+
const l = Array.isArray(v.value) && e.multi && y.VERSION === 4 && !B ? Te.value : M.value;
|
|
100
100
|
if (e.onSearch) {
|
|
101
|
-
const t = l.filter((i) => e.groupedOptions && q(i) ? i : e.onSearch(i,
|
|
101
|
+
const t = l.filter((i) => e.groupedOptions && q(i) ? i : e.onSearch(i, O.value));
|
|
102
102
|
return e.groupedOptions ? H(t) : t;
|
|
103
103
|
} else
|
|
104
104
|
return l;
|
|
105
|
-
}),
|
|
106
|
-
() =>
|
|
105
|
+
}), Pe = c(() => h.value[0]?.hasSubtitle), p = c(() => s.mode === w.Multi), ee = c(
|
|
106
|
+
() => Pe.value ? y.MULTILINE_LIST_HEIGHT : y.LIST_HEIGHT
|
|
107
107
|
), {
|
|
108
108
|
list: V,
|
|
109
109
|
containerProps: k,
|
|
110
|
-
wrapperProps:
|
|
111
|
-
scrollTo:
|
|
110
|
+
wrapperProps: Ie,
|
|
111
|
+
scrollTo: P
|
|
112
112
|
} = qe(o, {
|
|
113
113
|
itemHeight: ee.value,
|
|
114
114
|
overscan: e.disableVirtualScroll ? 1 / 0 : 2
|
|
@@ -118,33 +118,40 @@ const al = (e, v, g) => {
|
|
|
118
118
|
(l) => {
|
|
119
119
|
Z(l);
|
|
120
120
|
}
|
|
121
|
-
), b([
|
|
121
|
+
), b([T], async () => {
|
|
122
122
|
await N();
|
|
123
123
|
}), b(
|
|
124
|
-
[
|
|
124
|
+
[S, g, T],
|
|
125
125
|
async ([l], [t]) => {
|
|
126
|
-
|
|
127
|
-
e.multi &&
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
S.value && (await N(), T.value !== -1 && l !== t && setTimeout(() => {
|
|
127
|
+
if (!(e.multi && y.VERSION === 4))
|
|
128
|
+
if (P(T.value), e.groupedOptions) {
|
|
129
|
+
const i = M.value.findIndex(
|
|
130
|
+
(f) => f === n.value
|
|
131
|
+
);
|
|
132
|
+
P(i);
|
|
133
|
+
} else
|
|
134
|
+
P(T.value);
|
|
135
|
+
}), g.value && setTimeout(() => {
|
|
136
|
+
P(g.value);
|
|
130
137
|
}));
|
|
131
138
|
}
|
|
132
|
-
), b(
|
|
133
|
-
|
|
139
|
+
), b(O, () => {
|
|
140
|
+
d("onsearch", O.value), P(0);
|
|
134
141
|
});
|
|
135
142
|
const A = (l, t = !1) => {
|
|
136
143
|
e.disabled || (Z(l), N(() => {
|
|
137
|
-
|
|
144
|
+
S.value && d("opened"), S.value || d("closed"), x.value && t && x.value.focus();
|
|
138
145
|
}));
|
|
139
146
|
};
|
|
140
|
-
b(
|
|
147
|
+
b(S, (l) => {
|
|
141
148
|
if (l) {
|
|
142
|
-
|
|
149
|
+
O.value = "", p.value && Array.isArray(n.value) && (v.value = I(n.value).slice());
|
|
143
150
|
return;
|
|
144
151
|
}
|
|
145
152
|
Y();
|
|
146
153
|
});
|
|
147
|
-
const
|
|
154
|
+
const we = () => {
|
|
148
155
|
if (E.value) {
|
|
149
156
|
a.value = [];
|
|
150
157
|
return;
|
|
@@ -159,16 +166,16 @@ const al = (e, v, g) => {
|
|
|
159
166
|
}
|
|
160
167
|
a.value = o.value;
|
|
161
168
|
}
|
|
162
|
-
|
|
169
|
+
d("selectAll");
|
|
163
170
|
}
|
|
164
171
|
}, xe = () => {
|
|
165
|
-
|
|
172
|
+
we(), y.VERSION !== 4 && (n.value = a.value);
|
|
166
173
|
}, De = (l = !0) => {
|
|
167
|
-
a.value = [], l
|
|
174
|
+
a.value = [], l ? (n.value = [], v.value = [], d("clear")) : e.dynamicFilterMode || d("clear");
|
|
168
175
|
}, G = (l, t) => {
|
|
169
|
-
if (l =
|
|
176
|
+
if (l = I(l), y.VERSION === 4 ? l[e.disabledOptionKey] : h.value[t]?.disabled)
|
|
170
177
|
return;
|
|
171
|
-
if (
|
|
178
|
+
if (T.value = t, !e.multi) {
|
|
172
179
|
e.keepOpen || A(!1), s.goToOption(
|
|
173
180
|
0
|
|
174
181
|
/* None */
|
|
@@ -178,53 +185,53 @@ const al = (e, v, g) => {
|
|
|
178
185
|
if (!Array.isArray(a.value))
|
|
179
186
|
return;
|
|
180
187
|
m.value?.focus();
|
|
181
|
-
const
|
|
182
|
-
if (ae(
|
|
188
|
+
const f = I(a.value);
|
|
189
|
+
if (ae(f, l) || e.comparingKey && f.findIndex(
|
|
183
190
|
(u) => u[e.comparingKey] === l[e.comparingKey]
|
|
184
191
|
) > -1) {
|
|
185
|
-
a.value =
|
|
192
|
+
a.value = f.filter((u) => e.comparingKey ? u[e.comparingKey] !== l[e.comparingKey] : !Be(u, l));
|
|
186
193
|
return;
|
|
187
194
|
} else {
|
|
188
|
-
a.value = [...
|
|
195
|
+
a.value = [...f, l];
|
|
189
196
|
return;
|
|
190
197
|
}
|
|
191
|
-
}, Me = (l) =>
|
|
192
|
-
activeIndex:
|
|
193
|
-
options:
|
|
198
|
+
}, Me = (l) => h.value[l]?.disabled, s = {
|
|
199
|
+
activeIndex: g,
|
|
200
|
+
options: h,
|
|
194
201
|
selectedOption: n,
|
|
195
202
|
labelRef: z,
|
|
196
203
|
activeOption: R,
|
|
197
|
-
listRef:
|
|
204
|
+
listRef: x,
|
|
198
205
|
clearable: e.clearable,
|
|
199
206
|
type: de.input ? U.Search : U.Dropdown,
|
|
200
|
-
mode: e.multi ?
|
|
201
|
-
query:
|
|
207
|
+
mode: e.multi ? w.Multi : w.Single,
|
|
208
|
+
query: O,
|
|
202
209
|
selectedValue: F,
|
|
203
210
|
toggle: A,
|
|
204
211
|
disabled: e.disabled,
|
|
205
|
-
open:
|
|
212
|
+
open: S,
|
|
206
213
|
mandatory: e.mandatory,
|
|
207
214
|
size: e.size,
|
|
208
215
|
placeholder: e.placeholder,
|
|
209
216
|
select: G,
|
|
210
217
|
clearSelection: () => {
|
|
211
|
-
_(""), n.value = s.mode ===
|
|
218
|
+
_(""), n.value = s.mode === w.Single ? null : [], v.value = s.mode === w.Single ? null : [], m.value && (m.value.value = "");
|
|
212
219
|
},
|
|
213
220
|
search: _,
|
|
214
221
|
goToOption: async (l) => {
|
|
215
|
-
if (!
|
|
222
|
+
if (!S.value)
|
|
216
223
|
return;
|
|
217
|
-
let t =
|
|
218
|
-
const i =
|
|
224
|
+
let t = g.value + l;
|
|
225
|
+
const i = h.value.filter(
|
|
219
226
|
(u) => u.disabled
|
|
220
|
-
).length,
|
|
221
|
-
for (t >
|
|
222
|
-
if (!
|
|
223
|
-
R.value = o.value[t],
|
|
227
|
+
).length, f = o.value.length - i;
|
|
228
|
+
for (t > f && (t = f + 1); ; ) {
|
|
229
|
+
if (!h.value[t]?.disabled) {
|
|
230
|
+
R.value = o.value[t], g.value = t;
|
|
224
231
|
return;
|
|
225
232
|
}
|
|
226
|
-
if ((l === 1 || l === 10) && (t = t + 1), (l === -1 || l === -10) && (t = t + -1), !!Me(
|
|
227
|
-
R.value = o.value[t],
|
|
233
|
+
if ((l === 1 || l === 10) && (t = t + 1), (l === -1 || l === -10) && (t = t + -1), !!Me(g.value)) {
|
|
234
|
+
R.value = o.value[t], g.value = t;
|
|
228
235
|
return;
|
|
229
236
|
}
|
|
230
237
|
}
|
|
@@ -233,20 +240,20 @@ const al = (e, v, g) => {
|
|
|
233
240
|
m.value = l.value;
|
|
234
241
|
},
|
|
235
242
|
registerOption: (l, t, i) => {
|
|
236
|
-
|
|
243
|
+
h.value = [...h.value, { id: l, disabled: t, hasSubtitle: i }];
|
|
237
244
|
},
|
|
238
245
|
unRegisterOption(l) {
|
|
239
|
-
|
|
246
|
+
h.value = h.value.filter((t) => t.id !== l);
|
|
240
247
|
}
|
|
241
248
|
};
|
|
242
249
|
Le($e, s), ne(
|
|
243
|
-
|
|
250
|
+
x,
|
|
244
251
|
() => {
|
|
245
|
-
|
|
252
|
+
S.value && te();
|
|
246
253
|
},
|
|
247
254
|
{
|
|
248
255
|
ignore: [
|
|
249
|
-
|
|
256
|
+
D,
|
|
250
257
|
W,
|
|
251
258
|
J,
|
|
252
259
|
Q,
|
|
@@ -261,15 +268,15 @@ const al = (e, v, g) => {
|
|
|
261
268
|
Ue(async () => {
|
|
262
269
|
e.autoFocus && (await N(), setTimeout(() => {
|
|
263
270
|
j.value.focus();
|
|
264
|
-
})), s.goToOption(0), e.multi && !B && (e.groupedOptions ?
|
|
271
|
+
})), s.goToOption(0), e.multi && !B && (e.groupedOptions ? C.value = X(
|
|
265
272
|
o,
|
|
266
273
|
a
|
|
267
|
-
) :
|
|
274
|
+
) : C.value = e.options.length === e.selected.length);
|
|
268
275
|
});
|
|
269
276
|
const le = () => {
|
|
270
|
-
e.multi && (n.value = a.value, Array.isArray(n.value) && (
|
|
277
|
+
e.multi && (n.value = a.value, Array.isArray(n.value) && (v.value = I(n.value).slice(), C.value = e.groupedOptions ? ce(e.options) === n.value.length : e.options.length === n.value.length)), d("apply", n.value), d("allSelectedChanged", E.value), A(!1), Ce();
|
|
271
278
|
}, te = () => {
|
|
272
|
-
p.value && Array.isArray(
|
|
279
|
+
p.value && Array.isArray(v.value) && (n.value = I(v.value).slice()), O.value = "", A(!1);
|
|
273
280
|
}, Ne = (l) => {
|
|
274
281
|
if (!e.disableKeyboardEvents)
|
|
275
282
|
switch (l.key) {
|
|
@@ -315,64 +322,64 @@ const al = (e, v, g) => {
|
|
|
315
322
|
break;
|
|
316
323
|
}
|
|
317
324
|
case "Enter": {
|
|
318
|
-
if (!
|
|
325
|
+
if (!S.value) {
|
|
319
326
|
A(!0);
|
|
320
327
|
return;
|
|
321
328
|
}
|
|
322
|
-
G(o.value[
|
|
329
|
+
G(o.value[g.value], g.value), s.mode === w.Single && !e.keepOpen && A(!1), l.preventDefault();
|
|
323
330
|
break;
|
|
324
331
|
}
|
|
325
332
|
}
|
|
326
333
|
}, Re = c(() => {
|
|
327
334
|
if (e.loading)
|
|
328
335
|
return 8.5;
|
|
329
|
-
const l = e.loadMoreLoading &&
|
|
336
|
+
const l = e.loadMoreLoading && y.MAX_NUMBER_OF_OPTIONS || e.customNumberOfDisplayedOptions || V.value.reduce((L, Ee) => {
|
|
330
337
|
const _e = e.overrideOptionCountCalculation ? e.overrideOptionCountCalculation(Ee.data) : 1;
|
|
331
338
|
return L + _e;
|
|
332
|
-
}, 0), t = e.multi && e.showSelectAll && !
|
|
333
|
-
let u = i ?
|
|
334
|
-
return e.loadMoreLoading && e.multi && (V.value.length ? u = u + 0.1 : u = u - 0.9), e.noResultsText && u === 0 && (u = u + 1), e.withConditions &&
|
|
335
|
-
u * ee.value +
|
|
339
|
+
}, 0), t = e.multi && e.showSelectAll && !O.value ? 1 : 0, i = l > y.MAX_NUMBER_OF_OPTIONS, f = l + t;
|
|
340
|
+
let u = i ? y.MAX_NUMBER_OF_OPTIONS + 0.1 : f;
|
|
341
|
+
return e.loadMoreLoading && e.multi && (V.value.length ? u = u + 0.1 : u = u - 0.9), e.noResultsText && u === 0 && (u = u + 1), e.withConditions && O.value && (u = u + 1), je(
|
|
342
|
+
u * ee.value + y.PADDING_PX
|
|
336
343
|
);
|
|
337
344
|
});
|
|
338
345
|
return Xe(
|
|
339
346
|
k.ref,
|
|
340
347
|
() => {
|
|
341
|
-
!e.loadMoreLoading && e.infiniteLoading &&
|
|
348
|
+
!e.loadMoreLoading && e.infiniteLoading && d("loadMore");
|
|
342
349
|
},
|
|
343
350
|
{ distance: e.infiniteScrollThreshold }
|
|
344
351
|
), b(a, () => {
|
|
345
|
-
|
|
352
|
+
d("unsavedSelectionUpdate", a.value);
|
|
346
353
|
}), {
|
|
347
354
|
onKeydown: Ke,
|
|
348
355
|
location: ge,
|
|
349
|
-
open:
|
|
356
|
+
open: S,
|
|
350
357
|
toggleMenu: A,
|
|
351
358
|
onButtonKeydown: Ne,
|
|
352
359
|
displayedValue: Ae,
|
|
353
360
|
labelRef: z,
|
|
354
|
-
query:
|
|
361
|
+
query: O,
|
|
355
362
|
containerProps: k,
|
|
356
363
|
calculateTableHeight: Re,
|
|
357
|
-
wrapperProps:
|
|
364
|
+
wrapperProps: Ie,
|
|
358
365
|
filteredOptions: o,
|
|
359
366
|
allSelected: E,
|
|
360
|
-
allSelectedApplied:
|
|
367
|
+
allSelectedApplied: C,
|
|
361
368
|
isIndeterminate: be,
|
|
362
369
|
onSelectAll: xe,
|
|
363
370
|
virtualOptions: V,
|
|
364
371
|
isSelected: se,
|
|
365
372
|
selectedOption: n,
|
|
366
|
-
selectedOptionPrevious:
|
|
373
|
+
selectedOptionPrevious: v,
|
|
367
374
|
selectedValue: F,
|
|
368
375
|
onSelect: G,
|
|
369
|
-
activeIndex:
|
|
376
|
+
activeIndex: g,
|
|
370
377
|
onCancel: te,
|
|
371
378
|
onApply: le,
|
|
372
|
-
scrollTo:
|
|
379
|
+
scrollTo: P,
|
|
373
380
|
onClickOutside: ne,
|
|
374
|
-
listRef:
|
|
375
|
-
buttonRef:
|
|
381
|
+
listRef: x,
|
|
382
|
+
buttonRef: D,
|
|
376
383
|
apply: W,
|
|
377
384
|
cancel: J,
|
|
378
385
|
el: j,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ButtonDropdownTrigger.vue2.js";
|
|
2
2
|
/* empty css */import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../ButtonDropdownTrigger.
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../../ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_0123c361_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0123c361"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../ButtonDropdownTrigger.
|
|
1
|
+
import "../../../ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_0123c361_lang.css"; import { defineComponent as c, openBlock as s, createBlock as u, unref as o, normalizeClass as m, withCtx as n, renderSlot as f, createElementVNode as p, normalizeStyle as y, createVNode as h, createTextVNode as b, toDisplayString as x } from "vue";
|
|
2
2
|
import T from "../../button/v4/ButtonV4.vue.js";
|
|
3
3
|
import "../../button/v4/IconButtonV4.vue.js";
|
|
4
4
|
import "../../button/v4/ButtonGroup.vue.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ButtonFilterDropdownTrigger.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../ButtonFilterDropdownTrigger.
|
|
4
|
-
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../../ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_0198fee8_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-0198fee8"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../ButtonFilterDropdownTrigger.
|
|
1
|
+
import "../../../ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_0198fee8_lang.css"; import { defineComponent as m, openBlock as o, createElementBlock as u, mergeProps as l, unref as t, createBlock as d, createCommentVNode as i, createVNode as f, withCtx as p, createTextVNode as I, toDisplayString as T } from "vue";
|
|
2
2
|
import y from "../../typography/v4/Typography.vue.js";
|
|
3
3
|
import s from "../../icon/v4/IconV4.vue.js";
|
|
4
4
|
import "../../icon/v4/IconFlag.vue.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ConditionalDropdown.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../../ConditionalDropdown.
|
|
4
|
-
const p = /* @__PURE__ */
|
|
2
|
+
/* empty css */import d from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_8d5521da_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ d(o, [["__scopeId", "data-v-8d5521da"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|