@billdog.io/react-native 1.0.0-beta.2

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 (309) hide show
  1. package/BillDogReactNative.podspec +30 -0
  2. package/LICENSE +21 -0
  3. package/README.md +330 -0
  4. package/android/build.gradle +99 -0
  5. package/android/src/main/AndroidManifest.xml +1 -0
  6. package/android/src/main/kotlin/io/billdog/reactnative/BillDogABTestModule.kt +317 -0
  7. package/android/src/main/kotlin/io/billdog/reactnative/BillDogAnalyticsModule.kt +389 -0
  8. package/android/src/main/kotlin/io/billdog/reactnative/BillDogModule.kt +817 -0
  9. package/android/src/main/kotlin/io/billdog/reactnative/BillDogPaywallViewManager.kt +383 -0
  10. package/android/src/main/kotlin/io/billdog/reactnative/BillDogSurveyModule.kt +427 -0
  11. package/android/src/main/kotlin/io/billdog/reactnative/BillDogVirtualCurrencyModule.kt +407 -0
  12. package/android/src/main/kotlin/io/billdog/virtualcurrency/BillDogVirtualCurrencyPackage.kt +44 -0
  13. package/dist/AdvancedPaywallCache.d.ts +70 -0
  14. package/dist/AdvancedPaywallCache.js +344 -0
  15. package/dist/BillDog.d.ts +255 -0
  16. package/dist/BillDog.js +918 -0
  17. package/dist/BillDogConfiguration.d.ts +145 -0
  18. package/dist/BillDogConfiguration.js +229 -0
  19. package/dist/ComponentRenderer.d.ts +17 -0
  20. package/dist/ComponentRenderer.js +886 -0
  21. package/dist/LayoutEngine.d.ts +101 -0
  22. package/dist/LayoutEngine.js +394 -0
  23. package/dist/LocalizationResolver.d.ts +99 -0
  24. package/dist/LocalizationResolver.js +266 -0
  25. package/dist/NativePaywallView.d.ts +36 -0
  26. package/dist/NativePaywallView.js +59 -0
  27. package/dist/PaywallCache.d.ts +74 -0
  28. package/dist/PaywallCache.js +293 -0
  29. package/dist/PaywallStateManager.d.ts +62 -0
  30. package/dist/PaywallStateManager.js +147 -0
  31. package/dist/PaywallView.d.ts +42 -0
  32. package/dist/PaywallView.js +275 -0
  33. package/dist/ProductVariableProvider.d.ts +60 -0
  34. package/dist/ProductVariableProvider.js +239 -0
  35. package/dist/VariableResolver.d.ts +120 -0
  36. package/dist/VariableResolver.js +379 -0
  37. package/dist/WebViewPaywall.d.ts +75 -0
  38. package/dist/WebViewPaywall.js +360 -0
  39. package/dist/animations/presets.d.ts +49 -0
  40. package/dist/animations/presets.js +367 -0
  41. package/dist/components/AccoladeCpsComponent.d.ts +13 -0
  42. package/dist/components/AccoladeCpsComponent.js +248 -0
  43. package/dist/components/AccordionComponent.d.ts +10 -0
  44. package/dist/components/AccordionComponent.js +187 -0
  45. package/dist/components/AnimatedWrapper.d.ts +35 -0
  46. package/dist/components/AnimatedWrapper.js +277 -0
  47. package/dist/components/CarouselComponent.d.ts +23 -0
  48. package/dist/components/CarouselComponent.js +484 -0
  49. package/dist/components/ChartCurveComponent.d.ts +13 -0
  50. package/dist/components/ChartCurveComponent.js +333 -0
  51. package/dist/components/CheckboxComponent.d.ts +9 -0
  52. package/dist/components/CheckboxComponent.js +172 -0
  53. package/dist/components/ConfettiComponent.d.ts +9 -0
  54. package/dist/components/ConfettiComponent.js +172 -0
  55. package/dist/components/CountdownComponent.d.ts +16 -0
  56. package/dist/components/CountdownComponent.js +414 -0
  57. package/dist/components/DelayedXComponent.d.ts +12 -0
  58. package/dist/components/DelayedXComponent.js +240 -0
  59. package/dist/components/DrawerModalComponent.d.ts +20 -0
  60. package/dist/components/DrawerModalComponent.js +286 -0
  61. package/dist/components/GradientView.d.ts +38 -0
  62. package/dist/components/GradientView.js +126 -0
  63. package/dist/components/HapticFeedbackComponent.d.ts +16 -0
  64. package/dist/components/HapticFeedbackComponent.js +64 -0
  65. package/dist/components/HorizontalProductsComponent.d.ts +17 -0
  66. package/dist/components/HorizontalProductsComponent.js +284 -0
  67. package/dist/components/MultiChoiceGridComponent.d.ts +13 -0
  68. package/dist/components/MultiChoiceGridComponent.js +234 -0
  69. package/dist/components/NPSScaleComponent.d.ts +16 -0
  70. package/dist/components/NPSScaleComponent.js +260 -0
  71. package/dist/components/NavigationComponent.d.ts +26 -0
  72. package/dist/components/NavigationComponent.js +302 -0
  73. package/dist/components/OAuthButtonComponent.d.ts +20 -0
  74. package/dist/components/OAuthButtonComponent.js +237 -0
  75. package/dist/components/ProgressLoaderComponent.d.ts +13 -0
  76. package/dist/components/ProgressLoaderComponent.js +308 -0
  77. package/dist/components/ProgressStepperComponent.d.ts +18 -0
  78. package/dist/components/ProgressStepperComponent.js +228 -0
  79. package/dist/components/SegmentedPickerComponent.d.ts +10 -0
  80. package/dist/components/SegmentedPickerComponent.js +221 -0
  81. package/dist/components/ShareButtonsComponent.d.ts +21 -0
  82. package/dist/components/ShareButtonsComponent.js +265 -0
  83. package/dist/components/ShareCodeComponent.d.ts +16 -0
  84. package/dist/components/ShareCodeComponent.js +274 -0
  85. package/dist/components/SingleChoiceGridComponent.d.ts +13 -0
  86. package/dist/components/SingleChoiceGridComponent.js +210 -0
  87. package/dist/components/SliderComponent.d.ts +9 -0
  88. package/dist/components/SliderComponent.js +263 -0
  89. package/dist/components/StarRatingInputComponent.d.ts +20 -0
  90. package/dist/components/StarRatingInputComponent.js +198 -0
  91. package/dist/components/StickerCompositeComponent.d.ts +13 -0
  92. package/dist/components/StickerCompositeComponent.js +136 -0
  93. package/dist/components/TabsComponent.d.ts +19 -0
  94. package/dist/components/TabsComponent.js +431 -0
  95. package/dist/components/TextInputComponent.d.ts +18 -0
  96. package/dist/components/TextInputComponent.js +227 -0
  97. package/dist/components/TimelineComponent.d.ts +19 -0
  98. package/dist/components/TimelineComponent.js +104 -0
  99. package/dist/components/ToggleComponent.d.ts +14 -0
  100. package/dist/components/ToggleComponent.js +132 -0
  101. package/dist/components/VerticalProductsComponent.d.ts +17 -0
  102. package/dist/components/VerticalProductsComponent.js +311 -0
  103. package/dist/dynamicValues.d.ts +36 -0
  104. package/dist/dynamicValues.js +142 -0
  105. package/dist/filters/dateFilters.d.ts +50 -0
  106. package/dist/filters/dateFilters.js +390 -0
  107. package/dist/filters/index.d.ts +18 -0
  108. package/dist/filters/index.js +253 -0
  109. package/dist/hooks/useOfferings.d.ts +76 -0
  110. package/dist/hooks/useOfferings.js +99 -0
  111. package/dist/hooks/usePaywall.d.ts +27 -0
  112. package/dist/hooks/usePaywall.js +114 -0
  113. package/dist/hooks/usePlacement.d.ts +34 -0
  114. package/dist/hooks/usePlacement.js +89 -0
  115. package/dist/hooks/useSubscription.d.ts +40 -0
  116. package/dist/hooks/useSubscription.js +97 -0
  117. package/dist/index.d.ts +98 -0
  118. package/dist/index.js +198 -0
  119. package/dist/models/BillDogError.d.ts +40 -0
  120. package/dist/models/BillDogError.js +11 -0
  121. package/dist/models/CacheFetchPolicy.d.ts +8 -0
  122. package/dist/models/CacheFetchPolicy.js +4 -0
  123. package/dist/models/CustomProduct.d.ts +32 -0
  124. package/dist/models/CustomProduct.js +15 -0
  125. package/dist/models/CustomerInfo.d.ts +17 -0
  126. package/dist/models/CustomerInfo.js +11 -0
  127. package/dist/models/Delegate.d.ts +20 -0
  128. package/dist/models/Delegate.js +11 -0
  129. package/dist/models/EntitlementInfo.d.ts +19 -0
  130. package/dist/models/EntitlementInfo.js +2 -0
  131. package/dist/models/Placement.d.ts +54 -0
  132. package/dist/models/Placement.js +15 -0
  133. package/dist/models/PurchaseParams.d.ts +39 -0
  134. package/dist/models/PurchaseParams.js +60 -0
  135. package/dist/models/PurchaseResult.d.ts +30 -0
  136. package/dist/models/PurchaseResult.js +15 -0
  137. package/dist/models/RestoreResult.d.ts +30 -0
  138. package/dist/models/RestoreResult.js +22 -0
  139. package/dist/models/RestoredItem.d.ts +26 -0
  140. package/dist/models/RestoredItem.js +13 -0
  141. package/dist/modules/ABTest.d.ts +65 -0
  142. package/dist/modules/ABTest.js +113 -0
  143. package/dist/modules/Analytics.d.ts +91 -0
  144. package/dist/modules/Analytics.js +182 -0
  145. package/dist/modules/Survey.d.ts +65 -0
  146. package/dist/modules/Survey.js +82 -0
  147. package/dist/modules/VirtualCurrency.d.ts +63 -0
  148. package/dist/modules/VirtualCurrency.js +147 -0
  149. package/dist/murmur.d.ts +23 -0
  150. package/dist/murmur.js +104 -0
  151. package/dist/notifications/LiveActivitiesManager.d.ts +47 -0
  152. package/dist/notifications/LiveActivitiesManager.js +106 -0
  153. package/dist/notifications/NotificationScheduler.d.ts +55 -0
  154. package/dist/notifications/NotificationScheduler.js +199 -0
  155. package/dist/notifications/PurchaseNotificationHandler.d.ts +24 -0
  156. package/dist/notifications/PurchaseNotificationHandler.js +55 -0
  157. package/dist/notifications/useDeviceToken.d.ts +36 -0
  158. package/dist/notifications/useDeviceToken.js +97 -0
  159. package/dist/notifications/useLiveActivity.d.ts +39 -0
  160. package/dist/notifications/useLiveActivity.js +104 -0
  161. package/dist/review/ReviewAnalytics.d.ts +34 -0
  162. package/dist/review/ReviewAnalytics.js +73 -0
  163. package/dist/review/ReviewManager.d.ts +83 -0
  164. package/dist/review/ReviewManager.js +339 -0
  165. package/dist/review/ReviewTimingManager.d.ts +82 -0
  166. package/dist/review/ReviewTimingManager.js +224 -0
  167. package/dist/survey-core/types.d.ts +215 -0
  168. package/dist/survey-core/types.js +8 -0
  169. package/dist/types.d.ts +438 -0
  170. package/dist/types.js +158 -0
  171. package/dist/utils/ApiClient.d.ts +65 -0
  172. package/dist/utils/ApiClient.js +132 -0
  173. package/dist/utils/CSSConverter.d.ts +49 -0
  174. package/dist/utils/CSSConverter.js +470 -0
  175. package/dist/utils/animations.d.ts +41 -0
  176. package/dist/utils/animations.js +194 -0
  177. package/dist/utils/calendarIntegration.d.ts +36 -0
  178. package/dist/utils/calendarIntegration.js +89 -0
  179. package/dist/utils/configurationResolver.d.ts +23 -0
  180. package/dist/utils/configurationResolver.js +78 -0
  181. package/dist/utils/deviceDetection.d.ts +38 -0
  182. package/dist/utils/deviceDetection.js +59 -0
  183. package/dist/utils/hapticFeedback.d.ts +17 -0
  184. package/dist/utils/hapticFeedback.js +53 -0
  185. package/dist/utils/iconMapper.d.ts +26 -0
  186. package/dist/utils/iconMapper.js +113 -0
  187. package/dist/utils/notificationPermissions.d.ts +13 -0
  188. package/dist/utils/notificationPermissions.js +51 -0
  189. package/dist/utils/priceFormatting.d.ts +19 -0
  190. package/dist/utils/priceFormatting.js +99 -0
  191. package/dist/utils/shareSheet.d.ts +17 -0
  192. package/dist/utils/shareSheet.js +42 -0
  193. package/dist/utils/subscriptionUpgrade.d.ts +84 -0
  194. package/dist/utils/subscriptionUpgrade.js +100 -0
  195. package/dist/valueUtils.d.ts +48 -0
  196. package/dist/valueUtils.js +129 -0
  197. package/dist/xFlowTags.d.ts +18 -0
  198. package/dist/xFlowTags.js +385 -0
  199. package/ios/BillDogABTest.m +50 -0
  200. package/ios/BillDogABTest.swift +188 -0
  201. package/ios/BillDogAnalytics.m +105 -0
  202. package/ios/BillDogAnalytics.swift +324 -0
  203. package/ios/BillDogBridge.m +222 -0
  204. package/ios/BillDogBridge.swift +715 -0
  205. package/ios/BillDogLiveActivities.m +41 -0
  206. package/ios/BillDogLiveActivities.swift +104 -0
  207. package/ios/BillDogPaywallViewManager.m +39 -0
  208. package/ios/BillDogPaywallViewManager.swift +361 -0
  209. package/ios/BillDogSurvey.m +34 -0
  210. package/ios/BillDogSurvey.swift +257 -0
  211. package/ios/BillDogVirtualCurrencyBridge.m +63 -0
  212. package/ios/BillDogVirtualCurrencyBridge.swift +511 -0
  213. package/junit.xml +25 -0
  214. package/package.json +61 -0
  215. package/react-native.config.js +13 -0
  216. package/src/AdvancedPaywallCache.ts +433 -0
  217. package/src/BillDog.ts +983 -0
  218. package/src/BillDogConfiguration.ts +318 -0
  219. package/src/ComponentRenderer.tsx +1325 -0
  220. package/src/LayoutEngine.ts +459 -0
  221. package/src/LocalizationResolver.ts +311 -0
  222. package/src/NativePaywallView.tsx +132 -0
  223. package/src/PaywallCache.ts +358 -0
  224. package/src/PaywallStateManager.ts +154 -0
  225. package/src/PaywallView.tsx +328 -0
  226. package/src/ProductVariableProvider.ts +282 -0
  227. package/src/VariableResolver.ts +516 -0
  228. package/src/WebViewPaywall.tsx +454 -0
  229. package/src/animations/presets.ts +421 -0
  230. package/src/components/AccoladeCpsComponent.tsx +259 -0
  231. package/src/components/AccordionComponent.tsx +213 -0
  232. package/src/components/AnimatedWrapper.tsx +316 -0
  233. package/src/components/CarouselComponent.tsx +615 -0
  234. package/src/components/ChartCurveComponent.tsx +452 -0
  235. package/src/components/CheckboxComponent.tsx +185 -0
  236. package/src/components/ConfettiComponent.tsx +178 -0
  237. package/src/components/CountdownComponent.tsx +454 -0
  238. package/src/components/DelayedXComponent.tsx +266 -0
  239. package/src/components/DrawerModalComponent.tsx +324 -0
  240. package/src/components/GradientView.tsx +129 -0
  241. package/src/components/HapticFeedbackComponent.tsx +39 -0
  242. package/src/components/HorizontalProductsComponent.tsx +329 -0
  243. package/src/components/MultiChoiceGridComponent.tsx +265 -0
  244. package/src/components/NPSScaleComponent.tsx +294 -0
  245. package/src/components/NavigationComponent.tsx +329 -0
  246. package/src/components/OAuthButtonComponent.tsx +266 -0
  247. package/src/components/ProgressLoaderComponent.tsx +366 -0
  248. package/src/components/ProgressStepperComponent.tsx +250 -0
  249. package/src/components/SegmentedPickerComponent.tsx +245 -0
  250. package/src/components/ShareButtonsComponent.tsx +299 -0
  251. package/src/components/ShareCodeComponent.tsx +303 -0
  252. package/src/components/SingleChoiceGridComponent.tsx +229 -0
  253. package/src/components/SliderComponent.tsx +280 -0
  254. package/src/components/StarRatingInputComponent.tsx +223 -0
  255. package/src/components/StickerCompositeComponent.tsx +168 -0
  256. package/src/components/TabsComponent.tsx +496 -0
  257. package/src/components/TextInputComponent.tsx +258 -0
  258. package/src/components/TimelineComponent.tsx +129 -0
  259. package/src/components/ToggleComponent.tsx +142 -0
  260. package/src/components/VerticalProductsComponent.tsx +357 -0
  261. package/src/dynamicValues.ts +180 -0
  262. package/src/filters/dateFilters.ts +411 -0
  263. package/src/filters/index.ts +281 -0
  264. package/src/hooks/useOfferings.ts +192 -0
  265. package/src/hooks/usePaywall.ts +154 -0
  266. package/src/hooks/usePlacement.ts +143 -0
  267. package/src/hooks/useSubscription.ts +154 -0
  268. package/src/index.ts +245 -0
  269. package/src/models/BillDogError.ts +24 -0
  270. package/src/models/CacheFetchPolicy.ts +13 -0
  271. package/src/models/CustomProduct.ts +33 -0
  272. package/src/models/CustomerInfo.ts +26 -0
  273. package/src/models/Delegate.ts +22 -0
  274. package/src/models/EntitlementInfo.ts +27 -0
  275. package/src/models/Placement.ts +50 -0
  276. package/src/models/PurchaseParams.ts +81 -0
  277. package/src/models/PurchaseResult.ts +32 -0
  278. package/src/models/RestoreResult.ts +27 -0
  279. package/src/models/RestoredItem.ts +25 -0
  280. package/src/modules/ABTest.ts +131 -0
  281. package/src/modules/Analytics.ts +227 -0
  282. package/src/modules/Survey.ts +126 -0
  283. package/src/modules/VirtualCurrency.ts +223 -0
  284. package/src/murmur.ts +102 -0
  285. package/src/notifications/LiveActivitiesManager.ts +140 -0
  286. package/src/notifications/NotificationScheduler.ts +292 -0
  287. package/src/notifications/PurchaseNotificationHandler.ts +67 -0
  288. package/src/notifications/useDeviceToken.ts +116 -0
  289. package/src/notifications/useLiveActivity.ts +125 -0
  290. package/src/review/ReviewAnalytics.ts +89 -0
  291. package/src/review/ReviewManager.ts +355 -0
  292. package/src/review/ReviewTimingManager.ts +265 -0
  293. package/src/survey-core/types.ts +244 -0
  294. package/src/types/ambient.d.ts +9 -0
  295. package/src/types.ts +680 -0
  296. package/src/utils/ApiClient.ts +163 -0
  297. package/src/utils/CSSConverter.ts +552 -0
  298. package/src/utils/animations.ts +232 -0
  299. package/src/utils/calendarIntegration.ts +113 -0
  300. package/src/utils/configurationResolver.ts +106 -0
  301. package/src/utils/deviceDetection.ts +83 -0
  302. package/src/utils/hapticFeedback.ts +55 -0
  303. package/src/utils/iconMapper.ts +102 -0
  304. package/src/utils/notificationPermissions.ts +48 -0
  305. package/src/utils/priceFormatting.ts +119 -0
  306. package/src/utils/shareSheet.ts +55 -0
  307. package/src/utils/subscriptionUpgrade.ts +183 -0
  308. package/src/valueUtils.ts +108 -0
  309. package/src/xFlowTags.ts +463 -0
