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