@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,18 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { IHWCalendarEventDetails, IHWCalendarEventDetailsItem, IHWAction } from '@sprucelabs/spruce-types';
|
|
3
|
+
import { IEventDetailsItemProps } from './components/EventDetailsItem/EventDetailsItem';
|
|
4
|
+
export interface IEventDetailsProps extends Omit<IHWCalendarEventDetails, 'items'> {
|
|
5
|
+
/** In a loading state, loading placeholders will be dropped in */
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
/** all the items that make up this event details component */
|
|
8
|
+
items: (IEventDetailsItemProps | IHWCalendarEventDetailsItem)[];
|
|
9
|
+
/** optional, provide a handler for Actions */
|
|
10
|
+
onAction?: (action: IHWAction) => any;
|
|
11
|
+
}
|
|
12
|
+
interface IEventDetailsState {
|
|
13
|
+
}
|
|
14
|
+
export default class EventDetails extends Component<IEventDetailsProps | IHWCalendarEventDetails, IEventDetailsState> {
|
|
15
|
+
render(): React.ReactElement;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=EventDetails.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventDetails.d.ts","sourceRoot":"","sources":["../../../src/components/EventDetails/EventDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGxC,OAAO,EACN,uBAAuB,EAEvB,2BAA2B,EAC3B,SAAS,EACT,MAAM,0BAA0B,CAAA;AAEjC,OAAyB,EACxB,sBAAsB,EACtB,MAAM,gDAAgD,CAAA;AAGvD,MAAM,WAAW,kBAChB,SAAQ,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC;IAC9C,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,8DAA8D;IAC9D,KAAK,EAAE,CAAC,sBAAsB,GAAG,2BAA2B,CAAC,EAAE,CAAA;IAE/D,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,GAAG,CAAA;CACrC;AAED,UAAU,kBAAkB;CAAG;AAE/B,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAClD,kBAAkB,GAAG,uBAAuB,EAC5C,kBAAkB,CAClB;IACO,MAAM,IAAI,KAAK,CAAC,YAAY;CAoCnC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
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 _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
+
|
|
14
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
+
|
|
16
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
+
|
|
18
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
+
|
|
20
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
21
|
+
|
|
22
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
23
|
+
|
|
24
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
25
|
+
|
|
26
|
+
var _spruceTypes = require("@sprucelabs/spruce-types");
|
|
27
|
+
|
|
28
|
+
var _EventDetailsItem = _interopRequireDefault(require("./components/EventDetailsItem/EventDetailsItem"));
|
|
29
|
+
|
|
30
|
+
var _ = require("../..");
|
|
31
|
+
|
|
32
|
+
var EventDetails =
|
|
33
|
+
/*#__PURE__*/
|
|
34
|
+
function (_Component) {
|
|
35
|
+
(0, _inherits2["default"])(EventDetails, _Component);
|
|
36
|
+
|
|
37
|
+
function EventDetails() {
|
|
38
|
+
(0, _classCallCheck2["default"])(this, EventDetails);
|
|
39
|
+
return (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(EventDetails).apply(this, arguments));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
(0, _createClass2["default"])(EventDetails, [{
|
|
43
|
+
key: "render",
|
|
44
|
+
value: function render() {
|
|
45
|
+
var reactHeartwoodProps = this.props;
|
|
46
|
+
var commonProps = this.props;
|
|
47
|
+
var items = commonProps.items;
|
|
48
|
+
var isLoading = reactHeartwoodProps.isLoading,
|
|
49
|
+
onAction = reactHeartwoodProps.onAction;
|
|
50
|
+
var className = (0, _classnames["default"])('event-details', {
|
|
51
|
+
'loading-placeholder': isLoading
|
|
52
|
+
});
|
|
53
|
+
return _react["default"].createElement("div", {
|
|
54
|
+
className: className
|
|
55
|
+
}, (0, _.unionArray)(items).map(function (item) {
|
|
56
|
+
return _react["default"].createElement("div", {
|
|
57
|
+
key: item.viewModel.id,
|
|
58
|
+
className: (0, _classnames["default"])('event-details__section', {
|
|
59
|
+
'event-details__button-wrapper': item.type === _spruceTypes.IHWCalendarEventDetailsItemType.Button || item.type === _spruceTypes.IHWCalendarEventDetailsItemType.SplitButton,
|
|
60
|
+
'event-details__markdown-wrapper': item.type === _spruceTypes.IHWCalendarEventDetailsItemType.Markdown,
|
|
61
|
+
'event-details__card-wrapper': item.type === _spruceTypes.IHWCalendarEventDetailsItemType.CardBuilder
|
|
62
|
+
})
|
|
63
|
+
}, _react["default"].createElement(_EventDetailsItem["default"], {
|
|
64
|
+
type: item.type,
|
|
65
|
+
viewModel: item.viewModel,
|
|
66
|
+
onAction: onAction
|
|
67
|
+
}));
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
}]);
|
|
71
|
+
return EventDetails;
|
|
72
|
+
}(_react.Component);
|
|
73
|
+
|
|
74
|
+
exports["default"] = EventDetails;
|
|
75
|
+
//# sourceMappingURL=EventDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/EventDetails/EventDetails.tsx"],"names":["EventDetails","reactHeartwoodProps","props","commonProps","items","isLoading","onAction","className","map","item","viewModel","id","type","IHWCalendarEventDetailsItemType","Button","SplitButton","Markdown","CardBuilder","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AAOA;;AAGA;;IAgBqBA,Y;;;;;;;;;;;;6BAIgB;AACnC,UAAMC,mBAAmB,GAAG,KAAKC,KAAjC;AACA,UAAMC,WAAW,GAAG,KAAKD,KAAzB;AAFmC,UAI3BE,KAJ2B,GAIjBD,WAJiB,CAI3BC,KAJ2B;AAAA,UAK3BC,SAL2B,GAKHJ,mBALG,CAK3BI,SAL2B;AAAA,UAKhBC,QALgB,GAKHL,mBALG,CAKhBK,QALgB;AAOnC,UAAMC,SAAS,GAAG,4BAAG,eAAH,EAAoB;AACrC,+BAAuBF;AADc,OAApB,CAAlB;AAIA,aACC;AAAK,QAAA,SAAS,EAAEE;AAAhB,SACE,kBAAWH,KAAX,EAAkBI,GAAlB,CAAsB,UAAAC,IAAI;AAAA,eAC1B;AACC,UAAA,GAAG,EAAEA,IAAI,CAACC,SAAL,CAAeC,EADrB;AAEC,UAAA,SAAS,EAAE,4BAAG,wBAAH,EAA6B;AACvC,6CACCF,IAAI,CAACG,IAAL,KAAcC,6CAAgCC,MAA9C,IACAL,IAAI,CAACG,IAAL,KAAcC,6CAAgCE,WAHR;AAIvC,+CACCN,IAAI,CAACG,IAAL,KAAcC,6CAAgCG,QALR;AAMvC,2CACCP,IAAI,CAACG,IAAL,KAAcC,6CAAgCI;AAPR,WAA7B;AAFZ,WAYC,gCAAC,4BAAD;AACC,UAAA,IAAI,EAAER,IAAI,CAACG,IADZ;AAEC,UAAA,SAAS,EAAEH,IAAI,CAACC,SAFjB;AAGC,UAAA,QAAQ,EAAEJ;AAHX,UAZD,CAD0B;AAAA,OAA1B,CADF,CADD;AAwBA;;;EAvCwCY,gB","sourcesContent":["import React, { Component } from 'react'\nimport cx from 'classnames'\n\nimport {\n\tIHWCalendarEventDetails,\n\tIHWCalendarEventDetailsItemType,\n\tIHWCalendarEventDetailsItem,\n\tIHWAction\n} from '@sprucelabs/spruce-types'\n\nimport EventDetailsItem, {\n\tIEventDetailsItemProps\n} from './components/EventDetailsItem/EventDetailsItem'\nimport { unionArray } from '../..'\n\nexport interface IEventDetailsProps\n\textends Omit<IHWCalendarEventDetails, 'items'> {\n\t/** In a loading state, loading placeholders will be dropped in */\n\tisLoading?: boolean\n\n\t/** all the items that make up this event details component */\n\titems: (IEventDetailsItemProps | IHWCalendarEventDetailsItem)[]\n\n\t/** optional, provide a handler for Actions */\n\tonAction?: (action: IHWAction) => any\n}\n\ninterface IEventDetailsState {}\n\nexport default class EventDetails extends Component<\n\tIEventDetailsProps | IHWCalendarEventDetails,\n\tIEventDetailsState\n> {\n\tpublic render(): React.ReactElement {\n\t\tconst reactHeartwoodProps = this.props as IEventDetailsProps\n\t\tconst commonProps = this.props as IHWCalendarEventDetails\n\n\t\tconst { items } = commonProps\n\t\tconst { isLoading, onAction } = reactHeartwoodProps\n\n\t\tconst className = cx('event-details', {\n\t\t\t'loading-placeholder': isLoading\n\t\t})\n\n\t\treturn (\n\t\t\t<div className={className}>\n\t\t\t\t{unionArray(items).map(item => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={item.viewModel.id}\n\t\t\t\t\t\tclassName={cx('event-details__section', {\n\t\t\t\t\t\t\t'event-details__button-wrapper':\n\t\t\t\t\t\t\t\titem.type === IHWCalendarEventDetailsItemType.Button ||\n\t\t\t\t\t\t\t\titem.type === IHWCalendarEventDetailsItemType.SplitButton,\n\t\t\t\t\t\t\t'event-details__markdown-wrapper':\n\t\t\t\t\t\t\t\titem.type === IHWCalendarEventDetailsItemType.Markdown,\n\t\t\t\t\t\t\t'event-details__card-wrapper':\n\t\t\t\t\t\t\t\titem.type === IHWCalendarEventDetailsItemType.CardBuilder\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<EventDetailsItem\n\t\t\t\t\t\t\ttype={item.type}\n\t\t\t\t\t\t\tviewModel={item.viewModel}\n\t\t\t\t\t\t\tonAction={onAction}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t)\n\t}\n}\n"],"file":"EventDetails.js"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IEventDetailsItemProps } from '@sprucelabs/react-heartwood-components';
|
|
2
|
+
import { IHWCalendarEventDetailsItem, IHWUiEnhancementSection } from '@sprucelabs/spruce-types';
|
|
3
|
+
declare type TValidEventDetails = IHWCalendarEventDetailsItem[] | IEventDetailsItemProps[];
|
|
4
|
+
/** This utility is used in conjunction with the `getUIEnhancements` endpoint.
|
|
5
|
+
* With it, you can meld the results of that API with an existing eventDetailsItems
|
|
6
|
+
* response, which you may have retrieved from `CalendarEvents`, or otherwise
|
|
7
|
+
* may be assembling manually.
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyUIEnhancementsToEventDetails(eventDetailItems: TValidEventDetails, UIEnhancementSections: IHWUiEnhancementSection[]): any;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=EventDetailsUtilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventDetailsUtilities.d.ts","sourceRoot":"","sources":["../../../src/components/EventDetails/EventDetailsUtilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,sBAAsB,EACtB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAEN,2BAA2B,EAC3B,uBAAuB,EACvB,MAAM,0BAA0B,CAAA;AAGjC,aAAK,kBAAkB,GACpB,2BAA2B,EAAE,GAC7B,sBAAsB,EAAE,CAAA;AAE3B;;;;GAIG;AACH,wBAAgB,iCAAiC,CAChD,gBAAgB,EAAE,kBAAkB,EACpC,qBAAqB,EAAE,uBAAuB,EAAE,OA0DhD"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.applyUIEnhancementsToEventDetails = applyUIEnhancementsToEventDetails;
|
|
9
|
+
|
|
10
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
11
|
+
|
|
12
|
+
var _lodash = require("lodash");
|
|
13
|
+
|
|
14
|
+
/** This utility is used in conjunction with the `getUIEnhancements` endpoint.
|
|
15
|
+
* With it, you can meld the results of that API with an existing eventDetailsItems
|
|
16
|
+
* response, which you may have retrieved from `CalendarEvents`, or otherwise
|
|
17
|
+
* may be assembling manually.
|
|
18
|
+
*/
|
|
19
|
+
function applyUIEnhancementsToEventDetails(eventDetailItems, UIEnhancementSections) {
|
|
20
|
+
// First, we clone the input to keep the method pure and avoid side-effects.
|
|
21
|
+
var mutatedEventDetailItems = (0, _lodash.cloneDeep)(eventDetailItems); // This loop applies the `contextMenuItems` enhancements to the appropriate
|
|
22
|
+
// context menus in the event details.
|
|
23
|
+
|
|
24
|
+
(0, _lodash.each)(mutatedEventDetailItems, function (eventDetailItem) {
|
|
25
|
+
if (eventDetailItem && (0, _typeof2["default"])(eventDetailItem) === 'object' && eventDetailItem.viewModel.__typename === 'List') {
|
|
26
|
+
eventDetailItem.viewModel.items && eventDetailItem.viewModel.items.forEach(function (item) {
|
|
27
|
+
var matchingUIEnhancement = (0, _lodash.find)(UIEnhancementSections, {
|
|
28
|
+
id: eventDetailItem.id || undefined
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
if (matchingUIEnhancement && item.__typename === 'ListItem' && item.contextMenu) {
|
|
32
|
+
item.contextMenu.actions = (0, _lodash.concat)(item.contextMenu.actions, (0, _lodash.compact)(matchingUIEnhancement.contextMenuItems));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}); // At this stage we interleave the new `calendarEventDetailsItems` enhancements with
|
|
37
|
+
// the inputs'.
|
|
38
|
+
|
|
39
|
+
var mutatedEventDetailItemsWithAdditionalEventDetailItems = [];
|
|
40
|
+
(0, _lodash.each)(mutatedEventDetailItems, function (eventDetailItem) {
|
|
41
|
+
mutatedEventDetailItemsWithAdditionalEventDetailItems.push(eventDetailItem);
|
|
42
|
+
|
|
43
|
+
if (eventDetailItem && (0, _typeof2["default"])(eventDetailItem) === 'object') {
|
|
44
|
+
var matchingUIEnhancement = (0, _lodash.find)(UIEnhancementSections, {
|
|
45
|
+
id: eventDetailItem.id || undefined
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
if (matchingUIEnhancement && matchingUIEnhancement.calendarEventDetailsItems) {
|
|
49
|
+
mutatedEventDetailItemsWithAdditionalEventDetailItems = mutatedEventDetailItemsWithAdditionalEventDetailItems.concat(matchingUIEnhancement.calendarEventDetailsItems);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}); // And done! Have a nice day!
|
|
53
|
+
|
|
54
|
+
return mutatedEventDetailItemsWithAdditionalEventDetailItems;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=EventDetailsUtilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/EventDetails/EventDetailsUtilities.ts"],"names":["applyUIEnhancementsToEventDetails","eventDetailItems","UIEnhancementSections","mutatedEventDetailItems","eventDetailItem","viewModel","__typename","items","forEach","item","matchingUIEnhancement","id","undefined","contextMenu","actions","contextMenuItems","mutatedEventDetailItemsWithAdditionalEventDetailItems","push","calendarEventDetailsItems","concat"],"mappings":";;;;;;;;;;;AASA;;AAMA;;;;;AAKO,SAASA,iCAAT,CACNC,gBADM,EAENC,qBAFM,EAGL;AACD;AACA,MAAMC,uBAAuB,GAAG,uBAAUF,gBAAV,CAAhC,CAFC,CAID;AACA;;AACA,oBAAKE,uBAAL,EAA8B,UAAAC,eAAe,EAAI;AAChD,QACCA,eAAe,IACf,yBAAOA,eAAP,MAA2B,QAD3B,IAEAA,eAAe,CAACC,SAAhB,CAA0BC,UAA1B,KAAyC,MAH1C,EAIE;AACDF,MAAAA,eAAe,CAACC,SAAhB,CAA0BE,KAA1B,IACCH,eAAe,CAACC,SAAhB,CAA0BE,KAA1B,CAAgCC,OAAhC,CAAwC,UAAAC,IAAI,EAAI;AAC/C,YAAMC,qBAAqB,GAAG,kBAAKR,qBAAL,EAA4B;AACzDS,UAAAA,EAAE,EAAEP,eAAe,CAACO,EAAhB,IAAsBC;AAD+B,SAA5B,CAA9B;;AAIA,YACCF,qBAAqB,IACrBD,IAAI,CAACH,UAAL,KAAoB,UADpB,IAEAG,IAAI,CAACI,WAHN,EAIE;AACDJ,UAAAA,IAAI,CAACI,WAAL,CAAiBC,OAAjB,GAA2B,oBAC1BL,IAAI,CAACI,WAAL,CAAiBC,OADS,EAE1B,qBAAQJ,qBAAqB,CAACK,gBAA9B,CAF0B,CAA3B;AAIA;AACD,OAfD,CADD;AAiBA;AACD,GAxBD,EANC,CAgCD;AACA;;AACA,MAAIC,qDAA0D,GAAG,EAAjE;AAEA,oBAAKb,uBAAL,EAA8B,UAAAC,eAAe,EAAI;AAChDY,IAAAA,qDAAqD,CAACC,IAAtD,CAA2Db,eAA3D;;AAEA,QAAIA,eAAe,IAAI,yBAAOA,eAAP,MAA2B,QAAlD,EAA4D;AAC3D,UAAMM,qBAAqB,GAAG,kBAAKR,qBAAL,EAA4B;AACzDS,QAAAA,EAAE,EAAEP,eAAe,CAACO,EAAhB,IAAsBC;AAD+B,OAA5B,CAA9B;;AAIA,UACCF,qBAAqB,IACrBA,qBAAqB,CAACQ,yBAFvB,EAGE;AACDF,QAAAA,qDAAqD,GAAGA,qDAAqD,CAACG,MAAtD,CACvDT,qBAAqB,CAACQ,yBADiC,CAAxD;AAGA;AACD;AACD,GAjBD,EApCC,CAuDD;;AACA,SAAOF,qDAAP;AACA","sourcesContent":["import {\n\tIButtonProps,\n\tIEventDetailsItemProps\n} from '@sprucelabs/react-heartwood-components'\nimport {\n\tIHWButton,\n\tIHWCalendarEventDetailsItem,\n\tIHWUiEnhancementSection\n} from '@sprucelabs/spruce-types'\nimport { cloneDeep, compact, concat, each, find } from 'lodash'\n\ntype TValidEventDetails =\n\t| IHWCalendarEventDetailsItem[]\n\t| IEventDetailsItemProps[]\n\n/** This utility is used in conjunction with the `getUIEnhancements` endpoint.\n * With it, you can meld the results of that API with an existing eventDetailsItems\n * response, which you may have retrieved from `CalendarEvents`, or otherwise\n * may be assembling manually.\n */\nexport function applyUIEnhancementsToEventDetails(\n\teventDetailItems: TValidEventDetails,\n\tUIEnhancementSections: IHWUiEnhancementSection[]\n) {\n\t// First, we clone the input to keep the method pure and avoid side-effects.\n\tconst mutatedEventDetailItems = cloneDeep(eventDetailItems)\n\n\t// This loop applies the `contextMenuItems` enhancements to the appropriate\n\t// context menus in the event details.\n\teach(mutatedEventDetailItems, eventDetailItem => {\n\t\tif (\n\t\t\teventDetailItem &&\n\t\t\ttypeof eventDetailItem === 'object' &&\n\t\t\teventDetailItem.viewModel.__typename === 'List'\n\t\t) {\n\t\t\teventDetailItem.viewModel.items &&\n\t\t\t\teventDetailItem.viewModel.items.forEach(item => {\n\t\t\t\t\tconst matchingUIEnhancement = find(UIEnhancementSections, {\n\t\t\t\t\t\tid: eventDetailItem.id || undefined\n\t\t\t\t\t})\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tmatchingUIEnhancement &&\n\t\t\t\t\t\titem.__typename === 'ListItem' &&\n\t\t\t\t\t\titem.contextMenu\n\t\t\t\t\t) {\n\t\t\t\t\t\titem.contextMenu.actions = concat<IHWButton | IButtonProps>(\n\t\t\t\t\t\t\titem.contextMenu.actions,\n\t\t\t\t\t\t\tcompact(matchingUIEnhancement.contextMenuItems)\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t})\n\n\t// At this stage we interleave the new `calendarEventDetailsItems` enhancements with\n\t// the inputs'.\n\tlet mutatedEventDetailItemsWithAdditionalEventDetailItems: any = []\n\n\teach(mutatedEventDetailItems, eventDetailItem => {\n\t\tmutatedEventDetailItemsWithAdditionalEventDetailItems.push(eventDetailItem)\n\n\t\tif (eventDetailItem && typeof eventDetailItem === 'object') {\n\t\t\tconst matchingUIEnhancement = find(UIEnhancementSections, {\n\t\t\t\tid: eventDetailItem.id || undefined\n\t\t\t})\n\n\t\t\tif (\n\t\t\t\tmatchingUIEnhancement &&\n\t\t\t\tmatchingUIEnhancement.calendarEventDetailsItems\n\t\t\t) {\n\t\t\t\tmutatedEventDetailItemsWithAdditionalEventDetailItems = mutatedEventDetailItemsWithAdditionalEventDetailItems.concat(\n\t\t\t\t\tmatchingUIEnhancement.calendarEventDetailsItems\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t})\n\n\t// And done! Have a nice day!\n\treturn mutatedEventDetailItemsWithAdditionalEventDetailItems\n}\n"],"file":"EventDetailsUtilities.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IButtonProps } from '../../../Button/Button';
|
|
3
|
+
import { ICardBuilderProps } from '../../../Card';
|
|
4
|
+
import { IListProps } from '../../../List/List';
|
|
5
|
+
import { IMarkdownProps } from '../../../MarkdownText/MarkdownText';
|
|
6
|
+
import { ISplitButtonProps } from '../../../SplitButton/SplitButton';
|
|
7
|
+
import { ITextProps } from '../../../Text/Text';
|
|
8
|
+
import { IToastProps } from '../../../Toast/Toast';
|
|
9
|
+
import { IHWCalendarEventDetailsItem, IHWAction, IHWCalendarEventDetailsItemViewModel } from '@sprucelabs/spruce-types';
|
|
10
|
+
declare type ViewModel = IListProps | IButtonProps | ICardBuilderProps | ITextProps | IToastProps | IMarkdownProps | ISplitButtonProps;
|
|
11
|
+
export interface IEventDetailsItemProps extends Omit<IHWCalendarEventDetailsItem, 'viewModel'> {
|
|
12
|
+
viewModel: ViewModel | IHWCalendarEventDetailsItemViewModel;
|
|
13
|
+
/** optional, provide a handler for Actions */
|
|
14
|
+
onAction?: (action: IHWAction) => any;
|
|
15
|
+
}
|
|
16
|
+
declare const EventDetailsItem: (props: IEventDetailsItemProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
|
|
17
|
+
export default EventDetailsItem;
|
|
18
|
+
//# sourceMappingURL=EventDetailsItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventDetailsItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/EventDetails/components/EventDetailsItem/EventDetailsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAe,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAa,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAqB,EACpB,cAAc,EACd,MAAM,oCAAoC,CAAA;AAC3C,OAAoB,EACnB,iBAAiB,EACjB,MAAM,kCAAkC,CAAA;AACzC,OAAa,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAErD,OAAc,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EACN,2BAA2B,EAC3B,SAAS,EACT,oCAAoC,EAGpC,MAAM,0BAA0B,CAAA;AAoBjC,aAAK,SAAS,GACX,UAAU,GACV,YAAY,GACZ,iBAAiB,GACjB,UAAU,GACV,WAAW,GACX,cAAc,GACd,iBAAiB,CAAA;AAEpB,MAAM,WAAW,sBAChB,SAAQ,IAAI,CAAC,2BAA2B,EAAE,WAAW,CAAC;IACtD,SAAS,EAAE,SAAS,GAAG,oCAAoC,CAAA;IAE3D,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,GAAG,CAAA;CACrC;AAED,QAAA,MAAM,gBAAgB,mPAqDrB,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
|
|
16
|
+
var _Button = _interopRequireDefault(require("../../../Button/Button"));
|
|
17
|
+
|
|
18
|
+
var _Card = require("../../../Card");
|
|
19
|
+
|
|
20
|
+
var _List = _interopRequireDefault(require("../../../List/List"));
|
|
21
|
+
|
|
22
|
+
var _MarkdownText = _interopRequireDefault(require("../../../MarkdownText/MarkdownText"));
|
|
23
|
+
|
|
24
|
+
var _SplitButton = _interopRequireDefault(require("../../../SplitButton/SplitButton"));
|
|
25
|
+
|
|
26
|
+
var _Text = _interopRequireDefault(require("../../../Text/Text"));
|
|
27
|
+
|
|
28
|
+
var _Toast = _interopRequireDefault(require("../../../Toast/Toast"));
|
|
29
|
+
|
|
30
|
+
var _spruceTypes = require("@sprucelabs/spruce-types");
|
|
31
|
+
|
|
32
|
+
// TODO: fix toast types to be able to be used here
|
|
33
|
+
var MDTextContainer = function MDTextContainer(props) {
|
|
34
|
+
return _react["default"].createElement("div", {
|
|
35
|
+
className: "event-details__markdown"
|
|
36
|
+
}, _react["default"].createElement(_MarkdownText["default"], props));
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var components = {
|
|
40
|
+
list: _List["default"],
|
|
41
|
+
button: _Button["default"],
|
|
42
|
+
cardBuilder: _Card.CardBuilder,
|
|
43
|
+
splitButton: _SplitButton["default"],
|
|
44
|
+
text: _Text["default"],
|
|
45
|
+
toast: _Toast["default"],
|
|
46
|
+
markdown: MDTextContainer
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
var EventDetailsItem = function EventDetailsItem(props) {
|
|
50
|
+
var type = props.type,
|
|
51
|
+
viewModel = props.viewModel,
|
|
52
|
+
onAction = props.onAction;
|
|
53
|
+
|
|
54
|
+
if (!type || !components[type]) {
|
|
55
|
+
// TODO: Use logger library for warning
|
|
56
|
+
console.warn("No component found for key: ".concat(type, ". Please double-check properties passed into <EventDetailsItem> from <EventDetails>."));
|
|
57
|
+
return _react["default"].createElement(_react.Fragment, null);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
var Handler;
|
|
61
|
+
var viewModelProps;
|
|
62
|
+
|
|
63
|
+
switch (type) {
|
|
64
|
+
case _spruceTypes.IHWCalendarEventDetailsItemType.List:
|
|
65
|
+
Handler = components[type];
|
|
66
|
+
viewModelProps = viewModel;
|
|
67
|
+
break;
|
|
68
|
+
|
|
69
|
+
case _spruceTypes.IHWCalendarEventDetailsItemType.Button:
|
|
70
|
+
Handler = components[type];
|
|
71
|
+
viewModelProps = viewModel;
|
|
72
|
+
break;
|
|
73
|
+
|
|
74
|
+
case _spruceTypes.IHWCalendarEventDetailsItemType.CardBuilder:
|
|
75
|
+
Handler = components[type];
|
|
76
|
+
viewModelProps = viewModel;
|
|
77
|
+
break;
|
|
78
|
+
|
|
79
|
+
case _spruceTypes.IHWCalendarEventDetailsItemType.SplitButton:
|
|
80
|
+
Handler = components[type];
|
|
81
|
+
viewModelProps = viewModel;
|
|
82
|
+
break;
|
|
83
|
+
|
|
84
|
+
case _spruceTypes.IHWCalendarEventDetailsItemType.Text:
|
|
85
|
+
Handler = components[type];
|
|
86
|
+
viewModelProps = viewModel;
|
|
87
|
+
break;
|
|
88
|
+
|
|
89
|
+
case _spruceTypes.IHWCalendarEventDetailsItemType.Toast:
|
|
90
|
+
Handler = components[type];
|
|
91
|
+
viewModelProps = viewModel;
|
|
92
|
+
break;
|
|
93
|
+
|
|
94
|
+
case _spruceTypes.IHWCalendarEventDetailsItemType.Markdown:
|
|
95
|
+
Handler = components[type];
|
|
96
|
+
viewModelProps = viewModel;
|
|
97
|
+
break;
|
|
98
|
+
|
|
99
|
+
default:
|
|
100
|
+
console.warn("No component found for key: ".concat(type, ". Please double-check properties passed into <EventDetailsItem> from <EventDetails>."));
|
|
101
|
+
return _react["default"].createElement(_react.Fragment, null);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return _react["default"].createElement(Handler, (0, _extends2["default"])({}, viewModelProps, {
|
|
105
|
+
onAction: onAction
|
|
106
|
+
}));
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
var _default = EventDetailsItem;
|
|
110
|
+
exports["default"] = _default;
|
|
111
|
+
//# sourceMappingURL=EventDetailsItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/EventDetails/components/EventDetailsItem/EventDetailsItem.tsx"],"names":["MDTextContainer","props","components","list","List","button","Button","cardBuilder","CardBuilder","splitButton","SplitButton","text","Text","toast","Toast","markdown","EventDetailsItem","type","viewModel","onAction","console","warn","Handler","viewModelProps","IHWCalendarEventDetailsItemType","Markdown"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAGA;;AAGA;;AAEA;;AACA;;AAFA;AAUA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CACvBC,KADuB;AAAA,SAGvB;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,gCAAC,wBAAD,EAAkBA,KAAlB,CADD,CAHuB;AAAA,CAAxB;;AAQA,IAAMC,UAAU,GAAG;AAClBC,EAAAA,IAAI,EAAEC,gBADY;AAElBC,EAAAA,MAAM,EAAEC,kBAFU;AAGlBC,EAAAA,WAAW,EAAEC,iBAHK;AAIlBC,EAAAA,WAAW,EAAEC,uBAJK;AAKlBC,EAAAA,IAAI,EAAEC,gBALY;AAMlBC,EAAAA,KAAK,EAAEC,iBANW;AAOlBC,EAAAA,QAAQ,EAAEf;AAPQ,CAAnB;;AA2BA,IAAMgB,gBAAgB,GAAG,SAAnBA,gBAAmB,CACxBf,KADwB,EAEA;AAAA,MAChBgB,IADgB,GACchB,KADd,CAChBgB,IADgB;AAAA,MACVC,SADU,GACcjB,KADd,CACViB,SADU;AAAA,MACCC,QADD,GACclB,KADd,CACCkB,QADD;;AAGxB,MAAI,CAACF,IAAD,IAAS,CAACf,UAAU,CAACe,IAAD,CAAxB,EAAgC;AAC/B;AACAG,IAAAA,OAAO,CAACC,IAAR,uCACgCJ,IADhC;AAGA,WAAO,gCAAC,eAAD,OAAP;AACA;;AAED,MAAIK,OAAJ;AACA,MAAIC,cAAJ;;AAEA,UAAQN,IAAR;AACC,SAAKO,6CAAgCpB,IAArC;AACCkB,MAAAA,OAAO,GAAGpB,UAAU,CAACe,IAAD,CAApB;AACAM,MAAAA,cAAc,GAAGL,SAAjB;AACA;;AACD,SAAKM,6CAAgClB,MAArC;AACCgB,MAAAA,OAAO,GAAGpB,UAAU,CAACe,IAAD,CAApB;AACAM,MAAAA,cAAc,GAAGL,SAAjB;AACA;;AACD,SAAKM,6CAAgChB,WAArC;AACCc,MAAAA,OAAO,GAAGpB,UAAU,CAACe,IAAD,CAApB;AACAM,MAAAA,cAAc,GAAGL,SAAjB;AACA;;AACD,SAAKM,6CAAgCd,WAArC;AACCY,MAAAA,OAAO,GAAGpB,UAAU,CAACe,IAAD,CAApB;AACAM,MAAAA,cAAc,GAAGL,SAAjB;AACA;;AACD,SAAKM,6CAAgCZ,IAArC;AACCU,MAAAA,OAAO,GAAGpB,UAAU,CAACe,IAAD,CAApB;AACAM,MAAAA,cAAc,GAAGL,SAAjB;AACA;;AACD,SAAKM,6CAAgCV,KAArC;AACCQ,MAAAA,OAAO,GAAGpB,UAAU,CAACe,IAAD,CAApB;AACAM,MAAAA,cAAc,GAAGL,SAAjB;AACA;;AACD,SAAKM,6CAAgCC,QAArC;AACCH,MAAAA,OAAO,GAAGpB,UAAU,CAACe,IAAD,CAApB;AACAM,MAAAA,cAAc,GAAGL,SAAjB;AACA;;AACD;AACCE,MAAAA,OAAO,CAACC,IAAR,uCACgCJ,IADhC;AAGA,aAAO,gCAAC,eAAD,OAAP;AAjCF;;AAoCA,SAAO,gCAAC,OAAD,gCAAaM,cAAb;AAA6B,IAAA,QAAQ,EAAEJ;AAAvC,KAAP;AACA,CArDD;;eAuDeH,gB","sourcesContent":["import React, { Fragment } from 'react'\nimport Button, { IButtonProps } from '../../../Button/Button'\nimport { CardBuilder, ICardBuilderProps } from '../../../Card'\nimport List, { IListProps } from '../../../List/List'\nimport MarkdownText, {\n\tIMarkdownProps\n} from '../../../MarkdownText/MarkdownText'\nimport SplitButton, {\n\tISplitButtonProps\n} from '../../../SplitButton/SplitButton'\nimport Text, { ITextProps } from '../../../Text/Text'\n// TODO: fix toast types to be able to be used here\nimport Toast, { IToastProps } from '../../../Toast/Toast'\nimport {\n\tIHWCalendarEventDetailsItem,\n\tIHWAction,\n\tIHWCalendarEventDetailsItemViewModel,\n\tIHWMarkdown,\n\tIHWCalendarEventDetailsItemType\n} from '@sprucelabs/spruce-types'\n\nconst MDTextContainer = (\n\tprops: IMarkdownProps | IHWMarkdown\n): React.ReactElement => (\n\t<div className=\"event-details__markdown\">\n\t\t<MarkdownText {...props} />\n\t</div>\n)\n\nconst components = {\n\tlist: List,\n\tbutton: Button,\n\tcardBuilder: CardBuilder,\n\tsplitButton: SplitButton,\n\ttext: Text,\n\ttoast: Toast,\n\tmarkdown: MDTextContainer\n}\n\ntype ViewModel =\n\t| IListProps\n\t| IButtonProps\n\t| ICardBuilderProps\n\t| ITextProps\n\t| IToastProps\n\t| IMarkdownProps\n\t| ISplitButtonProps\n\nexport interface IEventDetailsItemProps\n\textends Omit<IHWCalendarEventDetailsItem, 'viewModel'> {\n\tviewModel: ViewModel | IHWCalendarEventDetailsItemViewModel\n\n\t/** optional, provide a handler for Actions */\n\tonAction?: (action: IHWAction) => any\n}\n\nconst EventDetailsItem = (\n\tprops: IEventDetailsItemProps\n): React.ReactElement => {\n\tconst { type, viewModel, onAction } = props\n\n\tif (!type || !components[type]) {\n\t\t// TODO: Use logger library for warning\n\t\tconsole.warn(\n\t\t\t`No component found for key: ${type}. Please double-check properties passed into <EventDetailsItem> from <EventDetails>.`\n\t\t)\n\t\treturn <Fragment />\n\t}\n\n\tlet Handler\n\tlet viewModelProps: ViewModel | undefined\n\n\tswitch (type) {\n\t\tcase IHWCalendarEventDetailsItemType.List:\n\t\t\tHandler = components[type]\n\t\t\tviewModelProps = viewModel as IListProps\n\t\t\tbreak\n\t\tcase IHWCalendarEventDetailsItemType.Button:\n\t\t\tHandler = components[type]\n\t\t\tviewModelProps = viewModel as IButtonProps\n\t\t\tbreak\n\t\tcase IHWCalendarEventDetailsItemType.CardBuilder:\n\t\t\tHandler = components[type]\n\t\t\tviewModelProps = viewModel as ICardBuilderProps\n\t\t\tbreak\n\t\tcase IHWCalendarEventDetailsItemType.SplitButton:\n\t\t\tHandler = components[type]\n\t\t\tviewModelProps = viewModel as ISplitButtonProps\n\t\t\tbreak\n\t\tcase IHWCalendarEventDetailsItemType.Text:\n\t\t\tHandler = components[type]\n\t\t\tviewModelProps = viewModel as ITextProps\n\t\t\tbreak\n\t\tcase IHWCalendarEventDetailsItemType.Toast:\n\t\t\tHandler = components[type]\n\t\t\tviewModelProps = viewModel as IToastProps\n\t\t\tbreak\n\t\tcase IHWCalendarEventDetailsItemType.Markdown:\n\t\t\tHandler = components[type]\n\t\t\tviewModelProps = viewModel as IMarkdownProps\n\t\t\tbreak\n\t\tdefault:\n\t\t\tconsole.warn(\n\t\t\t\t`No component found for key: ${type}. Please double-check properties passed into <EventDetailsItem> from <EventDetails>.`\n\t\t\t)\n\t\t\treturn <Fragment />\n\t}\n\n\treturn <Handler {...viewModelProps} onAction={onAction} />\n}\n\nexport default EventDetailsItem\n"],"file":"EventDetailsItem.js"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IEventDetailsItemProps } from './components/EventDetailsItem/EventDetailsItem';
|
|
2
|
+
import { IEventDetailsProps } from './EventDetails';
|
|
3
|
+
export declare const appointment: {
|
|
4
|
+
items: IEventDetailsItemProps[];
|
|
5
|
+
};
|
|
6
|
+
export declare const warningAppointment: IEventDetailsProps;
|
|
7
|
+
export declare const pastAppointment: IEventDetailsProps;
|
|
8
|
+
export declare const lunchBreak: IEventDetailsProps;
|
|
9
|
+
export declare const ptoBlock: IEventDetailsProps;
|
|
10
|
+
//# sourceMappingURL=eventDetailsMock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventDetailsMock.d.ts","sourceRoot":"","sources":["../../../src/components/EventDetails/eventDetailsMock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAA;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAmNnD,eAAO,MAAM,WAAW,EAAE;IAAE,KAAK,EAAE,sBAAsB,EAAE,CAAA;CAiL1D,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,kBA2OhC,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,kBAsI7B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,kBA6DxB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,kBA6DtB,CAAA"}
|