@ironsource/shared-ui 2.1.12-test.74 → 2.1.12-test.76
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.
- package/ChartPlane.vue_vue_type_style_index_0_scoped_a4130027_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_683b8a75_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_5b72e35a_lang.css +1 -0
- package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_2076b5ab_lang.css +1 -0
- package/components/button/v4/ToggleButtonGroupAB.vue.js +3 -3
- package/components/button/v4/ToggleButtonGroupAB.vue2.js +40 -44
- package/components/chart/ChartPlane.vue.js +4 -4
- package/components/chart/ChartPlane.vue2.js +25 -17
- package/components/dropdown/v3/Dropdown.vue.d.ts +1 -1
- package/components/dropdown/v3/index.d.ts +20 -20
- package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +17 -9
- package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +133 -123
- package/components/dropdown/v4/DropdownV4.vue.d.ts +1 -1
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +1 -1
- package/components/dropdown/v4/index.d.ts +474 -148
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +5 -5
- package/index.d.ts +1617 -965
- package/index.js +1 -1
- package/package.json +1 -1
- package/ChartPlane.vue_vue_type_style_index_0_scoped_903fc6ae_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_cce87267_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_086c5b0d_lang.css +0 -1
- package/ToggleButtonGroupAB.vue_vue_type_style_index_0_scoped_c81a7d3e_lang.css +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import "../../../ConditionalDropdown.
|
|
2
|
-
import
|
|
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";
|
|
3
3
|
import "./DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "./IconButtonDropdownTrigger.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import ne from "./ChipDropdownTrigger.vue.js";
|
|
6
6
|
import "./AppDropdownTrigger.vue.js";
|
|
7
7
|
import "./ButtonDropdownTrigger.vue.js";
|
|
8
|
-
import
|
|
8
|
+
import ie from "./ButtonFilterDropdownTrigger.vue.js";
|
|
9
9
|
import "./TreeDropdown.vue.js";
|
|
10
10
|
import "./OptionV4.vue.js";
|
|
11
11
|
import "./ConditionalDropdown.vue.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { useDebounceFn as
|
|
15
|
-
const
|
|
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 = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "custom-list-area"
|
|
18
|
-
},
|
|
18
|
+
}, Ae = /* @__PURE__ */ W({
|
|
19
19
|
__name: "ConditionalDropdown",
|
|
20
20
|
props: {
|
|
21
21
|
selectedCondition: null,
|
|
@@ -42,69 +42,69 @@ const re = { class: "conditional-container" }, se = {
|
|
|
42
42
|
triggerShownValuesCount: { default: 1 }
|
|
43
43
|
},
|
|
44
44
|
emits: ["update:selectedCondition", "update:appliedSelections", "clear", "closed"],
|
|
45
|
-
setup(
|
|
46
|
-
const e =
|
|
45
|
+
setup(i, { emit: C }) {
|
|
46
|
+
const e = i, m = O({
|
|
47
47
|
get: () => e.appliedSelections,
|
|
48
48
|
set: (l) => {
|
|
49
|
-
|
|
49
|
+
C("update:appliedSelections", l);
|
|
50
50
|
}
|
|
51
|
-
}), u =
|
|
51
|
+
}), u = O({
|
|
52
52
|
get: () => e.selectedCondition || e.conditionalOptions[0],
|
|
53
53
|
set: (l) => {
|
|
54
|
-
|
|
54
|
+
C("update:selectedCondition", l);
|
|
55
55
|
}
|
|
56
|
-
}),
|
|
56
|
+
}), k = () => {
|
|
57
57
|
const { appliedSelections: l } = e;
|
|
58
58
|
return l ? Array.isArray(l) ? l : [l] : [];
|
|
59
|
-
},
|
|
60
|
-
const l = p.value ? 4 : 4.5,
|
|
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(() => {
|
|
60
|
+
const l = p.value ? 4 : 4.5, t = a.value.length > 4 ? a.value.length : l;
|
|
61
61
|
if (e.groupedOptions) {
|
|
62
|
-
let
|
|
63
|
-
return a.value.forEach((
|
|
64
|
-
|
|
65
|
-
}),
|
|
62
|
+
let o = 0;
|
|
63
|
+
return a.value.forEach((y) => {
|
|
64
|
+
y.options && (o = o + y.options.length);
|
|
65
|
+
}), o > 4 ? o : l;
|
|
66
66
|
}
|
|
67
|
-
return
|
|
68
|
-
}), M = (l,
|
|
69
|
-
if (e.infiniteLoading && u.value.multi && Array.isArray(
|
|
70
|
-
const
|
|
71
|
-
(
|
|
67
|
+
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(
|
|
71
|
+
(f) => f[e.optionNameKey].includes(l)
|
|
72
72
|
);
|
|
73
|
-
return
|
|
74
|
-
|
|
75
|
-
(j) => j[e.comparingKey] ===
|
|
76
|
-
) &&
|
|
77
|
-
}),
|
|
78
|
-
(
|
|
73
|
+
return t.forEach((f) => {
|
|
74
|
+
y.find(
|
|
75
|
+
(j) => j[e.comparingKey] === f[e.comparingKey]
|
|
76
|
+
) && o.push(f[e.comparingKey]);
|
|
77
|
+
}), y.filter(
|
|
78
|
+
(f) => !o.includes(f[e.comparingKey])
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
81
|
return [];
|
|
82
|
-
},
|
|
82
|
+
}, N = async (l) => {
|
|
83
83
|
try {
|
|
84
84
|
d.value = !0;
|
|
85
|
-
const
|
|
85
|
+
const t = await e.fetchFnCallback(l), o = M(
|
|
86
86
|
l,
|
|
87
|
-
|
|
87
|
+
t
|
|
88
88
|
);
|
|
89
|
-
a.value = [...
|
|
90
|
-
} catch (
|
|
91
|
-
d.value = !1, console.error("Error fetching data:",
|
|
89
|
+
a.value = [...o, ...t], d.value = !1;
|
|
90
|
+
} catch (t) {
|
|
91
|
+
d.value = !1, console.error("Error fetching data:", t);
|
|
92
92
|
}
|
|
93
93
|
}, E = async () => {
|
|
94
94
|
if (e.infiniteLoading)
|
|
95
95
|
try {
|
|
96
|
-
|
|
96
|
+
b.value = !0;
|
|
97
97
|
const l = await e.loadMoreFn();
|
|
98
|
-
|
|
98
|
+
b.value = !1, Array.isArray(l) && (a.value = [...a.value, ...l]);
|
|
99
99
|
} catch (l) {
|
|
100
|
-
|
|
100
|
+
b.value = !1, console.error("Error fetching data:", l);
|
|
101
101
|
}
|
|
102
|
-
},
|
|
103
|
-
|
|
102
|
+
}, P = se(
|
|
103
|
+
N,
|
|
104
104
|
e.fetchDataDebounceTime
|
|
105
|
-
),
|
|
106
|
-
l.length >= e.minCharsToStart ? (
|
|
107
|
-
},
|
|
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
108
|
r.value && a.value.length && !d.value && !u.value.multi ? a.value[0].conditionalOptions ? a.value[0] = {
|
|
109
109
|
[e.optionNameKey]: r.value,
|
|
110
110
|
conditionalOptions: !0,
|
|
@@ -119,131 +119,141 @@ const re = { class: "conditional-container" }, se = {
|
|
|
119
119
|
},
|
|
120
120
|
...a.value
|
|
121
121
|
] : a.value.length && a.value[0].conditionalOptions && a.value.shift();
|
|
122
|
-
},
|
|
123
|
-
p.value &&
|
|
122
|
+
}, D = () => {
|
|
123
|
+
p.value && n.value.length === 0 ? g.value = e.label : g.value = `${e.label} ${u.value.label.toLowerCase()}`;
|
|
124
124
|
};
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}),
|
|
128
|
-
|
|
129
|
-
}),
|
|
125
|
+
h(r, () => {
|
|
126
|
+
w(r.value);
|
|
127
|
+
}), h([u, a], () => {
|
|
128
|
+
Q();
|
|
129
|
+
}), h(
|
|
130
130
|
() => e.loadingOverride,
|
|
131
|
-
(l,
|
|
132
|
-
!l &&
|
|
131
|
+
(l, t) => {
|
|
132
|
+
!l && t && !e.infiniteLoading && N(e.searchQuery);
|
|
133
133
|
}
|
|
134
134
|
);
|
|
135
|
-
const
|
|
136
|
-
p.value &&
|
|
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();
|
|
137
137
|
};
|
|
138
|
-
|
|
139
|
-
u.value.multi ? (d.value = !0, !
|
|
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(() => {
|
|
140
140
|
d.value = !1, p.value = !0;
|
|
141
|
-
}, 100)) : (!
|
|
142
|
-
!
|
|
141
|
+
}, 100)) : (!t.multi && !l.multi && (d.value = !0), setTimeout(() => {
|
|
142
|
+
!t.multi && !l.multi && (d.value = !1), p.value = !1;
|
|
143
143
|
}, 100));
|
|
144
|
+
}), h(m, () => {
|
|
145
|
+
n.value = k();
|
|
144
146
|
});
|
|
145
|
-
const
|
|
147
|
+
const $ = (l) => {
|
|
146
148
|
K.value = l;
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
l && u.value.multi && e.infiniteLoading &&
|
|
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));
|
|
151
153
|
};
|
|
152
154
|
q(() => {
|
|
153
|
-
(e.searchQuery || !e.infiniteLoading || e.minCharsToStart === 0) &&
|
|
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();
|
|
154
156
|
});
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
+
const z = () => {
|
|
158
|
+
C("closed");
|
|
157
159
|
};
|
|
158
|
-
return (l,
|
|
160
|
+
return (l, t) => (F(), G(c(L), {
|
|
159
161
|
ref_key: "dropdownRef",
|
|
160
|
-
ref:
|
|
161
|
-
selected:
|
|
162
|
-
"onUpdate:selected":
|
|
162
|
+
ref: T,
|
|
163
|
+
selected: n.value,
|
|
164
|
+
"onUpdate:selected": t[2] || (t[2] = (o) => n.value = o),
|
|
163
165
|
"predefined-trigger": "chip",
|
|
164
|
-
"display-value": (
|
|
166
|
+
"display-value": (o) => o?.[i.optionNameKey],
|
|
165
167
|
multi: p.value,
|
|
166
168
|
options: a.value,
|
|
167
|
-
placeholder:
|
|
169
|
+
placeholder: g.value,
|
|
168
170
|
"search-placeholder": "Search",
|
|
169
|
-
"option-name-key":
|
|
171
|
+
"option-name-key": i.optionNameKey,
|
|
170
172
|
"with-conditions": "",
|
|
171
173
|
"inline-search": "",
|
|
172
174
|
"custom-number-of-displayed-options": c(I),
|
|
173
175
|
"options-list-width": "330px",
|
|
174
|
-
loading: d.value ||
|
|
175
|
-
"load-more-loading":
|
|
176
|
-
"comparing-key":
|
|
177
|
-
"is-open":
|
|
178
|
-
"infinite-loading":
|
|
179
|
-
"show-select-all": !
|
|
180
|
-
"grouped-options":
|
|
181
|
-
"option-flag-key":
|
|
182
|
-
"option-image-key":
|
|
183
|
-
"option-icon-key":
|
|
184
|
-
"option-icon-type":
|
|
185
|
-
"trigger-shown-values-count":
|
|
186
|
-
"onUpdate:isOpen":
|
|
187
|
-
onOnsearch:
|
|
188
|
-
onApply:
|
|
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,
|
|
189
191
|
onLoadMore: E,
|
|
190
|
-
onUnsavedSelectionUpdate:
|
|
191
|
-
onClosed:
|
|
192
|
-
}, {
|
|
193
|
-
"dropdown-trigger":
|
|
194
|
-
|
|
195
|
-
label:
|
|
196
|
-
"selected-option": c(
|
|
197
|
-
multi:
|
|
192
|
+
onUnsavedSelectionUpdate: $,
|
|
193
|
+
onClosed: z
|
|
194
|
+
}, H({
|
|
195
|
+
"dropdown-trigger": v(({ defaultTriggerProps: o }) => [
|
|
196
|
+
S(c(ne), J(o, {
|
|
197
|
+
label: g.value,
|
|
198
|
+
"selected-option": c(m),
|
|
199
|
+
multi: A.value,
|
|
198
200
|
"cancel-all-selected-display": "",
|
|
199
|
-
"display-value-in-quotes": !Array.isArray(
|
|
200
|
-
"shown-values-count":
|
|
201
|
-
onClear:
|
|
201
|
+
"display-value-in-quotes": !Array.isArray(n.value) && n.value.conditionalOptions,
|
|
202
|
+
"shown-values-count": i.triggerShownValuesCount,
|
|
203
|
+
onClear: x
|
|
202
204
|
}), null, 16, ["label", "selected-option", "multi", "display-value-in-quotes", "shown-values-count"])
|
|
203
205
|
]),
|
|
204
|
-
"dropdown-conditions":
|
|
205
|
-
|
|
206
|
-
|
|
206
|
+
"dropdown-conditions": v(() => [
|
|
207
|
+
X("div", de, [
|
|
208
|
+
S(c(L), {
|
|
207
209
|
selected: c(u),
|
|
208
|
-
"onUpdate:selected":
|
|
209
|
-
options:
|
|
210
|
+
"onUpdate:selected": t[0] || (t[0] = (o) => Y(u) ? u.value = o : null),
|
|
211
|
+
options: i.conditionalOptions,
|
|
210
212
|
"option-name-key": "label",
|
|
211
|
-
"display-value": (
|
|
213
|
+
"display-value": (o) => o?.label,
|
|
212
214
|
container: ".conditional-container",
|
|
213
215
|
size: "small"
|
|
214
216
|
}, {
|
|
215
|
-
"dropdown-trigger":
|
|
216
|
-
|
|
217
|
+
"dropdown-trigger": v(({ buttonTriggerProps: o }) => [
|
|
218
|
+
S(c(ie), Z(_(o)), null, 16)
|
|
217
219
|
]),
|
|
218
220
|
_: 1
|
|
219
221
|
}, 8, ["selected", "options", "display-value"])
|
|
220
222
|
])
|
|
221
223
|
]),
|
|
222
|
-
"inline-search":
|
|
223
|
-
|
|
224
|
+
"inline-search": v(() => [
|
|
225
|
+
S(c(ue), {
|
|
224
226
|
modelValue: r.value,
|
|
225
|
-
"onUpdate:modelValue":
|
|
227
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
226
228
|
class: "inline-search",
|
|
227
229
|
placeholder: "Search",
|
|
228
230
|
variant: "transparent",
|
|
229
231
|
size: "md",
|
|
230
|
-
"auto-focus":
|
|
232
|
+
"auto-focus": i.autoFocusSearch
|
|
231
233
|
}, null, 8, ["modelValue", "auto-focus"])
|
|
232
234
|
]),
|
|
233
|
-
"custom-list-area":
|
|
234
|
-
!a.value.length && !d.value ? (
|
|
235
|
-
|
|
236
|
-
default:
|
|
237
|
-
|
|
235
|
+
"custom-list-area": v(() => [
|
|
236
|
+
!a.value.length && !d.value ? (F(), ee("div", ce, [
|
|
237
|
+
S(re, { variant: "body1" }, {
|
|
238
|
+
default: v(() => [
|
|
239
|
+
le(oe(c(U)), 1)
|
|
238
240
|
]),
|
|
239
241
|
_: 1
|
|
240
242
|
})
|
|
241
|
-
])) :
|
|
243
|
+
])) : te("", !0)
|
|
242
244
|
]),
|
|
243
|
-
_:
|
|
244
|
-
},
|
|
245
|
+
_: 2
|
|
246
|
+
}, [
|
|
247
|
+
l.$slots["option-end"] ? {
|
|
248
|
+
name: "option-end",
|
|
249
|
+
fn: v(({ option: o }) => [
|
|
250
|
+
ae(l.$slots, "option-end", { option: o }, void 0, !0)
|
|
251
|
+
]),
|
|
252
|
+
key: "0"
|
|
253
|
+
} : void 0
|
|
254
|
+
]), 1032, ["selected", "display-value", "multi", "options", "placeholder", "option-name-key", "custom-number-of-displayed-options", "loading", "load-more-loading", "comparing-key", "is-open", "infinite-loading", "show-select-all", "grouped-options", "option-flag-key", "option-image-key", "option-icon-key", "option-icon-type", "trigger-shown-values-count"]));
|
|
245
255
|
}
|
|
246
256
|
});
|
|
247
257
|
export {
|
|
248
|
-
|
|
258
|
+
Ae as default
|
|
249
259
|
};
|
|
@@ -301,8 +301,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
301
301
|
mandatory: boolean;
|
|
302
302
|
skidding: number;
|
|
303
303
|
modelValue: any;
|
|
304
|
-
selected: any;
|
|
305
304
|
valueToCopy: string;
|
|
305
|
+
selected: any;
|
|
306
306
|
placeholder: string;
|
|
307
307
|
multi: boolean;
|
|
308
308
|
infiniteLoading: boolean;
|
|
@@ -84,8 +84,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
84
84
|
testId: string;
|
|
85
85
|
disabled: boolean;
|
|
86
86
|
size: "small" | "medium" | "large";
|
|
87
|
-
selected: unknown[];
|
|
88
87
|
valueToCopy: string;
|
|
88
|
+
selected: unknown[];
|
|
89
89
|
placeholder: string;
|
|
90
90
|
inlineSearchPlaceholder: string;
|
|
91
91
|
optionNameKey: string;
|