@stack-spot/portal-components 0.0.18 → 1.0.0-dev.1770393008395
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/CHANGELOG.md +670 -0
- package/dist/components/AnimatedHeight.d.ts +58 -0
- package/dist/components/AnimatedHeight.d.ts.map +1 -0
- package/dist/components/AnimatedHeight.js +105 -0
- package/dist/components/AnimatedHeight.js.map +1 -0
- package/dist/components/AsyncContent.d.ts +46 -0
- package/dist/components/AsyncContent.d.ts.map +1 -0
- package/dist/components/AsyncContent.js +34 -0
- package/dist/components/AsyncContent.js.map +1 -0
- package/dist/components/BannerWarning.d.ts +11 -2
- package/dist/components/BannerWarning.d.ts.map +1 -1
- package/dist/components/BannerWarning.js +45 -3
- package/dist/components/BannerWarning.js.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts +7 -9
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.js +7 -6
- package/dist/components/Breadcrumb/index.js.map +1 -1
- package/dist/components/Breadcrumb/styled.d.ts +1 -2
- package/dist/components/Breadcrumb/styled.d.ts.map +1 -1
- package/dist/components/Breadcrumb/styled.js +1 -0
- package/dist/components/Breadcrumb/styled.js.map +1 -1
- package/dist/components/ButtonLoading.d.ts +11 -0
- package/dist/components/ButtonLoading.d.ts.map +1 -0
- package/dist/components/ButtonLoading.js +5 -0
- package/dist/components/ButtonLoading.js.map +1 -0
- package/dist/components/ChatBot.d.ts +5 -0
- package/dist/components/ChatBot.d.ts.map +1 -1
- package/dist/components/ChatBot.js +11 -6
- package/dist/components/ChatBot.js.map +1 -1
- package/dist/components/ContentValidateFilter.d.ts +6 -0
- package/dist/components/ContentValidateFilter.d.ts.map +1 -0
- package/dist/components/ContentValidateFilter.js +8 -0
- package/dist/components/ContentValidateFilter.js.map +1 -0
- package/dist/components/FadingOverflow.d.ts +37 -0
- package/dist/components/FadingOverflow.d.ts.map +1 -0
- package/dist/components/FadingOverflow.js +228 -0
- package/dist/components/FadingOverflow.js.map +1 -0
- package/dist/components/FileTreeView/More.d.ts +23 -0
- package/dist/components/FileTreeView/More.d.ts.map +1 -0
- package/dist/components/FileTreeView/More.js +55 -0
- package/dist/components/FileTreeView/More.js.map +1 -0
- package/dist/components/FileTreeView/index.d.ts +32 -0
- package/dist/components/FileTreeView/index.d.ts.map +1 -0
- package/dist/components/FileTreeView/index.js +91 -0
- package/dist/components/FileTreeView/index.js.map +1 -0
- package/dist/components/InfiniteScroll.d.ts +11 -0
- package/dist/components/InfiniteScroll.d.ts.map +1 -0
- package/dist/components/InfiniteScroll.js +14 -0
- package/dist/components/InfiniteScroll.js.map +1 -0
- package/dist/components/InfoMaintenanceBanner.d.ts +8 -0
- package/dist/components/InfoMaintenanceBanner.d.ts.map +1 -0
- package/dist/components/InfoMaintenanceBanner.js +19 -0
- package/dist/components/InfoMaintenanceBanner.js.map +1 -0
- package/dist/components/LazyMarkdown/BlockquoteMd.d.ts +11 -0
- package/dist/components/LazyMarkdown/BlockquoteMd.d.ts.map +1 -0
- package/dist/components/LazyMarkdown/BlockquoteMd.js +77 -0
- package/dist/components/LazyMarkdown/BlockquoteMd.js.map +1 -0
- package/dist/components/LazyMarkdown/CodeViewer.d.ts +24 -0
- package/dist/components/LazyMarkdown/CodeViewer.d.ts.map +1 -0
- package/dist/components/LazyMarkdown/CodeViewer.js +122 -0
- package/dist/components/LazyMarkdown/CodeViewer.js.map +1 -0
- package/dist/components/LazyMarkdown/Markdown.d.ts +19 -0
- package/dist/components/LazyMarkdown/Markdown.d.ts.map +1 -0
- package/dist/components/LazyMarkdown/Markdown.js +96 -0
- package/dist/components/LazyMarkdown/Markdown.js.map +1 -0
- package/dist/components/LazyMarkdown/MarkdownButton.d.ts +19 -0
- package/dist/components/LazyMarkdown/MarkdownButton.d.ts.map +1 -0
- package/dist/components/LazyMarkdown/MarkdownButton.js +9 -0
- package/dist/components/LazyMarkdown/MarkdownButton.js.map +1 -0
- package/dist/components/LazyMarkdown/Video.d.ts +11 -0
- package/dist/components/LazyMarkdown/Video.d.ts.map +1 -0
- package/dist/components/LazyMarkdown/Video.js +10 -0
- package/dist/components/LazyMarkdown/Video.js.map +1 -0
- package/dist/components/LazyMarkdown/index.d.ts +10 -0
- package/dist/components/LazyMarkdown/index.d.ts.map +1 -0
- package/dist/components/LazyMarkdown/index.js +8 -0
- package/dist/components/LazyMarkdown/index.js.map +1 -0
- package/dist/components/Placeholder.d.ts +28 -0
- package/dist/components/Placeholder.d.ts.map +1 -0
- package/dist/components/Placeholder.js +32 -0
- package/dist/components/Placeholder.js.map +1 -0
- package/dist/components/ScrollView.d.ts +31 -0
- package/dist/components/ScrollView.d.ts.map +1 -0
- package/dist/components/ScrollView.js +30 -0
- package/dist/components/ScrollView.js.map +1 -0
- package/dist/components/Select/BadgeItem.d.ts +4 -0
- package/dist/components/Select/BadgeItem.d.ts.map +1 -0
- package/dist/components/Select/BadgeItem.js +28 -0
- package/dist/components/Select/BadgeItem.js.map +1 -0
- package/dist/components/Select/ClearInput.d.ts +3 -0
- package/dist/components/Select/ClearInput.d.ts.map +1 -0
- package/dist/components/Select/ClearInput.js +18 -0
- package/dist/components/Select/ClearInput.js.map +1 -0
- package/dist/components/Select/CloseItem.d.ts +3 -0
- package/dist/components/Select/CloseItem.d.ts.map +1 -0
- package/dist/components/Select/CloseItem.js +26 -0
- package/dist/components/Select/CloseItem.js.map +1 -0
- package/dist/components/Select/CreatableSelect.d.ts +16 -0
- package/dist/components/Select/CreatableSelect.d.ts.map +1 -0
- package/dist/components/Select/CreatableSelect.js +114 -0
- package/dist/components/Select/CreatableSelect.js.map +1 -0
- package/dist/components/Select/CustomMenu.d.ts +8 -0
- package/dist/components/Select/CustomMenu.d.ts.map +1 -0
- package/dist/components/Select/CustomMenu.js +4 -0
- package/dist/components/Select/CustomMenu.js.map +1 -0
- package/dist/components/Select/LabelItem.d.ts +3 -0
- package/dist/components/Select/LabelItem.d.ts.map +1 -0
- package/dist/components/Select/LabelItem.js +4 -0
- package/dist/components/Select/LabelItem.js.map +1 -0
- package/dist/components/Select/MultiValue.d.ts +3 -0
- package/dist/components/Select/MultiValue.d.ts.map +1 -0
- package/dist/components/Select/MultiValue.js +27 -0
- package/dist/components/Select/MultiValue.js.map +1 -0
- package/dist/components/Select/SelectInfiniteScroll.d.ts +14 -0
- package/dist/components/Select/SelectInfiniteScroll.d.ts.map +1 -0
- package/dist/components/Select/SelectInfiniteScroll.js +31 -0
- package/dist/components/Select/SelectInfiniteScroll.js.map +1 -0
- package/dist/components/Select/SelectSearch.d.ts +11 -0
- package/dist/components/Select/SelectSearch.d.ts.map +1 -0
- package/dist/components/Select/SelectSearch.js +156 -0
- package/dist/components/Select/SelectSearch.js.map +1 -0
- package/dist/components/Select/index.d.ts +6 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Select/index.js +6 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/Select/types.d.ts +7 -0
- package/dist/components/Select/types.d.ts.map +1 -0
- package/dist/components/Select/types.js +2 -0
- package/dist/components/Select/types.js.map +1 -0
- package/dist/components/SelectionList.d.ts +151 -0
- package/dist/components/SelectionList.d.ts.map +1 -0
- package/dist/components/SelectionList.js +180 -0
- package/dist/components/SelectionList.js.map +1 -0
- package/dist/components/StatusCircle.d.ts +24 -0
- package/dist/components/StatusCircle.d.ts.map +1 -0
- package/dist/components/StatusCircle.js +44 -0
- package/dist/components/StatusCircle.js.map +1 -0
- package/dist/components/Stepper/Navigation.d.ts +35 -0
- package/dist/components/Stepper/Navigation.d.ts.map +1 -0
- package/dist/components/Stepper/Navigation.js +41 -0
- package/dist/components/Stepper/Navigation.js.map +1 -0
- package/dist/components/Stepper/Step.d.ts +18 -0
- package/dist/components/Stepper/Step.d.ts.map +1 -0
- package/dist/components/Stepper/Step.js +13 -0
- package/dist/components/Stepper/Step.js.map +1 -0
- package/dist/components/Stepper/Stepper.d.ts +45 -0
- package/dist/components/Stepper/Stepper.d.ts.map +1 -0
- package/dist/components/Stepper/Stepper.js +57 -0
- package/dist/components/Stepper/Stepper.js.map +1 -0
- package/dist/components/Stepper/headers.d.ts +19 -0
- package/dist/components/Stepper/headers.d.ts.map +1 -0
- package/dist/components/Stepper/headers.js +40 -0
- package/dist/components/Stepper/headers.js.map +1 -0
- package/dist/components/Stepper/index.d.ts +4 -0
- package/dist/components/Stepper/index.d.ts.map +1 -0
- package/dist/components/Stepper/index.js +4 -0
- package/dist/components/Stepper/index.js.map +1 -0
- package/dist/components/Table/HeaderItem.d.ts +18 -0
- package/dist/components/Table/HeaderItem.d.ts.map +1 -0
- package/dist/components/Table/HeaderItem.js +14 -0
- package/dist/components/Table/HeaderItem.js.map +1 -0
- package/dist/components/Table/SettingsVerticalMenu.d.ts +14 -0
- package/dist/components/Table/SettingsVerticalMenu.d.ts.map +1 -0
- package/dist/components/Table/SettingsVerticalMenu.js +14 -0
- package/dist/components/Table/SettingsVerticalMenu.js.map +1 -0
- package/dist/components/Table/StyledLinkTable.d.ts +5 -0
- package/dist/components/Table/StyledLinkTable.d.ts.map +1 -0
- package/dist/components/Table/StyledLinkTable.js +13 -0
- package/dist/components/Table/StyledLinkTable.js.map +1 -0
- package/dist/components/Table/TableData.d.ts +37 -0
- package/dist/components/Table/TableData.d.ts.map +1 -0
- package/dist/components/Table/TableData.js +84 -0
- package/dist/components/Table/TableData.js.map +1 -0
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/Table/index.js +3 -0
- package/dist/components/Table/index.js.map +1 -0
- package/dist/components/TimelineSection.d.ts +24 -0
- package/dist/components/TimelineSection.d.ts.map +1 -0
- package/dist/components/TimelineSection.js +37 -0
- package/dist/components/TimelineSection.js.map +1 -0
- package/dist/components/error/ErrorFeedback.d.ts +58 -0
- package/dist/components/error/ErrorFeedback.d.ts.map +1 -0
- package/dist/components/error/ErrorFeedback.js +110 -0
- package/dist/components/error/ErrorFeedback.js.map +1 -0
- package/dist/components/error/NotFound.d.ts +4 -0
- package/dist/components/error/NotFound.d.ts.map +1 -0
- package/dist/components/error/NotFound.js +19 -0
- package/dist/components/error/NotFound.js.map +1 -0
- package/dist/components/error/UnderMaintenance.d.ts +4 -0
- package/dist/components/error/UnderMaintenance.d.ts.map +1 -0
- package/dist/components/error/UnderMaintenance.js +25 -0
- package/dist/components/error/UnderMaintenance.js.map +1 -0
- package/dist/components/error/index.d.ts +4 -0
- package/dist/components/error/index.d.ts.map +1 -0
- package/dist/components/error/index.js +4 -0
- package/dist/components/error/index.js.map +1 -0
- package/dist/components/form/Form/Form.d.ts +15 -0
- package/dist/components/form/Form/Form.d.ts.map +1 -0
- package/dist/components/form/Form/Form.js +48 -0
- package/dist/components/form/Form/Form.js.map +1 -0
- package/dist/components/form/Form/FormGroup.d.ts +37 -0
- package/dist/components/form/Form/FormGroup.d.ts.map +1 -0
- package/dist/components/form/Form/FormGroup.js +72 -0
- package/dist/components/form/Form/FormGroup.js.map +1 -0
- package/dist/components/form/Form/index.d.ts +3 -0
- package/dist/components/form/Form/index.d.ts.map +1 -0
- package/dist/components/form/Form/index.js +3 -0
- package/dist/components/form/Form/index.js.map +1 -0
- package/dist/components/form/SearchInput.d.ts +9 -0
- package/dist/components/form/SearchInput.d.ts.map +1 -0
- package/dist/components/form/SearchInput.js +27 -0
- package/dist/components/form/SearchInput.js.map +1 -0
- package/dist/components/form/Select/CustomSelect.d.ts +81 -0
- package/dist/components/form/Select/CustomSelect.d.ts.map +1 -0
- package/dist/components/form/Select/CustomSelect.js +178 -0
- package/dist/components/form/Select/CustomSelect.js.map +1 -0
- package/dist/components/form/Select/DetailedSelect.d.ts +65 -0
- package/dist/components/form/Select/DetailedSelect.d.ts.map +1 -0
- package/dist/components/form/Select/DetailedSelect.js +80 -0
- package/dist/components/form/Select/DetailedSelect.js.map +1 -0
- package/dist/components/form/Select/Select.d.ts +47 -0
- package/dist/components/form/Select/Select.d.ts.map +1 -0
- package/dist/components/form/Select/Select.js +62 -0
- package/dist/components/form/Select/Select.js.map +1 -0
- package/dist/components/form/Select/index.d.ts +5 -0
- package/dist/components/form/Select/index.d.ts.map +1 -0
- package/dist/components/form/Select/index.js +5 -0
- package/dist/components/form/Select/index.js.map +1 -0
- package/dist/components/form/Select/styled.d.ts +5 -0
- package/dist/components/form/Select/styled.d.ts.map +1 -0
- package/dist/components/form/Select/styled.js +165 -0
- package/dist/components/form/Select/styled.js.map +1 -0
- package/dist/components/form/Select/types.d.ts +103 -0
- package/dist/components/form/Select/types.d.ts.map +1 -0
- package/dist/components/form/Select/types.js +2 -0
- package/dist/components/form/Select/types.js.map +1 -0
- package/dist/components/form/Select/utils.d.ts +3 -0
- package/dist/components/form/Select/utils.d.ts.map +1 -0
- package/dist/components/form/Select/utils.js +20 -0
- package/dist/components/form/Select/utils.js.map +1 -0
- package/dist/components/notification/NotificationComponent.d.ts +31 -0
- package/dist/components/notification/NotificationComponent.d.ts.map +1 -0
- package/dist/components/notification/NotificationComponent.js +176 -0
- package/dist/components/notification/NotificationComponent.js.map +1 -0
- package/dist/components/notification/NotificationItem.d.ts +51 -0
- package/dist/components/notification/NotificationItem.d.ts.map +1 -0
- package/dist/components/notification/NotificationItem.js +165 -0
- package/dist/components/notification/NotificationItem.js.map +1 -0
- package/dist/components/notification/NotificationList.d.ts +47 -0
- package/dist/components/notification/NotificationList.d.ts.map +1 -0
- package/dist/components/notification/NotificationList.js +102 -0
- package/dist/components/notification/NotificationList.js.map +1 -0
- package/dist/components/notification/types.d.ts +60 -0
- package/dist/components/notification/types.d.ts.map +1 -0
- package/dist/components/notification/types.js +7 -0
- package/dist/components/notification/types.js.map +1 -0
- package/dist/containers/NotificationsPage.d.ts +2 -0
- package/dist/containers/NotificationsPage.d.ts.map +1 -0
- package/dist/containers/NotificationsPage.js +72 -0
- package/dist/containers/NotificationsPage.js.map +1 -0
- package/dist/context/anchor.d.ts +27 -0
- package/dist/context/anchor.d.ts.map +1 -0
- package/dist/context/anchor.js +23 -0
- package/dist/context/anchor.js.map +1 -0
- package/dist/context/loading.d.ts +27 -0
- package/dist/context/loading.d.ts.map +1 -0
- package/dist/context/loading.js +24 -0
- package/dist/context/loading.js.map +1 -0
- package/dist/context/notification/LazyNotificationList.d.ts +28 -0
- package/dist/context/notification/LazyNotificationList.d.ts.map +1 -0
- package/dist/context/notification/LazyNotificationList.js +136 -0
- package/dist/context/notification/LazyNotificationList.js.map +1 -0
- package/dist/context/notification/NotificationController.d.ts +25 -0
- package/dist/context/notification/NotificationController.d.ts.map +1 -0
- package/dist/context/notification/NotificationController.js +153 -0
- package/dist/context/notification/NotificationController.js.map +1 -0
- package/dist/context/notification/context.d.ts +8 -0
- package/dist/context/notification/context.d.ts.map +1 -0
- package/dist/context/notification/context.js +12 -0
- package/dist/context/notification/context.js.map +1 -0
- package/dist/context/notification/hooks.d.ts +18 -0
- package/dist/context/notification/hooks.d.ts.map +1 -0
- package/dist/context/notification/hooks.js +104 -0
- package/dist/context/notification/hooks.js.map +1 -0
- package/dist/context/notification/types.d.ts +65 -0
- package/dist/context/notification/types.d.ts.map +1 -0
- package/dist/context/notification/types.js +2 -0
- package/dist/context/notification/types.js.map +1 -0
- package/dist/hooks/date.d.ts +18 -0
- package/dist/hooks/date.d.ts.map +1 -0
- package/dist/hooks/date.js +68 -0
- package/dist/hooks/date.js.map +1 -0
- package/dist/hooks/keyboard.d.ts +64 -0
- package/dist/hooks/keyboard.d.ts.map +1 -0
- package/dist/hooks/keyboard.js +84 -0
- package/dist/hooks/keyboard.js.map +1 -0
- package/dist/hooks/manual-render.d.ts +8 -0
- package/dist/hooks/manual-render.d.ts.map +1 -0
- package/dist/hooks/manual-render.js +10 -0
- package/dist/hooks/manual-render.js.map +1 -0
- package/dist/hooks/service-now.d.ts +32 -1
- package/dist/hooks/service-now.d.ts.map +1 -1
- package/dist/hooks/service-now.js +58 -18
- package/dist/hooks/service-now.js.map +1 -1
- package/dist/hooks/text.d.ts +9 -0
- package/dist/hooks/text.d.ts.map +1 -0
- package/dist/hooks/text.js +24 -0
- package/dist/hooks/text.js.map +1 -0
- package/dist/hooks/title.d.ts +13 -0
- package/dist/hooks/title.d.ts.map +1 -1
- package/dist/hooks/title.js +13 -0
- package/dist/hooks/title.js.map +1 -1
- package/dist/hooks/use-effect-once.d.ts.map +1 -1
- package/dist/hooks/use-effect-once.js.map +1 -1
- package/dist/index.d.ts +14 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/notifications.d.ts +11 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +10 -0
- package/dist/notifications.js.map +1 -0
- package/dist/svg/AI.d.ts +8 -0
- package/dist/svg/AI.d.ts.map +1 -0
- package/dist/svg/AI.js +15 -0
- package/dist/svg/AI.js.map +1 -0
- package/dist/svg/CS.d.ts +8 -0
- package/dist/svg/CS.d.ts.map +1 -0
- package/dist/svg/CS.js +15 -0
- package/dist/svg/CS.js.map +1 -0
- package/dist/svg/EDP.d.ts +8 -0
- package/dist/svg/EDP.d.ts.map +1 -0
- package/dist/svg/EDP.js +15 -0
- package/dist/svg/EDP.js.map +1 -0
- package/dist/svg/Forbidden.d.ts +5 -0
- package/dist/svg/Forbidden.d.ts.map +1 -0
- package/dist/svg/Forbidden.js +4 -0
- package/dist/svg/Forbidden.js.map +1 -0
- package/dist/svg/GenericPlaceholder.d.ts +7 -0
- package/dist/svg/GenericPlaceholder.d.ts.map +1 -0
- package/dist/svg/GenericPlaceholder.js +4 -0
- package/dist/svg/GenericPlaceholder.js.map +1 -0
- package/dist/svg/GenericPlaceholderCentered.d.ts +7 -0
- package/dist/svg/GenericPlaceholderCentered.d.ts.map +1 -0
- package/dist/svg/GenericPlaceholderCentered.js +4 -0
- package/dist/svg/GenericPlaceholderCentered.js.map +1 -0
- package/dist/svg/HUB.d.ts +8 -0
- package/dist/svg/HUB.d.ts.map +1 -0
- package/dist/svg/HUB.js +15 -0
- package/dist/svg/HUB.js.map +1 -0
- package/dist/svg/Logo.d.ts +5 -0
- package/dist/svg/Logo.d.ts.map +1 -0
- package/dist/svg/Logo.js +8 -0
- package/dist/svg/Logo.js.map +1 -0
- package/dist/svg/MiniLogo.d.ts +8 -0
- package/dist/svg/MiniLogo.d.ts.map +1 -0
- package/dist/svg/MiniLogo.js +6 -0
- package/dist/svg/MiniLogo.js.map +1 -0
- package/dist/svg/NotFound.d.ts +5 -0
- package/dist/svg/NotFound.d.ts.map +1 -0
- package/dist/svg/NotFound.js +4 -0
- package/dist/svg/NotFound.js.map +1 -0
- package/dist/svg/ServerError.d.ts +5 -0
- package/dist/svg/ServerError.d.ts.map +1 -0
- package/dist/svg/ServerError.js +4 -0
- package/dist/svg/ServerError.js.map +1 -0
- package/dist/svg/Unauthenticated.d.ts +5 -0
- package/dist/svg/Unauthenticated.d.ts.map +1 -0
- package/dist/svg/Unauthenticated.js +4 -0
- package/dist/svg/Unauthenticated.js.map +1 -0
- package/dist/svg/index.d.ts +13 -0
- package/dist/svg/index.d.ts.map +1 -0
- package/dist/svg/index.js +14 -0
- package/dist/svg/index.js.map +1 -0
- package/dist/utils/accessibility.d.ts +75 -0
- package/dist/utils/accessibility.d.ts.map +1 -0
- package/dist/utils/accessibility.js +123 -0
- package/dist/utils/accessibility.js.map +1 -0
- package/dist/utils/cookie.d.ts +34 -0
- package/dist/utils/cookie.d.ts.map +1 -0
- package/dist/utils/cookie.js +69 -0
- package/dist/utils/cookie.js.map +1 -0
- package/dist/utils/promise.d.ts +2 -0
- package/dist/utils/promise.d.ts.map +1 -0
- package/dist/utils/promise.js +6 -0
- package/dist/utils/promise.js.map +1 -0
- package/dist/utils/read-file.d.ts +2 -0
- package/dist/utils/read-file.d.ts.map +1 -0
- package/dist/utils/read-file.js +14 -0
- package/dist/utils/read-file.js.map +1 -0
- package/package.dev.json +3 -0
- package/package.json +54 -14
- package/package.stg.json +3 -0
- package/readme.md +55 -13
- package/src/components/AnimatedHeight.tsx +174 -0
- package/src/components/AsyncContent.tsx +78 -0
- package/src/components/BannerWarning.tsx +89 -19
- package/src/components/Breadcrumb/index.tsx +15 -13
- package/src/components/Breadcrumb/styled.ts +2 -1
- package/src/components/ButtonLoading.tsx +29 -0
- package/src/components/ChatBot.tsx +12 -7
- package/src/components/ContentValidateFilter.tsx +15 -0
- package/src/components/FadingOverflow.tsx +265 -0
- package/src/components/FileTreeView/More.tsx +114 -0
- package/src/components/FileTreeView/index.tsx +186 -0
- package/src/components/InfiniteScroll.tsx +24 -0
- package/src/components/InfoMaintenanceBanner.tsx +25 -0
- package/src/components/LazyMarkdown/BlockquoteMd.tsx +107 -0
- package/src/components/LazyMarkdown/CodeViewer.tsx +161 -0
- package/src/components/LazyMarkdown/Markdown.tsx +122 -0
- package/src/components/LazyMarkdown/MarkdownButton.tsx +24 -0
- package/src/components/LazyMarkdown/Video.tsx +13 -0
- package/src/components/LazyMarkdown/index.tsx +21 -0
- package/src/components/Placeholder.tsx +123 -0
- package/src/components/ScrollView.tsx +57 -0
- package/src/components/Select/BadgeItem.tsx +58 -0
- package/src/components/Select/ClearInput.tsx +24 -0
- package/src/components/Select/CloseItem.tsx +38 -0
- package/src/components/Select/CreatableSelect.tsx +155 -0
- package/src/components/Select/CustomMenu.tsx +16 -0
- package/src/components/Select/LabelItem.tsx +8 -0
- package/src/components/Select/MultiValue.tsx +49 -0
- package/src/components/Select/SelectInfiniteScroll.tsx +82 -0
- package/src/components/Select/SelectSearch.tsx +195 -0
- package/src/components/Select/index.tsx +7 -0
- package/src/components/Select/types.ts +8 -0
- package/src/components/SelectionList.tsx +427 -0
- package/src/components/StatusCircle.tsx +67 -0
- package/src/components/Stepper/Navigation.tsx +97 -0
- package/src/components/Stepper/Step.tsx +30 -0
- package/src/components/Stepper/Stepper.tsx +113 -0
- package/src/components/Stepper/headers.tsx +64 -0
- package/src/components/Stepper/index.ts +3 -0
- package/src/components/Table/HeaderItem.tsx +52 -0
- package/src/components/Table/SettingsVerticalMenu.tsx +50 -0
- package/src/components/Table/StyledLinkTable.tsx +22 -0
- package/src/components/Table/TableData.tsx +251 -0
- package/src/components/Table/index.tsx +2 -0
- package/src/components/TimelineSection.tsx +66 -0
- package/src/components/error/ErrorFeedback.tsx +217 -0
- package/src/components/error/NotFound.tsx +24 -0
- package/src/components/error/UnderMaintenance.tsx +30 -0
- package/src/components/error/index.ts +4 -0
- package/src/components/form/Form/Form.tsx +101 -0
- package/src/components/form/Form/FormGroup.tsx +221 -0
- package/src/components/form/Form/index.ts +2 -0
- package/src/components/form/SearchInput.tsx +72 -0
- package/src/components/form/Select/CustomSelect.tsx +232 -0
- package/src/components/form/Select/DetailedSelect.tsx +85 -0
- package/src/components/form/Select/Select.tsx +67 -0
- package/src/components/form/Select/index.ts +4 -0
- package/src/components/form/Select/styled.ts +165 -0
- package/src/components/form/Select/types.ts +112 -0
- package/src/components/form/Select/utils.tsx +28 -0
- package/src/components/notification/NotificationComponent.tsx +340 -0
- package/src/components/notification/NotificationItem.tsx +353 -0
- package/src/components/notification/NotificationList.tsx +207 -0
- package/src/components/notification/types.ts +72 -0
- package/src/containers/NotificationsPage.tsx +121 -0
- package/src/context/anchor.tsx +37 -0
- package/src/context/loading.tsx +36 -0
- package/src/context/notification/LazyNotificationList.ts +103 -0
- package/src/context/notification/NotificationController.ts +119 -0
- package/src/context/notification/context.tsx +23 -0
- package/src/context/notification/hooks.ts +115 -0
- package/src/context/notification/types.ts +71 -0
- package/src/hooks/date.ts +68 -0
- package/src/hooks/keyboard.tsx +128 -0
- package/src/hooks/manual-render.tsx +10 -0
- package/src/hooks/service-now.tsx +64 -19
- package/src/hooks/text.tsx +30 -0
- package/src/hooks/title.tsx +13 -0
- package/src/index.ts +14 -6
- package/src/notifications.ts +11 -0
- package/src/svg/AI.tsx +41 -0
- package/src/svg/CS.tsx +48 -0
- package/src/svg/EDP.tsx +31 -0
- package/src/svg/Forbidden.tsx +22 -0
- package/src/svg/GenericPlaceholder.tsx +16 -0
- package/src/svg/GenericPlaceholderCentered.tsx +16 -0
- package/src/svg/HUB.tsx +48 -0
- package/src/svg/Logo.tsx +16 -0
- package/src/svg/MiniLogo.tsx +12 -0
- package/src/svg/NotFound.tsx +16 -0
- package/src/svg/ServerError.tsx +33 -0
- package/src/svg/Unauthenticated.tsx +16 -0
- package/src/svg/index.ts +14 -0
- package/src/utils/accessibility.ts +135 -0
- package/src/utils/cookie.ts +73 -0
- package/src/utils/promise.ts +5 -0
- package/src/utils/read-file.ts +16 -0
- package/tsconfig.json +1 -0
- package/dist/components/Login.d.ts +0 -26
- package/dist/components/Login.d.ts.map +0 -1
- package/dist/components/Login.js +0 -100
- package/dist/components/Login.js.map +0 -1
- package/dist/components/MiniLogo.d.ts +0 -6
- package/dist/components/MiniLogo.d.ts.map +0 -1
- package/dist/components/MiniLogo.js +0 -4
- package/dist/components/MiniLogo.js.map +0 -1
- package/dist/components/tour/StepContainer.d.ts +0 -13
- package/dist/components/tour/StepContainer.d.ts.map +0 -1
- package/dist/components/tour/StepContainer.js +0 -48
- package/dist/components/tour/StepContainer.js.map +0 -1
- package/dist/components/tour/StepNavigation.d.ts +0 -13
- package/dist/components/tour/StepNavigation.d.ts.map +0 -1
- package/dist/components/tour/StepNavigation.js +0 -20
- package/dist/components/tour/StepNavigation.js.map +0 -1
- package/dist/components/tour/StepTitle.d.ts +0 -7
- package/dist/components/tour/StepTitle.d.ts.map +0 -1
- package/dist/components/tour/StepTitle.js +0 -5
- package/dist/components/tour/StepTitle.js.map +0 -1
- package/dist/components/tour/context.d.ts +0 -17
- package/dist/components/tour/context.d.ts.map +0 -1
- package/dist/components/tour/context.js +0 -48
- package/dist/components/tour/context.js.map +0 -1
- package/dist/components/tour/index.d.ts +0 -9
- package/dist/components/tour/index.d.ts.map +0 -1
- package/dist/components/tour/index.js +0 -4
- package/dist/components/tour/index.js.map +0 -1
- package/dist/components/tour/utils.d.ts +0 -13
- package/dist/components/tour/utils.d.ts.map +0 -1
- package/dist/components/tour/utils.js +0 -43
- package/dist/components/tour/utils.js.map +0 -1
- package/src/components/Login.tsx +0 -157
- package/src/components/MiniLogo.tsx +0 -32
- package/src/components/tour/StepContainer.tsx +0 -67
- package/src/components/tour/StepNavigation.tsx +0 -32
- package/src/components/tour/StepTitle.tsx +0 -17
- package/src/components/tour/context.tsx +0 -56
- package/src/components/tour/index.ts +0 -7
- package/src/components/tour/utils.tsx +0 -65
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { GetTenantNotificationsResponse, InfiniteScrollConfig } from './types.js';
|
|
2
|
+
export interface NotificationListProps {
|
|
3
|
+
/**
|
|
4
|
+
* Function to call when the message is marked as read (committed).
|
|
5
|
+
* @param id the id of the notification where the read status changed.
|
|
6
|
+
*/
|
|
7
|
+
onCommit: (id: string) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Function to call when the message is marked as unread (uncommitted).
|
|
10
|
+
* @param id the id of the notification where the read status changed.
|
|
11
|
+
*/
|
|
12
|
+
onUncommit: (id: string) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Optional. Function called when the button to perform the notification action is clicked. This function will be run in addition to
|
|
15
|
+
* the notification action.
|
|
16
|
+
* @param id the id of the notification where the button was clicked
|
|
17
|
+
*/
|
|
18
|
+
onClickAction?: (id: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Optional. Function called when the button read more in notification is clicked.
|
|
21
|
+
*/
|
|
22
|
+
onClickViewNotification?: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* If you need this notification list to be have an infinite scroll behavior, set this option.
|
|
25
|
+
*/
|
|
26
|
+
infiniteScroll?: InfiniteScrollConfig;
|
|
27
|
+
/**
|
|
28
|
+
* The notifications themselves.
|
|
29
|
+
*/
|
|
30
|
+
items: GetTenantNotificationsResponse[];
|
|
31
|
+
/**
|
|
32
|
+
* A compact notification list don't show date headers (as a timeline) or descriptions of notifications.
|
|
33
|
+
*/
|
|
34
|
+
compact?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Whether or not the content is loading. If this is true, the content becomes transparent and the cursor turns into the progress cursor.
|
|
37
|
+
*/
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* If true, when the list is empty, the placeholder will say "nothing found" instead of "no notifications".
|
|
41
|
+
*/
|
|
42
|
+
showEmptySearch?: boolean;
|
|
43
|
+
style?: React.CSSProperties;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare const NotificationList: ({ items, compact, onCommit, onUncommit, onClickAction, onClickViewNotification, infiniteScroll, loading, showEmptySearch, style, className }: NotificationListProps) => false | import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
//# sourceMappingURL=NotificationList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationList.d.ts","sourceRoot":"","sources":["../../../src/components/notification/NotificationList.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,8BAA8B,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAC9E,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B;;;OAGG;IACH,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;QAEI;IACH,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC;;OAEG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC;;OAEG;IACH,KAAK,EAAE,8BAA8B,EAAE,CAAC;IACxC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2ED,eAAO,MAAM,gBAAgB,GAC3B,8IACgE,qBAAqB,oDA2DtF,CAAA"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Flex } from '@citric/core';
|
|
3
|
+
import { listToClass } from '@stack-spot/portal-theme';
|
|
4
|
+
import { useTranslate } from '@stack-spot/portal-translate';
|
|
5
|
+
import { last } from 'lodash';
|
|
6
|
+
import { useMemo } from 'react';
|
|
7
|
+
import { styled } from 'styled-components';
|
|
8
|
+
import { InfiniteScroll } from '../InfiniteScroll.js';
|
|
9
|
+
import { PlaceholderCallToAction } from '../Placeholder.js';
|
|
10
|
+
import { TimelineSection } from '../TimelineSection.js';
|
|
11
|
+
import { NotificationItem } from './NotificationItem.js';
|
|
12
|
+
const StyledBox = styled(Box) `
|
|
13
|
+
width: 100%;
|
|
14
|
+
position: relative;
|
|
15
|
+
transition: opacity 0.3s;
|
|
16
|
+
|
|
17
|
+
> div:first-child{
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.loading {
|
|
22
|
+
opacity: 0.6;
|
|
23
|
+
.loading-mask {
|
|
24
|
+
pointer-events: auto;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.loading-mask {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
position: absolute;
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
top: 0;
|
|
33
|
+
right: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
bottom: 0;
|
|
36
|
+
cursor: progress;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.placeholder.compact {
|
|
40
|
+
min-height: 400px;
|
|
41
|
+
padding: 0px;
|
|
42
|
+
|
|
43
|
+
& > div {
|
|
44
|
+
gap: 16px;
|
|
45
|
+
align-content: flex-start;
|
|
46
|
+
|
|
47
|
+
& > div {
|
|
48
|
+
text-align: center;
|
|
49
|
+
h4 {
|
|
50
|
+
margin-bottom: 10px;
|
|
51
|
+
}
|
|
52
|
+
p {
|
|
53
|
+
max-width: 220px;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
`;
|
|
59
|
+
// this assumes the data from the backend is ordered by date (trigger_at)
|
|
60
|
+
function groupNotificationsByDate(notifications) {
|
|
61
|
+
const groups = [];
|
|
62
|
+
for (const n of notifications) {
|
|
63
|
+
let currentGroup = last(groups);
|
|
64
|
+
const date = new Date(n.trigger_at);
|
|
65
|
+
const year = date.getFullYear();
|
|
66
|
+
const month = date.getMonth();
|
|
67
|
+
const day = date.getDate();
|
|
68
|
+
if (!currentGroup || currentGroup.day !== day || currentGroup.month !== month || currentGroup.year !== year) {
|
|
69
|
+
currentGroup = { year, month, day, items: [] };
|
|
70
|
+
groups.push(currentGroup);
|
|
71
|
+
}
|
|
72
|
+
currentGroup.items.push(n);
|
|
73
|
+
}
|
|
74
|
+
return groups;
|
|
75
|
+
}
|
|
76
|
+
export const NotificationList = ({ items, compact = false, onCommit, onUncommit, onClickAction, onClickViewNotification, infiniteScroll, loading, showEmptySearch, style, className }) => {
|
|
77
|
+
const groups = useMemo(() => compact ? [{ day: 0, month: 0, year: 0, items }] : groupNotificationsByDate(items), [compact, items]);
|
|
78
|
+
const t = useTranslate(dictionary);
|
|
79
|
+
const renderNotifications = (notifications, key) => (_jsx(Flex, { sx: { gap: '4px' }, flexDirection: "column", children: notifications?.map((item) => (_jsx(NotificationItem, { id: key ? '' : `notification-item-${item.id}`, notification: item, isSummary: compact, onClickViewNotification: onClickViewNotification, onCommit: () => onCommit(item.id), onUncommit: () => onUncommit(item.id), onClickAction: () => onClickAction?.(item.id) }, item.id))) }, key));
|
|
80
|
+
return infiniteScroll?.scrollableTarget !== null && (_jsxs(StyledBox, { style: style, className: listToClass([className, loading && 'loading']), children: [items.length ? (_jsx(InfiniteScroll, { dataLength: items.length || 0, next: infiniteScroll?.loadMore ?? (() => { }), hasMore: infiniteScroll?.hasMore ?? false,
|
|
81
|
+
// @ts-ignore: the library is wrongly typed and abandoned, meaning, it will never be fixed. The source code clearly accepts
|
|
82
|
+
// HTMLElements as scrollable targets:
|
|
83
|
+
// https://github.com/ankeetmaini/react-infinite-scroll-component/blob/master/src/index.tsx#L168
|
|
84
|
+
scrollableTarget: infiniteScroll?.scrollableTarget, children: _jsx(Flex, { sx: { gap: '24px' }, flexDirection: "column", children: groups.map((group) => compact
|
|
85
|
+
? renderNotifications(group.items, 'compact')
|
|
86
|
+
: (_jsx(TimelineSection, { month: group.month, day: group.day, children: renderNotifications(group.items) }, `${group.day}-${group.month}-${group.year}`))) }) })) : (_jsx(PlaceholderCallToAction, { title: showEmptySearch ? t.searchTitle : t.defaultTitle, description: showEmptySearch ? t.searchDescription : t.defaultDescription, className: listToClass(['placeholder', compact && 'compact']), titleAs: "p" })), _jsx("div", { className: "loading-mask" })] }));
|
|
87
|
+
};
|
|
88
|
+
const dictionary = {
|
|
89
|
+
en: {
|
|
90
|
+
defaultTitle: 'You don’t have any notifications yet.',
|
|
91
|
+
defaultDescription: 'Relevant updates will show up here as soon as they’re available.',
|
|
92
|
+
searchTitle: 'No notifications match your filters.',
|
|
93
|
+
searchDescription: 'Try changing the filters to see more results.',
|
|
94
|
+
},
|
|
95
|
+
pt: {
|
|
96
|
+
defaultTitle: 'Você ainda não tem notificações.',
|
|
97
|
+
defaultDescription: 'Quando houver alguma atualização relevante, ela será exibida aqui.',
|
|
98
|
+
searchTitle: 'Nenhuma notificação corresponde aos filtros',
|
|
99
|
+
searchDescription: 'Experimente mudar os filtros para encontrar mais notificações.',
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=NotificationList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationList.js","sourceRoot":"","sources":["../../../src/components/notification/NotificationList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACx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,KAAC,uBAAuB,IACtB,KAAK,EAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,EACxD,WAAW,EAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,EAC1E,SAAS,EAAE,WAAW,CAAC,CAAC,aAAa,EAAE,OAAO,IAAI,SAAS,CAAC,CAAC,EAC7D,OAAO,EAAC,GAAG,GACX,CACH,EACD,cAAK,SAAS,EAAC,cAAc,GAAO,IAC1B,CACb,CAAA;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,YAAY,EAAE,uCAAuC;QACrD,kBAAkB,EAAE,kEAAkE;QACtF,WAAW,EAAE,sCAAsC;QACnD,iBAAiB,EAAE,+CAA+C;KACnE;IACD,EAAE,EAAE;QACF,YAAY,EAAE,kCAAkC;QAChD,kBAAkB,EAAE,oEAAoE;QACxF,WAAW,EAAE,6CAA6C;QAC1D,iBAAiB,EAAE,gEAAgE;KACpF;CACmB,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export type NotificationType = 'LOW' | 'MEDIUM' | 'HIGH';
|
|
2
|
+
export type NotificationContext = 'ACCOUNT' | 'STUDIO' | 'WORKSPACE' | 'AI';
|
|
3
|
+
export type NotificationContentResponse = {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
export type GetTenantNotificationsResponse = {
|
|
8
|
+
id: string;
|
|
9
|
+
content: {
|
|
10
|
+
[key: string]: NotificationContentResponse;
|
|
11
|
+
};
|
|
12
|
+
broadcast_level: 'ACCOUNT' | 'INDIVIDUAL' | 'PLATFORM' | 'RESOURCE';
|
|
13
|
+
context: 'ACCOUNT' | 'STUDIO' | 'WORKSPACE' | 'AI';
|
|
14
|
+
target?: string;
|
|
15
|
+
criticality: 'LOW' | 'MEDIUM' | 'HIGH';
|
|
16
|
+
call_to_action: string;
|
|
17
|
+
persistent: boolean;
|
|
18
|
+
committed: boolean;
|
|
19
|
+
last_until?: string;
|
|
20
|
+
trigger_at: string;
|
|
21
|
+
created_at?: string;
|
|
22
|
+
isBanner?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type ResponseModelGetTenantNotificationsResponse = {
|
|
25
|
+
items: GetTenantNotificationsResponse[];
|
|
26
|
+
total: number;
|
|
27
|
+
};
|
|
28
|
+
export type NotificationTypeFilters = NotificationType | UnreadType;
|
|
29
|
+
export interface NotificationFilters {
|
|
30
|
+
filterBy?: 'criticality' | 'context';
|
|
31
|
+
filterValue?: string;
|
|
32
|
+
sort?: string;
|
|
33
|
+
direction?: string;
|
|
34
|
+
page?: any;
|
|
35
|
+
size?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface NotificationCommitted {
|
|
38
|
+
id: string;
|
|
39
|
+
committed: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare enum UnreadType {
|
|
42
|
+
Unread = "unread"
|
|
43
|
+
}
|
|
44
|
+
export interface InfiniteScrollConfig {
|
|
45
|
+
/**
|
|
46
|
+
* Function to load more items into the list. Called when the scroll is almost reaching its end.
|
|
47
|
+
*/
|
|
48
|
+
loadMore: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* Set this to false to prevent the scroll from loading more items when it reaches the end.
|
|
51
|
+
*/
|
|
52
|
+
hasMore: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Defines which scroll will be used as the target of the infinite scroll.
|
|
55
|
+
*
|
|
56
|
+
* If null, nothing renders, it waits until it has a value.
|
|
57
|
+
*/
|
|
58
|
+
scrollableTarget?: string | HTMLElement | null;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/notification/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GA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AI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;CACpB;AAID,oBAAY,UAAU;IACpB,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAAC;CAChD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// fixme: please, do not ignore lint rules. They exist for a reason. Next major: transform this enum into a disjoint string type.
|
|
2
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
3
|
+
export var UnreadType;
|
|
4
|
+
(function (UnreadType) {
|
|
5
|
+
UnreadType["Unread"] = "unread";
|
|
6
|
+
})(UnreadType || (UnreadType = {}));
|
|
7
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/notification/types.ts"],"names":[],"mappings":"AAkDA,iIAAiI;AACjI,gDAAgD;AAChD,MAAM,CAAN,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,+BAAiB,CAAA;AACnB,CAAC,EAFW,UAAU,KAAV,UAAU,QAErB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsPage.d.ts","sourceRoot":"","sources":["../../src/containers/NotificationsPage.tsx"],"names":[],"mappings":"AA4BA,eAAO,MAAM,iBAAiB,+CAmD7B,CAAA"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from '@citric/core';
|
|
3
|
+
import { useTranslate } from '@stack-spot/portal-translate';
|
|
4
|
+
import { styled } from 'styled-components';
|
|
5
|
+
import { AsyncContent } from '../components/AsyncContent.js';
|
|
6
|
+
import { ErrorFeedback } from '../components/error/index.js';
|
|
7
|
+
import { SearchInput } from '../components/form/SearchInput.js';
|
|
8
|
+
import { Select } from '../components/form/Select/index.js';
|
|
9
|
+
import { NotificationList } from '../components/notification/NotificationList.js';
|
|
10
|
+
import { useNotificationList } from '../context/notification/hooks.js';
|
|
11
|
+
import { useNotificationController } from '../notifications.js';
|
|
12
|
+
const FilterBox = styled.div `
|
|
13
|
+
margin: 24px 0;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
gap: 8px;
|
|
17
|
+
|
|
18
|
+
> * {
|
|
19
|
+
flex: 1;
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
const criticalities = ['HIGH', 'MEDIUM', 'LOW'];
|
|
23
|
+
const contexts = ['ACCOUNT', 'STUDIO', 'WORKSPACE'];
|
|
24
|
+
const times = [1, 7, 30, 90, 365];
|
|
25
|
+
export const NotificationsPage = () => {
|
|
26
|
+
const t = useTranslate(dictionary);
|
|
27
|
+
const controller = useNotificationController();
|
|
28
|
+
const { hasMore, items, loadMore, applyFilters, filters, status, error } = useNotificationList();
|
|
29
|
+
const hasFilters = Object.entries(filters).length > 0;
|
|
30
|
+
return (_jsxs(_Fragment, { children: [_jsx("header", { children: _jsx(Text, { appearance: "h2", as: "h1", children: t.title }) }), _jsx(Text, { appearance: "body2", colorScheme: "light.700", children: t.description }), _jsxs(FilterBox, { children: [_jsx(SearchInput, { searchText: t.filter, defaultValue: filters.search, onChange: search => applyFilters({ search }) }), _jsx(Select, { value: filters.createdSince, options: times, onChange: createdSince => applyFilters({ createdSince }), emptyOption: t.anyTime, renderLabel: o => t[`time.${o}`] }), _jsx(Select, { value: filters.criticality, options: criticalities, onChange: criticality => applyFilters({ criticality }), emptyOption: t.allCriticalities, renderLabel: o => t[`criticality.${o}`] }), _jsx(Select, { value: filters.context, options: contexts, onChange: context => applyFilters({ context }), emptyOption: t.allContexts, renderLabel: o => t[`context.${o}`] })] }), _jsx(AsyncContent, { error: error, loading: status === 'startup', errorDetails: { errorComponent: () => _jsx(ErrorFeedback, { code: error.code }), reportError: () => { } }, children: _jsx(NotificationList, { items: items, loading: status === 'loading', onCommit: id => controller.markAsCommitted(id), onUncommit: id => controller.markAsUncommitted(id), infiniteScroll: { hasMore, loadMore }, onClickAction: controller.config.onClickAction, showEmptySearch: hasFilters }) })] }));
|
|
31
|
+
};
|
|
32
|
+
const dictionary = {
|
|
33
|
+
en: {
|
|
34
|
+
title: 'Notifications',
|
|
35
|
+
description: 'Here you can view all your received notifications.',
|
|
36
|
+
filter: 'Filter',
|
|
37
|
+
allCriticalities: 'All severities',
|
|
38
|
+
'criticality.HIGH': 'High',
|
|
39
|
+
'criticality.MEDIUM': 'Medium',
|
|
40
|
+
'criticality.LOW': 'Low',
|
|
41
|
+
allContexts: 'All contexts',
|
|
42
|
+
'context.ACCOUNT': 'Account',
|
|
43
|
+
'context.STUDIO': 'Studio',
|
|
44
|
+
'context.WORKSPACE': 'Workspace',
|
|
45
|
+
'anyTime': 'Any time',
|
|
46
|
+
'time.1': 'Last 24 hours',
|
|
47
|
+
'time.7': 'Last 7 days',
|
|
48
|
+
'time.30': 'Last 30 days',
|
|
49
|
+
'time.90': 'Last 90 days',
|
|
50
|
+
'time.365': 'Last 12 months',
|
|
51
|
+
},
|
|
52
|
+
pt: {
|
|
53
|
+
title: 'Notificações',
|
|
54
|
+
description: 'Aqui você encontra todas as notificações recebidas.',
|
|
55
|
+
filter: 'Filtrar',
|
|
56
|
+
allCriticalities: 'Todas as criticidades',
|
|
57
|
+
'criticality.HIGH': 'Alto',
|
|
58
|
+
'criticality.MEDIUM': 'Médio',
|
|
59
|
+
'criticality.LOW': 'Baixo',
|
|
60
|
+
allContexts: 'Todos os contextos',
|
|
61
|
+
'context.ACCOUNT': 'Conta',
|
|
62
|
+
'context.STUDIO': 'Estúdio',
|
|
63
|
+
'context.WORKSPACE': 'Workspace',
|
|
64
|
+
'anyTime': 'Todos os períodos',
|
|
65
|
+
'time.1': 'Últimas 24 horas',
|
|
66
|
+
'time.7': 'Últimos 7 dias',
|
|
67
|
+
'time.30': 'Últimos 30 dias',
|
|
68
|
+
'time.90': 'Últimos 90 dias',
|
|
69
|
+
'time.365': 'Últimos 12 meses',
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=NotificationsPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationsPage.js","sourceRoot":"","sources":["../../src/containers/NotificationsPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAA;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AAEnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAE5D,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;CAS3B,CAAA;AAED,MAAM,aAAa,GAA2B,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;AACvE,MAAM,QAAQ,GAA0B,CAAC,SAAS,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;AAE1E,MAAM,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CA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BAAoB,EAAE,QAAQ;QAC9B,iBAAiB,EAAE,KAAK;QACxB,WAAW,EAAE,cAAc;QAC3B,iBAAiB,EAAE,SAAS;QAC5B,gBAAgB,EAAE,QAAQ;QAC1B,mBAAmB,EAAE,WAAW;QAChC,SAAS,EAAE,UAAU;QACrB,QAAQ,EAAE,eAAe;QACzB,QAAQ,EAAE,aAAa;QACvB,SAAS,EAAE,cAAc;QACzB,SAAS,EAAE,cAAc;QACzB,UAAU,EAAE,gBAAgB;KAC7B;IACD,EAAE,EAAE;QACF,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,qDAAqD;QAClE,MAAM,EAAE,SAAS;QACjB,gBAAgB,EAAE,uBAAuB;QACzC,kBAAkB,EAAE,MAAM;QAC1B,oBAAoB,EAAE,OAAO;QAC7B,iBAAiB,EAAE,OAAO;QAC1B,WAAW,EAAE,oBAAoB;QACjC,iBAAiB,EAAE,OAAO;QAC1B,gBAAgB,EAAE,SAAS;QAC3B,mBAAmB,EAAE,WAAW;QAChC,SAAS,EAAE,mBAAmB;QAC9B,QAAQ,EAAE,kBAAkB;QAC5B,QAAQ,EAAE,gBAAgB;QAC1B,SAAS,EAAE,iBAAiB;QAC5B,SAAS,EAAE,iBAAiB;QAC5B,UAAU,EAAE,kBAAkB;KAC/B;CACmB,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type AnchorComponent = (props: React.AnchorHTMLAttributes<HTMLAnchorElement>) => React.ReactElement;
|
|
2
|
+
interface AnchorContext {
|
|
3
|
+
/**
|
|
4
|
+
* The component to render by a layout component a link is needed.
|
|
5
|
+
* @default <a>
|
|
6
|
+
*/
|
|
7
|
+
anchorTag?: AnchorComponent;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Some components need to create HTML anchors (links) to other pages in the website. These links, sometimes, must to be managed by a
|
|
11
|
+
* navigator for React. Since we don't want to couple this library with any specific navigator, you can provide your own component for
|
|
12
|
+
* creating links, it must follow the same interface of the HTML's `a` tag.
|
|
13
|
+
*
|
|
14
|
+
* If this is not used, the tag `<a>` is used by default.
|
|
15
|
+
* @param props the anchor component (anchorTag) and the content to render (children).
|
|
16
|
+
*/
|
|
17
|
+
export declare const AnchorProvider: ({ children, ...props }: Required<AnchorContext> & {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* A React hook for retrieving the Link (anchor) component.
|
|
22
|
+
* @returns the link component declared at {@link AnchorProvider} or a component that renders the tag <a> from HTML if no link component was
|
|
23
|
+
* provided.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useAnchorTag(): AnchorComponent;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=anchor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../src/context/anchor.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,KAAK,KAAK,CAAC,YAAY,CAAA;AAE1G,UAAU,aAAa;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AAMD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,wBAAwB,QAAQ,CAAC,aAAa,CAAC,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4CAE7G,CAAA;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,eAAe,CAG9C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
3
|
+
const context = createContext({});
|
|
4
|
+
const Anchor = props => _jsx("a", { ...props });
|
|
5
|
+
/**
|
|
6
|
+
* Some components need to create HTML anchors (links) to other pages in the website. These links, sometimes, must to be managed by a
|
|
7
|
+
* navigator for React. Since we don't want to couple this library with any specific navigator, you can provide your own component for
|
|
8
|
+
* creating links, it must follow the same interface of the HTML's `a` tag.
|
|
9
|
+
*
|
|
10
|
+
* If this is not used, the tag `<a>` is used by default.
|
|
11
|
+
* @param props the anchor component (anchorTag) and the content to render (children).
|
|
12
|
+
*/
|
|
13
|
+
export const AnchorProvider = ({ children, ...props }) => (_jsx(context.Provider, { value: props, children: children }));
|
|
14
|
+
/**
|
|
15
|
+
* A React hook for retrieving the Link (anchor) component.
|
|
16
|
+
* @returns the link component declared at {@link AnchorProvider} or a component that renders the tag <a> from HTML if no link component was
|
|
17
|
+
* provided.
|
|
18
|
+
*/
|
|
19
|
+
export function useAnchorTag() {
|
|
20
|
+
const { anchorTag } = useContext(context);
|
|
21
|
+
return anchorTag ?? Anchor;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=anchor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anchor.js","sourceRoot":"","sources":["../../src/context/anchor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAYjD,MAAM,OAAO,GAAG,aAAa,CAAgB,EAAE,CAAC,CAAA;AAEhD,MAAM,MAAM,GAAoB,KAAK,CAAC,EAAE,CAAC,eAAO,KAAK,GAAI,CAAA;AAEzD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAA2D,EAAE,EAAE,CAAC,CACjH,KAAC,OAAO,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAoB,CAC9D,CAAA;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC1B,MAAM,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IACzC,OAAO,SAAS,IAAI,MAAM,CAAA;AAC5B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
interface LoadingContext {
|
|
3
|
+
/**
|
|
4
|
+
* The component to render by a layout component.
|
|
5
|
+
* @default <LoadingCircular>
|
|
6
|
+
*/
|
|
7
|
+
loading?: ReactElement;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Some portals use a different loading style than what we have in citric.
|
|
11
|
+
* You can provide your own loading component to use wherever you want within the application.
|
|
12
|
+
*
|
|
13
|
+
* @param position The position parameter is mandatory to be passed as absolute in the loading component that is being passed.
|
|
14
|
+
*
|
|
15
|
+
* If this is not used, the component `LoadingCircular` from citric is used by default.
|
|
16
|
+
* @param props the loading component (useLoadingComponent) and the content to render (children).
|
|
17
|
+
*/
|
|
18
|
+
export declare const LoadingProvider: ({ children, ...props }: Required<LoadingContext> & {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* A React hook for retrieving the Loading component.
|
|
23
|
+
* @returns the loading component declared at `LoadingProvider`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useLoadingComponent(): ReactElement;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=loading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../src/context/loading.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,YAAY,EAAc,MAAM,OAAO,CAAA;AAE/D,UAAU,cAAc;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAMD;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAI,wBAAwB,QAAQ,CAAC,cAAc,CAAC,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4CAE/G,CAAA;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,CAGlD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { LoadingCircular } from '@citric/ui';
|
|
3
|
+
import { createContext, useContext } from 'react';
|
|
4
|
+
const context = createContext({});
|
|
5
|
+
const Loading = _jsx(LoadingCircular, { size: "sm", sx: { position: 'absolute' } });
|
|
6
|
+
/**
|
|
7
|
+
* Some portals use a different loading style than what we have in citric.
|
|
8
|
+
* You can provide your own loading component to use wherever you want within the application.
|
|
9
|
+
*
|
|
10
|
+
* @param position The position parameter is mandatory to be passed as absolute in the loading component that is being passed.
|
|
11
|
+
*
|
|
12
|
+
* If this is not used, the component `LoadingCircular` from citric is used by default.
|
|
13
|
+
* @param props the loading component (useLoadingComponent) and the content to render (children).
|
|
14
|
+
*/
|
|
15
|
+
export const LoadingProvider = ({ children, ...props }) => (_jsx(context.Provider, { value: props, children: children }));
|
|
16
|
+
/**
|
|
17
|
+
* A React hook for retrieving the Loading component.
|
|
18
|
+
* @returns the loading component declared at `LoadingProvider`.
|
|
19
|
+
*/
|
|
20
|
+
export function useLoadingComponent() {
|
|
21
|
+
const { loading } = useContext(context);
|
|
22
|
+
return loading ?? Loading;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading.js","sourceRoot":"","sources":["../../src/context/loading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAgB,UAAU,EAAE,MAAM,OAAO,CAAA;AAU/D,MAAM,OAAO,GAAG,aAAa,CAAiB,EAAE,CAAC,CAAA;AAEjD,MAAM,OAAO,GAAiB,KAAC,eAAe,IAAC,IAAI,EAAC,IAAI,EAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAI,CAAA;AAEzF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAA4D,EAAE,EAAE,CAAC,CACnH,KAAC,OAAO,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAoB,CAC9D,CAAA;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IACjC,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IACvC,OAAO,OAAO,IAAI,OAAO,CAAA;AAC3B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { GetTenantNotificationsResponse, ResponseModelGetTenantNotificationsResponse } from '../../notifications.js';
|
|
2
|
+
import { LazyNotificationListener, LoadNotificationsFilters, LoadNotificationsOptions } from './types.js';
|
|
3
|
+
interface ConstructorParams {
|
|
4
|
+
id: number;
|
|
5
|
+
load: (options: LoadNotificationsOptions) => Promise<ResponseModelGetTenantNotificationsResponse>;
|
|
6
|
+
filters?: LoadNotificationsFilters;
|
|
7
|
+
}
|
|
8
|
+
export declare class LazyNotificationList {
|
|
9
|
+
#private;
|
|
10
|
+
readonly id: number;
|
|
11
|
+
items: GetTenantNotificationsResponse[];
|
|
12
|
+
private page;
|
|
13
|
+
private total;
|
|
14
|
+
private filters;
|
|
15
|
+
private readonly load;
|
|
16
|
+
private listeners;
|
|
17
|
+
private currentFetch;
|
|
18
|
+
constructor({ id, load, filters }: ConstructorParams);
|
|
19
|
+
private notify;
|
|
20
|
+
applyFilters(filters: LoadNotificationsFilters): Promise<void>;
|
|
21
|
+
loadMore(): Promise<void>;
|
|
22
|
+
hasMore(): boolean;
|
|
23
|
+
subscribe(listener: LazyNotificationListener): () => void;
|
|
24
|
+
update(readStatusMap: Map<string, boolean>): void;
|
|
25
|
+
mute(): void;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=LazyNotificationList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LazyNotificationList.d.ts","sourceRoot":"","sources":["../../../src/context/notification/LazyNotificationList.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,2CAA2C,EAAE,MAAM,qBAAqB,CAAA;AACjH,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAEtG,UAAU,iBAAiB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,OAAO,CAAC,2CAA2C,CAAC,CAAC;IAClG,OAAO,CAAC,EAAE,wBAAwB,CAAC;CACpC;AAED,qBAAa,oBAAoB;;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,8BAA8B,EAAE,CAAK;IAC5C,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,KAAK,CAAI;IACjB,OAAO,CAAC,OAAO,CAA0B;IACzC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA6F;IAClH,OAAO,CAAC,SAAS,CAAiC;IAClD,OAAO,CAAC,YAAY,CAA2B;gBAEnC,EAAE,EAAE,EAAE,IAAI,EAAE,OAAY,EAAE,EAAE,iBAAiB;IAMzD,OAAO,CAAC,MAAM;IAuBR,YAAY,CAAC,OAAO,EAAE,wBAAwB;IAsBpD,QAAQ;IAKR,OAAO;IAIP,SAAS,CAAC,QAAQ,EAAE,wBAAwB;IAO5C,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAY1C,IAAI;CAGL"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _LazyNotificationList_instances, _LazyNotificationList_loadMore;
|
|
7
|
+
import { pull, uniqBy } from 'lodash';
|
|
8
|
+
export class LazyNotificationList {
|
|
9
|
+
constructor({ id, load, filters = {} }) {
|
|
10
|
+
_LazyNotificationList_instances.add(this);
|
|
11
|
+
Object.defineProperty(this, "id", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: void 0
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(this, "items", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true,
|
|
21
|
+
value: []
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(this, "page", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: -1
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(this, "total", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: 0
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(this, "filters", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
writable: true,
|
|
39
|
+
value: void 0
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(this, "load", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
configurable: true,
|
|
44
|
+
writable: true,
|
|
45
|
+
value: void 0
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(this, "listeners", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
configurable: true,
|
|
50
|
+
writable: true,
|
|
51
|
+
value: []
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(this, "currentFetch", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
configurable: true,
|
|
56
|
+
writable: true,
|
|
57
|
+
value: void 0
|
|
58
|
+
});
|
|
59
|
+
this.id = id;
|
|
60
|
+
this.load = load;
|
|
61
|
+
this.filters = filters;
|
|
62
|
+
}
|
|
63
|
+
notify() {
|
|
64
|
+
const hasMore = this.hasMore();
|
|
65
|
+
this.listeners.forEach(l => l(this.items, hasMore));
|
|
66
|
+
}
|
|
67
|
+
async applyFilters(filters) {
|
|
68
|
+
try {
|
|
69
|
+
await this.currentFetch;
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
/* empty: this error will be treated by the function who actually triggered `currentFetch`. We just need to make sure we wait until
|
|
73
|
+
it ends before making new requests. */
|
|
74
|
+
}
|
|
75
|
+
const prevPage = this.page;
|
|
76
|
+
const prevFilters = this.filters;
|
|
77
|
+
this.filters = filters;
|
|
78
|
+
this.page = -1;
|
|
79
|
+
try {
|
|
80
|
+
this.currentFetch = __classPrivateFieldGet(this, _LazyNotificationList_instances, "m", _LazyNotificationList_loadMore).call(this, true);
|
|
81
|
+
await this.currentFetch;
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
this.filters = prevFilters;
|
|
85
|
+
this.page = prevPage;
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
loadMore() {
|
|
90
|
+
this.currentFetch ??= __classPrivateFieldGet(this, _LazyNotificationList_instances, "m", _LazyNotificationList_loadMore).call(this);
|
|
91
|
+
return this.currentFetch;
|
|
92
|
+
}
|
|
93
|
+
hasMore() {
|
|
94
|
+
return this.items.length < this.total;
|
|
95
|
+
}
|
|
96
|
+
subscribe(listener) {
|
|
97
|
+
this.listeners.push(listener);
|
|
98
|
+
return () => {
|
|
99
|
+
pull(this.listeners, listener);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
update(readStatusMap) {
|
|
103
|
+
this.items.forEach(i => i.committed = readStatusMap.get(i.id) ?? i.committed);
|
|
104
|
+
if (this.filters.committed !== undefined) {
|
|
105
|
+
this.items = this.items.filter(i => i.committed === this.filters.committed);
|
|
106
|
+
// if the filtered list has one item or less, we update the list with the backend so it can show more items.
|
|
107
|
+
// we can't use loadMore in this case because the page 2 would now skip some items. We'd need the backend to implement a cursor
|
|
108
|
+
// interface.
|
|
109
|
+
if (this.items.length <= 1)
|
|
110
|
+
this.applyFilters(this.filters);
|
|
111
|
+
}
|
|
112
|
+
this.notify();
|
|
113
|
+
}
|
|
114
|
+
mute() {
|
|
115
|
+
this.listeners = [];
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
_LazyNotificationList_instances = new WeakSet(), _LazyNotificationList_loadMore = async function _LazyNotificationList_loadMore(reset = false) {
|
|
119
|
+
try {
|
|
120
|
+
const result = await this.load({ ...this.filters, page: this.page + 1 });
|
|
121
|
+
if (reset) {
|
|
122
|
+
this.items = [];
|
|
123
|
+
this.total = 0;
|
|
124
|
+
}
|
|
125
|
+
// we can't have items with the same id: this can happen if new notifications have been created after the first page was loaded.
|
|
126
|
+
this.items = uniqBy([...this.items, ...result.items], 'id');
|
|
127
|
+
// we can't keep loading more if we already loaded every item or if the API returned an empty list.
|
|
128
|
+
this.total = result.items.length ? (this.total || result.total) : this.items.length;
|
|
129
|
+
this.page++;
|
|
130
|
+
this.notify();
|
|
131
|
+
}
|
|
132
|
+
finally {
|
|
133
|
+
this.currentFetch = undefined;
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=LazyNotificationList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LazyNotificationList.js","sourceRoot":"","sources":["../../../src/context/notification/LazyNotificationList.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAUrC,MAAM,OAAO,oBAAoB;IAU/B,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,GAAG,EAAE,EAAqB;;QAThD;;;;;WAAU;QACnB;;;;mBAA0C,EAAE;WAAA;QACpC;;;;mBAAO,CAAC,CAAC;WAAA;QACT;;;;mBAAQ,CA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