@ironsource/shared-ui 2.1.12-rc.25 → 2.1.12-rc.26
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/ChartPlane.vue_vue_type_style_index_0_scoped_ff7e556e_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_683b8a75_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_0963bb3c_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_1f7f7f9c_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_9560a062_lang.css +1 -0
- package/SwitchV4.vue_vue_type_style_index_0_scoped_cd6621a7_lang.css +1 -0
- package/components/chart/Chart.vue.d.ts +1 -1
- package/components/chart/ChartPlane.vue.d.ts +1 -1
- package/components/chart/ChartPlane.vue.js +3 -3
- package/components/chart/ChartPlane.vue2.js +141 -141
- package/components/chart/index.d.ts +24 -24
- package/components/chart/utils/utils.d.ts +1 -2
- package/components/chart/utils/utils.js +13 -19
- package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +17 -9
- package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +133 -123
- package/components/dropdown/v4/DropdownV4.vue.d.ts +5 -0
- package/components/dropdown/v4/DropdownV4.vue.js +3 -3
- package/components/dropdown/v4/DropdownV4.vue2.js +41 -39
- package/components/dropdown/v4/OptionV4.vue.js +3 -3
- package/components/dropdown/v4/OptionV4.vue2.js +41 -39
- package/components/dropdown/v4/dropdownStoryArgs.d.ts +8 -0
- package/components/dropdown/v4/index.d.ts +452 -107
- package/components/includeExclude/IncludeExclude.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +1 -1
- package/components/includeExclude/index.d.ts +40 -40
- package/components/switch/v4/SwitchV4.vue.d.ts +11 -0
- package/components/switch/v4/SwitchV4.vue.js +2 -2
- package/components/switch/v4/SwitchV4.vue2.js +39 -26
- package/components/switch/v4/index.d.ts +18 -0
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +4 -4
- package/index.d.ts +955 -229
- package/mocks/optionsWithIcons.d.ts +1 -0
- package/package.json +1 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_903fc6ae_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_cce87267_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_5b72e35a_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_92ead583_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_3dc741c1_lang.css +0 -1
- package/SwitchV4.vue_vue_type_style_index_0_scoped_fa120cf6_lang.css +0 -1
- package/components/chart/composables/useChartValues.d.ts +0 -12
- package/components/chart/composables/useChartValues.js +0 -32
|
@@ -13,6 +13,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
13
13
|
isOpen?: boolean;
|
|
14
14
|
options: unknown[];
|
|
15
15
|
showSelectAll?: boolean;
|
|
16
|
+
showClearAll?: boolean;
|
|
16
17
|
defaultOpen?: boolean;
|
|
17
18
|
keepOpen?: boolean;
|
|
18
19
|
autoSize?: boolean;
|
|
@@ -94,6 +95,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
94
95
|
disableKeyboardEvents: boolean;
|
|
95
96
|
testId: string;
|
|
96
97
|
showSelectAll: boolean;
|
|
98
|
+
showClearAll: boolean;
|
|
97
99
|
dynamicFilterMode: boolean;
|
|
98
100
|
minSelections: number;
|
|
99
101
|
maxSelections: any;
|
|
@@ -159,6 +161,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
159
161
|
isOpen?: boolean;
|
|
160
162
|
options: unknown[];
|
|
161
163
|
showSelectAll?: boolean;
|
|
164
|
+
showClearAll?: boolean;
|
|
162
165
|
defaultOpen?: boolean;
|
|
163
166
|
keepOpen?: boolean;
|
|
164
167
|
autoSize?: boolean;
|
|
@@ -240,6 +243,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
240
243
|
disableKeyboardEvents: boolean;
|
|
241
244
|
testId: string;
|
|
242
245
|
showSelectAll: boolean;
|
|
246
|
+
showClearAll: boolean;
|
|
243
247
|
dynamicFilterMode: boolean;
|
|
244
248
|
minSelections: number;
|
|
245
249
|
maxSelections: any;
|
|
@@ -307,6 +311,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
307
311
|
multi: boolean;
|
|
308
312
|
infiniteLoading: boolean;
|
|
309
313
|
showSelectAll: boolean;
|
|
314
|
+
showClearAll: boolean;
|
|
310
315
|
defaultOpen: boolean;
|
|
311
316
|
keepOpen: boolean;
|
|
312
317
|
autoSize: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "./DropdownV4.vue2.js";
|
|
2
|
-
/* empty css *//* empty css */import
|
|
3
|
-
// import "../../../DropdownV4.
|
|
2
|
+
/* empty css *//* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_1f7f7f9c_lang.css"; //*');
|
|
4
4
|
// import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; //');
|
|
5
|
-
const r = /* @__PURE__ */
|
|
5
|
+
const r = /* @__PURE__ */ _(o, [["__scopeId", "data-v-1f7f7f9c"]]);
|
|
6
6
|
export {
|
|
7
7
|
r as default
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../../DropdownV4.
|
|
2
|
-
import
|
|
1
|
+
import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_1f7f7f9c_lang.css"; import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; import { defineComponent as ke, computed as E, watch as Te, toRaw as I, openBlock as d, createElementBlock as r, mergeProps as f, unref as t, renderSlot as m, createElementVNode as p, createVNode as a, withCtx as u, Transition as we, normalizeClass as B, normalizeStyle as be, createTextVNode as T, createCommentVNode as s, isRef as Ie, toDisplayString as X, withModifiers as q, Fragment as ve, renderList as Se, createSlots as Ce, createBlock as x, resolveDynamicComponent as Ke } from "vue";
|
|
2
|
+
import F from "../../button/v4/ButtonV4.vue.js";
|
|
3
3
|
import "../../button/v4/IconButtonV4.vue.js";
|
|
4
4
|
import "../../button/v4/ButtonGroup.vue.js";
|
|
5
5
|
import "../../button/v4/ToggleButtonGroupAB.vue.js";
|
|
@@ -52,6 +52,7 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
52
52
|
isOpen: { type: Boolean },
|
|
53
53
|
options: null,
|
|
54
54
|
showSelectAll: { type: Boolean, default: !0 },
|
|
55
|
+
showClearAll: { type: Boolean, default: !0 },
|
|
55
56
|
defaultOpen: { type: Boolean, default: !1 },
|
|
56
57
|
keepOpen: { type: Boolean, default: !1 },
|
|
57
58
|
autoSize: { type: Boolean, default: !1 },
|
|
@@ -107,8 +108,8 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
107
108
|
withConditions: { type: Boolean, default: !1 }
|
|
108
109
|
},
|
|
109
110
|
emits: ["update:selected", "update:isOpen", "closed", "opened", "apply", "selectAll", "clear", "copyToClipboard", "onsearch", "loadMore", "allSelectedChanged", "unsavedSelectionUpdate"],
|
|
110
|
-
setup(e, { expose: J, emit:
|
|
111
|
-
const o = e,
|
|
111
|
+
setup(e, { expose: J, emit: N }) {
|
|
112
|
+
const o = e, V = {
|
|
112
113
|
MULTILINE_LIST_HEIGHT: 48,
|
|
113
114
|
LIST_HEIGHT: 32 + 4,
|
|
114
115
|
MAX_NUMBER_OF_OPTIONS: 7.5,
|
|
@@ -119,36 +120,36 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
119
120
|
onKeydown: b,
|
|
120
121
|
open: c,
|
|
121
122
|
toggleMenu: v,
|
|
122
|
-
onButtonKeydown:
|
|
123
|
+
onButtonKeydown: D,
|
|
123
124
|
query: S,
|
|
124
125
|
containerProps: Q,
|
|
125
126
|
calculateTableHeight: Z,
|
|
126
127
|
wrapperProps: _,
|
|
127
128
|
filteredOptions: ee,
|
|
128
|
-
allSelected:
|
|
129
|
+
allSelected: P,
|
|
129
130
|
allSelectedApplied: K,
|
|
130
131
|
isIndeterminate: te,
|
|
131
132
|
onSelectAll: oe,
|
|
132
|
-
virtualOptions:
|
|
133
|
+
virtualOptions: R,
|
|
133
134
|
isSelected: A,
|
|
134
135
|
selectedOption: k,
|
|
135
136
|
selectedOptionPrevious: O,
|
|
136
137
|
selectedValue: ne,
|
|
137
|
-
onSelect:
|
|
138
|
-
activeIndex:
|
|
138
|
+
onSelect: z,
|
|
139
|
+
activeIndex: $,
|
|
139
140
|
onCancel: ie,
|
|
140
141
|
onApply: le,
|
|
141
142
|
scrollTo: ae,
|
|
142
143
|
listRef: de,
|
|
143
|
-
buttonRef:
|
|
144
|
+
buttonRef: M,
|
|
144
145
|
apply: se,
|
|
145
146
|
cancel: re,
|
|
146
147
|
el: ue,
|
|
147
|
-
onClearAllSelections:
|
|
148
|
+
onClearAllSelections: W,
|
|
148
149
|
clearAll: ce,
|
|
149
150
|
isGroup: ye,
|
|
150
151
|
flattenAndMarkGroupOptions: me
|
|
151
|
-
} = Fe(o,
|
|
152
|
+
} = Fe(o, N, V), h = Ne(o.testId, g), G = E(() => !o.predefinedTrigger || o.predefinedTrigger === w.DEFAULT ? Ae : o.predefinedTrigger === w.APP ? Ee : null), { width: H } = Ve(M), fe = E(() => o.optionsListWidth ? o.optionsListWidth : !o.predefinedTrigger || o.predefinedTrigger === w.DEFAULT || o.predefinedTrigger === w.APP ? H.value - 2 > 240 ? `${H.value - 2}px` : `${V.DROPLIST_MIN_WIDTH}px` : "auto");
|
|
152
153
|
Te(
|
|
153
154
|
() => o.optionsListWidth,
|
|
154
155
|
() => {
|
|
@@ -158,7 +159,7 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
158
159
|
);
|
|
159
160
|
}
|
|
160
161
|
);
|
|
161
|
-
const
|
|
162
|
+
const U = () => {
|
|
162
163
|
v();
|
|
163
164
|
}, pe = E(() => {
|
|
164
165
|
if (o.multi && o.comparingKey) {
|
|
@@ -185,7 +186,7 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
185
186
|
);
|
|
186
187
|
}, L = (i) => i[o.disabledOptionKey] || ge(i);
|
|
187
188
|
return J({
|
|
188
|
-
selectItem:
|
|
189
|
+
selectItem: z,
|
|
189
190
|
scrollTo: ae
|
|
190
191
|
}), (i, l) => (d(), r("div", f({
|
|
191
192
|
ref_key: "el",
|
|
@@ -281,7 +282,7 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
281
282
|
!t(ee).length && !e.loading && !e.withConditions ? (d(), r("li", Ue, [
|
|
282
283
|
a(t(j), f({ variant: "body2" }, t(h)[t(g).NO_RESULT]), {
|
|
283
284
|
default: u(() => [
|
|
284
|
-
T(
|
|
285
|
+
T(X(e.noResultsText), 1)
|
|
285
286
|
]),
|
|
286
287
|
_: 1
|
|
287
288
|
}, 16)
|
|
@@ -290,16 +291,16 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
290
291
|
p("li", null, [
|
|
291
292
|
a(t(Y), f(
|
|
292
293
|
{
|
|
293
|
-
"aria-selected": t(
|
|
294
|
+
"aria-selected": t(P),
|
|
294
295
|
"aria-disabled": !!e.disabled,
|
|
295
|
-
"selected-prop": t(
|
|
296
|
+
"selected-prop": t(P),
|
|
296
297
|
"is-indeterminate": t(te),
|
|
297
298
|
"is-multi": e.multi,
|
|
298
299
|
"select-all-option": ""
|
|
299
300
|
},
|
|
300
301
|
t(h)[t(g).SELECT_ALL],
|
|
301
302
|
{
|
|
302
|
-
onClick: l[5] || (l[5] =
|
|
303
|
+
onClick: l[5] || (l[5] = q((n) => t(oe)(), ["stop"]))
|
|
303
304
|
}
|
|
304
305
|
), {
|
|
305
306
|
default: u(() => [
|
|
@@ -309,19 +310,19 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
309
310
|
}, 16, ["aria-selected", "aria-disabled", "selected-prop", "is-indeterminate", "is-multi"])
|
|
310
311
|
])
|
|
311
312
|
], !0) : s("", !0),
|
|
312
|
-
t(
|
|
313
|
+
t(R).length && !e.loading ? (d(!0), r(ve, { key: 2 }, Se(t(R), ({ data: n, index: y }) => (d(), r("li", {
|
|
313
314
|
key: y,
|
|
314
315
|
"aria-selected": t(A)(I(t(k)), n),
|
|
315
316
|
"aria-disabled": !!e.disabled,
|
|
316
|
-
onClick:
|
|
317
|
-
() => !L(n) && t(
|
|
317
|
+
onClick: q(
|
|
318
|
+
() => !L(n) && t(z)(n, y),
|
|
318
319
|
["stop"]
|
|
319
320
|
)
|
|
320
321
|
}, [
|
|
321
322
|
e.groupedOptions && t(ye)(n) ? m(i.$slots, "group-option", { key: 0 }, () => [
|
|
322
323
|
a(Pe, null, {
|
|
323
324
|
default: u(() => [
|
|
324
|
-
T(
|
|
325
|
+
T(X(e.displayValue(n) || n[e.optionNameKey]), 1)
|
|
325
326
|
]),
|
|
326
327
|
_: 2
|
|
327
328
|
}, 1024)
|
|
@@ -330,13 +331,13 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
330
331
|
option: n,
|
|
331
332
|
index: y,
|
|
332
333
|
selected: t(A)(I(t(k)), n),
|
|
333
|
-
active: I(t(
|
|
334
|
+
active: I(t($)) === y,
|
|
334
335
|
disabled: L(n)
|
|
335
336
|
}, () => [
|
|
336
337
|
a(t(Y), {
|
|
337
338
|
option: n,
|
|
338
339
|
"selected-prop": t(A)(t(k), n),
|
|
339
|
-
active: I(t(
|
|
340
|
+
active: I(t($)) === y,
|
|
340
341
|
disabled: L(n),
|
|
341
342
|
"name-key": e.optionNameKey,
|
|
342
343
|
"image-key": e.optionImageKey,
|
|
@@ -371,8 +372,9 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
371
372
|
], 16),
|
|
372
373
|
e.multi ? (d(), r("div", Ye, [
|
|
373
374
|
p("div", je, [
|
|
374
|
-
|
|
375
|
+
e.showClearAll ? (d(), x(t(F), f(
|
|
375
376
|
{
|
|
377
|
+
key: 0,
|
|
376
378
|
ref_key: "clearAll",
|
|
377
379
|
ref: ce,
|
|
378
380
|
size: "small",
|
|
@@ -381,17 +383,17 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
381
383
|
},
|
|
382
384
|
t(h)[t(g).ACTION_CLEAR_ALL],
|
|
383
385
|
{
|
|
384
|
-
onClick: l[6] || (l[6] = () => t(
|
|
386
|
+
onClick: l[6] || (l[6] = () => t(W)(!1))
|
|
385
387
|
}
|
|
386
388
|
), {
|
|
387
389
|
default: u(() => [
|
|
388
390
|
T(" Clear all ")
|
|
389
391
|
]),
|
|
390
392
|
_: 1
|
|
391
|
-
}, 16)
|
|
393
|
+
}, 16)) : s("", !0)
|
|
392
394
|
]),
|
|
393
395
|
p("div", Je, [
|
|
394
|
-
a(t(
|
|
396
|
+
a(t(F), f(
|
|
395
397
|
{
|
|
396
398
|
ref_key: "cancel",
|
|
397
399
|
ref: re,
|
|
@@ -407,7 +409,7 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
407
409
|
]),
|
|
408
410
|
_: 1
|
|
409
411
|
}, 16, ["onClick"]),
|
|
410
|
-
a(t(
|
|
412
|
+
a(t(F), f({
|
|
411
413
|
ref_key: "apply",
|
|
412
414
|
ref: se,
|
|
413
415
|
"data-testid": "mutli-apply",
|
|
@@ -437,7 +439,7 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
437
439
|
}, [
|
|
438
440
|
p("div", {
|
|
439
441
|
ref_key: "buttonRef",
|
|
440
|
-
ref:
|
|
442
|
+
ref: M
|
|
441
443
|
}, [
|
|
442
444
|
m(i.$slots, "dropdown-trigger", {
|
|
443
445
|
buttonTriggerProps: {
|
|
@@ -472,12 +474,12 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
472
474
|
size: e.size,
|
|
473
475
|
showAllSelectedText: e.triggerShowAllSelectedText,
|
|
474
476
|
allSelected: t(K),
|
|
475
|
-
onKeydown: t(
|
|
476
|
-
onClick:
|
|
477
|
+
onKeydown: t(D),
|
|
478
|
+
onClick: U
|
|
477
479
|
}
|
|
478
480
|
}, () => [
|
|
479
|
-
t(
|
|
480
|
-
(d(),
|
|
481
|
+
t(G) ? (d(), r("div", $e, [
|
|
482
|
+
(d(), x(Ke(t(G)), {
|
|
481
483
|
placeholder: e.placeholder,
|
|
482
484
|
open: t(c),
|
|
483
485
|
label: e.triggerLabel,
|
|
@@ -503,9 +505,9 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
503
505
|
size: e.size,
|
|
504
506
|
"show-all-selected-text": e.triggerShowAllSelectedText,
|
|
505
507
|
"all-selected": t(K),
|
|
506
|
-
onKeydown: t(
|
|
507
|
-
onClick:
|
|
508
|
-
onCopyToClipboard: l[0] || (l[0] = (n) =>
|
|
508
|
+
onKeydown: t(D),
|
|
509
|
+
onClick: U,
|
|
510
|
+
onCopyToClipboard: l[0] || (l[0] = (n) => N("copyToClipboard"))
|
|
509
511
|
}, 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", "options-end-text-icon-key", "option-flag-key", "feedback-variant", "value-to-copy", "status-dot-type", "size", "show-all-selected-text", "all-selected", "onKeydown"]))
|
|
510
512
|
])) : s("", !0),
|
|
511
513
|
e.predefinedTrigger === t(w).ICON_BUTTON ? (d(), r("div", Me, [
|
|
@@ -525,7 +527,7 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
525
527
|
"all-selected": t(K),
|
|
526
528
|
"shown-values-count": e.triggerShownValuesCount,
|
|
527
529
|
onClick: l[2] || (l[2] = (n) => t(v)()),
|
|
528
|
-
onClear: l[3] || (l[3] = (n) => t(
|
|
530
|
+
onClear: l[3] || (l[3] = (n) => t(W)())
|
|
529
531
|
}, null, 8, ["open", "label", "test-id", "options", "selected-option", "display-value", "multi", "all-selected", "shown-values-count"])
|
|
530
532
|
])) : s("", !0)
|
|
531
533
|
], !0)
|
|
@@ -534,7 +536,7 @@ const Re = ["tabindex"], ze = { style: { width: "100%" } }, $e = { key: 0 }, Me
|
|
|
534
536
|
]),
|
|
535
537
|
_: 3
|
|
536
538
|
}, 16, ["theme", "popper-class", "placement", "skidding", "distance", "flip", "shown", "container", "auto-size"]),
|
|
537
|
-
e.triggerFeedbackText ? (d(),
|
|
539
|
+
e.triggerFeedbackText ? (d(), x(De, {
|
|
538
540
|
key: 0,
|
|
539
541
|
text: e.triggerFeedbackText,
|
|
540
542
|
variant: e.triggerFeedbackVariant,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./OptionV4.vue2.js";
|
|
2
2
|
/* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../OptionV4.
|
|
4
|
-
const
|
|
3
|
+
// import "../../../OptionV4.vue_vue_type_style_index_0_scoped_9560a062_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ _(o, [["__scopeId", "data-v-9560a062"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../OptionV4.
|
|
1
|
+
import "../../../OptionV4.vue_vue_type_style_index_0_scoped_9560a062_lang.css"; import { defineComponent as A, ref as w, watch as F, computed as L, openBlock as o, createBlock as f, unref as n, createSlots as N, withCtx as d, createElementVNode as c, normalizeClass as v, createCommentVNode as i, createElementBlock as l, renderSlot as r, createVNode as a, toDisplayString as u, createTextVNode as g, withModifiers as C, Fragment as j, renderList as R } from "vue";
|
|
2
2
|
import "../../typography/Heading.vue.js";
|
|
3
3
|
import D from "../../typography/Text.vue.js";
|
|
4
4
|
import q from "../../checkbox/v4/CheckboxV4.vue.js";
|
|
@@ -37,7 +37,7 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
37
37
|
}, ie = {
|
|
38
38
|
key: 5,
|
|
39
39
|
class: "option-warning"
|
|
40
|
-
}, le =
|
|
40
|
+
}, le = ["onClick"], ae = { key: 0 }, ve = /* @__PURE__ */ A({
|
|
41
41
|
__name: "OptionV4",
|
|
42
42
|
props: {
|
|
43
43
|
option: { default: null },
|
|
@@ -67,24 +67,24 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
67
67
|
},
|
|
68
68
|
emits: ["toggleTreeCollapse"],
|
|
69
69
|
setup(e, { emit: $ }) {
|
|
70
|
-
const
|
|
71
|
-
|
|
70
|
+
const s = e, { selected: K, id: B, onClick: z, api: h } = H(s), M = (t) => {
|
|
71
|
+
s.stopOptionClickEventPropagation && t.stopPropagation(), s.disabled ? I() : z(t);
|
|
72
72
|
}, p = w(null), b = w(!1), E = (t) => {
|
|
73
|
-
|
|
73
|
+
s.disabled && (t.stopPropagation(), I());
|
|
74
74
|
};
|
|
75
|
-
F([() =>
|
|
75
|
+
F([() => s.treeChildShown, p], async () => {
|
|
76
76
|
await Q(100), b.value = p.value && J(p.value);
|
|
77
77
|
});
|
|
78
|
-
const P = (t) => t && typeof t == "object" && "optionTooltipText" in t ? (Array.isArray(t.optionTooltipText), t.optionTooltipText) : b.value ? t[
|
|
79
|
-
$("toggleTreeCollapse",
|
|
78
|
+
const P = (t) => t && typeof t == "object" && "optionTooltipText" in t ? (Array.isArray(t.optionTooltipText), t.optionTooltipText) : b.value ? t[s.nameKey] : "", x = L(() => P(s.option)), S = (t) => t && typeof t == "object" && "optionTooltipTestId" in t ? t.optionTooltipTestId : null, V = () => {
|
|
79
|
+
$("toggleTreeCollapse", s.option);
|
|
80
80
|
};
|
|
81
81
|
return (t, k) => (o(), f(n(O), {
|
|
82
|
-
text: n(
|
|
82
|
+
text: n(x),
|
|
83
83
|
"test-id": S(e.option),
|
|
84
84
|
placement: e.toolTipPlacement,
|
|
85
85
|
class: "tooltip-option"
|
|
86
86
|
}, N({
|
|
87
|
-
default:
|
|
87
|
+
default: d(() => [
|
|
88
88
|
c("div", {
|
|
89
89
|
ref: "el",
|
|
90
90
|
class: v(["item-container", {
|
|
@@ -111,7 +111,7 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
111
111
|
onClick: k[0] || (k[0] = (y) => M(y))
|
|
112
112
|
}, null, 8, ["id", "is-checked", "is-indeterminate"])) : i("", !0),
|
|
113
113
|
!e.option?.conditionalOptions && (t.$slots.image || e.imageKey) ? (o(), l("div", W, [
|
|
114
|
-
|
|
114
|
+
r(t.$slots, "image", {}, () => [
|
|
115
115
|
e.imageKey ? (o(), l("img", {
|
|
116
116
|
key: 0,
|
|
117
117
|
src: e.option[e.imageKey]
|
|
@@ -119,7 +119,7 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
119
119
|
], !0)
|
|
120
120
|
])) : i("", !0),
|
|
121
121
|
!e.option?.conditionalOptions && (t.$slots.flag || e.optionFlagKey) ? (o(), l("div", Y, [
|
|
122
|
-
|
|
122
|
+
r(t.$slots, "flag", {}, () => [
|
|
123
123
|
e.optionFlagKey ? (o(), f(n(G), {
|
|
124
124
|
key: 0,
|
|
125
125
|
"country-code": e.option[e.optionFlagKey]
|
|
@@ -127,12 +127,13 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
127
127
|
], !0)
|
|
128
128
|
])) : i("", !0),
|
|
129
129
|
!e.option?.conditionalOptions && (t.$slots["icon-start"] || e.iconKey) ? (o(), l("div", Z, [
|
|
130
|
-
|
|
130
|
+
r(t.$slots, "icon-start", {}, () => [
|
|
131
131
|
a(n(m), {
|
|
132
132
|
type: e.iconType,
|
|
133
133
|
name: e.option[e.iconKey],
|
|
134
|
+
color: e.option.disabled ? "var(--text-disabled)" : null,
|
|
134
135
|
size: e.iconType === "regular" ? "20px" : "16px"
|
|
135
|
-
}, null, 8, ["type", "name", "size"])
|
|
136
|
+
}, null, 8, ["type", "name", "color", "size"])
|
|
136
137
|
], !0)
|
|
137
138
|
])) : i("", !0),
|
|
138
139
|
c("div", {
|
|
@@ -144,8 +145,8 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
144
145
|
class: "option-text",
|
|
145
146
|
variant: "body2"
|
|
146
147
|
}, {
|
|
147
|
-
default:
|
|
148
|
-
|
|
148
|
+
default: d(() => [
|
|
149
|
+
r(t.$slots, "default", {}, () => [
|
|
149
150
|
c("div", {
|
|
150
151
|
class: v(`option-content-${e.optionTwoLinesVariant} option-content`)
|
|
151
152
|
}, [
|
|
@@ -154,8 +155,8 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
154
155
|
variant: "body2",
|
|
155
156
|
class: "conditional-option-label"
|
|
156
157
|
}, {
|
|
157
|
-
default:
|
|
158
|
-
g(
|
|
158
|
+
default: d(() => [
|
|
159
|
+
g(u(e.option.conditionalName) + ": ", 1)
|
|
159
160
|
]),
|
|
160
161
|
_: 1
|
|
161
162
|
}),
|
|
@@ -163,12 +164,12 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
163
164
|
variant: "h5",
|
|
164
165
|
class: "conditional-option-value"
|
|
165
166
|
}, {
|
|
166
|
-
default:
|
|
167
|
-
g('"' +
|
|
167
|
+
default: d(() => [
|
|
168
|
+
g('"' + u(e.option[e.nameKey]) + '"', 1)
|
|
168
169
|
]),
|
|
169
170
|
_: 1
|
|
170
171
|
})
|
|
171
|
-
])) : (o(), l("div", _,
|
|
172
|
+
])) : (o(), l("div", _, u(e.option[e.nameKey]), 1)),
|
|
172
173
|
e.endTextIconKey && e.option[e.endTextIconKey] ? (o(), l("span", te, [
|
|
173
174
|
a(n(m), {
|
|
174
175
|
type: "regular",
|
|
@@ -178,8 +179,8 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
178
179
|
])) : i("", !0),
|
|
179
180
|
e.optionTwoLinesKey ? (o(), l("div", ne, [
|
|
180
181
|
a(n(T), { variant: "caption" }, {
|
|
181
|
-
default:
|
|
182
|
-
g(
|
|
182
|
+
default: d(() => [
|
|
183
|
+
g(u(e.option[e.optionTwoLinesKey]), 1)
|
|
183
184
|
]),
|
|
184
185
|
_: 1
|
|
185
186
|
})
|
|
@@ -194,14 +195,14 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
194
195
|
class: "subtitle",
|
|
195
196
|
size: "xs"
|
|
196
197
|
}, {
|
|
197
|
-
default:
|
|
198
|
-
g(
|
|
198
|
+
default: d(() => [
|
|
199
|
+
g(u(e.subtitle), 1)
|
|
199
200
|
]),
|
|
200
201
|
_: 1
|
|
201
202
|
})) : i("", !0)
|
|
202
203
|
], 512),
|
|
203
204
|
t.$slots["icon-end"] || e.endIconKey && e.option[e.endIconKey] ? (o(), l("div", oe, [
|
|
204
|
-
|
|
205
|
+
r(t.$slots, "icon-end", {}, () => [
|
|
205
206
|
a(n(m), {
|
|
206
207
|
type: e.endIconType || "regular",
|
|
207
208
|
name: e.option[e.endIconKey],
|
|
@@ -214,7 +215,7 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
214
215
|
text: e.option[e.warningKey],
|
|
215
216
|
placement: "top"
|
|
216
217
|
}, {
|
|
217
|
-
default:
|
|
218
|
+
default: d(() => [
|
|
218
219
|
a(n(m), {
|
|
219
220
|
class: "option-warning__icon",
|
|
220
221
|
name: "warning-circle",
|
|
@@ -224,9 +225,10 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
224
225
|
_: 1
|
|
225
226
|
}, 8, ["text"])
|
|
226
227
|
])) : i("", !0),
|
|
227
|
-
t.$slots["option-end"] ? (
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
t.$slots["option-end"] ? r(t.$slots, "option-end", {
|
|
229
|
+
key: 6,
|
|
230
|
+
option: e.option
|
|
231
|
+
}, void 0, !0) : i("", !0),
|
|
230
232
|
e.treeMainOption ? (o(), l("div", {
|
|
231
233
|
key: 7,
|
|
232
234
|
class: "tree-main-arrow-wrapper",
|
|
@@ -237,12 +239,12 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
237
239
|
size: "16px",
|
|
238
240
|
class: v(`app-trigger--icon ${e.treeMainOptionExpanded && "expanded"}`)
|
|
239
241
|
}, null, 8, ["class"])
|
|
240
|
-
], 8,
|
|
242
|
+
], 8, le)) : i("", !0)
|
|
241
243
|
], 2),
|
|
242
|
-
n(
|
|
244
|
+
n(h).clearable && n(K) ? (o(), l("div", ae, [
|
|
243
245
|
c("button", {
|
|
244
246
|
class: "clear-button",
|
|
245
|
-
onClick: k[1] || (k[1] = C((y) => n(
|
|
247
|
+
onClick: k[1] || (k[1] = C((y) => n(h).clearSelection(), ["prevent", "stop"]))
|
|
246
248
|
}, [
|
|
247
249
|
a(n(m), {
|
|
248
250
|
name: "close",
|
|
@@ -255,16 +257,16 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
255
257
|
]),
|
|
256
258
|
_: 2
|
|
257
259
|
}, [
|
|
258
|
-
Array.isArray(n(
|
|
260
|
+
Array.isArray(n(x)) ? {
|
|
259
261
|
name: "tooltip",
|
|
260
|
-
fn:
|
|
262
|
+
fn: d(() => [
|
|
261
263
|
c("div", U, [
|
|
262
|
-
(o(!0), l(j, null, R(n(
|
|
264
|
+
(o(!0), l(j, null, R(n(x), (y) => (o(), f(n(T), {
|
|
263
265
|
key: y,
|
|
264
266
|
variant: "body2"
|
|
265
267
|
}, {
|
|
266
|
-
default:
|
|
267
|
-
g(
|
|
268
|
+
default: d(() => [
|
|
269
|
+
g(u(y), 1)
|
|
268
270
|
]),
|
|
269
271
|
_: 2
|
|
270
272
|
}, 1024))), 128))
|
|
@@ -276,5 +278,5 @@ const U = { class: "multiline-tooltip" }, W = {
|
|
|
276
278
|
}
|
|
277
279
|
});
|
|
278
280
|
export {
|
|
279
|
-
|
|
281
|
+
ve as default
|
|
280
282
|
};
|