@developer_tribe/react-builder 1.2.37 → 1.2.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-components/BIcon/BIconProps.generated.d.ts +1 -0
- package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +1 -0
- package/dist/build-components/Button/ButtonProps.generated.d.ts +1 -0
- package/dist/build-components/Carousel/CarouselProps.generated.d.ts +1 -0
- package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +1 -0
- package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +1 -0
- package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +1 -0
- package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +1 -0
- package/dist/build-components/CountDown/CountDownProps.generated.d.ts +1 -0
- package/dist/build-components/Image/ImageProps.generated.d.ts +3 -0
- package/dist/build-components/Main/MainProps.generated.d.ts +1 -0
- package/dist/build-components/NavigationBarColor/NavigationBarColorProps.generated.d.ts +1 -0
- package/dist/build-components/Onboard/OnboardProps.generated.d.ts +1 -0
- package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +2 -0
- package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +1 -0
- package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +1 -0
- package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +1 -0
- package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +3 -0
- package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +1 -0
- package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +1 -0
- package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +1 -0
- package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +1 -0
- package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +1 -0
- package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +1 -0
- package/dist/build-components/PaywallOptions/PaywallOptionsProps.generated.d.ts +1 -0
- package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +1 -0
- package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +1 -0
- package/dist/build-components/PriceTag/PriceTagProps.generated.d.ts +1 -0
- package/dist/build-components/Pricing/PricingProps.generated.d.ts +1 -0
- package/dist/build-components/Promo/PromoProps.generated.d.ts +1 -0
- package/dist/build-components/RadioButton/RadioButtonProps.generated.d.ts +1 -0
- package/dist/build-components/Separator/SeparatorProps.generated.d.ts +1 -0
- package/dist/build-components/StatusBarColor/StatusBarColorProps.generated.d.ts +1 -39
- package/dist/build-components/Text/TextProps.generated.d.ts +1 -0
- package/dist/build-components/View/ViewProps.generated.d.ts +1 -0
- package/dist/build-components/patterns.generated.d.ts +1455 -1007
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.web.cjs.js +4 -4
- package/dist/index.web.cjs.js.map +1 -1
- package/dist/index.web.esm.js +4 -4
- package/dist/index.web.esm.js.map +1 -1
- package/dist/mockOS/context/MockOSContextBase.d.ts +1 -0
- package/dist/mockOS/managers/mockPermissionManager.d.ts +1 -1
- package/dist/types/PreviewConfig.d.ts +1 -1
- package/package.json +1 -1
- package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +18 -0
- package/src/assets/meta.json +1 -1
- package/src/assets/prompt-scheme-onboard.generated.ts +1 -1
- package/src/assets/prompt-scheme-paywall.generated.ts +1 -1
- package/src/assets/samples/carousel-sample.json +49 -23
- package/src/assets/samples/paywall-1.json +61 -29
- package/src/assets/samples/paywall-2.json +53 -25
- package/src/assets/samples/paywall-app-delete-offer.json +55 -26
- package/src/assets/samples/paywall-app-open-offer.json +55 -26
- package/src/assets/samples/paywall-back-offer.json +55 -26
- package/src/assets/samples/paywall-notification-offer.json +55 -26
- package/src/assets/samples/simple-1.json +9 -3
- package/src/assets/samples/simple-2.json +51 -24
- package/src/assets/samples/unmigrated-builder-1.1.1.json +15 -6
- package/src/assets/samples/unmigrated-builder1.json +9 -3
- package/src/assets/samples/unvalidated-builder1.json +9 -3
- package/src/assets/samples/unvalidated-crash1.json +5 -1
- package/src/assets/samples/unvalidated-crashcomponent1.json +5 -1
- package/src/assets/samples/vpn-onboard-1.json +94 -51
- package/src/assets/samples/vpn-onboard-2.json +94 -51
- package/src/assets/samples/vpn-onboard-3.json +85 -48
- package/src/assets/samples/vpn-onboard-4.json +85 -48
- package/src/assets/samples/vpn-onboard-5.json +132 -73
- package/src/assets/samples/vpn-onboard-6.json +94 -51
- package/src/assets/samples/vpn-onboard-7.json +92 -50
- package/src/build-components/BIcon/BIconProps.generated.ts +1 -0
- package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +1 -0
- package/src/build-components/Button/ButtonProps.generated.ts +1 -0
- package/src/build-components/Carousel/CarouselProps.generated.ts +1 -0
- package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +1 -0
- package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +1 -0
- package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +1 -0
- package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +1 -0
- package/src/build-components/CountDown/CountDownProps.generated.ts +1 -0
- package/src/build-components/Image/ImageProps.generated.ts +7 -0
- package/src/build-components/Image/pattern.json +9 -0
- package/src/build-components/Main/MainProps.generated.ts +1 -0
- package/src/build-components/NavigationBarColor/NavigationBarColorProps.generated.ts +1 -0
- package/src/build-components/Onboard/OnboardProps.generated.ts +1 -0
- package/src/build-components/OnboardButton/OnboardButton.tsx +6 -6
- package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +2 -0
- package/src/build-components/OnboardButton/pattern.json +2 -1
- package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +1 -0
- package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +1 -0
- package/src/build-components/OnboardFooter/OnboardFooter.tsx +3 -3
- package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +1 -0
- package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +7 -0
- package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +1 -0
- package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +1 -0
- package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +1 -0
- package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +1 -0
- package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +1 -0
- package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +1 -0
- package/src/build-components/PaywallOptions/PaywallOptionsProps.generated.ts +1 -0
- package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +1 -0
- package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +1 -0
- package/src/build-components/PriceTag/PriceTagProps.generated.ts +1 -0
- package/src/build-components/Pricing/PricingProps.generated.ts +1 -0
- package/src/build-components/Promo/PromoProps.generated.ts +1 -0
- package/src/build-components/RadioButton/RadioButtonProps.generated.ts +1 -0
- package/src/build-components/Separator/SeparatorProps.generated.ts +1 -0
- package/src/build-components/Separator/pattern.json +2 -1
- package/src/build-components/StatusBarColor/StatusBarColorProps.generated.ts +1 -51
- package/src/build-components/StatusBarColor/pattern.json +2 -2
- package/src/build-components/Text/TextProps.generated.ts +1 -0
- package/src/build-components/Text/pattern.json +1 -1
- package/src/build-components/View/ViewProps.generated.ts +1 -0
- package/src/build-components/View/pattern.json +2 -1
- package/src/build-components/patterns.generated.ts +1567 -1139
- package/src/mockOS/context/MockOSContext.tsx +32 -0
- package/src/mockOS/context/MockOSContextBase.ts +3 -0
- package/src/mockOS/managers/mockPermissionManager.ts +9 -3
- package/src/modals/InspectModal.tsx +37 -8
- package/src/product-base/buildPaywallLocalizationParams.ts +12 -3
- package/src/types/PreviewConfig.ts +70 -46
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"title": "Main 1",
|
|
13
13
|
"styles": {
|
|
14
14
|
"paddingBottom": 16
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
|
+
"testID": "Main-test-id"
|
|
16
17
|
},
|
|
17
18
|
"children": [
|
|
18
19
|
{
|
|
@@ -22,7 +23,8 @@
|
|
|
22
23
|
"description": "Status bar background color.",
|
|
23
24
|
"styles": {
|
|
24
25
|
"backgroundColor": "THEME_COLORS.BACKGROUND"
|
|
25
|
-
}
|
|
26
|
+
},
|
|
27
|
+
"testID": "StatusBarColor-test-id"
|
|
26
28
|
},
|
|
27
29
|
"children": null,
|
|
28
30
|
"key": "StatusBarColor-sxj19suwkrn"
|
|
@@ -34,7 +36,8 @@
|
|
|
34
36
|
"description": "Navigation bar background color.",
|
|
35
37
|
"styles": {
|
|
36
38
|
"backgroundColor": "THEME_COLORS.BACKGROUND"
|
|
37
|
-
}
|
|
39
|
+
},
|
|
40
|
+
"testID": "NavigationBarColor-test-id"
|
|
38
41
|
},
|
|
39
42
|
"children": null,
|
|
40
43
|
"key": "NavigationBarColor-rhzn570dc5o"
|
|
@@ -59,9 +62,10 @@
|
|
|
59
62
|
"textAlign": "center",
|
|
60
63
|
"marginTop": 40,
|
|
61
64
|
"fontSize": "28@fs"
|
|
62
|
-
}
|
|
65
|
+
},
|
|
66
|
+
"testID": "OnboardTitle-test-id"
|
|
63
67
|
},
|
|
64
|
-
"children": "onboard.title.one-page",
|
|
68
|
+
"children": "base.onboard.title.one-page",
|
|
65
69
|
"key": "OnboardTitle-5t0p86nj13m"
|
|
66
70
|
},
|
|
67
71
|
{
|
|
@@ -71,7 +75,9 @@
|
|
|
71
75
|
"resizeMode": "contain",
|
|
72
76
|
"styles": {
|
|
73
77
|
"height": 350
|
|
74
|
-
}
|
|
78
|
+
},
|
|
79
|
+
"testID": "OnboardImage-test-id",
|
|
80
|
+
"fetchStrategy": "highIfItsAppLaunch"
|
|
75
81
|
}
|
|
76
82
|
},
|
|
77
83
|
{
|
|
@@ -84,15 +90,17 @@
|
|
|
84
90
|
"fontSize": 16,
|
|
85
91
|
"textAlign": "center",
|
|
86
92
|
"paddingTop": "30@vs"
|
|
87
|
-
}
|
|
93
|
+
},
|
|
94
|
+
"testID": "OnboardSubtitle-test-id"
|
|
88
95
|
},
|
|
89
|
-
"children": "onboard.subtitle.one-page",
|
|
96
|
+
"children": "base.onboard.subtitle.one-page",
|
|
90
97
|
"key": "OnboardSubtitle-0max8wno7l5b"
|
|
91
98
|
}
|
|
92
99
|
],
|
|
93
100
|
"attributes": {
|
|
94
101
|
"description": "Onboarding sayfası. (#1)",
|
|
95
|
-
"title": "OnboardItem 1"
|
|
102
|
+
"title": "OnboardItem 1",
|
|
103
|
+
"testID": "OnboardItem-test-id"
|
|
96
104
|
}
|
|
97
105
|
},
|
|
98
106
|
{
|
|
@@ -109,9 +117,10 @@
|
|
|
109
117
|
"textAlign": "center",
|
|
110
118
|
"marginTop": 40,
|
|
111
119
|
"fontSize": "28@fs"
|
|
112
|
-
}
|
|
120
|
+
},
|
|
121
|
+
"testID": "OnboardTitle-test-id"
|
|
113
122
|
},
|
|
114
|
-
"children": "onboard.title.two-page",
|
|
123
|
+
"children": "base.onboard.title.two-page",
|
|
115
124
|
"key": "OnboardTitle-ne9iihu925k"
|
|
116
125
|
},
|
|
117
126
|
{
|
|
@@ -121,7 +130,9 @@
|
|
|
121
130
|
"resizeMode": "contain",
|
|
122
131
|
"styles": {
|
|
123
132
|
"height": 350
|
|
124
|
-
}
|
|
133
|
+
},
|
|
134
|
+
"testID": "OnboardImage-test-id",
|
|
135
|
+
"fetchStrategy": "normal"
|
|
125
136
|
}
|
|
126
137
|
},
|
|
127
138
|
{
|
|
@@ -134,15 +145,17 @@
|
|
|
134
145
|
"fontSize": 16,
|
|
135
146
|
"textAlign": "center",
|
|
136
147
|
"paddingTop": "30@vs"
|
|
137
|
-
}
|
|
148
|
+
},
|
|
149
|
+
"testID": "OnboardSubtitle-test-id"
|
|
138
150
|
},
|
|
139
|
-
"children": "onboard.subtitle.two-page",
|
|
151
|
+
"children": "base.onboard.subtitle.two-page",
|
|
140
152
|
"key": "OnboardSubtitle-jq9469r7c2"
|
|
141
153
|
}
|
|
142
154
|
],
|
|
143
155
|
"attributes": {
|
|
144
156
|
"description": "Onboarding sayfası. (#2)",
|
|
145
|
-
"title": "OnboardItem 2"
|
|
157
|
+
"title": "OnboardItem 2",
|
|
158
|
+
"testID": "OnboardItem-test-id"
|
|
146
159
|
}
|
|
147
160
|
},
|
|
148
161
|
{
|
|
@@ -159,9 +172,10 @@
|
|
|
159
172
|
"textAlign": "center",
|
|
160
173
|
"marginTop": 40,
|
|
161
174
|
"fontSize": "28@fs"
|
|
162
|
-
}
|
|
175
|
+
},
|
|
176
|
+
"testID": "OnboardTitle-test-id"
|
|
163
177
|
},
|
|
164
|
-
"children": "onboard.title.three-page",
|
|
178
|
+
"children": "base.onboard.title.three-page",
|
|
165
179
|
"key": "OnboardTitle-hczvlbg7gqj"
|
|
166
180
|
},
|
|
167
181
|
{
|
|
@@ -171,7 +185,9 @@
|
|
|
171
185
|
"resizeMode": "contain",
|
|
172
186
|
"styles": {
|
|
173
187
|
"height": 350
|
|
174
|
-
}
|
|
188
|
+
},
|
|
189
|
+
"testID": "OnboardImage-test-id",
|
|
190
|
+
"fetchStrategy": "normal"
|
|
175
191
|
}
|
|
176
192
|
},
|
|
177
193
|
{
|
|
@@ -184,15 +200,17 @@
|
|
|
184
200
|
"fontSize": 16,
|
|
185
201
|
"textAlign": "center",
|
|
186
202
|
"paddingTop": "30@vs"
|
|
187
|
-
}
|
|
203
|
+
},
|
|
204
|
+
"testID": "OnboardSubtitle-test-id"
|
|
188
205
|
},
|
|
189
|
-
"children": "onboard.subtitle.three-page",
|
|
206
|
+
"children": "base.onboard.subtitle.three-page",
|
|
190
207
|
"key": "OnboardSubtitle-rufjwid9yug"
|
|
191
208
|
}
|
|
192
209
|
],
|
|
193
210
|
"attributes": {
|
|
194
211
|
"description": "Onboarding sayfası. (#3)",
|
|
195
|
-
"title": "OnboardItem 3"
|
|
212
|
+
"title": "OnboardItem 3",
|
|
213
|
+
"testID": "OnboardItem-test-id"
|
|
196
214
|
}
|
|
197
215
|
},
|
|
198
216
|
{
|
|
@@ -209,9 +227,10 @@
|
|
|
209
227
|
"textAlign": "center",
|
|
210
228
|
"marginTop": 40,
|
|
211
229
|
"fontSize": "28@fs"
|
|
212
|
-
}
|
|
230
|
+
},
|
|
231
|
+
"testID": "OnboardTitle-test-id"
|
|
213
232
|
},
|
|
214
|
-
"children": "onboard.title.four-page",
|
|
233
|
+
"children": "base.onboard.title.four-page",
|
|
215
234
|
"key": "OnboardTitle-f2ekfc0wcbl"
|
|
216
235
|
},
|
|
217
236
|
{
|
|
@@ -221,7 +240,9 @@
|
|
|
221
240
|
"resizeMode": "contain",
|
|
222
241
|
"styles": {
|
|
223
242
|
"height": 350
|
|
224
|
-
}
|
|
243
|
+
},
|
|
244
|
+
"testID": "OnboardImage-test-id",
|
|
245
|
+
"fetchStrategy": "normal"
|
|
225
246
|
}
|
|
226
247
|
},
|
|
227
248
|
{
|
|
@@ -234,15 +255,17 @@
|
|
|
234
255
|
"fontSize": 16,
|
|
235
256
|
"textAlign": "center",
|
|
236
257
|
"paddingTop": "30@vs"
|
|
237
|
-
}
|
|
258
|
+
},
|
|
259
|
+
"testID": "OnboardSubtitle-test-id"
|
|
238
260
|
},
|
|
239
|
-
"children": "onboard.subtitle.four-page",
|
|
261
|
+
"children": "base.onboard.subtitle.four-page",
|
|
240
262
|
"key": "OnboardSubtitle-qkw2jn84xem"
|
|
241
263
|
}
|
|
242
264
|
],
|
|
243
265
|
"attributes": {
|
|
244
266
|
"description": "Onboarding sayfası. (#4)",
|
|
245
|
-
"title": "OnboardItem 4"
|
|
267
|
+
"title": "OnboardItem 4",
|
|
268
|
+
"testID": "OnboardItem-test-id"
|
|
246
269
|
}
|
|
247
270
|
}
|
|
248
271
|
],
|
|
@@ -251,7 +274,8 @@
|
|
|
251
274
|
"title": "Onboard 1",
|
|
252
275
|
"styles": {
|
|
253
276
|
"flex": 1
|
|
254
|
-
}
|
|
277
|
+
},
|
|
278
|
+
"testID": "Onboard-test-id"
|
|
255
279
|
},
|
|
256
280
|
"key": "Onboard-dg1zmwdawmg"
|
|
257
281
|
},
|
|
@@ -265,7 +289,8 @@
|
|
|
265
289
|
"styles": {
|
|
266
290
|
"paddingVertical": 12,
|
|
267
291
|
"dot_thickness": "10@s"
|
|
268
|
-
}
|
|
292
|
+
},
|
|
293
|
+
"testID": "OnboardDot-test-id"
|
|
269
294
|
}
|
|
270
295
|
},
|
|
271
296
|
{
|
|
@@ -281,13 +306,14 @@
|
|
|
281
306
|
"marginVertical": 12,
|
|
282
307
|
"flexShrink": 0,
|
|
283
308
|
"paddingBottom": "5@s"
|
|
284
|
-
}
|
|
309
|
+
},
|
|
310
|
+
"testID": "OnboardButtons-test-id"
|
|
285
311
|
},
|
|
286
312
|
"children": [
|
|
287
313
|
{
|
|
288
314
|
"type": "OnboardButton",
|
|
289
315
|
"attributes": {
|
|
290
|
-
"labelKey": "onboard.skip.one-page",
|
|
316
|
+
"labelKey": "base.onboard.skip.one-page",
|
|
291
317
|
"events": [
|
|
292
318
|
{
|
|
293
319
|
"type": "Navigate",
|
|
@@ -299,13 +325,14 @@
|
|
|
299
325
|
"flex": 1,
|
|
300
326
|
"color": "THEME_COLORS.ONBOARD_BUTTON_SECONDARY_TEXT",
|
|
301
327
|
"backgroundColor": "STATIC_COLORS.TRANSPARENT"
|
|
302
|
-
}
|
|
328
|
+
},
|
|
329
|
+
"testID": "onboardNext"
|
|
303
330
|
}
|
|
304
331
|
},
|
|
305
332
|
{
|
|
306
333
|
"type": "OnboardButton",
|
|
307
334
|
"attributes": {
|
|
308
|
-
"labelKey": "onboard.next.one-page",
|
|
335
|
+
"labelKey": "base.onboard.next.one-page",
|
|
309
336
|
"events": [
|
|
310
337
|
{
|
|
311
338
|
"type": "Navigate",
|
|
@@ -317,7 +344,8 @@
|
|
|
317
344
|
"flex": 1,
|
|
318
345
|
"color": "STATIC_COLORS.WHITE",
|
|
319
346
|
"backgroundColor": "STATIC_COLORS.ONBOARD_BUTTON_PRIMARY_BACKGROUND"
|
|
320
|
-
}
|
|
347
|
+
},
|
|
348
|
+
"testID": "onboardNext"
|
|
321
349
|
}
|
|
322
350
|
}
|
|
323
351
|
],
|
|
@@ -336,13 +364,14 @@
|
|
|
336
364
|
"marginVertical": 12,
|
|
337
365
|
"flexShrink": 0,
|
|
338
366
|
"paddingBottom": "5@s"
|
|
339
|
-
}
|
|
367
|
+
},
|
|
368
|
+
"testID": "OnboardButtons-test-id"
|
|
340
369
|
},
|
|
341
370
|
"children": [
|
|
342
371
|
{
|
|
343
372
|
"type": "OnboardButton",
|
|
344
373
|
"attributes": {
|
|
345
|
-
"labelKey": "onboard.skip.two-page",
|
|
374
|
+
"labelKey": "base.onboard.skip.two-page",
|
|
346
375
|
"events": [
|
|
347
376
|
{
|
|
348
377
|
"type": "Permission",
|
|
@@ -358,13 +387,14 @@
|
|
|
358
387
|
"flex": 1,
|
|
359
388
|
"color": "THEME_COLORS.ONBOARD_BUTTON_SECONDARY_TEXT",
|
|
360
389
|
"backgroundColor": "STATIC_COLORS.TRANSPARENT"
|
|
361
|
-
}
|
|
390
|
+
},
|
|
391
|
+
"testID": "onboardNext"
|
|
362
392
|
}
|
|
363
393
|
},
|
|
364
394
|
{
|
|
365
395
|
"type": "OnboardButton",
|
|
366
396
|
"attributes": {
|
|
367
|
-
"labelKey": "onboard.next.two-page",
|
|
397
|
+
"labelKey": "base.onboard.next.two-page",
|
|
368
398
|
"events": [
|
|
369
399
|
{
|
|
370
400
|
"type": "Permission",
|
|
@@ -380,7 +410,8 @@
|
|
|
380
410
|
"flex": 1,
|
|
381
411
|
"color": "STATIC_COLORS.WHITE",
|
|
382
412
|
"backgroundColor": "STATIC_COLORS.ONBOARD_BUTTON_PRIMARY_BACKGROUND"
|
|
383
|
-
}
|
|
413
|
+
},
|
|
414
|
+
"testID": "onboardNext"
|
|
384
415
|
}
|
|
385
416
|
}
|
|
386
417
|
],
|
|
@@ -399,13 +430,14 @@
|
|
|
399
430
|
"marginVertical": 12,
|
|
400
431
|
"flexShrink": 0,
|
|
401
432
|
"paddingBottom": "5@s"
|
|
402
|
-
}
|
|
433
|
+
},
|
|
434
|
+
"testID": "OnboardButtons-test-id"
|
|
403
435
|
},
|
|
404
436
|
"children": [
|
|
405
437
|
{
|
|
406
438
|
"type": "OnboardButton",
|
|
407
439
|
"attributes": {
|
|
408
|
-
"labelKey": "onboard.skip.three-page",
|
|
440
|
+
"labelKey": "base.onboard.skip.three-page",
|
|
409
441
|
"events": [
|
|
410
442
|
{
|
|
411
443
|
"type": "Navigate",
|
|
@@ -417,13 +449,14 @@
|
|
|
417
449
|
"flex": 1,
|
|
418
450
|
"color": "THEME_COLORS.ONBOARD_BUTTON_SECONDARY_TEXT",
|
|
419
451
|
"backgroundColor": "STATIC_COLORS.TRANSPARENT"
|
|
420
|
-
}
|
|
452
|
+
},
|
|
453
|
+
"testID": "onboardNext"
|
|
421
454
|
}
|
|
422
455
|
},
|
|
423
456
|
{
|
|
424
457
|
"type": "OnboardButton",
|
|
425
458
|
"attributes": {
|
|
426
|
-
"labelKey": "onboard.next.three-page",
|
|
459
|
+
"labelKey": "base.onboard.next.three-page",
|
|
427
460
|
"events": [
|
|
428
461
|
{
|
|
429
462
|
"type": "Permission",
|
|
@@ -439,7 +472,8 @@
|
|
|
439
472
|
"flex": 1,
|
|
440
473
|
"color": "STATIC_COLORS.WHITE",
|
|
441
474
|
"backgroundColor": "STATIC_COLORS.ONBOARD_BUTTON_PRIMARY_BACKGROUND"
|
|
442
|
-
}
|
|
475
|
+
},
|
|
476
|
+
"testID": "onboardNext"
|
|
443
477
|
}
|
|
444
478
|
}
|
|
445
479
|
],
|
|
@@ -458,13 +492,14 @@
|
|
|
458
492
|
"marginVertical": 12,
|
|
459
493
|
"flexShrink": 0,
|
|
460
494
|
"paddingBottom": "5@s"
|
|
461
|
-
}
|
|
495
|
+
},
|
|
496
|
+
"testID": "OnboardButtons-test-id"
|
|
462
497
|
},
|
|
463
498
|
"children": [
|
|
464
499
|
{
|
|
465
500
|
"type": "OnboardButton",
|
|
466
501
|
"attributes": {
|
|
467
|
-
"labelKey": "onboard.allow.four-page",
|
|
502
|
+
"labelKey": "base.onboard.allow.four-page",
|
|
468
503
|
"events": [
|
|
469
504
|
{
|
|
470
505
|
"type": "Permission",
|
|
@@ -479,7 +514,8 @@
|
|
|
479
514
|
"flex": 1,
|
|
480
515
|
"color": "STATIC_COLORS.WHITE",
|
|
481
516
|
"backgroundColor": "STATIC_COLORS.ONBOARD_BUTTON_PRIMARY_BACKGROUND"
|
|
482
|
-
}
|
|
517
|
+
},
|
|
518
|
+
"testID": "onboardNext"
|
|
483
519
|
}
|
|
484
520
|
}
|
|
485
521
|
],
|
|
@@ -493,7 +529,8 @@
|
|
|
493
529
|
"styles": {
|
|
494
530
|
"marginHorizontal": 25,
|
|
495
531
|
"flexShrink": 0
|
|
496
|
-
}
|
|
532
|
+
},
|
|
533
|
+
"testID": "View-test-id"
|
|
497
534
|
},
|
|
498
535
|
"children": [
|
|
499
536
|
{
|
|
@@ -510,7 +547,8 @@
|
|
|
510
547
|
"gap": 8,
|
|
511
548
|
"color": "THEME_COLORS.ONBOARD_FOOTER_TEXT",
|
|
512
549
|
"fontSize": "12@fs"
|
|
513
|
-
}
|
|
550
|
+
},
|
|
551
|
+
"testID": "OnboardFooter-test-id"
|
|
514
552
|
}
|
|
515
553
|
}
|
|
516
554
|
],
|
|
@@ -520,10 +558,14 @@
|
|
|
520
558
|
"attributes": {
|
|
521
559
|
"theme": "dark",
|
|
522
560
|
"description": "Onboarding sağlayıcısı. (#1)",
|
|
523
|
-
"title": "OnboardProvider 1"
|
|
561
|
+
"title": "OnboardProvider 1",
|
|
562
|
+
"testID": "OnboardProvider-test-id"
|
|
524
563
|
},
|
|
525
564
|
"key": "OnboardProvider-pvc5b6o5gu"
|
|
526
565
|
}
|
|
527
566
|
]
|
|
567
|
+
},
|
|
568
|
+
"attributes": {
|
|
569
|
+
"testID": "onboard-test-id"
|
|
528
570
|
}
|
|
529
571
|
}
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import type { NodeData } from '../../types/Node';
|
|
4
4
|
|
|
5
|
+
export type FetchStrategyOptionType =
|
|
6
|
+
| 'highIfItsAppLaunch'
|
|
7
|
+
| 'normal'
|
|
8
|
+
| 'lazy'
|
|
9
|
+
| 'none';
|
|
5
10
|
export type FlexDirectionOptionType = 'row' | 'column';
|
|
6
11
|
export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
7
12
|
export type AlignItemsOptionType =
|
|
@@ -63,7 +68,9 @@ export interface ImagePropsGenerated {
|
|
|
63
68
|
attributes: {
|
|
64
69
|
styles?: ImageStyleGenerated;
|
|
65
70
|
scrollable?: boolean;
|
|
71
|
+
testID?: string;
|
|
66
72
|
src?: string;
|
|
73
|
+
fetchStrategy?: FetchStrategyOptionType;
|
|
67
74
|
};
|
|
68
75
|
}
|
|
69
76
|
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
"extends": "View",
|
|
9
9
|
"attributes": {
|
|
10
10
|
"src": "string",
|
|
11
|
+
"fetchStrategy": ["highIfItsAppLaunch", "normal", "lazy", "none"],
|
|
11
12
|
"styles": {
|
|
12
13
|
"resizeMode": ["cover", "contain", "stretch", "center"]
|
|
13
14
|
}
|
|
14
15
|
},
|
|
15
16
|
"defaults": {
|
|
17
|
+
"fetchStrategy": "normal",
|
|
16
18
|
"styles": {
|
|
17
19
|
"resizeMode": "contain"
|
|
18
20
|
}
|
|
@@ -38,6 +40,13 @@
|
|
|
38
40
|
"category": "other",
|
|
39
41
|
"specialCategory": null,
|
|
40
42
|
"sort": 1
|
|
43
|
+
},
|
|
44
|
+
"fetchStrategy": {
|
|
45
|
+
"label": "Fetch Strategy",
|
|
46
|
+
"description": "highIfItsAppLaunch ilk başta yükleniyor eğer app_launch placeholder'i ile gelirse\nnormal sonra bütün hepsi toplanıp prefetch ediniyor\nlazy builder açılır açılmaz\nnone ise os'a bırakıldı",
|
|
47
|
+
"category": "other",
|
|
48
|
+
"specialCategory": null,
|
|
49
|
+
"sort": 2
|
|
41
50
|
}
|
|
42
51
|
}
|
|
43
52
|
}
|
|
@@ -16,7 +16,7 @@ export function OnboardButton({ node }: OnboardButtonComponentProps) {
|
|
|
16
16
|
useLogRender('OnboardButton');
|
|
17
17
|
node = useNode(node);
|
|
18
18
|
const attributeName = node.sourceType ?? node.type ?? 'OnboardButton';
|
|
19
|
-
const { emblaApi } = useContext(onboardContext) ?? {};
|
|
19
|
+
const { emblaApi, selectedIndex } = useContext(onboardContext) ?? {};
|
|
20
20
|
const { selectedTheme: theme, projectColors } = useBuilderParams();
|
|
21
21
|
const context = useMockOSContext();
|
|
22
22
|
const mockPermissionManager = useMockPermission(context);
|
|
@@ -30,7 +30,7 @@ export function OnboardButton({ node }: OnboardButtonComponentProps) {
|
|
|
30
30
|
const rawTextColor = attrs?.styles?.color as string | undefined;
|
|
31
31
|
const textColor = parseColor(rawTextColor, { projectColors, theme });
|
|
32
32
|
const viewStyle = useExtractViewStyle(node);
|
|
33
|
-
const handleClick = () => {
|
|
33
|
+
const handleClick = async () => {
|
|
34
34
|
//TODO: any ??
|
|
35
35
|
const events: EventObjectGenerated[] = attrs?.events ?? [];
|
|
36
36
|
|
|
@@ -42,20 +42,17 @@ export function OnboardButton({ node }: OnboardButtonComponentProps) {
|
|
|
42
42
|
|
|
43
43
|
if (e.type === 'Permission') {
|
|
44
44
|
const permission = e.permission ?? 'camera';
|
|
45
|
-
mockPermissionManager.requestPermission(permission);
|
|
45
|
+
await mockPermissionManager.requestPermission(permission);
|
|
46
46
|
handledEventsRef.current.push(e);
|
|
47
|
-
//TODO: cause user to click second time
|
|
48
47
|
} else if (e.type === 'Navigate') {
|
|
49
48
|
const eventTargetIndex = e.targetIndex;
|
|
50
49
|
if (typeof eventTargetIndex === 'number') {
|
|
51
50
|
emblaApi?.scrollTo(eventTargetIndex);
|
|
52
51
|
handledEventsRef.current.push(e);
|
|
53
|
-
//TODO: cause user to click second time
|
|
54
52
|
} else if (e.navigate_to) {
|
|
55
53
|
const eventTarget = e.navigate_to;
|
|
56
54
|
if (typeof eventTarget === 'string') {
|
|
57
55
|
handledEventsRef.current.push(e);
|
|
58
|
-
//TODO: cause user to click second time
|
|
59
56
|
if (context) {
|
|
60
57
|
context.navigation(eventTarget as any);
|
|
61
58
|
} else {
|
|
@@ -70,6 +67,9 @@ export function OnboardButton({ node }: OnboardButtonComponentProps) {
|
|
|
70
67
|
|
|
71
68
|
return (
|
|
72
69
|
<button
|
|
70
|
+
{...(attrs?.testID
|
|
71
|
+
? { 'data-testid': `${attrs.testID}-${selectedIndex ?? 0}` }
|
|
72
|
+
: {})}
|
|
73
73
|
attribute-name={attributeName}
|
|
74
74
|
attribute-key={attributeKey}
|
|
75
75
|
onClick={handleClick}
|
|
@@ -4,6 +4,7 @@ import type { NodeData } from '../../types/Node';
|
|
|
4
4
|
|
|
5
5
|
export type TypeOptionType = 'Permission' | 'Navigate';
|
|
6
6
|
export type PermissionOptionType = 'att' | 'notification' | 'rating' | 'GDPR';
|
|
7
|
+
export type TestIDOptionType = 'onboardSkip' | 'onboardNext';
|
|
7
8
|
export type AnimationOptionType =
|
|
8
9
|
| 'simple-animation'
|
|
9
10
|
| 'line-animation'
|
|
@@ -77,6 +78,7 @@ export interface OnboardButtonPropsGenerated {
|
|
|
77
78
|
attributes: {
|
|
78
79
|
styles?: OnboardButtonStyleGenerated;
|
|
79
80
|
scrollable?: boolean;
|
|
81
|
+
testID?: TestIDOptionType;
|
|
80
82
|
labelKey?: string;
|
|
81
83
|
animation?: AnimationOptionType;
|
|
82
84
|
animation_color?: string;
|
|
@@ -67,6 +67,7 @@ export interface OnboardButtonsPropsGenerated {
|
|
|
67
67
|
attributes: {
|
|
68
68
|
styles?: OnboardButtonsStyleGenerated;
|
|
69
69
|
scrollable?: boolean;
|
|
70
|
+
testID?: string;
|
|
70
71
|
buttonType?: ButtonTypeOptionType;
|
|
71
72
|
skipNumber?: number;
|
|
72
73
|
buttons_direction?: ButtonsDirectionOptionType;
|