@coreui/react-pro 5.0.0-alpha.0 → 5.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/calendar/CCalendar.d.ts +25 -7
- package/dist/components/calendar/utils.d.ts +12 -3
- package/dist/components/close-button/CCloseButton.d.ts +6 -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/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 +1388 -1097
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1388 -1097
- package/dist/index.js.map +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/calendar/CCalendar.tsx +396 -193
- package/src/components/calendar/utils.ts +91 -4
- package/src/components/carousel/CCarousel.tsx +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/CDropdownMenu.tsx +1 -1
- 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/navbar/CNavbar.tsx +2 -2
- package/src/components/offcanvas/COffcanvas.tsx +8 -1
- package/src/components/popover/CPopover.tsx +2 -2
- package/src/components/sidebar/CSidebar.tsx +1 -1
- package/src/components/smart-table/CSmartTable.tsx +2 -1
- package/src/components/smart-table/CSmartTableBody.tsx +11 -5
- 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/hooks/usePopper.ts +10 -2
- 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,10 +4822,10 @@ 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
|
|
|
@@ -4731,14 +4835,14 @@ var CButton = forwardRef(function (_a, ref) {
|
|
|
4731
4835
|
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));
|
|
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
|
+
});
|
|
8679
|
+
}
|
|
8680
|
+
if ((index + 1) % 7 === 0) {
|
|
8681
|
+
weeks[weeks.length - 1].weekNumber = getWeekNumber(day.date);
|
|
8565
8682
|
}
|
|
8566
|
-
weeks[weeks.length - 1].push(day);
|
|
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,20 +9866,22 @@ 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
|
|
|
9652
9886
|
var getPlacement = function (placement, direction, alignment, isRTL) {
|
|
9653
9887
|
var _placement = placement;
|
|
@@ -9753,34 +9987,34 @@ var CDropdown = forwardRef(function (_a, ref) {
|
|
|
9753
9987
|
_b.show = _visible,
|
|
9754
9988
|
_b), className) }, rest, { ref: forkedRef }), children))));
|
|
9755
9989
|
});
|
|
9756
|
-
var alignmentDirection = PropTypes.oneOf(['start', 'end']);
|
|
9990
|
+
var alignmentDirection = PropTypes$1.oneOf(['start', 'end']);
|
|
9757
9991
|
CDropdown.propTypes = {
|
|
9758
|
-
alignment: PropTypes.oneOfType([
|
|
9992
|
+
alignment: PropTypes$1.oneOfType([
|
|
9759
9993
|
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 }),
|
|
9994
|
+
PropTypes$1.shape({ xs: alignmentDirection.isRequired }),
|
|
9995
|
+
PropTypes$1.shape({ sm: alignmentDirection.isRequired }),
|
|
9996
|
+
PropTypes$1.shape({ md: alignmentDirection.isRequired }),
|
|
9997
|
+
PropTypes$1.shape({ lg: alignmentDirection.isRequired }),
|
|
9998
|
+
PropTypes$1.shape({ xl: alignmentDirection.isRequired }),
|
|
9999
|
+
PropTypes$1.shape({ xxl: alignmentDirection.isRequired }),
|
|
9766
10000
|
]),
|
|
9767
|
-
autoClose: PropTypes.oneOfType([
|
|
9768
|
-
PropTypes.bool,
|
|
9769
|
-
PropTypes.oneOf(['inside', 'outside']),
|
|
10001
|
+
autoClose: PropTypes$1.oneOfType([
|
|
10002
|
+
PropTypes$1.bool,
|
|
10003
|
+
PropTypes$1.oneOf(['inside', 'outside']),
|
|
9770
10004
|
]),
|
|
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,
|
|
10005
|
+
children: PropTypes$1.node,
|
|
10006
|
+
className: PropTypes$1.string,
|
|
10007
|
+
component: PropTypes$1.elementType,
|
|
10008
|
+
dark: PropTypes$1.bool,
|
|
10009
|
+
direction: PropTypes$1.oneOf(['center', 'dropup', 'dropup-center', 'dropend', 'dropstart']),
|
|
10010
|
+
offset: PropTypes$1.any,
|
|
10011
|
+
onHide: PropTypes$1.func,
|
|
10012
|
+
onShow: PropTypes$1.func,
|
|
9779
10013
|
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,
|
|
10014
|
+
popper: PropTypes$1.bool,
|
|
10015
|
+
portal: PropTypes$1.bool,
|
|
10016
|
+
variant: PropTypes$1.oneOf(['btn-group', 'dropdown', 'input-group', 'nav-item']),
|
|
10017
|
+
visible: PropTypes$1.bool,
|
|
9784
10018
|
};
|
|
9785
10019
|
CDropdown.displayName = 'CDropdown';
|
|
9786
10020
|
|
|
@@ -9789,7 +10023,7 @@ var CDropdownDivider = forwardRef(function (_a, ref) {
|
|
|
9789
10023
|
return React$1.createElement("hr", __assign$1({ className: classNames$1('dropdown-divider', className) }, rest, { ref: ref }));
|
|
9790
10024
|
});
|
|
9791
10025
|
CDropdownDivider.propTypes = {
|
|
9792
|
-
className: PropTypes.string,
|
|
10026
|
+
className: PropTypes$1.string,
|
|
9793
10027
|
};
|
|
9794
10028
|
CDropdownDivider.displayName = 'CDropdownDivider';
|
|
9795
10029
|
|
|
@@ -9798,9 +10032,9 @@ var CDropdownHeader = forwardRef(function (_a, ref) {
|
|
|
9798
10032
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-header', className) }, rest, { ref: ref }), children));
|
|
9799
10033
|
});
|
|
9800
10034
|
CDropdownHeader.propTypes = {
|
|
9801
|
-
children: PropTypes.node,
|
|
9802
|
-
className: PropTypes.string,
|
|
9803
|
-
component: PropTypes.elementType,
|
|
10035
|
+
children: PropTypes$1.node,
|
|
10036
|
+
className: PropTypes$1.string,
|
|
10037
|
+
component: PropTypes$1.elementType,
|
|
9804
10038
|
};
|
|
9805
10039
|
CDropdownHeader.displayName = 'CDropdownHeader';
|
|
9806
10040
|
|
|
@@ -9809,9 +10043,9 @@ var CDropdownItem = forwardRef(function (_a, ref) {
|
|
|
9809
10043
|
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('dropdown-item', className), component: component }, rest, { ref: ref }), children));
|
|
9810
10044
|
});
|
|
9811
10045
|
CDropdownItem.propTypes = {
|
|
9812
|
-
children: PropTypes.node,
|
|
9813
|
-
className: PropTypes.string,
|
|
9814
|
-
component: PropTypes.elementType,
|
|
10046
|
+
children: PropTypes$1.node,
|
|
10047
|
+
className: PropTypes$1.string,
|
|
10048
|
+
component: PropTypes$1.elementType,
|
|
9815
10049
|
};
|
|
9816
10050
|
CDropdownItem.displayName = 'CDropdownItem';
|
|
9817
10051
|
|
|
@@ -9820,9 +10054,9 @@ var CDropdownItemPlain = forwardRef(function (_a, ref) {
|
|
|
9820
10054
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-item-text', className) }, rest, { ref: ref }), children));
|
|
9821
10055
|
});
|
|
9822
10056
|
CDropdownItemPlain.propTypes = {
|
|
9823
|
-
children: PropTypes.node,
|
|
9824
|
-
className: PropTypes.string,
|
|
9825
|
-
component: PropTypes.elementType,
|
|
10057
|
+
children: PropTypes$1.node,
|
|
10058
|
+
className: PropTypes$1.string,
|
|
10059
|
+
component: PropTypes$1.elementType,
|
|
9826
10060
|
};
|
|
9827
10061
|
CDropdownItemPlain.displayName = 'CDropdownItemPlain';
|
|
9828
10062
|
|
|
@@ -9844,9 +10078,8 @@ var CDropdownMenu = forwardRef(function (_a, ref) {
|
|
|
9844
10078
|
var forkedRef = useForkedRef(ref, dropdownMenuRef);
|
|
9845
10079
|
return (React$1.createElement(CConditionalPortal, { portal: portal !== null && portal !== void 0 ? portal : false },
|
|
9846
10080
|
React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-menu', {
|
|
9847
|
-
'dropdown-menu-dark': dark,
|
|
9848
10081
|
show: visible,
|
|
9849
|
-
}, alignment && alignmentClassNames(alignment), className), ref: forkedRef, role: "menu", "aria-hidden": !visible }, (!popper && { 'data-coreui-popper': 'static' }), rest), Component === 'ul'
|
|
10082
|
+
}, 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
10083
|
? React$1.Children.map(children, function (child, index) {
|
|
9851
10084
|
if (React$1.isValidElement(child)) {
|
|
9852
10085
|
return React$1.createElement("li", { key: index }, React$1.cloneElement(child));
|
|
@@ -9856,9 +10089,9 @@ var CDropdownMenu = forwardRef(function (_a, ref) {
|
|
|
9856
10089
|
: children)));
|
|
9857
10090
|
});
|
|
9858
10091
|
CDropdownMenu.propTypes = {
|
|
9859
|
-
children: PropTypes.node,
|
|
9860
|
-
className: PropTypes.string,
|
|
9861
|
-
component: PropTypes.elementType,
|
|
10092
|
+
children: PropTypes$1.node,
|
|
10093
|
+
className: PropTypes$1.string,
|
|
10094
|
+
component: PropTypes$1.elementType,
|
|
9862
10095
|
};
|
|
9863
10096
|
CDropdownMenu.displayName = 'CDropdownMenu';
|
|
9864
10097
|
|
|
@@ -9894,11 +10127,11 @@ var CDropdownToggle = function (_a) {
|
|
|
9894
10127
|
return React$1.createElement(Toggler, null);
|
|
9895
10128
|
};
|
|
9896
10129
|
CDropdownToggle.propTypes = {
|
|
9897
|
-
caret: PropTypes.bool,
|
|
9898
|
-
children: PropTypes.node,
|
|
9899
|
-
className: PropTypes.string,
|
|
9900
|
-
custom: PropTypes.bool,
|
|
9901
|
-
split: PropTypes.bool,
|
|
10130
|
+
caret: PropTypes$1.bool,
|
|
10131
|
+
children: PropTypes$1.node,
|
|
10132
|
+
className: PropTypes$1.string,
|
|
10133
|
+
custom: PropTypes$1.bool,
|
|
10134
|
+
split: PropTypes$1.bool,
|
|
9902
10135
|
trigger: triggerPropType,
|
|
9903
10136
|
};
|
|
9904
10137
|
CDropdownToggle.displayName = 'CDropdownToggle';
|
|
@@ -9913,12 +10146,12 @@ var CSpinner = forwardRef(function (_a, ref) {
|
|
|
9913
10146
|
React$1.createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
9914
10147
|
});
|
|
9915
10148
|
CSpinner.propTypes = {
|
|
9916
|
-
className: PropTypes.string,
|
|
10149
|
+
className: PropTypes$1.string,
|
|
9917
10150
|
color: colorPropType,
|
|
9918
|
-
component: PropTypes.string,
|
|
9919
|
-
size: PropTypes.oneOf(['sm']),
|
|
9920
|
-
variant: PropTypes.oneOf(['border', 'grow']),
|
|
9921
|
-
visuallyHiddenLabel: PropTypes.string,
|
|
10151
|
+
component: PropTypes$1.string,
|
|
10152
|
+
size: PropTypes$1.oneOf(['sm']),
|
|
10153
|
+
variant: PropTypes$1.oneOf(['border', 'grow']),
|
|
10154
|
+
visuallyHiddenLabel: PropTypes$1.string,
|
|
9922
10155
|
};
|
|
9923
10156
|
CSpinner.displayName = 'CSpinner';
|
|
9924
10157
|
|
|
@@ -9966,10 +10199,10 @@ var CElementCover = forwardRef(function (_a, ref) {
|
|
|
9966
10199
|
} }, children || React$1.createElement(CSpinner, { variant: "grow", color: "primary" }))));
|
|
9967
10200
|
});
|
|
9968
10201
|
CElementCover.propTypes = {
|
|
9969
|
-
boundaries: PropTypes.array,
|
|
9970
|
-
children: PropTypes.node,
|
|
9971
|
-
className: PropTypes.string,
|
|
9972
|
-
opacity: PropTypes.number,
|
|
10202
|
+
boundaries: PropTypes$1.array,
|
|
10203
|
+
children: PropTypes$1.node,
|
|
10204
|
+
className: PropTypes$1.string,
|
|
10205
|
+
opacity: PropTypes$1.number,
|
|
9973
10206
|
};
|
|
9974
10207
|
CElementCover.displayName = 'CElementCover';
|
|
9975
10208
|
|
|
@@ -9979,9 +10212,9 @@ var CFooter = forwardRef(function (_a, ref) {
|
|
|
9979
10212
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('footer', (_b = {}, _b["footer-".concat(position)] = position, _b), className) }, rest, { ref: ref }), children));
|
|
9980
10213
|
});
|
|
9981
10214
|
CFooter.propTypes = {
|
|
9982
|
-
children: PropTypes.node,
|
|
9983
|
-
className: PropTypes.string,
|
|
9984
|
-
position: PropTypes.oneOf(['fixed', 'sticky']),
|
|
10215
|
+
children: PropTypes$1.node,
|
|
10216
|
+
className: PropTypes$1.string,
|
|
10217
|
+
position: PropTypes$1.oneOf(['fixed', 'sticky']),
|
|
9985
10218
|
};
|
|
9986
10219
|
CFooter.displayName = 'CFooter';
|
|
9987
10220
|
|
|
@@ -9990,9 +10223,9 @@ var CForm = forwardRef(function (_a, ref) {
|
|
|
9990
10223
|
return (React$1.createElement("form", __assign$1({ className: classNames$1({ 'was-validated': validated }, className) || undefined }, rest, { ref: ref }), children));
|
|
9991
10224
|
});
|
|
9992
10225
|
CForm.propTypes = {
|
|
9993
|
-
children: PropTypes.node,
|
|
9994
|
-
className: PropTypes.string,
|
|
9995
|
-
validated: PropTypes.bool,
|
|
10226
|
+
children: PropTypes$1.node,
|
|
10227
|
+
className: PropTypes$1.string,
|
|
10228
|
+
validated: PropTypes$1.bool,
|
|
9996
10229
|
};
|
|
9997
10230
|
CForm.displayName = 'CForm';
|
|
9998
10231
|
|
|
@@ -10044,7 +10277,7 @@ var CFormCheck = forwardRef(function (_a, ref) {
|
|
|
10044
10277
|
};
|
|
10045
10278
|
return React$1.createElement(FormCheck, null);
|
|
10046
10279
|
});
|
|
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);
|
|
10280
|
+
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
10281
|
CFormCheck.displayName = 'CFormCheck';
|
|
10049
10282
|
|
|
10050
10283
|
var CFormInput = forwardRef(function (_a, ref) {
|
|
@@ -10063,7 +10296,7 @@ var CFormInput = forwardRef(function (_a, ref) {
|
|
|
10063
10296
|
_b['is-valid'] = valid,
|
|
10064
10297
|
_b), className), id: id, type: type, onChange: function (event) { return (delay ? setValue(event) : onChange && onChange(event)); } }, rest, { ref: ref }), children)));
|
|
10065
10298
|
});
|
|
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);
|
|
10299
|
+
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
10300
|
CFormInput.displayName = 'CFormInput';
|
|
10068
10301
|
|
|
10069
10302
|
var CFormRange = forwardRef(function (_a, ref) {
|
|
@@ -10073,8 +10306,8 @@ var CFormRange = forwardRef(function (_a, ref) {
|
|
|
10073
10306
|
React$1.createElement("input", __assign$1({ type: "range", className: classNames$1('form-range', className) }, rest, { ref: ref }))));
|
|
10074
10307
|
});
|
|
10075
10308
|
CFormRange.propTypes = {
|
|
10076
|
-
className: PropTypes.string,
|
|
10077
|
-
label: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
10309
|
+
className: PropTypes$1.string,
|
|
10310
|
+
label: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
10078
10311
|
};
|
|
10079
10312
|
CFormRange.displayName = 'CFormRange';
|
|
10080
10313
|
|
|
@@ -10094,7 +10327,7 @@ var CFormSelect = forwardRef(function (_a, ref) {
|
|
|
10094
10327
|
})
|
|
10095
10328
|
: children)));
|
|
10096
10329
|
});
|
|
10097
|
-
CFormSelect.propTypes = __assign$1({ className: PropTypes.string, htmlSize: PropTypes.number, options: PropTypes.array }, CFormControlWrapper.propTypes);
|
|
10330
|
+
CFormSelect.propTypes = __assign$1({ className: PropTypes$1.string, htmlSize: PropTypes$1.number, options: PropTypes$1.array }, CFormControlWrapper.propTypes);
|
|
10098
10331
|
CFormSelect.displayName = 'CFormSelect';
|
|
10099
10332
|
|
|
10100
10333
|
var CFormSwitch = forwardRef(function (_a, ref) {
|
|
@@ -10114,14 +10347,14 @@ var CFormSwitch = forwardRef(function (_a, ref) {
|
|
|
10114
10347
|
label && (React$1.createElement(CFormLabel, __assign$1({ customClassName: "form-check-label" }, (id && { htmlFor: id })), label))));
|
|
10115
10348
|
});
|
|
10116
10349
|
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,
|
|
10350
|
+
className: PropTypes$1.string,
|
|
10351
|
+
id: PropTypes$1.string,
|
|
10352
|
+
invalid: PropTypes$1.bool,
|
|
10353
|
+
label: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
10354
|
+
reverse: PropTypes$1.bool,
|
|
10355
|
+
size: PropTypes$1.oneOf(['lg', 'xl']),
|
|
10356
|
+
type: PropTypes$1.oneOf(['checkbox', 'radio']),
|
|
10357
|
+
valid: PropTypes$1.bool,
|
|
10125
10358
|
};
|
|
10126
10359
|
CFormSwitch.displayName = 'CFormSwitch';
|
|
10127
10360
|
|
|
@@ -10133,7 +10366,7 @@ var CFormTextarea = forwardRef(function (_a, ref) {
|
|
|
10133
10366
|
'is-valid': valid,
|
|
10134
10367
|
}, className), id: id }, rest, { ref: ref }), children)));
|
|
10135
10368
|
});
|
|
10136
|
-
CFormTextarea.propTypes = __assign$1({ className: PropTypes.string, id: PropTypes.string, plainText: PropTypes.bool }, CFormControlWrapper.propTypes);
|
|
10369
|
+
CFormTextarea.propTypes = __assign$1({ className: PropTypes$1.string, id: PropTypes$1.string, plainText: PropTypes$1.bool }, CFormControlWrapper.propTypes);
|
|
10137
10370
|
CFormTextarea.displayName = 'CFormTextarea';
|
|
10138
10371
|
|
|
10139
10372
|
var CInputGroup = forwardRef(function (_a, ref) {
|
|
@@ -10144,9 +10377,9 @@ var CInputGroup = forwardRef(function (_a, ref) {
|
|
|
10144
10377
|
_b), className) }, rest, { ref: ref }), children));
|
|
10145
10378
|
});
|
|
10146
10379
|
CInputGroup.propTypes = {
|
|
10147
|
-
children: PropTypes.node,
|
|
10148
|
-
className: PropTypes.string,
|
|
10149
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
10380
|
+
children: PropTypes$1.node,
|
|
10381
|
+
className: PropTypes$1.string,
|
|
10382
|
+
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
10150
10383
|
};
|
|
10151
10384
|
CInputGroup.displayName = 'CInputGroup';
|
|
10152
10385
|
|
|
@@ -10155,9 +10388,9 @@ var CInputGroupText = forwardRef(function (_a, ref) {
|
|
|
10155
10388
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('input-group-text', className) }, rest, { ref: ref }), children));
|
|
10156
10389
|
});
|
|
10157
10390
|
CInputGroupText.propTypes = {
|
|
10158
|
-
children: PropTypes.node,
|
|
10159
|
-
className: PropTypes.string,
|
|
10160
|
-
component: PropTypes.elementType,
|
|
10391
|
+
children: PropTypes$1.node,
|
|
10392
|
+
className: PropTypes$1.string,
|
|
10393
|
+
component: PropTypes$1.elementType,
|
|
10161
10394
|
};
|
|
10162
10395
|
CInputGroupText.displayName = 'CInputGroupText';
|
|
10163
10396
|
|
|
@@ -10199,27 +10432,27 @@ var CCol = forwardRef(function (_a, ref) {
|
|
|
10199
10432
|
});
|
|
10200
10433
|
return (React$1.createElement("div", __assign$1({ className: classNames$1(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'col', className) }, rest, { ref: ref }), children));
|
|
10201
10434
|
});
|
|
10202
|
-
var span = PropTypes.oneOfType([
|
|
10203
|
-
PropTypes.bool,
|
|
10204
|
-
PropTypes.number,
|
|
10205
|
-
PropTypes.string,
|
|
10206
|
-
PropTypes.oneOf(['auto']),
|
|
10435
|
+
var span = PropTypes$1.oneOfType([
|
|
10436
|
+
PropTypes$1.bool,
|
|
10437
|
+
PropTypes$1.number,
|
|
10438
|
+
PropTypes$1.string,
|
|
10439
|
+
PropTypes$1.oneOf(['auto']),
|
|
10207
10440
|
]);
|
|
10208
|
-
var col = PropTypes.oneOfType([
|
|
10441
|
+
var col = PropTypes$1.oneOfType([
|
|
10209
10442
|
span,
|
|
10210
|
-
PropTypes.shape({
|
|
10443
|
+
PropTypes$1.shape({
|
|
10211
10444
|
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,
|
|
10445
|
+
offset: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
10446
|
+
order: PropTypes$1.oneOfType([
|
|
10447
|
+
PropTypes$1.oneOf(['first', 'last']),
|
|
10448
|
+
PropTypes$1.number,
|
|
10449
|
+
PropTypes$1.string,
|
|
10217
10450
|
]),
|
|
10218
10451
|
}),
|
|
10219
10452
|
]);
|
|
10220
10453
|
CCol.propTypes = {
|
|
10221
|
-
children: PropTypes.node,
|
|
10222
|
-
className: PropTypes.string,
|
|
10454
|
+
children: PropTypes$1.node,
|
|
10455
|
+
className: PropTypes$1.string,
|
|
10223
10456
|
xs: col,
|
|
10224
10457
|
sm: col,
|
|
10225
10458
|
md: col,
|
|
@@ -10248,14 +10481,14 @@ var CContainer = forwardRef(function (_a, ref) {
|
|
|
10248
10481
|
return (React$1.createElement("div", __assign$1({ className: classNames$1(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'container', className) }, rest, { ref: ref }), children));
|
|
10249
10482
|
});
|
|
10250
10483
|
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,
|
|
10484
|
+
children: PropTypes$1.node,
|
|
10485
|
+
className: PropTypes$1.string,
|
|
10486
|
+
sm: PropTypes$1.bool,
|
|
10487
|
+
md: PropTypes$1.bool,
|
|
10488
|
+
lg: PropTypes$1.bool,
|
|
10489
|
+
xl: PropTypes$1.bool,
|
|
10490
|
+
xxl: PropTypes$1.bool,
|
|
10491
|
+
fluid: PropTypes$1.bool,
|
|
10259
10492
|
};
|
|
10260
10493
|
CContainer.displayName = 'CContainer';
|
|
10261
10494
|
|
|
@@ -10291,15 +10524,15 @@ var CRow = forwardRef(function (_a, ref) {
|
|
|
10291
10524
|
});
|
|
10292
10525
|
return (React$1.createElement("div", { className: classNames$1('row', repsonsiveClassNames, className), ref: ref }, children));
|
|
10293
10526
|
});
|
|
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]),
|
|
10527
|
+
var bp = PropTypes$1.shape({
|
|
10528
|
+
cols: PropTypes$1.oneOfType([PropTypes$1.oneOf(['auto']), PropTypes$1.number, PropTypes$1.string]),
|
|
10529
|
+
gutter: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.number]),
|
|
10530
|
+
gutterX: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.number]),
|
|
10531
|
+
gutterY: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.number]),
|
|
10299
10532
|
});
|
|
10300
10533
|
CRow.propTypes = {
|
|
10301
|
-
children: PropTypes.node,
|
|
10302
|
-
className: PropTypes.string,
|
|
10534
|
+
children: PropTypes$1.node,
|
|
10535
|
+
className: PropTypes$1.string,
|
|
10303
10536
|
xs: bp,
|
|
10304
10537
|
sm: bp,
|
|
10305
10538
|
md: bp,
|
|
@@ -10315,11 +10548,11 @@ var CHeader = forwardRef(function (_a, ref) {
|
|
|
10315
10548
|
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
10549
|
});
|
|
10317
10550
|
CHeader.propTypes = {
|
|
10318
|
-
children: PropTypes.node,
|
|
10319
|
-
className: PropTypes.string,
|
|
10320
|
-
container: PropTypes.oneOfType([
|
|
10321
|
-
PropTypes.bool,
|
|
10322
|
-
PropTypes.oneOf([
|
|
10551
|
+
children: PropTypes$1.node,
|
|
10552
|
+
className: PropTypes$1.string,
|
|
10553
|
+
container: PropTypes$1.oneOfType([
|
|
10554
|
+
PropTypes$1.bool,
|
|
10555
|
+
PropTypes$1.oneOf([
|
|
10323
10556
|
'sm',
|
|
10324
10557
|
'md',
|
|
10325
10558
|
'lg',
|
|
@@ -10328,7 +10561,7 @@ CHeader.propTypes = {
|
|
|
10328
10561
|
'fluid',
|
|
10329
10562
|
]),
|
|
10330
10563
|
]),
|
|
10331
|
-
position: PropTypes.oneOf(['fixed', 'sticky']),
|
|
10564
|
+
position: PropTypes$1.oneOf(['fixed', 'sticky']),
|
|
10332
10565
|
};
|
|
10333
10566
|
CHeader.displayName = 'CHeader';
|
|
10334
10567
|
|
|
@@ -10337,9 +10570,9 @@ var CHeaderBrand = forwardRef(function (_a, ref) {
|
|
|
10337
10570
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('header-brand', className) }, rest, { ref: ref }), children));
|
|
10338
10571
|
});
|
|
10339
10572
|
CHeaderBrand.propTypes = {
|
|
10340
|
-
children: PropTypes.node,
|
|
10341
|
-
className: PropTypes.string,
|
|
10342
|
-
component: PropTypes.elementType,
|
|
10573
|
+
children: PropTypes$1.node,
|
|
10574
|
+
className: PropTypes$1.string,
|
|
10575
|
+
component: PropTypes$1.elementType,
|
|
10343
10576
|
};
|
|
10344
10577
|
CHeaderBrand.displayName = 'CHeaderBrand';
|
|
10345
10578
|
|
|
@@ -10348,7 +10581,7 @@ var CHeaderDivider = forwardRef(function (_a, ref) {
|
|
|
10348
10581
|
return React$1.createElement("div", __assign$1({ className: classNames$1('header-divider', className) }, rest, { ref: ref }));
|
|
10349
10582
|
});
|
|
10350
10583
|
CHeaderDivider.propTypes = {
|
|
10351
|
-
className: PropTypes.string,
|
|
10584
|
+
className: PropTypes$1.string,
|
|
10352
10585
|
};
|
|
10353
10586
|
CHeaderDivider.displayName = 'CHeaderDivider';
|
|
10354
10587
|
|
|
@@ -10357,9 +10590,9 @@ var CHeaderNav = forwardRef(function (_a, ref) {
|
|
|
10357
10590
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('header-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
10358
10591
|
});
|
|
10359
10592
|
CHeaderNav.propTypes = {
|
|
10360
|
-
children: PropTypes.node,
|
|
10361
|
-
className: PropTypes.string,
|
|
10362
|
-
component: PropTypes.elementType,
|
|
10593
|
+
children: PropTypes$1.node,
|
|
10594
|
+
className: PropTypes$1.string,
|
|
10595
|
+
component: PropTypes$1.elementType,
|
|
10363
10596
|
};
|
|
10364
10597
|
CHeaderNav.displayName = 'CHeaderNav';
|
|
10365
10598
|
|
|
@@ -10368,8 +10601,8 @@ var CHeaderText = forwardRef(function (_a, ref) {
|
|
|
10368
10601
|
return (React$1.createElement("span", __assign$1({ className: classNames$1('header-text', className) }, rest, { ref: ref }), children));
|
|
10369
10602
|
});
|
|
10370
10603
|
CHeaderText.propTypes = {
|
|
10371
|
-
children: PropTypes.node,
|
|
10372
|
-
className: PropTypes.string,
|
|
10604
|
+
children: PropTypes$1.node,
|
|
10605
|
+
className: PropTypes$1.string,
|
|
10373
10606
|
};
|
|
10374
10607
|
CHeaderText.displayName = 'CHeaderText';
|
|
10375
10608
|
|
|
@@ -10378,8 +10611,8 @@ var CHeaderToggler = forwardRef(function (_a, ref) {
|
|
|
10378
10611
|
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
10612
|
});
|
|
10380
10613
|
CHeaderToggler.propTypes = {
|
|
10381
|
-
children: PropTypes.node,
|
|
10382
|
-
className: PropTypes.string,
|
|
10614
|
+
children: PropTypes$1.node,
|
|
10615
|
+
className: PropTypes$1.string,
|
|
10383
10616
|
};
|
|
10384
10617
|
CHeaderToggler.displayName = 'CHeaderToggler';
|
|
10385
10618
|
|
|
@@ -10395,11 +10628,11 @@ var CImage = forwardRef(function (_a, ref) {
|
|
|
10395
10628
|
_b), className) || undefined }, rest, { ref: ref })));
|
|
10396
10629
|
});
|
|
10397
10630
|
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,
|
|
10631
|
+
align: PropTypes$1.oneOf(['start', 'center', 'end']),
|
|
10632
|
+
className: PropTypes$1.string,
|
|
10633
|
+
fluid: PropTypes$1.bool,
|
|
10634
|
+
rounded: PropTypes$1.bool,
|
|
10635
|
+
thumbnail: PropTypes$1.bool,
|
|
10403
10636
|
};
|
|
10404
10637
|
CImage.displayName = 'CImage';
|
|
10405
10638
|
|
|
@@ -10413,11 +10646,11 @@ var CListGroup = forwardRef(function (_a, ref) {
|
|
|
10413
10646
|
_b), className), ref: ref }, children));
|
|
10414
10647
|
});
|
|
10415
10648
|
CListGroup.propTypes = {
|
|
10416
|
-
children: PropTypes.node,
|
|
10417
|
-
className: PropTypes.string,
|
|
10418
|
-
component: PropTypes.elementType,
|
|
10419
|
-
flush: PropTypes.bool,
|
|
10420
|
-
layout: PropTypes.oneOf([
|
|
10649
|
+
children: PropTypes$1.node,
|
|
10650
|
+
className: PropTypes$1.string,
|
|
10651
|
+
component: PropTypes$1.elementType,
|
|
10652
|
+
flush: PropTypes$1.bool,
|
|
10653
|
+
layout: PropTypes$1.oneOf([
|
|
10421
10654
|
'horizontal',
|
|
10422
10655
|
'horizontal-sm',
|
|
10423
10656
|
'horizontal-md',
|
|
@@ -10446,12 +10679,12 @@ var CListGroupItem = forwardRef(function (_a, ref) {
|
|
|
10446
10679
|
_b), className) }, rest), children));
|
|
10447
10680
|
});
|
|
10448
10681
|
CListGroupItem.propTypes = {
|
|
10449
|
-
active: PropTypes.bool,
|
|
10450
|
-
children: PropTypes.node,
|
|
10451
|
-
className: PropTypes.string,
|
|
10682
|
+
active: PropTypes$1.bool,
|
|
10683
|
+
children: PropTypes$1.node,
|
|
10684
|
+
className: PropTypes$1.string,
|
|
10452
10685
|
color: colorPropType,
|
|
10453
|
-
component: PropTypes.elementType,
|
|
10454
|
-
disabled: PropTypes.bool,
|
|
10686
|
+
component: PropTypes$1.elementType,
|
|
10687
|
+
disabled: PropTypes$1.bool,
|
|
10455
10688
|
};
|
|
10456
10689
|
CListGroupItem.displayName = 'CListGroupItem';
|
|
10457
10690
|
|
|
@@ -10475,13 +10708,13 @@ var CLoadingButton = forwardRef(function (_a, ref) {
|
|
|
10475
10708
|
children));
|
|
10476
10709
|
});
|
|
10477
10710
|
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,
|
|
10711
|
+
children: PropTypes$1.node,
|
|
10712
|
+
className: PropTypes$1.string,
|
|
10713
|
+
disabledOnLoading: PropTypes$1.bool,
|
|
10714
|
+
loading: PropTypes$1.bool,
|
|
10715
|
+
onClick: PropTypes$1.func,
|
|
10716
|
+
spinnerType: PropTypes$1.oneOf(['border', 'grow']),
|
|
10717
|
+
timeout: PropTypes$1.number,
|
|
10485
10718
|
};
|
|
10486
10719
|
CLoadingButton.displayName = 'CLoadingButton';
|
|
10487
10720
|
|
|
@@ -10490,8 +10723,8 @@ var CModalContent = forwardRef(function (_a, ref) {
|
|
|
10490
10723
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-content', className) }, rest, { ref: ref }), children));
|
|
10491
10724
|
});
|
|
10492
10725
|
CModalContent.propTypes = {
|
|
10493
|
-
children: PropTypes.node,
|
|
10494
|
-
className: PropTypes.string,
|
|
10726
|
+
children: PropTypes$1.node,
|
|
10727
|
+
className: PropTypes$1.string,
|
|
10495
10728
|
};
|
|
10496
10729
|
CModalContent.displayName = 'CModalContent';
|
|
10497
10730
|
|
|
@@ -10509,26 +10742,27 @@ var CModalDialog = forwardRef(function (_a, ref) {
|
|
|
10509
10742
|
_b), className) }, rest, { ref: ref }), children));
|
|
10510
10743
|
});
|
|
10511
10744
|
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']),
|
|
10745
|
+
alignment: PropTypes$1.oneOf(['top', 'center']),
|
|
10746
|
+
children: PropTypes$1.node,
|
|
10747
|
+
className: PropTypes$1.string,
|
|
10748
|
+
fullscreen: PropTypes$1.oneOfType([
|
|
10749
|
+
PropTypes$1.bool,
|
|
10750
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
10518
10751
|
]),
|
|
10519
|
-
scrollable: PropTypes.bool,
|
|
10520
|
-
size: PropTypes.oneOf(['sm', 'lg', 'xl']),
|
|
10752
|
+
scrollable: PropTypes$1.bool,
|
|
10753
|
+
size: PropTypes$1.oneOf(['sm', 'lg', 'xl']),
|
|
10521
10754
|
};
|
|
10522
10755
|
CModalDialog.displayName = 'CModalDialog';
|
|
10523
10756
|
|
|
10524
10757
|
var CModalContext = createContext({});
|
|
10525
10758
|
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,
|
|
10759
|
+
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"]);
|
|
10760
|
+
var activeElementRef = useRef(null);
|
|
10527
10761
|
var modalRef = useRef(null);
|
|
10528
10762
|
var modalContentRef = useRef(null);
|
|
10529
10763
|
var forkedRef = useForkedRef(ref, modalRef);
|
|
10530
|
-
var
|
|
10531
|
-
var
|
|
10764
|
+
var _j = useState(visible), _visible = _j[0], setVisible = _j[1];
|
|
10765
|
+
var _k = useState(false), staticBackdrop = _k[0], setStaticBackdrop = _k[1];
|
|
10532
10766
|
var contextValues = {
|
|
10533
10767
|
visible: _visible,
|
|
10534
10768
|
setVisible: setVisible,
|
|
@@ -10537,10 +10771,17 @@ var CModal = forwardRef(function (_a, ref) {
|
|
|
10537
10771
|
setVisible(visible);
|
|
10538
10772
|
}, [visible]);
|
|
10539
10773
|
useEffect(function () {
|
|
10540
|
-
|
|
10541
|
-
|
|
10774
|
+
var _a;
|
|
10775
|
+
if (_visible) {
|
|
10776
|
+
activeElementRef.current = document.activeElement;
|
|
10777
|
+
document.addEventListener('mouseup', handleClickOutside);
|
|
10778
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
10779
|
+
}
|
|
10780
|
+
else {
|
|
10781
|
+
(_a = activeElementRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
10782
|
+
}
|
|
10542
10783
|
return function () {
|
|
10543
|
-
document.removeEventListener('
|
|
10784
|
+
document.removeEventListener('mouseup', handleClickOutside);
|
|
10544
10785
|
document.removeEventListener('keydown', handleKeyDown);
|
|
10545
10786
|
};
|
|
10546
10787
|
}, [_visible]);
|
|
@@ -10565,7 +10806,7 @@ var CModal = forwardRef(function (_a, ref) {
|
|
|
10565
10806
|
}
|
|
10566
10807
|
setTimeout(function () {
|
|
10567
10808
|
var _a;
|
|
10568
|
-
(_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
10809
|
+
focus && ((_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.focus());
|
|
10569
10810
|
}, transition ? duration : 0);
|
|
10570
10811
|
}
|
|
10571
10812
|
else {
|
|
@@ -10597,36 +10838,39 @@ var CModal = forwardRef(function (_a, ref) {
|
|
|
10597
10838
|
return (React$1.createElement(React$1.Fragment, null,
|
|
10598
10839
|
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
10840
|
React$1.createElement(CModalContext.Provider, { value: contextValues },
|
|
10600
|
-
React$1.createElement("div", { className: classNames$1('modal', {
|
|
10841
|
+
React$1.createElement("div", __assign$1({ className: classNames$1('modal', {
|
|
10601
10842
|
'modal-static': staticBackdrop,
|
|
10602
10843
|
fade: transition,
|
|
10603
10844
|
show: state === 'entered',
|
|
10604
|
-
}, className), tabIndex: -1
|
|
10845
|
+
}, className), tabIndex: -1 }, (_visible
|
|
10846
|
+
? { 'aria-modal': true, role: 'dialog' }
|
|
10847
|
+
: { 'aria-hidden': 'true' }), { style: __assign$1({}, (state !== 'exited' && { display: 'block' })) }, rest, { ref: forkedRef }),
|
|
10605
10848
|
React$1.createElement(CModalDialog, { alignment: alignment, fullscreen: fullscreen, scrollable: scrollable, size: size },
|
|
10606
|
-
React$1.createElement(CModalContent,
|
|
10849
|
+
React$1.createElement(CModalContent, { ref: modalContentRef }, children)))))); }),
|
|
10607
10850
|
backdrop && (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
10608
10851
|
React$1.createElement(CBackdrop, { visible: _visible })))));
|
|
10609
10852
|
});
|
|
10610
10853
|
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.
|
|
10854
|
+
alignment: PropTypes$1.oneOf(['top', 'center']),
|
|
10855
|
+
backdrop: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.oneOf(['static'])]),
|
|
10856
|
+
children: PropTypes$1.node,
|
|
10857
|
+
className: PropTypes$1.string,
|
|
10858
|
+
duration: PropTypes$1.number,
|
|
10859
|
+
focus: PropTypes$1.bool,
|
|
10860
|
+
fullscreen: PropTypes$1.oneOfType([
|
|
10861
|
+
PropTypes$1.bool,
|
|
10862
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
10619
10863
|
]),
|
|
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,
|
|
10864
|
+
keyboard: PropTypes$1.bool,
|
|
10865
|
+
onClose: PropTypes$1.func,
|
|
10866
|
+
onClosePrevented: PropTypes$1.func,
|
|
10867
|
+
onShow: PropTypes$1.func,
|
|
10868
|
+
portal: PropTypes$1.bool,
|
|
10869
|
+
scrollable: PropTypes$1.bool,
|
|
10870
|
+
size: PropTypes$1.oneOf(['sm', 'lg', 'xl']),
|
|
10871
|
+
transition: PropTypes$1.bool,
|
|
10872
|
+
unmountOnClose: PropTypes$1.bool,
|
|
10873
|
+
visible: PropTypes$1.bool,
|
|
10630
10874
|
};
|
|
10631
10875
|
CModal.displayName = 'CModal';
|
|
10632
10876
|
|
|
@@ -10635,8 +10879,8 @@ var CModalBody = forwardRef(function (_a, ref) {
|
|
|
10635
10879
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-body', className) }, rest, { ref: ref }), children));
|
|
10636
10880
|
});
|
|
10637
10881
|
CModalBody.propTypes = {
|
|
10638
|
-
children: PropTypes.node,
|
|
10639
|
-
className: PropTypes.string,
|
|
10882
|
+
children: PropTypes$1.node,
|
|
10883
|
+
className: PropTypes$1.string,
|
|
10640
10884
|
};
|
|
10641
10885
|
CModalBody.displayName = 'CModalBody';
|
|
10642
10886
|
|
|
@@ -10645,8 +10889,8 @@ var CModalFooter = forwardRef(function (_a, ref) {
|
|
|
10645
10889
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-footer', className) }, rest, { ref: ref }), children));
|
|
10646
10890
|
});
|
|
10647
10891
|
CModalFooter.propTypes = {
|
|
10648
|
-
children: PropTypes.node,
|
|
10649
|
-
className: PropTypes.string,
|
|
10892
|
+
children: PropTypes$1.node,
|
|
10893
|
+
className: PropTypes$1.string,
|
|
10650
10894
|
};
|
|
10651
10895
|
CModalFooter.displayName = 'CModalFooter';
|
|
10652
10896
|
|
|
@@ -10658,9 +10902,9 @@ var CModalHeader = forwardRef(function (_a, ref) {
|
|
|
10658
10902
|
closeButton && React$1.createElement(CCloseButton, { onClick: function () { return setVisible(false); } })));
|
|
10659
10903
|
});
|
|
10660
10904
|
CModalHeader.propTypes = {
|
|
10661
|
-
children: PropTypes.node,
|
|
10662
|
-
className: PropTypes.string,
|
|
10663
|
-
closeButton: PropTypes.bool,
|
|
10905
|
+
children: PropTypes$1.node,
|
|
10906
|
+
className: PropTypes$1.string,
|
|
10907
|
+
closeButton: PropTypes$1.bool,
|
|
10664
10908
|
};
|
|
10665
10909
|
CModalHeader.displayName = 'CModalHeader';
|
|
10666
10910
|
|
|
@@ -10669,16 +10913,16 @@ var CModalTitle = forwardRef(function (_a, ref) {
|
|
|
10669
10913
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('modal-title', className) }, rest, { ref: ref }), children));
|
|
10670
10914
|
});
|
|
10671
10915
|
CModalTitle.propTypes = {
|
|
10672
|
-
children: PropTypes.node,
|
|
10673
|
-
className: PropTypes.string,
|
|
10674
|
-
component: PropTypes.elementType,
|
|
10916
|
+
children: PropTypes$1.node,
|
|
10917
|
+
className: PropTypes$1.string,
|
|
10918
|
+
component: PropTypes$1.elementType,
|
|
10675
10919
|
};
|
|
10676
10920
|
CModalTitle.displayName = 'CModalTitle';
|
|
10677
10921
|
|
|
10678
10922
|
var createNativeOptions = function (options) {
|
|
10679
10923
|
return options &&
|
|
10680
10924
|
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.
|
|
10925
|
+
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
10926
|
});
|
|
10683
10927
|
};
|
|
10684
10928
|
var CMultiSelectNativeSelect = forwardRef(function (_a, ref) {
|
|
@@ -10686,11 +10930,11 @@ var CMultiSelectNativeSelect = forwardRef(function (_a, ref) {
|
|
|
10686
10930
|
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
10931
|
});
|
|
10688
10932
|
CMultiSelectNativeSelect.propTypes = {
|
|
10689
|
-
options: PropTypes.array,
|
|
10690
|
-
value: PropTypes.oneOfType([
|
|
10691
|
-
PropTypes.number,
|
|
10692
|
-
PropTypes.string,
|
|
10693
|
-
PropTypes.arrayOf(PropTypes.string.isRequired),
|
|
10933
|
+
options: PropTypes$1.array,
|
|
10934
|
+
value: PropTypes$1.oneOfType([
|
|
10935
|
+
PropTypes$1.number,
|
|
10936
|
+
PropTypes$1.string,
|
|
10937
|
+
PropTypes$1.arrayOf(PropTypes$1.string.isRequired),
|
|
10694
10938
|
]),
|
|
10695
10939
|
};
|
|
10696
10940
|
CMultiSelectNativeSelect.displayName = 'CMultiSelectNativeSelect';
|
|
@@ -10763,13 +11007,13 @@ var CVirtualScroller = forwardRef(function (_a, ref) {
|
|
|
10763
11007
|
}))));
|
|
10764
11008
|
});
|
|
10765
11009
|
CVirtualScroller.propTypes = {
|
|
10766
|
-
onScroll: PropTypes.func,
|
|
10767
|
-
visibleItems: PropTypes.number.isRequired,
|
|
11010
|
+
onScroll: PropTypes$1.func,
|
|
11011
|
+
visibleItems: PropTypes$1.number.isRequired,
|
|
10768
11012
|
};
|
|
10769
11013
|
CVirtualScroller.displayName = 'CVirtualScroller';
|
|
10770
11014
|
|
|
10771
|
-
var createOption = function (
|
|
10772
|
-
var value =
|
|
11015
|
+
var createOption = function (label, options) {
|
|
11016
|
+
var value = label.toLowerCase().replace(/\s/g, '-');
|
|
10773
11017
|
var uniqueValue = value;
|
|
10774
11018
|
var i = 1;
|
|
10775
11019
|
while (options.some(function (option) { return String(option.value) === uniqueValue; })) {
|
|
@@ -10779,7 +11023,7 @@ var createOption = function (text, options) {
|
|
|
10779
11023
|
return [
|
|
10780
11024
|
{
|
|
10781
11025
|
value: uniqueValue,
|
|
10782
|
-
|
|
11026
|
+
label: label,
|
|
10783
11027
|
custom: true,
|
|
10784
11028
|
},
|
|
10785
11029
|
];
|
|
@@ -10791,9 +11035,9 @@ var filterOptionsList = function (search, _options) {
|
|
|
10791
11035
|
var option = _options_1[_i];
|
|
10792
11036
|
var options = option.options &&
|
|
10793
11037
|
option.options.filter(function (option) {
|
|
10794
|
-
return option.
|
|
11038
|
+
return option.lable && option.label.toLowerCase().includes(search.toLowerCase());
|
|
10795
11039
|
});
|
|
10796
|
-
if ((option.
|
|
11040
|
+
if ((option.lable && option.label.toLowerCase().includes(search.toLowerCase())) ||
|
|
10797
11041
|
(options && options.length > 0)) {
|
|
10798
11042
|
optionsList.push(Object.assign({}, option, options && options.length > 0 && { options: options }));
|
|
10799
11043
|
}
|
|
@@ -10895,7 +11139,7 @@ var CMultiSelectOptions = forwardRef(function (_a, ref) {
|
|
|
10895
11139
|
'form-multi-select-option-with-checkbox': optionsStyle === 'checkbox',
|
|
10896
11140
|
'form-multi-selected': selected.some(function (_option) { return _option.value === option.value; }),
|
|
10897
11141
|
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.
|
|
11142
|
+
}), 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
11143
|
})) : (React$1.createElement("div", { className: "form-multi-select-options-empty" }, searchNoResultsLabel));
|
|
10900
11144
|
};
|
|
10901
11145
|
return (React$1.createElement(React$1.Fragment, null,
|
|
@@ -10905,16 +11149,16 @@ var CMultiSelectOptions = forwardRef(function (_a, ref) {
|
|
|
10905
11149
|
loading && React$1.createElement(CElementCover, null)));
|
|
10906
11150
|
});
|
|
10907
11151
|
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,
|
|
11152
|
+
handleOptionOnClick: PropTypes$1.func,
|
|
11153
|
+
loading: PropTypes$1.bool,
|
|
11154
|
+
options: PropTypes$1.array.isRequired,
|
|
11155
|
+
optionsMaxHeight: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
11156
|
+
optionsStyle: PropTypes$1.oneOf(['checkbox', 'text']),
|
|
11157
|
+
optionsTemplate: PropTypes$1.func,
|
|
11158
|
+
optionsGroupsTemplate: PropTypes$1.func,
|
|
11159
|
+
searchNoResultsLabel: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
11160
|
+
virtualScroller: PropTypes$1.bool,
|
|
11161
|
+
visibleItems: PropTypes$1.number,
|
|
10918
11162
|
};
|
|
10919
11163
|
CMultiSelectOptions.displayName = 'CMultiSelectOptions';
|
|
10920
11164
|
|
|
@@ -10934,7 +11178,7 @@ var CMultiSelectSelection = forwardRef(function (_a, ref) {
|
|
|
10934
11178
|
selected.map(function (option, index) {
|
|
10935
11179
|
if (selectionType === 'tags') {
|
|
10936
11180
|
return (React$1.createElement("span", { className: "form-multi-select-tag", key: index },
|
|
10937
|
-
option.
|
|
11181
|
+
option.label,
|
|
10938
11182
|
!option.disabled && (React$1.createElement("button", { className: "form-multi-select-tag-delete", "aria-label": "Close", onClick: function () { return onRemove && onRemove(option); } }))));
|
|
10939
11183
|
}
|
|
10940
11184
|
return;
|
|
@@ -10942,20 +11186,20 @@ var CMultiSelectSelection = forwardRef(function (_a, ref) {
|
|
|
10942
11186
|
multiple &&
|
|
10943
11187
|
selectionType === 'text' &&
|
|
10944
11188
|
selected.map(function (option, index) { return (React$1.createElement("span", { key: index },
|
|
10945
|
-
option.
|
|
11189
|
+
option.label,
|
|
10946
11190
|
index === selected.length - 1 ? '' : ',',
|
|
10947
11191
|
"\u00A0")); }),
|
|
10948
|
-
!multiple && !search && selected.map(function (option) { return option.
|
|
11192
|
+
!multiple && !search && selected.map(function (option) { return option.label; })[0],
|
|
10949
11193
|
children));
|
|
10950
11194
|
});
|
|
10951
11195
|
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,
|
|
11196
|
+
multiple: PropTypes$1.bool,
|
|
11197
|
+
onRemove: PropTypes$1.func,
|
|
11198
|
+
placeholder: PropTypes$1.string,
|
|
11199
|
+
search: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.oneOf(['external'])]),
|
|
11200
|
+
selected: PropTypes$1.array,
|
|
11201
|
+
selectionType: PropTypes$1.oneOf(['counter', 'tags', 'text']),
|
|
11202
|
+
selectionTypeCounterText: PropTypes$1.string,
|
|
10959
11203
|
};
|
|
10960
11204
|
CMultiSelectSelection.displayName = 'CMultiSelectSelection';
|
|
10961
11205
|
|
|
@@ -10982,7 +11226,7 @@ var CMultiSelect = forwardRef(function (_a, ref) {
|
|
|
10982
11226
|
var flattenedOptions = useMemo(function () { return flattenOptionsArray(options); }, [JSON.stringify(options)]);
|
|
10983
11227
|
var userOption = useMemo(function () {
|
|
10984
11228
|
if (allowCreateOptions &&
|
|
10985
|
-
filteredOptions.some(function (option) { return option.
|
|
11229
|
+
filteredOptions.some(function (option) { return option.label && option.label.toLowerCase() === searchValue.toLowerCase(); })) {
|
|
10986
11230
|
return false;
|
|
10987
11231
|
}
|
|
10988
11232
|
return searchRef.current && createOption(String(searchValue), flattenedOptions);
|
|
@@ -11065,7 +11309,7 @@ var CMultiSelect = forwardRef(function (_a, ref) {
|
|
|
11065
11309
|
}
|
|
11066
11310
|
if (!userOption) {
|
|
11067
11311
|
setSelected(__spreadArray(__spreadArray([], selected, true), [
|
|
11068
|
-
filteredOptions.find(function (option) { return String(option.
|
|
11312
|
+
filteredOptions.find(function (option) { return String(option.label).toLowerCase() === searchValue.toLowerCase(); }),
|
|
11069
11313
|
], false));
|
|
11070
11314
|
}
|
|
11071
11315
|
setSearchValue('');
|
|
@@ -11131,7 +11375,7 @@ var CMultiSelect = forwardRef(function (_a, ref) {
|
|
|
11131
11375
|
selectionType === 'counter' && {
|
|
11132
11376
|
placeholder: "".concat(selected.length, " ").concat(selectionTypeCounterText),
|
|
11133
11377
|
}), (selected.length > 0 &&
|
|
11134
|
-
!multiple && { placeholder: selected.map(function (option) { return option.
|
|
11378
|
+
!multiple && { placeholder: selected.map(function (option) { return option.label; })[0] }), (multiple &&
|
|
11135
11379
|
selected.length > 0 &&
|
|
11136
11380
|
selectionType !== 'counter' && { size: searchValue.length + 2 }), { ref: searchRef })))),
|
|
11137
11381
|
React$1.createElement("div", { className: "form-multi-select-buttons" },
|
|
@@ -11147,7 +11391,7 @@ var CMultiSelect = forwardRef(function (_a, ref) {
|
|
|
11147
11391
|
? userOption || []
|
|
11148
11392
|
: filteredOptions, optionsMaxHeight: optionsMaxHeight, optionsStyle: optionsStyle, optionsTemplate: optionsTemplate, optionsGroupsTemplate: optionsGroupsTemplate, searchNoResultsLabel: searchNoResultsLabel, selected: selected, virtualScroller: virtualScroller, visibleItems: visibleItems })))));
|
|
11149
11393
|
});
|
|
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);
|
|
11394
|
+
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
11395
|
CMultiSelect.displayName = 'CMultiSelect';
|
|
11152
11396
|
|
|
11153
11397
|
var CNav = forwardRef(function (_a, ref) {
|
|
@@ -11159,11 +11403,11 @@ var CNav = forwardRef(function (_a, ref) {
|
|
|
11159
11403
|
_b), className), role: "navigation" }, rest, { ref: ref }), children));
|
|
11160
11404
|
});
|
|
11161
11405
|
CNav.propTypes = {
|
|
11162
|
-
children: PropTypes.node,
|
|
11163
|
-
className: PropTypes.string,
|
|
11164
|
-
component: PropTypes.elementType,
|
|
11165
|
-
layout: PropTypes.oneOf(['fill', 'justified']),
|
|
11166
|
-
variant: PropTypes.oneOf(['
|
|
11406
|
+
children: PropTypes$1.node,
|
|
11407
|
+
className: PropTypes$1.string,
|
|
11408
|
+
component: PropTypes$1.elementType,
|
|
11409
|
+
layout: PropTypes$1.oneOf(['fill', 'justified']),
|
|
11410
|
+
variant: PropTypes$1.oneOf(['pills', 'tabs', 'underline']),
|
|
11167
11411
|
};
|
|
11168
11412
|
CNav.displayName = 'CNav';
|
|
11169
11413
|
|
|
@@ -11172,8 +11416,8 @@ var CNavGroupItems = forwardRef(function (_a, ref) {
|
|
|
11172
11416
|
return (React$1.createElement("ul", __assign$1({ className: classNames$1('nav-group-items', className) }, rest, { ref: ref }), children));
|
|
11173
11417
|
});
|
|
11174
11418
|
CNavGroupItems.propTypes = {
|
|
11175
|
-
children: PropTypes.node,
|
|
11176
|
-
className: PropTypes.string,
|
|
11419
|
+
children: PropTypes$1.node,
|
|
11420
|
+
className: PropTypes$1.string,
|
|
11177
11421
|
};
|
|
11178
11422
|
CNavGroupItems.displayName = 'CNavGroupItems';
|
|
11179
11423
|
|
|
@@ -11197,19 +11441,24 @@ var CSidebarNav = forwardRef(function (_a, ref) {
|
|
|
11197
11441
|
}))));
|
|
11198
11442
|
});
|
|
11199
11443
|
CSidebarNav.propTypes = {
|
|
11200
|
-
children: PropTypes.node,
|
|
11201
|
-
className: PropTypes.string,
|
|
11444
|
+
children: PropTypes$1.node,
|
|
11445
|
+
className: PropTypes$1.string,
|
|
11202
11446
|
};
|
|
11203
11447
|
CSidebarNav.displayName = 'CSidebarNav';
|
|
11204
11448
|
|
|
11449
|
+
var isInVisibleGroup = function (el1, el2) {
|
|
11450
|
+
var array1 = el1.toString().split('.');
|
|
11451
|
+
var array2 = el2.toString().split('.');
|
|
11452
|
+
return array2.every(function (item, index) { return item === array1[index]; });
|
|
11453
|
+
};
|
|
11205
11454
|
var CNavGroup = forwardRef(function (_a, ref) {
|
|
11206
11455
|
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
11456
|
var _b = useState(), height = _b[0], setHeight = _b[1];
|
|
11208
11457
|
var navItemsRef = useRef(null);
|
|
11209
11458
|
var _c = useContext(CNavContext), visibleGroup = _c.visibleGroup, setVisibleGroup = _c.setVisibleGroup;
|
|
11210
|
-
var _d = useState(Boolean(visible || (idx && visibleGroup && visibleGroup
|
|
11459
|
+
var _d = useState(Boolean(visible || (idx && visibleGroup && isInVisibleGroup(visibleGroup, idx)))), _visible = _d[0], setVisible = _d[1];
|
|
11211
11460
|
useEffect(function () {
|
|
11212
|
-
setVisible(Boolean(idx && visibleGroup && visibleGroup
|
|
11461
|
+
setVisible(Boolean(idx && visibleGroup && isInVisibleGroup(visibleGroup, idx)));
|
|
11213
11462
|
}, [visibleGroup]);
|
|
11214
11463
|
var handleTogglerOnCLick = function (event) {
|
|
11215
11464
|
event.preventDefault();
|
|
@@ -11259,12 +11508,12 @@ var CNavGroup = forwardRef(function (_a, ref) {
|
|
|
11259
11508
|
}))); })));
|
|
11260
11509
|
});
|
|
11261
11510
|
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,
|
|
11511
|
+
children: PropTypes$1.node,
|
|
11512
|
+
className: PropTypes$1.string,
|
|
11513
|
+
compact: PropTypes$1.bool,
|
|
11514
|
+
idx: PropTypes$1.string,
|
|
11515
|
+
toggler: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
11516
|
+
visible: PropTypes$1.bool,
|
|
11268
11517
|
};
|
|
11269
11518
|
CNavGroup.displayName = 'CNavGroup';
|
|
11270
11519
|
|
|
@@ -11281,9 +11530,9 @@ var CNavLink = forwardRef(function (_a, ref) {
|
|
|
11281
11530
|
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('nav-link', className) }, rest, { ref: forkedRef }), children));
|
|
11282
11531
|
});
|
|
11283
11532
|
CNavLink.propTypes = {
|
|
11284
|
-
children: PropTypes.node,
|
|
11285
|
-
className: PropTypes.string,
|
|
11286
|
-
idx: PropTypes.string,
|
|
11533
|
+
children: PropTypes$1.node,
|
|
11534
|
+
className: PropTypes$1.string,
|
|
11535
|
+
idx: PropTypes$1.string,
|
|
11287
11536
|
};
|
|
11288
11537
|
CNavLink.displayName = 'CNavLink';
|
|
11289
11538
|
|
|
@@ -11292,8 +11541,8 @@ var CNavItem = forwardRef(function (_a, ref) {
|
|
|
11292
11541
|
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
11542
|
});
|
|
11294
11543
|
CNavItem.propTypes = {
|
|
11295
|
-
children: PropTypes.node,
|
|
11296
|
-
className: PropTypes.string,
|
|
11544
|
+
children: PropTypes$1.node,
|
|
11545
|
+
className: PropTypes$1.string,
|
|
11297
11546
|
};
|
|
11298
11547
|
CNavItem.displayName = 'CNavItem';
|
|
11299
11548
|
|
|
@@ -11302,8 +11551,8 @@ var CNavTitle = forwardRef(function (_a, ref) {
|
|
|
11302
11551
|
return (React$1.createElement("li", __assign$1({ className: classNames$1('nav-title', className) }, rest, { ref: ref }), children));
|
|
11303
11552
|
});
|
|
11304
11553
|
CNavTitle.propTypes = {
|
|
11305
|
-
children: PropTypes.node,
|
|
11306
|
-
className: PropTypes.string,
|
|
11554
|
+
children: PropTypes$1.node,
|
|
11555
|
+
className: PropTypes$1.string,
|
|
11307
11556
|
};
|
|
11308
11557
|
CNavTitle.displayName = 'CNavTitle';
|
|
11309
11558
|
|
|
@@ -11312,19 +11561,18 @@ var CNavbar = forwardRef(function (_a, ref) {
|
|
|
11312
11561
|
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
11562
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar', (_b = {},
|
|
11314
11563
|
_b["bg-".concat(color)] = color,
|
|
11315
|
-
_b["navbar-".concat(colorScheme)] = colorScheme,
|
|
11316
11564
|
_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))));
|
|
11565
|
+
_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
11566
|
});
|
|
11319
11567
|
CNavbar.propTypes = {
|
|
11320
|
-
children: PropTypes.node,
|
|
11321
|
-
className: PropTypes.string,
|
|
11568
|
+
children: PropTypes$1.node,
|
|
11569
|
+
className: PropTypes$1.string,
|
|
11322
11570
|
color: colorPropType,
|
|
11323
|
-
colorScheme: PropTypes.oneOf(['dark', 'light']),
|
|
11324
|
-
component: PropTypes.elementType,
|
|
11325
|
-
container: PropTypes.oneOfType([
|
|
11326
|
-
PropTypes.bool,
|
|
11327
|
-
PropTypes.oneOf([
|
|
11571
|
+
colorScheme: PropTypes$1.oneOf(['dark', 'light']),
|
|
11572
|
+
component: PropTypes$1.elementType,
|
|
11573
|
+
container: PropTypes$1.oneOfType([
|
|
11574
|
+
PropTypes$1.bool,
|
|
11575
|
+
PropTypes$1.oneOf([
|
|
11328
11576
|
'sm',
|
|
11329
11577
|
'md',
|
|
11330
11578
|
'lg',
|
|
@@ -11333,11 +11581,11 @@ CNavbar.propTypes = {
|
|
|
11333
11581
|
'fluid',
|
|
11334
11582
|
]),
|
|
11335
11583
|
]),
|
|
11336
|
-
expand: PropTypes.oneOfType([
|
|
11337
|
-
PropTypes.bool,
|
|
11338
|
-
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
11584
|
+
expand: PropTypes$1.oneOfType([
|
|
11585
|
+
PropTypes$1.bool,
|
|
11586
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
11339
11587
|
]),
|
|
11340
|
-
placement: PropTypes.oneOf(['fixed-top', 'fixed-bottom', 'sticky-top']),
|
|
11588
|
+
placement: PropTypes$1.oneOf(['fixed-top', 'fixed-bottom', 'sticky-top']),
|
|
11341
11589
|
};
|
|
11342
11590
|
CNavbar.displayName = 'CNavbar';
|
|
11343
11591
|
|
|
@@ -11347,9 +11595,9 @@ var CNavbarBrand = forwardRef(function (_a, ref) {
|
|
|
11347
11595
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar-brand', className) }, rest, { ref: ref }), children));
|
|
11348
11596
|
});
|
|
11349
11597
|
CNavbarBrand.propTypes = {
|
|
11350
|
-
children: PropTypes.node,
|
|
11351
|
-
className: PropTypes.string,
|
|
11352
|
-
component: PropTypes.elementType,
|
|
11598
|
+
children: PropTypes$1.node,
|
|
11599
|
+
className: PropTypes$1.string,
|
|
11600
|
+
component: PropTypes$1.elementType,
|
|
11353
11601
|
};
|
|
11354
11602
|
CNavbarBrand.displayName = 'CNavbarBrand';
|
|
11355
11603
|
|
|
@@ -11358,9 +11606,9 @@ var CNavbarNav = forwardRef(function (_a, ref) {
|
|
|
11358
11606
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
11359
11607
|
});
|
|
11360
11608
|
CNavbarNav.propTypes = {
|
|
11361
|
-
children: PropTypes.node,
|
|
11362
|
-
className: PropTypes.string,
|
|
11363
|
-
component: PropTypes.elementType,
|
|
11609
|
+
children: PropTypes$1.node,
|
|
11610
|
+
className: PropTypes$1.string,
|
|
11611
|
+
component: PropTypes$1.elementType,
|
|
11364
11612
|
};
|
|
11365
11613
|
CNavbarNav.displayName = 'CNavbarNav';
|
|
11366
11614
|
|
|
@@ -11369,8 +11617,8 @@ var CNavbarText = forwardRef(function (_a, ref) {
|
|
|
11369
11617
|
return (React$1.createElement("span", __assign$1({ className: classNames$1('navbar-text', className) }, rest, { ref: ref }), children));
|
|
11370
11618
|
});
|
|
11371
11619
|
CNavbarText.propTypes = {
|
|
11372
|
-
children: PropTypes.node,
|
|
11373
|
-
className: PropTypes.string,
|
|
11620
|
+
children: PropTypes$1.node,
|
|
11621
|
+
className: PropTypes$1.string,
|
|
11374
11622
|
};
|
|
11375
11623
|
CNavbarText.displayName = 'CNavbarText';
|
|
11376
11624
|
|
|
@@ -11379,13 +11627,13 @@ var CNavbarToggler = forwardRef(function (_a, ref) {
|
|
|
11379
11627
|
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
11628
|
});
|
|
11381
11629
|
CNavbarToggler.propTypes = {
|
|
11382
|
-
children: PropTypes.node,
|
|
11383
|
-
className: PropTypes.string,
|
|
11630
|
+
children: PropTypes$1.node,
|
|
11631
|
+
className: PropTypes$1.string,
|
|
11384
11632
|
};
|
|
11385
11633
|
CNavbarToggler.displayName = 'CNavbarToggler';
|
|
11386
11634
|
|
|
11387
11635
|
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"]);
|
|
11636
|
+
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
11637
|
var _h = useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
11390
11638
|
var offcanvasRef = useRef(null);
|
|
11391
11639
|
var forkedRef = useForkedRef(ref, offcanvasRef);
|
|
@@ -11426,27 +11674,28 @@ var COffcanvas = forwardRef(function (_a, ref) {
|
|
|
11426
11674
|
_a.showing = state === 'entering',
|
|
11427
11675
|
_a.show = state === 'entered',
|
|
11428
11676
|
_a['show hiding'] = state === 'exiting',
|
|
11429
|
-
_a), className), role: "dialog", tabIndex: -1, onKeyDown: handleKeyDown }, rest, { ref: forkedRef }), children)));
|
|
11677
|
+
_a), className), role: "dialog", tabIndex: -1, onKeyDown: handleKeyDown }, (dark && { 'data-coreui-theme': 'dark' }), rest, { ref: forkedRef }), children)));
|
|
11430
11678
|
}),
|
|
11431
11679
|
backdrop && (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
11432
11680
|
React$1.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleBackdropDismiss, visible: _visible })))));
|
|
11433
11681
|
});
|
|
11434
11682
|
COffcanvas.propTypes = {
|
|
11435
|
-
backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['static'])]),
|
|
11436
|
-
children: PropTypes.node,
|
|
11437
|
-
className: PropTypes.string,
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
11441
|
-
|
|
11683
|
+
backdrop: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.oneOf(['static'])]),
|
|
11684
|
+
children: PropTypes$1.node,
|
|
11685
|
+
className: PropTypes$1.string,
|
|
11686
|
+
dark: PropTypes$1.bool,
|
|
11687
|
+
keyboard: PropTypes$1.bool,
|
|
11688
|
+
onHide: PropTypes$1.func,
|
|
11689
|
+
onShow: PropTypes$1.func,
|
|
11690
|
+
placement: PropTypes$1.oneOf(['start', 'end', 'top', 'bottom'])
|
|
11442
11691
|
.isRequired,
|
|
11443
|
-
portal: PropTypes.bool,
|
|
11444
|
-
responsive: PropTypes.oneOfType([
|
|
11445
|
-
PropTypes.bool,
|
|
11446
|
-
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
11692
|
+
portal: PropTypes$1.bool,
|
|
11693
|
+
responsive: PropTypes$1.oneOfType([
|
|
11694
|
+
PropTypes$1.bool,
|
|
11695
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
11447
11696
|
]),
|
|
11448
|
-
scroll: PropTypes.bool,
|
|
11449
|
-
visible: PropTypes.bool,
|
|
11697
|
+
scroll: PropTypes$1.bool,
|
|
11698
|
+
visible: PropTypes$1.bool,
|
|
11450
11699
|
};
|
|
11451
11700
|
COffcanvas.displayName = 'COffcanvas';
|
|
11452
11701
|
|
|
@@ -11455,8 +11704,8 @@ var COffcanvasBody = forwardRef(function (_a, ref) {
|
|
|
11455
11704
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('offcanvas-body', className) }, rest, { ref: ref }), children));
|
|
11456
11705
|
});
|
|
11457
11706
|
COffcanvasBody.propTypes = {
|
|
11458
|
-
children: PropTypes.node,
|
|
11459
|
-
className: PropTypes.string,
|
|
11707
|
+
children: PropTypes$1.node,
|
|
11708
|
+
className: PropTypes$1.string,
|
|
11460
11709
|
};
|
|
11461
11710
|
COffcanvasBody.displayName = 'COffcanvasBody';
|
|
11462
11711
|
|
|
@@ -11465,8 +11714,8 @@ var COffcanvasHeader = forwardRef(function (_a, ref) {
|
|
|
11465
11714
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('offcanvas-header', className) }, rest, { ref: ref }), children));
|
|
11466
11715
|
});
|
|
11467
11716
|
COffcanvasHeader.propTypes = {
|
|
11468
|
-
children: PropTypes.node,
|
|
11469
|
-
className: PropTypes.string,
|
|
11717
|
+
children: PropTypes$1.node,
|
|
11718
|
+
className: PropTypes$1.string,
|
|
11470
11719
|
};
|
|
11471
11720
|
COffcanvasHeader.displayName = 'COffcanvasHeader';
|
|
11472
11721
|
|
|
@@ -11475,9 +11724,9 @@ var COffcanvasTitle = forwardRef(function (_a, ref) {
|
|
|
11475
11724
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('offcanvas-title', className) }, rest, { ref: ref }), children));
|
|
11476
11725
|
});
|
|
11477
11726
|
COffcanvasTitle.propTypes = {
|
|
11478
|
-
children: PropTypes.node,
|
|
11479
|
-
className: PropTypes.string,
|
|
11480
|
-
component: PropTypes.elementType,
|
|
11727
|
+
children: PropTypes$1.node,
|
|
11728
|
+
className: PropTypes$1.string,
|
|
11729
|
+
component: PropTypes$1.elementType,
|
|
11481
11730
|
};
|
|
11482
11731
|
COffcanvasTitle.displayName = 'COffcanvasTitle';
|
|
11483
11732
|
|
|
@@ -11491,10 +11740,10 @@ var CPagination = forwardRef(function (_a, ref) {
|
|
|
11491
11740
|
_b), className) }, children)));
|
|
11492
11741
|
});
|
|
11493
11742
|
CPagination.propTypes = {
|
|
11494
|
-
align: PropTypes.oneOf(['start', 'center', 'end']),
|
|
11495
|
-
children: PropTypes.node,
|
|
11496
|
-
className: PropTypes.string,
|
|
11497
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
11743
|
+
align: PropTypes$1.oneOf(['start', 'center', 'end']),
|
|
11744
|
+
children: PropTypes$1.node,
|
|
11745
|
+
className: PropTypes$1.string,
|
|
11746
|
+
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
11498
11747
|
};
|
|
11499
11748
|
CPagination.displayName = 'CPagination';
|
|
11500
11749
|
|
|
@@ -11507,9 +11756,9 @@ var CPaginationItem = forwardRef(function (_a, ref) {
|
|
|
11507
11756
|
}, 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
11757
|
});
|
|
11509
11758
|
CPaginationItem.propTypes = {
|
|
11510
|
-
children: PropTypes.node,
|
|
11511
|
-
className: PropTypes.string,
|
|
11512
|
-
component: PropTypes.elementType,
|
|
11759
|
+
children: PropTypes$1.node,
|
|
11760
|
+
className: PropTypes$1.string,
|
|
11761
|
+
component: PropTypes$1.elementType,
|
|
11513
11762
|
};
|
|
11514
11763
|
CPaginationItem.displayName = 'CPaginationItem';
|
|
11515
11764
|
|
|
@@ -11542,12 +11791,12 @@ var CPlaceholder = forwardRef(function (_a, ref) {
|
|
|
11542
11791
|
_b), repsonsiveClassNames, className) }, rest, { ref: ref }), children));
|
|
11543
11792
|
});
|
|
11544
11793
|
CPlaceholder.propTypes = {
|
|
11545
|
-
animation: PropTypes.oneOf(['glow', 'wave']),
|
|
11546
|
-
children: PropTypes.node,
|
|
11547
|
-
className: PropTypes.string,
|
|
11794
|
+
animation: PropTypes$1.oneOf(['glow', 'wave']),
|
|
11795
|
+
children: PropTypes$1.node,
|
|
11796
|
+
className: PropTypes$1.string,
|
|
11548
11797
|
color: colorPropType,
|
|
11549
|
-
component: PropTypes.elementType,
|
|
11550
|
-
size: PropTypes.oneOf(['xs', 'sm', 'lg']),
|
|
11798
|
+
component: PropTypes$1.elementType,
|
|
11799
|
+
size: PropTypes$1.oneOf(['xs', 'sm', 'lg']),
|
|
11551
11800
|
};
|
|
11552
11801
|
CPlaceholder.displayName = 'CPlaceholder';
|
|
11553
11802
|
|
|
@@ -11560,8 +11809,8 @@ var CProgressStacked = forwardRef(function (_a, ref) {
|
|
|
11560
11809
|
} }, children)));
|
|
11561
11810
|
});
|
|
11562
11811
|
CProgressStacked.propTypes = {
|
|
11563
|
-
children: PropTypes.node,
|
|
11564
|
-
className: PropTypes.string,
|
|
11812
|
+
children: PropTypes$1.node,
|
|
11813
|
+
className: PropTypes$1.string,
|
|
11565
11814
|
};
|
|
11566
11815
|
CProgressStacked.displayName = 'CProgressStacked';
|
|
11567
11816
|
|
|
@@ -11576,12 +11825,12 @@ var CProgressBar = forwardRef(function (_a, ref) {
|
|
|
11576
11825
|
_b), className) }, (!stacked && { style: { width: "".concat(value, "%") } }), rest, { ref: ref }), children));
|
|
11577
11826
|
});
|
|
11578
11827
|
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']),
|
|
11828
|
+
animated: PropTypes$1.bool,
|
|
11829
|
+
children: PropTypes$1.node,
|
|
11830
|
+
className: PropTypes$1.string,
|
|
11831
|
+
color: PropTypes$1.oneOfType([colorPropType, gradientsPropType]),
|
|
11832
|
+
value: PropTypes$1.number,
|
|
11833
|
+
variant: PropTypes$1.oneOf(['striped']),
|
|
11585
11834
|
};
|
|
11586
11835
|
CProgressBar.displayName = 'CProgressBar';
|
|
11587
11836
|
|
|
@@ -11607,13 +11856,13 @@ var CProgress = forwardRef(function (_a, ref) {
|
|
|
11607
11856
|
})) : (React$1.createElement(CProgressBar, __assign$1({}, (progressBarClassName && { className: progressBarClassName }), { value: value }, rest), children))));
|
|
11608
11857
|
});
|
|
11609
11858
|
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,
|
|
11859
|
+
children: PropTypes$1.node,
|
|
11860
|
+
className: PropTypes$1.string,
|
|
11861
|
+
height: PropTypes$1.number,
|
|
11862
|
+
progressBarClassName: PropTypes$1.string,
|
|
11863
|
+
thin: PropTypes$1.bool,
|
|
11864
|
+
value: PropTypes$1.number,
|
|
11865
|
+
white: PropTypes$1.bool,
|
|
11617
11866
|
};
|
|
11618
11867
|
CProgress.displayName = 'CProgress';
|
|
11619
11868
|
|
|
@@ -11678,7 +11927,7 @@ var CPopover = function (_a) {
|
|
|
11678
11927
|
typeof window !== 'undefined' &&
|
|
11679
11928
|
createPortal(React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: popoverRef, onEnter: onShow, onExit: onHide, timeout: {
|
|
11680
11929
|
enter: 0,
|
|
11681
|
-
exit: 200,
|
|
11930
|
+
exit: popoverRef.current ? getTransitionDurationFromElement(popoverRef.current) + 50 : 200,
|
|
11682
11931
|
}, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('popover', 'bs-popover-auto', {
|
|
11683
11932
|
fade: animation,
|
|
11684
11933
|
show: state === 'entered',
|
|
@@ -11688,25 +11937,25 @@ var CPopover = function (_a) {
|
|
|
11688
11937
|
React$1.createElement("div", { className: "popover-body" }, content))); }), document.body)));
|
|
11689
11938
|
};
|
|
11690
11939
|
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,
|
|
11940
|
+
animation: PropTypes$1.bool,
|
|
11941
|
+
children: PropTypes$1.node,
|
|
11942
|
+
className: PropTypes$1.string,
|
|
11943
|
+
content: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
11944
|
+
delay: PropTypes$1.oneOfType([
|
|
11945
|
+
PropTypes$1.number,
|
|
11946
|
+
PropTypes$1.shape({
|
|
11947
|
+
show: PropTypes$1.number.isRequired,
|
|
11948
|
+
hide: PropTypes$1.number.isRequired,
|
|
11700
11949
|
}),
|
|
11701
11950
|
]),
|
|
11702
11951
|
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]),
|
|
11952
|
+
offset: PropTypes$1.any,
|
|
11953
|
+
onHide: PropTypes$1.func,
|
|
11954
|
+
onShow: PropTypes$1.func,
|
|
11955
|
+
placement: PropTypes$1.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
11956
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
11708
11957
|
trigger: triggerPropType,
|
|
11709
|
-
visible: PropTypes.bool,
|
|
11958
|
+
visible: PropTypes$1.bool,
|
|
11710
11959
|
};
|
|
11711
11960
|
CPopover.displayName = 'CPopover';
|
|
11712
11961
|
|
|
@@ -11732,6 +11981,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
11732
11981
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
11733
11982
|
PERFORMANCE OF THIS SOFTWARE.
|
|
11734
11983
|
***************************************************************************** */
|
|
11984
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
11985
|
+
|
|
11735
11986
|
|
|
11736
11987
|
var __assign = function() {
|
|
11737
11988
|
__assign = Object.assign || function __assign(t) {
|
|
@@ -11754,6 +12005,15 @@ function __rest(s, e) {
|
|
|
11754
12005
|
t[p[i]] = s[p[i]];
|
|
11755
12006
|
}
|
|
11756
12007
|
return t;
|
|
12008
|
+
}
|
|
12009
|
+
|
|
12010
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
12011
|
+
var e = new Error(message);
|
|
12012
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
12013
|
+
};
|
|
12014
|
+
|
|
12015
|
+
function getDefaultExportFromCjs (x) {
|
|
12016
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
11757
12017
|
}
|
|
11758
12018
|
|
|
11759
12019
|
var propTypes = {exports: {}};
|
|
@@ -11979,14 +12239,12 @@ var hasRequiredReactIs;
|
|
|
11979
12239
|
function requireReactIs () {
|
|
11980
12240
|
if (hasRequiredReactIs) return reactIs.exports;
|
|
11981
12241
|
hasRequiredReactIs = 1;
|
|
11982
|
-
(function (module) {
|
|
11983
12242
|
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
} (reactIs));
|
|
12243
|
+
if (process.env.NODE_ENV === 'production') {
|
|
12244
|
+
reactIs.exports = requireReactIs_production_min();
|
|
12245
|
+
} else {
|
|
12246
|
+
reactIs.exports = requireReactIs_development();
|
|
12247
|
+
}
|
|
11990
12248
|
return reactIs.exports;
|
|
11991
12249
|
}
|
|
11992
12250
|
|
|
@@ -12938,12 +13196,15 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
12938
13196
|
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
12939
13197
|
}
|
|
12940
13198
|
|
|
13199
|
+
var propTypesExports = propTypes.exports;
|
|
13200
|
+
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
13201
|
+
|
|
12941
13202
|
var classnames = {exports: {}};
|
|
12942
13203
|
|
|
12943
13204
|
/*!
|
|
12944
|
-
|
|
12945
|
-
|
|
12946
|
-
|
|
13205
|
+
Copyright (c) 2018 Jed Watson.
|
|
13206
|
+
Licensed under the MIT License (MIT), see
|
|
13207
|
+
http://jedwatson.github.io/classnames
|
|
12947
13208
|
*/
|
|
12948
13209
|
|
|
12949
13210
|
(function (module) {
|
|
@@ -12972,14 +13233,15 @@ var classnames = {exports: {}};
|
|
|
12972
13233
|
}
|
|
12973
13234
|
}
|
|
12974
13235
|
} 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 {
|
|
13236
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
12982
13237
|
classes.push(arg.toString());
|
|
13238
|
+
continue;
|
|
13239
|
+
}
|
|
13240
|
+
|
|
13241
|
+
for (var key in arg) {
|
|
13242
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
13243
|
+
classes.push(key);
|
|
13244
|
+
}
|
|
12983
13245
|
}
|
|
12984
13246
|
}
|
|
12985
13247
|
}
|
|
@@ -12993,10 +13255,11 @@ var classnames = {exports: {}};
|
|
|
12993
13255
|
} else {
|
|
12994
13256
|
window.classNames = classNames;
|
|
12995
13257
|
}
|
|
12996
|
-
}());
|
|
13258
|
+
}());
|
|
12997
13259
|
} (classnames));
|
|
12998
13260
|
|
|
12999
|
-
var
|
|
13261
|
+
var classnamesExports = classnames.exports;
|
|
13262
|
+
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
13000
13263
|
|
|
13001
13264
|
var toCamelCase = function (str) {
|
|
13002
13265
|
return str
|
|
@@ -13023,11 +13286,9 @@ var CIcon = forwardRef(function (_a, ref) {
|
|
|
13023
13286
|
console.warn('[CIcon] The `name` property is deprecated and will be removed in v3, please use `icon="..."` instead of.');
|
|
13024
13287
|
}
|
|
13025
13288
|
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
13289
|
var titleCode = title ? "<title>".concat(title, "</title>") : '';
|
|
13030
13290
|
var code = useMemo(function () {
|
|
13291
|
+
var iconName = _icon && typeof _icon === 'string' && _icon.includes('-') ? toCamelCase(_icon) : _icon;
|
|
13031
13292
|
if (Array.isArray(_icon)) {
|
|
13032
13293
|
return _icon;
|
|
13033
13294
|
}
|
|
@@ -13044,24 +13305,25 @@ var CIcon = forwardRef(function (_a, ref) {
|
|
|
13044
13305
|
var viewBox = (function () {
|
|
13045
13306
|
return rest['viewBox'] || "0 0 ".concat(scale);
|
|
13046
13307
|
})();
|
|
13047
|
-
// render
|
|
13048
13308
|
var _className = customClassName
|
|
13049
13309
|
? classNames(customClassName)
|
|
13050
13310
|
: classNames('icon', (_b = {},
|
|
13051
13311
|
_b["icon-".concat(size)] = size,
|
|
13052
13312
|
_b["icon-custom-size"] = height || width,
|
|
13053
13313
|
_b), className);
|
|
13054
|
-
return
|
|
13055
|
-
|
|
13314
|
+
return (React$1.createElement(React$1.Fragment, null,
|
|
13315
|
+
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 }),
|
|
13316
|
+
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 }))),
|
|
13317
|
+
title && React$1.createElement("span", { className: "visually-hidden" }, title)));
|
|
13056
13318
|
});
|
|
13057
13319
|
CIcon.propTypes = {
|
|
13058
|
-
className:
|
|
13059
|
-
content:
|
|
13060
|
-
customClassName:
|
|
13061
|
-
height:
|
|
13062
|
-
icon:
|
|
13063
|
-
name:
|
|
13064
|
-
size:
|
|
13320
|
+
className: PropTypes.string,
|
|
13321
|
+
content: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
13322
|
+
customClassName: PropTypes.string,
|
|
13323
|
+
height: PropTypes.number,
|
|
13324
|
+
icon: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
13325
|
+
name: PropTypes.string,
|
|
13326
|
+
size: PropTypes.oneOf([
|
|
13065
13327
|
'custom',
|
|
13066
13328
|
'custom-size',
|
|
13067
13329
|
'sm',
|
|
@@ -13076,9 +13338,9 @@ CIcon.propTypes = {
|
|
|
13076
13338
|
'8xl',
|
|
13077
13339
|
'9xl',
|
|
13078
13340
|
]),
|
|
13079
|
-
title:
|
|
13080
|
-
use:
|
|
13081
|
-
width:
|
|
13341
|
+
title: PropTypes.any,
|
|
13342
|
+
use: PropTypes.any,
|
|
13343
|
+
width: PropTypes.number,
|
|
13082
13344
|
};
|
|
13083
13345
|
CIcon.displayName = 'CIcon';
|
|
13084
13346
|
|
|
@@ -13139,20 +13401,20 @@ var CSmartPagination = forwardRef(function (_a, ref) {
|
|
|
13139
13401
|
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
13402
|
});
|
|
13141
13403
|
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,
|
|
13404
|
+
className: PropTypes$1.oneOfType([PropTypes$1.string]),
|
|
13405
|
+
activePage: PropTypes$1.number,
|
|
13406
|
+
dots: PropTypes$1.bool,
|
|
13407
|
+
arrows: PropTypes$1.bool,
|
|
13408
|
+
doubleArrows: PropTypes$1.bool,
|
|
13409
|
+
firstButton: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
13410
|
+
previousButton: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
13411
|
+
nextButton: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
13412
|
+
lastButton: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
13413
|
+
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
13414
|
+
align: PropTypes$1.oneOf(['start', 'center', 'end']),
|
|
13415
|
+
limit: PropTypes$1.number,
|
|
13416
|
+
pages: PropTypes$1.number.isRequired,
|
|
13417
|
+
onActivePageChange: PropTypes$1.func,
|
|
13156
13418
|
};
|
|
13157
13419
|
CSmartPagination.displayName = 'CSmartPagination';
|
|
13158
13420
|
|
|
@@ -13164,8 +13426,8 @@ var CTableHead = forwardRef(function (_a, ref) {
|
|
|
13164
13426
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13165
13427
|
});
|
|
13166
13428
|
CTableHead.propTypes = {
|
|
13167
|
-
children: PropTypes.node,
|
|
13168
|
-
className: PropTypes.string,
|
|
13429
|
+
children: PropTypes$1.node,
|
|
13430
|
+
className: PropTypes$1.string,
|
|
13169
13431
|
color: colorPropType,
|
|
13170
13432
|
};
|
|
13171
13433
|
CTableHead.displayName = 'CTableHead';
|
|
@@ -13178,8 +13440,8 @@ var CTableHeaderCell = forwardRef(function (_a, ref) {
|
|
|
13178
13440
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13179
13441
|
});
|
|
13180
13442
|
CTableHeaderCell.propTypes = {
|
|
13181
|
-
children: PropTypes.node,
|
|
13182
|
-
className: PropTypes.string,
|
|
13443
|
+
children: PropTypes$1.node,
|
|
13444
|
+
className: PropTypes$1.string,
|
|
13183
13445
|
color: colorPropType,
|
|
13184
13446
|
};
|
|
13185
13447
|
CTableHeaderCell.displayName = 'CTableHeaderCell';
|
|
@@ -13192,8 +13454,8 @@ var CTableBody = forwardRef(function (_a, ref) {
|
|
|
13192
13454
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13193
13455
|
});
|
|
13194
13456
|
CTableBody.propTypes = {
|
|
13195
|
-
children: PropTypes.node,
|
|
13196
|
-
className: PropTypes.string,
|
|
13457
|
+
children: PropTypes$1.node,
|
|
13458
|
+
className: PropTypes$1.string,
|
|
13197
13459
|
color: colorPropType,
|
|
13198
13460
|
};
|
|
13199
13461
|
CTableBody.displayName = 'CTableBody';
|
|
@@ -13209,10 +13471,10 @@ var CTableDataCell = forwardRef(function (_a, ref) {
|
|
|
13209
13471
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13210
13472
|
});
|
|
13211
13473
|
CTableDataCell.propTypes = {
|
|
13212
|
-
active: PropTypes.bool,
|
|
13213
|
-
align: PropTypes.oneOf(['bottom', 'middle', 'top']),
|
|
13214
|
-
children: PropTypes.node,
|
|
13215
|
-
className: PropTypes.string,
|
|
13474
|
+
active: PropTypes$1.bool,
|
|
13475
|
+
align: PropTypes$1.oneOf(['bottom', 'middle', 'top']),
|
|
13476
|
+
children: PropTypes$1.node,
|
|
13477
|
+
className: PropTypes$1.string,
|
|
13216
13478
|
color: colorPropType,
|
|
13217
13479
|
};
|
|
13218
13480
|
CTableDataCell.displayName = 'CTableDataCell';
|
|
@@ -13227,10 +13489,10 @@ var CTableRow = forwardRef(function (_a, ref) {
|
|
|
13227
13489
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13228
13490
|
});
|
|
13229
13491
|
CTableRow.propTypes = {
|
|
13230
|
-
active: PropTypes.bool,
|
|
13231
|
-
align: PropTypes.oneOf(['bottom', 'middle', 'top']),
|
|
13232
|
-
children: PropTypes.node,
|
|
13233
|
-
className: PropTypes.string,
|
|
13492
|
+
active: PropTypes$1.bool,
|
|
13493
|
+
align: PropTypes$1.oneOf(['bottom', 'middle', 'top']),
|
|
13494
|
+
children: PropTypes$1.node,
|
|
13495
|
+
className: PropTypes$1.string,
|
|
13234
13496
|
color: colorPropType,
|
|
13235
13497
|
};
|
|
13236
13498
|
CTableRow.displayName = 'CTableRow';
|
|
@@ -13243,8 +13505,8 @@ var CTableFoot = forwardRef(function (_a, ref) {
|
|
|
13243
13505
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13244
13506
|
});
|
|
13245
13507
|
CTableFoot.propTypes = {
|
|
13246
|
-
children: PropTypes.node,
|
|
13247
|
-
className: PropTypes.string,
|
|
13508
|
+
children: PropTypes$1.node,
|
|
13509
|
+
className: PropTypes$1.string,
|
|
13248
13510
|
color: colorPropType,
|
|
13249
13511
|
};
|
|
13250
13512
|
CTableFoot.displayName = 'CTableFoot';
|
|
@@ -13254,7 +13516,7 @@ var CTableCaption = forwardRef(function (_a, ref) {
|
|
|
13254
13516
|
return (React$1.createElement("caption", __assign$1({}, props, { ref: ref }), children));
|
|
13255
13517
|
});
|
|
13256
13518
|
CTableCaption.propTypes = {
|
|
13257
|
-
children: PropTypes.node,
|
|
13519
|
+
children: PropTypes$1.node,
|
|
13258
13520
|
};
|
|
13259
13521
|
CTableCaption.displayName = 'CTableCaption';
|
|
13260
13522
|
|
|
@@ -13263,10 +13525,10 @@ var CTableResponsiveWrapper = function (_a) {
|
|
|
13263
13525
|
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
13526
|
};
|
|
13265
13527
|
CTableResponsiveWrapper.propTypes = {
|
|
13266
|
-
children: PropTypes.node,
|
|
13267
|
-
responsive: PropTypes.oneOfType([
|
|
13268
|
-
PropTypes.bool,
|
|
13269
|
-
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
13528
|
+
children: PropTypes$1.node,
|
|
13529
|
+
responsive: PropTypes$1.oneOfType([
|
|
13530
|
+
PropTypes$1.bool,
|
|
13531
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
13270
13532
|
]),
|
|
13271
13533
|
};
|
|
13272
13534
|
CTableResponsiveWrapper.displayName = 'CTableResponsiveWrapper';
|
|
@@ -13322,28 +13584,28 @@ var CTable = forwardRef(function (_a, ref) {
|
|
|
13322
13584
|
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
13585
|
});
|
|
13324
13586
|
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,
|
|
13587
|
+
align: PropTypes$1.oneOf(['bottom', 'middle', 'top']),
|
|
13588
|
+
borderColor: PropTypes$1.string,
|
|
13589
|
+
bordered: PropTypes$1.bool,
|
|
13590
|
+
borderless: PropTypes$1.bool,
|
|
13591
|
+
caption: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.oneOf(['top'])]),
|
|
13592
|
+
captionTop: PropTypes$1.string,
|
|
13593
|
+
children: PropTypes$1.node,
|
|
13594
|
+
className: PropTypes$1.string,
|
|
13333
13595
|
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']),
|
|
13596
|
+
columns: PropTypes$1.array,
|
|
13597
|
+
footer: PropTypes$1.array,
|
|
13598
|
+
hover: PropTypes$1.bool,
|
|
13599
|
+
items: PropTypes$1.array,
|
|
13600
|
+
responsive: PropTypes$1.oneOfType([
|
|
13601
|
+
PropTypes$1.bool,
|
|
13602
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
13341
13603
|
]),
|
|
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)),
|
|
13604
|
+
small: PropTypes$1.bool,
|
|
13605
|
+
striped: PropTypes$1.bool,
|
|
13606
|
+
stripedColumns: PropTypes$1.bool,
|
|
13607
|
+
tableFootProps: PropTypes$1.shape(__assign$1({}, CTableFoot.propTypes)),
|
|
13608
|
+
tableHeadProps: PropTypes$1.shape(__assign$1({}, CTableHead.propTypes)),
|
|
13347
13609
|
};
|
|
13348
13610
|
CTable.displayName = 'CTable';
|
|
13349
13611
|
|
|
@@ -13382,7 +13644,7 @@ var getClickedColumnName = function (target, columnNames) {
|
|
|
13382
13644
|
var closest = target.closest('tr');
|
|
13383
13645
|
var children = closest ? Array.from(closest.children) : [];
|
|
13384
13646
|
var clickedCell = children.filter(function (child) { return child.contains(target); })[0];
|
|
13385
|
-
return columnNames[children.indexOf(clickedCell)];
|
|
13647
|
+
return columnNames[children.indexOf(clickedCell) - 1];
|
|
13386
13648
|
};
|
|
13387
13649
|
var getColumnKey = function (column) {
|
|
13388
13650
|
return typeof column === 'object' ? column.key : column;
|
|
@@ -13394,6 +13656,12 @@ var getColumnLabel = function (column) {
|
|
|
13394
13656
|
: pretifyName(column.key)
|
|
13395
13657
|
: pretifyName(column);
|
|
13396
13658
|
};
|
|
13659
|
+
var getColumnName = function (column) {
|
|
13660
|
+
if (typeof column === 'object') {
|
|
13661
|
+
return column.key;
|
|
13662
|
+
}
|
|
13663
|
+
return column;
|
|
13664
|
+
};
|
|
13397
13665
|
var getColumnNames = function (columns, items) {
|
|
13398
13666
|
if (columns) {
|
|
13399
13667
|
var _columns = [];
|
|
@@ -13502,10 +13770,32 @@ var getColumnSorterState = function (key, sorterState) {
|
|
|
13502
13770
|
var getColumnValues = function (items, key) {
|
|
13503
13771
|
return items.map(function (item) { return item[key]; });
|
|
13504
13772
|
};
|
|
13505
|
-
var getTableDataCellProps = function (item, colName) {
|
|
13506
|
-
var props =
|
|
13773
|
+
var getTableDataCellProps = function (column, item, colName) {
|
|
13774
|
+
var props = {};
|
|
13775
|
+
if (typeof column === 'object' && column._colProps) {
|
|
13776
|
+
Object.assign(props, column._colProps);
|
|
13777
|
+
}
|
|
13778
|
+
if (item._cellProps && item._cellProps['all']) {
|
|
13779
|
+
Object.assign(props, item._cellProps['all']);
|
|
13780
|
+
}
|
|
13781
|
+
if (item._cellProps && item._cellProps[colName]) {
|
|
13782
|
+
Object.assign(props, item._cellProps[colName]);
|
|
13783
|
+
}
|
|
13507
13784
|
return props;
|
|
13508
13785
|
};
|
|
13786
|
+
var getTableDataCellStyles = function (column, item, colName) {
|
|
13787
|
+
var styles = {};
|
|
13788
|
+
if (typeof column === 'object' && column._colStyle) {
|
|
13789
|
+
Object.assign(styles, column._colStyle);
|
|
13790
|
+
}
|
|
13791
|
+
if (item._cellStyle && item._cellStyle['all']) {
|
|
13792
|
+
Object.assign(styles, item._cellStyle['all']);
|
|
13793
|
+
}
|
|
13794
|
+
if (item._cellStyle && item._cellStyle[colName]) {
|
|
13795
|
+
Object.assign(styles, item._cellStyle[colName]);
|
|
13796
|
+
}
|
|
13797
|
+
return styles;
|
|
13798
|
+
};
|
|
13509
13799
|
var getTableHeaderCellProps = function (column) {
|
|
13510
13800
|
if (typeof column === 'object' && column._props) {
|
|
13511
13801
|
return column._props;
|
|
@@ -13563,8 +13853,8 @@ var sortItems = function (columnSorter, items, itemsDataColumns, sorterState) {
|
|
|
13563
13853
|
};
|
|
13564
13854
|
|
|
13565
13855
|
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 ?
|
|
13856
|
+
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"]);
|
|
13857
|
+
var colspan = selectable ? columns.length + 1 : columns.length;
|
|
13568
13858
|
return (React$1.createElement(CTableBody, __assign$1({}, (clickableRows && {
|
|
13569
13859
|
style: { cursor: 'pointer' },
|
|
13570
13860
|
}), rest, { ref: ref }), currentItems.length > 0 ? (currentItems.map(function (item, trIndex) {
|
|
@@ -13582,13 +13872,14 @@ var CSmartTableBody = forwardRef(function (_a, ref) {
|
|
|
13582
13872
|
delete _item['_selected'];
|
|
13583
13873
|
onRowChecked && onRowChecked(_item, event.target.checked);
|
|
13584
13874
|
} }))),
|
|
13585
|
-
|
|
13875
|
+
columns.map(function (column, index) {
|
|
13876
|
+
var colName = getColumnName(column);
|
|
13586
13877
|
return ((scopedColumns &&
|
|
13587
13878
|
scopedColumns[colName] &&
|
|
13588
13879
|
React$1.cloneElement(scopedColumns[colName](item, trIndex + firstItemOnActivePageIndex), {
|
|
13589
13880
|
key: index,
|
|
13590
13881
|
})) ||
|
|
13591
|
-
(item[colName] !== undefined && (React$1.createElement(CTableDataCell, __assign$1({}, getTableDataCellProps(item, colName), { key: index }), item[colName]))));
|
|
13882
|
+
(item[colName] !== undefined && (React$1.createElement(CTableDataCell, __assign$1({}, getTableDataCellProps(column, item, colName), { style: getTableDataCellStyles(column, item, colName), key: index }), item[colName]))));
|
|
13592
13883
|
})),
|
|
13593
13884
|
scopedColumns && scopedColumns.details && (React$1.createElement(React$1.Fragment, null,
|
|
13594
13885
|
React$1.createElement(CTableRow, null,
|
|
@@ -13602,16 +13893,16 @@ var CSmartTableBody = forwardRef(function (_a, ref) {
|
|
|
13602
13893
|
React$1.createElement(CTableDataCell, { colSpan: colspan }, noItemsLabel)))));
|
|
13603
13894
|
});
|
|
13604
13895
|
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,
|
|
13896
|
+
clickableRows: PropTypes$1.bool,
|
|
13897
|
+
currentItems: PropTypes$1.array.isRequired,
|
|
13898
|
+
firstItemOnActivePageIndex: PropTypes$1.number.isRequired,
|
|
13899
|
+
noItemsLabel: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
13900
|
+
onRowChecked: PropTypes$1.func,
|
|
13901
|
+
onRowClick: PropTypes$1.func,
|
|
13902
|
+
columnNames: PropTypes$1.array.isRequired,
|
|
13903
|
+
scopedColumns: PropTypes$1.object,
|
|
13904
|
+
selectable: PropTypes$1.bool,
|
|
13905
|
+
selected: PropTypes$1.array,
|
|
13615
13906
|
};
|
|
13616
13907
|
CSmartTableBody.displayName = 'CSmartTableBody';
|
|
13617
13908
|
|
|
@@ -13689,23 +13980,23 @@ var CSmartTableHead = forwardRef(function (_a, ref) {
|
|
|
13689
13980
|
})))));
|
|
13690
13981
|
});
|
|
13691
13982
|
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,
|
|
13983
|
+
columnFilter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
13984
|
+
columnFilterState: PropTypes$1.object,
|
|
13985
|
+
columnSorter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
13986
|
+
component: PropTypes$1.elementType,
|
|
13987
|
+
children: PropTypes$1.node,
|
|
13988
|
+
columns: PropTypes$1.arrayOf(PropTypes$1.oneOfType([PropTypes$1.any, PropTypes$1.string])).isRequired,
|
|
13989
|
+
handleFilterOnChange: PropTypes$1.func,
|
|
13990
|
+
handleFilterOnInput: PropTypes$1.func,
|
|
13991
|
+
handleSelectAllChecked: PropTypes$1.func,
|
|
13992
|
+
handleSort: PropTypes$1.func,
|
|
13993
|
+
selectable: PropTypes$1.bool,
|
|
13994
|
+
selectAll: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
13995
|
+
selectedAll: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.string]),
|
|
13996
|
+
sorterState: PropTypes$1.object,
|
|
13997
|
+
sortingIcon: PropTypes$1.node,
|
|
13998
|
+
sortingIconAscending: PropTypes$1.node,
|
|
13999
|
+
sortingIconDescending: PropTypes$1.node,
|
|
13709
14000
|
};
|
|
13710
14001
|
CSmartTableHead.displayName = 'CSmartTableHead';
|
|
13711
14002
|
|
|
@@ -13920,9 +14211,9 @@ var CSmartTable = forwardRef(function (_a, ref) {
|
|
|
13920
14211
|
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
14212
|
return handleColumnFilterChange(key, event, 'change');
|
|
13922
14213
|
}, 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) {
|
|
14214
|
+
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
14215
|
return clickableRows && onRowClick && onRowClick(item, index, columnName, event);
|
|
13925
|
-
}, onRowChecked: function (item, value) { return handleRowChecked(item, value); },
|
|
14216
|
+
}, onRowChecked: function (item, value) { return handleRowChecked(item, value); }, scopedColumns: scopedColumns, selectable: selectable, selected: _selected }, tableBodyProps)),
|
|
13926
14217
|
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
14218
|
Array.isArray(footer) && (React$1.createElement(CTableFoot, __assign$1({}, tableFootProps),
|
|
13928
14219
|
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 +14238,51 @@ var CSmartTable = forwardRef(function (_a, ref) {
|
|
|
13947
14238
|
}))))))))));
|
|
13948
14239
|
});
|
|
13949
14240
|
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,
|
|
14241
|
+
activePage: PropTypes$1.number,
|
|
14242
|
+
cleaner: PropTypes$1.bool,
|
|
14243
|
+
clickableRows: PropTypes$1.bool,
|
|
14244
|
+
columnFilter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14245
|
+
columnFilterValue: PropTypes$1.object,
|
|
14246
|
+
columns: PropTypes$1.array,
|
|
14247
|
+
columnSorter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14248
|
+
elementCover: PropTypes$1.node,
|
|
14249
|
+
footer: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.array]),
|
|
14250
|
+
header: PropTypes$1.bool,
|
|
14251
|
+
items: PropTypes$1.array,
|
|
14252
|
+
itemsNumber: PropTypes$1.number,
|
|
14253
|
+
itemsPerPage: PropTypes$1.number,
|
|
14254
|
+
itemsPerPageLabel: PropTypes$1.string,
|
|
14255
|
+
itemsPerPageOptions: PropTypes$1.array,
|
|
14256
|
+
itemsPerPageSelect: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14257
|
+
loading: PropTypes$1.bool,
|
|
14258
|
+
noItemsLabel: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14259
|
+
onActivePageChange: PropTypes$1.func,
|
|
14260
|
+
onColumnFilterChange: PropTypes$1.func,
|
|
14261
|
+
onFilteredItemsChange: PropTypes$1.func,
|
|
14262
|
+
onItemsPerPageChange: PropTypes$1.func,
|
|
14263
|
+
onRowClick: PropTypes$1.func,
|
|
14264
|
+
onSelectAll: PropTypes$1.func,
|
|
14265
|
+
onSelectedItemsChange: PropTypes$1.func,
|
|
14266
|
+
onSorterChange: PropTypes$1.func,
|
|
14267
|
+
onTableFilterChange: PropTypes$1.func,
|
|
14268
|
+
pagination: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14269
|
+
paginationProps: PropTypes$1.any,
|
|
14270
|
+
scopedColumns: PropTypes$1.object,
|
|
14271
|
+
selectable: PropTypes$1.bool,
|
|
14272
|
+
selectAll: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14273
|
+
selected: PropTypes$1.array,
|
|
14274
|
+
sorterValue: PropTypes$1.object,
|
|
14275
|
+
sortingIcon: PropTypes$1.node,
|
|
14276
|
+
sortingIconAscending: PropTypes$1.node,
|
|
14277
|
+
sortingIconDescending: PropTypes$1.node,
|
|
14278
|
+
tableBodyProps: PropTypes$1.object,
|
|
14279
|
+
tableFootProps: PropTypes$1.object,
|
|
14280
|
+
tableFilter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14281
|
+
tableFilterLabel: PropTypes$1.string,
|
|
14282
|
+
tableFilterPlaceholder: PropTypes$1.string,
|
|
14283
|
+
tableFilterValue: PropTypes$1.string,
|
|
14284
|
+
tableHeadProps: PropTypes$1.object,
|
|
14285
|
+
tableProps: PropTypes$1.object,
|
|
13995
14286
|
};
|
|
13996
14287
|
CSmartTable.displayName = 'CSmartTable';
|
|
13997
14288
|
|
|
@@ -14086,19 +14377,19 @@ var CSidebar = forwardRef(function (_a, ref) {
|
|
|
14086
14377
|
createPortal(React$1.createElement(CBackdrop, { className: "sidebar-backdrop", visible: _visible }), document.body)));
|
|
14087
14378
|
});
|
|
14088
14379
|
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,
|
|
14380
|
+
children: PropTypes$1.node,
|
|
14381
|
+
className: PropTypes$1.string,
|
|
14382
|
+
colorScheme: PropTypes$1.oneOf(['dark', 'light']),
|
|
14383
|
+
narrow: PropTypes$1.bool,
|
|
14384
|
+
onHide: PropTypes$1.func,
|
|
14385
|
+
onShow: PropTypes$1.func,
|
|
14386
|
+
onVisibleChange: PropTypes$1.func,
|
|
14387
|
+
overlaid: PropTypes$1.bool,
|
|
14388
|
+
placement: PropTypes$1.oneOf(['start', 'end']),
|
|
14389
|
+
position: PropTypes$1.oneOf(['fixed', 'sticky']),
|
|
14390
|
+
size: PropTypes$1.oneOf(['sm', 'lg', 'xl']),
|
|
14391
|
+
unfoldable: PropTypes$1.bool,
|
|
14392
|
+
visible: PropTypes$1.bool,
|
|
14102
14393
|
};
|
|
14103
14394
|
CSidebar.displayName = 'CSidebar';
|
|
14104
14395
|
|
|
@@ -14107,8 +14398,8 @@ var CSidebarBrand = forwardRef(function (_a, ref) {
|
|
|
14107
14398
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-brand', className), ref: ref }, rest), children));
|
|
14108
14399
|
});
|
|
14109
14400
|
CSidebarBrand.propTypes = {
|
|
14110
|
-
children: PropTypes.node,
|
|
14111
|
-
className: PropTypes.string,
|
|
14401
|
+
children: PropTypes$1.node,
|
|
14402
|
+
className: PropTypes$1.string,
|
|
14112
14403
|
};
|
|
14113
14404
|
CSidebarBrand.displayName = 'CSidebarBrand';
|
|
14114
14405
|
|
|
@@ -14117,8 +14408,8 @@ var CSidebarFooter = forwardRef(function (_a, ref) {
|
|
|
14117
14408
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-footer', className), ref: ref }, rest), children));
|
|
14118
14409
|
});
|
|
14119
14410
|
CSidebarFooter.propTypes = {
|
|
14120
|
-
children: PropTypes.node,
|
|
14121
|
-
className: PropTypes.string,
|
|
14411
|
+
children: PropTypes$1.node,
|
|
14412
|
+
className: PropTypes$1.string,
|
|
14122
14413
|
};
|
|
14123
14414
|
CSidebarFooter.displayName = 'CSidebarFooter';
|
|
14124
14415
|
|
|
@@ -14127,8 +14418,8 @@ var CSidebarToggler = forwardRef(function (_a, ref) {
|
|
|
14127
14418
|
return (React$1.createElement("button", __assign$1({ className: classNames$1('sidebar-toggler', className), ref: ref }, rest), children));
|
|
14128
14419
|
});
|
|
14129
14420
|
CSidebarToggler.propTypes = {
|
|
14130
|
-
children: PropTypes.node,
|
|
14131
|
-
className: PropTypes.string,
|
|
14421
|
+
children: PropTypes$1.node,
|
|
14422
|
+
className: PropTypes$1.string,
|
|
14132
14423
|
};
|
|
14133
14424
|
CSidebarToggler.displayName = 'CSidebarToggler';
|
|
14134
14425
|
|
|
@@ -14137,8 +14428,8 @@ var CSidebarHeader = forwardRef(function (_a, ref) {
|
|
|
14137
14428
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-header', className), ref: ref }, rest), children));
|
|
14138
14429
|
});
|
|
14139
14430
|
CSidebarHeader.propTypes = {
|
|
14140
|
-
children: PropTypes.node,
|
|
14141
|
-
className: PropTypes.string,
|
|
14431
|
+
children: PropTypes$1.node,
|
|
14432
|
+
className: PropTypes$1.string,
|
|
14142
14433
|
};
|
|
14143
14434
|
CSidebarHeader.displayName = 'CSidebarHeader';
|
|
14144
14435
|
|
|
@@ -14147,8 +14438,8 @@ var CTabContent = forwardRef(function (_a, ref) {
|
|
|
14147
14438
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('tab-content', className) }, rest, { ref: ref }), children));
|
|
14148
14439
|
});
|
|
14149
14440
|
CTabContent.propTypes = {
|
|
14150
|
-
children: PropTypes.node,
|
|
14151
|
-
className: PropTypes.string,
|
|
14441
|
+
children: PropTypes$1.node,
|
|
14442
|
+
className: PropTypes$1.string,
|
|
14152
14443
|
};
|
|
14153
14444
|
CTabContent.displayName = 'CTabContent';
|
|
14154
14445
|
|
|
@@ -14162,11 +14453,11 @@ var CTabPane = forwardRef(function (_a, ref) {
|
|
|
14162
14453
|
}, className) }, rest, { ref: forkedRef }), children)); }));
|
|
14163
14454
|
});
|
|
14164
14455
|
CTabPane.propTypes = {
|
|
14165
|
-
children: PropTypes.node,
|
|
14166
|
-
className: PropTypes.string,
|
|
14167
|
-
onHide: PropTypes.func,
|
|
14168
|
-
onShow: PropTypes.func,
|
|
14169
|
-
visible: PropTypes.bool,
|
|
14456
|
+
children: PropTypes$1.node,
|
|
14457
|
+
className: PropTypes$1.string,
|
|
14458
|
+
onHide: PropTypes$1.func,
|
|
14459
|
+
onShow: PropTypes$1.func,
|
|
14460
|
+
visible: PropTypes$1.bool,
|
|
14170
14461
|
};
|
|
14171
14462
|
CTabPane.displayName = 'CTabPane';
|
|
14172
14463
|
|
|
@@ -14211,17 +14502,17 @@ var CToast = forwardRef(function (_a, ref) {
|
|
|
14211
14502
|
}));
|
|
14212
14503
|
});
|
|
14213
14504
|
CToast.propTypes = {
|
|
14214
|
-
animation: PropTypes.bool,
|
|
14215
|
-
autohide: PropTypes.bool,
|
|
14216
|
-
children: PropTypes.node,
|
|
14217
|
-
className: PropTypes.string,
|
|
14505
|
+
animation: PropTypes$1.bool,
|
|
14506
|
+
autohide: PropTypes$1.bool,
|
|
14507
|
+
children: PropTypes$1.node,
|
|
14508
|
+
className: PropTypes$1.string,
|
|
14218
14509
|
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,
|
|
14510
|
+
delay: PropTypes$1.number,
|
|
14511
|
+
index: PropTypes$1.number,
|
|
14512
|
+
key: PropTypes$1.number,
|
|
14513
|
+
onClose: PropTypes$1.func,
|
|
14514
|
+
onShow: PropTypes$1.func,
|
|
14515
|
+
visible: PropTypes$1.bool,
|
|
14225
14516
|
};
|
|
14226
14517
|
CToast.displayName = 'CToast';
|
|
14227
14518
|
|
|
@@ -14230,8 +14521,8 @@ var CToastBody = forwardRef(function (_a, ref) {
|
|
|
14230
14521
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('toast-body', className) }, rest, { ref: ref }), children));
|
|
14231
14522
|
});
|
|
14232
14523
|
CToastBody.propTypes = {
|
|
14233
|
-
children: PropTypes.node,
|
|
14234
|
-
className: PropTypes.string,
|
|
14524
|
+
children: PropTypes$1.node,
|
|
14525
|
+
className: PropTypes$1.string,
|
|
14235
14526
|
};
|
|
14236
14527
|
CToastBody.displayName = 'CToastBody';
|
|
14237
14528
|
|
|
@@ -14240,7 +14531,7 @@ var CToastClose = forwardRef(function (_a, ref) {
|
|
|
14240
14531
|
var setVisible = useContext(CToastContext).setVisible;
|
|
14241
14532
|
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
14533
|
});
|
|
14243
|
-
CToastClose.propTypes = __assign$1(__assign$1({}, CCloseButton.propTypes), { component: PropTypes.elementType });
|
|
14534
|
+
CToastClose.propTypes = __assign$1(__assign$1({}, CCloseButton.propTypes), { component: PropTypes$1.elementType });
|
|
14244
14535
|
CToastClose.displayName = 'CToastClose';
|
|
14245
14536
|
|
|
14246
14537
|
var CToastHeader = forwardRef(function (_a, ref) {
|
|
@@ -14250,9 +14541,9 @@ var CToastHeader = forwardRef(function (_a, ref) {
|
|
|
14250
14541
|
closeButton && React$1.createElement(CToastClose, null)));
|
|
14251
14542
|
});
|
|
14252
14543
|
CToastHeader.propTypes = {
|
|
14253
|
-
children: PropTypes.node,
|
|
14254
|
-
className: PropTypes.string,
|
|
14255
|
-
closeButton: PropTypes.bool,
|
|
14544
|
+
children: PropTypes$1.node,
|
|
14545
|
+
className: PropTypes$1.string,
|
|
14546
|
+
closeButton: PropTypes$1.bool,
|
|
14256
14547
|
};
|
|
14257
14548
|
CToastHeader.displayName = 'CToastHeader';
|
|
14258
14549
|
|
|
@@ -14288,11 +14579,11 @@ var CToaster = forwardRef(function (_a, ref) {
|
|
|
14288
14579
|
toasts.map(function (toast) { return React$1.cloneElement(toast, { visible: true }); }))) : null));
|
|
14289
14580
|
});
|
|
14290
14581
|
CToaster.propTypes = {
|
|
14291
|
-
children: PropTypes.node,
|
|
14292
|
-
className: PropTypes.string,
|
|
14293
|
-
placement: PropTypes.oneOfType([
|
|
14294
|
-
PropTypes.string,
|
|
14295
|
-
PropTypes.oneOf([
|
|
14582
|
+
children: PropTypes$1.node,
|
|
14583
|
+
className: PropTypes$1.string,
|
|
14584
|
+
placement: PropTypes$1.oneOfType([
|
|
14585
|
+
PropTypes$1.string,
|
|
14586
|
+
PropTypes$1.oneOf([
|
|
14296
14587
|
'top-start',
|
|
14297
14588
|
'top-center',
|
|
14298
14589
|
'top-end',
|
|
@@ -14304,7 +14595,7 @@ CToaster.propTypes = {
|
|
|
14304
14595
|
'bottom-end',
|
|
14305
14596
|
]),
|
|
14306
14597
|
]),
|
|
14307
|
-
push: PropTypes.any,
|
|
14598
|
+
push: PropTypes$1.any,
|
|
14308
14599
|
};
|
|
14309
14600
|
CToaster.displayName = 'CToaster';
|
|
14310
14601
|
|
|
@@ -14369,7 +14660,7 @@ var CTooltip = function (_a) {
|
|
|
14369
14660
|
typeof window !== 'undefined' &&
|
|
14370
14661
|
createPortal(React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, onEnter: onShow, onExit: onHide, timeout: {
|
|
14371
14662
|
enter: 0,
|
|
14372
|
-
exit: 200,
|
|
14663
|
+
exit: tooltipRef.current ? getTransitionDurationFromElement(tooltipRef.current) + 50 : 200,
|
|
14373
14664
|
}, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('tooltip', 'bs-tooltip-auto', {
|
|
14374
14665
|
fade: animation,
|
|
14375
14666
|
show: state === 'entered',
|
|
@@ -14378,23 +14669,23 @@ var CTooltip = function (_a) {
|
|
|
14378
14669
|
React$1.createElement("div", { className: "tooltip-inner" }, content))); }), document.body)));
|
|
14379
14670
|
};
|
|
14380
14671
|
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,
|
|
14672
|
+
animation: PropTypes$1.bool,
|
|
14673
|
+
children: PropTypes$1.node,
|
|
14674
|
+
content: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14675
|
+
delay: PropTypes$1.oneOfType([
|
|
14676
|
+
PropTypes$1.number,
|
|
14677
|
+
PropTypes$1.shape({
|
|
14678
|
+
show: PropTypes$1.number.isRequired,
|
|
14679
|
+
hide: PropTypes$1.number.isRequired,
|
|
14389
14680
|
}),
|
|
14390
14681
|
]),
|
|
14391
14682
|
fallbackPlacements: fallbackPlacementsPropType,
|
|
14392
|
-
offset: PropTypes.any,
|
|
14393
|
-
onHide: PropTypes.func,
|
|
14394
|
-
onShow: PropTypes.func,
|
|
14395
|
-
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
14683
|
+
offset: PropTypes$1.any,
|
|
14684
|
+
onHide: PropTypes$1.func,
|
|
14685
|
+
onShow: PropTypes$1.func,
|
|
14686
|
+
placement: PropTypes$1.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
14396
14687
|
trigger: triggerPropType,
|
|
14397
|
-
visible: PropTypes.bool,
|
|
14688
|
+
visible: PropTypes$1.bool,
|
|
14398
14689
|
};
|
|
14399
14690
|
CTooltip.displayName = 'CTooltip';
|
|
14400
14691
|
|
|
@@ -14410,12 +14701,12 @@ var CWidgetStatsA = forwardRef(function (_a, ref) {
|
|
|
14410
14701
|
chart));
|
|
14411
14702
|
});
|
|
14412
14703
|
CWidgetStatsA.propTypes = {
|
|
14413
|
-
action: PropTypes.node,
|
|
14414
|
-
chart: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14415
|
-
className: PropTypes.string,
|
|
14704
|
+
action: PropTypes$1.node,
|
|
14705
|
+
chart: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14706
|
+
className: PropTypes$1.string,
|
|
14416
14707
|
color: colorPropType,
|
|
14417
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14418
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
|
|
14708
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14709
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14419
14710
|
};
|
|
14420
14711
|
CWidgetStatsA.displayName = 'CWidgetStatsA';
|
|
14421
14712
|
|
|
@@ -14429,13 +14720,13 @@ var CWidgetStatsB = forwardRef(function (_a, ref) {
|
|
|
14429
14720
|
text && (React$1.createElement("small", { className: inverse ? 'text-medium-emphasis-inverse' : 'text-medium-emphasis' }, text)))));
|
|
14430
14721
|
});
|
|
14431
14722
|
CWidgetStatsB.propTypes = {
|
|
14432
|
-
className: PropTypes.string,
|
|
14723
|
+
className: PropTypes$1.string,
|
|
14433
14724
|
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]),
|
|
14725
|
+
inverse: PropTypes$1.bool,
|
|
14726
|
+
progress: PropTypes$1.object,
|
|
14727
|
+
text: PropTypes$1.string,
|
|
14728
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14729
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14439
14730
|
};
|
|
14440
14731
|
CWidgetStatsB.displayName = 'CWidgetCWidgetStatsB';
|
|
14441
14732
|
|
|
@@ -14449,13 +14740,13 @@ var CWidgetStatsC = forwardRef(function (_a, ref) {
|
|
|
14449
14740
|
React$1.createElement(CProgress, __assign$1({ className: "mt-3 mb-0", height: 4 }, (inverse && { white: true }), progress)))));
|
|
14450
14741
|
});
|
|
14451
14742
|
CWidgetStatsC.propTypes = {
|
|
14452
|
-
className: PropTypes.string,
|
|
14743
|
+
className: PropTypes$1.string,
|
|
14453
14744
|
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]),
|
|
14745
|
+
icon: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14746
|
+
inverse: PropTypes$1.bool,
|
|
14747
|
+
progress: PropTypes$1.object,
|
|
14748
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14749
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14459
14750
|
};
|
|
14460
14751
|
CWidgetStatsC.displayName = 'CWidgetStatsCWidgetStatsC';
|
|
14461
14752
|
|
|
@@ -14478,11 +14769,11 @@ var CWidgetStatsD = forwardRef(function (_a, ref) {
|
|
|
14478
14769
|
}))));
|
|
14479
14770
|
});
|
|
14480
14771
|
CWidgetStatsD.propTypes = {
|
|
14481
|
-
chart: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14482
|
-
className: PropTypes.string,
|
|
14772
|
+
chart: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14773
|
+
className: PropTypes$1.string,
|
|
14483
14774
|
color: colorPropType,
|
|
14484
|
-
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14485
|
-
values: PropTypes.arrayOf(PropTypes.any),
|
|
14775
|
+
icon: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14776
|
+
values: PropTypes$1.arrayOf(PropTypes$1.any),
|
|
14486
14777
|
};
|
|
14487
14778
|
CWidgetStatsD.displayName = 'CWidgetStatsD';
|
|
14488
14779
|
|
|
@@ -14495,11 +14786,11 @@ var CWidgetStatsE = forwardRef(function (_a, ref) {
|
|
|
14495
14786
|
chart)));
|
|
14496
14787
|
});
|
|
14497
14788
|
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]),
|
|
14789
|
+
children: PropTypes$1.node,
|
|
14790
|
+
chart: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14791
|
+
className: PropTypes$1.string,
|
|
14792
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14793
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14503
14794
|
};
|
|
14504
14795
|
CWidgetStatsE.displayName = 'CWidgetStatsE';
|
|
14505
14796
|
|
|
@@ -14514,13 +14805,13 @@ var CWidgetStatsF = forwardRef(function (_a, ref) {
|
|
|
14514
14805
|
footer && React$1.createElement(CCardFooter, null, footer)));
|
|
14515
14806
|
});
|
|
14516
14807
|
CWidgetStatsF.propTypes = {
|
|
14517
|
-
className: PropTypes.string,
|
|
14808
|
+
className: PropTypes$1.string,
|
|
14518
14809
|
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]),
|
|
14810
|
+
footer: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14811
|
+
icon: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14812
|
+
padding: PropTypes$1.bool,
|
|
14813
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14814
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14524
14815
|
};
|
|
14525
14816
|
CWidgetStatsF.displayName = 'CWidgetStatsF';
|
|
14526
14817
|
|