@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.
Files changed (293) hide show
  1. package/RCTAEPMessaging.podspec +1 -1
  2. package/README.md +145 -16
  3. package/android/src/main/java/com/adobe/marketing/mobile/reactnative/messaging/RCTAEPMessagingConstants.java +3 -0
  4. package/android/src/main/java/com/adobe/marketing/mobile/reactnative/messaging/RCTAEPMessagingModule.java +103 -33
  5. package/babel.config.js +3 -0
  6. package/dist/module/Messaging.js +334 -0
  7. package/dist/module/Messaging.js.map +1 -0
  8. package/dist/module/index.js +30 -0
  9. package/dist/module/index.js.map +1 -0
  10. package/dist/module/models/ContentCard.js +24 -0
  11. package/dist/module/models/ContentCard.js.map +1 -0
  12. package/dist/{models → module/models}/HTMLProposition.js +8 -9
  13. package/dist/module/models/HTMLProposition.js.map +1 -0
  14. package/dist/module/models/InAppMessage.js +4 -0
  15. package/dist/module/models/InAppMessage.js.map +1 -0
  16. package/dist/module/models/JSONProposition.js +22 -0
  17. package/dist/module/models/JSONProposition.js.map +1 -0
  18. package/dist/module/models/Message.js +182 -0
  19. package/dist/module/models/Message.js.map +1 -0
  20. package/dist/module/models/MessagingDelegate.js +4 -0
  21. package/dist/module/models/MessagingDelegate.js.map +1 -0
  22. package/dist/module/models/MessagingEdgeEventType.js +24 -0
  23. package/dist/module/models/MessagingEdgeEventType.js.map +1 -0
  24. package/dist/module/models/MessagingProposition.js +57 -0
  25. package/dist/module/models/MessagingProposition.js.map +1 -0
  26. package/dist/module/models/MessagingPropositionItem.js +4 -0
  27. package/dist/module/models/MessagingPropositionItem.js.map +1 -0
  28. package/dist/module/models/PersonalizationSchema.js +26 -0
  29. package/dist/module/models/PersonalizationSchema.js.map +1 -0
  30. package/dist/module/models/PropositionItem.js +113 -0
  31. package/dist/module/models/PropositionItem.js.map +1 -0
  32. package/dist/module/models/ScopeDetails.js +2 -0
  33. package/dist/module/models/ScopeDetails.js.map +1 -0
  34. package/dist/{models/JSONProposition.js → module/models/index.js} +14 -12
  35. package/dist/module/models/index.js.map +1 -0
  36. package/dist/module/ui/components/Button/Button.js +57 -0
  37. package/dist/module/ui/components/Button/Button.js.map +1 -0
  38. package/dist/module/ui/components/Button/Button.spec.js +476 -0
  39. package/dist/module/ui/components/Button/Button.spec.js.map +1 -0
  40. package/dist/module/ui/components/ContentCardView/ContentCardView.js +257 -0
  41. package/dist/module/ui/components/ContentCardView/ContentCardView.js.map +1 -0
  42. package/dist/module/ui/components/ContentCardView/ContentCardView.spec.js +363 -0
  43. package/dist/module/ui/components/ContentCardView/ContentCardView.spec.js.map +1 -0
  44. package/dist/module/ui/components/DismissButton/DismissButton.js +70 -0
  45. package/dist/module/ui/components/DismissButton/DismissButton.js.map +1 -0
  46. package/dist/module/ui/components/DismissButton/DismissButton.spec.js +279 -0
  47. package/dist/module/ui/components/DismissButton/DismissButton.spec.js.map +1 -0
  48. package/dist/module/ui/components/FullScreenCenterView/FullScreenCenterView.js +34 -0
  49. package/dist/module/ui/components/FullScreenCenterView/FullScreenCenterView.js.map +1 -0
  50. package/dist/module/ui/components/Inbox/EmptyState.js +64 -0
  51. package/dist/module/ui/components/Inbox/EmptyState.js.map +1 -0
  52. package/dist/module/ui/components/Inbox/Inbox.js +235 -0
  53. package/dist/module/ui/components/Inbox/Inbox.js.map +1 -0
  54. package/dist/module/ui/components/Inbox/Inbox.spec.js +847 -0
  55. package/dist/module/ui/components/Inbox/Inbox.spec.js.map +1 -0
  56. package/dist/module/ui/components/Pagination/Pagination.js +176 -0
  57. package/dist/module/ui/components/Pagination/Pagination.js.map +1 -0
  58. package/dist/module/ui/components/Pagination/Pagination.spec.js +193 -0
  59. package/dist/module/ui/components/Pagination/Pagination.spec.js.map +1 -0
  60. package/dist/module/ui/components/UnreadIcon/UnreadIcon.js +184 -0
  61. package/dist/module/ui/components/UnreadIcon/UnreadIcon.js.map +1 -0
  62. package/dist/module/ui/components/UnreadIcon/UnreadIcon.spec.js +815 -0
  63. package/dist/module/ui/components/UnreadIcon/UnreadIcon.spec.js.map +1 -0
  64. package/dist/{models/ContentCard.js → module/ui/components/index.js} +12 -12
  65. package/dist/module/ui/components/index.js.map +1 -0
  66. package/dist/module/ui/hooks/index.js +18 -0
  67. package/dist/module/ui/hooks/index.js.map +1 -0
  68. package/dist/module/ui/hooks/useAspectRatio.js +33 -0
  69. package/dist/module/ui/hooks/useAspectRatio.js.map +1 -0
  70. package/dist/module/ui/hooks/useAspectRatio.spec.js +65 -0
  71. package/dist/module/ui/hooks/useAspectRatio.spec.js.map +1 -0
  72. package/dist/module/ui/hooks/useContentCardUI.js +51 -0
  73. package/dist/module/ui/hooks/useContentCardUI.js.map +1 -0
  74. package/dist/module/ui/hooks/useContentCardUI.spec.js +85 -0
  75. package/dist/module/ui/hooks/useContentCardUI.spec.js.map +1 -0
  76. package/dist/module/ui/hooks/useInbox.js +49 -0
  77. package/dist/module/ui/hooks/useInbox.js.map +1 -0
  78. package/dist/module/ui/hooks/useInbox.spec.js +93 -0
  79. package/dist/module/ui/hooks/useInbox.spec.js.map +1 -0
  80. package/dist/module/ui/hooks/useInboxSettings.js +26 -0
  81. package/dist/module/ui/hooks/useInboxSettings.js.map +1 -0
  82. package/dist/module/ui/hooks/useInboxSettings.spec.js +50 -0
  83. package/dist/module/ui/hooks/useInboxSettings.spec.js.map +1 -0
  84. package/dist/module/ui/index.js +10 -0
  85. package/dist/module/ui/index.js.map +1 -0
  86. package/dist/module/ui/providers/InboxProvider.js +27 -0
  87. package/dist/module/ui/providers/InboxProvider.js.map +1 -0
  88. package/dist/module/ui/theme/Theme.js +2 -0
  89. package/dist/module/ui/theme/Theme.js.map +1 -0
  90. package/dist/module/ui/theme/ThemeProvider.js +112 -0
  91. package/dist/module/ui/theme/ThemeProvider.js.map +1 -0
  92. package/dist/{models/InAppMessage.js → module/ui/theme/index.js} +6 -3
  93. package/dist/module/ui/theme/index.js.map +1 -0
  94. package/dist/module/ui/types/ContentViewEvent.js +2 -0
  95. package/dist/module/ui/types/ContentViewEvent.js.map +1 -0
  96. package/dist/module/ui/types/Templates.js +26 -0
  97. package/dist/module/ui/types/Templates.js.map +1 -0
  98. package/dist/{models/ScopeDetails.js → module/ui/types/index.js} +6 -3
  99. package/dist/module/ui/types/index.js.map +1 -0
  100. package/dist/module/ui/utils/generateCardHash.js +50 -0
  101. package/dist/module/ui/utils/generateCardHash.js.map +1 -0
  102. package/dist/module/ui/utils/generateCardHash.spec.js +103 -0
  103. package/dist/module/ui/utils/generateCardHash.spec.js.map +1 -0
  104. package/dist/module/ui/utils/inboxStorage.js +65 -0
  105. package/dist/module/ui/utils/inboxStorage.js.map +1 -0
  106. package/dist/module/ui/utils/inboxStorage.spec.js +123 -0
  107. package/dist/module/ui/utils/inboxStorage.spec.js.map +1 -0
  108. package/dist/module/ui/utils/index.js +5 -0
  109. package/dist/module/ui/utils/index.js.map +1 -0
  110. package/dist/{Messaging.d.ts → typescript/Messaging.d.ts} +23 -7
  111. package/dist/typescript/Messaging.d.ts.map +1 -0
  112. package/dist/{index.d.ts → typescript/index.d.ts} +4 -2
  113. package/dist/typescript/index.d.ts.map +1 -0
  114. package/dist/typescript/models/ContentCard.d.ts +57 -0
  115. package/dist/typescript/models/ContentCard.d.ts.map +1 -0
  116. package/dist/{models → typescript/models}/HTMLProposition.d.ts +1 -0
  117. package/dist/typescript/models/HTMLProposition.d.ts.map +1 -0
  118. package/dist/{models → typescript/models}/InAppMessage.d.ts +1 -0
  119. package/dist/typescript/models/InAppMessage.d.ts.map +1 -0
  120. package/dist/{models → typescript/models}/JSONProposition.d.ts +1 -0
  121. package/dist/typescript/models/JSONProposition.d.ts.map +1 -0
  122. package/dist/{models → typescript/models}/Message.d.ts +14 -0
  123. package/dist/typescript/models/Message.d.ts.map +1 -0
  124. package/dist/{models → typescript/models}/MessagingDelegate.d.ts +1 -0
  125. package/dist/typescript/models/MessagingDelegate.d.ts.map +1 -0
  126. package/dist/{models → typescript/models}/MessagingEdgeEventType.d.ts +1 -0
  127. package/dist/typescript/models/MessagingEdgeEventType.d.ts.map +1 -0
  128. package/dist/{models → typescript/models}/MessagingProposition.d.ts +1 -0
  129. package/dist/typescript/models/MessagingProposition.d.ts.map +1 -0
  130. package/dist/{models → typescript/models}/MessagingPropositionItem.d.ts +1 -0
  131. package/dist/typescript/models/MessagingPropositionItem.d.ts.map +1 -0
  132. package/dist/{models → typescript/models}/PersonalizationSchema.d.ts +2 -0
  133. package/dist/typescript/models/PersonalizationSchema.d.ts.map +1 -0
  134. package/dist/{models → typescript/models}/PropositionItem.d.ts +1 -0
  135. package/dist/typescript/models/PropositionItem.d.ts.map +1 -0
  136. package/dist/{models → typescript/models}/ScopeDetails.d.ts +1 -0
  137. package/dist/typescript/models/ScopeDetails.d.ts.map +1 -0
  138. package/dist/typescript/models/index.d.ts +11 -0
  139. package/dist/typescript/models/index.d.ts.map +1 -0
  140. package/dist/typescript/ui/components/Button/Button.d.ts +14 -0
  141. package/dist/typescript/ui/components/Button/Button.d.ts.map +1 -0
  142. package/dist/typescript/ui/components/Button/Button.spec.d.ts +2 -0
  143. package/dist/typescript/ui/components/Button/Button.spec.d.ts.map +1 -0
  144. package/dist/typescript/ui/components/ContentCardView/ContentCardView.d.ts +39 -0
  145. package/dist/typescript/ui/components/ContentCardView/ContentCardView.d.ts.map +1 -0
  146. package/dist/typescript/ui/components/ContentCardView/ContentCardView.spec.d.ts +2 -0
  147. package/dist/typescript/ui/components/ContentCardView/ContentCardView.spec.d.ts.map +1 -0
  148. package/dist/typescript/ui/components/DismissButton/DismissButton.d.ts +13 -0
  149. package/dist/typescript/ui/components/DismissButton/DismissButton.d.ts.map +1 -0
  150. package/dist/typescript/ui/components/DismissButton/DismissButton.spec.d.ts +2 -0
  151. package/dist/typescript/ui/components/DismissButton/DismissButton.spec.d.ts.map +1 -0
  152. package/dist/typescript/ui/components/FullScreenCenterView/FullScreenCenterView.d.ts +5 -0
  153. package/dist/typescript/ui/components/FullScreenCenterView/FullScreenCenterView.d.ts.map +1 -0
  154. package/dist/typescript/ui/components/Inbox/EmptyState.d.ts +19 -0
  155. package/dist/typescript/ui/components/Inbox/EmptyState.d.ts.map +1 -0
  156. package/dist/typescript/ui/components/Inbox/Inbox.d.ts +21 -0
  157. package/dist/typescript/ui/components/Inbox/Inbox.d.ts.map +1 -0
  158. package/dist/typescript/ui/components/Inbox/Inbox.spec.d.ts +2 -0
  159. package/dist/typescript/ui/components/Inbox/Inbox.spec.d.ts.map +1 -0
  160. package/dist/typescript/ui/components/Pagination/Pagination.d.ts +14 -0
  161. package/dist/typescript/ui/components/Pagination/Pagination.d.ts.map +1 -0
  162. package/dist/typescript/ui/components/Pagination/Pagination.spec.d.ts +2 -0
  163. package/dist/typescript/ui/components/Pagination/Pagination.spec.d.ts.map +1 -0
  164. package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.d.ts +14 -0
  165. package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.d.ts.map +1 -0
  166. package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.spec.d.ts +2 -0
  167. package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.spec.d.ts.map +1 -0
  168. package/dist/typescript/ui/components/index.d.ts +10 -0
  169. package/dist/typescript/ui/components/index.d.ts.map +1 -0
  170. package/dist/typescript/ui/hooks/index.d.ts +4 -0
  171. package/dist/typescript/ui/hooks/index.d.ts.map +1 -0
  172. package/dist/typescript/ui/hooks/useAspectRatio.d.ts +3 -0
  173. package/dist/typescript/ui/hooks/useAspectRatio.d.ts.map +1 -0
  174. package/dist/typescript/ui/hooks/useAspectRatio.spec.d.ts +2 -0
  175. package/dist/typescript/ui/hooks/useAspectRatio.spec.d.ts.map +1 -0
  176. package/dist/typescript/ui/hooks/useContentCardUI.d.ts +14 -0
  177. package/dist/typescript/ui/hooks/useContentCardUI.d.ts.map +1 -0
  178. package/dist/typescript/ui/hooks/useContentCardUI.spec.d.ts +2 -0
  179. package/dist/typescript/ui/hooks/useContentCardUI.spec.d.ts.map +1 -0
  180. package/dist/typescript/ui/hooks/useInbox.d.ts +12 -0
  181. package/dist/typescript/ui/hooks/useInbox.d.ts.map +1 -0
  182. package/dist/typescript/ui/hooks/useInbox.spec.d.ts +2 -0
  183. package/dist/typescript/ui/hooks/useInbox.spec.d.ts.map +1 -0
  184. package/dist/typescript/ui/hooks/useInboxSettings.d.ts +7 -0
  185. package/dist/typescript/ui/hooks/useInboxSettings.d.ts.map +1 -0
  186. package/dist/typescript/ui/hooks/useInboxSettings.spec.d.ts +2 -0
  187. package/dist/typescript/ui/hooks/useInboxSettings.spec.d.ts.map +1 -0
  188. package/dist/typescript/ui/index.d.ts +8 -0
  189. package/dist/typescript/ui/index.d.ts.map +1 -0
  190. package/dist/typescript/ui/providers/InboxProvider.d.ts +56 -0
  191. package/dist/typescript/ui/providers/InboxProvider.d.ts.map +1 -0
  192. package/dist/typescript/ui/theme/Theme.d.ts +44 -0
  193. package/dist/typescript/ui/theme/Theme.d.ts.map +1 -0
  194. package/dist/typescript/ui/theme/ThemeProvider.d.ts +21 -0
  195. package/dist/typescript/ui/theme/ThemeProvider.d.ts.map +1 -0
  196. package/dist/typescript/ui/theme/index.d.ts +3 -0
  197. package/dist/typescript/ui/theme/index.d.ts.map +1 -0
  198. package/dist/typescript/ui/types/ContentViewEvent.d.ts +9 -0
  199. package/dist/typescript/ui/types/ContentViewEvent.d.ts.map +1 -0
  200. package/dist/typescript/ui/types/Templates.d.ts +43 -0
  201. package/dist/typescript/ui/types/Templates.d.ts.map +1 -0
  202. package/dist/typescript/ui/types/index.d.ts +3 -0
  203. package/dist/typescript/ui/types/index.d.ts.map +1 -0
  204. package/dist/typescript/ui/utils/generateCardHash.d.ts +21 -0
  205. package/dist/typescript/ui/utils/generateCardHash.d.ts.map +1 -0
  206. package/dist/typescript/ui/utils/generateCardHash.spec.d.ts +2 -0
  207. package/dist/typescript/ui/utils/generateCardHash.spec.d.ts.map +1 -0
  208. package/dist/typescript/ui/utils/inboxStorage.d.ts +20 -0
  209. package/dist/typescript/ui/utils/inboxStorage.d.ts.map +1 -0
  210. package/dist/typescript/ui/utils/inboxStorage.spec.d.ts +2 -0
  211. package/dist/typescript/ui/utils/inboxStorage.spec.d.ts.map +1 -0
  212. package/dist/typescript/ui/utils/index.d.ts +3 -0
  213. package/dist/typescript/ui/utils/index.d.ts.map +1 -0
  214. package/ios/src/RCTAEPMessaging.mm +15 -0
  215. package/ios/src/RCTAEPMessaging.swift +61 -3
  216. package/ios/src/RCTAEPMessagingConstants.swift +4 -1
  217. package/jest.config.js +15 -0
  218. package/package.json +33 -5
  219. package/src/Messaging.ts +288 -32
  220. package/src/index.ts +3 -3
  221. package/src/models/ContentCard.ts +52 -27
  222. package/src/models/HTMLProposition.ts +1 -1
  223. package/src/models/JSONProposition.ts +1 -1
  224. package/src/models/Message.ts +50 -0
  225. package/src/models/PersonalizationSchema.ts +1 -0
  226. package/src/models/index.ts +22 -0
  227. package/src/ui/components/Button/Button.spec.tsx +496 -0
  228. package/src/ui/components/Button/Button.tsx +76 -0
  229. package/src/ui/components/ContentCardView/ContentCardView.spec.tsx +278 -0
  230. package/src/ui/components/ContentCardView/ContentCardView.tsx +400 -0
  231. package/src/ui/components/DismissButton/DismissButton.spec.tsx +314 -0
  232. package/src/ui/components/DismissButton/DismissButton.tsx +100 -0
  233. package/src/ui/components/FullScreenCenterView/FullScreenCenterView.tsx +32 -0
  234. package/src/ui/components/Inbox/EmptyState.tsx +89 -0
  235. package/src/ui/components/Inbox/Inbox.spec.tsx +478 -0
  236. package/src/ui/components/Inbox/Inbox.tsx +275 -0
  237. package/src/ui/components/Pagination/Pagination.spec.tsx +159 -0
  238. package/src/ui/components/Pagination/Pagination.tsx +222 -0
  239. package/src/ui/components/UnreadIcon/UnreadIcon.spec.tsx +878 -0
  240. package/src/ui/components/UnreadIcon/UnreadIcon.tsx +234 -0
  241. package/src/ui/components/index.ts +22 -0
  242. package/{dist/models/MessagingPropositionItem.js → src/ui/hooks/index.ts} +5 -4
  243. package/src/ui/hooks/useAspectRatio.spec.tsx +66 -0
  244. package/src/ui/hooks/useAspectRatio.tsx +39 -0
  245. package/src/ui/hooks/useContentCardUI.spec.tsx +82 -0
  246. package/src/ui/hooks/useContentCardUI.ts +48 -0
  247. package/src/ui/hooks/useInbox.spec.tsx +87 -0
  248. package/src/ui/hooks/useInbox.ts +46 -0
  249. package/src/ui/hooks/useInboxSettings.spec.tsx +41 -0
  250. package/src/ui/hooks/useInboxSettings.ts +24 -0
  251. package/src/ui/index.ts +7 -0
  252. package/src/ui/providers/InboxProvider.tsx +79 -0
  253. package/src/ui/theme/Theme.ts +57 -0
  254. package/src/ui/theme/ThemeProvider.tsx +120 -0
  255. package/src/ui/theme/index.ts +14 -0
  256. package/src/ui/types/ContentViewEvent.ts +20 -0
  257. package/src/ui/types/Templates.ts +77 -0
  258. package/src/ui/types/index.ts +14 -0
  259. package/src/ui/utils/generateCardHash.spec.tsx +86 -0
  260. package/src/ui/utils/generateCardHash.ts +59 -0
  261. package/src/ui/utils/inboxStorage.spec.tsx +136 -0
  262. package/src/ui/utils/inboxStorage.ts +64 -0
  263. package/src/ui/utils/index.ts +3 -0
  264. package/tutorials/ContentCardCustomizationGuide.md +661 -0
  265. package/tutorials/ContentCards.md +419 -0
  266. package/tutorials/In-App Messaging.md +31 -0
  267. package/tutorials/Inbox.md +515 -0
  268. package/tutorials/resources/image-only-template.png +0 -0
  269. package/tutorials/resources/large-image-template.png +0 -0
  270. package/tutorials/resources/small-image-template.png +0 -0
  271. package/dist/Messaging.js +0 -151
  272. package/dist/Messaging.js.map +0 -1
  273. package/dist/index.js +0 -34
  274. package/dist/index.js.map +0 -1
  275. package/dist/models/ContentCard.d.ts +0 -51
  276. package/dist/models/ContentCard.js.map +0 -1
  277. package/dist/models/HTMLProposition.js.map +0 -1
  278. package/dist/models/InAppMessage.js.map +0 -1
  279. package/dist/models/JSONProposition.js.map +0 -1
  280. package/dist/models/Message.js +0 -114
  281. package/dist/models/Message.js.map +0 -1
  282. package/dist/models/MessagingDelegate.js +0 -14
  283. package/dist/models/MessagingDelegate.js.map +0 -1
  284. package/dist/models/MessagingEdgeEventType.js +0 -24
  285. package/dist/models/MessagingEdgeEventType.js.map +0 -1
  286. package/dist/models/MessagingProposition.js +0 -59
  287. package/dist/models/MessagingProposition.js.map +0 -1
  288. package/dist/models/MessagingPropositionItem.js.map +0 -1
  289. package/dist/models/PersonalizationSchema.js +0 -25
  290. package/dist/models/PersonalizationSchema.js.map +0 -1
  291. package/dist/models/PropositionItem.js +0 -78
  292. package/dist/models/PropositionItem.js.map +0 -1
  293. 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"}
