@ironsource/shared-ui 2.1.10 → 2.1.11-rc.0

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,32 +1,32 @@
1
- import "../../../OptionV4.vue_vue_type_style_index_0_scoped_058de532_lang.css"; import { defineComponent as N, ref as b, watch as P, computed as V, openBlock as n, createBlock as T, unref as o, withCtx as m, createElementVNode as s, normalizeClass as f, createCommentVNode as i, createElementBlock as a, renderSlot as d, createVNode as c, toDisplayString as k, createTextVNode as x, withModifiers as w } from "vue";
1
+ import "../../../OptionV4.vue_vue_type_style_index_0_scoped_4070942a_lang.css"; import { defineComponent as N, ref as I, watch as P, computed as $, openBlock as i, createBlock as y, unref as o, createSlots as V, withCtx as r, createElementVNode as s, normalizeClass as p, createCommentVNode as n, createElementBlock as a, renderSlot as u, createVNode as d, toDisplayString as g, createTextVNode as C, withModifiers as O, Fragment as F, renderList as D } from "vue";
2
2
  import "../../typography/Heading.vue.js";
3
- import L from "../../typography/Text.vue.js";
4
- import A from "../../checkbox/v4/CheckboxV4.vue.js";
5
- import y from "../../icon/v4/IconV4.vue.js";
3
+ import R from "../../typography/Text.vue.js";
4
+ import j from "../../checkbox/v4/CheckboxV4.vue.js";
5
+ import T from "../../icon/v4/IconV4.vue.js";
6
6
  import "../../icon/v4/IconFlag.vue.js";
