@ironsource/shared-ui 2.1.12-test.84 → 2.1.12-test.86

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.
@@ -1,21 +1,21 @@
1
- import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_683b8a75_lang.css"; import { defineComponent as W, computed as O, ref as s, watch as h, onMounted as q, openBlock as F, createBlock as G, unref as c, createSlots as H, withCtx as v, createVNode as S, mergeProps as J, createElementVNode as X, isRef as Y, normalizeProps as Z, guardReactiveProps as _, createElementBlock as ee, createTextVNode as le, toDisplayString as oe, createCommentVNode as te, renderSlot as ae } from "vue";
2
- import L from "./DropdownV4.vue.js";
1
+ import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_f5204c04_lang.css"; import { defineComponent as q, computed as w, ref as s, watch as m, onMounted as G, openBlock as F, createBlock as H, unref as c, createSlots as J, withCtx as v, createVNode as C, mergeProps as X, createElementVNode as Y, isRef as Z, normalizeProps as _, guardReactiveProps as ee, createElementBlock as le, createTextVNode as oe, toDisplayString as te, createCommentVNode as ae, renderSlot as ne } from "vue";
2
+ import B from "./DropdownV4.vue.js";
3
3
  import "./DefaultDropdownTrigger.vue.js";
4
4
  import "./IconButtonDropdownTrigger.vue.js";
5
- import ne from "./ChipDropdownTrigger.vue.js";
5
+ import ie from "./ChipDropdownTrigger.vue.js";
6
6
  import "./AppDropdownTrigger.vue.js";
7
7
  import "./ButtonDropdownTrigger.vue.js";
8
- import ie from "./ButtonFilterDropdownTrigger.vue.js";
8
+ import ue from "./ButtonFilterDropdownTrigger.vue.js";
9
9
  import "./TreeDropdown.vue.js";
10
10
  import "./OptionV4.vue.js";
11
11
  import "./ConditionalDropdown.vue.js";
