bitboss-ui 2.1.130 → 2.1.132

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 (185) hide show
  1. package/dist/ai/BbTable.md +58 -93
  2. package/dist/components/BbTable/types.d.ts +6 -4
  3. package/dist/index.css +1 -1
  4. package/dist/index109.js +9 -9
  5. package/dist/index110.js +18 -18
  6. package/dist/index118.js +1 -1
  7. package/dist/index124.js +3 -3
  8. package/dist/index126.js +314 -324
  9. package/dist/index134.js +1 -1
  10. package/dist/index136.js +4 -4
  11. package/dist/index138.js +1 -1
  12. package/dist/index14.js +1 -1
  13. package/dist/index142.js +2 -2
  14. package/dist/index146.js +1 -1
  15. package/dist/index150.js +1 -1
  16. package/dist/index151.js +2 -2
  17. package/dist/index16.js +3 -3
  18. package/dist/index18.js +3 -3
  19. package/dist/index20.js +9 -9
  20. package/dist/index22.js +14 -14
  21. package/dist/index225.js +2 -2
  22. package/dist/index226.js +2 -2
  23. package/dist/index227.js +3 -4
  24. package/dist/index228.js +13 -8
  25. package/dist/index229.js +19 -32
  26. package/dist/index230.js +5 -28
  27. package/dist/index231.js +7 -0
  28. package/dist/index232.js +5 -2
  29. package/dist/index233.js +5 -2
  30. package/dist/index234.js +3 -2
  31. package/dist/index235.js +2 -13
  32. package/dist/index236.js +6 -86
  33. package/dist/index238.js +268 -30
  34. package/dist/index239.js +52 -18
  35. package/dist/index24.js +10 -10
  36. package/dist/index240.js +52 -17
  37. package/dist/index241.js +31 -50
  38. package/dist/index242.js +60 -18
  39. package/dist/index243.js +5 -3
  40. package/dist/index244.js +8 -12
  41. package/dist/index245.js +10 -5
  42. package/dist/index246.js +3 -5
  43. package/dist/index247.js +4 -5
  44. package/dist/index248.js +3 -5
  45. package/dist/index249.js +373 -5
  46. package/dist/index251.js +160 -3
  47. package/dist/index253.js +7 -160
  48. package/dist/index254.js +4 -0
  49. package/dist/index255.js +5 -5
  50. package/dist/index256.js +5 -2
  51. package/dist/index257.js +5 -6
  52. package/dist/index258.js +3 -268
  53. package/dist/index259.js +6 -52
  54. package/dist/index26.js +3 -3
  55. package/dist/index260.js +15 -51
  56. package/dist/index261.js +2 -32
  57. package/dist/index262.js +11 -60
  58. package/dist/index263.js +86 -4
  59. package/dist/index265.js +32 -0
  60. package/dist/index266.js +17 -4
  61. package/dist/index267.js +50 -6
  62. package/dist/index268.js +18 -2
  63. package/dist/index269.js +11 -12
  64. package/dist/index270.js +17 -12
  65. package/dist/index271.js +9 -9
  66. package/dist/index272.js +2 -23
  67. package/dist/index273.js +2 -23
  68. package/dist/index274.js +34 -3
  69. package/dist/index275.js +32 -10
  70. package/dist/index276.js +26 -32
  71. package/dist/index278.js +4 -25
  72. package/dist/index279.js +25 -4
  73. package/dist/index28.js +1 -1
  74. package/dist/index280.js +105 -19
  75. package/dist/index282.js +100 -44
  76. package/dist/index284.js +8 -17
  77. package/dist/index285.js +44 -12
  78. package/dist/index286.js +51 -104
  79. package/dist/index287.js +15 -0
  80. package/dist/index288.js +13 -100
  81. package/dist/index289.js +25 -0
  82. package/dist/index290.js +17 -106
  83. package/dist/index291.js +12 -9
  84. package/dist/index292.js +107 -6
  85. package/dist/index293.js +6 -16
  86. package/dist/index294.js +21 -5
  87. package/dist/index296.js +1 -1
  88. package/dist/index297.js +8 -20
  89. package/dist/index298.js +23 -6
  90. package/dist/index299.js +3 -67
  91. package/dist/index30.js +3 -3
  92. package/dist/index300.js +2 -3
  93. package/dist/index301.js +6 -9
  94. package/dist/index302.js +7 -3
  95. package/dist/index303.js +3 -2
  96. package/dist/index304.js +5 -7
  97. package/dist/index305.js +67 -7
  98. package/dist/index306.js +7 -3
  99. package/dist/index307.js +280 -17
  100. package/dist/index308.js +2 -28
  101. package/dist/index309.js +16 -5
  102. package/dist/index310.js +2 -7
  103. package/dist/index311.js +16 -2
  104. package/dist/index312.js +2 -4
  105. package/dist/index313.js +29 -0
  106. package/dist/index314.js +2 -7
  107. package/dist/index315.js +2 -3
  108. package/dist/index316.js +2 -3
  109. package/dist/index317.js +2 -3
  110. package/dist/index318.js +2 -280
  111. package/dist/index319.js +28 -2
  112. package/dist/index32.js +2 -2
  113. package/dist/index320.js +2 -16
  114. package/dist/index321.js +3 -2
  115. package/dist/index322.js +17 -16
  116. package/dist/index323.js +3 -2
  117. package/dist/index324.js +3 -27
  118. package/dist/index325.js +2 -2
  119. package/dist/index326.js +4 -2
  120. package/dist/index328.js +7 -2
  121. package/dist/index329.js +3 -2
  122. package/dist/index330.js +125 -2
  123. package/dist/index331.js +2 -125
  124. package/dist/index332.js +15 -2
  125. package/dist/index333.js +2 -15
  126. package/dist/index334.js +19 -2
  127. package/dist/index335.js +2 -19
  128. package/dist/index336.js +719 -2
  129. package/dist/index337.js +366 -3
  130. package/dist/index338.js +57 -3
  131. package/dist/index339.js +3 -2
  132. package/dist/index34.js +8 -8
  133. package/dist/index340.js +3 -4
  134. package/dist/index341.js +2 -719
  135. package/dist/index342.js +5 -366
  136. package/dist/index343.js +5 -56
  137. package/dist/index344.js +2 -6
  138. package/dist/index345.js +5 -2
  139. package/dist/index348.js +3 -92
  140. package/dist/index349.js +5 -5
  141. package/dist/index352.js +1 -1
  142. package/dist/index353.js +1 -1
  143. package/dist/index354.js +7 -5
  144. package/dist/index355.js +34 -6
  145. package/dist/index356.js +126 -31
  146. package/dist/index357.js +383 -114
  147. package/dist/index358.js +198 -397
  148. package/dist/index359.js +208 -149
  149. package/dist/index36.js +4 -4
  150. package/dist/index360.js +18 -255
  151. package/dist/index362.js +95 -0
  152. package/dist/index364.js +1 -1
  153. package/dist/index365.js +1 -1
  154. package/dist/index366.js +1 -1
  155. package/dist/index370.js +1 -1
  156. package/dist/index38.js +21 -21
  157. package/dist/index40.js +7 -7
  158. package/dist/index42.js +2 -2
  159. package/dist/index44.js +8 -8
  160. package/dist/index46.js +6 -6
  161. package/dist/index54.js +1 -1
  162. package/dist/index56.js +1 -1
  163. package/dist/index58.js +2 -2
  164. package/dist/index60.js +2 -2
  165. package/dist/index62.js +5 -5
  166. package/dist/index68.js +1 -1
  167. package/dist/index74.js +4 -4
  168. package/dist/index82.js +6 -6
  169. package/dist/index84.js +1 -1
  170. package/dist/index86.js +2 -2
  171. package/dist/index88.js +3 -3
  172. package/dist/index90.js +1 -1
  173. package/dist/index93.js +3 -3
  174. package/dist/index95.js +2 -2
  175. package/dist/index97.js +5 -5
  176. package/dist/index99.js +1 -1
  177. package/package.json +2 -2
  178. package/dist/index250.js +0 -7
  179. package/dist/index264.js +0 -375
  180. package/dist/index277.js +0 -5
  181. package/dist/index281.js +0 -11
  182. package/dist/index283.js +0 -55
  183. package/dist/index327.js +0 -4
  184. package/dist/index361.js +0 -24
  185. /package/dist/{index252.js → index237.js} +0 -0
