@ironsource/shared-ui 2.1.12-rc.2 → 2.1.12-rc.21
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_03771fa3_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 +146 -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
|
-
import "../../../OptionV4.
|
|
1
|
+
import "../../../OptionV4.vue_vue_type_style_index_0_scoped_9cdf3a94_lang.css"; import { defineComponent as S, ref as w, watch as V, computed as A, openBlock as o, createBlock as f, unref as n, createSlots as F, withCtx as d, createElementVNode as c, normalizeClass as p, createCommentVNode as i, createElementBlock as l, renderSlot as u, createVNode as a, toDisplayString as r, createTextVNode as g, withModifiers as C, Fragment as L, renderList as N } from "vue";
|
|
2
2
|
import "../../typography/Heading.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { NOOP as
|
|
8
|
-
import { optionCommon as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
3
|
+
import j from "../../typography/Text.vue.js";
|
|
4
|
+
import R from "../../checkbox/v4/CheckboxV4.vue.js";
|
|
5
|
+
import m from "../../icon/v4/IconV4.vue.js";
|
|
6
|
+
import D from "../../icon/v4/IconFlag.vue.js";
|
|
7
|
+
import { NOOP as q } from "@vue/shared";
|
|
8
|
+
import { optionCommon as G } from "../common/Option.common.js";
|
|
9
|
+
import T from "../../typography/v4/Typography.vue.js";
|
|
10
|
+
import I from "../../tooltip/v4/TooltipV4.vue.js";
|
|
11
11
|
import { isElementTruncated as H } from "../../../utils/text.js";
|
|
12
12
|
import { promiseTimeout as J } from "@vueuse/core";
|
|
13
13
|
const Q = { class: "multiline-tooltip" }, U = {
|
|
@@ -34,7 +34,10 @@ const Q = { class: "multiline-tooltip" }, U = {
|
|
|
34
34
|
}, ne = {
|
|
35
35
|
key: 4,
|
|
36
36
|
class: "end-icon"
|
|
37
|
-
}, oe =
|
|
37
|
+
}, oe = {
|
|
38
|
+
key: 5,
|
|
39
|
+
class: "option-warning"
|
|
40
|
+
}, ie = { key: 6 }, le = ["onClick"], ae = { key: 0 }, pe = /* @__PURE__ */ S({
|
|
38
41
|
__name: "OptionV4",
|
|
39
42
|
props: {
|
|
40
43
|
option: { default: null },
|
|
@@ -47,6 +50,7 @@ const Q = { class: "multiline-tooltip" }, U = {
|
|
|
47
50
|
nameKey: { default: null },
|
|
48
51
|
imageKey: { default: null },
|
|
49
52
|
iconKey: { default: null },
|
|
53
|
+
warningKey: { default: null },
|
|
50
54
|
iconType: { default: "regular" },
|
|
51
55
|
endIconKey: { default: null },
|
|
52
56
|
endIconType: { default: "regular" },
|
|
@@ -63,48 +67,48 @@ const Q = { class: "multiline-tooltip" }, U = {
|
|
|
63
67
|
},
|
|
64
68
|
emits: ["toggleTreeCollapse"],
|
|
65
69
|
setup(e, { emit: O }) {
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
await J(100), b.value =
|
|
70
|
+
const s = e, { selected: K, id: $, onClick: B, api: x } = G(s), z = (t) => {
|
|
71
|
+
s.stopOptionClickEventPropagation && t.stopPropagation(), s.disabled ? q() : B(t);
|
|
72
|
+
}, v = w(null), b = w(!1);
|
|
73
|
+
V([() => s.treeChildShown, v], async () => {
|
|
74
|
+
await J(100), b.value = v.value && H(v.value);
|
|
71
75
|
});
|
|
72
|
-
const M = (t) => t && typeof t == "object" && "optionTooltipText" in t ? (Array.isArray(t.optionTooltipText), t.optionTooltipText) : b.value ? t[
|
|
73
|
-
O("toggleTreeCollapse",
|
|
76
|
+
const M = (t) => t && typeof t == "object" && "optionTooltipText" in t ? (Array.isArray(t.optionTooltipText), t.optionTooltipText) : b.value ? t[s.nameKey] : "", h = A(() => M(s.option)), E = (t) => t && typeof t == "object" && "optionTooltipTestId" in t ? t.optionTooltipTestId : null, P = () => {
|
|
77
|
+
O("toggleTreeCollapse", s.option);
|
|
74
78
|
};
|
|
75
|
-
return (t, k) => (o(),
|
|
76
|
-
text: n(
|
|
77
|
-
"test-id":
|
|
79
|
+
return (t, k) => (o(), f(n(I), {
|
|
80
|
+
text: n(h),
|
|
81
|
+
"test-id": E(e.option),
|
|
78
82
|
placement: e.toolTipPlacement,
|
|
79
83
|
class: "tooltip-option"
|
|
80
|
-
},
|
|
81
|
-
default:
|
|
84
|
+
}, F({
|
|
85
|
+
default: d(() => [
|
|
82
86
|
c("div", {
|
|
83
87
|
ref: "el",
|
|
84
|
-
class:
|
|
88
|
+
class: p(["item-container", {
|
|
85
89
|
"item-container--disabled": e.disabled,
|
|
86
90
|
"item-container--active": e.nameKey ? !1 : e.active,
|
|
87
|
-
"item-container--selected": n(
|
|
91
|
+
"item-container--selected": n(K),
|
|
88
92
|
"item-container--multi": e.isMulti
|
|
89
93
|
}])
|
|
90
94
|
}, [
|
|
91
95
|
c("div", {
|
|
92
|
-
class:
|
|
96
|
+
class: p(["item", {
|
|
93
97
|
"item--multi": e.isMulti,
|
|
94
98
|
"item--with-icon": t.$slots["icon-start"] || t.$slots.image
|
|
95
99
|
}])
|
|
96
100
|
}, [
|
|
97
|
-
e.isMulti || e.selectAllOption ? (o(),
|
|
101
|
+
e.isMulti || e.selectAllOption ? (o(), f(n(R), {
|
|
98
102
|
key: 0,
|
|
99
|
-
id: n(
|
|
103
|
+
id: n($).toString(),
|
|
100
104
|
tabindex: "-1",
|
|
101
105
|
class: "checkbox",
|
|
102
|
-
"is-checked": n(
|
|
106
|
+
"is-checked": n(K),
|
|
103
107
|
"is-indeterminate": e.isIndeterminate,
|
|
104
|
-
onClick: k[0] || (k[0] = (
|
|
108
|
+
onClick: k[0] || (k[0] = (y) => z(y))
|
|
105
109
|
}, null, 8, ["id", "is-checked", "is-indeterminate"])) : i("", !0),
|
|
106
110
|
!e.option?.conditionalOptions && (t.$slots.image || e.imageKey) ? (o(), l("div", U, [
|
|
107
|
-
|
|
111
|
+
u(t.$slots, "image", {}, () => [
|
|
108
112
|
e.imageKey ? (o(), l("img", {
|
|
109
113
|
key: 0,
|
|
110
114
|
src: e.option[e.imageKey]
|
|
@@ -112,16 +116,16 @@ const Q = { class: "multiline-tooltip" }, U = {
|
|
|
112
116
|
], !0)
|
|
113
117
|
])) : i("", !0),
|
|
114
118
|
!e.option?.conditionalOptions && (t.$slots.flag || e.optionFlagKey) ? (o(), l("div", X, [
|
|
115
|
-
|
|
116
|
-
e.optionFlagKey ? (o(),
|
|
119
|
+
u(t.$slots, "flag", {}, () => [
|
|
120
|
+
e.optionFlagKey ? (o(), f(n(D), {
|
|
117
121
|
key: 0,
|
|
118
122
|
"country-code": e.option[e.optionFlagKey]
|
|
119
123
|
}, null, 8, ["country-code"])) : i("", !0)
|
|
120
124
|
], !0)
|
|
121
125
|
])) : i("", !0),
|
|
122
126
|
!e.option?.conditionalOptions && (t.$slots["icon-start"] || e.iconKey) ? (o(), l("div", Y, [
|
|
123
|
-
|
|
124
|
-
a(n(
|
|
127
|
+
u(t.$slots, "icon-start", {}, () => [
|
|
128
|
+
a(n(m), {
|
|
125
129
|
type: e.iconType,
|
|
126
130
|
name: e.option[e.iconKey],
|
|
127
131
|
size: e.iconType === "regular" ? "20px" : "16px"
|
|
@@ -130,49 +134,49 @@ const Q = { class: "multiline-tooltip" }, U = {
|
|
|
130
134
|
])) : i("", !0),
|
|
131
135
|
c("div", {
|
|
132
136
|
ref_key: "textContainerRef",
|
|
133
|
-
ref:
|
|
137
|
+
ref: v,
|
|
134
138
|
class: "text-container"
|
|
135
139
|
}, [
|
|
136
|
-
a(n(
|
|
140
|
+
a(n(T), {
|
|
137
141
|
class: "option-text",
|
|
138
142
|
variant: "body2"
|
|
139
143
|
}, {
|
|
140
|
-
default:
|
|
141
|
-
|
|
144
|
+
default: d(() => [
|
|
145
|
+
u(t.$slots, "default", {}, () => [
|
|
142
146
|
c("div", {
|
|
143
|
-
class:
|
|
147
|
+
class: p(`option-content-${e.optionTwoLinesVariant} option-content`)
|
|
144
148
|
}, [
|
|
145
149
|
e.option?.conditionalOptions ? (o(), l("div", _, [
|
|
146
|
-
a(n(
|
|
150
|
+
a(n(T), {
|
|
147
151
|
variant: "body2",
|
|
148
152
|
class: "conditional-option-label"
|
|
149
153
|
}, {
|
|
150
|
-
default:
|
|
151
|
-
|
|
154
|
+
default: d(() => [
|
|
155
|
+
g(r(e.option.conditionalName) + ": ", 1)
|
|
152
156
|
]),
|
|
153
157
|
_: 1
|
|
154
158
|
}),
|
|
155
|
-
a(n(
|
|
159
|
+
a(n(T), {
|
|
156
160
|
variant: "h5",
|
|
157
161
|
class: "conditional-option-value"
|
|
158
162
|
}, {
|
|
159
|
-
default:
|
|
160
|
-
|
|
163
|
+
default: d(() => [
|
|
164
|
+
g('"' + r(e.option[e.nameKey]) + '"', 1)
|
|
161
165
|
]),
|
|
162
166
|
_: 1
|
|
163
167
|
})
|
|
164
|
-
])) : (o(), l("div", Z,
|
|
168
|
+
])) : (o(), l("div", Z, r(e.option[e.nameKey]), 1)),
|
|
165
169
|
e.endTextIconKey && e.option[e.endTextIconKey] ? (o(), l("span", ee, [
|
|
166
|
-
a(n(
|
|
170
|
+
a(n(m), {
|
|
167
171
|
type: "regular",
|
|
168
172
|
name: e.option[e.endTextIconKey],
|
|
169
173
|
size: "16px"
|
|
170
174
|
}, null, 8, ["name"])
|
|
171
175
|
])) : i("", !0),
|
|
172
176
|
e.optionTwoLinesKey ? (o(), l("div", te, [
|
|
173
|
-
a(n(
|
|
174
|
-
default:
|
|
175
|
-
|
|
177
|
+
a(n(T), { variant: "caption" }, {
|
|
178
|
+
default: d(() => [
|
|
179
|
+
g(r(e.option[e.optionTwoLinesKey]), 1)
|
|
176
180
|
]),
|
|
177
181
|
_: 1
|
|
178
182
|
})
|
|
@@ -182,44 +186,62 @@ const Q = { class: "multiline-tooltip" }, U = {
|
|
|
182
186
|
]),
|
|
183
187
|
_: 3
|
|
184
188
|
}),
|
|
185
|
-
e.subtitle ? (o(),
|
|
189
|
+
e.subtitle ? (o(), f(n(j), {
|
|
186
190
|
key: 0,
|
|
187
191
|
class: "subtitle",
|
|
188
192
|
size: "xs"
|
|
189
193
|
}, {
|
|
190
|
-
default:
|
|
191
|
-
|
|
194
|
+
default: d(() => [
|
|
195
|
+
g(r(e.subtitle), 1)
|
|
192
196
|
]),
|
|
193
197
|
_: 1
|
|
194
198
|
})) : i("", !0)
|
|
195
199
|
], 512),
|
|
196
200
|
t.$slots["icon-end"] || e.endIconKey && e.option[e.endIconKey] ? (o(), l("div", ne, [
|
|
197
|
-
|
|
198
|
-
a(n(
|
|
201
|
+
u(t.$slots, "icon-end", {}, () => [
|
|
202
|
+
a(n(m), {
|
|
199
203
|
type: e.endIconType || "regular",
|
|
200
204
|
name: e.option[e.endIconKey],
|
|
201
205
|
size: e.endIconType === "regular" || e.endIconType === "ab-test" ? "20px" : "16px"
|
|
202
206
|
}, null, 8, ["type", "name", "size"])
|
|
203
207
|
], !0)
|
|
204
208
|
])) : i("", !0),
|
|
209
|
+
e.warningKey && e.option?.[e.warningKey] ? (o(), l("div", oe, [
|
|
210
|
+
a(n(I), {
|
|
211
|
+
text: e.option[e.warningKey],
|
|
212
|
+
placement: "top"
|
|
213
|
+
}, {
|
|
214
|
+
default: d(() => [
|
|
215
|
+
a(n(m), {
|
|
216
|
+
class: "option-warning__icon",
|
|
217
|
+
name: "warning-circle",
|
|
218
|
+
size: "16px"
|
|
219
|
+
})
|
|
220
|
+
]),
|
|
221
|
+
_: 1
|
|
222
|
+
}, 8, ["text"])
|
|
223
|
+
])) : i("", !0),
|
|
224
|
+
t.$slots["option-end"] ? (o(), l("div", ie, [
|
|
225
|
+
u(t.$slots, "option-end", { option: e.option }, void 0, !0)
|
|
226
|
+
])) : i("", !0),
|
|
205
227
|
e.treeMainOption ? (o(), l("div", {
|
|
206
|
-
key:
|
|
228
|
+
key: 7,
|
|
207
229
|
class: "tree-main-arrow-wrapper",
|
|
208
|
-
onClick:
|
|
230
|
+
onClick: C(P, ["stop"])
|
|
209
231
|
}, [
|
|
210
|
-
a(n(
|
|
232
|
+
a(n(m), {
|
|
211
233
|
name: "caret-down",
|
|
212
234
|
size: "16px",
|
|
213
|
-
class:
|
|
235
|
+
class: p(`app-trigger--icon ${e.treeMainOptionExpanded && "expanded"}`)
|
|
214
236
|
}, null, 8, ["class"])
|
|
215
|
-
], 8,
|
|
237
|
+
], 8, le)) : i("", !0)
|
|
216
238
|
], 2),
|
|
217
|
-
n(
|
|
239
|
+
n(x).clearable && n(K) ? (o(), l("div", ae, [
|
|
218
240
|
c("button", {
|
|
219
241
|
class: "clear-button",
|
|
220
|
-
onClick: k[1] || (k[1] =
|
|
242
|
+
onClick: k[1] || (k[1] = C((y) => n(x).clearSelection(), ["prevent", "stop"]))
|
|
221
243
|
}, [
|
|
222
|
-
a(n(
|
|
244
|
+
a(n(m), {
|
|
223
245
|
name: "close",
|
|
224
246
|
width: "8",
|
|
225
247
|
height: "8"
|
|
@@ -230,16 +252,16 @@ const Q = { class: "multiline-tooltip" }, U = {
|
|
|
230
252
|
]),
|
|
231
253
|
_: 2
|
|
232
254
|
}, [
|
|
233
|
-
Array.isArray(n(
|
|
255
|
+
Array.isArray(n(h)) ? {
|
|
234
256
|
name: "tooltip",
|
|
235
|
-
fn:
|
|
257
|
+
fn: d(() => [
|
|
236
258
|
c("div", Q, [
|
|
237
|
-
(o(!0), l(
|
|
238
|
-
key:
|
|
259
|
+
(o(!0), l(L, null, N(n(h), (y) => (o(), f(n(T), {
|
|
260
|
+
key: y,
|
|
239
261
|
variant: "body2"
|
|
240
262
|
}, {
|
|
241
|
-
default:
|
|
242
|
-
|
|
263
|
+
default: d(() => [
|
|
264
|
+
g(r(y), 1)
|
|
243
265
|
]),
|
|
244
266
|
_: 2
|
|
245
267
|
}, 1024))), 128))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TreeDropdown.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../TreeDropdown.
|
|
4
|
-
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-4ba9e4bd"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../../TreeDropdown.
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_4ba9e4bd_lang.css"; import { defineComponent as ne, provide as le, ref as c, computed as K, onMounted as te, watch as E, openBlock as g, createBlock as D, unref as d, withCtx as h, createVNode as C, mergeProps as z, createSlots as oe, renderSlot as ie, createElementVNode as M, withModifiers as S, createTextVNode as de, createElementBlock as B, withDirectives as ae, Fragment as se, renderList as re, vShow as ce, createCommentVNode as ue } from "vue";
|
|
2
|
+
import pe from "./DropdownV4.vue.js";
|
|
3
|
+
import ye from "./DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "./IconButtonDropdownTrigger.vue.js";
|
|
5
5
|
import "./ChipDropdownTrigger.vue.js";
|
|
6
6
|
import "./AppDropdownTrigger.vue.js";
|
|
@@ -9,14 +9,14 @@ import "./ButtonFilterDropdownTrigger.vue.js";
|
|
|
9
9
|
import "./TreeDropdown.vue.js";
|
|
10
10
|
import w from "./OptionV4.vue.js";
|
|
11
11
|
import "./ConditionalDropdown.vue.js";
|
|
12
|
-
import { useChildOptions as
|
|
12
|
+
import { useChildOptions as he } from "../composables/useChildOptions.js";
|
|
13
13
|
import fe from "../../search/v4/SearchV4.vue.js";
|
|
14
|
-
import { useTestIdAttrs as
|
|
14
|
+
import { useTestIdAttrs as ve } from "../../../utils/testIds.js";
|
|
15
15
|
import { DropdownTestIdModifiers as $ } from "../../../testids/index.js";
|
|
16
|
-
const
|
|
16
|
+
const me = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "child-options"
|
|
19
|
-
},
|
|
19
|
+
}, Ae = /* @__PURE__ */ ne({
|
|
20
20
|
__name: "TreeDropdown",
|
|
21
21
|
props: {
|
|
22
22
|
options: null,
|
|
@@ -44,7 +44,7 @@ const ve = {
|
|
|
44
44
|
emits: ["update:selected", "update:isOpen"],
|
|
45
45
|
setup(t, { emit: b }) {
|
|
46
46
|
const n = t;
|
|
47
|
-
|
|
47
|
+
le("isTreeDropdown", !0);
|
|
48
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
49
|
e = e + 1;
|
|
50
50
|
}), o[n.optionChildrenKey] || (e = e + 1), e), 0)), U = () => {
|
|
@@ -53,9 +53,9 @@ const ve = {
|
|
|
53
53
|
...e[n.optionChildrenKey]
|
|
54
54
|
]);
|
|
55
55
|
}), m.value = [...n.options], u.value = [...n.options];
|
|
56
|
-
}, { hasChildren:
|
|
57
|
-
if (
|
|
58
|
-
|
|
56
|
+
}, { hasChildren: f, getChildren: v, allChildrenSelected: I, someChildrenSelected: P } = he(i, n.optionChildrenKey), q = (e) => {
|
|
57
|
+
if (f(e)) {
|
|
58
|
+
I(e) ? i.value = i.value.filter(
|
|
59
59
|
(o) => !v(e).includes(o)
|
|
60
60
|
) : i.value = [
|
|
61
61
|
...i.value.filter((o) => !v(e).includes(o)),
|
|
@@ -66,7 +66,7 @@ const ve = {
|
|
|
66
66
|
i.value.includes(e) ? i.value = i.value.filter(
|
|
67
67
|
(o) => o !== e
|
|
68
68
|
) : i.value = [...i.value, e];
|
|
69
|
-
}, A = (e) => i.value.includes(e), J = (e) => 1 + (
|
|
69
|
+
}, A = (e) => i.value.includes(e), J = (e) => 1 + (f(e) ? v(e).length : 0), j = () => {
|
|
70
70
|
b("update:selected", i.value), L.value = y.value;
|
|
71
71
|
}, F = () => {
|
|
72
72
|
i.value = [];
|
|
@@ -76,8 +76,8 @@ const ve = {
|
|
|
76
76
|
if (n.selected?.includes(l))
|
|
77
77
|
e.add(l);
|
|
78
78
|
else if (l[n.optionChildrenKey] && l[n.optionChildrenKey].length) {
|
|
79
|
-
for (const
|
|
80
|
-
if (n.selected?.includes(
|
|
79
|
+
for (const s of l[n.optionChildrenKey])
|
|
80
|
+
if (n.selected?.includes(s)) {
|
|
81
81
|
e.add(l);
|
|
82
82
|
break;
|
|
83
83
|
}
|
|
@@ -88,61 +88,56 @@ const ve = {
|
|
|
88
88
|
!n.selected.includes(l) && !e.has(l) && o.push(l);
|
|
89
89
|
}), o;
|
|
90
90
|
};
|
|
91
|
-
|
|
91
|
+
te(() => {
|
|
92
92
|
O.value || (U(), O.value = !0, n.preExpandedOptions && n.preExpandedOptions.forEach((e) => {
|
|
93
93
|
a.value[e] = 1;
|
|
94
94
|
}));
|
|
95
|
-
}),
|
|
95
|
+
}), E(
|
|
96
96
|
() => n.options,
|
|
97
97
|
() => {
|
|
98
98
|
U();
|
|
99
99
|
}
|
|
100
|
-
),
|
|
100
|
+
), E(
|
|
101
101
|
() => n.selected,
|
|
102
102
|
(e, o) => {
|
|
103
103
|
JSON.stringify(e) !== JSON.stringify(o) && (i.value = [...n.selected]);
|
|
104
104
|
}
|
|
105
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
|
-
|
|
108
|
-
|
|
109
|
-
() => {
|
|
110
|
-
n.isOpen ? m.value = G() : (i.value = [...n.selected], p.value = "");
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
const a = c({}), Q = (e) => {
|
|
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), Q = (e) => {
|
|
107
|
+
b("update:isOpen", e), n.isOpen ? m.value = G() : (i.value = [...n.selected], p.value = "");
|
|
108
|
+
}, a = c({}), R = (e) => {
|
|
114
109
|
a.value[e[n.optionUniqueIdKey]] ? delete a.value[e[n.optionUniqueIdKey]] : a.value[e[n.optionUniqueIdKey]] = 1;
|
|
115
110
|
};
|
|
116
|
-
function
|
|
117
|
-
const l = e.toLowerCase(),
|
|
118
|
-
return o.value.forEach((
|
|
119
|
-
const
|
|
120
|
-
(
|
|
111
|
+
function W(e, o) {
|
|
112
|
+
const l = e.toLowerCase(), s = [];
|
|
113
|
+
return o.value.forEach((r) => {
|
|
114
|
+
const k = r[n.optionNameKey].toLowerCase().includes(l), V = T.value[r[n.optionUniqueIdKey]]?.filter(
|
|
115
|
+
(ee) => ee[n.optionNameKey].toLowerCase().includes(l)
|
|
121
116
|
) || [];
|
|
122
|
-
(
|
|
123
|
-
}),
|
|
117
|
+
(k || V.length > 0) && (r[n.optionChildrenKey] = V, s.push(r));
|
|
118
|
+
}), s;
|
|
124
119
|
}
|
|
125
|
-
const
|
|
126
|
-
const o =
|
|
120
|
+
const X = (e) => {
|
|
121
|
+
const o = W(e, u);
|
|
127
122
|
e && (Object.keys(a.value).forEach((l) => {
|
|
128
123
|
delete a.value[l];
|
|
129
124
|
}), o.forEach((l) => {
|
|
130
125
|
Array.isArray(l[n.optionChildrenKey]) && l[n.optionChildrenKey].length && (a.value[l[n.optionUniqueIdKey]] = 1);
|
|
131
126
|
})), m.value = o;
|
|
132
|
-
},
|
|
127
|
+
}, Y = K(() => {
|
|
133
128
|
const e = n.options.length, o = n.options.reduce(
|
|
134
|
-
(l,
|
|
129
|
+
(l, s) => (a.value[s[n.optionUniqueIdKey]] && (l = l + s[n.optionChildrenKey].length), l),
|
|
135
130
|
0
|
|
136
131
|
);
|
|
137
132
|
return e + o;
|
|
138
133
|
});
|
|
139
|
-
|
|
134
|
+
E(
|
|
140
135
|
() => p.value,
|
|
141
136
|
() => {
|
|
142
|
-
|
|
137
|
+
X(p.value), x.value = !p.value;
|
|
143
138
|
}
|
|
144
139
|
);
|
|
145
|
-
const
|
|
140
|
+
const Z = () => {
|
|
146
141
|
y.value ? i.value = [] : (i.value = [], u.value.forEach((e) => {
|
|
147
142
|
if (e[n.optionChildrenKey] && e[n.optionChildrenKey].length)
|
|
148
143
|
for (const o of e[n.optionChildrenKey])
|
|
@@ -150,8 +145,8 @@ const ve = {
|
|
|
150
145
|
else
|
|
151
146
|
i.value = [e, ...i.value];
|
|
152
147
|
}));
|
|
153
|
-
},
|
|
154
|
-
return (e, o) => (
|
|
148
|
+
}, _ = ve(n.testId, $);
|
|
149
|
+
return (e, o) => (g(), D(d(pe), {
|
|
155
150
|
multi: "",
|
|
156
151
|
class: "tree-dropdown",
|
|
157
152
|
"show-select-all": x.value,
|
|
@@ -170,27 +165,27 @@ const ve = {
|
|
|
170
165
|
"override-option-count-calculation": J,
|
|
171
166
|
"trigger-show-all-selected-text": !1,
|
|
172
167
|
"predefined-trigger": "default",
|
|
173
|
-
"custom-number-of-displayed-options": d(
|
|
174
|
-
"onUpdate:isOpen":
|
|
168
|
+
"custom-number-of-displayed-options": d(Y),
|
|
169
|
+
"onUpdate:isOpen": Q,
|
|
175
170
|
onApply: j,
|
|
176
171
|
onClear: F
|
|
177
172
|
}, {
|
|
178
|
-
"dropdown-trigger":
|
|
179
|
-
|
|
173
|
+
"dropdown-trigger": h(({ defaultTriggerProps: l }) => [
|
|
174
|
+
C(d(ye), z(l, {
|
|
180
175
|
"all-selected": L.value,
|
|
181
176
|
"show-all-selected-text": ""
|
|
182
|
-
}),
|
|
177
|
+
}), oe({ _: 2 }, [
|
|
183
178
|
e.$slots["trigger-end-icon"] ? {
|
|
184
179
|
name: "end-icon",
|
|
185
|
-
fn:
|
|
186
|
-
|
|
180
|
+
fn: h(() => [
|
|
181
|
+
ie(e.$slots, "trigger-end-icon", {}, void 0, !0)
|
|
187
182
|
]),
|
|
188
183
|
key: "0"
|
|
189
184
|
} : void 0
|
|
190
185
|
]), 1040, ["all-selected"])
|
|
191
186
|
]),
|
|
192
|
-
"inline-search":
|
|
193
|
-
|
|
187
|
+
"inline-search": h(() => [
|
|
188
|
+
C(d(fe), {
|
|
194
189
|
modelValue: p.value,
|
|
195
190
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => p.value = l),
|
|
196
191
|
class: "tree-search",
|
|
@@ -201,30 +196,30 @@ const ve = {
|
|
|
201
196
|
"test-id": t.testId
|
|
202
197
|
}, null, 8, ["modelValue", "placeholder", "test-id"])
|
|
203
198
|
]),
|
|
204
|
-
"select-all":
|
|
199
|
+
"select-all": h(() => [
|
|
205
200
|
M("li", null, [
|
|
206
|
-
|
|
201
|
+
C(d(w), z({
|
|
207
202
|
"aria-selected": d(y),
|
|
208
203
|
"aria-disabled": !!t.disabled,
|
|
209
204
|
"selected-prop": d(y),
|
|
210
205
|
"is-indeterminate": d(H),
|
|
211
206
|
"is-multi": "",
|
|
212
207
|
"select-all-option": ""
|
|
213
|
-
}, d(
|
|
214
|
-
onClick: o[1] || (o[1] = S((l) =>
|
|
208
|
+
}, d(_)[d($).SELECT_ALL], {
|
|
209
|
+
onClick: o[1] || (o[1] = S((l) => Z(), ["stop"]))
|
|
215
210
|
}), {
|
|
216
|
-
default:
|
|
217
|
-
|
|
211
|
+
default: h(() => [
|
|
212
|
+
de(" Select all ")
|
|
218
213
|
]),
|
|
219
214
|
_: 1
|
|
220
215
|
}, 16, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate"])
|
|
221
216
|
])
|
|
222
217
|
]),
|
|
223
|
-
default:
|
|
224
|
-
|
|
218
|
+
default: h(({ option: l, index: s }) => [
|
|
219
|
+
C(d(w), {
|
|
225
220
|
option: l,
|
|
226
|
-
"selected-prop": d(
|
|
227
|
-
"is-indeterminate": !d(
|
|
221
|
+
"selected-prop": d(f)(l) ? d(I)(l) : A(l),
|
|
222
|
+
"is-indeterminate": !d(I)(l) && d(P)(l),
|
|
228
223
|
disabled: l[t.disabledOptionKey],
|
|
229
224
|
"name-key": t.optionNameKey,
|
|
230
225
|
"image-key": t.optionImageKey,
|
|
@@ -233,20 +228,20 @@ const ve = {
|
|
|
233
228
|
"end-icon-key": t.optionEndIconKey,
|
|
234
229
|
"end-icon-type": t.optionEndIconType,
|
|
235
230
|
"end-text-icon-key": t.optionEndTextIconKey,
|
|
236
|
-
"tree-main-option": d(
|
|
231
|
+
"tree-main-option": d(f)(l),
|
|
237
232
|
"tree-main-option-expanded": a.value[l[t.optionUniqueIdKey]],
|
|
238
233
|
"stop-option-click-event-propagation": "",
|
|
239
234
|
"is-multi": "",
|
|
240
235
|
onClick: S(() => q(l), ["stop"]),
|
|
241
|
-
onToggleTreeCollapse:
|
|
236
|
+
onToggleTreeCollapse: R
|
|
242
237
|
}, 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(
|
|
244
|
-
|
|
245
|
-
(
|
|
246
|
-
key: `${
|
|
247
|
-
option:
|
|
248
|
-
"selected-prop": A(
|
|
249
|
-
disabled:
|
|
238
|
+
d(f)(l) ? (g(), B("div", me, [
|
|
239
|
+
ae(M("div", null, [
|
|
240
|
+
(g(!0), B(se, null, re(d(v)(l), (r, k) => (g(), D(d(w), {
|
|
241
|
+
key: `${s}-${k}`,
|
|
242
|
+
option: r,
|
|
243
|
+
"selected-prop": A(r),
|
|
244
|
+
disabled: r[t.disabledOptionKey],
|
|
250
245
|
"name-key": t.optionNameKey,
|
|
251
246
|
"image-key": t.optionImageKey,
|
|
252
247
|
"icon-key": t.optionIconKey,
|
|
@@ -257,17 +252,17 @@ const ve = {
|
|
|
257
252
|
"tree-child-shown": a.value[l[t.optionUniqueIdKey]],
|
|
258
253
|
"stop-option-click-event-propagation": "",
|
|
259
254
|
"is-multi": "",
|
|
260
|
-
onClick: S(() => q(
|
|
255
|
+
onClick: S(() => q(r), ["stop"])
|
|
261
256
|
}, 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))
|
|
262
257
|
], 512), [
|
|
263
|
-
[
|
|
258
|
+
[ce, a.value[l[t.optionUniqueIdKey]]]
|
|
264
259
|
])
|
|
265
|
-
])) :
|
|
260
|
+
])) : ue("", !0)
|
|
266
261
|
]),
|
|
267
262
|
_: 3
|
|
268
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"]));
|
|
269
264
|
}
|
|
270
265
|
});
|
|
271
266
|
export {
|
|
272
|
-
|
|
267
|
+
Ae as default
|
|
273
268
|
};
|