7
- import { NOOP as D } from "@vue/shared";
8
- import { optionCommon as F } from "../common/Option.common.js";
9
- import I from "../../typography/v4/Typography.vue.js";
10
- import R from "../../tooltip/v4/TooltipV4.vue.js";
11
- import { isElementTruncated as j } from "../../../utils/text.js";
12
- import { promiseTimeout as H } from "@vueuse/core";
13
- import { SHARED_ASSETS_CDN_DOMAIN as U } from "../../../consts/configs.js";
14
- const q = {
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 = {
15
15
  key: 1,
16
16
  class: "image"
17
- }, G = ["src"], J = {
17
+ }, Y = ["src"], Z = {
18
18
  key: 2,
19
19
  class: "flag"
20
- }, Q = ["src"], W = {
20
+ }, _ = ["src"], ee = {
21
21
  key: 3,
22
22
  class: "start-icon"
23
- }, X = { class: "main-text" }, Y = {
23
+ }, te = { class: "main-text" }, oe = {
24
24
  key: 0,
25
25
  class: "caption-text"
26
- }, Z = {
26
+ }, ie = {
27
27
  key: 4,
28
28
  class: "end-icon"
29
- }, _ = ["onClick"], ee = { key: 0 }, ye = /* @__PURE__ */ N({
29
+ }, ne = ["onClick"], le = { key: 0 }, ke = /* @__PURE__ */ N({
30
30
  __name: "OptionV4",
31
31
  props: {
32
32
  option: { default: null },
@@ -52,150 +52,168 @@ const q = {
52
52
  optionFlagKey: { default: null }
53
53
  },
54
54
  emits: ["toggleTreeCollapse"],
55
- setup(e, { emit: $ }) {
56
- const l = e, { selected: p, isMulti: g, id: O, onClick: B, api: v } = F(l), S = (t) => {
57
- l.stopOptionClickEventPropagation && t.stopPropagation(), l.disabled ? D() : B(t);
58
- }, r = b(null), h = b(!1);
59
- P([() => l.treeChildShown, r], async () => {
60
- await H(100), h.value = r.value && j(r.value);
55
+ setup(e, { emit: B }) {
56
+ const l = e, { selected: v, isMulti: k, id: S, onClick: E, api: x } = U(l), z = (t) => {
57
+ l.stopOptionClickEventPropagation && t.stopPropagation(), l.disabled ? H() : E(t);
58
+ }, m = I(null), b = I(!1);
59
+ P([() => l.treeChildShown, m], async () => {
60
+ await J(100), b.value = m.value && G(m.value);
61
61
  });
62
- const E = (t) => t && typeof t == "object" && "optionTooltipText" in t ? t.optionTooltipText : h.value ? t[l.nameKey] : "", z = (t) => t && typeof t == "object" && "optionTooltipTestId" in t ? t.optionTooltipTestId : null, M = () => {
63
- $("toggleTreeCollapse", l.option);
64
- }, C = V(() => l.optionFlagKey ? `${U}/assets/flags/v4/${l.option[l.optionFlagKey]?.toLowerCase()}.svg` : null);
65
- return (t, u) => (n(), T(o(R), {
66
- text: E(e.option),
67
- "test-id": z(e.option),
62
+ const A = (t) => t && typeof t == "object" && "optionTooltipText" in t ? (Array.isArray(t.optionTooltipText), t.optionTooltipText) : b.value ? t[l.nameKey] : "", h = $(() => A(l.option)), L = (t) => t && typeof t == "object" && "optionTooltipTestId" in t ? t.optionTooltipTestId : null, M = () => {
63
+ B("toggleTreeCollapse", l.option);
64
+ }, w = $(() => l.optionFlagKey ? `${Q}/assets/flags/v4/${l.option[l.optionFlagKey]?.toLowerCase()}.svg` : null);
65
+ return (t, f) => (i(), y(o(q), {
66
+ text: o(h),
67
+ "test-id": L(e.option),
68
68
  placement: e.toolTipPlacement,
69
69
  class: "tooltip-option"
70
- }, {
71
- default: m(() => [
70
+ }, V({
71
+ default: r(() => [
72
72
  s("div", {
73
73
  ref: "el",
74
- class: f(["item-container", {
74
+ class: p(["item-container", {
75
75
  "item-container--disabled": e.disabled,
76
76
  "item-container--active": e.nameKey ? !1 : e.active,
77
- "item-container--selected": o(p),
78
- "item-container--multi": o(g)
77
+ "item-container--selected": o(v),
78
+ "item-container--multi": o(k)
79
79
  }])
80
80
  }, [
81
81
  s("div", {
82
- class: f(["item", {
83
- "item--multi": o(g),
82
+ class: p(["item", {
83
+ "item--multi": o(k),
84
84
  "item--with-icon": t.$slots["icon-start"] || t.$slots.image
85
85
  }])
86
86
  }, [
87
- o(g) ? (n(), T(o(A), {
87
+ o(k) ? (i(), y(o(j), {
88
88
  key: 0,
89
- id: o(O).toString(),
89
+ id: o(S).toString(),
90
90
  tabindex: "-1",
91
91
  class: "checkbox",
92
- "is-checked": o(p),
92
+ "is-checked": o(v),
93
93
  "is-indeterminate": e.isIndeterminate,
94
- onClick: u[0] || (u[0] = (K) => S(K))
95
- }, null, 8, ["id", "is-checked", "is-indeterminate"])) : i("", !0),
96
- t.$slots.image || e.imageKey ? (n(), a("div", q, [
97
- d(t.$slots, "image", {}, () => [
98
- e.imageKey ? (n(), a("img", {
94
+ onClick: f[0] || (f[0] = (c) => z(c))
95
+ }, null, 8, ["id", "is-checked", "is-indeterminate"])) : n("", !0),
96
+ t.$slots.image || e.imageKey ? (i(), a("div", X, [
97
+ u(t.$slots, "image", {}, () => [
98
+ e.imageKey ? (i(), a("img", {
99
99
  key: 0,
100
100
  src: e.option[e.imageKey]
101
- }, null, 8, G)) : i("", !0)
101
+ }, null, 8, Y)) : n("", !0)
102
102
  ], !0)
103
- ])) : i("", !0),
104
- t.$slots.flag || e.optionFlagKey ? (n(), a("div", J, [
105
- d(t.$slots, "flag", {}, () => [
106
- o(C) ? (n(), a("img", {
103
+ ])) : n("", !0),
104
+ t.$slots.flag || e.optionFlagKey ? (i(), a("div", Z, [
105
+ u(t.$slots, "flag", {}, () => [
106
+ o(w) ? (i(), a("img", {
107
107
  key: 0,
108
- src: o(C)
109
- }, null, 8, Q)) : i("", !0)
108
+ src: o(w)
109
+ }, null, 8, _)) : n("", !0)
110
110
  ], !0)
111
- ])) : i("", !0),
112
- t.$slots["icon-start"] || e.iconKey ? (n(), a("div", W, [
113
- d(t.$slots, "icon-start", {}, () => [
114
- c(o(y), {
111
+ ])) : n("", !0),
112
+ t.$slots["icon-start"] || e.iconKey ? (i(), a("div", ee, [
113
+ u(t.$slots, "icon-start", {}, () => [
114
+ d(o(T), {
115
115
  type: e.iconType,
116
116
  name: e.option[e.iconKey],
117
117
  size: e.iconType === "regular" ? "20px" : "16px"
118
118
  }, null, 8, ["type", "name", "size"])
119
119
  ], !0)
120
- ])) : i("", !0),
120
+ ])) : n("", !0),
121
121
  s("div", {
122
122
  ref_key: "textContainerRef",
123
- ref: r,
123
+ ref: m,
124
124
  class: "text-container"
125
125
  }, [
126
- c(o(I), {
126
+ d(o(K), {
127
127
  class: "option-text",
128
128
  variant: "body2"
129
129
  }, {
130
- default: m(() => [
131
- d(t.$slots, "default", {}, () => [
130
+ default: r(() => [
131
+ u(t.$slots, "default", {}, () => [
132
132
  s("div", {
133
- class: f(`option-content-${e.optionTwoLinesVariant || "horizontal"}`)
133
+ class: p(`option-content-${e.optionTwoLinesVariant || "horizontal"}`)
134
134
  }, [
135
- s("div", X, k(e.option[e.nameKey]), 1),
136
- e.optionTwoLinesKey ? (n(), a("div", Y, [
137
- c(o(I), { variant: "caption" }, {
138
- default: m(() => [
139
- x(k(e.option[e.optionTwoLinesKey]), 1)
135
+ s("div", te, g(e.option[e.nameKey]), 1),
136
+ e.optionTwoLinesKey ? (i(), a("div", oe, [
137
+ d(o(K), { variant: "caption" }, {
138
+ default: r(() => [
139
+ C(g(e.option[e.optionTwoLinesKey]), 1)
140
140
  ]),
141
141
  _: 1
142
142
  })
143
- ])) : i("", !0)
143
+ ])) : n("", !0)
144
144
  ], 2)
145
145
  ], !0)
146
146
  ]),
147
147
  _: 3
148
148
  }),
149
- e.subtitle ? (n(), T(o(L), {
149
+ e.subtitle ? (i(), y(o(R), {
150
150
  key: 0,
151
151
  class: "subtitle",
152
152
  size: "xs"
153
153
  }, {
154
- default: m(() => [
155
- x(k(e.subtitle), 1)
154
+ default: r(() => [
155
+ C(g(e.subtitle), 1)
156
156
  ]),
157
157
  _: 1
158
- })) : i("", !0)
158
+ })) : n("", !0)
159
159
  ], 512),
160
- t.$slots["icon-end"] || e.endIconKey && e.option[e.endIconKey] ? (n(), a("div", Z, [
161
- d(t.$slots, "icon-end", {}, () => [
162
- c(o(y), {
160
+ t.$slots["icon-end"] || e.endIconKey && e.option[e.endIconKey] ? (i(), a("div", ie, [
161
+ u(t.$slots, "icon-end", {}, () => [
162
+ d(o(T), {
163
163
  type: e.endIconType,
164
164
  name: e.option[e.endIconKey],
165
165
  size: e.endIconType === "regular" || e.endIconType === "ab-test" ? "20px" : "16px"
166
166
  }, null, 8, ["type", "name", "size"])
167
167
  ], !0)
168
- ])) : i("", !0),
169
- e.treeMainOption ? (n(), a("div", {
168
+ ])) : n("", !0),
169
+ e.treeMainOption ? (i(), a("div", {
170
170
  key: 5,
171
171
  class: "tree-main-arrow-wrapper",
172
- onClick: w(M, ["stop"])
172
+ onClick: O(M, ["stop"])
173
173
  }, [
174
- c(o(y), {
174
+ d(o(T), {
175
175
  name: "caret-down",
176
176
  size: "16px",
177
- class: f(`app-trigger--icon ${e.treeMainOptionExpanded && "expanded"}`)
177
+ class: p(`app-trigger--icon ${e.treeMainOptionExpanded && "expanded"}`)
178
178
  }, null, 8, ["class"])
179
- ], 8, _)) : i("", !0)
179
+ ], 8, ne)) : n("", !0)
180
180
  ], 2),
181
- o(v).clearable && o(p) ? (n(), a("div", ee, [
181
+ o(x).clearable && o(v) ? (i(), a("div", le, [
182
182
  s("button", {
183
183
  class: "clear-button",
184
- onClick: u[1] || (u[1] = w((K) => o(v).clearSelection(), ["prevent", "stop"]))
184
+ onClick: f[1] || (f[1] = O((c) => o(x).clearSelection(), ["prevent", "stop"]))
185
185
  }, [
186
- c(o(y), {
186
+ d(o(T), {
187
187
  name: "close",
188
188
  width: "8",
189
189
  height: "8"
190
190
  })
191
191
  ])
192
- ])) : i("", !0)
192
+ ])) : n("", !0)
193
193
  ], 2)
194
194
  ]),
195
- _: 3
196
- }, 8, ["text", "test-id", "placement"]));
195
+ _: 2
196
+ }, [
197
+ Array.isArray(o(h)) ? {
198
+ name: "tooltip",
199
+ fn: r(() => [
200
+ s("div", W, [
201
+ (i(!0), a(F, null, D(o(h), (c) => (i(), y(o(K), {
202
+ key: c,
203
+ variant: "body2"
204
+ }, {
205
+ default: r(() => [
206
+ C(g(c), 1)
207
+ ]),
208
+ _: 2
209
+ }, 1024))), 128))
210
+ ])
211
+ ]),
212
+ key: "0"
213
+ } : void 0
214
+ ]), 1032, ["text", "test-id", "placement"]));
197
215
  }
198
216
  });
199
217
  export {
200
- ye as default
218
+ ke as default
201
219
  };
@@ -17,7 +17,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
17
17
  valueToCopy?: string;
18
18
  disabledOptionKey?: string;
19
19
  optionChildrenKey: string;
20
- optionUniqueIdKey: string;
20
+ optionUniqueIdKey: string | number;
21
+ preExpandedOptions: string[] | number[];
21
22
  }>, {
22
23
  selected: any;
23
24
  placeholder: string;
@@ -55,7 +56,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
55
56
  valueToCopy?: string;
56
57
  disabledOptionKey?: string;
57
58
  optionChildrenKey: string;
58
- optionUniqueIdKey: string;
59
+ optionUniqueIdKey: string | number;
60
+ preExpandedOptions: string[] | number[];
59
61
  }>, {
60
62
  selected: any;
61
63
  placeholder: string;
@@ -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_a51b6929_lang.css"; //*');
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-a51b6929"]]);
3
+ // import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_6ac5f602_lang.css"; //*');
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-6ac5f602"]]);
5
5
  export {
6
6
  s as default
7
7
  };