@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.
Files changed (289) 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/RCTAEPMessagingModule.java +82 -32
  4. package/babel.config.js +3 -0
  5. package/dist/module/Messaging.js +334 -0
  6. package/dist/module/Messaging.js.map +1 -0
  7. package/dist/module/index.js +30 -0
  8. package/dist/module/index.js.map +1 -0
  9. package/dist/module/models/ContentCard.js +24 -0
  10. package/dist/module/models/ContentCard.js.map +1 -0
  11. package/dist/{models → module/models}/HTMLProposition.js +8 -9
  12. package/dist/module/models/HTMLProposition.js.map +1 -0
  13. package/dist/module/models/InAppMessage.js +4 -0
  14. package/dist/module/models/InAppMessage.js.map +1 -0
  15. package/dist/module/models/JSONProposition.js +22 -0
  16. package/dist/module/models/JSONProposition.js.map +1 -0
  17. package/dist/module/models/Message.js +182 -0
  18. package/dist/module/models/Message.js.map +1 -0
  19. package/dist/module/models/MessagingDelegate.js +4 -0
  20. package/dist/module/models/MessagingDelegate.js.map +1 -0
  21. package/dist/module/models/MessagingEdgeEventType.js +24 -0
  22. package/dist/module/models/MessagingEdgeEventType.js.map +1 -0
  23. package/dist/module/models/MessagingProposition.js +57 -0
  24. package/dist/module/models/MessagingProposition.js.map +1 -0
  25. package/dist/module/models/MessagingPropositionItem.js +4 -0
  26. package/dist/module/models/MessagingPropositionItem.js.map +1 -0
  27. package/dist/module/models/PersonalizationSchema.js +26 -0
  28. package/dist/module/models/PersonalizationSchema.js.map +1 -0
  29. package/dist/module/models/PropositionItem.js +113 -0
  30. package/dist/module/models/PropositionItem.js.map +1 -0
  31. package/dist/module/models/ScopeDetails.js +2 -0
  32. package/dist/module/models/ScopeDetails.js.map +1 -0
  33. package/dist/{models/JSONProposition.js → module/models/index.js} +14 -12
  34. package/dist/module/models/index.js.map +1 -0
  35. package/dist/module/ui/components/Button/Button.js +57 -0
  36. package/dist/module/ui/components/Button/Button.js.map +1 -0
  37. package/dist/module/ui/components/Button/Button.spec.js +476 -0
  38. package/dist/module/ui/components/Button/Button.spec.js.map +1 -0
  39. package/dist/module/ui/components/ContentCardView/ContentCardView.js +257 -0
  40. package/dist/module/ui/components/ContentCardView/ContentCardView.js.map +1 -0
  41. package/dist/module/ui/components/ContentCardView/ContentCardView.spec.js +363 -0
  42. package/dist/module/ui/components/ContentCardView/ContentCardView.spec.js.map +1 -0
  43. package/dist/module/ui/components/DismissButton/DismissButton.js +70 -0
  44. package/dist/module/ui/components/DismissButton/DismissButton.js.map +1 -0
  45. package/dist/module/ui/components/DismissButton/DismissButton.spec.js +279 -0
  46. package/dist/module/ui/components/DismissButton/DismissButton.spec.js.map +1 -0
  47. package/dist/module/ui/components/FullScreenCenterView/FullScreenCenterView.js +34 -0
  48. package/dist/module/ui/components/FullScreenCenterView/FullScreenCenterView.js.map +1 -0
  49. package/dist/module/ui/components/Inbox/EmptyState.js +64 -0
  50. package/dist/module/ui/components/Inbox/EmptyState.js.map +1 -0
  51. package/dist/module/ui/components/Inbox/Inbox.js +235 -0
  52. package/dist/module/ui/components/Inbox/Inbox.js.map +1 -0
  53. package/dist/module/ui/components/Inbox/Inbox.spec.js +847 -0
  54. package/dist/module/ui/components/Inbox/Inbox.spec.js.map +1 -0
  55. package/dist/module/ui/components/Pagination/Pagination.js +176 -0
  56. package/dist/module/ui/components/Pagination/Pagination.js.map +1 -0
  57. package/dist/module/ui/components/Pagination/Pagination.spec.js +193 -0
  58. package/dist/module/ui/components/Pagination/Pagination.spec.js.map +1 -0
  59. package/dist/module/ui/components/UnreadIcon/UnreadIcon.js +184 -0
  60. package/dist/module/ui/components/UnreadIcon/UnreadIcon.js.map +1 -0
  61. package/dist/module/ui/components/UnreadIcon/UnreadIcon.spec.js +815 -0
  62. package/dist/module/ui/components/UnreadIcon/UnreadIcon.spec.js.map +1 -0
  63. package/dist/{models/ContentCard.js → module/ui/components/index.js} +12 -12
  64. package/dist/module/ui/components/index.js.map +1 -0
  65. package/dist/module/ui/hooks/index.js +18 -0
  66. package/dist/module/ui/hooks/index.js.map +1 -0
  67. package/dist/module/ui/hooks/useAspectRatio.js +33 -0
  68. package/dist/module/ui/hooks/useAspectRatio.js.map +1 -0
  69. package/dist/module/ui/hooks/useAspectRatio.spec.js +65 -0
  70. package/dist/module/ui/hooks/useAspectRatio.spec.js.map +1 -0
  71. package/dist/module/ui/hooks/useContentCardUI.js +51 -0
  72. package/dist/module/ui/hooks/useContentCardUI.js.map +1 -0
  73. package/dist/module/ui/hooks/useContentCardUI.spec.js +85 -0
  74. package/dist/module/ui/hooks/useContentCardUI.spec.js.map +1 -0
  75. package/dist/module/ui/hooks/useInbox.js +49 -0
  76. package/dist/module/ui/hooks/useInbox.js.map +1 -0
  77. package/dist/module/ui/hooks/useInbox.spec.js +93 -0
  78. package/dist/module/ui/hooks/useInbox.spec.js.map +1 -0
  79. package/dist/module/ui/hooks/useInboxSettings.js +26 -0
  80. package/dist/module/ui/hooks/useInboxSettings.js.map +1 -0
  81. package/dist/module/ui/hooks/useInboxSettings.spec.js +50 -0
  82. package/dist/module/ui/hooks/useInboxSettings.spec.js.map +1 -0
  83. package/dist/module/ui/index.js +10 -0
  84. package/dist/module/ui/index.js.map +1 -0
  85. package/dist/module/ui/providers/InboxProvider.js +27 -0
  86. package/dist/module/ui/providers/InboxProvider.js.map +1 -0
  87. package/dist/module/ui/theme/Theme.js +2 -0
  88. package/dist/module/ui/theme/Theme.js.map +1 -0
  89. package/dist/module/ui/theme/ThemeProvider.js +112 -0
  90. package/dist/module/ui/theme/ThemeProvider.js.map +1 -0
  91. package/dist/{models/InAppMessage.js → module/ui/theme/index.js} +6 -3
  92. package/dist/module/ui/theme/index.js.map +1 -0
  93. package/dist/module/ui/types/ContentViewEvent.js +2 -0
  94. package/dist/module/ui/types/ContentViewEvent.js.map +1 -0
  95. package/dist/module/ui/types/Templates.js +26 -0
  96. package/dist/module/ui/types/Templates.js.map +1 -0
  97. package/dist/{models/ScopeDetails.js → module/ui/types/index.js} +6 -3
  98. package/dist/module/ui/types/index.js.map +1 -0
  99. package/dist/module/ui/utils/generateCardHash.js +50 -0
  100. package/dist/module/ui/utils/generateCardHash.js.map +1 -0
  101. package/dist/module/ui/utils/generateCardHash.spec.js +103 -0
  102. package/dist/module/ui/utils/generateCardHash.spec.js.map +1 -0
  103. package/dist/module/ui/utils/inboxStorage.js +65 -0
  104. package/dist/module/ui/utils/inboxStorage.js.map +1 -0
  105. package/dist/module/ui/utils/inboxStorage.spec.js +123 -0
  106. package/dist/module/ui/utils/inboxStorage.spec.js.map +1 -0
  107. package/dist/module/ui/utils/index.js +5 -0
  108. package/dist/module/ui/utils/index.js.map +1 -0
  109. package/dist/{Messaging.d.ts → typescript/Messaging.d.ts} +23 -7
  110. package/dist/typescript/Messaging.d.ts.map +1 -0
  111. package/dist/{index.d.ts → typescript/index.d.ts} +4 -2
  112. package/dist/typescript/index.d.ts.map +1 -0
  113. package/dist/typescript/models/ContentCard.d.ts +57 -0
  114. package/dist/typescript/models/ContentCard.d.ts.map +1 -0
  115. package/dist/{models → typescript/models}/HTMLProposition.d.ts +1 -0
  116. package/dist/typescript/models/HTMLProposition.d.ts.map +1 -0
  117. package/dist/{models → typescript/models}/InAppMessage.d.ts +1 -0
  118. package/dist/typescript/models/InAppMessage.d.ts.map +1 -0
  119. package/dist/{models → typescript/models}/JSONProposition.d.ts +1 -0
  120. package/dist/typescript/models/JSONProposition.d.ts.map +1 -0
  121. package/dist/{models → typescript/models}/Message.d.ts +1 -0
  122. package/dist/typescript/models/Message.d.ts.map +1 -0
  123. package/dist/{models → typescript/models}/MessagingDelegate.d.ts +1 -0
  124. package/dist/typescript/models/MessagingDelegate.d.ts.map +1 -0
  125. package/dist/{models → typescript/models}/MessagingEdgeEventType.d.ts +1 -0
  126. package/dist/typescript/models/MessagingEdgeEventType.d.ts.map +1 -0
  127. package/dist/{models → typescript/models}/MessagingProposition.d.ts +1 -0
  128. package/dist/typescript/models/MessagingProposition.d.ts.map +1 -0
  129. package/dist/{models → typescript/models}/MessagingPropositionItem.d.ts +1 -0
  130. package/dist/typescript/models/MessagingPropositionItem.d.ts.map +1 -0
  131. package/dist/{models → typescript/models}/PersonalizationSchema.d.ts +2 -0
  132. package/dist/typescript/models/PersonalizationSchema.d.ts.map +1 -0
  133. package/dist/{models → typescript/models}/PropositionItem.d.ts +1 -0
  134. package/dist/typescript/models/PropositionItem.d.ts.map +1 -0
  135. package/dist/{models → typescript/models}/ScopeDetails.d.ts +1 -0
  136. package/dist/typescript/models/ScopeDetails.d.ts.map +1 -0
  137. package/dist/typescript/models/index.d.ts +11 -0
  138. package/dist/typescript/models/index.d.ts.map +1 -0
  139. package/dist/typescript/ui/components/Button/Button.d.ts +14 -0
  140. package/dist/typescript/ui/components/Button/Button.d.ts.map +1 -0
  141. package/dist/typescript/ui/components/Button/Button.spec.d.ts +2 -0
  142. package/dist/typescript/ui/components/Button/Button.spec.d.ts.map +1 -0
  143. package/dist/typescript/ui/components/ContentCardView/ContentCardView.d.ts +39 -0
  144. package/dist/typescript/ui/components/ContentCardView/ContentCardView.d.ts.map +1 -0
  145. package/dist/typescript/ui/components/ContentCardView/ContentCardView.spec.d.ts +2 -0
  146. package/dist/typescript/ui/components/ContentCardView/ContentCardView.spec.d.ts.map +1 -0
  147. package/dist/typescript/ui/components/DismissButton/DismissButton.d.ts +13 -0
  148. package/dist/typescript/ui/components/DismissButton/DismissButton.d.ts.map +1 -0
  149. package/dist/typescript/ui/components/DismissButton/DismissButton.spec.d.ts +2 -0
  150. package/dist/typescript/ui/components/DismissButton/DismissButton.spec.d.ts.map +1 -0
  151. package/dist/typescript/ui/components/FullScreenCenterView/FullScreenCenterView.d.ts +5 -0
  152. package/dist/typescript/ui/components/FullScreenCenterView/FullScreenCenterView.d.ts.map +1 -0
  153. package/dist/typescript/ui/components/Inbox/EmptyState.d.ts +19 -0
  154. package/dist/typescript/ui/components/Inbox/EmptyState.d.ts.map +1 -0
  155. package/dist/typescript/ui/components/Inbox/Inbox.d.ts +21 -0
  156. package/dist/typescript/ui/components/Inbox/Inbox.d.ts.map +1 -0
  157. package/dist/typescript/ui/components/Inbox/Inbox.spec.d.ts +2 -0
  158. package/dist/typescript/ui/components/Inbox/Inbox.spec.d.ts.map +1 -0
  159. package/dist/typescript/ui/components/Pagination/Pagination.d.ts +14 -0
  160. package/dist/typescript/ui/components/Pagination/Pagination.d.ts.map +1 -0
  161. package/dist/typescript/ui/components/Pagination/Pagination.spec.d.ts +2 -0
  162. package/dist/typescript/ui/components/Pagination/Pagination.spec.d.ts.map +1 -0
  163. package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.d.ts +14 -0
  164. package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.d.ts.map +1 -0
  165. package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.spec.d.ts +2 -0
  166. package/dist/typescript/ui/components/UnreadIcon/UnreadIcon.spec.d.ts.map +1 -0
  167. package/dist/typescript/ui/components/index.d.ts +10 -0
  168. package/dist/typescript/ui/components/index.d.ts.map +1 -0
  169. package/dist/typescript/ui/hooks/index.d.ts +4 -0
  170. package/dist/typescript/ui/hooks/index.d.ts.map +1 -0
  171. package/dist/typescript/ui/hooks/useAspectRatio.d.ts +3 -0
  172. package/dist/typescript/ui/hooks/useAspectRatio.d.ts.map +1 -0
  173. package/dist/typescript/ui/hooks/useAspectRatio.spec.d.ts +2 -0
  174. package/dist/typescript/ui/hooks/useAspectRatio.spec.d.ts.map +1 -0
  175. package/dist/typescript/ui/hooks/useContentCardUI.d.ts +14 -0
  176. package/dist/typescript/ui/hooks/useContentCardUI.d.ts.map +1 -0
  177. package/dist/typescript/ui/hooks/useContentCardUI.spec.d.ts +2 -0
  178. package/dist/typescript/ui/hooks/useContentCardUI.spec.d.ts.map +1 -0
  179. package/dist/typescript/ui/hooks/useInbox.d.ts +12 -0
  180. package/dist/typescript/ui/hooks/useInbox.d.ts.map +1 -0
  181. package/dist/typescript/ui/hooks/useInbox.spec.d.ts +2 -0
  182. package/dist/typescript/ui/hooks/useInbox.spec.d.ts.map +1 -0
  183. package/dist/typescript/ui/hooks/useInboxSettings.d.ts +7 -0
  184. package/dist/typescript/ui/hooks/useInboxSettings.d.ts.map +1 -0
  185. package/dist/typescript/ui/hooks/useInboxSettings.spec.d.ts +2 -0
  186. package/dist/typescript/ui/hooks/useInboxSettings.spec.d.ts.map +1 -0
  187. package/dist/typescript/ui/index.d.ts +8 -0
  188. package/dist/typescript/ui/index.d.ts.map +1 -0
  189. package/dist/typescript/ui/providers/InboxProvider.d.ts +56 -0
  190. package/dist/typescript/ui/providers/InboxProvider.d.ts.map +1 -0
  191. package/dist/typescript/ui/theme/Theme.d.ts +44 -0
  192. package/dist/typescript/ui/theme/Theme.d.ts.map +1 -0
  193. package/dist/typescript/ui/theme/ThemeProvider.d.ts +21 -0
  194. package/dist/typescript/ui/theme/ThemeProvider.d.ts.map +1 -0
  195. package/dist/typescript/ui/theme/index.d.ts +3 -0
  196. package/dist/typescript/ui/theme/index.d.ts.map +1 -0
  197. package/dist/typescript/ui/types/ContentViewEvent.d.ts +9 -0
  198. package/dist/typescript/ui/types/ContentViewEvent.d.ts.map +1 -0
  199. package/dist/typescript/ui/types/Templates.d.ts +43 -0
  200. package/dist/typescript/ui/types/Templates.d.ts.map +1 -0
  201. package/dist/typescript/ui/types/index.d.ts +3 -0
  202. package/dist/typescript/ui/types/index.d.ts.map +1 -0
  203. package/dist/typescript/ui/utils/generateCardHash.d.ts +21 -0
  204. package/dist/typescript/ui/utils/generateCardHash.d.ts.map +1 -0
  205. package/dist/typescript/ui/utils/generateCardHash.spec.d.ts +2 -0
  206. package/dist/typescript/ui/utils/generateCardHash.spec.d.ts.map +1 -0
  207. package/dist/typescript/ui/utils/inboxStorage.d.ts +20 -0
  208. package/dist/typescript/ui/utils/inboxStorage.d.ts.map +1 -0
  209. package/dist/typescript/ui/utils/inboxStorage.spec.d.ts +2 -0
  210. package/dist/typescript/ui/utils/inboxStorage.spec.d.ts.map +1 -0
  211. package/dist/typescript/ui/utils/index.d.ts +3 -0
  212. package/dist/typescript/ui/utils/index.d.ts.map +1 -0
  213. package/ios/src/RCTAEPMessaging.mm +11 -0
  214. package/ios/src/RCTAEPMessaging.swift +30 -3
  215. package/jest.config.js +15 -0
  216. package/package.json +33 -5
  217. package/src/Messaging.ts +287 -32
  218. package/src/index.ts +3 -3
  219. package/src/models/ContentCard.ts +52 -27
  220. package/src/models/HTMLProposition.ts +1 -1
  221. package/src/models/JSONProposition.ts +1 -1
  222. package/src/models/PersonalizationSchema.ts +1 -0
  223. package/src/models/index.ts +22 -0
  224. package/src/ui/components/Button/Button.spec.tsx +496 -0
  225. package/src/ui/components/Button/Button.tsx +76 -0
  226. package/src/ui/components/ContentCardView/ContentCardView.spec.tsx +278 -0
  227. package/src/ui/components/ContentCardView/ContentCardView.tsx +400 -0
  228. package/src/ui/components/DismissButton/DismissButton.spec.tsx +314 -0
  229. package/src/ui/components/DismissButton/DismissButton.tsx +100 -0
  230. package/src/ui/components/FullScreenCenterView/FullScreenCenterView.tsx +32 -0
  231. package/src/ui/components/Inbox/EmptyState.tsx +89 -0
  232. package/src/ui/components/Inbox/Inbox.spec.tsx +478 -0
  233. package/src/ui/components/Inbox/Inbox.tsx +275 -0
  234. package/src/ui/components/Pagination/Pagination.spec.tsx +159 -0
  235. package/src/ui/components/Pagination/Pagination.tsx +222 -0
  236. package/src/ui/components/UnreadIcon/UnreadIcon.spec.tsx +878 -0
  237. package/src/ui/components/UnreadIcon/UnreadIcon.tsx +234 -0
  238. package/src/ui/components/index.ts +22 -0
  239. package/{dist/models/MessagingPropositionItem.js → src/ui/hooks/index.ts} +5 -4
  240. package/src/ui/hooks/useAspectRatio.spec.tsx +66 -0
  241. package/src/ui/hooks/useAspectRatio.tsx +39 -0
  242. package/src/ui/hooks/useContentCardUI.spec.tsx +82 -0
  243. package/src/ui/hooks/useContentCardUI.ts +48 -0
  244. package/src/ui/hooks/useInbox.spec.tsx +87 -0
  245. package/src/ui/hooks/useInbox.ts +46 -0
  246. package/src/ui/hooks/useInboxSettings.spec.tsx +41 -0
  247. package/src/ui/hooks/useInboxSettings.ts +24 -0
  248. package/src/ui/index.ts +7 -0
  249. package/src/ui/providers/InboxProvider.tsx +79 -0
  250. package/src/ui/theme/Theme.ts +57 -0
  251. package/src/ui/theme/ThemeProvider.tsx +120 -0
  252. package/src/ui/theme/index.ts +14 -0
  253. package/src/ui/types/ContentViewEvent.ts +20 -0
  254. package/src/ui/types/Templates.ts +77 -0
  255. package/src/ui/types/index.ts +14 -0
  256. package/src/ui/utils/generateCardHash.spec.tsx +86 -0
  257. package/src/ui/utils/generateCardHash.ts +59 -0
  258. package/src/ui/utils/inboxStorage.spec.tsx +136 -0
  259. package/src/ui/utils/inboxStorage.ts +64 -0
  260. package/src/ui/utils/index.ts +3 -0
  261. package/tutorials/ContentCardCustomizationGuide.md +661 -0
  262. package/tutorials/ContentCards.md +419 -0
  263. package/tutorials/Inbox.md +515 -0
  264. package/tutorials/resources/image-only-template.png +0 -0
  265. package/tutorials/resources/large-image-template.png +0 -0
  266. package/tutorials/resources/small-image-template.png +0 -0
  267. package/dist/Messaging.js +0 -152
  268. package/dist/Messaging.js.map +0 -1
  269. package/dist/index.js +0 -34
  270. package/dist/index.js.map +0 -1
  271. package/dist/models/ContentCard.d.ts +0 -51
  272. package/dist/models/ContentCard.js.map +0 -1
  273. package/dist/models/HTMLProposition.js.map +0 -1
  274. package/dist/models/InAppMessage.js.map +0 -1
  275. package/dist/models/JSONProposition.js.map +0 -1
  276. package/dist/models/Message.js +0 -156
  277. package/dist/models/Message.js.map +0 -1
  278. package/dist/models/MessagingDelegate.js +0 -14
  279. package/dist/models/MessagingDelegate.js.map +0 -1
  280. package/dist/models/MessagingEdgeEventType.js +0 -24
  281. package/dist/models/MessagingEdgeEventType.js.map +0 -1
  282. package/dist/models/MessagingProposition.js +0 -59
  283. package/dist/models/MessagingProposition.js.map +0 -1
  284. package/dist/models/MessagingPropositionItem.js.map +0 -1
  285. package/dist/models/PersonalizationSchema.js +0 -25
  286. package/dist/models/PersonalizationSchema.js.map +0 -1
  287. package/dist/models/PropositionItem.js +0 -78
  288. package/dist/models/PropositionItem.js.map +0 -1
  289. package/dist/models/ScopeDetails.js.map +0 -1
