@ironsource/shared-ui 1.4.2-rc.15 → 1.4.2-rc.17
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/AddFilterButton.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/AppTrigger.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/AutocompleteDropdown.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/AutocompleteInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Banner.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Button.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/CalendarMonth.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Checkbox.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Chip.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/DatePicker.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/DatePickerMonth.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/DateRange.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Dialog.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Dropdown.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/FilterDropdown.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/FiltersPanel.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Heading.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/IncludeExclude.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Input.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Menu.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/RadioButton.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/RadioGroup.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Search.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Switch.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Table.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Tabs.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Text.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/TextArea.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/TextWithTitleContent.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Toggle.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/components/appTrigger/AppTrigger.vue.d.ts +5 -0
- package/components/appTrigger/AppTrigger.vue.js +29 -16
- package/components/appTrigger/index.d.ts +11 -0
- package/components/autocompleteDropdown/AutocompleteDropdown.vue.d.ts +5 -0
- package/components/autocompleteDropdown/AutocompleteDropdown.vue.js +7 -4
- package/components/autocompleteDropdown/AutocompleteInput.vue.d.ts +5 -0
- package/components/autocompleteDropdown/AutocompleteInput.vue.js +12 -6
- package/components/autocompleteDropdown/index.d.ts +11 -0
- package/components/banner/Banner.vue.d.ts +9 -0
- package/components/banner/Banner.vue.js +20 -9
- package/components/banner/index.d.ts +9 -0
- package/components/button/Button.vue.d.ts +5 -0
- package/components/button/Button.vue.js +6 -4
- package/components/button/index.d.ts +11 -0
- package/components/checkbox/Checkbox.vue.d.ts +5 -0
- package/components/checkbox/Checkbox.vue.js +20 -14
- package/components/checkbox/index.d.ts +11 -0
- package/components/chip/Chip.vue.d.ts +5 -0
- package/components/chip/Chip.vue.js +11 -6
- package/components/chip/index.d.ts +11 -0
- package/components/datePicker/DatePicker.vue.d.ts +5 -0
- package/components/datePicker/DatePicker.vue.js +11 -6
- package/components/datePicker/DatePickerMonth.vue.d.ts +5 -0
- package/components/datePicker/DatePickerMonth.vue.js +5 -3
- package/components/datePicker/index.d.ts +11 -0
- package/components/dateRange/CalendarMonth.vue.d.ts +5 -0
- package/components/dateRange/CalendarMonth.vue.js +39 -21
- package/components/dateRange/DateRange.vue.d.ts +5 -0
- package/components/dateRange/DateRange.vue.js +49 -36
- package/components/dateRange/DateRangePicker.vue.d.ts +5 -0
- package/components/dateRange/index.d.ts +11 -0
- package/components/dialog/Dialog.vue.d.ts +5 -0
- package/components/dialog/Dialog.vue.js +38 -23
- package/components/dialog/index.d.ts +11 -0
- package/components/dropdown/Dropdown.vue.d.ts +5 -0
- package/components/dropdown/Dropdown.vue.js +46 -34
- package/components/dropdown/index.d.ts +11 -0
- package/components/filterDropdown/AddFilterButton.vue.d.ts +2 -0
- package/components/filterDropdown/AddFilterButton.vue.js +6 -4
- package/components/filterDropdown/FilterDropdown.vue.d.ts +5 -0
- package/components/filterDropdown/FilterDropdown.vue.js +8 -5
- package/components/filterDropdown/index.d.ts +17 -0
- package/components/filtersPanel/FiltersPanel.vue.d.ts +5 -0
- package/components/filtersPanel/FiltersPanel.vue.js +7 -4
- package/components/includeExclude/IncludeExclude.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExclude.vue.js +2 -2
- package/components/includeExclude/index.d.ts +11 -11
- package/components/input/Input.vue.d.ts +5 -0
- package/components/input/Input.vue.js +44 -31
- package/components/input/index.d.ts +17 -0
- package/components/menu/Menu.vue.d.ts +5 -0
- package/components/menu/Menu.vue.js +6 -4
- package/components/menu/index.d.ts +11 -0
- package/components/popover/Popover.vue.d.ts +5 -0
- package/components/popover/Popover.vue.js +5 -3
- package/components/popover/index.d.ts +11 -0
- package/components/radioButton/RadioButton.vue.d.ts +5 -0
- package/components/radioButton/RadioButton.vue.js +15 -8
- package/components/radioButton/RadioGroup.vue.d.ts +5 -0
- package/components/radioButton/RadioGroup.vue.js +9 -5
- package/components/radioButton/index.d.ts +22 -0
- package/components/search/Search.vue.d.ts +5 -0
- package/components/search/Search.vue.js +13 -7
- package/components/search/index.d.ts +11 -0
- package/components/switch/Switch.vue.d.ts +5 -0
- package/components/switch/Switch.vue.js +17 -9
- package/components/switch/index.d.ts +11 -0
- package/components/table/Table.vue.d.ts +5 -0
- package/components/table/Table.vue.js +58 -36
- package/components/table/index.d.ts +11 -0
- package/components/tabs/Tabs.vue.d.ts +5 -0
- package/components/tabs/Tabs.vue.js +20 -15
- package/components/tabs/index.d.ts +11 -0
- package/components/textArea/TextArea.vue.d.ts +5 -0
- package/components/textArea/TextArea.vue.js +23 -16
- package/components/textArea/index.d.ts +11 -0
- package/components/toggle/Toggle.vue.d.ts +5 -0
- package/components/toggle/Toggle.vue.js +29 -18
- package/components/toggle/index.d.ts +11 -0
- package/components/tooltip/TextWithTitleContent.vue.d.ts +16 -3
- package/components/tooltip/TextWithTitleContent.vue.js +11 -6
- package/components/tooltip/Tooltip.vue.d.ts +5 -0
- package/components/tooltip/Tooltip.vue.js +8 -4
- package/components/tooltip/index.d.ts +11 -0
- package/components/typography/Heading.vue.d.ts +5 -0
- package/components/typography/Heading.vue.js +7 -4
- package/components/typography/Text.vue.d.ts +5 -0
- package/components/typography/Text.vue.js +8 -4
- package/components/typography/index.d.ts +22 -0
- package/index.vue.js +1 -1
- package/package.json +1 -1
- package/testids/index.d.ts +146 -0
- package/testids/index.vue.js +170 -0
- package/consts/test-ids.d.ts +0 -11
- package/consts/test-ids.vue.js +0 -14
|
@@ -14,6 +14,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
14
14
|
title?: string;
|
|
15
15
|
showCloseButton?: boolean;
|
|
16
16
|
themeClass?: string;
|
|
17
|
+
testId?: string;
|
|
17
18
|
}>, {
|
|
18
19
|
content: any;
|
|
19
20
|
width: string;
|
|
@@ -28,6 +29,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
28
29
|
escapeToClose: boolean;
|
|
29
30
|
beforeClose: any;
|
|
30
31
|
themeClass: string;
|
|
32
|
+
testId: string;
|
|
31
33
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
34
|
"update:modelValue": (value: boolean) => void;
|
|
33
35
|
} & {
|
|
@@ -49,6 +51,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
49
51
|
title?: string;
|
|
50
52
|
showCloseButton?: boolean;
|
|
51
53
|
themeClass?: string;
|
|
54
|
+
testId?: string;
|
|
52
55
|
}>, {
|
|
53
56
|
content: any;
|
|
54
57
|
width: string;
|
|
@@ -63,12 +66,14 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
63
66
|
escapeToClose: boolean;
|
|
64
67
|
beforeClose: any;
|
|
65
68
|
themeClass: string;
|
|
69
|
+
testId: string;
|
|
66
70
|
}>>> & {
|
|
67
71
|
"onUpdate:modelValue"?: (value: boolean) => any;
|
|
68
72
|
onClose?: (reason: Reason) => any;
|
|
69
73
|
onOpen?: () => any;
|
|
70
74
|
}, {
|
|
71
75
|
title: string;
|
|
76
|
+
testId: string;
|
|
72
77
|
content: string;
|
|
73
78
|
width: string | number;
|
|
74
79
|
appendToBody: boolean;
|
|
@@ -6,19 +6,21 @@ import { NOOP } from '@vue/shared';
|
|
|
6
6
|
import { Reason } from './Reason.vue.js';
|
|
7
7
|
import IconButton from '../button/IconButton.vue.js';
|
|
8
8
|
import Icon from '../icon/Icon.vue.js';
|
|
9
|
+
import { DialogTestIdModifiers } from '../../testids/index.vue.js';
|
|
9
10
|
/* empty css */import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
|
|
10
11
|
|
|
11
12
|
import "../../Dialog.vue_vue_type_style_index_0_scoped_true_lang.css";
|
|
12
|
-
const _hoisted_1 =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const
|
|
13
|
+
const _hoisted_1 = ["data-testid"];
|
|
14
|
+
const _hoisted_2 = ["data-testid"];
|
|
15
|
+
const _hoisted_3 = ["data-testid"];
|
|
16
|
+
const _hoisted_4 = ["data-testid"];
|
|
17
|
+
const _hoisted_5 = { class: "placeholder" };
|
|
18
|
+
const _hoisted_6 = {
|
|
18
19
|
key: 1,
|
|
19
20
|
class: "footer"
|
|
20
21
|
};
|
|
21
|
-
const
|
|
22
|
+
const _hoisted_7 = ["data-testid"];
|
|
23
|
+
const _hoisted_8 = ["data-testid"];
|
|
22
24
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
23
25
|
__name: "Dialog",
|
|
24
26
|
props: {
|
|
@@ -35,13 +37,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
37
|
beforeClose: { type: Function, default: null },
|
|
36
38
|
title: { default: "" },
|
|
37
39
|
showCloseButton: { type: Boolean, default: true },
|
|
38
|
-
themeClass: { default: "" }
|
|
40
|
+
themeClass: { default: "" },
|
|
41
|
+
testId: { default: "" }
|
|
39
42
|
},
|
|
40
43
|
emits: ["update:modelValue", "open", "close"],
|
|
41
44
|
setup(__props, { emit }) {
|
|
42
45
|
const props = __props;
|
|
43
46
|
useCssVars((_ctx) => ({
|
|
44
|
-
"
|
|
47
|
+
"7d57480a": __props.width
|
|
45
48
|
}));
|
|
46
49
|
const visible = ref(false);
|
|
47
50
|
let openTimer = void 0;
|
|
@@ -118,10 +121,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
118
121
|
createElementVNode("div", {
|
|
119
122
|
class: "modal",
|
|
120
123
|
style: normalizeStyle(unref(inlineStyle)),
|
|
124
|
+
"data-testid": `${__props.testId}-${unref(DialogTestIdModifiers).WRAPPER}`,
|
|
121
125
|
onKeydown: _cache[1] || (_cache[1] = withKeys(($event) => __props.escapeToClose ? handleClose(unref(Reason).Escape) : unref(NOOP)(), ["esc"]))
|
|
122
126
|
}, [
|
|
123
127
|
createElementVNode("header", {
|
|
124
|
-
class: normalizeClass(["header", { "header--bordered": __props.headerBorder }])
|
|
128
|
+
class: normalizeClass(["header", { "header--bordered": __props.headerBorder }]),
|
|
129
|
+
"data-testid": `${__props.testId}-${unref(DialogTestIdModifiers).HEADER}`
|
|
125
130
|
}, [
|
|
126
131
|
__props.headerBorder ? renderSlot(_ctx.$slots, "header", { key: 0 }, () => [
|
|
127
132
|
createVNode(Text, { strong: "" }, {
|
|
@@ -138,6 +143,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
138
143
|
theme: "secondary",
|
|
139
144
|
variant: "colorized",
|
|
140
145
|
"icon-name": "close",
|
|
146
|
+
"data-testid": `${__props.testId}-${unref(DialogTestIdModifiers).ACTION_CLOSE}`,
|
|
141
147
|
onClick: _cache[0] || (_cache[0] = ($event) => handleClose(unref(Reason).CloseButton))
|
|
142
148
|
}, {
|
|
143
149
|
default: withCtx(() => [
|
|
@@ -147,9 +153,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
147
153
|
})
|
|
148
154
|
]),
|
|
149
155
|
_: 1
|
|
150
|
-
})) : createCommentVNode("", true)
|
|
151
|
-
],
|
|
152
|
-
!__props.headerBorder ? (openBlock(), createElementBlock("div",
|
|
156
|
+
}, 8, ["data-testid"])) : createCommentVNode("", true)
|
|
157
|
+
], 10, _hoisted_2),
|
|
158
|
+
!__props.headerBorder ? (openBlock(), createElementBlock("div", {
|
|
159
|
+
key: 0,
|
|
160
|
+
class: "header--secondary",
|
|
161
|
+
"data-testid": `${__props.testId}-${unref(DialogTestIdModifiers).HEADER_SECONDARY}`
|
|
162
|
+
}, [
|
|
153
163
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
154
164
|
createVNode(Text, { strong: "" }, {
|
|
155
165
|
default: withCtx(() => [
|
|
@@ -158,25 +168,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
158
168
|
_: 1
|
|
159
169
|
})
|
|
160
170
|
], true)
|
|
161
|
-
])) : createCommentVNode("", true),
|
|
171
|
+
], 8, _hoisted_3)) : createCommentVNode("", true),
|
|
162
172
|
createElementVNode("div", {
|
|
163
|
-
class: normalizeClass(["content", { "content--bordered": __props.headerBorder }])
|
|
173
|
+
class: normalizeClass(["content", { "content--bordered": __props.headerBorder }]),
|
|
174
|
+
"data-testid": `${__props.testId}-${unref(DialogTestIdModifiers).CONTENT}`
|
|
164
175
|
}, [
|
|
165
176
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
166
|
-
createElementVNode("div",
|
|
177
|
+
createElementVNode("div", _hoisted_5, toDisplayString(__props.content), 1)
|
|
167
178
|
], true)
|
|
168
|
-
],
|
|
169
|
-
_ctx.$slots["footer"] ? (openBlock(), createElementBlock("footer",
|
|
170
|
-
createElementVNode("div",
|
|
179
|
+
], 10, _hoisted_4),
|
|
180
|
+
_ctx.$slots["footer"] ? (openBlock(), createElementBlock("footer", _hoisted_6, [
|
|
181
|
+
createElementVNode("div", {
|
|
182
|
+
class: "action-buttons",
|
|
183
|
+
"data-testid": `${__props.testId}-${unref(DialogTestIdModifiers).ACTION_BUTTONS_WRAPPER}`
|
|
184
|
+
}, [
|
|
171
185
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
172
|
-
])
|
|
186
|
+
], 8, _hoisted_7)
|
|
173
187
|
])) : createCommentVNode("", true)
|
|
174
|
-
],
|
|
188
|
+
], 44, _hoisted_1),
|
|
175
189
|
__props.showBackdrop ? (openBlock(), createElementBlock("div", {
|
|
176
190
|
key: 0,
|
|
177
191
|
class: "backdrop",
|
|
192
|
+
"data-testid": `${__props.testId}-${unref(DialogTestIdModifiers).BACKDROP}`,
|
|
178
193
|
onClick: _cache[2] || (_cache[2] = ($event) => __props.closeOnClickOutside ? handleClose(unref(Reason).Backdrop) : unref(NOOP)())
|
|
179
|
-
})) : createCommentVNode("", true)
|
|
194
|
+
}, null, 8, _hoisted_8)) : createCommentVNode("", true)
|
|
180
195
|
]),
|
|
181
196
|
_: 3
|
|
182
197
|
}, 8, ["class"])) : createCommentVNode("", true)
|
|
@@ -187,6 +202,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
187
202
|
};
|
|
188
203
|
}
|
|
189
204
|
});
|
|
190
|
-
var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
205
|
+
var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-55aea585"]]);
|
|
191
206
|
|
|
192
207
|
export { Dialog as default };
|
|
@@ -4,6 +4,11 @@ declare const DialogTypes: () => import("vue").DefineComponent<{
|
|
|
4
4
|
} & {
|
|
5
5
|
default: string;
|
|
6
6
|
};
|
|
7
|
+
testId: {
|
|
8
|
+
type: import("vue").PropType<string>;
|
|
9
|
+
} & {
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
7
12
|
modelValue: {
|
|
8
13
|
type: import("vue").PropType<boolean>;
|
|
9
14
|
required: true;
|
|
@@ -80,6 +85,11 @@ declare const DialogTypes: () => import("vue").DefineComponent<{
|
|
|
80
85
|
} & {
|
|
81
86
|
default: string;
|
|
82
87
|
};
|
|
88
|
+
testId: {
|
|
89
|
+
type: import("vue").PropType<string>;
|
|
90
|
+
} & {
|
|
91
|
+
default: string;
|
|
92
|
+
};
|
|
83
93
|
modelValue: {
|
|
84
94
|
type: import("vue").PropType<boolean>;
|
|
85
95
|
required: true;
|
|
@@ -150,6 +160,7 @@ declare const DialogTypes: () => import("vue").DefineComponent<{
|
|
|
150
160
|
onOpen?: () => any;
|
|
151
161
|
}, {
|
|
152
162
|
title: string;
|
|
163
|
+
testId: string;
|
|
153
164
|
content: string;
|
|
154
165
|
width: string | number;
|
|
155
166
|
appendToBody: boolean;
|
|
@@ -36,6 +36,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
36
36
|
disableKeyboardEvents?: boolean;
|
|
37
37
|
multiOptionsPlaceholderPrefix?: string;
|
|
38
38
|
multiOptionsPlaceholderSuffix?: string;
|
|
39
|
+
testId?: string;
|
|
39
40
|
}>, {
|
|
40
41
|
multi: boolean;
|
|
41
42
|
searchPlaceholder: string;
|
|
@@ -69,6 +70,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
69
70
|
disableKeyboardEvents: boolean;
|
|
70
71
|
multiOptionsPlaceholderPrefix: string;
|
|
71
72
|
multiOptionsPlaceholderSuffix: string;
|
|
73
|
+
testId: string;
|
|
72
74
|
}>, {
|
|
73
75
|
selectItem: (option: any, index?: number) => void;
|
|
74
76
|
scrollTo: (index: number) => void;
|
|
@@ -119,6 +121,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
119
121
|
disableKeyboardEvents?: boolean;
|
|
120
122
|
multiOptionsPlaceholderPrefix?: string;
|
|
121
123
|
multiOptionsPlaceholderSuffix?: string;
|
|
124
|
+
testId?: string;
|
|
122
125
|
}>, {
|
|
123
126
|
multi: boolean;
|
|
124
127
|
searchPlaceholder: string;
|
|
@@ -152,6 +155,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
152
155
|
disableKeyboardEvents: boolean;
|
|
153
156
|
multiOptionsPlaceholderPrefix: string;
|
|
154
157
|
multiOptionsPlaceholderSuffix: string;
|
|
158
|
+
testId: string;
|
|
155
159
|
}>>> & {
|
|
156
160
|
"onUpdate:selected"?: (value: unknown) => any;
|
|
157
161
|
"onUpdate:isOpen"?: (value: unknown) => any;
|
|
@@ -162,6 +166,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
162
166
|
size: 'sm' | 'lg';
|
|
163
167
|
title: string;
|
|
164
168
|
error: string;
|
|
169
|
+
testId: string;
|
|
165
170
|
theme: string;
|
|
166
171
|
placement: Placement;
|
|
167
172
|
disabled: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch, useSlots, nextTick, toRaw, provide, onMounted, openBlock, createElementBlock, normalizeClass, renderSlot, createVNode,
|
|
1
|
+
import { defineComponent, ref, computed, watch, useSlots, nextTick, toRaw, provide, onMounted, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createVNode, withCtx, Transition, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, createBlock, mergeProps, withModifiers, Fragment, renderList, pushScopeId, popScopeId } from 'vue';
|
|
2
2
|
import Button from '../button/Button.vue.js';
|
|
3
3
|
import Icon from '../icon/Icon.vue.js';
|
|
4
|
+
import { DropdownTestIdModifiers } from '../../testids/index.vue.js';
|
|
4
5
|
/* empty css */import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
|
|
5
6
|
import Text from '../typography/Text.vue.js';
|
|
6
7
|
/* empty css *//* empty css *//* empty css */import { Dropdown as Dropdown$1 } from 'floating-vue';
|
|
@@ -14,8 +15,8 @@ import { Mode, Type, DropdownContext } from './DropdownContext.vue.js';
|
|
|
14
15
|
import { pxToRem } from '../../utils/style.vue.js';
|
|
15
16
|
/* empty css *//* empty css */
|
|
16
17
|
import "../../Dropdown.vue_vue_type_style_index_0_scoped_true_lang.css";import "../../Dropdown.vue_vue_type_style_index_1_lang.css";
|
|
17
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
18
|
-
const _hoisted_1 = ["tabindex"];
|
|
18
|
+
const _withScopeId = (n) => (pushScopeId("data-v-6b0dd6db"), n = n(), popScopeId(), n);
|
|
19
|
+
const _hoisted_1 = ["tabindex", "data-testid"];
|
|
19
20
|
const _hoisted_2 = ["disabled", "aria-expanded", "aria-labelledby", "aria-disabled"];
|
|
20
21
|
const _hoisted_3 = {
|
|
21
22
|
key: 0,
|
|
@@ -26,19 +27,17 @@ const _hoisted_5 = {
|
|
|
26
27
|
key: 0,
|
|
27
28
|
class: "dropdown-title"
|
|
28
29
|
};
|
|
29
|
-
const _hoisted_6 =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
const _hoisted_7 = {
|
|
30
|
+
const _hoisted_6 = ["data-testid"];
|
|
31
|
+
const _hoisted_7 = ["data-testid"];
|
|
32
|
+
const _hoisted_8 = {
|
|
34
33
|
key: 0,
|
|
35
34
|
class: "no-result-container"
|
|
36
35
|
};
|
|
37
|
-
const
|
|
36
|
+
const _hoisted_9 = {
|
|
38
37
|
key: 1,
|
|
39
38
|
class: "loader"
|
|
40
39
|
};
|
|
41
|
-
const
|
|
40
|
+
const _hoisted_10 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
|
|
42
41
|
width: "100",
|
|
43
42
|
height: "100",
|
|
44
43
|
viewBox: "0 0 100 100"
|
|
@@ -62,9 +61,9 @@ const _hoisted_9 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElem
|
|
|
62
61
|
})
|
|
63
62
|
])
|
|
64
63
|
], -1));
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
const
|
|
64
|
+
const _hoisted_11 = { key: 2 };
|
|
65
|
+
const _hoisted_12 = ["aria-selected", "aria-disabled", "onClick"];
|
|
66
|
+
const _hoisted_13 = {
|
|
68
67
|
key: 0,
|
|
69
68
|
class: "actions"
|
|
70
69
|
};
|
|
@@ -106,7 +105,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
106
105
|
autoSize: { type: Boolean, default: false },
|
|
107
106
|
disableKeyboardEvents: { type: Boolean, default: false },
|
|
108
107
|
multiOptionsPlaceholderPrefix: { default: "" },
|
|
109
|
-
multiOptionsPlaceholderSuffix: { default: "" }
|
|
108
|
+
multiOptionsPlaceholderSuffix: { default: "" },
|
|
109
|
+
testId: { default: "" }
|
|
110
110
|
},
|
|
111
111
|
emits: ["update:selected", "update:isOpen", "closed", "opened", "apply"],
|
|
112
112
|
setup(__props, { expose, emit }) {
|
|
@@ -530,6 +530,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
530
530
|
ref: el,
|
|
531
531
|
class: normalizeClass(["dropdown", { "dropdown--disabled": __props.disabled }]),
|
|
532
532
|
tabindex: __props.disabled ? -1 : 0,
|
|
533
|
+
"data-testid": `${__props.testId}-${unref(DropdownTestIdModifiers).WRAPPER}`,
|
|
533
534
|
onKeydown
|
|
534
535
|
}, [
|
|
535
536
|
renderSlot(_ctx.$slots, "label", {}, void 0, true),
|
|
@@ -547,7 +548,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
547
548
|
shown: !!unref(open),
|
|
548
549
|
"auto-hide": false,
|
|
549
550
|
container: __props.container,
|
|
550
|
-
"auto-size": __props.autoSize
|
|
551
|
+
"auto-size": __props.autoSize,
|
|
552
|
+
"data-testid": `${__props.testId}-${unref(DropdownTestIdModifiers).TRIGGER}`
|
|
551
553
|
}, {
|
|
552
554
|
popper: withCtx(() => [
|
|
553
555
|
createVNode(Transition, null, {
|
|
@@ -557,14 +559,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
557
559
|
ref: listRef
|
|
558
560
|
}, [
|
|
559
561
|
__props.inlineSearch || __props.title ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
560
|
-
__props.title ? (openBlock(), createElementBlock("div",
|
|
562
|
+
__props.title ? (openBlock(), createElementBlock("div", {
|
|
563
|
+
key: 0,
|
|
564
|
+
class: "dropdown-title__text",
|
|
565
|
+
"data-testid": `${__props.testId}-${unref(DropdownTestIdModifiers).TITLE}`
|
|
566
|
+
}, [
|
|
561
567
|
createVNode(unref(Text), { strong: "" }, {
|
|
562
568
|
default: withCtx(() => [
|
|
563
569
|
createTextVNode(toDisplayString(__props.title), 1)
|
|
564
570
|
]),
|
|
565
571
|
_: 1
|
|
566
572
|
})
|
|
567
|
-
])) : createCommentVNode("", true),
|
|
573
|
+
], 8, _hoisted_6)) : createCommentVNode("", true),
|
|
568
574
|
__props.inlineSearch ? (openBlock(), createBlock(unref(Search), {
|
|
569
575
|
key: 1,
|
|
570
576
|
modelValue: query.value,
|
|
@@ -573,8 +579,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
573
579
|
class: "dropdown-title__search",
|
|
574
580
|
variant: "transparent",
|
|
575
581
|
size: "md",
|
|
582
|
+
"test-id": `${__props.testId}-${unref(DropdownTestIdModifiers).SEARCH}`,
|
|
576
583
|
onKeydown
|
|
577
|
-
}, null, 8, ["modelValue", "placeholder"])) : createCommentVNode("", true)
|
|
584
|
+
}, null, 8, ["modelValue", "placeholder", "test-id"])) : createCommentVNode("", true)
|
|
578
585
|
])) : createCommentVNode("", true),
|
|
579
586
|
unref(open) ? (openBlock(), createElementBlock("div", {
|
|
580
587
|
key: 1,
|
|
@@ -584,13 +591,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
584
591
|
renderSlot(_ctx.$slots, "input-list", { open: unref(open) }, void 0, true),
|
|
585
592
|
createElementVNode("div", mergeProps(unref(containerProps), {
|
|
586
593
|
class: ["list-container", { "list-container--multi": __props.multi }],
|
|
587
|
-
style: { height: `${unref(calculateTableHeight)}rem` }
|
|
594
|
+
style: { height: `${unref(calculateTableHeight)}rem` },
|
|
595
|
+
"data-testid": `${__props.testId}-${unref(DropdownTestIdModifiers).LIST_CONTAINER}`
|
|
588
596
|
}), [
|
|
589
597
|
createElementVNode("ul", mergeProps(unref(wrapperProps), {
|
|
590
598
|
role: "listbox",
|
|
591
599
|
class: ["list", { "list--multi": __props.multi }]
|
|
592
600
|
}), [
|
|
593
|
-
!unref(filteredOptions).length && !__props.loading ? (openBlock(), createElementBlock("li",
|
|
601
|
+
!unref(filteredOptions).length && !__props.loading ? (openBlock(), createElementBlock("li", _hoisted_8, [
|
|
594
602
|
createVNode(unref(Text), {
|
|
595
603
|
size: "sm",
|
|
596
604
|
class: "no-result"
|
|
@@ -601,13 +609,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
601
609
|
_: 1
|
|
602
610
|
})
|
|
603
611
|
])) : createCommentVNode("", true),
|
|
604
|
-
__props.loading ? (openBlock(), createElementBlock("li",
|
|
612
|
+
__props.loading ? (openBlock(), createElementBlock("li", _hoisted_9, [
|
|
605
613
|
createVNode(unref(Icon), {
|
|
606
614
|
"font-size": "md",
|
|
607
615
|
class: "loader-icon"
|
|
608
616
|
}, {
|
|
609
617
|
default: withCtx(() => [
|
|
610
|
-
|
|
618
|
+
_hoisted_10
|
|
611
619
|
]),
|
|
612
620
|
_: 1
|
|
613
621
|
}),
|
|
@@ -618,7 +626,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
618
626
|
_: 1
|
|
619
627
|
})
|
|
620
628
|
])) : createCommentVNode("", true),
|
|
621
|
-
__props.showSelectAll ? (openBlock(), createElementBlock("li",
|
|
629
|
+
__props.showSelectAll ? (openBlock(), createElementBlock("li", _hoisted_11, [
|
|
622
630
|
createVNode(Option, {
|
|
623
631
|
"aria-selected": unref(allSelected),
|
|
624
632
|
"aria-disabled": !!__props.disabled,
|
|
@@ -645,37 +653,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
645
653
|
selected: isSelected(toRaw(unref(selectedOption)), data),
|
|
646
654
|
active: toRaw(unref(activeIndex)) === index
|
|
647
655
|
}, void 0, true)
|
|
648
|
-
], 8,
|
|
656
|
+
], 8, _hoisted_12);
|
|
649
657
|
}), 128)) : createCommentVNode("", true)
|
|
650
658
|
], 16)
|
|
651
|
-
], 16),
|
|
652
|
-
__props.multi ? (openBlock(), createElementBlock("div",
|
|
659
|
+
], 16, _hoisted_7),
|
|
660
|
+
__props.multi ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
|
653
661
|
createVNode(unref(Button), {
|
|
654
662
|
ref_key: "cancel",
|
|
655
663
|
ref: cancel,
|
|
656
664
|
size: "sm",
|
|
657
665
|
variant: "border",
|
|
658
666
|
theme: "third",
|
|
667
|
+
"test-id": `${__props.testId}-${unref(DropdownTestIdModifiers).ACTION_CANCEL}`,
|
|
659
668
|
onClick: onCancel
|
|
660
669
|
}, {
|
|
661
670
|
default: withCtx(() => [
|
|
662
671
|
createTextVNode(" Cancel ")
|
|
663
672
|
]),
|
|
664
673
|
_: 1
|
|
665
|
-
},
|
|
674
|
+
}, 8, ["test-id"]),
|
|
666
675
|
createVNode(unref(Button), {
|
|
667
676
|
ref_key: "apply",
|
|
668
677
|
ref: apply,
|
|
669
678
|
"data-testid": "mutli-apply",
|
|
670
679
|
size: "sm",
|
|
671
680
|
class: "apply-button",
|
|
681
|
+
"test-id": `${__props.testId}-${unref(DropdownTestIdModifiers).ACTION_APPLY}`,
|
|
672
682
|
onClick: onApply
|
|
673
683
|
}, {
|
|
674
684
|
default: withCtx(() => [
|
|
675
685
|
createTextVNode("Apply ")
|
|
676
686
|
]),
|
|
677
687
|
_: 1
|
|
678
|
-
},
|
|
688
|
+
}, 8, ["test-id"])
|
|
679
689
|
])) : createCommentVNode("", true)
|
|
680
690
|
], 32)) : createCommentVNode("", true)
|
|
681
691
|
], 512)
|
|
@@ -743,31 +753,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
743
753
|
], 2)
|
|
744
754
|
]),
|
|
745
755
|
_: 3
|
|
746
|
-
}, 8, ["theme", "popper-class", "placement", "skidding", "distance", "flip", "shown", "container", "auto-size"]),
|
|
756
|
+
}, 8, ["theme", "popper-class", "placement", "skidding", "distance", "flip", "shown", "container", "auto-size", "data-testid"]),
|
|
747
757
|
!__props.error && __props.helperText ? (openBlock(), createBlock(unref(Text), {
|
|
748
758
|
key: 0,
|
|
749
759
|
size: "caption",
|
|
750
|
-
class: "helper-text"
|
|
760
|
+
class: "helper-text",
|
|
761
|
+
"test-id": `${__props.testId}-${unref(DropdownTestIdModifiers).HELPER_TEXT}`
|
|
751
762
|
}, {
|
|
752
763
|
default: withCtx(() => [
|
|
753
764
|
createTextVNode(toDisplayString(__props.helperText), 1)
|
|
754
765
|
]),
|
|
755
766
|
_: 1
|
|
756
|
-
})) : createCommentVNode("", true),
|
|
767
|
+
}, 8, ["test-id"])) : createCommentVNode("", true),
|
|
757
768
|
__props.error ? (openBlock(), createBlock(unref(Text), {
|
|
758
769
|
key: 1,
|
|
759
770
|
size: "caption",
|
|
760
|
-
class: "helper-text helper-text--error"
|
|
771
|
+
class: "helper-text helper-text--error",
|
|
772
|
+
"test-id": `${__props.testId}-${unref(DropdownTestIdModifiers).HELPER_TEXT_ERROR}`
|
|
761
773
|
}, {
|
|
762
774
|
default: withCtx(() => [
|
|
763
775
|
createTextVNode(toDisplayString(__props.error), 1)
|
|
764
776
|
]),
|
|
765
777
|
_: 1
|
|
766
|
-
})) : createCommentVNode("", true)
|
|
778
|
+
}, 8, ["test-id"])) : createCommentVNode("", true)
|
|
767
779
|
], 42, _hoisted_1);
|
|
768
780
|
};
|
|
769
781
|
}
|
|
770
782
|
});
|
|
771
|
-
var Dropdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
783
|
+
var Dropdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6b0dd6db"]]);
|
|
772
784
|
|
|
773
785
|
export { Dropdown as default };
|
|
@@ -18,6 +18,11 @@ declare const DropdownTypes: () => (import("vue").DefineComponent<{
|
|
|
18
18
|
} & {
|
|
19
19
|
default: string;
|
|
20
20
|
};
|
|
21
|
+
testId: {
|
|
22
|
+
type: import("vue").PropType<string>;
|
|
23
|
+
} & {
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
21
26
|
theme: {
|
|
22
27
|
type: import("vue").PropType<string>;
|
|
23
28
|
} & {
|
|
@@ -204,6 +209,11 @@ declare const DropdownTypes: () => (import("vue").DefineComponent<{
|
|
|
204
209
|
} & {
|
|
205
210
|
default: string;
|
|
206
211
|
};
|
|
212
|
+
testId: {
|
|
213
|
+
type: import("vue").PropType<string>;
|
|
214
|
+
} & {
|
|
215
|
+
default: string;
|
|
216
|
+
};
|
|
207
217
|
theme: {
|
|
208
218
|
type: import("vue").PropType<string>;
|
|
209
219
|
} & {
|
|
@@ -371,6 +381,7 @@ declare const DropdownTypes: () => (import("vue").DefineComponent<{
|
|
|
371
381
|
size: "sm" | "lg";
|
|
372
382
|
title: string;
|
|
373
383
|
error: string;
|
|
384
|
+
testId: string;
|
|
374
385
|
theme: string;
|
|
375
386
|
placement: import("floating-vue").Placement;
|
|
376
387
|
disabled: boolean;
|
|
@@ -2,10 +2,12 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
2
2
|
selected?: boolean;
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
prefix?: string;
|
|
5
|
+
testId?: string;
|
|
5
6
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
7
|
selected?: boolean;
|
|
7
8
|
disabled?: boolean;
|
|
8
9
|
prefix?: string;
|
|
10
|
+
testId?: string;
|
|
9
11
|
}>>>, {}>;
|
|
10
12
|
export default _default;
|
|
11
13
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -10,7 +10,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10
10
|
props: {
|
|
11
11
|
selected: { type: Boolean },
|
|
12
12
|
disabled: { type: Boolean },
|
|
13
|
-
prefix: null
|
|
13
|
+
prefix: null,
|
|
14
|
+
testId: null
|
|
14
15
|
},
|
|
15
16
|
setup(__props) {
|
|
16
17
|
return (_ctx, _cache) => {
|
|
@@ -19,7 +20,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
20
|
class: normalizeClass(["add-filter", { disabled: __props.disabled }]),
|
|
20
21
|
selected: __props.selected,
|
|
21
22
|
disabled: __props.disabled,
|
|
22
|
-
prefix: __props.prefix
|
|
23
|
+
prefix: __props.prefix,
|
|
24
|
+
"test-id": __props.testId
|
|
23
25
|
}, createSlots({
|
|
24
26
|
default: withCtx(() => [
|
|
25
27
|
createVNode(Text, {
|
|
@@ -44,10 +46,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
46
|
]),
|
|
45
47
|
key: "0"
|
|
46
48
|
} : void 0
|
|
47
|
-
]), 1032, ["class", "selected", "disabled", "prefix"]);
|
|
49
|
+
]), 1032, ["class", "selected", "disabled", "prefix", "test-id"]);
|
|
48
50
|
};
|
|
49
51
|
}
|
|
50
52
|
});
|
|
51
|
-
var AddFilterButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
53
|
+
var AddFilterButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-44051188"]]);
|
|
52
54
|
|
|
53
55
|
export { AddFilterButton as default };
|
|
@@ -6,9 +6,11 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
6
6
|
onSearch: (item: unknown) => boolean;
|
|
7
7
|
options: unknown[];
|
|
8
8
|
addNewFilter: (filter: Filter) => void;
|
|
9
|
+
testId?: string;
|
|
9
10
|
}>, {
|
|
10
11
|
text: string;
|
|
11
12
|
disabled: boolean;
|
|
13
|
+
testId: string;
|
|
12
14
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
13
15
|
displayValue: (item: unknown) => string;
|
|
14
16
|
text?: string;
|
|
@@ -16,11 +18,14 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
16
18
|
onSearch: (item: unknown) => boolean;
|
|
17
19
|
options: unknown[];
|
|
18
20
|
addNewFilter: (filter: Filter) => void;
|
|
21
|
+
testId?: string;
|
|
19
22
|
}>, {
|
|
20
23
|
text: string;
|
|
21
24
|
disabled: boolean;
|
|
25
|
+
testId: string;
|
|
22
26
|
}>>>, {
|
|
23
27
|
text: string;
|
|
28
|
+
testId: string;
|
|
24
29
|
disabled: boolean;
|
|
25
30
|
}>;
|
|
26
31
|
export default _default;
|
|
@@ -13,7 +13,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
disabled: { type: Boolean, default: false },
|
|
14
14
|
onSearch: null,
|
|
15
15
|
options: null,
|
|
16
|
-
addNewFilter: null
|
|
16
|
+
addNewFilter: null,
|
|
17
|
+
testId: { default: "" }
|
|
17
18
|
},
|
|
18
19
|
setup(__props) {
|
|
19
20
|
return (_ctx, _cache) => {
|
|
@@ -25,18 +26,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
26
|
skidding: 0,
|
|
26
27
|
"is-on-top": "",
|
|
27
28
|
options: __props.options,
|
|
29
|
+
"test-id": __props.testId,
|
|
28
30
|
"onUpdate:selected": __props.addNewFilter
|
|
29
31
|
}, {
|
|
30
32
|
input: withCtx(() => [
|
|
31
33
|
createVNode(AddFilterButton, {
|
|
32
34
|
class: "add-filter-button",
|
|
33
|
-
disabled: __props.disabled
|
|
35
|
+
disabled: __props.disabled,
|
|
36
|
+
"test-id": __props.testId
|
|
34
37
|
}, {
|
|
35
38
|
default: withCtx(() => [
|
|
36
39
|
createTextVNode(toDisplayString(__props.text), 1)
|
|
37
40
|
]),
|
|
38
41
|
_: 1
|
|
39
|
-
}, 8, ["disabled"])
|
|
42
|
+
}, 8, ["disabled", "test-id"])
|
|
40
43
|
]),
|
|
41
44
|
default: withCtx(({ option }) => [
|
|
42
45
|
createVNode(unref(Option), { option }, {
|
|
@@ -47,10 +50,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
50
|
}, 1032, ["option"])
|
|
48
51
|
]),
|
|
49
52
|
_: 1
|
|
50
|
-
}, 8, ["display-value", "disabled", "on-search", "options", "onUpdate:selected"]);
|
|
53
|
+
}, 8, ["display-value", "disabled", "on-search", "options", "test-id", "onUpdate:selected"]);
|
|
51
54
|
};
|
|
52
55
|
}
|
|
53
56
|
});
|
|
54
|
-
var FilterDropdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
57
|
+
var FilterDropdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-59e42a26"]]);
|
|
55
58
|
|
|
56
59
|
export { FilterDropdown as default };
|