@coreui/react-pro 4.12.0-alpha.0 → 4.12.0-beta.1
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 +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +134 -274
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +136 -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 +57 -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,47 @@ 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
|
+
isColorModeSet: function () { return Boolean(getStoredTheme(localStorageItemName)); },
|
|
2534
|
+
setColorMode: function (mode) { return setColorMode(mode); },
|
|
2535
|
+
};
|
|
2536
|
+
};
|
|
2537
|
+
|
|
2497
2538
|
// code borrowed from https://github.com/reach/reach-ui
|
|
2498
2539
|
// problem described https://github.com/facebook/react/issues/13029
|
|
2499
2540
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2527,7 +2568,7 @@ value) {
|
|
|
2527
2568
|
try {
|
|
2528
2569
|
ref.current = value;
|
|
2529
2570
|
}
|
|
2530
|
-
catch (
|
|
2571
|
+
catch (_a) {
|
|
2531
2572
|
throw new Error("Cannot assign value \"".concat(value, "\" to ref \"").concat(ref, "\""));
|
|
2532
2573
|
}
|
|
2533
2574
|
}
|
|
@@ -2718,7 +2759,10 @@ var textColorsPropType = PropTypes.oneOfType([
|
|
|
2718
2759
|
PropTypes.oneOf(['white', 'muted']),
|
|
2719
2760
|
PropTypes.string,
|
|
2720
2761
|
]);
|
|
2721
|
-
var triggerPropType = PropTypes.
|
|
2762
|
+
var triggerPropType = PropTypes.oneOfType([
|
|
2763
|
+
PropTypes.arrayOf(PropTypes.oneOf(['hover', 'focus', 'click']).isRequired),
|
|
2764
|
+
PropTypes.oneOf(['hover', 'focus', 'click']),
|
|
2765
|
+
]);
|
|
2722
2766
|
|
|
2723
2767
|
var CAlert = React$1.forwardRef(function (_a, ref) {
|
|
2724
2768
|
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 +3121,7 @@ var isObjectInArray = function (array, item, ignore) {
|
|
|
3077
3121
|
};
|
|
3078
3122
|
|
|
3079
3123
|
var isRTL = function (element) {
|
|
3080
|
-
if (document.documentElement.dir === 'rtl') {
|
|
3124
|
+
if (typeof document !== 'undefined' && document.documentElement.dir === 'rtl') {
|
|
3081
3125
|
return true;
|
|
3082
3126
|
}
|
|
3083
3127
|
if (element) {
|
|
@@ -5448,7 +5492,7 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
5448
5492
|
* //=> "3 o'clock"
|
|
5449
5493
|
*/
|
|
5450
5494
|
|
|
5451
|
-
function format
|
|
5495
|
+
function format(dirtyDate, dirtyFormatStr, options) {
|
|
5452
5496
|
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
5497
|
requiredArgs(2, arguments);
|
|
5454
5498
|
var formatStr = String(dirtyFormatStr);
|
|
@@ -6778,7 +6822,7 @@ var isToday = function (date) {
|
|
|
6778
6822
|
};
|
|
6779
6823
|
|
|
6780
6824
|
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,
|
|
6825
|
+
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
6826
|
var _a = React$1.useState(calendarDate), date = _a[0], setDate = _a[1];
|
|
6783
6827
|
var _b = React$1.useState([]), listOfMonths = _b[0], setListOfMonths = _b[1];
|
|
6784
6828
|
React$1.useEffect(function () {
|
|
@@ -6801,9 +6845,9 @@ var Calendar = function (props) {
|
|
|
6801
6845
|
return (React$1.createElement("th", { key: idx, className: "calendar-cell" },
|
|
6802
6846
|
React$1.createElement("div", { className: "calendar-header-cell-inner" }, typeof weekdayFormat === 'function'
|
|
6803
6847
|
? weekdayFormat(date)
|
|
6804
|
-
: typeof weekdayFormat === 'string'
|
|
6848
|
+
: (typeof weekdayFormat === 'string'
|
|
6805
6849
|
? date.toLocaleDateString(locale, { weekday: weekdayFormat })
|
|
6806
|
-
: date.toLocaleDateString(locale, { weekday: 'long' }).slice(0, weekdayFormat))));
|
|
6850
|
+
: date.toLocaleDateString(locale, { weekday: 'long' }).slice(0, weekdayFormat)))));
|
|
6807
6851
|
})))),
|
|
6808
6852
|
React$1.createElement("tbody", null,
|
|
6809
6853
|
view === 'days' &&
|
|
@@ -6830,15 +6874,15 @@ var Calendar = function (props) {
|
|
|
6830
6874
|
!isDateDisabled(date, minDate, maxDate, disabledDates)
|
|
6831
6875
|
? 0
|
|
6832
6876
|
: -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
|
|
6877
|
+
onBlur: function () { return onDayMouseLeave(); },
|
|
6878
|
+
onClick: function () { return onDayClick(date); },
|
|
6879
|
+
onFocus: function () { return onDayMouseEnter(date); },
|
|
6880
|
+
onKeyDown: function (event) { return onDayKeyDown(event, date); },
|
|
6881
|
+
onMouseEnter: function () { return onDayMouseEnter(date); },
|
|
6882
|
+
onMouseLeave: function () { return onDayMouseLeave(); },
|
|
6839
6883
|
}), (month !== 'current' &&
|
|
6840
6884
|
!selectAdjacementDays && {
|
|
6841
|
-
onMouseEnter: function () { return
|
|
6885
|
+
onMouseEnter: function () { return onDayMouseLeave(); },
|
|
6842
6886
|
})),
|
|
6843
6887
|
React$1.createElement("div", { className: "calendar-cell-inner" }, typeof dayFormat === 'function'
|
|
6844
6888
|
? dayFormat(date)
|
|
@@ -6876,17 +6920,17 @@ var Navigation = function (props) {
|
|
|
6876
6920
|
}, [calendarDate]);
|
|
6877
6921
|
return (React$1.createElement("div", { className: "calendar-nav" },
|
|
6878
6922
|
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 ?
|
|
6923
|
+
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" }))),
|
|
6924
|
+
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
6925
|
React$1.createElement("div", __assign$1({ className: "calendar-nav-date" }, (navYearFirst && { style: { display: 'flex', justifyContent: 'center' } })),
|
|
6882
6926
|
view === 'days' && (React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return navigation && onMonthClick(); } }, date && date.toLocaleDateString(locale, { month: 'long' }))),
|
|
6883
6927
|
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
6928
|
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 ?
|
|
6929
|
+
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" }))),
|
|
6930
|
+
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
6931
|
};
|
|
6888
6932
|
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,
|
|
6933
|
+
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
6934
|
var isInitialMount = React$1.useRef(true);
|
|
6891
6935
|
var _l = React$1.useState(null), _calendarDate = _l[0], setCalendarDate = _l[1];
|
|
6892
6936
|
React$1.useEffect(function () {
|
|
@@ -6950,7 +6994,7 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
6950
6994
|
setCalendarDate(d);
|
|
6951
6995
|
onCalendarDateChange && onCalendarDateChange(d);
|
|
6952
6996
|
};
|
|
6953
|
-
var
|
|
6997
|
+
var handleDayClick = function (date, index) {
|
|
6954
6998
|
if (isDateDisabled(date, _minDate, _maxDate, disabledDates)) {
|
|
6955
6999
|
return;
|
|
6956
7000
|
}
|
|
@@ -6988,23 +7032,22 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
6988
7032
|
}
|
|
6989
7033
|
setStartDate(date);
|
|
6990
7034
|
};
|
|
6991
|
-
var
|
|
7035
|
+
var handleDayKeyDown = function (event, date, index) {
|
|
7036
|
+
if (event.code === 'Space' || event.key === 'Enter') {
|
|
7037
|
+
event.preventDefault();
|
|
7038
|
+
handleDayClick(date, index);
|
|
7039
|
+
}
|
|
7040
|
+
};
|
|
7041
|
+
var handleDayMouseEnter = function (date) {
|
|
6992
7042
|
if (isDateDisabled(date, _minDate, _maxDate, disabledDates)) {
|
|
6993
7043
|
return;
|
|
6994
7044
|
}
|
|
6995
7045
|
setHoverDate(date);
|
|
6996
|
-
|
|
7046
|
+
onDayHover && onDayHover(date);
|
|
6997
7047
|
};
|
|
6998
|
-
var
|
|
7048
|
+
var handleDayMouseLeave = function () {
|
|
6999
7049
|
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
|
-
}
|
|
7050
|
+
onDayHover && onDayHover(null);
|
|
7008
7051
|
};
|
|
7009
7052
|
var handleMonthClick = function (month) {
|
|
7010
7053
|
setCalendarPage(0, 0, month);
|
|
@@ -7012,8 +7055,7 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
7012
7055
|
};
|
|
7013
7056
|
var handleMonthKeyDown = function (event, month) {
|
|
7014
7057
|
if (event.code === 'Space' || event.key === 'Enter') {
|
|
7015
|
-
|
|
7016
|
-
setView('days');
|
|
7058
|
+
handleMonthClick(month);
|
|
7017
7059
|
}
|
|
7018
7060
|
};
|
|
7019
7061
|
var handleNavigationOnClick = function (direction, double) {
|
|
@@ -7049,14 +7091,13 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
7049
7091
|
};
|
|
7050
7092
|
var handleYearKeyDown = function (event, date) {
|
|
7051
7093
|
if (event.code === 'Space' || event.key === 'Enter') {
|
|
7052
|
-
|
|
7053
|
-
setView('months');
|
|
7094
|
+
handleYearClick(date);
|
|
7054
7095
|
}
|
|
7055
7096
|
};
|
|
7056
7097
|
return (React$1.createElement("div", { className: classNames$1('calendars', className) }, _calendarDate &&
|
|
7057
7098
|
Array.from({ length: calendars }, function (_, index) { return (React$1.createElement("div", { className: classNames$1('calendar', view), key: index, ref: ref },
|
|
7058
7099
|
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,
|
|
7100
|
+
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
7101
|
});
|
|
7061
7102
|
CCalendar.propTypes = {
|
|
7062
7103
|
className: PropTypes.string,
|
|
@@ -7088,7 +7129,7 @@ CCalendar.propTypes = {
|
|
|
7088
7129
|
PropTypes.number,
|
|
7089
7130
|
PropTypes.oneOf(['long', 'narrow', 'short']),
|
|
7090
7131
|
]),
|
|
7091
|
-
|
|
7132
|
+
onDayHover: PropTypes.func,
|
|
7092
7133
|
onCalendarDateChange: PropTypes.func,
|
|
7093
7134
|
onEndDateChange: PropTypes.func,
|
|
7094
7135
|
onSelectEndChange: PropTypes.func,
|
|
@@ -7631,17 +7672,7 @@ function effect$1(_ref2) {
|
|
|
7631
7672
|
}
|
|
7632
7673
|
}
|
|
7633
7674
|
|
|
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
7675
|
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
7676
|
return;
|
|
7646
7677
|
}
|
|
7647
7678
|
|
|
@@ -7783,17 +7814,6 @@ function computeStyles(_ref5) {
|
|
|
7783
7814
|
adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
|
|
7784
7815
|
_options$roundOffsets = options.roundOffsets,
|
|
7785
7816
|
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
7817
|
var commonStyles = {
|
|
7798
7818
|
placement: getBasePlacement(state.placement),
|
|
7799
7819
|
variation: getVariation(state.placement),
|
|
@@ -8234,10 +8254,6 @@ function computeAutoPlacement(state, options) {
|
|
|
8234
8254
|
|
|
8235
8255
|
if (allowedPlacements.length === 0) {
|
|
8236
8256
|
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
8257
|
} // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
|
|
8242
8258
|
|
|
8243
8259
|
|
|
@@ -8789,108 +8805,6 @@ function debounce(fn) {
|
|
|
8789
8805
|
};
|
|
8790
8806
|
}
|
|
8791
8807
|
|
|
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
8808
|
function mergeByName(modifiers) {
|
|
8895
8809
|
var merged = modifiers.reduce(function (merged, current) {
|
|
8896
8810
|
var existing = merged[current.name];
|
|
@@ -8906,8 +8820,6 @@ function mergeByName(modifiers) {
|
|
|
8906
8820
|
});
|
|
8907
8821
|
}
|
|
8908
8822
|
|
|
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
8823
|
var DEFAULT_OPTIONS = {
|
|
8912
8824
|
placement: 'bottom',
|
|
8913
8825
|
modifiers: [],
|
|
@@ -8969,42 +8881,7 @@ function popperGenerator(generatorOptions) {
|
|
|
8969
8881
|
|
|
8970
8882
|
state.orderedModifiers = orderedModifiers.filter(function (m) {
|
|
8971
8883
|
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
|
-
|
|
8884
|
+
});
|
|
9008
8885
|
runModifierEffects();
|
|
9009
8886
|
return instance.update();
|
|
9010
8887
|
},
|
|
@@ -9024,10 +8901,6 @@ function popperGenerator(generatorOptions) {
|
|
|
9024
8901
|
// anymore
|
|
9025
8902
|
|
|
9026
8903
|
if (!areValidElements(reference, popper)) {
|
|
9027
|
-
if (process.env.NODE_ENV !== "production") {
|
|
9028
|
-
console.error(INVALID_ELEMENT_ERROR);
|
|
9029
|
-
}
|
|
9030
|
-
|
|
9031
8904
|
return;
|
|
9032
8905
|
} // Store the reference and popper rects to be read by modifiers
|
|
9033
8906
|
|
|
@@ -9050,18 +8923,8 @@ function popperGenerator(generatorOptions) {
|
|
|
9050
8923
|
state.orderedModifiers.forEach(function (modifier) {
|
|
9051
8924
|
return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
|
|
9052
8925
|
});
|
|
9053
|
-
var __debug_loops__ = 0;
|
|
9054
8926
|
|
|
9055
8927
|
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
8928
|
if (state.reset === true) {
|
|
9066
8929
|
state.reset = false;
|
|
9067
8930
|
index = -1;
|
|
@@ -9099,10 +8962,6 @@ function popperGenerator(generatorOptions) {
|
|
|
9099
8962
|
};
|
|
9100
8963
|
|
|
9101
8964
|
if (!areValidElements(reference, popper)) {
|
|
9102
|
-
if (process.env.NODE_ENV !== "production") {
|
|
9103
|
-
console.error(INVALID_ELEMENT_ERROR);
|
|
9104
|
-
}
|
|
9105
|
-
|
|
9106
8965
|
return instance;
|
|
9107
8966
|
}
|
|
9108
8967
|
|
|
@@ -9117,11 +8976,11 @@ function popperGenerator(generatorOptions) {
|
|
|
9117
8976
|
// one.
|
|
9118
8977
|
|
|
9119
8978
|
function runModifierEffects() {
|
|
9120
|
-
state.orderedModifiers.forEach(function (
|
|
9121
|
-
var name =
|
|
9122
|
-
|
|
9123
|
-
options =
|
|
9124
|
-
effect =
|
|
8979
|
+
state.orderedModifiers.forEach(function (_ref) {
|
|
8980
|
+
var name = _ref.name,
|
|
8981
|
+
_ref$options = _ref.options,
|
|
8982
|
+
options = _ref$options === void 0 ? {} : _ref$options,
|
|
8983
|
+
effect = _ref.effect;
|
|
9125
8984
|
|
|
9126
8985
|
if (typeof effect === 'function') {
|
|
9127
8986
|
var cleanupFn = effect({
|
|
@@ -9542,9 +9401,9 @@ var getLocalDateFromString = function (string, locale, time) {
|
|
|
9542
9401
|
var newDate = partials.groups &&
|
|
9543
9402
|
(time
|
|
9544
9403
|
? new Date(Number(partials.groups['year']), Number(partials.groups['month']) - 1, Number(partials.groups['day']), partials.groups['ampm']
|
|
9545
|
-
? partials.groups['ampm'] === 'PM'
|
|
9404
|
+
? (partials.groups['ampm'] === 'PM'
|
|
9546
9405
|
? Number(partials.groups['hour']) + 12
|
|
9547
|
-
: Number(partials.groups['hour'])
|
|
9406
|
+
: Number(partials.groups['hour']))
|
|
9548
9407
|
: Number(partials.groups['hour']), Number(partials.groups['minute']), Number(partials.groups['second']))
|
|
9549
9408
|
: new Date(Number(partials.groups['year']), Number(partials.groups['month']) - 1, Number(partials.groups['day'])));
|
|
9550
9409
|
return newDate;
|
|
@@ -9553,7 +9412,7 @@ var getLocalDateFromString = function (string, locale, time) {
|
|
|
9553
9412
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
9554
9413
|
var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
9555
9414
|
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"]);
|
|
9415
|
+
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
9416
|
var inputEndRef = React$1.useRef(null);
|
|
9558
9417
|
var inputStartRef = React$1.useRef(null);
|
|
9559
9418
|
var formRef = React$1.useRef();
|
|
@@ -9618,11 +9477,11 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9618
9477
|
}
|
|
9619
9478
|
}, [formRef, _startDate, _endDate]);
|
|
9620
9479
|
var formatDate = function (date) {
|
|
9621
|
-
return format
|
|
9622
|
-
? format
|
|
9623
|
-
: timepicker
|
|
9480
|
+
return format$1
|
|
9481
|
+
? format(date, format$1)
|
|
9482
|
+
: (timepicker
|
|
9624
9483
|
? date.toLocaleString(locale)
|
|
9625
|
-
: date.toLocaleDateString(locale);
|
|
9484
|
+
: date.toLocaleDateString(locale));
|
|
9626
9485
|
};
|
|
9627
9486
|
var setInputValue = function (el, date) {
|
|
9628
9487
|
if (!el) {
|
|
@@ -9634,7 +9493,7 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9634
9493
|
}
|
|
9635
9494
|
el.value = '';
|
|
9636
9495
|
};
|
|
9637
|
-
var
|
|
9496
|
+
var handleDayHover = function (date) {
|
|
9638
9497
|
selectEndDate ? setInputEndHoverValue(date) : setInputStartHoverValue(date);
|
|
9639
9498
|
};
|
|
9640
9499
|
var handleCalendarDateChange = function (date, difference) {
|
|
@@ -9683,7 +9542,7 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9683
9542
|
hover: inputStartHoverValue,
|
|
9684
9543
|
}),
|
|
9685
9544
|
// 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) {
|
|
9545
|
+
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
9546
|
var date = getLocalDateFromString(event.target.value, locale, timepicker);
|
|
9688
9547
|
if (date instanceof Date && date.getTime()) {
|
|
9689
9548
|
setCalendarDate(date);
|
|
@@ -9695,7 +9554,7 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9695
9554
|
hover: inputEndHoverValue,
|
|
9696
9555
|
}),
|
|
9697
9556
|
// delay={true}
|
|
9698
|
-
disabled: disabled }, (id && { name: "".concat(id, "-end-date") }), { placeholder: placeholder[1], readOnly: inputReadOnly || typeof format === 'string', required: required, onChange: function (event) {
|
|
9557
|
+
disabled: disabled }, (id && { name: "".concat(id, "-end-date") }), { placeholder: placeholder[1], readOnly: inputReadOnly || typeof format$1 === 'string', required: required, onChange: function (event) {
|
|
9699
9558
|
var date = getLocalDateFromString(event.target.value, locale, timepicker);
|
|
9700
9559
|
if (date instanceof Date && date.getTime()) {
|
|
9701
9560
|
setCalendarDate(date);
|
|
@@ -9744,16 +9603,16 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9744
9603
|
handleStartDateChange(ranges[key][0]);
|
|
9745
9604
|
handleEndDateChange(ranges[key][1]);
|
|
9746
9605
|
}, 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,
|
|
9606
|
+
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
9607
|
timepicker && (React$1.createElement("div", { className: "date-picker-timepickers" }, isMobile_1 || (range && calendars === 1) ? (React$1.createElement(React$1.Fragment, null,
|
|
9749
9608
|
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
|
|
9609
|
+
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
|
|
9610
|
+
? (_startDate === null
|
|
9752
9611
|
? true
|
|
9753
|
-
: false
|
|
9754
|
-
: _endDate === null
|
|
9612
|
+
: false)
|
|
9613
|
+
: (_endDate === null
|
|
9755
9614
|
? true
|
|
9756
|
-
: false, key: index, locale: locale, onTimeChange: function (_, __, date) {
|
|
9615
|
+
: false), key: index, locale: locale, onTimeChange: function (_, __, date) {
|
|
9757
9616
|
return index === 0
|
|
9758
9617
|
? date && handleStartDateChange(date)
|
|
9759
9618
|
: date && handleEndDateChange(date);
|
|
@@ -10498,8 +10357,12 @@ CDropdownToggle.propTypes = {
|
|
|
10498
10357
|
CDropdownToggle.displayName = 'CDropdownToggle';
|
|
10499
10358
|
|
|
10500
10359
|
var CSpinner = React$1.forwardRef(function (_a, ref) {
|
|
10501
|
-
var
|
|
10502
|
-
|
|
10360
|
+
var _b;
|
|
10361
|
+
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"]);
|
|
10362
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1("spinner-".concat(variant), (_b = {},
|
|
10363
|
+
_b["spinner-".concat(variant, "-").concat(size)] = size,
|
|
10364
|
+
_b["text-".concat(color)] = color,
|
|
10365
|
+
_b), className), role: "status" }, rest, { ref: ref }),
|
|
10503
10366
|
React$1.createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
10504
10367
|
});
|
|
10505
10368
|
CSpinner.propTypes = {
|
|
@@ -10679,7 +10542,8 @@ var CFormSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
10679
10542
|
_b), className), size: htmlSize }, rest, { ref: ref }), options
|
|
10680
10543
|
? options.map(function (option, index) {
|
|
10681
10544
|
return (React$1.createElement("option", __assign$1({}, (typeof option === 'object' &&
|
|
10682
|
-
option.disabled && { disabled: option.disabled }), (typeof option === 'object' &&
|
|
10545
|
+
option.disabled && { disabled: option.disabled }), (typeof option === 'object' &&
|
|
10546
|
+
option.value !== undefined && { value: option.value }), { key: index }), typeof option === 'string' ? option : option.label));
|
|
10683
10547
|
})
|
|
10684
10548
|
: children)));
|
|
10685
10549
|
});
|
|
@@ -11137,6 +11001,7 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
11137
11001
|
if (backdrop === 'static') {
|
|
11138
11002
|
return setStaticBackdrop(true);
|
|
11139
11003
|
}
|
|
11004
|
+
setVisible(false);
|
|
11140
11005
|
return onClose && onClose();
|
|
11141
11006
|
};
|
|
11142
11007
|
React$1.useLayoutEffect(function () {
|
|
@@ -12166,6 +12031,7 @@ CProgressBar.propTypes = {
|
|
|
12166
12031
|
};
|
|
12167
12032
|
CProgressBar.displayName = 'CProgressBar';
|
|
12168
12033
|
|
|
12034
|
+
// TODO: update markup and add '.progress-stacked' in v5
|
|
12169
12035
|
var CProgress = React$1.forwardRef(function (_a, ref) {
|
|
12170
12036
|
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
12037
|
return (React$1.createElement("div", { className: classNames$1('progress', {
|
|
@@ -12184,7 +12050,6 @@ CProgress.propTypes = {
|
|
|
12184
12050
|
CProgress.displayName = 'CProgress';
|
|
12185
12051
|
|
|
12186
12052
|
var getPlacement$1 = function (placement, element) {
|
|
12187
|
-
console.log(element);
|
|
12188
12053
|
switch (placement) {
|
|
12189
12054
|
case 'right': {
|
|
12190
12055
|
return isRTL(element) ? 'left' : 'right';
|
|
@@ -13876,7 +13741,8 @@ var CTable = React$1.forwardRef(function (_a, ref) {
|
|
|
13876
13741
|
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
13742
|
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
13743
|
columnNames.map(function (colName, index) {
|
|
13879
|
-
|
|
13744
|
+
// eslint-disable-next-line unicorn/no-negated-condition
|
|
13745
|
+
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
13746
|
}))); }))),
|
|
13881
13747
|
children,
|
|
13882
13748
|
footer && (React$1.createElement(CTableFoot, __assign$1({}, tableFootProps),
|
|
@@ -14149,8 +14015,7 @@ var CSmartTableBody = React$1.forwardRef(function (_a, ref) {
|
|
|
14149
14015
|
React$1.cloneElement(scopedColumns[colName](item, trIndex + firstItemOnActivePageIndex), {
|
|
14150
14016
|
key: index,
|
|
14151
14017
|
})) ||
|
|
14152
|
-
|
|
14153
|
-
(typeof item[colName] !== 'undefined' && (React$1.createElement(CTableDataCell, __assign$1({}, getTableDataCellProps(item, colName), { key: index }), String(item[colName])))));
|
|
14018
|
+
(item[colName] !== undefined && (React$1.createElement(CTableDataCell, __assign$1({}, getTableDataCellProps(item, colName), { key: index }), item[colName]))));
|
|
14154
14019
|
})),
|
|
14155
14020
|
scopedColumns && scopedColumns.details && (React$1.createElement(React$1.Fragment, null,
|
|
14156
14021
|
React$1.createElement(CTableRow, null,
|
|
@@ -14177,19 +14042,6 @@ CSmartTableBody.propTypes = {
|
|
|
14177
14042
|
};
|
|
14178
14043
|
CSmartTableBody.displayName = 'CSmartTableBody';
|
|
14179
14044
|
|
|
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
14045
|
var CSmartTableHead = React$1.forwardRef(function (_a, ref) {
|
|
14194
14046
|
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
14047
|
var selectAllcheckboxRef = React$1.useRef(null);
|
|
@@ -14235,9 +14087,9 @@ var CSmartTableHead = React$1.forwardRef(function (_a, ref) {
|
|
|
14235
14087
|
React$1.createElement("div", { className: "d-inline" }, getColumnLabel(column)),
|
|
14236
14088
|
columnSorter &&
|
|
14237
14089
|
(typeof column === 'object'
|
|
14238
|
-
?
|
|
14090
|
+
? (column.sorter === undefined
|
|
14239
14091
|
? true
|
|
14240
|
-
: column.sorter
|
|
14092
|
+
: column.sorter)
|
|
14241
14093
|
: true) &&
|
|
14242
14094
|
columnSorterIcon(column)));
|
|
14243
14095
|
})),
|
|
@@ -14245,9 +14097,9 @@ var CSmartTableHead = React$1.forwardRef(function (_a, ref) {
|
|
|
14245
14097
|
selectable && React$1.createElement(CTableHeaderCell, null),
|
|
14246
14098
|
_columns.map(function (column, index) {
|
|
14247
14099
|
return (React$1.createElement(CTableHeaderCell, __assign$1({}, getTableHeaderCellProps(column), { key: index }), (typeof column === 'object'
|
|
14248
|
-
? column.filter === undefined
|
|
14100
|
+
? (column.filter === undefined
|
|
14249
14101
|
? true
|
|
14250
|
-
: column.filter
|
|
14102
|
+
: column.filter)
|
|
14251
14103
|
: true) ? (typeof column !== 'string' && typeof column.filter === 'function' ? (!refresh &&
|
|
14252
14104
|
column.filter(getColumnValues(items, getColumnKey(column)), function (value) {
|
|
14253
14105
|
return handleOnCustomFilterChange &&
|
|
@@ -14305,6 +14157,7 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
14305
14157
|
if (items && items.length < _itemsPerPage * _activePage - _itemsPerPage) {
|
|
14306
14158
|
setActivePage(1);
|
|
14307
14159
|
}
|
|
14160
|
+
var selected = [];
|
|
14308
14161
|
items &&
|
|
14309
14162
|
items.forEach(function (item) {
|
|
14310
14163
|
if (item._selected) {
|
|
@@ -14312,11 +14165,15 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
14312
14165
|
delete _item['_cellProps'];
|
|
14313
14166
|
delete _item['_props'];
|
|
14314
14167
|
delete _item['_selected'];
|
|
14315
|
-
|
|
14168
|
+
selected.push(_item);
|
|
14316
14169
|
}
|
|
14317
14170
|
});
|
|
14171
|
+
if (selected.length > 0) {
|
|
14172
|
+
setSelected(__spreadArray(__spreadArray([], _selected, true), selected, true));
|
|
14173
|
+
}
|
|
14318
14174
|
if (Array.isArray(items)) {
|
|
14319
14175
|
setItems(items);
|
|
14176
|
+
// eslint-disable-next-line unicorn/explicit-length-check
|
|
14320
14177
|
setItemsNumber(itemsNumber || items.length);
|
|
14321
14178
|
}
|
|
14322
14179
|
}, [JSON.stringify(items)]);
|
|
@@ -14475,12 +14332,16 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
14475
14332
|
}, onChange: function (e) {
|
|
14476
14333
|
handleTableFilterChange(e.target.value, 'change');
|
|
14477
14334
|
}, placeholder: tableFilterPlaceholder, value: tableFilterState || '' }))))),
|
|
14478
|
-
React$1.createElement("div", { className: "col-auto p-0" }, cleaner && (React$1.createElement(
|
|
14479
|
-
|
|
14480
|
-
|
|
14335
|
+
React$1.createElement("div", { className: "col-auto p-0" }, cleaner && (React$1.createElement("button", __assign$1({ type: "button", className: "btn btn-transparent" }, (!(tableFilterState ||
|
|
14336
|
+
(sorterState === null || sorterState === void 0 ? void 0 : sorterState.column) ||
|
|
14337
|
+
Object.values(columnFilterState).join('')) && {
|
|
14338
|
+
disabled: true,
|
|
14339
|
+
tabIndex: -1,
|
|
14340
|
+
}), { onClick: function () { return handleClean(); }, onKeyDown: function (event) {
|
|
14481
14341
|
if (event.key === 'Enter')
|
|
14482
14342
|
handleClean();
|
|
14483
|
-
} })
|
|
14343
|
+
} }),
|
|
14344
|
+
React$1.createElement(CIcon, { width: 18, icon: cilFilterX }))))))))),
|
|
14484
14345
|
React$1.createElement("div", { className: "position-relative" },
|
|
14485
14346
|
React$1.createElement(CTable, __assign$1({}, tableProps),
|
|
14486
14347
|
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 +14449,7 @@ var CSidebar = React$1.forwardRef(function (_a, ref) {
|
|
|
14588
14449
|
var _a, _b;
|
|
14589
14450
|
sidebarRef.current && setMobile(isOnMobile(sidebarRef.current));
|
|
14590
14451
|
sidebarRef.current && setInViewport(isInViewport(sidebarRef.current));
|
|
14591
|
-
window.addEventListener('resize',
|
|
14452
|
+
window.addEventListener('resize', handleResize);
|
|
14592
14453
|
window.addEventListener('mouseup', handleClickOutside);
|
|
14593
14454
|
window.addEventListener('keyup', handleKeyup);
|
|
14594
14455
|
(_a = sidebarRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseup', handleOnClick);
|
|
@@ -14597,7 +14458,7 @@ var CSidebar = React$1.forwardRef(function (_a, ref) {
|
|
|
14597
14458
|
});
|
|
14598
14459
|
return function () {
|
|
14599
14460
|
var _a, _b;
|
|
14600
|
-
window.removeEventListener('resize',
|
|
14461
|
+
window.removeEventListener('resize', handleResize);
|
|
14601
14462
|
window.removeEventListener('mouseup', handleClickOutside);
|
|
14602
14463
|
window.removeEventListener('keyup', handleKeyup);
|
|
14603
14464
|
(_a = sidebarRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseup', handleOnClick);
|
|
@@ -14875,7 +14736,6 @@ CToaster.propTypes = {
|
|
|
14875
14736
|
CToaster.displayName = 'CToaster';
|
|
14876
14737
|
|
|
14877
14738
|
var getPlacement = function (placement, element) {
|
|
14878
|
-
console.log(element);
|
|
14879
14739
|
switch (placement) {
|
|
14880
14740
|
case 'right': {
|
|
14881
14741
|
return isRTL(element) ? 'left' : 'right';
|
|
@@ -15222,4 +15082,7 @@ exports.CWidgetStatsC = CWidgetStatsC;
|
|
|
15222
15082
|
exports.CWidgetStatsD = CWidgetStatsD;
|
|
15223
15083
|
exports.CWidgetStatsE = CWidgetStatsE;
|
|
15224
15084
|
exports.CWidgetStatsF = CWidgetStatsF;
|
|
15085
|
+
exports.useColorModes = useColorModes;
|
|
15086
|
+
exports.useForkedRef = useForkedRef;
|
|
15087
|
+
exports.useStateWithCallback = useStateWithCallback;
|
|
15225
15088
|
//# sourceMappingURL=index.js.map
|