bitboss-ui 2.0.53 → 2.0.54

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 (150) hide show
  1. package/dist/index108.js +1 -1
  2. package/dist/index110.js +5 -5
  3. package/dist/index118.js +1 -1
  4. package/dist/index120.js +5 -5
  5. package/dist/index126.js +1 -1
  6. package/dist/index127.js +1 -1
  7. package/dist/index128.js +1 -1
  8. package/dist/index13.js +1 -1
  9. package/dist/index130.js +1 -1
  10. package/dist/index132.js +2 -2
  11. package/dist/index133.js +2 -2
  12. package/dist/index15.js +4 -4
  13. package/dist/index17.js +3 -3
  14. package/dist/index19.js +2 -2
  15. package/dist/index204.js +2 -116
  16. package/dist/index205.js +8 -2
  17. package/dist/index206.js +3 -53
  18. package/dist/index207.js +43 -0
  19. package/dist/index208.js +6 -13
  20. package/dist/index209.js +7 -20
  21. package/dist/index21.js +14 -14
  22. package/dist/index210.js +2 -4
  23. package/dist/index211.js +4 -8
  24. package/dist/index212.js +2 -162
  25. package/dist/index213.js +47 -78
  26. package/dist/index215.js +13 -3
  27. package/dist/index216.js +20 -2
  28. package/dist/index217.js +4 -4
  29. package/dist/index218.js +126 -2
  30. package/dist/index219.js +5 -3
  31. package/dist/index220.js +124 -40
  32. package/dist/index221.js +19 -6
  33. package/dist/index222.js +16 -7
  34. package/dist/index223.js +14 -279
  35. package/dist/index224.js +2 -16
  36. package/dist/index225.js +2 -16
  37. package/dist/index226.js +5 -19
  38. package/dist/index227.js +367 -17
  39. package/dist/index228.js +3 -27
  40. package/dist/index229.js +19 -3
  41. package/dist/index23.js +15 -15
  42. package/dist/index230.js +27 -2
  43. package/dist/index231.js +3 -249
  44. package/dist/index232.js +239 -42
  45. package/dist/index233.js +43 -35
  46. package/dist/index234.js +44 -5
  47. package/dist/index235.js +5 -49
  48. package/dist/index236.js +48 -125
  49. package/dist/index237.js +115 -124
  50. package/dist/index238.js +162 -2
  51. package/dist/index239.js +84 -5
  52. package/dist/index241.js +1 -1
  53. package/dist/index243.js +1 -1
  54. package/dist/index245.js +1 -1
  55. package/dist/index247.js +2 -10
  56. package/dist/index248.js +9 -2
  57. package/dist/index249.js +3 -2
  58. package/dist/index25.js +5 -5
  59. package/dist/index250.js +431 -3
  60. package/dist/index251.js +91 -0
  61. package/dist/index252.js +3 -6
  62. package/dist/index253.js +3 -176
  63. package/dist/index255.js +6 -11
  64. package/dist/index256.js +174 -7
  65. package/dist/index257.js +199 -8
  66. package/dist/index258.js +281 -17
  67. package/dist/index259.js +5 -3
  68. package/dist/index260.js +2 -224
  69. package/dist/index261.js +2 -3
  70. package/dist/index262.js +2 -9
  71. package/dist/index263.js +2 -23
  72. package/dist/index264.js +2 -6
  73. package/dist/index265.js +124 -14
  74. package/dist/index266.js +22 -4
  75. package/dist/index268.js +6 -89
  76. package/dist/index269.js +16 -6
  77. package/dist/index27.js +1 -1
  78. package/dist/index270.js +3 -2
  79. package/dist/index271.js +9 -2
  80. package/dist/index272.js +23 -2
  81. package/dist/index273.js +9 -2
  82. package/dist/index274.js +224 -2
  83. package/dist/index275.js +436 -2
  84. package/dist/index276.js +127 -2
  85. package/dist/index277.js +2 -2
  86. package/dist/index278.js +2 -2
  87. package/dist/index279.js +1 -1
  88. package/dist/index280.js +2 -28
  89. package/dist/index281.js +1 -21
  90. package/dist/index282.js +4 -0
  91. package/dist/index283.js +25 -197
  92. package/dist/index284.js +22 -9
  93. package/dist/index286.js +3 -126
  94. package/dist/index287.js +12 -22
  95. package/dist/index288.js +11 -0
  96. package/dist/index289.js +9 -436
  97. package/dist/index29.js +3 -3
  98. package/dist/index290.js +16 -126
  99. package/dist/index291.js +4 -3
  100. package/dist/index292.js +1 -1
  101. package/dist/index293.js +3 -211
  102. package/dist/index294.js +211 -2
  103. package/dist/index295.js +2 -66
  104. package/dist/index297.js +66 -5
  105. package/dist/index298.js +32 -7
  106. package/dist/index299.js +4 -32
  107. package/dist/index300.js +7 -3
  108. package/dist/index301.js +4 -79
  109. package/dist/index302.js +6 -0
  110. package/dist/index303.js +58 -10
  111. package/dist/index304.js +4 -4
  112. package/dist/index305.js +79 -4
  113. package/dist/index307.js +6 -46
  114. package/dist/index308.js +17 -5
  115. package/dist/index309.js +6 -6
  116. package/dist/index31.js +2 -2
  117. package/dist/index310.js +45 -17
  118. package/dist/index311.js +11 -2
  119. package/dist/index312.js +4 -0
  120. package/dist/index314.js +470 -414
  121. package/dist/index315.js +420 -43
  122. package/dist/index316.js +47 -2
  123. package/dist/index317.js +4 -0
  124. package/dist/index33.js +2 -2
  125. package/dist/index35.js +3 -3
  126. package/dist/index37.js +9 -9
  127. package/dist/index39.js +4 -4
  128. package/dist/index41.js +2 -2
  129. package/dist/index43.js +2 -2
  130. package/dist/index45.js +4 -4
  131. package/dist/index47.js +2 -2
  132. package/dist/index49.js +2 -2
  133. package/dist/index55.js +1 -1
  134. package/dist/index57.js +1 -1
  135. package/dist/index61.js +2 -2
  136. package/dist/index75.js +3 -3
  137. package/dist/index79.js +2 -2
  138. package/dist/index81.js +1 -1
  139. package/dist/index84.js +2 -2
  140. package/dist/index86.js +1 -1
  141. package/dist/index88.js +3 -3
  142. package/dist/index90.js +1 -1
  143. package/dist/style.css +1 -1
  144. package/package.json +1 -1
  145. package/dist/index240.js +0 -371
  146. package/dist/index254.js +0 -5
  147. package/dist/index267.js +0 -433
  148. package/dist/index285.js +0 -4
  149. package/dist/index306.js +0 -61
  150. package/dist/index313.js +0 -482
