@openedx/paragon 21.12.1 → 21.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionRow/index.js +7 -8
- package/dist/ActionRow/index.js.map +1 -1
- package/dist/Alert/index.js +33 -25
- package/dist/Alert/index.js.map +1 -1
- package/dist/Annotation/index.js +7 -9
- package/dist/Annotation/index.js.map +1 -1
- package/dist/Avatar/index.js +5 -7
- package/dist/Avatar/index.js.map +1 -1
- package/dist/AvatarButton/index.js +10 -12
- package/dist/AvatarButton/index.js.map +1 -1
- package/dist/Badge/index.js +6 -4
- package/dist/Badge/index.js.map +1 -1
- package/dist/Breadcrumb/BreadcrumbLink.js +11 -14
- package/dist/Breadcrumb/BreadcrumbLink.js.map +1 -1
- package/dist/Breadcrumb/index.js +29 -29
- package/dist/Breadcrumb/index.js.map +1 -1
- package/dist/Bubble/index.js +11 -13
- package/dist/Bubble/index.js.map +1 -1
- package/dist/Button/deprecated/index.js +87 -66
- package/dist/Button/deprecated/index.js.map +1 -1
- package/dist/Button/index.js +10 -11
- package/dist/Button/index.js.map +1 -1
- package/dist/Card/CardBody.js +4 -6
- package/dist/Card/CardBody.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarousel.js +11 -13
- package/dist/Card/CardCarousel/CardCarousel.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarouselControls.js +6 -7
- package/dist/Card/CardCarousel/CardCarouselControls.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarouselHeader.js +9 -12
- package/dist/Card/CardCarousel/CardCarouselHeader.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarouselItems.js +6 -9
- package/dist/Card/CardCarousel/CardCarouselItems.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarouselProvider.js +27 -28
- package/dist/Card/CardCarousel/CardCarouselProvider.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarouselSubtitle.js +4 -6
- package/dist/Card/CardCarousel/CardCarouselSubtitle.js.map +1 -1
- package/dist/Card/CardCarousel/CardCarouselTitle.js +4 -6
- package/dist/Card/CardCarousel/CardCarouselTitle.js.map +1 -1
- package/dist/Card/CardContext.js +8 -10
- package/dist/Card/CardContext.js.map +1 -1
- package/dist/Card/CardDeck.js +19 -17
- package/dist/Card/CardDeck.js.map +1 -1
- package/dist/Card/CardDivider.js +3 -5
- package/dist/Card/CardDivider.js.map +1 -1
- package/dist/Card/CardFooter.js +15 -18
- package/dist/Card/CardFooter.js.map +1 -1
- package/dist/Card/CardGrid.js +13 -11
- package/dist/Card/CardGrid.js.map +1 -1
- package/dist/Card/CardHeader.js +17 -22
- package/dist/Card/CardHeader.js.map +1 -1
- package/dist/Card/CardImageCap.js +48 -33
- package/dist/Card/CardImageCap.js.map +1 -1
- package/dist/Card/CardSection.js +11 -14
- package/dist/Card/CardSection.js.map +1 -1
- package/dist/Card/CardStatus.js +11 -14
- package/dist/Card/CardStatus.js.map +1 -1
- package/dist/Card/index.js +18 -20
- package/dist/Card/index.js.map +1 -1
- package/dist/Carousel/index.js +17 -11
- package/dist/Carousel/index.js.map +1 -1
- package/dist/CheckBox/index.js +66 -36
- package/dist/CheckBox/index.js.map +1 -1
- package/dist/Chip/index.js +14 -16
- package/dist/Chip/index.js.map +1 -1
- package/dist/ChipCarousel/index.js +29 -30
- package/dist/ChipCarousel/index.js.map +1 -1
- package/dist/Collapsible/CollapsibleAdvanced.js +82 -62
- package/dist/Collapsible/CollapsibleAdvanced.js.map +1 -1
- package/dist/Collapsible/CollapsibleBody.js +13 -15
- package/dist/Collapsible/CollapsibleBody.js.map +1 -1
- package/dist/Collapsible/CollapsibleTrigger.js +18 -20
- package/dist/Collapsible/CollapsibleTrigger.js.map +1 -1
- package/dist/Collapsible/CollapsibleVisible.js +6 -9
- package/dist/Collapsible/CollapsibleVisible.js.map +1 -1
- package/dist/Collapsible/index.js +17 -18
- package/dist/Collapsible/index.js.map +1 -1
- package/dist/ColorPicker/index.js +58 -33
- package/dist/ColorPicker/index.js.map +1 -1
- package/dist/Container/index.js +8 -9
- package/dist/Container/index.js.map +1 -1
- package/dist/DataTable/ActionDisplay.js +8 -9
- package/dist/DataTable/ActionDisplay.js.map +1 -1
- package/dist/DataTable/BulkActions.js +23 -20
- package/dist/DataTable/BulkActions.js.map +1 -1
- package/dist/DataTable/CardView.js +46 -43
- package/dist/DataTable/CardView.js.map +1 -1
- package/dist/DataTable/CollapsibleButtonGroup.js +57 -39
- package/dist/DataTable/CollapsibleButtonGroup.js.map +1 -1
- package/dist/DataTable/DataTableContext.js +1 -1
- package/dist/DataTable/DataTableContext.js.map +1 -1
- package/dist/DataTable/DataTableLayout.js +6 -9
- package/dist/DataTable/DataTableLayout.js.map +1 -1
- package/dist/DataTable/DataViewToggle.js +25 -20
- package/dist/DataTable/DataViewToggle.js.map +1 -1
- package/dist/DataTable/DropdownFilters.js +41 -28
- package/dist/DataTable/DropdownFilters.js.map +1 -1
- package/dist/DataTable/EmptyTable.js +6 -9
- package/dist/DataTable/EmptyTable.js.map +1 -1
- package/dist/DataTable/ExpandAll.js +2 -4
- package/dist/DataTable/ExpandAll.js.map +1 -1
- package/dist/DataTable/ExpandRow.js +2 -4
- package/dist/DataTable/ExpandRow.js.map +1 -1
- package/dist/DataTable/FilterStatus.js +18 -17
- package/dist/DataTable/FilterStatus.js.map +1 -1
- package/dist/DataTable/RowStatus.js +15 -18
- package/dist/DataTable/RowStatus.js.map +1 -1
- package/dist/DataTable/SidebarFilters.js +16 -13
- package/dist/DataTable/SidebarFilters.js.map +1 -1
- package/dist/DataTable/SmartStatus.js +14 -16
- package/dist/DataTable/SmartStatus.js.map +1 -1
- package/dist/DataTable/Table.js +17 -19
- package/dist/DataTable/Table.js.map +1 -1
- package/dist/DataTable/TableActions.js +11 -13
- package/dist/DataTable/TableActions.js.map +1 -1
- package/dist/DataTable/TableCell.js +6 -10
- package/dist/DataTable/TableCell.js.map +1 -1
- package/dist/DataTable/TableControlBar.js +7 -12
- package/dist/DataTable/TableControlBar.js.map +1 -1
- package/dist/DataTable/TableFilters.js +14 -12
- package/dist/DataTable/TableFilters.js.map +1 -1
- package/dist/DataTable/TableFooter.js +5 -8
- package/dist/DataTable/TableFooter.js.map +1 -1
- package/dist/DataTable/TableHeaderCell.js +11 -15
- package/dist/DataTable/TableHeaderCell.js.map +1 -1
- package/dist/DataTable/TableHeaderRow.js +6 -4
- package/dist/DataTable/TableHeaderRow.js.map +1 -1
- package/dist/DataTable/TablePagination.js +8 -7
- package/dist/DataTable/TablePagination.js.map +1 -1
- package/dist/DataTable/TablePaginationMinimal.js +9 -8
- package/dist/DataTable/TablePaginationMinimal.js.map +1 -1
- package/dist/DataTable/TableRow.js +15 -18
- package/dist/DataTable/TableRow.js.map +1 -1
- package/dist/DataTable/filters/CheckboxFilter.js +23 -22
- package/dist/DataTable/filters/CheckboxFilter.js.map +1 -1
- package/dist/DataTable/filters/DropdownFilter.js +14 -19
- package/dist/DataTable/filters/DropdownFilter.js.map +1 -1
- package/dist/DataTable/filters/MultiSelectDropdownFilter.js +19 -20
- package/dist/DataTable/filters/MultiSelectDropdownFilter.js.map +1 -1
- package/dist/DataTable/filters/TextFilter.js +10 -13
- package/dist/DataTable/filters/TextFilter.js.map +1 -1
- package/dist/DataTable/hooks.js +29 -25
- package/dist/DataTable/hooks.js.map +1 -1
- package/dist/DataTable/index.js +120 -104
- package/dist/DataTable/index.js.map +1 -1
- package/dist/DataTable/selection/BaseSelectionStatus.js +29 -31
- package/dist/DataTable/selection/BaseSelectionStatus.js.map +1 -1
- package/dist/DataTable/selection/ControlledSelect.js +13 -9
- package/dist/DataTable/selection/ControlledSelect.js.map +1 -1
- package/dist/DataTable/selection/ControlledSelectHeader.js +19 -15
- package/dist/DataTable/selection/ControlledSelectHeader.js.map +1 -1
- package/dist/DataTable/selection/ControlledSelectionStatus.js +34 -24
- package/dist/DataTable/selection/ControlledSelectionStatus.js.map +1 -1
- package/dist/DataTable/selection/SelectionStatus.js +23 -23
- package/dist/DataTable/selection/SelectionStatus.js.map +1 -1
- package/dist/DataTable/utils/getVisibleColumns.js +36 -44
- package/dist/DataTable/utils/getVisibleColumns.js.map +1 -1
- package/dist/Dropdown/deprecated/DropdownButton.js +9 -13
- package/dist/Dropdown/deprecated/DropdownButton.js.map +1 -1
- package/dist/Dropdown/deprecated/DropdownItem.js +7 -8
- package/dist/Dropdown/deprecated/DropdownItem.js.map +1 -1
- package/dist/Dropdown/deprecated/DropdownMenu.js +8 -12
- package/dist/Dropdown/deprecated/DropdownMenu.js.map +1 -1
- package/dist/Dropdown/deprecated/index.js +136 -103
- package/dist/Dropdown/deprecated/index.js.map +1 -1
- package/dist/Dropdown/index.js +32 -29
- package/dist/Dropdown/index.js.map +1 -1
- package/dist/Dropzone/DefaultContent.js +13 -13
- package/dist/Dropzone/DefaultContent.js.map +1 -1
- package/dist/Dropzone/DragError.js +1 -3
- package/dist/Dropzone/DragError.js.map +1 -1
- package/dist/Dropzone/GenericError.js +7 -7
- package/dist/Dropzone/GenericError.js.map +1 -1
- package/dist/Dropzone/UploadProgress.js +6 -8
- package/dist/Dropzone/UploadProgress.js.map +1 -1
- package/dist/Dropzone/index.js +145 -86
- package/dist/Dropzone/index.js.map +1 -1
- package/dist/Fieldset/index.js +82 -57
- package/dist/Fieldset/index.js.map +1 -1
- package/dist/Form/FormAutosuggest.js +137 -95
- package/dist/Form/FormAutosuggest.js.map +1 -1
- package/dist/Form/FormAutosuggestOption.js +4 -6
- package/dist/Form/FormAutosuggestOption.js.map +1 -1
- package/dist/Form/FormCheckbox.js +35 -42
- package/dist/Form/FormCheckbox.js.map +1 -1
- package/dist/Form/FormCheckboxSet.js +13 -16
- package/dist/Form/FormCheckboxSet.js.map +1 -1
- package/dist/Form/FormCheckboxSetContext.js +39 -34
- package/dist/Form/FormCheckboxSetContext.js.map +1 -1
- package/dist/Form/FormControl.js +41 -35
- package/dist/Form/FormControl.js.map +1 -1
- package/dist/Form/FormControlDecorator.js +3 -5
- package/dist/Form/FormControlDecorator.js.map +1 -1
- package/dist/Form/FormControlDecoratorGroup.js +8 -10
- package/dist/Form/FormControlDecoratorGroup.js.map +1 -1
- package/dist/Form/FormControlFeedback.js +12 -15
- package/dist/Form/FormControlFeedback.js.map +1 -1
- package/dist/Form/FormControlFloatingLabel.js +3 -6
- package/dist/Form/FormControlFloatingLabel.js.map +1 -1
- package/dist/Form/FormControlSet.js +8 -9
- package/dist/Form/FormControlSet.js.map +1 -1
- package/dist/Form/FormGroup.js +11 -12
- package/dist/Form/FormGroup.js.map +1 -1
- package/dist/Form/FormGroupContext.js +64 -39
- package/dist/Form/FormGroupContext.js.map +1 -1
- package/dist/Form/FormLabel.js +15 -17
- package/dist/Form/FormLabel.js.map +1 -1
- package/dist/Form/FormRadio.js +19 -22
- package/dist/Form/FormRadio.js.map +1 -1
- package/dist/Form/FormRadioSet.js +13 -16
- package/dist/Form/FormRadioSet.js.map +1 -1
- package/dist/Form/FormRadioSetContext.js +39 -34
- package/dist/Form/FormRadioSetContext.js.map +1 -1
- package/dist/Form/FormSwitch.js +16 -20
- package/dist/Form/FormSwitch.js.map +1 -1
- package/dist/Form/FormText.js +20 -29
- package/dist/Form/FormText.js.map +1 -1
- package/dist/Form/useCheckboxSetValues.js +46 -23
- package/dist/Form/useCheckboxSetValues.js.map +1 -1
- package/dist/Hyperlink/index.js +25 -25
- package/dist/Hyperlink/index.js.map +1 -1
- package/dist/Hyperlink/index.scss +2 -2
- package/dist/Icon/index.js +21 -20
- package/dist/Icon/index.js.map +1 -1
- package/dist/IconButton/index.js +30 -32
- package/dist/IconButton/index.js.map +1 -1
- package/dist/IconButtonToggle/index.js +16 -16
- package/dist/IconButtonToggle/index.js.map +1 -1
- package/dist/Input/index.js +122 -92
- package/dist/Input/index.js.map +1 -1
- package/dist/InputSelect/index.js +78 -51
- package/dist/InputSelect/index.js.map +1 -1
- package/dist/InputText/index.js +11 -9
- package/dist/InputText/index.js.map +1 -1
- package/dist/Layout/index.js +33 -29
- package/dist/Layout/index.js.map +1 -1
- package/dist/ListBox/index.js +112 -80
- package/dist/ListBox/index.js.map +1 -1
- package/dist/ListBoxOption/index.js +68 -45
- package/dist/ListBoxOption/index.js.map +1 -1
- package/dist/MailtoLink/index.js +37 -34
- package/dist/MailtoLink/index.js.map +1 -1
- package/dist/Menu/MenuItem.js +13 -14
- package/dist/Menu/MenuItem.js.map +1 -1
- package/dist/Menu/SelectMenu.js +68 -44
- package/dist/Menu/SelectMenu.js.map +1 -1
- package/dist/Menu/index.js +10 -11
- package/dist/Menu/index.js.map +1 -1
- package/dist/Modal/AlertModal.js +5 -7
- package/dist/Modal/AlertModal.js.map +1 -1
- package/dist/Modal/FullscreenModal.js +6 -8
- package/dist/Modal/FullscreenModal.js.map +1 -1
- package/dist/Modal/MarketingModal.js +8 -10
- package/dist/Modal/MarketingModal.js.map +1 -1
- package/dist/Modal/ModalCloseButton.js +13 -15
- package/dist/Modal/ModalCloseButton.js.map +1 -1
- package/dist/Modal/ModalContext.js +13 -13
- package/dist/Modal/ModalContext.js.map +1 -1
- package/dist/Modal/ModalDialog.js +22 -23
- package/dist/Modal/ModalDialog.js.map +1 -1
- package/dist/Modal/ModalDialogBody.js +22 -11
- package/dist/Modal/ModalDialogBody.js.map +1 -1
- package/dist/Modal/ModalDialogFooter.js +6 -7
- package/dist/Modal/ModalDialogFooter.js.map +1 -1
- package/dist/Modal/ModalDialogHeader.js +6 -7
- package/dist/Modal/ModalDialogHeader.js.map +1 -1
- package/dist/Modal/ModalDialogHero.js +6 -7
- package/dist/Modal/ModalDialogHero.js.map +1 -1
- package/dist/Modal/ModalDialogHeroBackground.js +8 -9
- package/dist/Modal/ModalDialogHeroBackground.js.map +1 -1
- package/dist/Modal/ModalDialogHeroContent.js +6 -7
- package/dist/Modal/ModalDialogHeroContent.js.map +1 -1
- package/dist/Modal/ModalDialogTitle.js +6 -7
- package/dist/Modal/ModalDialogTitle.js.map +1 -1
- package/dist/Modal/ModalLayer.js +11 -17
- package/dist/Modal/ModalLayer.js.map +1 -1
- package/dist/Modal/ModalPopup.js +17 -17
- package/dist/Modal/ModalPopup.js.map +1 -1
- package/dist/Modal/PopperElement.js +25 -18
- package/dist/Modal/PopperElement.js.map +1 -1
- package/dist/Modal/Portal.js +40 -18
- package/dist/Modal/Portal.js.map +1 -1
- package/dist/Modal/StandardModal.js +6 -8
- package/dist/Modal/StandardModal.js.map +1 -1
- package/dist/Modal/index.js +215 -187
- package/dist/Modal/index.js.map +1 -1
- package/dist/Nav/index.js +3 -2
- package/dist/Nav/index.js.map +1 -1
- package/dist/Navbar/index.js +7 -6
- package/dist/Navbar/index.js.map +1 -1
- package/dist/OverflowScroll/OverflowScroll.js +45 -37
- package/dist/OverflowScroll/OverflowScroll.js.map +1 -1
- package/dist/OverflowScroll/OverflowScrollContext.js +1 -1
- package/dist/OverflowScroll/OverflowScrollContext.js.map +1 -1
- package/dist/OverflowScroll/OverflowScrollItems.js +2 -4
- package/dist/OverflowScroll/OverflowScrollItems.js.map +1 -1
- package/dist/Overlay/index.js +4 -4
- package/dist/Overlay/index.js.map +1 -1
- package/dist/PageBanner/index.js +11 -13
- package/dist/PageBanner/index.js.map +1 -1
- package/dist/Pagination/index.js +331 -296
- package/dist/Pagination/index.js.map +1 -1
- package/dist/Popover/index.js +11 -14
- package/dist/Popover/index.js.map +1 -1
- package/dist/ProductTour/Checkpoint.js +29 -22
- package/dist/ProductTour/Checkpoint.js.map +1 -1
- package/dist/ProductTour/CheckpointActionRow.js +18 -16
- package/dist/ProductTour/CheckpointActionRow.js.map +1 -1
- package/dist/ProductTour/CheckpointBody.js +2 -4
- package/dist/ProductTour/CheckpointBody.js.map +1 -1
- package/dist/ProductTour/CheckpointBreadcrumbs.js +16 -16
- package/dist/ProductTour/CheckpointBreadcrumbs.js.map +1 -1
- package/dist/ProductTour/CheckpointTitle.js +2 -4
- package/dist/ProductTour/CheckpointTitle.js.map +1 -1
- package/dist/ProductTour/index.js +66 -47
- package/dist/ProductTour/index.js.map +1 -1
- package/dist/ProgressBar/index.js +37 -35
- package/dist/ProgressBar/index.js.map +1 -1
- package/dist/RadioButtonGroup/index.js +133 -102
- package/dist/RadioButtonGroup/index.js.map +1 -1
- package/dist/Scrollable/index.js +30 -15
- package/dist/Scrollable/index.js.map +1 -1
- package/dist/SearchField/SearchFieldAdvanced.js +54 -44
- package/dist/SearchField/SearchFieldAdvanced.js.map +1 -1
- package/dist/SearchField/SearchFieldClearButton.js +7 -8
- package/dist/SearchField/SearchFieldClearButton.js.map +1 -1
- package/dist/SearchField/SearchFieldInput.js +8 -9
- package/dist/SearchField/SearchFieldInput.js.map +1 -1
- package/dist/SearchField/SearchFieldLabel.js +5 -8
- package/dist/SearchField/SearchFieldLabel.js.map +1 -1
- package/dist/SearchField/SearchFieldSubmitButton.js +12 -15
- package/dist/SearchField/SearchFieldSubmitButton.js.map +1 -1
- package/dist/SearchField/index.js +22 -22
- package/dist/SearchField/index.js.map +1 -1
- package/dist/SelectableBox/SelectableBoxSet.js +25 -26
- package/dist/SelectableBox/SelectableBoxSet.js.map +1 -1
- package/dist/SelectableBox/index.js +42 -38
- package/dist/SelectableBox/index.js.map +1 -1
- package/dist/Sheet/SheetContainer.js +38 -16
- package/dist/Sheet/SheetContainer.js.map +1 -1
- package/dist/Sheet/index.js +65 -43
- package/dist/Sheet/index.js.map +1 -1
- package/dist/Spinner/index.js +8 -9
- package/dist/Spinner/index.js.map +1 -1
- package/dist/Stack/index.js +9 -11
- package/dist/Stack/index.js.map +1 -1
- package/dist/StatefulButton/index.js +15 -17
- package/dist/StatefulButton/index.js.map +1 -1
- package/dist/StatusAlert/index.js +120 -82
- package/dist/StatusAlert/index.js.map +1 -1
- package/dist/Stepper/Stepper.js +2 -4
- package/dist/Stepper/Stepper.js.map +1 -1
- package/dist/Stepper/StepperActionRow.js +7 -10
- package/dist/Stepper/StepperActionRow.js.map +1 -1
- package/dist/Stepper/StepperContext.js +64 -32
- package/dist/Stepper/StepperContext.js.map +1 -1
- package/dist/Stepper/StepperHeader.js +23 -30
- package/dist/Stepper/StepperHeader.js.map +1 -1
- package/dist/Stepper/StepperHeaderStep.js +14 -17
- package/dist/Stepper/StepperHeaderStep.js.map +1 -1
- package/dist/Stepper/StepperStep.js +23 -24
- package/dist/Stepper/StepperStep.js.map +1 -1
- package/dist/Sticky/index.js +30 -22
- package/dist/Sticky/index.js.map +1 -1
- package/dist/Table/index.js +178 -109
- package/dist/Table/index.js.map +1 -1
- package/dist/Tabs/deprecated/index.js +99 -66
- package/dist/Tabs/deprecated/index.js.map +1 -1
- package/dist/Tabs/index.js +65 -49
- package/dist/Tabs/index.js.map +1 -1
- package/dist/TextArea/index.js +10 -8
- package/dist/TextArea/index.js.map +1 -1
- package/dist/Toast/ToastContainer.js +38 -16
- package/dist/Toast/ToastContainer.js.map +1 -1
- package/dist/Toast/index.js +33 -18
- package/dist/Toast/index.js.map +1 -1
- package/dist/Tooltip/index.js +8 -9
- package/dist/Tooltip/index.js.map +1 -1
- package/dist/TransitionReplace/DemoTransitionReplace.js +12 -3
- package/dist/TransitionReplace/DemoTransitionReplace.js.map +1 -1
- package/dist/TransitionReplace/index.js +136 -100
- package/dist/TransitionReplace/index.js.map +1 -1
- package/dist/Truncate/index.js +30 -24
- package/dist/Truncate/index.js.map +1 -1
- package/dist/ValidationFormGroup/index.js +38 -37
- package/dist/ValidationFormGroup/index.js.map +1 -1
- package/dist/ValidationMessage/index.js +76 -51
- package/dist/ValidationMessage/index.js.map +1 -1
- package/dist/asInput/index.js +251 -202
- package/dist/asInput/index.js.map +1 -1
- package/dist/hooks/useArrowKeyNavigation.js +46 -43
- package/dist/hooks/useArrowKeyNavigation.js.map +1 -1
- package/dist/hooks/useIndexOfLastVisibleChild.js +40 -26
- package/dist/hooks/useIndexOfLastVisibleChild.js.map +1 -1
- package/dist/hooks/useIsVisible.js +20 -13
- package/dist/hooks/useIsVisible.js.map +1 -1
- package/dist/hooks/useToggle.js +18 -11
- package/dist/hooks/useToggle.js.map +1 -1
- package/dist/hooks/useWindowSize.js +17 -6
- package/dist/hooks/useWindowSize.js.map +1 -1
- package/dist/paragon.css +1 -1
- package/dist/withDeprecatedProps.js +79 -58
- package/dist/withDeprecatedProps.js.map +1 -1
- package/package.json +1 -5
- package/src/Button/index.jsx +2 -2
- package/src/Dropzone/index.jsx +1 -1
- package/src/Hyperlink/index.scss +2 -2
- package/src/Icon/index.jsx +1 -1
- package/src/IconButton/__snapshots__/IconButton.test.jsx.snap +12 -10
- package/src/IconButton/index.jsx +1 -1
- package/src/Menu/MenuItem.jsx +2 -2
- package/src/Overlay/README.md +1 -1
- package/src/Overlay/index.jsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmartStatus.js","names":["React","useContext","DataTableContext","FilterStatusDefault","RowStatusDefault","SelectionStatusDefault","SMART_STATUS_CLASS","SmartStatus","state","SelectionStatusComponent","FilterStatusComponent","RowStatusComponent","showFiltersInSidebar","selectedRowIds","numSelectedRows","Object","keys","length","SelectionStatus","FilterStatus","RowStatus","createElement","className","filters"],"sources":["../../src/DataTable/SmartStatus.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport DataTableContext from './DataTableContext';\nimport FilterStatusDefault from './FilterStatus';\nimport RowStatusDefault from './RowStatus';\nimport SelectionStatusDefault from './selection/SelectionStatus';\n\nconst SMART_STATUS_CLASS = 'pgn__smart-status';\n\nfunction SmartStatus() {\n const {\n state,\n SelectionStatusComponent,\n FilterStatusComponent,\n RowStatusComponent,\n showFiltersInSidebar,\n } = useContext(DataTableContext);\n const { selectedRowIds } = state;\n const numSelectedRows = Object.keys(selectedRowIds || {}).length;\n const SelectionStatus = SelectionStatusComponent || SelectionStatusDefault;\n const FilterStatus = FilterStatusComponent || FilterStatusDefault;\n const RowStatus = RowStatusComponent || RowStatusDefault;\n\n if (numSelectedRows > 0) {\n return (\n <SelectionStatus\n className={SMART_STATUS_CLASS}\n />\n );\n }\n if (state?.filters?.length > 0 && !showFiltersInSidebar) {\n return (\n <FilterStatus\n className={SMART_STATUS_CLASS}\n />\n );\n }\n return (\n <RowStatus\n className={SMART_STATUS_CLASS}\n />\n );\n}\n\nexport default SmartStatus;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,mBAAmB,MAAM,gBAAgB;AAChD,OAAOC,gBAAgB,MAAM,aAAa;AAC1C,OAAOC,sBAAsB,MAAM,6BAA6B;AAEhE,
|
|
1
|
+
{"version":3,"file":"SmartStatus.js","names":["React","useContext","DataTableContext","FilterStatusDefault","RowStatusDefault","SelectionStatusDefault","SMART_STATUS_CLASS","SmartStatus","_state$filters","_useContext","state","SelectionStatusComponent","FilterStatusComponent","RowStatusComponent","showFiltersInSidebar","selectedRowIds","numSelectedRows","Object","keys","length","SelectionStatus","FilterStatus","RowStatus","createElement","className","filters"],"sources":["../../src/DataTable/SmartStatus.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport DataTableContext from './DataTableContext';\nimport FilterStatusDefault from './FilterStatus';\nimport RowStatusDefault from './RowStatus';\nimport SelectionStatusDefault from './selection/SelectionStatus';\n\nconst SMART_STATUS_CLASS = 'pgn__smart-status';\n\nfunction SmartStatus() {\n const {\n state,\n SelectionStatusComponent,\n FilterStatusComponent,\n RowStatusComponent,\n showFiltersInSidebar,\n } = useContext(DataTableContext);\n const { selectedRowIds } = state;\n const numSelectedRows = Object.keys(selectedRowIds || {}).length;\n const SelectionStatus = SelectionStatusComponent || SelectionStatusDefault;\n const FilterStatus = FilterStatusComponent || FilterStatusDefault;\n const RowStatus = RowStatusComponent || RowStatusDefault;\n\n if (numSelectedRows > 0) {\n return (\n <SelectionStatus\n className={SMART_STATUS_CLASS}\n />\n );\n }\n if (state?.filters?.length > 0 && !showFiltersInSidebar) {\n return (\n <FilterStatus\n className={SMART_STATUS_CLASS}\n />\n );\n }\n return (\n <RowStatus\n className={SMART_STATUS_CLASS}\n />\n );\n}\n\nexport default SmartStatus;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,mBAAmB,MAAM,gBAAgB;AAChD,OAAOC,gBAAgB,MAAM,aAAa;AAC1C,OAAOC,sBAAsB,MAAM,6BAA6B;AAEhE,IAAMC,kBAAkB,GAAG,mBAAmB;AAE9C,SAASC,WAAWA,CAAA,EAAG;EAAA,IAAAC,cAAA;EACrB,IAAAC,WAAA,GAMIR,UAAU,CAACC,gBAAgB,CAAC;IAL9BQ,KAAK,GAAAD,WAAA,CAALC,KAAK;IACLC,wBAAwB,GAAAF,WAAA,CAAxBE,wBAAwB;IACxBC,qBAAqB,GAAAH,WAAA,CAArBG,qBAAqB;IACrBC,kBAAkB,GAAAJ,WAAA,CAAlBI,kBAAkB;IAClBC,oBAAoB,GAAAL,WAAA,CAApBK,oBAAoB;EAEtB,IAAQC,cAAc,GAAKL,KAAK,CAAxBK,cAAc;EACtB,IAAMC,eAAe,GAAGC,MAAM,CAACC,IAAI,CAACH,cAAc,IAAI,CAAC,CAAC,CAAC,CAACI,MAAM;EAChE,IAAMC,eAAe,GAAGT,wBAAwB,IAAIN,sBAAsB;EAC1E,IAAMgB,YAAY,GAAGT,qBAAqB,IAAIT,mBAAmB;EACjE,IAAMmB,SAAS,GAAGT,kBAAkB,IAAIT,gBAAgB;EAExD,IAAIY,eAAe,GAAG,CAAC,EAAE;IACvB,oBACEhB,KAAA,CAAAuB,aAAA,CAACH,eAAe;MACdI,SAAS,EAAElB;IAAmB,CAC/B,CAAC;EAEN;EACA,IAAI,CAAAI,KAAK,aAALA,KAAK,wBAAAF,cAAA,GAALE,KAAK,CAAEe,OAAO,cAAAjB,cAAA,uBAAdA,cAAA,CAAgBW,MAAM,IAAG,CAAC,IAAI,CAACL,oBAAoB,EAAE;IACvD,oBACEd,KAAA,CAAAuB,aAAA,CAACF,YAAY;MACXG,SAAS,EAAElB;IAAmB,CAC/B,CAAC;EAEN;EACA,oBACEN,KAAA,CAAAuB,aAAA,CAACD,SAAS;IACRE,SAAS,EAAElB;EAAmB,CAC/B,CAAC;AAEN;AAEA,eAAeC,WAAW"}
|
package/dist/DataTable/Table.js
CHANGED
|
@@ -7,26 +7,24 @@ import TableRow from './TableRow';
|
|
|
7
7
|
import { useRows } from './hooks';
|
|
8
8
|
import DataTableContext from './DataTableContext';
|
|
9
9
|
function Table(_ref) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
row: row,
|
|
27
|
-
key: row.id
|
|
10
|
+
var isStriped = _ref.isStriped;
|
|
11
|
+
var _useRows = useRows(),
|
|
12
|
+
getTableProps = _useRows.getTableProps,
|
|
13
|
+
prepareRow = _useRows.prepareRow,
|
|
14
|
+
displayRows = _useRows.displayRows,
|
|
15
|
+
headerGroups = _useRows.headerGroups,
|
|
16
|
+
getTableBodyProps = _useRows.getTableBodyProps;
|
|
17
|
+
var _useContext = useContext(DataTableContext),
|
|
18
|
+
isLoading = _useContext.isLoading;
|
|
19
|
+
var renderRows = function renderRows() {
|
|
20
|
+
return displayRows.map(function (row) {
|
|
21
|
+
prepareRow(row);
|
|
22
|
+
return /*#__PURE__*/React.createElement(TableRow, {
|
|
23
|
+
row: row,
|
|
24
|
+
key: row.id
|
|
25
|
+
});
|
|
28
26
|
});
|
|
29
|
-
}
|
|
27
|
+
};
|
|
30
28
|
if (!getTableProps) {
|
|
31
29
|
return null;
|
|
32
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","names":["React","useContext","PropTypes","classNames","Spinner","TableHeaderRow","TableRow","useRows","DataTableContext","Table","_ref","isStriped","getTableProps","prepareRow","displayRows","headerGroups","getTableBodyProps","isLoading","renderRows","map","row","createElement","key","id","className","animation","screenReaderText","defaultProps","propTypes","bool"],"sources":["../../src/DataTable/Table.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Spinner from '../Spinner';\nimport TableHeaderRow from './TableHeaderRow';\nimport TableRow from './TableRow';\nimport { useRows } from './hooks';\nimport DataTableContext from './DataTableContext';\n\nfunction Table({\n isStriped,\n}) {\n const {\n getTableProps, prepareRow, displayRows, headerGroups, getTableBodyProps,\n } = useRows();\n const { isLoading } = useContext(DataTableContext);\n\n const renderRows = () => displayRows.map((row) => {\n prepareRow(row);\n return (\n <TableRow row={row} key={row.id} />\n );\n });\n\n if (!getTableProps) {\n return null;\n }\n\n return (\n <div\n className={classNames('pgn__data-table-container', { 'is-loading': isLoading })}\n data-testid=\"data-table-container\"\n >\n {isLoading && (\n <div className=\"pgn__data-table-spinner\" data-testid=\"data-table-spinner\">\n <Spinner animation=\"border\" screenReaderText=\"loading\" />\n </div>\n )}\n <table {...getTableProps({\n className: classNames({ 'pgn__data-table': true, 'is-striped': isStriped }),\n })}\n >\n <TableHeaderRow headerGroups={headerGroups} />\n <tbody {...getTableBodyProps()}>\n {renderRows()}\n </tbody>\n </table>\n </div>\n );\n}\n\nTable.defaultProps = {\n isStriped: true,\n};\n\nTable.propTypes = {\n /** should table rows be striped */\n isStriped: PropTypes.bool,\n};\n\nexport default Table;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,OAAO,MAAM,YAAY;AAChC,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,QAAQ,MAAM,YAAY;AACjC,SAASC,OAAO,QAAQ,SAAS;AACjC,OAAOC,gBAAgB,MAAM,oBAAoB;AAEjD,SAASC,KAAKA,CAAAC,IAAA,EAEX;EAAA,
|
|
1
|
+
{"version":3,"file":"Table.js","names":["React","useContext","PropTypes","classNames","Spinner","TableHeaderRow","TableRow","useRows","DataTableContext","Table","_ref","isStriped","_useRows","getTableProps","prepareRow","displayRows","headerGroups","getTableBodyProps","_useContext","isLoading","renderRows","map","row","createElement","key","id","className","animation","screenReaderText","defaultProps","propTypes","bool"],"sources":["../../src/DataTable/Table.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Spinner from '../Spinner';\nimport TableHeaderRow from './TableHeaderRow';\nimport TableRow from './TableRow';\nimport { useRows } from './hooks';\nimport DataTableContext from './DataTableContext';\n\nfunction Table({\n isStriped,\n}) {\n const {\n getTableProps, prepareRow, displayRows, headerGroups, getTableBodyProps,\n } = useRows();\n const { isLoading } = useContext(DataTableContext);\n\n const renderRows = () => displayRows.map((row) => {\n prepareRow(row);\n return (\n <TableRow row={row} key={row.id} />\n );\n });\n\n if (!getTableProps) {\n return null;\n }\n\n return (\n <div\n className={classNames('pgn__data-table-container', { 'is-loading': isLoading })}\n data-testid=\"data-table-container\"\n >\n {isLoading && (\n <div className=\"pgn__data-table-spinner\" data-testid=\"data-table-spinner\">\n <Spinner animation=\"border\" screenReaderText=\"loading\" />\n </div>\n )}\n <table {...getTableProps({\n className: classNames({ 'pgn__data-table': true, 'is-striped': isStriped }),\n })}\n >\n <TableHeaderRow headerGroups={headerGroups} />\n <tbody {...getTableBodyProps()}>\n {renderRows()}\n </tbody>\n </table>\n </div>\n );\n}\n\nTable.defaultProps = {\n isStriped: true,\n};\n\nTable.propTypes = {\n /** should table rows be striped */\n isStriped: PropTypes.bool,\n};\n\nexport default Table;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,OAAO,MAAM,YAAY;AAChC,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,OAAOC,QAAQ,MAAM,YAAY;AACjC,SAASC,OAAO,QAAQ,SAAS;AACjC,OAAOC,gBAAgB,MAAM,oBAAoB;AAEjD,SAASC,KAAKA,CAAAC,IAAA,EAEX;EAAA,IADDC,SAAS,GAAAD,IAAA,CAATC,SAAS;EAET,IAAAC,QAAA,GAEIL,OAAO,CAAC,CAAC;IADXM,aAAa,GAAAD,QAAA,CAAbC,aAAa;IAAEC,UAAU,GAAAF,QAAA,CAAVE,UAAU;IAAEC,WAAW,GAAAH,QAAA,CAAXG,WAAW;IAAEC,YAAY,GAAAJ,QAAA,CAAZI,YAAY;IAAEC,iBAAiB,GAAAL,QAAA,CAAjBK,iBAAiB;EAEzE,IAAAC,WAAA,GAAsBjB,UAAU,CAACO,gBAAgB,CAAC;IAA1CW,SAAS,GAAAD,WAAA,CAATC,SAAS;EAEjB,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAA;IAAA,OAASL,WAAW,CAACM,GAAG,CAAC,UAACC,GAAG,EAAK;MAChDR,UAAU,CAACQ,GAAG,CAAC;MACf,oBACEtB,KAAA,CAAAuB,aAAA,CAACjB,QAAQ;QAACgB,GAAG,EAAEA,GAAI;QAACE,GAAG,EAAEF,GAAG,CAACG;MAAG,CAAE,CAAC;IAEvC,CAAC,CAAC;EAAA;EAEF,IAAI,CAACZ,aAAa,EAAE;IAClB,OAAO,IAAI;EACb;EAEA,oBACEb,KAAA,CAAAuB,aAAA;IACEG,SAAS,EAAEvB,UAAU,CAAC,2BAA2B,EAAE;MAAE,YAAY,EAAEgB;IAAU,CAAC,CAAE;IAChF,eAAY;EAAsB,GAEjCA,SAAS,iBACRnB,KAAA,CAAAuB,aAAA;IAAKG,SAAS,EAAC,yBAAyB;IAAC,eAAY;EAAoB,gBACvE1B,KAAA,CAAAuB,aAAA,CAACnB,OAAO;IAACuB,SAAS,EAAC,QAAQ;IAACC,gBAAgB,EAAC;EAAS,CAAE,CACrD,CACN,eACD5B,KAAA,CAAAuB,aAAA,UAAWV,aAAa,CAAC;IACvBa,SAAS,EAAEvB,UAAU,CAAC;MAAE,iBAAiB,EAAE,IAAI;MAAE,YAAY,EAAEQ;IAAU,CAAC;EAC5E,CAAC,CAAC,eAEAX,KAAA,CAAAuB,aAAA,CAAClB,cAAc;IAACW,YAAY,EAAEA;EAAa,CAAE,CAAC,eAC9ChB,KAAA,CAAAuB,aAAA,UAAWN,iBAAiB,CAAC,CAAC,EAC3BG,UAAU,CAAC,CACP,CACF,CACJ,CAAC;AAEV;AAEAX,KAAK,CAACoB,YAAY,GAAG;EACnBlB,SAAS,EAAE;AACb,CAAC;AAEDF,KAAK,CAACqB,SAAS,GAAG;EAChB;EACAnB,SAAS,EAAET,SAAS,CAAC6B;AACvB,CAAC;AAED,eAAetB,KAAK"}
|
|
@@ -4,25 +4,23 @@ import classNames from 'classnames';
|
|
|
4
4
|
import DataTableContext from './DataTableContext';
|
|
5
5
|
import Actions from './CollapsibleButtonGroup';
|
|
6
6
|
function TableActions(_ref) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
tableActions
|
|
13
|
-
} = tableInstance;
|
|
14
|
-
const args = {
|
|
15
|
-
tableInstance
|
|
7
|
+
var className = _ref.className;
|
|
8
|
+
var tableInstance = useContext(DataTableContext);
|
|
9
|
+
var tableActions = tableInstance.tableActions;
|
|
10
|
+
var args = {
|
|
11
|
+
tableInstance: tableInstance
|
|
16
12
|
};
|
|
17
13
|
if (typeof tableActions === 'function') {
|
|
18
14
|
return /*#__PURE__*/React.createElement("div", {
|
|
19
15
|
className: classNames('pgn__table-actions', className)
|
|
20
16
|
}, tableActions(tableInstance));
|
|
21
17
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
var actions = tableActions.map(function (action) {
|
|
19
|
+
return {
|
|
20
|
+
component: action,
|
|
21
|
+
args: args
|
|
22
|
+
};
|
|
23
|
+
});
|
|
26
24
|
return /*#__PURE__*/React.createElement(Actions, {
|
|
27
25
|
className: classNames('pgn__table-actions', className),
|
|
28
26
|
"data-testid": "table-actions",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableActions.js","names":["React","useContext","PropTypes","classNames","DataTableContext","Actions","TableActions","_ref","className","tableInstance","tableActions","args","createElement","actions","map","action","component","defaultProps","undefined","propTypes","string"],"sources":["../../src/DataTable/TableActions.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nimport DataTableContext from './DataTableContext';\nimport Actions from './CollapsibleButtonGroup';\n\nfunction TableActions({ className }) {\n const tableInstance = useContext(DataTableContext);\n const { tableActions } = tableInstance;\n\n const args = {\n tableInstance,\n };\n\n if (typeof tableActions === 'function') {\n return <div className={classNames('pgn__table-actions', className)}>{tableActions(tableInstance)}</div>;\n }\n\n const actions = tableActions.map(action => ({ component: action, args }));\n\n return (\n <Actions\n className={classNames('pgn__table-actions', className)}\n data-testid=\"table-actions\"\n actions={actions}\n />\n );\n}\n\nTableActions.defaultProps = {\n className: undefined,\n};\n\nTableActions.propTypes = {\n /** class names for the div wrapping the button components */\n className: PropTypes.string,\n};\n\nexport default TableActions;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,OAAO,MAAM,0BAA0B;AAE9C,SAASC,YAAYA,CAAAC,IAAA,EAAgB;EAAA,
|
|
1
|
+
{"version":3,"file":"TableActions.js","names":["React","useContext","PropTypes","classNames","DataTableContext","Actions","TableActions","_ref","className","tableInstance","tableActions","args","createElement","actions","map","action","component","defaultProps","undefined","propTypes","string"],"sources":["../../src/DataTable/TableActions.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nimport DataTableContext from './DataTableContext';\nimport Actions from './CollapsibleButtonGroup';\n\nfunction TableActions({ className }) {\n const tableInstance = useContext(DataTableContext);\n const { tableActions } = tableInstance;\n\n const args = {\n tableInstance,\n };\n\n if (typeof tableActions === 'function') {\n return <div className={classNames('pgn__table-actions', className)}>{tableActions(tableInstance)}</div>;\n }\n\n const actions = tableActions.map(action => ({ component: action, args }));\n\n return (\n <Actions\n className={classNames('pgn__table-actions', className)}\n data-testid=\"table-actions\"\n actions={actions}\n />\n );\n}\n\nTableActions.defaultProps = {\n className: undefined,\n};\n\nTableActions.propTypes = {\n /** class names for the div wrapping the button components */\n className: PropTypes.string,\n};\n\nexport default TableActions;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,OAAO,MAAM,0BAA0B;AAE9C,SAASC,YAAYA,CAAAC,IAAA,EAAgB;EAAA,IAAbC,SAAS,GAAAD,IAAA,CAATC,SAAS;EAC/B,IAAMC,aAAa,GAAGR,UAAU,CAACG,gBAAgB,CAAC;EAClD,IAAQM,YAAY,GAAKD,aAAa,CAA9BC,YAAY;EAEpB,IAAMC,IAAI,GAAG;IACXF,aAAa,EAAbA;EACF,CAAC;EAED,IAAI,OAAOC,YAAY,KAAK,UAAU,EAAE;IACtC,oBAAOV,KAAA,CAAAY,aAAA;MAAKJ,SAAS,EAAEL,UAAU,CAAC,oBAAoB,EAAEK,SAAS;IAAE,GAAEE,YAAY,CAACD,aAAa,CAAO,CAAC;EACzG;EAEA,IAAMI,OAAO,GAAGH,YAAY,CAACI,GAAG,CAAC,UAAAC,MAAM;IAAA,OAAK;MAAEC,SAAS,EAAED,MAAM;MAAEJ,IAAI,EAAJA;IAAK,CAAC;EAAA,CAAC,CAAC;EAEzE,oBACEX,KAAA,CAAAY,aAAA,CAACP,OAAO;IACNG,SAAS,EAAEL,UAAU,CAAC,oBAAoB,EAAEK,SAAS,CAAE;IACvD,eAAY,eAAe;IAC3BK,OAAO,EAAEA;EAAQ,CAClB,CAAC;AAEN;AAEAP,YAAY,CAACW,YAAY,GAAG;EAC1BT,SAAS,EAAEU;AACb,CAAC;AAEDZ,YAAY,CAACa,SAAS,GAAG;EACvB;EACAX,SAAS,EAAEN,SAAS,CAACkB;AACvB,CAAC;AAED,eAAed,YAAY"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var _excluded = ["className"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -6,15 +6,11 @@ import React from 'react';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
function TableCell(_ref) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const _getCellProps = getCellProps(),
|
|
15
|
-
{
|
|
16
|
-
className
|
|
17
|
-
} = _getCellProps,
|
|
9
|
+
var getCellProps = _ref.getCellProps,
|
|
10
|
+
render = _ref.render,
|
|
11
|
+
column = _ref.column;
|
|
12
|
+
var _getCellProps = getCellProps(),
|
|
13
|
+
className = _getCellProps.className,
|
|
18
14
|
rest = _objectWithoutProperties(_getCellProps, _excluded);
|
|
19
15
|
return /*#__PURE__*/React.createElement("td", _extends({}, rest, {
|
|
20
16
|
className: classNames('pgn__data-table-cell-wrap', className, column.cellClassName)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.js","names":["React","PropTypes","classNames","TableCell","_ref","getCellProps","render","column","_getCellProps","className","rest","_objectWithoutProperties","_excluded","createElement","_extends","cellClassName","propTypes","func","isRequired","shape","string"],"sources":["../../src/DataTable/TableCell.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nfunction TableCell({ getCellProps, render, column }) {\n const { className, ...rest } = getCellProps();\n return (\n <td {...rest} className={classNames('pgn__data-table-cell-wrap', className, column.cellClassName)}>\n {render('Cell')}\n </td>\n );\n}\n\nTableCell.propTypes = {\n /** Props for the td element */\n getCellProps: PropTypes.func.isRequired,\n /** Function that renders the cell contents. Will be called with the string 'Cell' */\n render: PropTypes.func.isRequired,\n /** Table column */\n column: PropTypes.shape({\n /** Class(es) to be applied to the cells in the given column */\n cellClassName: PropTypes.string,\n }).isRequired,\n};\n\nexport default TableCell;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,SAASA,CAAAC,IAAA,EAAmC;EAAA,
|
|
1
|
+
{"version":3,"file":"TableCell.js","names":["React","PropTypes","classNames","TableCell","_ref","getCellProps","render","column","_getCellProps","className","rest","_objectWithoutProperties","_excluded","createElement","_extends","cellClassName","propTypes","func","isRequired","shape","string"],"sources":["../../src/DataTable/TableCell.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nfunction TableCell({ getCellProps, render, column }) {\n const { className, ...rest } = getCellProps();\n return (\n <td {...rest} className={classNames('pgn__data-table-cell-wrap', className, column.cellClassName)}>\n {render('Cell')}\n </td>\n );\n}\n\nTableCell.propTypes = {\n /** Props for the td element */\n getCellProps: PropTypes.func.isRequired,\n /** Function that renders the cell contents. Will be called with the string 'Cell' */\n render: PropTypes.func.isRequired,\n /** Table column */\n column: PropTypes.shape({\n /** Class(es) to be applied to the cells in the given column */\n cellClassName: PropTypes.string,\n }).isRequired,\n};\n\nexport default TableCell;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,SAASA,CAAAC,IAAA,EAAmC;EAAA,IAAhCC,YAAY,GAAAD,IAAA,CAAZC,YAAY;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,MAAM,GAAAH,IAAA,CAANG,MAAM;EAC/C,IAAAC,aAAA,GAA+BH,YAAY,CAAC,CAAC;IAArCI,SAAS,GAAAD,aAAA,CAATC,SAAS;IAAKC,IAAI,GAAAC,wBAAA,CAAAH,aAAA,EAAAI,SAAA;EAC1B,oBACEZ,KAAA,CAAAa,aAAA,OAAAC,QAAA,KAAQJ,IAAI;IAAED,SAAS,EAAEP,UAAU,CAAC,2BAA2B,EAAEO,SAAS,EAAEF,MAAM,CAACQ,aAAa;EAAE,IAC/FT,MAAM,CAAC,MAAM,CACZ,CAAC;AAET;AAEAH,SAAS,CAACa,SAAS,GAAG;EACpB;EACAX,YAAY,EAAEJ,SAAS,CAACgB,IAAI,CAACC,UAAU;EACvC;EACAZ,MAAM,EAAEL,SAAS,CAACgB,IAAI,CAACC,UAAU;EACjC;EACAX,MAAM,EAAEN,SAAS,CAACkB,KAAK,CAAC;IACtB;IACAJ,aAAa,EAAEd,SAAS,CAACmB;EAC3B,CAAC,CAAC,CAACF;AACL,CAAC;AAED,eAAef,SAAS"}
|
|
@@ -9,18 +9,13 @@ import DataViewToggle from './DataViewToggle';
|
|
|
9
9
|
|
|
10
10
|
// handles layout for filters, status, and bulk actions
|
|
11
11
|
function TableControlBar(_ref) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
togglePlacement
|
|
20
|
-
}
|
|
21
|
-
} = useContext(DataTableContext);
|
|
22
|
-
const invalidTogglePlacement = !togglePlacement || !['left', 'bottom'].includes(togglePlacement);
|
|
23
|
-
const actionsSectionClassName = classNames({
|
|
12
|
+
var className = _ref.className;
|
|
13
|
+
var _useContext = useContext(DataTableContext),
|
|
14
|
+
setFilter = _useContext.setFilter,
|
|
15
|
+
showFiltersInSidebar = _useContext.showFiltersInSidebar,
|
|
16
|
+
togglePlacement = _useContext.dataViewToggleOptions.togglePlacement;
|
|
17
|
+
var invalidTogglePlacement = !togglePlacement || !['left', 'bottom'].includes(togglePlacement);
|
|
18
|
+
var actionsSectionClassName = classNames({
|
|
24
19
|
'pgn__data-table-actions-right-toggle-bottom': togglePlacement === 'bottom',
|
|
25
20
|
'pgn__data-table-actions-right': invalidTogglePlacement || togglePlacement === 'left'
|
|
26
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableControlBar.js","names":["React","useContext","PropTypes","classNames","SmartStatus","DropdownFilters","DataTableContext","ActionDisplay","DataViewToggle","TableControlBar","_ref","className","setFilter","showFiltersInSidebar","
|
|
1
|
+
{"version":3,"file":"TableControlBar.js","names":["React","useContext","PropTypes","classNames","SmartStatus","DropdownFilters","DataTableContext","ActionDisplay","DataViewToggle","TableControlBar","_ref","className","_useContext","setFilter","showFiltersInSidebar","togglePlacement","dataViewToggleOptions","invalidTogglePlacement","includes","actionsSectionClassName","createElement","propTypes","string","defaultProps"],"sources":["../../src/DataTable/TableControlBar.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nimport SmartStatus from './SmartStatus';\nimport DropdownFilters from './DropdownFilters';\nimport DataTableContext from './DataTableContext';\nimport ActionDisplay from './ActionDisplay';\nimport DataViewToggle from './DataViewToggle';\n\n// handles layout for filters, status, and bulk actions\nfunction TableControlBar({ className }) {\n const {\n setFilter,\n showFiltersInSidebar,\n dataViewToggleOptions: { togglePlacement },\n } = useContext(DataTableContext);\n\n const invalidTogglePlacement = !togglePlacement || !(['left', 'bottom']).includes(togglePlacement);\n const actionsSectionClassName = classNames({\n 'pgn__data-table-actions-right-toggle-bottom': togglePlacement === 'bottom',\n 'pgn__data-table-actions-right': invalidTogglePlacement || togglePlacement === 'left',\n });\n return (\n <div className={classNames('pgn__data-table-status-bar', className)} data-testid=\"table-control-bar\">\n {/* Using setFilter as a proxy for isFilterable */}\n {(setFilter && !showFiltersInSidebar) && (\n <div className=\"pgn__data-table-actions\">\n <div className=\"pgn__data-table-actions-left\">\n <DropdownFilters />\n </div>\n <div className={actionsSectionClassName}>\n <div>\n <ActionDisplay />\n </div>\n </div>\n\n </div>\n )}\n <div className=\"pgn__data-table-status\">\n <div className=\"pgn__data-table-status-left\">\n {togglePlacement !== 'bottom' ? <SmartStatus /> : null}\n </div>\n {(!setFilter || (setFilter && showFiltersInSidebar)) && (\n <div className={actionsSectionClassName}>\n <div className=\"pgn__data-table-toggle\">\n {togglePlacement === 'bottom' ? <SmartStatus /> : null}\n <DataViewToggle />\n </div>\n <div>\n <ActionDisplay />\n </div>\n </div>\n )}\n {(setFilter && !showFiltersInSidebar) && (\n <div className=\"pgn__data-table-toggle\">\n <DataViewToggle />\n </div>\n )}\n </div>\n </div>\n );\n}\n\nTableControlBar.propTypes = {\n /** Specifies class name to append to the base element */\n className: PropTypes.string,\n};\n\nTableControlBar.defaultProps = {\n className: null,\n};\n\nexport default TableControlBar;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,cAAc,MAAM,kBAAkB;;AAE7C;AACA,SAASC,eAAeA,CAAAC,IAAA,EAAgB;EAAA,IAAbC,SAAS,GAAAD,IAAA,CAATC,SAAS;EAClC,IAAAC,WAAA,GAIIX,UAAU,CAACK,gBAAgB,CAAC;IAH9BO,SAAS,GAAAD,WAAA,CAATC,SAAS;IACTC,oBAAoB,GAAAF,WAAA,CAApBE,oBAAoB;IACKC,eAAe,GAAAH,WAAA,CAAxCI,qBAAqB,CAAID,eAAe;EAG1C,IAAME,sBAAsB,GAAG,CAACF,eAAe,IAAI,CAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAEG,QAAQ,CAACH,eAAe,CAAC;EAClG,IAAMI,uBAAuB,GAAGhB,UAAU,CAAC;IACzC,6CAA6C,EAAEY,eAAe,KAAK,QAAQ;IAC3E,+BAA+B,EAAEE,sBAAsB,IAAIF,eAAe,KAAK;EACjF,CAAC,CAAC;EACF,oBACEf,KAAA,CAAAoB,aAAA;IAAKT,SAAS,EAAER,UAAU,CAAC,4BAA4B,EAAEQ,SAAS,CAAE;IAAC,eAAY;EAAmB,GAEhGE,SAAS,IAAI,CAACC,oBAAoB,iBACpCd,KAAA,CAAAoB,aAAA;IAAKT,SAAS,EAAC;EAAyB,gBACtCX,KAAA,CAAAoB,aAAA;IAAKT,SAAS,EAAC;EAA8B,gBAC3CX,KAAA,CAAAoB,aAAA,CAACf,eAAe,MAAE,CACf,CAAC,eACNL,KAAA,CAAAoB,aAAA;IAAKT,SAAS,EAAEQ;EAAwB,gBACtCnB,KAAA,CAAAoB,aAAA,2BACEpB,KAAA,CAAAoB,aAAA,CAACb,aAAa,MAAE,CACb,CACF,CAEF,CACJ,eACDP,KAAA,CAAAoB,aAAA;IAAKT,SAAS,EAAC;EAAwB,gBACrCX,KAAA,CAAAoB,aAAA;IAAKT,SAAS,EAAC;EAA6B,GACzCI,eAAe,KAAK,QAAQ,gBAAGf,KAAA,CAAAoB,aAAA,CAAChB,WAAW,MAAE,CAAC,GAAG,IAC/C,CAAC,EACL,CAAC,CAACS,SAAS,IAAKA,SAAS,IAAIC,oBAAqB,kBACjDd,KAAA,CAAAoB,aAAA;IAAKT,SAAS,EAAEQ;EAAwB,gBACtCnB,KAAA,CAAAoB,aAAA;IAAKT,SAAS,EAAC;EAAwB,GACpCI,eAAe,KAAK,QAAQ,gBAAGf,KAAA,CAAAoB,aAAA,CAAChB,WAAW,MAAE,CAAC,GAAG,IAAI,eACtDJ,KAAA,CAAAoB,aAAA,CAACZ,cAAc,MAAE,CACd,CAAC,eACNR,KAAA,CAAAoB,aAAA,2BACEpB,KAAA,CAAAoB,aAAA,CAACb,aAAa,MAAE,CACb,CACF,CACN,EACCM,SAAS,IAAI,CAACC,oBAAoB,iBAClCd,KAAA,CAAAoB,aAAA;IAAKT,SAAS,EAAC;EAAwB,gBACrCX,KAAA,CAAAoB,aAAA,CAACZ,cAAc,MAAE,CACd,CAEJ,CACF,CAAC;AAEV;AAEAC,eAAe,CAACY,SAAS,GAAG;EAC1B;EACAV,SAAS,EAAET,SAAS,CAACoB;AACvB,CAAC;AAEDb,eAAe,CAACc,YAAY,GAAG;EAC7BZ,SAAS,EAAE;AACb,CAAC;AAED,eAAeF,eAAe"}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Button from '../Button';
|
|
4
|
-
export
|
|
4
|
+
export var TABLE_FILTERS_BUTTON_TEXT = 'Filter';
|
|
5
5
|
function TableFilters(_ref) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
6
|
+
var columns = _ref.columns,
|
|
7
|
+
manualFilters = _ref.manualFilters,
|
|
8
|
+
onFilter = _ref.onFilter,
|
|
9
|
+
currentFilters = _ref.currentFilters;
|
|
10
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, "Filters"), columns.map(function (column) {
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
key: column.Header
|
|
13
|
+
}, column.canFilter ? column.render('Filter') : null);
|
|
14
|
+
}), manualFilters && /*#__PURE__*/React.createElement(Button, {
|
|
15
15
|
type: "primary",
|
|
16
|
-
onClick: ()
|
|
16
|
+
onClick: function onClick() {
|
|
17
|
+
return onFilter(currentFilters);
|
|
18
|
+
}
|
|
17
19
|
}, TABLE_FILTERS_BUTTON_TEXT));
|
|
18
20
|
}
|
|
19
21
|
TableFilters.defaultProps = {
|
|
20
22
|
manualFilters: false,
|
|
21
|
-
onFilter: ()
|
|
23
|
+
onFilter: function onFilter() {}
|
|
22
24
|
};
|
|
23
25
|
TableFilters.propTypes = {
|
|
24
26
|
columns: PropTypes.arrayOf(PropTypes.shape({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFilters.js","names":["React","PropTypes","Button","TABLE_FILTERS_BUTTON_TEXT","TableFilters","_ref","columns","manualFilters","onFilter","currentFilters","createElement","map","column","key","Header","canFilter","render","type","onClick","defaultProps","propTypes","arrayOf","shape","oneOfType","elementType","node","isRequired","bool","func"],"sources":["../../src/DataTable/TableFilters.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '../Button';\n\nexport const TABLE_FILTERS_BUTTON_TEXT = 'Filter';\n\nfunction TableFilters({\n columns, manualFilters, onFilter, currentFilters,\n}) {\n return (\n <div>\n <h4>Filters</h4>\n {columns.map(column => <div key={column.Header}>{column.canFilter ? column.render('Filter') : null}</div>)}\n {manualFilters && (\n <Button\n type=\"primary\"\n onClick={() => onFilter(currentFilters)}\n >\n {TABLE_FILTERS_BUTTON_TEXT}\n </Button>\n )}\n </div>\n );\n}\n\nTableFilters.defaultProps = {\n manualFilters: false,\n onFilter: () => {},\n};\n\nTableFilters.propTypes = {\n columns: PropTypes.arrayOf(PropTypes.shape({\n Header: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]).isRequired,\n canFilter: PropTypes.bool,\n render: PropTypes.func.isRequired,\n })).isRequired,\n manualFilters: PropTypes.bool,\n onFilter: PropTypes.func,\n currentFilters: PropTypes.arrayOf(PropTypes.shape()).isRequired,\n};\n\nexport default TableFilters;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,MAAM,MAAM,WAAW;AAE9B,OAAO,
|
|
1
|
+
{"version":3,"file":"TableFilters.js","names":["React","PropTypes","Button","TABLE_FILTERS_BUTTON_TEXT","TableFilters","_ref","columns","manualFilters","onFilter","currentFilters","createElement","map","column","key","Header","canFilter","render","type","onClick","defaultProps","propTypes","arrayOf","shape","oneOfType","elementType","node","isRequired","bool","func"],"sources":["../../src/DataTable/TableFilters.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '../Button';\n\nexport const TABLE_FILTERS_BUTTON_TEXT = 'Filter';\n\nfunction TableFilters({\n columns, manualFilters, onFilter, currentFilters,\n}) {\n return (\n <div>\n <h4>Filters</h4>\n {columns.map(column => <div key={column.Header}>{column.canFilter ? column.render('Filter') : null}</div>)}\n {manualFilters && (\n <Button\n type=\"primary\"\n onClick={() => onFilter(currentFilters)}\n >\n {TABLE_FILTERS_BUTTON_TEXT}\n </Button>\n )}\n </div>\n );\n}\n\nTableFilters.defaultProps = {\n manualFilters: false,\n onFilter: () => {},\n};\n\nTableFilters.propTypes = {\n columns: PropTypes.arrayOf(PropTypes.shape({\n Header: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]).isRequired,\n canFilter: PropTypes.bool,\n render: PropTypes.func.isRequired,\n })).isRequired,\n manualFilters: PropTypes.bool,\n onFilter: PropTypes.func,\n currentFilters: PropTypes.arrayOf(PropTypes.shape()).isRequired,\n};\n\nexport default TableFilters;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,MAAM,MAAM,WAAW;AAE9B,OAAO,IAAMC,yBAAyB,GAAG,QAAQ;AAEjD,SAASC,YAAYA,CAAAC,IAAA,EAElB;EAAA,IADDC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAEC,aAAa,GAAAF,IAAA,CAAbE,aAAa;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAEC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;EAEhD,oBACET,KAAA,CAAAU,aAAA,2BACEV,KAAA,CAAAU,aAAA,aAAI,SAAW,CAAC,EACfJ,OAAO,CAACK,GAAG,CAAC,UAAAC,MAAM;IAAA,oBAAIZ,KAAA,CAAAU,aAAA;MAAKG,GAAG,EAAED,MAAM,CAACE;IAAO,GAAEF,MAAM,CAACG,SAAS,GAAGH,MAAM,CAACI,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAU,CAAC;EAAA,EAAC,EACzGT,aAAa,iBACdP,KAAA,CAAAU,aAAA,CAACR,MAAM;IACLe,IAAI,EAAC,SAAS;IACdC,OAAO,EAAE,SAAAA,QAAA;MAAA,OAAMV,QAAQ,CAACC,cAAc,CAAC;IAAA;EAAC,GAEvCN,yBACK,CAEL,CAAC;AAEV;AAEAC,YAAY,CAACe,YAAY,GAAG;EAC1BZ,aAAa,EAAE,KAAK;EACpBC,QAAQ,EAAE,SAAAA,SAAA,EAAM,CAAC;AACnB,CAAC;AAEDJ,YAAY,CAACgB,SAAS,GAAG;EACvBd,OAAO,EAAEL,SAAS,CAACoB,OAAO,CAACpB,SAAS,CAACqB,KAAK,CAAC;IACzCR,MAAM,EAAEb,SAAS,CAACsB,SAAS,CAAC,CAACtB,SAAS,CAACuB,WAAW,EAAEvB,SAAS,CAACwB,IAAI,CAAC,CAAC,CAACC,UAAU;IAC/EX,SAAS,EAAEd,SAAS,CAAC0B,IAAI;IACzBX,MAAM,EAAEf,SAAS,CAAC2B,IAAI,CAACF;EACzB,CAAC,CAAC,CAAC,CAACA,UAAU;EACdnB,aAAa,EAAEN,SAAS,CAAC0B,IAAI;EAC7BnB,QAAQ,EAAEP,SAAS,CAAC2B,IAAI;EACxBnB,cAAc,EAAER,SAAS,CAACoB,OAAO,CAACpB,SAAS,CAACqB,KAAK,CAAC,CAAC,CAAC,CAACI;AACvD,CAAC;AAED,eAAetB,YAAY"}
|
|
@@ -6,14 +6,11 @@ import RowStatusDefault from './RowStatus';
|
|
|
6
6
|
import TablePagination from './TablePagination';
|
|
7
7
|
import TablePaginationMinimal from './TablePaginationMinimal';
|
|
8
8
|
function TableFooter(_ref) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
RowStatusComponent
|
|
15
|
-
} = useContext(DataTableContext);
|
|
16
|
-
const RowStatus = RowStatusComponent || RowStatusDefault;
|
|
9
|
+
var className = _ref.className,
|
|
10
|
+
children = _ref.children;
|
|
11
|
+
var _useContext = useContext(DataTableContext),
|
|
12
|
+
RowStatusComponent = _useContext.RowStatusComponent;
|
|
13
|
+
var RowStatus = RowStatusComponent || RowStatusDefault;
|
|
17
14
|
return /*#__PURE__*/React.createElement("div", {
|
|
18
15
|
className: classNames(className, 'pgn__data-table-footer'),
|
|
19
16
|
"data-testid": "table-footer"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFooter.js","names":["React","useContext","classNames","PropTypes","DataTableContext","RowStatusDefault","TablePagination","TablePaginationMinimal","TableFooter","_ref","className","children","RowStatusComponent","RowStatus","createElement","Fragment","propTypes","node","string","defaultProps","undefined"],"sources":["../../src/DataTable/TableFooter.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport DataTableContext from './DataTableContext';\nimport RowStatusDefault from './RowStatus';\nimport TablePagination from './TablePagination';\nimport TablePaginationMinimal from './TablePaginationMinimal';\n\nfunction TableFooter({ className, children }) {\n const { RowStatusComponent } = useContext(DataTableContext);\n const RowStatus = RowStatusComponent || RowStatusDefault;\n\n return (\n <div className={classNames(className, 'pgn__data-table-footer')} data-testid=\"table-footer\">\n {children || (\n <>\n <RowStatus />\n <TablePagination />\n <TablePaginationMinimal />\n </>\n )}\n </div>\n );\n}\n\nTableFooter.propTypes = {\n /** Specifies the content of the `TableFooter` */\n children: PropTypes.node,\n /** Specifies class name to append to the base element. */\n className: PropTypes.string,\n};\n\nTableFooter.defaultProps = {\n children: null,\n className: undefined,\n};\n\nexport default TableFooter;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,gBAAgB,MAAM,aAAa;AAC1C,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,OAAOC,sBAAsB,MAAM,0BAA0B;AAE7D,SAASC,WAAWA,CAAAC,IAAA,EAA0B;EAAA,
|
|
1
|
+
{"version":3,"file":"TableFooter.js","names":["React","useContext","classNames","PropTypes","DataTableContext","RowStatusDefault","TablePagination","TablePaginationMinimal","TableFooter","_ref","className","children","_useContext","RowStatusComponent","RowStatus","createElement","Fragment","propTypes","node","string","defaultProps","undefined"],"sources":["../../src/DataTable/TableFooter.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport DataTableContext from './DataTableContext';\nimport RowStatusDefault from './RowStatus';\nimport TablePagination from './TablePagination';\nimport TablePaginationMinimal from './TablePaginationMinimal';\n\nfunction TableFooter({ className, children }) {\n const { RowStatusComponent } = useContext(DataTableContext);\n const RowStatus = RowStatusComponent || RowStatusDefault;\n\n return (\n <div className={classNames(className, 'pgn__data-table-footer')} data-testid=\"table-footer\">\n {children || (\n <>\n <RowStatus />\n <TablePagination />\n <TablePaginationMinimal />\n </>\n )}\n </div>\n );\n}\n\nTableFooter.propTypes = {\n /** Specifies the content of the `TableFooter` */\n children: PropTypes.node,\n /** Specifies class name to append to the base element. */\n className: PropTypes.string,\n};\n\nTableFooter.defaultProps = {\n children: null,\n className: undefined,\n};\n\nexport default TableFooter;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,gBAAgB,MAAM,aAAa;AAC1C,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,OAAOC,sBAAsB,MAAM,0BAA0B;AAE7D,SAASC,WAAWA,CAAAC,IAAA,EAA0B;EAAA,IAAvBC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;EACxC,IAAAC,WAAA,GAA+BX,UAAU,CAACG,gBAAgB,CAAC;IAAnDS,kBAAkB,GAAAD,WAAA,CAAlBC,kBAAkB;EAC1B,IAAMC,SAAS,GAAGD,kBAAkB,IAAIR,gBAAgB;EAExD,oBACEL,KAAA,CAAAe,aAAA;IAAKL,SAAS,EAAER,UAAU,CAACQ,SAAS,EAAE,wBAAwB,CAAE;IAAC,eAAY;EAAc,GACxFC,QAAQ,iBACPX,KAAA,CAAAe,aAAA,CAAAf,KAAA,CAAAgB,QAAA,qBACEhB,KAAA,CAAAe,aAAA,CAACD,SAAS,MAAE,CAAC,eACbd,KAAA,CAAAe,aAAA,CAACT,eAAe,MAAE,CAAC,eACnBN,KAAA,CAAAe,aAAA,CAACR,sBAAsB,MAAE,CACzB,CAED,CAAC;AAEV;AAEAC,WAAW,CAACS,SAAS,GAAG;EACtB;EACAN,QAAQ,EAAER,SAAS,CAACe,IAAI;EACxB;EACAR,SAAS,EAAEP,SAAS,CAACgB;AACvB,CAAC;AAEDX,WAAW,CAACY,YAAY,GAAG;EACzBT,QAAQ,EAAE,IAAI;EACdD,SAAS,EAAEW;AACb,CAAC;AAED,eAAeb,WAAW"}
|
|
@@ -4,10 +4,8 @@ import classNames from 'classnames';
|
|
|
4
4
|
import Icon from '../Icon';
|
|
5
5
|
import { ArrowDropDown, ArrowDropUp, ArrowDropUpDown } from '../../icons';
|
|
6
6
|
export function SortIndicator(_ref) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
isSortedDesc
|
|
10
|
-
} = _ref;
|
|
7
|
+
var isSorted = _ref.isSorted,
|
|
8
|
+
isSortedDesc = _ref.isSortedDesc;
|
|
11
9
|
if (!isSorted) {
|
|
12
10
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
13
11
|
style: {
|
|
@@ -33,16 +31,14 @@ SortIndicator.propTypes = {
|
|
|
33
31
|
isSortedDesc: PropTypes.bool.isRequired
|
|
34
32
|
};
|
|
35
33
|
function TableHeaderCell(_ref2) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
} = _ref2;
|
|
45
|
-
const toggleProps = canSort && getSortByToggleProps ? getSortByToggleProps() : {};
|
|
34
|
+
var getHeaderProps = _ref2.getHeaderProps,
|
|
35
|
+
render = _ref2.render,
|
|
36
|
+
canSort = _ref2.canSort,
|
|
37
|
+
getSortByToggleProps = _ref2.getSortByToggleProps,
|
|
38
|
+
isSorted = _ref2.isSorted,
|
|
39
|
+
isSortedDesc = _ref2.isSortedDesc,
|
|
40
|
+
headerClassName = _ref2.headerClassName;
|
|
41
|
+
var toggleProps = canSort && getSortByToggleProps ? getSortByToggleProps() : {};
|
|
46
42
|
return /*#__PURE__*/React.createElement("th", getHeaderProps(toggleProps), /*#__PURE__*/React.createElement("span", {
|
|
47
43
|
className: classNames('d-flex align-items-center', headerClassName)
|
|
48
44
|
}, /*#__PURE__*/React.createElement("span", null, render('Header')), canSort && /*#__PURE__*/React.createElement(SortIndicator, {
|
|
@@ -55,7 +51,7 @@ TableHeaderCell.defaultProps = {
|
|
|
55
51
|
isSorted: false,
|
|
56
52
|
isSortedDesc: false,
|
|
57
53
|
canSort: false,
|
|
58
|
-
getSortByToggleProps: ()
|
|
54
|
+
getSortByToggleProps: function getSortByToggleProps() {}
|
|
59
55
|
};
|
|
60
56
|
TableHeaderCell.propTypes = {
|
|
61
57
|
/** Returns props for the th element */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeaderCell.js","names":["React","PropTypes","classNames","Icon","ArrowDropDown","ArrowDropUp","ArrowDropUpDown","SortIndicator","_ref","isSorted","isSortedDesc","createElement","style","opacity","src","propTypes","bool","isRequired","TableHeaderCell","_ref2","getHeaderProps","render","canSort","getSortByToggleProps","headerClassName","toggleProps","className","defaultProps","func","string"],"sources":["../../src/DataTable/TableHeaderCell.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Icon from '../Icon';\nimport { ArrowDropDown, ArrowDropUp, ArrowDropUpDown } from '../../icons';\n\nexport function SortIndicator({ isSorted, isSortedDesc }) {\n if (!isSorted) {\n return <Icon style={{ opacity: 0.5 }} src={ArrowDropUpDown} data-testid=\"arrow-drop-up-down\" />;\n }\n\n if (isSortedDesc) {\n return <Icon src={ArrowDropDown} data-testid=\"arrow-drop-down\" />;\n }\n\n return <Icon src={ArrowDropUp} data-testid=\"arrow-drop-up\" />;\n}\n\nSortIndicator.propTypes = {\n isSorted: PropTypes.bool.isRequired,\n isSortedDesc: PropTypes.bool.isRequired,\n};\n\nfunction TableHeaderCell({\n getHeaderProps, render, canSort, getSortByToggleProps, isSorted, isSortedDesc, headerClassName,\n}) {\n const toggleProps = canSort && getSortByToggleProps ? getSortByToggleProps() : {};\n\n return (\n <th {...getHeaderProps(toggleProps)}>\n <span className={classNames('d-flex align-items-center', headerClassName)}>\n <span>{render('Header')}</span>\n {canSort && <SortIndicator isSorted={isSorted} isSortedDesc={isSortedDesc || false} />}\n </span>\n </th>\n );\n}\n\nTableHeaderCell.defaultProps = {\n headerClassName: null,\n isSorted: false,\n isSortedDesc: false,\n canSort: false,\n getSortByToggleProps: () => {},\n};\n\nTableHeaderCell.propTypes = {\n /** Returns props for the th element */\n getHeaderProps: PropTypes.func.isRequired,\n /** Indicates whether or not a column is sorted */\n isSorted: PropTypes.bool,\n /** Renders the header content. Passed the string 'Header' */\n render: PropTypes.func.isRequired,\n /** Indicates whether the column is sorted in descending order */\n isSortedDesc: PropTypes.bool,\n /** Gets props related to sorting that will be passed to th */\n getSortByToggleProps: PropTypes.func,\n /** Indicates whether a column is sortable */\n canSort: PropTypes.bool,\n /** Class(es) to be applied to header cells */\n headerClassName: PropTypes.string,\n};\n\nexport default TableHeaderCell;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,IAAI,MAAM,SAAS;AAC1B,SAASC,aAAa,EAAEC,WAAW,EAAEC,eAAe,QAAQ,aAAa;AAEzE,OAAO,SAASC,aAAaA,CAAAC,IAAA,EAA6B;EAAA,
|
|
1
|
+
{"version":3,"file":"TableHeaderCell.js","names":["React","PropTypes","classNames","Icon","ArrowDropDown","ArrowDropUp","ArrowDropUpDown","SortIndicator","_ref","isSorted","isSortedDesc","createElement","style","opacity","src","propTypes","bool","isRequired","TableHeaderCell","_ref2","getHeaderProps","render","canSort","getSortByToggleProps","headerClassName","toggleProps","className","defaultProps","func","string"],"sources":["../../src/DataTable/TableHeaderCell.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Icon from '../Icon';\nimport { ArrowDropDown, ArrowDropUp, ArrowDropUpDown } from '../../icons';\n\nexport function SortIndicator({ isSorted, isSortedDesc }) {\n if (!isSorted) {\n return <Icon style={{ opacity: 0.5 }} src={ArrowDropUpDown} data-testid=\"arrow-drop-up-down\" />;\n }\n\n if (isSortedDesc) {\n return <Icon src={ArrowDropDown} data-testid=\"arrow-drop-down\" />;\n }\n\n return <Icon src={ArrowDropUp} data-testid=\"arrow-drop-up\" />;\n}\n\nSortIndicator.propTypes = {\n isSorted: PropTypes.bool.isRequired,\n isSortedDesc: PropTypes.bool.isRequired,\n};\n\nfunction TableHeaderCell({\n getHeaderProps, render, canSort, getSortByToggleProps, isSorted, isSortedDesc, headerClassName,\n}) {\n const toggleProps = canSort && getSortByToggleProps ? getSortByToggleProps() : {};\n\n return (\n <th {...getHeaderProps(toggleProps)}>\n <span className={classNames('d-flex align-items-center', headerClassName)}>\n <span>{render('Header')}</span>\n {canSort && <SortIndicator isSorted={isSorted} isSortedDesc={isSortedDesc || false} />}\n </span>\n </th>\n );\n}\n\nTableHeaderCell.defaultProps = {\n headerClassName: null,\n isSorted: false,\n isSortedDesc: false,\n canSort: false,\n getSortByToggleProps: () => {},\n};\n\nTableHeaderCell.propTypes = {\n /** Returns props for the th element */\n getHeaderProps: PropTypes.func.isRequired,\n /** Indicates whether or not a column is sorted */\n isSorted: PropTypes.bool,\n /** Renders the header content. Passed the string 'Header' */\n render: PropTypes.func.isRequired,\n /** Indicates whether the column is sorted in descending order */\n isSortedDesc: PropTypes.bool,\n /** Gets props related to sorting that will be passed to th */\n getSortByToggleProps: PropTypes.func,\n /** Indicates whether a column is sortable */\n canSort: PropTypes.bool,\n /** Class(es) to be applied to header cells */\n headerClassName: PropTypes.string,\n};\n\nexport default TableHeaderCell;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,IAAI,MAAM,SAAS;AAC1B,SAASC,aAAa,EAAEC,WAAW,EAAEC,eAAe,QAAQ,aAAa;AAEzE,OAAO,SAASC,aAAaA,CAAAC,IAAA,EAA6B;EAAA,IAA1BC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAEC,YAAY,GAAAF,IAAA,CAAZE,YAAY;EACpD,IAAI,CAACD,QAAQ,EAAE;IACb,oBAAOT,KAAA,CAAAW,aAAA,CAACR,IAAI;MAACS,KAAK,EAAE;QAAEC,OAAO,EAAE;MAAI,CAAE;MAACC,GAAG,EAAER,eAAgB;MAAC,eAAY;IAAoB,CAAE,CAAC;EACjG;EAEA,IAAII,YAAY,EAAE;IAChB,oBAAOV,KAAA,CAAAW,aAAA,CAACR,IAAI;MAACW,GAAG,EAAEV,aAAc;MAAC,eAAY;IAAiB,CAAE,CAAC;EACnE;EAEA,oBAAOJ,KAAA,CAAAW,aAAA,CAACR,IAAI;IAACW,GAAG,EAAET,WAAY;IAAC,eAAY;EAAe,CAAE,CAAC;AAC/D;AAEAE,aAAa,CAACQ,SAAS,GAAG;EACxBN,QAAQ,EAAER,SAAS,CAACe,IAAI,CAACC,UAAU;EACnCP,YAAY,EAAET,SAAS,CAACe,IAAI,CAACC;AAC/B,CAAC;AAED,SAASC,eAAeA,CAAAC,KAAA,EAErB;EAAA,IADDC,cAAc,GAAAD,KAAA,CAAdC,cAAc;IAAEC,MAAM,GAAAF,KAAA,CAANE,MAAM;IAAEC,OAAO,GAAAH,KAAA,CAAPG,OAAO;IAAEC,oBAAoB,GAAAJ,KAAA,CAApBI,oBAAoB;IAAEd,QAAQ,GAAAU,KAAA,CAARV,QAAQ;IAAEC,YAAY,GAAAS,KAAA,CAAZT,YAAY;IAAEc,eAAe,GAAAL,KAAA,CAAfK,eAAe;EAE9F,IAAMC,WAAW,GAAGH,OAAO,IAAIC,oBAAoB,GAAGA,oBAAoB,CAAC,CAAC,GAAG,CAAC,CAAC;EAEjF,oBACEvB,KAAA,CAAAW,aAAA,OAAQS,cAAc,CAACK,WAAW,CAAC,eACjCzB,KAAA,CAAAW,aAAA;IAAMe,SAAS,EAAExB,UAAU,CAAC,2BAA2B,EAAEsB,eAAe;EAAE,gBACxExB,KAAA,CAAAW,aAAA,eAAOU,MAAM,CAAC,QAAQ,CAAQ,CAAC,EAC9BC,OAAO,iBAAItB,KAAA,CAAAW,aAAA,CAACJ,aAAa;IAACE,QAAQ,EAAEA,QAAS;IAACC,YAAY,EAAEA,YAAY,IAAI;EAAM,CAAE,CACjF,CACJ,CAAC;AAET;AAEAQ,eAAe,CAACS,YAAY,GAAG;EAC7BH,eAAe,EAAE,IAAI;EACrBf,QAAQ,EAAE,KAAK;EACfC,YAAY,EAAE,KAAK;EACnBY,OAAO,EAAE,KAAK;EACdC,oBAAoB,EAAE,SAAAA,qBAAA,EAAM,CAAC;AAC/B,CAAC;AAEDL,eAAe,CAACH,SAAS,GAAG;EAC1B;EACAK,cAAc,EAAEnB,SAAS,CAAC2B,IAAI,CAACX,UAAU;EACzC;EACAR,QAAQ,EAAER,SAAS,CAACe,IAAI;EACxB;EACAK,MAAM,EAAEpB,SAAS,CAAC2B,IAAI,CAACX,UAAU;EACjC;EACAP,YAAY,EAAET,SAAS,CAACe,IAAI;EAC5B;EACAO,oBAAoB,EAAEtB,SAAS,CAAC2B,IAAI;EACpC;EACAN,OAAO,EAAErB,SAAS,CAACe,IAAI;EACvB;EACAQ,eAAe,EAAEvB,SAAS,CAAC4B;AAC7B,CAAC;AAED,eAAeX,eAAe"}
|
|
@@ -3,10 +3,12 @@ import React from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import TableHeaderCell from './TableHeaderCell';
|
|
5
5
|
function TableHeaderRow(_ref) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
var headerGroups = _ref.headerGroups;
|
|
7
|
+
return /*#__PURE__*/React.createElement("thead", null, headerGroups.map(function (headerGroup) {
|
|
8
|
+
return /*#__PURE__*/React.createElement("tr", headerGroup.getHeaderGroupProps(), headerGroup.headers.map(function (column) {
|
|
9
|
+
return /*#__PURE__*/React.createElement(TableHeaderCell, _extends({}, column, column.getHeaderProps()));
|
|
10
|
+
}));
|
|
11
|
+
}));
|
|
10
12
|
}
|
|
11
13
|
TableHeaderRow.propTypes = {
|
|
12
14
|
headerGroups: PropTypes.arrayOf(PropTypes.shape({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeaderRow.js","names":["React","PropTypes","TableHeaderCell","TableHeaderRow","_ref","headerGroups","createElement","map","headerGroup","getHeaderGroupProps","headers","column","_extends","getHeaderProps","propTypes","arrayOf","shape","func","isRequired"],"sources":["../../src/DataTable/TableHeaderRow.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport TableHeaderCell from './TableHeaderCell';\n\nfunction TableHeaderRow({ headerGroups }) {\n return (\n <thead>\n {headerGroups.map(headerGroup => (\n <tr {...headerGroup.getHeaderGroupProps()}>\n {headerGroup.headers.map(column => (\n <TableHeaderCell {...column} {...column.getHeaderProps()} />\n ))}\n </tr>\n ))}\n </thead>\n );\n}\n\nTableHeaderRow.propTypes = {\n headerGroups: PropTypes.arrayOf(PropTypes.shape({\n headers: PropTypes.arrayOf(PropTypes.shape({\n /** Props for the TableHeaderCell component. Must include a key */\n getHeaderProps: PropTypes.func.isRequired,\n })).isRequired,\n /** Returns props for the header tr element */\n getHeaderGroupProps: PropTypes.func.isRequired,\n })).isRequired,\n};\n\nexport default TableHeaderRow;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,eAAe,MAAM,mBAAmB;AAE/C,SAASC,cAAcA,CAAAC,IAAA,EAAmB;EAAA,
|
|
1
|
+
{"version":3,"file":"TableHeaderRow.js","names":["React","PropTypes","TableHeaderCell","TableHeaderRow","_ref","headerGroups","createElement","map","headerGroup","getHeaderGroupProps","headers","column","_extends","getHeaderProps","propTypes","arrayOf","shape","func","isRequired"],"sources":["../../src/DataTable/TableHeaderRow.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport TableHeaderCell from './TableHeaderCell';\n\nfunction TableHeaderRow({ headerGroups }) {\n return (\n <thead>\n {headerGroups.map(headerGroup => (\n <tr {...headerGroup.getHeaderGroupProps()}>\n {headerGroup.headers.map(column => (\n <TableHeaderCell {...column} {...column.getHeaderProps()} />\n ))}\n </tr>\n ))}\n </thead>\n );\n}\n\nTableHeaderRow.propTypes = {\n headerGroups: PropTypes.arrayOf(PropTypes.shape({\n headers: PropTypes.arrayOf(PropTypes.shape({\n /** Props for the TableHeaderCell component. Must include a key */\n getHeaderProps: PropTypes.func.isRequired,\n })).isRequired,\n /** Returns props for the header tr element */\n getHeaderGroupProps: PropTypes.func.isRequired,\n })).isRequired,\n};\n\nexport default TableHeaderRow;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,eAAe,MAAM,mBAAmB;AAE/C,SAASC,cAAcA,CAAAC,IAAA,EAAmB;EAAA,IAAhBC,YAAY,GAAAD,IAAA,CAAZC,YAAY;EACpC,oBACEL,KAAA,CAAAM,aAAA,gBACGD,YAAY,CAACE,GAAG,CAAC,UAAAC,WAAW;IAAA,oBAC3BR,KAAA,CAAAM,aAAA,OAAQE,WAAW,CAACC,mBAAmB,CAAC,CAAC,EACtCD,WAAW,CAACE,OAAO,CAACH,GAAG,CAAC,UAAAI,MAAM;MAAA,oBAC7BX,KAAA,CAAAM,aAAA,CAACJ,eAAe,EAAAU,QAAA,KAAKD,MAAM,EAAMA,MAAM,CAACE,cAAc,CAAC,CAAC,CAAG,CAAC;IAAA,CAC7D,CACC,CAAC;EAAA,CACN,CACI,CAAC;AAEZ;AAEAV,cAAc,CAACW,SAAS,GAAG;EACzBT,YAAY,EAAEJ,SAAS,CAACc,OAAO,CAACd,SAAS,CAACe,KAAK,CAAC;IAC9CN,OAAO,EAAET,SAAS,CAACc,OAAO,CAACd,SAAS,CAACe,KAAK,CAAC;MACzC;MACAH,cAAc,EAAEZ,SAAS,CAACgB,IAAI,CAACC;IACjC,CAAC,CAAC,CAAC,CAACA,UAAU;IACd;IACAT,mBAAmB,EAAER,SAAS,CAACgB,IAAI,CAACC;EACtC,CAAC,CAAC,CAAC,CAACA;AACN,CAAC;AAED,eAAef,cAAc"}
|
|
@@ -2,18 +2,19 @@ import React, { useContext } from 'react';
|
|
|
2
2
|
import DataTableContext from './DataTableContext';
|
|
3
3
|
import Pagination from '../Pagination';
|
|
4
4
|
function TablePagination() {
|
|
5
|
-
|
|
6
|
-
pageCount,
|
|
7
|
-
state,
|
|
8
|
-
gotoPage
|
|
9
|
-
} = useContext(DataTableContext);
|
|
5
|
+
var _useContext = useContext(DataTableContext),
|
|
6
|
+
pageCount = _useContext.pageCount,
|
|
7
|
+
state = _useContext.state,
|
|
8
|
+
gotoPage = _useContext.gotoPage;
|
|
10
9
|
if (!pageCount || pageCount < 2) {
|
|
11
10
|
return null;
|
|
12
11
|
}
|
|
13
|
-
|
|
12
|
+
var pageIndex = state === null || state === void 0 ? void 0 : state.pageIndex;
|
|
14
13
|
return /*#__PURE__*/React.createElement(Pagination.Reduced, {
|
|
15
14
|
currentPage: pageIndex + 1,
|
|
16
|
-
handlePageSelect:
|
|
15
|
+
handlePageSelect: function handlePageSelect(pageNum) {
|
|
16
|
+
return gotoPage(pageNum - 1);
|
|
17
|
+
},
|
|
17
18
|
pageCount: pageCount
|
|
18
19
|
});
|
|
19
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TablePagination.js","names":["React","useContext","DataTableContext","Pagination","TablePagination","pageCount","state","gotoPage","pageIndex","createElement","Reduced","currentPage","handlePageSelect","pageNum"],"sources":["../../src/DataTable/TablePagination.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport DataTableContext from './DataTableContext';\nimport Pagination from '../Pagination';\n\nfunction TablePagination() {\n const {\n pageCount, state, gotoPage,\n } = useContext(DataTableContext);\n\n if (!pageCount || pageCount < 2) {\n return null;\n }\n\n const pageIndex = state?.pageIndex;\n\n return (\n <Pagination.Reduced\n currentPage={pageIndex + 1}\n handlePageSelect={(pageNum) => gotoPage(pageNum - 1)}\n pageCount={pageCount}\n />\n );\n}\n\nexport default TablePagination;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,UAAU,MAAM,eAAe;AAEtC,SAASC,eAAeA,CAAA,EAAG;EACzB,
|
|
1
|
+
{"version":3,"file":"TablePagination.js","names":["React","useContext","DataTableContext","Pagination","TablePagination","_useContext","pageCount","state","gotoPage","pageIndex","createElement","Reduced","currentPage","handlePageSelect","pageNum"],"sources":["../../src/DataTable/TablePagination.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport DataTableContext from './DataTableContext';\nimport Pagination from '../Pagination';\n\nfunction TablePagination() {\n const {\n pageCount, state, gotoPage,\n } = useContext(DataTableContext);\n\n if (!pageCount || pageCount < 2) {\n return null;\n }\n\n const pageIndex = state?.pageIndex;\n\n return (\n <Pagination.Reduced\n currentPage={pageIndex + 1}\n handlePageSelect={(pageNum) => gotoPage(pageNum - 1)}\n pageCount={pageCount}\n />\n );\n}\n\nexport default TablePagination;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,UAAU,MAAM,eAAe;AAEtC,SAASC,eAAeA,CAAA,EAAG;EACzB,IAAAC,WAAA,GAEIJ,UAAU,CAACC,gBAAgB,CAAC;IAD9BI,SAAS,GAAAD,WAAA,CAATC,SAAS;IAAEC,KAAK,GAAAF,WAAA,CAALE,KAAK;IAAEC,QAAQ,GAAAH,WAAA,CAARG,QAAQ;EAG5B,IAAI,CAACF,SAAS,IAAIA,SAAS,GAAG,CAAC,EAAE;IAC/B,OAAO,IAAI;EACb;EAEA,IAAMG,SAAS,GAAGF,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEE,SAAS;EAElC,oBACET,KAAA,CAAAU,aAAA,CAACP,UAAU,CAACQ,OAAO;IACjBC,WAAW,EAAEH,SAAS,GAAG,CAAE;IAC3BI,gBAAgB,EAAE,SAAAA,iBAACC,OAAO;MAAA,OAAKN,QAAQ,CAACM,OAAO,GAAG,CAAC,CAAC;IAAA,CAAC;IACrDR,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN;AAEA,eAAeF,eAAe"}
|
|
@@ -2,24 +2,25 @@ import React, { useContext } from 'react';
|
|
|
2
2
|
import DataTableContext from './DataTableContext';
|
|
3
3
|
import Pagination from '../Pagination';
|
|
4
4
|
function TablePaginationMinimal() {
|
|
5
|
-
|
|
6
|
-
nextPage,
|
|
7
|
-
pageCount,
|
|
8
|
-
gotoPage,
|
|
9
|
-
state
|
|
10
|
-
} = useContext(DataTableContext);
|
|
5
|
+
var _useContext = useContext(DataTableContext),
|
|
6
|
+
nextPage = _useContext.nextPage,
|
|
7
|
+
pageCount = _useContext.pageCount,
|
|
8
|
+
gotoPage = _useContext.gotoPage,
|
|
9
|
+
state = _useContext.state;
|
|
11
10
|
|
|
12
11
|
// Use nextPage as a proxy for whether or not the table is paginated
|
|
13
12
|
if (!nextPage) {
|
|
14
13
|
return null;
|
|
15
14
|
}
|
|
16
|
-
|
|
15
|
+
var pageIndex = state === null || state === void 0 ? void 0 : state.pageIndex;
|
|
17
16
|
return /*#__PURE__*/React.createElement(Pagination, {
|
|
18
17
|
variant: "minimal",
|
|
19
18
|
currentPage: pageIndex + 1,
|
|
20
19
|
pageCount: pageCount,
|
|
21
20
|
paginationLabel: "table pagination",
|
|
22
|
-
onPageSelect:
|
|
21
|
+
onPageSelect: function onPageSelect(pageNum) {
|
|
22
|
+
return gotoPage(pageNum - 1);
|
|
23
|
+
}
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
26
|
export default TablePaginationMinimal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TablePaginationMinimal.js","names":["React","useContext","DataTableContext","Pagination","TablePaginationMinimal","nextPage","pageCount","gotoPage","state","pageIndex","createElement","variant","currentPage","paginationLabel","onPageSelect","pageNum"],"sources":["../../src/DataTable/TablePaginationMinimal.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport DataTableContext from './DataTableContext';\nimport Pagination from '../Pagination';\n\nfunction TablePaginationMinimal() {\n const {\n nextPage, pageCount, gotoPage, state,\n } = useContext(DataTableContext);\n\n // Use nextPage as a proxy for whether or not the table is paginated\n if (!nextPage) {\n return null;\n }\n\n const pageIndex = state?.pageIndex;\n\n return (\n <Pagination\n variant=\"minimal\"\n currentPage={pageIndex + 1}\n pageCount={pageCount}\n paginationLabel=\"table pagination\"\n onPageSelect={(pageNum) => gotoPage(pageNum - 1)}\n />\n );\n}\n\nexport default TablePaginationMinimal;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,UAAU,MAAM,eAAe;AAEtC,SAASC,sBAAsBA,CAAA,EAAG;EAChC,
|
|
1
|
+
{"version":3,"file":"TablePaginationMinimal.js","names":["React","useContext","DataTableContext","Pagination","TablePaginationMinimal","_useContext","nextPage","pageCount","gotoPage","state","pageIndex","createElement","variant","currentPage","paginationLabel","onPageSelect","pageNum"],"sources":["../../src/DataTable/TablePaginationMinimal.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport DataTableContext from './DataTableContext';\nimport Pagination from '../Pagination';\n\nfunction TablePaginationMinimal() {\n const {\n nextPage, pageCount, gotoPage, state,\n } = useContext(DataTableContext);\n\n // Use nextPage as a proxy for whether or not the table is paginated\n if (!nextPage) {\n return null;\n }\n\n const pageIndex = state?.pageIndex;\n\n return (\n <Pagination\n variant=\"minimal\"\n currentPage={pageIndex + 1}\n pageCount={pageCount}\n paginationLabel=\"table pagination\"\n onPageSelect={(pageNum) => gotoPage(pageNum - 1)}\n />\n );\n}\n\nexport default TablePaginationMinimal;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,UAAU,MAAM,eAAe;AAEtC,SAASC,sBAAsBA,CAAA,EAAG;EAChC,IAAAC,WAAA,GAEIJ,UAAU,CAACC,gBAAgB,CAAC;IAD9BI,QAAQ,GAAAD,WAAA,CAARC,QAAQ;IAAEC,SAAS,GAAAF,WAAA,CAATE,SAAS;IAAEC,QAAQ,GAAAH,WAAA,CAARG,QAAQ;IAAEC,KAAK,GAAAJ,WAAA,CAALI,KAAK;;EAGtC;EACA,IAAI,CAACH,QAAQ,EAAE;IACb,OAAO,IAAI;EACb;EAEA,IAAMI,SAAS,GAAGD,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEC,SAAS;EAElC,oBACEV,KAAA,CAAAW,aAAA,CAACR,UAAU;IACTS,OAAO,EAAC,SAAS;IACjBC,WAAW,EAAEH,SAAS,GAAG,CAAE;IAC3BH,SAAS,EAAEA,SAAU;IACrBO,eAAe,EAAC,kBAAkB;IAClCC,YAAY,EAAE,SAAAA,aAACC,OAAO;MAAA,OAAKR,QAAQ,CAACQ,OAAO,GAAG,CAAC,CAAC;IAAA;EAAC,CAClD,CAAC;AAEN;AAEA,eAAeZ,sBAAsB"}
|
|
@@ -5,31 +5,28 @@ import classNames from 'classnames';
|
|
|
5
5
|
import TableCell from './TableCell';
|
|
6
6
|
import DataTableContext from './DataTableContext';
|
|
7
7
|
function TableRow(_ref) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = row;
|
|
18
|
-
const {
|
|
19
|
-
renderRowSubComponent,
|
|
20
|
-
visibleColumns
|
|
21
|
-
} = useContext(DataTableContext);
|
|
8
|
+
var row = _ref.row;
|
|
9
|
+
var getRowProps = row.getRowProps,
|
|
10
|
+
cells = row.cells,
|
|
11
|
+
id = row.id,
|
|
12
|
+
isSelected = row.isSelected,
|
|
13
|
+
isExpanded = row.isExpanded;
|
|
14
|
+
var _useContext = useContext(DataTableContext),
|
|
15
|
+
renderRowSubComponent = _useContext.renderRowSubComponent,
|
|
16
|
+
visibleColumns = _useContext.visibleColumns;
|
|
22
17
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("tr", getRowProps({
|
|
23
18
|
className: classNames({
|
|
24
19
|
'pgn__data-table-row': true,
|
|
25
20
|
'is-selected': isSelected
|
|
26
21
|
})
|
|
27
|
-
}), cells.map(
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
}), cells.map(function (cell) {
|
|
23
|
+
return /*#__PURE__*/React.createElement(TableCell, _extends({}, cell, {
|
|
24
|
+
key: "".concat(cell.column.Header).concat(id)
|
|
25
|
+
}));
|
|
26
|
+
})), isExpanded && renderRowSubComponent ? /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
|
30
27
|
colSpan: visibleColumns.length
|
|
31
28
|
}, renderRowSubComponent({
|
|
32
|
-
row
|
|
29
|
+
row: row
|
|
33
30
|
}))) : null);
|
|
34
31
|
}
|
|
35
32
|
TableRow.propTypes = {
|