@ironsource/shared-ui 2.1.6-test.13 → 2.1.6-test.15
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/Alert.vue_vue_type_style_index_0_scoped_06e0871a_lang.css +1 -0
- package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_858cefbf_lang.css +1 -0
- package/ChipV4.vue_vue_type_style_index_0_scoped_12c0f396_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_057abdf5_lang.css +1 -0
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_f81413ec_lang.css +1 -0
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_0345d6b1_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_7af4f288_lang.css +1 -0
- package/FoldableSection.vue_vue_type_style_index_0_scoped_1a5f0e2e_lang.css +1 -0
- package/HelpIcon.vue_vue_type_style_index_0_scoped_06fce2e3_lang.css +1 -0
- package/IconV4.vue_vue_type_style_index_0_scoped_9d3c9cda_lang.css +1 -0
- package/InlineCopy.vue_vue_type_style_index_0_scoped_893a203c_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_9db0f796_lang.css +1 -0
- package/README.md +35 -0
- package/TextAreaV4.vue_vue_type_style_index_0_scoped_f3b2c01d_lang.css +1 -0
- package/ToggleV4.vue_vue_type_style_index_0_scoped_a4aa32fb_lang.css +1 -0
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_142eab98_lang.css +1 -0
- package/components/alert/Alert.vue.d.ts +28 -0
- package/components/alert/Alert.vue.js +4 -4
- package/components/alert/Alert.vue2.js +67 -46
- package/components/alert/index.d.ts +104 -2
- package/components/autocomplete/Autocomplete.vue.d.ts +1 -0
- package/components/autocomplete/Autocomplete.vue2.js +6 -5
- package/components/autocomplete/index.d.ts +1 -0
- package/components/button/v4/ButtonV4.vue.d.ts +7 -7
- package/components/button/v4/IconButtonV4.vue.d.ts +4 -4
- package/components/button/v4/index.d.ts +61 -61
- package/components/chip/v4/Chip.types.d.ts +6 -0
- package/components/chip/v4/ChipV4.vue.d.ts +28 -35
- package/components/chip/v4/ChipV4.vue.js +3 -3
- package/components/chip/v4/ChipV4.vue2.js +28 -59
- package/components/chip/v4/index.d.ts +45 -148
- package/components/datePicker/common/DatePicker.common.js +14 -14
- package/components/datePicker/v4/DatePickerV4.vue2.js +3 -2
- package/components/dateRange/v4/DateRangeV4.vue.js +3 -3
- package/components/dateRange/v4/DateRangeV4.vue2.js +4 -3
- package/components/dialog/v3/Dialog.vue.d.ts +1 -1
- package/components/dialog/v3/index.d.ts +20 -20
- package/components/dropdown/common/Dropdown.common.js +80 -75
- package/components/dropdown/common/Option.common.d.ts +1 -1
- package/components/dropdown/common/Option.common.js +9 -9
- package/components/dropdown/composables/useChildOptions.d.ts +7 -0
- package/components/dropdown/composables/useChildOptions.js +14 -0
- package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +14 -3
- package/components/dropdown/v4/AppDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/AppDropdownTrigger.vue2.js +102 -61
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +8 -3
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +22 -21
- package/components/dropdown/v4/DropdownV4.vue.d.ts +22 -6
- package/components/dropdown/v4/DropdownV4.vue.js +2 -2
- package/components/dropdown/v4/DropdownV4.vue2.js +81 -73
- package/components/dropdown/v4/OptionV4.vue.d.ts +6 -6
- package/components/dropdown/v4/OptionV4.vue.js +3 -3
- package/components/dropdown/v4/OptionV4.vue2.js +51 -45
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +112 -0
- package/components/dropdown/v4/TreeDropdown.vue.js +7 -0
- package/components/dropdown/v4/TreeDropdown.vue2.js +122 -0
- package/components/dropdown/v4/dropdownStoryArgs.d.ts +1 -1
- package/components/dropdown/v4/index.d.ts +332 -49
- package/components/dropdown/v4/index.js +7 -4
- package/components/emptyState/v3/EmptyState.vue.d.ts +2 -2
- package/components/emptyState/v3/index.d.ts +47 -47
- package/components/emptyState/v4/EmptyStateV4.vue.d.ts +3 -3
- package/components/emptyState/v4/index.d.ts +7 -7
- package/components/icon/v4/Icon.types.d.ts +1 -1
- package/components/icon/v4/IconV4.vue.d.ts +16 -6
- package/components/icon/v4/IconV4.vue.js +4 -4
- package/components/icon/v4/IconV4.vue2.js +36 -33
- package/components/icon/v4/index.d.ts +53 -15
- package/components/inlineCopy/InlineCopy.vue.js +2 -2
- package/components/inlineCopy/InlineCopy.vue2.js +1 -1
- package/components/layout/FoldableSection.vue.js +5 -5
- package/components/layout/FoldableSection.vue2.js +1 -1
- package/components/multibar/MultiBarMenu.vue2.js +12 -11
- package/components/snackbar/v4/SnackbarV4.vue.d.ts +20 -20
- package/components/table/common/Table.common.d.ts +1 -0
- package/components/table/common/Table.common.js +65 -61
- package/components/table/v4/DataGrid.vue.d.ts +5 -1
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +166 -162
- package/components/table/v4/DataGridMenu.vue2.js +3 -2
- package/components/table/v4/HelpIcon.vue.js +5 -5
- package/components/table/v4/HelpIcon.vue2.js +5 -5
- package/components/table/v4/index.d.ts +16 -4
- package/components/textArea/v4/TextAreaV4.vue.js +3 -3
- package/components/textArea/v4/TextAreaV4.vue2.js +1 -1
- package/components/toggle/v4/ToggleV4.vue.d.ts +1 -1
- package/components/toggle/v4/ToggleV4.vue.js +3 -3
- package/components/toggle/v4/ToggleV4.vue2.js +12 -12
- package/components/toggle/v4/index.d.ts +20 -20
- package/composables/useFormValidation.js +19 -13
- package/design-foundation.stories/icons/iconsData.d.ts +5 -1
- package/index.d.ts +1091 -632
- package/mocks/apps.d.ts +1 -0
- package/mocks/options.d.ts +12 -0
- package/package.json +1 -1
- package/utils/text.d.ts +1 -0
- package/utils/text.js +9 -0
- package/Alert.vue_vue_type_style_index_0_scoped_d6680a72_lang.css +0 -1
- package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_39c47ad1_lang.css +0 -1
- package/ChipV4.vue_vue_type_style_index_0_scoped_78d7c9c0_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_6df3b70f_lang.css +0 -1
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_1cc45a5d_lang.css +0 -1
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_ad524750_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_0363db63_lang.css +0 -1
- package/FoldableSection.vue_vue_type_style_index_0_scoped_8d0fd203_lang.css +0 -1
- package/HelpIcon.vue_vue_type_style_index_0_scoped_7a611779_lang.css +0 -1
- package/IconV4.vue_vue_type_style_index_0_scoped_a78f8a3e_lang.css +0 -1
- package/InlineCopy.vue_vue_type_style_index_0_scoped_6a7b3795_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_e0c24b6a_lang.css +0 -1
- package/TextAreaV4.vue_vue_type_style_index_0_scoped_8199b662_lang.css +0 -1
- package/ToggleV4.vue_vue_type_style_index_0_scoped_ad231e8c_lang.css +0 -1
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import "../../../DropdownV4.
|
|
2
|
-
import
|
|
1
|
+
import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_7af4f288_lang.css"; import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; import { defineComponent as se, computed as x, openBlock as i, createElementBlock as n, mergeProps as u, unref as e, renderSlot as v, createElementVNode as p, createVNode as a, withCtx as c, Transition as ue, normalizeClass as A, normalizeStyle as ce, isRef as fe, createCommentVNode as r, createTextVNode as g, toDisplayString as ye, withModifiers as $, Fragment as pe, renderList as me, toRaw as h, createBlock as H, resolveDynamicComponent as ge } from "vue";
|
|
2
|
+
import O from "../../button/v4/ButtonV4.vue.js";
|
|
3
3
|
import "../../button/v4/IconButtonV4.vue.js";
|
|
4
4
|
import "./DropdownV4.vue.js";
|
|
5
5
|
import Te from "./DefaultDropdownTrigger.vue.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import ke from "./IconButtonDropdownTrigger.vue.js";
|
|
7
|
+
import be from "./ChipDropdownTrigger.vue.js";
|
|
8
8
|
import he from "./AppDropdownTrigger.vue.js";
|
|
9
9
|
import "./ButtonDropdownTrigger.vue.js";
|
|
10
10
|
import "./ButtonFilterDropdownTrigger.vue.js";
|
|
11
|
+
import "./TreeDropdown.vue.js";
|
|
11
12
|
import U from "./OptionV4.vue.js";
|
|
12
|
-
import
|
|
13
|
+
import we from "../../search/v4/SearchV4.vue.js";
|
|
13
14
|
import W from "../../typography/v4/Typography.vue.js";
|
|
14
|
-
import { Dropdown as
|
|
15
|
+
import { Dropdown as Ie } from "floating-vue";
|
|
15
16
|
import { DropdownTestIdModifiers as f } from "../../../testids/index.js";
|
|
16
|
-
import { dropdownCommon as
|
|
17
|
+
import { dropdownCommon as ve } from "../common/Dropdown.common.js";
|
|
17
18
|
import Ce from "../../loader/v4/Loader.vue.js";
|
|
18
19
|
import { useTestIdAttrs as Se } from "../../../utils/testIds.js";
|
|
19
|
-
import { TRIGGERS as
|
|
20
|
+
import { TRIGGERS as m } from "./Dropdown.types.js";
|
|
20
21
|
import { useElementSize as Ae } from "@vueuse/core";
|
|
21
|
-
import
|
|
22
|
-
const
|
|
22
|
+
import Oe from "../../shared/FieldHelpText.vue.js";
|
|
23
|
+
const Le = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ke = { key: 1 }, Ne = { key: 2 }, De = {
|
|
23
24
|
key: 0,
|
|
24
25
|
class: "inline-search-wrapper"
|
|
25
26
|
}, Pe = {
|
|
@@ -28,10 +29,10 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
28
29
|
}, Re = {
|
|
29
30
|
key: 1,
|
|
30
31
|
class: "loader"
|
|
31
|
-
}, Fe = { key: 2 },
|
|
32
|
+
}, Fe = { key: 2 }, Ve = ["aria-selected", "aria-disabled", "onClick"], ze = {
|
|
32
33
|
key: 1,
|
|
33
34
|
class: "actions-wrapper"
|
|
34
|
-
}, xe = { class: "actions-clear-all" }, $e = { class: "actions-apply-cancel" },
|
|
35
|
+
}, xe = { class: "actions-clear-all" }, $e = { class: "actions-apply-cancel" }, ut = /* @__PURE__ */ se({
|
|
35
36
|
__name: "DropdownV4",
|
|
36
37
|
props: {
|
|
37
38
|
modelValue: { default: null },
|
|
@@ -60,9 +61,10 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
60
61
|
triggerFeedbackText: { default: "" },
|
|
61
62
|
triggerFeedbackVariant: { default: null },
|
|
62
63
|
triggerFeedbackShowIcon: { type: Boolean, default: !1 },
|
|
64
|
+
triggerShowAllSelectedText: { type: Boolean, default: !0 },
|
|
63
65
|
size: { default: "medium" },
|
|
64
66
|
mandatory: { type: Boolean, default: !1 },
|
|
65
|
-
predefinedTrigger: { default:
|
|
67
|
+
predefinedTrigger: { default: m.DEFAULT },
|
|
66
68
|
inlineSearch: { type: Boolean, default: !1 },
|
|
67
69
|
inlineSearchPlaceholder: { default: "Search" },
|
|
68
70
|
onSearch: { type: Function, default: null },
|
|
@@ -81,10 +83,12 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
81
83
|
theme: { default: "light-theme-v4" },
|
|
82
84
|
fullWidth: { type: Boolean, default: !0 },
|
|
83
85
|
optionsListWidth: { default: null },
|
|
84
|
-
statusType: { default: null }
|
|
86
|
+
statusType: { default: null },
|
|
87
|
+
disableVirtualScroll: { type: Boolean, default: !1 },
|
|
88
|
+
overrideOptionCountCalculation: { type: Function, default: null }
|
|
85
89
|
},
|
|
86
90
|
emits: ["update:selected", "update:isOpen", "closed", "opened", "apply", "selectAll", "clear", "copyToClipboard"],
|
|
87
|
-
setup(t, { expose: M, emit:
|
|
91
|
+
setup(t, { expose: M, emit: L }) {
|
|
88
92
|
const d = t, E = {
|
|
89
93
|
MULTILINE_LIST_HEIGHT: 48,
|
|
90
94
|
LIST_HEIGHT: 32 + 4,
|
|
@@ -95,7 +99,7 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
95
99
|
}, {
|
|
96
100
|
onKeydown: T,
|
|
97
101
|
open: s,
|
|
98
|
-
toggleMenu:
|
|
102
|
+
toggleMenu: w,
|
|
99
103
|
onButtonKeydown: G,
|
|
100
104
|
query: C,
|
|
101
105
|
containerProps: X,
|
|
@@ -105,10 +109,10 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
105
109
|
allSelected: B,
|
|
106
110
|
isIndeterminate: J,
|
|
107
111
|
onSelectAll: Q,
|
|
108
|
-
virtualOptions:
|
|
112
|
+
virtualOptions: K,
|
|
109
113
|
isSelected: S,
|
|
110
|
-
selectedOption:
|
|
111
|
-
selectedOptionPrevious:
|
|
114
|
+
selectedOption: k,
|
|
115
|
+
selectedOptionPrevious: N,
|
|
112
116
|
selectedValue: Z,
|
|
113
117
|
onSelect: D,
|
|
114
118
|
activeIndex: P,
|
|
@@ -122,8 +126,8 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
122
126
|
el: ne,
|
|
123
127
|
onClearAllSelections: F,
|
|
124
128
|
clearAll: ae
|
|
125
|
-
} =
|
|
126
|
-
|
|
129
|
+
} = ve(d, L, E), y = Se(d.testId, f), V = x(() => !d.predefinedTrigger || d.predefinedTrigger === m.DEFAULT ? Te : d.predefinedTrigger === m.APP ? he : null), { width: z } = Ae(R), de = x(() => d.optionsListWidth ? d.optionsListWidth : !d.predefinedTrigger || d.predefinedTrigger === m.DEFAULT || d.predefinedTrigger === m.APP ? z.value - 2 > 240 ? `${z.value - 2}px` : `${E.DROPLIST_MIN_WIDTH}px` : "auto"), re = () => {
|
|
130
|
+
w();
|
|
127
131
|
};
|
|
128
132
|
return M({
|
|
129
133
|
selectItem: D,
|
|
@@ -133,13 +137,13 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
133
137
|
ref: ne,
|
|
134
138
|
class: ["dropdown dropdown--main-wrapper", [{ "dropdown--disabled": t.disabled, "full-width": t.fullWidth }]],
|
|
135
139
|
tabindex: t.disabled ? -1 : 0
|
|
136
|
-
}, e(
|
|
140
|
+
}, e(y)[e(f).WRAPPER], {
|
|
137
141
|
onKeydown: o[8] || (o[8] = //@ts-ignore
|
|
138
142
|
(...l) => e(T) && e(T)(...l))
|
|
139
143
|
}), [
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
a(e(
|
|
144
|
+
v(I.$slots, "label", {}, void 0, !0),
|
|
145
|
+
p("div", Ee, [
|
|
146
|
+
a(e(Ie), u({
|
|
143
147
|
theme: t.theme,
|
|
144
148
|
"popper-class": [
|
|
145
149
|
t.popperClass,
|
|
@@ -156,7 +160,7 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
156
160
|
"auto-hide": !1,
|
|
157
161
|
container: t.container,
|
|
158
162
|
"auto-size": t.autoSize
|
|
159
|
-
}, e(
|
|
163
|
+
}, e(y)[e(f).TRIGGER]), {
|
|
160
164
|
popper: c(() => [
|
|
161
165
|
a(ue, null, {
|
|
162
166
|
default: c(() => [
|
|
@@ -177,7 +181,7 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
177
181
|
(...l) => e(T) && e(T)(...l))
|
|
178
182
|
}, [
|
|
179
183
|
e(s) && t.inlineSearch ? (i(), n("div", De, [
|
|
180
|
-
a(e(
|
|
184
|
+
a(e(we), {
|
|
181
185
|
modelValue: e(C),
|
|
182
186
|
"onUpdate:modelValue": [
|
|
183
187
|
o[4] || (o[4] = (l) => fe(C) ? C.value = l : null),
|
|
@@ -191,22 +195,22 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
191
195
|
onKeydown: e(T)
|
|
192
196
|
}, null, 8, ["modelValue", "placeholder", "auto-focus", "test-id", "onUpdate:modelValue", "onKeydown"])
|
|
193
197
|
])) : r("", !0),
|
|
194
|
-
|
|
195
|
-
|
|
198
|
+
v(I.$slots, "input-list", { open: e(s) }, void 0, !0),
|
|
199
|
+
p("div", u({
|
|
196
200
|
class: ["list-container", { "list-container--multi": t.multi }],
|
|
197
201
|
style: { height: `${e(q)}rem` }
|
|
198
202
|
}, {
|
|
199
203
|
...e(X),
|
|
200
|
-
...e(
|
|
204
|
+
...e(y)[e(f).LIST_CONTAINER]
|
|
201
205
|
}), [
|
|
202
|
-
|
|
206
|
+
p("ul", u(e(Y), {
|
|
203
207
|
role: "listbox",
|
|
204
208
|
class: ["list", { "list--multi": t.multi }]
|
|
205
209
|
}), [
|
|
206
210
|
!e(j).length && !t.loading ? (i(), n("li", Pe, [
|
|
207
|
-
a(e(W), u({ variant: "body2" }, e(
|
|
211
|
+
a(e(W), u({ variant: "body2" }, e(y)[e(f).NO_RESULT]), {
|
|
208
212
|
default: c(() => [
|
|
209
|
-
g(
|
|
213
|
+
g(ye(t.noResultsText), 1)
|
|
210
214
|
]),
|
|
211
215
|
_: 1
|
|
212
216
|
}, 16)
|
|
@@ -229,7 +233,7 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
229
233
|
"is-indeterminate": e(J),
|
|
230
234
|
"select-all-option": ""
|
|
231
235
|
},
|
|
232
|
-
e(
|
|
236
|
+
e(y)[e(f).SELECT_ALL],
|
|
233
237
|
{
|
|
234
238
|
onClick: o[5] || (o[5] = $((l) => e(Q)(), ["stop"]))
|
|
235
239
|
}
|
|
@@ -240,22 +244,23 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
240
244
|
_: 1
|
|
241
245
|
}, 16, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate"])
|
|
242
246
|
])) : r("", !0),
|
|
243
|
-
e(
|
|
244
|
-
key:
|
|
245
|
-
"aria-selected": e(S)(
|
|
247
|
+
e(K).length && !t.loading ? (i(!0), n(pe, { key: 3 }, me(e(K), ({ data: l, index: b }) => (i(), n("li", {
|
|
248
|
+
key: b,
|
|
249
|
+
"aria-selected": e(S)(h(e(k)), l),
|
|
246
250
|
"aria-disabled": !!t.disabled,
|
|
247
|
-
onClick: $(() => e(D)(l,
|
|
251
|
+
onClick: $(() => e(D)(l, b), ["stop"])
|
|
248
252
|
}, [
|
|
249
|
-
|
|
253
|
+
v(I.$slots, "default", {
|
|
250
254
|
option: l,
|
|
251
|
-
|
|
252
|
-
|
|
255
|
+
index: b,
|
|
256
|
+
selected: e(S)(h(e(k)), l),
|
|
257
|
+
active: h(e(P)) === b,
|
|
253
258
|
disabled: l[d.disabledOptionKey]
|
|
254
259
|
}, () => [
|
|
255
260
|
a(e(U), {
|
|
256
261
|
option: l,
|
|
257
|
-
selected: e(S)(
|
|
258
|
-
active:
|
|
262
|
+
"selected-prop": e(S)(h(e(k)), l),
|
|
263
|
+
active: h(e(P)) === b,
|
|
259
264
|
disabled: l[d.disabledOptionKey],
|
|
260
265
|
"name-key": t.optionNameKey,
|
|
261
266
|
"image-key": t.optionImageKey,
|
|
@@ -263,14 +268,14 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
263
268
|
"icon-type": t.optionIconType,
|
|
264
269
|
"end-icon-key": t.optionEndIconKey,
|
|
265
270
|
"end-icon-type": t.optionEndIconType
|
|
266
|
-
}, null, 8, ["option", "selected", "active", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type"])
|
|
271
|
+
}, null, 8, ["option", "selected-prop", "active", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type"])
|
|
267
272
|
], !0)
|
|
268
|
-
], 8,
|
|
273
|
+
], 8, Ve))), 128)) : r("", !0)
|
|
269
274
|
], 16)
|
|
270
275
|
], 16),
|
|
271
|
-
t.multi ? (i(), n("div",
|
|
272
|
-
|
|
273
|
-
a(e(
|
|
276
|
+
t.multi ? (i(), n("div", ze, [
|
|
277
|
+
p("div", xe, [
|
|
278
|
+
a(e(O), u(
|
|
274
279
|
{
|
|
275
280
|
ref_key: "clearAll",
|
|
276
281
|
ref: ae,
|
|
@@ -278,7 +283,7 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
278
283
|
variant: "text",
|
|
279
284
|
color: "primary"
|
|
280
285
|
},
|
|
281
|
-
e(
|
|
286
|
+
e(y)[e(f).ACTION_CLEAR_ALL],
|
|
282
287
|
{
|
|
283
288
|
onClick: o[6] || (o[6] = () => e(F)(!1))
|
|
284
289
|
}
|
|
@@ -289,8 +294,8 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
289
294
|
_: 1
|
|
290
295
|
}, 16)
|
|
291
296
|
]),
|
|
292
|
-
|
|
293
|
-
a(e(
|
|
297
|
+
p("div", $e, [
|
|
298
|
+
a(e(O), u(
|
|
294
299
|
{
|
|
295
300
|
ref_key: "cancel",
|
|
296
301
|
ref: ie,
|
|
@@ -298,7 +303,7 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
298
303
|
variant: "outlined",
|
|
299
304
|
color: "primary"
|
|
300
305
|
},
|
|
301
|
-
e(
|
|
306
|
+
e(y)[e(f).ACTION_CANCEL],
|
|
302
307
|
{ onClick: e(_) }
|
|
303
308
|
), {
|
|
304
309
|
default: c(() => [
|
|
@@ -306,13 +311,13 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
306
311
|
]),
|
|
307
312
|
_: 1
|
|
308
313
|
}, 16, ["onClick"]),
|
|
309
|
-
a(e(
|
|
314
|
+
a(e(O), u({
|
|
310
315
|
ref_key: "apply",
|
|
311
316
|
ref: oe,
|
|
312
317
|
"data-testid": "mutli-apply",
|
|
313
318
|
size: "small",
|
|
314
319
|
class: "apply-button"
|
|
315
|
-
}, e(
|
|
320
|
+
}, e(y)[e(f).ACTION_APPLY], { onClick: e(ee) }), {
|
|
316
321
|
default: c(() => [
|
|
317
322
|
g("Apply ")
|
|
318
323
|
]),
|
|
@@ -327,27 +332,27 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
327
332
|
})
|
|
328
333
|
]),
|
|
329
334
|
default: c(() => [
|
|
330
|
-
|
|
335
|
+
p("div", {
|
|
331
336
|
class: A(["button__container", {
|
|
332
337
|
"button__container--open": !!e(s),
|
|
333
338
|
[`button__container--${t.size}`]: !0,
|
|
334
339
|
"button__container--disabled": t.disabled
|
|
335
340
|
}])
|
|
336
341
|
}, [
|
|
337
|
-
|
|
342
|
+
v(I.$slots, "dropdown-trigger", {
|
|
338
343
|
buttonTriggerProps: {
|
|
339
344
|
open: e(s),
|
|
340
345
|
disabled: t.disabled,
|
|
341
346
|
label: e(Z) || t.placeholder,
|
|
342
|
-
onClick: () => e(
|
|
347
|
+
onClick: () => e(w)()
|
|
343
348
|
}
|
|
344
349
|
}, () => [
|
|
345
|
-
|
|
350
|
+
p("div", {
|
|
346
351
|
ref_key: "buttonRef",
|
|
347
352
|
ref: R
|
|
348
353
|
}, [
|
|
349
|
-
e(
|
|
350
|
-
(i(), H(ge(e(
|
|
354
|
+
e(V) ? (i(), n("div", Be, [
|
|
355
|
+
(i(), H(ge(e(V)), {
|
|
351
356
|
placeholder: t.placeholder,
|
|
352
357
|
open: e(s),
|
|
353
358
|
label: t.triggerLabel,
|
|
@@ -356,37 +361,40 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
356
361
|
"test-id": t.testId,
|
|
357
362
|
multi: t.multi,
|
|
358
363
|
disabled: t.disabled,
|
|
359
|
-
"selected-option": t.multi ? e(
|
|
364
|
+
"selected-option": t.multi ? e(N) : e(k),
|
|
360
365
|
"display-value": t.displayValue,
|
|
361
366
|
options: t.options,
|
|
362
367
|
"option-name-key": t.optionNameKey,
|
|
363
368
|
"option-image-key": t.optionImageKey,
|
|
364
369
|
"option-icon-key": t.optionIconKey,
|
|
365
370
|
"option-icon-type": t.optionIconType,
|
|
371
|
+
"option-end-icon-key": t.optionEndIconKey,
|
|
372
|
+
"option-end-icon-type": t.optionEndIconType,
|
|
366
373
|
"feedback-variant": t.triggerFeedbackVariant,
|
|
367
374
|
"value-to-copy": t.valueToCopy,
|
|
368
375
|
"status-dot-type": t.statusType,
|
|
369
376
|
size: t.size,
|
|
377
|
+
"show-all-selected-text": t.triggerShowAllSelectedText,
|
|
370
378
|
onKeydown: e(G),
|
|
371
379
|
onClick: re,
|
|
372
|
-
onCopyToClipboard: o[0] || (o[0] = (l) =>
|
|
373
|
-
}, null, 40, ["placeholder", "open", "label", "show-feedback-icon", "mandatory", "test-id", "multi", "disabled", "selected-option", "display-value", "options", "option-name-key", "option-image-key", "option-icon-key", "option-icon-type", "feedback-variant", "value-to-copy", "status-dot-type", "size", "onKeydown"]))
|
|
380
|
+
onCopyToClipboard: o[0] || (o[0] = (l) => L("copyToClipboard"))
|
|
381
|
+
}, null, 40, ["placeholder", "open", "label", "show-feedback-icon", "mandatory", "test-id", "multi", "disabled", "selected-option", "display-value", "options", "option-name-key", "option-image-key", "option-icon-key", "option-icon-type", "option-end-icon-key", "option-end-icon-type", "feedback-variant", "value-to-copy", "status-dot-type", "size", "show-all-selected-text", "onKeydown"]))
|
|
374
382
|
])) : r("", !0),
|
|
375
|
-
t.predefinedTrigger === e(
|
|
376
|
-
a(e(
|
|
377
|
-
onClick: o[1] || (o[1] = (l) => e(
|
|
383
|
+
t.predefinedTrigger === e(m).ICON_BUTTON ? (i(), n("div", Ke, [
|
|
384
|
+
a(e(ke), {
|
|
385
|
+
onClick: o[1] || (o[1] = (l) => e(w)())
|
|
378
386
|
})
|
|
379
387
|
])) : r("", !0),
|
|
380
|
-
t.predefinedTrigger === e(
|
|
381
|
-
a(e(
|
|
388
|
+
t.predefinedTrigger === e(m).CHIP ? (i(), n("div", Ne, [
|
|
389
|
+
a(e(be), {
|
|
382
390
|
open: e(s),
|
|
383
391
|
label: t.placeholder,
|
|
384
392
|
"test-id": t.testId,
|
|
385
393
|
options: t.options,
|
|
386
|
-
"selected-option": t.multi ? e(
|
|
394
|
+
"selected-option": t.multi ? e(N) : e(k),
|
|
387
395
|
"display-value": t.displayValue,
|
|
388
396
|
multi: t.multi,
|
|
389
|
-
onClick: o[2] || (o[2] = (l) => e(
|
|
397
|
+
onClick: o[2] || (o[2] = (l) => e(w)()),
|
|
390
398
|
onClear: o[3] || (o[3] = (l) => e(F)())
|
|
391
399
|
}, null, 8, ["open", "label", "test-id", "options", "selected-option", "display-value", "multi"])
|
|
392
400
|
])) : r("", !0)
|
|
@@ -396,7 +404,7 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
396
404
|
]),
|
|
397
405
|
_: 3
|
|
398
406
|
}, 16, ["theme", "popper-class", "placement", "skidding", "distance", "flip", "shown", "container", "auto-size"]),
|
|
399
|
-
t.triggerFeedbackText ? (i(), H(
|
|
407
|
+
t.triggerFeedbackText ? (i(), H(Oe, {
|
|
400
408
|
key: 0,
|
|
401
409
|
text: t.triggerFeedbackText,
|
|
402
410
|
variant: t.triggerFeedbackVariant,
|
|
@@ -405,9 +413,9 @@ const Oe = ["tabindex"], Ee = { style: { width: "100%" } }, Be = { key: 0 }, Ne
|
|
|
405
413
|
class: "dropdown-field-help-text"
|
|
406
414
|
}, null, 8, ["text", "variant", "show-icon", "test-id"])) : r("", !0)
|
|
407
415
|
])
|
|
408
|
-
], 16,
|
|
416
|
+
], 16, Le));
|
|
409
417
|
}
|
|
410
418
|
});
|
|
411
419
|
export {
|
|
412
|
-
|
|
420
|
+
ut as default
|
|
413
421
|
};
|
|
@@ -9,9 +9,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
9
9
|
nameKey?: string;
|
|
10
10
|
imageKey?: string;
|
|
11
11
|
iconKey?: string;
|
|
12
|
-
iconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
12
|
+
iconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
13
13
|
endIconKey?: string;
|
|
14
|
-
endIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
14
|
+
endIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
15
15
|
toolTipPlacement?: "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
|
|
16
16
|
}>, {
|
|
17
17
|
subtitle: string;
|
|
@@ -38,9 +38,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
38
38
|
nameKey?: string;
|
|
39
39
|
imageKey?: string;
|
|
40
40
|
iconKey?: string;
|
|
41
|
-
iconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
41
|
+
iconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
42
42
|
endIconKey?: string;
|
|
43
|
-
endIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
43
|
+
endIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
44
44
|
toolTipPlacement?: "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
|
|
45
45
|
}>, {
|
|
46
46
|
subtitle: string;
|
|
@@ -60,14 +60,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
60
60
|
option: any;
|
|
61
61
|
disabled: boolean;
|
|
62
62
|
active: boolean;
|
|
63
|
-
endIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
63
|
+
endIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
64
64
|
isIndeterminate: boolean;
|
|
65
65
|
subtitle: string;
|
|
66
66
|
selectAllOption: boolean;
|
|
67
67
|
nameKey: string;
|
|
68
68
|
imageKey: string;
|
|
69
69
|
iconKey: string;
|
|
70
|
-
iconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
70
|
+
iconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
71
71
|
endIconKey: string;
|
|
72
72
|
toolTipPlacement: "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
|
|
73
73
|
}>, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./OptionV4.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../../OptionV4.
|
|
4
|
-
const s = /* @__PURE__ */
|
|
2
|
+
/* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../OptionV4.vue_vue_type_style_index_0_scoped_9db0f796_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ _(o, [["__scopeId", "data-v-9db0f796"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import "../../../OptionV4.
|
|
1
|
+
import "../../../OptionV4.vue_vue_type_style_index_0_scoped_9db0f796_lang.css"; import { defineComponent as B, ref as z, computed as N, openBlock as i, createBlock as f, unref as n, withCtx as y, createElementVNode as s, normalizeClass as v, createCommentVNode as o, createElementBlock as l, renderSlot as c, createVNode as d, createTextVNode as K, toDisplayString as h, withModifiers as V } from "vue";
|
|
2
2
|
import "../../typography/Heading.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { NOOP as
|
|
7
|
-
import { optionCommon as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
3
|
+
import w from "../../typography/Text.vue.js";
|
|
4
|
+
import O from "../../checkbox/v4/CheckboxV4.vue.js";
|
|
5
|
+
import T from "../../icon/v4/IconV4.vue.js";
|
|
6
|
+
import { NOOP as P } from "@vue/shared";
|
|
7
|
+
import { optionCommon as S } from "../common/Option.common.js";
|
|
8
|
+
import E from "../../typography/v4/Typography.vue.js";
|
|
9
|
+
import j from "../../tooltip/v4/TooltipV4.vue.js";
|
|
10
|
+
import { isElementTruncated as M } from "../../../utils/text.js";
|
|
11
|
+
const R = {
|
|
11
12
|
key: 1,
|
|
12
13
|
class: "image"
|
|
13
|
-
},
|
|
14
|
+
}, A = ["src"], D = {
|
|
14
15
|
key: 2,
|
|
15
16
|
class: "start-icon"
|
|
16
|
-
},
|
|
17
|
+
}, q = {
|
|
17
18
|
key: 3,
|
|
18
19
|
class: "end-icon"
|
|
19
|
-
},
|
|
20
|
+
}, F = { key: 0 }, _ = /* @__PURE__ */ B({
|
|
20
21
|
__name: "OptionV4",
|
|
21
22
|
props: {
|
|
22
23
|
option: { default: null },
|
|
@@ -35,82 +36,87 @@ const P = {
|
|
|
35
36
|
toolTipPlacement: { default: "right" }
|
|
36
37
|
},
|
|
37
38
|
setup(e) {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
const g = e, { selected: r, isMulti: u, id: I, onClick: x, api: b } = S(g), m = z(null), p = N(
|
|
40
|
+
() => m.value && M(m.value)
|
|
41
|
+
), C = (t) => t && typeof t == "object" && "optionTooltipText" in t ? t.optionTooltipText : p.value ? t[g.nameKey] : "", $ = (t) => t && typeof t == "object" && "optionTooltipTestId" in t ? t.optionTooltipTestId : null;
|
|
42
|
+
return (t, a) => (i(), f(n(j), {
|
|
43
|
+
text: C(e.option),
|
|
44
|
+
"test-id": $(e.option),
|
|
42
45
|
placement: e.toolTipPlacement,
|
|
43
46
|
class: "tooltip-option"
|
|
44
47
|
}, {
|
|
45
48
|
default: y(() => [
|
|
46
49
|
s("div", {
|
|
47
50
|
ref: "el",
|
|
48
|
-
class:
|
|
51
|
+
class: v(["item-container", {
|
|
49
52
|
"item-container--disabled": e.disabled,
|
|
50
53
|
"item-container--active": e.nameKey ? !1 : e.active,
|
|
51
|
-
"item-container--selected":
|
|
52
|
-
"item-container--multi":
|
|
54
|
+
"item-container--selected": n(r),
|
|
55
|
+
"item-container--multi": n(u)
|
|
53
56
|
}])
|
|
54
57
|
}, [
|
|
55
58
|
s("div", {
|
|
56
|
-
class:
|
|
57
|
-
"item--multi":
|
|
59
|
+
class: v(["item", {
|
|
60
|
+
"item--multi": n(u),
|
|
58
61
|
"item--with-icon": t.$slots["icon-start"] || t.$slots.image
|
|
59
62
|
}])
|
|
60
63
|
}, [
|
|
61
|
-
|
|
64
|
+
n(u) ? (i(), f(n(O), {
|
|
62
65
|
key: 0,
|
|
63
|
-
id:
|
|
66
|
+
id: n(I).toString(),
|
|
64
67
|
tabindex: "-1",
|
|
65
68
|
class: "checkbox",
|
|
66
|
-
|
|
67
|
-
"is-
|
|
68
|
-
|
|
69
|
-
onClick: a[0] || (a[0] = (g) => e.disabled ? i(N)() : i(I)(g))
|
|
69
|
+
"is-checked": n(r),
|
|
70
|
+
"is-indeterminate": e.isIndeterminate,
|
|
71
|
+
onClick: a[0] || (a[0] = (k) => e.disabled ? n(P)() : n(x)(k))
|
|
70
72
|
}, null, 8, ["id", "is-checked", "is-indeterminate"])) : o("", !0),
|
|
71
|
-
t.$slots.image || e.imageKey ? (
|
|
73
|
+
t.$slots.image || e.imageKey ? (i(), l("div", R, [
|
|
72
74
|
c(t.$slots, "image", {}, () => [
|
|
73
|
-
e.imageKey ? (
|
|
75
|
+
e.imageKey ? (i(), l("img", {
|
|
74
76
|
key: 0,
|
|
75
77
|
src: e.option[e.imageKey]
|
|
76
|
-
}, null, 8,
|
|
78
|
+
}, null, 8, A)) : o("", !0)
|
|
77
79
|
], !0)
|
|
78
80
|
])) : o("", !0),
|
|
79
|
-
t.$slots["icon-start"] || e.iconKey ? (
|
|
81
|
+
t.$slots["icon-start"] || e.iconKey ? (i(), l("div", D, [
|
|
80
82
|
c(t.$slots, "icon-start", {}, () => [
|
|
81
|
-
d(
|
|
83
|
+
d(n(T), {
|
|
82
84
|
type: e.iconType,
|
|
83
85
|
name: e.option[e.iconKey],
|
|
84
86
|
size: e.iconType === "regular" ? "20px" : "16px"
|
|
85
87
|
}, null, 8, ["type", "name", "size"])
|
|
86
88
|
], !0)
|
|
87
89
|
])) : o("", !0),
|
|
88
|
-
s("div",
|
|
89
|
-
|
|
90
|
+
s("div", {
|
|
91
|
+
ref_key: "textContainerRef",
|
|
92
|
+
ref: m,
|
|
93
|
+
class: "text-container"
|
|
94
|
+
}, [
|
|
95
|
+
d(n(E), {
|
|
90
96
|
class: "option-text",
|
|
91
97
|
variant: "body2"
|
|
92
98
|
}, {
|
|
93
99
|
default: y(() => [
|
|
94
100
|
c(t.$slots, "default", {}, () => [
|
|
95
|
-
|
|
101
|
+
K(h(e.option[e.nameKey]), 1)
|
|
96
102
|
], !0)
|
|
97
103
|
]),
|
|
98
104
|
_: 3
|
|
99
105
|
}),
|
|
100
|
-
e.subtitle ? (
|
|
106
|
+
e.subtitle ? (i(), f(n(w), {
|
|
101
107
|
key: 0,
|
|
102
108
|
class: "subtitle",
|
|
103
109
|
size: "xs"
|
|
104
110
|
}, {
|
|
105
111
|
default: y(() => [
|
|
106
|
-
|
|
112
|
+
K(h(e.subtitle), 1)
|
|
107
113
|
]),
|
|
108
114
|
_: 1
|
|
109
115
|
})) : o("", !0)
|
|
110
|
-
]),
|
|
111
|
-
t.$slots["icon-end"] || e.endIconKey ? (
|
|
116
|
+
], 512),
|
|
117
|
+
t.$slots["icon-end"] || e.endIconKey && e.option[e.endIconKey] ? (i(), l("div", q, [
|
|
112
118
|
c(t.$slots, "icon-end", {}, () => [
|
|
113
|
-
d(
|
|
119
|
+
d(n(T), {
|
|
114
120
|
type: e.endIconType,
|
|
115
121
|
name: e.option[e.endIconKey],
|
|
116
122
|
size: e.endIconType === "regular" || e.endIconType === "ab-test" ? "20px" : "16px"
|
|
@@ -118,15 +124,15 @@ const P = {
|
|
|
118
124
|
], !0)
|
|
119
125
|
])) : o("", !0)
|
|
120
126
|
], 2),
|
|
121
|
-
|
|
127
|
+
n(b).clearable && n(r) ? (i(), l("div", F, [
|
|
122
128
|
s("button", {
|
|
123
129
|
class: "clear-button",
|
|
124
|
-
onClick: a[1] || (a[1] =
|
|
130
|
+
onClick: a[1] || (a[1] = V((k) => n(b).clearSelection(), ["prevent", "stop"]))
|
|
125
131
|
}, [
|
|
126
|
-
d(
|
|
132
|
+
d(n(T), {
|
|
127
133
|
name: "close",
|
|
128
134
|
width: "8",
|
|
129
|
-
height: 8
|
|
135
|
+
height: "8"
|
|
130
136
|
})
|
|
131
137
|
])
|
|
132
138
|
])) : o("", !0)
|
|
@@ -137,5 +143,5 @@ const P = {
|
|
|
137
143
|
}
|
|
138
144
|
});
|
|
139
145
|
export {
|
|
140
|
-
|
|
146
|
+
_ as default
|
|
141
147
|
};
|