@ohos-ports/sprucelabs-react-heartwood-components 9.1.0-beta.0
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/LICENSE +21 -0
- package/README.md +59 -0
- package/lib/__mocks__/stubs/events.js +166 -0
- package/lib/__mocks__/stubs/events.js.map +1 -0
- package/lib/__mocks__/stubs/location.js +34 -0
- package/lib/__mocks__/stubs/location.js.map +1 -0
- package/lib/__mocks__/stubs/users.js +225 -0
- package/lib/__mocks__/stubs/users.js.map +1 -0
- package/lib/__tests__/components/Pagination/Pagination.test.js +127 -0
- package/lib/__tests__/components/Pagination/Pagination.test.js.map +1 -0
- package/lib/components/Avatar/Avatar-story.js +34 -0
- package/lib/components/Avatar/Avatar-story.js.map +1 -0
- package/lib/components/Avatar/Avatar.d.ts +40 -0
- package/lib/components/Avatar/Avatar.d.ts.map +1 -0
- package/lib/components/Avatar/Avatar.js +91 -0
- package/lib/components/Avatar/Avatar.js.map +1 -0
- package/lib/components/Avatar/UserAvatar.js +45 -0
- package/lib/components/Avatar/UserAvatar.js.map +1 -0
- package/lib/components/BotText/BotText-story.d.ts +2 -0
- package/lib/components/BotText/BotText-story.d.ts.map +1 -0
- package/lib/components/BotText/BotText-story.js +21 -0
- package/lib/components/BotText/BotText-story.js.map +1 -0
- package/lib/components/BotText/BotText.d.ts +12 -0
- package/lib/components/BotText/BotText.d.ts.map +1 -0
- package/lib/components/BotText/BotText.js +52 -0
- package/lib/components/BotText/BotText.js.map +1 -0
- package/lib/components/Button/Button-story.js +109 -0
- package/lib/components/Button/Button-story.js.map +1 -0
- package/lib/components/Button/Button.d.ts +47 -0
- package/lib/components/Button/Button.d.ts.map +1 -0
- package/lib/components/Button/Button.js +155 -0
- package/lib/components/Button/Button.js.map +1 -0
- package/lib/components/ButtonGroup/ButtonGroup-story.js +27 -0
- package/lib/components/ButtonGroup/ButtonGroup-story.js.map +1 -0
- package/lib/components/ButtonGroup/ButtonGroup.d.ts +19 -0
- package/lib/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
- package/lib/components/ButtonGroup/ButtonGroup.js +64 -0
- package/lib/components/ButtonGroup/ButtonGroup.js.map +1 -0
- package/lib/components/Card/Card-story.d.ts +2 -0
- package/lib/components/Card/Card-story.d.ts.map +1 -0
- package/lib/components/Card/Card-story.js +389 -0
- package/lib/components/Card/Card-story.js.map +1 -0
- package/lib/components/Card/Card.d.ts +69 -0
- package/lib/components/Card/Card.d.ts.map +1 -0
- package/lib/components/Card/Card.js +113 -0
- package/lib/components/Card/Card.js.map +1 -0
- package/lib/components/Card/components/CardBody.d.ts +27 -0
- package/lib/components/Card/components/CardBody.d.ts.map +1 -0
- package/lib/components/Card/components/CardBody.js +45 -0
- package/lib/components/Card/components/CardBody.js.map +1 -0
- package/lib/components/Card/components/CardBuilder.d.ts +50 -0
- package/lib/components/Card/components/CardBuilder.d.ts.map +1 -0
- package/lib/components/Card/components/CardBuilder.js +139 -0
- package/lib/components/Card/components/CardBuilder.js.map +1 -0
- package/lib/components/Card/components/CardFooter.d.ts +11 -0
- package/lib/components/Card/components/CardFooter.d.ts.map +1 -0
- package/lib/components/Card/components/CardFooter.js +22 -0
- package/lib/components/Card/components/CardFooter.js.map +1 -0
- package/lib/components/Card/components/CardHeader.d.ts +28 -0
- package/lib/components/Card/components/CardHeader.d.ts.map +1 -0
- package/lib/components/Card/components/CardHeader.js +70 -0
- package/lib/components/Card/components/CardHeader.js.map +1 -0
- package/lib/components/Card/components/CardSection.d.ts +10 -0
- package/lib/components/Card/components/CardSection.d.ts.map +1 -0
- package/lib/components/Card/components/CardSection.js +27 -0
- package/lib/components/Card/components/CardSection.js.map +1 -0
- package/lib/components/Card/components/OnboardingCard.d.ts +27 -0
- package/lib/components/Card/components/OnboardingCard.d.ts.map +1 -0
- package/lib/components/Card/components/OnboardingCard.js +129 -0
- package/lib/components/Card/components/OnboardingCard.js.map +1 -0
- package/lib/components/Card/components/Scores.d.ts +15 -0
- package/lib/components/Card/components/Scores.d.ts.map +1 -0
- package/lib/components/Card/components/Scores.js +39 -0
- package/lib/components/Card/components/Scores.js.map +1 -0
- package/lib/components/Card/index.d.ts +11 -0
- package/lib/components/Card/index.d.ts.map +1 -0
- package/lib/components/Card/index.js +120 -0
- package/lib/components/Card/index.js.map +1 -0
- package/lib/components/CircleLoader/CircleLoader-story.d.ts +2 -0
- package/lib/components/CircleLoader/CircleLoader-story.d.ts.map +1 -0
- package/lib/components/CircleLoader/CircleLoader-story.js +20 -0
- package/lib/components/CircleLoader/CircleLoader-story.js.map +1 -0
- package/lib/components/CircleLoader/CircleLoader.d.ts +13 -0
- package/lib/components/CircleLoader/CircleLoader.d.ts.map +1 -0
- package/lib/components/CircleLoader/CircleLoader.js +28 -0
- package/lib/components/CircleLoader/CircleLoader.js.map +1 -0
- package/lib/components/ContextMenu/ContextMenu-story.js +31 -0
- package/lib/components/ContextMenu/ContextMenu-story.js.map +1 -0
- package/lib/components/ContextMenu/ContextMenu.d.ts +70 -0
- package/lib/components/ContextMenu/ContextMenu.d.ts.map +1 -0
- package/lib/components/ContextMenu/ContextMenu.js +315 -0
- package/lib/components/ContextMenu/ContextMenu.js.map +1 -0
- package/lib/components/Core/components/FeedBuilder/FeedBuilder-story.js +101 -0
- package/lib/components/Core/components/FeedBuilder/FeedBuilder-story.js.map +1 -0
- package/lib/components/Core/components/FeedBuilder/FeedBuilder.js +290 -0
- package/lib/components/Core/components/FeedBuilder/FeedBuilder.js.map +1 -0
- package/lib/components/Core/components/FooterPrimary/FooterPrimary.js +20 -0
- package/lib/components/Core/components/FooterPrimary/FooterPrimary.js.map +1 -0
- package/lib/components/Core/components/FooterPrimary/components/HelpButton/HelpButton.js +52 -0
- package/lib/components/Core/components/FooterPrimary/components/HelpButton/HelpButton.js.map +1 -0
- package/lib/components/Core/components/FooterPrimary/components/Legal/Legal.js +38 -0
- package/lib/components/Core/components/FooterPrimary/components/Legal/Legal.js.map +1 -0
- package/lib/components/Core/components/FooterPrimary/index.js +30 -0
- package/lib/components/Core/components/FooterPrimary/index.js.map +1 -0
- package/lib/components/Core/components/HeaderPrimary/HeaderPrimary-story.js +134 -0
- package/lib/components/Core/components/HeaderPrimary/HeaderPrimary-story.js.map +1 -0
- package/lib/components/Core/components/HeaderPrimary/HeaderPrimary.js +238 -0
- package/lib/components/Core/components/HeaderPrimary/HeaderPrimary.js.map +1 -0
- package/lib/components/Core/components/HeaderPrimary/components/DefaultLockup/DefaultLockup.js +32 -0
- package/lib/components/Core/components/HeaderPrimary/components/DefaultLockup/DefaultLockup.js.map +1 -0
- package/lib/components/Core/components/HeaderPrimary/components/Hamburger/Hamburger.js +58 -0
- package/lib/components/Core/components/HeaderPrimary/components/Hamburger/Hamburger.js.map +1 -0
- package/lib/components/Core/components/HeaderPrimary/components/LocationMenu/LocationMenu.js +169 -0
- package/lib/components/Core/components/HeaderPrimary/components/LocationMenu/LocationMenu.js.map +1 -0
- package/lib/components/Core/components/HeaderPrimary/components/UserMenu/UserMenu.js +56 -0
- package/lib/components/Core/components/HeaderPrimary/components/UserMenu/UserMenu.js.map +1 -0
- package/lib/components/Core/components/ProfileSummary/ProfileSummary-story.js +26 -0
- package/lib/components/Core/components/ProfileSummary/ProfileSummary-story.js.map +1 -0
- package/lib/components/Core/components/ProfileSummary/ProfileSummary.js +46 -0
- package/lib/components/Core/components/ProfileSummary/ProfileSummary.js.map +1 -0
- package/lib/components/Core/components/SaveBar/SaveBar-story.js +68 -0
- package/lib/components/Core/components/SaveBar/SaveBar-story.js.map +1 -0
- package/lib/components/Core/components/SaveBar/SaveBar.js +127 -0
- package/lib/components/Core/components/SaveBar/SaveBar.js.map +1 -0
- package/lib/components/Core/components/Sidebar/Sidebar-story.js +204 -0
- package/lib/components/Core/components/Sidebar/Sidebar-story.js.map +1 -0
- package/lib/components/Core/components/Sidebar/Sidebar.js +87 -0
- package/lib/components/Core/components/Sidebar/Sidebar.js.map +1 -0
- package/lib/components/Core/components/Sidebar/components/SidebarExpander/SidebarExpander.js +48 -0
- package/lib/components/Core/components/Sidebar/components/SidebarExpander/SidebarExpander.js.map +1 -0
- package/lib/components/Core/components/Sidebar/components/SidebarFooter/SidebarFooter.js +25 -0
- package/lib/components/Core/components/Sidebar/components/SidebarFooter/SidebarFooter.js.map +1 -0
- package/lib/components/Core/components/Sidebar/components/SidebarHeader/SidebarHeader.d.ts +12 -0
- package/lib/components/Core/components/Sidebar/components/SidebarHeader/SidebarHeader.d.ts.map +1 -0
- package/lib/components/Core/components/Sidebar/components/SidebarHeader/SidebarHeader.js +47 -0
- package/lib/components/Core/components/Sidebar/components/SidebarHeader/SidebarHeader.js.map +1 -0
- package/lib/components/Core/components/Sidebar/components/SidebarItem/SidebarItem.js +115 -0
- package/lib/components/Core/components/Sidebar/components/SidebarItem/SidebarItem.js.map +1 -0
- package/lib/components/Core/components/Sidebar/components/SidebarSection/SidebarSection.js +38 -0
- package/lib/components/Core/components/Sidebar/components/SidebarSection/SidebarSection.js.map +1 -0
- package/lib/components/Core/index.js +80 -0
- package/lib/components/Core/index.js.map +1 -0
- package/lib/components/Dropzone/Dropzone-story.js +119 -0
- package/lib/components/Dropzone/Dropzone-story.js.map +1 -0
- package/lib/components/Dropzone/Dropzone.js +317 -0
- package/lib/components/Dropzone/Dropzone.js.map +1 -0
- package/lib/components/EmptyState/EmptyState-story.d.ts +2 -0
- package/lib/components/EmptyState/EmptyState-story.d.ts.map +1 -0
- package/lib/components/EmptyState/EmptyState-story.js +60 -0
- package/lib/components/EmptyState/EmptyState-story.js.map +1 -0
- package/lib/components/EmptyState/EmptyState.d.ts +28 -0
- package/lib/components/EmptyState/EmptyState.d.ts.map +1 -0
- package/lib/components/EmptyState/EmptyState.js +54 -0
- package/lib/components/EmptyState/EmptyState.js.map +1 -0
- package/lib/components/EventDetails/EventDetails-story.d.ts +2 -0
- package/lib/components/EventDetails/EventDetails-story.d.ts.map +1 -0
- package/lib/components/EventDetails/EventDetails-story.js +112 -0
- package/lib/components/EventDetails/EventDetails-story.js.map +1 -0
- package/lib/components/EventDetails/EventDetails.d.ts +18 -0
- package/lib/components/EventDetails/EventDetails.d.ts.map +1 -0
- package/lib/components/EventDetails/EventDetails.js +75 -0
- package/lib/components/EventDetails/EventDetails.js.map +1 -0
- package/lib/components/EventDetails/EventDetailsUtilities.d.ts +11 -0
- package/lib/components/EventDetails/EventDetailsUtilities.d.ts.map +1 -0
- package/lib/components/EventDetails/EventDetailsUtilities.js +56 -0
- package/lib/components/EventDetails/EventDetailsUtilities.js.map +1 -0
- package/lib/components/EventDetails/components/EventDetailsItem/EventDetailsItem.d.ts +18 -0
- package/lib/components/EventDetails/components/EventDetailsItem/EventDetailsItem.d.ts.map +1 -0
- package/lib/components/EventDetails/components/EventDetailsItem/EventDetailsItem.js +111 -0
- package/lib/components/EventDetails/components/EventDetailsItem/EventDetailsItem.js.map +1 -0
- package/lib/components/EventDetails/eventDetailsMock.d.ts +10 -0
- package/lib/components/EventDetails/eventDetailsMock.d.ts.map +1 -0
- package/lib/components/EventDetails/eventDetailsMock.js +840 -0
- package/lib/components/EventDetails/eventDetailsMock.js.map +1 -0
- package/lib/components/FontLoader/FontLoader-story.js +16 -0
- package/lib/components/FontLoader/FontLoader-story.js.map +1 -0
- package/lib/components/FontLoader/FontLoader.js +148 -0
- package/lib/components/FontLoader/FontLoader.js.map +1 -0
- package/lib/components/Forms/FormPartials.js +70 -0
- package/lib/components/Forms/FormPartials.js.map +1 -0
- package/lib/components/Forms/Forms-story.js +297 -0
- package/lib/components/Forms/Forms-story.js.map +1 -0
- package/lib/components/Forms/components/Autosuggest/Autosuggest.d.ts +71 -0
- package/lib/components/Forms/components/Autosuggest/Autosuggest.d.ts.map +1 -0
- package/lib/components/Forms/components/Autosuggest/Autosuggest.js +372 -0
- package/lib/components/Forms/components/Autosuggest/Autosuggest.js.map +1 -0
- package/lib/components/Forms/components/Checkbox/Checkbox.d.ts +23 -0
- package/lib/components/Forms/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/lib/components/Forms/components/Checkbox/Checkbox.js +162 -0
- package/lib/components/Forms/components/Checkbox/Checkbox.js.map +1 -0
- package/lib/components/Forms/components/DatePicker/DatePicker.js +236 -0
- package/lib/components/Forms/components/DatePicker/DatePicker.js.map +1 -0
- package/lib/components/Forms/components/DomainInput/DomainInput.js +29 -0
- package/lib/components/Forms/components/DomainInput/DomainInput.js.map +1 -0
- package/lib/components/Forms/components/DurationInput/DurationInput.js +270 -0
- package/lib/components/Forms/components/DurationInput/DurationInput.js.map +1 -0
- package/lib/components/Forms/components/FormBuilder/FormBuilder-story.js +357 -0
- package/lib/components/Forms/components/FormBuilder/FormBuilder-story.js.map +1 -0
- package/lib/components/Forms/components/FormBuilder/FormBuilder.js +121 -0
- package/lib/components/Forms/components/FormBuilder/FormBuilder.js.map +1 -0
- package/lib/components/Forms/components/FormBuilder/components/FormInner/FormInner.js +201 -0
- package/lib/components/Forms/components/FormBuilder/components/FormInner/FormInner.js.map +1 -0
- package/lib/components/Forms/components/FormLayout/FormLayout.js +35 -0
- package/lib/components/Forms/components/FormLayout/FormLayout.js.map +1 -0
- package/lib/components/Forms/components/FormLayout/components/FormLayoutGroup/FormLayoutGroup.js +30 -0
- package/lib/components/Forms/components/FormLayout/components/FormLayoutGroup/FormLayoutGroup.js.map +1 -0
- package/lib/components/Forms/components/FormLayout/components/FormLayoutItem/FormLayoutItem.js +32 -0
- package/lib/components/Forms/components/FormLayout/components/FormLayoutItem/FormLayoutItem.js.map +1 -0
- package/lib/components/Forms/components/FormLayout/index.js +32 -0
- package/lib/components/Forms/components/FormLayout/index.js.map +1 -0
- package/lib/components/Forms/components/PhoneInput/PhoneInput.d.ts +30 -0
- package/lib/components/Forms/components/PhoneInput/PhoneInput.d.ts.map +1 -0
- package/lib/components/Forms/components/PhoneInput/PhoneInput.js +119 -0
- package/lib/components/Forms/components/PhoneInput/PhoneInput.js.map +1 -0
- package/lib/components/Forms/components/Radio/Radio.d.ts +15 -0
- package/lib/components/Forms/components/Radio/Radio.d.ts.map +1 -0
- package/lib/components/Forms/components/Radio/Radio.js +92 -0
- package/lib/components/Forms/components/Radio/Radio.js.map +1 -0
- package/lib/components/Forms/components/Search/Search.js +96 -0
- package/lib/components/Forms/components/Search/Search.js.map +1 -0
- package/lib/components/Forms/components/Select/Select.js +95 -0
- package/lib/components/Forms/components/Select/Select.js.map +1 -0
- package/lib/components/Forms/components/Slider/Slider.js +100 -0
- package/lib/components/Forms/components/Slider/Slider.js.map +1 -0
- package/lib/components/Forms/components/Stars/Stars.js +101 -0
- package/lib/components/Forms/components/Stars/Stars.js.map +1 -0
- package/lib/components/Forms/components/Tag/Tag.js +60 -0
- package/lib/components/Forms/components/Tag/Tag.js.map +1 -0
- package/lib/components/Forms/components/TextArea/TextArea.js +55 -0
- package/lib/components/Forms/components/TextArea/TextArea.js.map +1 -0
- package/lib/components/Forms/components/TextInput/TextInput.d.ts +28 -0
- package/lib/components/Forms/components/TextInput/TextInput.d.ts.map +1 -0
- package/lib/components/Forms/components/TextInput/TextInput.js +57 -0
- package/lib/components/Forms/components/TextInput/TextInput.js.map +1 -0
- package/lib/components/Forms/components/Toggle/Toggle.d.ts +9 -0
- package/lib/components/Forms/components/Toggle/Toggle.d.ts.map +1 -0
- package/lib/components/Forms/components/Toggle/Toggle.js +43 -0
- package/lib/components/Forms/components/Toggle/Toggle.js.map +1 -0
- package/lib/components/Forms/index.d.ts +18 -0
- package/lib/components/Forms/index.d.ts.map +1 -0
- package/lib/components/Forms/index.js +182 -0
- package/lib/components/Forms/index.js.map +1 -0
- package/lib/components/Heading/Heading-story.js +18 -0
- package/lib/components/Heading/Heading-story.js.map +1 -0
- package/lib/components/Heading/Heading.d.ts +13 -0
- package/lib/components/Heading/Heading.d.ts.map +1 -0
- package/lib/components/Heading/Heading.js +32 -0
- package/lib/components/Heading/Heading.js.map +1 -0
- package/lib/components/Icon/Icon-story.d.ts +2 -0
- package/lib/components/Icon/Icon-story.d.ts.map +1 -0
- package/lib/components/Icon/Icon-story.js +44 -0
- package/lib/components/Icon/Icon-story.js.map +1 -0
- package/lib/components/Icon/Icon.d.ts +13 -0
- package/lib/components/Icon/Icon.d.ts.map +1 -0
- package/lib/components/Icon/Icon.js +52 -0
- package/lib/components/Icon/Icon.js.map +1 -0
- package/lib/components/Image/Image.d.ts +11 -0
- package/lib/components/Image/Image.d.ts.map +1 -0
- package/lib/components/Image/Image.js +32 -0
- package/lib/components/Image/Image.js.map +1 -0
- package/lib/components/ImageCropper/ImageCropper-story.js +219 -0
- package/lib/components/ImageCropper/ImageCropper-story.js.map +1 -0
- package/lib/components/ImageCropper/ImageCropper.js +256 -0
- package/lib/components/ImageCropper/ImageCropper.js.map +1 -0
- package/lib/components/ImageSSR/ImageSSR.js +32 -0
- package/lib/components/ImageSSR/ImageSSR.js.map +1 -0
- package/lib/components/Layout/Layout-story.js +128 -0
- package/lib/components/Layout/Layout-story.js.map +1 -0
- package/lib/components/Layout/Layout.js +43 -0
- package/lib/components/Layout/Layout.js.map +1 -0
- package/lib/components/Layout/components/LayoutSection/LayoutSection.js +38 -0
- package/lib/components/Layout/components/LayoutSection/LayoutSection.js.map +1 -0
- package/lib/components/Layout/index.js +24 -0
- package/lib/components/Layout/index.js.map +1 -0
- package/lib/components/List/List-story.d.ts +2 -0
- package/lib/components/List/List-story.d.ts.map +1 -0
- package/lib/components/List/List-story.js +241 -0
- package/lib/components/List/List-story.js.map +1 -0
- package/lib/components/List/List.d.ts +34 -0
- package/lib/components/List/List.d.ts.map +1 -0
- package/lib/components/List/List.js +83 -0
- package/lib/components/List/List.js.map +1 -0
- package/lib/components/List/components/ExpandableListItem/ExpandableListItem.d.ts +27 -0
- package/lib/components/List/components/ExpandableListItem/ExpandableListItem.d.ts.map +1 -0
- package/lib/components/List/components/ExpandableListItem/ExpandableListItem.js +93 -0
- package/lib/components/List/components/ExpandableListItem/ExpandableListItem.js.map +1 -0
- package/lib/components/List/components/ListHeader/ListHeader.d.ts +16 -0
- package/lib/components/List/components/ListHeader/ListHeader.d.ts.map +1 -0
- package/lib/components/List/components/ListHeader/ListHeader.js +51 -0
- package/lib/components/List/components/ListHeader/ListHeader.js.map +1 -0
- package/lib/components/List/components/ListItem/ListItem.d.ts +67 -0
- package/lib/components/List/components/ListItem/ListItem.d.ts.map +1 -0
- package/lib/components/List/components/ListItem/ListItem.js +206 -0
- package/lib/components/List/components/ListItem/ListItem.js.map +1 -0
- package/lib/components/List/components/SortableList/SortableList.d.ts +35 -0
- package/lib/components/List/components/SortableList/SortableList.d.ts.map +1 -0
- package/lib/components/List/components/SortableList/SortableList.js +180 -0
- package/lib/components/List/components/SortableList/SortableList.js.map +1 -0
- package/lib/components/List/index.d.ts +6 -0
- package/lib/components/List/index.d.ts.map +1 -0
- package/lib/components/List/index.js +74 -0
- package/lib/components/List/index.js.map +1 -0
- package/lib/components/Loader/Loader-story.js +30 -0
- package/lib/components/Loader/Loader-story.js.map +1 -0
- package/lib/components/Loader/Loader.js +36 -0
- package/lib/components/Loader/Loader.js.map +1 -0
- package/lib/components/Loader/Loader.test.js +17 -0
- package/lib/components/Loader/Loader.test.js.map +1 -0
- package/lib/components/MarkdownText/MarkdownText.d.ts +8 -0
- package/lib/components/MarkdownText/MarkdownText.d.ts.map +1 -0
- package/lib/components/MarkdownText/MarkdownText.js +26 -0
- package/lib/components/MarkdownText/MarkdownText.js.map +1 -0
- package/lib/components/Message/Message-story.js +135 -0
- package/lib/components/Message/Message-story.js.map +1 -0
- package/lib/components/Message/Message.js +147 -0
- package/lib/components/Message/Message.js.map +1 -0
- package/lib/components/Message/components/MessageBuilder.js +132 -0
- package/lib/components/Message/components/MessageBuilder.js.map +1 -0
- package/lib/components/Message/index.js +24 -0
- package/lib/components/Message/index.js.map +1 -0
- package/lib/components/Modal/Modal-story.js +239 -0
- package/lib/components/Modal/Modal-story.js.map +1 -0
- package/lib/components/Modal/Modal.js +86 -0
- package/lib/components/Modal/Modal.js.map +1 -0
- package/lib/components/Modal/components/ModalBody/ModalBody.js +30 -0
- package/lib/components/Modal/components/ModalBody/ModalBody.js.map +1 -0
- package/lib/components/Modal/components/ModalFooter/ModalFooter.js +31 -0
- package/lib/components/Modal/components/ModalFooter/ModalFooter.js.map +1 -0
- package/lib/components/Modal/components/ModalHeader/ModalHeader.js +84 -0
- package/lib/components/Modal/components/ModalHeader/ModalHeader.js.map +1 -0
- package/lib/components/Page/Page-story.js +115 -0
- package/lib/components/Page/Page-story.js.map +1 -0
- package/lib/components/Page/Page.js +55 -0
- package/lib/components/Page/Page.js.map +1 -0
- package/lib/components/Page/components/PageContent/PageContent.js +22 -0
- package/lib/components/Page/components/PageContent/PageContent.js.map +1 -0
- package/lib/components/Page/components/PageHeader/PageHeader.js +127 -0
- package/lib/components/Page/components/PageHeader/PageHeader.js.map +1 -0
- package/lib/components/Page/index.js +32 -0
- package/lib/components/Page/index.js.map +1 -0
- package/lib/components/PagedModal/PagedModal-story.js +121 -0
- package/lib/components/PagedModal/PagedModal-story.js.map +1 -0
- package/lib/components/PagedModal/PagedModal.js +84 -0
- package/lib/components/PagedModal/PagedModal.js.map +1 -0
- package/lib/components/Pagination/Pagination-story.js +35 -0
- package/lib/components/Pagination/Pagination-story.js.map +1 -0
- package/lib/components/Pagination/Pagination.js +157 -0
- package/lib/components/Pagination/Pagination.js.map +1 -0
- package/lib/components/RecordSelectionList/RecordSelectList-story.js +491 -0
- package/lib/components/RecordSelectionList/RecordSelectList-story.js.map +1 -0
- package/lib/components/RecordSelectionList/RecordSelectionList.d.ts +112 -0
- package/lib/components/RecordSelectionList/RecordSelectionList.d.ts.map +1 -0
- package/lib/components/RecordSelectionList/RecordSelectionList.js +702 -0
- package/lib/components/RecordSelectionList/RecordSelectionList.js.map +1 -0
- package/lib/components/RecordSelectionList/RecordSelectionListItem.d.ts +5 -0
- package/lib/components/RecordSelectionList/RecordSelectionListItem.d.ts.map +1 -0
- package/lib/components/RecordSelectionList/RecordSelectionListItem.js +20 -0
- package/lib/components/RecordSelectionList/RecordSelectionListItem.js.map +1 -0
- package/lib/components/RecordTable/RecordTable-story.d.ts +2 -0
- package/lib/components/RecordTable/RecordTable-story.d.ts.map +1 -0
- package/lib/components/RecordTable/RecordTable-story.js +242 -0
- package/lib/components/RecordTable/RecordTable-story.js.map +1 -0
- package/lib/components/RecordTable/RecordTable.d.ts +133 -0
- package/lib/components/RecordTable/RecordTable.d.ts.map +1 -0
- package/lib/components/RecordTable/RecordTable.js +523 -0
- package/lib/components/RecordTable/RecordTable.js.map +1 -0
- package/lib/components/SplitButton/SplitButton-story.js +60 -0
- package/lib/components/SplitButton/SplitButton-story.js.map +1 -0
- package/lib/components/SplitButton/SplitButton.d.ts +47 -0
- package/lib/components/SplitButton/SplitButton.d.ts.map +1 -0
- package/lib/components/SplitButton/SplitButton.js +296 -0
- package/lib/components/SplitButton/SplitButton.js.map +1 -0
- package/lib/components/Subheading/Subheading-story.js +18 -0
- package/lib/components/Subheading/Subheading-story.js.map +1 -0
- package/lib/components/Subheading/Subheading.js +40 -0
- package/lib/components/Subheading/Subheading.js.map +1 -0
- package/lib/components/Table/Table-story.js +428 -0
- package/lib/components/Table/Table-story.js.map +1 -0
- package/lib/components/Table/Table.d.ts +63 -0
- package/lib/components/Table/Table.d.ts.map +1 -0
- package/lib/components/Table/Table.js +395 -0
- package/lib/components/Table/Table.js.map +1 -0
- package/lib/components/Table/components/TableFilters/TableFilters.js +31 -0
- package/lib/components/Table/components/TableFilters/TableFilters.js.map +1 -0
- package/lib/components/Table/components/TableSearch/TableSearch.d.ts +7 -0
- package/lib/components/Table/components/TableSearch/TableSearch.d.ts.map +1 -0
- package/lib/components/Table/components/TableSearch/TableSearch.js +30 -0
- package/lib/components/Table/components/TableSearch/TableSearch.js.map +1 -0
- package/lib/components/Table/index.d.ts +4 -0
- package/lib/components/Table/index.d.ts.map +1 -0
- package/lib/components/Table/index.js +40 -0
- package/lib/components/Table/index.js.map +1 -0
- package/lib/components/Tabs/Tabs-story.d.ts +2 -0
- package/lib/components/Tabs/Tabs-story.d.ts.map +1 -0
- package/lib/components/Tabs/Tabs-story.js +36 -0
- package/lib/components/Tabs/Tabs-story.js.map +1 -0
- package/lib/components/Tabs/Tabs.d.ts +40 -0
- package/lib/components/Tabs/Tabs.d.ts.map +1 -0
- package/lib/components/Tabs/Tabs.js +244 -0
- package/lib/components/Tabs/Tabs.js.map +1 -0
- package/lib/components/Tabs/components/Tab/Tab.d.ts +26 -0
- package/lib/components/Tabs/components/Tab/Tab.d.ts.map +1 -0
- package/lib/components/Tabs/components/Tab/Tab.js +46 -0
- package/lib/components/Tabs/components/Tab/Tab.js.map +1 -0
- package/lib/components/Text/Text-story.d.ts +2 -0
- package/lib/components/Text/Text-story.d.ts.map +1 -0
- package/lib/components/Text/Text-story.js +51 -0
- package/lib/components/Text/Text-story.js.map +1 -0
- package/lib/components/Text/Text.d.ts +18 -0
- package/lib/components/Text/Text.d.ts.map +1 -0
- package/lib/components/Text/Text.js +123 -0
- package/lib/components/Text/Text.js.map +1 -0
- package/lib/components/TextContainer/TextContainer-story.js +32 -0
- package/lib/components/TextContainer/TextContainer-story.js.map +1 -0
- package/lib/components/TextContainer/TextContainer.js +33 -0
- package/lib/components/TextContainer/TextContainer.js.map +1 -0
- package/lib/components/TextStyle/TextStyle-story.js +28 -0
- package/lib/components/TextStyle/TextStyle-story.js.map +1 -0
- package/lib/components/TextStyle/TextStyle.js +41 -0
- package/lib/components/TextStyle/TextStyle.js.map +1 -0
- package/lib/components/Toast/Toast-story.d.ts +2 -0
- package/lib/components/Toast/Toast-story.d.ts.map +1 -0
- package/lib/components/Toast/Toast-story.js +210 -0
- package/lib/components/Toast/Toast-story.js.map +1 -0
- package/lib/components/Toast/Toast.d.ts +24 -0
- package/lib/components/Toast/Toast.d.ts.map +1 -0
- package/lib/components/Toast/Toast.js +76 -0
- package/lib/components/Toast/Toast.js.map +1 -0
- package/lib/components/Toast/components/ToastWrapper/ToastWrapper.d.ts +24 -0
- package/lib/components/Toast/components/ToastWrapper/ToastWrapper.d.ts.map +1 -0
- package/lib/components/Toast/components/ToastWrapper/ToastWrapper.js +131 -0
- package/lib/components/Toast/components/ToastWrapper/ToastWrapper.js.map +1 -0
- package/lib/components/TruncatedList/TruncatedList-story.js +222 -0
- package/lib/components/TruncatedList/TruncatedList-story.js.map +1 -0
- package/lib/components/TruncatedList/TruncatedList.d.ts +49 -0
- package/lib/components/TruncatedList/TruncatedList.d.ts.map +1 -0
- package/lib/components/TruncatedList/TruncatedList.js +188 -0
- package/lib/components/TruncatedList/TruncatedList.js.map +1 -0
- package/lib/components/View/View-story.js +485 -0
- package/lib/components/View/View-story.js.map +1 -0
- package/lib/components/View/View.d.ts +26 -0
- package/lib/components/View/View.d.ts.map +1 -0
- package/lib/components/View/View.js +91 -0
- package/lib/components/View/View.js.map +1 -0
- package/lib/components/_utilities/Anchor.js +28 -0
- package/lib/components/_utilities/Anchor.js.map +1 -0
- package/lib/custom-types.d.js +2 -0
- package/lib/custom-types.d.js.map +1 -0
- package/lib/icons.js +3328 -0
- package/lib/icons.js.map +1 -0
- package/lib/index.d.ts +46 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +707 -0
- package/lib/index.js.map +1 -0
- package/lib/stubs/events.js +166 -0
- package/lib/stubs/events.js.map +1 -0
- package/lib/stubs/location.js +34 -0
- package/lib/stubs/location.js.map +1 -0
- package/lib/stubs/users.js +225 -0
- package/lib/stubs/users.js.map +1 -0
- package/lib/utilities.js +23 -0
- package/lib/utilities.js.map +1 -0
- package/package.json +174 -0
- package/static/android-chrome-192x192.png +0 -0
- package/static/android-chrome-256x256.png +0 -0
- package/static/apple-touch-icon.png +0 -0
- package/static/assets/bg.jpeg +0 -0
- package/static/assets/icons/Design/Rotate/rotate-back.svg +9 -0
- package/static/assets/icons/Design/Rotate/rotate-forward.svg +9 -0
- package/static/assets/icons/Interface-Essential/Alerts/alert-triangle--16w.svg +3 -0
- package/static/assets/icons/Interface-Essential/Alerts/alert-triangle--56w.svg +5 -0
- package/static/assets/icons/Interface-Essential/Alerts/alert-triangle.svg +3 -0
- package/static/assets/icons/Interface-Essential/Dashboard/gauge-dashboard-1.svg +11 -0
- package/static/assets/icons/Interface-Essential/Date/Calendar/calendar-3.svg +12 -0
- package/static/assets/icons/Interface-Essential/Date/Calendar/calendar-date.svg +9 -0
- package/static/assets/icons/Interface-Essential/Delete/bin.svg +7 -0
- package/static/assets/icons/Interface-Essential/Edit/pencil-write.svg +5 -0
- package/static/assets/icons/Interface-Essential/Form-Edition/paper-write.svg +8 -0
- package/static/assets/icons/Interface-Essential/Form-Validation/check-circle-1.svg +4 -0
- package/static/assets/icons/Interface-Essential/Help/question-help-square--16w.svg +5 -0
- package/static/assets/icons/Interface-Essential/Help/question-help-square.svg +5 -0
- package/static/assets/icons/Interface-Essential/Home/house-1--16w.svg +4 -0
- package/static/assets/icons/Interface-Essential/Home/house-1.svg +4 -0
- package/static/assets/icons/Interface-Essential/Lists/list-bullets-1.svg +8 -0
- package/static/assets/icons/Interface-Essential/Lock/Unlock/Lock/Unlock-4.svg +5 -0
- package/static/assets/icons/Interface-Essential/Lock/Unlock/lock-6--16w.svg +3 -0
- package/static/assets/icons/Interface-Essential/Lock/Unlock/lock-6.svg +5 -0
- package/static/assets/icons/Interface-Essential/Login/Logout/logout.svg +5 -0
- package/static/assets/icons/Interface-Essential/Menu/navigation-menu-horizontal.svg +5 -0
- package/static/assets/icons/Interface-Essential/Select/cursor-select-4.svg +14 -0
- package/static/assets/icons/Interface-Essential/Time/stopwatch.svg +8 -0
- package/static/assets/icons/Interface-Essential/Time-Files/time-clock-file-check.svg +7 -0
- package/static/assets/icons/Interface-Essential/Time-Files/time-clock-file-upload.svg +9 -0
- package/static/assets/icons/Maps-Navigation/Pins/pin-2.svg +4 -0
- package/static/assets/icons/Maps-Navigation/Pins/pin.svg +4 -0
- package/static/assets/icons/Messages-Chat-Smileys/Conversation/conversation-text--16w.svg +8 -0
- package/static/assets/icons/Messages-Chat-Smileys/Conversation/conversation-text.svg +8 -0
- package/static/assets/icons/Messages-Chat-Smileys/Messages-Speech-Bubbles/messages-bubble-square-text.svg +5 -0
- package/static/assets/icons/Phones-Mobile-Devices/Phone/phone-retro-1.svg +7 -0
- package/static/assets/icons/Programming-Apps-Websites/Plugins/Modules/module-puzzle.svg +3 -0
- package/static/assets/icons/Shopping-E-Commerce/Shops/shop-1--56w.svg +6 -0
- package/static/assets/icons/Shopping-E-Commerce/Shops/shop-1.svg +7 -0
- package/static/assets/icons/Social-Medias-Rewards-Rating/Rating/rating-star-1-1.svg +3 -0
- package/static/assets/icons/Social-Medias-Rewards-Rating/Rating/rating-star-1.svg +3 -0
- package/static/assets/icons/Transportation/Aircraft/aircraft-military-plane.svg +18 -0
- package/static/assets/icons/Users/Geometric-Close-Up-Single-User-Actions-Neutral/single-neutral-actions-image--56w.svg +7 -0
- package/static/assets/icons/Users/Geometric-Close-Up-Single-User-Actions-Neutral/single-neutral-actions-up-down.svg +8 -0
- package/static/assets/icons/Users/Geometric-Close-Up-Single-User-Neutral/single-neutral-id-card-3.svg +8 -0
- package/static/assets/icons/Users/Geometric-Full-Body-Multiple-Users/multiple-users-1.svg +8 -0
- package/static/assets/icons/Work-Office-Companies/Human-Resources/human-resources-search-team--16w.svg +8 -0
- package/static/assets/icons/Work-Office-Companies/Human-Resources/human-resources-search-team.svg +8 -0
- package/static/assets/icons/ic_add.svg +5 -0
- package/static/assets/icons/ic_add_circle_outline.svg +3 -0
- package/static/assets/icons/ic_arrow_back.svg +3 -0
- package/static/assets/icons/ic_arrow_drop_down.svg +3 -0
- package/static/assets/icons/ic_arrow_forward.svg +3 -0
- package/static/assets/icons/ic_button.svg +3 -0
- package/static/assets/icons/ic_calendar.svg +12 -0
- package/static/assets/icons/ic_cancel.svg +8 -0
- package/static/assets/icons/ic_caution.svg +3 -0
- package/static/assets/icons/ic_caution_light_large.svg +5 -0
- package/static/assets/icons/ic_check_box.svg +3 -0
- package/static/assets/icons/ic_check_box_outline_blank.svg +3 -0
- package/static/assets/icons/ic_check_circle.svg +3 -0
- package/static/assets/icons/ic_close.svg +3 -0
- package/static/assets/icons/ic_colors.svg +8 -0
- package/static/assets/icons/ic_complete.svg +4 -0
- package/static/assets/icons/ic_css.svg +7 -0
- package/static/assets/icons/ic_dashboard.svg +11 -0
- package/static/assets/icons/ic_date.svg +9 -0
- package/static/assets/icons/ic_date_disable.svg +8 -0
- package/static/assets/icons/ic_delete.svg +7 -0
- package/static/assets/icons/ic_disable.svg +3 -0
- package/static/assets/icons/ic_drag_handle.svg +3 -0
- package/static/assets/icons/ic_drop_light_large.svg +14 -0
- package/static/assets/icons/ic_edit.svg +5 -0
- package/static/assets/icons/ic_email.svg +6 -0
- package/static/assets/icons/ic_fonts.svg +6 -0
- package/static/assets/icons/ic_fullscreen.svg +3 -0
- package/static/assets/icons/ic_fullscreen_exit.svg +3 -0
- package/static/assets/icons/ic_guests.svg +8 -0
- package/static/assets/icons/ic_help.svg +5 -0
- package/static/assets/icons/ic_home.svg +4 -0
- package/static/assets/icons/ic_indeterminate_check_box.svg +3 -0
- package/static/assets/icons/ic_keyboard_arrow_left.svg +3 -0
- package/static/assets/icons/ic_keyboard_arrow_right.svg +3 -0
- package/static/assets/icons/ic_late.svg +5 -0
- package/static/assets/icons/ic_launch.svg +18 -0
- package/static/assets/icons/ic_location.svg +4 -0
- package/static/assets/icons/ic_logout.svg +5 -0
- package/static/assets/icons/ic_menu.svg +3 -0
- package/static/assets/icons/ic_message.svg +5 -0
- package/static/assets/icons/ic_message_failed.svg +7 -0
- package/static/assets/icons/ic_messages.svg +8 -0
- package/static/assets/icons/ic_more.svg +5 -0
- package/static/assets/icons/ic_new_tab.svg +3 -0
- package/static/assets/icons/ic_note.svg +8 -0
- package/static/assets/icons/ic_payment_failed_solid.svg +5 -0
- package/static/assets/icons/ic_payment_success_solid.svg +5 -0
- package/static/assets/icons/ic_phone.svg +7 -0
- package/static/assets/icons/ic_pin.svg +4 -0
- package/static/assets/icons/ic_pin_outline.svg +4 -0
- package/static/assets/icons/ic_power.svg +4 -0
- package/static/assets/icons/ic_private.svg +5 -0
- package/static/assets/icons/ic_profile_image_light_large.svg +7 -0
- package/static/assets/icons/ic_public.svg +5 -0
- package/static/assets/icons/ic_radio_button_checked.svg +3 -0
- package/static/assets/icons/ic_radio_button_unchecked.svg +3 -0
- package/static/assets/icons/ic_rotate_left.svg +9 -0
- package/static/assets/icons/ic_rotate_right.svg +9 -0
- package/static/assets/icons/ic_search.svg +3 -0
- package/static/assets/icons/ic_settings.svg +4 -0
- package/static/assets/icons/ic_shop_light_large.svg +6 -0
- package/static/assets/icons/ic_show.svg +4 -0
- package/static/assets/icons/ic_skill.svg +3 -0
- package/static/assets/icons/ic_star_outline.svg +3 -0
- package/static/assets/icons/ic_star_solid.svg +3 -0
- package/static/assets/icons/ic_status.svg +8 -0
- package/static/assets/icons/ic_store.svg +7 -0
- package/static/assets/icons/ic_switch_users.svg +8 -0
- package/static/assets/icons/ic_team.svg +8 -0
- package/static/assets/icons/ic_teammates.svg +8 -0
- package/static/assets/icons/ic_unordered_list.svg +8 -0
- package/static/assets/icons/ic_upload.svg +8 -0
- package/static/assets/icons/ic_upload_file_light_large.svg +9 -0
- package/static/assets/icons/ic_upload_file_success_light_large.svg +7 -0
- package/static/assets/icons/ic_user_avatar.svg +3 -0
- package/static/assets/icons/ic_wifi.svg +9 -0
- package/static/assets/icons/s-ic_spruce-logo-02.svg +3 -0
- package/static/assets/icons/s-ic_spruce-logo.svg +3 -0
- package/static/assets/logo.png +0 -0
- package/static/assets/users/user-01--96w.png +0 -0
- package/static/assets/users/user-01.png +0 -0
- package/static/assets/users/user-02--96w.png +0 -0
- package/static/assets/users/user-03--96w.png +0 -0
- package/static/assets/users/user-04--96w.png +0 -0
- package/static/assets/users/user-04.png +0 -0
- package/static/assets/users/user-05--96w.png +0 -0
- package/static/assets/users/user-05.png +0 -0
- package/static/assets/users/user-06--96w.png +0 -0
- package/static/assets/users/user-06.png +0 -0
- package/static/assets/users/user-07--96w.png +0 -0
- package/static/assets/users/user-07.png +0 -0
- package/static/assets/users/user-08--96w.png +0 -0
- package/static/assets/users/user-08.png +0 -0
- package/static/assets/users/user-09--96w.png +0 -0
- package/static/assets/users/user-09.png +0 -0
- package/static/assets/users/user-placeholder--96w.png +0 -0
- package/static/assets/users/user-placeholder.png +0 -0
- package/static/browserconfig.xml +9 -0
- package/static/favicon-16x16.png +0 -0
- package/static/favicon-32x32.png +0 -0
- package/static/favicon.ico +0 -0
- package/static/mstile-150x150.png +0 -0
- package/static/safari-pinned-tab.svg +26 -0
- package/static/site.webmanifest +19 -0
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
|
|
15
|
+
|
|
16
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
17
|
+
|
|
18
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
19
|
+
|
|
20
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
21
|
+
|
|
22
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
23
|
+
|
|
24
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
25
|
+
|
|
26
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
27
|
+
|
|
28
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
29
|
+
|
|
30
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
31
|
+
|
|
32
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
33
|
+
|
|
34
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
35
|
+
|
|
36
|
+
var _reactTable = _interopRequireDefault(require("react-table"));
|
|
37
|
+
|
|
38
|
+
var _reactTransitionGroup = require("react-transition-group");
|
|
39
|
+
|
|
40
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
41
|
+
|
|
42
|
+
var _Forms = require("../Forms");
|
|
43
|
+
|
|
44
|
+
var _Icon = _interopRequireDefault(require("../Icon/Icon"));
|
|
45
|
+
|
|
46
|
+
var _Card = _interopRequireDefault(require("../Card/Card"));
|
|
47
|
+
|
|
48
|
+
var _Pagination = _interopRequireDefault(require("../Pagination/Pagination"));
|
|
49
|
+
|
|
50
|
+
var _EmptyState = _interopRequireDefault(require("../EmptyState/EmptyState"));
|
|
51
|
+
|
|
52
|
+
var _ContextMenu = _interopRequireDefault(require("../ContextMenu/ContextMenu"));
|
|
53
|
+
|
|
54
|
+
// Uses React Table. See https://react-table.js.org/#/story/readme details.
|
|
55
|
+
var Table =
|
|
56
|
+
/*#__PURE__*/
|
|
57
|
+
function (_Component) {
|
|
58
|
+
(0, _inherits2["default"])(Table, _Component);
|
|
59
|
+
|
|
60
|
+
function Table(props) {
|
|
61
|
+
var _this;
|
|
62
|
+
|
|
63
|
+
(0, _classCallCheck2["default"])(this, Table);
|
|
64
|
+
_this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(Table).call(this, props));
|
|
65
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleChange", function (_ref) {
|
|
66
|
+
var id = _ref.id;
|
|
67
|
+
var _this$props = _this.props,
|
|
68
|
+
onSelection = _this$props.onSelection,
|
|
69
|
+
totalRows = _this$props.totalRows;
|
|
70
|
+
|
|
71
|
+
_this.setState(function (prevState) {
|
|
72
|
+
var idx = prevState.selectedIds.indexOf(id);
|
|
73
|
+
var newIds = (0, _toConsumableArray2["default"])(prevState.selectedIds);
|
|
74
|
+
|
|
75
|
+
if (idx > -1) {
|
|
76
|
+
newIds.splice(idx, 1);
|
|
77
|
+
} else {
|
|
78
|
+
if (prevState.selectedIds.length === 0) {
|
|
79
|
+
newIds = [id];
|
|
80
|
+
} else {
|
|
81
|
+
newIds.push(id);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
selectedIds: newIds,
|
|
87
|
+
allRowsSelected: newIds.length === totalRows
|
|
88
|
+
};
|
|
89
|
+
}, function () {
|
|
90
|
+
onSelection && onSelection({
|
|
91
|
+
selectedIds: _this.state.selectedIds
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleSelectAll", function () {
|
|
96
|
+
var onSelection = _this.props.onSelection;
|
|
97
|
+
var currentPage = _this.table.state.page;
|
|
98
|
+
var pageSize = _this.table.state.pageSize;
|
|
99
|
+
|
|
100
|
+
var allRows = _this.table.getResolvedState().sortedData;
|
|
101
|
+
|
|
102
|
+
var startIdx = currentPage * pageSize;
|
|
103
|
+
var currentRows = allRows.slice(startIdx, startIdx + pageSize).map(function (item) {
|
|
104
|
+
return item._original;
|
|
105
|
+
});
|
|
106
|
+
var visibleIds = currentRows.map(function (row) {
|
|
107
|
+
return row.id;
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
_this.setState(function (prevState) {
|
|
111
|
+
return {
|
|
112
|
+
selectedIds: prevState.selectedIds.length > 0 ? [] : [].concat((0, _toConsumableArray2["default"])(prevState.selectedIds), (0, _toConsumableArray2["default"])(visibleIds))
|
|
113
|
+
};
|
|
114
|
+
}, function () {
|
|
115
|
+
onSelection && onSelection({
|
|
116
|
+
selectedIds: _this.state.selectedIds
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleClickRow", function (e, handleOriginal) {
|
|
121
|
+
var _this$props$onClickRo = _this.props.onClickRow,
|
|
122
|
+
onClickRow = _this$props$onClickRo === void 0 ? function () {} : _this$props$onClickRo; // determine which row we clicked
|
|
123
|
+
|
|
124
|
+
var children = (0, _toConsumableArray2["default"])(e.currentTarget.parentNode.parentNode.children);
|
|
125
|
+
var idx = children.indexOf(e.currentTarget.parentNode);
|
|
126
|
+
onClickRow(e, {
|
|
127
|
+
idx: idx,
|
|
128
|
+
item: _this.props.data[idx]
|
|
129
|
+
});
|
|
130
|
+
handleOriginal && handleOriginal(e);
|
|
131
|
+
});
|
|
132
|
+
_this.state = {
|
|
133
|
+
selectedIds: props.initialSelectedIds || [],
|
|
134
|
+
allRowsSelected: false
|
|
135
|
+
};
|
|
136
|
+
return _this;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
(0, _createClass2["default"])(Table, [{
|
|
140
|
+
key: "render",
|
|
141
|
+
value: function render() {
|
|
142
|
+
var _this2 = this;
|
|
143
|
+
|
|
144
|
+
var _this$props2 = this.props,
|
|
145
|
+
data = _this$props2.data,
|
|
146
|
+
totalRows = _this$props2.totalRows,
|
|
147
|
+
columns = _this$props2.columns,
|
|
148
|
+
className = _this$props2.className,
|
|
149
|
+
paginationProps = _this$props2.paginationProps,
|
|
150
|
+
isSelectable = _this$props2.isSelectable,
|
|
151
|
+
kind = _this$props2.kind,
|
|
152
|
+
pluralKind = _this$props2.pluralKind,
|
|
153
|
+
bulkActions = _this$props2.bulkActions,
|
|
154
|
+
sortable = _this$props2.sortable,
|
|
155
|
+
noDataIcon = _this$props2.noDataIcon,
|
|
156
|
+
noDataHeadline = _this$props2.noDataHeadline,
|
|
157
|
+
noDataSubheadline = _this$props2.noDataSubheadline,
|
|
158
|
+
noDataPrimaryAction = _this$props2.noDataPrimaryAction,
|
|
159
|
+
noDataPrimaryActionButtonKind = _this$props2.noDataPrimaryActionButtonKind,
|
|
160
|
+
noDataPrimaryActionButtonIcon = _this$props2.noDataPrimaryActionButtonIcon,
|
|
161
|
+
subComponentForRow = _this$props2.subComponentForRow,
|
|
162
|
+
rowIsDirty = _this$props2.rowIsDirty,
|
|
163
|
+
rest = (0, _objectWithoutProperties2["default"])(_this$props2, ["data", "totalRows", "columns", "className", "paginationProps", "isSelectable", "kind", "pluralKind", "bulkActions", "sortable", "noDataIcon", "noDataHeadline", "noDataSubheadline", "noDataPrimaryAction", "noDataPrimaryActionButtonKind", "noDataPrimaryActionButtonIcon", "subComponentForRow", "rowIsDirty"]);
|
|
164
|
+
var selectedIds = this.state.selectedIds;
|
|
165
|
+
var columnsToRender = (0, _toConsumableArray2["default"])(columns);
|
|
166
|
+
|
|
167
|
+
if (isSelectable) {
|
|
168
|
+
columnsToRender.unshift({
|
|
169
|
+
id: 'checkbox',
|
|
170
|
+
accessor: '',
|
|
171
|
+
Header: function Header() {
|
|
172
|
+
return _react["default"].createElement(_Forms.Checkbox, {
|
|
173
|
+
id: "",
|
|
174
|
+
isIndeterminate: selectedIds.length > 0 && selectedIds.length < totalRows // NOTE: Using state here because this Header can't access page size on its own
|
|
175
|
+
,
|
|
176
|
+
isChecked: selectedIds.length > 0,
|
|
177
|
+
onChange: function onChange() {
|
|
178
|
+
return _this2.handleSelectAll();
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
Cell: function Cell(props) {
|
|
183
|
+
var original = props.original,
|
|
184
|
+
pageSize = props.pageSize;
|
|
185
|
+
var id = original.id;
|
|
186
|
+
return _react["default"].createElement(_Forms.Checkbox, {
|
|
187
|
+
id: id,
|
|
188
|
+
isChecked: selectedIds.indexOf(id) > -1,
|
|
189
|
+
onChange: function onChange() {
|
|
190
|
+
return _this2.handleChange({
|
|
191
|
+
id: id,
|
|
192
|
+
pageSize: pageSize
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
},
|
|
197
|
+
sortable: false,
|
|
198
|
+
width: 36
|
|
199
|
+
});
|
|
200
|
+
} // Handle updating header columns when at least one row is selected
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
if (isSelectable && selectedIds.length > 0) {
|
|
204
|
+
var numSelectedRows = selectedIds.length;
|
|
205
|
+
var selectedText = "".concat(numSelectedRows, " selected");
|
|
206
|
+
|
|
207
|
+
if (numSelectedRows > 1) {
|
|
208
|
+
if (pluralKind) {
|
|
209
|
+
selectedText = "".concat(numSelectedRows, " ").concat(pluralKind, " selected");
|
|
210
|
+
} else if (kind) {
|
|
211
|
+
selectedText = "".concat(numSelectedRows, " ").concat(kind, "s selected");
|
|
212
|
+
}
|
|
213
|
+
} else {
|
|
214
|
+
if (kind) {
|
|
215
|
+
selectedText = "".concat(numSelectedRows, " ").concat(kind, " selected");
|
|
216
|
+
}
|
|
217
|
+
} // Change the header text to reflect which rows are selected
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
columnsToRender = columnsToRender.map(function (col, idx) {
|
|
221
|
+
if (idx === 0) {
|
|
222
|
+
return col;
|
|
223
|
+
} else if (idx === 1) {
|
|
224
|
+
return (0, _objectSpread2["default"])({}, col, {
|
|
225
|
+
Header: function Header() {
|
|
226
|
+
return _react["default"].createElement(_react.Fragment, null, _react["default"].createElement("p", {
|
|
227
|
+
className: "table-selected-text"
|
|
228
|
+
}, selectedText), bulkActions && bulkActions.length > 0 && _react["default"].createElement(_ContextMenu["default"], {
|
|
229
|
+
actions: bulkActions,
|
|
230
|
+
text: "Actions",
|
|
231
|
+
isSimple: true,
|
|
232
|
+
isTextOnly: true,
|
|
233
|
+
isLeftAligned: true,
|
|
234
|
+
closeOnSelectAction: true
|
|
235
|
+
}));
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
return (0, _objectSpread2["default"])({}, col, {
|
|
241
|
+
Header: null
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
return _react["default"].createElement(_reactTable["default"], (0, _extends2["default"])({
|
|
247
|
+
ref: function ref(_ref2) {
|
|
248
|
+
return _this2.table = _ref2;
|
|
249
|
+
},
|
|
250
|
+
data: data,
|
|
251
|
+
columns: columnsToRender,
|
|
252
|
+
className: (0, _classnames["default"])('table', className),
|
|
253
|
+
sortable: isSelectable && selectedIds.length > 0 ? false : sortable,
|
|
254
|
+
expanderDefaults: {
|
|
255
|
+
sortable: false,
|
|
256
|
+
resizable: false,
|
|
257
|
+
filterable: false,
|
|
258
|
+
width: 40
|
|
259
|
+
},
|
|
260
|
+
getTableProps: function getTableProps() {
|
|
261
|
+
return {
|
|
262
|
+
className: 'table__inner'
|
|
263
|
+
};
|
|
264
|
+
},
|
|
265
|
+
getTbodyProps: function getTbodyProps() {
|
|
266
|
+
return {
|
|
267
|
+
className: 'table__body'
|
|
268
|
+
};
|
|
269
|
+
},
|
|
270
|
+
getTheadTrProps: function getTheadTrProps() {
|
|
271
|
+
return {
|
|
272
|
+
className: (0, _classnames["default"])('table-header-row', {
|
|
273
|
+
'table-header-row--has-selections': isSelectable && selectedIds.length > 0
|
|
274
|
+
})
|
|
275
|
+
};
|
|
276
|
+
},
|
|
277
|
+
getTheadThProps: function getTheadThProps(state, rowInfo, column) {
|
|
278
|
+
return {
|
|
279
|
+
className: (0, _classnames["default"])('table-header-cell', {
|
|
280
|
+
'table-checkbox-cell': column && column.id === 'checkbox'
|
|
281
|
+
}),
|
|
282
|
+
width: 'auto'
|
|
283
|
+
};
|
|
284
|
+
},
|
|
285
|
+
getTrGroupProps: function getTrGroupProps(state, rowInfo) {
|
|
286
|
+
var expanded = state.expanded[rowInfo.viewIndex];
|
|
287
|
+
var isDirty = typeof rowIsDirty === 'function' && !!rowIsDirty(rowInfo) || rowInfo.original.isDirty;
|
|
288
|
+
return {
|
|
289
|
+
className: (0, _classnames["default"])('table-row-group', {
|
|
290
|
+
'table-row-group--expanded': expanded,
|
|
291
|
+
'table-row-group--is-dirty': isDirty
|
|
292
|
+
})
|
|
293
|
+
};
|
|
294
|
+
},
|
|
295
|
+
getTrProps: function getTrProps(state, rowInfo) {
|
|
296
|
+
var expanded = state.expanded[rowInfo.viewIndex];
|
|
297
|
+
var isDirty = typeof rowIsDirty === 'function' && !!rowIsDirty(rowInfo) || rowInfo.original.isDirty;
|
|
298
|
+
return {
|
|
299
|
+
className: (0, _classnames["default"])('table-row', {
|
|
300
|
+
'table-row--expanded': expanded,
|
|
301
|
+
'table-row--is-dirty': isDirty
|
|
302
|
+
}),
|
|
303
|
+
onClick: _this2.handleClickRow
|
|
304
|
+
};
|
|
305
|
+
},
|
|
306
|
+
getTdProps: function getTdProps(state, rowInfo, column) {
|
|
307
|
+
return {
|
|
308
|
+
className: (0, _classnames["default"])('table-cell', {
|
|
309
|
+
'table-checkbox-cell': column.id === 'checkbox',
|
|
310
|
+
'table-expander-cell': column.expander
|
|
311
|
+
}),
|
|
312
|
+
width: 'auto'
|
|
313
|
+
};
|
|
314
|
+
},
|
|
315
|
+
getPaginationProps: function getPaginationProps() {
|
|
316
|
+
return {
|
|
317
|
+
className: 'table__pagination'
|
|
318
|
+
};
|
|
319
|
+
},
|
|
320
|
+
getLoadingProps: function getLoadingProps(state) {
|
|
321
|
+
return {
|
|
322
|
+
className: state.loading ? 'table-loader--is-visible' : 'table-loader'
|
|
323
|
+
};
|
|
324
|
+
},
|
|
325
|
+
getNoDataProps: function getNoDataProps() {
|
|
326
|
+
return {
|
|
327
|
+
icon: noDataIcon,
|
|
328
|
+
headline: noDataHeadline,
|
|
329
|
+
subheadline: noDataSubheadline,
|
|
330
|
+
primaryAction: noDataPrimaryAction,
|
|
331
|
+
primaryActionButtonKind: noDataPrimaryActionButtonKind,
|
|
332
|
+
primaryActionButtonIcon: noDataPrimaryActionButtonIcon
|
|
333
|
+
};
|
|
334
|
+
},
|
|
335
|
+
SubComponent: subComponentForRow ? function (row) {
|
|
336
|
+
return _react["default"].createElement(_reactTransitionGroup.CSSTransition, {
|
|
337
|
+
"in": true,
|
|
338
|
+
appear: true,
|
|
339
|
+
classNames: "table-subcomponent",
|
|
340
|
+
timeout: 100
|
|
341
|
+
}, _react["default"].createElement("div", {
|
|
342
|
+
className: 'table-subcomponent'
|
|
343
|
+
}, _react["default"].createElement(_Card["default"], null, subComponentForRow(row))));
|
|
344
|
+
} : undefined,
|
|
345
|
+
NoDataComponent: _EmptyState["default"] // @ts-ignore-next-line
|
|
346
|
+
,
|
|
347
|
+
ExpanderComponent: _react["default"].createElement(_Icon["default"], {
|
|
348
|
+
name: 'keyboard_arrow_right',
|
|
349
|
+
className: 'table-expander-row'
|
|
350
|
+
}),
|
|
351
|
+
ThComponent: function ThComponent(tableProps) {
|
|
352
|
+
var toggleSort = tableProps.toggleSort,
|
|
353
|
+
className = tableProps.className,
|
|
354
|
+
rest = (0, _objectWithoutProperties2["default"])(tableProps, ["toggleSort", "className"]);
|
|
355
|
+
var isSortable = className && className.indexOf('-cursor-pointer') > -1;
|
|
356
|
+
var isSortedAsc = className && className.indexOf('-sort-asc') > -1;
|
|
357
|
+
var isSortedDesc = tableProps.className && tableProps.className.indexOf('-sort-desc') > -1;
|
|
358
|
+
return _react["default"].createElement("div", (0, _extends2["default"])({
|
|
359
|
+
onClick: toggleSort,
|
|
360
|
+
className: (0, _classnames["default"])(className, {
|
|
361
|
+
'table-header-cell--is-sortable': (isSortable || isSortedAsc || isSortedDesc) && selectedIds.length === 0,
|
|
362
|
+
'table-header-cell--is-sorted-asc': isSortedAsc,
|
|
363
|
+
'table-header-cell--is-sorted-desc': isSortedDesc
|
|
364
|
+
})
|
|
365
|
+
}, rest), tableProps.children, (isSortable || isSortedAsc || isSortedDesc) && selectedIds.length === 0 && _react["default"].createElement(_Icon["default"], {
|
|
366
|
+
name: "arrow_drop_down",
|
|
367
|
+
className: (0, _classnames["default"])('table-header-cell__icon', {
|
|
368
|
+
'table-header-cell__icon--is-visible': isSortedAsc || isSortedDesc,
|
|
369
|
+
'table-header-cell__icon--is-reversed': isSortedDesc
|
|
370
|
+
})
|
|
371
|
+
}));
|
|
372
|
+
},
|
|
373
|
+
PaginationComponent: function PaginationComponent(tableProps) {
|
|
374
|
+
return tableProps.page === 0 && totalRows <= tableProps.pageSize ? null : _react["default"].createElement("div", {
|
|
375
|
+
className: "table-pagination__wrapper"
|
|
376
|
+
}, _react["default"].createElement(_Pagination["default"], (0, _extends2["default"])({}, paginationProps, tableProps)));
|
|
377
|
+
}
|
|
378
|
+
}, rest));
|
|
379
|
+
}
|
|
380
|
+
}]);
|
|
381
|
+
return Table;
|
|
382
|
+
}(_react.Component);
|
|
383
|
+
|
|
384
|
+
exports["default"] = Table;
|
|
385
|
+
(0, _defineProperty2["default"])(Table, "defaultProps", {
|
|
386
|
+
className: '',
|
|
387
|
+
paginationProps: {},
|
|
388
|
+
isSelectable: false,
|
|
389
|
+
noDataIcon: 'empty_box',
|
|
390
|
+
noDataHeadline: 'Nothing to see here',
|
|
391
|
+
noDataPrimaryAction: null,
|
|
392
|
+
noDataPrimaryActionButtonKind: 'simple',
|
|
393
|
+
noDataPrimaryActionButtonIcon: null
|
|
394
|
+
});
|
|
395
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Table/Table.tsx"],"names":["Table","props","id","onSelection","totalRows","setState","prevState","idx","selectedIds","indexOf","newIds","splice","length","push","allRowsSelected","state","currentPage","table","page","pageSize","allRows","getResolvedState","sortedData","startIdx","currentRows","slice","map","item","_original","visibleIds","row","e","handleOriginal","onClickRow","children","currentTarget","parentNode","data","initialSelectedIds","columns","className","paginationProps","isSelectable","kind","pluralKind","bulkActions","sortable","noDataIcon","noDataHeadline","noDataSubheadline","noDataPrimaryAction","noDataPrimaryActionButtonKind","noDataPrimaryActionButtonIcon","subComponentForRow","rowIsDirty","rest","columnsToRender","unshift","accessor","Header","handleSelectAll","Cell","original","handleChange","width","numSelectedRows","selectedText","col","ref","resizable","filterable","rowInfo","column","expanded","viewIndex","isDirty","onClick","handleClickRow","expander","loading","icon","headline","subheadline","primaryAction","primaryActionButtonKind","primaryActionButtonIcon","undefined","EmptyState","tableProps","toggleSort","isSortable","isSortedAsc","isSortedDesc","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAVA;IA6EqBA,K;;;;;AAcpB,iBAAmBC,KAAnB,EAAuC;AAAA;;AAAA;AACtC,iHAAMA,KAAN;AADsC,qGAyQhB,gBAAiB;AAAA,UAAdC,EAAc,QAAdA,EAAc;AAAA,wBACJ,MAAKD,KADD;AAAA,UAC/BE,WAD+B,eAC/BA,WAD+B;AAAA,UAClBC,SADkB,eAClBA,SADkB;;AAEvC,YAAKC,QAAL,CACC,UAAAC,SAAS,EAAI;AACZ,YAAMC,GAAG,GAAGD,SAAS,CAACE,WAAV,CAAsBC,OAAtB,CAA8BP,EAA9B,CAAZ;AACA,YAAIQ,MAAM,uCAAOJ,SAAS,CAACE,WAAjB,CAAV;;AACA,YAAID,GAAG,GAAG,CAAC,CAAX,EAAc;AACbG,UAAAA,MAAM,CAACC,MAAP,CAAcJ,GAAd,EAAmB,CAAnB;AACA,SAFD,MAEO;AACN,cAAID,SAAS,CAACE,WAAV,CAAsBI,MAAtB,KAAiC,CAArC,EAAwC;AACvCF,YAAAA,MAAM,GAAG,CAACR,EAAD,CAAT;AACA,WAFD,MAEO;AACNQ,YAAAA,MAAM,CAACG,IAAP,CAAYX,EAAZ;AACA;AACD;;AACD,eAAO;AACNM,UAAAA,WAAW,EAAEE,MADP;AAENI,UAAAA,eAAe,EAAEJ,MAAM,CAACE,MAAP,KAAkBR;AAF7B,SAAP;AAIA,OAjBF,EAkBC,YA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,EAAE,qBALa;AAM7BE,EAAAA,mBAAmB,EAAE,IANQ;AAO7BC,EAAAA,6BAA6B,EAAE,QAPF;AAQ7BC,EAAAA,6BAA6B,EAAE;AARF,C","sourcesContent":["// Uses React Table. See https://react-table.js.org/#/story/readme details.\nimport React, { Component, Fragment, ReactElement } from 'react'\nimport ReactTable, { TableProps } from 'react-table'\nimport { CSSTransition } from 'react-transition-group'\nimport cx from 'classnames'\nimport { Checkbox } from '../Forms'\nimport Icon from '../Icon/Icon'\nimport Card from '../Card/Card'\nimport Pagination from '../Pagination/Pagination'\nimport EmptyState from '../EmptyState/EmptyState'\nimport ContextMenu from '../ContextMenu/ContextMenu'\nimport { IButtonProps } from '../Button/Button'\n\nexport interface ITableProps extends Partial<TableProps> {\n\t/** Table data */\n\tdata: Record<string, any>[]\n\n\t/** The total number of rows which this table can access */\n\ttotalRows: number\n\n\t/** Columns of the table */\n\tcolumns: Record<string, any>[]\n\n\t/** Set true if the table rows can be selected */\n\tisSelectable?: boolean\n\n\t/** any Id's that are selected by default when the page loads */\n\tinitialSelectedIds?: (string | number)[]\n\n\t/** The kind of data this table displays. This will affect the text shown when at least one row is selected. */\n\tkind?: string\n\n\t/** Optional text for pluralization when multiple rows are selected */\n\tpluralKind?: string\n\n\t// TODO: IMPLEMENT PAGINATION PROPS\n\t/** Pagination component props */\n\tpaginationProps?: any\n\n\t/** Enable bulk actions for selectable tables */\n\tbulkActions?: IButtonProps[]\n\n\t/** Handle clicking on a row */\n\tonClickRow?: (\n\t\te: MouseEvent,\n\t\tmeta: { idx: number; item: Record<string, any> }\n\t) => void\n\n\t/** Callback when selection changes */\n\tonSelection?: (options: { selectedIds: (string | number)[] }) => void\n\n\t/** No data available */\n\tnoDataIcon?: string\n\tnoDataHeadline?: string\n\tnoDataSubheadline?: string\n\tnoDataPrimaryAction?: IPrimaryAction\n\tnoDataPrimaryActionButtonKind?: string\n\tnoDataPrimaryActionButtonIcon?: string\n\n\t/** Return a nested sub-component to be added as an expansion level for designated row. */\n\tsubComponentForRow?: (row: Record<string, any>) => any\n\n\t/** Called any time row props are updated. Return true if the given row should appear dirty. */\n\trowIsDirty?: (row: Record<string, any>) => boolean\n}\n\ninterface IPrimaryAction {\n\ttext: string\n\tonClick: (e: MouseEvent) => void\n\ttype: string\n}\n\ninterface ITableState {\n\tselectedIds: (string | number)[]\n\tallRowsSelected: boolean\n}\n\nexport default class Table extends Component<ITableProps, ITableState> {\n\tprivate static defaultProps = {\n\t\tclassName: '',\n\t\tpaginationProps: {},\n\t\tisSelectable: false,\n\t\tnoDataIcon: 'empty_box',\n\t\tnoDataHeadline: 'Nothing to see here',\n\t\tnoDataPrimaryAction: null,\n\t\tnoDataPrimaryActionButtonKind: 'simple',\n\t\tnoDataPrimaryActionButtonIcon: null\n\t}\n\n\tprivate table: any\n\n\tpublic constructor(props: ITableProps) {\n\t\tsuper(props)\n\n\t\tthis.state = {\n\t\t\tselectedIds: props.initialSelectedIds || [],\n\t\t\tallRowsSelected: false\n\t\t}\n\t}\n\n\tpublic render(): ReactElement {\n\t\tconst {\n\t\t\tdata,\n\t\t\ttotalRows,\n\t\t\tcolumns,\n\t\t\tclassName,\n\t\t\tpaginationProps,\n\t\t\tisSelectable,\n\t\t\tkind,\n\t\t\tpluralKind,\n\t\t\tbulkActions,\n\t\t\tsortable,\n\t\t\tnoDataIcon,\n\t\t\tnoDataHeadline,\n\t\t\tnoDataSubheadline,\n\t\t\tnoDataPrimaryAction,\n\t\t\tnoDataPrimaryActionButtonKind,\n\t\t\tnoDataPrimaryActionButtonIcon,\n\t\t\tsubComponentForRow,\n\t\t\trowIsDirty,\n\t\t\t...rest\n\t\t} = this.props\n\n\t\tconst { selectedIds } = this.state\n\n\t\tlet columnsToRender = [...columns]\n\n\t\tif (isSelectable) {\n\t\t\tcolumnsToRender.unshift({\n\t\t\t\tid: 'checkbox',\n\t\t\t\taccessor: '',\n\t\t\t\tHeader: () => (\n\t\t\t\t\t<Checkbox\n\t\t\t\t\t\tid=\"\"\n\t\t\t\t\t\tisIndeterminate={\n\t\t\t\t\t\t\tselectedIds.length > 0 && selectedIds.length < totalRows\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// NOTE: Using state here because this Header can't access page size on its own\n\t\t\t\t\t\tisChecked={selectedIds.length > 0}\n\t\t\t\t\t\tonChange={() => this.handleSelectAll()}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tCell: props => {\n\t\t\t\t\tconst { original, pageSize } = props\n\t\t\t\t\tconst { id } = original\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\tid={id}\n\t\t\t\t\t\t\tisChecked={selectedIds.indexOf(id) > -1}\n\t\t\t\t\t\t\tonChange={() => this.handleChange({ id, pageSize })}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t\tsortable: false,\n\t\t\t\twidth: 36\n\t\t\t})\n\t\t}\n\n\t\t// Handle updating header columns when at least one row is selected\n\t\tif (isSelectable && selectedIds.length > 0) {\n\t\t\tconst numSelectedRows = selectedIds.length\n\t\t\tlet selectedText = `${numSelectedRows} selected`\n\t\t\tif (numSelectedRows > 1) {\n\t\t\t\tif (pluralKind) {\n\t\t\t\t\tselectedText = `${numSelectedRows} ${pluralKind} selected`\n\t\t\t\t} else if (kind) {\n\t\t\t\t\tselectedText = `${numSelectedRows} ${kind}s selected`\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (kind) {\n\t\t\t\t\tselectedText = `${numSelectedRows} ${kind} selected`\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Change the header text to reflect which rows are selected\n\t\t\tcolumnsToRender = columnsToRender.map((col, idx) => {\n\t\t\t\tif (idx === 0) {\n\t\t\t\t\treturn col\n\t\t\t\t} else if (idx === 1) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...col,\n\t\t\t\t\t\tHeader: () => (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<p className=\"table-selected-text\">{selectedText}</p>\n\t\t\t\t\t\t\t\t{bulkActions && bulkActions.length > 0 && (\n\t\t\t\t\t\t\t\t\t<ContextMenu\n\t\t\t\t\t\t\t\t\t\tactions={bulkActions}\n\t\t\t\t\t\t\t\t\t\ttext=\"Actions\"\n\t\t\t\t\t\t\t\t\t\tisSimple\n\t\t\t\t\t\t\t\t\t\tisTextOnly\n\t\t\t\t\t\t\t\t\t\tisLeftAligned\n\t\t\t\t\t\t\t\t\t\tcloseOnSelectAction\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn { ...col, Header: null }\n\t\t\t})\n\t\t}\n\n\t\treturn (\n\t\t\t<ReactTable\n\t\t\t\tref={ref => (this.table = ref)}\n\t\t\t\tdata={data}\n\t\t\t\tcolumns={columnsToRender}\n\t\t\t\tclassName={cx('table', className)}\n\t\t\t\tsortable={isSelectable && selectedIds.length > 0 ? false : sortable}\n\t\t\t\texpanderDefaults={{\n\t\t\t\t\tsortable: false,\n\t\t\t\t\tresizable: false,\n\t\t\t\t\tfilterable: false,\n\t\t\t\t\twidth: 40\n\t\t\t\t}}\n\t\t\t\tgetTableProps={() => ({\n\t\t\t\t\tclassName: 'table__inner'\n\t\t\t\t})}\n\t\t\t\tgetTbodyProps={() => ({\n\t\t\t\t\tclassName: 'table__body'\n\t\t\t\t})}\n\t\t\t\tgetTheadTrProps={() => ({\n\t\t\t\t\tclassName: cx('table-header-row', {\n\t\t\t\t\t\t'table-header-row--has-selections':\n\t\t\t\t\t\t\tisSelectable && selectedIds.length > 0\n\t\t\t\t\t})\n\t\t\t\t})}\n\t\t\t\tgetTheadThProps={(state, rowInfo, column) => ({\n\t\t\t\t\tclassName: cx('table-header-cell', {\n\t\t\t\t\t\t'table-checkbox-cell': column && column.id === 'checkbox'\n\t\t\t\t\t}),\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t})}\n\t\t\t\tgetTrGroupProps={(state, rowInfo) => {\n\t\t\t\t\tconst expanded = state.expanded[rowInfo.viewIndex]\n\t\t\t\t\tconst isDirty =\n\t\t\t\t\t\t(typeof rowIsDirty === 'function' && !!rowIsDirty(rowInfo)) ||\n\t\t\t\t\t\trowInfo.original.isDirty\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tclassName: cx('table-row-group', {\n\t\t\t\t\t\t\t'table-row-group--expanded': expanded,\n\t\t\t\t\t\t\t'table-row-group--is-dirty': isDirty\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tgetTrProps={(state, rowInfo) => {\n\t\t\t\t\tconst expanded = state.expanded[rowInfo.viewIndex]\n\t\t\t\t\tconst isDirty =\n\t\t\t\t\t\t(typeof rowIsDirty === 'function' && !!rowIsDirty(rowInfo)) ||\n\t\t\t\t\t\trowInfo.original.isDirty\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tclassName: cx('table-row', {\n\t\t\t\t\t\t\t'table-row--expanded': expanded,\n\t\t\t\t\t\t\t'table-row--is-dirty': isDirty\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tonClick: this.handleClickRow\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tgetTdProps={(state, rowInfo, column) => ({\n\t\t\t\t\tclassName: cx('table-cell', {\n\t\t\t\t\t\t'table-checkbox-cell': column.id === 'checkbox',\n\t\t\t\t\t\t'table-expander-cell': column.expander\n\t\t\t\t\t}),\n\t\t\t\t\twidth: 'auto'\n\t\t\t\t})}\n\t\t\t\tgetPaginationProps={() => ({\n\t\t\t\t\tclassName: 'table__pagination'\n\t\t\t\t})}\n\t\t\t\tgetLoadingProps={state => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tclassName: state.loading\n\t\t\t\t\t\t\t? 'table-loader--is-visible'\n\t\t\t\t\t\t\t: 'table-loader'\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tgetNoDataProps={() => ({\n\t\t\t\t\ticon: noDataIcon,\n\t\t\t\t\theadline: noDataHeadline,\n\t\t\t\t\tsubheadline: noDataSubheadline,\n\t\t\t\t\tprimaryAction: noDataPrimaryAction,\n\t\t\t\t\tprimaryActionButtonKind: noDataPrimaryActionButtonKind,\n\t\t\t\t\tprimaryActionButtonIcon: noDataPrimaryActionButtonIcon\n\t\t\t\t})}\n\t\t\t\tSubComponent={\n\t\t\t\t\tsubComponentForRow\n\t\t\t\t\t\t? row => (\n\t\t\t\t\t\t\t\t<CSSTransition\n\t\t\t\t\t\t\t\t\tin={true}\n\t\t\t\t\t\t\t\t\tappear={true}\n\t\t\t\t\t\t\t\t\tclassNames=\"table-subcomponent\"\n\t\t\t\t\t\t\t\t\ttimeout={100}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div className={'table-subcomponent'}>\n\t\t\t\t\t\t\t\t\t\t<Card>{subComponentForRow(row)}</Card>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</CSSTransition>\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tNoDataComponent={EmptyState}\n\t\t\t\t// @ts-ignore-next-line\n\t\t\t\tExpanderComponent={\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tname={'keyboard_arrow_right'}\n\t\t\t\t\t\tclassName={'table-expander-row'}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tThComponent={tableProps => {\n\t\t\t\t\tconst { toggleSort, className, ...rest } = tableProps\n\t\t\t\t\tconst isSortable =\n\t\t\t\t\t\tclassName && className.indexOf('-cursor-pointer') > -1\n\t\t\t\t\tconst isSortedAsc = className && className.indexOf('-sort-asc') > -1\n\t\t\t\t\tconst isSortedDesc =\n\t\t\t\t\t\ttableProps.className &&\n\t\t\t\t\t\ttableProps.className.indexOf('-sort-desc') > -1\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tonClick={toggleSort}\n\t\t\t\t\t\t\tclassName={cx(className, {\n\t\t\t\t\t\t\t\t'table-header-cell--is-sortable':\n\t\t\t\t\t\t\t\t\t(isSortable || isSortedAsc || isSortedDesc) &&\n\t\t\t\t\t\t\t\t\tselectedIds.length === 0,\n\t\t\t\t\t\t\t\t'table-header-cell--is-sorted-asc': isSortedAsc,\n\t\t\t\t\t\t\t\t'table-header-cell--is-sorted-desc': isSortedDesc\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t{...rest}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{tableProps.children}\n\t\t\t\t\t\t\t{(isSortable || isSortedAsc || isSortedDesc) &&\n\t\t\t\t\t\t\t\tselectedIds.length === 0 && (\n\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\tname=\"arrow_drop_down\"\n\t\t\t\t\t\t\t\t\t\tclassName={cx('table-header-cell__icon', {\n\t\t\t\t\t\t\t\t\t\t\t'table-header-cell__icon--is-visible':\n\t\t\t\t\t\t\t\t\t\t\t\tisSortedAsc || isSortedDesc,\n\t\t\t\t\t\t\t\t\t\t\t'table-header-cell__icon--is-reversed': isSortedDesc\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}}\n\t\t\t\tPaginationComponent={tableProps =>\n\t\t\t\t\ttableProps.page === 0 && totalRows <= tableProps.pageSize ? null : (\n\t\t\t\t\t\t<div className=\"table-pagination__wrapper\">\n\t\t\t\t\t\t\t<Pagination {...paginationProps} {...tableProps} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t)\n\t}\n\n\tprivate handleChange = ({ id }: any) => {\n\t\tconst { onSelection, totalRows } = this.props\n\t\tthis.setState(\n\t\t\tprevState => {\n\t\t\t\tconst idx = prevState.selectedIds.indexOf(id)\n\t\t\t\tlet newIds = [...prevState.selectedIds]\n\t\t\t\tif (idx > -1) {\n\t\t\t\t\tnewIds.splice(idx, 1)\n\t\t\t\t} else {\n\t\t\t\t\tif (prevState.selectedIds.length === 0) {\n\t\t\t\t\t\tnewIds = [id]\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnewIds.push(id)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tselectedIds: newIds,\n\t\t\t\t\tallRowsSelected: newIds.length === totalRows\n\t\t\t\t}\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tonSelection && onSelection({ selectedIds: this.state.selectedIds })\n\t\t\t}\n\t\t)\n\t}\n\n\tprivate handleSelectAll = () => {\n\t\tconst { onSelection } = this.props\n\t\tconst currentPage = this.table.state.page\n\t\tconst pageSize = this.table.state.pageSize\n\t\tconst allRows = this.table.getResolvedState().sortedData\n\t\tconst startIdx = currentPage * pageSize\n\t\tconst currentRows = allRows\n\t\t\t.slice(startIdx, startIdx + pageSize)\n\t\t\t.map(item => item._original)\n\t\tconst visibleIds = currentRows.map(row => row.id)\n\n\t\tthis.setState(\n\t\t\tprevState => ({\n\t\t\t\tselectedIds:\n\t\t\t\t\tprevState.selectedIds.length > 0\n\t\t\t\t\t\t? []\n\t\t\t\t\t\t: [...prevState.selectedIds, ...visibleIds]\n\t\t\t}),\n\t\t\t() => {\n\t\t\t\tonSelection && onSelection({ selectedIds: this.state.selectedIds })\n\t\t\t}\n\t\t)\n\t}\n\n\tprivate handleClickRow = (e, handleOriginal) => {\n\t\tconst { onClickRow = () => {} } = this.props\n\n\t\t// determine which row we clicked\n\t\tconst children = [...e.currentTarget.parentNode.parentNode.children]\n\t\tconst idx = children.indexOf(e.currentTarget.parentNode)\n\n\t\tonClickRow(e, {\n\t\t\tidx,\n\t\t\titem: this.props.data[idx]\n\t\t})\n\n\t\thandleOriginal && handleOriginal(e)\n\t}\n}\n"],"file":"Table.js"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _Forms = require("../../../Forms");
|
|
15
|
+
|
|
16
|
+
var TableFilters = function TableFilters(props) {
|
|
17
|
+
var filters = props.filters;
|
|
18
|
+
return _react["default"].createElement("div", {
|
|
19
|
+
className: "table-filters__wrapper"
|
|
20
|
+
}, filters.map(function (filter) {
|
|
21
|
+
return _react["default"].createElement(_Forms.Tag, (0, _extends2["default"])({
|
|
22
|
+
key: filter.text,
|
|
23
|
+
kind: "secondary",
|
|
24
|
+
isSmall: true
|
|
25
|
+
}, filter));
|
|
26
|
+
}));
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var _default = TableFilters;
|
|
30
|
+
exports["default"] = _default;
|
|
31
|
+
//# sourceMappingURL=TableFilters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Table/components/TableFilters/TableFilters.js"],"names":["TableFilters","props","filters","map","filter","text"],"mappings":";;;;;;;;;;;AACA;;AACA;;AAOA,IAAMA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAAkB;AAAA,MAC9BC,OAD8B,GAClBD,KADkB,CAC9BC,OAD8B;AAEtC,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACEA,OAAO,CAACC,GAAR,CAAY,UAAAC,MAAM;AAAA,WAClB,gCAAC,UAAD;AAAK,MAAA,GAAG,EAAEA,MAAM,CAACC,IAAjB;AAAuB,MAAA,IAAI,EAAC,WAA5B;AAAwC,MAAA,OAAO;AAA/C,OAAoDD,MAApD,EADkB;AAAA,GAAlB,CADF,CADD;AAOA,CATD;;eAWeJ,Y","sourcesContent":["// @flow\nimport React from 'react'\nimport { Tag } from '../../../Forms'\n\ntype Props = {\n\t/** Filters applied to the table */\n\tfilters: Array<Object>\n}\n\nconst TableFilters = (props: Props) => {\n\tconst { filters } = props\n\treturn (\n\t\t<div className=\"table-filters__wrapper\">\n\t\t\t{filters.map(filter => (\n\t\t\t\t<Tag key={filter.text} kind=\"secondary\" isSmall {...filter} />\n\t\t\t))}\n\t\t</div>\n\t)\n}\n\nexport default TableFilters\n"],"file":"TableFilters.js"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IAutosuggestInterfaceProps } from '../../../Forms/components/Autosuggest/Autosuggest';
|
|
3
|
+
export interface ITableSearchProps extends IAutosuggestInterfaceProps {
|
|
4
|
+
}
|
|
5
|
+
declare const TableSearch: (props: ITableSearchProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
|
6
|
+
export default TableSearch;
|
|
7
|
+
//# sourceMappingURL=TableSearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableSearch.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/components/TableSearch/TableSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuB,MAAM,OAAO,CAAA;AAC3C,OAAO,EAEN,0BAA0B,EAC1B,MAAM,mDAAmD,CAAA;AAE1D,MAAM,WAAW,iBAAkB,SAAQ,0BAA0B;CAAG;AAExE,QAAA,MAAM,WAAW,8OAQhB,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _Autosuggest = _interopRequireDefault(require("../../../Forms/components/Autosuggest/Autosuggest"));
|
|
15
|
+
|
|
16
|
+
var TableSearch = function TableSearch(props) {
|
|
17
|
+
var rest = (0, _extends2["default"])({}, props);
|
|
18
|
+
return _react["default"].createElement("div", {
|
|
19
|
+
className: "table-search__wrapper"
|
|
20
|
+
}, _react["default"].createElement(_Autosuggest["default"], (0, _extends2["default"])({
|
|
21
|
+
isSmall: true,
|
|
22
|
+
icon: {
|
|
23
|
+
name: 'search'
|
|
24
|
+
}
|
|
25
|
+
}, rest)));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var _default = TableSearch;
|
|
29
|
+
exports["default"] = _default;
|
|
30
|
+
//# sourceMappingURL=TableSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Table/components/TableSearch/TableSearch.tsx"],"names":["TableSearch","props","rest","name"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAOA,IAAMA,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAA4C;AAAA,MACpDC,IADoD,iCAC3CD,KAD2C;AAG/D,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,gCAAC,uBAAD;AAAa,IAAA,OAAO,MAApB;AAAqB,IAAA,IAAI,EAAE;AAAEE,MAAAA,IAAI,EAAE;AAAR;AAA3B,KAAmDD,IAAnD,EADD,CADD;AAKA,CARD;;eAUeF,W","sourcesContent":["import React, { ReactElement } from 'react'\nimport {\n\tdefault as Autosuggest,\n\tIAutosuggestInterfaceProps\n} from '../../../Forms/components/Autosuggest/Autosuggest'\n\nexport interface ITableSearchProps extends IAutosuggestInterfaceProps {}\n\nconst TableSearch = (props: ITableSearchProps): ReactElement => {\n\tconst { ...rest } = props\n\n\treturn (\n\t\t<div className=\"table-search__wrapper\">\n\t\t\t<Autosuggest isSmall icon={{ name: 'search' }} {...rest} />\n\t\t</div>\n\t)\n}\n\nexport default TableSearch\n"],"file":"TableSearch.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EACN,OAAO,IAAI,WAAW,EACtB,iBAAiB,EACjB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,wCAAwC,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
Object.defineProperty(exports, "default", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _Table["default"];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "TableSearch", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function get() {
|
|
19
|
+
return _TableSearch["default"];
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "ITableSearchProps", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function get() {
|
|
25
|
+
return _TableSearch.ITableSearchProps;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "TableFilters", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function get() {
|
|
31
|
+
return _TableFilters["default"];
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
var _Table = _interopRequireDefault(require("./Table"));
|
|
36
|
+
|
|
37
|
+
var _TableSearch = _interopRequireWildcard(require("./components/TableSearch/TableSearch"));
|
|
38
|
+
|
|
39
|
+
var _TableFilters = _interopRequireDefault(require("./components/TableFilters/TableFilters"));
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Table/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAIA","sourcesContent":["export { default } from './Table'\nexport {\n\tdefault as TableSearch,\n\tITableSearchProps\n} from './components/TableSearch/TableSearch'\nexport { default as TableFilters } from './components/TableFilters/TableFilters'\n"],"file":"index.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs-story.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs-story.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@storybook/react");
|
|
8
|
+
|
|
9
|
+
var _react3 = require("@storybook/addon-knobs/react");
|
|
10
|
+
|
|
11
|
+
var _tabs = require("../../../.storybook/data/tabs");
|
|
12
|
+
|
|
13
|
+
var _Tabs = _interopRequireDefault(require("./Tabs"));
|
|
14
|
+
|
|
15
|
+
var stories = (0, _react2.storiesOf)('Tabs', module);
|
|
16
|
+
stories.addDecorator(_react3.withKnobs);
|
|
17
|
+
stories.add('Tabs', function () {
|
|
18
|
+
return _react["default"].createElement(_Tabs["default"], {
|
|
19
|
+
tabs: (0, _react3.object)('tabs', [{
|
|
20
|
+
text: 'Team',
|
|
21
|
+
isCurrent: true
|
|
22
|
+
}, {
|
|
23
|
+
text: 'Guests'
|
|
24
|
+
}, {
|
|
25
|
+
text: 'Everyone',
|
|
26
|
+
onClick: function onClick() {
|
|
27
|
+
return console.log('Click');
|
|
28
|
+
}
|
|
29
|
+
}])
|
|
30
|
+
});
|
|
31
|
+
}).add('Many Tabs', function () {
|
|
32
|
+
return _react["default"].createElement(_Tabs["default"], {
|
|
33
|
+
tabs: (0, _react3.object)('tabs', _tabs.manyTabs)
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=Tabs-story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Tabs/Tabs-story.tsx"],"names":["stories","module","addDecorator","withKnobs","add","text","isCurrent","onClick","console","log","manyTabs"],"mappings":";;;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,OAAO,GAAG,uBAAU,MAAV,EAAkBC,MAAlB,CAAhB;AAEAD,OAAO,CAACE,YAAR,CAAqBC,iBAArB;AAEAH,OAAO,CACLI,GADF,CACM,MADN,EACc;AAAA,SACZ,gCAAC,gBAAD;AACC,IAAA,IAAI,EAAE,oBAAO,MAAP,EAAe,CACpB;AAAEC,MAAAA,IAAI,EAAE,MAAR;AAAgBC,MAAAA,SAAS,EAAE;AAA3B,KADoB,EAEpB;AAAED,MAAAA,IAAI,EAAE;AAAR,KAFoB,EAGpB;AAAEA,MAAAA,IAAI,EAAE,UAAR;AAAoBE,MAAAA,OAAO,EAAE;AAAA,eAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ,CAAN;AAAA;AAA7B,KAHoB,CAAf;AADP,IADY;AAAA,CADd,EAUEL,GAVF,CAUM,WAVN,EAUmB;AAAA,SAAM,gCAAC,gBAAD;AAAM,IAAA,IAAI,EAAE,oBAAO,MAAP,EAAeM,cAAf;AAAZ,IAAN;AAAA,CAVnB","sourcesContent":["// @flow\nimport React from 'react'\nimport { storiesOf } from '@storybook/react'\nimport { withKnobs, object } from '@storybook/addon-knobs/react'\nimport { manyTabs } from '../../../.storybook/data/tabs'\nimport Tabs from './Tabs'\n\nconst stories = storiesOf('Tabs', module)\n\nstories.addDecorator(withKnobs)\n\nstories\n\t.add('Tabs', () => (\n\t\t<Tabs\n\t\t\ttabs={object('tabs', [\n\t\t\t\t{ text: 'Team', isCurrent: true },\n\t\t\t\t{ text: 'Guests' },\n\t\t\t\t{ text: 'Everyone', onClick: () => console.log('Click') }\n\t\t\t])}\n\t\t/>\n\t))\n\t.add('Many Tabs', () => <Tabs tabs={object('tabs', manyTabs)} />)\n"],"file":"Tabs-story.js"}
|