bitboss-ui 2.1.96 → 2.1.98

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.
Files changed (187) hide show
  1. package/README.md +138 -11
  2. package/dist/index108.js +9 -9
  3. package/dist/index11.js +18 -18
  4. package/dist/index115.js +1 -1
  5. package/dist/index121.js +6 -7
  6. package/dist/index123.js +13 -13
  7. package/dist/index131.js +1 -1
  8. package/dist/index133.js +4 -4
  9. package/dist/index135.js +1 -1
  10. package/dist/index137.js +2 -2
  11. package/dist/index14.js +1 -1
  12. package/dist/index140.js +1 -1
  13. package/dist/index144.js +1 -1
  14. package/dist/index145.js +2 -2
  15. package/dist/index16.js +4 -4
  16. package/dist/index18.js +3 -3
  17. package/dist/index20.js +8 -8
  18. package/dist/index217.js +2 -2
  19. package/dist/index218.js +2 -2
  20. package/dist/index219.js +5 -5
  21. package/dist/index22.js +14 -14
  22. package/dist/index220.js +5 -8
  23. package/dist/index221.js +5 -5
  24. package/dist/index222.js +5 -5
  25. package/dist/index223.js +3 -5
  26. package/dist/index224.js +2 -5
  27. package/dist/index225.js +6 -3
  28. package/dist/index226.js +8 -2
  29. package/dist/index227.js +268 -6
  30. package/dist/index228.js +50 -6
  31. package/dist/index229.js +44 -260
  32. package/dist/index230.js +25 -45
  33. package/dist/index231.js +48 -40
  34. package/dist/index232.js +12 -31
  35. package/dist/index233.js +5 -60
  36. package/dist/index234.js +5 -13
  37. package/dist/index235.js +5 -4
  38. package/dist/index236.js +2 -20
  39. package/dist/index237.js +3 -201
  40. package/dist/index238.js +22 -0
  41. package/dist/index239.js +6 -6
  42. package/dist/index24.js +10 -10
  43. package/dist/index241.js +86 -33
  44. package/dist/index243.js +31 -0
  45. package/dist/index244.js +17 -2
  46. package/dist/index245.js +51 -2
  47. package/dist/index246.js +12 -48
  48. package/dist/index247.js +11 -16
  49. package/dist/index248.js +16 -106
  50. package/dist/index249.js +4 -0
  51. package/dist/index250.js +2 -100
  52. package/dist/index251.js +5 -0
  53. package/dist/index252.js +5 -3
  54. package/dist/index253.js +8 -5
  55. package/dist/index254.js +33 -5
  56. package/dist/index255.js +28 -5
  57. package/dist/index257.js +2 -34
  58. package/dist/index258.js +188 -86
  59. package/dist/index259.js +5 -0
  60. package/dist/index26.js +3 -3
  61. package/dist/index260.js +11 -27
  62. package/dist/index261.js +4 -15
  63. package/dist/index262.js +22 -11
  64. package/dist/index263.js +12 -15
  65. package/dist/index264.js +8 -187
  66. package/dist/index265.js +7 -3
  67. package/dist/index266.js +3 -9
  68. package/dist/index267.js +33 -17
  69. package/dist/index268.js +4 -12
  70. package/dist/index269.js +201 -4
  71. package/dist/index271.js +8 -12
  72. package/dist/index272.js +23 -11
  73. package/dist/index273.js +33 -5
  74. package/dist/index274.js +11 -2
  75. package/dist/index275.js +10 -3
  76. package/dist/index276.js +3 -4
  77. package/dist/index277.js +105 -22
  78. package/dist/index279.js +100 -23
  79. package/dist/index28.js +1 -1
  80. package/dist/index281.js +17 -6
  81. package/dist/index282.js +12 -7
  82. package/dist/index283.js +4 -33
  83. package/dist/index284.js +103 -12
  84. package/dist/index285.js +3 -67
  85. package/dist/index286.js +67 -10
  86. package/dist/index287.js +6 -3
  87. package/dist/index288.js +16 -6
  88. package/dist/index289.js +2 -16
  89. package/dist/index290.js +7 -9
  90. package/dist/index291.js +6 -20
  91. package/dist/index292.js +11 -0
  92. package/dist/index293.js +53 -3
  93. package/dist/index294.js +21 -3
  94. package/dist/index295.js +5 -3
  95. package/dist/index296.js +2 -2
  96. package/dist/index297.js +3 -3
  97. package/dist/index298.js +17 -3
  98. package/dist/index299.js +28 -7
  99. package/dist/index30.js +3 -3
  100. package/dist/index301.js +3 -280
  101. package/dist/index302.js +280 -2
  102. package/dist/index303.js +2 -16
  103. package/dist/index304.js +16 -2
  104. package/dist/index305.js +2 -16
  105. package/dist/index306.js +16 -2
  106. package/dist/index307.js +2 -27
  107. package/dist/index308.js +27 -2
  108. package/dist/index309.js +2 -2
  109. package/dist/index310.js +1 -1
  110. package/dist/index311.js +1 -1
  111. package/dist/index312.js +1 -1
  112. package/dist/index313.js +2 -28
  113. package/dist/index314.js +1 -1
  114. package/dist/index315.js +1 -1
  115. package/dist/index316.js +125 -3
  116. package/dist/index317.js +2 -17
  117. package/dist/index318.js +15 -2
  118. package/dist/index319.js +2 -3
  119. package/dist/index32.js +2 -2
  120. package/dist/index320.js +16 -122
  121. package/dist/index321.js +2 -2
  122. package/dist/index322.js +2 -15
  123. package/dist/index323.js +5 -2
  124. package/dist/index324.js +3 -19
  125. package/dist/index325.js +2 -2
  126. package/dist/index326.js +3 -4
  127. package/dist/index327.js +3 -2
  128. package/dist/index328.js +5 -2
  129. package/dist/index329.js +719 -5
  130. package/dist/index330.js +366 -5
  131. package/dist/index331.js +57 -719
  132. package/dist/index332.js +2 -366
  133. package/dist/index333.js +4 -57
  134. package/dist/index334.js +3 -7
  135. package/dist/index335.js +5 -5
  136. package/dist/index336.js +7 -8
  137. package/dist/index337.js +5 -35
  138. package/dist/index338.js +35 -6
  139. package/dist/index339.js +6 -129
  140. package/dist/index34.js +8 -8
  141. package/dist/index340.js +113 -382
  142. package/dist/index341.js +396 -56
  143. package/dist/index342.js +33 -33
  144. package/dist/index343.js +58 -6
  145. package/dist/index344.js +6 -3
  146. package/dist/index345.js +19 -5
  147. package/dist/index346.js +8 -6
  148. package/dist/index347.js +13 -17
  149. package/dist/index348.js +7 -8
  150. package/dist/index349.js +5 -14
  151. package/dist/index350.js +8 -7
  152. package/dist/index351.js +89 -130
  153. package/dist/index354.js +226 -191
  154. package/dist/index355.js +133 -257
  155. package/dist/index356.js +191 -91
  156. package/dist/index357.js +256 -226
  157. package/dist/index358.js +1 -1
  158. package/dist/index359.js +1 -1
  159. package/dist/index36.js +4 -4
  160. package/dist/index363.js +1 -1
  161. package/dist/index38.js +19 -19
  162. package/dist/index40.js +7 -7
  163. package/dist/index42.js +2 -2
  164. package/dist/index44.js +8 -8
  165. package/dist/index46.js +6 -6
  166. package/dist/index50.js +2 -2
  167. package/dist/index54.js +1 -1
  168. package/dist/index56.js +1 -1
  169. package/dist/index58.js +2 -2
  170. package/dist/index62.js +5 -5
  171. package/dist/index68.js +1 -1
  172. package/dist/index81.js +5 -5
  173. package/dist/index83.js +1 -1
  174. package/dist/index85.js +2 -2
  175. package/dist/index87.js +3 -3
  176. package/dist/index89.js +1 -1
  177. package/dist/index92.js +3 -3
  178. package/dist/index94.js +2 -2
  179. package/dist/index96.js +4 -4
  180. package/dist/index98.js +1 -1
  181. package/package.json +13 -2
  182. package/dist/index242.js +0 -30
  183. package/dist/index256.js +0 -4
  184. package/dist/index270.js +0 -106
  185. package/dist/index278.js +0 -11
  186. package/dist/index280.js +0 -4
  187. package/dist/index300.js +0 -55
