@ironsource/shared-ui 2.1.6-rc.4 → 2.1.6-rc.41
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_5cdc75dd_lang.css +1 -0
- package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_858cefbf_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/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/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_0345d6b1_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_7af4f288_lang.css +1 -0
- package/FieldLabel.vue_vue_type_style_index_0_scoped_96ee1c98_lang.css +1 -0
- package/FoldableSection.vue_vue_type_style_index_0_scoped_1a5f0e2e_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/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/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/TreeDropdown.vue_vue_type_style_index_0_scoped_142eab98_lang.css +1 -0
- package/components/alert/Alert.vue.d.ts +23 -0
- package/components/alert/Alert.vue.js +3 -3
- package/components/alert/Alert.vue2.js +68 -48
- package/components/alert/index.d.ts +85 -2
- 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 +6 -0
- package/components/autocomplete/Autocomplete.vue.js +2 -2
- package/components/autocomplete/Autocomplete.vue2.js +45 -37
- package/components/autocomplete/index.d.ts +21 -1
- 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/dialog/v3/Dialog.vue.d.ts +1 -1
- package/components/dialog/v3/index.d.ts +20 -20
- 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 +74 -69
- 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/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 +16 -3
- package/components/dropdown/v4/AppDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/AppDropdownTrigger.vue2.js +102 -61
- package/components/dropdown/v4/ChipDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +1 -1
- 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 +35 -3
- package/components/dropdown/v4/DropdownV4.vue.js +2 -2
- package/components/dropdown/v4/DropdownV4.vue2.js +127 -114
- package/components/dropdown/v4/OptionV4.vue.d.ts +14 -3
- package/components/dropdown/v4/OptionV4.vue.js +2 -2
- package/components/dropdown/v4/OptionV4.vue2.js +79 -56
- 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 +422 -38
- 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/forms/FormCard.vue.js +2 -2
- package/components/forms/FormCard.vue2.js +9 -9
- 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.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/layout/FoldableSection.vue.js +5 -5
- package/components/layout/FoldableSection.vue2.js +1 -1
- package/components/multibar/MultiBarMenu.vue2.js +12 -11
- package/components/shared/FieldLabel.vue.js +3 -3
- package/components/shared/FieldLabel.vue2.js +9 -9
- 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 +9 -1
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +180 -176
- 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 +29 -5
- 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/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/composables/useFormValidation.js +19 -13
- package/design-foundation.stories/icons/iconsData.d.ts +5 -1
- package/index.d.ts +1451 -688
- 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_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_62faa8e0_lang.css +0 -1
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_889042cf_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_c96fba2c_lang.css +0 -1
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_c9783327_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_0968078f_lang.css +0 -1
- package/FieldLabel.vue_vue_type_style_index_0_scoped_72ab1f25_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_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_8199b662_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_07687bcc_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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../../AppHeader.
|
|
1
|
+
import "../../AppHeader.vue_vue_type_style_index_0_scoped_538ccdc6_lang.css"; import { defineComponent as h, computed as o, openBlock as m, createElementBlock as p, normalizeClass as C, createElementVNode as n, mergeProps as r, unref as e, createVNode as i, withCtx as b, createTextVNode as v, toDisplayString as z, createCommentVNode as A } from "vue";
|
|
2
2
|
import c from "../icon/v4/IconV4.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useTestIdAttrs as
|
|
3
|
+
import T from "../typography/v4/Typography.vue.js";
|
|
4
|
+
import g from "../inlineCopy/InlineCopy.vue.js";
|
|
5
|
+
import { useTestIdAttrs as N } from "../../utils/testIds.js";
|
|
6
6
|
import { AppHeaderTestIdModifiers as l } from "../../testids/index.js";
|
|
7
|
-
const
|
|
7
|
+
const w = { class: "image-container" }, k = ["src", "alt"], B = ["data-platform"], P = { class: "name-container" }, $ = /* @__PURE__ */ h({
|
|
8
8
|
__name: "AppHeader",
|
|
9
9
|
props: {
|
|
10
10
|
image: { default: "" },
|
|
@@ -15,24 +15,25 @@ const T = { class: "image-container" }, N = ["src", "alt"], w = ["data-platform"
|
|
|
15
15
|
type: { default: "normal" },
|
|
16
16
|
showAbIcon: { type: Boolean, default: !1 }
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
emits: ["copyToClipboard"],
|
|
19
|
+
setup(t, { emit: f }) {
|
|
20
|
+
const a = t, y = o(
|
|
20
21
|
() => a.platform ? a.platform.toLowerCase() : ""
|
|
21
|
-
), f = o(
|
|
22
|
-
() => a.type === "normal" ? "24px" : "20px"
|
|
23
22
|
), u = o(
|
|
23
|
+
() => a.type === "normal" ? "24px" : "20px"
|
|
24
|
+
), x = o(
|
|
24
25
|
() => a.type === "small" ? "18px" : null
|
|
25
|
-
),
|
|
26
|
+
), I = o(
|
|
26
27
|
() => a.type === "normal" ? "h2" : "subtitle1"
|
|
27
|
-
), s =
|
|
28
|
-
return (
|
|
29
|
-
class:
|
|
28
|
+
), s = N(a.testId, l);
|
|
29
|
+
return (S, d) => (m(), p("div", {
|
|
30
|
+
class: C(["app-header", `size-${t.type}`])
|
|
30
31
|
}, [
|
|
31
|
-
n("div",
|
|
32
|
+
n("div", w, [
|
|
32
33
|
n("img", {
|
|
33
34
|
src: t.image,
|
|
34
35
|
alt: t.name
|
|
35
|
-
}, null, 8,
|
|
36
|
+
}, null, 8, k)
|
|
36
37
|
]),
|
|
37
38
|
n("div", r({
|
|
38
39
|
class: "icon-container",
|
|
@@ -40,32 +41,33 @@ const T = { class: "image-container" }, N = ["src", "alt"], w = ["data-platform"
|
|
|
40
41
|
}, e(s)[e(l).APP_PLATFORM]), [
|
|
41
42
|
i(e(c), {
|
|
42
43
|
type: "branded",
|
|
43
|
-
name: e(
|
|
44
|
-
size: e(
|
|
44
|
+
name: e(y),
|
|
45
|
+
size: e(u)
|
|
45
46
|
}, null, 8, ["name", "size"])
|
|
46
|
-
], 16,
|
|
47
|
-
n("div",
|
|
48
|
-
i(e(
|
|
49
|
-
variant: e(
|
|
47
|
+
], 16, B),
|
|
48
|
+
n("div", P, [
|
|
49
|
+
i(e(T), r({
|
|
50
|
+
variant: e(I),
|
|
50
51
|
class: "title"
|
|
51
52
|
}, e(s)[e(l).TITLE]), {
|
|
52
|
-
default:
|
|
53
|
-
z(
|
|
53
|
+
default: b(() => [
|
|
54
|
+
v(z(t.name), 1)
|
|
54
55
|
]),
|
|
55
56
|
_: 1
|
|
56
57
|
}, 16, ["variant"]),
|
|
57
|
-
i(e(
|
|
58
|
+
i(e(g), {
|
|
58
59
|
text: t.appKey,
|
|
59
60
|
size: "medium",
|
|
60
61
|
class: "inline-copy",
|
|
61
62
|
"hide-text-value": t.type === "small",
|
|
62
63
|
"test-id": t.testId,
|
|
63
|
-
"icon-size": e(
|
|
64
|
+
"icon-size": e(x),
|
|
64
65
|
"tooltip-header": "Copy app key",
|
|
65
|
-
"tooltip-text": t.appKey
|
|
66
|
+
"tooltip-text": t.appKey,
|
|
67
|
+
onCopy: d[0] || (d[0] = (V) => f("copyToClipboard"))
|
|
66
68
|
}, null, 8, ["text", "hide-text-value", "test-id", "icon-size", "tooltip-text"])
|
|
67
69
|
]),
|
|
68
|
-
t.showAbIcon ? (
|
|
70
|
+
t.showAbIcon ? (m(), p("div", r({
|
|
69
71
|
key: 0,
|
|
70
72
|
class: "ab-icon-wrapper"
|
|
71
73
|
}, e(s)[e(l).AB_ICON]), [
|
|
@@ -79,5 +81,5 @@ const T = { class: "image-container" }, N = ["src", "alt"], w = ["data-platform"
|
|
|
79
81
|
}
|
|
80
82
|
});
|
|
81
83
|
export {
|
|
82
|
-
|
|
84
|
+
$ as default
|
|
83
85
|
};
|
|
@@ -33,7 +33,9 @@ declare const AppHeaderTypes: () => import("vue").DefineComponent<{
|
|
|
33
33
|
type: import("vue").PropType<boolean>;
|
|
34
34
|
default: boolean;
|
|
35
35
|
};
|
|
36
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
|
+
copyToClipboard: () => void;
|
|
38
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
39
|
name: {
|
|
38
40
|
type: import("vue").PropType<string>;
|
|
39
41
|
required: true;
|
|
@@ -67,7 +69,9 @@ declare const AppHeaderTypes: () => import("vue").DefineComponent<{
|
|
|
67
69
|
type: import("vue").PropType<boolean>;
|
|
68
70
|
default: boolean;
|
|
69
71
|
};
|
|
70
|
-
}
|
|
72
|
+
}>> & {
|
|
73
|
+
onCopyToClipboard?: () => any;
|
|
74
|
+
}, {
|
|
71
75
|
name: string;
|
|
72
76
|
type: "small" | "normal";
|
|
73
77
|
image: string;
|
|
@@ -13,6 +13,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
13
13
|
showFeedbackTextIcon?: boolean;
|
|
14
14
|
inlineError?: boolean;
|
|
15
15
|
inlineErrorText?: string;
|
|
16
|
+
maxLength?: number;
|
|
16
17
|
options: unknown[] | {
|
|
17
18
|
id: string;
|
|
18
19
|
text: string;
|
|
@@ -37,6 +38,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
37
38
|
feedbackText: string;
|
|
38
39
|
feedbackVariant: any;
|
|
39
40
|
showFeedbackTextIcon: boolean;
|
|
41
|
+
maxLength: any;
|
|
40
42
|
onSearch: any;
|
|
41
43
|
optionNameKey: string;
|
|
42
44
|
optionsListWidth: any;
|
|
@@ -58,6 +60,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
58
60
|
showFeedbackTextIcon?: boolean;
|
|
59
61
|
inlineError?: boolean;
|
|
60
62
|
inlineErrorText?: string;
|
|
63
|
+
maxLength?: number;
|
|
61
64
|
options: unknown[] | {
|
|
62
65
|
id: string;
|
|
63
66
|
text: string;
|
|
@@ -82,6 +85,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
82
85
|
feedbackText: string;
|
|
83
86
|
feedbackVariant: any;
|
|
84
87
|
showFeedbackTextIcon: boolean;
|
|
88
|
+
maxLength: any;
|
|
85
89
|
onSearch: any;
|
|
86
90
|
optionNameKey: string;
|
|
87
91
|
optionsListWidth: any;
|
|
@@ -96,6 +100,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
96
100
|
testId: string;
|
|
97
101
|
hoverHelpText: string;
|
|
98
102
|
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";
|
|
103
|
+
maxLength: number;
|
|
99
104
|
modelValue: string | number;
|
|
100
105
|
placeholder: string;
|
|
101
106
|
labelDirection: "top" | "inside";
|
|
@@ -110,6 +115,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
110
115
|
}>, {
|
|
111
116
|
default?(_: {
|
|
112
117
|
option: unknown;
|
|
118
|
+
index: number;
|
|
113
119
|
selected: boolean;
|
|
114
120
|
active: boolean;
|
|
115
121
|
disabled: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Autocomplete.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../Autocomplete.
|
|
4
|
-
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../Autocomplete.vue_vue_type_style_index_0_scoped_a7bfd237_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-a7bfd237"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import "../../Autocomplete.
|
|
2
|
-
import
|
|
1
|
+
import "../../Autocomplete.vue_vue_type_style_index_0_scoped_a7bfd237_lang.css"; import { defineComponent as w, computed as c, ref as m, watchEffect as T, openBlock as r, createElementBlock as h, Fragment as F, createVNode as v, unref as d, withCtx as x, isRef as L, renderSlot as I, normalizeProps as S, guardReactiveProps as B, createBlock as b, createCommentVNode as f } from "vue";
|
|
2
|
+
import C from "../dropdown/v4/DropdownV4.vue.js";
|
|
3
3
|
import "../dropdown/v4/DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "../dropdown/v4/IconButtonDropdownTrigger.vue.js";
|
|
5
5
|
import "../dropdown/v4/ChipDropdownTrigger.vue.js";
|
|
6
6
|
import "../dropdown/v4/AppDropdownTrigger.vue.js";
|
|
7
7
|
import "../dropdown/v4/ButtonDropdownTrigger.vue.js";
|
|
8
8
|
import "../dropdown/v4/ButtonFilterDropdownTrigger.vue.js";
|
|
9
|
+
import "../dropdown/v4/TreeDropdown.vue.js";
|
|
9
10
|
import "../dropdown/v4/OptionV4.vue.js";
|
|
10
|
-
import
|
|
11
|
+
import E from "../input/v4/TextField.vue.js";
|
|
11
12
|
import { useVModel as z } from "@vueuse/core";
|
|
12
13
|
import H from "../shared/FieldHelpText.vue.js";
|
|
13
|
-
|
|
14
|
+
import P from "../shared/FieldMaxLength.vue.js";
|
|
15
|
+
const N = {
|
|
14
16
|
key: 0,
|
|
15
17
|
class: "footer"
|
|
16
|
-
},
|
|
18
|
+
}, X = /* @__PURE__ */ w({
|
|
17
19
|
__name: "Autocomplete",
|
|
18
20
|
props: {
|
|
19
21
|
modelValue: { default: "" },
|
|
@@ -30,6 +32,7 @@ const P = {
|
|
|
30
32
|
showFeedbackTextIcon: { type: Boolean, default: !1 },
|
|
31
33
|
inlineError: { type: Boolean, default: !1 },
|
|
32
34
|
inlineErrorText: { default: "" },
|
|
35
|
+
maxLength: { default: null },
|
|
33
36
|
options: null,
|
|
34
37
|
displayValue: null,
|
|
35
38
|
optionNameKey: { default: "" },
|
|
@@ -39,39 +42,39 @@ const P = {
|
|
|
39
42
|
},
|
|
40
43
|
emits: ["update:modelValue"],
|
|
41
44
|
setup(e, { emit: p }) {
|
|
42
|
-
const a = e,
|
|
43
|
-
l !== void 0 && (
|
|
44
|
-
},
|
|
45
|
-
const l =
|
|
45
|
+
const a = e, i = z(a, "modelValue", p), g = (l) => {
|
|
46
|
+
l !== void 0 && (i.value = a.displayValue(l));
|
|
47
|
+
}, k = c(() => (i.value || "").length), y = (l, t) => a.displayValue(l).toLowerCase().replace(/\s+/g, "").includes(t.toLowerCase().replace(/\s+/g, "")), u = c(() => {
|
|
48
|
+
const l = i.value.toString();
|
|
46
49
|
return (a.options || []).filter(
|
|
47
|
-
(t) => a.onSearch !== null ? a.onSearch(t, l) :
|
|
50
|
+
(t) => a.onSearch !== null ? a.onSearch(t, l) : y(t, l)
|
|
48
51
|
);
|
|
49
|
-
}),
|
|
50
|
-
|
|
51
|
-
a.disabled ?
|
|
52
|
+
}), n = m(!1), s = m(!1);
|
|
53
|
+
T(() => {
|
|
54
|
+
a.disabled ? n.value = !1 : s.value && u.value.length ? n.value = !0 : u.value.length === 0 && (n.value = !1);
|
|
52
55
|
});
|
|
53
|
-
const
|
|
54
|
-
a.disabled || !
|
|
56
|
+
const V = () => {
|
|
57
|
+
a.disabled || !n.value && u.value.length && (n.value = !0);
|
|
55
58
|
};
|
|
56
|
-
return (l, t) => (
|
|
57
|
-
|
|
58
|
-
"is-open":
|
|
59
|
-
"onUpdate:is-open": t[3] || (t[3] = (
|
|
59
|
+
return (l, t) => (r(), h(F, null, [
|
|
60
|
+
v(d(C), {
|
|
61
|
+
"is-open": n.value,
|
|
62
|
+
"onUpdate:is-open": t[3] || (t[3] = (o) => n.value = o),
|
|
60
63
|
class: "autocomplete-dropdown",
|
|
61
64
|
"display-value": e.displayValue,
|
|
62
|
-
options:
|
|
65
|
+
options: d(u),
|
|
63
66
|
"option-name-key": e.optionNameKey,
|
|
64
67
|
"options-list-width": e.optionsListWidth,
|
|
65
68
|
disabled: e.disabled,
|
|
66
69
|
"search-auto-focus": !1,
|
|
67
70
|
"full-width": !1,
|
|
68
71
|
"test-id": e.testId,
|
|
69
|
-
"onUpdate:selected":
|
|
72
|
+
"onUpdate:selected": g
|
|
70
73
|
}, {
|
|
71
|
-
"dropdown-trigger":
|
|
72
|
-
|
|
73
|
-
modelValue:
|
|
74
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
74
|
+
"dropdown-trigger": x(() => [
|
|
75
|
+
v(d(E), {
|
|
76
|
+
modelValue: d(i),
|
|
77
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => L(i) ? i.value = o : null),
|
|
75
78
|
class: "autocomplete-field",
|
|
76
79
|
placeholder: e.placeholder,
|
|
77
80
|
disabled: e.disabled,
|
|
@@ -86,29 +89,34 @@ const P = {
|
|
|
86
89
|
"show-feedback-text-icon": e.showFeedbackTextIcon,
|
|
87
90
|
"inline-error": e.inlineError,
|
|
88
91
|
"inline-error-text": e.inlineErrorText,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
maxlength: e.maxLength,
|
|
93
|
+
onFocusin: t[1] || (t[1] = (o) => s.value = !0),
|
|
94
|
+
onFocusout: t[2] || (t[2] = (o) => s.value = !1),
|
|
95
|
+
onClick: V
|
|
96
|
+
}, null, 8, ["modelValue", "placeholder", "disabled", "size", "label", "label-direction", "mandatory", "hover-help-text", "hover-help-text-placemen", "test-id", "feedback-variant", "show-feedback-text-icon", "inline-error", "inline-error-text", "maxlength"])
|
|
93
97
|
]),
|
|
94
|
-
default:
|
|
95
|
-
|
|
98
|
+
default: x((o) => [
|
|
99
|
+
I(l.$slots, "default", S(B(o)), void 0, !0)
|
|
96
100
|
]),
|
|
97
101
|
_: 3
|
|
98
102
|
}, 8, ["is-open", "display-value", "options", "option-name-key", "options-list-width", "disabled", "test-id"]),
|
|
99
|
-
e.feedbackText ? (
|
|
100
|
-
e.feedbackText ? (
|
|
103
|
+
e.feedbackText || e.maxLength ? (r(), h("div", N, [
|
|
104
|
+
e.feedbackText ? (r(), b(H, {
|
|
101
105
|
key: 0,
|
|
102
106
|
text: e.feedbackText,
|
|
103
107
|
variant: e.feedbackVariant,
|
|
104
108
|
"show-icon": e.showFeedbackTextIcon,
|
|
105
|
-
class: "field-help-text",
|
|
106
109
|
"test-id": e.testId
|
|
107
|
-
}, null, 8, ["text", "variant", "show-icon", "test-id"])) :
|
|
108
|
-
|
|
110
|
+
}, null, 8, ["text", "variant", "show-icon", "test-id"])) : f("", !0),
|
|
111
|
+
e.maxLength ? (r(), b(P, {
|
|
112
|
+
key: 1,
|
|
113
|
+
"current-length": d(k),
|
|
114
|
+
"max-length": e.maxLength
|
|
115
|
+
}, null, 8, ["current-length", "max-length"])) : f("", !0)
|
|
116
|
+
])) : f("", !0)
|
|
109
117
|
], 64));
|
|
110
118
|
}
|
|
111
119
|
});
|
|
112
120
|
export {
|
|
113
|
-
|
|
121
|
+
X as default
|
|
114
122
|
};
|
|
@@ -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";
|
|
@@ -450,6 +469,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
450
469
|
$slots: {
|
|
451
470
|
default?(_: {
|
|
452
471
|
option: unknown;
|
|
472
|
+
index: number;
|
|
453
473
|
selected: boolean;
|
|
454
474
|
active: boolean;
|
|
455
475
|
disabled: any;
|
|
@@ -8,8 +8,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
8
8
|
content?: string;
|
|
9
9
|
startIconName?: string;
|
|
10
10
|
endIconName?: string;
|
|
11
|
-
startIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
12
|
-
endIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
11
|
+
startIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
12
|
+
endIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
13
13
|
}>, {
|
|
14
14
|
startIconName: any;
|
|
15
15
|
endIconName: any;
|
|
@@ -32,8 +32,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
32
32
|
content?: string;
|
|
33
33
|
startIconName?: string;
|
|
34
34
|
endIconName?: string;
|
|
35
|
-
startIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
36
|
-
endIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
35
|
+
startIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
36
|
+
endIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
37
37
|
}>, {
|
|
38
38
|
startIconName: any;
|
|
39
39
|
endIconName: any;
|
|
@@ -49,15 +49,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
49
49
|
}>>>, {
|
|
50
50
|
variant: "text" | "contained" | "outlined";
|
|
51
51
|
disabled: boolean;
|
|
52
|
-
size: "small" | "medium" | "large" | "extraLarge";
|
|
53
52
|
color: "default" | "primary" | "danger" | "info" | "success" | "warning";
|
|
53
|
+
size: "small" | "medium" | "large" | "extraLarge";
|
|
54
54
|
content: string;
|
|
55
55
|
loading: boolean;
|
|
56
56
|
testId: string;
|
|
57
57
|
startIconName: string;
|
|
58
58
|
endIconName: string;
|
|
59
|
-
startIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
60
|
-
endIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
59
|
+
startIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
60
|
+
endIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
61
61
|
}>, {
|
|
62
62
|
default?(_: {}): any;
|
|
63
63
|
loader?(_: {}): any;
|
|
@@ -2,7 +2,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
2
2
|
variant?: "default" | "outlined";
|
|
3
3
|
color?: "default" | "primary" | "error";
|
|
4
4
|
size?: "small" | "medium" | "large" | "extraLarge";
|
|
5
|
-
type?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
5
|
+
type?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
6
6
|
iconName?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
testId?: string;
|
|
@@ -18,7 +18,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
18
18
|
variant?: "default" | "outlined";
|
|
19
19
|
color?: "default" | "primary" | "error";
|
|
20
20
|
size?: "small" | "medium" | "large" | "extraLarge";
|
|
21
|
-
type?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
21
|
+
type?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
22
22
|
iconName?: string;
|
|
23
23
|
disabled?: boolean;
|
|
24
24
|
testId?: string;
|
|
@@ -31,11 +31,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
31
31
|
iconName: string;
|
|
32
32
|
type: string;
|
|
33
33
|
}>>>, {
|
|
34
|
-
type: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
|
|
34
|
+
type: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
|
|
35
35
|
variant: "default" | "outlined";
|
|
36
36
|
disabled: boolean;
|
|
37
|
-
size: "small" | "medium" | "large" | "extraLarge";
|
|
38
37
|
color: "default" | "primary" | "error";
|
|
38
|
+
size: "small" | "medium" | "large" | "extraLarge";
|
|
39
39
|
testId: string;
|
|
40
40
|
iconName: string;
|
|
41
41
|
}>, {
|