@webiny/ui 0.0.0-mt-3 → 0.0.0-unstable.2af142b57e
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/Accordion/Accordion.d.ts +5 -5
- package/Accordion/Accordion.js +22 -22
- package/Accordion/Accordion.js.map +1 -0
- package/Accordion/Accordion.stories.js +26 -23
- package/Accordion/Accordion.stories.js.map +1 -0
- package/Accordion/AccordionItem.d.ts +24 -8
- package/Accordion/AccordionItem.js +91 -84
- package/Accordion/AccordionItem.js.map +1 -0
- package/Accordion/AccordionItemActions.d.ts +8 -0
- package/Accordion/AccordionItemActions.js +28 -0
- package/Accordion/AccordionItemActions.js.map +1 -0
- package/Accordion/index.js +27 -2
- package/Accordion/index.js.map +1 -0
- package/Alert/Alert.d.ts +4 -4
- package/Alert/Alert.js +19 -15
- package/Alert/Alert.js.map +1 -0
- package/Alert/Alert.stories.js +16 -13
- package/Alert/Alert.stories.js.map +1 -0
- package/Alert/index.js +16 -1
- package/Alert/index.js.map +1 -0
- package/AutoComplete/AutoComplete.d.ts +12 -19
- package/AutoComplete/AutoComplete.js +147 -148
- package/AutoComplete/AutoComplete.js.map +1 -0
- package/AutoComplete/AutoComplete.stories.js +20 -17
- package/AutoComplete/AutoComplete.stories.js.map +1 -0
- package/AutoComplete/MultiAutoComplete.d.ts +44 -40
- package/AutoComplete/MultiAutoComplete.js +304 -311
- package/AutoComplete/MultiAutoComplete.js.map +1 -0
- package/AutoComplete/MultiAutoComplete.stories.js +31 -28
- package/AutoComplete/MultiAutoComplete.stories.js.map +1 -0
- package/AutoComplete/index.js +27 -2
- package/AutoComplete/index.js.map +1 -0
- package/AutoComplete/styles.js +12 -4
- package/AutoComplete/styles.js.map +1 -0
- package/AutoComplete/types.d.ts +4 -3
- package/AutoComplete/types.js +5 -1
- package/AutoComplete/types.js.map +1 -0
- package/AutoComplete/utils.d.ts +11 -5
- package/AutoComplete/utils.js +15 -8
- package/AutoComplete/utils.js.map +1 -0
- package/Avatar/Avatar.d.ts +5 -11
- package/Avatar/Avatar.js +37 -28
- package/Avatar/Avatar.js.map +1 -0
- package/Avatar/Avatar.stories.js +13 -10
- package/Avatar/Avatar.stories.js.map +1 -0
- package/Avatar/index.js +16 -1
- package/Avatar/index.js.map +1 -0
- package/Button/Button.d.ts +39 -24
- package/Button/Button.js +74 -83
- package/Button/Button.js.map +1 -0
- package/Button/Button.stories.js +32 -29
- package/Button/Button.stories.js.map +1 -0
- package/Button/Button.styles.d.ts +6 -0
- package/Button/Button.styles.js +13 -0
- package/Button/Button.styles.js.map +1 -0
- package/Button/CopyButton/CopyButton.d.ts +4 -7
- package/Button/CopyButton/CopyButton.js +18 -18
- package/Button/CopyButton/CopyButton.js.map +1 -0
- package/Button/CopyButton/CopyButton.stories.js +13 -10
- package/Button/CopyButton/CopyButton.stories.js.map +1 -0
- package/Button/IconButton/IconButton.d.ts +4 -7
- package/Button/IconButton/IconButton.js +16 -15
- package/Button/IconButton/IconButton.js.map +1 -0
- package/Button/IconButton/IconButton.stories.js +22 -19
- package/Button/IconButton/IconButton.stories.js.map +1 -0
- package/Button/index.js +38 -3
- package/Button/index.js.map +1 -0
- package/Carousel/Carousel.d.ts +3 -3
- package/Carousel/Carousel.js +24 -25
- package/Carousel/Carousel.js.map +1 -0
- package/Carousel/Carouser.stories.js +20 -17
- package/Carousel/Carouser.stories.js.map +1 -0
- package/Carousel/index.js +13 -1
- package/Carousel/index.js.map +1 -0
- package/Checkbox/Checkbox.d.ts +5 -9
- package/Checkbox/Checkbox.js +38 -43
- package/Checkbox/Checkbox.js.map +1 -0
- package/Checkbox/Checkbox.stories.js +19 -16
- package/Checkbox/Checkbox.stories.js.map +1 -0
- package/Checkbox/Checkbox.styles.js +9 -4
- package/Checkbox/Checkbox.styles.js.map +1 -0
- package/Checkbox/CheckboxGroup.d.ts +2 -2
- package/Checkbox/CheckboxGroup.js +34 -35
- package/Checkbox/CheckboxGroup.js.map +1 -0
- package/Checkbox/CheckboxGroup.stories.js +23 -20
- package/Checkbox/CheckboxGroup.stories.js.map +1 -0
- package/Checkbox/index.js +20 -2
- package/Checkbox/index.js.map +1 -0
- package/Chips/Chip.d.ts +3 -8
- package/Chips/Chip.js +15 -8
- package/Chips/Chip.js.map +1 -0
- package/Chips/Chips.d.ts +4 -4
- package/Chips/Chips.js +21 -14
- package/Chips/Chips.js.map +1 -0
- package/Chips/Chips.stories.js +25 -18
- package/Chips/Chips.stories.js.map +1 -0
- package/Chips/index.d.ts +0 -1
- package/Chips/index.js +27 -3
- package/Chips/index.js.map +1 -0
- package/Chips/styles.js +19 -9
- package/Chips/styles.js.map +1 -0
- package/CodeEditor/CodeEditor.d.ts +5 -8
- package/CodeEditor/CodeEditor.js +42 -49
- package/CodeEditor/CodeEditor.js.map +1 -0
- package/CodeEditor/CodeEditor.stories.js +20 -17
- package/CodeEditor/CodeEditor.stories.js.map +1 -0
- package/CodeEditor/index.js +16 -1
- package/CodeEditor/index.js.map +1 -0
- package/ColorPicker/ColorPicker.d.ts +9 -10
- package/ColorPicker/ColorPicker.js +54 -66
- package/ColorPicker/ColorPicker.js.map +1 -0
- package/ColorPicker/ColorPicker.stories.js +18 -15
- package/ColorPicker/ColorPicker.stories.js.map +1 -0
- package/ColorPicker/index.js +16 -1
- package/ColorPicker/index.js.map +1 -0
- package/ConfirmationDialog/ConfirmationDialog.d.ts +13 -13
- package/ConfirmationDialog/ConfirmationDialog.js +75 -96
- package/ConfirmationDialog/ConfirmationDialog.js.map +1 -0
- package/ConfirmationDialog/ConfirmationDialog.stories.js +15 -12
- package/ConfirmationDialog/ConfirmationDialog.stories.js.map +1 -0
- package/ConfirmationDialog/index.js +27 -2
- package/ConfirmationDialog/index.js.map +1 -0
- package/ConfirmationDialog/withConfirmation.d.ts +2 -2
- package/ConfirmationDialog/withConfirmation.js +14 -6
- package/ConfirmationDialog/withConfirmation.js.map +1 -0
- package/DataTable/DataTable.d.ts +25 -0
- package/DataTable/DataTable.js +146 -0
- package/DataTable/DataTable.js.map +1 -0
- package/DataTable/DataTable.stories.d.ts +1 -0
- package/DataTable/DataTable.stories.js +71 -0
- package/DataTable/DataTable.stories.js.map +1 -0
- package/DataTable/README.md +72 -0
- package/DataTable/index.d.ts +1 -0
- package/DataTable/index.js +16 -0
- package/DataTable/index.js.map +1 -0
- package/DataTable/styled.d.ts +2 -0
- package/DataTable/styled.js +14 -0
- package/DataTable/styled.js.map +1 -0
- package/DelayedOnChange/DelayedOnChange.d.ts +40 -0
- package/DelayedOnChange/DelayedOnChange.js +110 -0
- package/DelayedOnChange/DelayedOnChange.js.map +1 -0
- package/DelayedOnChange/index.d.ts +2 -0
- package/DelayedOnChange/index.js +20 -0
- package/DelayedOnChange/index.js.map +1 -0
- package/DelayedOnChange/withDelayedOnChange.d.ts +3 -0
- package/DelayedOnChange/withDelayedOnChange.js +31 -0
- package/DelayedOnChange/withDelayedOnChange.js.map +1 -0
- package/Dialog/Dialog.d.ts +22 -30
- package/Dialog/Dialog.js +59 -55
- package/Dialog/Dialog.js.map +1 -0
- package/Dialog/Dialog.stories.js +19 -16
- package/Dialog/Dialog.stories.js.map +1 -0
- package/Dialog/index.js +16 -1
- package/Dialog/index.js.map +1 -0
- package/Drawer/Drawer.d.ts +1 -1
- package/Drawer/Drawer.js +14 -9
- package/Drawer/Drawer.js.map +1 -0
- package/Drawer/Drawer.stories.js +18 -15
- package/Drawer/Drawer.stories.js.map +1 -0
- package/Drawer/index.js +16 -1
- package/Drawer/index.js.map +1 -0
- package/DynamicFieldset/Fieldset.d.ts +26 -16
- package/DynamicFieldset/Fieldset.js +69 -74
- package/DynamicFieldset/Fieldset.js.map +1 -0
- package/DynamicFieldset/index.js +13 -1
- package/DynamicFieldset/index.js.map +1 -0
- package/Elevation/Elevation.d.ts +1 -1
- package/Elevation/Elevation.js +12 -6
- package/Elevation/Elevation.js.map +1 -0
- package/Elevation/Elevation.stories.js +19 -16
- package/Elevation/Elevation.stories.js.map +1 -0
- package/Elevation/index.js +16 -1
- package/Elevation/index.js.map +1 -0
- package/FormElementMessage/FormElementMessage.d.ts +1 -1
- package/FormElementMessage/FormElementMessage.js +11 -6
- package/FormElementMessage/FormElementMessage.js.map +1 -0
- package/FormElementMessage/index.js +12 -1
- package/FormElementMessage/index.js.map +1 -0
- package/FullName/FullName.js +7 -7
- package/FullName/FullName.js.map +1 -0
- package/FullName/index.js +16 -1
- package/FullName/index.js.map +1 -0
- package/Grid/Grid.d.ts +1 -1
- package/Grid/Grid.js +19 -10
- package/Grid/Grid.js.map +1 -0
- package/Grid/Grid.stories.js +15 -12
- package/Grid/Grid.stories.js.map +1 -0
- package/Grid/index.js +16 -1
- package/Grid/index.js.map +1 -0
- package/Helpers/ClassNames.d.ts +4 -3
- package/Helpers/ClassNames.js +16 -14
- package/Helpers/ClassNames.js.map +1 -0
- package/Helpers/index.js +12 -2
- package/Helpers/index.js.map +1 -0
- package/Icon/Icon.d.ts +3 -6
- package/Icon/Icon.js +15 -12
- package/Icon/Icon.js.map +1 -0
- package/Icon/Icon.stories.js +23 -20
- package/Icon/Icon.stories.js.map +1 -0
- package/Icon/index.js +16 -1
- package/Icon/index.js.map +1 -0
- package/Image/Image.d.ts +5 -4
- package/Image/Image.js +17 -13
- package/Image/Image.js.map +1 -0
- package/Image/Image.stories.js +14 -11
- package/Image/Image.stories.js.map +1 -0
- package/Image/index.js +16 -1
- package/Image/index.js.map +1 -0
- package/ImageEditor/ImageEditor.d.ts +33 -34
- package/ImageEditor/ImageEditor.js +129 -163
- package/ImageEditor/ImageEditor.js.map +1 -0
- package/ImageEditor/index.js +16 -1
- package/ImageEditor/index.js.map +1 -0
- package/ImageEditor/toolbar/crop.js +26 -22
- package/ImageEditor/toolbar/crop.js.map +1 -0
- package/ImageEditor/toolbar/filter.js +63 -59
- package/ImageEditor/toolbar/filter.js.map +1 -0
- package/ImageEditor/toolbar/flip.js +27 -25
- package/ImageEditor/toolbar/flip.js.map +1 -0
- package/ImageEditor/toolbar/icons/index.js +61 -8
- package/ImageEditor/toolbar/icons/index.js.map +1 -0
- package/ImageEditor/toolbar/index.js +34 -4
- package/ImageEditor/toolbar/index.js.map +1 -0
- package/ImageEditor/toolbar/rotate.js +55 -61
- package/ImageEditor/toolbar/rotate.js.map +1 -0
- package/ImageEditor/toolbar/types.d.ts +23 -12
- package/ImageEditor/toolbar/types.js +5 -1
- package/ImageEditor/toolbar/types.js.map +1 -0
- package/ImageUpload/Image.d.ts +6 -6
- package/ImageUpload/Image.js +52 -54
- package/ImageUpload/Image.js.map +1 -0
- package/ImageUpload/ImageEditorDialog.d.ts +11 -6
- package/ImageUpload/ImageEditorDialog.js +45 -46
- package/ImageUpload/ImageEditorDialog.js.map +1 -0
- package/ImageUpload/MultiImageUpload.d.ts +10 -31
- package/ImageUpload/MultiImageUpload.js +194 -222
- package/ImageUpload/MultiImageUpload.js.map +1 -0
- package/ImageUpload/MultiImageUpload.stories.js +18 -15
- package/ImageUpload/MultiImageUpload.stories.js.map +1 -0
- package/ImageUpload/SingleImageUpload.d.ts +16 -37
- package/ImageUpload/SingleImageUpload.js +96 -106
- package/ImageUpload/SingleImageUpload.js.map +1 -0
- package/ImageUpload/SingleImageUpload.stories.js +19 -16
- package/ImageUpload/SingleImageUpload.stories.js.map +1 -0
- package/ImageUpload/index.js +34 -4
- package/ImageUpload/index.js.map +1 -0
- package/ImageUpload/styled.d.ts +20 -14
- package/ImageUpload/styled.js +25 -16
- package/ImageUpload/styled.js.map +1 -0
- package/Input/Input.d.ts +5 -19
- package/Input/Input.js +106 -140
- package/Input/Input.js.map +1 -0
- package/Input/Input.stories.js +49 -46
- package/Input/Input.stories.js.map +1 -0
- package/Input/__tests__/Input.test.js +54 -63
- package/Input/__tests__/Input.test.js.map +1 -0
- package/Input/index.js +16 -1
- package/Input/index.js.map +1 -0
- package/List/CollapsibleList/CollapsibleList.stories.js +19 -16
- package/List/CollapsibleList/CollapsibleList.stories.js.map +1 -0
- package/List/CollapsibleList/index.d.ts +2 -2
- package/List/CollapsibleList/index.js +15 -6
- package/List/CollapsibleList/index.js.map +1 -0
- package/List/DataList/DataList.d.ts +24 -43
- package/List/DataList/DataList.js +87 -122
- package/List/DataList/DataList.js.map +1 -0
- package/List/DataList/DataList.stories.js +30 -26
- package/List/DataList/DataList.stories.js.map +1 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.d.ts +8 -8
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.js +26 -18
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.js.map +1 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.d.ts +3 -3
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js +20 -13
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js.map +1 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.d.ts +9 -4
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js +24 -12
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js.map +1 -0
- package/List/DataList/DataListModalOverlay/index.js +32 -3
- package/List/DataList/DataListModalOverlay/index.js.map +1 -0
- package/List/DataList/DataListWithSections.d.ts +45 -0
- package/List/DataList/DataListWithSections.js +312 -0
- package/List/DataList/DataListWithSections.js.map +1 -0
- package/List/DataList/Loader.d.ts +2 -2
- package/List/DataList/Loader.js +48 -52
- package/List/DataList/Loader.js.map +1 -0
- package/List/DataList/NoData.d.ts +2 -2
- package/List/DataList/NoData.js +14 -8
- package/List/DataList/NoData.js.map +1 -0
- package/List/DataList/icons/index.d.ts +1 -1
- package/List/DataList/icons/index.js +54 -38
- package/List/DataList/icons/index.js.map +1 -0
- package/List/DataList/index.d.ts +1 -0
- package/List/DataList/index.js +58 -3
- package/List/DataList/index.js.map +1 -0
- package/List/DataList/types.d.ts +1 -1
- package/List/DataList/types.js +5 -1
- package/List/DataList/types.js.map +1 -0
- package/List/List.d.ts +3 -2
- package/List/List.js +66 -62
- package/List/List.js.map +1 -0
- package/List/List.stories.js +40 -37
- package/List/List.stories.js.map +1 -0
- package/List/icons/index.js +20 -3
- package/List/icons/index.js.map +1 -0
- package/List/index.d.ts +1 -1
- package/List/index.js +70 -3
- package/List/index.js.map +1 -0
- package/Menu/Menu.d.ts +14 -21
- package/Menu/Menu.js +47 -61
- package/Menu/Menu.js.map +1 -0
- package/Menu/Menu.stories.js +17 -14
- package/Menu/Menu.stories.js.map +1 -0
- package/Menu/index.js +16 -1
- package/Menu/index.js.map +1 -0
- package/Mosaic/Mosaic.d.ts +4 -14
- package/Mosaic/Mosaic.js +20 -7
- package/Mosaic/Mosaic.js.map +1 -0
- package/Mosaic/Mosaic.stories.js +31 -28
- package/Mosaic/Mosaic.stories.js.map +1 -0
- package/Mosaic/index.js +16 -1
- package/Mosaic/index.js.map +1 -0
- package/Progress/CircularProgress.d.ts +8 -16
- package/Progress/CircularProgress.js +32 -22
- package/Progress/CircularProgress.js.map +1 -0
- package/Progress/index.js +13 -1
- package/Progress/index.js.map +1 -0
- package/Radio/Radio.d.ts +2 -6
- package/Radio/Radio.js +36 -41
- package/Radio/Radio.js.map +1 -0
- package/Radio/Radio.styles.js +9 -4
- package/Radio/Radio.styles.js.map +1 -0
- package/Radio/RadioGroup.d.ts +1 -6
- package/Radio/RadioGroup.js +30 -34
- package/Radio/RadioGroup.js.map +1 -0
- package/Radio/RadioGroup.stories.js +23 -20
- package/Radio/RadioGroup.stories.js.map +1 -0
- package/Radio/index.js +20 -2
- package/Radio/index.js.map +1 -0
- package/RichTextEditor/RichTextEditor.d.ts +13 -9
- package/RichTextEditor/RichTextEditor.js +79 -78
- package/RichTextEditor/RichTextEditor.js.map +1 -0
- package/RichTextEditor/RichTextEditor.stories.js +15 -11
- package/RichTextEditor/RichTextEditor.stories.js.map +1 -0
- package/RichTextEditor/createPropsFromConfig.d.ts +11 -1
- package/RichTextEditor/createPropsFromConfig.js +16 -5
- package/RichTextEditor/createPropsFromConfig.js.map +1 -0
- package/RichTextEditor/index.d.ts +1 -0
- package/RichTextEditor/index.js +27 -2
- package/RichTextEditor/index.js.map +1 -0
- package/Ripple/Ripple.d.ts +4 -5
- package/Ripple/Ripple.js +11 -6
- package/Ripple/Ripple.js.map +1 -0
- package/Ripple/Ripple.stories.js +45 -42
- package/Ripple/Ripple.stories.js.map +1 -0
- package/Ripple/index.js +16 -1
- package/Ripple/index.js.map +1 -0
- package/Scrollbar/Scrollbar.d.ts +5 -5
- package/Scrollbar/Scrollbar.js +10 -5
- package/Scrollbar/Scrollbar.js.map +1 -0
- package/Scrollbar/Scrollbar.stories.js +12 -9
- package/Scrollbar/Scrollbar.stories.js.map +1 -0
- package/Scrollbar/index.js +16 -1
- package/Scrollbar/index.js.map +1 -0
- package/Section/Section.stories.js +15 -12
- package/Section/Section.stories.js.map +1 -0
- package/Section/index.d.ts +4 -5
- package/Section/index.js +23 -18
- package/Section/index.js.map +1 -0
- package/Select/Select.d.ts +7 -10
- package/Select/Select.js +84 -29
- package/Select/Select.js.map +1 -0
- package/Select/Select.stories.js +28 -25
- package/Select/Select.stories.js.map +1 -0
- package/Select/index.js +16 -1
- package/Select/index.js.map +1 -0
- package/Skeleton/README.md +21 -0
- package/Skeleton/Skeleton.d.ts +4 -0
- package/Skeleton/Skeleton.js +18 -0
- package/Skeleton/Skeleton.js.map +1 -0
- package/Skeleton/Skeleton.stories.d.ts +1 -0
- package/Skeleton/Skeleton.stories.js +22 -0
- package/Skeleton/Skeleton.stories.js.map +1 -0
- package/Skeleton/index.d.ts +1 -0
- package/Skeleton/index.js +16 -0
- package/Skeleton/index.js.map +1 -0
- package/Slider/Slider.d.ts +1 -6
- package/Slider/Slider.js +39 -47
- package/Slider/Slider.js.map +1 -0
- package/Slider/Slider.stories.js +20 -17
- package/Slider/Slider.stories.js.map +1 -0
- package/Slider/index.js +13 -1
- package/Slider/index.js.map +1 -0
- package/Snackbar/Snackbar.d.ts +5 -7
- package/Snackbar/Snackbar.js +29 -33
- package/Snackbar/Snackbar.js.map +1 -0
- package/Snackbar/Snackbar.stories.js +29 -38
- package/Snackbar/Snackbar.stories.js.map +1 -0
- package/Snackbar/index.js +18 -1
- package/Snackbar/index.js.map +1 -0
- package/Switch/Switch.d.ts +3 -7
- package/Switch/Switch.js +35 -43
- package/Switch/Switch.js.map +1 -0
- package/Switch/Switch.stories.js +19 -16
- package/Switch/Switch.stories.js.map +1 -0
- package/Switch/index.js +16 -1
- package/Switch/index.js.map +1 -0
- package/Tabs/Tab.d.ts +7 -2
- package/Tabs/Tab.js +30 -9
- package/Tabs/Tab.js.map +1 -0
- package/Tabs/Tabs.d.ts +44 -21
- package/Tabs/Tabs.js +123 -130
- package/Tabs/Tabs.js.map +1 -0
- package/Tabs/Tabs.stories.js +25 -23
- package/Tabs/Tabs.stories.js.map +1 -0
- package/Tabs/index.js +27 -2
- package/Tabs/index.js.map +1 -0
- package/Tags/Tags.d.ts +9 -21
- package/Tags/Tags.js +95 -124
- package/Tags/Tags.js.map +1 -0
- package/Tags/Tags.stories.js +19 -16
- package/Tags/Tags.stories.js.map +1 -0
- package/Tags/index.js +16 -1
- package/Tags/index.js.map +1 -0
- package/Tooltip/Tooltip.d.ts +9 -8
- package/Tooltip/Tooltip.js +33 -33
- package/Tooltip/Tooltip.js.map +1 -0
- package/Tooltip/Tooltip.stories.js +14 -11
- package/Tooltip/Tooltip.stories.js.map +1 -0
- package/Tooltip/index.js +16 -1
- package/Tooltip/index.js.map +1 -0
- package/TopAppBar/TopAppBar.d.ts +1 -1
- package/TopAppBar/TopAppBar.js +13 -9
- package/TopAppBar/TopAppBar.js.map +1 -0
- package/TopAppBar/TopAppBar.stories.js +31 -30
- package/TopAppBar/TopAppBar.stories.js.map +1 -0
- package/TopAppBar/TopAppBarActionItem.d.ts +1 -1
- package/TopAppBar/TopAppBarActionItem.js +10 -5
- package/TopAppBar/TopAppBarActionItem.js.map +1 -0
- package/TopAppBar/TopAppBarNavigationIcon.d.ts +1 -1
- package/TopAppBar/TopAppBarNavigationIcon.js +10 -5
- package/TopAppBar/TopAppBarNavigationIcon.js.map +1 -0
- package/TopAppBar/TopAppBarPrimary.js +13 -9
- package/TopAppBar/TopAppBarPrimary.js.map +1 -0
- package/TopAppBar/TopAppBarSecondary.js +15 -11
- package/TopAppBar/TopAppBarSecondary.js.map +1 -0
- package/TopAppBar/TopAppBarSection.d.ts +1 -1
- package/TopAppBar/TopAppBarSection.js +13 -9
- package/TopAppBar/TopAppBarSection.js.map +1 -0
- package/TopAppBar/TopAppBarTitle.d.ts +1 -1
- package/TopAppBar/TopAppBarTitle.js +13 -9
- package/TopAppBar/TopAppBarTitle.js.map +1 -0
- package/TopAppBar/index.js +82 -7
- package/TopAppBar/index.js.map +1 -0
- package/TopProgressBar/TopProgressBar.d.ts +7 -7
- package/TopProgressBar/TopProgressBar.js +15 -7
- package/TopProgressBar/TopProgressBar.js.map +1 -0
- package/TopProgressBar/TopProgressBar.stories.js +16 -13
- package/TopProgressBar/TopProgressBar.stories.js.map +1 -0
- package/TopProgressBar/hoc/index.js +13 -1
- package/TopProgressBar/hoc/index.js.map +1 -0
- package/TopProgressBar/hoc/withTopProgressBar.d.ts +1 -1
- package/TopProgressBar/hoc/withTopProgressBar.js +14 -9
- package/TopProgressBar/hoc/withTopProgressBar.js.map +1 -0
- package/TopProgressBar/index.js +16 -1
- package/TopProgressBar/index.js.map +1 -0
- package/Typography/Typography.d.ts +5 -5
- package/Typography/Typography.js +10 -5
- package/Typography/Typography.js.map +1 -0
- package/Typography/Typography.stories.js +37 -34
- package/Typography/Typography.stories.js.map +1 -0
- package/Typography/index.js +16 -1
- package/Typography/index.js.map +1 -0
- package/package.json +58 -64
- package/styles.scss +3 -4
- package/types.d.ts +4 -4
- package/types.js +5 -1
- package/types.js.map +1 -0
- package/Chips/ChipIcon.d.ts +0 -4
- package/Chips/ChipIcon.js +0 -8
- package/rmwc/textfield/code/index.d.ts +0 -135
- package/rmwc/textfield/code/index.js +0 -571
- package/rmwc/textfield/next/index.d.ts +0 -135
- package/rmwc/textfield/next/index.js +0 -560
- package/rmwc/textfield/package.json +0 -45
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
interface ChildrenRenderProp {
|
|
3
|
-
showConfirmation: (onAccept?:
|
|
3
|
+
showConfirmation: (onAccept?: () => void, onCancel?: () => void) => any;
|
|
4
4
|
}
|
|
5
5
|
interface ConfirmationCallbacks {
|
|
6
|
-
onAccept
|
|
7
|
-
onCancel
|
|
6
|
+
onAccept?: () => void;
|
|
7
|
+
onCancel?: () => void;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
interface Props {
|
|
10
10
|
title?: React.ReactNode;
|
|
11
11
|
message?: React.ReactNode;
|
|
12
12
|
loading?: React.ReactNode;
|
|
@@ -14,15 +14,15 @@ declare type Props = {
|
|
|
14
14
|
children: (props: ChildrenRenderProp) => React.ReactNode;
|
|
15
15
|
disableConfirm?: boolean;
|
|
16
16
|
style?: React.CSSProperties;
|
|
17
|
-
}
|
|
18
|
-
|
|
17
|
+
}
|
|
18
|
+
interface ConfirmationDialogState {
|
|
19
19
|
show: boolean;
|
|
20
20
|
loading: boolean;
|
|
21
|
-
}
|
|
21
|
+
}
|
|
22
22
|
/**
|
|
23
23
|
* Use ConfirmationDialog component to display a list of choices, once the handler is triggered.
|
|
24
24
|
*/
|
|
25
|
-
declare class ConfirmationDialog extends React.Component<Props,
|
|
25
|
+
declare class ConfirmationDialog extends React.Component<Props, ConfirmationDialogState> {
|
|
26
26
|
static defaultProps: {
|
|
27
27
|
title: string;
|
|
28
28
|
message: string;
|
|
@@ -36,10 +36,10 @@ declare class ConfirmationDialog extends React.Component<Props, State> {
|
|
|
36
36
|
};
|
|
37
37
|
componentDidMount(): void;
|
|
38
38
|
componentWillUnmount(): void;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
private readonly showConfirmation;
|
|
40
|
+
private readonly hideConfirmation;
|
|
41
|
+
private readonly onAccept;
|
|
42
|
+
private readonly onCancel;
|
|
43
43
|
render(): JSX.Element;
|
|
44
44
|
}
|
|
45
45
|
export { ConfirmationDialog };
|
|
@@ -1,128 +1,110 @@
|
|
|
1
|
-
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
7
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
|
-
import * as React from "react";
|
|
10
|
-
import noop from "lodash/noop";
|
|
11
|
-
import { Dialog, DialogButton, DialogCancel, DialogActions, DialogTitle, DialogContent } from "./../Dialog";
|
|
12
|
-
import { CircularProgress } from "../Progress";
|
|
1
|
+
"use strict";
|
|
13
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ConfirmationDialog = void 0;
|
|
8
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
9
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
15
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
|
17
|
+
var _Dialog = require("./../Dialog");
|
|
18
|
+
var _Progress = require("../Progress");
|
|
14
19
|
/**
|
|
15
20
|
* Use ConfirmationDialog component to display a list of choices, once the handler is triggered.
|
|
16
21
|
*/
|
|
17
22
|
var ConfirmationDialog = /*#__PURE__*/function (_React$Component) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var _super = _createSuper(ConfirmationDialog);
|
|
21
|
-
|
|
23
|
+
(0, _inherits2.default)(ConfirmationDialog, _React$Component);
|
|
24
|
+
var _super = (0, _createSuper2.default)(ConfirmationDialog);
|
|
22
25
|
function ConfirmationDialog() {
|
|
23
26
|
var _this;
|
|
24
|
-
|
|
25
|
-
_classCallCheck(this, ConfirmationDialog);
|
|
26
|
-
|
|
27
|
+
(0, _classCallCheck2.default)(this, ConfirmationDialog);
|
|
27
28
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
28
29
|
args[_key] = arguments[_key];
|
|
29
30
|
}
|
|
30
|
-
|
|
31
31
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
onCancel:
|
|
32
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "__isMounted", false);
|
|
33
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "callbacks", {
|
|
34
|
+
onAccept: function onAccept() {
|
|
35
|
+
return void 0;
|
|
36
|
+
},
|
|
37
|
+
onCancel: function onCancel() {
|
|
38
|
+
return void 0;
|
|
39
|
+
}
|
|
38
40
|
});
|
|
39
|
-
|
|
40
|
-
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
41
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
41
42
|
show: false,
|
|
42
43
|
loading: false
|
|
43
44
|
});
|
|
44
|
-
|
|
45
|
-
_defineProperty(_assertThisInitialized(_this), "showConfirmation", function (onAccept, onCancel) {
|
|
45
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "showConfirmation", function (onAccept, onCancel) {
|
|
46
46
|
_this.callbacks = {
|
|
47
47
|
onAccept: onAccept,
|
|
48
48
|
onCancel: onCancel
|
|
49
49
|
};
|
|
50
|
-
|
|
51
50
|
_this.setState({
|
|
52
51
|
show: true
|
|
53
52
|
});
|
|
54
53
|
});
|
|
55
|
-
|
|
56
|
-
_defineProperty(_assertThisInitialized(_this), "hideConfirmation", function () {
|
|
54
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "hideConfirmation", function () {
|
|
57
55
|
_this.setState({
|
|
58
56
|
show: false
|
|
59
57
|
});
|
|
60
58
|
});
|
|
61
|
-
|
|
62
|
-
_defineProperty(_assertThisInitialized(_this), "onAccept", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
59
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onAccept", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
63
60
|
var onAccept;
|
|
64
|
-
return
|
|
65
|
-
while (1) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
61
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
62
|
+
while (1) switch (_context.prev = _context.next) {
|
|
63
|
+
case 0:
|
|
64
|
+
onAccept = _this.callbacks.onAccept;
|
|
65
|
+
if (!(typeof onAccept === "function")) {
|
|
66
|
+
_context.next = 6;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
_this.setState({
|
|
70
|
+
loading: true
|
|
71
|
+
});
|
|
72
|
+
_context.next = 5;
|
|
73
|
+
return onAccept();
|
|
74
|
+
case 5:
|
|
75
|
+
if (_this.__isMounted) {
|
|
75
76
|
_this.setState({
|
|
76
|
-
loading:
|
|
77
|
+
loading: false,
|
|
78
|
+
show: false
|
|
77
79
|
});
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
case 5:
|
|
83
|
-
if (_this.__isMounted) {
|
|
84
|
-
_this.setState({
|
|
85
|
-
loading: false,
|
|
86
|
-
show: false
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
case 6:
|
|
91
|
-
case "end":
|
|
92
|
-
return _context.stop();
|
|
93
|
-
}
|
|
80
|
+
}
|
|
81
|
+
case 6:
|
|
82
|
+
case "end":
|
|
83
|
+
return _context.stop();
|
|
94
84
|
}
|
|
95
85
|
}, _callee);
|
|
96
86
|
})));
|
|
97
|
-
|
|
98
|
-
_defineProperty(_assertThisInitialized(_this), "onCancel", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
87
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onCancel", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2() {
|
|
99
88
|
var onCancel;
|
|
100
|
-
return
|
|
101
|
-
while (1) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (!(typeof onCancel === "function")) {
|
|
107
|
-
_context2.next = 4;
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
|
|
89
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
90
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
91
|
+
case 0:
|
|
92
|
+
onCancel = _this.callbacks.onCancel;
|
|
93
|
+
if (!(typeof onCancel === "function")) {
|
|
111
94
|
_context2.next = 4;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
_context2.next = 4;
|
|
98
|
+
return onCancel();
|
|
99
|
+
case 4:
|
|
100
|
+
case "end":
|
|
101
|
+
return _context2.stop();
|
|
118
102
|
}
|
|
119
103
|
}, _callee2);
|
|
120
104
|
})));
|
|
121
|
-
|
|
122
105
|
return _this;
|
|
123
106
|
}
|
|
124
|
-
|
|
125
|
-
_createClass(ConfirmationDialog, [{
|
|
107
|
+
(0, _createClass2.default)(ConfirmationDialog, [{
|
|
126
108
|
key: "componentDidMount",
|
|
127
109
|
value: function componentDidMount() {
|
|
128
110
|
this.__isMounted = true;
|
|
@@ -135,14 +117,14 @@ var ConfirmationDialog = /*#__PURE__*/function (_React$Component) {
|
|
|
135
117
|
}, {
|
|
136
118
|
key: "render",
|
|
137
119
|
value: function render() {
|
|
138
|
-
return /*#__PURE__*/
|
|
120
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog, {
|
|
139
121
|
style: this.props.style,
|
|
140
122
|
open: this.state.show,
|
|
141
123
|
onClose: this.hideConfirmation,
|
|
142
124
|
"data-testid": this.props["data-testid"]
|
|
143
|
-
}, this.state.loading ? this.props.loading : null, /*#__PURE__*/
|
|
125
|
+
}, this.state.loading ? this.props.loading : null, /*#__PURE__*/_react.default.createElement(_Dialog.DialogTitle, null, this.props.title), /*#__PURE__*/_react.default.createElement(_Dialog.DialogContent, null, this.props.message), /*#__PURE__*/_react.default.createElement(_Dialog.DialogActions, null, /*#__PURE__*/_react.default.createElement(_Dialog.DialogCancel, {
|
|
144
126
|
onClick: this.onCancel
|
|
145
|
-
}, "Cancel"), /*#__PURE__*/
|
|
127
|
+
}, "Cancel"), /*#__PURE__*/_react.default.createElement(_Dialog.DialogButton, {
|
|
146
128
|
"data-testid": "confirmationdialog-confirm-action",
|
|
147
129
|
onClick: this.onAccept,
|
|
148
130
|
disabled: this.props.disableConfirm
|
|
@@ -151,14 +133,11 @@ var ConfirmationDialog = /*#__PURE__*/function (_React$Component) {
|
|
|
151
133
|
}));
|
|
152
134
|
}
|
|
153
135
|
}]);
|
|
154
|
-
|
|
155
136
|
return ConfirmationDialog;
|
|
156
|
-
}(
|
|
157
|
-
|
|
158
|
-
|
|
137
|
+
}(_react.default.Component);
|
|
138
|
+
exports.ConfirmationDialog = ConfirmationDialog;
|
|
139
|
+
(0, _defineProperty2.default)(ConfirmationDialog, "defaultProps", {
|
|
159
140
|
title: "Confirmation",
|
|
160
141
|
message: "Are you sure you want to continue?",
|
|
161
|
-
loading: /*#__PURE__*/
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
export { ConfirmationDialog };
|
|
142
|
+
loading: /*#__PURE__*/_react.default.createElement(_Progress.CircularProgress, null)
|
|
143
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ConfirmationDialog","onAccept","onCancel","show","loading","callbacks","setState","__isMounted","props","style","state","hideConfirmation","title","message","disableConfirm","children","showConfirmation","React","Component"],"sources":["ConfirmationDialog.tsx"],"sourcesContent":["import React from \"react\";\n\nimport {\n Dialog,\n DialogButton,\n DialogCancel,\n DialogActions,\n DialogTitle,\n DialogContent\n} from \"./../Dialog\";\n\nimport { CircularProgress } from \"../Progress\";\n\ninterface ChildrenRenderProp {\n showConfirmation: (onAccept?: () => void, onCancel?: () => void) => any;\n}\n\ninterface ConfirmationCallbacks {\n onAccept?: () => void;\n onCancel?: () => void;\n}\n\ninterface Props {\n // Title of confirmation dialog\n title?: React.ReactNode;\n\n // Message of confirmation dialog\n message?: React.ReactNode;\n\n // This element will be rendered during loading\n loading?: React.ReactNode;\n\n // For testing purposes\n \"data-testid\"?: string;\n\n // An element that will trigger the confirmation dialog.\n children: (props: ChildrenRenderProp) => React.ReactNode;\n\n // Is `Confirm` button disabled\n disableConfirm?: boolean;\n\n // Dialog component's custom in-line styles.\n style?: React.CSSProperties;\n}\n\ninterface ConfirmationDialogState {\n show: boolean;\n loading: boolean;\n}\n\n/**\n * Use ConfirmationDialog component to display a list of choices, once the handler is triggered.\n */\nclass ConfirmationDialog extends React.Component<Props, ConfirmationDialogState> {\n static defaultProps = {\n title: \"Confirmation\",\n message: \"Are you sure you want to continue?\",\n loading: <CircularProgress />\n };\n\n __isMounted = false;\n\n callbacks: ConfirmationCallbacks = {\n onAccept: () => {\n return void 0;\n },\n onCancel: () => {\n return void 0;\n }\n };\n\n public override state = {\n show: false,\n loading: false\n };\n\n public override componentDidMount() {\n this.__isMounted = true;\n }\n\n public override componentWillUnmount() {\n this.__isMounted = false;\n }\n\n private readonly showConfirmation = (onAccept?: () => void, onCancel?: () => void) => {\n this.callbacks = {\n onAccept,\n onCancel\n };\n this.setState({ show: true });\n };\n\n private readonly hideConfirmation = () => {\n this.setState({ show: false });\n };\n\n private readonly onAccept = async () => {\n const { onAccept } = this.callbacks;\n if (typeof onAccept === \"function\") {\n this.setState({ loading: true });\n await onAccept();\n if (this.__isMounted) {\n this.setState({ loading: false, show: false });\n }\n }\n };\n\n private readonly onCancel = async () => {\n const { onCancel } = this.callbacks;\n if (typeof onCancel === \"function\") {\n await onCancel();\n }\n };\n\n public override render() {\n return (\n <React.Fragment>\n <Dialog\n style={this.props.style}\n open={this.state.show}\n onClose={this.hideConfirmation}\n data-testid={this.props[\"data-testid\"]}\n >\n {this.state.loading ? this.props.loading : null}\n <DialogTitle>{this.props.title}</DialogTitle>\n <DialogContent>{this.props.message}</DialogContent>\n <DialogActions>\n <DialogCancel onClick={this.onCancel}>Cancel</DialogCancel>\n <DialogButton\n data-testid=\"confirmationdialog-confirm-action\"\n onClick={this.onAccept}\n disabled={this.props.disableConfirm}\n >\n Confirm\n </DialogButton>\n </DialogActions>\n </Dialog>\n {this.props.children({\n showConfirmation: this.showConfirmation\n })}\n </React.Fragment>\n );\n }\n}\n\nexport { ConfirmationDialog };\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAEA;AASA;AAuCA;AACA;AACA;AAFA,IAGMA,kBAAkB;EAAA;EAAA;EAAA;IAAA;IAAA;IAAA;MAAA;IAAA;IAAA;IAAA,0FAON,KAAK;IAAA,wFAEgB;MAC/BC,QAAQ,EAAE,oBAAM;QACZ,OAAO,KAAK,CAAC;MACjB,CAAC;MACDC,QAAQ,EAAE,oBAAM;QACZ,OAAO,KAAK,CAAC;MACjB;IACJ,CAAC;IAAA,oFAEuB;MACpBC,IAAI,EAAE,KAAK;MACXC,OAAO,EAAE;IACb,CAAC;IAAA,+FAUmC,UAACH,QAAqB,EAAEC,QAAqB,EAAK;MAClF,MAAKG,SAAS,GAAG;QACbJ,QAAQ,EAARA,QAAQ;QACRC,QAAQ,EAARA;MACJ,CAAC;MACD,MAAKI,QAAQ,CAAC;QAAEH,IAAI,EAAE;MAAK,CAAC,CAAC;IACjC,CAAC;IAAA,+FAEmC,YAAM;MACtC,MAAKG,QAAQ,CAAC;QAAEH,IAAI,EAAE;MAAM,CAAC,CAAC;IAClC,CAAC;IAAA,2LAE2B;MAAA;MAAA;QAAA;UAAA;YAChBF,QAAQ,GAAK,MAAKI,SAAS,CAA3BJ,QAAQ;YAAA,MACZ,OAAOA,QAAQ,KAAK,UAAU;cAAA;cAAA;YAAA;YAC9B,MAAKK,QAAQ,CAAC;cAAEF,OAAO,EAAE;YAAK,CAAC,CAAC;YAAC;YAAA,OAC3BH,QAAQ,EAAE;UAAA;YAChB,IAAI,MAAKM,WAAW,EAAE;cAClB,MAAKD,QAAQ,CAAC;gBAAEF,OAAO,EAAE,KAAK;gBAAED,IAAI,EAAE;cAAM,CAAC,CAAC;YAClD;UAAC;UAAA;YAAA;QAAA;MAAA;IAAA,CAER;IAAA,2LAE2B;MAAA;MAAA;QAAA;UAAA;YAChBD,QAAQ,GAAK,MAAKG,SAAS,CAA3BH,QAAQ;YAAA,MACZ,OAAOA,QAAQ,KAAK,UAAU;cAAA;cAAA;YAAA;YAAA;YAAA,OACxBA,QAAQ,EAAE;UAAA;UAAA;YAAA;QAAA;MAAA;IAAA,CAEvB;IAAA;EAAA;EAAA;IAAA;IAAA,OApCD,6BAAoC;MAChC,IAAI,CAACK,WAAW,GAAG,IAAI;IAC3B;EAAC;IAAA;IAAA,OAED,gCAAuC;MACnC,IAAI,CAACA,WAAW,GAAG,KAAK;IAC5B;EAAC;IAAA;IAAA,OAgCD,kBAAyB;MACrB,oBACI,6BAAC,cAAK,CAAC,QAAQ,qBACX,6BAAC,cAAM;QACH,KAAK,EAAE,IAAI,CAACC,KAAK,CAACC,KAAM;QACxB,IAAI,EAAE,IAAI,CAACC,KAAK,CAACP,IAAK;QACtB,OAAO,EAAE,IAAI,CAACQ,gBAAiB;QAC/B,eAAa,IAAI,CAACH,KAAK,CAAC,aAAa;MAAE,GAEtC,IAAI,CAACE,KAAK,CAACN,OAAO,GAAG,IAAI,CAACI,KAAK,CAACJ,OAAO,GAAG,IAAI,eAC/C,6BAAC,mBAAW,QAAE,IAAI,CAACI,KAAK,CAACI,KAAK,CAAe,eAC7C,6BAAC,qBAAa,QAAE,IAAI,CAACJ,KAAK,CAACK,OAAO,CAAiB,eACnD,6BAAC,qBAAa,qBACV,6BAAC,oBAAY;QAAC,OAAO,EAAE,IAAI,CAACX;MAAS,GAAC,QAAM,CAAe,eAC3D,6BAAC,oBAAY;QACT,eAAY,mCAAmC;QAC/C,OAAO,EAAE,IAAI,CAACD,QAAS;QACvB,QAAQ,EAAE,IAAI,CAACO,KAAK,CAACM;MAAe,GACvC,SAED,CAAe,CACH,CACX,EACR,IAAI,CAACN,KAAK,CAACO,QAAQ,CAAC;QACjBC,gBAAgB,EAAE,IAAI,CAACA;MAC3B,CAAC,CAAC,CACW;IAEzB;EAAC;EAAA;AAAA,EAzF4BC,cAAK,CAACC,SAAS;AAAA;AAAA,8BAA1ClB,kBAAkB,kBACE;EAClBY,KAAK,EAAE,cAAc;EACrBC,OAAO,EAAE,oCAAoC;EAC7CT,OAAO,eAAE,6BAAC,0BAAgB;AAC9B,CAAC"}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _react = _interopRequireDefault(require("react"));
|
|
5
|
+
var _react2 = require("@storybook/react");
|
|
6
|
+
var _Story = require("@webiny/storybook-utils/Story");
|
|
7
|
+
var _README = _interopRequireDefault(require("./../ConfirmationDialog/README.md"));
|
|
8
|
+
var _Button = require("./../Button");
|
|
9
|
+
var _ConfirmationDialog = require("./ConfirmationDialog");
|
|
10
|
+
var story = (0, _react2.storiesOf)("Components/ConfirmationDialog", module);
|
|
8
11
|
story.add("usage", function () {
|
|
9
|
-
return /*#__PURE__*/
|
|
12
|
+
return /*#__PURE__*/_react.default.createElement(_Story.Story, null, /*#__PURE__*/_react.default.createElement(_Story.StoryReadme, null, _README.default), /*#__PURE__*/_react.default.createElement(_Story.StorySandbox, {
|
|
10
13
|
title: "Icon with and without ConfirmationDialog"
|
|
11
|
-
}, /*#__PURE__*/
|
|
14
|
+
}, /*#__PURE__*/_react.default.createElement(_Story.StorySandboxExample, null, /*#__PURE__*/_react.default.createElement(_ConfirmationDialog.ConfirmationDialog, {
|
|
12
15
|
title: "Pay Invoice",
|
|
13
16
|
message: "Are you sure you want pay this invoice?"
|
|
14
17
|
}, function (_ref) {
|
|
15
18
|
var showConfirmation = _ref.showConfirmation;
|
|
16
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_Button.ButtonPrimary, {
|
|
17
20
|
onClick: function onClick() {
|
|
18
21
|
showConfirmation(function () {
|
|
19
22
|
return console.log("Confirm");
|
|
@@ -22,9 +25,9 @@ story.add("usage", function () {
|
|
|
22
25
|
});
|
|
23
26
|
}
|
|
24
27
|
}, "Pay Invoice");
|
|
25
|
-
})), /*#__PURE__*/
|
|
28
|
+
})), /*#__PURE__*/_react.default.createElement(_Story.StorySandboxCode, null, "\n <ConfirmationDialog\n title=\"Pay Invoice\"\n message=\"Are you sure you want pay this invoice?\"\n >\n {({ showConfirmation }) => {\n return (\n <ButtonPrimary\n onClick={() => {\n showConfirmation(\n () => console.log(\"Confirm\"),\n () => console.log(\"Cancel\")\n );\n }}\n >\n Pay Invoice\n </ButtonPrimary>\n );\n }}\n </ConfirmationDialog>\n ")));
|
|
26
29
|
}, {
|
|
27
30
|
info: {
|
|
28
|
-
propTables: [ConfirmationDialog]
|
|
31
|
+
propTables: [_ConfirmationDialog.ConfirmationDialog]
|
|
29
32
|
}
|
|
30
33
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["story","storiesOf","module","add","readme","showConfirmation","console","log","info","propTables","ConfirmationDialog"],"sources":["ConfirmationDialog.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport {\n Story,\n StoryReadme,\n StorySandboxCode,\n StorySandbox,\n StorySandboxExample\n} from \"@webiny/storybook-utils/Story\";\nimport readme from \"./../ConfirmationDialog/README.md\";\nimport { ButtonPrimary } from \"./../Button\";\nimport { ConfirmationDialog } from \"./ConfirmationDialog\";\n\nconst story = storiesOf(\"Components/ConfirmationDialog\", module);\n\nstory.add(\n \"usage\",\n () => {\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox title={\"Icon with and without ConfirmationDialog\"}>\n <StorySandboxExample>\n <ConfirmationDialog\n title=\"Pay Invoice\"\n message=\"Are you sure you want pay this invoice?\"\n >\n {({ showConfirmation }) => {\n return (\n <ButtonPrimary\n onClick={() => {\n showConfirmation(\n () => console.log(\"Confirm\"),\n () => console.log(\"Cancel\")\n );\n }}\n >\n Pay Invoice\n </ButtonPrimary>\n );\n }}\n </ConfirmationDialog>\n </StorySandboxExample>\n <StorySandboxCode>\n {`\n <ConfirmationDialog\n title=\"Pay Invoice\"\n message=\"Are you sure you want pay this invoice?\"\n >\n {({ showConfirmation }) => {\n return (\n <ButtonPrimary\n onClick={() => {\n showConfirmation(\n () => console.log(\"Confirm\"),\n () => console.log(\"Cancel\")\n );\n }}\n >\n Pay Invoice\n </ButtonPrimary>\n );\n }}\n </ConfirmationDialog>\n `}\n </StorySandboxCode>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [ConfirmationDialog] } }\n);\n"],"mappings":";;;AAAA;AACA;AACA;AAOA;AACA;AACA;AAEA,IAAMA,KAAK,GAAG,IAAAC,iBAAS,EAAC,+BAA+B,EAAEC,MAAM,CAAC;AAEhEF,KAAK,CAACG,GAAG,CACL,OAAO,EACP,YAAM;EACF,oBACI,6BAAC,YAAK,qBACF,6BAAC,kBAAW,QAAEC,eAAM,CAAe,eACnC,6BAAC,mBAAY;IAAC,KAAK,EAAE;EAA2C,gBAC5D,6BAAC,0BAAmB,qBAChB,6BAAC,sCAAkB;IACf,KAAK,EAAC,aAAa;IACnB,OAAO,EAAC;EAAyC,GAEhD,gBAA0B;IAAA,IAAvBC,gBAAgB,QAAhBA,gBAAgB;IAChB,oBACI,6BAAC,qBAAa;MACV,OAAO,EAAE,mBAAM;QACXA,gBAAgB,CACZ;UAAA,OAAMC,OAAO,CAACC,GAAG,CAAC,SAAS,CAAC;QAAA,GAC5B;UAAA,OAAMD,OAAO,CAACC,GAAG,CAAC,QAAQ,CAAC;QAAA,EAC9B;MACL;IAAE,GACL,aAED,CAAgB;EAExB,CAAC,CACgB,CACH,eACtB,6BAAC,uBAAgB,o7BAsBE,CACR,CACX;AAEhB,CAAC,EACD;EAAEC,IAAI,EAAE;IAAEC,UAAU,EAAE,CAACC,sCAAkB;EAAE;AAAE,CAAC,CACjD"}
|
|
@@ -1,2 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _ConfirmationDialog = require("./ConfirmationDialog");
|
|
7
|
+
Object.keys(_ConfirmationDialog).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _ConfirmationDialog[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _ConfirmationDialog[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _withConfirmation = require("./withConfirmation");
|
|
18
|
+
Object.keys(_withConfirmation).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _withConfirmation[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function get() {
|
|
24
|
+
return _withConfirmation[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./ConfirmationDialog\";\nexport * from \"./withConfirmation\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
declare type ConfirmationProps = {
|
|
3
3
|
title?: React.ReactNode;
|
|
4
4
|
message?: React.ReactNode;
|
|
5
5
|
};
|
|
6
|
-
declare type WithConfirmationParams = (props: any) => ConfirmationProps;
|
|
6
|
+
declare type WithConfirmationParams = (props: Record<string, any>) => ConfirmationProps;
|
|
7
7
|
export declare type WithConfirmationProps = {
|
|
8
8
|
showConfirmation: (confirm: Function, cancel: Function) => void;
|
|
9
9
|
};
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.withConfirmation = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _ConfirmationDialog = require("./ConfirmationDialog");
|
|
10
|
+
var withConfirmation = function withConfirmation(dialogProps) {
|
|
4
11
|
return function (Component) {
|
|
5
12
|
return function withConfirmationRender(ownProps) {
|
|
6
13
|
var props = typeof dialogProps === "function" ? dialogProps(ownProps) : dialogProps;
|
|
7
|
-
return /*#__PURE__*/
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_ConfirmationDialog.ConfirmationDialog, props, function (_ref) {
|
|
8
15
|
var showConfirmation = _ref.showConfirmation;
|
|
9
|
-
return /*#__PURE__*/
|
|
16
|
+
return /*#__PURE__*/_react.default.createElement(Component, Object.assign({}, ownProps, {
|
|
10
17
|
showConfirmation: showConfirmation
|
|
11
18
|
}));
|
|
12
19
|
});
|
|
13
20
|
};
|
|
14
21
|
};
|
|
15
|
-
};
|
|
22
|
+
};
|
|
23
|
+
exports.withConfirmation = withConfirmation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["withConfirmation","dialogProps","Component","withConfirmationRender","ownProps","props","showConfirmation"],"sources":["withConfirmation.tsx"],"sourcesContent":["import React from \"react\";\nimport { ConfirmationDialog } from \"./ConfirmationDialog\";\n\ntype ConfirmationProps = {\n title?: React.ReactNode;\n message?: React.ReactNode;\n};\n\ntype WithConfirmationParams = (props: Record<string, any>) => ConfirmationProps;\n\nexport type WithConfirmationProps = {\n showConfirmation: (confirm: Function, cancel: Function) => void;\n};\n\nexport const withConfirmation = (dialogProps: WithConfirmationParams): Function => {\n return (Component: typeof React.Component) => {\n return function withConfirmationRender(ownProps: Record<string, any>) {\n const props = typeof dialogProps === \"function\" ? dialogProps(ownProps) : dialogProps;\n return (\n <ConfirmationDialog {...props}>\n {({ showConfirmation }) => (\n <Component {...ownProps} showConfirmation={showConfirmation} />\n )}\n </ConfirmationDialog>\n );\n };\n };\n};\n"],"mappings":";;;;;;;AAAA;AACA;AAaO,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgB,CAAIC,WAAmC,EAAe;EAC/E,OAAO,UAACC,SAAiC,EAAK;IAC1C,OAAO,SAASC,sBAAsB,CAACC,QAA6B,EAAE;MAClE,IAAMC,KAAK,GAAG,OAAOJ,WAAW,KAAK,UAAU,GAAGA,WAAW,CAACG,QAAQ,CAAC,GAAGH,WAAW;MACrF,oBACI,6BAAC,sCAAkB,EAAKI,KAAK,EACxB;QAAA,IAAGC,gBAAgB,QAAhBA,gBAAgB;QAAA,oBAChB,6BAAC,SAAS,oBAAKF,QAAQ;UAAE,gBAAgB,EAAEE;QAAiB,GAAG;MAAA,CAClE,CACgB;IAE7B,CAAC;EACL,CAAC;AACL,CAAC;AAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DataTableCellProps } from "@rmwc/data-table";
|
|
3
|
+
import "@rmwc/data-table/data-table.css";
|
|
4
|
+
interface Column<T> {
|
|
5
|
+
header: string | number | JSX.Element;
|
|
6
|
+
cell?: (row: T) => string | number | JSX.Element;
|
|
7
|
+
meta?: DataTableCellProps;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare type Columns<T> = {
|
|
11
|
+
[P in keyof T]?: Column<T>;
|
|
12
|
+
};
|
|
13
|
+
export declare type DefaultData = {
|
|
14
|
+
selectable?: boolean;
|
|
15
|
+
};
|
|
16
|
+
interface Props<T> {
|
|
17
|
+
columns: Columns<T>;
|
|
18
|
+
data: T[];
|
|
19
|
+
onSelectRow?: (rows: T[] | []) => void;
|
|
20
|
+
loadingInitial?: boolean;
|
|
21
|
+
stickyColumns?: number;
|
|
22
|
+
stickyRows?: number;
|
|
23
|
+
}
|
|
24
|
+
export declare const DataTable: <T extends Object & DefaultData>({ data, columns, onSelectRow, loadingInitial, stickyColumns, stickyRows }: Props<T>) => JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.DataTable = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _dataTable = require("@rmwc/data-table");
|
|
14
|
+
var _reactTable = require("@tanstack/react-table");
|
|
15
|
+
var _Checkbox = require("../Checkbox");
|
|
16
|
+
var _Skeleton = require("../Skeleton");
|
|
17
|
+
require("@rmwc/data-table/data-table.css");
|
|
18
|
+
var _styled = require("./styled");
|
|
19
|
+
var defineColumns = function defineColumns(columns, onSelectRow, loadingInitial) {
|
|
20
|
+
return (0, _react.useMemo)(function () {
|
|
21
|
+
var columnsList = Object.keys(columns).map(function (key) {
|
|
22
|
+
return (0, _objectSpread2.default)({
|
|
23
|
+
id: key
|
|
24
|
+
}, columns[key]);
|
|
25
|
+
});
|
|
26
|
+
var defaults = columnsList.map(function (column) {
|
|
27
|
+
var id = column.id,
|
|
28
|
+
_header = column.header,
|
|
29
|
+
meta = column.meta,
|
|
30
|
+
_cell = column.cell;
|
|
31
|
+
return {
|
|
32
|
+
accessorKey: id,
|
|
33
|
+
header: function header() {
|
|
34
|
+
return _header;
|
|
35
|
+
},
|
|
36
|
+
cell: function cell(info) {
|
|
37
|
+
if (_cell && typeof _cell === "function") {
|
|
38
|
+
return _cell(info.row.original);
|
|
39
|
+
} else {
|
|
40
|
+
return info.getValue();
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
meta: meta
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
var select = !!onSelectRow ? [{
|
|
47
|
+
id: "datatable-select-column",
|
|
48
|
+
header: function header(_ref) {
|
|
49
|
+
var table = _ref.table;
|
|
50
|
+
return !loadingInitial && /*#__PURE__*/_react.default.createElement(_Checkbox.Checkbox, {
|
|
51
|
+
indeterminate: table.getIsSomeRowsSelected(),
|
|
52
|
+
value: table.getIsAllRowsSelected(),
|
|
53
|
+
onChange: function onChange(e) {
|
|
54
|
+
return table.toggleAllPageRowsSelected(e);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
cell: function cell(info) {
|
|
59
|
+
if (!info.row.getCanSelect()) {
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
61
|
+
}
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(_Checkbox.Checkbox, {
|
|
63
|
+
indeterminate: info.row.getIsSomeSelected(),
|
|
64
|
+
value: info.row.getIsSelected(),
|
|
65
|
+
onChange: info.row.getToggleSelectedHandler()
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
meta: {
|
|
69
|
+
hasFormControl: true,
|
|
70
|
+
className: "datatable-select-column"
|
|
71
|
+
}
|
|
72
|
+
}] : [];
|
|
73
|
+
return [].concat(select, (0, _toConsumableArray2.default)(defaults)).map(function (column) {
|
|
74
|
+
if (loadingInitial) {
|
|
75
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, column), {}, {
|
|
76
|
+
cell: function cell() {
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_Skeleton.Skeleton, null);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return column;
|
|
82
|
+
});
|
|
83
|
+
}, [columns, onSelectRow, loadingInitial]);
|
|
84
|
+
};
|
|
85
|
+
var defineData = function defineData(data, loadingInitial) {
|
|
86
|
+
return (0, _react.useMemo)(function () {
|
|
87
|
+
if (loadingInitial) {
|
|
88
|
+
return Array(10).fill({});
|
|
89
|
+
}
|
|
90
|
+
return data;
|
|
91
|
+
}, [data, loadingInitial]);
|
|
92
|
+
};
|
|
93
|
+
var DataTable = function DataTable(_ref2) {
|
|
94
|
+
var data = _ref2.data,
|
|
95
|
+
columns = _ref2.columns,
|
|
96
|
+
onSelectRow = _ref2.onSelectRow,
|
|
97
|
+
loadingInitial = _ref2.loadingInitial,
|
|
98
|
+
stickyColumns = _ref2.stickyColumns,
|
|
99
|
+
stickyRows = _ref2.stickyRows;
|
|
100
|
+
var _React$useState = _react.default.useState({}),
|
|
101
|
+
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
102
|
+
rowSelection = _React$useState2[0],
|
|
103
|
+
setRowSelection = _React$useState2[1];
|
|
104
|
+
var table = (0, _reactTable.useReactTable)({
|
|
105
|
+
data: defineData(data, loadingInitial),
|
|
106
|
+
columns: defineColumns(columns, onSelectRow, loadingInitial),
|
|
107
|
+
getCoreRowModel: (0, _reactTable.getCoreRowModel)(),
|
|
108
|
+
state: {
|
|
109
|
+
rowSelection: rowSelection
|
|
110
|
+
},
|
|
111
|
+
enableRowSelection: function enableRowSelection(row) {
|
|
112
|
+
return row.original.selectable || false;
|
|
113
|
+
},
|
|
114
|
+
onRowSelectionChange: setRowSelection
|
|
115
|
+
});
|
|
116
|
+
(0, _react.useEffect)(function () {
|
|
117
|
+
if (onSelectRow && typeof onSelectRow === "function") {
|
|
118
|
+
var dataSelected = table.getSelectedRowModel().flatRows.map(function (row) {
|
|
119
|
+
return row.original;
|
|
120
|
+
});
|
|
121
|
+
onSelectRow(dataSelected);
|
|
122
|
+
}
|
|
123
|
+
}, [rowSelection]);
|
|
124
|
+
return /*#__PURE__*/_react.default.createElement(_styled.Table, {
|
|
125
|
+
stickyColumns: stickyColumns,
|
|
126
|
+
stickyRows: stickyRows
|
|
127
|
+
}, /*#__PURE__*/_react.default.createElement(_dataTable.DataTableContent, null, /*#__PURE__*/_react.default.createElement(_dataTable.DataTableHead, null, table.getHeaderGroups().map(function (headerGroup) {
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement(_dataTable.DataTableRow, {
|
|
129
|
+
key: headerGroup.id
|
|
130
|
+
}, headerGroup.headers.map(function (header) {
|
|
131
|
+
return /*#__PURE__*/_react.default.createElement(_dataTable.DataTableHeadCell, Object.assign({
|
|
132
|
+
key: header.id
|
|
133
|
+
}, header.column.columnDef.meta), header.isPlaceholder ? null : (0, _reactTable.flexRender)(header.column.columnDef.header, header.getContext()));
|
|
134
|
+
}));
|
|
135
|
+
})), /*#__PURE__*/_react.default.createElement(_dataTable.DataTableBody, null, table.getRowModel().rows.map(function (row) {
|
|
136
|
+
return /*#__PURE__*/_react.default.createElement(_dataTable.DataTableRow, {
|
|
137
|
+
key: row.id,
|
|
138
|
+
selected: rowSelection.hasOwnProperty(row.index)
|
|
139
|
+
}, row.getVisibleCells().map(function (cell) {
|
|
140
|
+
return /*#__PURE__*/_react.default.createElement(_dataTable.DataTableCell, Object.assign({
|
|
141
|
+
key: cell.id
|
|
142
|
+
}, cell.column.columnDef.meta), (0, _reactTable.flexRender)(cell.column.columnDef.cell, cell.getContext()));
|
|
143
|
+
}));
|
|
144
|
+
}))));
|
|
145
|
+
};
|
|
146
|
+
exports.DataTable = DataTable;
|