@ironsource/shared-ui 2.1.3-rc.17 → 2.1.3-rc.19
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/Autocomplete.vue_vue_type_style_index_0_scoped_c7af6b8e_lang.css +1 -0
- package/components/autocomplete/Autocomplete.vue.d.ts +2 -5
- package/components/autocomplete/Autocomplete.vue.js +2 -2
- package/components/autocomplete/Autocomplete.vue2.js +26 -23
- package/components/autocomplete/index.d.ts +7 -10
- package/package.json +1 -1
- package/Autocomplete.vue_vue_type_style_index_0_scoped_e36c9442_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
div[data-v-c7af6b8e]{display:block}
|
|
@@ -12,7 +12,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
12
12
|
id: string;
|
|
13
13
|
text: string;
|
|
14
14
|
}[];
|
|
15
|
-
displayValue
|
|
15
|
+
displayValue: (option: unknown) => string;
|
|
16
16
|
optionNameKey?: string;
|
|
17
17
|
optionsListWidth?: string;
|
|
18
18
|
onSearch?: (option: any, term: string) => boolean;
|
|
@@ -27,7 +27,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
27
27
|
mandatory: boolean;
|
|
28
28
|
hoverHelpText: string;
|
|
29
29
|
hoverHelpTextPlacement: string;
|
|
30
|
-
displayValue: (option: unknown) => string;
|
|
31
30
|
onSearch: any;
|
|
32
31
|
optionNameKey: string;
|
|
33
32
|
optionsListWidth: any;
|
|
@@ -48,7 +47,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
48
47
|
id: string;
|
|
49
48
|
text: string;
|
|
50
49
|
}[];
|
|
51
|
-
displayValue
|
|
50
|
+
displayValue: (option: unknown) => string;
|
|
52
51
|
optionNameKey?: string;
|
|
53
52
|
optionsListWidth?: string;
|
|
54
53
|
onSearch?: (option: any, term: string) => boolean;
|
|
@@ -63,7 +62,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
63
62
|
mandatory: boolean;
|
|
64
63
|
hoverHelpText: string;
|
|
65
64
|
hoverHelpTextPlacement: string;
|
|
66
|
-
displayValue: (option: unknown) => string;
|
|
67
65
|
onSearch: any;
|
|
68
66
|
optionNameKey: string;
|
|
69
67
|
optionsListWidth: any;
|
|
@@ -82,7 +80,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
82
80
|
placeholder: string;
|
|
83
81
|
labelDirection: "top" | "inside";
|
|
84
82
|
onSearch: (option: any, term: string) => boolean;
|
|
85
|
-
displayValue: (option: unknown) => string;
|
|
86
83
|
optionNameKey: string;
|
|
87
84
|
optionsListWidth: string;
|
|
88
85
|
}>, {
|
|
@@ -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 p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../Autocomplete.vue_vue_type_style_index_0_scoped_c7af6b8e_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-c7af6b8e"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../../Autocomplete.
|
|
2
|
-
import
|
|
1
|
+
import "../../Autocomplete.vue_vue_type_style_index_0_scoped_c7af6b8e_lang.css"; import { defineComponent as h, computed as b, ref as r, watchEffect as y, openBlock as V, createBlock as x, unref as s, withCtx as f, createVNode as w, isRef as g, renderSlot as S, normalizeProps as k, guardReactiveProps as z } 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/OptionV4.vue.js";
|
|
8
|
-
import
|
|
8
|
+
import F from "../input/v4/TextField.vue.js";
|
|
9
9
|
import { useVModel as I } from "@vueuse/core";
|
|
10
|
-
const
|
|
10
|
+
const $ = /* @__PURE__ */ h({
|
|
11
11
|
__name: "Autocomplete",
|
|
12
12
|
props: {
|
|
13
13
|
modelValue: { default: "" },
|
|
@@ -20,7 +20,7 @@ const K = /* @__PURE__ */ c({
|
|
|
20
20
|
hoverHelpText: { default: "" },
|
|
21
21
|
hoverHelpTextPlacement: { default: "top" },
|
|
22
22
|
options: null,
|
|
23
|
-
displayValue:
|
|
23
|
+
displayValue: null,
|
|
24
24
|
optionNameKey: { default: "" },
|
|
25
25
|
optionsListWidth: { default: null },
|
|
26
26
|
onSearch: { type: Function, default: null },
|
|
@@ -28,23 +28,26 @@ const K = /* @__PURE__ */ c({
|
|
|
28
28
|
},
|
|
29
29
|
emits: ["update:modelValue"],
|
|
30
30
|
setup(e, { emit: p }) {
|
|
31
|
-
const a = e,
|
|
32
|
-
|
|
33
|
-
}, n =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
const a = e, i = I(a, "modelValue", p), m = (t) => {
|
|
32
|
+
t !== void 0 && (i.value = a.displayValue(t));
|
|
33
|
+
}, c = (t, l) => a.displayValue(t).toLowerCase().replace(/\s+/g, "").includes(l.toLowerCase().replace(/\s+/g, "")), n = b(() => {
|
|
34
|
+
const t = i.value.toString();
|
|
35
|
+
return (a.options || []).filter((l) => a.displayValue(l) !== t).filter(
|
|
36
|
+
(l) => a.onSearch !== null ? a.onSearch(l, t) : c(l, t)
|
|
37
|
+
);
|
|
38
|
+
}), o = r(!1), u = r(!1);
|
|
39
|
+
y(() => {
|
|
40
|
+
a.disabled ? o.value = !1 : u.value && n.value.length ? o.value = !0 : n.value.length === 0 && (o.value = !1);
|
|
38
41
|
});
|
|
39
42
|
const v = () => {
|
|
40
43
|
a.disabled || !o.value && n.value.length && (o.value = !0);
|
|
41
44
|
};
|
|
42
|
-
return (
|
|
45
|
+
return (t, l) => (V(), x(s(C), {
|
|
43
46
|
"is-open": o.value,
|
|
44
|
-
"onUpdate:is-open":
|
|
47
|
+
"onUpdate:is-open": l[3] || (l[3] = (d) => o.value = d),
|
|
45
48
|
class: "autocomplete-dropdown",
|
|
46
49
|
"display-value": e.displayValue,
|
|
47
|
-
options:
|
|
50
|
+
options: s(n),
|
|
48
51
|
"option-name-key": e.optionNameKey,
|
|
49
52
|
"options-list-width": e.optionsListWidth,
|
|
50
53
|
disabled: e.disabled,
|
|
@@ -54,9 +57,9 @@ const K = /* @__PURE__ */ c({
|
|
|
54
57
|
"onUpdate:selected": m
|
|
55
58
|
}, {
|
|
56
59
|
"dropdown-trigger": f(() => [
|
|
57
|
-
|
|
58
|
-
modelValue:
|
|
59
|
-
"onUpdate:modelValue":
|
|
60
|
+
w(s(F), {
|
|
61
|
+
modelValue: s(i),
|
|
62
|
+
"onUpdate:modelValue": l[0] || (l[0] = (d) => g(i) ? i.value = d : null),
|
|
60
63
|
class: "autocomplete-field",
|
|
61
64
|
placeholder: e.placeholder,
|
|
62
65
|
disabled: e.disabled,
|
|
@@ -67,18 +70,18 @@ const K = /* @__PURE__ */ c({
|
|
|
67
70
|
"hover-help-text": e.hoverHelpText,
|
|
68
71
|
"hover-help-text-placemen": e.hoverHelpTextPlacement,
|
|
69
72
|
"test-id": e.testId,
|
|
70
|
-
onFocusin:
|
|
71
|
-
onFocusout:
|
|
73
|
+
onFocusin: l[1] || (l[1] = (d) => u.value = !0),
|
|
74
|
+
onFocusout: l[2] || (l[2] = (d) => u.value = !1),
|
|
72
75
|
onClick: v
|
|
73
76
|
}, null, 8, ["modelValue", "placeholder", "disabled", "size", "label", "label-direction", "mandatory", "hover-help-text", "hover-help-text-placemen", "test-id"])
|
|
74
77
|
]),
|
|
75
|
-
default: f((
|
|
76
|
-
|
|
78
|
+
default: f((d) => [
|
|
79
|
+
S(t.$slots, "default", k(z(d)), void 0, !0)
|
|
77
80
|
]),
|
|
78
81
|
_: 3
|
|
79
82
|
}, 8, ["is-open", "display-value", "options", "option-name-key", "options-list-width", "disabled", "test-id"]));
|
|
80
83
|
}
|
|
81
84
|
});
|
|
82
85
|
export {
|
|
83
|
-
|
|
86
|
+
$ as default
|
|
84
87
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Autocomplete from './Autocomplete.vue';
|
|
1
2
|
declare const AutocompleteTypes: () => ({
|
|
2
3
|
new (...args: any[]): {
|
|
3
4
|
$: import("vue").ComponentInternalInstance;
|
|
@@ -14,7 +15,6 @@ declare const AutocompleteTypes: () => ({
|
|
|
14
15
|
placeholder: string;
|
|
15
16
|
labelDirection: "top" | "inside";
|
|
16
17
|
onSearch: (option: any, term: string) => boolean;
|
|
17
|
-
displayValue: (option: unknown) => string;
|
|
18
18
|
optionNameKey: string;
|
|
19
19
|
optionsListWidth: string;
|
|
20
20
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -71,7 +71,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
71
71
|
};
|
|
72
72
|
displayValue: {
|
|
73
73
|
type: import("vue").PropType<(option: unknown) => string>;
|
|
74
|
-
|
|
74
|
+
required: true;
|
|
75
75
|
};
|
|
76
76
|
optionNameKey: {
|
|
77
77
|
type: import("vue").PropType<string>;
|
|
@@ -83,7 +83,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
83
83
|
};
|
|
84
84
|
}>> & {
|
|
85
85
|
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
86
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "label" | "disabled" | "size" | "mandatory" | "testId" | "hoverHelpText" | "hoverHelpTextPlacement" | "modelValue" | "placeholder" | "labelDirection" | "onSearch" | "
|
|
86
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "label" | "disabled" | "size" | "mandatory" | "testId" | "hoverHelpText" | "hoverHelpTextPlacement" | "modelValue" | "placeholder" | "labelDirection" | "onSearch" | "optionNameKey" | "optionsListWidth">;
|
|
87
87
|
$attrs: {
|
|
88
88
|
[x: string]: unknown;
|
|
89
89
|
};
|
|
@@ -151,7 +151,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
151
151
|
};
|
|
152
152
|
displayValue: {
|
|
153
153
|
type: import("vue").PropType<(option: unknown) => string>;
|
|
154
|
-
|
|
154
|
+
required: true;
|
|
155
155
|
};
|
|
156
156
|
optionNameKey: {
|
|
157
157
|
type: import("vue").PropType<string>;
|
|
@@ -177,7 +177,6 @@ declare const AutocompleteTypes: () => ({
|
|
|
177
177
|
placeholder: string;
|
|
178
178
|
labelDirection: "top" | "inside";
|
|
179
179
|
onSearch: (option: any, term: string) => boolean;
|
|
180
|
-
displayValue: (option: unknown) => string;
|
|
181
180
|
optionNameKey: string;
|
|
182
181
|
optionsListWidth: string;
|
|
183
182
|
}, {}, string> & {
|
|
@@ -254,7 +253,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
254
253
|
};
|
|
255
254
|
displayValue: {
|
|
256
255
|
type: import("vue").PropType<(option: unknown) => string>;
|
|
257
|
-
|
|
256
|
+
required: true;
|
|
258
257
|
};
|
|
259
258
|
optionNameKey: {
|
|
260
259
|
type: import("vue").PropType<string>;
|
|
@@ -324,7 +323,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
324
323
|
};
|
|
325
324
|
displayValue: {
|
|
326
325
|
type: import("vue").PropType<(option: unknown) => string>;
|
|
327
|
-
|
|
326
|
+
required: true;
|
|
328
327
|
};
|
|
329
328
|
optionNameKey: {
|
|
330
329
|
type: import("vue").PropType<string>;
|
|
@@ -350,7 +349,6 @@ declare const AutocompleteTypes: () => ({
|
|
|
350
349
|
placeholder: string;
|
|
351
350
|
labelDirection: "top" | "inside";
|
|
352
351
|
onSearch: (option: any, term: string) => boolean;
|
|
353
|
-
displayValue: (option: unknown) => string;
|
|
354
352
|
optionNameKey: string;
|
|
355
353
|
optionsListWidth: string;
|
|
356
354
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
@@ -363,5 +361,4 @@ declare const AutocompleteTypes: () => ({
|
|
|
363
361
|
}): any;
|
|
364
362
|
};
|
|
365
363
|
}))[];
|
|
366
|
-
export {
|
|
367
|
-
export { AutocompleteTypes };
|
|
364
|
+
export { Autocomplete, AutocompleteTypes };
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
div[data-v-e36c9442]{display:block}
|