@coreui/react-pro 4.12.0-alpha.0 → 4.12.0-beta.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/components/accordion/index.d.ts +1 -1
- package/dist/components/calendar/CCalendar.d.ts +4 -4
- package/dist/components/date-range-picker/CDateRangePicker.d.ts +1 -1
- package/dist/components/multi-select/CMultiSelect.d.ts +2 -2
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/useColorModes.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +133 -274
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +135 -273
- package/dist/index.js.map +1 -1
- package/dist/props.d.ts +1 -1
- package/package.json +12 -12
- package/src/components/accordion/index.ts +1 -7
- package/src/components/calendar/CCalendar.tsx +49 -64
- package/src/components/calendar/utils.ts +1 -1
- package/src/components/date-range-picker/CDateRangePicker.tsx +10 -10
- package/src/components/date-range-picker/utils.ts +2 -2
- package/src/components/form/CFormSelect.tsx +3 -1
- package/src/components/modal/CModal.tsx +2 -0
- package/src/components/multi-select/CMultiSelect.tsx +2 -2
- package/src/components/popover/CPopover.tsx +0 -1
- package/src/components/popover/__tests__/__snapshots__/CPopover.spec.tsx.snap +2 -1
- package/src/components/progress/CProgress.tsx +1 -0
- package/src/components/sidebar/CSidebar.tsx +2 -2
- package/src/components/smart-table/CSmartTable.tsx +22 -10
- package/src/components/smart-table/CSmartTableBody.tsx +3 -5
- package/src/components/smart-table/CSmartTableHead.tsx +5 -6
- package/src/components/spinner/CSpinner.tsx +4 -2
- package/src/components/spinner/__tests__/__snapshots__/CSpinner.spec.tsx.snap +2 -2
- package/src/components/table/CTable.tsx +2 -1
- package/src/components/tooltip/CTooltip.tsx +0 -1
- package/src/components/tooltip/__tests__/CTooltip.spec.tsx +1 -1
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useColorModes.ts +55 -0
- package/src/hooks/useForkedRef.ts +1 -1
- package/src/index.ts +1 -0
- package/src/props.ts +4 -1
- package/src/utils/isRTL.ts +1 -1
- package/src/components/smart-table/CSmartTableCleaner.tsx +0 -37
package/dist/index.js
CHANGED
|
@@ -2494,6 +2494,46 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
2494
2494
|
}) : {};
|
|
2495
2495
|
var CSSTransition$1 = CSSTransition;
|
|
2496
2496
|
|
|
2497
|
+
var getStoredTheme = function (localStorageItemName) { return localStorage.getItem(localStorageItemName); };
|
|
2498
|
+
var setStoredTheme = function (localStorageItemName, colorMode) {
|
|
2499
|
+
return localStorage.setItem(localStorageItemName, colorMode);
|
|
2500
|
+
};
|
|
2501
|
+
var getPreferredColorScheme = function (localStorageItemName) {
|
|
2502
|
+
var storedTheme = getStoredTheme(localStorageItemName);
|
|
2503
|
+
if (storedTheme) {
|
|
2504
|
+
return storedTheme;
|
|
2505
|
+
}
|
|
2506
|
+
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
2507
|
+
};
|
|
2508
|
+
var setTheme = function (colorMode) {
|
|
2509
|
+
document.documentElement.dataset.coreuiTheme =
|
|
2510
|
+
colorMode === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
2511
|
+
? 'dark'
|
|
2512
|
+
: colorMode;
|
|
2513
|
+
var event = new Event('ColorSchemeChange');
|
|
2514
|
+
document.documentElement.dispatchEvent(event);
|
|
2515
|
+
};
|
|
2516
|
+
var useColorModes = function (localStorageItemName) {
|
|
2517
|
+
if (localStorageItemName === void 0) { localStorageItemName = 'coreui-react-color-scheme'; }
|
|
2518
|
+
var _a = React$1.useState(getPreferredColorScheme(localStorageItemName)), colorMode = _a[0], setColorMode = _a[1];
|
|
2519
|
+
React$1.useEffect(function () {
|
|
2520
|
+
setStoredTheme(localStorageItemName, colorMode);
|
|
2521
|
+
setTheme(colorMode);
|
|
2522
|
+
}, [colorMode]);
|
|
2523
|
+
React$1.useEffect(function () {
|
|
2524
|
+
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function () {
|
|
2525
|
+
var storedTheme = getStoredTheme(localStorageItemName);
|
|
2526
|
+
if (storedTheme !== 'light' && storedTheme !== 'dark') {
|
|
2527
|
+
setTheme(colorMode);
|
|
2528
|
+
}
|
|
2529
|
+
});
|
|
2530
|
+
}, []);
|
|
2531
|
+
return {
|
|
2532
|
+
getColorMode: function () { return colorMode; },
|
|
2533
|
+
setColorMode: function (mode) { return setColorMode(mode); },
|
|
2534
|
+
};
|
|
2535
|
+
};
|
|
2536
|
+
|
|
2497
2537
|
// code borrowed from https://github.com/reach/reach-ui
|
|
2498
2538
|
// problem described https://github.com/facebook/react/issues/13029
|
|
2499
2539
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2527,7 +2567,7 @@ value) {
|
|
|
2527
2567
|
try {
|
|
2528
2568
|
ref.current = value;
|
|
2529
2569
|
}
|
|
2530
|
-
catch (
|
|
2570
|
+
catch (_a) {
|
|
2531
2571
|
throw new Error("Cannot assign value \"".concat(value, "\" to ref \"").concat(ref, "\""));
|
|
2532
2572
|
}
|
|
2533
2573
|
}
|
|
@@ -2718,7 +2758,10 @@ var textColorsPropType = PropTypes.oneOfType([
|
|
|
2718
2758
|
PropTypes.oneOf(['white', 'muted']),
|
|
2719
2759
|
PropTypes.string,
|
|
2720
2760
|
]);
|
|
2721
|
-
var triggerPropType = PropTypes.
|
|
2761
|
+
var triggerPropType = PropTypes.oneOfType([
|
|
2762
|
+
PropTypes.arrayOf(PropTypes.oneOf(['hover', 'focus', 'click']).isRequired),
|
|
2763
|
+
PropTypes.oneOf(['hover', 'focus', 'click']),
|
|
2764
|
+
]);
|
|
2722
2765
|
|
|
2723
2766
|
var CAlert = React$1.forwardRef(function (_a, ref) {
|
|
2724
2767
|
var children = _a.children, className = _a.className, _b = _a.color, color = _b === void 0 ? 'primary' : _b, dismissible = _a.dismissible, variant = _a.variant, _c = _a.visible, visible = _c === void 0 ? true : _c, onClose = _a.onClose, rest = __rest$1(_a, ["children", "className", "color", "dismissible", "variant", "visible", "onClose"]);
|
|
@@ -3077,7 +3120,7 @@ var isObjectInArray = function (array, item, ignore) {
|
|
|
3077
3120
|
};
|
|
3078
3121
|
|
|
3079
3122
|
var isRTL = function (element) {
|
|
3080
|
-
if (document.documentElement.dir === 'rtl') {
|
|
3123
|
+
if (typeof document !== 'undefined' && document.documentElement.dir === 'rtl') {
|
|
3081
3124
|
return true;
|
|
3082
3125
|
}
|
|
3083
3126
|
if (element) {
|
|
@@ -5448,7 +5491,7 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
5448
5491
|
* //=> "3 o'clock"
|
|
5449
5492
|
*/
|
|
5450
5493
|
|
|
5451
|
-
function format
|
|
5494
|
+
function format(dirtyDate, dirtyFormatStr, options) {
|
|
5452
5495
|
var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
|
|
5453
5496
|
requiredArgs(2, arguments);
|
|
5454
5497
|
var formatStr = String(dirtyFormatStr);
|
|
@@ -6778,7 +6821,7 @@ var isToday = function (date) {
|
|
|
6778
6821
|
};
|
|
6779
6822
|
|
|
6780
6823
|
var Calendar = function (props) {
|
|
6781
|
-
var addMonths = props.addMonths, calendarDate = props.calendarDate, dayFormat = props.dayFormat, disabledDates = props.disabledDates, endDate = props.endDate, firstDayOfWeek = props.firstDayOfWeek, hoverDate = props.hoverDate, locale = props.locale, maxDate = props.maxDate, minDate = props.minDate,
|
|
6824
|
+
var addMonths = props.addMonths, calendarDate = props.calendarDate, dayFormat = props.dayFormat, disabledDates = props.disabledDates, endDate = props.endDate, firstDayOfWeek = props.firstDayOfWeek, hoverDate = props.hoverDate, locale = props.locale, maxDate = props.maxDate, minDate = props.minDate, onDayClick = props.onDayClick, onDayKeyDown = props.onDayKeyDown, onDayMouseEnter = props.onDayMouseEnter, onDayMouseLeave = props.onDayMouseLeave, onMonthClick = props.onMonthClick, onMonthKeyDown = props.onMonthKeyDown, onYearClick = props.onYearClick, onYearKeyDown = props.onYearKeyDown, selectAdjacementDays = props.selectAdjacementDays, selectEndDate = props.selectEndDate, showAdjacementDays = props.showAdjacementDays, startDate = props.startDate, view = props.view, weekdayFormat = props.weekdayFormat;
|
|
6782
6825
|
var _a = React$1.useState(calendarDate), date = _a[0], setDate = _a[1];
|
|
6783
6826
|
var _b = React$1.useState([]), listOfMonths = _b[0], setListOfMonths = _b[1];
|
|
6784
6827
|
React$1.useEffect(function () {
|
|
@@ -6801,9 +6844,9 @@ var Calendar = function (props) {
|
|
|
6801
6844
|
return (React$1.createElement("th", { key: idx, className: "calendar-cell" },
|
|
6802
6845
|
React$1.createElement("div", { className: "calendar-header-cell-inner" }, typeof weekdayFormat === 'function'
|
|
6803
6846
|
? weekdayFormat(date)
|
|
6804
|
-
: typeof weekdayFormat === 'string'
|
|
6847
|
+
: (typeof weekdayFormat === 'string'
|
|
6805
6848
|
? date.toLocaleDateString(locale, { weekday: weekdayFormat })
|
|
6806
|
-
: date.toLocaleDateString(locale, { weekday: 'long' }).slice(0, weekdayFormat))));
|
|
6849
|
+
: date.toLocaleDateString(locale, { weekday: 'long' }).slice(0, weekdayFormat)))));
|
|
6807
6850
|
})))),
|
|
6808
6851
|
React$1.createElement("tbody", null,
|
|
6809
6852
|
view === 'days' &&
|
|
@@ -6830,15 +6873,15 @@ var Calendar = function (props) {
|
|
|
6830
6873
|
!isDateDisabled(date, minDate, maxDate, disabledDates)
|
|
6831
6874
|
? 0
|
|
6832
6875
|
: -1, title: date.toLocaleDateString(locale) }, ((month === 'current' || selectAdjacementDays) && {
|
|
6833
|
-
onBlur: function () { return
|
|
6834
|
-
onClick: function () { return
|
|
6835
|
-
onFocus: function () { return
|
|
6836
|
-
onKeyDown: function (event) { return
|
|
6837
|
-
onMouseEnter: function () { return
|
|
6838
|
-
onMouseLeave: function () { return
|
|
6876
|
+
onBlur: function () { return onDayMouseLeave(); },
|
|
6877
|
+
onClick: function () { return onDayClick(date); },
|
|
6878
|
+
onFocus: function () { return onDayMouseEnter(date); },
|
|
6879
|
+
onKeyDown: function (event) { return onDayKeyDown(event, date); },
|
|
6880
|
+
onMouseEnter: function () { return onDayMouseEnter(date); },
|
|
6881
|
+
onMouseLeave: function () { return onDayMouseLeave(); },
|
|
6839
6882
|
}), (month !== 'current' &&
|
|
6840
6883
|
!selectAdjacementDays && {
|
|
6841
|
-
onMouseEnter: function () { return
|
|
6884
|
+
onMouseEnter: function () { return onDayMouseLeave(); },
|
|
6842
6885
|
})),
|
|
6843
6886
|
React$1.createElement("div", { className: "calendar-cell-inner" }, typeof dayFormat === 'function'
|
|
6844
6887
|
? dayFormat(date)
|
|
@@ -6876,17 +6919,17 @@ var Navigation = function (props) {
|
|
|
6876
6919
|
}, [calendarDate]);
|
|
6877
6920
|
return (React$1.createElement("div", { className: "calendar-nav" },
|
|
6878
6921
|
navigation && (React$1.createElement("div", { className: "calendar-nav-prev" },
|
|
6879
|
-
React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return onNavigationClick('prev', true); } }, navPrevDoubleIcon ?
|
|
6880
|
-
view === 'days' && (React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return onNavigationClick('prev'); } }, navPrevIcon ?
|
|
6922
|
+
React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return onNavigationClick('prev', true); } }, navPrevDoubleIcon !== null && navPrevDoubleIcon !== void 0 ? navPrevDoubleIcon : (React$1.createElement("span", { className: "calendar-nav-icon calendar-nav-icon-double-prev" }))),
|
|
6923
|
+
view === 'days' && (React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return onNavigationClick('prev'); } }, navPrevIcon !== null && navPrevIcon !== void 0 ? navPrevIcon : React$1.createElement("span", { className: "calendar-nav-icon calendar-nav-icon-prev" }))))),
|
|
6881
6924
|
React$1.createElement("div", __assign$1({ className: "calendar-nav-date" }, (navYearFirst && { style: { display: 'flex', justifyContent: 'center' } })),
|
|
6882
6925
|
view === 'days' && (React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return navigation && onMonthClick(); } }, date && date.toLocaleDateString(locale, { month: 'long' }))),
|
|
6883
6926
|
React$1.createElement(CButton, __assign$1({ color: "transparent", size: "sm", onClick: function () { return navigation && onYearClick(); } }, (navYearFirst && { style: { order: '-1' } })), date && date.toLocaleDateString(locale, { year: 'numeric' }))),
|
|
6884
6927
|
navigation && (React$1.createElement("div", { className: "calendar-nav-next" },
|
|
6885
|
-
view === 'days' && (React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return onNavigationClick('next'); } }, navNextIcon ?
|
|
6886
|
-
React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return onNavigationClick('next', true); } }, navNextDoubleIcon ?
|
|
6928
|
+
view === 'days' && (React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return onNavigationClick('next'); } }, navNextIcon !== null && navNextIcon !== void 0 ? navNextIcon : React$1.createElement("span", { className: "calendar-nav-icon calendar-nav-icon-next" }))),
|
|
6929
|
+
React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return onNavigationClick('next', true); } }, navNextDoubleIcon !== null && navNextDoubleIcon !== void 0 ? navNextDoubleIcon : (React$1.createElement("span", { className: "calendar-nav-icon calendar-nav-icon-double-next" })))))));
|
|
6887
6930
|
};
|
|
6888
6931
|
var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
6889
|
-
var startDate = _a.startDate, endDate = _a.endDate, _b = _a.calendarDate, calendarDate = _b === void 0 ? startDate || endDate || null : _b, _c = _a.calendars, calendars = _c === void 0 ? 1 : _c, className = _a.className, _d = _a.dayFormat, dayFormat = _d === void 0 ? 'numeric' : _d, disabledDates = _a.disabledDates, _e = _a.firstDayOfWeek, firstDayOfWeek = _e === void 0 ? 1 : _e, _f = _a.locale, locale = _f === void 0 ? 'default' : _f, maxDate = _a.maxDate, minDate = _a.minDate, _g = _a.navigation, navigation = _g === void 0 ? true : _g, navNextIcon = _a.navNextIcon, navNextDoubleIcon = _a.navNextDoubleIcon, navPrevIcon = _a.navPrevIcon, navPrevDoubleIcon = _a.navPrevDoubleIcon, navYearFirst = _a.navYearFirst, range = _a.range, _h = _a.selectAdjacementDays, selectAdjacementDays = _h === void 0 ? false : _h, selectEndDate = _a.selectEndDate, _j = _a.showAdjacementDays, showAdjacementDays = _j === void 0 ? true : _j, _k = _a.weekdayFormat, weekdayFormat = _k === void 0 ? 2 : _k,
|
|
6932
|
+
var startDate = _a.startDate, endDate = _a.endDate, _b = _a.calendarDate, calendarDate = _b === void 0 ? startDate || endDate || null : _b, _c = _a.calendars, calendars = _c === void 0 ? 1 : _c, className = _a.className, _d = _a.dayFormat, dayFormat = _d === void 0 ? 'numeric' : _d, disabledDates = _a.disabledDates, _e = _a.firstDayOfWeek, firstDayOfWeek = _e === void 0 ? 1 : _e, _f = _a.locale, locale = _f === void 0 ? 'default' : _f, maxDate = _a.maxDate, minDate = _a.minDate, _g = _a.navigation, navigation = _g === void 0 ? true : _g, navNextIcon = _a.navNextIcon, navNextDoubleIcon = _a.navNextDoubleIcon, navPrevIcon = _a.navPrevIcon, navPrevDoubleIcon = _a.navPrevDoubleIcon, navYearFirst = _a.navYearFirst, range = _a.range, _h = _a.selectAdjacementDays, selectAdjacementDays = _h === void 0 ? false : _h, selectEndDate = _a.selectEndDate, _j = _a.showAdjacementDays, showAdjacementDays = _j === void 0 ? true : _j, _k = _a.weekdayFormat, weekdayFormat = _k === void 0 ? 2 : _k, onDayHover = _a.onDayHover, onCalendarDateChange = _a.onCalendarDateChange, onEndDateChange = _a.onEndDateChange, onStartDateChange = _a.onStartDateChange, onSelectEndChange = _a.onSelectEndChange, onViewChanged = _a.onViewChanged;
|
|
6890
6933
|
var isInitialMount = React$1.useRef(true);
|
|
6891
6934
|
var _l = React$1.useState(null), _calendarDate = _l[0], setCalendarDate = _l[1];
|
|
6892
6935
|
React$1.useEffect(function () {
|
|
@@ -6950,7 +6993,7 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
6950
6993
|
setCalendarDate(d);
|
|
6951
6994
|
onCalendarDateChange && onCalendarDateChange(d);
|
|
6952
6995
|
};
|
|
6953
|
-
var
|
|
6996
|
+
var handleDayClick = function (date, index) {
|
|
6954
6997
|
if (isDateDisabled(date, _minDate, _maxDate, disabledDates)) {
|
|
6955
6998
|
return;
|
|
6956
6999
|
}
|
|
@@ -6988,23 +7031,22 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
6988
7031
|
}
|
|
6989
7032
|
setStartDate(date);
|
|
6990
7033
|
};
|
|
6991
|
-
var
|
|
7034
|
+
var handleDayKeyDown = function (event, date, index) {
|
|
7035
|
+
if (event.code === 'Space' || event.key === 'Enter') {
|
|
7036
|
+
event.preventDefault();
|
|
7037
|
+
handleDayClick(date, index);
|
|
7038
|
+
}
|
|
7039
|
+
};
|
|
7040
|
+
var handleDayMouseEnter = function (date) {
|
|
6992
7041
|
if (isDateDisabled(date, _minDate, _maxDate, disabledDates)) {
|
|
6993
7042
|
return;
|
|
6994
7043
|
}
|
|
6995
7044
|
setHoverDate(date);
|
|
6996
|
-
|
|
7045
|
+
onDayHover && onDayHover(date);
|
|
6997
7046
|
};
|
|
6998
|
-
var
|
|
7047
|
+
var handleDayMouseLeave = function () {
|
|
6999
7048
|
setHoverDate(null);
|
|
7000
|
-
|
|
7001
|
-
};
|
|
7002
|
-
var handleCellKeyDown = function (event, date, index) {
|
|
7003
|
-
if (event.code === 'Space' || event.key === 'Enter') {
|
|
7004
|
-
event.preventDefault();
|
|
7005
|
-
handleCellOnClick && handleCellOnClick(date, index);
|
|
7006
|
-
return;
|
|
7007
|
-
}
|
|
7049
|
+
onDayHover && onDayHover(null);
|
|
7008
7050
|
};
|
|
7009
7051
|
var handleMonthClick = function (month) {
|
|
7010
7052
|
setCalendarPage(0, 0, month);
|
|
@@ -7012,8 +7054,7 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
7012
7054
|
};
|
|
7013
7055
|
var handleMonthKeyDown = function (event, month) {
|
|
7014
7056
|
if (event.code === 'Space' || event.key === 'Enter') {
|
|
7015
|
-
|
|
7016
|
-
setView('days');
|
|
7057
|
+
handleMonthClick(month);
|
|
7017
7058
|
}
|
|
7018
7059
|
};
|
|
7019
7060
|
var handleNavigationOnClick = function (direction, double) {
|
|
@@ -7049,14 +7090,13 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
7049
7090
|
};
|
|
7050
7091
|
var handleYearKeyDown = function (event, date) {
|
|
7051
7092
|
if (event.code === 'Space' || event.key === 'Enter') {
|
|
7052
|
-
|
|
7053
|
-
setView('months');
|
|
7093
|
+
handleYearClick(date);
|
|
7054
7094
|
}
|
|
7055
7095
|
};
|
|
7056
7096
|
return (React$1.createElement("div", { className: classNames$1('calendars', className) }, _calendarDate &&
|
|
7057
7097
|
Array.from({ length: calendars }, function (_, index) { return (React$1.createElement("div", { className: classNames$1('calendar', view), key: index, ref: ref },
|
|
7058
7098
|
React$1.createElement(Navigation, { addMonths: index, calendarDate: _calendarDate, locale: locale, navigation: navigation, navNextDoubleIcon: navNextDoubleIcon, navNextIcon: navNextIcon, navPrevDoubleIcon: navPrevDoubleIcon, navPrevIcon: navPrevIcon, navYearFirst: navYearFirst, onMonthClick: function () { return setView('months'); }, onNavigationClick: handleNavigationOnClick, onYearClick: function () { return setView('years'); }, view: view }),
|
|
7059
|
-
React$1.createElement(Calendar, { addMonths: index, calendarDate: _calendarDate, dayFormat: dayFormat, disabledDates: disabledDates, endDate: _endDate, firstDayOfWeek: firstDayOfWeek, hoverDate: _hoverDate, locale: locale, maxDate: _maxDate, minDate: _minDate,
|
|
7099
|
+
React$1.createElement(Calendar, { addMonths: index, calendarDate: _calendarDate, dayFormat: dayFormat, disabledDates: disabledDates, endDate: _endDate, firstDayOfWeek: firstDayOfWeek, hoverDate: _hoverDate, locale: locale, maxDate: _maxDate, minDate: _minDate, onDayClick: function (date) { return handleDayClick(date, index); }, onDayKeyDown: function (event, date) { return handleDayKeyDown(event, date, index); }, onDayMouseEnter: handleDayMouseEnter, onDayMouseLeave: handleDayMouseLeave, onMonthClick: handleMonthClick, onMonthKeyDown: handleMonthKeyDown, onYearClick: handleYearClick, onYearKeyDown: handleYearKeyDown, selectEndDate: _selectEndDate, selectAdjacementDays: selectAdjacementDays, showAdjacementDays: showAdjacementDays, startDate: _startDate, view: view, weekdayFormat: weekdayFormat }))); })));
|
|
7060
7100
|
});
|
|
7061
7101
|
CCalendar.propTypes = {
|
|
7062
7102
|
className: PropTypes.string,
|
|
@@ -7088,7 +7128,7 @@ CCalendar.propTypes = {
|
|
|
7088
7128
|
PropTypes.number,
|
|
7089
7129
|
PropTypes.oneOf(['long', 'narrow', 'short']),
|
|
7090
7130
|
]),
|
|
7091
|
-
|
|
7131
|
+
onDayHover: PropTypes.func,
|
|
7092
7132
|
onCalendarDateChange: PropTypes.func,
|
|
7093
7133
|
onEndDateChange: PropTypes.func,
|
|
7094
7134
|
onSelectEndChange: PropTypes.func,
|
|
@@ -7631,17 +7671,7 @@ function effect$1(_ref2) {
|
|
|
7631
7671
|
}
|
|
7632
7672
|
}
|
|
7633
7673
|
|
|
7634
|
-
if (process.env.NODE_ENV !== "production") {
|
|
7635
|
-
if (!isHTMLElement(arrowElement)) {
|
|
7636
|
-
console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));
|
|
7637
|
-
}
|
|
7638
|
-
}
|
|
7639
|
-
|
|
7640
7674
|
if (!contains(state.elements.popper, arrowElement)) {
|
|
7641
|
-
if (process.env.NODE_ENV !== "production") {
|
|
7642
|
-
console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', 'element.'].join(' '));
|
|
7643
|
-
}
|
|
7644
|
-
|
|
7645
7675
|
return;
|
|
7646
7676
|
}
|
|
7647
7677
|
|
|
@@ -7783,17 +7813,6 @@ function computeStyles(_ref5) {
|
|
|
7783
7813
|
adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
|
|
7784
7814
|
_options$roundOffsets = options.roundOffsets,
|
|
7785
7815
|
roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
|
|
7786
|
-
|
|
7787
|
-
if (process.env.NODE_ENV !== "production") {
|
|
7788
|
-
var transitionProperty = getComputedStyle$1(state.elements.popper).transitionProperty || '';
|
|
7789
|
-
|
|
7790
|
-
if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {
|
|
7791
|
-
return transitionProperty.indexOf(property) >= 0;
|
|
7792
|
-
})) {
|
|
7793
|
-
console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: "transform", "top", "right", "bottom", "left".', '\n\n', 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\n\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));
|
|
7794
|
-
}
|
|
7795
|
-
}
|
|
7796
|
-
|
|
7797
7816
|
var commonStyles = {
|
|
7798
7817
|
placement: getBasePlacement(state.placement),
|
|
7799
7818
|
variation: getVariation(state.placement),
|
|
@@ -8234,10 +8253,6 @@ function computeAutoPlacement(state, options) {
|
|
|
8234
8253
|
|
|
8235
8254
|
if (allowedPlacements.length === 0) {
|
|
8236
8255
|
allowedPlacements = placements$1;
|
|
8237
|
-
|
|
8238
|
-
if (process.env.NODE_ENV !== "production") {
|
|
8239
|
-
console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(' '));
|
|
8240
|
-
}
|
|
8241
8256
|
} // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
|
|
8242
8257
|
|
|
8243
8258
|
|
|
@@ -8789,108 +8804,6 @@ function debounce(fn) {
|
|
|
8789
8804
|
};
|
|
8790
8805
|
}
|
|
8791
8806
|
|
|
8792
|
-
function format(str) {
|
|
8793
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
8794
|
-
args[_key - 1] = arguments[_key];
|
|
8795
|
-
}
|
|
8796
|
-
|
|
8797
|
-
return [].concat(args).reduce(function (p, c) {
|
|
8798
|
-
return p.replace(/%s/, c);
|
|
8799
|
-
}, str);
|
|
8800
|
-
}
|
|
8801
|
-
|
|
8802
|
-
var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
|
|
8803
|
-
var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
|
|
8804
|
-
var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];
|
|
8805
|
-
function validateModifiers(modifiers) {
|
|
8806
|
-
modifiers.forEach(function (modifier) {
|
|
8807
|
-
[].concat(Object.keys(modifier), VALID_PROPERTIES) // IE11-compatible replacement for `new Set(iterable)`
|
|
8808
|
-
.filter(function (value, index, self) {
|
|
8809
|
-
return self.indexOf(value) === index;
|
|
8810
|
-
}).forEach(function (key) {
|
|
8811
|
-
switch (key) {
|
|
8812
|
-
case 'name':
|
|
8813
|
-
if (typeof modifier.name !== 'string') {
|
|
8814
|
-
console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', "\"" + String(modifier.name) + "\""));
|
|
8815
|
-
}
|
|
8816
|
-
|
|
8817
|
-
break;
|
|
8818
|
-
|
|
8819
|
-
case 'enabled':
|
|
8820
|
-
if (typeof modifier.enabled !== 'boolean') {
|
|
8821
|
-
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', "\"" + String(modifier.enabled) + "\""));
|
|
8822
|
-
}
|
|
8823
|
-
|
|
8824
|
-
break;
|
|
8825
|
-
|
|
8826
|
-
case 'phase':
|
|
8827
|
-
if (modifierPhases.indexOf(modifier.phase) < 0) {
|
|
8828
|
-
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(', '), "\"" + String(modifier.phase) + "\""));
|
|
8829
|
-
}
|
|
8830
|
-
|
|
8831
|
-
break;
|
|
8832
|
-
|
|
8833
|
-
case 'fn':
|
|
8834
|
-
if (typeof modifier.fn !== 'function') {
|
|
8835
|
-
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', "\"" + String(modifier.fn) + "\""));
|
|
8836
|
-
}
|
|
8837
|
-
|
|
8838
|
-
break;
|
|
8839
|
-
|
|
8840
|
-
case 'effect':
|
|
8841
|
-
if (modifier.effect != null && typeof modifier.effect !== 'function') {
|
|
8842
|
-
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', "\"" + String(modifier.fn) + "\""));
|
|
8843
|
-
}
|
|
8844
|
-
|
|
8845
|
-
break;
|
|
8846
|
-
|
|
8847
|
-
case 'requires':
|
|
8848
|
-
if (modifier.requires != null && !Array.isArray(modifier.requires)) {
|
|
8849
|
-
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', "\"" + String(modifier.requires) + "\""));
|
|
8850
|
-
}
|
|
8851
|
-
|
|
8852
|
-
break;
|
|
8853
|
-
|
|
8854
|
-
case 'requiresIfExists':
|
|
8855
|
-
if (!Array.isArray(modifier.requiresIfExists)) {
|
|
8856
|
-
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', "\"" + String(modifier.requiresIfExists) + "\""));
|
|
8857
|
-
}
|
|
8858
|
-
|
|
8859
|
-
break;
|
|
8860
|
-
|
|
8861
|
-
case 'options':
|
|
8862
|
-
case 'data':
|
|
8863
|
-
break;
|
|
8864
|
-
|
|
8865
|
-
default:
|
|
8866
|
-
console.error("PopperJS: an invalid property has been provided to the \"" + modifier.name + "\" modifier, valid properties are " + VALID_PROPERTIES.map(function (s) {
|
|
8867
|
-
return "\"" + s + "\"";
|
|
8868
|
-
}).join(', ') + "; but \"" + key + "\" was provided.");
|
|
8869
|
-
}
|
|
8870
|
-
|
|
8871
|
-
modifier.requires && modifier.requires.forEach(function (requirement) {
|
|
8872
|
-
if (modifiers.find(function (mod) {
|
|
8873
|
-
return mod.name === requirement;
|
|
8874
|
-
}) == null) {
|
|
8875
|
-
console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
|
|
8876
|
-
}
|
|
8877
|
-
});
|
|
8878
|
-
});
|
|
8879
|
-
});
|
|
8880
|
-
}
|
|
8881
|
-
|
|
8882
|
-
function uniqueBy(arr, fn) {
|
|
8883
|
-
var identifiers = new Set();
|
|
8884
|
-
return arr.filter(function (item) {
|
|
8885
|
-
var identifier = fn(item);
|
|
8886
|
-
|
|
8887
|
-
if (!identifiers.has(identifier)) {
|
|
8888
|
-
identifiers.add(identifier);
|
|
8889
|
-
return true;
|
|
8890
|
-
}
|
|
8891
|
-
});
|
|
8892
|
-
}
|
|
8893
|
-
|
|
8894
8807
|
function mergeByName(modifiers) {
|
|
8895
8808
|
var merged = modifiers.reduce(function (merged, current) {
|
|
8896
8809
|
var existing = merged[current.name];
|
|
@@ -8906,8 +8819,6 @@ function mergeByName(modifiers) {
|
|
|
8906
8819
|
});
|
|
8907
8820
|
}
|
|
8908
8821
|
|
|
8909
|
-
var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
|
|
8910
|
-
var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
|
|
8911
8822
|
var DEFAULT_OPTIONS = {
|
|
8912
8823
|
placement: 'bottom',
|
|
8913
8824
|
modifiers: [],
|
|
@@ -8969,42 +8880,7 @@ function popperGenerator(generatorOptions) {
|
|
|
8969
8880
|
|
|
8970
8881
|
state.orderedModifiers = orderedModifiers.filter(function (m) {
|
|
8971
8882
|
return m.enabled;
|
|
8972
|
-
});
|
|
8973
|
-
// if one of the modifiers is invalid for any reason
|
|
8974
|
-
|
|
8975
|
-
if (process.env.NODE_ENV !== "production") {
|
|
8976
|
-
var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {
|
|
8977
|
-
var name = _ref.name;
|
|
8978
|
-
return name;
|
|
8979
|
-
});
|
|
8980
|
-
validateModifiers(modifiers);
|
|
8981
|
-
|
|
8982
|
-
if (getBasePlacement(state.options.placement) === auto) {
|
|
8983
|
-
var flipModifier = state.orderedModifiers.find(function (_ref2) {
|
|
8984
|
-
var name = _ref2.name;
|
|
8985
|
-
return name === 'flip';
|
|
8986
|
-
});
|
|
8987
|
-
|
|
8988
|
-
if (!flipModifier) {
|
|
8989
|
-
console.error(['Popper: "auto" placements require the "flip" modifier be', 'present and enabled to work.'].join(' '));
|
|
8990
|
-
}
|
|
8991
|
-
}
|
|
8992
|
-
|
|
8993
|
-
var _getComputedStyle = getComputedStyle$1(popper),
|
|
8994
|
-
marginTop = _getComputedStyle.marginTop,
|
|
8995
|
-
marginRight = _getComputedStyle.marginRight,
|
|
8996
|
-
marginBottom = _getComputedStyle.marginBottom,
|
|
8997
|
-
marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
|
|
8998
|
-
// cause bugs with positioning, so we'll warn the consumer
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
|
|
9002
|
-
return parseFloat(margin);
|
|
9003
|
-
})) {
|
|
9004
|
-
console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
|
|
9005
|
-
}
|
|
9006
|
-
}
|
|
9007
|
-
|
|
8883
|
+
});
|
|
9008
8884
|
runModifierEffects();
|
|
9009
8885
|
return instance.update();
|
|
9010
8886
|
},
|
|
@@ -9024,10 +8900,6 @@ function popperGenerator(generatorOptions) {
|
|
|
9024
8900
|
// anymore
|
|
9025
8901
|
|
|
9026
8902
|
if (!areValidElements(reference, popper)) {
|
|
9027
|
-
if (process.env.NODE_ENV !== "production") {
|
|
9028
|
-
console.error(INVALID_ELEMENT_ERROR);
|
|
9029
|
-
}
|
|
9030
|
-
|
|
9031
8903
|
return;
|
|
9032
8904
|
} // Store the reference and popper rects to be read by modifiers
|
|
9033
8905
|
|
|
@@ -9050,18 +8922,8 @@ function popperGenerator(generatorOptions) {
|
|
|
9050
8922
|
state.orderedModifiers.forEach(function (modifier) {
|
|
9051
8923
|
return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
|
|
9052
8924
|
});
|
|
9053
|
-
var __debug_loops__ = 0;
|
|
9054
8925
|
|
|
9055
8926
|
for (var index = 0; index < state.orderedModifiers.length; index++) {
|
|
9056
|
-
if (process.env.NODE_ENV !== "production") {
|
|
9057
|
-
__debug_loops__ += 1;
|
|
9058
|
-
|
|
9059
|
-
if (__debug_loops__ > 100) {
|
|
9060
|
-
console.error(INFINITE_LOOP_ERROR);
|
|
9061
|
-
break;
|
|
9062
|
-
}
|
|
9063
|
-
}
|
|
9064
|
-
|
|
9065
8927
|
if (state.reset === true) {
|
|
9066
8928
|
state.reset = false;
|
|
9067
8929
|
index = -1;
|
|
@@ -9099,10 +8961,6 @@ function popperGenerator(generatorOptions) {
|
|
|
9099
8961
|
};
|
|
9100
8962
|
|
|
9101
8963
|
if (!areValidElements(reference, popper)) {
|
|
9102
|
-
if (process.env.NODE_ENV !== "production") {
|
|
9103
|
-
console.error(INVALID_ELEMENT_ERROR);
|
|
9104
|
-
}
|
|
9105
|
-
|
|
9106
8964
|
return instance;
|
|
9107
8965
|
}
|
|
9108
8966
|
|
|
@@ -9117,11 +8975,11 @@ function popperGenerator(generatorOptions) {
|
|
|
9117
8975
|
// one.
|
|
9118
8976
|
|
|
9119
8977
|
function runModifierEffects() {
|
|
9120
|
-
state.orderedModifiers.forEach(function (
|
|
9121
|
-
var name =
|
|
9122
|
-
|
|
9123
|
-
options =
|
|
9124
|
-
effect =
|
|
8978
|
+
state.orderedModifiers.forEach(function (_ref) {
|
|
8979
|
+
var name = _ref.name,
|
|
8980
|
+
_ref$options = _ref.options,
|
|
8981
|
+
options = _ref$options === void 0 ? {} : _ref$options,
|
|
8982
|
+
effect = _ref.effect;
|
|
9125
8983
|
|
|
9126
8984
|
if (typeof effect === 'function') {
|
|
9127
8985
|
var cleanupFn = effect({
|
|
@@ -9542,9 +9400,9 @@ var getLocalDateFromString = function (string, locale, time) {
|
|
|
9542
9400
|
var newDate = partials.groups &&
|
|
9543
9401
|
(time
|
|
9544
9402
|
? new Date(Number(partials.groups['year']), Number(partials.groups['month']) - 1, Number(partials.groups['day']), partials.groups['ampm']
|
|
9545
|
-
? partials.groups['ampm'] === 'PM'
|
|
9403
|
+
? (partials.groups['ampm'] === 'PM'
|
|
9546
9404
|
? Number(partials.groups['hour']) + 12
|
|
9547
|
-
: Number(partials.groups['hour'])
|
|
9405
|
+
: Number(partials.groups['hour']))
|
|
9548
9406
|
: Number(partials.groups['hour']), Number(partials.groups['minute']), Number(partials.groups['second']))
|
|
9549
9407
|
: new Date(Number(partials.groups['year']), Number(partials.groups['month']) - 1, Number(partials.groups['day'])));
|
|
9550
9408
|
return newDate;
|
|
@@ -9553,7 +9411,7 @@ var getLocalDateFromString = function (string, locale, time) {
|
|
|
9553
9411
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
9554
9412
|
var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
9555
9413
|
var _b;
|
|
9556
|
-
var _c = _a.calendars, calendars = _c === void 0 ? 2 : _c, calendarDate = _a.calendarDate, _d = _a.cancelButton, cancelButton = _d === void 0 ? 'Cancel' : _d, _e = _a.cancelButtonColor, cancelButtonColor = _e === void 0 ? 'primary' : _e, _f = _a.cancelButtonSize, cancelButtonSize = _f === void 0 ? 'sm' : _f, _g = _a.cancelButtonVariant, cancelButtonVariant = _g === void 0 ? 'ghost' : _g, className = _a.className, _h = _a.cleaner, cleaner = _h === void 0 ? true : _h, _j = _a.closeOnSelect, closeOnSelect = _j === void 0 ? true : _j, _k = _a.confirmButton, confirmButton = _k === void 0 ? 'OK' : _k, _l = _a.confirmButtonColor, confirmButtonColor = _l === void 0 ? 'primary' : _l, _m = _a.confirmButtonSize, confirmButtonSize = _m === void 0 ? 'sm' : _m, confirmButtonVariant = _a.confirmButtonVariant, _o = _a.indicator, indicator = _o === void 0 ? true : _o, dayFormat = _a.dayFormat, disabled = _a.disabled, disabledDates = _a.disabledDates, endDate = _a.endDate, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, firstDayOfWeek = _a.firstDayOfWeek, format = _a.format, footer = _a.footer, id = _a.id, inputReadOnly = _a.inputReadOnly, invalid = _a.invalid, label = _a.label, _p = _a.locale, locale = _p === void 0 ? 'default' : _p, maxDate = _a.maxDate, minDate = _a.minDate, navigation = _a.navigation, navYearFirst = _a.navYearFirst, onEndDateChange = _a.onEndDateChange, onHide = _a.onHide, onStartDateChange = _a.onStartDateChange, onShow = _a.onShow, _q = _a.placeholder, placeholder = _q === void 0 ? ['Start date', 'End date'] : _q, _r = _a.range, range = _r === void 0 ? true : _r, ranges = _a.ranges, _s = _a.rangesButtonsColor, rangesButtonsColor = _s === void 0 ? 'secondary' : _s, rangesButtonsSize = _a.rangesButtonsSize, _t = _a.rangesButtonsVariant, rangesButtonsVariant = _t === void 0 ? 'ghost' : _t, required = _a.required, _u = _a.separator, separator = _u === void 0 ? true : _u, selectAdjacementDays = _a.selectAdjacementDays, showAdjacementDays = _a.showAdjacementDays, size = _a.size, startDate = _a.startDate, text = _a.text, timepicker = _a.timepicker, toggler = _a.toggler, _v = _a.todayButton, todayButton = _v === void 0 ? 'Today' : _v, _w = _a.todayButtonColor, todayButtonColor = _w === void 0 ? 'primary' : _w, _x = _a.todayButtonSize, todayButtonSize = _x === void 0 ? 'sm' : _x, todayButtonVariant = _a.todayButtonVariant, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, visible = _a.visible, weekdayFormat = _a.weekdayFormat, rest = __rest$1(_a, ["calendars", "calendarDate", "cancelButton", "cancelButtonColor", "cancelButtonSize", "cancelButtonVariant", "className", "cleaner", "closeOnSelect", "confirmButton", "confirmButtonColor", "confirmButtonSize", "confirmButtonVariant", "indicator", "dayFormat", "disabled", "disabledDates", "endDate", "feedback", "feedbackInvalid", "feedbackValid", "firstDayOfWeek", "format", "footer", "id", "inputReadOnly", "invalid", "label", "locale", "maxDate", "minDate", "navigation", "navYearFirst", "onEndDateChange", "onHide", "onStartDateChange", "onShow", "placeholder", "range", "ranges", "rangesButtonsColor", "rangesButtonsSize", "rangesButtonsVariant", "required", "separator", "selectAdjacementDays", "showAdjacementDays", "size", "startDate", "text", "timepicker", "toggler", "todayButton", "todayButtonColor", "todayButtonSize", "todayButtonVariant", "tooltipFeedback", "valid", "visible", "weekdayFormat"]);
|
|
9414
|
+
var _c = _a.calendars, calendars = _c === void 0 ? 2 : _c, calendarDate = _a.calendarDate, _d = _a.cancelButton, cancelButton = _d === void 0 ? 'Cancel' : _d, _e = _a.cancelButtonColor, cancelButtonColor = _e === void 0 ? 'primary' : _e, _f = _a.cancelButtonSize, cancelButtonSize = _f === void 0 ? 'sm' : _f, _g = _a.cancelButtonVariant, cancelButtonVariant = _g === void 0 ? 'ghost' : _g, className = _a.className, _h = _a.cleaner, cleaner = _h === void 0 ? true : _h, _j = _a.closeOnSelect, closeOnSelect = _j === void 0 ? true : _j, _k = _a.confirmButton, confirmButton = _k === void 0 ? 'OK' : _k, _l = _a.confirmButtonColor, confirmButtonColor = _l === void 0 ? 'primary' : _l, _m = _a.confirmButtonSize, confirmButtonSize = _m === void 0 ? 'sm' : _m, confirmButtonVariant = _a.confirmButtonVariant, _o = _a.indicator, indicator = _o === void 0 ? true : _o, dayFormat = _a.dayFormat, disabled = _a.disabled, disabledDates = _a.disabledDates, endDate = _a.endDate, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, firstDayOfWeek = _a.firstDayOfWeek, format$1 = _a.format, footer = _a.footer, id = _a.id, inputReadOnly = _a.inputReadOnly, invalid = _a.invalid, label = _a.label, _p = _a.locale, locale = _p === void 0 ? 'default' : _p, maxDate = _a.maxDate, minDate = _a.minDate, navigation = _a.navigation, navYearFirst = _a.navYearFirst, onEndDateChange = _a.onEndDateChange, onHide = _a.onHide, onStartDateChange = _a.onStartDateChange, onShow = _a.onShow, _q = _a.placeholder, placeholder = _q === void 0 ? ['Start date', 'End date'] : _q, _r = _a.range, range = _r === void 0 ? true : _r, ranges = _a.ranges, _s = _a.rangesButtonsColor, rangesButtonsColor = _s === void 0 ? 'secondary' : _s, rangesButtonsSize = _a.rangesButtonsSize, _t = _a.rangesButtonsVariant, rangesButtonsVariant = _t === void 0 ? 'ghost' : _t, required = _a.required, _u = _a.separator, separator = _u === void 0 ? true : _u, selectAdjacementDays = _a.selectAdjacementDays, showAdjacementDays = _a.showAdjacementDays, size = _a.size, startDate = _a.startDate, text = _a.text, timepicker = _a.timepicker, toggler = _a.toggler, _v = _a.todayButton, todayButton = _v === void 0 ? 'Today' : _v, _w = _a.todayButtonColor, todayButtonColor = _w === void 0 ? 'primary' : _w, _x = _a.todayButtonSize, todayButtonSize = _x === void 0 ? 'sm' : _x, todayButtonVariant = _a.todayButtonVariant, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, visible = _a.visible, weekdayFormat = _a.weekdayFormat, rest = __rest$1(_a, ["calendars", "calendarDate", "cancelButton", "cancelButtonColor", "cancelButtonSize", "cancelButtonVariant", "className", "cleaner", "closeOnSelect", "confirmButton", "confirmButtonColor", "confirmButtonSize", "confirmButtonVariant", "indicator", "dayFormat", "disabled", "disabledDates", "endDate", "feedback", "feedbackInvalid", "feedbackValid", "firstDayOfWeek", "format", "footer", "id", "inputReadOnly", "invalid", "label", "locale", "maxDate", "minDate", "navigation", "navYearFirst", "onEndDateChange", "onHide", "onStartDateChange", "onShow", "placeholder", "range", "ranges", "rangesButtonsColor", "rangesButtonsSize", "rangesButtonsVariant", "required", "separator", "selectAdjacementDays", "showAdjacementDays", "size", "startDate", "text", "timepicker", "toggler", "todayButton", "todayButtonColor", "todayButtonSize", "todayButtonVariant", "tooltipFeedback", "valid", "visible", "weekdayFormat"]);
|
|
9557
9415
|
var inputEndRef = React$1.useRef(null);
|
|
9558
9416
|
var inputStartRef = React$1.useRef(null);
|
|
9559
9417
|
var formRef = React$1.useRef();
|
|
@@ -9618,11 +9476,11 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9618
9476
|
}
|
|
9619
9477
|
}, [formRef, _startDate, _endDate]);
|
|
9620
9478
|
var formatDate = function (date) {
|
|
9621
|
-
return format
|
|
9622
|
-
? format
|
|
9623
|
-
: timepicker
|
|
9479
|
+
return format$1
|
|
9480
|
+
? format(date, format$1)
|
|
9481
|
+
: (timepicker
|
|
9624
9482
|
? date.toLocaleString(locale)
|
|
9625
|
-
: date.toLocaleDateString(locale);
|
|
9483
|
+
: date.toLocaleDateString(locale));
|
|
9626
9484
|
};
|
|
9627
9485
|
var setInputValue = function (el, date) {
|
|
9628
9486
|
if (!el) {
|
|
@@ -9634,7 +9492,7 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9634
9492
|
}
|
|
9635
9493
|
el.value = '';
|
|
9636
9494
|
};
|
|
9637
|
-
var
|
|
9495
|
+
var handleDayHover = function (date) {
|
|
9638
9496
|
selectEndDate ? setInputEndHoverValue(date) : setInputStartHoverValue(date);
|
|
9639
9497
|
};
|
|
9640
9498
|
var handleCalendarDateChange = function (date, difference) {
|
|
@@ -9683,7 +9541,7 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9683
9541
|
hover: inputStartHoverValue,
|
|
9684
9542
|
}),
|
|
9685
9543
|
// delay={true}
|
|
9686
|
-
disabled: disabled }, (id && { name: range ? "".concat(id, "-start-date") : "".concat(id, "-date") }), { placeholder: Array.isArray(placeholder) ? placeholder[0] : placeholder, readOnly: inputReadOnly || typeof format === 'string', required: required, onChange: function (event) {
|
|
9544
|
+
disabled: disabled }, (id && { name: range ? "".concat(id, "-start-date") : "".concat(id, "-date") }), { placeholder: Array.isArray(placeholder) ? placeholder[0] : placeholder, readOnly: inputReadOnly || typeof format$1 === 'string', required: required, onChange: function (event) {
|
|
9687
9545
|
var date = getLocalDateFromString(event.target.value, locale, timepicker);
|
|
9688
9546
|
if (date instanceof Date && date.getTime()) {
|
|
9689
9547
|
setCalendarDate(date);
|
|
@@ -9695,7 +9553,7 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9695
9553
|
hover: inputEndHoverValue,
|
|
9696
9554
|
}),
|
|
9697
9555
|
// delay={true}
|
|
9698
|
-
disabled: disabled }, (id && { name: "".concat(id, "-end-date") }), { placeholder: placeholder[1], readOnly: inputReadOnly || typeof format === 'string', required: required, onChange: function (event) {
|
|
9556
|
+
disabled: disabled }, (id && { name: "".concat(id, "-end-date") }), { placeholder: placeholder[1], readOnly: inputReadOnly || typeof format$1 === 'string', required: required, onChange: function (event) {
|
|
9699
9557
|
var date = getLocalDateFromString(event.target.value, locale, timepicker);
|
|
9700
9558
|
if (date instanceof Date && date.getTime()) {
|
|
9701
9559
|
setCalendarDate(date);
|
|
@@ -9744,16 +9602,16 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9744
9602
|
handleStartDateChange(ranges[key][0]);
|
|
9745
9603
|
handleEndDateChange(ranges[key][1]);
|
|
9746
9604
|
}, size: rangesButtonsSize, variant: rangesButtonsVariant }, key)); }))),
|
|
9747
|
-
React$1.createElement(CCalendar, { calendarDate: _calendarDate, calendars: isMobile_1 ? 1 : calendars, className: "date-picker-calendars", dayFormat: dayFormat, disabledDates: disabledDates, endDate: _endDate, firstDayOfWeek: firstDayOfWeek, locale: locale, maxDate: _maxDate, minDate: _minDate, navigation: navigation, navYearFirst: navYearFirst, range: range, selectAdjacementDays: selectAdjacementDays, selectEndDate: selectEndDate, showAdjacementDays: showAdjacementDays, startDate: _startDate,
|
|
9605
|
+
React$1.createElement(CCalendar, { calendarDate: _calendarDate, calendars: isMobile_1 ? 1 : calendars, className: "date-picker-calendars", dayFormat: dayFormat, disabledDates: disabledDates, endDate: _endDate, firstDayOfWeek: firstDayOfWeek, locale: locale, maxDate: _maxDate, minDate: _minDate, navigation: navigation, navYearFirst: navYearFirst, range: range, selectAdjacementDays: selectAdjacementDays, selectEndDate: selectEndDate, showAdjacementDays: showAdjacementDays, startDate: _startDate, onDayHover: function (date) { return handleDayHover(date); }, onCalendarDateChange: function (date) { return handleCalendarDateChange(date); }, onStartDateChange: function (date) { return handleStartDateChange(date); }, onEndDateChange: function (date) { return handleEndDateChange(date); }, onSelectEndChange: function (value) { return setSelectEndDate(value); }, weekdayFormat: weekdayFormat }),
|
|
9748
9606
|
timepicker && (React$1.createElement("div", { className: "date-picker-timepickers" }, isMobile_1 || (range && calendars === 1) ? (React$1.createElement(React$1.Fragment, null,
|
|
9749
9607
|
React$1.createElement(CTimePicker, { container: "inline", disabled: _startDate === null ? true : false, locale: locale, onTimeChange: function (_, __, date) { return date && handleStartDateChange(date); }, time: _startDate, variant: "select" }),
|
|
9750
|
-
React$1.createElement(CTimePicker, { container: "inline", disabled: _endDate === null ? true : false, locale: locale, onTimeChange: function (_, __, date) { return date && handleEndDateChange(date); }, time: _endDate, variant: "select" }))) : (
|
|
9751
|
-
? _startDate === null
|
|
9608
|
+
React$1.createElement(CTimePicker, { container: "inline", disabled: _endDate === null ? true : false, locale: locale, onTimeChange: function (_, __, date) { return date && handleEndDateChange(date); }, time: _endDate, variant: "select" }))) : (Array.from({ length: calendars }).map(function (_, index) { return (React$1.createElement(CTimePicker, { container: "inline", disabled: index === 0
|
|
9609
|
+
? (_startDate === null
|
|
9752
9610
|
? true
|
|
9753
|
-
: false
|
|
9754
|
-
: _endDate === null
|
|
9611
|
+
: false)
|
|
9612
|
+
: (_endDate === null
|
|
9755
9613
|
? true
|
|
9756
|
-
: false, key: index, locale: locale, onTimeChange: function (_, __, date) {
|
|
9614
|
+
: false), key: index, locale: locale, onTimeChange: function (_, __, date) {
|
|
9757
9615
|
return index === 0
|
|
9758
9616
|
? date && handleStartDateChange(date)
|
|
9759
9617
|
: date && handleEndDateChange(date);
|
|
@@ -10498,8 +10356,12 @@ CDropdownToggle.propTypes = {
|
|
|
10498
10356
|
CDropdownToggle.displayName = 'CDropdownToggle';
|
|
10499
10357
|
|
|
10500
10358
|
var CSpinner = React$1.forwardRef(function (_a, ref) {
|
|
10501
|
-
var
|
|
10502
|
-
|
|
10359
|
+
var _b;
|
|
10360
|
+
var className = _a.className, color = _a.color, _c = _a.component, Component = _c === void 0 ? 'div' : _c, size = _a.size, _d = _a.variant, variant = _d === void 0 ? 'border' : _d, _e = _a.visuallyHiddenLabel, visuallyHiddenLabel = _e === void 0 ? 'Loading...' : _e, rest = __rest$1(_a, ["className", "color", "component", "size", "variant", "visuallyHiddenLabel"]);
|
|
10361
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1("spinner-".concat(variant), (_b = {},
|
|
10362
|
+
_b["spinner-".concat(variant, "-").concat(size)] = size,
|
|
10363
|
+
_b["text-".concat(color)] = color,
|
|
10364
|
+
_b), className), role: "status" }, rest, { ref: ref }),
|
|
10503
10365
|
React$1.createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
10504
10366
|
});
|
|
10505
10367
|
CSpinner.propTypes = {
|
|
@@ -10679,7 +10541,8 @@ var CFormSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
10679
10541
|
_b), className), size: htmlSize }, rest, { ref: ref }), options
|
|
10680
10542
|
? options.map(function (option, index) {
|
|
10681
10543
|
return (React$1.createElement("option", __assign$1({}, (typeof option === 'object' &&
|
|
10682
|
-
option.disabled && { disabled: option.disabled }), (typeof option === 'object' &&
|
|
10544
|
+
option.disabled && { disabled: option.disabled }), (typeof option === 'object' &&
|
|
10545
|
+
option.value !== undefined && { value: option.value }), { key: index }), typeof option === 'string' ? option : option.label));
|
|
10683
10546
|
})
|
|
10684
10547
|
: children)));
|
|
10685
10548
|
});
|
|
@@ -11137,6 +11000,7 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
11137
11000
|
if (backdrop === 'static') {
|
|
11138
11001
|
return setStaticBackdrop(true);
|
|
11139
11002
|
}
|
|
11003
|
+
setVisible(false);
|
|
11140
11004
|
return onClose && onClose();
|
|
11141
11005
|
};
|
|
11142
11006
|
React$1.useLayoutEffect(function () {
|
|
@@ -12166,6 +12030,7 @@ CProgressBar.propTypes = {
|
|
|
12166
12030
|
};
|
|
12167
12031
|
CProgressBar.displayName = 'CProgressBar';
|
|
12168
12032
|
|
|
12033
|
+
// TODO: update markup and add '.progress-stacked' in v5
|
|
12169
12034
|
var CProgress = React$1.forwardRef(function (_a, ref) {
|
|
12170
12035
|
var children = _a.children, className = _a.className, height = _a.height, thin = _a.thin, _b = _a.value, value = _b === void 0 ? 0 : _b, white = _a.white, rest = __rest$1(_a, ["children", "className", "height", "thin", "value", "white"]);
|
|
12171
12036
|
return (React$1.createElement("div", { className: classNames$1('progress', {
|
|
@@ -12184,7 +12049,6 @@ CProgress.propTypes = {
|
|
|
12184
12049
|
CProgress.displayName = 'CProgress';
|
|
12185
12050
|
|
|
12186
12051
|
var getPlacement$1 = function (placement, element) {
|
|
12187
|
-
console.log(element);
|
|
12188
12052
|
switch (placement) {
|
|
12189
12053
|
case 'right': {
|
|
12190
12054
|
return isRTL(element) ? 'left' : 'right';
|
|
@@ -13876,7 +13740,8 @@ var CTable = React$1.forwardRef(function (_a, ref) {
|
|
|
13876
13740
|
React$1.createElement(CTableRow, null, columns.map(function (column, index) { return (React$1.createElement(CTableHeaderCell, __assign$1({}, (column._props && __assign$1({}, column._props)), (column._style && { style: __assign$1({}, column._style) }), { key: index }), getColumnLabel$1(column))); })))),
|
|
13877
13741
|
items && (React$1.createElement(CTableBody, null, items.map(function (item, index) { return (React$1.createElement(CTableRow, __assign$1({}, (item._props && __assign$1({}, item._props)), { key: index }), columnNames &&
|
|
13878
13742
|
columnNames.map(function (colName, index) {
|
|
13879
|
-
|
|
13743
|
+
// eslint-disable-next-line unicorn/no-negated-condition
|
|
13744
|
+
return item[colName] !== undefined ? (React$1.createElement(CTableDataCell, __assign$1({}, (item._cellProps && __assign$1(__assign$1({}, (item._cellProps['all'] && __assign$1({}, item._cellProps['all']))), (item._cellProps[colName] && __assign$1({}, item._cellProps[colName])))), { key: index }), item[colName])) : null;
|
|
13880
13745
|
}))); }))),
|
|
13881
13746
|
children,
|
|
13882
13747
|
footer && (React$1.createElement(CTableFoot, __assign$1({}, tableFootProps),
|
|
@@ -14149,8 +14014,7 @@ var CSmartTableBody = React$1.forwardRef(function (_a, ref) {
|
|
|
14149
14014
|
React$1.cloneElement(scopedColumns[colName](item, trIndex + firstItemOnActivePageIndex), {
|
|
14150
14015
|
key: index,
|
|
14151
14016
|
})) ||
|
|
14152
|
-
|
|
14153
|
-
(typeof item[colName] !== 'undefined' && (React$1.createElement(CTableDataCell, __assign$1({}, getTableDataCellProps(item, colName), { key: index }), String(item[colName])))));
|
|
14017
|
+
(item[colName] !== undefined && (React$1.createElement(CTableDataCell, __assign$1({}, getTableDataCellProps(item, colName), { key: index }), item[colName]))));
|
|
14154
14018
|
})),
|
|
14155
14019
|
scopedColumns && scopedColumns.details && (React$1.createElement(React$1.Fragment, null,
|
|
14156
14020
|
React$1.createElement(CTableRow, null,
|
|
@@ -14177,19 +14041,6 @@ CSmartTableBody.propTypes = {
|
|
|
14177
14041
|
};
|
|
14178
14042
|
CSmartTableBody.displayName = 'CSmartTableBody';
|
|
14179
14043
|
|
|
14180
|
-
var CSmartTableCleaner = React$1.forwardRef(function (_a, ref) {
|
|
14181
|
-
var _b = _a.content, content = _b === void 0 ? React$1.createElement(CIcon, { width: 18, icon: cilFilterX }) : _b, isFiltered = _a.isFiltered, rest = __rest$1(_a, ["content", "isFiltered"]);
|
|
14182
|
-
return (React$1.createElement("button", __assign$1({ type: "button", className: "btn btn-transparent" }, (!isFiltered && {
|
|
14183
|
-
disabled: true,
|
|
14184
|
-
tabIndex: -1,
|
|
14185
|
-
}), rest, { ref: ref }), content));
|
|
14186
|
-
});
|
|
14187
|
-
CSmartTableCleaner.propTypes = {
|
|
14188
|
-
content: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
14189
|
-
isFiltered: PropTypes.string,
|
|
14190
|
-
};
|
|
14191
|
-
CSmartTableCleaner.displayName = 'CSmartTableCleaner';
|
|
14192
|
-
|
|
14193
14044
|
var CSmartTableHead = React$1.forwardRef(function (_a, ref) {
|
|
14194
14045
|
var columnFilter = _a.columnFilter, columnFilterState = _a.columnFilterState, columnSorter = _a.columnSorter, _b = _a.component, Component = _b === void 0 ? CTableHead : _b, columns = _a.columns, handleOnCustomFilterChange = _a.handleOnCustomFilterChange, handleFilterOnChange = _a.handleFilterOnChange, handleFilterOnInput = _a.handleFilterOnInput, handleSelectAllChecked = _a.handleSelectAllChecked, handleSort = _a.handleSort, items = _a.items, selectable = _a.selectable, selectAll = _a.selectAll, selectedAll = _a.selectedAll, _c = _a.showGroups, showGroups = _c === void 0 ? true : _c, sorterState = _a.sorterState, sortingIcon = _a.sortingIcon, sortingIconAscending = _a.sortingIconAscending, sortingIconDescending = _a.sortingIconDescending, rest = __rest$1(_a, ["columnFilter", "columnFilterState", "columnSorter", "component", "columns", "handleOnCustomFilterChange", "handleFilterOnChange", "handleFilterOnInput", "handleSelectAllChecked", "handleSort", "items", "selectable", "selectAll", "selectedAll", "showGroups", "sorterState", "sortingIcon", "sortingIconAscending", "sortingIconDescending"]);
|
|
14195
14046
|
var selectAllcheckboxRef = React$1.useRef(null);
|
|
@@ -14235,9 +14086,9 @@ var CSmartTableHead = React$1.forwardRef(function (_a, ref) {
|
|
|
14235
14086
|
React$1.createElement("div", { className: "d-inline" }, getColumnLabel(column)),
|
|
14236
14087
|
columnSorter &&
|
|
14237
14088
|
(typeof column === 'object'
|
|
14238
|
-
?
|
|
14089
|
+
? (column.sorter === undefined
|
|
14239
14090
|
? true
|
|
14240
|
-
: column.sorter
|
|
14091
|
+
: column.sorter)
|
|
14241
14092
|
: true) &&
|
|
14242
14093
|
columnSorterIcon(column)));
|
|
14243
14094
|
})),
|
|
@@ -14245,9 +14096,9 @@ var CSmartTableHead = React$1.forwardRef(function (_a, ref) {
|
|
|
14245
14096
|
selectable && React$1.createElement(CTableHeaderCell, null),
|
|
14246
14097
|
_columns.map(function (column, index) {
|
|
14247
14098
|
return (React$1.createElement(CTableHeaderCell, __assign$1({}, getTableHeaderCellProps(column), { key: index }), (typeof column === 'object'
|
|
14248
|
-
? column.filter === undefined
|
|
14099
|
+
? (column.filter === undefined
|
|
14249
14100
|
? true
|
|
14250
|
-
: column.filter
|
|
14101
|
+
: column.filter)
|
|
14251
14102
|
: true) ? (typeof column !== 'string' && typeof column.filter === 'function' ? (!refresh &&
|
|
14252
14103
|
column.filter(getColumnValues(items, getColumnKey(column)), function (value) {
|
|
14253
14104
|
return handleOnCustomFilterChange &&
|
|
@@ -14305,6 +14156,7 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
14305
14156
|
if (items && items.length < _itemsPerPage * _activePage - _itemsPerPage) {
|
|
14306
14157
|
setActivePage(1);
|
|
14307
14158
|
}
|
|
14159
|
+
var selected = [];
|
|
14308
14160
|
items &&
|
|
14309
14161
|
items.forEach(function (item) {
|
|
14310
14162
|
if (item._selected) {
|
|
@@ -14312,11 +14164,15 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
14312
14164
|
delete _item['_cellProps'];
|
|
14313
14165
|
delete _item['_props'];
|
|
14314
14166
|
delete _item['_selected'];
|
|
14315
|
-
|
|
14167
|
+
selected.push(_item);
|
|
14316
14168
|
}
|
|
14317
14169
|
});
|
|
14170
|
+
if (selected.length > 0) {
|
|
14171
|
+
setSelected(__spreadArray(__spreadArray([], _selected, true), selected, true));
|
|
14172
|
+
}
|
|
14318
14173
|
if (Array.isArray(items)) {
|
|
14319
14174
|
setItems(items);
|
|
14175
|
+
// eslint-disable-next-line unicorn/explicit-length-check
|
|
14320
14176
|
setItemsNumber(itemsNumber || items.length);
|
|
14321
14177
|
}
|
|
14322
14178
|
}, [JSON.stringify(items)]);
|
|
@@ -14475,12 +14331,16 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
14475
14331
|
}, onChange: function (e) {
|
|
14476
14332
|
handleTableFilterChange(e.target.value, 'change');
|
|
14477
14333
|
}, placeholder: tableFilterPlaceholder, value: tableFilterState || '' }))))),
|
|
14478
|
-
React$1.createElement("div", { className: "col-auto p-0" }, cleaner && (React$1.createElement(
|
|
14479
|
-
|
|
14480
|
-
|
|
14334
|
+
React$1.createElement("div", { className: "col-auto p-0" }, cleaner && (React$1.createElement("button", __assign$1({ type: "button", className: "btn btn-transparent" }, (!(tableFilterState ||
|
|
14335
|
+
(sorterState === null || sorterState === void 0 ? void 0 : sorterState.column) ||
|
|
14336
|
+
Object.values(columnFilterState).join('')) && {
|
|
14337
|
+
disabled: true,
|
|
14338
|
+
tabIndex: -1,
|
|
14339
|
+
}), { onClick: function () { return handleClean(); }, onKeyDown: function (event) {
|
|
14481
14340
|
if (event.key === 'Enter')
|
|
14482
14341
|
handleClean();
|
|
14483
|
-
} })
|
|
14342
|
+
} }),
|
|
14343
|
+
React$1.createElement(CIcon, { width: 18, icon: cilFilterX }))))))))),
|
|
14484
14344
|
React$1.createElement("div", { className: "position-relative" },
|
|
14485
14345
|
React$1.createElement(CTable, __assign$1({}, tableProps),
|
|
14486
14346
|
header && (React$1.createElement(CSmartTableHead, __assign$1({}, tableHeadProps, { columnFilter: columnFilter, columnFilterState: columnFilterState, columns: columns !== null && columns !== void 0 ? columns : columnNames, columnSorter: columnSorter, items: _items, selectable: selectable, selectAll: selectAll, selectedAll: selectedAll, sorterState: sorterState, sortingIcon: sortingIcon, sortingIconAscending: sortingIconAscending, sortingIconDescending: sortingIconDescending, handleFilterOnChange: function (key, event) {
|
|
@@ -14588,7 +14448,7 @@ var CSidebar = React$1.forwardRef(function (_a, ref) {
|
|
|
14588
14448
|
var _a, _b;
|
|
14589
14449
|
sidebarRef.current && setMobile(isOnMobile(sidebarRef.current));
|
|
14590
14450
|
sidebarRef.current && setInViewport(isInViewport(sidebarRef.current));
|
|
14591
|
-
window.addEventListener('resize',
|
|
14451
|
+
window.addEventListener('resize', handleResize);
|
|
14592
14452
|
window.addEventListener('mouseup', handleClickOutside);
|
|
14593
14453
|
window.addEventListener('keyup', handleKeyup);
|
|
14594
14454
|
(_a = sidebarRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseup', handleOnClick);
|
|
@@ -14597,7 +14457,7 @@ var CSidebar = React$1.forwardRef(function (_a, ref) {
|
|
|
14597
14457
|
});
|
|
14598
14458
|
return function () {
|
|
14599
14459
|
var _a, _b;
|
|
14600
|
-
window.removeEventListener('resize',
|
|
14460
|
+
window.removeEventListener('resize', handleResize);
|
|
14601
14461
|
window.removeEventListener('mouseup', handleClickOutside);
|
|
14602
14462
|
window.removeEventListener('keyup', handleKeyup);
|
|
14603
14463
|
(_a = sidebarRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseup', handleOnClick);
|
|
@@ -14875,7 +14735,6 @@ CToaster.propTypes = {
|
|
|
14875
14735
|
CToaster.displayName = 'CToaster';
|
|
14876
14736
|
|
|
14877
14737
|
var getPlacement = function (placement, element) {
|
|
14878
|
-
console.log(element);
|
|
14879
14738
|
switch (placement) {
|
|
14880
14739
|
case 'right': {
|
|
14881
14740
|
return isRTL(element) ? 'left' : 'right';
|
|
@@ -15222,4 +15081,7 @@ exports.CWidgetStatsC = CWidgetStatsC;
|
|
|
15222
15081
|
exports.CWidgetStatsD = CWidgetStatsD;
|
|
15223
15082
|
exports.CWidgetStatsE = CWidgetStatsE;
|
|
15224
15083
|
exports.CWidgetStatsF = CWidgetStatsF;
|
|
15084
|
+
exports.useColorModes = useColorModes;
|
|
15085
|
+
exports.useForkedRef = useForkedRef;
|
|
15086
|
+
exports.useStateWithCallback = useStateWithCallback;
|
|
15225
15087
|
//# sourceMappingURL=index.js.map
|