package/dist/index238.js CHANGED
@@ -1,4 +1,164 @@
1
- const e = (t) => t;
1
+ import { ref as s, computed as a, onBeforeMount as $, onBeforeUnmount as ee, watch as b, nextTick as Q } from "vue";
2
+ import { last as te } from "./index225.js";
3
+ import { useArray as E } from "./index287.js";
4
+ import { uniqBy as le } from "./index288.js";
5
+ import { useItemValue as ne } from "./index289.js";
6
+ import { useItemText as oe } from "./index290.js";
7
+ import { hash as d } from "./index231.js";
8
+ import { isNotNil as F } from "./index134.js";
9
+ import { waitFor as ue } from "./index208.js";
10
+ import { isNil as ie } from "./index129.js";
11
+ import { pipe as H } from "./index291.js";
12
+ const ge = (t) => {
13
+ const r = s(""), k = s(), u = (e) => {
14
+ k.value = e, t.emit("update:modelValue", e);
15
+ }, v = s([]), {
16
+ array: P,
17
+ add: j,
18
+ remove: J,
19
+ set: y
20
+ } = E(), {
21
+ array: O,
22
+ add: L,
23
+ remove: U
24
+ } = E(), { getItemText: z } = oe(), { getItemValue: G } = ne();
25
+ if (t.max && t.max < 1)
26
+ throw new Error("Invalid value for `max` property");
27
+ const B = (e) => {
28
+ const l = !!(t.disabled.value || e.disabled), n = z(e, t.itemText), o = G(e, t.itemValue);
29
+ if (o === void 0)
30
+ throw new Error(
31
+ 'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(e) + " please check itemValue property is correct."
32
+ );
33
+ const _ = d(o);
34
+ return {
35
+ item: e,
36
+ text: n,
37
+ value: o,
38
+ valueHash: _,
39
+ disabled: l,
40
+ selected: !1
41
+ };
42
+ }, T = (e) => (e.selected = F(q.value[e.valueHash]), e), K = t.max || 1 / 0, V = (e) => (e.disabled = e.disabled || t.multiple && t.modelValue.value.length >= K && !e.selected, e), g = a(() => {
43
+ const e = [].concat(
44
+ v.value.map(H(B, T, V)),
45
+ O.value.map(H(T, V)),
46
+ P.value.map(H(T, V))
47
+ );
48
+ return le(e, (n) => n.valueHash);
49
+ }), R = (e) => {
50
+ t.multiple ? (u(t.modelValue.value.concat(e.value)), t.stash && j(e), t.resetQueryOnOptionSelected && i()) : (t.stash && y(e), u(e.value), Q(() => i()));
51
+ }, W = async (e) => {
52
+ if (U((l) => l.valueHash !== e.valueHash), J((l) => l.valueHash !== e.valueHash), t.multiple) {
53
+ const l = { ...q.value };
54
+ delete l[e.valueHash], u(Object.values(l));
55
+ } else
56
+ u(null), await Q(), i();
57
+ }, q = a(() => {
58
+ const e = {}, l = [].concat(t.modelValue.value);
59
+ for (let n = 0; n < l.length; n++) {
60
+ const o = l[n];
61
+ e[d(o)] = o;
62
+ }
63
+ return e;
64
+ }), x = async ({ prefill: e = !1 }) => {
65
+ let l = [];
66
+ if (Array.isArray(t.items.value))
67
+ l = t.items.value;
68
+ else if (typeof t.items.value == "function") {
69
+ const n = ++c.value;
70
+ try {
71
+ l = await t.items.value(
72
+ r.value,
73
+ e,
74
+ t.modelValue.value
75
+ ), n < c.value && (await ue(() => n === c.value), l = v.value);
76
+ } catch (o) {
77
+ console.error(o);
78
+ }
79
+ c.value--;
80
+ }
81
+ v.value = l;
82
+ }, C = a(() => {
83
+ const e = {};
84
+ for (let l = 0; l < g.value.length; l++) {
85
+ const n = g.value[l], { valueHash: o } = n;
86
+ e[o] = n;
87
+ }
88
+ return {
89
+ get: (l) => e[d(l)]
90
+ };
91
+ }), f = a(() => [].concat(t.modelValue.value).reduce((e, l) => {
92
+ const n = C.value.get(l);
93
+ return n && e.push(n), e;
94
+ }, [])), M = (e) => F(C.value.get(e)), i = () => {
95
+ if (t.multiple) {
96
+ r.value = "";
97
+ return;
98
+ }
99
+ let e;
100
+ f.value && (e = te(f.value)), r.value = (e == null ? void 0 : e.text) || "";
101
+ }, X = () => {
102
+ const e = r.value.trim(), l = B(e);
103
+ L(l), i();
104
+ }, c = s(0), A = a(() => [].concat(t.modelValue.value).reduce(
105
+ (e, l) => (M(l) ? e.coherent.push(l) : e.incoherent.push(l), e),
106
+ { coherent: [], incoherent: [] }
107
+ )), D = a(() => t.multiple && !t.modelValue.value.length || !t.multiple && ie(t.modelValue.value) ? !0 : !A.value.incoherent.length), Y = () => {
108
+ t.enforceCoherence && !D.value && (t.multiple ? u(A.value.coherent) : u(null));
109
+ }, I = s(!1), p = s(!1), m = async () => {
110
+ p.value = !0, await x({ prefill: !0 }), Y(), i(), I.value = !0, p.value = !1;
111
+ };
112
+ $(async () => {
113
+ t.prefill && (await m(), t.stash && y(...f.value));
114
+ });
115
+ let h;
116
+ const Z = () => {
117
+ h && clearTimeout(h), h = setTimeout(async () => {
118
+ try {
119
+ await x({ prefill: !1 });
120
+ } catch (e) {
121
+ console.error(e);
122
+ }
123
+ }, t.queryDebounceTime);
124
+ };
125
+ ee(() => clearTimeout(h));
126
+ let w;
127
+ b(
128
+ () => t.modelValue.value,
129
+ () => {
130
+ D.value || (w && clearTimeout(w), w = setTimeout(async () => {
131
+ m();
132
+ }, t.modelValueDebounceTime));
133
+ }
134
+ );
135
+ let S;
136
+ const N = async (e, l) => {
137
+ d(l) !== d(e) && I.value && (S && clearTimeout(S), S = setTimeout(async () => {
138
+ await m();
139
+ }, t.depsDebounceTime));
140
+ };
141
+ return b(() => t.items.value, N), b(() => t.dependencies.value, N), {
142
+ addCurrentQueryToManualItems: X,
143
+ alignQueryToState: i,
144
+ getOptions: x,
145
+ hasPrefilled: I,
146
+ innerLoading: c,
147
+ isPrefilling: p,
148
+ manualItems: O,
149
+ options: g,
150
+ prefillItems: m,
151
+ query: r,
152
+ searchByQuery: Z,
153
+ selectedOptions: f,
154
+ selectOption: R,
155
+ setStash: y,
156
+ unselectOption: W,
157
+ updateModelValue: u,
158
+ valueIsSelected: M,
159
+ internalItems: v
160
+ };
161
+ };
2
162
  export {
3
- e as identity
163
+ ge as useOptions
4
164
  };