@@ -1,114 +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
- const handleJSMessageEventEmitter = new react_native_1.NativeEventEmitter(RCTAEPMessaging);
20
- // invokes the callback registered in Message.handleJavascriptMessage with the content received from the inAppMessage webview
21
- handleJSMessageEventEmitter.addListener('onJavascriptMessage', (event) => {
22
- const { messageId, handlerName, content } = event;
23
- if (jsMessageHandlers[messageId] && jsMessageHandlers[messageId][handlerName]) {
24
- jsMessageHandlers[messageId][handlerName](content);
25
- }
26
- });
27
- class Message {
28
- constructor({ id, autoTrack = false }) {
29
- this.id = id;
30
- this.autoTrack = autoTrack;
31
- }
32
- /**
33
- * Update the value of property "autoTrack"
34
- * This function works only for the Message objects that were saved by calling "Messaging.saveMessage"
35
- * @param {boolean} autoTrack: New value of property autoTrack.
36
- */
37
- setAutoTrack(autoTrack) {
38
- this.autoTrack = autoTrack;
39
- RCTAEPMessaging.setAutoTrack(this.id, autoTrack);
40
- }
41
- /**
42
- * Signals to the UIServices that the message should be shown.
43
- * If autoTrack is true, calling this method will result in an "inapp.display" Edge Event being dispatched.
44
- */
45
- show() {
46
- RCTAEPMessaging.show(this.id);
47
- }
48
- /**
49
- * Signals to the UIServices that the message should be dismissed.
50
- * If `autoTrack` is true, calling this method will result in an "inapp.dismiss" Edge Event being dispatched.
51
- * @param {boolean?} suppressAutoTrack: if set to true, the inapp.dismiss Edge Event will not be sent regardless
52
- * of the autoTrack setting.
53
- */
54
- dismiss(suppressAutoTrack) {
55
- // iOS message.dismiss() accepts a boolean parameter to suppress autoTrack
56
- // but on android side, message.dismiss() does not accept any parameters
57
- if (react_native_1.Platform.OS === 'android') {
58
- RCTAEPMessaging.dismiss(this.id);
59
- }
60
- if (react_native_1.Platform.OS === 'ios') {
61
- RCTAEPMessaging.dismiss(this.id, suppressAutoTrack ? true : false);
62
- }
63
- }
64
- /**
65
- * Generates an Edge Event for the provided interaction and eventType.
66
- * @param {string?} interaction: a custom String value to be recorded in the interaction
67
- * @param {MessagingEdgeEventType} eventType: the MessagingEdgeEventType to be used for the ensuing Edge Event
68
- */
69
- track(interaction, eventType) {
70
- RCTAEPMessaging.track(this.id, interaction, eventType);
71
- }
72
- /**
73
- * Clears the cached reference to the Message object.
74
- * This function must be called if Message was saved by calling "MessagingDelegate.shouldSaveMessage" but no longer needed.
75
- * Failure to call this function leads to memory leaks.
76
- */
77
- clear() {
78
- RCTAEPMessaging.clear(this.id);
79
- }
80
- /**
81
- * Adds a handler for named JavaScript messages sent from the message's WebView.
82
- * The parameter passed to handler will contain the body of the message passed from the WebView's JavaScript.
83
- * @param {string} handlerName: The name of the message that should be handled by the handler
84
- * @param {function} handler: The method or closure to be called with the body of the message created in the Message's JavaScript
85
- */
86
- handleJavascriptMessage(handlerName, handler) {
87
- // Validate parameters
88
- if (!handlerName) {
89
- console.warn('[AEP Messaging] handleJavascriptMessage: handlerName is required');
90
- return;
91
- }
92
- if (typeof handler !== 'function') {
93
- console.warn('[AEP Messaging] handleJavascriptMessage: handler must be a function');
94
- return;
95
- }
96
- // cache the callback
97
- if (!jsMessageHandlers[this.id]) {
98
- jsMessageHandlers[this.id] = {};
99
- }
100
- jsMessageHandlers[this.id][handlerName] = handler;
101
- RCTAEPMessaging.handleJavascriptMessage(this.id, handlerName);
102
- }
103
- /**
104
- * @internal - For internal use only.
105
- * Clears all the javascript message handlers for the message.
106
- * This function must be called if the callbacks registered in handleJavascriptMessage are no longer needed.
107
- * Failure to call this function may lead to memory leaks.
108
- */
109
- _clearJavascriptMessageHandlers() {
110
- delete jsMessageHandlers[this.id];
111
- }
112
- }
113
- exports.default = Message;
114
- //# 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;AACxF,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,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7E,sBAAsB;QACtB,IAAI,CAAC,WAAW,EAAE;YAChB,OAAO,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;YACjF,OAAO;SACR;QAED,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;YACjC,OAAO,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAC;YACpF,OAAO;SACR;QAED,qBAAqB;QACrB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;YAC/B,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;SACjC;QACD,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC;QAClD,eAAe,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;IAChE,CAAC;IAED;;;;;OAKG;IACH,+BAA+B;QAC7B,OAAO,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpC,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,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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 || (exports.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,GAArB,6BAAqB,KAArB,6BAAqB,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;;;AAEF,+CAA6C;AAI7C,MAAM,eAAe,GAAG,4BAAa,CAAC,YAAY,CAAC;AAenD;;;;;;GAMG;AACH,MAAa,eAAe;IAO1B,YAAY,mBAAwC;QAClD,IAAI,CAAC,EAAE,GAAG,mBAAmB,CAAC,EAAE,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;QACrC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,EAAE,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,OAA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