@coreui/react-pro 5.0.0-alpha.0 → 5.0.0-alpha.2
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/avatar/CAvatar.d.ts +1 -1
- package/dist/components/badge/CBadge.d.ts +1 -1
- package/dist/components/calendar/CCalendar.d.ts +25 -7
- package/dist/components/calendar/utils.d.ts +12 -3
- package/dist/components/card/CCard.d.ts +1 -1
- package/dist/components/close-button/CCloseButton.d.ts +6 -0
- package/dist/components/dropdown/CDropdown.d.ts +1 -0
- package/dist/components/modal/CModal.d.ts +6 -0
- package/dist/components/multi-select/types.d.ts +2 -2
- package/dist/components/multi-select/utils.d.ts +2 -2
- package/dist/components/nav/CNav.d.ts +1 -1
- package/dist/components/navbar/CNavbar.d.ts +1 -1
- package/dist/components/offcanvas/COffcanvas.d.ts +4 -0
- package/dist/components/smart-table/CSmartTableBody.d.ts +2 -1
- package/dist/components/smart-table/CSmartTableHead.d.ts +1 -1
- package/dist/components/smart-table/CSmartTableInterface.d.ts +1 -3
- package/dist/components/smart-table/types.d.ts +2 -2
- package/dist/components/smart-table/utils.d.ts +3 -1
- package/dist/index.es.js +1468 -1130
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1468 -1130
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils/executeAfterTransition.d.ts +2 -0
- package/dist/utils/getTransitionDurationFromElement.d.ts +2 -0
- package/dist/utils/index.d.ts +3 -1
- package/package.json +2 -2
- package/src/components/avatar/CAvatar.tsx +1 -1
- package/src/components/badge/CBadge.tsx +1 -1
- package/src/components/button/CButton.tsx +1 -1
- package/src/components/button/__tests__/__snapshots__/CButton.spec.tsx.snap +0 -1
- package/src/components/calendar/CCalendar.tsx +396 -193
- package/src/components/calendar/utils.ts +91 -4
- package/src/components/card/CCard.tsx +1 -1
- package/src/components/carousel/CCarousel.tsx +9 -5
- package/src/components/carousel/__tests__/__snapshots__/CCarousel.spec.tsx.snap +9 -5
- package/src/components/close-button/CCloseButton.tsx +9 -1
- package/src/components/date-range-picker/CDateRangePicker.tsx +49 -45
- package/src/components/dropdown/CDropdown.tsx +43 -1
- package/src/components/dropdown/CDropdownMenu.tsx +1 -1
- package/src/components/dropdown/CDropdownToggle.tsx +3 -12
- package/src/components/modal/CModal.tsx +25 -9
- package/src/components/multi-select/CMultiSelect.tsx +3 -3
- package/src/components/multi-select/CMultiSelectNativeSelect.tsx +1 -1
- package/src/components/multi-select/CMultiSelectOptions.tsx +1 -1
- package/src/components/multi-select/CMultiSelectSelection.tsx +3 -3
- package/src/components/multi-select/types.ts +2 -2
- package/src/components/multi-select/utils.ts +5 -5
- package/src/components/nav/CNav.tsx +2 -2
- package/src/components/nav/CNavGroup.tsx +9 -2
- package/src/components/nav/__tests__/__snapshots__/CNav.spec.tsx.snap +5 -4
- package/src/components/navbar/CNavbar.tsx +2 -2
- package/src/components/navbar/__tests__/CNavbar.spec.tsx +1 -1
- package/src/components/navbar/__tests__/__snapshots__/CNavbar.spec.tsx.snap +2 -1
- package/src/components/offcanvas/COffcanvas.tsx +8 -1
- package/src/components/popover/CPopover.tsx +2 -2
- package/src/components/progress/__tests__/__snapshots__/CProgress.spec.tsx.snap +10 -5
- package/src/components/progress/__tests__/__snapshots__/CProgressBar.spec.tsx.snap +0 -8
- package/src/components/sidebar/CSidebar.tsx +1 -1
- package/src/components/smart-table/CSmartTable.tsx +13 -6
- package/src/components/smart-table/CSmartTableBody.tsx +11 -5
- package/src/components/smart-table/CSmartTableHead.tsx +31 -11
- package/src/components/smart-table/CSmartTableInterface.tsx +1 -3
- package/src/components/smart-table/types.ts +2 -2
- package/src/components/smart-table/utils.ts +40 -5
- package/src/components/time-picker/CTimePicker.tsx +2 -2
- package/src/components/time-picker/utils.ts +5 -1
- package/src/components/tooltip/CTooltip.tsx +2 -2
- package/src/components/widgets/CWidgetStatsA.tsx +1 -1
- package/src/components/widgets/CWidgetStatsB.tsx +2 -2
- package/src/components/widgets/CWidgetStatsC.tsx +4 -12
- package/src/components/widgets/CWidgetStatsD.tsx +1 -1
- package/src/components/widgets/CWidgetStatsE.tsx +1 -1
- package/src/components/widgets/CWidgetStatsF.tsx +1 -1
- package/src/components/widgets/__tests__/CWidgetStatsA.spec.tsx +1 -1
- package/src/components/widgets/__tests__/CWidgetStatsB.spec.tsx +1 -1
- package/src/components/widgets/__tests__/CWidgetStatsC.spec.tsx +1 -1
- package/src/components/widgets/__tests__/CWidgetStatsD.spec.tsx +1 -1
- package/src/components/widgets/__tests__/CWidgetStatsE.spec.tsx +1 -1
- package/src/components/widgets/__tests__/CWidgetStatsF.spec.tsx +1 -1
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsA.spec.tsx.snap +1 -1
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsB.spec.tsx.snap +12 -7
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsC.spec.tsx.snap +14 -9
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsD.spec.tsx.snap +2 -2
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsE.spec.tsx.snap +1 -1
- package/src/components/widgets/__tests__/__snapshots__/CWidgetStatsF.spec.tsx.snap +2 -2
- package/src/hooks/usePopper.ts +10 -2
- package/src/types.ts +14 -7
- package/src/utils/executeAfterTransition.ts +46 -0
- package/src/utils/getTransitionDurationFromElement.ts +24 -0
- package/src/utils/index.ts +10 -1
package/dist/index.js
CHANGED
|
@@ -60,7 +60,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
60
60
|
|
|
61
61
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
62
62
|
|
|
63
|
-
function getDefaultExportFromCjs (x) {
|
|
63
|
+
function getDefaultExportFromCjs$1 (x) {
|
|
64
64
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -1244,8 +1244,8 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1244
1244
|
propTypes$1.exports = requireFactoryWithThrowingShims$1()();
|
|
1245
1245
|
}
|
|
1246
1246
|
|
|
1247
|
-
var propTypesExports = propTypes$1.exports;
|
|
1248
|
-
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
1247
|
+
var propTypesExports$1 = propTypes$1.exports;
|
|
1248
|
+
var PropTypes$1 = /*@__PURE__*/getDefaultExportFromCjs$1(propTypesExports$1);
|
|
1249
1249
|
|
|
1250
1250
|
var classnames$1 = {exports: {}};
|
|
1251
1251
|
|
|
@@ -1306,8 +1306,8 @@ var classnames$1 = {exports: {}};
|
|
|
1306
1306
|
}());
|
|
1307
1307
|
} (classnames$1));
|
|
1308
1308
|
|
|
1309
|
-
var classnamesExports = classnames$1.exports;
|
|
1310
|
-
var classNames$1 = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
1309
|
+
var classnamesExports$1 = classnames$1.exports;
|
|
1310
|
+
var classNames$1 = /*@__PURE__*/getDefaultExportFromCjs$1(classnamesExports$1);
|
|
1311
1311
|
|
|
1312
1312
|
var CAccordionContext = React$1.createContext({});
|
|
1313
1313
|
var CAccordion = React$1.forwardRef(function (_a, ref) {
|
|
@@ -1317,11 +1317,11 @@ var CAccordion = React$1.forwardRef(function (_a, ref) {
|
|
|
1317
1317
|
React$1.createElement(CAccordionContext.Provider, { value: { _activeItemKey: _activeItemKey, alwaysOpen: alwaysOpen, setActiveKey: setActiveKey } }, children)));
|
|
1318
1318
|
});
|
|
1319
1319
|
CAccordion.propTypes = {
|
|
1320
|
-
alwaysOpen: PropTypes.bool,
|
|
1321
|
-
activeItemKey: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
1322
|
-
children: PropTypes.node,
|
|
1323
|
-
className: PropTypes.string,
|
|
1324
|
-
flush: PropTypes.bool,
|
|
1320
|
+
alwaysOpen: PropTypes$1.bool,
|
|
1321
|
+
activeItemKey: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
1322
|
+
children: PropTypes$1.node,
|
|
1323
|
+
className: PropTypes$1.string,
|
|
1324
|
+
flush: PropTypes$1.bool,
|
|
1325
1325
|
};
|
|
1326
1326
|
CAccordion.displayName = 'CAccordion';
|
|
1327
1327
|
|
|
@@ -1341,9 +1341,9 @@ var CAccordionItem = React$1.forwardRef(function (_a, ref) {
|
|
|
1341
1341
|
React$1.createElement(CAccordionItemContext.Provider, { value: { setVisible: setVisible, visible: visible } }, children)));
|
|
1342
1342
|
});
|
|
1343
1343
|
CAccordionItem.propTypes = {
|
|
1344
|
-
children: PropTypes.node,
|
|
1345
|
-
className: PropTypes.string,
|
|
1346
|
-
itemKey: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
1344
|
+
children: PropTypes$1.node,
|
|
1345
|
+
className: PropTypes$1.string,
|
|
1346
|
+
itemKey: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
1347
1347
|
};
|
|
1348
1348
|
CAccordionItem.displayName = 'CAccordionItem';
|
|
1349
1349
|
|
|
@@ -1436,22 +1436,22 @@ var config = {
|
|
|
1436
1436
|
disabled: false
|
|
1437
1437
|
};
|
|
1438
1438
|
|
|
1439
|
-
var timeoutsShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
1440
|
-
enter: PropTypes.number,
|
|
1441
|
-
exit: PropTypes.number,
|
|
1442
|
-
appear: PropTypes.number
|
|
1439
|
+
var timeoutsShape = process.env.NODE_ENV !== 'production' ? PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.shape({
|
|
1440
|
+
enter: PropTypes$1.number,
|
|
1441
|
+
exit: PropTypes$1.number,
|
|
1442
|
+
appear: PropTypes$1.number
|
|
1443
1443
|
}).isRequired]) : null;
|
|
1444
|
-
var classNamesShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
1445
|
-
enter: PropTypes.string,
|
|
1446
|
-
exit: PropTypes.string,
|
|
1447
|
-
active: PropTypes.string
|
|
1448
|
-
}), PropTypes.shape({
|
|
1449
|
-
enter: PropTypes.string,
|
|
1450
|
-
enterDone: PropTypes.string,
|
|
1451
|
-
enterActive: PropTypes.string,
|
|
1452
|
-
exit: PropTypes.string,
|
|
1453
|
-
exitDone: PropTypes.string,
|
|
1454
|
-
exitActive: PropTypes.string
|
|
1444
|
+
var classNamesShape = process.env.NODE_ENV !== 'production' ? PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.shape({
|
|
1445
|
+
enter: PropTypes$1.string,
|
|
1446
|
+
exit: PropTypes$1.string,
|
|
1447
|
+
active: PropTypes$1.string
|
|
1448
|
+
}), PropTypes$1.shape({
|
|
1449
|
+
enter: PropTypes$1.string,
|
|
1450
|
+
enterDone: PropTypes$1.string,
|
|
1451
|
+
enterActive: PropTypes$1.string,
|
|
1452
|
+
exit: PropTypes$1.string,
|
|
1453
|
+
exitDone: PropTypes$1.string,
|
|
1454
|
+
exitActive: PropTypes$1.string
|
|
1455
1455
|
})]) : null;
|
|
1456
1456
|
|
|
1457
1457
|
var TransitionGroupContext = React$1.createContext(null);
|
|
@@ -1878,10 +1878,10 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1878
1878
|
* (see
|
|
1879
1879
|
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
1880
1880
|
*/
|
|
1881
|
-
nodeRef: PropTypes.shape({
|
|
1882
|
-
current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {
|
|
1881
|
+
nodeRef: PropTypes$1.shape({
|
|
1882
|
+
current: typeof Element === 'undefined' ? PropTypes$1.any : function (propValue, key, componentName, location, propFullName, secret) {
|
|
1883
1883
|
var value = propValue[key];
|
|
1884
|
-
return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
|
|
1884
|
+
return PropTypes$1.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
|
|
1885
1885
|
}
|
|
1886
1886
|
}),
|
|
1887
1887
|
|
|
@@ -1899,12 +1899,12 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1899
1899
|
* </Transition>
|
|
1900
1900
|
* ```
|
|
1901
1901
|
*/
|
|
1902
|
-
children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
|
|
1902
|
+
children: PropTypes$1.oneOfType([PropTypes$1.func.isRequired, PropTypes$1.element.isRequired]).isRequired,
|
|
1903
1903
|
|
|
1904
1904
|
/**
|
|
1905
1905
|
* Show the component; triggers the enter or exit states
|
|
1906
1906
|
*/
|
|
1907
|
-
in: PropTypes.bool,
|
|
1907
|
+
in: PropTypes$1.bool,
|
|
1908
1908
|
|
|
1909
1909
|
/**
|
|
1910
1910
|
* By default the child component is mounted immediately along with
|
|
@@ -1912,13 +1912,13 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1912
1912
|
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
1913
1913
|
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
1914
1914
|
*/
|
|
1915
|
-
mountOnEnter: PropTypes.bool,
|
|
1915
|
+
mountOnEnter: PropTypes$1.bool,
|
|
1916
1916
|
|
|
1917
1917
|
/**
|
|
1918
1918
|
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
1919
1919
|
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
1920
1920
|
*/
|
|
1921
|
-
unmountOnExit: PropTypes.bool,
|
|
1921
|
+
unmountOnExit: PropTypes$1.bool,
|
|
1922
1922
|
|
|
1923
1923
|
/**
|
|
1924
1924
|
* By default the child component does not perform the enter transition when
|
|
@@ -1931,17 +1931,17 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1931
1931
|
* > additional `.appear-*` classes, that way you can choose to style it
|
|
1932
1932
|
* > differently.
|
|
1933
1933
|
*/
|
|
1934
|
-
appear: PropTypes.bool,
|
|
1934
|
+
appear: PropTypes$1.bool,
|
|
1935
1935
|
|
|
1936
1936
|
/**
|
|
1937
1937
|
* Enable or disable enter transitions.
|
|
1938
1938
|
*/
|
|
1939
|
-
enter: PropTypes.bool,
|
|
1939
|
+
enter: PropTypes$1.bool,
|
|
1940
1940
|
|
|
1941
1941
|
/**
|
|
1942
1942
|
* Enable or disable exit transitions.
|
|
1943
1943
|
*/
|
|
1944
|
-
exit: PropTypes.bool,
|
|
1944
|
+
exit: PropTypes$1.bool,
|
|
1945
1945
|
|
|
1946
1946
|
/**
|
|
1947
1947
|
* The duration of the transition, in milliseconds.
|
|
@@ -1994,7 +1994,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1994
1994
|
* }}
|
|
1995
1995
|
* ```
|
|
1996
1996
|
*/
|
|
1997
|
-
addEndListener: PropTypes.func,
|
|
1997
|
+
addEndListener: PropTypes$1.func,
|
|
1998
1998
|
|
|
1999
1999
|
/**
|
|
2000
2000
|
* Callback fired before the "entering" status is applied. An extra parameter
|
|
@@ -2004,7 +2004,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2004
2004
|
*
|
|
2005
2005
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
2006
2006
|
*/
|
|
2007
|
-
onEnter: PropTypes.func,
|
|
2007
|
+
onEnter: PropTypes$1.func,
|
|
2008
2008
|
|
|
2009
2009
|
/**
|
|
2010
2010
|
* Callback fired after the "entering" status is applied. An extra parameter
|
|
@@ -2014,7 +2014,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2014
2014
|
*
|
|
2015
2015
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2016
2016
|
*/
|
|
2017
|
-
onEntering: PropTypes.func,
|
|
2017
|
+
onEntering: PropTypes$1.func,
|
|
2018
2018
|
|
|
2019
2019
|
/**
|
|
2020
2020
|
* Callback fired after the "entered" status is applied. An extra parameter
|
|
@@ -2024,7 +2024,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2024
2024
|
*
|
|
2025
2025
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
2026
2026
|
*/
|
|
2027
|
-
onEntered: PropTypes.func,
|
|
2027
|
+
onEntered: PropTypes$1.func,
|
|
2028
2028
|
|
|
2029
2029
|
/**
|
|
2030
2030
|
* Callback fired before the "exiting" status is applied.
|
|
@@ -2033,7 +2033,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2033
2033
|
*
|
|
2034
2034
|
* @type Function(node: HtmlElement) -> void
|
|
2035
2035
|
*/
|
|
2036
|
-
onExit: PropTypes.func,
|
|
2036
|
+
onExit: PropTypes$1.func,
|
|
2037
2037
|
|
|
2038
2038
|
/**
|
|
2039
2039
|
* Callback fired after the "exiting" status is applied.
|
|
@@ -2042,7 +2042,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2042
2042
|
*
|
|
2043
2043
|
* @type Function(node: HtmlElement) -> void
|
|
2044
2044
|
*/
|
|
2045
|
-
onExiting: PropTypes.func,
|
|
2045
|
+
onExiting: PropTypes$1.func,
|
|
2046
2046
|
|
|
2047
2047
|
/**
|
|
2048
2048
|
* Callback fired after the "exited" status is applied.
|
|
@@ -2051,7 +2051,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2051
2051
|
*
|
|
2052
2052
|
* @type Function(node: HtmlElement) -> void
|
|
2053
2053
|
*/
|
|
2054
|
-
onExited: PropTypes.func
|
|
2054
|
+
onExited: PropTypes$1.func
|
|
2055
2055
|
} : {}; // Name the function so it is clearer in the documentation
|
|
2056
2056
|
|
|
2057
2057
|
function noop() {}
|
|
@@ -2426,7 +2426,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
2426
2426
|
*
|
|
2427
2427
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2428
2428
|
*/
|
|
2429
|
-
onEnter: PropTypes.func,
|
|
2429
|
+
onEnter: PropTypes$1.func,
|
|
2430
2430
|
|
|
2431
2431
|
/**
|
|
2432
2432
|
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
|
@@ -2436,7 +2436,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
2436
2436
|
*
|
|
2437
2437
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2438
2438
|
*/
|
|
2439
|
-
onEntering: PropTypes.func,
|
|
2439
|
+
onEntering: PropTypes$1.func,
|
|
2440
2440
|
|
|
2441
2441
|
/**
|
|
2442
2442
|
* A `<Transition>` callback fired immediately after the 'enter' or
|
|
@@ -2446,7 +2446,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
2446
2446
|
*
|
|
2447
2447
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2448
2448
|
*/
|
|
2449
|
-
onEntered: PropTypes.func,
|
|
2449
|
+
onEntered: PropTypes$1.func,
|
|
2450
2450
|
|
|
2451
2451
|
/**
|
|
2452
2452
|
* A `<Transition>` callback fired immediately after the 'exit' class is
|
|
@@ -2456,7 +2456,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
2456
2456
|
*
|
|
2457
2457
|
* @type Function(node: HtmlElement)
|
|
2458
2458
|
*/
|
|
2459
|
-
onExit: PropTypes.func,
|
|
2459
|
+
onExit: PropTypes$1.func,
|
|
2460
2460
|
|
|
2461
2461
|
/**
|
|
2462
2462
|
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
|
@@ -2465,7 +2465,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
2465
2465
|
*
|
|
2466
2466
|
* @type Function(node: HtmlElement)
|
|
2467
2467
|
*/
|
|
2468
|
-
onExiting: PropTypes.func,
|
|
2468
|
+
onExiting: PropTypes$1.func,
|
|
2469
2469
|
|
|
2470
2470
|
/**
|
|
2471
2471
|
* A `<Transition>` callback fired immediately after the 'exit' classes
|
|
@@ -2475,7 +2475,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
2475
2475
|
*
|
|
2476
2476
|
* @type Function(node: HtmlElement)
|
|
2477
2477
|
*/
|
|
2478
|
-
onExited: PropTypes.func
|
|
2478
|
+
onExited: PropTypes$1.func
|
|
2479
2479
|
}) : {};
|
|
2480
2480
|
var CSSTransition$1 = CSSTransition;
|
|
2481
2481
|
|
|
@@ -4361,14 +4361,117 @@ var createPopper = /*#__PURE__*/popperGenerator({
|
|
|
4361
4361
|
defaultModifiers: defaultModifiers
|
|
4362
4362
|
}); // eslint-disable-next-line import/no-unused-modules
|
|
4363
4363
|
|
|
4364
|
+
var getTransitionDurationFromElement = function (element) {
|
|
4365
|
+
if (!element) {
|
|
4366
|
+
return 0;
|
|
4367
|
+
}
|
|
4368
|
+
// Get transition-duration of the element
|
|
4369
|
+
var _a = window.getComputedStyle(element), transitionDuration = _a.transitionDuration, transitionDelay = _a.transitionDelay;
|
|
4370
|
+
var floatTransitionDuration = Number.parseFloat(transitionDuration);
|
|
4371
|
+
var floatTransitionDelay = Number.parseFloat(transitionDelay);
|
|
4372
|
+
// Return 0 if element or transition duration is not found
|
|
4373
|
+
if (!floatTransitionDuration && !floatTransitionDelay) {
|
|
4374
|
+
return 0;
|
|
4375
|
+
}
|
|
4376
|
+
// If multiple durations are defined, take the first
|
|
4377
|
+
transitionDuration = transitionDuration.split(',')[0];
|
|
4378
|
+
transitionDelay = transitionDelay.split(',')[0];
|
|
4379
|
+
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * 1000;
|
|
4380
|
+
};
|
|
4381
|
+
|
|
4382
|
+
var execute = function (callback) {
|
|
4383
|
+
if (typeof callback === 'function') {
|
|
4384
|
+
callback();
|
|
4385
|
+
}
|
|
4386
|
+
};
|
|
4387
|
+
var triggerTransitionEnd = function (element) {
|
|
4388
|
+
element.dispatchEvent(new Event('transitionend'));
|
|
4389
|
+
};
|
|
4390
|
+
var executeAfterTransition = function (callback, transitionElement, waitForTransition) {
|
|
4391
|
+
if (waitForTransition === void 0) { waitForTransition = true; }
|
|
4392
|
+
if (!waitForTransition) {
|
|
4393
|
+
execute(callback);
|
|
4394
|
+
return;
|
|
4395
|
+
}
|
|
4396
|
+
var durationPadding = 5;
|
|
4397
|
+
var emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;
|
|
4398
|
+
var called = false;
|
|
4399
|
+
var handler = function (_a) {
|
|
4400
|
+
var target = _a.target;
|
|
4401
|
+
if (target !== transitionElement) {
|
|
4402
|
+
return;
|
|
4403
|
+
}
|
|
4404
|
+
called = true;
|
|
4405
|
+
transitionElement.removeEventListener('transitionend', handler);
|
|
4406
|
+
execute(callback);
|
|
4407
|
+
};
|
|
4408
|
+
transitionElement.addEventListener('transitionend', handler);
|
|
4409
|
+
setTimeout(function () {
|
|
4410
|
+
if (!called) {
|
|
4411
|
+
triggerTransitionEnd(transitionElement);
|
|
4412
|
+
}
|
|
4413
|
+
}, emulatedDuration);
|
|
4414
|
+
};
|
|
4415
|
+
|
|
4416
|
+
var isRTL = function (element) {
|
|
4417
|
+
if (typeof document !== 'undefined' && document.documentElement.dir === 'rtl') {
|
|
4418
|
+
return true;
|
|
4419
|
+
}
|
|
4420
|
+
if (element) {
|
|
4421
|
+
return element.closest('[dir="rtl"]') !== null;
|
|
4422
|
+
}
|
|
4423
|
+
return false;
|
|
4424
|
+
};
|
|
4425
|
+
|
|
4426
|
+
var getRTLPlacement = function (placement, element) {
|
|
4427
|
+
switch (placement) {
|
|
4428
|
+
case 'right': {
|
|
4429
|
+
return isRTL(element) ? 'left' : 'right';
|
|
4430
|
+
}
|
|
4431
|
+
case 'left': {
|
|
4432
|
+
return isRTL(element) ? 'right' : 'left';
|
|
4433
|
+
}
|
|
4434
|
+
default: {
|
|
4435
|
+
return placement;
|
|
4436
|
+
}
|
|
4437
|
+
}
|
|
4438
|
+
};
|
|
4439
|
+
|
|
4440
|
+
var isInViewport = function (element) {
|
|
4441
|
+
var rect = element.getBoundingClientRect();
|
|
4442
|
+
return (Math.floor(rect.top) >= 0 &&
|
|
4443
|
+
Math.floor(rect.left) >= 0 &&
|
|
4444
|
+
Math.floor(rect.bottom) <= (window.innerHeight || document.documentElement.clientHeight) &&
|
|
4445
|
+
Math.floor(rect.right) <= (window.innerWidth || document.documentElement.clientWidth));
|
|
4446
|
+
};
|
|
4447
|
+
|
|
4448
|
+
var isObjectInArray = function (array, item, ignore) {
|
|
4449
|
+
if (ignore === void 0) { ignore = []; }
|
|
4450
|
+
return array.some(function (_item) {
|
|
4451
|
+
var result = true;
|
|
4452
|
+
for (var key in item) {
|
|
4453
|
+
if (!ignore.includes(key) && item[key] !== _item[key]) {
|
|
4454
|
+
result = false;
|
|
4455
|
+
break;
|
|
4456
|
+
}
|
|
4457
|
+
}
|
|
4458
|
+
return result;
|
|
4459
|
+
});
|
|
4460
|
+
};
|
|
4461
|
+
|
|
4364
4462
|
var usePopper = function () {
|
|
4365
4463
|
var _popper = React$1.useRef();
|
|
4464
|
+
var el = React$1.useRef();
|
|
4366
4465
|
var initPopper = function (reference, popper, options) {
|
|
4367
4466
|
_popper.current = createPopper(reference, popper, options);
|
|
4467
|
+
el.current = popper;
|
|
4368
4468
|
};
|
|
4369
4469
|
var destroyPopper = function () {
|
|
4370
|
-
|
|
4371
|
-
|
|
4470
|
+
var popperInstance = _popper.current;
|
|
4471
|
+
if (popperInstance && el.current) {
|
|
4472
|
+
executeAfterTransition(function () {
|
|
4473
|
+
popperInstance.destroy();
|
|
4474
|
+
}, el.current);
|
|
4372
4475
|
}
|
|
4373
4476
|
_popper.current = undefined;
|
|
4374
4477
|
};
|
|
@@ -4443,12 +4546,12 @@ var CCollapse = React$1.forwardRef(function (_a, ref) {
|
|
|
4443
4546
|
}));
|
|
4444
4547
|
});
|
|
4445
4548
|
CCollapse.propTypes = {
|
|
4446
|
-
children: PropTypes.node,
|
|
4447
|
-
className: PropTypes.string,
|
|
4448
|
-
horizontal: PropTypes.bool,
|
|
4449
|
-
onHide: PropTypes.func,
|
|
4450
|
-
onShow: PropTypes.func,
|
|
4451
|
-
visible: PropTypes.bool,
|
|
4549
|
+
children: PropTypes$1.node,
|
|
4550
|
+
className: PropTypes$1.string,
|
|
4551
|
+
horizontal: PropTypes$1.bool,
|
|
4552
|
+
onHide: PropTypes$1.func,
|
|
4553
|
+
onShow: PropTypes$1.func,
|
|
4554
|
+
visible: PropTypes$1.bool,
|
|
4452
4555
|
};
|
|
4453
4556
|
CCollapse.displayName = 'CCollapse';
|
|
4454
4557
|
|
|
@@ -4459,8 +4562,8 @@ var CAccordionBody = React$1.forwardRef(function (_a, ref) {
|
|
|
4459
4562
|
React$1.createElement("div", __assign$1({ className: classNames$1('accordion-body', className) }, rest, { ref: ref }), children)));
|
|
4460
4563
|
});
|
|
4461
4564
|
CAccordionBody.propTypes = {
|
|
4462
|
-
children: PropTypes.node,
|
|
4463
|
-
className: PropTypes.string,
|
|
4565
|
+
children: PropTypes$1.node,
|
|
4566
|
+
className: PropTypes$1.string,
|
|
4464
4567
|
};
|
|
4465
4568
|
CAccordionBody.displayName = 'CAccordionBody';
|
|
4466
4569
|
|
|
@@ -4470,8 +4573,8 @@ var CAccordionButton = React$1.forwardRef(function (_a, ref) {
|
|
|
4470
4573
|
return (React$1.createElement("button", __assign$1({ type: "button", className: classNames$1('accordion-button', { collapsed: !visible }, className), "aria-expanded": !visible, onClick: function () { return setVisible(!visible); } }, rest, { ref: ref }), children));
|
|
4471
4574
|
});
|
|
4472
4575
|
CAccordionButton.propTypes = {
|
|
4473
|
-
children: PropTypes.node,
|
|
4474
|
-
className: PropTypes.string,
|
|
4576
|
+
children: PropTypes$1.node,
|
|
4577
|
+
className: PropTypes$1.string,
|
|
4475
4578
|
};
|
|
4476
4579
|
CAccordionButton.displayName = 'CAccordionButton';
|
|
4477
4580
|
|
|
@@ -4481,26 +4584,27 @@ var CAccordionHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
4481
4584
|
React$1.createElement(CAccordionButton, null, children)));
|
|
4482
4585
|
});
|
|
4483
4586
|
CAccordionHeader.propTypes = {
|
|
4484
|
-
children: PropTypes.node,
|
|
4485
|
-
className: PropTypes.string,
|
|
4587
|
+
children: PropTypes$1.node,
|
|
4588
|
+
className: PropTypes$1.string,
|
|
4486
4589
|
};
|
|
4487
4590
|
CAccordionHeader.displayName = 'CAccordionHeader';
|
|
4488
4591
|
|
|
4489
4592
|
var CCloseButton = React$1.forwardRef(function (_a, ref) {
|
|
4490
|
-
var className = _a.className, disabled = _a.disabled, white = _a.white, rest = __rest$1(_a, ["className", "disabled", "white"]);
|
|
4593
|
+
var className = _a.className, dark = _a.dark, disabled = _a.disabled, white = _a.white, rest = __rest$1(_a, ["className", "dark", "disabled", "white"]);
|
|
4491
4594
|
return (React$1.createElement("button", __assign$1({ type: "button", className: classNames$1('btn', 'btn-close', {
|
|
4492
4595
|
'btn-close-white': white,
|
|
4493
|
-
}, disabled, className), "aria-label": "Close", disabled: disabled }, rest, { ref: ref })));
|
|
4596
|
+
}, disabled, className), "aria-label": "Close", disabled: disabled }, (dark && { 'data-coreui-theme': 'dark' }), rest, { ref: ref })));
|
|
4494
4597
|
});
|
|
4495
4598
|
CCloseButton.propTypes = {
|
|
4496
|
-
className: PropTypes.string,
|
|
4497
|
-
|
|
4498
|
-
|
|
4599
|
+
className: PropTypes$1.string,
|
|
4600
|
+
dark: PropTypes$1.bool,
|
|
4601
|
+
disabled: PropTypes$1.bool,
|
|
4602
|
+
white: PropTypes$1.bool,
|
|
4499
4603
|
};
|
|
4500
4604
|
CCloseButton.displayName = 'CCloseButton';
|
|
4501
4605
|
|
|
4502
|
-
var colorPropType = PropTypes.oneOfType([
|
|
4503
|
-
PropTypes.oneOf([
|
|
4606
|
+
var colorPropType = PropTypes$1.oneOfType([
|
|
4607
|
+
PropTypes$1.oneOf([
|
|
4504
4608
|
'primary',
|
|
4505
4609
|
'secondary',
|
|
4506
4610
|
'success',
|
|
@@ -4510,13 +4614,13 @@ var colorPropType = PropTypes.oneOfType([
|
|
|
4510
4614
|
'dark',
|
|
4511
4615
|
'light',
|
|
4512
4616
|
]),
|
|
4513
|
-
PropTypes.string,
|
|
4617
|
+
PropTypes$1.string,
|
|
4514
4618
|
]);
|
|
4515
|
-
var fallbackPlacementsPropType = PropTypes.oneOfType([
|
|
4516
|
-
PropTypes.arrayOf(PropTypes.oneOf(['top', 'bottom', 'right', 'left']).isRequired),
|
|
4517
|
-
PropTypes.oneOf(['top', 'bottom', 'right', 'left']),
|
|
4619
|
+
var fallbackPlacementsPropType = PropTypes$1.oneOfType([
|
|
4620
|
+
PropTypes$1.arrayOf(PropTypes$1.oneOf(['top', 'bottom', 'right', 'left']).isRequired),
|
|
4621
|
+
PropTypes$1.oneOf(['top', 'bottom', 'right', 'left']),
|
|
4518
4622
|
]);
|
|
4519
|
-
var gradientsPropType = PropTypes.oneOf([
|
|
4623
|
+
var gradientsPropType = PropTypes$1.oneOf([
|
|
4520
4624
|
'primary-gradient',
|
|
4521
4625
|
'secondary-gradient',
|
|
4522
4626
|
'success-gradient',
|
|
@@ -4526,7 +4630,7 @@ var gradientsPropType = PropTypes.oneOf([
|
|
|
4526
4630
|
'dark-gradient',
|
|
4527
4631
|
'light-gradient',
|
|
4528
4632
|
]);
|
|
4529
|
-
var placementPropType = PropTypes.oneOf([
|
|
4633
|
+
var placementPropType = PropTypes$1.oneOf([
|
|
4530
4634
|
'auto',
|
|
4531
4635
|
'auto-start',
|
|
4532
4636
|
'auto-end',
|
|
@@ -4543,8 +4647,8 @@ var placementPropType = PropTypes.oneOf([
|
|
|
4543
4647
|
'left',
|
|
4544
4648
|
'left-end',
|
|
4545
4649
|
]);
|
|
4546
|
-
var shapePropType = PropTypes.oneOfType([
|
|
4547
|
-
PropTypes.oneOf([
|
|
4650
|
+
var shapePropType = PropTypes$1.oneOfType([
|
|
4651
|
+
PropTypes$1.oneOf([
|
|
4548
4652
|
'rounded',
|
|
4549
4653
|
'rounded-top',
|
|
4550
4654
|
'rounded-end',
|
|
@@ -4557,16 +4661,16 @@ var shapePropType = PropTypes.oneOfType([
|
|
|
4557
4661
|
'rounded-2',
|
|
4558
4662
|
'rounded-3',
|
|
4559
4663
|
]),
|
|
4560
|
-
PropTypes.string,
|
|
4664
|
+
PropTypes$1.string,
|
|
4561
4665
|
]);
|
|
4562
|
-
var textColorsPropType = PropTypes.oneOfType([
|
|
4666
|
+
var textColorsPropType = PropTypes$1.oneOfType([
|
|
4563
4667
|
colorPropType,
|
|
4564
|
-
PropTypes.oneOf(['white', 'muted']),
|
|
4565
|
-
PropTypes.string,
|
|
4668
|
+
PropTypes$1.oneOf(['white', 'muted']),
|
|
4669
|
+
PropTypes$1.string,
|
|
4566
4670
|
]);
|
|
4567
|
-
var triggerPropType = PropTypes.oneOfType([
|
|
4568
|
-
PropTypes.arrayOf(PropTypes.oneOf(['hover', 'focus', 'click']).isRequired),
|
|
4569
|
-
PropTypes.oneOf(['hover', 'focus', 'click']),
|
|
4671
|
+
var triggerPropType = PropTypes$1.oneOfType([
|
|
4672
|
+
PropTypes$1.arrayOf(PropTypes$1.oneOf(['hover', 'focus', 'click']).isRequired),
|
|
4673
|
+
PropTypes$1.oneOf(['hover', 'focus', 'click']),
|
|
4570
4674
|
]);
|
|
4571
4675
|
|
|
4572
4676
|
var CAlert = React$1.forwardRef(function (_a, ref) {
|
|
@@ -4585,13 +4689,13 @@ var CAlert = React$1.forwardRef(function (_a, ref) {
|
|
|
4585
4689
|
dismissible && React$1.createElement(CCloseButton, { onClick: function () { return setVisible(false); } }))); }));
|
|
4586
4690
|
});
|
|
4587
4691
|
CAlert.propTypes = {
|
|
4588
|
-
children: PropTypes.node,
|
|
4589
|
-
className: PropTypes.string,
|
|
4692
|
+
children: PropTypes$1.node,
|
|
4693
|
+
className: PropTypes$1.string,
|
|
4590
4694
|
color: colorPropType.isRequired,
|
|
4591
|
-
dismissible: PropTypes.bool,
|
|
4592
|
-
onClose: PropTypes.func,
|
|
4593
|
-
variant: PropTypes.string,
|
|
4594
|
-
visible: PropTypes.bool,
|
|
4695
|
+
dismissible: PropTypes$1.bool,
|
|
4696
|
+
onClose: PropTypes$1.func,
|
|
4697
|
+
variant: PropTypes$1.string,
|
|
4698
|
+
visible: PropTypes$1.bool,
|
|
4595
4699
|
};
|
|
4596
4700
|
CAlert.displayName = 'CAlert';
|
|
4597
4701
|
|
|
@@ -4600,9 +4704,9 @@ var CAlertHeading = React$1.forwardRef(function (_a, ref) {
|
|
|
4600
4704
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('alert-heading', className) }, rest, { ref: ref }), children));
|
|
4601
4705
|
});
|
|
4602
4706
|
CAlertHeading.propTypes = {
|
|
4603
|
-
children: PropTypes.node,
|
|
4604
|
-
className: PropTypes.string,
|
|
4605
|
-
component: PropTypes.elementType,
|
|
4707
|
+
children: PropTypes$1.node,
|
|
4708
|
+
className: PropTypes$1.string,
|
|
4709
|
+
component: PropTypes$1.elementType,
|
|
4606
4710
|
};
|
|
4607
4711
|
CAlertHeading.displayName = 'CAlertHeading';
|
|
4608
4712
|
|
|
@@ -4620,11 +4724,11 @@ var CLink = React$1.forwardRef(function (_a, ref) {
|
|
|
4620
4724
|
}), { disabled: disabled }, rest, { ref: ref }), children));
|
|
4621
4725
|
});
|
|
4622
4726
|
CLink.propTypes = {
|
|
4623
|
-
active: PropTypes.bool,
|
|
4624
|
-
children: PropTypes.node,
|
|
4625
|
-
className: PropTypes.string,
|
|
4626
|
-
component: PropTypes.elementType,
|
|
4627
|
-
disabled: PropTypes.bool,
|
|
4727
|
+
active: PropTypes$1.bool,
|
|
4728
|
+
children: PropTypes$1.node,
|
|
4729
|
+
className: PropTypes$1.string,
|
|
4730
|
+
component: PropTypes$1.elementType,
|
|
4731
|
+
disabled: PropTypes$1.bool,
|
|
4628
4732
|
};
|
|
4629
4733
|
CLink.displayName = 'CLink';
|
|
4630
4734
|
|
|
@@ -4633,8 +4737,8 @@ var CAlertLink = React$1.forwardRef(function (_a, ref) {
|
|
|
4633
4737
|
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('alert-link', className) }, rest, { ref: ref }), children));
|
|
4634
4738
|
});
|
|
4635
4739
|
CAlertLink.propTypes = {
|
|
4636
|
-
children: PropTypes.node,
|
|
4637
|
-
className: PropTypes.string,
|
|
4740
|
+
children: PropTypes$1.node,
|
|
4741
|
+
className: PropTypes$1.string,
|
|
4638
4742
|
};
|
|
4639
4743
|
CAlertLink.displayName = 'CAlertLink';
|
|
4640
4744
|
|
|
@@ -4651,13 +4755,13 @@ var CAvatar = React$1.forwardRef(function (_a, ref) {
|
|
|
4651
4755
|
status && React$1.createElement("span", { className: statusClassName })));
|
|
4652
4756
|
});
|
|
4653
4757
|
CAvatar.propTypes = {
|
|
4654
|
-
children: PropTypes.node,
|
|
4655
|
-
className: PropTypes.string,
|
|
4758
|
+
children: PropTypes$1.node,
|
|
4759
|
+
className: PropTypes$1.string,
|
|
4656
4760
|
color: colorPropType,
|
|
4657
4761
|
shape: shapePropType,
|
|
4658
|
-
size: PropTypes.string,
|
|
4659
|
-
src: PropTypes.string,
|
|
4660
|
-
status: PropTypes.string,
|
|
4762
|
+
size: PropTypes$1.string,
|
|
4763
|
+
src: PropTypes$1.string,
|
|
4764
|
+
status: PropTypes$1.string,
|
|
4661
4765
|
textColor: textColorsPropType,
|
|
4662
4766
|
};
|
|
4663
4767
|
CAvatar.displayName = 'CAvatar';
|
|
@@ -4671,8 +4775,8 @@ var CBackdrop = React$1.forwardRef(function (_a, ref) {
|
|
|
4671
4775
|
}) }, rest, { ref: forkedRef }))); }));
|
|
4672
4776
|
});
|
|
4673
4777
|
CBackdrop.propTypes = {
|
|
4674
|
-
className: PropTypes.string,
|
|
4675
|
-
visible: PropTypes.bool,
|
|
4778
|
+
className: PropTypes$1.string,
|
|
4779
|
+
visible: PropTypes$1.bool,
|
|
4676
4780
|
};
|
|
4677
4781
|
CBackdrop.displayName = 'CBackdrop';
|
|
4678
4782
|
|
|
@@ -4691,13 +4795,13 @@ var CBadge = React$1.forwardRef(function (_a, ref) {
|
|
|
4691
4795
|
_b), shape, className) }, rest, { ref: ref }), children));
|
|
4692
4796
|
});
|
|
4693
4797
|
CBadge.propTypes = {
|
|
4694
|
-
children: PropTypes.node,
|
|
4695
|
-
className: PropTypes.string,
|
|
4696
|
-
color: PropTypes.oneOfType([colorPropType, gradientsPropType]),
|
|
4697
|
-
component: PropTypes.string,
|
|
4698
|
-
position: PropTypes.oneOf(['top-start', 'top-end', 'bottom-end', 'bottom-start']),
|
|
4798
|
+
children: PropTypes$1.node,
|
|
4799
|
+
className: PropTypes$1.string,
|
|
4800
|
+
color: PropTypes$1.oneOfType([colorPropType, gradientsPropType]),
|
|
4801
|
+
component: PropTypes$1.string,
|
|
4802
|
+
position: PropTypes$1.oneOf(['top-start', 'top-end', 'bottom-end', 'bottom-start']),
|
|
4699
4803
|
shape: shapePropType,
|
|
4700
|
-
size: PropTypes.oneOf(['sm']),
|
|
4804
|
+
size: PropTypes$1.oneOf(['sm']),
|
|
4701
4805
|
textColor: textColorsPropType,
|
|
4702
4806
|
};
|
|
4703
4807
|
CBadge.displayName = 'CBadge';
|
|
@@ -4708,8 +4812,8 @@ var CBreadcrumb = React$1.forwardRef(function (_a, ref) {
|
|
|
4708
4812
|
React$1.createElement("ol", __assign$1({ className: classNames$1('breadcrumb', className) }, rest, { ref: ref }), children)));
|
|
4709
4813
|
});
|
|
4710
4814
|
CBreadcrumb.propTypes = {
|
|
4711
|
-
children: PropTypes.node,
|
|
4712
|
-
className: PropTypes.string,
|
|
4815
|
+
children: PropTypes$1.node,
|
|
4816
|
+
className: PropTypes$1.string,
|
|
4713
4817
|
};
|
|
4714
4818
|
CBreadcrumb.displayName = 'CBreadcrumb';
|
|
4715
4819
|
|
|
@@ -4720,27 +4824,27 @@ var CBreadcrumbItem = React$1.forwardRef(function (_a, ref) {
|
|
|
4720
4824
|
}, className) }, (active && { 'aria-current': 'page' }), rest, { ref: ref }), href ? React$1.createElement(CLink, { href: href }, children) : children));
|
|
4721
4825
|
});
|
|
4722
4826
|
CBreadcrumbItem.propTypes = {
|
|
4723
|
-
active: PropTypes.bool,
|
|
4724
|
-
children: PropTypes.node,
|
|
4725
|
-
className: PropTypes.string,
|
|
4726
|
-
href: PropTypes.string,
|
|
4827
|
+
active: PropTypes$1.bool,
|
|
4828
|
+
children: PropTypes$1.node,
|
|
4829
|
+
className: PropTypes$1.string,
|
|
4830
|
+
href: PropTypes$1.string,
|
|
4727
4831
|
};
|
|
4728
4832
|
CBreadcrumbItem.displayName = 'CBreadcrumbItem';
|
|
4729
4833
|
|
|
4730
4834
|
var CButton = React$1.forwardRef(function (_a, ref) {
|
|
4731
4835
|
var _b;
|
|
4732
4836
|
var children = _a.children, className = _a.className, _c = _a.color, color = _c === void 0 ? 'primary' : _c, _d = _a.component, component = _d === void 0 ? 'button' : _d, shape = _a.shape, size = _a.size, _e = _a.type, type = _e === void 0 ? 'button' : _e, variant = _a.variant, rest = __rest$1(_a, ["children", "className", "color", "component", "shape", "size", "type", "variant"]);
|
|
4733
|
-
return (React$1.createElement(CLink, __assign$1({ component: rest.href ? 'a' : component, type: type, className: classNames$1('btn', variant ? "btn-".concat(variant, "-").concat(color) : "btn-".concat(color), (_b = {}, _b["btn-".concat(size)] = size, _b), shape, className) }, rest, { ref: ref }), children));
|
|
4837
|
+
return (React$1.createElement(CLink, __assign$1({ component: rest.href ? 'a' : component }, (!rest.href && { type: type }), { className: classNames$1('btn', variant ? "btn-".concat(variant, "-").concat(color) : "btn-".concat(color), (_b = {}, _b["btn-".concat(size)] = size, _b), shape, className) }, rest, { ref: ref }), children));
|
|
4734
4838
|
});
|
|
4735
4839
|
CButton.propTypes = {
|
|
4736
|
-
children: PropTypes.node,
|
|
4737
|
-
className: PropTypes.string,
|
|
4840
|
+
children: PropTypes$1.node,
|
|
4841
|
+
className: PropTypes$1.string,
|
|
4738
4842
|
color: colorPropType,
|
|
4739
|
-
component: PropTypes.elementType,
|
|
4740
|
-
shape: PropTypes.string,
|
|
4741
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
4742
|
-
type: PropTypes.oneOf(['button', 'submit', 'reset']),
|
|
4743
|
-
variant: PropTypes.oneOf(['outline', 'ghost']),
|
|
4843
|
+
component: PropTypes$1.elementType,
|
|
4844
|
+
shape: PropTypes$1.string,
|
|
4845
|
+
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
4846
|
+
type: PropTypes$1.oneOf(['button', 'submit', 'reset']),
|
|
4847
|
+
variant: PropTypes$1.oneOf(['outline', 'ghost']),
|
|
4744
4848
|
};
|
|
4745
4849
|
CButton.displayName = 'CButton';
|
|
4746
4850
|
|
|
@@ -4749,8 +4853,8 @@ var CButtonToolbar = React$1.forwardRef(function (_a, ref) {
|
|
|
4749
4853
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('btn-toolbar', className) }, rest, { ref: ref }), children));
|
|
4750
4854
|
});
|
|
4751
4855
|
CButtonToolbar.propTypes = {
|
|
4752
|
-
children: PropTypes.node,
|
|
4753
|
-
className: PropTypes.string,
|
|
4856
|
+
children: PropTypes$1.node,
|
|
4857
|
+
className: PropTypes$1.string,
|
|
4754
4858
|
};
|
|
4755
4859
|
CButtonToolbar.displayName = 'CButtonToolbar';
|
|
4756
4860
|
|
|
@@ -4760,10 +4864,10 @@ var CButtonGroup = React$1.forwardRef(function (_a, ref) {
|
|
|
4760
4864
|
return (React$1.createElement("div", __assign$1({ className: classNames$1(vertical ? 'btn-group-vertical' : 'btn-group', (_b = {}, _b["btn-group-".concat(size)] = size, _b), className) }, rest, { ref: ref }), children));
|
|
4761
4865
|
});
|
|
4762
4866
|
CButtonGroup.propTypes = {
|
|
4763
|
-
children: PropTypes.node,
|
|
4764
|
-
className: PropTypes.string,
|
|
4765
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
4766
|
-
vertical: PropTypes.bool,
|
|
4867
|
+
children: PropTypes$1.node,
|
|
4868
|
+
className: PropTypes$1.string,
|
|
4869
|
+
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
4870
|
+
vertical: PropTypes$1.bool,
|
|
4767
4871
|
};
|
|
4768
4872
|
CButtonGroup.displayName = 'CButtonGroup';
|
|
4769
4873
|
|
|
@@ -4775,8 +4879,8 @@ var CCallout = React$1.forwardRef(function (_a, ref) {
|
|
|
4775
4879
|
_b), className) }, rest, { ref: ref }), children));
|
|
4776
4880
|
});
|
|
4777
4881
|
CCallout.propTypes = {
|
|
4778
|
-
children: PropTypes.node,
|
|
4779
|
-
className: PropTypes.string,
|
|
4882
|
+
children: PropTypes$1.node,
|
|
4883
|
+
className: PropTypes$1.string,
|
|
4780
4884
|
color: colorPropType,
|
|
4781
4885
|
};
|
|
4782
4886
|
CCallout.displayName = 'CCallout';
|
|
@@ -4790,10 +4894,10 @@ var CCard = React$1.forwardRef(function (_a, ref) {
|
|
|
4790
4894
|
_b), className) }, rest, { ref: ref }), children));
|
|
4791
4895
|
});
|
|
4792
4896
|
CCard.propTypes = {
|
|
4793
|
-
children: PropTypes.node,
|
|
4794
|
-
className: PropTypes.string,
|
|
4795
|
-
color: PropTypes.oneOfType([colorPropType, gradientsPropType]),
|
|
4796
|
-
textColor: PropTypes.string,
|
|
4897
|
+
children: PropTypes$1.node,
|
|
4898
|
+
className: PropTypes$1.string,
|
|
4899
|
+
color: PropTypes$1.oneOfType([colorPropType, gradientsPropType]),
|
|
4900
|
+
textColor: PropTypes$1.string,
|
|
4797
4901
|
};
|
|
4798
4902
|
CCard.displayName = 'CCard';
|
|
4799
4903
|
|
|
@@ -4802,8 +4906,8 @@ var CCardBody = React$1.forwardRef(function (_a, ref) {
|
|
|
4802
4906
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-body', className) }, rest, { ref: ref }), children));
|
|
4803
4907
|
});
|
|
4804
4908
|
CCardBody.propTypes = {
|
|
4805
|
-
children: PropTypes.node,
|
|
4806
|
-
className: PropTypes.string,
|
|
4909
|
+
children: PropTypes$1.node,
|
|
4910
|
+
className: PropTypes$1.string,
|
|
4807
4911
|
};
|
|
4808
4912
|
CCardBody.displayName = 'CCardBody';
|
|
4809
4913
|
|
|
@@ -4812,8 +4916,8 @@ var CCardFooter = React$1.forwardRef(function (_a, ref) {
|
|
|
4812
4916
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-footer', className) }, rest, { ref: ref }), children));
|
|
4813
4917
|
});
|
|
4814
4918
|
CCardFooter.propTypes = {
|
|
4815
|
-
children: PropTypes.node,
|
|
4816
|
-
className: PropTypes.string,
|
|
4919
|
+
children: PropTypes$1.node,
|
|
4920
|
+
className: PropTypes$1.string,
|
|
4817
4921
|
};
|
|
4818
4922
|
CCardFooter.displayName = 'CCardFooter';
|
|
4819
4923
|
|
|
@@ -4822,8 +4926,8 @@ var CCardGroup = React$1.forwardRef(function (_a, ref) {
|
|
|
4822
4926
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-group', className) }, rest, { ref: ref }), children));
|
|
4823
4927
|
});
|
|
4824
4928
|
CCardGroup.propTypes = {
|
|
4825
|
-
children: PropTypes.node,
|
|
4826
|
-
className: PropTypes.string,
|
|
4929
|
+
children: PropTypes$1.node,
|
|
4930
|
+
className: PropTypes$1.string,
|
|
4827
4931
|
};
|
|
4828
4932
|
CCardGroup.displayName = 'CCardGroup';
|
|
4829
4933
|
|
|
@@ -4832,9 +4936,9 @@ var CCardHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
4832
4936
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-header', className) }, rest, { ref: ref }), children));
|
|
4833
4937
|
});
|
|
4834
4938
|
CCardHeader.propTypes = {
|
|
4835
|
-
children: PropTypes.node,
|
|
4836
|
-
className: PropTypes.string,
|
|
4837
|
-
component: PropTypes.elementType,
|
|
4939
|
+
children: PropTypes$1.node,
|
|
4940
|
+
className: PropTypes$1.string,
|
|
4941
|
+
component: PropTypes$1.elementType,
|
|
4838
4942
|
};
|
|
4839
4943
|
CCardHeader.displayName = 'CCardHeader';
|
|
4840
4944
|
|
|
@@ -4843,10 +4947,10 @@ var CCardImage = React$1.forwardRef(function (_a, ref) {
|
|
|
4843
4947
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1(orientation ? "card-img-".concat(orientation) : 'card-img', className) }, rest, { ref: ref }), children));
|
|
4844
4948
|
});
|
|
4845
4949
|
CCardImage.propTypes = {
|
|
4846
|
-
children: PropTypes.node,
|
|
4847
|
-
className: PropTypes.string,
|
|
4848
|
-
component: PropTypes.elementType,
|
|
4849
|
-
orientation: PropTypes.oneOf(['top', 'bottom']),
|
|
4950
|
+
children: PropTypes$1.node,
|
|
4951
|
+
className: PropTypes$1.string,
|
|
4952
|
+
component: PropTypes$1.elementType,
|
|
4953
|
+
orientation: PropTypes$1.oneOf(['top', 'bottom']),
|
|
4850
4954
|
};
|
|
4851
4955
|
CCardImage.displayName = 'CCardImage';
|
|
4852
4956
|
|
|
@@ -4855,8 +4959,8 @@ var CCardImageOverlay = React$1.forwardRef(function (_a, ref) {
|
|
|
4855
4959
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-img-overlay', className) }, rest, { ref: ref }), children));
|
|
4856
4960
|
});
|
|
4857
4961
|
CCardImageOverlay.propTypes = {
|
|
4858
|
-
children: PropTypes.node,
|
|
4859
|
-
className: PropTypes.string,
|
|
4962
|
+
children: PropTypes$1.node,
|
|
4963
|
+
className: PropTypes$1.string,
|
|
4860
4964
|
};
|
|
4861
4965
|
CCardImageOverlay.displayName = 'CCardImageOverlay';
|
|
4862
4966
|
|
|
@@ -4865,8 +4969,8 @@ var CCardLink = React$1.forwardRef(function (_a, ref) {
|
|
|
4865
4969
|
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('card-link', className) }, rest, { ref: ref }), children));
|
|
4866
4970
|
});
|
|
4867
4971
|
CCardLink.propTypes = {
|
|
4868
|
-
children: PropTypes.node,
|
|
4869
|
-
className: PropTypes.string,
|
|
4972
|
+
children: PropTypes$1.node,
|
|
4973
|
+
className: PropTypes$1.string,
|
|
4870
4974
|
};
|
|
4871
4975
|
CCardLink.displayName = 'CCardLink';
|
|
4872
4976
|
|
|
@@ -4875,9 +4979,9 @@ var CCardSubtitle = React$1.forwardRef(function (_a, ref) {
|
|
|
4875
4979
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-subtitle', className) }, rest, { ref: ref }), children));
|
|
4876
4980
|
});
|
|
4877
4981
|
CCardSubtitle.propTypes = {
|
|
4878
|
-
children: PropTypes.node,
|
|
4879
|
-
className: PropTypes.string,
|
|
4880
|
-
component: PropTypes.elementType,
|
|
4982
|
+
children: PropTypes$1.node,
|
|
4983
|
+
className: PropTypes$1.string,
|
|
4984
|
+
component: PropTypes$1.elementType,
|
|
4881
4985
|
};
|
|
4882
4986
|
CCardSubtitle.displayName = 'CCardSubtitle';
|
|
4883
4987
|
|
|
@@ -4886,9 +4990,9 @@ var CCardText = React$1.forwardRef(function (_a, ref) {
|
|
|
4886
4990
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-text', className) }, rest, { ref: ref }), children));
|
|
4887
4991
|
});
|
|
4888
4992
|
CCardText.propTypes = {
|
|
4889
|
-
children: PropTypes.node,
|
|
4890
|
-
className: PropTypes.string,
|
|
4891
|
-
component: PropTypes.elementType,
|
|
4993
|
+
children: PropTypes$1.node,
|
|
4994
|
+
className: PropTypes$1.string,
|
|
4995
|
+
component: PropTypes$1.elementType,
|
|
4892
4996
|
};
|
|
4893
4997
|
CCardText.displayName = 'CCardText';
|
|
4894
4998
|
|
|
@@ -4897,58 +5001,12 @@ var CCardTitle = React$1.forwardRef(function (_a, ref) {
|
|
|
4897
5001
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-title', className) }, rest, { ref: ref }), children));
|
|
4898
5002
|
});
|
|
4899
5003
|
CCardTitle.propTypes = {
|
|
4900
|
-
children: PropTypes.node,
|
|
4901
|
-
className: PropTypes.string,
|
|
4902
|
-
component: PropTypes.elementType,
|
|
5004
|
+
children: PropTypes$1.node,
|
|
5005
|
+
className: PropTypes$1.string,
|
|
5006
|
+
component: PropTypes$1.elementType,
|
|
4903
5007
|
};
|
|
4904
5008
|
CCardTitle.displayName = 'CCardTitle';
|
|
4905
5009
|
|
|
4906
|
-
var isRTL = function (element) {
|
|
4907
|
-
if (typeof document !== 'undefined' && document.documentElement.dir === 'rtl') {
|
|
4908
|
-
return true;
|
|
4909
|
-
}
|
|
4910
|
-
if (element) {
|
|
4911
|
-
return element.closest('[dir="rtl"]') !== null;
|
|
4912
|
-
}
|
|
4913
|
-
return false;
|
|
4914
|
-
};
|
|
4915
|
-
|
|
4916
|
-
var getRTLPlacement = function (placement, element) {
|
|
4917
|
-
switch (placement) {
|
|
4918
|
-
case 'right': {
|
|
4919
|
-
return isRTL(element) ? 'left' : 'right';
|
|
4920
|
-
}
|
|
4921
|
-
case 'left': {
|
|
4922
|
-
return isRTL(element) ? 'right' : 'left';
|
|
4923
|
-
}
|
|
4924
|
-
default: {
|
|
4925
|
-
return placement;
|
|
4926
|
-
}
|
|
4927
|
-
}
|
|
4928
|
-
};
|
|
4929
|
-
|
|
4930
|
-
var isInViewport = function (element) {
|
|
4931
|
-
var rect = element.getBoundingClientRect();
|
|
4932
|
-
return (Math.floor(rect.top) >= 0 &&
|
|
4933
|
-
Math.floor(rect.left) >= 0 &&
|
|
4934
|
-
Math.floor(rect.bottom) <= (window.innerHeight || document.documentElement.clientHeight) &&
|
|
4935
|
-
Math.floor(rect.right) <= (window.innerWidth || document.documentElement.clientWidth));
|
|
4936
|
-
};
|
|
4937
|
-
|
|
4938
|
-
var isObjectInArray = function (array, item, ignore) {
|
|
4939
|
-
if (ignore === void 0) { ignore = []; }
|
|
4940
|
-
return array.some(function (_item) {
|
|
4941
|
-
var result = true;
|
|
4942
|
-
for (var key in item) {
|
|
4943
|
-
if (!ignore.includes(key) && item[key] !== _item[key]) {
|
|
4944
|
-
result = false;
|
|
4945
|
-
break;
|
|
4946
|
-
}
|
|
4947
|
-
}
|
|
4948
|
-
return result;
|
|
4949
|
-
});
|
|
4950
|
-
};
|
|
4951
|
-
|
|
4952
5010
|
var CCarouselContext = React$1.createContext({});
|
|
4953
5011
|
var CCarousel = React$1.forwardRef(function (_a, ref) {
|
|
4954
5012
|
var children = _a.children, _b = _a.activeIndex, activeIndex = _b === void 0 ? 0 : _b, className = _a.className, controls = _a.controls, dark = _a.dark, indicators = _a.indicators, _c = _a.interval, interval = _c === void 0 ? 5000 : _c, onSlid = _a.onSlid, onSlide = _a.onSlide, _d = _a.pause, pause = _d === void 0 ? 'hover' : _d, _e = _a.touch, touch = _e === void 0 ? true : _e, transition = _a.transition, _f = _a.wrap, wrap = _f === void 0 ? true : _f, rest = __rest$1(_a, ["children", "activeIndex", "className", "controls", "dark", "indicators", "interval", "onSlid", "onSlide", "pause", "touch", "transition", "wrap"]);
|
|
@@ -5053,17 +5111,18 @@ var CCarousel = React$1.forwardRef(function (_a, ref) {
|
|
|
5053
5111
|
setTouchPosition(touchDown);
|
|
5054
5112
|
};
|
|
5055
5113
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('carousel slide', {
|
|
5056
|
-
'carousel-dark': dark,
|
|
5057
5114
|
'carousel-fade': transition === 'crossfade',
|
|
5058
|
-
}, className), onMouseEnter: _pause, onMouseLeave: cycle }, (touch && { onTouchStart: handleTouchStart, onTouchMove: handleTouchMove }), rest, { ref: forkedRef }),
|
|
5115
|
+
}, className) }, (dark && { 'data-coreui-theme': 'dark' }), { onMouseEnter: _pause, onMouseLeave: cycle }, (touch && { onTouchStart: handleTouchStart, onTouchMove: handleTouchMove }), rest, { ref: forkedRef }),
|
|
5059
5116
|
React$1.createElement(CCarouselContext.Provider, { value: {
|
|
5060
5117
|
setAnimating: setAnimating,
|
|
5061
5118
|
setCustomInterval: setCustomInterval,
|
|
5062
5119
|
} },
|
|
5063
|
-
indicators && (React$1.createElement("
|
|
5064
|
-
return (React$1.createElement("
|
|
5120
|
+
indicators && (React$1.createElement("div", { className: "carousel-indicators" }, Array.from({ length: itemsNumber }, function (_, i) { return i; }).map(function (index) {
|
|
5121
|
+
return (React$1.createElement("button", __assign$1({ key: "indicator".concat(index), onClick: function () {
|
|
5065
5122
|
!animating && handleIndicatorClick(index);
|
|
5066
|
-
}, className:
|
|
5123
|
+
}, className: classNames$1({
|
|
5124
|
+
active: active === index
|
|
5125
|
+
}), "data-coreui-target": "" }, (active === index && { 'aria-current': true }), { "aria-label": "Slide ".concat(index + 1) })));
|
|
5067
5126
|
}))),
|
|
5068
5127
|
React$1.createElement("div", { className: "carousel-inner" }, React$1.Children.map(children, function (child, index) {
|
|
5069
5128
|
if (React$1.isValidElement(child)) {
|
|
@@ -5082,19 +5141,19 @@ var CCarousel = React$1.forwardRef(function (_a, ref) {
|
|
|
5082
5141
|
React$1.createElement("span", { className: "carousel-control-next-icon", "aria-label": "next" })))))));
|
|
5083
5142
|
});
|
|
5084
5143
|
CCarousel.propTypes = {
|
|
5085
|
-
activeIndex: PropTypes.number,
|
|
5086
|
-
children: PropTypes.node,
|
|
5087
|
-
className: PropTypes.string,
|
|
5088
|
-
controls: PropTypes.bool,
|
|
5089
|
-
dark: PropTypes.bool,
|
|
5090
|
-
indicators: PropTypes.bool,
|
|
5091
|
-
interval: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
|
|
5092
|
-
onSlid: PropTypes.func,
|
|
5093
|
-
onSlide: PropTypes.func,
|
|
5094
|
-
pause: PropTypes.oneOf([false, 'hover']),
|
|
5095
|
-
touch: PropTypes.bool,
|
|
5096
|
-
transition: PropTypes.oneOf(['slide', 'crossfade']),
|
|
5097
|
-
wrap: PropTypes.bool,
|
|
5144
|
+
activeIndex: PropTypes$1.number,
|
|
5145
|
+
children: PropTypes$1.node,
|
|
5146
|
+
className: PropTypes$1.string,
|
|
5147
|
+
controls: PropTypes$1.bool,
|
|
5148
|
+
dark: PropTypes$1.bool,
|
|
5149
|
+
indicators: PropTypes$1.bool,
|
|
5150
|
+
interval: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.number]),
|
|
5151
|
+
onSlid: PropTypes$1.func,
|
|
5152
|
+
onSlide: PropTypes$1.func,
|
|
5153
|
+
pause: PropTypes$1.oneOf([false, 'hover']),
|
|
5154
|
+
touch: PropTypes$1.bool,
|
|
5155
|
+
transition: PropTypes$1.oneOf(['slide', 'crossfade']),
|
|
5156
|
+
wrap: PropTypes$1.bool,
|
|
5098
5157
|
};
|
|
5099
5158
|
CCarousel.displayName = 'CCarousel';
|
|
5100
5159
|
|
|
@@ -5103,7 +5162,7 @@ var CCarouselCaption = React$1.forwardRef(function (_a, ref) {
|
|
|
5103
5162
|
return React$1.createElement("div", __assign$1({ className: classNames$1('carousel-caption', className) }, rest, { ref: ref }));
|
|
5104
5163
|
});
|
|
5105
5164
|
CCarouselCaption.propTypes = {
|
|
5106
|
-
className: PropTypes.string,
|
|
5165
|
+
className: PropTypes$1.string,
|
|
5107
5166
|
};
|
|
5108
5167
|
CCarouselCaption.displayName = 'CCarouselCaption';
|
|
5109
5168
|
|
|
@@ -5178,11 +5237,11 @@ var CCarouselItem = React$1.forwardRef(function (_a, ref) {
|
|
|
5178
5237
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('carousel-item', activeClassName, directionClassName, orderClassName, className), ref: forkedRef }, rest), children));
|
|
5179
5238
|
});
|
|
5180
5239
|
CCarouselItem.propTypes = {
|
|
5181
|
-
active: PropTypes.bool,
|
|
5182
|
-
children: PropTypes.node,
|
|
5183
|
-
className: PropTypes.string,
|
|
5184
|
-
direction: PropTypes.string,
|
|
5185
|
-
interval: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
|
|
5240
|
+
active: PropTypes$1.bool,
|
|
5241
|
+
children: PropTypes$1.node,
|
|
5242
|
+
className: PropTypes$1.string,
|
|
5243
|
+
direction: PropTypes$1.string,
|
|
5244
|
+
interval: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.number]),
|
|
5186
5245
|
};
|
|
5187
5246
|
CCarouselItem.displayName = 'CCarouselItem';
|
|
5188
5247
|
|
|
@@ -5191,8 +5250,8 @@ var CConditionalPortal = function (_a) {
|
|
|
5191
5250
|
return typeof window !== 'undefined' && portal ? (ReactDOM.createPortal(children, document.body)) : (React$1.createElement(React$1.Fragment, null, children));
|
|
5192
5251
|
};
|
|
5193
5252
|
CConditionalPortal.propTypes = {
|
|
5194
|
-
children: PropTypes.node,
|
|
5195
|
-
portal: PropTypes.bool.isRequired,
|
|
5253
|
+
children: PropTypes$1.node,
|
|
5254
|
+
portal: PropTypes$1.bool.isRequired,
|
|
5196
5255
|
};
|
|
5197
5256
|
CConditionalPortal.displayName = 'CConditionalPortal';
|
|
5198
5257
|
|
|
@@ -8490,12 +8549,60 @@ lib.useDeviceSelectors = useDeviceSelectors;
|
|
|
8490
8549
|
lib.useMobileOrientation = useMobileOrientation;
|
|
8491
8550
|
lib.withOrientationChange = withOrientationChange;
|
|
8492
8551
|
|
|
8552
|
+
var convertIsoWeekToDate = function (isoWeek) {
|
|
8553
|
+
var _a = isoWeek.split(/w/i), year = _a[0], week = _a[1];
|
|
8554
|
+
// Get date for 4th of January for year
|
|
8555
|
+
var date = new Date(Number(year), 0, 4);
|
|
8556
|
+
// Get previous Monday, add 7 days for each week after first
|
|
8557
|
+
date.setDate(date.getDate() - (date.getDay() || 7) + 1 + (Number(week) - 1) * 7);
|
|
8558
|
+
return date;
|
|
8559
|
+
};
|
|
8560
|
+
var convertToDateObject = function (date, selectionType) {
|
|
8561
|
+
// if (date === null) {
|
|
8562
|
+
// return null
|
|
8563
|
+
// }
|
|
8564
|
+
if (date instanceof Date) {
|
|
8565
|
+
return date;
|
|
8566
|
+
}
|
|
8567
|
+
if (selectionType === 'week') {
|
|
8568
|
+
return convertIsoWeekToDate(date);
|
|
8569
|
+
}
|
|
8570
|
+
return new Date(Date.parse(date));
|
|
8571
|
+
};
|
|
8493
8572
|
var createGroupsInArray = function (arr, numberOfGroups) {
|
|
8494
8573
|
var perGroup = Math.ceil(arr.length / numberOfGroups);
|
|
8495
8574
|
return Array.from({ length: numberOfGroups })
|
|
8496
8575
|
.fill('')
|
|
8497
8576
|
.map(function (_, i) { return arr.slice(i * perGroup, (i + 1) * perGroup); });
|
|
8498
8577
|
};
|
|
8578
|
+
var getCalendarDate = function (calendarDate, order, view) {
|
|
8579
|
+
if (order !== 0 && view === 'days') {
|
|
8580
|
+
return new Date(Date.UTC(calendarDate.getFullYear(), calendarDate.getMonth() + order, 1));
|
|
8581
|
+
}
|
|
8582
|
+
if (order !== 0 && view === 'months') {
|
|
8583
|
+
return new Date(Date.UTC(calendarDate.getFullYear() + order, calendarDate.getMonth(), 1));
|
|
8584
|
+
}
|
|
8585
|
+
if (order !== 0 && view === 'years') {
|
|
8586
|
+
return new Date(Date.UTC(calendarDate.getFullYear() + (12 * order), calendarDate.getMonth(), 1));
|
|
8587
|
+
}
|
|
8588
|
+
return calendarDate;
|
|
8589
|
+
};
|
|
8590
|
+
var getDateBySelectionType = function (date, selectionType) {
|
|
8591
|
+
if (date === null) {
|
|
8592
|
+
return null;
|
|
8593
|
+
}
|
|
8594
|
+
if (selectionType === 'week') {
|
|
8595
|
+
return "".concat(date.getFullYear(), "W").concat(getWeekNumber(date));
|
|
8596
|
+
}
|
|
8597
|
+
if (selectionType === 'month') {
|
|
8598
|
+
var monthNumber = "0".concat(date.getMonth() + 1).slice(-2);
|
|
8599
|
+
return "".concat(date.getFullYear(), "-").concat(monthNumber);
|
|
8600
|
+
}
|
|
8601
|
+
if (selectionType === 'year') {
|
|
8602
|
+
return "".concat(date.getFullYear());
|
|
8603
|
+
}
|
|
8604
|
+
return date;
|
|
8605
|
+
};
|
|
8499
8606
|
var getMonthsNames = function (locale) {
|
|
8500
8607
|
var months = [];
|
|
8501
8608
|
var d = new Date();
|
|
@@ -8555,6 +8662,11 @@ var getTrailingDays = function (year, month, leadingDays, monthDays) {
|
|
|
8555
8662
|
}
|
|
8556
8663
|
return dates;
|
|
8557
8664
|
};
|
|
8665
|
+
var getWeekNumber = function (date) {
|
|
8666
|
+
var week1 = new Date(date.getFullYear(), 0, 4);
|
|
8667
|
+
return (1 +
|
|
8668
|
+
Math.round(((date.getTime() - week1.getTime()) / 86400000 - 3 + ((week1.getDay() + 6) % 7)) / 7));
|
|
8669
|
+
};
|
|
8558
8670
|
var getMonthDetails = function (year, month, firstDayOfWeek) {
|
|
8559
8671
|
var daysPrevMonth = getLeadingDays(year, month, firstDayOfWeek);
|
|
8560
8672
|
var daysThisMonth = getMonthDays(year, month);
|
|
@@ -8563,9 +8675,14 @@ var getMonthDetails = function (year, month, firstDayOfWeek) {
|
|
|
8563
8675
|
var weeks = [];
|
|
8564
8676
|
days.forEach(function (day, index) {
|
|
8565
8677
|
if (index % 7 === 0 || weeks.length === 0) {
|
|
8566
|
-
weeks.push(
|
|
8678
|
+
weeks.push({
|
|
8679
|
+
days: [],
|
|
8680
|
+
});
|
|
8567
8681
|
}
|
|
8568
|
-
|
|
8682
|
+
if ((index + 1) % 7 === 0) {
|
|
8683
|
+
weeks[weeks.length - 1].weekNumber = getWeekNumber(day.date);
|
|
8684
|
+
}
|
|
8685
|
+
weeks[weeks.length - 1].days.push(day);
|
|
8569
8686
|
});
|
|
8570
8687
|
return weeks;
|
|
8571
8688
|
};
|
|
@@ -8610,15 +8727,6 @@ var isDateInRange = function (date, start, end) {
|
|
|
8610
8727
|
var isDateSelected = function (date, start, end) {
|
|
8611
8728
|
return (start && isSameDateAs(start, date)) || (end && isSameDateAs(end, date));
|
|
8612
8729
|
};
|
|
8613
|
-
var isEndDate = function (date, start, end) {
|
|
8614
|
-
return start && end && isSameDateAs(end, date) && start < end;
|
|
8615
|
-
};
|
|
8616
|
-
var isLastDayOfMonth = function (date) {
|
|
8617
|
-
var test = new Date(date.getTime());
|
|
8618
|
-
var month = test.getMonth();
|
|
8619
|
-
test.setDate(test.getDate() + 1);
|
|
8620
|
-
return test.getMonth() !== month;
|
|
8621
|
-
};
|
|
8622
8730
|
var isSameDateAs = function (date, date2) {
|
|
8623
8731
|
if (date instanceof Date && date2 instanceof Date) {
|
|
8624
8732
|
return (date.getDate() === date2.getDate() &&
|
|
@@ -8630,9 +8738,6 @@ var isSameDateAs = function (date, date2) {
|
|
|
8630
8738
|
}
|
|
8631
8739
|
return false;
|
|
8632
8740
|
};
|
|
8633
|
-
var isStartDate = function (date, start, end) {
|
|
8634
|
-
return start && end && isSameDateAs(start, date) && start < end;
|
|
8635
|
-
};
|
|
8636
8741
|
var isToday = function (date) {
|
|
8637
8742
|
var today = new Date();
|
|
8638
8743
|
return (date.getDate() === today.getDate() &&
|
|
@@ -8641,151 +8746,206 @@ var isToday = function (date) {
|
|
|
8641
8746
|
};
|
|
8642
8747
|
|
|
8643
8748
|
var Calendar = function (props) {
|
|
8644
|
-
var
|
|
8645
|
-
var _a = React$1.useState(
|
|
8646
|
-
var _b = React$1.useState([]), listOfMonths = _b[0], setListOfMonths = _b[1];
|
|
8647
|
-
React$1.useEffect(function () {
|
|
8648
|
-
if (addMonths !== 0) {
|
|
8649
|
-
setDate(new Date(calendarDate.getFullYear(), calendarDate.getMonth() + addMonths, 1));
|
|
8650
|
-
return;
|
|
8651
|
-
}
|
|
8652
|
-
setDate(calendarDate);
|
|
8653
|
-
}, [calendarDate]);
|
|
8749
|
+
var 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, onCalendarClick = props.onCalendarClick, onCalendarKeyDown = props.onCalendarKeyDown, onCalendarMouseEnter = props.onCalendarMouseEnter, onCalendarMouseLeave = props.onCalendarMouseLeave, selectAdjacementDays = props.selectAdjacementDays, selectEndDate = props.selectEndDate, selectionType = props.selectionType, showWeekNumber = props.showWeekNumber, showAdjacementDays = props.showAdjacementDays, startDate = props.startDate, view = props.view, weekdayFormat = props.weekdayFormat, weekNumbersLabel = props.weekNumbersLabel;
|
|
8750
|
+
var _a = React$1.useState([]), listOfMonths = _a[0], setListOfMonths = _a[1];
|
|
8654
8751
|
React$1.useEffect(function () {
|
|
8655
8752
|
setListOfMonths(createGroupsInArray(getMonthsNames(locale), 4));
|
|
8656
8753
|
}, []);
|
|
8657
|
-
var monthDetails = getMonthDetails(
|
|
8658
|
-
var listOfYears = createGroupsInArray(getYears(
|
|
8659
|
-
var weekDays = monthDetails[0];
|
|
8754
|
+
var monthDetails = getMonthDetails(calendarDate.getFullYear(), calendarDate.getMonth(), firstDayOfWeek);
|
|
8755
|
+
var listOfYears = createGroupsInArray(getYears(calendarDate.getFullYear()), 4);
|
|
8756
|
+
var weekDays = monthDetails[0].days;
|
|
8660
8757
|
return (React$1.createElement("table", null,
|
|
8661
8758
|
view === 'days' && (React$1.createElement("thead", null,
|
|
8662
|
-
React$1.createElement("tr", null,
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8759
|
+
React$1.createElement("tr", null,
|
|
8760
|
+
showWeekNumber && (React$1.createElement("th", { className: "calendar-cell" },
|
|
8761
|
+
React$1.createElement("div", { className: "calendar-header-cell-inner" }, weekNumbersLabel))),
|
|
8762
|
+
weekDays.map(function (_a, idx) {
|
|
8763
|
+
var date = _a.date;
|
|
8764
|
+
return (React$1.createElement("th", { key: idx, className: "calendar-cell" },
|
|
8765
|
+
React$1.createElement("div", { className: "calendar-header-cell-inner" }, typeof weekdayFormat === 'function'
|
|
8766
|
+
? weekdayFormat(date)
|
|
8767
|
+
: typeof weekdayFormat === 'string'
|
|
8768
|
+
? date.toLocaleDateString(locale, { weekday: weekdayFormat })
|
|
8769
|
+
: date.toLocaleDateString(locale, { weekday: 'long' }).slice(0, weekdayFormat))));
|
|
8770
|
+
})))),
|
|
8671
8771
|
React$1.createElement("tbody", null,
|
|
8672
8772
|
view === 'days' &&
|
|
8673
8773
|
monthDetails.map(function (week, index) {
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8774
|
+
var date = convertToDateObject(week.weekNumber === 0
|
|
8775
|
+
? "".concat(calendarDate.getFullYear(), "W53")
|
|
8776
|
+
: "".concat(calendarDate.getFullYear(), "W").concat(week.weekNumber), selectionType);
|
|
8777
|
+
var isDisabled = isDateDisabled(date, minDate, maxDate, disabledDates);
|
|
8778
|
+
return (React$1.createElement("tr", __assign$1({ className: classNames$1('calendar-row', {
|
|
8779
|
+
disabled: isDisabled,
|
|
8780
|
+
range: selectionType === 'week' && isDateInRange(date, startDate, endDate),
|
|
8781
|
+
'range-hover': selectionType === 'week' && hoverDate && selectEndDate
|
|
8782
|
+
? isDateInRange(date, startDate, hoverDate)
|
|
8783
|
+
: isDateInRange(date, hoverDate, endDate),
|
|
8784
|
+
selected: isDateSelected(date, startDate, endDate),
|
|
8785
|
+
}), key: index, tabIndex: selectionType === 'week' && !isDisabled ? 0 : -1 }, (selectionType === 'week' &&
|
|
8786
|
+
!isDisabled && {
|
|
8787
|
+
onBlur: function () { return onCalendarMouseLeave(); },
|
|
8788
|
+
onClick: function () { return onCalendarClick(date); },
|
|
8789
|
+
onFocus: function () { return onCalendarMouseEnter(date); },
|
|
8790
|
+
onKeyDown: function (event) { return onCalendarKeyDown(event, date); },
|
|
8791
|
+
onMouseEnter: function () { return onCalendarMouseEnter(date); },
|
|
8792
|
+
onMouseLeave: function () { return onCalendarMouseLeave(); },
|
|
8793
|
+
})),
|
|
8794
|
+
showWeekNumber && (React$1.createElement("th", { className: "calendar-cell-week-number" }, week.weekNumber === 0 ? 53 : week.weekNumber)),
|
|
8795
|
+
week.days.map(function (_a, idx) {
|
|
8796
|
+
var _b;
|
|
8797
|
+
var date = _a.date, month = _a.month;
|
|
8798
|
+
var isDisabled = isDateDisabled(date, minDate, maxDate, disabledDates);
|
|
8799
|
+
return month === 'current' || showAdjacementDays ? (React$1.createElement("td", __assign$1({ className: classNames$1('calendar-cell', __assign$1(__assign$1({}, (selectionType === 'day' && {
|
|
8800
|
+
clickable: month !== 'current' && selectAdjacementDays,
|
|
8801
|
+
disabled: isDisabled,
|
|
8802
|
+
'range-hover': month === 'current' &&
|
|
8803
|
+
(hoverDate && selectEndDate
|
|
8804
|
+
? isDateInRange(date, startDate, hoverDate)
|
|
8805
|
+
: isDateInRange(date, hoverDate, endDate)),
|
|
8806
|
+
range: month === 'current' && isDateInRange(date, startDate, endDate),
|
|
8807
|
+
selected: isDateSelected(date, startDate, endDate),
|
|
8808
|
+
})), (_b = {}, _b[month] = true, _b.today = month === 'current' && isToday(date), _b))), key: idx, tabIndex: selectionType === 'day' &&
|
|
8809
|
+
(month === 'current' || selectAdjacementDays) &&
|
|
8810
|
+
!isDisabled
|
|
8811
|
+
? 0
|
|
8812
|
+
: -1, title: date.toLocaleDateString(locale) }, (selectionType === 'day' &&
|
|
8813
|
+
(month === 'current' || selectAdjacementDays) && {
|
|
8814
|
+
onBlur: function () { return onCalendarMouseLeave(); },
|
|
8815
|
+
onClick: function () { return onCalendarClick(date); },
|
|
8816
|
+
onFocus: function () { return onCalendarMouseEnter(date); },
|
|
8817
|
+
onKeyDown: function (event) { return onCalendarKeyDown(event, date); },
|
|
8818
|
+
onMouseEnter: function () { return onCalendarMouseEnter(date); },
|
|
8819
|
+
onMouseLeave: function () { return onCalendarMouseLeave(); },
|
|
8820
|
+
}), (month !== 'current' &&
|
|
8821
|
+
!selectAdjacementDays && {
|
|
8822
|
+
onMouseEnter: function () { return onCalendarMouseLeave(); },
|
|
8823
|
+
})),
|
|
8824
|
+
React$1.createElement("div", { className: "calendar-cell-inner" }, typeof dayFormat === 'function'
|
|
8825
|
+
? dayFormat(date)
|
|
8826
|
+
: date.toLocaleDateString(locale, { day: dayFormat })))) : (React$1.createElement("td", { key: idx }));
|
|
8827
|
+
})));
|
|
8710
8828
|
}),
|
|
8711
8829
|
view === 'months' &&
|
|
8712
8830
|
listOfMonths.map(function (row, index) {
|
|
8713
8831
|
return (React$1.createElement("tr", { key: index }, row.map(function (month, idx) {
|
|
8714
|
-
|
|
8832
|
+
var monthNumber = index * 3 + idx;
|
|
8833
|
+
var date = new Date(Date.UTC(calendarDate.getFullYear(), monthNumber, 1));
|
|
8834
|
+
var isDisabled = isDateDisabled(date, minDate, maxDate, disabledDates);
|
|
8835
|
+
return (React$1.createElement("td", __assign$1({ className: classNames$1('calendar-cell', {
|
|
8836
|
+
disabled: isDisabled,
|
|
8837
|
+
selected: isDateSelected(date, startDate, endDate),
|
|
8838
|
+
'range-hover': selectionType === 'month' &&
|
|
8839
|
+
(hoverDate && selectEndDate
|
|
8840
|
+
? isDateInRange(date, startDate, hoverDate)
|
|
8841
|
+
: isDateInRange(date, hoverDate, endDate)),
|
|
8842
|
+
range: isDateInRange(date, startDate, endDate),
|
|
8843
|
+
}), key: idx, tabIndex: !isDisabled ? 0 : -1 }, (!isDisabled && {
|
|
8844
|
+
onBlur: function () { return onCalendarMouseLeave(); },
|
|
8845
|
+
onClick: function () { return onCalendarClick(date); },
|
|
8846
|
+
onFocus: function () { return onCalendarMouseEnter(date); },
|
|
8847
|
+
onKeyDown: function (event) { return onCalendarKeyDown(event, date); },
|
|
8848
|
+
onMouseEnter: function () { return onCalendarMouseEnter(date); },
|
|
8849
|
+
onMouseLeave: function () { return onCalendarMouseLeave(); },
|
|
8850
|
+
})),
|
|
8715
8851
|
React$1.createElement("div", { className: "calendar-cell-inner" }, month)));
|
|
8716
8852
|
})));
|
|
8717
8853
|
}),
|
|
8718
8854
|
view === 'years' &&
|
|
8719
8855
|
listOfYears.map(function (row, index) {
|
|
8720
8856
|
return (React$1.createElement("tr", { key: index }, row.map(function (year, idx) {
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8857
|
+
var date = new Date(Date.UTC(year, 0, 1));
|
|
8858
|
+
var isDisabled = isDateDisabled(date, minDate, maxDate, disabledDates);
|
|
8859
|
+
return (React$1.createElement("td", __assign$1({ className: classNames$1('calendar-cell year', {
|
|
8860
|
+
disabled: isDisabled,
|
|
8861
|
+
selected: isDateSelected(date, startDate, endDate),
|
|
8862
|
+
'range-hover': selectionType === 'year' &&
|
|
8863
|
+
(hoverDate && selectEndDate
|
|
8864
|
+
? isDateInRange(date, startDate, hoverDate)
|
|
8865
|
+
: isDateInRange(date, hoverDate, endDate)),
|
|
8866
|
+
range: isDateInRange(date, startDate, endDate),
|
|
8867
|
+
}), key: idx, tabIndex: !isDisabled ? 0 : -1 }, (!isDisabled && {
|
|
8868
|
+
onBlur: function () { return onCalendarMouseLeave(); },
|
|
8869
|
+
onClick: function () { return onCalendarClick(date); },
|
|
8870
|
+
onFocus: function () { return onCalendarMouseEnter(date); },
|
|
8871
|
+
onKeyDown: function (event) { return onCalendarKeyDown(event, date); },
|
|
8872
|
+
onMouseEnter: function () { return onCalendarMouseEnter(date); },
|
|
8873
|
+
onMouseLeave: function () { return onCalendarMouseLeave(); },
|
|
8874
|
+
})),
|
|
8726
8875
|
React$1.createElement("div", { className: "calendar-cell-inner" }, new Date(year, 0, 1).toLocaleDateString(locale, { year: 'numeric' }))));
|
|
8727
8876
|
})));
|
|
8728
8877
|
}))));
|
|
8729
8878
|
};
|
|
8730
8879
|
var Navigation = function (props) {
|
|
8731
|
-
var
|
|
8732
|
-
var _a = React$1.useState(), date = _a[0], setDate = _a[1];
|
|
8733
|
-
React$1.useEffect(function () {
|
|
8734
|
-
if (addMonths !== 0) {
|
|
8735
|
-
setDate(new Date(calendarDate.getFullYear(), calendarDate.getMonth() + addMonths, 1));
|
|
8736
|
-
return;
|
|
8737
|
-
}
|
|
8738
|
-
setDate(calendarDate);
|
|
8739
|
-
}, [calendarDate]);
|
|
8880
|
+
var calendarDate = props.calendarDate, locale = props.locale, navigation = props.navigation, navNextDoubleIcon = props.navNextDoubleIcon, navNextIcon = props.navNextIcon, navPrevDoubleIcon = props.navPrevDoubleIcon, navPrevIcon = props.navPrevIcon, navYearFirst = props.navYearFirst, onMonthClick = props.onMonthClick, onNavigationClick = props.onNavigationClick, onYearClick = props.onYearClick, view = props.view;
|
|
8740
8881
|
return (React$1.createElement("div", { className: "calendar-nav" },
|
|
8741
8882
|
navigation && (React$1.createElement("div", { className: "calendar-nav-prev" },
|
|
8742
8883
|
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" }))),
|
|
8743
8884
|
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" }))))),
|
|
8744
8885
|
React$1.createElement("div", __assign$1({ className: "calendar-nav-date" }, (navYearFirst && { style: { display: 'flex', justifyContent: 'center' } })),
|
|
8745
|
-
view === 'days' && (React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return navigation && onMonthClick(); } },
|
|
8746
|
-
React$1.createElement(CButton, __assign$1({ color: "transparent", size: "sm", onClick: function () { return navigation && onYearClick(); } }, (navYearFirst && { style: { order: '-1' } })),
|
|
8886
|
+
view === 'days' && (React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return navigation && onMonthClick(); } }, calendarDate && calendarDate.toLocaleDateString(locale, { month: 'long' }))),
|
|
8887
|
+
React$1.createElement(CButton, __assign$1({ color: "transparent", size: "sm", onClick: function () { return navigation && onYearClick(); } }, (navYearFirst && { style: { order: '-1' } })), calendarDate && calendarDate.toLocaleDateString(locale, { year: 'numeric' }))),
|
|
8747
8888
|
navigation && (React$1.createElement("div", { className: "calendar-nav-next" },
|
|
8748
8889
|
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" }))),
|
|
8749
8890
|
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" })))))));
|
|
8750
8891
|
};
|
|
8751
8892
|
var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
8752
|
-
var
|
|
8893
|
+
var _b;
|
|
8894
|
+
var startDate = _a.startDate, endDate = _a.endDate, _c = _a.calendarDate, calendarDate = _c === void 0 ? startDate || endDate || null : _c, _d = _a.calendars, calendars = _d === void 0 ? 1 : _d, className = _a.className, _e = _a.dayFormat, dayFormat = _e === void 0 ? 'numeric' : _e, disabledDates = _a.disabledDates, _f = _a.firstDayOfWeek, firstDayOfWeek = _f === void 0 ? 1 : _f, _g = _a.locale, locale = _g === void 0 ? 'default' : _g, maxDate = _a.maxDate, minDate = _a.minDate, _h = _a.navigation, navigation = _h === void 0 ? true : _h, navNextIcon = _a.navNextIcon, navNextDoubleIcon = _a.navNextDoubleIcon, navPrevIcon = _a.navPrevIcon, navPrevDoubleIcon = _a.navPrevDoubleIcon, navYearFirst = _a.navYearFirst, range = _a.range, _j = _a.selectAdjacementDays, selectAdjacementDays = _j === void 0 ? false : _j, selectEndDate = _a.selectEndDate, _k = _a.selectionType, selectionType = _k === void 0 ? 'day' : _k, _l = _a.showAdjacementDays, showAdjacementDays = _l === void 0 ? true : _l, _m = _a.showWeekNumber, showWeekNumber = _m === void 0 ? false : _m, _o = _a.weekdayFormat, weekdayFormat = _o === void 0 ? 2 : _o, weekNumbersLabel = _a.weekNumbersLabel, onCalendarDateChange = _a.onCalendarDateChange, onDateHover = _a.onDateHover, onEndDateChange = _a.onEndDateChange, onStartDateChange = _a.onStartDateChange, onSelectEndChange = _a.onSelectEndChange, onViewChanged = _a.onViewChanged;
|
|
8895
|
+
var calendarRef = React$1.useRef(null);
|
|
8896
|
+
var forkedRef = useForkedRef(ref, calendarRef);
|
|
8753
8897
|
var isInitialMount = React$1.useRef(true);
|
|
8754
|
-
var
|
|
8898
|
+
var _p = React$1.useState(null), _calendarDate = _p[0], setCalendarDate = _p[1];
|
|
8899
|
+
React$1.useEffect(function () {
|
|
8900
|
+
if (selectionType === 'day' || selectionType === 'week') {
|
|
8901
|
+
setView('days');
|
|
8902
|
+
return;
|
|
8903
|
+
}
|
|
8904
|
+
if (selectionType === 'month') {
|
|
8905
|
+
setView('months');
|
|
8906
|
+
return;
|
|
8907
|
+
}
|
|
8908
|
+
if (selectionType === 'year') {
|
|
8909
|
+
setView('years');
|
|
8910
|
+
return;
|
|
8911
|
+
}
|
|
8912
|
+
}, [selectionType]);
|
|
8755
8913
|
React$1.useEffect(function () {
|
|
8756
8914
|
if (calendarDate === null) {
|
|
8757
8915
|
setCalendarDate(new Date());
|
|
8758
8916
|
return;
|
|
8759
8917
|
}
|
|
8760
8918
|
if (calendarDate) {
|
|
8761
|
-
var date =
|
|
8919
|
+
var date = convertToDateObject(calendarDate, selectionType);
|
|
8762
8920
|
!isSameDateAs(_calendarDate, date) && setCalendarDate(date);
|
|
8763
8921
|
}
|
|
8764
8922
|
}, [calendarDate]);
|
|
8765
|
-
var
|
|
8923
|
+
var _q = useStateWithCallback(startDate ? convertToDateObject(startDate, selectionType) : null, function () {
|
|
8924
|
+
return onStartDateChange && onStartDateChange(getDateBySelectionType(_startDate, selectionType));
|
|
8925
|
+
}, !isInitialMount.current), _startDate = _q[0], setStartDate = _q[1];
|
|
8766
8926
|
React$1.useEffect(function () {
|
|
8767
|
-
var date = startDate ?
|
|
8927
|
+
var date = startDate ? convertToDateObject(startDate, selectionType) : null;
|
|
8768
8928
|
if (!isSameDateAs(date, _startDate)) {
|
|
8769
8929
|
setStartDate(date);
|
|
8770
8930
|
}
|
|
8771
8931
|
}, [startDate]);
|
|
8772
|
-
var
|
|
8932
|
+
var _r = useStateWithCallback(endDate ? convertToDateObject(endDate, selectionType) : null, function () { return onEndDateChange && onEndDateChange(getDateBySelectionType(_endDate, selectionType)); }, !isInitialMount.current), _endDate = _r[0], setEndDate = _r[1];
|
|
8773
8933
|
React$1.useEffect(function () {
|
|
8774
|
-
var date = endDate ?
|
|
8934
|
+
var date = endDate ? convertToDateObject(endDate, selectionType) : null;
|
|
8775
8935
|
if (!isSameDateAs(date, _endDate)) {
|
|
8776
8936
|
setEndDate(date);
|
|
8777
8937
|
}
|
|
8778
8938
|
}, [endDate]);
|
|
8779
|
-
var
|
|
8780
|
-
var
|
|
8939
|
+
var _s = React$1.useState(null), _hoverDate = _s[0], setHoverDate = _s[1];
|
|
8940
|
+
var _t = React$1.useState(maxDate ? convertToDateObject(maxDate, selectionType) : null), _maxDate = _t[0], setMaxDate = _t[1];
|
|
8781
8941
|
React$1.useEffect(function () {
|
|
8782
|
-
maxDate && setMaxDate(
|
|
8942
|
+
maxDate && setMaxDate(convertToDateObject(maxDate, selectionType));
|
|
8783
8943
|
}, [maxDate]);
|
|
8784
|
-
var
|
|
8944
|
+
var _u = React$1.useState(minDate ? convertToDateObject(minDate, selectionType) : null), _minDate = _u[0], setMinDate = _u[1];
|
|
8785
8945
|
React$1.useEffect(function () {
|
|
8786
|
-
minDate && setMinDate(
|
|
8946
|
+
minDate && setMinDate(convertToDateObject(minDate, selectionType));
|
|
8787
8947
|
}, [minDate]);
|
|
8788
|
-
var
|
|
8948
|
+
var _v = useStateWithCallback(selectEndDate, onSelectEndChange), _selectEndDate = _v[0], setSelectEndDate = _v[1];
|
|
8789
8949
|
React$1.useEffect(function () {
|
|
8790
8950
|
setSelectEndDate(selectEndDate);
|
|
8791
8951
|
}, [selectEndDate]);
|
|
@@ -8795,7 +8955,7 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
8795
8955
|
onSelectEndChange &&
|
|
8796
8956
|
onSelectEndChange(_selectEndDate);
|
|
8797
8957
|
}, [_selectEndDate]);
|
|
8798
|
-
var
|
|
8958
|
+
var _w = useStateWithCallback('days', onViewChanged), view = _w[0], setView = _w[1];
|
|
8799
8959
|
React$1.useEffect(function () {
|
|
8800
8960
|
isInitialMount.current = false;
|
|
8801
8961
|
}, []);
|
|
@@ -8813,12 +8973,24 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
8813
8973
|
setCalendarDate(d);
|
|
8814
8974
|
onCalendarDateChange && onCalendarDateChange(d);
|
|
8815
8975
|
};
|
|
8816
|
-
var
|
|
8976
|
+
var handleCalendarClick = function (date, index) {
|
|
8817
8977
|
if (isDateDisabled(date, _minDate, _maxDate, disabledDates)) {
|
|
8818
8978
|
return;
|
|
8819
8979
|
}
|
|
8820
8980
|
var _date = new Date(date);
|
|
8821
|
-
|
|
8981
|
+
if (view === 'days') {
|
|
8982
|
+
setCalendarDate(index ? new Date(_date.setMonth(_date.getMonth() - index)) : _date);
|
|
8983
|
+
}
|
|
8984
|
+
if (view === 'months' && selectionType !== 'month') {
|
|
8985
|
+
setCalendarDate(index ? new Date(_date.setMonth(_date.getMonth() - index)) : _date);
|
|
8986
|
+
setView('days');
|
|
8987
|
+
return;
|
|
8988
|
+
}
|
|
8989
|
+
if (view === 'years' && selectionType !== 'year') {
|
|
8990
|
+
setCalendarDate(index ? new Date(_date.setFullYear(_date.getFullYear() - index)) : _date);
|
|
8991
|
+
setView('months');
|
|
8992
|
+
return;
|
|
8993
|
+
}
|
|
8822
8994
|
if (range) {
|
|
8823
8995
|
if (_selectEndDate) {
|
|
8824
8996
|
setSelectEndDate(false);
|
|
@@ -8851,31 +9023,88 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
8851
9023
|
}
|
|
8852
9024
|
setStartDate(date);
|
|
8853
9025
|
};
|
|
8854
|
-
var
|
|
9026
|
+
var handleCalendarKeyDown = function (event, date, index) {
|
|
8855
9027
|
if (event.code === 'Space' || event.key === 'Enter') {
|
|
8856
9028
|
event.preventDefault();
|
|
8857
|
-
|
|
9029
|
+
handleCalendarClick(date, index);
|
|
9030
|
+
}
|
|
9031
|
+
if (event.key === 'ArrowRight' ||
|
|
9032
|
+
event.key === 'ArrowLeft' ||
|
|
9033
|
+
event.key === 'ArrowUp' ||
|
|
9034
|
+
event.key === 'ArrowDown') {
|
|
9035
|
+
event.preventDefault();
|
|
9036
|
+
if (maxDate &&
|
|
9037
|
+
date >= convertToDateObject(maxDate, selectionType) &&
|
|
9038
|
+
(event.key === 'ArrowRight' || event.key === 'ArrowDown')) {
|
|
9039
|
+
return;
|
|
9040
|
+
}
|
|
9041
|
+
if (minDate &&
|
|
9042
|
+
date <= convertToDateObject(minDate, selectionType) &&
|
|
9043
|
+
(event.key === 'ArrowLeft' || event.key === 'ArrowUp')) {
|
|
9044
|
+
return;
|
|
9045
|
+
}
|
|
9046
|
+
var element_1 = event.target;
|
|
9047
|
+
if (selectionType === 'week' && element_1.tabIndex === -1) {
|
|
9048
|
+
element_1 = element_1.closest('tr[tabindex="0"]');
|
|
9049
|
+
}
|
|
9050
|
+
var list_1 = [].concat.apply([], Element.prototype.querySelectorAll.call(calendarRef.current, 'td[tabindex="0"], tr[tabindex="0"]'));
|
|
9051
|
+
var index_1 = list_1.indexOf(element_1);
|
|
9052
|
+
var first = index_1 === 0;
|
|
9053
|
+
var last = index_1 === list_1.length - 1;
|
|
9054
|
+
var toBoundary = {
|
|
9055
|
+
start: index_1,
|
|
9056
|
+
end: list_1.length - (index_1 + 1),
|
|
9057
|
+
};
|
|
9058
|
+
var gap_1 = {
|
|
9059
|
+
ArrowRight: 1,
|
|
9060
|
+
ArrowLeft: -1,
|
|
9061
|
+
ArrowUp: selectionType === 'week' && view === 'days' ? -1 : view === 'days' ? -7 : -3,
|
|
9062
|
+
ArrowDown: selectionType === 'week' && view === 'days' ? 1 : view === 'days' ? 7 : 3,
|
|
9063
|
+
};
|
|
9064
|
+
if ((event.key === 'ArrowRight' && last) ||
|
|
9065
|
+
(event.key === 'ArrowDown' && toBoundary['end'] < gap_1['ArrowDown']) ||
|
|
9066
|
+
(event.key === 'ArrowLeft' && first) ||
|
|
9067
|
+
(event.key === 'ArrowUp' && toBoundary['start'] < Math.abs(gap_1['ArrowUp']))) {
|
|
9068
|
+
if (view === 'days') {
|
|
9069
|
+
setCalendarPage(0, event.key === 'ArrowRight' || event.key === 'ArrowDown' ? 1 : -1);
|
|
9070
|
+
}
|
|
9071
|
+
if (view === 'months') {
|
|
9072
|
+
setCalendarPage(event.key === 'ArrowRight' || event.key === 'ArrowDown' ? 1 : -1);
|
|
9073
|
+
}
|
|
9074
|
+
if (view === 'years') {
|
|
9075
|
+
setCalendarPage(event.key === 'ArrowRight' || event.key === 'ArrowDown' ? 10 : -10);
|
|
9076
|
+
}
|
|
9077
|
+
setTimeout(function () {
|
|
9078
|
+
var _a;
|
|
9079
|
+
var _list = [].concat.apply([], Element.prototype.querySelectorAll.call((_a = element_1.parentNode) === null || _a === void 0 ? void 0 : _a.parentNode, 'td[tabindex="0"], tr[tabindex="0"]'));
|
|
9080
|
+
if (_list.length && event.key === 'ArrowRight') {
|
|
9081
|
+
_list[0].focus();
|
|
9082
|
+
}
|
|
9083
|
+
if (_list.length && event.key === 'ArrowLeft') {
|
|
9084
|
+
_list[_list.length - 1].focus();
|
|
9085
|
+
}
|
|
9086
|
+
if (_list.length && event.key === 'ArrowDown') {
|
|
9087
|
+
_list[gap_1['ArrowDown'] - (list_1.length - index_1)].focus();
|
|
9088
|
+
}
|
|
9089
|
+
if (_list.length && event.key === 'ArrowUp') {
|
|
9090
|
+
_list[_list.length - (Math.abs(gap_1['ArrowUp']) + 1 - (index_1 + 1))].focus();
|
|
9091
|
+
}
|
|
9092
|
+
}, 1);
|
|
9093
|
+
return;
|
|
9094
|
+
}
|
|
9095
|
+
list_1[index_1 + gap_1[event.key]].focus();
|
|
8858
9096
|
}
|
|
8859
9097
|
};
|
|
8860
|
-
var
|
|
9098
|
+
var handleCalendarMouseEnter = function (date) {
|
|
8861
9099
|
if (isDateDisabled(date, _minDate, _maxDate, disabledDates)) {
|
|
8862
9100
|
return;
|
|
8863
9101
|
}
|
|
8864
9102
|
setHoverDate(date);
|
|
8865
|
-
|
|
9103
|
+
date && onDateHover && onDateHover(getDateBySelectionType(date, selectionType));
|
|
8866
9104
|
};
|
|
8867
|
-
var
|
|
9105
|
+
var handleCalendarMouseLeave = function () {
|
|
8868
9106
|
setHoverDate(null);
|
|
8869
|
-
|
|
8870
|
-
};
|
|
8871
|
-
var handleMonthClick = function (month) {
|
|
8872
|
-
setCalendarPage(0, 0, month);
|
|
8873
|
-
setView('days');
|
|
8874
|
-
};
|
|
8875
|
-
var handleMonthKeyDown = function (event, month) {
|
|
8876
|
-
if (event.code === 'Space' || event.key === 'Enter') {
|
|
8877
|
-
handleMonthClick(month);
|
|
8878
|
-
}
|
|
9107
|
+
onDateHover && onDateHover(null);
|
|
8879
9108
|
};
|
|
8880
9109
|
var handleNavigationOnClick = function (direction, double) {
|
|
8881
9110
|
if (double === void 0) { double = false; }
|
|
@@ -8904,56 +9133,56 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
8904
9133
|
return;
|
|
8905
9134
|
}
|
|
8906
9135
|
};
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
Array.from({ length: calendars }, function (_, index) { return (React$1.createElement("div", { className: classNames$1('calendar', view), key: index, ref: ref },
|
|
8918
|
-
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 }),
|
|
8919
|
-
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 }))); })));
|
|
9136
|
+
return (React$1.createElement("div", { className: classNames$1('calendars', (_b = {},
|
|
9137
|
+
_b["select-".concat(selectionType)] = selectionType && view === 'days',
|
|
9138
|
+
_b['show-week-numbers'] = showWeekNumber,
|
|
9139
|
+
_b), className), ref: forkedRef }, _calendarDate &&
|
|
9140
|
+
Array.from({ length: calendars }, function (_, index) {
|
|
9141
|
+
var calendarDate = getCalendarDate(_calendarDate, index, view);
|
|
9142
|
+
return (React$1.createElement("div", { className: classNames$1('calendar', view), key: index },
|
|
9143
|
+
React$1.createElement(Navigation, { 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 }),
|
|
9144
|
+
React$1.createElement(Calendar, { calendarDate: calendarDate, dayFormat: dayFormat, disabledDates: disabledDates, endDate: _endDate, firstDayOfWeek: firstDayOfWeek, hoverDate: _hoverDate, locale: locale, maxDate: _maxDate, minDate: _minDate, onCalendarClick: function (date) { return handleCalendarClick(date, index); }, onCalendarKeyDown: function (event, date) { return handleCalendarKeyDown(event, date, index); }, onCalendarMouseEnter: handleCalendarMouseEnter, onCalendarMouseLeave: handleCalendarMouseLeave, order: index, selectAdjacementDays: selectAdjacementDays, selectEndDate: _selectEndDate, selectionType: selectionType, showAdjacementDays: showAdjacementDays, showWeekNumber: showWeekNumber, startDate: _startDate, view: view, weekdayFormat: weekdayFormat, weekNumbersLabel: weekNumbersLabel })));
|
|
9145
|
+
})));
|
|
8920
9146
|
});
|
|
8921
9147
|
CCalendar.propTypes = {
|
|
8922
|
-
className: PropTypes.string,
|
|
8923
|
-
calendarDate: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
|
|
8924
|
-
calendars: PropTypes.number,
|
|
8925
|
-
dayFormat: PropTypes.oneOfType([
|
|
8926
|
-
PropTypes.func,
|
|
8927
|
-
PropTypes.oneOf(['2-digit', 'numeric']),
|
|
9148
|
+
className: PropTypes$1.string,
|
|
9149
|
+
calendarDate: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]),
|
|
9150
|
+
calendars: PropTypes$1.number,
|
|
9151
|
+
dayFormat: PropTypes$1.oneOfType([
|
|
9152
|
+
PropTypes$1.func,
|
|
9153
|
+
PropTypes$1.oneOf(['2-digit', 'numeric']),
|
|
8928
9154
|
]),
|
|
8929
|
-
disabledDates: PropTypes.array,
|
|
8930
|
-
endDate: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
|
|
8931
|
-
firstDayOfWeek: PropTypes.number,
|
|
8932
|
-
locale: PropTypes.string,
|
|
8933
|
-
maxDate: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
|
|
8934
|
-
minDate: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
|
|
8935
|
-
navigation: PropTypes.bool,
|
|
8936
|
-
navNextIcon: PropTypes.node,
|
|
8937
|
-
navNextDoubleIcon: PropTypes.node,
|
|
8938
|
-
navPrevIcon: PropTypes.node,
|
|
8939
|
-
navPrevDoubleIcon: PropTypes.node,
|
|
8940
|
-
navYearFirst: PropTypes.bool,
|
|
8941
|
-
range: PropTypes.bool,
|
|
8942
|
-
selectAdjacementDays: PropTypes.bool,
|
|
8943
|
-
selectEndDate: PropTypes.bool,
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
PropTypes.
|
|
9155
|
+
disabledDates: PropTypes$1.array,
|
|
9156
|
+
endDate: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]),
|
|
9157
|
+
firstDayOfWeek: PropTypes$1.number,
|
|
9158
|
+
locale: PropTypes$1.string,
|
|
9159
|
+
maxDate: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]),
|
|
9160
|
+
minDate: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]),
|
|
9161
|
+
navigation: PropTypes$1.bool,
|
|
9162
|
+
navNextIcon: PropTypes$1.node,
|
|
9163
|
+
navNextDoubleIcon: PropTypes$1.node,
|
|
9164
|
+
navPrevIcon: PropTypes$1.node,
|
|
9165
|
+
navPrevDoubleIcon: PropTypes$1.node,
|
|
9166
|
+
navYearFirst: PropTypes$1.bool,
|
|
9167
|
+
range: PropTypes$1.bool,
|
|
9168
|
+
selectAdjacementDays: PropTypes$1.bool,
|
|
9169
|
+
selectEndDate: PropTypes$1.bool,
|
|
9170
|
+
selectionType: PropTypes$1.oneOf(['day', 'week', 'month', 'year']),
|
|
9171
|
+
showAdjacementDays: PropTypes$1.bool,
|
|
9172
|
+
showWeekNumber: PropTypes$1.bool,
|
|
9173
|
+
startDate: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]),
|
|
9174
|
+
weekdayFormat: PropTypes$1.oneOfType([
|
|
9175
|
+
PropTypes$1.func,
|
|
9176
|
+
PropTypes$1.number,
|
|
9177
|
+
PropTypes$1.oneOf(['long', 'narrow', 'short']),
|
|
8950
9178
|
]),
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
9179
|
+
weekNumbersLabel: PropTypes$1.string,
|
|
9180
|
+
onDateHover: PropTypes$1.func,
|
|
9181
|
+
onCalendarDateChange: PropTypes$1.func,
|
|
9182
|
+
onEndDateChange: PropTypes$1.func,
|
|
9183
|
+
onSelectEndChange: PropTypes$1.func,
|
|
9184
|
+
onStartDateChange: PropTypes$1.func,
|
|
9185
|
+
onViewChanged: PropTypes$1.func,
|
|
8957
9186
|
};
|
|
8958
9187
|
CCalendar.displayName = 'CCalendar';
|
|
8959
9188
|
|
|
@@ -8966,12 +9195,12 @@ var CFormFeedback = React$1.forwardRef(function (_a, ref) {
|
|
|
8966
9195
|
_b), className) }, rest, { ref: ref }), children));
|
|
8967
9196
|
});
|
|
8968
9197
|
CFormFeedback.propTypes = {
|
|
8969
|
-
children: PropTypes.node,
|
|
8970
|
-
className: PropTypes.string,
|
|
8971
|
-
component: PropTypes.elementType,
|
|
8972
|
-
invalid: PropTypes.bool,
|
|
8973
|
-
tooltip: PropTypes.bool,
|
|
8974
|
-
valid: PropTypes.bool,
|
|
9198
|
+
children: PropTypes$1.node,
|
|
9199
|
+
className: PropTypes$1.string,
|
|
9200
|
+
component: PropTypes$1.elementType,
|
|
9201
|
+
invalid: PropTypes$1.bool,
|
|
9202
|
+
tooltip: PropTypes$1.bool,
|
|
9203
|
+
valid: PropTypes$1.bool,
|
|
8975
9204
|
};
|
|
8976
9205
|
CFormFeedback.displayName = 'CFormFeedback';
|
|
8977
9206
|
|
|
@@ -8983,13 +9212,13 @@ var CFormControlValidation = function (_a) {
|
|
|
8983
9212
|
feedbackValid && (React$1.createElement(CFormFeedback, { valid: true, tooltip: tooltipFeedback }, feedbackValid))));
|
|
8984
9213
|
};
|
|
8985
9214
|
CFormControlValidation.propTypes = {
|
|
8986
|
-
describedby: PropTypes.string,
|
|
8987
|
-
feedback: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
8988
|
-
feedbackValid: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
8989
|
-
feedbackInvalid: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
8990
|
-
invalid: PropTypes.bool,
|
|
8991
|
-
tooltipFeedback: PropTypes.bool,
|
|
8992
|
-
valid: PropTypes.bool,
|
|
9215
|
+
describedby: PropTypes$1.string,
|
|
9216
|
+
feedback: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
9217
|
+
feedbackValid: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
9218
|
+
feedbackInvalid: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
9219
|
+
invalid: PropTypes$1.bool,
|
|
9220
|
+
tooltipFeedback: PropTypes$1.bool,
|
|
9221
|
+
valid: PropTypes$1.bool,
|
|
8993
9222
|
};
|
|
8994
9223
|
CFormControlValidation.displayName = 'CFormControlValidation';
|
|
8995
9224
|
|
|
@@ -8998,8 +9227,8 @@ var CFormFloating = React$1.forwardRef(function (_a, ref) {
|
|
|
8998
9227
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('form-floating', className) }, rest, { ref: ref }), children));
|
|
8999
9228
|
});
|
|
9000
9229
|
CFormFloating.propTypes = {
|
|
9001
|
-
children: PropTypes.node,
|
|
9002
|
-
className: PropTypes.string,
|
|
9230
|
+
children: PropTypes$1.node,
|
|
9231
|
+
className: PropTypes$1.string,
|
|
9003
9232
|
};
|
|
9004
9233
|
CFormFloating.displayName = 'CFormFloating';
|
|
9005
9234
|
|
|
@@ -9008,9 +9237,9 @@ var CFormLabel = React$1.forwardRef(function (_a, ref) {
|
|
|
9008
9237
|
return (React$1.createElement("label", __assign$1({ className: customClassName !== null && customClassName !== void 0 ? customClassName : classNames$1('form-label', className) }, rest, { ref: ref }), children));
|
|
9009
9238
|
});
|
|
9010
9239
|
CFormLabel.propTypes = {
|
|
9011
|
-
children: PropTypes.node,
|
|
9012
|
-
className: PropTypes.string,
|
|
9013
|
-
customClassName: PropTypes.string,
|
|
9240
|
+
children: PropTypes$1.node,
|
|
9241
|
+
className: PropTypes$1.string,
|
|
9242
|
+
customClassName: PropTypes$1.string,
|
|
9014
9243
|
};
|
|
9015
9244
|
CFormLabel.displayName = 'CFormLabel';
|
|
9016
9245
|
|
|
@@ -9019,9 +9248,9 @@ var CFormText = React$1.forwardRef(function (_a, ref) {
|
|
|
9019
9248
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('form-text', className) }, rest, { ref: ref }), children));
|
|
9020
9249
|
});
|
|
9021
9250
|
CFormText.propTypes = {
|
|
9022
|
-
children: PropTypes.node,
|
|
9023
|
-
className: PropTypes.string,
|
|
9024
|
-
component: PropTypes.elementType,
|
|
9251
|
+
children: PropTypes$1.node,
|
|
9252
|
+
className: PropTypes$1.string,
|
|
9253
|
+
component: PropTypes$1.elementType,
|
|
9025
9254
|
};
|
|
9026
9255
|
CFormText.displayName = 'CFormText';
|
|
9027
9256
|
|
|
@@ -9038,7 +9267,7 @@ var CFormControlWrapper = function (_a) {
|
|
|
9038
9267
|
text && React$1.createElement(CFormText, { id: describedby }, text),
|
|
9039
9268
|
React$1.createElement(FormControlValidation, null)));
|
|
9040
9269
|
};
|
|
9041
|
-
CFormControlWrapper.propTypes = __assign$1({ children: PropTypes.node, floatingClassName: PropTypes.string, floatingLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.string]), label: PropTypes.oneOfType([PropTypes.node, PropTypes.string]), text: PropTypes.oneOfType([PropTypes.node, PropTypes.string]) }, CFormControlValidation.propTypes);
|
|
9270
|
+
CFormControlWrapper.propTypes = __assign$1({ children: PropTypes$1.node, floatingClassName: PropTypes$1.string, floatingLabel: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]), label: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]), text: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]) }, CFormControlValidation.propTypes);
|
|
9042
9271
|
CFormControlWrapper.displayName = 'CFormControlWrapper';
|
|
9043
9272
|
|
|
9044
9273
|
var CPicker = React$1.forwardRef(function (_a, ref) {
|
|
@@ -9117,16 +9346,16 @@ var CPicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9117
9346
|
});
|
|
9118
9347
|
CPicker.displayName = 'CPicker';
|
|
9119
9348
|
CPicker.propTypes = {
|
|
9120
|
-
children: PropTypes.node,
|
|
9121
|
-
className: PropTypes.string,
|
|
9122
|
-
container: PropTypes.oneOf(['dropdown', 'inline']),
|
|
9123
|
-
disabled: PropTypes.bool,
|
|
9124
|
-
dropdownClassNames: PropTypes.string,
|
|
9125
|
-
footer: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
|
|
9126
|
-
footerContent: PropTypes.node,
|
|
9127
|
-
onHide: PropTypes.func,
|
|
9128
|
-
onShow: PropTypes.func,
|
|
9129
|
-
toggler: PropTypes.node,
|
|
9349
|
+
children: PropTypes$1.node,
|
|
9350
|
+
className: PropTypes$1.string,
|
|
9351
|
+
container: PropTypes$1.oneOf(['dropdown', 'inline']),
|
|
9352
|
+
disabled: PropTypes$1.bool,
|
|
9353
|
+
dropdownClassNames: PropTypes$1.string,
|
|
9354
|
+
footer: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]),
|
|
9355
|
+
footerContent: PropTypes$1.node,
|
|
9356
|
+
onHide: PropTypes$1.func,
|
|
9357
|
+
onShow: PropTypes$1.func,
|
|
9358
|
+
toggler: PropTypes$1.node,
|
|
9130
9359
|
};
|
|
9131
9360
|
|
|
9132
9361
|
var CTimePickerRollCol = React$1.forwardRef(function (_a, ref) {
|
|
@@ -9158,9 +9387,9 @@ var CTimePickerRollCol = React$1.forwardRef(function (_a, ref) {
|
|
|
9158
9387
|
})));
|
|
9159
9388
|
});
|
|
9160
9389
|
CTimePickerRollCol.propTypes = {
|
|
9161
|
-
elements: PropTypes.array.isRequired,
|
|
9162
|
-
onClick: PropTypes.func,
|
|
9163
|
-
selected: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
9390
|
+
elements: PropTypes$1.array.isRequired,
|
|
9391
|
+
onClick: PropTypes$1.func,
|
|
9392
|
+
selected: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
9164
9393
|
};
|
|
9165
9394
|
CTimePickerRollCol.displayName = 'CTimePickerRollCol';
|
|
9166
9395
|
|
|
@@ -9178,7 +9407,11 @@ var convert12hTo24h = function (abbr, hour) {
|
|
|
9178
9407
|
};
|
|
9179
9408
|
var convert24hTo12h = function (hour) { return hour % 12 || 12; };
|
|
9180
9409
|
var convertTimeToDate = function (time) {
|
|
9181
|
-
return time
|
|
9410
|
+
return time
|
|
9411
|
+
? time instanceof Date
|
|
9412
|
+
? time
|
|
9413
|
+
: new Date("1970-01-01 ".concat(time))
|
|
9414
|
+
: null;
|
|
9182
9415
|
};
|
|
9183
9416
|
var getAmPm = function (date, locale) {
|
|
9184
9417
|
if (date.toLocaleTimeString(locale).includes('AM')) {
|
|
@@ -9244,7 +9477,7 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9244
9477
|
var inputRef = React$1.useRef(null);
|
|
9245
9478
|
var _v = React$1.useState(convertTimeToDate(time)), date = _v[0], setDate = _v[1];
|
|
9246
9479
|
var _w = React$1.useState(null), initialDate = _w[0], setInitialDate = _w[1];
|
|
9247
|
-
var _x = React$1.useState(valid
|
|
9480
|
+
var _x = React$1.useState(valid !== null && valid !== void 0 ? valid : (invalid === true ? false : undefined)), isValid = _x[0], setIsValid = _x[1];
|
|
9248
9481
|
var _y = React$1.useState(date ? getAmPm(new Date(date), locale) : 'am'), _ampm = _y[0], setAmPm = _y[1];
|
|
9249
9482
|
var _z = React$1.useState(visible), _visible = _z[0], setVisible = _z[1];
|
|
9250
9483
|
var _0 = React$1.useState({
|
|
@@ -9257,7 +9490,7 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9257
9490
|
setDate(convertTimeToDate(time));
|
|
9258
9491
|
}, [time]);
|
|
9259
9492
|
React$1.useEffect(function () {
|
|
9260
|
-
setIsValid(valid
|
|
9493
|
+
setIsValid(valid !== null && valid !== void 0 ? valid : (invalid === true ? false : undefined));
|
|
9261
9494
|
}, [valid, invalid]);
|
|
9262
9495
|
React$1.useEffect(function () {
|
|
9263
9496
|
setLocalizedTimePartials(getLocalizedTimePartials(locale, ampm));
|
|
@@ -9393,7 +9626,7 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9393
9626
|
_c['time-picker-roll'] = variant === 'roll',
|
|
9394
9627
|
_c)) }, variant === 'select' ? React$1.createElement(TimePickerSelect, null) : TimePickerRoll()))));
|
|
9395
9628
|
});
|
|
9396
|
-
CTimePicker.propTypes = __assign$1(__assign$1(__assign$1({}, CFormControlWrapper.propTypes), CPicker.propTypes), { ampm: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.bool]), cancelButton: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), cancelButtonColor: (_a$1 = CButton.propTypes) === null || _a$1 === void 0 ? void 0 : _a$1.color, cancelButtonSize: (_b$1 = CButton.propTypes) === null || _b$1 === void 0 ? void 0 : _b$1.size, cancelButtonVariant: (_c$1 = CButton.propTypes) === null || _c$1 === void 0 ? void 0 : _c$1.variant, className: PropTypes.string, confirmButton: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), confirmButtonColor: (_d$1 = CButton.propTypes) === null || _d$1 === void 0 ? void 0 : _d$1.color, confirmButtonSize: (_e$1 = CButton.propTypes) === null || _e$1 === void 0 ? void 0 : _e$1.size, confirmButtonVariant: (_f$1 = CButton.propTypes) === null || _f$1 === void 0 ? void 0 : _f$1.variant, locale: PropTypes.string, onTimeChange: PropTypes.func, required: PropTypes.bool, seconds: PropTypes.bool, time: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]), variant: PropTypes.oneOf(['roll', 'select']) });
|
|
9629
|
+
CTimePicker.propTypes = __assign$1(__assign$1(__assign$1({}, CFormControlWrapper.propTypes), CPicker.propTypes), { ampm: PropTypes$1.oneOfType([PropTypes$1.oneOf(['auto']), PropTypes$1.bool]), cancelButton: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), cancelButtonColor: (_a$1 = CButton.propTypes) === null || _a$1 === void 0 ? void 0 : _a$1.color, cancelButtonSize: (_b$1 = CButton.propTypes) === null || _b$1 === void 0 ? void 0 : _b$1.size, cancelButtonVariant: (_c$1 = CButton.propTypes) === null || _c$1 === void 0 ? void 0 : _c$1.variant, className: PropTypes$1.string, confirmButton: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), confirmButtonColor: (_d$1 = CButton.propTypes) === null || _d$1 === void 0 ? void 0 : _d$1.color, confirmButtonSize: (_e$1 = CButton.propTypes) === null || _e$1 === void 0 ? void 0 : _e$1.size, confirmButtonVariant: (_f$1 = CButton.propTypes) === null || _f$1 === void 0 ? void 0 : _f$1.variant, locale: PropTypes$1.string, onTimeChange: PropTypes$1.func, required: PropTypes$1.bool, seconds: PropTypes$1.bool, time: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]), variant: PropTypes$1.oneOf(['roll', 'select']) });
|
|
9397
9630
|
CTimePicker.displayName = 'CTimePicker';
|
|
9398
9631
|
|
|
9399
9632
|
var getLocalDateFromString = function (string, locale, time) {
|
|
@@ -9432,42 +9665,42 @@ var getLocalDateFromString = function (string, locale, time) {
|
|
|
9432
9665
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
9433
9666
|
var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
9434
9667
|
var _b;
|
|
9435
|
-
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,
|
|
9668
|
+
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, _v = _a.selectionType, selectionType = _v === void 0 ? 'day' : _v, showAdjacementDays = _a.showAdjacementDays, showWeekNumber = _a.showWeekNumber, size = _a.size, startDate = _a.startDate, text = _a.text, timepicker = _a.timepicker, toggler = _a.toggler, _w = _a.todayButton, todayButton = _w === void 0 ? 'Today' : _w, _x = _a.todayButtonColor, todayButtonColor = _x === void 0 ? 'primary' : _x, _y = _a.todayButtonSize, todayButtonSize = _y === void 0 ? 'sm' : _y, 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", "selectionType", "showAdjacementDays", "showWeekNumber", "size", "startDate", "text", "timepicker", "toggler", "todayButton", "todayButtonColor", "todayButtonSize", "todayButtonVariant", "tooltipFeedback", "valid", "visible", "weekdayFormat"]);
|
|
9436
9669
|
var inputEndRef = React$1.useRef(null);
|
|
9437
9670
|
var inputStartRef = React$1.useRef(null);
|
|
9438
9671
|
var formRef = React$1.useRef();
|
|
9439
|
-
var
|
|
9440
|
-
var
|
|
9441
|
-
var
|
|
9442
|
-
var
|
|
9443
|
-
var
|
|
9444
|
-
var
|
|
9445
|
-
var
|
|
9446
|
-
var
|
|
9447
|
-
var
|
|
9448
|
-
var
|
|
9449
|
-
var
|
|
9450
|
-
var
|
|
9672
|
+
var _z = React$1.useState(calendarDate !== null && calendarDate !== void 0 ? calendarDate : null), _calendarDate = _z[0], setCalendarDate = _z[1];
|
|
9673
|
+
var _0 = React$1.useState(endDate !== null && endDate !== void 0 ? endDate : null), _endDate = _0[0], setEndDate = _0[1];
|
|
9674
|
+
var _1 = React$1.useState(maxDate !== null && maxDate !== void 0 ? maxDate : null), _maxDate = _1[0], setMaxDate = _1[1];
|
|
9675
|
+
var _2 = React$1.useState(minDate !== null && minDate !== void 0 ? minDate : null), _minDate = _2[0], setMinDate = _2[1];
|
|
9676
|
+
var _3 = React$1.useState(startDate !== null && startDate !== void 0 ? startDate : null), _startDate = _3[0], setStartDate = _3[1];
|
|
9677
|
+
var _4 = React$1.useState(visible), _visible = _4[0], setVisible = _4[1];
|
|
9678
|
+
var _5 = React$1.useState(startDate !== null && startDate !== void 0 ? startDate : null), initialStartDate = _5[0], setInitialStartDate = _5[1];
|
|
9679
|
+
var _6 = React$1.useState(endDate !== null && endDate !== void 0 ? endDate : null), initialEndDate = _6[0], setInitialEndDate = _6[1];
|
|
9680
|
+
var _7 = React$1.useState(null), inputStartHoverValue = _7[0], setInputStartHoverValue = _7[1];
|
|
9681
|
+
var _8 = React$1.useState(null), inputEndHoverValue = _8[0], setInputEndHoverValue = _8[1];
|
|
9682
|
+
var _9 = React$1.useState(valid !== null && valid !== void 0 ? valid : (invalid === true ? false : undefined)), isValid = _9[0], setIsValid = _9[1];
|
|
9683
|
+
var _10 = React$1.useState(false), selectEndDate = _10[0], setSelectEndDate = _10[1];
|
|
9451
9684
|
React$1.useEffect(function () {
|
|
9452
|
-
setIsValid(valid
|
|
9685
|
+
setIsValid(valid !== null && valid !== void 0 ? valid : (invalid === true ? false : undefined));
|
|
9453
9686
|
}, [valid, invalid]);
|
|
9454
9687
|
React$1.useEffect(function () {
|
|
9455
9688
|
if (startDate) {
|
|
9456
|
-
setStartDate(
|
|
9457
|
-
setCalendarDate(
|
|
9689
|
+
setStartDate(startDate);
|
|
9690
|
+
setCalendarDate(startDate);
|
|
9458
9691
|
}
|
|
9459
9692
|
}, [startDate]);
|
|
9460
9693
|
React$1.useEffect(function () {
|
|
9461
9694
|
if (endDate) {
|
|
9462
|
-
setEndDate(
|
|
9463
|
-
setCalendarDate(
|
|
9695
|
+
setEndDate(endDate);
|
|
9696
|
+
setCalendarDate(endDate);
|
|
9464
9697
|
}
|
|
9465
9698
|
}, [endDate]);
|
|
9466
9699
|
React$1.useEffect(function () {
|
|
9467
|
-
maxDate && setMaxDate(
|
|
9700
|
+
maxDate && setMaxDate(maxDate);
|
|
9468
9701
|
}, [maxDate]);
|
|
9469
9702
|
React$1.useEffect(function () {
|
|
9470
|
-
minDate && setMinDate(
|
|
9703
|
+
minDate && setMinDate(minDate);
|
|
9471
9704
|
}, [minDate]);
|
|
9472
9705
|
React$1.useEffect(function () {
|
|
9473
9706
|
if (inputStartHoverValue) {
|
|
@@ -9497,11 +9730,15 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9497
9730
|
}
|
|
9498
9731
|
}, [formRef, _startDate, _endDate]);
|
|
9499
9732
|
var formatDate = function (date) {
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9733
|
+
if (selectionType !== 'day') {
|
|
9734
|
+
return date;
|
|
9735
|
+
}
|
|
9736
|
+
var _date = new Date(date);
|
|
9737
|
+
return format$1 ?
|
|
9738
|
+
format(_date, format$1) :
|
|
9739
|
+
timepicker ?
|
|
9740
|
+
_date.toLocaleString(locale) :
|
|
9741
|
+
_date.toLocaleDateString(locale);
|
|
9505
9742
|
};
|
|
9506
9743
|
var setInputValue = function (el, date) {
|
|
9507
9744
|
if (!el) {
|
|
@@ -9513,14 +9750,9 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9513
9750
|
}
|
|
9514
9751
|
el.value = '';
|
|
9515
9752
|
};
|
|
9516
|
-
var
|
|
9753
|
+
var handleDateHover = function (date) {
|
|
9517
9754
|
selectEndDate ? setInputEndHoverValue(date) : setInputStartHoverValue(date);
|
|
9518
9755
|
};
|
|
9519
|
-
var handleCalendarDateChange = function (date, difference) {
|
|
9520
|
-
difference
|
|
9521
|
-
? setCalendarDate(new Date(date.getFullYear(), date.getMonth() - difference, 1))
|
|
9522
|
-
: setCalendarDate(date);
|
|
9523
|
-
};
|
|
9524
9756
|
var handleClear = function (event) {
|
|
9525
9757
|
event.stopPropagation();
|
|
9526
9758
|
setStartDate(null);
|
|
@@ -9561,7 +9793,7 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9561
9793
|
React$1.createElement("input", __assign$1({ autoComplete: "off", className: classNames$1('date-picker-input', {
|
|
9562
9794
|
hover: inputStartHoverValue,
|
|
9563
9795
|
}),
|
|
9564
|
-
// delay={true}
|
|
9796
|
+
// delay={true} TODO
|
|
9565
9797
|
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) {
|
|
9566
9798
|
var date = getLocalDateFromString(event.target.value, locale, timepicker);
|
|
9567
9799
|
if (date instanceof Date && date.getTime()) {
|
|
@@ -9573,7 +9805,7 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9573
9805
|
range && (React$1.createElement("input", __assign$1({ autoComplete: "off", className: classNames$1('date-picker-input', {
|
|
9574
9806
|
hover: inputEndHoverValue,
|
|
9575
9807
|
}),
|
|
9576
|
-
// delay={true}
|
|
9808
|
+
// delay={true} TODO
|
|
9577
9809
|
disabled: disabled }, (id && { name: "".concat(id, "-end-date") }), { placeholder: placeholder[1], readOnly: inputReadOnly || typeof format$1 === 'string', required: required, onChange: function (event) {
|
|
9578
9810
|
var date = getLocalDateFromString(event.target.value, locale, timepicker);
|
|
9579
9811
|
if (date instanceof Date && date.getTime()) {
|
|
@@ -9623,10 +9855,10 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9623
9855
|
handleStartDateChange(ranges[key][0]);
|
|
9624
9856
|
handleEndDateChange(ranges[key][1]);
|
|
9625
9857
|
}, size: rangesButtonsSize, variant: rangesButtonsVariant }, key)); }))),
|
|
9626
|
-
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,
|
|
9858
|
+
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, selectionType: selectionType, showAdjacementDays: showAdjacementDays, showWeekNumber: showWeekNumber, startDate: _startDate, onDateHover: function (date) { return handleDateHover(date); }, onCalendarDateChange: function (date) { return setCalendarDate(date); }, onStartDateChange: function (date) { return handleStartDateChange(date); }, onEndDateChange: function (date) { return handleEndDateChange(date); }, onSelectEndChange: function (value) { return setSelectEndDate(value); }, weekdayFormat: weekdayFormat }),
|
|
9627
9859
|
timepicker && (React$1.createElement("div", { className: "date-picker-timepickers" }, isMobile_1 || (range && calendars === 1) ? (React$1.createElement(React$1.Fragment, null,
|
|
9628
|
-
React$1.createElement(CTimePicker, { container: "inline", disabled: _startDate === null ? true : false, locale: locale, onTimeChange: function (_, __, date) { return date && handleStartDateChange(date); }, time: _startDate, variant: "select" }),
|
|
9629
|
-
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
|
|
9860
|
+
React$1.createElement(CTimePicker, { container: "inline", disabled: _startDate === null ? true : false, locale: locale, onTimeChange: function (_, __, date) { return date && handleStartDateChange(date); }, time: _startDate && new Date(_startDate), variant: "select" }),
|
|
9861
|
+
React$1.createElement(CTimePicker, { container: "inline", disabled: _endDate === null ? true : false, locale: locale, onTimeChange: function (_, __, date) { return date && handleEndDateChange(date); }, time: _endDate && new Date(_endDate), variant: "select" }))) : (Array.from({ length: calendars }).map(function (_, index) { return (React$1.createElement(CTimePicker, { container: "inline", disabled: index === 0
|
|
9630
9862
|
? _startDate === null
|
|
9631
9863
|
? true
|
|
9632
9864
|
: false
|
|
@@ -9636,21 +9868,35 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9636
9868
|
return index === 0
|
|
9637
9869
|
? date && handleStartDateChange(date)
|
|
9638
9870
|
: date && handleEndDateChange(date);
|
|
9639
|
-
}, time: index === 0
|
|
9871
|
+
}, time: index === 0
|
|
9872
|
+
? _startDate && new Date(_startDate)
|
|
9873
|
+
: _endDate && new Date(_endDate), variant: "select" })); }))))))));
|
|
9640
9874
|
});
|
|
9641
9875
|
CDateRangePicker.displayName = 'CDateRangePicker';
|
|
9642
|
-
CDateRangePicker.propTypes = __assign$1(__assign$1(__assign$1(__assign$1({}, CCalendar.propTypes), CFormControlWrapper.propTypes), CPicker.propTypes), { cancelButton: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), cancelButtonColor: (_a = CButton.propTypes) === null || _a === void 0 ? void 0 : _a.color, cancelButtonSize: (_b = CButton.propTypes) === null || _b === void 0 ? void 0 : _b.size, cancelButtonVariant: (_c = CButton.propTypes) === null || _c === void 0 ? void 0 : _c.variant, calendars: PropTypes.number, className: PropTypes.string, cleaner: PropTypes.bool, closeOnSelect: PropTypes.bool, confirmButton: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), confirmButtonColor: (_d = CButton.propTypes) === null || _d === void 0 ? void 0 : _d.color, confirmButtonSize: (_e = CButton.propTypes) === null || _e === void 0 ? void 0 : _e.size, confirmButtonVariant: (_f = CButton.propTypes) === null || _f === void 0 ? void 0 : _f.variant, id: PropTypes.string, indicator: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), inputReadOnly: PropTypes.bool, placeholder: PropTypes.oneOfType([
|
|
9643
|
-
PropTypes.string,
|
|
9644
|
-
PropTypes.arrayOf(PropTypes.string.isRequired),
|
|
9645
|
-
]), range: PropTypes.bool, ranges: PropTypes.object, rangesButtonsColor: (_g = CButton.propTypes) === null || _g === void 0 ? void 0 : _g.color, rangesButtonsSize: (_h = CButton.propTypes) === null || _h === void 0 ? void 0 : _h.size, rangesButtonsVariant: (_j = CButton.propTypes) === null || _j === void 0 ? void 0 : _j.variant, required: PropTypes.bool, separator: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), size: PropTypes.oneOf(['sm', 'lg']), timepicker: PropTypes.bool, todayButton: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), todayButtonColor: (_k = CButton.propTypes) === null || _k === void 0 ? void 0 : _k.color, todayButtonSize: (_l = CButton.propTypes) === null || _l === void 0 ? void 0 : _l.size, todayButtonVariant: (_m = CButton.propTypes) === null || _m === void 0 ? void 0 : _m.variant });
|
|
9876
|
+
CDateRangePicker.propTypes = __assign$1(__assign$1(__assign$1(__assign$1({}, CCalendar.propTypes), CFormControlWrapper.propTypes), CPicker.propTypes), { cancelButton: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), cancelButtonColor: (_a = CButton.propTypes) === null || _a === void 0 ? void 0 : _a.color, cancelButtonSize: (_b = CButton.propTypes) === null || _b === void 0 ? void 0 : _b.size, cancelButtonVariant: (_c = CButton.propTypes) === null || _c === void 0 ? void 0 : _c.variant, calendars: PropTypes$1.number, className: PropTypes$1.string, cleaner: PropTypes$1.bool, closeOnSelect: PropTypes$1.bool, confirmButton: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), confirmButtonColor: (_d = CButton.propTypes) === null || _d === void 0 ? void 0 : _d.color, confirmButtonSize: (_e = CButton.propTypes) === null || _e === void 0 ? void 0 : _e.size, confirmButtonVariant: (_f = CButton.propTypes) === null || _f === void 0 ? void 0 : _f.variant, id: PropTypes$1.string, indicator: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), inputReadOnly: PropTypes$1.bool, placeholder: PropTypes$1.oneOfType([
|
|
9877
|
+
PropTypes$1.string,
|
|
9878
|
+
PropTypes$1.arrayOf(PropTypes$1.string.isRequired),
|
|
9879
|
+
]), range: PropTypes$1.bool, ranges: PropTypes$1.object, rangesButtonsColor: (_g = CButton.propTypes) === null || _g === void 0 ? void 0 : _g.color, rangesButtonsSize: (_h = CButton.propTypes) === null || _h === void 0 ? void 0 : _h.size, rangesButtonsVariant: (_j = CButton.propTypes) === null || _j === void 0 ? void 0 : _j.variant, required: PropTypes$1.bool, separator: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), size: PropTypes$1.oneOf(['sm', 'lg']), timepicker: PropTypes$1.bool, todayButton: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), todayButtonColor: (_k = CButton.propTypes) === null || _k === void 0 ? void 0 : _k.color, todayButtonSize: (_l = CButton.propTypes) === null || _l === void 0 ? void 0 : _l.size, todayButtonVariant: (_m = CButton.propTypes) === null || _m === void 0 ? void 0 : _m.variant });
|
|
9646
9880
|
|
|
9647
9881
|
var CDatePicker = React$1.forwardRef(function (_a, ref) {
|
|
9648
9882
|
var date = _a.date, id = _a.id, onDateChange = _a.onDateChange, _b = _a.placeholder, placeholder = _b === void 0 ? 'Select date' : _b, rest = __rest$1(_a, ["date", "id", "onDateChange", "placeholder"]);
|
|
9649
9883
|
return (React$1.createElement(CDateRangePicker, __assign$1({ calendars: 1, id: id, startDate: date, onStartDateChange: onDateChange, placeholder: placeholder, range: false, ref: ref }, rest)));
|
|
9650
9884
|
});
|
|
9651
9885
|
CDatePicker.displayName = 'CDatePicker';
|
|
9652
|
-
CDatePicker.propTypes = __assign$1(__assign$1({}, CDateRangePicker.propTypes), { date: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]), onDateChange: PropTypes.func });
|
|
9886
|
+
CDatePicker.propTypes = __assign$1(__assign$1({}, CDateRangePicker.propTypes), { date: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]), onDateChange: PropTypes$1.func });
|
|
9653
9887
|
|
|
9888
|
+
var getNextActiveElement = function (list, activeElement, shouldGetNext, isCycleAllowed) {
|
|
9889
|
+
var listLength = list.length;
|
|
9890
|
+
var index = list.indexOf(activeElement);
|
|
9891
|
+
if (index === -1) {
|
|
9892
|
+
return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0];
|
|
9893
|
+
}
|
|
9894
|
+
index += shouldGetNext ? 1 : -1;
|
|
9895
|
+
if (isCycleAllowed) {
|
|
9896
|
+
index = (index + listLength) % listLength;
|
|
9897
|
+
}
|
|
9898
|
+
return list[Math.max(0, Math.min(index, listLength - 1))];
|
|
9899
|
+
};
|
|
9654
9900
|
var getPlacement = function (placement, direction, alignment, isRTL) {
|
|
9655
9901
|
var _placement = placement;
|
|
9656
9902
|
if (direction === 'dropup') {
|
|
@@ -9713,18 +9959,33 @@ var CDropdown = React$1.forwardRef(function (_a, ref) {
|
|
|
9713
9959
|
}, [visible]);
|
|
9714
9960
|
React$1.useEffect(function () {
|
|
9715
9961
|
if (_visible && dropdownToggleRef.current && dropdownMenuRef.current) {
|
|
9962
|
+
dropdownToggleRef.current.focus();
|
|
9716
9963
|
popper && initPopper(dropdownToggleRef.current, dropdownMenuRef.current, popperConfig);
|
|
9717
9964
|
window.addEventListener('mouseup', handleMouseUp);
|
|
9718
9965
|
window.addEventListener('keyup', handleKeyup);
|
|
9966
|
+
dropdownToggleRef.current.addEventListener('keydown', handleKeydown);
|
|
9967
|
+
dropdownMenuRef.current.addEventListener('keydown', handleKeydown);
|
|
9719
9968
|
onShow && onShow();
|
|
9720
9969
|
}
|
|
9721
9970
|
return function () {
|
|
9722
9971
|
popper && destroyPopper();
|
|
9723
9972
|
window.removeEventListener('mouseup', handleMouseUp);
|
|
9724
9973
|
window.removeEventListener('keyup', handleKeyup);
|
|
9974
|
+
dropdownToggleRef.current &&
|
|
9975
|
+
dropdownToggleRef.current.removeEventListener('keydown', handleKeydown);
|
|
9976
|
+
dropdownMenuRef.current &&
|
|
9977
|
+
dropdownMenuRef.current.removeEventListener('keydown', handleKeydown);
|
|
9725
9978
|
onHide && onHide();
|
|
9726
9979
|
};
|
|
9727
9980
|
}, [_visible]);
|
|
9981
|
+
var handleKeydown = function (event) {
|
|
9982
|
+
if (_visible && (event.key === 'ArrowDown' || event.key === 'ArrowUp')) {
|
|
9983
|
+
var target = event.target;
|
|
9984
|
+
event.preventDefault();
|
|
9985
|
+
var items = [].concat.apply([], Element.prototype.querySelectorAll.call(dropdownMenuRef.current, '.dropdown-item:not(.disabled):not(:disabled)'));
|
|
9986
|
+
getNextActiveElement(items, target, event.key === 'ArrowDown', true).focus();
|
|
9987
|
+
}
|
|
9988
|
+
};
|
|
9728
9989
|
var handleKeyup = function (event) {
|
|
9729
9990
|
if (autoClose === false) {
|
|
9730
9991
|
return;
|
|
@@ -9752,37 +10013,36 @@ var CDropdown = React$1.forwardRef(function (_a, ref) {
|
|
|
9752
10013
|
'dropup dropup-center': direction === 'dropup-center'
|
|
9753
10014
|
},
|
|
9754
10015
|
_b["".concat(direction)] = direction && direction !== 'center' && direction !== 'dropup-center',
|
|
9755
|
-
_b.show = _visible,
|
|
9756
10016
|
_b), className) }, rest, { ref: forkedRef }), children))));
|
|
9757
10017
|
});
|
|
9758
|
-
var alignmentDirection = PropTypes.oneOf(['start', 'end']);
|
|
10018
|
+
var alignmentDirection = PropTypes$1.oneOf(['start', 'end']);
|
|
9759
10019
|
CDropdown.propTypes = {
|
|
9760
|
-
alignment: PropTypes.oneOfType([
|
|
10020
|
+
alignment: PropTypes$1.oneOfType([
|
|
9761
10021
|
alignmentDirection,
|
|
9762
|
-
PropTypes.shape({ xs: alignmentDirection.isRequired }),
|
|
9763
|
-
PropTypes.shape({ sm: alignmentDirection.isRequired }),
|
|
9764
|
-
PropTypes.shape({ md: alignmentDirection.isRequired }),
|
|
9765
|
-
PropTypes.shape({ lg: alignmentDirection.isRequired }),
|
|
9766
|
-
PropTypes.shape({ xl: alignmentDirection.isRequired }),
|
|
9767
|
-
PropTypes.shape({ xxl: alignmentDirection.isRequired }),
|
|
10022
|
+
PropTypes$1.shape({ xs: alignmentDirection.isRequired }),
|
|
10023
|
+
PropTypes$1.shape({ sm: alignmentDirection.isRequired }),
|
|
10024
|
+
PropTypes$1.shape({ md: alignmentDirection.isRequired }),
|
|
10025
|
+
PropTypes$1.shape({ lg: alignmentDirection.isRequired }),
|
|
10026
|
+
PropTypes$1.shape({ xl: alignmentDirection.isRequired }),
|
|
10027
|
+
PropTypes$1.shape({ xxl: alignmentDirection.isRequired }),
|
|
9768
10028
|
]),
|
|
9769
|
-
autoClose: PropTypes.oneOfType([
|
|
9770
|
-
PropTypes.bool,
|
|
9771
|
-
PropTypes.oneOf(['inside', 'outside']),
|
|
10029
|
+
autoClose: PropTypes$1.oneOfType([
|
|
10030
|
+
PropTypes$1.bool,
|
|
10031
|
+
PropTypes$1.oneOf(['inside', 'outside']),
|
|
9772
10032
|
]),
|
|
9773
|
-
children: PropTypes.node,
|
|
9774
|
-
className: PropTypes.string,
|
|
9775
|
-
component: PropTypes.elementType,
|
|
9776
|
-
dark: PropTypes.bool,
|
|
9777
|
-
direction: PropTypes.oneOf(['center', 'dropup', 'dropup-center', 'dropend', 'dropstart']),
|
|
9778
|
-
offset: PropTypes.any,
|
|
9779
|
-
onHide: PropTypes.func,
|
|
9780
|
-
onShow: PropTypes.func,
|
|
10033
|
+
children: PropTypes$1.node,
|
|
10034
|
+
className: PropTypes$1.string,
|
|
10035
|
+
component: PropTypes$1.elementType,
|
|
10036
|
+
dark: PropTypes$1.bool,
|
|
10037
|
+
direction: PropTypes$1.oneOf(['center', 'dropup', 'dropup-center', 'dropend', 'dropstart']),
|
|
10038
|
+
offset: PropTypes$1.any,
|
|
10039
|
+
onHide: PropTypes$1.func,
|
|
10040
|
+
onShow: PropTypes$1.func,
|
|
9781
10041
|
placement: placementPropType,
|
|
9782
|
-
popper: PropTypes.bool,
|
|
9783
|
-
portal: PropTypes.bool,
|
|
9784
|
-
variant: PropTypes.oneOf(['btn-group', 'dropdown', 'input-group', 'nav-item']),
|
|
9785
|
-
visible: PropTypes.bool,
|
|
10042
|
+
popper: PropTypes$1.bool,
|
|
10043
|
+
portal: PropTypes$1.bool,
|
|
10044
|
+
variant: PropTypes$1.oneOf(['btn-group', 'dropdown', 'input-group', 'nav-item']),
|
|
10045
|
+
visible: PropTypes$1.bool,
|
|
9786
10046
|
};
|
|
9787
10047
|
CDropdown.displayName = 'CDropdown';
|
|
9788
10048
|
|
|
@@ -9791,7 +10051,7 @@ var CDropdownDivider = React$1.forwardRef(function (_a, ref) {
|
|
|
9791
10051
|
return React$1.createElement("hr", __assign$1({ className: classNames$1('dropdown-divider', className) }, rest, { ref: ref }));
|
|
9792
10052
|
});
|
|
9793
10053
|
CDropdownDivider.propTypes = {
|
|
9794
|
-
className: PropTypes.string,
|
|
10054
|
+
className: PropTypes$1.string,
|
|
9795
10055
|
};
|
|
9796
10056
|
CDropdownDivider.displayName = 'CDropdownDivider';
|
|
9797
10057
|
|
|
@@ -9800,9 +10060,9 @@ var CDropdownHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
9800
10060
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-header', className) }, rest, { ref: ref }), children));
|
|
9801
10061
|
});
|
|
9802
10062
|
CDropdownHeader.propTypes = {
|
|
9803
|
-
children: PropTypes.node,
|
|
9804
|
-
className: PropTypes.string,
|
|
9805
|
-
component: PropTypes.elementType,
|
|
10063
|
+
children: PropTypes$1.node,
|
|
10064
|
+
className: PropTypes$1.string,
|
|
10065
|
+
component: PropTypes$1.elementType,
|
|
9806
10066
|
};
|
|
9807
10067
|
CDropdownHeader.displayName = 'CDropdownHeader';
|
|
9808
10068
|
|
|
@@ -9811,9 +10071,9 @@ var CDropdownItem = React$1.forwardRef(function (_a, ref) {
|
|
|
9811
10071
|
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('dropdown-item', className), component: component }, rest, { ref: ref }), children));
|
|
9812
10072
|
});
|
|
9813
10073
|
CDropdownItem.propTypes = {
|
|
9814
|
-
children: PropTypes.node,
|
|
9815
|
-
className: PropTypes.string,
|
|
9816
|
-
component: PropTypes.elementType,
|
|
10074
|
+
children: PropTypes$1.node,
|
|
10075
|
+
className: PropTypes$1.string,
|
|
10076
|
+
component: PropTypes$1.elementType,
|
|
9817
10077
|
};
|
|
9818
10078
|
CDropdownItem.displayName = 'CDropdownItem';
|
|
9819
10079
|
|
|
@@ -9822,9 +10082,9 @@ var CDropdownItemPlain = React$1.forwardRef(function (_a, ref) {
|
|
|
9822
10082
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-item-text', className) }, rest, { ref: ref }), children));
|
|
9823
10083
|
});
|
|
9824
10084
|
CDropdownItemPlain.propTypes = {
|
|
9825
|
-
children: PropTypes.node,
|
|
9826
|
-
className: PropTypes.string,
|
|
9827
|
-
component: PropTypes.elementType,
|
|
10085
|
+
children: PropTypes$1.node,
|
|
10086
|
+
className: PropTypes$1.string,
|
|
10087
|
+
component: PropTypes$1.elementType,
|
|
9828
10088
|
};
|
|
9829
10089
|
CDropdownItemPlain.displayName = 'CDropdownItemPlain';
|
|
9830
10090
|
|
|
@@ -9846,9 +10106,8 @@ var CDropdownMenu = React$1.forwardRef(function (_a, ref) {
|
|
|
9846
10106
|
var forkedRef = useForkedRef(ref, dropdownMenuRef);
|
|
9847
10107
|
return (React$1.createElement(CConditionalPortal, { portal: portal !== null && portal !== void 0 ? portal : false },
|
|
9848
10108
|
React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-menu', {
|
|
9849
|
-
'dropdown-menu-dark': dark,
|
|
9850
10109
|
show: visible,
|
|
9851
|
-
}, alignment && alignmentClassNames(alignment), className), ref: forkedRef, role: "menu", "aria-hidden": !visible }, (!popper && { 'data-coreui-popper': 'static' }), rest), Component === 'ul'
|
|
10110
|
+
}, alignment && alignmentClassNames(alignment), className), ref: forkedRef, role: "menu", "aria-hidden": !visible }, (!popper && { 'data-coreui-popper': 'static' }), (dark && { 'data-coreui-theme': 'dark' }), rest), Component === 'ul'
|
|
9852
10111
|
? React$1.Children.map(children, function (child, index) {
|
|
9853
10112
|
if (React$1.isValidElement(child)) {
|
|
9854
10113
|
return React$1.createElement("li", { key: index }, React$1.cloneElement(child));
|
|
@@ -9858,15 +10117,15 @@ var CDropdownMenu = React$1.forwardRef(function (_a, ref) {
|
|
|
9858
10117
|
: children)));
|
|
9859
10118
|
});
|
|
9860
10119
|
CDropdownMenu.propTypes = {
|
|
9861
|
-
children: PropTypes.node,
|
|
9862
|
-
className: PropTypes.string,
|
|
9863
|
-
component: PropTypes.elementType,
|
|
10120
|
+
children: PropTypes$1.node,
|
|
10121
|
+
className: PropTypes$1.string,
|
|
10122
|
+
component: PropTypes$1.elementType,
|
|
9864
10123
|
};
|
|
9865
10124
|
CDropdownMenu.displayName = 'CDropdownMenu';
|
|
9866
10125
|
|
|
9867
10126
|
var CDropdownToggle = function (_a) {
|
|
9868
10127
|
var children = _a.children, _b = _a.caret, caret = _b === void 0 ? true : _b, custom = _a.custom, className = _a.className, split = _a.split, _c = _a.trigger, trigger = _c === void 0 ? 'click' : _c, rest = __rest$1(_a, ["children", "caret", "custom", "className", "split", "trigger"]);
|
|
9869
|
-
var _d = React$1.useContext(CDropdownContext), dropdownToggleRef = _d.dropdownToggleRef,
|
|
10128
|
+
var _d = React$1.useContext(CDropdownContext), dropdownToggleRef = _d.dropdownToggleRef, visible = _d.visible, setVisible = _d.setVisible;
|
|
9870
10129
|
var triggers = __assign$1(__assign$1({}, ((trigger === 'click' || trigger.includes('click')) && {
|
|
9871
10130
|
onClick: function (event) {
|
|
9872
10131
|
event.preventDefault();
|
|
@@ -9879,28 +10138,24 @@ var CDropdownToggle = function (_a) {
|
|
|
9879
10138
|
var togglerProps = __assign$1({ className: classNames$1({
|
|
9880
10139
|
'dropdown-toggle': caret,
|
|
9881
10140
|
'dropdown-toggle-split': split,
|
|
9882
|
-
|
|
10141
|
+
show: visible,
|
|
9883
10142
|
}, className), 'aria-expanded': visible }, (!rest.disabled && __assign$1({}, triggers)));
|
|
9884
|
-
// We use any because Toggler can be `a` as well as `button`.
|
|
9885
10143
|
var Toggler = function () {
|
|
9886
10144
|
if (custom && React$1.isValidElement(children)) {
|
|
9887
10145
|
return (React$1.createElement(React$1.Fragment, null, React$1.cloneElement(children, __assign$1(__assign$1({ 'aria-expanded': visible }, (!rest.disabled && __assign$1({}, triggers))), { ref: dropdownToggleRef }))));
|
|
9888
10146
|
}
|
|
9889
|
-
|
|
9890
|
-
return (React$1.createElement("a", __assign$1({ href: "#" }, togglerProps, { ref: dropdownToggleRef }), children));
|
|
9891
|
-
}
|
|
9892
|
-
return (React$1.createElement(CButton, __assign$1({ type: "button" }, togglerProps, { tabIndex: 0 }, rest, { ref: dropdownToggleRef }),
|
|
10147
|
+
return (React$1.createElement(CButton, __assign$1({}, togglerProps, { tabIndex: 0 }, rest, { ref: dropdownToggleRef }),
|
|
9893
10148
|
children,
|
|
9894
10149
|
split && React$1.createElement("span", { className: "visually-hidden" }, "Toggle Dropdown")));
|
|
9895
10150
|
};
|
|
9896
10151
|
return React$1.createElement(Toggler, null);
|
|
9897
10152
|
};
|
|
9898
10153
|
CDropdownToggle.propTypes = {
|
|
9899
|
-
caret: PropTypes.bool,
|
|
9900
|
-
children: PropTypes.node,
|
|
9901
|
-
className: PropTypes.string,
|
|
9902
|
-
custom: PropTypes.bool,
|
|
9903
|
-
split: PropTypes.bool,
|
|
10154
|
+
caret: PropTypes$1.bool,
|
|
10155
|
+
children: PropTypes$1.node,
|
|
10156
|
+
className: PropTypes$1.string,
|
|
10157
|
+
custom: PropTypes$1.bool,
|
|
10158
|
+
split: PropTypes$1.bool,
|
|
9904
10159
|
trigger: triggerPropType,
|
|
9905
10160
|
};
|
|
9906
10161
|
CDropdownToggle.displayName = 'CDropdownToggle';
|
|
@@ -9915,12 +10170,12 @@ var CSpinner = React$1.forwardRef(function (_a, ref) {
|
|
|
9915
10170
|
React$1.createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
9916
10171
|
});
|
|
9917
10172
|
CSpinner.propTypes = {
|
|
9918
|
-
className: PropTypes.string,
|
|
10173
|
+
className: PropTypes$1.string,
|
|
9919
10174
|
color: colorPropType,
|
|
9920
|
-
component: PropTypes.string,
|
|
9921
|
-
size: PropTypes.oneOf(['sm']),
|
|
9922
|
-
variant: PropTypes.oneOf(['border', 'grow']),
|
|
9923
|
-
visuallyHiddenLabel: PropTypes.string,
|
|
10175
|
+
component: PropTypes$1.string,
|
|
10176
|
+
size: PropTypes$1.oneOf(['sm']),
|
|
10177
|
+
variant: PropTypes$1.oneOf(['border', 'grow']),
|
|
10178
|
+
visuallyHiddenLabel: PropTypes$1.string,
|
|
9924
10179
|
};
|
|
9925
10180
|
CSpinner.displayName = 'CSpinner';
|
|
9926
10181
|
|
|
@@ -9968,10 +10223,10 @@ var CElementCover = React$1.forwardRef(function (_a, ref) {
|
|
|
9968
10223
|
} }, children || React$1.createElement(CSpinner, { variant: "grow", color: "primary" }))));
|
|
9969
10224
|
});
|
|
9970
10225
|
CElementCover.propTypes = {
|
|
9971
|
-
boundaries: PropTypes.array,
|
|
9972
|
-
children: PropTypes.node,
|
|
9973
|
-
className: PropTypes.string,
|
|
9974
|
-
opacity: PropTypes.number,
|
|
10226
|
+
boundaries: PropTypes$1.array,
|
|
10227
|
+
children: PropTypes$1.node,
|
|
10228
|
+
className: PropTypes$1.string,
|
|
10229
|
+
opacity: PropTypes$1.number,
|
|
9975
10230
|
};
|
|
9976
10231
|
CElementCover.displayName = 'CElementCover';
|
|
9977
10232
|
|
|
@@ -9981,9 +10236,9 @@ var CFooter = React$1.forwardRef(function (_a, ref) {
|
|
|
9981
10236
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('footer', (_b = {}, _b["footer-".concat(position)] = position, _b), className) }, rest, { ref: ref }), children));
|
|
9982
10237
|
});
|
|
9983
10238
|
CFooter.propTypes = {
|
|
9984
|
-
children: PropTypes.node,
|
|
9985
|
-
className: PropTypes.string,
|
|
9986
|
-
position: PropTypes.oneOf(['fixed', 'sticky']),
|
|
10239
|
+
children: PropTypes$1.node,
|
|
10240
|
+
className: PropTypes$1.string,
|
|
10241
|
+
position: PropTypes$1.oneOf(['fixed', 'sticky']),
|
|
9987
10242
|
};
|
|
9988
10243
|
CFooter.displayName = 'CFooter';
|
|
9989
10244
|
|
|
@@ -9992,9 +10247,9 @@ var CForm = React$1.forwardRef(function (_a, ref) {
|
|
|
9992
10247
|
return (React$1.createElement("form", __assign$1({ className: classNames$1({ 'was-validated': validated }, className) || undefined }, rest, { ref: ref }), children));
|
|
9993
10248
|
});
|
|
9994
10249
|
CForm.propTypes = {
|
|
9995
|
-
children: PropTypes.node,
|
|
9996
|
-
className: PropTypes.string,
|
|
9997
|
-
validated: PropTypes.bool,
|
|
10250
|
+
children: PropTypes$1.node,
|
|
10251
|
+
className: PropTypes$1.string,
|
|
10252
|
+
validated: PropTypes$1.bool,
|
|
9998
10253
|
};
|
|
9999
10254
|
CForm.displayName = 'CForm';
|
|
10000
10255
|
|
|
@@ -10046,7 +10301,7 @@ var CFormCheck = React$1.forwardRef(function (_a, ref) {
|
|
|
10046
10301
|
};
|
|
10047
10302
|
return React$1.createElement(FormCheck, null);
|
|
10048
10303
|
});
|
|
10049
|
-
CFormCheck.propTypes = __assign$1({ button: PropTypes.object, className: PropTypes.string, hitArea: PropTypes.oneOf(['full']), id: PropTypes.string, indeterminate: PropTypes.bool, inline: PropTypes.bool, label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), reverse: PropTypes.bool, type: PropTypes.oneOf(['checkbox', 'radio']) }, CFormControlValidation.propTypes);
|
|
10304
|
+
CFormCheck.propTypes = __assign$1({ button: PropTypes$1.object, className: PropTypes$1.string, hitArea: PropTypes$1.oneOf(['full']), id: PropTypes$1.string, indeterminate: PropTypes$1.bool, inline: PropTypes$1.bool, label: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]), reverse: PropTypes$1.bool, type: PropTypes$1.oneOf(['checkbox', 'radio']) }, CFormControlValidation.propTypes);
|
|
10050
10305
|
CFormCheck.displayName = 'CFormCheck';
|
|
10051
10306
|
|
|
10052
10307
|
var CFormInput = React$1.forwardRef(function (_a, ref) {
|
|
@@ -10065,7 +10320,7 @@ var CFormInput = React$1.forwardRef(function (_a, ref) {
|
|
|
10065
10320
|
_b['is-valid'] = valid,
|
|
10066
10321
|
_b), className), id: id, type: type, onChange: function (event) { return (delay ? setValue(event) : onChange && onChange(event)); } }, rest, { ref: ref }), children)));
|
|
10067
10322
|
});
|
|
10068
|
-
CFormInput.propTypes = __assign$1({ className: PropTypes.string, id: PropTypes.string, delay: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]), plainText: PropTypes.bool, size: PropTypes.oneOf(['sm', 'lg']), type: PropTypes.oneOfType([PropTypes.oneOf(['color', 'file', 'text']), PropTypes.string]) }, CFormControlWrapper.propTypes);
|
|
10323
|
+
CFormInput.propTypes = __assign$1({ className: PropTypes$1.string, id: PropTypes$1.string, delay: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.number]), plainText: PropTypes$1.bool, size: PropTypes$1.oneOf(['sm', 'lg']), type: PropTypes$1.oneOfType([PropTypes$1.oneOf(['color', 'file', 'text']), PropTypes$1.string]) }, CFormControlWrapper.propTypes);
|
|
10069
10324
|
CFormInput.displayName = 'CFormInput';
|
|
10070
10325
|
|
|
10071
10326
|
var CFormRange = React$1.forwardRef(function (_a, ref) {
|
|
@@ -10075,8 +10330,8 @@ var CFormRange = React$1.forwardRef(function (_a, ref) {
|
|
|
10075
10330
|
React$1.createElement("input", __assign$1({ type: "range", className: classNames$1('form-range', className) }, rest, { ref: ref }))));
|
|
10076
10331
|
});
|
|
10077
10332
|
CFormRange.propTypes = {
|
|
10078
|
-
className: PropTypes.string,
|
|
10079
|
-
label: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
10333
|
+
className: PropTypes$1.string,
|
|
10334
|
+
label: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
10080
10335
|
};
|
|
10081
10336
|
CFormRange.displayName = 'CFormRange';
|
|
10082
10337
|
|
|
@@ -10096,7 +10351,7 @@ var CFormSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
10096
10351
|
})
|
|
10097
10352
|
: children)));
|
|
10098
10353
|
});
|
|
10099
|
-
CFormSelect.propTypes = __assign$1({ className: PropTypes.string, htmlSize: PropTypes.number, options: PropTypes.array }, CFormControlWrapper.propTypes);
|
|
10354
|
+
CFormSelect.propTypes = __assign$1({ className: PropTypes$1.string, htmlSize: PropTypes$1.number, options: PropTypes$1.array }, CFormControlWrapper.propTypes);
|
|
10100
10355
|
CFormSelect.displayName = 'CFormSelect';
|
|
10101
10356
|
|
|
10102
10357
|
var CFormSwitch = React$1.forwardRef(function (_a, ref) {
|
|
@@ -10116,14 +10371,14 @@ var CFormSwitch = React$1.forwardRef(function (_a, ref) {
|
|
|
10116
10371
|
label && (React$1.createElement(CFormLabel, __assign$1({ customClassName: "form-check-label" }, (id && { htmlFor: id })), label))));
|
|
10117
10372
|
});
|
|
10118
10373
|
CFormSwitch.propTypes = {
|
|
10119
|
-
className: PropTypes.string,
|
|
10120
|
-
id: PropTypes.string,
|
|
10121
|
-
invalid: PropTypes.bool,
|
|
10122
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
10123
|
-
reverse: PropTypes.bool,
|
|
10124
|
-
size: PropTypes.oneOf(['lg', 'xl']),
|
|
10125
|
-
type: PropTypes.oneOf(['checkbox', 'radio']),
|
|
10126
|
-
valid: PropTypes.bool,
|
|
10374
|
+
className: PropTypes$1.string,
|
|
10375
|
+
id: PropTypes$1.string,
|
|
10376
|
+
invalid: PropTypes$1.bool,
|
|
10377
|
+
label: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
10378
|
+
reverse: PropTypes$1.bool,
|
|
10379
|
+
size: PropTypes$1.oneOf(['lg', 'xl']),
|
|
10380
|
+
type: PropTypes$1.oneOf(['checkbox', 'radio']),
|
|
10381
|
+
valid: PropTypes$1.bool,
|
|
10127
10382
|
};
|
|
10128
10383
|
CFormSwitch.displayName = 'CFormSwitch';
|
|
10129
10384
|
|
|
@@ -10135,7 +10390,7 @@ var CFormTextarea = React$1.forwardRef(function (_a, ref) {
|
|
|
10135
10390
|
'is-valid': valid,
|
|
10136
10391
|
}, className), id: id }, rest, { ref: ref }), children)));
|
|
10137
10392
|
});
|
|
10138
|
-
CFormTextarea.propTypes = __assign$1({ className: PropTypes.string, id: PropTypes.string, plainText: PropTypes.bool }, CFormControlWrapper.propTypes);
|
|
10393
|
+
CFormTextarea.propTypes = __assign$1({ className: PropTypes$1.string, id: PropTypes$1.string, plainText: PropTypes$1.bool }, CFormControlWrapper.propTypes);
|
|
10139
10394
|
CFormTextarea.displayName = 'CFormTextarea';
|
|
10140
10395
|
|
|
10141
10396
|
var CInputGroup = React$1.forwardRef(function (_a, ref) {
|
|
@@ -10146,9 +10401,9 @@ var CInputGroup = React$1.forwardRef(function (_a, ref) {
|
|
|
10146
10401
|
_b), className) }, rest, { ref: ref }), children));
|
|
10147
10402
|
});
|
|
10148
10403
|
CInputGroup.propTypes = {
|
|
10149
|
-
children: PropTypes.node,
|
|
10150
|
-
className: PropTypes.string,
|
|
10151
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
10404
|
+
children: PropTypes$1.node,
|
|
10405
|
+
className: PropTypes$1.string,
|
|
10406
|
+
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
10152
10407
|
};
|
|
10153
10408
|
CInputGroup.displayName = 'CInputGroup';
|
|
10154
10409
|
|
|
@@ -10157,9 +10412,9 @@ var CInputGroupText = React$1.forwardRef(function (_a, ref) {
|
|
|
10157
10412
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('input-group-text', className) }, rest, { ref: ref }), children));
|
|
10158
10413
|
});
|
|
10159
10414
|
CInputGroupText.propTypes = {
|
|
10160
|
-
children: PropTypes.node,
|
|
10161
|
-
className: PropTypes.string,
|
|
10162
|
-
component: PropTypes.elementType,
|
|
10415
|
+
children: PropTypes$1.node,
|
|
10416
|
+
className: PropTypes$1.string,
|
|
10417
|
+
component: PropTypes$1.elementType,
|
|
10163
10418
|
};
|
|
10164
10419
|
CInputGroupText.displayName = 'CInputGroupText';
|
|
10165
10420
|
|
|
@@ -10201,27 +10456,27 @@ var CCol = React$1.forwardRef(function (_a, ref) {
|
|
|
10201
10456
|
});
|
|
10202
10457
|
return (React$1.createElement("div", __assign$1({ className: classNames$1(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'col', className) }, rest, { ref: ref }), children));
|
|
10203
10458
|
});
|
|
10204
|
-
var span = PropTypes.oneOfType([
|
|
10205
|
-
PropTypes.bool,
|
|
10206
|
-
PropTypes.number,
|
|
10207
|
-
PropTypes.string,
|
|
10208
|
-
PropTypes.oneOf(['auto']),
|
|
10459
|
+
var span = PropTypes$1.oneOfType([
|
|
10460
|
+
PropTypes$1.bool,
|
|
10461
|
+
PropTypes$1.number,
|
|
10462
|
+
PropTypes$1.string,
|
|
10463
|
+
PropTypes$1.oneOf(['auto']),
|
|
10209
10464
|
]);
|
|
10210
|
-
var col = PropTypes.oneOfType([
|
|
10465
|
+
var col = PropTypes$1.oneOfType([
|
|
10211
10466
|
span,
|
|
10212
|
-
PropTypes.shape({
|
|
10467
|
+
PropTypes$1.shape({
|
|
10213
10468
|
span: span,
|
|
10214
|
-
offset: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
10215
|
-
order: PropTypes.oneOfType([
|
|
10216
|
-
PropTypes.oneOf(['first', 'last']),
|
|
10217
|
-
PropTypes.number,
|
|
10218
|
-
PropTypes.string,
|
|
10469
|
+
offset: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
10470
|
+
order: PropTypes$1.oneOfType([
|
|
10471
|
+
PropTypes$1.oneOf(['first', 'last']),
|
|
10472
|
+
PropTypes$1.number,
|
|
10473
|
+
PropTypes$1.string,
|
|
10219
10474
|
]),
|
|
10220
10475
|
}),
|
|
10221
10476
|
]);
|
|
10222
10477
|
CCol.propTypes = {
|
|
10223
|
-
children: PropTypes.node,
|
|
10224
|
-
className: PropTypes.string,
|
|
10478
|
+
children: PropTypes$1.node,
|
|
10479
|
+
className: PropTypes$1.string,
|
|
10225
10480
|
xs: col,
|
|
10226
10481
|
sm: col,
|
|
10227
10482
|
md: col,
|
|
@@ -10250,14 +10505,14 @@ var CContainer = React$1.forwardRef(function (_a, ref) {
|
|
|
10250
10505
|
return (React$1.createElement("div", __assign$1({ className: classNames$1(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'container', className) }, rest, { ref: ref }), children));
|
|
10251
10506
|
});
|
|
10252
10507
|
CContainer.propTypes = {
|
|
10253
|
-
children: PropTypes.node,
|
|
10254
|
-
className: PropTypes.string,
|
|
10255
|
-
sm: PropTypes.bool,
|
|
10256
|
-
md: PropTypes.bool,
|
|
10257
|
-
lg: PropTypes.bool,
|
|
10258
|
-
xl: PropTypes.bool,
|
|
10259
|
-
xxl: PropTypes.bool,
|
|
10260
|
-
fluid: PropTypes.bool,
|
|
10508
|
+
children: PropTypes$1.node,
|
|
10509
|
+
className: PropTypes$1.string,
|
|
10510
|
+
sm: PropTypes$1.bool,
|
|
10511
|
+
md: PropTypes$1.bool,
|
|
10512
|
+
lg: PropTypes$1.bool,
|
|
10513
|
+
xl: PropTypes$1.bool,
|
|
10514
|
+
xxl: PropTypes$1.bool,
|
|
10515
|
+
fluid: PropTypes$1.bool,
|
|
10261
10516
|
};
|
|
10262
10517
|
CContainer.displayName = 'CContainer';
|
|
10263
10518
|
|
|
@@ -10293,15 +10548,15 @@ var CRow = React$1.forwardRef(function (_a, ref) {
|
|
|
10293
10548
|
});
|
|
10294
10549
|
return (React$1.createElement("div", { className: classNames$1('row', repsonsiveClassNames, className), ref: ref }, children));
|
|
10295
10550
|
});
|
|
10296
|
-
var bp = PropTypes.shape({
|
|
10297
|
-
cols: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.string]),
|
|
10298
|
-
gutter: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
10299
|
-
gutterX: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
10300
|
-
gutterY: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
10551
|
+
var bp = PropTypes$1.shape({
|
|
10552
|
+
cols: PropTypes$1.oneOfType([PropTypes$1.oneOf(['auto']), PropTypes$1.number, PropTypes$1.string]),
|
|
10553
|
+
gutter: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.number]),
|
|
10554
|
+
gutterX: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.number]),
|
|
10555
|
+
gutterY: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.number]),
|
|
10301
10556
|
});
|
|
10302
10557
|
CRow.propTypes = {
|
|
10303
|
-
children: PropTypes.node,
|
|
10304
|
-
className: PropTypes.string,
|
|
10558
|
+
children: PropTypes$1.node,
|
|
10559
|
+
className: PropTypes$1.string,
|
|
10305
10560
|
xs: bp,
|
|
10306
10561
|
sm: bp,
|
|
10307
10562
|
md: bp,
|
|
@@ -10317,11 +10572,11 @@ var CHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
10317
10572
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('header', (_b = {}, _b["header-".concat(position)] = position, _b), className) }, rest, { ref: ref }), container ? (React$1.createElement("div", { className: typeof container === 'string' ? "container-".concat(container) : 'container' }, children)) : (React$1.createElement(React$1.Fragment, null, children))));
|
|
10318
10573
|
});
|
|
10319
10574
|
CHeader.propTypes = {
|
|
10320
|
-
children: PropTypes.node,
|
|
10321
|
-
className: PropTypes.string,
|
|
10322
|
-
container: PropTypes.oneOfType([
|
|
10323
|
-
PropTypes.bool,
|
|
10324
|
-
PropTypes.oneOf([
|
|
10575
|
+
children: PropTypes$1.node,
|
|
10576
|
+
className: PropTypes$1.string,
|
|
10577
|
+
container: PropTypes$1.oneOfType([
|
|
10578
|
+
PropTypes$1.bool,
|
|
10579
|
+
PropTypes$1.oneOf([
|
|
10325
10580
|
'sm',
|
|
10326
10581
|
'md',
|
|
10327
10582
|
'lg',
|
|
@@ -10330,7 +10585,7 @@ CHeader.propTypes = {
|
|
|
10330
10585
|
'fluid',
|
|
10331
10586
|
]),
|
|
10332
10587
|
]),
|
|
10333
|
-
position: PropTypes.oneOf(['fixed', 'sticky']),
|
|
10588
|
+
position: PropTypes$1.oneOf(['fixed', 'sticky']),
|
|
10334
10589
|
};
|
|
10335
10590
|
CHeader.displayName = 'CHeader';
|
|
10336
10591
|
|
|
@@ -10339,9 +10594,9 @@ var CHeaderBrand = React$1.forwardRef(function (_a, ref) {
|
|
|
10339
10594
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('header-brand', className) }, rest, { ref: ref }), children));
|
|
10340
10595
|
});
|
|
10341
10596
|
CHeaderBrand.propTypes = {
|
|
10342
|
-
children: PropTypes.node,
|
|
10343
|
-
className: PropTypes.string,
|
|
10344
|
-
component: PropTypes.elementType,
|
|
10597
|
+
children: PropTypes$1.node,
|
|
10598
|
+
className: PropTypes$1.string,
|
|
10599
|
+
component: PropTypes$1.elementType,
|
|
10345
10600
|
};
|
|
10346
10601
|
CHeaderBrand.displayName = 'CHeaderBrand';
|
|
10347
10602
|
|
|
@@ -10350,7 +10605,7 @@ var CHeaderDivider = React$1.forwardRef(function (_a, ref) {
|
|
|
10350
10605
|
return React$1.createElement("div", __assign$1({ className: classNames$1('header-divider', className) }, rest, { ref: ref }));
|
|
10351
10606
|
});
|
|
10352
10607
|
CHeaderDivider.propTypes = {
|
|
10353
|
-
className: PropTypes.string,
|
|
10608
|
+
className: PropTypes$1.string,
|
|
10354
10609
|
};
|
|
10355
10610
|
CHeaderDivider.displayName = 'CHeaderDivider';
|
|
10356
10611
|
|
|
@@ -10359,9 +10614,9 @@ var CHeaderNav = React$1.forwardRef(function (_a, ref) {
|
|
|
10359
10614
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('header-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
10360
10615
|
});
|
|
10361
10616
|
CHeaderNav.propTypes = {
|
|
10362
|
-
children: PropTypes.node,
|
|
10363
|
-
className: PropTypes.string,
|
|
10364
|
-
component: PropTypes.elementType,
|
|
10617
|
+
children: PropTypes$1.node,
|
|
10618
|
+
className: PropTypes$1.string,
|
|
10619
|
+
component: PropTypes$1.elementType,
|
|
10365
10620
|
};
|
|
10366
10621
|
CHeaderNav.displayName = 'CHeaderNav';
|
|
10367
10622
|
|
|
@@ -10370,8 +10625,8 @@ var CHeaderText = React$1.forwardRef(function (_a, ref) {
|
|
|
10370
10625
|
return (React$1.createElement("span", __assign$1({ className: classNames$1('header-text', className) }, rest, { ref: ref }), children));
|
|
10371
10626
|
});
|
|
10372
10627
|
CHeaderText.propTypes = {
|
|
10373
|
-
children: PropTypes.node,
|
|
10374
|
-
className: PropTypes.string,
|
|
10628
|
+
children: PropTypes$1.node,
|
|
10629
|
+
className: PropTypes$1.string,
|
|
10375
10630
|
};
|
|
10376
10631
|
CHeaderText.displayName = 'CHeaderText';
|
|
10377
10632
|
|
|
@@ -10380,8 +10635,8 @@ var CHeaderToggler = React$1.forwardRef(function (_a, ref) {
|
|
|
10380
10635
|
return (React$1.createElement("button", __assign$1({ type: "button", className: classNames$1('header-toggler', className) }, rest, { ref: ref }), children !== null && children !== void 0 ? children : React$1.createElement("span", { className: "header-toggler-icon" })));
|
|
10381
10636
|
});
|
|
10382
10637
|
CHeaderToggler.propTypes = {
|
|
10383
|
-
children: PropTypes.node,
|
|
10384
|
-
className: PropTypes.string,
|
|
10638
|
+
children: PropTypes$1.node,
|
|
10639
|
+
className: PropTypes$1.string,
|
|
10385
10640
|
};
|
|
10386
10641
|
CHeaderToggler.displayName = 'CHeaderToggler';
|
|
10387
10642
|
|
|
@@ -10397,11 +10652,11 @@ var CImage = React$1.forwardRef(function (_a, ref) {
|
|
|
10397
10652
|
_b), className) || undefined }, rest, { ref: ref })));
|
|
10398
10653
|
});
|
|
10399
10654
|
CImage.propTypes = {
|
|
10400
|
-
align: PropTypes.oneOf(['start', 'center', 'end']),
|
|
10401
|
-
className: PropTypes.string,
|
|
10402
|
-
fluid: PropTypes.bool,
|
|
10403
|
-
rounded: PropTypes.bool,
|
|
10404
|
-
thumbnail: PropTypes.bool,
|
|
10655
|
+
align: PropTypes$1.oneOf(['start', 'center', 'end']),
|
|
10656
|
+
className: PropTypes$1.string,
|
|
10657
|
+
fluid: PropTypes$1.bool,
|
|
10658
|
+
rounded: PropTypes$1.bool,
|
|
10659
|
+
thumbnail: PropTypes$1.bool,
|
|
10405
10660
|
};
|
|
10406
10661
|
CImage.displayName = 'CImage';
|
|
10407
10662
|
|
|
@@ -10415,11 +10670,11 @@ var CListGroup = React$1.forwardRef(function (_a, ref) {
|
|
|
10415
10670
|
_b), className), ref: ref }, children));
|
|
10416
10671
|
});
|
|
10417
10672
|
CListGroup.propTypes = {
|
|
10418
|
-
children: PropTypes.node,
|
|
10419
|
-
className: PropTypes.string,
|
|
10420
|
-
component: PropTypes.elementType,
|
|
10421
|
-
flush: PropTypes.bool,
|
|
10422
|
-
layout: PropTypes.oneOf([
|
|
10673
|
+
children: PropTypes$1.node,
|
|
10674
|
+
className: PropTypes$1.string,
|
|
10675
|
+
component: PropTypes$1.elementType,
|
|
10676
|
+
flush: PropTypes$1.bool,
|
|
10677
|
+
layout: PropTypes$1.oneOf([
|
|
10423
10678
|
'horizontal',
|
|
10424
10679
|
'horizontal-sm',
|
|
10425
10680
|
'horizontal-md',
|
|
@@ -10448,12 +10703,12 @@ var CListGroupItem = React$1.forwardRef(function (_a, ref) {
|
|
|
10448
10703
|
_b), className) }, rest), children));
|
|
10449
10704
|
});
|
|
10450
10705
|
CListGroupItem.propTypes = {
|
|
10451
|
-
active: PropTypes.bool,
|
|
10452
|
-
children: PropTypes.node,
|
|
10453
|
-
className: PropTypes.string,
|
|
10706
|
+
active: PropTypes$1.bool,
|
|
10707
|
+
children: PropTypes$1.node,
|
|
10708
|
+
className: PropTypes$1.string,
|
|
10454
10709
|
color: colorPropType,
|
|
10455
|
-
component: PropTypes.elementType,
|
|
10456
|
-
disabled: PropTypes.bool,
|
|
10710
|
+
component: PropTypes$1.elementType,
|
|
10711
|
+
disabled: PropTypes$1.bool,
|
|
10457
10712
|
};
|
|
10458
10713
|
CListGroupItem.displayName = 'CListGroupItem';
|
|
10459
10714
|
|
|
@@ -10477,13 +10732,13 @@ var CLoadingButton = React$1.forwardRef(function (_a, ref) {
|
|
|
10477
10732
|
children));
|
|
10478
10733
|
});
|
|
10479
10734
|
CLoadingButton.propTypes = {
|
|
10480
|
-
children: PropTypes.node,
|
|
10481
|
-
className: PropTypes.string,
|
|
10482
|
-
disabledOnLoading: PropTypes.bool,
|
|
10483
|
-
loading: PropTypes.bool,
|
|
10484
|
-
onClick: PropTypes.func,
|
|
10485
|
-
spinnerType: PropTypes.oneOf(['border', 'grow']),
|
|
10486
|
-
timeout: PropTypes.number,
|
|
10735
|
+
children: PropTypes$1.node,
|
|
10736
|
+
className: PropTypes$1.string,
|
|
10737
|
+
disabledOnLoading: PropTypes$1.bool,
|
|
10738
|
+
loading: PropTypes$1.bool,
|
|
10739
|
+
onClick: PropTypes$1.func,
|
|
10740
|
+
spinnerType: PropTypes$1.oneOf(['border', 'grow']),
|
|
10741
|
+
timeout: PropTypes$1.number,
|
|
10487
10742
|
};
|
|
10488
10743
|
CLoadingButton.displayName = 'CLoadingButton';
|
|
10489
10744
|
|
|
@@ -10492,8 +10747,8 @@ var CModalContent = React$1.forwardRef(function (_a, ref) {
|
|
|
10492
10747
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-content', className) }, rest, { ref: ref }), children));
|
|
10493
10748
|
});
|
|
10494
10749
|
CModalContent.propTypes = {
|
|
10495
|
-
children: PropTypes.node,
|
|
10496
|
-
className: PropTypes.string,
|
|
10750
|
+
children: PropTypes$1.node,
|
|
10751
|
+
className: PropTypes$1.string,
|
|
10497
10752
|
};
|
|
10498
10753
|
CModalContent.displayName = 'CModalContent';
|
|
10499
10754
|
|
|
@@ -10511,26 +10766,27 @@ var CModalDialog = React$1.forwardRef(function (_a, ref) {
|
|
|
10511
10766
|
_b), className) }, rest, { ref: ref }), children));
|
|
10512
10767
|
});
|
|
10513
10768
|
CModalDialog.propTypes = {
|
|
10514
|
-
alignment: PropTypes.oneOf(['top', 'center']),
|
|
10515
|
-
children: PropTypes.node,
|
|
10516
|
-
className: PropTypes.string,
|
|
10517
|
-
fullscreen: PropTypes.oneOfType([
|
|
10518
|
-
PropTypes.bool,
|
|
10519
|
-
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
10769
|
+
alignment: PropTypes$1.oneOf(['top', 'center']),
|
|
10770
|
+
children: PropTypes$1.node,
|
|
10771
|
+
className: PropTypes$1.string,
|
|
10772
|
+
fullscreen: PropTypes$1.oneOfType([
|
|
10773
|
+
PropTypes$1.bool,
|
|
10774
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
10520
10775
|
]),
|
|
10521
|
-
scrollable: PropTypes.bool,
|
|
10522
|
-
size: PropTypes.oneOf(['sm', 'lg', 'xl']),
|
|
10776
|
+
scrollable: PropTypes$1.bool,
|
|
10777
|
+
size: PropTypes$1.oneOf(['sm', 'lg', 'xl']),
|
|
10523
10778
|
};
|
|
10524
10779
|
CModalDialog.displayName = 'CModalDialog';
|
|
10525
10780
|
|
|
10526
10781
|
var CModalContext = React$1.createContext({});
|
|
10527
10782
|
var CModal = React$1.forwardRef(function (_a, ref) {
|
|
10528
|
-
var children = _a.children, alignment = _a.alignment, _b = _a.backdrop, backdrop = _b === void 0 ? true : _b, className = _a.className, _c = _a.duration, duration = _c === void 0 ? 150 : _c, fullscreen = _a.fullscreen,
|
|
10783
|
+
var children = _a.children, alignment = _a.alignment, _b = _a.backdrop, backdrop = _b === void 0 ? true : _b, className = _a.className, _c = _a.duration, duration = _c === void 0 ? 150 : _c, _d = _a.focus, focus = _d === void 0 ? true : _d, fullscreen = _a.fullscreen, _e = _a.keyboard, keyboard = _e === void 0 ? true : _e, onClose = _a.onClose, onClosePrevented = _a.onClosePrevented, onShow = _a.onShow, _f = _a.portal, portal = _f === void 0 ? true : _f, scrollable = _a.scrollable, size = _a.size, _g = _a.transition, transition = _g === void 0 ? true : _g, _h = _a.unmountOnClose, unmountOnClose = _h === void 0 ? true : _h, visible = _a.visible, rest = __rest$1(_a, ["children", "alignment", "backdrop", "className", "duration", "focus", "fullscreen", "keyboard", "onClose", "onClosePrevented", "onShow", "portal", "scrollable", "size", "transition", "unmountOnClose", "visible"]);
|
|
10784
|
+
var activeElementRef = React$1.useRef(null);
|
|
10529
10785
|
var modalRef = React$1.useRef(null);
|
|
10530
10786
|
var modalContentRef = React$1.useRef(null);
|
|
10531
10787
|
var forkedRef = useForkedRef(ref, modalRef);
|
|
10532
|
-
var
|
|
10533
|
-
var
|
|
10788
|
+
var _j = React$1.useState(visible), _visible = _j[0], setVisible = _j[1];
|
|
10789
|
+
var _k = React$1.useState(false), staticBackdrop = _k[0], setStaticBackdrop = _k[1];
|
|
10534
10790
|
var contextValues = {
|
|
10535
10791
|
visible: _visible,
|
|
10536
10792
|
setVisible: setVisible,
|
|
@@ -10539,10 +10795,17 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
10539
10795
|
setVisible(visible);
|
|
10540
10796
|
}, [visible]);
|
|
10541
10797
|
React$1.useEffect(function () {
|
|
10542
|
-
|
|
10543
|
-
|
|
10798
|
+
var _a;
|
|
10799
|
+
if (_visible) {
|
|
10800
|
+
activeElementRef.current = document.activeElement;
|
|
10801
|
+
document.addEventListener('mouseup', handleClickOutside);
|
|
10802
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
10803
|
+
}
|
|
10804
|
+
else {
|
|
10805
|
+
(_a = activeElementRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
10806
|
+
}
|
|
10544
10807
|
return function () {
|
|
10545
|
-
document.removeEventListener('
|
|
10808
|
+
document.removeEventListener('mouseup', handleClickOutside);
|
|
10546
10809
|
document.removeEventListener('keydown', handleKeyDown);
|
|
10547
10810
|
};
|
|
10548
10811
|
}, [_visible]);
|
|
@@ -10567,7 +10830,7 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
10567
10830
|
}
|
|
10568
10831
|
setTimeout(function () {
|
|
10569
10832
|
var _a;
|
|
10570
|
-
(_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
10833
|
+
focus && ((_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.focus());
|
|
10571
10834
|
}, transition ? duration : 0);
|
|
10572
10835
|
}
|
|
10573
10836
|
else {
|
|
@@ -10599,36 +10862,39 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
10599
10862
|
return (React$1.createElement(React$1.Fragment, null,
|
|
10600
10863
|
React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: modalRef, onEnter: onShow, onExit: onClose, unmountOnExit: unmountOnClose, timeout: transition ? duration : 0 }, function (state) { return (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
10601
10864
|
React$1.createElement(CModalContext.Provider, { value: contextValues },
|
|
10602
|
-
React$1.createElement("div", { className: classNames$1('modal', {
|
|
10865
|
+
React$1.createElement("div", __assign$1({ className: classNames$1('modal', {
|
|
10603
10866
|
'modal-static': staticBackdrop,
|
|
10604
10867
|
fade: transition,
|
|
10605
10868
|
show: state === 'entered',
|
|
10606
|
-
}, className), tabIndex: -1
|
|
10869
|
+
}, className), tabIndex: -1 }, (_visible
|
|
10870
|
+
? { 'aria-modal': true, role: 'dialog' }
|
|
10871
|
+
: { 'aria-hidden': 'true' }), { style: __assign$1({}, (state !== 'exited' && { display: 'block' })) }, rest, { ref: forkedRef }),
|
|
10607
10872
|
React$1.createElement(CModalDialog, { alignment: alignment, fullscreen: fullscreen, scrollable: scrollable, size: size },
|
|
10608
|
-
React$1.createElement(CModalContent,
|
|
10873
|
+
React$1.createElement(CModalContent, { ref: modalContentRef }, children)))))); }),
|
|
10609
10874
|
backdrop && (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
10610
10875
|
React$1.createElement(CBackdrop, { visible: _visible })))));
|
|
10611
10876
|
});
|
|
10612
10877
|
CModal.propTypes = {
|
|
10613
|
-
alignment: PropTypes.oneOf(['top', 'center']),
|
|
10614
|
-
backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['static'])]),
|
|
10615
|
-
children: PropTypes.node,
|
|
10616
|
-
className: PropTypes.string,
|
|
10617
|
-
duration: PropTypes.number,
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
PropTypes.
|
|
10878
|
+
alignment: PropTypes$1.oneOf(['top', 'center']),
|
|
10879
|
+
backdrop: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.oneOf(['static'])]),
|
|
10880
|
+
children: PropTypes$1.node,
|
|
10881
|
+
className: PropTypes$1.string,
|
|
10882
|
+
duration: PropTypes$1.number,
|
|
10883
|
+
focus: PropTypes$1.bool,
|
|
10884
|
+
fullscreen: PropTypes$1.oneOfType([
|
|
10885
|
+
PropTypes$1.bool,
|
|
10886
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
10621
10887
|
]),
|
|
10622
|
-
keyboard: PropTypes.bool,
|
|
10623
|
-
onClose: PropTypes.func,
|
|
10624
|
-
onClosePrevented: PropTypes.func,
|
|
10625
|
-
onShow: PropTypes.func,
|
|
10626
|
-
portal: PropTypes.bool,
|
|
10627
|
-
scrollable: PropTypes.bool,
|
|
10628
|
-
size: PropTypes.oneOf(['sm', 'lg', 'xl']),
|
|
10629
|
-
transition: PropTypes.bool,
|
|
10630
|
-
unmountOnClose: PropTypes.bool,
|
|
10631
|
-
visible: PropTypes.bool,
|
|
10888
|
+
keyboard: PropTypes$1.bool,
|
|
10889
|
+
onClose: PropTypes$1.func,
|
|
10890
|
+
onClosePrevented: PropTypes$1.func,
|
|
10891
|
+
onShow: PropTypes$1.func,
|
|
10892
|
+
portal: PropTypes$1.bool,
|
|
10893
|
+
scrollable: PropTypes$1.bool,
|
|
10894
|
+
size: PropTypes$1.oneOf(['sm', 'lg', 'xl']),
|
|
10895
|
+
transition: PropTypes$1.bool,
|
|
10896
|
+
unmountOnClose: PropTypes$1.bool,
|
|
10897
|
+
visible: PropTypes$1.bool,
|
|
10632
10898
|
};
|
|
10633
10899
|
CModal.displayName = 'CModal';
|
|
10634
10900
|
|
|
@@ -10637,8 +10903,8 @@ var CModalBody = React$1.forwardRef(function (_a, ref) {
|
|
|
10637
10903
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-body', className) }, rest, { ref: ref }), children));
|
|
10638
10904
|
});
|
|
10639
10905
|
CModalBody.propTypes = {
|
|
10640
|
-
children: PropTypes.node,
|
|
10641
|
-
className: PropTypes.string,
|
|
10906
|
+
children: PropTypes$1.node,
|
|
10907
|
+
className: PropTypes$1.string,
|
|
10642
10908
|
};
|
|
10643
10909
|
CModalBody.displayName = 'CModalBody';
|
|
10644
10910
|
|
|
@@ -10647,8 +10913,8 @@ var CModalFooter = React$1.forwardRef(function (_a, ref) {
|
|
|
10647
10913
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-footer', className) }, rest, { ref: ref }), children));
|
|
10648
10914
|
});
|
|
10649
10915
|
CModalFooter.propTypes = {
|
|
10650
|
-
children: PropTypes.node,
|
|
10651
|
-
className: PropTypes.string,
|
|
10916
|
+
children: PropTypes$1.node,
|
|
10917
|
+
className: PropTypes$1.string,
|
|
10652
10918
|
};
|
|
10653
10919
|
CModalFooter.displayName = 'CModalFooter';
|
|
10654
10920
|
|
|
@@ -10660,9 +10926,9 @@ var CModalHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
10660
10926
|
closeButton && React$1.createElement(CCloseButton, { onClick: function () { return setVisible(false); } })));
|
|
10661
10927
|
});
|
|
10662
10928
|
CModalHeader.propTypes = {
|
|
10663
|
-
children: PropTypes.node,
|
|
10664
|
-
className: PropTypes.string,
|
|
10665
|
-
closeButton: PropTypes.bool,
|
|
10929
|
+
children: PropTypes$1.node,
|
|
10930
|
+
className: PropTypes$1.string,
|
|
10931
|
+
closeButton: PropTypes$1.bool,
|
|
10666
10932
|
};
|
|
10667
10933
|
CModalHeader.displayName = 'CModalHeader';
|
|
10668
10934
|
|
|
@@ -10671,16 +10937,16 @@ var CModalTitle = React$1.forwardRef(function (_a, ref) {
|
|
|
10671
10937
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('modal-title', className) }, rest, { ref: ref }), children));
|
|
10672
10938
|
});
|
|
10673
10939
|
CModalTitle.propTypes = {
|
|
10674
|
-
children: PropTypes.node,
|
|
10675
|
-
className: PropTypes.string,
|
|
10676
|
-
component: PropTypes.elementType,
|
|
10940
|
+
children: PropTypes$1.node,
|
|
10941
|
+
className: PropTypes$1.string,
|
|
10942
|
+
component: PropTypes$1.elementType,
|
|
10677
10943
|
};
|
|
10678
10944
|
CModalTitle.displayName = 'CModalTitle';
|
|
10679
10945
|
|
|
10680
10946
|
var createNativeOptions = function (options) {
|
|
10681
10947
|
return options &&
|
|
10682
10948
|
options.map(function (option, index) {
|
|
10683
|
-
return option.options ? (React$1.createElement("optgroup", { label: option.label, key: index }, createNativeOptions(option.options))) : (React$1.createElement("option", { value: option.value, key: index, disabled: option.disabled }, option.
|
|
10949
|
+
return option.options ? (React$1.createElement("optgroup", { label: option.label, key: index }, createNativeOptions(option.options))) : (React$1.createElement("option", { value: option.value, key: index, disabled: option.disabled }, option.label));
|
|
10684
10950
|
});
|
|
10685
10951
|
};
|
|
10686
10952
|
var CMultiSelectNativeSelect = React$1.forwardRef(function (_a, ref) {
|
|
@@ -10688,11 +10954,11 @@ var CMultiSelectNativeSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
10688
10954
|
return (React$1.createElement("select", __assign$1({ className: "multi-select-new" }, (id && { id: "".concat(id, "-multi-select") }), (id && { name: "".concat(id, "-multi-select") }), { tabIndex: -1, style: { display: 'none' } }, rest, { ref: ref }), options && createNativeOptions(options)));
|
|
10689
10955
|
});
|
|
10690
10956
|
CMultiSelectNativeSelect.propTypes = {
|
|
10691
|
-
options: PropTypes.array,
|
|
10692
|
-
value: PropTypes.oneOfType([
|
|
10693
|
-
PropTypes.number,
|
|
10694
|
-
PropTypes.string,
|
|
10695
|
-
PropTypes.arrayOf(PropTypes.string.isRequired),
|
|
10957
|
+
options: PropTypes$1.array,
|
|
10958
|
+
value: PropTypes$1.oneOfType([
|
|
10959
|
+
PropTypes$1.number,
|
|
10960
|
+
PropTypes$1.string,
|
|
10961
|
+
PropTypes$1.arrayOf(PropTypes$1.string.isRequired),
|
|
10696
10962
|
]),
|
|
10697
10963
|
};
|
|
10698
10964
|
CMultiSelectNativeSelect.displayName = 'CMultiSelectNativeSelect';
|
|
@@ -10765,13 +11031,13 @@ var CVirtualScroller = React$1.forwardRef(function (_a, ref) {
|
|
|
10765
11031
|
}))));
|
|
10766
11032
|
});
|
|
10767
11033
|
CVirtualScroller.propTypes = {
|
|
10768
|
-
onScroll: PropTypes.func,
|
|
10769
|
-
visibleItems: PropTypes.number.isRequired,
|
|
11034
|
+
onScroll: PropTypes$1.func,
|
|
11035
|
+
visibleItems: PropTypes$1.number.isRequired,
|
|
10770
11036
|
};
|
|
10771
11037
|
CVirtualScroller.displayName = 'CVirtualScroller';
|
|
10772
11038
|
|
|
10773
|
-
var createOption = function (
|
|
10774
|
-
var value =
|
|
11039
|
+
var createOption = function (label, options) {
|
|
11040
|
+
var value = label.toLowerCase().replace(/\s/g, '-');
|
|
10775
11041
|
var uniqueValue = value;
|
|
10776
11042
|
var i = 1;
|
|
10777
11043
|
while (options.some(function (option) { return String(option.value) === uniqueValue; })) {
|
|
@@ -10781,7 +11047,7 @@ var createOption = function (text, options) {
|
|
|
10781
11047
|
return [
|
|
10782
11048
|
{
|
|
10783
11049
|
value: uniqueValue,
|
|
10784
|
-
|
|
11050
|
+
label: label,
|
|
10785
11051
|
custom: true,
|
|
10786
11052
|
},
|
|
10787
11053
|
];
|
|
@@ -10793,9 +11059,9 @@ var filterOptionsList = function (search, _options) {
|
|
|
10793
11059
|
var option = _options_1[_i];
|
|
10794
11060
|
var options = option.options &&
|
|
10795
11061
|
option.options.filter(function (option) {
|
|
10796
|
-
return option.
|
|
11062
|
+
return option.lable && option.label.toLowerCase().includes(search.toLowerCase());
|
|
10797
11063
|
});
|
|
10798
|
-
if ((option.
|
|
11064
|
+
if ((option.lable && option.label.toLowerCase().includes(search.toLowerCase())) ||
|
|
10799
11065
|
(options && options.length > 0)) {
|
|
10800
11066
|
optionsList.push(Object.assign({}, option, options && options.length > 0 && { options: options }));
|
|
10801
11067
|
}
|
|
@@ -10897,7 +11163,7 @@ var CMultiSelectOptions = React$1.forwardRef(function (_a, ref) {
|
|
|
10897
11163
|
'form-multi-select-option-with-checkbox': optionsStyle === 'checkbox',
|
|
10898
11164
|
'form-multi-selected': selected.some(function (_option) { return _option.value === option.value; }),
|
|
10899
11165
|
disabled: option.disabled,
|
|
10900
|
-
}), key: index, onClick: function () { return handleOptionOnClick && handleOptionOnClick(option); }, onKeyDown: function (event) { return handleKeyDown(event, option); }, tabIndex: 0 }, optionsTemplate ? optionsTemplate(option) : option.
|
|
11166
|
+
}), key: index, onClick: function () { return handleOptionOnClick && handleOptionOnClick(option); }, onKeyDown: function (event) { return handleKeyDown(event, option); }, tabIndex: 0 }, optionsTemplate ? optionsTemplate(option) : option.label)) : (React$1.createElement("div", { className: "form-multi-select-optgroup-label", key: index }, optionsGroupsTemplate ? optionsGroupsTemplate(option) : option.label));
|
|
10901
11167
|
})) : (React$1.createElement("div", { className: "form-multi-select-options-empty" }, searchNoResultsLabel));
|
|
10902
11168
|
};
|
|
10903
11169
|
return (React$1.createElement(React$1.Fragment, null,
|
|
@@ -10907,16 +11173,16 @@ var CMultiSelectOptions = React$1.forwardRef(function (_a, ref) {
|
|
|
10907
11173
|
loading && React$1.createElement(CElementCover, null)));
|
|
10908
11174
|
});
|
|
10909
11175
|
CMultiSelectOptions.propTypes = {
|
|
10910
|
-
handleOptionOnClick: PropTypes.func,
|
|
10911
|
-
loading: PropTypes.bool,
|
|
10912
|
-
options: PropTypes.array.isRequired,
|
|
10913
|
-
optionsMaxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
10914
|
-
optionsStyle: PropTypes.oneOf(['checkbox', 'text']),
|
|
10915
|
-
optionsTemplate: PropTypes.func,
|
|
10916
|
-
optionsGroupsTemplate: PropTypes.func,
|
|
10917
|
-
searchNoResultsLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
10918
|
-
virtualScroller: PropTypes.bool,
|
|
10919
|
-
visibleItems: PropTypes.number,
|
|
11176
|
+
handleOptionOnClick: PropTypes$1.func,
|
|
11177
|
+
loading: PropTypes$1.bool,
|
|
11178
|
+
options: PropTypes$1.array.isRequired,
|
|
11179
|
+
optionsMaxHeight: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
11180
|
+
optionsStyle: PropTypes$1.oneOf(['checkbox', 'text']),
|
|
11181
|
+
optionsTemplate: PropTypes$1.func,
|
|
11182
|
+
optionsGroupsTemplate: PropTypes$1.func,
|
|
11183
|
+
searchNoResultsLabel: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
11184
|
+
virtualScroller: PropTypes$1.bool,
|
|
11185
|
+
visibleItems: PropTypes$1.number,
|
|
10920
11186
|
};
|
|
10921
11187
|
CMultiSelectOptions.displayName = 'CMultiSelectOptions';
|
|
10922
11188
|
|
|
@@ -10936,7 +11202,7 @@ var CMultiSelectSelection = React$1.forwardRef(function (_a, ref) {
|
|
|
10936
11202
|
selected.map(function (option, index) {
|
|
10937
11203
|
if (selectionType === 'tags') {
|
|
10938
11204
|
return (React$1.createElement("span", { className: "form-multi-select-tag", key: index },
|
|
10939
|
-
option.
|
|
11205
|
+
option.label,
|
|
10940
11206
|
!option.disabled && (React$1.createElement("button", { className: "form-multi-select-tag-delete", "aria-label": "Close", onClick: function () { return onRemove && onRemove(option); } }))));
|
|
10941
11207
|
}
|
|
10942
11208
|
return;
|
|
@@ -10944,20 +11210,20 @@ var CMultiSelectSelection = React$1.forwardRef(function (_a, ref) {
|
|
|
10944
11210
|
multiple &&
|
|
10945
11211
|
selectionType === 'text' &&
|
|
10946
11212
|
selected.map(function (option, index) { return (React$1.createElement("span", { key: index },
|
|
10947
|
-
option.
|
|
11213
|
+
option.label,
|
|
10948
11214
|
index === selected.length - 1 ? '' : ',',
|
|
10949
11215
|
"\u00A0")); }),
|
|
10950
|
-
!multiple && !search && selected.map(function (option) { return option.
|
|
11216
|
+
!multiple && !search && selected.map(function (option) { return option.label; })[0],
|
|
10951
11217
|
children));
|
|
10952
11218
|
});
|
|
10953
11219
|
CMultiSelectSelection.propTypes = {
|
|
10954
|
-
multiple: PropTypes.bool,
|
|
10955
|
-
onRemove: PropTypes.func,
|
|
10956
|
-
placeholder: PropTypes.string,
|
|
10957
|
-
search: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['external'])]),
|
|
10958
|
-
selected: PropTypes.array,
|
|
10959
|
-
selectionType: PropTypes.oneOf(['counter', 'tags', 'text']),
|
|
10960
|
-
selectionTypeCounterText: PropTypes.string,
|
|
11220
|
+
multiple: PropTypes$1.bool,
|
|
11221
|
+
onRemove: PropTypes$1.func,
|
|
11222
|
+
placeholder: PropTypes$1.string,
|
|
11223
|
+
search: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.oneOf(['external'])]),
|
|
11224
|
+
selected: PropTypes$1.array,
|
|
11225
|
+
selectionType: PropTypes$1.oneOf(['counter', 'tags', 'text']),
|
|
11226
|
+
selectionTypeCounterText: PropTypes$1.string,
|
|
10961
11227
|
};
|
|
10962
11228
|
CMultiSelectSelection.displayName = 'CMultiSelectSelection';
|
|
10963
11229
|
|
|
@@ -10984,7 +11250,7 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
10984
11250
|
var flattenedOptions = React$1.useMemo(function () { return flattenOptionsArray(options); }, [JSON.stringify(options)]);
|
|
10985
11251
|
var userOption = React$1.useMemo(function () {
|
|
10986
11252
|
if (allowCreateOptions &&
|
|
10987
|
-
filteredOptions.some(function (option) { return option.
|
|
11253
|
+
filteredOptions.some(function (option) { return option.label && option.label.toLowerCase() === searchValue.toLowerCase(); })) {
|
|
10988
11254
|
return false;
|
|
10989
11255
|
}
|
|
10990
11256
|
return searchRef.current && createOption(String(searchValue), flattenedOptions);
|
|
@@ -11067,7 +11333,7 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11067
11333
|
}
|
|
11068
11334
|
if (!userOption) {
|
|
11069
11335
|
setSelected(__spreadArray(__spreadArray([], selected, true), [
|
|
11070
|
-
filteredOptions.find(function (option) { return String(option.
|
|
11336
|
+
filteredOptions.find(function (option) { return String(option.label).toLowerCase() === searchValue.toLowerCase(); }),
|
|
11071
11337
|
], false));
|
|
11072
11338
|
}
|
|
11073
11339
|
setSearchValue('');
|
|
@@ -11133,7 +11399,7 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11133
11399
|
selectionType === 'counter' && {
|
|
11134
11400
|
placeholder: "".concat(selected.length, " ").concat(selectionTypeCounterText),
|
|
11135
11401
|
}), (selected.length > 0 &&
|
|
11136
|
-
!multiple && { placeholder: selected.map(function (option) { return option.
|
|
11402
|
+
!multiple && { placeholder: selected.map(function (option) { return option.label; })[0] }), (multiple &&
|
|
11137
11403
|
selected.length > 0 &&
|
|
11138
11404
|
selectionType !== 'counter' && { size: searchValue.length + 2 }), { ref: searchRef })))),
|
|
11139
11405
|
React$1.createElement("div", { className: "form-multi-select-buttons" },
|
|
@@ -11149,7 +11415,7 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11149
11415
|
? userOption || []
|
|
11150
11416
|
: filteredOptions, optionsMaxHeight: optionsMaxHeight, optionsStyle: optionsStyle, optionsTemplate: optionsTemplate, optionsGroupsTemplate: optionsGroupsTemplate, searchNoResultsLabel: searchNoResultsLabel, selected: selected, virtualScroller: virtualScroller, visibleItems: visibleItems })))));
|
|
11151
11417
|
});
|
|
11152
|
-
CMultiSelect.propTypes = __assign$1({ className: PropTypes.string, cleaner: PropTypes.bool, clearSearchOnSelect: PropTypes.bool, disabled: PropTypes.bool, loading: PropTypes.bool, multiple: PropTypes.bool, onChange: PropTypes.func, onFilterChange: PropTypes.func, onHide: PropTypes.func, onShow: PropTypes.func, options: PropTypes.array.isRequired, optionsMaxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), optionsStyle: PropTypes.oneOf(['checkbox', 'text']), optionsTemplate: PropTypes.func, optionsGroupsTemplate: PropTypes.func, placeholder: PropTypes.string, required: PropTypes.bool, search: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['external'])]), searchNoResultsLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), selectAll: PropTypes.bool, selectAllLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), selectionType: PropTypes.oneOf(['counter', 'tags', 'text']), selectionTypeCounterText: PropTypes.string, size: PropTypes.oneOf(['sm', 'lg']), virtualScroller: PropTypes.bool, visible: PropTypes.bool, visibleItems: PropTypes.number }, CFormControlWrapper.propTypes);
|
|
11418
|
+
CMultiSelect.propTypes = __assign$1({ className: PropTypes$1.string, cleaner: PropTypes$1.bool, clearSearchOnSelect: PropTypes$1.bool, disabled: PropTypes$1.bool, loading: PropTypes$1.bool, multiple: PropTypes$1.bool, onChange: PropTypes$1.func, onFilterChange: PropTypes$1.func, onHide: PropTypes$1.func, onShow: PropTypes$1.func, options: PropTypes$1.array.isRequired, optionsMaxHeight: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]), optionsStyle: PropTypes$1.oneOf(['checkbox', 'text']), optionsTemplate: PropTypes$1.func, optionsGroupsTemplate: PropTypes$1.func, placeholder: PropTypes$1.string, required: PropTypes$1.bool, search: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.oneOf(['external'])]), searchNoResultsLabel: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]), selectAll: PropTypes$1.bool, selectAllLabel: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]), selectionType: PropTypes$1.oneOf(['counter', 'tags', 'text']), selectionTypeCounterText: PropTypes$1.string, size: PropTypes$1.oneOf(['sm', 'lg']), virtualScroller: PropTypes$1.bool, visible: PropTypes$1.bool, visibleItems: PropTypes$1.number }, CFormControlWrapper.propTypes);
|
|
11153
11419
|
CMultiSelect.displayName = 'CMultiSelect';
|
|
11154
11420
|
|
|
11155
11421
|
var CNav = React$1.forwardRef(function (_a, ref) {
|
|
@@ -11161,11 +11427,11 @@ var CNav = React$1.forwardRef(function (_a, ref) {
|
|
|
11161
11427
|
_b), className), role: "navigation" }, rest, { ref: ref }), children));
|
|
11162
11428
|
});
|
|
11163
11429
|
CNav.propTypes = {
|
|
11164
|
-
children: PropTypes.node,
|
|
11165
|
-
className: PropTypes.string,
|
|
11166
|
-
component: PropTypes.elementType,
|
|
11167
|
-
layout: PropTypes.oneOf(['fill', 'justified']),
|
|
11168
|
-
variant: PropTypes.oneOf(['
|
|
11430
|
+
children: PropTypes$1.node,
|
|
11431
|
+
className: PropTypes$1.string,
|
|
11432
|
+
component: PropTypes$1.elementType,
|
|
11433
|
+
layout: PropTypes$1.oneOf(['fill', 'justified']),
|
|
11434
|
+
variant: PropTypes$1.oneOf(['pills', 'tabs', 'underline']),
|
|
11169
11435
|
};
|
|
11170
11436
|
CNav.displayName = 'CNav';
|
|
11171
11437
|
|
|
@@ -11174,8 +11440,8 @@ var CNavGroupItems = React$1.forwardRef(function (_a, ref) {
|
|
|
11174
11440
|
return (React$1.createElement("ul", __assign$1({ className: classNames$1('nav-group-items', className) }, rest, { ref: ref }), children));
|
|
11175
11441
|
});
|
|
11176
11442
|
CNavGroupItems.propTypes = {
|
|
11177
|
-
children: PropTypes.node,
|
|
11178
|
-
className: PropTypes.string,
|
|
11443
|
+
children: PropTypes$1.node,
|
|
11444
|
+
className: PropTypes$1.string,
|
|
11179
11445
|
};
|
|
11180
11446
|
CNavGroupItems.displayName = 'CNavGroupItems';
|
|
11181
11447
|
|
|
@@ -11199,19 +11465,24 @@ var CSidebarNav = React$1.forwardRef(function (_a, ref) {
|
|
|
11199
11465
|
}))));
|
|
11200
11466
|
});
|
|
11201
11467
|
CSidebarNav.propTypes = {
|
|
11202
|
-
children: PropTypes.node,
|
|
11203
|
-
className: PropTypes.string,
|
|
11468
|
+
children: PropTypes$1.node,
|
|
11469
|
+
className: PropTypes$1.string,
|
|
11204
11470
|
};
|
|
11205
11471
|
CSidebarNav.displayName = 'CSidebarNav';
|
|
11206
11472
|
|
|
11473
|
+
var isInVisibleGroup = function (el1, el2) {
|
|
11474
|
+
var array1 = el1.toString().split('.');
|
|
11475
|
+
var array2 = el2.toString().split('.');
|
|
11476
|
+
return array2.every(function (item, index) { return item === array1[index]; });
|
|
11477
|
+
};
|
|
11207
11478
|
var CNavGroup = React$1.forwardRef(function (_a, ref) {
|
|
11208
11479
|
var children = _a.children, className = _a.className, compact = _a.compact, idx = _a.idx, toggler = _a.toggler, visible = _a.visible, rest = __rest$1(_a, ["children", "className", "compact", "idx", "toggler", "visible"]);
|
|
11209
11480
|
var _b = React$1.useState(), height = _b[0], setHeight = _b[1];
|
|
11210
11481
|
var navItemsRef = React$1.useRef(null);
|
|
11211
11482
|
var _c = React$1.useContext(CNavContext), visibleGroup = _c.visibleGroup, setVisibleGroup = _c.setVisibleGroup;
|
|
11212
|
-
var _d = React$1.useState(Boolean(visible || (idx && visibleGroup && visibleGroup
|
|
11483
|
+
var _d = React$1.useState(Boolean(visible || (idx && visibleGroup && isInVisibleGroup(visibleGroup, idx)))), _visible = _d[0], setVisible = _d[1];
|
|
11213
11484
|
React$1.useEffect(function () {
|
|
11214
|
-
setVisible(Boolean(idx && visibleGroup && visibleGroup
|
|
11485
|
+
setVisible(Boolean(idx && visibleGroup && isInVisibleGroup(visibleGroup, idx)));
|
|
11215
11486
|
}, [visibleGroup]);
|
|
11216
11487
|
var handleTogglerOnCLick = function (event) {
|
|
11217
11488
|
event.preventDefault();
|
|
@@ -11261,12 +11532,12 @@ var CNavGroup = React$1.forwardRef(function (_a, ref) {
|
|
|
11261
11532
|
}))); })));
|
|
11262
11533
|
});
|
|
11263
11534
|
CNavGroup.propTypes = {
|
|
11264
|
-
children: PropTypes.node,
|
|
11265
|
-
className: PropTypes.string,
|
|
11266
|
-
compact: PropTypes.bool,
|
|
11267
|
-
idx: PropTypes.string,
|
|
11268
|
-
toggler: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
11269
|
-
visible: PropTypes.bool,
|
|
11535
|
+
children: PropTypes$1.node,
|
|
11536
|
+
className: PropTypes$1.string,
|
|
11537
|
+
compact: PropTypes$1.bool,
|
|
11538
|
+
idx: PropTypes$1.string,
|
|
11539
|
+
toggler: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
11540
|
+
visible: PropTypes$1.bool,
|
|
11270
11541
|
};
|
|
11271
11542
|
CNavGroup.displayName = 'CNavGroup';
|
|
11272
11543
|
|
|
@@ -11283,9 +11554,9 @@ var CNavLink = React$1.forwardRef(function (_a, ref) {
|
|
|
11283
11554
|
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('nav-link', className) }, rest, { ref: forkedRef }), children));
|
|
11284
11555
|
});
|
|
11285
11556
|
CNavLink.propTypes = {
|
|
11286
|
-
children: PropTypes.node,
|
|
11287
|
-
className: PropTypes.string,
|
|
11288
|
-
idx: PropTypes.string,
|
|
11557
|
+
children: PropTypes$1.node,
|
|
11558
|
+
className: PropTypes$1.string,
|
|
11559
|
+
idx: PropTypes$1.string,
|
|
11289
11560
|
};
|
|
11290
11561
|
CNavLink.displayName = 'CNavLink';
|
|
11291
11562
|
|
|
@@ -11294,8 +11565,8 @@ var CNavItem = React$1.forwardRef(function (_a, ref) {
|
|
|
11294
11565
|
return (React$1.createElement("li", { className: classNames$1('nav-item', className), ref: ref }, rest.href || rest.to ? (React$1.createElement(CNavLink, __assign$1({ className: className }, rest), children)) : (children)));
|
|
11295
11566
|
});
|
|
11296
11567
|
CNavItem.propTypes = {
|
|
11297
|
-
children: PropTypes.node,
|
|
11298
|
-
className: PropTypes.string,
|
|
11568
|
+
children: PropTypes$1.node,
|
|
11569
|
+
className: PropTypes$1.string,
|
|
11299
11570
|
};
|
|
11300
11571
|
CNavItem.displayName = 'CNavItem';
|
|
11301
11572
|
|
|
@@ -11304,8 +11575,8 @@ var CNavTitle = React$1.forwardRef(function (_a, ref) {
|
|
|
11304
11575
|
return (React$1.createElement("li", __assign$1({ className: classNames$1('nav-title', className) }, rest, { ref: ref }), children));
|
|
11305
11576
|
});
|
|
11306
11577
|
CNavTitle.propTypes = {
|
|
11307
|
-
children: PropTypes.node,
|
|
11308
|
-
className: PropTypes.string,
|
|
11578
|
+
children: PropTypes$1.node,
|
|
11579
|
+
className: PropTypes$1.string,
|
|
11309
11580
|
};
|
|
11310
11581
|
CNavTitle.displayName = 'CNavTitle';
|
|
11311
11582
|
|
|
@@ -11314,19 +11585,18 @@ var CNavbar = React$1.forwardRef(function (_a, ref) {
|
|
|
11314
11585
|
var children = _a.children, className = _a.className, color = _a.color, colorScheme = _a.colorScheme, _c = _a.component, Component = _c === void 0 ? 'nav' : _c, container = _a.container, expand = _a.expand, placement = _a.placement, rest = __rest$1(_a, ["children", "className", "color", "colorScheme", "component", "container", "expand", "placement"]);
|
|
11315
11586
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar', (_b = {},
|
|
11316
11587
|
_b["bg-".concat(color)] = color,
|
|
11317
|
-
_b["navbar-".concat(colorScheme)] = colorScheme,
|
|
11318
11588
|
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-".concat(expand)] = expand,
|
|
11319
|
-
_b), placement, className) }, rest, { ref: ref }), container ? (React$1.createElement("div", { className: typeof container === 'string' ? "container-".concat(container) : 'container' }, children)) : (React$1.createElement(React$1.Fragment, null, children))));
|
|
11589
|
+
_b), placement, className) }, (colorScheme && { 'data-coreui-theme': colorScheme }), rest, { ref: ref }), container ? (React$1.createElement("div", { className: typeof container === 'string' ? "container-".concat(container) : 'container' }, children)) : (React$1.createElement(React$1.Fragment, null, children))));
|
|
11320
11590
|
});
|
|
11321
11591
|
CNavbar.propTypes = {
|
|
11322
|
-
children: PropTypes.node,
|
|
11323
|
-
className: PropTypes.string,
|
|
11592
|
+
children: PropTypes$1.node,
|
|
11593
|
+
className: PropTypes$1.string,
|
|
11324
11594
|
color: colorPropType,
|
|
11325
|
-
colorScheme: PropTypes.oneOf(['dark', 'light']),
|
|
11326
|
-
component: PropTypes.elementType,
|
|
11327
|
-
container: PropTypes.oneOfType([
|
|
11328
|
-
PropTypes.bool,
|
|
11329
|
-
PropTypes.oneOf([
|
|
11595
|
+
colorScheme: PropTypes$1.oneOf(['dark', 'light']),
|
|
11596
|
+
component: PropTypes$1.elementType,
|
|
11597
|
+
container: PropTypes$1.oneOfType([
|
|
11598
|
+
PropTypes$1.bool,
|
|
11599
|
+
PropTypes$1.oneOf([
|
|
11330
11600
|
'sm',
|
|
11331
11601
|
'md',
|
|
11332
11602
|
'lg',
|
|
@@ -11335,11 +11605,11 @@ CNavbar.propTypes = {
|
|
|
11335
11605
|
'fluid',
|
|
11336
11606
|
]),
|
|
11337
11607
|
]),
|
|
11338
|
-
expand: PropTypes.oneOfType([
|
|
11339
|
-
PropTypes.bool,
|
|
11340
|
-
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
11608
|
+
expand: PropTypes$1.oneOfType([
|
|
11609
|
+
PropTypes$1.bool,
|
|
11610
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
11341
11611
|
]),
|
|
11342
|
-
placement: PropTypes.oneOf(['fixed-top', 'fixed-bottom', 'sticky-top']),
|
|
11612
|
+
placement: PropTypes$1.oneOf(['fixed-top', 'fixed-bottom', 'sticky-top']),
|
|
11343
11613
|
};
|
|
11344
11614
|
CNavbar.displayName = 'CNavbar';
|
|
11345
11615
|
|
|
@@ -11349,9 +11619,9 @@ var CNavbarBrand = React$1.forwardRef(function (_a, ref) {
|
|
|
11349
11619
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar-brand', className) }, rest, { ref: ref }), children));
|
|
11350
11620
|
});
|
|
11351
11621
|
CNavbarBrand.propTypes = {
|
|
11352
|
-
children: PropTypes.node,
|
|
11353
|
-
className: PropTypes.string,
|
|
11354
|
-
component: PropTypes.elementType,
|
|
11622
|
+
children: PropTypes$1.node,
|
|
11623
|
+
className: PropTypes$1.string,
|
|
11624
|
+
component: PropTypes$1.elementType,
|
|
11355
11625
|
};
|
|
11356
11626
|
CNavbarBrand.displayName = 'CNavbarBrand';
|
|
11357
11627
|
|
|
@@ -11360,9 +11630,9 @@ var CNavbarNav = React$1.forwardRef(function (_a, ref) {
|
|
|
11360
11630
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
11361
11631
|
});
|
|
11362
11632
|
CNavbarNav.propTypes = {
|
|
11363
|
-
children: PropTypes.node,
|
|
11364
|
-
className: PropTypes.string,
|
|
11365
|
-
component: PropTypes.elementType,
|
|
11633
|
+
children: PropTypes$1.node,
|
|
11634
|
+
className: PropTypes$1.string,
|
|
11635
|
+
component: PropTypes$1.elementType,
|
|
11366
11636
|
};
|
|
11367
11637
|
CNavbarNav.displayName = 'CNavbarNav';
|
|
11368
11638
|
|
|
@@ -11371,8 +11641,8 @@ var CNavbarText = React$1.forwardRef(function (_a, ref) {
|
|
|
11371
11641
|
return (React$1.createElement("span", __assign$1({ className: classNames$1('navbar-text', className) }, rest, { ref: ref }), children));
|
|
11372
11642
|
});
|
|
11373
11643
|
CNavbarText.propTypes = {
|
|
11374
|
-
children: PropTypes.node,
|
|
11375
|
-
className: PropTypes.string,
|
|
11644
|
+
children: PropTypes$1.node,
|
|
11645
|
+
className: PropTypes$1.string,
|
|
11376
11646
|
};
|
|
11377
11647
|
CNavbarText.displayName = 'CNavbarText';
|
|
11378
11648
|
|
|
@@ -11381,13 +11651,13 @@ var CNavbarToggler = React$1.forwardRef(function (_a, ref) {
|
|
|
11381
11651
|
return (React$1.createElement("button", __assign$1({ type: "button", className: classNames$1('navbar-toggler', className) }, rest, { ref: ref }), children !== null && children !== void 0 ? children : React$1.createElement("span", { className: "navbar-toggler-icon" })));
|
|
11382
11652
|
});
|
|
11383
11653
|
CNavbarToggler.propTypes = {
|
|
11384
|
-
children: PropTypes.node,
|
|
11385
|
-
className: PropTypes.string,
|
|
11654
|
+
children: PropTypes$1.node,
|
|
11655
|
+
className: PropTypes$1.string,
|
|
11386
11656
|
};
|
|
11387
11657
|
CNavbarToggler.displayName = 'CNavbarToggler';
|
|
11388
11658
|
|
|
11389
11659
|
var COffcanvas = React$1.forwardRef(function (_a, ref) {
|
|
11390
|
-
var children = _a.children, _b = _a.backdrop, backdrop = _b === void 0 ? true : _b, className = _a.className, _c = _a.keyboard, keyboard = _c === void 0 ? true : _c, onHide = _a.onHide, onShow = _a.onShow, placement = _a.placement, _d = _a.portal, portal = _d === void 0 ? false : _d, _e = _a.responsive, responsive = _e === void 0 ? true : _e, _f = _a.scroll, scroll = _f === void 0 ? false : _f, _g = _a.visible, visible = _g === void 0 ? false : _g, rest = __rest$1(_a, ["children", "backdrop", "className", "keyboard", "onHide", "onShow", "placement", "portal", "responsive", "scroll", "visible"]);
|
|
11660
|
+
var children = _a.children, _b = _a.backdrop, backdrop = _b === void 0 ? true : _b, className = _a.className, dark = _a.dark, _c = _a.keyboard, keyboard = _c === void 0 ? true : _c, onHide = _a.onHide, onShow = _a.onShow, placement = _a.placement, _d = _a.portal, portal = _d === void 0 ? false : _d, _e = _a.responsive, responsive = _e === void 0 ? true : _e, _f = _a.scroll, scroll = _f === void 0 ? false : _f, _g = _a.visible, visible = _g === void 0 ? false : _g, rest = __rest$1(_a, ["children", "backdrop", "className", "dark", "keyboard", "onHide", "onShow", "placement", "portal", "responsive", "scroll", "visible"]);
|
|
11391
11661
|
var _h = React$1.useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
11392
11662
|
var offcanvasRef = React$1.useRef(null);
|
|
11393
11663
|
var forkedRef = useForkedRef(ref, offcanvasRef);
|
|
@@ -11428,27 +11698,28 @@ var COffcanvas = React$1.forwardRef(function (_a, ref) {
|
|
|
11428
11698
|
_a.showing = state === 'entering',
|
|
11429
11699
|
_a.show = state === 'entered',
|
|
11430
11700
|
_a['show hiding'] = state === 'exiting',
|
|
11431
|
-
_a), className), role: "dialog", tabIndex: -1, onKeyDown: handleKeyDown }, rest, { ref: forkedRef }), children)));
|
|
11701
|
+
_a), className), role: "dialog", tabIndex: -1, onKeyDown: handleKeyDown }, (dark && { 'data-coreui-theme': 'dark' }), rest, { ref: forkedRef }), children)));
|
|
11432
11702
|
}),
|
|
11433
11703
|
backdrop && (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
11434
11704
|
React$1.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleBackdropDismiss, visible: _visible })))));
|
|
11435
11705
|
});
|
|
11436
11706
|
COffcanvas.propTypes = {
|
|
11437
|
-
backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['static'])]),
|
|
11438
|
-
children: PropTypes.node,
|
|
11439
|
-
className: PropTypes.string,
|
|
11440
|
-
|
|
11441
|
-
|
|
11442
|
-
|
|
11443
|
-
|
|
11707
|
+
backdrop: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.oneOf(['static'])]),
|
|
11708
|
+
children: PropTypes$1.node,
|
|
11709
|
+
className: PropTypes$1.string,
|
|
11710
|
+
dark: PropTypes$1.bool,
|
|
11711
|
+
keyboard: PropTypes$1.bool,
|
|
11712
|
+
onHide: PropTypes$1.func,
|
|
11713
|
+
onShow: PropTypes$1.func,
|
|
11714
|
+
placement: PropTypes$1.oneOf(['start', 'end', 'top', 'bottom'])
|
|
11444
11715
|
.isRequired,
|
|
11445
|
-
portal: PropTypes.bool,
|
|
11446
|
-
responsive: PropTypes.oneOfType([
|
|
11447
|
-
PropTypes.bool,
|
|
11448
|
-
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
11716
|
+
portal: PropTypes$1.bool,
|
|
11717
|
+
responsive: PropTypes$1.oneOfType([
|
|
11718
|
+
PropTypes$1.bool,
|
|
11719
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
11449
11720
|
]),
|
|
11450
|
-
scroll: PropTypes.bool,
|
|
11451
|
-
visible: PropTypes.bool,
|
|
11721
|
+
scroll: PropTypes$1.bool,
|
|
11722
|
+
visible: PropTypes$1.bool,
|
|
11452
11723
|
};
|
|
11453
11724
|
COffcanvas.displayName = 'COffcanvas';
|
|
11454
11725
|
|
|
@@ -11457,8 +11728,8 @@ var COffcanvasBody = React$1.forwardRef(function (_a, ref) {
|
|
|
11457
11728
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('offcanvas-body', className) }, rest, { ref: ref }), children));
|
|
11458
11729
|
});
|
|
11459
11730
|
COffcanvasBody.propTypes = {
|
|
11460
|
-
children: PropTypes.node,
|
|
11461
|
-
className: PropTypes.string,
|
|
11731
|
+
children: PropTypes$1.node,
|
|
11732
|
+
className: PropTypes$1.string,
|
|
11462
11733
|
};
|
|
11463
11734
|
COffcanvasBody.displayName = 'COffcanvasBody';
|
|
11464
11735
|
|
|
@@ -11467,8 +11738,8 @@ var COffcanvasHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
11467
11738
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('offcanvas-header', className) }, rest, { ref: ref }), children));
|
|
11468
11739
|
});
|
|
11469
11740
|
COffcanvasHeader.propTypes = {
|
|
11470
|
-
children: PropTypes.node,
|
|
11471
|
-
className: PropTypes.string,
|
|
11741
|
+
children: PropTypes$1.node,
|
|
11742
|
+
className: PropTypes$1.string,
|
|
11472
11743
|
};
|
|
11473
11744
|
COffcanvasHeader.displayName = 'COffcanvasHeader';
|
|
11474
11745
|
|
|
@@ -11477,9 +11748,9 @@ var COffcanvasTitle = React$1.forwardRef(function (_a, ref) {
|
|
|
11477
11748
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('offcanvas-title', className) }, rest, { ref: ref }), children));
|
|
11478
11749
|
});
|
|
11479
11750
|
COffcanvasTitle.propTypes = {
|
|
11480
|
-
children: PropTypes.node,
|
|
11481
|
-
className: PropTypes.string,
|
|
11482
|
-
component: PropTypes.elementType,
|
|
11751
|
+
children: PropTypes$1.node,
|
|
11752
|
+
className: PropTypes$1.string,
|
|
11753
|
+
component: PropTypes$1.elementType,
|
|
11483
11754
|
};
|
|
11484
11755
|
COffcanvasTitle.displayName = 'COffcanvasTitle';
|
|
11485
11756
|
|
|
@@ -11493,10 +11764,10 @@ var CPagination = React$1.forwardRef(function (_a, ref) {
|
|
|
11493
11764
|
_b), className) }, children)));
|
|
11494
11765
|
});
|
|
11495
11766
|
CPagination.propTypes = {
|
|
11496
|
-
align: PropTypes.oneOf(['start', 'center', 'end']),
|
|
11497
|
-
children: PropTypes.node,
|
|
11498
|
-
className: PropTypes.string,
|
|
11499
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
11767
|
+
align: PropTypes$1.oneOf(['start', 'center', 'end']),
|
|
11768
|
+
children: PropTypes$1.node,
|
|
11769
|
+
className: PropTypes$1.string,
|
|
11770
|
+
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
11500
11771
|
};
|
|
11501
11772
|
CPagination.displayName = 'CPagination';
|
|
11502
11773
|
|
|
@@ -11509,9 +11780,9 @@ var CPaginationItem = React$1.forwardRef(function (_a, ref) {
|
|
|
11509
11780
|
}, className) }, (rest.active && { 'aria-current': 'page' })), Component === 'a' ? (React$1.createElement(CLink, __assign$1({ className: "page-link", component: Component }, rest, { ref: ref }), children)) : (React$1.createElement(Component, { className: "page-link", ref: ref }, children))));
|
|
11510
11781
|
});
|
|
11511
11782
|
CPaginationItem.propTypes = {
|
|
11512
|
-
children: PropTypes.node,
|
|
11513
|
-
className: PropTypes.string,
|
|
11514
|
-
component: PropTypes.elementType,
|
|
11783
|
+
children: PropTypes$1.node,
|
|
11784
|
+
className: PropTypes$1.string,
|
|
11785
|
+
component: PropTypes$1.elementType,
|
|
11515
11786
|
};
|
|
11516
11787
|
CPaginationItem.displayName = 'CPaginationItem';
|
|
11517
11788
|
|
|
@@ -11544,12 +11815,12 @@ var CPlaceholder = React$1.forwardRef(function (_a, ref) {
|
|
|
11544
11815
|
_b), repsonsiveClassNames, className) }, rest, { ref: ref }), children));
|
|
11545
11816
|
});
|
|
11546
11817
|
CPlaceholder.propTypes = {
|
|
11547
|
-
animation: PropTypes.oneOf(['glow', 'wave']),
|
|
11548
|
-
children: PropTypes.node,
|
|
11549
|
-
className: PropTypes.string,
|
|
11818
|
+
animation: PropTypes$1.oneOf(['glow', 'wave']),
|
|
11819
|
+
children: PropTypes$1.node,
|
|
11820
|
+
className: PropTypes$1.string,
|
|
11550
11821
|
color: colorPropType,
|
|
11551
|
-
component: PropTypes.elementType,
|
|
11552
|
-
size: PropTypes.oneOf(['xs', 'sm', 'lg']),
|
|
11822
|
+
component: PropTypes$1.elementType,
|
|
11823
|
+
size: PropTypes$1.oneOf(['xs', 'sm', 'lg']),
|
|
11553
11824
|
};
|
|
11554
11825
|
CPlaceholder.displayName = 'CPlaceholder';
|
|
11555
11826
|
|
|
@@ -11562,8 +11833,8 @@ var CProgressStacked = React$1.forwardRef(function (_a, ref) {
|
|
|
11562
11833
|
} }, children)));
|
|
11563
11834
|
});
|
|
11564
11835
|
CProgressStacked.propTypes = {
|
|
11565
|
-
children: PropTypes.node,
|
|
11566
|
-
className: PropTypes.string,
|
|
11836
|
+
children: PropTypes$1.node,
|
|
11837
|
+
className: PropTypes$1.string,
|
|
11567
11838
|
};
|
|
11568
11839
|
CProgressStacked.displayName = 'CProgressStacked';
|
|
11569
11840
|
|
|
@@ -11578,12 +11849,12 @@ var CProgressBar = React$1.forwardRef(function (_a, ref) {
|
|
|
11578
11849
|
_b), className) }, (!stacked && { style: { width: "".concat(value, "%") } }), rest, { ref: ref }), children));
|
|
11579
11850
|
});
|
|
11580
11851
|
CProgressBar.propTypes = {
|
|
11581
|
-
animated: PropTypes.bool,
|
|
11582
|
-
children: PropTypes.node,
|
|
11583
|
-
className: PropTypes.string,
|
|
11584
|
-
color: PropTypes.oneOfType([colorPropType, gradientsPropType]),
|
|
11585
|
-
value: PropTypes.number,
|
|
11586
|
-
variant: PropTypes.oneOf(['striped']),
|
|
11852
|
+
animated: PropTypes$1.bool,
|
|
11853
|
+
children: PropTypes$1.node,
|
|
11854
|
+
className: PropTypes$1.string,
|
|
11855
|
+
color: PropTypes$1.oneOfType([colorPropType, gradientsPropType]),
|
|
11856
|
+
value: PropTypes$1.number,
|
|
11857
|
+
variant: PropTypes$1.oneOf(['striped']),
|
|
11587
11858
|
};
|
|
11588
11859
|
CProgressBar.displayName = 'CProgressBar';
|
|
11589
11860
|
|
|
@@ -11609,13 +11880,13 @@ var CProgress = React$1.forwardRef(function (_a, ref) {
|
|
|
11609
11880
|
})) : (React$1.createElement(CProgressBar, __assign$1({}, (progressBarClassName && { className: progressBarClassName }), { value: value }, rest), children))));
|
|
11610
11881
|
});
|
|
11611
11882
|
CProgress.propTypes = {
|
|
11612
|
-
children: PropTypes.node,
|
|
11613
|
-
className: PropTypes.string,
|
|
11614
|
-
height: PropTypes.number,
|
|
11615
|
-
progressBarClassName: PropTypes.string,
|
|
11616
|
-
thin: PropTypes.bool,
|
|
11617
|
-
value: PropTypes.number,
|
|
11618
|
-
white: PropTypes.bool,
|
|
11883
|
+
children: PropTypes$1.node,
|
|
11884
|
+
className: PropTypes$1.string,
|
|
11885
|
+
height: PropTypes$1.number,
|
|
11886
|
+
progressBarClassName: PropTypes$1.string,
|
|
11887
|
+
thin: PropTypes$1.bool,
|
|
11888
|
+
value: PropTypes$1.number,
|
|
11889
|
+
white: PropTypes$1.bool,
|
|
11619
11890
|
};
|
|
11620
11891
|
CProgress.displayName = 'CProgress';
|
|
11621
11892
|
|
|
@@ -11680,7 +11951,7 @@ var CPopover = function (_a) {
|
|
|
11680
11951
|
typeof window !== 'undefined' &&
|
|
11681
11952
|
ReactDOM.createPortal(React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: popoverRef, onEnter: onShow, onExit: onHide, timeout: {
|
|
11682
11953
|
enter: 0,
|
|
11683
|
-
exit: 200,
|
|
11954
|
+
exit: popoverRef.current ? getTransitionDurationFromElement(popoverRef.current) + 50 : 200,
|
|
11684
11955
|
}, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('popover', 'bs-popover-auto', {
|
|
11685
11956
|
fade: animation,
|
|
11686
11957
|
show: state === 'entered',
|
|
@@ -11690,25 +11961,25 @@ var CPopover = function (_a) {
|
|
|
11690
11961
|
React$1.createElement("div", { className: "popover-body" }, content))); }), document.body)));
|
|
11691
11962
|
};
|
|
11692
11963
|
CPopover.propTypes = {
|
|
11693
|
-
animation: PropTypes.bool,
|
|
11694
|
-
children: PropTypes.node,
|
|
11695
|
-
className: PropTypes.string,
|
|
11696
|
-
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
11697
|
-
delay: PropTypes.oneOfType([
|
|
11698
|
-
PropTypes.number,
|
|
11699
|
-
PropTypes.shape({
|
|
11700
|
-
show: PropTypes.number.isRequired,
|
|
11701
|
-
hide: PropTypes.number.isRequired,
|
|
11964
|
+
animation: PropTypes$1.bool,
|
|
11965
|
+
children: PropTypes$1.node,
|
|
11966
|
+
className: PropTypes$1.string,
|
|
11967
|
+
content: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
11968
|
+
delay: PropTypes$1.oneOfType([
|
|
11969
|
+
PropTypes$1.number,
|
|
11970
|
+
PropTypes$1.shape({
|
|
11971
|
+
show: PropTypes$1.number.isRequired,
|
|
11972
|
+
hide: PropTypes$1.number.isRequired,
|
|
11702
11973
|
}),
|
|
11703
11974
|
]),
|
|
11704
11975
|
fallbackPlacements: fallbackPlacementsPropType,
|
|
11705
|
-
offset: PropTypes.any,
|
|
11706
|
-
onHide: PropTypes.func,
|
|
11707
|
-
onShow: PropTypes.func,
|
|
11708
|
-
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
11709
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
11976
|
+
offset: PropTypes$1.any,
|
|
11977
|
+
onHide: PropTypes$1.func,
|
|
11978
|
+
onShow: PropTypes$1.func,
|
|
11979
|
+
placement: PropTypes$1.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
11980
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
11710
11981
|
trigger: triggerPropType,
|
|
11711
|
-
visible: PropTypes.bool,
|
|
11982
|
+
visible: PropTypes$1.bool,
|
|
11712
11983
|
};
|
|
11713
11984
|
CPopover.displayName = 'CPopover';
|
|
11714
11985
|
|
|
@@ -11734,6 +12005,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
11734
12005
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
11735
12006
|
PERFORMANCE OF THIS SOFTWARE.
|
|
11736
12007
|
***************************************************************************** */
|
|
12008
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
12009
|
+
|
|
11737
12010
|
|
|
11738
12011
|
var __assign = function() {
|
|
11739
12012
|
__assign = Object.assign || function __assign(t) {
|
|
@@ -11756,6 +12029,15 @@ function __rest(s, e) {
|
|
|
11756
12029
|
t[p[i]] = s[p[i]];
|
|
11757
12030
|
}
|
|
11758
12031
|
return t;
|
|
12032
|
+
}
|
|
12033
|
+
|
|
12034
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
12035
|
+
var e = new Error(message);
|
|
12036
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
12037
|
+
};
|
|
12038
|
+
|
|
12039
|
+
function getDefaultExportFromCjs (x) {
|
|
12040
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
11759
12041
|
}
|
|
11760
12042
|
|
|
11761
12043
|
var propTypes = {exports: {}};
|
|
@@ -11981,14 +12263,12 @@ var hasRequiredReactIs;
|
|
|
11981
12263
|
function requireReactIs () {
|
|
11982
12264
|
if (hasRequiredReactIs) return reactIs.exports;
|
|
11983
12265
|
hasRequiredReactIs = 1;
|
|
11984
|
-
(function (module) {
|
|
11985
12266
|
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
} (reactIs));
|
|
12267
|
+
if (process.env.NODE_ENV === 'production') {
|
|
12268
|
+
reactIs.exports = requireReactIs_production_min();
|
|
12269
|
+
} else {
|
|
12270
|
+
reactIs.exports = requireReactIs_development();
|
|
12271
|
+
}
|
|
11992
12272
|
return reactIs.exports;
|
|
11993
12273
|
}
|
|
11994
12274
|
|
|
@@ -12940,12 +13220,15 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
12940
13220
|
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
12941
13221
|
}
|
|
12942
13222
|
|
|
13223
|
+
var propTypesExports = propTypes.exports;
|
|
13224
|
+
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
13225
|
+
|
|
12943
13226
|
var classnames = {exports: {}};
|
|
12944
13227
|
|
|
12945
13228
|
/*!
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
13229
|
+
Copyright (c) 2018 Jed Watson.
|
|
13230
|
+
Licensed under the MIT License (MIT), see
|
|
13231
|
+
http://jedwatson.github.io/classnames
|
|
12949
13232
|
*/
|
|
12950
13233
|
|
|
12951
13234
|
(function (module) {
|
|
@@ -12974,14 +13257,15 @@ var classnames = {exports: {}};
|
|
|
12974
13257
|
}
|
|
12975
13258
|
}
|
|
12976
13259
|
} else if (argType === 'object') {
|
|
12977
|
-
if (arg.toString
|
|
12978
|
-
for (var key in arg) {
|
|
12979
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
12980
|
-
classes.push(key);
|
|
12981
|
-
}
|
|
12982
|
-
}
|
|
12983
|
-
} else {
|
|
13260
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
12984
13261
|
classes.push(arg.toString());
|
|
13262
|
+
continue;
|
|
13263
|
+
}
|
|
13264
|
+
|
|
13265
|
+
for (var key in arg) {
|
|
13266
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
13267
|
+
classes.push(key);
|
|
13268
|
+
}
|
|
12985
13269
|
}
|
|
12986
13270
|
}
|
|
12987
13271
|
}
|
|
@@ -12995,10 +13279,11 @@ var classnames = {exports: {}};
|
|
|
12995
13279
|
} else {
|
|
12996
13280
|
window.classNames = classNames;
|
|
12997
13281
|
}
|
|
12998
|
-
}());
|
|
13282
|
+
}());
|
|
12999
13283
|
} (classnames));
|
|
13000
13284
|
|
|
13001
|
-
var
|
|
13285
|
+
var classnamesExports = classnames.exports;
|
|
13286
|
+
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
13002
13287
|
|
|
13003
13288
|
var toCamelCase = function (str) {
|
|
13004
13289
|
return str
|
|
@@ -13025,11 +13310,9 @@ var CIcon = React$1.forwardRef(function (_a, ref) {
|
|
|
13025
13310
|
console.warn('[CIcon] The `name` property is deprecated and will be removed in v3, please use `icon="..."` instead of.');
|
|
13026
13311
|
}
|
|
13027
13312
|
React$1.useMemo(function () { return setChange(change + 1); }, [_icon, JSON.stringify(_icon)]);
|
|
13028
|
-
var iconName = React$1.useMemo(function () {
|
|
13029
|
-
return _icon && typeof _icon === 'string' && _icon.includes('-') ? toCamelCase(_icon) : _icon;
|
|
13030
|
-
}, [change]);
|
|
13031
13313
|
var titleCode = title ? "<title>".concat(title, "</title>") : '';
|
|
13032
13314
|
var code = React$1.useMemo(function () {
|
|
13315
|
+
var iconName = _icon && typeof _icon === 'string' && _icon.includes('-') ? toCamelCase(_icon) : _icon;
|
|
13033
13316
|
if (Array.isArray(_icon)) {
|
|
13034
13317
|
return _icon;
|
|
13035
13318
|
}
|
|
@@ -13046,24 +13329,25 @@ var CIcon = React$1.forwardRef(function (_a, ref) {
|
|
|
13046
13329
|
var viewBox = (function () {
|
|
13047
13330
|
return rest['viewBox'] || "0 0 ".concat(scale);
|
|
13048
13331
|
})();
|
|
13049
|
-
// render
|
|
13050
13332
|
var _className = customClassName
|
|
13051
13333
|
? classNames(customClassName)
|
|
13052
13334
|
: classNames('icon', (_b = {},
|
|
13053
13335
|
_b["icon-".concat(size)] = size,
|
|
13054
13336
|
_b["icon-custom-size"] = height || width,
|
|
13055
13337
|
_b), className);
|
|
13056
|
-
return
|
|
13057
|
-
|
|
13338
|
+
return (React$1.createElement(React$1.Fragment, null,
|
|
13339
|
+
use ? (React$1.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", className: _className }, (height && { height: height }), (width && { width: width }), { role: "img", "aria-hidden": "true" }, rest, { ref: ref }),
|
|
13340
|
+
React$1.createElement("use", { href: use }))) : (React$1.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: viewBox, className: _className }, (height && { height: height }), (width && { width: width }), { role: "img", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: titleCode + iconCode } }, rest, { ref: ref }))),
|
|
13341
|
+
title && React$1.createElement("span", { className: "visually-hidden" }, title)));
|
|
13058
13342
|
});
|
|
13059
13343
|
CIcon.propTypes = {
|
|
13060
|
-
className:
|
|
13061
|
-
content:
|
|
13062
|
-
customClassName:
|
|
13063
|
-
height:
|
|
13064
|
-
icon:
|
|
13065
|
-
name:
|
|
13066
|
-
size:
|
|
13344
|
+
className: PropTypes.string,
|
|
13345
|
+
content: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
13346
|
+
customClassName: PropTypes.string,
|
|
13347
|
+
height: PropTypes.number,
|
|
13348
|
+
icon: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
13349
|
+
name: PropTypes.string,
|
|
13350
|
+
size: PropTypes.oneOf([
|
|
13067
13351
|
'custom',
|
|
13068
13352
|
'custom-size',
|
|
13069
13353
|
'sm',
|
|
@@ -13078,9 +13362,9 @@ CIcon.propTypes = {
|
|
|
13078
13362
|
'8xl',
|
|
13079
13363
|
'9xl',
|
|
13080
13364
|
]),
|
|
13081
|
-
title:
|
|
13082
|
-
use:
|
|
13083
|
-
width:
|
|
13365
|
+
title: PropTypes.any,
|
|
13366
|
+
use: PropTypes.any,
|
|
13367
|
+
width: PropTypes.number,
|
|
13084
13368
|
};
|
|
13085
13369
|
CIcon.displayName = 'CIcon';
|
|
13086
13370
|
|
|
@@ -13141,20 +13425,20 @@ var CSmartPagination = React$1.forwardRef(function (_a, ref) {
|
|
|
13141
13425
|
doubleArrows && (React$1.createElement(CPaginationItem, { onClick: function () { return setPage(pages); }, "aria-label": "Go to last page", "aria-disabled": activePage === pages, disabled: activePage === pages }, lastButton))));
|
|
13142
13426
|
});
|
|
13143
13427
|
CSmartPagination.propTypes = {
|
|
13144
|
-
className: PropTypes.oneOfType([PropTypes.string]),
|
|
13145
|
-
activePage: PropTypes.number,
|
|
13146
|
-
dots: PropTypes.bool,
|
|
13147
|
-
arrows: PropTypes.bool,
|
|
13148
|
-
doubleArrows: PropTypes.bool,
|
|
13149
|
-
firstButton: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
13150
|
-
previousButton: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
13151
|
-
nextButton: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
13152
|
-
lastButton: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
13153
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
13154
|
-
align: PropTypes.oneOf(['start', 'center', 'end']),
|
|
13155
|
-
limit: PropTypes.number,
|
|
13156
|
-
pages: PropTypes.number.isRequired,
|
|
13157
|
-
onActivePageChange: PropTypes.func,
|
|
13428
|
+
className: PropTypes$1.oneOfType([PropTypes$1.string]),
|
|
13429
|
+
activePage: PropTypes$1.number,
|
|
13430
|
+
dots: PropTypes$1.bool,
|
|
13431
|
+
arrows: PropTypes$1.bool,
|
|
13432
|
+
doubleArrows: PropTypes$1.bool,
|
|
13433
|
+
firstButton: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
13434
|
+
previousButton: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
13435
|
+
nextButton: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
13436
|
+
lastButton: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
13437
|
+
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
13438
|
+
align: PropTypes$1.oneOf(['start', 'center', 'end']),
|
|
13439
|
+
limit: PropTypes$1.number,
|
|
13440
|
+
pages: PropTypes$1.number.isRequired,
|
|
13441
|
+
onActivePageChange: PropTypes$1.func,
|
|
13158
13442
|
};
|
|
13159
13443
|
CSmartPagination.displayName = 'CSmartPagination';
|
|
13160
13444
|
|
|
@@ -13166,8 +13450,8 @@ var CTableHead = React$1.forwardRef(function (_a, ref) {
|
|
|
13166
13450
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13167
13451
|
});
|
|
13168
13452
|
CTableHead.propTypes = {
|
|
13169
|
-
children: PropTypes.node,
|
|
13170
|
-
className: PropTypes.string,
|
|
13453
|
+
children: PropTypes$1.node,
|
|
13454
|
+
className: PropTypes$1.string,
|
|
13171
13455
|
color: colorPropType,
|
|
13172
13456
|
};
|
|
13173
13457
|
CTableHead.displayName = 'CTableHead';
|
|
@@ -13180,8 +13464,8 @@ var CTableHeaderCell = React$1.forwardRef(function (_a, ref) {
|
|
|
13180
13464
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13181
13465
|
});
|
|
13182
13466
|
CTableHeaderCell.propTypes = {
|
|
13183
|
-
children: PropTypes.node,
|
|
13184
|
-
className: PropTypes.string,
|
|
13467
|
+
children: PropTypes$1.node,
|
|
13468
|
+
className: PropTypes$1.string,
|
|
13185
13469
|
color: colorPropType,
|
|
13186
13470
|
};
|
|
13187
13471
|
CTableHeaderCell.displayName = 'CTableHeaderCell';
|
|
@@ -13194,8 +13478,8 @@ var CTableBody = React$1.forwardRef(function (_a, ref) {
|
|
|
13194
13478
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13195
13479
|
});
|
|
13196
13480
|
CTableBody.propTypes = {
|
|
13197
|
-
children: PropTypes.node,
|
|
13198
|
-
className: PropTypes.string,
|
|
13481
|
+
children: PropTypes$1.node,
|
|
13482
|
+
className: PropTypes$1.string,
|
|
13199
13483
|
color: colorPropType,
|
|
13200
13484
|
};
|
|
13201
13485
|
CTableBody.displayName = 'CTableBody';
|
|
@@ -13211,10 +13495,10 @@ var CTableDataCell = React$1.forwardRef(function (_a, ref) {
|
|
|
13211
13495
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13212
13496
|
});
|
|
13213
13497
|
CTableDataCell.propTypes = {
|
|
13214
|
-
active: PropTypes.bool,
|
|
13215
|
-
align: PropTypes.oneOf(['bottom', 'middle', 'top']),
|
|
13216
|
-
children: PropTypes.node,
|
|
13217
|
-
className: PropTypes.string,
|
|
13498
|
+
active: PropTypes$1.bool,
|
|
13499
|
+
align: PropTypes$1.oneOf(['bottom', 'middle', 'top']),
|
|
13500
|
+
children: PropTypes$1.node,
|
|
13501
|
+
className: PropTypes$1.string,
|
|
13218
13502
|
color: colorPropType,
|
|
13219
13503
|
};
|
|
13220
13504
|
CTableDataCell.displayName = 'CTableDataCell';
|
|
@@ -13229,10 +13513,10 @@ var CTableRow = React$1.forwardRef(function (_a, ref) {
|
|
|
13229
13513
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13230
13514
|
});
|
|
13231
13515
|
CTableRow.propTypes = {
|
|
13232
|
-
active: PropTypes.bool,
|
|
13233
|
-
align: PropTypes.oneOf(['bottom', 'middle', 'top']),
|
|
13234
|
-
children: PropTypes.node,
|
|
13235
|
-
className: PropTypes.string,
|
|
13516
|
+
active: PropTypes$1.bool,
|
|
13517
|
+
align: PropTypes$1.oneOf(['bottom', 'middle', 'top']),
|
|
13518
|
+
children: PropTypes$1.node,
|
|
13519
|
+
className: PropTypes$1.string,
|
|
13236
13520
|
color: colorPropType,
|
|
13237
13521
|
};
|
|
13238
13522
|
CTableRow.displayName = 'CTableRow';
|
|
@@ -13245,8 +13529,8 @@ var CTableFoot = React$1.forwardRef(function (_a, ref) {
|
|
|
13245
13529
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13246
13530
|
});
|
|
13247
13531
|
CTableFoot.propTypes = {
|
|
13248
|
-
children: PropTypes.node,
|
|
13249
|
-
className: PropTypes.string,
|
|
13532
|
+
children: PropTypes$1.node,
|
|
13533
|
+
className: PropTypes$1.string,
|
|
13250
13534
|
color: colorPropType,
|
|
13251
13535
|
};
|
|
13252
13536
|
CTableFoot.displayName = 'CTableFoot';
|
|
@@ -13256,7 +13540,7 @@ var CTableCaption = React$1.forwardRef(function (_a, ref) {
|
|
|
13256
13540
|
return (React$1.createElement("caption", __assign$1({}, props, { ref: ref }), children));
|
|
13257
13541
|
});
|
|
13258
13542
|
CTableCaption.propTypes = {
|
|
13259
|
-
children: PropTypes.node,
|
|
13543
|
+
children: PropTypes$1.node,
|
|
13260
13544
|
};
|
|
13261
13545
|
CTableCaption.displayName = 'CTableCaption';
|
|
13262
13546
|
|
|
@@ -13265,10 +13549,10 @@ var CTableResponsiveWrapper = function (_a) {
|
|
|
13265
13549
|
return responsive ? (React$1.createElement("div", __assign$1({ className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-".concat(responsive) }, rest), children)) : (React$1.createElement(React$1.Fragment, null, children));
|
|
13266
13550
|
};
|
|
13267
13551
|
CTableResponsiveWrapper.propTypes = {
|
|
13268
|
-
children: PropTypes.node,
|
|
13269
|
-
responsive: PropTypes.oneOfType([
|
|
13270
|
-
PropTypes.bool,
|
|
13271
|
-
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
13552
|
+
children: PropTypes$1.node,
|
|
13553
|
+
responsive: PropTypes$1.oneOfType([
|
|
13554
|
+
PropTypes$1.bool,
|
|
13555
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
13272
13556
|
]),
|
|
13273
13557
|
};
|
|
13274
13558
|
CTableResponsiveWrapper.displayName = 'CTableResponsiveWrapper';
|
|
@@ -13324,28 +13608,28 @@ var CTable = React$1.forwardRef(function (_a, ref) {
|
|
|
13324
13608
|
React$1.createElement(CTableRow, null, footer.map(function (item, index) { return (React$1.createElement(CTableDataCell, __assign$1({}, (typeof item === 'object' && item._props && __assign$1({}, item._props)), { key: index }), typeof item === 'object' ? item.label : item)); })))))));
|
|
13325
13609
|
});
|
|
13326
13610
|
CTable.propTypes = {
|
|
13327
|
-
align: PropTypes.oneOf(['bottom', 'middle', 'top']),
|
|
13328
|
-
borderColor: PropTypes.string,
|
|
13329
|
-
bordered: PropTypes.bool,
|
|
13330
|
-
borderless: PropTypes.bool,
|
|
13331
|
-
caption: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOf(['top'])]),
|
|
13332
|
-
captionTop: PropTypes.string,
|
|
13333
|
-
children: PropTypes.node,
|
|
13334
|
-
className: PropTypes.string,
|
|
13611
|
+
align: PropTypes$1.oneOf(['bottom', 'middle', 'top']),
|
|
13612
|
+
borderColor: PropTypes$1.string,
|
|
13613
|
+
bordered: PropTypes$1.bool,
|
|
13614
|
+
borderless: PropTypes$1.bool,
|
|
13615
|
+
caption: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.oneOf(['top'])]),
|
|
13616
|
+
captionTop: PropTypes$1.string,
|
|
13617
|
+
children: PropTypes$1.node,
|
|
13618
|
+
className: PropTypes$1.string,
|
|
13335
13619
|
color: colorPropType,
|
|
13336
|
-
columns: PropTypes.array,
|
|
13337
|
-
footer: PropTypes.array,
|
|
13338
|
-
hover: PropTypes.bool,
|
|
13339
|
-
items: PropTypes.array,
|
|
13340
|
-
responsive: PropTypes.oneOfType([
|
|
13341
|
-
PropTypes.bool,
|
|
13342
|
-
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
13620
|
+
columns: PropTypes$1.array,
|
|
13621
|
+
footer: PropTypes$1.array,
|
|
13622
|
+
hover: PropTypes$1.bool,
|
|
13623
|
+
items: PropTypes$1.array,
|
|
13624
|
+
responsive: PropTypes$1.oneOfType([
|
|
13625
|
+
PropTypes$1.bool,
|
|
13626
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
13343
13627
|
]),
|
|
13344
|
-
small: PropTypes.bool,
|
|
13345
|
-
striped: PropTypes.bool,
|
|
13346
|
-
stripedColumns: PropTypes.bool,
|
|
13347
|
-
tableFootProps: PropTypes.shape(__assign$1({}, CTableFoot.propTypes)),
|
|
13348
|
-
tableHeadProps: PropTypes.shape(__assign$1({}, CTableHead.propTypes)),
|
|
13628
|
+
small: PropTypes$1.bool,
|
|
13629
|
+
striped: PropTypes$1.bool,
|
|
13630
|
+
stripedColumns: PropTypes$1.bool,
|
|
13631
|
+
tableFootProps: PropTypes$1.shape(__assign$1({}, CTableFoot.propTypes)),
|
|
13632
|
+
tableHeadProps: PropTypes$1.shape(__assign$1({}, CTableHead.propTypes)),
|
|
13349
13633
|
};
|
|
13350
13634
|
CTable.displayName = 'CTable';
|
|
13351
13635
|
|
|
@@ -13384,7 +13668,7 @@ var getClickedColumnName = function (target, columnNames) {
|
|
|
13384
13668
|
var closest = target.closest('tr');
|
|
13385
13669
|
var children = closest ? Array.from(closest.children) : [];
|
|
13386
13670
|
var clickedCell = children.filter(function (child) { return child.contains(target); })[0];
|
|
13387
|
-
return columnNames[children.indexOf(clickedCell)];
|
|
13671
|
+
return columnNames[children.indexOf(clickedCell) - 1];
|
|
13388
13672
|
};
|
|
13389
13673
|
var getColumnKey = function (column) {
|
|
13390
13674
|
return typeof column === 'object' ? column.key : column;
|
|
@@ -13396,6 +13680,12 @@ var getColumnLabel = function (column) {
|
|
|
13396
13680
|
: pretifyName(column.key)
|
|
13397
13681
|
: pretifyName(column);
|
|
13398
13682
|
};
|
|
13683
|
+
var getColumnName = function (column) {
|
|
13684
|
+
if (typeof column === 'object') {
|
|
13685
|
+
return column.key;
|
|
13686
|
+
}
|
|
13687
|
+
return column;
|
|
13688
|
+
};
|
|
13399
13689
|
var getColumnNames = function (columns, items) {
|
|
13400
13690
|
if (columns) {
|
|
13401
13691
|
var _columns = [];
|
|
@@ -13504,10 +13794,32 @@ var getColumnSorterState = function (key, sorterState) {
|
|
|
13504
13794
|
var getColumnValues = function (items, key) {
|
|
13505
13795
|
return items.map(function (item) { return item[key]; });
|
|
13506
13796
|
};
|
|
13507
|
-
var getTableDataCellProps = function (item, colName) {
|
|
13508
|
-
var props =
|
|
13797
|
+
var getTableDataCellProps = function (column, item, colName) {
|
|
13798
|
+
var props = {};
|
|
13799
|
+
if (typeof column === 'object' && column._colProps) {
|
|
13800
|
+
Object.assign(props, column._colProps);
|
|
13801
|
+
}
|
|
13802
|
+
if (item._cellProps && item._cellProps['all']) {
|
|
13803
|
+
Object.assign(props, item._cellProps['all']);
|
|
13804
|
+
}
|
|
13805
|
+
if (item._cellProps && item._cellProps[colName]) {
|
|
13806
|
+
Object.assign(props, item._cellProps[colName]);
|
|
13807
|
+
}
|
|
13509
13808
|
return props;
|
|
13510
13809
|
};
|
|
13810
|
+
var getTableDataCellStyles = function (column, item, colName) {
|
|
13811
|
+
var styles = {};
|
|
13812
|
+
if (typeof column === 'object' && column._colStyle) {
|
|
13813
|
+
Object.assign(styles, column._colStyle);
|
|
13814
|
+
}
|
|
13815
|
+
if (item._cellStyle && item._cellStyle['all']) {
|
|
13816
|
+
Object.assign(styles, item._cellStyle['all']);
|
|
13817
|
+
}
|
|
13818
|
+
if (item._cellStyle && item._cellStyle[colName]) {
|
|
13819
|
+
Object.assign(styles, item._cellStyle[colName]);
|
|
13820
|
+
}
|
|
13821
|
+
return styles;
|
|
13822
|
+
};
|
|
13511
13823
|
var getTableHeaderCellProps = function (column) {
|
|
13512
13824
|
if (typeof column === 'object' && column._props) {
|
|
13513
13825
|
return column._props;
|
|
@@ -13565,8 +13877,8 @@ var sortItems = function (columnSorter, items, itemsDataColumns, sorterState) {
|
|
|
13565
13877
|
};
|
|
13566
13878
|
|
|
13567
13879
|
var CSmartTableBody = React$1.forwardRef(function (_a, ref) {
|
|
13568
|
-
var clickableRows = _a.clickableRows, columnNames = _a.columnNames, currentItems = _a.currentItems, firstItemOnActivePageIndex = _a.firstItemOnActivePageIndex, noItemsLabel = _a.noItemsLabel, onRowChecked = _a.onRowChecked, onRowClick = _a.onRowClick, scopedColumns = _a.scopedColumns, selectable = _a.selectable, selected = _a.selected, rest = __rest$1(_a, ["clickableRows", "columnNames", "currentItems", "firstItemOnActivePageIndex", "noItemsLabel", "onRowChecked", "onRowClick", "scopedColumns", "selectable", "selected"]);
|
|
13569
|
-
var colspan = selectable ?
|
|
13880
|
+
var clickableRows = _a.clickableRows, columnNames = _a.columnNames, columns = _a.columns, currentItems = _a.currentItems, firstItemOnActivePageIndex = _a.firstItemOnActivePageIndex, noItemsLabel = _a.noItemsLabel, onRowChecked = _a.onRowChecked, onRowClick = _a.onRowClick, scopedColumns = _a.scopedColumns, selectable = _a.selectable, selected = _a.selected, rest = __rest$1(_a, ["clickableRows", "columnNames", "columns", "currentItems", "firstItemOnActivePageIndex", "noItemsLabel", "onRowChecked", "onRowClick", "scopedColumns", "selectable", "selected"]);
|
|
13881
|
+
var colspan = selectable ? columns.length + 1 : columns.length;
|
|
13570
13882
|
return (React$1.createElement(CTableBody, __assign$1({}, (clickableRows && {
|
|
13571
13883
|
style: { cursor: 'pointer' },
|
|
13572
13884
|
}), rest, { ref: ref }), currentItems.length > 0 ? (currentItems.map(function (item, trIndex) {
|
|
@@ -13584,13 +13896,14 @@ var CSmartTableBody = React$1.forwardRef(function (_a, ref) {
|
|
|
13584
13896
|
delete _item['_selected'];
|
|
13585
13897
|
onRowChecked && onRowChecked(_item, event.target.checked);
|
|
13586
13898
|
} }))),
|
|
13587
|
-
|
|
13899
|
+
columns.map(function (column, index) {
|
|
13900
|
+
var colName = getColumnName(column);
|
|
13588
13901
|
return ((scopedColumns &&
|
|
13589
13902
|
scopedColumns[colName] &&
|
|
13590
13903
|
React$1.cloneElement(scopedColumns[colName](item, trIndex + firstItemOnActivePageIndex), {
|
|
13591
13904
|
key: index,
|
|
13592
13905
|
})) ||
|
|
13593
|
-
(item[colName] !== undefined && (React$1.createElement(CTableDataCell, __assign$1({}, getTableDataCellProps(item, colName), { key: index }), item[colName]))));
|
|
13906
|
+
(item[colName] !== undefined && (React$1.createElement(CTableDataCell, __assign$1({}, getTableDataCellProps(column, item, colName), { style: getTableDataCellStyles(column, item, colName), key: index }), item[colName]))));
|
|
13594
13907
|
})),
|
|
13595
13908
|
scopedColumns && scopedColumns.details && (React$1.createElement(React$1.Fragment, null,
|
|
13596
13909
|
React$1.createElement(CTableRow, null,
|
|
@@ -13604,16 +13917,16 @@ var CSmartTableBody = React$1.forwardRef(function (_a, ref) {
|
|
|
13604
13917
|
React$1.createElement(CTableDataCell, { colSpan: colspan }, noItemsLabel)))));
|
|
13605
13918
|
});
|
|
13606
13919
|
CSmartTableBody.propTypes = {
|
|
13607
|
-
clickableRows: PropTypes.bool,
|
|
13608
|
-
currentItems: PropTypes.array.isRequired,
|
|
13609
|
-
firstItemOnActivePageIndex: PropTypes.number.isRequired,
|
|
13610
|
-
noItemsLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
13611
|
-
onRowChecked: PropTypes.func,
|
|
13612
|
-
onRowClick: PropTypes.func,
|
|
13613
|
-
columnNames: PropTypes.array.isRequired,
|
|
13614
|
-
scopedColumns: PropTypes.object,
|
|
13615
|
-
selectable: PropTypes.bool,
|
|
13616
|
-
selected: PropTypes.array,
|
|
13920
|
+
clickableRows: PropTypes$1.bool,
|
|
13921
|
+
currentItems: PropTypes$1.array.isRequired,
|
|
13922
|
+
firstItemOnActivePageIndex: PropTypes$1.number.isRequired,
|
|
13923
|
+
noItemsLabel: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
13924
|
+
onRowChecked: PropTypes$1.func,
|
|
13925
|
+
onRowClick: PropTypes$1.func,
|
|
13926
|
+
columnNames: PropTypes$1.array.isRequired,
|
|
13927
|
+
scopedColumns: PropTypes$1.object,
|
|
13928
|
+
selectable: PropTypes$1.bool,
|
|
13929
|
+
selected: PropTypes$1.array,
|
|
13617
13930
|
};
|
|
13618
13931
|
CSmartTableBody.displayName = 'CSmartTableBody';
|
|
13619
13932
|
|
|
@@ -13658,23 +13971,41 @@ var CSmartTableHead = React$1.forwardRef(function (_a, ref) {
|
|
|
13658
13971
|
React$1.createElement(CTableRow, null,
|
|
13659
13972
|
selectable && (React$1.createElement(CTableHeaderCell, null, selectAll && (React$1.createElement(CFormCheck, { checked: typeof selectedAll === 'boolean' ? selectedAll : false, indeterminate: selectedAll === 'indeterminate' ? true : false, onChange: function () { return handleSelectAllChecked && handleSelectAllChecked(); }, ref: selectAllcheckboxRef })))),
|
|
13660
13973
|
_columns.map(function (column, index) {
|
|
13661
|
-
|
|
13974
|
+
var isSortable = columnSorter &&
|
|
13975
|
+
(typeof column === 'object'
|
|
13976
|
+
? column.sorter === undefined
|
|
13977
|
+
? true
|
|
13978
|
+
: column.sorter
|
|
13979
|
+
: true);
|
|
13980
|
+
return (React$1.createElement(CTableHeaderCell, __assign$1({}, getTableHeaderCellProps(column), {
|
|
13981
|
+
// onClick={() => handleSort && handleSort(getColumnKey(column), index)}
|
|
13982
|
+
style: getTableHeaderCellStyles(column, columnSorter), key: index }, (isSortable && {
|
|
13983
|
+
onClick: function () { return handleSort && handleSort(getColumnKey(column), index); },
|
|
13984
|
+
onKeyDown: function (event) {
|
|
13985
|
+
if (event.key === 'Enter') {
|
|
13986
|
+
handleSort && handleSort(getColumnKey(column), index);
|
|
13987
|
+
}
|
|
13988
|
+
if (event.key === 'ArrowUp') {
|
|
13989
|
+
event.preventDefault();
|
|
13990
|
+
handleSort && handleSort(getColumnKey(column), index, 'asc');
|
|
13991
|
+
}
|
|
13992
|
+
if (event.key === 'ArrowDown') {
|
|
13993
|
+
event.preventDefault();
|
|
13994
|
+
handleSort && handleSort(getColumnKey(column), index, 'desc');
|
|
13995
|
+
}
|
|
13996
|
+
},
|
|
13997
|
+
tabIndex: 0,
|
|
13998
|
+
})),
|
|
13662
13999
|
React$1.createElement("div", { className: "d-inline" }, getColumnLabel(column)),
|
|
13663
|
-
|
|
13664
|
-
(typeof column === 'object'
|
|
13665
|
-
? (column.sorter === undefined
|
|
13666
|
-
? true
|
|
13667
|
-
: column.sorter)
|
|
13668
|
-
: true) &&
|
|
13669
|
-
columnSorterIcon(column)));
|
|
14000
|
+
isSortable && columnSorterIcon(column)));
|
|
13670
14001
|
})),
|
|
13671
14002
|
columnFilter && (React$1.createElement(CTableRow, null,
|
|
13672
14003
|
selectable && React$1.createElement(CTableHeaderCell, null),
|
|
13673
14004
|
_columns.map(function (column, index) {
|
|
13674
14005
|
return (React$1.createElement(CTableHeaderCell, __assign$1({}, getTableHeaderCellProps(column), { key: index }), (typeof column === 'object'
|
|
13675
|
-
?
|
|
14006
|
+
? column.filter === undefined
|
|
13676
14007
|
? true
|
|
13677
|
-
: column.filter
|
|
14008
|
+
: column.filter
|
|
13678
14009
|
: true) ? (typeof column !== 'string' && typeof column.filter === 'function' ? (!refresh &&
|
|
13679
14010
|
column.filter(getColumnValues(items, getColumnKey(column)), function (value) {
|
|
13680
14011
|
return handleOnCustomFilterChange &&
|
|
@@ -13691,23 +14022,23 @@ var CSmartTableHead = React$1.forwardRef(function (_a, ref) {
|
|
|
13691
14022
|
})))));
|
|
13692
14023
|
});
|
|
13693
14024
|
CSmartTableHead.propTypes = {
|
|
13694
|
-
columnFilter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13695
|
-
columnFilterState: PropTypes.object,
|
|
13696
|
-
columnSorter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13697
|
-
component: PropTypes.elementType,
|
|
13698
|
-
children: PropTypes.node,
|
|
13699
|
-
columns: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.any, PropTypes.string])).isRequired,
|
|
13700
|
-
handleFilterOnChange: PropTypes.func,
|
|
13701
|
-
handleFilterOnInput: PropTypes.func,
|
|
13702
|
-
handleSelectAllChecked: PropTypes.func,
|
|
13703
|
-
handleSort: PropTypes.func,
|
|
13704
|
-
selectable: PropTypes.bool,
|
|
13705
|
-
selectAll: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13706
|
-
selectedAll: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
13707
|
-
sorterState: PropTypes.object,
|
|
13708
|
-
sortingIcon: PropTypes.node,
|
|
13709
|
-
sortingIconAscending: PropTypes.node,
|
|
13710
|
-
sortingIconDescending: PropTypes.node,
|
|
14025
|
+
columnFilter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14026
|
+
columnFilterState: PropTypes$1.object,
|
|
14027
|
+
columnSorter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14028
|
+
component: PropTypes$1.elementType,
|
|
14029
|
+
children: PropTypes$1.node,
|
|
14030
|
+
columns: PropTypes$1.arrayOf(PropTypes$1.oneOfType([PropTypes$1.any, PropTypes$1.string])).isRequired,
|
|
14031
|
+
handleFilterOnChange: PropTypes$1.func,
|
|
14032
|
+
handleFilterOnInput: PropTypes$1.func,
|
|
14033
|
+
handleSelectAllChecked: PropTypes$1.func,
|
|
14034
|
+
handleSort: PropTypes$1.func,
|
|
14035
|
+
selectable: PropTypes$1.bool,
|
|
14036
|
+
selectAll: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14037
|
+
selectedAll: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.string]),
|
|
14038
|
+
sorterState: PropTypes$1.object,
|
|
14039
|
+
sortingIcon: PropTypes$1.node,
|
|
14040
|
+
sortingIconAscending: PropTypes$1.node,
|
|
14041
|
+
sortingIconDescending: PropTypes$1.node,
|
|
13711
14042
|
};
|
|
13712
14043
|
CSmartTableHead.displayName = 'CSmartTableHead';
|
|
13713
14044
|
|
|
@@ -13863,14 +14194,20 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
13863
14194
|
return item;
|
|
13864
14195
|
}));
|
|
13865
14196
|
};
|
|
13866
|
-
var handleSorterChange = function (column, index) {
|
|
14197
|
+
var handleSorterChange = function (column, index, order) {
|
|
13867
14198
|
if (!isSortable(index, columns, columnSorter, itemsDataColumns, columnNames)) {
|
|
13868
14199
|
return;
|
|
13869
14200
|
}
|
|
13870
14201
|
//if column changed or sort was descending change asc to true
|
|
13871
14202
|
var state = sorterState !== null && sorterState !== void 0 ? sorterState : { column: '', state: '' };
|
|
14203
|
+
if (order) {
|
|
14204
|
+
state.state = order;
|
|
14205
|
+
}
|
|
13872
14206
|
if (state.column === column) {
|
|
13873
|
-
if (
|
|
14207
|
+
if (order) {
|
|
14208
|
+
state.state = order;
|
|
14209
|
+
}
|
|
14210
|
+
else if (state.state === 0) {
|
|
13874
14211
|
state.state = 'asc';
|
|
13875
14212
|
}
|
|
13876
14213
|
else if (state.state === 'asc') {
|
|
@@ -13882,11 +14219,12 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
13882
14219
|
}
|
|
13883
14220
|
else {
|
|
13884
14221
|
state.column = column;
|
|
13885
|
-
state.state = 'asc';
|
|
14222
|
+
state.state = order || 'asc';
|
|
13886
14223
|
}
|
|
13887
14224
|
setSorterState(__assign$1({}, state));
|
|
13888
14225
|
};
|
|
13889
14226
|
var handleTableFilterChange = function (value, type) {
|
|
14227
|
+
to;
|
|
13890
14228
|
var isLazy = tableFilter && typeof tableFilter === 'object' && tableFilter.lazy === true;
|
|
13891
14229
|
if ((isLazy && type === 'input') || (!isLazy && type === 'change')) {
|
|
13892
14230
|
return;
|
|
@@ -13921,10 +14259,10 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
13921
14259
|
React$1.createElement(CTable, __assign$1({}, tableProps),
|
|
13922
14260
|
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) {
|
|
13923
14261
|
return handleColumnFilterChange(key, event, 'change');
|
|
13924
|
-
}, handleFilterOnInput: function (key, event) { return handleColumnFilterChange(key, event, 'input'); }, handleOnCustomFilterChange: function (key, event) { return handleColumnFilterChange(key, event); }, handleSelectAllChecked: function () { return handleSelectAllChecked(); }, handleSort: function (key, index) { return handleSorterChange(key, index); } }))),
|
|
13925
|
-
React$1.createElement(CSmartTableBody, __assign$1({ clickableRows: clickableRows, currentItems: currentItems, firstItemOnActivePageIndex: firstItemOnActivePageIndex, noItemsLabel: noItemsLabel, onRowClick: function (item, index, columnName, event) {
|
|
14262
|
+
}, handleFilterOnInput: function (key, event) { return handleColumnFilterChange(key, event, 'input'); }, handleOnCustomFilterChange: function (key, event) { return handleColumnFilterChange(key, event); }, handleSelectAllChecked: function () { return handleSelectAllChecked(); }, handleSort: function (key, index, order) { return handleSorterChange(key, index, order); } }))),
|
|
14263
|
+
React$1.createElement(CSmartTableBody, __assign$1({ clickableRows: clickableRows, columnNames: columnNames, columns: columns !== null && columns !== void 0 ? columns : columnNames, currentItems: currentItems, firstItemOnActivePageIndex: firstItemOnActivePageIndex, noItemsLabel: noItemsLabel, onRowClick: function (item, index, columnName, event) {
|
|
13926
14264
|
return clickableRows && onRowClick && onRowClick(item, index, columnName, event);
|
|
13927
|
-
}, onRowChecked: function (item, value) { return handleRowChecked(item, value); },
|
|
14265
|
+
}, onRowChecked: function (item, value) { return handleRowChecked(item, value); }, scopedColumns: scopedColumns, selectable: selectable, selected: _selected }, tableBodyProps)),
|
|
13928
14266
|
typeof footer === 'boolean' && footer && (React$1.createElement(CSmartTableHead, __assign$1({ component: CTableFoot }, tableFootProps, { columnFilter: false, columnSorter: false, columns: columns !== null && columns !== void 0 ? columns : columnNames, items: _items, handleSelectAllChecked: function () { return handleSelectAllChecked(); }, selectable: selectable, selectAll: selectAll, selectedAll: selectedAll, showGroups: false }))),
|
|
13929
14267
|
Array.isArray(footer) && (React$1.createElement(CTableFoot, __assign$1({}, tableFootProps),
|
|
13930
14268
|
React$1.createElement(CTableRow, null, footer.map(function (item, index) { return (React$1.createElement(CTableDataCell, __assign$1({}, (typeof item === 'object' && item._props && __assign$1({}, item._props)), { key: index }), typeof item === 'object' ? item.label : item)); }))))),
|
|
@@ -13949,51 +14287,51 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
13949
14287
|
}))))))))));
|
|
13950
14288
|
});
|
|
13951
14289
|
CSmartTable.propTypes = {
|
|
13952
|
-
activePage: PropTypes.number,
|
|
13953
|
-
cleaner: PropTypes.bool,
|
|
13954
|
-
clickableRows: PropTypes.bool,
|
|
13955
|
-
columnFilter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13956
|
-
columnFilterValue: PropTypes.object,
|
|
13957
|
-
columns: PropTypes.array,
|
|
13958
|
-
columnSorter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13959
|
-
elementCover: PropTypes.node,
|
|
13960
|
-
footer: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),
|
|
13961
|
-
header: PropTypes.bool,
|
|
13962
|
-
items: PropTypes.array,
|
|
13963
|
-
itemsNumber: PropTypes.number,
|
|
13964
|
-
itemsPerPage: PropTypes.number,
|
|
13965
|
-
itemsPerPageLabel: PropTypes.string,
|
|
13966
|
-
itemsPerPageOptions: PropTypes.array,
|
|
13967
|
-
itemsPerPageSelect: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13968
|
-
loading: PropTypes.bool,
|
|
13969
|
-
noItemsLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
13970
|
-
onActivePageChange: PropTypes.func,
|
|
13971
|
-
onColumnFilterChange: PropTypes.func,
|
|
13972
|
-
onFilteredItemsChange: PropTypes.func,
|
|
13973
|
-
onItemsPerPageChange: PropTypes.func,
|
|
13974
|
-
onRowClick: PropTypes.func,
|
|
13975
|
-
onSelectAll: PropTypes.func,
|
|
13976
|
-
onSelectedItemsChange: PropTypes.func,
|
|
13977
|
-
onSorterChange: PropTypes.func,
|
|
13978
|
-
onTableFilterChange: PropTypes.func,
|
|
13979
|
-
pagination: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13980
|
-
paginationProps: PropTypes.any,
|
|
13981
|
-
scopedColumns: PropTypes.object,
|
|
13982
|
-
selectable: PropTypes.bool,
|
|
13983
|
-
selectAll: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13984
|
-
selected: PropTypes.array,
|
|
13985
|
-
sorterValue: PropTypes.object,
|
|
13986
|
-
sortingIcon: PropTypes.node,
|
|
13987
|
-
sortingIconAscending: PropTypes.node,
|
|
13988
|
-
sortingIconDescending: PropTypes.node,
|
|
13989
|
-
tableBodyProps: PropTypes.object,
|
|
13990
|
-
tableFootProps: PropTypes.object,
|
|
13991
|
-
tableFilter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13992
|
-
tableFilterLabel: PropTypes.string,
|
|
13993
|
-
tableFilterPlaceholder: PropTypes.string,
|
|
13994
|
-
tableFilterValue: PropTypes.string,
|
|
13995
|
-
tableHeadProps: PropTypes.object,
|
|
13996
|
-
tableProps: PropTypes.object,
|
|
14290
|
+
activePage: PropTypes$1.number,
|
|
14291
|
+
cleaner: PropTypes$1.bool,
|
|
14292
|
+
clickableRows: PropTypes$1.bool,
|
|
14293
|
+
columnFilter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14294
|
+
columnFilterValue: PropTypes$1.object,
|
|
14295
|
+
columns: PropTypes$1.array,
|
|
14296
|
+
columnSorter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14297
|
+
elementCover: PropTypes$1.node,
|
|
14298
|
+
footer: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.array]),
|
|
14299
|
+
header: PropTypes$1.bool,
|
|
14300
|
+
items: PropTypes$1.array,
|
|
14301
|
+
itemsNumber: PropTypes$1.number,
|
|
14302
|
+
itemsPerPage: PropTypes$1.number,
|
|
14303
|
+
itemsPerPageLabel: PropTypes$1.string,
|
|
14304
|
+
itemsPerPageOptions: PropTypes$1.array,
|
|
14305
|
+
itemsPerPageSelect: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14306
|
+
loading: PropTypes$1.bool,
|
|
14307
|
+
noItemsLabel: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14308
|
+
onActivePageChange: PropTypes$1.func,
|
|
14309
|
+
onColumnFilterChange: PropTypes$1.func,
|
|
14310
|
+
onFilteredItemsChange: PropTypes$1.func,
|
|
14311
|
+
onItemsPerPageChange: PropTypes$1.func,
|
|
14312
|
+
onRowClick: PropTypes$1.func,
|
|
14313
|
+
onSelectAll: PropTypes$1.func,
|
|
14314
|
+
onSelectedItemsChange: PropTypes$1.func,
|
|
14315
|
+
onSorterChange: PropTypes$1.func,
|
|
14316
|
+
onTableFilterChange: PropTypes$1.func,
|
|
14317
|
+
pagination: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14318
|
+
paginationProps: PropTypes$1.any,
|
|
14319
|
+
scopedColumns: PropTypes$1.object,
|
|
14320
|
+
selectable: PropTypes$1.bool,
|
|
14321
|
+
selectAll: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14322
|
+
selected: PropTypes$1.array,
|
|
14323
|
+
sorterValue: PropTypes$1.object,
|
|
14324
|
+
sortingIcon: PropTypes$1.node,
|
|
14325
|
+
sortingIconAscending: PropTypes$1.node,
|
|
14326
|
+
sortingIconDescending: PropTypes$1.node,
|
|
14327
|
+
tableBodyProps: PropTypes$1.object,
|
|
14328
|
+
tableFootProps: PropTypes$1.object,
|
|
14329
|
+
tableFilter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14330
|
+
tableFilterLabel: PropTypes$1.string,
|
|
14331
|
+
tableFilterPlaceholder: PropTypes$1.string,
|
|
14332
|
+
tableFilterValue: PropTypes$1.string,
|
|
14333
|
+
tableHeadProps: PropTypes$1.object,
|
|
14334
|
+
tableProps: PropTypes$1.object,
|
|
13997
14335
|
};
|
|
13998
14336
|
CSmartTable.displayName = 'CSmartTable';
|
|
13999
14337
|
|
|
@@ -14088,19 +14426,19 @@ var CSidebar = React$1.forwardRef(function (_a, ref) {
|
|
|
14088
14426
|
ReactDOM.createPortal(React$1.createElement(CBackdrop, { className: "sidebar-backdrop", visible: _visible }), document.body)));
|
|
14089
14427
|
});
|
|
14090
14428
|
CSidebar.propTypes = {
|
|
14091
|
-
children: PropTypes.node,
|
|
14092
|
-
className: PropTypes.string,
|
|
14093
|
-
colorScheme: PropTypes.oneOf(['dark', 'light']),
|
|
14094
|
-
narrow: PropTypes.bool,
|
|
14095
|
-
onHide: PropTypes.func,
|
|
14096
|
-
onShow: PropTypes.func,
|
|
14097
|
-
onVisibleChange: PropTypes.func,
|
|
14098
|
-
overlaid: PropTypes.bool,
|
|
14099
|
-
placement: PropTypes.oneOf(['start', 'end']),
|
|
14100
|
-
position: PropTypes.oneOf(['fixed', 'sticky']),
|
|
14101
|
-
size: PropTypes.oneOf(['sm', 'lg', 'xl']),
|
|
14102
|
-
unfoldable: PropTypes.bool,
|
|
14103
|
-
visible: PropTypes.bool,
|
|
14429
|
+
children: PropTypes$1.node,
|
|
14430
|
+
className: PropTypes$1.string,
|
|
14431
|
+
colorScheme: PropTypes$1.oneOf(['dark', 'light']),
|
|
14432
|
+
narrow: PropTypes$1.bool,
|
|
14433
|
+
onHide: PropTypes$1.func,
|
|
14434
|
+
onShow: PropTypes$1.func,
|
|
14435
|
+
onVisibleChange: PropTypes$1.func,
|
|
14436
|
+
overlaid: PropTypes$1.bool,
|
|
14437
|
+
placement: PropTypes$1.oneOf(['start', 'end']),
|
|
14438
|
+
position: PropTypes$1.oneOf(['fixed', 'sticky']),
|
|
14439
|
+
size: PropTypes$1.oneOf(['sm', 'lg', 'xl']),
|
|
14440
|
+
unfoldable: PropTypes$1.bool,
|
|
14441
|
+
visible: PropTypes$1.bool,
|
|
14104
14442
|
};
|
|
14105
14443
|
CSidebar.displayName = 'CSidebar';
|
|
14106
14444
|
|
|
@@ -14109,8 +14447,8 @@ var CSidebarBrand = React$1.forwardRef(function (_a, ref) {
|
|
|
14109
14447
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-brand', className), ref: ref }, rest), children));
|
|
14110
14448
|
});
|
|
14111
14449
|
CSidebarBrand.propTypes = {
|
|
14112
|
-
children: PropTypes.node,
|
|
14113
|
-
className: PropTypes.string,
|
|
14450
|
+
children: PropTypes$1.node,
|
|
14451
|
+
className: PropTypes$1.string,
|
|
14114
14452
|
};
|
|
14115
14453
|
CSidebarBrand.displayName = 'CSidebarBrand';
|
|
14116
14454
|
|
|
@@ -14119,8 +14457,8 @@ var CSidebarFooter = React$1.forwardRef(function (_a, ref) {
|
|
|
14119
14457
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-footer', className), ref: ref }, rest), children));
|
|
14120
14458
|
});
|
|
14121
14459
|
CSidebarFooter.propTypes = {
|
|
14122
|
-
children: PropTypes.node,
|
|
14123
|
-
className: PropTypes.string,
|
|
14460
|
+
children: PropTypes$1.node,
|
|
14461
|
+
className: PropTypes$1.string,
|
|
14124
14462
|
};
|
|
14125
14463
|
CSidebarFooter.displayName = 'CSidebarFooter';
|
|
14126
14464
|
|
|
@@ -14129,8 +14467,8 @@ var CSidebarToggler = React$1.forwardRef(function (_a, ref) {
|
|
|
14129
14467
|
return (React$1.createElement("button", __assign$1({ className: classNames$1('sidebar-toggler', className), ref: ref }, rest), children));
|
|
14130
14468
|
});
|
|
14131
14469
|
CSidebarToggler.propTypes = {
|
|
14132
|
-
children: PropTypes.node,
|
|
14133
|
-
className: PropTypes.string,
|
|
14470
|
+
children: PropTypes$1.node,
|
|
14471
|
+
className: PropTypes$1.string,
|
|
14134
14472
|
};
|
|
14135
14473
|
CSidebarToggler.displayName = 'CSidebarToggler';
|
|
14136
14474
|
|
|
@@ -14139,8 +14477,8 @@ var CSidebarHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
14139
14477
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-header', className), ref: ref }, rest), children));
|
|
14140
14478
|
});
|
|
14141
14479
|
CSidebarHeader.propTypes = {
|
|
14142
|
-
children: PropTypes.node,
|
|
14143
|
-
className: PropTypes.string,
|
|
14480
|
+
children: PropTypes$1.node,
|
|
14481
|
+
className: PropTypes$1.string,
|
|
14144
14482
|
};
|
|
14145
14483
|
CSidebarHeader.displayName = 'CSidebarHeader';
|
|
14146
14484
|
|
|
@@ -14149,8 +14487,8 @@ var CTabContent = React$1.forwardRef(function (_a, ref) {
|
|
|
14149
14487
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('tab-content', className) }, rest, { ref: ref }), children));
|
|
14150
14488
|
});
|
|
14151
14489
|
CTabContent.propTypes = {
|
|
14152
|
-
children: PropTypes.node,
|
|
14153
|
-
className: PropTypes.string,
|
|
14490
|
+
children: PropTypes$1.node,
|
|
14491
|
+
className: PropTypes$1.string,
|
|
14154
14492
|
};
|
|
14155
14493
|
CTabContent.displayName = 'CTabContent';
|
|
14156
14494
|
|
|
@@ -14164,11 +14502,11 @@ var CTabPane = React$1.forwardRef(function (_a, ref) {
|
|
|
14164
14502
|
}, className) }, rest, { ref: forkedRef }), children)); }));
|
|
14165
14503
|
});
|
|
14166
14504
|
CTabPane.propTypes = {
|
|
14167
|
-
children: PropTypes.node,
|
|
14168
|
-
className: PropTypes.string,
|
|
14169
|
-
onHide: PropTypes.func,
|
|
14170
|
-
onShow: PropTypes.func,
|
|
14171
|
-
visible: PropTypes.bool,
|
|
14505
|
+
children: PropTypes$1.node,
|
|
14506
|
+
className: PropTypes$1.string,
|
|
14507
|
+
onHide: PropTypes$1.func,
|
|
14508
|
+
onShow: PropTypes$1.func,
|
|
14509
|
+
visible: PropTypes$1.bool,
|
|
14172
14510
|
};
|
|
14173
14511
|
CTabPane.displayName = 'CTabPane';
|
|
14174
14512
|
|
|
@@ -14213,17 +14551,17 @@ var CToast = React$1.forwardRef(function (_a, ref) {
|
|
|
14213
14551
|
}));
|
|
14214
14552
|
});
|
|
14215
14553
|
CToast.propTypes = {
|
|
14216
|
-
animation: PropTypes.bool,
|
|
14217
|
-
autohide: PropTypes.bool,
|
|
14218
|
-
children: PropTypes.node,
|
|
14219
|
-
className: PropTypes.string,
|
|
14554
|
+
animation: PropTypes$1.bool,
|
|
14555
|
+
autohide: PropTypes$1.bool,
|
|
14556
|
+
children: PropTypes$1.node,
|
|
14557
|
+
className: PropTypes$1.string,
|
|
14220
14558
|
color: colorPropType,
|
|
14221
|
-
delay: PropTypes.number,
|
|
14222
|
-
index: PropTypes.number,
|
|
14223
|
-
key: PropTypes.number,
|
|
14224
|
-
onClose: PropTypes.func,
|
|
14225
|
-
onShow: PropTypes.func,
|
|
14226
|
-
visible: PropTypes.bool,
|
|
14559
|
+
delay: PropTypes$1.number,
|
|
14560
|
+
index: PropTypes$1.number,
|
|
14561
|
+
key: PropTypes$1.number,
|
|
14562
|
+
onClose: PropTypes$1.func,
|
|
14563
|
+
onShow: PropTypes$1.func,
|
|
14564
|
+
visible: PropTypes$1.bool,
|
|
14227
14565
|
};
|
|
14228
14566
|
CToast.displayName = 'CToast';
|
|
14229
14567
|
|
|
@@ -14232,8 +14570,8 @@ var CToastBody = React$1.forwardRef(function (_a, ref) {
|
|
|
14232
14570
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('toast-body', className) }, rest, { ref: ref }), children));
|
|
14233
14571
|
});
|
|
14234
14572
|
CToastBody.propTypes = {
|
|
14235
|
-
children: PropTypes.node,
|
|
14236
|
-
className: PropTypes.string,
|
|
14573
|
+
children: PropTypes$1.node,
|
|
14574
|
+
className: PropTypes$1.string,
|
|
14237
14575
|
};
|
|
14238
14576
|
CToastBody.displayName = 'CToastBody';
|
|
14239
14577
|
|
|
@@ -14242,7 +14580,7 @@ var CToastClose = React$1.forwardRef(function (_a, ref) {
|
|
|
14242
14580
|
var setVisible = React$1.useContext(CToastContext).setVisible;
|
|
14243
14581
|
return Component ? (React$1.createElement(Component, __assign$1({ onClick: function () { return setVisible(false); } }, rest, { ref: ref }), children)) : (React$1.createElement(CCloseButton, __assign$1({ onClick: function () { return setVisible(false); } }, rest, { ref: ref })));
|
|
14244
14582
|
});
|
|
14245
|
-
CToastClose.propTypes = __assign$1(__assign$1({}, CCloseButton.propTypes), { component: PropTypes.elementType });
|
|
14583
|
+
CToastClose.propTypes = __assign$1(__assign$1({}, CCloseButton.propTypes), { component: PropTypes$1.elementType });
|
|
14246
14584
|
CToastClose.displayName = 'CToastClose';
|
|
14247
14585
|
|
|
14248
14586
|
var CToastHeader = React$1.forwardRef(function (_a, ref) {
|
|
@@ -14252,9 +14590,9 @@ var CToastHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
14252
14590
|
closeButton && React$1.createElement(CToastClose, null)));
|
|
14253
14591
|
});
|
|
14254
14592
|
CToastHeader.propTypes = {
|
|
14255
|
-
children: PropTypes.node,
|
|
14256
|
-
className: PropTypes.string,
|
|
14257
|
-
closeButton: PropTypes.bool,
|
|
14593
|
+
children: PropTypes$1.node,
|
|
14594
|
+
className: PropTypes$1.string,
|
|
14595
|
+
closeButton: PropTypes$1.bool,
|
|
14258
14596
|
};
|
|
14259
14597
|
CToastHeader.displayName = 'CToastHeader';
|
|
14260
14598
|
|
|
@@ -14290,11 +14628,11 @@ var CToaster = React$1.forwardRef(function (_a, ref) {
|
|
|
14290
14628
|
toasts.map(function (toast) { return React$1.cloneElement(toast, { visible: true }); }))) : null));
|
|
14291
14629
|
});
|
|
14292
14630
|
CToaster.propTypes = {
|
|
14293
|
-
children: PropTypes.node,
|
|
14294
|
-
className: PropTypes.string,
|
|
14295
|
-
placement: PropTypes.oneOfType([
|
|
14296
|
-
PropTypes.string,
|
|
14297
|
-
PropTypes.oneOf([
|
|
14631
|
+
children: PropTypes$1.node,
|
|
14632
|
+
className: PropTypes$1.string,
|
|
14633
|
+
placement: PropTypes$1.oneOfType([
|
|
14634
|
+
PropTypes$1.string,
|
|
14635
|
+
PropTypes$1.oneOf([
|
|
14298
14636
|
'top-start',
|
|
14299
14637
|
'top-center',
|
|
14300
14638
|
'top-end',
|
|
@@ -14306,7 +14644,7 @@ CToaster.propTypes = {
|
|
|
14306
14644
|
'bottom-end',
|
|
14307
14645
|
]),
|
|
14308
14646
|
]),
|
|
14309
|
-
push: PropTypes.any,
|
|
14647
|
+
push: PropTypes$1.any,
|
|
14310
14648
|
};
|
|
14311
14649
|
CToaster.displayName = 'CToaster';
|
|
14312
14650
|
|
|
@@ -14371,7 +14709,7 @@ var CTooltip = function (_a) {
|
|
|
14371
14709
|
typeof window !== 'undefined' &&
|
|
14372
14710
|
ReactDOM.createPortal(React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, onEnter: onShow, onExit: onHide, timeout: {
|
|
14373
14711
|
enter: 0,
|
|
14374
|
-
exit: 200,
|
|
14712
|
+
exit: tooltipRef.current ? getTransitionDurationFromElement(tooltipRef.current) + 50 : 200,
|
|
14375
14713
|
}, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('tooltip', 'bs-tooltip-auto', {
|
|
14376
14714
|
fade: animation,
|
|
14377
14715
|
show: state === 'entered',
|
|
@@ -14380,30 +14718,30 @@ var CTooltip = function (_a) {
|
|
|
14380
14718
|
React$1.createElement("div", { className: "tooltip-inner" }, content))); }), document.body)));
|
|
14381
14719
|
};
|
|
14382
14720
|
CTooltip.propTypes = {
|
|
14383
|
-
animation: PropTypes.bool,
|
|
14384
|
-
children: PropTypes.node,
|
|
14385
|
-
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14386
|
-
delay: PropTypes.oneOfType([
|
|
14387
|
-
PropTypes.number,
|
|
14388
|
-
PropTypes.shape({
|
|
14389
|
-
show: PropTypes.number.isRequired,
|
|
14390
|
-
hide: PropTypes.number.isRequired,
|
|
14721
|
+
animation: PropTypes$1.bool,
|
|
14722
|
+
children: PropTypes$1.node,
|
|
14723
|
+
content: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14724
|
+
delay: PropTypes$1.oneOfType([
|
|
14725
|
+
PropTypes$1.number,
|
|
14726
|
+
PropTypes$1.shape({
|
|
14727
|
+
show: PropTypes$1.number.isRequired,
|
|
14728
|
+
hide: PropTypes$1.number.isRequired,
|
|
14391
14729
|
}),
|
|
14392
14730
|
]),
|
|
14393
14731
|
fallbackPlacements: fallbackPlacementsPropType,
|
|
14394
|
-
offset: PropTypes.any,
|
|
14395
|
-
onHide: PropTypes.func,
|
|
14396
|
-
onShow: PropTypes.func,
|
|
14397
|
-
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
14732
|
+
offset: PropTypes$1.any,
|
|
14733
|
+
onHide: PropTypes$1.func,
|
|
14734
|
+
onShow: PropTypes$1.func,
|
|
14735
|
+
placement: PropTypes$1.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
14398
14736
|
trigger: triggerPropType,
|
|
14399
|
-
visible: PropTypes.bool,
|
|
14737
|
+
visible: PropTypes$1.bool,
|
|
14400
14738
|
};
|
|
14401
14739
|
CTooltip.displayName = 'CTooltip';
|
|
14402
14740
|
|
|
14403
14741
|
var CWidgetStatsA = React$1.forwardRef(function (_a, ref) {
|
|
14404
14742
|
var _b;
|
|
14405
14743
|
var action = _a.action, chart = _a.chart, className = _a.className, color = _a.color, title = _a.title, value = _a.value, rest = __rest$1(_a, ["action", "chart", "className", "color", "title", "value"]);
|
|
14406
|
-
return (React$1.createElement(CCard, __assign$1({ className: classNames$1((_b = {}, _b["bg-".concat(color)] = color, _b['text-
|
|
14744
|
+
return (React$1.createElement(CCard, __assign$1({ className: classNames$1((_b = {}, _b["bg-".concat(color)] = color, _b['text-white'] = color, _b), className) }, rest, { ref: ref }),
|
|
14407
14745
|
React$1.createElement(CCardBody, { className: "pb-0 d-flex justify-content-between align-items-start" },
|
|
14408
14746
|
React$1.createElement("div", null,
|
|
14409
14747
|
value && React$1.createElement("div", { className: "fs-4 fw-semibold" }, value),
|
|
@@ -14412,52 +14750,52 @@ var CWidgetStatsA = React$1.forwardRef(function (_a, ref) {
|
|
|
14412
14750
|
chart));
|
|
14413
14751
|
});
|
|
14414
14752
|
CWidgetStatsA.propTypes = {
|
|
14415
|
-
action: PropTypes.node,
|
|
14416
|
-
chart: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14417
|
-
className: PropTypes.string,
|
|
14753
|
+
action: PropTypes$1.node,
|
|
14754
|
+
chart: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14755
|
+
className: PropTypes$1.string,
|
|
14418
14756
|
color: colorPropType,
|
|
14419
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14420
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
|
|
14757
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14758
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14421
14759
|
};
|
|
14422
14760
|
CWidgetStatsA.displayName = 'CWidgetStatsA';
|
|
14423
14761
|
|
|
14424
14762
|
var CWidgetStatsB = React$1.forwardRef(function (_a, ref) {
|
|
14425
14763
|
var className = _a.className, color = _a.color, inverse = _a.inverse, progress = _a.progress, text = _a.text, title = _a.title, value = _a.value, rest = __rest$1(_a, ["className", "color", "inverse", "progress", "text", "title", "value"]);
|
|
14426
|
-
return (React$1.createElement(CCard, __assign$1({ className: className, color: color }, (inverse && { textColor: '
|
|
14764
|
+
return (React$1.createElement(CCard, __assign$1({ className: className, color: color }, (inverse && { textColor: 'white' }), rest, { ref: ref }),
|
|
14427
14765
|
React$1.createElement(CCardBody, null,
|
|
14428
14766
|
value && React$1.createElement("div", { className: "fs-4 fw-semibold" }, value),
|
|
14429
14767
|
title && React$1.createElement("div", null, title),
|
|
14430
14768
|
React$1.createElement(CProgress, __assign$1({ className: "my-2", height: 4 }, (inverse && { white: true }), progress)),
|
|
14431
|
-
text && (React$1.createElement("small", { className: inverse ? 'text-
|
|
14769
|
+
text && (React$1.createElement("small", { className: inverse ? 'text-white text-opacity-75' : 'text-body-secondary' }, text)))));
|
|
14432
14770
|
});
|
|
14433
14771
|
CWidgetStatsB.propTypes = {
|
|
14434
|
-
className: PropTypes.string,
|
|
14772
|
+
className: PropTypes$1.string,
|
|
14435
14773
|
color: colorPropType,
|
|
14436
|
-
inverse: PropTypes.bool,
|
|
14437
|
-
progress: PropTypes.object,
|
|
14438
|
-
text: PropTypes.string,
|
|
14439
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14440
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
|
|
14774
|
+
inverse: PropTypes$1.bool,
|
|
14775
|
+
progress: PropTypes$1.object,
|
|
14776
|
+
text: PropTypes$1.string,
|
|
14777
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14778
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14441
14779
|
};
|
|
14442
14780
|
CWidgetStatsB.displayName = 'CWidgetCWidgetStatsB';
|
|
14443
14781
|
|
|
14444
14782
|
var CWidgetStatsC = React$1.forwardRef(function (_a, ref) {
|
|
14445
14783
|
var className = _a.className, color = _a.color, icon = _a.icon, inverse = _a.inverse, progress = _a.progress, title = _a.title, value = _a.value, rest = __rest$1(_a, ["className", "color", "icon", "inverse", "progress", "title", "value"]);
|
|
14446
|
-
return (React$1.createElement(CCard, __assign$1({ className: className, color: color }, (inverse && { textColor: '
|
|
14784
|
+
return (React$1.createElement(CCard, __assign$1({ className: className, color: color }, (inverse && { textColor: 'white' }), rest, { ref: ref }),
|
|
14447
14785
|
React$1.createElement(CCardBody, null,
|
|
14448
|
-
icon &&
|
|
14449
|
-
value &&
|
|
14450
|
-
title && (React$1.createElement("div", { className: inverse ? 'text-
|
|
14786
|
+
icon && React$1.createElement("div", { className: "text-end mb-4" }, icon),
|
|
14787
|
+
value && React$1.createElement("div", { className: "fs-4 fw-semibold" }, value),
|
|
14788
|
+
title && (React$1.createElement("div", { className: inverse ? 'text-white text-opacity-75' : 'text-body-secondary' }, title)),
|
|
14451
14789
|
React$1.createElement(CProgress, __assign$1({ className: "mt-3 mb-0", height: 4 }, (inverse && { white: true }), progress)))));
|
|
14452
14790
|
});
|
|
14453
14791
|
CWidgetStatsC.propTypes = {
|
|
14454
|
-
className: PropTypes.string,
|
|
14792
|
+
className: PropTypes$1.string,
|
|
14455
14793
|
color: colorPropType,
|
|
14456
|
-
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14457
|
-
inverse: PropTypes.bool,
|
|
14458
|
-
progress: PropTypes.object,
|
|
14459
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14460
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
|
|
14794
|
+
icon: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14795
|
+
inverse: PropTypes$1.bool,
|
|
14796
|
+
progress: PropTypes$1.object,
|
|
14797
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14798
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14461
14799
|
};
|
|
14462
14800
|
CWidgetStatsC.displayName = 'CWidgetStatsCWidgetStatsC';
|
|
14463
14801
|
|
|
@@ -14476,15 +14814,15 @@ var CWidgetStatsD = React$1.forwardRef(function (_a, ref) {
|
|
|
14476
14814
|
index % 2 !== 0 && React$1.createElement("div", { className: "vr" }),
|
|
14477
14815
|
React$1.createElement(CCol, null,
|
|
14478
14816
|
React$1.createElement("div", { className: "fs-5 fw-semibold" }, value.value),
|
|
14479
|
-
React$1.createElement("div", { className: "text-uppercase text-
|
|
14817
|
+
React$1.createElement("div", { className: "text-uppercase text-body-secondary small" }, value.title))));
|
|
14480
14818
|
}))));
|
|
14481
14819
|
});
|
|
14482
14820
|
CWidgetStatsD.propTypes = {
|
|
14483
|
-
chart: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14484
|
-
className: PropTypes.string,
|
|
14821
|
+
chart: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14822
|
+
className: PropTypes$1.string,
|
|
14485
14823
|
color: colorPropType,
|
|
14486
|
-
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14487
|
-
values: PropTypes.arrayOf(PropTypes.any),
|
|
14824
|
+
icon: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14825
|
+
values: PropTypes$1.arrayOf(PropTypes$1.any),
|
|
14488
14826
|
};
|
|
14489
14827
|
CWidgetStatsD.displayName = 'CWidgetStatsD';
|
|
14490
14828
|
|
|
@@ -14492,16 +14830,16 @@ var CWidgetStatsE = React$1.forwardRef(function (_a, ref) {
|
|
|
14492
14830
|
var chart = _a.chart, className = _a.className, title = _a.title, value = _a.value, rest = __rest$1(_a, ["chart", "className", "title", "value"]);
|
|
14493
14831
|
return (React$1.createElement(CCard, __assign$1({ className: classNames$1(className) }, rest, { ref: ref }),
|
|
14494
14832
|
React$1.createElement(CCardBody, { className: "text-center" },
|
|
14495
|
-
title && (React$1.createElement("div", { className: "text-
|
|
14833
|
+
title && (React$1.createElement("div", { className: "text-body-secondary small text-uppercase fw-semibold" }, title)),
|
|
14496
14834
|
value && React$1.createElement("div", { className: "fs-6 fw-semibold py-3" }, value),
|
|
14497
14835
|
chart)));
|
|
14498
14836
|
});
|
|
14499
14837
|
CWidgetStatsE.propTypes = {
|
|
14500
|
-
children: PropTypes.node,
|
|
14501
|
-
chart: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14502
|
-
className: PropTypes.string,
|
|
14503
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14504
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
|
|
14838
|
+
children: PropTypes$1.node,
|
|
14839
|
+
chart: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14840
|
+
className: PropTypes$1.string,
|
|
14841
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14842
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14505
14843
|
};
|
|
14506
14844
|
CWidgetStatsE.displayName = 'CWidgetStatsE';
|
|
14507
14845
|
|
|
@@ -14512,17 +14850,17 @@ var CWidgetStatsF = React$1.forwardRef(function (_a, ref) {
|
|
|
14512
14850
|
React$1.createElement("div", { className: "me-3 text-white bg-".concat(color, " ").concat(padding ? 'p-3' : 'p-4') }, icon),
|
|
14513
14851
|
React$1.createElement("div", null,
|
|
14514
14852
|
React$1.createElement("div", { className: "fs-6 fw-semibold text-".concat(color) }, value),
|
|
14515
|
-
React$1.createElement("div", { className: "text-
|
|
14853
|
+
React$1.createElement("div", { className: "text-body-secondary text-uppercase fw-semibold small" }, title))),
|
|
14516
14854
|
footer && React$1.createElement(CCardFooter, null, footer)));
|
|
14517
14855
|
});
|
|
14518
14856
|
CWidgetStatsF.propTypes = {
|
|
14519
|
-
className: PropTypes.string,
|
|
14857
|
+
className: PropTypes$1.string,
|
|
14520
14858
|
color: colorPropType,
|
|
14521
|
-
footer: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14522
|
-
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14523
|
-
padding: PropTypes.bool,
|
|
14524
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14525
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
|
|
14859
|
+
footer: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14860
|
+
icon: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14861
|
+
padding: PropTypes$1.bool,
|
|
14862
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14863
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14526
14864
|
};
|
|
14527
14865
|
CWidgetStatsF.displayName = 'CWidgetStatsF';
|
|
14528
14866
|
|