@ironsource/shared-ui 2.1.11-rc.2 → 2.1.11-rc.21

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.
Files changed (81) hide show
  1. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_1aa6df01_lang.css +1 -0
  2. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_ba28c717_lang.css +1 -0
  3. package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_93545ce0_lang.css +1 -0
  4. package/DateRangeV4.vue_vue_type_style_index_0_scoped_309e5351_lang.css +1 -0
  5. package/DropdownV4.vue_vue_type_style_index_0_scoped_b1bde483_lang.css +1 -0
  6. package/InlineCopy.vue_vue_type_style_index_0_scoped_ad48b61e_lang.css +1 -0
  7. package/OptionV4.vue_vue_type_style_index_0_scoped_df830bf5_lang.css +1 -0
  8. package/PopoverV4.vue_vue_type_style_index_0_scoped_c7e688b1_lang.css +1 -0
  9. package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css +1 -0
  10. package/TextField.vue_vue_type_style_index_0_scoped_2e327aa1_lang.css +1 -0
  11. package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_c81a7d3e_lang.css +1 -0
  12. package/TooltipV4.vue_vue_type_style_index_0_scoped_82b46d6d_lang.css +1 -0
  13. package/TreeDropdown.vue_vue_type_style_index_0_scoped_bdfb0aef_lang.css +1 -0
  14. package/components/autocomplete/Autocomplete.vue2.js +3 -2
  15. package/components/button/v4/ToggleButtonGroupAB.vue.d.ts +3 -1
  16. package/components/button/v4/ToggleButtonGroupAB.vue.js +2 -2
  17. package/components/button/v4/ToggleButtonGroupAB.vue2.js +44 -39
  18. package/components/button/v4/index.d.ts +9 -3
  19. package/components/chart/SettingsHeader.vue.js +3 -3
  20. package/components/chart/SettingsHeader.vue2.js +34 -26
  21. package/components/datePicker/v4/DatePickerV4.vue2.js +8 -7
  22. package/components/dateRange/v4/DateRangeV4.vue.js +2 -2
  23. package/components/dateRange/v4/DateRangeV4.vue2.js +9 -9
  24. package/components/dropdown/common/Dropdown.common.js +174 -171
  25. package/components/dropdown/v3/Dropdown.vue.d.ts +2 -2
  26. package/components/dropdown/v3/index.d.ts +39 -39
  27. package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +1 -1
  28. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue.js +2 -2
  29. package/components/dropdown/v4/ButtonFilterDropdownTrigger.vue2.js +7 -7
  30. package/components/dropdown/v4/ChipDropdownTrigger.vue.js +2 -2
  31. package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +66 -44
  32. package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +75 -0
  33. package/components/dropdown/v4/ConditionalDropdown.vue.js +7 -0
  34. package/components/dropdown/v4/ConditionalDropdown.vue2.js +159 -0
  35. package/components/dropdown/v4/DropdownV4.vue.d.ts +20 -6
  36. package/components/dropdown/v4/DropdownV4.vue.js +4 -4
  37. package/components/dropdown/v4/DropdownV4.vue2.js +211 -187
  38. package/components/dropdown/v4/OptionV4.vue.d.ts +10 -0
  39. package/components/dropdown/v4/OptionV4.vue.js +2 -2
  40. package/components/dropdown/v4/OptionV4.vue2.js +135 -98
  41. package/components/dropdown/v4/TreeDropdown.vue.d.ts +6 -1
  42. package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
  43. package/components/dropdown/v4/TreeDropdown.vue2.js +161 -116
  44. package/components/dropdown/v4/index.d.ts +313 -86
  45. package/components/dropdown/v4/index.js +6 -3
  46. package/components/inlineCopy/InlineCopy.vue.d.ts +5 -0
  47. package/components/inlineCopy/InlineCopy.vue.js +2 -2
  48. package/components/inlineCopy/InlineCopy.vue2.js +24 -22
  49. package/components/inlineCopy/index.d.ts +9 -0
  50. package/components/input/v4/TextField.vue.js +3 -3
  51. package/components/input/v4/TextField.vue2.js +12 -12
  52. package/components/multibar/MultiBarMenu.vue2.js +3 -2
  53. package/components/popover/v4/PopoverV4.vue.d.ts +14 -2
  54. package/components/popover/v4/PopoverV4.vue.js +4 -3
  55. package/components/popover/v4/PopoverV4.vue2.js +40 -24
  56. package/components/popover/v4/index.d.ts +55 -11
  57. package/components/sortableList/SortableList.vue.d.ts +1 -1
  58. package/components/sortableList/index.d.ts +4 -4
  59. package/components/table/common/Table.common.js +26 -28
  60. package/components/table/v4/DataGridMenu.vue2.js +3 -2
  61. package/components/table/v4/index.d.ts +2 -2
  62. package/components/tooltip/v4/TooltipV4.vue.d.ts +10 -0
  63. package/components/tooltip/v4/TooltipV4.vue.js +2 -2
  64. package/components/tooltip/v4/TooltipV4.vue2.js +24 -21
  65. package/components/tooltip/v4/index.d.ts +39 -1
  66. package/index.d.ts +860 -213
  67. package/index.js +1 -1
  68. package/mocks/options.d.ts +48 -2
  69. package/package.json +3 -2
  70. package/ButtonFilterDropdownTrigger.vue_vue_type_style_index_0_scoped_7f750550_lang.css +0 -1
  71. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_49bd7193_lang.css +0 -1
  72. package/DateRangeV4.vue_vue_type_style_index_0_scoped_f81413ec_lang.css +0 -1
  73. package/DropdownV4.vue_vue_type_style_index_0_scoped_991a7aad_lang.css +0 -1
  74. package/InlineCopy.vue_vue_type_style_index_0_scoped_893a203c_lang.css +0 -1
  75. package/OptionV4.vue_vue_type_style_index_0_scoped_4070942a_lang.css +0 -1
  76. package/PopoverV4.vue_vue_type_style_index_0_scoped_74bbce13_lang.css +0 -1
  77. package/SettingsHeader.vue_vue_type_style_index_0_scoped_1791e4fe_lang.css +0 -1
  78. package/TextField.vue_vue_type_style_index_0_scoped_4d9bf5b2_lang.css +0 -1
  79. package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_9d9e51c0_lang.css +0 -1
  80. package/TooltipV4.vue_vue_type_style_index_0_scoped_fcdb9d02_lang.css +0 -1
  81. package/TreeDropdown.vue_vue_type_style_index_0_scoped_6ac5f602_lang.css +0 -1
