eco-vue-js 0.6.6 → 0.6.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/DatePicker/WDatePicker.vue.d.ts +4 -0
- package/dist/components/DatePicker/WDatePicker.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/WDatePicker.vue.js +6 -2
- package/dist/components/DatePicker/WDatePickerSingle.vue.d.ts +4 -0
- package/dist/components/DatePicker/WDatePickerSingle.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/WDatePickerSingle.vue.js +44 -53
- package/dist/components/DatePicker/components/CalendarDay.vue.d.ts +6 -2
- package/dist/components/DatePicker/components/CalendarDay.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/components/CalendarDay.vue.js +21 -10
- package/dist/components/DatePicker/components/CalendarMonth.vue.d.ts +6 -0
- package/dist/components/DatePicker/components/CalendarMonth.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/components/CalendarMonth.vue.js +14 -2
- package/dist/components/DatePicker/components/CalendarWeek.vue.d.ts +6 -0
- package/dist/components/DatePicker/components/CalendarWeek.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/components/CalendarWeek.vue.js +14 -2
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteList.vue.js +5 -4
- package/dist/components/InfiniteList/components/EmptyComponent.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/EmptyComponent.vue.js +11 -9
- package/dist/components/InfiniteList/components/EmptyComponent.vue2.js +5 -0
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +4 -5
- package/dist/components/InfiniteList/components/InfiniteListPageSelectItem.vue.js +1 -1
- package/dist/components/Input/WInputDate.vue.d.ts +10 -6
- package/dist/components/Input/WInputDate.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputDate.vue.js +27 -4
- package/dist/components/Input/WInputSuggest.vue.js +1 -1
- package/dist/components/Input/types.d.ts +5 -0
- package/dist/components/Input/types.d.ts.map +1 -1
- package/dist/components/Nav/WNavItem.vue.d.ts +1 -1
- package/dist/components/Nav/WNavItem.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItem.vue.js +5 -4
- package/dist/main.js +1 -1
- package/dist/utils/dateTime.d.ts +1 -0
- package/dist/utils/dateTime.d.ts.map +1 -1
- package/dist/utils/dateTime.js +6 -1
- package/package.json +1 -1
@@ -2,10 +2,14 @@ import { DateRange } from './models/types';
|
|
2
2
|
|
3
3
|
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
|
4
4
|
modelValue: DateRange | undefined;
|
5
|
+
minDate?: Date;
|
6
|
+
maxDate?: Date;
|
5
7
|
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
6
8
|
"update:modelValue": (value: DateRange | undefined) => void;
|
7
9
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<{
|
8
10
|
modelValue: DateRange | undefined;
|
11
|
+
minDate?: Date;
|
12
|
+
maxDate?: Date;
|
9
13
|
}>>> & {
|
10
14
|
"onUpdate:modelValue"?: ((value: DateRange | undefined) => any) | undefined;
|
11
15
|
}, {}, {}>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WDatePicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/WDatePicker.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WDatePicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/WDatePicker.vue"],"names":[],"mappings":"AA2JA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAA;;gBAK/B,SAAS,GAAG,SAAS;cACvB,IAAI;cACJ,IAAI;;;;gBAFF,SAAS,GAAG,SAAS;cACvB,IAAI;cACJ,IAAI;;;;AA+UhB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
@@ -10,7 +10,9 @@ const _hoisted_3 = { class: "relative" };
|
|
10
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
11
11
|
__name: "WDatePicker",
|
12
12
|
props: {
|
13
|
-
modelValue: {}
|
13
|
+
modelValue: {},
|
14
|
+
minDate: {},
|
15
|
+
maxDate: {}
|
14
16
|
},
|
15
17
|
emits: ["update:modelValue"],
|
16
18
|
setup(__props, { emit: __emit }) {
|
@@ -114,10 +116,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
114
116
|
"start-of-month": currentDate.value,
|
115
117
|
"date-range": dateRange.value,
|
116
118
|
"is-hover-enabled": preselectedValue.value !== null,
|
119
|
+
"min-date": _ctx.minDate,
|
120
|
+
"max-date": _ctx.maxDate,
|
117
121
|
class: "px-3",
|
118
122
|
"onClick:day": onClickDay,
|
119
123
|
"onHover:day": setRange
|
120
|
-
}, null, 8, ["start-of-month", "date-range", "is-hover-enabled"]))
|
124
|
+
}, null, 8, ["start-of-month", "date-range", "is-hover-enabled", "min-date", "max-date"]))
|
121
125
|
]),
|
122
126
|
_: 1
|
123
127
|
})
|
@@ -1,11 +1,15 @@
|
|
1
1
|
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
|
2
2
|
modelValue: Date | undefined;
|
3
3
|
title?: string;
|
4
|
+
minDate?: Date;
|
5
|
+
maxDate?: Date;
|
4
6
|
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
5
7
|
"update:modelValue": (value: Date | undefined) => void;
|
6
8
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<{
|
7
9
|
modelValue: Date | undefined;
|
8
10
|
title?: string;
|
11
|
+
minDate?: Date;
|
12
|
+
maxDate?: Date;
|
9
13
|
}>>> & {
|
10
14
|
"onUpdate:modelValue"?: ((value: Date | undefined) => any) | undefined;
|
11
15
|
}, {}, {}>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WDatePickerSingle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/WDatePickerSingle.vue"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"WDatePickerSingle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/WDatePickerSingle.vue"],"names":[],"mappings":";gBAwGc,IAAI,GAAG,SAAS;YACpB,MAAM;cACJ,IAAI;cACJ,IAAI;;;;gBAHF,IAAI,GAAG,SAAS;YACpB,MAAM;cACJ,IAAI;cACJ,IAAI;;;;AAiOhB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import { defineComponent, ref, computed, watch, toRef, openBlock, createElementBlock, createElementVNode, createVNode,
|
1
|
+
import { defineComponent, ref, computed, watch, toRef, openBlock, createElementBlock, normalizeStyle, createElementVNode, createVNode, unref, Transition, withCtx, createBlock } from 'vue';
|
2
2
|
import { getStartOfMonth, getStartOfWeek, addDay, monthShortFormatter, addMonth, addYear } from '../../utils/dateTime.js';
|
3
|
-
import _sfc_main$
|
4
|
-
import _sfc_main$
|
5
|
-
import _sfc_main$1 from './components/CalendarValue.vue.js';
|
3
|
+
import _sfc_main$2 from './components/CalendarMonth.vue.js';
|
4
|
+
import _sfc_main$1 from './components/CalendarToggle.vue.js';
|
6
5
|
|
7
|
-
const _hoisted_1 = { class: "
|
8
|
-
const _hoisted_2 = { class: "
|
9
|
-
const _hoisted_3 = { class: "relative" };
|
6
|
+
const _hoisted_1 = { class: "grid grid-cols-2 gap-8 px-3 pb-4" };
|
7
|
+
const _hoisted_2 = { class: "relative" };
|
10
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
11
9
|
__name: "WDatePickerSingle",
|
12
10
|
props: {
|
13
11
|
modelValue: {},
|
14
|
-
title: {}
|
12
|
+
title: {},
|
13
|
+
minDate: {},
|
14
|
+
maxDate: {}
|
15
15
|
},
|
16
16
|
emits: ["update:modelValue"],
|
17
17
|
setup(__props, { emit: __emit }) {
|
@@ -42,54 +42,45 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
42
42
|
}
|
43
43
|
}, { immediate: true });
|
44
44
|
return (_ctx, _cache) => {
|
45
|
-
return openBlock(), createElementBlock("div",
|
45
|
+
return openBlock(), createElementBlock("div", {
|
46
|
+
class: "bg-default dark:bg-default-dark border border-solid border-gray-300 dark:border-gray-700 rounded-xl py-3 overflow-hidden",
|
47
|
+
style: normalizeStyle({ "--direction-factor": isDirect.value ? "1" : "-1" })
|
48
|
+
}, [
|
46
49
|
createElementVNode("div", _hoisted_1, [
|
47
50
|
createVNode(_sfc_main$1, {
|
48
|
-
|
49
|
-
|
50
|
-
"
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
text: unref(monthShortFormatter).format(currentDate.value).toLocaleUpperCase(),
|
52
|
+
"onClick:previous": _cache[0] || (_cache[0] = ($event) => setCurrentDate(unref(addMonth)(currentDate.value, -1))),
|
53
|
+
"onClick:next": _cache[1] || (_cache[1] = ($event) => setCurrentDate(unref(addMonth)(currentDate.value, 1)))
|
54
|
+
}, null, 8, ["text"]),
|
55
|
+
createVNode(_sfc_main$1, {
|
56
|
+
text: year.value.toString(),
|
57
|
+
"onClick:previous": _cache[2] || (_cache[2] = ($event) => setCurrentDate(unref(addYear)(currentDate.value, -1))),
|
58
|
+
"onClick:next": _cache[3] || (_cache[3] = ($event) => setCurrentDate(unref(addYear)(currentDate.value, 1)))
|
59
|
+
}, null, 8, ["text"])
|
54
60
|
]),
|
55
|
-
createElementVNode("div",
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
default: withCtx(() => [
|
79
|
-
(openBlock(), createBlock(_sfc_main$3, {
|
80
|
-
key: currentDate.value.toISOString(),
|
81
|
-
"start-of-month": currentDate.value,
|
82
|
-
"date-range": dateRange.value,
|
83
|
-
"is-hover-enabled": preselectedValue.value !== null,
|
84
|
-
class: "px-3",
|
85
|
-
"onClick:day": onClickDay
|
86
|
-
}, null, 8, ["start-of-month", "date-range", "is-hover-enabled"]))
|
87
|
-
]),
|
88
|
-
_: 1
|
89
|
-
})
|
90
|
-
])
|
91
|
-
], 4)
|
92
|
-
]);
|
61
|
+
createElementVNode("div", _hoisted_2, [
|
62
|
+
createVNode(Transition, {
|
63
|
+
"enter-active-class": "transition-transform duration-[250ms] w-full",
|
64
|
+
"leave-active-class": "transition-transform duration-[250ms] w-full absolute top-0",
|
65
|
+
"enter-from-class": "translate-x-[calc(100%*var(--direction-factor))]",
|
66
|
+
"leave-to-class": "translate-x-[calc(100%*var(--direction-factor)*-1)]"
|
67
|
+
}, {
|
68
|
+
default: withCtx(() => [
|
69
|
+
(openBlock(), createBlock(_sfc_main$2, {
|
70
|
+
key: currentDate.value.toISOString(),
|
71
|
+
"start-of-month": currentDate.value,
|
72
|
+
"date-range": dateRange.value,
|
73
|
+
"is-hover-enabled": preselectedValue.value !== null,
|
74
|
+
"min-date": _ctx.minDate,
|
75
|
+
"max-date": _ctx.maxDate,
|
76
|
+
class: "px-3",
|
77
|
+
"onClick:day": onClickDay
|
78
|
+
}, null, 8, ["start-of-month", "date-range", "is-hover-enabled", "min-date", "max-date"]))
|
79
|
+
]),
|
80
|
+
_: 1
|
81
|
+
})
|
82
|
+
])
|
83
|
+
], 4);
|
93
84
|
};
|
94
85
|
}
|
95
86
|
});
|
@@ -6,8 +6,10 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
|
|
6
6
|
dateRange?: DateRange;
|
7
7
|
isBetween: boolean;
|
8
8
|
isWeekOutOfMonth: boolean;
|
9
|
-
disabled?: boolean;
|
10
9
|
isHoverEnabled: boolean;
|
10
|
+
disabled?: boolean;
|
11
|
+
minDate?: Date;
|
12
|
+
maxDate?: Date;
|
11
13
|
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
12
14
|
"click:day": (value: Date) => void;
|
13
15
|
"hover:day": (value: Date) => void;
|
@@ -17,8 +19,10 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
|
|
17
19
|
dateRange?: DateRange;
|
18
20
|
isBetween: boolean;
|
19
21
|
isWeekOutOfMonth: boolean;
|
20
|
-
disabled?: boolean;
|
21
22
|
isHoverEnabled: boolean;
|
23
|
+
disabled?: boolean;
|
24
|
+
minDate?: Date;
|
25
|
+
maxDate?: Date;
|
22
26
|
}>>> & {
|
23
27
|
"onClick:day"?: ((value: Date) => any) | undefined;
|
24
28
|
"onHover:day"?: ((value: Date) => any) | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CalendarDay.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/DatePicker/components/CalendarDay.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"CalendarDay.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/DatePicker/components/CalendarDay.vue"],"names":[],"mappings":"AA4HA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAA;;kBAK9B,IAAI;gBACN,IAAI;gBACJ,SAAS;eACV,OAAO;sBACA,OAAO;oBACT,OAAO;eACZ,OAAO;cACR,IAAI;cACJ,IAAI;;;;;kBARA,IAAI;gBACN,IAAI;gBACJ,SAAS;eACV,OAAO;sBACA,OAAO;oBACT,OAAO;eACZ,OAAO;cACR,IAAI;cACJ,IAAI;;;;;AAuLhB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
@@ -10,8 +10,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
10
|
dateRange: {},
|
11
11
|
isBetween: { type: Boolean },
|
12
12
|
isWeekOutOfMonth: { type: Boolean },
|
13
|
+
isHoverEnabled: { type: Boolean },
|
13
14
|
disabled: { type: Boolean },
|
14
|
-
|
15
|
+
minDate: {},
|
16
|
+
maxDate: {}
|
15
17
|
},
|
16
18
|
emits: ["click:day", "hover:day"],
|
17
19
|
setup(__props) {
|
@@ -47,32 +49,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
47
49
|
if (isSelected.value) return false;
|
48
50
|
return isBeforeTo.value && isAfterFrom.value;
|
49
51
|
});
|
52
|
+
const isDisabled = computed(() => {
|
53
|
+
if (props.disabled) return true;
|
54
|
+
if (props.minDate) return props.minDate > props.startOfDay;
|
55
|
+
if (props.maxDate) return props.maxDate < props.startOfDay;
|
56
|
+
return false;
|
57
|
+
});
|
50
58
|
return (_ctx, _cache) => {
|
51
59
|
return openBlock(), createElementBlock("div", {
|
52
|
-
class: normalizeClass(["flex relative justify-center items-center
|
60
|
+
class: normalizeClass(["flex relative justify-center items-center my-[1px] select-none height-9 flex-1 w-ripple-trigger", {
|
53
61
|
"text-accent": !isSelected.value && !isOutOfMonth.value,
|
54
62
|
"text-description": !isSelected.value && isOutOfMonth.value,
|
55
63
|
"text-default dark:text-default-dark selected": isSelected.value,
|
56
|
-
"cursor-not-allowed":
|
64
|
+
"cursor-not-allowed": isDisabled.value,
|
65
|
+
"cursor-pointer": !isDisabled.value,
|
57
66
|
"hover-enabled": _ctx.isHoverEnabled
|
58
67
|
}]),
|
59
|
-
onClick: _cache[0] || (_cache[0] = ($event) => !
|
60
|
-
onMouseenter: _cache[1] || (_cache[1] = ($event) => !
|
68
|
+
onClick: _cache[0] || (_cache[0] = ($event) => !isDisabled.value && _ctx.$emit("click:day", _ctx.startOfDay)),
|
69
|
+
onMouseenter: _cache[1] || (_cache[1] = ($event) => !isDisabled.value && _ctx.isHoverEnabled && _ctx.$emit("hover:day", _ctx.startOfDay))
|
61
70
|
}, [
|
62
71
|
withDirectives(createElementVNode("div", {
|
63
72
|
class: normalizeClass(["absolute opacity-50 h-9", {
|
64
|
-
"border-y border-solid border-primary-default": _ctx.isHoverEnabled,
|
65
|
-
"bg-primary-default dark:bg-primary-dark": !_ctx.isHoverEnabled,
|
66
|
-
"
|
73
|
+
"border-y border-solid border-primary-default": _ctx.isHoverEnabled && !isDisabled.value,
|
74
|
+
"bg-primary-default dark:bg-primary-dark": !_ctx.isHoverEnabled && !isDisabled.value,
|
75
|
+
"bg-gray-200 dark:bg-gray-700": isDisabled.value,
|
76
|
+
"w-full": isBetweenRange.value || isDisabled.value,
|
67
77
|
"w-1/2 left-1/2": isFrom.value && !isTo.value,
|
68
78
|
"w-1/2 right-1/2": !isFrom.value && isTo.value
|
69
79
|
}])
|
70
80
|
}, null, 2), [
|
71
|
-
[vShow, isBetweenRange.value || (isFrom.value || isTo.value && !(isFrom.value && isTo.value))]
|
81
|
+
[vShow, isBetweenRange.value || (isFrom.value || isTo.value && !(isFrom.value && isTo.value)) || isDisabled.value]
|
72
82
|
]),
|
73
83
|
createElementVNode("div", {
|
74
84
|
class: normalizeClass(["relative flex justify-center items-center rounded-full square-9", {
|
75
|
-
"w-ripple w-ripple-hover": !
|
85
|
+
"w-ripple w-ripple-hover": !isDisabled.value,
|
86
|
+
"opacity-50": isDisabled.value,
|
76
87
|
"bg-primary-default dark:bg-primary-dark font-semibold": isSelected.value
|
77
88
|
}])
|
78
89
|
}, [
|
@@ -7,6 +7,9 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
|
|
7
7
|
dateRange?: DateRange;
|
8
8
|
isBetween?: boolean;
|
9
9
|
isHoverEnabled: boolean;
|
10
|
+
minDate?: Date;
|
11
|
+
maxDate?: Date;
|
12
|
+
disabled?: boolean;
|
10
13
|
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
11
14
|
"click:day": (value: Date) => void;
|
12
15
|
"hover:day": (value: Date) => void;
|
@@ -16,6 +19,9 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
|
|
16
19
|
dateRange?: DateRange;
|
17
20
|
isBetween?: boolean;
|
18
21
|
isHoverEnabled: boolean;
|
22
|
+
minDate?: Date;
|
23
|
+
maxDate?: Date;
|
24
|
+
disabled?: boolean;
|
19
25
|
}>>> & {
|
20
26
|
"onClick:day"?: ((value: Date) => any) | undefined;
|
21
27
|
"onHover:day"?: ((value: Date) => any) | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CalendarMonth.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/DatePicker/components/CalendarMonth.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"CalendarMonth.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/DatePicker/components/CalendarMonth.vue"],"names":[],"mappings":"AA2IA,OAAO,EAAiB,OAAO,EAAwB,MAAM,kBAAkB,CAAA;AAC/E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAA;;kBAK9B,IAAI;qBACD,OAAO;gBACZ,SAAS;gBACT,OAAO;oBACH,OAAO;cACb,IAAI;cACJ,IAAI;eACH,OAAO;;;;;kBAPJ,IAAI;qBACD,OAAO;gBACZ,SAAS;gBACT,OAAO;oBACH,OAAO;cACb,IAAI;cACJ,IAAI;eACH,OAAO;;;;;AAiMpB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
@@ -10,7 +10,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
10
|
startDayOfWeek: {},
|
11
11
|
dateRange: {},
|
12
12
|
isBetween: { type: Boolean },
|
13
|
-
isHoverEnabled: { type: Boolean }
|
13
|
+
isHoverEnabled: { type: Boolean },
|
14
|
+
minDate: {},
|
15
|
+
maxDate: {},
|
16
|
+
disabled: { type: Boolean }
|
14
17
|
},
|
15
18
|
emits: ["click:day", "hover:day"],
|
16
19
|
setup(__props) {
|
@@ -62,6 +65,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
62
65
|
if (!props.dateRange) return true;
|
63
66
|
return isBeforeFrom.value && isBeforeTo.value || isAfterFrom.value && isAfterTo.value;
|
64
67
|
});
|
68
|
+
const isDisabled = computed(() => {
|
69
|
+
if (props.disabled) return true;
|
70
|
+
if (props.minDate) return props.minDate > endOfLastWeek.value;
|
71
|
+
if (props.maxDate) return props.maxDate < startOfFirstWeek.value;
|
72
|
+
return false;
|
73
|
+
});
|
65
74
|
return (_ctx, _cache) => {
|
66
75
|
return openBlock(), createElementBlock("div", null, [
|
67
76
|
createElementVNode("div", _hoisted_1, [
|
@@ -82,9 +91,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
82
91
|
"date-range": isEmpty.value || isBetweenRange.value ? void 0 : _ctx.dateRange,
|
83
92
|
"is-between": isBetweenRange.value,
|
84
93
|
"is-hover-enabled": _ctx.isHoverEnabled,
|
94
|
+
"min-date": _ctx.minDate,
|
95
|
+
"max-date": _ctx.maxDate,
|
96
|
+
disabled: isDisabled.value,
|
85
97
|
"onClick:day": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click:day", $event)),
|
86
98
|
"onHover:day": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("hover:day", $event))
|
87
|
-
}, null, 8, ["start-of-month", "start-of-week", "date-range", "is-between", "is-hover-enabled"]);
|
99
|
+
}, null, 8, ["start-of-month", "start-of-week", "date-range", "is-between", "is-hover-enabled", "min-date", "max-date", "disabled"]);
|
88
100
|
}), 128))
|
89
101
|
]);
|
90
102
|
};
|
@@ -6,6 +6,9 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
|
|
6
6
|
dateRange?: DateRange;
|
7
7
|
isBetween: boolean;
|
8
8
|
isHoverEnabled: boolean;
|
9
|
+
minDate?: Date;
|
10
|
+
maxDate?: Date;
|
11
|
+
disabled?: boolean;
|
9
12
|
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
10
13
|
"click:day": (value: Date) => void;
|
11
14
|
"hover:day": (value: Date) => void;
|
@@ -15,6 +18,9 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
|
|
15
18
|
dateRange?: DateRange;
|
16
19
|
isBetween: boolean;
|
17
20
|
isHoverEnabled: boolean;
|
21
|
+
minDate?: Date;
|
22
|
+
maxDate?: Date;
|
23
|
+
disabled?: boolean;
|
18
24
|
}>>> & {
|
19
25
|
"onClick:day"?: ((value: Date) => any) | undefined;
|
20
26
|
"onHover:day"?: ((value: Date) => any) | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CalendarWeek.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/DatePicker/components/CalendarWeek.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"CalendarWeek.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/DatePicker/components/CalendarWeek.vue"],"names":[],"mappings":"AA4GA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAA;;kBAM9B,IAAI;iBACL,IAAI;gBACL,SAAS;eACV,OAAO;oBACF,OAAO;cACb,IAAI;cACJ,IAAI;eACH,OAAO;;;;;kBAPJ,IAAI;iBACL,IAAI;gBACL,SAAS;eACV,OAAO;oBACF,OAAO;cACb,IAAI;cACJ,IAAI;eACH,OAAO;;;;;AA8JpB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
@@ -9,7 +9,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
9
|
startOfWeek: {},
|
10
10
|
dateRange: {},
|
11
11
|
isBetween: { type: Boolean },
|
12
|
-
isHoverEnabled: { type: Boolean }
|
12
|
+
isHoverEnabled: { type: Boolean },
|
13
|
+
minDate: {},
|
14
|
+
maxDate: {},
|
15
|
+
disabled: { type: Boolean }
|
13
16
|
},
|
14
17
|
emits: ["click:day", "hover:day"],
|
15
18
|
setup(__props) {
|
@@ -49,6 +52,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
49
52
|
if (!props.dateRange) return true;
|
50
53
|
return isBeforeFrom.value && isBeforeTo.value || isAfterFrom.value && isAfterTo.value;
|
51
54
|
});
|
55
|
+
const isDisabled = computed(() => {
|
56
|
+
if (props.disabled) return true;
|
57
|
+
if (props.minDate) return props.minDate > endOfWeek.value;
|
58
|
+
if (props.maxDate) return props.maxDate < props.startOfWeek;
|
59
|
+
return false;
|
60
|
+
});
|
52
61
|
return (_ctx, _cache) => {
|
53
62
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
54
63
|
(openBlock(true), createElementBlock(Fragment, null, renderList(days.value, (day, index) => {
|
@@ -60,9 +69,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
60
69
|
"is-between": isBetweenRange.value,
|
61
70
|
"is-week-out-of-month": isWeekOutOfMonth.value,
|
62
71
|
"is-hover-enabled": _ctx.isHoverEnabled,
|
72
|
+
"min-date": _ctx.minDate,
|
73
|
+
"max-date": _ctx.maxDate,
|
74
|
+
disabled: isDisabled.value,
|
63
75
|
"onClick:day": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click:day", $event)),
|
64
76
|
"onHover:day": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("hover:day", $event))
|
65
|
-
}, null, 8, ["start-of-month", "start-of-day", "date-range", "is-between", "is-week-out-of-month", "is-hover-enabled"]);
|
77
|
+
}, null, 8, ["start-of-month", "start-of-day", "date-range", "is-between", "is-week-out-of-month", "is-hover-enabled", "min-date", "max-date", "disabled"]);
|
66
78
|
}), 128))
|
67
79
|
]);
|
68
80
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInfiniteList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteList/WInfiniteList.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WInfiniteList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteList/WInfiniteList.vue"],"names":[],"mappings":"yBAoQiB,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,QAAQ,EAAE,WAAW,eACjF,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBACvF,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ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BeforeUnmount, openBlock, createElementBlock, Fragment, createElementVNode, normalizeClass, unref, renderSlot, normalizeProps, guardReactiveProps, createCommentVNode, createVNode, withCtx } from 'vue';
|
1
|
+
import { defineComponent, ref, toRef, provide, watch, onMounted, onBeforeUnmount, openBlock, createElementBlock, Fragment, createElementVNode, normalizeClass, unref, renderSlot, normalizeProps, guardReactiveProps, createCommentVNode, createVNode, withCtx, createBlock, resolveDynamicComponent } from 'vue';
|
2
2
|
import { useInfiniteListHeader } from './use/useInfiniteListHeader.js';
|
3
3
|
import _sfc_main$1 from './WInfiniteListPages.vue.js';
|
4
|
-
import _sfc_main$
|
4
|
+
import _sfc_main$3 from './components/InfiniteListPageSelectItem.vue.js';
|
5
5
|
import { useSelected } from './use/useSelected.js';
|
6
6
|
import { wInfiniteListSelection } from './models/injection.js';
|
7
|
+
import _sfc_main$2 from './components/EmptyComponent.vue.js';
|
7
8
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
9
10
|
__name: "WInfiniteList",
|
@@ -153,7 +154,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
153
154
|
"onUpdate:page": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:page", $event))
|
154
155
|
}, {
|
155
156
|
default: withCtx(({ item, setter, skeleton, refetch, previous, next, first, last, resetting, page, index }) => [
|
156
|
-
|
157
|
+
(openBlock(), createBlock(resolveDynamicComponent(skeleton ? _sfc_main$2 : _sfc_main$3), {
|
157
158
|
selected: skeleton ? false : unref(getIsSelected)(_ctx.valueGetter(item)),
|
158
159
|
"selected-between": skeleton ? false : unref(getIsSelectedBetween)(_ctx.valueGetter(item), page, index),
|
159
160
|
"onUpdate:selected": ($event) => {
|
@@ -179,7 +180,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
179
180
|
})
|
180
181
|
]),
|
181
182
|
_: 2
|
182
|
-
},
|
183
|
+
}, 1064, ["selected", "selected-between", "onUpdate:selected", "onUpdate:selectedRange", "onUpdate:selectedRangeHover"]))
|
183
184
|
]),
|
184
185
|
_: 3
|
185
186
|
}, 8, ["query-params", "use-query-fn", "is-invalid-page", "scrolling-element", "skip-scroll-target", "skeleton-length", "hide-page-title", "wrap", "no-gap", "transition", "page-length", "header-top", "header-height", "min-height", "last-child", "exclude-params", "empty-stub", "page-class", "max-pages", "refetch-interval", "query-options", "selected", "value-getter", "select-only", "unselect-only", "reverse-selection", "allow-page-selection"])
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EmptyComponent.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/EmptyComponent.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"EmptyComponent.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/EmptyComponent.vue"],"names":[],"mappings":"AAqBA,iBAAS,cAAc;qBAgBM,GAAG;EAa/B;AACD,QAAA,MAAM,eAAe,0NAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
@@ -1,11 +1,13 @@
|
|
1
|
-
import { renderSlot } from 'vue';
|
2
|
-
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
|
1
|
+
import { defineComponent, renderSlot } from 'vue';
|
3
2
|
|
4
|
-
const _sfc_main = {
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
4
|
+
...{ inheritAttrs: false },
|
5
|
+
__name: "EmptyComponent",
|
6
|
+
setup(__props) {
|
7
|
+
return (_ctx, _cache) => {
|
8
|
+
return renderSlot(_ctx.$slots, "default");
|
9
|
+
};
|
10
|
+
}
|
11
|
+
});
|
5
12
|
|
6
|
-
|
7
|
-
return renderSlot(_ctx.$slots, "default")
|
8
|
-
}
|
9
|
-
const EmptyComponent = /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render]]);
|
10
|
-
|
11
|
-
export { EmptyComponent as default };
|
13
|
+
export { _sfc_main as default };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"InfiniteListPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPage.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"InfiniteListPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPage.vue"],"names":[],"mappings":"yBA0WiB,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,QAAQ,EAAE,WAAW,eACjF,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBACvF,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA8bxD,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;qBA1bR,WAAW;oBACZ,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC;uBAC3C,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO;wBAC1B,MAAM;mBACX,OAAO;kBACR,OAAO;wBACD,OAAO;eAChB,OAAO;gBACN,OAAO;qBACF,OAAO;oBACR,OAAO;oBACP,MAAM;oBACN,OAAO;oBACP,OAAO;oBACP,MAAM;0BACA,MAAM,GAAG,KAAK;2BACb,OAAO,GAAG,IAAI;uBAClB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;mBAE1E,KAAK,EAAE;qBACL,CAA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,GAAG,IAAI;YACrC,aAAa,SAAS,MAAM,GAAG,IAAI;YACnC,SAAS,GAAG,IAAI;YAChB,2BAA2B,GAAG,IAAI;YAClC,iBAAiB,UAAU,KAAK,EAAE,GAAG,IAAI;YACzC,SAAS,GAAG,IAAI;UA4YqB;;;;YAGC,OAAO,CAAC,OAAO,WAAW,CAAC;;AAxcvE,wBAwc4E;AAY5E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { defineComponent, ref, toRef, computed, watch, onMounted, nextTick, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, unref, Fragment, createElementVNode, createBlock, createCommentVNode, resolveDynamicComponent, TransitionGroup, normalizeProps, mergeProps, withCtx, renderList, guardReactiveProps, renderSlot, toDisplayString } from 'vue';
|
2
2
|
import _sfc_main$2 from './InfiniteListPageTitle.vue.js';
|
3
3
|
import _sfc_main$1 from './InfiniteListPageSelection.vue.js';
|
4
|
-
import
|
4
|
+
import _sfc_main$3 from './EmptyComponent.vue.js';
|
5
5
|
|
6
6
|
const _hoisted_1 = { class: "select-none cursor-default w-select-field sm-not:px-3" };
|
7
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
@@ -44,7 +44,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
44
44
|
toRef(props, "queryParams"),
|
45
45
|
{
|
46
46
|
...props.queryOptions ?? {},
|
47
|
-
placeholderData: void 0,
|
48
47
|
refetchInterval: props.refetchInterval ? computed(() => isIntersecting.value ? props.refetchInterval : void 0) : void 0
|
49
48
|
}
|
50
49
|
);
|
@@ -196,7 +195,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
196
195
|
createElementVNode("div", {
|
197
196
|
class: normalizeClass(_ctx.pageClass)
|
198
197
|
}, [
|
199
|
-
hasData.value && unref(data)?.results ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.transition ? TransitionGroup :
|
198
|
+
hasData.value && unref(data)?.results ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.transition ? TransitionGroup : _sfc_main$3), normalizeProps(mergeProps({ key: 0 }, _ctx.transition ? {
|
200
199
|
["enter-active-class"]: "transition-[grid-template-rows] overflow-hidden grid",
|
201
200
|
["enter-from-class"]: "grid-rows-[0fr]",
|
202
201
|
["enter-to-class"]: "grid-rows-[1fr]",
|
@@ -207,11 +206,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
207
206
|
} : void 0)), {
|
208
207
|
default: withCtx(() => [
|
209
208
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(data).results, (item, index) => {
|
210
|
-
return openBlock(), createBlock(resolveDynamicComponent(_ctx.transition ? "div" :
|
209
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.transition ? "div" : _sfc_main$3), normalizeProps(mergeProps({
|
211
210
|
key: _ctx.valueGetter(item)
|
212
211
|
}, _ctx.transition ? { class: "w-full" } : void 0)), {
|
213
212
|
default: withCtx(() => [
|
214
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.transition ? "div" :
|
213
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.transition ? "div" : _sfc_main$3), normalizeProps(guardReactiveProps(_ctx.transition ? { class: "[overflow:inherit]" } : void 0)), {
|
215
214
|
default: withCtx(() => [
|
216
215
|
renderSlot(_ctx.$slots, "default", {
|
217
216
|
item,
|
@@ -19,7 +19,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
19
|
updateSelectedRangeHover: () => emit("update:selected-range-hover")
|
20
20
|
});
|
21
21
|
onUnmounted(() => {
|
22
|
-
emit("update:selected", false);
|
22
|
+
if (props.selected) emit("update:selected", false);
|
23
23
|
});
|
24
24
|
return (_ctx, _cache) => {
|
25
25
|
return renderSlot(_ctx.$slots, "default");
|
@@ -1,25 +1,27 @@
|
|
1
1
|
import { HorizontalAlign } from '../../utils/HorizontalAlign';
|
2
|
-
import {
|
2
|
+
import { InputDateProps } from './types';
|
3
3
|
|
4
|
-
interface Props extends Omit<InputSuggestProps<'text'>, 'modelValue'> {
|
5
|
-
modelValue?: Date | undefined;
|
6
|
-
}
|
7
4
|
declare function __VLS_template(): {
|
8
5
|
title?(_: {}): any;
|
9
6
|
subtitle?(_: {}): any;
|
7
|
+
right?(_: {}): any;
|
10
8
|
};
|
11
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<
|
9
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<InputDateProps>, {
|
12
10
|
modelValue: undefined;
|
13
11
|
maxHeight: number;
|
14
12
|
maxWidth: number;
|
15
13
|
horizontalAlign: HorizontalAlign;
|
14
|
+
minDate: undefined;
|
15
|
+
maxDate: undefined;
|
16
16
|
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
17
17
|
"update:model-value": (value: Date | undefined) => void;
|
18
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<
|
18
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<InputDateProps>, {
|
19
19
|
modelValue: undefined;
|
20
20
|
maxHeight: number;
|
21
21
|
maxWidth: number;
|
22
22
|
horizontalAlign: HorizontalAlign;
|
23
|
+
minDate: undefined;
|
24
|
+
maxDate: undefined;
|
23
25
|
}>>> & {
|
24
26
|
"onUpdate:model-value"?: ((value: Date | undefined) => any) | undefined;
|
25
27
|
}, {
|
@@ -27,6 +29,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
27
29
|
maxWidth: number;
|
28
30
|
horizontalAlign: HorizontalAlign;
|
29
31
|
modelValue: Date;
|
32
|
+
minDate: Date;
|
33
|
+
maxDate: Date;
|
30
34
|
}, {}>;
|
31
35
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
32
36
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInputDate.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Input/WInputDate.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WInputDate.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Input/WInputDate.vue"],"names":[],"mappings":"AAkHA,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;AACvD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AAsE3C,iBAAS,cAAc;mBAyJI,GAAG;sBACC,GAAG;mBACN,GAAG;EAqB9B;AACD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;MAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, ref, openBlock, createBlock, mergeProps, createSlots, withCtx, createElementVNode, withModifiers, createVNode, renderSlot } from 'vue';
|
1
|
+
import { defineComponent, ref, watch, openBlock, createBlock, mergeProps, createSlots, withCtx, createElementVNode, withModifiers, createVNode, renderSlot } from 'vue';
|
2
2
|
import _sfc_main$2 from '../DatePicker/WDatePickerSingle.vue.js';
|
3
3
|
import { dateFormat, parseDate } from '../../utils/dateTime.js';
|
4
4
|
import _sfc_main$1 from './WInputSuggest.vue.js';
|
@@ -9,6 +9,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
9
|
__name: "WInputDate",
|
10
10
|
props: {
|
11
11
|
modelValue: { default: void 0 },
|
12
|
+
minDate: { default: void 0 },
|
13
|
+
maxDate: { default: void 0 },
|
12
14
|
mobileTitle: {},
|
13
15
|
persist: { type: Boolean },
|
14
16
|
type: {},
|
@@ -44,7 +46,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
44
46
|
allowCopy: { type: Boolean },
|
45
47
|
teleport: { type: Boolean },
|
46
48
|
noZIndex: { type: Boolean },
|
47
|
-
maxHeight: { default:
|
49
|
+
maxHeight: { default: 440 },
|
48
50
|
maxWidth: { default: 480 },
|
49
51
|
horizontalAlign: { default: HorizontalAlign.RIGHT_INNER }
|
50
52
|
},
|
@@ -57,11 +59,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
57
59
|
const updateInputValue = (value) => {
|
58
60
|
inputValue.value = value;
|
59
61
|
const date = parseDate(value);
|
60
|
-
if (date)
|
62
|
+
if (!date) return;
|
63
|
+
if (props.minDate && props.minDate > date) {
|
64
|
+
emit("update:model-value", props.minDate);
|
65
|
+
return;
|
66
|
+
}
|
67
|
+
if (props.maxDate && props.maxDate < date) {
|
68
|
+
emit("update:model-value", props.maxDate);
|
69
|
+
return;
|
70
|
+
}
|
71
|
+
emit("update:model-value", date);
|
61
72
|
};
|
62
73
|
const formatModelValue = (value) => {
|
63
74
|
inputValue.value = value ? dateFormat(value) : "";
|
64
75
|
};
|
76
|
+
watch(() => props.modelValue, (value) => {
|
77
|
+
inputValue.value = value ? dateFormat(value) : "";
|
78
|
+
});
|
65
79
|
return (_ctx, _cache) => {
|
66
80
|
return openBlock(), createBlock(_sfc_main$1, mergeProps({
|
67
81
|
ref_key: "inputComponent",
|
@@ -84,11 +98,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
84
98
|
createVNode(_sfc_main$2, {
|
85
99
|
"model-value": _ctx.modelValue,
|
86
100
|
title: _ctx.title,
|
101
|
+
"min-date": _ctx.minDate,
|
102
|
+
"max-date": _ctx.maxDate,
|
87
103
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => {
|
88
104
|
_ctx.$emit("update:model-value", $event);
|
89
105
|
formatModelValue($event);
|
90
106
|
})
|
91
|
-
}, null, 8, ["model-value", "title"])
|
107
|
+
}, null, 8, ["model-value", "title", "min-date", "max-date"])
|
92
108
|
], 32)
|
93
109
|
]),
|
94
110
|
_: 2
|
@@ -106,6 +122,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
106
122
|
renderSlot(_ctx.$slots, "subtitle")
|
107
123
|
]),
|
108
124
|
key: "1"
|
125
|
+
} : void 0,
|
126
|
+
_ctx.$slots.right ? {
|
127
|
+
name: "right",
|
128
|
+
fn: withCtx(() => [
|
129
|
+
renderSlot(_ctx.$slots, "right")
|
130
|
+
]),
|
131
|
+
key: "2"
|
109
132
|
} : void 0
|
110
133
|
]), 1040, ["class"]);
|
111
134
|
};
|
@@ -42,4 +42,9 @@ export interface InputOptionsProps<Type extends InputType, Option> extends Input
|
|
42
42
|
model?: boolean;
|
43
43
|
}>;
|
44
44
|
}
|
45
|
+
export interface InputDateProps extends Omit<InputSuggestProps<'text'>, 'modelValue'> {
|
46
|
+
modelValue?: Date | undefined;
|
47
|
+
minDate?: Date;
|
48
|
+
maxDate?: Date;
|
49
|
+
}
|
45
50
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,KAAK,CAAA;AAClC,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAA;AAE5D,MAAM,WAAW,UAAU,CAAC,IAAI,SAAS,SAAS,CAAE,SAAQ,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC;IAC/F,UAAU,CAAC,EAAE,CAAC,IAAI,SAAS,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS,CAAA;IAClE,IAAI,CAAC,EAAE,IAAI,CAAA;IAEX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,IAAI,CAAC,EAAE,MAAM,CAA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AAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
@@ -47,15 +47,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
47
47
|
const route = useRoute();
|
48
48
|
const router = useRouter();
|
49
49
|
const routeTo = computed(() => router.resolve(props.to));
|
50
|
+
const titleLocal = computed(() => props.title ?? (typeof routeTo.value.meta.titleShort === "string" ? routeTo.value.meta.titleShort : typeof routeTo.value.meta.title === "string" ? routeTo.value.meta.title : ""));
|
50
51
|
const isActive = computed(() => {
|
51
52
|
if (routeTo.value?.name !== route.name) return false;
|
52
53
|
return isEqualObj(route.query, routeTo.value.query, EXCLUDE_QUERY_FIELDS, props.queryFields);
|
53
54
|
});
|
54
55
|
const isTextColor = computed(() => props.hasActive ? !props.indent : isActive.value);
|
55
56
|
const isBigCount = computed(() => props.counter !== void 0 && props.counter >= 1e3);
|
56
|
-
watch(isActive, (value) => emit("update:isActive", [
|
57
|
+
watch(isActive, (value) => emit("update:isActive", [titleLocal.value, value]), { immediate: true });
|
57
58
|
onBeforeUnmount(() => {
|
58
|
-
emit("update:isActive", [
|
59
|
+
emit("update:isActive", [titleLocal.value, false]);
|
59
60
|
});
|
60
61
|
return (_ctx, _cache) => {
|
61
62
|
return openBlock(), createBlock(unref(RouterLink), {
|
@@ -92,12 +93,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
92
93
|
createElementVNode("div", _hoisted_5, [
|
93
94
|
createElementVNode("div", _hoisted_6, [
|
94
95
|
createElementVNode("div", _hoisted_7, [
|
95
|
-
_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
|
96
|
+
_ctx.icon ?? routeTo.value.meta.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon ?? routeTo.value.meta.icon), {
|
96
97
|
key: 0,
|
97
98
|
class: "square-6"
|
98
99
|
})) : renderSlot(_ctx.$slots, "icon", { key: 1 })
|
99
100
|
]),
|
100
|
-
createElementVNode("div", _hoisted_8, toDisplayString(
|
101
|
+
createElementVNode("div", _hoisted_8, toDisplayString(titleLocal.value), 1),
|
101
102
|
createElementVNode("div", _hoisted_9, [
|
102
103
|
createTextVNode(" "),
|
103
104
|
!_ctx.skeleton ? (openBlock(), createElementBlock("span", _hoisted_10, [
|
package/dist/main.js
CHANGED
@@ -69,7 +69,7 @@ export { Modal, initModal } from './utils/Modal.js';
|
|
69
69
|
import './utils/supportsPassive.js';
|
70
70
|
export { SemanticType } from './utils/SemanticType.js';
|
71
71
|
export { HorizontalAlign } from './utils/HorizontalAlign.js';
|
72
|
-
export { Month, WeekDay, addDay, addMonth, addYear, dateFormat, dateFormatter, dateRegexp, dateToQueryString, datetimeFormat, durationHumanize, getDurationRound, getStartOfDay, getStartOfMonth, getStartOfWeek, isSameDate, isSameMonth, isSameYear, monthShortFormatter, parseDate, timeFormat, weekdayShortFormatter } from './utils/dateTime.js';
|
72
|
+
export { Month, WeekDay, addDay, addMonth, addYear, dateFormat, dateFormatter, dateRegexp, dateToQueryString, datetimeFormat, durationHumanize, getDurationRound, getStartOfDay, getStartOfMonth, getStartOfNextDay, getStartOfWeek, isSameDate, isSameMonth, isSameYear, monthShortFormatter, parseDate, timeFormat, weekdayShortFormatter } from './utils/dateTime.js';
|
73
73
|
export { getIsMobile, getIsTouchDevice } from './utils/mobile.js';
|
74
74
|
export { useDefaultQuery } from './utils/useDefaultQuery.js';
|
75
75
|
export { useCopy } from './utils/useCopy.js';
|
package/dist/utils/dateTime.d.ts
CHANGED
@@ -38,6 +38,7 @@ export declare function addMonth(date: Date | undefined, count: number): Date;
|
|
38
38
|
export declare function addYear(date: Date | undefined, count: number): Date;
|
39
39
|
export declare function getStartOfWeek(date?: Date, startFrom?: WeekDay): Date;
|
40
40
|
export declare function getStartOfDay(date?: Date): Date;
|
41
|
+
export declare function getStartOfNextDay(date?: Date): Date;
|
41
42
|
export declare function isSameDate(a: Date, b: Date): boolean;
|
42
43
|
export declare function isSameMonth(a: Date, b: Date): boolean;
|
43
44
|
export declare function isSameYear(a: Date, b: Date): boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dateTime.d.ts","sourceRoot":"","sources":["../../src/utils/dateTime.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,qBAAgD,CAAA;AAClF,eAAO,MAAM,mBAAmB,qBAA8C,CAAA;AAC9E,eAAO,MAAM,aAAa,qBAAiF,CAAA;AAE3G,eAAO,MAAM,UAAU,QAA0B,CAAA;AAEjD,eAAO,MAAM,SAAS,UAAW,MAAM,KAAG,IAAI,GAAG,SAQhD,CAAA;AAED,oBAAY,OAAO;IACjB,MAAM,IAAI;IACV,MAAM,IAAI;IACV,OAAO,IAAI;IACX,SAAS,IAAI;IACb,QAAQ,IAAI;IACZ,MAAM,IAAI;IACV,QAAQ,IAAI;CACb;AAED,oBAAY,KAAK;IACf,OAAO,IAAI;IACX,QAAQ,IAAI;IACZ,KAAK,IAAI;IACT,KAAK,IAAI;IACT,GAAG,IAAI;IACP,IAAI,IAAI;IACR,IAAI,IAAI;IACR,MAAM,IAAI;IACV,SAAS,IAAI;IACb,OAAO,IAAI;IACX,QAAQ,KAAK;IACb,QAAQ,KAAK;CACd;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAMpD;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAI7C;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE7C;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAEjD;AAED,wBAAgB,gBAAgB,CAAC,eAAe,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAiChF;AAkCD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAUxD;AAED,wBAAgB,eAAe,CAAC,IAAI,GA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AO,CAEpD;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,OAAO,CAErD;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,OAAO,CAEpD"}
|
package/dist/utils/dateTime.js
CHANGED
@@ -146,6 +146,11 @@ function getStartOfDay(date = /* @__PURE__ */ new Date()) {
|
|
146
146
|
startOfDay.setHours(0, 0, 0, 0);
|
147
147
|
return startOfDay;
|
148
148
|
}
|
149
|
+
function getStartOfNextDay(date = /* @__PURE__ */ new Date()) {
|
150
|
+
const startOfDay = getStartOfDay(date);
|
151
|
+
startOfDay.setDate(startOfDay.getDate() + 1);
|
152
|
+
return startOfDay;
|
153
|
+
}
|
149
154
|
function isSameDate(a, b) {
|
150
155
|
return a.getDate() === b.getDate() && isSameMonth(a, b);
|
151
156
|
}
|
@@ -156,4 +161,4 @@ function isSameYear(a, b) {
|
|
156
161
|
return a.getFullYear() === b.getFullYear();
|
157
162
|
}
|
158
163
|
|
159
|
-
export { Month, WeekDay, addDay, addMonth, addYear, dateFormat, dateFormatter, dateRegexp, dateToQueryString, datetimeFormat, durationHumanize, getDurationRound, getStartOfDay, getStartOfMonth, getStartOfWeek, isSameDate, isSameMonth, isSameYear, monthShortFormatter, parseDate, timeFormat, weekdayShortFormatter };
|
164
|
+
export { Month, WeekDay, addDay, addMonth, addYear, dateFormat, dateFormatter, dateRegexp, dateToQueryString, datetimeFormat, durationHumanize, getDurationRound, getStartOfDay, getStartOfMonth, getStartOfNextDay, getStartOfWeek, isSameDate, isSameMonth, isSameYear, monthShortFormatter, parseDate, timeFormat, weekdayShortFormatter };
|