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