@ironsource/shared-ui 2.1.12-rc.44 → 2.1.12-rc.45
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/ConditionalDropdown.vue_vue_type_style_index_0_scoped_bdd6ee48_lang.css +1 -0
- package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +39 -38
- package/index.js +1 -1
- package/package.json +1 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_7114a241_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.custom-list-area[data-v-bdd6ee48]{color:var(--text-secondary);width:100%;text-align:center;box-sizing:border-box;padding:63px 10px}.inline-search[data-v-bdd6ee48]{width:100%}.contain-accept[data-v-bdd6ee48]{padding:6px 8px;margin-bottom:4px;cursor:pointer}.contain-accept[data-v-bdd6ee48]:hover{background-color:var(--action-hover);border-radius:.5rem}.contain-accept--query[data-v-bdd6ee48]{margin-left:4px;display:inline-flex;color:var(--primary-main)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ConditionalDropdown.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../../ConditionalDropdown.
|
|
4
|
-
const
|
|
2
|
+
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_bdd6ee48_lang.css"; //*');
|
|
4
|
+
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-bdd6ee48"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../../ConditionalDropdown.
|
|
2
|
-
import
|
|
1
|
+
import "../../../ConditionalDropdown.vue_vue_type_style_index_0_scoped_bdd6ee48_lang.css"; import { defineComponent as H, computed as b, ref as s, watch as g, onMounted as J, resolveComponent as X, openBlock as B, createBlock as Y, unref as p, createSlots as Z, withCtx as f, createVNode as y, mergeProps as _, createElementVNode as ee, isRef as le, normalizeProps as F, guardReactiveProps as I, createElementBlock as oe, createTextVNode as te, toDisplayString as ne, createCommentVNode as ae, renderSlot as ie } from "vue";
|
|
2
|
+
import U from "./DropdownV4.vue.js";
|
|
3
3
|
import "./DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "./IconButtonDropdownTrigger.vue.js";
|
|
5
5
|
import ue from "./ChipDropdownTrigger.vue.js";
|
|
@@ -42,8 +42,8 @@ const pe = { class: "conditional-container" }, ve = {
|
|
|
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: h }) {
|
|
46
|
+
const e = i, S = b({
|
|
47
47
|
get: () => e.appliedSelections,
|
|
48
48
|
set: (l) => {
|
|
49
49
|
h("update:appliedSelections", l);
|
|
@@ -65,7 +65,7 @@ const pe = { class: "conditional-container" }, ve = {
|
|
|
65
65
|
const A = () => {
|
|
66
66
|
const { appliedSelections: l } = e;
|
|
67
67
|
return l ? Array.isArray(l) ? l : [l] : [];
|
|
68
|
-
}, D = s(null), v = s(!0), t = s([]),
|
|
68
|
+
}, D = s(null), v = s(!0), t = s([]), u = s(A()), N = s(!0), c = s(!1), w = s(!1), r = s(e.searchQuery), M = s(""), C = s(e.label), K = s([]), E = b(() => (!r.value || r.value?.length < e.minCharsToStart) && !t.value.length ? `Enter at least ${e.minCharsToStart} characters to begin` : "No results found"), Q = b(() => {
|
|
69
69
|
const l = v.value ? 4 : 4.5, o = t.value.length > 4 ? t.value.length : l;
|
|
70
70
|
if (e.groupedOptions) {
|
|
71
71
|
let d = 0;
|
|
@@ -75,8 +75,8 @@ const pe = { class: "conditional-container" }, ve = {
|
|
|
75
75
|
}
|
|
76
76
|
return o > l ? o : l;
|
|
77
77
|
}), V = (l, o) => {
|
|
78
|
-
if (e.infiniteLoading && a.value.multi && Array.isArray(
|
|
79
|
-
const d = [], n =
|
|
78
|
+
if (e.infiniteLoading && a.value.multi && Array.isArray(u.value) && u.value.length && l && o.length) {
|
|
79
|
+
const d = [], n = u.value.filter(
|
|
80
80
|
(m) => m[e.optionNameKey].includes(l)
|
|
81
81
|
);
|
|
82
82
|
return o.forEach((m) => {
|
|
@@ -129,7 +129,7 @@ const pe = { class: "conditional-container" }, ve = {
|
|
|
129
129
|
...t.value
|
|
130
130
|
] : t.value.length && t.value[0].conditionalOptions && t.value.shift();
|
|
131
131
|
}, k = () => {
|
|
132
|
-
v.value &&
|
|
132
|
+
v.value && u.value.length === 0 ? C.value = e.label : C.value = `${e.label} ${a.value.label.toLowerCase()}`;
|
|
133
133
|
};
|
|
134
134
|
g(r, () => {
|
|
135
135
|
O(r.value);
|
|
@@ -142,60 +142,60 @@ const pe = { class: "conditional-container" }, ve = {
|
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
144
|
const z = () => {
|
|
145
|
-
v.value &&
|
|
145
|
+
v.value && u.value.length === 0 ? (S.value = [], a.value = null) : (M.value = r.value, S.value = v.value ? [...u.value] : { ...u.value }, N.value = v.value), h("update:selectedCondition", a.value), k();
|
|
146
146
|
};
|
|
147
147
|
g(a, (l, o) => {
|
|
148
|
-
a.value.multi ? (c.value = !0, !o.multi && l.multi && (Array.isArray(e.appliedSelections) ?
|
|
148
|
+
a.value.multi ? (c.value = !0, !o.multi && l.multi && (Array.isArray(e.appliedSelections) ? u.value = e.appliedSelections : u.value = [e.appliedSelections]), setTimeout(() => {
|
|
149
149
|
c.value = !1, v.value = !0;
|
|
150
150
|
}, 100)) : (!o.multi && !l.multi && (c.value = !0), setTimeout(() => {
|
|
151
151
|
!o.multi && !l.multi && (c.value = !1), v.value = !1;
|
|
152
152
|
}, 100));
|
|
153
153
|
}), g(S, () => {
|
|
154
|
-
|
|
154
|
+
u.value = A();
|
|
155
155
|
});
|
|
156
156
|
const P = (l) => {
|
|
157
157
|
K.value = l;
|
|
158
158
|
}, j = () => {
|
|
159
|
-
|
|
159
|
+
u.value = [], S.value = [], a.value = null, h("update:selectedCondition", null), C.value = e.label, r.value = "", h("clear");
|
|
160
160
|
}, W = (l) => {
|
|
161
|
-
a.value === null && (a.value = e.conditionalOptions[0]), l && a.value.multi && e.infiniteLoading &&
|
|
161
|
+
a.value === null && (a.value = e.conditionalOptions[0]), l && a.value.multi && e.infiniteLoading && u.value && (t.value = u.value, r.value && O(r.value));
|
|
162
162
|
};
|
|
163
163
|
J(() => {
|
|
164
|
-
(e.searchQuery || !e.infiniteLoading || e.minCharsToStart === 0) && O(e.searchQuery), e.appliedSelections && Array.isArray(e.appliedSelections) && (t.value = e.appliedSelections,
|
|
164
|
+
(e.searchQuery || !e.infiniteLoading || e.minCharsToStart === 0) && O(e.searchQuery), e.appliedSelections && Array.isArray(e.appliedSelections) && (t.value = e.appliedSelections, u.value = e.appliedSelections, K.value = e.appliedSelections), k();
|
|
165
165
|
});
|
|
166
166
|
const q = () => {
|
|
167
167
|
h("closed");
|
|
168
168
|
};
|
|
169
169
|
return (l, o) => {
|
|
170
170
|
const d = X("ButtonDropdownTrigger");
|
|
171
|
-
return B(), Y(p(
|
|
171
|
+
return B(), Y(p(U), {
|
|
172
172
|
ref_key: "dropdownRef",
|
|
173
173
|
ref: D,
|
|
174
|
-
selected:
|
|
175
|
-
"onUpdate:selected": o[2] || (o[2] = (n) =>
|
|
174
|
+
selected: u.value,
|
|
175
|
+
"onUpdate:selected": o[2] || (o[2] = (n) => u.value = n),
|
|
176
176
|
"predefined-trigger": "chip",
|
|
177
|
-
"display-value": (n) => n?.[
|
|
177
|
+
"display-value": (n) => n?.[i.optionNameKey],
|
|
178
178
|
multi: v.value,
|
|
179
179
|
options: t.value,
|
|
180
180
|
placeholder: C.value,
|
|
181
181
|
"search-placeholder": "Search",
|
|
182
|
-
"option-name-key":
|
|
182
|
+
"option-name-key": i.optionNameKey,
|
|
183
183
|
"with-conditions": "",
|
|
184
184
|
"inline-search": "",
|
|
185
185
|
"custom-number-of-displayed-options": p(Q),
|
|
186
186
|
"options-list-width": "330px",
|
|
187
|
-
loading: c.value ||
|
|
187
|
+
loading: c.value || i.loadingOverride,
|
|
188
188
|
"load-more-loading": w.value,
|
|
189
|
-
"comparing-key":
|
|
190
|
-
"is-open":
|
|
191
|
-
"infinite-loading":
|
|
192
|
-
"show-select-all": !
|
|
193
|
-
"grouped-options":
|
|
194
|
-
"option-flag-key":
|
|
195
|
-
"option-image-key":
|
|
196
|
-
"option-icon-key":
|
|
197
|
-
"option-icon-type":
|
|
198
|
-
"trigger-shown-values-count":
|
|
189
|
+
"comparing-key": i.comparingKey,
|
|
190
|
+
"is-open": i.isOpen,
|
|
191
|
+
"infinite-loading": i.infiniteLoading,
|
|
192
|
+
"show-select-all": !i.infiniteLoading && !r.value,
|
|
193
|
+
"grouped-options": i.groupedOptions,
|
|
194
|
+
"option-flag-key": i.optionFlagKey,
|
|
195
|
+
"option-image-key": i.optionImageKey,
|
|
196
|
+
"option-icon-key": i.optionIconKey,
|
|
197
|
+
"option-icon-type": i.optionIconType,
|
|
198
|
+
"trigger-shown-values-count": i.triggerShownValuesCount,
|
|
199
199
|
"onUpdate:isOpen": W,
|
|
200
200
|
onOnsearch: O,
|
|
201
201
|
onApply: z,
|
|
@@ -209,25 +209,26 @@ const pe = { class: "conditional-container" }, ve = {
|
|
|
209
209
|
"selected-option": p(S),
|
|
210
210
|
multi: N.value,
|
|
211
211
|
"cancel-all-selected-display": "",
|
|
212
|
-
"
|
|
213
|
-
"
|
|
212
|
+
"test-id": i.testId,
|
|
213
|
+
"display-value-in-quotes": !Array.isArray(u.value) && u.value.conditionalOptions,
|
|
214
|
+
"shown-values-count": i.triggerShownValuesCount,
|
|
214
215
|
onClear: j
|
|
215
|
-
}), null, 16, ["label", "selected-option", "multi", "display-value-in-quotes", "shown-values-count"])
|
|
216
|
+
}), null, 16, ["label", "selected-option", "multi", "test-id", "display-value-in-quotes", "shown-values-count"])
|
|
216
217
|
]),
|
|
217
218
|
"dropdown-conditions": f(() => [
|
|
218
219
|
ee("div", pe, [
|
|
219
|
-
y(p(
|
|
220
|
+
y(p(U), {
|
|
220
221
|
selected: p(a),
|
|
221
222
|
"onUpdate:selected": o[0] || (o[0] = (n) => le(a) ? a.value = n : null),
|
|
222
|
-
options:
|
|
223
|
+
options: i.conditionalOptions,
|
|
223
224
|
"option-name-key": "label",
|
|
224
225
|
"display-value": (n) => n?.label,
|
|
225
226
|
container: ".conditional-container",
|
|
226
227
|
size: "small"
|
|
227
228
|
}, {
|
|
228
229
|
"dropdown-trigger": f(({ buttonTriggerProps: n }) => [
|
|
229
|
-
y(d, F(
|
|
230
|
-
y(p(re), F(
|
|
230
|
+
y(d, F(I(n)), null, 16),
|
|
231
|
+
y(p(re), F(I(n)), null, 16)
|
|
231
232
|
]),
|
|
232
233
|
_: 1
|
|
233
234
|
}, 8, ["selected", "options", "display-value"])
|
|
@@ -241,7 +242,7 @@ const pe = { class: "conditional-container" }, ve = {
|
|
|
241
242
|
placeholder: "Search",
|
|
242
243
|
variant: "transparent",
|
|
243
244
|
size: "md",
|
|
244
|
-
"auto-focus":
|
|
245
|
+
"auto-focus": i.autoFocusSearch
|
|
245
246
|
}, null, 8, ["modelValue", "auto-focus"])
|
|
246
247
|
]),
|
|
247
248
|
"custom-list-area": f(() => [
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './AppTrigger.vue_vue_type_style_index_0_scoped_121aac8b_lang.css';
|
|
2
2
|
import { AppTriggerTypes as eo } from "./components/appTrigger/index.js";
|
|
3
3
|
import { AutocompleteDropdownTypes as mo } from "./components/autocompleteDropdown/index.js";
|
|
4
4
|
import { MenuItemTypes as ao } from "./components/menuItem/index.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.custom-list-area[data-v-7114a241]{color:var(--text-secondary);width:100%;text-align:center;box-sizing:border-box;padding:63px 10px}.inline-search[data-v-7114a241]{width:100%}.contain-accept[data-v-7114a241]{padding:6px 8px;margin-bottom:4px;cursor:pointer}.contain-accept[data-v-7114a241]:hover{background-color:var(--action-hover);border-radius:.5rem}.contain-accept--query[data-v-7114a241]{margin-left:4px;display:inline-flex;color:var(--primary-main)}
|