@box/combobox-with-api 0.25.0 → 0.26.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.
- package/chunks/dynamic-loading-tree.js +159 -173
- package/chunks/mocks.js +204 -0
- package/chunks/shared.js +448 -0
- package/chunks/web.dom-exception.stack.js +426 -0
- package/esm/index.js +12 -4
- package/esm/lib/components/combobox-with-api-pagination/index.js +6 -2
- package/esm/lib/components/combobox-with-api-tree-view/combobox-with-api-tree-view.js +89 -79
- package/esm/lib/components/combobox-with-api-tree-view/index.js +6 -2
- package/package.json +5 -5
- package/styles/dynamic-loading-tree.css +1 -1
- package/types/lib/components/combobox-with-api-pagination/index.d.ts +2 -1
- package/types/lib/components/combobox-with-api-pagination/stories/mocks.d.ts +16 -0
- package/types/lib/components/combobox-with-api-pagination/stories/shared.d.ts +4 -17
- package/types/lib/components/combobox-with-api-tree-view/index.d.ts +2 -0
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
var w = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, S = function(r) {
|
|
2
|
+
return r && r.Math === Math && r;
|
|
3
|
+
}, l = (
|
|
4
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
5
|
+
S(typeof globalThis == "object" && globalThis) || S(typeof window == "object" && window) || // eslint-disable-next-line no-restricted-globals -- safe
|
|
6
|
+
S(typeof self == "object" && self) || S(typeof w == "object" && w) || S(typeof w == "object" && w) || // eslint-disable-next-line no-new-func -- fallback
|
|
7
|
+
/* @__PURE__ */ function() {
|
|
8
|
+
return this;
|
|
9
|
+
}() || Function("return this")()
|
|
10
|
+
), lr = {}, y = function(r) {
|
|
11
|
+
try {
|
|
12
|
+
return !!r();
|
|
13
|
+
} catch {
|
|
14
|
+
return !0;
|
|
15
|
+
}
|
|
16
|
+
}, Ne = y, p = !Ne(function() {
|
|
17
|
+
return Object.defineProperty({}, 1, { get: function() {
|
|
18
|
+
return 7;
|
|
19
|
+
} })[1] !== 7;
|
|
20
|
+
}), Ae = y, Jr = !Ae(function() {
|
|
21
|
+
var r = (function() {
|
|
22
|
+
}).bind();
|
|
23
|
+
return typeof r != "function" || r.hasOwnProperty("prototype");
|
|
24
|
+
}), Me = Jr, P = Function.prototype.call, sr = Me ? P.bind(P) : function() {
|
|
25
|
+
return P.apply(P, arguments);
|
|
26
|
+
}, re = {}, ee = {}.propertyIsEnumerable, te = Object.getOwnPropertyDescriptor, Fe = te && !ee.call({ 1: 2 }, 1);
|
|
27
|
+
re.f = Fe ? function(e) {
|
|
28
|
+
var t = te(this, e);
|
|
29
|
+
return !!t && t.enumerable;
|
|
30
|
+
} : ee;
|
|
31
|
+
var fr = function(r, e) {
|
|
32
|
+
return {
|
|
33
|
+
enumerable: !(r & 1),
|
|
34
|
+
configurable: !(r & 2),
|
|
35
|
+
writable: !(r & 4),
|
|
36
|
+
value: e
|
|
37
|
+
};
|
|
38
|
+
}, ne = Jr, ae = Function.prototype, tr = ae.call, Le = ne && ae.bind.bind(tr, tr), s = ne ? Le : function(r) {
|
|
39
|
+
return function() {
|
|
40
|
+
return tr.apply(r, arguments);
|
|
41
|
+
};
|
|
42
|
+
}, oe = s, xe = oe({}.toString), Be = oe("".slice), ie = function(r) {
|
|
43
|
+
return Be(xe(r), 8, -1);
|
|
44
|
+
}, Ue = s, Ge = y, Ke = ie, B = Object, Ve = Ue("".split), ke = Ge(function() {
|
|
45
|
+
return !B("z").propertyIsEnumerable(0);
|
|
46
|
+
}) ? function(r) {
|
|
47
|
+
return Ke(r) === "String" ? Ve(r, "") : B(r);
|
|
48
|
+
} : B, ve = function(r) {
|
|
49
|
+
return r == null;
|
|
50
|
+
}, ze = ve, We = TypeError, yr = function(r) {
|
|
51
|
+
if (ze(r)) throw new We("Can't call method on " + r);
|
|
52
|
+
return r;
|
|
53
|
+
}, Ye = ke, He = yr, pr = function(r) {
|
|
54
|
+
return Ye(He(r));
|
|
55
|
+
}, U = typeof document == "object" && document.all, c = typeof U > "u" && U !== void 0 ? function(r) {
|
|
56
|
+
return typeof r == "function" || r === U;
|
|
57
|
+
} : function(r) {
|
|
58
|
+
return typeof r == "function";
|
|
59
|
+
}, qe = c, $ = function(r) {
|
|
60
|
+
return typeof r == "object" ? r !== null : qe(r);
|
|
61
|
+
}, G = l, Xe = c, Qe = function(r) {
|
|
62
|
+
return Xe(r) ? r : void 0;
|
|
63
|
+
}, $r = function(r, e) {
|
|
64
|
+
return arguments.length < 2 ? Qe(G[r]) : G[r] && G[r][e];
|
|
65
|
+
}, Ze = s, ce = Ze({}.isPrototypeOf), Je = typeof navigator < "u" && String(navigator.userAgent) || "", ue = l, K = Je, mr = ue.process, Tr = ue.Deno, Rr = mr && mr.versions || Tr && Tr.version, Ir = Rr && Rr.v8, u, M;
|
|
66
|
+
Ir && (u = Ir.split("."), M = u[0] > 0 && u[0] < 4 ? 1 : +(u[0] + u[1]));
|
|
67
|
+
!M && K && (u = K.match(/Edge\/(\d+)/), (!u || u[1] >= 74) && (u = K.match(/Chrome\/(\d+)/), u && (M = +u[1])));
|
|
68
|
+
var rt = M, _r = rt, et = y, tt = l, nt = tt.String, le = !!Object.getOwnPropertySymbols && !et(function() {
|
|
69
|
+
var r = Symbol("symbol detection");
|
|
70
|
+
return !nt(r) || !(Object(r) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
71
|
+
!Symbol.sham && _r && _r < 41;
|
|
72
|
+
}), at = le, se = at && !Symbol.sham && typeof Symbol.iterator == "symbol", ot = $r, it = c, vt = ce, ct = se, ut = Object, fe = ct ? function(r) {
|
|
73
|
+
return typeof r == "symbol";
|
|
74
|
+
} : function(r) {
|
|
75
|
+
var e = ot("Symbol");
|
|
76
|
+
return it(e) && vt(e.prototype, ut(r));
|
|
77
|
+
}, lt = String, st = function(r) {
|
|
78
|
+
try {
|
|
79
|
+
return lt(r);
|
|
80
|
+
} catch {
|
|
81
|
+
return "Object";
|
|
82
|
+
}
|
|
83
|
+
}, ft = c, yt = st, pt = TypeError, ye = function(r) {
|
|
84
|
+
if (ft(r)) return r;
|
|
85
|
+
throw new pt(yt(r) + " is not a function");
|
|
86
|
+
}, $t = ye, bt = ve, Et = function(r, e) {
|
|
87
|
+
var t = r[e];
|
|
88
|
+
return bt(t) ? void 0 : $t(t);
|
|
89
|
+
}, V = sr, k = c, z = $, dt = TypeError, Ot = function(r, e) {
|
|
90
|
+
var t, n;
|
|
91
|
+
if (e === "string" && k(t = r.toString) && !z(n = V(t, r)) || k(t = r.valueOf) && !z(n = V(t, r)) || e !== "string" && k(t = r.toString) && !z(n = V(t, r))) return n;
|
|
92
|
+
throw new dt("Can't convert object to primitive value");
|
|
93
|
+
}, pe = { exports: {} }, wr = l, gt = Object.defineProperty, br = function(r, e) {
|
|
94
|
+
try {
|
|
95
|
+
gt(wr, r, { value: e, configurable: !0, writable: !0 });
|
|
96
|
+
} catch {
|
|
97
|
+
wr[r] = e;
|
|
98
|
+
}
|
|
99
|
+
return e;
|
|
100
|
+
}, St = l, ht = br, Pr = "__core-js_shared__", Cr = pe.exports = St[Pr] || ht(Pr, {});
|
|
101
|
+
(Cr.versions || (Cr.versions = [])).push({
|
|
102
|
+
version: "3.36.1",
|
|
103
|
+
mode: "global",
|
|
104
|
+
copyright: "© 2014-2024 Denis Pushkarev (zloirock.ru)",
|
|
105
|
+
license: "https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",
|
|
106
|
+
source: "https://github.com/zloirock/core-js"
|
|
107
|
+
});
|
|
108
|
+
var Er = pe.exports, Dr = Er, $e = function(r, e) {
|
|
109
|
+
return Dr[r] || (Dr[r] = e || {});
|
|
110
|
+
}, mt = yr, Tt = Object, Rt = function(r) {
|
|
111
|
+
return Tt(mt(r));
|
|
112
|
+
}, It = s, _t = Rt, wt = It({}.hasOwnProperty), b = Object.hasOwn || function(e, t) {
|
|
113
|
+
return wt(_t(e), t);
|
|
114
|
+
}, Pt = s, Ct = 0, Dt = Math.random(), jt = Pt(1 .toString), be = function(r) {
|
|
115
|
+
return "Symbol(" + (r === void 0 ? "" : r) + ")_" + jt(++Ct + Dt, 36);
|
|
116
|
+
}, Nt = l, At = $e, jr = b, Mt = be, Ft = le, Lt = se, O = Nt.Symbol, W = At("wks"), xt = Lt ? O.for || O : O && O.withoutSetter || Mt, dr = function(r) {
|
|
117
|
+
return jr(W, r) || (W[r] = Ft && jr(O, r) ? O[r] : xt("Symbol." + r)), W[r];
|
|
118
|
+
}, Bt = sr, Nr = $, Ar = fe, Ut = Et, Gt = Ot, Kt = dr, Vt = TypeError, kt = Kt("toPrimitive"), zt = function(r, e) {
|
|
119
|
+
if (!Nr(r) || Ar(r)) return r;
|
|
120
|
+
var t = Ut(r, kt), n;
|
|
121
|
+
if (t) {
|
|
122
|
+
if (e === void 0 && (e = "default"), n = Bt(t, r, e), !Nr(n) || Ar(n)) return n;
|
|
123
|
+
throw new Vt("Can't convert object to primitive value");
|
|
124
|
+
}
|
|
125
|
+
return e === void 0 && (e = "number"), Gt(r, e);
|
|
126
|
+
}, Wt = zt, Yt = fe, Ee = function(r) {
|
|
127
|
+
var e = Wt(r, "string");
|
|
128
|
+
return Yt(e) ? e : e + "";
|
|
129
|
+
}, Ht = l, Mr = $, nr = Ht.document, qt = Mr(nr) && Mr(nr.createElement), Xt = function(r) {
|
|
130
|
+
return qt ? nr.createElement(r) : {};
|
|
131
|
+
}, Qt = p, Zt = y, Jt = Xt, de = !Qt && !Zt(function() {
|
|
132
|
+
return Object.defineProperty(Jt("div"), "a", {
|
|
133
|
+
get: function() {
|
|
134
|
+
return 7;
|
|
135
|
+
}
|
|
136
|
+
}).a !== 7;
|
|
137
|
+
}), rn = p, en = sr, tn = re, nn = fr, an = pr, on = Ee, vn = b, cn = de, Fr = Object.getOwnPropertyDescriptor;
|
|
138
|
+
lr.f = rn ? Fr : function(e, t) {
|
|
139
|
+
if (e = an(e), t = on(t), cn) try {
|
|
140
|
+
return Fr(e, t);
|
|
141
|
+
} catch {
|
|
142
|
+
}
|
|
143
|
+
if (vn(e, t)) return nn(!en(tn.f, e, t), e[t]);
|
|
144
|
+
};
|
|
145
|
+
var T = {}, un = p, ln = y, sn = un && ln(function() {
|
|
146
|
+
return Object.defineProperty(function() {
|
|
147
|
+
}, "prototype", {
|
|
148
|
+
value: 42,
|
|
149
|
+
writable: !1
|
|
150
|
+
}).prototype !== 42;
|
|
151
|
+
}), fn = $, yn = String, pn = TypeError, Oe = function(r) {
|
|
152
|
+
if (fn(r)) return r;
|
|
153
|
+
throw new pn(yn(r) + " is not an object");
|
|
154
|
+
}, $n = p, bn = de, En = sn, C = Oe, Lr = Ee, dn = TypeError, Y = Object.defineProperty, On = Object.getOwnPropertyDescriptor, H = "enumerable", q = "configurable", X = "writable";
|
|
155
|
+
T.f = $n ? En ? function(e, t, n) {
|
|
156
|
+
if (C(e), t = Lr(t), C(n), typeof e == "function" && t === "prototype" && "value" in n && X in n && !n[X]) {
|
|
157
|
+
var a = On(e, t);
|
|
158
|
+
a && a[X] && (e[t] = n.value, n = {
|
|
159
|
+
configurable: q in n ? n[q] : a[q],
|
|
160
|
+
enumerable: H in n ? n[H] : a[H],
|
|
161
|
+
writable: !1
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
return Y(e, t, n);
|
|
165
|
+
} : Y : function(e, t, n) {
|
|
166
|
+
if (C(e), t = Lr(t), C(n), bn) try {
|
|
167
|
+
return Y(e, t, n);
|
|
168
|
+
} catch {
|
|
169
|
+
}
|
|
170
|
+
if ("get" in n || "set" in n) throw new dn("Accessors not supported");
|
|
171
|
+
return "value" in n && (e[t] = n.value), e;
|
|
172
|
+
};
|
|
173
|
+
var gn = p, Sn = T, hn = fr, ge = gn ? function(r, e, t) {
|
|
174
|
+
return Sn.f(r, e, hn(1, t));
|
|
175
|
+
} : function(r, e, t) {
|
|
176
|
+
return r[e] = t, r;
|
|
177
|
+
}, Se = { exports: {} }, ar = p, mn = b, he = Function.prototype, Tn = ar && Object.getOwnPropertyDescriptor, Or = mn(he, "name"), Rn = Or && (function() {
|
|
178
|
+
}).name === "something", In = Or && (!ar || ar && Tn(he, "name").configurable), _n = {
|
|
179
|
+
EXISTS: Or,
|
|
180
|
+
PROPER: Rn,
|
|
181
|
+
CONFIGURABLE: In
|
|
182
|
+
}, wn = s, Pn = c, or = Er, Cn = wn(Function.toString);
|
|
183
|
+
Pn(or.inspectSource) || (or.inspectSource = function(r) {
|
|
184
|
+
return Cn(r);
|
|
185
|
+
});
|
|
186
|
+
var Dn = or.inspectSource, jn = l, Nn = c, xr = jn.WeakMap, An = Nn(xr) && /native code/.test(String(xr)), Mn = $e, Fn = be, Br = Mn("keys"), Ln = function(r) {
|
|
187
|
+
return Br[r] || (Br[r] = Fn(r));
|
|
188
|
+
}, me = {}, xn = An, Te = l, Bn = $, Un = ge, Q = b, Z = Er, Gn = Ln, Kn = me, Ur = "Object already initialized", ir = Te.TypeError, Vn = Te.WeakMap, F, m, L, kn = function(r) {
|
|
189
|
+
return L(r) ? m(r) : F(r, {});
|
|
190
|
+
}, zn = function(r) {
|
|
191
|
+
return function(e) {
|
|
192
|
+
var t;
|
|
193
|
+
if (!Bn(e) || (t = m(e)).type !== r)
|
|
194
|
+
throw new ir("Incompatible receiver, " + r + " required");
|
|
195
|
+
return t;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
if (xn || Z.state) {
|
|
199
|
+
var f = Z.state || (Z.state = new Vn());
|
|
200
|
+
f.get = f.get, f.has = f.has, f.set = f.set, F = function(r, e) {
|
|
201
|
+
if (f.has(r)) throw new ir(Ur);
|
|
202
|
+
return e.facade = r, f.set(r, e), e;
|
|
203
|
+
}, m = function(r) {
|
|
204
|
+
return f.get(r) || {};
|
|
205
|
+
}, L = function(r) {
|
|
206
|
+
return f.has(r);
|
|
207
|
+
};
|
|
208
|
+
} else {
|
|
209
|
+
var d = Gn("state");
|
|
210
|
+
Kn[d] = !0, F = function(r, e) {
|
|
211
|
+
if (Q(r, d)) throw new ir(Ur);
|
|
212
|
+
return e.facade = r, Un(r, d, e), e;
|
|
213
|
+
}, m = function(r) {
|
|
214
|
+
return Q(r, d) ? r[d] : {};
|
|
215
|
+
}, L = function(r) {
|
|
216
|
+
return Q(r, d);
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
var Wn = {
|
|
220
|
+
set: F,
|
|
221
|
+
get: m,
|
|
222
|
+
has: L,
|
|
223
|
+
enforce: kn,
|
|
224
|
+
getterFor: zn
|
|
225
|
+
}, gr = s, Yn = y, Hn = c, D = b, vr = p, qn = _n.CONFIGURABLE, Xn = Dn, Re = Wn, Qn = Re.enforce, Zn = Re.get, Gr = String, N = Object.defineProperty, Jn = gr("".slice), ra = gr("".replace), ea = gr([].join), ta = vr && !Yn(function() {
|
|
226
|
+
return N(function() {
|
|
227
|
+
}, "length", { value: 8 }).length !== 8;
|
|
228
|
+
}), na = String(String).split("String"), aa = Se.exports = function(r, e, t) {
|
|
229
|
+
Jn(Gr(e), 0, 7) === "Symbol(" && (e = "[" + ra(Gr(e), /^Symbol\(([^)]*)\).*$/, "$1") + "]"), t && t.getter && (e = "get " + e), t && t.setter && (e = "set " + e), (!D(r, "name") || qn && r.name !== e) && (vr ? N(r, "name", { value: e, configurable: !0 }) : r.name = e), ta && t && D(t, "arity") && r.length !== t.arity && N(r, "length", { value: t.arity });
|
|
230
|
+
try {
|
|
231
|
+
t && D(t, "constructor") && t.constructor ? vr && N(r, "prototype", { writable: !1 }) : r.prototype && (r.prototype = void 0);
|
|
232
|
+
} catch {
|
|
233
|
+
}
|
|
234
|
+
var n = Qn(r);
|
|
235
|
+
return D(n, "source") || (n.source = ea(na, typeof e == "string" ? e : "")), r;
|
|
236
|
+
};
|
|
237
|
+
Function.prototype.toString = aa(function() {
|
|
238
|
+
return Hn(this) && Zn(this).source || Xn(this);
|
|
239
|
+
}, "toString");
|
|
240
|
+
var oa = Se.exports, ia = c, va = T, ca = oa, ua = br, la = function(r, e, t, n) {
|
|
241
|
+
n || (n = {});
|
|
242
|
+
var a = n.enumerable, o = n.name !== void 0 ? n.name : e;
|
|
243
|
+
if (ia(t) && ca(t, o, n), n.global)
|
|
244
|
+
a ? r[e] = t : ua(e, t);
|
|
245
|
+
else {
|
|
246
|
+
try {
|
|
247
|
+
n.unsafe ? r[e] && (a = !0) : delete r[e];
|
|
248
|
+
} catch {
|
|
249
|
+
}
|
|
250
|
+
a ? r[e] = t : va.f(r, e, {
|
|
251
|
+
value: t,
|
|
252
|
+
enumerable: !1,
|
|
253
|
+
configurable: !n.nonConfigurable,
|
|
254
|
+
writable: !n.nonWritable
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
return r;
|
|
258
|
+
}, Ie = {}, sa = Math.ceil, fa = Math.floor, ya = Math.trunc || function(e) {
|
|
259
|
+
var t = +e;
|
|
260
|
+
return (t > 0 ? fa : sa)(t);
|
|
261
|
+
}, pa = ya, _e = function(r) {
|
|
262
|
+
var e = +r;
|
|
263
|
+
return e !== e || e === 0 ? 0 : pa(e);
|
|
264
|
+
}, $a = _e, ba = Math.max, Ea = Math.min, da = function(r, e) {
|
|
265
|
+
var t = $a(r);
|
|
266
|
+
return t < 0 ? ba(t + e, 0) : Ea(t, e);
|
|
267
|
+
}, Oa = _e, ga = Math.min, Sa = function(r) {
|
|
268
|
+
var e = Oa(r);
|
|
269
|
+
return e > 0 ? ga(e, 9007199254740991) : 0;
|
|
270
|
+
}, ha = Sa, ma = function(r) {
|
|
271
|
+
return ha(r.length);
|
|
272
|
+
}, Ta = pr, Ra = da, Ia = ma, Kr = function(r) {
|
|
273
|
+
return function(e, t, n) {
|
|
274
|
+
var a = Ta(e), o = Ia(a);
|
|
275
|
+
if (o === 0) return !r && -1;
|
|
276
|
+
var i = Ra(n, o), v;
|
|
277
|
+
if (r && t !== t) {
|
|
278
|
+
for (; o > i; )
|
|
279
|
+
if (v = a[i++], v !== v) return !0;
|
|
280
|
+
} else for (; o > i; i++)
|
|
281
|
+
if ((r || i in a) && a[i] === t) return r || i || 0;
|
|
282
|
+
return !r && -1;
|
|
283
|
+
};
|
|
284
|
+
}, _a = {
|
|
285
|
+
// `Array.prototype.includes` method
|
|
286
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
287
|
+
includes: Kr(!0),
|
|
288
|
+
// `Array.prototype.indexOf` method
|
|
289
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
290
|
+
indexOf: Kr(!1)
|
|
291
|
+
}, wa = s, J = b, Pa = pr, Ca = _a.indexOf, Da = me, Vr = wa([].push), ja = function(r, e) {
|
|
292
|
+
var t = Pa(r), n = 0, a = [], o;
|
|
293
|
+
for (o in t) !J(Da, o) && J(t, o) && Vr(a, o);
|
|
294
|
+
for (; e.length > n; ) J(t, o = e[n++]) && (~Ca(a, o) || Vr(a, o));
|
|
295
|
+
return a;
|
|
296
|
+
}, Na = [
|
|
297
|
+
"constructor",
|
|
298
|
+
"hasOwnProperty",
|
|
299
|
+
"isPrototypeOf",
|
|
300
|
+
"propertyIsEnumerable",
|
|
301
|
+
"toLocaleString",
|
|
302
|
+
"toString",
|
|
303
|
+
"valueOf"
|
|
304
|
+
], Aa = ja, Ma = Na, Fa = Ma.concat("length", "prototype");
|
|
305
|
+
Ie.f = Object.getOwnPropertyNames || function(e) {
|
|
306
|
+
return Aa(e, Fa);
|
|
307
|
+
};
|
|
308
|
+
var we = {};
|
|
309
|
+
we.f = Object.getOwnPropertySymbols;
|
|
310
|
+
var La = $r, xa = s, Ba = Ie, Ua = we, Ga = Oe, Ka = xa([].concat), Va = La("Reflect", "ownKeys") || function(e) {
|
|
311
|
+
var t = Ba.f(Ga(e)), n = Ua.f;
|
|
312
|
+
return n ? Ka(t, n(e)) : t;
|
|
313
|
+
}, kr = b, ka = Va, za = lr, Wa = T, Ya = function(r, e, t) {
|
|
314
|
+
for (var n = ka(e), a = Wa.f, o = za.f, i = 0; i < n.length; i++) {
|
|
315
|
+
var v = n[i];
|
|
316
|
+
!kr(r, v) && !(t && kr(t, v)) && a(r, v, o(e, v));
|
|
317
|
+
}
|
|
318
|
+
}, Ha = y, qa = c, Xa = /#|\.prototype\./, R = function(r, e) {
|
|
319
|
+
var t = Za[Qa(r)];
|
|
320
|
+
return t === ro ? !0 : t === Ja ? !1 : qa(e) ? Ha(e) : !!e;
|
|
321
|
+
}, Qa = R.normalize = function(r) {
|
|
322
|
+
return String(r).replace(Xa, ".").toLowerCase();
|
|
323
|
+
}, Za = R.data = {}, Ja = R.NATIVE = "N", ro = R.POLYFILL = "P", eo = R, j = l, to = lr.f, no = ge, ao = la, oo = br, io = Ya, vo = eo, co = function(r, e) {
|
|
324
|
+
var t = r.target, n = r.global, a = r.stat, o, i, v, E, g, x;
|
|
325
|
+
if (n ? i = j : a ? i = j[t] || oo(t, {}) : i = j[t] && j[t].prototype, i) for (v in e) {
|
|
326
|
+
if (g = e[v], r.dontCallGetSet ? (x = to(i, v), E = x && x.value) : E = i[v], o = vo(n ? v : t + (a ? "." : "#") + v, r.forced), !o && E !== void 0) {
|
|
327
|
+
if (typeof g == typeof E) continue;
|
|
328
|
+
io(g, E);
|
|
329
|
+
}
|
|
330
|
+
(r.sham || E && E.sham) && no(g, "sham", !0), ao(i, v, g, r);
|
|
331
|
+
}
|
|
332
|
+
}, uo = ce, lo = TypeError, so = function(r, e) {
|
|
333
|
+
if (uo(e, r)) return r;
|
|
334
|
+
throw new lo("Incorrect invocation");
|
|
335
|
+
}, fo = s, yo = ye, po = function(r, e, t) {
|
|
336
|
+
try {
|
|
337
|
+
return fo(yo(Object.getOwnPropertyDescriptor(r, e)[t]));
|
|
338
|
+
} catch {
|
|
339
|
+
}
|
|
340
|
+
}, $o = $, bo = function(r) {
|
|
341
|
+
return $o(r) || r === null;
|
|
342
|
+
}, Eo = bo, Oo = String, go = TypeError, So = function(r) {
|
|
343
|
+
if (Eo(r)) return r;
|
|
344
|
+
throw new go("Can't set " + Oo(r) + " as a prototype");
|
|
345
|
+
}, ho = po, mo = $, To = yr, Ro = So, Io = Object.setPrototypeOf || ("__proto__" in {} ? function() {
|
|
346
|
+
var r = !1, e = {}, t;
|
|
347
|
+
try {
|
|
348
|
+
t = ho(Object.prototype, "__proto__", "set"), t(e, []), r = e instanceof Array;
|
|
349
|
+
} catch {
|
|
350
|
+
}
|
|
351
|
+
return function(a, o) {
|
|
352
|
+
return To(a), Ro(o), mo(a) && (r ? t(a, o) : a.__proto__ = o), a;
|
|
353
|
+
};
|
|
354
|
+
}() : void 0), _o = c, wo = $, zr = Io, Po = function(r, e, t) {
|
|
355
|
+
var n, a;
|
|
356
|
+
return (
|
|
357
|
+
// it can work only with native `setPrototypeOf`
|
|
358
|
+
zr && // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
|
359
|
+
_o(n = e.constructor) && n !== t && wo(a = n.prototype) && a !== t.prototype && zr(r, a), r
|
|
360
|
+
);
|
|
361
|
+
}, Co = dr, Do = Co("toStringTag"), Pe = {};
|
|
362
|
+
Pe[Do] = "z";
|
|
363
|
+
var jo = String(Pe) === "[object z]", No = jo, Ao = c, A = ie, Mo = dr, Fo = Mo("toStringTag"), Lo = Object, xo = A(/* @__PURE__ */ function() {
|
|
364
|
+
return arguments;
|
|
365
|
+
}()) === "Arguments", Bo = function(r, e) {
|
|
366
|
+
try {
|
|
367
|
+
return r[e];
|
|
368
|
+
} catch {
|
|
369
|
+
}
|
|
370
|
+
}, Uo = No ? A : function(r) {
|
|
371
|
+
var e, t, n;
|
|
372
|
+
return r === void 0 ? "Undefined" : r === null ? "Null" : typeof (t = Bo(e = Lo(r), Fo)) == "string" ? t : xo ? A(e) : (n = A(e)) === "Object" && Ao(e.callee) ? "Arguments" : n;
|
|
373
|
+
}, Go = Uo, Ko = String, Vo = function(r) {
|
|
374
|
+
if (Go(r) === "Symbol") throw new TypeError("Cannot convert a Symbol value to a string");
|
|
375
|
+
return Ko(r);
|
|
376
|
+
}, ko = Vo, zo = function(r, e) {
|
|
377
|
+
return r === void 0 ? arguments.length < 2 ? "" : e : ko(r);
|
|
378
|
+
}, Wo = {
|
|
379
|
+
IndexSizeError: { s: "INDEX_SIZE_ERR", c: 1, m: 1 },
|
|
380
|
+
DOMStringSizeError: { s: "DOMSTRING_SIZE_ERR", c: 2, m: 0 },
|
|
381
|
+
HierarchyRequestError: { s: "HIERARCHY_REQUEST_ERR", c: 3, m: 1 },
|
|
382
|
+
WrongDocumentError: { s: "WRONG_DOCUMENT_ERR", c: 4, m: 1 },
|
|
383
|
+
InvalidCharacterError: { s: "INVALID_CHARACTER_ERR", c: 5, m: 1 },
|
|
384
|
+
NoDataAllowedError: { s: "NO_DATA_ALLOWED_ERR", c: 6, m: 0 },
|
|
385
|
+
NoModificationAllowedError: { s: "NO_MODIFICATION_ALLOWED_ERR", c: 7, m: 1 },
|
|
386
|
+
NotFoundError: { s: "NOT_FOUND_ERR", c: 8, m: 1 },
|
|
387
|
+
NotSupportedError: { s: "NOT_SUPPORTED_ERR", c: 9, m: 1 },
|
|
388
|
+
InUseAttributeError: { s: "INUSE_ATTRIBUTE_ERR", c: 10, m: 1 },
|
|
389
|
+
InvalidStateError: { s: "INVALID_STATE_ERR", c: 11, m: 1 },
|
|
390
|
+
SyntaxError: { s: "SYNTAX_ERR", c: 12, m: 1 },
|
|
391
|
+
InvalidModificationError: { s: "INVALID_MODIFICATION_ERR", c: 13, m: 1 },
|
|
392
|
+
NamespaceError: { s: "NAMESPACE_ERR", c: 14, m: 1 },
|
|
393
|
+
InvalidAccessError: { s: "INVALID_ACCESS_ERR", c: 15, m: 1 },
|
|
394
|
+
ValidationError: { s: "VALIDATION_ERR", c: 16, m: 0 },
|
|
395
|
+
TypeMismatchError: { s: "TYPE_MISMATCH_ERR", c: 17, m: 1 },
|
|
396
|
+
SecurityError: { s: "SECURITY_ERR", c: 18, m: 1 },
|
|
397
|
+
NetworkError: { s: "NETWORK_ERR", c: 19, m: 1 },
|
|
398
|
+
AbortError: { s: "ABORT_ERR", c: 20, m: 1 },
|
|
399
|
+
URLMismatchError: { s: "URL_MISMATCH_ERR", c: 21, m: 1 },
|
|
400
|
+
QuotaExceededError: { s: "QUOTA_EXCEEDED_ERR", c: 22, m: 1 },
|
|
401
|
+
TimeoutError: { s: "TIMEOUT_ERR", c: 23, m: 1 },
|
|
402
|
+
InvalidNodeTypeError: { s: "INVALID_NODE_TYPE_ERR", c: 24, m: 1 },
|
|
403
|
+
DataCloneError: { s: "DATA_CLONE_ERR", c: 25, m: 1 }
|
|
404
|
+
}, Yo = s, Ce = Error, Ho = Yo("".replace), qo = function(r) {
|
|
405
|
+
return String(new Ce(r).stack);
|
|
406
|
+
}("zxcasd"), De = /\n\s*at [^:]*:[^\n]*/, Xo = De.test(qo), Qo = function(r, e) {
|
|
407
|
+
if (Xo && typeof r == "string" && !Ce.prepareStackTrace)
|
|
408
|
+
for (; e--; ) r = Ho(r, De, "");
|
|
409
|
+
return r;
|
|
410
|
+
}, Zo = co, Jo = l, Sr = $r, cr = fr, ur = T.f, Wr = b, ri = so, ei = Po, Yr = zo, rr = Wo, ti = Qo, ni = p, I = "DOMException", je = Sr("Error"), _ = Sr(I), hr = function() {
|
|
411
|
+
ri(this, ai);
|
|
412
|
+
var e = arguments.length, t = Yr(e < 1 ? void 0 : arguments[0]), n = Yr(e < 2 ? void 0 : arguments[1], "Error"), a = new _(t, n), o = new je(t);
|
|
413
|
+
return o.name = I, ur(a, "stack", cr(1, ti(o.stack, 1))), ei(a, this, hr), a;
|
|
414
|
+
}, ai = hr.prototype = _.prototype, oi = "stack" in new je(I), ii = "stack" in new _(1, 2), er = _ && ni && Object.getOwnPropertyDescriptor(Jo, I), vi = !!er && !(er.writable && er.configurable), Hr = oi && !vi && !ii;
|
|
415
|
+
Zo({ global: !0, constructor: !0, forced: Hr }, {
|
|
416
|
+
// TODO: fix export logic
|
|
417
|
+
DOMException: Hr ? hr : _
|
|
418
|
+
});
|
|
419
|
+
var h = Sr(I), qr = h.prototype;
|
|
420
|
+
if (qr.constructor !== h) {
|
|
421
|
+
ur(qr, "constructor", cr(1, h));
|
|
422
|
+
for (var Xr in rr) if (Wr(rr, Xr)) {
|
|
423
|
+
var Qr = rr[Xr], Zr = Qr.s;
|
|
424
|
+
Wr(h, Zr) || ur(h, Zr, cr(6, Qr.c));
|
|
425
|
+
}
|
|
426
|
+
}
|
package/esm/index.js
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { ComboboxWithApiPagination as t } from "./lib/components/combobox-with-api-pagination/combobox-with-api-pagination.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { f as r, m as a, s as m } from "../chunks/mocks.js";
|
|
3
|
+
import { ComboboxWithApiTreeView as p } from "./lib/components/combobox-with-api-tree-view/combobox-with-api-tree-view.js";
|
|
4
|
+
import { a as x, f as b, m as n } from "../chunks/shared.js";
|
|
5
|
+
import { ComboboxWithApiContainer as C } from "./lib/components/combobox-with-api/combobox-with-api-container.js";
|
|
4
6
|
export {
|
|
5
|
-
|
|
7
|
+
C as ComboboxWithApi,
|
|
6
8
|
t as ComboboxWithApiPagination,
|
|
7
|
-
|
|
9
|
+
p as ComboboxWithApiTreeView,
|
|
10
|
+
x as apiResponse,
|
|
11
|
+
b as findNode,
|
|
12
|
+
r as findState,
|
|
13
|
+
a as mockFetcher,
|
|
14
|
+
n as mockTreeFetcher,
|
|
15
|
+
m as states
|
|
8
16
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { ComboboxWithApiPagination as
|
|
1
|
+
import { ComboboxWithApiPagination as a } from "./combobox-with-api-pagination.js";
|
|
2
|
+
import { f as s, m as i, s as m } from "../../../../chunks/mocks.js";
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
+
a as ComboboxWithApiPagination,
|
|
5
|
+
s as findState,
|
|
6
|
+
i as mockFetcher,
|
|
7
|
+
m as states
|
|
4
8
|
};
|
|
@@ -1,119 +1,129 @@
|
|
|
1
|
-
import { useComboboxStore as
|
|
2
|
-
import { useLabelable as
|
|
3
|
-
import { XMark as
|
|
4
|
-
import { ChipsGroup as
|
|
5
|
-
import
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
import { useIntl as
|
|
8
|
-
import
|
|
9
|
-
import { useControllableState as
|
|
10
|
-
import { s as
|
|
11
|
-
import { jsxs as
|
|
12
|
-
const
|
|
1
|
+
import { useComboboxStore as G, ComboboxProvider as z, PopoverAnchor as X, Combobox as q, ComboboxCancel as H, ComboboxPopover as J } from "@ariakit/react";
|
|
2
|
+
import { useLabelable as K, InputChip as Q, IconButton as U } from "@box/blueprint-web";
|
|
3
|
+
import { XMark as Y } from "@box/blueprint-web-assets/icons/Fill";
|
|
4
|
+
import { ChipsGroup as Z } from "@box/blueprint-web/lib-esm/combobox/chips-group";
|
|
5
|
+
import m from "clsx";
|
|
6
|
+
import { forwardRef as _, useId as $, useState as V, useRef as ee, useCallback as oe } from "react";
|
|
7
|
+
import { useIntl as le } from "react-intl";
|
|
8
|
+
import g from "../combobox-with-api-pagination/messages.js";
|
|
9
|
+
import { useControllableState as te } from "../combobox-with-api-pagination/utils/use-controllable-state.js";
|
|
10
|
+
import { s as o, D as ae } from "../../../../chunks/dynamic-loading-tree.js";
|
|
11
|
+
import { jsxs as n, jsx as l } from "react/jsx-runtime";
|
|
12
|
+
const ve = /* @__PURE__ */ _(function(w, re) {
|
|
13
13
|
const {
|
|
14
|
-
defaultFetcher:
|
|
15
|
-
value:
|
|
16
|
-
onValueChange:
|
|
14
|
+
defaultFetcher: I,
|
|
15
|
+
value: L,
|
|
16
|
+
onValueChange: N,
|
|
17
17
|
noResultMessage: S,
|
|
18
|
-
defaultValue:
|
|
19
|
-
loadingAriaLabel:
|
|
20
|
-
multiselect:
|
|
21
|
-
className:
|
|
18
|
+
defaultValue: y = [],
|
|
19
|
+
loadingAriaLabel: A,
|
|
20
|
+
multiselect: p = !1,
|
|
21
|
+
className: R,
|
|
22
22
|
levels: B,
|
|
23
23
|
selectableLevels: M,
|
|
24
24
|
label: P,
|
|
25
|
-
hideLabel:
|
|
26
|
-
treeAriaLabel:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
hideLabel: b,
|
|
26
|
+
treeAriaLabel: W,
|
|
27
|
+
portalElement: k,
|
|
28
|
+
placeholder: D,
|
|
29
|
+
disabled: O
|
|
30
|
+
} = w, {
|
|
31
|
+
formatMessage: d
|
|
32
|
+
} = le(), i = $(), [h, T] = V(!1), [t, c] = te({
|
|
33
|
+
prop: L,
|
|
34
|
+
defaultProp: y,
|
|
35
|
+
onChange: N
|
|
36
|
+
}), [f, C] = V(""), j = ee(null), E = oe((e) => {
|
|
34
37
|
C(e);
|
|
35
|
-
}, [C]),
|
|
38
|
+
}, [C]), u = G({
|
|
36
39
|
includesBaseElement: !0,
|
|
37
40
|
virtualFocus: !1,
|
|
38
|
-
value:
|
|
39
|
-
setValue:
|
|
40
|
-
open:
|
|
41
|
-
setOpen:
|
|
42
|
-
}), v = t.length > 0, x = t.length > 0,
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
store:
|
|
45
|
-
children: [/* @__PURE__ */
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
children: /* @__PURE__ */ o("div", {
|
|
52
|
-
className: c(l.container, y),
|
|
53
|
-
children: /* @__PURE__ */ u("div", {
|
|
54
|
-
className: c(l.comboboxContainer, {
|
|
55
|
-
[l.withChips]: x,
|
|
56
|
-
[l.withComboboxButtons]: v
|
|
41
|
+
value: f,
|
|
42
|
+
setValue: E,
|
|
43
|
+
open: h,
|
|
44
|
+
setOpen: T
|
|
45
|
+
}), v = t.length > 0, x = t.length > 0, F = K(P, i);
|
|
46
|
+
return /* @__PURE__ */ n(z, {
|
|
47
|
+
store: u,
|
|
48
|
+
children: [/* @__PURE__ */ l(X, {
|
|
49
|
+
children: /* @__PURE__ */ n("div", {
|
|
50
|
+
className: m(o.container, R),
|
|
51
|
+
children: [/* @__PURE__ */ l(F, {
|
|
52
|
+
className: m(o.label, {
|
|
53
|
+
[o.hiddenLabel]: b
|
|
57
54
|
}),
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
hideLabel: b
|
|
56
|
+
}), /* @__PURE__ */ n("div", {
|
|
57
|
+
className: m(o.comboboxContainer, {
|
|
58
|
+
[o.withChips]: x,
|
|
59
|
+
[o.withComboboxButtons]: v
|
|
60
|
+
}),
|
|
61
|
+
children: [x && /* @__PURE__ */ l(Z, {
|
|
62
|
+
children: t.map((e) => /* @__PURE__ */ l(Q, {
|
|
60
63
|
label: e.displayValue,
|
|
61
64
|
onDelete: () => {
|
|
62
65
|
const a = t.filter((r) => r.value !== e.value);
|
|
63
|
-
|
|
66
|
+
c(a);
|
|
64
67
|
},
|
|
65
68
|
tooltip: e.displayValue
|
|
66
69
|
}, e.value))
|
|
67
|
-
}), /* @__PURE__ */
|
|
68
|
-
className:
|
|
69
|
-
children: [/* @__PURE__ */
|
|
70
|
-
ref:
|
|
71
|
-
className:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
}), /* @__PURE__ */ n("div", {
|
|
71
|
+
className: o.textInputWrapper,
|
|
72
|
+
children: [/* @__PURE__ */ l(q, {
|
|
73
|
+
ref: j,
|
|
74
|
+
className: o.textInput,
|
|
75
|
+
disabled: O,
|
|
76
|
+
id: i,
|
|
77
|
+
placeholder: D,
|
|
78
|
+
store: u
|
|
79
|
+
}), /* @__PURE__ */ l("div", {
|
|
80
|
+
className: o.comboboxButtons,
|
|
81
|
+
children: v ? /* @__PURE__ */ l(H, {
|
|
77
82
|
onClick: () => {
|
|
78
|
-
|
|
83
|
+
c([]);
|
|
79
84
|
},
|
|
80
|
-
render: (e) => /* @__PURE__ */
|
|
85
|
+
render: (e) => /* @__PURE__ */ l(U, {
|
|
81
86
|
...e,
|
|
82
87
|
"aria-label": "Clear selection",
|
|
83
|
-
icon:
|
|
88
|
+
icon: Y,
|
|
84
89
|
size: "x-small"
|
|
85
90
|
}),
|
|
86
|
-
store:
|
|
91
|
+
store: u
|
|
87
92
|
}) : null
|
|
88
93
|
})]
|
|
89
94
|
})]
|
|
90
|
-
})
|
|
95
|
+
})]
|
|
91
96
|
})
|
|
92
|
-
}), /* @__PURE__ */
|
|
93
|
-
|
|
97
|
+
}), /* @__PURE__ */ l(J, {
|
|
98
|
+
"aria-labelledby": i,
|
|
99
|
+
className: o.popover,
|
|
100
|
+
fitViewport: !0,
|
|
94
101
|
gutter: 8,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
102
|
+
portal: !0,
|
|
103
|
+
portalElement: k,
|
|
104
|
+
sameWidth: !0,
|
|
105
|
+
children: /* @__PURE__ */ l(ae, {
|
|
106
|
+
ariaLabel: W,
|
|
107
|
+
defaultFetcher: I,
|
|
98
108
|
levels: B,
|
|
99
|
-
loadingAriaLabel:
|
|
100
|
-
multiselect:
|
|
101
|
-
noResultMessage: S ||
|
|
109
|
+
loadingAriaLabel: A || d(g.loadingAriaLabel),
|
|
110
|
+
multiselect: p,
|
|
111
|
+
noResultMessage: S || d(g.noResults),
|
|
102
112
|
onSelect: (e) => {
|
|
103
113
|
const {
|
|
104
114
|
metadata: s
|
|
105
115
|
} = e.element;
|
|
106
116
|
let a = [];
|
|
107
|
-
e.isSelected ? (
|
|
117
|
+
e.isSelected ? (p && (a = t.filter((r) => r.value !== e.element.id)), a.push({
|
|
108
118
|
value: e.element.id,
|
|
109
119
|
displayValue: s.displayValue,
|
|
110
120
|
level: s.level,
|
|
111
121
|
selectable: s.selectable,
|
|
112
122
|
ancestors: s.ancestors
|
|
113
|
-
})) : a = t.filter((r) => r.value !== e.element.id),
|
|
123
|
+
})) : a = t.filter((r) => r.value !== e.element.id), c(a);
|
|
114
124
|
},
|
|
115
|
-
open:
|
|
116
|
-
searchInput:
|
|
125
|
+
open: h,
|
|
126
|
+
searchInput: f.trimStart(),
|
|
117
127
|
selectableLevels: M,
|
|
118
128
|
selectedNodes: t.map((e) => e.value)
|
|
119
129
|
})
|
|
@@ -121,5 +131,5 @@ const fe = /* @__PURE__ */ U(function(I, te) {
|
|
|
121
131
|
});
|
|
122
132
|
});
|
|
123
133
|
export {
|
|
124
|
-
|
|
134
|
+
ve as ComboboxWithApiTreeView
|
|
125
135
|
};
|