@@ -0,0 +1,159 @@
1
+ import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_93545ce0_lang.css"; import { defineComponent as B, computed as f, ref as s, watch as b, openBlock as k, createBlock as E, unref as u, withCtx as m, createVNode as h, mergeProps as A, createElementVNode as F, isRef as U, createElementBlock as $, createTextVNode as z, toDisplayString as M, createCommentVNode as P } from "vue";
2
+ import w from "./DropdownV4.vue.js";
3
+ import "./DefaultDropdownTrigger.vue.js";
4
+ import "./IconButtonDropdownTrigger.vue.js";
5
+ import I from "./ChipDropdownTrigger.vue.js";
6
+ import "./AppDropdownTrigger.vue.js";
7
+ import "./ButtonDropdownTrigger.vue.js";
8
+ import "./ButtonFilterDropdownTrigger.vue.js";
9
+ import "./TreeDropdown.vue.js";
10
+ import "./OptionV4.vue.js";
11
+ import "./ConditionalDropdown.vue.js";
12
+ import L from "../../search/v4/SearchV4.vue.js";
13
+ import Q from "../../typography/v4/Typography.vue.js";
14
+ import { useDebounceFn as R } from "@vueuse/core";
15
+ const j = { class: "conditional-container" }, q = {
16
+ key: 0,
17
+ class: "custom-list-area"
18
+ }, se = /* @__PURE__ */ B({
19
+ __name: "ConditionalDropdown",
20
+ props: {
21
+ selectedCondition: null,
22
+ appliedSelections: null,
23
+ conditionalOptions: null,
24
+ label: { default: "" },
25
+ testId: { default: "" },
26
+ comparingKey: { default: "id" },
27
+ fetchFnCallback: null,
28
+ optionNameKey: { default: "name" },
29
+ minCharsToStart: { default: 3 },
30
+ isOpen: { type: Boolean, default: !1 }
31
+ },
32
+ emits: ["update:selectedCondition", "update:appliedSelections", "clear"],
33
+ setup(c, { emit: y }) {
34
+ const t = c, g = f({
35
+ get: () => t.appliedSelections,
36
+ set: (o) => {
37
+ y("update:appliedSelections", o);
38
+ }
39
+ }), a = f({
40
+ get: () => t.selectedCondition || t.conditionalOptions[0],
41
+ set: (o) => {
42
+ y("update:selectedCondition", o);
43
+ }
44
+ }), d = s(!0), e = s([]), p = s([]), C = s(!0), r = s(!1), l = s(""), N = s(""), v = s(t.label), D = f(() => (!l.value || l.value?.length < t.minCharsToStart) && !e.value.length ? `Enter at least ${t.minCharsToStart} keywords to begin` : "No results found"), T = f(() => {
45
+ const o = d.value ? 2.5 : 4;
46
+ return e.value.length ? null : o;
47
+ }), K = R(async (o) => {
48
+ try {
49
+ r.value = !0;
50
+ const i = await t.fetchFnCallback(o);
51
+ r.value = !1, e.value = i, O();
52
+ } catch (i) {
53
+ console.error("Error fetching data:", i);
54
+ }
55
+ }, 400), S = (o) => {
56
+ o.length >= t.minCharsToStart ? K(o) : e.value = [];
57
+ }, O = () => {
58
+ l.value && e.value.length && !r.value && !a.value.multi ? e.value[0].conditionalOptions ? e.value[0] = {
59
+ name: l.value,
60
+ conditionalOptions: !0,
61
+ conditionalName: a.value.label,
62
+ [t.comparingKey]: l.value
63
+ } : e.value = [
64
+ {
65
+ name: l.value,
66
+ conditionalOptions: !0,
67
+ conditionalName: a.value.label,
68
+ [t.comparingKey]: l.value
69
+ },
70
+ ...e.value
71
+ ] : e.value.length && e.value[0].conditionalOptions && e.value.shift();
72
+ };
73
+ b(l, () => {
74
+ S(l.value);
75
+ }), b(a, () => {
76
+ O();
77
+ });
78
+ const V = () => {
79
+ N.value = l.value, v.value = `${t.label} ${a.value.label.toLowerCase()}`, g.value = d.value ? [...p.value] : { ...p.value }, C.value = d.value;
80
+ };
81
+ b(a, () => {
82
+ a.value.multi ? (r.value = !0, p.value = [], setTimeout(() => {
83
+ r.value = !1, d.value = !0;
84
+ }, 100)) : setTimeout(() => {
85
+ d.value = !1;
86
+ }, 100);
87
+ });
88
+ const x = () => {
89
+ p.value = [], g.value = [], a.value = null, v.value = t.label, l.value = "", y("clear");
90
+ };
91
+ return (o, i) => (k(), E(u(w), {
92
+ selected: p.value,
93
+ "onUpdate:selected": i[2] || (i[2] = (n) => p.value = n),
94
+ "predefined-trigger": "chip",
95
+ "display-value": (n) => n?.[c.optionNameKey],
96
+ multi: d.value,
97
+ options: e.value,
98
+ placeholder: v.value,
99
+ "search-placeholder": "Search",
100
+ "option-name-key": c.optionNameKey,
101
+ "with-conditions": "",
102
+ "inline-search": "",
103
+ "custom-number-of-displayed-options": u(T),
104
+ "options-list-width": "330px",
105
+ loading: r.value,
106
+ "comparing-key": c.comparingKey,
107
+ "is-open": c.isOpen,
108
+ onOnsearch: S,
109
+ onApply: V
110
+ }, {
111
+ "dropdown-trigger": m(({ defaultTriggerProps: n }) => [
112
+ h(u(I), A(n, {
113
+ label: v.value,
114
+ "selected-option": u(g),
115
+ multi: C.value,
116
+ onClear: x
117
+ }), null, 16, ["label", "selected-option", "multi"])
118
+ ]),
119
+ "dropdown-conditions": m(() => [
120
+ F("div", j, [
121
+ h(u(w), {
122
+ selected: u(a),
123
+ "onUpdate:selected": i[0] || (i[0] = (n) => U(a) ? a.value = n : null),
124
+ options: c.conditionalOptions,
125
+ "option-name-key": "label",
126
+ "display-value": (n) => n?.label,
127
+ container: ".conditional-container",
128
+ size: "small"
129
+ }, null, 8, ["selected", "options", "display-value"])
130
+ ])
131
+ ]),
132
+ "inline-search": m(() => [
133
+ h(u(L), {
134
+ modelValue: l.value,
135
+ "onUpdate:modelValue": i[1] || (i[1] = (n) => l.value = n),
136
+ class: "inline-search",
137
+ placeholder: "Search",
138
+ variant: "transparent",
139
+ size: "md",
140
+ "auto-focus": ""
141
+ }, null, 8, ["modelValue"])
142
+ ]),
143
+ "custom-list-area": m(() => [
144
+ !e.value.length && !r.value ? (k(), $("div", q, [
145
+ h(Q, { variant: "body1" }, {
146
+ default: m(() => [
147
+ z(M(u(D)), 1)
148
+ ]),
149
+ _: 1
150
+ })
151
+ ])) : P("", !0)
152
+ ]),
153
+ _: 1
154
+ }, 8, ["selected", "display-value", "multi", "options", "placeholder", "option-name-key", "custom-number-of-displayed-options", "loading", "comparing-key", "is-open"]));
155
+ }
156
+ });
157
+ export {
158
+ se as default
159
+ };
@@ -35,7 +35,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
35
35
  onSearch?: (option: any, term: string) => boolean;
