@ironsource/shared-ui 2.1.3-rc.18 → 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.
@@ -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?: (option: unknown) => string;
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?: (option: unknown) => string;
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.vue_vue_type_style_index_0_scoped_e36c9442_lang.css"; //*');
4
- const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-e36c9442"]]);
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.vue_vue_type_style_index_0_scoped_e36c9442_lang.css"; import { defineComponent as c, computed as h, ref as r, watchEffect as b, openBlock as y, createBlock as V, unref as u, withCtx as f, createVNode as x, isRef as g, renderSlot as w, normalizeProps as F, guardReactiveProps as S } from "vue";
2
- import k from "../dropdown/v4/DropdownV4.vue.js";
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 z from "../input/v4/TextField.vue.js";
8
+ import F from "../input/v4/TextField.vue.js";
9
9
  import { useVModel as I } from "@vueuse/core";
10
- const K = /* @__PURE__ */ c({
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: { type: Function, default: (e) => e.toString() },
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, d = I(a, "modelValue", p), m = (l) => {
32
- l !== void 0 && (d.value = a.displayValue(l));
33
- }, n = h(
34
- () => (a.options || []).filter((l) => a.displayValue(l) !== d.value.toString()).filter((l) => a.onSearch(l, d.value.toString()))
35
- ), o = r(!1), s = r(!1);
36
- b(() => {
37
- a.disabled ? o.value = !1 : s.value && n.value.length ? o.value = !0 : n.value.length === 0 && (o.value = !1);
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 (l, t) => (y(), V(u(k), {
45
+ return (t, l) => (V(), x(s(C), {
43
46
  "is-open": o.value,
44
- "onUpdate:is-open": t[3] || (t[3] = (i) => o.value = i),
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: u(n),
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
- x(u(z), {
58
- modelValue: u(d),
59
- "onUpdate:modelValue": t[0] || (t[0] = (i) => g(d) ? d.value = i : null),
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: t[1] || (t[1] = (i) => s.value = !0),
71
- onFocusout: t[2] || (t[2] = (i) => s.value = !1),
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((i) => [
76
- w(l.$slots, "default", F(S(i)), void 0, !0)
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
- K as default
86
+ $ as default
84
87
  };
@@ -15,7 +15,6 @@ declare const AutocompleteTypes: () => ({
15
15
  placeholder: string;
16
16
  labelDirection: "top" | "inside";
17
17
  onSearch: (option: any, term: string) => boolean;
18
- displayValue: (option: unknown) => string;
19
18
  optionNameKey: string;
20
19
  optionsListWidth: string;
21
20
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
@@ -72,7 +71,7 @@ declare const AutocompleteTypes: () => ({
72
71
  };
73
72
  displayValue: {
74
73
  type: import("vue").PropType<(option: unknown) => string>;
75
- default: (option: unknown) => string;
74
+ required: true;
76
75
  };
77
76
  optionNameKey: {
78
77
  type: import("vue").PropType<string>;
@@ -84,7 +83,7 @@ declare const AutocompleteTypes: () => ({
84
83
  };
85
84
  }>> & {
86
85
  "onUpdate:modelValue"?: (value: string | number) => any;
87
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "label" | "disabled" | "size" | "mandatory" | "testId" | "hoverHelpText" | "hoverHelpTextPlacement" | "modelValue" | "placeholder" | "labelDirection" | "onSearch" | "displayValue" | "optionNameKey" | "optionsListWidth">;
86
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "label" | "disabled" | "size" | "mandatory" | "testId" | "hoverHelpText" | "hoverHelpTextPlacement" | "modelValue" | "placeholder" | "labelDirection" | "onSearch" | "optionNameKey" | "optionsListWidth">;
88
87
  $attrs: {
89
88
  [x: string]: unknown;
90
89
  };
@@ -152,7 +151,7 @@ declare const AutocompleteTypes: () => ({
152
151
  };
153
152
  displayValue: {
154
153
  type: import("vue").PropType<(option: unknown) => string>;
155
- default: (option: unknown) => string;
154
+ required: true;
156
155
  };
157
156
  optionNameKey: {
158
157
  type: import("vue").PropType<string>;
@@ -178,7 +177,6 @@ declare const AutocompleteTypes: () => ({
178
177
  placeholder: string;
179
178
  labelDirection: "top" | "inside";
180
179
  onSearch: (option: any, term: string) => boolean;
181
- displayValue: (option: unknown) => string;
182
180
  optionNameKey: string;
183
181
  optionsListWidth: string;
184
182
  }, {}, string> & {
@@ -255,7 +253,7 @@ declare const AutocompleteTypes: () => ({
255
253
  };
256
254
  displayValue: {
257
255
  type: import("vue").PropType<(option: unknown) => string>;
258
- default: (option: unknown) => string;
256
+ required: true;
259
257
  };
260
258
  optionNameKey: {
261
259
  type: import("vue").PropType<string>;
@@ -325,7 +323,7 @@ declare const AutocompleteTypes: () => ({
325
323
  };
326
324
  displayValue: {
327
325
  type: import("vue").PropType<(option: unknown) => string>;
328
- default: (option: unknown) => string;
326
+ required: true;
329
327
  };
330
328
  optionNameKey: {
331
329
  type: import("vue").PropType<string>;
@@ -351,7 +349,6 @@ declare const AutocompleteTypes: () => ({
351
349
  placeholder: string;
352
350
  labelDirection: "top" | "inside";
353
351
  onSearch: (option: any, term: string) => boolean;
354
- displayValue: (option: unknown) => string;
355
352
  optionNameKey: string;
356
353
  optionsListWidth: string;
357
354
  }, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironsource/shared-ui",
3
- "version": "2.1.3-rc.18",
3
+ "version": "2.1.3-rc.19",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -1 +0,0 @@
1
- div[data-v-e36c9442]{display:block}