@ironsource/shared-ui 2.1.6-rc.2 → 2.1.6-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_39c47ad1_lang.css +1 -0
- package/AppHeader.vue_vue_type_style_index_0_scoped_538ccdc6_lang.css +1 -0
- package/Autocomplete.vue_vue_type_style_index_0_scoped_a7bfd237_lang.css +1 -0
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_a8fdae89_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_6df3b70f_lang.css +1 -0
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_ad524750_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_09c488cf_lang.css +1 -0
- package/Dropdown.vue_vue_type_style_index_0_scoped_aaa8c4bb_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_0363db63_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_1_lang.css +1 -1
- package/FieldLabel.vue_vue_type_style_index_0_scoped_96ee1c98_lang.css +1 -0
- package/{FormCard.vue_vue_type_style_index_0_scoped_ef8b4e81_lang.css → FormCard.vue_vue_type_style_index_0_scoped_52ade67c_lang.css} +1 -1
- package/InlineCopy.vue_vue_type_style_index_0_scoped_6a7b3795_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_e0c24b6a_lang.css +1 -0
- package/TextAreaV4.vue_vue_type_style_index_0_scoped_f3b2c01d_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_a6457440_lang.css +1 -0
- package/ToggleV4.vue_vue_type_style_index_0_scoped_a4aa32fb_lang.css +1 -0
- package/TooltipV4.vue_vue_type_style_index_0_scoped_fcdb9d02_lang.css +1 -0
- package/components/appHeader/AppHeader.vue.d.ts +6 -2
- package/components/appHeader/AppHeader.vue.js +2 -2
- package/components/appHeader/AppHeader.vue2.js +30 -28
- package/components/appHeader/index.d.ts +6 -2
- package/components/autocomplete/Autocomplete.vue.d.ts +5 -0
- package/components/autocomplete/Autocomplete.vue.js +3 -3
- package/components/autocomplete/Autocomplete.vue2.js +82 -61
- package/components/autocomplete/index.d.ts +20 -1
- package/components/dialog/v4/DialogV4.vue.js +3 -3
- package/components/dialog/v4/DialogV4.vue2.js +67 -62
- package/components/dropdown/common/Dropdown.common.js +21 -21
- package/components/dropdown/v3/Dropdown.vue.d.ts +4 -0
- package/components/dropdown/v3/Dropdown.vue.js +4 -4
- package/components/dropdown/v3/Dropdown.vue2.js +32 -32
- package/components/dropdown/v3/index.d.ts +13 -1
- package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +2 -0
- package/components/dropdown/v4/AppDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/AppDropdownTrigger.vue2.js +16 -16
- package/components/dropdown/v4/ChipDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +1 -1
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +40 -49
- package/components/dropdown/v4/DropdownV4.vue.d.ts +16 -0
- package/components/dropdown/v4/DropdownV4.vue.js +3 -3
- package/components/dropdown/v4/DropdownV4.vue2.js +140 -128
- package/components/dropdown/v4/OptionV4.vue.d.ts +11 -0
- package/components/dropdown/v4/OptionV4.vue.js +3 -3
- package/components/dropdown/v4/OptionV4.vue2.js +61 -44
- package/components/dropdown/v4/index.d.ts +105 -4
- package/components/forms/FormCard.vue.js +2 -2
- package/components/forms/FormCard.vue2.js +9 -9
- package/components/inlineCopy/InlineCopy.vue.d.ts +6 -2
- package/components/inlineCopy/InlineCopy.vue.js +3 -3
- package/components/inlineCopy/InlineCopy.vue2.js +23 -22
- package/components/inlineCopy/index.d.ts +6 -2
- package/components/input/v4/TextField.vue.d.ts +5 -0
- package/components/input/v4/TextField.vue.js +3 -3
- package/components/input/v4/TextField.vue2.js +24 -21
- package/components/input/v4/index.d.ts +20 -1
- package/components/shared/FieldLabel.vue.js +3 -3
- package/components/shared/FieldLabel.vue2.js +9 -9
- package/components/table/v4/DataGrid.vue.d.ts +4 -0
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +147 -147
- package/components/table/v4/index.d.ts +14 -2
- package/components/textArea/v4/TextAreaV4.vue.js +3 -3
- package/components/textArea/v4/TextAreaV4.vue2.js +1 -1
- package/components/toggle/v4/ToggleV4.vue.js +3 -3
- package/components/toggle/v4/ToggleV4.vue2.js +12 -12
- package/components/tooltip/v4/TooltipV4.vue.d.ts +6 -2
- package/components/tooltip/v4/TooltipV4.vue.js +2 -2
- package/components/tooltip/v4/TooltipV4.vue2.js +21 -19
- package/components/tooltip/v4/index.d.ts +17 -5
- package/index.d.ts +336 -32
- package/package.json +1 -1
- package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_0267d003_lang.css +0 -1
- package/AppHeader.vue_vue_type_style_index_0_scoped_c148fc7a_lang.css +0 -1
- package/Autocomplete.vue_vue_type_style_index_0_scoped_d2d1dc1d_lang.css +0 -1
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_889042cf_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_c96fba2c_lang.css +0 -1
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_c3033d90_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_c3004ba3_lang.css +0 -1
- package/Dropdown.vue_vue_type_style_index_0_scoped_d4f8e790_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_bf8e7ff5_lang.css +0 -1
- package/FieldLabel.vue_vue_type_style_index_0_scoped_72ab1f25_lang.css +0 -1
- package/InlineCopy.vue_vue_type_style_index_0_scoped_ff9f4a0f_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_b8375219_lang.css +0 -1
- package/TextAreaV4.vue_vue_type_style_index_0_scoped_0336a92f_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_b5b2e8fd_lang.css +0 -1
- package/ToggleV4.vue_vue_type_style_index_0_scoped_ad231e8c_lang.css +0 -1
- package/TooltipV4.vue_vue_type_style_index_0_scoped_25809092_lang.css +0 -1
|
@@ -11,6 +11,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
11
11
|
testId: string;
|
|
12
12
|
hoverHelpText: string;
|
|
13
13
|
hoverHelpTextPlacement: "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";
|
|
14
|
+
maxLength: number;
|
|
14
15
|
modelValue: string | number;
|
|
15
16
|
placeholder: string;
|
|
16
17
|
labelDirection: "top" | "inside";
|
|
@@ -58,6 +59,10 @@ declare const AutocompleteTypes: () => ({
|
|
|
58
59
|
type: import("vue").PropType<"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">;
|
|
59
60
|
default: string;
|
|
60
61
|
};
|
|
62
|
+
maxLength: {
|
|
63
|
+
type: import("vue").PropType<number>;
|
|
64
|
+
default: any;
|
|
65
|
+
};
|
|
61
66
|
modelValue: {
|
|
62
67
|
type: import("vue").PropType<string | number>;
|
|
63
68
|
default: string;
|
|
@@ -108,7 +113,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
108
113
|
};
|
|
109
114
|
}>> & {
|
|
110
115
|
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
111
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "label" | "disabled" | "size" | "mandatory" | "testId" | "hoverHelpText" | "hoverHelpTextPlacement" | "modelValue" | "placeholder" | "labelDirection" | "inlineError" | "inlineErrorText" | "feedbackText" | "feedbackVariant" | "showFeedbackTextIcon" | "onSearch" | "optionNameKey" | "optionsListWidth">;
|
|
116
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "label" | "disabled" | "size" | "mandatory" | "testId" | "hoverHelpText" | "hoverHelpTextPlacement" | "maxLength" | "modelValue" | "placeholder" | "labelDirection" | "inlineError" | "inlineErrorText" | "feedbackText" | "feedbackVariant" | "showFeedbackTextIcon" | "onSearch" | "optionNameKey" | "optionsListWidth">;
|
|
112
117
|
$attrs: {
|
|
113
118
|
[x: string]: unknown;
|
|
114
119
|
};
|
|
@@ -158,6 +163,10 @@ declare const AutocompleteTypes: () => ({
|
|
|
158
163
|
type: import("vue").PropType<"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">;
|
|
159
164
|
default: string;
|
|
160
165
|
};
|
|
166
|
+
maxLength: {
|
|
167
|
+
type: import("vue").PropType<number>;
|
|
168
|
+
default: any;
|
|
169
|
+
};
|
|
161
170
|
modelValue: {
|
|
162
171
|
type: import("vue").PropType<string | number>;
|
|
163
172
|
default: string;
|
|
@@ -218,6 +227,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
218
227
|
testId: string;
|
|
219
228
|
hoverHelpText: string;
|
|
220
229
|
hoverHelpTextPlacement: "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";
|
|
230
|
+
maxLength: number;
|
|
221
231
|
modelValue: string | number;
|
|
222
232
|
placeholder: string;
|
|
223
233
|
labelDirection: "top" | "inside";
|
|
@@ -285,6 +295,10 @@ declare const AutocompleteTypes: () => ({
|
|
|
285
295
|
type: import("vue").PropType<"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">;
|
|
286
296
|
default: string;
|
|
287
297
|
};
|
|
298
|
+
maxLength: {
|
|
299
|
+
type: import("vue").PropType<number>;
|
|
300
|
+
default: any;
|
|
301
|
+
};
|
|
288
302
|
modelValue: {
|
|
289
303
|
type: import("vue").PropType<string | number>;
|
|
290
304
|
default: string;
|
|
@@ -375,6 +389,10 @@ declare const AutocompleteTypes: () => ({
|
|
|
375
389
|
type: import("vue").PropType<"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">;
|
|
376
390
|
default: string;
|
|
377
391
|
};
|
|
392
|
+
maxLength: {
|
|
393
|
+
type: import("vue").PropType<number>;
|
|
394
|
+
default: any;
|
|
395
|
+
};
|
|
378
396
|
modelValue: {
|
|
379
397
|
type: import("vue").PropType<string | number>;
|
|
380
398
|
default: string;
|
|
@@ -435,6 +453,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
435
453
|
testId: string;
|
|
436
454
|
hoverHelpText: string;
|
|
437
455
|
hoverHelpTextPlacement: "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";
|
|
456
|
+
maxLength: number;
|
|
438
457
|
modelValue: string | number;
|
|
439
458
|
placeholder: string;
|
|
440
459
|
labelDirection: "top" | "inside";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DialogV4.vue2.js";
|
|
2
2
|
/* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../DialogV4.
|
|
4
|
-
const
|
|
3
|
+
// import "../../../DialogV4.vue_vue_type_style_index_0_scoped_09c488cf_lang.css"; //*');
|
|
4
|
+
const t = /* @__PURE__ */ _(o, [["__scopeId", "data-v-09c488cf"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
t as default
|
|
7
7
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import "../../../DialogV4.
|
|
2
|
-
import { NOOP as
|
|
3
|
-
import
|
|
1
|
+
import "../../../DialogV4.vue_vue_type_style_index_0_scoped_09c488cf_lang.css"; import { defineComponent as A, openBlock as o, createBlock as c, Teleport as w, createVNode as b, Transition as I, withCtx as u, unref as e, createElementBlock as m, createElementVNode as C, mergeProps as s, renderSlot as k, createTextVNode as f, toDisplayString as B, createCommentVNode as d } from "vue";
|
|
2
|
+
import { NOOP as V } from "@vue/shared";
|
|
3
|
+
import T from "../../typography/v4/Typography.vue.js";
|
|
4
4
|
import N from "../../button/v4/ButtonV4.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import { Reason as
|
|
7
|
-
import { dialogCommon as
|
|
5
|
+
import p from "../../button/v4/IconButtonV4.vue.js";
|
|
6
|
+
import { Reason as g } from "../common/Reason.js";
|
|
7
|
+
import { dialogCommon as D } from "../common/Dialog.common.js";
|
|
8
8
|
import { DialogTestIdModifiers as l } from "../../../testids/index.js";
|
|
9
|
-
import { useTestIdAttrs as
|
|
10
|
-
import { useMagicKeys as
|
|
11
|
-
const
|
|
9
|
+
import { useTestIdAttrs as P } from "../../../utils/testIds.js";
|
|
10
|
+
import { useMagicKeys as R, whenever as $ } from "@vueuse/core";
|
|
11
|
+
const S = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "container light-theme-v4"
|
|
14
|
-
},
|
|
14
|
+
}, F = { class: "title" }, U = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "footer"
|
|
17
|
-
},
|
|
17
|
+
}, Q = /* @__PURE__ */ A({
|
|
18
18
|
__name: "DialogV4",
|
|
19
19
|
props: {
|
|
20
20
|
modelValue: { type: Boolean },
|
|
@@ -39,106 +39,111 @@ const R = {
|
|
|
39
39
|
testId: { default: "" }
|
|
40
40
|
},
|
|
41
41
|
emits: ["update:modelValue", "open", "close", "save", "cancel"],
|
|
42
|
-
setup(t, { emit:
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
h.value &&
|
|
46
|
-
})
|
|
42
|
+
setup(t, { emit: v }) {
|
|
43
|
+
const i = t, { escape: L } = R(), a = P(i.testId, l), { visible: h, handleClose: y } = D(i, v);
|
|
44
|
+
$(L, () => {
|
|
45
|
+
h.value && i.escapeToClose && !i.saveButtonLoading && y(g.Escape);
|
|
46
|
+
});
|
|
47
|
+
const E = () => {
|
|
48
|
+
const { closeOnClickOutside: r, saveButtonLoading: n } = i;
|
|
49
|
+
r && !n ? y(g.Backdrop) : V();
|
|
50
|
+
};
|
|
51
|
+
return (r, n) => (o(), c(w, {
|
|
47
52
|
to: "body",
|
|
48
53
|
disabled: !t.appendToBody
|
|
49
54
|
}, [
|
|
50
|
-
|
|
51
|
-
default:
|
|
52
|
-
e(h) ? (o(),
|
|
53
|
-
|
|
55
|
+
b(I, null, {
|
|
56
|
+
default: u(() => [
|
|
57
|
+
e(h) ? (o(), m("div", S, [
|
|
58
|
+
C("div", s({
|
|
54
59
|
class: ["dialog", [`dialog--${t.size}`]]
|
|
55
60
|
}, e(a)[e(l).WRAPPER]), [
|
|
56
|
-
t.title || t.subtitle || t.showCloseButton ? (o(),
|
|
61
|
+
t.title || t.subtitle || t.showCloseButton ? (o(), m("header", s({
|
|
57
62
|
key: 0,
|
|
58
63
|
class: "header"
|
|
59
64
|
}, e(a)[e(l).HEADER]), [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
t.title ? (o(),
|
|
65
|
+
C("div", F, [
|
|
66
|
+
k(r.$slots, "header", {}, () => [
|
|
67
|
+
t.title ? (o(), c(e(T), {
|
|
63
68
|
key: 0,
|
|
64
69
|
variant: "h3"
|
|
65
70
|
}, {
|
|
66
|
-
default:
|
|
67
|
-
|
|
71
|
+
default: u(() => [
|
|
72
|
+
f(B(t.title), 1)
|
|
68
73
|
]),
|
|
69
74
|
_: 1
|
|
70
|
-
})) :
|
|
71
|
-
t.subtitle ? (o(),
|
|
75
|
+
})) : d("", !0),
|
|
76
|
+
t.subtitle ? (o(), c(e(T), {
|
|
72
77
|
key: 1,
|
|
73
78
|
class: "subtitle",
|
|
74
79
|
variant: "body1"
|
|
75
80
|
}, {
|
|
76
|
-
default:
|
|
77
|
-
|
|
81
|
+
default: u(() => [
|
|
82
|
+
f(B(t.subtitle), 1)
|
|
78
83
|
]),
|
|
79
84
|
_: 1
|
|
80
|
-
})) :
|
|
85
|
+
})) : d("", !0)
|
|
81
86
|
], !0)
|
|
82
87
|
]),
|
|
83
|
-
t.showCloseButton ? (o(),
|
|
88
|
+
t.showCloseButton ? (o(), c(e(p), s({
|
|
84
89
|
key: 0,
|
|
85
90
|
class: "close-button",
|
|
86
|
-
"icon-name": "x"
|
|
91
|
+
"icon-name": "x",
|
|
92
|
+
disabled: t.saveButtonLoading
|
|
87
93
|
}, e(a)[e(l).ACTION_CLOSE], {
|
|
88
|
-
onClick: n[0] || (n[0] = (
|
|
89
|
-
}), null, 16)) :
|
|
90
|
-
], 16)) :
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
t.content ? (o(),
|
|
94
|
+
onClick: n[0] || (n[0] = (O) => e(y)(e(g).CloseButton))
|
|
95
|
+
}), null, 16, ["disabled"])) : d("", !0)
|
|
96
|
+
], 16)) : d("", !0),
|
|
97
|
+
C("div", s({ class: "content" }, e(a)[e(l).CONTENT]), [
|
|
98
|
+
k(r.$slots, "default", {}, () => [
|
|
99
|
+
t.content ? (o(), c(e(T), {
|
|
94
100
|
key: 0,
|
|
95
101
|
variant: "body1"
|
|
96
102
|
}, {
|
|
97
|
-
default:
|
|
98
|
-
|
|
103
|
+
default: u(() => [
|
|
104
|
+
f(B(t.content), 1)
|
|
99
105
|
]),
|
|
100
106
|
_: 1
|
|
101
|
-
})) :
|
|
107
|
+
})) : d("", !0)
|
|
102
108
|
], !0)
|
|
103
109
|
], 16),
|
|
104
|
-
t.showFooter ? (o(),
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
t.showFooter ? (o(), m("footer", U, [
|
|
111
|
+
C("div", s({ class: "action-buttons" }, e(a)[e(l).ACTION_BUTTONS_WRAPPER]), [
|
|
112
|
+
k(r.$slots, "footer", {}, () => [
|
|
113
|
+
b(e(N), s({
|
|
108
114
|
class: "form-action",
|
|
109
115
|
variant: "outlined",
|
|
110
|
-
color: t.cancelButtonColor
|
|
116
|
+
color: t.cancelButtonColor,
|
|
117
|
+
disabled: t.saveButtonLoading
|
|
111
118
|
}, e(a)[e(l).CANCEL_BUTTON], {
|
|
112
|
-
onClick: n[1] || (n[1] = (
|
|
119
|
+
onClick: n[1] || (n[1] = (O) => v("cancel"))
|
|
113
120
|
}), {
|
|
114
|
-
default:
|
|
115
|
-
|
|
121
|
+
default: u(() => [
|
|
122
|
+
f(B(t.cancelButtonLabel), 1)
|
|
116
123
|
]),
|
|
117
124
|
_: 1
|
|
118
|
-
}, 16, ["color"]),
|
|
119
|
-
|
|
125
|
+
}, 16, ["color", "disabled"]),
|
|
126
|
+
b(e(N), s({
|
|
120
127
|
class: "form-action",
|
|
121
128
|
loading: t.saveButtonLoading,
|
|
122
129
|
color: t.saveButtonColor
|
|
123
130
|
}, e(a)[e(l).SAVE_BUTTON], {
|
|
124
|
-
onClick: n[2] || (n[2] = (
|
|
131
|
+
onClick: n[2] || (n[2] = (O) => v("save"))
|
|
125
132
|
}), {
|
|
126
|
-
default:
|
|
127
|
-
|
|
133
|
+
default: u(() => [
|
|
134
|
+
f(B(t.saveButtonLabel), 1)
|
|
128
135
|
]),
|
|
129
136
|
_: 1
|
|
130
137
|
}, 16, ["loading", "color"])
|
|
131
138
|
], !0)
|
|
132
139
|
], 16)
|
|
133
|
-
])) :
|
|
140
|
+
])) : d("", !0)
|
|
134
141
|
], 16),
|
|
135
|
-
t.showBackdrop ? (o(),
|
|
142
|
+
t.showBackdrop ? (o(), m("div", s({
|
|
136
143
|
key: 0,
|
|
137
144
|
class: "dialog-backdrop"
|
|
138
|
-
}, e(a)[e(l).BACKDROP], {
|
|
139
|
-
|
|
140
|
-
}), null, 16)) : u("", !0)
|
|
141
|
-
])) : u("", !0)
|
|
145
|
+
}, e(a)[e(l).BACKDROP], { onClick: E }), null, 16)) : d("", !0)
|
|
146
|
+
])) : d("", !0)
|
|
142
147
|
]),
|
|
143
148
|
_: 3
|
|
144
149
|
})
|
|
@@ -146,5 +151,5 @@ const R = {
|
|
|
146
151
|
}
|
|
147
152
|
});
|
|
148
153
|
export {
|
|
149
|
-
|
|
154
|
+
Q as default
|
|
150
155
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useToggle as me } from "../../../composables/useToggle.js";
|
|
2
|
-
import { ref as n, computed as r, watch as
|
|
2
|
+
import { ref as n, computed as r, watch as P, useSlots as Pe, toRaw as A, nextTick as D, provide as Te, onMounted as we } from "vue";
|
|
3
3
|
import { isObjectInArray as W } from "../../../utils/array.js";
|
|
4
4
|
import { objectsEqual as xe } from "../../../utils/object.js";
|
|
5
5
|
import { useClamp as Ie, useVirtualList as De, onClickOutside as Y } from "@vueuse/core";
|
|
6
|
-
import { Mode as
|
|
6
|
+
import { Mode as m, Type as _, DropdownContext as Ne } from "./DropdownContext.js";
|
|
7
7
|
import { pxToRem as Re } from "../../../utils/style.js";
|
|
8
8
|
import { useEditableContext as Ee } from "../../table-cells/common/EditableContext.js";
|
|
9
|
-
const Ue = (l,
|
|
9
|
+
const Ue = (l, O, b) => {
|
|
10
10
|
const Z = (e, t) => l.multi ? W(e, t) : A(e) === t;
|
|
11
11
|
let k;
|
|
12
12
|
((e) => {
|
|
@@ -19,20 +19,20 @@ const Ue = (l, P, b) => {
|
|
|
19
19
|
return N?.value?.value ?? a.value;
|
|
20
20
|
},
|
|
21
21
|
set(e) {
|
|
22
|
-
N.onChange?.(e), N.onClose?.(),
|
|
22
|
+
N.onChange?.(e), N.onClose?.(), O("update:selected", e);
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
|
|
25
|
+
P(
|
|
26
26
|
() => l.selected,
|
|
27
27
|
() => {
|
|
28
28
|
a.value = l.selected, v.value = l.selected;
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
|
-
const p = Pe(), T = n(null), g = n(null), V = n(null), R = n(null), H = n(null), w = n(null), F = n(), B = n(null), L = n(null), U = n(null), ee = 8, le = r(() => w.value ? w.value.getBoundingClientRect().height + ee + l.distance : 0), c = n([]), x = n(-1), I = n(""), v = n([]), q = () => w.value?.focus(), [d, te, ae] = me({
|
|
31
|
+
const p = Pe(), T = n(null), g = n(null), V = n(null), R = n(null), H = n(null), w = n(null), F = n(), B = n(null), L = n(null), U = n(null), ee = 8, le = r(() => w.value ? w.value.getBoundingClientRect().height + ee + l.distance : 0), c = n([]), x = n(-1), I = n(""), v = n(l.selected || []), q = () => w.value?.focus(), [d, te, ae] = me({
|
|
32
32
|
disabled: l.disabled,
|
|
33
33
|
initialValue: l.defaultOpen
|
|
34
34
|
});
|
|
35
|
-
|
|
35
|
+
P(
|
|
36
36
|
() => l.disabled,
|
|
37
37
|
(e) => {
|
|
38
38
|
e !== void 0 && ae(e);
|
|
@@ -45,7 +45,7 @@ const Ue = (l, P, b) => {
|
|
|
45
45
|
return l.isOpen;
|
|
46
46
|
},
|
|
47
47
|
set(e) {
|
|
48
|
-
|
|
48
|
+
O("update:isOpen", e);
|
|
49
49
|
}
|
|
50
50
|
}), ne = r(() => s.value.length - 1), o = Ie(0, 0, ne), K = r(() => u.value ? l.displayValue(u.value) : ""), ie = (e) => {
|
|
51
51
|
if (!e.value.length && !l.multiOptionsPlaceholderPrefix && !l.multiOptionsPlaceholderSuffix)
|
|
@@ -74,7 +74,7 @@ const Ue = (l, P, b) => {
|
|
|
74
74
|
}), s = r(() => {
|
|
75
75
|
const e = Array.isArray(v.value) && l.multi && b.VERSION === 4 ? se.value : l.options;
|
|
76
76
|
return l.onSearch ? e.filter((t) => l.onSearch(t, I.value)) : e;
|
|
77
|
-
}), ce = r(() => c.value[0]?.hasSubtitle), X = r(() => i.mode ===
|
|
77
|
+
}), ce = r(() => c.value[0]?.hasSubtitle), X = r(() => i.mode === m.Multi), j = r(
|
|
78
78
|
() => ce.value ? b.MULTILINE_LIST_HEIGHT : b.LIST_HEIGHT
|
|
79
79
|
), {
|
|
80
80
|
list: z,
|
|
@@ -85,14 +85,14 @@ const Ue = (l, P, b) => {
|
|
|
85
85
|
itemHeight: j.value,
|
|
86
86
|
overscan: 2
|
|
87
87
|
});
|
|
88
|
-
|
|
88
|
+
P(
|
|
89
89
|
() => l.isOpen,
|
|
90
90
|
(e) => {
|
|
91
91
|
G(e);
|
|
92
92
|
}
|
|
93
|
-
),
|
|
93
|
+
), P([x], async () => {
|
|
94
94
|
await D();
|
|
95
|
-
}),
|
|
95
|
+
}), P(
|
|
96
96
|
[d, o, x],
|
|
97
97
|
async ([e], [t]) => {
|
|
98
98
|
d.value && (await D(), x.value !== -1 && e !== t && setTimeout(() => {
|
|
@@ -104,10 +104,10 @@ const Ue = (l, P, b) => {
|
|
|
104
104
|
);
|
|
105
105
|
const h = (e, t = !1) => {
|
|
106
106
|
l.disabled || (G(e), D(() => {
|
|
107
|
-
d.value &&
|
|
107
|
+
d.value && O("opened"), d.value || O("closed"), T.value && t && T.value.focus();
|
|
108
108
|
}));
|
|
109
109
|
};
|
|
110
|
-
|
|
110
|
+
P(d, (e) => {
|
|
111
111
|
if (e) {
|
|
112
112
|
X.value && Array.isArray(u.value) && (v.value = A(u.value).slice());
|
|
113
113
|
return;
|
|
@@ -124,16 +124,16 @@ const Ue = (l, P, b) => {
|
|
|
124
124
|
a.value = [];
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
|
-
a.value = s.value;
|
|
127
|
+
a.value = s.value, O("selectAll");
|
|
128
128
|
}
|
|
129
129
|
}, fe = () => {
|
|
130
130
|
de(), b.VERSION !== 4 && (u.value = a.value);
|
|
131
131
|
}, ge = (e = !0) => {
|
|
132
|
-
a.value = [], e && (u.value = [], v.value = []);
|
|
132
|
+
a.value = [], e && (u.value = [], v.value = [], O("clear"));
|
|
133
133
|
}, C = (e, t) => {
|
|
134
134
|
if (e = A(e), c.value[t]?.disabled)
|
|
135
135
|
return;
|
|
136
|
-
if (x.value = t, i.mode !==
|
|
136
|
+
if (x.value = t, i.mode !== m.Multi) {
|
|
137
137
|
l.keepOpen || h(!1), i.goToOption(
|
|
138
138
|
0
|
|
139
139
|
/* None */
|
|
@@ -162,7 +162,7 @@ const Ue = (l, P, b) => {
|
|
|
162
162
|
listRef: T,
|
|
163
163
|
clearable: l.clearable,
|
|
164
164
|
type: p.input ? _.Search : _.Dropdown,
|
|
165
|
-
mode: l.multi ?
|
|
165
|
+
mode: l.multi ? m.Multi : m.Single,
|
|
166
166
|
query: I,
|
|
167
167
|
selectedValue: K,
|
|
168
168
|
toggle: h,
|
|
@@ -173,7 +173,7 @@ const Ue = (l, P, b) => {
|
|
|
173
173
|
placeholder: l.placeholder,
|
|
174
174
|
select: C,
|
|
175
175
|
clearSelection: () => {
|
|
176
|
-
E(""), u.value = i.mode ===
|
|
176
|
+
E(""), u.value = i.mode === m.Single ? null : [], v.value = i.mode === m.Single ? null : [], g.value && (g.value.value = "");
|
|
177
177
|
},
|
|
178
178
|
search: E,
|
|
179
179
|
goToOption: async (e) => {
|
|
@@ -229,7 +229,7 @@ const Ue = (l, P, b) => {
|
|
|
229
229
|
})), i.goToOption(0);
|
|
230
230
|
});
|
|
231
231
|
const Se = () => {
|
|
232
|
-
u.value = a.value, Array.isArray(u.value) && (v.value = A(u.value).slice()),
|
|
232
|
+
u.value = a.value, Array.isArray(u.value) && (v.value = A(u.value).slice()), O("apply", u.value), h(!1), ye();
|
|
233
233
|
}, Q = () => {
|
|
234
234
|
X.value && Array.isArray(v.value) && (u.value = A(v.value).slice()), I.value = "", h(!1);
|
|
235
235
|
}, be = (e) => {
|
|
@@ -281,7 +281,7 @@ const Ue = (l, P, b) => {
|
|
|
281
281
|
h(!0);
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
C(s.value[o.value], o.value), i.mode ===
|
|
284
|
+
C(s.value[o.value], o.value), i.mode === m.Single && !l.keepOpen && h(!1), e.preventDefault();
|
|
285
285
|
break;
|
|
286
286
|
}
|
|
287
287
|
}
|
|
@@ -84,6 +84,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
84
84
|
closed: () => void;
|
|
85
85
|
opened: () => void;
|
|
86
86
|
apply: (value: unknown) => void;
|
|
87
|
+
selectAll: () => void;
|
|
88
|
+
clear: () => void;
|
|
87
89
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
88
90
|
modelValue?: unknown;
|
|
89
91
|
placeholder?: string;
|
|
@@ -161,7 +163,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
161
163
|
darkTheme: boolean;
|
|
162
164
|
valueToCopy: string;
|
|
163
165
|
}>>> & {
|
|
166
|
+
onClear?: () => any;
|
|
164
167
|
onApply?: (value: unknown) => any;
|
|
168
|
+
onSelectAll?: () => any;
|
|
165
169
|
"onUpdate:selected"?: (value: unknown) => any;
|
|
166
170
|
"onUpdate:isOpen"?: (value: unknown) => any;
|
|
167
171
|
onOpened?: () => any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "./Dropdown.vue2.js";
|
|
2
|
-
/* empty css *//* empty css */import
|
|
3
|
-
// import "../../../Dropdown.
|
|
2
|
+
/* empty css *//* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../Dropdown.vue_vue_type_style_index_0_scoped_aaa8c4bb_lang.css"; //*');
|
|
4
4
|
// import "../../../Dropdown.vue_vue_type_style_index_1_lang.css"; //');
|
|
5
|
-
const
|
|
5
|
+
const a = /* @__PURE__ */ _(o, [["__scopeId", "data-v-aaa8c4bb"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|