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