bitboss-ui 2.0.30 → 2.0.32
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.
- package/dist/index104.js +49 -53
- package/dist/index106.js +5 -5
- package/dist/index114.js +1 -1
- package/dist/index116.js +5 -5
- package/dist/index118.js +1 -1
- package/dist/index122.js +1 -1
- package/dist/index123.js +1 -1
- package/dist/index124.js +1 -1
- package/dist/index126.js +1 -1
- package/dist/index128.js +91 -87
- package/dist/index129.js +1 -1
- package/dist/index13.js +1 -1
- package/dist/index15.js +3 -3
- package/dist/index17.js +2 -2
- package/dist/index19.js +14 -14
- package/dist/index198.js +2 -8
- package/dist/index199.js +115 -2
- package/dist/index200.js +5 -4
- package/dist/index201.js +16 -2
- package/dist/index202.js +14 -124
- package/dist/index203.js +19 -5
- package/dist/index204.js +16 -120
- package/dist/index205.js +26 -18
- package/dist/index206.js +3 -16
- package/dist/index207.js +2 -16
- package/dist/index208.js +8 -2
- package/dist/index209.js +249 -2
- package/dist/index21.js +15 -15
- package/dist/index210.js +52 -35
- package/dist/index211.js +43 -173
- package/dist/index212.js +5 -6
- package/dist/index213.js +43 -37
- package/dist/index214.js +160 -0
- package/dist/index215.js +84 -13
- package/dist/index217.js +3 -369
- package/dist/index218.js +32 -78
- package/dist/index219.js +6 -2
- package/dist/index220.js +7 -19
- package/dist/index221.js +3 -27
- package/dist/index222.js +2 -3
- package/dist/index223.js +4 -249
- package/dist/index224.js +2 -52
- package/dist/index225.js +37 -38
- package/dist/index227.js +13 -49
- package/dist/index228.js +126 -3
- package/dist/index229.js +123 -3
- package/dist/index23.js +5 -5
- package/dist/index230.js +2 -7
- package/dist/index231.js +168 -152
- package/dist/index232.js +5 -84
- package/dist/index233.js +371 -0
- package/dist/index234.js +2 -2
- package/dist/index235.js +2 -18
- package/dist/index236.js +17 -105
- package/dist/index237.js +108 -0
- package/dist/{index238.js → index239.js} +1 -1
- package/dist/index243.js +281 -3
- package/dist/index244.js +6 -4
- package/dist/index245.js +2 -6
- package/dist/index246.js +2 -16
- package/dist/index247.js +2 -9
- package/dist/index248.js +2 -23
- package/dist/index249.js +2 -9
- package/dist/index25.js +1 -1
- package/dist/index250.js +2 -281
- package/dist/index251.js +2 -6
- package/dist/index252.js +2 -2
- package/dist/index253.js +2 -2
- package/dist/index254.js +2 -2
- package/dist/index255.js +28 -2
- package/dist/index256.js +22 -2
- package/dist/index258.js +5 -429
- package/dist/index259.js +1 -1
- package/dist/index260.js +14 -0
- package/dist/index261.js +9 -7
- package/dist/index262.js +7 -20
- package/dist/index263.js +19 -0
- package/dist/index264.js +224 -2
- package/dist/index265.js +431 -2
- package/dist/index266.js +89 -2
- package/dist/index267.js +4 -2
- package/dist/index268.js +5 -1
- package/dist/index269.js +16 -2
- package/dist/index27.js +3 -3
- package/dist/index270.js +3 -28
- package/dist/index271.js +8 -21
- package/dist/index272.js +25 -0
- package/dist/index273.js +7 -222
- package/dist/index274.js +191 -427
- package/dist/index275.js +3 -127
- package/dist/index277.js +2 -89
- package/dist/index278.js +126 -3
- package/dist/index279.js +22 -12
- package/dist/index281.js +436 -9
- package/dist/index282.js +126 -16
- package/dist/index283.js +3 -5
- package/dist/index284.js +3 -2
- package/dist/index285.js +205 -60
- package/dist/index286.js +2 -3
- package/dist/index287.js +15 -3
- package/dist/index288.js +5 -211
- package/dist/index289.js +6 -14
- package/dist/index29.js +2 -2
- package/dist/index290.js +7 -79
- package/dist/index291.js +21 -0
- package/dist/index292.js +66 -4
- package/dist/index293.js +11 -4
- package/dist/index294.js +4 -59
- package/dist/index295.js +4 -35
- package/dist/index296.js +58 -6
- package/dist/index297.js +78 -18
- package/dist/index299.js +34 -46
- package/dist/index300.js +47 -2
- package/dist/index301.js +2 -11
- package/dist/index302.js +1 -1
- package/dist/index31.js +2 -2
- package/dist/index33.js +3 -3
- package/dist/index35.js +13 -13
- package/dist/index37.js +4 -4
- package/dist/index39.js +2 -2
- package/dist/index41.js +2 -2
- package/dist/index43.js +6 -6
- package/dist/index45.js +2 -2
- package/dist/index47.js +2 -2
- package/dist/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index71.js +3 -3
- package/dist/index75.js +2 -2
- package/dist/index77.js +1 -1
- package/dist/index80.js +2 -2
- package/dist/index82.js +1 -1
- package/dist/index84.js +3 -3
- package/dist/index86.js +1 -1
- package/package.json +1 -1
- package/dist/index216.js +0 -7
- package/dist/index226.js +0 -7
- package/dist/index240.js +0 -4
- package/dist/index257.js +0 -128
- package/dist/index276.js +0 -202
- package/dist/index280.js +0 -11
- package/dist/index298.js +0 -9
package/dist/index21.js
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
import { defineComponent as ae, ref as o, computed as v, watch as oe, openBlock as w, createBlock as V, normalizeClass as B, withCtx as i, renderSlot as d, createVNode as E, withDirectives as ne, createElementVNode as r, mergeProps as I, unref as c, toDisplayString as F, Teleport as re, normalizeStyle as le, KeepAlive as ie, createCommentVNode as L } from "vue";
|
2
|
-
import { useFloating as se } from "./
|
3
|
-
import n from "./
|
4
|
-
import ue from "./
|
5
|
-
import de from "./
|
6
|
-
import ce from "./
|
7
|
-
import pe from "./
|
8
|
-
import { identity as me } from "./
|
9
|
-
import { last as fe } from "./
|
10
|
-
import { useFocusTrap as be } from "./
|
2
|
+
import { useFloating as se } from "./index228.js";
|
3
|
+
import n from "./index200.js";
|
4
|
+
import ue from "./index229.js";
|
5
|
+
import de from "./index203.js";
|
6
|
+
import ce from "./index201.js";
|
7
|
+
import pe from "./index202.js";
|
8
|
+
import { identity as me } from "./index230.js";
|
9
|
+
import { last as fe } from "./index207.js";
|
10
|
+
import { useFocusTrap as be } from "./index218.js";
|
11
11
|
import { useId as ve } from "./index8.js";
|
12
12
|
import { useIntersectionObserver as ye } from "./index128.js";
|
13
13
|
import { useMobile as ge } from "./index9.js";
|
14
|
-
import { vMaska as ke } from "./
|
14
|
+
import { vMaska as ke } from "./index231.js";
|
15
15
|
import { wait as he } from "./index127.js";
|
16
|
-
import { waitFor as Me } from "./
|
16
|
+
import { waitFor as Me } from "./index219.js";
|
17
17
|
import we from "./index19.js";
|
18
18
|
/* empty css */
|
19
|
-
import Ve from "./
|
19
|
+
import Ve from "./index225.js";
|
20
20
|
/* empty css */
|
21
|
-
import Ce from "./
|
22
|
-
import Ye from "./
|
23
|
-
import { autoUpdate as Ae, flip as De, offset as Se, shift as _e, hide as $e } from "./
|
21
|
+
import Ce from "./index227.js";
|
22
|
+
import Ye from "./index232.js";
|
23
|
+
import { autoUpdate as Ae, flip as De, offset as Se, shift as _e, hide as $e } from "./index233.js";
|
24
24
|
const Oe = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "value"], Be = ["disabled"], Ee = /* @__PURE__ */ r("svg", {
|
25
25
|
fill: "none",
|
26
26
|
viewBox: "0 0 16 16",
|
package/dist/index210.js
CHANGED
@@ -1,37 +1,54 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
1
|
+
import { defineComponent as p, ref as b, watch as _, computed as m, openBlock as d, createElementBlock as c, normalizeClass as u, createElementVNode as t, createVNode as h, withCtx as f, toDisplayString as o } from "vue";
|
2
|
+
import k from "./index212.js";
|
3
|
+
const y = { class: "bb-base-date-picker__year-container" }, v = {
|
4
|
+
"aria-live": "polite",
|
5
|
+
class: "bb-base-date-picker__selected-day-label"
|
6
|
+
}, B = { class: "bb-base-date-picker__weekday" }, D = { class: "bb-base-date-picker__monthday" }, M = { class: "bb-base-date-picker__month-button" }, C = /* @__PURE__ */ p({
|
7
|
+
__name: "BaseDatePickerHeader",
|
8
|
+
props: {
|
9
|
+
cursor: {},
|
10
|
+
disabled: { type: Boolean },
|
11
|
+
hidden: { type: Boolean }
|
12
|
+
},
|
13
|
+
emits: ["mode:year", "mode:month"],
|
14
|
+
setup(n) {
|
15
|
+
const s = n, r = b("top"), l = (e, a) => {
|
16
|
+
e && a && (r.value = e.isBefore(a) ? "top" : "bottom");
|
17
|
+
};
|
18
|
+
_(
|
19
|
+
() => s.cursor,
|
20
|
+
(e, a) => {
|
21
|
+
l(e, a);
|
22
|
+
}
|
23
|
+
);
|
24
|
+
const i = m(() => s.cursor.format("YYYY"));
|
25
|
+
return (e, a) => (d(), c("div", {
|
26
|
+
class: u(["bb-base-date-picker__header", { "bb-base-date-picker__header--hidden": e.hidden }])
|
27
|
+
}, [
|
28
|
+
t("div", y, [
|
29
|
+
h(k, {
|
30
|
+
direction: r.value,
|
31
|
+
duration: 500,
|
32
|
+
gap: 30
|
33
|
+
}, {
|
34
|
+
default: f(() => [
|
35
|
+
(d(), c("span", {
|
36
|
+
key: i.value,
|
37
|
+
"aria-live": "polite",
|
38
|
+
class: "bb-base-date-picker__year-button"
|
39
|
+
}, o(i.value), 1))
|
40
|
+
]),
|
41
|
+
_: 1
|
42
|
+
}, 8, ["direction"])
|
43
|
+
]),
|
44
|
+
t("div", v, [
|
45
|
+
t("span", B, o(e.cursor.format("ddd")) + ", ", 1),
|
46
|
+
t("span", D, o(e.cursor.format("DD")), 1),
|
47
|
+
t("span", M, o(e.cursor.format("MMMM")), 1)
|
48
|
+
])
|
49
|
+
], 2));
|
50
|
+
}
|
51
|
+
});
|
35
52
|
export {
|
36
|
-
|
53
|
+
C as default
|
37
54
|
};
|
package/dist/index211.js
CHANGED
@@ -1,176 +1,46 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
"
|
6
|
-
|
7
|
-
}
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
}
|
23
|
-
unmasked(t) {
|
24
|
-
return this.process(t, this.findMask(t), !1);
|
25
|
-
}
|
26
|
-
isEager() {
|
27
|
-
return this.opts.eager === !0;
|
28
|
-
}
|
29
|
-
isReversed() {
|
30
|
-
return this.opts.reversed === !0;
|
31
|
-
}
|
32
|
-
completed(t) {
|
33
|
-
const e = this.findMask(t);
|
34
|
-
if (this.opts.mask == null || e == null)
|
35
|
-
return !1;
|
36
|
-
const s = this.process(t, e).length;
|
37
|
-
return typeof this.opts.mask == "string" ? s >= this.opts.mask.length : typeof this.opts.mask == "function" ? s >= e.length : this.opts.mask.filter((n) => s >= n.length).length === this.opts.mask.length;
|
38
|
-
}
|
39
|
-
findMask(t) {
|
40
|
-
const e = this.opts.mask;
|
41
|
-
if (e == null)
|
42
|
-
return null;
|
43
|
-
if (typeof e == "string")
|
44
|
-
return e;
|
45
|
-
if (typeof e == "function")
|
46
|
-
return e(t);
|
47
|
-
const s = this.process(t, e.slice(-1).pop() ?? "", !1);
|
48
|
-
return e.find((n) => this.process(t, n, !1).length >= s.length) ?? "";
|
49
|
-
}
|
50
|
-
escapeMask(t) {
|
51
|
-
const e = [], s = [];
|
52
|
-
return t.split("").forEach((n, i) => {
|
53
|
-
n === "!" && t[i - 1] !== "!" ? s.push(i - s.length) : e.push(n);
|
54
|
-
}), { mask: e.join(""), escaped: s };
|
55
|
-
}
|
56
|
-
process(t, e, s = !0) {
|
57
|
-
if (e == null)
|
58
|
-
return t;
|
59
|
-
const n = `value=${t},mask=${e},masked=${s ? 1 : 0}`;
|
60
|
-
if (this.memo.has(n))
|
61
|
-
return this.memo.get(n);
|
62
|
-
const { mask: i, escaped: p } = this.escapeMask(e), o = [], k = this.opts.tokens != null ? this.opts.tokens : {}, l = this.isReversed() ? -1 : 1, m = this.isReversed() ? "unshift" : "push", c = this.isReversed() ? 0 : i.length - 1, T = this.isReversed() ? () => r > -1 && u > -1 : () => r < i.length && u < t.length, S = (d) => !this.isReversed() && d <= c || this.isReversed() && d >= c;
|
63
|
-
let E, f = -1, r = this.isReversed() ? i.length - 1 : 0, u = this.isReversed() ? t.length - 1 : 0, y = !1;
|
64
|
-
for (; T(); ) {
|
65
|
-
const d = i.charAt(r), h = k[d], v = (h == null ? void 0 : h.transform) != null ? h.transform(t.charAt(u)) : t.charAt(u);
|
66
|
-
if (!p.includes(r) && h != null ? (v.match(h.pattern) != null ? (o[m](v), h.repeated ? (f === -1 ? f = r : r === c && r !== f && (r = f - l), c === f && (r -= l)) : h.multiple && (y = !0, r -= l), r += l) : h.multiple ? y && (r += l, u -= l, y = !1) : v === E ? E = void 0 : h.optional && (r += l, u -= l), u += l) : (s && !this.isEager() && o[m](d), v === d && !this.isEager() ? u += l : E = d, this.isEager() || (r += l)), this.isEager())
|
67
|
-
for (; S(r) && (k[i.charAt(r)] == null || p.includes(r)); )
|
68
|
-
s ? o[m](i.charAt(r)) : i.charAt(r) === t.charAt(u) && (u += l), r += l;
|
69
|
-
}
|
70
|
-
return this.memo.set(n, o.join("")), this.memo.get(n);
|
71
|
-
}
|
72
|
-
}
|
73
|
-
const O = (a) => JSON.parse(a.replaceAll("'", '"')), w = (a, t = {}) => {
|
74
|
-
const e = { ...t };
|
75
|
-
return a.dataset.maska != null && a.dataset.maska !== "" && (e.mask = W(a.dataset.maska)), a.dataset.maskaEager != null && (e.eager = M(a.dataset.maskaEager)), a.dataset.maskaReversed != null && (e.reversed = M(a.dataset.maskaReversed)), a.dataset.maskaTokensReplace != null && (e.tokensReplace = M(a.dataset.maskaTokensReplace)), a.dataset.maskaTokens != null && (e.tokens = j(a.dataset.maskaTokens)), e;
|
76
|
-
}, M = (a) => a !== "" ? !!JSON.parse(a) : !0, W = (a) => a.startsWith("[") && a.endsWith("]") ? O(a) : a, j = (a) => {
|
77
|
-
if (a.startsWith("{") && a.endsWith("}"))
|
78
|
-
return O(a);
|
79
|
-
const t = {};
|
80
|
-
return a.split("|").forEach((e) => {
|
81
|
-
const s = e.split(":");
|
82
|
-
t[s[0]] = {
|
83
|
-
pattern: new RegExp(s[1]),
|
84
|
-
optional: s[2] === "optional",
|
85
|
-
multiple: s[2] === "multiple",
|
86
|
-
repeated: s[2] === "repeated"
|
87
|
-
};
|
88
|
-
}), t;
|
89
|
-
};
|
90
|
-
class L {
|
91
|
-
constructor(t, e = {}) {
|
92
|
-
g(this, "items", /* @__PURE__ */ new Map()), g(this, "beforeinputEvent", (s) => {
|
93
|
-
const n = s.target, i = this.items.get(n);
|
94
|
-
i.isEager() && "inputType" in s && s.inputType.startsWith("delete") && i.unmasked(n.value).length <= 1 && this.setMaskedValue(n, "");
|
95
|
-
}), g(this, "inputEvent", (s) => {
|
96
|
-
if (s instanceof CustomEvent && s.type === "input" && s.detail != null && typeof s.detail == "object" && "masked" in s.detail)
|
97
|
-
return;
|
98
|
-
const n = s.target, i = this.items.get(n), p = n.value, o = n.selectionStart, k = n.selectionEnd;
|
99
|
-
let l = p;
|
100
|
-
if (i.isEager()) {
|
101
|
-
const m = i.masked(p), c = i.unmasked(p);
|
102
|
-
c === "" && "data" in s && s.data != null ? l = s.data : c !== i.unmasked(m) && (l = c);
|
103
|
-
}
|
104
|
-
if (this.setMaskedValue(n, l), "inputType" in s && (s.inputType.startsWith("delete") || o != null && o < p.length))
|
105
|
-
try {
|
106
|
-
n.setSelectionRange(o, k);
|
107
|
-
} catch {
|
108
|
-
}
|
109
|
-
}), this.options = e, typeof t == "string" ? this.init(
|
110
|
-
Array.from(document.querySelectorAll(t)),
|
111
|
-
this.getMaskOpts(e)
|
112
|
-
) : this.init(
|
113
|
-
"length" in t ? Array.from(t) : [t],
|
114
|
-
this.getMaskOpts(e)
|
1
|
+
import { defineComponent as _, computed as a, openBlock as o, createElementBlock as c, createElementVNode as p, Fragment as b, renderList as h, createBlock as k, normalizeClass as f, withCtx as y, createTextVNode as x, toDisplayString as B } from "vue";
|
2
|
+
import C from "./index13.js";
|
3
|
+
/* empty css */
|
4
|
+
const M = { class: "bb-base-date-picker__button-menu bb-base-date-picker__month-selector" }, v = { class: "content" }, E = /* @__PURE__ */ _({
|
5
|
+
__name: "BaseDatePickerMonthSelector",
|
6
|
+
props: {
|
7
|
+
cursor: {},
|
8
|
+
disabled: { type: Boolean }
|
9
|
+
},
|
10
|
+
emits: ["update:month"],
|
11
|
+
setup(l, { emit: d }) {
|
12
|
+
const s = l, m = d, i = a(() => s.cursor.month()), u = a(
|
13
|
+
() => new Array(12).fill(0).map((r, t) => {
|
14
|
+
const n = s.cursor.clone().startOf("year").add(t, "month");
|
15
|
+
return {
|
16
|
+
text: n.format("MMMM"),
|
17
|
+
key: n.unix(),
|
18
|
+
selected: n.month() === i.value,
|
19
|
+
handler: () => m("update:month", t)
|
20
|
+
};
|
21
|
+
})
|
115
22
|
);
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
this.items.set(s, n), s.value !== "" && this.setMaskedValue(s, s.value), s.addEventListener("input", this.inputEvent), s.addEventListener("beforeinput", this.beforeinputEvent);
|
138
|
-
}
|
139
|
-
}
|
140
|
-
setMaskedValue(t, e) {
|
141
|
-
const s = this.items.get(t);
|
142
|
-
this.options.preProcess != null && (e = this.options.preProcess(e));
|
143
|
-
const n = s.masked(e), i = s.unmasked(s.isEager() ? n : e), p = s.completed(e), o = { masked: n, unmasked: i, completed: p };
|
144
|
-
e = n, this.options.postProcess != null && (e = this.options.postProcess(e)), t.value = e, t.dataset.maskaValue = e, this.options.onMaska != null && (Array.isArray(this.options.onMaska) ? this.options.onMaska.forEach((k) => k(o)) : this.options.onMaska(o)), t.dispatchEvent(new CustomEvent("maska", { detail: o })), t.dispatchEvent(new CustomEvent("input", { detail: o }));
|
145
|
-
}
|
146
|
-
}
|
147
|
-
const A = /* @__PURE__ */ new WeakMap(), C = (a) => {
|
148
|
-
setTimeout(() => {
|
149
|
-
var t;
|
150
|
-
((t = A.get(a)) == null ? void 0 : t.needUpdateValue(a)) === !0 && a.dispatchEvent(new CustomEvent("input"));
|
151
|
-
});
|
152
|
-
}, J = (a, t) => {
|
153
|
-
const e = a instanceof HTMLInputElement ? a : a.querySelector("input"), s = { ...t.arg };
|
154
|
-
if (e == null || (e == null ? void 0 : e.type) === "file")
|
155
|
-
return;
|
156
|
-
C(e);
|
157
|
-
const n = A.get(e);
|
158
|
-
if (n != null) {
|
159
|
-
if (!n.needUpdateOptions(e, s))
|
160
|
-
return;
|
161
|
-
n.destroy();
|
162
|
-
}
|
163
|
-
if (t.value != null) {
|
164
|
-
const i = t.value, p = (o) => {
|
165
|
-
i.masked = o.masked, i.unmasked = o.unmasked, i.completed = o.completed;
|
166
|
-
};
|
167
|
-
s.onMaska = s.onMaska == null ? p : Array.isArray(s.onMaska) ? [...s.onMaska, p] : [s.onMaska, p];
|
168
|
-
}
|
169
|
-
A.set(e, new L(e, s));
|
170
|
-
};
|
23
|
+
return (r, t) => (o(), c("div", M, [
|
24
|
+
p("div", v, [
|
25
|
+
(o(!0), c(b, null, h(u.value, (e) => (o(), k(C, {
|
26
|
+
key: e.key,
|
27
|
+
class: f({
|
28
|
+
content__btn: !0,
|
29
|
+
"content__btn--selected": e.selected
|
30
|
+
}),
|
31
|
+
disabled: r.disabled,
|
32
|
+
type: "button",
|
33
|
+
onClick: e.handler
|
34
|
+
}, {
|
35
|
+
default: y(() => [
|
36
|
+
x(B(e.text), 1)
|
37
|
+
]),
|
38
|
+
_: 2
|
39
|
+
}, 1032, ["class", "disabled", "onClick"]))), 128))
|
40
|
+
])
|
41
|
+
]));
|
42
|
+
}
|
43
|
+
});
|
171
44
|
export {
|
172
|
-
|
173
|
-
L as MaskInput,
|
174
|
-
R as tokens,
|
175
|
-
J as vMaska
|
45
|
+
E as default
|
176
46
|
};
|
package/dist/index212.js
CHANGED
@@ -1,8 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
});
|
1
|
+
import o from "./index256.js";
|
2
|
+
/* empty css */
|
3
|
+
import t from "./index258.js";
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8c6b13bd"]]);
|
6
5
|
export {
|
7
|
-
|
6
|
+
m as default
|
8
7
|
};
|
package/dist/index213.js
CHANGED
@@ -1,43 +1,49 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
/*
|
6
|
-
|
7
|
-
/* empty css */
|
8
|
-
import d from "./index295.js";
|
9
|
-
const u = { class: "bb-common-input-inner-container" }, f = { class: "bb-common-input-inner-container__prefix" }, _ = { class: "bb-common-input-inner-container__suffix" }, V = /* @__PURE__ */ m({
|
10
|
-
__name: "CommonInputInnerContainer",
|
1
|
+
import { defineComponent as p, ref as _, computed as b, onMounted as f, openBlock as n, createElementBlock as o, createElementVNode as k, Fragment as y, renderList as h, unref as g, createBlock as v, normalizeClass as x, withCtx as B, createTextVNode as C, toDisplayString as E } from "vue";
|
2
|
+
import { range as w } from "./index289.js";
|
3
|
+
import D from "./index13.js";
|
4
|
+
/* empty css */
|
5
|
+
const S = { class: "content" }, c = 100, V = /* @__PURE__ */ p({
|
6
|
+
__name: "BaseDatePickerYearSelector",
|
11
7
|
props: {
|
12
|
-
|
13
|
-
|
8
|
+
cursor: {},
|
9
|
+
disabled: { type: Boolean }
|
14
10
|
},
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
11
|
+
emits: ["update:year"],
|
12
|
+
setup(s, { emit: l }) {
|
13
|
+
const i = s, d = l, r = _(), u = b(() => i.cursor.year()), a = (/* @__PURE__ */ new Date()).getFullYear() - c / 2, m = w(a, a + c).map((e) => ({
|
14
|
+
text: e,
|
15
|
+
key: e,
|
16
|
+
selected: e === u.value,
|
17
|
+
handler: () => d("update:year", e)
|
18
|
+
}));
|
19
|
+
return f(() => {
|
20
|
+
if (!r.value) return;
|
21
|
+
const e = r.value.querySelector(
|
22
|
+
".content__btn--selected"
|
23
|
+
);
|
24
|
+
e && (e.parentElement.scrollTop = e.offsetTop - e.parentElement.clientHeight / 2 + 16);
|
25
|
+
}), (e, T) => (n(), o("div", {
|
26
|
+
ref_key: "container",
|
27
|
+
ref: r,
|
28
|
+
class: "bb-base-date-picker__button-menu bb-base-date-picker__year-selector scrollbar-border"
|
29
|
+
}, [
|
30
|
+
k("div", S, [
|
31
|
+
(n(!0), o(y, null, h(g(m), (t) => (n(), v(D, {
|
32
|
+
key: t.key,
|
33
|
+
class: x({
|
34
|
+
content__btn: !0,
|
35
|
+
"content__btn--selected": t.selected
|
36
|
+
}),
|
37
|
+
disabled: e.disabled,
|
38
|
+
onClick: t.handler
|
39
|
+
}, {
|
40
|
+
default: B(() => [
|
41
|
+
C(E(t.text), 1)
|
42
|
+
]),
|
43
|
+
_: 2
|
44
|
+
}, 1032, ["class", "disabled", "onClick"]))), 128))
|
39
45
|
])
|
40
|
-
]));
|
46
|
+
], 512));
|
41
47
|
}
|
42
48
|
});
|
43
49
|
export {
|
package/dist/index214.js
ADDED
@@ -0,0 +1,160 @@
|
|
1
|
+
import { ref as a, computed as r, onBeforeMount as Y, onBeforeUnmount as Z, watch as H, nextTick as N } from "vue";
|
2
|
+
import { last as _ } from "./index207.js";
|
3
|
+
import { useArray as Q } from "./index260.js";
|
4
|
+
import { uniqBy as $ } from "./index261.js";
|
5
|
+
import { useItemValue as ee } from "./index262.js";
|
6
|
+
import { useItemText as te } from "./index263.js";
|
7
|
+
import { hash as v } from "./index206.js";
|
8
|
+
import { isNotNil as q } from "./index130.js";
|
9
|
+
import { waitFor as le } from "./index219.js";
|
10
|
+
import { isNil as oe } from "./index125.js";
|
11
|
+
const he = (l) => {
|
12
|
+
const i = a(""), F = a(), u = (e) => {
|
13
|
+
F.value = e, l.emit("update:modelValue", e);
|
14
|
+
}, d = a([]), {
|
15
|
+
array: k,
|
16
|
+
add: E,
|
17
|
+
remove: P,
|
18
|
+
set: y
|
19
|
+
} = Q(), {
|
20
|
+
array: S,
|
21
|
+
add: j,
|
22
|
+
remove: J
|
23
|
+
} = Q(), { getItemText: L } = te(), { getItemValue: U } = ee(), O = (e) => {
|
24
|
+
const t = !!(l.disabled.value || e.disabled), o = L(e, l.itemText), n = U(e, l.itemValue);
|
25
|
+
if (n === void 0)
|
26
|
+
throw new Error(
|
27
|
+
'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(e) + " please check itemValue property is correct."
|
28
|
+
);
|
29
|
+
const X = v(n);
|
30
|
+
return {
|
31
|
+
item: e,
|
32
|
+
text: o,
|
33
|
+
value: n,
|
34
|
+
valueHash: X,
|
35
|
+
disabled: t,
|
36
|
+
selected: !1
|
37
|
+
};
|
38
|
+
}, T = (e) => (e.selected = q(b.value[e.valueHash]), e), V = r(() => {
|
39
|
+
const e = [].concat(
|
40
|
+
d.value.map((t) => T(O(t))),
|
41
|
+
S.value.map(T),
|
42
|
+
k.value.map(T)
|
43
|
+
);
|
44
|
+
return $(e, (t) => t.valueHash);
|
45
|
+
}), z = (e) => {
|
46
|
+
l.multiple ? (u(l.modelValue.value.concat(e.value)), l.stash && E(e), l.resetQueryOnOptionSelected && s()) : (l.stash && y(e), u(e.value), N(() => s()));
|
47
|
+
}, G = async (e) => {
|
48
|
+
if (J((t) => t.valueHash !== e.valueHash), P((t) => t.valueHash !== e.valueHash), l.multiple) {
|
49
|
+
const t = { ...b.value };
|
50
|
+
delete t[e.valueHash], u(Object.values(t));
|
51
|
+
} else
|
52
|
+
u(null), await N(), s();
|
53
|
+
}, b = r(() => {
|
54
|
+
const e = {}, t = [].concat(l.modelValue.value);
|
55
|
+
for (let o = 0; o < t.length; o++) {
|
56
|
+
const n = t[o];
|
57
|
+
e[v(n)] = n;
|
58
|
+
}
|
59
|
+
return e;
|
60
|
+
}), g = async ({ prefill: e = !1 }) => {
|
61
|
+
let t = [];
|
62
|
+
if (Array.isArray(l.items.value))
|
63
|
+
t = l.items.value;
|
64
|
+
else if (typeof l.items.value == "function") {
|
65
|
+
const o = ++c.value;
|
66
|
+
try {
|
67
|
+
t = await l.items.value(
|
68
|
+
i.value,
|
69
|
+
e,
|
70
|
+
l.modelValue.value
|
71
|
+
), o < c.value && (await le(() => o === c.value), t = d.value);
|
72
|
+
} catch (n) {
|
73
|
+
console.error(n);
|
74
|
+
}
|
75
|
+
c.value--;
|
76
|
+
}
|
77
|
+
d.value = t;
|
78
|
+
}, B = r(() => {
|
79
|
+
const e = {};
|
80
|
+
for (let t = 0; t < V.value.length; t++) {
|
81
|
+
const o = V.value[t], { valueHash: n } = o;
|
82
|
+
e[n] = o;
|
83
|
+
}
|
84
|
+
return {
|
85
|
+
get: (t) => e[v(t)]
|
86
|
+
};
|
87
|
+
}), f = r(() => [].concat(l.modelValue.value).reduce((e, t) => {
|
88
|
+
const o = B.value.get(t);
|
89
|
+
return o && e.push(o), e;
|
90
|
+
}, [])), C = (e) => q(B.value.get(e)), s = () => {
|
91
|
+
if (l.multiple) {
|
92
|
+
i.value = "";
|
93
|
+
return;
|
94
|
+
}
|
95
|
+
let e;
|
96
|
+
f.value && (e = _(f.value)), i.value = (e == null ? void 0 : e.text) || "";
|
97
|
+
}, K = () => {
|
98
|
+
const e = i.value.trim(), t = O(e);
|
99
|
+
j(t), s();
|
100
|
+
}, c = a(0), M = r(() => [].concat(l.modelValue.value).reduce(
|
101
|
+
(e, t) => (C(t) ? e.coherent.push(t) : e.incoherent.push(t), e),
|
102
|
+
{ coherent: [], incoherent: [] }
|
103
|
+
)), A = r(() => l.multiple && !l.modelValue.value.length || !l.multiple && oe(l.modelValue.value) ? !0 : !M.value.incoherent.length), R = () => {
|
104
|
+
l.enforceCoherence && !A.value && (l.multiple ? u(M.value.coherent) : u(null));
|
105
|
+
}, p = a(!1), I = a(!1), m = async () => {
|
106
|
+
I.value = !0, await g({ prefill: !0 }), R(), s(), p.value = !0, I.value = !1;
|
107
|
+
};
|
108
|
+
Y(async () => {
|
109
|
+
l.prefill && (await m(), l.stash && y(...f.value));
|
110
|
+
});
|
111
|
+
let h;
|
112
|
+
const W = () => {
|
113
|
+
h && clearTimeout(h), h = setTimeout(async () => {
|
114
|
+
try {
|
115
|
+
await g({ prefill: !1 });
|
116
|
+
} catch (e) {
|
117
|
+
console.error(e);
|
118
|
+
}
|
119
|
+
}, l.queryDebounceTime);
|
120
|
+
};
|
121
|
+
Z(() => clearTimeout(h));
|
122
|
+
let x;
|
123
|
+
H(
|
124
|
+
() => l.modelValue.value,
|
125
|
+
() => {
|
126
|
+
A.value || (x && clearTimeout(x), x = setTimeout(async () => {
|
127
|
+
m();
|
128
|
+
}, l.modelValueDebounceTime));
|
129
|
+
}
|
130
|
+
);
|
131
|
+
let w;
|
132
|
+
const D = async (e, t) => {
|
133
|
+
v(t) !== v(e) && p.value && (w && clearTimeout(w), w = setTimeout(async () => {
|
134
|
+
await m();
|
135
|
+
}, l.depsDebounceTime));
|
136
|
+
};
|
137
|
+
return H(() => l.items.value, D), H(() => l.dependencies.value, D), {
|
138
|
+
addCurrentQueryToManualItems: K,
|
139
|
+
alignQueryToState: s,
|
140
|
+
getOptions: g,
|
141
|
+
hasPrefilled: p,
|
142
|
+
innerLoading: c,
|
143
|
+
isPrefilling: I,
|
144
|
+
manualItems: S,
|
145
|
+
options: V,
|
146
|
+
prefillItems: m,
|
147
|
+
query: i,
|
148
|
+
searchByQuery: W,
|
149
|
+
selectedOptions: f,
|
150
|
+
selectOption: z,
|
151
|
+
setStash: y,
|
152
|
+
unselectOption: G,
|
153
|
+
updateModelValue: u,
|
154
|
+
valueIsSelected: C,
|
155
|
+
internalItems: d
|
156
|
+
};
|
157
|
+
};
|
158
|
+
export {
|
159
|
+
he as useOptions
|
160
|
+
};
|