@ironsource/shared-ui 2.1.11-test.92 → 2.1.11-test.98

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-07fe5cf8]{color:var(--text-secondary);width:100%;text-align:center;box-sizing:border-box;padding:63px 43px}.inline-search[data-v-07fe5cf8]{width:100%}.contain-accept[data-v-07fe5cf8]{padding:6px 8px;margin-bottom:4px;cursor:pointer}.contain-accept[data-v-07fe5cf8]:hover{background-color:var(--action-hover);border-radius:.5rem}.contain-accept--query[data-v-07fe5cf8]{margin-left:4px;display:inline-flex;color:var(--primary-main)}
@@ -25,6 +25,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
25
25
  optionIconKey?: string;
26
26
  optionImageKey?: string;
27
27
  optionIconType?: IconTypes;
28
+ loadingOverride?: boolean;
28
29
  }>, {
29
30
  label: string;
30
31
  testId: string;
@@ -42,6 +43,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
42
43
  optionIconKey: string;
43
44
  optionImageKey: string;
44
45
  optionIconType: any;
46
+ loadingOverride: boolean;
45
47
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
46
48
  "update:selectedCondition": (value: SelectedCondition) => void;
47
49
  "update:appliedSelections": (value: unknown) => void;
@@ -68,6 +70,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
68
70
  optionIconKey?: string;
69
71
  optionImageKey?: string;
70
72
  optionIconType?: IconTypes;
73
+ loadingOverride?: boolean;
71
74
  }>, {
72
75
  label: string;
73
76
  testId: string;
@@ -85,6 +88,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
85
88
  optionIconKey: string;
86
89
  optionImageKey: string;
87
90
  optionIconType: any;
91
+ loadingOverride: boolean;
88
92
  }>>> & {
89
93
  onClear?: () => any;
90
94
  onClosed?: () => any;
@@ -107,6 +111,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
107
111
  loadMoreFn: () => Promise<any[]>;
108
112
  fetchDataDebounceTime: number;
109
113
  autoFocusSearch: boolean;
114
+ loadingOverride: boolean;
110
115
  }>;
111
116
  export default _default;
112
117
  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 _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_2ba23450_lang.css"; //*');
