@ironsource/shared-ui 2.1.6-rc.38 → 2.1.6-rc.39

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
+ .default-dropdown-wrapper[data-v-0345d6b1]{position:relative}.dropdown-trigger[data-v-0345d6b1]{width:100%;padding:.3125rem .4375rem;display:flex;column-gap:.5rem;max-width:100%;box-sizing:border-box;border-radius:var(--border-radius-md);border:1px solid var(--action-outlined-border);background:var(--default-main);cursor:pointer;user-select:none;position:relative}.dropdown-trigger[data-v-0345d6b1]:hover{border:1px solid var(--action-active);background:var(--action-hover)}.dropdown-trigger.small[data-v-0345d6b1]{padding:.1875rem .4375rem}.dropdown-trigger.large[data-v-0345d6b1]{padding:.5625rem .4375rem}.dropdown-trigger.disabled[data-v-0345d6b1]{border:1px solid var(--action-outlined-border, #bbb);background:var(--action-disabled-background, #f1f1f1);cursor:not-allowed}.dropdown-trigger.disabled .displayed-value[data-v-0345d6b1],.dropdown-trigger.disabled .caret-down[data-v-0345d6b1]{color:var(--text-disabled)}.dropdown-trigger.open[data-v-0345d6b1]{padding:.25rem .375rem;border:2px solid var(--primary-main)}.dropdown-trigger.open.small[data-v-0345d6b1]{padding:.125rem .375rem}.dropdown-trigger.open.large[data-v-0345d6b1]{padding:.5rem .375rem}.dropdown-trigger.state-error[data-v-0345d6b1],.dropdown-trigger.state-success[data-v-0345d6b1],.dropdown-trigger.state-warning[data-v-0345d6b1]{padding:4px 6px}.dropdown-trigger.state-error.small[data-v-0345d6b1],.dropdown-trigger.state-success.small[data-v-0345d6b1],.dropdown-trigger.state-warning.small[data-v-0345d6b1]{padding:.1875rem .4375rem}.dropdown-trigger.state-error.large[data-v-0345d6b1],.dropdown-trigger.state-success.large[data-v-0345d6b1],.dropdown-trigger.state-warning.large[data-v-0345d6b1]{padding:.5625rem .4375rem}.dropdown-trigger.state-error[data-v-0345d6b1]{border:2px solid var(--error-main)}.dropdown-trigger.state-success[data-v-0345d6b1]{border:2px solid var(--success-main)}.dropdown-trigger.state-warning[data-v-0345d6b1]{border:2px solid var(--warning-dark)}.dropdown-trigger .caret-down[data-v-0345d6b1]{color:var(--action-active)}.content[data-v-0345d6b1]{width:calc(100% - 28px);display:flex;gap:.25rem;align-items:center;color:var(--text-primary)}.content .displayed-value[data-v-0345d6b1]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.content .image[data-v-0345d6b1]{width:20px;height:20px;flex:none}.content .image img[data-v-0345d6b1]{border-radius:4px;width:100%;height:100%}.content .start-icon[data-v-0345d6b1]{display:flex;color:var(--action-active)}.content .status-dot[data-v-0345d6b1]{padding-right:.25rem}.content .status-dot>div[data-v-0345d6b1]{position:relative;top:-1px}.dropdown-field-label[data-v-0345d6b1]{color:var(--text-primary)}.dropdown-field-help-text[data-v-0345d6b1]{margin-top:4px;position:absolute}
@@ -0,0 +1 @@
1
+ .v-enter-active[data-v-7af4f288],.v-leave-active[data-v-7af4f288]{transition:opacity .25s ease}ol[data-v-7af4f288],ul[data-v-7af4f288],menu[data-v-7af4f288]{list-style:none;margin:0;padding:0}.dropdown.full-width[data-v-7af4f288],.dropdown.full-width .button__container[data-v-7af4f288]{width:100%}.dropdown-list-wrapper[data-v-7af4f288]{display:flex;flex-direction:column;padding:.5rem .5rem .25rem}.dropdown-list-wrapper--multi[data-v-7af4f288]{padding:.5rem}.list-container--multi[data-v-7af4f288]{margin-bottom:0}.inline-search .inline-search-wrapper[data-v-7af4f288]{padding-bottom:.25rem}.inline-search .list-container[data-v-7af4f288]{padding-top:0}.no-result-container[data-v-7af4f288]{height:100%;display:flex;align-items:center;padding:.375rem .5rem;color:var(--text-disabled)}.no-result[data-v-7af4f288]{color:var(--text-disabled);padding-left:.5rem}.list[data-v-7af4f288]{outline:none;display:flex;flex-direction:column;width:100%;min-height:2rem}.list--multi[data-v-7af4f288]{margin-bottom:.5rem;border-bottom-left-radius:0;border-bottom-right-radius:0}.image-slot[data-v-7af4f288]{margin-right:.5rem}.actions-wrapper[data-v-7af4f288]{display:flex;width:100%;padding:.5rem .5rem .5rem .125rem;padding-bottom:0;border-top:1px solid var(--common-divider);justify-content:space-between;margin-top:.25rem}.apply-button[data-v-7af4f288]{margin-left:.5rem}
@@ -0,0 +1 @@
1
+ .child-options[data-v-142eab98]{padding-left:1rem}
@@ -1,25 +1,25 @@
1
- import { useToggle as me } from "../../../composables/useToggle.js";
2
- import { ref as n, computed as r, watch as m, useSlots as Pe, toRaw as A, nextTick as N, provide as Te, onMounted as we } from "vue";
1
+ import { useToggle as we } from "../../../composables/useToggle.js";
2
+ import { ref as n, computed as r, watch as m, useSlots as Ie, toRaw as O, nextTick as C, provide as xe, onMounted as De } from "vue";
3
3
  import { isObjectInArray as W } from "../../../utils/array.js";
4
- import { objectsEqual as Ie } from "../../../utils/object.js";
5
- import { useClamp as xe, useVirtualList as De, onClickOutside as Y } from "@vueuse/core";
6
- import { Mode as P, Type as V, DropdownContext as Ne } from "./DropdownContext.js";
7
- import { pxToRem as Re } from "../../../utils/style.js";
8
- import { useEditableContext as Ee } from "../../table-cells/common/EditableContext.js";
9
- const Ue = (l, O, b) => {
10
- const Z = (e, t) => l.multi ? W(e, t) : A(e) === t;
4
+ import { objectsEqual as Ce } from "../../../utils/object.js";
5
+ import { useClamp as Ne, useVirtualList as Re, onClickOutside as Y } from "@vueuse/core";
6
+ import { Mode as P, Type as V, DropdownContext as Ee } from "./DropdownContext.js";
7
+ import { pxToRem as Me } from "../../../utils/style.js";
8
+ import { useEditableContext as Ve } from "../../table-cells/common/EditableContext.js";
9
+ const Ke = (l, A, b) => {
10
+ const Z = (e, t) => l.multi ? W(e, t) : O(e) === t;
11
11
  let _;
12
12
  ((e) => {
13
13
  e[e.None = 0] = "None", e[e.Next = 1] = "Next", e[e.Previous = -1] = "Previous", e[e.NextPage = 10] = "NextPage", e[e.PrevPage = -10] = "PrevPage";
14
14
  })(_ || (_ = {}));
15
15
  const a = n(
16
16
  l.selected
17
- ), R = Ee(), u = r({
17
+ ), N = Ve(), u = r({
18
18
  get() {
19
- return R?.value?.value ?? a.value;
19
+ return N?.value?.value ?? a.value;
20
20
  },
21
21
  set(e) {
22
- R.onChange?.(e), R.onClose?.(), O("update:selected", e);
22
+ N.onChange?.(e), N.onClose?.(), A("update:selected", e);
23
23
  }
24
24
  });
25
25
  m(
@@ -28,7 +28,7 @@ const Ue = (l, O, b) => {
28
28
  a.value = l.selected, v.value = l.selected;
29
29
  }
30
30
  );
31
- const F = Pe(), w = n(null), g = n(null), k = n(null), E = n(null), H = n(null), I = n(null), p = n(), B = n(null), L = n(null), U = n(null), ee = 8, le = r(() => I.value ? I.value.getBoundingClientRect().height + ee + l.distance : 0), c = n([]), x = n(-1), T = n(""), v = n(l.selected || []), q = () => I.value?.focus(), [d, te, ae] = me({
31
+ const F = Ie(), w = n(null), g = n(null), k = n(null), R = n(null), H = n(null), I = n(null), p = n(), B = n(null), L = n(null), U = n(null), ee = 8, le = r(() => I.value ? I.value.getBoundingClientRect().height + ee + l.distance : 0), c = n([]), x = n(-1), T = n(""), v = n(l.selected || []), q = () => I.value?.focus(), [d, te, ae] = we({
32
32
  disabled: l.disabled,
33
33
  initialValue: l.defaultOpen
34
34
  });
@@ -45,9 +45,9 @@ const Ue = (l, O, b) => {
45
45
  return l.isOpen;
46
46
  },
47
47
  set(e) {
48
- O("update:isOpen", e);
48
+ A("update:isOpen", e);
49
49
  }
50
- }), ne = r(() => s.value.length - 1), o = xe(0, 0, ne), K = r(() => u.value ? l.displayValue(u.value) : ""), ie = (e) => {
50
+ }), ne = r(() => s.value.length - 1), o = Ne(0, 0, ne), K = r(() => u.value ? l.displayValue(u.value) : ""), ie = (e) => {
51
51
  if (!e.value.length && !l.multiOptionsPlaceholderPrefix && !l.multiOptionsPlaceholderSuffix)
52
52
  return l.placeholder;
53
53
  const t = !l.multiOptionsPlaceholderPrefix && !l.multiOptionsPlaceholderSuffix ? `${e.value.length} selected` : `${l.multiOptionsPlaceholderPrefix ?? ""}${e.value.length ?? "0"}${l.multiOptionsPlaceholderSuffix ?? ""}`;
@@ -60,14 +60,14 @@ const Ue = (l, O, b) => {
60
60
  }), $ = r(() => {
61
61
  if (Array.isArray(a.value))
62
62
  return a.value.length === s.value.length;
63
- }), oe = r(() => !l.multi || !Array.isArray(a.value) ? !1 : a.value.length > 0 && a.value.length < s.value.length), M = (e) => {
63
+ }), oe = r(() => !l.multi || !Array.isArray(a.value) ? !1 : a.value.length > 0 && a.value.length < s.value.length), E = (e) => {
64
64
  T.value = e;
65
65
  }, se = r(() => {
66
- const e = A(v.value), t = {
66
+ const e = O(v.value), t = {
67
67
  selected: [],
68
68
  notSelected: []
69
69
  };
70
- return A(l.options).forEach((y) => {
70
+ return O(l.options).forEach((y) => {
71
71
  const f = e.includes(y) ? "selected" : "notSelected";
72
72
  t[f].push(y);
73
73
  }), [].concat(t.selected, t.notSelected);
@@ -81,7 +81,7 @@ const Ue = (l, O, b) => {
81
81
  containerProps: J,
82
82
  wrapperProps: ve,
83
83
  scrollTo: D
84
- } = De(s, {
84
+ } = Re(s, {
85
85
  itemHeight: j.value,
86
86
  overscan: l.disableVirtualScroll ? 1 / 0 : 2
87
87
  });
@@ -91,11 +91,11 @@ const Ue = (l, O, b) => {
91
91
  G(e);
92
92
  }
93
93
  ), m([x], async () => {
94
- await N();
94
+ await C();
95
95
  }), m(
96
96
  [d, o, x],
97
97
  async ([e], [t]) => {
98
- d.value && (await N(), x.value !== -1 && e !== t && setTimeout(() => {
98
+ d.value && (await C(), x.value !== -1 && e !== t && setTimeout(() => {
99
99
  l.multi && b.VERSION === 4 || D(x.value);
100
100
  }), o.value && setTimeout(() => {
101
101
  D(o.value);
@@ -105,13 +105,13 @@ const Ue = (l, O, b) => {
105
105
  D(0);
106
106
  });
107
107
  const h = (e, t = !1) => {
108
- l.disabled || (G(e), N(() => {
109
- d.value && O("opened"), d.value || O("closed"), w.value && t && w.value.focus();
108
+ l.disabled || (G(e), C(() => {
109
+ d.value && A("opened"), d.value || A("closed"), w.value && t && w.value.focus();
110
110
  }));
111
111
  };
112
112
  m(d, (e) => {
113
113
  if (e) {
114
- X.value && Array.isArray(u.value) && (v.value = A(u.value).slice());
114
+ X.value && Array.isArray(u.value) && (v.value = O(u.value).slice());
115
115
  return;
116
116
  }
117
117
  q();
@@ -126,29 +126,29 @@ const Ue = (l, O, b) => {
126
126
  a.value = [];
127
127
  return;
128
128
  }
129
- a.value = s.value, O("selectAll");
129
+ a.value = s.value, A("selectAll");
130
130
  }
131
131
  }, fe = () => {
132
132
  de(), b.VERSION !== 4 && (u.value = a.value);
133
133
  }, ge = (e = !0) => {
134
- a.value = [], e && (u.value = [], v.value = []), O("clear");
135
- }, C = (e, t) => {
136
- if (e = A(e), c.value[t]?.disabled)
134
+ a.value = [], e && (u.value = [], v.value = []), A("clear");
135
+ }, M = (e, t) => {
136
+ if (e = O(e), c.value[t]?.disabled)
137
137
  return;
138
138
  if (x.value = t, i.mode !== P.Multi) {
139
139
  l.keepOpen || h(!1), i.goToOption(
140
140
  0
141
141
  /* None */
142
- ), u.value = e, M(""), q(), i.type === V.Search && g.value && (g.value.value = l.displayValue(e));
142
+ ), u.value = e, E(""), q(), i.type === V.Search && g.value && (g.value.value = l.displayValue(e));
143
143
  return;
144
144
  }
145
145
  if (!Array.isArray(a.value))
146
146
  return;
147
147
  g.value?.focus();
148
- const S = A(a.value);
148
+ const S = O(a.value);
149
149
  if (W(S, e)) {
150
150
  a.value = S.filter(
151
- (f) => !Ie(f, e)
151
+ (f) => !Ce(f, e)
152
152
  );
153
153
  return;
154
154
  } else {
@@ -160,7 +160,7 @@ const Ue = (l, O, b) => {
160
160
  options: c,
161
161
  selectedOption: u,
162
162
  labelRef: H,
163
- activeOption: E,
163
+ activeOption: R,
164
164
  listRef: w,
165
165
  clearable: l.clearable,
166
166
  type: F.input ? V.Search : V.Dropdown,
@@ -173,11 +173,11 @@ const Ue = (l, O, b) => {
173
173
  mandatory: l.mandatory,
174
174
  size: l.size,
175
175
  placeholder: l.placeholder,
176
- select: C,
176
+ select: M,
177
177
  clearSelection: () => {
178
- M(""), u.value = i.mode === P.Single ? null : [], v.value = i.mode === P.Single ? null : [], g.value && (g.value.value = "");
178
+ E(""), u.value = i.mode === P.Single ? null : [], v.value = i.mode === P.Single ? null : [], g.value && (g.value.value = "");
179
179
  },
180
- search: M,
180
+ search: E,
181
181
  goToOption: async (e) => {
182
182
  if (!d.value)
183
183
  return;
@@ -187,11 +187,11 @@ const Ue = (l, O, b) => {
187
187
  ).length, S = s.value.length - y;
188
188
  for (t > S && (t = S + 1); ; ) {
189
189
  if (!c.value[t]?.disabled) {
190
- E.value = s.value[t], o.value = t;
190
+ R.value = s.value[t], o.value = t;
191
191
  return;
192
192
  }
193
193
  if ((e === 1 || e === 10) && (t = t + 1), (e === -1 || e === -10) && (t = t + -1), !!he(o.value)) {
194
- E.value = s.value[t], o.value = t;
194
+ R.value = s.value[t], o.value = t;
195
195
  return;
196
196
  }
197
197
  }
@@ -206,7 +206,7 @@ const Ue = (l, O, b) => {
206
206
  c.value = c.value.filter((t) => t.id !== e);
207
207
  }
208
208
  };
209
- Te(Ne, i), Y(
209
+ xe(Ee, i), Y(
210
210
  w,
211
211
  () => {
212
212
  d.value && Q();
@@ -225,15 +225,15 @@ const Ue = (l, O, b) => {
225
225
  const ye = () => {
226
226
  g.value && (g.value.value = i.query.value = "");
227
227
  };
228
- we(async () => {
229
- l.autoFocus && (await N(), setTimeout(() => {
228
+ De(async () => {
229
+ l.autoFocus && (await C(), setTimeout(() => {
230
230
  k.value.focus();
231
231
  })), i.goToOption(0);
232
232
  });
233
233
  const Se = () => {
234
- u.value = a.value, Array.isArray(u.value) && (v.value = A(u.value).slice()), O("apply", u.value), h(!1), ye();
234
+ u.value = a.value, Array.isArray(u.value) && (v.value = O(u.value).slice()), A("apply", u.value), h(!1), ye();
235
235
  }, Q = () => {
236
- X.value && Array.isArray(v.value) && (u.value = A(v.value).slice()), T.value = "", h(!1);
236
+ X.value && Array.isArray(v.value) && (u.value = O(v.value).slice()), T.value = "", h(!1);
237
237
  }, be = (e) => {
238
238
  if (!l.disableKeyboardEvents)
239
239
  switch (e.key) {
@@ -243,7 +243,7 @@ const Ue = (l, O, b) => {
243
243
  case "ArrowDown":
244
244
  h(!0), e.preventDefault();
245
245
  }
246
- }, Ae = (e) => {
246
+ }, Oe = (e) => {
247
247
  if (!l.disableKeyboardEvents)
248
248
  switch (e.key) {
249
249
  case "ArrowUp": {
@@ -283,19 +283,22 @@ const Ue = (l, O, b) => {
283
283
  h(!0);
284
284
  return;
285
285
  }
286
- C(s.value[o.value], o.value), i.mode === P.Single && !l.keepOpen && h(!1), e.preventDefault();
286
+ M(s.value[o.value], o.value), i.mode === P.Single && !l.keepOpen && h(!1), e.preventDefault();
287
287
  break;
288
288
  }
289
289
  }
290
- }, Oe = r(() => {
291
- const e = z.value.length, t = l.multi && l.showSelectAll ? 1 : 0, y = e > b.MAX_NUMBER_OF_OPTIONS, S = e + t;
290
+ }, Ae = r(() => {
291
+ const e = z.value.reduce((me, Pe) => {
292
+ const Te = l.overrideOptionCountCalculation ? l.overrideOptionCountCalculation(Pe.data) : 1;
293
+ return me + Te;
294
+ }, 0), t = l.multi && l.showSelectAll ? 1 : 0, y = e > b.MAX_NUMBER_OF_OPTIONS, S = e + t;
292
295
  let f = y ? b.MAX_NUMBER_OF_OPTIONS + 0.1 : S;
293
- return l.noResultsText && f === 0 && (f = f + 1), Re(
296
+ return l.noResultsText && f === 0 && (f = f + 1), Me(
294
297
  f * j.value + b.PADDING_PX
295
298
  );
296
299
  });
297
300
  return {
298
- onKeydown: Ae,
301
+ onKeydown: Oe,
299
302
  location: le,
300
303
  open: d,
301
304
  toggleMenu: h,
@@ -304,7 +307,7 @@ const Ue = (l, O, b) => {
304
307
  labelRef: H,
305
308
  query: T,
306
309
  containerProps: J,
307
- calculateTableHeight: Oe,
310
+ calculateTableHeight: Ae,
308
311
  wrapperProps: ve,
309
312
  filteredOptions: s,
310
313
  allSelected: $,
@@ -315,7 +318,7 @@ const Ue = (l, O, b) => {
315
318
  selectedOption: u,
316
319
  selectedOptionPrevious: v,
317
320
  selectedValue: K,
318
- onSelect: C,
321
+ onSelect: M,
319
322
  activeIndex: o,
320
323
  onCancel: Q,
321
324
  onApply: Se,
@@ -332,5 +335,5 @@ const Ue = (l, O, b) => {
332
335
  };
333
336
  };
334
337
  export {
335
- Ue as dropdownCommon
338
+ Ke as dropdownCommon
336
339
  };
@@ -1,14 +1,14 @@
1
- const u = (t, s) => {
2
- const l = (e) => e[s] || [], r = (e) => l(e)?.length > 0;
1
+ const c = (s, t) => {
2
+ const l = (e) => e && e[t] ? e[t] : [], r = (e) => l(e)?.length > 0;
3
3
  return {
4
4
  hasChildren: r,
5
5
  getChildren: l,
6
- someChildrenSelected: (e) => r(e) ? l(e).some((n) => t.value.includes(n)) : !1,
6
+ someChildrenSelected: (e) => r(e) ? l(e).some((n) => s.value.includes(n)) : !1,
7
7
  allChildrenSelected: (e) => r(e) ? l(e).every(
8
- (n) => t.value.includes(n)
8
+ (n) => s.value.includes(n)
9
9
  ) : !1
10
10
  };
11
11
  };
12
12
  export {
13
- u as useChildOptions
13
+ c as useChildOptions
14
14
  };
@@ -22,6 +22,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
22
22
  optionImageKey?: string;
23
23
  optionIconKey?: string;
24
24
  optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
25
+ showAllSelectedText?: boolean;
25
26
  statusDotType?: "default" | "disabled" | "success" | "warning" | "error" | "archive";
26
27
  }>, {
27
28
  placeholder: string;
@@ -46,6 +47,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
46
47
  optionImageKey: any;
47
48
  optionIconKey: any;
48
49
  optionIconType: any;
50
+ showAllSelectedText: boolean;
49
51
  statusDotType: any;
50
52
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
51
53
  click: () => void;
@@ -73,6 +75,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
73
75
  optionImageKey?: string;
74
76
  optionIconKey?: string;
75
77
  optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
78
+ showAllSelectedText?: boolean;
76
79
  statusDotType?: "default" | "disabled" | "success" | "warning" | "error" | "archive";
77
80
  }>, {
78
81
  placeholder: string;
@@ -97,6 +100,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
97
100
  optionImageKey: any;
98
101
  optionIconKey: any;
99
102
  optionIconType: any;
103
+ showAllSelectedText: boolean;
100
104
  statusDotType: any;
101
105
  }>>> & {
102
106
  onClick?: () => any;
@@ -123,6 +127,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
123
127
  selectedOption: any;
124
128
  showFeedbackIcon: boolean;
125
129
  brandIconType: "android" | "ios";
130
+ showAllSelectedText: boolean;
126
131
  statusDotType: "default" | "disabled" | "success" | "warning" | "error" | "archive";
127
132
  }>, {
128
133
  image?(_: {}): any;
@@ -1,7 +1,7 @@
1
1
  import o from "./DefaultDropdownTrigger.vue2.js";
2
2
  /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_ad524750_lang.css"; //*');
4
- const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-ad524750"]]);
3
+ // import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_0345d6b1_lang.css"; //*');
4
+ const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-0345d6b1"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,17 +1,17 @@
1
- import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_ad524750_lang.css"; import { defineComponent as v, computed as r, openBlock as o, createElementBlock as a, createBlock as k, createCommentVNode as n, createElementVNode as c, mergeProps as m, unref as l, renderSlot as y, createVNode as i, withCtx as I, createTextVNode as B, toDisplayString as V } from "vue";
2
- import x from "../../typography/v4/Typography.vue.js";
1
+ import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_0345d6b1_lang.css"; import { defineComponent as v, computed as r, openBlock as o, createElementBlock as a, createBlock as k, createCommentVNode as n, createElementVNode as c, mergeProps as y, unref as l, renderSlot as m, createVNode as i, withCtx as I, createTextVNode as x, toDisplayString as B } from "vue";
2
+ import w from "../../typography/v4/Typography.vue.js";
3
3
  import { DropdownTestIdModifiers as u } from "../../../testids/index.js";
4
4
  import h from "../../icon/v4/IconV4.vue.js";
5
- import w from "../../shared/FieldLabel.vue.js";
6
- import { useTestIdAttrs as D } from "../../../utils/testIds.js";
7
- import A from "../../statusDot/StatusDot.vue.js";
5
+ import V from "../../shared/FieldLabel.vue.js";
6
+ import { useTestIdAttrs as A } from "../../../utils/testIds.js";
7
+ import D from "../../statusDot/StatusDot.vue.js";
8
8
  const N = { class: "default-dropdown-wrapper" }, K = { class: "content" }, $ = {
9
9
  key: 0,
10
10
  class: "image"
11
- }, C = ["src"], P = {
11
+ }, C = ["src"], S = {
12
12
  key: 1,
13
13
  class: "start-icon"
14
- }, S = {
14
+ }, P = {
15
15
  key: 2,
16
16
  class: "status-dot"
17
17
  }, z = { class: "caret-down" }, j = /* @__PURE__ */ v({
@@ -40,15 +40,16 @@ const N = { class: "default-dropdown-wrapper" }, K = { class: "content" }, $ = {
40
40
  optionImageKey: { default: null },
41
41
  optionIconKey: { default: null },
42
42
  optionIconType: { default: null },
43
+ showAllSelectedText: { type: Boolean, default: !0 },
43
44
  statusDotType: { default: null }
44
45
  },
45
46
  emits: ["click"],
46
- setup(t, { emit: g }) {
47
- const e = t, T = r(
47
+ setup(t, { emit: T }) {
48
+ const e = t, g = r(
48
49
  () => e.feedbackVariant ? `state-${e.feedbackVariant}` : ""
49
50
  ), b = () => {
50
- g("click");
51
- }, p = D(e.testId, u), O = r(() => e.multi ? !Array.isArray(e.selectedOption) || !e.selectedOption?.length ? e.placeholder : e.options?.length === e.selectedOption.length ? `All selected (${e.selectedOption.length})` : e.selectedOption?.length === 1 && e.displayValue ? e.displayValue(e.selectedOption[0]) : `${e.selectedOption.length} selected` : e.selectedOption ? e.displayValue(e.selectedOption) : e.placeholder), d = r(() => {
51
+ T("click");
52
+ }, p = A(e.testId, u), O = r(() => e.multi ? !Array.isArray(e.selectedOption) || !e.selectedOption?.length ? e.placeholder : e.showAllSelectedText && e.options?.length === e.selectedOption.length ? `All selected (${e.selectedOption.length})` : e.selectedOption?.length === 1 && e.displayValue ? e.displayValue(e.selectedOption[0]) : `${e.selectedOption.length} selected` : e.selectedOption ? e.displayValue(e.selectedOption) : e.placeholder), d = r(() => {
52
53
  if (!e.selectedOption)
53
54
  return null;
54
55
  if (!e.multi)
@@ -57,7 +58,7 @@ const N = { class: "default-dropdown-wrapper" }, K = { class: "content" }, $ = {
57
58
  return e.selectedOption.length === 1 ? e.selectedOption[0] : null;
58
59
  });
59
60
  return (s, f) => (o(), a("div", N, [
60
- t.label ? (o(), k(w, {
61
+ t.label ? (o(), k(V, {
61
62
  key: 0,
62
63
  label: t.label,
63
64
  mandatory: t.mandatory,
@@ -67,22 +68,22 @@ const N = { class: "default-dropdown-wrapper" }, K = { class: "content" }, $ = {
67
68
  "test-id": t.testId,
68
69
  class: "dropdown-field-label"
69
70
  }, null, 8, ["label", "mandatory", "hover-help-text", "hover-help-text-placement", "disabled", "test-id"])) : n("", !0),
70
- c("div", m({
71
- class: ["dropdown-trigger", [t.size, l(T), { open: t.open, disabled: t.disabled }]]
71
+ c("div", y({
72
+ class: ["dropdown-trigger", [t.size, l(g), { open: t.open, disabled: t.disabled }]]
72
73
  }, l(p)[l(u).BUTTON_WRAPPER], {
73
74
  onClick: f[0] || (f[0] = (E) => b())
74
75
  }), [
75
76
  c("div", K, [
76
77
  s.$slots.image || l(d) && t.optionImageKey ? (o(), a("div", $, [
77
- y(s.$slots, "image", {}, () => [
78
+ m(s.$slots, "image", {}, () => [
78
79
  t.optionImageKey ? (o(), a("img", {
79
80
  key: 0,
80
81
  src: l(d)[t.optionImageKey]
81
82
  }, null, 8, C)) : n("", !0)
82
83
  ], !0)
83
84
  ])) : n("", !0),
84
- s.$slots["icon-start"] || l(d) && t.optionIconKey ? (o(), a("div", P, [
85
- y(s.$slots, "icon-start", {}, () => [
85
+ s.$slots["icon-start"] || l(d) && t.optionIconKey ? (o(), a("div", S, [
86
+ m(s.$slots, "icon-start", {}, () => [
86
87
  i(l(h), {
87
88
  type: t.optionIconType,
88
89
  name: l(d)[t.optionIconKey],
@@ -90,12 +91,12 @@ const N = { class: "default-dropdown-wrapper" }, K = { class: "content" }, $ = {
90
91
  }, null, 8, ["type", "name"])
91
92
  ], !0)
92
93
  ])) : n("", !0),
93
- t.statusDotType ? (o(), a("div", S, [
94
- i(l(A), { type: t.statusDotType }, null, 8, ["type"])
94
+ t.statusDotType ? (o(), a("div", P, [
95
+ i(l(D), { type: t.statusDotType }, null, 8, ["type"])
95
96
  ])) : n("", !0),
96
- i(l(x), m({ variant: "body1" }, l(p)[l(u).BUTTON_CONTENT], { class: "displayed-value" }), {
97
+ i(l(w), y({ variant: "body1" }, l(p)[l(u).BUTTON_CONTENT], { class: "displayed-value" }), {
97
98
  default: I(() => [
98
- B(V(l(O)), 1)
99
+ x(B(l(O)), 1)
99
100
  ]),
100
101
  _: 1
101
102
  }, 16)
@@ -26,6 +26,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
26
26
  triggerFeedbackText?: string;
27
27
  triggerFeedbackVariant?: "success" | "warning" | "error";
28
28
  triggerFeedbackShowIcon?: boolean;
29
+ triggerShowAllSelectedText?: boolean;
29
30
  size?: "small" | "medium" | "large";
30
31
  mandatory?: boolean;
31
32
  predefinedTrigger?: "default" | "icon-button" | "chip" | "app";
@@ -49,6 +50,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
49
50
  optionsListWidth?: string;
50
51
  statusType?: "default" | "disabled" | "success" | "warning" | "error" | "archive";
51
52
  disableVirtualScroll?: boolean;
53
+ overrideOptionCountCalculation?: (option: unknown) => number;
52
54
  }>, {
53
55
  multi: boolean;
54
56
  inlineSearchPlaceholder: string;
@@ -82,6 +84,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
82
84
  triggerFeedbackText: string;
83
85
  triggerFeedbackVariant: any;
84
86
  triggerFeedbackShowIcon: boolean;
87
+ triggerShowAllSelectedText: boolean;
85
88
  searchAutoFocus: boolean;
86
89
  predefinedTrigger: "default" | "icon-button" | "chip" | "app";
87
90
  optionNameKey: string;
@@ -96,6 +99,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
96
99
  optionsListWidth: any;
97
100
  statusType: any;
98
101
  disableVirtualScroll: boolean;
102
+ overrideOptionCountCalculation: any;
99
103
  }>, {
100
104
  selectItem: (option: any, index?: number) => void;
101
105
  scrollTo: (index: number) => void;
@@ -135,6 +139,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
135
139
  triggerFeedbackText?: string;
136
140
  triggerFeedbackVariant?: "success" | "warning" | "error";
137
141
  triggerFeedbackShowIcon?: boolean;
142
+ triggerShowAllSelectedText?: boolean;
138
143
  size?: "small" | "medium" | "large";
139
144
  mandatory?: boolean;
140
145
  predefinedTrigger?: "default" | "icon-button" | "chip" | "app";
@@ -158,6 +163,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
158
163
  optionsListWidth?: string;
159
164
  statusType?: "default" | "disabled" | "success" | "warning" | "error" | "archive";
160
165
  disableVirtualScroll?: boolean;
166
+ overrideOptionCountCalculation?: (option: unknown) => number;
161
167
  }>, {
162
168
  multi: boolean;
163
169
  inlineSearchPlaceholder: string;
@@ -191,6 +197,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
191
197
  triggerFeedbackText: string;
192
198
  triggerFeedbackVariant: any;
193
199
  triggerFeedbackShowIcon: boolean;
200
+ triggerShowAllSelectedText: boolean;
194
201
  searchAutoFocus: boolean;
195
202
  predefinedTrigger: "default" | "icon-button" | "chip" | "app";
196
203
  optionNameKey: string;
@@ -205,6 +212,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
205
212
  optionsListWidth: any;
206
213
  statusType: any;
207
214
  disableVirtualScroll: boolean;
215
+ overrideOptionCountCalculation: any;
208
216
  }>>> & {
209
217
  onCopyToClipboard?: () => any;
210
218
  onClear?: () => any;
@@ -242,6 +250,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
242
250
  triggerFeedbackText: string;
243
251
  triggerFeedbackVariant: "success" | "warning" | "error";
244
252
  triggerFeedbackShowIcon: boolean;
253
+ triggerShowAllSelectedText: boolean;
245
254
  predefinedTrigger: "default" | "icon-button" | "chip" | "app";
246
255
  inlineSearch: boolean;
247
256
  inlineSearchPlaceholder: string;
@@ -260,6 +269,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
260
269
  optionsListWidth: string;
261
270
  statusType: "default" | "disabled" | "success" | "warning" | "error" | "archive";
262
271
  disableVirtualScroll: boolean;
272
+ overrideOptionCountCalculation: (option: unknown) => number;
263
273
  }>, {
264
274
  label?(_: {}): any;
265
275
  "dropdown-trigger"?(_: {
@@ -1,8 +1,8 @@
1
1
  import o from "./DropdownV4.vue2.js";
2
2
  /* empty css *//* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_b484da34_lang.css"; //*');
3
+ // import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_7af4f288_lang.css"; //*');
4
4
  // import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; //');
5
- const r = /* @__PURE__ */ _(o, [["__scopeId", "data-v-b484da34"]]);
5
+ const r = /* @__PURE__ */ _(o, [["__scopeId", "data-v-7af4f288"]]);
6
6
  export {
7
7
  r as default
8
8
  };