package/dist/index239.js CHANGED
@@ -1,7 +1,86 @@
1
- import o from "./index287.js";
2
- /* empty css */
3
- import t from "./index252.js";
4
- const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cb4d6ef0"]]);
1
+ import { defineComponent as b, openBlock as t, createElementBlock as n, normalizeClass as r, createElementVNode as l, renderSlot as s, createTextVNode as o, toDisplayString as d, createCommentVNode as h, Fragment as c, renderList as m } from "vue";
2
+ const p = { class: "bb-cr-container__container" }, u = {
3
+ key: 0,
4
+ class: "bb-cr-container__loading-container"
5
+ }, g = {
6
+ key: 1,
7
+ class: "bb-cr-container__no-data-container"
8
+ }, f = /* @__PURE__ */ b({
9
+ __name: "OptionsContainer",
10
+ props: {
11
+ direction: {},
12
+ hasErrors: { type: Boolean },
13
+ hideLabel: { type: Boolean },
14
+ loadingText: {},
15
+ loading: { type: Boolean },
16
+ noDataText: {},
17
+ options: {}
18
+ },
19
+ setup(k) {
20
+ return (a, y) => (t(), n("span", {
21
+ ref: "container",
22
+ class: r(["bb-cr-container", {
23
+ "bb-cr-container--errors": a.hasErrors,
24
+ "bb-cr-container--horizontal": a.direction === "horizontal",
25
+ "bb-cr-container--vertical": a.direction === "vertical"
26
+ }])
27
+ }, [
28
+ l("span", p, [
29
+ s(a.$slots, "prepend"),
30
+ !a.options.length && a.loading ? (t(), n("span", u, [
31
+ s(a.$slots, "loading", {}, () => [
32
+ o(d(a.loadingText), 1)
33
+ ])
34
+ ])) : a.options.length ? h("", !0) : (t(), n("span", g, [
35
+ s(a.$slots, "no-data", {}, () => [
36
+ o(d(a.noDataText), 1)
37
+ ])
38
+ ])),
39
+ (t(!0), n(c, null, m(a.options, (e, i) => (t(), n(c, {
40
+ key: (e == null ? void 0 : e.valueHash) || i
41
+ }, [
42
+ s(a.$slots, "option:prepend", {
43
+ id: e.valueHash,
44
+ checked: !!e.selected,
45
+ disabled: !!e.disabled,
46
+ item: e.item,
47
+ text: e.text
48
+ }),
49
+ l("label", {
50
+ class: r(["bb-cr-container-option", { "bb-base-radio-selected": e.selected }])
51
+ }, [
52
+ s(a.$slots, "input", {
53
+ index: i,
54
+ option: e
55
+ }),
56
+ l("span", {
57
+ class: r({
58
+ "bb-cr-container-option__text": !0,
59
+ "sr-only": a.hideLabel
60
+ })
61
+ }, [
62
+ s(a.$slots, "label", {
63
+ checked: !!e.selected,
64
+ item: e.item,
65
+ text: e.text
66
+ }, () => [
67
+ o(d(e.text), 1)
68
+ ])
69
+ ], 2)
70
+ ], 2),
71
+ s(a.$slots, "option:append", {
72
+ id: e.valueHash,
73
+ checked: !!e.selected,
74
+ disabled: !!e.disabled,
75
+ item: e.item,
76
+ text: e.text
77
+ })
78
+ ], 64))), 128)),
79
+ s(a.$slots, "append")
80
+ ])
81
+ ], 2));
82
+ }
83
+ });
5
84
  export {
6
- e as default
85
+ f as default
7
86
  };
