bitboss-ui 2.0.105 → 2.0.107

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 (175) hide show
  1. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +0 -1
  2. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +1 -7
  3. package/dist/components/BbAlert/BbAlert.vue.d.ts +0 -1
  4. package/dist/components/BbChip/BbChip.vue.d.ts +0 -1
  5. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +0 -1
  6. package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -1
  7. package/dist/components/BbRows/BbRows.vue.d.ts +1 -0
  8. package/dist/components/BbTable/BbTable.vue.d.ts +2 -7
  9. package/dist/components/BbTable/types.d.ts +13 -0
  10. package/dist/components/ListBox.vue.d.ts +0 -2
  11. package/dist/composables/useLocale.d.ts +1 -1
  12. package/dist/i18n/en.d.ts +45 -0
  13. package/dist/i18n/it.d.ts +45 -0
  14. package/dist/index100.js +46 -45
  15. package/dist/index111.js +223 -205
  16. package/dist/index119.js +2 -2
  17. package/dist/index121.js +55 -54
  18. package/dist/index123.js +1 -1
  19. package/dist/index125.js +14 -13
  20. package/dist/index127.js +1 -1
  21. package/dist/index128.js +1 -1
  22. package/dist/index129.js +1 -1
  23. package/dist/index13.js +2 -2
  24. package/dist/index133.js +2 -2
  25. package/dist/index15.js +36 -35
  26. package/dist/index17.js +3 -3
  27. package/dist/index19.js +63 -64
  28. package/dist/index207.js +8 -2
  29. package/dist/index208.js +3 -4
  30. package/dist/index209.js +53 -2
  31. package/dist/index21.js +110 -103
  32. package/dist/index211.js +13 -16
  33. package/dist/index212.js +3 -16
  34. package/dist/index213.js +40 -18
  35. package/dist/index214.js +6 -19
  36. package/dist/index215.js +7 -27
  37. package/dist/index216.js +12 -3
  38. package/dist/index217.js +13 -2
  39. package/dist/index218.js +2 -8
  40. package/dist/index219.js +4 -250
  41. package/dist/index220.js +2 -52
  42. package/dist/index221.js +3 -44
  43. package/dist/index222.js +20 -5
  44. package/dist/index223.js +4 -60
  45. package/dist/index224.js +281 -84
  46. package/dist/index225.js +18 -0
  47. package/dist/index226.js +16 -8
  48. package/dist/index227.js +18 -24
  49. package/dist/index228.js +14 -16
  50. package/dist/index229.js +18 -47
  51. package/dist/index23.js +127 -119
  52. package/dist/index230.js +27 -15
  53. package/dist/index231.js +2 -12
  54. package/dist/index232.js +250 -16
  55. package/dist/index233.js +52 -3
  56. package/dist/index234.js +44 -41
  57. package/dist/index235.js +5 -6
  58. package/dist/index236.js +60 -7
  59. package/dist/index237.js +126 -12
  60. package/dist/index238.js +124 -52
  61. package/dist/index239.js +4 -0
  62. package/dist/index240.js +4 -12
  63. package/dist/index241.js +369 -3
  64. package/dist/index242.js +85 -125
  65. package/dist/index244.js +25 -2
  66. package/dist/index245.js +16 -19
  67. package/dist/index246.js +48 -5
  68. package/dist/index247.js +12 -366
  69. package/dist/index248.js +12 -4
  70. package/dist/index249.js +16 -2
  71. package/dist/index25.js +44 -41
  72. package/dist/index250.js +2 -2
  73. package/dist/index251.js +18 -2
  74. package/dist/index252.js +105 -17
  75. package/dist/{index255.js → index254.js} +2 -2
  76. package/dist/index256.js +14 -0
  77. package/dist/index257.js +2 -12
  78. package/dist/index258.js +2 -10
  79. package/dist/index259.js +9 -2
  80. package/dist/index260.js +3 -6
  81. package/dist/index261.js +8 -15
  82. package/dist/index262.js +23 -9
  83. package/dist/index263.js +88 -8
  84. package/dist/index265.js +6 -89
  85. package/dist/index266.js +18 -0
  86. package/dist/index267.js +9 -4
  87. package/dist/index268.js +9 -6
  88. package/dist/index269.js +8 -2
  89. package/dist/index27.js +1 -1
  90. package/dist/index270.js +28 -2
  91. package/dist/index271.js +3 -2
  92. package/dist/index273.js +7 -2
  93. package/dist/index274.js +431 -2
  94. package/dist/index275.js +1 -1
  95. package/dist/index276.js +89 -2
  96. package/dist/index277.js +7 -2
  97. package/dist/index278.js +11 -2
  98. package/dist/index279.js +4 -28
  99. package/dist/index280.js +224 -22
  100. package/dist/index281.js +202 -0
  101. package/dist/index282.js +175 -6
  102. package/dist/index283.js +6 -3
  103. package/dist/index284.js +2 -7
  104. package/dist/index285.js +2 -11
  105. package/dist/index286.js +2 -17
  106. package/dist/index287.js +2 -9
  107. package/dist/index288.js +2 -431
  108. package/dist/index289.js +2 -2
  109. package/dist/index29.js +2 -2
  110. package/dist/index290.js +2 -89
  111. package/dist/index291.js +2 -3
  112. package/dist/index292.js +4 -0
  113. package/dist/index293.js +2 -224
  114. package/dist/index294.js +2 -200
  115. package/dist/index295.js +22 -2
  116. package/dist/index297.js +2 -176
  117. package/dist/index298.js +125 -21
  118. package/dist/index299.js +24 -0
  119. package/dist/index301.js +3 -436
  120. package/dist/index302.js +16 -126
  121. package/dist/index303.js +436 -3
  122. package/dist/index304.js +127 -3
  123. package/dist/index305.js +3 -213
  124. package/dist/index306.js +3 -3
  125. package/dist/index307.js +214 -3
  126. package/dist/index308.js +3 -58
  127. package/dist/index309.js +3 -7
  128. package/dist/index31.js +2 -2
  129. package/dist/index310.js +3 -19
  130. package/dist/index311.js +56 -64
  131. package/dist/index312.js +2 -7
  132. package/dist/index313.js +67 -2
  133. package/dist/index314.js +5 -5
  134. package/dist/index315.js +32 -7
  135. package/dist/index316.js +7 -8
  136. package/dist/index317.js +18 -7
  137. package/dist/index318.js +53 -5
  138. package/dist/index319.js +53 -3
  139. package/dist/index320.js +46 -3
  140. package/dist/index321.js +6 -32
  141. package/dist/index322.js +4 -46
  142. package/dist/index323.js +8 -2
  143. package/dist/index324.js +2 -2
  144. package/dist/index325.js +6 -0
  145. package/dist/index326.js +2 -424
  146. package/dist/index328.js +424 -2
  147. package/dist/index33.js +45 -45
  148. package/dist/index35.js +56 -55
  149. package/dist/index37.js +166 -165
  150. package/dist/index39.js +4 -4
  151. package/dist/index41.js +2 -2
  152. package/dist/index43.js +70 -71
  153. package/dist/index45.js +7 -7
  154. package/dist/index47.js +2 -2
  155. package/dist/index49.js +2 -2
  156. package/dist/index53.js +28 -27
  157. package/dist/index55.js +1 -1
  158. package/dist/index57.js +2 -2
  159. package/dist/index61.js +32 -31
  160. package/dist/index75.js +3 -3
  161. package/dist/index77.js +87 -86
  162. package/dist/index79.js +2 -2
  163. package/dist/index81.js +1 -1
  164. package/dist/index84.js +45 -44
  165. package/dist/index86.js +67 -66
  166. package/dist/index88.js +69 -67
  167. package/package.json +1 -1
  168. package/dist/index210.js +0 -283
  169. package/dist/index243.js +0 -127
  170. package/dist/index253.js +0 -108
  171. package/dist/index264.js +0 -25
  172. package/dist/index296.js +0 -128
  173. package/dist/index300.js +0 -10
  174. /package/dist/{index327.js → index329.js} +0 -0
  175. /package/dist/{index272.js → index330.js} +0 -0
