@coreui/vue-pro 5.9.0 → 5.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/README.md +1 -1
- package/dist/cjs/components/accordion/CAccordionBody.js +2 -1
- package/dist/cjs/components/accordion/CAccordionBody.js.map +1 -1
- package/dist/cjs/components/accordion/CAccordionButton.js +3 -1
- package/dist/cjs/components/accordion/CAccordionButton.js.map +1 -1
- package/dist/cjs/components/accordion/CAccordionItem.d.ts +8 -0
- package/dist/cjs/components/accordion/CAccordionItem.js +10 -2
- package/dist/cjs/components/accordion/CAccordionItem.js.map +1 -1
- package/dist/cjs/components/button/CButton.js +1 -1
- package/dist/cjs/components/button/CButton.js.map +1 -1
- package/dist/cjs/components/calendar/CCalendar.d.ts +6 -6
- package/dist/cjs/components/calendar/CCalendar.js +44 -39
- package/dist/cjs/components/calendar/CCalendar.js.map +1 -1
- package/dist/cjs/components/calendar/types.d.ts +3 -0
- package/dist/cjs/components/calendar/utils.d.ts +183 -18
- package/dist/cjs/components/calendar/utils.js +327 -43
- package/dist/cjs/components/calendar/utils.js.map +1 -1
- package/dist/cjs/components/date-picker/CDatePicker.d.ts +1 -1
- package/dist/cjs/components/date-range-picker/CDateRangePicker.d.ts +1 -1
- package/dist/cjs/components/form/CFormControlWrapper.d.ts +2 -0
- package/dist/cjs/components/form/CFormControlWrapper.js +9 -1
- package/dist/cjs/components/form/CFormControlWrapper.js.map +1 -1
- package/dist/cjs/components/index.d.ts +2 -0
- package/dist/cjs/components/index.js +44 -36
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/link/CLink.js.map +1 -1
- package/dist/cjs/components/loading-button/CLoadingButton.d.ts +2 -2
- package/dist/cjs/components/multi-select/CMultiSelect.d.ts +12 -0
- package/dist/cjs/components/multi-select/CMultiSelect.js +28 -2
- package/dist/cjs/components/multi-select/CMultiSelect.js.map +1 -1
- package/dist/cjs/components/nav/CNav.d.ts +2 -2
- package/dist/cjs/components/nav/CNav.js +3 -2
- package/dist/cjs/components/nav/CNav.js.map +1 -1
- package/dist/cjs/components/nav/CNavGroup.js +6 -2
- package/dist/cjs/components/nav/CNavGroup.js.map +1 -1
- package/dist/cjs/components/offcanvas/COffcanvas.js.map +1 -1
- package/dist/cjs/components/password-input/CPasswordInput.d.ts +190 -0
- package/dist/cjs/components/password-input/CPasswordInput.js +178 -0
- package/dist/cjs/components/password-input/CPasswordInput.js.map +1 -0
- package/dist/cjs/components/password-input/index.d.ts +6 -0
- package/dist/cjs/components/password-input/index.js +13 -0
- package/dist/cjs/components/password-input/index.js.map +1 -0
- package/dist/cjs/components/popover/CPopover.d.ts +1 -1
- package/dist/cjs/components/range-slider/CRangeSlider.js +6 -2
- package/dist/cjs/components/range-slider/CRangeSlider.js.map +1 -1
- package/dist/cjs/components/rating/CRating.d.ts +1 -1
- package/dist/cjs/components/smart-table/CSmartTable.js +2 -2
- package/dist/cjs/components/smart-table/CSmartTable.js.map +1 -1
- package/dist/cjs/components/smart-table/utils.js.map +1 -1
- package/dist/cjs/components/stepper/CStepper.d.ts +168 -0
- package/dist/cjs/components/stepper/CStepper.js +305 -0
- package/dist/cjs/components/stepper/CStepper.js.map +1 -0
- package/dist/cjs/components/stepper/index.d.ts +6 -0
- package/dist/cjs/components/stepper/index.js +13 -0
- package/dist/cjs/components/stepper/index.js.map +1 -0
- package/dist/cjs/components/stepper/types.d.ts +15 -0
- package/dist/cjs/components/tabs/CTab.js.map +1 -1
- package/dist/cjs/components/tabs/CTabList.d.ts +2 -2
- package/dist/cjs/components/tabs/CTabList.js +3 -2
- package/dist/cjs/components/tabs/CTabList.js.map +1 -1
- package/dist/cjs/components/time-picker/utils.d.ts +10 -0
- package/dist/cjs/components/time-picker/utils.js +25 -9
- package/dist/cjs/components/time-picker/utils.js.map +1 -1
- package/dist/cjs/components/tooltip/CTooltip.d.ts +1 -1
- package/dist/cjs/components/widgets/CWidgetStatsB.js +2 -2
- package/dist/cjs/components/widgets/CWidgetStatsB.js.map +1 -1
- package/dist/cjs/components/widgets/CWidgetStatsC.js +2 -2
- package/dist/cjs/components/widgets/CWidgetStatsC.js.map +1 -1
- package/dist/cjs/index.js +50 -42
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/node_modules/vue-types/dist/index.js +567 -0
- package/dist/cjs/node_modules/vue-types/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/vue-types/dist/shared/vue-types.8139b772.js +29 -0
- package/dist/cjs/node_modules/vue-types/dist/shared/vue-types.8139b772.js.map +1 -0
- package/dist/cjs/utils/getNextActiveElement.js.map +1 -1
- package/dist/cjs/utils/index.d.ts +2 -1
- package/dist/cjs/utils/isEqual.d.ts +2 -0
- package/dist/cjs/utils/isEqual.js +78 -0
- package/dist/cjs/utils/isEqual.js.map +1 -0
- package/dist/esm/components/accordion/CAccordionBody.js +2 -1
- package/dist/esm/components/accordion/CAccordionBody.js.map +1 -1
- package/dist/esm/components/accordion/CAccordionButton.js +3 -1
- package/dist/esm/components/accordion/CAccordionButton.js.map +1 -1
- package/dist/esm/components/accordion/CAccordionItem.d.ts +8 -0
- package/dist/esm/components/accordion/CAccordionItem.js +11 -3
- package/dist/esm/components/accordion/CAccordionItem.js.map +1 -1
- package/dist/esm/components/avatar/CAvatar.js +1 -1
- package/dist/esm/components/badge/CBadge.js +1 -1
- package/dist/esm/components/button/CButton.js +2 -2
- package/dist/esm/components/button/CButton.js.map +1 -1
- package/dist/esm/components/calendar/CCalendar.d.ts +6 -6
- package/dist/esm/components/calendar/CCalendar.js +46 -41
- package/dist/esm/components/calendar/CCalendar.js.map +1 -1
- package/dist/esm/components/calendar/types.d.ts +3 -0
- package/dist/esm/components/calendar/utils.d.ts +183 -18
- package/dist/esm/components/calendar/utils.js +320 -44
- package/dist/esm/components/calendar/utils.js.map +1 -1
- package/dist/esm/components/card/CCard.js +1 -1
- package/dist/esm/components/date-picker/CDatePicker.d.ts +1 -1
- package/dist/esm/components/date-range-picker/CDateRangePicker.d.ts +1 -1
- package/dist/esm/components/dropdown/CDropdownToggle.js +2 -2
- package/dist/esm/components/form/CFormControlWrapper.d.ts +2 -0
- package/dist/esm/components/form/CFormControlWrapper.js +9 -1
- package/dist/esm/components/form/CFormControlWrapper.js.map +1 -1
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.js +4 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/components/link/CLink.js.map +1 -1
- package/dist/esm/components/loading-button/CLoadingButton.d.ts +2 -2
- package/dist/esm/components/multi-select/CMultiSelect.d.ts +12 -0
- package/dist/esm/components/multi-select/CMultiSelect.js +29 -3
- package/dist/esm/components/multi-select/CMultiSelect.js.map +1 -1
- package/dist/esm/components/nav/CNav.d.ts +2 -2
- package/dist/esm/components/nav/CNav.js +3 -2
- package/dist/esm/components/nav/CNav.js.map +1 -1
- package/dist/esm/components/nav/CNavGroup.js +6 -2
- package/dist/esm/components/nav/CNavGroup.js.map +1 -1
- package/dist/esm/components/offcanvas/COffcanvas.js.map +1 -1
- package/dist/esm/components/password-input/CPasswordInput.d.ts +190 -0
- package/dist/esm/components/password-input/CPasswordInput.js +176 -0
- package/dist/esm/components/password-input/CPasswordInput.js.map +1 -0
- package/dist/esm/components/password-input/index.d.ts +6 -0
- package/dist/esm/components/password-input/index.js +10 -0
- package/dist/esm/components/password-input/index.js.map +1 -0
- package/dist/esm/components/popover/CPopover.d.ts +1 -1
- package/dist/esm/components/range-slider/CRangeSlider.js +6 -2
- package/dist/esm/components/range-slider/CRangeSlider.js.map +1 -1
- package/dist/esm/components/rating/CRating.d.ts +1 -1
- package/dist/esm/components/smart-table/CSmartTable.js +2 -2
- package/dist/esm/components/smart-table/CSmartTable.js.map +1 -1
- package/dist/esm/components/smart-table/CSmartTableBody.js +1 -1
- package/dist/esm/components/smart-table/utils.js.map +1 -1
- package/dist/esm/components/stepper/CStepper.d.ts +168 -0
- package/dist/esm/components/stepper/CStepper.js +303 -0
- package/dist/esm/components/stepper/CStepper.js.map +1 -0
- package/dist/esm/components/stepper/index.d.ts +6 -0
- package/dist/esm/components/stepper/index.js +10 -0
- package/dist/esm/components/stepper/index.js.map +1 -0
- package/dist/esm/components/stepper/types.d.ts +15 -0
- package/dist/esm/components/tabs/CTab.js.map +1 -1
- package/dist/esm/components/tabs/CTabList.d.ts +2 -2
- package/dist/esm/components/tabs/CTabList.js +3 -2
- package/dist/esm/components/tabs/CTabList.js.map +1 -1
- package/dist/esm/components/time-picker/utils.d.ts +10 -0
- package/dist/esm/components/time-picker/utils.js +25 -10
- package/dist/esm/components/time-picker/utils.js.map +1 -1
- package/dist/esm/components/tooltip/CTooltip.d.ts +1 -1
- package/dist/esm/components/widgets/CWidgetStatsB.js +2 -2
- package/dist/esm/components/widgets/CWidgetStatsB.js.map +1 -1
- package/dist/esm/components/widgets/CWidgetStatsC.js +2 -2
- package/dist/esm/components/widgets/CWidgetStatsC.js.map +1 -1
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/node_modules/vue-types/dist/index.js +541 -0
- package/dist/esm/node_modules/vue-types/dist/index.js.map +1 -0
- package/dist/esm/node_modules/vue-types/dist/shared/vue-types.8139b772.js +25 -0
- package/dist/esm/node_modules/vue-types/dist/shared/vue-types.8139b772.js.map +1 -0
- package/dist/esm/utils/getNextActiveElement.js.map +1 -1
- package/dist/esm/utils/index.d.ts +2 -1
- package/dist/esm/utils/isEqual.d.ts +2 -0
- package/dist/esm/utils/isEqual.js +74 -0
- package/dist/esm/utils/isEqual.js.map +1 -0
- package/package.json +10 -10
- package/src/components/accordion/CAccordionBody.ts +2 -1
- package/src/components/accordion/CAccordionButton.ts +3 -1
- package/src/components/accordion/CAccordionItem.ts +11 -3
- package/src/components/button/CButton.ts +1 -1
- package/src/components/calendar/CCalendar.ts +108 -95
- package/src/components/calendar/types.ts +5 -0
- package/src/components/calendar/utils.ts +439 -111
- package/src/components/date-picker/CDatePicker.ts +1 -1
- package/src/components/date-range-picker/CDateRangePicker.ts +1 -1
- package/src/components/form/CFormControlWrapper.ts +35 -21
- package/src/components/index.ts +2 -0
- package/src/components/multi-select/CMultiSelect.ts +57 -26
- package/src/components/nav/CNav.ts +3 -2
- package/src/components/nav/CNavGroup.ts +7 -2
- package/src/components/password-input/CPasswordInput.ts +214 -0
- package/src/components/password-input/index.ts +10 -0
- package/src/components/range-slider/CRangeSlider.ts +7 -2
- package/src/components/stepper/CStepper.ts +384 -0
- package/src/components/stepper/__tests__/CStepper.spec.ts +175 -0
- package/src/components/stepper/index.ts +10 -0
- package/src/components/stepper/types.ts +18 -0
- package/src/components/tabs/CTabList.ts +3 -2
- package/src/components/time-picker/CTimePicker.ts +22 -22
- package/src/components/time-picker/CTimePickerRollCol.ts +3 -3
- package/src/components/time-picker/utils.ts +30 -13
- package/src/utils/index.ts +10 -1
- package/src/utils/isEqual.ts +75 -0
- package/dist/cjs/node_modules/is-plain-object/dist/is-plain-object.js +0 -37
- package/dist/cjs/node_modules/is-plain-object/dist/is-plain-object.js.map +0 -1
- package/dist/cjs/node_modules/vue-types/dist/vue-types.modern.js +0 -33
- package/dist/cjs/node_modules/vue-types/dist/vue-types.modern.js.map +0 -1
- package/dist/esm/node_modules/is-plain-object/dist/is-plain-object.js +0 -35
- package/dist/esm/node_modules/is-plain-object/dist/is-plain-object.js.map +0 -1
- package/dist/esm/node_modules/vue-types/dist/vue-types.modern.js +0 -6
- package/dist/esm/node_modules/vue-types/dist/vue-types.modern.js.map +0 -1
|
@@ -1,17 +1,83 @@
|
|
|
1
|
-
import type { DisabledDate } from './
|
|
1
|
+
import type { DisabledDate, SelectionTypes, ViewTypes } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Converts an ISO week string to a Date object representing the Monday of that week.
|
|
4
|
+
* @param isoWeek - The ISO week string (e.g., "2023W05" or "2023w05").
|
|
5
|
+
* @returns The Date object for the Monday of the specified week, or null if invalid.
|
|
6
|
+
*/
|
|
2
7
|
export declare const convertIsoWeekToDate: (isoWeek: string) => Date;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Converts a date string or Date object to a Date object based on selection type.
|
|
10
|
+
* @param date - The date to convert.
|
|
11
|
+
* @param selectionType - The type of selection ('day', 'week', 'month', 'year').
|
|
12
|
+
* @returns The corresponding Date object or null if invalid.
|
|
13
|
+
*/
|
|
14
|
+
export declare const convertToDateObject: (date: Date | string, selectionType?: SelectionTypes) => Date;
|
|
15
|
+
/**
|
|
16
|
+
* Creates groups from an array.
|
|
17
|
+
* @param arr - The array to group.
|
|
18
|
+
* @param numberOfGroups - Number of groups to create.
|
|
19
|
+
* @returns An array of grouped arrays.
|
|
20
|
+
*/
|
|
6
21
|
export declare const createGroupsInArray: <T>(arr: T[], numberOfGroups: number) => T[][];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Adjusts the calendar date based on order and view type.
|
|
24
|
+
* @param calendarDate - The current calendar date.
|
|
25
|
+
* @param order - The order to adjust by.
|
|
26
|
+
* @param view - The current view type.
|
|
27
|
+
* @returns The adjusted Date object.
|
|
28
|
+
*/
|
|
29
|
+
export declare const getCalendarDate: (calendarDate: Date, order: number, view: ViewTypes) => Date;
|
|
30
|
+
/**
|
|
31
|
+
* Formats a date based on the selection type.
|
|
32
|
+
* @param date - The date to format.
|
|
33
|
+
* @param selectionType - The type of selection ('day', 'week', 'month', 'year').
|
|
34
|
+
* @returns A formatted date string or the original Date object.
|
|
35
|
+
*/
|
|
36
|
+
export declare const getDateBySelectionType: (date: Date | null, selectionType: SelectionTypes) => string | Date | null;
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves the first available date within a range that is not disabled.
|
|
39
|
+
* @param startDate - Start date of the range.
|
|
40
|
+
* @param endDate - End date of the range.
|
|
41
|
+
* @param min - Minimum allowed date.
|
|
42
|
+
* @param max - Maximum allowed date.
|
|
43
|
+
* @param disabledDates - Criteria for disabled dates.
|
|
44
|
+
* @returns The first available Date object or null if none found.
|
|
45
|
+
*/
|
|
46
|
+
export declare const getFirstAvailableDateInRange: (startDate: Date, endDate: Date, min?: Date | null, max?: Date | null, disabledDates?: DisabledDate | DisabledDate[]) => Date | null;
|
|
47
|
+
/**
|
|
48
|
+
* Retrieves an array of month names based on locale and format.
|
|
49
|
+
* @param locale - The locale string (e.g., 'en-US').
|
|
50
|
+
* @param format - The format of the month names ('short' or 'long').
|
|
51
|
+
* @returns An array of month names.
|
|
52
|
+
*/
|
|
53
|
+
export declare const getMonthsNames: (locale: string, format?: "short" | "long") => string[];
|
|
54
|
+
/**
|
|
55
|
+
* Retrieves an array of selectable dates from the given element.
|
|
56
|
+
* @param element - The HTML element to search for selectable dates.
|
|
57
|
+
* @param selector - The CSS selector used to identify selectable dates. Defaults to 'tr[tabindex="0"], td[tabindex="0"]'.
|
|
58
|
+
* @returns An array of HTMLElements representing the selectable dates.
|
|
59
|
+
*/
|
|
60
|
+
export declare const getSelectableDates: (element: HTMLElement, selector?: string) => HTMLElement[];
|
|
61
|
+
/**
|
|
62
|
+
* Generates an array of years centered around a given year.
|
|
63
|
+
* @param year - The central year.
|
|
64
|
+
* @param range - The number of years before and after the central year.
|
|
65
|
+
* @returns An array of years.
|
|
66
|
+
*/
|
|
67
|
+
export declare const getYears: (year: number, range?: number) => number[];
|
|
68
|
+
/**
|
|
69
|
+
* Calculates the ISO week number for a given date.
|
|
70
|
+
* @param date - The date to calculate the week number for.
|
|
71
|
+
* @returns The ISO week number.
|
|
72
|
+
*/
|
|
14
73
|
export declare const getWeekNumber: (date: Date) => number;
|
|
74
|
+
/**
|
|
75
|
+
* Retrieves detailed information about each week in a month for calendar rendering.
|
|
76
|
+
* @param year - The year.
|
|
77
|
+
* @param month - The month (0-11).
|
|
78
|
+
* @param firstDayOfWeek - The first day of the week (0-6, where 0 is Sunday).
|
|
79
|
+
* @returns An array of week objects containing week numbers and day details.
|
|
80
|
+
*/
|
|
15
81
|
export declare const getMonthDetails: (year: number, month: number, firstDayOfWeek: number) => {
|
|
16
82
|
weekNumber?: number;
|
|
17
83
|
days: {
|
|
@@ -19,14 +85,113 @@ export declare const getMonthDetails: (year: number, month: number, firstDayOfWe
|
|
|
19
85
|
month: string;
|
|
20
86
|
}[];
|
|
21
87
|
}[];
|
|
22
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Checks if a date is disabled based on the 'date' period type.
|
|
90
|
+
* @param date - The date to check.
|
|
91
|
+
* @param min - Minimum allowed date.
|
|
92
|
+
* @param max - Maximum allowed date.
|
|
93
|
+
* @param disabledDates - Criteria for disabled dates.
|
|
94
|
+
* @returns True if the date is disabled, false otherwise.
|
|
95
|
+
*/
|
|
23
96
|
export declare const isDateDisabled: (date: Date, min?: Date | null, max?: Date | null, disabledDates?: DisabledDate | DisabledDate[]) => boolean;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Checks if a date is within a specified range.
|
|
99
|
+
* @param date - The date to check.
|
|
100
|
+
* @param start - Start date of the range.
|
|
101
|
+
* @param end - End date of the range.
|
|
102
|
+
* @returns True if the date is within the range, false otherwise.
|
|
103
|
+
*/
|
|
104
|
+
export declare const isDateInRange: (date: Date, start: Date | null, end: Date | null) => boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Checks if a date is selected based on start and end dates.
|
|
107
|
+
* @param date - The date to check.
|
|
108
|
+
* @param start - Start date.
|
|
109
|
+
* @param end - End date.
|
|
110
|
+
* @returns True if the date is selected, false otherwise.
|
|
111
|
+
*/
|
|
112
|
+
export declare const isDateSelected: (date: Date, start: Date | null, end: Date | null) => boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Determines if any date within a range is disabled.
|
|
115
|
+
* @param startDate - Start date of the range.
|
|
116
|
+
* @param endDate - End date of the range.
|
|
117
|
+
* @param disabledDates - Criteria for disabled dates.
|
|
118
|
+
* @returns True if any date in the range is disabled, false otherwise.
|
|
119
|
+
*/
|
|
120
|
+
export declare const isDisableDateInRange: (startDate?: Date | null, endDate?: Date | null, disabledDates?: DisabledDate | DisabledDate[]) => boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Checks if a month is disabled based on the 'month' period type.
|
|
123
|
+
* @param date - The date representing the month to check.
|
|
124
|
+
* @param min - Minimum allowed date.
|
|
125
|
+
* @param max - Maximum allowed date.
|
|
126
|
+
* @param disabledDates - Criteria for disabled dates.
|
|
127
|
+
* @returns True if the month is disabled, false otherwise.
|
|
128
|
+
*/
|
|
129
|
+
export declare const isMonthDisabled: (date: Date, min?: Date | null, max?: Date | null, disabledDates?: DisabledDate | DisabledDate[]) => boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Checks if a month is selected based on start and end dates.
|
|
132
|
+
* @param date - The date representing the month.
|
|
133
|
+
* @param start - Start date.
|
|
134
|
+
* @param end - End date.
|
|
135
|
+
* @returns True if the month is selected, false otherwise.
|
|
136
|
+
*/
|
|
137
|
+
export declare const isMonthSelected: (date: Date, start: Date | null, end: Date | null) => boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Checks if a month is within a specified range.
|
|
140
|
+
* @param date - The date representing the month.
|
|
141
|
+
* @param start - Start date.
|
|
142
|
+
* @param end - End date.
|
|
143
|
+
* @returns True if the month is within the range, false otherwise.
|
|
144
|
+
*/
|
|
145
|
+
export declare const isMonthInRange: (date: Date, start: Date | null, end: Date | null) => boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Checks if two dates are the same calendar date.
|
|
148
|
+
* @param date - First date.
|
|
149
|
+
* @param date2 - Second date.
|
|
150
|
+
* @returns True if both dates are the same, false otherwise.
|
|
151
|
+
*/
|
|
28
152
|
export declare const isSameDateAs: (date: Date | null, date2: Date | null) => boolean;
|
|
29
|
-
|
|
153
|
+
/**
|
|
154
|
+
* Checks if a date is today.
|
|
155
|
+
* @param date - The date to check.
|
|
156
|
+
* @returns True if the date is today, false otherwise.
|
|
157
|
+
*/
|
|
30
158
|
export declare const isToday: (date: Date) => boolean;
|
|
31
|
-
|
|
159
|
+
/**
|
|
160
|
+
* Checks if a year is disabled based on the 'year' period type.
|
|
161
|
+
* @param date - The date representing the year to check.
|
|
162
|
+
* @param min - Minimum allowed date.
|
|
163
|
+
* @param max - Maximum allowed date.
|
|
164
|
+
* @param disabledDates - Criteria for disabled dates.
|
|
165
|
+
* @returns True if the year is disabled, false otherwise.
|
|
166
|
+
*/
|
|
167
|
+
export declare const isYearDisabled: (date: Date, min?: Date | null, max?: Date | null, disabledDates?: DisabledDate | DisabledDate[]) => boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Checks if a year is selected based on start and end dates.
|
|
170
|
+
* @param date - The date representing the year.
|
|
171
|
+
* @param start - Start date.
|
|
172
|
+
* @param end - End date.
|
|
173
|
+
* @returns True if the year matches the start's or end's year, false otherwise.
|
|
174
|
+
*/
|
|
175
|
+
export declare const isYearSelected: (date: Date, start: Date | null, end: Date | null) => boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Checks if a year is within a specified range.
|
|
178
|
+
* @param date - The date representing the year.
|
|
179
|
+
* @param start - Start date.
|
|
180
|
+
* @param end - End date.
|
|
181
|
+
* @returns True if the year's value lies between start's year and end's year, false otherwise.
|
|
182
|
+
*/
|
|
183
|
+
export declare const isYearInRange: (date: Date, start: Date | null, end: Date | null) => boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Removes the time component from a Date object.
|
|
186
|
+
* @param date - The original date.
|
|
187
|
+
* @returns A new Date object with the time set to 00:00:00.
|
|
188
|
+
*/
|
|
32
189
|
export declare const removeTimeFromDate: (date: Date) => Date;
|
|
190
|
+
/**
|
|
191
|
+
* Copies the time (hours, minutes, seconds, milliseconds) from one Date to another.
|
|
192
|
+
*
|
|
193
|
+
* @param {Date} target - The date whose time will be updated.
|
|
194
|
+
* @param {Date | null} source - The date to copy the time from.
|
|
195
|
+
* @returns {Date} A new Date instance with the date from `target` and time from `source`.
|
|
196
|
+
*/
|
|
197
|
+
export declare const setTimeFromDate: (target: Date, source: Date | null) => Date;
|