@applicaster/zapp-react-native-utils 13.0.0-alpha.1909212433 → 13.0.0-alpha.1952415373

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 (118) hide show
  1. package/actionsExecutor/ActionExecutor.ts +16 -9
  2. package/actionsExecutor/ActionExecutorContext.tsx +74 -9
  3. package/alertUtils/alert.ts +148 -0
  4. package/alertUtils/index.ts +1 -148
  5. package/analyticsUtils/AnalyticPlayerListener.ts +18 -1
  6. package/analyticsUtils/__tests__/__snapshots__/analyticsManagerNoModule.test.js.snap +9 -9
  7. package/analyticsUtils/helpers/hooks.ts +1 -1
  8. package/appUtils/HooksManager/{Hook.js → Hook.ts} +35 -23
  9. package/appUtils/HooksManager/__tests__/__snapshots__/hook.test.js.snap +10 -8
  10. package/appUtils/HooksManager/__tests__/__snapshots__/hooksManager.test.js.snap +693 -0
  11. package/appUtils/HooksManager/__tests__/hook.test.js +196 -184
  12. package/appUtils/HooksManager/__tests__/hooksManager.test.js +96 -99
  13. package/appUtils/HooksManager/{constants.js → constants.ts} +1 -1
  14. package/appUtils/HooksManager/{index.js → index.ts} +121 -112
  15. package/appUtils/HooksManager/types.ts +119 -0
  16. package/appUtils/RiverFocusManager/index.js +17 -12
  17. package/appUtils/accessibilityManager/index.ts +42 -1
  18. package/appUtils/contextKeysManager/contextResolver.ts +77 -0
  19. package/appUtils/focusManager/__tests__/__snapshots__/focusManager.test.js.snap +7 -6
  20. package/appUtils/focusManager/index.ts +100 -65
  21. package/appUtils/focusManager/treeDataStructure/Tree/index.js +25 -3
  22. package/appUtils/focusManager/treeDataStructure/Utils/index.js +1 -3
  23. package/appUtils/focusManager/utils/enums.ts +4 -0
  24. package/appUtils/focusManagerAux/utils/index.ts +4 -3
  25. package/appUtils/{index.js → index.ts} +1 -1
  26. package/appUtils/keyCodes/__tests__/__snapshots__/keyCodes.test.js.snap +2 -2
  27. package/appUtils/keyCodes/__tests__/keyCodes.test.js +4 -4
  28. package/appUtils/keyCodes/{index.js → index.ts} +2 -0
  29. package/appUtils/keyCodes/keys/index.ts +3 -0
  30. package/appUtils/keyCodes/{keys.android.js → keys/keyEventMapper.ts} +0 -19
  31. package/appUtils/keyCodes/keys/keys.android.ts +18 -0
  32. package/appUtils/keyCodes/keys/keys.ios.ts +25 -0
  33. package/appUtils/keyCodes/keys/keys.ts +15 -0
  34. package/appUtils/keyCodes/{keysByPlatform.js → keys/keysByPlatform.ts} +4 -0
  35. package/appUtils/keyCodes/keysByPlatform.ts +8 -0
  36. package/appUtils/keyInputHandler/KeyInputHandler.ts +68 -0
  37. package/appUtils/orientationHelper.ts +1 -1
  38. package/appUtils/platform/const.ts +14 -0
  39. package/appUtils/platform/platformUtils.ts +41 -18
  40. package/appUtils/playerManager/player.ts +19 -7
  41. package/appUtils/playerManager/playerNative.ts +3 -2
  42. package/appUtils/playerManager/usePlayerControllerSetup.tsx +3 -3
  43. package/arrayUtils/__tests__/__snapshots__/arrayUtils.test.ts.snap +4 -4
  44. package/domUtils/{cookieManager.js → cookieManager.ts} +1 -2
  45. package/functionUtils/__tests__/__snapshots__/functionUtils.test.js.snap +4 -4
  46. package/functionUtils/index.ts +15 -11
  47. package/idleUtils/__tests__/withTimeout$.test.ts +37 -0
  48. package/idleUtils/index.ts +1 -1
  49. package/idleUtils/withTimeout.ts +15 -2
  50. package/logger/const.ts +9 -67
  51. package/manifestUtils/__tests__/createConfig.test.js +16 -16
  52. package/modalState/index.ts +1 -5
  53. package/navigationUtils/__tests__/__snapshots__/navigationUtils.test.js.snap +6 -6
  54. package/navigationUtils/__tests__/itemTypes.test.js +2 -2
  55. package/navigationUtils/__tests__/navigationUtils.test.js +2 -2
  56. package/navigationUtils/index.ts +17 -8
  57. package/package.json +3 -2
  58. package/reactHooks/autoscrolling/__tests__/useTrackCurrentAutoScrollingElement.test.ts +1 -1
  59. package/reactHooks/autoscrolling/__tests__/useTrackedView.test.tsx +1 -1
  60. package/reactHooks/cell-click/__tests__/index.test.js +10 -2
  61. package/reactHooks/cell-click/index.ts +7 -1
  62. package/reactHooks/feed/__tests__/useBuildPipesUrl.test.tsx +4 -4
  63. package/reactHooks/feed/__tests__/useFeedLoader.test.tsx +10 -11
  64. package/reactHooks/feed/useFeedLoader.tsx +1 -1
  65. package/reactHooks/feed/usePipesCacheReset.ts +5 -5
  66. package/reactHooks/flatList/__tests__/index.test.tsx +30 -21
  67. package/reactHooks/layout/__tests__/index.test.tsx +10 -10
  68. package/reactHooks/layout/useDimensions/helpers/__tests__/getInitialDimensions.native.test.js +14 -28
  69. package/reactHooks/layout/useDimensions/helpers/__tests__/getInitialDimensions.test.js +1 -1
  70. package/reactHooks/layout/useDimensions/useDimensions.ts +8 -0
  71. package/reactHooks/navigation/__tests__/index.test.tsx +0 -4
  72. package/reactHooks/navigation/index.ts +29 -218
  73. package/reactHooks/navigation/useGetBottomTabBarHeight.ts +12 -0
  74. package/reactHooks/navigation/useGetNavBarTopBorderWidth.ts +14 -0
  75. package/reactHooks/navigation/useGetTabBarHeight.ts +10 -0
  76. package/reactHooks/navigation/useIsScreenActive.ts +17 -0
  77. package/reactHooks/navigation/useNavigationPluginData.ts +15 -0
  78. package/reactHooks/navigation/useNavigationType.ts +15 -0
  79. package/reactHooks/navigation/usePathname.ts +4 -0
  80. package/reactHooks/navigation/useRoute.ts +100 -0
  81. package/reactHooks/navigation/useUniqueRouteSuffix.ts +41 -0
  82. package/reactHooks/player/TVSeekControlller/ISeekController.ts +32 -0
  83. package/reactHooks/player/TVSeekControlller/LongPressSeekController.ts +71 -0
  84. package/reactHooks/player/TVSeekControlller/TVSeekController.ts +258 -0
  85. package/reactHooks/player/TVSeekControlller/TapSeekController.ts +53 -0
  86. package/reactHooks/player/__tests__/{useAutoSeek.test.tsx → useAutoSeek._test.tsx} +2 -3
  87. package/reactHooks/player/const.ts +0 -4
  88. package/reactHooks/player/index.ts +0 -6
  89. package/reactHooks/state/useRefWithInitialValue.ts +14 -0
  90. package/reactHooks/state/useStateFromSubscribe.ts +23 -0
  91. package/reactHooks/usePluginConfiguration.ts +1 -1
  92. package/reactHooks/useSubscriberFor.ts +4 -3
  93. package/reactUtils/__tests__/reactUtils.test.js +10 -28
  94. package/reactUtils/createContext/__tests__/__snapshots__/helpers.test.js.snap +19 -19
  95. package/reactUtils/createContext/__tests__/__snapshots__/index.test.js.snap +2 -2
  96. package/reactUtils/createContext/__tests__/__snapshots__/provider.test.js.snap +3 -3
  97. package/reactUtils/createContext/__tests__/helpers.test.js +8 -8
  98. package/reactUtils/index.ts +0 -14
  99. package/screenState/index.ts +24 -10
  100. package/theme/__mocks__/index.ts +4 -0
  101. package/theme/index.ts +1 -1
  102. package/time/Timer.ts +5 -2
  103. package/types.ts +1 -0
  104. package/zappFrameworkUtils/presentPluginOneTime.ts +2 -3
  105. package/appUtils/keyCodes/keys.ios.js +0 -46
  106. package/manifestUtils/sharedConfiguration/screenPicker/__tests__/utils.test.js +0 -304
  107. package/manifestUtils/sharedConfiguration/screenPicker/stylesFields.js +0 -875
  108. package/manifestUtils/sharedConfiguration/screenPicker/utils.js +0 -130
  109. package/reactHooks/player/useAutoSeek.tsx +0 -87
  110. package/reactHooks/player/useSeek.tsx +0 -66
  111. package/reactHooks/player/useTapSeek.tsx +0 -58
  112. /package/appUtils/HooksManager/{logger.js → logger.ts} +0 -0
  113. /package/appUtils/{directionHelper.js → directionHelper.ts} +0 -0
  114. /package/appUtils/keyCodes/{androidTVKeys.js → androidTVKeys.ts} +0 -0
  115. /package/appUtils/keyCodes/{keys.web.js → keys/keys.web.ts} +0 -0
  116. /package/appUtils/{localizationsHelper.js → localizationsHelper.ts} +0 -0
  117. /package/domUtils/{logger.js → logger.ts} +0 -0
  118. /package/reactHooks/player/__tests__/{useTapSeek.test.ts → useTapSeek._test.ts} +0 -0
