bitboss-ui 2.0.105 → 2.0.106
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/BbTable/BbTable.vue.d.ts +2 -7
- 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 +9 -9
- package/dist/index111.js +109 -108
- 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 +1 -1
- package/dist/index131.js +1 -1
- package/dist/index132.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/index205.js +2 -115
- package/dist/index206.js +86 -2
- package/dist/index208.js +25 -4
- package/dist/index209.js +17 -2
- package/dist/index21.js +110 -103
- package/dist/index210.js +46 -279
- package/dist/index211.js +15 -16
- package/dist/index212.js +3 -16
- package/dist/index213.js +12 -19
- package/dist/index214.js +16 -19
- package/dist/index215.js +2 -27
- package/dist/index216.js +4 -3
- package/dist/index217.js +2 -2
- package/dist/index219.js +3 -250
- package/dist/index220.js +41 -52
- package/dist/index221.js +5 -43
- package/dist/index222.js +7 -5
- package/dist/index223.js +10 -58
- package/dist/index224.js +12 -83
- package/dist/index225.js +55 -0
- package/dist/index227.js +13 -25
- package/dist/index228.js +5 -17
- package/dist/index229.js +15 -47
- package/dist/index23.js +127 -119
- package/dist/index230.js +16 -15
- package/dist/index231.js +19 -12
- package/dist/index232.js +15 -16
- package/dist/index233.js +19 -3
- package/dist/index234.js +26 -40
- package/dist/index235.js +2 -6
- package/dist/index236.js +250 -7
- package/dist/index237.js +50 -10
- package/dist/index238.js +39 -48
- package/dist/index239.js +7 -0
- package/dist/index240.js +60 -13
- package/dist/index241.js +20 -3
- package/dist/index242.js +3 -125
- package/dist/index243.js +123 -122
- package/dist/index244.js +125 -2
- package/dist/index245.js +2 -20
- package/dist/index246.js +2 -2
- package/dist/index247.js +2 -2
- package/dist/index248.js +114 -3
- package/dist/index249.js +3 -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 +3 -16
- package/dist/index262.js +17 -9
- package/dist/index263.js +8 -8
- package/dist/index264.js +28 -23
- package/dist/index265.js +4 -89
- package/dist/index266.js +433 -0
- package/dist/index267.js +2 -4
- package/dist/index268.js +88 -5
- package/dist/index269.js +7 -2
- package/dist/index27.js +1 -1
- package/dist/index270.js +11 -2
- package/dist/index271.js +3 -2
- package/dist/index273.js +7 -2
- package/dist/index274.js +200 -2
- package/dist/index275.js +281 -2
- package/dist/index276.js +6 -2
- package/dist/index277.js +2 -2
- package/dist/index278.js +2 -2
- package/dist/index279.js +2 -28
- package/dist/index280.js +2 -22
- package/dist/index282.js +2 -7
- package/dist/index283.js +2 -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 +20 -429
- package/dist/index29.js +3 -3
- package/dist/index290.js +8 -88
- package/dist/index291.js +23 -3
- package/dist/index292.js +91 -0
- package/dist/index294.js +171 -195
- package/dist/index297.js +22 -176
- package/dist/index299.js +11 -0
- package/dist/index300.js +6 -8
- package/dist/index301.js +15 -435
- package/dist/index302.js +8 -127
- package/dist/index303.js +224 -3
- package/dist/index304.js +436 -3
- package/dist/index305.js +126 -212
- package/dist/index306.js +3 -3
- package/dist/index307.js +3 -3
- package/dist/index308.js +212 -56
- package/dist/index309.js +67 -7
- package/dist/index31.js +2 -2
- package/dist/index310.js +2 -19
- package/dist/index311.js +5 -66
- package/dist/index312.js +4 -6
- package/dist/index313.js +8 -2
- package/dist/index314.js +6 -4
- package/dist/index315.js +18 -7
- package/dist/index316.js +45 -0
- package/dist/index317.js +47 -2
- package/dist/index318.js +7 -5
- package/dist/index319.js +32 -2
- package/dist/index321.js +2 -32
- package/dist/index322.js +3 -47
- package/dist/index323.js +3 -2
- package/dist/index324.js +49 -471
- package/dist/index325.js +49 -0
- package/dist/index326.js +2 -424
- package/dist/index327.js +479 -46
- package/dist/index329.js +426 -0
- package/dist/index33.js +45 -45
- package/dist/index330.js +49 -0
- package/dist/index35.js +56 -55
- package/dist/index37.js +166 -165
- package/dist/index39.js +5 -5
- 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/dist/index90.js +1 -1
- package/package.json +1 -1
- package/dist/index207.js +0 -4
- package/dist/index226.js +0 -10
- package/dist/index253.js +0 -108
- package/dist/index289.js +0 -4
- package/dist/index293.js +0 -226
- package/dist/index298.js +0 -24
- /package/dist/{index272.js → index281.js} +0 -0
- /package/dist/{index328.js → index331.js} +0 -0
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 "./index228.js";
|
9
|
+
import G from "./index229.js";
|
10
|
+
import J from "./index230.js";
|
11
|
+
import K from "./index231.js";
|
12
|
+
import Q from "./index232.js";
|
13
|
+
import X from "./index233.js";
|
14
|
+
import ee from "./index234.js";
|
15
|
+
import { hash as M } from "./index212.js";
|
16
|
+
import { last as ae } from "./index235.js";
|
17
|
+
import { useLogger as te } from "./index218.js";
|
18
|
+
import oe from "./index236.js";
|
19
|
+
import le from "./index237.js";
|
20
|
+
import re from "./index238.js";
|
21
|
+
import B from "./index239.js";
|
22
|
+
import se from "./index240.js";
|
23
|
+
import { useLocale as de } from "./index224.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
|
};
|
package/dist/index210.js
CHANGED
@@ -1,283 +1,50 @@
|
|
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
|
-
}, j = function s(n, t, r) {
|
31
|
-
var e;
|
32
|
-
if (!n) return x;
|
33
|
-
if (typeof n == "string") {
|
34
|
-
var i = n.toLowerCase();
|
35
|
-
D[i] && (e = i), t && (D[i] = t, e = i);
|
36
|
-
var u = n.split("-");
|
37
|
-
if (!e && u.length > 1) return s(u[0]);
|
38
|
-
} else {
|
39
|
-
var o = n.name;
|
40
|
-
D[o] = n, e = o;
|
41
|
-
}
|
42
|
-
return !r && e && (x = e), e || !r && x;
|
43
|
-
}, f = function(s, n) {
|
44
|
-
if (F(s)) return s.clone();
|
45
|
-
var t = typeof n == "object" ? n : {};
|
46
|
-
return t.date = s, t.args = arguments, new C(t);
|
47
|
-
}, a = P;
|
48
|
-
a.l = j, a.i = F, a.w = function(s, n) {
|
49
|
-
return f(s, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
|
1
|
+
import { computed as d, unref as s } from "vue";
|
2
|
+
import { useItemText as y } from "./index262.js";
|
3
|
+
import { useItemValue as x } from "./index263.js";
|
4
|
+
import { hash as w } from "./index212.js";
|
5
|
+
import { useLogger as D } from "./index218.js";
|
6
|
+
const { getItemText: O } = y(), { getItemValue: V } = x(), { warn: H } = D(), T = (i, l, t, a, c) => l || i.disabled ? !0 : typeof t == "function" ? !t(i) : !!(typeof t == "boolean" && !t || a && c >= a), q = ({
|
7
|
+
items: i,
|
8
|
+
disabled: l,
|
9
|
+
selectable: t,
|
10
|
+
itemText: a,
|
11
|
+
itemValue: c,
|
12
|
+
selectedIndexedByHash: p,
|
13
|
+
max: b = 1 / 0
|
14
|
+
}) => {
|
15
|
+
const v = d(() => s(l)), f = d(() => s(i)), h = Object.keys(p.value).length, g = s(b), m = (e) => {
|
16
|
+
const n = V(e, s(c)), o = w(n), u = O(e, s(a)), r = p.value[o] !== void 0, I = T(
|
17
|
+
e,
|
18
|
+
v.value,
|
19
|
+
t,
|
20
|
+
g,
|
21
|
+
h
|
22
|
+
);
|
23
|
+
return {
|
24
|
+
item: e,
|
25
|
+
text: u,
|
26
|
+
value: n,
|
27
|
+
valueHash: o,
|
28
|
+
selected: r,
|
29
|
+
disabled: s(I)
|
50
30
|
};
|
51
|
-
|
52
|
-
|
53
|
-
|
31
|
+
};
|
32
|
+
return {
|
33
|
+
options: d(() => {
|
34
|
+
const e = [], n = /* @__PURE__ */ new Set();
|
35
|
+
for (let o = 0; o < f.value.length; o++) {
|
36
|
+
const u = f.value[o];
|
37
|
+
u.disabled && H(
|
38
|
+
"Disabling an item by passing a disabled option to the item itself is deprecated and will be removed in a future version. Use the `disabled` prop or the `selectable` iteratee prop instead."
|
39
|
+
);
|
40
|
+
const r = m(u);
|
41
|
+
n.has(r.valueHash) || (n.add(r.valueHash), e.push(r));
|
54
42
|
}
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
if (a.u(e)) return /* @__PURE__ */ new Date();
|
61
|
-
if (e instanceof Date) return new Date(e);
|
62
|
-
if (typeof e == "string" && !/Z$/i.test(e)) {
|
63
|
-
var u = e.match(q);
|
64
|
-
if (u) {
|
65
|
-
var o = u[2] - 1 || 0, c = (u[7] || "0").substring(0, 3);
|
66
|
-
return i ? new Date(Date.UTC(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c)) : new Date(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c);
|
67
|
-
}
|
68
|
-
}
|
69
|
-
return new Date(e);
|
70
|
-
}(t), this.init();
|
71
|
-
}, n.init = function() {
|
72
|
-
var t = this.$d;
|
73
|
-
this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
|
74
|
-
}, n.$utils = function() {
|
75
|
-
return a;
|
76
|
-
}, n.isValid = function() {
|
77
|
-
return this.$d.toString() !== J;
|
78
|
-
}, n.isSame = function(t, r) {
|
79
|
-
var e = f(t);
|
80
|
-
return this.startOf(r) <= e && e <= this.endOf(r);
|
81
|
-
}, n.isAfter = function(t, r) {
|
82
|
-
return f(t) < this.startOf(r);
|
83
|
-
}, n.isBefore = function(t, r) {
|
84
|
-
return this.endOf(r) < f(t);
|
85
|
-
}, n.$g = function(t, r, e) {
|
86
|
-
return a.u(t) ? this[r] : this.set(e, t);
|
87
|
-
}, n.unix = function() {
|
88
|
-
return Math.floor(this.valueOf() / 1e3);
|
89
|
-
}, n.valueOf = function() {
|
90
|
-
return this.$d.getTime();
|
91
|
-
}, n.startOf = function(t, r) {
|
92
|
-
var e = this, i = !!a.u(r) || r, u = a.p(t), o = function(p, $) {
|
93
|
-
var v = a.w(e.$u ? Date.UTC(e.$y, $, p) : new Date(e.$y, $, p), e);
|
94
|
-
return i ? v : v.endOf(M);
|
95
|
-
}, c = function(p, $) {
|
96
|
-
return a.w(e.toDate()[p].apply(e.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($)), e);
|
97
|
-
}, h = this.$W, d = this.$M, l = this.$D, b = "set" + (this.$u ? "UTC" : "");
|
98
|
-
switch (u) {
|
99
|
-
case y:
|
100
|
-
return i ? o(1, 0) : o(31, 11);
|
101
|
-
case m:
|
102
|
-
return i ? o(1, d) : o(0, d + 1);
|
103
|
-
case T:
|
104
|
-
var g = this.$locale().weekStart || 0, Y = (h < g ? h + 7 : h) - g;
|
105
|
-
return o(i ? l - Y : l + (6 - Y), d);
|
106
|
-
case M:
|
107
|
-
case _:
|
108
|
-
return c(b + "Hours", 0);
|
109
|
-
case O:
|
110
|
-
return c(b + "Minutes", 1);
|
111
|
-
case w:
|
112
|
-
return c(b + "Seconds", 2);
|
113
|
-
case S:
|
114
|
-
return c(b + "Milliseconds", 3);
|
115
|
-
default:
|
116
|
-
return this.clone();
|
117
|
-
}
|
118
|
-
}, n.endOf = function(t) {
|
119
|
-
return this.startOf(t, !1);
|
120
|
-
}, n.$set = function(t, r) {
|
121
|
-
var e, i = a.p(t), u = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[M] = u + "Date", e[_] = u + "Date", e[m] = u + "Month", e[y] = u + "FullYear", e[O] = u + "Hours", e[w] = u + "Minutes", e[S] = u + "Seconds", e[A] = u + "Milliseconds", e)[i], c = i === M ? this.$D + (r - this.$W) : r;
|
122
|
-
if (i === m || i === y) {
|
123
|
-
var h = this.clone().set(_, 1);
|
124
|
-
h.$d[o](c), h.init(), this.$d = h.set(_, Math.min(this.$D, h.daysInMonth())).$d;
|
125
|
-
} else o && this.$d[o](c);
|
126
|
-
return this.init(), this;
|
127
|
-
}, n.set = function(t, r) {
|
128
|
-
return this.clone().$set(t, r);
|
129
|
-
}, n.get = function(t) {
|
130
|
-
return this[a.p(t)]();
|
131
|
-
}, n.add = function(t, r) {
|
132
|
-
var e, i = this;
|
133
|
-
t = Number(t);
|
134
|
-
var u = a.p(r), o = function(d) {
|
135
|
-
var l = f(i);
|
136
|
-
return a.w(l.date(l.date() + Math.round(d * t)), i);
|
137
|
-
};
|
138
|
-
if (u === m) return this.set(m, this.$M + t);
|
139
|
-
if (u === y) return this.set(y, this.$y + t);
|
140
|
-
if (u === M) return o(1);
|
141
|
-
if (u === T) return o(7);
|
142
|
-
var c = (e = {}, e[w] = k, e[O] = N, e[S] = W, e)[u] || 1, h = this.$d.getTime() + t * c;
|
143
|
-
return a.w(h, this);
|
144
|
-
}, n.subtract = function(t, r) {
|
145
|
-
return this.add(-1 * t, r);
|
146
|
-
}, n.format = function(t) {
|
147
|
-
var r = this, e = this.$locale();
|
148
|
-
if (!this.isValid()) return e.invalidDate || J;
|
149
|
-
var i = t || "YYYY-MM-DDTHH:mm:ssZ", u = a.z(this), o = this.$H, c = this.$m, h = this.$M, d = e.weekdays, l = e.months, b = e.meridiem, g = function($, v, H, L) {
|
150
|
-
return $ && ($[v] || $(r, i)) || H[v].slice(0, L);
|
151
|
-
}, Y = function($) {
|
152
|
-
return a.s(o % 12 || 12, $, "0");
|
153
|
-
}, p = b || function($, v, H) {
|
154
|
-
var L = $ < 12 ? "AM" : "PM";
|
155
|
-
return H ? L.toLowerCase() : L;
|
156
|
-
};
|
157
|
-
return i.replace(B, function($, v) {
|
158
|
-
return v || function(H) {
|
159
|
-
switch (H) {
|
160
|
-
case "YY":
|
161
|
-
return String(r.$y).slice(-2);
|
162
|
-
case "YYYY":
|
163
|
-
return a.s(r.$y, 4, "0");
|
164
|
-
case "M":
|
165
|
-
return h + 1;
|
166
|
-
case "MM":
|
167
|
-
return a.s(h + 1, 2, "0");
|
168
|
-
case "MMM":
|
169
|
-
return g(e.monthsShort, h, l, 3);
|
170
|
-
case "MMMM":
|
171
|
-
return g(l, h);
|
172
|
-
case "D":
|
173
|
-
return r.$D;
|
174
|
-
case "DD":
|
175
|
-
return a.s(r.$D, 2, "0");
|
176
|
-
case "d":
|
177
|
-
return String(r.$W);
|
178
|
-
case "dd":
|
179
|
-
return g(e.weekdaysMin, r.$W, d, 2);
|
180
|
-
case "ddd":
|
181
|
-
return g(e.weekdaysShort, r.$W, d, 3);
|
182
|
-
case "dddd":
|
183
|
-
return d[r.$W];
|
184
|
-
case "H":
|
185
|
-
return String(o);
|
186
|
-
case "HH":
|
187
|
-
return a.s(o, 2, "0");
|
188
|
-
case "h":
|
189
|
-
return Y(1);
|
190
|
-
case "hh":
|
191
|
-
return Y(2);
|
192
|
-
case "a":
|
193
|
-
return p(o, c, !0);
|
194
|
-
case "A":
|
195
|
-
return p(o, c, !1);
|
196
|
-
case "m":
|
197
|
-
return String(c);
|
198
|
-
case "mm":
|
199
|
-
return a.s(c, 2, "0");
|
200
|
-
case "s":
|
201
|
-
return String(r.$s);
|
202
|
-
case "ss":
|
203
|
-
return a.s(r.$s, 2, "0");
|
204
|
-
case "SSS":
|
205
|
-
return a.s(r.$ms, 3, "0");
|
206
|
-
case "Z":
|
207
|
-
return u;
|
208
|
-
}
|
209
|
-
return null;
|
210
|
-
}($) || u.replace(":", "");
|
211
|
-
});
|
212
|
-
}, n.utcOffset = function() {
|
213
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
214
|
-
}, n.diff = function(t, r, e) {
|
215
|
-
var i, u = this, o = a.p(r), c = f(t), h = (c.utcOffset() - this.utcOffset()) * k, d = this - c, l = function() {
|
216
|
-
return a.m(u, c);
|
217
|
-
};
|
218
|
-
switch (o) {
|
219
|
-
case y:
|
220
|
-
i = l() / 12;
|
221
|
-
break;
|
222
|
-
case m:
|
223
|
-
i = l();
|
224
|
-
break;
|
225
|
-
case U:
|
226
|
-
i = l() / 3;
|
227
|
-
break;
|
228
|
-
case T:
|
229
|
-
i = (d - h) / 6048e5;
|
230
|
-
break;
|
231
|
-
case M:
|
232
|
-
i = (d - h) / 864e5;
|
233
|
-
break;
|
234
|
-
case O:
|
235
|
-
i = d / N;
|
236
|
-
break;
|
237
|
-
case w:
|
238
|
-
i = d / k;
|
239
|
-
break;
|
240
|
-
case S:
|
241
|
-
i = d / W;
|
242
|
-
break;
|
243
|
-
default:
|
244
|
-
i = d;
|
245
|
-
}
|
246
|
-
return e ? i : a.a(i);
|
247
|
-
}, n.daysInMonth = function() {
|
248
|
-
return this.endOf(m).$D;
|
249
|
-
}, n.$locale = function() {
|
250
|
-
return D[this.$L];
|
251
|
-
}, n.locale = function(t, r) {
|
252
|
-
if (!t) return this.$L;
|
253
|
-
var e = this.clone(), i = j(t, r, !0);
|
254
|
-
return i && (e.$L = i), e;
|
255
|
-
}, n.clone = function() {
|
256
|
-
return a.w(this.$d, this);
|
257
|
-
}, n.toDate = function() {
|
258
|
-
return new Date(this.valueOf());
|
259
|
-
}, n.toJSON = function() {
|
260
|
-
return this.isValid() ? this.toISOString() : null;
|
261
|
-
}, n.toISOString = function() {
|
262
|
-
return this.$d.toISOString();
|
263
|
-
}, n.toString = function() {
|
264
|
-
return this.$d.toUTCString();
|
265
|
-
}, s;
|
266
|
-
}(), z = C.prototype;
|
267
|
-
return f.prototype = z, [["$ms", A], ["$s", S], ["$m", w], ["$H", O], ["$W", M], ["$M", m], ["$y", y], ["$D", _]].forEach(function(s) {
|
268
|
-
z[s[1]] = function(n) {
|
269
|
-
return this.$g(n, s[0], s[1]);
|
270
|
-
};
|
271
|
-
}), f.extend = function(s, n) {
|
272
|
-
return s.$i || (s(n, C, f), s.$i = !0), f;
|
273
|
-
}, f.locale = j, f.isDayjs = F, f.unix = function(s) {
|
274
|
-
return f(1e3 * s);
|
275
|
-
}, f.en = D[x], f.Ls = D, f.p = {}, f;
|
276
|
-
});
|
277
|
-
})(E);
|
278
|
-
var R = E.exports;
|
279
|
-
const nt = /* @__PURE__ */ Q(R);
|
43
|
+
return e;
|
44
|
+
}),
|
45
|
+
createOption: m
|
46
|
+
};
|
47
|
+
};
|
280
48
|
export {
|
281
|
-
|
282
|
-
nt as default
|
49
|
+
q as useBaseOptions
|
283
50
|
};
|