@adobe/react-native-aepmessaging 7.2.1 → 7.4.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/RCTAEPMessaging.podspec +1 -1
- package/README.md +145 -16
- package/android/src/main/java/com/adobe/marketing/mobile/reactnative/messaging/RCTAEPMessagingConstants.java +3 -0
- package/android/src/main/java/com/adobe/marketing/mobile/reactnative/messaging/RCTAEPMessagingModule.java +103 -33
- package/babel.config.js +3 -0
- package/dist/module/Messaging.js +334 -0
- package/dist/module/Messaging.js.map +1 -0
- package/dist/module/index.js +30 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/models/ContentCard.js +24 -0
- package/dist/module/models/ContentCard.js.map +1 -0
- package/dist/{models → module/models}/HTMLProposition.js +8 -9
- package/dist/module/models/HTMLProposition.js.map +1 -0
- package/dist/module/models/InAppMessage.js +4 -0
- package/dist/module/models/InAppMessage.js.map +1 -0
- package/dist/module/models/JSONProposition.js +22 -0
- package/dist/module/models/JSONProposition.js.map +1 -0
- package/dist/module/models/Message.js +182 -0
- package/dist/module/models/Message.js.map +1 -0
- package/dist/module/models/MessagingDelegate.js +4 -0
- package/dist/module/models/MessagingDelegate.js.map +1 -0
- package/dist/module/models/MessagingEdgeEventType.js +24 -0
- package/dist/module/models/MessagingEdgeEventType.js.map +1 -0
- package/dist/module/models/MessagingProposition.js +57 -0
- package/dist/module/models/MessagingProposition.js.map +1 -0
- package/dist/module/models/MessagingPropositionItem.js +4 -0
- package/dist/module/models/MessagingPropositionItem.js.map +1 -0
- package/dist/module/models/PersonalizationSchema.js +26 -0
- package/dist/module/models/PersonalizationSchema.js.map +1 -0
- package/dist/module/models/PropositionItem.js +113 -0
- package/dist/module/models/PropositionItem.js.map +1 -0
- package/dist/module/models/ScopeDetails.js +2 -0
- package/dist/module/models/ScopeDetails.js.map +1 -0
- package/dist/{models/JSONProposition.js → module/models/index.js} +14 -12
- package/dist/module/models/index.js.map +1 -0
- package/dist/module/ui/components/Button/Button.js +57 -0
- package/dist/module/ui/components/Button/Button.js.map +1 -0
- package/dist/module/ui/components/Button/Button.spec.js +476 -0
- package/dist/module/ui/components/Button/Button.spec.js.map +1 -0
- package/dist/module/ui/components/ContentCardView/ContentCardView.js +257 -0
- package/dist/module/ui/components/ContentCardView/ContentCardView.js.map +1 -0
- package/dist/module/ui/components/ContentCardView/ContentCardView.spec.js +363 -0
- package/dist/module/ui/components/ContentCardView/ContentCardView.spec.js.map +1 -0
- package/dist/module/ui/components/DismissButton/DismissButton.js +70 -0
- package/dist/module/ui/components/DismissButton/DismissButton.js.map +1 -0
- package/dist/module/ui/components/DismissButton/DismissButton.spec.js +279 -0
- package/dist/module/ui/components/DismissButton/DismissButton.spec.js.map +1 -0
- package/dist/module/ui/components/FullScreenCenterView/FullScreenCenterView.js +34 -0
- package/dist/module/ui/components/FullScreenCenterView/FullScreenCenterView.js.map +1 -0
- package/dist/module/ui/components/Inbox/EmptyState.js +64 -0
- package/dist/module/ui/components/Inbox/EmptyState.js.map +1 -0
- package/dist/module/ui/components/Inbox/Inbox.js +235 -0
- package/dist/module/ui/components/Inbox/Inbox.js.map +1 -0
- package/dist/module/ui/components/Inbox/Inbox.spec.js +847 -0
- package/dist/module/ui/components/Inbox/Inbox.spec.js.map +1 -0
- package/dist/module/ui/components/Pagination/Pagination.js +176 -0
- package/dist/module/ui/components/Pagination/Pagination.js.map +1 -0
- package/dist/module/ui/components/Pagination/Pagination.spec.js +193 -0
- package/dist/module/ui/components/Pagination/Pagination.spec.js.map +1 -0
- package/dist/module/ui/components/UnreadIcon/UnreadIcon.js +184 -0
- package/dist/module/ui/components/UnreadIcon/UnreadIcon.js.map +1 -0
- package/dist/module/ui/components/UnreadIcon/UnreadIcon.spec.js +815 -0
- package/dist/module/ui/components/UnreadIcon/UnreadIcon.spec.js.map +1 -0
- package/dist/{models/ContentCard.js → module/ui/components/index.js} +12 -12
- package/dist/module/ui/components/index.js.map +1 -0
- package/dist/module/ui/hooks/index.js +18 -0
- package/dist/module/ui/hooks/index.js.map +1 -0
- package/dist/module/ui/hooks/useAspectRatio.js +33 -0
- package/dist/module/ui/hooks/useAspectRatio.js.map +1 -0
- package/dist/module/ui/hooks/useAspectRatio.spec.js +65 -0
- package/dist/module/ui/hooks/useAspectRatio.spec.js.map +1 -0
- package/dist/module/ui/hooks/useContentCardUI.js +51 -0
- package/dist/module/ui/hooks/useContentCardUI.js.map +1 -0
- package/dist/module/ui/hooks/useContentCardUI.spec.js +85 -0
- package/dist/module/ui/hooks/useContentCardUI.spec.js.map +1 -0
- package/dist/module/ui/hooks/useInbox.js +49 -0
- package/dist/module/ui/hooks/useInbox.js.map +1 -0
- package/dist/module/ui/hooks/useInbox.spec.js +93 -0
- package/dist/module/ui/hooks/useInbox.spec.js.map +1 -0
- package/dist/module/ui/hooks/useInboxSettings.js +26 -0
- package/dist/module/ui/hooks/useInboxSettings.js.map +1 -0
- package/dist/module/ui/hooks/useInboxSettings.spec.js +50 -0
- package/dist/module/ui/hooks/useInboxSettings.spec.js.map +1 -0
- package/dist/module/ui/index.js +10 -0
- package/dist/module/ui/index.js.map +1 -0
- package/dist/module/ui/providers/InboxProvider.js +27 -0
- package/dist/module/ui/providers/InboxProvider.js.map +1 -0
- package/dist/module/ui/theme/Theme.js +2 -0
- package/dist/module/ui/theme/Theme.js.map +1 -0
- package/dist/module/ui/theme/ThemeProvider.js +112 -0
- package/dist/module/ui/theme/ThemeProvider.js.map +1 -0
- package/dist/{models/InAppMessage.js → module/ui/theme/index.js} +6 -3
- package/dist/module/ui/theme/index.js.map +1 -0
- package/dist/module/ui/types/ContentViewEvent.js +2 -0
- package/dist/module/ui/types/ContentViewEvent.js.map +1 -0
- package/dist/module/ui/types/Templates.js +26 -0
- package/dist/module/ui/types/Templates.js.map +1 -0
- package/dist/{models/ScopeDetails.js → module/ui/types/index.js} +6 -3
- package/dist/module/ui/types/index.js.map +1 -0
- package/dist/module/ui/utils/generateCardHash.js +50 -0
- package/dist/module/ui/utils/generateCardHash.js.map +1 -0
- package/dist/module/ui/utils/generateCardHash.spec.js +103 -0
- package/dist/module/ui/utils/generateCardHash.spec.js.map +1 -0
- package/dist/module/ui/utils/inboxStorage.js +65 -0
- package/dist/module/ui/utils/inboxStorage.js.map +1 -0
- package/dist/module/ui/utils/inboxStorage.spec.js +123 -0
- package/dist/module/ui/utils/inboxStorage.spec.js.map +1 -0
- package/dist/module/ui/utils/index.js +5 -0
- package/dist/module/ui/utils/index.js.map +1 -0
- package/dist/{Messaging.d.ts → typescript/Messaging.d.ts} +23 -7
- package/dist/typescript/Messaging.d.ts.map +1 -0
- package/dist/{index.d.ts → typescript/index.d.ts} +4 -2
- package/dist/typescript/index.d.ts.map +1 -0
- package/dist/typescript/models/ContentCard.d.ts +57 -0
- package/dist/typescript/models/ContentCard.d.ts.map +1 -0
- package/dist/{models → typescript/models}/HTMLProposition.d.ts +1 -0
- package/dist/typescript/models/HTMLProposition.d.ts.map +1 -0
- package/dist/{models → typescript/models}/InAppMessage.d.ts +1 -0
- package/dist/typescript/models/InAppMessage.d.ts.map +1 -0
- package/dist/{models → typescript/models}/JSONProposition.d.ts +1 -0
- package/dist/typescript/models/JSONProposition.d.ts.map +1 -0
- package/dist/{models → typescript/models}/Message.d.ts +14 -0
- package/dist/typescript/models/Message.d.ts.map +1 -0
- package/dist/{models → typescript/models}/MessagingDelegate.d.ts +1 -0
- package/dist/typescript/models/MessagingDelegate.d.ts.map +1 -0
- package/dist/{models → typescript/models}/MessagingEdgeEventType.d.ts +1 -0
- package/dist/typescript/models/MessagingEdgeEventType.d.ts.map +1 -0
- package/dist/{models → typescript/models}/MessagingProposition.d.ts +1 -0
- package/dist/typescript/models/MessagingProposition.d.ts.map +1 -0
- package/dist/{models → typescript/models}/MessagingPropositionItem.d.ts +1 -0
- package/dist/typescript/models/MessagingPropositionItem.d.ts.map +1 -0
- package/dist/{models → typescript/models}/PersonalizationSchema.d.ts +2 -0
- package/dist/typescript/models/PersonalizationSchema.d.ts.map +1 -0
- package/dist/{models → typescript/models}/PropositionItem.d.ts +1 -0
- package/dist/typescript/models/PropositionItem.d.ts.map +1 -0
- package/dist/{models → typescript/models}/ScopeDetails.d.ts +1 -0
- package/dist/typescript/models/ScopeDetails.d.ts.map +1 -0
- package/dist/typescript/models/index.d.ts +11 -0
- package/dist/typescript/models/index.d.ts.map +1 -0
- package/dist/typescript/ui/components/Button/Button.d.ts +14 -0
- package/dist/typescript/ui/components/Button/Button.d.ts.map +1 -0
- package/dist/typescript/ui/components/Button/Button.spec.d.ts +2 -0
- package/dist/typescript/ui/components/Button/Button.spec.d.ts.map +1 -0
- package/dist/typescript/ui/components/ContentCardView/ContentCardView.d.ts +39 -0
- package/dist/typescript/ui/components/ContentCardView/ContentCardView.d.ts.map +1 -0
- package/dist/typescript/ui/components/ContentCardView/ContentCardView.spec.d.ts +2 -0
- package/dist/typescript/ui/components/ContentCardView/ContentCardView.spec.d.ts.map +1 -0
- package/dist/typescript/ui/components/DismissButton/DismissButton.d.ts +13 -0
- package/dist/typescript/ui/components/DismissButton/DismissButton.d.ts.map +1 -0
- package/dist/typescript/ui/components/DismissButton/DismissButton.spec.d.ts +2 -0
- package/dist/typescript/ui/components/DismissButton/DismissButton.spec.d.ts.map +1 -0
- package/dist/typescript/ui/components/FullScreenCenterView/FullScreenCenterView.d.ts +5 -0
- package/dist/typescript/ui/components/FullScreenCenterView/FullScreenCenterView.d.ts.map +1 -0
- package/dist/typescript/ui/components/Inbox/EmptyState.d.ts +19 -0
- package/dist/typescript/ui/components/Inbox/EmptyState.d.ts.map +1 -0
- package/dist/typescript/ui/components/Inbox/Inbox.d.ts +21 -0
- package/dist/typescript/ui/components/Inbox/Inbox.d.ts.map +1 -0
- package/dist/typescript/ui/components/Inbox/Inbox.spec.d.ts +2 -0
- package/dist/typescript/ui/components/Inbox/Inbox.spec.d.ts.map +1 -0
- package/dist/typescript/ui/components/Pagination/Pagination.d.ts +14 -0
- package/dist/typescript/ui/components/Pagination/Pagination.d.ts.map +1 -0
- package/dist/typescript/ui/components/Pagination/Pagination.spec.d.ts +2 -0
- package/dist/typescript/ui/components/Pagination/Pagination.spec.d.ts.map +1 -0
- package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.d.ts +14 -0
- package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.d.ts.map +1 -0
- package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.spec.d.ts +2 -0
- package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.spec.d.ts.map +1 -0
- package/dist/typescript/ui/components/index.d.ts +10 -0
- package/dist/typescript/ui/components/index.d.ts.map +1 -0
- package/dist/typescript/ui/hooks/index.d.ts +4 -0
- package/dist/typescript/ui/hooks/index.d.ts.map +1 -0
- package/dist/typescript/ui/hooks/useAspectRatio.d.ts +3 -0
- package/dist/typescript/ui/hooks/useAspectRatio.d.ts.map +1 -0
- package/dist/typescript/ui/hooks/useAspectRatio.spec.d.ts +2 -0
- package/dist/typescript/ui/hooks/useAspectRatio.spec.d.ts.map +1 -0
- package/dist/typescript/ui/hooks/useContentCardUI.d.ts +14 -0
- package/dist/typescript/ui/hooks/useContentCardUI.d.ts.map +1 -0
- package/dist/typescript/ui/hooks/useContentCardUI.spec.d.ts +2 -0
- package/dist/typescript/ui/hooks/useContentCardUI.spec.d.ts.map +1 -0
- package/dist/typescript/ui/hooks/useInbox.d.ts +12 -0
- package/dist/typescript/ui/hooks/useInbox.d.ts.map +1 -0
- package/dist/typescript/ui/hooks/useInbox.spec.d.ts +2 -0
- package/dist/typescript/ui/hooks/useInbox.spec.d.ts.map +1 -0
- package/dist/typescript/ui/hooks/useInboxSettings.d.ts +7 -0
- package/dist/typescript/ui/hooks/useInboxSettings.d.ts.map +1 -0
- package/dist/typescript/ui/hooks/useInboxSettings.spec.d.ts +2 -0
- package/dist/typescript/ui/hooks/useInboxSettings.spec.d.ts.map +1 -0
- package/dist/typescript/ui/index.d.ts +8 -0
- package/dist/typescript/ui/index.d.ts.map +1 -0
- package/dist/typescript/ui/providers/InboxProvider.d.ts +56 -0
- package/dist/typescript/ui/providers/InboxProvider.d.ts.map +1 -0
- package/dist/typescript/ui/theme/Theme.d.ts +44 -0
- package/dist/typescript/ui/theme/Theme.d.ts.map +1 -0
- package/dist/typescript/ui/theme/ThemeProvider.d.ts +21 -0
- package/dist/typescript/ui/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/typescript/ui/theme/index.d.ts +3 -0
- package/dist/typescript/ui/theme/index.d.ts.map +1 -0
- package/dist/typescript/ui/types/ContentViewEvent.d.ts +9 -0
- package/dist/typescript/ui/types/ContentViewEvent.d.ts.map +1 -0
- package/dist/typescript/ui/types/Templates.d.ts +43 -0
- package/dist/typescript/ui/types/Templates.d.ts.map +1 -0
- package/dist/typescript/ui/types/index.d.ts +3 -0
- package/dist/typescript/ui/types/index.d.ts.map +1 -0
- package/dist/typescript/ui/utils/generateCardHash.d.ts +21 -0
- package/dist/typescript/ui/utils/generateCardHash.d.ts.map +1 -0
- package/dist/typescript/ui/utils/generateCardHash.spec.d.ts +2 -0
- package/dist/typescript/ui/utils/generateCardHash.spec.d.ts.map +1 -0
- package/dist/typescript/ui/utils/inboxStorage.d.ts +20 -0
- package/dist/typescript/ui/utils/inboxStorage.d.ts.map +1 -0
- package/dist/typescript/ui/utils/inboxStorage.spec.d.ts +2 -0
- package/dist/typescript/ui/utils/inboxStorage.spec.d.ts.map +1 -0
- package/dist/typescript/ui/utils/index.d.ts +3 -0
- package/dist/typescript/ui/utils/index.d.ts.map +1 -0
- package/ios/src/RCTAEPMessaging.mm +15 -0
- package/ios/src/RCTAEPMessaging.swift +61 -3
- package/ios/src/RCTAEPMessagingConstants.swift +4 -1
- package/jest.config.js +15 -0
- package/package.json +33 -5
- package/src/Messaging.ts +288 -32
- package/src/index.ts +3 -3
- package/src/models/ContentCard.ts +52 -27
- package/src/models/HTMLProposition.ts +1 -1
- package/src/models/JSONProposition.ts +1 -1
- package/src/models/Message.ts +50 -0
- package/src/models/PersonalizationSchema.ts +1 -0
- package/src/models/index.ts +22 -0
- package/src/ui/components/Button/Button.spec.tsx +496 -0
- package/src/ui/components/Button/Button.tsx +76 -0
- package/src/ui/components/ContentCardView/ContentCardView.spec.tsx +278 -0
- package/src/ui/components/ContentCardView/ContentCardView.tsx +400 -0
- package/src/ui/components/DismissButton/DismissButton.spec.tsx +314 -0
- package/src/ui/components/DismissButton/DismissButton.tsx +100 -0
- package/src/ui/components/FullScreenCenterView/FullScreenCenterView.tsx +32 -0
- package/src/ui/components/Inbox/EmptyState.tsx +89 -0
- package/src/ui/components/Inbox/Inbox.spec.tsx +478 -0
- package/src/ui/components/Inbox/Inbox.tsx +275 -0
- package/src/ui/components/Pagination/Pagination.spec.tsx +159 -0
- package/src/ui/components/Pagination/Pagination.tsx +222 -0
- package/src/ui/components/UnreadIcon/UnreadIcon.spec.tsx +878 -0
- package/src/ui/components/UnreadIcon/UnreadIcon.tsx +234 -0
- package/src/ui/components/index.ts +22 -0
- package/{dist/models/MessagingPropositionItem.js → src/ui/hooks/index.ts} +5 -4
- package/src/ui/hooks/useAspectRatio.spec.tsx +66 -0
- package/src/ui/hooks/useAspectRatio.tsx +39 -0
- package/src/ui/hooks/useContentCardUI.spec.tsx +82 -0
- package/src/ui/hooks/useContentCardUI.ts +48 -0
- package/src/ui/hooks/useInbox.spec.tsx +87 -0
- package/src/ui/hooks/useInbox.ts +46 -0
- package/src/ui/hooks/useInboxSettings.spec.tsx +41 -0
- package/src/ui/hooks/useInboxSettings.ts +24 -0
- package/src/ui/index.ts +7 -0
- package/src/ui/providers/InboxProvider.tsx +79 -0
- package/src/ui/theme/Theme.ts +57 -0
- package/src/ui/theme/ThemeProvider.tsx +120 -0
- package/src/ui/theme/index.ts +14 -0
- package/src/ui/types/ContentViewEvent.ts +20 -0
- package/src/ui/types/Templates.ts +77 -0
- package/src/ui/types/index.ts +14 -0
- package/src/ui/utils/generateCardHash.spec.tsx +86 -0
- package/src/ui/utils/generateCardHash.ts +59 -0
- package/src/ui/utils/inboxStorage.spec.tsx +136 -0
- package/src/ui/utils/inboxStorage.ts +64 -0
- package/src/ui/utils/index.ts +3 -0
- package/tutorials/ContentCardCustomizationGuide.md +661 -0
- package/tutorials/ContentCards.md +419 -0
- package/tutorials/In-App Messaging.md +31 -0
- package/tutorials/Inbox.md +515 -0
- package/tutorials/resources/image-only-template.png +0 -0
- package/tutorials/resources/large-image-template.png +0 -0
- package/tutorials/resources/small-image-template.png +0 -0
- package/dist/Messaging.js +0 -151
- package/dist/Messaging.js.map +0 -1
- package/dist/index.js +0 -34
- package/dist/index.js.map +0 -1
- package/dist/models/ContentCard.d.ts +0 -51
- package/dist/models/ContentCard.js.map +0 -1
- package/dist/models/HTMLProposition.js.map +0 -1
- package/dist/models/InAppMessage.js.map +0 -1
- package/dist/models/JSONProposition.js.map +0 -1
- package/dist/models/Message.js +0 -114
- package/dist/models/Message.js.map +0 -1
- package/dist/models/MessagingDelegate.js +0 -14
- package/dist/models/MessagingDelegate.js.map +0 -1
- package/dist/models/MessagingEdgeEventType.js +0 -24
- package/dist/models/MessagingEdgeEventType.js.map +0 -1
- package/dist/models/MessagingProposition.js +0 -59
- package/dist/models/MessagingProposition.js.map +0 -1
- package/dist/models/MessagingPropositionItem.js.map +0 -1
- package/dist/models/PersonalizationSchema.js +0 -25
- package/dist/models/PersonalizationSchema.js.map +0 -1
- package/dist/models/PropositionItem.js +0 -78
- package/dist/models/PropositionItem.js.map +0 -1
- package/dist/models/ScopeDetails.js.map +0 -1
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
|
+
/*
|
|
5
|
+
Copyright 2026 Adobe. All rights reserved.
|
|
6
|
+
This file is licensed to you under the Apache License, Version 2.0 (the
|
|
7
|
+
"License"); you may not use this file except in compliance with the License.
|
|
8
|
+
You may obtain a copy of the License at
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
|
|
10
|
+
or agreed to in writing, software distributed under the License is
|
|
11
|
+
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
|
|
12
|
+
ANY KIND, either express or implied. See the License for the specific
|
|
13
|
+
language governing permissions and limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import React, { cloneElement, useCallback, useEffect, useMemo, useState } from "react";
|
|
17
|
+
import { ActivityIndicator, FlatList, ScrollView, StyleSheet, Text, useWindowDimensions, View } from "react-native";
|
|
18
|
+
import { useContentCardUI } from "../../hooks/index.js";
|
|
19
|
+
import InboxProvider from "../../providers/InboxProvider.js";
|
|
20
|
+
import { useTheme } from "../../theme/index.js";
|
|
21
|
+
import { generateCardHash } from "../../utils/generateCardHash.js";
|
|
22
|
+
import { loadInboxState, saveInboxState } from "../../utils/inboxStorage.js";
|
|
23
|
+
import { ContentCardView } from "../ContentCardView/ContentCardView.js";
|
|
24
|
+
import EmptyState from "./EmptyState.js";
|
|
25
|
+
|
|
26
|
+
// TODO: consider localizing in the future
|
|
27
|
+
const DEFAULT_EMPTY_MESSAGE = 'No Content Available';
|
|
28
|
+
const cardStatusStore = new Map();
|
|
29
|
+
function InboxInner({
|
|
30
|
+
contentContainerStyle,
|
|
31
|
+
LoadingComponent = /*#__PURE__*/React.createElement(ActivityIndicator, null),
|
|
32
|
+
ErrorComponent = null,
|
|
33
|
+
FallbackComponent = null,
|
|
34
|
+
EmptyComponent,
|
|
35
|
+
settings,
|
|
36
|
+
surface,
|
|
37
|
+
style,
|
|
38
|
+
CardProps,
|
|
39
|
+
ListHeaderComponent,
|
|
40
|
+
...props
|
|
41
|
+
}) {
|
|
42
|
+
const {
|
|
43
|
+
colors,
|
|
44
|
+
isDark
|
|
45
|
+
} = useTheme();
|
|
46
|
+
const {
|
|
47
|
+
width: windowWidth,
|
|
48
|
+
height: windowHeight
|
|
49
|
+
} = useWindowDimensions();
|
|
50
|
+
const isLandscape = windowWidth > windowHeight;
|
|
51
|
+
const {
|
|
52
|
+
content,
|
|
53
|
+
error,
|
|
54
|
+
isLoading
|
|
55
|
+
} = useContentCardUI(surface);
|
|
56
|
+
const {
|
|
57
|
+
content: contentSettings
|
|
58
|
+
} = settings;
|
|
59
|
+
const {
|
|
60
|
+
capacity,
|
|
61
|
+
heading,
|
|
62
|
+
layout,
|
|
63
|
+
emptyStateSettings,
|
|
64
|
+
isUnreadEnabled
|
|
65
|
+
} = contentSettings;
|
|
66
|
+
const getStore = useCallback(() => {
|
|
67
|
+
if (!cardStatusStore.has(surface)) {
|
|
68
|
+
cardStatusStore.set(surface, {
|
|
69
|
+
dismissed: new Set(),
|
|
70
|
+
interacted: new Set()
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return cardStatusStore.get(surface);
|
|
74
|
+
}, [surface]);
|
|
75
|
+
const [dismissedIds, setDismissedIds] = useState(() => new Set(getStore().dismissed));
|
|
76
|
+
const [interactedIds, setInteractedIds] = useState(() => isUnreadEnabled ? new Set(getStore().interacted) : new Set());
|
|
77
|
+
const [storageLoaded, setStorageLoaded] = useState(false);
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
const activityId = settings.activityId;
|
|
80
|
+
if (!activityId) {
|
|
81
|
+
setStorageLoaded(true);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
let cancelled = false;
|
|
85
|
+
loadInboxState(activityId).then(persisted => {
|
|
86
|
+
if (cancelled) return;
|
|
87
|
+
const store = getStore();
|
|
88
|
+
persisted.dismissed.forEach(id => store.dismissed.add(id));
|
|
89
|
+
persisted.interacted.forEach(id => store.interacted.add(id));
|
|
90
|
+
setDismissedIds(new Set(store.dismissed));
|
|
91
|
+
if (isUnreadEnabled) setInteractedIds(new Set(store.interacted));
|
|
92
|
+
setStorageLoaded(true);
|
|
93
|
+
});
|
|
94
|
+
return () => {
|
|
95
|
+
cancelled = true;
|
|
96
|
+
};
|
|
97
|
+
}, [settings.activityId, isUnreadEnabled, getStore]);
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
if (!storageLoaded) return;
|
|
100
|
+
const store = getStore();
|
|
101
|
+
setDismissedIds(new Set(store.dismissed));
|
|
102
|
+
if (isUnreadEnabled) setInteractedIds(new Set(store.interacted));
|
|
103
|
+
}, [content, isUnreadEnabled, getStore, storageLoaded]);
|
|
104
|
+
const isHorizontal = layout?.orientation === 'horizontal';
|
|
105
|
+
const displayCards = useMemo(() => {
|
|
106
|
+
if (!content) return [];
|
|
107
|
+
return content.map(it => ({
|
|
108
|
+
item: it,
|
|
109
|
+
hash: generateCardHash(it)
|
|
110
|
+
})).filter(({
|
|
111
|
+
hash
|
|
112
|
+
}) => !dismissedIds.has(hash)).map(({
|
|
113
|
+
item,
|
|
114
|
+
hash
|
|
115
|
+
}) => {
|
|
116
|
+
const shouldBeRead = isUnreadEnabled && (interactedIds.has(hash) || item.isRead === true);
|
|
117
|
+
return shouldBeRead ? {
|
|
118
|
+
...item,
|
|
119
|
+
isRead: true
|
|
120
|
+
} : item;
|
|
121
|
+
}).slice(0, capacity);
|
|
122
|
+
}, [content, capacity, isUnreadEnabled, dismissedIds, interactedIds]);
|
|
123
|
+
const handleCardEvent = useCallback((event, data, nativeEvent) => {
|
|
124
|
+
const cardHash = generateCardHash(data);
|
|
125
|
+
const store = getStore();
|
|
126
|
+
if (event === 'onDismiss' && !store.dismissed.has(cardHash)) {
|
|
127
|
+
store.dismissed.add(cardHash);
|
|
128
|
+
setDismissedIds(prev => new Set(prev).add(cardHash));
|
|
129
|
+
if (settings.activityId) {
|
|
130
|
+
saveInboxState(settings.activityId, {
|
|
131
|
+
dismissed: [...store.dismissed],
|
|
132
|
+
interacted: [...store.interacted]
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
} else if (event === 'onInteract' && isUnreadEnabled && !store.interacted.has(cardHash)) {
|
|
136
|
+
store.interacted.add(cardHash);
|
|
137
|
+
setInteractedIds(prev => new Set(prev).add(cardHash));
|
|
138
|
+
if (settings.activityId) {
|
|
139
|
+
saveInboxState(settings.activityId, {
|
|
140
|
+
dismissed: [...store.dismissed],
|
|
141
|
+
interacted: [...store.interacted]
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
CardProps?.listener?.(event, data, nativeEvent);
|
|
146
|
+
}, [CardProps, isUnreadEnabled, getStore, settings.activityId]);
|
|
147
|
+
const renderItem = useCallback(({
|
|
148
|
+
item
|
|
149
|
+
}) => /*#__PURE__*/React.createElement(ContentCardView, _extends({
|
|
150
|
+
template: item
|
|
151
|
+
}, CardProps, {
|
|
152
|
+
listener: handleCardEvent,
|
|
153
|
+
style: isHorizontal ? [styles.horizontalCardStyles, {
|
|
154
|
+
width: Math.floor(windowWidth * 0.75)
|
|
155
|
+
}] : undefined
|
|
156
|
+
})), [isHorizontal, CardProps, windowWidth, handleCardEvent]);
|
|
157
|
+
const EmptyList = useCallback(() => EmptyComponent ? /*#__PURE__*/cloneElement(EmptyComponent, {
|
|
158
|
+
...emptyStateSettings
|
|
159
|
+
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
160
|
+
image: isDark ? emptyStateSettings?.image?.darkUrl ?? '' : emptyStateSettings?.image?.url ?? '',
|
|
161
|
+
text: emptyStateSettings?.message?.content || DEFAULT_EMPTY_MESSAGE
|
|
162
|
+
}), [isDark, emptyStateSettings, EmptyComponent]);
|
|
163
|
+
if (isLoading) return LoadingComponent;
|
|
164
|
+
if (error) return ErrorComponent;
|
|
165
|
+
if (!content) return FallbackComponent;
|
|
166
|
+
const topOfInbox = /*#__PURE__*/React.createElement(View, null, ListHeaderComponent && ListHeaderComponent, heading?.content ? /*#__PURE__*/React.createElement(Text, {
|
|
167
|
+
accessibilityRole: "header",
|
|
168
|
+
style: [styles.heading, {
|
|
169
|
+
color: colors.textPrimary
|
|
170
|
+
}]
|
|
171
|
+
}, heading.content) : null);
|
|
172
|
+
const listBody = /*#__PURE__*/React.createElement(FlatList, _extends({}, props, {
|
|
173
|
+
data: displayCards,
|
|
174
|
+
keyExtractor: item => item.id,
|
|
175
|
+
contentContainerStyle: [contentContainerStyle, isHorizontal && styles.horizontalListContent, styles.inbox],
|
|
176
|
+
horizontal: isHorizontal,
|
|
177
|
+
renderItem: renderItem,
|
|
178
|
+
ListEmptyComponent: /*#__PURE__*/React.createElement(EmptyList, null),
|
|
179
|
+
ListHeaderComponent: !isHorizontal ? topOfInbox : undefined
|
|
180
|
+
}));
|
|
181
|
+
const horizontalChrome = isHorizontal ? isLandscape ? /*#__PURE__*/React.createElement(ScrollView, {
|
|
182
|
+
contentContainerStyle: {
|
|
183
|
+
paddingBottom: 8
|
|
184
|
+
},
|
|
185
|
+
keyboardShouldPersistTaps: "handled",
|
|
186
|
+
nestedScrollEnabled: true
|
|
187
|
+
}, topOfInbox, listBody) : /*#__PURE__*/React.createElement(View, null, topOfInbox, listBody) : listBody;
|
|
188
|
+
return /*#__PURE__*/React.createElement(InboxProvider, {
|
|
189
|
+
settings: settings
|
|
190
|
+
}, horizontalChrome);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @experimental First React Native inbox UI
|
|
195
|
+
*/
|
|
196
|
+
export function Inbox({
|
|
197
|
+
LoadingComponent = /*#__PURE__*/React.createElement(ActivityIndicator, null),
|
|
198
|
+
ErrorComponent = null,
|
|
199
|
+
FallbackComponent = null,
|
|
200
|
+
surface,
|
|
201
|
+
settings,
|
|
202
|
+
isLoading,
|
|
203
|
+
error,
|
|
204
|
+
...props
|
|
205
|
+
}) {
|
|
206
|
+
if (isLoading) return LoadingComponent;
|
|
207
|
+
if (error) return ErrorComponent;
|
|
208
|
+
if (!settings) return FallbackComponent;
|
|
209
|
+
return /*#__PURE__*/React.createElement(InboxInner, _extends({
|
|
210
|
+
settings: settings,
|
|
211
|
+
surface: surface,
|
|
212
|
+
LoadingComponent: LoadingComponent,
|
|
213
|
+
ErrorComponent: ErrorComponent,
|
|
214
|
+
FallbackComponent: FallbackComponent
|
|
215
|
+
}, props));
|
|
216
|
+
}
|
|
217
|
+
const styles = StyleSheet.create({
|
|
218
|
+
inbox: {
|
|
219
|
+
flexGrow: 1
|
|
220
|
+
},
|
|
221
|
+
heading: {
|
|
222
|
+
fontWeight: '600',
|
|
223
|
+
fontSize: 18,
|
|
224
|
+
lineHeight: 28,
|
|
225
|
+
textAlign: 'center',
|
|
226
|
+
marginBottom: 16
|
|
227
|
+
},
|
|
228
|
+
horizontalCardStyles: {
|
|
229
|
+
flex: 0
|
|
230
|
+
},
|
|
231
|
+
horizontalListContent: {
|
|
232
|
+
alignItems: 'center'
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
//# sourceMappingURL=Inbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","cloneElement","useCallback","useEffect","useMemo","useState","ActivityIndicator","FlatList","ScrollView","StyleSheet","Text","useWindowDimensions","View","useContentCardUI","InboxProvider","useTheme","generateCardHash","loadInboxState","saveInboxState","ContentCardView","EmptyState","DEFAULT_EMPTY_MESSAGE","cardStatusStore","Map","InboxInner","contentContainerStyle","LoadingComponent","createElement","ErrorComponent","FallbackComponent","EmptyComponent","settings","surface","style","CardProps","ListHeaderComponent","props","colors","isDark","width","windowWidth","height","windowHeight","isLandscape","content","error","isLoading","contentSettings","capacity","heading","layout","emptyStateSettings","isUnreadEnabled","getStore","has","set","dismissed","Set","interacted","get","dismissedIds","setDismissedIds","interactedIds","setInteractedIds","storageLoaded","setStorageLoaded","activityId","cancelled","then","persisted","store","forEach","id","add","isHorizontal","orientation","displayCards","map","it","item","hash","filter","shouldBeRead","isRead","slice","handleCardEvent","event","data","nativeEvent","cardHash","prev","listener","renderItem","_extends","template","styles","horizontalCardStyles","Math","floor","undefined","EmptyList","image","darkUrl","url","text","message","topOfInbox","accessibilityRole","color","textPrimary","listBody","keyExtractor","horizontalListContent","inbox","horizontal","ListEmptyComponent","horizontalChrome","paddingBottom","keyboardShouldPersistTaps","nestedScrollEnabled","Inbox","create","flexGrow","fontWeight","fontSize","lineHeight","textAlign","marginBottom","flex","alignItems"],"sourceRoot":"../../../../../src","sources":["ui/components/Inbox/Inbox.tsx"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,YAAY,EAAgBC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACpG,SACEC,iBAAiB,EACjBC,QAAQ,EAGRC,UAAU,EACVC,UAAU,EACVC,IAAI,EACJC,mBAAmB,EACnBC,IAAI,QACC,cAAc;AACrB,SAASC,gBAAgB,QAAQ,sBAAa;AAC9C,OAAOC,aAAa,MAEb,kCAA+B;AACtC,SAASC,QAAQ,QAAQ,sBAAa;AAGtC,SAASC,gBAAgB,QAAQ,iCAA8B;AAC/D,SAASC,cAAc,EAAEC,cAAc,QAAQ,6BAA0B;AACzE,SAASC,eAAe,QAA0B,uCAAoC;AACtF,OAAOC,UAAU,MAAM,iBAAc;;AAErC;AACA,MAAMC,qBAAqB,GAAG,sBAAsB;AAEpD,MAAMC,eAAe,GAAG,IAAIC,GAAG,CAA8D,CAAC;AAc9F,SAASC,UAAUA,CAA4B;EAC7CC,qBAAqB;EACrBC,gBAAgB,gBAAG1B,KAAA,CAAA2B,aAAA,CAACrB,iBAAiB,MAAE,CAAC;EACxCsB,cAAc,GAAG,IAAI;EACrBC,iBAAiB,GAAG,IAAI;EACxBC,cAAc;EACdC,QAAQ;EACRC,OAAO;EACPC,KAAK;EACLC,SAAS;EACTC,mBAAmB;EACnB,GAAGC;AAGL,CAAC,EAAE;EACD,MAAM;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGvB,QAAQ,CAAC,CAAC;EACrC,MAAM;IAAEwB,KAAK,EAAEC,WAAW;IAAEC,MAAM,EAAE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