bitboss-ui 2.0.106 → 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 (164) hide show
  1. package/dist/components/BbRows/BbRows.vue.d.ts +1 -0
  2. package/dist/components/BbTable/types.d.ts +13 -0
  3. package/dist/index100.js +46 -45
  4. package/dist/index111.js +224 -207
  5. package/dist/index119.js +2 -2
  6. package/dist/index121.js +6 -6
  7. package/dist/index123.js +1 -1
  8. package/dist/index125.js +1 -1
  9. package/dist/index127.js +1 -1
  10. package/dist/index128.js +1 -1
  11. package/dist/index129.js +1 -1
  12. package/dist/index13.js +2 -2
  13. package/dist/index131.js +1 -1
  14. package/dist/index132.js +2 -2
  15. package/dist/index133.js +2 -2
  16. package/dist/index15.js +5 -5
  17. package/dist/index17.js +3 -3
  18. package/dist/index19.js +8 -8
  19. package/dist/index205.js +115 -2
  20. package/dist/index206.js +2 -86
  21. package/dist/index207.js +10 -0
  22. package/dist/index208.js +3 -25
  23. package/dist/index209.js +53 -17
  24. package/dist/index21.js +16 -16
  25. package/dist/index211.js +13 -15
  26. package/dist/index212.js +3 -3
  27. package/dist/index213.js +40 -11
  28. package/dist/index214.js +6 -16
  29. package/dist/index215.js +7 -2
  30. package/dist/index216.js +12 -4
  31. package/dist/index217.js +13 -2
  32. package/dist/index218.js +2 -8
  33. package/dist/index219.js +4 -3
  34. package/dist/index220.js +2 -41
  35. package/dist/index221.js +3 -6
  36. package/dist/index222.js +20 -7
  37. package/dist/index223.js +4 -12
  38. package/dist/index224.js +281 -13
  39. package/dist/index225.js +15 -52
  40. package/dist/index226.js +18 -0
  41. package/dist/index227.js +19 -13
  42. package/dist/index228.js +15 -5
  43. package/dist/index229.js +16 -13
  44. package/dist/index23.js +18 -18
  45. package/dist/index230.js +24 -13
  46. package/dist/index231.js +2 -19
  47. package/dist/index232.js +250 -15
  48. package/dist/index233.js +51 -18
  49. package/dist/index234.js +44 -27
  50. package/dist/index235.js +5 -2
  51. package/dist/index236.js +53 -243
  52. package/dist/index237.js +123 -49
  53. package/dist/index238.js +125 -44
  54. package/dist/index239.js +2 -5
  55. package/dist/index240.js +5 -60
  56. package/dist/index241.js +366 -17
  57. package/dist/index242.js +86 -4
  58. package/dist/index244.js +23 -123
  59. package/dist/index245.js +17 -2
  60. package/dist/index246.js +48 -5
  61. package/dist/index247.js +12 -366
  62. package/dist/index248.js +10 -113
  63. package/dist/index249.js +16 -3
  64. package/dist/index25.js +7 -7
  65. package/dist/index250.js +1 -1
  66. package/dist/index251.js +1 -1
  67. package/dist/index252.js +2 -2
  68. package/dist/index254.js +2 -2
  69. package/dist/index257.js +2 -2
  70. package/dist/index258.js +2 -2
  71. package/dist/index261.js +9 -3
  72. package/dist/index262.js +23 -17
  73. package/dist/index263.js +87 -7
  74. package/dist/index265.js +6 -4
  75. package/dist/index266.js +15 -430
  76. package/dist/index267.js +9 -2
  77. package/dist/index268.js +9 -89
  78. package/dist/index269.js +8 -7
  79. package/dist/index27.js +1 -1
  80. package/dist/index270.js +27 -10
  81. package/dist/index271.js +1 -1
  82. package/dist/index274.js +420 -189
  83. package/dist/index275.js +2 -281
  84. package/dist/index276.js +88 -5
  85. package/dist/index277.js +7 -2
  86. package/dist/index278.js +11 -2
  87. package/dist/index279.js +4 -2
  88. package/dist/index280.js +224 -2
  89. package/dist/index281.js +200 -2
  90. package/dist/index282.js +176 -2
  91. package/dist/index283.js +6 -2
  92. package/dist/index284.js +2 -2
  93. package/dist/index285.js +2 -2
  94. package/dist/index286.js +2 -2
  95. package/dist/index287.js +2 -2
  96. package/dist/index288.js +2 -22
  97. package/dist/index29.js +3 -3
  98. package/dist/index290.js +2 -9
  99. package/dist/index291.js +2 -23
  100. package/dist/index292.js +2 -89
  101. package/dist/index293.js +4 -0
  102. package/dist/index294.js +2 -176
  103. package/dist/index295.js +22 -2
  104. package/dist/index297.js +2 -22
  105. package/dist/index299.js +22 -9
  106. package/dist/index301.js +3 -16
  107. package/dist/index302.js +17 -8
  108. package/dist/index303.js +431 -219
  109. package/dist/index304.js +113 -422
  110. package/dist/index305.js +3 -127
  111. package/dist/index306.js +1 -1
  112. package/dist/index307.js +214 -3
  113. package/dist/index308.js +3 -214
  114. package/dist/index309.js +3 -67
  115. package/dist/index31.js +2 -2
  116. package/dist/index310.js +3 -2
  117. package/dist/index311.js +58 -5
  118. package/dist/index312.js +2 -5
  119. package/dist/index313.js +67 -8
  120. package/dist/index314.js +5 -7
  121. package/dist/index315.js +32 -18
  122. package/dist/index316.js +7 -53
  123. package/dist/index317.js +18 -52
  124. package/dist/index318.js +53 -7
  125. package/dist/index319.js +52 -32
  126. package/dist/index320.js +46 -3
  127. package/dist/index321.js +7 -3
  128. package/dist/index322.js +5 -3
  129. package/dist/index323.js +8 -3
  130. package/dist/index324.js +471 -49
  131. package/dist/index325.js +3 -46
  132. package/dist/index326.js +1 -1
  133. package/dist/index328.js +426 -0
  134. package/dist/index329.js +43 -420
  135. package/dist/index33.js +8 -8
  136. package/dist/index330.js +2 -47
  137. package/dist/index35.js +4 -4
  138. package/dist/index37.js +16 -16
  139. package/dist/index39.js +5 -5
  140. package/dist/index41.js +2 -2
  141. package/dist/index43.js +8 -8
  142. package/dist/index45.js +5 -5
  143. package/dist/index47.js +2 -2
  144. package/dist/index49.js +2 -2
  145. package/dist/index53.js +1 -1
  146. package/dist/index55.js +1 -1
  147. package/dist/index57.js +2 -2
  148. package/dist/index61.js +1 -1
  149. package/dist/index75.js +3 -3
  150. package/dist/index77.js +1 -1
  151. package/dist/index79.js +2 -2
  152. package/dist/index81.js +1 -1
  153. package/dist/index84.js +4 -4
  154. package/dist/index86.js +2 -2
  155. package/dist/index88.js +5 -5
  156. package/dist/index90.js +1 -1
  157. package/package.json +1 -1
  158. package/dist/index210.js +0 -50
  159. package/dist/index243.js +0 -128
  160. package/dist/index264.js +0 -30
  161. package/dist/index300.js +0 -8
  162. package/dist/index327.js +0 -482
  163. /package/dist/{index331.js → index289.js} +0 -0
  164. /package/dist/{index296.js → index298.js} +0 -0
