@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,702 @@
|
|
|
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 _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
+
|
|
14
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
|
+
|
|
16
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
|
|
17
|
+
|
|
18
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
19
|
+
|
|
20
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
21
|
+
|
|
22
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
23
|
+
|
|
24
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
25
|
+
|
|
26
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
27
|
+
|
|
28
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
29
|
+
|
|
30
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
31
|
+
|
|
32
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
33
|
+
|
|
34
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
35
|
+
|
|
36
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
37
|
+
|
|
38
|
+
var _lodash = require("lodash");
|
|
39
|
+
|
|
40
|
+
var _reactVirtualized = require("react-virtualized");
|
|
41
|
+
|
|
42
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
43
|
+
|
|
44
|
+
var _utilities = require("../../utilities");
|
|
45
|
+
|
|
46
|
+
var _Forms = require("../Forms");
|
|
47
|
+
|
|
48
|
+
var _FormPartials = require("../Forms/FormPartials");
|
|
49
|
+
|
|
50
|
+
var _TextContainer = _interopRequireDefault(require("../TextContainer/TextContainer"));
|
|
51
|
+
|
|
52
|
+
var _Text = _interopRequireDefault(require("../Text/Text"));
|
|
53
|
+
|
|
54
|
+
var _Button = _interopRequireWildcard(require("../Button/Button"));
|
|
55
|
+
|
|
56
|
+
var _ListItem = _interopRequireDefault(require("../List/components/ListItem/ListItem"));
|
|
57
|
+
|
|
58
|
+
var _EmptyState = _interopRequireDefault(require("../EmptyState/EmptyState"));
|
|
59
|
+
|
|
60
|
+
var RecordSelectionList =
|
|
61
|
+
/*#__PURE__*/
|
|
62
|
+
function (_Component) {
|
|
63
|
+
(0, _inherits2["default"])(RecordSelectionList, _Component);
|
|
64
|
+
|
|
65
|
+
function RecordSelectionList(props) {
|
|
66
|
+
var _this;
|
|
67
|
+
|
|
68
|
+
(0, _classCallCheck2["default"])(this, RecordSelectionList);
|
|
69
|
+
_this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(RecordSelectionList).call(this, props));
|
|
70
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "cache", new _reactVirtualized.CellMeasurerCache({
|
|
71
|
+
fixedWidth: true
|
|
72
|
+
}));
|
|
73
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "loadSearchResults", (0, _lodash.debounce)(
|
|
74
|
+
/*#__PURE__*/
|
|
75
|
+
function () {
|
|
76
|
+
var _ref2 = (0, _asyncToGenerator2["default"])(
|
|
77
|
+
/*#__PURE__*/
|
|
78
|
+
_regenerator["default"].mark(function _callee(_ref) {
|
|
79
|
+
var value, uniqueId, newRows;
|
|
80
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
81
|
+
while (1) {
|
|
82
|
+
switch (_context.prev = _context.next) {
|
|
83
|
+
case 0:
|
|
84
|
+
value = _ref.value, uniqueId = _ref.uniqueId;
|
|
85
|
+
_context.next = 3;
|
|
86
|
+
return _this.loadRecordsRequest({
|
|
87
|
+
offset: 0,
|
|
88
|
+
search: value
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
case 3:
|
|
92
|
+
newRows = _context.sent;
|
|
93
|
+
|
|
94
|
+
if (uniqueId === _this.state.loadingId) {
|
|
95
|
+
_this.setState({
|
|
96
|
+
isLoading: false,
|
|
97
|
+
loadedRecords: newRows || []
|
|
98
|
+
}, function () {
|
|
99
|
+
_this.resetVirtualizedList();
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
case 5:
|
|
104
|
+
case "end":
|
|
105
|
+
return _context.stop();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}, _callee);
|
|
109
|
+
}));
|
|
110
|
+
|
|
111
|
+
return function (_x) {
|
|
112
|
+
return _ref2.apply(this, arguments);
|
|
113
|
+
};
|
|
114
|
+
}(), _this.props.searchDelayMs || 200));
|
|
115
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getVisibleRecordHeight", function () {
|
|
116
|
+
var maxRowsVisible = _this.props.maxRowsVisible;
|
|
117
|
+
var visibleRecordHeight = 0;
|
|
118
|
+
|
|
119
|
+
if (typeof maxRowsVisible === 'number') {
|
|
120
|
+
for (var i = 0; i < Math.min(maxRowsVisible); i += 1) {
|
|
121
|
+
if (i < _this.cache._rowCount) {
|
|
122
|
+
visibleRecordHeight += _this.cache.rowHeight({
|
|
123
|
+
index: i
|
|
124
|
+
});
|
|
125
|
+
} else {
|
|
126
|
+
visibleRecordHeight += 1;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return visibleRecordHeight;
|
|
132
|
+
});
|
|
133
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "updateSearchValue",
|
|
134
|
+
/*#__PURE__*/
|
|
135
|
+
function () {
|
|
136
|
+
var _ref3 = (0, _asyncToGenerator2["default"])(
|
|
137
|
+
/*#__PURE__*/
|
|
138
|
+
_regenerator["default"].mark(function _callee3(value) {
|
|
139
|
+
var onSearchChange, uniqueId;
|
|
140
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
141
|
+
while (1) {
|
|
142
|
+
switch (_context3.prev = _context3.next) {
|
|
143
|
+
case 0:
|
|
144
|
+
onSearchChange = _this.props.onSearchChange; // Search will rapid-fire, but we only want to use the last result.
|
|
145
|
+
// If this value doesn't change by the time the API responds, we'll use
|
|
146
|
+
// that data to update the list!
|
|
147
|
+
|
|
148
|
+
uniqueId = "".concat(Math.random());
|
|
149
|
+
|
|
150
|
+
_this.setState({
|
|
151
|
+
search: value,
|
|
152
|
+
isLoading: true,
|
|
153
|
+
loadingId: uniqueId
|
|
154
|
+
},
|
|
155
|
+
/*#__PURE__*/
|
|
156
|
+
(0, _asyncToGenerator2["default"])(
|
|
157
|
+
/*#__PURE__*/
|
|
158
|
+
_regenerator["default"].mark(function _callee2() {
|
|
159
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
160
|
+
while (1) {
|
|
161
|
+
switch (_context2.prev = _context2.next) {
|
|
162
|
+
case 0:
|
|
163
|
+
if (onSearchChange) {
|
|
164
|
+
onSearchChange(value);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
_this.loadSearchResults({
|
|
168
|
+
value: value,
|
|
169
|
+
uniqueId: uniqueId
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
case 2:
|
|
173
|
+
case "end":
|
|
174
|
+
return _context2.stop();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}, _callee2);
|
|
178
|
+
})));
|
|
179
|
+
|
|
180
|
+
case 3:
|
|
181
|
+
case "end":
|
|
182
|
+
return _context3.stop();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}, _callee3);
|
|
186
|
+
}));
|
|
187
|
+
|
|
188
|
+
return function (_x2) {
|
|
189
|
+
return _ref3.apply(this, arguments);
|
|
190
|
+
};
|
|
191
|
+
}());
|
|
192
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "resetVirtualizedList", function () {
|
|
193
|
+
if (_this.virtualizedList && _this.cache && _this.infiniteLoader) {
|
|
194
|
+
_this.cache.clearAll();
|
|
195
|
+
|
|
196
|
+
_this.virtualizedList.recomputeRowHeights();
|
|
197
|
+
|
|
198
|
+
_this.virtualizedList.forceUpdateGrid();
|
|
199
|
+
|
|
200
|
+
_this.infiniteLoader.resetLoadMoreRowsCache(true);
|
|
201
|
+
|
|
202
|
+
setTimeout(function () {
|
|
203
|
+
_this.setState({
|
|
204
|
+
listHeight: _this.getVisibleRecordHeight()
|
|
205
|
+
});
|
|
206
|
+
}, 0);
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "loadRecordsRequest",
|
|
210
|
+
/*#__PURE__*/
|
|
211
|
+
function () {
|
|
212
|
+
var _ref5 = (0, _asyncToGenerator2["default"])(
|
|
213
|
+
/*#__PURE__*/
|
|
214
|
+
_regenerator["default"].mark(function _callee4(options) {
|
|
215
|
+
var _this$props, loadRecords, loadRecordListItems, recordsPerRequest, requestArgs;
|
|
216
|
+
|
|
217
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
218
|
+
while (1) {
|
|
219
|
+
switch (_context4.prev = _context4.next) {
|
|
220
|
+
case 0:
|
|
221
|
+
_this$props = _this.props, loadRecords = _this$props.loadRecords, loadRecordListItems = _this$props.loadRecordListItems, recordsPerRequest = _this$props.recordsPerRequest;
|
|
222
|
+
requestArgs = (0, _objectSpread2["default"])({
|
|
223
|
+
limit: recordsPerRequest
|
|
224
|
+
}, options);
|
|
225
|
+
|
|
226
|
+
if (!loadRecords) {
|
|
227
|
+
_context4.next = 8;
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
_context4.next = 5;
|
|
232
|
+
return loadRecords(requestArgs);
|
|
233
|
+
|
|
234
|
+
case 5:
|
|
235
|
+
return _context4.abrupt("return", _context4.sent);
|
|
236
|
+
|
|
237
|
+
case 8:
|
|
238
|
+
if (!loadRecordListItems) {
|
|
239
|
+
_context4.next = 12;
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
_context4.next = 11;
|
|
244
|
+
return loadRecordListItems(requestArgs);
|
|
245
|
+
|
|
246
|
+
case 11:
|
|
247
|
+
return _context4.abrupt("return", _context4.sent);
|
|
248
|
+
|
|
249
|
+
case 12:
|
|
250
|
+
case "end":
|
|
251
|
+
return _context4.stop();
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}, _callee4);
|
|
255
|
+
}));
|
|
256
|
+
|
|
257
|
+
return function (_x3) {
|
|
258
|
+
return _ref5.apply(this, arguments);
|
|
259
|
+
};
|
|
260
|
+
}());
|
|
261
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "renderRow", function (_ref6) {
|
|
262
|
+
var index = _ref6.index,
|
|
263
|
+
key = _ref6.key,
|
|
264
|
+
parent = _ref6.parent,
|
|
265
|
+
style = _ref6.style;
|
|
266
|
+
var loadedRecords = _this.state.loadedRecords;
|
|
267
|
+
var record = loadedRecords[index];
|
|
268
|
+
return record && _react["default"].createElement(_reactVirtualized.CellMeasurer, {
|
|
269
|
+
cache: _this.cache,
|
|
270
|
+
columnIndex: 0,
|
|
271
|
+
key: key,
|
|
272
|
+
parent: parent,
|
|
273
|
+
rowIndex: index
|
|
274
|
+
}, function () {
|
|
275
|
+
return _this.renderInnerRow({
|
|
276
|
+
record: record,
|
|
277
|
+
style: style
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "renderInnerRow", function (_ref7) {
|
|
282
|
+
var record = _ref7.record,
|
|
283
|
+
style = _ref7.style;
|
|
284
|
+
var loadedRecords = _this.state.loadedRecords;
|
|
285
|
+
var _this$props2 = _this.props,
|
|
286
|
+
selectedIds = _this$props2.selectedIds,
|
|
287
|
+
unselectableIds = _this$props2.unselectableIds,
|
|
288
|
+
getRecordId = _this$props2.getRecordId,
|
|
289
|
+
canSelect = _this$props2.canSelect,
|
|
290
|
+
canRemove = _this$props2.canRemove,
|
|
291
|
+
onSelect = _this$props2.onSelect,
|
|
292
|
+
onRemove = _this$props2.onRemove,
|
|
293
|
+
renderRecord = _this$props2.renderRecord,
|
|
294
|
+
loadRecords = _this$props2.loadRecords,
|
|
295
|
+
loadRecordListItems = _this$props2.loadRecordListItems;
|
|
296
|
+
|
|
297
|
+
if (loadRecordListItems && record.id) {
|
|
298
|
+
var recordId = record.id;
|
|
299
|
+
return _react["default"].createElement("div", {
|
|
300
|
+
className: "record-selection__record-wrapper",
|
|
301
|
+
key: recordId,
|
|
302
|
+
style: (0, _objectSpread2["default"])({}, style)
|
|
303
|
+
}, _react["default"].createElement(_ListItem["default"], (0, _extends2["default"])({}, record, {
|
|
304
|
+
key: recordId,
|
|
305
|
+
selectableId: onSelect && canSelect && recordId,
|
|
306
|
+
selectableProps: {
|
|
307
|
+
onChange: onSelect ? function () {
|
|
308
|
+
onSelect(recordId, record);
|
|
309
|
+
} : function () {
|
|
310
|
+
return null;
|
|
311
|
+
},
|
|
312
|
+
isChecked: selectedIds && selectedIds.indexOf(recordId) >= 0
|
|
313
|
+
},
|
|
314
|
+
selectableType: canSelect === 'one' ? 'radio' : 'checkbox',
|
|
315
|
+
isDisabled: unselectableIds && unselectableIds.indexOf(recordId) >= 0,
|
|
316
|
+
actions: onRemove && canRemove ? [{
|
|
317
|
+
kind: 'simple',
|
|
318
|
+
className: 'record-selection__record-remove-btn',
|
|
319
|
+
disabled: false,
|
|
320
|
+
isSmall: true,
|
|
321
|
+
icon: {
|
|
322
|
+
name: 'cancel_solid',
|
|
323
|
+
className: 'btn__line-icon'
|
|
324
|
+
},
|
|
325
|
+
onClick: function onClick() {
|
|
326
|
+
_this.setState({
|
|
327
|
+
loadedRecords: loadedRecords.filter(function (loadedRecord) {
|
|
328
|
+
return loadedRecord.id !== recordId;
|
|
329
|
+
})
|
|
330
|
+
}, function () {
|
|
331
|
+
_this.setState({
|
|
332
|
+
listHeight: _this.getVisibleRecordHeight()
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
onRemove(recordId, record);
|
|
337
|
+
}
|
|
338
|
+
}] : []
|
|
339
|
+
})));
|
|
340
|
+
} else if (loadRecords && renderRecord && getRecordId) {
|
|
341
|
+
// DEPRECATED RENDER METHOD
|
|
342
|
+
var SelectionComponent = canSelect === 'one' ? _Forms.Radio : _Forms.Checkbox;
|
|
343
|
+
|
|
344
|
+
var _recordId = getRecordId(record);
|
|
345
|
+
|
|
346
|
+
return _react["default"].createElement("div", {
|
|
347
|
+
className: "record-selection__record-wrapper",
|
|
348
|
+
key: _recordId,
|
|
349
|
+
style: (0, _objectSpread2["default"])({}, style)
|
|
350
|
+
}, onSelect && canSelect && _react["default"].createElement(SelectionComponent, {
|
|
351
|
+
id: _recordId,
|
|
352
|
+
name: _recordId,
|
|
353
|
+
className: "record-selection__record-select",
|
|
354
|
+
onChange: function onChange() {
|
|
355
|
+
onSelect(_recordId, record);
|
|
356
|
+
},
|
|
357
|
+
isDisabled: unselectableIds && unselectableIds.indexOf(_recordId) >= 0,
|
|
358
|
+
isChecked: selectedIds && selectedIds.indexOf(_recordId) >= 0 ? true : false
|
|
359
|
+
}), _react["default"].createElement("div", {
|
|
360
|
+
className: "record-selection__record-content",
|
|
361
|
+
key: _recordId
|
|
362
|
+
}, renderRecord(record)), onRemove && canRemove && _react["default"].createElement(_Button["default"], {
|
|
363
|
+
kind: _Button.ButtonKinds.Simple,
|
|
364
|
+
className: "record-selection__record-remove-btn",
|
|
365
|
+
isDisabled: false,
|
|
366
|
+
isSmall: true,
|
|
367
|
+
icon: {
|
|
368
|
+
name: 'cancel_solid',
|
|
369
|
+
className: 'btn__line-icon'
|
|
370
|
+
},
|
|
371
|
+
onClick: function onClick() {
|
|
372
|
+
_this.setState({
|
|
373
|
+
loadedRecords: loadedRecords.filter(function (loadedRecord) {
|
|
374
|
+
return getRecordId(loadedRecord) !== _recordId;
|
|
375
|
+
})
|
|
376
|
+
}, function () {
|
|
377
|
+
_this.setState({
|
|
378
|
+
listHeight: _this.getVisibleRecordHeight()
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
onRemove(_recordId, record);
|
|
383
|
+
}
|
|
384
|
+
}));
|
|
385
|
+
} else {
|
|
386
|
+
return null;
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleInfiniteLoad",
|
|
390
|
+
/*#__PURE__*/
|
|
391
|
+
(0, _asyncToGenerator2["default"])(
|
|
392
|
+
/*#__PURE__*/
|
|
393
|
+
_regenerator["default"].mark(function _callee5() {
|
|
394
|
+
var _this$state, loadedRecords, isLoading, search, newRows;
|
|
395
|
+
|
|
396
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
397
|
+
while (1) {
|
|
398
|
+
switch (_context5.prev = _context5.next) {
|
|
399
|
+
case 0:
|
|
400
|
+
_this$state = _this.state, loadedRecords = _this$state.loadedRecords, isLoading = _this$state.isLoading, search = _this$state.search;
|
|
401
|
+
|
|
402
|
+
if (!isLoading) {
|
|
403
|
+
_context5.next = 3;
|
|
404
|
+
break;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
return _context5.abrupt("return");
|
|
408
|
+
|
|
409
|
+
case 3:
|
|
410
|
+
_this.setState({
|
|
411
|
+
isLoading: true
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
_context5.next = 6;
|
|
415
|
+
return _this.loadRecordsRequest({
|
|
416
|
+
offset: loadedRecords.length,
|
|
417
|
+
search: search
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
case 6:
|
|
421
|
+
newRows = _context5.sent;
|
|
422
|
+
|
|
423
|
+
_this.setState({
|
|
424
|
+
isLoading: false
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
if (newRows && newRows.length > 0) {
|
|
428
|
+
_this.setState({
|
|
429
|
+
loadedRecords: [].concat((0, _toConsumableArray2["default"])(loadedRecords), (0, _toConsumableArray2["default"])(newRows))
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
return _context5.abrupt("return", true);
|
|
434
|
+
|
|
435
|
+
case 10:
|
|
436
|
+
case "end":
|
|
437
|
+
return _context5.stop();
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}, _callee5);
|
|
441
|
+
})));
|
|
442
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleRemoveSelection", function () {});
|
|
443
|
+
|
|
444
|
+
if (props.loadRecords && !props.getRecordId) {
|
|
445
|
+
throw new Error("RecordSelectionList: `getRecordId` must be provided to determine a record's unique identifier. (record => string)");
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
(0, _utilities.checkDeprecatedProps)({
|
|
449
|
+
componentName: 'RecordSelectionList',
|
|
450
|
+
props: props,
|
|
451
|
+
deprecatedProps: {
|
|
452
|
+
renderRecord: {
|
|
453
|
+
details: 'Use loadRecordListItems to manage loading and rendering of record list item.'
|
|
454
|
+
},
|
|
455
|
+
getRecordId: {
|
|
456
|
+
details: 'Use loadRecordListItems to manage loading and rendering of record list item.'
|
|
457
|
+
},
|
|
458
|
+
loadRecords: {
|
|
459
|
+
details: 'Use loadRecordListItems to manage loading and rendering of record list item.'
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
_this.state = {
|
|
464
|
+
loadedRecords: [],
|
|
465
|
+
isLoading: true,
|
|
466
|
+
search: props.searchValue,
|
|
467
|
+
listHeight: 1
|
|
468
|
+
};
|
|
469
|
+
return _this;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
(0, _createClass2["default"])(RecordSelectionList, [{
|
|
473
|
+
key: "componentDidMount",
|
|
474
|
+
value: function () {
|
|
475
|
+
var _componentDidMount = (0, _asyncToGenerator2["default"])(
|
|
476
|
+
/*#__PURE__*/
|
|
477
|
+
_regenerator["default"].mark(function _callee6() {
|
|
478
|
+
var search, initialRecords, newListHeight;
|
|
479
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
480
|
+
while (1) {
|
|
481
|
+
switch (_context6.prev = _context6.next) {
|
|
482
|
+
case 0:
|
|
483
|
+
search = this.state.search;
|
|
484
|
+
_context6.next = 3;
|
|
485
|
+
return this.loadRecordsRequest({
|
|
486
|
+
search: search,
|
|
487
|
+
offset: 0
|
|
488
|
+
});
|
|
489
|
+
|
|
490
|
+
case 3:
|
|
491
|
+
initialRecords = _context6.sent;
|
|
492
|
+
_context6.next = 6;
|
|
493
|
+
return this.setState({
|
|
494
|
+
loadedRecords: initialRecords || [],
|
|
495
|
+
isLoading: false
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
case 6:
|
|
499
|
+
newListHeight = this.getVisibleRecordHeight();
|
|
500
|
+
|
|
501
|
+
if (this.state.listHeight !== newListHeight) {
|
|
502
|
+
this.setState({
|
|
503
|
+
listHeight: newListHeight
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
case 8:
|
|
508
|
+
case "end":
|
|
509
|
+
return _context6.stop();
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}, _callee6, this);
|
|
513
|
+
}));
|
|
514
|
+
|
|
515
|
+
function componentDidMount() {
|
|
516
|
+
return _componentDidMount.apply(this, arguments);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
return componentDidMount;
|
|
520
|
+
}()
|
|
521
|
+
}, {
|
|
522
|
+
key: "componentDidUpdate",
|
|
523
|
+
value: function componentDidUpdate(prevProps) {
|
|
524
|
+
var _this$props3 = this.props,
|
|
525
|
+
canRemove = _this$props3.canRemove,
|
|
526
|
+
canSelect = _this$props3.canSelect,
|
|
527
|
+
searchValue = _this$props3.searchValue;
|
|
528
|
+
|
|
529
|
+
if (searchValue && searchValue !== prevProps.searchValue) {
|
|
530
|
+
this.updateSearchValue(searchValue);
|
|
531
|
+
} // We need to manually tell virtualized to update if these props
|
|
532
|
+
// change. This is mostly for storybook but it may be nice to support later in product.
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
if (prevProps.canRemove !== canRemove || prevProps.canSelect !== canSelect) {
|
|
536
|
+
this.resetVirtualizedList();
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}, {
|
|
540
|
+
key: "reset",
|
|
541
|
+
value: function () {
|
|
542
|
+
var _reset = (0, _asyncToGenerator2["default"])(
|
|
543
|
+
/*#__PURE__*/
|
|
544
|
+
_regenerator["default"].mark(function _callee7() {
|
|
545
|
+
var _ref9,
|
|
546
|
+
_ref9$persistSearch,
|
|
547
|
+
persistSearch,
|
|
548
|
+
_args7 = arguments;
|
|
549
|
+
|
|
550
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
551
|
+
while (1) {
|
|
552
|
+
switch (_context7.prev = _context7.next) {
|
|
553
|
+
case 0:
|
|
554
|
+
_ref9 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, _ref9$persistSearch = _ref9.persistSearch, persistSearch = _ref9$persistSearch === void 0 ? false : _ref9$persistSearch;
|
|
555
|
+
// TODO: This just "works" but ideally I'd be resetting more holistically.
|
|
556
|
+
// Come back to this and clean up the API a bit. Make sure that resetting
|
|
557
|
+
// doesn't cause infiniteLoad to fail.
|
|
558
|
+
this.updateSearchValue(persistSearch && this.state.search ? this.state.search : '');
|
|
559
|
+
|
|
560
|
+
case 2:
|
|
561
|
+
case "end":
|
|
562
|
+
return _context7.stop();
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}, _callee7, this);
|
|
566
|
+
}));
|
|
567
|
+
|
|
568
|
+
function reset() {
|
|
569
|
+
return _reset.apply(this, arguments);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
return reset;
|
|
573
|
+
}()
|
|
574
|
+
}, {
|
|
575
|
+
key: "render",
|
|
576
|
+
value: function render() {
|
|
577
|
+
var _this2 = this;
|
|
578
|
+
|
|
579
|
+
var _this$props4 = this.props,
|
|
580
|
+
canSearch = _this$props4.canSearch,
|
|
581
|
+
maxRowsVisible = _this$props4.maxRowsVisible,
|
|
582
|
+
hideDataEmptyState = _this$props4.hideDataEmptyState,
|
|
583
|
+
hideSearchResultsEmptyState = _this$props4.hideSearchResultsEmptyState,
|
|
584
|
+
noDataEmptyState = _this$props4.noDataEmptyState,
|
|
585
|
+
noSearchResultsEmptyState = _this$props4.noSearchResultsEmptyState,
|
|
586
|
+
searchLabel = _this$props4.searchLabel,
|
|
587
|
+
searchPlaceholder = _this$props4.searchPlaceholder,
|
|
588
|
+
_this$props4$selected = _this$props4.selectedIds,
|
|
589
|
+
selectedIds = _this$props4$selected === void 0 ? [] : _this$props4$selected,
|
|
590
|
+
showSelectedCount = _this$props4.showSelectedCount,
|
|
591
|
+
totalRecordCount = _this$props4.totalRecordCount;
|
|
592
|
+
var _this$state2 = this.state,
|
|
593
|
+
loadedRecords = _this$state2.loadedRecords,
|
|
594
|
+
search = _this$state2.search,
|
|
595
|
+
listHeight = _this$state2.listHeight,
|
|
596
|
+
isLoading = _this$state2.isLoading;
|
|
597
|
+
var totalSelected = selectedIds.length;
|
|
598
|
+
|
|
599
|
+
var isRowLoaded = function isRowLoaded(_ref10) {
|
|
600
|
+
var index = _ref10.index;
|
|
601
|
+
return !!loadedRecords[index];
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
var onResize = function onResize() {
|
|
605
|
+
_this2.resetVirtualizedList();
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
return _react["default"].createElement("div", {
|
|
609
|
+
className: (0, _classnames["default"])('record-selection__list', {
|
|
610
|
+
'record-selection__list--is-infinite': maxRowsVisible,
|
|
611
|
+
'record-selection__list--is-searchable': canSearch,
|
|
612
|
+
'record-selection__list--is-showing-selected-count': showSelectedCount
|
|
613
|
+
}),
|
|
614
|
+
ref: function ref(_ref15) {
|
|
615
|
+
return _this2.listContainer = _ref15;
|
|
616
|
+
}
|
|
617
|
+
}, showSelectedCount && _react["default"].createElement(_TextContainer["default"], null, _react["default"].createElement(_Text["default"], null, "".concat(totalSelected, " selected"))), canSearch && loadedRecords.length > 0 && _react["default"].createElement(_react.Fragment, null, searchLabel && _react["default"].createElement(_FormPartials.InputPre, {
|
|
618
|
+
label: searchLabel
|
|
619
|
+
}), _react["default"].createElement(_Forms.TextInput, {
|
|
620
|
+
id: 'record-selection-list-filter',
|
|
621
|
+
type: "text",
|
|
622
|
+
iconBefore: "search",
|
|
623
|
+
placeholder: searchPlaceholder || 'Search...',
|
|
624
|
+
value: search,
|
|
625
|
+
onChange: function onChange(e) {
|
|
626
|
+
_this2.updateSearchValue(e.target.value);
|
|
627
|
+
}
|
|
628
|
+
})), loadedRecords.length > 0 ? _react["default"].createElement(_react.Fragment, null, !maxRowsVisible ? loadedRecords.map(function (record) {
|
|
629
|
+
return _this2.renderInnerRow({
|
|
630
|
+
record: record,
|
|
631
|
+
style: {}
|
|
632
|
+
});
|
|
633
|
+
}) : _react["default"].createElement("div", (0, _extends2["default"])({
|
|
634
|
+
className: "record-selection__list-wrapper" // Only set listHeight if maxRowsVisible is not undefined or 'auto'
|
|
635
|
+
|
|
636
|
+
}, typeof maxRowsVisible === 'number' ? {
|
|
637
|
+
style: {
|
|
638
|
+
height: "".concat(listHeight, "px")
|
|
639
|
+
}
|
|
640
|
+
} : {}), _react["default"].createElement(_reactVirtualized.InfiniteLoader, {
|
|
641
|
+
ref: function ref(_ref14) {
|
|
642
|
+
return _this2.infiniteLoader = _ref14;
|
|
643
|
+
},
|
|
644
|
+
isRowLoaded: isRowLoaded,
|
|
645
|
+
loadMoreRows: function loadMoreRows() {
|
|
646
|
+
return _this2.handleInfiniteLoad();
|
|
647
|
+
},
|
|
648
|
+
rowCount: totalRecordCount || Infinity,
|
|
649
|
+
threshold: maxRowsVisible || 5
|
|
650
|
+
}, function (_ref11) {
|
|
651
|
+
var _onRowsRendered = _ref11.onRowsRendered,
|
|
652
|
+
registerChild = _ref11.registerChild;
|
|
653
|
+
return _react["default"].createElement(_reactVirtualized.AutoSizer, {
|
|
654
|
+
onResize: onResize
|
|
655
|
+
}, function (_ref12) {
|
|
656
|
+
var height = _ref12.height,
|
|
657
|
+
width = _ref12.width;
|
|
658
|
+
return _react["default"].createElement(_reactVirtualized.List, {
|
|
659
|
+
ref: function ref(_ref13) {
|
|
660
|
+
registerChild(_ref13);
|
|
661
|
+
_this2.virtualizedList = _ref13;
|
|
662
|
+
},
|
|
663
|
+
className: "record-selection__virtual-list",
|
|
664
|
+
deferredMeasurementCache: _this2.cache,
|
|
665
|
+
height: height,
|
|
666
|
+
width: width,
|
|
667
|
+
rowHeight: _this2.cache.rowHeight,
|
|
668
|
+
rowCount: loadedRecords.length,
|
|
669
|
+
rowRenderer: _this2.renderRow,
|
|
670
|
+
onRowsRendered: function onRowsRendered(args) {
|
|
671
|
+
_onRowsRendered(args);
|
|
672
|
+
},
|
|
673
|
+
selectedIds: JSON.stringify(selectedIds)
|
|
674
|
+
});
|
|
675
|
+
});
|
|
676
|
+
}))) : !isLoading && loadedRecords.length === 0 && _react["default"].createElement(_react.Fragment, null, search ? !hideSearchResultsEmptyState && _react["default"].createElement(_EmptyState["default"], (0, _extends2["default"])({
|
|
677
|
+
icon: "no_matches",
|
|
678
|
+
headline: "No search results"
|
|
679
|
+
}, noSearchResultsEmptyState, {
|
|
680
|
+
primaryAction: (0, _objectSpread2["default"])({
|
|
681
|
+
text: 'Show all',
|
|
682
|
+
type: 'submit',
|
|
683
|
+
onClick: function onClick() {
|
|
684
|
+
_this2.updateSearchValue('');
|
|
685
|
+
}
|
|
686
|
+
}, (0, _lodash.get)(noSearchResultsEmptyState, 'primaryAction', {}))
|
|
687
|
+
})) : !hideDataEmptyState && _react["default"].createElement(_EmptyState["default"], (0, _extends2["default"])({
|
|
688
|
+
headline: "No records"
|
|
689
|
+
}, noDataEmptyState))));
|
|
690
|
+
}
|
|
691
|
+
}]);
|
|
692
|
+
return RecordSelectionList;
|
|
693
|
+
}(_react.Component);
|
|
694
|
+
|
|
695
|
+
exports["default"] = RecordSelectionList;
|
|
696
|
+
(0, _defineProperty2["default"])(RecordSelectionList, "defaultProps", {
|
|
697
|
+
showSelectedCount: false,
|
|
698
|
+
hideSearchResultsEmptyState: false,
|
|
699
|
+
hideDataEmptyState: false,
|
|
700
|
+
recordsPerRequest: 10
|
|
701
|
+
});
|
|
702
|
+
//# sourceMappingURL=RecordSelectionList.js.map
|