@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,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
This file is licensed to you under the Apache License, Version 2.0 (the
|
|
6
|
+
"License"); you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
|
|
9
|
+
or agreed to in writing, software distributed under the License is
|
|
10
|
+
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
|
|
11
|
+
ANY KIND, either express or implied. See the License for the specific
|
|
12
|
+
language governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import React, { createContext } from "react";
|
|
16
|
+
export const InboxContext = /*#__PURE__*/createContext(null);
|
|
17
|
+
/** @experimental */
|
|
18
|
+
function InboxProvider({
|
|
19
|
+
children,
|
|
20
|
+
settings
|
|
21
|
+
}) {
|
|
22
|
+
return /*#__PURE__*/React.createElement(InboxContext.Provider, {
|
|
23
|
+
value: settings
|
|
24
|
+
}, children);
|
|
25
|
+
}
|
|
26
|
+
export default InboxProvider;
|
|
27
|
+
//# sourceMappingURL=InboxProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","createContext","InboxContext","InboxProvider","children","settings","createElement","Provider","value"],"sourceRoot":"../../../../src","sources":["ui/providers/InboxProvider.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AA8C5C,OAAO,MAAMC,YAAY,gBACvBD,aAAa,CAAuB,IAAI,CAAC;AAO3C;AACA,SAASE,aAAaA,CAAC;EACrBC,QAAQ;EACRC;AACkB,CAAC,EAAE;EACrB,oBACEL,KAAA,CAAAM,aAAA,CAACJ,YAAY,CAACK,QAAQ;IAACC,KAAK,EAAEH;EAAS,GACpCD,QACoB,CAAC;AAE5B;AAEA,eAAeD,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["ui/theme/Theme.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
This file is licensed to you under the Apache License, Version 2.0 (the
|
|
6
|
+
"License"); you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
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 { createContext, useContext, useMemo } from 'react';
|
|
17
|
+
import { useColorScheme } from 'react-native';
|
|
18
|
+
const defaultTheme = {
|
|
19
|
+
light: {
|
|
20
|
+
isDark: false,
|
|
21
|
+
colors: {
|
|
22
|
+
primary: '#007AFF',
|
|
23
|
+
secondary: '#5856D6',
|
|
24
|
+
background: '#FFFFFF',
|
|
25
|
+
textPrimary: '#000000',
|
|
26
|
+
textSecondary: '#8E8E93',
|
|
27
|
+
imagePlaceholder: '#C7C7CC',
|
|
28
|
+
buttonTextColor: 'dodgerblue',
|
|
29
|
+
activeColor: '#0a7ea4',
|
|
30
|
+
inactiveColor: '#687076',
|
|
31
|
+
dotColor: '#FF4444',
|
|
32
|
+
imageContainerColor: '#f0f0f0'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
dark: {
|
|
36
|
+
isDark: true,
|
|
37
|
+
colors: {
|
|
38
|
+
primary: '#0A84FF',
|
|
39
|
+
secondary: '#5E5CE6',
|
|
40
|
+
background: '#262626',
|
|
41
|
+
textPrimary: '#FFFFFF',
|
|
42
|
+
textSecondary: '#8E8E93',
|
|
43
|
+
imagePlaceholder: '#48484A',
|
|
44
|
+
buttonTextColor: 'dodgerblue',
|
|
45
|
+
activeColor: '#fff',
|
|
46
|
+
inactiveColor: '#9BA1A6',
|
|
47
|
+
dotColor: '#FF6B6B',
|
|
48
|
+
imageContainerColor: '#f0f0f0'
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const ThemeContext = /*#__PURE__*/createContext(undefined);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* ThemeProvider component that provides the theme to the children components.
|
|
56
|
+
*
|
|
57
|
+
* @param children - The children components.
|
|
58
|
+
* @param customThemes - The custom themes to override the default themes.
|
|
59
|
+
* @returns The ThemeProvider component.
|
|
60
|
+
*/
|
|
61
|
+
export const ThemeProvider = ({
|
|
62
|
+
children,
|
|
63
|
+
customThemes
|
|
64
|
+
}) => {
|
|
65
|
+
const systemColorScheme = useColorScheme();
|
|
66
|
+
|
|
67
|
+
// Memoize the merged themes to avoid recreation on every render
|
|
68
|
+
const mergedThemes = useMemo(() => {
|
|
69
|
+
return {
|
|
70
|
+
light: {
|
|
71
|
+
...defaultTheme.light,
|
|
72
|
+
colors: {
|
|
73
|
+
...defaultTheme.light.colors,
|
|
74
|
+
...(customThemes?.light?.colors || {})
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
dark: {
|
|
78
|
+
...defaultTheme.dark,
|
|
79
|
+
colors: {
|
|
80
|
+
...defaultTheme.dark.colors,
|
|
81
|
+
...(customThemes?.dark?.colors || {})
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}, [customThemes]);
|
|
86
|
+
|
|
87
|
+
// Memoize the active theme
|
|
88
|
+
const activeTheme = useMemo(() => {
|
|
89
|
+
const scheme = systemColorScheme ?? 'light';
|
|
90
|
+
return mergedThemes[scheme];
|
|
91
|
+
}, [mergedThemes, systemColorScheme]);
|
|
92
|
+
|
|
93
|
+
// Memoize the context value to prevent unnecessary re-renders
|
|
94
|
+
const contextValue = useMemo(() => activeTheme, [activeTheme]);
|
|
95
|
+
return /*#__PURE__*/React.createElement(ThemeContext.Provider, {
|
|
96
|
+
value: contextValue
|
|
97
|
+
}, children);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* useTheme hook that returns the theme context.
|
|
102
|
+
* @returns The theme context.
|
|
103
|
+
*/
|
|
104
|
+
export const useTheme = () => {
|
|
105
|
+
const context = useContext(ThemeContext);
|
|
106
|
+
const systemColorScheme = useColorScheme();
|
|
107
|
+
if (context === undefined) {
|
|
108
|
+
return defaultTheme[systemColorScheme ?? 'light'];
|
|
109
|
+
}
|
|
110
|
+
return context;
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","useMemo","useColorScheme","defaultTheme","light","isDark","colors","primary","secondary","background","textPrimary","textSecondary","imagePlaceholder","buttonTextColor","activeColor","inactiveColor","dotColor","imageContainerColor","dark","ThemeContext","undefined","ThemeProvider","children","customThemes","systemColorScheme","mergedThemes","activeTheme","scheme","contextValue","React","createElement","Provider","value","useTheme","context"],"sourceRoot":"../../../../src","sources":["ui/theme/ThemeProvider.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,EAAEC,UAAU,EAAaC,OAAO,QAAQ,OAAO;AACrE,SAASC,cAAc,QAAQ,cAAc;AAQ7C,MAAMC,YAAoB,GAAG;EAC3BC,KAAK,EAAE;IACLC,MAAM,EAAE,KAAK;IACbC,MAAM,EAAE;MACNC,OAAO,EAAE,SAAS;MAClBC,SAAS,EAAE,SAAS;MACpBC,UAAU,EAAE,SAAS;MACrBC,WAAW,EAAE,SAAS;MACtBC,aAAa,EAAE,SAAS;MACxBC,gBAAgB,EAAE,SAAS;MAC3BC,eAAe,EAAE,YAAY;MAC7BC,WAAW,EAAE,SAAS;MACtBC,aAAa,EAAE,SAAS;MACxBC,QAAQ,EAAE,SAAS;MACnBC,mBAAmB,EAAE;IACvB;EACF,CAAC;EACDC,IAAI,EAAE;IACJb,MAAM,EAAE,IAAI;IACZC,MAAM,EAAE;MACNC,OAAO,EAAE,SAAS;MAClBC,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C,MAAMyB,WAAW,EAAE,CAACA,WAAW,CAAC,CAAC;EAErE,oBACEG,KAAA,CAAAC,aAAA,CAACX,YAAY,CAACY,QAAQ;IAACC,KAAK,EAAEJ;EAAa,GACxCN,QACoB,CAAC;AAE5B,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMW,QAAQ,GAAGA,CAAA,KAAa;EACnC,MAAMC,OAAO,GAAGlC,UAAU,CAACmB,YAAY,CAAC;EACxC,MAAMK,iBAAiB,GAAGtB,cAAc,CAAC,CAAC;EAC1C,IAAIgC,OAAO,KAAKd,SAAS,EAAE;IACzB,OAAOjB,YAAY,CAACqB,iBAAiB,IAAI,OAAO,CAAC;EACnD;EACA,OAAOU,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
/*
|
|
3
|
-
Copyright
|
|
4
|
+
Copyright 2026 Adobe. All rights reserved.
|
|
4
5
|
This file is licensed to you under the Apache License, Version 2.0 (the
|
|
5
6
|
"License"); you may not use this file except in compliance with the License.
|
|
6
7
|
You may obtain a copy of the License at
|
|
@@ -10,5 +11,7 @@
|
|
|
10
11
|
ANY KIND, either express or implied. See the License for the specific
|
|
11
12
|
language governing permissions and limitations under the License.
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
export * from "./Theme.js";
|
|
16
|
+
export * from "./ThemeProvider.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["ui/theme/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,YAAS;AACvB,cAAc,oBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["ui/types/ContentViewEvent.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
This file is licensed to you under the Apache License, Version 2.0 (the
|
|
6
|
+
"License"); you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
|
|
9
|
+
or agreed to in writing, software distributed under the License is
|
|
10
|
+
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
|
|
11
|
+
ANY KIND, either express or implied. See the License for the specific
|
|
12
|
+
language governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { ContentCard } from "../../models/ContentCard.js";
|
|
16
|
+
export class ContentTemplate extends ContentCard {
|
|
17
|
+
constructor(data, type, isRead = false) {
|
|
18
|
+
super(data, isRead);
|
|
19
|
+
this.type = type;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Overrides for the structural pieces of the content card */
|
|
24
|
+
|
|
25
|
+
/** The base style overrides available for content cards */
|
|
26
|
+
//# sourceMappingURL=Templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ContentCard","ContentTemplate","constructor","data","type","isRead"],"sourceRoot":"../../../../src","sources":["ui/types/Templates.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,SACEA,WAAW,QAGN,6BAA0B;AAGjC,OAAO,MAAMC,eAAe,SAASD,WAAW,CAAC;EAG/CE,WAAWA,CAACC,IAAqB,EAAEC,IAAyB,EAAEC,MAAe,GAAG,KAAK,EAAE;IACrF,KAAK,CAACF,IAAI,EAAEE,MAAM,CAAC;IACnB,IAAI,CAACD,IAAI,GAAGA,IAAI;EAClB;AACF;;AAEA;;AAcA","ignoreList":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
/*
|
|
3
|
-
Copyright
|
|
4
|
+
Copyright 2026 Adobe. All rights reserved.
|
|
4
5
|
This file is licensed to you under the Apache License, Version 2.0 (the
|
|
5
6
|
"License"); you may not use this file except in compliance with the License.
|
|
6
7
|
You may obtain a copy of the License at
|
|
@@ -10,5 +11,7 @@
|
|
|
10
11
|
ANY KIND, either express or implied. See the License for the specific
|
|
11
12
|
language governing permissions and limitations under the License.
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
export * from "./ContentViewEvent.js";
|
|
16
|
+
export * from "./Templates.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["ui/types/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,uBAAoB;AAClC,cAAc,gBAAa","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
This file is licensed to you under the Apache License, Version 2.0 (the
|
|
6
|
+
"License"); you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
|
|
9
|
+
or agreed to in writing, software distributed under the License is
|
|
10
|
+
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
|
|
11
|
+
ANY KIND, either express or implied. See the License for the specific
|
|
12
|
+
language governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @experimental First React Native inbox / content-card UI
|
|
17
|
+
* Generate a stable identifier (hash) for a card based on its content
|
|
18
|
+
* This ensures the same card is identified even if the ID changes between refetches
|
|
19
|
+
*
|
|
20
|
+
* Priority: content hash (most stable) > uuid > id
|
|
21
|
+
*
|
|
22
|
+
* @param card - The content card template
|
|
23
|
+
* @returns A stable identifier string with a prefix indicating the source (content:, uuid:, or id:)
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const cardHash = generateCardHash(card);
|
|
28
|
+
* // Returns: "content:https://example.com|Title|Body|image.jpg|SmallImage"
|
|
29
|
+
* // or: "uuid:123e4567-e89b-12d3-a456-426614174000"
|
|
30
|
+
* // or: "id:card-123"
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export const generateCardHash = card => {
|
|
34
|
+
const content = card.data?.content;
|
|
35
|
+
if (content) {
|
|
36
|
+
const parts = [content.actionUrl || '', content.title?.content || '', content.body?.content || '', content.image?.url || content.image?.darkUrl || '', card.type || card.data?.meta?.adobe?.template || ''];
|
|
37
|
+
const contentHash = parts.join('|');
|
|
38
|
+
if (parts.some(p => p.trim().length > 0)) {
|
|
39
|
+
return `content:${contentHash}`;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (card.uuid) {
|
|
43
|
+
return `uuid:${card.uuid}`;
|
|
44
|
+
}
|
|
45
|
+
if (card.id) {
|
|
46
|
+
return `id:${card.id}`;
|
|
47
|
+
}
|
|
48
|
+
return `fallback:${String(Math.random())}`;
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=generateCardHash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["generateCardHash","card","content","data","parts","actionUrl","title","body","image","url","darkUrl","type","meta","adobe","template","contentHash","join","some","p","trim","length","uuid","id","String","Math","random"],"sourceRoot":"../../../../src","sources":["ui/utils/generateCardHash.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gBAAgB,GAAIC,IAA2B,IAAa;EACvE,MAAMC,OAAO,GAAGD,IAAI,CAACE,IAAI,EAAED,OAAO;EAClC,IAAIA,OAAO,EAAE;IACX,MAAME,KAAK,GAAG,CACZF,OAAO,CAACG,SAAS,IAAI,EAAE,EACvBH,OAAO,CAACI,KAAK,EAAEJ,OAAO,IAAI,EAAE,EAC5BA,OAAO,CAACK,IAAI,EAAEL,OAAO,IAAI,EAAE,EAC3BA,OAAO,CAACM,KAAK,EAAEC,GAAG,IAAIP,OAAO,CAACM,KAAK,EAAEE,OAAO,IAAI,EAAE,EAClDT,IAAI,CAACU,IAAI,IAAIV,IAAI,CAACE,IAAI,EAAES,IAAI,EAAEC,KAAK,EAAEC,QAAQ,IAAI,EAAE,CACpD;IACD,MAAMC,WAAW,GAAGX,KAAK,CAACY,IAAI,CAAC,GAAG,CAAC;IACnC,IAAIZ,KAAK,CAACa,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,IAAI,CAAC,CAAC,CAACC,MAAM,GAAG,CAAC,CAAC,EAAE;MACxC,OAAO,WAAWL,WAAW,EAAE;IACjC;EACF;EAEA,IAAId,IAAI,CAACoB,IAAI,EAAE;IACb,OAAO,QAAQpB,IAAI,CAACoB,IAAI,EAAE;EAC5B;EAEA,IAAIpB,IAAI,CAACqB,EAAE,EAAE;IACX,OAAO,MAAMrB,IAAI,CAACqB,EAAE,EAAE;EACxB;EAEA,OAAO,YAAYC,MAAM,CAACC,IAAI,CAACC,MAAM,CAAC,CAAC,CAAC,EAAE;AAC5C,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
This file is licensed to you under the Apache License, Version 2.0 (the
|
|
6
|
+
"License"); you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
|
|
9
|
+
or agreed to in writing, software distributed under the License is
|
|
10
|
+
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
|
|
11
|
+
ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { generateCardHash } from "./generateCardHash.js";
|
|
16
|
+
describe('generateCardHash', () => {
|
|
17
|
+
it('returns content: hash from title, body, image, actionUrl, and type', () => {
|
|
18
|
+
const card = {
|
|
19
|
+
id: 'ignored-when-content',
|
|
20
|
+
type: 'LargeImage',
|
|
21
|
+
data: {
|
|
22
|
+
content: {
|
|
23
|
+
actionUrl: 'https://go',
|
|
24
|
+
title: {
|
|
25
|
+
content: 'T'
|
|
26
|
+
},
|
|
27
|
+
body: {
|
|
28
|
+
content: 'B'
|
|
29
|
+
},
|
|
30
|
+
image: {
|
|
31
|
+
url: 'https://img'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
expect(generateCardHash(card)).toBe('content:https://go|T|B|https://img|LargeImage');
|
|
37
|
+
});
|
|
38
|
+
it('uses meta.adobe.template when type is missing', () => {
|
|
39
|
+
const card = {
|
|
40
|
+
data: {
|
|
41
|
+
meta: {
|
|
42
|
+
adobe: {
|
|
43
|
+
template: 'SmallImage'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
content: {
|
|
47
|
+
title: {
|
|
48
|
+
content: 'X'
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
expect(generateCardHash(card)).toContain('|SmallImage');
|
|
54
|
+
});
|
|
55
|
+
it('uses darkUrl when url is missing', () => {
|
|
56
|
+
const card = {
|
|
57
|
+
type: 'SmallImage',
|
|
58
|
+
data: {
|
|
59
|
+
content: {
|
|
60
|
+
title: {
|
|
61
|
+
content: 'T'
|
|
62
|
+
},
|
|
63
|
+
image: {
|
|
64
|
+
darkUrl: 'https://dark.png'
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
expect(generateCardHash(card)).toContain('https://dark.png');
|
|
70
|
+
});
|
|
71
|
+
it('uses uuid when content is present but all parts are empty', () => {
|
|
72
|
+
const card = {
|
|
73
|
+
uuid: 'u-1',
|
|
74
|
+
data: {
|
|
75
|
+
content: {
|
|
76
|
+
title: {
|
|
77
|
+
content: ''
|
|
78
|
+
},
|
|
79
|
+
body: {
|
|
80
|
+
content: ''
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
expect(generateCardHash(card)).toBe('uuid:u-1');
|
|
86
|
+
});
|
|
87
|
+
it('uses id when no usable content hash and no uuid', () => {
|
|
88
|
+
const card = {
|
|
89
|
+
id: 'card-99',
|
|
90
|
+
data: {}
|
|
91
|
+
};
|
|
92
|
+
expect(generateCardHash(card)).toBe('id:card-99');
|
|
93
|
+
});
|
|
94
|
+
it('uses fallback with Math.random when no content, uuid, or id', () => {
|
|
95
|
+
jest.spyOn(Math, 'random').mockReturnValue(0.25);
|
|
96
|
+
const card = {
|
|
97
|
+
data: {}
|
|
98
|
+
};
|
|
99
|
+
expect(generateCardHash(card)).toBe('fallback:0.25');
|
|
100
|
+
jest.restoreAllMocks();
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
//# sourceMappingURL=generateCardHash.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["generateCardHash","describe","it","card","id","type","data","content","actionUrl","title","body","image","url","expect","toBe","meta","adobe","template","toContain","darkUrl","uuid","jest","spyOn","Math","mockReturnValue","restoreAllMocks"],"sourceRoot":"../../../../src","sources":["ui/utils/generateCardHash.spec.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA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AC,CAAC;EAEFhB,EAAE,CAAC,2DAA2D,EAAE,MAAM;IACpE,MAAMC,IAAI,GAAG;MACXiB,IAAI,EAAE,KAAK;MACXd,IAAI,EAAE;QACJC,OAAO,EAAE;UACPE,KAAK,EAAE;YAAEF,OAAO,EAAE;UAAG,CAAC;UACtBG,IAAI,EAAE;YAAEH,OAAO,EAAE;UAAG;QACtB;MACF;IACF,CAAC;IACDM,MAAM,CAACb,gBAAgB,CAACG,IAAW,CAAC,CAAC,CAACW,IAAI,CAAC,UAAU,CAAC;EACxD,CAAC,CAAC;EAEFZ,EAAE,CAAC,iDAAiD,EAAE,MAAM;IAC1D,MAAMC,IAAI,GAAG;MACXC,EAAE,EAAE,SAAS;MACbE,IAAI,EAAE,CAAC;IACT,CAAC;IACDO,MAAM,CAACb,gBAAgB,CAACG,IAAW,CAAC,CAAC,CAACW,IAAI,CAAC,YAAY,CAAC;EAC1D,CAAC,CAAC;EAEFZ,EAAE,CAAC,6DAA6D,EAAE,MAAM;IACtEmB,IAAI,CAACC,KAAK,CAACC,IAAI,EAAE,QAAQ,CAAC,CAACC,eAAe,CAAC,IAAI,CAAC;IAChD,MAAMrB,IAAI,GAAG;MAAEG,IAAI,EAAE,CAAC;IAAE,CAAC;IACzBO,MAAM,CAACb,gBAAgB,CAACG,IAAW,CAAC,CAAC,CAACW,IAAI,CAAC,eAAe,CAAC;IAC3DO,IAAI,CAACI,eAAe,CAAC,CAAC;EACxB,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
governing permissions under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { NativeModules } from 'react-native';
|
|
16
|
+
const RCTAEPMessaging = NativeModules.AEPMessaging;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Load persisted inbox state (dismissed and read card IDs) from native storage.
|
|
20
|
+
* Uses scopeDetails.activity.id as the key - this is constant across server responses.
|
|
21
|
+
* Persists via SharedPreferences (Android) / UserDefaults (iOS) - no AsyncStorage needed.
|
|
22
|
+
* @param activityId - From scopeDetails.activity in the inbox proposition
|
|
23
|
+
* @returns Persisted state or empty defaults if not found
|
|
24
|
+
*/
|
|
25
|
+
export async function loadInboxState(activityId) {
|
|
26
|
+
if (!activityId || !RCTAEPMessaging?.getInboxState) {
|
|
27
|
+
return {
|
|
28
|
+
dismissed: [],
|
|
29
|
+
interacted: []
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
const raw = await RCTAEPMessaging.getInboxState(activityId);
|
|
34
|
+
if (!raw || typeof raw !== 'string') return {
|
|
35
|
+
dismissed: [],
|
|
36
|
+
interacted: []
|
|
37
|
+
};
|
|
38
|
+
const parsed = JSON.parse(raw);
|
|
39
|
+
return {
|
|
40
|
+
dismissed: Array.isArray(parsed?.dismissed) ? parsed.dismissed : [],
|
|
41
|
+
interacted: Array.isArray(parsed?.interacted) ? parsed.interacted : []
|
|
42
|
+
};
|
|
43
|
+
} catch {
|
|
44
|
+
return {
|
|
45
|
+
dismissed: [],
|
|
46
|
+
interacted: []
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @experimental First React Native inbox UI — subject to change while we expand testing.
|
|
53
|
+
* Save inbox state to native storage for persistence across app launches.
|
|
54
|
+
* @param activityId - From scopeDetails.activity in the inbox proposition
|
|
55
|
+
* @param state - Dismissed and interacted card IDs to persist
|
|
56
|
+
*/
|
|
57
|
+
export async function saveInboxState(activityId, state) {
|
|
58
|
+
if (!activityId || !RCTAEPMessaging?.setInboxState) return;
|
|
59
|
+
try {
|
|
60
|
+
await RCTAEPMessaging.setInboxState(activityId, JSON.stringify(state));
|
|
61
|
+
} catch {
|
|
62
|
+
// Silently fail - persistence is best-effort
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=inboxStorage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeModules","RCTAEPMessaging","AEPMessaging","loadInboxState","activityId","getInboxState","dismissed","interacted","raw","parsed","JSON","parse","Array","isArray","saveInboxState","state","setInboxState","stringify"],"sourceRoot":"../../../../src","sources":["ui/utils/inboxStorage.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,cAAc;AAO5C,MAAMC,eAAe,GAAGD,aAAa,CAACE,YAAY;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,cAAcA,CAClCC,UAAkB,EACY;EAC9B,IAAI,CAACA,UAAU,IAAI,CAACH,eAAe,EAAEI,aAAa,EAAE;IAClD,OAAO;MAAEC,SAAS,EAAE,EAAE;MAAEC,UAAU,EAAE;IAAG,CAAC;EAC1C;EACA,IAAI;IACF,MAAMC,GAAG,GAAG,MAAMP,eAAe,CAACI,aAAa,CAACD,UAAU,CAAC;IAC3D,IAAI,CAACI,GAAG,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE,OAAO;MAAEF,SAAS,EAAE,EAAE;MAAEC,UAAU,EAAE;IAAG,CAAC;IAC7E,MAAME,MAAM,GAAGC,IAAI,CAACC,KAAK,CAACH,GAAG,CAAwB;IACrD,OAAO;MACLF,SAAS,EAAEM,KAAK,CAACC,OAAO,CAACJ,MAAM,EAAEH,SAAS,CAAC,GAAGG,MAAM,CAACH,SAAS,GAAG,EAAE;MACnEC,UAAU,EAAEK,KAAK,CAACC,OAAO,CAACJ,MAAM,EAAEF,UAAU,CAAC,GAAGE,MAAM,CAACF,UAAU,GAAG;IACtE,CAAC;EACH,CAAC,CAAC,MAAM;IACN,OAAO;MAAED,SAAS,EAAE,EAAE;MAAEC,UAAU,EAAE;IAAG,CAAC;EAC1C;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeO,cAAcA,CAClCV,UAAkB,EAClBW,KAA0B,EACX;EACf,IAAI,CAACX,UAAU,IAAI,CAACH,eAAe,EAAEe,aAAa,EAAE;EACpD,IAAI;IACF,MAAMf,eAAe,CAACe,aAAa,CAACZ,UAAU,EAAEM,IAAI,CAACO,SAAS,CAACF,KAAK,CAAC,CAAC;EACxE,CAAC,CAAC,MAAM;IACN;EAAA;AAEJ","ignoreList":[]}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
This file is licensed to you under the Apache License, Version 2.0 (the
|
|
6
|
+
"License"); you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
|
|
9
|
+
or agreed to in writing, software distributed under the License is
|
|
10
|
+
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
|
|
11
|
+
ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { NativeModules } from 'react-native';
|
|
16
|
+
import { loadInboxState, saveInboxState } from "./inboxStorage.js";
|
|
17
|
+
jest.mock('react-native', () => ({
|
|
18
|
+
NativeModules: {
|
|
19
|
+
AEPMessaging: {
|
|
20
|
+
getInboxState: jest.fn(),
|
|
21
|
+
setInboxState: jest.fn()
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
describe('inboxStorage', () => {
|
|
26
|
+
const activityId = 'activity-123';
|
|
27
|
+
const aep = NativeModules.AEPMessaging;
|
|
28
|
+
beforeEach(() => {
|
|
29
|
+
jest.clearAllMocks();
|
|
30
|
+
aep.getInboxState.mockReset();
|
|
31
|
+
aep.setInboxState.mockReset();
|
|
32
|
+
aep.getInboxState = jest.fn();
|
|
33
|
+
aep.setInboxState = jest.fn();
|
|
34
|
+
});
|
|
35
|
+
describe('loadInboxState', () => {
|
|
36
|
+
it('returns empty state when activityId is empty', async () => {
|
|
37
|
+
await expect(loadInboxState('')).resolves.toEqual({
|
|
38
|
+
dismissed: [],
|
|
39
|
+
interacted: []
|
|
40
|
+
});
|
|
41
|
+
expect(aep.getInboxState).not.toHaveBeenCalled();
|
|
42
|
+
});
|
|
43
|
+
it('returns empty state when getInboxState is not available', async () => {
|
|
44
|
+
const prev = aep.getInboxState;
|
|
45
|
+
delete aep.getInboxState;
|
|
46
|
+
await expect(loadInboxState(activityId)).resolves.toEqual({
|
|
47
|
+
dismissed: [],
|
|
48
|
+
interacted: []
|
|
49
|
+
});
|
|
50
|
+
aep.getInboxState = prev;
|
|
51
|
+
});
|
|
52
|
+
it('parses JSON from native and returns dismissed and interacted', async () => {
|
|
53
|
+
aep.getInboxState.mockResolvedValue(JSON.stringify({
|
|
54
|
+
dismissed: ['a', 'b'],
|
|
55
|
+
interacted: ['c']
|
|
56
|
+
}));
|
|
57
|
+
await expect(loadInboxState(activityId)).resolves.toEqual({
|
|
58
|
+
dismissed: ['a', 'b'],
|
|
59
|
+
interacted: ['c']
|
|
60
|
+
});
|
|
61
|
+
expect(aep.getInboxState).toHaveBeenCalledWith(activityId);
|
|
62
|
+
});
|
|
63
|
+
it('returns empty arrays when native returns non-string', async () => {
|
|
64
|
+
aep.getInboxState.mockResolvedValue(null);
|
|
65
|
+
await expect(loadInboxState(activityId)).resolves.toEqual({
|
|
66
|
+
dismissed: [],
|
|
67
|
+
interacted: []
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
it('returns empty arrays when JSON is invalid', async () => {
|
|
71
|
+
aep.getInboxState.mockResolvedValue('not-json');
|
|
72
|
+
await expect(loadInboxState(activityId)).resolves.toEqual({
|
|
73
|
+
dismissed: [],
|
|
74
|
+
interacted: []
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
it('normalizes non-array dismissed/interacted in parsed JSON', async () => {
|
|
78
|
+
aep.getInboxState.mockResolvedValue(JSON.stringify({
|
|
79
|
+
dismissed: 'bad',
|
|
80
|
+
interacted: 1
|
|
81
|
+
}));
|
|
82
|
+
await expect(loadInboxState(activityId)).resolves.toEqual({
|
|
83
|
+
dismissed: [],
|
|
84
|
+
interacted: []
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
describe('saveInboxState', () => {
|
|
89
|
+
it('no-ops when activityId is empty', async () => {
|
|
90
|
+
await saveInboxState('', {
|
|
91
|
+
dismissed: ['x'],
|
|
92
|
+
interacted: []
|
|
93
|
+
});
|
|
94
|
+
expect(aep.setInboxState).not.toHaveBeenCalled();
|
|
95
|
+
});
|
|
96
|
+
it('no-ops when setInboxState is not available', async () => {
|
|
97
|
+
const prev = aep.setInboxState;
|
|
98
|
+
delete aep.setInboxState;
|
|
99
|
+
await saveInboxState(activityId, {
|
|
100
|
+
dismissed: [],
|
|
101
|
+
interacted: []
|
|
102
|
+
});
|
|
103
|
+
aep.setInboxState = prev;
|
|
104
|
+
});
|
|
105
|
+
it('calls native setInboxState with stringified state', async () => {
|
|
106
|
+
const state = {
|
|
107
|
+
dismissed: ['d1'],
|
|
108
|
+
interacted: ['i1']
|
|
109
|
+
};
|
|
110
|
+
aep.setInboxState.mockResolvedValue(undefined);
|
|
111
|
+
await saveInboxState(activityId, state);
|
|
112
|
+
expect(aep.setInboxState).toHaveBeenCalledWith(activityId, JSON.stringify(state));
|
|
113
|
+
});
|
|
114
|
+
it('swallows errors from setInboxState', async () => {
|
|
115
|
+
aep.setInboxState.mockRejectedValue(new Error('disk full'));
|
|
116
|
+
await expect(saveInboxState(activityId, {
|
|
117
|
+
dismissed: [],
|
|
118
|
+
interacted: []
|
|
119
|
+
})).resolves.toBeUndefined();
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
//# sourceMappingURL=inboxStorage.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeModules","loadInboxState","saveInboxState","jest","mock","AEPMessaging","getInboxState","fn","setInboxState","describe","activityId","aep","beforeEach","clearAllMocks","mockReset","it","expect","resolves","toEqual","dismissed","interacted","not","toHaveBeenCalled","prev","mockResolvedValue","JSON","stringify","toHaveBeenCalledWith","state","undefined","mockRejectedValue","Error","toBeUndefined"],"sourceRoot":"../../../../src","sources":["ui/utils/inboxStorage.spec.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,cAAc;AAC5C,SAASC,cAAc,EAAEC,cAAc,QAAQ,mBAAgB;AAE/DC,IAAI,CAACC,IAAI,CAAC,cAAc,EAAE,OAAO;EAC/BJ,aAAa,EAAE;IACbK,YAAY,EAAE;MACZC,aAAa,EAAEH,IAAI,CAACI,EAAE,CAAC,CAAC;MACxBC,aAAa,EAAEL,IAAI,CAACI,EAAE,CAAC;IACzB;EACF;AACF,CAAC,CAAC,CAAC;AAEHE,QAAQ,CAAC,cAAc,EAAE,MAAM;EAC7B,MAAMC,UAAU,GAAG,cAAc;EACjC,MAAMC,GAAG,GAAGX,aAAa,CAACK,YAGzB;EAEDO,UAAU,CAAC,MAAM;IACfT,IAAI,CAACU,aAAa,CAAC,CAAC;IACpBF,GAAG,CAACL,aAAa,CAACQ,SAAS,CAAC,CAAC;IAC7BH,GAAG,CAACH,aAAa,CAACM,SAAS,CA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G,CAACC,gBAAgB,CAAC,CAAC;IAClD,CAAC,CAAC;IAEFP,EAAE,CAAC,4CAA4C,EAAE,YAAY;MAC3D,MAAMQ,IAAI,GAAGZ,GAAG,CAACH,aAAa;MAC9B,OAAQG,GAAG,CAASH,aAAa;MAEjC,MAAMN,cAAc,CAACQ,UAAU,EAAE;QAAES,SAAS,EAAE,EAAE;QAAEC,UAAU,EAAE;MAAG,CAAC,CAAC;MAEnET,GAAG,CAACH,aAAa,GAAGe,IAAI;IAC1B,CAAC,CAAC;IAEFR,EAAE,CAAC,mDAAmD,EAAE,YAAY;MAClE,MAAMa,KAAK,GAAG;QAAET,SAAS,EAAE,CAAC,IAAI,CAAC;QAAEC,UAAU,EAAE,CAAC,IAAI;MAAE,CAAC;MACvDT,GAAG,CAACH,aAAa,CAACgB,iBAAiB,CAACK,SAAS,CAAC;MAE9C,MAAM3B,cAAc,CAACQ,UAAU,EAAEkB,KAAK,CAAC;MAEvCZ,MAAM,CAACL,GAAG,CAACH,aAAa,CAAC,CAACmB,oBAAoB,CAC5CjB,UAAU,EACVe,IAAI,CAACC,SAAS,CAACE,KAAK,CACtB,CAAC;IACH,CAAC,CAAC;IAEFb,EAAE,CAAC,oCAAoC,EAAE,YAAY;MACnDJ,GAAG,CAACH,aAAa,CAACsB,iBAAiB,CAAC,IAAIC,KAAK,CAAC,WAAW,CAAC,CAAC;MAE3D,MAAMf,MAAM,CACVd,cAAc,CAACQ,UAAU,EAAE;QAAES,SAAS,EAAE,EAAE;QAAEC,UAAU,EAAE;MAAG,CAAC,CAC9D,CAAC,CAACH,QAAQ,CAACe,aAAa,CAAC,CAAC;IAC5B,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["generateCardHash","loadInboxState","saveInboxState"],"sourceRoot":"../../../../src","sources":["ui/utils/index.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,uBAAoB;AACrD,SAASC,cAAc,EAAEC,cAAc,QAAQ,mBAAgB","ignoreList":[]}
|