@@ -70,6 +70,7 @@ declare function __VLS_template(): {
70
70
  checked: boolean | undefined;
71
71
  columns: Record<string, ItemColumn>;
72
72
  disabled: boolean | undefined;
73
+ index: number;
73
74
  item: any;
74
75
  select: () => void;
75
76
  unselect: () => void;
@@ -150,6 +150,14 @@ export type BbTableProps = {
150
150
  * String displayed when there are no items to display.
151
151
  */
152
152
  noDataText?: string;
153
+ /**
154
+ * Current page number starting from 1
155
+ */
156
+ page?: number;
157
+ /**
158
+ * Number of items per page.
159
+ */
160
+ perPage?: number;
153
161
  /**
154
162
  * Sets the input in a readonly state.
155
163
  */
@@ -176,6 +184,10 @@ export type BbTableProps = {
176
184
  * Defines the classes to be passed to the `<th>`.
177
185
  */
178
186
  thClass?: Classes;
187
+ /**
188
+ * Total number of items there is.
189
+ */
190
+ totalItems?: number;
179
191
  };
180
192
  /**
181
193
  * We allow table data classes to be a function so it can depend on the item
@@ -191,6 +203,7 @@ export type MappedItem = Option & {
191
203
  onRowClick: (event: MouseEvent) => void;
192
204
  onRowContextMenu: (event: MouseEvent) => void;
193
205
  onRowDblClick: (event: MouseEvent) => void;
206
+ rowIndex: number | undefined;
194
207
  };
195
208
  /**
196
209
  * Projection that represnets a header
package/dist/index100.js CHANGED
@@ -1,16 +1,16 @@
1
- import { defineComponent as L, mergeModels as V, computed as b, toRef as m, reactive as P, useModel as I, watch as R, openBlock as B, createElementBlock as g, Fragment as k, renderSlot as r, unref as j, createCommentVNode as E, renderList as G } from "vue";
2
- import { useItemValue as U } from "./index263.js";
3
- import { isNil as x } from "./index258.js";
4
- import { indexBy as W } from "./index302.js";
5
- import { hash as H } from "./index212.js";
6
- import { useItemsGetter as q } from "./index208.js";
7
- import { usePrefill as z } from "./index214.js";
8
- import { useIndexById as J } from "./index209.js";
9
- import { useBaseOptions as K } from "./index210.js";
10
- import { useHashedWatcher as Q } from "./index213.js";
11
- const ne = /* @__PURE__ */ L({
1
+ import { defineComponent as P, mergeModels as b, computed as I, toRef as m, reactive as R, useModel as B, watch as j, openBlock as g, createElementBlock as k, Fragment as x, renderSlot as r, unref as E, createCommentVNode as G, renderList as U } from "vue";
2
+ import { useItemValue as W } from "./index268.js";
3
+ import { isNil as H } from "./index257.js";
4
+ import { indexBy as q } from "./index269.js";
5
+ import { hash as w } from "./index208.js";
6
+ import { useItemsGetter as z } from "./index244.js";
7
+ import { usePrefill as J } from "./index249.js";
8
+ import { useIndexById as K } from "./index245.js";
9
+ import { useBaseOptions as Q } from "./index246.js";
10
+ import { useHashedWatcher as X } from "./index248.js";
11
+ const ne = /* @__PURE__ */ P({
12
12
  __name: "BbRows",
13
- props: /* @__PURE__ */ V({
13
+ props: /* @__PURE__ */ b({
14
14
  columns: { default: () => [] },
15
15
  dependencies: { default: () => [] },
16
16
  depsDebounceTime: { default: 0 },
@@ -30,24 +30,24 @@ const ne = /* @__PURE__ */ L({
30
30
  "select-all": { type: Boolean, default: !1 },
31
31
  "select-allModifiers": {}
32
32
  }),
33
- emits: /* @__PURE__ */ V(["update:modelValue"], ["update:unselected-items", "update:select-all"]),
34
- setup(d, { emit: w }) {
35
- const l = d, u = w, { getItemValue: M } = U(), p = b(() => !!(l.loading || O.value)), {
33
+ emits: /* @__PURE__ */ b(["update:modelValue"], ["update:unselected-items", "update:select-all"]),
34
+ setup(d, { emit: M }) {
35
+ const l = d, u = M, { getItemValue: O } = W(), p = I(() => !!(l.loading || S.value)), {
36
36
  getter: f,
37
37
  items: v,
38
- loading: O
39
- } = q({
38
+ loading: S
39
+ } = z({
40
40
  items: m(l, "items")
41
- }), { hasPrefilled: S } = z({
41
+ }), { hasPrefilled: F } = J({
42
42
  onStart: !0,
43
43
  currentValue: l.modelValue,
44
44
  multiple: l.multiple,
45
45
  fn: async ({ prefill: e }) => {
46
46
  await f(e, l.modelValue);
47
47
  }
48
- }), { data: y } = J({
48
+ }), { data: y } = K({
49
49
  items: m(l, "modelValue")
50
- }), { options: F } = K({
50
+ }), { options: N } = Q({
51
51
  disabled: m(l, "disabled"),
52
52
  items: v,
53
53
  itemText: void 0,
@@ -55,36 +55,36 @@ const ne = /* @__PURE__ */ L({
55
55
  max: l.max,
56
56
  selectable: !0,
57
57
  selectedIndexedByHash: y
58
- }), N = async (e) => {
58
+ }), T = async (e) => {
59
59
  l.multiple ? u("update:modelValue", l.modelValue.concat(e.value)) : u("update:modelValue", e.value);
60
- }, T = async (e) => {
60
+ }, $ = async (e) => {
61
61
  if (l.multiple) {
62
62
  const t = { ...y.value };
63
63
  delete t[e.valueHash], u("update:modelValue", Object.values(t));
64
64
  } else
65
65
  u("update:modelValue", null);
66
66
  };
67
- Q(
67
+ X(
68
68
  () => [l.dependencies, l.items],
69
69
  async () => {
70
- S.value && await f(!1, l.modelValue);
70
+ F.value && await f(!1, l.modelValue);
71
71
  },
72
72
  {
73
73
  debounce: l.depsDebounceTime
74
74
  }
75
75
  );
76
- const h = b(() => F.value.map((e) => {
76
+ const h = I(() => N.value.map((e) => {
77
77
  let t = !l.selectable;
78
78
  return typeof l.selectable == "function" && (t = !l.selectable(e.item)), t = t || !!e.disabled, {
79
- columns: W(
79
+ columns: q(
80
80
  l.columns.map((a) => {
81
- const { label: C, key: D } = a;
82
- let o = M(e.item, a.key);
81
+ const { label: D, key: L } = a;
82
+ let o = O(e.item, a.key);
83
83
  return a.formatter && // By default the formatter runs anyway
84
- (!x(o) || a.formatOnNull !== !1) && (o = a.formatter(o, a.key, e.item)), a.placeholder && x(o) && (o = a.placeholder), {
84
+ (!H(o) || a.formatOnNull !== !1) && (o = a.formatter(o, a.key, e.item)), a.placeholder && H(o) && (o = a.placeholder), {
85
85
  value: o,
86
- key: D,
87
- label: C
86
+ key: L,
87
+ label: D
88
88
  };
89
89
  }),
90
90
  (a) => a.key
@@ -96,29 +96,30 @@ const ne = /* @__PURE__ */ L({
96
96
  selected: !!(e.selected || i.value),
97
97
  disabled: t
98
98
  };
99
- })), $ = (e) => {
100
- i.value || N(e), c.delete(e.valueHash), n.value = n.value.filter(
101
- (t) => H(t) !== H(e.item)
99
+ })), A = (e) => {
100
+ i.value || T(e), c.delete(e.valueHash), n.value = n.value.filter(
101
+ (t) => w(t) !== w(e.item)
102
102
  );
103
- }, A = (e) => {
104
- c.add(e.valueHash), n.value.push(e.item), T(e);
105
- }, c = P(/* @__PURE__ */ new Set()), n = I(d, "unselected-items");
106
- let i = I(d, "select-all");
107
- return R(i, () => {
103
+ }, C = (e) => {
104
+ c.add(e.valueHash), n.value.push(e.item), $(e);
105
+ }, c = R(/* @__PURE__ */ new Set()), n = B(d, "unselected-items");
106
+ let i = B(d, "select-all");
107
+ return j(i, () => {
108
108
  c.clear(), n.value = [], u("update:modelValue", []);
109
- }), (e, t) => (B(), g(k, null, [
109
+ }), (e, t) => (g(), k(x, null, [
110
110
  p.value ? r(e.$slots, "loading", {
111
111
  key: 0,
112
- items: j(v)
113
- }) : E("", !0),
114
- h.value.length ? (B(!0), g(k, { key: 2 }, G(h.value, (s) => r(e.$slots, "default", {
112
+ items: E(v)
113
+ }) : G("", !0),
114
+ h.value.length ? (g(!0), k(x, { key: 2 }, U(h.value, (s, V) => r(e.$slots, "default", {
115
115
  key: s.valueHash,
116
116
  checked: s.selected,
117
117
  columns: s.columns,
118
118
  disabled: s.disabled,
119
+ index: V,
119
120
  item: s.item,
120
- select: () => $(s),
121
- unselect: () => A(s),
121
+ select: () => A(s),
122
+ unselect: () => C(s),
122
123
  value: s.value
123
124
  })), 128)) : r(e.$slots, "no-data", {
124
125
  key: 1,