superdesk-ui-framework 3.0.65 → 3.0.67
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/app/styles/_boxed-list.scss +10 -3
- package/app/styles/_helpers.scss +3 -1
- package/app/styles/components/_list-item.scss +22 -11
- package/app/styles/components/_sd-searchbar.scss +20 -1
- package/app/styles/primereact/_pr-dialog.scss +29 -13
- package/app-typescript/components/Autocomplete.tsx +9 -3
- package/app-typescript/components/Badge.tsx +16 -2
- package/app-typescript/components/Dropdown.tsx +3 -1
- package/app-typescript/components/DropdownFirst.tsx +14 -2
- package/app-typescript/components/DurationInput.tsx +19 -4
- package/app-typescript/components/EmptyState.tsx +11 -2
- package/app-typescript/components/Layouts/Panel.tsx +12 -1
- package/app-typescript/components/Lists/ContentList.tsx +5 -1
- package/app-typescript/components/Modal.tsx +12 -3
- package/app-typescript/components/Navigation/BottomNav.tsx +9 -2
- package/app-typescript/components/Navigation/QuickNavBar.tsx +10 -2
- package/app-typescript/components/Navigation/SideBarMenu.tsx +9 -4
- package/app-typescript/components/SearchBar.tsx +1 -0
- package/app-typescript/components/SidebarMenu.tsx +8 -1
- package/app-typescript/components/TabList.tsx +5 -1
- package/app-typescript/components/TagInput.tsx +4 -1
- package/app-typescript/components/ThemeSelector.tsx +13 -2
- package/app-typescript/components/TreeMenu.tsx +127 -122
- package/app-typescript/components/TreeSelect/TreeSelect.tsx +157 -141
- package/app-typescript/components/WithPortal.tsx +49 -0
- package/app-typescript/components/avatar/avatar-image.tsx +2 -0
- package/app-typescript/components/avatar/avatar.tsx +2 -1
- package/dist/examples.bundle.js +1409 -1278
- package/dist/playgrounds/planning.html +121 -43
- package/dist/playgrounds/react-playgrounds/CoreLayout.tsx +398 -385
- package/dist/playgrounds/react-playgrounds/EditorTest.tsx +359 -365
- package/dist/playgrounds/react-playgrounds/FirstPlayground.tsx +33 -33
- package/dist/playgrounds/react-playgrounds/Multiedit.tsx +227 -231
- package/dist/playgrounds/react-playgrounds/PageLayoutTest.tsx +41 -38
- package/dist/playgrounds/react-playgrounds/PersonalProfile.tsx +76 -96
- package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +73 -101
- package/dist/playgrounds/react-playgrounds/Rundowns.tsx +788 -729
- package/dist/playgrounds/react-playgrounds/SamsPlayground.tsx +35 -26
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +140 -121
- package/dist/playgrounds/react-playgrounds/UiPlayground.tsx +40 -25
- package/dist/playgrounds/react-playgrounds/components/GraphicButton.tsx +6 -5
- package/dist/playgrounds/react-playgrounds/components/Layout.tsx +0 -2
- package/dist/playgrounds/react-playgrounds/components/SearchBar.tsx +16 -9
- package/dist/superdesk-ui.bundle.css +79 -33
- package/dist/superdesk-ui.bundle.js +833 -729
- package/dist/vendor.bundle.js +14 -14
- package/examples/pages/playgrounds/planning.html +121 -43
- package/examples/pages/playgrounds/react-playgrounds/CoreLayout.tsx +398 -385
- package/examples/pages/playgrounds/react-playgrounds/EditorTest.tsx +359 -365
- package/examples/pages/playgrounds/react-playgrounds/FirstPlayground.tsx +33 -33
- package/examples/pages/playgrounds/react-playgrounds/Multiedit.tsx +227 -231
- package/examples/pages/playgrounds/react-playgrounds/PageLayoutTest.tsx +41 -38
- package/examples/pages/playgrounds/react-playgrounds/PersonalProfile.tsx +76 -96
- package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +73 -101
- package/examples/pages/playgrounds/react-playgrounds/Rundowns.tsx +788 -729
- package/examples/pages/playgrounds/react-playgrounds/SamsPlayground.tsx +35 -26
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +140 -121
- package/examples/pages/playgrounds/react-playgrounds/UiPlayground.tsx +40 -25
- package/examples/pages/playgrounds/react-playgrounds/components/GraphicButton.tsx +6 -5
- package/examples/pages/playgrounds/react-playgrounds/components/Layout.tsx +0 -2
- package/examples/pages/playgrounds/react-playgrounds/components/SearchBar.tsx +16 -9
- package/package.json +1 -1
- package/react/{components → app-typescript/components}/Autocomplete.js +2 -2
- package/react/{components → app-typescript/components}/Badge.js +1 -1
- package/react/{components → app-typescript/components}/Dropdown.js +3 -1
- package/react/{components → app-typescript/components}/DropdownFirst.js +6 -2
- package/react/{components → app-typescript/components}/DurationInput.js +5 -1
- package/react/{components → app-typescript/components}/EmptyState.js +2 -1
- package/react/{components → app-typescript/components}/Lists/ContentList.js +1 -1
- package/react/{components → app-typescript/components}/Modal.js +2 -2
- package/react/{components → app-typescript/components}/Navigation/BottomNav.js +4 -1
- package/react/{components → app-typescript/components}/Navigation/QuickNavBar.js +2 -1
- package/react/{components → app-typescript/components}/Navigation/SideBarMenu.js +3 -1
- package/react/{components → app-typescript/components}/SearchBar.js +1 -0
- package/react/{components → app-typescript/components}/TabList.js +2 -1
- package/react/{components → app-typescript/components}/TagInput.js +1 -1
- package/react/{components → app-typescript/components}/TreeSelect/TreeSelect.d.ts +3 -2
- package/react/{components → app-typescript/components}/TreeSelect/TreeSelect.js +81 -73
- package/react/app-typescript/components/WithPortal.d.ts +14 -0
- package/react/app-typescript/components/WithPortal.js +69 -0
- package/react/{components → app-typescript/components}/avatar/avatar.js +2 -1
- package/react/examples/pages/playgrounds/dummy-data/items.d.ts +16 -0
- package/react/examples/pages/playgrounds/dummy-data/items.js +95 -0
- package/react/examples/pages/playgrounds/react-playgrounds/CoreLayout.d.ts +51 -0
- package/react/examples/pages/playgrounds/react-playgrounds/CoreLayout.js +454 -0
- package/react/examples/pages/playgrounds/react-playgrounds/EditorTest.d.ts +27 -0
- package/react/examples/pages/playgrounds/react-playgrounds/EditorTest.js +256 -0
- package/react/examples/pages/playgrounds/react-playgrounds/FirstPlayground.d.ts +19 -0
- package/react/examples/pages/playgrounds/react-playgrounds/FirstPlayground.js +160 -0
- package/react/examples/pages/playgrounds/react-playgrounds/Index.d.ts +11 -0
- package/react/examples/pages/playgrounds/react-playgrounds/Index.js +25 -0
- package/react/examples/pages/playgrounds/react-playgrounds/Multiedit.d.ts +36 -0
- package/react/examples/pages/playgrounds/react-playgrounds/Multiedit.js +200 -0
- package/react/examples/pages/playgrounds/react-playgrounds/PageLayoutTest.d.ts +22 -0
- package/react/examples/pages/playgrounds/react-playgrounds/PageLayoutTest.js +134 -0
- package/react/examples/pages/playgrounds/react-playgrounds/PersonalProfile.d.ts +40 -0
- package/react/examples/pages/playgrounds/react-playgrounds/PersonalProfile.js +350 -0
- package/react/examples/pages/playgrounds/react-playgrounds/RundownEditor.d.ts +32 -0
- package/react/examples/pages/playgrounds/react-playgrounds/RundownEditor.js +267 -0
- package/react/examples/pages/playgrounds/react-playgrounds/Rundowns.d.ts +39 -0
- package/react/examples/pages/playgrounds/react-playgrounds/Rundowns.js +558 -0
- package/react/examples/pages/playgrounds/react-playgrounds/SamsPlayground.d.ts +24 -0
- package/react/examples/pages/playgrounds/react-playgrounds/SamsPlayground.js +241 -0
- package/react/examples/pages/playgrounds/react-playgrounds/TestGround.d.ts +27 -0
- package/react/examples/pages/playgrounds/react-playgrounds/TestGround.js +508 -0
- package/react/examples/pages/playgrounds/react-playgrounds/UiPlayground.d.ts +24 -0
- package/react/examples/pages/playgrounds/react-playgrounds/UiPlayground.js +239 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/AuthoringContainer.d.ts +11 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/AuthoringContainer.js +64 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/ContentSplitter.d.ts +10 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/ContentSplitter.js +62 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/GraphicButton.d.ts +14 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/GraphicButton.js +65 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/GraphicButtonsGroup.d.ts +8 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/GraphicButtonsGroup.js +53 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/HeaderPanel.d.ts +8 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/HeaderPanel.js +53 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/Index.d.ts +19 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/Index.js +41 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/Layout.d.ts +8 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/Layout.js +40 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/LayoutContainer.d.ts +8 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/LayoutContainer.js +53 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/LeftPanel.d.ts +9 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/LeftPanel.js +53 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/MainPanel.d.ts +10 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/MainPanel.js +63 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/OverlayPanel.d.ts +8 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/OverlayPanel.js +55 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/Panel.d.ts +10 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/Panel.js +63 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/PanelContent.d.ts +8 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/PanelContent.js +53 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/PanelContentBlock.d.ts +11 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/PanelContentBlock.js +63 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/PanelFooter.d.ts +8 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/PanelFooter.js +54 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/PanelHeader.d.ts +12 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/PanelHeader.js +63 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/RightPanel.d.ts +9 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/RightPanel.js +53 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/SearchBar.d.ts +23 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/SearchBar.js +92 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/SidebarMenu.d.ts +20 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/SidebarMenu.js +83 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/SubNav.d.ts +9 -0
- package/react/examples/pages/playgrounds/react-playgrounds/components/SubNav.js +60 -0
- package/tsconfig.json +5 -1
- /package/dist/playgrounds/dummy-data/{items.js → items.ts} +0 -0
- /package/examples/pages/playgrounds/dummy-data/{items.js → items.ts} +0 -0
- /package/react/{components → app-typescript/components}/Alert.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Alert.js +0 -0
- /package/react/{components → app-typescript/components}/Autocomplete.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Badge.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Button.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Button.js +0 -0
- /package/react/{components → app-typescript/components}/ButtonGroup.d.ts +0 -0
- /package/react/{components → app-typescript/components}/ButtonGroup.js +0 -0
- /package/react/{components → app-typescript/components}/Carousel.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Carousel.js +0 -0
- /package/react/{components → app-typescript/components}/CheckButtonGroup.d.ts +0 -0
- /package/react/{components → app-typescript/components}/CheckButtonGroup.js +0 -0
- /package/react/{components → app-typescript/components}/CheckGroup.d.ts +0 -0
- /package/react/{components → app-typescript/components}/CheckGroup.js +0 -0
- /package/react/{components → app-typescript/components}/Checkbox.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Checkbox.js +0 -0
- /package/react/{components → app-typescript/components}/CheckboxButton.d.ts +0 -0
- /package/react/{components → app-typescript/components}/CheckboxButton.js +0 -0
- /package/react/{components → app-typescript/components}/ContentDivider.d.ts +0 -0
- /package/react/{components → app-typescript/components}/ContentDivider.js +0 -0
- /package/react/{components → app-typescript/components}/CreateButton.d.ts +0 -0
- /package/react/{components → app-typescript/components}/CreateButton.js +0 -0
- /package/react/{components → app-typescript/components}/DatePicker.d.ts +0 -0
- /package/react/{components → app-typescript/components}/DatePicker.js +0 -0
- /package/react/{components → app-typescript/components}/Divider.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Divider.js +0 -0
- /package/react/{components → app-typescript/components}/DonutChart.d.ts +0 -0
- /package/react/{components → app-typescript/components}/DonutChart.js +0 -0
- /package/react/{components → app-typescript/components}/DragHandle.d.ts +0 -0
- /package/react/{components → app-typescript/components}/DragHandle.js +0 -0
- /package/react/{components → app-typescript/components}/DropZone.d.ts +0 -0
- /package/react/{components → app-typescript/components}/DropZone.js +0 -0
- /package/react/{components → app-typescript/components}/Dropdown.d.ts +0 -0
- /package/react/{components → app-typescript/components}/DropdownFirst.d.ts +0 -0
- /package/react/{components → app-typescript/components}/DurationInput.d.ts +0 -0
- /package/react/{components → app-typescript/components}/EmptyState.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Form/FormGroup.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Form/FormGroup.js +0 -0
- /package/react/{components → app-typescript/components}/Form/FormItem.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Form/FormItem.js +0 -0
- /package/react/{components → app-typescript/components}/Form/FormLabel.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Form/FormLabel.js +0 -0
- /package/react/{components → app-typescript/components}/Form/FormRow.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Form/FormRow.js +0 -0
- /package/react/{components → app-typescript/components}/Form/FormRowNew.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Form/FormRowNew.js +0 -0
- /package/react/{components → app-typescript/components}/Form/FormText.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Form/FormText.js +0 -0
- /package/react/{components → app-typescript/components}/Form/InputBase.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Form/InputBase.js +0 -0
- /package/react/{components → app-typescript/components}/Form/InputNew.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Form/InputNew.js +0 -0
- /package/react/{components → app-typescript/components}/Form/InputWrapper.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Form/InputWrapper.js +0 -0
- /package/react/{components → app-typescript/components}/Form/index.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Form/index.js +0 -0
- /package/react/{components → app-typescript/components}/FormLabel.d.ts +0 -0
- /package/react/{components → app-typescript/components}/FormLabel.js +0 -0
- /package/react/{components → app-typescript/components}/GridItem.d.ts +0 -0
- /package/react/{components → app-typescript/components}/GridItem.js +0 -0
- /package/react/{components → app-typescript/components}/GridList.d.ts +0 -0
- /package/react/{components → app-typescript/components}/GridList.js +0 -0
- /package/react/{components → app-typescript/components}/HeadingText.d.ts +0 -0
- /package/react/{components → app-typescript/components}/HeadingText.js +0 -0
- /package/react/{components → app-typescript/components}/HelloWorld.d.ts +0 -0
- /package/react/{components → app-typescript/components}/HelloWorld.js +0 -0
- /package/react/{components → app-typescript/components}/Icon.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Icon.js +0 -0
- /package/react/{components → app-typescript/components}/IconButton.d.ts +0 -0
- /package/react/{components → app-typescript/components}/IconButton.js +0 -0
- /package/react/{components → app-typescript/components}/IconLabel.d.ts +0 -0
- /package/react/{components → app-typescript/components}/IconLabel.js +0 -0
- /package/react/{components → app-typescript/components}/IconPicker.d.ts +0 -0
- /package/react/{components → app-typescript/components}/IconPicker.js +0 -0
- /package/react/{components → app-typescript/components}/Input.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Input.js +0 -0
- /package/react/{components → app-typescript/components}/Label.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Label.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthorinInnerSideBar.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthorinInnerSideBar.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringContainer.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringContainer.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrame.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrame.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameContainer.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameContainer.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameLeftBar.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameLeftBar.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameMain.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameMain.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameNavBar.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameNavBar.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameOverlay.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameOverlay.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameRightBar.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameRightBar.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameSidePanel.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameSidePanel.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameSidePanelOverlay.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringFrameSidePanelOverlay.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringInnerBody.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringInnerBody.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringInnerHeader.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringInnerHeader.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringMain.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringMain.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringMainContainer.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringMainContainer.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringMainContent.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringMainContent.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringMainToolBar.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/AuthoringMainToolBar.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/BottomBarAction.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/BottomBarAction.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/Container.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/Container.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/ContentSplitter.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/ContentSplitter.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayout.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayout.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayoutContainer.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayoutContainer.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayoutFooter.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayoutFooter.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayoutMain.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayoutMain.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayoutOverlay.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayoutOverlay.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayoutSlideInMenu.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayoutSlideInMenu.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayoutTopMenu.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/CoreLayoutTopMenu.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/HamburgerButton.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/HamburgerButton.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/HeaderPanel.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/HeaderPanel.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/Layout.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/Layout.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/LayoutContainer.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/LayoutContainer.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/LeftPanel.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/LeftPanel.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/MainMenu.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/MainMenu.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/MainPanel.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/MainPanel.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/NotificationPanel.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/NotificationPanel.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/OverlayPanel.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/OverlayPanel.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/PageLayout.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/PageLayout.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/Panel.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/Panel.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/RightPanel.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/RightPanel.js +0 -0
- /package/react/{components → app-typescript/components}/Layouts/index.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Layouts/index.js +0 -0
- /package/react/{components → app-typescript/components}/LeftMenu.d.ts +0 -0
- /package/react/{components → app-typescript/components}/LeftMenu.js +0 -0
- /package/react/{components → app-typescript/components}/ListItemLoader.d.ts +0 -0
- /package/react/{components → app-typescript/components}/ListItemLoader.js +0 -0
- /package/react/{components → app-typescript/components}/Lists/BoxedList.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Lists/BoxedList.js +0 -0
- /package/react/{components → app-typescript/components}/Lists/ContentList.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Lists/SimpleList.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Lists/SimpleList.js +0 -0
- /package/react/{components → app-typescript/components}/Lists/TableList.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Lists/TableList.js +0 -0
- /package/react/{components → app-typescript/components}/Lists/index.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Lists/index.js +0 -0
- /package/react/{components → app-typescript/components}/Loader.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Loader.js +0 -0
- /package/react/{components → app-typescript/components}/Menu.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Menu.js +0 -0
- /package/react/{components → app-typescript/components}/Modal.d.ts +0 -0
- /package/react/{components → app-typescript/components}/MultiSelect.d.ts +0 -0
- /package/react/{components → app-typescript/components}/MultiSelect.js +0 -0
- /package/react/{components → app-typescript/components}/NavButton.d.ts +0 -0
- /package/react/{components → app-typescript/components}/NavButton.js +0 -0
- /package/react/{components → app-typescript/components}/Navigation/BottomNav.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Navigation/QuickNavBar.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Navigation/SideBarMenu.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Navigation/SideBarTabs.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Navigation/SideBarTabs.js +0 -0
- /package/react/{components → app-typescript/components}/Navigation/index.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Navigation/index.js +0 -0
- /package/react/{components → app-typescript/components}/Popover.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Popover.js +0 -0
- /package/react/{components → app-typescript/components}/PropsList.d.ts +0 -0
- /package/react/{components → app-typescript/components}/PropsList.js +0 -0
- /package/react/{components → app-typescript/components}/RadioButtonGroup.d.ts +0 -0
- /package/react/{components → app-typescript/components}/RadioButtonGroup.js +0 -0
- /package/react/{components → app-typescript/components}/RadioGroup.d.ts +0 -0
- /package/react/{components → app-typescript/components}/RadioGroup.js +0 -0
- /package/react/{components → app-typescript/components}/ResizablePanels.d.ts +0 -0
- /package/react/{components → app-typescript/components}/ResizablePanels.js +0 -0
- /package/react/{components → app-typescript/components}/ResizeObserverComponent.d.ts +0 -0
- /package/react/{components → app-typescript/components}/ResizeObserverComponent.js +0 -0
- /package/react/{components → app-typescript/components}/Rotate.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Rotate.js +0 -0
- /package/react/{components → app-typescript/components}/SearchBar.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Select.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Select.js +0 -0
- /package/react/{components → app-typescript/components}/SelectGrid.d.ts +0 -0
- /package/react/{components → app-typescript/components}/SelectGrid.js +0 -0
- /package/react/{components → app-typescript/components}/SelectPreview.d.ts +0 -0
- /package/react/{components → app-typescript/components}/SelectPreview.js +0 -0
- /package/react/{components → app-typescript/components}/SelectWithTemplate.d.ts +0 -0
- /package/react/{components → app-typescript/components}/SelectWithTemplate.js +0 -0
- /package/react/{components → app-typescript/components}/ShowPopup.d.ts +0 -0
- /package/react/{components → app-typescript/components}/ShowPopup.js +0 -0
- /package/react/{components → app-typescript/components}/SingleAndDoubleClickFunction.d.ts +0 -0
- /package/react/{components → app-typescript/components}/SingleAndDoubleClickFunction.js +0 -0
- /package/react/{components → app-typescript/components}/Skeleton.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Skeleton.js +0 -0
- /package/react/{components → app-typescript/components}/SlidingToolbar.d.ts +0 -0
- /package/react/{components → app-typescript/components}/SlidingToolbar.js +0 -0
- /package/react/{components → app-typescript/components}/Spacer.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Spacer.js +0 -0
- /package/react/{components → app-typescript/components}/Spinner.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Spinner.js +0 -0
- /package/react/{components → app-typescript/components}/StrechBar.d.ts +0 -0
- /package/react/{components → app-typescript/components}/StrechBar.js +0 -0
- /package/react/{components → app-typescript/components}/SubNav.d.ts +0 -0
- /package/react/{components → app-typescript/components}/SubNav.js +0 -0
- /package/react/{components → app-typescript/components}/Switch.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Switch.js +0 -0
- /package/react/{components → app-typescript/components}/SwitchGroup.d.ts +0 -0
- /package/react/{components → app-typescript/components}/SwitchGroup.js +0 -0
- /package/react/{components → app-typescript/components}/TabCustom.d.ts +0 -0
- /package/react/{components → app-typescript/components}/TabCustom.js +0 -0
- /package/react/{components → app-typescript/components}/TabList.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Tag.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Tag.js +0 -0
- /package/react/{components → app-typescript/components}/TagInput.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Text/Heading.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Text/Heading.js +0 -0
- /package/react/{components → app-typescript/components}/Text/Text.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Text/Text.js +0 -0
- /package/react/{components → app-typescript/components}/Text/Time.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Text/Time.js +0 -0
- /package/react/{components → app-typescript/components}/ThemeSelector.d.ts +0 -0
- /package/react/{components → app-typescript/components}/ThemeSelector.js +0 -0
- /package/react/{components → app-typescript/components}/TimePicker.d.ts +0 -0
- /package/react/{components → app-typescript/components}/TimePicker.js +0 -0
- /package/react/{components → app-typescript/components}/Toast.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Toast.js +0 -0
- /package/react/{components → app-typescript/components}/ToastMessage.d.ts +0 -0
- /package/react/{components → app-typescript/components}/ToastMessage.js +0 -0
- /package/react/{components → app-typescript/components}/ToastText.d.ts +0 -0
- /package/react/{components → app-typescript/components}/ToastText.js +0 -0
- /package/react/{components → app-typescript/components}/ToastWrapper.d.ts +0 -0
- /package/react/{components → app-typescript/components}/ToastWrapper.js +0 -0
- /package/react/{components → app-typescript/components}/Togglebox.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Togglebox.js +0 -0
- /package/react/{components → app-typescript/components}/Tooltip.d.ts +0 -0
- /package/react/{components → app-typescript/components}/Tooltip.js +0 -0
- /package/react/{components → app-typescript/components}/TreeSelect/KeyboardNavigation.d.ts +0 -0
- /package/react/{components → app-typescript/components}/TreeSelect/KeyboardNavigation.js +0 -0
- /package/react/{components → app-typescript/components}/TreeSelect/TreeSelectItem.d.ts +0 -0
- /package/react/{components → app-typescript/components}/TreeSelect/TreeSelectItem.js +0 -0
- /package/react/{components → app-typescript/components}/TreeSelect/TreeSelectPill.d.ts +0 -0
- /package/react/{components → app-typescript/components}/TreeSelect/TreeSelectPill.js +0 -0
- /package/react/{components → app-typescript/components}/WithPagination.d.ts +0 -0
- /package/react/{components → app-typescript/components}/WithPagination.js +0 -0
- /package/react/{components → app-typescript/components}/WithPopover.d.ts +0 -0
- /package/react/{components → app-typescript/components}/WithPopover.js +0 -0
- /package/react/{components → app-typescript/components}/WithSizeObserver.d.ts +0 -0
- /package/react/{components → app-typescript/components}/WithSizeObserver.js +0 -0
- /package/react/{components → app-typescript/components}/_Positioner.d.ts +0 -0
- /package/react/{components → app-typescript/components}/_Positioner.js +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-action-add.d.ts +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-action-add.js +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-group.d.ts +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-group.js +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-image.d.ts +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-image.js +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-number.d.ts +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-number.js +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-placeholder.d.ts +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-placeholder.js +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-text.d.ts +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-text.js +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-wrapper.d.ts +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar-wrapper.js +0 -0
- /package/react/{components → app-typescript/components}/avatar/avatar.d.ts +0 -0
- /package/react/{components → app-typescript/components}/avatar/interfaces.d.ts +0 -0
- /package/react/{components → app-typescript/components}/avatar/interfaces.js +0 -0
- /package/react/{helpers.d.ts → app-typescript/helpers.d.ts} +0 -0
- /package/react/{helpers.js → app-typescript/helpers.js} +0 -0
- /package/react/{index.d.ts → app-typescript/index.d.ts} +0 -0
- /package/react/{index.js → app-typescript/index.js} +0 -0
@@ -4,6 +4,7 @@ import { createPopper, Instance } from '@popperjs/core';
|
|
4
4
|
import {getPrefixedItemId, TreeSelectItem} from './TreeSelect/TreeSelectItem';
|
5
5
|
import {keyboardNavigation} from './TreeSelect/KeyboardNavigation';
|
6
6
|
import {createPortal} from 'react-dom';
|
7
|
+
import {WithPortal} from './WithPortal';
|
7
8
|
|
8
9
|
interface IState<T> {
|
9
10
|
options: Array<ITreeMenuNode<T>>;
|
@@ -23,6 +24,7 @@ interface IProps<T> {
|
|
23
24
|
zIndex?: number;
|
24
25
|
searchPlaceholder?: string;
|
25
26
|
singleLevelSearch?: boolean;
|
27
|
+
'data-test-id'?: string;
|
26
28
|
getOptions?(): Array<ITreeMenuNode<T>>;
|
27
29
|
getLabel(item: T): string;
|
28
30
|
getId(item: T): string;
|
@@ -57,7 +59,7 @@ export class TreeMenu<T> extends React.Component<IProps<T>, IState<T>> {
|
|
57
59
|
private dropdownRef: React.RefObject<HTMLInputElement>;
|
58
60
|
private ref: React.RefObject<HTMLUListElement>;
|
59
61
|
private openDropdownRef: React.RefObject<HTMLDivElement>;
|
60
|
-
private
|
62
|
+
private treeMenuRef: React.RefObject<HTMLDivElement>;
|
61
63
|
private inputRef: React.RefObject<HTMLInputElement>;
|
62
64
|
private popperInstance: Instance | null;
|
63
65
|
|
@@ -80,14 +82,15 @@ export class TreeMenu<T> extends React.Component<IProps<T>, IState<T>> {
|
|
80
82
|
this.handleButton = this.handleButton.bind(this);
|
81
83
|
this.handleTree = this.handleTree.bind(this);
|
82
84
|
this.toggleMenu = this.toggleMenu.bind(this);
|
85
|
+
this.toggle = this.toggle.bind(this);
|
83
86
|
this.onMouseDown = this.onMouseDown.bind(this);
|
84
87
|
this.onKeyDown = this.onKeyDown.bind(this);
|
85
|
-
this.
|
88
|
+
this.onPressEsc = this.onPressEsc.bind(this);
|
86
89
|
|
87
90
|
this.dropdownRef = React.createRef();
|
88
91
|
this.ref = React.createRef();
|
89
92
|
this.openDropdownRef = React.createRef();
|
90
|
-
this.
|
93
|
+
this.treeMenuRef = React.createRef();
|
91
94
|
this.inputRef = React.createRef();
|
92
95
|
|
93
96
|
this.popperInstance = null;
|
@@ -105,10 +108,13 @@ export class TreeMenu<T> extends React.Component<IProps<T>, IState<T>> {
|
|
105
108
|
onMouseDown = (event: MouseEvent) => {
|
106
109
|
if (
|
107
110
|
(this.dropdownRef.current?.contains(event.target as HTMLElement) !== true)
|
108
|
-
&& (this.
|
111
|
+
&& (this.treeMenuRef.current?.contains(event.target as HTMLElement) !== true)
|
109
112
|
&& this.state.openDropdown
|
110
113
|
) {
|
111
|
-
this.setState({
|
114
|
+
this.setState({
|
115
|
+
openDropdown: false,
|
116
|
+
searchFieldValue: '',
|
117
|
+
});
|
112
118
|
}
|
113
119
|
}
|
114
120
|
|
@@ -134,16 +140,27 @@ export class TreeMenu<T> extends React.Component<IProps<T>, IState<T>> {
|
|
134
140
|
}
|
135
141
|
}
|
136
142
|
|
143
|
+
onPressEsc = (event: KeyboardEvent) => {
|
144
|
+
if (event.key === 'Escape' && this.state.openDropdown) {
|
145
|
+
this.setState({
|
146
|
+
openDropdown: false,
|
147
|
+
searchFieldValue: '',
|
148
|
+
});
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
137
152
|
componentDidMount = () => {
|
138
153
|
this.recursion(this.state.options);
|
139
154
|
|
140
155
|
document.addEventListener("mousedown", this.onMouseDown);
|
141
156
|
document.addEventListener("keydown", this.onKeyDown);
|
157
|
+
document.addEventListener("keydown", this.onPressEsc);
|
142
158
|
}
|
143
159
|
|
144
160
|
componentWillUnmount(): void {
|
145
161
|
document.removeEventListener("mousedown", this.onMouseDown);
|
146
162
|
document.removeEventListener("keydown", this.onKeyDown);
|
163
|
+
document.addEventListener("keydown", this.onPressEsc);
|
147
164
|
}
|
148
165
|
|
149
166
|
componentDidUpdate(prevProps: Readonly<IProps<T>>, prevState: Readonly<IState<T>>): void {
|
@@ -165,14 +182,6 @@ export class TreeMenu<T> extends React.Component<IProps<T>, IState<T>> {
|
|
165
182
|
if (this.openDropdownRef.current && this.dropdownRef.current) {
|
166
183
|
this.popperInstance = createPopper(this.openDropdownRef.current, this.dropdownRef.current, {
|
167
184
|
placement: 'bottom-start',
|
168
|
-
modifiers: [
|
169
|
-
{
|
170
|
-
name: 'offset',
|
171
|
-
options: {
|
172
|
-
offset: [-4, 4],
|
173
|
-
},
|
174
|
-
},
|
175
|
-
],
|
176
185
|
});
|
177
186
|
}
|
178
187
|
|
@@ -335,125 +344,121 @@ export class TreeMenu<T> extends React.Component<IProps<T>, IState<T>> {
|
|
335
344
|
|
336
345
|
render() {
|
337
346
|
return (
|
338
|
-
<div ref={this.
|
347
|
+
<div ref={this.treeMenuRef}>
|
339
348
|
<div ref={this.openDropdownRef}>
|
340
349
|
{this.props.children(this.toggle)}
|
341
350
|
</div>
|
342
351
|
|
343
|
-
{
|
344
|
-
|
345
|
-
|
352
|
+
<WithPortal active={this.state.openDropdown} data-test-id="tree-menu-popover">
|
353
|
+
<div
|
354
|
+
ref={this.dropdownRef}
|
355
|
+
className="autocomplete autocomplete--multi-select autocomplete--fixed-width"
|
356
|
+
style={{
|
357
|
+
zIndex: this.props.zIndex,
|
358
|
+
}}
|
359
|
+
>
|
360
|
+
<div className='autocomplete__header'>
|
346
361
|
<div
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
zIndex: this.props.zIndex,
|
362
|
+
className="autocomplete__icon"
|
363
|
+
onClick={() => {
|
364
|
+
this.backButton();
|
351
365
|
}}
|
352
366
|
>
|
353
|
-
<
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
367
|
+
<Icon name="search" className="search"></Icon>
|
368
|
+
</div>
|
369
|
+
|
370
|
+
<div className='autocomplete__filter'>
|
371
|
+
<input
|
372
|
+
className="autocomplete__input"
|
373
|
+
type="text"
|
374
|
+
placeholder={this.props.searchPlaceholder}
|
375
|
+
ref={this.inputRef}
|
376
|
+
value={this.state.searchFieldValue}
|
377
|
+
onChange={(event) => {
|
378
|
+
this.setState({searchFieldValue: event.target.value});
|
379
|
+
this.popperInstance?.update();
|
380
|
+
}}
|
381
|
+
/>
|
382
|
+
</div>
|
383
|
+
</div>
|
384
|
+
|
385
|
+
{(this.state.activeTree.length > 0 && this.state.buttonValue != null)
|
386
|
+
&& <div className='autocomplete__category-header'>
|
387
|
+
<div
|
388
|
+
className="autocomplete__icon"
|
389
|
+
onClick={() => {
|
390
|
+
this.backButton();
|
391
|
+
}}
|
392
|
+
>
|
393
|
+
<Icon name="arrow-left" className="arrow-left"></Icon>
|
376
394
|
</div>
|
377
395
|
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
<Icon name="arrow-left" className="arrow-left"></Icon>
|
387
|
-
</div>
|
388
|
-
|
389
|
-
<div className='autocomplete__filter'>
|
390
|
-
<button className='autocomplete__category-title'>
|
391
|
-
{this.props.optionTemplate
|
392
|
-
? this.props.optionTemplate(this.state.buttonValue.value)
|
393
|
-
: this.props.getLabel(this.state.buttonValue.value)
|
394
|
-
}
|
395
|
-
</button>
|
396
|
-
</div>
|
397
|
-
</div>
|
398
|
-
}
|
399
|
-
|
400
|
-
{this.state.searchFieldValue === '' ?
|
401
|
-
this.props.getOptions ?
|
402
|
-
<ul
|
403
|
-
ref={this.ref}
|
404
|
-
className="suggestion-list suggestion-list--multi-select"
|
405
|
-
>
|
406
|
-
{this.state.options.map((option, i: React.Key | undefined) => {
|
407
|
-
const onSelect = (item) => {
|
408
|
-
if (nodeCanBeSelected(item)) {
|
409
|
-
return item.onSelect;
|
410
|
-
}
|
411
|
-
};
|
412
|
-
|
413
|
-
const disabledItem = (item) => {
|
414
|
-
if (nodeCanBeSelected(item)) {
|
415
|
-
return item.disabled;
|
416
|
-
}
|
417
|
-
};
|
418
|
-
|
419
|
-
return (
|
420
|
-
<TreeSelectItem
|
421
|
-
key={i}
|
422
|
-
option={option}
|
423
|
-
handleTree={this.handleTree}
|
424
|
-
onClick={onSelect(option)}
|
425
|
-
disabledItem={disabledItem(option)}
|
426
|
-
getBorderColor={this.props.getBorderColor}
|
427
|
-
getBackgroundColor={this.props.getBackgroundColor}
|
428
|
-
getId={this.props.getId}
|
429
|
-
optionTemplate={this.props.optionTemplate}
|
430
|
-
getLabel={this.props.getLabel}
|
431
|
-
onKeyDown={() => this.setState({
|
432
|
-
buttonTarget: [
|
433
|
-
...this.state.buttonTarget,
|
434
|
-
this.props.getId(option.value),
|
435
|
-
],
|
436
|
-
})}
|
437
|
-
/>
|
438
|
-
);
|
439
|
-
})}
|
440
|
-
</ul>
|
441
|
-
: null
|
442
|
-
: <ul
|
443
|
-
className="suggestion-list suggestion-list--multi-select"
|
444
|
-
ref={this.ref}
|
445
|
-
>
|
446
|
-
{this.filteredItem(
|
447
|
-
this.props.singleLevelSearch
|
448
|
-
? this.state.options
|
449
|
-
: this.state.filterArr,
|
450
|
-
)}
|
451
|
-
</ul>
|
452
|
-
}
|
396
|
+
<div className='autocomplete__filter'>
|
397
|
+
<button className='autocomplete__category-title'>
|
398
|
+
{this.props.optionTemplate
|
399
|
+
? this.props.optionTemplate(this.state.buttonValue.value)
|
400
|
+
: this.props.getLabel(this.state.buttonValue.value)
|
401
|
+
}
|
402
|
+
</button>
|
403
|
+
</div>
|
453
404
|
</div>
|
454
|
-
|
455
|
-
|
456
|
-
|
405
|
+
}
|
406
|
+
|
407
|
+
{this.state.searchFieldValue === '' ?
|
408
|
+
this.props.getOptions ?
|
409
|
+
<ul
|
410
|
+
ref={this.ref}
|
411
|
+
className="suggestion-list suggestion-list--multi-select"
|
412
|
+
>
|
413
|
+
{this.state.options.map((option, i: React.Key | undefined) => {
|
414
|
+
const onSelect = (item) => {
|
415
|
+
if (nodeCanBeSelected(item)) {
|
416
|
+
return item.onSelect;
|
417
|
+
}
|
418
|
+
};
|
419
|
+
|
420
|
+
const disabledItem = (item) => {
|
421
|
+
if (nodeCanBeSelected(item)) {
|
422
|
+
return item.disabled;
|
423
|
+
}
|
424
|
+
};
|
425
|
+
|
426
|
+
return (
|
427
|
+
<TreeSelectItem
|
428
|
+
key={i}
|
429
|
+
option={option}
|
430
|
+
handleTree={this.handleTree}
|
431
|
+
onClick={onSelect(option)}
|
432
|
+
disabledItem={disabledItem(option)}
|
433
|
+
getBorderColor={this.props.getBorderColor}
|
434
|
+
getBackgroundColor={this.props.getBackgroundColor}
|
435
|
+
getId={this.props.getId}
|
436
|
+
optionTemplate={this.props.optionTemplate}
|
437
|
+
getLabel={this.props.getLabel}
|
438
|
+
onKeyDown={() => this.setState({
|
439
|
+
buttonTarget: [
|
440
|
+
...this.state.buttonTarget,
|
441
|
+
this.props.getId(option.value),
|
442
|
+
],
|
443
|
+
})}
|
444
|
+
/>
|
445
|
+
);
|
446
|
+
})}
|
447
|
+
</ul>
|
448
|
+
: null
|
449
|
+
: <ul
|
450
|
+
className="suggestion-list suggestion-list--multi-select"
|
451
|
+
ref={this.ref}
|
452
|
+
>
|
453
|
+
{this.filteredItem(
|
454
|
+
this.props.singleLevelSearch
|
455
|
+
? this.state.options
|
456
|
+
: this.state.filterArr,
|
457
|
+
)}
|
458
|
+
</ul>
|
459
|
+
}
|
460
|
+
</div>
|
461
|
+
</WithPortal>
|
457
462
|
</div>
|
458
463
|
);
|
459
464
|
}
|