@notificationapi/react 1.6.2 → 1.8.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/dist/assets/Badge.js +4 -3
- package/dist/assets/Box.js +26 -24
- package/dist/assets/Button.js +20 -18
- package/dist/assets/ButtonBase.js +193 -185
- package/dist/assets/DefaultPropsProvider.js +416 -4199
- package/dist/assets/DefaultPropsProvider2.js +992 -0
- package/dist/assets/Divider.js +2 -1
- package/dist/assets/GlobalStyles.js +23 -0
- package/dist/assets/Grow.js +87 -92
- package/dist/assets/IconButton.js +8 -7
- package/dist/assets/List.js +12 -11
- package/dist/assets/Modal.js +18 -17
- package/dist/assets/Notification.js +787 -770
- package/dist/assets/Paper.js +6 -6
- package/dist/assets/Popover.js +38 -37
- package/dist/assets/Portal.js +38 -48
- package/dist/assets/Stack.js +32 -30
- package/dist/assets/Typography.js +84 -97
- package/dist/assets/createSvgIcon.js +25 -24
- package/dist/assets/createTheme.js +2828 -0
- package/dist/assets/dividerClasses.js +16 -15
- package/dist/assets/exactProp.js +13 -0
- package/dist/assets/index.js +19 -148
- package/dist/assets/index2.js +151 -0
- package/dist/assets/useTheme.js +6 -7
- package/dist/assets/{useTheme2.js → useThemeWithoutDefault.js} +63 -67
- package/dist/assets/utils.js +2 -2
- package/dist/components/Notifications/DefaultEmpty.d.ts +0 -1
- package/dist/components/Notifications/Inbox.d.ts +0 -1
- package/dist/components/Notifications/Inbox.js +592 -582
- package/dist/components/Notifications/InboxHeader.js +31 -30
- package/dist/components/Notifications/Notification.d.ts +0 -1
- package/dist/components/Notifications/Notification.js +4 -2
- package/dist/components/Notifications/NotificationCounter.d.ts +0 -1
- package/dist/components/Notifications/NotificationFeed.d.ts +0 -1
- package/dist/components/Notifications/NotificationFeed.js +40 -32
- package/dist/components/Notifications/NotificationLauncher.d.ts +0 -1
- package/dist/components/Notifications/NotificationLauncher.js +90 -64
- package/dist/components/Notifications/NotificationPopup.d.ts +0 -1
- package/dist/components/Notifications/NotificationPopup.js +76 -65
- package/dist/components/Notifications/UnreadBadge.d.ts +0 -1
- package/dist/components/Preferences/NotificationPreferencesInline.js +57 -39
- package/dist/components/Preferences/NotificationPreferencesPopup.js +111 -99
- package/dist/components/Preferences/PreferenceInput.d.ts +0 -1
- package/dist/components/Preferences/PreferenceInput.js +427 -414
- package/dist/components/Preferences/Preferences.js +329 -278
- package/dist/components/Preferences/channelUtils.d.ts +0 -1
- package/dist/components/Provider/context.d.ts +0 -1
- package/dist/components/Provider/index.d.ts +4 -2
- package/dist/components/Provider/index.js +986 -375
- package/dist/components/Slack/SlackConnect.js +8 -7
- package/dist/components/WebPush/WebPushOptInMessage.d.ts +0 -1
- package/dist/main.d.ts +2 -1
- package/dist/main.js +6 -3
- package/dist/utils/theme.d.ts +17 -0
- package/dist/utils/theme.js +104 -0
- package/package.json +7 -3
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { NotificationAPIClientSDK } from '@notificationapi/core';
|
|
2
2
|
import { BaseDeliveryOptions, Channels, DeliveryOptionsForEmail, DeliveryOptionsForInappWeb, GetPreferencesResponse, InAppNotification, UserAccountMetadata } from '@notificationapi/core/dist/interfaces';
|
|
3
|
-
|
|
4
3
|
export type Context = {
|
|
5
4
|
notifications?: InAppNotification[];
|
|
6
5
|
preferences?: GetPreferencesResponse;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { NotificationAPIClientSDK } from '@notificationapi/core';
|
|
3
|
-
import { User, API_REGION, WS_REGION } from '@notificationapi/core/dist/interfaces';
|
|
3
|
+
import { InAppNotification, User, API_REGION, WS_REGION } from '@notificationapi/core/dist/interfaces';
|
|
4
4
|
import { Context } from './context';
|
|
5
|
-
|
|
5
|
+
import { NotificationAPITheme } from '../../utils/theme';
|
|
6
6
|
type Props = ({
|
|
7
7
|
userId: string;
|
|
8
8
|
} | {
|
|
@@ -20,6 +20,8 @@ type Props = ({
|
|
|
20
20
|
webPushOptInMessage?: 'AUTOMATIC' | boolean;
|
|
21
21
|
customServiceWorkerPath?: string;
|
|
22
22
|
debug?: boolean;
|
|
23
|
+
onNewNotifications?: (notifications: InAppNotification[]) => void;
|
|
24
|
+
theme?: NotificationAPITheme;
|
|
23
25
|
};
|
|
24
26
|
export declare const NotificationAPIProvider: React.FunctionComponent<PropsWithChildren<Props>> & {
|
|
25
27
|
useNotificationAPIContext: typeof useNotificationAPIContext;
|