package/dist/index111.js CHANGED
@@ -1,33 +1,34 @@
1
- import { defineComponent as me, mergeModels as G, ref as fe, computed as k, toRef as z, useModel as J, watch as K, reactive as ye, openBlock as n, createBlock as Q, resolveDynamicComponent as he, normalizeClass as r, unref as i, withCtx as ve, createElementBlock as d, toDisplayString as u, createCommentVNode as g, createElementVNode as o, renderSlot as p, isRef as ke, Fragment as V, renderList as B, createVNode as X, createTextVNode as _e, mergeProps as ge } from "vue";
2
- import { add as Ce } from "./index313.js";
1
+ import { defineComponent as me, mergeModels as K, ref as fe, computed as v, toRef as j, useModel as Q, watch as X, reactive as ye, openBlock as n, createBlock as Y, resolveDynamicComponent as he, normalizeClass as p, unref as b, withCtx as ve, createElementBlock as d, toDisplayString as m, createCommentVNode as _, createElementVNode as o, renderSlot as f, isRef as ke, Fragment as I, renderList as T, createVNode as Z, createTextVNode as _e, mergeProps as ge } from "vue";
2
+ import { add as Ce } from "./index312.js";
3
3
  import { clamp as we } from "./index206.js";
4
- import { isNil as Y } from "./index250.js";
4
+ import { isNil as $ } from "./index257.js";
5
5
  import { useId as Ve } from "./index8.js";
6
- import { useItemValue as Be } from "./index287.js";
7
- import { when as Te } from "./index208.js";
8
- import Z from "./index17.js";
6
+ import { useItemValue as Be } from "./index268.js";
7
+ import { when as Ie } from "./index219.js";
8
+ import ee from "./index17.js";
9
9
  /* empty css */
10
- import $e from "./index31.js";
10
+ import Te from "./index31.js";
11
11
  /* empty css */
