@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.js
CHANGED
|
@@ -60,7 +60,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
60
60
|
|
|
61
61
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
62
62
|
|
|
63
|
-
function getDefaultExportFromCjs (x) {
|
|
63
|
+
function getDefaultExportFromCjs$1 (x) {
|
|
64
64
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -1244,8 +1244,8 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1244
1244
|
propTypes$1.exports = requireFactoryWithThrowingShims$1()();
|
|
1245
1245
|
}
|
|
1246
1246
|
|
|
1247
|
-
var propTypesExports = propTypes$1.exports;
|
|
1248
|
-
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
1247
|
+
var propTypesExports$1 = propTypes$1.exports;
|
|
1248
|
+
var PropTypes$1 = /*@__PURE__*/getDefaultExportFromCjs$1(propTypesExports$1);
|
|
1249
1249
|
|
|
1250
1250
|
var classnames$1 = {exports: {}};
|
|
1251
1251
|
|
|
@@ -1306,8 +1306,8 @@ var classnames$1 = {exports: {}};
|
|
|
1306
1306
|
}());
|
|
1307
1307
|
} (classnames$1));
|
|
1308
1308
|
|
|
1309
|
-
var classnamesExports = classnames$1.exports;
|
|
1310
|
-
var classNames$1 = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
1309
|
+
var classnamesExports$1 = classnames$1.exports;
|
|
1310
|
+
var classNames$1 = /*@__PURE__*/getDefaultExportFromCjs$1(classnamesExports$1);
|
|
1311
1311
|
|
|
1312
1312
|
var CAccordionContext = React$1.createContext({});
|
|
1313
1313
|
var CAccordion = React$1.forwardRef(function (_a, ref) {
|
|
@@ -1317,11 +1317,11 @@ var CAccordion = React$1.forwardRef(function (_a, ref) {
|
|
|
1317
1317
|
React$1.createElement(CAccordionContext.Provider, { value: { _activeItemKey: _activeItemKey, alwaysOpen: alwaysOpen, setActiveKey: setActiveKey } }, children)));
|
|
1318
1318
|
});
|
|
1319
1319
|
CAccordion.propTypes = {
|
|
1320
|
-
alwaysOpen: PropTypes.bool,
|
|
1321
|
-
activeItemKey: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
1322
|
-
children: PropTypes.node,
|
|
1323
|
-
className: PropTypes.string,
|
|
1324
|
-
flush: PropTypes.bool,
|
|
1320
|
+
alwaysOpen: PropTypes$1.bool,
|
|
1321
|
+
activeItemKey: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
1322
|
+
children: PropTypes$1.node,
|
|
1323
|
+
className: PropTypes$1.string,
|
|
1324
|
+
flush: PropTypes$1.bool,
|
|
1325
1325
|
};
|
|
1326
1326
|
CAccordion.displayName = 'CAccordion';
|
|
1327
1327
|
|
|
@@ -1341,9 +1341,9 @@ var CAccordionItem = React$1.forwardRef(function (_a, ref) {
|
|
|
1341
1341
|
React$1.createElement(CAccordionItemContext.Provider, { value: { setVisible: setVisible, visible: visible } }, children)));
|
|
1342
1342
|
});
|
|
1343
1343
|
CAccordionItem.propTypes = {
|
|
1344
|
-
children: PropTypes.node,
|
|
1345
|
-
className: PropTypes.string,
|
|
1346
|
-
itemKey: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
1344
|
+
children: PropTypes$1.node,
|
|
1345
|
+
className: PropTypes$1.string,
|
|
1346
|
+
itemKey: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
1347
1347
|
};
|
|
1348
1348
|
CAccordionItem.displayName = 'CAccordionItem';
|
|
1349
1349
|
|
|
@@ -1436,22 +1436,22 @@ var config = {
|
|
|
1436
1436
|
disabled: false
|
|
1437
1437
|
};
|
|
1438
1438
|
|
|
1439
|
-
var timeoutsShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
1440
|
-
enter: PropTypes.number,
|
|
1441
|
-
exit: PropTypes.number,
|
|
1442
|
-
appear: PropTypes.number
|
|
1439
|
+
var timeoutsShape = process.env.NODE_ENV !== 'production' ? PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.shape({
|
|
1440
|
+
enter: PropTypes$1.number,
|
|
1441
|
+
exit: PropTypes$1.number,
|
|
1442
|
+
appear: PropTypes$1.number
|
|
1443
1443
|
}).isRequired]) : null;
|
|
1444
|
-
var classNamesShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
1445
|
-
enter: PropTypes.string,
|
|
1446
|
-
exit: PropTypes.string,
|
|
1447
|
-
active: PropTypes.string
|
|
1448
|
-
}), PropTypes.shape({
|
|
1449
|
-
enter: PropTypes.string,
|
|
1450
|
-
enterDone: PropTypes.string,
|
|
1451
|
-
enterActive: PropTypes.string,
|
|
1452
|
-
exit: PropTypes.string,
|
|
1453
|
-
exitDone: PropTypes.string,
|
|
1454
|
-
exitActive: PropTypes.string
|
|
1444
|
+
var classNamesShape = process.env.NODE_ENV !== 'production' ? PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.shape({
|
|
1445
|
+
enter: PropTypes$1.string,
|
|
1446
|
+
exit: PropTypes$1.string,
|
|
1447
|
+
active: PropTypes$1.string
|
|
1448
|
+
}), PropTypes$1.shape({
|
|
1449
|
+
enter: PropTypes$1.string,
|
|
1450
|
+
enterDone: PropTypes$1.string,
|
|
1451
|
+
enterActive: PropTypes$1.string,
|
|
1452
|
+
exit: PropTypes$1.string,
|
|
1453
|
+
exitDone: PropTypes$1.string,
|
|
1454
|
+
exitActive: PropTypes$1.string
|
|
1455
1455
|
})]) : null;
|
|
1456
1456
|
|
|
1457
1457
|
var TransitionGroupContext = React$1.createContext(null);
|
|
@@ -1878,10 +1878,10 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1878
1878
|
* (see
|
|
1879
1879
|
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
1880
1880
|
*/
|
|
1881
|
-
nodeRef: PropTypes.shape({
|
|
1882
|
-
current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {
|
|
1881
|
+
nodeRef: PropTypes$1.shape({
|
|
1882
|
+
current: typeof Element === 'undefined' ? PropTypes$1.any : function (propValue, key, componentName, location, propFullName, secret) {
|
|
1883
1883
|
var value = propValue[key];
|
|
1884
|
-
return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
|
|
1884
|
+
return PropTypes$1.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
|
|
1885
1885
|
}
|
|
1886
1886
|
}),
|
|
1887
1887
|
|
|
@@ -1899,12 +1899,12 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1899
1899
|
* </Transition>
|
|
1900
1900
|
* ```
|
|
1901
1901
|
*/
|
|
1902
|
-
children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
|
|
1902
|
+
children: PropTypes$1.oneOfType([PropTypes$1.func.isRequired, PropTypes$1.element.isRequired]).isRequired,
|
|
1903
1903
|
|
|
1904
1904
|
/**
|
|
1905
1905
|
* Show the component; triggers the enter or exit states
|
|
1906
1906
|
*/
|
|
1907
|
-
in: PropTypes.bool,
|
|
1907
|
+
in: PropTypes$1.bool,
|
|
1908
1908
|
|
|
1909
1909
|
/**
|
|
1910
1910
|
* By default the child component is mounted immediately along with
|
|
@@ -1912,13 +1912,13 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1912
1912
|
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
1913
1913
|
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
1914
1914
|
*/
|
|
1915
|
-
mountOnEnter: PropTypes.bool,
|
|
1915
|
+
mountOnEnter: PropTypes$1.bool,
|
|
1916
1916
|
|
|
1917
1917
|
/**
|
|
1918
1918
|
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
1919
1919
|
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
1920
1920
|
*/
|
|
1921
|
-
unmountOnExit: PropTypes.bool,
|
|
1921
|
+
unmountOnExit: PropTypes$1.bool,
|
|
1922
1922
|
|
|
1923
1923
|
/**
|
|
1924
1924
|
* By default the child component does not perform the enter transition when
|
|
@@ -1931,17 +1931,17 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1931
1931
|
* > additional `.appear-*` classes, that way you can choose to style it
|
|
1932
1932
|
* > differently.
|
|
1933
1933
|
*/
|
|
1934
|
-
appear: PropTypes.bool,
|
|
1934
|
+
appear: PropTypes$1.bool,
|
|
1935
1935
|
|
|
1936
1936
|
/**
|
|
1937
1937
|
* Enable or disable enter transitions.
|
|
1938
1938
|
*/
|
|
1939
|
-
enter: PropTypes.bool,
|
|
1939
|
+
enter: PropTypes$1.bool,
|
|
1940
1940
|
|
|
1941
1941
|
/**
|
|
1942
1942
|
* Enable or disable exit transitions.
|
|
1943
1943
|
*/
|
|
1944
|
-
exit: PropTypes.bool,
|
|
1944
|
+
exit: PropTypes$1.bool,
|
|
1945
1945
|
|
|
1946
1946
|
/**
|
|
1947
1947
|
* The duration of the transition, in milliseconds.
|
|
@@ -1994,7 +1994,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1994
1994
|
* }}
|
|
1995
1995
|
* ```
|
|
1996
1996
|
*/
|
|
1997
|
-
addEndListener: PropTypes.func,
|
|
1997
|
+
addEndListener: PropTypes$1.func,
|
|
1998
1998
|
|
|
1999
1999
|
/**
|
|
2000
2000
|
* Callback fired before the "entering" status is applied. An extra parameter
|
|
@@ -2004,7 +2004,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2004
2004
|
*
|
|
2005
2005
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
2006
2006
|
*/
|
|
2007
|
-
onEnter: PropTypes.func,
|
|
2007
|
+
onEnter: PropTypes$1.func,
|
|
2008
2008
|
|
|
2009
2009
|
/**
|
|
2010
2010
|
* Callback fired after the "entering" status is applied. An extra parameter
|
|
@@ -2014,7 +2014,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2014
2014
|
*
|
|
2015
2015
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2016
2016
|
*/
|
|
2017
|
-
onEntering: PropTypes.func,
|
|
2017
|
+
onEntering: PropTypes$1.func,
|
|
2018
2018
|
|
|
2019
2019
|
/**
|
|
2020
2020
|
* Callback fired after the "entered" status is applied. An extra parameter
|
|
@@ -2024,7 +2024,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2024
2024
|
*
|
|
2025
2025
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
2026
2026
|
*/
|
|
2027
|
-
onEntered: PropTypes.func,
|
|
2027
|
+
onEntered: PropTypes$1.func,
|
|
2028
2028
|
|
|
2029
2029
|
/**
|
|
2030
2030
|
* Callback fired before the "exiting" status is applied.
|
|
@@ -2033,7 +2033,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2033
2033
|
*
|
|
2034
2034
|
* @type Function(node: HtmlElement) -> void
|
|
2035
2035
|
*/
|
|
2036
|
-
onExit: PropTypes.func,
|
|
2036
|
+
onExit: PropTypes$1.func,
|
|
2037
2037
|
|
|
2038
2038
|
/**
|
|
2039
2039
|
* Callback fired after the "exiting" status is applied.
|
|
@@ -2042,7 +2042,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2042
2042
|
*
|
|
2043
2043
|
* @type Function(node: HtmlElement) -> void
|
|
2044
2044
|
*/
|
|
2045
|
-
onExiting: PropTypes.func,
|
|
2045
|
+
onExiting: PropTypes$1.func,
|
|
2046
2046
|
|
|
2047
2047
|
/**
|
|
2048
2048
|
* Callback fired after the "exited" status is applied.
|
|
@@ -2051,7 +2051,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2051
2051
|
*
|
|
2052
2052
|
* @type Function(node: HtmlElement) -> void
|
|
2053
2053
|
*/
|
|
2054
|
-
onExited: PropTypes.func
|
|
2054
|
+
onExited: PropTypes$1.func
|
|
2055
2055
|
} : {}; // Name the function so it is clearer in the documentation
|
|
2056
2056
|
|
|
2057
2057
|
function noop() {}
|
|
@@ -2426,7 +2426,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
2426
2426
|
*
|
|
2427
2427
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2428
2428
|
*/
|
|
2429
|
-
onEnter: PropTypes.func,
|
|
2429
|
+
onEnter: PropTypes$1.func,
|
|
2430
2430
|
|
|
2431
2431
|
/**
|
|
2432
2432
|
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
|
@@ -2436,7 +2436,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
2436
2436
|
*
|
|
2437
2437
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2438
2438
|
*/
|
|
2439
|
-
onEntering: PropTypes.func,
|
|
2439
|
+
onEntering: PropTypes$1.func,
|
|
2440
2440
|
|
|
2441
2441
|
/**
|
|
2442
2442
|
* A `<Transition>` callback fired immediately after the 'enter' or
|
|
@@ -2446,7 +2446,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
2446
2446
|
*
|
|
2447
2447
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2448
2448
|
*/
|
|
2449
|
-
onEntered: PropTypes.func,
|
|
2449
|
+
onEntered: PropTypes$1.func,
|
|
2450
2450
|
|
|
2451
2451
|
/**
|
|
2452
2452
|
* A `<Transition>` callback fired immediately after the 'exit' class is
|
|
@@ -2456,7 +2456,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
2456
2456
|
*
|
|
2457
2457
|
* @type Function(node: HtmlElement)
|
|
2458
2458
|
*/
|
|
2459
|
-
onExit: PropTypes.func,
|
|
2459
|
+
onExit: PropTypes$1.func,
|
|
2460
2460
|
|
|
2461
2461
|
/**
|
|
2462
2462
|
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
|
@@ -2465,7 +2465,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
2465
2465
|
*
|
|
2466
2466
|
* @type Function(node: HtmlElement)
|
|
2467
2467
|
*/
|
|
2468
|
-
onExiting: PropTypes.func,
|
|
2468
|
+
onExiting: PropTypes$1.func,
|
|
2469
2469
|
|
|
2470
2470
|
/**
|
|
2471
2471
|
* A `<Transition>` callback fired immediately after the 'exit' classes
|
|
@@ -2475,7 +2475,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
2475
2475
|
*
|
|
2476
2476
|
* @type Function(node: HtmlElement)
|
|
2477
2477
|
*/
|
|
2478
|
-
onExited: PropTypes.func
|
|
2478
|
+
onExited: PropTypes$1.func
|
|
2479
2479
|
}) : {};
|
|
2480
2480
|
var CSSTransition$1 = CSSTransition;
|
|
2481
2481
|
|
|
@@ -4361,14 +4361,117 @@ var createPopper = /*#__PURE__*/popperGenerator({
|
|
|
4361
4361
|
defaultModifiers: defaultModifiers
|
|
4362
4362
|
}); // eslint-disable-next-line import/no-unused-modules
|
|
4363
4363
|
|
|
4364
|
+
var getTransitionDurationFromElement = function (element) {
|
|
4365
|
+
if (!element) {
|
|
4366
|
+
return 0;
|
|
4367
|
+
}
|
|
4368
|
+
// Get transition-duration of the element
|
|
4369
|
+
var _a = window.getComputedStyle(element), transitionDuration = _a.transitionDuration, transitionDelay = _a.transitionDelay;
|
|
4370
|
+
var floatTransitionDuration = Number.parseFloat(transitionDuration);
|
|
4371
|
+
var floatTransitionDelay = Number.parseFloat(transitionDelay);
|
|
4372
|
+
// Return 0 if element or transition duration is not found
|
|
4373
|
+
if (!floatTransitionDuration && !floatTransitionDelay) {
|
|
4374
|
+
return 0;
|
|
4375
|
+
}
|
|
4376
|
+
// If multiple durations are defined, take the first
|
|
4377
|
+
transitionDuration = transitionDuration.split(',')[0];
|
|
4378
|
+
transitionDelay = transitionDelay.split(',')[0];
|
|
4379
|
+
return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * 1000;
|
|
4380
|
+
};
|
|
4381
|
+
|
|
4382
|
+
var execute = function (callback) {
|
|
4383
|
+
if (typeof callback === 'function') {
|
|
4384
|
+
callback();
|
|
4385
|
+
}
|
|
4386
|
+
};
|
|
4387
|
+
var triggerTransitionEnd = function (element) {
|
|
4388
|
+
element.dispatchEvent(new Event('transitionend'));
|
|
4389
|
+
};
|
|
4390
|
+
var executeAfterTransition = function (callback, transitionElement, waitForTransition) {
|
|
4391
|
+
if (waitForTransition === void 0) { waitForTransition = true; }
|
|
4392
|
+
if (!waitForTransition) {
|
|
4393
|
+
execute(callback);
|
|
4394
|
+
return;
|
|
4395
|
+
}
|
|
4396
|
+
var durationPadding = 5;
|
|
4397
|
+
var emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;
|
|
4398
|
+
var called = false;
|
|
4399
|
+
var handler = function (_a) {
|
|
4400
|
+
var target = _a.target;
|
|
4401
|
+
if (target !== transitionElement) {
|
|
4402
|
+
return;
|
|
4403
|
+
}
|
|
4404
|
+
called = true;
|
|
4405
|
+
transitionElement.removeEventListener('transitionend', handler);
|
|
4406
|
+
execute(callback);
|
|
4407
|
+
};
|
|
4408
|
+
transitionElement.addEventListener('transitionend', handler);
|
|
4409
|
+
setTimeout(function () {
|
|
4410
|
+
if (!called) {
|
|
4411
|
+
triggerTransitionEnd(transitionElement);
|
|
4412
|
+
}
|
|
4413
|
+
}, emulatedDuration);
|
|
4414
|
+
};
|
|
4415
|
+
|
|
4416
|
+
var isRTL = function (element) {
|
|
4417
|
+
if (typeof document !== 'undefined' && document.documentElement.dir === 'rtl') {
|
|
4418
|
+
return true;
|
|
4419
|
+
}
|
|
4420
|
+
if (element) {
|
|
4421
|
+
return element.closest('[dir="rtl"]') !== null;
|
|
4422
|
+
}
|
|
4423
|
+
return false;
|
|
4424
|
+
};
|
|
4425
|
+
|
|
4426
|
+
var getRTLPlacement = function (placement, element) {
|
|
4427
|
+
switch (placement) {
|
|
4428
|
+
case 'right': {
|
|
4429
|
+
return isRTL(element) ? 'left' : 'right';
|
|
4430
|
+
}
|
|
4431
|
+
case 'left': {
|
|
4432
|
+
return isRTL(element) ? 'right' : 'left';
|
|
4433
|
+
}
|
|
4434
|
+
default: {
|
|
4435
|
+
return placement;
|
|
4436
|
+
}
|
|
4437
|
+
}
|
|
4438
|
+
};
|
|
4439
|
+
|
|
4440
|
+
var isInViewport = function (element) {
|
|
4441
|
+
var rect = element.getBoundingClientRect();
|
|
4442
|
+
return (Math.floor(rect.top) >= 0 &&
|
|
4443
|
+
Math.floor(rect.left) >= 0 &&
|
|
4444
|
+
Math.floor(rect.bottom) <= (window.innerHeight || document.documentElement.clientHeight) &&
|
|
4445
|
+
Math.floor(rect.right) <= (window.innerWidth || document.documentElement.clientWidth));
|
|
4446
|
+
};
|
|
4447
|
+
|
|
4448
|
+
var isObjectInArray = function (array, item, ignore) {
|
|
4449
|
+
if (ignore === void 0) { ignore = []; }
|
|
4450
|
+
return array.some(function (_item) {
|
|
4451
|
+
var result = true;
|
|
4452
|
+
for (var key in item) {
|
|
4453
|
+
if (!ignore.includes(key) && item[key] !== _item[key]) {
|
|
4454
|
+
result = false;
|
|
4455
|
+
break;
|
|
4456
|
+
}
|
|
4457
|
+
}
|
|
4458
|
+
return result;
|
|
4459
|
+
});
|
|
4460
|
+
};
|
|
4461
|
+
|
|
4364
4462
|
var usePopper = function () {
|
|
4365
4463
|
var _popper = React$1.useRef();
|
|
4464
|
+
var el = React$1.useRef();
|
|
4366
4465
|
var initPopper = function (reference, popper, options) {
|
|
4367
4466
|
_popper.current = createPopper(reference, popper, options);
|
|
4467
|
+
el.current = popper;
|
|
4368
4468
|
};
|
|
4369
4469
|
var destroyPopper = function () {
|
|
4370
|
-
|
|
4371
|
-
|
|
4470
|
+
var popperInstance = _popper.current;
|
|
4471
|
+
if (popperInstance && el.current) {
|
|
4472
|
+
executeAfterTransition(function () {
|
|
4473
|
+
popperInstance.destroy();
|
|
4474
|
+
}, el.current);
|
|
4372
4475
|
}
|
|
4373
4476
|
_popper.current = undefined;
|
|
4374
4477
|
};
|
|
@@ -4443,12 +4546,12 @@ var CCollapse = React$1.forwardRef(function (_a, ref) {
|
|
|
4443
4546
|
}));
|
|
4444
4547
|
});
|
|
4445
4548
|
CCollapse.propTypes = {
|
|
4446
|
-
children: PropTypes.node,
|
|
4447
|
-
className: PropTypes.string,
|
|
4448
|
-
horizontal: PropTypes.bool,
|
|
4449
|
-
onHide: PropTypes.func,
|
|
4450
|
-
onShow: PropTypes.func,
|
|
4451
|
-
visible: PropTypes.bool,
|
|
4549
|
+
children: PropTypes$1.node,
|
|
4550
|
+
className: PropTypes$1.string,
|
|
4551
|
+
horizontal: PropTypes$1.bool,
|
|
4552
|
+
onHide: PropTypes$1.func,
|
|
4553
|
+
onShow: PropTypes$1.func,
|
|
4554
|
+
visible: PropTypes$1.bool,
|
|
4452
4555
|
};
|
|
4453
4556
|
CCollapse.displayName = 'CCollapse';
|
|
4454
4557
|
|
|
@@ -4459,8 +4562,8 @@ var CAccordionBody = React$1.forwardRef(function (_a, ref) {
|
|
|
4459
4562
|
React$1.createElement("div", __assign$1({ className: classNames$1('accordion-body', className) }, rest, { ref: ref }), children)));
|
|
4460
4563
|
});
|
|
4461
4564
|
CAccordionBody.propTypes = {
|
|
4462
|
-
children: PropTypes.node,
|
|
4463
|
-
className: PropTypes.string,
|
|
4565
|
+
children: PropTypes$1.node,
|
|
4566
|
+
className: PropTypes$1.string,
|
|
4464
4567
|
};
|
|
4465
4568
|
CAccordionBody.displayName = 'CAccordionBody';
|
|
4466
4569
|
|
|
@@ -4470,8 +4573,8 @@ var CAccordionButton = React$1.forwardRef(function (_a, ref) {
|
|
|
4470
4573
|
return (React$1.createElement("button", __assign$1({ type: "button", className: classNames$1('accordion-button', { collapsed: !visible }, className), "aria-expanded": !visible, onClick: function () { return setVisible(!visible); } }, rest, { ref: ref }), children));
|
|
4471
4574
|
});
|
|
4472
4575
|
CAccordionButton.propTypes = {
|
|
4473
|
-
children: PropTypes.node,
|
|
4474
|
-
className: PropTypes.string,
|
|
4576
|
+
children: PropTypes$1.node,
|
|
4577
|
+
className: PropTypes$1.string,
|
|
4475
4578
|
};
|
|
4476
4579
|
CAccordionButton.displayName = 'CAccordionButton';
|
|
4477
4580
|
|
|
@@ -4481,26 +4584,27 @@ var CAccordionHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
4481
4584
|
React$1.createElement(CAccordionButton, null, children)));
|
|
4482
4585
|
});
|
|
4483
4586
|
CAccordionHeader.propTypes = {
|
|
4484
|
-
children: PropTypes.node,
|
|
4485
|
-
className: PropTypes.string,
|
|
4587
|
+
children: PropTypes$1.node,
|
|
4588
|
+
className: PropTypes$1.string,
|
|
4486
4589
|
};
|
|
4487
4590
|
CAccordionHeader.displayName = 'CAccordionHeader';
|
|
4488
4591
|
|
|
4489
4592
|
var CCloseButton = React$1.forwardRef(function (_a, ref) {
|
|
4490
|
-
var className = _a.className, disabled = _a.disabled, white = _a.white, rest = __rest$1(_a, ["className", "disabled", "white"]);
|
|
4593
|
+
var className = _a.className, dark = _a.dark, disabled = _a.disabled, white = _a.white, rest = __rest$1(_a, ["className", "dark", "disabled", "white"]);
|
|
4491
4594
|
return (React$1.createElement("button", __assign$1({ type: "button", className: classNames$1('btn', 'btn-close', {
|
|
4492
4595
|
'btn-close-white': white,
|
|
4493
|
-
}, disabled, className), "aria-label": "Close", disabled: disabled }, rest, { ref: ref })));
|
|
4596
|
+
}, disabled, className), "aria-label": "Close", disabled: disabled }, (dark && { 'data-coreui-theme': 'dark' }), rest, { ref: ref })));
|
|
4494
4597
|
});
|
|
4495
4598
|
CCloseButton.propTypes = {
|
|
4496
|
-
className: PropTypes.string,
|
|
4497
|
-
|
|
4498
|
-
|
|
4599
|
+
className: PropTypes$1.string,
|
|
4600
|
+
dark: PropTypes$1.bool,
|
|
4601
|
+
disabled: PropTypes$1.bool,
|
|
4602
|
+
white: PropTypes$1.bool,
|
|
4499
4603
|
};
|
|
4500
4604
|
CCloseButton.displayName = 'CCloseButton';
|
|
4501
4605
|
|
|
4502
|
-
var colorPropType = PropTypes.oneOfType([
|
|
4503
|
-
PropTypes.oneOf([
|
|
4606
|
+
var colorPropType = PropTypes$1.oneOfType([
|
|
4607
|
+
PropTypes$1.oneOf([
|
|
4504
4608
|
'primary',
|
|
4505
4609
|
'secondary',
|
|
4506
4610
|
'success',
|
|
@@ -4510,13 +4614,13 @@ var colorPropType = PropTypes.oneOfType([
|
|
|
4510
4614
|
'dark',
|
|
4511
4615
|
'light',
|
|
4512
4616
|
]),
|
|
4513
|
-
PropTypes.string,
|
|
4617
|
+
PropTypes$1.string,
|
|
4514
4618
|
]);
|
|
4515
|
-
var fallbackPlacementsPropType = PropTypes.oneOfType([
|
|
4516
|
-
PropTypes.arrayOf(PropTypes.oneOf(['top', 'bottom', 'right', 'left']).isRequired),
|
|
4517
|
-
PropTypes.oneOf(['top', 'bottom', 'right', 'left']),
|
|
4619
|
+
var fallbackPlacementsPropType = PropTypes$1.oneOfType([
|
|
4620
|
+
PropTypes$1.arrayOf(PropTypes$1.oneOf(['top', 'bottom', 'right', 'left']).isRequired),
|
|
4621
|
+
PropTypes$1.oneOf(['top', 'bottom', 'right', 'left']),
|
|
4518
4622
|
]);
|
|
4519
|
-
var gradientsPropType = PropTypes.oneOf([
|
|
4623
|
+
var gradientsPropType = PropTypes$1.oneOf([
|
|
4520
4624
|
'primary-gradient',
|
|
4521
4625
|
'secondary-gradient',
|
|
4522
4626
|
'success-gradient',
|
|
@@ -4526,7 +4630,7 @@ var gradientsPropType = PropTypes.oneOf([
|
|
|
4526
4630
|
'dark-gradient',
|
|
4527
4631
|
'light-gradient',
|
|
4528
4632
|
]);
|
|
4529
|
-
var placementPropType = PropTypes.oneOf([
|
|
4633
|
+
var placementPropType = PropTypes$1.oneOf([
|
|
4530
4634
|
'auto',
|
|
4531
4635
|
'auto-start',
|
|
4532
4636
|
'auto-end',
|
|
@@ -4543,8 +4647,8 @@ var placementPropType = PropTypes.oneOf([
|
|
|
4543
4647
|
'left',
|
|
4544
4648
|
'left-end',
|
|
4545
4649
|
]);
|
|
4546
|
-
var shapePropType = PropTypes.oneOfType([
|
|
4547
|
-
PropTypes.oneOf([
|
|
4650
|
+
var shapePropType = PropTypes$1.oneOfType([
|
|
4651
|
+
PropTypes$1.oneOf([
|
|
4548
4652
|
'rounded',
|
|
4549
4653
|
'rounded-top',
|
|
4550
4654
|
'rounded-end',
|
|
@@ -4557,16 +4661,16 @@ var shapePropType = PropTypes.oneOfType([
|
|
|
4557
4661
|
'rounded-2',
|
|
4558
4662
|
'rounded-3',
|
|
4559
4663
|
]),
|
|
4560
|
-
PropTypes.string,
|
|
4664
|
+
PropTypes$1.string,
|
|
4561
4665
|
]);
|
|
4562
|
-
var textColorsPropType = PropTypes.oneOfType([
|
|
4666
|
+
var textColorsPropType = PropTypes$1.oneOfType([
|
|
4563
4667
|
colorPropType,
|
|
4564
|
-
PropTypes.oneOf(['white', 'muted']),
|
|
4565
|
-
PropTypes.string,
|
|
4668
|
+
PropTypes$1.oneOf(['white', 'muted']),
|
|
4669
|
+
PropTypes$1.string,
|
|
4566
4670
|
]);
|
|
4567
|
-
var triggerPropType = PropTypes.oneOfType([
|
|
4568
|
-
PropTypes.arrayOf(PropTypes.oneOf(['hover', 'focus', 'click']).isRequired),
|
|
4569
|
-
PropTypes.oneOf(['hover', 'focus', 'click']),
|
|
4671
|
+
var triggerPropType = PropTypes$1.oneOfType([
|
|
4672
|
+
PropTypes$1.arrayOf(PropTypes$1.oneOf(['hover', 'focus', 'click']).isRequired),
|
|
4673
|
+
PropTypes$1.oneOf(['hover', 'focus', 'click']),
|
|
4570
4674
|
]);
|
|
4571
4675
|
|
|
4572
4676
|
var CAlert = React$1.forwardRef(function (_a, ref) {
|
|
@@ -4585,13 +4689,13 @@ var CAlert = React$1.forwardRef(function (_a, ref) {
|
|
|
4585
4689
|
dismissible && React$1.createElement(CCloseButton, { onClick: function () { return setVisible(false); } }))); }));
|
|
4586
4690
|
});
|
|
4587
4691
|
CAlert.propTypes = {
|
|
4588
|
-
children: PropTypes.node,
|
|
4589
|
-
className: PropTypes.string,
|
|
4692
|
+
children: PropTypes$1.node,
|
|
4693
|
+
className: PropTypes$1.string,
|
|
4590
4694
|
color: colorPropType.isRequired,
|
|
4591
|
-
dismissible: PropTypes.bool,
|
|
4592
|
-
onClose: PropTypes.func,
|
|
4593
|
-
variant: PropTypes.string,
|
|
4594
|
-
visible: PropTypes.bool,
|
|
4695
|
+
dismissible: PropTypes$1.bool,
|
|
4696
|
+
onClose: PropTypes$1.func,
|
|
4697
|
+
variant: PropTypes$1.string,
|
|
4698
|
+
visible: PropTypes$1.bool,
|
|
4595
4699
|
};
|
|
4596
4700
|
CAlert.displayName = 'CAlert';
|
|
4597
4701
|
|
|
@@ -4600,9 +4704,9 @@ var CAlertHeading = React$1.forwardRef(function (_a, ref) {
|
|
|
4600
4704
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('alert-heading', className) }, rest, { ref: ref }), children));
|
|
4601
4705
|
});
|
|
4602
4706
|
CAlertHeading.propTypes = {
|
|
4603
|
-
children: PropTypes.node,
|
|
4604
|
-
className: PropTypes.string,
|
|
4605
|
-
component: PropTypes.elementType,
|
|
4707
|
+
children: PropTypes$1.node,
|
|
4708
|
+
className: PropTypes$1.string,
|
|
4709
|
+
component: PropTypes$1.elementType,
|
|
4606
4710
|
};
|
|
4607
4711
|
CAlertHeading.displayName = 'CAlertHeading';
|
|
4608
4712
|
|
|
@@ -4620,11 +4724,11 @@ var CLink = React$1.forwardRef(function (_a, ref) {
|
|
|
4620
4724
|
}), { disabled: disabled }, rest, { ref: ref }), children));
|
|
4621
4725
|
});
|
|
4622
4726
|
CLink.propTypes = {
|
|
4623
|
-
active: PropTypes.bool,
|
|
4624
|
-
children: PropTypes.node,
|
|
4625
|
-
className: PropTypes.string,
|
|
4626
|
-
component: PropTypes.elementType,
|
|
4627
|
-
disabled: PropTypes.bool,
|
|
4727
|
+
active: PropTypes$1.bool,
|
|
4728
|
+
children: PropTypes$1.node,
|
|
4729
|
+
className: PropTypes$1.string,
|
|
4730
|
+
component: PropTypes$1.elementType,
|
|
4731
|
+
disabled: PropTypes$1.bool,
|
|
4628
4732
|
};
|
|
4629
4733
|
CLink.displayName = 'CLink';
|
|
4630
4734
|
|
|
@@ -4633,8 +4737,8 @@ var CAlertLink = React$1.forwardRef(function (_a, ref) {
|
|
|
4633
4737
|
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('alert-link', className) }, rest, { ref: ref }), children));
|
|
4634
4738
|
});
|
|
4635
4739
|
CAlertLink.propTypes = {
|
|
4636
|
-
children: PropTypes.node,
|
|
4637
|
-
className: PropTypes.string,
|
|
4740
|
+
children: PropTypes$1.node,
|
|
4741
|
+
className: PropTypes$1.string,
|
|
4638
4742
|
};
|
|
4639
4743
|
CAlertLink.displayName = 'CAlertLink';
|
|
4640
4744
|
|
|
@@ -4651,13 +4755,13 @@ var CAvatar = React$1.forwardRef(function (_a, ref) {
|
|
|
4651
4755
|
status && React$1.createElement("span", { className: statusClassName })));
|
|
4652
4756
|
});
|
|
4653
4757
|
CAvatar.propTypes = {
|
|
4654
|
-
children: PropTypes.node,
|
|
4655
|
-
className: PropTypes.string,
|
|
4758
|
+
children: PropTypes$1.node,
|
|
4759
|
+
className: PropTypes$1.string,
|
|
4656
4760
|
color: colorPropType,
|
|
4657
4761
|
shape: shapePropType,
|
|
4658
|
-
size: PropTypes.string,
|
|
4659
|
-
src: PropTypes.string,
|
|
4660
|
-
status: PropTypes.string,
|
|
4762
|
+
size: PropTypes$1.string,
|
|
4763
|
+
src: PropTypes$1.string,
|
|
4764
|
+
status: PropTypes$1.string,
|
|
4661
4765
|
textColor: textColorsPropType,
|
|
4662
4766
|
};
|
|
4663
4767
|
CAvatar.displayName = 'CAvatar';
|
|
@@ -4671,8 +4775,8 @@ var CBackdrop = React$1.forwardRef(function (_a, ref) {
|
|
|
4671
4775
|
}) }, rest, { ref: forkedRef }))); }));
|
|
4672
4776
|
});
|
|
4673
4777
|
CBackdrop.propTypes = {
|
|
4674
|
-
className: PropTypes.string,
|
|
4675
|
-
visible: PropTypes.bool,
|
|
4778
|
+
className: PropTypes$1.string,
|
|
4779
|
+
visible: PropTypes$1.bool,
|
|
4676
4780
|
};
|
|
4677
4781
|
CBackdrop.displayName = 'CBackdrop';
|
|
4678
4782
|
|
|
@@ -4691,13 +4795,13 @@ var CBadge = React$1.forwardRef(function (_a, ref) {
|
|
|
4691
4795
|
_b), shape, className) }, rest, { ref: ref }), children));
|
|
4692
4796
|
});
|
|
4693
4797
|
CBadge.propTypes = {
|
|
4694
|
-
children: PropTypes.node,
|
|
4695
|
-
className: PropTypes.string,
|
|
4696
|
-
color: PropTypes.oneOfType([colorPropType, gradientsPropType]),
|
|
4697
|
-
component: PropTypes.string,
|
|
4698
|
-
position: PropTypes.oneOf(['top-start', 'top-end', 'bottom-end', 'bottom-start']),
|
|
4798
|
+
children: PropTypes$1.node,
|
|
4799
|
+
className: PropTypes$1.string,
|
|
4800
|
+
color: PropTypes$1.oneOfType([colorPropType, gradientsPropType]),
|
|
4801
|
+
component: PropTypes$1.string,
|
|
4802
|
+
position: PropTypes$1.oneOf(['top-start', 'top-end', 'bottom-end', 'bottom-start']),
|
|
4699
4803
|
shape: shapePropType,
|
|
4700
|
-
size: PropTypes.oneOf(['sm']),
|
|
4804
|
+
size: PropTypes$1.oneOf(['sm']),
|
|
4701
4805
|
textColor: textColorsPropType,
|
|
4702
4806
|
};
|
|
4703
4807
|
CBadge.displayName = 'CBadge';
|
|
@@ -4708,8 +4812,8 @@ var CBreadcrumb = React$1.forwardRef(function (_a, ref) {
|
|
|
4708
4812
|
React$1.createElement("ol", __assign$1({ className: classNames$1('breadcrumb', className) }, rest, { ref: ref }), children)));
|
|
4709
4813
|
});
|
|
4710
4814
|
CBreadcrumb.propTypes = {
|
|
4711
|
-
children: PropTypes.node,
|
|
4712
|
-
className: PropTypes.string,
|
|
4815
|
+
children: PropTypes$1.node,
|
|
4816
|
+
className: PropTypes$1.string,
|
|
4713
4817
|
};
|
|
4714
4818
|
CBreadcrumb.displayName = 'CBreadcrumb';
|
|
4715
4819
|
|
|
@@ -4720,10 +4824,10 @@ var CBreadcrumbItem = React$1.forwardRef(function (_a, ref) {
|
|
|
4720
4824
|
}, className) }, (active && { 'aria-current': 'page' }), rest, { ref: ref }), href ? React$1.createElement(CLink, { href: href }, children) : children));
|
|
4721
4825
|
});
|
|
4722
4826
|
CBreadcrumbItem.propTypes = {
|
|
4723
|
-
active: PropTypes.bool,
|
|
4724
|
-
children: PropTypes.node,
|
|
4725
|
-
className: PropTypes.string,
|
|
4726
|
-
href: PropTypes.string,
|
|
4827
|
+
active: PropTypes$1.bool,
|
|
4828
|
+
children: PropTypes$1.node,
|
|
4829
|
+
className: PropTypes$1.string,
|
|
4830
|
+
href: PropTypes$1.string,
|
|
4727
4831
|
};
|
|
4728
4832
|
CBreadcrumbItem.displayName = 'CBreadcrumbItem';
|
|
4729
4833
|
|
|
@@ -4733,14 +4837,14 @@ var CButton = React$1.forwardRef(function (_a, ref) {
|
|
|
4733
4837
|
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));
|
|
4734
4838
|
});
|
|
4735
4839
|
CButton.propTypes = {
|
|
4736
|
-
children: PropTypes.node,
|
|
4737
|
-
className: PropTypes.string,
|
|
4840
|
+
children: PropTypes$1.node,
|
|
4841
|
+
className: PropTypes$1.string,
|
|
4738
4842
|
color: colorPropType,
|
|
4739
|
-
component: PropTypes.elementType,
|
|
4740
|
-
shape: PropTypes.string,
|
|
4741
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
4742
|
-
type: PropTypes.oneOf(['button', 'submit', 'reset']),
|
|
4743
|
-
variant: PropTypes.oneOf(['outline', 'ghost']),
|
|
4843
|
+
component: PropTypes$1.elementType,
|
|
4844
|
+
shape: PropTypes$1.string,
|
|
4845
|
+
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
4846
|
+
type: PropTypes$1.oneOf(['button', 'submit', 'reset']),
|
|
4847
|
+
variant: PropTypes$1.oneOf(['outline', 'ghost']),
|
|
4744
4848
|
};
|
|
4745
4849
|
CButton.displayName = 'CButton';
|
|
4746
4850
|
|
|
@@ -4749,8 +4853,8 @@ var CButtonToolbar = React$1.forwardRef(function (_a, ref) {
|
|
|
4749
4853
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('btn-toolbar', className) }, rest, { ref: ref }), children));
|
|
4750
4854
|
});
|
|
4751
4855
|
CButtonToolbar.propTypes = {
|
|
4752
|
-
children: PropTypes.node,
|
|
4753
|
-
className: PropTypes.string,
|
|
4856
|
+
children: PropTypes$1.node,
|
|
4857
|
+
className: PropTypes$1.string,
|
|
4754
4858
|
};
|
|
4755
4859
|
CButtonToolbar.displayName = 'CButtonToolbar';
|
|
4756
4860
|
|
|
@@ -4760,10 +4864,10 @@ var CButtonGroup = React$1.forwardRef(function (_a, ref) {
|
|
|
4760
4864
|
return (React$1.createElement("div", __assign$1({ className: classNames$1(vertical ? 'btn-group-vertical' : 'btn-group', (_b = {}, _b["btn-group-".concat(size)] = size, _b), className) }, rest, { ref: ref }), children));
|
|
4761
4865
|
});
|
|
4762
4866
|
CButtonGroup.propTypes = {
|
|
4763
|
-
children: PropTypes.node,
|
|
4764
|
-
className: PropTypes.string,
|
|
4765
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
4766
|
-
vertical: PropTypes.bool,
|
|
4867
|
+
children: PropTypes$1.node,
|
|
4868
|
+
className: PropTypes$1.string,
|
|
4869
|
+
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
4870
|
+
vertical: PropTypes$1.bool,
|
|
4767
4871
|
};
|
|
4768
4872
|
CButtonGroup.displayName = 'CButtonGroup';
|
|
4769
4873
|
|
|
@@ -4775,8 +4879,8 @@ var CCallout = React$1.forwardRef(function (_a, ref) {
|
|
|
4775
4879
|
_b), className) }, rest, { ref: ref }), children));
|
|
4776
4880
|
});
|
|
4777
4881
|
CCallout.propTypes = {
|
|
4778
|
-
children: PropTypes.node,
|
|
4779
|
-
className: PropTypes.string,
|
|
4882
|
+
children: PropTypes$1.node,
|
|
4883
|
+
className: PropTypes$1.string,
|
|
4780
4884
|
color: colorPropType,
|
|
4781
4885
|
};
|
|
4782
4886
|
CCallout.displayName = 'CCallout';
|
|
@@ -4790,10 +4894,10 @@ var CCard = React$1.forwardRef(function (_a, ref) {
|
|
|
4790
4894
|
_b), className) }, rest, { ref: ref }), children));
|
|
4791
4895
|
});
|
|
4792
4896
|
CCard.propTypes = {
|
|
4793
|
-
children: PropTypes.node,
|
|
4794
|
-
className: PropTypes.string,
|
|
4795
|
-
color: PropTypes.oneOfType([colorPropType, gradientsPropType]),
|
|
4796
|
-
textColor: PropTypes.string,
|
|
4897
|
+
children: PropTypes$1.node,
|
|
4898
|
+
className: PropTypes$1.string,
|
|
4899
|
+
color: PropTypes$1.oneOfType([colorPropType, gradientsPropType]),
|
|
4900
|
+
textColor: PropTypes$1.string,
|
|
4797
4901
|
};
|
|
4798
4902
|
CCard.displayName = 'CCard';
|
|
4799
4903
|
|
|
@@ -4802,8 +4906,8 @@ var CCardBody = React$1.forwardRef(function (_a, ref) {
|
|
|
4802
4906
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-body', className) }, rest, { ref: ref }), children));
|
|
4803
4907
|
});
|
|
4804
4908
|
CCardBody.propTypes = {
|
|
4805
|
-
children: PropTypes.node,
|
|
4806
|
-
className: PropTypes.string,
|
|
4909
|
+
children: PropTypes$1.node,
|
|
4910
|
+
className: PropTypes$1.string,
|
|
4807
4911
|
};
|
|
4808
4912
|
CCardBody.displayName = 'CCardBody';
|
|
4809
4913
|
|
|
@@ -4812,8 +4916,8 @@ var CCardFooter = React$1.forwardRef(function (_a, ref) {
|
|
|
4812
4916
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-footer', className) }, rest, { ref: ref }), children));
|
|
4813
4917
|
});
|
|
4814
4918
|
CCardFooter.propTypes = {
|
|
4815
|
-
children: PropTypes.node,
|
|
4816
|
-
className: PropTypes.string,
|
|
4919
|
+
children: PropTypes$1.node,
|
|
4920
|
+
className: PropTypes$1.string,
|
|
4817
4921
|
};
|
|
4818
4922
|
CCardFooter.displayName = 'CCardFooter';
|
|
4819
4923
|
|
|
@@ -4822,8 +4926,8 @@ var CCardGroup = React$1.forwardRef(function (_a, ref) {
|
|
|
4822
4926
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-group', className) }, rest, { ref: ref }), children));
|
|
4823
4927
|
});
|
|
4824
4928
|
CCardGroup.propTypes = {
|
|
4825
|
-
children: PropTypes.node,
|
|
4826
|
-
className: PropTypes.string,
|
|
4929
|
+
children: PropTypes$1.node,
|
|
4930
|
+
className: PropTypes$1.string,
|
|
4827
4931
|
};
|
|
4828
4932
|
CCardGroup.displayName = 'CCardGroup';
|
|
4829
4933
|
|
|
@@ -4832,9 +4936,9 @@ var CCardHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
4832
4936
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-header', className) }, rest, { ref: ref }), children));
|
|
4833
4937
|
});
|
|
4834
4938
|
CCardHeader.propTypes = {
|
|
4835
|
-
children: PropTypes.node,
|
|
4836
|
-
className: PropTypes.string,
|
|
4837
|
-
component: PropTypes.elementType,
|
|
4939
|
+
children: PropTypes$1.node,
|
|
4940
|
+
className: PropTypes$1.string,
|
|
4941
|
+
component: PropTypes$1.elementType,
|
|
4838
4942
|
};
|
|
4839
4943
|
CCardHeader.displayName = 'CCardHeader';
|
|
4840
4944
|
|
|
@@ -4843,10 +4947,10 @@ var CCardImage = React$1.forwardRef(function (_a, ref) {
|
|
|
4843
4947
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1(orientation ? "card-img-".concat(orientation) : 'card-img', className) }, rest, { ref: ref }), children));
|
|
4844
4948
|
});
|
|
4845
4949
|
CCardImage.propTypes = {
|
|
4846
|
-
children: PropTypes.node,
|
|
4847
|
-
className: PropTypes.string,
|
|
4848
|
-
component: PropTypes.elementType,
|
|
4849
|
-
orientation: PropTypes.oneOf(['top', 'bottom']),
|
|
4950
|
+
children: PropTypes$1.node,
|
|
4951
|
+
className: PropTypes$1.string,
|
|
4952
|
+
component: PropTypes$1.elementType,
|
|
4953
|
+
orientation: PropTypes$1.oneOf(['top', 'bottom']),
|
|
4850
4954
|
};
|
|
4851
4955
|
CCardImage.displayName = 'CCardImage';
|
|
4852
4956
|
|
|
@@ -4855,8 +4959,8 @@ var CCardImageOverlay = React$1.forwardRef(function (_a, ref) {
|
|
|
4855
4959
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-img-overlay', className) }, rest, { ref: ref }), children));
|
|
4856
4960
|
});
|
|
4857
4961
|
CCardImageOverlay.propTypes = {
|
|
4858
|
-
children: PropTypes.node,
|
|
4859
|
-
className: PropTypes.string,
|
|
4962
|
+
children: PropTypes$1.node,
|
|
4963
|
+
className: PropTypes$1.string,
|
|
4860
4964
|
};
|
|
4861
4965
|
CCardImageOverlay.displayName = 'CCardImageOverlay';
|
|
4862
4966
|
|
|
@@ -4865,8 +4969,8 @@ var CCardLink = React$1.forwardRef(function (_a, ref) {
|
|
|
4865
4969
|
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('card-link', className) }, rest, { ref: ref }), children));
|
|
4866
4970
|
});
|
|
4867
4971
|
CCardLink.propTypes = {
|
|
4868
|
-
children: PropTypes.node,
|
|
4869
|
-
className: PropTypes.string,
|
|
4972
|
+
children: PropTypes$1.node,
|
|
4973
|
+
className: PropTypes$1.string,
|
|
4870
4974
|
};
|
|
4871
4975
|
CCardLink.displayName = 'CCardLink';
|
|
4872
4976
|
|
|
@@ -4875,9 +4979,9 @@ var CCardSubtitle = React$1.forwardRef(function (_a, ref) {
|
|
|
4875
4979
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-subtitle', className) }, rest, { ref: ref }), children));
|
|
4876
4980
|
});
|
|
4877
4981
|
CCardSubtitle.propTypes = {
|
|
4878
|
-
children: PropTypes.node,
|
|
4879
|
-
className: PropTypes.string,
|
|
4880
|
-
component: PropTypes.elementType,
|
|
4982
|
+
children: PropTypes$1.node,
|
|
4983
|
+
className: PropTypes$1.string,
|
|
4984
|
+
component: PropTypes$1.elementType,
|
|
4881
4985
|
};
|
|
4882
4986
|
CCardSubtitle.displayName = 'CCardSubtitle';
|
|
4883
4987
|
|
|
@@ -4886,9 +4990,9 @@ var CCardText = React$1.forwardRef(function (_a, ref) {
|
|
|
4886
4990
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-text', className) }, rest, { ref: ref }), children));
|
|
4887
4991
|
});
|
|
4888
4992
|
CCardText.propTypes = {
|
|
4889
|
-
children: PropTypes.node,
|
|
4890
|
-
className: PropTypes.string,
|
|
4891
|
-
component: PropTypes.elementType,
|
|
4993
|
+
children: PropTypes$1.node,
|
|
4994
|
+
className: PropTypes$1.string,
|
|
4995
|
+
component: PropTypes$1.elementType,
|
|
4892
4996
|
};
|
|
4893
4997
|
CCardText.displayName = 'CCardText';
|
|
4894
4998
|
|
|
@@ -4897,58 +5001,12 @@ var CCardTitle = React$1.forwardRef(function (_a, ref) {
|
|
|
4897
5001
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-title', className) }, rest, { ref: ref }), children));
|
|
4898
5002
|
});
|
|
4899
5003
|
CCardTitle.propTypes = {
|
|
4900
|
-
children: PropTypes.node,
|
|
4901
|
-
className: PropTypes.string,
|
|
4902
|
-
component: PropTypes.elementType,
|
|
5004
|
+
children: PropTypes$1.node,
|
|
5005
|
+
className: PropTypes$1.string,
|
|
5006
|
+
component: PropTypes$1.elementType,
|
|
4903
5007
|
};
|
|
4904
5008
|
CCardTitle.displayName = 'CCardTitle';
|
|
4905
5009
|
|
|
4906
|
-
var isRTL = function (element) {
|
|
4907
|
-
if (typeof document !== 'undefined' && document.documentElement.dir === 'rtl') {
|
|
4908
|
-
return true;
|
|
4909
|
-
}
|
|
4910
|
-
if (element) {
|
|
4911
|
-
return element.closest('[dir="rtl"]') !== null;
|
|
4912
|
-
}
|
|
4913
|
-
return false;
|
|
4914
|
-
};
|
|
4915
|
-
|
|
4916
|
-
var getRTLPlacement = function (placement, element) {
|
|
4917
|
-
switch (placement) {
|
|
4918
|
-
case 'right': {
|
|
4919
|
-
return isRTL(element) ? 'left' : 'right';
|
|
4920
|
-
}
|
|
4921
|
-
case 'left': {
|
|
4922
|
-
return isRTL(element) ? 'right' : 'left';
|
|
4923
|
-
}
|
|
4924
|
-
default: {
|
|
4925
|
-
return placement;
|
|
4926
|
-
}
|
|
4927
|
-
}
|
|
4928
|
-
};
|
|
4929
|
-
|
|
4930
|
-
var isInViewport = function (element) {
|
|
4931
|
-
var rect = element.getBoundingClientRect();
|
|
4932
|
-
return (Math.floor(rect.top) >= 0 &&
|
|
4933
|
-
Math.floor(rect.left) >= 0 &&
|
|
4934
|
-
Math.floor(rect.bottom) <= (window.innerHeight || document.documentElement.clientHeight) &&
|
|
4935
|
-
Math.floor(rect.right) <= (window.innerWidth || document.documentElement.clientWidth));
|
|
4936
|
-
};
|
|
4937
|
-
|
|
4938
|
-
var isObjectInArray = function (array, item, ignore) {
|
|
4939
|
-
if (ignore === void 0) { ignore = []; }
|
|
4940
|
-
return array.some(function (_item) {
|
|
4941
|
-
var result = true;
|
|
4942
|
-
for (var key in item) {
|
|
4943
|
-
if (!ignore.includes(key) && item[key] !== _item[key]) {
|
|
4944
|
-
result = false;
|
|
4945
|
-
break;
|
|
4946
|
-
}
|
|
4947
|
-
}
|
|
4948
|
-
return result;
|
|
4949
|
-
});
|
|
4950
|
-
};
|
|
4951
|
-
|
|
4952
5010
|
var CCarouselContext = React$1.createContext({});
|
|
4953
5011
|
var CCarousel = React$1.forwardRef(function (_a, ref) {
|
|
4954
5012
|
var children = _a.children, _b = _a.activeIndex, activeIndex = _b === void 0 ? 0 : _b, className = _a.className, controls = _a.controls, dark = _a.dark, indicators = _a.indicators, _c = _a.interval, interval = _c === void 0 ? 5000 : _c, onSlid = _a.onSlid, onSlide = _a.onSlide, _d = _a.pause, pause = _d === void 0 ? 'hover' : _d, _e = _a.touch, touch = _e === void 0 ? true : _e, transition = _a.transition, _f = _a.wrap, wrap = _f === void 0 ? true : _f, rest = __rest$1(_a, ["children", "activeIndex", "className", "controls", "dark", "indicators", "interval", "onSlid", "onSlide", "pause", "touch", "transition", "wrap"]);
|
|
@@ -5053,17 +5111,18 @@ var CCarousel = React$1.forwardRef(function (_a, ref) {
|
|
|
5053
5111
|
setTouchPosition(touchDown);
|
|
5054
5112
|
};
|
|
5055
5113
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('carousel slide', {
|
|
5056
|
-
'carousel-dark': dark,
|
|
5057
5114
|
'carousel-fade': transition === 'crossfade',
|
|
5058
|
-
}, className), onMouseEnter: _pause, onMouseLeave: cycle }, (touch && { onTouchStart: handleTouchStart, onTouchMove: handleTouchMove }), rest, { ref: forkedRef }),
|
|
5115
|
+
}, className) }, (dark && { 'data-coreui-theme': 'dark' }), { onMouseEnter: _pause, onMouseLeave: cycle }, (touch && { onTouchStart: handleTouchStart, onTouchMove: handleTouchMove }), rest, { ref: forkedRef }),
|
|
5059
5116
|
React$1.createElement(CCarouselContext.Provider, { value: {
|
|
5060
5117
|
setAnimating: setAnimating,
|
|
5061
5118
|
setCustomInterval: setCustomInterval,
|
|
5062
5119
|
} },
|
|
5063
|
-
indicators && (React$1.createElement("
|
|
5064
|
-
return (React$1.createElement("
|
|
5120
|
+
indicators && (React$1.createElement("div", { className: "carousel-indicators" }, Array.from({ length: itemsNumber }, function (_, i) { return i; }).map(function (index) {
|
|
5121
|
+
return (React$1.createElement("button", __assign$1({ key: "indicator".concat(index), onClick: function () {
|
|
5065
5122
|
!animating && handleIndicatorClick(index);
|
|
5066
|
-
}, className:
|
|
5123
|
+
}, className: classNames$1({
|
|
5124
|
+
active: active === index
|
|
5125
|
+
}), "data-coreui-target": "" }, (active === index && { 'aria-current': true }), { "aria-label": "Slide ".concat(index + 1) })));
|
|
5067
5126
|
}))),
|
|
5068
5127
|
React$1.createElement("div", { className: "carousel-inner" }, React$1.Children.map(children, function (child, index) {
|
|
5069
5128
|
if (React$1.isValidElement(child)) {
|
|
@@ -5082,19 +5141,19 @@ var CCarousel = React$1.forwardRef(function (_a, ref) {
|
|
|
5082
5141
|
React$1.createElement("span", { className: "carousel-control-next-icon", "aria-label": "next" })))))));
|
|
5083
5142
|
});
|
|
5084
5143
|
CCarousel.propTypes = {
|
|
5085
|
-
activeIndex: PropTypes.number,
|
|
5086
|
-
children: PropTypes.node,
|
|
5087
|
-
className: PropTypes.string,
|
|
5088
|
-
controls: PropTypes.bool,
|
|
5089
|
-
dark: PropTypes.bool,
|
|
5090
|
-
indicators: PropTypes.bool,
|
|
5091
|
-
interval: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
|
|
5092
|
-
onSlid: PropTypes.func,
|
|
5093
|
-
onSlide: PropTypes.func,
|
|
5094
|
-
pause: PropTypes.oneOf([false, 'hover']),
|
|
5095
|
-
touch: PropTypes.bool,
|
|
5096
|
-
transition: PropTypes.oneOf(['slide', 'crossfade']),
|
|
5097
|
-
wrap: PropTypes.bool,
|
|
5144
|
+
activeIndex: PropTypes$1.number,
|
|
5145
|
+
children: PropTypes$1.node,
|
|
5146
|
+
className: PropTypes$1.string,
|
|
5147
|
+
controls: PropTypes$1.bool,
|
|
5148
|
+
dark: PropTypes$1.bool,
|
|
5149
|
+
indicators: PropTypes$1.bool,
|
|
5150
|
+
interval: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.number]),
|
|
5151
|
+
onSlid: PropTypes$1.func,
|
|
5152
|
+
onSlide: PropTypes$1.func,
|
|
5153
|
+
pause: PropTypes$1.oneOf([false, 'hover']),
|
|
5154
|
+
touch: PropTypes$1.bool,
|
|
5155
|
+
transition: PropTypes$1.oneOf(['slide', 'crossfade']),
|
|
5156
|
+
wrap: PropTypes$1.bool,
|
|
5098
5157
|
};
|
|
5099
5158
|
CCarousel.displayName = 'CCarousel';
|
|
5100
5159
|
|
|
@@ -5103,7 +5162,7 @@ var CCarouselCaption = React$1.forwardRef(function (_a, ref) {
|
|
|
5103
5162
|
return React$1.createElement("div", __assign$1({ className: classNames$1('carousel-caption', className) }, rest, { ref: ref }));
|
|
5104
5163
|
});
|
|
5105
5164
|
CCarouselCaption.propTypes = {
|
|
5106
|
-
className: PropTypes.string,
|
|
5165
|
+
className: PropTypes$1.string,
|
|
5107
5166
|
};
|
|
5108
5167
|
CCarouselCaption.displayName = 'CCarouselCaption';
|
|
5109
5168
|
|
|
@@ -5178,11 +5237,11 @@ var CCarouselItem = React$1.forwardRef(function (_a, ref) {
|
|
|
5178
5237
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('carousel-item', activeClassName, directionClassName, orderClassName, className), ref: forkedRef }, rest), children));
|
|
5179
5238
|
});
|
|
5180
5239
|
CCarouselItem.propTypes = {
|
|
5181
|
-
active: PropTypes.bool,
|
|
5182
|
-
children: PropTypes.node,
|
|
5183
|
-
className: PropTypes.string,
|
|
5184
|
-
direction: PropTypes.string,
|
|
5185
|
-
interval: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
|
|
5240
|
+
active: PropTypes$1.bool,
|
|
5241
|
+
children: PropTypes$1.node,
|
|
5242
|
+
className: PropTypes$1.string,
|
|
5243
|
+
direction: PropTypes$1.string,
|
|
5244
|
+
interval: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.number]),
|
|
5186
5245
|
};
|
|
5187
5246
|
CCarouselItem.displayName = 'CCarouselItem';
|
|
5188
5247
|
|
|
@@ -5191,8 +5250,8 @@ var CConditionalPortal = function (_a) {
|
|
|
5191
5250
|
return typeof window !== 'undefined' && portal ? (ReactDOM.createPortal(children, document.body)) : (React$1.createElement(React$1.Fragment, null, children));
|
|
5192
5251
|
};
|
|
5193
5252
|
CConditionalPortal.propTypes = {
|
|
5194
|
-
children: PropTypes.node,
|
|
5195
|
-
portal: PropTypes.bool.isRequired,
|
|
5253
|
+
children: PropTypes$1.node,
|
|
5254
|
+
portal: PropTypes$1.bool.isRequired,
|
|
5196
5255
|
};
|
|
5197
5256
|
CConditionalPortal.displayName = 'CConditionalPortal';
|
|
5198
5257
|
|
|
@@ -8490,12 +8549,60 @@ lib.useDeviceSelectors = useDeviceSelectors;
|
|
|
8490
8549
|
lib.useMobileOrientation = useMobileOrientation;
|
|
8491
8550
|
lib.withOrientationChange = withOrientationChange;
|
|
8492
8551
|
|
|
8552
|
+
var convertIsoWeekToDate = function (isoWeek) {
|
|
8553
|
+
var _a = isoWeek.split(/w/i), year = _a[0], week = _a[1];
|
|
8554
|
+
// Get date for 4th of January for year
|
|
8555
|
+
var date = new Date(Number(year), 0, 4);
|
|
8556
|
+
// Get previous Monday, add 7 days for each week after first
|
|
8557
|
+
date.setDate(date.getDate() - (date.getDay() || 7) + 1 + (Number(week) - 1) * 7);
|
|
8558
|
+
return date;
|
|
8559
|
+
};
|
|
8560
|
+
var convertToDateObject = function (date, selectionType) {
|
|
8561
|
+
// if (date === null) {
|
|
8562
|
+
// return null
|
|
8563
|
+
// }
|
|
8564
|
+
if (date instanceof Date) {
|
|
8565
|
+
return date;
|
|
8566
|
+
}
|
|
8567
|
+
if (selectionType === 'week') {
|
|
8568
|
+
return convertIsoWeekToDate(date);
|
|
8569
|
+
}
|
|
8570
|
+
return new Date(Date.parse(date));
|
|
8571
|
+
};
|
|
8493
8572
|
var createGroupsInArray = function (arr, numberOfGroups) {
|
|
8494
8573
|
var perGroup = Math.ceil(arr.length / numberOfGroups);
|
|
8495
8574
|
return Array.from({ length: numberOfGroups })
|
|
8496
8575
|
.fill('')
|
|
8497
8576
|
.map(function (_, i) { return arr.slice(i * perGroup, (i + 1) * perGroup); });
|
|
8498
8577
|
};
|
|
8578
|
+
var getCalendarDate = function (calendarDate, order, view) {
|
|
8579
|
+
if (order !== 0 && view === 'days') {
|
|
8580
|
+
return new Date(Date.UTC(calendarDate.getFullYear(), calendarDate.getMonth() + order, 1));
|
|
8581
|
+
}
|
|
8582
|
+
if (order !== 0 && view === 'months') {
|
|
8583
|
+
return new Date(Date.UTC(calendarDate.getFullYear() + order, calendarDate.getMonth(), 1));
|
|
8584
|
+
}
|
|
8585
|
+
if (order !== 0 && view === 'years') {
|
|
8586
|
+
return new Date(Date.UTC(calendarDate.getFullYear() + (12 * order), calendarDate.getMonth(), 1));
|
|
8587
|
+
}
|
|
8588
|
+
return calendarDate;
|
|
8589
|
+
};
|
|
8590
|
+
var getDateBySelectionType = function (date, selectionType) {
|
|
8591
|
+
if (date === null) {
|
|
8592
|
+
return null;
|
|
8593
|
+
}
|
|
8594
|
+
if (selectionType === 'week') {
|
|
8595
|
+
return "".concat(date.getFullYear(), "W").concat(getWeekNumber(date));
|
|
8596
|
+
}
|
|
8597
|
+
if (selectionType === 'month') {
|
|
8598
|
+
var monthNumber = "0".concat(date.getMonth() + 1).slice(-2);
|
|
8599
|
+
return "".concat(date.getFullYear(), "-").concat(monthNumber);
|
|
8600
|
+
}
|
|
8601
|
+
if (selectionType === 'year') {
|
|
8602
|
+
return "".concat(date.getFullYear());
|
|
8603
|
+
}
|
|
8604
|
+
return date;
|
|
8605
|
+
};
|
|
8499
8606
|
var getMonthsNames = function (locale) {
|
|
8500
8607
|
var months = [];
|
|
8501
8608
|
var d = new Date();
|
|
@@ -8555,6 +8662,11 @@ var getTrailingDays = function (year, month, leadingDays, monthDays) {
|
|
|
8555
8662
|
}
|
|
8556
8663
|
return dates;
|
|
8557
8664
|
};
|
|
8665
|
+
var getWeekNumber = function (date) {
|
|
8666
|
+
var week1 = new Date(date.getFullYear(), 0, 4);
|
|
8667
|
+
return (1 +
|
|
8668
|
+
Math.round(((date.getTime() - week1.getTime()) / 86400000 - 3 + ((week1.getDay() + 6) % 7)) / 7));
|
|
8669
|
+
};
|
|
8558
8670
|
var getMonthDetails = function (year, month, firstDayOfWeek) {
|
|
8559
8671
|
var daysPrevMonth = getLeadingDays(year, month, firstDayOfWeek);
|
|
8560
8672
|
var daysThisMonth = getMonthDays(year, month);
|
|
@@ -8563,9 +8675,14 @@ var getMonthDetails = function (year, month, firstDayOfWeek) {
|
|
|
8563
8675
|
var weeks = [];
|
|
8564
8676
|
days.forEach(function (day, index) {
|
|
8565
8677
|
if (index % 7 === 0 || weeks.length === 0) {
|
|
8566
|
-
weeks.push(
|
|
8678
|
+
weeks.push({
|
|
8679
|
+
days: [],
|
|
8680
|
+
});
|
|
8681
|
+
}
|
|
8682
|
+
if ((index + 1) % 7 === 0) {
|
|
8683
|
+
weeks[weeks.length - 1].weekNumber = getWeekNumber(day.date);
|
|
8567
8684
|
}
|
|
8568
|
-
weeks[weeks.length - 1].push(day);
|
|
8685
|
+
weeks[weeks.length - 1].days.push(day);
|
|
8569
8686
|
});
|
|
8570
8687
|
return weeks;
|
|
8571
8688
|
};
|
|
@@ -8610,15 +8727,6 @@ var isDateInRange = function (date, start, end) {
|
|
|
8610
8727
|
var isDateSelected = function (date, start, end) {
|
|
8611
8728
|
return (start && isSameDateAs(start, date)) || (end && isSameDateAs(end, date));
|
|
8612
8729
|
};
|
|
8613
|
-
var isEndDate = function (date, start, end) {
|
|
8614
|
-
return start && end && isSameDateAs(end, date) && start < end;
|
|
8615
|
-
};
|
|
8616
|
-
var isLastDayOfMonth = function (date) {
|
|
8617
|
-
var test = new Date(date.getTime());
|
|
8618
|
-
var month = test.getMonth();
|
|
8619
|
-
test.setDate(test.getDate() + 1);
|
|
8620
|
-
return test.getMonth() !== month;
|
|
8621
|
-
};
|
|
8622
8730
|
var isSameDateAs = function (date, date2) {
|
|
8623
8731
|
if (date instanceof Date && date2 instanceof Date) {
|
|
8624
8732
|
return (date.getDate() === date2.getDate() &&
|
|
@@ -8630,9 +8738,6 @@ var isSameDateAs = function (date, date2) {
|
|
|
8630
8738
|
}
|
|
8631
8739
|
return false;
|
|
8632
8740
|
};
|
|
8633
|
-
var isStartDate = function (date, start, end) {
|
|
8634
|
-
return start && end && isSameDateAs(start, date) && start < end;
|
|
8635
|
-
};
|
|
8636
8741
|
var isToday = function (date) {
|
|
8637
8742
|
var today = new Date();
|
|
8638
8743
|
return (date.getDate() === today.getDate() &&
|
|
@@ -8641,151 +8746,206 @@ var isToday = function (date) {
|
|
|
8641
8746
|
};
|
|
8642
8747
|
|
|
8643
8748
|
var Calendar = function (props) {
|
|
8644
|
-
var
|
|
8645
|
-
var _a = React$1.useState(
|
|
8646
|
-
var _b = React$1.useState([]), listOfMonths = _b[0], setListOfMonths = _b[1];
|
|
8647
|
-
React$1.useEffect(function () {
|
|
8648
|
-
if (addMonths !== 0) {
|
|
8649
|
-
setDate(new Date(calendarDate.getFullYear(), calendarDate.getMonth() + addMonths, 1));
|
|
8650
|
-
return;
|
|
8651
|
-
}
|
|
8652
|
-
setDate(calendarDate);
|
|
8653
|
-
}, [calendarDate]);
|
|
8749
|
+
var calendarDate = props.calendarDate, dayFormat = props.dayFormat, disabledDates = props.disabledDates, endDate = props.endDate, firstDayOfWeek = props.firstDayOfWeek, hoverDate = props.hoverDate, locale = props.locale, maxDate = props.maxDate, minDate = props.minDate, onCalendarClick = props.onCalendarClick, onCalendarKeyDown = props.onCalendarKeyDown, onCalendarMouseEnter = props.onCalendarMouseEnter, onCalendarMouseLeave = props.onCalendarMouseLeave, selectAdjacementDays = props.selectAdjacementDays, selectEndDate = props.selectEndDate, selectionType = props.selectionType, showWeekNumber = props.showWeekNumber, showAdjacementDays = props.showAdjacementDays, startDate = props.startDate, view = props.view, weekdayFormat = props.weekdayFormat, weekNumbersLabel = props.weekNumbersLabel;
|
|
8750
|
+
var _a = React$1.useState([]), listOfMonths = _a[0], setListOfMonths = _a[1];
|
|
8654
8751
|
React$1.useEffect(function () {
|
|
8655
8752
|
setListOfMonths(createGroupsInArray(getMonthsNames(locale), 4));
|
|
8656
8753
|
}, []);
|
|
8657
|
-
var monthDetails = getMonthDetails(
|
|
8658
|
-
var listOfYears = createGroupsInArray(getYears(
|
|
8659
|
-
var weekDays = monthDetails[0];
|
|
8754
|
+
var monthDetails = getMonthDetails(calendarDate.getFullYear(), calendarDate.getMonth(), firstDayOfWeek);
|
|
8755
|
+
var listOfYears = createGroupsInArray(getYears(calendarDate.getFullYear()), 4);
|
|
8756
|
+
var weekDays = monthDetails[0].days;
|
|
8660
8757
|
return (React$1.createElement("table", null,
|
|
8661
8758
|
view === 'days' && (React$1.createElement("thead", null,
|
|
8662
|
-
React$1.createElement("tr", null,
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8759
|
+
React$1.createElement("tr", null,
|
|
8760
|
+
showWeekNumber && (React$1.createElement("th", { className: "calendar-cell" },
|
|
8761
|
+
React$1.createElement("div", { className: "calendar-header-cell-inner" }, weekNumbersLabel))),
|
|
8762
|
+
weekDays.map(function (_a, idx) {
|
|
8763
|
+
var date = _a.date;
|
|
8764
|
+
return (React$1.createElement("th", { key: idx, className: "calendar-cell" },
|
|
8765
|
+
React$1.createElement("div", { className: "calendar-header-cell-inner" }, typeof weekdayFormat === 'function'
|
|
8766
|
+
? weekdayFormat(date)
|
|
8767
|
+
: typeof weekdayFormat === 'string'
|
|
8768
|
+
? date.toLocaleDateString(locale, { weekday: weekdayFormat })
|
|
8769
|
+
: date.toLocaleDateString(locale, { weekday: 'long' }).slice(0, weekdayFormat))));
|
|
8770
|
+
})))),
|
|
8671
8771
|
React$1.createElement("tbody", null,
|
|
8672
8772
|
view === 'days' &&
|
|
8673
8773
|
monthDetails.map(function (week, index) {
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8774
|
+
var date = convertToDateObject(week.weekNumber === 0
|
|
8775
|
+
? "".concat(calendarDate.getFullYear(), "W53")
|
|
8776
|
+
: "".concat(calendarDate.getFullYear(), "W").concat(week.weekNumber), selectionType);
|
|
8777
|
+
var isDisabled = isDateDisabled(date, minDate, maxDate, disabledDates);
|
|
8778
|
+
return (React$1.createElement("tr", __assign$1({ className: classNames$1('calendar-row', {
|
|
8779
|
+
disabled: isDisabled,
|
|
8780
|
+
range: selectionType === 'week' && isDateInRange(date, startDate, endDate),
|
|
8781
|
+
'range-hover': selectionType === 'week' && hoverDate && selectEndDate
|
|
8782
|
+
? isDateInRange(date, startDate, hoverDate)
|
|
8783
|
+
: isDateInRange(date, hoverDate, endDate),
|
|
8784
|
+
selected: isDateSelected(date, startDate, endDate),
|
|
8785
|
+
}), key: index, tabIndex: selectionType === 'week' && !isDisabled ? 0 : -1 }, (selectionType === 'week' &&
|
|
8786
|
+
!isDisabled && {
|
|
8787
|
+
onBlur: function () { return onCalendarMouseLeave(); },
|
|
8788
|
+
onClick: function () { return onCalendarClick(date); },
|
|
8789
|
+
onFocus: function () { return onCalendarMouseEnter(date); },
|
|
8790
|
+
onKeyDown: function (event) { return onCalendarKeyDown(event, date); },
|
|
8791
|
+
onMouseEnter: function () { return onCalendarMouseEnter(date); },
|
|
8792
|
+
onMouseLeave: function () { return onCalendarMouseLeave(); },
|
|
8793
|
+
})),
|
|
8794
|
+
showWeekNumber && (React$1.createElement("th", { className: "calendar-cell-week-number" }, week.weekNumber === 0 ? 53 : week.weekNumber)),
|
|
8795
|
+
week.days.map(function (_a, idx) {
|
|
8796
|
+
var _b;
|
|
8797
|
+
var date = _a.date, month = _a.month;
|
|
8798
|
+
var isDisabled = isDateDisabled(date, minDate, maxDate, disabledDates);
|
|
8799
|
+
return month === 'current' || showAdjacementDays ? (React$1.createElement("td", __assign$1({ className: classNames$1('calendar-cell', __assign$1(__assign$1({}, (selectionType === 'day' && {
|
|
8800
|
+
clickable: month !== 'current' && selectAdjacementDays,
|
|
8801
|
+
disabled: isDisabled,
|
|
8802
|
+
'range-hover': month === 'current' &&
|
|
8803
|
+
(hoverDate && selectEndDate
|
|
8804
|
+
? isDateInRange(date, startDate, hoverDate)
|
|
8805
|
+
: isDateInRange(date, hoverDate, endDate)),
|
|
8806
|
+
range: month === 'current' && isDateInRange(date, startDate, endDate),
|
|
8807
|
+
selected: isDateSelected(date, startDate, endDate),
|
|
8808
|
+
})), (_b = {}, _b[month] = true, _b.today = month === 'current' && isToday(date), _b))), key: idx, tabIndex: selectionType === 'day' &&
|
|
8809
|
+
(month === 'current' || selectAdjacementDays) &&
|
|
8810
|
+
!isDisabled
|
|
8811
|
+
? 0
|
|
8812
|
+
: -1, title: date.toLocaleDateString(locale) }, (selectionType === 'day' &&
|
|
8813
|
+
(month === 'current' || selectAdjacementDays) && {
|
|
8814
|
+
onBlur: function () { return onCalendarMouseLeave(); },
|
|
8815
|
+
onClick: function () { return onCalendarClick(date); },
|
|
8816
|
+
onFocus: function () { return onCalendarMouseEnter(date); },
|
|
8817
|
+
onKeyDown: function (event) { return onCalendarKeyDown(event, date); },
|
|
8818
|
+
onMouseEnter: function () { return onCalendarMouseEnter(date); },
|
|
8819
|
+
onMouseLeave: function () { return onCalendarMouseLeave(); },
|
|
8820
|
+
}), (month !== 'current' &&
|
|
8821
|
+
!selectAdjacementDays && {
|
|
8822
|
+
onMouseEnter: function () { return onCalendarMouseLeave(); },
|
|
8823
|
+
})),
|
|
8824
|
+
React$1.createElement("div", { className: "calendar-cell-inner" }, typeof dayFormat === 'function'
|
|
8825
|
+
? dayFormat(date)
|
|
8826
|
+
: date.toLocaleDateString(locale, { day: dayFormat })))) : (React$1.createElement("td", { key: idx }));
|
|
8827
|
+
})));
|
|
8710
8828
|
}),
|
|
8711
8829
|
view === 'months' &&
|
|
8712
8830
|
listOfMonths.map(function (row, index) {
|
|
8713
8831
|
return (React$1.createElement("tr", { key: index }, row.map(function (month, idx) {
|
|
8714
|
-
|
|
8832
|
+
var monthNumber = index * 3 + idx;
|
|
8833
|
+
var date = new Date(Date.UTC(calendarDate.getFullYear(), monthNumber, 1));
|
|
8834
|
+
var isDisabled = isDateDisabled(date, minDate, maxDate, disabledDates);
|
|
8835
|
+
return (React$1.createElement("td", __assign$1({ className: classNames$1('calendar-cell', {
|
|
8836
|
+
disabled: isDisabled,
|
|
8837
|
+
selected: isDateSelected(date, startDate, endDate),
|
|
8838
|
+
'range-hover': selectionType === 'month' &&
|
|
8839
|
+
(hoverDate && selectEndDate
|
|
8840
|
+
? isDateInRange(date, startDate, hoverDate)
|
|
8841
|
+
: isDateInRange(date, hoverDate, endDate)),
|
|
8842
|
+
range: isDateInRange(date, startDate, endDate),
|
|
8843
|
+
}), key: idx, tabIndex: !isDisabled ? 0 : -1 }, (!isDisabled && {
|
|
8844
|
+
onBlur: function () { return onCalendarMouseLeave(); },
|
|
8845
|
+
onClick: function () { return onCalendarClick(date); },
|
|
8846
|
+
onFocus: function () { return onCalendarMouseEnter(date); },
|
|
8847
|
+
onKeyDown: function (event) { return onCalendarKeyDown(event, date); },
|
|
8848
|
+
onMouseEnter: function () { return onCalendarMouseEnter(date); },
|
|
8849
|
+
onMouseLeave: function () { return onCalendarMouseLeave(); },
|
|
8850
|
+
})),
|
|
8715
8851
|
React$1.createElement("div", { className: "calendar-cell-inner" }, month)));
|
|
8716
8852
|
})));
|
|
8717
8853
|
}),
|
|
8718
8854
|
view === 'years' &&
|
|
8719
8855
|
listOfYears.map(function (row, index) {
|
|
8720
8856
|
return (React$1.createElement("tr", { key: index }, row.map(function (year, idx) {
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8857
|
+
var date = new Date(Date.UTC(year, 0, 1));
|
|
8858
|
+
var isDisabled = isDateDisabled(date, minDate, maxDate, disabledDates);
|
|
8859
|
+
return (React$1.createElement("td", __assign$1({ className: classNames$1('calendar-cell year', {
|
|
8860
|
+
disabled: isDisabled,
|
|
8861
|
+
selected: isDateSelected(date, startDate, endDate),
|
|
8862
|
+
'range-hover': selectionType === 'year' &&
|
|
8863
|
+
(hoverDate && selectEndDate
|
|
8864
|
+
? isDateInRange(date, startDate, hoverDate)
|
|
8865
|
+
: isDateInRange(date, hoverDate, endDate)),
|
|
8866
|
+
range: isDateInRange(date, startDate, endDate),
|
|
8867
|
+
}), key: idx, tabIndex: !isDisabled ? 0 : -1 }, (!isDisabled && {
|
|
8868
|
+
onBlur: function () { return onCalendarMouseLeave(); },
|
|
8869
|
+
onClick: function () { return onCalendarClick(date); },
|
|
8870
|
+
onFocus: function () { return onCalendarMouseEnter(date); },
|
|
8871
|
+
onKeyDown: function (event) { return onCalendarKeyDown(event, date); },
|
|
8872
|
+
onMouseEnter: function () { return onCalendarMouseEnter(date); },
|
|
8873
|
+
onMouseLeave: function () { return onCalendarMouseLeave(); },
|
|
8874
|
+
})),
|
|
8726
8875
|
React$1.createElement("div", { className: "calendar-cell-inner" }, new Date(year, 0, 1).toLocaleDateString(locale, { year: 'numeric' }))));
|
|
8727
8876
|
})));
|
|
8728
8877
|
}))));
|
|
8729
8878
|
};
|
|
8730
8879
|
var Navigation = function (props) {
|
|
8731
|
-
var
|
|
8732
|
-
var _a = React$1.useState(), date = _a[0], setDate = _a[1];
|
|
8733
|
-
React$1.useEffect(function () {
|
|
8734
|
-
if (addMonths !== 0) {
|
|
8735
|
-
setDate(new Date(calendarDate.getFullYear(), calendarDate.getMonth() + addMonths, 1));
|
|
8736
|
-
return;
|
|
8737
|
-
}
|
|
8738
|
-
setDate(calendarDate);
|
|
8739
|
-
}, [calendarDate]);
|
|
8880
|
+
var calendarDate = props.calendarDate, locale = props.locale, navigation = props.navigation, navNextDoubleIcon = props.navNextDoubleIcon, navNextIcon = props.navNextIcon, navPrevDoubleIcon = props.navPrevDoubleIcon, navPrevIcon = props.navPrevIcon, navYearFirst = props.navYearFirst, onMonthClick = props.onMonthClick, onNavigationClick = props.onNavigationClick, onYearClick = props.onYearClick, view = props.view;
|
|
8740
8881
|
return (React$1.createElement("div", { className: "calendar-nav" },
|
|
8741
8882
|
navigation && (React$1.createElement("div", { className: "calendar-nav-prev" },
|
|
8742
8883
|
React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return onNavigationClick('prev', true); } }, navPrevDoubleIcon !== null && navPrevDoubleIcon !== void 0 ? navPrevDoubleIcon : (React$1.createElement("span", { className: "calendar-nav-icon calendar-nav-icon-double-prev" }))),
|
|
8743
8884
|
view === 'days' && (React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return onNavigationClick('prev'); } }, navPrevIcon !== null && navPrevIcon !== void 0 ? navPrevIcon : React$1.createElement("span", { className: "calendar-nav-icon calendar-nav-icon-prev" }))))),
|
|
8744
8885
|
React$1.createElement("div", __assign$1({ className: "calendar-nav-date" }, (navYearFirst && { style: { display: 'flex', justifyContent: 'center' } })),
|
|
8745
|
-
view === 'days' && (React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return navigation && onMonthClick(); } },
|
|
8746
|
-
React$1.createElement(CButton, __assign$1({ color: "transparent", size: "sm", onClick: function () { return navigation && onYearClick(); } }, (navYearFirst && { style: { order: '-1' } })),
|
|
8886
|
+
view === 'days' && (React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return navigation && onMonthClick(); } }, calendarDate && calendarDate.toLocaleDateString(locale, { month: 'long' }))),
|
|
8887
|
+
React$1.createElement(CButton, __assign$1({ color: "transparent", size: "sm", onClick: function () { return navigation && onYearClick(); } }, (navYearFirst && { style: { order: '-1' } })), calendarDate && calendarDate.toLocaleDateString(locale, { year: 'numeric' }))),
|
|
8747
8888
|
navigation && (React$1.createElement("div", { className: "calendar-nav-next" },
|
|
8748
8889
|
view === 'days' && (React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return onNavigationClick('next'); } }, navNextIcon !== null && navNextIcon !== void 0 ? navNextIcon : React$1.createElement("span", { className: "calendar-nav-icon calendar-nav-icon-next" }))),
|
|
8749
8890
|
React$1.createElement(CButton, { color: "transparent", size: "sm", onClick: function () { return onNavigationClick('next', true); } }, navNextDoubleIcon !== null && navNextDoubleIcon !== void 0 ? navNextDoubleIcon : (React$1.createElement("span", { className: "calendar-nav-icon calendar-nav-icon-double-next" })))))));
|
|
8750
8891
|
};
|
|
8751
8892
|
var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
8752
|
-
var
|
|
8893
|
+
var _b;
|
|
8894
|
+
var startDate = _a.startDate, endDate = _a.endDate, _c = _a.calendarDate, calendarDate = _c === void 0 ? startDate || endDate || null : _c, _d = _a.calendars, calendars = _d === void 0 ? 1 : _d, className = _a.className, _e = _a.dayFormat, dayFormat = _e === void 0 ? 'numeric' : _e, disabledDates = _a.disabledDates, _f = _a.firstDayOfWeek, firstDayOfWeek = _f === void 0 ? 1 : _f, _g = _a.locale, locale = _g === void 0 ? 'default' : _g, maxDate = _a.maxDate, minDate = _a.minDate, _h = _a.navigation, navigation = _h === void 0 ? true : _h, navNextIcon = _a.navNextIcon, navNextDoubleIcon = _a.navNextDoubleIcon, navPrevIcon = _a.navPrevIcon, navPrevDoubleIcon = _a.navPrevDoubleIcon, navYearFirst = _a.navYearFirst, range = _a.range, _j = _a.selectAdjacementDays, selectAdjacementDays = _j === void 0 ? false : _j, selectEndDate = _a.selectEndDate, _k = _a.selectionType, selectionType = _k === void 0 ? 'day' : _k, _l = _a.showAdjacementDays, showAdjacementDays = _l === void 0 ? true : _l, _m = _a.showWeekNumber, showWeekNumber = _m === void 0 ? false : _m, _o = _a.weekdayFormat, weekdayFormat = _o === void 0 ? 2 : _o, weekNumbersLabel = _a.weekNumbersLabel, onCalendarDateChange = _a.onCalendarDateChange, onDateHover = _a.onDateHover, onEndDateChange = _a.onEndDateChange, onStartDateChange = _a.onStartDateChange, onSelectEndChange = _a.onSelectEndChange, onViewChanged = _a.onViewChanged;
|
|
8895
|
+
var calendarRef = React$1.useRef(null);
|
|
8896
|
+
var forkedRef = useForkedRef(ref, calendarRef);
|
|
8753
8897
|
var isInitialMount = React$1.useRef(true);
|
|
8754
|
-
var
|
|
8898
|
+
var _p = React$1.useState(null), _calendarDate = _p[0], setCalendarDate = _p[1];
|
|
8899
|
+
React$1.useEffect(function () {
|
|
8900
|
+
if (selectionType === 'day' || selectionType === 'week') {
|
|
8901
|
+
setView('days');
|
|
8902
|
+
return;
|
|
8903
|
+
}
|
|
8904
|
+
if (selectionType === 'month') {
|
|
8905
|
+
setView('months');
|
|
8906
|
+
return;
|
|
8907
|
+
}
|
|
8908
|
+
if (selectionType === 'year') {
|
|
8909
|
+
setView('years');
|
|
8910
|
+
return;
|
|
8911
|
+
}
|
|
8912
|
+
}, [selectionType]);
|
|
8755
8913
|
React$1.useEffect(function () {
|
|
8756
8914
|
if (calendarDate === null) {
|
|
8757
8915
|
setCalendarDate(new Date());
|
|
8758
8916
|
return;
|
|
8759
8917
|
}
|
|
8760
8918
|
if (calendarDate) {
|
|
8761
|
-
var date =
|
|
8919
|
+
var date = convertToDateObject(calendarDate, selectionType);
|
|
8762
8920
|
!isSameDateAs(_calendarDate, date) && setCalendarDate(date);
|
|
8763
8921
|
}
|
|
8764
8922
|
}, [calendarDate]);
|
|
8765
|
-
var
|
|
8923
|
+
var _q = useStateWithCallback(startDate ? convertToDateObject(startDate, selectionType) : null, function () {
|
|
8924
|
+
return onStartDateChange && onStartDateChange(getDateBySelectionType(_startDate, selectionType));
|
|
8925
|
+
}, !isInitialMount.current), _startDate = _q[0], setStartDate = _q[1];
|
|
8766
8926
|
React$1.useEffect(function () {
|
|
8767
|
-
var date = startDate ?
|
|
8927
|
+
var date = startDate ? convertToDateObject(startDate, selectionType) : null;
|
|
8768
8928
|
if (!isSameDateAs(date, _startDate)) {
|
|
8769
8929
|
setStartDate(date);
|
|
8770
8930
|
}
|
|
8771
8931
|
}, [startDate]);
|
|
8772
|
-
var
|
|
8932
|
+
var _r = useStateWithCallback(endDate ? convertToDateObject(endDate, selectionType) : null, function () { return onEndDateChange && onEndDateChange(getDateBySelectionType(_endDate, selectionType)); }, !isInitialMount.current), _endDate = _r[0], setEndDate = _r[1];
|
|
8773
8933
|
React$1.useEffect(function () {
|
|
8774
|
-
var date = endDate ?
|
|
8934
|
+
var date = endDate ? convertToDateObject(endDate, selectionType) : null;
|
|
8775
8935
|
if (!isSameDateAs(date, _endDate)) {
|
|
8776
8936
|
setEndDate(date);
|
|
8777
8937
|
}
|
|
8778
8938
|
}, [endDate]);
|
|
8779
|
-
var
|
|
8780
|
-
var
|
|
8939
|
+
var _s = React$1.useState(null), _hoverDate = _s[0], setHoverDate = _s[1];
|
|
8940
|
+
var _t = React$1.useState(maxDate ? convertToDateObject(maxDate, selectionType) : null), _maxDate = _t[0], setMaxDate = _t[1];
|
|
8781
8941
|
React$1.useEffect(function () {
|
|
8782
|
-
maxDate && setMaxDate(
|
|
8942
|
+
maxDate && setMaxDate(convertToDateObject(maxDate, selectionType));
|
|
8783
8943
|
}, [maxDate]);
|
|
8784
|
-
var
|
|
8944
|
+
var _u = React$1.useState(minDate ? convertToDateObject(minDate, selectionType) : null), _minDate = _u[0], setMinDate = _u[1];
|
|
8785
8945
|
React$1.useEffect(function () {
|
|
8786
|
-
minDate && setMinDate(
|
|
8946
|
+
minDate && setMinDate(convertToDateObject(minDate, selectionType));
|
|
8787
8947
|
}, [minDate]);
|
|
8788
|
-
var
|
|
8948
|
+
var _v = useStateWithCallback(selectEndDate, onSelectEndChange), _selectEndDate = _v[0], setSelectEndDate = _v[1];
|
|
8789
8949
|
React$1.useEffect(function () {
|
|
8790
8950
|
setSelectEndDate(selectEndDate);
|
|
8791
8951
|
}, [selectEndDate]);
|
|
@@ -8795,7 +8955,7 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
8795
8955
|
onSelectEndChange &&
|
|
8796
8956
|
onSelectEndChange(_selectEndDate);
|
|
8797
8957
|
}, [_selectEndDate]);
|
|
8798
|
-
var
|
|
8958
|
+
var _w = useStateWithCallback('days', onViewChanged), view = _w[0], setView = _w[1];
|
|
8799
8959
|
React$1.useEffect(function () {
|
|
8800
8960
|
isInitialMount.current = false;
|
|
8801
8961
|
}, []);
|
|
@@ -8813,12 +8973,24 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
8813
8973
|
setCalendarDate(d);
|
|
8814
8974
|
onCalendarDateChange && onCalendarDateChange(d);
|
|
8815
8975
|
};
|
|
8816
|
-
var
|
|
8976
|
+
var handleCalendarClick = function (date, index) {
|
|
8817
8977
|
if (isDateDisabled(date, _minDate, _maxDate, disabledDates)) {
|
|
8818
8978
|
return;
|
|
8819
8979
|
}
|
|
8820
8980
|
var _date = new Date(date);
|
|
8821
|
-
|
|
8981
|
+
if (view === 'days') {
|
|
8982
|
+
setCalendarDate(index ? new Date(_date.setMonth(_date.getMonth() - index)) : _date);
|
|
8983
|
+
}
|
|
8984
|
+
if (view === 'months' && selectionType !== 'month') {
|
|
8985
|
+
setCalendarDate(index ? new Date(_date.setMonth(_date.getMonth() - index)) : _date);
|
|
8986
|
+
setView('days');
|
|
8987
|
+
return;
|
|
8988
|
+
}
|
|
8989
|
+
if (view === 'years' && selectionType !== 'year') {
|
|
8990
|
+
setCalendarDate(index ? new Date(_date.setFullYear(_date.getFullYear() - index)) : _date);
|
|
8991
|
+
setView('months');
|
|
8992
|
+
return;
|
|
8993
|
+
}
|
|
8822
8994
|
if (range) {
|
|
8823
8995
|
if (_selectEndDate) {
|
|
8824
8996
|
setSelectEndDate(false);
|
|
@@ -8851,31 +9023,88 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
8851
9023
|
}
|
|
8852
9024
|
setStartDate(date);
|
|
8853
9025
|
};
|
|
8854
|
-
var
|
|
9026
|
+
var handleCalendarKeyDown = function (event, date, index) {
|
|
8855
9027
|
if (event.code === 'Space' || event.key === 'Enter') {
|
|
8856
9028
|
event.preventDefault();
|
|
8857
|
-
|
|
9029
|
+
handleCalendarClick(date, index);
|
|
9030
|
+
}
|
|
9031
|
+
if (event.key === 'ArrowRight' ||
|
|
9032
|
+
event.key === 'ArrowLeft' ||
|
|
9033
|
+
event.key === 'ArrowUp' ||
|
|
9034
|
+
event.key === 'ArrowDown') {
|
|
9035
|
+
event.preventDefault();
|
|
9036
|
+
if (maxDate &&
|
|
9037
|
+
date >= convertToDateObject(maxDate, selectionType) &&
|
|
9038
|
+
(event.key === 'ArrowRight' || event.key === 'ArrowDown')) {
|
|
9039
|
+
return;
|
|
9040
|
+
}
|
|
9041
|
+
if (minDate &&
|
|
9042
|
+
date <= convertToDateObject(minDate, selectionType) &&
|
|
9043
|
+
(event.key === 'ArrowLeft' || event.key === 'ArrowUp')) {
|
|
9044
|
+
return;
|
|
9045
|
+
}
|
|
9046
|
+
var element_1 = event.target;
|
|
9047
|
+
if (selectionType === 'week' && element_1.tabIndex === -1) {
|
|
9048
|
+
element_1 = element_1.closest('tr[tabindex="0"]');
|
|
9049
|
+
}
|
|
9050
|
+
var list_1 = [].concat.apply([], Element.prototype.querySelectorAll.call(calendarRef.current, 'td[tabindex="0"], tr[tabindex="0"]'));
|
|
9051
|
+
var index_1 = list_1.indexOf(element_1);
|
|
9052
|
+
var first = index_1 === 0;
|
|
9053
|
+
var last = index_1 === list_1.length - 1;
|
|
9054
|
+
var toBoundary = {
|
|
9055
|
+
start: index_1,
|
|
9056
|
+
end: list_1.length - (index_1 + 1),
|
|
9057
|
+
};
|
|
9058
|
+
var gap_1 = {
|
|
9059
|
+
ArrowRight: 1,
|
|
9060
|
+
ArrowLeft: -1,
|
|
9061
|
+
ArrowUp: selectionType === 'week' && view === 'days' ? -1 : view === 'days' ? -7 : -3,
|
|
9062
|
+
ArrowDown: selectionType === 'week' && view === 'days' ? 1 : view === 'days' ? 7 : 3,
|
|
9063
|
+
};
|
|
9064
|
+
if ((event.key === 'ArrowRight' && last) ||
|
|
9065
|
+
(event.key === 'ArrowDown' && toBoundary['end'] < gap_1['ArrowDown']) ||
|
|
9066
|
+
(event.key === 'ArrowLeft' && first) ||
|
|
9067
|
+
(event.key === 'ArrowUp' && toBoundary['start'] < Math.abs(gap_1['ArrowUp']))) {
|
|
9068
|
+
if (view === 'days') {
|
|
9069
|
+
setCalendarPage(0, event.key === 'ArrowRight' || event.key === 'ArrowDown' ? 1 : -1);
|
|
9070
|
+
}
|
|
9071
|
+
if (view === 'months') {
|
|
9072
|
+
setCalendarPage(event.key === 'ArrowRight' || event.key === 'ArrowDown' ? 1 : -1);
|
|
9073
|
+
}
|
|
9074
|
+
if (view === 'years') {
|
|
9075
|
+
setCalendarPage(event.key === 'ArrowRight' || event.key === 'ArrowDown' ? 10 : -10);
|
|
9076
|
+
}
|
|
9077
|
+
setTimeout(function () {
|
|
9078
|
+
var _a;
|
|
9079
|
+
var _list = [].concat.apply([], Element.prototype.querySelectorAll.call((_a = element_1.parentNode) === null || _a === void 0 ? void 0 : _a.parentNode, 'td[tabindex="0"], tr[tabindex="0"]'));
|
|
9080
|
+
if (_list.length && event.key === 'ArrowRight') {
|
|
9081
|
+
_list[0].focus();
|
|
9082
|
+
}
|
|
9083
|
+
if (_list.length && event.key === 'ArrowLeft') {
|
|
9084
|
+
_list[_list.length - 1].focus();
|
|
9085
|
+
}
|
|
9086
|
+
if (_list.length && event.key === 'ArrowDown') {
|
|
9087
|
+
_list[gap_1['ArrowDown'] - (list_1.length - index_1)].focus();
|
|
9088
|
+
}
|
|
9089
|
+
if (_list.length && event.key === 'ArrowUp') {
|
|
9090
|
+
_list[_list.length - (Math.abs(gap_1['ArrowUp']) + 1 - (index_1 + 1))].focus();
|
|
9091
|
+
}
|
|
9092
|
+
}, 1);
|
|
9093
|
+
return;
|
|
9094
|
+
}
|
|
9095
|
+
list_1[index_1 + gap_1[event.key]].focus();
|
|
8858
9096
|
}
|
|
8859
9097
|
};
|
|
8860
|
-
var
|
|
9098
|
+
var handleCalendarMouseEnter = function (date) {
|
|
8861
9099
|
if (isDateDisabled(date, _minDate, _maxDate, disabledDates)) {
|
|
8862
9100
|
return;
|
|
8863
9101
|
}
|
|
8864
9102
|
setHoverDate(date);
|
|
8865
|
-
|
|
9103
|
+
date && onDateHover && onDateHover(getDateBySelectionType(date, selectionType));
|
|
8866
9104
|
};
|
|
8867
|
-
var
|
|
9105
|
+
var handleCalendarMouseLeave = function () {
|
|
8868
9106
|
setHoverDate(null);
|
|
8869
|
-
|
|
8870
|
-
};
|
|
8871
|
-
var handleMonthClick = function (month) {
|
|
8872
|
-
setCalendarPage(0, 0, month);
|
|
8873
|
-
setView('days');
|
|
8874
|
-
};
|
|
8875
|
-
var handleMonthKeyDown = function (event, month) {
|
|
8876
|
-
if (event.code === 'Space' || event.key === 'Enter') {
|
|
8877
|
-
handleMonthClick(month);
|
|
8878
|
-
}
|
|
9107
|
+
onDateHover && onDateHover(null);
|
|
8879
9108
|
};
|
|
8880
9109
|
var handleNavigationOnClick = function (direction, double) {
|
|
8881
9110
|
if (double === void 0) { double = false; }
|
|
@@ -8904,56 +9133,56 @@ var CCalendar = React$1.forwardRef(function (_a, ref) {
|
|
|
8904
9133
|
return;
|
|
8905
9134
|
}
|
|
8906
9135
|
};
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
Array.from({ length: calendars }, function (_, index) { return (React$1.createElement("div", { className: classNames$1('calendar', view), key: index, ref: ref },
|
|
8918
|
-
React$1.createElement(Navigation, { addMonths: index, calendarDate: _calendarDate, locale: locale, navigation: navigation, navNextDoubleIcon: navNextDoubleIcon, navNextIcon: navNextIcon, navPrevDoubleIcon: navPrevDoubleIcon, navPrevIcon: navPrevIcon, navYearFirst: navYearFirst, onMonthClick: function () { return setView('months'); }, onNavigationClick: handleNavigationOnClick, onYearClick: function () { return setView('years'); }, view: view }),
|
|
8919
|
-
React$1.createElement(Calendar, { addMonths: index, calendarDate: _calendarDate, dayFormat: dayFormat, disabledDates: disabledDates, endDate: _endDate, firstDayOfWeek: firstDayOfWeek, hoverDate: _hoverDate, locale: locale, maxDate: _maxDate, minDate: _minDate, onDayClick: function (date) { return handleDayClick(date, index); }, onDayKeyDown: function (event, date) { return handleDayKeyDown(event, date, index); }, onDayMouseEnter: handleDayMouseEnter, onDayMouseLeave: handleDayMouseLeave, onMonthClick: handleMonthClick, onMonthKeyDown: handleMonthKeyDown, onYearClick: handleYearClick, onYearKeyDown: handleYearKeyDown, selectEndDate: _selectEndDate, selectAdjacementDays: selectAdjacementDays, showAdjacementDays: showAdjacementDays, startDate: _startDate, view: view, weekdayFormat: weekdayFormat }))); })));
|
|
9136
|
+
return (React$1.createElement("div", { className: classNames$1('calendars', (_b = {},
|
|
9137
|
+
_b["select-".concat(selectionType)] = selectionType && view === 'days',
|
|
9138
|
+
_b['show-week-numbers'] = showWeekNumber,
|
|
9139
|
+
_b), className), ref: forkedRef }, _calendarDate &&
|
|
9140
|
+
Array.from({ length: calendars }, function (_, index) {
|
|
9141
|
+
var calendarDate = getCalendarDate(_calendarDate, index, view);
|
|
9142
|
+
return (React$1.createElement("div", { className: classNames$1('calendar', view), key: index },
|
|
9143
|
+
React$1.createElement(Navigation, { calendarDate: calendarDate, locale: locale, navigation: navigation, navNextDoubleIcon: navNextDoubleIcon, navNextIcon: navNextIcon, navPrevDoubleIcon: navPrevDoubleIcon, navPrevIcon: navPrevIcon, navYearFirst: navYearFirst, onMonthClick: function () { return setView('months'); }, onNavigationClick: handleNavigationOnClick, onYearClick: function () { return setView('years'); }, view: view }),
|
|
9144
|
+
React$1.createElement(Calendar, { calendarDate: calendarDate, dayFormat: dayFormat, disabledDates: disabledDates, endDate: _endDate, firstDayOfWeek: firstDayOfWeek, hoverDate: _hoverDate, locale: locale, maxDate: _maxDate, minDate: _minDate, onCalendarClick: function (date) { return handleCalendarClick(date, index); }, onCalendarKeyDown: function (event, date) { return handleCalendarKeyDown(event, date, index); }, onCalendarMouseEnter: handleCalendarMouseEnter, onCalendarMouseLeave: handleCalendarMouseLeave, order: index, selectAdjacementDays: selectAdjacementDays, selectEndDate: _selectEndDate, selectionType: selectionType, showAdjacementDays: showAdjacementDays, showWeekNumber: showWeekNumber, startDate: _startDate, view: view, weekdayFormat: weekdayFormat, weekNumbersLabel: weekNumbersLabel })));
|
|
9145
|
+
})));
|
|
8920
9146
|
});
|
|
8921
9147
|
CCalendar.propTypes = {
|
|
8922
|
-
className: PropTypes.string,
|
|
8923
|
-
calendarDate: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
|
|
8924
|
-
calendars: PropTypes.number,
|
|
8925
|
-
dayFormat: PropTypes.oneOfType([
|
|
8926
|
-
PropTypes.func,
|
|
8927
|
-
PropTypes.oneOf(['2-digit', 'numeric']),
|
|
9148
|
+
className: PropTypes$1.string,
|
|
9149
|
+
calendarDate: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]),
|
|
9150
|
+
calendars: PropTypes$1.number,
|
|
9151
|
+
dayFormat: PropTypes$1.oneOfType([
|
|
9152
|
+
PropTypes$1.func,
|
|
9153
|
+
PropTypes$1.oneOf(['2-digit', 'numeric']),
|
|
8928
9154
|
]),
|
|
8929
|
-
disabledDates: PropTypes.array,
|
|
8930
|
-
endDate: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
|
|
8931
|
-
firstDayOfWeek: PropTypes.number,
|
|
8932
|
-
locale: PropTypes.string,
|
|
8933
|
-
maxDate: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
|
|
8934
|
-
minDate: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]),
|
|
8935
|
-
navigation: PropTypes.bool,
|
|
8936
|
-
navNextIcon: PropTypes.node,
|
|
8937
|
-
navNextDoubleIcon: PropTypes.node,
|
|
8938
|
-
navPrevIcon: PropTypes.node,
|
|
8939
|
-
navPrevDoubleIcon: PropTypes.node,
|
|
8940
|
-
navYearFirst: PropTypes.bool,
|
|
8941
|
-
range: PropTypes.bool,
|
|
8942
|
-
selectAdjacementDays: PropTypes.bool,
|
|
8943
|
-
selectEndDate: PropTypes.bool,
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
PropTypes.
|
|
9155
|
+
disabledDates: PropTypes$1.array,
|
|
9156
|
+
endDate: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]),
|
|
9157
|
+
firstDayOfWeek: PropTypes$1.number,
|
|
9158
|
+
locale: PropTypes$1.string,
|
|
9159
|
+
maxDate: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]),
|
|
9160
|
+
minDate: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]),
|
|
9161
|
+
navigation: PropTypes$1.bool,
|
|
9162
|
+
navNextIcon: PropTypes$1.node,
|
|
9163
|
+
navNextDoubleIcon: PropTypes$1.node,
|
|
9164
|
+
navPrevIcon: PropTypes$1.node,
|
|
9165
|
+
navPrevDoubleIcon: PropTypes$1.node,
|
|
9166
|
+
navYearFirst: PropTypes$1.bool,
|
|
9167
|
+
range: PropTypes$1.bool,
|
|
9168
|
+
selectAdjacementDays: PropTypes$1.bool,
|
|
9169
|
+
selectEndDate: PropTypes$1.bool,
|
|
9170
|
+
selectionType: PropTypes$1.oneOf(['day', 'week', 'month', 'year']),
|
|
9171
|
+
showAdjacementDays: PropTypes$1.bool,
|
|
9172
|
+
showWeekNumber: PropTypes$1.bool,
|
|
9173
|
+
startDate: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]),
|
|
9174
|
+
weekdayFormat: PropTypes$1.oneOfType([
|
|
9175
|
+
PropTypes$1.func,
|
|
9176
|
+
PropTypes$1.number,
|
|
9177
|
+
PropTypes$1.oneOf(['long', 'narrow', 'short']),
|
|
8950
9178
|
]),
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
9179
|
+
weekNumbersLabel: PropTypes$1.string,
|
|
9180
|
+
onDateHover: PropTypes$1.func,
|
|
9181
|
+
onCalendarDateChange: PropTypes$1.func,
|
|
9182
|
+
onEndDateChange: PropTypes$1.func,
|
|
9183
|
+
onSelectEndChange: PropTypes$1.func,
|
|
9184
|
+
onStartDateChange: PropTypes$1.func,
|
|
9185
|
+
onViewChanged: PropTypes$1.func,
|
|
8957
9186
|
};
|
|
8958
9187
|
CCalendar.displayName = 'CCalendar';
|
|
8959
9188
|
|
|
@@ -8966,12 +9195,12 @@ var CFormFeedback = React$1.forwardRef(function (_a, ref) {
|
|
|
8966
9195
|
_b), className) }, rest, { ref: ref }), children));
|
|
8967
9196
|
});
|
|
8968
9197
|
CFormFeedback.propTypes = {
|
|
8969
|
-
children: PropTypes.node,
|
|
8970
|
-
className: PropTypes.string,
|
|
8971
|
-
component: PropTypes.elementType,
|
|
8972
|
-
invalid: PropTypes.bool,
|
|
8973
|
-
tooltip: PropTypes.bool,
|
|
8974
|
-
valid: PropTypes.bool,
|
|
9198
|
+
children: PropTypes$1.node,
|
|
9199
|
+
className: PropTypes$1.string,
|
|
9200
|
+
component: PropTypes$1.elementType,
|
|
9201
|
+
invalid: PropTypes$1.bool,
|
|
9202
|
+
tooltip: PropTypes$1.bool,
|
|
9203
|
+
valid: PropTypes$1.bool,
|
|
8975
9204
|
};
|
|
8976
9205
|
CFormFeedback.displayName = 'CFormFeedback';
|
|
8977
9206
|
|
|
@@ -8983,13 +9212,13 @@ var CFormControlValidation = function (_a) {
|
|
|
8983
9212
|
feedbackValid && (React$1.createElement(CFormFeedback, { valid: true, tooltip: tooltipFeedback }, feedbackValid))));
|
|
8984
9213
|
};
|
|
8985
9214
|
CFormControlValidation.propTypes = {
|
|
8986
|
-
describedby: PropTypes.string,
|
|
8987
|
-
feedback: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
8988
|
-
feedbackValid: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
8989
|
-
feedbackInvalid: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
8990
|
-
invalid: PropTypes.bool,
|
|
8991
|
-
tooltipFeedback: PropTypes.bool,
|
|
8992
|
-
valid: PropTypes.bool,
|
|
9215
|
+
describedby: PropTypes$1.string,
|
|
9216
|
+
feedback: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
9217
|
+
feedbackValid: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
9218
|
+
feedbackInvalid: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
9219
|
+
invalid: PropTypes$1.bool,
|
|
9220
|
+
tooltipFeedback: PropTypes$1.bool,
|
|
9221
|
+
valid: PropTypes$1.bool,
|
|
8993
9222
|
};
|
|
8994
9223
|
CFormControlValidation.displayName = 'CFormControlValidation';
|
|
8995
9224
|
|
|
@@ -8998,8 +9227,8 @@ var CFormFloating = React$1.forwardRef(function (_a, ref) {
|
|
|
8998
9227
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('form-floating', className) }, rest, { ref: ref }), children));
|
|
8999
9228
|
});
|
|
9000
9229
|
CFormFloating.propTypes = {
|
|
9001
|
-
children: PropTypes.node,
|
|
9002
|
-
className: PropTypes.string,
|
|
9230
|
+
children: PropTypes$1.node,
|
|
9231
|
+
className: PropTypes$1.string,
|
|
9003
9232
|
};
|
|
9004
9233
|
CFormFloating.displayName = 'CFormFloating';
|
|
9005
9234
|
|
|
@@ -9008,9 +9237,9 @@ var CFormLabel = React$1.forwardRef(function (_a, ref) {
|
|
|
9008
9237
|
return (React$1.createElement("label", __assign$1({ className: customClassName !== null && customClassName !== void 0 ? customClassName : classNames$1('form-label', className) }, rest, { ref: ref }), children));
|
|
9009
9238
|
});
|
|
9010
9239
|
CFormLabel.propTypes = {
|
|
9011
|
-
children: PropTypes.node,
|
|
9012
|
-
className: PropTypes.string,
|
|
9013
|
-
customClassName: PropTypes.string,
|
|
9240
|
+
children: PropTypes$1.node,
|
|
9241
|
+
className: PropTypes$1.string,
|
|
9242
|
+
customClassName: PropTypes$1.string,
|
|
9014
9243
|
};
|
|
9015
9244
|
CFormLabel.displayName = 'CFormLabel';
|
|
9016
9245
|
|
|
@@ -9019,9 +9248,9 @@ var CFormText = React$1.forwardRef(function (_a, ref) {
|
|
|
9019
9248
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('form-text', className) }, rest, { ref: ref }), children));
|
|
9020
9249
|
});
|
|
9021
9250
|
CFormText.propTypes = {
|
|
9022
|
-
children: PropTypes.node,
|
|
9023
|
-
className: PropTypes.string,
|
|
9024
|
-
component: PropTypes.elementType,
|
|
9251
|
+
children: PropTypes$1.node,
|
|
9252
|
+
className: PropTypes$1.string,
|
|
9253
|
+
component: PropTypes$1.elementType,
|
|
9025
9254
|
};
|
|
9026
9255
|
CFormText.displayName = 'CFormText';
|
|
9027
9256
|
|
|
@@ -9038,7 +9267,7 @@ var CFormControlWrapper = function (_a) {
|
|
|
9038
9267
|
text && React$1.createElement(CFormText, { id: describedby }, text),
|
|
9039
9268
|
React$1.createElement(FormControlValidation, null)));
|
|
9040
9269
|
};
|
|
9041
|
-
CFormControlWrapper.propTypes = __assign$1({ children: PropTypes.node, floatingClassName: PropTypes.string, floatingLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.string]), label: PropTypes.oneOfType([PropTypes.node, PropTypes.string]), text: PropTypes.oneOfType([PropTypes.node, PropTypes.string]) }, CFormControlValidation.propTypes);
|
|
9270
|
+
CFormControlWrapper.propTypes = __assign$1({ children: PropTypes$1.node, floatingClassName: PropTypes$1.string, floatingLabel: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]), label: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]), text: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]) }, CFormControlValidation.propTypes);
|
|
9042
9271
|
CFormControlWrapper.displayName = 'CFormControlWrapper';
|
|
9043
9272
|
|
|
9044
9273
|
var CPicker = React$1.forwardRef(function (_a, ref) {
|
|
@@ -9117,16 +9346,16 @@ var CPicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9117
9346
|
});
|
|
9118
9347
|
CPicker.displayName = 'CPicker';
|
|
9119
9348
|
CPicker.propTypes = {
|
|
9120
|
-
children: PropTypes.node,
|
|
9121
|
-
className: PropTypes.string,
|
|
9122
|
-
container: PropTypes.oneOf(['dropdown', 'inline']),
|
|
9123
|
-
disabled: PropTypes.bool,
|
|
9124
|
-
dropdownClassNames: PropTypes.string,
|
|
9125
|
-
footer: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),
|
|
9126
|
-
footerContent: PropTypes.node,
|
|
9127
|
-
onHide: PropTypes.func,
|
|
9128
|
-
onShow: PropTypes.func,
|
|
9129
|
-
toggler: PropTypes.node,
|
|
9349
|
+
children: PropTypes$1.node,
|
|
9350
|
+
className: PropTypes$1.string,
|
|
9351
|
+
container: PropTypes$1.oneOf(['dropdown', 'inline']),
|
|
9352
|
+
disabled: PropTypes$1.bool,
|
|
9353
|
+
dropdownClassNames: PropTypes$1.string,
|
|
9354
|
+
footer: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]),
|
|
9355
|
+
footerContent: PropTypes$1.node,
|
|
9356
|
+
onHide: PropTypes$1.func,
|
|
9357
|
+
onShow: PropTypes$1.func,
|
|
9358
|
+
toggler: PropTypes$1.node,
|
|
9130
9359
|
};
|
|
9131
9360
|
|
|
9132
9361
|
var CTimePickerRollCol = React$1.forwardRef(function (_a, ref) {
|
|
@@ -9158,9 +9387,9 @@ var CTimePickerRollCol = React$1.forwardRef(function (_a, ref) {
|
|
|
9158
9387
|
})));
|
|
9159
9388
|
});
|
|
9160
9389
|
CTimePickerRollCol.propTypes = {
|
|
9161
|
-
elements: PropTypes.array.isRequired,
|
|
9162
|
-
onClick: PropTypes.func,
|
|
9163
|
-
selected: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
9390
|
+
elements: PropTypes$1.array.isRequired,
|
|
9391
|
+
onClick: PropTypes$1.func,
|
|
9392
|
+
selected: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
9164
9393
|
};
|
|
9165
9394
|
CTimePickerRollCol.displayName = 'CTimePickerRollCol';
|
|
9166
9395
|
|
|
@@ -9178,7 +9407,11 @@ var convert12hTo24h = function (abbr, hour) {
|
|
|
9178
9407
|
};
|
|
9179
9408
|
var convert24hTo12h = function (hour) { return hour % 12 || 12; };
|
|
9180
9409
|
var convertTimeToDate = function (time) {
|
|
9181
|
-
return time
|
|
9410
|
+
return time
|
|
9411
|
+
? time instanceof Date
|
|
9412
|
+
? time
|
|
9413
|
+
: new Date("1970-01-01 ".concat(time))
|
|
9414
|
+
: null;
|
|
9182
9415
|
};
|
|
9183
9416
|
var getAmPm = function (date, locale) {
|
|
9184
9417
|
if (date.toLocaleTimeString(locale).includes('AM')) {
|
|
@@ -9244,7 +9477,7 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9244
9477
|
var inputRef = React$1.useRef(null);
|
|
9245
9478
|
var _v = React$1.useState(convertTimeToDate(time)), date = _v[0], setDate = _v[1];
|
|
9246
9479
|
var _w = React$1.useState(null), initialDate = _w[0], setInitialDate = _w[1];
|
|
9247
|
-
var _x = React$1.useState(valid
|
|
9480
|
+
var _x = React$1.useState(valid !== null && valid !== void 0 ? valid : (invalid === true ? false : undefined)), isValid = _x[0], setIsValid = _x[1];
|
|
9248
9481
|
var _y = React$1.useState(date ? getAmPm(new Date(date), locale) : 'am'), _ampm = _y[0], setAmPm = _y[1];
|
|
9249
9482
|
var _z = React$1.useState(visible), _visible = _z[0], setVisible = _z[1];
|
|
9250
9483
|
var _0 = React$1.useState({
|
|
@@ -9257,7 +9490,7 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9257
9490
|
setDate(convertTimeToDate(time));
|
|
9258
9491
|
}, [time]);
|
|
9259
9492
|
React$1.useEffect(function () {
|
|
9260
|
-
setIsValid(valid
|
|
9493
|
+
setIsValid(valid !== null && valid !== void 0 ? valid : (invalid === true ? false : undefined));
|
|
9261
9494
|
}, [valid, invalid]);
|
|
9262
9495
|
React$1.useEffect(function () {
|
|
9263
9496
|
setLocalizedTimePartials(getLocalizedTimePartials(locale, ampm));
|
|
@@ -9393,7 +9626,7 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9393
9626
|
_c['time-picker-roll'] = variant === 'roll',
|
|
9394
9627
|
_c)) }, variant === 'select' ? React$1.createElement(TimePickerSelect, null) : TimePickerRoll()))));
|
|
9395
9628
|
});
|
|
9396
|
-
CTimePicker.propTypes = __assign$1(__assign$1(__assign$1({}, CFormControlWrapper.propTypes), CPicker.propTypes), { ampm: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.bool]), cancelButton: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), cancelButtonColor: (_a$1 = CButton.propTypes) === null || _a$1 === void 0 ? void 0 : _a$1.color, cancelButtonSize: (_b$1 = CButton.propTypes) === null || _b$1 === void 0 ? void 0 : _b$1.size, cancelButtonVariant: (_c$1 = CButton.propTypes) === null || _c$1 === void 0 ? void 0 : _c$1.variant, className: PropTypes.string, confirmButton: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), confirmButtonColor: (_d$1 = CButton.propTypes) === null || _d$1 === void 0 ? void 0 : _d$1.color, confirmButtonSize: (_e$1 = CButton.propTypes) === null || _e$1 === void 0 ? void 0 : _e$1.size, confirmButtonVariant: (_f$1 = CButton.propTypes) === null || _f$1 === void 0 ? void 0 : _f$1.variant, locale: PropTypes.string, onTimeChange: PropTypes.func, required: PropTypes.bool, seconds: PropTypes.bool, time: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]), variant: PropTypes.oneOf(['roll', 'select']) });
|
|
9629
|
+
CTimePicker.propTypes = __assign$1(__assign$1(__assign$1({}, CFormControlWrapper.propTypes), CPicker.propTypes), { ampm: PropTypes$1.oneOfType([PropTypes$1.oneOf(['auto']), PropTypes$1.bool]), cancelButton: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), cancelButtonColor: (_a$1 = CButton.propTypes) === null || _a$1 === void 0 ? void 0 : _a$1.color, cancelButtonSize: (_b$1 = CButton.propTypes) === null || _b$1 === void 0 ? void 0 : _b$1.size, cancelButtonVariant: (_c$1 = CButton.propTypes) === null || _c$1 === void 0 ? void 0 : _c$1.variant, className: PropTypes$1.string, confirmButton: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), confirmButtonColor: (_d$1 = CButton.propTypes) === null || _d$1 === void 0 ? void 0 : _d$1.color, confirmButtonSize: (_e$1 = CButton.propTypes) === null || _e$1 === void 0 ? void 0 : _e$1.size, confirmButtonVariant: (_f$1 = CButton.propTypes) === null || _f$1 === void 0 ? void 0 : _f$1.variant, locale: PropTypes$1.string, onTimeChange: PropTypes$1.func, required: PropTypes$1.bool, seconds: PropTypes$1.bool, time: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]), variant: PropTypes$1.oneOf(['roll', 'select']) });
|
|
9397
9630
|
CTimePicker.displayName = 'CTimePicker';
|
|
9398
9631
|
|
|
9399
9632
|
var getLocalDateFromString = function (string, locale, time) {
|
|
@@ -9432,42 +9665,42 @@ var getLocalDateFromString = function (string, locale, time) {
|
|
|
9432
9665
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
9433
9666
|
var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
9434
9667
|
var _b;
|
|
9435
|
-
var _c = _a.calendars, calendars = _c === void 0 ? 2 : _c, calendarDate = _a.calendarDate, _d = _a.cancelButton, cancelButton = _d === void 0 ? 'Cancel' : _d, _e = _a.cancelButtonColor, cancelButtonColor = _e === void 0 ? 'primary' : _e, _f = _a.cancelButtonSize, cancelButtonSize = _f === void 0 ? 'sm' : _f, _g = _a.cancelButtonVariant, cancelButtonVariant = _g === void 0 ? 'ghost' : _g, className = _a.className, _h = _a.cleaner, cleaner = _h === void 0 ? true : _h, _j = _a.closeOnSelect, closeOnSelect = _j === void 0 ? true : _j, _k = _a.confirmButton, confirmButton = _k === void 0 ? 'OK' : _k, _l = _a.confirmButtonColor, confirmButtonColor = _l === void 0 ? 'primary' : _l, _m = _a.confirmButtonSize, confirmButtonSize = _m === void 0 ? 'sm' : _m, confirmButtonVariant = _a.confirmButtonVariant, _o = _a.indicator, indicator = _o === void 0 ? true : _o, dayFormat = _a.dayFormat, disabled = _a.disabled, disabledDates = _a.disabledDates, endDate = _a.endDate, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, firstDayOfWeek = _a.firstDayOfWeek, format$1 = _a.format, footer = _a.footer, id = _a.id, inputReadOnly = _a.inputReadOnly, invalid = _a.invalid, label = _a.label, _p = _a.locale, locale = _p === void 0 ? 'default' : _p, maxDate = _a.maxDate, minDate = _a.minDate, navigation = _a.navigation, navYearFirst = _a.navYearFirst, onEndDateChange = _a.onEndDateChange, onHide = _a.onHide, onStartDateChange = _a.onStartDateChange, onShow = _a.onShow, _q = _a.placeholder, placeholder = _q === void 0 ? ['Start date', 'End date'] : _q, _r = _a.range, range = _r === void 0 ? true : _r, ranges = _a.ranges, _s = _a.rangesButtonsColor, rangesButtonsColor = _s === void 0 ? 'secondary' : _s, rangesButtonsSize = _a.rangesButtonsSize, _t = _a.rangesButtonsVariant, rangesButtonsVariant = _t === void 0 ? 'ghost' : _t, required = _a.required, _u = _a.separator, separator = _u === void 0 ? true : _u, selectAdjacementDays = _a.selectAdjacementDays, showAdjacementDays = _a.showAdjacementDays, size = _a.size, startDate = _a.startDate, text = _a.text, timepicker = _a.timepicker, toggler = _a.toggler,
|
|
9668
|
+
var _c = _a.calendars, calendars = _c === void 0 ? 2 : _c, calendarDate = _a.calendarDate, _d = _a.cancelButton, cancelButton = _d === void 0 ? 'Cancel' : _d, _e = _a.cancelButtonColor, cancelButtonColor = _e === void 0 ? 'primary' : _e, _f = _a.cancelButtonSize, cancelButtonSize = _f === void 0 ? 'sm' : _f, _g = _a.cancelButtonVariant, cancelButtonVariant = _g === void 0 ? 'ghost' : _g, className = _a.className, _h = _a.cleaner, cleaner = _h === void 0 ? true : _h, _j = _a.closeOnSelect, closeOnSelect = _j === void 0 ? true : _j, _k = _a.confirmButton, confirmButton = _k === void 0 ? 'OK' : _k, _l = _a.confirmButtonColor, confirmButtonColor = _l === void 0 ? 'primary' : _l, _m = _a.confirmButtonSize, confirmButtonSize = _m === void 0 ? 'sm' : _m, confirmButtonVariant = _a.confirmButtonVariant, _o = _a.indicator, indicator = _o === void 0 ? true : _o, dayFormat = _a.dayFormat, disabled = _a.disabled, disabledDates = _a.disabledDates, endDate = _a.endDate, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, firstDayOfWeek = _a.firstDayOfWeek, format$1 = _a.format, footer = _a.footer, id = _a.id, inputReadOnly = _a.inputReadOnly, invalid = _a.invalid, label = _a.label, _p = _a.locale, locale = _p === void 0 ? 'default' : _p, maxDate = _a.maxDate, minDate = _a.minDate, navigation = _a.navigation, navYearFirst = _a.navYearFirst, onEndDateChange = _a.onEndDateChange, onHide = _a.onHide, onStartDateChange = _a.onStartDateChange, onShow = _a.onShow, _q = _a.placeholder, placeholder = _q === void 0 ? ['Start date', 'End date'] : _q, _r = _a.range, range = _r === void 0 ? true : _r, ranges = _a.ranges, _s = _a.rangesButtonsColor, rangesButtonsColor = _s === void 0 ? 'secondary' : _s, rangesButtonsSize = _a.rangesButtonsSize, _t = _a.rangesButtonsVariant, rangesButtonsVariant = _t === void 0 ? 'ghost' : _t, required = _a.required, _u = _a.separator, separator = _u === void 0 ? true : _u, selectAdjacementDays = _a.selectAdjacementDays, _v = _a.selectionType, selectionType = _v === void 0 ? 'day' : _v, showAdjacementDays = _a.showAdjacementDays, showWeekNumber = _a.showWeekNumber, size = _a.size, startDate = _a.startDate, text = _a.text, timepicker = _a.timepicker, toggler = _a.toggler, _w = _a.todayButton, todayButton = _w === void 0 ? 'Today' : _w, _x = _a.todayButtonColor, todayButtonColor = _x === void 0 ? 'primary' : _x, _y = _a.todayButtonSize, todayButtonSize = _y === void 0 ? 'sm' : _y, todayButtonVariant = _a.todayButtonVariant, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, visible = _a.visible, weekdayFormat = _a.weekdayFormat, rest = __rest$1(_a, ["calendars", "calendarDate", "cancelButton", "cancelButtonColor", "cancelButtonSize", "cancelButtonVariant", "className", "cleaner", "closeOnSelect", "confirmButton", "confirmButtonColor", "confirmButtonSize", "confirmButtonVariant", "indicator", "dayFormat", "disabled", "disabledDates", "endDate", "feedback", "feedbackInvalid", "feedbackValid", "firstDayOfWeek", "format", "footer", "id", "inputReadOnly", "invalid", "label", "locale", "maxDate", "minDate", "navigation", "navYearFirst", "onEndDateChange", "onHide", "onStartDateChange", "onShow", "placeholder", "range", "ranges", "rangesButtonsColor", "rangesButtonsSize", "rangesButtonsVariant", "required", "separator", "selectAdjacementDays", "selectionType", "showAdjacementDays", "showWeekNumber", "size", "startDate", "text", "timepicker", "toggler", "todayButton", "todayButtonColor", "todayButtonSize", "todayButtonVariant", "tooltipFeedback", "valid", "visible", "weekdayFormat"]);
|
|
9436
9669
|
var inputEndRef = React$1.useRef(null);
|
|
9437
9670
|
var inputStartRef = React$1.useRef(null);
|
|
9438
9671
|
var formRef = React$1.useRef();
|
|
9439
|
-
var
|
|
9440
|
-
var
|
|
9441
|
-
var
|
|
9442
|
-
var
|
|
9443
|
-
var
|
|
9444
|
-
var
|
|
9445
|
-
var
|
|
9446
|
-
var
|
|
9447
|
-
var
|
|
9448
|
-
var
|
|
9449
|
-
var
|
|
9450
|
-
var
|
|
9672
|
+
var _z = React$1.useState(calendarDate !== null && calendarDate !== void 0 ? calendarDate : null), _calendarDate = _z[0], setCalendarDate = _z[1];
|
|
9673
|
+
var _0 = React$1.useState(endDate !== null && endDate !== void 0 ? endDate : null), _endDate = _0[0], setEndDate = _0[1];
|
|
9674
|
+
var _1 = React$1.useState(maxDate !== null && maxDate !== void 0 ? maxDate : null), _maxDate = _1[0], setMaxDate = _1[1];
|
|
9675
|
+
var _2 = React$1.useState(minDate !== null && minDate !== void 0 ? minDate : null), _minDate = _2[0], setMinDate = _2[1];
|
|
9676
|
+
var _3 = React$1.useState(startDate !== null && startDate !== void 0 ? startDate : null), _startDate = _3[0], setStartDate = _3[1];
|
|
9677
|
+
var _4 = React$1.useState(visible), _visible = _4[0], setVisible = _4[1];
|
|
9678
|
+
var _5 = React$1.useState(startDate !== null && startDate !== void 0 ? startDate : null), initialStartDate = _5[0], setInitialStartDate = _5[1];
|
|
9679
|
+
var _6 = React$1.useState(endDate !== null && endDate !== void 0 ? endDate : null), initialEndDate = _6[0], setInitialEndDate = _6[1];
|
|
9680
|
+
var _7 = React$1.useState(null), inputStartHoverValue = _7[0], setInputStartHoverValue = _7[1];
|
|
9681
|
+
var _8 = React$1.useState(null), inputEndHoverValue = _8[0], setInputEndHoverValue = _8[1];
|
|
9682
|
+
var _9 = React$1.useState(valid !== null && valid !== void 0 ? valid : (invalid === true ? false : undefined)), isValid = _9[0], setIsValid = _9[1];
|
|
9683
|
+
var _10 = React$1.useState(false), selectEndDate = _10[0], setSelectEndDate = _10[1];
|
|
9451
9684
|
React$1.useEffect(function () {
|
|
9452
|
-
setIsValid(valid
|
|
9685
|
+
setIsValid(valid !== null && valid !== void 0 ? valid : (invalid === true ? false : undefined));
|
|
9453
9686
|
}, [valid, invalid]);
|
|
9454
9687
|
React$1.useEffect(function () {
|
|
9455
9688
|
if (startDate) {
|
|
9456
|
-
setStartDate(
|
|
9457
|
-
setCalendarDate(
|
|
9689
|
+
setStartDate(startDate);
|
|
9690
|
+
setCalendarDate(startDate);
|
|
9458
9691
|
}
|
|
9459
9692
|
}, [startDate]);
|
|
9460
9693
|
React$1.useEffect(function () {
|
|
9461
9694
|
if (endDate) {
|
|
9462
|
-
setEndDate(
|
|
9463
|
-
setCalendarDate(
|
|
9695
|
+
setEndDate(endDate);
|
|
9696
|
+
setCalendarDate(endDate);
|
|
9464
9697
|
}
|
|
9465
9698
|
}, [endDate]);
|
|
9466
9699
|
React$1.useEffect(function () {
|
|
9467
|
-
maxDate && setMaxDate(
|
|
9700
|
+
maxDate && setMaxDate(maxDate);
|
|
9468
9701
|
}, [maxDate]);
|
|
9469
9702
|
React$1.useEffect(function () {
|
|
9470
|
-
minDate && setMinDate(
|
|
9703
|
+
minDate && setMinDate(minDate);
|
|
9471
9704
|
}, [minDate]);
|
|
9472
9705
|
React$1.useEffect(function () {
|
|
9473
9706
|
if (inputStartHoverValue) {
|
|
@@ -9497,11 +9730,15 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9497
9730
|
}
|
|
9498
9731
|
}, [formRef, _startDate, _endDate]);
|
|
9499
9732
|
var formatDate = function (date) {
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9733
|
+
if (selectionType !== 'day') {
|
|
9734
|
+
return date;
|
|
9735
|
+
}
|
|
9736
|
+
var _date = new Date(date);
|
|
9737
|
+
return format$1 ?
|
|
9738
|
+
format(_date, format$1) :
|
|
9739
|
+
timepicker ?
|
|
9740
|
+
_date.toLocaleString(locale) :
|
|
9741
|
+
_date.toLocaleDateString(locale);
|
|
9505
9742
|
};
|
|
9506
9743
|
var setInputValue = function (el, date) {
|
|
9507
9744
|
if (!el) {
|
|
@@ -9513,14 +9750,9 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9513
9750
|
}
|
|
9514
9751
|
el.value = '';
|
|
9515
9752
|
};
|
|
9516
|
-
var
|
|
9753
|
+
var handleDateHover = function (date) {
|
|
9517
9754
|
selectEndDate ? setInputEndHoverValue(date) : setInputStartHoverValue(date);
|
|
9518
9755
|
};
|
|
9519
|
-
var handleCalendarDateChange = function (date, difference) {
|
|
9520
|
-
difference
|
|
9521
|
-
? setCalendarDate(new Date(date.getFullYear(), date.getMonth() - difference, 1))
|
|
9522
|
-
: setCalendarDate(date);
|
|
9523
|
-
};
|
|
9524
9756
|
var handleClear = function (event) {
|
|
9525
9757
|
event.stopPropagation();
|
|
9526
9758
|
setStartDate(null);
|
|
@@ -9561,7 +9793,7 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9561
9793
|
React$1.createElement("input", __assign$1({ autoComplete: "off", className: classNames$1('date-picker-input', {
|
|
9562
9794
|
hover: inputStartHoverValue,
|
|
9563
9795
|
}),
|
|
9564
|
-
// delay={true}
|
|
9796
|
+
// delay={true} TODO
|
|
9565
9797
|
disabled: disabled }, (id && { name: range ? "".concat(id, "-start-date") : "".concat(id, "-date") }), { placeholder: Array.isArray(placeholder) ? placeholder[0] : placeholder, readOnly: inputReadOnly || typeof format$1 === 'string', required: required, onChange: function (event) {
|
|
9566
9798
|
var date = getLocalDateFromString(event.target.value, locale, timepicker);
|
|
9567
9799
|
if (date instanceof Date && date.getTime()) {
|
|
@@ -9573,7 +9805,7 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9573
9805
|
range && (React$1.createElement("input", __assign$1({ autoComplete: "off", className: classNames$1('date-picker-input', {
|
|
9574
9806
|
hover: inputEndHoverValue,
|
|
9575
9807
|
}),
|
|
9576
|
-
// delay={true}
|
|
9808
|
+
// delay={true} TODO
|
|
9577
9809
|
disabled: disabled }, (id && { name: "".concat(id, "-end-date") }), { placeholder: placeholder[1], readOnly: inputReadOnly || typeof format$1 === 'string', required: required, onChange: function (event) {
|
|
9578
9810
|
var date = getLocalDateFromString(event.target.value, locale, timepicker);
|
|
9579
9811
|
if (date instanceof Date && date.getTime()) {
|
|
@@ -9623,10 +9855,10 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9623
9855
|
handleStartDateChange(ranges[key][0]);
|
|
9624
9856
|
handleEndDateChange(ranges[key][1]);
|
|
9625
9857
|
}, size: rangesButtonsSize, variant: rangesButtonsVariant }, key)); }))),
|
|
9626
|
-
React$1.createElement(CCalendar, { calendarDate: _calendarDate, calendars: isMobile_1 ? 1 : calendars, className: "date-picker-calendars", dayFormat: dayFormat, disabledDates: disabledDates, endDate: _endDate, firstDayOfWeek: firstDayOfWeek, locale: locale, maxDate: _maxDate, minDate: _minDate, navigation: navigation, navYearFirst: navYearFirst, range: range, selectAdjacementDays: selectAdjacementDays, selectEndDate: selectEndDate, showAdjacementDays: showAdjacementDays, startDate: _startDate,
|
|
9858
|
+
React$1.createElement(CCalendar, { calendarDate: _calendarDate, calendars: isMobile_1 ? 1 : calendars, className: "date-picker-calendars", dayFormat: dayFormat, disabledDates: disabledDates, endDate: _endDate, firstDayOfWeek: firstDayOfWeek, locale: locale, maxDate: _maxDate, minDate: _minDate, navigation: navigation, navYearFirst: navYearFirst, range: range, selectAdjacementDays: selectAdjacementDays, selectEndDate: selectEndDate, selectionType: selectionType, showAdjacementDays: showAdjacementDays, showWeekNumber: showWeekNumber, startDate: _startDate, onDateHover: function (date) { return handleDateHover(date); }, onCalendarDateChange: function (date) { return setCalendarDate(date); }, onStartDateChange: function (date) { return handleStartDateChange(date); }, onEndDateChange: function (date) { return handleEndDateChange(date); }, onSelectEndChange: function (value) { return setSelectEndDate(value); }, weekdayFormat: weekdayFormat }),
|
|
9627
9859
|
timepicker && (React$1.createElement("div", { className: "date-picker-timepickers" }, isMobile_1 || (range && calendars === 1) ? (React$1.createElement(React$1.Fragment, null,
|
|
9628
|
-
React$1.createElement(CTimePicker, { container: "inline", disabled: _startDate === null ? true : false, locale: locale, onTimeChange: function (_, __, date) { return date && handleStartDateChange(date); }, time: _startDate, variant: "select" }),
|
|
9629
|
-
React$1.createElement(CTimePicker, { container: "inline", disabled: _endDate === null ? true : false, locale: locale, onTimeChange: function (_, __, date) { return date && handleEndDateChange(date); }, time: _endDate, variant: "select" }))) : (Array.from({ length: calendars }).map(function (_, index) { return (React$1.createElement(CTimePicker, { container: "inline", disabled: index === 0
|
|
9860
|
+
React$1.createElement(CTimePicker, { container: "inline", disabled: _startDate === null ? true : false, locale: locale, onTimeChange: function (_, __, date) { return date && handleStartDateChange(date); }, time: _startDate && new Date(_startDate), variant: "select" }),
|
|
9861
|
+
React$1.createElement(CTimePicker, { container: "inline", disabled: _endDate === null ? true : false, locale: locale, onTimeChange: function (_, __, date) { return date && handleEndDateChange(date); }, time: _endDate && new Date(_endDate), variant: "select" }))) : (Array.from({ length: calendars }).map(function (_, index) { return (React$1.createElement(CTimePicker, { container: "inline", disabled: index === 0
|
|
9630
9862
|
? _startDate === null
|
|
9631
9863
|
? true
|
|
9632
9864
|
: false
|
|
@@ -9636,20 +9868,22 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
9636
9868
|
return index === 0
|
|
9637
9869
|
? date && handleStartDateChange(date)
|
|
9638
9870
|
: date && handleEndDateChange(date);
|
|
9639
|
-
}, time: index === 0
|
|
9871
|
+
}, time: index === 0
|
|
9872
|
+
? _startDate && new Date(_startDate)
|
|
9873
|
+
: _endDate && new Date(_endDate), variant: "select" })); }))))))));
|
|
9640
9874
|
});
|
|
9641
9875
|
CDateRangePicker.displayName = 'CDateRangePicker';
|
|
9642
|
-
CDateRangePicker.propTypes = __assign$1(__assign$1(__assign$1(__assign$1({}, CCalendar.propTypes), CFormControlWrapper.propTypes), CPicker.propTypes), { cancelButton: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), cancelButtonColor: (_a = CButton.propTypes) === null || _a === void 0 ? void 0 : _a.color, cancelButtonSize: (_b = CButton.propTypes) === null || _b === void 0 ? void 0 : _b.size, cancelButtonVariant: (_c = CButton.propTypes) === null || _c === void 0 ? void 0 : _c.variant, calendars: PropTypes.number, className: PropTypes.string, cleaner: PropTypes.bool, closeOnSelect: PropTypes.bool, confirmButton: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), confirmButtonColor: (_d = CButton.propTypes) === null || _d === void 0 ? void 0 : _d.color, confirmButtonSize: (_e = CButton.propTypes) === null || _e === void 0 ? void 0 : _e.size, confirmButtonVariant: (_f = CButton.propTypes) === null || _f === void 0 ? void 0 : _f.variant, id: PropTypes.string, indicator: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), inputReadOnly: PropTypes.bool, placeholder: PropTypes.oneOfType([
|
|
9643
|
-
PropTypes.string,
|
|
9644
|
-
PropTypes.arrayOf(PropTypes.string.isRequired),
|
|
9645
|
-
]), range: PropTypes.bool, ranges: PropTypes.object, rangesButtonsColor: (_g = CButton.propTypes) === null || _g === void 0 ? void 0 : _g.color, rangesButtonsSize: (_h = CButton.propTypes) === null || _h === void 0 ? void 0 : _h.size, rangesButtonsVariant: (_j = CButton.propTypes) === null || _j === void 0 ? void 0 : _j.variant, required: PropTypes.bool, separator: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), size: PropTypes.oneOf(['sm', 'lg']), timepicker: PropTypes.bool, todayButton: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]), todayButtonColor: (_k = CButton.propTypes) === null || _k === void 0 ? void 0 : _k.color, todayButtonSize: (_l = CButton.propTypes) === null || _l === void 0 ? void 0 : _l.size, todayButtonVariant: (_m = CButton.propTypes) === null || _m === void 0 ? void 0 : _m.variant });
|
|
9876
|
+
CDateRangePicker.propTypes = __assign$1(__assign$1(__assign$1(__assign$1({}, CCalendar.propTypes), CFormControlWrapper.propTypes), CPicker.propTypes), { cancelButton: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), cancelButtonColor: (_a = CButton.propTypes) === null || _a === void 0 ? void 0 : _a.color, cancelButtonSize: (_b = CButton.propTypes) === null || _b === void 0 ? void 0 : _b.size, cancelButtonVariant: (_c = CButton.propTypes) === null || _c === void 0 ? void 0 : _c.variant, calendars: PropTypes$1.number, className: PropTypes$1.string, cleaner: PropTypes$1.bool, closeOnSelect: PropTypes$1.bool, confirmButton: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), confirmButtonColor: (_d = CButton.propTypes) === null || _d === void 0 ? void 0 : _d.color, confirmButtonSize: (_e = CButton.propTypes) === null || _e === void 0 ? void 0 : _e.size, confirmButtonVariant: (_f = CButton.propTypes) === null || _f === void 0 ? void 0 : _f.variant, id: PropTypes$1.string, indicator: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), inputReadOnly: PropTypes$1.bool, placeholder: PropTypes$1.oneOfType([
|
|
9877
|
+
PropTypes$1.string,
|
|
9878
|
+
PropTypes$1.arrayOf(PropTypes$1.string.isRequired),
|
|
9879
|
+
]), range: PropTypes$1.bool, ranges: PropTypes$1.object, rangesButtonsColor: (_g = CButton.propTypes) === null || _g === void 0 ? void 0 : _g.color, rangesButtonsSize: (_h = CButton.propTypes) === null || _h === void 0 ? void 0 : _h.size, rangesButtonsVariant: (_j = CButton.propTypes) === null || _j === void 0 ? void 0 : _j.variant, required: PropTypes$1.bool, separator: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), size: PropTypes$1.oneOf(['sm', 'lg']), timepicker: PropTypes$1.bool, todayButton: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.node]), todayButtonColor: (_k = CButton.propTypes) === null || _k === void 0 ? void 0 : _k.color, todayButtonSize: (_l = CButton.propTypes) === null || _l === void 0 ? void 0 : _l.size, todayButtonVariant: (_m = CButton.propTypes) === null || _m === void 0 ? void 0 : _m.variant });
|
|
9646
9880
|
|
|
9647
9881
|
var CDatePicker = React$1.forwardRef(function (_a, ref) {
|
|
9648
9882
|
var date = _a.date, id = _a.id, onDateChange = _a.onDateChange, _b = _a.placeholder, placeholder = _b === void 0 ? 'Select date' : _b, rest = __rest$1(_a, ["date", "id", "onDateChange", "placeholder"]);
|
|
9649
9883
|
return (React$1.createElement(CDateRangePicker, __assign$1({ calendars: 1, id: id, startDate: date, onStartDateChange: onDateChange, placeholder: placeholder, range: false, ref: ref }, rest)));
|
|
9650
9884
|
});
|
|
9651
9885
|
CDatePicker.displayName = 'CDatePicker';
|
|
9652
|
-
CDatePicker.propTypes = __assign$1(__assign$1({}, CDateRangePicker.propTypes), { date: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]), onDateChange: PropTypes.func });
|
|
9886
|
+
CDatePicker.propTypes = __assign$1(__assign$1({}, CDateRangePicker.propTypes), { date: PropTypes$1.oneOfType([PropTypes$1.instanceOf(Date), PropTypes$1.string]), onDateChange: PropTypes$1.func });
|
|
9653
9887
|
|
|
9654
9888
|
var getPlacement = function (placement, direction, alignment, isRTL) {
|
|
9655
9889
|
var _placement = placement;
|
|
@@ -9755,34 +9989,34 @@ var CDropdown = React$1.forwardRef(function (_a, ref) {
|
|
|
9755
9989
|
_b.show = _visible,
|
|
9756
9990
|
_b), className) }, rest, { ref: forkedRef }), children))));
|
|
9757
9991
|
});
|
|
9758
|
-
var alignmentDirection = PropTypes.oneOf(['start', 'end']);
|
|
9992
|
+
var alignmentDirection = PropTypes$1.oneOf(['start', 'end']);
|
|
9759
9993
|
CDropdown.propTypes = {
|
|
9760
|
-
alignment: PropTypes.oneOfType([
|
|
9994
|
+
alignment: PropTypes$1.oneOfType([
|
|
9761
9995
|
alignmentDirection,
|
|
9762
|
-
PropTypes.shape({ xs: alignmentDirection.isRequired }),
|
|
9763
|
-
PropTypes.shape({ sm: alignmentDirection.isRequired }),
|
|
9764
|
-
PropTypes.shape({ md: alignmentDirection.isRequired }),
|
|
9765
|
-
PropTypes.shape({ lg: alignmentDirection.isRequired }),
|
|
9766
|
-
PropTypes.shape({ xl: alignmentDirection.isRequired }),
|
|
9767
|
-
PropTypes.shape({ xxl: alignmentDirection.isRequired }),
|
|
9996
|
+
PropTypes$1.shape({ xs: alignmentDirection.isRequired }),
|
|
9997
|
+
PropTypes$1.shape({ sm: alignmentDirection.isRequired }),
|
|
9998
|
+
PropTypes$1.shape({ md: alignmentDirection.isRequired }),
|
|
9999
|
+
PropTypes$1.shape({ lg: alignmentDirection.isRequired }),
|
|
10000
|
+
PropTypes$1.shape({ xl: alignmentDirection.isRequired }),
|
|
10001
|
+
PropTypes$1.shape({ xxl: alignmentDirection.isRequired }),
|
|
9768
10002
|
]),
|
|
9769
|
-
autoClose: PropTypes.oneOfType([
|
|
9770
|
-
PropTypes.bool,
|
|
9771
|
-
PropTypes.oneOf(['inside', 'outside']),
|
|
10003
|
+
autoClose: PropTypes$1.oneOfType([
|
|
10004
|
+
PropTypes$1.bool,
|
|
10005
|
+
PropTypes$1.oneOf(['inside', 'outside']),
|
|
9772
10006
|
]),
|
|
9773
|
-
children: PropTypes.node,
|
|
9774
|
-
className: PropTypes.string,
|
|
9775
|
-
component: PropTypes.elementType,
|
|
9776
|
-
dark: PropTypes.bool,
|
|
9777
|
-
direction: PropTypes.oneOf(['center', 'dropup', 'dropup-center', 'dropend', 'dropstart']),
|
|
9778
|
-
offset: PropTypes.any,
|
|
9779
|
-
onHide: PropTypes.func,
|
|
9780
|
-
onShow: PropTypes.func,
|
|
10007
|
+
children: PropTypes$1.node,
|
|
10008
|
+
className: PropTypes$1.string,
|
|
10009
|
+
component: PropTypes$1.elementType,
|
|
10010
|
+
dark: PropTypes$1.bool,
|
|
10011
|
+
direction: PropTypes$1.oneOf(['center', 'dropup', 'dropup-center', 'dropend', 'dropstart']),
|
|
10012
|
+
offset: PropTypes$1.any,
|
|
10013
|
+
onHide: PropTypes$1.func,
|
|
10014
|
+
onShow: PropTypes$1.func,
|
|
9781
10015
|
placement: placementPropType,
|
|
9782
|
-
popper: PropTypes.bool,
|
|
9783
|
-
portal: PropTypes.bool,
|
|
9784
|
-
variant: PropTypes.oneOf(['btn-group', 'dropdown', 'input-group', 'nav-item']),
|
|
9785
|
-
visible: PropTypes.bool,
|
|
10016
|
+
popper: PropTypes$1.bool,
|
|
10017
|
+
portal: PropTypes$1.bool,
|
|
10018
|
+
variant: PropTypes$1.oneOf(['btn-group', 'dropdown', 'input-group', 'nav-item']),
|
|
10019
|
+
visible: PropTypes$1.bool,
|
|
9786
10020
|
};
|
|
9787
10021
|
CDropdown.displayName = 'CDropdown';
|
|
9788
10022
|
|
|
@@ -9791,7 +10025,7 @@ var CDropdownDivider = React$1.forwardRef(function (_a, ref) {
|
|
|
9791
10025
|
return React$1.createElement("hr", __assign$1({ className: classNames$1('dropdown-divider', className) }, rest, { ref: ref }));
|
|
9792
10026
|
});
|
|
9793
10027
|
CDropdownDivider.propTypes = {
|
|
9794
|
-
className: PropTypes.string,
|
|
10028
|
+
className: PropTypes$1.string,
|
|
9795
10029
|
};
|
|
9796
10030
|
CDropdownDivider.displayName = 'CDropdownDivider';
|
|
9797
10031
|
|
|
@@ -9800,9 +10034,9 @@ var CDropdownHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
9800
10034
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-header', className) }, rest, { ref: ref }), children));
|
|
9801
10035
|
});
|
|
9802
10036
|
CDropdownHeader.propTypes = {
|
|
9803
|
-
children: PropTypes.node,
|
|
9804
|
-
className: PropTypes.string,
|
|
9805
|
-
component: PropTypes.elementType,
|
|
10037
|
+
children: PropTypes$1.node,
|
|
10038
|
+
className: PropTypes$1.string,
|
|
10039
|
+
component: PropTypes$1.elementType,
|
|
9806
10040
|
};
|
|
9807
10041
|
CDropdownHeader.displayName = 'CDropdownHeader';
|
|
9808
10042
|
|
|
@@ -9811,9 +10045,9 @@ var CDropdownItem = React$1.forwardRef(function (_a, ref) {
|
|
|
9811
10045
|
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('dropdown-item', className), component: component }, rest, { ref: ref }), children));
|
|
9812
10046
|
});
|
|
9813
10047
|
CDropdownItem.propTypes = {
|
|
9814
|
-
children: PropTypes.node,
|
|
9815
|
-
className: PropTypes.string,
|
|
9816
|
-
component: PropTypes.elementType,
|
|
10048
|
+
children: PropTypes$1.node,
|
|
10049
|
+
className: PropTypes$1.string,
|
|
10050
|
+
component: PropTypes$1.elementType,
|
|
9817
10051
|
};
|
|
9818
10052
|
CDropdownItem.displayName = 'CDropdownItem';
|
|
9819
10053
|
|
|
@@ -9822,9 +10056,9 @@ var CDropdownItemPlain = React$1.forwardRef(function (_a, ref) {
|
|
|
9822
10056
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-item-text', className) }, rest, { ref: ref }), children));
|
|
9823
10057
|
});
|
|
9824
10058
|
CDropdownItemPlain.propTypes = {
|
|
9825
|
-
children: PropTypes.node,
|
|
9826
|
-
className: PropTypes.string,
|
|
9827
|
-
component: PropTypes.elementType,
|
|
10059
|
+
children: PropTypes$1.node,
|
|
10060
|
+
className: PropTypes$1.string,
|
|
10061
|
+
component: PropTypes$1.elementType,
|
|
9828
10062
|
};
|
|
9829
10063
|
CDropdownItemPlain.displayName = 'CDropdownItemPlain';
|
|
9830
10064
|
|
|
@@ -9846,9 +10080,8 @@ var CDropdownMenu = React$1.forwardRef(function (_a, ref) {
|
|
|
9846
10080
|
var forkedRef = useForkedRef(ref, dropdownMenuRef);
|
|
9847
10081
|
return (React$1.createElement(CConditionalPortal, { portal: portal !== null && portal !== void 0 ? portal : false },
|
|
9848
10082
|
React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-menu', {
|
|
9849
|
-
'dropdown-menu-dark': dark,
|
|
9850
10083
|
show: visible,
|
|
9851
|
-
}, alignment && alignmentClassNames(alignment), className), ref: forkedRef, role: "menu", "aria-hidden": !visible }, (!popper && { 'data-coreui-popper': 'static' }), rest), Component === 'ul'
|
|
10084
|
+
}, alignment && alignmentClassNames(alignment), className), ref: forkedRef, role: "menu", "aria-hidden": !visible }, (!popper && { 'data-coreui-popper': 'static' }), (dark && { 'data-coreui-theme': 'dark' }), rest), Component === 'ul'
|
|
9852
10085
|
? React$1.Children.map(children, function (child, index) {
|
|
9853
10086
|
if (React$1.isValidElement(child)) {
|
|
9854
10087
|
return React$1.createElement("li", { key: index }, React$1.cloneElement(child));
|
|
@@ -9858,9 +10091,9 @@ var CDropdownMenu = React$1.forwardRef(function (_a, ref) {
|
|
|
9858
10091
|
: children)));
|
|
9859
10092
|
});
|
|
9860
10093
|
CDropdownMenu.propTypes = {
|
|
9861
|
-
children: PropTypes.node,
|
|
9862
|
-
className: PropTypes.string,
|
|
9863
|
-
component: PropTypes.elementType,
|
|
10094
|
+
children: PropTypes$1.node,
|
|
10095
|
+
className: PropTypes$1.string,
|
|
10096
|
+
component: PropTypes$1.elementType,
|
|
9864
10097
|
};
|
|
9865
10098
|
CDropdownMenu.displayName = 'CDropdownMenu';
|
|
9866
10099
|
|
|
@@ -9896,11 +10129,11 @@ var CDropdownToggle = function (_a) {
|
|
|
9896
10129
|
return React$1.createElement(Toggler, null);
|
|
9897
10130
|
};
|
|
9898
10131
|
CDropdownToggle.propTypes = {
|
|
9899
|
-
caret: PropTypes.bool,
|
|
9900
|
-
children: PropTypes.node,
|
|
9901
|
-
className: PropTypes.string,
|
|
9902
|
-
custom: PropTypes.bool,
|
|
9903
|
-
split: PropTypes.bool,
|
|
10132
|
+
caret: PropTypes$1.bool,
|
|
10133
|
+
children: PropTypes$1.node,
|
|
10134
|
+
className: PropTypes$1.string,
|
|
10135
|
+
custom: PropTypes$1.bool,
|
|
10136
|
+
split: PropTypes$1.bool,
|
|
9904
10137
|
trigger: triggerPropType,
|
|
9905
10138
|
};
|
|
9906
10139
|
CDropdownToggle.displayName = 'CDropdownToggle';
|
|
@@ -9915,12 +10148,12 @@ var CSpinner = React$1.forwardRef(function (_a, ref) {
|
|
|
9915
10148
|
React$1.createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
9916
10149
|
});
|
|
9917
10150
|
CSpinner.propTypes = {
|
|
9918
|
-
className: PropTypes.string,
|
|
10151
|
+
className: PropTypes$1.string,
|
|
9919
10152
|
color: colorPropType,
|
|
9920
|
-
component: PropTypes.string,
|
|
9921
|
-
size: PropTypes.oneOf(['sm']),
|
|
9922
|
-
variant: PropTypes.oneOf(['border', 'grow']),
|
|
9923
|
-
visuallyHiddenLabel: PropTypes.string,
|
|
10153
|
+
component: PropTypes$1.string,
|
|
10154
|
+
size: PropTypes$1.oneOf(['sm']),
|
|
10155
|
+
variant: PropTypes$1.oneOf(['border', 'grow']),
|
|
10156
|
+
visuallyHiddenLabel: PropTypes$1.string,
|
|
9924
10157
|
};
|
|
9925
10158
|
CSpinner.displayName = 'CSpinner';
|
|
9926
10159
|
|
|
@@ -9968,10 +10201,10 @@ var CElementCover = React$1.forwardRef(function (_a, ref) {
|
|
|
9968
10201
|
} }, children || React$1.createElement(CSpinner, { variant: "grow", color: "primary" }))));
|
|
9969
10202
|
});
|
|
9970
10203
|
CElementCover.propTypes = {
|
|
9971
|
-
boundaries: PropTypes.array,
|
|
9972
|
-
children: PropTypes.node,
|
|
9973
|
-
className: PropTypes.string,
|
|
9974
|
-
opacity: PropTypes.number,
|
|
10204
|
+
boundaries: PropTypes$1.array,
|
|
10205
|
+
children: PropTypes$1.node,
|
|
10206
|
+
className: PropTypes$1.string,
|
|
10207
|
+
opacity: PropTypes$1.number,
|
|
9975
10208
|
};
|
|
9976
10209
|
CElementCover.displayName = 'CElementCover';
|
|
9977
10210
|
|
|
@@ -9981,9 +10214,9 @@ var CFooter = React$1.forwardRef(function (_a, ref) {
|
|
|
9981
10214
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('footer', (_b = {}, _b["footer-".concat(position)] = position, _b), className) }, rest, { ref: ref }), children));
|
|
9982
10215
|
});
|
|
9983
10216
|
CFooter.propTypes = {
|
|
9984
|
-
children: PropTypes.node,
|
|
9985
|
-
className: PropTypes.string,
|
|
9986
|
-
position: PropTypes.oneOf(['fixed', 'sticky']),
|
|
10217
|
+
children: PropTypes$1.node,
|
|
10218
|
+
className: PropTypes$1.string,
|
|
10219
|
+
position: PropTypes$1.oneOf(['fixed', 'sticky']),
|
|
9987
10220
|
};
|
|
9988
10221
|
CFooter.displayName = 'CFooter';
|
|
9989
10222
|
|
|
@@ -9992,9 +10225,9 @@ var CForm = React$1.forwardRef(function (_a, ref) {
|
|
|
9992
10225
|
return (React$1.createElement("form", __assign$1({ className: classNames$1({ 'was-validated': validated }, className) || undefined }, rest, { ref: ref }), children));
|
|
9993
10226
|
});
|
|
9994
10227
|
CForm.propTypes = {
|
|
9995
|
-
children: PropTypes.node,
|
|
9996
|
-
className: PropTypes.string,
|
|
9997
|
-
validated: PropTypes.bool,
|
|
10228
|
+
children: PropTypes$1.node,
|
|
10229
|
+
className: PropTypes$1.string,
|
|
10230
|
+
validated: PropTypes$1.bool,
|
|
9998
10231
|
};
|
|
9999
10232
|
CForm.displayName = 'CForm';
|
|
10000
10233
|
|
|
@@ -10046,7 +10279,7 @@ var CFormCheck = React$1.forwardRef(function (_a, ref) {
|
|
|
10046
10279
|
};
|
|
10047
10280
|
return React$1.createElement(FormCheck, null);
|
|
10048
10281
|
});
|
|
10049
|
-
CFormCheck.propTypes = __assign$1({ button: PropTypes.object, className: PropTypes.string, hitArea: PropTypes.oneOf(['full']), id: PropTypes.string, indeterminate: PropTypes.bool, inline: PropTypes.bool, label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), reverse: PropTypes.bool, type: PropTypes.oneOf(['checkbox', 'radio']) }, CFormControlValidation.propTypes);
|
|
10282
|
+
CFormCheck.propTypes = __assign$1({ button: PropTypes$1.object, className: PropTypes$1.string, hitArea: PropTypes$1.oneOf(['full']), id: PropTypes$1.string, indeterminate: PropTypes$1.bool, inline: PropTypes$1.bool, label: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]), reverse: PropTypes$1.bool, type: PropTypes$1.oneOf(['checkbox', 'radio']) }, CFormControlValidation.propTypes);
|
|
10050
10283
|
CFormCheck.displayName = 'CFormCheck';
|
|
10051
10284
|
|
|
10052
10285
|
var CFormInput = React$1.forwardRef(function (_a, ref) {
|
|
@@ -10065,7 +10298,7 @@ var CFormInput = React$1.forwardRef(function (_a, ref) {
|
|
|
10065
10298
|
_b['is-valid'] = valid,
|
|
10066
10299
|
_b), className), id: id, type: type, onChange: function (event) { return (delay ? setValue(event) : onChange && onChange(event)); } }, rest, { ref: ref }), children)));
|
|
10067
10300
|
});
|
|
10068
|
-
CFormInput.propTypes = __assign$1({ className: PropTypes.string, id: PropTypes.string, delay: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]), plainText: PropTypes.bool, size: PropTypes.oneOf(['sm', 'lg']), type: PropTypes.oneOfType([PropTypes.oneOf(['color', 'file', 'text']), PropTypes.string]) }, CFormControlWrapper.propTypes);
|
|
10301
|
+
CFormInput.propTypes = __assign$1({ className: PropTypes$1.string, id: PropTypes$1.string, delay: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.number]), plainText: PropTypes$1.bool, size: PropTypes$1.oneOf(['sm', 'lg']), type: PropTypes$1.oneOfType([PropTypes$1.oneOf(['color', 'file', 'text']), PropTypes$1.string]) }, CFormControlWrapper.propTypes);
|
|
10069
10302
|
CFormInput.displayName = 'CFormInput';
|
|
10070
10303
|
|
|
10071
10304
|
var CFormRange = React$1.forwardRef(function (_a, ref) {
|
|
@@ -10075,8 +10308,8 @@ var CFormRange = React$1.forwardRef(function (_a, ref) {
|
|
|
10075
10308
|
React$1.createElement("input", __assign$1({ type: "range", className: classNames$1('form-range', className) }, rest, { ref: ref }))));
|
|
10076
10309
|
});
|
|
10077
10310
|
CFormRange.propTypes = {
|
|
10078
|
-
className: PropTypes.string,
|
|
10079
|
-
label: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
10311
|
+
className: PropTypes$1.string,
|
|
10312
|
+
label: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
10080
10313
|
};
|
|
10081
10314
|
CFormRange.displayName = 'CFormRange';
|
|
10082
10315
|
|
|
@@ -10096,7 +10329,7 @@ var CFormSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
10096
10329
|
})
|
|
10097
10330
|
: children)));
|
|
10098
10331
|
});
|
|
10099
|
-
CFormSelect.propTypes = __assign$1({ className: PropTypes.string, htmlSize: PropTypes.number, options: PropTypes.array }, CFormControlWrapper.propTypes);
|
|
10332
|
+
CFormSelect.propTypes = __assign$1({ className: PropTypes$1.string, htmlSize: PropTypes$1.number, options: PropTypes$1.array }, CFormControlWrapper.propTypes);
|
|
10100
10333
|
CFormSelect.displayName = 'CFormSelect';
|
|
10101
10334
|
|
|
10102
10335
|
var CFormSwitch = React$1.forwardRef(function (_a, ref) {
|
|
@@ -10116,14 +10349,14 @@ var CFormSwitch = React$1.forwardRef(function (_a, ref) {
|
|
|
10116
10349
|
label && (React$1.createElement(CFormLabel, __assign$1({ customClassName: "form-check-label" }, (id && { htmlFor: id })), label))));
|
|
10117
10350
|
});
|
|
10118
10351
|
CFormSwitch.propTypes = {
|
|
10119
|
-
className: PropTypes.string,
|
|
10120
|
-
id: PropTypes.string,
|
|
10121
|
-
invalid: PropTypes.bool,
|
|
10122
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
10123
|
-
reverse: PropTypes.bool,
|
|
10124
|
-
size: PropTypes.oneOf(['lg', 'xl']),
|
|
10125
|
-
type: PropTypes.oneOf(['checkbox', 'radio']),
|
|
10126
|
-
valid: PropTypes.bool,
|
|
10352
|
+
className: PropTypes$1.string,
|
|
10353
|
+
id: PropTypes$1.string,
|
|
10354
|
+
invalid: PropTypes$1.bool,
|
|
10355
|
+
label: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
10356
|
+
reverse: PropTypes$1.bool,
|
|
10357
|
+
size: PropTypes$1.oneOf(['lg', 'xl']),
|
|
10358
|
+
type: PropTypes$1.oneOf(['checkbox', 'radio']),
|
|
10359
|
+
valid: PropTypes$1.bool,
|
|
10127
10360
|
};
|
|
10128
10361
|
CFormSwitch.displayName = 'CFormSwitch';
|
|
10129
10362
|
|
|
@@ -10135,7 +10368,7 @@ var CFormTextarea = React$1.forwardRef(function (_a, ref) {
|
|
|
10135
10368
|
'is-valid': valid,
|
|
10136
10369
|
}, className), id: id }, rest, { ref: ref }), children)));
|
|
10137
10370
|
});
|
|
10138
|
-
CFormTextarea.propTypes = __assign$1({ className: PropTypes.string, id: PropTypes.string, plainText: PropTypes.bool }, CFormControlWrapper.propTypes);
|
|
10371
|
+
CFormTextarea.propTypes = __assign$1({ className: PropTypes$1.string, id: PropTypes$1.string, plainText: PropTypes$1.bool }, CFormControlWrapper.propTypes);
|
|
10139
10372
|
CFormTextarea.displayName = 'CFormTextarea';
|
|
10140
10373
|
|
|
10141
10374
|
var CInputGroup = React$1.forwardRef(function (_a, ref) {
|
|
@@ -10146,9 +10379,9 @@ var CInputGroup = React$1.forwardRef(function (_a, ref) {
|
|
|
10146
10379
|
_b), className) }, rest, { ref: ref }), children));
|
|
10147
10380
|
});
|
|
10148
10381
|
CInputGroup.propTypes = {
|
|
10149
|
-
children: PropTypes.node,
|
|
10150
|
-
className: PropTypes.string,
|
|
10151
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
10382
|
+
children: PropTypes$1.node,
|
|
10383
|
+
className: PropTypes$1.string,
|
|
10384
|
+
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
10152
10385
|
};
|
|
10153
10386
|
CInputGroup.displayName = 'CInputGroup';
|
|
10154
10387
|
|
|
@@ -10157,9 +10390,9 @@ var CInputGroupText = React$1.forwardRef(function (_a, ref) {
|
|
|
10157
10390
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('input-group-text', className) }, rest, { ref: ref }), children));
|
|
10158
10391
|
});
|
|
10159
10392
|
CInputGroupText.propTypes = {
|
|
10160
|
-
children: PropTypes.node,
|
|
10161
|
-
className: PropTypes.string,
|
|
10162
|
-
component: PropTypes.elementType,
|
|
10393
|
+
children: PropTypes$1.node,
|
|
10394
|
+
className: PropTypes$1.string,
|
|
10395
|
+
component: PropTypes$1.elementType,
|
|
10163
10396
|
};
|
|
10164
10397
|
CInputGroupText.displayName = 'CInputGroupText';
|
|
10165
10398
|
|
|
@@ -10201,27 +10434,27 @@ var CCol = React$1.forwardRef(function (_a, ref) {
|
|
|
10201
10434
|
});
|
|
10202
10435
|
return (React$1.createElement("div", __assign$1({ className: classNames$1(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'col', className) }, rest, { ref: ref }), children));
|
|
10203
10436
|
});
|
|
10204
|
-
var span = PropTypes.oneOfType([
|
|
10205
|
-
PropTypes.bool,
|
|
10206
|
-
PropTypes.number,
|
|
10207
|
-
PropTypes.string,
|
|
10208
|
-
PropTypes.oneOf(['auto']),
|
|
10437
|
+
var span = PropTypes$1.oneOfType([
|
|
10438
|
+
PropTypes$1.bool,
|
|
10439
|
+
PropTypes$1.number,
|
|
10440
|
+
PropTypes$1.string,
|
|
10441
|
+
PropTypes$1.oneOf(['auto']),
|
|
10209
10442
|
]);
|
|
10210
|
-
var col = PropTypes.oneOfType([
|
|
10443
|
+
var col = PropTypes$1.oneOfType([
|
|
10211
10444
|
span,
|
|
10212
|
-
PropTypes.shape({
|
|
10445
|
+
PropTypes$1.shape({
|
|
10213
10446
|
span: span,
|
|
10214
|
-
offset: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
10215
|
-
order: PropTypes.oneOfType([
|
|
10216
|
-
PropTypes.oneOf(['first', 'last']),
|
|
10217
|
-
PropTypes.number,
|
|
10218
|
-
PropTypes.string,
|
|
10447
|
+
offset: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
10448
|
+
order: PropTypes$1.oneOfType([
|
|
10449
|
+
PropTypes$1.oneOf(['first', 'last']),
|
|
10450
|
+
PropTypes$1.number,
|
|
10451
|
+
PropTypes$1.string,
|
|
10219
10452
|
]),
|
|
10220
10453
|
}),
|
|
10221
10454
|
]);
|
|
10222
10455
|
CCol.propTypes = {
|
|
10223
|
-
children: PropTypes.node,
|
|
10224
|
-
className: PropTypes.string,
|
|
10456
|
+
children: PropTypes$1.node,
|
|
10457
|
+
className: PropTypes$1.string,
|
|
10225
10458
|
xs: col,
|
|
10226
10459
|
sm: col,
|
|
10227
10460
|
md: col,
|
|
@@ -10250,14 +10483,14 @@ var CContainer = React$1.forwardRef(function (_a, ref) {
|
|
|
10250
10483
|
return (React$1.createElement("div", __assign$1({ className: classNames$1(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'container', className) }, rest, { ref: ref }), children));
|
|
10251
10484
|
});
|
|
10252
10485
|
CContainer.propTypes = {
|
|
10253
|
-
children: PropTypes.node,
|
|
10254
|
-
className: PropTypes.string,
|
|
10255
|
-
sm: PropTypes.bool,
|
|
10256
|
-
md: PropTypes.bool,
|
|
10257
|
-
lg: PropTypes.bool,
|
|
10258
|
-
xl: PropTypes.bool,
|
|
10259
|
-
xxl: PropTypes.bool,
|
|
10260
|
-
fluid: PropTypes.bool,
|
|
10486
|
+
children: PropTypes$1.node,
|
|
10487
|
+
className: PropTypes$1.string,
|
|
10488
|
+
sm: PropTypes$1.bool,
|
|
10489
|
+
md: PropTypes$1.bool,
|
|
10490
|
+
lg: PropTypes$1.bool,
|
|
10491
|
+
xl: PropTypes$1.bool,
|
|
10492
|
+
xxl: PropTypes$1.bool,
|
|
10493
|
+
fluid: PropTypes$1.bool,
|
|
10261
10494
|
};
|
|
10262
10495
|
CContainer.displayName = 'CContainer';
|
|
10263
10496
|
|
|
@@ -10293,15 +10526,15 @@ var CRow = React$1.forwardRef(function (_a, ref) {
|
|
|
10293
10526
|
});
|
|
10294
10527
|
return (React$1.createElement("div", { className: classNames$1('row', repsonsiveClassNames, className), ref: ref }, children));
|
|
10295
10528
|
});
|
|
10296
|
-
var bp = PropTypes.shape({
|
|
10297
|
-
cols: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.string]),
|
|
10298
|
-
gutter: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
10299
|
-
gutterX: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
10300
|
-
gutterY: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
10529
|
+
var bp = PropTypes$1.shape({
|
|
10530
|
+
cols: PropTypes$1.oneOfType([PropTypes$1.oneOf(['auto']), PropTypes$1.number, PropTypes$1.string]),
|
|
10531
|
+
gutter: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.number]),
|
|
10532
|
+
gutterX: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.number]),
|
|
10533
|
+
gutterY: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.number]),
|
|
10301
10534
|
});
|
|
10302
10535
|
CRow.propTypes = {
|
|
10303
|
-
children: PropTypes.node,
|
|
10304
|
-
className: PropTypes.string,
|
|
10536
|
+
children: PropTypes$1.node,
|
|
10537
|
+
className: PropTypes$1.string,
|
|
10305
10538
|
xs: bp,
|
|
10306
10539
|
sm: bp,
|
|
10307
10540
|
md: bp,
|
|
@@ -10317,11 +10550,11 @@ var CHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
10317
10550
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('header', (_b = {}, _b["header-".concat(position)] = position, _b), className) }, rest, { ref: ref }), container ? (React$1.createElement("div", { className: typeof container === 'string' ? "container-".concat(container) : 'container' }, children)) : (React$1.createElement(React$1.Fragment, null, children))));
|
|
10318
10551
|
});
|
|
10319
10552
|
CHeader.propTypes = {
|
|
10320
|
-
children: PropTypes.node,
|
|
10321
|
-
className: PropTypes.string,
|
|
10322
|
-
container: PropTypes.oneOfType([
|
|
10323
|
-
PropTypes.bool,
|
|
10324
|
-
PropTypes.oneOf([
|
|
10553
|
+
children: PropTypes$1.node,
|
|
10554
|
+
className: PropTypes$1.string,
|
|
10555
|
+
container: PropTypes$1.oneOfType([
|
|
10556
|
+
PropTypes$1.bool,
|
|
10557
|
+
PropTypes$1.oneOf([
|
|
10325
10558
|
'sm',
|
|
10326
10559
|
'md',
|
|
10327
10560
|
'lg',
|
|
@@ -10330,7 +10563,7 @@ CHeader.propTypes = {
|
|
|
10330
10563
|
'fluid',
|
|
10331
10564
|
]),
|
|
10332
10565
|
]),
|
|
10333
|
-
position: PropTypes.oneOf(['fixed', 'sticky']),
|
|
10566
|
+
position: PropTypes$1.oneOf(['fixed', 'sticky']),
|
|
10334
10567
|
};
|
|
10335
10568
|
CHeader.displayName = 'CHeader';
|
|
10336
10569
|
|
|
@@ -10339,9 +10572,9 @@ var CHeaderBrand = React$1.forwardRef(function (_a, ref) {
|
|
|
10339
10572
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('header-brand', className) }, rest, { ref: ref }), children));
|
|
10340
10573
|
});
|
|
10341
10574
|
CHeaderBrand.propTypes = {
|
|
10342
|
-
children: PropTypes.node,
|
|
10343
|
-
className: PropTypes.string,
|
|
10344
|
-
component: PropTypes.elementType,
|
|
10575
|
+
children: PropTypes$1.node,
|
|
10576
|
+
className: PropTypes$1.string,
|
|
10577
|
+
component: PropTypes$1.elementType,
|
|
10345
10578
|
};
|
|
10346
10579
|
CHeaderBrand.displayName = 'CHeaderBrand';
|
|
10347
10580
|
|
|
@@ -10350,7 +10583,7 @@ var CHeaderDivider = React$1.forwardRef(function (_a, ref) {
|
|
|
10350
10583
|
return React$1.createElement("div", __assign$1({ className: classNames$1('header-divider', className) }, rest, { ref: ref }));
|
|
10351
10584
|
});
|
|
10352
10585
|
CHeaderDivider.propTypes = {
|
|
10353
|
-
className: PropTypes.string,
|
|
10586
|
+
className: PropTypes$1.string,
|
|
10354
10587
|
};
|
|
10355
10588
|
CHeaderDivider.displayName = 'CHeaderDivider';
|
|
10356
10589
|
|
|
@@ -10359,9 +10592,9 @@ var CHeaderNav = React$1.forwardRef(function (_a, ref) {
|
|
|
10359
10592
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('header-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
10360
10593
|
});
|
|
10361
10594
|
CHeaderNav.propTypes = {
|
|
10362
|
-
children: PropTypes.node,
|
|
10363
|
-
className: PropTypes.string,
|
|
10364
|
-
component: PropTypes.elementType,
|
|
10595
|
+
children: PropTypes$1.node,
|
|
10596
|
+
className: PropTypes$1.string,
|
|
10597
|
+
component: PropTypes$1.elementType,
|
|
10365
10598
|
};
|
|
10366
10599
|
CHeaderNav.displayName = 'CHeaderNav';
|
|
10367
10600
|
|
|
@@ -10370,8 +10603,8 @@ var CHeaderText = React$1.forwardRef(function (_a, ref) {
|
|
|
10370
10603
|
return (React$1.createElement("span", __assign$1({ className: classNames$1('header-text', className) }, rest, { ref: ref }), children));
|
|
10371
10604
|
});
|
|
10372
10605
|
CHeaderText.propTypes = {
|
|
10373
|
-
children: PropTypes.node,
|
|
10374
|
-
className: PropTypes.string,
|
|
10606
|
+
children: PropTypes$1.node,
|
|
10607
|
+
className: PropTypes$1.string,
|
|
10375
10608
|
};
|
|
10376
10609
|
CHeaderText.displayName = 'CHeaderText';
|
|
10377
10610
|
|
|
@@ -10380,8 +10613,8 @@ var CHeaderToggler = React$1.forwardRef(function (_a, ref) {
|
|
|
10380
10613
|
return (React$1.createElement("button", __assign$1({ type: "button", className: classNames$1('header-toggler', className) }, rest, { ref: ref }), children !== null && children !== void 0 ? children : React$1.createElement("span", { className: "header-toggler-icon" })));
|
|
10381
10614
|
});
|
|
10382
10615
|
CHeaderToggler.propTypes = {
|
|
10383
|
-
children: PropTypes.node,
|
|
10384
|
-
className: PropTypes.string,
|
|
10616
|
+
children: PropTypes$1.node,
|
|
10617
|
+
className: PropTypes$1.string,
|
|
10385
10618
|
};
|
|
10386
10619
|
CHeaderToggler.displayName = 'CHeaderToggler';
|
|
10387
10620
|
|
|
@@ -10397,11 +10630,11 @@ var CImage = React$1.forwardRef(function (_a, ref) {
|
|
|
10397
10630
|
_b), className) || undefined }, rest, { ref: ref })));
|
|
10398
10631
|
});
|
|
10399
10632
|
CImage.propTypes = {
|
|
10400
|
-
align: PropTypes.oneOf(['start', 'center', 'end']),
|
|
10401
|
-
className: PropTypes.string,
|
|
10402
|
-
fluid: PropTypes.bool,
|
|
10403
|
-
rounded: PropTypes.bool,
|
|
10404
|
-
thumbnail: PropTypes.bool,
|
|
10633
|
+
align: PropTypes$1.oneOf(['start', 'center', 'end']),
|
|
10634
|
+
className: PropTypes$1.string,
|
|
10635
|
+
fluid: PropTypes$1.bool,
|
|
10636
|
+
rounded: PropTypes$1.bool,
|
|
10637
|
+
thumbnail: PropTypes$1.bool,
|
|
10405
10638
|
};
|
|
10406
10639
|
CImage.displayName = 'CImage';
|
|
10407
10640
|
|
|
@@ -10415,11 +10648,11 @@ var CListGroup = React$1.forwardRef(function (_a, ref) {
|
|
|
10415
10648
|
_b), className), ref: ref }, children));
|
|
10416
10649
|
});
|
|
10417
10650
|
CListGroup.propTypes = {
|
|
10418
|
-
children: PropTypes.node,
|
|
10419
|
-
className: PropTypes.string,
|
|
10420
|
-
component: PropTypes.elementType,
|
|
10421
|
-
flush: PropTypes.bool,
|
|
10422
|
-
layout: PropTypes.oneOf([
|
|
10651
|
+
children: PropTypes$1.node,
|
|
10652
|
+
className: PropTypes$1.string,
|
|
10653
|
+
component: PropTypes$1.elementType,
|
|
10654
|
+
flush: PropTypes$1.bool,
|
|
10655
|
+
layout: PropTypes$1.oneOf([
|
|
10423
10656
|
'horizontal',
|
|
10424
10657
|
'horizontal-sm',
|
|
10425
10658
|
'horizontal-md',
|
|
@@ -10448,12 +10681,12 @@ var CListGroupItem = React$1.forwardRef(function (_a, ref) {
|
|
|
10448
10681
|
_b), className) }, rest), children));
|
|
10449
10682
|
});
|
|
10450
10683
|
CListGroupItem.propTypes = {
|
|
10451
|
-
active: PropTypes.bool,
|
|
10452
|
-
children: PropTypes.node,
|
|
10453
|
-
className: PropTypes.string,
|
|
10684
|
+
active: PropTypes$1.bool,
|
|
10685
|
+
children: PropTypes$1.node,
|
|
10686
|
+
className: PropTypes$1.string,
|
|
10454
10687
|
color: colorPropType,
|
|
10455
|
-
component: PropTypes.elementType,
|
|
10456
|
-
disabled: PropTypes.bool,
|
|
10688
|
+
component: PropTypes$1.elementType,
|
|
10689
|
+
disabled: PropTypes$1.bool,
|
|
10457
10690
|
};
|
|
10458
10691
|
CListGroupItem.displayName = 'CListGroupItem';
|
|
10459
10692
|
|
|
@@ -10477,13 +10710,13 @@ var CLoadingButton = React$1.forwardRef(function (_a, ref) {
|
|
|
10477
10710
|
children));
|
|
10478
10711
|
});
|
|
10479
10712
|
CLoadingButton.propTypes = {
|
|
10480
|
-
children: PropTypes.node,
|
|
10481
|
-
className: PropTypes.string,
|
|
10482
|
-
disabledOnLoading: PropTypes.bool,
|
|
10483
|
-
loading: PropTypes.bool,
|
|
10484
|
-
onClick: PropTypes.func,
|
|
10485
|
-
spinnerType: PropTypes.oneOf(['border', 'grow']),
|
|
10486
|
-
timeout: PropTypes.number,
|
|
10713
|
+
children: PropTypes$1.node,
|
|
10714
|
+
className: PropTypes$1.string,
|
|
10715
|
+
disabledOnLoading: PropTypes$1.bool,
|
|
10716
|
+
loading: PropTypes$1.bool,
|
|
10717
|
+
onClick: PropTypes$1.func,
|
|
10718
|
+
spinnerType: PropTypes$1.oneOf(['border', 'grow']),
|
|
10719
|
+
timeout: PropTypes$1.number,
|
|
10487
10720
|
};
|
|
10488
10721
|
CLoadingButton.displayName = 'CLoadingButton';
|
|
10489
10722
|
|
|
@@ -10492,8 +10725,8 @@ var CModalContent = React$1.forwardRef(function (_a, ref) {
|
|
|
10492
10725
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-content', className) }, rest, { ref: ref }), children));
|
|
10493
10726
|
});
|
|
10494
10727
|
CModalContent.propTypes = {
|
|
10495
|
-
children: PropTypes.node,
|
|
10496
|
-
className: PropTypes.string,
|
|
10728
|
+
children: PropTypes$1.node,
|
|
10729
|
+
className: PropTypes$1.string,
|
|
10497
10730
|
};
|
|
10498
10731
|
CModalContent.displayName = 'CModalContent';
|
|
10499
10732
|
|
|
@@ -10511,26 +10744,27 @@ var CModalDialog = React$1.forwardRef(function (_a, ref) {
|
|
|
10511
10744
|
_b), className) }, rest, { ref: ref }), children));
|
|
10512
10745
|
});
|
|
10513
10746
|
CModalDialog.propTypes = {
|
|
10514
|
-
alignment: PropTypes.oneOf(['top', 'center']),
|
|
10515
|
-
children: PropTypes.node,
|
|
10516
|
-
className: PropTypes.string,
|
|
10517
|
-
fullscreen: PropTypes.oneOfType([
|
|
10518
|
-
PropTypes.bool,
|
|
10519
|
-
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
10747
|
+
alignment: PropTypes$1.oneOf(['top', 'center']),
|
|
10748
|
+
children: PropTypes$1.node,
|
|
10749
|
+
className: PropTypes$1.string,
|
|
10750
|
+
fullscreen: PropTypes$1.oneOfType([
|
|
10751
|
+
PropTypes$1.bool,
|
|
10752
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
10520
10753
|
]),
|
|
10521
|
-
scrollable: PropTypes.bool,
|
|
10522
|
-
size: PropTypes.oneOf(['sm', 'lg', 'xl']),
|
|
10754
|
+
scrollable: PropTypes$1.bool,
|
|
10755
|
+
size: PropTypes$1.oneOf(['sm', 'lg', 'xl']),
|
|
10523
10756
|
};
|
|
10524
10757
|
CModalDialog.displayName = 'CModalDialog';
|
|
10525
10758
|
|
|
10526
10759
|
var CModalContext = React$1.createContext({});
|
|
10527
10760
|
var CModal = React$1.forwardRef(function (_a, ref) {
|
|
10528
|
-
var children = _a.children, alignment = _a.alignment, _b = _a.backdrop, backdrop = _b === void 0 ? true : _b, className = _a.className, _c = _a.duration, duration = _c === void 0 ? 150 : _c, fullscreen = _a.fullscreen,
|
|
10761
|
+
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"]);
|
|
10762
|
+
var activeElementRef = React$1.useRef(null);
|
|
10529
10763
|
var modalRef = React$1.useRef(null);
|
|
10530
10764
|
var modalContentRef = React$1.useRef(null);
|
|
10531
10765
|
var forkedRef = useForkedRef(ref, modalRef);
|
|
10532
|
-
var
|
|
10533
|
-
var
|
|
10766
|
+
var _j = React$1.useState(visible), _visible = _j[0], setVisible = _j[1];
|
|
10767
|
+
var _k = React$1.useState(false), staticBackdrop = _k[0], setStaticBackdrop = _k[1];
|
|
10534
10768
|
var contextValues = {
|
|
10535
10769
|
visible: _visible,
|
|
10536
10770
|
setVisible: setVisible,
|
|
@@ -10539,10 +10773,17 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
10539
10773
|
setVisible(visible);
|
|
10540
10774
|
}, [visible]);
|
|
10541
10775
|
React$1.useEffect(function () {
|
|
10542
|
-
|
|
10543
|
-
|
|
10776
|
+
var _a;
|
|
10777
|
+
if (_visible) {
|
|
10778
|
+
activeElementRef.current = document.activeElement;
|
|
10779
|
+
document.addEventListener('mouseup', handleClickOutside);
|
|
10780
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
10781
|
+
}
|
|
10782
|
+
else {
|
|
10783
|
+
(_a = activeElementRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
10784
|
+
}
|
|
10544
10785
|
return function () {
|
|
10545
|
-
document.removeEventListener('
|
|
10786
|
+
document.removeEventListener('mouseup', handleClickOutside);
|
|
10546
10787
|
document.removeEventListener('keydown', handleKeyDown);
|
|
10547
10788
|
};
|
|
10548
10789
|
}, [_visible]);
|
|
@@ -10567,7 +10808,7 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
10567
10808
|
}
|
|
10568
10809
|
setTimeout(function () {
|
|
10569
10810
|
var _a;
|
|
10570
|
-
(_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
10811
|
+
focus && ((_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.focus());
|
|
10571
10812
|
}, transition ? duration : 0);
|
|
10572
10813
|
}
|
|
10573
10814
|
else {
|
|
@@ -10599,36 +10840,39 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
10599
10840
|
return (React$1.createElement(React$1.Fragment, null,
|
|
10600
10841
|
React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: modalRef, onEnter: onShow, onExit: onClose, unmountOnExit: unmountOnClose, timeout: transition ? duration : 0 }, function (state) { return (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
10601
10842
|
React$1.createElement(CModalContext.Provider, { value: contextValues },
|
|
10602
|
-
React$1.createElement("div", { className: classNames$1('modal', {
|
|
10843
|
+
React$1.createElement("div", __assign$1({ className: classNames$1('modal', {
|
|
10603
10844
|
'modal-static': staticBackdrop,
|
|
10604
10845
|
fade: transition,
|
|
10605
10846
|
show: state === 'entered',
|
|
10606
|
-
}, className), tabIndex: -1
|
|
10847
|
+
}, className), tabIndex: -1 }, (_visible
|
|
10848
|
+
? { 'aria-modal': true, role: 'dialog' }
|
|
10849
|
+
: { 'aria-hidden': 'true' }), { style: __assign$1({}, (state !== 'exited' && { display: 'block' })) }, rest, { ref: forkedRef }),
|
|
10607
10850
|
React$1.createElement(CModalDialog, { alignment: alignment, fullscreen: fullscreen, scrollable: scrollable, size: size },
|
|
10608
|
-
React$1.createElement(CModalContent,
|
|
10851
|
+
React$1.createElement(CModalContent, { ref: modalContentRef }, children)))))); }),
|
|
10609
10852
|
backdrop && (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
10610
10853
|
React$1.createElement(CBackdrop, { visible: _visible })))));
|
|
10611
10854
|
});
|
|
10612
10855
|
CModal.propTypes = {
|
|
10613
|
-
alignment: PropTypes.oneOf(['top', 'center']),
|
|
10614
|
-
backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['static'])]),
|
|
10615
|
-
children: PropTypes.node,
|
|
10616
|
-
className: PropTypes.string,
|
|
10617
|
-
duration: PropTypes.number,
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
PropTypes.
|
|
10856
|
+
alignment: PropTypes$1.oneOf(['top', 'center']),
|
|
10857
|
+
backdrop: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.oneOf(['static'])]),
|
|
10858
|
+
children: PropTypes$1.node,
|
|
10859
|
+
className: PropTypes$1.string,
|
|
10860
|
+
duration: PropTypes$1.number,
|
|
10861
|
+
focus: PropTypes$1.bool,
|
|
10862
|
+
fullscreen: PropTypes$1.oneOfType([
|
|
10863
|
+
PropTypes$1.bool,
|
|
10864
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
10621
10865
|
]),
|
|
10622
|
-
keyboard: PropTypes.bool,
|
|
10623
|
-
onClose: PropTypes.func,
|
|
10624
|
-
onClosePrevented: PropTypes.func,
|
|
10625
|
-
onShow: PropTypes.func,
|
|
10626
|
-
portal: PropTypes.bool,
|
|
10627
|
-
scrollable: PropTypes.bool,
|
|
10628
|
-
size: PropTypes.oneOf(['sm', 'lg', 'xl']),
|
|
10629
|
-
transition: PropTypes.bool,
|
|
10630
|
-
unmountOnClose: PropTypes.bool,
|
|
10631
|
-
visible: PropTypes.bool,
|
|
10866
|
+
keyboard: PropTypes$1.bool,
|
|
10867
|
+
onClose: PropTypes$1.func,
|
|
10868
|
+
onClosePrevented: PropTypes$1.func,
|
|
10869
|
+
onShow: PropTypes$1.func,
|
|
10870
|
+
portal: PropTypes$1.bool,
|
|
10871
|
+
scrollable: PropTypes$1.bool,
|
|
10872
|
+
size: PropTypes$1.oneOf(['sm', 'lg', 'xl']),
|
|
10873
|
+
transition: PropTypes$1.bool,
|
|
10874
|
+
unmountOnClose: PropTypes$1.bool,
|
|
10875
|
+
visible: PropTypes$1.bool,
|
|
10632
10876
|
};
|
|
10633
10877
|
CModal.displayName = 'CModal';
|
|
10634
10878
|
|
|
@@ -10637,8 +10881,8 @@ var CModalBody = React$1.forwardRef(function (_a, ref) {
|
|
|
10637
10881
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-body', className) }, rest, { ref: ref }), children));
|
|
10638
10882
|
});
|
|
10639
10883
|
CModalBody.propTypes = {
|
|
10640
|
-
children: PropTypes.node,
|
|
10641
|
-
className: PropTypes.string,
|
|
10884
|
+
children: PropTypes$1.node,
|
|
10885
|
+
className: PropTypes$1.string,
|
|
10642
10886
|
};
|
|
10643
10887
|
CModalBody.displayName = 'CModalBody';
|
|
10644
10888
|
|
|
@@ -10647,8 +10891,8 @@ var CModalFooter = React$1.forwardRef(function (_a, ref) {
|
|
|
10647
10891
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-footer', className) }, rest, { ref: ref }), children));
|
|
10648
10892
|
});
|
|
10649
10893
|
CModalFooter.propTypes = {
|
|
10650
|
-
children: PropTypes.node,
|
|
10651
|
-
className: PropTypes.string,
|
|
10894
|
+
children: PropTypes$1.node,
|
|
10895
|
+
className: PropTypes$1.string,
|
|
10652
10896
|
};
|
|
10653
10897
|
CModalFooter.displayName = 'CModalFooter';
|
|
10654
10898
|
|
|
@@ -10660,9 +10904,9 @@ var CModalHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
10660
10904
|
closeButton && React$1.createElement(CCloseButton, { onClick: function () { return setVisible(false); } })));
|
|
10661
10905
|
});
|
|
10662
10906
|
CModalHeader.propTypes = {
|
|
10663
|
-
children: PropTypes.node,
|
|
10664
|
-
className: PropTypes.string,
|
|
10665
|
-
closeButton: PropTypes.bool,
|
|
10907
|
+
children: PropTypes$1.node,
|
|
10908
|
+
className: PropTypes$1.string,
|
|
10909
|
+
closeButton: PropTypes$1.bool,
|
|
10666
10910
|
};
|
|
10667
10911
|
CModalHeader.displayName = 'CModalHeader';
|
|
10668
10912
|
|
|
@@ -10671,16 +10915,16 @@ var CModalTitle = React$1.forwardRef(function (_a, ref) {
|
|
|
10671
10915
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('modal-title', className) }, rest, { ref: ref }), children));
|
|
10672
10916
|
});
|
|
10673
10917
|
CModalTitle.propTypes = {
|
|
10674
|
-
children: PropTypes.node,
|
|
10675
|
-
className: PropTypes.string,
|
|
10676
|
-
component: PropTypes.elementType,
|
|
10918
|
+
children: PropTypes$1.node,
|
|
10919
|
+
className: PropTypes$1.string,
|
|
10920
|
+
component: PropTypes$1.elementType,
|
|
10677
10921
|
};
|
|
10678
10922
|
CModalTitle.displayName = 'CModalTitle';
|
|
10679
10923
|
|
|
10680
10924
|
var createNativeOptions = function (options) {
|
|
10681
10925
|
return options &&
|
|
10682
10926
|
options.map(function (option, index) {
|
|
10683
|
-
return option.options ? (React$1.createElement("optgroup", { label: option.label, key: index }, createNativeOptions(option.options))) : (React$1.createElement("option", { value: option.value, key: index, disabled: option.disabled }, option.
|
|
10927
|
+
return option.options ? (React$1.createElement("optgroup", { label: option.label, key: index }, createNativeOptions(option.options))) : (React$1.createElement("option", { value: option.value, key: index, disabled: option.disabled }, option.label));
|
|
10684
10928
|
});
|
|
10685
10929
|
};
|
|
10686
10930
|
var CMultiSelectNativeSelect = React$1.forwardRef(function (_a, ref) {
|
|
@@ -10688,11 +10932,11 @@ var CMultiSelectNativeSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
10688
10932
|
return (React$1.createElement("select", __assign$1({ className: "multi-select-new" }, (id && { id: "".concat(id, "-multi-select") }), (id && { name: "".concat(id, "-multi-select") }), { tabIndex: -1, style: { display: 'none' } }, rest, { ref: ref }), options && createNativeOptions(options)));
|
|
10689
10933
|
});
|
|
10690
10934
|
CMultiSelectNativeSelect.propTypes = {
|
|
10691
|
-
options: PropTypes.array,
|
|
10692
|
-
value: PropTypes.oneOfType([
|
|
10693
|
-
PropTypes.number,
|
|
10694
|
-
PropTypes.string,
|
|
10695
|
-
PropTypes.arrayOf(PropTypes.string.isRequired),
|
|
10935
|
+
options: PropTypes$1.array,
|
|
10936
|
+
value: PropTypes$1.oneOfType([
|
|
10937
|
+
PropTypes$1.number,
|
|
10938
|
+
PropTypes$1.string,
|
|
10939
|
+
PropTypes$1.arrayOf(PropTypes$1.string.isRequired),
|
|
10696
10940
|
]),
|
|
10697
10941
|
};
|
|
10698
10942
|
CMultiSelectNativeSelect.displayName = 'CMultiSelectNativeSelect';
|
|
@@ -10765,13 +11009,13 @@ var CVirtualScroller = React$1.forwardRef(function (_a, ref) {
|
|
|
10765
11009
|
}))));
|
|
10766
11010
|
});
|
|
10767
11011
|
CVirtualScroller.propTypes = {
|
|
10768
|
-
onScroll: PropTypes.func,
|
|
10769
|
-
visibleItems: PropTypes.number.isRequired,
|
|
11012
|
+
onScroll: PropTypes$1.func,
|
|
11013
|
+
visibleItems: PropTypes$1.number.isRequired,
|
|
10770
11014
|
};
|
|
10771
11015
|
CVirtualScroller.displayName = 'CVirtualScroller';
|
|
10772
11016
|
|
|
10773
|
-
var createOption = function (
|
|
10774
|
-
var value =
|
|
11017
|
+
var createOption = function (label, options) {
|
|
11018
|
+
var value = label.toLowerCase().replace(/\s/g, '-');
|
|
10775
11019
|
var uniqueValue = value;
|
|
10776
11020
|
var i = 1;
|
|
10777
11021
|
while (options.some(function (option) { return String(option.value) === uniqueValue; })) {
|
|
@@ -10781,7 +11025,7 @@ var createOption = function (text, options) {
|
|
|
10781
11025
|
return [
|
|
10782
11026
|
{
|
|
10783
11027
|
value: uniqueValue,
|
|
10784
|
-
|
|
11028
|
+
label: label,
|
|
10785
11029
|
custom: true,
|
|
10786
11030
|
},
|
|
10787
11031
|
];
|
|
@@ -10793,9 +11037,9 @@ var filterOptionsList = function (search, _options) {
|
|
|
10793
11037
|
var option = _options_1[_i];
|
|
10794
11038
|
var options = option.options &&
|
|
10795
11039
|
option.options.filter(function (option) {
|
|
10796
|
-
return option.
|
|
11040
|
+
return option.lable && option.label.toLowerCase().includes(search.toLowerCase());
|
|
10797
11041
|
});
|
|
10798
|
-
if ((option.
|
|
11042
|
+
if ((option.lable && option.label.toLowerCase().includes(search.toLowerCase())) ||
|
|
10799
11043
|
(options && options.length > 0)) {
|
|
10800
11044
|
optionsList.push(Object.assign({}, option, options && options.length > 0 && { options: options }));
|
|
10801
11045
|
}
|
|
@@ -10897,7 +11141,7 @@ var CMultiSelectOptions = React$1.forwardRef(function (_a, ref) {
|
|
|
10897
11141
|
'form-multi-select-option-with-checkbox': optionsStyle === 'checkbox',
|
|
10898
11142
|
'form-multi-selected': selected.some(function (_option) { return _option.value === option.value; }),
|
|
10899
11143
|
disabled: option.disabled,
|
|
10900
|
-
}), key: index, onClick: function () { return handleOptionOnClick && handleOptionOnClick(option); }, onKeyDown: function (event) { return handleKeyDown(event, option); }, tabIndex: 0 }, optionsTemplate ? optionsTemplate(option) : option.
|
|
11144
|
+
}), key: index, onClick: function () { return handleOptionOnClick && handleOptionOnClick(option); }, onKeyDown: function (event) { return handleKeyDown(event, option); }, tabIndex: 0 }, optionsTemplate ? optionsTemplate(option) : option.label)) : (React$1.createElement("div", { className: "form-multi-select-optgroup-label", key: index }, optionsGroupsTemplate ? optionsGroupsTemplate(option) : option.label));
|
|
10901
11145
|
})) : (React$1.createElement("div", { className: "form-multi-select-options-empty" }, searchNoResultsLabel));
|
|
10902
11146
|
};
|
|
10903
11147
|
return (React$1.createElement(React$1.Fragment, null,
|
|
@@ -10907,16 +11151,16 @@ var CMultiSelectOptions = React$1.forwardRef(function (_a, ref) {
|
|
|
10907
11151
|
loading && React$1.createElement(CElementCover, null)));
|
|
10908
11152
|
});
|
|
10909
11153
|
CMultiSelectOptions.propTypes = {
|
|
10910
|
-
handleOptionOnClick: PropTypes.func,
|
|
10911
|
-
loading: PropTypes.bool,
|
|
10912
|
-
options: PropTypes.array.isRequired,
|
|
10913
|
-
optionsMaxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
10914
|
-
optionsStyle: PropTypes.oneOf(['checkbox', 'text']),
|
|
10915
|
-
optionsTemplate: PropTypes.func,
|
|
10916
|
-
optionsGroupsTemplate: PropTypes.func,
|
|
10917
|
-
searchNoResultsLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
10918
|
-
virtualScroller: PropTypes.bool,
|
|
10919
|
-
visibleItems: PropTypes.number,
|
|
11154
|
+
handleOptionOnClick: PropTypes$1.func,
|
|
11155
|
+
loading: PropTypes$1.bool,
|
|
11156
|
+
options: PropTypes$1.array.isRequired,
|
|
11157
|
+
optionsMaxHeight: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
|
|
11158
|
+
optionsStyle: PropTypes$1.oneOf(['checkbox', 'text']),
|
|
11159
|
+
optionsTemplate: PropTypes$1.func,
|
|
11160
|
+
optionsGroupsTemplate: PropTypes$1.func,
|
|
11161
|
+
searchNoResultsLabel: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
11162
|
+
virtualScroller: PropTypes$1.bool,
|
|
11163
|
+
visibleItems: PropTypes$1.number,
|
|
10920
11164
|
};
|
|
10921
11165
|
CMultiSelectOptions.displayName = 'CMultiSelectOptions';
|
|
10922
11166
|
|
|
@@ -10936,7 +11180,7 @@ var CMultiSelectSelection = React$1.forwardRef(function (_a, ref) {
|
|
|
10936
11180
|
selected.map(function (option, index) {
|
|
10937
11181
|
if (selectionType === 'tags') {
|
|
10938
11182
|
return (React$1.createElement("span", { className: "form-multi-select-tag", key: index },
|
|
10939
|
-
option.
|
|
11183
|
+
option.label,
|
|
10940
11184
|
!option.disabled && (React$1.createElement("button", { className: "form-multi-select-tag-delete", "aria-label": "Close", onClick: function () { return onRemove && onRemove(option); } }))));
|
|
10941
11185
|
}
|
|
10942
11186
|
return;
|
|
@@ -10944,20 +11188,20 @@ var CMultiSelectSelection = React$1.forwardRef(function (_a, ref) {
|
|
|
10944
11188
|
multiple &&
|
|
10945
11189
|
selectionType === 'text' &&
|
|
10946
11190
|
selected.map(function (option, index) { return (React$1.createElement("span", { key: index },
|
|
10947
|
-
option.
|
|
11191
|
+
option.label,
|
|
10948
11192
|
index === selected.length - 1 ? '' : ',',
|
|
10949
11193
|
"\u00A0")); }),
|
|
10950
|
-
!multiple && !search && selected.map(function (option) { return option.
|
|
11194
|
+
!multiple && !search && selected.map(function (option) { return option.label; })[0],
|
|
10951
11195
|
children));
|
|
10952
11196
|
});
|
|
10953
11197
|
CMultiSelectSelection.propTypes = {
|
|
10954
|
-
multiple: PropTypes.bool,
|
|
10955
|
-
onRemove: PropTypes.func,
|
|
10956
|
-
placeholder: PropTypes.string,
|
|
10957
|
-
search: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['external'])]),
|
|
10958
|
-
selected: PropTypes.array,
|
|
10959
|
-
selectionType: PropTypes.oneOf(['counter', 'tags', 'text']),
|
|
10960
|
-
selectionTypeCounterText: PropTypes.string,
|
|
11198
|
+
multiple: PropTypes$1.bool,
|
|
11199
|
+
onRemove: PropTypes$1.func,
|
|
11200
|
+
placeholder: PropTypes$1.string,
|
|
11201
|
+
search: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.oneOf(['external'])]),
|
|
11202
|
+
selected: PropTypes$1.array,
|
|
11203
|
+
selectionType: PropTypes$1.oneOf(['counter', 'tags', 'text']),
|
|
11204
|
+
selectionTypeCounterText: PropTypes$1.string,
|
|
10961
11205
|
};
|
|
10962
11206
|
CMultiSelectSelection.displayName = 'CMultiSelectSelection';
|
|
10963
11207
|
|
|
@@ -10984,7 +11228,7 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
10984
11228
|
var flattenedOptions = React$1.useMemo(function () { return flattenOptionsArray(options); }, [JSON.stringify(options)]);
|
|
10985
11229
|
var userOption = React$1.useMemo(function () {
|
|
10986
11230
|
if (allowCreateOptions &&
|
|
10987
|
-
filteredOptions.some(function (option) { return option.
|
|
11231
|
+
filteredOptions.some(function (option) { return option.label && option.label.toLowerCase() === searchValue.toLowerCase(); })) {
|
|
10988
11232
|
return false;
|
|
10989
11233
|
}
|
|
10990
11234
|
return searchRef.current && createOption(String(searchValue), flattenedOptions);
|
|
@@ -11067,7 +11311,7 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11067
11311
|
}
|
|
11068
11312
|
if (!userOption) {
|
|
11069
11313
|
setSelected(__spreadArray(__spreadArray([], selected, true), [
|
|
11070
|
-
filteredOptions.find(function (option) { return String(option.
|
|
11314
|
+
filteredOptions.find(function (option) { return String(option.label).toLowerCase() === searchValue.toLowerCase(); }),
|
|
11071
11315
|
], false));
|
|
11072
11316
|
}
|
|
11073
11317
|
setSearchValue('');
|
|
@@ -11133,7 +11377,7 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11133
11377
|
selectionType === 'counter' && {
|
|
11134
11378
|
placeholder: "".concat(selected.length, " ").concat(selectionTypeCounterText),
|
|
11135
11379
|
}), (selected.length > 0 &&
|
|
11136
|
-
!multiple && { placeholder: selected.map(function (option) { return option.
|
|
11380
|
+
!multiple && { placeholder: selected.map(function (option) { return option.label; })[0] }), (multiple &&
|
|
11137
11381
|
selected.length > 0 &&
|
|
11138
11382
|
selectionType !== 'counter' && { size: searchValue.length + 2 }), { ref: searchRef })))),
|
|
11139
11383
|
React$1.createElement("div", { className: "form-multi-select-buttons" },
|
|
@@ -11149,7 +11393,7 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11149
11393
|
? userOption || []
|
|
11150
11394
|
: filteredOptions, optionsMaxHeight: optionsMaxHeight, optionsStyle: optionsStyle, optionsTemplate: optionsTemplate, optionsGroupsTemplate: optionsGroupsTemplate, searchNoResultsLabel: searchNoResultsLabel, selected: selected, virtualScroller: virtualScroller, visibleItems: visibleItems })))));
|
|
11151
11395
|
});
|
|
11152
|
-
CMultiSelect.propTypes = __assign$1({ className: PropTypes.string, cleaner: PropTypes.bool, clearSearchOnSelect: PropTypes.bool, disabled: PropTypes.bool, loading: PropTypes.bool, multiple: PropTypes.bool, onChange: PropTypes.func, onFilterChange: PropTypes.func, onHide: PropTypes.func, onShow: PropTypes.func, options: PropTypes.array.isRequired, optionsMaxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), optionsStyle: PropTypes.oneOf(['checkbox', 'text']), optionsTemplate: PropTypes.func, optionsGroupsTemplate: PropTypes.func, placeholder: PropTypes.string, required: PropTypes.bool, search: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['external'])]), searchNoResultsLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), selectAll: PropTypes.bool, selectAllLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), selectionType: PropTypes.oneOf(['counter', 'tags', 'text']), selectionTypeCounterText: PropTypes.string, size: PropTypes.oneOf(['sm', 'lg']), virtualScroller: PropTypes.bool, visible: PropTypes.bool, visibleItems: PropTypes.number }, CFormControlWrapper.propTypes);
|
|
11396
|
+
CMultiSelect.propTypes = __assign$1({ className: PropTypes$1.string, cleaner: PropTypes$1.bool, clearSearchOnSelect: PropTypes$1.bool, disabled: PropTypes$1.bool, loading: PropTypes$1.bool, multiple: PropTypes$1.bool, onChange: PropTypes$1.func, onFilterChange: PropTypes$1.func, onHide: PropTypes$1.func, onShow: PropTypes$1.func, options: PropTypes$1.array.isRequired, optionsMaxHeight: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]), optionsStyle: PropTypes$1.oneOf(['checkbox', 'text']), optionsTemplate: PropTypes$1.func, optionsGroupsTemplate: PropTypes$1.func, placeholder: PropTypes$1.string, required: PropTypes$1.bool, search: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.oneOf(['external'])]), searchNoResultsLabel: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]), selectAll: PropTypes$1.bool, selectAllLabel: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]), selectionType: PropTypes$1.oneOf(['counter', 'tags', 'text']), selectionTypeCounterText: PropTypes$1.string, size: PropTypes$1.oneOf(['sm', 'lg']), virtualScroller: PropTypes$1.bool, visible: PropTypes$1.bool, visibleItems: PropTypes$1.number }, CFormControlWrapper.propTypes);
|
|
11153
11397
|
CMultiSelect.displayName = 'CMultiSelect';
|
|
11154
11398
|
|
|
11155
11399
|
var CNav = React$1.forwardRef(function (_a, ref) {
|
|
@@ -11161,11 +11405,11 @@ var CNav = React$1.forwardRef(function (_a, ref) {
|
|
|
11161
11405
|
_b), className), role: "navigation" }, rest, { ref: ref }), children));
|
|
11162
11406
|
});
|
|
11163
11407
|
CNav.propTypes = {
|
|
11164
|
-
children: PropTypes.node,
|
|
11165
|
-
className: PropTypes.string,
|
|
11166
|
-
component: PropTypes.elementType,
|
|
11167
|
-
layout: PropTypes.oneOf(['fill', 'justified']),
|
|
11168
|
-
variant: PropTypes.oneOf(['
|
|
11408
|
+
children: PropTypes$1.node,
|
|
11409
|
+
className: PropTypes$1.string,
|
|
11410
|
+
component: PropTypes$1.elementType,
|
|
11411
|
+
layout: PropTypes$1.oneOf(['fill', 'justified']),
|
|
11412
|
+
variant: PropTypes$1.oneOf(['pills', 'tabs', 'underline']),
|
|
11169
11413
|
};
|
|
11170
11414
|
CNav.displayName = 'CNav';
|
|
11171
11415
|
|
|
@@ -11174,8 +11418,8 @@ var CNavGroupItems = React$1.forwardRef(function (_a, ref) {
|
|
|
11174
11418
|
return (React$1.createElement("ul", __assign$1({ className: classNames$1('nav-group-items', className) }, rest, { ref: ref }), children));
|
|
11175
11419
|
});
|
|
11176
11420
|
CNavGroupItems.propTypes = {
|
|
11177
|
-
children: PropTypes.node,
|
|
11178
|
-
className: PropTypes.string,
|
|
11421
|
+
children: PropTypes$1.node,
|
|
11422
|
+
className: PropTypes$1.string,
|
|
11179
11423
|
};
|
|
11180
11424
|
CNavGroupItems.displayName = 'CNavGroupItems';
|
|
11181
11425
|
|
|
@@ -11199,19 +11443,24 @@ var CSidebarNav = React$1.forwardRef(function (_a, ref) {
|
|
|
11199
11443
|
}))));
|
|
11200
11444
|
});
|
|
11201
11445
|
CSidebarNav.propTypes = {
|
|
11202
|
-
children: PropTypes.node,
|
|
11203
|
-
className: PropTypes.string,
|
|
11446
|
+
children: PropTypes$1.node,
|
|
11447
|
+
className: PropTypes$1.string,
|
|
11204
11448
|
};
|
|
11205
11449
|
CSidebarNav.displayName = 'CSidebarNav';
|
|
11206
11450
|
|
|
11451
|
+
var isInVisibleGroup = function (el1, el2) {
|
|
11452
|
+
var array1 = el1.toString().split('.');
|
|
11453
|
+
var array2 = el2.toString().split('.');
|
|
11454
|
+
return array2.every(function (item, index) { return item === array1[index]; });
|
|
11455
|
+
};
|
|
11207
11456
|
var CNavGroup = React$1.forwardRef(function (_a, ref) {
|
|
11208
11457
|
var children = _a.children, className = _a.className, compact = _a.compact, idx = _a.idx, toggler = _a.toggler, visible = _a.visible, rest = __rest$1(_a, ["children", "className", "compact", "idx", "toggler", "visible"]);
|
|
11209
11458
|
var _b = React$1.useState(), height = _b[0], setHeight = _b[1];
|
|
11210
11459
|
var navItemsRef = React$1.useRef(null);
|
|
11211
11460
|
var _c = React$1.useContext(CNavContext), visibleGroup = _c.visibleGroup, setVisibleGroup = _c.setVisibleGroup;
|
|
11212
|
-
var _d = React$1.useState(Boolean(visible || (idx && visibleGroup && visibleGroup
|
|
11461
|
+
var _d = React$1.useState(Boolean(visible || (idx && visibleGroup && isInVisibleGroup(visibleGroup, idx)))), _visible = _d[0], setVisible = _d[1];
|
|
11213
11462
|
React$1.useEffect(function () {
|
|
11214
|
-
setVisible(Boolean(idx && visibleGroup && visibleGroup
|
|
11463
|
+
setVisible(Boolean(idx && visibleGroup && isInVisibleGroup(visibleGroup, idx)));
|
|
11215
11464
|
}, [visibleGroup]);
|
|
11216
11465
|
var handleTogglerOnCLick = function (event) {
|
|
11217
11466
|
event.preventDefault();
|
|
@@ -11261,12 +11510,12 @@ var CNavGroup = React$1.forwardRef(function (_a, ref) {
|
|
|
11261
11510
|
}))); })));
|
|
11262
11511
|
});
|
|
11263
11512
|
CNavGroup.propTypes = {
|
|
11264
|
-
children: PropTypes.node,
|
|
11265
|
-
className: PropTypes.string,
|
|
11266
|
-
compact: PropTypes.bool,
|
|
11267
|
-
idx: PropTypes.string,
|
|
11268
|
-
toggler: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
11269
|
-
visible: PropTypes.bool,
|
|
11513
|
+
children: PropTypes$1.node,
|
|
11514
|
+
className: PropTypes$1.string,
|
|
11515
|
+
compact: PropTypes$1.bool,
|
|
11516
|
+
idx: PropTypes$1.string,
|
|
11517
|
+
toggler: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
11518
|
+
visible: PropTypes$1.bool,
|
|
11270
11519
|
};
|
|
11271
11520
|
CNavGroup.displayName = 'CNavGroup';
|
|
11272
11521
|
|
|
@@ -11283,9 +11532,9 @@ var CNavLink = React$1.forwardRef(function (_a, ref) {
|
|
|
11283
11532
|
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('nav-link', className) }, rest, { ref: forkedRef }), children));
|
|
11284
11533
|
});
|
|
11285
11534
|
CNavLink.propTypes = {
|
|
11286
|
-
children: PropTypes.node,
|
|
11287
|
-
className: PropTypes.string,
|
|
11288
|
-
idx: PropTypes.string,
|
|
11535
|
+
children: PropTypes$1.node,
|
|
11536
|
+
className: PropTypes$1.string,
|
|
11537
|
+
idx: PropTypes$1.string,
|
|
11289
11538
|
};
|
|
11290
11539
|
CNavLink.displayName = 'CNavLink';
|
|
11291
11540
|
|
|
@@ -11294,8 +11543,8 @@ var CNavItem = React$1.forwardRef(function (_a, ref) {
|
|
|
11294
11543
|
return (React$1.createElement("li", { className: classNames$1('nav-item', className), ref: ref }, rest.href || rest.to ? (React$1.createElement(CNavLink, __assign$1({ className: className }, rest), children)) : (children)));
|
|
11295
11544
|
});
|
|
11296
11545
|
CNavItem.propTypes = {
|
|
11297
|
-
children: PropTypes.node,
|
|
11298
|
-
className: PropTypes.string,
|
|
11546
|
+
children: PropTypes$1.node,
|
|
11547
|
+
className: PropTypes$1.string,
|
|
11299
11548
|
};
|
|
11300
11549
|
CNavItem.displayName = 'CNavItem';
|
|
11301
11550
|
|
|
@@ -11304,8 +11553,8 @@ var CNavTitle = React$1.forwardRef(function (_a, ref) {
|
|
|
11304
11553
|
return (React$1.createElement("li", __assign$1({ className: classNames$1('nav-title', className) }, rest, { ref: ref }), children));
|
|
11305
11554
|
});
|
|
11306
11555
|
CNavTitle.propTypes = {
|
|
11307
|
-
children: PropTypes.node,
|
|
11308
|
-
className: PropTypes.string,
|
|
11556
|
+
children: PropTypes$1.node,
|
|
11557
|
+
className: PropTypes$1.string,
|
|
11309
11558
|
};
|
|
11310
11559
|
CNavTitle.displayName = 'CNavTitle';
|
|
11311
11560
|
|
|
@@ -11314,19 +11563,18 @@ var CNavbar = React$1.forwardRef(function (_a, ref) {
|
|
|
11314
11563
|
var children = _a.children, className = _a.className, color = _a.color, colorScheme = _a.colorScheme, _c = _a.component, Component = _c === void 0 ? 'nav' : _c, container = _a.container, expand = _a.expand, placement = _a.placement, rest = __rest$1(_a, ["children", "className", "color", "colorScheme", "component", "container", "expand", "placement"]);
|
|
11315
11564
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar', (_b = {},
|
|
11316
11565
|
_b["bg-".concat(color)] = color,
|
|
11317
|
-
_b["navbar-".concat(colorScheme)] = colorScheme,
|
|
11318
11566
|
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-".concat(expand)] = expand,
|
|
11319
|
-
_b), placement, className) }, rest, { ref: ref }), container ? (React$1.createElement("div", { className: typeof container === 'string' ? "container-".concat(container) : 'container' }, children)) : (React$1.createElement(React$1.Fragment, null, children))));
|
|
11567
|
+
_b), placement, className) }, (colorScheme && { 'data-coreui-theme': colorScheme }), rest, { ref: ref }), container ? (React$1.createElement("div", { className: typeof container === 'string' ? "container-".concat(container) : 'container' }, children)) : (React$1.createElement(React$1.Fragment, null, children))));
|
|
11320
11568
|
});
|
|
11321
11569
|
CNavbar.propTypes = {
|
|
11322
|
-
children: PropTypes.node,
|
|
11323
|
-
className: PropTypes.string,
|
|
11570
|
+
children: PropTypes$1.node,
|
|
11571
|
+
className: PropTypes$1.string,
|
|
11324
11572
|
color: colorPropType,
|
|
11325
|
-
colorScheme: PropTypes.oneOf(['dark', 'light']),
|
|
11326
|
-
component: PropTypes.elementType,
|
|
11327
|
-
container: PropTypes.oneOfType([
|
|
11328
|
-
PropTypes.bool,
|
|
11329
|
-
PropTypes.oneOf([
|
|
11573
|
+
colorScheme: PropTypes$1.oneOf(['dark', 'light']),
|
|
11574
|
+
component: PropTypes$1.elementType,
|
|
11575
|
+
container: PropTypes$1.oneOfType([
|
|
11576
|
+
PropTypes$1.bool,
|
|
11577
|
+
PropTypes$1.oneOf([
|
|
11330
11578
|
'sm',
|
|
11331
11579
|
'md',
|
|
11332
11580
|
'lg',
|
|
@@ -11335,11 +11583,11 @@ CNavbar.propTypes = {
|
|
|
11335
11583
|
'fluid',
|
|
11336
11584
|
]),
|
|
11337
11585
|
]),
|
|
11338
|
-
expand: PropTypes.oneOfType([
|
|
11339
|
-
PropTypes.bool,
|
|
11340
|
-
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
11586
|
+
expand: PropTypes$1.oneOfType([
|
|
11587
|
+
PropTypes$1.bool,
|
|
11588
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
11341
11589
|
]),
|
|
11342
|
-
placement: PropTypes.oneOf(['fixed-top', 'fixed-bottom', 'sticky-top']),
|
|
11590
|
+
placement: PropTypes$1.oneOf(['fixed-top', 'fixed-bottom', 'sticky-top']),
|
|
11343
11591
|
};
|
|
11344
11592
|
CNavbar.displayName = 'CNavbar';
|
|
11345
11593
|
|
|
@@ -11349,9 +11597,9 @@ var CNavbarBrand = React$1.forwardRef(function (_a, ref) {
|
|
|
11349
11597
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar-brand', className) }, rest, { ref: ref }), children));
|
|
11350
11598
|
});
|
|
11351
11599
|
CNavbarBrand.propTypes = {
|
|
11352
|
-
children: PropTypes.node,
|
|
11353
|
-
className: PropTypes.string,
|
|
11354
|
-
component: PropTypes.elementType,
|
|
11600
|
+
children: PropTypes$1.node,
|
|
11601
|
+
className: PropTypes$1.string,
|
|
11602
|
+
component: PropTypes$1.elementType,
|
|
11355
11603
|
};
|
|
11356
11604
|
CNavbarBrand.displayName = 'CNavbarBrand';
|
|
11357
11605
|
|
|
@@ -11360,9 +11608,9 @@ var CNavbarNav = React$1.forwardRef(function (_a, ref) {
|
|
|
11360
11608
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
11361
11609
|
});
|
|
11362
11610
|
CNavbarNav.propTypes = {
|
|
11363
|
-
children: PropTypes.node,
|
|
11364
|
-
className: PropTypes.string,
|
|
11365
|
-
component: PropTypes.elementType,
|
|
11611
|
+
children: PropTypes$1.node,
|
|
11612
|
+
className: PropTypes$1.string,
|
|
11613
|
+
component: PropTypes$1.elementType,
|
|
11366
11614
|
};
|
|
11367
11615
|
CNavbarNav.displayName = 'CNavbarNav';
|
|
11368
11616
|
|
|
@@ -11371,8 +11619,8 @@ var CNavbarText = React$1.forwardRef(function (_a, ref) {
|
|
|
11371
11619
|
return (React$1.createElement("span", __assign$1({ className: classNames$1('navbar-text', className) }, rest, { ref: ref }), children));
|
|
11372
11620
|
});
|
|
11373
11621
|
CNavbarText.propTypes = {
|
|
11374
|
-
children: PropTypes.node,
|
|
11375
|
-
className: PropTypes.string,
|
|
11622
|
+
children: PropTypes$1.node,
|
|
11623
|
+
className: PropTypes$1.string,
|
|
11376
11624
|
};
|
|
11377
11625
|
CNavbarText.displayName = 'CNavbarText';
|
|
11378
11626
|
|
|
@@ -11381,13 +11629,13 @@ var CNavbarToggler = React$1.forwardRef(function (_a, ref) {
|
|
|
11381
11629
|
return (React$1.createElement("button", __assign$1({ type: "button", className: classNames$1('navbar-toggler', className) }, rest, { ref: ref }), children !== null && children !== void 0 ? children : React$1.createElement("span", { className: "navbar-toggler-icon" })));
|
|
11382
11630
|
});
|
|
11383
11631
|
CNavbarToggler.propTypes = {
|
|
11384
|
-
children: PropTypes.node,
|
|
11385
|
-
className: PropTypes.string,
|
|
11632
|
+
children: PropTypes$1.node,
|
|
11633
|
+
className: PropTypes$1.string,
|
|
11386
11634
|
};
|
|
11387
11635
|
CNavbarToggler.displayName = 'CNavbarToggler';
|
|
11388
11636
|
|
|
11389
11637
|
var COffcanvas = React$1.forwardRef(function (_a, ref) {
|
|
11390
|
-
var children = _a.children, _b = _a.backdrop, backdrop = _b === void 0 ? true : _b, className = _a.className, _c = _a.keyboard, keyboard = _c === void 0 ? true : _c, onHide = _a.onHide, onShow = _a.onShow, placement = _a.placement, _d = _a.portal, portal = _d === void 0 ? false : _d, _e = _a.responsive, responsive = _e === void 0 ? true : _e, _f = _a.scroll, scroll = _f === void 0 ? false : _f, _g = _a.visible, visible = _g === void 0 ? false : _g, rest = __rest$1(_a, ["children", "backdrop", "className", "keyboard", "onHide", "onShow", "placement", "portal", "responsive", "scroll", "visible"]);
|
|
11638
|
+
var children = _a.children, _b = _a.backdrop, backdrop = _b === void 0 ? true : _b, className = _a.className, dark = _a.dark, _c = _a.keyboard, keyboard = _c === void 0 ? true : _c, onHide = _a.onHide, onShow = _a.onShow, placement = _a.placement, _d = _a.portal, portal = _d === void 0 ? false : _d, _e = _a.responsive, responsive = _e === void 0 ? true : _e, _f = _a.scroll, scroll = _f === void 0 ? false : _f, _g = _a.visible, visible = _g === void 0 ? false : _g, rest = __rest$1(_a, ["children", "backdrop", "className", "dark", "keyboard", "onHide", "onShow", "placement", "portal", "responsive", "scroll", "visible"]);
|
|
11391
11639
|
var _h = React$1.useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
11392
11640
|
var offcanvasRef = React$1.useRef(null);
|
|
11393
11641
|
var forkedRef = useForkedRef(ref, offcanvasRef);
|
|
@@ -11428,27 +11676,28 @@ var COffcanvas = React$1.forwardRef(function (_a, ref) {
|
|
|
11428
11676
|
_a.showing = state === 'entering',
|
|
11429
11677
|
_a.show = state === 'entered',
|
|
11430
11678
|
_a['show hiding'] = state === 'exiting',
|
|
11431
|
-
_a), className), role: "dialog", tabIndex: -1, onKeyDown: handleKeyDown }, rest, { ref: forkedRef }), children)));
|
|
11679
|
+
_a), className), role: "dialog", tabIndex: -1, onKeyDown: handleKeyDown }, (dark && { 'data-coreui-theme': 'dark' }), rest, { ref: forkedRef }), children)));
|
|
11432
11680
|
}),
|
|
11433
11681
|
backdrop && (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
11434
11682
|
React$1.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleBackdropDismiss, visible: _visible })))));
|
|
11435
11683
|
});
|
|
11436
11684
|
COffcanvas.propTypes = {
|
|
11437
|
-
backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['static'])]),
|
|
11438
|
-
children: PropTypes.node,
|
|
11439
|
-
className: PropTypes.string,
|
|
11440
|
-
|
|
11441
|
-
|
|
11442
|
-
|
|
11443
|
-
|
|
11685
|
+
backdrop: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.oneOf(['static'])]),
|
|
11686
|
+
children: PropTypes$1.node,
|
|
11687
|
+
className: PropTypes$1.string,
|
|
11688
|
+
dark: PropTypes$1.bool,
|
|
11689
|
+
keyboard: PropTypes$1.bool,
|
|
11690
|
+
onHide: PropTypes$1.func,
|
|
11691
|
+
onShow: PropTypes$1.func,
|
|
11692
|
+
placement: PropTypes$1.oneOf(['start', 'end', 'top', 'bottom'])
|
|
11444
11693
|
.isRequired,
|
|
11445
|
-
portal: PropTypes.bool,
|
|
11446
|
-
responsive: PropTypes.oneOfType([
|
|
11447
|
-
PropTypes.bool,
|
|
11448
|
-
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
11694
|
+
portal: PropTypes$1.bool,
|
|
11695
|
+
responsive: PropTypes$1.oneOfType([
|
|
11696
|
+
PropTypes$1.bool,
|
|
11697
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
11449
11698
|
]),
|
|
11450
|
-
scroll: PropTypes.bool,
|
|
11451
|
-
visible: PropTypes.bool,
|
|
11699
|
+
scroll: PropTypes$1.bool,
|
|
11700
|
+
visible: PropTypes$1.bool,
|
|
11452
11701
|
};
|
|
11453
11702
|
COffcanvas.displayName = 'COffcanvas';
|
|
11454
11703
|
|
|
@@ -11457,8 +11706,8 @@ var COffcanvasBody = React$1.forwardRef(function (_a, ref) {
|
|
|
11457
11706
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('offcanvas-body', className) }, rest, { ref: ref }), children));
|
|
11458
11707
|
});
|
|
11459
11708
|
COffcanvasBody.propTypes = {
|
|
11460
|
-
children: PropTypes.node,
|
|
11461
|
-
className: PropTypes.string,
|
|
11709
|
+
children: PropTypes$1.node,
|
|
11710
|
+
className: PropTypes$1.string,
|
|
11462
11711
|
};
|
|
11463
11712
|
COffcanvasBody.displayName = 'COffcanvasBody';
|
|
11464
11713
|
|
|
@@ -11467,8 +11716,8 @@ var COffcanvasHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
11467
11716
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('offcanvas-header', className) }, rest, { ref: ref }), children));
|
|
11468
11717
|
});
|
|
11469
11718
|
COffcanvasHeader.propTypes = {
|
|
11470
|
-
children: PropTypes.node,
|
|
11471
|
-
className: PropTypes.string,
|
|
11719
|
+
children: PropTypes$1.node,
|
|
11720
|
+
className: PropTypes$1.string,
|
|
11472
11721
|
};
|
|
11473
11722
|
COffcanvasHeader.displayName = 'COffcanvasHeader';
|
|
11474
11723
|
|
|
@@ -11477,9 +11726,9 @@ var COffcanvasTitle = React$1.forwardRef(function (_a, ref) {
|
|
|
11477
11726
|
return (React$1.createElement(Component, __assign$1({ className: classNames$1('offcanvas-title', className) }, rest, { ref: ref }), children));
|
|
11478
11727
|
});
|
|
11479
11728
|
COffcanvasTitle.propTypes = {
|
|
11480
|
-
children: PropTypes.node,
|
|
11481
|
-
className: PropTypes.string,
|
|
11482
|
-
component: PropTypes.elementType,
|
|
11729
|
+
children: PropTypes$1.node,
|
|
11730
|
+
className: PropTypes$1.string,
|
|
11731
|
+
component: PropTypes$1.elementType,
|
|
11483
11732
|
};
|
|
11484
11733
|
COffcanvasTitle.displayName = 'COffcanvasTitle';
|
|
11485
11734
|
|
|
@@ -11493,10 +11742,10 @@ var CPagination = React$1.forwardRef(function (_a, ref) {
|
|
|
11493
11742
|
_b), className) }, children)));
|
|
11494
11743
|
});
|
|
11495
11744
|
CPagination.propTypes = {
|
|
11496
|
-
align: PropTypes.oneOf(['start', 'center', 'end']),
|
|
11497
|
-
children: PropTypes.node,
|
|
11498
|
-
className: PropTypes.string,
|
|
11499
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
11745
|
+
align: PropTypes$1.oneOf(['start', 'center', 'end']),
|
|
11746
|
+
children: PropTypes$1.node,
|
|
11747
|
+
className: PropTypes$1.string,
|
|
11748
|
+
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
11500
11749
|
};
|
|
11501
11750
|
CPagination.displayName = 'CPagination';
|
|
11502
11751
|
|
|
@@ -11509,9 +11758,9 @@ var CPaginationItem = React$1.forwardRef(function (_a, ref) {
|
|
|
11509
11758
|
}, className) }, (rest.active && { 'aria-current': 'page' })), Component === 'a' ? (React$1.createElement(CLink, __assign$1({ className: "page-link", component: Component }, rest, { ref: ref }), children)) : (React$1.createElement(Component, { className: "page-link", ref: ref }, children))));
|
|
11510
11759
|
});
|
|
11511
11760
|
CPaginationItem.propTypes = {
|
|
11512
|
-
children: PropTypes.node,
|
|
11513
|
-
className: PropTypes.string,
|
|
11514
|
-
component: PropTypes.elementType,
|
|
11761
|
+
children: PropTypes$1.node,
|
|
11762
|
+
className: PropTypes$1.string,
|
|
11763
|
+
component: PropTypes$1.elementType,
|
|
11515
11764
|
};
|
|
11516
11765
|
CPaginationItem.displayName = 'CPaginationItem';
|
|
11517
11766
|
|
|
@@ -11544,12 +11793,12 @@ var CPlaceholder = React$1.forwardRef(function (_a, ref) {
|
|
|
11544
11793
|
_b), repsonsiveClassNames, className) }, rest, { ref: ref }), children));
|
|
11545
11794
|
});
|
|
11546
11795
|
CPlaceholder.propTypes = {
|
|
11547
|
-
animation: PropTypes.oneOf(['glow', 'wave']),
|
|
11548
|
-
children: PropTypes.node,
|
|
11549
|
-
className: PropTypes.string,
|
|
11796
|
+
animation: PropTypes$1.oneOf(['glow', 'wave']),
|
|
11797
|
+
children: PropTypes$1.node,
|
|
11798
|
+
className: PropTypes$1.string,
|
|
11550
11799
|
color: colorPropType,
|
|
11551
|
-
component: PropTypes.elementType,
|
|
11552
|
-
size: PropTypes.oneOf(['xs', 'sm', 'lg']),
|
|
11800
|
+
component: PropTypes$1.elementType,
|
|
11801
|
+
size: PropTypes$1.oneOf(['xs', 'sm', 'lg']),
|
|
11553
11802
|
};
|
|
11554
11803
|
CPlaceholder.displayName = 'CPlaceholder';
|
|
11555
11804
|
|
|
@@ -11562,8 +11811,8 @@ var CProgressStacked = React$1.forwardRef(function (_a, ref) {
|
|
|
11562
11811
|
} }, children)));
|
|
11563
11812
|
});
|
|
11564
11813
|
CProgressStacked.propTypes = {
|
|
11565
|
-
children: PropTypes.node,
|
|
11566
|
-
className: PropTypes.string,
|
|
11814
|
+
children: PropTypes$1.node,
|
|
11815
|
+
className: PropTypes$1.string,
|
|
11567
11816
|
};
|
|
11568
11817
|
CProgressStacked.displayName = 'CProgressStacked';
|
|
11569
11818
|
|
|
@@ -11578,12 +11827,12 @@ var CProgressBar = React$1.forwardRef(function (_a, ref) {
|
|
|
11578
11827
|
_b), className) }, (!stacked && { style: { width: "".concat(value, "%") } }), rest, { ref: ref }), children));
|
|
11579
11828
|
});
|
|
11580
11829
|
CProgressBar.propTypes = {
|
|
11581
|
-
animated: PropTypes.bool,
|
|
11582
|
-
children: PropTypes.node,
|
|
11583
|
-
className: PropTypes.string,
|
|
11584
|
-
color: PropTypes.oneOfType([colorPropType, gradientsPropType]),
|
|
11585
|
-
value: PropTypes.number,
|
|
11586
|
-
variant: PropTypes.oneOf(['striped']),
|
|
11830
|
+
animated: PropTypes$1.bool,
|
|
11831
|
+
children: PropTypes$1.node,
|
|
11832
|
+
className: PropTypes$1.string,
|
|
11833
|
+
color: PropTypes$1.oneOfType([colorPropType, gradientsPropType]),
|
|
11834
|
+
value: PropTypes$1.number,
|
|
11835
|
+
variant: PropTypes$1.oneOf(['striped']),
|
|
11587
11836
|
};
|
|
11588
11837
|
CProgressBar.displayName = 'CProgressBar';
|
|
11589
11838
|
|
|
@@ -11609,13 +11858,13 @@ var CProgress = React$1.forwardRef(function (_a, ref) {
|
|
|
11609
11858
|
})) : (React$1.createElement(CProgressBar, __assign$1({}, (progressBarClassName && { className: progressBarClassName }), { value: value }, rest), children))));
|
|
11610
11859
|
});
|
|
11611
11860
|
CProgress.propTypes = {
|
|
11612
|
-
children: PropTypes.node,
|
|
11613
|
-
className: PropTypes.string,
|
|
11614
|
-
height: PropTypes.number,
|
|
11615
|
-
progressBarClassName: PropTypes.string,
|
|
11616
|
-
thin: PropTypes.bool,
|
|
11617
|
-
value: PropTypes.number,
|
|
11618
|
-
white: PropTypes.bool,
|
|
11861
|
+
children: PropTypes$1.node,
|
|
11862
|
+
className: PropTypes$1.string,
|
|
11863
|
+
height: PropTypes$1.number,
|
|
11864
|
+
progressBarClassName: PropTypes$1.string,
|
|
11865
|
+
thin: PropTypes$1.bool,
|
|
11866
|
+
value: PropTypes$1.number,
|
|
11867
|
+
white: PropTypes$1.bool,
|
|
11619
11868
|
};
|
|
11620
11869
|
CProgress.displayName = 'CProgress';
|
|
11621
11870
|
|
|
@@ -11680,7 +11929,7 @@ var CPopover = function (_a) {
|
|
|
11680
11929
|
typeof window !== 'undefined' &&
|
|
11681
11930
|
ReactDOM.createPortal(React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: popoverRef, onEnter: onShow, onExit: onHide, timeout: {
|
|
11682
11931
|
enter: 0,
|
|
11683
|
-
exit: 200,
|
|
11932
|
+
exit: popoverRef.current ? getTransitionDurationFromElement(popoverRef.current) + 50 : 200,
|
|
11684
11933
|
}, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('popover', 'bs-popover-auto', {
|
|
11685
11934
|
fade: animation,
|
|
11686
11935
|
show: state === 'entered',
|
|
@@ -11690,25 +11939,25 @@ var CPopover = function (_a) {
|
|
|
11690
11939
|
React$1.createElement("div", { className: "popover-body" }, content))); }), document.body)));
|
|
11691
11940
|
};
|
|
11692
11941
|
CPopover.propTypes = {
|
|
11693
|
-
animation: PropTypes.bool,
|
|
11694
|
-
children: PropTypes.node,
|
|
11695
|
-
className: PropTypes.string,
|
|
11696
|
-
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
11697
|
-
delay: PropTypes.oneOfType([
|
|
11698
|
-
PropTypes.number,
|
|
11699
|
-
PropTypes.shape({
|
|
11700
|
-
show: PropTypes.number.isRequired,
|
|
11701
|
-
hide: PropTypes.number.isRequired,
|
|
11942
|
+
animation: PropTypes$1.bool,
|
|
11943
|
+
children: PropTypes$1.node,
|
|
11944
|
+
className: PropTypes$1.string,
|
|
11945
|
+
content: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
11946
|
+
delay: PropTypes$1.oneOfType([
|
|
11947
|
+
PropTypes$1.number,
|
|
11948
|
+
PropTypes$1.shape({
|
|
11949
|
+
show: PropTypes$1.number.isRequired,
|
|
11950
|
+
hide: PropTypes$1.number.isRequired,
|
|
11702
11951
|
}),
|
|
11703
11952
|
]),
|
|
11704
11953
|
fallbackPlacements: fallbackPlacementsPropType,
|
|
11705
|
-
offset: PropTypes.any,
|
|
11706
|
-
onHide: PropTypes.func,
|
|
11707
|
-
onShow: PropTypes.func,
|
|
11708
|
-
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
11709
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
11954
|
+
offset: PropTypes$1.any,
|
|
11955
|
+
onHide: PropTypes$1.func,
|
|
11956
|
+
onShow: PropTypes$1.func,
|
|
11957
|
+
placement: PropTypes$1.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
11958
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
11710
11959
|
trigger: triggerPropType,
|
|
11711
|
-
visible: PropTypes.bool,
|
|
11960
|
+
visible: PropTypes$1.bool,
|
|
11712
11961
|
};
|
|
11713
11962
|
CPopover.displayName = 'CPopover';
|
|
11714
11963
|
|
|
@@ -11734,6 +11983,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
11734
11983
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
11735
11984
|
PERFORMANCE OF THIS SOFTWARE.
|
|
11736
11985
|
***************************************************************************** */
|
|
11986
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
11987
|
+
|
|
11737
11988
|
|
|
11738
11989
|
var __assign = function() {
|
|
11739
11990
|
__assign = Object.assign || function __assign(t) {
|
|
@@ -11756,6 +12007,15 @@ function __rest(s, e) {
|
|
|
11756
12007
|
t[p[i]] = s[p[i]];
|
|
11757
12008
|
}
|
|
11758
12009
|
return t;
|
|
12010
|
+
}
|
|
12011
|
+
|
|
12012
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
12013
|
+
var e = new Error(message);
|
|
12014
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
12015
|
+
};
|
|
12016
|
+
|
|
12017
|
+
function getDefaultExportFromCjs (x) {
|
|
12018
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
11759
12019
|
}
|
|
11760
12020
|
|
|
11761
12021
|
var propTypes = {exports: {}};
|
|
@@ -11981,14 +12241,12 @@ var hasRequiredReactIs;
|
|
|
11981
12241
|
function requireReactIs () {
|
|
11982
12242
|
if (hasRequiredReactIs) return reactIs.exports;
|
|
11983
12243
|
hasRequiredReactIs = 1;
|
|
11984
|
-
(function (module) {
|
|
11985
12244
|
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
} (reactIs));
|
|
12245
|
+
if (process.env.NODE_ENV === 'production') {
|
|
12246
|
+
reactIs.exports = requireReactIs_production_min();
|
|
12247
|
+
} else {
|
|
12248
|
+
reactIs.exports = requireReactIs_development();
|
|
12249
|
+
}
|
|
11992
12250
|
return reactIs.exports;
|
|
11993
12251
|
}
|
|
11994
12252
|
|
|
@@ -12940,12 +13198,15 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
12940
13198
|
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
12941
13199
|
}
|
|
12942
13200
|
|
|
13201
|
+
var propTypesExports = propTypes.exports;
|
|
13202
|
+
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
13203
|
+
|
|
12943
13204
|
var classnames = {exports: {}};
|
|
12944
13205
|
|
|
12945
13206
|
/*!
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
13207
|
+
Copyright (c) 2018 Jed Watson.
|
|
13208
|
+
Licensed under the MIT License (MIT), see
|
|
13209
|
+
http://jedwatson.github.io/classnames
|
|
12949
13210
|
*/
|
|
12950
13211
|
|
|
12951
13212
|
(function (module) {
|
|
@@ -12974,14 +13235,15 @@ var classnames = {exports: {}};
|
|
|
12974
13235
|
}
|
|
12975
13236
|
}
|
|
12976
13237
|
} else if (argType === 'object') {
|
|
12977
|
-
if (arg.toString
|
|
12978
|
-
for (var key in arg) {
|
|
12979
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
12980
|
-
classes.push(key);
|
|
12981
|
-
}
|
|
12982
|
-
}
|
|
12983
|
-
} else {
|
|
13238
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
12984
13239
|
classes.push(arg.toString());
|
|
13240
|
+
continue;
|
|
13241
|
+
}
|
|
13242
|
+
|
|
13243
|
+
for (var key in arg) {
|
|
13244
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
13245
|
+
classes.push(key);
|
|
13246
|
+
}
|
|
12985
13247
|
}
|
|
12986
13248
|
}
|
|
12987
13249
|
}
|
|
@@ -12995,10 +13257,11 @@ var classnames = {exports: {}};
|
|
|
12995
13257
|
} else {
|
|
12996
13258
|
window.classNames = classNames;
|
|
12997
13259
|
}
|
|
12998
|
-
}());
|
|
13260
|
+
}());
|
|
12999
13261
|
} (classnames));
|
|
13000
13262
|
|
|
13001
|
-
var
|
|
13263
|
+
var classnamesExports = classnames.exports;
|
|
13264
|
+
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
13002
13265
|
|
|
13003
13266
|
var toCamelCase = function (str) {
|
|
13004
13267
|
return str
|
|
@@ -13025,11 +13288,9 @@ var CIcon = React$1.forwardRef(function (_a, ref) {
|
|
|
13025
13288
|
console.warn('[CIcon] The `name` property is deprecated and will be removed in v3, please use `icon="..."` instead of.');
|
|
13026
13289
|
}
|
|
13027
13290
|
React$1.useMemo(function () { return setChange(change + 1); }, [_icon, JSON.stringify(_icon)]);
|
|
13028
|
-
var iconName = React$1.useMemo(function () {
|
|
13029
|
-
return _icon && typeof _icon === 'string' && _icon.includes('-') ? toCamelCase(_icon) : _icon;
|
|
13030
|
-
}, [change]);
|
|
13031
13291
|
var titleCode = title ? "<title>".concat(title, "</title>") : '';
|
|
13032
13292
|
var code = React$1.useMemo(function () {
|
|
13293
|
+
var iconName = _icon && typeof _icon === 'string' && _icon.includes('-') ? toCamelCase(_icon) : _icon;
|
|
13033
13294
|
if (Array.isArray(_icon)) {
|
|
13034
13295
|
return _icon;
|
|
13035
13296
|
}
|
|
@@ -13046,24 +13307,25 @@ var CIcon = React$1.forwardRef(function (_a, ref) {
|
|
|
13046
13307
|
var viewBox = (function () {
|
|
13047
13308
|
return rest['viewBox'] || "0 0 ".concat(scale);
|
|
13048
13309
|
})();
|
|
13049
|
-
// render
|
|
13050
13310
|
var _className = customClassName
|
|
13051
13311
|
? classNames(customClassName)
|
|
13052
13312
|
: classNames('icon', (_b = {},
|
|
13053
13313
|
_b["icon-".concat(size)] = size,
|
|
13054
13314
|
_b["icon-custom-size"] = height || width,
|
|
13055
13315
|
_b), className);
|
|
13056
|
-
return
|
|
13057
|
-
|
|
13316
|
+
return (React$1.createElement(React$1.Fragment, null,
|
|
13317
|
+
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 }),
|
|
13318
|
+
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 }))),
|
|
13319
|
+
title && React$1.createElement("span", { className: "visually-hidden" }, title)));
|
|
13058
13320
|
});
|
|
13059
13321
|
CIcon.propTypes = {
|
|
13060
|
-
className:
|
|
13061
|
-
content:
|
|
13062
|
-
customClassName:
|
|
13063
|
-
height:
|
|
13064
|
-
icon:
|
|
13065
|
-
name:
|
|
13066
|
-
size:
|
|
13322
|
+
className: PropTypes.string,
|
|
13323
|
+
content: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
13324
|
+
customClassName: PropTypes.string,
|
|
13325
|
+
height: PropTypes.number,
|
|
13326
|
+
icon: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
13327
|
+
name: PropTypes.string,
|
|
13328
|
+
size: PropTypes.oneOf([
|
|
13067
13329
|
'custom',
|
|
13068
13330
|
'custom-size',
|
|
13069
13331
|
'sm',
|
|
@@ -13078,9 +13340,9 @@ CIcon.propTypes = {
|
|
|
13078
13340
|
'8xl',
|
|
13079
13341
|
'9xl',
|
|
13080
13342
|
]),
|
|
13081
|
-
title:
|
|
13082
|
-
use:
|
|
13083
|
-
width:
|
|
13343
|
+
title: PropTypes.any,
|
|
13344
|
+
use: PropTypes.any,
|
|
13345
|
+
width: PropTypes.number,
|
|
13084
13346
|
};
|
|
13085
13347
|
CIcon.displayName = 'CIcon';
|
|
13086
13348
|
|
|
@@ -13141,20 +13403,20 @@ var CSmartPagination = React$1.forwardRef(function (_a, ref) {
|
|
|
13141
13403
|
doubleArrows && (React$1.createElement(CPaginationItem, { onClick: function () { return setPage(pages); }, "aria-label": "Go to last page", "aria-disabled": activePage === pages, disabled: activePage === pages }, lastButton))));
|
|
13142
13404
|
});
|
|
13143
13405
|
CSmartPagination.propTypes = {
|
|
13144
|
-
className: PropTypes.oneOfType([PropTypes.string]),
|
|
13145
|
-
activePage: PropTypes.number,
|
|
13146
|
-
dots: PropTypes.bool,
|
|
13147
|
-
arrows: PropTypes.bool,
|
|
13148
|
-
doubleArrows: PropTypes.bool,
|
|
13149
|
-
firstButton: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
13150
|
-
previousButton: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
13151
|
-
nextButton: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
13152
|
-
lastButton: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
13153
|
-
size: PropTypes.oneOf(['sm', 'lg']),
|
|
13154
|
-
align: PropTypes.oneOf(['start', 'center', 'end']),
|
|
13155
|
-
limit: PropTypes.number,
|
|
13156
|
-
pages: PropTypes.number.isRequired,
|
|
13157
|
-
onActivePageChange: PropTypes.func,
|
|
13406
|
+
className: PropTypes$1.oneOfType([PropTypes$1.string]),
|
|
13407
|
+
activePage: PropTypes$1.number,
|
|
13408
|
+
dots: PropTypes$1.bool,
|
|
13409
|
+
arrows: PropTypes$1.bool,
|
|
13410
|
+
doubleArrows: PropTypes$1.bool,
|
|
13411
|
+
firstButton: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
13412
|
+
previousButton: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
13413
|
+
nextButton: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
13414
|
+
lastButton: PropTypes$1.oneOfType([PropTypes$1.node, PropTypes$1.string]),
|
|
13415
|
+
size: PropTypes$1.oneOf(['sm', 'lg']),
|
|
13416
|
+
align: PropTypes$1.oneOf(['start', 'center', 'end']),
|
|
13417
|
+
limit: PropTypes$1.number,
|
|
13418
|
+
pages: PropTypes$1.number.isRequired,
|
|
13419
|
+
onActivePageChange: PropTypes$1.func,
|
|
13158
13420
|
};
|
|
13159
13421
|
CSmartPagination.displayName = 'CSmartPagination';
|
|
13160
13422
|
|
|
@@ -13166,8 +13428,8 @@ var CTableHead = React$1.forwardRef(function (_a, ref) {
|
|
|
13166
13428
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13167
13429
|
});
|
|
13168
13430
|
CTableHead.propTypes = {
|
|
13169
|
-
children: PropTypes.node,
|
|
13170
|
-
className: PropTypes.string,
|
|
13431
|
+
children: PropTypes$1.node,
|
|
13432
|
+
className: PropTypes$1.string,
|
|
13171
13433
|
color: colorPropType,
|
|
13172
13434
|
};
|
|
13173
13435
|
CTableHead.displayName = 'CTableHead';
|
|
@@ -13180,8 +13442,8 @@ var CTableHeaderCell = React$1.forwardRef(function (_a, ref) {
|
|
|
13180
13442
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13181
13443
|
});
|
|
13182
13444
|
CTableHeaderCell.propTypes = {
|
|
13183
|
-
children: PropTypes.node,
|
|
13184
|
-
className: PropTypes.string,
|
|
13445
|
+
children: PropTypes$1.node,
|
|
13446
|
+
className: PropTypes$1.string,
|
|
13185
13447
|
color: colorPropType,
|
|
13186
13448
|
};
|
|
13187
13449
|
CTableHeaderCell.displayName = 'CTableHeaderCell';
|
|
@@ -13194,8 +13456,8 @@ var CTableBody = React$1.forwardRef(function (_a, ref) {
|
|
|
13194
13456
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13195
13457
|
});
|
|
13196
13458
|
CTableBody.propTypes = {
|
|
13197
|
-
children: PropTypes.node,
|
|
13198
|
-
className: PropTypes.string,
|
|
13459
|
+
children: PropTypes$1.node,
|
|
13460
|
+
className: PropTypes$1.string,
|
|
13199
13461
|
color: colorPropType,
|
|
13200
13462
|
};
|
|
13201
13463
|
CTableBody.displayName = 'CTableBody';
|
|
@@ -13211,10 +13473,10 @@ var CTableDataCell = React$1.forwardRef(function (_a, ref) {
|
|
|
13211
13473
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13212
13474
|
});
|
|
13213
13475
|
CTableDataCell.propTypes = {
|
|
13214
|
-
active: PropTypes.bool,
|
|
13215
|
-
align: PropTypes.oneOf(['bottom', 'middle', 'top']),
|
|
13216
|
-
children: PropTypes.node,
|
|
13217
|
-
className: PropTypes.string,
|
|
13476
|
+
active: PropTypes$1.bool,
|
|
13477
|
+
align: PropTypes$1.oneOf(['bottom', 'middle', 'top']),
|
|
13478
|
+
children: PropTypes$1.node,
|
|
13479
|
+
className: PropTypes$1.string,
|
|
13218
13480
|
color: colorPropType,
|
|
13219
13481
|
};
|
|
13220
13482
|
CTableDataCell.displayName = 'CTableDataCell';
|
|
@@ -13229,10 +13491,10 @@ var CTableRow = React$1.forwardRef(function (_a, ref) {
|
|
|
13229
13491
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13230
13492
|
});
|
|
13231
13493
|
CTableRow.propTypes = {
|
|
13232
|
-
active: PropTypes.bool,
|
|
13233
|
-
align: PropTypes.oneOf(['bottom', 'middle', 'top']),
|
|
13234
|
-
children: PropTypes.node,
|
|
13235
|
-
className: PropTypes.string,
|
|
13494
|
+
active: PropTypes$1.bool,
|
|
13495
|
+
align: PropTypes$1.oneOf(['bottom', 'middle', 'top']),
|
|
13496
|
+
children: PropTypes$1.node,
|
|
13497
|
+
className: PropTypes$1.string,
|
|
13236
13498
|
color: colorPropType,
|
|
13237
13499
|
};
|
|
13238
13500
|
CTableRow.displayName = 'CTableRow';
|
|
@@ -13245,8 +13507,8 @@ var CTableFoot = React$1.forwardRef(function (_a, ref) {
|
|
|
13245
13507
|
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13246
13508
|
});
|
|
13247
13509
|
CTableFoot.propTypes = {
|
|
13248
|
-
children: PropTypes.node,
|
|
13249
|
-
className: PropTypes.string,
|
|
13510
|
+
children: PropTypes$1.node,
|
|
13511
|
+
className: PropTypes$1.string,
|
|
13250
13512
|
color: colorPropType,
|
|
13251
13513
|
};
|
|
13252
13514
|
CTableFoot.displayName = 'CTableFoot';
|
|
@@ -13256,7 +13518,7 @@ var CTableCaption = React$1.forwardRef(function (_a, ref) {
|
|
|
13256
13518
|
return (React$1.createElement("caption", __assign$1({}, props, { ref: ref }), children));
|
|
13257
13519
|
});
|
|
13258
13520
|
CTableCaption.propTypes = {
|
|
13259
|
-
children: PropTypes.node,
|
|
13521
|
+
children: PropTypes$1.node,
|
|
13260
13522
|
};
|
|
13261
13523
|
CTableCaption.displayName = 'CTableCaption';
|
|
13262
13524
|
|
|
@@ -13265,10 +13527,10 @@ var CTableResponsiveWrapper = function (_a) {
|
|
|
13265
13527
|
return responsive ? (React$1.createElement("div", __assign$1({ className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-".concat(responsive) }, rest), children)) : (React$1.createElement(React$1.Fragment, null, children));
|
|
13266
13528
|
};
|
|
13267
13529
|
CTableResponsiveWrapper.propTypes = {
|
|
13268
|
-
children: PropTypes.node,
|
|
13269
|
-
responsive: PropTypes.oneOfType([
|
|
13270
|
-
PropTypes.bool,
|
|
13271
|
-
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
13530
|
+
children: PropTypes$1.node,
|
|
13531
|
+
responsive: PropTypes$1.oneOfType([
|
|
13532
|
+
PropTypes$1.bool,
|
|
13533
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
13272
13534
|
]),
|
|
13273
13535
|
};
|
|
13274
13536
|
CTableResponsiveWrapper.displayName = 'CTableResponsiveWrapper';
|
|
@@ -13324,28 +13586,28 @@ var CTable = React$1.forwardRef(function (_a, ref) {
|
|
|
13324
13586
|
React$1.createElement(CTableRow, null, footer.map(function (item, index) { return (React$1.createElement(CTableDataCell, __assign$1({}, (typeof item === 'object' && item._props && __assign$1({}, item._props)), { key: index }), typeof item === 'object' ? item.label : item)); })))))));
|
|
13325
13587
|
});
|
|
13326
13588
|
CTable.propTypes = {
|
|
13327
|
-
align: PropTypes.oneOf(['bottom', 'middle', 'top']),
|
|
13328
|
-
borderColor: PropTypes.string,
|
|
13329
|
-
bordered: PropTypes.bool,
|
|
13330
|
-
borderless: PropTypes.bool,
|
|
13331
|
-
caption: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOf(['top'])]),
|
|
13332
|
-
captionTop: PropTypes.string,
|
|
13333
|
-
children: PropTypes.node,
|
|
13334
|
-
className: PropTypes.string,
|
|
13589
|
+
align: PropTypes$1.oneOf(['bottom', 'middle', 'top']),
|
|
13590
|
+
borderColor: PropTypes$1.string,
|
|
13591
|
+
bordered: PropTypes$1.bool,
|
|
13592
|
+
borderless: PropTypes$1.bool,
|
|
13593
|
+
caption: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.oneOf(['top'])]),
|
|
13594
|
+
captionTop: PropTypes$1.string,
|
|
13595
|
+
children: PropTypes$1.node,
|
|
13596
|
+
className: PropTypes$1.string,
|
|
13335
13597
|
color: colorPropType,
|
|
13336
|
-
columns: PropTypes.array,
|
|
13337
|
-
footer: PropTypes.array,
|
|
13338
|
-
hover: PropTypes.bool,
|
|
13339
|
-
items: PropTypes.array,
|
|
13340
|
-
responsive: PropTypes.oneOfType([
|
|
13341
|
-
PropTypes.bool,
|
|
13342
|
-
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
13598
|
+
columns: PropTypes$1.array,
|
|
13599
|
+
footer: PropTypes$1.array,
|
|
13600
|
+
hover: PropTypes$1.bool,
|
|
13601
|
+
items: PropTypes$1.array,
|
|
13602
|
+
responsive: PropTypes$1.oneOfType([
|
|
13603
|
+
PropTypes$1.bool,
|
|
13604
|
+
PropTypes$1.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
13343
13605
|
]),
|
|
13344
|
-
small: PropTypes.bool,
|
|
13345
|
-
striped: PropTypes.bool,
|
|
13346
|
-
stripedColumns: PropTypes.bool,
|
|
13347
|
-
tableFootProps: PropTypes.shape(__assign$1({}, CTableFoot.propTypes)),
|
|
13348
|
-
tableHeadProps: PropTypes.shape(__assign$1({}, CTableHead.propTypes)),
|
|
13606
|
+
small: PropTypes$1.bool,
|
|
13607
|
+
striped: PropTypes$1.bool,
|
|
13608
|
+
stripedColumns: PropTypes$1.bool,
|
|
13609
|
+
tableFootProps: PropTypes$1.shape(__assign$1({}, CTableFoot.propTypes)),
|
|
13610
|
+
tableHeadProps: PropTypes$1.shape(__assign$1({}, CTableHead.propTypes)),
|
|
13349
13611
|
};
|
|
13350
13612
|
CTable.displayName = 'CTable';
|
|
13351
13613
|
|
|
@@ -13384,7 +13646,7 @@ var getClickedColumnName = function (target, columnNames) {
|
|
|
13384
13646
|
var closest = target.closest('tr');
|
|
13385
13647
|
var children = closest ? Array.from(closest.children) : [];
|
|
13386
13648
|
var clickedCell = children.filter(function (child) { return child.contains(target); })[0];
|
|
13387
|
-
return columnNames[children.indexOf(clickedCell)];
|
|
13649
|
+
return columnNames[children.indexOf(clickedCell) - 1];
|
|
13388
13650
|
};
|
|
13389
13651
|
var getColumnKey = function (column) {
|
|
13390
13652
|
return typeof column === 'object' ? column.key : column;
|
|
@@ -13396,6 +13658,12 @@ var getColumnLabel = function (column) {
|
|
|
13396
13658
|
: pretifyName(column.key)
|
|
13397
13659
|
: pretifyName(column);
|
|
13398
13660
|
};
|
|
13661
|
+
var getColumnName = function (column) {
|
|
13662
|
+
if (typeof column === 'object') {
|
|
13663
|
+
return column.key;
|
|
13664
|
+
}
|
|
13665
|
+
return column;
|
|
13666
|
+
};
|
|
13399
13667
|
var getColumnNames = function (columns, items) {
|
|
13400
13668
|
if (columns) {
|
|
13401
13669
|
var _columns = [];
|
|
@@ -13504,10 +13772,32 @@ var getColumnSorterState = function (key, sorterState) {
|
|
|
13504
13772
|
var getColumnValues = function (items, key) {
|
|
13505
13773
|
return items.map(function (item) { return item[key]; });
|
|
13506
13774
|
};
|
|
13507
|
-
var getTableDataCellProps = function (item, colName) {
|
|
13508
|
-
var props =
|
|
13775
|
+
var getTableDataCellProps = function (column, item, colName) {
|
|
13776
|
+
var props = {};
|
|
13777
|
+
if (typeof column === 'object' && column._colProps) {
|
|
13778
|
+
Object.assign(props, column._colProps);
|
|
13779
|
+
}
|
|
13780
|
+
if (item._cellProps && item._cellProps['all']) {
|
|
13781
|
+
Object.assign(props, item._cellProps['all']);
|
|
13782
|
+
}
|
|
13783
|
+
if (item._cellProps && item._cellProps[colName]) {
|
|
13784
|
+
Object.assign(props, item._cellProps[colName]);
|
|
13785
|
+
}
|
|
13509
13786
|
return props;
|
|
13510
13787
|
};
|
|
13788
|
+
var getTableDataCellStyles = function (column, item, colName) {
|
|
13789
|
+
var styles = {};
|
|
13790
|
+
if (typeof column === 'object' && column._colStyle) {
|
|
13791
|
+
Object.assign(styles, column._colStyle);
|
|
13792
|
+
}
|
|
13793
|
+
if (item._cellStyle && item._cellStyle['all']) {
|
|
13794
|
+
Object.assign(styles, item._cellStyle['all']);
|
|
13795
|
+
}
|
|
13796
|
+
if (item._cellStyle && item._cellStyle[colName]) {
|
|
13797
|
+
Object.assign(styles, item._cellStyle[colName]);
|
|
13798
|
+
}
|
|
13799
|
+
return styles;
|
|
13800
|
+
};
|
|
13511
13801
|
var getTableHeaderCellProps = function (column) {
|
|
13512
13802
|
if (typeof column === 'object' && column._props) {
|
|
13513
13803
|
return column._props;
|
|
@@ -13565,8 +13855,8 @@ var sortItems = function (columnSorter, items, itemsDataColumns, sorterState) {
|
|
|
13565
13855
|
};
|
|
13566
13856
|
|
|
13567
13857
|
var CSmartTableBody = React$1.forwardRef(function (_a, ref) {
|
|
13568
|
-
var clickableRows = _a.clickableRows, columnNames = _a.columnNames, currentItems = _a.currentItems, firstItemOnActivePageIndex = _a.firstItemOnActivePageIndex, noItemsLabel = _a.noItemsLabel, onRowChecked = _a.onRowChecked, onRowClick = _a.onRowClick, scopedColumns = _a.scopedColumns, selectable = _a.selectable, selected = _a.selected, rest = __rest$1(_a, ["clickableRows", "columnNames", "currentItems", "firstItemOnActivePageIndex", "noItemsLabel", "onRowChecked", "onRowClick", "scopedColumns", "selectable", "selected"]);
|
|
13569
|
-
var colspan = selectable ?
|
|
13858
|
+
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"]);
|
|
13859
|
+
var colspan = selectable ? columns.length + 1 : columns.length;
|
|
13570
13860
|
return (React$1.createElement(CTableBody, __assign$1({}, (clickableRows && {
|
|
13571
13861
|
style: { cursor: 'pointer' },
|
|
13572
13862
|
}), rest, { ref: ref }), currentItems.length > 0 ? (currentItems.map(function (item, trIndex) {
|
|
@@ -13584,13 +13874,14 @@ var CSmartTableBody = React$1.forwardRef(function (_a, ref) {
|
|
|
13584
13874
|
delete _item['_selected'];
|
|
13585
13875
|
onRowChecked && onRowChecked(_item, event.target.checked);
|
|
13586
13876
|
} }))),
|
|
13587
|
-
|
|
13877
|
+
columns.map(function (column, index) {
|
|
13878
|
+
var colName = getColumnName(column);
|
|
13588
13879
|
return ((scopedColumns &&
|
|
13589
13880
|
scopedColumns[colName] &&
|
|
13590
13881
|
React$1.cloneElement(scopedColumns[colName](item, trIndex + firstItemOnActivePageIndex), {
|
|
13591
13882
|
key: index,
|
|
13592
13883
|
})) ||
|
|
13593
|
-
(item[colName] !== undefined && (React$1.createElement(CTableDataCell, __assign$1({}, getTableDataCellProps(item, colName), { key: index }), item[colName]))));
|
|
13884
|
+
(item[colName] !== undefined && (React$1.createElement(CTableDataCell, __assign$1({}, getTableDataCellProps(column, item, colName), { style: getTableDataCellStyles(column, item, colName), key: index }), item[colName]))));
|
|
13594
13885
|
})),
|
|
13595
13886
|
scopedColumns && scopedColumns.details && (React$1.createElement(React$1.Fragment, null,
|
|
13596
13887
|
React$1.createElement(CTableRow, null,
|
|
@@ -13604,16 +13895,16 @@ var CSmartTableBody = React$1.forwardRef(function (_a, ref) {
|
|
|
13604
13895
|
React$1.createElement(CTableDataCell, { colSpan: colspan }, noItemsLabel)))));
|
|
13605
13896
|
});
|
|
13606
13897
|
CSmartTableBody.propTypes = {
|
|
13607
|
-
clickableRows: PropTypes.bool,
|
|
13608
|
-
currentItems: PropTypes.array.isRequired,
|
|
13609
|
-
firstItemOnActivePageIndex: PropTypes.number.isRequired,
|
|
13610
|
-
noItemsLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
13611
|
-
onRowChecked: PropTypes.func,
|
|
13612
|
-
onRowClick: PropTypes.func,
|
|
13613
|
-
columnNames: PropTypes.array.isRequired,
|
|
13614
|
-
scopedColumns: PropTypes.object,
|
|
13615
|
-
selectable: PropTypes.bool,
|
|
13616
|
-
selected: PropTypes.array,
|
|
13898
|
+
clickableRows: PropTypes$1.bool,
|
|
13899
|
+
currentItems: PropTypes$1.array.isRequired,
|
|
13900
|
+
firstItemOnActivePageIndex: PropTypes$1.number.isRequired,
|
|
13901
|
+
noItemsLabel: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
13902
|
+
onRowChecked: PropTypes$1.func,
|
|
13903
|
+
onRowClick: PropTypes$1.func,
|
|
13904
|
+
columnNames: PropTypes$1.array.isRequired,
|
|
13905
|
+
scopedColumns: PropTypes$1.object,
|
|
13906
|
+
selectable: PropTypes$1.bool,
|
|
13907
|
+
selected: PropTypes$1.array,
|
|
13617
13908
|
};
|
|
13618
13909
|
CSmartTableBody.displayName = 'CSmartTableBody';
|
|
13619
13910
|
|
|
@@ -13691,23 +13982,23 @@ var CSmartTableHead = React$1.forwardRef(function (_a, ref) {
|
|
|
13691
13982
|
})))));
|
|
13692
13983
|
});
|
|
13693
13984
|
CSmartTableHead.propTypes = {
|
|
13694
|
-
columnFilter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13695
|
-
columnFilterState: PropTypes.object,
|
|
13696
|
-
columnSorter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13697
|
-
component: PropTypes.elementType,
|
|
13698
|
-
children: PropTypes.node,
|
|
13699
|
-
columns: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.any, PropTypes.string])).isRequired,
|
|
13700
|
-
handleFilterOnChange: PropTypes.func,
|
|
13701
|
-
handleFilterOnInput: PropTypes.func,
|
|
13702
|
-
handleSelectAllChecked: PropTypes.func,
|
|
13703
|
-
handleSort: PropTypes.func,
|
|
13704
|
-
selectable: PropTypes.bool,
|
|
13705
|
-
selectAll: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13706
|
-
selectedAll: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
13707
|
-
sorterState: PropTypes.object,
|
|
13708
|
-
sortingIcon: PropTypes.node,
|
|
13709
|
-
sortingIconAscending: PropTypes.node,
|
|
13710
|
-
sortingIconDescending: PropTypes.node,
|
|
13985
|
+
columnFilter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
13986
|
+
columnFilterState: PropTypes$1.object,
|
|
13987
|
+
columnSorter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
13988
|
+
component: PropTypes$1.elementType,
|
|
13989
|
+
children: PropTypes$1.node,
|
|
13990
|
+
columns: PropTypes$1.arrayOf(PropTypes$1.oneOfType([PropTypes$1.any, PropTypes$1.string])).isRequired,
|
|
13991
|
+
handleFilterOnChange: PropTypes$1.func,
|
|
13992
|
+
handleFilterOnInput: PropTypes$1.func,
|
|
13993
|
+
handleSelectAllChecked: PropTypes$1.func,
|
|
13994
|
+
handleSort: PropTypes$1.func,
|
|
13995
|
+
selectable: PropTypes$1.bool,
|
|
13996
|
+
selectAll: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
13997
|
+
selectedAll: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.string]),
|
|
13998
|
+
sorterState: PropTypes$1.object,
|
|
13999
|
+
sortingIcon: PropTypes$1.node,
|
|
14000
|
+
sortingIconAscending: PropTypes$1.node,
|
|
14001
|
+
sortingIconDescending: PropTypes$1.node,
|
|
13711
14002
|
};
|
|
13712
14003
|
CSmartTableHead.displayName = 'CSmartTableHead';
|
|
13713
14004
|
|
|
@@ -13922,9 +14213,9 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
13922
14213
|
header && (React$1.createElement(CSmartTableHead, __assign$1({}, tableHeadProps, { columnFilter: columnFilter, columnFilterState: columnFilterState, columns: columns !== null && columns !== void 0 ? columns : columnNames, columnSorter: columnSorter, items: _items, selectable: selectable, selectAll: selectAll, selectedAll: selectedAll, sorterState: sorterState, sortingIcon: sortingIcon, sortingIconAscending: sortingIconAscending, sortingIconDescending: sortingIconDescending, handleFilterOnChange: function (key, event) {
|
|
13923
14214
|
return handleColumnFilterChange(key, event, 'change');
|
|
13924
14215
|
}, handleFilterOnInput: function (key, event) { return handleColumnFilterChange(key, event, 'input'); }, handleOnCustomFilterChange: function (key, event) { return handleColumnFilterChange(key, event); }, handleSelectAllChecked: function () { return handleSelectAllChecked(); }, handleSort: function (key, index) { return handleSorterChange(key, index); } }))),
|
|
13925
|
-
React$1.createElement(CSmartTableBody, __assign$1({ clickableRows: clickableRows, currentItems: currentItems, firstItemOnActivePageIndex: firstItemOnActivePageIndex, noItemsLabel: noItemsLabel, onRowClick: function (item, index, columnName, event) {
|
|
14216
|
+
React$1.createElement(CSmartTableBody, __assign$1({ clickableRows: clickableRows, columnNames: columnNames, columns: columns !== null && columns !== void 0 ? columns : columnNames, currentItems: currentItems, firstItemOnActivePageIndex: firstItemOnActivePageIndex, noItemsLabel: noItemsLabel, onRowClick: function (item, index, columnName, event) {
|
|
13926
14217
|
return clickableRows && onRowClick && onRowClick(item, index, columnName, event);
|
|
13927
|
-
}, onRowChecked: function (item, value) { return handleRowChecked(item, value); },
|
|
14218
|
+
}, onRowChecked: function (item, value) { return handleRowChecked(item, value); }, scopedColumns: scopedColumns, selectable: selectable, selected: _selected }, tableBodyProps)),
|
|
13928
14219
|
typeof footer === 'boolean' && footer && (React$1.createElement(CSmartTableHead, __assign$1({ component: CTableFoot }, tableFootProps, { columnFilter: false, columnSorter: false, columns: columns !== null && columns !== void 0 ? columns : columnNames, items: _items, handleSelectAllChecked: function () { return handleSelectAllChecked(); }, selectable: selectable, selectAll: selectAll, selectedAll: selectedAll, showGroups: false }))),
|
|
13929
14220
|
Array.isArray(footer) && (React$1.createElement(CTableFoot, __assign$1({}, tableFootProps),
|
|
13930
14221
|
React$1.createElement(CTableRow, null, footer.map(function (item, index) { return (React$1.createElement(CTableDataCell, __assign$1({}, (typeof item === 'object' && item._props && __assign$1({}, item._props)), { key: index }), typeof item === 'object' ? item.label : item)); }))))),
|
|
@@ -13949,51 +14240,51 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
13949
14240
|
}))))))))));
|
|
13950
14241
|
});
|
|
13951
14242
|
CSmartTable.propTypes = {
|
|
13952
|
-
activePage: PropTypes.number,
|
|
13953
|
-
cleaner: PropTypes.bool,
|
|
13954
|
-
clickableRows: PropTypes.bool,
|
|
13955
|
-
columnFilter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13956
|
-
columnFilterValue: PropTypes.object,
|
|
13957
|
-
columns: PropTypes.array,
|
|
13958
|
-
columnSorter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13959
|
-
elementCover: PropTypes.node,
|
|
13960
|
-
footer: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),
|
|
13961
|
-
header: PropTypes.bool,
|
|
13962
|
-
items: PropTypes.array,
|
|
13963
|
-
itemsNumber: PropTypes.number,
|
|
13964
|
-
itemsPerPage: PropTypes.number,
|
|
13965
|
-
itemsPerPageLabel: PropTypes.string,
|
|
13966
|
-
itemsPerPageOptions: PropTypes.array,
|
|
13967
|
-
itemsPerPageSelect: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13968
|
-
loading: PropTypes.bool,
|
|
13969
|
-
noItemsLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
13970
|
-
onActivePageChange: PropTypes.func,
|
|
13971
|
-
onColumnFilterChange: PropTypes.func,
|
|
13972
|
-
onFilteredItemsChange: PropTypes.func,
|
|
13973
|
-
onItemsPerPageChange: PropTypes.func,
|
|
13974
|
-
onRowClick: PropTypes.func,
|
|
13975
|
-
onSelectAll: PropTypes.func,
|
|
13976
|
-
onSelectedItemsChange: PropTypes.func,
|
|
13977
|
-
onSorterChange: PropTypes.func,
|
|
13978
|
-
onTableFilterChange: PropTypes.func,
|
|
13979
|
-
pagination: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13980
|
-
paginationProps: PropTypes.any,
|
|
13981
|
-
scopedColumns: PropTypes.object,
|
|
13982
|
-
selectable: PropTypes.bool,
|
|
13983
|
-
selectAll: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13984
|
-
selected: PropTypes.array,
|
|
13985
|
-
sorterValue: PropTypes.object,
|
|
13986
|
-
sortingIcon: PropTypes.node,
|
|
13987
|
-
sortingIconAscending: PropTypes.node,
|
|
13988
|
-
sortingIconDescending: PropTypes.node,
|
|
13989
|
-
tableBodyProps: PropTypes.object,
|
|
13990
|
-
tableFootProps: PropTypes.object,
|
|
13991
|
-
tableFilter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
13992
|
-
tableFilterLabel: PropTypes.string,
|
|
13993
|
-
tableFilterPlaceholder: PropTypes.string,
|
|
13994
|
-
tableFilterValue: PropTypes.string,
|
|
13995
|
-
tableHeadProps: PropTypes.object,
|
|
13996
|
-
tableProps: PropTypes.object,
|
|
14243
|
+
activePage: PropTypes$1.number,
|
|
14244
|
+
cleaner: PropTypes$1.bool,
|
|
14245
|
+
clickableRows: PropTypes$1.bool,
|
|
14246
|
+
columnFilter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14247
|
+
columnFilterValue: PropTypes$1.object,
|
|
14248
|
+
columns: PropTypes$1.array,
|
|
14249
|
+
columnSorter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14250
|
+
elementCover: PropTypes$1.node,
|
|
14251
|
+
footer: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.array]),
|
|
14252
|
+
header: PropTypes$1.bool,
|
|
14253
|
+
items: PropTypes$1.array,
|
|
14254
|
+
itemsNumber: PropTypes$1.number,
|
|
14255
|
+
itemsPerPage: PropTypes$1.number,
|
|
14256
|
+
itemsPerPageLabel: PropTypes$1.string,
|
|
14257
|
+
itemsPerPageOptions: PropTypes$1.array,
|
|
14258
|
+
itemsPerPageSelect: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14259
|
+
loading: PropTypes$1.bool,
|
|
14260
|
+
noItemsLabel: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14261
|
+
onActivePageChange: PropTypes$1.func,
|
|
14262
|
+
onColumnFilterChange: PropTypes$1.func,
|
|
14263
|
+
onFilteredItemsChange: PropTypes$1.func,
|
|
14264
|
+
onItemsPerPageChange: PropTypes$1.func,
|
|
14265
|
+
onRowClick: PropTypes$1.func,
|
|
14266
|
+
onSelectAll: PropTypes$1.func,
|
|
14267
|
+
onSelectedItemsChange: PropTypes$1.func,
|
|
14268
|
+
onSorterChange: PropTypes$1.func,
|
|
14269
|
+
onTableFilterChange: PropTypes$1.func,
|
|
14270
|
+
pagination: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14271
|
+
paginationProps: PropTypes$1.any,
|
|
14272
|
+
scopedColumns: PropTypes$1.object,
|
|
14273
|
+
selectable: PropTypes$1.bool,
|
|
14274
|
+
selectAll: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14275
|
+
selected: PropTypes$1.array,
|
|
14276
|
+
sorterValue: PropTypes$1.object,
|
|
14277
|
+
sortingIcon: PropTypes$1.node,
|
|
14278
|
+
sortingIconAscending: PropTypes$1.node,
|
|
14279
|
+
sortingIconDescending: PropTypes$1.node,
|
|
14280
|
+
tableBodyProps: PropTypes$1.object,
|
|
14281
|
+
tableFootProps: PropTypes$1.object,
|
|
14282
|
+
tableFilter: PropTypes$1.oneOfType([PropTypes$1.bool, PropTypes$1.object]),
|
|
14283
|
+
tableFilterLabel: PropTypes$1.string,
|
|
14284
|
+
tableFilterPlaceholder: PropTypes$1.string,
|
|
14285
|
+
tableFilterValue: PropTypes$1.string,
|
|
14286
|
+
tableHeadProps: PropTypes$1.object,
|
|
14287
|
+
tableProps: PropTypes$1.object,
|
|
13997
14288
|
};
|
|
13998
14289
|
CSmartTable.displayName = 'CSmartTable';
|
|
13999
14290
|
|
|
@@ -14088,19 +14379,19 @@ var CSidebar = React$1.forwardRef(function (_a, ref) {
|
|
|
14088
14379
|
ReactDOM.createPortal(React$1.createElement(CBackdrop, { className: "sidebar-backdrop", visible: _visible }), document.body)));
|
|
14089
14380
|
});
|
|
14090
14381
|
CSidebar.propTypes = {
|
|
14091
|
-
children: PropTypes.node,
|
|
14092
|
-
className: PropTypes.string,
|
|
14093
|
-
colorScheme: PropTypes.oneOf(['dark', 'light']),
|
|
14094
|
-
narrow: PropTypes.bool,
|
|
14095
|
-
onHide: PropTypes.func,
|
|
14096
|
-
onShow: PropTypes.func,
|
|
14097
|
-
onVisibleChange: PropTypes.func,
|
|
14098
|
-
overlaid: PropTypes.bool,
|
|
14099
|
-
placement: PropTypes.oneOf(['start', 'end']),
|
|
14100
|
-
position: PropTypes.oneOf(['fixed', 'sticky']),
|
|
14101
|
-
size: PropTypes.oneOf(['sm', 'lg', 'xl']),
|
|
14102
|
-
unfoldable: PropTypes.bool,
|
|
14103
|
-
visible: PropTypes.bool,
|
|
14382
|
+
children: PropTypes$1.node,
|
|
14383
|
+
className: PropTypes$1.string,
|
|
14384
|
+
colorScheme: PropTypes$1.oneOf(['dark', 'light']),
|
|
14385
|
+
narrow: PropTypes$1.bool,
|
|
14386
|
+
onHide: PropTypes$1.func,
|
|
14387
|
+
onShow: PropTypes$1.func,
|
|
14388
|
+
onVisibleChange: PropTypes$1.func,
|
|
14389
|
+
overlaid: PropTypes$1.bool,
|
|
14390
|
+
placement: PropTypes$1.oneOf(['start', 'end']),
|
|
14391
|
+
position: PropTypes$1.oneOf(['fixed', 'sticky']),
|
|
14392
|
+
size: PropTypes$1.oneOf(['sm', 'lg', 'xl']),
|
|
14393
|
+
unfoldable: PropTypes$1.bool,
|
|
14394
|
+
visible: PropTypes$1.bool,
|
|
14104
14395
|
};
|
|
14105
14396
|
CSidebar.displayName = 'CSidebar';
|
|
14106
14397
|
|
|
@@ -14109,8 +14400,8 @@ var CSidebarBrand = React$1.forwardRef(function (_a, ref) {
|
|
|
14109
14400
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-brand', className), ref: ref }, rest), children));
|
|
14110
14401
|
});
|
|
14111
14402
|
CSidebarBrand.propTypes = {
|
|
14112
|
-
children: PropTypes.node,
|
|
14113
|
-
className: PropTypes.string,
|
|
14403
|
+
children: PropTypes$1.node,
|
|
14404
|
+
className: PropTypes$1.string,
|
|
14114
14405
|
};
|
|
14115
14406
|
CSidebarBrand.displayName = 'CSidebarBrand';
|
|
14116
14407
|
|
|
@@ -14119,8 +14410,8 @@ var CSidebarFooter = React$1.forwardRef(function (_a, ref) {
|
|
|
14119
14410
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-footer', className), ref: ref }, rest), children));
|
|
14120
14411
|
});
|
|
14121
14412
|
CSidebarFooter.propTypes = {
|
|
14122
|
-
children: PropTypes.node,
|
|
14123
|
-
className: PropTypes.string,
|
|
14413
|
+
children: PropTypes$1.node,
|
|
14414
|
+
className: PropTypes$1.string,
|
|
14124
14415
|
};
|
|
14125
14416
|
CSidebarFooter.displayName = 'CSidebarFooter';
|
|
14126
14417
|
|
|
@@ -14129,8 +14420,8 @@ var CSidebarToggler = React$1.forwardRef(function (_a, ref) {
|
|
|
14129
14420
|
return (React$1.createElement("button", __assign$1({ className: classNames$1('sidebar-toggler', className), ref: ref }, rest), children));
|
|
14130
14421
|
});
|
|
14131
14422
|
CSidebarToggler.propTypes = {
|
|
14132
|
-
children: PropTypes.node,
|
|
14133
|
-
className: PropTypes.string,
|
|
14423
|
+
children: PropTypes$1.node,
|
|
14424
|
+
className: PropTypes$1.string,
|
|
14134
14425
|
};
|
|
14135
14426
|
CSidebarToggler.displayName = 'CSidebarToggler';
|
|
14136
14427
|
|
|
@@ -14139,8 +14430,8 @@ var CSidebarHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
14139
14430
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-header', className), ref: ref }, rest), children));
|
|
14140
14431
|
});
|
|
14141
14432
|
CSidebarHeader.propTypes = {
|
|
14142
|
-
children: PropTypes.node,
|
|
14143
|
-
className: PropTypes.string,
|
|
14433
|
+
children: PropTypes$1.node,
|
|
14434
|
+
className: PropTypes$1.string,
|
|
14144
14435
|
};
|
|
14145
14436
|
CSidebarHeader.displayName = 'CSidebarHeader';
|
|
14146
14437
|
|
|
@@ -14149,8 +14440,8 @@ var CTabContent = React$1.forwardRef(function (_a, ref) {
|
|
|
14149
14440
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('tab-content', className) }, rest, { ref: ref }), children));
|
|
14150
14441
|
});
|
|
14151
14442
|
CTabContent.propTypes = {
|
|
14152
|
-
children: PropTypes.node,
|
|
14153
|
-
className: PropTypes.string,
|
|
14443
|
+
children: PropTypes$1.node,
|
|
14444
|
+
className: PropTypes$1.string,
|
|
14154
14445
|
};
|
|
14155
14446
|
CTabContent.displayName = 'CTabContent';
|
|
14156
14447
|
|
|
@@ -14164,11 +14455,11 @@ var CTabPane = React$1.forwardRef(function (_a, ref) {
|
|
|
14164
14455
|
}, className) }, rest, { ref: forkedRef }), children)); }));
|
|
14165
14456
|
});
|
|
14166
14457
|
CTabPane.propTypes = {
|
|
14167
|
-
children: PropTypes.node,
|
|
14168
|
-
className: PropTypes.string,
|
|
14169
|
-
onHide: PropTypes.func,
|
|
14170
|
-
onShow: PropTypes.func,
|
|
14171
|
-
visible: PropTypes.bool,
|
|
14458
|
+
children: PropTypes$1.node,
|
|
14459
|
+
className: PropTypes$1.string,
|
|
14460
|
+
onHide: PropTypes$1.func,
|
|
14461
|
+
onShow: PropTypes$1.func,
|
|
14462
|
+
visible: PropTypes$1.bool,
|
|
14172
14463
|
};
|
|
14173
14464
|
CTabPane.displayName = 'CTabPane';
|
|
14174
14465
|
|
|
@@ -14213,17 +14504,17 @@ var CToast = React$1.forwardRef(function (_a, ref) {
|
|
|
14213
14504
|
}));
|
|
14214
14505
|
});
|
|
14215
14506
|
CToast.propTypes = {
|
|
14216
|
-
animation: PropTypes.bool,
|
|
14217
|
-
autohide: PropTypes.bool,
|
|
14218
|
-
children: PropTypes.node,
|
|
14219
|
-
className: PropTypes.string,
|
|
14507
|
+
animation: PropTypes$1.bool,
|
|
14508
|
+
autohide: PropTypes$1.bool,
|
|
14509
|
+
children: PropTypes$1.node,
|
|
14510
|
+
className: PropTypes$1.string,
|
|
14220
14511
|
color: colorPropType,
|
|
14221
|
-
delay: PropTypes.number,
|
|
14222
|
-
index: PropTypes.number,
|
|
14223
|
-
key: PropTypes.number,
|
|
14224
|
-
onClose: PropTypes.func,
|
|
14225
|
-
onShow: PropTypes.func,
|
|
14226
|
-
visible: PropTypes.bool,
|
|
14512
|
+
delay: PropTypes$1.number,
|
|
14513
|
+
index: PropTypes$1.number,
|
|
14514
|
+
key: PropTypes$1.number,
|
|
14515
|
+
onClose: PropTypes$1.func,
|
|
14516
|
+
onShow: PropTypes$1.func,
|
|
14517
|
+
visible: PropTypes$1.bool,
|
|
14227
14518
|
};
|
|
14228
14519
|
CToast.displayName = 'CToast';
|
|
14229
14520
|
|
|
@@ -14232,8 +14523,8 @@ var CToastBody = React$1.forwardRef(function (_a, ref) {
|
|
|
14232
14523
|
return (React$1.createElement("div", __assign$1({ className: classNames$1('toast-body', className) }, rest, { ref: ref }), children));
|
|
14233
14524
|
});
|
|
14234
14525
|
CToastBody.propTypes = {
|
|
14235
|
-
children: PropTypes.node,
|
|
14236
|
-
className: PropTypes.string,
|
|
14526
|
+
children: PropTypes$1.node,
|
|
14527
|
+
className: PropTypes$1.string,
|
|
14237
14528
|
};
|
|
14238
14529
|
CToastBody.displayName = 'CToastBody';
|
|
14239
14530
|
|
|
@@ -14242,7 +14533,7 @@ var CToastClose = React$1.forwardRef(function (_a, ref) {
|
|
|
14242
14533
|
var setVisible = React$1.useContext(CToastContext).setVisible;
|
|
14243
14534
|
return Component ? (React$1.createElement(Component, __assign$1({ onClick: function () { return setVisible(false); } }, rest, { ref: ref }), children)) : (React$1.createElement(CCloseButton, __assign$1({ onClick: function () { return setVisible(false); } }, rest, { ref: ref })));
|
|
14244
14535
|
});
|
|
14245
|
-
CToastClose.propTypes = __assign$1(__assign$1({}, CCloseButton.propTypes), { component: PropTypes.elementType });
|
|
14536
|
+
CToastClose.propTypes = __assign$1(__assign$1({}, CCloseButton.propTypes), { component: PropTypes$1.elementType });
|
|
14246
14537
|
CToastClose.displayName = 'CToastClose';
|
|
14247
14538
|
|
|
14248
14539
|
var CToastHeader = React$1.forwardRef(function (_a, ref) {
|
|
@@ -14252,9 +14543,9 @@ var CToastHeader = React$1.forwardRef(function (_a, ref) {
|
|
|
14252
14543
|
closeButton && React$1.createElement(CToastClose, null)));
|
|
14253
14544
|
});
|
|
14254
14545
|
CToastHeader.propTypes = {
|
|
14255
|
-
children: PropTypes.node,
|
|
14256
|
-
className: PropTypes.string,
|
|
14257
|
-
closeButton: PropTypes.bool,
|
|
14546
|
+
children: PropTypes$1.node,
|
|
14547
|
+
className: PropTypes$1.string,
|
|
14548
|
+
closeButton: PropTypes$1.bool,
|
|
14258
14549
|
};
|
|
14259
14550
|
CToastHeader.displayName = 'CToastHeader';
|
|
14260
14551
|
|
|
@@ -14290,11 +14581,11 @@ var CToaster = React$1.forwardRef(function (_a, ref) {
|
|
|
14290
14581
|
toasts.map(function (toast) { return React$1.cloneElement(toast, { visible: true }); }))) : null));
|
|
14291
14582
|
});
|
|
14292
14583
|
CToaster.propTypes = {
|
|
14293
|
-
children: PropTypes.node,
|
|
14294
|
-
className: PropTypes.string,
|
|
14295
|
-
placement: PropTypes.oneOfType([
|
|
14296
|
-
PropTypes.string,
|
|
14297
|
-
PropTypes.oneOf([
|
|
14584
|
+
children: PropTypes$1.node,
|
|
14585
|
+
className: PropTypes$1.string,
|
|
14586
|
+
placement: PropTypes$1.oneOfType([
|
|
14587
|
+
PropTypes$1.string,
|
|
14588
|
+
PropTypes$1.oneOf([
|
|
14298
14589
|
'top-start',
|
|
14299
14590
|
'top-center',
|
|
14300
14591
|
'top-end',
|
|
@@ -14306,7 +14597,7 @@ CToaster.propTypes = {
|
|
|
14306
14597
|
'bottom-end',
|
|
14307
14598
|
]),
|
|
14308
14599
|
]),
|
|
14309
|
-
push: PropTypes.any,
|
|
14600
|
+
push: PropTypes$1.any,
|
|
14310
14601
|
};
|
|
14311
14602
|
CToaster.displayName = 'CToaster';
|
|
14312
14603
|
|
|
@@ -14371,7 +14662,7 @@ var CTooltip = function (_a) {
|
|
|
14371
14662
|
typeof window !== 'undefined' &&
|
|
14372
14663
|
ReactDOM.createPortal(React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, onEnter: onShow, onExit: onHide, timeout: {
|
|
14373
14664
|
enter: 0,
|
|
14374
|
-
exit: 200,
|
|
14665
|
+
exit: tooltipRef.current ? getTransitionDurationFromElement(tooltipRef.current) + 50 : 200,
|
|
14375
14666
|
}, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('tooltip', 'bs-tooltip-auto', {
|
|
14376
14667
|
fade: animation,
|
|
14377
14668
|
show: state === 'entered',
|
|
@@ -14380,23 +14671,23 @@ var CTooltip = function (_a) {
|
|
|
14380
14671
|
React$1.createElement("div", { className: "tooltip-inner" }, content))); }), document.body)));
|
|
14381
14672
|
};
|
|
14382
14673
|
CTooltip.propTypes = {
|
|
14383
|
-
animation: PropTypes.bool,
|
|
14384
|
-
children: PropTypes.node,
|
|
14385
|
-
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14386
|
-
delay: PropTypes.oneOfType([
|
|
14387
|
-
PropTypes.number,
|
|
14388
|
-
PropTypes.shape({
|
|
14389
|
-
show: PropTypes.number.isRequired,
|
|
14390
|
-
hide: PropTypes.number.isRequired,
|
|
14674
|
+
animation: PropTypes$1.bool,
|
|
14675
|
+
children: PropTypes$1.node,
|
|
14676
|
+
content: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14677
|
+
delay: PropTypes$1.oneOfType([
|
|
14678
|
+
PropTypes$1.number,
|
|
14679
|
+
PropTypes$1.shape({
|
|
14680
|
+
show: PropTypes$1.number.isRequired,
|
|
14681
|
+
hide: PropTypes$1.number.isRequired,
|
|
14391
14682
|
}),
|
|
14392
14683
|
]),
|
|
14393
14684
|
fallbackPlacements: fallbackPlacementsPropType,
|
|
14394
|
-
offset: PropTypes.any,
|
|
14395
|
-
onHide: PropTypes.func,
|
|
14396
|
-
onShow: PropTypes.func,
|
|
14397
|
-
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
14685
|
+
offset: PropTypes$1.any,
|
|
14686
|
+
onHide: PropTypes$1.func,
|
|
14687
|
+
onShow: PropTypes$1.func,
|
|
14688
|
+
placement: PropTypes$1.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
|
|
14398
14689
|
trigger: triggerPropType,
|
|
14399
|
-
visible: PropTypes.bool,
|
|
14690
|
+
visible: PropTypes$1.bool,
|
|
14400
14691
|
};
|
|
14401
14692
|
CTooltip.displayName = 'CTooltip';
|
|
14402
14693
|
|
|
@@ -14412,12 +14703,12 @@ var CWidgetStatsA = React$1.forwardRef(function (_a, ref) {
|
|
|
14412
14703
|
chart));
|
|
14413
14704
|
});
|
|
14414
14705
|
CWidgetStatsA.propTypes = {
|
|
14415
|
-
action: PropTypes.node,
|
|
14416
|
-
chart: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14417
|
-
className: PropTypes.string,
|
|
14706
|
+
action: PropTypes$1.node,
|
|
14707
|
+
chart: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14708
|
+
className: PropTypes$1.string,
|
|
14418
14709
|
color: colorPropType,
|
|
14419
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14420
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
|
|
14710
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14711
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14421
14712
|
};
|
|
14422
14713
|
CWidgetStatsA.displayName = 'CWidgetStatsA';
|
|
14423
14714
|
|
|
@@ -14431,13 +14722,13 @@ var CWidgetStatsB = React$1.forwardRef(function (_a, ref) {
|
|
|
14431
14722
|
text && (React$1.createElement("small", { className: inverse ? 'text-medium-emphasis-inverse' : 'text-medium-emphasis' }, text)))));
|
|
14432
14723
|
});
|
|
14433
14724
|
CWidgetStatsB.propTypes = {
|
|
14434
|
-
className: PropTypes.string,
|
|
14725
|
+
className: PropTypes$1.string,
|
|
14435
14726
|
color: colorPropType,
|
|
14436
|
-
inverse: PropTypes.bool,
|
|
14437
|
-
progress: PropTypes.object,
|
|
14438
|
-
text: PropTypes.string,
|
|
14439
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14440
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
|
|
14727
|
+
inverse: PropTypes$1.bool,
|
|
14728
|
+
progress: PropTypes$1.object,
|
|
14729
|
+
text: PropTypes$1.string,
|
|
14730
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14731
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14441
14732
|
};
|
|
14442
14733
|
CWidgetStatsB.displayName = 'CWidgetCWidgetStatsB';
|
|
14443
14734
|
|
|
@@ -14451,13 +14742,13 @@ var CWidgetStatsC = React$1.forwardRef(function (_a, ref) {
|
|
|
14451
14742
|
React$1.createElement(CProgress, __assign$1({ className: "mt-3 mb-0", height: 4 }, (inverse && { white: true }), progress)))));
|
|
14452
14743
|
});
|
|
14453
14744
|
CWidgetStatsC.propTypes = {
|
|
14454
|
-
className: PropTypes.string,
|
|
14745
|
+
className: PropTypes$1.string,
|
|
14455
14746
|
color: colorPropType,
|
|
14456
|
-
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14457
|
-
inverse: PropTypes.bool,
|
|
14458
|
-
progress: PropTypes.object,
|
|
14459
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14460
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
|
|
14747
|
+
icon: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14748
|
+
inverse: PropTypes$1.bool,
|
|
14749
|
+
progress: PropTypes$1.object,
|
|
14750
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14751
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14461
14752
|
};
|
|
14462
14753
|
CWidgetStatsC.displayName = 'CWidgetStatsCWidgetStatsC';
|
|
14463
14754
|
|
|
@@ -14480,11 +14771,11 @@ var CWidgetStatsD = React$1.forwardRef(function (_a, ref) {
|
|
|
14480
14771
|
}))));
|
|
14481
14772
|
});
|
|
14482
14773
|
CWidgetStatsD.propTypes = {
|
|
14483
|
-
chart: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14484
|
-
className: PropTypes.string,
|
|
14774
|
+
chart: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14775
|
+
className: PropTypes$1.string,
|
|
14485
14776
|
color: colorPropType,
|
|
14486
|
-
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14487
|
-
values: PropTypes.arrayOf(PropTypes.any),
|
|
14777
|
+
icon: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14778
|
+
values: PropTypes$1.arrayOf(PropTypes$1.any),
|
|
14488
14779
|
};
|
|
14489
14780
|
CWidgetStatsD.displayName = 'CWidgetStatsD';
|
|
14490
14781
|
|
|
@@ -14497,11 +14788,11 @@ var CWidgetStatsE = React$1.forwardRef(function (_a, ref) {
|
|
|
14497
14788
|
chart)));
|
|
14498
14789
|
});
|
|
14499
14790
|
CWidgetStatsE.propTypes = {
|
|
14500
|
-
children: PropTypes.node,
|
|
14501
|
-
chart: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14502
|
-
className: PropTypes.string,
|
|
14503
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14504
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
|
|
14791
|
+
children: PropTypes$1.node,
|
|
14792
|
+
chart: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14793
|
+
className: PropTypes$1.string,
|
|
14794
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14795
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14505
14796
|
};
|
|
14506
14797
|
CWidgetStatsE.displayName = 'CWidgetStatsE';
|
|
14507
14798
|
|
|
@@ -14516,13 +14807,13 @@ var CWidgetStatsF = React$1.forwardRef(function (_a, ref) {
|
|
|
14516
14807
|
footer && React$1.createElement(CCardFooter, null, footer)));
|
|
14517
14808
|
});
|
|
14518
14809
|
CWidgetStatsF.propTypes = {
|
|
14519
|
-
className: PropTypes.string,
|
|
14810
|
+
className: PropTypes$1.string,
|
|
14520
14811
|
color: colorPropType,
|
|
14521
|
-
footer: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14522
|
-
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14523
|
-
padding: PropTypes.bool,
|
|
14524
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
14525
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]),
|
|
14812
|
+
footer: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14813
|
+
icon: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14814
|
+
padding: PropTypes$1.bool,
|
|
14815
|
+
title: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node]),
|
|
14816
|
+
value: PropTypes$1.oneOfType([PropTypes$1.string, PropTypes$1.node, PropTypes$1.number]),
|
|
14526
14817
|
};
|
|
14527
14818
|
CWidgetStatsF.displayName = 'CWidgetStatsF';
|
|
14528
14819
|
|