@gooddata/sdk-ui-ext 10.18.0-alpha.1 → 10.18.0-alpha.2

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.
Files changed (136) hide show
  1. package/NOTICE +102 -3
  2. package/esm/index.d.ts +11 -0
  3. package/esm/index.d.ts.map +1 -1
  4. package/esm/index.js +2 -0
  5. package/esm/index.js.map +1 -1
  6. package/esm/internal/translations/en-US.json +80 -0
  7. package/esm/notificationsPanel/@staging/OrganizationContext/OrganizationContext.d.ts +12 -0
  8. package/esm/notificationsPanel/@staging/OrganizationContext/OrganizationContext.d.ts.map +1 -0
  9. package/esm/notificationsPanel/@staging/OrganizationContext/OrganizationContext.js +18 -0
  10. package/esm/notificationsPanel/@staging/OrganizationContext/OrganizationContext.js.map +1 -0
  11. package/esm/notificationsPanel/@staging/OrganizationContext/useFetchOrganization.d.ts +22 -0
  12. package/esm/notificationsPanel/@staging/OrganizationContext/useFetchOrganization.d.ts.map +1 -0
  13. package/esm/notificationsPanel/@staging/OrganizationContext/useFetchOrganization.js +15 -0
  14. package/esm/notificationsPanel/@staging/OrganizationContext/useFetchOrganization.js.map +1 -0
  15. package/esm/notificationsPanel/Notification/AlertNotification.d.ts +15 -0
  16. package/esm/notificationsPanel/Notification/AlertNotification.d.ts.map +1 -0
  17. package/esm/notificationsPanel/Notification/AlertNotification.js +74 -0
  18. package/esm/notificationsPanel/Notification/AlertNotification.js.map +1 -0
  19. package/esm/notificationsPanel/Notification/DefaultNotification.d.ts +15 -0
  20. package/esm/notificationsPanel/Notification/DefaultNotification.d.ts.map +1 -0
  21. package/esm/notificationsPanel/Notification/DefaultNotification.js +26 -0
  22. package/esm/notificationsPanel/Notification/DefaultNotification.js.map +1 -0
  23. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetail.d.ts +13 -0
  24. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetail.d.ts.map +1 -0
  25. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetail.js +37 -0
  26. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetail.js.map +1 -0
  27. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetailDialog.d.ts +14 -0
  28. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetailDialog.d.ts.map +1 -0
  29. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetailDialog.js +24 -0
  30. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetailDialog.js.map +1 -0
  31. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetail.d.ts +10 -0
  32. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetail.d.ts.map +1 -0
  33. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetail.js +42 -0
  34. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetail.js.map +1 -0
  35. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetailDialog.d.ts +12 -0
  36. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetailDialog.d.ts.map +1 -0
  37. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetailDialog.js +27 -0
  38. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetailDialog.js.map +1 -0
  39. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsList.d.ts +28 -0
  40. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsList.d.ts.map +1 -0
  41. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsList.js +23 -0
  42. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsList.js.map +1 -0
  43. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListEmptyState.d.ts +13 -0
  44. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListEmptyState.d.ts.map +1 -0
  45. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListEmptyState.js +23 -0
  46. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListEmptyState.js.map +1 -0
  47. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListErrorState.d.ts +13 -0
  48. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListErrorState.d.ts.map +1 -0
  49. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListErrorState.js +18 -0
  50. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListErrorState.js.map +1 -0
  51. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.d.ts +38 -0
  52. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.d.ts.map +1 -0
  53. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.js +13 -0
  54. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.js.map +1 -0
  55. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.d.ts +32 -0
  56. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.d.ts.map +1 -0
  57. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.js +41 -0
  58. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.js.map +1 -0
  59. package/esm/notificationsPanel/NotificationsPanel/DefaultOpenNotificationsPanelButton.d.ts +35 -0
  60. package/esm/notificationsPanel/NotificationsPanel/DefaultOpenNotificationsPanelButton.d.ts.map +1 -0
  61. package/esm/notificationsPanel/NotificationsPanel/DefaultOpenNotificationsPanelButton.js +16 -0
  62. package/esm/notificationsPanel/NotificationsPanel/DefaultOpenNotificationsPanelButton.js.map +1 -0
  63. package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.d.ts +58 -0
  64. package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.d.ts.map +1 -0
  65. package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.js +93 -0
  66. package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.js.map +1 -0
  67. package/esm/notificationsPanel/bem.d.ts +5 -0
  68. package/esm/notificationsPanel/bem.d.ts.map +1 -0
  69. package/esm/notificationsPanel/bem.js +4 -0
  70. package/esm/notificationsPanel/bem.js.map +1 -0
  71. package/esm/notificationsPanel/components/DetailsDialog.d.ts +9 -0
  72. package/esm/notificationsPanel/components/DetailsDialog.d.ts.map +1 -0
  73. package/esm/notificationsPanel/components/DetailsDialog.js +23 -0
  74. package/esm/notificationsPanel/components/DetailsDialog.js.map +1 -0
  75. package/esm/notificationsPanel/components/Skeleton.d.ts +8 -0
  76. package/esm/notificationsPanel/components/Skeleton.d.ts.map +1 -0
  77. package/esm/notificationsPanel/components/Skeleton.js +11 -0
  78. package/esm/notificationsPanel/components/Skeleton.js.map +1 -0
  79. package/esm/notificationsPanel/components/Tooltip.d.ts +6 -0
  80. package/esm/notificationsPanel/components/Tooltip.d.ts.map +1 -0
  81. package/esm/notificationsPanel/components/Tooltip.js +10 -0
  82. package/esm/notificationsPanel/components/Tooltip.js.map +1 -0
  83. package/esm/notificationsPanel/components/VirtualList.d.ts +15 -0
  84. package/esm/notificationsPanel/components/VirtualList.d.ts.map +1 -0
  85. package/esm/notificationsPanel/components/VirtualList.js +77 -0
  86. package/esm/notificationsPanel/components/VirtualList.js.map +1 -0
  87. package/esm/notificationsPanel/data/NotificationsContext.d.ts +26 -0
  88. package/esm/notificationsPanel/data/NotificationsContext.d.ts.map +1 -0
  89. package/esm/notificationsPanel/data/NotificationsContext.js +18 -0
  90. package/esm/notificationsPanel/data/NotificationsContext.js.map +1 -0
  91. package/esm/notificationsPanel/data/attributeFilterNaming.d.ts +4 -0
  92. package/esm/notificationsPanel/data/attributeFilterNaming.d.ts.map +1 -0
  93. package/esm/notificationsPanel/data/attributeFilterNaming.js +9 -0
  94. package/esm/notificationsPanel/data/attributeFilterNaming.js.map +1 -0
  95. package/esm/notificationsPanel/data/dateFilterNaming.d.ts +4 -0
  96. package/esm/notificationsPanel/data/dateFilterNaming.d.ts.map +1 -0
  97. package/esm/notificationsPanel/data/dateFilterNaming.js +15 -0
  98. package/esm/notificationsPanel/data/dateFilterNaming.js.map +1 -0
  99. package/esm/notificationsPanel/data/useFetchNotifications.d.ts +29 -0
  100. package/esm/notificationsPanel/data/useFetchNotifications.d.ts.map +1 -0
  101. package/esm/notificationsPanel/data/useFetchNotifications.js +52 -0
  102. package/esm/notificationsPanel/data/useFetchNotifications.js.map +1 -0
  103. package/esm/notificationsPanel/data/useNotificationFiltersDetail.d.ts +12 -0
  104. package/esm/notificationsPanel/data/useNotificationFiltersDetail.d.ts.map +1 -0
  105. package/esm/notificationsPanel/data/useNotificationFiltersDetail.js +96 -0
  106. package/esm/notificationsPanel/data/useNotificationFiltersDetail.js.map +1 -0
  107. package/esm/notificationsPanel/data/useNotifications.d.ts +27 -0
  108. package/esm/notificationsPanel/data/useNotifications.d.ts.map +1 -0
  109. package/esm/notificationsPanel/data/useNotifications.js +92 -0
  110. package/esm/notificationsPanel/data/useNotifications.js.map +1 -0
  111. package/esm/notificationsPanel/localization/IntlWrapper.d.ts +13 -0
  112. package/esm/notificationsPanel/localization/IntlWrapper.d.ts.map +1 -0
  113. package/esm/notificationsPanel/localization/IntlWrapper.js +32 -0
  114. package/esm/notificationsPanel/localization/IntlWrapper.js.map +1 -0
  115. package/esm/notificationsPanel/types.d.ts +5 -0
  116. package/esm/notificationsPanel/types.d.ts.map +1 -0
  117. package/esm/notificationsPanel/types.js +3 -0
  118. package/esm/notificationsPanel/types.js.map +1 -0
  119. package/esm/sdk-ui-ext.d.ts +183 -0
  120. package/package.json +20 -16
  121. package/src/notificationsPanel/Notification/DefaultNotification.scss +134 -0
  122. package/src/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetailDialog.scss +29 -0
  123. package/src/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetailDialog.scss +72 -0
  124. package/src/notificationsPanel/NotificationsList/DefaultNotificationsList.scss +7 -0
  125. package/src/notificationsPanel/NotificationsList/DefaultNotificationsListEmptyState.scss +21 -0
  126. package/src/notificationsPanel/NotificationsList/DefaultNotificationsListErrorState.scss +21 -0
  127. package/src/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.scss +18 -0
  128. package/src/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.scss +28 -0
  129. package/src/notificationsPanel/NotificationsPanel/DefaultOpenNotificationsPanelButton.scss +34 -0
  130. package/src/notificationsPanel/components/DetailsDialog.scss +51 -0
  131. package/src/notificationsPanel/components/Skeleton.scss +25 -0
  132. package/src/notificationsPanel/components/VirtualList.scss +26 -0
  133. package/src/notificationsPanel/notificationPanel.scss +19 -0
  134. package/styles/css/main.css +407 -0
  135. package/styles/css/main.css.map +1 -1
  136. package/styles/scss/main.scss +1 -0