12
- import { hash as ee } from "./index216.js";
13
- import { useItemsGetter as Se } from "./index227.js";
14
- import { usePrefill as Ie } from "./index232.js";
15
- import { useIndexById as Ne } from "./index228.js";
16
- import { useBaseOptions as Ae } from "./index229.js";
17
- import { useHashedWatcher as He } from "./index231.js";
18
- const Le = {
12
+ import { hash as le } from "./index208.js";
13
+ import { useItemsGetter as $e } from "./index244.js";
14
+ import { usePrefill as Ae } from "./index249.js";
15
+ import { useIndexById as xe } from "./index245.js";
16
+ import { useBaseOptions as Ne } from "./index246.js";
17
+ import { useHashedWatcher as Le } from "./index248.js";
18
+ import { useLocale as Se } from "./index217.js";
19
+ const He = {
19
20
  key: 0,
20
21
  class: "sr-only"
21
- }, De = { class: "bb-table-header-row" }, xe = { class: "bb-table-header__content" }, Re = { class: "bb-table-check__label-text sr-only" }, ze = {
22
+ }, De = ["aria-rowindex"], Re = { class: "bb-table-header__content" }, Me = { class: "bb-table-check__label-text sr-only" }, Pe = {
22
23
  key: 1,
23
24
  class: "bb-table-radio__label-text sr-only"
24
- }, Me = { class: "bb-table-header__content" }, Oe = { class: "bb-table-header__content sr-only" }, je = { class: "bb-table-loading__row" }, qe = ["colspan"], Ee = { class: "bb-table-loading__text sr-only" }, Fe = {
25
+ }, Oe = { class: "bb-table-header__content" }, je = { class: "bb-table-header__content sr-only" }, Ee = ["aria-rowindex"], qe = ["colspan"], ze = { class: "bb-table-loading__text sr-only" }, Fe = {
25
26
  class: "bb-table-skeleton__container",
26
27
  role: "status"
27
- }, Pe = { class: "bb-table-no-data__row" }, Ue = ["colspan"], We = { class: "bb-table-no-data__text" }, Ge = ["onClick", "onContextmenu", "onDblclick"], Je = { class: "bb-table-check__label-text sr-only" }, Ke = { class: "bb-table-radio__label-text sr-only" }, pl = /* @__PURE__ */ me({
28
+ }, Ue = ["aria-rowindex"], We = ["colspan"], Ge = { class: "bb-table-no-data__text" }, Je = ["aria-rowindex", "onClick", "onContextmenu", "onDblclick"], Ke = { class: "bb-table-check__label-text sr-only" }, Qe = { class: "bb-table-radio__label-text sr-only" }, fl = /* @__PURE__ */ me({
28
29
  __name: "BbTable",
29
- props: /* @__PURE__ */ G({
30
- accessibleLabel: { type: Function, default: (C) => ["Seleziona"].concat(C.map((N) => N.content)).join(" ") },
30
+ props: /* @__PURE__ */ K({
31
+ accessibleLabel: {},
31
32
  actions: { type: Boolean },
32
33
  actionsText: { default: "Azioni" },
33
34
  align: { default: "left" },
@@ -46,18 +47,21 @@ const Le = {
46
47
  itemValue: {},
47
48
  legend: {},
48
49
  loading: { type: Boolean },
49
- loadingText: { default: "Caricamento" },
50
+ loadingText: {},
50
51
  max: { default: 1 / 0 },
51
52
  modelValue: { default: () => [] },
52
53
  multiple: { type: Boolean, default: !0 },
53
54
  name: {},
54
- noDataText: { default: "Non ci sono elementi da visualizzare" },
55
+ noDataText: {},
56
+ page: {},
57
+ perPage: {},
55
58
  readonly: { type: Boolean },
56
59
  selectable: { type: [Boolean, Function] },
57
- selectAllLabel: { default: "Seleziona tutti gli elementi di questa pagina" },
58
- selectText: { default: "Seleziona un elemento" },
60
+ selectAllLabel: {},
61
+ selectText: {},
59
62
  tdClass: {},
60
- thClass: {}
63
+ thClass: {},
64
+ totalItems: {}
61
65
  }, {
62
66
  "select-all": { type: Boolean, default: !1 },
63
67
  "select-allModifiers": {},
@@ -66,13 +70,15 @@ const Le = {
66
70
  },
67
71
  "unselected-itemsModifiers": {}
68
72
  }),
69
- emits: /* @__PURE__ */ G(["click:row", "contextmenu:row", "dblclick:row", "update:modelValue", "update:selectAll", "item:selected", "item:unselected"], ["update:select-all", "update:unselected-items"]),
70
- setup(C, { emit: N }) {
71
- const { getItemValue: le } = Be(), M = Ve().id.value, t = C, m = N, T = fe(), te = t.accessibleLabel, ae = t.loadingText, se = t.noDataText, O = t.selectText, oe = k(() => t.selectable ? "fieldset" : "div"), j = k(() => t.loading || ne.value), q = k(() => [!!t.selectable, !!t.actions].reduce(
73
+ emits: /* @__PURE__ */ K(["click:row", "contextmenu:row", "dblclick:row", "update:modelValue", "update:selectAll", "item:selected", "item:unselected"], ["update:select-all", "update:unselected-items"]),
74
+ setup(H, { emit: ae }) {
75
+ const { getItemValue: te } = Be(), E = Ve().id.value, a = H, y = ae, { t: g } = Se(), A = fe(), se = (e) => [g("table.select").value].concat(e.map((s) => s.content)).join(" "), oe = v(() => a.selectable ? "fieldset" : "div"), q = v(() => a.loading || ne.value), C = v(
76
+ () => !$(a.page) && !$(a.perPage) && !$(a.totalItems)
77
+ ), z = v(() => [!!a.selectable, !!a.actions].reduce(
72
78
  (e, s) => e + +!!s,
73
- t.columns.length
74
- )), E = k(
75
- () => t.columns.reduce(
79
+ a.columns.length
80
+ )), F = v(
81
+ () => a.columns.reduce(
76
82
  (e, s) => {
77
83
  const l = s.key.split(/\W+/g).join("_");
78
84
  return e[s.key] = l, e;
@@ -80,148 +86,149 @@ const Le = {
80
86
  {}
81
87
  )
82
88
  ), {
83
- getter: F,
84
- items: A,
89
+ getter: U,
90
+ items: D,
85
91
  loading: ne
86
- } = Se({
87
- items: z(t, "items")
88
- }), { hasPrefilled: de } = Ie({
92
+ } = $e({
93
+ items: j(a, "items")
94
+ }), { hasPrefilled: de } = Ae({
89
95
  onStart: !0,
90
- currentValue: t.modelValue,
91
- multiple: t.multiple,
96
+ currentValue: a.modelValue,
97
+ multiple: a.multiple,
92
98
  fn: async ({ prefill: e }) => {
93
- await F(e, t.modelValue);
99
+ await U(e, a.modelValue);
94
100
  }
95
- }), { data: P } = Ne({
96
- items: z(t, "modelValue")
97
- }), { options: $ } = Ae({
98
- disabled: z(t, "disabled"),
99
- items: A,
101
+ }), { data: W } = xe({
102
+ items: j(a, "modelValue")
103
+ }), { options: x } = Ne({
104
+ disabled: j(a, "disabled"),
105
+ items: D,
100
106
  itemText: void 0,
101
- itemValue: t.itemValue,
102
- max: t.max,
107
+ itemValue: a.itemValue,
108
+ max: a.max,
103
109
  selectable: !0,
104
- selectedIndexedByHash: P
105
- }), ce = async (e) => {
106
- t.multiple ? m("update:modelValue", t.modelValue.concat(e.value)) : m("update:modelValue", e.value);
107
- }, ie = async (e) => {
108
- if (t.multiple) {
109
- const s = { ...P.value };
110
- delete s[e.valueHash], m("update:modelValue", Object.values(s));
110
+ selectedIndexedByHash: W
111
+ }), ie = async (e) => {
112
+ a.multiple ? y("update:modelValue", a.modelValue.concat(e.value)) : y("update:modelValue", e.value);
113
+ }, ce = async (e) => {
114
+ if (a.multiple) {
115
+ const s = { ...W.value };
116
+ delete s[e.valueHash], y("update:modelValue", Object.values(s));
111
117
  } else
112
- m("update:modelValue", null);
118
+ y("update:modelValue", null);
113
119
  };
114
- He(
115
- () => [t.dependencies, t.items],
120
+ Le(
121
+ () => [a.dependencies, a.items],
116
122
  async () => {
117
- de.value && await F(!1, t.modelValue);
123
+ de.value && await U(!1, a.modelValue);
118
124
  },
119
125
  {
120
- debounce: t.depsDebounceTime
126
+ debounce: a.depsDebounceTime
121
127
  }
122
128
  );
123
- const be = k(
124
- () => t.columns.map((e) => {
125
- const s = e.align || "left", { label: l, key: f } = e, D = `header:${E.value[e.key]}`;
126
- let a = [`bb-table-header--${s}`];
127
- return t.thClass && (a = a.concat(t.thClass)), e.thClass && (a = a.concat(e.thClass)), {
129
+ const re = v(
130
+ () => a.columns.map((e) => {
131
+ const s = e.align || "left", { label: l, key: u } = e, V = `header:${F.value[e.key]}`;
132
+ let i = [`bb-table-header--${s}`];
133
+ return a.thClass && (i = i.concat(a.thClass)), e.thClass && (i = i.concat(e.thClass)), {
128
134
  align: s,
129
- key: f,
135
+ key: u,
130
136
  label: l,
131
- slotName: D,
132
- classes: a
137
+ slotName: V,
138
+ classes: i
133
139
  };
134
140
  })
135
- ), H = k(() => $.value.map((e) => {
136
- let s = !t.selectable;
137
- typeof t.selectable == "function" && (s = !t.selectable(e.item)), s = s || !!e.disabled;
138
- const l = t.columns.map((a) => {
139
- const c = E.value[a.key], v = a.align || "left", { label: I, key: x } = a;
140
- let y = le(e.item, a.key);
141
- a.formatter && // By default the formatter runs anyway
142
- (!Y(y) || a.formatOnNull !== !1) && (y = a.formatter(y, a.key, e.item)), a.placeholder && Y(y) && (y = a.placeholder);
143
- let b = [`bb-table-data__cell--${v}`];
144
- if (t.tdClass)
145
- if (typeof t.tdClass == "function") {
146
- let _ = t.tdClass(y, a.key, e.item);
147
- _ && (b = b.concat(_));
148
- } else b = b.concat(t.tdClass);
141
+ ), R = v(() => x.value.map((e, s) => {
142
+ let l = !a.selectable;
143
+ typeof a.selectable == "function" && (l = !a.selectable(e.item)), l = l || !!e.disabled;
144
+ const u = C.value ? s + (a.page - 1) * a.perPage + 2 : void 0, V = a.columns.map((t) => {
145
+ const L = F.value[t.key], S = t.align || "left", { label: P, key: O } = t;
146
+ let h = te(e.item, t.key);
147
+ t.formatter && // By default the formatter runs anyway
148
+ (!$(h) || t.formatOnNull !== !1) && (h = t.formatter(h, t.key, e.item)), t.placeholder && $(h) && (h = t.placeholder);
149
+ let c = [`bb-table-data__cell--${S}`];
149
150
  if (a.tdClass)
150
151
  if (typeof a.tdClass == "function") {
151
- let _ = a.tdClass(y, a.key, e.item);
152
- _ && (b = b.concat(_));
153
- } else b = b.concat(a.tdClass);
152
+ let B = a.tdClass(h, t.key, e.item);
153
+ B && (c = c.concat(B));
154
+ } else c = c.concat(a.tdClass);
155
+ if (t.tdClass)
156
+ if (typeof t.tdClass == "function") {
157
+ let B = t.tdClass(h, t.key, e.item);
158
+ B && (c = c.concat(B));
159
+ } else c = c.concat(t.tdClass);
154
160
  return {
155
- align: v,
156
- classes: b,
157
- content: y,
158
- key: x,
159
- label: I,
160
- slotName: c
161
+ align: S,
162
+ classes: c,
163
+ content: h,
164
+ key: O,
165
+ label: P,
166
+ slotName: L
161
167
  };
162
168
  });
163
169
  return {
164
- accessibleLabel: te(l, e.item),
165
- cols: l,
166
- onRowClick: (a) => m("click:row", a, e, !!e.selected),
167
- onRowContextMenu: (a) => m("contextmenu:row", a, e, !!e.selected),
168
- onRowDblClick: (a) => m("dblclick:row", a, e, !!e.selected),
170
+ accessibleLabel: se(V),
171
+ cols: V,
172
+ onRowClick: (t) => y("click:row", t, e, !!e.selected),
173
+ onRowContextMenu: (t) => y("contextmenu:row", t, e, !!e.selected),
174
+ onRowDblClick: (t) => y("dblclick:row", t, e, !!e.selected),
169
175
  item: e.item,
170
176
  text: e.text,
177
+ rowIndex: u,
171
178
  valueHash: e.valueHash,
172
179
  value: e.value,
173
180
  selected: e.selected,
174
- disabled: s
181
+ disabled: l
175
182
  };
176
183
  }));
177
- let h = J(C, "select-all");
178
- K(h, () => {
179
- w.clear(), S.value = [], m("update:modelValue", []);
184
+ let k = Q(H, "select-all");
185
+ X(k, () => {
186
+ w.clear(), N.value = [], y("update:modelValue", []);
180
187
  });
181
- const U = k(() => {
188
+ const G = v(() => {
182
189
  var e;
183
- return (e = t.modelValue) != null && e.length ? H.value.some((s) => !s.selected) : !!(h.value && w.size);
184
- }), w = ye(/* @__PURE__ */ new Set()), S = J(C, "unselected-items"), W = (e) => {
185
- L(e) ? (ie(e), m("item:unselected", e.value), w.add(e.valueHash), S.value.push(e.value)) : (h.value || ce(e), m("item:selected", e.value), w.delete(e.valueHash), S.value = S.value.filter(
186
- (s) => ee(s) !== ee(e.value)
190
+ return (e = a.modelValue) != null && e.length ? R.value.some((s) => !s.selected) : !!(k.value && w.size);
191
+ }), w = ye(/* @__PURE__ */ new Set()), N = Q(H, "unselected-items"), J = (e) => {
192
+ M(e) ? (ce(e), y("item:unselected", e.value), w.add(e.valueHash), N.value.push(e.value)) : (k.value || ie(e), y("item:selected", e.value), w.delete(e.valueHash), N.value = N.value.filter(
193
+ (s) => le(s) !== le(e.value)
187
194
  ));
188
- }, L = (e) => w.has(e.valueHash) ? !1 : e.selected || h.value, re = Te(
195
+ }, M = (e) => w.has(e.valueHash) ? !1 : e.selected || k.value, be = Ie(
189
196
  (e) => typeof e != "string",
190
197
  JSON.stringify
191
- ), ue = k(() => [].concat(t.modelValue).map((e) => {
192
- const s = re(e);
198
+ ), ue = v(() => [].concat(a.modelValue).map((e) => {
199
+ const s = be(e);
193
200
  return {
194
- disabled: t.disabled,
195
- name: t.name,
201
+ disabled: a.disabled,
202
+ name: a.name,
196
203
  type: "hidden",
197
204
  value: s
198
205
  };
199
- })), pe = k(() => we($.value.length, 4, 10));
200
- return K(
201
- () => H.value,
206
+ })), pe = v(() => we(x.value.length, 4, 10));
207
+ return X(
208
+ () => R.value,
202
209
  () => {
203
210
  var e;
204
- if (t.fixedColumns.length && t.items && T.value) {
211
+ if (a.fixedColumns.length && a.items && A.value) {
205
212
  const s = Array.from(
206
- T.value.querySelectorAll("thead th")
207
- ), l = t.fixedColumns.reduce((a, c) => {
208
- const v = typeof c == "number" ? c : c.index, I = typeof c == "number" ? "left" : c.position, x = s[v].getBoundingClientRect(), y = Math.floor(x.width), b = a.filter((R) => R.position === I).map((R) => R.width).reduce(Ce, 0), _ = {
209
- index: v,
210
- position: I,
211
- width: y,
212
- offset: b
213
+ A.value.querySelectorAll("thead th")
214
+ ), l = a.fixedColumns.reduce((i, r) => {
215
+ const t = typeof r == "number" ? r : r.index, L = typeof r == "number" ? "left" : r.position, S = s[t].getBoundingClientRect(), P = Math.floor(S.width), O = i.filter((c) => c.position === L).map((c) => c.width).reduce(Ce, 0), h = {
216
+ index: t,
217
+ position: L,
218
+ width: P,
219
+ offset: O
213
220
  };
214
- return a.push(_), a;
221
+ return i.push(h), i;
215
222
  }, []);
216
- Array.from((e = T.value) == null ? void 0 : e.querySelectorAll("tr")).map(
217
- (a) => Array.from(
218
- a.querySelectorAll(
219
- l.map((c) => `:scope > :nth-child(${c.index + 1})`).join(", ")
223
+ Array.from((e = A.value) == null ? void 0 : e.querySelectorAll("tr")).map(
224
+ (i) => Array.from(
225
+ i.querySelectorAll(
226
+ l.map((r) => `:scope > :nth-child(${r.index + 1})`).join(", ")
220
227
  )
221
228
  )
222
- ).forEach((a) => {
223
- a.forEach((c, v) => {
224
- c.style.position = "sticky", l[v].position === "left" ? c.style.left = `${l[v].offset}px` : c.style.right = `${l[v].offset}px`;
229
+ ).forEach((i) => {
230
+ i.forEach((r, t) => {
231
+ r.style.position = "sticky", l[t].position === "left" ? r.style.left = `${l[t].offset}px` : r.style.right = `${l[t].offset}px`;
225
232
  });
226
233
  });
227
234
  }
@@ -229,104 +236,111 @@ const Le = {
229
236
  {
230
237
  flush: "post"
231
238
  }
232
- ), (e, s) => (n(), Q(he(oe.value), {
239
+ ), (e, s) => (n(), Y(he(oe.value), {
233
240
  ref_key: "container",
234
- ref: T,
235
- class: r({
241
+ ref: A,
242
+ "aria-rowcount": C.value ? e.totalItems : void 0,
243
+ class: p({
236
244
  "bb-table": !0,
237
245
  [`bb-table--align-${e.align}`]: !0,
238
246
  "bb-table--compact": e.compact,
239
247
  "bb-table--fixed": e.fixed,
240
248
  "bb-table--fixed-header": e.fixedHeaders,
241
- "bb-table--loading": j.value,
242
- "bb-table--empty": !i($).length,
249
+ "bb-table--loading": q.value,
250
+ "bb-table--empty": !b(x).length,
243
251
  "bb-table--selectable": e.selectable
244
252
  })
245
253
  }, {
246
254
  default: ve(() => [
247
- e.selectable ? (n(), d("legend", Le, u(e.legend), 1)) : g("", !0),
255
+ e.selectable ? (n(), d("legend", He, m(e.legend), 1)) : _("", !0),
248
256
  o("table", null, [
249
257
  e.caption ? (n(), d("caption", {
250
258
  key: 0,
251
- class: r({
259
+ class: p({
252
260
  "bb-table-caption": !0,
253
261
  "sr-only": !e.displayCaption
254
262
  })
255
- }, u(e.caption), 3)) : g("", !0),
263
+ }, m(e.caption), 3)) : _("", !0),
256
264
  o("thead", null, [
257
- p(e.$slots, "thead", {}, () => [
258
- o("tr", De, [
265
+ f(e.$slots, "thead", {}, () => [
266
+ o("tr", {
267
+ "aria-rowindex": C.value ? 1 : void 0,
268
+ class: "bb-table-header-row"
269
+ }, [
259
270
  e.selectable ? (n(), d("th", {
260
271
  key: 0,
261
- class: r(["bb-table-header bb-table-header--select", e.thClass]),
272
+ class: p(["bb-table-header bb-table-header--select", e.thClass]),
262
273
  scope: "col"
263
274
  }, [
264
- p(e.$slots, "header:select", {
275
+ f(e.$slots, "header:select", {
265
276
  multiple: e.multiple,
266
- selectAll: !!i(h),
267
- text: i(O)
277
+ selectAll: !!b(k),
278
+ text: e.selectText || b(g)("table.selectText").value
268
279
  }, () => [
269
- o("span", xe, [
280
+ o("span", Re, [
270
281
  e.allowSelectAll && e.multiple ? (n(), d("label", {
271
282
  key: 0,
272
- class: r(["bb-table-check__label", {
283
+ class: p(["bb-table-check__label", {
273
284
  "bb-table-check__label--disabled": e.disabled
274
285
  }])
275
286
  }, [
276
- (n(), Q(Z, {
277
- key: U.value.toString(),
278
- modelValue: i(h),
279
- "onUpdate:modelValue": s[0] || (s[0] = (l) => ke(h) ? h.value = l : h = l),
287
+ (n(), Y(ee, {
288
+ key: G.value.toString(),
289
+ modelValue: b(k),
290
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => ke(k) ? k.value = l : k = l),
280
291
  class: "bb-table-check",
281
292
  disabled: e.disabled,
282
- indeterminate: U.value,
293
+ indeterminate: G.value,
283
294
  name: `select_all_${e.name || ""}`,
284
295
  readonly: e.readonly
285
296
  }, null, 8, ["modelValue", "disabled", "indeterminate", "name", "readonly"])),
286
- o("span", Re, u(e.selectAllLabel), 1)
287
- ], 2)) : e.multiple ? g("", !0) : (n(), d("span", ze, u(i(O)), 1))
297
+ o("span", Me, m(e.selectAllLabel || b(g)("table.selectAllLabel").value), 1)
298
+ ], 2)) : e.multiple ? _("", !0) : (n(), d("span", Pe, m(e.selectText || b(g)("table.selectText").value), 1))
288
299
  ])
289
300
  ])
290
- ], 2)) : g("", !0),
291
- (n(!0), d(V, null, B(be.value, (l) => (n(), d("th", {
301
+ ], 2)) : _("", !0),
302
+ (n(!0), d(I, null, T(re.value, (l) => (n(), d("th", {
292
303
  key: l.key,
293
- class: r(["bb-table-header", l.classes]),
304
+ class: p(["bb-table-header", l.classes]),
294
305
  scope: "col"
295
306
  }, [
296
- p(e.$slots, l.slotName, {
307
+ f(e.$slots, l.slotName, {
297
308
  classes: l.classes,
298
309
  item: void 0,
299
- items: i(A),
310
+ items: b(D),
300
311
  label: l.label
301
312
  }, () => [
302
- o("span", Me, u(l.label), 1)
313
+ o("span", Oe, m(l.label), 1)
303
314
  ])
304
315
  ], 2))), 128)),
305
316
  e.actions ? (n(), d("th", {
306
317
  key: 1,
307
- class: r(["bb-table-header bb-table-header--actions", e.thClass]),
318
+ class: p(["bb-table-header bb-table-header--actions", e.thClass]),
308
319
  scope: "col"
309
320
  }, [
310
- p(e.$slots, "header:actions", { text: e.actionsText }, () => [
311
- o("span", Oe, u(e.actionsText), 1)
321
+ f(e.$slots, "header:actions", { text: e.actionsText }, () => [
322
+ o("span", je, m(e.actionsText), 1)
312
323
  ])
313
- ], 2)) : g("", !0)
314
- ])
324
+ ], 2)) : _("", !0)
325
+ ], 8, De)
315
326
  ])
316
327
  ]),
317
328
  o("tbody", null, [
318
- j.value ? p(e.$slots, "loading", {
329
+ q.value ? f(e.$slots, "loading", {
319
330
  key: 0,
320
- items: i(A)
331
+ items: b(D)
321
332
  }, () => [
322
- o("tr", je, [
333
+ o("tr", {
334
+ "aria-rowindex": C.value ? 2 : void 0,
335
+ class: "bb-table-loading__row"
336
+ }, [
323
337
  o("td", {
324
338
  class: "bb-table-loading__cell",
325
- colspan: q.value
339
+ colspan: z.value
326
340
  }, [
327
- o("span", Ee, u(i(ae)), 1),
341
+ o("span", ze, m(e.loadingText), 1),
328
342
  o("div", Fe, [
329
- (n(!0), d(V, null, B(pe.value, (l) => (n(), d("div", {
343
+ (n(!0), d(I, null, T(pe.value, (l) => (n(), d("div", {
330
344
  key: l,
331
345
  class: "bb-table-skeleton-item"
332
346
  }, s[1] || (s[1] = [
@@ -340,10 +354,11 @@ const Le = {
340
354
  ])))), 128))
341
355
  ])
342
356
  ], 8, qe)
343
- ])
344
- ]) : i($).length ? p(e.$slots, "tbody", { key: 2 }, () => [
345
- (n(!0), d(V, null, B(H.value, (l) => (n(), d("tr", {
357
+ ], 8, Ee)
358
+ ]) : b(x).length ? f(e.$slots, "tbody", { key: 2 }, () => [
359
+ (n(!0), d(I, null, T(R.value, (l) => (n(), d("tr", {
346
360
  key: l.valueHash,
361
+ "aria-rowindex": l.rowIndex,
347
362
  class: "bb-table-data__row",
348
363
  onClick: l.onRowClick,
349
364
  onContextmenu: l.onRowContextMenu,
@@ -351,96 +366,99 @@ const Le = {
351
366
  }, [
352
367
  e.selectable ? (n(), d("td", {
353
368
  key: 0,
354
- class: r(["bb-table-data__cell bb-table-data__cell--select", e.tdClass])
369
+ class: p(["bb-table-data__cell bb-table-data__cell--select", e.tdClass])
355
370
  }, [
356
- p(e.$slots, "select", {
357
- checked: L(l),
371
+ f(e.$slots, "select", {
372
+ checked: M(l),
358
373
  disabled: !!l.disabled,
359
- inputName: i(M),
374
+ inputName: b(E),
360
375
  item: l.item,
361
376
  readonly: !!e.readonly,
362
377
  value: l.value
363
378
  }, () => [
364
379
  e.multiple ? (n(), d("label", {
365
380
  key: 0,
366
- class: r(["bb-table-check__label", {
381
+ class: p(["bb-table-check__label", {
367
382
  "bb-table-check__label--disabled": l.disabled
368
383
  }])
369
384
  }, [
370
- X(Z, {
371
- checked: L(l),
385
+ Z(ee, {
386
+ checked: M(l),
372
387
  class: "bb-table-check",
373
388
  disabled: l.disabled,
374
389
  readonly: e.readonly,
375
- onChange: () => W(l)
390
+ onChange: () => J(l)
376
391
  }, null, 8, ["checked", "disabled", "readonly", "onChange"]),
377
- o("span", Je, u(l.accessibleLabel), 1)
392
+ o("span", Ke, m(l.accessibleLabel), 1)
378
393
  ], 2)) : (n(), d("label", {
379
394
  key: 1,
380
- class: r(["bb-table-radio__label", {
395
+ class: p(["bb-table-radio__label", {
381
396
  "bb-table-radio__label--disabled": l.disabled
382
397
  }])
383
398
  }, [
384
- X($e, {
399
+ Z(Te, {
385
400
  checked: l.selected,
386
401
  class: "bb-table-radio",
387
402
  disabled: l.disabled,
388
- name: i(M),
403
+ name: b(E),
389
404
  readonly: e.readonly,
390
405
  value: l.value,
391
- onChange: () => W(l)
406
+ onChange: () => J(l)
392
407
  }, null, 8, ["checked", "disabled", "name", "readonly", "value", "onChange"]),
393
- o("span", Ke, u(l.accessibleLabel), 1)
408
+ o("span", Qe, m(l.accessibleLabel), 1)
394
409
  ], 2))
395
410
  ])
396
- ], 2)) : g("", !0),
397
- (n(!0), d(V, null, B(l.cols, (f) => (n(), d("td", {
398
- key: f.key,
399
- class: r(["bb-table-data__cell", f.classes])
411
+ ], 2)) : _("", !0),
412
+ (n(!0), d(I, null, T(l.cols, (u) => (n(), d("td", {
413
+ key: u.key,
414
+ class: p(["bb-table-data__cell", u.classes])
400
415
  }, [
401
- p(e.$slots, f.slotName, {
402
- classes: f.classes,
403
- content: f.content,
416
+ f(e.$slots, u.slotName, {
417
+ classes: u.classes,
418
+ content: u.content,
404
419
  item: l.item,
405
420
  value: l.value
406
421
  }, () => [
407
- _e(u(f.content), 1)
422
+ _e(m(u.content), 1)
408
423
  ])
409
424
  ], 2))), 128)),
410
425
  e.actions ? (n(), d("td", {
411
426
  key: 1,
412
- class: r(["bb-table__cell bb-table__cell--actions", e.tdClass])
427
+ class: p(["bb-table__cell bb-table__cell--actions", e.tdClass])
413
428
  }, [
414
- p(e.$slots, "actions", {
429
+ f(e.$slots, "actions", {
415
430
  item: l.item,
416
431
  value: l.value
417
432
  })
418
- ], 2)) : g("", !0)
419
- ], 40, Ge))), 128))
420
- ]) : p(e.$slots, "no-data", { key: 1 }, () => [
421
- o("tr", Pe, [
433
+ ], 2)) : _("", !0)
434
+ ], 40, Je))), 128))
435
+ ]) : f(e.$slots, "no-data", { key: 1 }, () => [
436
+ o("tr", {
437
+ "aria-rowindex": C.value ? 2 : void 0,
438
+ class: "bb-table-no-data__row"
439
+ }, [
422
440
  o("td", {
423
441
  class: "bb-table-no-data__cell",
424
- colspan: q.value
442
+ colspan: z.value
425
443
  }, [
426
- o("span", We, u(i(se)), 1)
427
- ], 8, Ue)
428
- ])
444
+ o("span", Ge, m(e.noDataText || b(g)("table.noDataText").value), 1)
445
+ ], 8, We)
446
+ ], 8, Ue)
429
447
  ])
430
448
  ]),
431
449
  o("tfoot", null, [
432
- p(e.$slots, "tfoot")
450
+ f(e.$slots, "tfoot")
433
451
  ])
434
452
  ]),
435
- (n(!0), d(V, null, B(ue.value, (l) => (n(), d("input", ge({
453
+ (n(!0), d(I, null, T(ue.value, (l) => (n(), d("input", ge({
436
454
  key: l.value,
437
455
  ref_for: !0
438
456
  }, l), null, 16))), 128))
439
457
  ]),
440
458
  _: 3
441
- }, 8, ["class"]));
459
+ }, 8, ["aria-rowcount", "class"]));
442
460
  }
443
461
  });
444
462
  export {
445
- pl as default
463
+ fl as default
446
464
  };