@gooddata/sdk-ui-ext 10.18.0-alpha.30 → 10.18.0-alpha.32

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 (99) hide show
  1. package/NOTICE +3 -3
  2. package/esm/index.d.ts +12 -2
  3. package/esm/index.d.ts.map +1 -1
  4. package/esm/index.js +10 -2
  5. package/esm/index.js.map +1 -1
  6. package/esm/notificationsPanel/@staging/OrganizationContext/OrganizationContext.d.ts +12 -0
  7. package/esm/notificationsPanel/@staging/OrganizationContext/OrganizationContext.d.ts.map +1 -1
  8. package/esm/notificationsPanel/@staging/OrganizationContext/OrganizationContext.js +10 -1
  9. package/esm/notificationsPanel/@staging/OrganizationContext/OrganizationContext.js.map +1 -1
  10. package/esm/notificationsPanel/@staging/OrganizationContext/useFetchOrganization.d.ts +6 -4
  11. package/esm/notificationsPanel/@staging/OrganizationContext/useFetchOrganization.d.ts.map +1 -1
  12. package/esm/notificationsPanel/@staging/OrganizationContext/useFetchOrganization.js +1 -1
  13. package/esm/notificationsPanel/@staging/OrganizationContext/useFetchOrganization.js.map +1 -1
  14. package/esm/notificationsPanel/Notification/AlertNotification.d.ts +2 -2
  15. package/esm/notificationsPanel/Notification/AlertNotification.d.ts.map +1 -1
  16. package/esm/notificationsPanel/Notification/AlertNotification.js +3 -3
  17. package/esm/notificationsPanel/Notification/AlertNotification.js.map +1 -1
  18. package/esm/notificationsPanel/Notification/DefaultNotification.d.ts +17 -4
  19. package/esm/notificationsPanel/Notification/DefaultNotification.d.ts.map +1 -1
  20. package/esm/notificationsPanel/Notification/DefaultNotification.js +6 -4
  21. package/esm/notificationsPanel/Notification/DefaultNotification.js.map +1 -1
  22. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetail.d.ts +4 -1
  23. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetail.d.ts.map +1 -1
  24. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetail.js +1 -1
  25. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetail.js.map +1 -1
  26. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetailDialog.d.ts +4 -1
  27. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetailDialog.d.ts.map +1 -1
  28. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetailDialog.js +1 -1
  29. package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetailDialog.js.map +1 -1
  30. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsList.d.ts +66 -4
  31. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsList.d.ts.map +1 -1
  32. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsList.js +17 -35
  33. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsList.js.map +1 -1
  34. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListEmptyState.d.ts +9 -2
  35. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListEmptyState.d.ts.map +1 -1
  36. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListEmptyState.js +4 -2
  37. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListEmptyState.js.map +1 -1
  38. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListErrorState.d.ts +9 -2
  39. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListErrorState.d.ts.map +1 -1
  40. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListErrorState.js +4 -2
  41. package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListErrorState.js.map +1 -1
  42. package/esm/notificationsPanel/NotificationsList/DefaultSkeletonItem.d.ts +19 -0
  43. package/esm/notificationsPanel/NotificationsList/DefaultSkeletonItem.d.ts.map +1 -0
  44. package/esm/notificationsPanel/NotificationsList/DefaultSkeletonItem.js +9 -0
  45. package/esm/notificationsPanel/NotificationsList/DefaultSkeletonItem.js.map +1 -0
  46. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.d.ts +95 -5
  47. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.d.ts.map +1 -1
  48. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.js +7 -5
  49. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.js.map +1 -1
  50. package/esm/notificationsPanel/NotificationsPanel/{DefaultOpenNotificationsPanelButton.d.ts → DefaultNotificationsPanelButton.d.ts} +8 -6
  51. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelButton.d.ts.map +1 -0
  52. package/esm/notificationsPanel/NotificationsPanel/{DefaultOpenNotificationsPanelButton.js → DefaultNotificationsPanelButton.js} +4 -4
  53. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelButton.js.map +1 -0
  54. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.d.ts +8 -4
  55. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.d.ts.map +1 -1
  56. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.js +6 -4
  57. package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.js.map +1 -1
  58. package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.d.ts +73 -13
  59. package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.d.ts.map +1 -1
  60. package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.js +21 -11
  61. package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.js.map +1 -1
  62. package/esm/notificationsPanel/bem.d.ts +5 -0
  63. package/esm/notificationsPanel/bem.d.ts.map +1 -1
  64. package/esm/notificationsPanel/bem.js +6 -1
  65. package/esm/notificationsPanel/bem.js.map +1 -1
  66. package/esm/notificationsPanel/data/NotificationsContext.d.ts +16 -1
  67. package/esm/notificationsPanel/data/NotificationsContext.d.ts.map +1 -1
  68. package/esm/notificationsPanel/data/NotificationsContext.js +9 -3
  69. package/esm/notificationsPanel/data/NotificationsContext.js.map +1 -1
  70. package/esm/notificationsPanel/data/useFetchNotifications.d.ts +10 -8
  71. package/esm/notificationsPanel/data/useFetchNotifications.d.ts.map +1 -1
  72. package/esm/notificationsPanel/data/useFetchNotifications.js +10 -7
  73. package/esm/notificationsPanel/data/useFetchNotifications.js.map +1 -1
  74. package/esm/notificationsPanel/data/useNotificationFiltersDetail.d.ts.map +1 -1
  75. package/esm/notificationsPanel/data/useNotificationFiltersDetail.js +7 -8
  76. package/esm/notificationsPanel/data/useNotificationFiltersDetail.js.map +1 -1
  77. package/esm/notificationsPanel/data/useNotifications.d.ts +23 -3
  78. package/esm/notificationsPanel/data/useNotifications.d.ts.map +1 -1
  79. package/esm/notificationsPanel/data/useNotifications.js +9 -5
  80. package/esm/notificationsPanel/data/useNotifications.js.map +1 -1
  81. package/esm/notificationsPanel/types.d.ts +3 -1
  82. package/esm/notificationsPanel/types.d.ts.map +1 -1
  83. package/esm/notificationsPanel/types.js +1 -1
  84. package/esm/notificationsPanel/types.js.map +1 -1
  85. package/esm/sdk-ui-ext.d.ts +395 -54
  86. package/package.json +18 -18
  87. package/src/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.scss +4 -6
  88. package/src/notificationsPanel/NotificationsPanel/{DefaultOpenNotificationsPanelButton.scss → DefaultNotificationsPanelButton.scss} +2 -2
  89. package/src/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.scss +3 -1
  90. package/src/notificationsPanel/notificationPanel.scss +8 -3
  91. package/styles/css/main.css +500 -36
  92. package/styles/css/main.css.map +1 -1
  93. package/esm/notificationsPanel/NotificationsPanel/DefaultOpenNotificationsPanelButton.d.ts.map +0 -1
  94. package/esm/notificationsPanel/NotificationsPanel/DefaultOpenNotificationsPanelButton.js.map +0 -1
  95. package/esm/notificationsPanel/components/VirtualList.d.ts +0 -15
  96. package/esm/notificationsPanel/components/VirtualList.d.ts.map +0 -1
  97. package/esm/notificationsPanel/components/VirtualList.js +0 -78
  98. package/esm/notificationsPanel/components/VirtualList.js.map +0 -1
  99. package/src/notificationsPanel/components/VirtualList.scss +0 -32