package/dist/index126.js CHANGED
@@ -1,30 +1,30 @@
1
- import { defineComponent as Et, mergeModels as Ge, ref as R, computed as i, reactive as Je, onMounted as Wt, nextTick as Qe, onBeforeUnmount as St, watch as te, toRef as ge, useModel as Xe, createBlock as Ye, openBlock as o, resolveDynamicComponent as Ht, normalizeStyle as N, unref as T, normalizeClass as g, withCtx as Rt, createElementBlock as r, createCommentVNode as w, createElementVNode as c, toDisplayString as x, Fragment as I, renderList as W, renderSlot as _, createVNode as Ze, createTextVNode as Nt, mergeProps as Mt } from "vue";
2
- import { clamp as Ft } from "./index226.js";
3
- import { hash as le } from "./index243.js";
4
- import { isNil as M } from "./index268.js";
5
- import { when as Lt } from "./index266.js";
1
+ import { defineComponent as Vt, mergeModels as Ue, ref as R, computed as c, reactive as Ge, onMounted as Bt, nextTick as Je, onBeforeUnmount as St, watch as te, toRef as ge, useModel as Qe, createBlock as Xe, openBlock as o, resolveDynamicComponent as Et, normalizeStyle as N, unref as T, normalizeClass as g, withCtx as Ht, createElementBlock as r, createCommentVNode as w, createElementVNode as d, toDisplayString as C, Fragment as I, renderList as E, renderSlot as _, createVNode as Ye, createTextVNode as Rt, mergeProps as Nt } from "vue";
2
+ import { clamp as Lt } from "./index225.js";
3
+ import { hash as le } from "./index234.js";
4
+ import { isNil as L } from "./index254.js";
5
+ import { when as Mt } from "./index278.js";
6
6
  import { useId as Ot } from "./index8.js";
7
- import { useItemValue as Dt } from "./index281.js";
8
- import { useItemsGetter as Pt } from "./index238.js";
9
- import { usePrefill as zt } from "./index239.js";
10
- import { useIndexById as et } from "./index240.js";
11
- import { useBaseOptions as qt } from "./index241.js";
12
- import { useHashedWatcher as jt } from "./index244.js";
13
- import { useTableWidthContext as Kt } from "./index282.js";
14
- import { useLocale as Ut } from "./index235.js";
15
- import tt from "./index18.js";
7
+ import { useItemValue as Wt } from "./index284.js";
8
+ import { useItemsGetter as Dt } from "./index265.js";
9
+ import { usePrefill as Ft } from "./index270.js";
10
+ import { useIndexById as Ze } from "./index266.js";
11
+ import { useBaseOptions as Pt } from "./index267.js";
12
+ import { useHashedWatcher as zt } from "./index269.js";
13
+ import { useTableWidthContext as qt } from "./index285.js";
14
+ import { useLocale as jt } from "./index228.js";
15
+ import et from "./index18.js";
16
16
  /* empty css */
17
- import Gt from "./index32.js";
17
+ import Kt from "./index32.js";
18
18
  /* empty css */