package/dist/index241.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index293.js";
1
+ import f from "./index294.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/dist/index243.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as y, ref as F, computed as H, watch as N, openBlock as p, createElementBlock as L, Fragment as S, renderList as V, createBlock as A, normalizeClass as O, withModifiers as P, withCtx as $, createTextVNode as z, toDisplayString as D } from "vue";
2
- import { hash as d } from "./index229.js";
2
+ import { hash as d } from "./index231.js";
3
3
  import { isNil as l } from "./index129.js";
4
4
  import E from "./index124.js";
5
5
  /* empty css */
package/dist/index245.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as F, ref as H, computed as L, watch as N, openBlock as d, createElementBlock as v, Fragment as S, renderList as A, normalizeClass as O, withModifiers as P, toDisplayString as V } from "vue";
2
- import { hash as f } from "./index229.js";
2
+ import { hash as f } from "./index231.js";
3
3
  import { isNil as i } from "./index129.js";
4
4
  const z = ["text", "onClick:clear"], j = /* @__PURE__ */ F({
5
5
  __name: "CommaBox",
package/dist/index247.js CHANGED
@@ -1,12 +1,4 @@
1
- const o = (t, r) => {
2
- const e = {};
3
- for (const c in t)
4
- if (Object.prototype.hasOwnProperty.call(t, c)) {
5
- const n = t[c];
6
- r(n, c, t) && (e[c] = n);
7
- }
8
- return e;
9
- };
1
+ const o = (e) => e[0];
10
2
  export {
11
- o as pickBy
3
+ o as head
12
4
  };
package/dist/index248.js CHANGED
@@ -1,5 +1,12 @@
1
- const o = () => {
1
+ const o = (t, r) => {
2
+ const e = {};
3
+ for (const c in t)
4
+ if (Object.prototype.hasOwnProperty.call(t, c)) {
5
+ const n = t[c];
6
+ r(n, c, t) && (e[c] = n);
7
+ }
8
+ return e;
2
9
  };
3
10
  export {
4
- o as noop
11
+ o as pickBy
5
12
  };
package/dist/index249.js CHANGED
@@ -1,4 +1,5 @@
1
- const o = (e) => e[0];
1
+ const o = () => {
2
+ };
2
3
  export {
3
- o as head
4
+ o as noop
4
5
  };
package/dist/index25.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as ae, ref as o, getCurrentInstance as se, computed as m, nextTick as N, useAttrs as ne, onMounted as ie, onBeforeUnmount as F, watch as re, openBlock as k, createBlock as ue, Teleport as de, createElementVNode as a, mergeProps as G, createElementBlock as T, renderSlot as u, createTextVNode as ce, toDisplayString as P, createCommentVNode as z } from "vue";
2
- import { throttle as ve } from "./index219.js";
3
- import { useFocusTrap as fe } from "./index220.js";
2
+ import { throttle as ve } from "./index206.js";
3
+ import { useFocusTrap as fe } from "./index207.js";
4
4
  import { useId as K } from "./index8.js";
5
5
  import { wait as H } from "./index131.js";
6
- import { waitFor as be } from "./index221.js";
7
- import { useModalsState as C } from "./index222.js";
8
- import { useLogger as pe } from "./index211.js";
6
+ import { waitFor as be } from "./index208.js";
7
+ import { useModalsState as C } from "./index209.js";
8
+ import { useLogger as pe } from "./index205.js";
9
9
  const me = { class: "bb-base-dialog-close" }, ge = ["aria-label"], De = /* @__PURE__ */ ae({
10
10
  __name: "BaseDialog",
11
11
  props: {