@ironsource/shared-ui 2.1.11-rc.27 → 2.1.11-rc.29

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
+ .custom-list-area[data-v-4a67037a]{color:var(--text-secondary);width:100%;text-align:center;box-sizing:border-box;padding:63px 43px}.inline-search[data-v-4a67037a]{width:100%}.contain-accept[data-v-4a67037a]{padding:6px 8px;margin-bottom:4px;cursor:pointer}.contain-accept[data-v-4a67037a]:hover{background-color:var(--action-hover);border-radius:.5rem}.contain-accept--query[data-v-4a67037a]{margin-left:4px;display:inline-flex;color:var(--primary-main)}
@@ -17,6 +17,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
17
17
  searchQuery?: string;
18
18
  loadMoreFn?: () => Promise<void>;
19
19
  infiniteLoading?: boolean;
20
+ fetchDataDebounceTime?: number;
21
+ autoFocusSearch?: boolean;
20
22
  }>, {
21
23
  label: string;
22
24
  testId: string;
@@ -27,6 +29,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
27
29
  searchQuery: string;
28
30
  loadMoreFn: any;
29
31
  infiniteLoading: boolean;
32
+ fetchDataDebounceTime: number;
33
+ autoFocusSearch: boolean;
30
34
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
35
  "update:selectedCondition": (value: SelectedCondition) => void;
32
36
  "update:appliedSelections": (value: unknown) => void;
@@ -45,6 +49,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
45
49
  searchQuery?: string;
46
50
  loadMoreFn?: () => Promise<void>;
47
51
  infiniteLoading?: boolean;
52
+ fetchDataDebounceTime?: number;
53
+ autoFocusSearch?: boolean;
48
54
  }>, {
49
55
  label: string;
50
56
  testId: string;
@@ -55,6 +61,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
55
61
  searchQuery: string;
56
62
  loadMoreFn: any;
57
63
  infiniteLoading: boolean;
64
+ fetchDataDebounceTime: number;
65
+ autoFocusSearch: boolean;
58
66
  }>>> & {
59
67
  onClear?: () => any;
60
68
  "onUpdate:selectedCondition"?: (value: SelectedCondition) => any;
@@ -69,6 +77,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
69
77
  minCharsToStart: number;
70
78
  searchQuery: string;
71
79
  loadMoreFn: () => Promise<void>;
80
+ fetchDataDebounceTime: number;
81
+ autoFocusSearch: boolean;
72
82
  }>;
73
83
  export default _default;
74
84
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,7 +1,7 @@
1
1
  import o from "./ConditionalDropdown.vue2.js";