4
- const n = /* @__PURE__ */ _(o, [["__scopeId", "data-v-2ba23450"]]);
2
+ /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_07fe5cf8_lang.css"; //*');
4
+ const n = /* @__PURE__ */ e(o, [["__scopeId", "data-v-07fe5cf8"]]);
5
5
  export {
6
6
  n as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_2ba23450_lang.css"; import { defineComponent as j, computed as k, ref as s, watch as O, onMounted as W, openBlock as D, createBlock as q, unref as d, withCtx as f, createVNode as g, mergeProps as G, createElementVNode as H, isRef as J, normalizeProps as X, guardReactiveProps as Y, createElementBlock as Z, createTextVNode as _, toDisplayString as ee, createCommentVNode as le } from "vue";
1
+ import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_07fe5cf8_lang.css"; import { defineComponent as j, computed as O, ref as s, watch as k, onMounted as W, openBlock as L, createBlock as q, unref as d, withCtx as f, createVNode as y, mergeProps as G, createElementVNode as H, isRef as J, normalizeProps as X, guardReactiveProps as Y, createElementBlock as Z, createTextVNode as _, toDisplayString as ee, createCommentVNode as le } from "vue";
2
2
  import N from "./DropdownV4.vue.js";
3
3
  import "./DefaultDropdownTrigger.vue.js";
4
4
  import "./IconButtonDropdownTrigger.vue.js";
@@ -37,49 +37,50 @@ const ue = { class: "conditional-container" }, re = {
37
37
  optionFlagKey: { default: "" },
38
38
  optionIconKey: { default: "" },
39
39
  optionImageKey: { default: "" },
40
- optionIconType: { default: null }
40
+ optionIconType: { default: null },
41
+ loadingOverride: { type: Boolean, default: !1 }
41
42
  },
42
43
  emits: ["update:selectedCondition", "update:appliedSelections", "clear", "closed"],
43
- setup(r, { emit: h }) {
44
- const e = r, S = k({
44
+ setup(u, { emit: h }) {
45
+ const e = u, S = O({
45
46
  get: () => e.appliedSelections,
46
47
  set: (l) => {
47
48
  h("update:appliedSelections", l);
48
49
  }
49
- }), n = k({
50
+ }), n = O({
50
51
  get: () => e.selectedCondition || e.conditionalOptions[0],
51
52
  set: (l) => {
52
53
  h("update:selectedCondition", l);
53
54
  }
54
- }), w = s(null), c = s(!0), a = s([]), u = s(
55
- Array.isArray(e.appliedSelections) ? e.appliedSelections : [e.appliedSelections]
56
- ), K = s(!0), p = s(!1), b = s(!1), i = s(e.searchQuery), L = s(""), m = s(e.label), T = s([]), F = k(() => (!i.value || i.value?.length < e.minCharsToStart) && !a.value.length ? `Enter at least ${e.minCharsToStart} keywords to begin` : "No results found"), U = k(() => {
55
+ }), w = s(null), c = s(!0), a = s([]), r = s(
56
+ Array.isArray(e.appliedSelections) ? e.appliedSelections : e.appliedSelections ? [e.appliedSelections] : []
57
+ ), K = s(!0), p = s(!1), C = s(!1), i = s(e.searchQuery), F = s(""), m = s(e.label), T = s([]), B = O(() => (!i.value || i.value?.length < e.minCharsToStart) && !a.value.length ? `Enter at least ${e.minCharsToStart} keywords to begin` : "No results found"), U = O(() => {
57
58
  const l = c.value ? 4 : 4.5, t = a.value.length > 4 ? a.value.length : l;
58
59
  if (e.groupedOptions) {
59
60
  let o = 0;
60
- return a.value.forEach((y) => {
61
- y.options && (o = o + y.options.length);
61
+ return a.value.forEach((g) => {
62
+ g.options && (o = o + g.options.length);
62
63
  }), o > 4 ? o : l;
63
64
  }
64
65
  return t > l ? t : l;
65
- }), B = (l, t) => {
66
- if (e.infiniteLoading && n.value.multi && Array.isArray(u.value) && u.value.length && l && t.length) {
67
- const o = [], y = u.value.filter(
66
+ }), I = (l, t) => {
67
+ if (e.infiniteLoading && n.value.multi && Array.isArray(r.value) && r.value.length && l && t.length) {
68
+ const o = [], g = r.value.filter(
68
69
  (v) => v[e.optionNameKey].includes(l)
69
70
  );
70
71
  return t.forEach((v) => {
71
- y.find(
72
+ g.find(
72
73
  ($) => $[e.comparingKey] === v[e.comparingKey]
73
74
  ) && o.push(v[e.comparingKey]);
74
- }), y.filter(
75
+ }), g.filter(
75
76
  (v) => !o.includes(v[e.comparingKey])
76
77
  );
77
78
  }
78
79
  return [];
79
- }, I = async (l) => {
80
+ }, A = async (l) => {
80
81
  try {
81
82
  p.value = !0;
82
- const t = await e.fetchFnCallback(l), o = B(
83
+ const t = await e.fetchFnCallback(l), o = I(
83
84
  l,
84
85
  t
85
86
  );
@@ -90,16 +91,16 @@ const ue = { class: "conditional-container" }, re = {
90
91
  }, M = async () => {
91
92
  if (e.infiniteLoading)
92
93
  try {
93
- b.value = !0;
94
+ C.value = !0;
94
95
  const l = await e.loadMoreFn();
95
- b.value = !1, Array.isArray(l) && (a.value = [...a.value, ...l]);
96
+ C.value = !1, Array.isArray(l) && (a.value = [...a.value, ...l]);
96
97
  } catch (l) {
97
- b.value = !1, console.error("Error fetching data:", l);
98
+ C.value = !1, console.error("Error fetching data:", l);
98
99
  }
99
100
  }, E = ie(
100
- I,
101
+ A,
101
102
  e.fetchDataDebounceTime
102
- ), C = (l) => {
103
+ ), b = (l) => {
103
104
  l.length >= e.minCharsToStart ? (E(l), w.value?.scrollTo(0)) : e.infiniteLoading && n.value.multi ? a.value = T.value || [] : a.value = [];
104
105
  }, V = () => {
105
106
  i.value && a.value.length && !p.value && !n.value.multi ? a.value[0].conditionalOptions ? a.value[0] = {
@@ -116,115 +117,120 @@ const ue = { class: "conditional-container" }, re = {
116
117
  },
117
118
  ...a.value
118
119
  ] : a.value.length && a.value[0].conditionalOptions && a.value.shift();
119
- }, A = () => {
120
- c.value && u.value.length === 0 ? m.value = e.label : m.value = `${e.label} ${n.value.label.toLowerCase()}`;
120
+ }, D = () => {
121
+ c.value && r.value.length === 0 ? m.value = e.label : m.value = `${e.label} ${n.value.label.toLowerCase()}`;
121
122
  };
122
- O(i, () => {
123
- C(i.value);
124
- }), O([n, a], () => {
123
+ k(i, () => {
124
+ b(i.value);
125
+ }), k([n, a], () => {
125
126
  V();
126
- });
127
+ }), k(
128
+ () => e.loadingOverride,
129
+ (l, t) => {
130
+ !l && t && !e.infiniteLoading && A(e.searchQuery);
131
+ }
132
+ );
127
133
  const x = () => {
128
- c.value && u.value.length === 0 ? (n.value = null, S.value = [], n.value = null) : (L.value = i.value, S.value = c.value ? [...u.value] : { ...u.value }, K.value = c.value), A();
134
+ c.value && r.value.length === 0 ? (n.value = null, S.value = [], n.value = null) : (F.value = i.value, S.value = c.value ? [...r.value] : { ...r.value }, K.value = c.value), D();
129
135
  };
130
- O(n, (l, t) => {
131
- n.value.multi ? (p.value = !0, !t.multi && l.multi && Array.isArray(e.appliedSelections) && (u.value = e.appliedSelections), setTimeout(() => {
136
+ k(n, (l, t) => {
137
+ n.value.multi ? (p.value = !0, !t.multi && l.multi && Array.isArray(e.appliedSelections) && (r.value = e.appliedSelections), setTimeout(() => {
132
138
  p.value = !1, c.value = !0;
133
139
  }, 100)) : setTimeout(() => {
134
140
  c.value = !1;
135
141
  }, 100);
136
142
  });
137
- const P = (l) => {
143
+ const Q = (l) => {
138
144
  T.value = l;
139
- }, Q = () => {
140
- u.value = [], S.value = [], n.value = null, m.value = e.label, i.value = "", h("clear");
145
+ }, P = () => {
146
+ r.value = [], S.value = [], n.value = null, m.value = e.label, i.value = "", h("clear");
141
147
  }, R = (l) => {
142
- l && n.value.multi && e.infiniteLoading && u.value && (a.value = u.value, i.value && C(i.value));
148
+ l && n.value.multi && e.infiniteLoading && r.value && (a.value = r.value, i.value && b(i.value));
143
149
  };
144
150
  W(() => {
145
- (e.searchQuery || !e.infiniteLoading) && C(e.searchQuery), A();
151
+ (e.searchQuery || !e.infiniteLoading || e.minCharsToStart === 0) && b(e.searchQuery), D();
146
152
  });
147
153
  const z = () => {
148
154
  h("closed");
149
155
  };
150
- return (l, t) => (D(), q(d(N), {
156
+ return (l, t) => (L(), q(d(N), {
151
157
  ref_key: "dropdownRef",
152
158
  ref: w,
153
- selected: u.value,
154
- "onUpdate:selected": t[2] || (t[2] = (o) => u.value = o),
159
+ selected: r.value,
160
+ "onUpdate:selected": t[2] || (t[2] = (o) => r.value = o),
155
161
  "predefined-trigger": "chip",
156
- "display-value": (o) => o?.[r.optionNameKey],
162
+ "display-value": (o) => o?.[u.optionNameKey],
157
163
  multi: c.value,
158
164
  options: a.value,
159
165
  placeholder: m.value,
160
166
  "search-placeholder": "Search",
161
- "option-name-key": r.optionNameKey,
167
+ "option-name-key": u.optionNameKey,
162
168
  "with-conditions": "",
163
169
  "inline-search": "",
164
170
  "custom-number-of-displayed-options": d(U),
165
171
  "options-list-width": "330px",
166
- loading: p.value,
167
- "load-more-loading": b.value,
168
- "comparing-key": r.comparingKey,
169
- "is-open": r.isOpen,
170
- "infinite-loading": r.infiniteLoading,
171
- "show-select-all": !r.infiniteLoading && !i.value,
172
- "grouped-options": r.groupedOptions,
173
- "option-flag-key": r.optionFlagKey,
174
- "option-image-key": r.optionImageKey,
175
- "option-icon-key": r.optionIconKey,
176
- "option-icon-type": r.optionIconType,
172
+ loading: p.value || u.loadingOverride,
173
+ "load-more-loading": C.value,
174
+ "comparing-key": u.comparingKey,
175
+ "is-open": u.isOpen,
176
+ "infinite-loading": u.infiniteLoading,
177
+ "show-select-all": !u.infiniteLoading && !i.value,
178
+ "grouped-options": u.groupedOptions,
179
+ "option-flag-key": u.optionFlagKey,
180
+ "option-image-key": u.optionImageKey,
181
+ "option-icon-key": u.optionIconKey,
182
+ "option-icon-type": u.optionIconType,
177
183
  "onUpdate:isOpen": R,
178
- onOnsearch: C,
184
+ onOnsearch: b,
179
185
  onApply: x,
180
186
  onLoadMore: M,
181
- onUnsavedSelectionUpdate: P,
187
+ onUnsavedSelectionUpdate: Q,
182
188
  onClosed: z
183
189
  }, {
184
190
  "dropdown-trigger": f(({ defaultTriggerProps: o }) => [
185
- g(d(oe), G(o, {
191
+ y(d(oe), G(o, {
186
192
  label: m.value,
187
193
  "selected-option": d(S),
188
194
  multi: K.value,
189
195
  "cancel-all-selected-display": "",
190
- "display-value-in-quotes": !Array.isArray(u.value) && u.value.conditionalOptions,
191
- onClear: Q
196
+ "display-value-in-quotes": !Array.isArray(r.value) && r.value.conditionalOptions,
197
+ onClear: P
192
198
  }), null, 16, ["label", "selected-option", "multi", "display-value-in-quotes"])
193
199
  ]),
194
200
  "dropdown-conditions": f(() => [
195
201
  H("div", ue, [
196
- g(d(N), {
202
+ y(d(N), {
197
203
  selected: d(n),
198
204
  "onUpdate:selected": t[0] || (t[0] = (o) => J(n) ? n.value = o : null),
199
- options: r.conditionalOptions,
205
+ options: u.conditionalOptions,
200
206
  "option-name-key": "label",
201
207
  "display-value": (o) => o?.label,
202
208
  container: ".conditional-container",
203
209
  size: "small"
204
210
  }, {
205
211
  "dropdown-trigger": f(({ buttonTriggerProps: o }) => [
206
- g(d(ae), X(Y(o)), null, 16)
212
+ y(d(ae), X(Y(o)), null, 16)
207
213
  ]),
208
214
  _: 1
209
215
  }, 8, ["selected", "options", "display-value"])
210
216
  ])
211
217
  ]),
212
218
  "inline-search": f(() => [
213
- g(d(te), {
219
+ y(d(te), {
214
220
  modelValue: i.value,
215
221
  "onUpdate:modelValue": t[1] || (t[1] = (o) => i.value = o),
216
222
  class: "inline-search",
217
223
  placeholder: "Search",
218
224
  variant: "transparent",
219
225
  size: "md",
220
- "auto-focus": r.autoFocusSearch
226
+ "auto-focus": u.autoFocusSearch
221
227
  }, null, 8, ["modelValue", "auto-focus"])
222
228
  ]),
223
229
  "custom-list-area": f(() => [
224
- !a.value.length && !p.value ? (D(), Z("div", re, [
225
- g(ne, { variant: "body1" }, {
230
+ !a.value.length && !p.value ? (L(), Z("div", re, [
231
+ y(ne, { variant: "body1" }, {
226
232
  default: f(() => [
227
- _(ee(d(F)), 1)
233
+ _(ee(d(B)), 1)
228
234
  ]),
229
235
  _: 1
230
236
  })
@@ -3651,6 +3651,10 @@ declare const DropdownTypes: () => (({
3651
3651
  type: import("vue").PropType<boolean>;
3652
3652
  default: boolean;
3653
3653
  };
3654
+ loadingOverride: {
3655
+ type: import("vue").PropType<boolean>;
3656
+ default: boolean;
3657
+ };
3654
3658
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3655
3659
  "update:selectedCondition": (value: {
3656
3660
  label: string;
@@ -3752,6 +3756,10 @@ declare const DropdownTypes: () => (({
3752
3756
  type: import("vue").PropType<boolean>;
3753
3757
  default: boolean;
3754
3758
  };
3759
+ loadingOverride: {
3760
+ type: import("vue").PropType<boolean>;
3761
+ default: boolean;
3762
+ };
3755
3763
  }>> & {
3756
3764
  onClear?: () => any;
3757
3765
  onClosed?: () => any;
@@ -3778,5 +3786,6 @@ declare const DropdownTypes: () => (({
3778
3786
  loadMoreFn: () => Promise<any[]>;
3779
3787
  fetchDataDebounceTime: number;
3780
3788
  autoFocusSearch: boolean;
3789
+ loadingOverride: boolean;
3781
3790
  }>)[];
3782
3791
  export { Dropdown, DefaultDropdownTrigger, IconButtonDropdownTrigger, ChipDropdownTrigger, ButtonDropdownTrigger, ButtonFilterDropdownTrigger, AppDropdownTrigger, DropdownTypes, Option, TreeDropdown, ConditionalDropdown, };
package/index.d.ts CHANGED
@@ -22817,6 +22817,10 @@ declare const _default: {
22817
22817
  type: import("vue").PropType<boolean>;
22818
22818
  default: boolean;
22819
22819
  };
22820
+ loadingOverride: {
22821
+ type: import("vue").PropType<boolean>;
22822
+ default: boolean;
22823
+ };
22820
22824
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22821
22825
  "update:selectedCondition": (value: {
22822
22826
  label: string;
@@ -22918,6 +22922,10 @@ declare const _default: {
22918
22922
  type: import("vue").PropType<boolean>;
22919
22923
  default: boolean;
22920
22924
  };
22925
+ loadingOverride: {
22926
+ type: import("vue").PropType<boolean>;
22927
+ default: boolean;
22928
+ };
22921
22929
  }>> & {
22922
22930
  onClear?: () => any;
22923
22931
  onClosed?: () => any;
@@ -22944,6 +22952,7 @@ declare const _default: {
22944
22952
  loadMoreFn: () => Promise<any[]>;
22945
22953
  fetchDataDebounceTime: number;
22946
22954
  autoFocusSearch: boolean;
22955
+ loadingOverride: boolean;
22947
22956
  }>)[];
22948
22957
  Option: {
22949
22958
  new (...args: any[]): {
@@ -23986,6 +23995,10 @@ declare const _default: {
23986
23995
  type: import("vue").PropType<boolean>;
23987
23996
  default: boolean;
23988
23997
  };
23998
+ loadingOverride: {
23999
+ type: import("vue").PropType<boolean>;
24000
+ default: boolean;
24001
+ };
23989
24002
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23990
24003
  "update:selectedCondition": (value: {
23991
24004
  label: string;
@@ -24087,6 +24100,10 @@ declare const _default: {
24087
24100
  type: import("vue").PropType<boolean>;
24088
24101
  default: boolean;
24089
24102
  };
24103
+ loadingOverride: {
24104
+ type: import("vue").PropType<boolean>;
24105
+ default: boolean;
24106
+ };
24090
24107
  }>> & {
24091
24108
  onClear?: () => any;
24092
24109
  onClosed?: () => any;
@@ -24113,6 +24130,7 @@ declare const _default: {
24113
24130
  loadMoreFn: () => Promise<any[]>;
24114
24131
  fetchDataDebounceTime: number;
24115
24132
  autoFocusSearch: boolean;
24133
+ loadingOverride: boolean;
24116
24134
  }>;
24117
24135
  Label: {
24118
24136
  new (...args: any[]): {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './IncludeExcludeOption.vue_vue_type_style_index_0_scoped_91bc7787_lang.css';
1
+ import './MenuItem.vue_vue_type_style_index_0_scoped_67e53b85_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-test.92",
3
+ "version": "2.1.11-test.98",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -1 +0,0 @@
1
- .custom-list-area[data-v-2ba23450]{color:var(--text-secondary);width:100%;text-align:center;box-sizing:border-box;padding:63px 43px}.inline-search[data-v-2ba23450]{width:100%}.contain-accept[data-v-2ba23450]{padding:6px 8px;margin-bottom:4px;cursor:pointer}.contain-accept[data-v-2ba23450]:hover{background-color:var(--action-hover);border-radius:.5rem}.contain-accept--query[data-v-2ba23450]{margin-left:4px;display:inline-flex;color:var(--primary-main)}