@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,290 @@
|
|
|
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 _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
+
|
|
16
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
+
|
|
18
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
+
|
|
20
|
+
var _getPrototypeOf3 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
+
|
|
22
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
23
|
+
|
|
24
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
25
|
+
|
|
26
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
27
|
+
|
|
28
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
|
|
29
|
+
|
|
30
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
31
|
+
|
|
32
|
+
var _reactVirtualized = require("react-virtualized");
|
|
33
|
+
|
|
34
|
+
var _Message = require("../../../Message");
|
|
35
|
+
|
|
36
|
+
var _Text = _interopRequireDefault(require("../../../Text/Text"));
|
|
37
|
+
|
|
38
|
+
// The difference in minutes between two message where only the first one
|
|
39
|
+
// should include an image
|
|
40
|
+
var compareDiff = 30;
|
|
41
|
+
|
|
42
|
+
var formatMessages = function formatMessages(messages) {
|
|
43
|
+
var formattedMessages = [];
|
|
44
|
+
messages.forEach(function (message, idx) {
|
|
45
|
+
var formattedMessage = (0, _objectSpread2["default"])({}, message); // Check if messages are from the same source
|
|
46
|
+
|
|
47
|
+
if (idx + 1 < messages.length && message.from && messages[idx + 1].from && message.from.id === messages[idx + 1].from.id) {
|
|
48
|
+
// Check if the messages were sent within the minimum difference to hide the image
|
|
49
|
+
var nextMessage = messages[idx + 1];
|
|
50
|
+
var diff = message.dateSent.diff(nextMessage.dateSent, 'minutes');
|
|
51
|
+
|
|
52
|
+
if (diff <= compareDiff) {
|
|
53
|
+
// Remove the image
|
|
54
|
+
formattedMessage.from = (0, _objectSpread2["default"])({}, formattedMessage.from, {
|
|
55
|
+
image: null
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
formattedMessages.push(formattedMessage);
|
|
61
|
+
});
|
|
62
|
+
return formattedMessages;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var groupMessages = function groupMessages(messages) {
|
|
66
|
+
var groupedMessages = [];
|
|
67
|
+
var groups = {};
|
|
68
|
+
messages.forEach(function (message, idx) {
|
|
69
|
+
var daySent = message.dateSent.calendar(null, {
|
|
70
|
+
sameDay: '[Today]',
|
|
71
|
+
lastDay: '[Yesterday]',
|
|
72
|
+
lastWeek: '[Last] dddd',
|
|
73
|
+
sameElse: message.dateSent.isSame(new Date(), 'year') ? 'ddd, MMMM DD' : 'ddd, MMMM DD, YYYY'
|
|
74
|
+
});
|
|
75
|
+
var match = Object.values(groups).findIndex(function (value) {
|
|
76
|
+
return value === daySent;
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
if (match === -1) {
|
|
80
|
+
groups[idx] = daySent;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
messages.forEach(function (message, idx) {
|
|
84
|
+
var daySent = message.dateSent.calendar(null, {
|
|
85
|
+
sameDay: '[Today]',
|
|
86
|
+
lastDay: '[Yesterday]',
|
|
87
|
+
lastWeek: '[Last] dddd',
|
|
88
|
+
sameElse: message.dateSent.isSame(new Date(), 'year') ? 'ddd, MMMM DD' : 'ddd, MMMM DD, YYYY'
|
|
89
|
+
});
|
|
90
|
+
var match = groupedMessages.find(function (group) {
|
|
91
|
+
return group.name === daySent;
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
if (!match) {
|
|
95
|
+
groupedMessages.push({
|
|
96
|
+
name: daySent,
|
|
97
|
+
messages: [idx]
|
|
98
|
+
});
|
|
99
|
+
} else {
|
|
100
|
+
match.messages.push(idx);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
return groups;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var FeedBuilder =
|
|
107
|
+
/*#__PURE__*/
|
|
108
|
+
function (_Component) {
|
|
109
|
+
(0, _inherits2["default"])(FeedBuilder, _Component);
|
|
110
|
+
|
|
111
|
+
function FeedBuilder() {
|
|
112
|
+
var _getPrototypeOf2;
|
|
113
|
+
|
|
114
|
+
var _this;
|
|
115
|
+
|
|
116
|
+
(0, _classCallCheck2["default"])(this, FeedBuilder);
|
|
117
|
+
|
|
118
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
119
|
+
args[_key] = arguments[_key];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
_this = (0, _possibleConstructorReturn2["default"])(this, (_getPrototypeOf2 = (0, _getPrototypeOf3["default"])(FeedBuilder)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
123
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "cache", new _reactVirtualized.CellMeasurerCache({
|
|
124
|
+
fixedWidth: true
|
|
125
|
+
}));
|
|
126
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
|
|
127
|
+
rows: [],
|
|
128
|
+
groups: {},
|
|
129
|
+
rowCount: 0,
|
|
130
|
+
scrollToIndex: 1,
|
|
131
|
+
isLoading: false,
|
|
132
|
+
allLoaded: false
|
|
133
|
+
});
|
|
134
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onResize", function () {
|
|
135
|
+
if (_this.list && _this.cache) {
|
|
136
|
+
_this.cache.clearAll();
|
|
137
|
+
|
|
138
|
+
_this.list.recomputeRowHeights(0);
|
|
139
|
+
|
|
140
|
+
_this.list.forceUpdateGrid();
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "isRowLoaded", function (_ref) {
|
|
144
|
+
var index = _ref.index;
|
|
145
|
+
return index > 0;
|
|
146
|
+
});
|
|
147
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "loadMoreRows", function () {
|
|
148
|
+
var onRowsRequested = _this.props.onRowsRequested;
|
|
149
|
+
var _this$state = _this.state,
|
|
150
|
+
isLoading = _this$state.isLoading,
|
|
151
|
+
allLoaded = _this$state.allLoaded; // Do API Stuff™
|
|
152
|
+
|
|
153
|
+
if (isLoading || allLoaded) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (_this.list) {
|
|
158
|
+
_this.setState({
|
|
159
|
+
isLoading: true
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
onRowsRequested();
|
|
163
|
+
|
|
164
|
+
_this.cache.clearAll();
|
|
165
|
+
|
|
166
|
+
_this.list.recomputeRowHeights(0);
|
|
167
|
+
|
|
168
|
+
_this.list.forceUpdateGrid();
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return new Promise(function (resolve) {
|
|
172
|
+
return resolve;
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "renderRow", function (_ref2) {
|
|
176
|
+
var index = _ref2.index,
|
|
177
|
+
key = _ref2.key,
|
|
178
|
+
parent = _ref2.parent,
|
|
179
|
+
style = _ref2.style,
|
|
180
|
+
isScrolling = _ref2.isScrolling;
|
|
181
|
+
var _this$state2 = _this.state,
|
|
182
|
+
rows = _this$state2.rows,
|
|
183
|
+
groups = _this$state2.groups;
|
|
184
|
+
var groupMatch = groups[index];
|
|
185
|
+
return _react["default"].createElement(_reactVirtualized.CellMeasurer, {
|
|
186
|
+
cache: _this.cache,
|
|
187
|
+
columnIndex: 0,
|
|
188
|
+
key: key,
|
|
189
|
+
parent: parent,
|
|
190
|
+
rowIndex: index
|
|
191
|
+
}, _react["default"].createElement("div", {
|
|
192
|
+
className: "message-feed__message-wrapper",
|
|
193
|
+
style: (0, _objectSpread2["default"])({}, style, {
|
|
194
|
+
visibility: isScrolling ? 'visible' : 'visible'
|
|
195
|
+
})
|
|
196
|
+
}, groupMatch && _react["default"].createElement(_Text["default"], {
|
|
197
|
+
className: "message-feed__day-header"
|
|
198
|
+
}, groupMatch), _react["default"].createElement(_Message.MessageBuilder, rows[index])));
|
|
199
|
+
});
|
|
200
|
+
return _this;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
(0, _createClass2["default"])(FeedBuilder, [{
|
|
204
|
+
key: "render",
|
|
205
|
+
value: function render() {
|
|
206
|
+
var _this2 = this;
|
|
207
|
+
|
|
208
|
+
var pageSize = this.props.pageSize;
|
|
209
|
+
var rowCount = this.state.rowCount;
|
|
210
|
+
return _react["default"].createElement("div", {
|
|
211
|
+
className: "message-feed__wrapper"
|
|
212
|
+
}, _react["default"].createElement("div", {
|
|
213
|
+
className: "message-feed"
|
|
214
|
+
}, _react["default"].createElement(_reactVirtualized.InfiniteLoader, {
|
|
215
|
+
ref: function ref(_ref6) {
|
|
216
|
+
return _this2.infiniteLoader = _ref6;
|
|
217
|
+
},
|
|
218
|
+
isRowLoaded: this.isRowLoaded,
|
|
219
|
+
loadMoreRows: this.loadMoreRows,
|
|
220
|
+
rowCount: rowCount + 1,
|
|
221
|
+
threshold: 1
|
|
222
|
+
}, function (_ref3) {
|
|
223
|
+
var onRowsRendered = _ref3.onRowsRendered,
|
|
224
|
+
registerChild = _ref3.registerChild;
|
|
225
|
+
return _react["default"].createElement(_reactVirtualized.AutoSizer, {
|
|
226
|
+
className: "message-feed__autosizer",
|
|
227
|
+
onResize: _this2.onResize
|
|
228
|
+
}, function (_ref4) {
|
|
229
|
+
var height = _ref4.height,
|
|
230
|
+
width = _ref4.width;
|
|
231
|
+
return _react["default"].createElement("div", {
|
|
232
|
+
ref: registerChild
|
|
233
|
+
}, _react["default"].createElement(_reactVirtualized.List, {
|
|
234
|
+
ref: function ref(_ref5) {
|
|
235
|
+
return _this2.list = _ref5;
|
|
236
|
+
},
|
|
237
|
+
className: "message-feed__virtual-list",
|
|
238
|
+
deferredMeasurementCache: _this2.cache,
|
|
239
|
+
height: height,
|
|
240
|
+
width: width,
|
|
241
|
+
rowCount: rowCount,
|
|
242
|
+
rowHeight: _this2.cache.rowHeight,
|
|
243
|
+
rowRenderer: _this2.renderRow,
|
|
244
|
+
scrollToIndex: pageSize + 5,
|
|
245
|
+
scrollToAlignment: "end",
|
|
246
|
+
onRowsRendered: onRowsRendered
|
|
247
|
+
}));
|
|
248
|
+
});
|
|
249
|
+
})));
|
|
250
|
+
}
|
|
251
|
+
}], [{
|
|
252
|
+
key: "getDerivedStateFromProps",
|
|
253
|
+
value: function getDerivedStateFromProps(props, state) {
|
|
254
|
+
var messages = props.messages;
|
|
255
|
+
var rowCount = state.rowCount;
|
|
256
|
+
var formattedMessages = formatMessages(messages);
|
|
257
|
+
var reversedMessages = (0, _toConsumableArray2["default"])(formattedMessages).reverse();
|
|
258
|
+
var groups = groupMessages(reversedMessages);
|
|
259
|
+
|
|
260
|
+
if (messages.length === rowCount) {
|
|
261
|
+
// Stop loading — there are no more messages to add
|
|
262
|
+
return {
|
|
263
|
+
rows: reversedMessages,
|
|
264
|
+
rowCount: messages.length,
|
|
265
|
+
scrollToIndex: messages.length + 1,
|
|
266
|
+
groups: groups,
|
|
267
|
+
isLoading: false,
|
|
268
|
+
allLoaded: true
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
return {
|
|
273
|
+
rows: reversedMessages,
|
|
274
|
+
rowCount: messages.length,
|
|
275
|
+
scrollToIndex: messages.length + 1,
|
|
276
|
+
groups: groups,
|
|
277
|
+
isLoading: false
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
}]);
|
|
281
|
+
return FeedBuilder;
|
|
282
|
+
}(_react.Component);
|
|
283
|
+
|
|
284
|
+
exports["default"] = FeedBuilder;
|
|
285
|
+
(0, _defineProperty2["default"])(FeedBuilder, "defaultProps", {
|
|
286
|
+
messages: [],
|
|
287
|
+
emptyText: 'No messages',
|
|
288
|
+
pageSize: 50
|
|
289
|
+
});
|
|
290
|
+
//# sourceMappingURL=FeedBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Core/components/FeedBuilder/FeedBuilder.js"],"names":["compareDiff","formatMessages","messages","formattedMessages","forEach","message","idx","formattedMessage","length","from","id","nextMessage","diff","dateSent","image","push","groupMessages","groupedMessages","groups","daySent","calendar","sameDay","lastDay","lastWeek","sameElse","isSame","Date","match","Object","values","findIndex","value","find","group","name","FeedBuilder","CellMeasurerCache","fixedWidth","rows","rowCount","scrollToIndex","isLoading","allLoaded","list","cache","clearAll","recomputeRowHeights","forceUpdateGrid","index","onRowsRequested","props","state","setState","Promise","resolve","key","parent","style","isScrolling","groupMatch","visibility","pageSize","ref","infiniteLoader","isRowLoaded","loadMoreRows","onRowsRendered","registerChild","onResize","height","width","rowHeight","renderRow","reversedMessages","reverse","Component","emptyText"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAOA;;AACA;;AA+BA;AACA;AACA,IAAMA,WAAW,GAAG,EAApB;;AAEA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB,CAACC,QAAD,EAAmC;AACzD,MAAMC,iBAAiB,GAAG,EAA1B;AACAD,EAAAA,QAAQ,CAACE,OAAT,CAAiB,UAACC,OAAD,EAAUC,GAAV,EAAkB;AAClC,QAAIC,gBAAgB,sCAAQF,OAAR,CAApB,CADkC,CAElC;;AACA,QACCC,GAAG,GAAG,CAAN,GAAUJ,QAAQ,CAACM,MAAnB,IACAH,OAAO,CAACI,IADR,IAEAP,QAAQ,CAACI,GAAG,GAAG,CAAP,CAAR,CAAkBG,IAFlB,IAGAJ,OAAO,CAACI,IAAR,CAAaC,EAAb,KAAoBR,QAAQ,CAACI,GAAG,GAAG,CAAP,CAAR,CAAkBG,IAAlB,CAAuBC,EAJ5C,EAKE;AACD;AACA,UAAMC,WAAW,GAAGT,QAAQ,CAACI,GAAG,GAAG,CAAP,CAA5B;AACA,UAAMM,IAAI,GAAGP,OAAO,CAACQ,QAAR,CAAiBD,IAAjB,CAAsBD,WAAW,CAACE,QAAlC,EAA4C,SAA5C,CAAb;;AACA,UAAID,IAAI,IAAIZ,WAAZ,EAAyB;AACxB;AACAO,QAAAA,gBAAgB,CAACE,IAAjB,sCACIF,gBAAgB,CAACE,IADrB;AAECK,UAAAA,KAAK,EAAE;AAFR;AAIA;AACD;;AAEDX,IAAAA,iBAAiB,CAACY,IAAlB,CAAuBR,gBAAvB;AACA,GAtBD;AAuBA,SAAOJ,iBAAP;AACA,CA1BD;;AA4BA,IAAMa,aAAa,GAAG,SAAhBA,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KADsC,CACnDhD,QADmD;AAAA,UAEnDqC,QAFmD,GAEtCY,KAFsC,CAEnDZ,QAFmD;AAG3D,UAAMpC,iBAAiB,GAAGF,cAAc,CAACC,QAAD,CAAxC;AACA,UAAMuE,gBAAgB,GAAG,oCAAItE,iBAAJ,EAAuBuE,OAAvB,EAAzB;AACA,UAAMxD,MAAM,GAAGF,aAAa,CAACyD,gBAAD,CAA5B;;AACA,UAAIvE,QAAQ,CAACM,MAAT,KAAoB+B,QAAxB,EAAkC;AACjC;AACA,eAAO;AACND,UAAAA,IAAI,EAAEmC,gBADA;AAENlC,UAAAA,QAAQ,EAAErC,QAAQ,CAACM,MAFb;AAGNgC,UAAAA,aAAa,EAAEtC,QAAQ,CAACM,MAAT,GAAkB,CAH3B;AAINU,UAAAA,MAAM,EAANA,MAJM;AAKNuB,UAAAA,SAAS,EAAE,KALL;AAMNC,UAAAA,SAAS,EAAE;AANL,SAAP;AAQA;;AACD,aAAO;AACNJ,QAAAA,IAAI,EAAEmC,gBADA;AAENlC,QAAAA,QAAQ,EAAErC,QAAQ,CAACM,MAFb;AAGNgC,QAAAA,aAAa,EAAEtC,QAAQ,CAACM,MAAT,GAAkB,CAH3B;AAINU,QAAAA,MAAM,EAANA,MAJM;AAKNuB,QAAAA,SAAS,EAAE;AALL,OAAP;AAOA;;;EA5CuCkC,gB;;;iCAApBxC,W,kBAcE;AACrBjC,EAAAA,QAAQ,EAAE,EADW;AAErB0E,EAAAA,SAAS,EAAE,aAFU;AAGrBf,EAAAA,QAAQ,EAAE;AAHW,C","sourcesContent":["// @flow\nimport React, { Component } from 'react'\nimport {\n\tList,\n\tAutoSizer,\n\tCellMeasurer,\n\tCellMeasurerCache,\n\tInfiniteLoader\n} from 'react-virtualized'\nimport { MessageBuilder } from '../../../Message'\nimport Text from '../../../Text/Text'\n\ntype MessageProps = {\n\t/** Unique id for the message */\n\tid: string,\n\t...MessageBuilderProps\n}\n\ntype Props = {\n\t/** Messages for the feed */\n\tmessages?: Array<MessageProps>,\n\n\t/** Text for the empty state of this feed */\n\temptyText?: string,\n\n\t/** Callback to load rows */\n\tonRowsRequested: Function,\n\n\t/** Number of messages to load at a time */\n\tpageSize?: number\n}\n\ntype State = {\n\trows: Array<MessageProps>,\n\tgroups: Object,\n\trowCount: number,\n\tscrollToIndex: number,\n\tisLoading: boolean,\n\tallLoaded: boolean\n}\n\n// The difference in minutes between two message where only the first one\n// should include an image\nconst compareDiff = 30\n\nconst formatMessages = (messages: Array<MessageProps>) => {\n\tconst formattedMessages = []\n\tmessages.forEach((message, idx) => {\n\t\tlet formattedMessage = { ...message }\n\t\t// Check if messages are from the same source\n\t\tif (\n\t\t\tidx + 1 < messages.length &&\n\t\t\tmessage.from &&\n\t\t\tmessages[idx + 1].from &&\n\t\t\tmessage.from.id === messages[idx + 1].from.id\n\t\t) {\n\t\t\t// Check if the messages were sent within the minimum difference to hide the image\n\t\t\tconst nextMessage = messages[idx + 1]\n\t\t\tconst diff = message.dateSent.diff(nextMessage.dateSent, 'minutes')\n\t\t\tif (diff <= compareDiff) {\n\t\t\t\t// Remove the image\n\t\t\t\tformattedMessage.from = {\n\t\t\t\t\t...formattedMessage.from,\n\t\t\t\t\timage: null\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tformattedMessages.push(formattedMessage)\n\t})\n\treturn formattedMessages\n}\n\nconst groupMessages = (messages: Array<MessageProps>) => {\n\tconst groupedMessages = []\n\tconst groups = {}\n\n\tmessages.forEach((message, idx) => {\n\t\tconst daySent = message.dateSent.calendar(null, {\n\t\t\tsameDay: '[Today]',\n\t\t\tlastDay: '[Yesterday]',\n\t\t\tlastWeek: '[Last] dddd',\n\t\t\tsameElse: message.dateSent.isSame(new Date(), 'year')\n\t\t\t\t? 'ddd, MMMM DD'\n\t\t\t\t: 'ddd, MMMM DD, YYYY'\n\t\t})\n\t\tconst match = Object.values(groups).findIndex(value => value === daySent)\n\t\tif (match === -1) {\n\t\t\tgroups[idx] = daySent\n\t\t}\n\t})\n\n\tmessages.forEach((message, idx) => {\n\t\tconst daySent = message.dateSent.calendar(null, {\n\t\t\tsameDay: '[Today]',\n\t\t\tlastDay: '[Yesterday]',\n\t\t\tlastWeek: '[Last] dddd',\n\t\t\tsameElse: message.dateSent.isSame(new Date(), 'year')\n\t\t\t\t? 'ddd, MMMM DD'\n\t\t\t\t: 'ddd, MMMM DD, YYYY'\n\t\t})\n\t\tconst match = groupedMessages.find(group => group.name === daySent)\n\t\tif (!match) {\n\t\t\tgroupedMessages.push({\n\t\t\t\tname: daySent,\n\t\t\t\tmessages: [idx]\n\t\t\t})\n\t\t} else {\n\t\t\tmatch.messages.push(idx)\n\t\t}\n\t})\n\n\treturn groups\n}\n\nexport default class FeedBuilder extends Component<Props, State> {\n\tlist: any\n\tcache = new CellMeasurerCache({\n\t\tfixedWidth: true\n\t})\n\tstate = {\n\t\trows: [],\n\t\tgroups: {},\n\t\trowCount: 0,\n\t\tscrollToIndex: 1,\n\t\tisLoading: false,\n\t\tallLoaded: false\n\t}\n\n\tstatic defaultProps = {\n\t\tmessages: [],\n\t\temptyText: 'No messages',\n\t\tpageSize: 50\n\t}\n\n\tstatic getDerivedStateFromProps(props: Props, state: State) {\n\t\tconst { messages } = props\n\t\tconst { rowCount } = state\n\t\tconst formattedMessages = formatMessages(messages)\n\t\tconst reversedMessages = [...formattedMessages].reverse()\n\t\tconst groups = groupMessages(reversedMessages)\n\t\tif (messages.length === rowCount) {\n\t\t\t// Stop loading — there are no more messages to add\n\t\t\treturn {\n\t\t\t\trows: reversedMessages,\n\t\t\t\trowCount: messages.length,\n\t\t\t\tscrollToIndex: messages.length + 1,\n\t\t\t\tgroups,\n\t\t\t\tisLoading: false,\n\t\t\t\tallLoaded: true\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\trows: reversedMessages,\n\t\t\trowCount: messages.length,\n\t\t\tscrollToIndex: messages.length + 1,\n\t\t\tgroups,\n\t\t\tisLoading: false\n\t\t}\n\t}\n\n\tonResize = () => {\n\t\tif (this.list && this.cache) {\n\t\t\tthis.cache.clearAll()\n\t\t\tthis.list.recomputeRowHeights(0)\n\t\t\tthis.list.forceUpdateGrid()\n\t\t}\n\t}\n\n\tisRowLoaded = ({ index }) => {\n\t\treturn index > 0\n\t}\n\n\tloadMoreRows = () => {\n\t\tconst { onRowsRequested } = this.props\n\t\tconst { isLoading, allLoaded } = this.state\n\t\t// Do API Stuff™\n\n\t\tif (isLoading || allLoaded) {\n\t\t\treturn\n\t\t}\n\n\t\tif (this.list) {\n\t\t\tthis.setState({\n\t\t\t\tisLoading: true\n\t\t\t})\n\t\t\tonRowsRequested()\n\t\t\tthis.cache.clearAll()\n\t\t\tthis.list.recomputeRowHeights(0)\n\t\t\tthis.list.forceUpdateGrid()\n\t\t}\n\t\treturn new Promise(resolve => resolve)\n\t}\n\n\trenderRow = ({ index, key, parent, style, isScrolling }) => {\n\t\tconst { rows, groups } = this.state\n\t\tconst groupMatch = groups[index]\n\n\t\treturn (\n\t\t\t<CellMeasurer\n\t\t\t\tcache={this.cache}\n\t\t\t\tcolumnIndex={0}\n\t\t\t\tkey={key}\n\t\t\t\tparent={parent}\n\t\t\t\trowIndex={index}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"message-feed__message-wrapper\"\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\t...style,\n\t\t\t\t\t\tvisibility: isScrolling ? 'visible' : 'visible'\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{groupMatch && (\n\t\t\t\t\t\t<Text className=\"message-feed__day-header\">{groupMatch}</Text>\n\t\t\t\t\t)}\n\t\t\t\t\t<MessageBuilder {...rows[index]} />\n\t\t\t\t</div>\n\t\t\t</CellMeasurer>\n\t\t)\n\t}\n\n\trender() {\n\t\tconst { pageSize } = this.props\n\t\tconst { rowCount } = this.state\n\t\treturn (\n\t\t\t<div className=\"message-feed__wrapper\">\n\t\t\t\t<div className=\"message-feed\">\n\t\t\t\t\t<InfiniteLoader\n\t\t\t\t\t\tref={ref => (this.infiniteLoader = ref)}\n\t\t\t\t\t\tisRowLoaded={this.isRowLoaded}\n\t\t\t\t\t\tloadMoreRows={this.loadMoreRows}\n\t\t\t\t\t\trowCount={rowCount + 1}\n\t\t\t\t\t\tthreshold={1}\n\t\t\t\t\t>\n\t\t\t\t\t\t{({ onRowsRendered, registerChild }) => (\n\t\t\t\t\t\t\t<AutoSizer\n\t\t\t\t\t\t\t\tclassName=\"message-feed__autosizer\"\n\t\t\t\t\t\t\t\tonResize={this.onResize}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{({ height, width }) => (\n\t\t\t\t\t\t\t\t\t<div ref={registerChild}>\n\t\t\t\t\t\t\t\t\t\t<List\n\t\t\t\t\t\t\t\t\t\t\tref={ref => (this.list = ref)}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"message-feed__virtual-list\"\n\t\t\t\t\t\t\t\t\t\t\tdeferredMeasurementCache={this.cache}\n\t\t\t\t\t\t\t\t\t\t\theight={height}\n\t\t\t\t\t\t\t\t\t\t\twidth={width}\n\t\t\t\t\t\t\t\t\t\t\trowCount={rowCount}\n\t\t\t\t\t\t\t\t\t\t\trowHeight={this.cache.rowHeight}\n\t\t\t\t\t\t\t\t\t\t\trowRenderer={this.renderRow}\n\t\t\t\t\t\t\t\t\t\t\tscrollToIndex={pageSize + 5}\n\t\t\t\t\t\t\t\t\t\t\tscrollToAlignment=\"end\"\n\t\t\t\t\t\t\t\t\t\t\tonRowsRendered={onRowsRendered}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</AutoSizer>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</InfiniteLoader>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t)\n\t}\n}\n"],"file":"FeedBuilder.js"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var FooterPrimary = function FooterPrimary() {
|
|
13
|
+
return _react["default"].createElement("footer", {
|
|
14
|
+
className: "footer-primary"
|
|
15
|
+
}, _react["default"].createElement("p", null, "Footer"));
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
var _default = FooterPrimary;
|
|
19
|
+
exports["default"] = _default;
|
|
20
|
+
//# sourceMappingURL=FooterPrimary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Core/components/FooterPrimary/FooterPrimary.js"],"names":["FooterPrimary"],"mappings":";;;;;;;;;AACA;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB;AAAA,SACrB;AAAQ,IAAA,SAAS,EAAC;AAAlB,KACC,oDADD,CADqB;AAAA,CAAtB;;eAMeA,a","sourcesContent":["// @flow\nimport React from 'react'\n\nconst FooterPrimary = () => (\n\t<footer className=\"footer-primary\">\n\t\t<p>Footer</p>\n\t</footer>\n)\n\nexport default FooterPrimary\n"],"file":"FooterPrimary.js"}
|
|
@@ -0,0 +1,52 @@
|
|
|
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 _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var HelpIcon = function HelpIcon(props) {
|
|
13
|
+
return _react["default"].createElement("svg", props, _react["default"].createElement("path", {
|
|
14
|
+
d: "M7 7a2 2 0 1 1 2.667 1.886A1 1 0 0 0 9 9.829V10M9 12a.25.25 0 1 0 0 .5.25.25 0 0 0 0-.5",
|
|
15
|
+
strokeWidth: "1.5",
|
|
16
|
+
strokeLinecap: "round",
|
|
17
|
+
strokeLinejoin: "round"
|
|
18
|
+
}), _react["default"].createElement("path", {
|
|
19
|
+
clipRule: "evenodd",
|
|
20
|
+
d: "M1.5 3A1.5 1.5 0 0 1 3 1.5h12A1.5 1.5 0 0 1 16.5 3v12a1.5 1.5 0 0 1-1.5 1.5H3A1.5 1.5 0 0 1 1.5 15V3z",
|
|
21
|
+
strokeWidth: "1.5",
|
|
22
|
+
strokeLinecap: "round",
|
|
23
|
+
strokeLinejoin: "round"
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
HelpIcon.defaultProps = {
|
|
28
|
+
width: "18",
|
|
29
|
+
height: "18",
|
|
30
|
+
viewBox: "0 0 18 18",
|
|
31
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
var HelpButton = function HelpButton(props) {
|
|
35
|
+
var className = props.className,
|
|
36
|
+
iconClassName = props.iconClassName,
|
|
37
|
+
textClassName = props.textClassName;
|
|
38
|
+
return _react["default"].createElement("a", {
|
|
39
|
+
className: className,
|
|
40
|
+
href: "#",
|
|
41
|
+
target: "_blank",
|
|
42
|
+
rel: "noopener noreferrer"
|
|
43
|
+
}, _react["default"].createElement(HelpIcon, {
|
|
44
|
+
className: iconClassName
|
|
45
|
+
}), _react["default"].createElement("span", {
|
|
46
|
+
className: textClassName
|
|
47
|
+
}, "Help"));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var _default = HelpButton;
|
|
51
|
+
exports["default"] = _default;
|
|
52
|
+
//# sourceMappingURL=HelpButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/components/Core/components/FooterPrimary/components/HelpButton/HelpButton.js"],"names":["HelpIcon","HelpButton","props","className","iconClassName","textClassName"],"mappings":";;;;;;;;;AACA;;IACOA,Q,YAAAA,Q;;;;;;;;;;;;;;;AAAAA,Q;;;;;;;AAaP,IAAMC,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD,EAAkB;AAAA,MAC5BC,SAD4B,GACgBD,KADhB,CAC5BC,SAD4B;AAAA,MACjBC,aADiB,GACgBF,KADhB,CACjBE,aADiB;AAAA,MACFC,aADE,GACgBH,KADhB,CACFG,aADE;AAEpC,SACC;AAAG,IAAA,SAAS,EAAEF,SAAd;AAAyB,IAAA,IAAI,EAAC,GAA9B;AAAkC,IAAA,MAAM,EAAC,QAAzC;AAAkD,IAAA,GAAG,EAAC;AAAtD,KACC,gCAAC,QAAD;AAAU,IAAA,SAAS,EAAEC;AAArB,IADD,EAEC;AAAM,IAAA,SAAS,EAAEC;AAAjB,YAFD,CADD;AAMA,CARD;;eAUeJ,U","sourcesContent":["// @flow\nimport React from 'react'\nimport HelpIcon from '../../../../../../../static/assets/icons/Interface-Essential/Help/question-help-square--16w.svg'\n\ntype Props = {\n\t/** Class for the button */\n\tclassName: string,\n\n\t/** Class for the icon */\n\ticonClassName: string,\n\n\t/** Class for the text */\n\ttextClassName: string\n}\n\nconst HelpButton = (props: Props) => {\n\tconst { className, iconClassName, textClassName } = props\n\treturn (\n\t\t<a className={className} href=\"#\" target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t<HelpIcon className={iconClassName} />\n\t\t\t<span className={textClassName}>Help</span>\n\t\t</a>\n\t)\n}\n\nexport default HelpButton\n"],"file":"HelpButton.js"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
15
|
+
|
|
16
|
+
var Legal = function Legal(props) {
|
|
17
|
+
var className = props.className,
|
|
18
|
+
linkClassName = props.linkClassName;
|
|
19
|
+
return _react["default"].createElement(_react.Fragment, null, _react["default"].createElement("p", {
|
|
20
|
+
className: className
|
|
21
|
+
}, _react["default"].createElement("a", {
|
|
22
|
+
href: "/terms-of-service",
|
|
23
|
+
target: "_blank",
|
|
24
|
+
rel: "noopener noreferrer",
|
|
25
|
+
className: linkClassName
|
|
26
|
+
}, "Terms of Service"), _react["default"].createElement("a", {
|
|
27
|
+
href: "/privacy-policy",
|
|
28
|
+
target: "_blank",
|
|
29
|
+
rel: "noopener noreferrer",
|
|
30
|
+
className: linkClassName
|
|
31
|
+
}, "Privacy Policy")), _react["default"].createElement("p", {
|
|
32
|
+
className: className
|
|
33
|
+
}, "\xA9 Spruce Labs ".concat((0, _moment["default"])().format('YYYY'))));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var _default = Legal;
|
|
37
|
+
exports["default"] = _default;
|
|
38
|
+
//# sourceMappingURL=Legal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/components/Core/components/FooterPrimary/components/Legal/Legal.js"],"names":["Legal","props","className","linkClassName","format"],"mappings":";;;;;;;;;;;AACA;;AACA;;AAUA,IAAMA,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD,EAAkB;AAAA,MACvBC,SADuB,GACMD,KADN,CACvBC,SADuB;AAAA,MACZC,aADY,GACMF,KADN,CACZE,aADY;AAE/B,SACC,gCAAC,eAAD,QACC;AAAG,IAAA,SAAS,EAAED;AAAd,KACC;AACC,IAAA,IAAI,EAAC,mBADN;AAEC,IAAA,MAAM,EAAC,QAFR;AAGC,IAAA,GAAG,EAAC,qBAHL;AAIC,IAAA,SAAS,EAAEC;AAJZ,wBADD,EASC;AACC,IAAA,IAAI,EAAC,iBADN;AAEC,IAAA,MAAM,EAAC,QAFR;AAGC,IAAA,GAAG,EAAC,qBAHL;AAIC,IAAA,SAAS,EAAEA;AAJZ,sBATD,CADD,EAmBC;AAAG,IAAA,SAAS,EAAED;AAAd,gCAA2C,0BAASE,MAAT,CAAgB,MAAhB,CAA3C,EAnBD,CADD;AAuBA,CAzBD;;eA2BeJ,K","sourcesContent":["// @flow\nimport React, { Fragment } from 'react'\nimport moment from 'moment'\n\ntype Props = {\n\t/** Class for the text */\n\tclassName: string,\n\n\t/** Class for links */\n\tlinkClassName: string\n}\n\nconst Legal = (props: Props) => {\n\tconst { className, linkClassName } = props\n\treturn (\n\t\t<Fragment>\n\t\t\t<p className={className}>\n\t\t\t\t<a\n\t\t\t\t\thref=\"/terms-of-service\"\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\tclassName={linkClassName}\n\t\t\t\t>\n\t\t\t\t\t{`Terms of Service`}\n\t\t\t\t</a>\n\t\t\t\t<a\n\t\t\t\t\thref=\"/privacy-policy\"\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\tclassName={linkClassName}\n\t\t\t\t>\n\t\t\t\t\t{`Privacy Policy`}\n\t\t\t\t</a>\n\t\t\t</p>\n\t\t\t<p className={className}>{`© Spruce Labs ${moment().format('YYYY')}`}</p>\n\t\t</Fragment>\n\t)\n}\n\nexport default Legal\n"],"file":"Legal.js"}
|
|
@@ -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
|
+
Object.defineProperty(exports, "HelpButton", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _HelpButton2["default"];
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "Legal", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return _Legal2["default"];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
exports["default"] = void 0;
|
|
21
|
+
|
|
22
|
+
var _FooterPrimary = _interopRequireDefault(require("./FooterPrimary"));
|
|
23
|
+
|
|
24
|
+
var _HelpButton2 = _interopRequireDefault(require("./components/HelpButton/HelpButton"));
|
|
25
|
+
|
|
26
|
+
var _Legal2 = _interopRequireDefault(require("./components/Legal/Legal"));
|
|
27
|
+
|
|
28
|
+
var _default = _FooterPrimary["default"];
|
|
29
|
+
exports["default"] = _default;
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Core/components/FooterPrimary/index.js"],"names":["FooterPrimary"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;eAIeA,yB","sourcesContent":["import FooterPrimary from './FooterPrimary'\n\nexport HelpButton from './components/HelpButton/HelpButton'\nexport Legal from './components/Legal/Legal'\nexport default FooterPrimary\n"],"file":"index.js"}
|
|
@@ -0,0 +1,134 @@
|
|
|
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 _StylesProvider = _interopRequireDefault(require("../../../../../.storybook/StylesProvider"));
|
|
12
|
+
|
|
13
|
+
var _HeaderPrimary = _interopRequireDefault(require("./HeaderPrimary"));
|
|
14
|
+
|
|
15
|
+
var _user0196w = _interopRequireDefault(require("../../../../../static/assets/users/user-01--96w.png"));
|
|
16
|
+
|
|
17
|
+
var ProvideStyles = function ProvideStyles(storyFn) {
|
|
18
|
+
return _react["default"].createElement(_StylesProvider["default"], null, storyFn());
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
var stories = (0, _react2.storiesOf)('Header Primary', module);
|
|
22
|
+
stories.addDecorator(ProvideStyles);
|
|
23
|
+
stories.addDecorator(_react3.withKnobs);
|
|
24
|
+
var user = {
|
|
25
|
+
name: 'Madaline Gibson',
|
|
26
|
+
image: _user0196w["default"],
|
|
27
|
+
tel: '(605) 230-5253'
|
|
28
|
+
};
|
|
29
|
+
var location = {
|
|
30
|
+
name: 'Chimera Hair Salon at the Point',
|
|
31
|
+
address: '7678 N High St, Denver, CO'
|
|
32
|
+
};
|
|
33
|
+
var organization = {
|
|
34
|
+
name: 'Chimera Hair Salon',
|
|
35
|
+
image: 'https://www.logoground.com/uploads/2018130762018-04-113965123chimera%20logo%20chimera%20logo.jpg'
|
|
36
|
+
};
|
|
37
|
+
stories.add('Default', function () {
|
|
38
|
+
return _react["default"].createElement(_HeaderPrimary["default"], {
|
|
39
|
+
STORYBOOKdoNotWrap: true,
|
|
40
|
+
isSidebarVisible: (0, _react3["boolean"])('isSidebarVisible', false),
|
|
41
|
+
toggleSidebarVisibility: function toggleSidebarVisibility() {
|
|
42
|
+
return null;
|
|
43
|
+
},
|
|
44
|
+
loginCTA: (0, _react3.text)('loginCTA', 'Log In'),
|
|
45
|
+
loginHref: (0, _react3.text)('loginHref', '/')
|
|
46
|
+
});
|
|
47
|
+
}).add('Logged In', function () {
|
|
48
|
+
return _react["default"].createElement(_HeaderPrimary["default"], {
|
|
49
|
+
STORYBOOKdoNotWrap: true,
|
|
50
|
+
user: (0, _react3.object)('user', user),
|
|
51
|
+
isSidebarVisible: (0, _react3["boolean"])('isSidebarVisible', false),
|
|
52
|
+
toggleSidebarVisibility: function toggleSidebarVisibility() {
|
|
53
|
+
return null;
|
|
54
|
+
},
|
|
55
|
+
getSearchSuggestionValue: function getSearchSuggestionValue() {
|
|
56
|
+
return null;
|
|
57
|
+
},
|
|
58
|
+
renderSearchSuggestion: function renderSearchSuggestion() {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}).add('Logged In to Organization', function () {
|
|
63
|
+
return _react["default"].createElement(_HeaderPrimary["default"], {
|
|
64
|
+
STORYBOOKdoNotWrap: true,
|
|
65
|
+
user: (0, _react3.object)('user', user),
|
|
66
|
+
organization: (0, _react3.object)('organization', organization),
|
|
67
|
+
isSidebarVisible: (0, _react3["boolean"])('isSidebarVisible', false),
|
|
68
|
+
toggleSidebarVisibility: function toggleSidebarVisibility() {
|
|
69
|
+
return null;
|
|
70
|
+
},
|
|
71
|
+
getSearchSuggestionValue: function getSearchSuggestionValue() {
|
|
72
|
+
return null;
|
|
73
|
+
},
|
|
74
|
+
renderSearchSuggestion: function renderSearchSuggestion() {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}).add('Logged In to location', function () {
|
|
79
|
+
return _react["default"].createElement(_HeaderPrimary["default"], {
|
|
80
|
+
STORYBOOKdoNotWrap: true,
|
|
81
|
+
user: (0, _react3.object)('user', user),
|
|
82
|
+
organization: (0, _react3.object)('organization', organization),
|
|
83
|
+
location: (0, _react3.object)('location', location),
|
|
84
|
+
isSidebarVisible: (0, _react3["boolean"])('isSidebarVisible', false),
|
|
85
|
+
toggleSidebarVisibility: function toggleSidebarVisibility() {
|
|
86
|
+
return null;
|
|
87
|
+
},
|
|
88
|
+
getSearchSuggestionValue: function getSearchSuggestionValue() {
|
|
89
|
+
return null;
|
|
90
|
+
},
|
|
91
|
+
renderSearchSuggestion: function renderSearchSuggestion() {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}).add('Location, Group Manager', function () {
|
|
96
|
+
return _react["default"].createElement(_HeaderPrimary["default"], {
|
|
97
|
+
STORYBOOKdoNotWrap: true,
|
|
98
|
+
user: (0, _react3.object)('user', user),
|
|
99
|
+
organization: (0, _react3.object)('organization', organization),
|
|
100
|
+
location: (0, _react3.object)('location', location),
|
|
101
|
+
isSidebarVisible: (0, _react3["boolean"])('isSidebarVisible', false),
|
|
102
|
+
toggleSidebarVisibility: function toggleSidebarVisibility() {
|
|
103
|
+
return null;
|
|
104
|
+
},
|
|
105
|
+
getSearchSuggestionValue: function getSearchSuggestionValue() {
|
|
106
|
+
return null;
|
|
107
|
+
},
|
|
108
|
+
renderSearchSuggestion: function renderSearchSuggestion() {
|
|
109
|
+
return null;
|
|
110
|
+
},
|
|
111
|
+
isLocationManagmentButtonVisible: true
|
|
112
|
+
});
|
|
113
|
+
}).add('Location, Owner', function () {
|
|
114
|
+
return _react["default"].createElement(_HeaderPrimary["default"], {
|
|
115
|
+
STORYBOOKdoNotWrap: true,
|
|
116
|
+
user: (0, _react3.object)('user', user),
|
|
117
|
+
organization: (0, _react3.object)('organization', organization),
|
|
118
|
+
location: (0, _react3.object)('location', location),
|
|
119
|
+
isSidebarVisible: (0, _react3["boolean"])('isSidebarVisible', false),
|
|
120
|
+
toggleSidebarVisibility: function toggleSidebarVisibility() {
|
|
121
|
+
return null;
|
|
122
|
+
},
|
|
123
|
+
getSearchSuggestionValue: function getSearchSuggestionValue() {
|
|
124
|
+
return null;
|
|
125
|
+
},
|
|
126
|
+
renderSearchSuggestion: function renderSearchSuggestion() {
|
|
127
|
+
return null;
|
|
128
|
+
},
|
|
129
|
+
isLocationManagmentButtonVisible: true,
|
|
130
|
+
isSkillManagementButtonVisible: true,
|
|
131
|
+
skillsHref: "#"
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
//# sourceMappingURL=HeaderPrimary-story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Core/components/HeaderPrimary/HeaderPrimary-story.js"],"names":["ProvideStyles","storyFn","stories","module","addDecorator","withKnobs","user","name","image","user01image","tel","location","address","organization","add"],"mappings":";;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAAAC,OAAO;AAAA,SAAI,gCAAC,0BAAD,QAAiBA,OAAO,EAAxB,CAAJ;AAAA,CAA7B;;AAEA,IAAMC,OAAO,GAAG,uBAAU,gBAAV,EAA4BC,MAA5B,CAAhB;AAEAD,OAAO,CAACE,YAAR,CAAqBJ,aAArB;AACAE,OAAO,CAACE,YAAR,CAAqBC,iBAArB;AAEA,IAAMC,IAAI,GAAG;AACZC,EAAAA,IAAI,EAAE,iBADM;AAEZC,EAAAA,KAAK,EAAEC,qBAFK;AAGZC,EAAAA,GAAG,EAAE;AAHO,CAAb;AAMA,IAAMC,QAAQ,GAAG;AAChBJ,EAAAA,IAAI,EAAE,iCADU;AAEhBK,EAAAA,OAAO,EAAE;AAFO,CAAjB;AAIA,IAAMC,YAAY,GAAG;AACpBN,EAAAA,IAAI,EAAE,oBADc;AAEpBC,EAAAA,KAAK,EACJ;AAHmB,CAArB;AAMAN,OAAO,CACLY,GADF,CACM,SADN,EACiB;AAAA,SACf,gCAAC,yBAAD;AACC,IAAA,kBAAkB,MADnB;AAEC,IAAA,gBAAgB,EAAE,wBAAQ,kBAAR,EAA4B,KAA5B,CAFnB;AAGC,IAAA,uBAAuB,EAAE;AAAA,aAAM,IAAN;AAAA,KAH1B;AAIC,IAAA,QAAQ,EAAE,kBAAK,UAAL,EAAiB,QAAjB,CAJX;AAKC,IAAA,SAAS,EAAE,kBAAK,WAAL,EAAkB,GAAlB;AALZ,IADe;AAAA,CADjB,EAUEA,GAVF,CAUM,WAVN,EAUmB;AAAA,SACjB,gCAAC,yBAAD;AACC,IAAA,kBAAkB,MADnB;AAEC,IAAA,IAAI,EAAE,oBAAO,MAAP,EAAeR,IAAf,CAFP;AAGC,IAAA,gBAAgB,EAAE,wBAAQ,kBAAR,E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A2CiC;AAAA,SAC/B,gCAAC,yBAAD;AACC,IAAA,kBAAkB,MADnB;AAEC,IAAA,IAAI,EAAE,oBAAO,MAAP,EAAeR,IAAf,CAFP;AAGC,IAAA,YAAY,EAAE,oBAAO,cAAP,EAAuBO,YAAvB,CAHf;AAIC,IAAA,QAAQ,EAAE,oBAAO,UAAP,EAAmBF,QAAnB,CAJX;AAKC,IAAA,gBAAgB,EAAE,wBAAQ,kBAAR,EAA4B,KAA5B,CALnB;AAMC,IAAA,uBAAuB,EAAE;AAAA,aAAM,IAAN;AAAA,KAN1B;AAOC,IAAA,wBAAwB,EAAE;AAAA,aAAM,IAAN;AAAA,KAP3B;AAQC,IAAA,sBAAsB,EAAE;AAAA,aAAM,IAAN;AAAA,KARzB;AASC,IAAA,gCAAgC;AATjC,IAD+B;AAAA,CA3CjC,EAwDEG,GAxDF,CAwDM,iBAxDN,EAwDyB;AAAA,SACvB,gCAAC,yBAAD;AACC,IAAA,kBAAkB,MADnB;AAEC,IAAA,IAAI,EAAE,oBAAO,MAAP,EAAeR,IAAf,CAFP;AAGC,IAAA,YAAY,EAAE,oBAAO,cAAP,EAAuBO,YAAvB,CAHf;AAIC,IAAA,QAAQ,EAAE,oBAAO,UAAP,EAAmBF,QAAnB,CAJX;AAKC,IAAA,gBAAgB,EAAE,wBAAQ,kBAAR,EAA4B,KAA5B,CALnB;AAMC,IAAA,uBAAuB,EAAE;AAAA,aAAM,IAAN;AAAA,KAN1B;AAOC,IAAA,wBAAwB,EAAE;AAAA,aAAM,IAAN;AAAA,KAP3B;AAQC,IAAA,sBAAsB,EAAE;AAAA,aAAM,IAAN;AAAA,KARzB;AASC,IAAA,gCAAgC,MATjC;AAUC,IAAA,8BAA8B,MAV/B;AAWC,IAAA,UAAU,EAAC;AAXZ,IADuB;AAAA,CAxDzB","sourcesContent":["// @flow\nimport React from 'react'\nimport { storiesOf } from '@storybook/react'\nimport { withKnobs, boolean, object, text } from '@storybook/addon-knobs/react'\nimport StylesProvider from '../../../../../.storybook/StylesProvider'\nimport HeaderPrimary from './HeaderPrimary'\nimport user01image from '../../../../../static/assets/users/user-01--96w.png'\n\nconst ProvideStyles = storyFn => <StylesProvider>{storyFn()}</StylesProvider>\n\nconst stories = storiesOf('Header Primary', module)\n\nstories.addDecorator(ProvideStyles)\nstories.addDecorator(withKnobs)\n\nconst user = {\n\tname: 'Madaline Gibson',\n\timage: user01image,\n\ttel: '(605) 230-5253'\n}\n\nconst location = {\n\tname: 'Chimera Hair Salon at the Point',\n\taddress: '7678 N High St, Denver, CO'\n}\nconst organization = {\n\tname: 'Chimera Hair Salon',\n\timage:\n\t\t'https://www.logoground.com/uploads/2018130762018-04-113965123chimera%20logo%20chimera%20logo.jpg'\n}\n\nstories\n\t.add('Default', () => (\n\t\t<HeaderPrimary\n\t\t\tSTORYBOOKdoNotWrap\n\t\t\tisSidebarVisible={boolean('isSidebarVisible', false)}\n\t\t\ttoggleSidebarVisibility={() => null}\n\t\t\tloginCTA={text('loginCTA', 'Log In')}\n\t\t\tloginHref={text('loginHref', '/')}\n\t\t/>\n\t))\n\t.add('Logged In', () => (\n\t\t<HeaderPrimary\n\t\t\tSTORYBOOKdoNotWrap\n\t\t\tuser={object('user', user)}\n\t\t\tisSidebarVisible={boolean('isSidebarVisible', false)}\n\t\t\ttoggleSidebarVisibility={() => null}\n\t\t\tgetSearchSuggestionValue={() => null}\n\t\t\trenderSearchSuggestion={() => null}\n\t\t/>\n\t))\n\t.add('Logged In to Organization', () => (\n\t\t<HeaderPrimary\n\t\t\tSTORYBOOKdoNotWrap\n\t\t\tuser={object('user', user)}\n\t\t\torganization={object('organization', organization)}\n\t\t\tisSidebarVisible={boolean('isSidebarVisible', false)}\n\t\t\ttoggleSidebarVisibility={() => null}\n\t\t\tgetSearchSuggestionValue={() => null}\n\t\t\trenderSearchSuggestion={() => null}\n\t\t/>\n\t))\n\t.add('Logged In to location', () => (\n\t\t<HeaderPrimary\n\t\t\tSTORYBOOKdoNotWrap\n\t\t\tuser={object('user', user)}\n\t\t\torganization={object('organization', organization)}\n\t\t\tlocation={object('location', location)}\n\t\t\tisSidebarVisible={boolean('isSidebarVisible', false)}\n\t\t\ttoggleSidebarVisibility={() => null}\n\t\t\tgetSearchSuggestionValue={() => null}\n\t\t\trenderSearchSuggestion={() => null}\n\t\t/>\n\t))\n\t.add('Location, Group Manager', () => (\n\t\t<HeaderPrimary\n\t\t\tSTORYBOOKdoNotWrap\n\t\t\tuser={object('user', user)}\n\t\t\torganization={object('organization', organization)}\n\t\t\tlocation={object('location', location)}\n\t\t\tisSidebarVisible={boolean('isSidebarVisible', false)}\n\t\t\ttoggleSidebarVisibility={() => null}\n\t\t\tgetSearchSuggestionValue={() => null}\n\t\t\trenderSearchSuggestion={() => null}\n\t\t\tisLocationManagmentButtonVisible\n\t\t/>\n\t))\n\t.add('Location, Owner', () => (\n\t\t<HeaderPrimary\n\t\t\tSTORYBOOKdoNotWrap\n\t\t\tuser={object('user', user)}\n\t\t\torganization={object('organization', organization)}\n\t\t\tlocation={object('location', location)}\n\t\t\tisSidebarVisible={boolean('isSidebarVisible', false)}\n\t\t\ttoggleSidebarVisibility={() => null}\n\t\t\tgetSearchSuggestionValue={() => null}\n\t\t\trenderSearchSuggestion={() => null}\n\t\t\tisLocationManagmentButtonVisible\n\t\t\tisSkillManagementButtonVisible\n\t\t\tskillsHref=\"#\"\n\t\t/>\n\t))\n"],"file":"HeaderPrimary-story.js"}
|