bitboss-ui 2.0.172 → 2.0.173
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/components/BaseColorInput/BaseColorInput.vue.d.ts +2 -2
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +16 -2
- package/dist/components/BbPopover/BbPopover.vue.d.ts +18 -4
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +16 -2
- package/dist/components/CommonPopover.vue.d.ts +3 -0
- package/dist/index.css +1 -1
- package/dist/index106.js +7 -7
- package/dist/index111.js +1 -1
- package/dist/index113.js +1 -1
- package/dist/index121.js +9 -9
- package/dist/index129.js +1 -1
- package/dist/index13.js +1 -1
- package/dist/index131.js +40 -39
- package/dist/index133.js +1 -1
- package/dist/index139.js +2 -2
- package/dist/index15.js +35 -34
- package/dist/index17.js +3 -3
- package/dist/index19.js +5 -5
- package/dist/index209.js +5 -10
- package/dist/index21.js +16 -16
- package/dist/index210.js +5 -3
- package/dist/index211.js +5 -13
- package/dist/index212.js +5 -34
- package/dist/index213.js +5 -13
- package/dist/index214.js +5 -66
- package/dist/index215.js +7 -0
- package/dist/index216.js +3 -2
- package/dist/index217.js +2 -4
- package/dist/index218.js +8 -2
- package/dist/index219.js +250 -2
- package/dist/index220.js +52 -41
- package/dist/index221.js +43 -5
- package/dist/index222.js +5 -7
- package/dist/index223.js +56 -11
- package/dist/index224.js +13 -5
- package/dist/index225.js +2 -9
- package/dist/index226.js +2 -5
- package/dist/index227.js +2 -5
- package/dist/index228.js +66 -5
- package/dist/index23.js +114 -125
- package/dist/index230.js +13 -5
- package/dist/index231.js +177 -2
- package/dist/index232.js +41 -2
- package/dist/index233.js +6 -11
- package/dist/index234.js +7 -20
- package/dist/index235.js +13 -103
- package/dist/{index237.js → index236.js} +1 -1
- package/dist/index238.js +31 -0
- package/dist/index239.js +14 -27
- package/dist/index240.js +1 -1
- package/dist/index241.js +4 -4
- package/dist/index242.js +1 -1
- package/dist/index243.js +12 -3
- package/dist/index244.js +34 -12
- package/dist/index245.js +3 -16
- package/dist/index246.js +5 -4
- package/dist/index247.js +2 -200
- package/dist/index248.js +13 -0
- package/dist/index249.js +18 -16
- package/dist/index25.js +5 -5
- package/dist/index250.js +120 -12
- package/dist/index252.js +6 -0
- package/dist/index253.js +4 -100
- package/dist/index254.js +202 -0
- package/dist/index256.js +18 -2
- package/dist/index257.js +11 -176
- package/dist/index258.js +106 -3
- package/dist/index260.js +100 -5
- package/dist/index262.js +226 -6
- package/dist/index263.js +2 -250
- package/dist/index264.js +2 -52
- package/dist/index265.js +10 -44
- package/dist/index266.js +3 -5
- package/dist/index267.js +6 -60
- package/dist/index268.js +15 -8
- package/dist/index269.js +3 -23
- package/dist/index27.js +1 -1
- package/dist/index270.js +2 -6
- package/dist/index271.js +8 -15
- package/dist/index272.js +9 -3
- package/dist/index273.js +23 -9
- package/dist/index274.js +9 -8
- package/dist/index275.js +8 -2
- package/dist/index276.js +1 -1
- package/dist/index277.js +5 -5
- package/dist/index278.js +279 -7
- package/dist/index279.js +2 -5
- package/dist/index280.js +16 -7
- package/dist/index281.js +2 -11
- package/dist/index282.js +16 -2
- package/dist/index284.js +19 -7
- package/dist/index285.js +2 -3
- package/dist/index286.js +15 -4
- package/dist/index287.js +2 -3
- package/dist/index288.js +19 -17
- package/dist/index289.js +2 -28
- package/dist/index29.js +2 -2
- package/dist/index290.js +26 -3
- package/dist/index291.js +2 -471
- package/dist/index292.js +1 -1
- package/dist/index293.js +2 -3
- package/dist/index294.js +2 -3
- package/dist/index295.js +2 -280
- package/dist/index296.js +28 -2
- package/dist/index297.js +22 -125
- package/dist/index299.js +7 -15
- package/dist/index300.js +7 -2
- package/dist/index301.js +10 -15
- package/dist/index302.js +6 -2
- package/dist/index303.js +3 -16
- package/dist/index305.js +2 -19
- package/dist/index306.js +3 -2
- package/dist/index307.js +14 -197
- package/dist/index308.js +470 -5
- package/dist/index309.js +2 -3
- package/dist/index31.js +2 -2
- package/dist/index310.js +200 -3
- package/dist/index311.js +5 -2
- package/dist/index312.js +4 -5
- package/dist/index313.js +121 -15
- package/dist/index314.js +2 -2
- package/dist/index315.js +3 -27
- package/dist/index316.js +3 -2
- package/dist/index317.js +3 -2
- package/dist/index318.js +3 -2
- package/dist/index319.js +1 -1
- package/dist/index320.js +5 -2
- package/dist/index321.js +8 -22
- package/dist/index322.js +7 -0
- package/dist/index323.js +4 -5
- package/dist/index328.js +32 -57
- package/dist/index329.js +27 -57
- package/dist/index33.js +5 -5
- package/dist/index331.js +7 -28
- package/dist/index332.js +21 -0
- package/dist/index333.js +58 -47
- package/dist/index334.js +58 -7
- package/dist/index335.js +6 -7
- package/dist/index336.js +46 -5
- package/dist/index337.js +128 -7
- package/dist/index338.js +368 -6
- package/dist/index339.js +7 -18
- package/dist/index340.js +5 -227
- package/dist/index341.js +7 -127
- package/dist/index342.js +220 -360
- package/dist/index343.js +1 -1
- package/dist/index345.js +1 -1
- package/dist/index346.js +1 -1
- package/dist/index347.js +125 -43
- package/dist/index348.js +43 -125
- package/dist/index349.js +283 -229
- package/dist/index35.js +4 -4
- package/dist/index350.js +39 -38
- package/dist/index37.js +17 -17
- package/dist/index39.js +4 -4
- package/dist/index41.js +2 -2
- package/dist/index43.js +5 -5
- package/dist/index45.js +6 -6
- package/dist/index47.js +2 -2
- package/dist/index49.js +3 -3
- package/dist/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +3 -3
- package/dist/index67.js +1 -1
- package/dist/index79.js +106 -112
- package/dist/index81.js +1 -1
- package/dist/index83.js +2 -2
- package/dist/index85.js +1 -1
- package/dist/index87.js +1 -1
- package/dist/index90.js +4 -4
- package/dist/index92.js +2 -2
- package/dist/index94.js +56 -56
- package/package.json +2 -2
- package/dist/index229.js +0 -7
- package/dist/index251.js +0 -108
- package/dist/index255.js +0 -230
- package/dist/index259.js +0 -4
- package/dist/index261.js +0 -7
- package/dist/index298.js +0 -4
- package/dist/index330.js +0 -35
- /package/dist/{index304.js → index283.js} +0 -0
package/dist/index23.js
CHANGED
@@ -1,29 +1,27 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { _config as
|
3
|
-
import o from "./
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
import {
|
14
|
-
import {
|
15
|
-
import {
|
16
|
-
import {
|
17
|
-
import
|
18
|
-
import { vMaska as ye } from "./index234.js";
|
19
|
-
import ve from "./index21.js";
|
1
|
+
import { defineComponent as K, watchEffect as Q, ref as l, computed as k, watch as D, createBlock as C, openBlock as Y, normalizeClass as w, withCtx as i, createVNode as B, unref as r, createCommentVNode as X, withDirectives as x, createElementVNode as s, mergeProps as S, withModifiers as ee, toDisplayString as E, renderSlot as c } from "vue";
|
2
|
+
import { _config as te } from "./index4.js";
|
3
|
+
import o from "./index209.js";
|
4
|
+
import ae from "./index246.js";
|
5
|
+
import oe from "./index213.js";
|
6
|
+
import re from "./index210.js";
|
7
|
+
import ne from "./index211.js";
|
8
|
+
import le from "./index212.js";
|
9
|
+
import { identity as ie } from "./index226.js";
|
10
|
+
import { isEmpty as se } from "./index247.js";
|
11
|
+
import { last as de } from "./index217.js";
|
12
|
+
import { useId as ue } from "./index8.js";
|
13
|
+
import { useLocale as pe } from "./index224.js";
|
14
|
+
import { useMobile as ce } from "./index9.js";
|
15
|
+
import { useUntil as me } from "./index248.js";
|
16
|
+
import { vMaska as fe } from "./index249.js";
|
17
|
+
import be from "./index21.js";
|
20
18
|
/* empty css */
|
21
|
-
import
|
19
|
+
import ge from "./index228.js";
|
22
20
|
/* empty css */
|
23
|
-
import
|
24
|
-
import
|
21
|
+
import ke from "./index230.js";
|
22
|
+
import ye from "./index250.js";
|
25
23
|
/* empty css */
|
26
|
-
const
|
24
|
+
const ve = ["inert"], Ve = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "value"], Me = ["aria-label", "disabled"], he = ["id"], ze = /* @__PURE__ */ K({
|
27
25
|
__name: "BaseDatePickerInput",
|
28
26
|
props: {
|
29
27
|
allowWriting: { type: [Boolean, String], default: !0 },
|
@@ -51,72 +49,63 @@ const De = ["inert"], Ce = ["id", "aria-describedby", "autocomplete", "autofocus
|
|
51
49
|
},
|
52
50
|
emits: ["active", "error", "focus", "inactive", "update:modelValue"],
|
53
51
|
setup(I, { emit: $ }) {
|
54
|
-
const L = { it:
|
55
|
-
o.extend(
|
56
|
-
o.locale(L[
|
52
|
+
const L = { it: le, en: oe };
|
53
|
+
o.extend(ae), o.extend(re), o.extend(ne), Q(() => {
|
54
|
+
o.locale(L[te.locale]);
|
57
55
|
});
|
58
|
-
const t = I,
|
59
|
-
() => t.allowWriting === "not-mobile" &&
|
60
|
-
)
|
61
|
-
fe(
|
62
|
-
// @ts-expect-error wrong inferred type
|
63
|
-
m,
|
64
|
-
re(() => {
|
65
|
-
s.value && (m.value && m.value.$el.querySelector(
|
66
|
-
".bb-base-date-picker-input__calendar-btn"
|
67
|
-
).focus({ preventScroll: !0 }), V());
|
68
|
-
}, 100),
|
69
|
-
{ threshold: [0, 1] }
|
70
|
-
);
|
71
|
-
const F = y(() => ({
|
56
|
+
const t = I, d = $, { t: u } = pe(), v = l(null), y = l(null), O = l(null), _ = l(null), m = l(null), V = l(), f = t.id || `bdpi-${ue().id.value}`, { isMobile: P } = ce(), F = k(
|
57
|
+
() => t.allowWriting === "not-mobile" && P.value ? "none" : "numeric"
|
58
|
+
), j = k(() => ({
|
72
59
|
"bb-base-date-picker-input": !0,
|
73
|
-
"bb-base-date-picker-input--active":
|
60
|
+
"bb-base-date-picker-input--active": b.value,
|
74
61
|
"bb-base-date-picker-input--errors": t.hasErrors,
|
75
62
|
"bb-base-date-picker-input--loading": t.loading,
|
76
63
|
"bb-base-date-picker-input--readonly": t.readonly,
|
77
64
|
"bb-base-date-picker-input--disabled": t.disabled,
|
78
65
|
"bb-base-date-picker-input--compact": t.compact
|
79
|
-
})),
|
66
|
+
})), A = {
|
80
67
|
onInput: (e) => {
|
81
68
|
if (!t.range && e.target instanceof HTMLInputElement)
|
82
|
-
if (
|
69
|
+
if (m.value = e.target.value, /\d{2}\/\d{2}\/\d{4}/.test(e.target.value)) {
|
83
70
|
const a = o(e.target.value, "DD/MM/YYYY");
|
84
|
-
|
85
|
-
} else e.target.value === "" &&
|
71
|
+
Z(a) ? (e.target.value = "", d("update:modelValue", null), d("error", "invalid_date_typed")) : d("update:modelValue", a.toISOString());
|
72
|
+
} else e.target.value === "" && d("update:modelValue", null);
|
86
73
|
}
|
87
|
-
},
|
88
|
-
|
74
|
+
}, b = l(!1), H = () => {
|
75
|
+
b.value || (d("active"), b.value = !0, document.addEventListener("focusin", g), document.addEventListener("click", g));
|
89
76
|
}, g = (e) => {
|
90
|
-
var a,
|
91
|
-
e.target instanceof HTMLElement && (a =
|
92
|
-
},
|
77
|
+
var a, p;
|
78
|
+
e.target instanceof HTMLElement && (a = y.value) != null && a.$el && !y.value.$el.contains(e.target) && !((p = v.value) != null && p.contains(e.target)) && (b.value = !1, d("inactive"), document.removeEventListener("focusin", g), document.removeEventListener("click", g));
|
79
|
+
}, M = (e) => {
|
93
80
|
if (e)
|
94
81
|
if (Array.isArray(e)) {
|
95
|
-
let a,
|
96
|
-
return e.length && (a = e[0]), e.length > 1 && (
|
82
|
+
let a, p;
|
83
|
+
return e.length && (a = e[0]), e.length > 1 && (p = de(e)), [a, p].filter(ie).map((J) => o(J).format("DD/MM/YYYY")).join(" - ");
|
97
84
|
} else
|
98
85
|
return o(e).format("DD/MM/YYYY");
|
99
86
|
return null;
|
100
|
-
},
|
101
|
-
|
87
|
+
}, W = k(() => m.value ? m.value : M(t.modelValue));
|
88
|
+
D(
|
102
89
|
() => t.modelValue,
|
103
90
|
(e) => {
|
104
|
-
|
91
|
+
m.value = M(e);
|
105
92
|
}
|
106
93
|
);
|
107
|
-
const
|
94
|
+
const n = l(!1), q = me(n), h = (e) => {
|
108
95
|
const a = e.target;
|
109
|
-
a && a instanceof HTMLDialogElement &&
|
110
|
-
},
|
111
|
-
t.disabled || t.readonly || (
|
112
|
-
}
|
113
|
-
|
114
|
-
|
115
|
-
|
96
|
+
a && a instanceof HTMLDialogElement && (n.value = !1);
|
97
|
+
}, R = async () => {
|
98
|
+
t.disabled || t.readonly || (n.value = !0);
|
99
|
+
};
|
100
|
+
D(n, (e) => {
|
101
|
+
var a;
|
102
|
+
e ? document.addEventListener("click", h, { passive: !0 }) : ((a = V.value) == null || a.resetStatus(), document.removeEventListener("click", h));
|
103
|
+
});
|
104
|
+
const T = l(!t.allowWriting || t.range), N = (e) => t.range && Array.isArray(e) && e.length === 2 || !t.range && !!e, U = {
|
116
105
|
"onUpdate:modelValue": (e) => {
|
117
|
-
|
106
|
+
d("update:modelValue", e), N(e) && (T.value = !1, n.value = !1);
|
118
107
|
}
|
119
|
-
},
|
108
|
+
}, z = k(() => {
|
120
109
|
if (t.range) {
|
121
110
|
if (!t.modelValue || t.modelValue.length < 2)
|
122
111
|
return u("baseDatePickerInput.emptyRange").value;
|
@@ -128,67 +117,67 @@ const De = ["inert"], Ce = ["id", "aria-describedby", "autocomplete", "autofocus
|
|
128
117
|
return u("baseDatePickerInput.changeSelection", e).value;
|
129
118
|
}
|
130
119
|
return u("baseDatePickerInput.emptySelection").value;
|
131
|
-
}),
|
120
|
+
}), Z = (e) => {
|
132
121
|
let a = !0;
|
133
122
|
return t.min && a && (a = e.isSameOrAfter(o(t.min).startOf("day"))), t.max && a && (a = e.isSameOrBefore(o(t.max).startOf("day"))), typeof t.selectable == "function" && a && (a = t.selectable(e.toDate())), !a;
|
134
|
-
},
|
123
|
+
}, G = () => {
|
135
124
|
let e = null;
|
136
|
-
t.range && (e = []),
|
125
|
+
t.range && (e = []), d("update:modelValue", e);
|
137
126
|
};
|
138
|
-
return (e, a) => (
|
127
|
+
return (e, a) => (Y(), C(ke, {
|
139
128
|
ref_key: "outerContainer",
|
140
|
-
ref:
|
141
|
-
class:
|
142
|
-
onFocusin:
|
129
|
+
ref: y,
|
130
|
+
class: w(j.value),
|
131
|
+
onFocusin: H
|
143
132
|
}, {
|
144
|
-
"prepend-outer":
|
145
|
-
|
133
|
+
"prepend-outer": i(() => [
|
134
|
+
c(e.$slots, "prepend-outer")
|
146
135
|
]),
|
147
|
-
"append-outer":
|
148
|
-
|
136
|
+
"append-outer": i(() => [
|
137
|
+
c(e.$slots, "append-outer")
|
149
138
|
]),
|
150
|
-
default:
|
151
|
-
|
139
|
+
default: i(() => [
|
140
|
+
B(ge, {
|
152
141
|
ref_key: "innerContainer",
|
153
|
-
ref:
|
142
|
+
ref: O,
|
154
143
|
"append:icon": t["append:icon"],
|
155
|
-
clearable: t.clearable && !r(
|
144
|
+
clearable: t.clearable && !r(se)(e.modelValue),
|
156
145
|
"prepend:icon": t["prepend:icon"],
|
157
|
-
"onClick:clear":
|
146
|
+
"onClick:clear": G
|
158
147
|
}, {
|
159
|
-
prepend:
|
160
|
-
|
148
|
+
prepend: i(() => [
|
149
|
+
c(e.$slots, "prepend")
|
161
150
|
]),
|
162
|
-
prefix:
|
163
|
-
|
151
|
+
prefix: i(() => [
|
152
|
+
c(e.$slots, "prefix")
|
164
153
|
]),
|
165
|
-
append:
|
166
|
-
|
154
|
+
append: i(() => [
|
155
|
+
c(e.$slots, "append")
|
167
156
|
]),
|
168
|
-
suffix:
|
169
|
-
|
157
|
+
suffix: i(() => [
|
158
|
+
c(e.$slots, "suffix")
|
170
159
|
]),
|
171
|
-
default:
|
172
|
-
|
173
|
-
|
174
|
-
|
160
|
+
default: i(() => [
|
161
|
+
r(q) ? (Y(), C(ye, {
|
162
|
+
key: 0,
|
163
|
+
modelValue: n.value,
|
164
|
+
"onUpdate:modelValue": a[0] || (a[0] = (p) => n.value = p),
|
175
165
|
block: !0,
|
176
166
|
dialog: "",
|
177
167
|
offset: 4
|
178
168
|
}, {
|
179
|
-
default:
|
180
|
-
|
181
|
-
key: 0,
|
169
|
+
default: i(() => [
|
170
|
+
s("div", {
|
182
171
|
ref_key: "calendar",
|
183
|
-
ref:
|
184
|
-
class:
|
185
|
-
"bb-base-date-picker-input__calendar--shown":
|
172
|
+
ref: v,
|
173
|
+
class: w(["bb-base-date-picker-input__calendar", {
|
174
|
+
"bb-base-date-picker-input__calendar--shown": n.value
|
186
175
|
}]),
|
187
|
-
inert: !
|
176
|
+
inert: !n.value
|
188
177
|
}, [
|
189
|
-
|
178
|
+
B(be, S({ id: r(f) }, U, {
|
190
179
|
ref_key: "basedatepicker",
|
191
|
-
ref:
|
180
|
+
ref: V,
|
192
181
|
disabled: e.disabled,
|
193
182
|
"first-day-of-week": e.firstDayOfWeek,
|
194
183
|
max: e.max,
|
@@ -198,73 +187,73 @@ const De = ["inert"], Ce = ["id", "aria-describedby", "autocomplete", "autofocus
|
|
198
187
|
readonly: e.readonly,
|
199
188
|
selectable: e.selectable
|
200
189
|
}), null, 16, ["id", "disabled", "first-day-of-week", "max", "min", "model-value", "range", "readonly", "selectable"])
|
201
|
-
], 10,
|
190
|
+
], 10, ve)
|
202
191
|
]),
|
203
192
|
_: 1
|
204
|
-
}, 8, ["modelValue"]),
|
205
|
-
x(
|
206
|
-
id: r(
|
193
|
+
}, 8, ["modelValue"])) : X("", !0),
|
194
|
+
x(s("input", S({
|
195
|
+
id: r(f),
|
207
196
|
ref_key: "input",
|
208
197
|
ref: _,
|
209
|
-
"aria-describedby": `bdpi-description_${r(
|
198
|
+
"aria-describedby": `bdpi-description_${r(f)}`,
|
210
199
|
autocomplete: e.autocomplete,
|
211
200
|
autofocus: e.autofocus,
|
212
201
|
"data-maska": t.range ? "##/##/#### - ##/##/####" : "##/##/####",
|
213
202
|
disabled: e.disabled,
|
214
|
-
inputmode:
|
203
|
+
inputmode: F.value,
|
215
204
|
name: e.name,
|
216
205
|
placeholder: e.placeholder,
|
217
206
|
readonly: e.readonly || e.range || !e.allowWriting,
|
218
207
|
required: e.required
|
219
|
-
},
|
208
|
+
}, A, {
|
220
209
|
size: "1",
|
221
210
|
type: "text",
|
222
|
-
value:
|
223
|
-
}), null, 16,
|
224
|
-
[r(
|
211
|
+
value: W.value
|
212
|
+
}), null, 16, Ve), [
|
213
|
+
[r(fe)]
|
225
214
|
]),
|
226
|
-
|
227
|
-
"aria-label":
|
215
|
+
s("button", {
|
216
|
+
"aria-label": z.value,
|
228
217
|
class: "bb-base-date-picker-input__calendar-btn",
|
229
218
|
disabled: e.disabled || e.readonly,
|
230
219
|
type: "button",
|
231
|
-
onClick:
|
220
|
+
onClick: ee(R, ["stop"])
|
232
221
|
}, a[1] || (a[1] = [
|
233
|
-
|
222
|
+
s("svg", {
|
234
223
|
fill: "none",
|
235
224
|
viewBox: "0 0 16 16",
|
236
225
|
xmlns: "http://www.w3.org/2000/svg"
|
237
226
|
}, [
|
238
|
-
|
227
|
+
s("path", {
|
239
228
|
d: "M12.6667 2.66667H3.33333C2.59695 2.66667 2 3.26363 2 4.00001V13.3333C2 14.0697 2.59695 14.6667 3.33333 14.6667H12.6667C13.403 14.6667 14 14.0697 14 13.3333V4.00001C14 3.26363 13.403 2.66667 12.6667 2.66667Z",
|
240
229
|
stroke: "currentColor",
|
241
230
|
"stroke-linecap": "round",
|
242
231
|
"stroke-linejoin": "round"
|
243
232
|
}),
|
244
|
-
|
233
|
+
s("path", {
|
245
234
|
d: "M10.6667 1.33333V3.99999",
|
246
235
|
stroke: "currentColor",
|
247
236
|
"stroke-linecap": "round",
|
248
237
|
"stroke-linejoin": "round"
|
249
238
|
}),
|
250
|
-
|
239
|
+
s("path", {
|
251
240
|
d: "M5.33333 1.33333V3.99999",
|
252
241
|
stroke: "currentColor",
|
253
242
|
"stroke-linecap": "round",
|
254
243
|
"stroke-linejoin": "round"
|
255
244
|
}),
|
256
|
-
|
245
|
+
s("path", {
|
257
246
|
d: "M2 6.66667H14",
|
258
247
|
stroke: "currentColor",
|
259
248
|
"stroke-linecap": "round",
|
260
249
|
"stroke-linejoin": "round"
|
261
250
|
})
|
262
251
|
], -1)
|
263
|
-
]), 8,
|
264
|
-
|
265
|
-
id: `bdpi-description_${r(
|
252
|
+
]), 8, Me),
|
253
|
+
s("span", {
|
254
|
+
id: `bdpi-description_${r(f)}`,
|
266
255
|
class: "bb-base-date-picker-input__accessible-description sr-only"
|
267
|
-
}, E(r(u)("baseDatePickerInput.dateFormat")) + " " + E(t.range ? r(u)("baseDatePickerInput.dateFormatRange") : r(u)("baseDatePickerInput.dateFormatSingle")), 9,
|
256
|
+
}, E(r(u)("baseDatePickerInput.dateFormat")) + " " + E(t.range ? r(u)("baseDatePickerInput.dateFormatRange") : r(u)("baseDatePickerInput.dateFormatSingle")), 9, he)
|
268
257
|
]),
|
269
258
|
_: 3
|
270
259
|
}, 8, ["append:icon", "clearable", "prepend:icon"])
|
@@ -274,5 +263,5 @@ const De = ["inert"], Ce = ["id", "aria-describedby", "autocomplete", "autofocus
|
|
274
263
|
}
|
275
264
|
});
|
276
265
|
export {
|
277
|
-
|
266
|
+
ze as default
|
278
267
|
};
|
package/dist/index230.js
CHANGED
@@ -1,7 +1,15 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
const
|
1
|
+
import { createElementBlock as t, openBlock as n, renderSlot as e } from "vue";
|
2
|
+
/* empty css */
|
3
|
+
import r from "./index299.js";
|
4
|
+
const s = {}, c = { class: "bb-common-input-outer-container" };
|
5
|
+
function p(o, a) {
|
6
|
+
return n(), t("span", c, [
|
7
|
+
e(o.$slots, "prepend-outer"),
|
8
|
+
e(o.$slots, "default"),
|
9
|
+
e(o.$slots, "append-outer")
|
10
|
+
]);
|
11
|
+
}
|
12
|
+
const i = /* @__PURE__ */ r(s, [["render", p]]);
|
5
13
|
export {
|
6
|
-
|
14
|
+
i as default
|
7
15
|
};
|
package/dist/index231.js
CHANGED
@@ -1,4 +1,179 @@
|
|
1
|
-
|
1
|
+
var w = Object.defineProperty, C = (a, t, e) => t in a ? w(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, A = (a, t, e) => C(a, typeof t != "symbol" ? t + "" : t, e);
|
2
|
+
const R = {
|
3
|
+
"#": { pattern: /[0-9]/ },
|
4
|
+
"@": { pattern: /[a-zA-Z]/ },
|
5
|
+
"*": { pattern: /[a-zA-Z0-9]/ }
|
6
|
+
}, N = (a, t, e) => a.replaceAll(t, "").replace(e, ".").replace("..", ".").replace(/[^.\d]/g, ""), I = (a, t, e) => {
|
7
|
+
var s;
|
8
|
+
return new Intl.NumberFormat(((s = e.number) == null ? void 0 : s.locale) ?? "en", {
|
9
|
+
minimumFractionDigits: a,
|
10
|
+
maximumFractionDigits: t,
|
11
|
+
roundingMode: "trunc"
|
12
|
+
});
|
13
|
+
}, P = (a, t = !0, e) => {
|
14
|
+
var s, r, n, h;
|
15
|
+
const u = ((s = e.number) == null ? void 0 : s.unsigned) !== !0 && a.startsWith("-") ? "-" : "", l = ((r = e.number) == null ? void 0 : r.fraction) ?? 0;
|
16
|
+
let o = I(0, l, e);
|
17
|
+
const k = o.formatToParts(1000.12), c = ((n = k.find((i) => i.type === "group")) == null ? void 0 : n.value) ?? " ", b = ((h = k.find((i) => i.type === "decimal")) == null ? void 0 : h.value) ?? ".", f = N(a, c, b);
|
18
|
+
if (Number.isNaN(parseFloat(f))) return u;
|
19
|
+
const g = f.split(".");
|
20
|
+
if (g[1] != null && g[1].length >= 1) {
|
21
|
+
const i = g[1].length <= l ? g[1].length : l;
|
22
|
+
o = I(i, l, e);
|
23
|
+
}
|
24
|
+
let m = o.format(parseFloat(f));
|
25
|
+
return t ? l > 0 && f.endsWith(".") && !f.slice(0, -1).includes(".") && (m += b) : m = N(m, c, b), u + m;
|
26
|
+
};
|
27
|
+
class T {
|
28
|
+
constructor(t = {}) {
|
29
|
+
A(this, "opts", {}), A(this, "memo", /* @__PURE__ */ new Map());
|
30
|
+
const e = { ...t };
|
31
|
+
if (e.tokens != null) {
|
32
|
+
e.tokens = e.tokensReplace ? { ...e.tokens } : { ...R, ...e.tokens };
|
33
|
+
for (const s of Object.values(e.tokens))
|
34
|
+
typeof s.pattern == "string" && (s.pattern = new RegExp(s.pattern));
|
35
|
+
} else
|
36
|
+
e.tokens = R;
|
37
|
+
Array.isArray(e.mask) && (e.mask.length > 1 ? e.mask = [...e.mask].sort((s, r) => s.length - r.length) : e.mask = e.mask[0] ?? ""), e.mask === "" && (e.mask = null), this.opts = e;
|
38
|
+
}
|
39
|
+
masked(t) {
|
40
|
+
return this.process(String(t), this.findMask(String(t)));
|
41
|
+
}
|
42
|
+
unmasked(t) {
|
43
|
+
return this.process(String(t), this.findMask(String(t)), !1);
|
44
|
+
}
|
45
|
+
isEager() {
|
46
|
+
return this.opts.eager === !0;
|
47
|
+
}
|
48
|
+
isReversed() {
|
49
|
+
return this.opts.reversed === !0;
|
50
|
+
}
|
51
|
+
completed(t) {
|
52
|
+
const e = this.findMask(String(t));
|
53
|
+
if (this.opts.mask == null || e == null) return !1;
|
54
|
+
const s = this.process(String(t), e).length;
|
55
|
+
return typeof this.opts.mask == "string" ? s >= this.opts.mask.length : s >= e.length;
|
56
|
+
}
|
57
|
+
findMask(t) {
|
58
|
+
const e = this.opts.mask;
|
59
|
+
if (e == null)
|
60
|
+
return null;
|
61
|
+
if (typeof e == "string")
|
62
|
+
return e;
|
63
|
+
if (typeof e == "function")
|
64
|
+
return e(t);
|
65
|
+
const s = this.process(t, e.slice(-1).pop() ?? "", !1);
|
66
|
+
return e.find((r) => this.process(t, r, !1).length >= s.length) ?? "";
|
67
|
+
}
|
68
|
+
escapeMask(t) {
|
69
|
+
const e = [], s = [];
|
70
|
+
return t.split("").forEach((r, n) => {
|
71
|
+
r === "!" && t[n - 1] !== "!" ? s.push(n - s.length) : e.push(r);
|
72
|
+
}), { mask: e.join(""), escaped: s };
|
73
|
+
}
|
74
|
+
process(t, e, s = !0) {
|
75
|
+
if (this.opts.number != null) return P(t, s, this.opts);
|
76
|
+
if (e == null) return t;
|
77
|
+
const r = `v=${t},mr=${e},m=${s ? 1 : 0}`;
|
78
|
+
if (this.memo.has(r)) return this.memo.get(r);
|
79
|
+
const { mask: n, escaped: h } = this.escapeMask(e), u = [], l = this.opts.tokens != null ? this.opts.tokens : {}, o = this.isReversed() ? -1 : 1, k = this.isReversed() ? "unshift" : "push", c = this.isReversed() ? 0 : n.length - 1, b = this.isReversed() ? () => i > -1 && p > -1 : () => i < n.length && p < t.length, f = (v) => !this.isReversed() && v <= c || this.isReversed() && v >= c;
|
80
|
+
let g, m = -1, i = this.isReversed() ? n.length - 1 : 0, p = this.isReversed() ? t.length - 1 : 0, M = !1;
|
81
|
+
for (; b(); ) {
|
82
|
+
const v = n.charAt(i), d = l[v], y = (d == null ? void 0 : d.transform) != null ? d.transform(t.charAt(p)) : t.charAt(p);
|
83
|
+
if (!h.includes(i) && d != null ? (y.match(d.pattern) != null ? (u[k](y), d.repeated ? (m === -1 ? m = i : i === c && i !== m && (i = m - o), c === m && (i -= o)) : d.multiple && (M = !0, i -= o), i += o) : d.multiple ? M && (i += o, p -= o, M = !1) : y === g ? g = void 0 : d.optional && (i += o, p -= o), p += o) : (s && !this.isEager() && u[k](v), y === v && !this.isEager() ? p += o : g = v, this.isEager() || (i += o)), this.isEager())
|
84
|
+
for (; f(i) && (l[n.charAt(i)] == null || h.includes(i)); ) {
|
85
|
+
if (s) {
|
86
|
+
if (u[k](n.charAt(i)), t.charAt(p) === n.charAt(i)) {
|
87
|
+
i += o, p += o;
|
88
|
+
continue;
|
89
|
+
}
|
90
|
+
} else n.charAt(i) === t.charAt(p) && (p += o);
|
91
|
+
i += o;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
return this.memo.set(r, u.join("")), this.memo.get(r);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
const S = (a) => JSON.parse(a.replaceAll("'", '"')), F = (a, t = {}) => {
|
98
|
+
const e = { ...t };
|
99
|
+
a.dataset.maska != null && a.dataset.maska !== "" && (e.mask = W(a.dataset.maska)), a.dataset.maskaEager != null && (e.eager = E(a.dataset.maskaEager)), a.dataset.maskaReversed != null && (e.reversed = E(a.dataset.maskaReversed)), a.dataset.maskaTokensReplace != null && (e.tokensReplace = E(a.dataset.maskaTokensReplace)), a.dataset.maskaTokens != null && (e.tokens = x(a.dataset.maskaTokens));
|
100
|
+
const s = {};
|
101
|
+
return a.dataset.maskaNumberLocale != null && (s.locale = a.dataset.maskaNumberLocale), a.dataset.maskaNumberFraction != null && (s.fraction = parseInt(a.dataset.maskaNumberFraction)), a.dataset.maskaNumberUnsigned != null && (s.unsigned = E(a.dataset.maskaNumberUnsigned)), (a.dataset.maskaNumber != null || Object.values(s).length > 0) && (e.number = s), e;
|
102
|
+
}, E = (a) => a !== "" ? !!JSON.parse(a) : !0, W = (a) => a.startsWith("[") && a.endsWith("]") ? S(a) : a, x = (a) => {
|
103
|
+
if (a.startsWith("{") && a.endsWith("}"))
|
104
|
+
return S(a);
|
105
|
+
const t = {};
|
106
|
+
return a.split("|").forEach((e) => {
|
107
|
+
const s = e.split(":");
|
108
|
+
t[s[0]] = {
|
109
|
+
pattern: new RegExp(s[1]),
|
110
|
+
optional: s[2] === "optional",
|
111
|
+
multiple: s[2] === "multiple",
|
112
|
+
repeated: s[2] === "repeated"
|
113
|
+
};
|
114
|
+
}), t;
|
115
|
+
};
|
116
|
+
class O {
|
117
|
+
constructor(t, e = {}) {
|
118
|
+
A(this, "items", /* @__PURE__ */ new Map()), A(this, "eventAbortController"), A(this, "onInput", (s) => {
|
119
|
+
if (s instanceof CustomEvent && s.type === "input" && !s.isTrusted && !s.bubbles)
|
120
|
+
return;
|
121
|
+
const r = s.target, n = this.items.get(r), h = "inputType" in s && s.inputType.startsWith("delete"), u = n.isEager(), l = h && u && n.unmasked(r.value) === "" ? "" : r.value;
|
122
|
+
this.fixCursor(r, h, () => this.setValue(r, l));
|
123
|
+
}), this.options = e, this.eventAbortController = new AbortController(), this.init(this.getInputs(t));
|
124
|
+
}
|
125
|
+
update(t = {}) {
|
126
|
+
this.options = { ...t }, this.init(Array.from(this.items.keys()));
|
127
|
+
}
|
128
|
+
updateValue(t) {
|
129
|
+
t.value !== "" && t.value !== this.processInput(t).masked && this.setValue(t, t.value);
|
130
|
+
}
|
131
|
+
destroy() {
|
132
|
+
this.eventAbortController.abort(), this.items.clear();
|
133
|
+
}
|
134
|
+
init(t) {
|
135
|
+
const e = this.getOptions(this.options);
|
136
|
+
for (const s of t) {
|
137
|
+
if (!this.items.has(s)) {
|
138
|
+
const { signal: n } = this.eventAbortController;
|
139
|
+
s.addEventListener("input", this.onInput, { capture: !0, signal: n });
|
140
|
+
}
|
141
|
+
const r = new T(F(s, e));
|
142
|
+
this.items.set(s, r), queueMicrotask(() => this.updateValue(s)), s.selectionStart === null && r.isEager() && console.warn("Maska: input of `%s` type is not supported", s.type);
|
143
|
+
}
|
144
|
+
}
|
145
|
+
getInputs(t) {
|
146
|
+
return typeof t == "string" ? Array.from(document.querySelectorAll(t)) : "length" in t ? Array.from(t) : [t];
|
147
|
+
}
|
148
|
+
getOptions(t) {
|
149
|
+
const { onMaska: e, preProcess: s, postProcess: r, ...n } = t;
|
150
|
+
return n;
|
151
|
+
}
|
152
|
+
fixCursor(t, e, s) {
|
153
|
+
const r = t.selectionStart, n = t.value;
|
154
|
+
if (s(), r === null || r === n.length && !e) return;
|
155
|
+
const h = t.value, u = n.slice(0, r), l = h.slice(0, r), o = this.processInput(t, u).unmasked, k = this.processInput(t, l).unmasked;
|
156
|
+
let c = r;
|
157
|
+
u !== l && (c += e ? h.length - n.length : o.length - k.length), t.setSelectionRange(c, c);
|
158
|
+
}
|
159
|
+
setValue(t, e) {
|
160
|
+
const s = this.processInput(t, e);
|
161
|
+
t.value = s.masked, this.options.onMaska != null && (Array.isArray(this.options.onMaska) ? this.options.onMaska.forEach((r) => r(s)) : this.options.onMaska(s)), t.dispatchEvent(new CustomEvent("maska", { detail: s })), t.dispatchEvent(new CustomEvent("input", { detail: s.masked }));
|
162
|
+
}
|
163
|
+
processInput(t, e) {
|
164
|
+
const s = this.items.get(t);
|
165
|
+
let r = e ?? t.value;
|
166
|
+
this.options.preProcess != null && (r = this.options.preProcess(r));
|
167
|
+
let n = s.masked(r);
|
168
|
+
return this.options.postProcess != null && (n = this.options.postProcess(n)), {
|
169
|
+
masked: n,
|
170
|
+
unmasked: s.unmasked(r),
|
171
|
+
completed: s.completed(r)
|
172
|
+
};
|
173
|
+
}
|
174
|
+
}
|
2
175
|
export {
|
3
|
-
|
176
|
+
T as Mask,
|
177
|
+
O as MaskInput,
|
178
|
+
R as tokens
|
4
179
|
};
|
package/dist/index232.js
CHANGED
@@ -1,4 +1,43 @@
|
|
1
|
-
|
1
|
+
import { unrefElement as g } from "./index137.js";
|
2
|
+
import { toArray as A, notNullish as D, tryOnScopeDispose as y } from "./index206.js";
|
3
|
+
import { createFocusTrap as F } from "./index308.js";
|
4
|
+
import { shallowRef as n, computed as T, toValue as i, watch as w } from "vue";
|
5
|
+
function N(f, a = {}) {
|
6
|
+
let t;
|
7
|
+
const { immediate: l, ...p } = a, o = n(!1), r = n(!1), c = (e) => t && t.activate(e), u = (e) => t && t.deactivate(e), v = () => {
|
8
|
+
t && (t.pause(), r.value = !0);
|
9
|
+
}, m = () => {
|
10
|
+
t && (t.unpause(), r.value = !1);
|
11
|
+
}, h = T(() => {
|
12
|
+
const e = i(f);
|
13
|
+
return A(e).map((d) => {
|
14
|
+
const s = i(d);
|
15
|
+
return typeof s == "string" ? s : g(s);
|
16
|
+
}).filter(D);
|
17
|
+
});
|
18
|
+
return w(
|
19
|
+
h,
|
20
|
+
(e) => {
|
21
|
+
e.length && (t = F(e, {
|
22
|
+
...p,
|
23
|
+
onActivate() {
|
24
|
+
o.value = !0, a.onActivate && a.onActivate();
|
25
|
+
},
|
26
|
+
onDeactivate() {
|
27
|
+
o.value = !1, a.onDeactivate && a.onDeactivate();
|
28
|
+
}
|
29
|
+
}), l && c());
|
30
|
+
},
|
31
|
+
{ flush: "post" }
|
32
|
+
), y(() => u()), {
|
33
|
+
hasFocus: o,
|
34
|
+
isPaused: r,
|
35
|
+
activate: c,
|
36
|
+
deactivate: u,
|
37
|
+
pause: v,
|
38
|
+
unpause: m
|
39
|
+
};
|
40
|
+
}
|
2
41
|
export {
|
3
|
-
|
42
|
+
N as useFocusTrap
|
4
43
|
};
|
package/dist/index233.js
CHANGED
@@ -1,13 +1,8 @@
|
|
1
|
-
|
2
|
-
const
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
s && (t.value = r, n());
|
7
|
-
}
|
8
|
-
);
|
9
|
-
return t;
|
10
|
-
};
|
1
|
+
const o = (e, t = 50) => new Promise((r) => {
|
2
|
+
const n = setInterval(() => {
|
3
|
+
e() && (clearInterval(n), r());
|
4
|
+
}, t);
|
5
|
+
});
|
11
6
|
export {
|
12
|
-
|
7
|
+
o as waitFor
|
13
8
|
};
|