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.
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +0 -1
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +1 -7
- package/dist/components/BbAlert/BbAlert.vue.d.ts +0 -1
- package/dist/components/BbChip/BbChip.vue.d.ts +0 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +0 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -1
- package/dist/components/BbRows/BbRows.vue.d.ts +1 -0
- package/dist/components/BbTable/BbTable.vue.d.ts +2 -7
- package/dist/components/BbTable/types.d.ts +13 -0
- package/dist/components/ListBox.vue.d.ts +0 -2
- package/dist/composables/useLocale.d.ts +1 -1
- package/dist/i18n/en.d.ts +45 -0
- package/dist/i18n/it.d.ts +45 -0
- package/dist/index100.js +46 -45
- package/dist/index111.js +223 -205
- package/dist/index119.js +2 -2
- package/dist/index121.js +55 -54
- package/dist/index123.js +1 -1
- package/dist/index125.js +14 -13
- package/dist/index127.js +1 -1
- package/dist/index128.js +1 -1
- package/dist/index129.js +1 -1
- package/dist/index13.js +2 -2
- package/dist/index133.js +2 -2
- package/dist/index15.js +36 -35
- package/dist/index17.js +3 -3
- package/dist/index19.js +63 -64
- package/dist/index207.js +8 -2
- package/dist/index208.js +3 -4
- package/dist/index209.js +53 -2
- package/dist/index21.js +110 -103
- package/dist/index211.js +13 -16
- package/dist/index212.js +3 -16
- package/dist/index213.js +40 -18
- package/dist/index214.js +6 -19
- package/dist/index215.js +7 -27
- package/dist/index216.js +12 -3
- package/dist/index217.js +13 -2
- package/dist/index218.js +2 -8
- package/dist/index219.js +4 -250
- package/dist/index220.js +2 -52
- package/dist/index221.js +3 -44
- package/dist/index222.js +20 -5
- package/dist/index223.js +4 -60
- package/dist/index224.js +281 -84
- package/dist/index225.js +18 -0
- package/dist/index226.js +16 -8
- package/dist/index227.js +18 -24
- package/dist/index228.js +14 -16
- package/dist/index229.js +18 -47
- package/dist/index23.js +127 -119
- package/dist/index230.js +27 -15
- package/dist/index231.js +2 -12
- package/dist/index232.js +250 -16
- package/dist/index233.js +52 -3
- package/dist/index234.js +44 -41
- package/dist/index235.js +5 -6
- package/dist/index236.js +60 -7
- package/dist/index237.js +126 -12
- package/dist/index238.js +124 -52
- package/dist/index239.js +4 -0
- package/dist/index240.js +4 -12
- package/dist/index241.js +369 -3
- package/dist/index242.js +85 -125
- package/dist/index244.js +25 -2
- package/dist/index245.js +16 -19
- package/dist/index246.js +48 -5
- package/dist/index247.js +12 -366
- package/dist/index248.js +12 -4
- package/dist/index249.js +16 -2
- package/dist/index25.js +44 -41
- package/dist/index250.js +2 -2
- package/dist/index251.js +18 -2
- package/dist/index252.js +105 -17
- package/dist/{index255.js → index254.js} +2 -2
- package/dist/index256.js +14 -0
- package/dist/index257.js +2 -12
- package/dist/index258.js +2 -10
- package/dist/index259.js +9 -2
- package/dist/index260.js +3 -6
- package/dist/index261.js +8 -15
- package/dist/index262.js +23 -9
- package/dist/index263.js +88 -8
- package/dist/index265.js +6 -89
- package/dist/index266.js +18 -0
- package/dist/index267.js +9 -4
- package/dist/index268.js +9 -6
- package/dist/index269.js +8 -2
- package/dist/index27.js +1 -1
- package/dist/index270.js +28 -2
- package/dist/index271.js +3 -2
- package/dist/index273.js +7 -2
- package/dist/index274.js +431 -2
- package/dist/index275.js +1 -1
- package/dist/index276.js +89 -2
- package/dist/index277.js +7 -2
- package/dist/index278.js +11 -2
- package/dist/index279.js +4 -28
- package/dist/index280.js +224 -22
- package/dist/index281.js +202 -0
- package/dist/index282.js +175 -6
- package/dist/index283.js +6 -3
- package/dist/index284.js +2 -7
- package/dist/index285.js +2 -11
- package/dist/index286.js +2 -17
- package/dist/index287.js +2 -9
- package/dist/index288.js +2 -431
- package/dist/index289.js +2 -2
- package/dist/index29.js +2 -2
- package/dist/index290.js +2 -89
- package/dist/index291.js +2 -3
- package/dist/index292.js +4 -0
- package/dist/index293.js +2 -224
- package/dist/index294.js +2 -200
- package/dist/index295.js +22 -2
- package/dist/index297.js +2 -176
- package/dist/index298.js +125 -21
- package/dist/index299.js +24 -0
- package/dist/index301.js +3 -436
- package/dist/index302.js +16 -126
- package/dist/index303.js +436 -3
- package/dist/index304.js +127 -3
- package/dist/index305.js +3 -213
- package/dist/index306.js +3 -3
- package/dist/index307.js +214 -3
- package/dist/index308.js +3 -58
- package/dist/index309.js +3 -7
- package/dist/index31.js +2 -2
- package/dist/index310.js +3 -19
- package/dist/index311.js +56 -64
- package/dist/index312.js +2 -7
- package/dist/index313.js +67 -2
- package/dist/index314.js +5 -5
- package/dist/index315.js +32 -7
- package/dist/index316.js +7 -8
- package/dist/index317.js +18 -7
- package/dist/index318.js +53 -5
- package/dist/index319.js +53 -3
- package/dist/index320.js +46 -3
- package/dist/index321.js +6 -32
- package/dist/index322.js +4 -46
- package/dist/index323.js +8 -2
- package/dist/index324.js +2 -2
- package/dist/index325.js +6 -0
- package/dist/index326.js +2 -424
- package/dist/index328.js +424 -2
- package/dist/index33.js +45 -45
- package/dist/index35.js +56 -55
- package/dist/index37.js +166 -165
- package/dist/index39.js +4 -4
- package/dist/index41.js +2 -2
- package/dist/index43.js +70 -71
- package/dist/index45.js +7 -7
- package/dist/index47.js +2 -2
- package/dist/index49.js +2 -2
- package/dist/index53.js +28 -27
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +32 -31
- package/dist/index75.js +3 -3
- package/dist/index77.js +87 -86
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/index84.js +45 -44
- package/dist/index86.js +67 -66
- package/dist/index88.js +69 -67
- package/package.json +1 -1
- package/dist/index210.js +0 -283
- package/dist/index243.js +0 -127
- package/dist/index253.js +0 -108
- package/dist/index264.js +0 -25
- package/dist/index296.js +0 -128
- package/dist/index300.js +0 -10
- /package/dist/{index327.js → index329.js} +0 -0
- /package/dist/{index272.js → index330.js} +0 -0
package/dist/index19.js
CHANGED
@@ -1,17 +1,16 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import
|
1
|
+
import { defineComponent as j, ref as k, toRef as d, openBlock as z, createBlock as G, unref as B, withCtx as s, renderSlot as l, normalizeProps as h, guardReactiveProps as b, createVNode as R, mergeProps as T } from "vue";
|
2
|
+
import W from "./index17.js";
|
3
3
|
/* empty css */
|
4
|
-
import
|
4
|
+
import K from "./index242.js";
|
5
5
|
/* empty css */
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
|
14
|
-
const me = /* @__PURE__ */ z({
|
6
|
+
import { useItemsGetter as N } from "./index244.js";
|
7
|
+
import { useIndexById as w } from "./index245.js";
|
8
|
+
import { useBaseOptions as U } from "./index246.js";
|
9
|
+
import { useCoherence as q } from "./index247.js";
|
10
|
+
import { hash as J } from "./index208.js";
|
11
|
+
import { useHashedWatcher as C } from "./index248.js";
|
12
|
+
import { usePrefill as Q } from "./index249.js";
|
13
|
+
const de = /* @__PURE__ */ j({
|
15
14
|
__name: "BaseCheckboxGroup",
|
16
15
|
props: {
|
17
16
|
ariaDescribedby: {},
|
@@ -37,98 +36,98 @@ const me = /* @__PURE__ */ z({
|
|
37
36
|
readonly: { type: Boolean }
|
38
37
|
},
|
39
38
|
emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
|
40
|
-
setup(
|
41
|
-
const o =
|
39
|
+
setup(E, { emit: L }) {
|
40
|
+
const o = E, a = L;
|
42
41
|
if (!Array.isArray(o.modelValue))
|
43
42
|
throw new Error("Model value must be an array in checkbox group.");
|
44
|
-
const
|
45
|
-
getter:
|
46
|
-
items:
|
47
|
-
loading:
|
48
|
-
} =
|
43
|
+
const v = k(), i = k(!1), {
|
44
|
+
getter: u,
|
45
|
+
items: D,
|
46
|
+
loading: I
|
47
|
+
} = N({
|
49
48
|
items: d(o, "items"),
|
50
49
|
debounce: 0
|
51
|
-
}),
|
52
|
-
o.enforceCoherence && !
|
53
|
-
}, { hasPrefilled:
|
50
|
+
}), c = () => {
|
51
|
+
o.enforceCoherence && !V.value && a("update:modelValue", P.value.coherent);
|
52
|
+
}, { hasPrefilled: $ } = Q({
|
54
53
|
onStart: !0,
|
55
54
|
currentValue: o.modelValue,
|
56
55
|
multiple: !0,
|
57
56
|
fn: async ({ prefill: e }) => {
|
58
|
-
await
|
57
|
+
await u(e, o.modelValue), c();
|
59
58
|
}
|
60
|
-
}), { data:
|
59
|
+
}), { data: y } = w({
|
61
60
|
items: d(o, "modelValue")
|
62
|
-
}), { options:
|
61
|
+
}), { options: g } = U({
|
63
62
|
disabled: d(o, "disabled"),
|
64
|
-
items:
|
63
|
+
items: D,
|
65
64
|
itemText: o.itemText,
|
66
65
|
itemValue: o.itemValue,
|
67
66
|
max: o.max,
|
68
67
|
selectable: !0,
|
69
|
-
selectedIndexedByHash:
|
68
|
+
selectedIndexedByHash: y
|
70
69
|
}), H = async (e) => {
|
71
70
|
a("update:modelValue", o.modelValue.concat(e.value));
|
72
|
-
},
|
73
|
-
const t = { ...
|
71
|
+
}, x = async (e) => {
|
72
|
+
const t = { ...y.value };
|
74
73
|
delete t[e.valueHash], a("update:modelValue", Object.values(t));
|
75
|
-
}, { data:
|
76
|
-
items:
|
74
|
+
}, { data: M } = w({
|
75
|
+
items: g,
|
77
76
|
key: "valueHash"
|
78
|
-
}), { coherent:
|
77
|
+
}), { coherent: V, status: P } = q({
|
79
78
|
modelValue: d(o, "modelValue"),
|
80
79
|
multiple: !0,
|
81
|
-
iteratee: (e) => !!
|
80
|
+
iteratee: (e) => !!M.value[J(e)]
|
82
81
|
});
|
83
82
|
let r = 0;
|
84
|
-
|
83
|
+
C(
|
85
84
|
() => o.modelValue,
|
86
85
|
async () => {
|
87
|
-
r++,
|
86
|
+
r++, V.value || (await u(!1, o.modelValue), c()), r--;
|
88
87
|
},
|
89
88
|
{
|
90
89
|
debounce: o.modelValueDebounceTime
|
91
90
|
}
|
92
|
-
),
|
91
|
+
), C(
|
93
92
|
() => [o.dependencies, o.items],
|
94
93
|
async () => {
|
95
|
-
|
94
|
+
$.value && (r++, await u(!1, o.modelValue), r === 1 && c(), r--);
|
96
95
|
},
|
97
96
|
{
|
98
97
|
debounce: o.depsDebounceTime
|
99
98
|
}
|
100
99
|
);
|
101
|
-
const
|
100
|
+
const F = (e) => {
|
102
101
|
if (o.id)
|
103
102
|
return [o.id, e.valueHash].filter(Boolean).join("-");
|
104
|
-
},
|
105
|
-
a("change", e), t.selected ?
|
106
|
-
},
|
103
|
+
}, O = (e, t) => {
|
104
|
+
a("change", e), t.selected ? x(t) : H(t);
|
105
|
+
}, S = {
|
107
106
|
onBlur: (e) => a("blur", e),
|
108
107
|
onClick: (e) => a("click", e),
|
109
108
|
onFocus: (e) => {
|
110
|
-
a("focus", e), i.value || (document.addEventListener("focusin",
|
109
|
+
a("focus", e), i.value || (document.addEventListener("focusin", m, { passive: !0 }), document.addEventListener("click", p, { passive: !0 }), i.value = !0);
|
111
110
|
},
|
112
111
|
onInput: (e) => a("input", e),
|
113
112
|
onKeydown: (e) => a("keydown", e),
|
114
113
|
onMousedown: (e) => a("mousedown", e),
|
115
114
|
onMouseup: (e) => a("mouseup", e)
|
116
|
-
},
|
115
|
+
}, m = (e) => {
|
117
116
|
var t;
|
118
|
-
e.target instanceof HTMLElement && ((t =
|
119
|
-
},
|
117
|
+
e.target instanceof HTMLElement && ((t = v.value) != null && t.contains(e.target) || (a("inactive"), i.value = !1, document.removeEventListener("focusin", m), document.removeEventListener("click", p)));
|
118
|
+
}, p = (e) => {
|
120
119
|
var t;
|
121
|
-
e.target instanceof HTMLElement && ((t =
|
120
|
+
e.target instanceof HTMLElement && ((t = v.value) != null && t.contains(e.target) || (a("inactive"), i.value = !1, document.removeEventListener("focusin", m), document.removeEventListener("click", p)));
|
122
121
|
};
|
123
|
-
return (e, t) => (
|
122
|
+
return (e, t) => (z(), G(K, {
|
124
123
|
class: "bb-base-checkbox-group",
|
125
124
|
direction: e.direction,
|
126
125
|
"has-errors": e.hasErrors,
|
127
126
|
"hide-label": e.hideLabel,
|
128
|
-
loading: !!
|
129
|
-
"loading-text": e.loadingText
|
130
|
-
"no-data-text": e.noDataText
|
131
|
-
options:
|
127
|
+
loading: !!B(I),
|
128
|
+
"loading-text": e.loadingText,
|
129
|
+
"no-data-text": e.noDataText,
|
130
|
+
options: B(g)
|
132
131
|
}, {
|
133
132
|
prepend: s(() => [
|
134
133
|
l(e.$slots, "prepend")
|
@@ -140,16 +139,16 @@ const me = /* @__PURE__ */ z({
|
|
140
139
|
l(e.$slots, "no-data")
|
141
140
|
]),
|
142
141
|
label: s((n) => [
|
143
|
-
l(e.$slots, "label", b(
|
142
|
+
l(e.$slots, "label", h(b(n)))
|
144
143
|
]),
|
145
144
|
"option:prepend": s((n) => [
|
146
|
-
l(e.$slots, "option:prepend", b(
|
145
|
+
l(e.$slots, "option:prepend", h(b(n)))
|
147
146
|
]),
|
148
|
-
input: s(({ option: n, index:
|
149
|
-
W
|
150
|
-
id:
|
147
|
+
input: s(({ option: n, index: A }) => [
|
148
|
+
R(W, T({
|
149
|
+
id: F(n),
|
151
150
|
"aria-describedby": e.ariaDescribedby,
|
152
|
-
autofocus: e.autofocus && !
|
151
|
+
autofocus: e.autofocus && !A,
|
153
152
|
checked: n.selected,
|
154
153
|
color: e.color,
|
155
154
|
disabled: n.disabled,
|
@@ -157,20 +156,20 @@ const me = /* @__PURE__ */ z({
|
|
157
156
|
name: e.name,
|
158
157
|
readonly: e.readonly,
|
159
158
|
"true-value": n.value
|
160
|
-
},
|
161
|
-
onChange: (
|
159
|
+
}, S, {
|
160
|
+
onChange: (f) => O(f, n)
|
162
161
|
}), {
|
163
|
-
icon: s((
|
164
|
-
l(e.$slots, "icon",
|
162
|
+
icon: s((f) => [
|
163
|
+
l(e.$slots, "icon", T({
|
165
164
|
item: n.item,
|
166
165
|
text: n.text
|
167
|
-
},
|
166
|
+
}, f))
|
168
167
|
]),
|
169
168
|
_: 2
|
170
169
|
}, 1040, ["id", "aria-describedby", "autofocus", "checked", "color", "disabled", "has-errors", "name", "readonly", "true-value", "onChange"])
|
171
170
|
]),
|
172
171
|
"option:append": s((n) => [
|
173
|
-
l(e.$slots, "option:append", b(
|
172
|
+
l(e.$slots, "option:append", h(b(n)))
|
174
173
|
]),
|
175
174
|
append: s(() => [
|
176
175
|
l(e.$slots, "append")
|
@@ -180,5 +179,5 @@ const me = /* @__PURE__ */ z({
|
|
180
179
|
}
|
181
180
|
});
|
182
181
|
export {
|
183
|
-
|
182
|
+
de as default
|
184
183
|
};
|
package/dist/index207.js
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
-
const
|
1
|
+
const o = "bitboss-ui | ", e = () => ({
|
2
|
+
warn: (r) => console.warn(`${o}${r}`),
|
3
|
+
error: (r) => console.error(`${o}${r}`),
|
4
|
+
throw: (r) => {
|
5
|
+
throw new Error(`${o}${r}`);
|
6
|
+
}
|
7
|
+
});
|
2
8
|
export {
|
3
|
-
|
9
|
+
e as useLogger
|
4
10
|
};
|
package/dist/index208.js
CHANGED
package/dist/index209.js
CHANGED
@@ -1,4 +1,55 @@
|
|
1
|
-
|
1
|
+
import { defineComponent as f, ref as d, openBlock as r, createElementBlock as _, renderSlot as e, createElementVNode as t, createBlock as s, unref as p, createCommentVNode as i, createVNode as c } from "vue";
|
2
|
+
/* empty css */
|
3
|
+
/* empty css */
|
4
|
+
import a from "./index127.js";
|
5
|
+
/* empty css */
|
6
|
+
import $ from "./index129.js";
|
7
|
+
/* empty css */
|
8
|
+
import b from "./index315.js";
|
9
|
+
const y = { class: "bb-common-input-inner-container__prefix" }, k = { class: "bb-common-input-inner-container__suffix" }, S = /* @__PURE__ */ f({
|
10
|
+
__name: "CommonInputInnerContainer",
|
11
|
+
props: {
|
12
|
+
"append:icon": {},
|
13
|
+
"prepend:icon": {},
|
14
|
+
preventFocus: { type: Boolean }
|
15
|
+
},
|
16
|
+
setup(m) {
|
17
|
+
const u = m, o = d(), l = () => {
|
18
|
+
var n;
|
19
|
+
!o.value || u.preventFocus || (n = o.value.querySelector("input")) == null || n.focus();
|
20
|
+
};
|
21
|
+
return (n, C) => (r(), _("span", {
|
22
|
+
ref_key: "container",
|
23
|
+
ref: o,
|
24
|
+
class: "bb-common-input-inner-container",
|
25
|
+
onClick: l
|
26
|
+
}, [
|
27
|
+
e(n.$slots, "prepend", {}, () => [
|
28
|
+
t("span", y, [
|
29
|
+
e(n.$slots, "prefix")
|
30
|
+
])
|
31
|
+
]),
|
32
|
+
n.$props["prepend:icon"] ? (r(), s(p(a), {
|
33
|
+
key: 0,
|
34
|
+
class: "bb-common-input-inner-container__prepend-icon",
|
35
|
+
type: n.$props["prepend:icon"]
|
36
|
+
}, null, 8, ["type"])) : i("", !0),
|
37
|
+
e(n.$slots, "default"),
|
38
|
+
n.$props["append:icon"] ? (r(), s(p(a), {
|
39
|
+
key: 1,
|
40
|
+
class: "bb-common-input-inner-container__append-icon",
|
41
|
+
type: n.$props["append:icon"]
|
42
|
+
}, null, 8, ["type"])) : i("", !0),
|
43
|
+
c(p($)),
|
44
|
+
c(b),
|
45
|
+
e(n.$slots, "append", {}, () => [
|
46
|
+
t("span", k, [
|
47
|
+
e(n.$slots, "suffix")
|
48
|
+
])
|
49
|
+
])
|
50
|
+
], 512));
|
51
|
+
}
|
52
|
+
});
|
2
53
|
export {
|
3
|
-
|
54
|
+
S as default
|
4
55
|
};
|
package/dist/index21.js
CHANGED
@@ -1,29 +1,32 @@
|
|
1
|
-
import { defineComponent as
|
1
|
+
import { defineComponent as E, watchPostEffect as W, ref as v, watch as I, openBlock as c, createElementBlock as w, createVNode as n, createElementVNode as r, unref as i, withCtx as u, createTextVNode as T, toDisplayString as m, createSlots as j, renderList as H, renderSlot as R, normalizeProps as Z, guardReactiveProps as q, createBlock as _, createCommentVNode as V } from "vue";
|
2
2
|
/* empty css */
|
3
3
|
/* empty css */
|
4
|
-
import {
|
5
|
-
import
|
4
|
+
import { _config as C } from "./index4.js";
|
5
|
+
import { useId as F } from "./index8.js";
|
6
|
+
import f from "./index13.js";
|
6
7
|
/* empty css */
|
7
|
-
import s from "./
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import
|
13
|
-
import
|
14
|
-
import {
|
15
|
-
import {
|
16
|
-
import
|
17
|
-
import
|
18
|
-
import
|
19
|
-
import
|
20
|
-
import
|
21
|
-
|
8
|
+
import s from "./index224.js";
|
9
|
+
import G from "./index225.js";
|
10
|
+
import J from "./index226.js";
|
11
|
+
import K from "./index227.js";
|
12
|
+
import Q from "./index228.js";
|
13
|
+
import X from "./index229.js";
|
14
|
+
import ee from "./index230.js";
|
15
|
+
import { hash as M } from "./index208.js";
|
16
|
+
import { last as ae } from "./index231.js";
|
17
|
+
import { useLogger as te } from "./index207.js";
|
18
|
+
import oe from "./index232.js";
|
19
|
+
import le from "./index233.js";
|
20
|
+
import re from "./index234.js";
|
21
|
+
import B from "./index235.js";
|
22
|
+
import se from "./index236.js";
|
23
|
+
import { useLocale as de } from "./index217.js";
|
24
|
+
const ie = { class: "bb-base-date-picker" }, ne = { class: "bb-base-date-picker__body" }, ue = { class: "bb-base-date-picker__controls" }, me = { class: "sr-only" }, pe = { class: "sr-only" }, ce = { class: "sr-only" }, fe = {
|
22
25
|
style: { transform: "rotate(180deg)" },
|
23
26
|
viewBox: "0 0 24 24",
|
24
27
|
width: "24px",
|
25
28
|
xmlns: "http://www.w3.org/2000/svg"
|
26
|
-
},
|
29
|
+
}, be = { class: "sr-only" }, ve = { class: "bb-base-date-picker__content" }, Ie = /* @__PURE__ */ E({
|
27
30
|
__name: "BaseDatePicker",
|
28
31
|
props: {
|
29
32
|
disabled: { type: Boolean },
|
@@ -39,79 +42,83 @@ const le = { class: "bb-base-date-picker" }, te = { class: "bb-base-date-picker_
|
|
39
42
|
selectable: {}
|
40
43
|
},
|
41
44
|
emits: ["update:modelValue"],
|
42
|
-
setup(
|
43
|
-
s.extend(
|
44
|
-
const
|
45
|
+
setup(L, { expose: O, emit: S }) {
|
46
|
+
s.extend(ee), s.extend(X), s.extend(G), s.extend(J);
|
47
|
+
const $ = { it: K, en: Q };
|
48
|
+
W(() => {
|
49
|
+
s.locale($[C.locale]);
|
50
|
+
});
|
51
|
+
const P = S, o = L, { t: p } = de();
|
45
52
|
s.updateLocale("it", {
|
46
|
-
weekStart:
|
53
|
+
weekStart: o.firstDayOfWeek
|
47
54
|
});
|
48
|
-
const
|
49
|
-
|
55
|
+
const A = o.id || F().id, y = te();
|
56
|
+
o.multiple && o.range && y.throw("Date picker cannot be both multiple and range."), (o.multiple || o.range) && (Array.isArray(o.modelValue) || y.throw(
|
50
57
|
"Date picker is set to select multiple dates but modelValue is not an array."
|
51
58
|
));
|
52
|
-
const
|
59
|
+
const a = v(s()), k = (e) => {
|
53
60
|
if (e)
|
54
61
|
if (Array.isArray(e)) {
|
55
62
|
if (e.length) {
|
56
|
-
if (e.map((d) => s(d).valueOf()).includes(
|
63
|
+
if (e.map((d) => s(d).valueOf()).includes(a.value.valueOf()))
|
57
64
|
return;
|
58
|
-
|
65
|
+
a.value = s(ae(e)).startOf("day");
|
59
66
|
return;
|
60
67
|
}
|
61
68
|
} else
|
62
|
-
|
69
|
+
a.value = s(e).startOf("day");
|
63
70
|
else
|
64
|
-
|
71
|
+
a.value = s().startOf("day");
|
65
72
|
};
|
66
|
-
|
67
|
-
const
|
68
|
-
|
69
|
-
}, $ = (e) => {
|
70
|
-
l.value = l.value.set("month", e);
|
71
|
-
}, L = () => {
|
72
|
-
l.value = l.value.add(1, "month");
|
73
|
-
}, A = () => {
|
74
|
-
l.value = l.value.subtract(1, "month");
|
73
|
+
k(o.modelValue);
|
74
|
+
const l = v("day"), h = (e) => {
|
75
|
+
l.value === e ? l.value = "day" : l.value = e;
|
75
76
|
}, D = (e) => {
|
76
|
-
|
77
|
-
},
|
78
|
-
|
77
|
+
a.value = a.value.set("month", e);
|
78
|
+
}, N = () => {
|
79
|
+
a.value = a.value.add(1, "month");
|
80
|
+
}, Y = () => {
|
81
|
+
a.value = a.value.subtract(1, "month");
|
82
|
+
}, U = (e) => {
|
83
|
+
a.value = a.value.set("year", e);
|
84
|
+
}, b = v(o.modelValue), x = (e) => {
|
85
|
+
b.value = e, P("update:modelValue", e);
|
79
86
|
};
|
80
|
-
return
|
81
|
-
() =>
|
87
|
+
return I(
|
88
|
+
() => o.modelValue,
|
82
89
|
() => {
|
83
|
-
|
90
|
+
M(o.modelValue) !== M(b.value) && (b.value = o.modelValue, k(o.modelValue));
|
84
91
|
}
|
85
|
-
),
|
92
|
+
), O({
|
86
93
|
resetStatus: () => {
|
87
|
-
|
94
|
+
l.value = "day";
|
88
95
|
}
|
89
|
-
}), (e,
|
90
|
-
|
91
|
-
cursor:
|
96
|
+
}), (e, t) => (c(), w("div", ie, [
|
97
|
+
n(le, {
|
98
|
+
cursor: a.value,
|
92
99
|
disabled: !!e.disabled,
|
93
100
|
hidden: !e.header
|
94
101
|
}, null, 8, ["cursor", "disabled", "hidden"]),
|
95
|
-
r("div",
|
96
|
-
r("div",
|
97
|
-
i(
|
102
|
+
r("div", ne, [
|
103
|
+
r("div", ue, [
|
104
|
+
n(i(f), {
|
98
105
|
class: "bb-base-date-picker__control bb-base-date-picker__month-control",
|
99
106
|
disabled: e.disabled,
|
100
|
-
onClick:
|
107
|
+
onClick: t[0] || (t[0] = (d) => h("month"))
|
101
108
|
}, {
|
102
|
-
default:
|
103
|
-
|
104
|
-
|
109
|
+
default: u(() => [
|
110
|
+
T(m(a.value.locale(i(C).locale).format("MMMM YYYY")) + " ", 1),
|
111
|
+
r("span", me, m(i(p)("datePicker.monthLabel")), 1)
|
105
112
|
]),
|
106
113
|
_: 1
|
107
114
|
}, 8, ["disabled"]),
|
108
|
-
i(
|
115
|
+
n(i(f), {
|
109
116
|
class: "bb-base-date-picker__control bb-base-date-picker__year-control",
|
110
117
|
disabled: e.disabled,
|
111
|
-
onClick:
|
118
|
+
onClick: t[1] || (t[1] = (d) => h("year"))
|
112
119
|
}, {
|
113
|
-
default:
|
114
|
-
r("svg", {
|
120
|
+
default: u(() => [
|
121
|
+
t[5] || (t[5] = r("svg", {
|
115
122
|
fill: "none",
|
116
123
|
height: "6",
|
117
124
|
viewBox: "0 0 10 6",
|
@@ -122,18 +129,18 @@ const le = { class: "bb-base-date-picker" }, te = { class: "bb-base-date-picker_
|
|
122
129
|
d: "M5.24124 5.81871L9.52771 1.39839C9.79517 1.12257 9.63305 0.595276 9.28077 0.595276H0.707839C0.355562 0.595276 0.193433 1.12257 0.460901 1.39839L4.74736 5.81871C4.88946 5.96524 5.09914 5.96524 5.24124 5.81871Z",
|
123
130
|
fill: "currentColor"
|
124
131
|
})
|
125
|
-
], -1),
|
126
|
-
r("span",
|
127
|
-
])
|
132
|
+
], -1)),
|
133
|
+
r("span", pe, m(i(p)("datePicker.yearLabel")), 1)
|
134
|
+
]),
|
128
135
|
_: 1
|
129
136
|
}, 8, ["disabled"]),
|
130
|
-
i(
|
137
|
+
n(i(f), {
|
131
138
|
class: "bb-base-date-picker__control",
|
132
|
-
disabled: e.disabled ||
|
133
|
-
onClick:
|
139
|
+
disabled: e.disabled || l.value !== "day",
|
140
|
+
onClick: Y
|
134
141
|
}, {
|
135
|
-
default:
|
136
|
-
r("svg", {
|
142
|
+
default: u(() => [
|
143
|
+
t[6] || (t[6] = r("svg", {
|
137
144
|
viewBox: "0 0 24 24",
|
138
145
|
width: "24px",
|
139
146
|
xmlns: "http://www.w3.org/2000/svg"
|
@@ -142,36 +149,36 @@ const le = { class: "bb-base-date-picker" }, te = { class: "bb-base-date-picker_
|
|
142
149
|
d: "M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z",
|
143
150
|
fill: "currentColor"
|
144
151
|
})
|
145
|
-
], -1),
|
146
|
-
r("span",
|
147
|
-
])
|
152
|
+
], -1)),
|
153
|
+
r("span", ce, m(i(p)("datePicker.previousMonthLabel")), 1)
|
154
|
+
]),
|
148
155
|
_: 1
|
149
156
|
}, 8, ["disabled"]),
|
150
|
-
i(
|
157
|
+
n(i(f), {
|
151
158
|
class: "bb-base-date-picker__control",
|
152
|
-
disabled: e.disabled ||
|
153
|
-
onClick:
|
159
|
+
disabled: e.disabled || l.value !== "day",
|
160
|
+
onClick: N
|
154
161
|
}, {
|
155
|
-
default:
|
156
|
-
(
|
162
|
+
default: u(() => [
|
163
|
+
(c(), w("svg", fe, t[7] || (t[7] = [
|
157
164
|
r("path", {
|
158
165
|
d: "M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z",
|
159
166
|
fill: "currentColor"
|
160
167
|
}, null, -1)
|
161
168
|
]))),
|
162
|
-
|
169
|
+
r("span", be, m(i(p)("datePicker.nextMonthLabel")), 1)
|
163
170
|
]),
|
164
171
|
_: 1
|
165
172
|
}, 8, ["disabled"])
|
166
173
|
]),
|
167
|
-
r("div",
|
168
|
-
|
169
|
-
id:
|
170
|
-
current:
|
171
|
-
cursor:
|
174
|
+
r("div", ve, [
|
175
|
+
n(oe, {
|
176
|
+
id: i(A),
|
177
|
+
current: l.value === "day",
|
178
|
+
cursor: a.value,
|
172
179
|
disabled: !!e.disabled,
|
173
180
|
"first-day-of-week": e.firstDayOfWeek,
|
174
|
-
inert:
|
181
|
+
inert: l.value !== "day",
|
175
182
|
max: e.max,
|
176
183
|
min: e.min,
|
177
184
|
"model-value": e.modelValue,
|
@@ -179,45 +186,45 @@ const le = { class: "bb-base-date-picker" }, te = { class: "bb-base-date-picker_
|
|
179
186
|
range: e.range,
|
180
187
|
readonly: e.readonly,
|
181
188
|
selectable: e.selectable,
|
182
|
-
"onUpdate:cursor":
|
183
|
-
"onUpdate:modelValue":
|
184
|
-
},
|
185
|
-
|
189
|
+
"onUpdate:cursor": t[2] || (t[2] = (d) => a.value = d),
|
190
|
+
"onUpdate:modelValue": x
|
191
|
+
}, j({ _: 2 }, [
|
192
|
+
H(e.$slots, (d, g) => ({
|
186
193
|
name: g,
|
187
|
-
fn:
|
188
|
-
|
194
|
+
fn: u((z) => [
|
195
|
+
R(e.$slots, g, Z(q(z)))
|
189
196
|
])
|
190
197
|
}))
|
191
198
|
]), 1032, ["id", "current", "cursor", "disabled", "first-day-of-week", "inert", "max", "min", "model-value", "multiple", "range", "readonly", "selectable"]),
|
192
|
-
|
199
|
+
n(B, {
|
193
200
|
direction: "right",
|
194
201
|
duration: 500,
|
195
202
|
gap: 30
|
196
203
|
}, {
|
197
|
-
default:
|
198
|
-
|
204
|
+
default: u(() => [
|
205
|
+
l.value === "month" ? (c(), _(re, {
|
199
206
|
key: 0,
|
200
|
-
cursor:
|
207
|
+
cursor: a.value,
|
201
208
|
disabled: !!e.disabled,
|
202
|
-
"onUpdate:month":
|
203
|
-
|
209
|
+
"onUpdate:month": t[3] || (t[3] = (d) => {
|
210
|
+
D(d), l.value = "day";
|
204
211
|
})
|
205
212
|
}, null, 8, ["cursor", "disabled"])) : V("", !0)
|
206
213
|
]),
|
207
214
|
_: 1
|
208
215
|
}),
|
209
|
-
|
216
|
+
n(B, {
|
210
217
|
direction: "top",
|
211
218
|
duration: 500,
|
212
219
|
gap: 30
|
213
220
|
}, {
|
214
|
-
default:
|
215
|
-
|
221
|
+
default: u(() => [
|
222
|
+
l.value === "year" ? (c(), _(se, {
|
216
223
|
key: 0,
|
217
|
-
cursor:
|
224
|
+
cursor: a.value,
|
218
225
|
disabled: !!e.disabled,
|
219
|
-
"onUpdate:year":
|
220
|
-
|
226
|
+
"onUpdate:year": t[4] || (t[4] = (d) => {
|
227
|
+
U(d), l.value = "day";
|
221
228
|
})
|
222
229
|
}, null, 8, ["cursor", "disabled"])) : V("", !0)
|
223
230
|
]),
|
@@ -229,5 +236,5 @@ const le = { class: "bb-base-date-picker" }, te = { class: "bb-base-date-picker_
|
|
229
236
|
}
|
230
237
|
});
|
231
238
|
export {
|
232
|
-
|
239
|
+
Ie as default
|
233
240
|
};
|