@dv.net/ui-kit 7.5.2 → 7.5.3
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/assets/{UiDatepickerRange.vue_vue_type_script_setup_true_lang.DCzJY2wh.js → UiDatepickerRange.vue_vue_type_script_setup_true_lang.4d4FeAtU.js} +67 -67
- package/dist/components/UiDatepicker/UiDatepickerRange.js +1 -1
- package/dist/components/UiDatepicker/UiDatepickerRange.vue.d.ts +3 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { Q as
|
|
4
|
-
import { _ as
|
|
1
|
+
import { defineComponent as x, mergeModels as N, useModel as ee, computed as k, ref as $, onMounted as te, createElementBlock as P, openBlock as p, normalizeClass as ae, createVNode as r, unref as t, withCtx as s, createElementVNode as D, createCommentVNode as z, renderSlot as R, createBlock as U, createTextVNode as C, toDisplayString as y } from "vue";
|
|
2
|
+
import { _ as ie } from "./DatePickerInputs.vue_vue_type_script_setup_true_lang.BDpkRcEN.js";
|
|
3
|
+
import { Q as le } from "./style.C3xG1ALc.js";
|
|
4
|
+
import { _ as oe } from "./DatePickerPresets.vue_vue_type_script_setup_true_lang.CKckhapZ.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { a as
|
|
6
|
+
import { _ as ne } from "./DatePickerSlider.vue_vue_type_script_setup_true_lang.BGkzUy3Z.js";
|
|
7
|
+
import { _ as F } from "./UiIconButton.vue_vue_type_script_setup_true_lang.cJvSLKjQ.js";
|
|
8
|
+
import { a as re } from "./index.Cp1LhIxy.js";
|
|
9
9
|
import "./vue3-lottie.es.BGWavb2-.js";
|
|
10
|
-
import { _ as
|
|
11
|
-
import { _ as
|
|
10
|
+
import { _ as E } from "./UiButton.vue_vue_type_script_setup_true_lang.C58Ve9-q.js";
|
|
11
|
+
import { _ as se } from "./UiIcon.vue_vue_type_script_setup_true_lang.BjdWpbZ0.js";
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
14
|
import { config as b } from "../config/index.js";
|
|
@@ -19,10 +19,10 @@ import { config as b } from "../config/index.js";
|
|
|
19
19
|
/* empty css */
|
|
20
20
|
/* empty css */
|
|
21
21
|
/* empty css */
|
|
22
|
-
import { u as
|
|
22
|
+
import { u as me } from "./useDatePicker.DnhbkLG1.js";
|
|
23
23
|
/* empty css */
|
|
24
|
-
import { useDatePickerPresets as
|
|
25
|
-
import { useDatePickerSelected as
|
|
24
|
+
import { useDatePickerPresets as ue } from "../components/UiDatepicker/composables/useDatePickerPresets.js";
|
|
25
|
+
import { useDatePickerSelected as de } from "../components/UiDatepicker/composables/useDatePickerSelected.js";
|
|
26
26
|
/* empty css */
|
|
27
27
|
/* empty css */
|
|
28
28
|
/* empty css */
|
|
@@ -39,15 +39,15 @@ import "vue-router";
|
|
|
39
39
|
/* empty css */
|
|
40
40
|
/* empty css */
|
|
41
41
|
/* empty css */
|
|
42
|
-
const
|
|
42
|
+
const ce = {
|
|
43
43
|
key: 1,
|
|
44
44
|
class: "ui-datepicker__trigger"
|
|
45
|
-
},
|
|
45
|
+
}, pe = { class: "ui-datepicker__navigate" }, ve = { class: "ui-datepicker__navigate-value" }, fe = { class: "ui-datepicker__actions" }, ge = {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "ui-datepicker__actions-slot"
|
|
48
|
-
},
|
|
48
|
+
}, ke = { class: "ui-datepicker__actions-btns" }, ot = /* @__PURE__ */ x({
|
|
49
49
|
__name: "UiDatepickerRange",
|
|
50
|
-
props: /* @__PURE__ */
|
|
50
|
+
props: /* @__PURE__ */ N({
|
|
51
51
|
disabled: { type: Boolean },
|
|
52
52
|
beginDate: {},
|
|
53
53
|
size: { default: "xs" },
|
|
@@ -63,26 +63,26 @@ const ue = {
|
|
|
63
63
|
modelValue: { default: [] },
|
|
64
64
|
modelModifiers: {}
|
|
65
65
|
}),
|
|
66
|
-
emits: ["update:modelValue"],
|
|
67
|
-
setup(w) {
|
|
68
|
-
const n = w, i =
|
|
66
|
+
emits: /* @__PURE__ */ N(["clear"], ["update:modelValue"]),
|
|
67
|
+
setup(w, { emit: Q }) {
|
|
68
|
+
const n = w, j = Q, i = ee(w, "modelValue"), { width: W } = re(), { dayjs: m, today: q, endDate: _, startDate: V, beginDate: G, modelValueFormat: h } = me(i), M = k(
|
|
69
69
|
() => n.enableTimePicker ? `${h.value} HH:mm` : h.value
|
|
70
|
-
), u = $(),
|
|
70
|
+
), u = $(), o = $(["", ""]), d = $(!1), J = k(
|
|
71
71
|
() => n.beginDate ? m(n.beginDate).format(h.value) : null
|
|
72
|
-
), v = k(() => n.maxDate ??
|
|
72
|
+
), v = k(() => n.maxDate ?? q), B = k(() => n.minDate), { presets: f } = ue({ beginDate: J.value ?? G.value }), { isAllTimeSelected: K, selectedDate: A, formattedSelectedDate: L, selectedRange: O } = de({
|
|
73
73
|
presets: f,
|
|
74
74
|
startDate: V,
|
|
75
75
|
endDate: _,
|
|
76
76
|
minDate: B,
|
|
77
77
|
maxDate: v
|
|
78
78
|
});
|
|
79
|
-
function
|
|
79
|
+
function X(e) {
|
|
80
80
|
H(e.date), u.value.closeMenu();
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Z(e) {
|
|
83
83
|
if (!e) return;
|
|
84
84
|
const a = Array.isArray(e) ? e : [e, e];
|
|
85
|
-
d.value = e.length < 2, a.length === 2 && (
|
|
85
|
+
d.value = e.length < 2, a.length === 2 && (o.value = a);
|
|
86
86
|
}
|
|
87
87
|
function T(e) {
|
|
88
88
|
i.value = [m(e[0]).format(M.value), m(e[1]).format(M.value)];
|
|
@@ -90,37 +90,37 @@ const ue = {
|
|
|
90
90
|
function H(e) {
|
|
91
91
|
const a = Array.isArray(e) ? e : [e, e];
|
|
92
92
|
if (V.value && _.value) {
|
|
93
|
-
const
|
|
94
|
-
V.value.isSame(a[0],
|
|
93
|
+
const l = n.enableTimePicker ? "minute" : "day";
|
|
94
|
+
V.value.isSame(a[0], l) && _.value.isSame(a[1], l) || T(a);
|
|
95
95
|
} else
|
|
96
96
|
T(a);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
const e = n.single ? m(
|
|
98
|
+
function Y() {
|
|
99
|
+
const e = n.single ? m(o.value[0], b.uiDatePicker.modelValueFormat).toDate() : o.value;
|
|
100
100
|
u.value?.updateInternalModelValue(e), u.value?.setMonthYear({
|
|
101
|
-
month: m(
|
|
102
|
-
year: m(
|
|
101
|
+
month: m(o.value[0]).month(),
|
|
102
|
+
year: m(o.value[0]).year()
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
const I = () => {
|
|
106
|
-
i.value = [],
|
|
106
|
+
i.value = [], o.value = ["", ""], d.value = !0, u.value?.closeMenu(), j("clear");
|
|
107
107
|
};
|
|
108
|
-
return
|
|
108
|
+
return te(() => {
|
|
109
109
|
i.value.length || (d.value = !0);
|
|
110
110
|
}), (e, a) => (p(), P("div", {
|
|
111
|
-
class:
|
|
111
|
+
class: ae(["ui-datepicker-range", [e.size, { "is-disabled": e.disabled }]])
|
|
112
112
|
}, [
|
|
113
|
-
r(
|
|
114
|
-
disabled: !i.value.length || t(
|
|
113
|
+
r(ne, {
|
|
114
|
+
disabled: !i.value.length || t(K),
|
|
115
115
|
modelValue: i.value,
|
|
116
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
117
|
-
"selected-range": t(
|
|
116
|
+
"onUpdate:modelValue": a[2] || (a[2] = (l) => i.value = l),
|
|
117
|
+
"selected-range": t(O),
|
|
118
118
|
"is-show": !e.hideSliderArrows,
|
|
119
119
|
"min-date": B.value,
|
|
120
120
|
"max-date": v.value
|
|
121
121
|
}, {
|
|
122
122
|
default: s(() => [
|
|
123
|
-
r(t(
|
|
123
|
+
r(t(le), {
|
|
124
124
|
position: "center",
|
|
125
125
|
locale: t(b).locale,
|
|
126
126
|
ref_key: "pickerRef",
|
|
@@ -131,7 +131,7 @@ const ue = {
|
|
|
131
131
|
"hours-grid-increment": 1,
|
|
132
132
|
"minutes-grid-increment": 1,
|
|
133
133
|
range: !e.single,
|
|
134
|
-
"multi-calendars": !e.single && t(
|
|
134
|
+
"multi-calendars": !e.single && t(W) > 1e3,
|
|
135
135
|
"month-name-format": "long",
|
|
136
136
|
"max-date": v.value,
|
|
137
137
|
"min-date": B.value,
|
|
@@ -140,49 +140,49 @@ const ue = {
|
|
|
140
140
|
offset: 0,
|
|
141
141
|
timezone: e.timezone,
|
|
142
142
|
"onUpdate:modelValue": H,
|
|
143
|
-
onInternalModelChange:
|
|
143
|
+
onInternalModelChange: Z
|
|
144
144
|
}, {
|
|
145
145
|
"left-sidebar": s(() => [
|
|
146
|
-
!e.single && t(f).length ? (p(),
|
|
146
|
+
!e.single && t(f).length ? (p(), U(oe, {
|
|
147
147
|
key: 0,
|
|
148
148
|
presets: t(f),
|
|
149
|
-
date:
|
|
150
|
-
onChange:
|
|
149
|
+
date: o.value,
|
|
150
|
+
onChange: X
|
|
151
151
|
}, null, 8, ["presets", "date"])) : z("", !0),
|
|
152
|
-
r(
|
|
153
|
-
onChange:
|
|
154
|
-
onSubmit: a[0] || (a[0] = (
|
|
155
|
-
modelValue:
|
|
156
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
152
|
+
r(ie, {
|
|
153
|
+
onChange: Y,
|
|
154
|
+
onSubmit: a[0] || (a[0] = (l) => u.value.selectDate()),
|
|
155
|
+
modelValue: o.value,
|
|
156
|
+
"onUpdate:modelValue": a[1] || (a[1] = (l) => o.value = l),
|
|
157
157
|
single: e.single
|
|
158
158
|
}, null, 8, ["modelValue", "single"])
|
|
159
159
|
]),
|
|
160
160
|
trigger: s(() => [
|
|
161
|
-
e.$slots.trigger ?
|
|
161
|
+
e.$slots.trigger ? R(e.$slots, "trigger", {
|
|
162
162
|
key: 0,
|
|
163
163
|
date: i.value,
|
|
164
164
|
presets: t(f),
|
|
165
165
|
selectedDate: t(A),
|
|
166
|
-
formattedSelectedDate: t(
|
|
167
|
-
}) : (p(), P("button",
|
|
168
|
-
r(t(
|
|
166
|
+
formattedSelectedDate: t(L)
|
|
167
|
+
}) : (p(), P("button", ce, [
|
|
168
|
+
r(t(se), {
|
|
169
169
|
type: "400",
|
|
170
170
|
name: "calendar-month"
|
|
171
171
|
}),
|
|
172
172
|
C(y(t(A)), 1)
|
|
173
173
|
]))
|
|
174
174
|
]),
|
|
175
|
-
"month-year": s(({ month:
|
|
176
|
-
D("div",
|
|
177
|
-
r(
|
|
175
|
+
"month-year": s(({ month: l, months: c, handleMonthYearChange: g }) => [
|
|
176
|
+
D("div", pe, [
|
|
177
|
+
r(F, {
|
|
178
178
|
onClick: (S) => g && g(!1),
|
|
179
179
|
"icon-type": "400",
|
|
180
180
|
size: "lg",
|
|
181
181
|
"icon-name": "chevron-left 1",
|
|
182
182
|
"no-size": ""
|
|
183
183
|
}, null, 8, ["onClick"]),
|
|
184
|
-
D("span",
|
|
185
|
-
r(
|
|
184
|
+
D("span", ve, y(c?.find((S) => S.value === l)?.text), 1),
|
|
185
|
+
r(F, {
|
|
186
186
|
onClick: (S) => g && g(!0),
|
|
187
187
|
"icon-type": "400",
|
|
188
188
|
size: "lg",
|
|
@@ -191,11 +191,11 @@ const ue = {
|
|
|
191
191
|
}, null, 8, ["onClick"])
|
|
192
192
|
])
|
|
193
193
|
]),
|
|
194
|
-
"action-row": s(({ disabled:
|
|
195
|
-
D("div",
|
|
196
|
-
e.$slots["action-row"] ? (p(), P("div",
|
|
197
|
-
|
|
198
|
-
disabled:
|
|
194
|
+
"action-row": s(({ disabled: l, selectDate: c }) => [
|
|
195
|
+
D("div", fe, [
|
|
196
|
+
e.$slots["action-row"] ? (p(), P("div", ge, [
|
|
197
|
+
R(e.$slots, "action-row", {
|
|
198
|
+
disabled: l,
|
|
199
199
|
selectDate: c,
|
|
200
200
|
clearDate: I,
|
|
201
201
|
isDisabledBtn: d.value,
|
|
@@ -203,9 +203,9 @@ const ue = {
|
|
|
203
203
|
clearable: e.clearable
|
|
204
204
|
})
|
|
205
205
|
])) : z("", !0),
|
|
206
|
-
D("div",
|
|
207
|
-
r(t(
|
|
208
|
-
disabled: d.value ||
|
|
206
|
+
D("div", ke, [
|
|
207
|
+
r(t(E), {
|
|
208
|
+
disabled: d.value || l,
|
|
209
209
|
mode: "neutral",
|
|
210
210
|
onClick: c
|
|
211
211
|
}, {
|
|
@@ -214,7 +214,7 @@ const ue = {
|
|
|
214
214
|
]),
|
|
215
215
|
_: 2
|
|
216
216
|
}, 1032, ["disabled", "onClick"]),
|
|
217
|
-
i.value.length && e.clearable ? (p(),
|
|
217
|
+
i.value.length && e.clearable ? (p(), U(t(E), {
|
|
218
218
|
key: 0,
|
|
219
219
|
type: "secondary",
|
|
220
220
|
onClick: I
|
|
@@ -236,5 +236,5 @@ const ue = {
|
|
|
236
236
|
}
|
|
237
237
|
});
|
|
238
238
|
export {
|
|
239
|
-
|
|
239
|
+
ot as _
|
|
240
240
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as m } from "../../assets/UiDatepickerRange.vue_vue_type_script_setup_true_lang.
|
|
1
|
+
import { _ as m } from "../../assets/UiDatepickerRange.vue_vue_type_script_setup_true_lang.4d4FeAtU.js";
|
|
2
2
|
import "../../assets/style.C3xG1ALc.js";
|
|
3
3
|
export {
|
|
4
4
|
m as default
|
|
@@ -1093,7 +1093,10 @@ declare function __VLS_template(): {
|
|
|
1093
1093
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
1094
1094
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
1095
1095
|
"update:modelValue": (value: string[]) => any;
|
|
1096
|
+
} & {
|
|
1097
|
+
clear: () => any;
|
|
1096
1098
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
1099
|
+
onClear?: (() => any) | undefined;
|
|
1097
1100
|
"onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
|
|
1098
1101
|
}>, {
|
|
1099
1102
|
size: import('./types').DatepickerSize;
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { _ as v } from "./assets/UiCollapseItem.vue_vue_type_script_setup_true_l
|
|
|
12
12
|
import { _ as j } from "./assets/UiConfirm.vue_vue_type_script_setup_true_lang.C0NGQkz6.js";
|
|
13
13
|
import { _ as O } from "./assets/UiCopyText.vue_vue_type_script_setup_true_lang.BW_J9zQD.js";
|
|
14
14
|
/* empty css */
|
|
15
|
-
import { _ as z } from "./assets/UiDatepickerRange.vue_vue_type_script_setup_true_lang.
|
|
15
|
+
import { _ as z } from "./assets/UiDatepickerRange.vue_vue_type_script_setup_true_lang.4d4FeAtU.js";
|
|
16
16
|
import { default as H } from "./components/UiDragAndDrop/UiDragAndDrop.js";
|
|
17
17
|
import { _ as K } from "./assets/UiDrawer.vue_vue_type_script_setup_true_lang.7FvRxX0A.js";
|
|
18
18
|
/* empty css */
|