@ironsource/shared-ui 2.1.11-test.7 → 2.1.11-test.9

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 (40) hide show
  1. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_ba28c717_lang.css +1 -0
  2. package/ConditionalDroprown.vue_vue_type_style_index_0_scoped_546e19a9_lang.css +1 -0
  3. package/DropdownV4.vue_vue_type_style_index_0_scoped_f88a132e_lang.css +1 -0
  4. package/OptionV4.vue_vue_type_style_index_0_scoped_df830bf5_lang.css +1 -0
  5. package/TreeDropdown.vue_vue_type_style_index_0_scoped_bdfb0aef_lang.css +1 -0
  6. package/components/autocomplete/Autocomplete.vue2.js +3 -2
  7. package/components/chart/SettingsHeader.vue2.js +3 -2
  8. package/components/datePicker/v4/DatePickerV4.vue2.js +8 -7
  9. package/components/dateRange/v4/DateRangeV4.vue2.js +21 -20
  10. package/components/dropdown/common/Dropdown.common.js +127 -127
  11. package/components/dropdown/v3/Dropdown.vue.d.ts +1 -1
  12. package/components/dropdown/v3/index.d.ts +12 -12
  13. package/components/dropdown/v4/ChipDropdownTrigger.vue.js +2 -2
  14. package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +66 -44
  15. package/components/dropdown/v4/ConditionalDroprown.vue.d.ts +68 -0
  16. package/components/dropdown/v4/ConditionalDroprown.vue.js +7 -0
  17. package/components/dropdown/v4/ConditionalDroprown.vue2.js +157 -0
  18. package/components/dropdown/v4/DropdownV4.vue.d.ts +6 -5
  19. package/components/dropdown/v4/DropdownV4.vue.js +3 -3
  20. package/components/dropdown/v4/DropdownV4.vue2.js +85 -78
  21. package/components/dropdown/v4/OptionV4.vue.d.ts +5 -0
  22. package/components/dropdown/v4/OptionV4.vue.js +2 -2
  23. package/components/dropdown/v4/OptionV4.vue2.js +119 -93
  24. package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
  25. package/components/dropdown/v4/TreeDropdown.vue2.js +105 -95
  26. package/components/dropdown/v4/index.d.ts +160 -27
  27. package/components/dropdown/v4/index.js +6 -3
  28. package/components/multibar/MultiBarMenu.vue2.js +3 -2
  29. package/components/popover/v4/PopoverV4.vue.js +3 -2
  30. package/components/popover/v4/PopoverV4.vue2.js +1 -1
  31. package/components/table/common/Table.common.js +26 -28
  32. package/components/table/v4/DataGridMenu.vue2.js +3 -2
  33. package/index.d.ts +316 -51
  34. package/index.js +1 -1
  35. package/mocks/options.d.ts +19 -4
  36. package/package.json +2 -1
  37. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_49bd7193_lang.css +0 -1
  38. package/DropdownV4.vue_vue_type_style_index_0_scoped_562f0b72_lang.css +0 -1
  39. package/OptionV4.vue_vue_type_style_index_0_scoped_da829544_lang.css +0 -1
  40. package/TreeDropdown.vue_vue_type_style_index_0_scoped_985779f7_lang.css +0 -1
@@ -1,30 +1,36 @@
1
- import "../../../OptionV4.vue_vue_type_style_index_0_scoped_da829544_lang.css"; import { defineComponent as N, ref as w, watch as P, computed as $, openBlock as o, createBlock as p, unref as n, createSlots as V, withCtx as d, createElementVNode as s, normalizeClass as T, createCommentVNode as i, createElementBlock as l, renderSlot as u, createVNode as r, toDisplayString as g, createTextVNode as x, withModifiers as O, Fragment as F, renderList as D } from "vue";
1
+ import "../../../OptionV4.vue_vue_type_style_index_0_scoped_df830bf5_lang.css"; import { defineComponent as N, ref as I, watch as L, computed as w, openBlock as o, createBlock as v, unref as n, createSlots as P, withCtx as d, createElementVNode as c, normalizeClass as k, createCommentVNode as l, createElementBlock as i, renderSlot as m, createVNode as s, toDisplayString as r, createTextVNode as y, withModifiers as $, Fragment as V, renderList as F } from "vue";
2
2
  import "../../typography/Heading.vue.js";