19
- import { columnKeyToSlotName as Jt, mergeHeaderClasses as Qt, applyFixedTableColumns as Xt, mergeCellClasses as Yt } from "./index283.js";
20
- import { useLogger as Zt } from "./index252.js";
21
- const el = {
19
+ import { columnKeyToSlotName as Ut, mergeHeaderClasses as Gt, applyFixedTableColumns as Jt, mergeCellClasses as Qt } from "./index286.js";
20
+ import { useLogger as Xt } from "./index237.js";
21
+ const Yt = {
22
22
  key: 0,
23
23
  class: "sr-only"
24
- }, tl = ["aria-rowindex"], ll = { class: "bb-table-header__content" }, al = { class: "bb-table-check__label-text sr-only" }, sl = {
24
+ }, Zt = ["aria-rowindex"], el = { class: "bb-table-header__content" }, tl = { class: "bb-table-check__label-text sr-only" }, ll = {
25
25
  key: 1,
26
26
  class: "bb-table-radio__label-text sr-only"
27
- }, nl = ["aria-sort"], ol = { class: "bb-table-header__content" }, rl = { class: "bb-table-header__content sr-only" }, dl = ["aria-rowindex"], il = {
27
+ }, al = ["aria-sort"], sl = { class: "bb-table-header__content" }, nl = { class: "bb-table-header__content sr-only" }, ol = ["aria-rowindex"], rl = {
28
28
  key: 0,
29
29
  class: "bb-table-skeleton__cell bb-table-skeleton__cell--select"
30
30
  }, cl = {
@@ -33,27 +33,27 @@ const el = {
33
33
  }, ul = {
34
34
  key: 1,
35
35
  class: "bb-table-skeleton__avatar"
36
- }, bl = {
36
+ }, dl = {
37
37
  key: 2,
38
38
  class: "bb-table-skeleton__avatar-text"
39
- }, pl = { class: "bb-table-skeleton__cell-content" }, hl = {
39
+ }, il = { class: "bb-table-skeleton__cell-content" }, bl = {
40
40
  key: 3,
41
41
  class: "bb-table-skeleton__image"
42
- }, fl = {
42
+ }, pl = {
43
43
  key: 4,
44
44
  class: "bb-table-skeleton__badge"
45
- }, vl = {
45
+ }, fl = {
46
46
  key: 1,
47
47
  class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions"
48
- }, ml = ["aria-rowindex"], yl = ["colspan"], kl = { class: "bb-table-loading__text sr-only" }, gl = ["aria-rowindex"], _l = ["colspan"], wl = { class: "bb-table-no-data__text" }, xl = ["aria-rowindex", "onClick", "onContextmenu", "onDblclick"], Cl = { class: "bb-table-check__label-text sr-only" }, Tl = { class: "bb-table-radio__label-text sr-only" }, $l = ["aria-rowindex", "id"], Il = ["colspan"], Gl = /* @__PURE__ */ Et({
48
+ }, hl = ["aria-rowindex"], vl = ["colspan"], ml = { class: "bb-table-loading__text sr-only" }, yl = ["aria-rowindex"], kl = ["colspan"], gl = { class: "bb-table-no-data__text" }, _l = ["aria-rowindex", "onClick", "onContextmenu", "onDblclick"], wl = { class: "bb-table-check__label-text sr-only" }, Cl = { class: "bb-table-radio__label-text sr-only" }, xl = ["aria-rowindex", "id"], Tl = ["colspan"], Kl = /* @__PURE__ */ Vt({
49
49
  __name: "BbTable",
50
- props: /* @__PURE__ */ Ge({
50
+ props: /* @__PURE__ */ Ue({
51
51
  accessibleLabel: {},
52
52
  actions: { type: Boolean },
53
53
  actionsText: { default: "Azioni" },
54
54
  align: { default: "left" },
55
55
  id: {},
56
- inheritColumnWidths: { type: [Boolean, String], default: !0 },
56
+ inheritColumnWidths: { type: [Boolean, String] },
57
57
  allowSelectAll: { type: Boolean, default: !0 },
58
58
  caption: {},
59
59
  compact: { type: Boolean },
@@ -95,175 +95,168 @@ const el = {
95
95
  },
96
96
  expandedItemsModifiers: {}
97
97
  }),
98
- emits: /* @__PURE__ */ Ge(["click:row", "contextmenu:row", "dblclick:row", "update:modelValue", "update:selectAll", "update:expandedItems", "update:unselectedItems", "item:selected", "item:unselected"], ["update:selectAll", "update:expandedItems"]),
99
- setup(ae, { emit: lt }) {
100
- const { getItemValue: at } = Dt(), _e = Ot().id.value, a = ae, k = lt;
101
- a.multiple && !Array.isArray(a.modelValue) && Zt().throw(
98
+ emits: /* @__PURE__ */ Ue(["click:row", "contextmenu:row", "dblclick:row", "update:modelValue", "update:selectAll", "update:expandedItems", "update:unselectedItems", "item:selected", "item:unselected"], ["update:selectAll", "update:expandedItems"]),
99
+ setup(ae, { emit: tt }) {
100
+ const { getItemValue: lt } = Wt(), _e = Ot().id.value, a = ae, m = tt;
101
+ a.multiple && !Array.isArray(a.modelValue) && Xt().throw(
102
102
  "BbTable is set for multiple selection but modelValue is not an array."
103
103
  );
104
- const { t: F } = Ut(), A = R(), L = R(), {
105
- id: st,
106
- parentId: O,
104
+ const { t: M } = jt(), A = R(), O = R(), {
105
+ id: at,
106
+ parentId: W,
107
107
  parentNode: U,
108
- cssVars: nt,
108
+ cssVars: st,
109
109
  parentVar: we,
110
- setTracks: ot
111
- } = Kt({
110
+ setTracks: nt
111
+ } = qt({
112
112
  id: () => a.id,
113
- container: () => L.value,
113
+ container: () => O.value,
114
114
  inheritFrom: () => typeof a.inheritColumnWidths == "string" ? a.inheritColumnWidths : void 0
115
- }), D = i(() => a.inheritColumnWidths !== !1), G = i(
116
- () => a.fixed || a.columns.some((e) => e.width != null) || D.value && !!O.value
117
- ), J = i(
118
- () => D.value && !!O.value
119
- ), rt = J, xe = (e) => {
115
+ }), Ce = c(() => a.columns.some((e) => e.snap != null)), D = c(
116
+ () => !!a.inheritColumnWidths || Ce.value
117
+ ), G = c(
118
+ () => a.fixed || Ce.value || a.columns.some((e) => e.width != null) || D.value && !!W.value
119
+ ), J = c(
120
+ () => D.value && !!W.value
121
+ ), ot = J, rt = (e) => {
120
122
  if (typeof e == "number") return `${e}px`;
121
123
  const l = e.trim();
122
124
  return /^-?\d*\.?\d+$/.test(l) ? `${l}px` : l;
123
- }, dt = (e, l) => {
124
- const t = xe(e);
125
- if (/^-?\d*\.?\d+px$/.test(t)) return parseFloat(t);
126
- const s = document.createElement("div");
127
- s.style.position = "absolute", s.style.visibility = "hidden", s.style.pointerEvents = "none", s.style.width = t, l.appendChild(s);
128
- const n = s.getBoundingClientRect().width;
129
- return l.removeChild(s), Number.isFinite(n) && n > 0 ? n : null;
130
- }, Ce = i(() => {
125
+ }, xe = c(() => {
131
126
  const e = U.value?.tracks;
132
127
  return e ? Object.keys(e).filter((l) => /^\d+$/.test(l)).length : 0;
133
- }), Te = i(() => {
128
+ }), Te = c(() => {
134
129
  const e = U.value?.tracks ?? {}, l = [];
135
130
  "select" in e && l.push("select");
136
- for (let t = 0; t < Ce.value; t++) l.push(String(t));
131
+ for (let t = 0; t < xe.value; t++) l.push(String(t));
137
132
  return "actions" in e && l.push("actions"), l;
138
- }), $e = i(
133
+ }), $e = c(
139
134
  () => "select" in (U.value?.tracks ?? {}) ? 1 : 0
140
- ), Ie = i(
141
- () => $e.value + Ce.value
142
- ), it = i(() => Te.value.length), ct = (e) => {
135
+ ), Ie = c(
136
+ () => $e.value + xe.value
137
+ ), ct = c(() => Te.value.length), ut = (e) => {
143
138
  const l = Te.value[e];
144
139
  return l ? we(l, "0px") : "0px";
145
140
  }, se = (e, l) => {
146
- if (!O.value || l - e <= 1e-6) return null;
141
+ if (!W.value || l - e <= 1e-6) return null;
147
142
  const t = [];
148
143
  for (let s = Math.floor(e); s < Math.ceil(l - 1e-6); s++) {
149
144
  const n = Math.min(l, s + 1) - Math.max(e, s);
150
145
  if (n <= 1e-6) continue;
151
- const d = ct(s);
146
+ const u = ut(s);
152
147
  t.push(
153
- n >= 1 - 1e-6 ? d : `${Number(n.toFixed(4))} * ${d}`
148
+ n >= 1 - 1e-6 ? u : `${Number(n.toFixed(4))} * ${u}`
154
149
  );
155
150
  }
156
151
  return t.length ? t.length === 1 && !t[0].includes("*") ? t[0] : `calc(${t.join(" + ")})` : null;
157
- }, Q = i(() => {
152
+ }, Q = c(() => {
158
153
  const e = a.columns, l = e.map(
159
154
  (s) => typeof s.snap == "number" ? s.snap : Array.isArray(s.snap) ? s.snap[0] : null
160
155
  );
161
156
  let t = $e.value;
162
157
  return e.map((s, n) => {
163
- const d = l[n] ?? t;
164
- let p;
158
+ const u = l[n] ?? t;
159
+ let f;
165
160
  if (Array.isArray(s.snap))
166
- p = s.snap[1] === -1 ? Ie.value : s.snap[1];
161
+ f = s.snap[1] === -1 ? Ie.value : s.snap[1];
167
162
  else {
168
- const m = l[n + 1];
169
- p = m != null && m > d ? m : Math.floor(d) + 1;
163
+ const y = l[n + 1];
164
+ f = y != null && y > u ? y : Math.floor(u) + 1;
170
165
  }
171
- return t = p, { start: d, end: p };
166
+ return t = f, { start: u, end: f };
172
167
  });
173
- }), Ae = (e) => J.value && e.start >= Ie.value, ne = i(
168
+ }), Ae = (e) => J.value && e.start >= Ie.value, ne = c(
174
169
  () => Q.value.some(Ae)
175
- ), X = (e) => a.columns[e]?.width == null && !J.value, Y = i(() => {
170
+ ), X = (e) => a.columns[e]?.width == null && !J.value, Y = c(() => {
176
171
  if (!J.value) return -1;
177
172
  for (let e = a.columns.length - 1; e >= 0; e--) {
178
173
  const l = a.columns[e];
179
174
  if (l.width == null && l.snap == null) return e;
180
175
  }
181
176
  return -1;
182
- }), oe = i(() => {
177
+ }), oe = c(() => {
183
178
  const e = Q.value[0];
184
- if (!D.value || !O.value || !e) return null;
185
- const l = se(0, e.start), t = a.selectable ? C.select : null;
179
+ if (!D.value || !W.value || !e) return null;
180
+ const l = se(0, e.start), t = a.selectable ? x.select : null;
186
181
  return t ? `calc(${l ?? "0px"} - ${t})` : l;
187
- }), re = i(() => {
182
+ }), re = c(() => {
188
183
  const e = Q.value, l = e[e.length - 1];
189
- if (!D.value || !O.value || !l || ne.value || Y.value === a.columns.length - 1) return null;
190
- const t = se(l.end, it.value), s = a.actions ? C.actions : null;
184
+ if (!D.value || !W.value || !l || ne.value || Y.value === a.columns.length - 1) return null;
185
+ const t = se(l.end, ct.value), s = a.actions ? x.actions : null;
191
186
  return s ? `calc(${t ?? "0px"} - ${s})` : t;
192
- }), ut = i(() => oe.value !== null), bt = i(() => re.value !== null), C = Je({ select: null, actions: null }), de = i(() => {
193
- const e = (n) => D.value ? we(n) : "auto", l = (n) => G.value && C[n] ? C[n] : e(n), t = [];
194
- a.selectable && t.push({ key: "select", width: l("select"), locked: !1 });
187
+ }), dt = c(() => oe.value !== null), it = c(() => re.value !== null), x = Ge({ select: null, actions: null }), ce = c(() => {
188
+ const e = (n) => D.value ? we(n) : "auto", l = (n) => G.value && x[n] ? x[n] : e(n), t = [];
189
+ a.selectable && t.push({ key: "select", width: l("select") });
195
190
  const s = a.columns.length - 1;
196
- return a.columns.forEach((n, d) => {
197
- const p = String(d), m = n.width != null ? xe(n.width) : null, v = Q.value[d];
198
- if (d === Y.value && !ne.value) {
199
- t.push({ key: p, width: "auto", locked: !1 });
191
+ return a.columns.forEach((n, u) => {
192
+ const f = String(u), y = n.width != null ? rt(n.width) : null, h = Q.value[u];
193
+ if (u === Y.value && !ne.value) {
194
+ t.push({ key: f, width: "auto" });
200
195
  return;
201
196
  }
202
- let h;
203
- m != null ? h = m : X(d) ? h = G.value && Be.value[d] || null : Ae(v) ? h = Ee.value[d] ?? null : h = se(v.start, v.end);
197
+ let b;
198
+ y != null ? b = y : X(u) ? b = G.value && Be.value[u] || null : Ae(h) ? b = Se.value[u] ?? null : b = se(h.start, h.end);
204
199
  const $ = [];
205
- d === 0 && ut.value && $.push("var(--bb-table-offset-internal-start)"), d === s && bt.value && $.push("var(--bb-table-offset-internal-end)");
206
- const f = $.length ? `calc(${[...$, h ?? "0px"].join(" + ")})` : h ?? "auto";
207
- t.push({ key: p, width: f, locked: m != null });
208
- }), a.actions && t.push({ key: "actions", width: l("actions"), locked: !1 }), t;
209
- }), pt = i(() => {
200
+ u === 0 && dt.value && $.push("var(--bb-table-offset-internal-start)"), u === s && it.value && $.push("var(--bb-table-offset-internal-end)");
201
+ const k = $.length ? `calc(${[...$, b ?? "0px"].join(" + ")})` : b ?? "auto";
202
+ t.push({ key: f, width: k });
203
+ }), a.actions && t.push({ key: "actions", width: l("actions") }), t;
204
+ }), bt = c(() => {
210
205
  const e = {};
211
206
  return oe.value && (e["--bb-table-offset-start"] = oe.value), re.value && (e["--bb-table-offset-end"] = re.value), e;
212
- }), ht = i(() => {
207
+ }), pt = c(() => {
213
208
  const e = {
214
- ...nt.value,
215
- ...pt.value
209
+ ...st.value,
210
+ ...bt.value
216
211
  };
217
- return ce.value && (e["--bb-table-natural-width"] = ce.value), P.value > 0 && (e["--bb-table-fill"] = `${P.value}px`), e;
218
- }), ie = () => Array.from(
212
+ return de.value && (e["--bb-table-natural-width"] = de.value), F.value > 0 && (e["--bb-table-fill"] = `${F.value}px`), e;
213
+ }), ue = () => Array.from(
219
214
  A.value?.querySelectorAll(
220
215
  ":scope > thead > tr.bb-table-header-row > th"
221
216
  ) ?? []
222
217
  ), ft = () => {
223
- const e = de.value.map((t) => t.key), l = {};
224
- ie().forEach((t, s) => {
218
+ const e = ce.value.map((t) => t.key), l = {};
219
+ ue().forEach((t, s) => {
225
220
  const n = e[s];
226
221
  n != null && (l[n] = `${t.getBoundingClientRect().width}px`);
227
- }), ot(l);
228
- }, vt = () => {
222
+ }), nt(l);
223
+ }, ht = () => {
229
224
  const e = A.value;
230
225
  if (!e) return;
231
226
  const l = (t) => {
232
227
  let s = 0;
233
228
  return e.querySelectorAll(t).forEach((n) => {
234
- let d = 1 / 0, p = -1 / 0;
235
- n.querySelectorAll(":scope > *").forEach(($) => {
236
- const f = $.getBoundingClientRect();
237
- d = Math.min(d, f.left), p = Math.max(p, f.right);
229
+ let u = 0;
230
+ n.querySelectorAll(":scope > *").forEach((h) => {
231
+ const b = getComputedStyle(h);
232
+ if (b.position === "absolute" || b.position === "fixed")
233
+ return;
234
+ const $ = parseFloat(b.marginLeft) + parseFloat(b.marginRight);
235
+ u += h.getBoundingClientRect().width + ($ || 0);
238
236
  });
239
- const m = p > d ? p - d : 0, v = getComputedStyle(n), h = parseFloat(v.paddingLeft) + parseFloat(v.paddingRight);
240
- s = Math.max(s, m + h);
237
+ const f = getComputedStyle(n), y = parseFloat(f.paddingLeft) + parseFloat(f.paddingRight);
238
+ s = Math.max(s, u + y);
241
239
  }), s > 0 ? `${Math.ceil(s)}px` : null;
242
240
  };
243
- C.select = a.selectable ? l(
241
+ x.select = a.selectable ? l(
244
242
  ":scope > thead > tr > th.bb-table-header--select, :scope > tbody > tr > td.bb-table-data__cell--select"
245
- ) : null, C.actions = a.actions ? l(
243
+ ) : null, x.actions = a.actions ? l(
246
244
  ":scope > thead > tr > th.bb-table-header--actions, :scope > tbody > tr > td.bb-table__cell--actions"
247
245
  ) : null;
248
246
  }, Ve = () => {
249
- vt(), ft();
250
- }, Be = R([]), Ee = R([]), P = R(0), ce = R(null), mt = (e) => {
251
- const l = e.parentElement?.clientWidth ?? 0, t = e.clientWidth || e.getBoundingClientRect().width, s = e.offsetWidth, n = l || t || s;
252
- return Number.isFinite(n) && n > 0 ? n : 0;
253
- }, We = () => {
254
- const e = L.value;
255
- if (!e || !G.value || !a.columns.some((u) => u.width != null) && !ne.value && Y.value < 0)
247
+ ht(), ft();
248
+ }, Be = R([]), Se = R([]), F = R(0), de = R(null), Ee = () => {
249
+ const e = O.value;
250
+ if (!e || !G.value || !a.columns.some((i) => i.width != null) && !ne.value && Y.value < 0)
256
251
  return;
257
- const l = mt(e);
258
- if (l <= 0) return;
259
- const t = a.selectable ? 1 : 0, s = C.select ? parseFloat(C.select) : 0, n = C.actions ? parseFloat(C.actions) : 0, d = ie();
260
- let p = 0, m = 0;
261
- a.columns.forEach((u, y) => {
262
- const b = d[t + y]?.getBoundingClientRect().width ?? 0, Ue = (u.width != null ? dt(u.width, e) : null) ?? b;
263
- u.width != null && (p += Ue), X(y) || (m += Ue);
252
+ const l = e.offsetWidth, t = a.selectable ? 1 : 0, s = x.select ? parseFloat(x.select) : 0, n = x.actions ? parseFloat(x.actions) : 0, u = ue();
253
+ let f = 0, y = 0;
254
+ a.columns.forEach((i, v) => {
255
+ const p = u[t + v]?.getBoundingClientRect().width ?? 0;
256
+ i.width != null && (f += p), X(v) || (y += p);
264
257
  });
265
- const v = document.createElement("div");
266
- v.style.cssText = [
258
+ const h = document.createElement("div");
259
+ h.style.cssText = [
267
260
  "position:absolute",
268
261
  "top:-9999px",
269
262
  "left:-9999px",
@@ -273,132 +266,132 @@ const el = {
273
266
  `height:${e.offsetHeight}px`,
274
267
  "overflow:visible"
275
268
  ].join(";");
276
- const h = e.cloneNode(!0);
277
- h.classList.remove("bb-table--fixed"), h.querySelectorAll(".bb-table-expand__row").forEach((u) => u.remove());
278
- const $ = Array.from(h.querySelectorAll("col"));
279
- a.columns.forEach((u, y) => {
280
- if (u.width == null) {
281
- const b = $[t + y];
282
- b && (b.style.width = "");
269
+ const b = e.cloneNode(!0);
270
+ b.classList.remove("bb-table--fixed"), b.querySelectorAll(".bb-table-expand__row").forEach((i) => i.remove());
271
+ const $ = Array.from(b.querySelectorAll("col"));
272
+ a.columns.forEach((i, v) => {
273
+ if (i.width == null) {
274
+ const p = $[t + v];
275
+ p && (p.style.width = "");
283
276
  }
284
277
  });
285
- const f = h.querySelector("table");
286
- f && (f.style.width = "min-content", f.style.minWidth = "0"), v.appendChild(h), document.body.appendChild(v);
287
- const ze = v.querySelector(
278
+ const k = b.querySelector("table");
279
+ k && (k.style.width = "min-content", k.style.minWidth = "0"), h.appendChild(b), document.body.appendChild(h);
280
+ const ze = h.querySelector(
288
281
  "table thead tr.bb-table-header-row"
289
- ), Vt = ze ? Array.from(ze.querySelectorAll(":scope > th")) : [], ee = a.columns.map((u, y) => {
290
- if (u.width != null) return 0;
291
- const b = Vt[t + y];
292
- return b ? b.getBoundingClientRect().width : 0;
282
+ ), It = ze ? Array.from(ze.querySelectorAll(":scope > th")) : [], ee = a.columns.map((i, v) => {
283
+ if (i.width != null) return 0;
284
+ const p = It[t + v];
285
+ return p ? p.getBoundingClientRect().width : 0;
293
286
  });
294
- document.body.removeChild(v);
287
+ document.body.removeChild(h);
295
288
  const qe = a.columns.reduce(
296
- (u, y, b) => u + (X(b) ? ee[b] : 0),
289
+ (i, v, p) => i + (X(p) ? ee[p] : 0),
297
290
  0
298
- ), je = l - m - s - n, ke = (u) => `${Number(u.toFixed(3))}px`;
299
- if (Be.value = a.columns.map((u, y) => {
300
- if (!X(y)) return null;
301
- const b = ee[y];
302
- if (qe <= 0) return ke(b);
303
- const H = je > 0 ? je * (b / qe) : 0;
304
- return ke(Math.max(b, H));
305
- }), Ee.value = ee.map((u) => u > 0 ? ke(u) : null), Y.value >= 0) {
306
- const u = Object.values(U.value?.tracks ?? {}).reduce(
307
- (b, H) => b + (parseFloat(H) || 0),
291
+ ), je = l - y - s - n, ke = (i) => `${Number(i.toFixed(3))}px`;
292
+ if (Be.value = a.columns.map((i, v) => {
293
+ if (!X(v)) return null;
294
+ const p = ee[v];
295
+ if (qe <= 0) return ke(p);
296
+ const K = je > 0 ? je * (p / qe) : 0;
297
+ return ke(Math.max(p, K));
298
+ }), Se.value = ee.map((i) => i > 0 ? ke(i) : null), Y.value >= 0) {
299
+ const i = Object.values(U.value?.tracks ?? {}).reduce(
300
+ (p, K) => p + (parseFloat(K) || 0),
308
301
  0
309
- ), y = d.reduce(
310
- (b, H) => b + H.getBoundingClientRect().width,
302
+ ), v = u.reduce(
303
+ (p, K) => p + K.getBoundingClientRect().width,
311
304
  0
312
305
  );
313
- P.value = Math.max(0, u - y + P.value);
306
+ F.value = Math.max(0, i - v + F.value);
314
307
  } else
315
- P.value = 0;
316
- const Bt = ee.reduce((u, y) => u + y, 0), Ke = p + Bt + s + n;
317
- ce.value = Ke > 0 ? `${Math.ceil(Ke)}px` : null;
308
+ F.value = 0;
309
+ const At = ee.reduce((i, v) => i + v, 0), Ke = f + At + s + n;
310
+ de.value = Ke > 0 ? `${Math.ceil(Ke)}px` : null;
318
311
  };
319
- let S = null, ue;
320
- const Se = () => {
321
- S !== null && clearTimeout(S), S = setTimeout(() => {
322
- S = null, We();
312
+ let H = null, ie;
313
+ const He = () => {
314
+ H !== null && clearTimeout(H), H = setTimeout(() => {
315
+ H = null, Ee();
323
316
  }, 200);
324
317
  };
325
- let z, be;
326
- const He = () => {
327
- z && (z.disconnect(), ie().forEach((e) => z?.observe(e)), Ve());
318
+ let P, be;
319
+ const Re = () => {
320
+ P && (P.disconnect(), ue().forEach((e) => P?.observe(e)), Ve());
328
321
  };
329
- Wt(() => {
330
- z = new ResizeObserver(() => Ve()), He(), Qe(We), A.value && (ue = new MutationObserver(Se), ue.observe(A.value, {
322
+ Bt(() => {
323
+ P = new ResizeObserver(() => Ve()), Re(), Je(Ee), A.value && (ie = new MutationObserver(He), ie.observe(A.value, {
331
324
  childList: !0,
332
325
  subtree: !0,
333
326
  characterData: !0
334
- })), L.value && (be = new ResizeObserver(Se), be.observe(L.value));
327
+ })), O.value && (be = new ResizeObserver(He), be.observe(O.value));
335
328
  }), St(() => {
336
- z?.disconnect(), be?.disconnect(), ue?.disconnect(), S !== null && clearTimeout(S);
337
- }), te(de, () => Qe(He), { flush: "post" });
338
- const yt = (e) => [F("table.select").value, ...e.map((l) => l.content)].join(" "), kt = i(() => a.selectable ? "fieldset" : "div"), pe = i(() => a.loading || _t.value), V = i(
339
- () => !M(a.page) && !M(a.perPage) && !M(a.totalItems)
340
- ), gt = i(() => ({
329
+ P?.disconnect(), be?.disconnect(), ie?.disconnect(), H !== null && clearTimeout(H);
330
+ }), te(ce, () => Je(Re), { flush: "post" });
331
+ const vt = (e) => [M("table.select").value, ...e.map((l) => l.content)].join(" "), mt = c(() => a.selectable ? "fieldset" : "div"), pe = c(() => a.loading || kt.value), V = c(
332
+ () => !L(a.page) && !L(a.perPage) && !L(a.totalItems)
333
+ ), yt = c(() => ({
341
334
  "bb-table": !0,
342
335
  [`bb-table--align-${a.align}`]: !0,
343
336
  "bb-table--compact": a.compact,
344
337
  "bb-table--fixed": G.value,
345
- "bb-table--inherit-widths": rt.value,
338
+ "bb-table--inherit-widths": ot.value,
346
339
  "bb-table--fixed-header": a.fixedHeaders,
347
340
  "bb-table--loading": pe.value,
348
- "bb-table--empty": !q.value.length,
341
+ "bb-table--empty": !z.value.length,
349
342
  "bb-table--selectable": !!a.selectable,
350
343
  "scrollbar-border": !0
351
- })), he = i(
344
+ })), fe = c(
352
345
  () => a.columns.length + +!!a.selectable + +!!a.actions
353
- ), Re = i(
346
+ ), Ne = c(
354
347
  () => Object.fromEntries(
355
- a.columns.map((e) => [e.key, Jt(e.key)])
348
+ a.columns.map((e) => [e.key, Ut(e.key)])
356
349
  )
357
350
  ), {
358
- getter: Ne,
359
- items: fe,
360
- loading: _t
361
- } = Pt({
351
+ getter: Le,
352
+ items: he,
353
+ loading: kt
354
+ } = Dt({
362
355
  items: ge(a, "items")
363
- }), { hasPrefilled: wt } = zt({
356
+ }), { hasPrefilled: gt } = Ft({
364
357
  trigger: !0,
365
358
  fn: async (e) => {
366
- await Ne(e, a.modelValue);
359
+ await Le(e, a.modelValue);
367
360
  }
368
- }), { data: Me } = et({
361
+ }), { data: Me } = Ze({
369
362
  items: ge(a, "modelValue")
370
- }), { options: q } = qt({
363
+ }), { options: z } = Pt({
371
364
  disabled: ge(a, "disabled"),
372
- items: fe,
365
+ items: he,
373
366
  itemText: void 0,
374
367
  itemValue: a.itemValue,
375
368
  max: a.max,
376
369
  selectable: !0,
377
370
  selectedIndexedByHash: Me
378
- }), xt = async (e) => {
379
- a.multiple ? k("update:modelValue", a.modelValue.concat(e.value)) : k("update:modelValue", e.value);
380
- }, Ct = async (e) => {
371
+ }), _t = async (e) => {
372
+ a.multiple ? m("update:modelValue", a.modelValue.concat(e.value)) : m("update:modelValue", e.value);
373
+ }, wt = async (e) => {
381
374
  if (a.multiple) {
382
375
  const l = { ...Me.value };
383
- delete l[e.valueHash], k("update:modelValue", Object.values(l));
376
+ delete l[e.valueHash], m("update:modelValue", Object.values(l));
384
377
  } else
385
- k("update:modelValue", null);
378
+ m("update:modelValue", null);
386
379
  };
387
- jt(
380
+ zt(
388
381
  () => [a.dependencies, a.items],
389
382
  async () => {
390
- wt.value && await Ne(!1, a.modelValue);
383
+ gt.value && await Le(!1, a.modelValue);
391
384
  },
392
385
  {
393
386
  debounce: a.depsDebounceTime
394
387
  }
395
388
  );
396
- const Tt = (e, l) => {
397
- const t = Re.value[e.key], s = e.align ?? "left";
398
- let n = at(l.item, e.key);
399
- return e.formatter && (!M(n) || e.formatOnNull !== !1) && (n = e.formatter(n, e.key, l.item)), e.placeholder && M(n) && (n = e.placeholder), {
389
+ const Ct = (e, l) => {
390
+ const t = Ne.value[e.key], s = e.align ?? "left";
391
+ let n = lt(l.item, e.key);
392
+ return e.formatter && (!L(n) || e.formatOnNull !== !1) && (n = e.formatter(n, e.key, l.item)), e.placeholder && L(n) && (n = e.placeholder), {
400
393
  align: s,
401
- classes: Yt(
394
+ classes: Qt(
402
395
  [`bb-table-data__cell--${s}`],
403
396
  a.tdClass,
404
397
  e.tdClass,
@@ -411,15 +404,15 @@ const el = {
411
404
  label: e.label,
412
405
  slotName: t
413
406
  };
414
- }, Fe = i(
407
+ }, Oe = c(
415
408
  () => a.columns.map((e) => {
416
- const l = e.align ?? "left", t = `header:${Re.value[e.key]}`, s = e.sorted ? e.sorted === "asc" ? "ascending" : "descending" : void 0;
409
+ const l = e.align ?? "left", t = `header:${Ne.value[e.key]}`, s = e.sorted ? e.sorted === "asc" ? "ascending" : "descending" : void 0;
417
410
  return {
418
411
  align: l,
419
412
  key: e.key,
420
413
  label: e.label,
421
414
  slotName: t,
422
- classes: Qt(
415
+ classes: Gt(
423
416
  [`bb-table-header--${l}`],
424
417
  a.thClass,
425
418
  e.thClass
@@ -427,98 +420,99 @@ const el = {
427
420
  sortDirection: s
428
421
  };
429
422
  })
430
- ), Le = i(() => {
423
+ ), We = c(() => {
431
424
  let e = 0;
432
- return q.value.map((l, t) => {
433
- const s = !a.selectable || typeof a.selectable == "function" && !a.selectable(l.item) || !!l.disabled, n = (a.page ?? -1) * (a.perPage ?? 0), d = 1, p = t + 1, m = n + d + p + e, v = a.columns.map(
434
- (f) => Tt(f, l)
435
- ), h = ve.value[l.valueHash] ?? !1;
436
- return h && e++, {
437
- accessibleLabel: yt(v),
438
- cols: v,
439
- expanded: h,
440
- onRowClick: (f) => k("click:row", f, l, !!l.selected),
441
- onRowContextMenu: (f) => k("contextmenu:row", f, l, !!l.selected),
442
- onRowDblClick: (f) => k("dblclick:row", f, l, !!l.selected),
425
+ return z.value.map((l, t) => {
426
+ const s = !a.selectable || typeof a.selectable == "function" && !a.selectable(l.item) || !!l.disabled, n = (a.page ?? -1) * (a.perPage ?? 0), u = 1, f = t + 1, y = n + u + f + e, h = a.columns.map(
427
+ (k) => Ct(k, l)
428
+ ), b = ve.value[l.valueHash] ?? !1;
429
+ return b && e++, {
430
+ accessibleLabel: vt(h),
431
+ cols: h,
432
+ expanded: b,
433
+ onRowClick: (k) => m("click:row", k, l, !!l.selected),
434
+ onRowContextMenu: (k) => m("contextmenu:row", k, l, !!l.selected),
435
+ onRowDblClick: (k) => m("dblclick:row", k, l, !!l.selected),
443
436
  item: l.item,
444
437
  text: l.text,
445
- rowIndex: m,
438
+ rowIndex: y,
446
439
  valueHash: l.valueHash,
447
440
  value: l.value,
448
441
  selected: l.selected,
449
442
  disabled: s
450
443
  };
451
444
  });
452
- }), B = Xe(ae, "selectAll"), j = Xe(ae, "expandedItems"), { data: ve } = et({
453
- items: j
454
- }), $t = (e, l) => {
455
- e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), K(l)));
445
+ }), B = Qe(ae, "selectAll"), q = Qe(ae, "expandedItems"), { data: ve } = Ze({
446
+ items: q
447
+ }), xt = (e, l) => {
448
+ e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), j(l)));
456
449
  }, me = (e) => ({
457
- "aria-controls": M(ve.value[e.valueHash]) ? void 0 : `expanded_${e.valueHash}`,
450
+ "aria-controls": L(ve.value[e.valueHash]) ? void 0 : `expanded_${e.valueHash}`,
458
451
  "aria-expanded": e.expanded ? "true" : "false",
459
452
  onClick: (l) => {
460
- l.stopPropagation(), K(e.valueHash);
453
+ l.stopPropagation(), j(e.valueHash);
461
454
  },
462
- onKeydown: (l) => $t(l, e.valueHash)
463
- }), K = (e) => {
464
- const l = q.value.find((t) => t.valueHash === e);
465
- l && (e in ve.value ? j.value = j.value.filter(
455
+ onKeydown: (l) => xt(l, e.valueHash)
456
+ }), j = (e) => {
457
+ const l = z.value.find((t) => t.valueHash === e);
458
+ l && (e in ve.value ? q.value = q.value.filter(
466
459
  (t) => le(t) !== e
467
- ) : j.value = [...j.value, l.value]);
460
+ ) : q.value = [...q.value, l.value]);
468
461
  };
469
462
  te(B, () => {
470
- E.clear(), k("update:unselectedItems", []), k("update:modelValue", []);
463
+ S.clear(), m("update:unselectedItems", []), m("update:modelValue", []);
471
464
  });
472
- const Oe = i(() => !!(a.multiple && a.modelValue.length > 0 && !a.selectAll || B.value && E.size > 0)), E = Je(/* @__PURE__ */ new Set());
465
+ const De = c(() => !!(a.multiple && a.modelValue.length > 0 && !a.selectAll || B.value && S.size > 0)), S = Ge(/* @__PURE__ */ new Set());
473
466
  te(
474
467
  () => a.unselectedItems,
475
468
  () => {
476
- E.clear(), a.unselectedItems.forEach((e) => {
477
- E.add(le(e));
469
+ S.clear(), a.unselectedItems.forEach((e) => {
470
+ S.add(le(e));
478
471
  });
479
472
  }
480
473
  );
481
- const De = (e) => {
474
+ const Fe = (e) => {
482
475
  if (ye(e)) {
483
- Ct(e), k("item:unselected", e.value), E.add(e.valueHash), k("update:unselectedItems", [...a.unselectedItems, e.value]);
476
+ wt(e), m("item:unselected", e.value), S.add(e.valueHash), m("update:unselectedItems", [...a.unselectedItems, e.value]);
484
477
  return;
485
478
  }
486
- B.value || xt(e), k("item:selected", e.value), E.delete(e.valueHash), k(
479
+ B.value || _t(e), m("item:selected", e.value), S.delete(e.valueHash), m(
487
480
  "update:unselectedItems",
488
481
  a.unselectedItems.filter((l) => le(l) !== le(e.value))
489
482
  );
490
- }, ye = (e) => E.has(e.valueHash) ? !1 : e.selected || B.value, It = Lt(
483
+ }, ye = (e) => S.has(e.valueHash) ? !1 : e.selected || B.value, Tt = Mt(
491
484
  (e) => typeof e != "string",
492
485
  JSON.stringify
493
- ), At = i(
486
+ ), $t = c(
494
487
  () => [].concat(a.modelValue ?? []).map((e) => ({
495
488
  disabled: a.disabled,
496
489
  name: a.name,
497
490
  type: "hidden",
498
- value: It(e)
491
+ value: Tt(e)
499
492
  }))
500
- ), Z = [70, 45, 85, 55], Pe = i(
501
- () => Ft(q.value.length || a.columns.length || 1, 4, 10)
493
+ ), Z = [70, 45, 85, 55], Pe = c(
494
+ () => Lt(z.value.length || a.columns.length || 1, 4, 10)
502
495
  );
503
496
  return te(
504
- () => [Le.value, a.fixedColumns],
497
+ () => [We.value, a.fixedColumns],
505
498
  () => {
506
- A.value && a.fixedColumns?.length && Xt(A.value, a.fixedColumns);
499
+ A.value && a.fixedColumns?.length && Jt(A.value, a.fixedColumns);
507
500
  },
508
501
  { flush: "post" }
509
- ), (e, l) => (o(), Ye(Ht(kt.value), {
502
+ ), (e, l) => (o(), Xe(Et(mt.value), {
503
+ id: e.id,
510
504
  ref_key: "containerRef",
511
- ref: L,
505
+ ref: O,
512
506
  "aria-busy": pe.value,
513
507
  "aria-rowcount": V.value ? a.totalItems : void 0,
514
- class: g(gt.value),
515
- "data-bb-table-id": T(st),
508
+ class: g(yt.value),
509
+ "data-bb-table-id": T(at),
516
510
  inert: e.disabled,
517
- style: N(ht.value)
511
+ style: N(pt.value)
518
512
  }, {
519
- default: Rt(() => [
520
- e.selectable ? (o(), r("legend", el, x(e.legend), 1)) : w("", !0),
521
- c("table", {
513
+ default: Ht(() => [
514
+ e.selectable ? (o(), r("legend", Yt, C(e.legend), 1)) : w("", !0),
515
+ d("table", {
522
516
  ref_key: "tableRef",
523
517
  ref: A
524
518
  }, [
@@ -528,20 +522,16 @@ const el = {
528
522
  "bb-table-caption": !0,
529
523
  "sr-only": !e.displayCaption
530
524
  })
531
- }, x(e.caption), 3)) : w("", !0),
532
- c("colgroup", null, [
533
- (o(!0), r(I, null, W(de.value, (t) => (o(), r("col", {
525
+ }, C(e.caption), 3)) : w("", !0),
526
+ d("colgroup", null, [
527
+ (o(!0), r(I, null, E(ce.value, (t) => (o(), r("col", {
534
528
  key: t.key,
535
- style: N({
536
- width: t.width,
537
- minWidth: t.locked ? t.width : void 0,
538
- maxWidth: t.locked ? t.width : void 0
539
- })
529
+ style: N({ width: t.width })
540
530
  }, null, 4))), 128))
541
531
  ]),
542
- c("thead", null, [
532
+ d("thead", null, [
543
533
  _(e.$slots, "thead", {}, () => [
544
- c("tr", {
534
+ d("tr", {
545
535
  "aria-rowindex": V.value ? 1 : void 0,
546
536
  class: "bb-table-header-row"
547
537
  }, [
@@ -553,76 +543,76 @@ const el = {
553
543
  _(e.$slots, "header:select", {
554
544
  multiple: e.multiple,
555
545
  selectAll: !!B.value,
556
- text: e.selectText || T(F)("table.selectText").value
546
+ text: e.selectText || T(M)("table.selectText").value
557
547
  }, () => [
558
- c("span", ll, [
548
+ d("span", el, [
559
549
  e.allowSelectAll && e.multiple ? (o(), r("label", {
560
550
  key: 0,
561
551
  class: g(["bb-table-check__label", {
562
552
  "bb-table-check__label--disabled": e.disabled
563
553
  }])
564
554
  }, [
565
- (o(), Ye(tt, {
566
- key: Oe.value.toString(),
555
+ (o(), Xe(et, {
556
+ key: De.value.toString(),
567
557
  modelValue: B.value,
568
558
  "onUpdate:modelValue": l[0] || (l[0] = (t) => B.value = t),
569
559
  class: "bb-table-check",
570
560
  disabled: e.disabled,
571
- indeterminate: Oe.value,
561
+ indeterminate: De.value,
572
562
  name: `select_all_${e.name || ""}`,
573
563
  readonly: e.readonly
574
564
  }, null, 8, ["modelValue", "disabled", "indeterminate", "name", "readonly"])),
575
- c("span", al, x(e.selectAllLabel || T(F)("table.selectAllLabel").value), 1)
576
- ], 2)) : e.multiple ? w("", !0) : (o(), r("span", sl, x(e.selectText || T(F)("table.selectText").value), 1))
565
+ d("span", tl, C(e.selectAllLabel || T(M)("table.selectAllLabel").value), 1)
566
+ ], 2)) : e.multiple ? w("", !0) : (o(), r("span", ll, C(e.selectText || T(M)("table.selectText").value), 1))
577
567
  ])
578
568
  ])
579
569
  ], 2)) : w("", !0),
580
- (o(!0), r(I, null, W(Fe.value, (t, s) => (o(), r("th", {
570
+ (o(!0), r(I, null, E(Oe.value, (t, s) => (o(), r("th", {
581
571
  key: t.key,
582
572
  "aria-sort": t.sortDirection,
583
573
  class: g(["bb-table-header", [
584
574
  t.classes,
585
575
  {
586
576
  "bb-table-header--edge-start": s === 0,
587
- "bb-table-header--edge-end": s === Fe.value.length - 1
577
+ "bb-table-header--edge-end": s === Oe.value.length - 1
588
578
  }
589
579
  ]]),
590
580
  scope: "col"
591
581
  }, [
592
582
  _(e.$slots, t.slotName, {
593
583
  classes: t.classes,
594
- items: T(fe),
584
+ items: T(he),
595
585
  label: t.label
596
586
  }, () => [
597
- c("span", ol, x(t.label), 1)
587
+ d("span", sl, C(t.label), 1)
598
588
  ])
599
- ], 10, nl))), 128)),
589
+ ], 10, al))), 128)),
600
590
  e.actions ? (o(), r("th", {
601
591
  key: 1,
602
592
  class: g(["bb-table-header bb-table-header--actions", e.thClass]),
603
593
  scope: "col"
604
594
  }, [
605
595
  _(e.$slots, "header:actions", { text: e.actionsText }, () => [
606
- c("span", rl, x(e.actionsText), 1)
596
+ d("span", nl, C(e.actionsText), 1)
607
597
  ])
608
598
  ], 2)) : w("", !0)
609
- ], 8, tl)
599
+ ], 8, Zt)
610
600
  ])
611
601
  ]),
612
- c("tbody", null, [
602
+ d("tbody", null, [
613
603
  pe.value ? _(e.$slots, "loading", {
614
604
  key: 0,
615
- items: T(fe)
605
+ items: T(he)
616
606
  }, () => [
617
- (o(!0), r(I, null, W(Pe.value, (t, s) => (o(), r("tr", {
607
+ (o(!0), r(I, null, E(Pe.value, (t, s) => (o(), r("tr", {
618
608
  key: s,
619
609
  "aria-rowindex": V.value ? s + 2 : void 0,
620
610
  class: "bb-table-skeleton__row"
621
611
  }, [
622
- e.selectable ? (o(), r("td", il, l[1] || (l[1] = [
623
- c("div", { class: "bb-table-skeleton__placeholder" }, null, -1)
612
+ e.selectable ? (o(), r("td", rl, l[1] || (l[1] = [
613
+ d("div", { class: "bb-table-skeleton__placeholder" }, null, -1)
624
614
  ]))) : w("", !0),
625
- (o(!0), r(I, null, W(a.columns, (n, d) => (o(), r("td", {
615
+ (o(!0), r(I, null, E(a.columns, (n, u) => (o(), r("td", {
626
616
  key: n.key,
627
617
  class: g([
628
618
  "bb-table-skeleton__cell",
@@ -630,58 +620,58 @@ const el = {
630
620
  ])
631
621
  }, [
632
622
  !n.skeleton || n.skeleton === "text" ? (o(), r("div", cl, [
633
- c("div", {
623
+ d("div", {
634
624
  class: "bb-table-skeleton__line",
635
625
  style: N({
636
- width: `${Z[(s + d) % 4]}%`
626
+ width: `${Z[(s + u) % 4]}%`
637
627
  })
638
628
  }, null, 4),
639
- c("div", {
629
+ d("div", {
640
630
  class: "bb-table-skeleton__line",
641
631
  style: N({
642
- width: `${Z[(s + d + 2) % 4]}%`
632
+ width: `${Z[(s + u + 2) % 4]}%`
643
633
  })
644
634
  }, null, 4)
645
- ])) : n.skeleton === "avatar" ? (o(), r("div", ul)) : n.skeleton === "avatar-text" ? (o(), r("div", bl, [
646
- l[2] || (l[2] = c("div", { class: "bb-table-skeleton__avatar" }, null, -1)),
647
- c("div", pl, [
648
- c("div", {
635
+ ])) : n.skeleton === "avatar" ? (o(), r("div", ul)) : n.skeleton === "avatar-text" ? (o(), r("div", dl, [
636
+ l[2] || (l[2] = d("div", { class: "bb-table-skeleton__avatar" }, null, -1)),
637
+ d("div", il, [
638
+ d("div", {
649
639
  class: "bb-table-skeleton__line",
650
640
  style: N({
651
- width: `${Z[(s + d) % 4]}%`
641
+ width: `${Z[(s + u) % 4]}%`
652
642
  })
653
643
  }, null, 4),
654
- c("div", {
644
+ d("div", {
655
645
  class: "bb-table-skeleton__line",
656
646
  style: N({
657
- width: `${Z[(s + d + 2) % 4]}%`
647
+ width: `${Z[(s + u + 2) % 4]}%`
658
648
  })
659
649
  }, null, 4)
660
650
  ])
661
- ])) : n.skeleton === "image" ? (o(), r("div", hl)) : n.skeleton === "badge" ? (o(), r("div", fl)) : w("", !0)
651
+ ])) : n.skeleton === "image" ? (o(), r("div", bl)) : n.skeleton === "badge" ? (o(), r("div", pl)) : w("", !0)
662
652
  ], 2))), 128)),
663
- e.actions ? (o(), r("td", vl, l[3] || (l[3] = [
664
- c("div", { class: "bb-table-skeleton__placeholder" }, null, -1)
653
+ e.actions ? (o(), r("td", fl, l[3] || (l[3] = [
654
+ d("div", { class: "bb-table-skeleton__placeholder" }, null, -1)
665
655
  ]))) : w("", !0)
666
- ], 8, dl))), 128)),
667
- c("tr", {
656
+ ], 8, ol))), 128)),
657
+ d("tr", {
668
658
  "aria-rowindex": V.value ? Pe.value + 2 : void 0,
669
659
  class: "bb-table-loading__row bb-table-loading__row--sr-only"
670
660
  }, [
671
- c("td", {
672
- colspan: he.value,
661
+ d("td", {
662
+ colspan: fe.value,
673
663
  class: "bb-table-loading__cell",
674
664
  "aria-live": "polite",
675
665
  role: "status"
676
666
  }, [
677
- c("span", kl, x(e.loadingText), 1)
678
- ], 8, yl)
679
- ], 8, ml)
680
- ]) : T(q).length ? _(e.$slots, "tbody", { key: 2 }, () => [
681
- (o(!0), r(I, null, W(Le.value, (t) => (o(), r(I, {
667
+ d("span", ml, C(e.loadingText), 1)
668
+ ], 8, vl)
669
+ ], 8, hl)
670
+ ]) : T(z).length ? _(e.$slots, "tbody", { key: 2 }, () => [
671
+ (o(!0), r(I, null, E(We.value, (t) => (o(), r(I, {
682
672
  key: t.valueHash
683
673
  }, [
684
- c("tr", {
674
+ d("tr", {
685
675
  "aria-rowindex": V.value && t.rowIndex ? t.rowIndex : void 0,
686
676
  class: "bb-table-data__row",
687
677
  onClick: t.onRowClick,
@@ -706,34 +696,34 @@ const el = {
706
696
  "bb-table-check__label--disabled": t.disabled
707
697
  }])
708
698
  }, [
709
- Ze(tt, {
699
+ Ye(et, {
710
700
  checked: ye(t),
711
701
  class: "bb-table-check",
712
702
  disabled: t.disabled,
713
703
  readonly: e.readonly,
714
- onChange: () => De(t)
704
+ onChange: () => Fe(t)
715
705
  }, null, 8, ["checked", "disabled", "readonly", "onChange"]),
716
- c("span", Cl, x(t.accessibleLabel), 1)
706
+ d("span", wl, C(t.accessibleLabel), 1)
717
707
  ], 2)) : (o(), r("label", {
718
708
  key: 1,
719
709
  class: g(["bb-table-radio__label", {
720
710
  "bb-table-radio__label--disabled": t.disabled
721
711
  }])
722
712
  }, [
723
- Ze(Gt, {
713
+ Ye(Kt, {
724
714
  checked: t.selected,
725
715
  class: "bb-table-radio",
726
716
  disabled: t.disabled,
727
717
  name: T(_e),
728
718
  readonly: e.readonly,
729
719
  value: t.value,
730
- onChange: () => De(t)
720
+ onChange: () => Fe(t)
731
721
  }, null, 8, ["checked", "disabled", "name", "readonly", "value", "onChange"]),
732
- c("span", Tl, x(t.accessibleLabel), 1)
722
+ d("span", Cl, C(t.accessibleLabel), 1)
733
723
  ], 2))
734
724
  ])
735
725
  ], 2)) : w("", !0),
736
- (o(!0), r(I, null, W(t.cols, (s, n) => (o(), r("td", {
726
+ (o(!0), r(I, null, E(t.cols, (s, n) => (o(), r("td", {
737
727
  key: s.key,
738
728
  class: g(["bb-table-data__cell", [
739
729
  s.classes,
@@ -749,10 +739,10 @@ const el = {
749
739
  expanded: t.expanded,
750
740
  item: t.item,
751
741
  expandProps: me(t),
752
- toggleExpanded: () => K(t.valueHash),
742
+ toggleExpanded: () => j(t.valueHash),
753
743
  value: t.value
754
744
  }, () => [
755
- Nt(x(s.content), 1)
745
+ Rt(C(s.content), 1)
756
746
  ])
757
747
  ], 2))), 128)),
758
748
  e.actions ? (o(), r("td", {
@@ -763,58 +753,58 @@ const el = {
763
753
  expanded: t.expanded,
764
754
  item: t.item,
765
755
  expandProps: me(t),
766
- toggleExpanded: () => K(t.valueHash),
756
+ toggleExpanded: () => j(t.valueHash),
767
757
  value: t.value
768
758
  })
769
759
  ], 2)) : w("", !0)
770
- ], 40, xl),
760
+ ], 40, _l),
771
761
  t.expanded ? (o(), r("tr", {
772
762
  key: 0,
773
763
  "aria-rowindex": V.value && t.rowIndex ? t.rowIndex + 1 : void 0,
774
764
  id: `expanded_${t.valueHash}`,
775
765
  class: "bb-table-expand__row"
776
766
  }, [
777
- c("td", {
778
- colspan: he.value,
767
+ d("td", {
768
+ colspan: fe.value,
779
769
  class: "bb-table-expand__cell"
780
770
  }, [
781
771
  _(e.$slots, "expand", {
782
772
  expanded: t.expanded,
783
773
  item: t.item,
784
774
  expandProps: me(t),
785
- toggleExpanded: () => K(t.valueHash),
775
+ toggleExpanded: () => j(t.valueHash),
786
776
  value: t.value
787
777
  })
788
- ], 8, Il)
789
- ], 8, $l)) : w("", !0)
778
+ ], 8, Tl)
779
+ ], 8, xl)) : w("", !0)
790
780
  ], 64))), 128))
791
781
  ]) : _(e.$slots, "no-data", { key: 1 }, () => [
792
- c("tr", {
782
+ d("tr", {
793
783
  "aria-rowindex": V.value ? 2 : void 0,
794
784
  class: "bb-table-no-data__row"
795
785
  }, [
796
- c("td", {
786
+ d("td", {
797
787
  class: "bb-table-no-data__cell",
798
- colspan: he.value
788
+ colspan: fe.value
799
789
  }, [
800
- c("span", wl, x(e.noDataText || T(F)("table.noDataText").value), 1)
801
- ], 8, _l)
802
- ], 8, gl)
790
+ d("span", gl, C(e.noDataText || T(M)("table.noDataText").value), 1)
791
+ ], 8, kl)
792
+ ], 8, yl)
803
793
  ])
804
794
  ]),
805
- c("tfoot", null, [
795
+ d("tfoot", null, [
806
796
  _(e.$slots, "tfoot")
807
797
  ])
808
798
  ], 512),
809
- (o(!0), r(I, null, W(At.value, (t) => (o(), r("input", Mt({
799
+ (o(!0), r(I, null, E($t.value, (t) => (o(), r("input", Nt({
810
800
  key: t.value,
811
801
  ref_for: !0
812
802
  }, t), null, 16))), 128))
813
803
  ]),
814
804
  _: 3
815
- }, 8, ["aria-busy", "aria-rowcount", "class", "data-bb-table-id", "inert", "style"]));
805
+ }, 8, ["id", "aria-busy", "aria-rowcount", "class", "data-bb-table-id", "inert", "style"]));
816
806
  }
817
807
  });
818
808
  export {
819
- Gl as default
809
+ Kl as default
820
810
  };