12
- import ue from "../../search/v4/SearchV4.vue.js";
13
- import re from "../../typography/v4/Typography.vue.js";
14
- import { useDebounceFn as se } from "@vueuse/core";
15
- const de = { class: "conditional-container" }, ce = {
12
+ import re from "../../search/v4/SearchV4.vue.js";
13
+ import se from "../../typography/v4/Typography.vue.js";
14
+ import { useDebounceFn as de } from "@vueuse/core";
15
+ const ce = { class: "conditional-container" }, pe = {
16
16
  key: 0,
17
17
  class: "custom-list-area"
18
- }, Ae = /* @__PURE__ */ W({
18
+ }, Ne = /* @__PURE__ */ q({
19
19
  __name: "ConditionalDropdown",
20
20
  props: {
21
21
  selectedCondition: null,
@@ -42,47 +42,56 @@ const de = { class: "conditional-container" }, ce = {
42
42
  triggerShownValuesCount: { default: 1 }
43
43
  },
44
44
  emits: ["update:selectedCondition", "update:appliedSelections", "clear", "closed"],
45
- setup(i, { emit: C }) {
46
- const e = i, m = O({
45
+ setup(u, { emit: g }) {
46
+ const e = u, y = w({
47
47
  get: () => e.appliedSelections,
48
48
  set: (l) => {
49
- C("update:appliedSelections", l);
49
+ g("update:appliedSelections", l);
50
50
  }
51
- }), u = O({
52
- get: () => e.selectedCondition || e.conditionalOptions[0],
51
+ }), T = s(
52
+ e.selectedCondition || e.conditionalOptions[0]
53
+ ), n = w({
54
+ get: () => T.value || e.conditionalOptions[0],
53
55
  set: (l) => {
54
- C("update:selectedCondition", l);
56
+ T.value = l;
55
57
  }
56
- }), k = () => {
58
+ });
59
+ m(
60
+ () => e.selectedCondition,
61
+ (l) => {
62
+ l && l.value !== n.value?.value && (n.value = l, k());
63
+ }
64
+ );
65
+ const A = () => {
57
66
  const { appliedSelections: l } = e;
58
67
  return l ? Array.isArray(l) ? l : [l] : [];
59
- }, T = s(null), p = s(!0), a = s([]), n = s(k()), A = s(!0), d = s(!1), b = s(!1), r = s(e.searchQuery), B = s(""), g = s(e.label), K = s([]), U = O(() => (!r.value || r.value?.length < e.minCharsToStart) && !a.value.length ? `Enter at least ${e.minCharsToStart} characters to begin` : "No results found"), I = O(() => {
68
+ }, N = s(null), p = s(!0), a = s([]), i = s(A()), D = s(!0), d = s(!1), O = s(!1), r = s(e.searchQuery), U = s(""), h = s(e.label), K = s([]), I = w(() => (!r.value || r.value?.length < e.minCharsToStart) && !a.value.length ? `Enter at least ${e.minCharsToStart} characters to begin` : "No results found"), M = w(() => {
60
69
  const l = p.value ? 4 : 4.5, t = a.value.length > 4 ? a.value.length : l;
61
70
  if (e.groupedOptions) {
62
71
  let o = 0;
63
- return a.value.forEach((y) => {
64
- y.options && (o = o + y.options.length);
72
+ return a.value.forEach((S) => {
73
+ S.options && (o = o + S.options.length);
65
74
  }), o > 4 ? o : l;
66
75
  }
67
76
  return t > l ? t : l;
68
- }), M = (l, t) => {
69
- if (e.infiniteLoading && u.value.multi && Array.isArray(n.value) && n.value.length && l && t.length) {
70
- const o = [], y = n.value.filter(
77
+ }), E = (l, t) => {
78
+ if (e.infiniteLoading && n.value.multi && Array.isArray(i.value) && i.value.length && l && t.length) {
79
+ const o = [], S = i.value.filter(
71
80
  (f) => f[e.optionNameKey].includes(l)
72
81
  );
73
82
  return t.forEach((f) => {
74
- y.find(
75
- (j) => j[e.comparingKey] === f[e.comparingKey]
83
+ S.find(
84
+ (W) => W[e.comparingKey] === f[e.comparingKey]
76
85
  ) && o.push(f[e.comparingKey]);
77
- }), y.filter(
86
+ }), S.filter(
78
87
  (f) => !o.includes(f[e.comparingKey])
79
88
  );
80
89
  }
81
90
  return [];
82
- }, N = async (l) => {
91
+ }, L = async (l) => {
83
92
  try {
84
93
  d.value = !0;
85
- const t = await e.fetchFnCallback(l), o = M(
94
+ const t = await e.fetchFnCallback(l), o = E(
86
95
  l,
87
96
  t
88
97
  );
@@ -90,164 +99,164 @@ const de = { class: "conditional-container" }, ce = {
90
99
  } catch (t) {
91
100
  d.value = !1, console.error("Error fetching data:", t);
92
101
  }
93
- }, E = async () => {
102
+ }, Q = async () => {
94
103
  if (e.infiniteLoading)
95
104
  try {
96
- b.value = !0;
105
+ O.value = !0;
97
106
  const l = await e.loadMoreFn();
98
- b.value = !1, Array.isArray(l) && (a.value = [...a.value, ...l]);
107
+ O.value = !1, Array.isArray(l) && (a.value = [...a.value, ...l]);
99
108
  } catch (l) {
100
- b.value = !1, console.error("Error fetching data:", l);
109
+ O.value = !1, console.error("Error fetching data:", l);
101
110
  }
102
- }, P = se(
103
- N,
111
+ }, V = de(
112
+ L,
104
113
  e.fetchDataDebounceTime
105
- ), w = (l) => {
106
- l.length >= e.minCharsToStart ? (P(l), T.value?.scrollTo(0)) : e.infiniteLoading && u.value.multi ? a.value = K.value || [] : a.value = [];
107
- }, Q = () => {
108
- r.value && a.value.length && !d.value && !u.value.multi ? a.value[0].conditionalOptions ? a.value[0] = {
114
+ ), b = (l) => {
115
+ l.length >= e.minCharsToStart ? (V(l), N.value?.scrollTo(0)) : e.infiniteLoading && n.value.multi ? a.value = K.value || [] : a.value = [];
116
+ }, $ = () => {
117
+ r.value && a.value.length && !d.value && !n.value.multi ? a.value[0].conditionalOptions ? a.value[0] = {
109
118
  [e.optionNameKey]: r.value,
110
119
  conditionalOptions: !0,
111
- conditionalName: u.value.label,
120
+ conditionalName: n.value.label,
112
121
  [e.comparingKey]: r.value
113
122
  } : a.value = [
114
123
  {
115
124
  [e.optionNameKey]: r.value,
116
125
  conditionalOptions: !0,
117
- conditionalName: u.value.label,
126
+ conditionalName: n.value.label,
118
127
  [e.comparingKey]: r.value
119
128
  },
120
129
  ...a.value
121
130
  ] : a.value.length && a.value[0].conditionalOptions && a.value.shift();
122
- }, D = () => {
123
- p.value && n.value.length === 0 ? g.value = e.label : g.value = `${e.label} ${u.value.label.toLowerCase()}`;
131
+ }, k = () => {
132
+ p.value && i.value.length === 0 ? h.value = e.label : h.value = `${e.label} ${n.value.label.toLowerCase()}`;
124
133
  };
125
- h(r, () => {
126
- w(r.value);
127
- }), h([u, a], () => {
128
- Q();
129
- }), h(
134
+ m(r, () => {
135
+ b(r.value);
136
+ }), m([n, a], () => {
137
+ $();
138
+ }), m(
130
139
  () => e.loadingOverride,
131
140
  (l, t) => {
132
- !l && t && !e.infiniteLoading && N(e.searchQuery);
141
+ !l && t && !e.infiniteLoading && L(e.searchQuery);
133
142
  }
134
143
  );
135
- const V = () => {
136
- p.value && n.value.length === 0 ? (u.value = null, m.value = [], u.value = null) : (B.value = r.value, m.value = p.value ? [...n.value] : { ...n.value }, A.value = p.value), D();
144
+ const x = () => {
145
+ p.value && i.value.length === 0 ? (y.value = [], n.value = null) : (U.value = r.value, y.value = p.value ? [...i.value] : { ...i.value }, D.value = p.value), g("update:selectedCondition", n.value), k();
137
146
  };
138
- h(u, (l, t) => {
139
- u.value.multi ? (d.value = !0, !t.multi && l.multi && (Array.isArray(e.appliedSelections) ? n.value = e.appliedSelections : n.value = [e.appliedSelections]), setTimeout(() => {
147
+ m(n, (l, t) => {
148
+ n.value.multi ? (d.value = !0, !t.multi && l.multi && (Array.isArray(e.appliedSelections) ? i.value = e.appliedSelections : i.value = [e.appliedSelections]), setTimeout(() => {
140
149
  d.value = !1, p.value = !0;
141
150
  }, 100)) : (!t.multi && !l.multi && (d.value = !0), setTimeout(() => {
142
151
  !t.multi && !l.multi && (d.value = !1), p.value = !1;
143
152
  }, 100));
144
- }), h(m, () => {
145
- n.value = k();
153
+ }), m(y, () => {
154
+ i.value = A();
146
155
  });
147
- const $ = (l) => {
156
+ const P = (l) => {
148
157
  K.value = l;
149
- }, x = () => {
150
- n.value = [], m.value = [], u.value = null, g.value = e.label, r.value = "", C("clear");
151
- }, R = (l) => {
152
- l && u.value.multi && e.infiniteLoading && n.value && (a.value = n.value, r.value && w(r.value));
158
+ }, R = () => {
159
+ i.value = [], y.value = [], n.value = null, g("update:selectedCondition", null), h.value = e.label, r.value = "", g("clear");
160
+ }, z = (l) => {
161
+ n.value === null && (n.value = e.conditionalOptions[0]), l && n.value.multi && e.infiniteLoading && i.value && (a.value = i.value, r.value && b(r.value));
153
162
  };
154
- q(() => {
155
- (e.searchQuery || !e.infiniteLoading || e.minCharsToStart === 0) && w(e.searchQuery), e.appliedSelections && Array.isArray(e.appliedSelections) && (a.value = e.appliedSelections, n.value = e.appliedSelections, K.value = e.appliedSelections), D();
163
+ G(() => {
164
+ (e.searchQuery || !e.infiniteLoading || e.minCharsToStart === 0) && b(e.searchQuery), e.appliedSelections && Array.isArray(e.appliedSelections) && (a.value = e.appliedSelections, i.value = e.appliedSelections, K.value = e.appliedSelections), k();
156
165
  });
157
- const z = () => {
158
- C("closed");
166
+ const j = () => {
167
+ g("closed");
159
168
  };
160
- return (l, t) => (F(), G(c(L), {
169
+ return (l, t) => (F(), H(c(B), {
161
170
  ref_key: "dropdownRef",
162
- ref: T,
163
- selected: n.value,
164
- "onUpdate:selected": t[2] || (t[2] = (o) => n.value = o),
171
+ ref: N,
172
+ selected: i.value,
173
+ "onUpdate:selected": t[2] || (t[2] = (o) => i.value = o),
165
174
  "predefined-trigger": "chip",
166
- "display-value": (o) => o?.[i.optionNameKey],
175
+ "display-value": (o) => o?.[u.optionNameKey],
167
176
  multi: p.value,
168
177
  options: a.value,
169
- placeholder: g.value,
178
+ placeholder: h.value,
170
179
  "search-placeholder": "Search",
171
- "option-name-key": i.optionNameKey,
180
+ "option-name-key": u.optionNameKey,
172
181
  "with-conditions": "",
173
182
  "inline-search": "",
174
- "custom-number-of-displayed-options": c(I),
183
+ "custom-number-of-displayed-options": c(M),
175
184
  "options-list-width": "330px",
176
- loading: d.value || i.loadingOverride,
177
- "load-more-loading": b.value,
178
- "comparing-key": i.comparingKey,
179
- "is-open": i.isOpen,
180
- "infinite-loading": i.infiniteLoading,
181
- "show-select-all": !i.infiniteLoading && !r.value,
182
- "grouped-options": i.groupedOptions,
183
- "option-flag-key": i.optionFlagKey,
184
- "option-image-key": i.optionImageKey,
185
- "option-icon-key": i.optionIconKey,
186
- "option-icon-type": i.optionIconType,
187
- "trigger-shown-values-count": i.triggerShownValuesCount,
188
- "onUpdate:isOpen": R,
189
- onOnsearch: w,
190
- onApply: V,
191
- onLoadMore: E,
192
- onUnsavedSelectionUpdate: $,
193
- onClosed: z
194
- }, H({
185
+ loading: d.value || u.loadingOverride,
186
+ "load-more-loading": O.value,
187
+ "comparing-key": u.comparingKey,
188
+ "is-open": u.isOpen,
189
+ "infinite-loading": u.infiniteLoading,
190
+ "show-select-all": !u.infiniteLoading && !r.value,
191
+ "grouped-options": u.groupedOptions,
192
+ "option-flag-key": u.optionFlagKey,
193
+ "option-image-key": u.optionImageKey,
194
+ "option-icon-key": u.optionIconKey,
195
+ "option-icon-type": u.optionIconType,
196
+ "trigger-shown-values-count": u.triggerShownValuesCount,
197
+ "onUpdate:isOpen": z,
198
+ onOnsearch: b,
199
+ onApply: x,
200
+ onLoadMore: Q,
201
+ onUnsavedSelectionUpdate: P,
202
+ onClosed: j
203
+ }, J({
195
204
  "dropdown-trigger": v(({ defaultTriggerProps: o }) => [
196
- S(c(ne), J(o, {
197
- label: g.value,
198
- "selected-option": c(m),
199
- multi: A.value,
205
+ C(c(ie), X(o, {
206
+ label: h.value,
207
+ "selected-option": c(y),
208
+ multi: D.value,
200
209
  "cancel-all-selected-display": "",
201
- "display-value-in-quotes": !Array.isArray(n.value) && n.value.conditionalOptions,
202
- "shown-values-count": i.triggerShownValuesCount,
203
- onClear: x
210
+ "display-value-in-quotes": !Array.isArray(i.value) && i.value.conditionalOptions,
211
+ "shown-values-count": u.triggerShownValuesCount,
212
+ onClear: R
204
213
  }), null, 16, ["label", "selected-option", "multi", "display-value-in-quotes", "shown-values-count"])
205
214
  ]),
206
215
  "dropdown-conditions": v(() => [
207
- X("div", de, [
208
- S(c(L), {
209
- selected: c(u),
210
- "onUpdate:selected": t[0] || (t[0] = (o) => Y(u) ? u.value = o : null),
211
- options: i.conditionalOptions,
216
+ Y("div", ce, [
217
+ C(c(B), {
218
+ selected: c(n),
219
+ "onUpdate:selected": t[0] || (t[0] = (o) => Z(n) ? n.value = o : null),
220
+ options: u.conditionalOptions,
212
221
  "option-name-key": "label",
213
222
  "display-value": (o) => o?.label,
214
223
  container: ".conditional-container",
215
224
  size: "small"
216
225
  }, {
217
226
  "dropdown-trigger": v(({ buttonTriggerProps: o }) => [
218
- S(c(ie), Z(_(o)), null, 16)
227
+ C(c(ue), _(ee(o)), null, 16)
219
228
  ]),
220
229
  _: 1
221
230
  }, 8, ["selected", "options", "display-value"])
222
231
  ])
223
232
  ]),
224
233
  "inline-search": v(() => [
225
- S(c(ue), {
234
+ C(c(re), {
226
235
  modelValue: r.value,
227
236
  "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
228
237
  class: "inline-search",
229
238
  placeholder: "Search",
230
239
  variant: "transparent",
231
240
  size: "md",
232
- "auto-focus": i.autoFocusSearch
241
+ "auto-focus": u.autoFocusSearch
233
242
  }, null, 8, ["modelValue", "auto-focus"])
234
243
  ]),
235
244
  "custom-list-area": v(() => [
236
- !a.value.length && !d.value ? (F(), ee("div", ce, [
237
- S(re, { variant: "body1" }, {
245
+ !a.value.length && !d.value ? (F(), le("div", pe, [
246
+ C(se, { variant: "body1" }, {
238
247
  default: v(() => [
239
- le(oe(c(U)), 1)
248
+ oe(te(c(I)), 1)
240
249
  ]),
241
250
  _: 1
242
251
  })
243
- ])) : te("", !0)
252
+ ])) : ae("", !0)
244
253
  ]),
245
254
  _: 2
246
255
  }, [
247
256
  l.$slots["option-end"] ? {
248
257
  name: "option-end",
249
258
  fn: v(({ option: o }) => [
250
- ae(l.$slots, "option-end", { option: o }, void 0, !0)
259
+ ne(l.$slots, "option-end", { option: o }, void 0, !0)
251
260
  ]),
252
261
  key: "0"
253
262
  } : void 0
@@ -255,5 +264,5 @@ const de = { class: "conditional-container" }, ce = {
255
264
  }
256
265
  });
257
266
  export {
258
- Ae as default
267
+ Ne as default
259
268
  };
@@ -60,6 +60,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
60
60
  groupedOptions?: boolean;
61
61
  comparingKey?: string;
62
62
  customNumberOfDisplayedOptions?: number;
63
+ optionTooltipPosition?: "top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
63
64
  theme?: string;
64
65
  fullWidth?: boolean;
65
66
  optionsListWidth?: string;
@@ -124,6 +125,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
124
125
  groupedOptions: boolean;
125
126
  comparingKey: any;
126
127
  customNumberOfDisplayedOptions: any;
128
+ optionTooltipPosition: string;
127
129
  fullWidth: boolean;
128
130
  optionsListWidth: any;
129
131
  statusType: any;
@@ -208,6 +210,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
208
210
  groupedOptions?: boolean;
209
211
  comparingKey?: string;
210
212
  customNumberOfDisplayedOptions?: number;
213
+ optionTooltipPosition?: "top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
211
214
  theme?: string;
212
215
  fullWidth?: boolean;
213
216
  optionsListWidth?: string;
@@ -272,6 +275,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
272
275
  groupedOptions: boolean;
273
276
  comparingKey: any;
274
277
  customNumberOfDisplayedOptions: any;
278
+ optionTooltipPosition: string;
275
279
  fullWidth: boolean;
276
280
  optionsListWidth: any;
277
281
  statusType: any;
@@ -349,6 +353,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
349
353
  groupedOptions: boolean;
350
354
  comparingKey: string;
351
355
  customNumberOfDisplayedOptions: number;
356
+ optionTooltipPosition: "top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
352
357
  fullWidth: boolean;
353
358
  optionsListWidth: string;
354
359
  statusType: "default" | "disabled" | "success" | "warning" | "error" | "archive";
@@ -1,8 +1,8 @@
1
1
  import o from "./DropdownV4.vue2.js";
2
- /* empty css *//* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_dd86e387_lang.css"; //*');
2
+ /* empty css *//* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_934163c0_lang.css"; //*');
4
4
  // import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; //');
5
- const d = /* @__PURE__ */ e(o, [["__scopeId", "data-v-dd86e387"]]);
5
+ const r = /* @__PURE__ */ _(o, [["__scopeId", "data-v-934163c0"]]);
6
6
  export {
7
- d as default
7
+ r as default
8
8
  };