3
- import R from "../../typography/Text.vue.js";
4
- import j from "../../checkbox/v4/CheckboxV4.vue.js";
5
- import m from "../../icon/v4/IconV4.vue.js";
3
+ import D from "../../typography/Text.vue.js";
4
+ import R from "../../checkbox/v4/CheckboxV4.vue.js";
5
+ import f from "../../icon/v4/IconV4.vue.js";
6
6
  import "../../icon/v4/IconFlag.vue.js";
7
- import { NOOP as H } from "@vue/shared";
8
- import { optionCommon as U } from "../common/Option.common.js";
9
- import K from "../../typography/v4/Typography.vue.js";
10
- import q from "../../tooltip/v4/TooltipV4.vue.js";
11
- import { isElementTruncated as G } from "../../../utils/text.js";
12
- import { promiseTimeout as J } from "@vueuse/core";
13
- import { SHARED_ASSETS_CDN_DOMAIN as Q } from "../../../consts/configs.js";
14
- const W = { class: "multiline-tooltip" }, X = {
7
+ import { NOOP as j } from "@vue/shared";
8
+ import { optionCommon as H } from "../common/Option.common.js";
9
+ import T from "../../typography/v4/Typography.vue.js";
10
+ import U from "../../tooltip/v4/TooltipV4.vue.js";
11
+ import { isElementTruncated as q } from "../../../utils/text.js";
12
+ import { promiseTimeout as G } from "@vueuse/core";
13
+ import { SHARED_ASSETS_CDN_DOMAIN as J } from "../../../consts/configs.js";
14
+ const Q = { class: "multiline-tooltip" }, W = {
15
15
  key: 1,
16
16
  class: "image"
17
- }, Y = ["src"], Z = {
17
+ }, X = ["src"], Y = {
18
18
  key: 2,
19
19
  class: "flag"
20
- }, _ = ["src"], ee = {
20
+ }, Z = ["src"], _ = {
21
21
  key: 3,
22
22
  class: "start-icon"
23
- }, te = { class: "main-text" }, ne = {
23
+ }, ee = {
24
24
  key: 0,
25
+ class: "main-text"
26
+ }, te = {
27
+ key: 1,
28
+ class: "main-text"
29
+ }, ne = {
30
+ key: 2,
25
31
  class: "end-text-icon"
26
32
  }, oe = {
27
- key: 1,
33
+ key: 3,
28
34
  class: "caption-text"
29
35
  }, ie = {
30
36
  key: 4,
@@ -53,168 +59,188 @@ const W = { class: "multiline-tooltip" }, X = {
53
59
  optionTwoLinesVariant: { default: void 0 },
54
60
  optionTwoLinesKey: { default: void 0 },
55
61
  treeChildShown: { type: Boolean, default: !1 },
56
- optionFlagKey: { default: null }
62
+ optionFlagKey: { default: null },
63
+ isMulti: { type: Boolean, default: !1 }
57
64
  },
58
65
  emits: ["toggleTreeCollapse"],
59
- setup(e, { emit: B }) {
60
- const a = e, { selected: k, isMulti: v, id: S, onClick: E, api: C } = U(a), z = (t) => {
61
- a.stopOptionClickEventPropagation && t.stopPropagation(), a.disabled ? H() : E(t);
62
- }, y = w(null), b = w(!1);
63
- P([() => a.treeChildShown, y], async () => {
64
- await J(100), b.value = y.value && G(y.value);
66
+ setup(e, { emit: O }) {
67
+ const a = e, { selected: h, id: B, onClick: S, api: K } = H(a), M = (t) => {
68
+ a.stopOptionClickEventPropagation && t.stopPropagation(), a.disabled ? j() : S(t);
69
+ }, g = I(null), C = I(!1);
70
+ L([() => a.treeChildShown, g], async () => {
71
+ await G(100), C.value = g.value && q(g.value);
65
72
  });
66
- const A = (t) => t && typeof t == "object" && "optionTooltipText" in t ? (Array.isArray(t.optionTooltipText), t.optionTooltipText) : b.value ? t[a.nameKey] : "", h = $(() => A(a.option)), L = (t) => t && typeof t == "object" && "optionTooltipTestId" in t ? t.optionTooltipTestId : null, M = () => {
67
- B("toggleTreeCollapse", a.option);
68
- }, I = $(() => a.optionFlagKey ? `${Q}/assets/flags/v4/${a.option[a.optionFlagKey]?.toLowerCase()}.svg` : null);
69
- return (t, f) => (o(), p(n(q), {
70
- text: n(h),
71
- "test-id": L(e.option),
73
+ const A = (t) => t && typeof t == "object" && "optionTooltipText" in t ? (Array.isArray(t.optionTooltipText), t.optionTooltipText) : C.value ? t[a.nameKey] : "", x = w(() => A(a.option)), E = (t) => t && typeof t == "object" && "optionTooltipTestId" in t ? t.optionTooltipTestId : null, z = () => {
74
+ O("toggleTreeCollapse", a.option);
75
+ }, b = w(() => a.optionFlagKey ? `${J}/assets/flags/v4/${a.option[a.optionFlagKey]?.toLowerCase()}.svg` : null);
76
+ return (t, p) => (o(), v(n(U), {
77
+ text: n(x),
78
+ "test-id": E(e.option),
72
79
  placement: e.toolTipPlacement,
73
80
  class: "tooltip-option"
74
- }, V({
81
+ }, P({
75
82
  default: d(() => [
76
- s("div", {
83
+ c("div", {
77
84
  ref: "el",
78
- class: T(["item-container", {
85
+ class: k(["item-container", {
79
86
  "item-container--disabled": e.disabled,
80
87
  "item-container--active": e.nameKey ? !1 : e.active,
81
- "item-container--selected": n(k),
82
- "item-container--multi": n(v)
88
+ "item-container--selected": n(h),
89
+ "item-container--multi": e.isMulti
83
90
  }])
84
91
  }, [
85
- s("div", {
86
- class: T(["item", {
87
- "item--multi": n(v),
92
+ c("div", {
93
+ class: k(["item", {
94
+ "item--multi": e.isMulti,
88
95
  "item--with-icon": t.$slots["icon-start"] || t.$slots.image
89
96
  }])
90
97
  }, [
91
- n(v) ? (o(), p(n(j), {
98
+ e.isMulti || e.selectAllOption ? (o(), v(n(R), {
92
99
  key: 0,
93
- id: n(S).toString(),
100
+ id: n(B).toString(),
94
101
  tabindex: "-1",
95
102
  class: "checkbox",
96
- "is-checked": n(k),
103
+ "is-checked": n(h),
97
104
  "is-indeterminate": e.isIndeterminate,
98
- onClick: f[0] || (f[0] = (c) => z(c))
99
- }, null, 8, ["id", "is-checked", "is-indeterminate"])) : i("", !0),
100
- t.$slots.image || e.imageKey ? (o(), l("div", X, [
101
- u(t.$slots, "image", {}, () => [
102
- e.imageKey ? (o(), l("img", {
105
+ onClick: p[0] || (p[0] = (u) => M(u))
106
+ }, null, 8, ["id", "is-checked", "is-indeterminate"])) : l("", !0),
107
+ t.$slots.image || e.imageKey ? (o(), i("div", W, [
108
+ m(t.$slots, "image", {}, () => [
109
+ e.imageKey ? (o(), i("img", {
103
110
  key: 0,
104
111
  src: e.option[e.imageKey]
105
- }, null, 8, Y)) : i("", !0)
112
+ }, null, 8, X)) : l("", !0)
106
113
  ], !0)
107
- ])) : i("", !0),
108
- t.$slots.flag || e.optionFlagKey ? (o(), l("div", Z, [
109
- u(t.$slots, "flag", {}, () => [
110
- n(I) ? (o(), l("img", {
114
+ ])) : l("", !0),
115
+ t.$slots.flag || e.optionFlagKey ? (o(), i("div", Y, [
116
+ m(t.$slots, "flag", {}, () => [
117
+ n(b) ? (o(), i("img", {
111
118
  key: 0,
112
- src: n(I)
113
- }, null, 8, _)) : i("", !0)
119
+ src: n(b)
120
+ }, null, 8, Z)) : l("", !0)
114
121
  ], !0)
115
- ])) : i("", !0),
116
- t.$slots["icon-start"] || e.iconKey ? (o(), l("div", ee, [
117
- u(t.$slots, "icon-start", {}, () => [
118
- r(n(m), {
122
+ ])) : l("", !0),
123
+ t.$slots["icon-start"] || e.iconKey ? (o(), i("div", _, [
124
+ m(t.$slots, "icon-start", {}, () => [
125
+ s(n(f), {
119
126
  type: e.iconType,
120
127
  name: e.option[e.iconKey],
121
128
  size: e.iconType === "regular" ? "20px" : "16px"
122
129
  }, null, 8, ["type", "name", "size"])
123
130
  ], !0)
124
- ])) : i("", !0),
125
- s("div", {
131
+ ])) : l("", !0),
132
+ c("div", {
126
133
  ref_key: "textContainerRef",
127
- ref: y,
134
+ ref: g,
128
135
  class: "text-container"
129
136
  }, [
130
- r(n(K), {
137
+ s(n(T), {
131
138
  class: "option-text",
132
139
  variant: "body2"
133
140
  }, {
134
141
  default: d(() => [
135
- u(t.$slots, "default", {}, () => [
136
- s("div", {
137
- class: T(`option-content-${e.optionTwoLinesVariant} option-content`)
142
+ m(t.$slots, "default", {}, () => [
143
+ c("div", {
144
+ class: k(`option-content-${e.optionTwoLinesVariant} option-content`)
138
145
  }, [
139
- s("div", te, g(e.option[e.nameKey]), 1),
140
- e.endTextIconKey && e.option[e.endTextIconKey] ? (o(), l("span", ne, [
141
- r(n(m), {
146
+ e.option.conditionalOptions ? (o(), i("div", te, [
147
+ s(n(T), {
148
+ variant: "body2",
149
+ class: "conditional-option-label"
150
+ }, {
151
+ default: d(() => [
152
+ y(r(e.option.conditionalName) + ": ", 1)
153
+ ]),
154
+ _: 1
155
+ }),
156
+ s(n(T), {
157
+ variant: "h5",
158
+ class: "conditional-option-value"
159
+ }, {
160
+ default: d(() => [
161
+ y("'" + r(e.option[e.nameKey]) + "'", 1)
162
+ ]),
163
+ _: 1
164
+ })
165
+ ])) : (o(), i("div", ee, r(e.option[e.nameKey]), 1)),
166
+ e.endTextIconKey && e.option[e.endTextIconKey] ? (o(), i("span", ne, [
167
+ s(n(f), {
142
168
  type: "regular",
143
169
  name: e.option[e.endTextIconKey],
144
170
  size: "16px"
145
171
  }, null, 8, ["name"])
146
- ])) : i("", !0),
147
- e.optionTwoLinesKey ? (o(), l("div", oe, [
148
- r(n(K), { variant: "caption" }, {
172
+ ])) : l("", !0),
173
+ e.optionTwoLinesKey ? (o(), i("div", oe, [
174
+ s(n(T), { variant: "caption" }, {
149
175
  default: d(() => [
150
- x(g(e.option[e.optionTwoLinesKey]), 1)
176
+ y(r(e.option[e.optionTwoLinesKey]), 1)
151
177
  ]),
152
178
  _: 1
153
179
  })
154
- ])) : i("", !0)
180
+ ])) : l("", !0)
155
181
  ], 2)
156
182
  ], !0)
157
183
  ]),
158
184
  _: 3
159
185
  }),
160
- e.subtitle ? (o(), p(n(R), {
186
+ e.subtitle ? (o(), v(n(D), {
161
187
  key: 0,
162
188
  class: "subtitle",
163
189
  size: "xs"
164
190
  }, {
165
191
  default: d(() => [
166
- x(g(e.subtitle), 1)
192
+ y(r(e.subtitle), 1)
167
193
  ]),
168
194
  _: 1
169
- })) : i("", !0)
195
+ })) : l("", !0)
170
196
  ], 512),
171
- t.$slots["icon-end"] || e.endIconKey && e.option[e.endIconKey] ? (o(), l("div", ie, [
172
- u(t.$slots, "icon-end", {}, () => [
173
- r(n(m), {
197
+ t.$slots["icon-end"] || e.endIconKey && e.option[e.endIconKey] ? (o(), i("div", ie, [
198
+ m(t.$slots, "icon-end", {}, () => [
199
+ s(n(f), {
174
200
  type: e.endIconType || "regular",
175
201
  name: e.option[e.endIconKey],
176
202
  size: e.endIconType === "regular" || e.endIconType === "ab-test" ? "20px" : "16px"
177
203
  }, null, 8, ["type", "name", "size"])
178
204
  ], !0)
179
- ])) : i("", !0),
180
- e.treeMainOption ? (o(), l("div", {
205
+ ])) : l("", !0),
206
+ e.treeMainOption ? (o(), i("div", {
181
207
  key: 5,
182
208
  class: "tree-main-arrow-wrapper",
183
- onClick: O(M, ["stop"])
209
+ onClick: $(z, ["stop"])
184
210
  }, [
185
- r(n(m), {
211
+ s(n(f), {
186
212
  name: "caret-down",
187
213
  size: "16px",
188
- class: T(`app-trigger--icon ${e.treeMainOptionExpanded && "expanded"}`)
214
+ class: k(`app-trigger--icon ${e.treeMainOptionExpanded && "expanded"}`)
189
215
  }, null, 8, ["class"])
190
- ], 8, le)) : i("", !0)
216
+ ], 8, le)) : l("", !0)
191
217
  ], 2),
192
- n(C).clearable && n(k) ? (o(), l("div", ae, [
193
- s("button", {
218
+ n(K).clearable && n(h) ? (o(), i("div", ae, [
219
+ c("button", {
194
220
  class: "clear-button",
195
- onClick: f[1] || (f[1] = O((c) => n(C).clearSelection(), ["prevent", "stop"]))
221
+ onClick: p[1] || (p[1] = $((u) => n(K).clearSelection(), ["prevent", "stop"]))
196
222
  }, [
197
- r(n(m), {
223
+ s(n(f), {
198
224
  name: "close",
199
225
  width: "8",
200
226
  height: "8"
201
227
  })
202
228
  ])
203
- ])) : i("", !0)
229
+ ])) : l("", !0)
204
230
  ], 2)
205
231
  ]),
206
232
  _: 2
207
233
  }, [
208
- Array.isArray(n(h)) ? {
234
+ Array.isArray(n(x)) ? {
209
235
  name: "tooltip",
210
236
  fn: d(() => [
211
- s("div", W, [
212
- (o(!0), l(F, null, D(n(h), (c) => (o(), p(n(K), {
213
- key: c,
237
+ c("div", Q, [
238
+ (o(!0), i(V, null, F(n(x), (u) => (o(), v(n(T), {
239
+ key: u,
214
240
  variant: "body2"
215
241
  }, {
216
242
  default: d(() => [
217
- x(g(c), 1)
243
+ y(r(u), 1)
218
244
  ]),
219
245
  _: 2
220
246
  }, 1024))), 128))
@@ -1,7 +1,7 @@
1
1
  import o from "./TreeDropdown.vue2.js";
2
2
  /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_985779f7_lang.css"; //*');
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-985779f7"]]);
3
+ // import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_bdfb0aef_lang.css"; //*');
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-bdfb0aef"]]);
5
5
  export {
6
6
  s as default
7
7
  };