bitboss-ui 2.0.2 → 2.0.3
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/dist/index105.js +4 -4
- package/dist/index113.js +1 -1
- package/dist/index115.js +4 -4
- package/dist/index117.js +1 -1
- package/dist/index12.js +1 -1
- package/dist/index121.js +1 -1
- package/dist/index122.js +1 -1
- package/dist/index123.js +1 -1
- package/dist/index125.js +1 -1
- package/dist/index128.js +1 -1
- package/dist/index14.js +3 -3
- package/dist/index18.js +8 -8
- package/dist/index198.js +5 -2
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +7 -7
- package/dist/index20.js +12 -12
- package/dist/index202.js +3 -3
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +3 -35
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +35 -6
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +6 -7
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +7 -5
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +2 -5
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +124 -14
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +5 -16
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +121 -17
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +18 -18
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +2 -27
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +2 -8
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +174 -2
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +42 -2
- package/dist/index215.js.map +1 -1
- package/dist/index217.js +13 -2
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +369 -3
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +2 -126
- package/dist/index219.js.map +1 -1
- package/dist/index22.js +5 -5
- package/dist/index220.js +4 -123
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +2 -2
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +14 -172
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +16 -42
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +22 -0
- package/dist/index224.js.map +1 -0
- package/dist/index225.js +27 -13
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +8 -369
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +2 -3
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +3 -18
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +2 -105
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +21 -0
- package/dist/index230.js.map +1 -0
- package/dist/index231.js +53 -47
- package/dist/index231.js.map +1 -1
- package/dist/index233.js +100 -2
- package/dist/index233.js.map +1 -1
- package/dist/index237.js +9 -3
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +23 -12
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +6 -9
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +1 -1
- package/dist/index240.js +15 -8
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +9 -17
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +3 -431
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +11 -88
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +8 -199
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +8 -8
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +17 -23
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +224 -6
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +430 -15
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +88 -8
- package/dist/index249.js.map +1 -1
- package/dist/index253.js +2 -2
- package/dist/index255.js +126 -2
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +3 -2
- package/dist/index256.js.map +1 -1
- package/dist/index258.js +6 -3
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +4 -224
- package/dist/index259.js.map +1 -1
- package/dist/index26.js +3 -3
- package/dist/index260.js +2 -3
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +72 -0
- package/dist/index261.js.map +1 -0
- package/dist/index262.js +199 -6
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +5 -2
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +434 -67
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +127 -5
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +2 -2
- package/dist/index267.js +2 -126
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +2 -3
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +2 -3
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +26 -209
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +6 -0
- package/dist/index271.js.map +1 -0
- package/dist/index272.js +3 -436
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +210 -126
- package/dist/index273.js.map +1 -1
- package/dist/index275.js +4 -15
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +4 -11
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +59 -4
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +15 -4
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +34 -58
- package/dist/index279.js.map +1 -1
- package/dist/index28.js +2 -2
- package/dist/index280.js +10 -34
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +1 -1
- package/dist/index32.js +3 -3
- package/dist/index34.js +12 -12
- package/dist/index36.js +4 -4
- package/dist/index38.js +2 -2
- package/dist/index42.js +5 -5
- package/dist/index44.js +2 -2
- package/dist/index46.js +2 -2
- package/dist/index52.js +1 -1
- package/dist/index54.js +1 -1
- package/dist/index70.js +4 -4
- package/dist/index74.js +2 -2
- package/dist/index76.js +1 -1
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/index83.js +3 -3
- package/dist/index85.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/index216.js +0 -7
- package/dist/index216.js.map +0 -1
- package/dist/index234.js +0 -6
- package/dist/index234.js.map +0 -1
- package/dist/index257.js +0 -5
- package/dist/index257.js.map +0 -1
- package/dist/index274.js +0 -31
- package/dist/index274.js.map +0 -1
package/dist/index265.js
CHANGED
|
@@ -1,8 +1,130 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const P = ["top", "right", "bottom", "left"], l = Math.min, m = Math.max, M = Math.round, O = Math.floor, S = (t) => ({
|
|
2
|
+
x: t,
|
|
3
|
+
y: t
|
|
4
|
+
}), p = {
|
|
5
|
+
left: "right",
|
|
6
|
+
right: "left",
|
|
7
|
+
bottom: "top",
|
|
8
|
+
top: "bottom"
|
|
9
|
+
}, a = {
|
|
10
|
+
start: "end",
|
|
11
|
+
end: "start"
|
|
12
|
+
};
|
|
13
|
+
function w(t, n, e) {
|
|
14
|
+
return m(t, l(n, e));
|
|
15
|
+
}
|
|
16
|
+
function j(t, n) {
|
|
17
|
+
return typeof t == "function" ? t(n) : t;
|
|
18
|
+
}
|
|
19
|
+
function u(t) {
|
|
20
|
+
return t.split("-")[0];
|
|
21
|
+
}
|
|
22
|
+
function g(t) {
|
|
23
|
+
return t.split("-")[1];
|
|
24
|
+
}
|
|
25
|
+
function h(t) {
|
|
26
|
+
return t === "x" ? "y" : "x";
|
|
27
|
+
}
|
|
28
|
+
function b(t) {
|
|
29
|
+
return t === "y" ? "height" : "width";
|
|
30
|
+
}
|
|
31
|
+
function x(t) {
|
|
32
|
+
return ["top", "bottom"].includes(u(t)) ? "y" : "x";
|
|
33
|
+
}
|
|
34
|
+
function d(t) {
|
|
35
|
+
return h(x(t));
|
|
36
|
+
}
|
|
37
|
+
function C(t, n, e) {
|
|
38
|
+
e === void 0 && (e = !1);
|
|
39
|
+
const r = g(t), o = d(t), i = b(o);
|
|
40
|
+
let c = o === "x" ? r === (e ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
41
|
+
return n.reference[i] > n.floating[i] && (c = f(c)), [c, f(c)];
|
|
42
|
+
}
|
|
43
|
+
function L(t) {
|
|
44
|
+
const n = f(t);
|
|
45
|
+
return [s(t), n, s(n)];
|
|
46
|
+
}
|
|
47
|
+
function s(t) {
|
|
48
|
+
return t.replace(/start|end/g, (n) => a[n]);
|
|
49
|
+
}
|
|
50
|
+
function A(t, n, e) {
|
|
51
|
+
const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], c = ["bottom", "top"];
|
|
52
|
+
switch (t) {
|
|
53
|
+
case "top":
|
|
54
|
+
case "bottom":
|
|
55
|
+
return e ? n ? o : r : n ? r : o;
|
|
56
|
+
case "left":
|
|
57
|
+
case "right":
|
|
58
|
+
return n ? i : c;
|
|
59
|
+
default:
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function E(t, n, e, r) {
|
|
64
|
+
const o = g(t);
|
|
65
|
+
let i = A(u(t), e === "start", r);
|
|
66
|
+
return o && (i = i.map((c) => c + "-" + o), n && (i = i.concat(i.map(s)))), i;
|
|
67
|
+
}
|
|
68
|
+
function f(t) {
|
|
69
|
+
return t.replace(/left|right|bottom|top/g, (n) => p[n]);
|
|
70
|
+
}
|
|
71
|
+
function y(t) {
|
|
72
|
+
return {
|
|
73
|
+
top: 0,
|
|
74
|
+
right: 0,
|
|
75
|
+
bottom: 0,
|
|
76
|
+
left: 0,
|
|
77
|
+
...t
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function R(t) {
|
|
81
|
+
return typeof t != "number" ? y(t) : {
|
|
82
|
+
top: t,
|
|
83
|
+
right: t,
|
|
84
|
+
bottom: t,
|
|
85
|
+
left: t
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function T(t) {
|
|
89
|
+
const {
|
|
90
|
+
x: n,
|
|
91
|
+
y: e,
|
|
92
|
+
width: r,
|
|
93
|
+
height: o
|
|
94
|
+
} = t;
|
|
95
|
+
return {
|
|
96
|
+
width: r,
|
|
97
|
+
height: o,
|
|
98
|
+
top: e,
|
|
99
|
+
left: n,
|
|
100
|
+
right: n + r,
|
|
101
|
+
bottom: e + o,
|
|
102
|
+
x: n,
|
|
103
|
+
y: e
|
|
104
|
+
};
|
|
105
|
+
}
|
|
5
106
|
export {
|
|
6
|
-
|
|
107
|
+
w as clamp,
|
|
108
|
+
S as createCoords,
|
|
109
|
+
j as evaluate,
|
|
110
|
+
y as expandPaddingObject,
|
|
111
|
+
O as floor,
|
|
112
|
+
g as getAlignment,
|
|
113
|
+
d as getAlignmentAxis,
|
|
114
|
+
C as getAlignmentSides,
|
|
115
|
+
b as getAxisLength,
|
|
116
|
+
L as getExpandedPlacements,
|
|
117
|
+
s as getOppositeAlignmentPlacement,
|
|
118
|
+
h as getOppositeAxis,
|
|
119
|
+
E as getOppositeAxisPlacements,
|
|
120
|
+
f as getOppositePlacement,
|
|
121
|
+
R as getPaddingObject,
|
|
122
|
+
u as getSide,
|
|
123
|
+
x as getSideAxis,
|
|
124
|
+
m as max,
|
|
125
|
+
l as min,
|
|
126
|
+
T as rectToClientRect,
|
|
127
|
+
M as round,
|
|
128
|
+
P as sides
|
|
7
129
|
};
|
|
8
130
|
//# sourceMappingURL=index265.js.map
|
package/dist/index265.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index265.js","sources":["../
|
|
1
|
+
{"version":3,"file":"index265.js","sources":["../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs"],"sourcesContent":["/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n"],"names":["sides","min","max","round","floor","createCoords","v","oppositeSideMap","oppositeAlignmentMap","clamp","start","value","end","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","length","mainAlignmentSide","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","getSideList","side","isStart","lr","rl","tb","bt","getOppositeAxisPlacements","flipAlignment","direction","list","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","x","y","width","height"],"mappings":"AAKK,MAACA,IAAQ,CAAC,OAAO,SAAS,UAAU,MAAM,GAGzCC,IAAM,KAAK,KACXC,IAAM,KAAK,KACXC,IAAQ,KAAK,OACbC,IAAQ,KAAK,OACbC,IAAe,CAAAC,OAAM;AAAA,EACzB,GAAGA;AAAA,EACH,GAAGA;AACL,IACMC,IAAkB;AAAA,EACtB,MAA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AA,IACR,MAAMA;AAAA,EACV;AACA;AACA,SAASE,EAAiBC,GAAM;AAC9B,QAAM;AAAA,IACJ,GAAAC;AAAA,IACA,GAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,EACD,IAAGJ;AACJ,SAAO;AAAA,IACL,OAAAG;AAAA,IACA,QAAAC;AAAA,IACA,KAAKF;AAAA,IACL,MAAMD;AAAA,IACN,OAAOA,IAAIE;AAAA,IACX,QAAQD,IAAIE;AAAA,IACZ,GAAAH;AAAA,IACA,GAAAC;AAAA,EACJ;AACA;","x_google_ignoreList":[0]}
|
package/dist/index266.js
CHANGED
package/dist/index267.js
CHANGED
|
@@ -1,129 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
return d(n) ? (n.nodeName || "").toLowerCase() : "#document";
|
|
3
|
-
}
|
|
4
|
-
function i(n) {
|
|
5
|
-
var t;
|
|
6
|
-
return (n == null || (t = n.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
7
|
-
}
|
|
8
|
-
function S(n) {
|
|
9
|
-
var t;
|
|
10
|
-
return (t = (d(n) ? n.ownerDocument : n.document) || window.document) == null ? void 0 : t.documentElement;
|
|
11
|
-
}
|
|
12
|
-
function d(n) {
|
|
13
|
-
return n instanceof Node || n instanceof i(n).Node;
|
|
14
|
-
}
|
|
15
|
-
function m(n) {
|
|
16
|
-
return n instanceof Element || n instanceof i(n).Element;
|
|
17
|
-
}
|
|
18
|
-
function p(n) {
|
|
19
|
-
return n instanceof HTMLElement || n instanceof i(n).HTMLElement;
|
|
20
|
-
}
|
|
21
|
-
function f(n) {
|
|
22
|
-
return typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof i(n).ShadowRoot;
|
|
23
|
-
}
|
|
24
|
-
function w(n) {
|
|
25
|
-
const {
|
|
26
|
-
overflow: t,
|
|
27
|
-
overflowX: e,
|
|
28
|
-
overflowY: o,
|
|
29
|
-
display: r
|
|
30
|
-
} = g(n);
|
|
31
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + o + e) && !["inline", "contents"].includes(r);
|
|
32
|
-
}
|
|
33
|
-
function L(n) {
|
|
34
|
-
return ["table", "td", "th"].includes(l(n));
|
|
35
|
-
}
|
|
36
|
-
function E(n) {
|
|
37
|
-
return [":popover-open", ":modal"].some((t) => {
|
|
38
|
-
try {
|
|
39
|
-
return n.matches(t);
|
|
40
|
-
} catch {
|
|
41
|
-
return !1;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
function N(n) {
|
|
46
|
-
const t = T(), e = m(n) ? g(n) : n;
|
|
47
|
-
return e.transform !== "none" || e.perspective !== "none" || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (e.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (e.contain || "").includes(o));
|
|
48
|
-
}
|
|
49
|
-
function D(n) {
|
|
50
|
-
let t = u(n);
|
|
51
|
-
for (; p(t) && !y(t); ) {
|
|
52
|
-
if (N(t))
|
|
53
|
-
return t;
|
|
54
|
-
if (E(t))
|
|
55
|
-
return null;
|
|
56
|
-
t = u(t);
|
|
57
|
-
}
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
function T() {
|
|
61
|
-
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
62
|
-
}
|
|
63
|
-
function y(n) {
|
|
64
|
-
return ["html", "body", "#document"].includes(l(n));
|
|
65
|
-
}
|
|
66
|
-
function g(n) {
|
|
67
|
-
return i(n).getComputedStyle(n);
|
|
68
|
-
}
|
|
69
|
-
function k(n) {
|
|
70
|
-
return m(n) ? {
|
|
71
|
-
scrollLeft: n.scrollLeft,
|
|
72
|
-
scrollTop: n.scrollTop
|
|
73
|
-
} : {
|
|
74
|
-
scrollLeft: n.scrollX,
|
|
75
|
-
scrollTop: n.scrollY
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
function u(n) {
|
|
79
|
-
if (l(n) === "html")
|
|
80
|
-
return n;
|
|
81
|
-
const t = (
|
|
82
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
83
|
-
n.assignedSlot || // DOM Element detected.
|
|
84
|
-
n.parentNode || // ShadowRoot detected.
|
|
85
|
-
f(n) && n.host || // Fallback.
|
|
86
|
-
S(n)
|
|
87
|
-
);
|
|
88
|
-
return f(t) ? t.host : t;
|
|
89
|
-
}
|
|
90
|
-
function b(n) {
|
|
91
|
-
const t = u(n);
|
|
92
|
-
return y(t) ? n.ownerDocument ? n.ownerDocument.body : n.body : p(t) && w(t) ? t : b(t);
|
|
93
|
-
}
|
|
94
|
-
function a(n, t, e) {
|
|
95
|
-
var o;
|
|
96
|
-
t === void 0 && (t = []), e === void 0 && (e = !0);
|
|
97
|
-
const r = b(n), h = r === ((o = n.ownerDocument) == null ? void 0 : o.body), c = i(r);
|
|
98
|
-
if (h) {
|
|
99
|
-
const s = v(c);
|
|
100
|
-
return t.concat(c, c.visualViewport || [], w(r) ? r : [], s && e ? a(s) : []);
|
|
101
|
-
}
|
|
102
|
-
return t.concat(r, a(r, [], e));
|
|
103
|
-
}
|
|
104
|
-
function v(n) {
|
|
105
|
-
return Object.getPrototypeOf(n.parent) ? n.frameElement : null;
|
|
106
|
-
}
|
|
1
|
+
var e = { exports: {} };
|
|
107
2
|
export {
|
|
108
|
-
|
|
109
|
-
D as getContainingBlock,
|
|
110
|
-
S as getDocumentElement,
|
|
111
|
-
v as getFrameElement,
|
|
112
|
-
b as getNearestOverflowAncestor,
|
|
113
|
-
l as getNodeName,
|
|
114
|
-
k as getNodeScroll,
|
|
115
|
-
a as getOverflowAncestors,
|
|
116
|
-
u as getParentNode,
|
|
117
|
-
i as getWindow,
|
|
118
|
-
N as isContainingBlock,
|
|
119
|
-
m as isElement,
|
|
120
|
-
p as isHTMLElement,
|
|
121
|
-
y as isLastTraversableNode,
|
|
122
|
-
d as isNode,
|
|
123
|
-
w as isOverflowElement,
|
|
124
|
-
f as isShadowRoot,
|
|
125
|
-
L as isTableElement,
|
|
126
|
-
E as isTopLayer,
|
|
127
|
-
T as isWebKit
|
|
3
|
+
e as __module
|
|
128
4
|
};
|
|
129
5
|
//# sourceMappingURL=index267.js.map
|
package/dist/index267.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index267.js","sources":[
|
|
1
|
+
{"version":3,"file":"index267.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index268.js
CHANGED
package/dist/index268.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index268.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index268.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index269.js
CHANGED
package/dist/index269.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index269.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index269.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index270.js
CHANGED
|
@@ -1,214 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
__name: "ListBox",
|
|
14
|
-
props: {
|
|
15
|
-
options: {},
|
|
16
|
-
open: { type: Boolean },
|
|
17
|
-
loading: { type: Boolean },
|
|
18
|
-
transitionDuration: { default: 250 },
|
|
19
|
-
loadingText: { default: "Caricamento..." },
|
|
20
|
-
noDataText: { default: "Nessun elemento da visualizzare" }
|
|
21
|
-
},
|
|
22
|
-
emits: ["option:selected", "option:unselected"],
|
|
23
|
-
setup(T, { expose: V, emit: B }) {
|
|
24
|
-
const o = T, _ = B, s = h(null), C = (e) => "option_" + JSON.stringify(e).replace(/\W/g, "_"), i = m(
|
|
25
|
-
() => o.options.map((e) => ({ ...e, id: C(e.value) }))
|
|
26
|
-
), p = Z({
|
|
27
|
-
get count() {
|
|
28
|
-
return o.options.length;
|
|
29
|
-
},
|
|
30
|
-
getScrollElement: () => s.value,
|
|
31
|
-
estimateSize: () => 42,
|
|
32
|
-
overscan: 5
|
|
33
|
-
}), L = (e) => {
|
|
34
|
-
e && p.value.measureElement(e);
|
|
35
|
-
}, O = m(() => p.value.getVirtualItems()), F = m(() => p.value.getTotalSize()), n = h(null), a = m(
|
|
36
|
-
() => o.open && o.options.some((e) => !e.disabled)
|
|
37
|
-
), y = (e = 1) => {
|
|
38
|
-
const l = f(n.value) ? -1 : n.value;
|
|
39
|
-
let t = (l + e) % o.options.length;
|
|
40
|
-
for (; o.options[t].disabled && t !== l; )
|
|
41
|
-
t = y(e + 1);
|
|
42
|
-
return t;
|
|
43
|
-
}, M = () => {
|
|
44
|
-
if (!a.value) return;
|
|
45
|
-
const e = y();
|
|
46
|
-
n.value = e, u();
|
|
47
|
-
}, I = (e = 1) => {
|
|
48
|
-
const l = f(n.value) ? 0 : n.value;
|
|
49
|
-
let t = (l - e + o.options.length) % o.options.length;
|
|
50
|
-
for (; o.options[t].disabled && t !== l; )
|
|
51
|
-
t = I(e + 1);
|
|
52
|
-
return t;
|
|
53
|
-
}, A = async () => {
|
|
54
|
-
if (!a.value) return;
|
|
55
|
-
const e = I();
|
|
56
|
-
n.value = e, u();
|
|
57
|
-
}, P = () => {
|
|
58
|
-
if (!a.value) return;
|
|
59
|
-
let e = 0;
|
|
60
|
-
for (; o.options[e].disabled; )
|
|
61
|
-
e++;
|
|
62
|
-
n.value = e, u();
|
|
63
|
-
}, R = () => {
|
|
64
|
-
if (!a.value) return;
|
|
65
|
-
let e = o.options.length - 1;
|
|
66
|
-
for (; o.options[e].disabled && e !== 0; )
|
|
67
|
-
e--;
|
|
68
|
-
n.value = e, u();
|
|
69
|
-
}, q = () => {
|
|
70
|
-
if (!a.value) return;
|
|
71
|
-
let e = 0;
|
|
72
|
-
for (; o.options[e] && !o.options[e].selected && o.options.length !== e; )
|
|
73
|
-
e++;
|
|
74
|
-
n.value = e % o.options.length, u();
|
|
75
|
-
}, J = () => {
|
|
76
|
-
if (!a.value) return;
|
|
77
|
-
let e = o.options.length - 1;
|
|
78
|
-
for (; o.options[e].selected && e > 0; )
|
|
79
|
-
e--;
|
|
80
|
-
n.value = e === -1 ? o.options.length - 1 : e, u();
|
|
81
|
-
}, W = (e) => {
|
|
82
|
-
if (!a.value) return;
|
|
83
|
-
const l = o.options.findIndex(
|
|
84
|
-
(t) => t.valueHash === e
|
|
85
|
-
);
|
|
86
|
-
l >= 0 && (n.value = l), u();
|
|
87
|
-
}, S = () => {
|
|
88
|
-
n.value = null;
|
|
89
|
-
}, u = () => {
|
|
90
|
-
s.value && ee(n.value) && p.value.scrollToIndex(n.value, {
|
|
91
|
-
align: "center",
|
|
92
|
-
behavior: "smooth"
|
|
93
|
-
});
|
|
94
|
-
}, k = () => {
|
|
95
|
-
if (f(n.value) || !o.open) return;
|
|
96
|
-
const e = o.options[n.value];
|
|
97
|
-
e.selected ? _("option:unselected", e) : _("option:selected", e);
|
|
98
|
-
}, w = h(0), z = () => {
|
|
99
|
-
s.value && (w.value = s.value.scrollHeight);
|
|
100
|
-
}, Y = (e) => !e.disabled, j = (e) => {
|
|
101
|
-
if (e.preventDefault(), s.value && e.target && e.target instanceof HTMLElement) {
|
|
102
|
-
if (!s.value.querySelector('[role="listbox"]'))
|
|
103
|
-
throw new Error("Could not find listbox in DOM tree.");
|
|
104
|
-
let t = e.target, d = t.dataset.index;
|
|
105
|
-
for (; f(d) && t.parentElement; )
|
|
106
|
-
t = t.parentElement, d = t.dataset.index;
|
|
107
|
-
if (d) {
|
|
108
|
-
const E = o.options[+d];
|
|
109
|
-
E && Y(E) && (n.value = +d, k());
|
|
110
|
-
}
|
|
1
|
+
function y(t, r) {
|
|
2
|
+
return t > r ? 1 : -1;
|
|
3
|
+
}
|
|
4
|
+
function c(t, r) {
|
|
5
|
+
var n = 5381;
|
|
6
|
+
if (typeof t == "object" && t !== null && (t.toString === Object.prototype.toString || t.toString === Array.prototype.toString)) {
|
|
7
|
+
r || (r = /* @__PURE__ */ new WeakSet());
|
|
8
|
+
for (var p = Object.keys(t).sort(y), i = 0; i < p.length; i++) {
|
|
9
|
+
var s = p[i], e = t[s];
|
|
10
|
+
if (n = 33 * n ^ c(s, r), typeof e == "object" && e !== null && (t.toString === Object.prototype.toString || t.toString === Array.prototype.toString)) {
|
|
11
|
+
if (r.has(e)) continue;
|
|
12
|
+
r.add(e);
|
|
111
13
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
(e, l) => {
|
|
122
|
-
H(e.map((t) => t.valueHash)) !== H(l.map((t) => t.valueHash)) && (p.value.calculateRange(), z(), S());
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
flush: "post"
|
|
126
|
-
}
|
|
127
|
-
), V({
|
|
128
|
-
focusNext: M,
|
|
129
|
-
focusPrevious: A,
|
|
130
|
-
focusFirst: P,
|
|
131
|
-
focusFirstSelected: q,
|
|
132
|
-
focusLast: R,
|
|
133
|
-
focusLastSelected: J,
|
|
134
|
-
blur: S,
|
|
135
|
-
confirmOption: k,
|
|
136
|
-
focusByHash: W,
|
|
137
|
-
getHighlighted: G
|
|
138
|
-
}), (e, l) => (r(), c("div", {
|
|
139
|
-
class: $(["bb-listbox", {
|
|
140
|
-
"bb-listbox--open": e.open,
|
|
141
|
-
"bb-listbox--loading": e.loading,
|
|
142
|
-
"bb-listbox--no-data": !i.value.length
|
|
143
|
-
}]),
|
|
144
|
-
style: b({
|
|
145
|
-
"--transition-duration": `${e.transitionDuration}ms`,
|
|
146
|
-
"--overlay-min-height": `${w.value}px`
|
|
147
|
-
}),
|
|
148
|
-
onClick: Q(j, ["stop"])
|
|
149
|
-
}, [
|
|
150
|
-
x("div", te, [
|
|
151
|
-
x("div", {
|
|
152
|
-
ref_key: "inner",
|
|
153
|
-
ref: s,
|
|
154
|
-
class: "bb-listbox__inner-container"
|
|
155
|
-
}, [
|
|
156
|
-
v(e.$slots, "options:prepend"),
|
|
157
|
-
e.loading && !e.options.length ? (r(), c("div", oe, [
|
|
158
|
-
v(e.$slots, "loading", {}, () => [
|
|
159
|
-
D(g(e.loadingText), 1)
|
|
160
|
-
])
|
|
161
|
-
])) : e.options.length ? (r(), c("div", {
|
|
162
|
-
key: 2,
|
|
163
|
-
role: "listbox",
|
|
164
|
-
style: b({
|
|
165
|
-
height: `${F.value}px`
|
|
166
|
-
}),
|
|
167
|
-
tabindex: "-1"
|
|
168
|
-
}, [
|
|
169
|
-
(r(!0), c(U, null, X(O.value, (t, d) => (r(), c("div", {
|
|
170
|
-
key: i.value[t.index].value,
|
|
171
|
-
ref_for: !0,
|
|
172
|
-
ref: L,
|
|
173
|
-
"aria-selected": n.value === d ? !0 : void 0,
|
|
174
|
-
class: $({
|
|
175
|
-
"bb-listbox__option autocomplete-option": !0,
|
|
176
|
-
"autocomplete-option--focused": n.value === t.index,
|
|
177
|
-
"autocomplete-option--selected": i.value[t.index].selected,
|
|
178
|
-
"autocomplete-option--disabled": i.value[t.index].disabled
|
|
179
|
-
}),
|
|
180
|
-
"data-index": t.index,
|
|
181
|
-
role: "option",
|
|
182
|
-
style: b({
|
|
183
|
-
transform: `translateY(${t.start}px)`
|
|
184
|
-
})
|
|
185
|
-
}, [
|
|
186
|
-
x("span", ie, [
|
|
187
|
-
v(e.$slots, "option", {
|
|
188
|
-
disabled: !!i.value[t.index].disabled,
|
|
189
|
-
focused: n.value === t.index,
|
|
190
|
-
index: t.index,
|
|
191
|
-
item: i.value[t.index].item,
|
|
192
|
-
selected: !!i.value[t.index].selected,
|
|
193
|
-
text: i.value[t.index].text,
|
|
194
|
-
value: i.value[t.index].value
|
|
195
|
-
}, () => [
|
|
196
|
-
x("span", se, g(i.value[t.index].text), 1)
|
|
197
|
-
])
|
|
198
|
-
])
|
|
199
|
-
], 14, le))), 128))
|
|
200
|
-
], 4)) : (r(), c("div", ne, [
|
|
201
|
-
v(e.$slots, "no-data", {}, () => [
|
|
202
|
-
D(g(e.noDataText), 1)
|
|
203
|
-
])
|
|
204
|
-
])),
|
|
205
|
-
v(e.$slots, "options:append")
|
|
206
|
-
], 512)
|
|
207
|
-
])
|
|
208
|
-
], 6));
|
|
14
|
+
n = 33 * n ^ c(e, r);
|
|
15
|
+
}
|
|
16
|
+
return 33 * n ^ c(t.constructor, r);
|
|
17
|
+
}
|
|
18
|
+
var o = typeof t;
|
|
19
|
+
try {
|
|
20
|
+
t instanceof Date ? o += t.getTime() : o += String(t);
|
|
21
|
+
} catch {
|
|
22
|
+
o += String(Object.assign({}, t));
|
|
209
23
|
}
|
|
210
|
-
|
|
24
|
+
for (var a = 0; a < o.length; a++) n = 33 * n ^ o.charCodeAt(a);
|
|
25
|
+
return n;
|
|
26
|
+
}
|
|
211
27
|
export {
|
|
212
|
-
|
|
28
|
+
c as hash,
|
|
29
|
+
y as sortNumbers
|
|
213
30
|
};
|
|
214
31
|
//# sourceMappingURL=index270.js.map
|
package/dist/index270.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index270.js","sources":["../src/components/ListBox.vue"],"sourcesContent":["<template>\n\t<div\n\t\tclass=\"bb-listbox\"\n\t\t:class=\"{\n\t\t\t'bb-listbox--open': open,\n\t\t\t'bb-listbox--loading': loading,\n\t\t\t'bb-listbox--no-data': !mappedOptions.length,\n\t\t}\"\n\t\t:style=\"{\n\t\t\t'--transition-duration': `${transitionDuration}ms`,\n\t\t\t'--overlay-min-height': `${height}px`,\n\t\t}\"\n\t\t@click.stop=\"handleClick\"\n\t>\n\t\t<div class=\"bb-listbox__outer-container\">\n\t\t\t<div ref=\"inner\" class=\"bb-listbox__inner-container\">\n\t\t\t\t<slot name=\"options:prepend\"></slot>\n\t\t\t\t<div v-if=\"loading && !options.length\" class=\"bb-listbox__loading\">\n\t\t\t\t\t<slot :name=\"'loading'\">{{ loadingText }}</slot>\n\t\t\t\t</div>\n\t\t\t\t<div v-else-if=\"!options.length\" class=\"bb-listbox__no-data\">\n\t\t\t\t\t<slot :name=\"'no-data'\">{{ noDataText }}</slot>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tv-else\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\t:style=\"{\n\t\t\t\t\t\theight: `${totalSize}px`,\n\t\t\t\t\t}\"\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-for=\"(row, index) in virtualRows\"\n\t\t\t\t\t\t:key=\"mappedOptions[row.index].value\"\n\t\t\t\t\t\t:ref=\"measureElement\"\n\t\t\t\t\t\t:aria-selected=\"focusedIndex === index ? true : undefined\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-listbox__option autocomplete-option': true,\n\t\t\t\t\t\t\t'autocomplete-option--focused': focusedIndex === row.index,\n\t\t\t\t\t\t\t'autocomplete-option--selected':\n\t\t\t\t\t\t\t\tmappedOptions[row.index].selected,\n\t\t\t\t\t\t\t'autocomplete-option--disabled':\n\t\t\t\t\t\t\t\tmappedOptions[row.index].disabled,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:data-index=\"row.index\"\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\t:style=\"{\n\t\t\t\t\t\t\ttransform: `translateY(${row.start}px)`,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"autocomplete-option__content\">\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:disabled=\"!!mappedOptions[row.index].disabled\"\n\t\t\t\t\t\t\t\t:focused=\"focusedIndex === row.index\"\n\t\t\t\t\t\t\t\t:index=\"row.index\"\n\t\t\t\t\t\t\t\t:item=\"mappedOptions[row.index].item\"\n\t\t\t\t\t\t\t\tname=\"option\"\n\t\t\t\t\t\t\t\t:selected=\"!!mappedOptions[row.index].selected\"\n\t\t\t\t\t\t\t\t:text=\"mappedOptions[row.index].text\"\n\t\t\t\t\t\t\t\t:value=\"mappedOptions[row.index].value\"\n\t\t\t\t\t\t\t\t><span class=\"autocomplete-option__label\">{{\n\t\t\t\t\t\t\t\t\tmappedOptions[row.index].text\n\t\t\t\t\t\t\t\t}}</span></slot\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<slot name=\"options:append\"></slot>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { isNil } from '@/utilities/functions/isNil';\nimport { computed, ref, watch } from 'vue';\nimport { useVirtualizer } from '@tanstack/vue-virtual';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport type { Option } from '@/types/Option';\nimport { hash } from '@/utilities/functions/hash';\n\ntype Props = {\n\toptions: Option[];\n\topen?: boolean;\n\tloading?: boolean;\n\ttransitionDuration?: number;\n\tloadingText?: string;\n\tnoDataText?: string;\n};\n\nconst props = withDefaults(defineProps<Props>(), {\n\ttransitionDuration: 250,\n\tloadingText: 'Caricamento...',\n\tnoDataText: 'Nessun elemento da visualizzare',\n});\n\nconst emit = defineEmits<{\n\t(e: 'option:selected', option: Option): void;\n\t(e: 'option:unselected', option: Option): void;\n}>();\n\nconst inner = ref<HTMLElement | null>(null);\n\nconst makeStringID = (arg: any) =>\n\t'option_' + JSON.stringify(arg).replace(/\\W/g, '_');\n\nconst mappedOptions = computed(() =>\n\tprops.options.map((o) => {\n\t\treturn { ...o, id: makeStringID(o.value) };\n\t})\n);\n\nconst rowVirtualizer = useVirtualizer({\n\tget count() {\n\t\treturn props.options.length;\n\t},\n\tgetScrollElement: () => inner.value,\n\testimateSize: () => 42,\n\toverscan: 5,\n});\n\nconst measureElement = (el: HTMLElement) => {\n\tif (!el) {\n\t\treturn;\n\t}\n\trowVirtualizer.value.measureElement(el);\n\treturn undefined;\n};\n\nconst virtualRows = computed(() => rowVirtualizer.value.getVirtualItems());\nconst totalSize = computed(() => rowVirtualizer.value.getTotalSize());\n\n/**\n * START FOCUS HANDLING\n */\n\nconst focusedIndex = ref<null | number>(null);\n\nconst canFocus = computed(\n\t() => props.open && props.options.some((o) => !o.disabled)\n);\n\nconst findNextAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? -1 : focusedIndex.value!;\n\tlet newIndex = (initialValue + offset) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findNextAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\n\nconst focusNext = () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findNextAvailableIndex();\n\tfocusedIndex.value = newIndex;\n\tscrollSelectedIntoView();\n};\nconst findPreviousAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? 0 : focusedIndex.value!;\n\tlet newIndex =\n\t\t(initialValue - offset + props.options.length) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findPreviousAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\nconst focusPrevious = async () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findPreviousAvailableIndex();\n\tfocusedIndex.value = newIndex;\n\tscrollSelectedIntoView();\n};\n\nconst focusFirst = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (props.options[newIndex].disabled) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n\tscrollSelectedIntoView();\n};\n\nconst focusLast = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].disabled && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n\tscrollSelectedIntoView();\n};\nconst focusFirstSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (\n\t\tprops.options[newIndex] &&\n\t\t!props.options[newIndex].selected &&\n\t\tprops.options.length !== newIndex\n\t) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex % props.options.length;\n\tscrollSelectedIntoView();\n};\nconst focusLastSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].selected && newIndex > 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex === -1 ? props.options.length - 1 : newIndex;\n\tscrollSelectedIntoView();\n};\n\nconst focusByHash = (hash: Option['valueHash']) => {\n\tif (!canFocus.value) return;\n\tconst linkedOptionIndex = props.options.findIndex(\n\t\t(o) => o.valueHash === hash\n\t);\n\tif (linkedOptionIndex >= 0) {\n\t\tfocusedIndex.value = linkedOptionIndex;\n\t}\n\tscrollSelectedIntoView();\n};\n\nconst blur = () => {\n\tfocusedIndex.value = null;\n};\n\nconst scrollSelectedIntoView = () => {\n\tif (inner.value && isNotNil(focusedIndex.value)) {\n\t\trowVirtualizer.value.scrollToIndex(focusedIndex.value, {\n\t\t\talign: 'center',\n\t\t\tbehavior: 'smooth',\n\t\t});\n\t}\n};\n\n/**\n * END FOCUS HANDLING\n */\n\nconst confirmOption = () => {\n\tif (isNil(focusedIndex.value) || !props.open) return;\n\tconst option = props.options[focusedIndex.value!];\n\tif (option.selected) {\n\t\temit('option:unselected', option);\n\t} else {\n\t\temit('option:selected', option);\n\t}\n};\n\nconst height = ref(0);\nconst getScrollHeight = () => {\n\tif (inner.value) {\n\t\theight.value = inner.value.scrollHeight;\n\t}\n};\n\nconst canBeSelected = (option: Option) => {\n\treturn !option.disabled;\n};\n\nconst handleClick = (event: MouseEvent) => {\n\tevent.preventDefault();\n\tif (inner.value && event.target && event.target instanceof HTMLElement) {\n\t\tconst listbox = inner.value.querySelector<HTMLElement>('[role=\"listbox\"]');\n\t\tif (!listbox) {\n\t\t\tthrow new Error('Could not find listbox in DOM tree.');\n\t\t}\n\t\tlet node: HTMLElement = event.target;\n\t\tlet index = node.dataset['index'];\n\t\twhile (isNil(index) && node.parentElement) {\n\t\t\tnode = node.parentElement;\n\t\t\tindex = node.dataset['index'];\n\t\t}\n\t\tif (index) {\n\t\t\tconst option = props.options[+index];\n\t\t\tif (option && canBeSelected(option)) {\n\t\t\t\tfocusedIndex.value = +index;\n\t\t\t\tconfirmOption();\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst getHighlighted = () => {\n\tif (isNil(focusedIndex.value)) return;\n\tconst option = props.options[focusedIndex.value!];\n\treturn option;\n};\n\nwatch(\n\t() => props.open,\n\t() => {\n\t\tgetScrollHeight();\n\t},\n\t{ flush: 'post' }\n);\n\nwatch(\n\t() => props.options,\n\t(value, previous) => {\n\t\tif (\n\t\t\thash(value.map((o) => o.valueHash)) !==\n\t\t\thash(previous.map((o) => o.valueHash))\n\t\t) {\n\t\t\trowVirtualizer.value.calculateRange();\n\t\t\tgetScrollHeight();\n\t\t\tblur();\n\t\t}\n\t},\n\t{\n\t\tflush: 'post',\n\t}\n);\n\ndefineExpose({\n\tfocusNext,\n\tfocusPrevious,\n\tfocusFirst,\n\tfocusFirstSelected,\n\tfocusLast,\n\tfocusLastSelected,\n\tblur,\n\tconfirmOption,\n\tfocusByHash,\n\tgetHighlighted,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/ListBox';\n</style>\n"],"names":["props","__props","emit","__emit","inner","ref","makeStringID","arg","mappedOptions","computed","o","rowVirtualizer","useVirtualizer","measureElement","el","virtualRows","totalSize","focusedIndex","canFocus","findNextAvailableIndex","offset","initialValue","isNil","newIndex","focusNext","scrollSelectedIntoView","findPreviousAvailableIndex","focusPrevious","focusFirst","focusLast","focusFirstSelected","focusLastSelected","focusByHash","hash","linkedOptionIndex","blur","isNotNil","confirmOption","option","height","getScrollHeight","canBeSelected","handleClick","event","node","index","getHighlighted","watch","value","previous","__expose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0FA,UAAMA,IAAQC,GAMRC,IAAOC,GAKPC,IAAQC,EAAwB,IAAI,GAEpCC,IAAe,CAACC,MACrB,YAAY,KAAK,UAAUA,CAAG,EAAE,QAAQ,OAAO,GAAG,GAE7CC,IAAgBC;AAAA,MAAS,MAC9BT,EAAM,QAAQ,IAAI,CAACU,OACX,EAAE,GAAGA,GAAG,IAAIJ,EAAaI,EAAE,KAAK,IACvC;AAAA,IAAA,GAGIC,IAAiBC,EAAe;AAAA,MACrC,IAAI,QAAQ;AACX,eAAOZ,EAAM,QAAQ;AAAA,MACtB;AAAA,MACA,kBAAkB,MAAMI,EAAM;AAAA,MAC9B,cAAc,MAAM;AAAA,MACpB,UAAU;AAAA,IAAA,CACV,GAEKS,IAAiB,CAACC,MAAoB;AAC3C,MAAKA,KAGUH,EAAA,MAAM,eAAeG,CAAE;AAAA,IAC/B,GAGFC,IAAcN,EAAS,MAAME,EAAe,MAAM,iBAAiB,GACnEK,IAAYP,EAAS,MAAME,EAAe,MAAM,cAAc,GAM9DM,IAAeZ,EAAmB,IAAI,GAEtCa,IAAWT;AAAA,MAChB,MAAMT,EAAM,QAAQA,EAAM,QAAQ,KAAK,CAACU,MAAM,CAACA,EAAE,QAAQ;AAAA,IAAA,GAGpDS,IAAyB,CAACC,IAAS,MAAM;AAC9C,YAAMC,IAAeC,EAAML,EAAa,KAAK,IAAI,KAAKA,EAAa;AACnE,UAAIM,KAAYF,IAAeD,KAAUpB,EAAM,QAAQ;AACvD,aAAOA,EAAM,QAAQuB,CAAQ,EAAE,YAAYA,MAAaF;AAC5C,QAAAE,IAAAJ,EAAuBC,IAAS,CAAC;AAEtC,aAAAG;AAAA,IAAA,GAGFC,IAAY,MAAM;AACnB,UAAA,CAACN,EAAS,MAAO;AACrB,YAAMK,IAAWJ;AACjB,MAAAF,EAAa,QAAQ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,QAAQ,CAAC6C,CAAK;AAC/B,UAAAP,KAAUG,EAAcH,CAAM,MACjCrB,EAAa,QAAQ,CAAC4B,GACRR;QAEhB;AAAA,MACD;AAAA,IAAA,GAGKS,IAAiB,MAClBxB,EAAML,EAAa,KAAK,IAAG,SAChBjB,EAAM,QAAQiB,EAAa,KAAM;AAIjD,WAAA8B;AAAA,MACC,MAAM/C,EAAM;AAAA,MACZ,MAAM;AACW,QAAAwC;MACjB;AAAA,MACA,EAAE,OAAO,OAAO;AAAA,IAAA,GAGjBO;AAAA,MACC,MAAM/C,EAAM;AAAA,MACZ,CAACgD,GAAOC,MAAa;AACpB,QACChB,EAAKe,EAAM,IAAI,CAACtC,MAAMA,EAAE,SAAS,CAAC,MAClCuB,EAAKgB,EAAS,IAAI,CAACvC,MAAMA,EAAE,SAAS,CAAC,MAErCC,EAAe,MAAM,kBACL6B,KACXL;MAEP;AAAA,MACA;AAAA,QACC,OAAO;AAAA,MACR;AAAA,IAAA,GAGYe,EAAA;AAAA,MACZ,WAAA1B;AAAA,MACA,eAAAG;AAAA,MACA,YAAAC;AAAA,MACA,oBAAAE;AAAA,MACA,WAAAD;AAAA,MACA,mBAAAE;AAAA,MACA,MAAAI;AAAA,MACA,eAAAE;AAAA,MACA,aAAAL;AAAA,MACA,gBAAAc;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index270.js","sources":["../node_modules/object-code/dist/index.mjs"],"sourcesContent":["function t(t,r){return t>r?1:-1}function r(o,e){var n=5381;if(\"object\"==typeof o&&null!==o&&(o.toString===Object.prototype.toString||o.toString===Array.prototype.toString)){e||(e=new WeakSet);for(var i=Object.keys(o).sort(t),a=0;a<i.length;a++){var c=i[a],g=o[c];if(n=33*n^r(c,e),\"object\"==typeof g&&null!==g&&(o.toString===Object.prototype.toString||o.toString===Array.prototype.toString)){if(e.has(g))continue;e.add(g)}n=33*n^r(g,e)}return 33*n^r(o.constructor,e)}var p=typeof o;try{o instanceof Date?p+=o.getTime():p+=String(o)}catch(t){p+=String(Object.assign({},o))}for(var f=0;f<p.length;f++)n=33*n^p.charCodeAt(f);return n}export{r as hash,t as sortNumbers};\n//# sourceMappingURL=index.mjs.map\n"],"names":["t","r","o","e","i","a","c","g","p","f"],"mappings":"AAAA,SAASA,EAAE,GAAE,GAAE;AAAC,SAAO,IAAE,IAAE,IAAE;AAAE;AAAC,SAASC,EAAEC,GAAEC,GAAE;AAAC,MAAI,IAAE;AAAK,MAAa,OAAOD,KAAjB,YAA2BA,MAAP,SAAWA,EAAE,aAAW,OAAO,UAAU,YAAUA,EAAE,aAAW,MAAM,UAAU,WAAU;AAAC,IAAAC,MAAIA,IAAE,oBAAI;AAAS,aAAQC,IAAE,OAAO,KAAKF,CAAC,EAAE,KAAKF,CAAC,GAAEK,IAAE,GAAEA,IAAED,EAAE,QAAOC,KAAI;AAAC,UAAIC,IAAEF,EAAEC,CAAC,GAAEE,IAAEL,EAAEI,CAAC;AAAE,UAAG,IAAE,KAAG,IAAEL,EAAEK,GAAEH,CAAC,GAAY,OAAOI,KAAjB,YAA2BA,MAAP,SAAWL,EAAE,aAAW,OAAO,UAAU,YAAUA,EAAE,aAAW,MAAM,UAAU,WAAU;AAAC,YAAGC,EAAE,IAAII,CAAC,EAAE;AAAS,QAAAJ,EAAE,IAAII,CAAC;AAAA,MAAC;AAAC,UAAE,KAAG,IAAEN,EAAEM,GAAEJ,CAAC;AAAA,IAAC;AAAC,WAAO,KAAG,IAAEF,EAAEC,EAAE,aAAYC,CAAC;AAAA,EAAC;AAAC,MAAIK,IAAE,OAAON;AAAE,MAAG;AAAC,IAAAA,aAAa,OAAKM,KAAGN,EAAE,QAAS,IAACM,KAAG,OAAON,CAAC;AAAA,EAAC,QAAS;AAAC,IAAAM,KAAG,OAAO,OAAO,OAAO,CAAE,GAACN,CAAC,CAAC;AAAA,EAAC;AA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