superdesk-ui-framework 3.0.1-beta.2 → 3.0.1-beta.22
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/.vscode/settings.json +5 -0
- package/app/fonts/sd_icons.eot +0 -0
- package/app/fonts/sd_icons.svg +14 -7
- package/app/fonts/sd_icons.ttf +0 -0
- package/app/fonts/sd_icons.woff +0 -0
- package/app/img/SD-logo.svg +52 -0
- package/app/scripts/toggleBoxNext.js +1 -1
- package/app/styles/_accessibility.scss +1 -0
- package/app/styles/_big-icon-font.scss +3 -0
- package/app/styles/_boxed-list.scss +3 -0
- package/app/styles/_buttons.scss +11 -6
- package/app/styles/_content-divider.scss +63 -8
- package/app/styles/_hamburger.scss +160 -0
- package/app/styles/_helpers.scss +35 -5
- package/app/styles/_icon-font.scss +20 -10
- package/app/styles/_master-desk.scss +3 -2
- package/app/styles/_modals.scss +6 -3
- package/app/styles/_normalize.scss +4 -0
- package/app/styles/_sd-tag-input.scss +221 -296
- package/app/styles/_simple-list.scss +1 -0
- package/app/styles/_table-list.scss +115 -12
- package/app/styles/app.scss +4 -0
- package/app/styles/components/_list-item.scss +36 -17
- package/app/styles/components/_sd-collapse-box.scss +6 -6
- package/app/styles/components/_sd-grid-item.scss +30 -16
- package/app/styles/components/_sd-notification-panel.scss +48 -0
- package/app/styles/components/_sd-photo-preview.scss +3 -3
- package/app/styles/components/_sd-searchbar.scss +7 -0
- package/app/styles/design-tokens/_design-tokens-general.scss +3 -6
- package/app/styles/design-tokens/_new-colors.scss +16 -6
- package/app/styles/dropdowns/_basic-dropdown.scss +6 -0
- package/app/styles/form-elements/_forms-general.scss +81 -7
- package/app/styles/form-elements/_input-wrap.scss +138 -0
- package/app/styles/form-elements/_inputs.scss +577 -102
- package/app/styles/grids/_grid-layout.scss +153 -40
- package/app/styles/interface-elements/_side-panel.scss +1 -1
- package/app/styles/layout/_basic-layout.scss +2 -2
- package/app/styles/layout/_editor.scss +10 -4
- package/app/styles/menus/_sd-bottom-tabs.scss +70 -0
- package/app/styles/menus/_sd-left-navigation.scss +24 -1
- package/app/styles/menus/_sd-sidebar-menu.scss +10 -14
- package/app/styles/menus/_sd-top-menu.scss +19 -5
- package/app/styles/primereact/_pr-dialog.scss +1 -0
- package/app/styles/primereact/_pr-dropdown.scss +17 -3
- package/app/styles/primereact/_pr-menu.scss +6 -5
- package/app-typescript/components/Badge.tsx +3 -2
- package/app-typescript/components/ContentDivider.tsx +3 -0
- package/app-typescript/components/DatePicker.tsx +71 -36
- package/app-typescript/components/DonutChart.tsx +1 -1
- package/app-typescript/components/Dropdown.tsx +127 -82
- package/app-typescript/components/DurationInput.tsx +400 -0
- package/app-typescript/components/EmptyState.tsx +2 -1
- package/app-typescript/components/Form/FormLabel.tsx +8 -1
- package/app-typescript/components/Form/FormRowNew.tsx +41 -0
- package/app-typescript/components/Form/InputBase.tsx +95 -0
- package/app-typescript/components/Form/InputNew.tsx +107 -0
- package/app-typescript/components/Form/InputWrapper.tsx +79 -0
- package/app-typescript/components/Form/index.tsx +4 -0
- package/app-typescript/components/Icon.tsx +1 -1
- package/app-typescript/components/IconButton.tsx +5 -1
- package/app-typescript/components/Input.tsx +39 -42
- package/app-typescript/components/Label.tsx +49 -10
- package/app-typescript/components/Layouts/AuthoringContainer.tsx +2 -1
- package/app-typescript/components/Layouts/AuthoringInnerHeader.tsx +1 -1
- package/app-typescript/components/Layouts/AuthoringMain.tsx +4 -2
- package/app-typescript/components/Layouts/BottomBarAction.tsx +35 -0
- package/app-typescript/components/Layouts/CoreLayout.tsx +63 -0
- package/app-typescript/components/Layouts/CoreLayoutContainer.tsx +16 -0
- package/app-typescript/components/Layouts/CoreLayoutFooter.tsx +15 -0
- package/app-typescript/components/Layouts/CoreLayoutMain.tsx +22 -0
- package/app-typescript/components/Layouts/CoreLayoutOverlay.tsx +15 -0
- package/app-typescript/components/Layouts/CoreLayoutSlideInMenu.tsx +24 -0
- package/app-typescript/components/Layouts/CoreLayoutTopMenu.tsx +35 -0
- package/app-typescript/components/Layouts/HamburgerButton.tsx +41 -0
- package/app-typescript/components/Layouts/Layout.tsx +2 -2
- package/app-typescript/components/Layouts/MainMenu.tsx +101 -0
- package/app-typescript/components/Layouts/NotificationPanel.tsx +109 -0
- package/app-typescript/components/Layouts/index.tsx +12 -0
- package/app-typescript/components/LeftMenu.tsx +127 -116
- package/app-typescript/components/Lists/BoxedList.tsx +36 -4
- package/app-typescript/components/Lists/ContentList.tsx +38 -10
- package/app-typescript/components/Lists/TableList.tsx +283 -151
- package/app-typescript/components/Menu.tsx +31 -7
- package/app-typescript/components/Modal.tsx +5 -2
- package/app-typescript/components/MultiSelect.tsx +35 -5
- package/app-typescript/components/NavButton.tsx +4 -0
- package/app-typescript/components/Navigation/BottomNav.tsx +83 -0
- package/app-typescript/components/SearchBar.tsx +39 -12
- package/app-typescript/components/Select.tsx +27 -37
- package/app-typescript/components/SelectGrid.tsx +1 -1
- package/app-typescript/components/SelectWithTemplate.tsx +32 -7
- package/app-typescript/components/Skeleton.tsx +1 -1
- package/app-typescript/components/Spacer.tsx +87 -0
- package/app-typescript/components/Text/Time.tsx +34 -0
- package/app-typescript/components/TimePicker.tsx +38 -15
- package/app-typescript/components/Togglebox.tsx +1 -1
- package/app-typescript/components/Tooltip.tsx +7 -5
- package/app-typescript/components/TreeSelect.tsx +490 -208
- package/app-typescript/components/WithSizeObserver.tsx +88 -0
- package/app-typescript/dist/components/Alert.d.ts +16 -0
- package/app-typescript/dist/components/Autocomplete.d.ts +48 -0
- package/app-typescript/dist/components/Avatar.d.ts +33 -0
- package/app-typescript/dist/components/Badge.d.ts +13 -0
- package/app-typescript/dist/components/Button.d.ts +23 -0
- package/app-typescript/dist/components/ButtonGroup.d.ts +12 -0
- package/app-typescript/dist/components/CheckButtonGroup.d.ts +11 -0
- package/app-typescript/dist/components/CheckGroup.d.ts +9 -0
- package/app-typescript/dist/components/Checkbox.d.ts +19 -0
- package/app-typescript/dist/components/CheckboxButton.d.ts +19 -0
- package/app-typescript/dist/components/DatePicker.d.ts +37 -0
- package/app-typescript/dist/components/Divider.d.ts +9 -0
- package/app-typescript/dist/components/DonutChart.d.ts +12 -0
- package/app-typescript/dist/components/Dropdown.d.ts +28 -0
- package/app-typescript/dist/components/DropdownFirst.d.ts +42 -0
- package/app-typescript/dist/components/EmptyState.d.ts +11 -0
- package/app-typescript/dist/components/FormLabel.d.ts +9 -0
- package/app-typescript/dist/components/Genie.d.ts +13 -0
- package/app-typescript/dist/components/GridItem.d.ts +69 -0
- package/app-typescript/dist/components/GridList.d.ts +14 -0
- package/app-typescript/dist/components/HeadingText.d.ts +10 -0
- package/app-typescript/dist/components/HelloWorld.d.ts +8 -0
- package/app-typescript/dist/components/Icon.d.ts +12 -0
- package/app-typescript/dist/components/IconButton.d.ts +12 -0
- package/app-typescript/dist/components/IconLabel.d.ts +11 -0
- package/app-typescript/dist/components/Input.d.ts +24 -0
- package/app-typescript/dist/components/Label.d.ts +15 -0
- package/app-typescript/dist/components/LeftMenu.d.ts +26 -0
- package/app-typescript/dist/components/Loader.d.ts +8 -0
- package/app-typescript/dist/components/NavButton.d.ts +15 -0
- package/app-typescript/dist/components/Popover.d.ts +13 -0
- package/app-typescript/dist/components/PropsList.d.ts +15 -0
- package/app-typescript/dist/components/Radio.d.ts +19 -0
- package/app-typescript/dist/components/RadioButton.d.ts +20 -0
- package/app-typescript/dist/components/Select.d.ts +29 -0
- package/app-typescript/dist/components/SelectWithTemplate.d.ts +32 -0
- package/app-typescript/dist/components/SlidingToolbar.d.ts +8 -0
- package/app-typescript/dist/components/StrechBar.d.ts +4 -0
- package/app-typescript/dist/components/SubNav.d.ts +10 -0
- package/app-typescript/dist/components/Switch.d.ts +12 -0
- package/app-typescript/dist/components/TabCustom.d.ts +25 -0
- package/app-typescript/dist/components/TabList.d.ts +22 -0
- package/app-typescript/dist/components/Tag.d.ts +9 -0
- package/app-typescript/dist/components/TagInput.d.ts +7 -0
- package/app-typescript/dist/components/TagInputTest.d.ts +18 -0
- package/app-typescript/dist/components/TimePicker.d.ts +11 -0
- package/app-typescript/dist/components/Tooltip.d.ts +11 -0
- package/app-typescript/dist/components/_Positioner.d.ts +27 -0
- package/app-typescript/dist/index.d.ts +56 -0
- package/app-typescript/helpers.tsx +3 -0
- package/app-typescript/index.ts +9 -1
- package/dist/SD-logo.svg +52 -0
- package/dist/examples.bundle.css +942 -9
- package/dist/examples.bundle.js +92935 -88376
- package/dist/playgrounds/accessible-theme-test.html +1 -1
- package/dist/playgrounds/layout-test-2.html +1 -1
- package/dist/playgrounds/list-item-test.html +1 -1
- package/dist/playgrounds/master-desk.html +1 -1
- package/dist/playgrounds/media-carousel.html +1 -1
- package/dist/playgrounds/photo-desk.html +1 -1
- package/dist/playgrounds/planning.html +1 -1
- package/dist/playgrounds/publish.html +1 -1
- package/dist/playgrounds/publisher-content-analytics.html +1 -1
- package/dist/playgrounds/publisher-content-list-automatic.html +1 -1
- package/dist/playgrounds/publisher-content-list-manual.html +1 -1
- package/dist/playgrounds/publisher-content-lists.html +1 -1
- package/dist/playgrounds/publisher-dashboard.html +1 -1
- package/dist/playgrounds/publisher-output-control.html +1 -1
- package/dist/playgrounds/react-playgrounds/CoreLayout.tsx +156 -0
- package/dist/playgrounds/react-playgrounds/Index.tsx +1 -0
- package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +26 -23
- package/dist/playgrounds/react-playgrounds/Rundowns.tsx +20 -21
- package/dist/playgrounds/react-playgrounds/SamsPlayground.tsx +12 -3
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +415 -25
- package/dist/playgrounds/react-playgrounds/components/Layout.tsx +2 -2
- package/dist/playgrounds/swimlane-view.html +1 -1
- package/dist/playgrounds/toasts.html +1 -1
- package/dist/playgrounds/video-editor.html +1 -1
- package/dist/react/Badges.tsx +18 -0
- package/dist/react/ContentDivider.tsx +22 -18
- package/dist/react/ContentList.tsx +200 -18
- package/dist/react/DatePicker.tsx +31 -6
- package/dist/react/Dropdowns.tsx +580 -48
- package/dist/react/DurationInput.tsx +108 -0
- package/dist/react/Index.tsx +10 -0
- package/dist/react/Inputs.tsx +256 -8
- package/dist/react/Labels.tsx +51 -1
- package/dist/react/LeftNavigations.tsx +71 -44
- package/dist/react/MultiSelect.tsx +10 -2
- package/dist/react/SelectWithTemplate.tsx +6 -1
- package/dist/react/Selects.tsx +55 -0
- package/dist/react/TableList.tsx +77 -186
- package/dist/react/TimePicker.tsx +22 -12
- package/dist/react/Togglebox.tsx +1 -1
- package/dist/react/TreeSelect.tsx +270 -48
- package/dist/react/WithSizeObserver.tsx +44 -0
- package/dist/react/tree-select/TreeSelect.tsx +273 -0
- package/dist/react/tree-select/example-1.tsx +71 -0
- package/dist/react/tree-select/example-2.tsx +59 -0
- package/dist/sd_icons.eot +0 -0
- package/dist/sd_icons.svg +14 -7
- package/dist/sd_icons.ttf +0 -0
- package/dist/sd_icons.woff +0 -0
- package/dist/superdesk-ui.bundle.css +4330 -639
- package/dist/superdesk-ui.bundle.js +75169 -58238
- package/dist/vendor.bundle.js +25027 -25027
- package/examples/index.js +4 -0
- package/examples/pages/playgrounds/accessible-theme-test.html +1 -1
- package/examples/pages/playgrounds/layout-test-2.html +1 -1
- package/examples/pages/playgrounds/list-item-test.html +1 -1
- package/examples/pages/playgrounds/master-desk.html +1 -1
- package/examples/pages/playgrounds/media-carousel.html +1 -1
- package/examples/pages/playgrounds/photo-desk.html +1 -1
- package/examples/pages/playgrounds/planning.html +1 -1
- package/examples/pages/playgrounds/publish.html +1 -1
- package/examples/pages/playgrounds/publisher-content-analytics.html +1 -1
- package/examples/pages/playgrounds/publisher-content-list-automatic.html +1 -1
- package/examples/pages/playgrounds/publisher-content-list-manual.html +1 -1
- package/examples/pages/playgrounds/publisher-content-lists.html +1 -1
- package/examples/pages/playgrounds/publisher-dashboard.html +1 -1
- package/examples/pages/playgrounds/publisher-output-control.html +1 -1
- package/examples/pages/playgrounds/react-playgrounds/CoreLayout.tsx +156 -0
- package/examples/pages/playgrounds/react-playgrounds/Index.tsx +1 -0
- package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +26 -23
- package/examples/pages/playgrounds/react-playgrounds/Rundowns.tsx +20 -21
- package/examples/pages/playgrounds/react-playgrounds/SamsPlayground.tsx +12 -3
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +415 -25
- package/examples/pages/playgrounds/react-playgrounds/components/Layout.tsx +2 -2
- package/examples/pages/playgrounds/swimlane-view.html +1 -1
- package/examples/pages/playgrounds/toasts.html +1 -1
- package/examples/pages/playgrounds/video-editor.html +1 -1
- package/examples/pages/react/Badges.tsx +18 -0
- package/examples/pages/react/ContentDivider.tsx +22 -18
- package/examples/pages/react/ContentList.tsx +200 -18
- package/examples/pages/react/DatePicker.tsx +31 -6
- package/examples/pages/react/Dropdowns.tsx +580 -48
- package/examples/pages/react/DurationInput.tsx +108 -0
- package/examples/pages/react/Index.tsx +10 -0
- package/examples/pages/react/Inputs.tsx +256 -8
- package/examples/pages/react/Labels.tsx +51 -1
- package/examples/pages/react/LeftNavigations.tsx +71 -44
- package/examples/pages/react/MultiSelect.tsx +10 -2
- package/examples/pages/react/SelectWithTemplate.tsx +6 -1
- package/examples/pages/react/Selects.tsx +55 -0
- package/examples/pages/react/TableList.tsx +77 -186
- package/examples/pages/react/TimePicker.tsx +22 -12
- package/examples/pages/react/Togglebox.tsx +1 -1
- package/examples/pages/react/TreeSelect.tsx +270 -48
- package/examples/pages/react/WithSizeObserver.tsx +44 -0
- package/examples/pages/react/tree-select/TreeSelect.tsx +273 -0
- package/examples/pages/react/tree-select/example-1.tsx +71 -0
- package/examples/pages/react/tree-select/example-2.tsx +59 -0
- package/package.json +8 -8
- package/react/components/Alert.js +10 -8
- package/react/components/Autocomplete.js +16 -12
- package/react/components/Avatar.js +8 -6
- package/react/components/Badge.d.ts +1 -0
- package/react/components/Badge.js +9 -7
- package/react/components/Button.js +8 -6
- package/react/components/ButtonGroup.js +7 -5
- package/react/components/Carousel.js +4 -2
- package/react/components/CheckButtonGroup.js +6 -4
- package/react/components/CheckGroup.js +5 -3
- package/react/components/Checkbox.js +5 -3
- package/react/components/CheckboxButton.js +6 -4
- package/react/components/ContentDivider.d.ts +1 -0
- package/react/components/ContentDivider.js +10 -6
- package/react/components/CreateButton.js +6 -4
- package/react/components/DatePicker.d.ts +11 -0
- package/react/components/DatePicker.js +44 -35
- package/react/components/Divider.js +6 -4
- package/react/components/DonutChart.d.ts +1 -1
- package/react/components/DonutChart.js +24 -6
- package/react/components/DropZone.js +6 -4
- package/react/components/Dropdown.d.ts +6 -5
- package/react/components/Dropdown.js +63 -35
- package/react/components/DropdownFirst.js +18 -11
- package/react/components/DurationInput.d.ts +42 -0
- package/react/components/DurationInput.js +364 -0
- package/react/components/EmptyState.d.ts +1 -0
- package/react/components/EmptyState.js +8 -6
- package/react/components/Form/FormGroup.js +7 -5
- package/react/components/Form/FormItem.js +5 -3
- package/react/components/Form/FormLabel.d.ts +4 -1
- package/react/components/Form/FormLabel.js +13 -5
- package/react/components/Form/FormRow.js +5 -3
- package/react/components/Form/FormRowNew.d.ts +12 -0
- package/react/components/Form/FormRowNew.js +67 -0
- package/react/components/Form/FormText.js +4 -2
- package/react/components/Form/InputBase.d.ts +41 -0
- package/react/components/Form/InputBase.js +86 -0
- package/react/components/Form/InputNew.d.ts +45 -0
- package/react/components/Form/InputNew.js +75 -0
- package/react/components/Form/InputWrapper.d.ts +28 -0
- package/react/components/Form/InputWrapper.js +91 -0
- package/react/components/Form/index.d.ts +4 -0
- package/react/components/Form/index.js +9 -0
- package/react/components/FormLabel.js +5 -3
- package/react/components/GridItem.js +9 -7
- package/react/components/GridList.js +8 -6
- package/react/components/HeadingText.js +4 -2
- package/react/components/HelloWorld.js +4 -2
- package/react/components/Icon.d.ts +1 -1
- package/react/components/Icon.js +9 -7
- package/react/components/IconButton.js +8 -6
- package/react/components/IconLabel.js +7 -5
- package/react/components/IconPicker.js +13 -9
- package/react/components/Input.d.ts +6 -2
- package/react/components/Input.js +16 -31
- package/react/components/Label.d.ts +1 -0
- package/react/components/Label.js +28 -10
- package/react/components/Layouts/AuthorinInnerSideBar.js +4 -2
- package/react/components/Layouts/AuthoringContainer.d.ts +1 -0
- package/react/components/Layouts/AuthoringContainer.js +8 -6
- package/react/components/Layouts/AuthoringFrame.js +4 -2
- package/react/components/Layouts/AuthoringFrameContainer.js +4 -2
- package/react/components/Layouts/AuthoringFrameLeftBar.js +4 -2
- package/react/components/Layouts/AuthoringFrameMain.js +4 -2
- package/react/components/Layouts/AuthoringFrameNavBar.js +4 -2
- package/react/components/Layouts/AuthoringFrameOverlay.js +4 -2
- package/react/components/Layouts/AuthoringFrameRightBar.js +4 -2
- package/react/components/Layouts/AuthoringFrameSidePanel.js +5 -3
- package/react/components/Layouts/AuthoringFrameSidePanelOverlay.js +5 -3
- package/react/components/Layouts/AuthoringInnerBody.js +4 -2
- package/react/components/Layouts/AuthoringInnerHeader.js +7 -5
- package/react/components/Layouts/AuthoringMain.js +5 -3
- package/react/components/Layouts/AuthoringMainContainer.js +4 -2
- package/react/components/Layouts/AuthoringMainContent.js +4 -2
- package/react/components/Layouts/AuthoringMainToolBar.js +5 -3
- package/react/components/Layouts/BottomBarAction.d.ts +12 -0
- package/react/components/Layouts/BottomBarAction.js +59 -0
- package/react/components/Layouts/Container.js +9 -7
- package/react/components/Layouts/ContentSplitter.js +6 -4
- package/react/components/Layouts/CoreLayout.d.ts +20 -0
- package/react/components/Layouts/CoreLayout.js +55 -0
- package/react/components/Layouts/CoreLayoutContainer.d.ts +9 -0
- package/react/components/Layouts/CoreLayoutContainer.js +49 -0
- package/react/components/Layouts/CoreLayoutFooter.d.ts +8 -0
- package/react/components/Layouts/CoreLayoutFooter.js +49 -0
- package/react/components/Layouts/CoreLayoutMain.d.ts +10 -0
- package/react/components/Layouts/CoreLayoutMain.js +56 -0
- package/react/components/Layouts/CoreLayoutOverlay.d.ts +8 -0
- package/react/components/Layouts/CoreLayoutOverlay.js +49 -0
- package/react/components/Layouts/CoreLayoutSlideInMenu.d.ts +11 -0
- package/react/components/Layouts/CoreLayoutSlideInMenu.js +58 -0
- package/react/components/Layouts/CoreLayoutTopMenu.d.ts +14 -0
- package/react/components/Layouts/CoreLayoutTopMenu.js +54 -0
- package/react/components/Layouts/HamburgerButton.d.ts +14 -0
- package/react/components/Layouts/HamburgerButton.js +63 -0
- package/react/components/Layouts/HeaderPanel.js +4 -2
- package/react/components/Layouts/Layout.js +4 -3
- package/react/components/Layouts/LayoutContainer.js +4 -2
- package/react/components/Layouts/LeftPanel.js +5 -3
- package/react/components/Layouts/MainMenu.d.ts +41 -0
- package/react/components/Layouts/MainMenu.js +103 -0
- package/react/components/Layouts/MainPanel.js +5 -3
- package/react/components/Layouts/NotificationPanel.d.ts +45 -0
- package/react/components/Layouts/NotificationPanel.js +110 -0
- package/react/components/Layouts/OverlayPanel.js +4 -2
- package/react/components/Layouts/PageLayout.js +4 -2
- package/react/components/Layouts/Panel.js +16 -14
- package/react/components/Layouts/RightPanel.js +4 -2
- package/react/components/Layouts/index.d.ts +11 -0
- package/react/components/Layouts/index.js +23 -0
- package/react/components/LeftMenu.d.ts +5 -1
- package/react/components/LeftMenu.js +27 -13
- package/react/components/ListItemLoader.js +4 -2
- package/react/components/Lists/BoxedList.d.ts +6 -0
- package/react/components/Lists/BoxedList.js +36 -15
- package/react/components/Lists/ContentList.d.ts +50 -0
- package/react/components/Lists/ContentList.js +106 -0
- package/react/components/Lists/SimpleList.js +9 -7
- package/react/components/Lists/TableList.d.ts +62 -0
- package/react/components/Lists/TableList.js +208 -0
- package/react/components/Lists/index.js +1 -0
- package/react/components/Loader.js +4 -2
- package/react/components/Menu.d.ts +2 -1
- package/react/components/Menu.js +48 -12
- package/react/components/Modal.d.ts +2 -1
- package/react/components/Modal.js +30 -9
- package/react/components/MultiSelect.d.ts +40 -0
- package/react/components/MultiSelect.js +70 -0
- package/react/components/NavButton.d.ts +1 -0
- package/react/components/NavButton.js +9 -4
- package/react/components/Navigation/BottomNav.d.ts +24 -0
- package/react/components/Navigation/BottomNav.js +88 -0
- package/react/components/Navigation/QuickNavBar.js +13 -9
- package/react/components/Navigation/SideBarMenu.js +4 -2
- package/react/components/Navigation/SideBarTabs.js +4 -2
- package/react/components/Navigation/index.js +1 -0
- package/react/components/Popover.js +4 -2
- package/react/components/PropsList.js +4 -2
- package/react/components/RadioButtonGroup.js +9 -7
- package/react/components/RadioGroup.js +6 -4
- package/react/components/SearchBar.d.ts +3 -2
- package/react/components/SearchBar.js +34 -8
- package/react/components/Select.d.ts +5 -1
- package/react/components/Select.js +9 -23
- package/react/components/SelectGrid.d.ts +1 -1
- package/react/components/SelectGrid.js +44 -23
- package/react/components/SelectWithTemplate.d.ts +11 -1
- package/react/components/SelectWithTemplate.js +23 -12
- package/react/components/Skeleton.d.ts +1 -1
- package/react/components/Skeleton.js +26 -5
- package/react/components/SlidingToolbar.js +6 -4
- package/react/components/Spinner.js +6 -4
- package/react/components/StrechBar.js +4 -2
- package/react/components/SubNav.js +9 -7
- package/react/components/Switch.js +6 -4
- package/react/components/SwitchGroup.js +5 -3
- package/react/components/TabCustom.js +11 -7
- package/react/components/TabList.js +6 -4
- package/react/components/Tag.js +5 -4
- package/react/components/TagInput.js +7 -6
- package/react/components/TagInputTest.js +13 -9
- package/react/components/Text/Heading.js +10 -8
- package/react/components/Text/Text.js +10 -8
- package/react/components/Text/Time.d.ts +15 -0
- package/react/components/Text/Time.js +65 -0
- package/react/components/ThemeSelector.js +7 -5
- package/react/components/TimePicker.d.ts +11 -1
- package/react/components/TimePicker.js +14 -5
- package/react/components/Toast.js +1 -1
- package/react/components/ToastMessage.js +6 -5
- package/react/components/ToastText.js +1 -1
- package/react/components/ToastWrapper.d.ts +2 -2
- package/react/components/ToastWrapper.js +14 -10
- package/react/components/Togglebox.d.ts +1 -1
- package/react/components/Togglebox.js +36 -15
- package/react/components/Tooltip.d.ts +1 -0
- package/react/components/Tooltip.js +14 -10
- package/react/components/TreeSelect.d.ts +80 -0
- package/react/components/TreeSelect.js +494 -0
- package/react/components/WithSizeObserver.d.ts +25 -0
- package/react/components/WithSizeObserver.js +95 -0
- package/react/components/_Positioner.js +4 -2
- package/react/helpers.d.ts +1 -0
- package/react/helpers.js +7 -0
- package/react/index.d.ts +9 -0
- package/react/index.js +23 -2
- package/yarn-error.log +111 -0
- package/patches/@superdesk+primereact+5.0.2-4.patch +0 -13
- package/sd_icons.eot +0 -0
- package/sd_icons.svg +0 -189
- package/sd_icons.ttf +0 -0
- package/sd_icons.woff +0 -0
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
9
|
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -55,6 +57,7 @@ var SearchBar = /** @class */ (function (_super) {
|
|
55
57
|
focused: _this.props.focused ? _this.props.focused : false,
|
56
58
|
type: _this.props.type ? _this.props.type : 'expanded',
|
57
59
|
boxed: _this.props.boxed ? _this.props.boxed : false,
|
60
|
+
keyDown: false,
|
58
61
|
};
|
59
62
|
_this.inputRef = React.createRef();
|
60
63
|
return _this;
|
@@ -67,20 +70,43 @@ var SearchBar = /** @class */ (function (_super) {
|
|
67
70
|
SearchBar.prototype.render = function () {
|
68
71
|
var _a;
|
69
72
|
var _this = this;
|
70
|
-
var classes = classnames_1.default('sd-searchbar', (_a = {},
|
71
|
-
_a["sd-searchbar--"
|
73
|
+
var classes = (0, classnames_1.default)('sd-searchbar', (_a = {},
|
74
|
+
_a["sd-searchbar--".concat(this.state.type)] = this.props.type,
|
72
75
|
_a['sd-searchbar--expanded'] = this.state.type === 'expanded' || this.props.type === undefined,
|
73
76
|
_a['sd-searchbar--focused'] = this.state.focused,
|
74
77
|
_a['sd-searchbar--boxed'] = this.state.boxed,
|
75
78
|
_a));
|
76
79
|
return (React.createElement("div", { className: classes, ref: this.inputRef },
|
77
80
|
React.createElement("label", { className: "sd-searchbar__icon" }),
|
78
|
-
React.createElement("input", { id: "search-input", ref: function (input) { return (input && _this.props.focused) && input.focus(); }, className: "sd-searchbar__input", type: "text", placeholder: this.props.placeholder, value: this.state.inputValue,
|
81
|
+
React.createElement("input", { id: "search-input", ref: function (input) { return (input && _this.props.focused) && input.focus(); }, className: "sd-searchbar__input", type: "text", placeholder: this.props.placeholder, value: this.state.inputValue, onKeyPress: function (event) {
|
82
|
+
if (event.key === 'Enter') {
|
83
|
+
if (_this.props.onSubmit) {
|
84
|
+
_this.props.onSubmit(_this.state.inputValue);
|
85
|
+
}
|
86
|
+
_this.setState({ keyDown: true });
|
87
|
+
}
|
88
|
+
}, onKeyUp: function (event) {
|
89
|
+
if (event.key === 'Enter') {
|
90
|
+
_this.setState({ keyDown: false });
|
91
|
+
}
|
92
|
+
}, onChange: function (event) { return _this.setState({ inputValue: event.target.value }); }, onFocus: function () { return _this.setState({ focused: true }); } }),
|
79
93
|
this.state.inputValue &&
|
80
|
-
React.createElement("button", { className: "sd-searchbar__cancel", onClick: function () {
|
94
|
+
React.createElement("button", { className: "sd-searchbar__cancel", onClick: function () {
|
95
|
+
_this.setState({ inputValue: '' });
|
96
|
+
setTimeout(function () {
|
97
|
+
if (_this.props.onSubmit) {
|
98
|
+
_this.props.onSubmit(_this.state.inputValue);
|
99
|
+
}
|
100
|
+
});
|
101
|
+
} },
|
81
102
|
React.createElement(Icon_1.Icon, { name: 'remove-sign' })),
|
82
|
-
|
83
|
-
React.createElement(
|
103
|
+
this.state.inputValue &&
|
104
|
+
React.createElement("button", { id: "sd-searchbar__search-btn", className: "sd-searchbar__search-btn ".concat(this.state.keyDown ? 'sd-searchbar__search-btn--active' : ''), onClick: function () {
|
105
|
+
if (_this.props.onSubmit) {
|
106
|
+
_this.props.onSubmit(_this.state.inputValue);
|
107
|
+
}
|
108
|
+
} },
|
109
|
+
React.createElement(Icon_1.Icon, { name: 'chevron-right-thin' }))));
|
84
110
|
};
|
85
111
|
return SearchBar;
|
86
112
|
}(React.PureComponent));
|
@@ -12,14 +12,18 @@ interface ISelect {
|
|
12
12
|
tabindex?: number;
|
13
13
|
fullWidth?: boolean;
|
14
14
|
onChange(newValue: string): void;
|
15
|
+
boxedStyle?: boolean;
|
16
|
+
boxedLable?: boolean;
|
17
|
+
placeholder?: string;
|
18
|
+
size?: 'medium' | 'large' | 'x-large';
|
15
19
|
}
|
16
20
|
interface IState {
|
17
21
|
value: string;
|
18
22
|
invalid: boolean;
|
19
23
|
}
|
20
24
|
declare class Select extends React.Component<ISelect, IState> {
|
25
|
+
private htmlId;
|
21
26
|
constructor(props: ISelect);
|
22
|
-
htmlId: string;
|
23
27
|
handleChange(event: React.ChangeEvent<HTMLSelectElement>): void;
|
24
28
|
render(): JSX.Element;
|
25
29
|
}
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
9
|
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -37,14 +39,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
38
40
|
exports.Option = exports.Select = void 0;
|
39
41
|
var React = __importStar(require("react"));
|
40
|
-
|
42
|
+
// import classNames from 'classnames';
|
41
43
|
var react_id_generator_1 = __importDefault(require("react-id-generator"));
|
44
|
+
var Form_1 = require("./Form");
|
42
45
|
var Select = /** @class */ (function (_super) {
|
43
46
|
__extends(Select, _super);
|
44
47
|
function Select(props) {
|
45
48
|
var _a, _b;
|
46
49
|
var _this = _super.call(this, props) || this;
|
47
|
-
_this.htmlId = react_id_generator_1.default();
|
50
|
+
_this.htmlId = (0, react_id_generator_1.default)();
|
48
51
|
_this.state = {
|
49
52
|
value: (_a = _this.props.value) !== null && _a !== void 0 ? _a : '',
|
50
53
|
invalid: (_b = _this.props.invalid) !== null && _b !== void 0 ? _b : false,
|
@@ -57,25 +60,8 @@ var Select = /** @class */ (function (_super) {
|
|
57
60
|
this.props.onChange(event.target.value);
|
58
61
|
};
|
59
62
|
Select.prototype.render = function () {
|
60
|
-
|
61
|
-
'sd-
|
62
|
-
'sd-input--required': this.props.required,
|
63
|
-
'sd-input--disabled': this.props.disabled,
|
64
|
-
'sd-input--full-width': this.props.fullWidth,
|
65
|
-
'sd-input--invalid': this.props.invalid || this.state.invalid,
|
66
|
-
});
|
67
|
-
var labelClasses = classnames_1.default('sd-input__label', {
|
68
|
-
'a11y-only': this.props.labelHidden,
|
69
|
-
});
|
70
|
-
return (React.createElement("div", { className: classes },
|
71
|
-
React.createElement("label", { className: labelClasses, htmlFor: this.htmlId, tabIndex: this.props.tabindex === undefined ? undefined : -1 }, this.props.label),
|
72
|
-
React.createElement("select", { className: 'sd-input__select', id: this.htmlId, value: this.state.value, "aria-describedby": this.htmlId, tabIndex: this.props.tabindex, onChange: this.handleChange, disabled: this.props.disabled }, this.props.children),
|
73
|
-
React.createElement("div", { className: 'sd-input__message-box' },
|
74
|
-
this.props.info && !this.props.invalid && !this.state.invalid ?
|
75
|
-
React.createElement("div", { className: 'sd-input__hint' }, this.props.info) : null,
|
76
|
-
this.props.invalid || this.state.invalid ?
|
77
|
-
React.createElement("div", { className: 'sd-input__message' }, this.props.error)
|
78
|
-
: null)));
|
63
|
+
return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, required: this.props.required, disabled: this.props.disabled, invalid: this.state.invalid, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, fullWidth: this.props.fullWidth, htmlId: this.htmlId, tabindex: this.props.tabindex },
|
64
|
+
React.createElement("select", { className: 'sd-input__select', id: this.htmlId, value: this.state.value, "aria-describedby": this.htmlId, tabIndex: this.props.tabindex, onChange: this.handleChange, disabled: this.props.disabled }, this.props.children)));
|
79
65
|
};
|
80
66
|
return Select;
|
81
67
|
}(React.Component));
|
@@ -3,21 +3,42 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
9
|
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
15
|
};
|
14
16
|
})();
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
18
|
+
if (k2 === undefined) k2 = k;
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
20
|
+
}) : (function(o, m, k, k2) {
|
21
|
+
if (k2 === undefined) k2 = k;
|
22
|
+
o[k2] = m[k];
|
23
|
+
}));
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
26
|
+
}) : function(o, v) {
|
27
|
+
o["default"] = v;
|
28
|
+
});
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
30
|
+
if (mod && mod.__esModule) return mod;
|
31
|
+
var result = {};
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
33
|
+
__setModuleDefault(result, mod);
|
34
|
+
return result;
|
35
|
+
};
|
15
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
16
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
17
38
|
};
|
18
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
19
40
|
exports.SelectGrid = void 0;
|
20
|
-
var
|
41
|
+
var React = __importStar(require("react"));
|
21
42
|
var react_id_generator_1 = __importDefault(require("react-id-generator"));
|
22
43
|
var overlaypanel_1 = require("@superdesk/primereact/overlaypanel");
|
23
44
|
var Loader_1 = require("./Loader");
|
@@ -25,7 +46,7 @@ var SelectGrid = /** @class */ (function (_super) {
|
|
25
46
|
__extends(SelectGrid, _super);
|
26
47
|
function SelectGrid(props) {
|
27
48
|
var _this = _super.call(this, props) || this;
|
28
|
-
_this.htmlId = react_id_generator_1.default();
|
49
|
+
_this.htmlId = (0, react_id_generator_1.default)();
|
29
50
|
_this.togglePopup = function (event) {
|
30
51
|
if (!event) {
|
31
52
|
// @ts-ignore
|
@@ -69,7 +90,7 @@ var SelectGrid = /** @class */ (function (_super) {
|
|
69
90
|
};
|
70
91
|
_this.getItemElement = function (index) {
|
71
92
|
var _a;
|
72
|
-
return (_a = _this.gridContainer.current) === null || _a === void 0 ? void 0 : _a.querySelector("[data-item-index=\""
|
93
|
+
return (_a = _this.gridContainer.current) === null || _a === void 0 ? void 0 : _a.querySelector("[data-item-index=\"".concat(index, "\"]"));
|
73
94
|
};
|
74
95
|
_this.handleKeydown = function (event) {
|
75
96
|
var _a, _b, _c, _d, _e;
|
@@ -140,10 +161,10 @@ var SelectGrid = /** @class */ (function (_super) {
|
|
140
161
|
}
|
141
162
|
};
|
142
163
|
_this.state = { items: [], loading: true, isOpen: false };
|
143
|
-
_this.buttonContainer =
|
144
|
-
_this.overlayPanel =
|
145
|
-
_this.searchInput =
|
146
|
-
_this.gridContainer =
|
164
|
+
_this.buttonContainer = React.createRef();
|
165
|
+
_this.overlayPanel = React.createRef();
|
166
|
+
_this.searchInput = React.createRef();
|
167
|
+
_this.gridContainer = React.createRef();
|
147
168
|
return _this;
|
148
169
|
}
|
149
170
|
SelectGrid.prototype.componentDidMount = function () {
|
@@ -159,21 +180,21 @@ var SelectGrid = /** @class */ (function (_super) {
|
|
159
180
|
var _this = this;
|
160
181
|
var ItemTemplate = this.props.itemTemplate;
|
161
182
|
var TriggerTemplate = this.props.triggerTemplate;
|
162
|
-
return (
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
this.state.items.map(function (item, index) { return (
|
175
|
-
|
183
|
+
return (React.createElement(React.Fragment, null,
|
184
|
+
React.createElement("div", { className: "sd-input sd-input--grid-select", ref: this.buttonContainer, "aria-label": this.props.label },
|
185
|
+
React.createElement("label", { className: "sd-input__label" }, this.props.label),
|
186
|
+
React.createElement(TriggerTemplate, { onClick: this.togglePopup })),
|
187
|
+
React.createElement(overlaypanel_1.OverlayPanel, { ref: this.overlayPanel, dismissable: true, className: "select-grid__overlay-panel", appendTo: document.body },
|
188
|
+
React.createElement("div", { className: "select-grid__panel" },
|
189
|
+
React.createElement("div", { className: "select-grid__header" },
|
190
|
+
React.createElement("div", { className: "sd-searchbar sd-searchbar--boxed" },
|
191
|
+
React.createElement("label", { className: "sd-searchbar__icon" }),
|
192
|
+
React.createElement("input", { className: "sd-searchbar__input", placeholder: this.props.filterPlaceholder || 'Search...', type: "text", onChange: this.search, ref: this.searchInput }))),
|
193
|
+
React.createElement("div", { className: "select-grid__body", ref: this.gridContainer },
|
194
|
+
React.createElement(Loader_1.Loader, { overlay: this.state.loading }),
|
195
|
+
this.state.items.map(function (item, index) { return (React.createElement("div", { key: _this.htmlId + item.label, "data-item-index": index, className: "flex-grid__item select-grid__item sd-padding-y--3", tabIndex: 0, role: "button", "aria-label": item.name, onClick: function () { return _this.select(item); } },
|
196
|
+
React.createElement(ItemTemplate, { item: item }))); }))))));
|
176
197
|
};
|
177
198
|
return SelectGrid;
|
178
|
-
}(
|
199
|
+
}(React.PureComponent));
|
179
200
|
exports.SelectGrid = SelectGrid;
|
@@ -12,19 +12,29 @@ interface IProps<T> {
|
|
12
12
|
noResultsFoundMessage: string;
|
13
13
|
filterPlaceholder?: string;
|
14
14
|
disabled?: boolean;
|
15
|
-
required?: boolean;
|
16
15
|
autoFocus?: boolean;
|
17
16
|
autoOpen?: boolean;
|
18
17
|
width?: 'min' | '100%';
|
19
18
|
zIndex?: number;
|
20
19
|
'data-test-id'?: string;
|
20
|
+
inlineLabel?: boolean;
|
21
|
+
required?: boolean;
|
22
|
+
fullWidth?: boolean;
|
23
|
+
invalid?: boolean;
|
24
|
+
labelHidden?: boolean;
|
25
|
+
tabindex?: number;
|
26
|
+
label?: string;
|
27
|
+
info?: string;
|
28
|
+
error?: string;
|
21
29
|
}
|
22
30
|
interface IState<T> {
|
23
31
|
options: Array<T>;
|
24
32
|
loading: boolean;
|
33
|
+
invalid: boolean;
|
25
34
|
}
|
26
35
|
export declare class SelectWithTemplate<T> extends React.Component<IProps<T>, IState<T>> {
|
27
36
|
componentRef: Dropdown | null;
|
37
|
+
private htmlId;
|
28
38
|
constructor(props: IProps<T>);
|
29
39
|
componentDidMount(): void;
|
30
40
|
render(): JSX.Element;
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
9
|
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,22 +29,30 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
38
|
+
};
|
34
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
35
40
|
exports.SelectWithTemplate = void 0;
|
36
41
|
var React = __importStar(require("react"));
|
37
42
|
var dropdown_1 = require("@superdesk/primereact/dropdown");
|
43
|
+
// import classNames from 'classnames';
|
44
|
+
var react_id_generator_1 = __importDefault(require("react-id-generator"));
|
45
|
+
var Form_1 = require("./Form");
|
38
46
|
var labelKey = 'label';
|
39
47
|
var SelectWithTemplate = /** @class */ (function (_super) {
|
40
48
|
__extends(SelectWithTemplate, _super);
|
41
49
|
function SelectWithTemplate(props) {
|
42
50
|
var _this = _super.call(this, props) || this;
|
51
|
+
_this.htmlId = (0, react_id_generator_1.default)();
|
43
52
|
_this.state = {
|
44
53
|
options: [],
|
45
54
|
loading: false,
|
55
|
+
invalid: _this.props.invalid ? _this.props.invalid : false,
|
46
56
|
};
|
47
57
|
_this.componentRef = null;
|
48
58
|
return _this;
|
@@ -82,16 +92,17 @@ var SelectWithTemplate = /** @class */ (function (_super) {
|
|
82
92
|
// needs to be passed to prime react component
|
83
93
|
// or it will not be displayed at all, even if returned by itemTemplate
|
84
94
|
var fakePlaceholderWithNonBreakingSpace = ' ';
|
85
|
-
return (React.createElement(
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
+
return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, required: this.props.required, disabled: this.props.disabled, invalid: this.state.invalid, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, fullWidth: this.props.fullWidth, htmlId: this.htmlId, tabindex: this.props.tabindex },
|
96
|
+
React.createElement(dropdown_1.Dropdown, { inputId: this.htmlId, ariaLabelledBy: this.htmlId + 'label', value: valueInternal, options: optionsInternal, onChange: function (e) {
|
97
|
+
onChange(e.value == null ? null : e.value.original);
|
98
|
+
}, placeholder: fakePlaceholderWithNonBreakingSpace, filterPlaceholder: filterPlaceholder, filter: true, filterBy: labelKey, showClear: !required, emptyFilterMessage: emptyFilterMessage, valueTemplate: function (option) { return React.createElement(ItemTemplate, { option: option == null ? null : option.original }); }, itemTemplate: function (option) { return React.createElement(ItemTemplate, { option: option.original }); }, disabled: disabled, required: required, autoFocus: autoFocus, appendTo: document.body, loading: loading, onFilterInputChange: function (searchString) {
|
99
|
+
_this.setState({ loading: true });
|
100
|
+
getItems(searchString).then(function (_options) {
|
101
|
+
_this.setState({ options: _options, loading: false });
|
102
|
+
});
|
103
|
+
}, zIndex: zIndex, style: width === '100%' ? { display: 'flex', width: '100%' } : {}, ref: function (componentRef) {
|
104
|
+
_this.componentRef = componentRef;
|
105
|
+
} })));
|
95
106
|
};
|
96
107
|
return SelectWithTemplate;
|
97
108
|
}(React.Component));
|
@@ -3,21 +3,42 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
9
|
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
15
|
};
|
14
16
|
})();
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
18
|
+
if (k2 === undefined) k2 = k;
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
20
|
+
}) : (function(o, m, k, k2) {
|
21
|
+
if (k2 === undefined) k2 = k;
|
22
|
+
o[k2] = m[k];
|
23
|
+
}));
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
26
|
+
}) : function(o, v) {
|
27
|
+
o["default"] = v;
|
28
|
+
});
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
30
|
+
if (mod && mod.__esModule) return mod;
|
31
|
+
var result = {};
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
33
|
+
__setModuleDefault(result, mod);
|
34
|
+
return result;
|
35
|
+
};
|
15
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
16
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
17
38
|
};
|
18
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
19
40
|
exports.Skeleton = void 0;
|
20
|
-
var
|
41
|
+
var React = __importStar(require("react"));
|
21
42
|
var classnames_1 = __importDefault(require("classnames"));
|
22
43
|
var Skeleton = /** @class */ (function (_super) {
|
23
44
|
__extends(Skeleton, _super);
|
@@ -33,12 +54,12 @@ var Skeleton = /** @class */ (function (_super) {
|
|
33
54
|
}
|
34
55
|
};
|
35
56
|
Skeleton.prototype.render = function () {
|
36
|
-
var skeletonClassName = classnames_1.default('p-skeleton p-component', {
|
57
|
+
var skeletonClassName = (0, classnames_1.default)('p-skeleton p-component', {
|
37
58
|
'p-skeleton-circle': this.props.shape === 'circle',
|
38
59
|
'p-skeleton-none': this.props.animation === 'none',
|
39
60
|
}, this.props.className);
|
40
61
|
var style = this.skeletonStyle();
|
41
|
-
return (
|
62
|
+
return (React.createElement("div", { style: style, className: skeletonClassName }));
|
42
63
|
};
|
43
64
|
Skeleton.defaultProps = {
|
44
65
|
shape: 'rectangle',
|
@@ -51,5 +72,5 @@ var Skeleton = /** @class */ (function (_super) {
|
|
51
72
|
className: null,
|
52
73
|
};
|
53
74
|
return Skeleton;
|
54
|
-
}(
|
75
|
+
}(React.Component));
|
55
76
|
exports.Skeleton = Skeleton;
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
9
|
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -45,10 +47,10 @@ var SlidingToolbar = /** @class */ (function (_super) {
|
|
45
47
|
}
|
46
48
|
SlidingToolbar.prototype.render = function () {
|
47
49
|
var _a;
|
48
|
-
var classes = classnames_1.default('sliding-toolbar', (_a = {
|
50
|
+
var classes = (0, classnames_1.default)('sliding-toolbar', (_a = {
|
49
51
|
'sliding-toolbar--right': this.props.side === undefined
|
50
52
|
},
|
51
|
-
_a["sliding-toolbar--"
|
53
|
+
_a["sliding-toolbar--".concat(this.props.side)] = this.props.side || this.props.side !== undefined,
|
52
54
|
_a));
|
53
55
|
return (React.createElement("div", { className: classes }, this.props.children));
|
54
56
|
};
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
9
|
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -56,10 +58,10 @@ var Spinner = /** @class */ (function (_super) {
|
|
56
58
|
}
|
57
59
|
Spinner.prototype.render = function () {
|
58
60
|
var _a;
|
59
|
-
var classes = classnames_1.default('sd-spinner', (_a = {
|
61
|
+
var classes = (0, classnames_1.default)('sd-spinner', (_a = {
|
60
62
|
'sd-spinner--small': this.props.size === undefined
|
61
63
|
},
|
62
|
-
_a["sd-spinner--"
|
64
|
+
_a["sd-spinner--".concat(this.props.size)] = this.props.size || this.props.size !== undefined,
|
63
65
|
_a));
|
64
66
|
return (React.createElement("svg", { role: "progressbar", className: classes, viewBox: "0 0 50 50" },
|
65
67
|
React.createElement("circle", { className: "sd-spinner__path", cx: "25", cy: "25", r: "20", fill: "none", strokeWidth: "5" })));
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
9
|
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
3
3
|
var extendStatics = function (d, b) {
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
7
|
return extendStatics(d, b);
|
8
8
|
};
|
9
9
|
return function (d, b) {
|
10
|
+
if (typeof b !== "function" && b !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
10
12
|
extendStatics(d, b);
|
11
13
|
function __() { this.constructor = d; }
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
@@ -27,7 +29,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
27
29
|
var __importStar = (this && this.__importStar) || function (mod) {
|
28
30
|
if (mod && mod.__esModule) return mod;
|
29
31
|
var result = {};
|
30
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
31
33
|
__setModuleDefault(result, mod);
|
32
34
|
return result;
|
33
35
|
};
|
@@ -45,10 +47,10 @@ var SubNavDivider = /** @class */ (function (_super) {
|
|
45
47
|
}
|
46
48
|
SubNavDivider.prototype.render = function () {
|
47
49
|
var _a;
|
48
|
-
var classes = classnames_1.default('subnav__divider', (_a = {
|
50
|
+
var classes = (0, classnames_1.default)('subnav__divider', (_a = {
|
49
51
|
'subnav__divider--medium': this.props.width === undefined
|
50
52
|
},
|
51
|
-
_a["subnav__divider--"
|
53
|
+
_a["subnav__divider--".concat(this.props.width)] = this.props.width || this.props.width !== undefined,
|
52
54
|
_a));
|
53
55
|
return (React.createElement("div", { className: classes }));
|
54
56
|
};
|
@@ -63,16 +65,16 @@ var SubNav = /** @class */ (function (_super) {
|
|
63
65
|
SubNav.prototype.render = function () {
|
64
66
|
var _a;
|
65
67
|
var darkColors = ['blueGrey', 'blueGreyDarker'];
|
66
|
-
var classes = classnames_1.default('subnav', (_a = {
|
68
|
+
var classes = (0, classnames_1.default)('subnav', (_a = {
|
67
69
|
'subnav--light': this.props.color === undefined
|
68
70
|
},
|
69
|
-
_a["subnav--"
|
71
|
+
_a["subnav--".concat(this.props.color)] = this.props.color || this.props.color !== undefined,
|
70
72
|
_a), this.props.className);
|
71
73
|
var style = {
|
72
74
|
zIndex: 1000 + (this.props.zIndex ? this.props.zIndex : 0),
|
73
75
|
};
|
74
76
|
var defaultTheme = darkColors.includes(this.props.color || '') ? 'dark-ui' : null;
|
75
|
-
return (React.createElement("div", { "data-theme": this.props.theme ? this.props.theme
|
77
|
+
return (React.createElement("div", { "data-theme": this.props.theme ? "".concat(this.props.theme, "-ui") : defaultTheme, className: classes, style: style }, this.props.children));
|
76
78
|
};
|
77
79
|
return SubNav;
|
78
80
|
}(React.PureComponent));
|