36
36
  noResultsText?: string;
37
37
  searchAutoFocus?: boolean;
38
- onClear?: () => void;
38
+ onClearSearch?: () => void;
39
39
  displayValue: (option: unknown) => string;
40
40
  optionNameKey?: string;
41
41
  optionIconKey?: string;
@@ -43,6 +43,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
43
43
  optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
44
44
  optionEndIconKey?: string;
45
45
  optionEndIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
46
+ optionsEndTextIconKey?: string;
46
47
  optionFlagKey?: string;
47
48
  valueToCopy?: string;
48
49
  disabledOptionKey?: string;
@@ -57,6 +58,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
57
58
  statusType?: "default" | "disabled" | "success" | "warning" | "error" | "archive";
58
59
  disableVirtualScroll?: boolean;
59
60
  overrideOptionCountCalculation?: (option: unknown) => number;
61
+ withConditions?: boolean;
60
62
  }>, {
61
63
  multi: boolean;
62
64
  inlineSearchPlaceholder: string;
@@ -76,7 +78,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
76
78
  placeholder: string;
77
79
  size: string;
78
80
  onSearch: any;
79
- onClear: () => true;
81
+ onClearSearch: () => true;
80
82
  theme: string;
81
83
  container: string;
82
84
  flip: boolean;
@@ -99,6 +101,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
99
101
  optionIconType: any;
100
102
  optionEndIconKey: string;
101
103
  optionEndIconType: any;
104
+ optionsEndTextIconKey: any;
102
105
  optionFlagKey: any;
103
106
  valueToCopy: any;
104
107
  disabledOptionKey: string;
@@ -112,6 +115,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
112
115
  statusType: any;
113
116
  disableVirtualScroll: boolean;
114
117
  overrideOptionCountCalculation: any;
118
+ withConditions: boolean;
115
119
  }>, {
116
120
  selectItem: (option: any, index?: number) => void;
117
121
  scrollTo: (index: number) => void;
@@ -161,7 +165,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
161
165
  onSearch?: (option: any, term: string) => boolean;
162
166
  noResultsText?: string;
163
167
  searchAutoFocus?: boolean;
164
- onClear?: () => void;
168
+ onClearSearch?: () => void;
165
169
  displayValue: (option: unknown) => string;
166
170
  optionNameKey?: string;
167
171
  optionIconKey?: string;
@@ -169,6 +173,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
169
173
  optionIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
170
174
  optionEndIconKey?: string;
171
175
  optionEndIconType?: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
176
+ optionsEndTextIconKey?: string;
172
177
  optionFlagKey?: string;
173
178
  valueToCopy?: string;
174
179
  disabledOptionKey?: string;
@@ -183,6 +188,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
183
188
  statusType?: "default" | "disabled" | "success" | "warning" | "error" | "archive";
184
189
  disableVirtualScroll?: boolean;
185
190
  overrideOptionCountCalculation?: (option: unknown) => number;
191
+ withConditions?: boolean;
186
192
  }>, {
187
193
  multi: boolean;
188
194
  inlineSearchPlaceholder: string;
@@ -202,7 +208,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
202
208
  placeholder: string;
203
209
  size: string;
204
210
  onSearch: any;
205
- onClear: () => true;
211
+ onClearSearch: () => true;
206
212
  theme: string;
207
213
  container: string;
208
214
  flip: boolean;
@@ -225,6 +231,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
225
231
  optionIconType: any;
226
232
  optionEndIconKey: string;
227
233
  optionEndIconType: any;
234
+ optionsEndTextIconKey: any;
228
235
  optionFlagKey: any;
229
236
  valueToCopy: any;
230
237
  disabledOptionKey: string;
@@ -238,6 +245,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
238
245
  statusType: any;
239
246
  disableVirtualScroll: boolean;
240
247
  overrideOptionCountCalculation: any;
248
+ withConditions: boolean;
241
249
  }>>> & {
242
250
  onCopyToClipboard?: () => any;
243
251
  onClear?: () => any;
@@ -262,7 +270,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
262
270
  skidding: number;
263
271
  modelValue: any;
264
272
  selected: any;
265
- onClear: () => void;
273
+ valueToCopy: string;
266
274
  placeholder: string;
267
275
  multi: boolean;
268
276
  showSelectAll: boolean;
@@ -283,14 +291,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
283
291
  onSearch: (option: any, term: string) => boolean;
284
292
  noResultsText: string;
285
293
  searchAutoFocus: boolean;
294
+ onClearSearch: () => void;
286
295
  optionNameKey: string;
287
296
  optionIconKey: string;
288
297
  optionImageKey: string;
289
298
  optionIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
290
299
  optionEndIconKey: string;
291
300
  optionEndIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
301
+ optionsEndTextIconKey: string;
292
302
  optionFlagKey: string;
293
- valueToCopy: string;
294
303
  disabledOptionKey: string;
295
304
  optionTwoLinesVariant: "horizontal" | "vertical";
296
305
  optionTwoLinesKey: string;
@@ -302,6 +311,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
302
311
  statusType: "default" | "disabled" | "success" | "warning" | "error" | "archive";
303
312
  disableVirtualScroll: boolean;
304
313
  overrideOptionCountCalculation: (option: unknown) => number;
314
+ withConditions: boolean;
305
315
  }>, {
306
316
  label?(_: {}): any;
307
317
  "dropdown-trigger"?(_: {
@@ -329,6 +339,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
329
339
  optionIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
330
340
  optionAndIconKey: string;
331
341
  optionEndIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat" | "content-rate";
342
+ optionsEndTextIconKey: string;
332
343
  optionFlagKey: string;
333
344
  feedbackVariant: "success" | "warning" | "error";
334
345
  valueToCopy: string;
@@ -340,10 +351,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
340
351
  onClick: () => void;
341
352
  };
342
353
  }): any;
354
+ "dropdown-conditions"?(_: {}): any;
343
355
  "inline-search"?(_: {}): any;
344
356
  "input-list"?(_: {
345
357
  open: true;
346
358
  }): any;
359
+ "custom-list-area"?(_: {}): any;
360
+ "select-all"?(_: {}): any;
347
361
  "group-option"?(_: {}): any;
348
362
  default?(_: {
349
363
  option: unknown;
@@ -1,8 +1,8 @@
1
1
  import o from "./DropdownV4.vue2.js";
2
- /* empty css *//* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_991a7aad_lang.css"; //*');
2
+ /* empty css *//* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_b1bde483_lang.css"; //*');
4
4
  // import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; //');
5
- const a = /* @__PURE__ */ _(o, [["__scopeId", "data-v-991a7aad"]]);
5
+ const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-b1bde483"]]);
6
6
  export {
7
- a as default
7
+ r as default
8
8
  };