@@ -1,875 +0,0 @@
1
- const {
2
- fieldsGroup,
3
- } = require("@applicaster/zapp-react-native-utils/manifestUtils");
4
-
5
- const {
6
- generateFontConfiguration,
7
- createVariationFields,
8
- conditional_horizontal_type,
9
- conditional_vertical_type,
10
- conditional_horizontal_type_item_fixed,
11
- conditional_horizontal_type_item_dynamic,
12
- conditional_horizontal_asset_on,
13
- conditional_horizontal_display_type_fixed,
14
- } = require("./utils");
15
-
16
- const TRANSPARENT = "rgba(0, 0, 0, 0)";
17
- const fontFamily = "Ubuntu-Medium";
18
-
19
- const componentConfigurationFields = [
20
- {
21
- type: "select",
22
- key: "screen_picker_type",
23
- label: "Screen picker type",
24
- initial_value: "vertical",
25
- options: [
26
- { text: "Vertical", value: "vertical" },
27
- { text: "Horizontal (Beta)", value: "horizontal" },
28
- ],
29
- },
30
- {
31
- type: "select",
32
- key: "screen_picker_horizontal_display_type",
33
- label: "Display",
34
- initial_value: "fixed",
35
- options: [
36
- { text: "Fixed", value: "fixed" },
37
- { text: "Dynamic", value: "dynamic" },
38
- ],
39
- ...conditional_horizontal_type,
40
- },
41
- {
42
- type: "select",
43
- label: "Alignment for Picker container",
44
- key: "screen_picker_items_alignment",
45
- initial_value: "left",
46
- options: [
47
- { text: "Left", value: "left" },
48
- { text: "Right", value: "right" },
49
- { text: "Center", value: "center" },
50
- ],
51
- ...conditional_horizontal_type_item_dynamic,
52
- },
53
- {
54
- type: "select",
55
- label: "Alignment for Picker container items",
56
- key: "screen_picker_horizontal_items_alignment_inner",
57
- initial_value: "left",
58
- options: [
59
- { text: "Left", value: "left" },
60
- { text: "Right", value: "right" },
61
- { text: "Center", value: "center" },
62
- ],
63
- ...conditional_horizontal_display_type_fixed,
64
- },
65
- {
66
- type: "number_input",
67
- label: "Width",
68
- key: "screen_picker_vertical_width",
69
- initial_value: 300,
70
- ...conditional_vertical_type,
71
- },
72
- {
73
- type: "number_input",
74
- label: "Width",
75
- key: "screen_picker_horizontal_width",
76
- initial_value: 1920,
77
- ...conditional_horizontal_display_type_fixed,
78
- },
79
- ...createVariationFields({
80
- label: "X position",
81
- key: "x_position",
82
- variants: [
83
- {
84
- initial_value: 124,
85
- },
86
- {
87
- initial_value: 0,
88
- },
89
- ],
90
- }),
91
- ...createVariationFields({
92
- label: "Y position",
93
- key: "y_position",
94
- variants: [
95
- {
96
- initial_value: 200,
97
- },
98
- {
99
- initial_value: 200,
100
- },
101
- ],
102
- }),
103
- {
104
- type: "number_input",
105
- label: "Padding Top",
106
- key: "component_padding_top",
107
- initial_value: 0,
108
- ...conditional_horizontal_type,
109
- },
110
- {
111
- type: "number_input",
112
- label: "Padding Right",
113
- key: "component_padding_right",
114
- initial_value: 124,
115
- ...conditional_horizontal_type,
116
- },
117
- {
118
- type: "number_input",
119
- label: "Padding Bottom",
120
- key: "component_padding_bottom",
121
- initial_value: 0,
122
- ...conditional_horizontal_type,
123
- },
124
- {
125
- type: "number_input",
126
- label: "Padding Left",
127
- key: "component_padding_left",
128
- initial_value: 124,
129
- },
130
- {
131
- type: "color_picker_rgba",
132
- label: "Background color",
133
- key: "screen_picker_background_color",
134
- initial_value: TRANSPARENT,
135
- ...conditional_horizontal_type,
136
- },
137
- {
138
- type: "uploader",
139
- label: "Background image",
140
- key: "screen_picker_background_image",
141
- initial_value: null,
142
- ...conditional_horizontal_type,
143
- },
144
- {
145
- type: "color_picker_rgba",
146
- label: "Border color",
147
- key: "screen_picker_border_color",
148
- initial_value: TRANSPARENT,
149
- ...conditional_horizontal_type,
150
- },
151
- {
152
- type: "number_input",
153
- label: "Border thickness",
154
- key: "screen_picker_border_thickness",
155
- initial_value: 0,
156
- ...conditional_horizontal_type,
157
- },
158
- {
159
- type: "number_input",
160
- label: "Corner Radius",
161
- key: "screen_picker_corner_radius",
162
- initial_value: 0,
163
- ...conditional_horizontal_type,
164
- },
165
- /* Disabled due to blocker issues with Android TV
166
- Task: https://applicaster.monday.com/boards/1615228456/pulses/4130776042
167
- Discussion: https://applicaster.monday.com/boards/1615228456/pulses/4130775820/posts/2031049491
168
- */
169
- // ...loopFields
170
- ];
171
-
172
- const assetFields = [
173
- {
174
- type: "switch",
175
- key: "screen_picker_asset_switch",
176
- label: "Enable",
177
- initial_value: false,
178
- ...conditional_horizontal_type,
179
- },
180
- {
181
- type: "text_input",
182
- key: "screen_picker_asset_key",
183
- label: "Default data key",
184
- initial_value: "image_base",
185
- ...conditional_horizontal_asset_on,
186
- },
187
- {
188
- type: "switch",
189
- key: "screen_picker_asset_focused_switch",
190
- label: "Enable focused asset",
191
- initial_value: false,
192
- ...conditional_horizontal_asset_on,
193
- },
194
- {
195
- type: "text_input",
196
- key: "screen_picker_asset_focused_key",
197
- label: "Focused data key",
198
- initial_value: "thumb_1",
199
- ...conditional_horizontal_asset_on,
200
- },
201
- {
202
- type: "switch",
203
- key: "screen_picker_asset_selected_switch",
204
- label: "Enable selected asset",
205
- initial_value: false,
206
- ...conditional_horizontal_asset_on,
207
- },
208
- {
209
- type: "text_input",
210
- key: "screen_picker_asset_selected_key",
211
- label: "Selected data key",
212
- initial_value: "thumb_2",
213
- ...conditional_horizontal_asset_on,
214
- },
215
- {
216
- type: "switch",
217
- key: "screen_picker_asset_selectedfocused_switch",
218
- label: "Enable selected & focused asset",
219
- initial_value: false,
220
- ...conditional_horizontal_asset_on,
221
- },
222
- {
223
- type: "text_input",
224
- key: "screen_picker_asset_selectedfocused_key",
225
- label: "Selected & Focused data key",
226
- initial_value: "thumb_3",
227
- ...conditional_horizontal_asset_on,
228
- },
229
- {
230
- type: "number_input",
231
- key: "screen_picker_asset_width",
232
- label: "Width",
233
- initial_value: 40,
234
- ...conditional_horizontal_asset_on,
235
- },
236
- {
237
- type: "number_input",
238
- key: "screen_picker_asset_height",
239
- label: "Height",
240
- initial_value: 40,
241
- ...conditional_horizontal_asset_on,
242
- },
243
- {
244
- type: "number_input",
245
- key: "screen_picker_asset_margin_top",
246
- label: "Margin Top",
247
- initial_value: 0,
248
- ...conditional_horizontal_asset_on,
249
- },
250
- {
251
- type: "number_input",
252
- key: "screen_picker_asset_margin_right",
253
- label: "Margin Right",
254
- initial_value: 16,
255
- ...conditional_horizontal_asset_on,
256
- },
257
- {
258
- type: "number_input",
259
- key: "screen_picker_asset_margin_bottom",
260
- label: "Margin Bottom",
261
- initial_value: 0,
262
- ...conditional_horizontal_asset_on,
263
- },
264
- {
265
- type: "number_input",
266
- key: "screen_picker_asset_margin_left",
267
- label: "Margin Left",
268
- initial_value: 0,
269
- ...conditional_horizontal_asset_on,
270
- },
271
- {
272
- type: "select",
273
- label: "Alignment",
274
- key: "screen_picker_asset_alignment",
275
- initial_value: "left",
276
- options: [
277
- { text: "Top", value: "top" },
278
- { text: "Right", value: "right" },
279
- { text: "Bottom", value: "bottom" },
280
- { text: "Left", value: "left" },
281
- ],
282
- ...conditional_horizontal_asset_on,
283
- },
284
- ];
285
-
286
- const screenPickerItemsFields = [
287
- ...createVariationFields({
288
- key: "gutter",
289
- variants: [
290
- {
291
- label: "Vertical gutter",
292
- initial_value: 10,
293
- },
294
- {
295
- label: "Horizontal gutter",
296
- initial_value: 80,
297
- },
298
- ],
299
- }),
300
- {
301
- type: "select",
302
- label: "Item Size",
303
- key: "screen_picker_item_size",
304
- initial_value: "dynamic",
305
- options: [
306
- { text: "Dynamic", value: "dynamic" },
307
- { text: "Fixed", value: "fixed" },
308
- ],
309
- ...conditional_horizontal_type,
310
- },
311
- {
312
- type: "number_input",
313
- label: "Item Width",
314
- key: "screen_picker_item_width",
315
- initial_value: 200,
316
- ...conditional_horizontal_type_item_fixed,
317
- },
318
- {
319
- type: "select",
320
- label: "Alignment for item content",
321
- key: "screen_picker_item_alignment",
322
- initial_value: "left",
323
- options: [
324
- { text: "Left", value: "left" },
325
- { text: "Right", value: "right" },
326
- { text: "Center", value: "center" },
327
- ],
328
- ...conditional_horizontal_type_item_fixed,
329
- },
330
- ];
331
-
332
- const titleFields = [
333
- {
334
- type: "switch",
335
- label: "Enable",
336
- key: "title_enable",
337
- initial_value: true,
338
- ...conditional_horizontal_type,
339
- },
340
- // font color
341
- ...createVariationFields({
342
- prefix: "default",
343
- type: "color_picker_rgba",
344
- label: "Default font color",
345
- key: "font_color",
346
- variants: [
347
- {
348
- initial_value: "rgba(239, 239, 239, 0.5)",
349
- },
350
- {
351
- initial_value: "rgba(239, 239, 239, 0.5)",
352
- },
353
- ],
354
- }),
355
- ...createVariationFields({
356
- prefix: "focused",
357
- type: "color_picker_rgba",
358
- label: "Focused font color",
359
- key: "font_color",
360
- variants: [
361
- {
362
- initial_value: "rgba(239, 239, 239, 1)",
363
- },
364
- {
365
- initial_value: "rgba(254, 20, 72, 1)",
366
- },
367
- ],
368
- }),
369
- ...createVariationFields({
370
- prefix: "selected",
371
- type: "color_picker_rgba",
372
- label: "Selected font color",
373
- key: "font_color",
374
- variants: [
375
- {
376
- initial_value: "rgba(239, 239, 239, 1)",
377
- },
378
- {
379
- initial_value: "rgba(239, 239, 239, 1)",
380
- },
381
- ],
382
- }),
383
- ...createVariationFields({
384
- prefix: "selected_focused",
385
- type: "color_picker_rgba",
386
- label: "Selected & Focused font color",
387
- key: "font_color",
388
- variants: [
389
- {
390
- initial_value: "rgba(239, 239, 239, 1)",
391
- },
392
- {
393
- initial_value: "rgba(254, 20, 72, 1)",
394
- },
395
- ],
396
- }),
397
- // fonts
398
- {
399
- type: "tvos_font_selector",
400
- label: "tvOS Font Family",
401
- key: "tvos_font_family",
402
- initial_value: fontFamily,
403
- },
404
- {
405
- type: "android_font_selector",
406
- label: "Android TV Font Family",
407
- key: "android_tv_font_family",
408
- initial_value: fontFamily,
409
- },
410
- {
411
- type: "lg_tv_font_selector",
412
- label: "LG TV Font Family",
413
- key: "lg_tv_font_family",
414
- initial_value: fontFamily,
415
- },
416
- {
417
- type: "samsung_font_selector",
418
- label: "Samsung TV Font Family",
419
- key: "samsung_tv_font_family",
420
- initial_value: fontFamily,
421
- },
422
- {
423
- type: "vizio_font_selector",
424
- label: "Vizio TV Font Family",
425
- key: "vizio_font_family",
426
- initial_value: fontFamily,
427
- },
428
- ...generateFontConfiguration(),
429
- // text transform
430
- {
431
- type: "select",
432
- label: "Text Transform",
433
- key: "text_transform",
434
- initial_value: "uppercase",
435
- options: ["default", "uppercase", "lowercase", "capitalize"],
436
- },
437
- // number of lines
438
- {
439
- type: "number_input",
440
- label: "number of lines",
441
- key: "number_of_lines",
442
- initial_value: 1,
443
- ...conditional_vertical_type,
444
- },
445
- ];
446
-
447
- const itemFields = [
448
- // underline color
449
- ...createVariationFields({
450
- prefix: "default",
451
- type: "color_picker_rgba",
452
- label: "Default underline color",
453
- key: "underline_color",
454
- variants: [
455
- {
456
- initial_value: TRANSPARENT,
457
- },
458
- {
459
- initial_value: TRANSPARENT,
460
- },
461
- ],
462
- }),
463
- ...createVariationFields({
464
- prefix: "focused",
465
- type: "color_picker_rgba",
466
- label: "Focused underline color",
467
- key: "underline_color",
468
- variants: [
469
- {
470
- initial_value: TRANSPARENT,
471
- },
472
- {
473
- initial_value: "rgba(254, 20, 72, 1)",
474
- },
475
- ],
476
- }),
477
- ...createVariationFields({
478
- prefix: "selected",
479
- type: "color_picker_rgba",
480
- label: "Selected underline color",
481
- key: "underline_color",
482
- variants: [
483
- {
484
- initial_value: TRANSPARENT,
485
- },
486
- {
487
- initial_value: "rgba(239, 239, 239, 1)",
488
- },
489
- ],
490
- }),
491
- ...createVariationFields({
492
- prefix: "selected_focused",
493
- type: "color_picker_rgba",
494
- label: "Selected & Focused underline color",
495
- key: "underline_color",
496
- variants: [
497
- {
498
- initial_value: TRANSPARENT,
499
- },
500
- {
501
- initial_value: "rgba(254, 20, 72, 1)",
502
- },
503
- ],
504
- }),
505
- // underline thickness
506
- ...createVariationFields({
507
- prefix: "",
508
- label: "Underline Thickness",
509
- key: "underline_thickness",
510
- variants: [
511
- {
512
- initial_value: 0,
513
- },
514
- {
515
- initial_value: 6,
516
- },
517
- ],
518
- }),
519
- // underline corner radius
520
- ...createVariationFields({
521
- prefix: "",
522
- label: "Underline corner radius",
523
- key: "underline_corner_radius",
524
- variants: [
525
- {
526
- initial_value: 0,
527
- },
528
- {
529
- initial_value: 3,
530
- },
531
- ],
532
- }),
533
- // text bg color
534
- {
535
- type: "color_picker_rgba",
536
- label: "Default Text Background color",
537
- key: "default_text_background_color",
538
- initial_value: TRANSPARENT,
539
- ...conditional_vertical_type,
540
- },
541
- {
542
- type: "color_picker_rgba",
543
- label: "Focused Text Background color",
544
- key: "focused_text_background_color",
545
- initial_value: TRANSPARENT,
546
- ...conditional_vertical_type,
547
- },
548
- {
549
- type: "color_picker_rgba",
550
- label: "Selected Text Background color",
551
- key: "selected_text_background_color",
552
- initial_value: TRANSPARENT,
553
- ...conditional_vertical_type,
554
- },
555
- {
556
- type: "color_picker_rgba",
557
- label: "Selected & Focused Text Background color",
558
- key: "selected_focused_text_background_color",
559
- initial_value: TRANSPARENT,
560
- ...conditional_vertical_type,
561
- },
562
- // text item border_thickness
563
- {
564
- type: "number_input",
565
- label: "Text Item border thickness",
566
- key: "text_border_thickness",
567
- initial_value: 0,
568
- ...conditional_vertical_type,
569
- },
570
- // text item corner radius
571
- {
572
- type: "number_input",
573
- label: "Text Item corner radius",
574
- key: "text_corner_radius",
575
- initial_value: 0,
576
- ...conditional_vertical_type,
577
- },
578
- // text border color
579
- {
580
- type: "color_picker_rgba",
581
- label: "Default Text border color",
582
- key: "default_text_border_color",
583
- initial_value: TRANSPARENT,
584
- ...conditional_vertical_type,
585
- },
586
- {
587
- type: "color_picker_rgba",
588
- label: "Focused Text border color",
589
- key: "focused_text_border_color",
590
- initial_value: TRANSPARENT,
591
- ...conditional_vertical_type,
592
- },
593
- {
594
- type: "color_picker_rgba",
595
- label: "Selected Text border color",
596
- key: "selected_text_border_color",
597
- initial_value: TRANSPARENT,
598
- ...conditional_vertical_type,
599
- },
600
- {
601
- type: "color_picker_rgba",
602
- label: "Selected & Focused Text border color",
603
- key: "selected_focused_text_border_color",
604
- initial_value: TRANSPARENT,
605
- ...conditional_vertical_type,
606
- },
607
- // item margin
608
- {
609
- type: "number_input",
610
- label: "Item Margin top",
611
- key: "item_margin_top",
612
- initial_value: 0,
613
- },
614
- {
615
- type: "number_input",
616
- label: "Item Margin Right",
617
- key: "item_margin_right",
618
- initial_value: 0,
619
- },
620
- {
621
- type: "number_input",
622
- label: "Item Margin Bottom",
623
- key: "item_margin_bottom",
624
- initial_value: 0,
625
- },
626
- {
627
- type: "number_input",
628
- label: "Item Margin Left",
629
- key: "item_margin_left",
630
- initial_value: 0,
631
- },
632
- // text item padding
633
- {
634
- type: "number_input",
635
- label: "Text Item Padding Top",
636
- key: "item_padding_top",
637
- initial_value: 12,
638
- ...conditional_vertical_type,
639
- },
640
- {
641
- type: "number_input",
642
- label: "Text Item Padding Right",
643
- key: "item_padding_right",
644
- initial_value: 24,
645
- ...conditional_vertical_type,
646
- },
647
- {
648
- type: "number_input",
649
- label: "Text Item Padding Bottom",
650
- key: "item_padding_bottom",
651
- initial_value: 12,
652
- ...conditional_vertical_type,
653
- },
654
- {
655
- type: "number_input",
656
- label: "Text Item Padding Left",
657
- key: "item_padding_left",
658
- initial_value: 24,
659
- ...conditional_vertical_type,
660
- },
661
- // text padding
662
- ...createVariationFields({
663
- prefix: "text",
664
- type: "number_input",
665
- label: "Text Padding Top",
666
- key: "padding_top",
667
- variants: [
668
- {
669
- initial_value: 0,
670
- },
671
- {
672
- initial_value: 12,
673
- },
674
- ],
675
- }),
676
- ...createVariationFields({
677
- prefix: "text",
678
- type: "number_input",
679
- label: "Text Padding Right",
680
- key: "padding_right",
681
- variants: [
682
- {
683
- initial_value: 0,
684
- },
685
- {
686
- initial_value: 0,
687
- },
688
- ],
689
- }),
690
- ...createVariationFields({
691
- prefix: "text",
692
- type: "number_input",
693
- label: "Text Padding Bottom",
694
- key: "padding_bottom",
695
- variants: [
696
- {
697
- initial_value: 0,
698
- },
699
- {
700
- initial_value: 12,
701
- },
702
- ],
703
- }),
704
- ...createVariationFields({
705
- prefix: "text",
706
- type: "number_input",
707
- label: "Text Padding Left",
708
- key: "padding_left",
709
- variants: [
710
- {
711
- initial_value: 0,
712
- },
713
- {
714
- initial_value: 0,
715
- },
716
- ],
717
- }),
718
- // item bg color
719
- ...createVariationFields({
720
- prefix: "default",
721
- type: "color_picker_rgba",
722
- label: "Default Item background color",
723
- key: "item_background_color",
724
- variants: [
725
- {
726
- initial_value: TRANSPARENT,
727
- },
728
- {
729
- initial_value: TRANSPARENT,
730
- },
731
- ],
732
- }),
733
- ...createVariationFields({
734
- prefix: "focused",
735
- type: "color_picker_rgba",
736
- label: "Focused Item background color",
737
- key: "item_background_color",
738
- variants: [
739
- {
740
- initial_value: "rgba(254, 20, 72, 1)",
741
- },
742
- {
743
- initial_value: TRANSPARENT,
744
- },
745
- ],
746
- }),
747
- ...createVariationFields({
748
- prefix: "selected",
749
- type: "color_picker_rgba",
750
- label: "Selected Item background color",
751
- key: "item_background_color",
752
- variants: [
753
- {
754
- initial_value: TRANSPARENT,
755
- },
756
- {
757
- initial_value: TRANSPARENT,
758
- },
759
- ],
760
- }),
761
- ...createVariationFields({
762
- prefix: "selected_focused",
763
- type: "color_picker_rgba",
764
- label: "Selected & Focused Item background color",
765
- key: "item_background_color",
766
- variants: [
767
- {
768
- initial_value: "rgba(254, 20, 72, 1)",
769
- },
770
- {
771
- initial_value: TRANSPARENT,
772
- },
773
- ],
774
- }),
775
- // item border color
776
- ...createVariationFields({
777
- prefix: "default",
778
- type: "color_picker_rgba",
779
- label: "Default Item border color",
780
- key: "item_border_color",
781
- variants: [
782
- {
783
- initial_value: TRANSPARENT,
784
- },
785
- {
786
- initial_value: TRANSPARENT,
787
- },
788
- ],
789
- }),
790
- ...createVariationFields({
791
- prefix: "focused",
792
- type: "color_picker_rgba",
793
- label: "Focused Item border color",
794
- key: "item_border_color",
795
- variants: [
796
- {
797
- initial_value: TRANSPARENT,
798
- },
799
- {
800
- initial_value: TRANSPARENT,
801
- },
802
- ],
803
- }),
804
- ...createVariationFields({
805
- prefix: "selected",
806
- type: "color_picker_rgba",
807
- label: "Selected Item border color",
808
- key: "item_border_color",
809
- variants: [
810
- {
811
- initial_value: "rgba(239, 239, 239, 0.5)",
812
- },
813
- {
814
- initial_value: TRANSPARENT,
815
- },
816
- ],
817
- }),
818
- ...createVariationFields({
819
- prefix: "selected_focused",
820
- type: "color_picker_rgba",
821
- label: "Selected & Focused Item border color",
822
- key: "item_border_color",
823
- variants: [
824
- {
825
- initial_value: TRANSPARENT,
826
- },
827
- {
828
- initial_value: TRANSPARENT,
829
- },
830
- ],
831
- }),
832
- // item border thickness
833
- ...createVariationFields({
834
- prefix: "",
835
- label: "Item Border Thickness",
836
- key: "item_border_thickness",
837
- variants: [
838
- {
839
- initial_value: 2,
840
- },
841
- {
842
- initial_value: 0,
843
- },
844
- ],
845
- }),
846
- // item corner radius
847
- ...createVariationFields({
848
- prefix: "",
849
- label: "Item Corner radius",
850
- key: "item_corner_radius",
851
- variants: [
852
- {
853
- initial_value: 8,
854
- },
855
- {
856
- initial_value: 0,
857
- },
858
- ],
859
- }),
860
- ];
861
-
862
- const stylesFields = [
863
- fieldsGroup(
864
- "Component Configuration",
865
- "",
866
- componentConfigurationFields,
867
- false
868
- ),
869
- fieldsGroup("Screen Picker Items", "", screenPickerItemsFields, false),
870
- fieldsGroup("Asset", "", assetFields, false),
871
- fieldsGroup("Title", "", titleFields, false),
872
- fieldsGroup("Item", "", itemFields, false),
873
- ];
874
-
875
- module.exports = stylesFields;