@adobe/react-native-aepmessaging 7.3.0 → 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/RCTAEPMessagingModule.java +82 -32
- 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 +1 -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 +11 -0
- package/ios/src/RCTAEPMessaging.swift +30 -3
- package/jest.config.js +15 -0
- package/package.json +33 -5
- package/src/Messaging.ts +287 -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/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/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 -152
- 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 -156
- 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
package/dist/index.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Copyright 2023 Adobe. All rights reserved.
|
|
4
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
6
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
|
|
8
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
9
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
10
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
11
|
-
governing permissions and limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.JSONPropositionItem = exports.HTMLProposition = exports.PropositionItem = exports.PersonalizationSchema = exports.MessagingProposition = exports.MessagingEdgeEventType = exports.Message = exports.Messaging = exports.ContentCard = void 0;
|
|
15
|
-
const tslib_1 = require("tslib");
|
|
16
|
-
const Messaging_1 = tslib_1.__importDefault(require("./Messaging"));
|
|
17
|
-
exports.Messaging = Messaging_1.default;
|
|
18
|
-
const ContentCard_1 = require("./models/ContentCard");
|
|
19
|
-
Object.defineProperty(exports, "ContentCard", { enumerable: true, get: function () { return ContentCard_1.ContentCard; } });
|
|
20
|
-
const HTMLProposition_1 = require("./models/HTMLProposition");
|
|
21
|
-
Object.defineProperty(exports, "HTMLProposition", { enumerable: true, get: function () { return HTMLProposition_1.HTMLProposition; } });
|
|
22
|
-
const JSONProposition_1 = require("./models/JSONProposition");
|
|
23
|
-
Object.defineProperty(exports, "JSONPropositionItem", { enumerable: true, get: function () { return JSONProposition_1.JSONPropositionItem; } });
|
|
24
|
-
const Message_1 = tslib_1.__importDefault(require("./models/Message"));
|
|
25
|
-
exports.Message = Message_1.default;
|
|
26
|
-
const MessagingEdgeEventType_1 = tslib_1.__importDefault(require("./models/MessagingEdgeEventType"));
|
|
27
|
-
exports.MessagingEdgeEventType = MessagingEdgeEventType_1.default;
|
|
28
|
-
const MessagingProposition_1 = require("./models/MessagingProposition");
|
|
29
|
-
Object.defineProperty(exports, "MessagingProposition", { enumerable: true, get: function () { return MessagingProposition_1.MessagingProposition; } });
|
|
30
|
-
const PersonalizationSchema_1 = require("./models/PersonalizationSchema");
|
|
31
|
-
Object.defineProperty(exports, "PersonalizationSchema", { enumerable: true, get: function () { return PersonalizationSchema_1.PersonalizationSchema; } });
|
|
32
|
-
const PropositionItem_1 = require("./models/PropositionItem");
|
|
33
|
-
Object.defineProperty(exports, "PropositionItem", { enumerable: true, get: function () { return PropositionItem_1.PropositionItem; } });
|
|
34
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;EAUE;;;;AAEF,oEAAoC;AAsBlC,oBAtBK,mBAAS,CAsBL;AArBX,sDAAoE;AAkBlE,4FAlBO,yBAAW,OAkBP;AAfb,8DAAgF;AA2B9E,gGA3BO,iCAAe,OA2BP;AA1BjB,8DAAoF;AA4BlF,oGA5BO,qCAAmB,OA4BP;AA1BrB,uEAAuC;AAgBrC,kBAhBK,iBAAO,CAgBL;AAdT,qGAAqE;AAgBnE,iCAhBK,gCAAsB,CAgBL;AAfxB,wEAAqE;AAgBnE,qGAhBO,2CAAoB,OAgBP;AAdtB,0EAAuE;AAgBrE,sGAhBO,6CAAqB,OAgBP;AAfvB,8DAAgF;AAgB9E,gGAhBO,iCAAe,OAgBP"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { PersonalizationSchema } from './PersonalizationSchema';
|
|
2
|
-
import { PropositionItem, PropositionItemData } from './PropositionItem';
|
|
3
|
-
type ContentCardTemplate = 'SmallImage';
|
|
4
|
-
type DismissButtonStyle = 'circle' | 'none' | 'simple';
|
|
5
|
-
export interface ContentCardData extends PropositionItemData {
|
|
6
|
-
id: string;
|
|
7
|
-
data: {
|
|
8
|
-
contentType: 'application/json';
|
|
9
|
-
expiryDate: number;
|
|
10
|
-
publishedDate: number;
|
|
11
|
-
content: {
|
|
12
|
-
actionUrl: string;
|
|
13
|
-
body: {
|
|
14
|
-
content: string;
|
|
15
|
-
};
|
|
16
|
-
title: {
|
|
17
|
-
content: string;
|
|
18
|
-
};
|
|
19
|
-
buttons: Array<{
|
|
20
|
-
actionUrl: string;
|
|
21
|
-
id: string;
|
|
22
|
-
text: {
|
|
23
|
-
content: string;
|
|
24
|
-
};
|
|
25
|
-
interactId: string;
|
|
26
|
-
}>;
|
|
27
|
-
image: {
|
|
28
|
-
alt: string;
|
|
29
|
-
url: string;
|
|
30
|
-
};
|
|
31
|
-
dismissBtn: {
|
|
32
|
-
style: DismissButtonStyle;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
meta: {
|
|
36
|
-
[key: string]: any;
|
|
37
|
-
adobe: {
|
|
38
|
-
template: ContentCardTemplate;
|
|
39
|
-
};
|
|
40
|
-
dismissState: boolean;
|
|
41
|
-
readState: boolean;
|
|
42
|
-
surface: string;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
schema: PersonalizationSchema.CONTENT_CARD;
|
|
46
|
-
}
|
|
47
|
-
export declare class ContentCard extends PropositionItem {
|
|
48
|
-
data: ContentCardData['data'];
|
|
49
|
-
constructor(contentCardData: ContentCardData);
|
|
50
|
-
}
|
|
51
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentCard.js","sourceRoot":"","sources":["../../src/models/ContentCard.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;EAUE;;;AAGF,uDAAyE;AAoCzE,MAAa,WAAY,SAAQ,iCAAe;IAG9C,YAAY,eAAgC;QAC1C,KAAK,CAAC,eAAe,CAAC,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;IACnC,CAAC;CAEF;AARD,kCAQC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HTMLProposition.js","sourceRoot":"","sources":["../../src/models/HTMLProposition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;EAUE;;;AAGF,uDAAyE;AASzE,MAAa,eAAgB,SAAQ,iCAAe;IAGnD,YAAY,QAA6B;QACxC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC3B,CAAC;CACD;AAPD,0CAOC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InAppMessage.js","sourceRoot":"","sources":["../../src/models/InAppMessage.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;EAUE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"JSONProposition.js","sourceRoot":"","sources":["../../src/models/JSONProposition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;EAUE;;;AAGF,uDAAyE;AASzE,MAAa,mBAAoB,SAAQ,iCAAe;IAGvD,YAAY,QAA6B;QACxC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC3B,CAAC;CACD;AAPD,kDAOC"}
|
package/dist/models/Message.js
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Copyright 2023 Adobe. All rights reserved.
|
|
4
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
6
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
|
|
8
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
9
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
10
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
11
|
-
governing permissions and limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
const react_native_1 = require("react-native");
|
|
15
|
-
const RCTAEPMessaging = react_native_1.NativeModules.AEPMessaging;
|
|
16
|
-
// Registery to store inAppMessage callbacks for each message in Message.handleJavascriptMessage
|
|
17
|
-
// Record - {messageId : {handlerName : callback}}
|
|
18
|
-
const jsMessageHandlers = {};
|
|
19
|
-
// Registery to store inAppMessage result callbacks for each message in Message.evaluateJavascript
|
|
20
|
-
// Record - {messageId : {javascriptString : callback}}
|
|
21
|
-
const jsResultHandlers = {};
|
|
22
|
-
const handleJSMessageEventEmitter = new react_native_1.NativeEventEmitter(RCTAEPMessaging);
|
|
23
|
-
// invokes the callback registered in Message.handleJavascriptMessage with the content received from the inAppMessage webview
|
|
24
|
-
handleJSMessageEventEmitter.addListener('onJavascriptMessage', (event) => {
|
|
25
|
-
const { messageId, handlerName, content } = event;
|
|
26
|
-
if (jsMessageHandlers[messageId] && jsMessageHandlers[messageId][handlerName]) {
|
|
27
|
-
jsMessageHandlers[messageId][handlerName](content);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
handleJSMessageEventEmitter.addListener('onJavascriptResult', (event) => {
|
|
31
|
-
const { messageId, javascriptString, result } = event;
|
|
32
|
-
if (jsResultHandlers[messageId] && jsResultHandlers[messageId][javascriptString]) {
|
|
33
|
-
// Convert result to string to maintain API parity
|
|
34
|
-
const resultString = result == null ? '' : String(result);
|
|
35
|
-
jsResultHandlers[messageId][javascriptString](resultString);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
class Message {
|
|
39
|
-
constructor({ id, autoTrack = false }) {
|
|
40
|
-
this.id = id;
|
|
41
|
-
this.autoTrack = autoTrack;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Update the value of property "autoTrack"
|
|
45
|
-
* This function works only for the Message objects that were saved by calling "Messaging.saveMessage"
|
|
46
|
-
* @param {boolean} autoTrack: New value of property autoTrack.
|
|
47
|
-
*/
|
|
48
|
-
setAutoTrack(autoTrack) {
|
|
49
|
-
this.autoTrack = autoTrack;
|
|
50
|
-
RCTAEPMessaging.setAutoTrack(this.id, autoTrack);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Signals to the UIServices that the message should be shown.
|
|
54
|
-
* If autoTrack is true, calling this method will result in an "inapp.display" Edge Event being dispatched.
|
|
55
|
-
*/
|
|
56
|
-
show() {
|
|
57
|
-
RCTAEPMessaging.show(this.id);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Signals to the UIServices that the message should be dismissed.
|
|
61
|
-
* If `autoTrack` is true, calling this method will result in an "inapp.dismiss" Edge Event being dispatched.
|
|
62
|
-
* @param {boolean?} suppressAutoTrack: if set to true, the inapp.dismiss Edge Event will not be sent regardless
|
|
63
|
-
* of the autoTrack setting.
|
|
64
|
-
*/
|
|
65
|
-
dismiss(suppressAutoTrack) {
|
|
66
|
-
// iOS message.dismiss() accepts a boolean parameter to suppress autoTrack
|
|
67
|
-
// but on android side, message.dismiss() does not accept any parameters
|
|
68
|
-
if (react_native_1.Platform.OS === 'android') {
|
|
69
|
-
RCTAEPMessaging.dismiss(this.id);
|
|
70
|
-
}
|
|
71
|
-
if (react_native_1.Platform.OS === 'ios') {
|
|
72
|
-
RCTAEPMessaging.dismiss(this.id, suppressAutoTrack ? true : false);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Generates an Edge Event for the provided interaction and eventType.
|
|
77
|
-
* @param {string?} interaction: a custom String value to be recorded in the interaction
|
|
78
|
-
* @param {MessagingEdgeEventType} eventType: the MessagingEdgeEventType to be used for the ensuing Edge Event
|
|
79
|
-
*/
|
|
80
|
-
track(interaction, eventType) {
|
|
81
|
-
RCTAEPMessaging.track(this.id, interaction, eventType);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Clears the cached reference to the Message object.
|
|
85
|
-
* This function must be called if Message was saved by calling "MessagingDelegate.shouldSaveMessage" but no longer needed.
|
|
86
|
-
* Failure to call this function leads to memory leaks.
|
|
87
|
-
*/
|
|
88
|
-
clear() {
|
|
89
|
-
RCTAEPMessaging.clear(this.id);
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Adds a handler for named JavaScript messages sent from the message's WebView.
|
|
93
|
-
* The parameter passed to handler will contain the body of the message passed from the WebView's JavaScript.
|
|
94
|
-
* @param {string} handlerName: The name of the message that should be handled by the handler
|
|
95
|
-
* @param {function} handler: The method or closure to be called with the body of the message created in the Message's JavaScript
|
|
96
|
-
*/
|
|
97
|
-
handleJavascriptMessage(handlerName, handler) {
|
|
98
|
-
// Validate parameters
|
|
99
|
-
if (!handlerName) {
|
|
100
|
-
console.warn('[AEP Messaging] handleJavascriptMessage: handlerName is required');
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
if (typeof handler !== 'function') {
|
|
104
|
-
console.warn('[AEP Messaging] handleJavascriptMessage: handler must be a function');
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
// cache the callback
|
|
108
|
-
if (!jsMessageHandlers[this.id]) {
|
|
109
|
-
jsMessageHandlers[this.id] = {};
|
|
110
|
-
}
|
|
111
|
-
jsMessageHandlers[this.id][handlerName] = handler;
|
|
112
|
-
RCTAEPMessaging.handleJavascriptMessage(this.id, handlerName);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Asynchronously evaluates the specified JavaScript string in the context of the message's WebView.
|
|
116
|
-
* @param {string} javascriptString: The JavaScript string to evaluate.
|
|
117
|
-
* @param {function} callback: A callback to be invoked when the script execution completes with the result of the execution.
|
|
118
|
-
*/
|
|
119
|
-
evaluateJavascript(javascriptString, callback) {
|
|
120
|
-
// validate parameters
|
|
121
|
-
if (!javascriptString) {
|
|
122
|
-
console.warn('[AEP Messaging] evaluateJavascript: javascriptString is required');
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
if (typeof callback !== 'function') {
|
|
126
|
-
console.warn('[AEP Messaging] evaluateJavascript: callback must be a function');
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
// cache the callback
|
|
130
|
-
if (!jsResultHandlers[this.id]) {
|
|
131
|
-
jsResultHandlers[this.id] = {};
|
|
132
|
-
}
|
|
133
|
-
jsResultHandlers[this.id][javascriptString] = callback;
|
|
134
|
-
RCTAEPMessaging.evaluateJavascript(this.id, javascriptString);
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* @internal - For internal use only.
|
|
138
|
-
* Clears all the javascript message handlers for the message.
|
|
139
|
-
* This function must be called if the callbacks registered in handleJavascriptMessage are no longer needed.
|
|
140
|
-
* Failure to call this function may lead to memory leaks.
|
|
141
|
-
*/
|
|
142
|
-
_clearJavascriptMessageHandlers() {
|
|
143
|
-
delete jsMessageHandlers[this.id];
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* @internal - For internal use only.
|
|
147
|
-
* Clears all the javascript result handlers for the message.
|
|
148
|
-
* This function must be called if the callbacks registered in evaluateJavascript are no longer needed.
|
|
149
|
-
* Failure to call this function may lead to memory leaks.
|
|
150
|
-
*/
|
|
151
|
-
_clearJavascriptResultHandlers() {
|
|
152
|
-
delete jsResultHandlers[this.id];
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
exports.default = Message;
|
|
156
|
-
//# sourceMappingURL=Message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../src/models/Message.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;EAUE;;AAEF,+CAA2E;AAE3E,MAAM,eAAe,GAAG,4BAAa,CAAC,YAAY,CAAC;AAEnD,gGAAgG;AAChG,kDAAkD;AAClD,MAAM,iBAAiB,GAA8D,EAAE,CAAC;AAExF,kGAAkG;AAClG,uDAAuD;AACvD,MAAM,gBAAgB,GAA6D,EAAE,CAAC;AAEtF,MAAM,2BAA2B,GAAG,IAAI,iCAAkB,CAAC,eAAe,CAAC,CAAC;AAE5E,6HAA6H;AAC7H,2BAA2B,CAAC,WAAW,CAAC,qBAAqB,EAAE,CAAC,KAAK,EAAE,EAAE;IACvE,MAAM,EAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAC,GAAG,KAAK,CAAC;IAChD,IAAI,iBAAiB,CAAC,SAAS,CAAC,IAAI,iBAAiB,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9E,iBAAiB,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,2BAA2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C;YAChF,OAAO;QACT,CAAC;QAED,qBAAqB;QACrB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;YAC/B,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;QACjC,CAAC;QACD,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,gBAAgB,CAAC,GAAG,QAAQ,CAAC;QAEvD,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC;IAChE,CAAC;IAED;;;;;OAKG;IACH,+BAA+B;QAC7B,OAAO,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACH,8BAA8B;QAC5B,OAAO,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;CACF;AAED,kBAAe,OAAO,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Copyright 2023 Adobe. All rights reserved.
|
|
4
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
6
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
|
|
8
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
9
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
10
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
11
|
-
governing permissions and limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
//# sourceMappingURL=MessagingDelegate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessagingDelegate.js","sourceRoot":"","sources":["../../src/models/MessagingDelegate.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;EAUE"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Copyright 2023 Adobe. All rights reserved.
|
|
4
|
-
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License. You may obtain a copy
|
|
6
|
-
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
|
|
8
|
-
Unless required by applicable law or agreed to in writing, software distributed under
|
|
9
|
-
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
10
|
-
OF ANY KIND, either express or implied. See the License for the specific language
|
|
11
|
-
governing permissions and limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
var MessagingEdgeEventType;
|
|
15
|
-
(function (MessagingEdgeEventType) {
|
|
16
|
-
MessagingEdgeEventType[MessagingEdgeEventType["DISMISS"] = 0] = "DISMISS";
|
|
17
|
-
MessagingEdgeEventType[MessagingEdgeEventType["INTERACT"] = 1] = "INTERACT";
|
|
18
|
-
MessagingEdgeEventType[MessagingEdgeEventType["TRIGGER"] = 2] = "TRIGGER";
|
|
19
|
-
MessagingEdgeEventType[MessagingEdgeEventType["DISPLAY"] = 3] = "DISPLAY";
|
|
20
|
-
MessagingEdgeEventType[MessagingEdgeEventType["PUSH_APPLICATION_OPENED"] = 4] = "PUSH_APPLICATION_OPENED";
|
|
21
|
-
MessagingEdgeEventType[MessagingEdgeEventType["PUSH_CUSTOM_ACTION"] = 5] = "PUSH_CUSTOM_ACTION";
|
|
22
|
-
})(MessagingEdgeEventType || (MessagingEdgeEventType = {}));
|
|
23
|
-
exports.default = MessagingEdgeEventType;
|
|
24
|
-
//# sourceMappingURL=MessagingEdgeEventType.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessagingEdgeEventType.js","sourceRoot":"","sources":["../../src/models/MessagingEdgeEventType.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;EAUE;;AAEF,IAAK,sBAOJ;AAPD,WAAK,sBAAsB;IACzB,yEAAW,CAAA;IACX,2EAAY,CAAA;IACZ,yEAAW,CAAA;IACX,yEAAW,CAAA;IACX,yGAA2B,CAAA;IAC3B,+FAAsB,CAAA;AACxB,CAAC,EAPI,sBAAsB,KAAtB,sBAAsB,QAO1B;AAED,kBAAe,sBAAsB,CAAC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Copyright 2024 Adobe. All rights reserved.
|
|
4
|
-
This file is licensed to you under the Apache License, Version 2.0 (the
|
|
5
|
-
"License"); you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
|
|
8
|
-
or agreed to in writing, software distributed under the License is
|
|
9
|
-
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
|
|
10
|
-
ANY KIND, either express or implied. See the License for the specific
|
|
11
|
-
language governing permissions and limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.MessagingProposition = exports.MessageProposition = void 0;
|
|
15
|
-
const PersonalizationSchema_1 = require("./PersonalizationSchema");
|
|
16
|
-
const ContentCard_1 = require("./ContentCard");
|
|
17
|
-
const HTMLProposition_1 = require("./HTMLProposition");
|
|
18
|
-
const JSONProposition_1 = require("./JSONProposition");
|
|
19
|
-
const PropositionItem_1 = require("./PropositionItem");
|
|
20
|
-
class MessageProposition {
|
|
21
|
-
constructor(raw) {
|
|
22
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
23
|
-
this.id = (_a = raw === null || raw === void 0 ? void 0 : raw.id) !== null && _a !== void 0 ? _a : '';
|
|
24
|
-
this.scope = (_b = raw === null || raw === void 0 ? void 0 : raw.scope) !== null && _b !== void 0 ? _b : '';
|
|
25
|
-
this.scopeDetails = (_c = raw === null || raw === void 0 ? void 0 : raw.scopeDetails) !== null && _c !== void 0 ? _c : {};
|
|
26
|
-
// Mirror activity.id into activity.activityID for convenience
|
|
27
|
-
const activityIdFromScope = (_f = (_e = (_d = this.scopeDetails) === null || _d === void 0 ? void 0 : _d.activity) === null || _e === void 0 ? void 0 : _e.id) !== null && _f !== void 0 ? _f : '';
|
|
28
|
-
if ((_g = this.scopeDetails) === null || _g === void 0 ? void 0 : _g.activity) {
|
|
29
|
-
this.scopeDetails.activity.activityID = activityIdFromScope;
|
|
30
|
-
}
|
|
31
|
-
const rawItems = Array.isArray(raw === null || raw === void 0 ? void 0 : raw.items) ? raw.items : [];
|
|
32
|
-
this.items = rawItems.map((itemData) => {
|
|
33
|
-
var _a, _b, _c;
|
|
34
|
-
const activityId = (_c = (_b = (_a = this.scopeDetails) === null || _a === void 0 ? void 0 : _a.activity) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : '';
|
|
35
|
-
let instance;
|
|
36
|
-
switch (itemData === null || itemData === void 0 ? void 0 : itemData.schema) {
|
|
37
|
-
case PersonalizationSchema_1.PersonalizationSchema.CONTENT_CARD:
|
|
38
|
-
instance = new ContentCard_1.ContentCard(itemData);
|
|
39
|
-
instance.activityID = activityId;
|
|
40
|
-
return instance;
|
|
41
|
-
case PersonalizationSchema_1.PersonalizationSchema.HTML_CONTENT:
|
|
42
|
-
instance = new HTMLProposition_1.HTMLProposition(itemData);
|
|
43
|
-
instance.activityID = activityId;
|
|
44
|
-
return instance;
|
|
45
|
-
case PersonalizationSchema_1.PersonalizationSchema.JSON_CONTENT:
|
|
46
|
-
instance = new JSONProposition_1.JSONPropositionItem(itemData);
|
|
47
|
-
instance.activityID = activityId;
|
|
48
|
-
return instance;
|
|
49
|
-
default:
|
|
50
|
-
instance = new PropositionItem_1.PropositionItem(itemData);
|
|
51
|
-
instance.activityID = activityId;
|
|
52
|
-
return instance;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
exports.MessageProposition = MessageProposition;
|
|
58
|
-
exports.MessagingProposition = MessageProposition;
|
|
59
|
-
//# sourceMappingURL=MessagingProposition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessagingProposition.js","sourceRoot":"","sources":["../../src/models/MessagingProposition.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;EAUE;;;AAGF,mEAAgE;AAChE,+CAA4C;AAC5C,uDAAoD;AACpD,uDAAwD;AACxD,uDAAoD;AAEpD,MAAa,kBAAkB;IAM7B,YAAY,GAA6E;;QACvF,IAAI,CAAC,EAAE,GAAG,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,EAAE,mCAAI,EAAE,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,KAAK,mCAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,YAAY,GAAG,MAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,YAA6B,mCAAK,EAAmB,CAAC;QAEhF,8DAA8D;QAC9D,MAAM,mBAAmB,GAAG,MAAA,MAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,QAAQ,0CAAE,EAAE,mCAAI,EAAE,CAAC;QAClE,IAAI,MAAA,IAAI,CAAC,YAAY,0CAAE,QAAQ,EAAE,CAAC;YAC/B,IAAI,CAAC,YAAY,CAAC,QAAgB,CAAC,UAAU,GAAG,mBAAmB,CAAC;QACvE,CAAC;QAED,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,QAAa,EAAE,EAAE;;YAC1C,MAAM,UAAU,GAAG,MAAA,MAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,QAAQ,0CAAE,EAAE,mCAAI,EAAE,CAAC;YACzD,IAAI,QAAa,CAAC;YAClB,QAAQ,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,EAAE,CAAC;gBACzB,KAAK,6CAAqB,CAAC,YAAY;oBACrC,QAAQ,GAAG,IAAI,yBAAW,CAAC,QAAe,CAAC,CAAC;oBAC3C,QAAgB,CAAC,UAAU,GAAG,UAAU,CAAC;oBAC1C,OAAO,QAAQ,CAAC;gBAClB,KAAK,6CAAqB,CAAC,YAAY;oBACrC,QAAQ,GAAG,IAAI,iCAAe,CAAC,QAAe,CAAC,CAAC;oBAC/C,QAAgB,CAAC,UAAU,GAAG,UAAU,CAAC;oBAC1C,OAAO,QAAQ,CAAC;gBAClB,KAAK,6CAAqB,CAAC,YAAY;oBACrC,QAAQ,GAAG,IAAI,qCAAmB,CAAC,QAAe,CAAC,CAAC;oBACnD,QAAgB,CAAC,UAAU,GAAG,UAAU,CAAC;oBAC1C,OAAO,QAAQ,CAAC;gBAClB;oBACE,QAAQ,GAAG,IAAI,iCAAe,CAAC,QAAe,CAAC,CAAC;oBAC/C,QAAgB,CAAC,UAAU,GAAG,UAAU,CAAC;oBAC1C,OAAO,QAAQ,CAAC;YACpB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAzCD,gDAyCC;AAE8B,kDAAoB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessagingPropositionItem.js","sourceRoot":"","sources":["../../src/models/MessagingPropositionItem.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;EAUE"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Copyright 2024 Adobe. All rights reserved.
|
|
4
|
-
This file is licensed to you under the Apache License, Version 2.0 (the
|
|
5
|
-
"License"); you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
|
|
8
|
-
or agreed to in writing, software distributed under the License is
|
|
9
|
-
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
|
|
10
|
-
ANY KIND, either express or implied. See the License for the specific
|
|
11
|
-
language governing permissions and limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.PersonalizationSchema = void 0;
|
|
15
|
-
var PersonalizationSchema;
|
|
16
|
-
(function (PersonalizationSchema) {
|
|
17
|
-
PersonalizationSchema["CONTENT_CARD"] = "https://ns.adobe.com/personalization/message/content-card";
|
|
18
|
-
PersonalizationSchema["DEFAULT_CONTENT"] = "https://ns.adobe.com/personalization/default-content-item";
|
|
19
|
-
PersonalizationSchema["HTML_CONTENT"] = "https://ns.adobe.com/personalization/html-content-item";
|
|
20
|
-
PersonalizationSchema["IN_APP"] = "https://ns.adobe.com/personalization/message/in-app";
|
|
21
|
-
PersonalizationSchema["JSON_CONTENT"] = "https://ns.adobe.com/personalization/json-content-item";
|
|
22
|
-
PersonalizationSchema["NATIVE_ALERT"] = "https://ns.adobe.com/personalization/message/native-alert";
|
|
23
|
-
PersonalizationSchema["RULESET_ITEM"] = "https://ns.adobe.com/personalization/ruleset-item";
|
|
24
|
-
})(PersonalizationSchema || (exports.PersonalizationSchema = PersonalizationSchema = {}));
|
|
25
|
-
//# sourceMappingURL=PersonalizationSchema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PersonalizationSchema.js","sourceRoot":"","sources":["../../src/models/PersonalizationSchema.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;EAUE;;;AAEF,IAAY,qBAQX;AARD,WAAY,qBAAqB;IAC/B,mGAA0E,CAAA;IAC1E,sGAA6E,CAAA;IAC7E,gGAAuE,CAAA;IACvE,uFAA8D,CAAA;IAC9D,gGAAuE,CAAA;IACvE,mGAA0E,CAAA;IAC1E,2FAAkE,CAAA;AACpE,CAAC,EARW,qBAAqB,qCAArB,qBAAqB,QAQhC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
Copyright 2025 Adobe. All rights reserved.
|
|
4
|
-
This file is licensed to you under the Apache License, Version 2.0 (the
|
|
5
|
-
"License"); you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
|
|
8
|
-
or agreed to in writing, software distributed under the License is
|
|
9
|
-
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
|
|
10
|
-
ANY KIND, either express or implied. See the License for the specific
|
|
11
|
-
language governing permissions and limitations under the License.
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.PropositionItem = void 0;
|
|
15
|
-
const react_native_1 = require("react-native");
|
|
16
|
-
const RCTAEPMessaging = react_native_1.NativeModules.AEPMessaging;
|
|
17
|
-
/**
|
|
18
|
-
* A PropositionItem represents a personalization JSON object returned by Konductor.
|
|
19
|
-
* This is the base class that provides tracking functionality for all proposition items
|
|
20
|
-
* including ContentCards, InApp messages, and code-based experiences.
|
|
21
|
-
*
|
|
22
|
-
* This mirrors the native Android PropositionItem class functionality.
|
|
23
|
-
*/
|
|
24
|
-
class PropositionItem {
|
|
25
|
-
constructor(propositionItemData) {
|
|
26
|
-
this.id = propositionItemData.id;
|
|
27
|
-
this.schema = propositionItemData.schema;
|
|
28
|
-
this.data = propositionItemData.data;
|
|
29
|
-
this.uuid = propositionItemData.uuid;
|
|
30
|
-
this.activityID = propositionItemData.activityID;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Gets the PropositionItem identifier.
|
|
34
|
-
*
|
|
35
|
-
* @returns {string} The PropositionItem identifier
|
|
36
|
-
*/
|
|
37
|
-
getItemId() {
|
|
38
|
-
return this.id;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Gets the PropositionItem content schema.
|
|
42
|
-
*
|
|
43
|
-
* @returns {PersonalizationSchema} The PropositionItem content schema
|
|
44
|
-
*/
|
|
45
|
-
getSchema() {
|
|
46
|
-
return this.schema;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Gets the PropositionItem data.
|
|
50
|
-
*
|
|
51
|
-
* @returns {object} The PropositionItem data
|
|
52
|
-
*/
|
|
53
|
-
getItemData() {
|
|
54
|
-
return this.data;
|
|
55
|
-
}
|
|
56
|
-
// Implementation
|
|
57
|
-
track(interactionOrEventType, eventType, tokens) {
|
|
58
|
-
// Handle overloaded method signatures
|
|
59
|
-
if (typeof interactionOrEventType === 'number' && eventType === undefined) {
|
|
60
|
-
// First overload: track(eventType)
|
|
61
|
-
this.trackWithDetails(null, interactionOrEventType, null);
|
|
62
|
-
}
|
|
63
|
-
else if (typeof interactionOrEventType === 'string' || interactionOrEventType === null) {
|
|
64
|
-
// Second overload: track(interaction, eventType, tokens)
|
|
65
|
-
this.trackWithDetails(interactionOrEventType, eventType, tokens || null);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Internal method that performs the actual tracking
|
|
70
|
-
*/
|
|
71
|
-
trackWithDetails(interaction, eventType, tokens) {
|
|
72
|
-
var _a;
|
|
73
|
-
const nativeIdentifier = (_a = this.activityID) !== null && _a !== void 0 ? _a : null;
|
|
74
|
-
RCTAEPMessaging.trackPropositionItem(nativeIdentifier, interaction, eventType, tokens);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
exports.PropositionItem = PropositionItem;
|
|
78
|
-
//# sourceMappingURL=PropositionItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PropositionItem.js","sourceRoot":"","sources":["../../src/models/PropositionItem.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;EAUE;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