@@ -0,0 +1,19 @@
1
+ /**
2
+ * TimelineComponent - React Native
3
+ *
4
+ * Renders a connected timeline with event markers and content.
5
+ * Features:
6
+ * - Vertical timeline layout with connecting lines
7
+ * - Customizable markers and line styles
8
+ * - Support for icons in markers
9
+ */
10
+ import React from 'react';
11
+ import { PaywallComponent } from '../types';
12
+ interface TimelineComponentProps {
13
+ component: PaywallComponent;
14
+ stateManager?: any;
15
+ isPreviewMode?: boolean;
16
+ renderComponent?: (component: PaywallComponent) => React.ReactNode;
17
+ }
18
+ export declare const TimelineComponent: React.FC<TimelineComponentProps>;
19
+ export {};
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ /**
3
+ * TimelineComponent - React Native
4
+ *
5
+ * Renders a connected timeline with event markers and content.
6
+ * Features:
7
+ * - Vertical timeline layout with connecting lines
8
+ * - Customizable markers and line styles
9
+ * - Support for icons in markers
10
+ */
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.TimelineComponent = void 0;
16
+ const react_1 = __importDefault(require("react"));
17
+ const react_native_1 = require("react-native");
18
+ // Helper to parse color from various formats
19
+ const parseColor = (value, fallback) => {
20
+ if (!value)
21
+ return fallback;
22
+ if (typeof value === 'string')
23
+ return value;
24
+ if (typeof value === 'object' && value.color)
25
+ return value.color;
26
+ return fallback;
27
+ };
28
+ const TimelineComponent = ({ component, stateManager, isPreviewMode = false, renderComponent, }) => {
29
+ var _a;
30
+ const props = component.properties;
31
+ // Extract timeline-specific styling
32
+ const markerColor = parseColor(props.markerColor, '#3B82F6');
33
+ const markerSize = props.markerSize || 32;
34
+ const markerRadius = (_a = props.markerRadius) !== null && _a !== void 0 ? _a : markerSize / 2;
35
+ const lineColor = parseColor(props.lineColor, '#3B82F6');
36
+ const lineWidthRaw = props.lineWidth;
37
+ const lineWidth = typeof lineWidthRaw === 'object' ? lineWidthRaw.value : (lineWidthRaw || 2);
38
+ const lineStyle = props.lineStyle || 'solid';
39
+ const eventGap = props.eventGap || 0;
40
+ const contentGap = props.contentGap || 16;
41
+ const children = component.children || [];
42
+ return (<react_native_1.View style={[styles.container, { gap: eventGap }]}>
43
+ {children.map((child, index) => {
44
+ const isLast = index === children.length - 1;
45
+ return (<react_native_1.View key={child.id || index} style={styles.eventRow}>
46
+ {/* Marker Column */}
47
+ <react_native_1.View style={[styles.markerColumn, { width: markerSize }]}>
48
+ {/* Marker Circle */}
49
+ <react_native_1.View style={[
50
+ styles.marker,
51
+ {
52
+ width: markerSize,
53
+ height: markerSize,
54
+ borderRadius: markerRadius,
55
+ backgroundColor: markerColor,
56
+ },
57
+ ]}/>
58
+
59
+ {/* Connecting Line */}
60
+ {!isLast && (<react_native_1.View style={[
61
+ styles.line,
62
+ {
63
+ width: lineWidth,
64
+ backgroundColor: lineStyle === 'solid' ? lineColor : undefined,
65
+ borderStyle: lineStyle === 'dashed' ? 'dashed' : lineStyle === 'dotted' ? 'dotted' : undefined,
66
+ borderWidth: lineStyle !== 'solid' ? lineWidth : 0,
67
+ borderColor: lineColor,
68
+ },
69
+ ]}/>)}
70
+ </react_native_1.View>
71
+
72
+ {/* Content Column */}
73
+ <react_native_1.View style={[styles.contentColumn, { marginLeft: contentGap }]}>
74
+ {renderComponent === null || renderComponent === void 0 ? void 0 : renderComponent(child)}
75
+ </react_native_1.View>
76
+ </react_native_1.View>);
77
+ })}
78
+ </react_native_1.View>);
79
+ };
80
+ exports.TimelineComponent = TimelineComponent;
81
+ const styles = react_native_1.StyleSheet.create({
82
+ container: {
83
+ width: '100%',
84
+ },
85
+ eventRow: {
86
+ flexDirection: 'row',
87
+ },
88
+ markerColumn: {
89
+ alignItems: 'center',
90
+ },
91
+ marker: {
92
+ justifyContent: 'center',
93
+ alignItems: 'center',
94
+ },
95
+ line: {
96
+ flex: 1,
97
+ marginTop: 4,
98
+ marginBottom: 4,
99
+ },
100
+ contentColumn: {
101
+ flex: 1,
102
+ paddingBottom: 16,
103
+ },
104
+ });
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { PaywallComponent } from '../types';
3
+ interface ToggleComponentProps {
4
+ component: PaywallComponent;
5
+ stateManager?: any;
6
+ isPreviewMode?: boolean;
7
+ renderComponent?: (component: PaywallComponent) => React.ReactNode;
8
+ }
9
+ /**
10
+ * ToggleComponent - Hybrid component that renders children (label/description) + switch
11
+ * Children are rendered via renderComponent callback, switch is functional
12
+ */
13
+ export declare const ToggleComponent: React.FC<ToggleComponentProps>;
14
+ export {};
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.ToggleComponent = void 0;
37
+ const react_1 = __importStar(require("react"));
38
+ const react_native_1 = require("react-native");
39
+ // Size mappings matching web schema
40
+ const SIZE_MAP = {
41
+ sm: { width: 40, height: 20 },
42
+ md: { width: 50, height: 26 },
43
+ lg: { width: 60, height: 32 },
44
+ };
45
+ /**
46
+ * ToggleComponent - Hybrid component that renders children (label/description) + switch
47
+ * Children are rendered via renderComponent callback, switch is functional
48
+ */
49
+ const ToggleComponent = ({ component, stateManager, isPreviewMode = false, renderComponent, }) => {
50
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
51
+ const props = component.properties;
52
+ const defaultChecked = (_a = props.defaultValue) !== null && _a !== void 0 ? _a : false;
53
+ const disabled = (_b = props.disabled) !== null && _b !== void 0 ? _b : false;
54
+ const size = (_c = props.size) !== null && _c !== void 0 ? _c : 'md';
55
+ const trackOnColor = (_d = props.trackOnColor) !== null && _d !== void 0 ? _d : '#007AFF';
56
+ const trackOffColor = (_e = props.trackOffColor) !== null && _e !== void 0 ? _e : '#767577';
57
+ const [isChecked, setIsChecked] = (0, react_1.useState)(defaultChecked);
58
+ // Register initial state
59
+ (0, react_1.useEffect)(() => {
60
+ if (stateManager) {
61
+ stateManager.updateState(`element:${component.id}.isChecked`, isChecked);
62
+ }
63
+ }, []);
64
+ // Subscribe to external state changes
65
+ (0, react_1.useEffect)(() => {
66
+ if (stateManager) {
67
+ return stateManager.subscribeToState(`element:${component.id}.isChecked`, (value) => {
68
+ if (value !== isChecked) {
69
+ setIsChecked(value);
70
+ }
71
+ });
72
+ }
73
+ }, [component.id, stateManager]);
74
+ const handleToggle = (value) => {
75
+ var _a;
76
+ if (!disabled) {
77
+ const previousValue = isChecked;
78
+ setIsChecked(value);
79
+ if (stateManager) {
80
+ stateManager.updateState(`element:${component.id}.isChecked`, value);
81
+ // Emit toggle_change event for analytics
82
+ (_a = stateManager.trackEvent) === null || _a === void 0 ? void 0 : _a.call(stateManager, 'toggle_change', {
83
+ componentId: component.id,
84
+ previousValue,
85
+ newValue: value,
86
+ });
87
+ }
88
+ }
89
+ };
90
+ // Structural inference: content container is the first child where type === 'stack'
91
+ // Label container is the first stack child within content container
92
+ const contentContainer = (_f = component.children) === null || _f === void 0 ? void 0 : _f.find(child => child.type === 'stack');
93
+ const labelContainer = (_g = contentContainer === null || contentContainer === void 0 ? void 0 : contentContainer.children) === null || _g === void 0 ? void 0 : _g.find(child => child.type === 'stack');
94
+ // Fallback: find text children directly if no nested structure
95
+ const textChildren = !labelContainer && ((_h = contentContainer === null || contentContainer === void 0 ? void 0 : contentContainer.children) === null || _h === void 0 ? void 0 : _h.filter(child => child.type === 'text'));
96
+ // Get size dimensions
97
+ const sizeConfig = (_j = SIZE_MAP[size]) !== null && _j !== void 0 ? _j : SIZE_MAP.md;
98
+ return (<react_native_1.View style={[styles.container, disabled && styles.disabled]}>
99
+ {/* Render label-container children */}
100
+ {labelContainer && renderComponent && (<react_native_1.View style={styles.labelContainer}>
101
+ {renderComponent(labelContainer)}
102
+ </react_native_1.View>)}
103
+
104
+ {/* Backward compatibility: render text children directly */}
105
+ {!labelContainer && textChildren && renderComponent && textChildren.map(child => (<react_native_1.View key={child.id} style={styles.labelContainer}>
106
+ {renderComponent(child)}
107
+ </react_native_1.View>))}
108
+
109
+ {/* Functional Switch control */}
110
+ <react_native_1.Switch value={isChecked} onValueChange={handleToggle} disabled={disabled} trackColor={{ false: trackOffColor, true: trackOnColor }} thumbColor={isChecked ? '#fff' : '#f4f3f4'} style={{
111
+ transform: [
112
+ { scaleX: sizeConfig.width / 50 },
113
+ { scaleY: sizeConfig.height / 26 }
114
+ ]
115
+ }}/>
116
+ </react_native_1.View>);
117
+ };
118
+ exports.ToggleComponent = ToggleComponent;
119
+ const styles = react_native_1.StyleSheet.create({
120
+ container: {
121
+ flexDirection: 'row',
122
+ alignItems: 'center',
123
+ justifyContent: 'space-between',
124
+ gap: 12,
125
+ },
126
+ disabled: {
127
+ opacity: 0.5,
128
+ },
129
+ labelContainer: {
130
+ flex: 1,
131
+ },
132
+ });
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Vertical Products Component for React Native
3
+ * Pure Child Model: renders children via renderChild with overlay extraction,
4
+ * child sanitization, and selection state propagation.
5
+ * Matches Android ProductsComponent.kt and iOS ProductsRenderer.swift architecture.
6
+ */
7
+ import React from 'react';
8
+ import { PaywallComponent, PaywallConfiguration } from '../types';
9
+ export interface VerticalProductsComponentProps {
10
+ component: PaywallComponent;
11
+ configuration: PaywallConfiguration;
12
+ renderChild: (child: PaywallComponent) => React.ReactNode;
13
+ stateManager?: any;
14
+ onAction?: (componentId: string, action: string) => void;
15
+ }
16
+ export declare const VerticalProductsComponent: React.FC<VerticalProductsComponentProps>;
17
+ export default VerticalProductsComponent;
@@ -0,0 +1,311 @@
1
+ "use strict";
2
+ /**
3
+ * Vertical Products Component for React Native
4
+ * Pure Child Model: renders children via renderChild with overlay extraction,
5
+ * child sanitization, and selection state propagation.
6
+ * Matches Android ProductsComponent.kt and iOS ProductsRenderer.swift architecture.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.VerticalProductsComponent = void 0;
43
+ const react_1 = __importStar(require("react"));
44
+ const react_native_1 = require("react-native");
45
+ const PaywallStateManager_1 = require("../PaywallStateManager");
46
+ function getRole(child) {
47
+ var _a;
48
+ return child.role || ((_a = child.properties) === null || _a === void 0 ? void 0 : _a.role);
49
+ }
50
+ function extractOverlays(children) {
51
+ if (!(children === null || children === void 0 ? void 0 : children.length)) {
52
+ return { badge: null, checkmark: null, radioIndicator: null, remainingChildren: [] };
53
+ }
54
+ const badge = children.find(c => getRole(c) === 'badge') || null;
55
+ const checkmark = children.find(c => getRole(c) === 'checkmark') || null;
56
+ const radioIndicator = children.find(c => getRole(c) === 'radio-indicator') || null;
57
+ const remaining = children.filter(c => c !== badge && c !== checkmark && c !== radioIndicator);
58
+ return { badge, checkmark, radioIndicator, remainingChildren: remaining };
59
+ }
60
+ // ============= CHILD SANITIZATION =============
61
+ function sanitizeProductChild(child) {
62
+ const sanitized = { ...child };
63
+ // Strip card-level appearance (wrapper handles it)
64
+ if (sanitized.appearance) {
65
+ const { fill, backgroundColor, cornerRadius, borderColor, borderWidth, shadow, ...rest } = sanitized.appearance;
66
+ sanitized.appearance = rest;
67
+ }
68
+ // Strip selected appearance (wrapper handles selection styling)
69
+ sanitized.selectedAppearance = undefined;
70
+ // Strip layout padding (wrapper applies card padding)
71
+ if (sanitized.layout) {
72
+ const { padding, ...restLayout } = sanitized.layout;
73
+ sanitized.layout = restLayout;
74
+ }
75
+ return sanitized;
76
+ }
77
+ // ============= SELECTION STATE PROPAGATION =============
78
+ function applySelectionState(component, isSelected, isHybridMode) {
79
+ var _a;
80
+ if (!isHybridMode)
81
+ return component;
82
+ const role = getRole(component);
83
+ // Handle radio-indicator composite
84
+ if (role === 'radio-indicator' && component.type === 'stack' && component.children) {
85
+ return {
86
+ ...component,
87
+ children: component.children.map(iconChild => {
88
+ const iconRole = getRole(iconChild);
89
+ if (iconRole === 'selected-icon')
90
+ return { ...iconChild, visible: isSelected };
91
+ if (iconRole === 'unselected-icon')
92
+ return { ...iconChild, visible: !isSelected };
93
+ return applySelectionState(iconChild, isSelected, isHybridMode);
94
+ }),
95
+ };
96
+ }
97
+ // Handle checkmark visibility
98
+ if (role === 'checkmark') {
99
+ return { ...component, visible: isSelected };
100
+ }
101
+ // Recurse into children
102
+ if ((_a = component.children) === null || _a === void 0 ? void 0 : _a.length) {
103
+ return {
104
+ ...component,
105
+ children: component.children.map(c => applySelectionState(c, isSelected, isHybridMode)),
106
+ };
107
+ }
108
+ return component;
109
+ }
110
+ // ============= HYBRID MODE DETECTION =============
111
+ function hasHybridChildren(children) {
112
+ return children.some(child => {
113
+ if (getRole(child))
114
+ return true;
115
+ return hasChildWithRole(child);
116
+ });
117
+ }
118
+ function hasChildWithRole(component) {
119
+ if (!component.children)
120
+ return false;
121
+ for (const child of component.children) {
122
+ if (getRole(child))
123
+ return true;
124
+ if (hasChildWithRole(child))
125
+ return true;
126
+ }
127
+ return false;
128
+ }
129
+ // ============= HELPERS =============
130
+ function resolveNumber(val, fallback) {
131
+ if (typeof val === 'number')
132
+ return val;
133
+ if (val && typeof val === 'object' && 'value' in val)
134
+ return val.value;
135
+ return fallback;
136
+ }
137
+ function resolveColor(appearance, key, fallback) {
138
+ if (!appearance)
139
+ return fallback;
140
+ const val = appearance[key];
141
+ if (!val)
142
+ return fallback;
143
+ if (typeof val === 'string')
144
+ return val;
145
+ if (val.resolvedColor)
146
+ return val.resolvedColor;
147
+ if (val.color)
148
+ return typeof val.color === 'string' ? val.color : fallback;
149
+ if (val.hex)
150
+ return val.hex;
151
+ return fallback;
152
+ }
153
+ function resolveFillColor(appearance, fallback) {
154
+ if (!appearance)
155
+ return fallback;
156
+ if (appearance.fill)
157
+ return resolveColor(appearance, 'fill', fallback);
158
+ if (appearance.backgroundColor)
159
+ return resolveColor(appearance, 'backgroundColor', fallback);
160
+ return fallback;
161
+ }
162
+ // ============= MAIN COMPONENT =============
163
+ const VerticalProductsComponent = ({ component, configuration, renderChild, stateManager, onAction, }) => {
164
+ const properties = component.properties || {};
165
+ const allChildren = component.children || [];
166
+ // Package binding
167
+ const bindToPackages = properties.bindToPackages !== false;
168
+ const packageIdentifiers = properties.packageIdentifiers || [];
169
+ // Resolve bound packages
170
+ const boundPackages = bindToPackages
171
+ ? (packageIdentifiers.length > 0
172
+ ? packageIdentifiers
173
+ .map(id => (configuration.packages || []).find(p => p.identifier === id || p.productId === id))
174
+ .filter(Boolean)
175
+ : configuration.packages || [])
176
+ : [];
177
+ // Children resolution: bind mode with packages available -> limit; else show all visible
178
+ const children = (bindToPackages && boundPackages.length > 0)
179
+ ? allChildren.slice(0, boundPackages.length)
180
+ : allChildren.filter(c => c.visible !== false);
181
+ const gap = resolveNumber(properties.gap, 12);
182
+ const defaultSelectedIndex = resolveNumber(properties.defaultSelectedIndex, 0);
183
+ const showRadio = properties.showRadio !== false;
184
+ const showBadge = !!properties.showBadge;
185
+ const badgeProductIndex = resolveNumber(properties.badgeProductIndex, 0);
186
+ const isHybridMode = hasHybridChildren(children);
187
+ // State
188
+ const stateKey = `element:${component.id}.selectedIndex`;
189
+ const [selectedIndex, setSelectedIndex] = (0, react_1.useState)(defaultSelectedIndex);
190
+ (0, react_1.useEffect)(() => {
191
+ var _a, _b, _c;
192
+ if (!stateManager)
193
+ return;
194
+ const existing = (_a = stateManager.getState) === null || _a === void 0 ? void 0 : _a.call(stateManager, stateKey);
195
+ if (existing !== undefined && existing !== null) {
196
+ setSelectedIndex(Number(existing));
197
+ }
198
+ else {
199
+ (_b = stateManager.setState) === null || _b === void 0 ? void 0 : _b.call(stateManager, stateKey, defaultSelectedIndex);
200
+ }
201
+ // Return the unsubscribe. This was dropped on the floor while nothing supplied a
202
+ // stateManager and every call no-opped; now that one is provided, an uncleaned
203
+ // subscription leaks a listener holding a stale setSelectedIndex on each remount.
204
+ return (_c = stateManager.subscribe) === null || _c === void 0 ? void 0 : _c.call(stateManager, stateKey, (value) => {
205
+ setSelectedIndex(Number(value) || 0);
206
+ });
207
+ }, [component.id, stateManager]);
208
+ // Publish the live selection PAYWALL-WIDE so Dynamic Values can react to it
209
+ // (`products.selectedIndex == 1` templates) and so `selectedProduct.*` resolves for
210
+ // the user's actual choice. The per-element key above is scoped to this component.
211
+ // With multiple products components, last write wins — same contract as Android
212
+ // ProductsComponent and iOS ProductsRenderer.updateSelectionState.
213
+ (0, react_1.useEffect)(() => {
214
+ var _a;
215
+ (_a = stateManager === null || stateManager === void 0 ? void 0 : stateManager.setState) === null || _a === void 0 ? void 0 : _a.call(stateManager, PaywallStateManager_1.PaywallStateManager.SELECTED_INDEX_KEY, selectedIndex);
216
+ }, [selectedIndex, stateManager]);
217
+ const handleSelect = (0, react_1.useCallback)((index) => {
218
+ var _a, _b;
219
+ setSelectedIndex(index);
220
+ (_a = stateManager === null || stateManager === void 0 ? void 0 : stateManager.setState) === null || _a === void 0 ? void 0 : _a.call(stateManager, stateKey, index);
221
+ onAction === null || onAction === void 0 ? void 0 : onAction(component.id, `select_package:${index},${(_b = children[index]) === null || _b === void 0 ? void 0 : _b.id}`);
222
+ react_native_1.AccessibilityInfo.announceForAccessibility(`Selected product ${index + 1}`);
223
+ }, [stateKey, stateManager, onAction, component.id, children]);
224
+ // Render single product card (3-layer structure)
225
+ const renderProductCard = (child, index) => {
226
+ const isSelected = index === selectedIndex;
227
+ const childAppearance = child.appearance;
228
+ const childSelectedAppearance = child.selectedAppearance;
229
+ const childLayout = child.layout;
230
+ // Default state styling from child.appearance
231
+ const cardBg = resolveFillColor(childAppearance, 'transparent');
232
+ const cardCornerRadius = resolveNumber(childAppearance === null || childAppearance === void 0 ? void 0 : childAppearance.cornerRadius, 12);
233
+ const cardBorderColor = resolveColor(childAppearance, 'borderColor', 'rgba(128,128,128,0.2)');
234
+ const cardBorderWidth = resolveNumber(childAppearance === null || childAppearance === void 0 ? void 0 : childAppearance.borderWidth, 0);
235
+ // Selected state styling from child.selectedAppearance
236
+ const selectedBg = resolveFillColor(childSelectedAppearance, 'rgba(59,130,246,0.1)');
237
+ const selectedBorderColor = resolveColor(childSelectedAppearance, 'borderColor', '#3B82F6');
238
+ const selectedBorderWidth = resolveNumber(childSelectedAppearance === null || childSelectedAppearance === void 0 ? void 0 : childSelectedAppearance.borderWidth, 2);
239
+ const bgColor = isSelected ? selectedBg : cardBg;
240
+ const borderColor = isSelected ? selectedBorderColor : cardBorderColor;
241
+ const borderWidth = isSelected ? selectedBorderWidth : cardBorderWidth;
242
+ // Padding from child.layout.padding
243
+ const padding = childLayout === null || childLayout === void 0 ? void 0 : childLayout.padding;
244
+ const paddingTop = resolveNumber(padding === null || padding === void 0 ? void 0 : padding.top, 14);
245
+ const paddingRight = resolveNumber(padding === null || padding === void 0 ? void 0 : padding.right, 16);
246
+ const paddingBottom = resolveNumber(padding === null || padding === void 0 ? void 0 : padding.bottom, 14);
247
+ const paddingLeft = resolveNumber(padding === null || padding === void 0 ? void 0 : padding.left, 16);
248
+ // Extract overlays
249
+ const extraction = extractOverlays(child.children);
250
+ // Sanitize child
251
+ const childWithRemaining = { ...child, children: extraction.remainingChildren };
252
+ const sanitized = sanitizeProductChild(childWithRemaining);
253
+ const transformed = applySelectionState(sanitized, isSelected, isHybridMode);
254
+ return (<react_native_1.TouchableOpacity key={child.id || `product-${index}`} activeOpacity={0.8} onPress={() => handleSelect(index)} accessibilityRole="radio" accessibilityState={{ selected: isSelected }} accessibilityLabel={`Product ${index + 1}, ${isSelected ? 'selected' : 'not selected'}`} style={{ marginBottom: index < children.length - 1 ? gap : 0 }}>
255
+ {/* 3-Layer Structure */}
256
+ <react_native_1.View style={{ position: 'relative' }}>
257
+ {/* Layer 1: Background */}
258
+ <react_native_1.View style={{
259
+ ...react_native_1.StyleSheet.absoluteFillObject,
260
+ backgroundColor: bgColor,
261
+ borderRadius: cardCornerRadius,
262
+ borderColor: borderColor,
263
+ borderWidth: borderWidth,
264
+ }}/>
265
+
266
+ {/* Layer 2: Content with padding */}
267
+ <react_native_1.View style={{
268
+ flexDirection: 'row',
269
+ alignItems: 'center',
270
+ paddingTop,
271
+ paddingRight,
272
+ paddingBottom,
273
+ paddingLeft,
274
+ }}>
275
+ {/* Radio indicator */}
276
+ {showRadio && (isHybridMode && extraction.radioIndicator ? (<react_native_1.View style={{ marginRight: 12 }}>
277
+ {renderChild(applySelectionState(extraction.radioIndicator, isSelected, true))}
278
+ </react_native_1.View>) : !isHybridMode ? (<react_native_1.View style={{ marginRight: 12 }}>
279
+ <react_native_1.View style={{
280
+ width: 22,
281
+ height: 22,
282
+ borderRadius: 11,
283
+ borderWidth: 2,
284
+ borderColor: isSelected ? '#3B82F6' : 'rgba(128,128,128,0.4)',
285
+ backgroundColor: isSelected ? '#3B82F6' : 'transparent',
286
+ justifyContent: 'center',
287
+ alignItems: 'center',
288
+ }}>
289
+ {isSelected && (<react_native_1.Text style={{ color: '#FFFFFF', fontSize: 12, fontWeight: 'bold' }}>✓</react_native_1.Text>)}
290
+ </react_native_1.View>
291
+ </react_native_1.View>) : null)}
292
+
293
+ {/* Render sanitized child content */}
294
+ <react_native_1.View style={{ flex: 1 }}>
295
+ {renderChild(transformed)}
296
+ </react_native_1.View>
297
+ </react_native_1.View>
298
+
299
+ {/* Layer 3: Badge overlay */}
300
+ {extraction.badge && showBadge && index === badgeProductIndex && (<react_native_1.View style={{ position: 'absolute', top: -10, right: 12, zIndex: 10 }}>
301
+ {renderChild(extraction.badge)}
302
+ </react_native_1.View>)}
303
+ </react_native_1.View>
304
+ </react_native_1.TouchableOpacity>);
305
+ };
306
+ return (<react_native_1.View accessibilityRole="radiogroup" accessibilityLabel="Select a product">
307
+ {children.map((child, index) => renderProductCard(child, index))}
308
+ </react_native_1.View>);
309
+ };
310
+ exports.VerticalProductsComponent = VerticalProductsComponent;
311
+ exports.default = exports.VerticalProductsComponent;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Dynamic Values System for React Native SDK
3
+ * Supports nested condition groups with AND/OR logic
4
+ */
5
+ export interface DynamicCondition {
6
+ id: string;
7
+ type: 'variable';
8
+ variableName?: string;
9
+ operator: 'equals' | 'not_equals' | 'greater_than' | 'less_than' | 'greater_than_or_equal' | 'less_than_or_equal' | 'contains' | 'exists';
10
+ value: any;
11
+ }
12
+ export interface ConditionGroup {
13
+ id: string;
14
+ logic: 'AND' | 'OR';
15
+ conditions: DynamicCondition[];
16
+ groups: ConditionGroup[];
17
+ }
18
+ export interface DynamicValueEntry {
19
+ id: string;
20
+ rootGroup: ConditionGroup;
21
+ value: any;
22
+ }
23
+ export interface DynamicValue {
24
+ _isDynamic: true;
25
+ default: any;
26
+ values: DynamicValueEntry[];
27
+ }
28
+ export declare function isDynamicValue(value: any): value is DynamicValue;
29
+ export declare function evaluateDynamicValue(dynamicValue: any, variables: Record<string, any>): any;
30
+ export declare function evaluateConditionGroup(group: ConditionGroup, variables: Record<string, any>): boolean;
31
+ export declare function processComponentProperties(properties: Record<string, any>, variables: Record<string, any>): Record<string, any>;
32
+ export declare function processFullComponent<T extends Record<string, any>>(component: T, variables: Record<string, any>): T;
33
+ export declare function createConditionGroup(logic?: 'AND' | 'OR'): ConditionGroup;
34
+ export declare function createDynamicValue(defaultValue: any, values?: DynamicValueEntry[]): DynamicValue;
35
+ export declare function createCondition(variableName: string, operator: DynamicCondition['operator'], value: any): DynamicCondition;
36
+ export declare function createSimpleValueEntry(variableName: string, operator: DynamicCondition['operator'], value: any, returnValue: any): DynamicValueEntry;