@@ -0,0 +1,334 @@
1
+ "use strict";
2
+
3
+ /*
4
+ Copyright 2024 Adobe. All rights reserved.
5
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License. You may obtain a copy
7
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software distributed under
10
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
+ OF ANY KIND, either express or implied. See the License for the specific language
12
+ governing permissions and limitations under the License.
13
+ */
14
+
15
+ import { NativeModules, NativeEventEmitter, Platform } from "react-native";
16
+ import Message from "./models/Message.js";
17
+ import { MessagingProposition } from "./models/MessagingProposition.js";
18
+ import { PersonalizationSchema } from "./models/PersonalizationSchema.js";
19
+ import { ContentTemplate } from "./ui/types/Templates.js";
20
+ const RCTAEPMessaging = NativeModules.AEPMessaging;
21
+ var messagingDelegate;
22
+ function optString(map, key) {
23
+ if (!map || typeof map !== 'object') return undefined;
24
+ const val = map[key] ?? map[key.toLowerCase()];
25
+ return typeof val === 'string' ? val : undefined;
26
+ }
27
+ function optInt(map, key, fallback) {
28
+ if (!map || typeof map !== 'object') return fallback;
29
+ const val = map[key] ?? map[key.toLowerCase()];
30
+ if (typeof val === 'number' && !isNaN(val)) return val;
31
+ if (typeof val === 'string') {
32
+ const n = parseInt(val, 10);
33
+ return isNaN(n) ? fallback : n;
34
+ }
35
+ return fallback;
36
+ }
37
+ function optBoolean(map, key, fallback) {
38
+ if (!map || typeof map !== 'object') return fallback;
39
+ const val = map[key] ?? map[key.toLowerCase()];
40
+ if (typeof val === 'boolean') return val;
41
+ if (val === 'true' || val === 1) return true;
42
+ if (val === 'false' || val === 0) return false;
43
+ return fallback;
44
+ }
45
+ function optTypedMap(map, key) {
46
+ if (!map || typeof map !== 'object') return {};
47
+ const val = map[key] ?? map[key.toLowerCase()];
48
+ return val && typeof val === 'object' && !Array.isArray(val) ? val : {};
49
+ }
50
+ function createAepText(map, key) {
51
+ const nested = optTypedMap(map, key);
52
+ const content = optString(nested, 'content') ?? optString(nested, 'txt');
53
+ return content !== undefined ? {
54
+ content
55
+ } : undefined;
56
+ }
57
+ function createAepColor(clrMap) {
58
+ if (!clrMap || typeof clrMap !== 'object') return undefined;
59
+ const light = optString(clrMap, 'light') ?? optString(clrMap, 'default') ?? '#FFFFFF';
60
+ const dark = optString(clrMap, 'dark') ?? light;
61
+ return {
62
+ light,
63
+ dark
64
+ };
65
+ }
66
+ function createAepImage(map) {
67
+ if (!map || typeof map !== 'object') return undefined;
68
+ const url = optString(map, 'url') ?? optString(map, 'src');
69
+ if (!url) return undefined;
70
+ const darkUrl = optString(map, 'darkUrl') ?? optString(map, 'dark');
71
+ return {
72
+ url,
73
+ darkUrl
74
+ };
75
+ }
76
+ function createAlignment(placement) {
77
+ const p = (placement ?? '').toLowerCase();
78
+ if (['topleft', 'topright', 'bottomleft', 'bottomright'].includes(p)) {
79
+ return p;
80
+ }
81
+ return 'topleft';
82
+ }
83
+ function createInboxSettingsFromContent(contentMap, activityId) {
84
+ const heading = createAepText(contentMap, 'heading') ?? createAepText(contentMap, 'Heading');
85
+ const layoutMap = optTypedMap(contentMap, 'layout');
86
+ const orientation = optString(layoutMap, 'orientation') ?? 'vertical';
87
+ const capacity = optInt(contentMap, 'capacity', 15);
88
+ if (!heading || !heading.content) {
89
+ throw new Error('Messaging.getInbox: inbox content is missing a valid heading (heading.content).');
90
+ }
91
+ const emptyStateSettings = optTypedMap(contentMap, 'emptyStateSettings') || optTypedMap(contentMap, 'empty_state_settings') || {};
92
+ const emptyMessage = createAepText(emptyStateSettings, 'message') ?? createAepText(emptyStateSettings, 'Message');
93
+ const emptyImage = createAepImage(optTypedMap(emptyStateSettings, 'image'));
94
+ const unreadIndicator = optTypedMap(contentMap, 'unread_indicator') || optTypedMap(contentMap, 'unreadIndicator') || {};
95
+ const unreadBg = optTypedMap(unreadIndicator, 'unread_bg') || optTypedMap(unreadIndicator, 'unreadBg') || {};
96
+ const unreadBgClr = optTypedMap(unreadBg, 'clr') || {};
97
+ const unreadBgColor = createAepColor(unreadBgClr);
98
+ const unreadIcon = optTypedMap(unreadIndicator, 'unread_icon') || optTypedMap(unreadIndicator, 'unreadIcon') || {};
99
+ const placement = createAlignment(optString(unreadIndicator, 'placement') ?? optString(unreadIcon, 'placement'));
100
+ const unreadIconImage = createAepImage(optTypedMap(unreadIcon, 'image'));
101
+ const isUnreadEnabled = optBoolean(contentMap, 'isUnreadEnabled', true) || optBoolean(contentMap, 'is_unread_enabled', true);
102
+ const content = {
103
+ heading,
104
+ layout: {
105
+ orientation
106
+ },
107
+ capacity,
108
+ emptyStateSettings: {
109
+ message: emptyMessage ?? {
110
+ content: 'No Content Available'
111
+ },
112
+ ...(emptyImage && {
113
+ image: emptyImage
114
+ })
115
+ },
116
+ isUnreadEnabled
117
+ };
118
+ if (isUnreadEnabled && (unreadBgColor || unreadIconImage)) {
119
+ content.unread_indicator = {
120
+ unread_bg: {
121
+ clr: unreadBgColor ?? {
122
+ light: '#FFF3E0',
123
+ dark: '#2D1B0E'
124
+ }
125
+ },
126
+ unread_icon: {
127
+ placement,
128
+ image: unreadIconImage ?? {
129
+ url: 'https://icons.veryicon.com/png/o/leisure/crisp-app-icon-library-v3/notification-5.png',
130
+ darkUrl: ''
131
+ }
132
+ }
133
+ };
134
+ }
135
+ return {
136
+ ...(activityId && {
137
+ activityId
138
+ }),
139
+ content,
140
+ showPagination: optBoolean(contentMap, 'showPagination', false) || optBoolean(contentMap, 'show_pagination', false)
141
+ };
142
+ }
143
+ class Messaging {
144
+ /**
145
+ * Returns the version of the AEPMessaging extension
146
+ * @returns {string} Promise a promise that resolves with the extension version
147
+ */
148
+ static extensionVersion() {
149
+ return Promise.resolve(RCTAEPMessaging.extensionVersion());
150
+ }
151
+
152
+ /**
153
+ * Initiates a network call to retrieve remote In-App Message definitions.
154
+ */
155
+ static refreshInAppMessages() {
156
+ RCTAEPMessaging.refreshInAppMessages();
157
+ }
158
+
159
+ /**
160
+ * Retrieves the list of messages which have been cached using the `shouldSaveMessage`
161
+ * method of the messaging delegate.
162
+ * Note: Messages should be cached before trying to use any of the methods on the message class
163
+ * @returns An array of messages that have been cached
164
+ */
165
+ static async getCachedMessages() {
166
+ const messages = await RCTAEPMessaging.getCachedMessages();
167
+ return messages.map(msg => new Message(msg));
168
+ }
169
+
170
+ /**
171
+ * Retrieves the last message that has been shown in the UI
172
+ * @returns The latest message to have been displayed
173
+ */
174
+ static async getLatestMessage() {
175
+ const message = await RCTAEPMessaging.getLatestMessage();
176
+ return message ? new Message(message) : undefined;
177
+ }
178
+
179
+ /**
180
+ * Retrieves the previously fetched (and cached) feeds content from the SDK for the provided surfaces.
181
+ * If the feeds content for one or more surfaces isn't previously cached in the SDK, it will not be retrieved from Adobe Journey Optimizer via the Experience Edge network.
182
+ * @param surfaces A list of surfaces to fetch
183
+ * @returns A record of surface names with their corresponding propositions
184
+ */
185
+ static async getPropositionsForSurfaces(surfaces) {
186
+ const propositionsList = await RCTAEPMessaging.getPropositionsForSurfaces(surfaces);
187
+ let messagingPropositionsForSurfaces = {};
188
+ for (const [surface, propositions] of Object.entries(propositionsList)) {
189
+ messagingPropositionsForSurfaces[surface] = propositions.map(proposition => new MessagingProposition(proposition));
190
+ }
191
+ return messagingPropositionsForSurfaces;
192
+ }
193
+
194
+ /**
195
+ * @deprecated Use PropositionItem.track(...) instead.
196
+ */
197
+ static trackContentCardDisplay(proposition, contentCard) {
198
+ RCTAEPMessaging.trackContentCardDisplay(proposition, contentCard);
199
+ }
200
+
201
+ /**
202
+ * @deprecated Use PropositionItem.track(...) instead.
203
+ */
204
+ static trackContentCardInteraction(proposition, contentCard) {
205
+ RCTAEPMessaging.trackContentCardInteraction(proposition, contentCard);
206
+ }
207
+
208
+ /**
209
+ * Tracks interactions with a PropositionItem using the provided interaction and event type.
210
+ * This method is used internally by the PropositionItem.track() method.
211
+ *
212
+ * @param {string} itemId - The unique identifier of the PropositionItem
213
+ * @param {string | null} interaction - A custom string value to be recorded in the interaction
214
+ * @param {number} eventType - The MessagingEdgeEventType numeric value
215
+ * @param {string[] | null} tokens - Array containing the sub-item tokens for recording interaction
216
+ */
217
+ static trackPropositionItem(itemId, interaction, eventType, tokens) {
218
+ RCTAEPMessaging.trackPropositionItem(itemId, interaction, eventType, tokens);
219
+ }
220
+
221
+ /**
222
+ * Function to set the UI Message delegate to listen the Message lifecycle events.
223
+ * @returns A function to unsubscribe from all event listeners
224
+ */
225
+ static setMessagingDelegate(delegate) {
226
+ messagingDelegate = delegate;
227
+ const eventEmitter = new NativeEventEmitter(RCTAEPMessaging);
228
+ eventEmitter.addListener("onShow", message => messagingDelegate?.onShow?.(new Message(message)));
229
+ eventEmitter.addListener("onDismiss", message => {
230
+ const messageInstance = new Message(message);
231
+ messageInstance._clearJavascriptMessageHandlers();
232
+ messageInstance._clearJavascriptResultHandlers();
233
+ messagingDelegate?.onDismiss?.(messageInstance);
234
+ });
235
+ eventEmitter.addListener("shouldShowMessage", message => {
236
+ const messageInstance = new Message(message);
237
+ const shouldShowMessage = messagingDelegate?.shouldShowMessage?.(messageInstance) ?? true;
238
+ const shouldSaveMessage = messagingDelegate?.shouldSaveMessage?.(messageInstance) ?? false;
239
+ RCTAEPMessaging.setMessageSettings(shouldShowMessage, shouldSaveMessage);
240
+ });
241
+ if (Platform.OS === "ios") {
242
+ eventEmitter.addListener("urlLoaded", event => messagingDelegate?.urlLoaded?.(event.url, new Message(event.message)));
243
+ }
244
+ if (Platform.OS === "android") {
245
+ eventEmitter.addListener("onContentLoaded", event => messagingDelegate?.onContentLoaded?.(new Message(event.message)));
246
+ }
247
+ RCTAEPMessaging.setMessagingDelegate();
248
+ return () => {
249
+ eventEmitter.removeAllListeners("onDismiss");
250
+ eventEmitter.removeAllListeners("onShow");
251
+ eventEmitter.removeAllListeners("shouldShowMessage");
252
+ if (Platform.OS === "ios") {
253
+ eventEmitter.removeAllListeners("urlLoaded");
254
+ }
255
+ if (Platform.OS === "android") {
256
+ eventEmitter.removeAllListeners("onContentLoaded");
257
+ }
258
+ };
259
+ }
260
+
261
+ /**
262
+ * Sets global settings for messages being shown and cached
263
+ * Note: This method is also used by MessagingDelegate.shouldShowMessage,
264
+ * which allows finer-grained control over setting these settings
265
+ * @param shouldShowMessage Whether or not a message should be displayed
266
+ * @param shouldSaveMessage Whether or not a message should be cached
267
+ */
268
+ static setMessageSettings(shouldShowMessage, shouldSaveMessage) {
269
+ RCTAEPMessaging.setMessageSettings(shouldShowMessage, shouldSaveMessage);
270
+ }
271
+
272
+ /**
273
+ * Dispatches an event to fetch propositions for the provided surfaces from remote.
274
+ * @param surfaces A list of surface names to update
275
+ */
276
+ static async updatePropositionsForSurfaces(surfaces) {
277
+ return await RCTAEPMessaging.updatePropositionsForSurfaces(surfaces);
278
+ }
279
+
280
+ /**
281
+ * @experimental
282
+ * Retrieves the content card UI data for a given surface.
283
+ * @param surface The surface to get the content card UI data for
284
+ * @returns The content card UI data for the given surface
285
+ */
286
+ static async getContentCardUI(surface) {
287
+ const messages = await Messaging.getPropositionsForSurfaces([surface]);
288
+ const propositions = messages[surface];
289
+ if (!propositions?.length) {
290
+ return [];
291
+ }
292
+ const contentCards = propositions.flatMap(proposition => proposition.items.filter(item => item.schema === PersonalizationSchema.CONTENT_CARD));
293
+ if (!contentCards?.length) {
294
+ return [];
295
+ }
296
+ return contentCards.map(card => {
297
+ // Test: To mark first 2 cards as read, swap the two map lines above to add index, then replace isRead with:
298
+ // return contentCards.map((card: any, index: number) => {
299
+ const type = card.data?.meta?.adobe?.template ?? "SmallImage";
300
+ const isRead = card.data?.read ?? false;
301
+ // const isRead = card.data?.read ?? (index < 2);
302
+ return new ContentTemplate(card, type, isRead);
303
+ });
304
+ }
305
+
306
+ /**
307
+ * @experimental
308
+ * Loads inbox UI settings from the inbox proposition for the given surface.
309
+ * @throws {Error} When no propositions, no inbox proposition, or invalid inbox content is returned.
310
+ */
311
+ static async getInbox(surface) {
312
+ const propositionsMap = await Messaging.getPropositionsForSurfaces([surface]);
313
+ const propositions = propositionsMap[surface];
314
+ if (!propositions?.length) {
315
+ throw new Error(`Messaging.getInbox: no propositions returned for surface "${surface}".`);
316
+ }
317
+ const inboxPropositions = propositions.filter(p => p.items?.length > 0 && (p.items[0].schema === PersonalizationSchema.INBOX || String(p.items[0].schema).includes('inbox')));
318
+ if (inboxPropositions.length === 0) {
319
+ throw new Error(`Messaging.getInbox: no inbox proposition found for surface "${surface}".`);
320
+ }
321
+ const sortedByRank = [...inboxPropositions].sort((a, b) => (b.rank ?? 0) - (a.rank ?? 0));
322
+ const inboxProposition = sortedByRank[0];
323
+ const firstItem = inboxProposition.items[0];
324
+ const rawItem = firstItem;
325
+ const contentMap = rawItem?.inboxSchemaData?.content ?? rawItem?.data?.inboxSchemaData?.content ?? rawItem?.data?.content;
326
+ if (!contentMap || typeof contentMap !== 'object') {
327
+ throw new Error(`Messaging.getInbox: inbox proposition has no valid content configuration for surface "${surface}".`);
328
+ }
329
+ const activityId = inboxProposition.scopeDetails?.activity?.id;
330
+ return createInboxSettingsFromContent(contentMap, activityId);
331
+ }
332
+ }
333
+ export default Messaging;
334
+ //# sourceMappingURL=Messaging.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NativeModules","NativeEventEmitter","Platform","Message","MessagingProposition","PersonalizationSchema","ContentTemplate","RCTAEPMessaging","AEPMessaging","messagingDelegate","optString","map","key","undefined","val","toLowerCase","optInt","fallback","isNaN","n","parseInt","optBoolean","optTypedMap","Array","isArray","createAepText","nested","content","createAepColor","clrMap","light","dark","createAepImage","url","darkUrl","createAlignment","placement","p","includes","createInboxSettingsFromContent","contentMap","activityId","heading","layoutMap","orientation","capacity","Error","emptyStateSettings","emptyMessage","emptyImage","unreadIndicator","unreadBg","unreadBgClr","unreadBgColor","unreadIcon","unreadIconImage","isUnreadEnabled","layout","message","image","unread_indicator","unread_bg","clr","unread_icon","showPagination","Messaging","extensionVersion","Promise","resolve","refreshInAppMessages","getCachedMessages","messages","msg","getLatestMessage","getPropositionsForSurfaces","surfaces","propositionsList","messagingPropositionsForSurfaces","surface","propositions","Object","entries","proposition","trackContentCardDisplay","contentCard","trackContentCardInteraction","trackPropositionItem","itemId","interaction","eventType","tokens","setMessagingDelegate","delegate","eventEmitter","addListener","onShow","messageInstance","_clearJavascriptMessageHandlers","_clearJavascriptResultHandlers","onDismiss","shouldShowMessage","shouldSaveMessage","setMessageSettings","OS","event","urlLoaded","onContentLoaded","removeAllListeners","updatePropositionsForSurfaces","getContentCardUI","length","contentCards","flatMap","items","filter","item","schema","CONTENT_CARD","card","type","data","meta","adobe","template","isRead","read","getInbox","propositionsMap","inboxPropositions","INBOX","String","sortedByRank","sort","a","b","rank","inboxProposition","firstItem","rawItem","inboxSchemaData","scopeDetails","activity","id"],"sourceRoot":"../../src","sources":["Messaging.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,aAAa,EACbC,kBAAkB,EAElBC,QAAQ,QACH,cAAc;AACrB,OAAOC,OAAO,MAAM,qBAAkB;AAEtC,SAASC,oBAAoB,QAAQ,kCAA+B;AAEpE,SAASC,qBAAqB,QAAQ,mCAAgC;AACtE,SAASC,eAAe,QAAQ,yBAAsB;AAoCtD,MAAMC,eAAqD,GACzDP,aAAa,CAACQ,YAAY;AAG5B,IAAIC,iBAAoC;AAExC,SAASC,SAASA,CAACC,GAAoC,EAAEC,GAAW,EAAsB;EACxF,IAAI,CAACD,GAAG,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE,OAAOE,SAAS;EACrD,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E,IAAI,IAAI,CAAC,CAC1D,CAAC;IACD,MAAMC,gBAAgB,GAAGL,YAAY,CAAC,CAAC,CAAC;IACxC,MAAMM,SAAS,GAAGD,gBAAgB,CAACvB,KAAK,CAAC,CAAC,CAAC;IAC3C,MAAMyB,OAAO,GAAGD,SAAgB;IAEhC,MAAMjG,UAAU,GACdkG,OAAO,EAAEC,eAAe,EAAEhH,OAAO,IACjC+G,OAAO,EAAElB,IAAI,EAAEmB,eAAe,EAAEhH,OAAO,IACvC+G,OAAO,EAAElB,IAAI,EAAE7F,OAAO;IAExB,IAAI,CAACa,UAAU,IAAI,OAAOA,UAAU,KAAK,QAAQ,EAAE;MACjD,MAAM,IAAIM,KAAK,CACb,yFAAyFgC,OAAO,IAClG,CAAC;IACH;IAEA,MAAMrC,UAAU,GAAG+F,gBAAgB,CAACI,YAAY,EAAEC,QAAQ,EAAEC,EAAE;IAC9D,OAAOvG,8BAA8B,CAACC,UAAU,EAAEC,UAAU,CAAC;EAC/D;AACF;AAEA,eAAewB,SAAS","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ /*
4
+ Copyright 2023 Adobe. All rights reserved.
5
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License. You may obtain a copy
7
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software distributed under
10
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
+ OF ANY KIND, either express or implied. See the License for the specific language
12
+ governing permissions and limitations under the License.
13
+ */
14
+
15
+ import Messaging from "./Messaging.js";
16
+ import { InAppMessage } from "./models/InAppMessage.js";
17
+ import { HTMLProposition, HTMLPropositionData } from "./models/HTMLProposition.js";
18
+ import { JSONPropositionItem, JSONPropositionData } from "./models/JSONProposition.js";
19
+ import Message from "./models/Message.js";
20
+ import { MessagingDelegate } from "./models/MessagingDelegate.js";
21
+ import MessagingEdgeEventType from "./models/MessagingEdgeEventType.js";
22
+ import { MessagingProposition } from "./models/MessagingProposition.js";
23
+ import { MessagingPropositionItem } from "./models/MessagingPropositionItem.js";
24
+ import { PersonalizationSchema } from "./models/PersonalizationSchema.js";
25
+ import { PropositionItem, PropositionItemData } from "./models/PropositionItem.js";
26
+ import { Activity, Characteristics } from "./models/ScopeDetails.js";
27
+ export * from "./models/ContentCard.js";
28
+ export * from "./ui/index.js";
29
+ export { Activity, Characteristics, InAppMessage, Messaging, Message, MessagingDelegate, MessagingEdgeEventType, MessagingProposition, MessagingPropositionItem, PersonalizationSchema, PropositionItem, PropositionItemData, HTMLProposition, HTMLPropositionData, JSONPropositionItem, JSONPropositionData };
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Messaging","InAppMessage","HTMLProposition","HTMLPropositionData","JSONPropositionItem","JSONPropositionData","Message","MessagingDelegate","MessagingEdgeEventType","MessagingProposition","MessagingPropositionItem","PersonalizationSchema","PropositionItem","PropositionItemData","Activity","Characteristics"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,SAAS,MAAM,gBAAa;AAEnC,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,eAAe,EAAEC,mBAAmB,QAAQ,6BAA0B;AAC/E,SAASC,mBAAmB,EAAEC,mBAAmB,QAAQ,6BAA0B;AAEnF,OAAOC,OAAO,MAAM,qBAAkB;AACtC,SAASC,iBAAiB,QAAQ,+BAA4B;AAC9D,OAAOC,sBAAsB,MAAM,oCAAiC;AACpE,SAASC,oBAAoB,QAAQ,kCAA+B;AACpE,SAASC,wBAAwB,QAAQ,sCAAmC;AAC5E,SAASC,qBAAqB,QAAQ,mCAAgC;AACtE,SAASC,eAAe,EAAEC,mBAAmB,QAAQ,6BAA0B;AAC/E,SAASC,QAAQ,EAAEC,eAAe,QAAQ,0BAAuB;AAEjE,cAAc,yBAAsB;AACpC,cAAc,eAAM;AAEpB,SACED,QAAQ,EACRC,eAAe,EACfd,YAAY,EACZD,SAAS,EACTM,OAAO,EACPC,iBAAiB,EACjBC,sBAAsB,EACtBC,oBAAoB,EACpBC,wBAAwB,EACxBC,qBAAqB,EACrBC,eAAe,EACfC,mBAAmB,EACnBX,eAAe,EACfC,mBAAmB,EACnBC,mBAAmB,EACnBC,mBAAmB","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ /*
4
+ Copyright 2024 Adobe. All rights reserved.
5
+ This file is licensed to you under the Apache License, Version 2.0 (the
6
+ "License"); you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+ http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
9
+ or agreed to in writing, software distributed under the License is
10
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
11
+ ANY KIND, either express or implied. See the License for the specific
12
+ language governing permissions and limitations under the License.
13
+ */
14
+
15
+ import { PropositionItem } from "./PropositionItem.js";
16
+ export class ContentCard extends PropositionItem {
17
+ isRead = false;
18
+ constructor(contentCardData, isRead = false) {
19
+ super(contentCardData);
20
+ this.data = contentCardData.data;
21
+ this.isRead = isRead;
22
+ }
23
+ }
24
+ //# sourceMappingURL=ContentCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PropositionItem","ContentCard","isRead","constructor","contentCardData","data"],"sourceRoot":"../../../src","sources":["models/ContentCard.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,eAAe,QAA6B,sBAAmB;AA4DxE,OAAO,MAAMC,WAAW,SAASD,eAAe,CAAC;EAE/CE,MAAM,GAAY,KAAK;EAEvBC,WAAWA,CAACC,eAAgC,EAAEF,MAAe,GAAG,KAAK,EAAE;IACrE,KAAK,CAACE,eAAe,CAAC;IACtB,IAAI,CAACC,IAAI,GAAGD,eAAe,CAACC,IAAI;IAChC,IAAI,CAACH,MAAM,GAAGA,MAAM;EACtB;AACF","ignoreList":[]}
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+
2
3
  /*
3
4
  Copyright 2024 Adobe. All rights reserved.
4
5
  This file is licensed to you under the Apache License, Version 2.0 (the
@@ -10,14 +11,12 @@
10
11
  ANY KIND, either express or implied. See the License for the specific
11
12
  language governing permissions and limitations under the License.
12
13
  */
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.HTMLProposition = void 0;
15
- const PropositionItem_1 = require("./PropositionItem");
16
- class HTMLProposition extends PropositionItem_1.PropositionItem {
17
- constructor(htmlData) {
18
- super(htmlData);
19
- this.data = htmlData.data;
20
- }
14
+
15
+ import { PropositionItem } from "./PropositionItem.js";
16
+ export class HTMLProposition extends PropositionItem {
17
+ constructor(htmlData) {
18
+ super(htmlData);
19
+ this.data = htmlData.data;
20
+ }
21
21
  }
22
- exports.HTMLProposition = HTMLProposition;
23
22
  //# sourceMappingURL=HTMLProposition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PropositionItem","HTMLProposition","constructor","htmlData","data"],"sourceRoot":"../../../src","sources":["models/HTMLProposition.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,eAAe,QAA6B,sBAAmB;AASxE,OAAO,MAAMC,eAAe,SAASD,eAAe,CAAC;EAGpDE,WAAWA,CAACC,QAA6B,EAAE;IAC1C,KAAK,CAACA,QAAQ,CAAC;IACf,IAAI,CAACC,IAAI,GAAGD,QAAQ,CAACC,IAAI;EAC1B;AACD","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=InAppMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["models/InAppMessage.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ /*
4
+ Copyright 2024 Adobe. All rights reserved.
5
+ This file is licensed to you under the Apache License, Version 2.0 (the
6
+ "License"); you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+ http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
9
+ or agreed to in writing, software distributed under the License is
10
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF
11
+ ANY KIND, either express or implied. See the License for the specific
12
+ language governing permissions and limitations under the License.
13
+ */
14
+
15
+ import { PropositionItem } from "./PropositionItem.js";
16
+ export class JSONPropositionItem extends PropositionItem {
17
+ constructor(jsonData) {
18
+ super(jsonData);
19
+ this.data = jsonData.data;
20
+ }
21
+ }
22
+ //# sourceMappingURL=JSONProposition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PropositionItem","JSONPropositionItem","constructor","jsonData","data"],"sourceRoot":"../../../src","sources":["models/JSONProposition.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,eAAe,QAA6B,sBAAmB;AASxE,OAAO,MAAMC,mBAAmB,SAASD,eAAe,CAAC;EAGxDE,WAAWA,CAACC,QAA6B,EAAE;IAC1C,KAAK,CAACA,QAAQ,CAAC;IACf,IAAI,CAACC,IAAI,GAAGD,QAAQ,CAACC,IAAI;EAC1B;AACD","ignoreList":[]}