@gooddata/sdk-ui-ext 10.18.0-alpha.9 → 10.19.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +3 -3
- package/esm/index.d.ts +12 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +10 -2
- package/esm/index.js.map +1 -1
- package/esm/internal/translations/de-DE.json +9 -1
- package/esm/internal/translations/en-AU.json +9 -1
- package/esm/internal/translations/en-GB.json +9 -1
- package/esm/internal/translations/en-US.json +1 -1
- package/esm/internal/translations/es-419.json +9 -1
- package/esm/internal/translations/es-ES.json +9 -1
- package/esm/internal/translations/fi-FI.json +9 -1
- package/esm/internal/translations/fr-CA.json +9 -1
- package/esm/internal/translations/fr-FR.json +9 -1
- package/esm/internal/translations/it-IT.json +9 -1
- package/esm/internal/translations/ja-JP.json +9 -1
- package/esm/internal/translations/nl-NL.json +9 -1
- package/esm/internal/translations/pt-BR.json +9 -1
- package/esm/internal/translations/pt-PT.json +9 -1
- package/esm/internal/translations/zh-HK.json +9 -1
- package/esm/internal/translations/zh-Hans.json +9 -1
- package/esm/internal/translations/zh-Hant.json +9 -1
- package/esm/notificationsPanel/@staging/OrganizationContext/OrganizationContext.d.ts +12 -0
- package/esm/notificationsPanel/@staging/OrganizationContext/OrganizationContext.d.ts.map +1 -1
- package/esm/notificationsPanel/@staging/OrganizationContext/OrganizationContext.js +10 -1
- package/esm/notificationsPanel/@staging/OrganizationContext/OrganizationContext.js.map +1 -1
- package/esm/notificationsPanel/@staging/OrganizationContext/useFetchOrganization.d.ts +6 -4
- package/esm/notificationsPanel/@staging/OrganizationContext/useFetchOrganization.d.ts.map +1 -1
- package/esm/notificationsPanel/@staging/OrganizationContext/useFetchOrganization.js +1 -1
- package/esm/notificationsPanel/@staging/OrganizationContext/useFetchOrganization.js.map +1 -1
- package/esm/notificationsPanel/Notification/AlertNotification.d.ts +2 -2
- package/esm/notificationsPanel/Notification/AlertNotification.d.ts.map +1 -1
- package/esm/notificationsPanel/Notification/AlertNotification.js +15 -10
- package/esm/notificationsPanel/Notification/AlertNotification.js.map +1 -1
- package/esm/notificationsPanel/Notification/DefaultNotification.d.ts +17 -4
- package/esm/notificationsPanel/Notification/DefaultNotification.d.ts.map +1 -1
- package/esm/notificationsPanel/Notification/DefaultNotification.js +6 -4
- package/esm/notificationsPanel/Notification/DefaultNotification.js.map +1 -1
- package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetail.js +1 -1
- package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetail.js.map +1 -1
- package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetailDialog.js +2 -2
- package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetailDialog.js.map +1 -1
- package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetail.d.ts +4 -1
- package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetail.d.ts.map +1 -1
- package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetail.js +9 -5
- package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetail.js.map +1 -1
- package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetailDialog.d.ts +4 -1
- package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetailDialog.d.ts.map +1 -1
- package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetailDialog.js +1 -1
- package/esm/notificationsPanel/NotificationTriggersDetail/NotificationTriggersDetailDialog.js.map +1 -1
- package/esm/notificationsPanel/NotificationsList/DefaultNotificationsList.d.ts +66 -4
- package/esm/notificationsPanel/NotificationsList/DefaultNotificationsList.d.ts.map +1 -1
- package/esm/notificationsPanel/NotificationsList/DefaultNotificationsList.js +16 -15
- package/esm/notificationsPanel/NotificationsList/DefaultNotificationsList.js.map +1 -1
- package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListEmptyState.d.ts +9 -2
- package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListEmptyState.d.ts.map +1 -1
- package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListEmptyState.js +4 -2
- package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListEmptyState.js.map +1 -1
- package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListErrorState.d.ts +9 -2
- package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListErrorState.d.ts.map +1 -1
- package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListErrorState.js +4 -2
- package/esm/notificationsPanel/NotificationsList/DefaultNotificationsListErrorState.js.map +1 -1
- package/esm/notificationsPanel/NotificationsList/DefaultSkeletonItem.d.ts +19 -0
- package/esm/notificationsPanel/NotificationsList/DefaultSkeletonItem.d.ts.map +1 -0
- package/esm/notificationsPanel/NotificationsList/DefaultSkeletonItem.js +9 -0
- package/esm/notificationsPanel/NotificationsList/DefaultSkeletonItem.js.map +1 -0
- package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.d.ts +95 -5
- package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.d.ts.map +1 -1
- package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.js +7 -5
- package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.js.map +1 -1
- package/esm/notificationsPanel/NotificationsPanel/{DefaultOpenNotificationsPanelButton.d.ts → DefaultNotificationsPanelButton.d.ts} +8 -6
- package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelButton.d.ts.map +1 -0
- package/esm/notificationsPanel/NotificationsPanel/{DefaultOpenNotificationsPanelButton.js → DefaultNotificationsPanelButton.js} +4 -4
- package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelButton.js.map +1 -0
- package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.d.ts +8 -4
- package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.d.ts.map +1 -1
- package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.js +6 -4
- package/esm/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.js.map +1 -1
- package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.d.ts +75 -11
- package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.d.ts.map +1 -1
- package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.js +20 -10
- package/esm/notificationsPanel/NotificationsPanel/NotificationsPanel.js.map +1 -1
- package/esm/notificationsPanel/bem.d.ts +5 -0
- package/esm/notificationsPanel/bem.d.ts.map +1 -1
- package/esm/notificationsPanel/bem.js +6 -1
- package/esm/notificationsPanel/bem.js.map +1 -1
- package/esm/notificationsPanel/data/NotificationsContext.d.ts +16 -1
- package/esm/notificationsPanel/data/NotificationsContext.d.ts.map +1 -1
- package/esm/notificationsPanel/data/NotificationsContext.js +9 -3
- package/esm/notificationsPanel/data/NotificationsContext.js.map +1 -1
- package/esm/notificationsPanel/data/useFetchNotifications.d.ts +11 -8
- package/esm/notificationsPanel/data/useFetchNotifications.d.ts.map +1 -1
- package/esm/notificationsPanel/data/useFetchNotifications.js +18 -7
- package/esm/notificationsPanel/data/useFetchNotifications.js.map +1 -1
- package/esm/notificationsPanel/data/useNotificationFiltersDetail.d.ts +1 -0
- package/esm/notificationsPanel/data/useNotificationFiltersDetail.d.ts.map +1 -1
- package/esm/notificationsPanel/data/useNotificationFiltersDetail.js +34 -17
- package/esm/notificationsPanel/data/useNotificationFiltersDetail.js.map +1 -1
- package/esm/notificationsPanel/data/useNotifications.d.ts +24 -4
- package/esm/notificationsPanel/data/useNotifications.d.ts.map +1 -1
- package/esm/notificationsPanel/data/useNotifications.js +15 -10
- package/esm/notificationsPanel/data/useNotifications.js.map +1 -1
- package/esm/notificationsPanel/types.d.ts +3 -1
- package/esm/notificationsPanel/types.d.ts.map +1 -1
- package/esm/notificationsPanel/types.js +1 -1
- package/esm/notificationsPanel/types.js.map +1 -1
- package/esm/sdk-ui-ext.d.ts +397 -52
- package/package.json +17 -18
- package/src/notificationsPanel/NotificationsList/DefaultNotificationsList.scss +3 -0
- package/src/notificationsPanel/NotificationsPanel/DefaultNotificationsPanel.scss +7 -4
- package/src/notificationsPanel/NotificationsPanel/{DefaultOpenNotificationsPanelButton.scss → DefaultNotificationsPanelButton.scss} +2 -2
- package/src/notificationsPanel/NotificationsPanel/DefaultNotificationsPanelHeader.scss +8 -3
- package/src/notificationsPanel/notificationPanel.scss +8 -4
- package/styles/css/main.css +467 -48
- package/styles/css/main.css.map +1 -1
- package/esm/notificationsPanel/NotificationsPanel/DefaultOpenNotificationsPanelButton.d.ts.map +0 -1
- package/esm/notificationsPanel/NotificationsPanel/DefaultOpenNotificationsPanelButton.js.map +0 -1
- package/esm/notificationsPanel/components/Skeleton.d.ts +0 -8
- package/esm/notificationsPanel/components/Skeleton.d.ts.map +0 -1
- package/esm/notificationsPanel/components/Skeleton.js +0 -11
- package/esm/notificationsPanel/components/Skeleton.js.map +0 -1
- package/esm/notificationsPanel/components/VirtualList.d.ts +0 -15
- package/esm/notificationsPanel/components/VirtualList.d.ts.map +0 -1
- package/esm/notificationsPanel/components/VirtualList.js +0 -77
- package/esm/notificationsPanel/components/VirtualList.js.map +0 -1
- package/src/notificationsPanel/components/Skeleton.scss +0 -25
- package/src/notificationsPanel/components/VirtualList.scss +0 -26
package/esm/sdk-ui-ext.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ import { LocalIdRef } from '@gooddata/sdk-model';
|
|
|
41
41
|
import { ObjRef } from '@gooddata/sdk-model';
|
|
42
42
|
import { OnError } from '@gooddata/sdk-ui';
|
|
43
43
|
import { default as React_2 } from 'react';
|
|
44
|
-
import {
|
|
44
|
+
import { UiSkeleton } from '@gooddata/sdk-ui-kit';
|
|
45
45
|
import { UseCancelablePromiseStatus } from '@gooddata/sdk-ui';
|
|
46
46
|
import { WithIntlProps } from 'react-intl';
|
|
47
47
|
import { WrappedComponentProps } from 'react-intl';
|
|
@@ -129,10 +129,59 @@ export declare type DataSourcePermission = "USE" | "MANAGE";
|
|
|
129
129
|
*/
|
|
130
130
|
export declare type DataSourcePermissionSubject = "user" | "userGroup";
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Default implementation of the Notification component.
|
|
134
|
+
*
|
|
135
|
+
* @public
|
|
136
|
+
*/
|
|
137
|
+
export declare function DefaultNotification({ notification, markNotificationAsRead, onNotificationClick, }: INotificationComponentProps): React_2.JSX.Element;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Default implementation of the NotificationSkeletonItem component.
|
|
141
|
+
*
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
export declare const DefaultNotificationSkeletonItem: typeof UiSkeleton;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Default implementation of the NotificationsList component.
|
|
148
|
+
*
|
|
149
|
+
* @public
|
|
150
|
+
*/
|
|
151
|
+
export declare function DefaultNotificationsList({ Notification, NotificationsListEmptyState, NotificationsListErrorState, NotificationSkeletonItem, activeView, status, error, activeNotifications, markNotificationAsRead, onNotificationClick, hasNextPage, loadNextPage, itemHeight, itemsGap, itemPadding, skeletonItemsCount, maxListHeight, }: INotificationsListComponentProps): React_2.JSX.Element;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Default implementation of the NotificationsListEmptyState component.
|
|
155
|
+
*
|
|
156
|
+
* @public
|
|
157
|
+
*/
|
|
158
|
+
export declare function DefaultNotificationsListEmptyState({ activeView, }: INotificationsListEmptyStateComponentProps): React_2.JSX.Element;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Default implementation of the NotificationsListErrorState component.
|
|
162
|
+
*
|
|
163
|
+
* @public
|
|
164
|
+
*/
|
|
165
|
+
export declare function DefaultNotificationsListErrorState({ error }: INotificationsListErrorStateComponentProps): React_2.JSX.Element;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Default implementation of the NotificationsPanel component.
|
|
169
|
+
*
|
|
170
|
+
* @public
|
|
171
|
+
*/
|
|
172
|
+
export declare function DefaultNotificationsPanel({ NotificationsPanelHeader, NotificationsList, NotificationsListEmptyState, NotificationsListErrorState, Notification, NotificationSkeletonItem, activeView, changeActiveView, markNotificationAsRead, markAllNotificationsAsRead, unreadNotificationsCount, hasUnreadNotifications, activeNotifications, onNotificationClick, status, error, loadNextPage, hasNextPage, itemHeight, itemsGap, itemPadding, skeletonItemsCount, maxListHeight, }: INotificationsPanelComponentProps): React_2.JSX.Element;
|
|
173
|
+
|
|
132
174
|
/**
|
|
133
175
|
* @internal
|
|
134
176
|
*/
|
|
135
|
-
export declare function
|
|
177
|
+
export declare function DefaultNotificationsPanelButton({ buttonRef, isNotificationPanelOpen, toggleNotificationPanel, hasUnreadNotifications, }: INotificationsPanelButtonComponentProps): React_2.JSX.Element;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Default implementation of the notifications panel header.
|
|
181
|
+
*
|
|
182
|
+
* @public
|
|
183
|
+
*/
|
|
184
|
+
export declare function DefaultNotificationsPanelHeader({ activeView, changeActiveView, markAllNotificationsAsRead, hasUnreadNotifications, unreadNotificationsCount, }: INotificationsPanelHeaderComponentProps): React_2.JSX.Element;
|
|
136
185
|
|
|
137
186
|
/**
|
|
138
187
|
* @internal
|
|
@@ -540,78 +589,291 @@ export declare interface ILayoutDescriptor {
|
|
|
540
589
|
}
|
|
541
590
|
|
|
542
591
|
/**
|
|
543
|
-
*
|
|
592
|
+
* Props for the Notification component.
|
|
593
|
+
*
|
|
594
|
+
* @public
|
|
544
595
|
*/
|
|
545
596
|
export declare interface INotificationComponentProps {
|
|
597
|
+
/**
|
|
598
|
+
* Notification to display.
|
|
599
|
+
*/
|
|
546
600
|
notification: INotification;
|
|
547
|
-
|
|
601
|
+
/**
|
|
602
|
+
* Function to mark notification as read.
|
|
603
|
+
*/
|
|
604
|
+
markNotificationAsRead: (id: string) => void;
|
|
605
|
+
/**
|
|
606
|
+
* Function to handle notification click.
|
|
607
|
+
*/
|
|
548
608
|
onNotificationClick: (notification: INotification) => void;
|
|
549
609
|
}
|
|
550
610
|
|
|
551
611
|
/**
|
|
552
|
-
*
|
|
612
|
+
* Props for the NotificationSkeletonItem component.
|
|
613
|
+
*
|
|
614
|
+
* @public
|
|
615
|
+
*/
|
|
616
|
+
export declare interface INotificationSkeletonItemComponentProps {
|
|
617
|
+
/**
|
|
618
|
+
* Height of the skeleton item in pixels.
|
|
619
|
+
*/
|
|
620
|
+
itemHeight: number;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Props for the NotificationsList component.
|
|
625
|
+
*
|
|
626
|
+
* @public
|
|
553
627
|
*/
|
|
554
628
|
export declare interface INotificationsListComponentProps {
|
|
629
|
+
/**
|
|
630
|
+
* Component to render when the notifications list is empty.
|
|
631
|
+
*/
|
|
555
632
|
NotificationsListEmptyState: React_2.ComponentType<INotificationsListEmptyStateComponentProps>;
|
|
633
|
+
/**
|
|
634
|
+
* Component to render when the notifications list is in error state.
|
|
635
|
+
*/
|
|
556
636
|
NotificationsListErrorState: React_2.ComponentType<INotificationsListErrorStateComponentProps>;
|
|
637
|
+
/**
|
|
638
|
+
* Component to render each notification.
|
|
639
|
+
*/
|
|
557
640
|
Notification: React_2.ComponentType<INotificationComponentProps>;
|
|
641
|
+
/**
|
|
642
|
+
* Component to render each skeleton item.
|
|
643
|
+
*/
|
|
644
|
+
NotificationSkeletonItem: React_2.ComponentType<INotificationSkeletonItemComponentProps>;
|
|
645
|
+
/**
|
|
646
|
+
* Active view of the notifications list.
|
|
647
|
+
*/
|
|
558
648
|
activeView: INotificationsPanelView;
|
|
649
|
+
/**
|
|
650
|
+
* Status of the notifications list.
|
|
651
|
+
*/
|
|
559
652
|
status: UseCancelablePromiseStatus;
|
|
653
|
+
/**
|
|
654
|
+
* Error to display.
|
|
655
|
+
*/
|
|
560
656
|
error?: GoodDataSdkError;
|
|
561
|
-
|
|
657
|
+
/**
|
|
658
|
+
* Loaded notifications relevant to the active view.
|
|
659
|
+
*/
|
|
660
|
+
activeNotifications?: INotification[];
|
|
661
|
+
/**
|
|
662
|
+
* Callback function to mark notification as read.
|
|
663
|
+
*/
|
|
562
664
|
markNotificationAsRead: (notificationId: string) => Promise<void>;
|
|
665
|
+
/**
|
|
666
|
+
* Callback function to handle notification click.
|
|
667
|
+
*/
|
|
563
668
|
onNotificationClick: (notification: INotification) => void;
|
|
669
|
+
/**
|
|
670
|
+
* Whether there is a next page of notifications.
|
|
671
|
+
*/
|
|
564
672
|
hasNextPage: boolean;
|
|
673
|
+
/**
|
|
674
|
+
* Load next page of notifications.
|
|
675
|
+
*/
|
|
565
676
|
loadNextPage: () => void;
|
|
677
|
+
/**
|
|
678
|
+
* Height of the notification item in pixels.
|
|
679
|
+
*/
|
|
680
|
+
itemHeight: number;
|
|
681
|
+
/**
|
|
682
|
+
* Gap between notification items in pixels.
|
|
683
|
+
*/
|
|
684
|
+
itemsGap: number;
|
|
685
|
+
/**
|
|
686
|
+
* Padding of the notification item (from left/right) in pixels.
|
|
687
|
+
*/
|
|
688
|
+
itemPadding: number;
|
|
689
|
+
/**
|
|
690
|
+
* Number of skeleton items to render when loading notifications.
|
|
691
|
+
*/
|
|
692
|
+
skeletonItemsCount: number;
|
|
693
|
+
/**
|
|
694
|
+
* Maximum height of the notifications list in pixels.
|
|
695
|
+
*/
|
|
696
|
+
maxListHeight?: number;
|
|
566
697
|
}
|
|
567
698
|
|
|
568
699
|
/**
|
|
569
|
-
*
|
|
700
|
+
* Props for the NotificationsListEmptyState component.
|
|
701
|
+
*
|
|
702
|
+
* @public
|
|
570
703
|
*/
|
|
571
704
|
export declare interface INotificationsListEmptyStateComponentProps {
|
|
705
|
+
/**
|
|
706
|
+
* Active view of the notifications list.
|
|
707
|
+
*/
|
|
572
708
|
activeView: INotificationsPanelView;
|
|
573
709
|
}
|
|
574
710
|
|
|
575
711
|
/**
|
|
576
|
-
*
|
|
712
|
+
* Props for the NotificationsListErrorState component.
|
|
713
|
+
*
|
|
714
|
+
* @public
|
|
577
715
|
*/
|
|
578
716
|
export declare interface INotificationsListErrorStateComponentProps {
|
|
717
|
+
/**
|
|
718
|
+
* Error to display.
|
|
719
|
+
*/
|
|
579
720
|
error?: GoodDataSdkError;
|
|
580
721
|
}
|
|
581
722
|
|
|
582
723
|
/**
|
|
583
|
-
*
|
|
724
|
+
* OpenNotificationsPanelButton component props.
|
|
725
|
+
*
|
|
726
|
+
* @public
|
|
727
|
+
*/
|
|
728
|
+
export declare interface INotificationsPanelButtonComponentProps {
|
|
729
|
+
/**
|
|
730
|
+
* Ref to the button element - is required for proper alignment of the notification panel.
|
|
731
|
+
*/
|
|
732
|
+
buttonRef: React_2.RefObject<HTMLButtonElement>;
|
|
733
|
+
/**
|
|
734
|
+
* Opens the notification panel.
|
|
735
|
+
*/
|
|
736
|
+
openNotificationPanel: () => void;
|
|
737
|
+
/**
|
|
738
|
+
* Closes the notification panel.
|
|
739
|
+
*/
|
|
740
|
+
closeNotificationPanel: () => void;
|
|
741
|
+
/**
|
|
742
|
+
* Toggles the notification panel.
|
|
743
|
+
*/
|
|
744
|
+
toggleNotificationPanel: () => void;
|
|
745
|
+
/**
|
|
746
|
+
* Indicates whether the notification panel is open.
|
|
747
|
+
*/
|
|
748
|
+
isNotificationPanelOpen: boolean;
|
|
749
|
+
/**
|
|
750
|
+
* Indicates whether there are unread notifications.
|
|
751
|
+
*/
|
|
752
|
+
hasUnreadNotifications: boolean;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* NotificationsPanel component props.
|
|
757
|
+
*
|
|
758
|
+
* @public
|
|
584
759
|
*/
|
|
585
760
|
export declare interface INotificationsPanelComponentProps {
|
|
761
|
+
/**
|
|
762
|
+
* Custom notifications panel header component.
|
|
763
|
+
*/
|
|
586
764
|
NotificationsPanelHeader: React_2.ComponentType<INotificationsPanelHeaderComponentProps>;
|
|
765
|
+
/**
|
|
766
|
+
* Custom notifications list component.
|
|
767
|
+
*/
|
|
587
768
|
NotificationsList: React_2.ComponentType<INotificationsListComponentProps>;
|
|
769
|
+
/**
|
|
770
|
+
* Custom notifications list empty state component.
|
|
771
|
+
*/
|
|
588
772
|
NotificationsListEmptyState: React_2.ComponentType<INotificationsListEmptyStateComponentProps>;
|
|
773
|
+
/**
|
|
774
|
+
* Custom notifications list error state component.
|
|
775
|
+
*/
|
|
589
776
|
NotificationsListErrorState: React_2.ComponentType<INotificationsListErrorStateComponentProps>;
|
|
777
|
+
/**
|
|
778
|
+
* Custom notification component.
|
|
779
|
+
*/
|
|
590
780
|
Notification: React_2.ComponentType<INotificationComponentProps>;
|
|
781
|
+
/**
|
|
782
|
+
* Custom notification skeleton item component.
|
|
783
|
+
*/
|
|
784
|
+
NotificationSkeletonItem: React_2.ComponentType<INotificationSkeletonItemComponentProps>;
|
|
785
|
+
/**
|
|
786
|
+
* The callback to toggle the notifications panel.
|
|
787
|
+
*/
|
|
591
788
|
toggleNotificationsPanel: () => void;
|
|
789
|
+
/**
|
|
790
|
+
* The callback to open the notifications panel.
|
|
791
|
+
*/
|
|
592
792
|
openNotificationsPanel: () => void;
|
|
793
|
+
/**
|
|
794
|
+
* The callback to close the notifications panel.
|
|
795
|
+
*/
|
|
593
796
|
closeNotificationsPanel: () => void;
|
|
797
|
+
/**
|
|
798
|
+
* The currently active view of the notifications panel.
|
|
799
|
+
*/
|
|
594
800
|
activeView: INotificationsPanelView;
|
|
801
|
+
/**
|
|
802
|
+
* The callback to change the active view of the notifications panel.
|
|
803
|
+
*/
|
|
595
804
|
changeActiveView: (view: INotificationsPanelView) => void;
|
|
805
|
+
/**
|
|
806
|
+
* The callback to mark a notification as read.
|
|
807
|
+
*/
|
|
596
808
|
markNotificationAsRead: (notificationId: string) => Promise<void>;
|
|
809
|
+
/**
|
|
810
|
+
* The callback to mark all notifications as read.
|
|
811
|
+
*/
|
|
597
812
|
markAllNotificationsAsRead: () => Promise<void>;
|
|
813
|
+
/**
|
|
814
|
+
* The number of unread notifications.
|
|
815
|
+
*/
|
|
598
816
|
unreadNotificationsCount: number;
|
|
817
|
+
/**
|
|
818
|
+
* Indicates if there are unread notifications.
|
|
819
|
+
*/
|
|
820
|
+
hasUnreadNotifications: boolean;
|
|
821
|
+
/**
|
|
822
|
+
* Loaded notifications, relevant for the currently active view.
|
|
823
|
+
*/
|
|
599
824
|
activeNotifications: INotification[];
|
|
825
|
+
/**
|
|
826
|
+
* The callback to handle a notification click.
|
|
827
|
+
*/
|
|
600
828
|
onNotificationClick: (notification: INotification) => void;
|
|
829
|
+
/**
|
|
830
|
+
* The status of the notifications loading.
|
|
831
|
+
*/
|
|
601
832
|
status: UseCancelablePromiseStatus;
|
|
833
|
+
/**
|
|
834
|
+
* The error that occurred while loading notifications.
|
|
835
|
+
*/
|
|
602
836
|
error?: GoodDataSdkError;
|
|
837
|
+
/**
|
|
838
|
+
* The callback to load the next page of notifications.
|
|
839
|
+
*/
|
|
603
840
|
loadNextPage: () => void;
|
|
841
|
+
/**
|
|
842
|
+
* Indicates if there is a next page of notifications.
|
|
843
|
+
*/
|
|
604
844
|
hasNextPage: boolean;
|
|
845
|
+
/**
|
|
846
|
+
* The height of the notification item in pixels.
|
|
847
|
+
*/
|
|
848
|
+
itemHeight: number;
|
|
849
|
+
/**
|
|
850
|
+
* Gap between notification items in pixels.
|
|
851
|
+
*/
|
|
852
|
+
itemsGap: number;
|
|
853
|
+
/**
|
|
854
|
+
* Padding of the notification item (from left/right) in pixels.
|
|
855
|
+
*/
|
|
856
|
+
itemPadding: number;
|
|
857
|
+
/**
|
|
858
|
+
* Number of skeleton items to render when loading notifications.
|
|
859
|
+
*/
|
|
860
|
+
skeletonItemsCount: number;
|
|
861
|
+
/**
|
|
862
|
+
* Maximum height of the notifications list in pixels.
|
|
863
|
+
*/
|
|
864
|
+
maxListHeight?: number;
|
|
605
865
|
}
|
|
606
866
|
|
|
607
867
|
/**
|
|
608
|
-
* @
|
|
868
|
+
* @public
|
|
609
869
|
*/
|
|
610
870
|
export declare interface INotificationsPanelCustomComponentsProps {
|
|
611
871
|
/**
|
|
612
872
|
* Custom open notifications panel button component.
|
|
873
|
+
*
|
|
874
|
+
* - Required if renderInline is not enabled.
|
|
613
875
|
*/
|
|
614
|
-
|
|
876
|
+
NotificationsPanelButton?: React_2.ComponentType<INotificationsPanelButtonComponentProps>;
|
|
615
877
|
/**
|
|
616
878
|
* Custom notifications panel component.
|
|
617
879
|
*/
|
|
@@ -636,10 +898,16 @@ export declare interface INotificationsPanelCustomComponentsProps {
|
|
|
636
898
|
* Custom notification component.
|
|
637
899
|
*/
|
|
638
900
|
Notification?: React_2.ComponentType<INotificationComponentProps>;
|
|
901
|
+
/**
|
|
902
|
+
* Custom notification skeleton item component.
|
|
903
|
+
*/
|
|
904
|
+
NotificationSkeletonItem?: React_2.ComponentType<INotificationSkeletonItemComponentProps>;
|
|
639
905
|
}
|
|
640
906
|
|
|
641
907
|
/**
|
|
642
|
-
*
|
|
908
|
+
* Props for the NotificationsPanelHeader component.
|
|
909
|
+
*
|
|
910
|
+
* @public
|
|
643
911
|
*/
|
|
644
912
|
export declare interface INotificationsPanelHeaderComponentProps {
|
|
645
913
|
/**
|
|
@@ -661,39 +929,98 @@ export declare interface INotificationsPanelHeaderComponentProps {
|
|
|
661
929
|
/**
|
|
662
930
|
* The callback to mark all notifications as read.
|
|
663
931
|
*/
|
|
664
|
-
|
|
932
|
+
markAllNotificationsAsRead: () => void;
|
|
665
933
|
}
|
|
666
934
|
|
|
667
935
|
/**
|
|
668
|
-
* @
|
|
936
|
+
* @public
|
|
669
937
|
*/
|
|
670
938
|
export declare interface INotificationsPanelProps extends INotificationsPanelCustomComponentsProps {
|
|
939
|
+
/**
|
|
940
|
+
* Locale to use.
|
|
941
|
+
*/
|
|
942
|
+
locale?: ILocale;
|
|
671
943
|
/**
|
|
672
944
|
* Backend to use.
|
|
945
|
+
*
|
|
946
|
+
* - If not defined, the backend from the BackendProvider context will be used.
|
|
673
947
|
*/
|
|
674
948
|
backend?: IAnalyticalBackend;
|
|
675
949
|
/**
|
|
676
950
|
* Workspace ID to use.
|
|
951
|
+
*
|
|
952
|
+
* - If not defined, the workspace ID from the WorkspaceProvider context will be used.
|
|
953
|
+
* - If workspace is not defined and there is no WorkspaceProvider, notifications will be loaded from all workspaces.
|
|
677
954
|
*/
|
|
678
955
|
workspace?: string;
|
|
956
|
+
/**
|
|
957
|
+
* Enable inline rendering of the notifications panel
|
|
958
|
+
*
|
|
959
|
+
* - Default: false
|
|
960
|
+
* - If enabled, NotificationsPanelButton won't be rendered, and NotificationsPanel won't be rendered inside modal
|
|
961
|
+
* - This is useful when you want to render notifications panel in a custom modal.
|
|
962
|
+
*/
|
|
963
|
+
renderInline?: boolean;
|
|
679
964
|
/**
|
|
680
965
|
* Refresh interval in milliseconds.
|
|
681
|
-
*
|
|
682
|
-
*
|
|
966
|
+
*
|
|
967
|
+
* - Default: 600000 (10 minutes)
|
|
968
|
+
* - If set to 0, notifications won't be refreshed automatically.
|
|
683
969
|
*/
|
|
684
970
|
refreshInterval?: number;
|
|
685
971
|
/**
|
|
686
|
-
*
|
|
972
|
+
* Number of notifications to load per page.
|
|
973
|
+
*
|
|
974
|
+
* - Default: 50
|
|
687
975
|
*/
|
|
688
|
-
|
|
976
|
+
itemsPerPage?: number;
|
|
689
977
|
/**
|
|
690
|
-
*
|
|
978
|
+
* Number of skeleton items to render when loading notifications.
|
|
979
|
+
*
|
|
980
|
+
* - Default: 5
|
|
691
981
|
*/
|
|
692
|
-
|
|
982
|
+
skeletonItemsCount?: number;
|
|
983
|
+
/**
|
|
984
|
+
* Height of the item in notifications list in pixels.
|
|
985
|
+
*
|
|
986
|
+
* - Default: 52
|
|
987
|
+
*/
|
|
988
|
+
itemHeight?: number;
|
|
989
|
+
/**
|
|
990
|
+
* Optionally override max width of the notifications panel.
|
|
991
|
+
*
|
|
992
|
+
* - Does not have effect when renderInline is true - inline rendering always fills the parent container.
|
|
993
|
+
*/
|
|
994
|
+
maxWidth?: number | string;
|
|
995
|
+
/**
|
|
996
|
+
* Maximum height of the notifications list in pixels.
|
|
997
|
+
*
|
|
998
|
+
* - Default: 527
|
|
999
|
+
* - Does not have effect when renderInline is true - inline rendering always fills the parent container.
|
|
1000
|
+
*/
|
|
1001
|
+
maxListHeight?: number;
|
|
1002
|
+
/**
|
|
1003
|
+
* Gap between notification items in the list in pixels.
|
|
1004
|
+
*
|
|
1005
|
+
* - Default: 10
|
|
1006
|
+
*/
|
|
1007
|
+
itemsGap?: number;
|
|
1008
|
+
/**
|
|
1009
|
+
* Padding of the notification item (from left and right) in pixels.
|
|
1010
|
+
*
|
|
1011
|
+
* - Default: 15
|
|
1012
|
+
*/
|
|
1013
|
+
itemPadding?: number;
|
|
1014
|
+
/**
|
|
1015
|
+
* Callback for notification click.
|
|
1016
|
+
*/
|
|
1017
|
+
onNotificationClick?: (notification: INotification) => void;
|
|
693
1018
|
}
|
|
694
1019
|
|
|
695
1020
|
/**
|
|
696
|
-
*
|
|
1021
|
+
* View mode of the notifications panel.
|
|
1022
|
+
*
|
|
1023
|
+
* @public
|
|
697
1024
|
*/
|
|
698
1025
|
export declare type INotificationsPanelView = "all" | "unread";
|
|
699
1026
|
|
|
@@ -735,36 +1062,6 @@ export declare class InsightView extends React_2.Component<IInsightViewProps> {
|
|
|
735
1062
|
render(): React_2.JSX.Element;
|
|
736
1063
|
}
|
|
737
1064
|
|
|
738
|
-
/**
|
|
739
|
-
* @alpha
|
|
740
|
-
*/
|
|
741
|
-
export declare interface IOpenNotificationsPanelButtonComponentProps {
|
|
742
|
-
/**
|
|
743
|
-
* Ref to the button element - is required for proper alignment of the notification panel.
|
|
744
|
-
*/
|
|
745
|
-
buttonRef: RefObject<HTMLElement | null>;
|
|
746
|
-
/**
|
|
747
|
-
* Opens the notification panel.
|
|
748
|
-
*/
|
|
749
|
-
openNotificationPanel: () => void;
|
|
750
|
-
/**
|
|
751
|
-
* Closes the notification panel.
|
|
752
|
-
*/
|
|
753
|
-
closeNotificationPanel: () => void;
|
|
754
|
-
/**
|
|
755
|
-
* Toggles the notification panel.
|
|
756
|
-
*/
|
|
757
|
-
toggleNotificationPanel: () => void;
|
|
758
|
-
/**
|
|
759
|
-
* Indicates whether the notification panel is open.
|
|
760
|
-
*/
|
|
761
|
-
isNotificationPanelOpen: boolean;
|
|
762
|
-
/**
|
|
763
|
-
* Indicates whether there are unread notifications.
|
|
764
|
-
*/
|
|
765
|
-
hasUnreadNotifications: boolean;
|
|
766
|
-
}
|
|
767
|
-
|
|
768
1065
|
/**
|
|
769
1066
|
* Type-guard testing whether the provided object is an instance of {@link IDrillDownDefinition}.
|
|
770
1067
|
* @beta
|
|
@@ -817,6 +1114,33 @@ export declare type ISizeInfoDefault = ISizeInfo & {
|
|
|
817
1114
|
default: number;
|
|
818
1115
|
};
|
|
819
1116
|
|
|
1117
|
+
/**
|
|
1118
|
+
* Hook for fetching all and unread notifications.
|
|
1119
|
+
*
|
|
1120
|
+
* @public
|
|
1121
|
+
*/
|
|
1122
|
+
export declare interface IUseNotificationsProps {
|
|
1123
|
+
/**
|
|
1124
|
+
* Workspace to fetch notifications from.
|
|
1125
|
+
*
|
|
1126
|
+
* - If not provided, the workspace from WorkspaceProvider is used.
|
|
1127
|
+
* - If not provided and there is no WorkspaceProvider, notifications will be loaded from all workspaces.
|
|
1128
|
+
*/
|
|
1129
|
+
workspace?: string;
|
|
1130
|
+
/**
|
|
1131
|
+
* Backend to fetch notifications from.
|
|
1132
|
+
*/
|
|
1133
|
+
backend?: IAnalyticalBackend;
|
|
1134
|
+
/**
|
|
1135
|
+
* Refresh interval in milliseconds.
|
|
1136
|
+
*/
|
|
1137
|
+
refreshInterval: number;
|
|
1138
|
+
/**
|
|
1139
|
+
* Number of items per page.
|
|
1140
|
+
*/
|
|
1141
|
+
itemsPerPage: number;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
820
1144
|
/**
|
|
821
1145
|
* @internal
|
|
822
1146
|
*/
|
|
@@ -918,7 +1242,7 @@ export declare type LayoutType = "fluid";
|
|
|
918
1242
|
export declare const MIN_VISUALIZATION_WIDTH = 2;
|
|
919
1243
|
|
|
920
1244
|
/**
|
|
921
|
-
* @
|
|
1245
|
+
* @public
|
|
922
1246
|
*/
|
|
923
1247
|
export declare function NotificationsPanel(props: INotificationsPanelProps): React_2.JSX.Element;
|
|
924
1248
|
|
|
@@ -985,6 +1309,27 @@ export declare type TelemetryEvent = "multiple-users-deleted" | "multiple-groups
|
|
|
985
1309
|
*/
|
|
986
1310
|
export declare type TrackEventCallback = (event: TelemetryEvent) => void;
|
|
987
1311
|
|
|
1312
|
+
/**
|
|
1313
|
+
* @public
|
|
1314
|
+
*/
|
|
1315
|
+
export declare function useNotifications({ workspace, refreshInterval, itemsPerPage }: IUseNotificationsProps): {
|
|
1316
|
+
notifications: INotification[];
|
|
1317
|
+
notificationsStatus: "error" | "loading" | "pending" | "success";
|
|
1318
|
+
notificationsError: GoodDataSdkError;
|
|
1319
|
+
notificationsHasNextPage: boolean;
|
|
1320
|
+
notificationsLoadNextPage: () => void;
|
|
1321
|
+
notificationsReset: () => void;
|
|
1322
|
+
unreadNotifications: INotification[];
|
|
1323
|
+
unreadNotificationsStatus: "error" | "loading" | "pending" | "success";
|
|
1324
|
+
unreadNotificationsError: GoodDataSdkError;
|
|
1325
|
+
unreadNotificationsHasNextPage: boolean;
|
|
1326
|
+
unreadNotificationsLoadNextPage: () => void;
|
|
1327
|
+
unreadNotificationsReset: () => void;
|
|
1328
|
+
unreadNotificationsCount: number;
|
|
1329
|
+
markNotificationAsRead: (notificationId: string) => Promise<void>;
|
|
1330
|
+
markAllNotificationsAsRead: () => Promise<void>;
|
|
1331
|
+
};
|
|
1332
|
+
|
|
988
1333
|
/**
|
|
989
1334
|
* @internal
|
|
990
1335
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-ext",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.19.0-alpha.0",
|
|
4
4
|
"description": "GoodData.UI SDK - Extensions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"NOTICE"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@tanstack/react-virtual": "^3.11.1",
|
|
39
38
|
"classnames": "^2.3.1",
|
|
40
39
|
"codemirror": "^5.54.0",
|
|
41
40
|
"date-fns": "^2.22.1",
|
|
@@ -56,19 +55,19 @@
|
|
|
56
55
|
"ts-invariant": "^0.7.5",
|
|
57
56
|
"tslib": "^2.5.0",
|
|
58
57
|
"uuid": "^8.3.2",
|
|
59
|
-
"@gooddata/sdk-backend-base": "10.
|
|
60
|
-
"@gooddata/sdk-embedding": "10.
|
|
61
|
-
"@gooddata/sdk-backend-spi": "10.
|
|
62
|
-
"@gooddata/sdk-
|
|
63
|
-
"@gooddata/sdk-
|
|
64
|
-
"@gooddata/sdk-ui-filters": "10.
|
|
65
|
-
"@gooddata/sdk-ui
|
|
66
|
-
"@gooddata/sdk-ui-
|
|
67
|
-
"@gooddata/sdk-ui-
|
|
68
|
-
"@gooddata/sdk-ui-pivot": "10.
|
|
69
|
-
"@gooddata/sdk-ui-theme-provider": "10.
|
|
70
|
-
"@gooddata/sdk-ui-vis-commons": "10.
|
|
71
|
-
"@gooddata/util": "10.
|
|
58
|
+
"@gooddata/sdk-backend-base": "10.19.0-alpha.0",
|
|
59
|
+
"@gooddata/sdk-embedding": "10.19.0-alpha.0",
|
|
60
|
+
"@gooddata/sdk-backend-spi": "10.19.0-alpha.0",
|
|
61
|
+
"@gooddata/sdk-model": "10.19.0-alpha.0",
|
|
62
|
+
"@gooddata/sdk-ui-charts": "10.19.0-alpha.0",
|
|
63
|
+
"@gooddata/sdk-ui-filters": "10.19.0-alpha.0",
|
|
64
|
+
"@gooddata/sdk-ui": "10.19.0-alpha.0",
|
|
65
|
+
"@gooddata/sdk-ui-geo": "10.19.0-alpha.0",
|
|
66
|
+
"@gooddata/sdk-ui-kit": "10.19.0-alpha.0",
|
|
67
|
+
"@gooddata/sdk-ui-pivot": "10.19.0-alpha.0",
|
|
68
|
+
"@gooddata/sdk-ui-theme-provider": "10.19.0-alpha.0",
|
|
69
|
+
"@gooddata/sdk-ui-vis-commons": "10.19.0-alpha.0",
|
|
70
|
+
"@gooddata/util": "10.19.0-alpha.0"
|
|
72
71
|
},
|
|
73
72
|
"peerDependencies": {
|
|
74
73
|
"react": "^16.10.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -125,9 +124,9 @@
|
|
|
125
124
|
"@types/json-stable-stringify": "^1.0.32",
|
|
126
125
|
"@types/codemirror": "^5.60.7",
|
|
127
126
|
"@types/js-yaml": "^4.0.9",
|
|
128
|
-
"@gooddata/
|
|
129
|
-
"@gooddata/
|
|
130
|
-
"@gooddata/sdk-backend-mockingbird": "10.
|
|
127
|
+
"@gooddata/reference-workspace": "10.19.0-alpha.0",
|
|
128
|
+
"@gooddata/i18n-toolkit": "10.19.0-alpha.0",
|
|
129
|
+
"@gooddata/sdk-backend-mockingbird": "10.19.0-alpha.0"
|
|
131
130
|
},
|
|
132
131
|
"scripts": {
|
|
133
132
|
"clean": "rm -rf ci dist esm coverage *.log styles/css tsconfig.tsbuildinfo",
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
// (C) 2024 GoodData Corporation
|
|
1
|
+
// (C) 2024-2025 GoodData Corporation
|
|
2
2
|
|
|
3
3
|
.gd-ui-ext-notifications-panel {
|
|
4
4
|
font-family: var(--gd-font-family);
|
|
5
|
+
font-size: 12px;
|
|
6
|
+
line-height: 14px;
|
|
7
|
+
|
|
5
8
|
background-color: var(--gd-palette-complementary-0);
|
|
6
9
|
|
|
7
10
|
box-shadow: 0 2px 10px 0 var(--gd-shadow-color);
|
|
@@ -9,10 +12,10 @@
|
|
|
9
12
|
display: flex;
|
|
10
13
|
flex-direction: column;
|
|
11
14
|
|
|
12
|
-
padding-top:
|
|
15
|
+
padding-top: 10px;
|
|
13
16
|
|
|
14
|
-
width:
|
|
15
|
-
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
16
19
|
|
|
17
20
|
overflow: hidden;
|
|
18
21
|
}
|