package/dist/index356.js CHANGED
@@ -1,95 +1,195 @@
1
- import { commonjsGlobal as y } from "./index343.js";
2
- var p, _;
3
- function Z() {
4
- if (_) return p;
5
- _ = 1;
6
- var x = "Expected a function", I = NaN, W = "[object Symbol]", C = /^\s+|\s+$/g, M = /^[-+]0x[0-9a-f]+$/i, N = /^0b[01]+$/i, R = /^0o[0-7]+$/i, $ = parseInt, q = typeof y == "object" && y && y.Object === Object && y, A = typeof self == "object" && self && self.Object === Object && self, B = q || A || Function("return this")(), F = Object.prototype, G = F.toString, P = Math.max, D = Math.min, h = function() {
7
- return B.Date.now();
8
- };
9
- function H(e, r, n) {
10
- var f, a, g, c, i, u, s = 0, S = !1, d = !1, j = !0;
11
- if (typeof e != "function")
12
- throw new TypeError(x);
13
- r = O(r) || 0, m(n) && (S = !!n.leading, d = "maxWait" in n, g = d ? P(O(n.maxWait) || 0, r) : g, j = "trailing" in n ? !!n.trailing : j);
14
- function v(t) {
15
- var o = f, l = a;
16
- return f = a = void 0, s = t, c = e.apply(l, o), c;
17
- }
18
- function J(t) {
19
- return s = t, i = setTimeout(b, r), S ? v(t) : c;
20
- }
21
- function K(t) {
22
- var o = t - u, l = t - s, L = r - o;
23
- return d ? D(L, g - l) : L;
24
- }
25
- function E(t) {
26
- var o = t - u, l = t - s;
27
- return u === void 0 || o >= r || o < 0 || d && l >= g;
28
- }
29
- function b() {
30
- var t = h();
31
- if (E(t))
32
- return k(t);
33
- i = setTimeout(b, K(t));
34
- }
35
- function k(t) {
36
- return i = void 0, j && f ? v(t) : (f = a = void 0, c);
37
- }
38
- function Q() {
39
- i !== void 0 && clearTimeout(i), s = 0, f = u = a = i = void 0;
40
- }
41
- function V() {
42
- return i === void 0 ? c : k(h());
43
- }
44
- function T() {
45
- var t = h(), o = E(t);
46
- if (f = arguments, a = this, u = t, o) {
47
- if (i === void 0)
48
- return J(u);
49
- if (d)
50
- return i = setTimeout(b, r), v(u);
51
- }
52
- return i === void 0 && (i = setTimeout(b, r)), c;
53
- }
54
- return T.cancel = Q, T.flush = V, T;
55
- }
56
- function U(e, r, n) {
57
- var f = !0, a = !0;
58
- if (typeof e != "function")
59
- throw new TypeError(x);
60
- return m(n) && (f = "leading" in n ? !!n.leading : f, a = "trailing" in n ? !!n.trailing : a), H(e, r, {
61
- leading: f,
62
- maxWait: r,
63
- trailing: a
1
+ import { defineComponent as K, useTemplateRef as $, computed as a, watch as v, ref as Q, createElementBlock as s, openBlock as i, withModifiers as U, normalizeStyle as b, normalizeClass as L, createElementVNode as p, renderSlot as r, createTextVNode as z, toDisplayString as f, unref as D, Fragment as W, renderList as X } from "vue";
2
+ import { isNil as E } from "./index257.js";
3
+ import { isNotNil as Z } from "./index146.js";
4
+ import { useVirtualizer as w } from "./index362.js";
5
+ import { hash as N } from "./index223.js";
6
+ import { useLocale as ee } from "./index232.js";
7
+ import { useListboxFocus as te } from "./index363.js";
8
+ import { indexBy as oe } from "./index294.js";
9
+ const le = { class: "bb-listbox__outer-container scrollbar-border" }, ne = {
10
+ ref: "inner",
11
+ class: "bb-listbox__inner-container",
12
+ tabindex: "-1"
13
+ }, ae = {
14
+ key: 0,
15
+ class: "bb-listbox__loading"
16
+ }, se = {
17
+ key: 1,
18
+ class: "bb-listbox__no-data"
19
+ }, ie = ["aria-selected", "data-index"], ue = { class: "autocomplete-option__label" }, xe = /* @__PURE__ */ K({
20
+ __name: "FlatListBox",
21
+ props: {
22
+ compact: { type: Boolean },
23
+ options: {},
24
+ open: { type: Boolean },
25
+ loading: { type: Boolean },
26
+ multiple: { type: Boolean },
27
+ transitionDuration: { default: 250 },
28
+ loadingText: {},
29
+ noDataText: {},
30
+ optionHeight: {}
31
+ },
32
+ emits: ["option:selected", "option:unselected"],
33
+ setup(F, { expose: M, emit: R }) {
34
+ const n = F, x = R, { t: h } = ee(), u = $("inner"), V = $("listbox"), g = a(() => n.optionHeight ? n.optionHeight : n.compact ? 32 : 40), c = w({
35
+ get count() {
36
+ return n.options.length;
37
+ },
38
+ getScrollElement: () => u.value ?? null,
39
+ estimateSize: () => g.value,
40
+ overscan: 5
41
+ }), y = a(() => c.value.getVirtualItems()), C = a(() => c.value.getTotalSize());
42
+ console.log(y.value);
43
+ const _ = a(
44
+ () => n.options.map((e, l) => ({
45
+ index: l,
46
+ text: e.text,
47
+ value: e.value,
48
+ valueHash: e.valueHash,
49
+ item: e.item,
50
+ selected: !!e.selected,
51
+ disabled: !!e.disabled,
52
+ focused: l === d.value
53
+ }))
54
+ ), o = a(() => oe(_.value, "index")), m = a(() => _.value.length > 0), {
55
+ focusedIndex: d,
56
+ focusNext: I,
57
+ focusPrevious: O,
58
+ focusFirst: P,
59
+ focusLast: Y,
60
+ focusFirstSelected: j,
61
+ focusLastSelected: q,
62
+ focusByHash: A,
63
+ blur: H,
64
+ getHighlighted: G
65
+ } = te(() => n.options, { disabled: () => !n.open });
66
+ v(d, (e) => {
67
+ u.value && Z(e) && c.value.scrollToIndex(e, {
68
+ align: "center",
69
+ behavior: "smooth"
70
+ });
64
71
  });
72
+ const k = () => {
73
+ if (E(d.value) || !n.open) return;
74
+ const e = o.value[d.value];
75
+ e.disabled || (e.selected ? x("option:unselected", e) : x("option:selected", e));
76
+ }, B = Q(0), T = () => {
77
+ u.value && (B.value = u.value.scrollHeight);
78
+ }, J = (e) => {
79
+ if (e.preventDefault(), u.value && e.target instanceof HTMLElement && V.value) {
80
+ let l = e.target, t = l.dataset.index;
81
+ for (; E(t) && l.parentElement; )
82
+ l = l.parentElement, t = l.dataset.index;
83
+ if (t) {
84
+ const S = o.value[+t];
85
+ S && !S.disabled && (d.value = +t, k());
86
+ }
87
+ }
88
+ };
89
+ return v(
90
+ () => n.open,
91
+ () => {
92
+ T();
93
+ },
94
+ { flush: "post" }
95
+ ), v(
96
+ () => n.options,
97
+ (e, l) => {
98
+ N(e.map((t) => t.valueHash)) !== N(l.map((t) => t.valueHash)) && (c.value.calculateRange(), T(), H());
99
+ },
100
+ { flush: "post" }
101
+ ), M({
102
+ focusNext: I,
103
+ focusPrevious: O,
104
+ focusFirst: P,
105
+ focusFirstSelected: j,
106
+ focusLast: Y,
107
+ focusLastSelected: q,
108
+ blur: H,
109
+ confirmOption: k,
110
+ focusByHash: A,
111
+ getHighlighted: G
112
+ }), (e, l) => (i(), s("span", {
113
+ class: L(["bb-listbox", {
114
+ "bb-listbox--compact": e.compact,
115
+ "bb-listbox--loading": e.loading,
116
+ "bb-listbox--multiple": e.multiple,
117
+ "bb-listbox--no-data": !m.value,
118
+ "bb-listbox--open": e.open
119
+ }]),
120
+ style: b({
121
+ "--transition-duration": `${e.transitionDuration}ms`,
122
+ "--overlay-min-height": `${B.value}px`,
123
+ "--option-height": `${g.value}px`
124
+ }),
125
+ onClick: U(J, ["stop"])
126
+ }, [
127
+ p("span", le, [
128
+ p("span", ne, [
129
+ r(e.$slots, "options:prepend"),
130
+ e.loading && !m.value ? (i(), s("span", ae, [
131
+ r(e.$slots, "loading", {}, () => [
132
+ z(f(e.loadingText || D(h)("common.loadingText").value), 1)
133
+ ])
134
+ ])) : m.value ? (i(), s("span", {
135
+ key: 2,
136
+ role: "listbox",
137
+ ref: "listbox",
138
+ style: b({
139
+ height: `${C.value}px`
140
+ }),
141
+ tabindex: "-1"
142
+ }, [
143
+ (i(!0), s(W, null, X(y.value, (t) => (i(), s("span", {
144
+ key: o.value[t.index].valueHash,
145
+ "aria-selected": o.value[t.index].focused ? !0 : void 0,
146
+ class: L({
147
+ "bb-listbox__option autocomplete-option": !0,
148
+ "autocomplete-option--focused": o.value[t.index].focused,
149
+ "autocomplete-option--selected": o.value[t.index].selected,
150
+ "autocomplete-option--disabled": o.value[t.index].disabled
151
+ }),
152
+ "data-index": t.index,
153
+ role: "option",
154
+ style: b({
155
+ transform: `translateY(${t.start}px)`
156
+ })
157
+ }, [
158
+ r(e.$slots, "option", {
159
+ disabled: o.value[t.index].disabled,
160
+ focused: o.value[t.index].focused,
161
+ index: t.index,
162
+ item: o.value[t.index].item,
163
+ selected: o.value[t.index].selected,
164
+ text: o.value[t.index].text,
165
+ value: o.value[t.index].value
166
+ }, () => [
167
+ l[0] || (l[0] = p("svg", {
168
+ class: "autocomplete-option__checkbox",
169
+ role: "presentation",
170
+ viewBox: "276.411 158.834 114.971 114.97"
171
+ }, [
172
+ p("path", {
173
+ d: "M 297.574 224.786 L 318.309 243.134 L 371.568 189.232",
174
+ fill: "none",
175
+ "stroke-linecap": "round",
176
+ "stroke-width": "14px"
177
+ })
178
+ ], -1)),
179
+ p("span", ue, f(o.value[t.index].text), 1)
180
+ ])
181
+ ], 14, ie))), 128))
182
+ ], 4)) : (i(), s("span", se, [
183
+ r(e.$slots, "no-data", {}, () => [
184
+ z(f(e.noDataText || D(h)("common.noDataText").value), 1)
185
+ ])
186
+ ])),
187
+ r(e.$slots, "options:append")
188
+ ], 512)
189
+ ])
190
+ ], 6));
65
191
  }
66
- function m(e) {
67
- var r = typeof e;
68
- return !!e && (r == "object" || r == "function");
69
- }
70
- function X(e) {
71
- return !!e && typeof e == "object";
72
- }
73
- function z(e) {
74
- return typeof e == "symbol" || X(e) && G.call(e) == W;
75
- }
76
- function O(e) {
77
- if (typeof e == "number")
78
- return e;
79
- if (z(e))
80
- return I;
81
- if (m(e)) {
82
- var r = typeof e.valueOf == "function" ? e.valueOf() : e;
83
- e = m(r) ? r + "" : r;
84
- }
85
- if (typeof e != "string")
86
- return e === 0 ? e : +e;
87
- e = e.replace(C, "");
88
- var n = N.test(e);
89
- return n || R.test(e) ? $(e.slice(2), n ? 2 : 8) : M.test(e) ? I : +e;
90
- }
91
- return p = U, p;
92
- }
192
+ });
93
193
  export {
94
- Z as __require
194
+ xe as default
95
195
  };