@coreui/react-pro 4.9.0-next.0 → 4.9.0
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/alert/CAlert.d.ts +1 -1
- package/dist/components/avatar/CAvatar.d.ts +1 -1
- package/dist/components/badge/CBadge.d.ts +1 -1
- package/dist/components/button/CButton.d.ts +1 -1
- package/dist/components/calendar/utils.d.ts +0 -1
- package/dist/components/callout/CCallout.d.ts +1 -1
- package/dist/components/card/CCard.d.ts +1 -1
- package/dist/components/conditional-portal/CConditionalPortal.d.ts +12 -0
- package/dist/components/conditional-portal/index.d.ts +2 -0
- package/dist/components/date-range-picker/CDateRangePicker.d.ts +1 -1
- package/dist/components/date-range-picker/utils.d.ts +1 -0
- package/dist/components/dropdown/CDropdown.d.ts +1 -1
- package/dist/components/dropdown/CDropdownToggle.d.ts +1 -1
- package/dist/components/form/CFormCheck.d.ts +8 -2
- package/dist/components/form/CFormSwitch.d.ts +6 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/list-group/CListGroupItem.d.ts +4 -5
- package/dist/components/multi-select/CMultiSelect.d.ts +1 -13
- package/dist/components/multi-select/CMultiSelectNativeSelect.d.ts +1 -1
- package/dist/components/multi-select/CMultiSelectOptions.d.ts +1 -1
- package/dist/components/multi-select/CMultiSelectSelection.d.ts +1 -1
- package/dist/components/multi-select/types.d.ts +14 -0
- package/dist/components/multi-select/utils.d.ts +6 -0
- package/dist/components/navbar/CNavbar.d.ts +1 -1
- package/dist/components/picker/CPicker.d.ts +1 -1
- package/dist/components/placeholder/CPlaceholder.d.ts +1 -1
- package/dist/components/popover/CPopover.d.ts +1 -1
- package/dist/components/progress/CProgressBar.d.ts +1 -1
- package/dist/components/smart-table/CSmartTableHead.d.ts +1 -1
- package/dist/components/smart-table/CSmartTableInterface.d.ts +8 -0
- package/dist/components/smart-table/types.d.ts +1 -1
- package/dist/components/spinner/CSpinner.d.ts +1 -1
- package/dist/components/table/CTable.d.ts +2 -18
- package/dist/components/table/CTableBody.d.ts +1 -1
- package/dist/components/table/CTableDataCell.d.ts +1 -1
- package/dist/components/table/CTableFoot.d.ts +1 -1
- package/dist/components/table/CTableHead.d.ts +1 -1
- package/dist/components/table/CTableHeaderCell.d.ts +1 -1
- package/dist/components/table/CTableResponsiveWrapper.d.ts +0 -1
- package/dist/components/table/CTableRow.d.ts +1 -1
- package/dist/components/table/types.d.ts +17 -0
- package/dist/components/table/utils.d.ts +5 -0
- package/dist/components/toast/CToast.d.ts +1 -1
- package/dist/components/toast/CToastClose.d.ts +1 -1
- package/dist/components/tooltip/CTooltip.d.ts +1 -1
- package/dist/components/virtual-scroller/CVirtualScroller.d.ts +0 -8
- package/dist/components/widgets/CWidgetStatsA.d.ts +1 -1
- package/dist/components/widgets/CWidgetStatsB.d.ts +1 -1
- package/dist/components/widgets/CWidgetStatsC.d.ts +1 -1
- package/dist/components/widgets/CWidgetStatsD.d.ts +1 -1
- package/dist/components/widgets/CWidgetStatsF.d.ts +1 -1
- package/dist/index.es.js +696 -927
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +695 -925
- package/dist/index.js.map +1 -1
- package/dist/props.d.ts +8 -0
- package/dist/types.d.ts +7 -0
- package/dist/utils/index.d.ts +1 -3
- package/package.json +11 -6
- package/src/components/accordion/CAccordion.tsx +7 -3
- package/src/components/accordion/CAccordionBody.tsx +2 -2
- package/src/components/accordion/CAccordionButton.tsx +1 -3
- package/src/components/accordion/CAccordionCollapse.tsx +1 -0
- package/src/components/accordion/CAccordionHeader.tsx +1 -3
- package/src/components/accordion/CAccordionItem.tsx +2 -4
- package/src/components/accordion/__tests__/__snapshots__/CAccordionBody.spec.tsx.snap +2 -2
- package/src/components/alert/CAlert.tsx +21 -28
- package/src/components/alert/CAlertHeading.tsx +1 -3
- package/src/components/alert/CAlertLink.tsx +1 -3
- package/src/components/alert/__tests__/__snapshots__/CAlert.spec.tsx.snap +1 -1
- package/src/components/avatar/CAvatar.tsx +16 -19
- package/src/components/backdrop/CBackdrop.tsx +10 -13
- package/src/components/badge/CBadge.tsx +21 -27
- package/src/components/breadcrumb/CBreadcrumb.tsx +1 -2
- package/src/components/breadcrumb/CBreadcrumbItem.tsx +12 -8
- package/src/components/button/CButton.tsx +10 -10
- package/src/components/button-group/CButtonGroup.tsx +9 -7
- package/src/components/button-group/CButtonToolbar.tsx +1 -3
- package/src/components/calendar/utils.ts +7 -55
- package/src/components/callout/CCallout.tsx +13 -10
- package/src/components/card/CCard.tsx +14 -11
- package/src/components/card/CCardBody.tsx +1 -3
- package/src/components/card/CCardFooter.tsx +1 -3
- package/src/components/card/CCardGroup.tsx +1 -3
- package/src/components/card/CCardHeader.tsx +1 -3
- package/src/components/card/CCardImage.tsx +5 -3
- package/src/components/card/CCardImageOverlay.tsx +1 -3
- package/src/components/card/CCardLink.tsx +1 -3
- package/src/components/card/CCardSubtitle.tsx +1 -3
- package/src/components/card/CCardText.tsx +1 -3
- package/src/components/card/CCardTitle.tsx +1 -3
- package/src/components/carousel/CCarousel.tsx +8 -8
- package/src/components/carousel/CCarouselCaption.tsx +1 -3
- package/src/components/carousel/CCarouselItem.tsx +11 -9
- package/src/components/close-button/CCloseButton.tsx +9 -10
- package/src/components/collapse/CCollapse.tsx +8 -20
- package/src/components/collapse/__tests__/CCollapse.spec.tsx +2 -3
- package/src/components/conditional-portal/CConditionalPortal.tsx +29 -0
- package/src/components/conditional-portal/index.ts +3 -0
- package/src/components/date-range-picker/CDateRangePicker.tsx +11 -13
- package/src/components/date-range-picker/utils.ts +49 -0
- package/src/components/dropdown/CDropdown.tsx +26 -23
- package/src/components/dropdown/CDropdownDivider.tsx +1 -3
- package/src/components/dropdown/CDropdownHeader.tsx +1 -3
- package/src/components/dropdown/CDropdownItem.tsx +7 -5
- package/src/components/dropdown/CDropdownItemPlain.tsx +1 -3
- package/src/components/dropdown/CDropdownMenu.tsx +29 -32
- package/src/components/dropdown/CDropdownToggle.tsx +34 -27
- package/src/components/dropdown/__tests__/CDropdown.spec.tsx +2 -4
- package/src/components/dropdown/__tests__/__snapshots__/CDropdown.spec.tsx.snap +1 -1
- package/src/components/footer/CFooter.tsx +5 -3
- package/src/components/form/CForm.tsx +5 -2
- package/src/components/form/CFormCheck.tsx +90 -66
- package/src/components/form/CFormControlValidation.tsx +0 -1
- package/src/components/form/CFormControlWrapper.tsx +3 -4
- package/src/components/form/CFormFeedback.tsx +11 -8
- package/src/components/form/CFormFloating.tsx +1 -2
- package/src/components/form/CFormInput.tsx +18 -16
- package/src/components/form/CFormLabel.tsx +1 -2
- package/src/components/form/CFormRange.tsx +2 -4
- package/src/components/form/CFormSelect.tsx +16 -12
- package/src/components/form/CFormSwitch.tsx +31 -20
- package/src/components/form/CFormText.tsx +1 -2
- package/src/components/form/CFormTextarea.tsx +14 -11
- package/src/components/form/CInputGroup.tsx +11 -8
- package/src/components/form/CInputGroupText.tsx +1 -2
- package/src/components/form/__tests__/CFormRange.spec.tsx +1 -1
- package/src/components/form/__tests__/__snapshots__/CForm.spec.tsx.snap +2 -6
- package/src/components/form/__tests__/__snapshots__/CFormRange.spec.tsx.snap +2 -2
- package/src/components/grid/CCol.tsx +8 -6
- package/src/components/grid/CContainer.tsx +8 -6
- package/src/components/grid/CRow.tsx +4 -3
- package/src/components/header/CHeader.tsx +12 -13
- package/src/components/header/CHeaderBrand.tsx +1 -3
- package/src/components/header/CHeaderBrand.tsx~HEAD +1 -3
- package/src/components/header/CHeaderDivider.tsx +1 -3
- package/src/components/header/CHeaderNav.tsx +6 -3
- package/src/components/header/CHeaderText.tsx +1 -3
- package/src/components/header/CHeaderToggler.tsx +2 -4
- package/src/components/image/CImage.tsx +17 -10
- package/src/components/image/__tests__/__snapshots__/CImage.spec.tsx.snap +1 -3
- package/src/components/index.ts +1 -0
- package/src/components/link/CLink.tsx +2 -4
- package/src/components/list-group/CListGroup.tsx +11 -10
- package/src/components/list-group/CListGroupItem.tsx +21 -20
- package/src/components/list-group/CListGroupItem.tsx~HEAD +3 -1
- package/src/components/loading-button/CLoadingButton.tsx +1 -3
- package/src/components/modal/CModal.tsx +57 -72
- package/src/components/modal/CModalBody.tsx +1 -3
- package/src/components/modal/CModalContent.tsx +1 -3
- package/src/components/modal/CModalDialog.tsx +16 -14
- package/src/components/modal/CModalFooter.tsx +1 -3
- package/src/components/modal/CModalHeader.tsx +4 -4
- package/src/components/modal/CModalTitle.tsx +1 -3
- package/src/components/modal/__tests__/CModal.spec.tsx +19 -20
- package/src/components/multi-select/CMultiSelect.tsx +34 -93
- package/src/components/multi-select/CMultiSelectNativeSelect.tsx +1 -1
- package/src/components/multi-select/CMultiSelectOptions.tsx +2 -2
- package/src/components/multi-select/CMultiSelectSelection.tsx +1 -1
- package/src/components/multi-select/types.ts +15 -0
- package/src/components/multi-select/utils.ts +92 -0
- package/src/components/nav/CNav.tsx +13 -10
- package/src/components/nav/CNavGroup.tsx +1 -3
- package/src/components/nav/CNavGroupItems.tsx +1 -2
- package/src/components/nav/CNavItem.tsx +9 -10
- package/src/components/nav/CNavLink.tsx +4 -5
- package/src/components/nav/CNavTitle.tsx +1 -2
- package/src/components/navbar/CNavbar.tsx +23 -23
- package/src/components/navbar/CNavbarBrand.tsx +2 -3
- package/src/components/navbar/CNavbarNav.tsx +6 -3
- package/src/components/navbar/CNavbarText.tsx +1 -3
- package/src/components/navbar/CNavbarToggler.tsx +2 -4
- package/src/components/offcanvas/COffcanvas.tsx +42 -68
- package/src/components/offcanvas/COffcanvasBody.tsx +1 -3
- package/src/components/offcanvas/COffcanvasHeader.tsx +1 -3
- package/src/components/offcanvas/COffcanvasTitle.tsx +1 -3
- package/src/components/offcanvas/__tests__/COffcanvas.spec.tsx +7 -2
- package/src/components/offcanvas/__tests__/__snapshots__/COffcanvas.spec.tsx.snap +9 -4
- package/src/components/pagination/CPagination.tsx +12 -9
- package/src/components/pagination/CPaginationItem.tsx +12 -11
- package/src/components/pagination/__tests__/CPagination.spec.tsx +3 -3
- package/src/components/pagination/__tests__/CPaginationItem.spec.tsx +3 -3
- package/src/components/picker/CPicker.tsx +7 -7
- package/src/components/placeholder/CPlaceholder.tsx +15 -12
- package/src/components/popover/CPopover.tsx +24 -34
- package/src/components/progress/CProgress.tsx +13 -10
- package/src/components/progress/CProgressBar.tsx +11 -12
- package/src/components/sidebar/CSidebar.tsx +22 -19
- package/src/components/sidebar/CSidebarBrand.tsx +1 -2
- package/src/components/sidebar/CSidebarFooter.tsx +1 -2
- package/src/components/sidebar/CSidebarHeader.tsx +1 -2
- package/src/components/sidebar/CSidebarNav.tsx +2 -2
- package/src/components/sidebar/CSidebarToggler.tsx +1 -2
- package/src/components/smart-pagination/CSmartPagination.tsx +22 -20
- package/src/components/smart-table/CSmartTable.tsx +5 -9
- package/src/components/smart-table/CSmartTableBody.tsx +82 -81
- package/src/components/smart-table/CSmartTableHead.tsx +5 -2
- package/src/components/smart-table/CSmartTableInterface.tsx +8 -0
- package/src/components/smart-table/{utils.tsx → utils.ts} +4 -5
- package/src/components/spinner/CSpinner.tsx +13 -9
- package/src/components/table/CTable.tsx +45 -77
- package/src/components/table/CTableBody.tsx +14 -9
- package/src/components/table/CTableDataCell.tsx +16 -11
- package/src/components/table/CTableFoot.tsx +14 -9
- package/src/components/table/CTableHead.tsx +14 -9
- package/src/components/table/CTableHeaderCell.tsx +14 -9
- package/src/components/table/CTableResponsiveWrapper.tsx +2 -3
- package/src/components/table/CTableRow.tsx +16 -11
- package/src/components/table/__tests__/__snapshots__/CTable.spec.tsx.snap +1 -5
- package/src/components/table/types.ts +20 -0
- package/src/components/table/utils.ts +24 -0
- package/src/components/tabs/CTabContent.tsx +1 -2
- package/src/components/tabs/CTabPane.tsx +18 -20
- package/src/components/tabs/__tests__/CTabPane.spec.tsx +2 -5
- package/src/components/tabs/__tests__/__snapshots__/CTabPane.spec.tsx.snap +1 -1
- package/src/components/time-picker/CTimePicker.tsx +14 -18
- package/src/components/toast/CToast.tsx +32 -45
- package/src/components/toast/CToastBody.tsx +1 -2
- package/src/components/toast/CToastClose.tsx +4 -2
- package/src/components/toast/CToastHeader.tsx +1 -2
- package/src/components/toast/CToaster.tsx +27 -26
- package/src/components/toast/__tests__/CToast.spec.tsx +2 -1
- package/src/components/toast/__tests__/__snapshots__/CToast.spec.tsx.snap +1 -66
- package/src/components/tooltip/CTooltip.tsx +24 -34
- package/src/components/virtual-scroller/CVirtualScroller.tsx +35 -60
- package/src/components/widgets/CWidgetStatsA.tsx +11 -9
- package/src/components/widgets/CWidgetStatsB.tsx +4 -4
- package/src/components/widgets/CWidgetStatsC.tsx +4 -4
- package/src/components/widgets/CWidgetStatsD.tsx +13 -15
- package/src/components/widgets/CWidgetStatsE.tsx +2 -5
- package/src/components/widgets/CWidgetStatsF.tsx +4 -8
- package/src/{components/Types.tsx → props.ts} +1 -68
- package/src/types.ts +68 -0
- package/src/utils/index.ts +1 -3
- package/src/components/multi-select/CMultiSelectCleaner.tsx +0 -18
- package/src/utils/getNextSibling.ts +0 -18
- package/src/utils/getPreviousSibling.ts +0 -18
- package/src/components/smart-table/{types.tsx → types.ts} +1 -1
package/dist/index.js
CHANGED
|
@@ -1330,10 +1330,9 @@ var classNames$1 = classnamesExports;
|
|
|
1330
1330
|
|
|
1331
1331
|
var CAccordionContext = React$1.createContext({});
|
|
1332
1332
|
var CAccordion = React$1.forwardRef(function (_a, ref) {
|
|
1333
|
-
var children = _a.children,
|
|
1334
|
-
var
|
|
1335
|
-
|
|
1336
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
1333
|
+
var children = _a.children, activeItemKey = _a.activeItemKey, _b = _a.alwaysOpen, alwaysOpen = _b === void 0 ? false : _b, className = _a.className, flush = _a.flush, rest = __rest$1(_a, ["children", "activeItemKey", "alwaysOpen", "className", "flush"]);
|
|
1334
|
+
var _c = React$1.useState(activeItemKey), _activeItemKey = _c[0], setActiveKey = _c[1];
|
|
1335
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('accordion', { 'accordion-flush': flush }, className) }, rest, { ref: ref }),
|
|
1337
1336
|
React$1.createElement(CAccordionContext.Provider, { value: { _activeItemKey: _activeItemKey, alwaysOpen: alwaysOpen, setActiveKey: setActiveKey } }, children)));
|
|
1338
1337
|
});
|
|
1339
1338
|
CAccordion.propTypes = {
|
|
@@ -1348,7 +1347,7 @@ CAccordion.displayName = 'CAccordion';
|
|
|
1348
1347
|
var CAccordionItemContext = React$1.createContext({});
|
|
1349
1348
|
var CAccordionItem = React$1.forwardRef(function (_a, ref) {
|
|
1350
1349
|
var children = _a.children, className = _a.className, itemKey = _a.itemKey, rest = __rest$1(_a, ["children", "className", "itemKey"]);
|
|
1351
|
-
var _itemKey = React$1.useRef(itemKey ? itemKey : Math.random().toString(36).
|
|
1350
|
+
var _itemKey = React$1.useRef(itemKey !== null && itemKey !== void 0 ? itemKey : Math.random().toString(36).slice(2, 11));
|
|
1352
1351
|
var _b = React$1.useContext(CAccordionContext), _activeItemKey = _b._activeItemKey, alwaysOpen = _b.alwaysOpen, setActiveKey = _b.setActiveKey;
|
|
1353
1352
|
var _c = React$1.useState(Boolean(_activeItemKey === _itemKey.current)), visible = _c[0], setVisible = _c[1];
|
|
1354
1353
|
React$1.useEffect(function () {
|
|
@@ -1357,8 +1356,7 @@ var CAccordionItem = React$1.forwardRef(function (_a, ref) {
|
|
|
1357
1356
|
React$1.useEffect(function () {
|
|
1358
1357
|
setVisible(Boolean(_activeItemKey === _itemKey.current));
|
|
1359
1358
|
}, [_activeItemKey]);
|
|
1360
|
-
|
|
1361
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
1359
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('accordion-item', className) }, rest, { ref: ref }),
|
|
1362
1360
|
React$1.createElement(CAccordionItemContext.Provider, { value: { setVisible: setVisible, visible: visible } }, children)));
|
|
1363
1361
|
});
|
|
1364
1362
|
CAccordionItem.propTypes = {
|
|
@@ -2553,19 +2551,10 @@ var useStateWithCallback = function (initialState, handler, runHandler) {
|
|
|
2553
2551
|
|
|
2554
2552
|
var CCollapse = React$1.forwardRef(function (_a, ref) {
|
|
2555
2553
|
var children = _a.children, className = _a.className, horizontal = _a.horizontal, onHide = _a.onHide, onShow = _a.onShow, visible = _a.visible, rest = __rest$1(_a, ["children", "className", "horizontal", "onHide", "onShow", "visible"]);
|
|
2556
|
-
var _b = React$1.useState(), height = _b[0], setHeight = _b[1];
|
|
2557
|
-
var _c = React$1.useState(), width = _c[0], setWidth = _c[1];
|
|
2558
2554
|
var collapseRef = React$1.useRef(null);
|
|
2559
2555
|
var forkedRef = useForkedRef(ref, collapseRef);
|
|
2560
|
-
var
|
|
2561
|
-
|
|
2562
|
-
? 'collapsing'
|
|
2563
|
-
: state === 'entered'
|
|
2564
|
-
? 'collapse show'
|
|
2565
|
-
: state === 'exiting'
|
|
2566
|
-
? 'collapsing'
|
|
2567
|
-
: 'collapse';
|
|
2568
|
-
};
|
|
2556
|
+
var _b = React$1.useState(), height = _b[0], setHeight = _b[1];
|
|
2557
|
+
var _c = React$1.useState(), width = _c[0], setWidth = _c[1];
|
|
2569
2558
|
var onEntering = function () {
|
|
2570
2559
|
onShow && onShow();
|
|
2571
2560
|
if (horizontal) {
|
|
@@ -2603,14 +2592,15 @@ var CCollapse = React$1.forwardRef(function (_a, ref) {
|
|
|
2603
2592
|
}
|
|
2604
2593
|
setHeight(0);
|
|
2605
2594
|
};
|
|
2606
|
-
var _className = classNames$1({
|
|
2607
|
-
'collapse-horizontal': horizontal,
|
|
2608
|
-
}, className);
|
|
2609
2595
|
return (React$1.createElement(CSSTransition$1, { in: visible, nodeRef: collapseRef, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 350 }, function (state) {
|
|
2610
|
-
var transitionClass = getTransitionClass(state);
|
|
2611
2596
|
var currentHeight = height === 0 ? null : { height: height };
|
|
2612
2597
|
var currentWidth = width === 0 ? null : { width: width };
|
|
2613
|
-
return (React$1.createElement("div", __assign$1({ className: classNames$1(
|
|
2598
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1(className, {
|
|
2599
|
+
'collapse-horizontal': horizontal,
|
|
2600
|
+
collapsing: state === 'entering' || state === 'exiting',
|
|
2601
|
+
'collapse show': state === 'entered',
|
|
2602
|
+
collapse: state === 'exited',
|
|
2603
|
+
}), style: __assign$1(__assign$1({}, currentHeight), currentWidth) }, rest, { ref: forkedRef }), children));
|
|
2614
2604
|
}));
|
|
2615
2605
|
});
|
|
2616
2606
|
CCollapse.propTypes = {
|
|
@@ -2626,9 +2616,8 @@ CCollapse.displayName = 'CCollapse';
|
|
|
2626
2616
|
var CAccordionBody = React$1.forwardRef(function (_a, ref) {
|
|
2627
2617
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2628
2618
|
var visible = React$1.useContext(CAccordionItemContext).visible;
|
|
2629
|
-
var _className = classNames$1('accordion-body', className);
|
|
2630
2619
|
return (React$1.createElement(CCollapse, { className: "accordion-collapse", visible: visible },
|
|
2631
|
-
React$1.createElement("div", __assign$1({ className:
|
|
2620
|
+
React$1.createElement("div", __assign$1({ className: classNames$1('accordion-body', className) }, rest, { ref: ref }), children)));
|
|
2632
2621
|
});
|
|
2633
2622
|
CAccordionBody.propTypes = {
|
|
2634
2623
|
children: propTypesExports.node,
|
|
@@ -2639,8 +2628,7 @@ CAccordionBody.displayName = 'CAccordionBody';
|
|
|
2639
2628
|
var CAccordionButton = React$1.forwardRef(function (_a, ref) {
|
|
2640
2629
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2641
2630
|
var _b = React$1.useContext(CAccordionItemContext), visible = _b.visible, setVisible = _b.setVisible;
|
|
2642
|
-
|
|
2643
|
-
return (React$1.createElement("button", __assign$1({ type: "button", className: _className, "aria-expanded": !visible, onClick: function () { return setVisible(!visible); } }, rest, { ref: ref }), children));
|
|
2631
|
+
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));
|
|
2644
2632
|
});
|
|
2645
2633
|
CAccordionButton.propTypes = {
|
|
2646
2634
|
children: propTypesExports.node,
|
|
@@ -2659,8 +2647,7 @@ CAccordionCollapse.displayName = 'CAccordionCollapse';
|
|
|
2659
2647
|
|
|
2660
2648
|
var CAccordionHeader = React$1.forwardRef(function (_a, ref) {
|
|
2661
2649
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2662
|
-
|
|
2663
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
2650
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('accordion-header', className) }, rest, { ref: ref }),
|
|
2664
2651
|
React$1.createElement(CAccordionButton, null, children)));
|
|
2665
2652
|
});
|
|
2666
2653
|
CAccordionHeader.propTypes = {
|
|
@@ -2669,6 +2656,19 @@ CAccordionHeader.propTypes = {
|
|
|
2669
2656
|
};
|
|
2670
2657
|
CAccordionHeader.displayName = 'CAccordionHeader';
|
|
2671
2658
|
|
|
2659
|
+
var CCloseButton = React$1.forwardRef(function (_a, ref) {
|
|
2660
|
+
var className = _a.className, disabled = _a.disabled, white = _a.white, rest = __rest$1(_a, ["className", "disabled", "white"]);
|
|
2661
|
+
return (React$1.createElement("button", __assign$1({ type: "button", className: classNames$1('btn', 'btn-close', {
|
|
2662
|
+
'btn-close-white': white,
|
|
2663
|
+
}, disabled, className), "aria-label": "Close", disabled: disabled }, rest, { ref: ref })));
|
|
2664
|
+
});
|
|
2665
|
+
CCloseButton.propTypes = {
|
|
2666
|
+
className: propTypesExports.string,
|
|
2667
|
+
disabled: propTypesExports.bool,
|
|
2668
|
+
white: propTypesExports.bool,
|
|
2669
|
+
};
|
|
2670
|
+
CCloseButton.displayName = 'CCloseButton';
|
|
2671
|
+
|
|
2672
2672
|
var colorPropType = propTypesExports.oneOfType([
|
|
2673
2673
|
propTypesExports.oneOf([
|
|
2674
2674
|
'primary',
|
|
@@ -2732,20 +2732,6 @@ var textColorsPropType = propTypesExports.oneOfType([
|
|
|
2732
2732
|
]);
|
|
2733
2733
|
var triggerPropType = propTypesExports.oneOf(['hover', 'focus', 'click']);
|
|
2734
2734
|
|
|
2735
|
-
var CCloseButton = React$1.forwardRef(function (_a, ref) {
|
|
2736
|
-
var className = _a.className, disabled = _a.disabled, white = _a.white, rest = __rest$1(_a, ["className", "disabled", "white"]);
|
|
2737
|
-
var _className = classNames$1('btn', 'btn-close', {
|
|
2738
|
-
'btn-close-white': white,
|
|
2739
|
-
}, disabled, className);
|
|
2740
|
-
return (React$1.createElement("button", __assign$1({ type: "button", className: _className, "aria-label": "Close", disabled: disabled }, rest, { ref: ref })));
|
|
2741
|
-
});
|
|
2742
|
-
CCloseButton.propTypes = {
|
|
2743
|
-
className: propTypesExports.string,
|
|
2744
|
-
disabled: propTypesExports.bool,
|
|
2745
|
-
white: propTypesExports.bool,
|
|
2746
|
-
};
|
|
2747
|
-
CCloseButton.displayName = 'CCloseButton';
|
|
2748
|
-
|
|
2749
2735
|
var CAlert = React$1.forwardRef(function (_a, ref) {
|
|
2750
2736
|
var children = _a.children, className = _a.className, _b = _a.color, color = _b === void 0 ? 'primary' : _b, dismissible = _a.dismissible, variant = _a.variant, _c = _a.visible, visible = _c === void 0 ? true : _c, onClose = _a.onClose, rest = __rest$1(_a, ["children", "className", "color", "dismissible", "variant", "visible", "onClose"]);
|
|
2751
2737
|
var alertRef = React$1.useRef(null);
|
|
@@ -2754,18 +2740,12 @@ var CAlert = React$1.forwardRef(function (_a, ref) {
|
|
|
2754
2740
|
React$1.useEffect(function () {
|
|
2755
2741
|
setVisible(visible);
|
|
2756
2742
|
}, [visible]);
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
return (React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: alertRef, onExit: onClose, timeout: 150, unmountOnExit: true }, function (state) {
|
|
2764
|
-
var transitionClass = getTransitionClass(state);
|
|
2765
|
-
return (React$1.createElement("div", __assign$1({ className: classNames$1(_className, transitionClass), role: "alert" }, rest, { ref: forkedRef }),
|
|
2766
|
-
children,
|
|
2767
|
-
dismissible && React$1.createElement(CCloseButton, { onClick: function () { return setVisible(false); } })));
|
|
2768
|
-
}));
|
|
2743
|
+
return (React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: alertRef, onExit: onClose, timeout: 150, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('alert', variant === 'solid' ? "bg-".concat(color, " text-white") : "alert-".concat(color), {
|
|
2744
|
+
'alert-dismissible fade': dismissible,
|
|
2745
|
+
show: state === 'entered',
|
|
2746
|
+
}, className), role: "alert" }, rest, { ref: forkedRef }),
|
|
2747
|
+
children,
|
|
2748
|
+
dismissible && React$1.createElement(CCloseButton, { onClick: function () { return setVisible(false); } }))); }));
|
|
2769
2749
|
});
|
|
2770
2750
|
CAlert.propTypes = {
|
|
2771
2751
|
children: propTypesExports.node,
|
|
@@ -2780,8 +2760,7 @@ CAlert.displayName = 'CAlert';
|
|
|
2780
2760
|
|
|
2781
2761
|
var CAlertHeading = React$1.forwardRef(function (_a, ref) {
|
|
2782
2762
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'h4' : _b, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
2783
|
-
|
|
2784
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2763
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('alert-heading', className) }, rest, { ref: ref }), children));
|
|
2785
2764
|
});
|
|
2786
2765
|
CAlertHeading.propTypes = {
|
|
2787
2766
|
children: propTypesExports.node,
|
|
@@ -2792,9 +2771,11 @@ CAlertHeading.displayName = 'CAlertHeading';
|
|
|
2792
2771
|
|
|
2793
2772
|
var CLink = React$1.forwardRef(function (_a, ref) {
|
|
2794
2773
|
var children = _a.children, active = _a.active, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'a' : _b, disabled = _a.disabled, rest = __rest$1(_a, ["children", "active", "className", "component", "disabled"]);
|
|
2774
|
+
return (React$1.createElement(Component
|
|
2795
2775
|
// TODO: remove duplicated classes ex. `active active` in `<CListGroupItem>`
|
|
2796
|
-
|
|
2797
|
-
|
|
2776
|
+
, __assign$1({
|
|
2777
|
+
// TODO: remove duplicated classes ex. `active active` in `<CListGroupItem>`
|
|
2778
|
+
className: classNames$1(className, { active: active, disabled: disabled }) }, (active && { 'aria-current': 'page' }), (Component === 'a' && disabled && { 'aria-disabled': true, tabIndex: -1 }), ((Component === 'a' || Component === 'button') && {
|
|
2798
2779
|
onClick: function (event) {
|
|
2799
2780
|
event.preventDefault;
|
|
2800
2781
|
!disabled && rest.onClick && rest.onClick(event);
|
|
@@ -2812,8 +2793,7 @@ CLink.displayName = 'CLink';
|
|
|
2812
2793
|
|
|
2813
2794
|
var CAlertLink = React$1.forwardRef(function (_a, ref) {
|
|
2814
2795
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2815
|
-
|
|
2816
|
-
return (React$1.createElement(CLink, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2796
|
+
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('alert-link', className) }, rest, { ref: ref }), children));
|
|
2817
2797
|
});
|
|
2818
2798
|
CAlertLink.propTypes = {
|
|
2819
2799
|
children: propTypesExports.node,
|
|
@@ -2824,13 +2804,12 @@ CAlertLink.displayName = 'CAlertLink';
|
|
|
2824
2804
|
var CAvatar = React$1.forwardRef(function (_a, ref) {
|
|
2825
2805
|
var _b;
|
|
2826
2806
|
var children = _a.children, className = _a.className, color = _a.color, shape = _a.shape, size = _a.size, src = _a.src, status = _a.status, textColor = _a.textColor, rest = __rest$1(_a, ["children", "className", "color", "shape", "size", "src", "status", "textColor"]);
|
|
2827
|
-
var _className = classNames$1('avatar', (_b = {},
|
|
2828
|
-
_b["bg-".concat(color)] = color,
|
|
2829
|
-
_b["avatar-".concat(size)] = size,
|
|
2830
|
-
_b["text-".concat(textColor)] = textColor,
|
|
2831
|
-
_b), shape, className);
|
|
2832
2807
|
var statusClassName = status && classNames$1('avatar-status', "bg-".concat(status));
|
|
2833
|
-
return (React$1.createElement("div", __assign$1({ className:
|
|
2808
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('avatar', (_b = {},
|
|
2809
|
+
_b["bg-".concat(color)] = color,
|
|
2810
|
+
_b["avatar-".concat(size)] = size,
|
|
2811
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2812
|
+
_b), shape, className) }, rest, { ref: ref }),
|
|
2834
2813
|
src ? React$1.createElement("img", { src: src, className: "avatar-img" }) : children,
|
|
2835
2814
|
status && React$1.createElement("span", { className: statusClassName })));
|
|
2836
2815
|
});
|
|
@@ -2850,14 +2829,9 @@ var CBackdrop = React$1.forwardRef(function (_a, ref) {
|
|
|
2850
2829
|
var _b = _a.className, className = _b === void 0 ? 'modal-backdrop' : _b, visible = _a.visible, rest = __rest$1(_a, ["className", "visible"]);
|
|
2851
2830
|
var backdropRef = React$1.useRef(null);
|
|
2852
2831
|
var forkedRef = useForkedRef(ref, backdropRef);
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
};
|
|
2857
|
-
return (React$1.createElement(Transition$1, { in: visible, mountOnEnter: true, nodeRef: backdropRef, timeout: 150, unmountOnExit: true }, function (state) {
|
|
2858
|
-
var transitionClass = getTransitionClass(state);
|
|
2859
|
-
return (React$1.createElement("div", __assign$1({ className: classNames$1(_className, transitionClass) }, rest, { ref: forkedRef })));
|
|
2860
|
-
}));
|
|
2832
|
+
return (React$1.createElement(Transition$1, { in: visible, mountOnEnter: true, nodeRef: backdropRef, timeout: 150, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1(className, 'fade', {
|
|
2833
|
+
show: state === 'entered',
|
|
2834
|
+
}) }, rest, { ref: forkedRef }))); }));
|
|
2861
2835
|
});
|
|
2862
2836
|
CBackdrop.propTypes = {
|
|
2863
2837
|
className: propTypesExports.string,
|
|
@@ -2868,17 +2842,16 @@ CBackdrop.displayName = 'CBackdrop';
|
|
|
2868
2842
|
var CBadge = React$1.forwardRef(function (_a, ref) {
|
|
2869
2843
|
var _b;
|
|
2870
2844
|
var children = _a.children, className = _a.className, color = _a.color, _c = _a.component, Component = _c === void 0 ? 'span' : _c, position = _a.position, shape = _a.shape, size = _a.size, textColor = _a.textColor, rest = __rest$1(_a, ["children", "className", "color", "component", "position", "shape", "size", "textColor"]);
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2845
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('badge', (_b = {},
|
|
2846
|
+
_b["bg-".concat(color)] = color,
|
|
2847
|
+
_b['position-absolute translate-middle'] = position,
|
|
2848
|
+
_b['top-0'] = position === null || position === void 0 ? void 0 : position.includes('top'),
|
|
2849
|
+
_b['top-100'] = position === null || position === void 0 ? void 0 : position.includes('bottom'),
|
|
2850
|
+
_b['start-100'] = position === null || position === void 0 ? void 0 : position.includes('end'),
|
|
2851
|
+
_b['start-0'] = position === null || position === void 0 ? void 0 : position.includes('start'),
|
|
2852
|
+
_b["badge-".concat(size)] = size,
|
|
2853
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2854
|
+
_b), shape, className) }, rest, { ref: ref }), children));
|
|
2882
2855
|
});
|
|
2883
2856
|
CBadge.propTypes = {
|
|
2884
2857
|
children: propTypesExports.node,
|
|
@@ -2894,9 +2867,8 @@ CBadge.displayName = 'CBadge';
|
|
|
2894
2867
|
|
|
2895
2868
|
var CBreadcrumb = React$1.forwardRef(function (_a, ref) {
|
|
2896
2869
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2897
|
-
var _className = classNames$1('breadcrumb', className);
|
|
2898
2870
|
return (React$1.createElement("nav", { "aria-label": "breadcrumb" },
|
|
2899
|
-
React$1.createElement("ol", __assign$1({ className:
|
|
2871
|
+
React$1.createElement("ol", __assign$1({ className: classNames$1('breadcrumb', className) }, rest, { ref: ref }), children)));
|
|
2900
2872
|
});
|
|
2901
2873
|
CBreadcrumb.propTypes = {
|
|
2902
2874
|
children: propTypesExports.node,
|
|
@@ -2906,10 +2878,9 @@ CBreadcrumb.displayName = 'CBreadcrumb';
|
|
|
2906
2878
|
|
|
2907
2879
|
var CBreadcrumbItem = React$1.forwardRef(function (_a, ref) {
|
|
2908
2880
|
var children = _a.children, active = _a.active, className = _a.className, href = _a.href, rest = __rest$1(_a, ["children", "active", "className", "href"]);
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
return (React$1.createElement("li", __assign$1({ className: _className }, (active && { 'aria-current': 'page' }), rest, { ref: ref }), href ? React$1.createElement(CLink, { href: href }, children) : children));
|
|
2881
|
+
return (React$1.createElement("li", __assign$1({ className: classNames$1('breadcrumb-item', {
|
|
2882
|
+
active: active,
|
|
2883
|
+
}, className) }, (active && { 'aria-current': 'page' }), rest, { ref: ref }), href ? React$1.createElement(CLink, { href: href }, children) : children));
|
|
2913
2884
|
});
|
|
2914
2885
|
CBreadcrumbItem.propTypes = {
|
|
2915
2886
|
active: propTypesExports.bool,
|
|
@@ -2922,8 +2893,7 @@ CBreadcrumbItem.displayName = 'CBreadcrumbItem';
|
|
|
2922
2893
|
var CButton = React$1.forwardRef(function (_a, ref) {
|
|
2923
2894
|
var _b;
|
|
2924
2895
|
var children = _a.children, className = _a.className, _c = _a.color, color = _c === void 0 ? 'primary' : _c, _d = _a.component, component = _d === void 0 ? 'button' : _d, shape = _a.shape, size = _a.size, _e = _a.type, type = _e === void 0 ? 'button' : _e, variant = _a.variant, rest = __rest$1(_a, ["children", "className", "color", "component", "shape", "size", "type", "variant"]);
|
|
2925
|
-
|
|
2926
|
-
return (React$1.createElement(CLink, __assign$1({ component: rest.href ? 'a' : component, type: type, className: _className }, rest, { ref: ref }), children));
|
|
2896
|
+
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));
|
|
2927
2897
|
});
|
|
2928
2898
|
CButton.propTypes = {
|
|
2929
2899
|
children: propTypesExports.node,
|
|
@@ -2939,8 +2909,7 @@ CButton.displayName = 'CButton';
|
|
|
2939
2909
|
|
|
2940
2910
|
var CButtonToolbar = React$1.forwardRef(function (_a, ref) {
|
|
2941
2911
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2942
|
-
|
|
2943
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2912
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('btn-toolbar', className) }, rest, { ref: ref }), children));
|
|
2944
2913
|
});
|
|
2945
2914
|
CButtonToolbar.propTypes = {
|
|
2946
2915
|
children: propTypesExports.node,
|
|
@@ -2951,8 +2920,7 @@ CButtonToolbar.displayName = 'CButtonToolbar';
|
|
|
2951
2920
|
var CButtonGroup = React$1.forwardRef(function (_a, ref) {
|
|
2952
2921
|
var _b;
|
|
2953
2922
|
var children = _a.children, className = _a.className, size = _a.size, vertical = _a.vertical, rest = __rest$1(_a, ["children", "className", "size", "vertical"]);
|
|
2954
|
-
|
|
2955
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2923
|
+
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));
|
|
2956
2924
|
});
|
|
2957
2925
|
CButtonGroup.propTypes = {
|
|
2958
2926
|
children: propTypesExports.node,
|
|
@@ -2965,10 +2933,9 @@ CButtonGroup.displayName = 'CButtonGroup';
|
|
|
2965
2933
|
var CCallout = React$1.forwardRef(function (_a, ref) {
|
|
2966
2934
|
var _b;
|
|
2967
2935
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2936
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('callout', (_b = {},
|
|
2937
|
+
_b["callout-".concat(color)] = color,
|
|
2938
|
+
_b), className) }, rest, { ref: ref }), children));
|
|
2972
2939
|
});
|
|
2973
2940
|
CCallout.propTypes = {
|
|
2974
2941
|
children: propTypesExports.node,
|
|
@@ -2980,11 +2947,10 @@ CCallout.displayName = 'CCallout';
|
|
|
2980
2947
|
var CCard = React$1.forwardRef(function (_a, ref) {
|
|
2981
2948
|
var _b;
|
|
2982
2949
|
var children = _a.children, className = _a.className, color = _a.color, textColor = _a.textColor, rest = __rest$1(_a, ["children", "className", "color", "textColor"]);
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2950
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('card', (_b = {},
|
|
2951
|
+
_b["bg-".concat(color)] = color,
|
|
2952
|
+
_b["text-".concat(textColor)] = textColor,
|
|
2953
|
+
_b), className) }, rest, { ref: ref }), children));
|
|
2988
2954
|
});
|
|
2989
2955
|
CCard.propTypes = {
|
|
2990
2956
|
children: propTypesExports.node,
|
|
@@ -2996,8 +2962,7 @@ CCard.displayName = 'CCard';
|
|
|
2996
2962
|
|
|
2997
2963
|
var CCardBody = React$1.forwardRef(function (_a, ref) {
|
|
2998
2964
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
2999
|
-
|
|
3000
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2965
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-body', className) }, rest, { ref: ref }), children));
|
|
3001
2966
|
});
|
|
3002
2967
|
CCardBody.propTypes = {
|
|
3003
2968
|
children: propTypesExports.node,
|
|
@@ -3007,8 +2972,7 @@ CCardBody.displayName = 'CCardBody';
|
|
|
3007
2972
|
|
|
3008
2973
|
var CCardFooter = React$1.forwardRef(function (_a, ref) {
|
|
3009
2974
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
3010
|
-
|
|
3011
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2975
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-footer', className) }, rest, { ref: ref }), children));
|
|
3012
2976
|
});
|
|
3013
2977
|
CCardFooter.propTypes = {
|
|
3014
2978
|
children: propTypesExports.node,
|
|
@@ -3018,8 +2982,7 @@ CCardFooter.displayName = 'CCardFooter';
|
|
|
3018
2982
|
|
|
3019
2983
|
var CCardGroup = React$1.forwardRef(function (_a, ref) {
|
|
3020
2984
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
3021
|
-
|
|
3022
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2985
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-group', className) }, rest, { ref: ref }), children));
|
|
3023
2986
|
});
|
|
3024
2987
|
CCardGroup.propTypes = {
|
|
3025
2988
|
children: propTypesExports.node,
|
|
@@ -3029,8 +2992,7 @@ CCardGroup.displayName = 'CCardGroup';
|
|
|
3029
2992
|
|
|
3030
2993
|
var CCardHeader = React$1.forwardRef(function (_a, ref) {
|
|
3031
2994
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'div' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
3032
|
-
|
|
3033
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
2995
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-header', className) }, rest, { ref: ref }), children));
|
|
3034
2996
|
});
|
|
3035
2997
|
CCardHeader.propTypes = {
|
|
3036
2998
|
children: propTypesExports.node,
|
|
@@ -3041,8 +3003,7 @@ CCardHeader.displayName = 'CCardHeader';
|
|
|
3041
3003
|
|
|
3042
3004
|
var CCardImage = React$1.forwardRef(function (_a, ref) {
|
|
3043
3005
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'img' : _b, orientation = _a.orientation, rest = __rest$1(_a, ["children", "className", "component", "orientation"]);
|
|
3044
|
-
|
|
3045
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
3006
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1(orientation ? "card-img-".concat(orientation) : 'card-img', className) }, rest, { ref: ref }), children));
|
|
3046
3007
|
});
|
|
3047
3008
|
CCardImage.propTypes = {
|
|
3048
3009
|
children: propTypesExports.node,
|
|
@@ -3054,8 +3015,7 @@ CCardImage.displayName = 'CCardImage';
|
|
|
3054
3015
|
|
|
3055
3016
|
var CCardImageOverlay = React$1.forwardRef(function (_a, ref) {
|
|
3056
3017
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
3057
|
-
|
|
3058
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
3018
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('card-img-overlay', className) }, rest, { ref: ref }), children));
|
|
3059
3019
|
});
|
|
3060
3020
|
CCardImageOverlay.propTypes = {
|
|
3061
3021
|
children: propTypesExports.node,
|
|
@@ -3065,8 +3025,7 @@ CCardImageOverlay.displayName = 'CCardImageOverlay';
|
|
|
3065
3025
|
|
|
3066
3026
|
var CCardLink = React$1.forwardRef(function (_a, ref) {
|
|
3067
3027
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
3068
|
-
|
|
3069
|
-
return (React$1.createElement(CLink, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
3028
|
+
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('card-link', className) }, rest, { ref: ref }), children));
|
|
3070
3029
|
});
|
|
3071
3030
|
CCardLink.propTypes = {
|
|
3072
3031
|
children: propTypesExports.node,
|
|
@@ -3076,8 +3035,7 @@ CCardLink.displayName = 'CCardLink';
|
|
|
3076
3035
|
|
|
3077
3036
|
var CCardSubtitle = React$1.forwardRef(function (_a, ref) {
|
|
3078
3037
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h6' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
3079
|
-
|
|
3080
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
3038
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-subtitle', className) }, rest, { ref: ref }), children));
|
|
3081
3039
|
});
|
|
3082
3040
|
CCardSubtitle.propTypes = {
|
|
3083
3041
|
children: propTypesExports.node,
|
|
@@ -3088,8 +3046,7 @@ CCardSubtitle.displayName = 'CCardSubtitle';
|
|
|
3088
3046
|
|
|
3089
3047
|
var CCardText = React$1.forwardRef(function (_a, ref) {
|
|
3090
3048
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'p' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
3091
|
-
|
|
3092
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
3049
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-text', className) }, rest, { ref: ref }), children));
|
|
3093
3050
|
});
|
|
3094
3051
|
CCardText.propTypes = {
|
|
3095
3052
|
children: propTypesExports.node,
|
|
@@ -3100,8 +3057,7 @@ CCardText.displayName = 'CCardText';
|
|
|
3100
3057
|
|
|
3101
3058
|
var CCardTitle = React$1.forwardRef(function (_a, ref) {
|
|
3102
3059
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
3103
|
-
|
|
3104
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
3060
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('card-title', className) }, rest, { ref: ref }), children));
|
|
3105
3061
|
});
|
|
3106
3062
|
CCardTitle.propTypes = {
|
|
3107
3063
|
children: propTypesExports.node,
|
|
@@ -3110,38 +3066,6 @@ CCardTitle.propTypes = {
|
|
|
3110
3066
|
};
|
|
3111
3067
|
CCardTitle.displayName = 'CCardTitle';
|
|
3112
3068
|
|
|
3113
|
-
var getNextSibling = function (elem, selector) {
|
|
3114
|
-
// Get the next sibling element
|
|
3115
|
-
var sibling = elem.nextElementSibling;
|
|
3116
|
-
// If there's no selector, return the first sibling
|
|
3117
|
-
if (!selector)
|
|
3118
|
-
return sibling;
|
|
3119
|
-
// If the sibling matches our selector, use it
|
|
3120
|
-
// If not, jump to the next sibling and continue the loop
|
|
3121
|
-
while (sibling) {
|
|
3122
|
-
if (sibling.matches(selector))
|
|
3123
|
-
return sibling;
|
|
3124
|
-
sibling = sibling.nextElementSibling;
|
|
3125
|
-
}
|
|
3126
|
-
return;
|
|
3127
|
-
};
|
|
3128
|
-
|
|
3129
|
-
var getPreviousSibling = function (elem, selector) {
|
|
3130
|
-
// Get the next sibling element
|
|
3131
|
-
var sibling = elem.previousElementSibling;
|
|
3132
|
-
// If there's no selector, return the first sibling
|
|
3133
|
-
if (!selector)
|
|
3134
|
-
return sibling;
|
|
3135
|
-
// If the sibling matches our selector, use it
|
|
3136
|
-
// If not, jump to the next sibling and continue the loop
|
|
3137
|
-
while (sibling) {
|
|
3138
|
-
if (sibling.matches(selector))
|
|
3139
|
-
return sibling;
|
|
3140
|
-
sibling = sibling.previousElementSibling;
|
|
3141
|
-
}
|
|
3142
|
-
return;
|
|
3143
|
-
};
|
|
3144
|
-
|
|
3145
3069
|
var isInViewport = function (element) {
|
|
3146
3070
|
var rect = element.getBoundingClientRect();
|
|
3147
3071
|
return (Math.floor(rect.top) >= 0 &&
|
|
@@ -3194,7 +3118,6 @@ var CCarousel = React$1.forwardRef(function (_a, ref) {
|
|
|
3194
3118
|
window.removeEventListener('scroll', handleScroll);
|
|
3195
3119
|
};
|
|
3196
3120
|
});
|
|
3197
|
-
var _className = classNames$1('carousel slide', transition === 'crossfade' && 'carousel-fade', dark && 'carousel-dark', className);
|
|
3198
3121
|
var cycle = function () {
|
|
3199
3122
|
_pause();
|
|
3200
3123
|
if (!wrap && active === itemsNumber - 1) {
|
|
@@ -3268,7 +3191,10 @@ var CCarousel = React$1.forwardRef(function (_a, ref) {
|
|
|
3268
3191
|
var touchDown = e.touches[0].clientX;
|
|
3269
3192
|
setTouchPosition(touchDown);
|
|
3270
3193
|
};
|
|
3271
|
-
return (React$1.createElement("div", __assign$1({ className:
|
|
3194
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('carousel slide', {
|
|
3195
|
+
'carousel-dark': dark,
|
|
3196
|
+
'carousel-fade': transition === 'crossfade',
|
|
3197
|
+
}, className), onMouseEnter: _pause, onMouseLeave: cycle }, (touch && { onTouchStart: handleTouchStart, onTouchMove: handleTouchMove }), rest, { ref: forkedRef }),
|
|
3272
3198
|
React$1.createElement(CCarouselContext.Provider, { value: {
|
|
3273
3199
|
setAnimating: setAnimating,
|
|
3274
3200
|
setCustomInterval: setCustomInterval,
|
|
@@ -3313,8 +3239,7 @@ CCarousel.displayName = 'CCarousel';
|
|
|
3313
3239
|
|
|
3314
3240
|
var CCarouselCaption = React$1.forwardRef(function (_a, ref) {
|
|
3315
3241
|
var className = _a.className, rest = __rest$1(_a, ["className"]);
|
|
3316
|
-
|
|
3317
|
-
return React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }));
|
|
3242
|
+
return React$1.createElement("div", __assign$1({ className: classNames$1('carousel-caption', className) }, rest, { ref: ref }));
|
|
3318
3243
|
});
|
|
3319
3244
|
CCarouselCaption.propTypes = {
|
|
3320
3245
|
className: propTypesExports.string,
|
|
@@ -3389,8 +3314,7 @@ var CCarouselItem = React$1.forwardRef(function (_a, ref) {
|
|
|
3389
3314
|
});
|
|
3390
3315
|
};
|
|
3391
3316
|
});
|
|
3392
|
-
|
|
3393
|
-
return (React$1.createElement("div", __assign$1({ className: _className, ref: forkedRef }, rest), children));
|
|
3317
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('carousel-item', activeClassName, directionClassName, orderClassName, className), ref: forkedRef }, rest), children));
|
|
3394
3318
|
});
|
|
3395
3319
|
CCarouselItem.propTypes = {
|
|
3396
3320
|
active: propTypesExports.bool,
|
|
@@ -3401,6 +3325,16 @@ CCarouselItem.propTypes = {
|
|
|
3401
3325
|
};
|
|
3402
3326
|
CCarouselItem.displayName = 'CCarouselItem';
|
|
3403
3327
|
|
|
3328
|
+
var CConditionalPortal = function (_a) {
|
|
3329
|
+
var children = _a.children, portal = _a.portal;
|
|
3330
|
+
return typeof window !== 'undefined' && portal ? (ReactDOM.createPortal(children, document.body)) : (React$1.createElement(React$1.Fragment, null, children));
|
|
3331
|
+
};
|
|
3332
|
+
CConditionalPortal.propTypes = {
|
|
3333
|
+
children: propTypesExports.node,
|
|
3334
|
+
portal: propTypesExports.bool.isRequired,
|
|
3335
|
+
};
|
|
3336
|
+
CConditionalPortal.displayName = 'CConditionalPortal';
|
|
3337
|
+
|
|
3404
3338
|
function toInteger(dirtyNumber) {
|
|
3405
3339
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
3406
3340
|
return NaN;
|
|
@@ -5764,12 +5698,12 @@ var uaParser_min = {
|
|
|
5764
5698
|
set exports(v){ uaParser_minExports = v; },
|
|
5765
5699
|
};
|
|
5766
5700
|
|
|
5767
|
-
/* UAParser.js v1.0.
|
|
5701
|
+
/* UAParser.js v1.0.34
|
|
5768
5702
|
Copyright © 2012-2021 Faisal Salman <f@faisalman.com>
|
|
5769
5703
|
MIT License */
|
|
5770
5704
|
|
|
5771
5705
|
(function (module, exports) {
|
|
5772
|
-
(function(window,undefined$1){var LIBVERSION="0.7.33",EMPTY="",UNKNOWN="?",FUNC_TYPE="function",UNDEF_TYPE="undefined",OBJ_TYPE="object",STR_TYPE="string",MAJOR="major",MODEL="model",NAME="name",TYPE="type",VENDOR="vendor",VERSION="version",ARCHITECTURE="architecture",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",EMBEDDED="embedded",UA_MAX_LENGTH=350;var AMAZON="Amazon",APPLE="Apple",ASUS="ASUS",BLACKBERRY="BlackBerry",BROWSER="Browser",CHROME="Chrome",EDGE="Edge",FIREFOX="Firefox",GOOGLE="Google",HUAWEI="Huawei",LG="LG",MICROSOFT="Microsoft",MOTOROLA="Motorola",OPERA="Opera",SAMSUNG="Samsung",SHARP="Sharp",SONY="Sony",XIAOMI="Xiaomi",ZEBRA="Zebra",FACEBOOK="Facebook";var extend=function(regexes,extensions){var mergedRegexes={};for(var i in regexes){if(extensions[i]&&extensions[i].length%2===0){mergedRegexes[i]=extensions[i].concat(regexes[i]);}else {mergedRegexes[i]=regexes[i];}}return mergedRegexes},enumerize=function(arr){var enums={};for(var i=0;i<arr.length;i++){enums[arr[i].toUpperCase()]=arr[i];}return enums},has=function(str1,str2){return typeof str1===STR_TYPE?lowerize(str2).indexOf(lowerize(str1))!==-1:false},lowerize=function(str){return str.toLowerCase()},majorize=function(version){return typeof version===STR_TYPE?version.replace(/[^\d\.]/g,EMPTY).split(".")[0]:undefined$1},trim=function(str,len){if(typeof str===STR_TYPE){str=str.replace(/^\s\s*/,EMPTY);return typeof len===UNDEF_TYPE?str:str.substring(0,UA_MAX_LENGTH)}};var rgxMapper=function(ua,arrays){var i=0,j,k,p,q,matches,match;while(i<arrays.length&&!matches){var regex=arrays[i],props=arrays[i+1];j=k=0;while(j<regex.length&&!matches){matches=regex[j++].exec(ua);if(!!matches){for(p=0;p<props.length;p++){match=matches[++k];q=props[p];if(typeof q===OBJ_TYPE&&q.length>0){if(q.length===2){if(typeof q[1]==FUNC_TYPE){this[q[0]]=q[1].call(this,match);}else {this[q[0]]=q[1];}}else if(q.length===3){if(typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){this[q[0]]=match?q[1].call(this,match,q[2]):undefined$1;}else {this[q[0]]=match?match.replace(q[1],q[2]):undefined$1;}}else if(q.length===4){this[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined$1;}}else {this[q]=match?match:undefined$1;}}}}i+=2;}},strMapper=function(str,map){for(var i in map){if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j<map[i].length;j++){if(has(map[i][j],str)){return i===UNKNOWN?undefined$1:i}}}else if(has(map[i],str)){return i===UNKNOWN?undefined$1:i}}return str};var oldSafariMap={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},windowsVersionMap={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"};var regexes={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[VERSION,[NAME,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[VERSION,[NAME,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[NAME,VERSION],[/opios[\/ ]+([\w\.]+)/i],[VERSION,[NAME,OPERA+" Mini"]],[/\bopr\/([\w\.]+)/i],[VERSION,[NAME,OPERA]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[NAME,VERSION],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[VERSION,[NAME,"UC"+BROWSER]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[VERSION,[NAME,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[VERSION,[NAME,"WeChat"]],[/konqueror\/([\w\.]+)/i],[VERSION,[NAME,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[VERSION,[NAME,"IE"]],[/yabrowser\/([\w\.]+)/i],[VERSION,[NAME,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[NAME,/(.+)/,"$1 Secure "+BROWSER],VERSION],[/\bfocus\/([\w\.]+)/i],[VERSION,[NAME,FIREFOX+" Focus"]],[/\bopt\/([\w\.]+)/i],[VERSION,[NAME,OPERA+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[VERSION,[NAME,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[VERSION,[NAME,"Dolphin"]],[/coast\/([\w\.]+)/i],[VERSION,[NAME,OPERA+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[VERSION,[NAME,"MIUI "+BROWSER]],[/fxios\/([-\w\.]+)/i],[VERSION,[NAME,FIREFOX]],[/\bqihu|(qi?ho?o?|360)browser/i],[[NAME,"360 "+BROWSER]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[NAME,/(.+)/,"$1 "+BROWSER],VERSION],[/(comodo_dragon)\/([\w\.]+)/i],[[NAME,/_/g," "],VERSION],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[NAME,VERSION],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[NAME],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[NAME,FACEBOOK],VERSION],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[NAME,VERSION],[/\bgsa\/([\w\.]+) .*safari\//i],[VERSION,[NAME,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[VERSION,[NAME,CHROME+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[NAME,CHROME+" WebView"],VERSION],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[VERSION,[NAME,"Android "+BROWSER]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[NAME,VERSION],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[VERSION,[NAME,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[VERSION,NAME],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[NAME,[VERSION,strMapper,oldSafariMap]],[/(webkit|khtml)\/([\w\.]+)/i],[NAME,VERSION],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[NAME,"Netscape"],VERSION],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[VERSION,[NAME,FIREFOX+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[NAME,VERSION],[/(cobalt)\/([\w\.]+)/i],[NAME,[VERSION,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[ARCHITECTURE,"amd64"]],[/(ia32(?=;))/i],[[ARCHITECTURE,lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[ARCHITECTURE,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[ARCHITECTURE,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[ARCHITECTURE,"armhf"]],[/windows (ce|mobile); ppc;/i],[[ARCHITECTURE,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[ARCHITECTURE,/ower/,EMPTY,lowerize]],[/(sun4\w)[;\)]/i],[[ARCHITECTURE,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[ARCHITECTURE,lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,TABLET]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,MOBILE]],[/\((ip(?:hone|od)[\w ]*);/i],[MODEL,[VENDOR,APPLE],[TYPE,MOBILE]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[MODEL,[VENDOR,APPLE],[TYPE,TABLET]],[/(macintosh);/i],[MODEL,[VENDOR,APPLE]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,TABLET]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,MOBILE]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[MODEL,/_/g," "],[VENDOR,XIAOMI],[TYPE,MOBILE]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[MODEL,/_/g," "],[VENDOR,XIAOMI],[TYPE,TABLET]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[MODEL,[VENDOR,"OPPO"],[TYPE,MOBILE]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[MODEL,[VENDOR,"Vivo"],[TYPE,MOBILE]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[MODEL,[VENDOR,"Realme"],[TYPE,MOBILE]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[MODEL,[VENDOR,MOTOROLA],[TYPE,MOBILE]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[MODEL,[VENDOR,MOTOROLA],[TYPE,TABLET]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[MODEL,[VENDOR,LG],[TYPE,TABLET]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[MODEL,[VENDOR,LG],[TYPE,MOBILE]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[MODEL,[VENDOR,"Lenovo"],[TYPE,TABLET]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[MODEL,/_/g," "],[VENDOR,"Nokia"],[TYPE,MOBILE]],[/(pixel c)\b/i],[MODEL,[VENDOR,GOOGLE],[TYPE,TABLET]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[MODEL,[VENDOR,GOOGLE],[TYPE,MOBILE]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[MODEL,[VENDOR,SONY],[TYPE,MOBILE]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[MODEL,"Xperia Tablet"],[VENDOR,SONY],[TYPE,TABLET]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[MODEL,[VENDOR,"OnePlus"],[TYPE,MOBILE]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[MODEL,[VENDOR,AMAZON],[TYPE,TABLET]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[MODEL,/(.+)/g,"Fire Phone $1"],[VENDOR,AMAZON],[TYPE,MOBILE]],[/(playbook);[-\w\),; ]+(rim)/i],[MODEL,VENDOR,[TYPE,TABLET]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[MODEL,[VENDOR,BLACKBERRY],[TYPE,MOBILE]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[MODEL,[VENDOR,ASUS],[TYPE,TABLET]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[MODEL,[VENDOR,ASUS],[TYPE,MOBILE]],[/(nexus 9)/i],[MODEL,[VENDOR,"HTC"],[TYPE,TABLET]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[VENDOR,[MODEL,/_/g," "],[TYPE,MOBILE]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[MODEL,[VENDOR,"Acer"],[TYPE,TABLET]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[MODEL,[VENDOR,"Meizu"],[TYPE,MOBILE]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[MODEL,[VENDOR,SHARP],[TYPE,MOBILE]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(surface duo)/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,TABLET]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[MODEL,[VENDOR,"Fairphone"],[TYPE,MOBILE]],[/(u304aa)/i],[MODEL,[VENDOR,"AT&T"],[TYPE,MOBILE]],[/\bsie-(\w*)/i],[MODEL,[VENDOR,"Siemens"],[TYPE,MOBILE]],[/\b(rct\w+) b/i],[MODEL,[VENDOR,"RCA"],[TYPE,TABLET]],[/\b(venue[\d ]{2,7}) b/i],[MODEL,[VENDOR,"Dell"],[TYPE,TABLET]],[/\b(q(?:mv|ta)\w+) b/i],[MODEL,[VENDOR,"Verizon"],[TYPE,TABLET]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[MODEL,[VENDOR,"Barnes & Noble"],[TYPE,TABLET]],[/\b(tm\d{3}\w+) b/i],[MODEL,[VENDOR,"NuVision"],[TYPE,TABLET]],[/\b(k88) b/i],[MODEL,[VENDOR,"ZTE"],[TYPE,TABLET]],[/\b(nx\d{3}j) b/i],[MODEL,[VENDOR,"ZTE"],[TYPE,MOBILE]],[/\b(gen\d{3}) b.+49h/i],[MODEL,[VENDOR,"Swiss"],[TYPE,MOBILE]],[/\b(zur\d{3}) b/i],[MODEL,[VENDOR,"Swiss"],[TYPE,TABLET]],[/\b((zeki)?tb.*\b) b/i],[MODEL,[VENDOR,"Zeki"],[TYPE,TABLET]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[VENDOR,"Dragon Touch"],MODEL,[TYPE,TABLET]],[/\b(ns-?\w{0,9}) b/i],[MODEL,[VENDOR,"Insignia"],[TYPE,TABLET]],[/\b((nxa|next)-?\w{0,9}) b/i],[MODEL,[VENDOR,"NextBook"],[TYPE,TABLET]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[VENDOR,"Voice"],MODEL,[TYPE,MOBILE]],[/\b(lvtel\-)?(v1[12]) b/i],[[VENDOR,"LvTel"],MODEL,[TYPE,MOBILE]],[/\b(ph-1) /i],[MODEL,[VENDOR,"Essential"],[TYPE,MOBILE]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[MODEL,[VENDOR,"Envizen"],[TYPE,TABLET]],[/\b(trio[-\w\. ]+) b/i],[MODEL,[VENDOR,"MachSpeed"],[TYPE,TABLET]],[/\btu_(1491) b/i],[MODEL,[VENDOR,"Rotor"],[TYPE,TABLET]],[/(shield[\w ]+) b/i],[MODEL,[VENDOR,"Nvidia"],[TYPE,TABLET]],[/(sprint) (\w+)/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kin\.[onetw]{3})/i],[[MODEL,/\./g," "],[VENDOR,MICROSOFT],[TYPE,MOBILE]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,TABLET]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,MOBILE]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[VENDOR,MODEL,[TYPE,CONSOLE]],[/droid.+; (shield) bui/i],[MODEL,[VENDOR,"Nvidia"],[TYPE,CONSOLE]],[/(playstation [345portablevi]+)/i],[MODEL,[VENDOR,SONY],[TYPE,CONSOLE]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,CONSOLE]],[/smart-tv.+(samsung)/i],[VENDOR,[TYPE,SMARTTV]],[/hbbtv.+maple;(\d+)/i],[[MODEL,/^/,"SmartTV"],[VENDOR,SAMSUNG],[TYPE,SMARTTV]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[VENDOR,LG],[TYPE,SMARTTV]],[/(apple) ?tv/i],[VENDOR,[MODEL,APPLE+" TV"],[TYPE,SMARTTV]],[/crkey/i],[[MODEL,CHROME+"cast"],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/droid.+aft(\w)( bui|\))/i],[MODEL,[VENDOR,AMAZON],[TYPE,SMARTTV]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[MODEL,[VENDOR,SHARP],[TYPE,SMARTTV]],[/(bravia[\w ]+)( bui|\))/i],[MODEL,[VENDOR,SONY],[TYPE,SMARTTV]],[/(mitv-\w{5}) bui/i],[MODEL,[VENDOR,XIAOMI],[TYPE,SMARTTV]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[VENDOR,trim],[MODEL,trim],[TYPE,SMARTTV]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[TYPE,SMARTTV]],[/((pebble))app/i],[VENDOR,MODEL,[TYPE,WEARABLE]],[/droid.+; (glass) \d/i],[MODEL,[VENDOR,GOOGLE],[TYPE,WEARABLE]],[/droid.+; (wt63?0{2,3})\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,WEARABLE]],[/(quest( 2)?)/i],[MODEL,[VENDOR,FACEBOOK],[TYPE,WEARABLE]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[VENDOR,[TYPE,EMBEDDED]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[MODEL,[TYPE,MOBILE]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[MODEL,[TYPE,TABLET]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[TYPE,TABLET]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[TYPE,MOBILE]],[/(android[-\w\. ]{0,9});.+buil/i],[MODEL,[VENDOR,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[VERSION,[NAME,EDGE+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[VERSION,[NAME,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[NAME,VERSION],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[VERSION,NAME]],os:[[/microsoft (windows) (vista|xp)/i],[NAME,VERSION],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[NAME,[VERSION,strMapper,windowsVersionMap]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[NAME,"Windows"],[VERSION,strMapper,windowsVersionMap]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[VERSION,/_/g,"."],[NAME,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[NAME,"Mac OS"],[VERSION,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[VERSION,NAME],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[NAME,VERSION],[/\(bb(10);/i],[VERSION,[NAME,BLACKBERRY]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[VERSION,[NAME,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[VERSION,[NAME,FIREFOX+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[VERSION,[NAME,"webOS"]],[/crkey\/([\d\.]+)/i],[VERSION,[NAME,CHROME+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[NAME,"Chromium OS"],VERSION],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[NAME,VERSION],[/(sunos) ?([\w\.\d]*)/i],[[NAME,"Solaris"],VERSION],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[NAME,VERSION]]};var UAParser=function(ua,extensions){if(typeof ua===OBJ_TYPE){extensions=ua;ua=undefined$1;}if(!(this instanceof UAParser)){return new UAParser(ua,extensions).getResult()}var _ua=ua||(typeof window!==UNDEF_TYPE&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:EMPTY);var _rgxmap=extensions?extend(regexes,extensions):regexes;this.getBrowser=function(){var _browser={};_browser[NAME]=undefined$1;_browser[VERSION]=undefined$1;rgxMapper.call(_browser,_ua,_rgxmap.browser);_browser.major=majorize(_browser.version);return _browser};this.getCPU=function(){var _cpu={};_cpu[ARCHITECTURE]=undefined$1;rgxMapper.call(_cpu,_ua,_rgxmap.cpu);return _cpu};this.getDevice=function(){var _device={};_device[VENDOR]=undefined$1;_device[MODEL]=undefined$1;_device[TYPE]=undefined$1;rgxMapper.call(_device,_ua,_rgxmap.device);return _device};this.getEngine=function(){var _engine={};_engine[NAME]=undefined$1;_engine[VERSION]=undefined$1;rgxMapper.call(_engine,_ua,_rgxmap.engine);return _engine};this.getOS=function(){var _os={};_os[NAME]=undefined$1;_os[VERSION]=undefined$1;rgxMapper.call(_os,_ua,_rgxmap.os);return _os};this.getResult=function(){return {ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return _ua};this.setUA=function(ua){_ua=typeof ua===STR_TYPE&&ua.length>UA_MAX_LENGTH?trim(ua,UA_MAX_LENGTH):ua;return this};this.setUA(_ua);return this};UAParser.VERSION=LIBVERSION;UAParser.BROWSER=enumerize([NAME,VERSION,MAJOR]);UAParser.CPU=enumerize([ARCHITECTURE]);UAParser.DEVICE=enumerize([MODEL,VENDOR,TYPE,CONSOLE,MOBILE,SMARTTV,TABLET,WEARABLE,EMBEDDED]);UAParser.ENGINE=UAParser.OS=enumerize([NAME,VERSION]);{if(module.exports){exports=module.exports=UAParser;}exports.UAParser=UAParser;}var $=typeof window!==UNDEF_TYPE&&(window.jQuery||window.Zepto);if($&&!$.ua){var parser=new UAParser;$.ua=parser.getResult();$.ua.get=function(){return parser.getUA()};$.ua.set=function(ua){parser.setUA(ua);var result=parser.getResult();for(var prop in result){$.ua[prop]=result[prop];}};}})(typeof window==="object"?window:commonjsGlobal);
|
|
5706
|
+
(function(window,undefined$1){var LIBVERSION="1.0.34",EMPTY="",UNKNOWN="?",FUNC_TYPE="function",UNDEF_TYPE="undefined",OBJ_TYPE="object",STR_TYPE="string",MAJOR="major",MODEL="model",NAME="name",TYPE="type",VENDOR="vendor",VERSION="version",ARCHITECTURE="architecture",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",EMBEDDED="embedded",UA_MAX_LENGTH=350;var AMAZON="Amazon",APPLE="Apple",ASUS="ASUS",BLACKBERRY="BlackBerry",BROWSER="Browser",CHROME="Chrome",EDGE="Edge",FIREFOX="Firefox",GOOGLE="Google",HUAWEI="Huawei",LG="LG",MICROSOFT="Microsoft",MOTOROLA="Motorola",OPERA="Opera",SAMSUNG="Samsung",SHARP="Sharp",SONY="Sony",XIAOMI="Xiaomi",ZEBRA="Zebra",FACEBOOK="Facebook",CHROMIUM_OS="Chromium OS",MAC_OS="Mac OS";var extend=function(regexes,extensions){var mergedRegexes={};for(var i in regexes){if(extensions[i]&&extensions[i].length%2===0){mergedRegexes[i]=extensions[i].concat(regexes[i]);}else {mergedRegexes[i]=regexes[i];}}return mergedRegexes},enumerize=function(arr){var enums={};for(var i=0;i<arr.length;i++){enums[arr[i].toUpperCase()]=arr[i];}return enums},has=function(str1,str2){return typeof str1===STR_TYPE?lowerize(str2).indexOf(lowerize(str1))!==-1:false},lowerize=function(str){return str.toLowerCase()},majorize=function(version){return typeof version===STR_TYPE?version.replace(/[^\d\.]/g,EMPTY).split(".")[0]:undefined$1},trim=function(str,len){if(typeof str===STR_TYPE){str=str.replace(/^\s\s*/,EMPTY);return typeof len===UNDEF_TYPE?str:str.substring(0,UA_MAX_LENGTH)}};var rgxMapper=function(ua,arrays){var i=0,j,k,p,q,matches,match;while(i<arrays.length&&!matches){var regex=arrays[i],props=arrays[i+1];j=k=0;while(j<regex.length&&!matches){if(!regex[j]){break}matches=regex[j++].exec(ua);if(!!matches){for(p=0;p<props.length;p++){match=matches[++k];q=props[p];if(typeof q===OBJ_TYPE&&q.length>0){if(q.length===2){if(typeof q[1]==FUNC_TYPE){this[q[0]]=q[1].call(this,match);}else {this[q[0]]=q[1];}}else if(q.length===3){if(typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){this[q[0]]=match?q[1].call(this,match,q[2]):undefined$1;}else {this[q[0]]=match?match.replace(q[1],q[2]):undefined$1;}}else if(q.length===4){this[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined$1;}}else {this[q]=match?match:undefined$1;}}}}i+=2;}},strMapper=function(str,map){for(var i in map){if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j<map[i].length;j++){if(has(map[i][j],str)){return i===UNKNOWN?undefined$1:i}}}else if(has(map[i],str)){return i===UNKNOWN?undefined$1:i}}return str};var oldSafariMap={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},windowsVersionMap={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"};var regexes={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[VERSION,[NAME,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[VERSION,[NAME,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[NAME,VERSION],[/opios[\/ ]+([\w\.]+)/i],[VERSION,[NAME,OPERA+" Mini"]],[/\bopr\/([\w\.]+)/i],[VERSION,[NAME,OPERA]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[NAME,VERSION],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[VERSION,[NAME,"UC"+BROWSER]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[VERSION,[NAME,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[VERSION,[NAME,"WeChat"]],[/konqueror\/([\w\.]+)/i],[VERSION,[NAME,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[VERSION,[NAME,"IE"]],[/yabrowser\/([\w\.]+)/i],[VERSION,[NAME,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[NAME,/(.+)/,"$1 Secure "+BROWSER],VERSION],[/\bfocus\/([\w\.]+)/i],[VERSION,[NAME,FIREFOX+" Focus"]],[/\bopt\/([\w\.]+)/i],[VERSION,[NAME,OPERA+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[VERSION,[NAME,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[VERSION,[NAME,"Dolphin"]],[/coast\/([\w\.]+)/i],[VERSION,[NAME,OPERA+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[VERSION,[NAME,"MIUI "+BROWSER]],[/fxios\/([-\w\.]+)/i],[VERSION,[NAME,FIREFOX]],[/\bqihu|(qi?ho?o?|360)browser/i],[[NAME,"360 "+BROWSER]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[NAME,/(.+)/,"$1 "+BROWSER],VERSION],[/(comodo_dragon)\/([\w\.]+)/i],[[NAME,/_/g," "],VERSION],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[NAME,VERSION],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[NAME],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[NAME,FACEBOOK],VERSION],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[NAME,VERSION],[/\bgsa\/([\w\.]+) .*safari\//i],[VERSION,[NAME,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[VERSION,[NAME,CHROME+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[NAME,CHROME+" WebView"],VERSION],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[VERSION,[NAME,"Android "+BROWSER]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[NAME,VERSION],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[VERSION,[NAME,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[VERSION,NAME],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[NAME,[VERSION,strMapper,oldSafariMap]],[/(webkit|khtml)\/([\w\.]+)/i],[NAME,VERSION],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[NAME,"Netscape"],VERSION],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[VERSION,[NAME,FIREFOX+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[NAME,VERSION],[/(cobalt)\/([\w\.]+)/i],[NAME,[VERSION,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[ARCHITECTURE,"amd64"]],[/(ia32(?=;))/i],[[ARCHITECTURE,lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[ARCHITECTURE,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[ARCHITECTURE,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[ARCHITECTURE,"armhf"]],[/windows (ce|mobile); ppc;/i],[[ARCHITECTURE,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[ARCHITECTURE,/ower/,EMPTY,lowerize]],[/(sun4\w)[;\)]/i],[[ARCHITECTURE,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[ARCHITECTURE,lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,TABLET]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,MOBILE]],[/\((ip(?:hone|od)[\w ]*);/i],[MODEL,[VENDOR,APPLE],[TYPE,MOBILE]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[MODEL,[VENDOR,APPLE],[TYPE,TABLET]],[/(macintosh);/i],[MODEL,[VENDOR,APPLE]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[MODEL,[VENDOR,SHARP],[TYPE,MOBILE]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,TABLET]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,MOBILE]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[MODEL,/_/g," "],[VENDOR,XIAOMI],[TYPE,MOBILE]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[MODEL,/_/g," "],[VENDOR,XIAOMI],[TYPE,TABLET]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[MODEL,[VENDOR,"OPPO"],[TYPE,MOBILE]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[MODEL,[VENDOR,"Vivo"],[TYPE,MOBILE]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[MODEL,[VENDOR,"Realme"],[TYPE,MOBILE]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[MODEL,[VENDOR,MOTOROLA],[TYPE,MOBILE]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[MODEL,[VENDOR,MOTOROLA],[TYPE,TABLET]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[MODEL,[VENDOR,LG],[TYPE,TABLET]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[MODEL,[VENDOR,LG],[TYPE,MOBILE]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[MODEL,[VENDOR,"Lenovo"],[TYPE,TABLET]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[MODEL,/_/g," "],[VENDOR,"Nokia"],[TYPE,MOBILE]],[/(pixel c)\b/i],[MODEL,[VENDOR,GOOGLE],[TYPE,TABLET]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[MODEL,[VENDOR,GOOGLE],[TYPE,MOBILE]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[MODEL,[VENDOR,SONY],[TYPE,MOBILE]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[MODEL,"Xperia Tablet"],[VENDOR,SONY],[TYPE,TABLET]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[MODEL,[VENDOR,"OnePlus"],[TYPE,MOBILE]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[MODEL,[VENDOR,AMAZON],[TYPE,TABLET]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[MODEL,/(.+)/g,"Fire Phone $1"],[VENDOR,AMAZON],[TYPE,MOBILE]],[/(playbook);[-\w\),; ]+(rim)/i],[MODEL,VENDOR,[TYPE,TABLET]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[MODEL,[VENDOR,BLACKBERRY],[TYPE,MOBILE]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[MODEL,[VENDOR,ASUS],[TYPE,TABLET]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[MODEL,[VENDOR,ASUS],[TYPE,MOBILE]],[/(nexus 9)/i],[MODEL,[VENDOR,"HTC"],[TYPE,TABLET]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[VENDOR,[MODEL,/_/g," "],[TYPE,MOBILE]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[MODEL,[VENDOR,"Acer"],[TYPE,TABLET]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[MODEL,[VENDOR,"Meizu"],[TYPE,MOBILE]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(surface duo)/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,TABLET]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[MODEL,[VENDOR,"Fairphone"],[TYPE,MOBILE]],[/(u304aa)/i],[MODEL,[VENDOR,"AT&T"],[TYPE,MOBILE]],[/\bsie-(\w*)/i],[MODEL,[VENDOR,"Siemens"],[TYPE,MOBILE]],[/\b(rct\w+) b/i],[MODEL,[VENDOR,"RCA"],[TYPE,TABLET]],[/\b(venue[\d ]{2,7}) b/i],[MODEL,[VENDOR,"Dell"],[TYPE,TABLET]],[/\b(q(?:mv|ta)\w+) b/i],[MODEL,[VENDOR,"Verizon"],[TYPE,TABLET]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[MODEL,[VENDOR,"Barnes & Noble"],[TYPE,TABLET]],[/\b(tm\d{3}\w+) b/i],[MODEL,[VENDOR,"NuVision"],[TYPE,TABLET]],[/\b(k88) b/i],[MODEL,[VENDOR,"ZTE"],[TYPE,TABLET]],[/\b(nx\d{3}j) b/i],[MODEL,[VENDOR,"ZTE"],[TYPE,MOBILE]],[/\b(gen\d{3}) b.+49h/i],[MODEL,[VENDOR,"Swiss"],[TYPE,MOBILE]],[/\b(zur\d{3}) b/i],[MODEL,[VENDOR,"Swiss"],[TYPE,TABLET]],[/\b((zeki)?tb.*\b) b/i],[MODEL,[VENDOR,"Zeki"],[TYPE,TABLET]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[VENDOR,"Dragon Touch"],MODEL,[TYPE,TABLET]],[/\b(ns-?\w{0,9}) b/i],[MODEL,[VENDOR,"Insignia"],[TYPE,TABLET]],[/\b((nxa|next)-?\w{0,9}) b/i],[MODEL,[VENDOR,"NextBook"],[TYPE,TABLET]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[VENDOR,"Voice"],MODEL,[TYPE,MOBILE]],[/\b(lvtel\-)?(v1[12]) b/i],[[VENDOR,"LvTel"],MODEL,[TYPE,MOBILE]],[/\b(ph-1) /i],[MODEL,[VENDOR,"Essential"],[TYPE,MOBILE]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[MODEL,[VENDOR,"Envizen"],[TYPE,TABLET]],[/\b(trio[-\w\. ]+) b/i],[MODEL,[VENDOR,"MachSpeed"],[TYPE,TABLET]],[/\btu_(1491) b/i],[MODEL,[VENDOR,"Rotor"],[TYPE,TABLET]],[/(shield[\w ]+) b/i],[MODEL,[VENDOR,"Nvidia"],[TYPE,TABLET]],[/(sprint) (\w+)/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kin\.[onetw]{3})/i],[[MODEL,/\./g," "],[VENDOR,MICROSOFT],[TYPE,MOBILE]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,TABLET]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,MOBILE]],[/smart-tv.+(samsung)/i],[VENDOR,[TYPE,SMARTTV]],[/hbbtv.+maple;(\d+)/i],[[MODEL,/^/,"SmartTV"],[VENDOR,SAMSUNG],[TYPE,SMARTTV]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[VENDOR,LG],[TYPE,SMARTTV]],[/(apple) ?tv/i],[VENDOR,[MODEL,APPLE+" TV"],[TYPE,SMARTTV]],[/crkey/i],[[MODEL,CHROME+"cast"],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/droid.+aft(\w)( bui|\))/i],[MODEL,[VENDOR,AMAZON],[TYPE,SMARTTV]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[MODEL,[VENDOR,SHARP],[TYPE,SMARTTV]],[/(bravia[\w ]+)( bui|\))/i],[MODEL,[VENDOR,SONY],[TYPE,SMARTTV]],[/(mitv-\w{5}) bui/i],[MODEL,[VENDOR,XIAOMI],[TYPE,SMARTTV]],[/Hbbtv.*(technisat) (.*);/i],[VENDOR,MODEL,[TYPE,SMARTTV]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[VENDOR,trim],[MODEL,trim],[TYPE,SMARTTV]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[TYPE,SMARTTV]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[VENDOR,MODEL,[TYPE,CONSOLE]],[/droid.+; (shield) bui/i],[MODEL,[VENDOR,"Nvidia"],[TYPE,CONSOLE]],[/(playstation [345portablevi]+)/i],[MODEL,[VENDOR,SONY],[TYPE,CONSOLE]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,CONSOLE]],[/((pebble))app/i],[VENDOR,MODEL,[TYPE,WEARABLE]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[MODEL,[VENDOR,APPLE],[TYPE,WEARABLE]],[/droid.+; (glass) \d/i],[MODEL,[VENDOR,GOOGLE],[TYPE,WEARABLE]],[/droid.+; (wt63?0{2,3})\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,WEARABLE]],[/(quest( 2| pro)?)/i],[MODEL,[VENDOR,FACEBOOK],[TYPE,WEARABLE]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[VENDOR,[TYPE,EMBEDDED]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[MODEL,[TYPE,MOBILE]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[MODEL,[TYPE,TABLET]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[TYPE,TABLET]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[TYPE,MOBILE]],[/(android[-\w\. ]{0,9});.+buil/i],[MODEL,[VENDOR,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[VERSION,[NAME,EDGE+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[VERSION,[NAME,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[NAME,VERSION],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[VERSION,NAME]],os:[[/microsoft (windows) (vista|xp)/i],[NAME,VERSION],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[NAME,[VERSION,strMapper,windowsVersionMap]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[NAME,"Windows"],[VERSION,strMapper,windowsVersionMap]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[VERSION,/_/g,"."],[NAME,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[NAME,MAC_OS],[VERSION,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[VERSION,NAME],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[NAME,VERSION],[/\(bb(10);/i],[VERSION,[NAME,BLACKBERRY]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[VERSION,[NAME,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[VERSION,[NAME,FIREFOX+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[VERSION,[NAME,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[VERSION,[NAME,"watchOS"]],[/crkey\/([\d\.]+)/i],[VERSION,[NAME,CHROME+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[NAME,CHROMIUM_OS],VERSION],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[NAME,VERSION],[/(sunos) ?([\w\.\d]*)/i],[[NAME,"Solaris"],VERSION],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[NAME,VERSION]]};var UAParser=function(ua,extensions){if(typeof ua===OBJ_TYPE){extensions=ua;ua=undefined$1;}if(!(this instanceof UAParser)){return new UAParser(ua,extensions).getResult()}var _navigator=typeof window!==UNDEF_TYPE&&window.navigator?window.navigator:undefined$1;var _ua=ua||(_navigator&&_navigator.userAgent?_navigator.userAgent:EMPTY);var _uach=_navigator&&_navigator.userAgentData?_navigator.userAgentData:undefined$1;var _rgxmap=extensions?extend(regexes,extensions):regexes;this.getBrowser=function(){var _browser={};_browser[NAME]=undefined$1;_browser[VERSION]=undefined$1;rgxMapper.call(_browser,_ua,_rgxmap.browser);_browser[MAJOR]=majorize(_browser[VERSION]);if(_navigator&&_navigator.brave&&typeof _navigator.brave.isBrave==FUNC_TYPE){_browser[NAME]="Brave";}return _browser};this.getCPU=function(){var _cpu={};_cpu[ARCHITECTURE]=undefined$1;rgxMapper.call(_cpu,_ua,_rgxmap.cpu);return _cpu};this.getDevice=function(){var _device={};_device[VENDOR]=undefined$1;_device[MODEL]=undefined$1;_device[TYPE]=undefined$1;rgxMapper.call(_device,_ua,_rgxmap.device);if(!_device[TYPE]&&_uach&&_uach.mobile){_device[TYPE]=MOBILE;}if(_device[MODEL]=="Macintosh"&&_navigator&&typeof _navigator.standalone!==UNDEF_TYPE&&_navigator.maxTouchPoints&&_navigator.maxTouchPoints>2){_device[MODEL]="iPad";_device[TYPE]=TABLET;}return _device};this.getEngine=function(){var _engine={};_engine[NAME]=undefined$1;_engine[VERSION]=undefined$1;rgxMapper.call(_engine,_ua,_rgxmap.engine);return _engine};this.getOS=function(){var _os={};_os[NAME]=undefined$1;_os[VERSION]=undefined$1;rgxMapper.call(_os,_ua,_rgxmap.os);if(!_os[NAME]&&_uach&&_uach.platform!="Unknown"){_os[NAME]=_uach.platform.replace(/chrome os/i,CHROMIUM_OS).replace(/macos/i,MAC_OS);}return _os};this.getResult=function(){return {ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return _ua};this.setUA=function(ua){_ua=typeof ua===STR_TYPE&&ua.length>UA_MAX_LENGTH?trim(ua,UA_MAX_LENGTH):ua;return this};this.setUA(_ua);return this};UAParser.VERSION=LIBVERSION;UAParser.BROWSER=enumerize([NAME,VERSION,MAJOR]);UAParser.CPU=enumerize([ARCHITECTURE]);UAParser.DEVICE=enumerize([MODEL,VENDOR,TYPE,CONSOLE,MOBILE,SMARTTV,TABLET,WEARABLE,EMBEDDED]);UAParser.ENGINE=UAParser.OS=enumerize([NAME,VERSION]);{if(module.exports){exports=module.exports=UAParser;}exports.UAParser=UAParser;}var $=typeof window!==UNDEF_TYPE&&(window.jQuery||window.Zepto);if($&&!$.ua){var parser=new UAParser;$.ua=parser.getResult();$.ua.get=function(){return parser.getUA()};$.ua.set=function(ua){parser.setUA(ua);var result=parser.getResult();for(var prop in result){$.ua[prop]=result[prop];}};}})(typeof window==="object"?window:commonjsGlobal);
|
|
5773
5707
|
} (uaParser_min, uaParser_minExports));
|
|
5774
5708
|
|
|
5775
5709
|
Object.defineProperty(lib, '__esModule', { value: true });
|
|
@@ -6858,39 +6792,10 @@ lib.withOrientationChange = withOrientationChange;
|
|
|
6858
6792
|
|
|
6859
6793
|
var createGroupsInArray = function (arr, numberOfGroups) {
|
|
6860
6794
|
var perGroup = Math.ceil(arr.length / numberOfGroups);
|
|
6861
|
-
return
|
|
6795
|
+
return Array.from({ length: numberOfGroups })
|
|
6862
6796
|
.fill('')
|
|
6863
6797
|
.map(function (_, i) { return arr.slice(i * perGroup, (i + 1) * perGroup); });
|
|
6864
6798
|
};
|
|
6865
|
-
var getLocalDateFromString = function (string, locale, time) {
|
|
6866
|
-
var date = new Date(2013, 11, 31, 17, 19, 22);
|
|
6867
|
-
var regex = time ? date.toLocaleString(locale) : date.toLocaleDateString(locale);
|
|
6868
|
-
regex = regex
|
|
6869
|
-
.replace('2013', '(?<year>[0-9]{2,4})')
|
|
6870
|
-
.replace('12', '(?<month>[0-9]{1,2})')
|
|
6871
|
-
.replace('31', '(?<day>[0-9]{1,2})');
|
|
6872
|
-
if (time) {
|
|
6873
|
-
regex = regex
|
|
6874
|
-
.replace('5', '(?<hour>[0-9]{1,2})')
|
|
6875
|
-
.replace('17', '(?<hour>[0-9]{1,2})')
|
|
6876
|
-
.replace('19', '(?<minute>[0-9]{1,2})')
|
|
6877
|
-
.replace('22', '(?<second>[0-9]{1,2})')
|
|
6878
|
-
.replace('PM', '(?<ampm>[A-Z]{2})');
|
|
6879
|
-
}
|
|
6880
|
-
var rgx = RegExp("".concat(regex));
|
|
6881
|
-
var partials = string.match(rgx);
|
|
6882
|
-
if (partials === null)
|
|
6883
|
-
return;
|
|
6884
|
-
var newDate = partials.groups &&
|
|
6885
|
-
(time
|
|
6886
|
-
? new Date(Number(partials.groups['year']), Number(partials.groups['month']) - 1, Number(partials.groups['day']), partials.groups['ampm']
|
|
6887
|
-
? partials.groups['ampm'] === 'PM'
|
|
6888
|
-
? Number(partials.groups['hour']) + 12
|
|
6889
|
-
: Number(partials.groups['hour'])
|
|
6890
|
-
: Number(partials.groups['hour']), Number(partials.groups['minute']), Number(partials.groups['second']))
|
|
6891
|
-
: new Date(Number(partials.groups['year']), Number(partials.groups['month']) - 1, Number(partials.groups['day'])));
|
|
6892
|
-
return newDate;
|
|
6893
|
-
};
|
|
6894
6799
|
var getMonthsNames = function (locale) {
|
|
6895
6800
|
var months = [];
|
|
6896
6801
|
var d = new Date();
|
|
@@ -6983,15 +6888,11 @@ var isDateDisabled = function (date, min, max, dates) {
|
|
|
6983
6888
|
var disabled;
|
|
6984
6889
|
if (dates) {
|
|
6985
6890
|
dates.forEach(function (_date) {
|
|
6986
|
-
if (Array.isArray(_date)) {
|
|
6987
|
-
|
|
6988
|
-
disabled = true;
|
|
6989
|
-
}
|
|
6891
|
+
if (Array.isArray(_date) && isDateInRange(date, _date[0], _date[1])) {
|
|
6892
|
+
disabled = true;
|
|
6990
6893
|
}
|
|
6991
|
-
if (_date instanceof Date) {
|
|
6992
|
-
|
|
6993
|
-
disabled = true;
|
|
6994
|
-
}
|
|
6894
|
+
if (_date instanceof Date && isSameDateAs(date, _date)) {
|
|
6895
|
+
disabled = true;
|
|
6995
6896
|
}
|
|
6996
6897
|
});
|
|
6997
6898
|
}
|
|
@@ -7336,8 +7237,7 @@ CCalendar.displayName = 'CCalendar';
|
|
|
7336
7237
|
|
|
7337
7238
|
var CForm = React$1.forwardRef(function (_a, ref) {
|
|
7338
7239
|
var children = _a.children, className = _a.className, validated = _a.validated, rest = __rest$1(_a, ["children", "className", "validated"]);
|
|
7339
|
-
|
|
7340
|
-
return (React$1.createElement("form", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7240
|
+
return (React$1.createElement("form", __assign$1({ className: classNames$1({ 'was-validated': validated }, className) || undefined }, rest, { ref: ref }), children));
|
|
7341
7241
|
});
|
|
7342
7242
|
CForm.propTypes = {
|
|
7343
7243
|
children: propTypesExports.node,
|
|
@@ -7349,11 +7249,10 @@ CForm.displayName = 'CForm';
|
|
|
7349
7249
|
var CFormFeedback = React$1.forwardRef(function (_a, ref) {
|
|
7350
7250
|
var _b;
|
|
7351
7251
|
var children = _a.children, className = _a.className, _c = _a.component, Component = _c === void 0 ? 'div' : _c, invalid = _a.invalid, tooltip = _a.tooltip, valid = _a.valid, rest = __rest$1(_a, ["children", "className", "component", "invalid", "tooltip", "valid"]);
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7252
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1((_b = {},
|
|
7253
|
+
_b["invalid-".concat(tooltip ? 'tooltip' : 'feedback')] = invalid,
|
|
7254
|
+
_b["valid-".concat(tooltip ? 'tooltip' : 'feedback')] = valid,
|
|
7255
|
+
_b), className) }, rest, { ref: ref }), children));
|
|
7357
7256
|
});
|
|
7358
7257
|
CFormFeedback.propTypes = {
|
|
7359
7258
|
children: propTypesExports.node,
|
|
@@ -7385,8 +7284,7 @@ CFormControlValidation.displayName = 'CFormControlValidation';
|
|
|
7385
7284
|
|
|
7386
7285
|
var CFormLabel = React$1.forwardRef(function (_a, ref) {
|
|
7387
7286
|
var children = _a.children, className = _a.className, customClassName = _a.customClassName, rest = __rest$1(_a, ["children", "className", "customClassName"]);
|
|
7388
|
-
|
|
7389
|
-
return (React$1.createElement("label", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7287
|
+
return (React$1.createElement("label", __assign$1({ className: customClassName !== null && customClassName !== void 0 ? customClassName : classNames$1('form-label', className) }, rest, { ref: ref }), children));
|
|
7390
7288
|
});
|
|
7391
7289
|
CFormLabel.propTypes = {
|
|
7392
7290
|
children: propTypesExports.node,
|
|
@@ -7396,8 +7294,7 @@ CFormLabel.propTypes = {
|
|
|
7396
7294
|
CFormLabel.displayName = 'CFormLabel';
|
|
7397
7295
|
|
|
7398
7296
|
var CFormCheck = React$1.forwardRef(function (_a, ref) {
|
|
7399
|
-
var _b;
|
|
7400
|
-
var className = _a.className, button = _a.button, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingLabel = _a.floatingLabel, tooltipFeedback = _a.tooltipFeedback, hitArea = _a.hitArea, id = _a.id, indeterminate = _a.indeterminate, inline = _a.inline, invalid = _a.invalid, label = _a.label, _c = _a.type, type = _c === void 0 ? 'checkbox' : _c, valid = _a.valid, rest = __rest$1(_a, ["className", "button", "feedback", "feedbackInvalid", "feedbackValid", "floatingLabel", "tooltipFeedback", "hitArea", "id", "indeterminate", "inline", "invalid", "label", "type", "valid"]);
|
|
7297
|
+
var className = _a.className, button = _a.button, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingLabel = _a.floatingLabel, tooltipFeedback = _a.tooltipFeedback, hitArea = _a.hitArea, id = _a.id, indeterminate = _a.indeterminate, inline = _a.inline, invalid = _a.invalid, label = _a.label, reverse = _a.reverse, _b = _a.type, type = _b === void 0 ? 'checkbox' : _b, valid = _a.valid, rest = __rest$1(_a, ["className", "button", "feedback", "feedbackInvalid", "feedbackValid", "floatingLabel", "tooltipFeedback", "hitArea", "id", "indeterminate", "inline", "invalid", "label", "reverse", "type", "valid"]);
|
|
7401
7298
|
var inputRef = React$1.useRef(null);
|
|
7402
7299
|
var forkedRef = useForkedRef(ref, inputRef);
|
|
7403
7300
|
React$1.useEffect(function () {
|
|
@@ -7405,47 +7302,51 @@ var CFormCheck = React$1.forwardRef(function (_a, ref) {
|
|
|
7405
7302
|
inputRef.current.indeterminate = indeterminate;
|
|
7406
7303
|
}
|
|
7407
7304
|
}, [indeterminate]);
|
|
7408
|
-
var
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
var
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7305
|
+
var FormControl = function () { return (React$1.createElement("input", __assign$1({ type: type, className: classNames$1(button ? 'btn-check' : 'form-check-input', {
|
|
7306
|
+
'is-invalid': invalid,
|
|
7307
|
+
'is-valid': valid,
|
|
7308
|
+
'me-2': hitArea,
|
|
7309
|
+
}), id: id }, rest, { ref: forkedRef }))); };
|
|
7310
|
+
var FormValidation = function () { return (React$1.createElement(CFormControlValidation, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingLabel: floatingLabel, invalid: invalid, tooltipFeedback: tooltipFeedback, valid: valid })); };
|
|
7311
|
+
var FormLabel = function () {
|
|
7312
|
+
var _a;
|
|
7313
|
+
return (React$1.createElement(CFormLabel, __assign$1({ customClassName: classNames$1(button
|
|
7314
|
+
? classNames$1('btn', button.variant ? "btn-".concat(button.variant, "-").concat(button.color) : "btn-".concat(button.color), (_a = {},
|
|
7315
|
+
_a["btn-".concat(button.size)] = button.size,
|
|
7316
|
+
_a), "".concat(button.shape))
|
|
7317
|
+
: 'form-check-label') }, (id && { htmlFor: id })), label));
|
|
7318
|
+
};
|
|
7319
|
+
var FormCheck = function () {
|
|
7320
|
+
if (button) {
|
|
7321
|
+
return (React$1.createElement(React$1.Fragment, null,
|
|
7322
|
+
React$1.createElement(FormControl, null),
|
|
7323
|
+
label && React$1.createElement(FormLabel, null),
|
|
7324
|
+
React$1.createElement(FormValidation, null)));
|
|
7325
|
+
}
|
|
7326
|
+
if (label) {
|
|
7327
|
+
return hitArea ? (React$1.createElement(React$1.Fragment, null,
|
|
7328
|
+
React$1.createElement(FormControl, null),
|
|
7329
|
+
React$1.createElement(CFormLabel, __assign$1({ customClassName: classNames$1('form-check-label stretched-link', className) }, (id && { htmlFor: id })), label),
|
|
7330
|
+
React$1.createElement(FormValidation, null))) : (React$1.createElement("div", { className: classNames$1('form-check', {
|
|
7331
|
+
'form-check-inline': inline,
|
|
7332
|
+
'form-check-reverse': reverse,
|
|
7333
|
+
'is-invalid': invalid,
|
|
7334
|
+
'is-valid': valid,
|
|
7335
|
+
}, className) },
|
|
7336
|
+
React$1.createElement(FormControl, null),
|
|
7337
|
+
React$1.createElement(FormLabel, null),
|
|
7338
|
+
React$1.createElement(FormValidation, null)));
|
|
7339
|
+
}
|
|
7340
|
+
return React$1.createElement(FormControl, null);
|
|
7341
|
+
};
|
|
7342
|
+
return React$1.createElement(FormCheck, null);
|
|
7343
|
+
});
|
|
7344
|
+
CFormCheck.propTypes = __assign$1({ button: propTypesExports.object, className: propTypesExports.string, hitArea: propTypesExports.oneOf(['full']), id: propTypesExports.string, indeterminate: propTypesExports.bool, inline: propTypesExports.bool, label: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.node]), reverse: propTypesExports.bool, type: propTypesExports.oneOf(['checkbox', 'radio']) }, CFormControlValidation.propTypes);
|
|
7443
7345
|
CFormCheck.displayName = 'CFormCheck';
|
|
7444
7346
|
|
|
7445
7347
|
var CFormFloating = React$1.forwardRef(function (_a, ref) {
|
|
7446
7348
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
7447
|
-
|
|
7448
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7349
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('form-floating', className) }, rest, { ref: ref }), children));
|
|
7449
7350
|
});
|
|
7450
7351
|
CFormFloating.propTypes = {
|
|
7451
7352
|
children: propTypesExports.node,
|
|
@@ -7455,8 +7356,7 @@ CFormFloating.displayName = 'CFormFloating';
|
|
|
7455
7356
|
|
|
7456
7357
|
var CFormText = React$1.forwardRef(function (_a, ref) {
|
|
7457
7358
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'div' : _b, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
7458
|
-
|
|
7459
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7359
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('form-text', className) }, rest, { ref: ref }), children));
|
|
7460
7360
|
});
|
|
7461
7361
|
CFormText.propTypes = {
|
|
7462
7362
|
children: propTypesExports.node,
|
|
@@ -7467,16 +7367,16 @@ CFormText.displayName = 'CFormText';
|
|
|
7467
7367
|
|
|
7468
7368
|
var CFormControlWrapper = function (_a) {
|
|
7469
7369
|
var children = _a.children, describedby = _a.describedby, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingClassName = _a.floatingClassName, floatingLabel = _a.floatingLabel, id = _a.id, invalid = _a.invalid, label = _a.label, text = _a.text, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid;
|
|
7470
|
-
var
|
|
7370
|
+
var FormControlValidation = function () { return (React$1.createElement(CFormControlValidation, { describedby: describedby, feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingLabel: floatingLabel, invalid: invalid, tooltipFeedback: tooltipFeedback, valid: valid })); };
|
|
7471
7371
|
return floatingLabel ? (React$1.createElement(CFormFloating, { className: floatingClassName },
|
|
7472
7372
|
children,
|
|
7473
7373
|
React$1.createElement(CFormLabel, { htmlFor: id }, label || floatingLabel),
|
|
7474
7374
|
text && React$1.createElement(CFormText, { id: describedby }, text),
|
|
7475
|
-
|
|
7375
|
+
React$1.createElement(FormControlValidation, null))) : (React$1.createElement(React$1.Fragment, null,
|
|
7476
7376
|
label && React$1.createElement(CFormLabel, { htmlFor: id }, label),
|
|
7477
7377
|
children,
|
|
7478
7378
|
text && React$1.createElement(CFormText, { id: describedby }, text),
|
|
7479
|
-
|
|
7379
|
+
React$1.createElement(FormControlValidation, null)));
|
|
7480
7380
|
};
|
|
7481
7381
|
CFormControlWrapper.propTypes = __assign$1({ children: propTypesExports.node, floatingClassName: propTypesExports.string, floatingLabel: propTypesExports.oneOfType([propTypesExports.node, propTypesExports.string]), label: propTypesExports.oneOfType([propTypesExports.node, propTypesExports.string]), text: propTypesExports.oneOfType([propTypesExports.node, propTypesExports.string]) }, CFormControlValidation.propTypes);
|
|
7482
7382
|
CFormControlWrapper.displayName = 'CFormControlWrapper';
|
|
@@ -7489,24 +7389,22 @@ var CFormInput = React$1.forwardRef(function (_a, ref) {
|
|
|
7489
7389
|
var timeOutId = setTimeout(function () { return value && onChange && onChange(value); }, typeof delay === 'number' ? delay : 500);
|
|
7490
7390
|
return function () { return clearTimeout(timeOutId); };
|
|
7491
7391
|
}, [value]);
|
|
7492
|
-
var _className = classNames$1(plainText ? 'form-control-plaintext' : 'form-control', (_b = {},
|
|
7493
|
-
_b["form-control-".concat(size)] = size,
|
|
7494
|
-
_b['form-control-color'] = type === 'color',
|
|
7495
|
-
_b['is-invalid'] = invalid,
|
|
7496
|
-
_b['is-valid'] = valid,
|
|
7497
|
-
_b), className);
|
|
7498
7392
|
return (React$1.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingClassName: floatingClassName, floatingLabel: floatingLabel, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
7499
|
-
React$1.createElement("input", __assign$1({ className:
|
|
7393
|
+
React$1.createElement("input", __assign$1({ className: classNames$1(plainText ? 'form-control-plaintext' : 'form-control', (_b = {},
|
|
7394
|
+
_b["form-control-".concat(size)] = size,
|
|
7395
|
+
_b['form-control-color'] = type === 'color',
|
|
7396
|
+
_b['is-invalid'] = invalid,
|
|
7397
|
+
_b['is-valid'] = valid,
|
|
7398
|
+
_b), className), id: id, type: type, onChange: function (event) { return (delay ? setValue(event) : onChange && onChange(event)); } }, rest, { ref: ref }), children)));
|
|
7500
7399
|
});
|
|
7501
7400
|
CFormInput.propTypes = __assign$1({ className: propTypesExports.string, id: propTypesExports.string, delay: propTypesExports.oneOfType([propTypesExports.bool, propTypesExports.number]), plainText: propTypesExports.bool, size: propTypesExports.oneOf(['sm', 'lg']), type: propTypesExports.oneOfType([propTypesExports.oneOf(['color', 'file', 'text']), propTypesExports.string]) }, CFormControlWrapper.propTypes);
|
|
7502
7401
|
CFormInput.displayName = 'CFormInput';
|
|
7503
7402
|
|
|
7504
7403
|
var CFormRange = React$1.forwardRef(function (_a, ref) {
|
|
7505
7404
|
var className = _a.className, label = _a.label, rest = __rest$1(_a, ["className", "label"]);
|
|
7506
|
-
var _className = classNames$1('form-range', className);
|
|
7507
7405
|
return (React$1.createElement(React$1.Fragment, null,
|
|
7508
7406
|
label && React$1.createElement(CFormLabel, { htmlFor: rest.id }, label),
|
|
7509
|
-
React$1.createElement("input", __assign$1({ type: "range", className:
|
|
7407
|
+
React$1.createElement("input", __assign$1({ type: "range", className: classNames$1('form-range', className) }, rest, { ref: ref }))));
|
|
7510
7408
|
});
|
|
7511
7409
|
CFormRange.propTypes = {
|
|
7512
7410
|
className: propTypesExports.string,
|
|
@@ -7517,13 +7415,12 @@ CFormRange.displayName = 'CFormRange';
|
|
|
7517
7415
|
var CFormSelect = React$1.forwardRef(function (_a, ref) {
|
|
7518
7416
|
var _b;
|
|
7519
7417
|
var children = _a.children, className = _a.className, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingClassName = _a.floatingClassName, floatingLabel = _a.floatingLabel, htmlSize = _a.htmlSize, id = _a.id, invalid = _a.invalid, label = _a.label, options = _a.options, size = _a.size, text = _a.text, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, rest = __rest$1(_a, ["children", "className", "feedback", "feedbackInvalid", "feedbackValid", "floatingClassName", "floatingLabel", "htmlSize", "id", "invalid", "label", "options", "size", "text", "tooltipFeedback", "valid"]);
|
|
7520
|
-
var _className = classNames$1('form-select', (_b = {},
|
|
7521
|
-
_b["form-select-".concat(size)] = size,
|
|
7522
|
-
_b['is-invalid'] = invalid,
|
|
7523
|
-
_b['is-valid'] = valid,
|
|
7524
|
-
_b), className);
|
|
7525
7418
|
return (React$1.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingClassName: floatingClassName, floatingLabel: floatingLabel, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
7526
|
-
React$1.createElement("select", __assign$1({ id: id, className:
|
|
7419
|
+
React$1.createElement("select", __assign$1({ id: id, className: classNames$1('form-select', (_b = {},
|
|
7420
|
+
_b["form-select-".concat(size)] = size,
|
|
7421
|
+
_b['is-invalid'] = invalid,
|
|
7422
|
+
_b['is-valid'] = valid,
|
|
7423
|
+
_b), className), size: htmlSize }, rest, { ref: ref }), options
|
|
7527
7424
|
? options.map(function (option, index) {
|
|
7528
7425
|
return (React$1.createElement("option", __assign$1({}, (typeof option === 'object' &&
|
|
7529
7426
|
option.disabled && { disabled: option.disabled }), (typeof option === 'object' && option.value && { value: option.value }), { key: index }), typeof option === 'string' ? option : option.label));
|
|
@@ -7535,26 +7432,26 @@ CFormSelect.displayName = 'CFormSelect';
|
|
|
7535
7432
|
|
|
7536
7433
|
var CFormSwitch = React$1.forwardRef(function (_a, ref) {
|
|
7537
7434
|
var _b;
|
|
7538
|
-
var className = _a.className, id = _a.id, invalid = _a.invalid, label = _a.label, size = _a.size, _c = _a.type, type = _c === void 0 ? 'checkbox' : _c, valid = _a.valid, rest = __rest$1(_a, ["className", "id", "invalid", "label", "size", "type", "valid"]);
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
'
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
React$1.createElement(
|
|
7551
|
-
label && (React$1.createElement(CFormLabel, __assign$1({ customClassName: labelClassName }, (id && { htmlFor: id })), label))));
|
|
7435
|
+
var className = _a.className, id = _a.id, invalid = _a.invalid, label = _a.label, reverse = _a.reverse, size = _a.size, _c = _a.type, type = _c === void 0 ? 'checkbox' : _c, valid = _a.valid, rest = __rest$1(_a, ["className", "id", "invalid", "label", "reverse", "size", "type", "valid"]);
|
|
7436
|
+
return (React$1.createElement("div", { className: classNames$1('form-check form-switch', (_b = {
|
|
7437
|
+
'form-check-reverse': reverse
|
|
7438
|
+
},
|
|
7439
|
+
_b["form-switch-".concat(size)] = size,
|
|
7440
|
+
_b['is-invalid'] = invalid,
|
|
7441
|
+
_b['is-valid'] = valid,
|
|
7442
|
+
_b), className) },
|
|
7443
|
+
React$1.createElement("input", __assign$1({ type: type, className: classNames$1('form-check-input', {
|
|
7444
|
+
'is-invalid': invalid,
|
|
7445
|
+
'is-valid': valid,
|
|
7446
|
+
}), id: id }, rest, { ref: ref })),
|
|
7447
|
+
label && (React$1.createElement(CFormLabel, __assign$1({ customClassName: "form-check-label" }, (id && { htmlFor: id })), label))));
|
|
7552
7448
|
});
|
|
7553
7449
|
CFormSwitch.propTypes = {
|
|
7554
7450
|
className: propTypesExports.string,
|
|
7555
7451
|
id: propTypesExports.string,
|
|
7556
7452
|
invalid: propTypesExports.bool,
|
|
7557
7453
|
label: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.node]),
|
|
7454
|
+
reverse: propTypesExports.bool,
|
|
7558
7455
|
size: propTypesExports.oneOf(['lg', 'xl']),
|
|
7559
7456
|
type: propTypesExports.oneOf(['checkbox', 'radio']),
|
|
7560
7457
|
valid: propTypesExports.bool,
|
|
@@ -7563,12 +7460,11 @@ CFormSwitch.displayName = 'CFormSwitch';
|
|
|
7563
7460
|
|
|
7564
7461
|
var CFormTextarea = React$1.forwardRef(function (_a, ref) {
|
|
7565
7462
|
var children = _a.children, className = _a.className, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, floatingClassName = _a.floatingClassName, floatingLabel = _a.floatingLabel, id = _a.id, invalid = _a.invalid, label = _a.label, plainText = _a.plainText, text = _a.text, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, rest = __rest$1(_a, ["children", "className", "feedback", "feedbackInvalid", "feedbackValid", "floatingClassName", "floatingLabel", "id", "invalid", "label", "plainText", "text", "tooltipFeedback", "valid"]);
|
|
7566
|
-
var _className = classNames$1(plainText ? 'form-control-plaintext' : 'form-control', {
|
|
7567
|
-
'is-invalid': invalid,
|
|
7568
|
-
'is-valid': valid,
|
|
7569
|
-
}, className);
|
|
7570
7463
|
return (React$1.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, floatingClassName: floatingClassName, floatingLabel: floatingLabel, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
7571
|
-
React$1.createElement("textarea", __assign$1({ className:
|
|
7464
|
+
React$1.createElement("textarea", __assign$1({ className: classNames$1(plainText ? 'form-control-plaintext' : 'form-control', {
|
|
7465
|
+
'is-invalid': invalid,
|
|
7466
|
+
'is-valid': valid,
|
|
7467
|
+
}, className), id: id }, rest, { ref: ref }), children)));
|
|
7572
7468
|
});
|
|
7573
7469
|
CFormTextarea.propTypes = __assign$1({ className: propTypesExports.string, id: propTypesExports.string, plainText: propTypesExports.bool }, CFormControlWrapper.propTypes);
|
|
7574
7470
|
CFormTextarea.displayName = 'CFormTextarea';
|
|
@@ -7576,10 +7472,9 @@ CFormTextarea.displayName = 'CFormTextarea';
|
|
|
7576
7472
|
var CInputGroup = React$1.forwardRef(function (_a, ref) {
|
|
7577
7473
|
var _b;
|
|
7578
7474
|
var children = _a.children, className = _a.className, size = _a.size, rest = __rest$1(_a, ["children", "className", "size"]);
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7475
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('input-group', (_b = {},
|
|
7476
|
+
_b["input-group-".concat(size)] = size,
|
|
7477
|
+
_b), className) }, rest, { ref: ref }), children));
|
|
7583
7478
|
});
|
|
7584
7479
|
CInputGroup.propTypes = {
|
|
7585
7480
|
children: propTypesExports.node,
|
|
@@ -7590,8 +7485,7 @@ CInputGroup.displayName = 'CInputGroup';
|
|
|
7590
7485
|
|
|
7591
7486
|
var CInputGroupText = React$1.forwardRef(function (_a, ref) {
|
|
7592
7487
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'span' : _b, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
7593
|
-
|
|
7594
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
7488
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('input-group-text', className) }, rest, { ref: ref }), children));
|
|
7595
7489
|
});
|
|
7596
7490
|
CInputGroupText.propTypes = {
|
|
7597
7491
|
children: propTypesExports.node,
|
|
@@ -10045,10 +9939,10 @@ function Reference(_ref) {
|
|
|
10045
9939
|
var CDropdownContext = React$1.createContext({});
|
|
10046
9940
|
var CDropdown = React$1.forwardRef(function (_a, ref) {
|
|
10047
9941
|
var children = _a.children, alignment = _a.alignment, _b = _a.autoClose, autoClose = _b === void 0 ? true : _b, className = _a.className, dark = _a.dark, direction = _a.direction, onHide = _a.onHide, onShow = _a.onShow, _c = _a.placement, placement = _c === void 0 ? 'bottom-start' : _c, _d = _a.popper, popper = _d === void 0 ? true : _d, _e = _a.variant, variant = _e === void 0 ? 'btn-group' : _e, _f = _a.component, component = _f === void 0 ? 'div' : _f, _g = _a.visible, visible = _g === void 0 ? false : _g, rest = __rest$1(_a, ["children", "alignment", "autoClose", "className", "dark", "direction", "onHide", "onShow", "placement", "popper", "variant", "component", "visible"]);
|
|
10048
|
-
var _h = React$1.useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
10049
9942
|
var dropdownRef = React$1.useRef(null);
|
|
10050
9943
|
var dropdownToggleRef = React$1.useRef(null);
|
|
10051
9944
|
var forkedRef = useForkedRef(ref, dropdownRef);
|
|
9945
|
+
var _h = React$1.useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
10052
9946
|
var Component = variant === 'nav-item' ? 'li' : component;
|
|
10053
9947
|
// Disable popper if responsive aligment is set.
|
|
10054
9948
|
if (typeof alignment === 'object') {
|
|
@@ -10066,13 +9960,6 @@ var CDropdown = React$1.forwardRef(function (_a, ref) {
|
|
|
10066
9960
|
visible: _visible,
|
|
10067
9961
|
setVisible: setVisible,
|
|
10068
9962
|
};
|
|
10069
|
-
var _className = classNames$1(variant === 'nav-item' ? 'nav-item dropdown' : variant, {
|
|
10070
|
-
show: _visible,
|
|
10071
|
-
}, direction === 'center'
|
|
10072
|
-
? 'dropdown-center'
|
|
10073
|
-
: direction === 'dropup-center'
|
|
10074
|
-
? 'dropup dropup-center'
|
|
10075
|
-
: direction, className);
|
|
10076
9963
|
React$1.useEffect(function () {
|
|
10077
9964
|
setVisible(visible);
|
|
10078
9965
|
}, [visible]);
|
|
@@ -10080,11 +9967,16 @@ var CDropdown = React$1.forwardRef(function (_a, ref) {
|
|
|
10080
9967
|
_visible && onShow && onShow();
|
|
10081
9968
|
!_visible && onHide && onHide();
|
|
10082
9969
|
}, [_visible]);
|
|
10083
|
-
var
|
|
10084
|
-
return variant === 'input-group' ? (React$1.createElement(React$1.Fragment, null, children)) : (React$1.createElement(Component, __assign$1({ className:
|
|
9970
|
+
var DropdownContent = function () {
|
|
9971
|
+
return variant === 'input-group' ? (React$1.createElement(React$1.Fragment, null, children)) : (React$1.createElement(Component, __assign$1({ className: classNames$1(variant === 'nav-item' ? 'nav-item dropdown' : variant, {
|
|
9972
|
+
'dropdown-center': direction === 'center',
|
|
9973
|
+
'dropup dropup-center': direction === 'dropup-center',
|
|
9974
|
+
direction: direction && direction !== 'center' && direction !== 'dropup-center',
|
|
9975
|
+
show: _visible,
|
|
9976
|
+
}, className) }, rest, { ref: forkedRef }), children));
|
|
10085
9977
|
};
|
|
10086
|
-
return
|
|
10087
|
-
React$1.createElement(
|
|
9978
|
+
return (React$1.createElement(CDropdownContext.Provider, { value: contextValues }, popper ? (React$1.createElement(Manager, null,
|
|
9979
|
+
React$1.createElement(DropdownContent, null))) : (React$1.createElement(DropdownContent, null))));
|
|
10088
9980
|
});
|
|
10089
9981
|
var alignmentDirection = propTypesExports.oneOf(['start', 'end']);
|
|
10090
9982
|
CDropdown.propTypes = {
|
|
@@ -10179,20 +10071,17 @@ var CDropdownMenu = function (_a) {
|
|
|
10179
10071
|
}
|
|
10180
10072
|
return classNames;
|
|
10181
10073
|
};
|
|
10182
|
-
var
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
10190
|
-
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
})
|
|
10194
|
-
: children));
|
|
10195
|
-
};
|
|
10074
|
+
var dropdownMenuComponent = function (style, ref) { return (React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-menu', {
|
|
10075
|
+
'dropdown-menu-dark': dark,
|
|
10076
|
+
show: visible,
|
|
10077
|
+
}, alignment && alignmentClassNames(alignment), className), ref: ref, style: style, role: "menu", "aria-hidden": !visible }, (!popper && { 'data-coreui-popper': 'static' }), rest), Component === 'ul'
|
|
10078
|
+
? React$1.Children.map(children, function (child, index) {
|
|
10079
|
+
if (React$1.isValidElement(child)) {
|
|
10080
|
+
return React$1.createElement("li", { key: index }, React$1.cloneElement(child));
|
|
10081
|
+
}
|
|
10082
|
+
return;
|
|
10083
|
+
})
|
|
10084
|
+
: children)); };
|
|
10196
10085
|
return popper && visible ? (React$1.createElement(Popper, { innerRef: dropdownMenuRef, placement: _placement }, function (_a) {
|
|
10197
10086
|
var ref = _a.ref, style = _a.style;
|
|
10198
10087
|
return dropdownMenuComponent(style, ref);
|
|
@@ -10208,11 +10097,6 @@ CDropdownMenu.displayName = 'CDropdownMenu';
|
|
|
10208
10097
|
var CDropdownToggle = function (_a) {
|
|
10209
10098
|
var children = _a.children, _b = _a.caret, caret = _b === void 0 ? true : _b, custom = _a.custom, className = _a.className, split = _a.split, _c = _a.trigger, trigger = _c === void 0 ? 'click' : _c, rest = __rest$1(_a, ["children", "caret", "custom", "className", "split", "trigger"]);
|
|
10210
10099
|
var _d = React$1.useContext(CDropdownContext), dropdownToggleRef = _d.dropdownToggleRef, popper = _d.popper, variant = _d.variant, visible = _d.visible, setVisible = _d.setVisible;
|
|
10211
|
-
var _className = classNames$1({
|
|
10212
|
-
'dropdown-toggle': caret,
|
|
10213
|
-
'dropdown-toggle-split': split,
|
|
10214
|
-
'nav-link': variant === 'nav-item',
|
|
10215
|
-
}, className);
|
|
10216
10100
|
var triggers = __assign$1(__assign$1({}, ((trigger === 'click' || trigger.includes('click')) && {
|
|
10217
10101
|
onClick: function (event) {
|
|
10218
10102
|
event.preventDefault();
|
|
@@ -10222,11 +10106,21 @@ var CDropdownToggle = function (_a) {
|
|
|
10222
10106
|
onFocus: function () { return setVisible(true); },
|
|
10223
10107
|
onBlur: function () { return setVisible(false); },
|
|
10224
10108
|
}));
|
|
10225
|
-
var togglerProps = __assign$1(
|
|
10109
|
+
var togglerProps = __assign$1({ className: classNames$1({
|
|
10110
|
+
'dropdown-toggle': caret,
|
|
10111
|
+
'dropdown-toggle-split': split,
|
|
10112
|
+
'nav-link': variant === 'nav-item',
|
|
10113
|
+
}, className), 'aria-expanded': visible }, (!rest.disabled && __assign$1({}, triggers)));
|
|
10226
10114
|
// We use any because Toggler can be `a` as well as `button`.
|
|
10227
10115
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10228
10116
|
var Toggler = function (ref) {
|
|
10229
|
-
|
|
10117
|
+
if (custom && React$1.isValidElement(children)) {
|
|
10118
|
+
return (React$1.createElement(React$1.Fragment, null, React$1.cloneElement(children, __assign$1(__assign$1({ 'aria-expanded': visible }, (!rest.disabled && __assign$1({}, triggers))), { ref: useForkedRef(ref, dropdownToggleRef) }))));
|
|
10119
|
+
}
|
|
10120
|
+
if (variant === 'nav-item') {
|
|
10121
|
+
return (React$1.createElement("a", __assign$1({ href: "#" }, togglerProps, { ref: useForkedRef(ref, dropdownToggleRef) }), children));
|
|
10122
|
+
}
|
|
10123
|
+
return (React$1.createElement(CButton, __assign$1({ type: "button" }, togglerProps, { tabIndex: 0 }, rest, { ref: useForkedRef(ref, dropdownToggleRef) }),
|
|
10230
10124
|
children,
|
|
10231
10125
|
split && React$1.createElement("span", { className: "visually-hidden" }, "Toggle Dropdown")));
|
|
10232
10126
|
};
|
|
@@ -10259,12 +10153,12 @@ var CPicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10259
10153
|
onConfirm && onConfirm();
|
|
10260
10154
|
setVisible(false);
|
|
10261
10155
|
} }, confirmButton)))); };
|
|
10262
|
-
var _className = classNames$1('picker', className);
|
|
10263
10156
|
switch (container) {
|
|
10264
|
-
case 'inline':
|
|
10265
|
-
return React$1.createElement("div", { className:
|
|
10266
|
-
|
|
10267
|
-
|
|
10157
|
+
case 'inline': {
|
|
10158
|
+
return React$1.createElement("div", { className: classNames$1('picker', className) }, children);
|
|
10159
|
+
}
|
|
10160
|
+
default: {
|
|
10161
|
+
return (React$1.createElement(CDropdown, __assign$1({ autoClose: "outside", className: classNames$1('picker', className), onHide: function () {
|
|
10268
10162
|
setVisible(false);
|
|
10269
10163
|
onHide && onHide();
|
|
10270
10164
|
}, onShow: function () {
|
|
@@ -10275,6 +10169,7 @@ var CPicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10275
10169
|
React$1.createElement(CDropdownMenu, { component: "div" },
|
|
10276
10170
|
children,
|
|
10277
10171
|
footer && (React$1.createElement("div", { className: "picker-footer" }, typeof footer === 'boolean' ? Footer() : footer)))));
|
|
10172
|
+
}
|
|
10278
10173
|
}
|
|
10279
10174
|
});
|
|
10280
10175
|
CPicker.displayName = 'CPicker';
|
|
@@ -10401,13 +10296,11 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10401
10296
|
listOfSeconds: [],
|
|
10402
10297
|
hour12: false,
|
|
10403
10298
|
}), localizedTimePartials = _r[0], setLocalizedTimePartials = _r[1];
|
|
10404
|
-
React$1.useEffect(function () {
|
|
10405
|
-
setLocalizedTimePartials(getLocalizedTimePartials(locale, ampm));
|
|
10406
|
-
}, [date]);
|
|
10407
10299
|
React$1.useEffect(function () {
|
|
10408
10300
|
setDate(convertTimeToDate(time));
|
|
10409
10301
|
}, [time]);
|
|
10410
10302
|
React$1.useEffect(function () {
|
|
10303
|
+
setLocalizedTimePartials(getLocalizedTimePartials(locale, ampm));
|
|
10411
10304
|
if (inputRef.current) {
|
|
10412
10305
|
inputRef.current.value = date
|
|
10413
10306
|
? date.toLocaleTimeString(locale, __assign$1({ hour12: localizedTimePartials && localizedTimePartials.hour12 }, (!seconds && { timeStyle: 'short' })))
|
|
@@ -10432,17 +10325,17 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10432
10325
|
}
|
|
10433
10326
|
if (set === 'hours') {
|
|
10434
10327
|
if (localizedTimePartials && localizedTimePartials.hour12) {
|
|
10435
|
-
_date.setHours(convert12hTo24h(_ampm, parseInt(value)));
|
|
10328
|
+
_date.setHours(convert12hTo24h(_ampm, Number.parseInt(value)));
|
|
10436
10329
|
}
|
|
10437
10330
|
else {
|
|
10438
|
-
_date.setHours(parseInt(value));
|
|
10331
|
+
_date.setHours(Number.parseInt(value));
|
|
10439
10332
|
}
|
|
10440
10333
|
}
|
|
10441
10334
|
if (set === 'minutes') {
|
|
10442
|
-
_date.setMinutes(parseInt(value));
|
|
10335
|
+
_date.setMinutes(Number.parseInt(value));
|
|
10443
10336
|
}
|
|
10444
10337
|
if (set === 'seconds') {
|
|
10445
|
-
_date.setSeconds(parseInt(value));
|
|
10338
|
+
_date.setSeconds(Number.parseInt(value));
|
|
10446
10339
|
}
|
|
10447
10340
|
setDate(new Date(_date));
|
|
10448
10341
|
onTimeChange && onTimeChange(_date.toTimeString(), _date.toLocaleTimeString(), _date);
|
|
@@ -10503,12 +10396,11 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10503
10396
|
{ value: 'am', label: 'AM' },
|
|
10504
10397
|
{ value: 'pm', label: 'PM' },
|
|
10505
10398
|
], onClick: function (value) { return handleTimeChange('toggle', value); }, selected: _ampm })))); };
|
|
10506
|
-
var _className = classNames$1('time-picker', {
|
|
10507
|
-
'is-invalid': invalid,
|
|
10508
|
-
'is-valid': valid,
|
|
10509
|
-
}, className);
|
|
10510
10399
|
return (React$1.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
10511
|
-
React$1.createElement(CPicker, __assign$1({ className:
|
|
10400
|
+
React$1.createElement(CPicker, __assign$1({ className: classNames$1('time-picker', {
|
|
10401
|
+
'is-invalid': invalid,
|
|
10402
|
+
'is-valid': valid,
|
|
10403
|
+
}, className), container: container, disabled: disabled, footer: footer, id: id, onCancel: function () {
|
|
10512
10404
|
initialDate && setDate(new Date(initialDate));
|
|
10513
10405
|
setVisible(false);
|
|
10514
10406
|
}, onHide: function () {
|
|
@@ -10526,6 +10418,39 @@ var CTimePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10526
10418
|
CTimePicker.propTypes = __assign$1(__assign$1(__assign$1({}, CFormControlWrapper.propTypes), CPicker.propTypes), { ampm: propTypesExports.oneOfType([propTypesExports.oneOf(['auto']), propTypesExports.bool]), className: propTypesExports.string, locale: propTypesExports.string, onTimeChange: propTypesExports.func, seconds: propTypesExports.bool, time: propTypesExports.oneOfType([propTypesExports.instanceOf(Date), propTypesExports.string]), variant: propTypesExports.oneOf(['roll', 'select']) });
|
|
10527
10419
|
CTimePicker.displayName = 'CTimePicker';
|
|
10528
10420
|
|
|
10421
|
+
var getLocalDateFromString = function (string, locale, time) {
|
|
10422
|
+
if (!Number.isNaN(Date.parse(string))) {
|
|
10423
|
+
return new Date(Date.parse(string));
|
|
10424
|
+
}
|
|
10425
|
+
var date = new Date(2013, 11, 31, 17, 19, 22);
|
|
10426
|
+
var regex = time ? date.toLocaleString(locale) : date.toLocaleDateString(locale);
|
|
10427
|
+
regex = regex
|
|
10428
|
+
.replace('2013', '(?<year>[0-9]{2,4})')
|
|
10429
|
+
.replace('12', '(?<month>[0-9]{1,2})')
|
|
10430
|
+
.replace('31', '(?<day>[0-9]{1,2})');
|
|
10431
|
+
if (time) {
|
|
10432
|
+
regex = regex
|
|
10433
|
+
.replace('5', '(?<hour>[0-9]{1,2})')
|
|
10434
|
+
.replace('17', '(?<hour>[0-9]{1,2})')
|
|
10435
|
+
.replace('19', '(?<minute>[0-9]{1,2})')
|
|
10436
|
+
.replace('22', '(?<second>[0-9]{1,2})')
|
|
10437
|
+
.replace('PM', '(?<ampm>[A-Z]{2})');
|
|
10438
|
+
}
|
|
10439
|
+
var rgx = new RegExp("".concat(regex));
|
|
10440
|
+
var partials = string.match(rgx);
|
|
10441
|
+
if (partials === null)
|
|
10442
|
+
return;
|
|
10443
|
+
var newDate = partials.groups &&
|
|
10444
|
+
(time
|
|
10445
|
+
? new Date(Number(partials.groups['year']), Number(partials.groups['month']) - 1, Number(partials.groups['day']), partials.groups['ampm']
|
|
10446
|
+
? partials.groups['ampm'] === 'PM'
|
|
10447
|
+
? Number(partials.groups['hour']) + 12
|
|
10448
|
+
: Number(partials.groups['hour'])
|
|
10449
|
+
: Number(partials.groups['hour']), Number(partials.groups['minute']), Number(partials.groups['second']))
|
|
10450
|
+
: new Date(Number(partials.groups['year']), Number(partials.groups['month']) - 1, Number(partials.groups['day'])));
|
|
10451
|
+
return newDate;
|
|
10452
|
+
};
|
|
10453
|
+
|
|
10529
10454
|
var _a, _b, _c, _d, _e, _f;
|
|
10530
10455
|
var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
10531
10456
|
var _b = _a.calendars, calendars = _b === void 0 ? 2 : _b, className = _a.className, _c = _a.cleaner, cleaner = _c === void 0 ? true : _c, calendarDate = _a.calendarDate, _d = _a.closeOnSelect, closeOnSelect = _d === void 0 ? true : _d, _e = _a.indicator, indicator = _e === void 0 ? true : _e, dayFormat = _a.dayFormat, disabled = _a.disabled, disabledDates = _a.disabledDates, endDate = _a.endDate, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, firstDayOfWeek = _a.firstDayOfWeek, format = _a.format, footer = _a.footer, id = _a.id, inputReadOnly = _a.inputReadOnly, invalid = _a.invalid, label = _a.label, _f = _a.locale, locale = _f === void 0 ? 'default' : _f, maxDate = _a.maxDate, minDate = _a.minDate, navigation = _a.navigation, navYearFirst = _a.navYearFirst, onEndDateChange = _a.onEndDateChange, onHide = _a.onHide, onStartDateChange = _a.onStartDateChange, onShow = _a.onShow, _g = _a.placeholder, placeholder = _g === void 0 ? ['Start date', 'End date'] : _g, _h = _a.range, range = _h === void 0 ? true : _h, ranges = _a.ranges, _j = _a.rangesButtonsColor, rangesButtonsColor = _j === void 0 ? 'secondary' : _j, rangesButtonsSize = _a.rangesButtonsSize, _k = _a.rangesButtonsVariant, rangesButtonsVariant = _k === void 0 ? 'ghost' : _k, _l = _a.separator, separator = _l === void 0 ? true : _l, size = _a.size, startDate = _a.startDate, text = _a.text, timepicker = _a.timepicker, toggler = _a.toggler, _m = _a.todayButton, todayButton = _m === void 0 ? 'Today' : _m, _o = _a.todayButtonColor, todayButtonColor = _o === void 0 ? 'primary' : _o, _p = _a.todayButtonSize, todayButtonSize = _p === void 0 ? 'sm' : _p, todayButtonVariant = _a.todayButtonVariant, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, visible = _a.visible, weekdayFormat = _a.weekdayFormat, rest = __rest$1(_a, ["calendars", "className", "cleaner", "calendarDate", "closeOnSelect", "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", "separator", "size", "startDate", "text", "timepicker", "toggler", "todayButton", "todayButtonColor", "todayButtonSize", "todayButtonVariant", "tooltipFeedback", "valid", "visible", "weekdayFormat"]);
|
|
@@ -10626,10 +10551,6 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10626
10551
|
setStartDate(null);
|
|
10627
10552
|
setEndDate(null);
|
|
10628
10553
|
};
|
|
10629
|
-
var _className = classNames$1('date-picker', {
|
|
10630
|
-
'is-invalid': invalid,
|
|
10631
|
-
'is-valid': valid,
|
|
10632
|
-
}, className);
|
|
10633
10554
|
var InputGroup = function () { return (React$1.createElement(CInputGroup, { className: "picker-input-group", size: size },
|
|
10634
10555
|
React$1.createElement(CFormInput, __assign$1({ autoComplete: "off", className: classNames$1({
|
|
10635
10556
|
hover: inputStartHoverValue,
|
|
@@ -10654,12 +10575,15 @@ var CDateRangePicker = React$1.forwardRef(function (_a, ref) {
|
|
|
10654
10575
|
indicator && (React$1.createElement("span", { className: "picker-input-group-indicator" }, typeof indicator === 'boolean' ? (React$1.createElement("span", { className: "picker-input-group-icon date-picker-input-icon" })) : (indicator))),
|
|
10655
10576
|
cleaner && _startDate && (React$1.createElement("span", { className: "picker-input-group-cleaner", role: "button", onClick: function (event) { return handleClear(event); } }, typeof cleaner === 'boolean' ? (React$1.createElement("span", { className: "picker-input-group-icon date-picker-cleaner-icon" })) : (cleaner))))))); };
|
|
10656
10577
|
return (React$1.createElement(CFormControlWrapper, { describedby: rest['aria-describedby'], feedback: feedback, feedbackInvalid: feedbackInvalid, feedbackValid: feedbackValid, id: id, invalid: invalid, label: label, text: text, tooltipFeedback: tooltipFeedback, valid: valid },
|
|
10657
|
-
React$1.createElement(CPicker, __assign$1({ className:
|
|
10578
|
+
React$1.createElement(CPicker, __assign$1({ className: classNames$1('date-picker', {
|
|
10579
|
+
'is-invalid': invalid,
|
|
10580
|
+
'is-valid': valid,
|
|
10581
|
+
}, className), disabled: disabled, footer: footer || timepicker, footerContent: todayButton && (React$1.createElement(CButton, { className: "me-auto", color: todayButtonColor, size: todayButtonSize, variant: todayButtonVariant, onClick: function () {
|
|
10658
10582
|
var date = new Date();
|
|
10659
10583
|
handleStartDateChange(date);
|
|
10660
10584
|
handleEndDateChange(date);
|
|
10661
10585
|
setCalendarDate(date);
|
|
10662
|
-
} }, todayButton)), id: id, toggler: toggler ? toggler : InputGroup(), onCancel: function () {
|
|
10586
|
+
} }, todayButton)), id: id, toggler: toggler !== null && toggler !== void 0 ? toggler : InputGroup(), onCancel: function () {
|
|
10663
10587
|
handleStartDateChange(initialStartDate);
|
|
10664
10588
|
handleEndDateChange(initialEndDate);
|
|
10665
10589
|
setVisible(false);
|
|
@@ -10704,8 +10628,7 @@ CDatePicker.propTypes = __assign$1(__assign$1({}, CDateRangePicker.propTypes), {
|
|
|
10704
10628
|
|
|
10705
10629
|
var CDropdownDivider = React$1.forwardRef(function (_a, ref) {
|
|
10706
10630
|
var className = _a.className, rest = __rest$1(_a, ["className"]);
|
|
10707
|
-
|
|
10708
|
-
return React$1.createElement("hr", __assign$1({ className: _className }, rest, { ref: ref }));
|
|
10631
|
+
return React$1.createElement("hr", __assign$1({ className: classNames$1('dropdown-divider', className) }, rest, { ref: ref }));
|
|
10709
10632
|
});
|
|
10710
10633
|
CDropdownDivider.propTypes = {
|
|
10711
10634
|
className: propTypesExports.string,
|
|
@@ -10714,8 +10637,7 @@ CDropdownDivider.displayName = 'CDropdownDivider';
|
|
|
10714
10637
|
|
|
10715
10638
|
var CDropdownHeader = React$1.forwardRef(function (_a, ref) {
|
|
10716
10639
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'h6' : _b, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
10717
|
-
|
|
10718
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10640
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-header', className) }, rest, { ref: ref }), children));
|
|
10719
10641
|
});
|
|
10720
10642
|
CDropdownHeader.propTypes = {
|
|
10721
10643
|
children: propTypesExports.node,
|
|
@@ -10726,8 +10648,7 @@ CDropdownHeader.displayName = 'CDropdownHeader';
|
|
|
10726
10648
|
|
|
10727
10649
|
var CDropdownItem = React$1.forwardRef(function (_a, ref) {
|
|
10728
10650
|
var children = _a.children, className = _a.className, _b = _a.component, component = _b === void 0 ? 'a' : _b, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
10729
|
-
|
|
10730
|
-
return (React$1.createElement(CLink, __assign$1({ className: _className, component: component }, rest, { ref: ref }), children));
|
|
10651
|
+
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('dropdown-item', className), component: component }, rest, { ref: ref }), children));
|
|
10731
10652
|
});
|
|
10732
10653
|
CDropdownItem.propTypes = {
|
|
10733
10654
|
children: propTypesExports.node,
|
|
@@ -10738,8 +10659,7 @@ CDropdownItem.displayName = 'CDropdownItem';
|
|
|
10738
10659
|
|
|
10739
10660
|
var CDropdownItemPlain = React$1.forwardRef(function (_a, ref) {
|
|
10740
10661
|
var children = _a.children, className = _a.className, _b = _a.component, Component = _b === void 0 ? 'span' : _b, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
10741
|
-
|
|
10742
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10662
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('dropdown-item-text', className) }, rest, { ref: ref }), children));
|
|
10743
10663
|
});
|
|
10744
10664
|
CDropdownItemPlain.propTypes = {
|
|
10745
10665
|
children: propTypesExports.node,
|
|
@@ -10750,8 +10670,7 @@ CDropdownItemPlain.displayName = 'CDropdownItemPlain';
|
|
|
10750
10670
|
|
|
10751
10671
|
var CSpinner = React$1.forwardRef(function (_a, ref) {
|
|
10752
10672
|
var className = _a.className, color = _a.color, _b = _a.component, Component = _b === void 0 ? 'div' : _b, size = _a.size, _c = _a.variant, variant = _c === void 0 ? 'border' : _c, _d = _a.visuallyHiddenLabel, visuallyHiddenLabel = _d === void 0 ? 'Loading...' : _d, rest = __rest$1(_a, ["className", "color", "component", "size", "variant", "visuallyHiddenLabel"]);
|
|
10753
|
-
|
|
10754
|
-
return (React$1.createElement(Component, __assign$1({ className: _className, role: "status" }, rest, { ref: ref }),
|
|
10673
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1("spinner-".concat(variant), "text-".concat(color), size && "spinner-".concat(variant, "-").concat(size), className), role: "status" }, rest, { ref: ref }),
|
|
10755
10674
|
React$1.createElement("span", { className: "visually-hidden" }, visuallyHiddenLabel)));
|
|
10756
10675
|
});
|
|
10757
10676
|
CSpinner.propTypes = {
|
|
@@ -10818,8 +10737,7 @@ CElementCover.displayName = 'CElementCover';
|
|
|
10818
10737
|
var CFooter = React$1.forwardRef(function (_a, ref) {
|
|
10819
10738
|
var _b;
|
|
10820
10739
|
var children = _a.children, className = _a.className, position = _a.position, rest = __rest$1(_a, ["children", "className", "position"]);
|
|
10821
|
-
|
|
10822
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10740
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('footer', (_b = {}, _b["footer-".concat(position)] = position, _b), className) }, rest, { ref: ref }), children));
|
|
10823
10741
|
});
|
|
10824
10742
|
CFooter.propTypes = {
|
|
10825
10743
|
children: propTypesExports.node,
|
|
@@ -10864,8 +10782,7 @@ var CCol = React$1.forwardRef(function (_a, ref) {
|
|
|
10864
10782
|
}
|
|
10865
10783
|
}
|
|
10866
10784
|
});
|
|
10867
|
-
|
|
10868
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10785
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'col', className) }, rest, { ref: ref }), children));
|
|
10869
10786
|
});
|
|
10870
10787
|
var span = propTypesExports.oneOfType([
|
|
10871
10788
|
propTypesExports.bool,
|
|
@@ -10913,8 +10830,7 @@ var CContainer = React$1.forwardRef(function (_a, ref) {
|
|
|
10913
10830
|
delete rest[bp];
|
|
10914
10831
|
breakpoint && repsonsiveClassNames.push("container-".concat(bp));
|
|
10915
10832
|
});
|
|
10916
|
-
|
|
10917
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10833
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1(repsonsiveClassNames.length > 0 ? repsonsiveClassNames : 'container', className) }, rest, { ref: ref }), children));
|
|
10918
10834
|
});
|
|
10919
10835
|
CContainer.propTypes = {
|
|
10920
10836
|
children: propTypesExports.node,
|
|
@@ -10958,8 +10874,7 @@ var CRow = React$1.forwardRef(function (_a, ref) {
|
|
|
10958
10874
|
}
|
|
10959
10875
|
}
|
|
10960
10876
|
});
|
|
10961
|
-
|
|
10962
|
-
return (React$1.createElement("div", { className: _className, ref: ref }, children));
|
|
10877
|
+
return (React$1.createElement("div", { className: classNames$1('row', repsonsiveClassNames, className), ref: ref }, children));
|
|
10963
10878
|
});
|
|
10964
10879
|
var bp = propTypesExports.shape({
|
|
10965
10880
|
cols: propTypesExports.oneOfType([propTypesExports.oneOf(['auto']), propTypesExports.number, propTypesExports.string]),
|
|
@@ -10982,15 +10897,7 @@ CRow.displayName = 'CRow';
|
|
|
10982
10897
|
var CHeader = React$1.forwardRef(function (_a, ref) {
|
|
10983
10898
|
var _b;
|
|
10984
10899
|
var children = _a.children, className = _a.className, container = _a.container, position = _a.position, rest = __rest$1(_a, ["children", "className", "container", "position"]);
|
|
10985
|
-
|
|
10986
|
-
var content;
|
|
10987
|
-
if (container) {
|
|
10988
|
-
content = (React$1.createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
10989
|
-
}
|
|
10990
|
-
else {
|
|
10991
|
-
content = children;
|
|
10992
|
-
}
|
|
10993
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), content));
|
|
10900
|
+
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))));
|
|
10994
10901
|
});
|
|
10995
10902
|
CHeader.propTypes = {
|
|
10996
10903
|
children: propTypesExports.node,
|
|
@@ -11012,8 +10919,7 @@ CHeader.displayName = 'CHeader';
|
|
|
11012
10919
|
|
|
11013
10920
|
var CHeaderBrand = React$1.forwardRef(function (_a, ref) {
|
|
11014
10921
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'a' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
11015
|
-
|
|
11016
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10922
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('header-brand', className) }, rest, { ref: ref }), children));
|
|
11017
10923
|
});
|
|
11018
10924
|
CHeaderBrand.propTypes = {
|
|
11019
10925
|
children: propTypesExports.node,
|
|
@@ -11024,8 +10930,7 @@ CHeaderBrand.displayName = 'CHeaderBrand';
|
|
|
11024
10930
|
|
|
11025
10931
|
var CHeaderDivider = React$1.forwardRef(function (_a, ref) {
|
|
11026
10932
|
var className = _a.className, rest = __rest$1(_a, ["className"]);
|
|
11027
|
-
|
|
11028
|
-
return React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }));
|
|
10933
|
+
return React$1.createElement("div", __assign$1({ className: classNames$1('header-divider', className) }, rest, { ref: ref }));
|
|
11029
10934
|
});
|
|
11030
10935
|
CHeaderDivider.propTypes = {
|
|
11031
10936
|
className: propTypesExports.string,
|
|
@@ -11034,8 +10939,7 @@ CHeaderDivider.displayName = 'CHeaderDivider';
|
|
|
11034
10939
|
|
|
11035
10940
|
var CHeaderNav = React$1.forwardRef(function (_a, ref) {
|
|
11036
10941
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'ul' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
11037
|
-
|
|
11038
|
-
return (React$1.createElement(Component, __assign$1({ className: _className, role: "navigation" }, rest, { ref: ref }), children));
|
|
10942
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('header-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
11039
10943
|
});
|
|
11040
10944
|
CHeaderNav.propTypes = {
|
|
11041
10945
|
children: propTypesExports.node,
|
|
@@ -11046,8 +10950,7 @@ CHeaderNav.displayName = 'CHeaderNav';
|
|
|
11046
10950
|
|
|
11047
10951
|
var CHeaderText = React$1.forwardRef(function (_a, ref) {
|
|
11048
10952
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11049
|
-
|
|
11050
|
-
return (React$1.createElement("span", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
10953
|
+
return (React$1.createElement("span", __assign$1({ className: classNames$1('header-text', className) }, rest, { ref: ref }), children));
|
|
11051
10954
|
});
|
|
11052
10955
|
CHeaderText.propTypes = {
|
|
11053
10956
|
children: propTypesExports.node,
|
|
@@ -11057,8 +10960,7 @@ CHeaderText.displayName = 'CHeaderText';
|
|
|
11057
10960
|
|
|
11058
10961
|
var CHeaderToggler = React$1.forwardRef(function (_a, ref) {
|
|
11059
10962
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11060
|
-
|
|
11061
|
-
return (React$1.createElement("button", __assign$1({ type: "button", className: _className }, rest, { ref: ref }), children ? children : React$1.createElement("span", { className: "header-toggler-icon" })));
|
|
10963
|
+
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" })));
|
|
11062
10964
|
});
|
|
11063
10965
|
CHeaderToggler.propTypes = {
|
|
11064
10966
|
children: propTypesExports.node,
|
|
@@ -11069,14 +10971,13 @@ CHeaderToggler.displayName = 'CHeaderToggler';
|
|
|
11069
10971
|
var CImage = React$1.forwardRef(function (_a, ref) {
|
|
11070
10972
|
var _b;
|
|
11071
10973
|
var align = _a.align, className = _a.className, fluid = _a.fluid, rounded = _a.rounded, thumbnail = _a.thumbnail, rest = __rest$1(_a, ["align", "className", "fluid", "rounded", "thumbnail"]);
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
|
|
11075
|
-
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
|
|
11079
|
-
return React$1.createElement("img", __assign$1({ className: _className }, rest, { ref: ref }));
|
|
10974
|
+
return (React$1.createElement("img", __assign$1({ className: classNames$1((_b = {},
|
|
10975
|
+
_b["float-".concat(align)] = align && (align === 'start' || align === 'end'),
|
|
10976
|
+
_b['d-block mx-auto'] = align && align === 'center',
|
|
10977
|
+
_b['img-fluid'] = fluid,
|
|
10978
|
+
_b.rounded = rounded,
|
|
10979
|
+
_b['img-thumbnail'] = thumbnail,
|
|
10980
|
+
_b), className) || undefined }, rest, { ref: ref })));
|
|
11080
10981
|
});
|
|
11081
10982
|
CImage.propTypes = {
|
|
11082
10983
|
align: propTypesExports.oneOf(['start', 'center', 'end']),
|
|
@@ -11090,12 +10991,11 @@ CImage.displayName = 'CImage';
|
|
|
11090
10991
|
var CListGroup = React$1.forwardRef(function (_a, ref) {
|
|
11091
10992
|
var _b;
|
|
11092
10993
|
var children = _a.children, className = _a.className, _c = _a.component, Component = _c === void 0 ? 'ul' : _c, flush = _a.flush, layout = _a.layout;
|
|
11093
|
-
|
|
11094
|
-
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
|
|
11098
|
-
return (React$1.createElement(Component, { className: _className, ref: ref }, children));
|
|
10994
|
+
return (React$1.createElement(Component, { className: classNames$1('list-group', (_b = {
|
|
10995
|
+
'list-group-flush': flush
|
|
10996
|
+
},
|
|
10997
|
+
_b["list-group-".concat(layout)] = layout,
|
|
10998
|
+
_b), className), ref: ref }, children));
|
|
11099
10999
|
});
|
|
11100
11000
|
CListGroup.propTypes = {
|
|
11101
11001
|
children: propTypesExports.node,
|
|
@@ -11115,22 +11015,20 @@ CListGroup.displayName = 'CListGroup';
|
|
|
11115
11015
|
|
|
11116
11016
|
var CListGroupItem = React$1.forwardRef(function (_a, ref) {
|
|
11117
11017
|
var _b;
|
|
11118
|
-
var children = _a.children, active = _a.active, className = _a.className, disabled = _a.disabled,
|
|
11119
|
-
var _className = classNames$1('list-group-item', (_b = {},
|
|
11120
|
-
_b["list-group-item-".concat(color)] = color,
|
|
11121
|
-
_b['list-group-item-action'] = component === 'a' || component === 'button',
|
|
11122
|
-
_b.active = active,
|
|
11123
|
-
_b.disabled = disabled,
|
|
11124
|
-
_b), className);
|
|
11018
|
+
var children = _a.children, active = _a.active, className = _a.className, disabled = _a.disabled, color = _a.color, _c = _a.component, component = _c === void 0 ? 'li' : _c, rest = __rest$1(_a, ["children", "active", "className", "disabled", "color", "component"]);
|
|
11125
11019
|
var Component = component === 'a' || component === 'button' ? CLink : component;
|
|
11126
11020
|
rest = __assign$1(__assign$1(__assign$1(__assign$1({}, ((component === 'a' || component === 'button') && {
|
|
11127
11021
|
active: active,
|
|
11128
|
-
component: component,
|
|
11129
11022
|
disabled: disabled,
|
|
11130
|
-
|
|
11023
|
+
component: component,
|
|
11131
11024
|
ref: ref,
|
|
11132
11025
|
})), (active && { 'aria-current': true })), (disabled && { 'aria-disabled': true })), rest);
|
|
11133
|
-
return (React$1.createElement(Component, __assign$1({ className:
|
|
11026
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('list-group-item', (_b = {},
|
|
11027
|
+
_b["list-group-item-".concat(color)] = color,
|
|
11028
|
+
_b['list-group-item-action'] = component === 'a' || component === 'button',
|
|
11029
|
+
_b.active = active,
|
|
11030
|
+
_b.disabled = disabled,
|
|
11031
|
+
_b), className) }, rest), children));
|
|
11134
11032
|
});
|
|
11135
11033
|
CListGroupItem.propTypes = {
|
|
11136
11034
|
active: propTypesExports.bool,
|
|
@@ -11157,8 +11055,7 @@ var CLoadingButton = React$1.forwardRef(function (_a, ref) {
|
|
|
11157
11055
|
}, timeout);
|
|
11158
11056
|
}
|
|
11159
11057
|
};
|
|
11160
|
-
|
|
11161
|
-
return (React$1.createElement(CButton, __assign$1({ className: _className }, (disabledOnLoading && _loading && { disabled: true }), { onClick: handleOnClick }, rest, { ref: ref }),
|
|
11058
|
+
return (React$1.createElement(CButton, __assign$1({ className: classNames$1('btn-loading', _loading && 'is-loading', className) }, (disabledOnLoading && _loading && { disabled: true }), { onClick: handleOnClick }, rest, { ref: ref }),
|
|
11162
11059
|
React$1.createElement(CSpinner, { className: "btn-loading-spinner", size: "sm", variant: spinnerType }),
|
|
11163
11060
|
children));
|
|
11164
11061
|
});
|
|
@@ -11175,8 +11072,7 @@ CLoadingButton.displayName = 'CLoadingButton';
|
|
|
11175
11072
|
|
|
11176
11073
|
var CModalContent = React$1.forwardRef(function (_a, ref) {
|
|
11177
11074
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11178
|
-
|
|
11179
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11075
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-content', className) }, rest, { ref: ref }), children));
|
|
11180
11076
|
});
|
|
11181
11077
|
CModalContent.propTypes = {
|
|
11182
11078
|
children: propTypesExports.node,
|
|
@@ -11187,16 +11083,15 @@ CModalContent.displayName = 'CModalContent';
|
|
|
11187
11083
|
var CModalDialog = React$1.forwardRef(function (_a, ref) {
|
|
11188
11084
|
var _b;
|
|
11189
11085
|
var children = _a.children, alignment = _a.alignment, className = _a.className, fullscreen = _a.fullscreen, scrollable = _a.scrollable, size = _a.size, rest = __rest$1(_a, ["children", "alignment", "className", "fullscreen", "scrollable", "size"]);
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
|
|
11195
|
-
|
|
11196
|
-
|
|
11197
|
-
|
|
11198
|
-
|
|
11199
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11086
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-dialog', (_b = {
|
|
11087
|
+
'modal-dialog-centered': alignment === 'center'
|
|
11088
|
+
},
|
|
11089
|
+
_b[typeof fullscreen === 'boolean'
|
|
11090
|
+
? 'modal-fullscreen'
|
|
11091
|
+
: "modal-fullscreen-".concat(fullscreen, "-down")] = fullscreen,
|
|
11092
|
+
_b['modal-dialog-scrollable'] = scrollable,
|
|
11093
|
+
_b["modal-".concat(size)] = size,
|
|
11094
|
+
_b), className) }, rest, { ref: ref }), children));
|
|
11200
11095
|
});
|
|
11201
11096
|
CModalDialog.propTypes = {
|
|
11202
11097
|
alignment: propTypesExports.oneOf(['top', 'center']),
|
|
@@ -11219,19 +11114,19 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
11219
11114
|
var forkedRef = useForkedRef(ref, modalRef);
|
|
11220
11115
|
var _h = React$1.useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
11221
11116
|
var _j = React$1.useState(false), staticBackdrop = _j[0], setStaticBackdrop = _j[1];
|
|
11222
|
-
React$1.useEffect(function () {
|
|
11223
|
-
setVisible(visible);
|
|
11224
|
-
}, [visible]);
|
|
11225
11117
|
var contextValues = {
|
|
11226
11118
|
visible: _visible,
|
|
11227
11119
|
setVisible: setVisible,
|
|
11228
11120
|
};
|
|
11229
11121
|
React$1.useEffect(function () {
|
|
11230
|
-
|
|
11231
|
-
|
|
11122
|
+
setVisible(visible);
|
|
11123
|
+
}, [visible]);
|
|
11124
|
+
React$1.useEffect(function () {
|
|
11125
|
+
document.addEventListener('click', handleClickOutside);
|
|
11126
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
11232
11127
|
return function () {
|
|
11233
|
-
|
|
11234
|
-
|
|
11128
|
+
document.removeEventListener('click', handleClickOutside);
|
|
11129
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
11235
11130
|
};
|
|
11236
11131
|
}, [_visible]);
|
|
11237
11132
|
var handleDismiss = function () {
|
|
@@ -11244,19 +11139,6 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
11244
11139
|
onClosePrevented && onClosePrevented();
|
|
11245
11140
|
setTimeout(function () { return setStaticBackdrop(false); }, duration);
|
|
11246
11141
|
}, [staticBackdrop]);
|
|
11247
|
-
var getTransitionClass = function (state) {
|
|
11248
|
-
return state === 'entering'
|
|
11249
|
-
? 'd-block'
|
|
11250
|
-
: state === 'entered'
|
|
11251
|
-
? 'show d-block'
|
|
11252
|
-
: state === 'exiting'
|
|
11253
|
-
? 'd-block'
|
|
11254
|
-
: '';
|
|
11255
|
-
};
|
|
11256
|
-
var _className = classNames$1('modal', {
|
|
11257
|
-
'modal-static': staticBackdrop,
|
|
11258
|
-
fade: transition,
|
|
11259
|
-
}, className);
|
|
11260
11142
|
// Set focus to modal after open
|
|
11261
11143
|
React$1.useLayoutEffect(function () {
|
|
11262
11144
|
if (_visible) {
|
|
@@ -11268,7 +11150,7 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
11268
11150
|
setTimeout(function () {
|
|
11269
11151
|
var _a;
|
|
11270
11152
|
(_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
11271
|
-
},
|
|
11153
|
+
}, transition ? duration : 0);
|
|
11272
11154
|
}
|
|
11273
11155
|
else {
|
|
11274
11156
|
document.body.classList.remove('modal-open');
|
|
@@ -11291,27 +11173,23 @@ var CModal = React$1.forwardRef(function (_a, ref) {
|
|
|
11291
11173
|
handleDismiss();
|
|
11292
11174
|
}
|
|
11293
11175
|
};
|
|
11294
|
-
var handleKeyDown =
|
|
11176
|
+
var handleKeyDown = function (event) {
|
|
11295
11177
|
if (event.key === 'Escape' && keyboard) {
|
|
11296
|
-
|
|
11178
|
+
handleDismiss();
|
|
11297
11179
|
}
|
|
11298
|
-
}, [modalRef, handleDismiss]);
|
|
11299
|
-
var modal = function (ref, transitionClass) {
|
|
11300
|
-
return (React$1.createElement(CModalContext.Provider, { value: contextValues },
|
|
11301
|
-
React$1.createElement("div", { className: classNames$1(_className, transitionClass), tabIndex: -1, role: "dialog", ref: ref },
|
|
11302
|
-
React$1.createElement(CModalDialog, { alignment: alignment, fullscreen: fullscreen, scrollable: scrollable, size: size },
|
|
11303
|
-
React$1.createElement(CModalContent, __assign$1({}, rest, { ref: modalContentRef }), children)))));
|
|
11304
11180
|
};
|
|
11305
11181
|
return (React$1.createElement(React$1.Fragment, null,
|
|
11306
|
-
React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: modalRef, onEnter: onShow, onExit: onClose, unmountOnExit: unmountOnClose, timeout:
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11182
|
+
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 },
|
|
11183
|
+
React$1.createElement(CModalContext.Provider, { value: contextValues },
|
|
11184
|
+
React$1.createElement("div", { className: classNames$1('modal', {
|
|
11185
|
+
'modal-static': staticBackdrop,
|
|
11186
|
+
fade: transition,
|
|
11187
|
+
show: state === 'entered',
|
|
11188
|
+
}, className), tabIndex: -1, role: "dialog", style: __assign$1({}, (state !== 'exited' && { display: 'block' })), ref: forkedRef },
|
|
11189
|
+
React$1.createElement(CModalDialog, { alignment: alignment, fullscreen: fullscreen, scrollable: scrollable, size: size },
|
|
11190
|
+
React$1.createElement(CModalContent, __assign$1({}, rest, { ref: modalContentRef }), children)))))); }),
|
|
11191
|
+
backdrop && (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
11192
|
+
React$1.createElement(CBackdrop, { visible: _visible })))));
|
|
11315
11193
|
});
|
|
11316
11194
|
CModal.propTypes = {
|
|
11317
11195
|
alignment: propTypesExports.oneOf(['top', 'center']),
|
|
@@ -11338,8 +11216,7 @@ CModal.displayName = 'CModal';
|
|
|
11338
11216
|
|
|
11339
11217
|
var CModalBody = React$1.forwardRef(function (_a, ref) {
|
|
11340
11218
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11341
|
-
|
|
11342
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11219
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-body', className) }, rest, { ref: ref }), children));
|
|
11343
11220
|
});
|
|
11344
11221
|
CModalBody.propTypes = {
|
|
11345
11222
|
children: propTypesExports.node,
|
|
@@ -11349,8 +11226,7 @@ CModalBody.displayName = 'CModalBody';
|
|
|
11349
11226
|
|
|
11350
11227
|
var CModalFooter = React$1.forwardRef(function (_a, ref) {
|
|
11351
11228
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11352
|
-
|
|
11353
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11229
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-footer', className) }, rest, { ref: ref }), children));
|
|
11354
11230
|
});
|
|
11355
11231
|
CModalFooter.propTypes = {
|
|
11356
11232
|
children: propTypesExports.node,
|
|
@@ -11361,8 +11237,7 @@ CModalFooter.displayName = 'CModalFooter';
|
|
|
11361
11237
|
var CModalHeader = React$1.forwardRef(function (_a, ref) {
|
|
11362
11238
|
var children = _a.children, className = _a.className, _b = _a.closeButton, closeButton = _b === void 0 ? true : _b, rest = __rest$1(_a, ["children", "className", "closeButton"]);
|
|
11363
11239
|
var setVisible = React$1.useContext(CModalContext).setVisible;
|
|
11364
|
-
|
|
11365
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
11240
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('modal-header', className) }, rest, { ref: ref }),
|
|
11366
11241
|
children,
|
|
11367
11242
|
closeButton && React$1.createElement(CCloseButton, { onClick: function () { return setVisible(false); } })));
|
|
11368
11243
|
});
|
|
@@ -11375,8 +11250,7 @@ CModalHeader.displayName = 'CModalHeader';
|
|
|
11375
11250
|
|
|
11376
11251
|
var CModalTitle = React$1.forwardRef(function (_a, ref) {
|
|
11377
11252
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
11378
|
-
|
|
11379
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11253
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('modal-title', className) }, rest, { ref: ref }), children));
|
|
11380
11254
|
});
|
|
11381
11255
|
CModalTitle.propTypes = {
|
|
11382
11256
|
children: propTypesExports.node,
|
|
@@ -11385,12 +11259,6 @@ CModalTitle.propTypes = {
|
|
|
11385
11259
|
};
|
|
11386
11260
|
CModalTitle.displayName = 'CModalTitle';
|
|
11387
11261
|
|
|
11388
|
-
// TODO: check if component property is necessary.
|
|
11389
|
-
var CMultiSelectCleaner = React$1.forwardRef(function (props, ref) {
|
|
11390
|
-
return (React$1.createElement("button", __assign$1({ type: "button", className: "form-multi-select-selection-cleaner" }, props, { ref: ref })));
|
|
11391
|
-
});
|
|
11392
|
-
CMultiSelectCleaner.displayName = 'CMultiSelectCleaner';
|
|
11393
|
-
|
|
11394
11262
|
var CMultiSelectNativeSelect = React$1.forwardRef(function (_a, ref) {
|
|
11395
11263
|
var multiple = _a.multiple, options = _a.options, rest = __rest$1(_a, ["multiple", "options"]);
|
|
11396
11264
|
var createNativeOptions = function (options) {
|
|
@@ -11408,88 +11276,145 @@ CMultiSelectNativeSelect.propTypes = {
|
|
|
11408
11276
|
CMultiSelectNativeSelect.displayName = 'CMultiSelectNativeSelect';
|
|
11409
11277
|
|
|
11410
11278
|
var CVirtualScroller = React$1.forwardRef(function (_a, ref) {
|
|
11411
|
-
var children = _a.children, className = _a.className,
|
|
11279
|
+
var children = _a.children, className = _a.className, visibleItems = _a.visibleItems, onScroll = _a.onScroll;
|
|
11412
11280
|
var virtualScrollRef = React$1.useRef(null);
|
|
11413
11281
|
var virtualScrollContentRef = React$1.useRef(null);
|
|
11414
11282
|
var forkedRef = useForkedRef(ref, virtualScrollRef);
|
|
11415
|
-
var
|
|
11416
|
-
var
|
|
11417
|
-
var
|
|
11283
|
+
var _b = React$1.useState(Math.floor(visibleItems / 2)), buffer = _b[0], setBuffer = _b[1];
|
|
11284
|
+
var _c = React$1.useState(1), currentItemIndex = _c[0], setCurrentItemIndex = _c[1];
|
|
11285
|
+
var _d = React$1.useState(0), itemHeight = _d[0], setItemHeight = _d[1];
|
|
11286
|
+
var _e = React$1.useState(React$1.Children.count(children)), itemsNumber = _e[0], setItemsNumber = _e[1];
|
|
11418
11287
|
var _f = React$1.useState(0), viewportPadding = _f[0], setViewportPadding = _f[1];
|
|
11419
|
-
var _g = React$1.useState(visibleItems *
|
|
11420
|
-
var _h = React$1.useState(
|
|
11421
|
-
var _j = React$1.useState(0), topPadding = _j[0], setTopPadding = _j[1];
|
|
11422
|
-
var _k = React$1.useState(0), bottomPadding = _k[0], setBottomPadding = _k[1];
|
|
11423
|
-
var _l = React$1.useState(0), contentHeight = _l[0], setContentHeight = _l[1];
|
|
11288
|
+
var _g = React$1.useState(visibleItems * itemHeight + 2 * viewportPadding), viewportHeight = _g[0], setViewportHeight = _g[1];
|
|
11289
|
+
var _h = React$1.useState(itemsNumber * itemHeight + 2 * viewportPadding), maxHeight = _h[0], setMaxHeight = _h[1];
|
|
11424
11290
|
React$1.useEffect(function () {
|
|
11425
11291
|
virtualScrollRef.current && virtualScrollRef.current.scrollTop;
|
|
11426
11292
|
virtualScrollRef.current &&
|
|
11427
|
-
setViewportPadding(parseFloat(getComputedStyle(virtualScrollRef.current).paddingTop));
|
|
11293
|
+
setViewportPadding(Number.parseFloat(getComputedStyle(virtualScrollRef.current).paddingTop));
|
|
11428
11294
|
});
|
|
11429
11295
|
React$1.useEffect(function () {
|
|
11430
11296
|
setItemsNumber(itemsNumber || React$1.Children.count(children));
|
|
11431
11297
|
}, [children, itemsNumber]);
|
|
11432
11298
|
React$1.useEffect(function () {
|
|
11433
|
-
setViewportHeight(visibleItems *
|
|
11434
|
-
}, [viewportPadding, visibleItems,
|
|
11299
|
+
setViewportHeight(visibleItems * itemHeight + 2 * viewportPadding);
|
|
11300
|
+
}, [viewportPadding, visibleItems, itemHeight]);
|
|
11435
11301
|
React$1.useEffect(function () {
|
|
11436
|
-
setMaxHeight(
|
|
11302
|
+
setMaxHeight(itemsNumber * itemHeight + 2 * viewportPadding);
|
|
11437
11303
|
virtualScrollRef.current && virtualScrollRef.current.scrollTop;
|
|
11438
|
-
|
|
11439
|
-
|
|
11304
|
+
}, [itemsNumber, itemHeight]);
|
|
11305
|
+
React$1.useEffect(function () {
|
|
11306
|
+
setBuffer(Math.floor(visibleItems / 2));
|
|
11307
|
+
}, [visibleItems]);
|
|
11440
11308
|
var handleScroll = function (scrollTop) {
|
|
11441
|
-
var _currentItemIndex = Math.
|
|
11442
|
-
Math.max(Math.floor(scrollTop / _itemHeight), 0) -
|
|
11443
|
-
Math.min(Math.floor(visibleItems / 2) - (Math.floor(visibleItems / 2) - currentItemIndex) - 1, Math.floor(visibleItems / 2)), 1), _itemsNumber - visibleItems + 1);
|
|
11444
|
-
virtualScrollContentRef.current &&
|
|
11445
|
-
setContentHeight(virtualScrollContentRef.current.offsetHeight);
|
|
11446
|
-
setTopPadding(Math.max(_currentItemIndex * _itemHeight - _itemHeight, 0));
|
|
11447
|
-
setBottomPadding(Math.max(maxHeight - topPadding - contentHeight, 0));
|
|
11309
|
+
var _currentItemIndex = itemHeight && Math.max(Math.ceil(scrollTop / itemHeight), 1);
|
|
11448
11310
|
setCurrentItemIndex(_currentItemIndex);
|
|
11449
11311
|
onScroll && onScroll(_currentItemIndex);
|
|
11450
11312
|
};
|
|
11451
|
-
|
|
11452
|
-
return (React$1.createElement("div", { className: _className, onScroll: function (event) {
|
|
11313
|
+
return (React$1.createElement("div", { className: classNames$1('virtual-scroller', className), onScroll: function (event) {
|
|
11453
11314
|
return handleScroll(event.target.scrollTop);
|
|
11454
11315
|
}, ref: forkedRef, style: {
|
|
11455
11316
|
height: maxHeight > viewportHeight ? viewportHeight : maxHeight,
|
|
11456
11317
|
overflowY: 'auto',
|
|
11457
11318
|
} },
|
|
11458
|
-
React$1.createElement("div", {
|
|
11459
|
-
|
|
11460
|
-
|
|
11319
|
+
React$1.createElement("div", { className: "virtual-scroller-content", style: {
|
|
11320
|
+
height: maxHeight,
|
|
11321
|
+
}, ref: virtualScrollContentRef }, React$1.Children.map(children, function (child, index) {
|
|
11461
11322
|
if (React$1.isValidElement(child) &&
|
|
11462
|
-
|
|
11463
|
-
|
|
11323
|
+
index + 1 > Math.max(currentItemIndex - buffer, 0) &&
|
|
11324
|
+
index + 1 <= currentItemIndex + visibleItems + buffer) {
|
|
11464
11325
|
return React$1.cloneElement(child, {
|
|
11465
11326
|
className: classNames$1(child.props.className, {
|
|
11466
|
-
'virtual-scroller-item-preload':
|
|
11327
|
+
'virtual-scroller-item-preload': index + 1 > currentItemIndex + visibleItems || index + 1 < currentItemIndex,
|
|
11467
11328
|
}),
|
|
11468
11329
|
key: index,
|
|
11330
|
+
style: __assign$1({}, (currentItemIndex > buffer && {
|
|
11331
|
+
transform: "translateY(".concat((currentItemIndex - buffer) * itemHeight, "px)"),
|
|
11332
|
+
})),
|
|
11469
11333
|
ref: function (node) {
|
|
11470
|
-
return
|
|
11471
|
-
node &&
|
|
11334
|
+
return node &&
|
|
11472
11335
|
node.offsetHeight &&
|
|
11473
11336
|
setItemHeight(node.offsetHeight +
|
|
11474
|
-
parseFloat(getComputedStyle(node).marginTop) +
|
|
11475
|
-
parseFloat(getComputedStyle(node).marginBottom));
|
|
11337
|
+
Number.parseFloat(getComputedStyle(node).marginTop) +
|
|
11338
|
+
Number.parseFloat(getComputedStyle(node).marginBottom));
|
|
11476
11339
|
},
|
|
11477
11340
|
});
|
|
11478
11341
|
}
|
|
11479
11342
|
return;
|
|
11480
|
-
}))
|
|
11481
|
-
React$1.createElement("div", { style: {
|
|
11482
|
-
height: bottomPadding,
|
|
11483
|
-
} })));
|
|
11343
|
+
}))));
|
|
11484
11344
|
});
|
|
11485
11345
|
CVirtualScroller.propTypes = {
|
|
11486
|
-
itemHeight: propTypesExports.number,
|
|
11487
|
-
itemsNumber: propTypesExports.number,
|
|
11488
11346
|
onScroll: propTypesExports.func,
|
|
11489
11347
|
visibleItems: propTypesExports.number.isRequired,
|
|
11490
11348
|
};
|
|
11491
11349
|
CVirtualScroller.displayName = 'CVirtualScroller';
|
|
11492
11350
|
|
|
11351
|
+
var filterOptionsList = function (search, _options) {
|
|
11352
|
+
return search.length > 0
|
|
11353
|
+
? _options &&
|
|
11354
|
+
_options.reduce(function (acc, val) {
|
|
11355
|
+
var options = val.options &&
|
|
11356
|
+
val.options.filter(function (element) {
|
|
11357
|
+
return element.text && element.text.toLowerCase().includes(search.toLowerCase());
|
|
11358
|
+
});
|
|
11359
|
+
if ((val.text && val.text.toLowerCase().includes(search.toLowerCase())) ||
|
|
11360
|
+
(options && options.length > 0)) {
|
|
11361
|
+
acc.push(Object.assign({}, val, options && options.length > 0 && { options: options }));
|
|
11362
|
+
}
|
|
11363
|
+
return acc;
|
|
11364
|
+
}, [])
|
|
11365
|
+
: _options;
|
|
11366
|
+
};
|
|
11367
|
+
var flattenArray = function (options) {
|
|
11368
|
+
return options.reduce(function (acc, val) {
|
|
11369
|
+
return acc.concat(Array.isArray(val.options) ? flattenArray(val.options) : val);
|
|
11370
|
+
}, []);
|
|
11371
|
+
};
|
|
11372
|
+
var getNextSibling = function (elem, selector) {
|
|
11373
|
+
// Get the next sibling element
|
|
11374
|
+
var sibling = elem.nextElementSibling;
|
|
11375
|
+
// If there's no selector, return the first sibling
|
|
11376
|
+
if (!selector)
|
|
11377
|
+
return sibling;
|
|
11378
|
+
// If the sibling matches our selector, use it
|
|
11379
|
+
// If not, jump to the next sibling and continue the loop
|
|
11380
|
+
while (sibling) {
|
|
11381
|
+
if (sibling.matches(selector))
|
|
11382
|
+
return sibling;
|
|
11383
|
+
sibling = sibling.nextElementSibling;
|
|
11384
|
+
}
|
|
11385
|
+
return;
|
|
11386
|
+
};
|
|
11387
|
+
var getPreviousSibling = function (elem, selector) {
|
|
11388
|
+
// Get the next sibling element
|
|
11389
|
+
var sibling = elem.previousElementSibling;
|
|
11390
|
+
// If there's no selector, return the first sibling
|
|
11391
|
+
if (!selector)
|
|
11392
|
+
return sibling;
|
|
11393
|
+
// If the sibling matches our selector, use it
|
|
11394
|
+
// If not, jump to the next sibling and continue the loop
|
|
11395
|
+
while (sibling) {
|
|
11396
|
+
if (sibling.matches(selector))
|
|
11397
|
+
return sibling;
|
|
11398
|
+
sibling = sibling.previousElementSibling;
|
|
11399
|
+
}
|
|
11400
|
+
return;
|
|
11401
|
+
};
|
|
11402
|
+
var selectOptions = function (options, selected, deselected) {
|
|
11403
|
+
var _selected = __spreadArray(__spreadArray([], selected, true), options, true);
|
|
11404
|
+
if (deselected) {
|
|
11405
|
+
_selected = _selected.filter(function (selectedOption) {
|
|
11406
|
+
return !deselected.some(function (deselectedOption) { return deselectedOption.value === selectedOption.value; });
|
|
11407
|
+
});
|
|
11408
|
+
}
|
|
11409
|
+
var deduplicated = _selected.reduce(function (unique, option) {
|
|
11410
|
+
if (!unique.some(function (obj) { return obj.value === option.value; })) {
|
|
11411
|
+
unique.push(__assign$1({ value: option.value, text: option.text }, (option.disabled && { disabled: option.disabled })));
|
|
11412
|
+
}
|
|
11413
|
+
return unique;
|
|
11414
|
+
}, []);
|
|
11415
|
+
return deduplicated;
|
|
11416
|
+
};
|
|
11417
|
+
|
|
11493
11418
|
var CMultiSelectOptions = React$1.forwardRef(function (_a, ref) {
|
|
11494
11419
|
var handleOptionOnClick = _a.handleOptionOnClick, options = _a.options, optionsMaxHeight = _a.optionsMaxHeight, optionsStyle = _a.optionsStyle, searchNoResultsLabel = _a.searchNoResultsLabel, selected = _a.selected, virtualScroller = _a.virtualScroller, _b = _a.visibleItems, visibleItems = _b === void 0 ? 10 : _b;
|
|
11495
11420
|
var handleKeyDown = function (event, option) {
|
|
@@ -11572,11 +11497,6 @@ CMultiSelectSelection.propTypes = {
|
|
|
11572
11497
|
};
|
|
11573
11498
|
CMultiSelectSelection.displayName = 'CMultiSelectSelection';
|
|
11574
11499
|
|
|
11575
|
-
var flattenArray = function (options) {
|
|
11576
|
-
return options.reduce(function (acc, val) {
|
|
11577
|
-
return acc.concat(Array.isArray(val.options) ? flattenArray(val.options) : val);
|
|
11578
|
-
}, []);
|
|
11579
|
-
};
|
|
11580
11500
|
var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
11581
11501
|
var _b;
|
|
11582
11502
|
var className = _a.className, _c = _a.cleaner, cleaner = _c === void 0 ? true : _c, disabled = _a.disabled, feedback = _a.feedback, feedbackInvalid = _a.feedbackInvalid, feedbackValid = _a.feedbackValid, _d = _a.multiple, multiple = _d === void 0 ? true : _d, id = _a.id, invalid = _a.invalid, label = _a.label, onChange = _a.onChange, onFilterChange = _a.onFilterChange, options = _a.options, _e = _a.optionsMaxHeight, optionsMaxHeight = _e === void 0 ? 'auto' : _e, _f = _a.optionsStyle, optionsStyle = _f === void 0 ? 'checkbox' : _f, _g = _a.placeholder, placeholder = _g === void 0 ? 'Select...' : _g, _h = _a.search, search = _h === void 0 ? true : _h, _j = _a.searchNoResultsLabel, searchNoResultsLabel = _j === void 0 ? 'No results found' : _j, _k = _a.selectAll, selectAll = _k === void 0 ? true : _k, _l = _a.selectAllLabel, selectAllLabel = _l === void 0 ? 'Select all options' : _l, _m = _a.selectionType, selectionType = _m === void 0 ? 'tags' : _m, _o = _a.selectionTypeCounterText, selectionTypeCounterText = _o === void 0 ? 'item(s) selected' : _o, size = _a.size, text = _a.text, tooltipFeedback = _a.tooltipFeedback, valid = _a.valid, virtualScroller = _a.virtualScroller, _p = _a.visible, visible = _p === void 0 ? false : _p, _q = _a.visibleItems, visibleItems = _q === void 0 ? 10 : _q, rest = __rest$1(_a, ["className", "cleaner", "disabled", "feedback", "feedbackInvalid", "feedbackValid", "multiple", "id", "invalid", "label", "onChange", "onFilterChange", "options", "optionsMaxHeight", "optionsStyle", "placeholder", "search", "searchNoResultsLabel", "selectAll", "selectAllLabel", "selectionType", "selectionTypeCounterText", "size", "text", "tooltipFeedback", "valid", "virtualScroller", "visible", "visibleItems"]);
|
|
@@ -11587,21 +11507,6 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11587
11507
|
var _s = React$1.useState(''), _search = _s[0], setSearch = _s[1];
|
|
11588
11508
|
var _t = React$1.useState(visible), _visible = _t[0], setVisible = _t[1];
|
|
11589
11509
|
var _u = React$1.useState([]), selected = _u[0], setSelected = _u[1];
|
|
11590
|
-
var selectOptions = function (options, deselected) {
|
|
11591
|
-
var _selected = __spreadArray(__spreadArray([], selected, true), options, true);
|
|
11592
|
-
if (deselected) {
|
|
11593
|
-
_selected = _selected.filter(function (selectedOption) {
|
|
11594
|
-
return !deselected.some(function (deselectedOption) { return deselectedOption.value === selectedOption.value; });
|
|
11595
|
-
});
|
|
11596
|
-
}
|
|
11597
|
-
var deduplicated = _selected.reduce(function (unique, option) {
|
|
11598
|
-
if (!unique.some(function (obj) { return obj.value === option.value; })) {
|
|
11599
|
-
unique.push(__assign$1({ value: option.value, text: option.text }, (option.disabled && { disabled: option.disabled })));
|
|
11600
|
-
}
|
|
11601
|
-
return unique;
|
|
11602
|
-
}, []);
|
|
11603
|
-
setSelected(deduplicated);
|
|
11604
|
-
};
|
|
11605
11510
|
React$1.useMemo(function () {
|
|
11606
11511
|
setOptions(options);
|
|
11607
11512
|
var _selected = options &&
|
|
@@ -11618,42 +11523,16 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11618
11523
|
}
|
|
11619
11524
|
return;
|
|
11620
11525
|
});
|
|
11621
|
-
_selected && selectOptions(_selected, deselected);
|
|
11526
|
+
_selected && setSelected(selectOptions(_selected, selected, deselected));
|
|
11622
11527
|
}, [JSON.stringify(options)]);
|
|
11623
11528
|
React$1.useEffect(function () {
|
|
11624
11529
|
!isInitialMount.current &&
|
|
11625
11530
|
nativeSelectRef.current &&
|
|
11626
11531
|
nativeSelectRef.current.dispatchEvent(new Event('change', { bubbles: true }));
|
|
11627
11532
|
}, [JSON.stringify(selected)]);
|
|
11628
|
-
var _className = classNames$1('form-multi-select', (_b = {
|
|
11629
|
-
'form-multi-select-with-cleaner': cleaner
|
|
11630
|
-
},
|
|
11631
|
-
_b["form-multi-select-".concat(size)] = size,
|
|
11632
|
-
_b.show = _visible,
|
|
11633
|
-
_b['form-multi-select-selection-tags'] = multiple && selectionType === 'tags',
|
|
11634
|
-
_b.disabled = disabled,
|
|
11635
|
-
_b['is-invalid'] = invalid,
|
|
11636
|
-
_b['is-valid'] = valid,
|
|
11637
|
-
_b), className);
|
|
11638
11533
|
React$1.useEffect(function () {
|
|
11639
11534
|
isInitialMount.current = false;
|
|
11640
11535
|
}, []);
|
|
11641
|
-
var filterOptionsList = function (search, options) {
|
|
11642
|
-
return search.length
|
|
11643
|
-
? options &&
|
|
11644
|
-
options.reduce(function (acc, val) {
|
|
11645
|
-
var options = val.options &&
|
|
11646
|
-
val.options.filter(function (element) {
|
|
11647
|
-
return element.text && element.text.toLowerCase().includes(search.toLowerCase());
|
|
11648
|
-
});
|
|
11649
|
-
if ((val.text && val.text.toLowerCase().includes(search.toLowerCase())) ||
|
|
11650
|
-
(options && options.length)) {
|
|
11651
|
-
acc.push(Object.assign({}, val, options && options.length && { options: options }));
|
|
11652
|
-
}
|
|
11653
|
-
return acc;
|
|
11654
|
-
}, [])
|
|
11655
|
-
: _options;
|
|
11656
|
-
};
|
|
11657
11536
|
var handleSearchChange = function (event) {
|
|
11658
11537
|
var target = event.target;
|
|
11659
11538
|
if (search !== 'external') {
|
|
@@ -11662,8 +11541,9 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11662
11541
|
onFilterChange && onFilterChange(target.value);
|
|
11663
11542
|
};
|
|
11664
11543
|
var handleSearchKeyDown = function (event) {
|
|
11665
|
-
if (_search.length)
|
|
11544
|
+
if (_search.length > 0) {
|
|
11666
11545
|
return;
|
|
11546
|
+
}
|
|
11667
11547
|
if (event.key === 'Backspace' || event.key === 'Delete') {
|
|
11668
11548
|
var last_1 = selected.filter(function (option) { return !option.disabled; }).pop();
|
|
11669
11549
|
last_1 && setSelected(selected.filter(function (option) { return option.value !== last_1.value; }));
|
|
@@ -11687,7 +11567,7 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11687
11567
|
}
|
|
11688
11568
|
};
|
|
11689
11569
|
var handleSelectAll = function () {
|
|
11690
|
-
selectOptions(flattenArray(options).filter(function (option) { return !option.disabled; }));
|
|
11570
|
+
setSelected(selectOptions(flattenArray(options).filter(function (option) { return !option.disabled; }), selected));
|
|
11691
11571
|
};
|
|
11692
11572
|
var handleDeselectAll = function () {
|
|
11693
11573
|
setSelected(selected.filter(function (option) { return option.disabled; }));
|
|
@@ -11696,18 +11576,27 @@ var CMultiSelect = React$1.forwardRef(function (_a, ref) {
|
|
|
11696
11576
|
React$1.createElement(CMultiSelectNativeSelect, { multiple: multiple, options: selected, value: multiple
|
|
11697
11577
|
? selected.map(function (option) { return option.value.toString(); })
|
|
11698
11578
|
: selected.map(function (option) { return option.value; })[0], onChange: function () { return onChange && onChange(selected); }, ref: nativeSelectRef }),
|
|
11699
|
-
React$1.createElement(CPicker, { className:
|
|
11579
|
+
React$1.createElement(CPicker, { className: classNames$1('form-multi-select', (_b = {
|
|
11580
|
+
'form-multi-select-with-cleaner': cleaner
|
|
11581
|
+
},
|
|
11582
|
+
_b["form-multi-select-".concat(size)] = size,
|
|
11583
|
+
_b.show = _visible,
|
|
11584
|
+
_b['form-multi-select-selection-tags'] = multiple && selectionType === 'tags',
|
|
11585
|
+
_b.disabled = disabled,
|
|
11586
|
+
_b['is-invalid'] = invalid,
|
|
11587
|
+
_b['is-valid'] = valid,
|
|
11588
|
+
_b), className), disabled: disabled, id: id, onHide: function () { return setVisible(false); }, onShow: function () {
|
|
11700
11589
|
searchRef.current && searchRef.current.focus();
|
|
11701
11590
|
setVisible(true);
|
|
11702
11591
|
}, toggler: React$1.createElement("div", null,
|
|
11703
11592
|
React$1.createElement(CMultiSelectSelection, { multiple: multiple, onRemove: function (option) { return !disabled && handleOptionOnClick(option); }, search: search, selected: selected, selectionType: selectionType, selectionTypeCounterText: selectionTypeCounterText }),
|
|
11704
|
-
multiple && cleaner && selected.length > 0 && (React$1.createElement(
|
|
11705
|
-
search && (React$1.createElement("input", __assign$1({ type: "text", className: "form-multi-select-search", disabled: disabled, onChange: function (event) { return handleSearchChange(event); }, onKeyDown: function (event) { return handleSearchKeyDown(event); } }, (selected.length === 0 && { placeholder: placeholder }), (selected.length &&
|
|
11593
|
+
multiple && cleaner && selected.length > 0 && (React$1.createElement("button", { type: "button", className: "form-multi-select-selection-cleaner", onClick: function () { return handleDeselectAll(); } })),
|
|
11594
|
+
search && (React$1.createElement("input", __assign$1({ type: "text", className: "form-multi-select-search", disabled: disabled, onChange: function (event) { return handleSearchChange(event); }, onKeyDown: function (event) { return handleSearchKeyDown(event); } }, (selected.length === 0 && { placeholder: placeholder }), (selected.length > 0 &&
|
|
11706
11595
|
selectionType === 'counter' && {
|
|
11707
11596
|
placeholder: "".concat(selected.length, " ").concat(selectionTypeCounterText),
|
|
11708
|
-
}), (selected.length &&
|
|
11597
|
+
}), (selected.length > 0 &&
|
|
11709
11598
|
!multiple && { placeholder: selected.map(function (option) { return option.text; })[0] }), (multiple &&
|
|
11710
|
-
selected.length &&
|
|
11599
|
+
selected.length > 0 &&
|
|
11711
11600
|
selectionType !== 'counter' && { size: _search.length + 2 }), { ref: searchRef })))), visible: _visible, ref: ref },
|
|
11712
11601
|
React$1.createElement(React$1.Fragment, null,
|
|
11713
11602
|
multiple && selectAll && (React$1.createElement("button", { type: "button", className: "form-multi-select-all", onClick: function () { return handleSelectAll(); } }, selectAllLabel)),
|
|
@@ -11719,11 +11608,10 @@ CMultiSelect.displayName = 'CMultiSelect';
|
|
|
11719
11608
|
var CNav = React$1.forwardRef(function (_a, ref) {
|
|
11720
11609
|
var _b;
|
|
11721
11610
|
var children = _a.children, className = _a.className, _c = _a.component, Component = _c === void 0 ? 'ul' : _c, layout = _a.layout, variant = _a.variant, rest = __rest$1(_a, ["children", "className", "component", "layout", "variant"]);
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
return (React$1.createElement(Component, __assign$1({ className: _className, role: "navigation" }, rest, { ref: ref }), children));
|
|
11611
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('nav', (_b = {},
|
|
11612
|
+
_b["nav-".concat(layout)] = layout,
|
|
11613
|
+
_b["nav-".concat(variant)] = variant,
|
|
11614
|
+
_b), className), role: "navigation" }, rest, { ref: ref }), children));
|
|
11727
11615
|
});
|
|
11728
11616
|
CNav.propTypes = {
|
|
11729
11617
|
children: propTypesExports.node,
|
|
@@ -11736,8 +11624,7 @@ CNav.displayName = 'CNav';
|
|
|
11736
11624
|
|
|
11737
11625
|
var CNavGroupItems = React$1.forwardRef(function (_a, ref) {
|
|
11738
11626
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11739
|
-
|
|
11740
|
-
return (React$1.createElement("ul", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11627
|
+
return (React$1.createElement("ul", __assign$1({ className: classNames$1('nav-group-items', className) }, rest, { ref: ref }), children));
|
|
11741
11628
|
});
|
|
11742
11629
|
CNavGroupItems.propTypes = {
|
|
11743
11630
|
children: propTypesExports.node,
|
|
@@ -11753,8 +11640,7 @@ var CSidebarNav = React$1.forwardRef(function (_a, ref) {
|
|
|
11753
11640
|
visibleGroup: visibleGroup,
|
|
11754
11641
|
setVisibleGroup: setVisibleGroup,
|
|
11755
11642
|
};
|
|
11756
|
-
|
|
11757
|
-
return (React$1.createElement("ul", __assign$1({ className: classes, ref: ref }, rest),
|
|
11643
|
+
return (React$1.createElement("ul", __assign$1({ className: classNames$1('sidebar-nav', className), ref: ref }, rest),
|
|
11758
11644
|
React$1.createElement(CNavContext.Provider, { value: CNavContextValues }, React$1.Children.map(children, function (child, index) {
|
|
11759
11645
|
if (React$1.isValidElement(child)) {
|
|
11760
11646
|
return React$1.cloneElement(child, {
|
|
@@ -11813,8 +11699,7 @@ var CNavGroup = React$1.forwardRef(function (_a, ref) {
|
|
|
11813
11699
|
exiting: { display: 'block', height: height },
|
|
11814
11700
|
exited: { height: height },
|
|
11815
11701
|
};
|
|
11816
|
-
|
|
11817
|
-
return (React$1.createElement("li", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
11702
|
+
return (React$1.createElement("li", __assign$1({ className: classNames$1('nav-group', { show: _visible }, className) }, rest, { ref: ref }),
|
|
11818
11703
|
toggler && (React$1.createElement("a", { className: "nav-link nav-group-toggle", onClick: function (event) { return handleTogglerOnCLick(event); } }, toggler)),
|
|
11819
11704
|
React$1.createElement(Transition$1, { in: _visible, nodeRef: navItemsRef, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited, timeout: 300 }, function (state) { return (React$1.createElement("ul", { className: classNames$1('nav-group-items', {
|
|
11820
11705
|
compact: compact,
|
|
@@ -11843,13 +11728,12 @@ var CNavLink = React$1.forwardRef(function (_a, ref) {
|
|
|
11843
11728
|
var navLinkRef = React$1.useRef(null);
|
|
11844
11729
|
var forkedRef = useForkedRef(ref, navLinkRef);
|
|
11845
11730
|
var setVisibleGroup = React$1.useContext(CNavContext).setVisibleGroup;
|
|
11846
|
-
var _className = classNames$1('nav-link', className);
|
|
11847
11731
|
React$1.useEffect(function () {
|
|
11848
11732
|
var _a;
|
|
11849
11733
|
rest.active = (_a = navLinkRef.current) === null || _a === void 0 ? void 0 : _a.classList.contains('active');
|
|
11850
11734
|
idx && rest.active && setVisibleGroup(idx);
|
|
11851
11735
|
}, [rest.active, className]);
|
|
11852
|
-
return (React$1.createElement(CLink, __assign$1({ className:
|
|
11736
|
+
return (React$1.createElement(CLink, __assign$1({ className: classNames$1('nav-link', className) }, rest, { ref: forkedRef }), children));
|
|
11853
11737
|
});
|
|
11854
11738
|
CNavLink.propTypes = {
|
|
11855
11739
|
children: propTypesExports.node,
|
|
@@ -11860,11 +11744,7 @@ CNavLink.displayName = 'CNavLink';
|
|
|
11860
11744
|
|
|
11861
11745
|
var CNavItem = React$1.forwardRef(function (_a, ref) {
|
|
11862
11746
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11863
|
-
|
|
11864
|
-
if (rest.href || rest.to) {
|
|
11865
|
-
children = (React$1.createElement(CNavLink, __assign$1({ className: className }, rest), children));
|
|
11866
|
-
}
|
|
11867
|
-
return (React$1.createElement("li", { className: _className, ref: ref }, children));
|
|
11747
|
+
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)));
|
|
11868
11748
|
});
|
|
11869
11749
|
CNavItem.propTypes = {
|
|
11870
11750
|
children: propTypesExports.node,
|
|
@@ -11874,8 +11754,7 @@ CNavItem.displayName = 'CNavItem';
|
|
|
11874
11754
|
|
|
11875
11755
|
var CNavTitle = React$1.forwardRef(function (_a, ref) {
|
|
11876
11756
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11877
|
-
|
|
11878
|
-
return (React$1.createElement("li", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11757
|
+
return (React$1.createElement("li", __assign$1({ className: classNames$1('nav-title', className) }, rest, { ref: ref }), children));
|
|
11879
11758
|
});
|
|
11880
11759
|
CNavTitle.propTypes = {
|
|
11881
11760
|
children: propTypesExports.node,
|
|
@@ -11886,19 +11765,11 @@ CNavTitle.displayName = 'CNavTitle';
|
|
|
11886
11765
|
var CNavbar = React$1.forwardRef(function (_a, ref) {
|
|
11887
11766
|
var _b;
|
|
11888
11767
|
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"]);
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
var content;
|
|
11895
|
-
if (container) {
|
|
11896
|
-
content = (React$1.createElement("div", { className: "container".concat(container !== true ? '-' + container : '') }, children));
|
|
11897
|
-
}
|
|
11898
|
-
else {
|
|
11899
|
-
content = children;
|
|
11900
|
-
}
|
|
11901
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), content));
|
|
11768
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar', (_b = {},
|
|
11769
|
+
_b["bg-".concat(color)] = color,
|
|
11770
|
+
_b["navbar-".concat(colorScheme)] = colorScheme,
|
|
11771
|
+
_b[typeof expand === 'boolean' ? 'navbar-expand' : "navbar-expand-".concat(expand)] = expand,
|
|
11772
|
+
_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))));
|
|
11902
11773
|
});
|
|
11903
11774
|
CNavbar.propTypes = {
|
|
11904
11775
|
children: propTypesExports.node,
|
|
@@ -11927,9 +11798,8 @@ CNavbar.displayName = 'CNavbar';
|
|
|
11927
11798
|
|
|
11928
11799
|
var CNavbarBrand = React$1.forwardRef(function (_a, ref) {
|
|
11929
11800
|
var children = _a.children, component = _a.component, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
11930
|
-
var Component = component ? component : rest.href ? 'a' : 'span';
|
|
11931
|
-
|
|
11932
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11801
|
+
var Component = component !== null && component !== void 0 ? component : (rest.href ? 'a' : 'span');
|
|
11802
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar-brand', className) }, rest, { ref: ref }), children));
|
|
11933
11803
|
});
|
|
11934
11804
|
CNavbarBrand.propTypes = {
|
|
11935
11805
|
children: propTypesExports.node,
|
|
@@ -11940,8 +11810,7 @@ CNavbarBrand.displayName = 'CNavbarBrand';
|
|
|
11940
11810
|
|
|
11941
11811
|
var CNavbarNav = React$1.forwardRef(function (_a, ref) {
|
|
11942
11812
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'ul' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
11943
|
-
|
|
11944
|
-
return (React$1.createElement(Component, __assign$1({ className: _className, role: "navigation" }, rest, { ref: ref }), children));
|
|
11813
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('navbar-nav', className), role: "navigation" }, rest, { ref: ref }), children));
|
|
11945
11814
|
});
|
|
11946
11815
|
CNavbarNav.propTypes = {
|
|
11947
11816
|
children: propTypesExports.node,
|
|
@@ -11952,8 +11821,7 @@ CNavbarNav.displayName = 'CNavbarNav';
|
|
|
11952
11821
|
|
|
11953
11822
|
var CNavbarText = React$1.forwardRef(function (_a, ref) {
|
|
11954
11823
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11955
|
-
|
|
11956
|
-
return (React$1.createElement("span", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11824
|
+
return (React$1.createElement("span", __assign$1({ className: classNames$1('navbar-text', className) }, rest, { ref: ref }), children));
|
|
11957
11825
|
});
|
|
11958
11826
|
CNavbarText.propTypes = {
|
|
11959
11827
|
children: propTypesExports.node,
|
|
@@ -11963,8 +11831,7 @@ CNavbarText.displayName = 'CNavbarText';
|
|
|
11963
11831
|
|
|
11964
11832
|
var CNavbarToggler = React$1.forwardRef(function (_a, ref) {
|
|
11965
11833
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
11966
|
-
|
|
11967
|
-
return (React$1.createElement("button", __assign$1({ type: "button", className: _className }, rest, { ref: ref }), children ? children : React$1.createElement("span", { className: "navbar-toggler-icon" })));
|
|
11834
|
+
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" })));
|
|
11968
11835
|
});
|
|
11969
11836
|
CNavbarToggler.propTypes = {
|
|
11970
11837
|
children: propTypesExports.node,
|
|
@@ -11973,9 +11840,8 @@ CNavbarToggler.propTypes = {
|
|
|
11973
11840
|
CNavbarToggler.displayName = 'CNavbarToggler';
|
|
11974
11841
|
|
|
11975
11842
|
var COffcanvas = React$1.forwardRef(function (_a, ref) {
|
|
11976
|
-
var _b;
|
|
11977
|
-
var
|
|
11978
|
-
var _j = React$1.useState(visible), _visible = _j[0], setVisible = _j[1];
|
|
11843
|
+
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"]);
|
|
11844
|
+
var _h = React$1.useState(visible), _visible = _h[0], setVisible = _h[1];
|
|
11979
11845
|
var offcanvasRef = React$1.useRef(null);
|
|
11980
11846
|
var forkedRef = useForkedRef(ref, offcanvasRef);
|
|
11981
11847
|
React$1.useEffect(function () {
|
|
@@ -11994,19 +11860,6 @@ var COffcanvas = React$1.forwardRef(function (_a, ref) {
|
|
|
11994
11860
|
document.body.style.removeProperty('padding-right');
|
|
11995
11861
|
}
|
|
11996
11862
|
}, [_visible]);
|
|
11997
|
-
var getTransitionClass = function (state) {
|
|
11998
|
-
return state === 'entering'
|
|
11999
|
-
? 'showing'
|
|
12000
|
-
: state === 'entered'
|
|
12001
|
-
? 'show'
|
|
12002
|
-
: state === 'exiting'
|
|
12003
|
-
? 'show hiding'
|
|
12004
|
-
: '';
|
|
12005
|
-
};
|
|
12006
|
-
var _className = classNames$1((_b = {},
|
|
12007
|
-
_b["offcanvas".concat(typeof responsive !== 'boolean' ? '-' + responsive : '')] = responsive,
|
|
12008
|
-
_b["offcanvas-".concat(placement)] = placement,
|
|
12009
|
-
_b), className);
|
|
12010
11863
|
var handleDismiss = function () {
|
|
12011
11864
|
setVisible(false);
|
|
12012
11865
|
};
|
|
@@ -12015,25 +11868,25 @@ var COffcanvas = React$1.forwardRef(function (_a, ref) {
|
|
|
12015
11868
|
setVisible(false);
|
|
12016
11869
|
}
|
|
12017
11870
|
};
|
|
12018
|
-
var handleKeyDown =
|
|
11871
|
+
var handleKeyDown = function (event) {
|
|
12019
11872
|
if (event.key === 'Escape' && keyboard) {
|
|
12020
11873
|
return handleDismiss();
|
|
12021
11874
|
}
|
|
12022
|
-
}, [ref, handleDismiss]);
|
|
12023
|
-
var offcanvas = function (ref, state) {
|
|
12024
|
-
return (React$1.createElement(React$1.Fragment, null,
|
|
12025
|
-
React$1.createElement("div", __assign$1({ className: classNames$1(_className, getTransitionClass(state)), role: "dialog", tabIndex: -1, onKeyDown: handleKeyDown }, rest, { ref: ref }), children)));
|
|
12026
11875
|
};
|
|
12027
11876
|
return (React$1.createElement(React$1.Fragment, null,
|
|
12028
11877
|
React$1.createElement(Transition$1, { in: _visible, nodeRef: offcanvasRef, onEnter: onShow, onEntered: function () { var _a; return (_a = offcanvasRef.current) === null || _a === void 0 ? void 0 : _a.focus(); }, onExit: onHide, timeout: 300 }, function (state) {
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
:
|
|
11878
|
+
var _a;
|
|
11879
|
+
return (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
11880
|
+
React$1.createElement("div", __assign$1({ className: classNames$1((_a = {},
|
|
11881
|
+
_a["offcanvas".concat(typeof responsive === 'string' ? '-' + responsive : '')] = responsive,
|
|
11882
|
+
_a["offcanvas-".concat(placement)] = placement,
|
|
11883
|
+
_a.showing = state === 'entering',
|
|
11884
|
+
_a.show = state === 'entered',
|
|
11885
|
+
_a['show hiding'] = state === 'exiting',
|
|
11886
|
+
_a), className), role: "dialog", tabIndex: -1, onKeyDown: handleKeyDown }, rest, { ref: forkedRef }), children)));
|
|
12032
11887
|
}),
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
ReactDOM.createPortal(React$1.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleBackdropDismiss, visible: _visible }), document.body)
|
|
12036
|
-
: backdrop && (React$1.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleBackdropDismiss, visible: _visible }))));
|
|
11888
|
+
backdrop && (React$1.createElement(CConditionalPortal, { portal: portal },
|
|
11889
|
+
React$1.createElement(CBackdrop, { className: "offcanvas-backdrop", onClick: handleBackdropDismiss, visible: _visible })))));
|
|
12037
11890
|
});
|
|
12038
11891
|
COffcanvas.propTypes = {
|
|
12039
11892
|
backdrop: propTypesExports.oneOfType([propTypesExports.bool, propTypesExports.oneOf(['static'])]),
|
|
@@ -12056,8 +11909,7 @@ COffcanvas.displayName = 'COffcanvas';
|
|
|
12056
11909
|
|
|
12057
11910
|
var COffcanvasBody = React$1.forwardRef(function (_a, ref) {
|
|
12058
11911
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
12059
|
-
|
|
12060
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11912
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('offcanvas-body', className) }, rest, { ref: ref }), children));
|
|
12061
11913
|
});
|
|
12062
11914
|
COffcanvasBody.propTypes = {
|
|
12063
11915
|
children: propTypesExports.node,
|
|
@@ -12067,8 +11919,7 @@ COffcanvasBody.displayName = 'COffcanvasBody';
|
|
|
12067
11919
|
|
|
12068
11920
|
var COffcanvasHeader = React$1.forwardRef(function (_a, ref) {
|
|
12069
11921
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
12070
|
-
|
|
12071
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11922
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('offcanvas-header', className) }, rest, { ref: ref }), children));
|
|
12072
11923
|
});
|
|
12073
11924
|
COffcanvasHeader.propTypes = {
|
|
12074
11925
|
children: propTypesExports.node,
|
|
@@ -12078,8 +11929,7 @@ COffcanvasHeader.displayName = 'COffcanvasHeader';
|
|
|
12078
11929
|
|
|
12079
11930
|
var COffcanvasTitle = React$1.forwardRef(function (_a, ref) {
|
|
12080
11931
|
var children = _a.children, _b = _a.component, Component = _b === void 0 ? 'h5' : _b, className = _a.className, rest = __rest$1(_a, ["children", "component", "className"]);
|
|
12081
|
-
|
|
12082
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11932
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1('offcanvas-title', className) }, rest, { ref: ref }), children));
|
|
12083
11933
|
});
|
|
12084
11934
|
COffcanvasTitle.propTypes = {
|
|
12085
11935
|
children: propTypesExports.node,
|
|
@@ -12091,12 +11941,11 @@ COffcanvasTitle.displayName = 'COffcanvasTitle';
|
|
|
12091
11941
|
var CPagination = React$1.forwardRef(function (_a, ref) {
|
|
12092
11942
|
var _b;
|
|
12093
11943
|
var children = _a.children, align = _a.align, className = _a.className, size = _a.size, rest = __rest$1(_a, ["children", "align", "className", "size"]);
|
|
12094
|
-
var _className = classNames$1('pagination', (_b = {},
|
|
12095
|
-
_b["justify-content-".concat(align)] = align,
|
|
12096
|
-
_b["pagination-".concat(size)] = size,
|
|
12097
|
-
_b), className);
|
|
12098
11944
|
return (React$1.createElement("nav", __assign$1({ ref: ref }, rest),
|
|
12099
|
-
React$1.createElement("ul", { className:
|
|
11945
|
+
React$1.createElement("ul", { className: classNames$1('pagination', (_b = {},
|
|
11946
|
+
_b["justify-content-".concat(align)] = align,
|
|
11947
|
+
_b["pagination-".concat(size)] = size,
|
|
11948
|
+
_b), className) }, children)));
|
|
12100
11949
|
});
|
|
12101
11950
|
CPagination.propTypes = {
|
|
12102
11951
|
align: propTypesExports.oneOf(['start', 'center', 'end']),
|
|
@@ -12108,12 +11957,11 @@ CPagination.displayName = 'CPagination';
|
|
|
12108
11957
|
|
|
12109
11958
|
var CPaginationItem = React$1.forwardRef(function (_a, ref) {
|
|
12110
11959
|
var children = _a.children, className = _a.className, component = _a.component, rest = __rest$1(_a, ["children", "className", "component"]);
|
|
12111
|
-
var
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
return (React$1.createElement("li", __assign$1({ className: _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))));
|
|
11960
|
+
var Component = component !== null && component !== void 0 ? component : (rest.active ? 'span' : 'a');
|
|
11961
|
+
return (React$1.createElement("li", __assign$1({ className: classNames$1('page-item', {
|
|
11962
|
+
active: rest.active,
|
|
11963
|
+
disabled: rest.disabled,
|
|
11964
|
+
}, 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))));
|
|
12117
11965
|
});
|
|
12118
11966
|
CPaginationItem.propTypes = {
|
|
12119
11967
|
children: propTypesExports.node,
|
|
@@ -12145,11 +11993,10 @@ var CPlaceholder = React$1.forwardRef(function (_a, ref) {
|
|
|
12145
11993
|
repsonsiveClassNames.push("col".concat(infix));
|
|
12146
11994
|
}
|
|
12147
11995
|
});
|
|
12148
|
-
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
return (React$1.createElement(Component, __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
11996
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1(animation ? "placeholder-".concat(animation) : 'placeholder', (_b = {},
|
|
11997
|
+
_b["bg-".concat(color)] = color,
|
|
11998
|
+
_b["placeholder-".concat(size)] = size,
|
|
11999
|
+
_b), repsonsiveClassNames, className) }, rest, { ref: ref }), children));
|
|
12153
12000
|
});
|
|
12154
12001
|
CPlaceholder.propTypes = {
|
|
12155
12002
|
animation: propTypesExports.oneOf(['glow', 'wave']),
|
|
@@ -12164,12 +12011,11 @@ CPlaceholder.displayName = 'CPlaceholder';
|
|
|
12164
12011
|
var CProgressBar = React$1.forwardRef(function (_a, ref) {
|
|
12165
12012
|
var _b;
|
|
12166
12013
|
var children = _a.children, animated = _a.animated, className = _a.className, color = _a.color, _c = _a.value, value = _c === void 0 ? 0 : _c, variant = _a.variant, rest = __rest$1(_a, ["children", "animated", "className", "color", "value", "variant"]);
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
return (React$1.createElement("div", __assign$1({ className: _className, role: "progressbar", style: { width: "".concat(value, "%") }, "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": 100 }, rest, { ref: ref }), children));
|
|
12014
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('progress-bar', (_b = {},
|
|
12015
|
+
_b["bg-".concat(color)] = color,
|
|
12016
|
+
_b["progress-bar-".concat(variant)] = variant,
|
|
12017
|
+
_b['progress-bar-animated'] = animated,
|
|
12018
|
+
_b), className), role: "progressbar", style: { width: "".concat(value, "%") }, "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": 100 }, rest, { ref: ref }), children));
|
|
12173
12019
|
});
|
|
12174
12020
|
CProgressBar.propTypes = {
|
|
12175
12021
|
animated: propTypesExports.bool,
|
|
@@ -12183,11 +12029,10 @@ CProgressBar.displayName = 'CProgressBar';
|
|
|
12183
12029
|
|
|
12184
12030
|
var CProgress = React$1.forwardRef(function (_a, ref) {
|
|
12185
12031
|
var children = _a.children, className = _a.className, height = _a.height, thin = _a.thin, _b = _a.value, value = _b === void 0 ? 0 : _b, white = _a.white, rest = __rest$1(_a, ["children", "className", "height", "thin", "value", "white"]);
|
|
12186
|
-
|
|
12187
|
-
|
|
12188
|
-
|
|
12189
|
-
|
|
12190
|
-
return (React$1.createElement("div", { className: _className, style: height ? { height: "".concat(height, "px") } : {}, ref: ref }, value ? (React$1.createElement(CProgressBar, __assign$1({ value: value }, rest), children)) : (children)));
|
|
12032
|
+
return (React$1.createElement("div", { className: classNames$1('progress', {
|
|
12033
|
+
'progress-thin': thin,
|
|
12034
|
+
'progress-white': white,
|
|
12035
|
+
}, className), style: height ? { height: "".concat(height, "px") } : {}, ref: ref }, value ? (React$1.createElement(CProgressBar, __assign$1({ value: value }, rest), children)) : (children)));
|
|
12191
12036
|
});
|
|
12192
12037
|
CProgress.propTypes = {
|
|
12193
12038
|
children: propTypesExports.node,
|
|
@@ -12221,15 +12066,6 @@ var CPopover = function (_a) {
|
|
|
12221
12066
|
React$1.useEffect(function () {
|
|
12222
12067
|
setVisible(visible);
|
|
12223
12068
|
}, [visible]);
|
|
12224
|
-
var getTransitionClass = function (state) {
|
|
12225
|
-
return state === 'entering'
|
|
12226
|
-
? 'fade'
|
|
12227
|
-
: state === 'entered'
|
|
12228
|
-
? 'fade show'
|
|
12229
|
-
: state === 'exiting'
|
|
12230
|
-
? 'fade'
|
|
12231
|
-
: 'fade';
|
|
12232
|
-
};
|
|
12233
12069
|
return (React$1.createElement(React$1.Fragment, null,
|
|
12234
12070
|
React$1.cloneElement(children, __assign$1(__assign$1(__assign$1({ ref: setReferenceElement }, ((trigger === 'click' || trigger.includes('click')) && {
|
|
12235
12071
|
onClick: function () { return setVisible(!_visible); },
|
|
@@ -12244,13 +12080,12 @@ var CPopover = function (_a) {
|
|
|
12244
12080
|
ReactDOM.createPortal(React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: popoverRef, onEnter: onShow, onExit: onHide, timeout: {
|
|
12245
12081
|
enter: 0,
|
|
12246
12082
|
exit: 200,
|
|
12247
|
-
}, unmountOnExit: true }, function (state) {
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
}), document.body)));
|
|
12083
|
+
}, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('popover', "bs-popover-".concat(placement.replace('left', 'start').replace('right', 'end')), 'fade', {
|
|
12084
|
+
show: state === 'entered',
|
|
12085
|
+
}, className), ref: setPopperElement, role: "tooltip", style: styles.popper }, attributes.popper, rest),
|
|
12086
|
+
React$1.createElement("div", { className: "popover-arrow", style: styles.arrow, ref: setArrowElement }),
|
|
12087
|
+
React$1.createElement("div", { className: "popover-header" }, title),
|
|
12088
|
+
React$1.createElement("div", { className: "popover-body" }, content))); }), document.body)));
|
|
12254
12089
|
};
|
|
12255
12090
|
CPopover.propTypes = {
|
|
12256
12091
|
children: propTypesExports.node,
|
|
@@ -13640,7 +13475,6 @@ CIcon.displayName = 'CIcon';
|
|
|
13640
13475
|
|
|
13641
13476
|
var CSmartPagination = React$1.forwardRef(function (_a, ref) {
|
|
13642
13477
|
var className = _a.className, _b = _a.activePage, activePage = _b === void 0 ? 1 : _b, _c = _a.align, align = _c === void 0 ? 'start' : _c, _d = _a.arrows, arrows = _d === void 0 ? true : _d, _e = _a.dots, dots = _e === void 0 ? true : _e, _f = _a.doubleArrows, doubleArrows = _f === void 0 ? true : _f, _g = _a.firstButton, firstButton = _g === void 0 ? React$1.createElement(React$1.Fragment, null, "\u00AB") : _g, _h = _a.lastButton, lastButton = _h === void 0 ? React$1.createElement(React$1.Fragment, null, "\u00BB") : _h, _j = _a.limit, limit = _j === void 0 ? 5 : _j, _k = _a.nextButton, nextButton = _k === void 0 ? React$1.createElement(React$1.Fragment, null, "\u203A") : _k, onActivePageChange = _a.onActivePageChange, pages = _a.pages, _l = _a.previousButton, previousButton = _l === void 0 ? React$1.createElement(React$1.Fragment, null, "\u2039") : _l, size = _a.size, rest = __rest$1(_a, ["className", "activePage", "align", "arrows", "dots", "doubleArrows", "firstButton", "lastButton", "limit", "nextButton", "onActivePageChange", "pages", "previousButton", "size"]);
|
|
13643
|
-
var _classNames = classNames$1("justify-content-".concat(align), className);
|
|
13644
13478
|
var showDots = (function () {
|
|
13645
13479
|
return dots && limit > 4 && limit < pages;
|
|
13646
13480
|
})();
|
|
@@ -13669,25 +13503,22 @@ var CSmartPagination = React$1.forwardRef(function (_a, ref) {
|
|
|
13669
13503
|
return pages < computedLimit ? pages : computedLimit;
|
|
13670
13504
|
})();
|
|
13671
13505
|
var items = (function () {
|
|
13672
|
-
|
|
13673
|
-
|
|
13506
|
+
return activePage - maxPrevItems <= 1
|
|
13507
|
+
? Array.from({
|
|
13674
13508
|
length: itemsAmount,
|
|
13675
|
-
}, function (_v, i) { return i + 1; })
|
|
13676
|
-
|
|
13677
|
-
else {
|
|
13678
|
-
return Array.from({
|
|
13509
|
+
}, function (_v, i) { return i + 1; })
|
|
13510
|
+
: Array.from({
|
|
13679
13511
|
length: itemsAmount,
|
|
13680
13512
|
}, function (_v, i) {
|
|
13681
13513
|
return lastItem - i;
|
|
13682
13514
|
}).reverse();
|
|
13683
|
-
}
|
|
13684
13515
|
})();
|
|
13685
13516
|
var setPage = function (number) {
|
|
13686
13517
|
if (number !== activePage) {
|
|
13687
13518
|
onActivePageChange && onActivePageChange(number);
|
|
13688
13519
|
}
|
|
13689
13520
|
};
|
|
13690
|
-
return (React$1.createElement(CPagination, __assign$1({ className:
|
|
13521
|
+
return (React$1.createElement(CPagination, __assign$1({ className: classNames$1("justify-content-".concat(align), className), "aria-label": "pagination", size: size }, rest, { ref: ref }),
|
|
13691
13522
|
doubleArrows && (React$1.createElement(CPaginationItem, { onClick: function () { return setPage(1); }, "aria-label": "Go to first page", "aria-disabled": activePage === 1, disabled: activePage === 1 }, firstButton)),
|
|
13692
13523
|
arrows && (React$1.createElement(CPaginationItem, { onClick: function () { return setPage(activePage - 1); }, "aria-label": "Go to previous page", "aria-disabled": activePage === 1, disabled: activePage === 1 }, previousButton)),
|
|
13693
13524
|
beforeDots && (React$1.createElement(CPaginationItem, { role: "separator", disabled: true }, "\u2026")),
|
|
@@ -13719,10 +13550,9 @@ CSmartPagination.displayName = 'CSmartPagination';
|
|
|
13719
13550
|
var CTableHead = React$1.forwardRef(function (_a, ref) {
|
|
13720
13551
|
var _b;
|
|
13721
13552
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
13722
|
-
|
|
13723
|
-
|
|
13724
|
-
|
|
13725
|
-
return (React$1.createElement("thead", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
13553
|
+
return (React$1.createElement("thead", __assign$1({ className: classNames$1((_b = {},
|
|
13554
|
+
_b["table-".concat(color)] = color,
|
|
13555
|
+
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13726
13556
|
});
|
|
13727
13557
|
CTableHead.propTypes = {
|
|
13728
13558
|
children: propTypesExports.node,
|
|
@@ -13734,10 +13564,9 @@ CTableHead.displayName = 'CTableHead';
|
|
|
13734
13564
|
var CTableHeaderCell = React$1.forwardRef(function (_a, ref) {
|
|
13735
13565
|
var _b;
|
|
13736
13566
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
13737
|
-
|
|
13738
|
-
|
|
13739
|
-
|
|
13740
|
-
return (React$1.createElement("th", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
13567
|
+
return (React$1.createElement("th", __assign$1({ className: classNames$1((_b = {},
|
|
13568
|
+
_b["table-".concat(color)] = color,
|
|
13569
|
+
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13741
13570
|
});
|
|
13742
13571
|
CTableHeaderCell.propTypes = {
|
|
13743
13572
|
children: propTypesExports.node,
|
|
@@ -13749,10 +13578,9 @@ CTableHeaderCell.displayName = 'CTableHeaderCell';
|
|
|
13749
13578
|
var CTableBody = React$1.forwardRef(function (_a, ref) {
|
|
13750
13579
|
var _b;
|
|
13751
13580
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
13752
|
-
|
|
13753
|
-
|
|
13754
|
-
|
|
13755
|
-
return (React$1.createElement("tbody", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
13581
|
+
return (React$1.createElement("tbody", __assign$1({ className: classNames$1((_b = {},
|
|
13582
|
+
_b["table-".concat(color)] = color,
|
|
13583
|
+
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13756
13584
|
});
|
|
13757
13585
|
CTableBody.propTypes = {
|
|
13758
13586
|
children: propTypesExports.node,
|
|
@@ -13764,13 +13592,12 @@ CTableBody.displayName = 'CTableBody';
|
|
|
13764
13592
|
var CTableDataCell = React$1.forwardRef(function (_a, ref) {
|
|
13765
13593
|
var _b;
|
|
13766
13594
|
var children = _a.children, active = _a.active, align = _a.align, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "active", "align", "className", "color"]);
|
|
13767
|
-
var _className = classNames$1((_b = {},
|
|
13768
|
-
_b["align-".concat(align)] = align,
|
|
13769
|
-
_b['table-active'] = active,
|
|
13770
|
-
_b["table-".concat(color)] = color,
|
|
13771
|
-
_b), className);
|
|
13772
13595
|
var Component = rest.scope ? 'th' : 'td';
|
|
13773
|
-
return (React$1.createElement(Component, __assign$1({ className:
|
|
13596
|
+
return (React$1.createElement(Component, __assign$1({ className: classNames$1((_b = {},
|
|
13597
|
+
_b["align-".concat(align)] = align,
|
|
13598
|
+
_b['table-active'] = active,
|
|
13599
|
+
_b["table-".concat(color)] = color,
|
|
13600
|
+
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13774
13601
|
});
|
|
13775
13602
|
CTableDataCell.propTypes = {
|
|
13776
13603
|
active: propTypesExports.bool,
|
|
@@ -13784,12 +13611,11 @@ CTableDataCell.displayName = 'CTableDataCell';
|
|
|
13784
13611
|
var CTableRow = React$1.forwardRef(function (_a, ref) {
|
|
13785
13612
|
var _b;
|
|
13786
13613
|
var children = _a.children, active = _a.active, align = _a.align, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "active", "align", "className", "color"]);
|
|
13787
|
-
|
|
13788
|
-
|
|
13789
|
-
|
|
13790
|
-
|
|
13791
|
-
|
|
13792
|
-
return (React$1.createElement("tr", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
13614
|
+
return (React$1.createElement("tr", __assign$1({ className: classNames$1((_b = {},
|
|
13615
|
+
_b["align-".concat(align)] = align,
|
|
13616
|
+
_b['table-active'] = active,
|
|
13617
|
+
_b["table-".concat(color)] = color,
|
|
13618
|
+
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13793
13619
|
});
|
|
13794
13620
|
CTableRow.propTypes = {
|
|
13795
13621
|
active: propTypesExports.bool,
|
|
@@ -13803,10 +13629,9 @@ CTableRow.displayName = 'CTableRow';
|
|
|
13803
13629
|
var CTableFoot = React$1.forwardRef(function (_a, ref) {
|
|
13804
13630
|
var _b;
|
|
13805
13631
|
var children = _a.children, className = _a.className, color = _a.color, rest = __rest$1(_a, ["children", "className", "color"]);
|
|
13806
|
-
|
|
13807
|
-
|
|
13808
|
-
|
|
13809
|
-
return (React$1.createElement("tfoot", __assign$1({ className: _className ? _className : undefined }, rest, { ref: ref }), children));
|
|
13632
|
+
return (React$1.createElement("tfoot", __assign$1({ className: classNames$1((_b = {},
|
|
13633
|
+
_b["table-".concat(color)] = color,
|
|
13634
|
+
_b), className) || undefined }, rest, { ref: ref }), children));
|
|
13810
13635
|
});
|
|
13811
13636
|
CTableFoot.propTypes = {
|
|
13812
13637
|
children: propTypesExports.node,
|
|
@@ -13826,10 +13651,10 @@ CTableCaption.displayName = 'CTableCaption';
|
|
|
13826
13651
|
|
|
13827
13652
|
var CTableResponsiveWrapper = function (_a) {
|
|
13828
13653
|
var children = _a.children, responsive = _a.responsive, rest = __rest$1(_a, ["children", "responsive"]);
|
|
13829
|
-
return responsive ? (React$1.createElement("div", __assign$1({ className: typeof responsive === 'boolean' ? 'table-responsive' : "table-responsive-".concat(responsive) }, rest), children)) : (children);
|
|
13654
|
+
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));
|
|
13830
13655
|
};
|
|
13831
13656
|
CTableResponsiveWrapper.propTypes = {
|
|
13832
|
-
children: propTypesExports.
|
|
13657
|
+
children: propTypesExports.node,
|
|
13833
13658
|
responsive: propTypesExports.oneOfType([
|
|
13834
13659
|
propTypesExports.bool,
|
|
13835
13660
|
propTypesExports.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
|
|
@@ -13837,53 +13662,51 @@ CTableResponsiveWrapper.propTypes = {
|
|
|
13837
13662
|
};
|
|
13838
13663
|
CTableResponsiveWrapper.displayName = 'CTableResponsiveWrapper';
|
|
13839
13664
|
|
|
13665
|
+
var pretifyName$1 = function (name) {
|
|
13666
|
+
return name
|
|
13667
|
+
.replace(/[-_.]/g, ' ')
|
|
13668
|
+
.replace(/ +/g, ' ')
|
|
13669
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
13670
|
+
.split(' ')
|
|
13671
|
+
.map(function (word) { return word.charAt(0).toUpperCase() + word.slice(1); })
|
|
13672
|
+
.join(' ');
|
|
13673
|
+
};
|
|
13674
|
+
var getColumnLabel$1 = function (column) { var _a; return typeof column === 'object' ? (_a = column.label) !== null && _a !== void 0 ? _a : pretifyName$1(column.key) : pretifyName$1(column); };
|
|
13675
|
+
var getColumnNames$1 = function (columns, items) {
|
|
13676
|
+
return columns
|
|
13677
|
+
? columns.map(function (column) {
|
|
13678
|
+
return typeof column === 'object' ? column.key : column;
|
|
13679
|
+
})
|
|
13680
|
+
: items && getColumnNamesFromItems$1(items);
|
|
13681
|
+
};
|
|
13682
|
+
var getColumnNamesFromItems$1 = function (items) {
|
|
13683
|
+
return Object.keys(items[0] || {}).filter(function (el) { return el.charAt(0) !== '_'; });
|
|
13684
|
+
};
|
|
13685
|
+
|
|
13840
13686
|
var CTable = React$1.forwardRef(function (_a, ref) {
|
|
13841
13687
|
var _b;
|
|
13842
13688
|
var children = _a.children, align = _a.align, borderColor = _a.borderColor, bordered = _a.bordered, borderless = _a.borderless, caption = _a.caption, captionTop = _a.captionTop, className = _a.className, color = _a.color, columns = _a.columns, footer = _a.footer, hover = _a.hover, items = _a.items, responsive = _a.responsive, small = _a.small, striped = _a.striped, stripedColumns = _a.stripedColumns, tableFootProps = _a.tableFootProps, tableHeadProps = _a.tableHeadProps, rest = __rest$1(_a, ["children", "align", "borderColor", "bordered", "borderless", "caption", "captionTop", "className", "color", "columns", "footer", "hover", "items", "responsive", "small", "striped", "stripedColumns", "tableFootProps", "tableHeadProps"]);
|
|
13843
|
-
var
|
|
13844
|
-
_b["align-".concat(align)] = align,
|
|
13845
|
-
_b["border-".concat(borderColor)] = borderColor,
|
|
13846
|
-
_b["caption-top"] = captionTop || caption === 'top',
|
|
13847
|
-
_b['table-bordered'] = bordered,
|
|
13848
|
-
_b['table-borderless'] = borderless,
|
|
13849
|
-
_b["table-".concat(color)] = color,
|
|
13850
|
-
_b['table-hover'] = hover,
|
|
13851
|
-
_b['table-sm'] = small,
|
|
13852
|
-
_b['table-striped'] = striped,
|
|
13853
|
-
_b['table-striped-columns'] = stripedColumns,
|
|
13854
|
-
_b), className);
|
|
13855
|
-
var rawColumnNames = columns
|
|
13856
|
-
? columns.map(function (column) {
|
|
13857
|
-
if (typeof column === 'object')
|
|
13858
|
-
return column.key;
|
|
13859
|
-
else
|
|
13860
|
-
return column;
|
|
13861
|
-
})
|
|
13862
|
-
: Object.keys((items && items[0]) || {}).filter(function (el) { return el.charAt(0) !== '_'; });
|
|
13863
|
-
var pretifyName = function (name) {
|
|
13864
|
-
return name
|
|
13865
|
-
.replace(/[-_.]/g, ' ')
|
|
13866
|
-
.replace(/ +/g, ' ')
|
|
13867
|
-
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
13868
|
-
.split(' ')
|
|
13869
|
-
.map(function (word) { return word.charAt(0).toUpperCase() + word.slice(1); })
|
|
13870
|
-
.join(' ');
|
|
13871
|
-
};
|
|
13872
|
-
var label = function (column) {
|
|
13873
|
-
return typeof column === 'object'
|
|
13874
|
-
? column.label !== undefined
|
|
13875
|
-
? column.label
|
|
13876
|
-
: pretifyName(column.key)
|
|
13877
|
-
: pretifyName(column);
|
|
13878
|
-
};
|
|
13689
|
+
var columnNames = React$1.useMemo(function () { return getColumnNames$1(columns, items); }, [columns, items]);
|
|
13879
13690
|
return (React$1.createElement(CTableResponsiveWrapper, { responsive: responsive },
|
|
13880
|
-
React$1.createElement("table", __assign$1({ className:
|
|
13691
|
+
React$1.createElement("table", __assign$1({ className: classNames$1('table', (_b = {},
|
|
13692
|
+
_b["align-".concat(align)] = align,
|
|
13693
|
+
_b["border-".concat(borderColor)] = borderColor,
|
|
13694
|
+
_b["caption-top"] = captionTop || caption === 'top',
|
|
13695
|
+
_b['table-bordered'] = bordered,
|
|
13696
|
+
_b['table-borderless'] = borderless,
|
|
13697
|
+
_b["table-".concat(color)] = color,
|
|
13698
|
+
_b['table-hover'] = hover,
|
|
13699
|
+
_b['table-sm'] = small,
|
|
13700
|
+
_b['table-striped'] = striped,
|
|
13701
|
+
_b['table-striped-columns'] = stripedColumns,
|
|
13702
|
+
_b), className) }, rest, { ref: ref }),
|
|
13881
13703
|
((caption && caption !== 'top') || captionTop) && (React$1.createElement(CTableCaption, null, caption || captionTop)),
|
|
13882
13704
|
columns && (React$1.createElement(CTableHead, __assign$1({}, tableHeadProps),
|
|
13883
|
-
React$1.createElement(CTableRow, null, columns.map(function (column, index) { return (React$1.createElement(CTableHeaderCell, __assign$1({}, (column._props && __assign$1({}, column._props)), (column._style && { style: __assign$1({}, column._style) }), { key: index }),
|
|
13884
|
-
items && (React$1.createElement(CTableBody, null, items.map(function (item, index) { return (React$1.createElement(CTableRow, __assign$1({}, (item._props && __assign$1({}, item._props)), { key: index }),
|
|
13885
|
-
|
|
13886
|
-
|
|
13705
|
+
React$1.createElement(CTableRow, null, columns.map(function (column, index) { return (React$1.createElement(CTableHeaderCell, __assign$1({}, (column._props && __assign$1({}, column._props)), (column._style && { style: __assign$1({}, column._style) }), { key: index }), getColumnLabel$1(column))); })))),
|
|
13706
|
+
items && (React$1.createElement(CTableBody, null, items.map(function (item, index) { return (React$1.createElement(CTableRow, __assign$1({}, (item._props && __assign$1({}, item._props)), { key: index }), columnNames &&
|
|
13707
|
+
columnNames.map(function (colName, index) {
|
|
13708
|
+
return item[colName] ? (React$1.createElement(CTableDataCell, __assign$1({}, (item._cellProps && __assign$1(__assign$1({}, (item._cellProps['all'] && __assign$1({}, item._cellProps['all']))), (item._cellProps[colName] && __assign$1({}, item._cellProps[colName])))), { key: index }), item[colName])) : null;
|
|
13709
|
+
}))); }))),
|
|
13887
13710
|
children,
|
|
13888
13711
|
footer && (React$1.createElement(CTableFoot, __assign$1({}, tableFootProps),
|
|
13889
13712
|
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)); })))))));
|
|
@@ -13964,10 +13787,7 @@ var getColumnLabel = function (column) {
|
|
|
13964
13787
|
var getColumnNames = function (columns, items) {
|
|
13965
13788
|
return columns
|
|
13966
13789
|
? columns.map(function (column) {
|
|
13967
|
-
|
|
13968
|
-
return column.key;
|
|
13969
|
-
else
|
|
13970
|
-
return column;
|
|
13790
|
+
return typeof column === 'object' ? column.key : column;
|
|
13971
13791
|
})
|
|
13972
13792
|
: getColumnNamesFromItems(items);
|
|
13973
13793
|
};
|
|
@@ -14000,7 +13820,7 @@ var getTableHeaderCellStyles = function (column, columnSorter) {
|
|
|
14000
13820
|
var style = {};
|
|
14001
13821
|
if (columnSorter &&
|
|
14002
13822
|
(typeof column !== 'object' ||
|
|
14003
|
-
(typeof column === 'object' && (
|
|
13823
|
+
(typeof column === 'object' && (column.sorter === undefined || column.sorter)))) {
|
|
14004
13824
|
style['cursor'] = 'pointer';
|
|
14005
13825
|
}
|
|
14006
13826
|
if (typeof column === 'object' && column._style) {
|
|
@@ -14016,7 +13836,7 @@ var isSortable = function (i, columns, columnSorter, itemsDataColumns, columnNam
|
|
|
14016
13836
|
return (columnSorter &&
|
|
14017
13837
|
(!columns ||
|
|
14018
13838
|
typeof column !== 'object' ||
|
|
14019
|
-
(typeof column === 'object' && (
|
|
13839
|
+
(typeof column === 'object' && (column.sorter === undefined || column.sorter))) &&
|
|
14020
13840
|
isDataColumn);
|
|
14021
13841
|
};
|
|
14022
13842
|
var pretifyName = function (name) {
|
|
@@ -14051,40 +13871,38 @@ var CSmartTableBody = React$1.forwardRef(function (_a, ref) {
|
|
|
14051
13871
|
var colspan = selectable ? columnNames.length + 1 : columnNames.length;
|
|
14052
13872
|
return (React$1.createElement(CTableBody, __assign$1({}, (clickableRows && {
|
|
14053
13873
|
style: { cursor: 'pointer' },
|
|
14054
|
-
}), rest, { ref: ref }),
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
|
|
13874
|
+
}), rest, { ref: ref }), currentItems.length ? (currentItems.map(function (item, trIndex) {
|
|
13875
|
+
return (React$1.createElement(React$1.Fragment, { key: trIndex },
|
|
13876
|
+
React$1.createElement(CTableRow, __assign$1({}, (item._props && __assign$1({}, item._props)), (clickableRows && { tabIndex: 0 }), { onClick: function (event) {
|
|
13877
|
+
return onRowClick &&
|
|
13878
|
+
onRowClick(item, trIndex + firstItemOnActivePageIndex, getClickedColumnName(event.target, columnNames), event);
|
|
13879
|
+
} }),
|
|
13880
|
+
selectable && (React$1.createElement(CTableDataCell, null,
|
|
13881
|
+
React$1.createElement(CFormCheck, { checked: selected &&
|
|
13882
|
+
isObjectInArray(selected, item, ['_cellProps', '_props', '_selected']), onChange: function (event) {
|
|
13883
|
+
var _item = __assign$1({}, item);
|
|
13884
|
+
delete _item['_cellProps'];
|
|
13885
|
+
delete _item['_props'];
|
|
13886
|
+
delete _item['_selected'];
|
|
13887
|
+
onRowChecked && onRowChecked(_item, event.target.checked);
|
|
13888
|
+
} }))),
|
|
13889
|
+
columnNames.map(function (colName, index) {
|
|
13890
|
+
return ((scopedColumns &&
|
|
13891
|
+
scopedColumns[colName] &&
|
|
13892
|
+
React$1.cloneElement(scopedColumns[colName](item, trIndex + firstItemOnActivePageIndex), {
|
|
13893
|
+
key: index,
|
|
13894
|
+
})) || (React$1.createElement(CTableDataCell, __assign$1({}, getTableDataCellProps(item, colName), { key: index }), String(item[colName]))));
|
|
13895
|
+
})),
|
|
13896
|
+
scopedColumns && scopedColumns.details && (React$1.createElement(React$1.Fragment, null,
|
|
13897
|
+
React$1.createElement(CTableRow, null,
|
|
13898
|
+
React$1.createElement(CTableDataCell, { colSpan: colspan, className: "p-0", style: { borderBottomWidth: 0 }, tabIndex: -1 })),
|
|
13899
|
+
React$1.createElement(CTableRow, { onClick: function (event) {
|
|
14058
13900
|
return onRowClick &&
|
|
14059
|
-
onRowClick(item, trIndex + firstItemOnActivePageIndex, getClickedColumnName(event.target, columnNames),
|
|
14060
|
-
} }
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
|
|
14064
|
-
var _item = __assign$1({}, item);
|
|
14065
|
-
delete _item['_cellProps'];
|
|
14066
|
-
delete _item['_props'];
|
|
14067
|
-
delete _item['_selected'];
|
|
14068
|
-
onRowChecked && onRowChecked(_item, event.target.checked);
|
|
14069
|
-
} }))),
|
|
14070
|
-
columnNames.map(function (colName, index) {
|
|
14071
|
-
return ((scopedColumns &&
|
|
14072
|
-
scopedColumns[colName] &&
|
|
14073
|
-
React$1.cloneElement(scopedColumns[colName](item, trIndex + firstItemOnActivePageIndex), {
|
|
14074
|
-
key: index,
|
|
14075
|
-
})) || (React$1.createElement(CTableDataCell, __assign$1({}, getTableDataCellProps(item, colName), { key: index }), String(item[colName]))));
|
|
14076
|
-
})),
|
|
14077
|
-
scopedColumns && scopedColumns.details && (React$1.createElement(React$1.Fragment, null,
|
|
14078
|
-
React$1.createElement(CTableRow, null,
|
|
14079
|
-
React$1.createElement(CTableDataCell, { colSpan: colspan, className: "p-0", style: { borderBottomWidth: 0 }, tabIndex: -1 })),
|
|
14080
|
-
React$1.createElement(CTableRow, { onClick: function (event) {
|
|
14081
|
-
return onRowClick &&
|
|
14082
|
-
onRowClick(item, trIndex + firstItemOnActivePageIndex, getClickedColumnName(event.target, columnNames), true);
|
|
14083
|
-
}, className: "p-0", key: "details".concat(trIndex) },
|
|
14084
|
-
React$1.createElement(CTableDataCell, { colSpan: colspan, className: "p-0", style: { border: 0 } }, scopedColumns.details(item, trIndex + firstItemOnActivePageIndex)))))));
|
|
14085
|
-
}),
|
|
14086
|
-
!currentItems.length && (React$1.createElement(CTableRow, null,
|
|
14087
|
-
React$1.createElement(CTableDataCell, { colSpan: colspan }, noItemsLabel)))));
|
|
13901
|
+
onRowClick(item, trIndex + firstItemOnActivePageIndex, getClickedColumnName(event.target, columnNames), true);
|
|
13902
|
+
}, className: "p-0", key: "details".concat(trIndex) },
|
|
13903
|
+
React$1.createElement(CTableDataCell, { colSpan: colspan, className: "p-0", style: { border: 0 } }, scopedColumns.details(item, trIndex + firstItemOnActivePageIndex)))))));
|
|
13904
|
+
})) : (React$1.createElement(CTableRow, null,
|
|
13905
|
+
React$1.createElement(CTableDataCell, { colSpan: colspan }, noItemsLabel)))));
|
|
14088
13906
|
});
|
|
14089
13907
|
CSmartTableBody.propTypes = {
|
|
14090
13908
|
clickableRows: propTypesExports.bool,
|
|
@@ -14358,7 +14176,7 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
14358
14176
|
return;
|
|
14359
14177
|
}
|
|
14360
14178
|
//if column changed or sort was descending change asc to true
|
|
14361
|
-
var state = sorterState ? sorterState : { column: '', state: '' };
|
|
14179
|
+
var state = sorterState !== null && sorterState !== void 0 ? sorterState : { column: '', state: '' };
|
|
14362
14180
|
if (state.column === column) {
|
|
14363
14181
|
if (state.state === 0) {
|
|
14364
14182
|
state.state = 'asc';
|
|
@@ -14367,12 +14185,7 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
14367
14185
|
state.state = 'desc';
|
|
14368
14186
|
}
|
|
14369
14187
|
else {
|
|
14370
|
-
|
|
14371
|
-
state.state = 'asc';
|
|
14372
|
-
}
|
|
14373
|
-
else {
|
|
14374
|
-
state.state = 0;
|
|
14375
|
-
}
|
|
14188
|
+
state.state = typeof columnSorter === 'object' && !columnSorter.resetable ? 'asc' : 0;
|
|
14376
14189
|
}
|
|
14377
14190
|
}
|
|
14378
14191
|
else {
|
|
@@ -14404,19 +14217,19 @@ var CSmartTable = React$1.forwardRef(function (_a, ref) {
|
|
|
14404
14217
|
}, placeholder: tableFilterPlaceholder, value: tableFilterState || '' }))))),
|
|
14405
14218
|
React$1.createElement("div", { className: "col-auto p-0" }, cleaner && (React$1.createElement(CSmartTableCleaner, { isFiltered: tableFilterState ||
|
|
14406
14219
|
(sorterState === null || sorterState === void 0 ? void 0 : sorterState.column) ||
|
|
14407
|
-
Object.values(columnFilterState).join(''), onClick: function () { return handleClean(); },
|
|
14220
|
+
Object.values(columnFilterState).join(''), onClick: function () { return handleClean(); }, onKeyDown: function (event) {
|
|
14408
14221
|
if (event.key === 'Enter')
|
|
14409
14222
|
handleClean();
|
|
14410
14223
|
} })))))))),
|
|
14411
14224
|
React$1.createElement("div", { className: "position-relative" },
|
|
14412
14225
|
React$1.createElement(CTable, __assign$1({}, tableProps),
|
|
14413
|
-
header && (React$1.createElement(CSmartTableHead, __assign$1({}, tableHeadProps, { columnFilter: columnFilter, columnFilterState: columnFilterState, columns: columns ? columns : columnNames, columnSorter: columnSorter, items: _items, selectable: selectable, selectAll: selectAll, selectedAll: selectedAll, sorterState: sorterState, sortingIcon: sortingIcon, sortingIconAscending: sortingIconAscending, sortingIconDescending: sortingIconDescending, handleFilterOnChange: function (key, event) {
|
|
14226
|
+
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) {
|
|
14414
14227
|
return handleColumnFilterChange(key, event, 'change');
|
|
14415
14228
|
}, 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); } }))),
|
|
14416
14229
|
React$1.createElement(CSmartTableBody, __assign$1({ clickableRows: clickableRows, currentItems: currentItems, firstItemOnActivePageIndex: firstItemOnActivePageIndex, noItemsLabel: noItemsLabel, onRowClick: function (item, index, columnName, event) {
|
|
14417
14230
|
return clickableRows && onRowClick && onRowClick(item, index, columnName, event);
|
|
14418
14231
|
}, onRowChecked: function (item, value) { return handleRowChecked(item, value); }, columnNames: columnNames, scopedColumns: scopedColumns, selectable: selectable, selected: _selected }, tableBodyProps)),
|
|
14419
|
-
typeof footer === 'boolean' && footer && (React$1.createElement(CSmartTableHead, __assign$1({ component: CTableFoot }, tableFootProps, { columnFilter: false, columnSorter: false, columns: columns ? columns : columnNames, items: _items, handleSelectAllChecked: function () { return handleSelectAllChecked(); }, selectable: selectable, selectAll: selectAll, selectedAll: selectedAll }))),
|
|
14232
|
+
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 }))),
|
|
14420
14233
|
Array.isArray(footer) && (React$1.createElement(CTableFoot, __assign$1({}, tableFootProps),
|
|
14421
14234
|
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)); }))))),
|
|
14422
14235
|
loading && (React$1.createElement(CElementCover, { boundaries: [
|
|
@@ -14504,7 +14317,7 @@ var CSidebar = React$1.forwardRef(function (_a, ref) {
|
|
|
14504
14317
|
setVisible(visible);
|
|
14505
14318
|
}, [visible]);
|
|
14506
14319
|
React$1.useEffect(function () {
|
|
14507
|
-
|
|
14320
|
+
inViewport !== undefined && onVisibleChange && onVisibleChange(inViewport);
|
|
14508
14321
|
!inViewport && onHide && onHide();
|
|
14509
14322
|
inViewport && onShow && onShow();
|
|
14510
14323
|
}, [inViewport]);
|
|
@@ -14562,19 +14375,18 @@ var CSidebar = React$1.forwardRef(function (_a, ref) {
|
|
|
14562
14375
|
mobile &&
|
|
14563
14376
|
handleHide();
|
|
14564
14377
|
};
|
|
14565
|
-
var _className = classNames$1('sidebar', (_b = {},
|
|
14566
|
-
_b["sidebar-".concat(colorScheme)] = colorScheme,
|
|
14567
|
-
_b['sidebar-narrow'] = narrow,
|
|
14568
|
-
_b['sidebar-overlaid'] = overlaid,
|
|
14569
|
-
_b["sidebar-".concat(placement)] = placement,
|
|
14570
|
-
_b["sidebar-".concat(position)] = position,
|
|
14571
|
-
_b["sidebar-".concat(size)] = size,
|
|
14572
|
-
_b['sidebar-narrow-unfoldable'] = unfoldable,
|
|
14573
|
-
_b.show = _visible === true && mobile,
|
|
14574
|
-
_b.hide = _visible === false && !mobile,
|
|
14575
|
-
_b), className);
|
|
14576
14378
|
return (React$1.createElement(React$1.Fragment, null,
|
|
14577
|
-
React$1.createElement("div", __assign$1({ className:
|
|
14379
|
+
React$1.createElement("div", __assign$1({ className: classNames$1('sidebar', (_b = {},
|
|
14380
|
+
_b["sidebar-".concat(colorScheme)] = colorScheme,
|
|
14381
|
+
_b['sidebar-narrow'] = narrow,
|
|
14382
|
+
_b['sidebar-overlaid'] = overlaid,
|
|
14383
|
+
_b["sidebar-".concat(placement)] = placement,
|
|
14384
|
+
_b["sidebar-".concat(position)] = position,
|
|
14385
|
+
_b["sidebar-".concat(size)] = size,
|
|
14386
|
+
_b['sidebar-narrow-unfoldable'] = unfoldable,
|
|
14387
|
+
_b.show = _visible === true && mobile,
|
|
14388
|
+
_b.hide = _visible === false && !mobile,
|
|
14389
|
+
_b), className) }, rest, { ref: forkedRef }), children),
|
|
14578
14390
|
typeof window !== 'undefined' &&
|
|
14579
14391
|
mobile &&
|
|
14580
14392
|
ReactDOM.createPortal(React$1.createElement(CBackdrop, { className: "sidebar-backdrop", visible: _visible }), document.body)));
|
|
@@ -14598,8 +14410,7 @@ CSidebar.displayName = 'CSidebar';
|
|
|
14598
14410
|
|
|
14599
14411
|
var CSidebarBrand = React$1.forwardRef(function (_a, ref) {
|
|
14600
14412
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
14601
|
-
|
|
14602
|
-
return (React$1.createElement("div", __assign$1({ className: _className, ref: ref }, rest), children));
|
|
14413
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-brand', className), ref: ref }, rest), children));
|
|
14603
14414
|
});
|
|
14604
14415
|
CSidebarBrand.propTypes = {
|
|
14605
14416
|
children: propTypesExports.node,
|
|
@@ -14609,8 +14420,7 @@ CSidebarBrand.displayName = 'CSidebarBrand';
|
|
|
14609
14420
|
|
|
14610
14421
|
var CSidebarFooter = React$1.forwardRef(function (_a, ref) {
|
|
14611
14422
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
14612
|
-
|
|
14613
|
-
return (React$1.createElement("div", __assign$1({ className: _className, ref: ref }, rest), children));
|
|
14423
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-footer', className), ref: ref }, rest), children));
|
|
14614
14424
|
});
|
|
14615
14425
|
CSidebarFooter.propTypes = {
|
|
14616
14426
|
children: propTypesExports.node,
|
|
@@ -14620,8 +14430,7 @@ CSidebarFooter.displayName = 'CSidebarFooter';
|
|
|
14620
14430
|
|
|
14621
14431
|
var CSidebarToggler = React$1.forwardRef(function (_a, ref) {
|
|
14622
14432
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
14623
|
-
|
|
14624
|
-
return (React$1.createElement("button", __assign$1({ className: _className, ref: ref }, rest), children));
|
|
14433
|
+
return (React$1.createElement("button", __assign$1({ className: classNames$1('sidebar-toggler', className), ref: ref }, rest), children));
|
|
14625
14434
|
});
|
|
14626
14435
|
CSidebarToggler.propTypes = {
|
|
14627
14436
|
children: propTypesExports.node,
|
|
@@ -14631,8 +14440,7 @@ CSidebarToggler.displayName = 'CSidebarToggler';
|
|
|
14631
14440
|
|
|
14632
14441
|
var CSidebarHeader = React$1.forwardRef(function (_a, ref) {
|
|
14633
14442
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
14634
|
-
|
|
14635
|
-
return (React$1.createElement("div", __assign$1({ className: _className, ref: ref }, rest), children));
|
|
14443
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('sidebar-header', className), ref: ref }, rest), children));
|
|
14636
14444
|
});
|
|
14637
14445
|
CSidebarHeader.propTypes = {
|
|
14638
14446
|
children: propTypesExports.node,
|
|
@@ -14642,8 +14450,7 @@ CSidebarHeader.displayName = 'CSidebarHeader';
|
|
|
14642
14450
|
|
|
14643
14451
|
var CTabContent = React$1.forwardRef(function (_a, ref) {
|
|
14644
14452
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
14645
|
-
|
|
14646
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
14453
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('tab-content', className) }, rest, { ref: ref }), children));
|
|
14647
14454
|
});
|
|
14648
14455
|
CTabContent.propTypes = {
|
|
14649
14456
|
children: propTypesExports.node,
|
|
@@ -14655,16 +14462,10 @@ var CTabPane = React$1.forwardRef(function (_a, ref) {
|
|
|
14655
14462
|
var children = _a.children, className = _a.className, onHide = _a.onHide, onShow = _a.onShow, visible = _a.visible, rest = __rest$1(_a, ["children", "className", "onHide", "onShow", "visible"]);
|
|
14656
14463
|
var tabPaneRef = React$1.useRef();
|
|
14657
14464
|
var forkedRef = useForkedRef(ref, tabPaneRef);
|
|
14658
|
-
|
|
14659
|
-
|
|
14660
|
-
|
|
14661
|
-
|
|
14662
|
-
active: visible,
|
|
14663
|
-
}, className);
|
|
14664
|
-
return (React$1.createElement(Transition$1, { in: visible, nodeRef: tabPaneRef, onEnter: onShow, onExit: onHide, timeout: 150 }, function (state) {
|
|
14665
|
-
var transitionClass = getTransitionClass(state);
|
|
14666
|
-
return (React$1.createElement("div", __assign$1({ className: classNames$1(_className, transitionClass) }, rest, { ref: forkedRef }), children));
|
|
14667
|
-
}));
|
|
14465
|
+
return (React$1.createElement(Transition$1, { in: visible, nodeRef: tabPaneRef, onEnter: onShow, onExit: onHide, timeout: 150 }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('tab-pane', 'fade', {
|
|
14466
|
+
active: visible,
|
|
14467
|
+
show: state === 'entered',
|
|
14468
|
+
}, className) }, rest, { ref: forkedRef }), children)); }));
|
|
14668
14469
|
});
|
|
14669
14470
|
CTabPane.propTypes = {
|
|
14670
14471
|
children: propTypesExports.node,
|
|
@@ -14677,11 +14478,10 @@ CTabPane.displayName = 'CTabPane';
|
|
|
14677
14478
|
|
|
14678
14479
|
var CToastContext = React$1.createContext({});
|
|
14679
14480
|
var CToast = React$1.forwardRef(function (_a, ref) {
|
|
14680
|
-
var _b;
|
|
14681
|
-
var children = _a.children, _c = _a.animation, animation = _c === void 0 ? true : _c, _d = _a.autohide, autohide = _d === void 0 ? true : _d, className = _a.className, color = _a.color, _e = _a.delay, delay = _e === void 0 ? 5000 : _e, index = _a.index, key = _a.key, _f = _a.visible, visible = _f === void 0 ? false : _f, onClose = _a.onClose, onShow = _a.onShow, rest = __rest$1(_a, ["children", "animation", "autohide", "className", "color", "delay", "index", "key", "visible", "onClose", "onShow"]);
|
|
14481
|
+
var children = _a.children, _b = _a.animation, animation = _b === void 0 ? true : _b, _c = _a.autohide, autohide = _c === void 0 ? true : _c, className = _a.className, color = _a.color, _d = _a.delay, delay = _d === void 0 ? 5000 : _d, index = _a.index, key = _a.key, _e = _a.visible, visible = _e === void 0 ? false : _e, onClose = _a.onClose, onShow = _a.onShow, rest = __rest$1(_a, ["children", "animation", "autohide", "className", "color", "delay", "index", "key", "visible", "onClose", "onShow"]);
|
|
14682
14482
|
var toastRef = React$1.useRef();
|
|
14683
14483
|
var forkedRef = useForkedRef(ref, toastRef);
|
|
14684
|
-
var
|
|
14484
|
+
var _f = React$1.useState(false), _visible = _f[0], setVisible = _f[1];
|
|
14685
14485
|
var timeout = React$1.useRef();
|
|
14686
14486
|
React$1.useEffect(function () {
|
|
14687
14487
|
setVisible(visible);
|
|
@@ -14703,25 +14503,17 @@ var CToast = React$1.forwardRef(function (_a, ref) {
|
|
|
14703
14503
|
}, delay);
|
|
14704
14504
|
}
|
|
14705
14505
|
};
|
|
14706
|
-
|
|
14707
|
-
|
|
14708
|
-
},
|
|
14709
|
-
_b["bg-".concat(color)] = color,
|
|
14710
|
-
_b['border-0'] = color,
|
|
14711
|
-
_b), className);
|
|
14712
|
-
var getTransitionClass = function (state) {
|
|
14713
|
-
return state === 'entering'
|
|
14714
|
-
? 'showing'
|
|
14715
|
-
: state === 'entered'
|
|
14716
|
-
? 'show'
|
|
14717
|
-
: state === 'exiting'
|
|
14718
|
-
? 'showing'
|
|
14719
|
-
: 'fade';
|
|
14720
|
-
};
|
|
14721
|
-
return (React$1.createElement(Transition$1, { in: _visible, nodeRef: toastRef, onEnter: function () { return onShow && onShow(index ? index : null); }, onExited: function () { return onClose && onClose(index ? index : null); }, timeout: 250, unmountOnExit: true }, function (state) {
|
|
14722
|
-
var transitionClass = getTransitionClass(state);
|
|
14506
|
+
return (React$1.createElement(Transition$1, { in: _visible, nodeRef: toastRef, onEnter: function () { return onShow && onShow(index !== null && index !== void 0 ? index : null); }, onExited: function () { return onClose && onClose(index !== null && index !== void 0 ? index : null); }, timeout: 250, unmountOnExit: true }, function (state) {
|
|
14507
|
+
var _a;
|
|
14723
14508
|
return (React$1.createElement(CToastContext.Provider, { value: contextValues },
|
|
14724
|
-
React$1.createElement("div", __assign$1({ className: classNames$1(
|
|
14509
|
+
React$1.createElement("div", __assign$1({ className: classNames$1('toast', (_a = {
|
|
14510
|
+
fade: animation
|
|
14511
|
+
},
|
|
14512
|
+
_a["bg-".concat(color)] = color,
|
|
14513
|
+
_a['border-0'] = color,
|
|
14514
|
+
_a['show showing'] = state === 'entering' || state === 'exiting',
|
|
14515
|
+
_a.show = state === 'entered',
|
|
14516
|
+
_a), className), "aria-live": "assertive", "aria-atomic": "true", role: "alert", onMouseEnter: function () { return clearTimeout(timeout.current); }, onMouseLeave: function () { return _autohide(); } }, rest, { key: key, ref: forkedRef }), children)));
|
|
14725
14517
|
}));
|
|
14726
14518
|
});
|
|
14727
14519
|
CToast.propTypes = {
|
|
@@ -14741,8 +14533,7 @@ CToast.displayName = 'CToast';
|
|
|
14741
14533
|
|
|
14742
14534
|
var CToastBody = React$1.forwardRef(function (_a, ref) {
|
|
14743
14535
|
var children = _a.children, className = _a.className, rest = __rest$1(_a, ["children", "className"]);
|
|
14744
|
-
|
|
14745
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }), children));
|
|
14536
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('toast-body', className) }, rest, { ref: ref }), children));
|
|
14746
14537
|
});
|
|
14747
14538
|
CToastBody.propTypes = {
|
|
14748
14539
|
children: propTypesExports.node,
|
|
@@ -14760,8 +14551,7 @@ CToastClose.displayName = 'CToastClose';
|
|
|
14760
14551
|
|
|
14761
14552
|
var CToastHeader = React$1.forwardRef(function (_a, ref) {
|
|
14762
14553
|
var children = _a.children, className = _a.className, closeButton = _a.closeButton, rest = __rest$1(_a, ["children", "className", "closeButton"]);
|
|
14763
|
-
|
|
14764
|
-
return (React$1.createElement("div", __assign$1({ className: _className }, rest, { ref: ref }),
|
|
14554
|
+
return (React$1.createElement("div", __assign$1({ className: classNames$1('toast-header', className) }, rest, { ref: ref }),
|
|
14765
14555
|
children,
|
|
14766
14556
|
closeButton && React$1.createElement(CToastClose, null)));
|
|
14767
14557
|
});
|
|
@@ -14791,23 +14581,17 @@ var CToaster = React$1.forwardRef(function (_a, ref) {
|
|
|
14791
14581
|
}),
|
|
14792
14582
|
], false); });
|
|
14793
14583
|
};
|
|
14794
|
-
|
|
14795
|
-
|
|
14796
|
-
|
|
14797
|
-
|
|
14798
|
-
|
|
14799
|
-
|
|
14800
|
-
|
|
14801
|
-
|
|
14802
|
-
|
|
14803
|
-
|
|
14804
|
-
|
|
14805
|
-
children,
|
|
14806
|
-
toasts.map(function (toast) { return React$1.cloneElement(toast, { visible: true }); }))) : null;
|
|
14807
|
-
};
|
|
14808
|
-
return typeof window !== 'undefined' && placement
|
|
14809
|
-
? ReactDOM.createPortal(toaster(ref), document.body)
|
|
14810
|
-
: toaster(ref);
|
|
14584
|
+
return (React$1.createElement(CConditionalPortal, { portal: typeof placement === 'string' }, toasts.length > 0 || children ? (React$1.createElement("div", __assign$1({ className: classNames$1('toaster toast-container p-3', {
|
|
14585
|
+
'position-fixed': placement,
|
|
14586
|
+
'top-0': placement && placement.includes('top'),
|
|
14587
|
+
'top-50 translate-middle-y': placement && placement.includes('middle'),
|
|
14588
|
+
'bottom-0': placement && placement.includes('bottom'),
|
|
14589
|
+
'start-0': placement && placement.includes('start'),
|
|
14590
|
+
'start-50 translate-middle-x': placement && placement.includes('center'),
|
|
14591
|
+
'end-0': placement && placement.includes('end'),
|
|
14592
|
+
}, className) }, rest, { ref: ref }),
|
|
14593
|
+
children,
|
|
14594
|
+
toasts.map(function (toast) { return React$1.cloneElement(toast, { visible: true }); }))) : null));
|
|
14811
14595
|
});
|
|
14812
14596
|
CToaster.propTypes = {
|
|
14813
14597
|
children: propTypesExports.node,
|
|
@@ -14852,15 +14636,6 @@ var CTooltip = function (_a) {
|
|
|
14852
14636
|
React$1.useEffect(function () {
|
|
14853
14637
|
setVisible(visible);
|
|
14854
14638
|
}, [visible]);
|
|
14855
|
-
var getTransitionClass = function (state) {
|
|
14856
|
-
return state === 'entering'
|
|
14857
|
-
? 'fade'
|
|
14858
|
-
: state === 'entered'
|
|
14859
|
-
? 'fade show'
|
|
14860
|
-
: state === 'exiting'
|
|
14861
|
-
? 'fade'
|
|
14862
|
-
: 'fade';
|
|
14863
|
-
};
|
|
14864
14639
|
return (React$1.createElement(React$1.Fragment, null,
|
|
14865
14640
|
React$1.cloneElement(children, __assign$1(__assign$1(__assign$1({ ref: setReferenceElement }, ((trigger === 'click' || trigger.includes('click')) && {
|
|
14866
14641
|
onClick: function () { return setVisible(!_visible); },
|
|
@@ -14875,12 +14650,11 @@ var CTooltip = function (_a) {
|
|
|
14875
14650
|
ReactDOM.createPortal(React$1.createElement(Transition$1, { in: _visible, mountOnEnter: true, nodeRef: tooltipRef, onEnter: onShow, onExit: onHide, timeout: {
|
|
14876
14651
|
enter: 0,
|
|
14877
14652
|
exit: 200,
|
|
14878
|
-
}, unmountOnExit: true }, function (state) {
|
|
14879
|
-
|
|
14880
|
-
|
|
14881
|
-
|
|
14882
|
-
|
|
14883
|
-
}), document.body)));
|
|
14653
|
+
}, unmountOnExit: true }, function (state) { return (React$1.createElement("div", __assign$1({ className: classNames$1('tooltip', "bs-popover-".concat(placement.replace('left', 'start').replace('right', 'end')), 'fade', {
|
|
14654
|
+
show: state === 'entered',
|
|
14655
|
+
}, className), ref: setPopperElement, role: "tooltip", style: styles.popper }, attributes.popper, rest),
|
|
14656
|
+
React$1.createElement("div", { className: "tooltip-arrow", style: styles.arrow, ref: setArrowElement }),
|
|
14657
|
+
React$1.createElement("div", { className: "tooltip-inner" }, content))); }), document.body)));
|
|
14884
14658
|
};
|
|
14885
14659
|
CTooltip.propTypes = {
|
|
14886
14660
|
children: propTypesExports.node,
|
|
@@ -14897,8 +14671,7 @@ CTooltip.displayName = 'CTooltip';
|
|
|
14897
14671
|
var CWidgetStatsA = React$1.forwardRef(function (_a, ref) {
|
|
14898
14672
|
var _b;
|
|
14899
14673
|
var action = _a.action, chart = _a.chart, className = _a.className, color = _a.color, title = _a.title, value = _a.value, rest = __rest$1(_a, ["action", "chart", "className", "color", "title", "value"]);
|
|
14900
|
-
|
|
14901
|
-
return (React$1.createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
14674
|
+
return (React$1.createElement(CCard, __assign$1({ className: classNames$1((_b = {}, _b["bg-".concat(color)] = color, _b['text-high-emphasis-inverse'] = color, _b), className) }, rest, { ref: ref }),
|
|
14902
14675
|
React$1.createElement(CCardBody, { className: "pb-0 d-flex justify-content-between align-items-start" },
|
|
14903
14676
|
React$1.createElement("div", null,
|
|
14904
14677
|
value && React$1.createElement("div", { className: "fs-4 fw-semibold" }, value),
|
|
@@ -14959,12 +14732,10 @@ CWidgetStatsC.displayName = 'CWidgetStatsCWidgetStatsC';
|
|
|
14959
14732
|
var CWidgetStatsD = React$1.forwardRef(function (_a, ref) {
|
|
14960
14733
|
var _b;
|
|
14961
14734
|
var className = _a.className, chart = _a.chart, color = _a.color, icon = _a.icon, values = _a.values, rest = __rest$1(_a, ["className", "chart", "color", "icon", "values"]);
|
|
14962
|
-
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
|
|
14966
|
-
return (React$1.createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
14967
|
-
React$1.createElement(CCardHeader, { className: classNameHeader },
|
|
14735
|
+
return (React$1.createElement(CCard, __assign$1({ className: className }, rest, { ref: ref }),
|
|
14736
|
+
React$1.createElement(CCardHeader, { className: classNames$1('position-relative d-flex justify-content-center align-items-center', (_b = {},
|
|
14737
|
+
_b["bg-".concat(color)] = color,
|
|
14738
|
+
_b)) },
|
|
14968
14739
|
icon,
|
|
14969
14740
|
chart),
|
|
14970
14741
|
React$1.createElement(CCardBody, { className: "row text-center" }, values &&
|
|
@@ -14987,8 +14758,7 @@ CWidgetStatsD.displayName = 'CWidgetStatsD';
|
|
|
14987
14758
|
|
|
14988
14759
|
var CWidgetStatsE = React$1.forwardRef(function (_a, ref) {
|
|
14989
14760
|
var chart = _a.chart, className = _a.className, title = _a.title, value = _a.value, rest = __rest$1(_a, ["chart", "className", "title", "value"]);
|
|
14990
|
-
|
|
14991
|
-
return (React$1.createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
14761
|
+
return (React$1.createElement(CCard, __assign$1({ className: classNames$1(className) }, rest, { ref: ref }),
|
|
14992
14762
|
React$1.createElement(CCardBody, { className: "text-center" },
|
|
14993
14763
|
title && (React$1.createElement("div", { className: "text-medium-emphasis small text-uppercase fw-semibold" }, title)),
|
|
14994
14764
|
value && React$1.createElement("div", { className: "fs-6 fw-semibold py-3" }, value),
|
|
@@ -15005,8 +14775,7 @@ CWidgetStatsE.displayName = 'CWidgetStatsE';
|
|
|
15005
14775
|
|
|
15006
14776
|
var CWidgetStatsF = React$1.forwardRef(function (_a, ref) {
|
|
15007
14777
|
var className = _a.className, color = _a.color, footer = _a.footer, icon = _a.icon, _b = _a.padding, padding = _b === void 0 ? true : _b, title = _a.title, value = _a.value, rest = __rest$1(_a, ["className", "color", "footer", "icon", "padding", "title", "value"]);
|
|
15008
|
-
|
|
15009
|
-
return (React$1.createElement(CCard, __assign$1({ className: _className }, rest, { ref: ref }),
|
|
14778
|
+
return (React$1.createElement(CCard, __assign$1({ className: className }, rest, { ref: ref }),
|
|
15010
14779
|
React$1.createElement(CCardBody, { className: "d-flex align-items-center ".concat(padding === false && 'p-0') },
|
|
15011
14780
|
React$1.createElement("div", { className: "me-3 text-white bg-".concat(color, " ").concat(padding ? 'p-3' : 'p-4') }, icon),
|
|
15012
14781
|
React$1.createElement("div", null,
|
|
@@ -15060,6 +14829,7 @@ exports.CCarouselItem = CCarouselItem;
|
|
|
15060
14829
|
exports.CCloseButton = CCloseButton;
|
|
15061
14830
|
exports.CCol = CCol;
|
|
15062
14831
|
exports.CCollapse = CCollapse;
|
|
14832
|
+
exports.CConditionalPortal = CConditionalPortal;
|
|
15063
14833
|
exports.CContainer = CContainer;
|
|
15064
14834
|
exports.CDatePicker = CDatePicker;
|
|
15065
14835
|
exports.CDateRangePicker = CDateRangePicker;
|