@webiny/ui 5.43.2 → 6.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.ts +7 -3
- package/Accordion/Accordion.js +9 -30
- package/Accordion/Accordion.js.map +1 -1
- package/Accordion/AccordionItem.d.ts +116 -37
- package/Accordion/AccordionItem.js +33 -188
- package/Accordion/AccordionItem.js.map +1 -1
- package/Accordion/AccordionItemActions.d.ts +8 -0
- package/Accordion/AccordionItemActions.js +30 -28
- package/Accordion/AccordionItemActions.js.map +1 -1
- package/Accordion/index.js +2 -27
- package/Accordion/index.js.map +1 -1
- package/Alert/Alert.d.ts +2 -1
- package/Alert/Alert.js +16 -52
- package/Alert/Alert.js.map +1 -1
- package/Alert/index.js +1 -16
- package/Alert/index.js.map +1 -1
- package/AutoComplete/AutoComplete.d.ts +6 -18
- package/AutoComplete/AutoComplete.js +61 -289
- package/AutoComplete/AutoComplete.js.map +1 -1
- package/AutoComplete/MultiAutoComplete.d.ts +12 -46
- package/AutoComplete/MultiAutoComplete.js +78 -563
- package/AutoComplete/MultiAutoComplete.js.map +1 -1
- package/AutoComplete/index.js +2 -27
- package/AutoComplete/index.js.map +1 -1
- package/AutoComplete/types.d.ts +4 -4
- package/AutoComplete/types.js +1 -5
- package/AutoComplete/types.js.map +1 -1
- package/AutoComplete/utils.d.ts +1 -1
- package/AutoComplete/utils.js +4 -10
- package/AutoComplete/utils.js.map +1 -1
- package/Avatar/Avatar.d.ts +2 -1
- package/Avatar/Avatar.js +30 -81
- package/Avatar/Avatar.js.map +1 -1
- package/Avatar/index.js +1 -16
- package/Avatar/index.js.map +1 -1
- package/Button/Button.d.ts +8 -27
- package/Button/Button.js +12 -121
- package/Button/Button.js.map +1 -1
- package/Button/ButtonDefault.d.ts +7 -0
- package/Button/ButtonDefault.js +16 -0
- package/Button/ButtonDefault.js.map +1 -0
- package/Button/ButtonFloating.d.ts +7 -0
- package/Button/ButtonFloating.js +12 -0
- package/Button/ButtonFloating.js.map +1 -0
- package/Button/ButtonIcon.d.ts +9 -0
- package/Button/ButtonIcon.js +11 -0
- package/Button/ButtonIcon.js.map +1 -0
- package/Button/ButtonPrimary.d.ts +7 -0
- package/Button/ButtonPrimary.js +16 -0
- package/Button/ButtonPrimary.js.map +1 -0
- package/Button/ButtonSecondary.d.ts +7 -0
- package/Button/ButtonSecondary.js +16 -0
- package/Button/ButtonSecondary.js.map +1 -0
- package/Button/CopyButton.d.ts +17 -0
- package/Button/CopyButton.js +12 -0
- package/Button/CopyButton.js.map +1 -0
- package/Button/IconButton.d.ts +16 -0
- package/Button/IconButton.js +15 -0
- package/Button/IconButton.js.map +1 -0
- package/Button/index.d.ts +7 -2
- package/Button/index.js +8 -38
- package/Button/index.js.map +1 -1
- package/Button/useMappedButtonProps.d.ts +14 -0
- package/Button/useMappedButtonProps.js +21 -0
- package/Button/useMappedButtonProps.js.map +1 -0
- package/Carousel/Carousel.d.ts +6 -15
- package/Carousel/Carousel.js +10 -42
- package/Carousel/Carousel.js.map +1 -1
- package/Carousel/index.js +1 -13
- package/Carousel/index.js.map +1 -1
- package/Checkbox/Checkbox.d.ts +3 -5
- package/Checkbox/Checkbox.js +32 -64
- package/Checkbox/Checkbox.js.map +1 -1
- package/Checkbox/CheckboxGroup.d.ts +5 -1
- package/Checkbox/CheckboxGroup.js +46 -58
- package/Checkbox/CheckboxGroup.js.map +1 -1
- package/Checkbox/index.js +2 -20
- package/Checkbox/index.js.map +1 -1
- package/Chips/Chip.d.ts +31 -2
- package/Chips/Chip.js +44 -27
- package/Chips/Chip.js.map +1 -1
- package/Chips/Chips.d.ts +4 -0
- package/Chips/Chips.js +14 -21
- package/Chips/Chips.js.map +1 -1
- package/Chips/index.js +2 -27
- package/Chips/index.js.map +1 -1
- package/CodeEditor/CodeEditor.d.ts +4 -12
- package/CodeEditor/CodeEditor.js +12 -82
- package/CodeEditor/CodeEditor.js.map +1 -1
- package/CodeEditor/index.js +1 -16
- package/CodeEditor/index.js.map +1 -1
- package/ColorPicker/ColorPicker.d.ts +4 -19
- package/ColorPicker/ColorPicker.js +25 -150
- package/ColorPicker/ColorPicker.js.map +1 -1
- package/ColorPicker/index.js +1 -16
- package/ColorPicker/index.js.map +1 -1
- package/ConfirmationDialog/ConfirmationDialog.js +78 -102
- package/ConfirmationDialog/ConfirmationDialog.js.map +1 -1
- package/ConfirmationDialog/index.js +2 -27
- package/ConfirmationDialog/index.js.map +1 -1
- package/ConfirmationDialog/withConfirmation.js +10 -18
- package/ConfirmationDialog/withConfirmation.js.map +1 -1
- package/DataTable/DataTable.d.ts +54 -91
- package/DataTable/DataTable.js +56 -324
- package/DataTable/DataTable.js.map +1 -1
- package/DataTable/index.js +1 -16
- package/DataTable/index.js.map +1 -1
- package/DateTime/Date.js +14 -21
- package/DateTime/Date.js.map +1 -1
- package/DateTime/index.js +1 -12
- package/DateTime/index.js.map +1 -1
- package/DelayedOnChange/index.d.ts +7 -1
- package/DelayedOnChange/index.js +7 -16
- package/DelayedOnChange/index.js.map +1 -1
- package/Dialog/Dialog.d.ts +47 -59
- package/Dialog/Dialog.js +69 -79
- package/Dialog/Dialog.js.map +1 -1
- package/Dialog/index.js +1 -16
- package/Dialog/index.js.map +1 -1
- package/Drawer/Drawer.d.ts +28 -21
- package/Drawer/Drawer.js +42 -52
- package/Drawer/Drawer.js.map +1 -1
- package/Drawer/index.js +1 -16
- package/Drawer/index.js.map +1 -1
- package/DynamicFieldset/index.d.ts +7 -1
- package/DynamicFieldset/index.js +7 -13
- package/DynamicFieldset/index.js.map +1 -1
- package/Elevation/Elevation.d.ts +6 -2
- package/Elevation/Elevation.js +13 -15
- package/Elevation/Elevation.js.map +1 -1
- package/Elevation/index.js +1 -16
- package/Elevation/index.js.map +1 -1
- package/FormElementMessage/FormElementMessage.d.ts +6 -2
- package/FormElementMessage/FormElementMessage.js +21 -16
- package/FormElementMessage/FormElementMessage.js.map +1 -1
- package/FormElementMessage/index.js +1 -12
- package/FormElementMessage/index.js.map +1 -1
- package/FullName/FullName.d.ts +4 -0
- package/FullName/FullName.js +11 -9
- package/FullName/FullName.js.map +1 -1
- package/FullName/index.js +1 -16
- package/FullName/index.js.map +1 -1
- package/Grid/Grid.d.ts +32 -8
- package/Grid/Grid.js +37 -16
- package/Grid/Grid.js.map +1 -1
- package/Grid/index.js +1 -16
- package/Grid/index.js.map +1 -1
- package/Helpers/ClassNames.d.ts +3 -3
- package/Helpers/ClassNames.js +13 -19
- package/Helpers/ClassNames.js.map +1 -1
- package/Helpers/index.js +2 -12
- package/Helpers/index.js.map +1 -1
- package/Icon/Icon.d.ts +7 -2
- package/Icon/Icon.js +9 -25
- package/Icon/Icon.js.map +1 -1
- package/Icon/index.js +1 -16
- package/Icon/index.js.map +1 -1
- package/Image/index.d.ts +6 -1
- package/Image/index.js +6 -15
- package/Image/index.js.map +1 -1
- package/ImageEditor/ImageEditor.d.ts +8 -23
- package/ImageEditor/ImageEditor.js +11 -266
- package/ImageEditor/ImageEditor.js.map +1 -1
- package/ImageEditor/index.js +1 -16
- package/ImageEditor/index.js.map +1 -1
- package/ImageUpload/Image.d.ts +8 -15
- package/ImageUpload/Image.js +12 -114
- package/ImageUpload/Image.js.map +1 -1
- package/ImageUpload/ImageEditorDialog.d.ts +5 -1
- package/ImageUpload/ImageEditorDialog.js +11 -79
- package/ImageUpload/ImageEditorDialog.js.map +1 -1
- package/ImageUpload/MultiImageUpload.d.ts +6 -21
- package/ImageUpload/MultiImageUpload.js +12 -278
- package/ImageUpload/MultiImageUpload.js.map +1 -1
- package/ImageUpload/SingleImageUpload.d.ts +5 -22
- package/ImageUpload/SingleImageUpload.js +12 -189
- package/ImageUpload/SingleImageUpload.js.map +1 -1
- package/ImageUpload/index.d.ts +1 -1
- package/ImageUpload/index.js +4 -34
- package/ImageUpload/index.js.map +1 -1
- package/Input/Input.d.ts +59 -8
- package/Input/Input.js +70 -73
- package/Input/Input.js.map +1 -1
- package/Input/index.js +1 -16
- package/Input/index.js.map +1 -1
- package/List/CollapsibleList/index.d.ts +18 -4
- package/List/CollapsibleList/index.js +9 -13
- package/List/CollapsibleList/index.js.map +1 -1
- package/List/DataList/DataList.d.ts +12 -38
- package/List/DataList/DataList.js +15 -305
- package/List/DataList/DataList.js.map +1 -1
- package/List/DataList/DataListModalOverlay/index.d.ts +12 -3
- package/List/DataList/DataListModalOverlay/index.js +13 -31
- package/List/DataList/DataListModalOverlay/index.js.map +1 -1
- package/List/DataList/DataListWithSections.d.ts +12 -36
- package/List/DataList/DataListWithSections.js +15 -323
- package/List/DataList/DataListWithSections.js.map +1 -1
- package/List/DataList/icons/index.d.ts +1 -15
- package/List/DataList/icons/index.js +1 -62
- package/List/DataList/icons/index.js.map +1 -1
- package/List/DataList/index.d.ts +0 -1
- package/List/DataList/index.js +3 -58
- package/List/DataList/index.js.map +1 -1
- package/List/DataList/types.d.ts +1 -28
- package/List/DataList/types.js +1 -5
- package/List/DataList/types.js.map +1 -1
- package/List/List/List.d.ts +51 -0
- package/List/List/List.js +16 -0
- package/List/List/List.js.map +1 -0
- package/List/List/ListItem.d.ts +61 -0
- package/List/List/ListItem.js +91 -0
- package/List/List/ListItem.js.map +1 -0
- package/List/List/ListItemAction.d.ts +9 -0
- package/List/List/ListItemAction.js +15 -0
- package/List/List/ListItemAction.js.map +1 -0
- package/List/List/ListItemGraphic.d.ts +18 -0
- package/List/List/ListItemGraphic.js +26 -0
- package/List/List/ListItemGraphic.js.map +1 -0
- package/List/List/ListItemMeta.d.ts +26 -0
- package/List/List/ListItemMeta.js +24 -0
- package/List/List/ListItemMeta.js.map +1 -0
- package/List/List/ListItemText.d.ts +42 -0
- package/List/List/ListItemText.js +51 -0
- package/List/List/ListItemText.js.map +1 -0
- package/List/List/index.d.ts +6 -0
- package/List/List/index.js +8 -0
- package/List/List/index.js.map +1 -0
- package/List/index.d.ts +1 -0
- package/List/index.js +4 -70
- package/List/index.js.map +1 -1
- package/Menu/Menu.d.ts +40 -4
- package/Menu/Menu.js +74 -100
- package/Menu/Menu.js.map +1 -1
- package/Menu/index.js +1 -16
- package/Menu/index.js.map +1 -1
- package/Mosaic/Mosaic.d.ts +5 -5
- package/Mosaic/Mosaic.js +6 -26
- package/Mosaic/Mosaic.js.map +1 -1
- package/Mosaic/index.js +1 -16
- package/Mosaic/index.js.map +1 -1
- package/Progress/CircularProgress.d.ts +10 -2
- package/Progress/CircularProgress.js +16 -67
- package/Progress/CircularProgress.js.map +1 -1
- package/Progress/index.d.ts +1 -1
- package/Progress/index.js +1 -13
- package/Progress/index.js.map +1 -1
- package/Radio/Radio.d.ts +3 -3
- package/Radio/Radio.js +34 -54
- package/Radio/Radio.js.map +1 -1
- package/Radio/RadioGroup.d.ts +6 -2
- package/Radio/RadioGroup.js +37 -48
- package/Radio/RadioGroup.js.map +1 -1
- package/Radio/index.js +2 -20
- package/Radio/index.js.map +1 -1
- package/RichTextEditor/RichTextEditor.d.ts +10 -29
- package/RichTextEditor/RichTextEditor.js +14 -131
- package/RichTextEditor/RichTextEditor.js.map +1 -1
- package/RichTextEditor/index.d.ts +3 -2
- package/RichTextEditor/index.js +2 -27
- package/RichTextEditor/index.js.map +1 -1
- package/Ripple/Ripple.d.ts +1 -1
- package/Ripple/Ripple.js +6 -15
- package/Ripple/Ripple.js.map +1 -1
- package/Ripple/index.js +1 -16
- package/Ripple/index.js.map +1 -1
- package/Scrollbar/Scrollbar.d.ts +5 -8
- package/Scrollbar/Scrollbar.js +7 -11
- package/Scrollbar/Scrollbar.js.map +1 -1
- package/Scrollbar/index.js +1 -16
- package/Scrollbar/index.js.map +1 -1
- package/Section/index.d.ts +4 -0
- package/Section/index.js +13 -66
- package/Section/index.js.map +1 -1
- package/Select/Select.d.ts +36 -3
- package/Select/Select.js +91 -90
- package/Select/Select.js.map +1 -1
- package/Select/index.js +1 -16
- package/Select/index.js.map +1 -1
- package/Skeleton/Skeleton.d.ts +24 -6
- package/Skeleton/Skeleton.js +16 -20
- package/Skeleton/Skeleton.js.map +1 -1
- package/Skeleton/index.js +1 -16
- package/Skeleton/index.js.map +1 -1
- package/Slider/Slider.d.ts +7 -13
- package/Slider/Slider.js +47 -81
- package/Slider/Slider.js.map +1 -1
- package/Slider/index.js +1 -13
- package/Slider/index.js.map +1 -1
- package/Snackbar/Snackbar.d.ts +44 -8
- package/Snackbar/Snackbar.js +27 -44
- package/Snackbar/Snackbar.js.map +1 -1
- package/Snackbar/index.js +1 -18
- package/Snackbar/index.js.map +1 -1
- package/Switch/Switch.d.ts +18 -3
- package/Switch/Switch.js +25 -47
- package/Switch/Switch.js.map +1 -1
- package/Switch/index.js +1 -16
- package/Switch/index.js.map +1 -1
- package/Tabs/Tab.d.ts +23 -2
- package/Tabs/Tab.js +16 -20
- package/Tabs/Tab.js.map +1 -1
- package/Tabs/Tabs.d.ts +12 -7
- package/Tabs/Tabs.js +56 -110
- package/Tabs/Tabs.js.map +1 -1
- package/Tabs/index.js +2 -27
- package/Tabs/index.js.map +1 -1
- package/Tags/Tags.d.ts +1 -1
- package/Tags/Tags.js +31 -83
- package/Tags/Tags.js.map +1 -1
- package/Tags/index.js +1 -16
- package/Tags/index.js.map +1 -1
- package/TimeAgo/index.d.ts +6 -2
- package/TimeAgo/index.js +6 -13
- package/TimeAgo/index.js.map +1 -1
- package/Tooltip/Tooltip.d.ts +4 -16
- package/Tooltip/Tooltip.js +61 -49
- package/Tooltip/Tooltip.js.map +1 -1
- package/Tooltip/index.js +1 -16
- package/Tooltip/index.js.map +1 -1
- package/TopAppBar/TopAppBar.d.ts +25 -1
- package/TopAppBar/TopAppBar.js +34 -14
- package/TopAppBar/TopAppBar.js.map +1 -1
- package/TopAppBar/TopAppBarActionItem.d.ts +5 -3
- package/TopAppBar/TopAppBarActionItem.js +10 -11
- package/TopAppBar/TopAppBarActionItem.js.map +1 -1
- package/TopAppBar/TopAppBarNavigationIcon.d.ts +5 -3
- package/TopAppBar/TopAppBarNavigationIcon.js +10 -11
- package/TopAppBar/TopAppBarNavigationIcon.js.map +1 -1
- package/TopAppBar/TopAppBarPrimary.d.ts +4 -0
- package/TopAppBar/TopAppBarPrimary.js +13 -15
- package/TopAppBar/TopAppBarPrimary.js.map +1 -1
- package/TopAppBar/TopAppBarSecondary.d.ts +4 -0
- package/TopAppBar/TopAppBarSecondary.js +14 -17
- package/TopAppBar/TopAppBarSecondary.js.map +1 -1
- package/TopAppBar/TopAppBarSection.d.ts +10 -1
- package/TopAppBar/TopAppBarSection.js +8 -15
- package/TopAppBar/TopAppBarSection.js.map +1 -1
- package/TopAppBar/TopAppBarTitle.d.ts +6 -3
- package/TopAppBar/TopAppBarTitle.js +9 -15
- package/TopAppBar/TopAppBarTitle.js.map +1 -1
- package/TopAppBar/index.js +7 -82
- package/TopAppBar/index.js.map +1 -1
- package/Typography/Typography.d.ts +8 -3
- package/Typography/Typography.js +32 -12
- package/Typography/Typography.js.map +1 -1
- package/Typography/index.js +1 -16
- package/Typography/index.js.map +1 -1
- package/package.json +9 -63
- package/styles.scss +15 -41
- package/types.js +1 -5
- package/Accordion/README.md +0 -11
- package/Accordion/icons/round-keyboard_arrow_down-24px.svg +0 -16
- package/Accordion/icons/round-keyboard_arrow_up-24px.svg +0 -16
- package/Accordion/icons/round-settings-24px.svg +0 -21
- package/Alert/README.md +0 -11
- package/AutoComplete/AutoCompleteReadme.md +0 -11
- package/AutoComplete/MultiAutoCompleteReadme.md +0 -11
- package/AutoComplete/icons/baseline-close-24px.svg +0 -4
- package/AutoComplete/icons/delete.svg +0 -12
- package/AutoComplete/icons/navigate_before-24px.svg +0 -1
- package/AutoComplete/icons/navigate_next-24px.svg +0 -1
- package/AutoComplete/icons/reorder_black_24dp.svg +0 -1
- package/AutoComplete/icons/skip_next-24px.svg +0 -1
- package/AutoComplete/icons/skip_previous-24px.svg +0 -1
- package/AutoComplete/icons/spinner.svg +0 -3
- package/AutoComplete/styles.d.ts +0 -2
- package/AutoComplete/styles.js +0 -66
- package/AutoComplete/styles.js.map +0 -1
- package/Avatar/README.md +0 -11
- package/Button/Button.styles.d.ts +0 -6
- package/Button/Button.styles.js +0 -17
- package/Button/Button.styles.js.map +0 -1
- package/Button/CopyButton/CopyButton.d.ts +0 -11
- package/Button/CopyButton/CopyButton.js +0 -33
- package/Button/CopyButton/CopyButton.js.map +0 -1
- package/Button/CopyButton/README.md +0 -11
- package/Button/IconButton/IconButton.d.ts +0 -37
- package/Button/IconButton/IconButton.js +0 -49
- package/Button/IconButton/IconButton.js.map +0 -1
- package/Button/IconButton/README.md +0 -15
- package/Button/README.md +0 -28
- package/Button/assets/baseline-cloud_done-24px.svg +0 -3
- package/Button/assets/file_copy-24px.svg +0 -1
- package/Button/assets/round-more_vert-24px.svg +0 -12
- package/Carousel/README.md +0 -15
- package/Checkbox/Checkbox.styles.d.ts +0 -6
- package/Checkbox/Checkbox.styles.js +0 -21
- package/Checkbox/Checkbox.styles.js.map +0 -1
- package/Checkbox/README_Checkbox.md +0 -15
- package/Checkbox/README_CheckboxGroup.md +0 -19
- package/Chips/README.md +0 -15
- package/Chips/icons/baseline-done-24px.svg +0 -4
- package/Chips/icons/baseline-email-24px.svg +0 -3
- package/Chips/styles.d.ts +0 -2
- package/Chips/styles.js +0 -25
- package/Chips/styles.js.map +0 -1
- package/CodeEditor/README.md +0 -21
- package/ColorPicker/README.md +0 -11
- package/ConfirmationDialog/README.md +0 -11
- package/DataTable/ColumnDirection.d.ts +0 -5
- package/DataTable/ColumnDirection.js +0 -19
- package/DataTable/ColumnDirection.js.map +0 -1
- package/DataTable/ColumnsVisibility.d.ts +0 -7
- package/DataTable/ColumnsVisibility.js +0 -64
- package/DataTable/ColumnsVisibility.js.map +0 -1
- package/DataTable/README.md +0 -72
- package/DataTable/styled.d.ts +0 -41
- package/DataTable/styled.js +0 -126
- package/DataTable/styled.js.map +0 -1
- package/DelayedOnChange/DelayedOnChange.d.ts +0 -39
- package/DelayedOnChange/DelayedOnChange.js +0 -132
- package/DelayedOnChange/DelayedOnChange.js.map +0 -1
- package/Dialog/README.md +0 -23
- package/Drawer/README.md +0 -15
- package/DynamicFieldset/Fieldset.d.ts +0 -51
- package/DynamicFieldset/Fieldset.js +0 -139
- package/DynamicFieldset/Fieldset.js.map +0 -1
- package/Elevation/README.md +0 -15
- package/FullName/README.md +0 -11
- package/Grid/README.md +0 -15
- package/Icon/README.md +0 -11
- package/Icon/svg/baseline-autorenew-24px.svg +0 -4
- package/Icon/svg/baseline-cloud_done-24px.svg +0 -4
- package/Icon/svg/baseline-delete-24px.svg +0 -4
- package/Icon/svg/baseline-done-24px.svg +0 -4
- package/Image/Image.d.ts +0 -6
- package/Image/Image.js +0 -25
- package/Image/Image.js.map +0 -1
- package/Image/README.md +0 -12
- package/ImageEditor/toolbar/crop.d.ts +0 -4
- package/ImageEditor/toolbar/crop.js +0 -74
- package/ImageEditor/toolbar/crop.js.map +0 -1
- package/ImageEditor/toolbar/filter.d.ts +0 -3
- package/ImageEditor/toolbar/filter.js +0 -208
- package/ImageEditor/toolbar/filter.js.map +0 -1
- package/ImageEditor/toolbar/flip.d.ts +0 -4
- package/ImageEditor/toolbar/flip.js +0 -99
- package/ImageEditor/toolbar/flip.js.map +0 -1
- package/ImageEditor/toolbar/icons/crop.svg +0 -4
- package/ImageEditor/toolbar/icons/draw.svg +0 -4
- package/ImageEditor/toolbar/icons/filter.svg +0 -4
- package/ImageEditor/toolbar/icons/flip.svg +0 -4
- package/ImageEditor/toolbar/icons/index.d.ts +0 -8
- package/ImageEditor/toolbar/icons/index.js +0 -63
- package/ImageEditor/toolbar/icons/index.js.map +0 -1
- package/ImageEditor/toolbar/icons/redo.svg +0 -4
- package/ImageEditor/toolbar/icons/rotateLeft.svg +0 -4
- package/ImageEditor/toolbar/icons/rotateRight.svg +0 -4
- package/ImageEditor/toolbar/icons/undo.svg +0 -4
- package/ImageEditor/toolbar/index.d.ts +0 -4
- package/ImageEditor/toolbar/index.js +0 -36
- package/ImageEditor/toolbar/index.js.map +0 -1
- package/ImageEditor/toolbar/rotate.d.ts +0 -4
- package/ImageEditor/toolbar/rotate.js +0 -127
- package/ImageEditor/toolbar/rotate.js.map +0 -1
- package/ImageEditor/toolbar/types.d.ts +0 -32
- package/ImageEditor/toolbar/types.js +0 -7
- package/ImageEditor/toolbar/types.js.map +0 -1
- package/ImageUpload/README.md +0 -11
- package/ImageUpload/icons/round-add_photo_alternate-24px.svg +0 -23
- package/ImageUpload/icons/round-close-24px.svg +0 -13
- package/ImageUpload/icons/round-edit-24px.svg +0 -4
- package/ImageUpload/image.jpeg +0 -0
- package/ImageUpload/styled.d.ts +0 -27
- package/ImageUpload/styled.js +0 -120
- package/ImageUpload/styled.js.map +0 -1
- package/Input/README.md +0 -16
- package/Input/__tests__/Input.test.d.ts +0 -1
- package/Input/__tests__/Input.test.js +0 -103
- package/Input/__tests__/Input.test.js.map +0 -1
- package/Input/styled.d.ts +0 -4
- package/Input/styled.js +0 -16
- package/Input/styled.js.map +0 -1
- package/Input/svg/baseline-autorenew-24px.svg +0 -4
- package/Input/svg/baseline-cloud_done-24px.svg +0 -4
- package/Input/svg/baseline-delete-24px.svg +0 -4
- package/Input/svg/baseline-done-24px.svg +0 -4
- package/List/CollapsibleList/README.md +0 -11
- package/List/CollapsibleList/index.css +0 -31
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.d.ts +0 -20
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.js +0 -99
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.js.map +0 -1
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.d.ts +0 -6
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js +0 -29
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js.map +0 -1
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.d.ts +0 -11
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js +0 -30
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js.map +0 -1
- package/List/DataList/Loader.d.ts +0 -3
- package/List/DataList/Loader.js +0 -105
- package/List/DataList/Loader.js.map +0 -1
- package/List/DataList/NoData.d.ts +0 -3
- package/List/DataList/NoData.js +0 -33
- package/List/DataList/NoData.js.map +0 -1
- package/List/DataList/README.md +0 -17
- package/List/DataList/icons/baseline-autorenew-24px.svg +0 -4
- package/List/DataList/icons/baseline-delete-24px.svg +0 -4
- package/List/DataList/icons/baseline-edit-24px.svg +0 -4
- package/List/DataList/icons/baseline-navigate_before-24px.svg +0 -4
- package/List/DataList/icons/baseline-navigate_next-24px.svg +0 -4
- package/List/DataList/icons/baseline-sort-24px.svg +0 -4
- package/List/DataList/icons/baseline-tune-24px.svg +0 -4
- package/List/DataList/icons/filter_alt-24px.svg +0 -1
- package/List/DataList/icons/round-more_vert-24px.svg +0 -12
- package/List/List.d.ts +0 -131
- package/List/List.js +0 -148
- package/List/List.js.map +0 -1
- package/List/README.md +0 -22
- package/List/icons/baseline-autorenew-24px.svg +0 -4
- package/List/icons/baseline-cloud_done-24px.svg +0 -4
- package/List/icons/baseline-delete-24px.svg +0 -4
- package/List/icons/baseline-done-24px.svg +0 -4
- package/List/icons/baseline-email-24px.svg +0 -4
- package/List/icons/index.d.ts +0 -3
- package/List/icons/index.js +0 -22
- package/List/icons/index.js.map +0 -1
- package/List/styled.d.ts +0 -6
- package/List/styled.js +0 -29
- package/List/styled.js.map +0 -1
- package/Menu/README.md +0 -15
- package/Mosaic/README.md +0 -15
- package/Progress/README.md +0 -19
- package/Progress/svg/circularProgress.svg +0 -3
- package/Radio/README.md +0 -17
- package/Radio/Radio.styles.d.ts +0 -6
- package/Radio/Radio.styles.js +0 -21
- package/Radio/Radio.styles.js.map +0 -1
- package/RichTextEditor/README.md +0 -10
- package/RichTextEditor/createPropsFromConfig.d.ts +0 -15
- package/RichTextEditor/createPropsFromConfig.js +0 -30
- package/RichTextEditor/createPropsFromConfig.js.map +0 -1
- package/Ripple/README.md +0 -15
- package/Ripple/svg/baseline-autorenew-24px.svg +0 -4
- package/Ripple/svg/baseline-cloud_done-24px.svg +0 -4
- package/Ripple/svg/baseline-delete-24px.svg +0 -4
- package/Ripple/svg/baseline-done-24px.svg +0 -4
- package/Scrollbar/README.md +0 -15
- package/Section/README.md +0 -11
- package/Select/README.md +0 -15
- package/Select/styled.d.ts +0 -8
- package/Select/styled.js +0 -21
- package/Select/styled.js.map +0 -1
- package/Skeleton/README.md +0 -21
- package/Slider/README.md +0 -15
- package/Snackbar/README.md +0 -15
- package/Switch/README.md +0 -15
- package/Tabs/svg/baseline-autorenew-24px.svg +0 -4
- package/Tabs/svg/baseline-cloud_done-24px.svg +0 -4
- package/Tabs/svg/baseline-delete-24px.svg +0 -4
- package/Tabs/svg/baseline-done-24px.svg +0 -4
- package/Tags/README.md +0 -15
- package/Tags/icons/baseline-close-24px.svg +0 -4
- package/Tooltip/README.md +0 -15
- package/Tooltip/style.scss +0 -97
- package/TopAppBar/README.md +0 -20
- package/TopAppBar/icons/baseline-autorenew-24px.svg +0 -4
- package/TopAppBar/icons/baseline-cloud_done-24px.svg +0 -4
- package/TopAppBar/icons/baseline-delete-24px.svg +0 -4
- package/TopAppBar/icons/baseline-email-24px.svg +0 -4
- package/TopAppBar/icons/baseline-menu-24px.svg +0 -4
- package/TopProgressBar/README.md +0 -11
- package/TopProgressBar/TopProgressBar.d.ts +0 -15
- package/TopProgressBar/TopProgressBar.js +0 -18
- package/TopProgressBar/TopProgressBar.js.map +0 -1
- package/TopProgressBar/hoc/index.d.ts +0 -1
- package/TopProgressBar/hoc/index.js +0 -15
- package/TopProgressBar/hoc/index.js.map +0 -1
- package/TopProgressBar/hoc/withTopProgressBar.d.ts +0 -3
- package/TopProgressBar/hoc/withTopProgressBar.js +0 -29
- package/TopProgressBar/hoc/withTopProgressBar.js.map +0 -1
- package/TopProgressBar/index.d.ts +0 -1
- package/TopProgressBar/index.js +0 -18
- package/TopProgressBar/index.js.map +0 -1
- package/TopProgressBar/style.scss +0 -21
- package/Typography/README.md +0 -15
|
@@ -1,572 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var _Button = require("../Button");
|
|
25
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
26
|
-
var _Elevation = require("../Elevation");
|
|
27
|
-
var _Typography = require("../Typography");
|
|
28
|
-
var _styles = require("./styles");
|
|
29
|
-
var _FormElementMessage = require("../FormElementMessage");
|
|
30
|
-
var _baselineClose24px = require("./icons/baseline-close-24px.svg");
|
|
31
|
-
var _navigate_before24px = require("./icons/navigate_before-24px.svg");
|
|
32
|
-
var _navigate_next24px = require("./icons/navigate_next-24px.svg");
|
|
33
|
-
var _skip_previous24px = require("./icons/skip_previous-24px.svg");
|
|
34
|
-
var _skip_next24px = require("./icons/skip_next-24px.svg");
|
|
35
|
-
var _reorder_black_24dp = require("./icons/reorder_black_24dp.svg");
|
|
36
|
-
var _emotion = require("emotion");
|
|
37
|
-
var _excluded = ["unique", "value", "onChange", "onInput", "validation", "useMultipleSelectionList", "description"],
|
|
38
|
-
_excluded2 = ["getInputProps", "openMenu"];
|
|
39
|
-
var _MultiAutoComplete;
|
|
40
|
-
var listItemMetaClassName = (0, _emotion.css)({
|
|
41
|
-
display: "table"
|
|
42
|
-
});
|
|
43
|
-
var iconButtonClassName = (0, _emotion.css)({
|
|
44
|
-
display: "table-cell !important"
|
|
45
|
-
});
|
|
46
|
-
var style = {
|
|
47
|
-
pagination: {
|
|
48
|
-
bar: (0, _emotion.css)({
|
|
49
|
-
display: "flex",
|
|
50
|
-
justifyContent: "space-between",
|
|
51
|
-
alignItems: "center",
|
|
52
|
-
borderBottom: "2px solid var(--mdc-theme-primary, #fa5723)",
|
|
53
|
-
padding: "6px 0"
|
|
54
|
-
}),
|
|
55
|
-
pages: (0, _emotion.css)({
|
|
56
|
-
display: "flex",
|
|
57
|
-
justifyContent: "space-between",
|
|
58
|
-
alignItems: "center"
|
|
59
|
-
}),
|
|
60
|
-
searchInput: (0, _emotion.css)({
|
|
61
|
-
height: "42px !important"
|
|
62
|
-
}),
|
|
63
|
-
list: (0, _emotion.css)({
|
|
64
|
-
padding: "0 0 5px 0 !important",
|
|
65
|
-
".mdc-deprecated-list-item": {
|
|
66
|
-
borderBottom: "1px solid var(--mdc-theme-on-background)"
|
|
67
|
-
}
|
|
68
|
-
}),
|
|
69
|
-
secondaryText: (0, _emotion.css)({
|
|
70
|
-
color: "var(--mdc-theme-text-secondary-on-background)"
|
|
71
|
-
})
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
var listStyles = (0, _emotion.css)({
|
|
75
|
-
"&.multi-autocomplete__options-list": {
|
|
76
|
-
listStyle: "none",
|
|
77
|
-
paddingLeft: 0,
|
|
78
|
-
"& li": {
|
|
79
|
-
margin: 0
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
var Spinner = function Spinner() {
|
|
84
|
-
return /*#__PURE__*/_react.default.createElement(_reactSpinnerMaterial.default, {
|
|
85
|
-
size: 24,
|
|
86
|
-
spinnerColor: "var(--mdc-theme-primary, #fa5723)",
|
|
87
|
-
spinnerWidth: 2,
|
|
88
|
-
visible: true
|
|
89
|
-
});
|
|
90
|
-
};
|
|
91
|
-
var OptionsList = function OptionsList(_ref) {
|
|
92
|
-
var getMenuProps = _ref.getMenuProps,
|
|
93
|
-
children = _ref.children;
|
|
94
|
-
return /*#__PURE__*/_react.default.createElement(_Elevation.Elevation, {
|
|
95
|
-
z: 1
|
|
96
|
-
}, /*#__PURE__*/_react.default.createElement("ul", Object.assign({
|
|
97
|
-
className: (0, _classnames.default)("multi-autocomplete__options-list", listStyles)
|
|
98
|
-
}, getMenuProps()), children));
|
|
99
|
-
};
|
|
100
|
-
var MultiAutoComplete = exports.MultiAutoComplete = /*#__PURE__*/function (_React$Component) {
|
|
101
|
-
function MultiAutoComplete() {
|
|
102
|
-
var _this;
|
|
103
|
-
(0, _classCallCheck2.default)(this, MultiAutoComplete);
|
|
104
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
105
|
-
args[_key] = arguments[_key];
|
|
106
|
-
}
|
|
107
|
-
_this = (0, _callSuper2.default)(this, MultiAutoComplete, [].concat(args));
|
|
108
|
-
(0, _defineProperty2.default)(_this, "state", {
|
|
109
|
-
inputValue: "",
|
|
110
|
-
multipleSelectionPage: 0,
|
|
111
|
-
multipleSelectionSearch: "",
|
|
112
|
-
reorderFormVisible: "",
|
|
113
|
-
reorderFormValue: ""
|
|
114
|
-
});
|
|
115
|
-
/**
|
|
116
|
-
* Helps us trigger some of the downshift's methods (eg. clearSelection) and helps us to avoid adding state.
|
|
117
|
-
*/
|
|
118
|
-
(0, _defineProperty2.default)(_this, "downshift", /*#__PURE__*/_react.default.createRef());
|
|
119
|
-
(0, _defineProperty2.default)(_this, "assignedValueAfterClearing", {
|
|
120
|
-
set: false,
|
|
121
|
-
selection: null
|
|
122
|
-
});
|
|
123
|
-
(0, _defineProperty2.default)(_this, "setMultipleSelectionPage", function (multipleSelectionPage) {
|
|
124
|
-
_this.setState({
|
|
125
|
-
multipleSelectionPage: multipleSelectionPage
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
(0, _defineProperty2.default)(_this, "setMultipleSelectionSearch", function (multipleSelectionSearch) {
|
|
129
|
-
_this.setState({
|
|
130
|
-
multipleSelectionSearch: multipleSelectionSearch
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
return _this;
|
|
134
|
-
}
|
|
135
|
-
(0, _inherits2.default)(MultiAutoComplete, _React$Component);
|
|
136
|
-
return (0, _createClass2.default)(MultiAutoComplete, [{
|
|
137
|
-
key: "getOptions",
|
|
138
|
-
value: function getOptions() {
|
|
139
|
-
var _this2 = this;
|
|
140
|
-
var _this$props = this.props,
|
|
141
|
-
unique = _this$props.unique,
|
|
142
|
-
value = _this$props.value,
|
|
143
|
-
allowFreeInput = _this$props.allowFreeInput,
|
|
144
|
-
useSimpleValues = _this$props.useSimpleValues,
|
|
145
|
-
options = _this$props.options;
|
|
146
|
-
var values = Array.isArray(value) ? (0, _toConsumableArray2.default)(value) : [];
|
|
147
|
-
var filtered = (0, _toConsumableArray2.default)(options);
|
|
148
|
-
|
|
149
|
-
// If free input is allowed, prepend typed value to the list.
|
|
150
|
-
if (allowFreeInput && this.state.inputValue) {
|
|
151
|
-
if (useSimpleValues) {
|
|
152
|
-
var existingValue = filtered.includes(this.state.inputValue);
|
|
153
|
-
if (!existingValue) {
|
|
154
|
-
filtered.unshift(this.state.inputValue);
|
|
155
|
-
}
|
|
156
|
-
} else {
|
|
157
|
-
var _existingValue = filtered.find(function (item) {
|
|
158
|
-
return _this2.state.inputValue === (0, _utils.getOptionText)(item, _this2.props);
|
|
159
|
-
});
|
|
160
|
-
if (!_existingValue) {
|
|
161
|
-
filtered.unshift((0, _defineProperty2.default)({}, this.props.textProp, this.state.inputValue));
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
return filtered.filter(function (item) {
|
|
166
|
-
// We need to filter received options.
|
|
167
|
-
// 1) If "unique" prop was passed, we don't want to show already picked options again.
|
|
168
|
-
if (unique) {
|
|
169
|
-
if (Array.isArray(values)) {
|
|
170
|
-
if (values.find(function (value) {
|
|
171
|
-
return (0, _utils.getOptionValue)(value, _this2.props) === (0, _utils.getOptionValue)(item, _this2.props);
|
|
172
|
-
})) {
|
|
173
|
-
return false;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// 2) At the end, we want to show only options that are matched by typed text.
|
|
179
|
-
if (!_this2.state.inputValue) {
|
|
180
|
-
return true;
|
|
181
|
-
}
|
|
182
|
-
if (item.aliases) {
|
|
183
|
-
return (0, _utils.findInAliases)(item, _this2.state.inputValue);
|
|
184
|
-
}
|
|
185
|
-
return (0, _utils.getOptionText)(item, _this2.props).toLowerCase().includes(_this2.state.inputValue.toLowerCase());
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Renders options - based on user's input. It will try to match input text with available options.
|
|
191
|
-
*/
|
|
192
|
-
}, {
|
|
193
|
-
key: "renderOptions",
|
|
194
|
-
value: function renderOptions(params) {
|
|
195
|
-
var _this3 = this;
|
|
196
|
-
var options = params.options,
|
|
197
|
-
isOpen = params.isOpen,
|
|
198
|
-
highlightedIndex = params.highlightedIndex,
|
|
199
|
-
getMenuProps = params.getMenuProps,
|
|
200
|
-
getItemProps = params.getItemProps;
|
|
201
|
-
if (!isOpen) {
|
|
202
|
-
return null;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Suggest user to start typing when there are no options available to choose from.
|
|
207
|
-
*/
|
|
208
|
-
if (!this.state.inputValue && !options.length) {
|
|
209
|
-
return /*#__PURE__*/_react.default.createElement(OptionsList, {
|
|
210
|
-
getMenuProps: getMenuProps
|
|
211
|
-
}, /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
212
|
-
use: "body2"
|
|
213
|
-
}, "Start typing to find entry")));
|
|
214
|
-
}
|
|
215
|
-
if (!options.length) {
|
|
216
|
-
return /*#__PURE__*/_react.default.createElement(_Elevation.Elevation, {
|
|
217
|
-
z: 1
|
|
218
|
-
}, /*#__PURE__*/_react.default.createElement("ul", Object.assign({
|
|
219
|
-
className: (0, _classnames.default)("multi-autocomplete__options-list", listStyles)
|
|
220
|
-
}, getMenuProps()), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
221
|
-
use: "body2"
|
|
222
|
-
}, "No results."), this.props.noResultFound)));
|
|
223
|
-
}
|
|
224
|
-
var renderItem = this.props.renderItem;
|
|
225
|
-
return /*#__PURE__*/_react.default.createElement(_Elevation.Elevation, {
|
|
226
|
-
z: 1
|
|
227
|
-
}, /*#__PURE__*/_react.default.createElement("ul", Object.assign({
|
|
228
|
-
className: (0, _classnames.default)("multi-autocomplete__options-list", listStyles)
|
|
229
|
-
}, getMenuProps()), options.map(function (item, index) {
|
|
230
|
-
var itemValue = (0, _utils.getOptionValue)(item, _this3.props);
|
|
231
|
-
|
|
232
|
-
// Base classes.
|
|
233
|
-
var itemClassNames = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _styles.suggestionList, true), "highlighted", highlightedIndex === index), "selected", false);
|
|
234
|
-
|
|
235
|
-
// Render the item.
|
|
236
|
-
return /*#__PURE__*/_react.default.createElement("li", Object.assign({
|
|
237
|
-
key: itemValue + index
|
|
238
|
-
}, getItemProps({
|
|
239
|
-
index: index,
|
|
240
|
-
item: item,
|
|
241
|
-
className: (0, _classnames.default)(itemClassNames)
|
|
242
|
-
})), renderItem.call(_this3, item, index));
|
|
243
|
-
})));
|
|
244
|
-
}
|
|
245
|
-
}, {
|
|
246
|
-
key: "paginateMultipleSelection",
|
|
247
|
-
value: function paginateMultipleSelection() {
|
|
248
|
-
var _this4 = this;
|
|
249
|
-
var value = this.props.value;
|
|
250
|
-
var limit = 10;
|
|
251
|
-
var page = this.state.multipleSelectionPage;
|
|
252
|
-
var search = this.state.multipleSelectionSearch;
|
|
253
|
-
|
|
254
|
-
// Assign a real index, so that later when we press delete, we know what is the actual index we're deleting.
|
|
255
|
-
var data = Array.isArray(value) ? value.map(function (option, index) {
|
|
256
|
-
return {
|
|
257
|
-
option: option,
|
|
258
|
-
index: index
|
|
259
|
-
};
|
|
260
|
-
}) : [];
|
|
261
|
-
if (search) {
|
|
262
|
-
data = data.filter(function (item) {
|
|
263
|
-
return (0, _utils.getOptionText)(item.option, _this4.props).toLowerCase().includes(search.toLowerCase());
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
var lastPage = Math.ceil(data.length / limit);
|
|
267
|
-
var totalCount = data.length;
|
|
268
|
-
page = page || lastPage;
|
|
269
|
-
data = data.slice((page - 1) * limit, page * limit);
|
|
270
|
-
var from = 0;
|
|
271
|
-
var to = 0;
|
|
272
|
-
if (data.length) {
|
|
273
|
-
from = (page - 1) * limit + 1;
|
|
274
|
-
to = from + (data.length - 1);
|
|
275
|
-
}
|
|
276
|
-
var meta = {
|
|
277
|
-
hasData: data.length > 0,
|
|
278
|
-
totalCount: totalCount,
|
|
279
|
-
from: from,
|
|
280
|
-
to: to,
|
|
281
|
-
page: page,
|
|
282
|
-
lastPage: lastPage,
|
|
283
|
-
limit: limit,
|
|
284
|
-
hasPrevious: page > 1,
|
|
285
|
-
hasNext: page < lastPage
|
|
286
|
-
};
|
|
1
|
+
import React, { useCallback, useMemo } from "react";
|
|
2
|
+
import { MultiAutoComplete as AdminMultiAutoComplete } from "@webiny/admin-ui";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated This component is deprecated and will be removed in future releases.
|
|
5
|
+
* Please use the `MultiAutoComplete` component from the `@webiny/admin-ui` package instead.
|
|
6
|
+
*/
|
|
7
|
+
export const MultiAutoComplete = ({
|
|
8
|
+
onChange,
|
|
9
|
+
value = [],
|
|
10
|
+
valueProp = "id",
|
|
11
|
+
textProp = "name",
|
|
12
|
+
renderItem,
|
|
13
|
+
noResultFound,
|
|
14
|
+
useSimpleValues,
|
|
15
|
+
loading,
|
|
16
|
+
allowFreeInput,
|
|
17
|
+
unique = true,
|
|
18
|
+
renderMultipleSelection,
|
|
19
|
+
onInput,
|
|
20
|
+
...props
|
|
21
|
+
}) => {
|
|
22
|
+
const getOption = useCallback(option => {
|
|
23
|
+
if (useSimpleValues) {
|
|
287
24
|
return {
|
|
288
|
-
|
|
289
|
-
|
|
25
|
+
label: option,
|
|
26
|
+
value: option,
|
|
27
|
+
item: option
|
|
290
28
|
};
|
|
291
29
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
if (renderMultipleSelection === null) {
|
|
312
|
-
return null;
|
|
313
|
-
}
|
|
314
|
-
return renderMultipleSelection.call(this, this.props);
|
|
315
|
-
}
|
|
316
|
-
if (useMultipleSelectionList) {
|
|
317
|
-
var _this$paginateMultipl = this.paginateMultipleSelection(),
|
|
318
|
-
data = _this$paginateMultipl.data,
|
|
319
|
-
meta = _this$paginateMultipl.meta;
|
|
320
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
321
|
-
className: style.pagination.bar
|
|
322
|
-
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Input.Input, {
|
|
323
|
-
className: style.pagination.searchInput,
|
|
324
|
-
placeholder: "Search selected...",
|
|
325
|
-
value: this.state.multipleSelectionSearch,
|
|
326
|
-
"data-testid": "pb.pagination.search",
|
|
327
|
-
onChange: function onChange(value) {
|
|
328
|
-
_this5.setMultipleSelectionSearch(value);
|
|
329
|
-
_this5.setMultipleSelectionPage(value ? 1 : 0);
|
|
330
|
-
}
|
|
331
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
332
|
-
className: style.pagination.pages
|
|
333
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
334
|
-
className: meta.hasData ? "" : style.pagination.secondaryText
|
|
335
|
-
}, meta.from, " - ", meta.to, " of ", meta.totalCount), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Button.IconButton, {
|
|
336
|
-
icon: /*#__PURE__*/_react.default.createElement(_skip_previous24px.ReactComponent, null),
|
|
337
|
-
disabled: !meta.hasData || meta.page === 1,
|
|
338
|
-
onClick: function onClick() {
|
|
339
|
-
return _this5.setMultipleSelectionPage(1);
|
|
340
|
-
}
|
|
341
|
-
}), /*#__PURE__*/_react.default.createElement(_Button.IconButton, {
|
|
342
|
-
icon: /*#__PURE__*/_react.default.createElement(_navigate_before24px.ReactComponent, null),
|
|
343
|
-
disabled: !meta.hasData || !meta.hasPrevious,
|
|
344
|
-
onClick: function onClick() {
|
|
345
|
-
return _this5.setMultipleSelectionPage(meta.page - 1);
|
|
346
|
-
}
|
|
347
|
-
}), /*#__PURE__*/_react.default.createElement(_Button.IconButton, {
|
|
348
|
-
icon: /*#__PURE__*/_react.default.createElement(_navigate_next24px.ReactComponent, null),
|
|
349
|
-
disabled: !meta.hasData || !meta.hasNext,
|
|
350
|
-
onClick: function onClick() {
|
|
351
|
-
return _this5.setMultipleSelectionPage(meta.page + 1);
|
|
352
|
-
}
|
|
353
|
-
}), /*#__PURE__*/_react.default.createElement(_Button.IconButton, {
|
|
354
|
-
icon: /*#__PURE__*/_react.default.createElement(_skip_next24px.ReactComponent, null),
|
|
355
|
-
disabled: !meta.hasData || meta.page === meta.lastPage,
|
|
356
|
-
onClick: function onClick() {
|
|
357
|
-
return _this5.setMultipleSelectionPage(meta.lastPage);
|
|
358
|
-
}
|
|
359
|
-
})))), /*#__PURE__*/_react.default.createElement(_List.List, {
|
|
360
|
-
className: style.pagination.list
|
|
361
|
-
}, meta.hasData ? data.map(function (item, index) {
|
|
362
|
-
var key = "".concat((0, _utils.getOptionValue)(item.option, _this5.props), "-").concat(index);
|
|
363
|
-
if (_this5.state.reorderFormVisible === key) {
|
|
364
|
-
return /*#__PURE__*/_react.default.createElement(_List.ListItem, {
|
|
365
|
-
key: key
|
|
366
|
-
}, /*#__PURE__*/_react.default.createElement(_List.ListItemGraphic, null, /*#__PURE__*/_react.default.createElement(_Button.IconButton, {
|
|
367
|
-
disabled: true,
|
|
368
|
-
icon: /*#__PURE__*/_react.default.createElement(_reorder_black_24dp.ReactComponent, null)
|
|
369
|
-
})), /*#__PURE__*/_react.default.createElement(_Input.Input, {
|
|
370
|
-
value: _this5.state.reorderFormValue,
|
|
371
|
-
"data-testid": "pb.pagination.input",
|
|
372
|
-
onKeyDown: function onKeyDown(e) {
|
|
373
|
-
var key = e.key;
|
|
374
|
-
if (key !== "Escape" && key !== "Enter") {
|
|
375
|
-
return;
|
|
376
|
-
}
|
|
377
|
-
if (key === "Enter") {
|
|
378
|
-
// Reorder the item.
|
|
379
|
-
var newValue = (0, _toConsumableArray2.default)(value);
|
|
380
|
-
newValue.splice(e.target.value - 1, 0, newValue.splice(item.index, 1)[0]);
|
|
381
|
-
if (onChange) {
|
|
382
|
-
onChange(newValue);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
_this5.setState({
|
|
386
|
-
reorderFormVisible: "",
|
|
387
|
-
reorderFormValue: ""
|
|
388
|
-
});
|
|
389
|
-
},
|
|
390
|
-
onChange: function onChange(value) {
|
|
391
|
-
return _this5.setState({
|
|
392
|
-
reorderFormValue: value
|
|
393
|
-
});
|
|
394
|
-
},
|
|
395
|
-
type: "number",
|
|
396
|
-
autoFocus: true,
|
|
397
|
-
className: style.pagination.searchInput,
|
|
398
|
-
placeholder: "Type a new order number and press Enter, or press Esc to cancel."
|
|
399
|
-
}), /*#__PURE__*/_react.default.createElement(_List.ListItemMeta, null, /*#__PURE__*/_react.default.createElement(_Button.IconButton, {
|
|
400
|
-
icon: /*#__PURE__*/_react.default.createElement(_baselineClose24px.ReactComponent, null),
|
|
401
|
-
disabled: true
|
|
402
|
-
})));
|
|
403
|
-
}
|
|
404
|
-
return /*#__PURE__*/_react.default.createElement(_List.ListItem, {
|
|
405
|
-
key: key
|
|
406
|
-
}, /*#__PURE__*/_react.default.createElement(_List.ListItemGraphic, null, /*#__PURE__*/_react.default.createElement(_Button.IconButton, {
|
|
407
|
-
icon: /*#__PURE__*/_react.default.createElement(_reorder_black_24dp.ReactComponent, null),
|
|
408
|
-
onClick: function onClick() {
|
|
409
|
-
_this5.setState({
|
|
410
|
-
reorderFormVisible: key
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
414
|
-
style: {
|
|
415
|
-
color: "var(--mdc-theme-text-secondary-on-background)",
|
|
416
|
-
marginRight: 8,
|
|
417
|
-
minWidth: 32
|
|
418
|
-
}
|
|
419
|
-
}, item.index + 1, "."), " ", renderListItemLabel && renderListItemLabel.call(_this5, item.option), /*#__PURE__*/_react.default.createElement(_List.ListItemMeta, {
|
|
420
|
-
className: listItemMetaClassName
|
|
421
|
-
}, renderListItemOptions && renderListItemOptions.call(_this5, item.option), /*#__PURE__*/_react.default.createElement(_Button.IconButton, {
|
|
422
|
-
icon: /*#__PURE__*/_react.default.createElement(_baselineClose24px.ReactComponent, null),
|
|
423
|
-
className: iconButtonClassName,
|
|
424
|
-
onClick: function onClick() {
|
|
425
|
-
if (!onChange) {
|
|
426
|
-
return;
|
|
427
|
-
}
|
|
428
|
-
onChange([].concat((0, _toConsumableArray2.default)(value.slice(0, item.index)), (0, _toConsumableArray2.default)(value.slice(item.index + 1))));
|
|
429
|
-
}
|
|
430
|
-
})));
|
|
431
|
-
}) : /*#__PURE__*/_react.default.createElement(_List.ListItem, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
432
|
-
className: style.pagination.secondaryText
|
|
433
|
-
}, "Nothing to show."))), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_FormElementMessage.FormElementMessage, null, description)));
|
|
30
|
+
return {
|
|
31
|
+
label: option[textProp],
|
|
32
|
+
value: option[valueProp],
|
|
33
|
+
disabled: option.disabled,
|
|
34
|
+
item: option
|
|
35
|
+
};
|
|
36
|
+
}, [textProp, valueProp, useSimpleValues]);
|
|
37
|
+
const options = useMemo(() => {
|
|
38
|
+
return props.options.map(option => {
|
|
39
|
+
return getOption(option);
|
|
40
|
+
});
|
|
41
|
+
}, [props.options]);
|
|
42
|
+
const values = useMemo(() => {
|
|
43
|
+
if (!value) {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
return value.map(val => {
|
|
47
|
+
if (typeof val === "string") {
|
|
48
|
+
return val;
|
|
434
49
|
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
50
|
+
return val[valueProp];
|
|
51
|
+
}).filter(Boolean);
|
|
52
|
+
}, [value, valueProp]);
|
|
53
|
+
const onValuesChange = useCallback(values => {
|
|
54
|
+
const selectedOptions = [];
|
|
55
|
+
for (const value of values) {
|
|
56
|
+
const option = options.find(option => option.value === value);
|
|
57
|
+
if (option) {
|
|
58
|
+
selectedOptions.push(option);
|
|
59
|
+
} else {
|
|
60
|
+
selectedOptions.push(getOption(value));
|
|
438
61
|
}
|
|
439
|
-
return /*#__PURE__*/_react.default.createElement(_Chips.Chips, {
|
|
440
|
-
disabled: disabled
|
|
441
|
-
}, value.map(function (item, index) {
|
|
442
|
-
return /*#__PURE__*/_react.default.createElement(_Chips.Chip, {
|
|
443
|
-
label: (0, _utils.getOptionText)(item, _this5.props),
|
|
444
|
-
key: "".concat((0, _utils.getOptionValue)(item, _this5.props), "-").concat(index),
|
|
445
|
-
trailingIcon: /*#__PURE__*/_react.default.createElement(_baselineClose24px.ReactComponent, null),
|
|
446
|
-
onRemove: function onRemove() {
|
|
447
|
-
if (!onChange) {
|
|
448
|
-
return;
|
|
449
|
-
}
|
|
450
|
-
onChange([].concat((0, _toConsumableArray2.default)(value.slice(0, index)), (0, _toConsumableArray2.default)(value.slice(index + 1))));
|
|
451
|
-
}
|
|
452
|
-
});
|
|
453
|
-
}));
|
|
454
62
|
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
unique = _this$props3.unique,
|
|
462
|
-
value = _this$props3.value,
|
|
463
|
-
_onChange = _this$props3.onChange,
|
|
464
|
-
onInput = _this$props3.onInput,
|
|
465
|
-
_this$props3$validati = _this$props3.validation,
|
|
466
|
-
validation = _this$props3$validati === void 0 ? {
|
|
467
|
-
isValid: null,
|
|
468
|
-
message: null
|
|
469
|
-
} : _this$props3$validati,
|
|
470
|
-
useMultipleSelectionList = _this$props3.useMultipleSelectionList,
|
|
471
|
-
description = _this$props3.description,
|
|
472
|
-
otherInputProps = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
473
|
-
var options = this.getOptions();
|
|
474
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
475
|
-
className: (0, _classnames.default)(_styles.autoCompleteStyle, props.className)
|
|
476
|
-
}, /*#__PURE__*/_react.default.createElement(_downshift.default, {
|
|
477
|
-
defaultSelectedItem: null
|
|
478
|
-
// @ts-expect-error there is no className on Downshift
|
|
479
|
-
,
|
|
480
|
-
className: _styles.autoCompleteStyle,
|
|
481
|
-
itemToString: function itemToString(item) {
|
|
482
|
-
return item && (0, _utils.getOptionText)(item, props);
|
|
483
|
-
},
|
|
484
|
-
ref: this.downshift,
|
|
485
|
-
onChange: function onChange(selection) {
|
|
486
|
-
if (!_this6.assignedValueAfterClearing.set) {
|
|
487
|
-
_this6.assignedValueAfterClearing = {
|
|
488
|
-
set: true,
|
|
489
|
-
selection: selection
|
|
490
|
-
};
|
|
491
|
-
_this6.downshift.current.clearSelection();
|
|
492
|
-
_this6.setMultipleSelectionPage(0);
|
|
493
|
-
return;
|
|
494
|
-
}
|
|
495
|
-
if (_this6.assignedValueAfterClearing.set) {
|
|
496
|
-
_this6.setState({
|
|
497
|
-
inputValue: ""
|
|
498
|
-
});
|
|
499
|
-
_this6.assignedValueAfterClearing.set = false;
|
|
500
|
-
if (Array.isArray(value)) {
|
|
501
|
-
_onChange && _onChange([].concat((0, _toConsumableArray2.default)(value), [_this6.assignedValueAfterClearing.selection]));
|
|
502
|
-
} else {
|
|
503
|
-
_onChange && _onChange([_this6.assignedValueAfterClearing.selection]);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
}, function (_ref2) {
|
|
508
|
-
var getInputProps = _ref2.getInputProps,
|
|
509
|
-
openMenu = _ref2.openMenu,
|
|
510
|
-
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
511
|
-
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Input.Input, getInputProps((0, _objectSpread2.default)((0, _objectSpread2.default)({}, otherInputProps), {}, {
|
|
512
|
-
// @ts-expect-error
|
|
513
|
-
validation: validation,
|
|
514
|
-
// Only pass description if not using "useMultipleSelectionList".
|
|
515
|
-
description: useMultipleSelectionList ? null : description,
|
|
516
|
-
rawOnChange: true,
|
|
517
|
-
trailingIcon: _this6.props.loading && /*#__PURE__*/_react.default.createElement(Spinner, null),
|
|
518
|
-
onChange: function onChange(e) {
|
|
519
|
-
return e;
|
|
520
|
-
},
|
|
521
|
-
onBlur: function onBlur(e) {
|
|
522
|
-
return e;
|
|
523
|
-
},
|
|
524
|
-
onKeyUp: function onKeyUp(e) {
|
|
525
|
-
var inputValue = e.target.value || "";
|
|
526
|
-
|
|
527
|
-
// Set current input value into state and trigger onInput if different.
|
|
528
|
-
if (inputValue !== _this6.state.inputValue) {
|
|
529
|
-
_this6.setState({
|
|
530
|
-
inputValue: inputValue
|
|
531
|
-
}, function () {
|
|
532
|
-
onInput && onInput(inputValue);
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
},
|
|
536
|
-
onFocus: function onFocus(e) {
|
|
537
|
-
openMenu();
|
|
538
|
-
otherInputProps.onFocus && otherInputProps.onFocus(e);
|
|
539
|
-
}
|
|
540
|
-
}))), _this6.renderOptions((0, _objectSpread2.default)((0, _objectSpread2.default)({}, rest), {}, {
|
|
541
|
-
unique: unique,
|
|
542
|
-
options: options
|
|
543
|
-
})), _this6.renderMultipleSelection());
|
|
544
|
-
}));
|
|
63
|
+
const selectedItems = selectedOptions.map(option => option.item);
|
|
64
|
+
onChange?.(selectedItems);
|
|
65
|
+
}, [onChange, options]);
|
|
66
|
+
const selectedOptionRenderer = useMemo(() => {
|
|
67
|
+
if (renderMultipleSelection === null) {
|
|
68
|
+
return () => null;
|
|
545
69
|
}
|
|
546
|
-
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
}, (0, _utils.getOptionText)(item, this.props));
|
|
563
|
-
},
|
|
564
|
-
/**
|
|
565
|
-
* We cast this as MultiAutoComplete because renderListItemLabel() is executed via .call() where this is MultiAutoComplete instance.
|
|
566
|
-
*/
|
|
567
|
-
renderListItemLabel: function renderListItemLabel(item) {
|
|
568
|
-
return (0, _utils.getOptionText)(item, this.props);
|
|
569
|
-
}
|
|
570
|
-
});
|
|
70
|
+
return renderMultipleSelection;
|
|
71
|
+
}, [renderMultipleSelection]);
|
|
72
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AdminMultiAutoComplete, Object.assign({}, props, {
|
|
73
|
+
size: "lg",
|
|
74
|
+
values: values,
|
|
75
|
+
options: options,
|
|
76
|
+
optionRenderer: renderItem,
|
|
77
|
+
selectedOptionRenderer: selectedOptionRenderer,
|
|
78
|
+
emptyMessage: noResultFound,
|
|
79
|
+
onValuesChange: onValuesChange,
|
|
80
|
+
onValueSearch: onInput,
|
|
81
|
+
loading: loading,
|
|
82
|
+
allowFreeInput: allowFreeInput,
|
|
83
|
+
uniqueValues: unique
|
|
84
|
+
})));
|
|
85
|
+
};
|
|
571
86
|
|
|
572
87
|
//# sourceMappingURL=MultiAutoComplete.js.map
|