2
- /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_2aee12ad_lang.css"; //*');
4
- const d = /* @__PURE__ */ e(o, [["__scopeId", "data-v-2aee12ad"]]);
2
+ /* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_4a67037a_lang.css"; //*');
4
+ const p = /* @__PURE__ */ _(o, [["__scopeId", "data-v-4a67037a"]]);
5
5
  export {
6
- d as default
6
+ p as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_2aee12ad_lang.css"; import { defineComponent as F, computed as h, ref as r, watch as w, onMounted as E, openBlock as k, createBlock as Q, unref as s, withCtx as v, createVNode as f, mergeProps as P, createElementVNode as R, isRef as z, normalizeProps as U, guardReactiveProps as $, createElementBlock as q, createTextVNode as I, toDisplayString as j, createCommentVNode as G } from "vue";
2
- import T from "./DropdownV4.vue.js";
1
+ import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_4a67037a_lang.css"; import { defineComponent as x, computed as b, ref as u, watch as S, onMounted as E, openBlock as T, createBlock as Q, unref as s, withCtx as v, createVNode as f, mergeProps as P, createElementVNode as R, isRef as z, normalizeProps as U, guardReactiveProps as $, createElementBlock as q, createTextVNode as I, toDisplayString as j, createCommentVNode as G } from "vue";
2
+ import O from "./DropdownV4.vue.js";
3
3
  import "./DefaultDropdownTrigger.vue.js";
4
4
  import "./IconButtonDropdownTrigger.vue.js";
5
5
  import H from "./ChipDropdownTrigger.vue.js";
@@ -15,7 +15,7 @@ import { useDebounceFn as Y } from "@vueuse/core";
15
15
  const Z = { class: "conditional-container" }, _ = {
16
16
  key: 0,
17
17
  class: "custom-list-area"
18
- }, me = /* @__PURE__ */ F({
18
+ }, me = /* @__PURE__ */ x({
19
19
  __name: "ConditionalDropdown",
20
20
  props: {
21
21
  selectedCondition: null,
@@ -30,119 +30,124 @@ const Z = { class: "conditional-container" }, _ = {
30
30
  isOpen: { type: Boolean, default: !1 },
31
31
  searchQuery: { default: "" },
32
32
  loadMoreFn: { type: Function, default: null },
33
- infiniteLoading: { type: Boolean, default: !1 }
33
+ infiniteLoading: { type: Boolean, default: !1 },
34
+ fetchDataDebounceTime: { default: 400 },
35
+ autoFocusSearch: { type: Boolean, default: !0 }
34
36
  },
35
37
  emits: ["update:selectedCondition", "update:appliedSelections", "clear"],
36
- setup(c, { emit: b }) {
37
- const e = c, y = h({
38
+ setup(d, { emit: C }) {
39
+ const e = d, h = b({
38
40
  get: () => e.appliedSelections,
39
41
  set: (a) => {
40
- b("update:appliedSelections", a);
42
+ C("update:appliedSelections", a);
41
43
  }
42
- }), o = h({
44
+ }), t = b({
43
45
  get: () => e.selectedCondition || e.conditionalOptions[0],
44
46
  set: (a) => {
45
- b("update:selectedCondition", a);
47
+ C("update:selectedCondition", a);
46
48
  }
47
- }), S = r(null), p = r(!0), l = r([]), u = r([]), O = r(!0), d = r(!1), g = r(!1), t = r(e.searchQuery), N = r(""), m = r(e.label), D = h(() => (!t.value || t.value?.length < e.minCharsToStart) && !l.value.length ? `Enter at least ${e.minCharsToStart} keywords to begin` : "No results found"), M = h(() => {
49
+ }), w = u(null), p = u(!0), l = u([]), r = u([]), D = u(!0), c = u(!1), y = u(!1), o = u(e.searchQuery), k = u(""), m = u(e.label), N = b(() => (!o.value || o.value?.length < e.minCharsToStart) && !l.value.length ? `Enter at least ${e.minCharsToStart} keywords to begin` : "No results found"), F = b(() => {
48
50
  const a = p.value ? 3 : 4.5;
49
51
  return l.value.length ? null : a;
50
- }), A = async (a) => {
52
+ }), M = async (a) => {
51
53
  try {
52
- d.value = !0;
54
+ c.value = !0;
53
55
  const i = await e.fetchFnCallback(a);
54
- l.value = i, d.value = !1;
56
+ l.value = i, c.value = !1;
55
57
  } catch (i) {
56
- d.value = !1, console.error("Error fetching data:", i);
58
+ c.value = !1, console.error("Error fetching data:", i);
57
59
  }
58
- }, K = async () => {
60
+ }, A = async () => {
59
61
  if (e.infiniteLoading)
60
62
  try {
61
- g.value = !0;
63
+ y.value = !0;
62
64
  const a = await e.loadMoreFn();
63
- g.value = !1, Array.isArray(a) && (l.value = [...l.value, ...a]);
65
+ y.value = !1, Array.isArray(a) && (l.value = [...l.value, ...a]);
64
66
  } catch (a) {
65
- g.value = !1, console.error("Error fetching data:", a);
67
+ y.value = !1, console.error("Error fetching data:", a);
66
68
  }
67
- }, L = Y(A, 400), C = (a) => {
68
- a.length >= e.minCharsToStart ? (L(a), S.value.scrollTo(0)) : l.value = [];
69
- }, V = () => {
70
- t.value && l.value.length && !d.value && !o.value.multi ? l.value[0].conditionalOptions ? l.value[0] = {
71
- name: t.value,
69
+ }, B = Y(
70
+ M,
71
+ e.fetchDataDebounceTime
72
+ ), g = (a) => {
73
+ a.length >= e.minCharsToStart ? (B(a), w.value?.scrollTo(0)) : l.value = [];
74
+ }, K = () => {
75
+ o.value && l.value.length && !c.value && !t.value.multi ? l.value[0].conditionalOptions ? l.value[0] = {
76
+ name: o.value,
72
77
  conditionalOptions: !0,
73
- conditionalName: o.value.label,
74
- [e.comparingKey]: t.value
78
+ conditionalName: t.value.label,
79
+ [e.comparingKey]: o.value
75
80
  } : l.value = [
76
81
  {
77
- name: t.value,
82
+ name: o.value,
78
83
  conditionalOptions: !0,
79
- conditionalName: o.value.label,
80
- [e.comparingKey]: t.value
84
+ conditionalName: t.value.label,
85
+ [e.comparingKey]: o.value
81
86
  },
82
87
  ...l.value
83
88
  ] : l.value.length && l.value[0].conditionalOptions && l.value.shift();
84
89
  };
85
- w(t, () => {
86
- C(t.value);
87
- }), w([o, l], () => {
88
- V();
90
+ e.fetchDataDebounceTime === 0 && g(o.value), S(o, () => {
91
+ g(o.value);
92
+ }), S([t, l], () => {
93
+ K();
89
94
  });
90
- const x = () => {
91
- p.value && u.value.length === 0 ? (o.value = null, y.value = [], o.value = null, m.value = e.label) : (N.value = t.value, m.value = `${e.label} ${o.value.label.toLowerCase()}`, y.value = p.value ? [...u.value] : { ...u.value }, O.value = p.value);
95
+ const L = () => {
96
+ p.value && r.value.length === 0 ? (t.value = null, h.value = [], t.value = null, m.value = e.label) : (k.value = o.value, m.value = `${e.label} ${t.value.label.toLowerCase()}`, h.value = p.value ? [...r.value] : { ...r.value }, D.value = p.value);
92
97
  };
93
- w(o, () => {
94
- o.value.multi ? (d.value = !0, u.value = [], setTimeout(() => {
95
- d.value = !1, p.value = !0;
98
+ S(t, () => {
99
+ t.value.multi ? (c.value = !0, r.value = [], setTimeout(() => {
100
+ c.value = !1, p.value = !0;
96
101
  }, 100)) : setTimeout(() => {
97
102
  p.value = !1;
98
103
  }, 100);
99
104
  });
100
- const B = () => {
101
- u.value = [], y.value = [], o.value = null, m.value = e.label, t.value = "", b("clear");
105
+ const V = () => {
106
+ r.value = [], h.value = [], t.value = null, m.value = e.label, o.value = "", C("clear");
102
107
  };
103
108
  return E(() => {
104
- e.searchQuery && C(e.searchQuery);
105
- }), (a, i) => (k(), Q(s(T), {
109
+ e.searchQuery && g(e.searchQuery);
110
+ }), (a, i) => (T(), Q(s(O), {
106
111
  ref_key: "dropdownRef",
107
- ref: S,
108
- selected: u.value,
109
- "onUpdate:selected": i[2] || (i[2] = (n) => u.value = n),
112
+ ref: w,
113
+ selected: r.value,
114
+ "onUpdate:selected": i[2] || (i[2] = (n) => r.value = n),
110
115
  "predefined-trigger": "chip",
111
- "display-value": (n) => n?.[c.optionNameKey],
116
+ "display-value": (n) => n?.[d.optionNameKey],
112
117
  multi: p.value,
113
118
  options: l.value,
114
119
  placeholder: m.value,
115
120
  "search-placeholder": "Search",
116
- "option-name-key": c.optionNameKey,
121
+ "option-name-key": d.optionNameKey,
117
122
  "with-conditions": "",
118
123
  "inline-search": "",
119
- "custom-number-of-displayed-options": s(M),
124
+ "custom-number-of-displayed-options": s(F),
120
125
  "options-list-width": "330px",
121
- loading: d.value,
122
- "load-more-loading": g.value,
123
- "comparing-key": c.comparingKey,
124
- "is-open": c.isOpen,
125
- "infinite-loading": c.infiniteLoading,
126
- onOnsearch: C,
127
- onApply: x,
128
- onLoadMore: K
126
+ loading: c.value,
127
+ "load-more-loading": y.value,
128
+ "comparing-key": d.comparingKey,
129
+ "is-open": d.isOpen,
130
+ "infinite-loading": d.infiniteLoading,
131
+ onOnsearch: g,
132
+ onApply: L,
133
+ onLoadMore: A
129
134
  }, {
130
135
  "dropdown-trigger": v(({ defaultTriggerProps: n }) => [
131
136
  f(s(H), P(n, {
132
137
  label: m.value,
133
- "selected-option": s(y),
134
- multi: O.value,
138
+ "selected-option": s(h),
139
+ multi: D.value,
135
140
  "cancel-all-selected-display": "",
136
- "display-value-in-quotes": !Array.isArray(u.value) && u.value.conditionalOptions,
137
- onClear: B
141
+ "display-value-in-quotes": !Array.isArray(r.value) && r.value.conditionalOptions,
142
+ onClear: V
138
143
  }), null, 16, ["label", "selected-option", "multi", "display-value-in-quotes"])
139
144
  ]),
140
145
  "dropdown-conditions": v(() => [
141
146
  R("div", Z, [
142
- f(s(T), {
143
- selected: s(o),
144
- "onUpdate:selected": i[0] || (i[0] = (n) => z(o) ? o.value = n : null),
145
- options: c.conditionalOptions,
147
+ f(s(O), {
148
+ selected: s(t),
149
+ "onUpdate:selected": i[0] || (i[0] = (n) => z(t) ? t.value = n : null),
150
+ options: d.conditionalOptions,
146
151
  "option-name-key": "label",
147
152
  "display-value": (n) => n?.label,
148
153
  container: ".conditional-container",
@@ -157,20 +162,20 @@ const Z = { class: "conditional-container" }, _ = {
157
162
  ]),
158
163
  "inline-search": v(() => [
159
164
  f(s(W), {
160
- modelValue: t.value,
161
- "onUpdate:modelValue": i[1] || (i[1] = (n) => t.value = n),
165
+ modelValue: o.value,
166
+ "onUpdate:modelValue": i[1] || (i[1] = (n) => o.value = n),
162
167
  class: "inline-search",
163
168
  placeholder: "Search",
164
169
  variant: "transparent",
165
170
  size: "md",
166
- "auto-focus": ""
167
- }, null, 8, ["modelValue"])
171
+ "auto-focus": d.autoFocusSearch
172
+ }, null, 8, ["modelValue", "auto-focus"])
168
173
  ]),
169
174
  "custom-list-area": v(() => [
170
- !l.value.length && !d.value ? (k(), q("div", _, [
175
+ !l.value.length && !c.value ? (T(), q("div", _, [
171
176
  f(X, { variant: "body1" }, {
172
177
  default: v(() => [
173
- I(j(s(D)), 1)
178
+ I(j(s(N)), 1)
174
179
  ]),
175
180
  _: 1
176
181
  })
@@ -3617,6 +3617,14 @@ declare const DropdownTypes: () => (({
3617
3617
  type: import("vue").PropType<() => Promise<void>>;
3618
3618
  default: any;
3619
3619
  };
3620
+ fetchDataDebounceTime: {
3621
+ type: import("vue").PropType<number>;
3622
+ default: number;
3623
+ };
3624
+ autoFocusSearch: {
3625
+ type: import("vue").PropType<boolean>;
3626
+ default: boolean;
3627
+ };
3620
3628
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3621
3629
  "update:selectedCondition": (value: {
3622
3630
  label: string;
@@ -3689,6 +3697,14 @@ declare const DropdownTypes: () => (({
3689
3697
  type: import("vue").PropType<() => Promise<void>>;
3690
3698
  default: any;
3691
3699
  };
3700
+ fetchDataDebounceTime: {
3701
+ type: import("vue").PropType<number>;
3702
+ default: number;
3703
+ };
3704
+ autoFocusSearch: {
3705
+ type: import("vue").PropType<boolean>;
3706
+ default: boolean;
3707
+ };
3692
3708
  }>> & {
3693
3709
  onClear?: () => any;
3694
3710
  "onUpdate:selectedCondition"?: (value: {
@@ -3707,5 +3723,7 @@ declare const DropdownTypes: () => (({
3707
3723
  minCharsToStart: number;
3708
3724
  searchQuery: string;
3709
3725
  loadMoreFn: () => Promise<void>;
3726
+ fetchDataDebounceTime: number;
3727
+ autoFocusSearch: boolean;
3710
3728
  }>)[];
3711
3729
  export { Dropdown, DefaultDropdownTrigger, IconButtonDropdownTrigger, ChipDropdownTrigger, ButtonDropdownTrigger, ButtonFilterDropdownTrigger, AppDropdownTrigger, DropdownTypes, Option, TreeDropdown, ConditionalDropdown, };
package/index.d.ts CHANGED
@@ -22414,6 +22414,14 @@ declare const _default: {
22414
22414
  type: import("vue").PropType<() => Promise<void>>;
22415
22415
  default: any;
22416
22416
  };
22417
+ fetchDataDebounceTime: {
22418
+ type: import("vue").PropType<number>;
22419
+ default: number;
22420
+ };
22421
+ autoFocusSearch: {
22422
+ type: import("vue").PropType<boolean>;
22423
+ default: boolean;
22424
+ };
22417
22425
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22418
22426
  "update:selectedCondition": (value: {
22419
22427
  label: string;
@@ -22486,6 +22494,14 @@ declare const _default: {
22486
22494
  type: import("vue").PropType<() => Promise<void>>;
22487
22495
  default: any;
22488
22496
  };
22497
+ fetchDataDebounceTime: {
22498
+ type: import("vue").PropType<number>;
22499
+ default: number;
22500
+ };
22501
+ autoFocusSearch: {
22502
+ type: import("vue").PropType<boolean>;
22503
+ default: boolean;
22504
+ };
22489
22505
  }>> & {
22490
22506
  onClear?: () => any;
22491
22507
  "onUpdate:selectedCondition"?: (value: {
@@ -22504,6 +22520,8 @@ declare const _default: {
22504
22520
  minCharsToStart: number;
22505
22521
  searchQuery: string;
22506
22522
  loadMoreFn: () => Promise<void>;
22523
+ fetchDataDebounceTime: number;
22524
+ autoFocusSearch: boolean;
22507
22525
  }>)[];
22508
22526
  Option: {
22509
22527
  new (...args: any[]): {
@@ -23518,6 +23536,14 @@ declare const _default: {
23518
23536
  type: import("vue").PropType<() => Promise<void>>;
23519
23537
  default: any;
23520
23538
  };
23539
+ fetchDataDebounceTime: {
23540
+ type: import("vue").PropType<number>;
23541
+ default: number;
23542
+ };
23543
+ autoFocusSearch: {
23544
+ type: import("vue").PropType<boolean>;
23545
+ default: boolean;
23546
+ };
23521
23547
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23522
23548
  "update:selectedCondition": (value: {
23523
23549
  label: string;
@@ -23590,6 +23616,14 @@ declare const _default: {
23590
23616
  type: import("vue").PropType<() => Promise<void>>;
23591
23617
  default: any;
23592
23618
  };
23619
+ fetchDataDebounceTime: {
23620
+ type: import("vue").PropType<number>;
23621
+ default: number;
23622
+ };
23623
+ autoFocusSearch: {
23624
+ type: import("vue").PropType<boolean>;
23625
+ default: boolean;
23626
+ };
23593
23627
  }>> & {
23594
23628
  onClear?: () => any;
23595
23629
  "onUpdate:selectedCondition"?: (value: {
@@ -23608,6 +23642,8 @@ declare const _default: {
23608
23642
  minCharsToStart: number;
23609
23643
  searchQuery: string;
23610
23644
  loadMoreFn: () => Promise<void>;
23645
+ fetchDataDebounceTime: number;
23646
+ autoFocusSearch: boolean;
23611
23647
  }>;
23612
23648
  Label: {
23613
23649
  new (...args: any[]): {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_bd6145ce_lang.css';
1
+ import './IncludeExcludeOptionDraggable.vue_vue_type_style_index_0_scoped_a91fcaa5_lang.css';
2
2
  import { AppTriggerTypes as ro } from "./components/appTrigger/index.js";
3
3
  import { AutocompleteDropdownTypes as mo } from "./components/autocompleteDropdown/index.js";
4
4
  import { MenuItemTypes as po } from "./components/menuItem/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironsource/shared-ui",
3
- "version": "2.1.11-rc.27",
3
+ "version": "2.1.11-rc.29",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -1 +0,0 @@
1
- .custom-list-area[data-v-2aee12ad]{color:var(--text-secondary);width:100%;text-align:center;box-sizing:border-box;padding:63px 43px}.inline-search[data-v-2aee12ad]{width:100%}.contain-accept[data-v-2aee12ad]{padding:6px 8px;margin-bottom:4px;cursor:pointer}.contain-accept[data-v-2aee12ad]:hover{background-color:var(--action-hover);border-radius:.5rem}.contain-accept--query[data-v-2aee12ad]{margin-left:4px;display:inline-flex;color:var(--primary-main)}