@@ -0,0 +1,93 @@
1
+ import React, { useCallback, useMemo, useRef, useState } from "react";
2
+ import { assertNever } from "@gooddata/sdk-model";
3
+ import { NotificationsProvider, useNotificationsContext } from "../data/NotificationsContext.js";
4
+ import { OrganizationProvider } from "../@staging/OrganizationContext/OrganizationContext.js";
5
+ import { IntlWrapper } from "../localization/IntlWrapper.js";
6
+ import { DefaultNotificationsPanelHeader, } from "./DefaultNotificationsPanelHeader.js";
7
+ import { DefaultNotificationsPanel } from "./DefaultNotificationsPanel.js";
8
+ import { Overlay, alignConfigToAlignPoint } from "@gooddata/sdk-ui-kit";
9
+ import { DefaultNotificationsList, } from "../NotificationsList/DefaultNotificationsList.js";
10
+ import { DefaultNotificationsListEmptyState, } from "../NotificationsList/DefaultNotificationsListEmptyState.js";
11
+ import { DefaultNotificationsListErrorState, } from "../NotificationsList/DefaultNotificationsListErrorState.js";
12
+ import { DefaultNotification } from "../Notification/DefaultNotification.js";
13
+ const ALIGN_POINTS = [
14
+ alignConfigToAlignPoint({ triggerAlignPoint: "bottom-right", overlayAlignPoint: "top-right" }),
15
+ ];
16
+ /**
17
+ * @alpha
18
+ */
19
+ export function NotificationsPanel(props) {
20
+ const { locale } = props;
21
+ return (React.createElement(OrganizationProvider, null,
22
+ React.createElement(NotificationsProvider, null,
23
+ React.createElement(IntlWrapper, { locale: locale },
24
+ React.createElement(NotificationsPanelController, { ...props })))));
25
+ }
26
+ /**
27
+ * @internal
28
+ */
29
+ function NotificationsPanelController({ OpenNotificationsPanelButton, NotificationsPanel = DefaultNotificationsPanel, NotificationsPanelHeader = DefaultNotificationsPanelHeader, NotificationsList = DefaultNotificationsList, NotificationsListEmptyState = DefaultNotificationsListEmptyState, NotificationsListErrorState = DefaultNotificationsListErrorState, Notification = DefaultNotification, onNotificationClick, }) {
30
+ const { buttonRef, isOpen, openNotificationsPanel, closeNotificationsPanel, toggleNotificationsPanel,
31
+ //
32
+ activeView, changeActiveView,
33
+ //
34
+ markNotificationAsRead, markAllNotificationsAsRead, unreadNotificationsCount, activeNotifications,
35
+ //
36
+ status, error, loadNextPage, hasNextPage, } = useNotificationsPanelController();
37
+ const handleNotificationClick = useCallback((notification) => {
38
+ markNotificationAsRead(notification.id);
39
+ closeNotificationsPanel();
40
+ onNotificationClick?.(notification);
41
+ }, [markNotificationAsRead, closeNotificationsPanel, onNotificationClick]);
42
+ return (React.createElement(React.Fragment, null,
43
+ React.createElement(OpenNotificationsPanelButton, { buttonRef: buttonRef, isNotificationPanelOpen: isOpen, toggleNotificationPanel: toggleNotificationsPanel, openNotificationPanel: openNotificationsPanel, closeNotificationPanel: closeNotificationsPanel, hasUnreadNotifications: unreadNotificationsCount > 0 }),
44
+ isOpen ? (React.createElement(Overlay, { isModal: false, alignTo: buttonRef.current, alignPoints: ALIGN_POINTS, closeOnEscape: true, closeOnOutsideClick: true, closeOnParentScroll: false, closeOnMouseDrag: false, onClose: closeNotificationsPanel },
45
+ React.createElement(NotificationsPanel, { NotificationsPanelHeader: NotificationsPanelHeader, NotificationsList: NotificationsList, NotificationsListEmptyState: NotificationsListEmptyState, NotificationsListErrorState: NotificationsListErrorState, Notification: Notification, toggleNotificationsPanel: toggleNotificationsPanel, openNotificationsPanel: openNotificationsPanel, closeNotificationsPanel: closeNotificationsPanel, activeView: activeView, changeActiveView: changeActiveView, markNotificationAsRead: markNotificationAsRead, markAllNotificationsAsRead: markAllNotificationsAsRead, unreadNotificationsCount: unreadNotificationsCount, activeNotifications: activeNotifications, onNotificationClick: handleNotificationClick, status: status, error: error, loadNextPage: loadNextPage, hasNextPage: hasNextPage }))) : null));
46
+ }
47
+ function useNotificationsPanelController() {
48
+ const [isOpen, setIsOpen] = useState(false);
49
+ const openNotificationsPanel = useCallback(() => setIsOpen(true), []);
50
+ const closeNotificationsPanel = useCallback(() => setIsOpen(false), []);
51
+ const toggleNotificationsPanel = useCallback(() => setIsOpen((x) => !x), []);
52
+ //
53
+ const changeActiveView = useCallback((view) => setActiveView(view), []);
54
+ const [activeView, setActiveView] = useState("unread");
55
+ const buttonRef = useRef(null);
56
+ const { notifications, unreadNotifications, unreadNotificationsCount, unreadNotificationsHasNextPage, unreadNotificationsLoadNextPage, unreadNotificationsStatus, unreadNotificationsError, notificationsHasNextPage, notificationsLoadNextPage, notificationsStatus, notificationsError, markAllNotificationsAsRead, markNotificationAsRead, } = useNotificationsContext();
57
+ const activeNotifications = useMemo(() => {
58
+ switch (activeView) {
59
+ case "unread":
60
+ return unreadNotifications;
61
+ case "all":
62
+ return notifications;
63
+ default:
64
+ assertNever(activeView);
65
+ return [];
66
+ }
67
+ }, [activeView, unreadNotifications, notifications]);
68
+ const status = activeView === "unread" ? unreadNotificationsStatus : notificationsStatus;
69
+ const error = activeView === "unread" ? unreadNotificationsError : notificationsError;
70
+ const loadNextPage = activeView === "unread" ? unreadNotificationsLoadNextPage : notificationsLoadNextPage;
71
+ const hasNextPage = activeView === "unread" ? unreadNotificationsHasNextPage : notificationsHasNextPage;
72
+ return {
73
+ buttonRef,
74
+ isOpen,
75
+ openNotificationsPanel,
76
+ closeNotificationsPanel,
77
+ toggleNotificationsPanel,
78
+ //
79
+ activeView,
80
+ changeActiveView,
81
+ //
82
+ markNotificationAsRead,
83
+ markAllNotificationsAsRead,
84
+ unreadNotificationsCount,
85
+ activeNotifications,
86
+ //
87
+ status,
88
+ error,
89
+ loadNextPage,
90
+ hasNextPage,
91
+ };
92
+ }
93
+ //# sourceMappingURL=NotificationsPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationsPanel.js","sourceRoot":"","sources":["../../../src/notificationsPanel/NotificationsPanel/NotificationsPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAiB,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,EAEH,+BAA+B,GAClC,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,yBAAyB,EAAqC,MAAM,gCAAgC,CAAC;AAC9G,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EACH,wBAAwB,GAE3B,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EACH,kCAAkC,GAErC,MAAM,4DAA4D,CAAC;AACpE,OAAO,EACH,kCAAkC,GAErC,MAAM,4DAA4D,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAA+B,MAAM,wCAAwC,CAAC;AAE1G,MAAM,YAAY,GAAG;IACjB,uBAAuB,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,iBAAiB,EAAE,WAAW,EAAE,CAAC;CACjG,CAAC;AAmDF;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA+B;IAC9D,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAEzB,OAAO,CACH,oBAAC,oBAAoB;QACjB,oBAAC,qBAAqB;YAClB,oBAAC,WAAW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B;QACtB,uBAAuB;QACvB,wBAAwB;QACxB,EAAE;QACF,UAAU;QACV,gBAAgB;QAChB,EAAE;QACF,sBAAsB;QACtB,0BAA0B;QAC1B,wBAAwB;QACxB,mBAAmB;QACnB,EAAE;QACF,MAAM;QACN,KAAK;QACL,YAAY;QACZ,WAAW;KACd,CAAC;AACN,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const bem: (block: `gd-ui-ext-${string}`) => {
2
+ b: (props?: import("@gooddata/sdk-ui-kit").StyleProps) => string;
3
+ e: (element: string, props?: import("@gooddata/sdk-ui-kit").StyleProps) => string;
4
+ };
5
+ //# sourceMappingURL=bem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bem.d.ts","sourceRoot":"","sources":["../../src/notificationsPanel/bem.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,GAAG,UAAW,aAAa,MAAM,EAAE;;;CAAmC,CAAC"}
@@ -0,0 +1,4 @@
1
+ // (C) 2024 GoodData Corporation
2
+ import { bemFactory } from "@gooddata/sdk-ui-kit";
3
+ export const bem = (block) => bemFactory(block);
4
+ //# sourceMappingURL=bem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bem.js","sourceRoot":"","sources":["../../src/notificationsPanel/bem.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,KAA4B,EAAE,EAAE,CAAC,UAAU,CAAc,KAAK,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface IDetailsDialogProps {
3
+ onClose: () => void;
4
+ title: string;
5
+ content: React.ReactNode;
6
+ }
7
+ export declare function DetailsDialog({ onClose, title, content }: IDetailsDialogProps): React.JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=DetailsDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsDialog.d.ts","sourceRoot":"","sources":["../../../src/notificationsPanel/components/DetailsDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,mBAAmB;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAUD,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,mBAAmB,qBAqB7E"}
@@ -0,0 +1,23 @@
1
+ // (C) 2024 GoodData Corporation
2
+ import { UiButton, UiIcon } from "@gooddata/sdk-ui-kit";
3
+ import React from "react";
4
+ import { bem } from "../bem.js";
5
+ import { defineMessages, useIntl } from "react-intl";
6
+ const { b, e } = bem("gd-ui-ext-notification-details-dialog");
7
+ const messages = defineMessages({
8
+ closeButtonLabel: {
9
+ id: "close",
10
+ },
11
+ });
12
+ export function DetailsDialog({ onClose, title, content }) {
13
+ const intl = useIntl();
14
+ return (React.createElement("div", { className: b() },
15
+ React.createElement("div", { className: e("header") },
16
+ React.createElement("div", { className: e("header-title") }, title),
17
+ React.createElement("div", { role: "button", className: e("header-close-button"), onClick: onClose },
18
+ React.createElement(UiIcon, { type: "close", size: 14, color: "complementary-7" }))),
19
+ React.createElement("div", { className: e("content") }, content),
20
+ React.createElement("div", { className: e("footer") },
21
+ React.createElement(UiButton, { variant: "secondary", label: intl.formatMessage(messages.closeButtonLabel), size: "small", onClick: onClose }))));
22
+ }
23
+ //# sourceMappingURL=DetailsDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsDialog.js","sourceRoot":"","sources":["../../../src/notificationsPanel/components/DetailsDialog.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAOrD,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,GAAG,CAAC,uCAAuC,CAAC,CAAC;AAE9D,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC5B,gBAAgB,EAAE;QACd,EAAE,EAAE,OAAO;KACd;CACJ,CAAC,CAAC;AAEH,MAAM,UAAU,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAuB;IAC1E,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,OAAO,CACH,6BAAK,SAAS,EAAE,CAAC,EAAE;QACf,6BAAK,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC;YACvB,6BAAK,SAAS,EAAE,CAAC,CAAC,cAAc,CAAC,IAAG,KAAK,CAAO;YAChD,6BAAK,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,CAAC,qBAAqB,CAAC,EAAE,OAAO,EAAE,OAAO;gBACpE,oBAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,iBAAiB,GAAG,CACvD,CACJ;QACN,6BAAK,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,IAAG,OAAO,CAAO;QAC7C,6BAAK,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC;YACvB,oBAAC,QAAQ,IACL,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EACpD,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,OAAO,GAClB,CACA,CACJ,CACT,CAAC;AACN,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export interface ISkeletonProps {
3
+ itemHeight: number;
4
+ itemsCount?: number;
5
+ gap?: number;
6
+ }
7
+ export declare function Skeleton({ itemsCount, itemHeight, gap }: ISkeletonProps): React.JSX.Element;
8
+ //# sourceMappingURL=Skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/notificationsPanel/components/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,MAAM,WAAW,cAAc;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,QAAQ,CAAC,EAAE,UAAc,EAAE,UAAU,EAAE,GAAQ,EAAE,EAAE,cAAc,qBAYhF"}
@@ -0,0 +1,11 @@
1
+ // (C) 2024 GoodData Corporation
2
+ import React, { useMemo } from "react";
3
+ import ReactLoadingSkeleton from "react-loading-skeleton";
4
+ import { bem } from "../bem.js";
5
+ const { b, e } = bem("gd-ui-ext-skeleton");
6
+ export function Skeleton({ itemsCount = 1, itemHeight, gap = 10 }) {
7
+ const items = Array.from({ length: itemsCount }, (_, idx) => (React.createElement(ReactLoadingSkeleton, { key: idx, className: e("item"), height: itemHeight })));
8
+ const style = useMemo(() => ({ gap }), [gap]);
9
+ return (React.createElement("div", { className: b(), style: style }, items));
10
+ }
11
+ //# sourceMappingURL=Skeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../../src/notificationsPanel/components/Skeleton.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEhC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,GAAG,CAAC,oBAAoB,CAAC,CAAC;AAQ3C,MAAM,UAAU,QAAQ,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,UAAU,EAAE,GAAG,GAAG,EAAE,EAAkB;IAC7E,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CACzD,oBAAC,oBAAoB,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,GAAI,CAC/E,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAE9C,OAAO,CACH,6BAAK,SAAS,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,IAC5B,KAAK,CACJ,CACT,CAAC;AACN,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export declare function Tooltip({ children, tooltip }: {
3
+ children: React.ReactNode;
4
+ tooltip: string;
5
+ }): React.JSX.Element;
6
+ //# sourceMappingURL=Tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/notificationsPanel/components/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,qBAO5F"}
@@ -0,0 +1,10 @@
1
+ // (C) 2024 GoodData Corporation
2
+ import React from "react";
3
+ import { Bubble, BubbleHoverTrigger } from "@gooddata/sdk-ui-kit";
4
+ const ALIGN_POINTS = [{ align: "bc tr" }, { align: "tc br" }];
5
+ export function Tooltip({ children, tooltip }) {
6
+ return (React.createElement(BubbleHoverTrigger, null,
7
+ children,
8
+ React.createElement(Bubble, { alignPoints: ALIGN_POINTS }, tooltip)));
9
+ }
10
+ //# sourceMappingURL=Tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/notificationsPanel/components/Tooltip.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAElE,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAE9D,MAAM,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAkD;IACzF,OAAO,CACH,oBAAC,kBAAkB;QACd,QAAQ;QACT,oBAAC,MAAM,IAAC,WAAW,EAAE,YAAY,IAAG,OAAO,CAAU,CACpC,CACxB,CAAC;AACN,CAAC"}
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ export interface IPagedVirtualListProps<T> {
3
+ maxHeight?: number;
4
+ items?: T[];
5
+ itemHeight: number;
6
+ itemsGap: number;
7
+ itemPadding: number;
8
+ skeletonItemsCount: number;
9
+ hasNextPage?: boolean;
10
+ loadNextPage?: () => void;
11
+ isLoading?: boolean;
12
+ children: (item: T) => React.ReactNode;
13
+ }
14
+ export declare function PagedVirtualList<T>(props: IPagedVirtualListProps<T>): React.JSX.Element;
15
+ //# sourceMappingURL=VirtualList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VirtualList.d.ts","sourceRoot":"","sources":["../../../src/notificationsPanel/components/VirtualList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAMzC,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CAC1C;AAID,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,qBAqDnE"}
@@ -0,0 +1,77 @@
1
+ // (C) 2024 GoodData Corporation
2
+ import React, { useEffect } from "react";
3
+ import { useVirtualizer } from "@tanstack/react-virtual";
4
+ import { Skeleton } from "./Skeleton.js";
5
+ import { bem } from "../bem.js";
6
+ const { b, e } = bem("gd-ui-ext-virtual-list");
7
+ export function PagedVirtualList(props) {
8
+ const { items, itemHeight, itemsGap, itemPadding, children } = props;
9
+ const { itemsCount, scrollContainerRef, height, hasScroll, rowVirtualizer, virtualItems } = useVirtualList(props);
10
+ return (React.createElement("div", { className: b({
11
+ hasScroll,
12
+ }) },
13
+ React.createElement("div", { ref: scrollContainerRef, className: e("scroll-container"), style: { height, paddingTop: itemsGap } },
14
+ React.createElement("div", { style: {
15
+ height: `${rowVirtualizer.getTotalSize()}px`,
16
+ width: "100%",
17
+ position: "relative",
18
+ } }, virtualItems.map((virtualRow) => {
19
+ const item = items?.[virtualRow.index];
20
+ const isSkeletonItem = virtualRow.index > itemsCount - 1;
21
+ const style = {
22
+ position: "absolute",
23
+ top: 0,
24
+ left: 0,
25
+ width: `calc(100% + ${hasScroll ? "10px" : "0px"})`,
26
+ height: `${virtualRow.size}px`,
27
+ transform: `translateY(${virtualRow.start}px)`,
28
+ paddingRight: itemPadding,
29
+ paddingLeft: itemPadding,
30
+ };
31
+ return (React.createElement("div", { key: virtualRow.index, style: style }, isSkeletonItem ? (React.createElement(Skeleton, { itemHeight: itemHeight, key: virtualRow.index })) : (children(item))));
32
+ })))));
33
+ }
34
+ function useVirtualList(props) {
35
+ const { items, itemHeight, maxHeight = 500, itemsGap, skeletonItemsCount, hasNextPage, loadNextPage, isLoading, } = props;
36
+ const scrollContainerRef = React.useRef(null);
37
+ const itemsCount = items ? items.length : 0;
38
+ let renderItemsCount = itemsCount;
39
+ if (hasNextPage) {
40
+ renderItemsCount = itemsCount + skeletonItemsCount;
41
+ }
42
+ else if (itemsCount === 0 && isLoading) {
43
+ renderItemsCount = skeletonItemsCount;
44
+ }
45
+ const height = Math.min(itemsCount > 0
46
+ ? (itemHeight + itemsGap) * itemsCount + itemsGap
47
+ : skeletonItemsCount * (itemHeight + itemsGap) + itemsGap, maxHeight);
48
+ const hasScroll = scrollContainerRef.current
49
+ ? scrollContainerRef.current?.scrollHeight >
50
+ scrollContainerRef.current?.getBoundingClientRect().height
51
+ : false;
52
+ const rowVirtualizer = useVirtualizer({
53
+ count: renderItemsCount,
54
+ getScrollElement: () => scrollContainerRef.current,
55
+ estimateSize: () => itemHeight + itemsGap,
56
+ overscan: 5,
57
+ });
58
+ const virtualItems = rowVirtualizer.getVirtualItems();
59
+ useEffect(() => {
60
+ const [lastItem] = [...virtualItems].reverse();
61
+ if (!lastItem) {
62
+ return;
63
+ }
64
+ if (lastItem.index >= itemsCount - 1 - skeletonItemsCount && hasNextPage && !isLoading) {
65
+ loadNextPage?.();
66
+ }
67
+ }, [hasNextPage, loadNextPage, itemsCount, isLoading, virtualItems, skeletonItemsCount]);
68
+ return {
69
+ itemsCount,
70
+ scrollContainerRef,
71
+ height,
72
+ hasScroll,
73
+ rowVirtualizer,
74
+ virtualItems,
75
+ };
76
+ }
77
+ //# sourceMappingURL=VirtualList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VirtualList.js","sourceRoot":"","sources":["../../../src/notificationsPanel/components/VirtualList.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,KAAK,EAAE,EAAE,SAAS,EAA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AAC,CAAC,kBAAkB,GAAG,CAAC,UAAU,GAAG,QAAQ,CAAC,GAAG,QAAQ,EAC7D,SAAS,CACZ,CAAC;IAEF,MAAM,SAAS,GAAG,kBAAkB,CAAC,OAAO;QACxC,CAAC,CAAC,kBAAkB,CAAC,OAAO,EAAE,YAAY;YACxC,kBAAkB,CAAC,OAAO,EAAE,qBAAqB,EAAE,CAAC,MAAM;QAC5D,CAAC,CAAC,KAAK,CAAC;IAEZ,MAAM,cAAc,GAAG,cAAc,CAAC;QAClC,KAAK,EAAE,gBAAgB;QACvB,gBAAgB,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,OAAO;QAClD,YAAY,EAAE,GAAG,EAAE,CAAC,UAAU,GAAG,QAAQ;QACzC,QAAQ,EAAE,CAAC;KACd,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,cAAc,CAAC,eAAe,EAAE,CAAC;IAEtD,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC;QAE/C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO;QACX,CAAC;QAED,IAAI,QAAQ,CAAC,KAAK,IAAI,UAAU,GAAG,CAAC,GAAG,kBAAkB,IAAI,WAAW,IAAI,CAAC,SAAS,EAAE,CAAC;YACrF,YAAY,EAAE,EAAE,CAAC;QACrB,CAAC;IACL,CAAC,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAEzF,OAAO;QACH,UAAU;QACV,kBAAkB;QAClB,MAAM;QACN,SAAS;QACT,cAAc;QACd,YAAY;KACf,CAAC;AACN,CAAC"}
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ import { IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
3
+ import { useNotifications } from "./useNotifications.js";
4
+ export type INotificationsContext = ReturnType<typeof useNotifications>;
5
+ export declare const useNotificationsContext: () => {
6
+ notifications: import("@gooddata/sdk-model").INotification[];
7
+ notificationsStatus: "error" | "loading" | "pending" | "success";
8
+ notificationsError: import("@gooddata/sdk-ui").GoodDataSdkError;
9
+ notificationsHasNextPage: boolean;
10
+ notificationsLoadNextPage: () => void;
11
+ unreadNotifications: import("@gooddata/sdk-model").INotification[];
12
+ unreadNotificationsStatus: "error" | "loading" | "pending" | "success";
13
+ unreadNotificationsError: import("@gooddata/sdk-ui").GoodDataSdkError;
14
+ unreadNotificationsHasNextPage: boolean;
15
+ unreadNotificationsLoadNextPage: () => void;
16
+ unreadNotificationsCount: number;
17
+ markNotificationAsRead: (notificationId: string) => Promise<void>;
18
+ markAllNotificationsAsRead: () => Promise<void>;
19
+ };
20
+ export interface INotificationsProviderProps {
21
+ backend?: IAnalyticalBackend;
22
+ workspace?: string;
23
+ children?: React.ReactNode;
24
+ }
25
+ export declare const NotificationsProvider: React.FC<INotificationsProviderProps>;
26
+ //# sourceMappingURL=NotificationsContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationsContext.d.ts","sourceRoot":"","sources":["../../../src/notificationsPanel/data/NotificationsContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAKxE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;CAMnC,CAAC;AAEF,MAAM,WAAW,2BAA2B;IACxC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAQvE,CAAC"}
@@ -0,0 +1,18 @@
1
+ // (C) 2019-2024 GoodData Corporation
2
+ import React from "react";
3
+ import { useNotifications } from "./useNotifications.js";
4
+ import { UnexpectedSdkError } from "@gooddata/sdk-ui";
5
+ const NotificationsContext = React.createContext(null);
6
+ NotificationsContext.displayName = "NotificationsContext";
7
+ export const useNotificationsContext = () => {
8
+ const context = React.useContext(NotificationsContext);
9
+ if (!context) {
10
+ throw new UnexpectedSdkError("useNotificationsContext must be used within a NotificationsProvider");
11
+ }
12
+ return context;
13
+ };
14
+ export const NotificationsProvider = ({ children, backend, workspace, }) => {
15
+ const notifications = useNotifications({ backend, workspace });
16
+ return React.createElement(NotificationsContext.Provider, { value: notifications }, children);
17
+ };
18
+ //# sourceMappingURL=NotificationsContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationsContext.js","sourceRoot":"","sources":["../../../src/notificationsPanel/data/NotificationsContext.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAItD,MAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAA+B,IAAI,CAAC,CAAC;AACrF,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAE1D,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IACxC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACvD,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,kBAAkB,CAAC,qEAAqE,CAAC,CAAC;IACxG,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAQF,MAAM,CAAC,MAAM,qBAAqB,GAA0C,CAAC,EACzE,QAAQ,EACR,OAAO,EACP,SAAS,GACZ,EAAE,EAAE;IACD,MAAM,aAAa,GAAG,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IAE/D,OAAO,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,aAAa,IAAG,QAAQ,CAAiC,CAAC;AAC3G,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { IntlShape } from "react-intl";
2
+ import { IAttributeFilter } from "@gooddata/sdk-model";
3
+ export declare function translateAttributeFilter(intl: IntlShape, filter: IAttributeFilter): string;
4
+ //# sourceMappingURL=attributeFilterNaming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attributeFilterNaming.d.ts","sourceRoot":"","sources":["../../../src/notificationsPanel/data/attributeFilterNaming.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EACH,gBAAgB,EAKnB,MAAM,qBAAqB,CAAC;AAG7B,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAU1F"}
@@ -0,0 +1,9 @@
1
+ import { isNegativeAttributeFilter, filterAttributeElements, getAttributeElementsItems, } from "@gooddata/sdk-model";
2
+ import { getAttributeFilterSubtitle } from "@gooddata/sdk-ui-filters";
3
+ export function translateAttributeFilter(intl, filter) {
4
+ const isNegative = isNegativeAttributeFilter(filter);
5
+ const attributeElements = filterAttributeElements(filter);
6
+ const attributeElementsItems = getAttributeElementsItems(attributeElements);
7
+ return getAttributeFilterSubtitle(isNegative, attributeElementsItems.map((item) => ({ title: item, uri: item })), intl);
8
+ }
9
+ //# sourceMappingURL=attributeFilterNaming.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attributeFilterNaming.js","sourceRoot":"","sources":["../../../src/notificationsPanel/data/attributeFilterNaming.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,yBAAyB,EACzB,uBAAuB,EACvB,yBAAyB,GAE5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAEtE,MAAM,UAAU,wBAAwB,CAAC,IAAe,EAAE,MAAwB;IAC9E,MAAM,UAAU,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;IACrD,MAAM,iBAAiB,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAC1D,MAAM,sBAAsB,GAAG,yBAAyB,CAAC,iBAAiB,CAAC,CAAC;IAE5E,OAAO,0BAA0B,CAC7B,UAAU,EACV,sBAAsB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAqB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EACrF,IAAI,CACP,CAAC;AACN,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { IntlShape } from "react-intl";
2
+ import { IDateFilter } from "@gooddata/sdk-model";
3
+ export declare function translateDateFilter(intl: IntlShape, filter: IDateFilter, dateFormat: string): string;
4
+ //# sourceMappingURL=dateFilterNaming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateFilterNaming.d.ts","sourceRoot":"","sources":["../../../src/notificationsPanel/data/dateFilterNaming.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAGH,WAAW,EAKd,MAAM,qBAAqB,CAAC;AAa7B,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAWpG"}
@@ -0,0 +1,15 @@
1
+ import { isRelativeDateFilter, relativeDateFilterValues, absoluteDateFilterValues, } from "@gooddata/sdk-model";
2
+ import { DateFilterHelpers } from "@gooddata/sdk-ui-filters";
3
+ export function translateDateFilter(intl, filter, dateFormat) {
4
+ const metadata = filterMetadata(filter);
5
+ return metadata.type === "absolute"
6
+ ? DateFilterHelpers.formatAbsoluteDateRange(metadata.from, metadata.to, dateFormat)
7
+ : DateFilterHelpers.formatRelativeDateRange(metadata.from, metadata.to, metadata.granularity, intl);
8
+ }
9
+ function filterMetadata(filter) {
10
+ if (isRelativeDateFilter(filter)) {
11
+ return { ...relativeDateFilterValues(filter), type: "relative" };
12
+ }
13
+ return { ...absoluteDateFilterValues(filter), type: "absolute" };
14
+ }
15
+ //# sourceMappingURL=dateFilterNaming.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateFilterNaming.js","sourceRoot":"","sources":["../../../src/notificationsPanel/data/dateFilterNaming.ts"],"names":[],"mappings":"AAEA,OAAO,EAKH,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAY7D,MAAM,UAAU,mBAAmB,CAAC,IAAe,EAAE,MAAmB,EAAE,UAAkB;IACxF,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IAExC,OAAO,QAAQ,CAAC,IAAI,KAAK,UAAU;QAC/B,CAAC,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;QACnF,CAAC,CAAC,iBAAiB,CAAC,uBAAuB,CACrC,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,EAAE,EACX,QAAQ,CAAC,WAAoC,EAC7C,IAAI,CACP,CAAC;AACZ,CAAC;AAED,SAAS,cAAc,CAAC,MAAmB;IACvC,IAAI,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/B,OAAO,EAAE,GAAG,wBAAwB,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IACrE,CAAC;IAED,OAAO,EAAE,GAAG,wBAAwB,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AACrE,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { GoodDataSdkError } from "@gooddata/sdk-ui";
2
+ import { INotification } from "@gooddata/sdk-model";
3
+ /**
4
+ * @alpha
5
+ */
6
+ export interface IUseFetchNotificationsProps {
7
+ /**
8
+ * Workspace to use.
9
+ * If not provided, it will be taken from the WorkspaceProvider context.
10
+ */
11
+ workspace?: string;
12
+ /**
13
+ * Filter notifications by status.
14
+ * If not provided, all notifications will be fetched.
15
+ */
16
+ readStatus?: "unread" | "read";
17
+ }
18
+ /**
19
+ * @alpha
20
+ */
21
+ export declare function useFetchNotifications({ workspace, readStatus }: IUseFetchNotificationsProps): {
22
+ notifications: INotification[];
23
+ status: "error" | "loading" | "pending" | "success";
24
+ error: GoodDataSdkError;
25
+ hasNextPage: boolean;
26
+ loadNextPage: () => void;
27
+ totalNotificationsCount: number;
28
+ };
29
+ //# sourceMappingURL=useFetchNotifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchNotifications.d.ts","sourceRoot":"","sources":["../../../src/notificationsPanel/data/useFetchNotifications.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAsC,MAAM,kBAAkB,CAAC;AAExF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIpD;;GAEG;AACH,MAAM,WAAW,2BAA2B;IACxC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,2BAA2B;;;;;;;EAqD3F"}
@@ -0,0 +1,52 @@
1
+ // (C) 2024 GoodData Corporation
2
+ import { useCancelablePromise, useWorkspace } from "@gooddata/sdk-ui";
3
+ import { useOrganization } from "../@staging/OrganizationContext/OrganizationContext.js";
4
+ import { useCallback, useState } from "react";
5
+ /**
6
+ * @alpha
7
+ */
8
+ export function useFetchNotifications({ workspace, readStatus }) {
9
+ const effectiveWorkspace = useWorkspace(workspace);
10
+ const { result: organizationService } = useOrganization();
11
+ const [page, setPage] = useState(0);
12
+ const [hasNextPage, setHasNextPage] = useState(false);
13
+ const [notifications, setNotifications] = useState([]);
14
+ const [totalNotificationsCount, setTotalNotificationsCount] = useState(0);
15
+ const { status, error } = useCancelablePromise({
16
+ promise: !organizationService
17
+ ? null
18
+ : async () => {
19
+ let query = organizationService.notifications().getNotificationsQuery().withSize(50);
20
+ if (effectiveWorkspace) {
21
+ query = query.withWorkspace(effectiveWorkspace);
22
+ }
23
+ if (page) {
24
+ query = query.withPage(page);
25
+ }
26
+ if (readStatus) {
27
+ query = query.withStatus(readStatus);
28
+ }
29
+ return query.query();
30
+ },
31
+ onSuccess: (result) => {
32
+ const hasNextPage = result.totalCount > (page + 1) * 50;
33
+ setHasNextPage(hasNextPage);
34
+ setNotifications((prev) => [...prev, ...result.items]);
35
+ setTotalNotificationsCount(result.totalCount);
36
+ },
37
+ }, [effectiveWorkspace, organizationService, page]);
38
+ const loadNextPage = useCallback(() => {
39
+ if (status === "success" && hasNextPage) {
40
+ setPage((x) => x + 1);
41
+ }
42
+ }, [status, hasNextPage]);
43
+ return {
44
+ notifications,
45
+ status,
46
+ error,
47
+ hasNextPage,
48
+ loadNextPage,
49
+ totalNotificationsCount,
50
+ };
51
+ }
52
+ //# sourceMappingURL=useFetchNotifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchNotifications.js","sourceRoot":"","sources":["../../../src/notificationsPanel/data/useFetchNotifications.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,EAAoB,oBAAoB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AAEzF,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAoB9C;;GAEG;AACH,MAAM,UAAU,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AI,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;YACxD,cAAc,CAAC,WAAW,CAAC,CAAC;YAC5B,gBAAgB,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACvD,0BAA0B,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAClD,CAAC;KACJ,EACD,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,IAAI,CAAC,CAClD,CAAC;IAEF,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,EAAE;QAClC,IAAI,MAAM,KAAK,SAAS,IAAI,WAAW,EAAE,CAAC;YACtC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1B,CAAC;IACL,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IAE1B,OAAO;QACH,aAAa;QACb,MAAM;QACN,KAAK;QACL,WAAW;QACX,YAAY;QACZ,uBAAuB;KAC1B,CAAC;AACN,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { IAlertNotification } from "@gooddata/sdk-model";
2
+ export declare function useNotificationsFilterDetail(notification: IAlertNotification): {
3
+ filtersInfo: {
4
+ title: string;
5
+ subtitle: string;
6
+ }[];
7
+ automationPromise: import("@gooddata/sdk-ui").UseCancelablePromiseState<{
8
+ automation: import("@gooddata/sdk-model").IAutomationMetadataObject;
9
+ labels: import("@gooddata/sdk-model").IAttributeDisplayFormMetadataObject[];
10
+ }, any>;
11
+ };
12
+ //# sourceMappingURL=useNotificationFiltersDetail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNotificationFiltersDetail.d.ts","sourceRoot":"","sources":["../../../src/notificationsPanel/data/useNotificationFiltersDetail.tsx"],"names":[],"mappings":"AACA,OAAO,EAQH,kBAAkB,EAErB,MAAM,qBAAqB,CAAC;AAuB7B,wBAAgB,4BAA4B,CAAC,YAAY,EAAE,kBAAkB;;eAwFpC,MAAM;kBAAY,MAAM;;;;;;EAIhE"}