@@ -1,15 +0,0 @@
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
@@ -1 +0,0 @@
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,EAAE,MAAM,CAAC;IAClB,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"}
@@ -1,78 +0,0 @@
1
- // (C) 2024 GoodData Corporation
2
- import React, { useEffect } from "react";
3
- import { UiSkeleton } from "@gooddata/sdk-ui-kit";
4
- import { useVirtualizer } from "@tanstack/react-virtual";
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(UiSkeleton, { itemHeight: itemHeight, key: virtualRow.index })) : (children(item))));
32
- })))));
33
- }
34
- function useVirtualList(props) {
35
- const { items, itemHeight, itemsGap, skeletonItemsCount, hasNextPage, loadNextPage, isLoading, maxHeight, } = 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 realHeight = itemsCount > 0
46
- ? (itemHeight + itemsGap) * itemsCount + itemsGap
47
- : skeletonItemsCount * (itemHeight + itemsGap) + itemsGap;
48
- const height = Math.min(maxHeight, realHeight);
49
- const hasScroll = scrollContainerRef.current
50
- ? scrollContainerRef.current?.scrollHeight >
51
- scrollContainerRef.current?.getBoundingClientRect().height
52
- : false;
53
- const rowVirtualizer = useVirtualizer({
54
- count: renderItemsCount,
55
- getScrollElement: () => scrollContainerRef.current,
56
- estimateSize: () => itemHeight + itemsGap,
57
- overscan: 5,
58
- });
59
- const virtualItems = rowVirtualizer.getVirtualItems();
60
- useEffect(() => {
61
- const [lastItem] = [...virtualItems].reverse();
62
- if (!lastItem) {
63
- return;
64
- }
65
- if (lastItem.index >= itemsCount - 1 - skeletonItemsCount && hasNextPage && !isLoading) {
66
- loadNextPage?.();
67
- }
68
- }, [hasNextPage, loadNextPage, itemsCount, isLoading, virtualItems, skeletonItemsCount]);
69
- return {
70
- itemsCount,
71
- scrollContainerRef,
72
- height,
73
- hasScroll,
74
- rowVirtualizer,
75
- virtualItems,
76
- };
77
- }
78
- //# sourceMappingURL=VirtualList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VirtualList.js","sourceRoot":"","sources":["../../../src/notificationsPanel/components/VirtualList.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAehC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,GAAG,CAAC,wBAAwB,CAAC,CAAC;AAE/C,MAAM,UAAU,gBAAgB,CAAI,KAAgC;IAChE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAErE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,GACrF,cAAc,CAAC,KAAK,CAAC,CAAC;IAE1B,OAAO,CACH,6BACI,SAAS,EAAE,CAAC,CAAC;YACT,SAAS;SACZ,CAAC;QAEF,6BACI,GA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AE;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"}
@@ -1,32 +0,0 @@
1
- // (C) 2024 GoodData Corporation
2
-
3
- .gd-ui-ext-virtual-list {
4
- display: flex;
5
- flex-direction: column;
6
- min-height: 0;
7
- max-height: 100%;
8
- height: 100%;
9
- width: 100%;
10
-
11
- &--hasScroll {
12
- padding-right: 4px;
13
- }
14
-
15
- &__scroll-container {
16
- min-height: 0;
17
- max-height: 100%;
18
- overflow: auto;
19
- overflow-x: hidden;
20
-
21
- &::-webkit-scrollbar {
22
- -webkit-appearance: none;
23
- appearance: none;
24
- width: 6px;
25
- }
26
-
27
- &::-webkit-scrollbar-thumb {
28
- background-color: var(--gd-palette-complementary-2);
29
- border-radius: 3px;
30
- }
31
- }
32
- }