@coreui/vue-pro 4.10.4 → 4.11.0
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/calendar/CCalendar.d.ts +10 -30
- package/dist/components/date-range-picker/CDateRangePicker.d.ts +43 -0
- package/dist/composables/index.d.ts +3 -1
- package/dist/composables/useDebouncedCallback.d.ts +1 -0
- package/dist/composables/useIsVisible.d.ts +2 -0
- package/dist/index.es.js +127 -81
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +127 -79
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/calendar/CCalendar.ts +11 -19
- package/src/components/calendar/utils.ts +3 -0
- package/src/components/date-range-picker/CDateRangePicker.ts +63 -44
- package/src/components/time-picker/CTimePickerRollCol.ts +19 -5
- package/src/composables/index.ts +3 -1
- package/src/composables/useDebouncedCallback.ts +16 -0
- package/src/composables/useIsVisible.ts +19 -0
|
@@ -3,9 +3,7 @@ declare const CCalendar: import("vue").DefineComponent<{
|
|
|
3
3
|
/**
|
|
4
4
|
* Default date of the component
|
|
5
5
|
*/
|
|
6
|
-
calendarDate:
|
|
7
|
-
type: (StringConstructor | DateConstructor)[];
|
|
8
|
-
};
|
|
6
|
+
calendarDate: (StringConstructor | DateConstructor)[];
|
|
9
7
|
/**
|
|
10
8
|
* The number of calendars that render on desktop devices.
|
|
11
9
|
*/
|
|
@@ -34,9 +32,7 @@ declare const CCalendar: import("vue").DefineComponent<{
|
|
|
34
32
|
/**
|
|
35
33
|
* Initial selected to date (range).
|
|
36
34
|
*/
|
|
37
|
-
endDate:
|
|
38
|
-
type: (StringConstructor | DateConstructor)[];
|
|
39
|
-
};
|
|
35
|
+
endDate: (StringConstructor | DateConstructor)[];
|
|
40
36
|
/**
|
|
41
37
|
* Sets the day of start week.
|
|
42
38
|
* - 0 - Sunday,
|
|
@@ -61,15 +57,11 @@ declare const CCalendar: import("vue").DefineComponent<{
|
|
|
61
57
|
/**
|
|
62
58
|
* Max selectable date.
|
|
63
59
|
*/
|
|
64
|
-
maxDate:
|
|
65
|
-
type: (StringConstructor | DateConstructor)[];
|
|
66
|
-
};
|
|
60
|
+
maxDate: (StringConstructor | DateConstructor)[];
|
|
67
61
|
/**
|
|
68
62
|
* Min selectable date.
|
|
69
63
|
*/
|
|
70
|
-
minDate:
|
|
71
|
-
type: (StringConstructor | DateConstructor)[];
|
|
72
|
-
};
|
|
64
|
+
minDate: (StringConstructor | DateConstructor)[];
|
|
73
65
|
/**
|
|
74
66
|
* Show arrows navigation.
|
|
75
67
|
*/
|
|
@@ -109,9 +101,7 @@ declare const CCalendar: import("vue").DefineComponent<{
|
|
|
109
101
|
/**
|
|
110
102
|
* Initial selected date.
|
|
111
103
|
*/
|
|
112
|
-
startDate:
|
|
113
|
-
type: (StringConstructor | DateConstructor)[];
|
|
114
|
-
};
|
|
104
|
+
startDate: (StringConstructor | DateConstructor)[];
|
|
115
105
|
/**
|
|
116
106
|
* Set length or format of day name.
|
|
117
107
|
*
|
|
@@ -128,9 +118,7 @@ declare const CCalendar: import("vue").DefineComponent<{
|
|
|
128
118
|
/**
|
|
129
119
|
* Default date of the component
|
|
130
120
|
*/
|
|
131
|
-
calendarDate:
|
|
132
|
-
type: (StringConstructor | DateConstructor)[];
|
|
133
|
-
};
|
|
121
|
+
calendarDate: (StringConstructor | DateConstructor)[];
|
|
134
122
|
/**
|
|
135
123
|
* The number of calendars that render on desktop devices.
|
|
136
124
|
*/
|
|
@@ -159,9 +147,7 @@ declare const CCalendar: import("vue").DefineComponent<{
|
|
|
159
147
|
/**
|
|
160
148
|
* Initial selected to date (range).
|
|
161
149
|
*/
|
|
162
|
-
endDate:
|
|
163
|
-
type: (StringConstructor | DateConstructor)[];
|
|
164
|
-
};
|
|
150
|
+
endDate: (StringConstructor | DateConstructor)[];
|
|
165
151
|
/**
|
|
166
152
|
* Sets the day of start week.
|
|
167
153
|
* - 0 - Sunday,
|
|
@@ -186,15 +172,11 @@ declare const CCalendar: import("vue").DefineComponent<{
|
|
|
186
172
|
/**
|
|
187
173
|
* Max selectable date.
|
|
188
174
|
*/
|
|
189
|
-
maxDate:
|
|
190
|
-
type: (StringConstructor | DateConstructor)[];
|
|
191
|
-
};
|
|
175
|
+
maxDate: (StringConstructor | DateConstructor)[];
|
|
192
176
|
/**
|
|
193
177
|
* Min selectable date.
|
|
194
178
|
*/
|
|
195
|
-
minDate:
|
|
196
|
-
type: (StringConstructor | DateConstructor)[];
|
|
197
|
-
};
|
|
179
|
+
minDate: (StringConstructor | DateConstructor)[];
|
|
198
180
|
/**
|
|
199
181
|
* Show arrows navigation.
|
|
200
182
|
*/
|
|
@@ -234,9 +216,7 @@ declare const CCalendar: import("vue").DefineComponent<{
|
|
|
234
216
|
/**
|
|
235
217
|
* Initial selected date.
|
|
236
218
|
*/
|
|
237
|
-
startDate:
|
|
238
|
-
type: (StringConstructor | DateConstructor)[];
|
|
239
|
-
};
|
|
219
|
+
startDate: (StringConstructor | DateConstructor)[];
|
|
240
220
|
/**
|
|
241
221
|
* Set length or format of day name.
|
|
242
222
|
*
|
|
@@ -180,6 +180,27 @@ declare const CDateRangePicker: import("vue").DefineComponent<{
|
|
|
180
180
|
type: BooleanConstructor;
|
|
181
181
|
default: boolean;
|
|
182
182
|
};
|
|
183
|
+
/**
|
|
184
|
+
* Custom function to format the selected date into a string according to a custom format.
|
|
185
|
+
*
|
|
186
|
+
* @since v4.11.0
|
|
187
|
+
*/
|
|
188
|
+
inputDateFormat: FunctionConstructor;
|
|
189
|
+
/**
|
|
190
|
+
* Custom function to parse the input value into a valid Date object.
|
|
191
|
+
*
|
|
192
|
+
* @since v4.11.0
|
|
193
|
+
*/
|
|
194
|
+
inputDateParse: FunctionConstructor;
|
|
195
|
+
/**
|
|
196
|
+
* Defines the delay (in milliseconds) for the input field's onChange event.
|
|
197
|
+
*
|
|
198
|
+
* @since v4.11.0
|
|
199
|
+
*/
|
|
200
|
+
inputOnChangeDelay: {
|
|
201
|
+
type: NumberConstructor;
|
|
202
|
+
default: number;
|
|
203
|
+
};
|
|
183
204
|
/**
|
|
184
205
|
* Toggle the readonly state for the component.
|
|
185
206
|
*/
|
|
@@ -549,6 +570,27 @@ declare const CDateRangePicker: import("vue").DefineComponent<{
|
|
|
549
570
|
type: BooleanConstructor;
|
|
550
571
|
default: boolean;
|
|
551
572
|
};
|
|
573
|
+
/**
|
|
574
|
+
* Custom function to format the selected date into a string according to a custom format.
|
|
575
|
+
*
|
|
576
|
+
* @since v4.11.0
|
|
577
|
+
*/
|
|
578
|
+
inputDateFormat: FunctionConstructor;
|
|
579
|
+
/**
|
|
580
|
+
* Custom function to parse the input value into a valid Date object.
|
|
581
|
+
*
|
|
582
|
+
* @since v4.11.0
|
|
583
|
+
*/
|
|
584
|
+
inputDateParse: FunctionConstructor;
|
|
585
|
+
/**
|
|
586
|
+
* Defines the delay (in milliseconds) for the input field's onChange event.
|
|
587
|
+
*
|
|
588
|
+
* @since v4.11.0
|
|
589
|
+
*/
|
|
590
|
+
inputOnChangeDelay: {
|
|
591
|
+
type: NumberConstructor;
|
|
592
|
+
default: number;
|
|
593
|
+
};
|
|
552
594
|
/**
|
|
553
595
|
* Toggle the readonly state for the component.
|
|
554
596
|
*/
|
|
@@ -773,6 +815,7 @@ declare const CDateRangePicker: import("vue").DefineComponent<{
|
|
|
773
815
|
inputReadOnly: boolean;
|
|
774
816
|
placeholder: string | string[];
|
|
775
817
|
closeOnSelect: boolean;
|
|
818
|
+
inputOnChangeDelay: number;
|
|
776
819
|
separator: boolean;
|
|
777
820
|
timepicker: boolean;
|
|
778
821
|
todayButton: string | boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useDebouncedCallback: <F extends Function>(callback: F, delay: number) => void;
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, provide, h as h$1, Transition, withDirectives, inject, watch, onBeforeMount, onMounted, onUpdated, toRefs, cloneVNode, nextTick, computed, vShow, onBeforeUnmount, Teleport } from 'vue';
|
|
1
|
+
import { defineComponent, ref, provide, h as h$1, Transition, withDirectives, inject, watch, onBeforeMount, onMounted, onUpdated, toRefs, cloneVNode, onUnmounted, nextTick, computed, vShow, onBeforeUnmount, Teleport } from 'vue';
|
|
2
2
|
|
|
3
3
|
const CAccordion = defineComponent({
|
|
4
4
|
name: 'CAccordion',
|
|
@@ -1037,9 +1037,7 @@ const CCalendar = defineComponent({
|
|
|
1037
1037
|
/**
|
|
1038
1038
|
* Default date of the component
|
|
1039
1039
|
*/
|
|
1040
|
-
calendarDate:
|
|
1041
|
-
type: [Date, String],
|
|
1042
|
-
},
|
|
1040
|
+
calendarDate: [Date, String],
|
|
1043
1041
|
/**
|
|
1044
1042
|
* The number of calendars that render on desktop devices.
|
|
1045
1043
|
*/
|
|
@@ -1079,9 +1077,7 @@ const CCalendar = defineComponent({
|
|
|
1079
1077
|
/**
|
|
1080
1078
|
* Initial selected to date (range).
|
|
1081
1079
|
*/
|
|
1082
|
-
endDate:
|
|
1083
|
-
type: [Date, String],
|
|
1084
|
-
},
|
|
1080
|
+
endDate: [Date, String],
|
|
1085
1081
|
/**
|
|
1086
1082
|
* Sets the day of start week.
|
|
1087
1083
|
* - 0 - Sunday,
|
|
@@ -1106,15 +1102,11 @@ const CCalendar = defineComponent({
|
|
|
1106
1102
|
/**
|
|
1107
1103
|
* Max selectable date.
|
|
1108
1104
|
*/
|
|
1109
|
-
maxDate:
|
|
1110
|
-
type: [Date, String],
|
|
1111
|
-
},
|
|
1105
|
+
maxDate: [Date, String],
|
|
1112
1106
|
/**
|
|
1113
1107
|
* Min selectable date.
|
|
1114
1108
|
*/
|
|
1115
|
-
minDate:
|
|
1116
|
-
type: [Date, String],
|
|
1117
|
-
},
|
|
1109
|
+
minDate: [Date, String],
|
|
1118
1110
|
/**
|
|
1119
1111
|
* Show arrows navigation.
|
|
1120
1112
|
*/
|
|
@@ -1154,9 +1146,7 @@ const CCalendar = defineComponent({
|
|
|
1154
1146
|
/**
|
|
1155
1147
|
* Initial selected date.
|
|
1156
1148
|
*/
|
|
1157
|
-
startDate:
|
|
1158
|
-
type: [Date, String],
|
|
1159
|
-
},
|
|
1149
|
+
startDate: [Date, String],
|
|
1160
1150
|
/**
|
|
1161
1151
|
* Set length or format of day name.
|
|
1162
1152
|
*
|
|
@@ -1236,13 +1226,15 @@ const CCalendar = defineComponent({
|
|
|
1236
1226
|
}
|
|
1237
1227
|
});
|
|
1238
1228
|
watch(() => props.maxDate, () => {
|
|
1239
|
-
|
|
1240
|
-
|
|
1229
|
+
const date = props.maxDate ? new Date(props.maxDate) : null;
|
|
1230
|
+
if (!isSameDateAs(date, maxDate.value)) {
|
|
1231
|
+
maxDate.value = date;
|
|
1241
1232
|
}
|
|
1242
1233
|
});
|
|
1243
1234
|
watch(() => props.minDate, () => {
|
|
1244
|
-
|
|
1245
|
-
|
|
1235
|
+
const date = props.minDate ? new Date(props.minDate) : null;
|
|
1236
|
+
if (!isSameDateAs(date, minDate.value)) {
|
|
1237
|
+
minDate.value = date;
|
|
1246
1238
|
}
|
|
1247
1239
|
});
|
|
1248
1240
|
watch(() => props.selectEndDate, () => {
|
|
@@ -6550,6 +6542,52 @@ const CPickerPlugin = {
|
|
|
6550
6542
|
},
|
|
6551
6543
|
};
|
|
6552
6544
|
|
|
6545
|
+
const useDebouncedCallback = (callback, delay) => {
|
|
6546
|
+
const timeout = ref();
|
|
6547
|
+
const debouncedFn = (...args) => {
|
|
6548
|
+
const handler = () => {
|
|
6549
|
+
clearTimeout(timeout.value);
|
|
6550
|
+
callback(...args);
|
|
6551
|
+
};
|
|
6552
|
+
clearTimeout(timeout.value);
|
|
6553
|
+
timeout.value = setTimeout(handler, delay);
|
|
6554
|
+
};
|
|
6555
|
+
return debouncedFn();
|
|
6556
|
+
};
|
|
6557
|
+
|
|
6558
|
+
const useIsVisible = (el) => {
|
|
6559
|
+
const isIntersecting = ref(false);
|
|
6560
|
+
const observer = ref();
|
|
6561
|
+
onMounted(() => {
|
|
6562
|
+
observer.value = new IntersectionObserver(([entry]) => {
|
|
6563
|
+
isIntersecting.value = entry.isIntersecting;
|
|
6564
|
+
});
|
|
6565
|
+
el.value && observer.value.observe(el.value);
|
|
6566
|
+
});
|
|
6567
|
+
onUnmounted(() => {
|
|
6568
|
+
observer.value.disconnect();
|
|
6569
|
+
});
|
|
6570
|
+
return isIntersecting;
|
|
6571
|
+
};
|
|
6572
|
+
|
|
6573
|
+
const usePopper = () => {
|
|
6574
|
+
const _popper = ref();
|
|
6575
|
+
const initPopper = (reference, popper, options) => {
|
|
6576
|
+
_popper.value = createPopper(reference, popper, options);
|
|
6577
|
+
};
|
|
6578
|
+
const destroyPopper = () => {
|
|
6579
|
+
if (_popper.value) {
|
|
6580
|
+
_popper.value.destroy();
|
|
6581
|
+
}
|
|
6582
|
+
_popper.value = undefined;
|
|
6583
|
+
};
|
|
6584
|
+
return {
|
|
6585
|
+
popper: _popper.value,
|
|
6586
|
+
initPopper,
|
|
6587
|
+
destroyPopper,
|
|
6588
|
+
};
|
|
6589
|
+
};
|
|
6590
|
+
|
|
6553
6591
|
const CTimePickerRollCol = defineComponent({
|
|
6554
6592
|
name: 'CTimePickerRollCol',
|
|
6555
6593
|
props: {
|
|
@@ -6565,15 +6603,24 @@ const CTimePickerRollCol = defineComponent({
|
|
|
6565
6603
|
setup(props, { emit }) {
|
|
6566
6604
|
const init = ref(true);
|
|
6567
6605
|
const colRef = ref();
|
|
6568
|
-
|
|
6606
|
+
const isVisible = useIsVisible(colRef);
|
|
6607
|
+
const scrollToSelectedElement = () => {
|
|
6569
6608
|
const nodeEl = colRef.value?.querySelector('.selected');
|
|
6570
|
-
if (nodeEl && nodeEl instanceof HTMLElement) {
|
|
6609
|
+
if (isVisible.value && nodeEl && nodeEl instanceof HTMLElement) {
|
|
6571
6610
|
colRef.value?.scrollTo({
|
|
6572
6611
|
top: nodeEl.offsetTop,
|
|
6573
6612
|
behavior: init.value ? 'auto' : 'smooth',
|
|
6574
6613
|
});
|
|
6575
6614
|
}
|
|
6576
|
-
|
|
6615
|
+
};
|
|
6616
|
+
watch(isVisible, () => {
|
|
6617
|
+
scrollToSelectedElement();
|
|
6618
|
+
if (isVisible.value) {
|
|
6619
|
+
init.value = false;
|
|
6620
|
+
}
|
|
6621
|
+
});
|
|
6622
|
+
onUpdated(() => {
|
|
6623
|
+
scrollToSelectedElement();
|
|
6577
6624
|
});
|
|
6578
6625
|
const handleKeyDown = (event, value) => {
|
|
6579
6626
|
if (event.code === 'Space' || event.key === 'Enter') {
|
|
@@ -7474,6 +7521,27 @@ const CDateRangePicker = defineComponent({
|
|
|
7474
7521
|
type: Boolean,
|
|
7475
7522
|
default: true,
|
|
7476
7523
|
},
|
|
7524
|
+
/**
|
|
7525
|
+
* Custom function to format the selected date into a string according to a custom format.
|
|
7526
|
+
*
|
|
7527
|
+
* @since v4.11.0
|
|
7528
|
+
*/
|
|
7529
|
+
inputDateFormat: Function,
|
|
7530
|
+
/**
|
|
7531
|
+
* Custom function to parse the input value into a valid Date object.
|
|
7532
|
+
*
|
|
7533
|
+
* @since v4.11.0
|
|
7534
|
+
*/
|
|
7535
|
+
inputDateParse: Function,
|
|
7536
|
+
/**
|
|
7537
|
+
* Defines the delay (in milliseconds) for the input field's onChange event.
|
|
7538
|
+
*
|
|
7539
|
+
* @since v4.11.0
|
|
7540
|
+
*/
|
|
7541
|
+
inputOnChangeDelay: {
|
|
7542
|
+
type: Number,
|
|
7543
|
+
default: 750,
|
|
7544
|
+
},
|
|
7477
7545
|
/**
|
|
7478
7546
|
* Toggle the readonly state for the component.
|
|
7479
7547
|
*/
|
|
@@ -7733,8 +7801,8 @@ const CDateRangePicker = defineComponent({
|
|
|
7733
7801
|
const endDate = ref(props.endDate ? new Date(props.endDate) : null);
|
|
7734
7802
|
const initialStartDate = ref(startDate.value ? new Date(startDate.value) : null);
|
|
7735
7803
|
const initialEndDate = ref(endDate.value ? new Date(endDate.value) : null);
|
|
7736
|
-
const maxDate = ref(props.maxDate
|
|
7737
|
-
const minDate = ref(props.minDate
|
|
7804
|
+
const maxDate = ref(props.maxDate ? new Date(props.maxDate) : null);
|
|
7805
|
+
const minDate = ref(props.minDate ? new Date(props.minDate) : null);
|
|
7738
7806
|
const selectEndDate = ref(false);
|
|
7739
7807
|
const isValid = ref(props.valid ?? (props.invalid === true ? false : undefined));
|
|
7740
7808
|
const isMobile = ref(false);
|
|
@@ -7745,28 +7813,18 @@ const CDateRangePicker = defineComponent({
|
|
|
7745
7813
|
isValid.value = props.valid ?? (props.invalid === true ? false : undefined);
|
|
7746
7814
|
});
|
|
7747
7815
|
watch(() => props.startDate, () => {
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
calendarDate.value = date;
|
|
7751
|
-
startDate.value = date;
|
|
7752
|
-
}
|
|
7816
|
+
calendarDate.value = props.startDate ? new Date(props.startDate) : new Date();
|
|
7817
|
+
startDate.value = props.startDate ? new Date(props.startDate) : null;
|
|
7753
7818
|
});
|
|
7754
7819
|
watch(() => props.endDate, () => {
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
calendarDate.value = date;
|
|
7758
|
-
endDate.value = date;
|
|
7759
|
-
}
|
|
7820
|
+
calendarDate.value = props.endDate ? new Date(props.endDate) : new Date();
|
|
7821
|
+
endDate.value = props.endDate ? new Date(props.endDate) : null;
|
|
7760
7822
|
});
|
|
7761
7823
|
watch(() => props.maxDate, () => {
|
|
7762
|
-
|
|
7763
|
-
maxDate.value = new Date(props.maxDate);
|
|
7764
|
-
}
|
|
7824
|
+
maxDate.value = props.maxDate ? new Date(props.maxDate) : null;
|
|
7765
7825
|
});
|
|
7766
7826
|
watch(() => props.minDate, () => {
|
|
7767
|
-
|
|
7768
|
-
minDate.value = new Date(props.minDate);
|
|
7769
|
-
}
|
|
7827
|
+
minDate.value = props.minDate ? new Date(props.minDate) : null;
|
|
7770
7828
|
});
|
|
7771
7829
|
watch(inputStartRef, () => {
|
|
7772
7830
|
if (inputStartRef.value && inputStartRef.value.form) {
|
|
@@ -7782,11 +7840,13 @@ const CDateRangePicker = defineComponent({
|
|
|
7782
7840
|
}
|
|
7783
7841
|
});
|
|
7784
7842
|
const formatDate = (date) => {
|
|
7785
|
-
return props.
|
|
7786
|
-
?
|
|
7787
|
-
: props.
|
|
7788
|
-
? date
|
|
7789
|
-
:
|
|
7843
|
+
return props.inputDateFormat
|
|
7844
|
+
? props.inputDateFormat(date)
|
|
7845
|
+
: props.format
|
|
7846
|
+
? format(date, props.format)
|
|
7847
|
+
: props.timepicker
|
|
7848
|
+
? date.toLocaleString(props.locale)
|
|
7849
|
+
: date.toLocaleDateString(props.locale);
|
|
7790
7850
|
};
|
|
7791
7851
|
const setInputValue = (date) => {
|
|
7792
7852
|
if (date) {
|
|
@@ -7859,6 +7919,20 @@ const CDateRangePicker = defineComponent({
|
|
|
7859
7919
|
emit('update:start-date', null);
|
|
7860
7920
|
emit('update:end-date', null);
|
|
7861
7921
|
};
|
|
7922
|
+
const handleOnChange = (value, input) => {
|
|
7923
|
+
const date = props.inputDateParse
|
|
7924
|
+
? props.inputDateParse(value)
|
|
7925
|
+
: getLocalDateFromString(value, props.locale, props.timepicker);
|
|
7926
|
+
if (date instanceof Date && date.getTime()) {
|
|
7927
|
+
calendarDate.value = date;
|
|
7928
|
+
if (input === 'start') {
|
|
7929
|
+
startDate.value = date;
|
|
7930
|
+
}
|
|
7931
|
+
else {
|
|
7932
|
+
endDate.value = date;
|
|
7933
|
+
}
|
|
7934
|
+
}
|
|
7935
|
+
};
|
|
7862
7936
|
const InputGroup = () => h$1('div', {
|
|
7863
7937
|
class: [
|
|
7864
7938
|
'input-group',
|
|
@@ -7881,13 +7955,8 @@ const CDateRangePicker = defineComponent({
|
|
|
7881
7955
|
onClick: () => {
|
|
7882
7956
|
selectEndDate.value = false;
|
|
7883
7957
|
},
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
if (date instanceof Date && date.getTime()) {
|
|
7887
|
-
calendarDate.value = date;
|
|
7888
|
-
startDate.value = date;
|
|
7889
|
-
}
|
|
7890
|
-
},
|
|
7958
|
+
onChange: (event) => handleOnChange(event.target.value, 'start'),
|
|
7959
|
+
onInput: (event) => useDebouncedCallback(() => handleOnChange(event.target.value, 'start'), props.inputOnChangeDelay),
|
|
7891
7960
|
placeholder: Array.isArray(props.placeholder)
|
|
7892
7961
|
? props.placeholder[0]
|
|
7893
7962
|
: props.placeholder,
|
|
@@ -7917,13 +7986,8 @@ const CDateRangePicker = defineComponent({
|
|
|
7917
7986
|
onClick: () => {
|
|
7918
7987
|
selectEndDate.value = true;
|
|
7919
7988
|
},
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
if (date instanceof Date && date.getTime()) {
|
|
7923
|
-
calendarDate.value = date;
|
|
7924
|
-
endDate.value = date;
|
|
7925
|
-
}
|
|
7926
|
-
},
|
|
7989
|
+
onChange: (event) => handleOnChange(event.target.value, 'end'),
|
|
7990
|
+
onInput: (event) => useDebouncedCallback(() => handleOnChange(event.target.value, 'end'), props.inputOnChangeDelay),
|
|
7927
7991
|
placeholder: props.placeholder[1],
|
|
7928
7992
|
readonly: props.inputReadOnly || typeof props.format === 'string',
|
|
7929
7993
|
required: props.required,
|
|
@@ -8049,8 +8113,8 @@ const CDateRangePicker = defineComponent({
|
|
|
8049
8113
|
...(endDate.value && { endDate: endDate.value }),
|
|
8050
8114
|
firstDayOfWeek: props.firstDayOfWeek,
|
|
8051
8115
|
locale: props.locale,
|
|
8052
|
-
maxDate: maxDate.value,
|
|
8053
|
-
minDate: minDate.value,
|
|
8116
|
+
...(maxDate.value && { maxDate: maxDate.value }),
|
|
8117
|
+
...(minDate.value && { minDate: minDate.value }),
|
|
8054
8118
|
navYearFirst: props.navYearFirst,
|
|
8055
8119
|
navigation: props.navigation,
|
|
8056
8120
|
range: props.range,
|
|
@@ -8440,24 +8504,6 @@ const CDatePickerPlugin = {
|
|
|
8440
8504
|
},
|
|
8441
8505
|
};
|
|
8442
8506
|
|
|
8443
|
-
const usePopper = () => {
|
|
8444
|
-
const _popper = ref();
|
|
8445
|
-
const initPopper = (reference, popper, options) => {
|
|
8446
|
-
_popper.value = createPopper(reference, popper, options);
|
|
8447
|
-
};
|
|
8448
|
-
const destroyPopper = () => {
|
|
8449
|
-
if (_popper.value) {
|
|
8450
|
-
_popper.value.destroy();
|
|
8451
|
-
}
|
|
8452
|
-
_popper.value = undefined;
|
|
8453
|
-
};
|
|
8454
|
-
return {
|
|
8455
|
-
popper: _popper.value,
|
|
8456
|
-
initPopper,
|
|
8457
|
-
destroyPopper,
|
|
8458
|
-
};
|
|
8459
|
-
};
|
|
8460
|
-
|
|
8461
8507
|
const getPlacement = (placement, direction, alignment, isRTL) => {
|
|
8462
8508
|
let _placement = placement;
|
|
8463
8509
|
if (direction === 'dropup') {
|
|
@@ -16614,5 +16660,5 @@ const CoreuiVue = {
|
|
|
16614
16660
|
},
|
|
16615
16661
|
};
|
|
16616
16662
|
|
|
16617
|
-
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionHeader, CAccordionItem, CAccordionPlugin, CAlert, CAlertHeading, CAlertLink, CAlertPlugin, CAvatar, CAvatarPlugin, CBackdrop, CBackdropPlugin, CBadge, CBadgePlugin, CBreadcrumb, CBreadcrumbItem, CBreadcrumbPlugin, CButton, CButtonGroup, CButtonGroupPlugin, CButtonPlugin, CButtonToolbar, CCLinkPlugin, CCalendar, CCalendarPlugin, CCallout, CCalloutPlugin, CCard, CCardBody, CCardFooter, CCardGroup, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardPlugin, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCarouselPlugin, CCloseButton, CCloseButtonPlugin, CCol, CCollapse, CCollapsePlugin, CContainer, CDatePicker, CDatePickerPlugin, CDateRangePicker, CDateRangePickerPlugin, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownMenu, CDropdownPlugin, CDropdownToggle, CElementCover, CElementCoverPlugin, CFooter, CFooterPlugin, CForm, CFormCheck, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormPlugin, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CGridPlugin, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderPlugin, CHeaderText, CHeaderToggler, CImage, CImagePlugin, CInputGroup, CInputGroupText, CLink, CListGroup, CListGroupItem, CListGroupPlugin, CLoadingButton, CLoadingButtonPlugin, CModal, CModalBody, CModalFooter, CModalHeader, CModalPlugin, CModalTitle, CMultiSelect, CMultiSelectPlugin, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavPlugin, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarPlugin, CNavbarText, CNavbarToggler, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasPlugin, COffcanvasTitle, CPagination, CPaginationItem, CPaginationPlugin, CPicker, CPickerPlugin, CPlaceholder, CPlaceholderPlugin, CPopover, CPopoverPlugin, CProgress, CProgressBar, CProgressPlugin, CRow, CSidebar, CSidebarBrand, CSidebarFooter, CSidebarHeader, CSidebarNav, CSidebarPlugin, CSidebarToggler, CSmartPagination, CSmartPaginationPlugin, CSmartTable, CSmartTablePlugin, CSpinner, CSpinnerPlugin, CTabContent, CTabPane, CTable, CTableBody, CTableCaption, CTableDataCell, CTableFoot, CTableHead, CTableHeaderCell, CTablePlugin, CTableRow, CTabsPlugin, CTimePicker, CTimePickerPlugin, CToast, CToastBody, CToastClose, CToastHeader, CToastPlugin, CToaster, CTooltip, CTooltipPlugin, CVirtualScroller, CVirtualScrollerPlugin, CWidgetStatsA, CWidgetStatsB, CWidgetStatsC, CWidgetStatsD, CWidgetStatsE, CWidgetStatsF, CWidgetsStatsPlugin, CoreuiVue as default, usePopper, vCPlaceholder as vcplaceholder, vCPopover as vcpopover, vCTooltip as vctooltip };
|
|
16663
|
+
export { CAccordion, CAccordionBody, CAccordionButton, CAccordionHeader, CAccordionItem, CAccordionPlugin, CAlert, CAlertHeading, CAlertLink, CAlertPlugin, CAvatar, CAvatarPlugin, CBackdrop, CBackdropPlugin, CBadge, CBadgePlugin, CBreadcrumb, CBreadcrumbItem, CBreadcrumbPlugin, CButton, CButtonGroup, CButtonGroupPlugin, CButtonPlugin, CButtonToolbar, CCLinkPlugin, CCalendar, CCalendarPlugin, CCallout, CCalloutPlugin, CCard, CCardBody, CCardFooter, CCardGroup, CCardHeader, CCardImage, CCardImageOverlay, CCardLink, CCardPlugin, CCardSubtitle, CCardText, CCardTitle, CCarousel, CCarouselCaption, CCarouselItem, CCarouselPlugin, CCloseButton, CCloseButtonPlugin, CCol, CCollapse, CCollapsePlugin, CContainer, CDatePicker, CDatePickerPlugin, CDateRangePicker, CDateRangePickerPlugin, CDropdown, CDropdownDivider, CDropdownHeader, CDropdownItem, CDropdownMenu, CDropdownPlugin, CDropdownToggle, CElementCover, CElementCoverPlugin, CFooter, CFooterPlugin, CForm, CFormCheck, CFormFeedback, CFormFloating, CFormInput, CFormLabel, CFormPlugin, CFormRange, CFormSelect, CFormSwitch, CFormText, CFormTextarea, CGridPlugin, CHeader, CHeaderBrand, CHeaderDivider, CHeaderNav, CHeaderPlugin, CHeaderText, CHeaderToggler, CImage, CImagePlugin, CInputGroup, CInputGroupText, CLink, CListGroup, CListGroupItem, CListGroupPlugin, CLoadingButton, CLoadingButtonPlugin, CModal, CModalBody, CModalFooter, CModalHeader, CModalPlugin, CModalTitle, CMultiSelect, CMultiSelectPlugin, CNav, CNavGroup, CNavGroupItems, CNavItem, CNavLink, CNavPlugin, CNavTitle, CNavbar, CNavbarBrand, CNavbarNav, CNavbarPlugin, CNavbarText, CNavbarToggler, COffcanvas, COffcanvasBody, COffcanvasHeader, COffcanvasPlugin, COffcanvasTitle, CPagination, CPaginationItem, CPaginationPlugin, CPicker, CPickerPlugin, CPlaceholder, CPlaceholderPlugin, CPopover, CPopoverPlugin, CProgress, CProgressBar, CProgressPlugin, CRow, CSidebar, CSidebarBrand, CSidebarFooter, CSidebarHeader, CSidebarNav, CSidebarPlugin, CSidebarToggler, CSmartPagination, CSmartPaginationPlugin, CSmartTable, CSmartTablePlugin, CSpinner, CSpinnerPlugin, CTabContent, CTabPane, CTable, CTableBody, CTableCaption, CTableDataCell, CTableFoot, CTableHead, CTableHeaderCell, CTablePlugin, CTableRow, CTabsPlugin, CTimePicker, CTimePickerPlugin, CToast, CToastBody, CToastClose, CToastHeader, CToastPlugin, CToaster, CTooltip, CTooltipPlugin, CVirtualScroller, CVirtualScrollerPlugin, CWidgetStatsA, CWidgetStatsB, CWidgetStatsC, CWidgetStatsD, CWidgetStatsE, CWidgetStatsF, CWidgetsStatsPlugin, CoreuiVue as default, useDebouncedCallback, useIsVisible, usePopper, vCPlaceholder as vcplaceholder, vCPopover as vcpopover, vCTooltip as vctooltip };
|
|
16618
16664
|
//# sourceMappingURL=index.es.js.map
|