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
@@ -12,7 +12,7 @@ import {SelectPreview} from '../SelectPreview';
|
|
12
12
|
import {TreeSelectPill} from './TreeSelectPill';
|
13
13
|
import {getPrefixedItemId, TreeSelectItem} from './TreeSelectItem';
|
14
14
|
import {keyboardNavigation} from './KeyboardNavigation';
|
15
|
-
import {
|
15
|
+
import {WithPortal} from '../WithPortal';
|
16
16
|
|
17
17
|
interface IState<T> {
|
18
18
|
value: Array<T>;
|
@@ -35,7 +35,7 @@ interface IPropsBase<T> extends IInputWrapper {
|
|
35
35
|
value?: Array<T>;
|
36
36
|
selectBranchWithChildren?: boolean;
|
37
37
|
readOnly?: boolean;
|
38
|
-
|
38
|
+
width?: 'medium' | 'match-input';
|
39
39
|
inputWidth?: '100%';
|
40
40
|
allowMultiple?: boolean;
|
41
41
|
loading?: boolean;
|
@@ -43,6 +43,7 @@ interface IPropsBase<T> extends IInputWrapper {
|
|
43
43
|
placeholder?: string;
|
44
44
|
searchPlaceholder?: string;
|
45
45
|
zIndex?: number;
|
46
|
+
'data-test-id'?: string;
|
46
47
|
getLabel(item: T): string;
|
47
48
|
getId(item: T): string;
|
48
49
|
getBackgroundColor?(item: T): string;
|
@@ -50,7 +51,6 @@ interface IPropsBase<T> extends IInputWrapper {
|
|
50
51
|
optionTemplate?(item: T): React.ComponentType<T> | JSX.Element;
|
51
52
|
valueTemplate?(item: T, Wrapper: React.ElementType): React.ComponentType<T> | JSX.Element;
|
52
53
|
onChange(e: Array<T>): void;
|
53
|
-
'data-test-id'?: string;
|
54
54
|
}
|
55
55
|
|
56
56
|
interface IPropsSync<T> extends IPropsBase<T> {
|
@@ -111,6 +111,8 @@ export class TreeSelect<T> extends React.Component<IProps<T>, IState<T>> {
|
|
111
111
|
this.toggleMenu = this.toggleMenu.bind(this);
|
112
112
|
this.onMouseDown = this.onMouseDown.bind(this);
|
113
113
|
this.onKeyDown = this.onKeyDown.bind(this);
|
114
|
+
this.onPressEsc = this.onPressEsc.bind(this);
|
115
|
+
|
114
116
|
this.dropdownRef = React.createRef();
|
115
117
|
this.ref = React.createRef();
|
116
118
|
this.inputRef = React.createRef();
|
@@ -139,7 +141,10 @@ export class TreeSelect<T> extends React.Component<IProps<T>, IState<T>> {
|
|
139
141
|
&& (this.treeSelectRef.current?.contains(event.target as HTMLElement) !== true)
|
140
142
|
&& this.state.openDropdown
|
141
143
|
) {
|
142
|
-
this.setState({
|
144
|
+
this.setState({
|
145
|
+
openDropdown: false,
|
146
|
+
searchFieldValue: '',
|
147
|
+
});
|
143
148
|
}
|
144
149
|
}
|
145
150
|
|
@@ -165,16 +170,27 @@ export class TreeSelect<T> extends React.Component<IProps<T>, IState<T>> {
|
|
165
170
|
}
|
166
171
|
}
|
167
172
|
|
173
|
+
onPressEsc = (event: KeyboardEvent) => {
|
174
|
+
if (event.key === 'Escape' && this.state.openDropdown) {
|
175
|
+
this.setState({
|
176
|
+
openDropdown: false,
|
177
|
+
searchFieldValue: '',
|
178
|
+
});
|
179
|
+
}
|
180
|
+
}
|
181
|
+
|
168
182
|
componentDidMount = () => {
|
169
183
|
this.recursion(this.state.options);
|
170
184
|
|
171
185
|
document.addEventListener("mousedown", this.onMouseDown);
|
172
186
|
document.addEventListener("keydown", this.onKeyDown);
|
187
|
+
document.addEventListener("keydown", this.onPressEsc);
|
173
188
|
}
|
174
189
|
|
175
190
|
componentWillUnmount(): void {
|
176
191
|
document.removeEventListener("mousedown", this.onMouseDown);
|
177
192
|
document.removeEventListener("keydown", this.onKeyDown);
|
193
|
+
document.addEventListener("keydown", this.onPressEsc);
|
178
194
|
}
|
179
195
|
|
180
196
|
componentDidUpdate(prevProps: Readonly<IProps<T>>, prevState: Readonly<IState<T>>): void {
|
@@ -203,17 +219,9 @@ export class TreeSelect<T> extends React.Component<IProps<T>, IState<T>> {
|
|
203
219
|
|
204
220
|
toggleMenu() {
|
205
221
|
if (this.state.openDropdown) {
|
206
|
-
if (this.
|
207
|
-
this.popperInstance = createPopper(this.
|
222
|
+
if (this.treeSelectRef.current && this.dropdownRef.current) {
|
223
|
+
this.popperInstance = createPopper(this.treeSelectRef.current, this.dropdownRef.current, {
|
208
224
|
placement: 'bottom-start',
|
209
|
-
modifiers: [
|
210
|
-
{
|
211
|
-
name: 'offset',
|
212
|
-
options: {
|
213
|
-
offset: [-4, 4],
|
214
|
-
},
|
215
|
-
},
|
216
|
-
],
|
217
225
|
});
|
218
226
|
}
|
219
227
|
|
@@ -632,7 +640,10 @@ export class TreeSelect<T> extends React.Component<IProps<T>, IState<T>> {
|
|
632
640
|
data-test-id={this.props['data-test-id']}
|
633
641
|
>
|
634
642
|
<div
|
635
|
-
className={`
|
643
|
+
className={`
|
644
|
+
tags-input sd-input__input
|
645
|
+
tags-input--${this.props.allowMultiple ? 'multi-select' : 'single-select'}`
|
646
|
+
}
|
636
647
|
ref={this.treeSelectRef}
|
637
648
|
data-test-id={this.props.allowMultiple ? undefined : 'open-popover'}
|
638
649
|
>
|
@@ -641,12 +652,18 @@ export class TreeSelect<T> extends React.Component<IProps<T>, IState<T>> {
|
|
641
652
|
{this.props.readOnly
|
642
653
|
|| <button
|
643
654
|
ref={this.openDropdownRef}
|
644
|
-
className={`
|
655
|
+
className={`
|
656
|
+
tags-input__add-button
|
657
|
+
${this.props.disabled ? 'tags-input__add-button--disabled' : ''}`
|
658
|
+
}
|
645
659
|
onClick={(e) => {
|
646
660
|
e.stopPropagation();
|
647
661
|
|
648
662
|
if (!this.props.disabled) {
|
649
|
-
this.setState({
|
663
|
+
this.setState({
|
664
|
+
openDropdown: !this.state.openDropdown,
|
665
|
+
searchFieldValue: '',
|
666
|
+
});
|
650
667
|
}
|
651
668
|
}}
|
652
669
|
data-test-id="open-popover"
|
@@ -760,7 +777,10 @@ export class TreeSelect<T> extends React.Component<IProps<T>, IState<T>> {
|
|
760
777
|
|
761
778
|
{
|
762
779
|
(this.props.readOnly !== true && this.props.required !== true) && (
|
763
|
-
<span
|
780
|
+
<span
|
781
|
+
className="tags-input__remove-button"
|
782
|
+
data-test-id="clear-value"
|
783
|
+
>
|
764
784
|
<Icon name='remove-sign'></Icon>
|
765
785
|
</span>
|
766
786
|
)
|
@@ -784,136 +804,132 @@ export class TreeSelect<T> extends React.Component<IProps<T>, IState<T>> {
|
|
784
804
|
}
|
785
805
|
</div>
|
786
806
|
|
787
|
-
{
|
788
|
-
|
789
|
-
|
807
|
+
<WithPortal active={this.state.openDropdown} data-test-id="tree-select-popover">
|
808
|
+
<div
|
809
|
+
className={
|
810
|
+
"autocomplete autocomplete--multi-select"
|
811
|
+
+ (this.props.width === 'medium' ? ' autocomplete--fixed-width' : '')
|
812
|
+
}
|
813
|
+
style={{
|
814
|
+
zIndex: this.props.zIndex,
|
815
|
+
width: this.treeSelectRef.current?.offsetWidth,
|
816
|
+
}}
|
817
|
+
ref={this.dropdownRef}
|
818
|
+
>
|
819
|
+
<div className='autocomplete__header'>
|
790
820
|
<div
|
791
|
-
className=
|
792
|
-
|
793
|
-
|
794
|
-
}
|
795
|
-
style={{
|
796
|
-
zIndex: this.props.zIndex,
|
797
|
-
width: this.treeSelectRef.current?.offsetWidth,
|
821
|
+
className="autocomplete__icon"
|
822
|
+
onClick={() => {
|
823
|
+
this.backButton();
|
798
824
|
}}
|
799
|
-
ref={this.dropdownRef}
|
800
825
|
>
|
801
|
-
<
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
826
|
+
<Icon name="search" className="search"></Icon>
|
827
|
+
</div>
|
828
|
+
|
829
|
+
<div className='autocomplete__filter'>
|
830
|
+
<input
|
831
|
+
className="autocomplete__input"
|
832
|
+
type="text"
|
833
|
+
placeholder={this.props.searchPlaceholder}
|
834
|
+
ref={this.inputRef}
|
835
|
+
value={this.state.searchFieldValue}
|
836
|
+
onChange={(event) => {
|
837
|
+
if (this.props.kind === 'synchronous') {
|
838
|
+
this.setState({searchFieldValue: event.target.value});
|
839
|
+
this.popperInstance?.update();
|
840
|
+
} else if (this.props.kind === 'asynchronous') {
|
841
|
+
if (this.ICancelFn) {
|
842
|
+
this.ICancelFn();
|
843
|
+
}
|
844
|
+
|
845
|
+
this.setState({searchFieldValue: event.target.value, options: []});
|
846
|
+
this.popperInstance?.update();
|
847
|
+
this.debounceFn();
|
848
|
+
} else {
|
849
|
+
return;
|
850
|
+
}
|
851
|
+
}}
|
852
|
+
data-test-id="filter-input"
|
853
|
+
/>
|
854
|
+
</div>
|
855
|
+
</div>
|
856
|
+
|
857
|
+
{(this.state.activeTree.length > 0 && this.state.buttonValue != null)
|
858
|
+
&& <div className='autocomplete__category-header'>
|
859
|
+
<div
|
860
|
+
className="autocomplete__icon"
|
861
|
+
onClick={() => {
|
862
|
+
this.backButton();
|
863
|
+
}}
|
864
|
+
>
|
865
|
+
<Icon name="arrow-left" className="arrow-left"></Icon>
|
837
866
|
</div>
|
838
867
|
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
>
|
847
|
-
<Icon name="arrow-left" className="arrow-left"></Icon>
|
848
|
-
</div>
|
849
|
-
|
850
|
-
<div className='autocomplete__filter'>
|
851
|
-
<button className='autocomplete__category-title'>
|
852
|
-
{this.props.optionTemplate
|
853
|
-
? this.props.optionTemplate(this.state.buttonValue.value)
|
854
|
-
: this.props.getLabel(this.state.buttonValue.value)
|
855
|
-
}
|
856
|
-
</button>
|
868
|
+
<div className='autocomplete__filter'>
|
869
|
+
<button className='autocomplete__category-title'>
|
870
|
+
{this.props.optionTemplate
|
871
|
+
? this.props.optionTemplate(this.state.buttonValue.value)
|
872
|
+
: this.props.getLabel(this.state.buttonValue.value)
|
873
|
+
}
|
874
|
+
</button>
|
857
875
|
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
</div>
|
863
|
-
}
|
864
|
-
|
865
|
-
{this.state.loading
|
866
|
-
? <ul className="suggestion-list--loader"><Loader overlay={true}></Loader></ul>
|
867
|
-
: this.state.searchFieldValue === ''
|
868
|
-
? this.props.getOptions
|
869
|
-
? <ul
|
870
|
-
className="suggestion-list suggestion-list--multi-select"
|
871
|
-
ref={this.ref}
|
872
|
-
data-test-id="options"
|
873
|
-
>
|
874
|
-
{this.state.options.map((option, i: React.Key | undefined) => {
|
875
|
-
let selectedItem = this.state.value.some((obj) =>
|
876
|
-
this.props.getId(obj) === this.props.getId(option.value),
|
877
|
-
);
|
878
|
-
|
879
|
-
return (
|
880
|
-
<TreeSelectItem
|
881
|
-
key={i}
|
882
|
-
option={option}
|
883
|
-
handleTree={this.handleTree}
|
884
|
-
selectedItem={selectedItem}
|
885
|
-
allowMultiple={this.props.allowMultiple}
|
886
|
-
getBorderColor={this.props.getBorderColor}
|
887
|
-
getBackgroundColor={this.props.getBackgroundColor}
|
888
|
-
getId={this.props.getId}
|
889
|
-
optionTemplate={this.props.optionTemplate}
|
890
|
-
getLabel={this.props.getLabel}
|
891
|
-
onKeyDown={() => this.setState({
|
892
|
-
buttonTarget: [
|
893
|
-
...this.state.buttonTarget,
|
894
|
-
this.props.getId(option.value),
|
895
|
-
],
|
896
|
-
})}
|
897
|
-
/>
|
898
|
-
);
|
899
|
-
})}
|
900
|
-
</ul>
|
901
|
-
: null
|
902
|
-
: <ul
|
903
|
-
className="suggestion-list suggestion-list--multi-select"
|
904
|
-
ref={this.ref}
|
905
|
-
>
|
906
|
-
{this.filteredItem(
|
907
|
-
this.props.singleLevelSearch
|
908
|
-
? this.state.options
|
909
|
-
: this.state.filterArr,
|
910
|
-
)}
|
911
|
-
</ul>
|
912
|
-
}
|
876
|
+
{this.props.selectBranchWithChildren
|
877
|
+
&& this.branchButton(this.state.buttonValue)
|
878
|
+
}
|
879
|
+
</div>
|
913
880
|
</div>
|
914
|
-
|
915
|
-
|
916
|
-
|
881
|
+
}
|
882
|
+
|
883
|
+
{this.state.loading
|
884
|
+
? <ul className="suggestion-list--loader"><Loader overlay={true}></Loader></ul>
|
885
|
+
: this.state.searchFieldValue === ''
|
886
|
+
? this.props.getOptions
|
887
|
+
? <ul
|
888
|
+
className="suggestion-list suggestion-list--multi-select"
|
889
|
+
ref={this.ref}
|
890
|
+
data-test-id="options"
|
891
|
+
>
|
892
|
+
{this.state.options.map((option, i: React.Key | undefined) => {
|
893
|
+
let selectedItem = this.state.value.some((obj) =>
|
894
|
+
this.props.getId(obj) === this.props.getId(option.value),
|
895
|
+
);
|
896
|
+
|
897
|
+
return (
|
898
|
+
<TreeSelectItem
|
899
|
+
key={i}
|
900
|
+
option={option}
|
901
|
+
handleTree={this.handleTree}
|
902
|
+
selectedItem={selectedItem}
|
903
|
+
allowMultiple={this.props.allowMultiple}
|
904
|
+
getBorderColor={this.props.getBorderColor}
|
905
|
+
getBackgroundColor={this.props.getBackgroundColor}
|
906
|
+
getId={this.props.getId}
|
907
|
+
optionTemplate={this.props.optionTemplate}
|
908
|
+
getLabel={this.props.getLabel}
|
909
|
+
onKeyDown={() => this.setState({
|
910
|
+
buttonTarget: [
|
911
|
+
...this.state.buttonTarget,
|
912
|
+
this.props.getId(option.value),
|
913
|
+
],
|
914
|
+
})}
|
915
|
+
/>
|
916
|
+
);
|
917
|
+
})}
|
918
|
+
</ul>
|
919
|
+
: null
|
920
|
+
: <ul
|
921
|
+
className="suggestion-list suggestion-list--multi-select"
|
922
|
+
ref={this.ref}
|
923
|
+
>
|
924
|
+
{this.filteredItem(
|
925
|
+
this.props.singleLevelSearch
|
926
|
+
? this.state.options
|
927
|
+
: this.state.filterArr,
|
928
|
+
)}
|
929
|
+
</ul>
|
930
|
+
}
|
931
|
+
</div>
|
932
|
+
</WithPortal>
|
917
933
|
</InputWrapper>
|
918
934
|
);
|
919
935
|
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import {createPortal} from 'react-dom';
|
3
|
+
|
4
|
+
interface IProps {
|
5
|
+
active: boolean;
|
6
|
+
'data-test-id'?: string;
|
7
|
+
}
|
8
|
+
|
9
|
+
export function findParent(
|
10
|
+
element: HTMLElement | null,
|
11
|
+
) {
|
12
|
+
let dataTheme = element;
|
13
|
+
|
14
|
+
while (dataTheme != null && dataTheme?.getAttribute('data-theme') == null) {
|
15
|
+
dataTheme = dataTheme.parentElement ?? null;
|
16
|
+
}
|
17
|
+
|
18
|
+
return dataTheme;
|
19
|
+
}
|
20
|
+
|
21
|
+
export class WithPortal extends React.Component<IProps> {
|
22
|
+
private ref: React.RefObject<HTMLDivElement>;
|
23
|
+
private dataTheme: string | undefined;
|
24
|
+
|
25
|
+
constructor(props: IProps) {
|
26
|
+
super(props);
|
27
|
+
|
28
|
+
this.ref = React.createRef();
|
29
|
+
}
|
30
|
+
|
31
|
+
componentDidMount(): void {
|
32
|
+
this.dataTheme = findParent(this.ref.current)?.getAttribute('data-theme') ?? undefined;
|
33
|
+
}
|
34
|
+
|
35
|
+
render() {
|
36
|
+
return (
|
37
|
+
<div ref={this.ref}>
|
38
|
+
{this.props.active && (
|
39
|
+
createPortal(
|
40
|
+
<div data-theme={this.dataTheme} data-test-id={this.props['data-test-id']}>
|
41
|
+
{this.props.children}
|
42
|
+
</div>,
|
43
|
+
document.body,
|
44
|
+
)
|
45
|
+
)}
|
46
|
+
</div>
|
47
|
+
);
|
48
|
+
}
|
49
|
+
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import {IPropsBase} from './interfaces';
|
3
|
+
// tslint:disable-next-line:max-line-length
|
3
4
|
|
4
5
|
interface IPropsImageAvatar extends IPropsBase {
|
5
6
|
imageUrl?: string | null; // defaults to a placeholder image
|
@@ -24,6 +25,7 @@ export class AvatarContentImage extends React.PureComponent<IPropsImageAvatar> {
|
|
24
25
|
>
|
25
26
|
<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
26
27
|
<circle cx="100" cy="100" r="100" fill="white" fillOpacity="0.01"/>
|
28
|
+
{/* tslint:disable-next-line:max-line-length */}
|
27
29
|
<path fillRule="evenodd" clipRule="evenodd" d="M40 153V145.384C40 141.557 41.16 137.981 43.16 135C49.14 126.057 66.24 119.711 77.14 118C82.74 117.115 90.16 116.538 100 116.538C109.84 116.538 117.26 117.115 122.86 118C133.76 119.711 150.86 126.057 156.84 135C158.84 137.981 160 141.557 160 145.384V153C150 165 130 180 100 180C70 180 50 165 40 153ZM100 30C122.08 30 140 47.2307 140 68.4614C140 89.6922 122.08 106.923 100 106.923C77.92 106.923 60 89.6922 60 68.4614C60 47.2307 77.92 30 100 30Z" fill="var(--sd-colour-avatar-dummy)" fillOpacity="1"/>
|
28
30
|
</svg>
|
29
31
|
</span>);
|
@@ -46,7 +46,8 @@ export class Avatar extends React.PureComponent<IPropsAvatar> {
|
|
46
46
|
customContent,
|
47
47
|
} = this.props;
|
48
48
|
|
49
|
-
const tooltipCombined = [displayName, this.props.tooltip]
|
49
|
+
const tooltipCombined = [displayName, this.props.tooltip]
|
50
|
+
.filter((str) => (str ?? '').trim().length > 0).join('\n');
|
50
51
|
|
51
52
|
return (
|
52
53
|
<AvatarWrapper
|