@applicaster/zapp-react-native-ui-components 15.1.14 → 15.1.15-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Components/GeneralContentScreen/GeneralContentScreenHookAdapter.tsx +15 -0
- package/Components/MasterCell/DefaultComponents/ActionButton.tsx +4 -1
- package/Components/ModalComponent/ActionsBottomSheet/ActionButton.tsx +56 -0
- package/Components/ModalComponent/ActionsBottomSheet/__tests__/openActionsBottomSheet.test.ts +38 -0
- package/Components/ModalComponent/ActionsBottomSheet/boundActionButton.tsx +24 -0
- package/Components/ModalComponent/ActionsBottomSheet/index.ts +9 -0
- package/Components/ModalComponent/ActionsBottomSheet/openActionsBottomSheet.ts +61 -0
- package/Components/ModalComponent/AudioPlayer/Components/Button.tsx +58 -97
- package/Components/ModalComponent/AudioPlayer/Components/Header.tsx +142 -142
- package/Components/ModalComponent/AudioPlayer/Components/Input.tsx +628 -0
- package/Components/ModalComponent/AudioPlayer/Components/Item.tsx +448 -175
- package/Components/ModalComponent/AudioPlayer/Components/NowPlayingHeaderSection.tsx +94 -0
- package/Components/ModalComponent/AudioPlayer/Components/__tests__/Item.test.tsx +113 -0
- package/Components/ModalComponent/AudioPlayer/Components/index.ts +6 -4
- package/Components/ModalComponent/AudioPlayer/utils/__tests__/mergeStyles.test.ts +248 -0
- package/Components/ModalComponent/AudioPlayer/utils/mergeStyles.ts +386 -0
- package/Components/ModalComponent/BottomSheetModalContent.tsx +425 -66
- package/Components/ModalComponent/Button/index.tsx +5 -3
- package/Components/ModalComponent/Header/index.tsx +20 -7
- package/Components/ModalComponent/Header/utils.ts +1 -1
- package/Components/ModalComponent/ModalBlocksStyleContext.tsx +10 -0
- package/Components/ModalComponent/SortableList.tsx +157 -0
- package/Components/ModalComponent/SortableList.web.tsx +102 -0
- package/Components/ModalComponent/TextInputContent.tsx +112 -0
- package/Components/ModalComponent/__tests__/BottomSheetModalContent.test.tsx +255 -0
- package/Components/ModalComponent/__tests__/TextInputContent.test.tsx +156 -0
- package/Components/ModalComponent/__tests__/showTextInput.test.ts +95 -0
- package/Components/ModalComponent/index.tsx +18 -9
- package/Components/ModalComponent/presets/__tests__/getCell.test.ts +90 -0
- package/Components/ModalComponent/presets/dynamicCollectionCell.tsx +78 -0
- package/Components/ModalComponent/presets/index.ts +27 -0
- package/Components/ModalComponent/presets/selectableCell.tsx +28 -0
- package/Components/ModalComponent/presets/standardCell.tsx +41 -0
- package/Components/ModalComponent/presets/types.ts +35 -0
- package/Components/ModalComponent/showTextInput.ts +43 -0
- package/Components/ModalComponent/utils.ts +82 -21
- package/Components/River/ComponentsMap/ComponentsMap.tsx +87 -60
- package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +139 -75
- package/Components/River/__tests__/componentsMap.test.js +8 -3
- package/Components/Screen/navigationHandler.ts +8 -8
- package/Contexts/ModalNavigationContext/__tests__/index.test.tsx +15 -0
- package/Contexts/ModalNavigationContext/index.tsx +2 -2
- package/Hooks/useEntryActionsExpander.ts +63 -0
- package/package.json +6 -5
- package/Components/ModalComponent/AudioPlayer/Components/Action.tsx +0 -368
- /package/Decorators/ZappPipesDataConnector/__tests__/{Hero.js → Hero.tsx} +0 -0
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { platformSelect } from "@applicaster/zapp-react-native-utils/reactUtils";
|
|
2
|
+
import {
|
|
3
|
+
toNumberWithDefault,
|
|
4
|
+
toNumberWithDefaultZero,
|
|
5
|
+
} from "@applicaster/zapp-react-native-utils/numberUtils";
|
|
2
6
|
import { PluginConfiguration } from "./";
|
|
3
7
|
import { ItemIconProps } from "./Button/ItemIcon";
|
|
4
8
|
import { ItemLabelProps } from "./Button/ItemLabel";
|
|
@@ -6,7 +10,8 @@ import { ItemProps } from "./Button/Item";
|
|
|
6
10
|
|
|
7
11
|
export function defaultItemProps(
|
|
8
12
|
config: PluginConfiguration,
|
|
9
|
-
maxWidth: number
|
|
13
|
+
maxWidth: number,
|
|
14
|
+
blockItemStyle?: Record<string, any>
|
|
10
15
|
): ItemProps {
|
|
11
16
|
const {
|
|
12
17
|
modal_bottom_sheet_item_background_color,
|
|
@@ -24,19 +29,36 @@ export function defaultItemProps(
|
|
|
24
29
|
modal_bottom_sheet_item_padding_top,
|
|
25
30
|
} = config;
|
|
26
31
|
|
|
32
|
+
const bgDefault = blockItemStyle?.background?.default;
|
|
33
|
+
|
|
34
|
+
const bgFocused =
|
|
35
|
+
blockItemStyle?.background?.focused || blockItemStyle?.background?.focus;
|
|
36
|
+
|
|
27
37
|
return {
|
|
28
|
-
backgroundColor:
|
|
29
|
-
|
|
38
|
+
backgroundColor:
|
|
39
|
+
bgDefault?.backgroundColor || modal_bottom_sheet_item_background_color,
|
|
40
|
+
focusedBackgroundColor:
|
|
41
|
+
bgFocused?.backgroundColor ||
|
|
42
|
+
modal_bottom_sheet_item_focus_background_color,
|
|
30
43
|
selectedBackgroundColor: modal_bottom_sheet_item_selected_background_color,
|
|
31
44
|
focusedSelectedBackgroundColor:
|
|
32
45
|
modal_bottom_sheet_item_focused_selected_background_color,
|
|
33
|
-
borderRadius:
|
|
46
|
+
borderRadius: toNumberWithDefault(
|
|
47
|
+
modal_bottom_sheet_item_corner_radius,
|
|
48
|
+
bgDefault?.borderRadius
|
|
49
|
+
),
|
|
34
50
|
marginBottom: modal_bottom_sheet_item_margin_bottom,
|
|
35
51
|
marginTop: modal_bottom_sheet_item_margin_top,
|
|
36
52
|
marginLeft: modal_bottom_sheet_item_margin_left,
|
|
37
53
|
marginRight: modal_bottom_sheet_item_margin_right,
|
|
38
|
-
paddingTop:
|
|
39
|
-
|
|
54
|
+
paddingTop: toNumberWithDefault(
|
|
55
|
+
modal_bottom_sheet_item_padding_top,
|
|
56
|
+
bgDefault?.paddingTop
|
|
57
|
+
),
|
|
58
|
+
paddingBottom: toNumberWithDefault(
|
|
59
|
+
modal_bottom_sheet_item_padding_bottom,
|
|
60
|
+
bgDefault?.paddingBottom
|
|
61
|
+
),
|
|
40
62
|
paddingRight: modal_bottom_sheet_item_padding_right,
|
|
41
63
|
paddingLeft: modal_bottom_sheet_item_padding_left,
|
|
42
64
|
maxWidth,
|
|
@@ -45,7 +67,8 @@ export function defaultItemProps(
|
|
|
45
67
|
|
|
46
68
|
export function defaultItemLabelProps(
|
|
47
69
|
config: PluginConfiguration,
|
|
48
|
-
sheetWidth: number
|
|
70
|
+
sheetWidth: number,
|
|
71
|
+
blockItemStyle?: Record<string, any>
|
|
49
72
|
): ItemLabelProps {
|
|
50
73
|
const {
|
|
51
74
|
modal_bottom_sheet_item_label_android_letter_spacing,
|
|
@@ -72,15 +95,48 @@ export function defaultItemLabelProps(
|
|
|
72
95
|
modal_bottom_sheet_item_padding_right,
|
|
73
96
|
} = config;
|
|
74
97
|
|
|
75
|
-
const
|
|
98
|
+
const iconWidth = toNumberWithDefaultZero(modal_bottom_sheet_item_icon_width);
|
|
99
|
+
|
|
100
|
+
const iconMarginLeft = toNumberWithDefaultZero(
|
|
101
|
+
modal_bottom_sheet_item_icon_margin_left
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const iconMarginRight = toNumberWithDefaultZero(
|
|
105
|
+
modal_bottom_sheet_item_icon_margin_right
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
const itemMarginLeft = toNumberWithDefaultZero(
|
|
109
|
+
modal_bottom_sheet_item_margin_left
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
const itemMarginRight = toNumberWithDefaultZero(
|
|
113
|
+
modal_bottom_sheet_item_margin_right
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
const itemPaddingLeft = toNumberWithDefaultZero(
|
|
117
|
+
modal_bottom_sheet_item_padding_left
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
const itemPaddingRight = toNumberWithDefaultZero(
|
|
121
|
+
modal_bottom_sheet_item_padding_right
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
const calculatedMaxWidth =
|
|
76
125
|
sheetWidth -
|
|
77
|
-
(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
126
|
+
(iconWidth +
|
|
127
|
+
iconMarginLeft +
|
|
128
|
+
iconMarginRight +
|
|
129
|
+
itemMarginLeft +
|
|
130
|
+
itemMarginRight +
|
|
131
|
+
itemPaddingLeft +
|
|
132
|
+
itemPaddingRight);
|
|
133
|
+
|
|
134
|
+
const maxWidth =
|
|
135
|
+
Number.isNaN(calculatedMaxWidth) || calculatedMaxWidth <= 0
|
|
136
|
+
? sheetWidth
|
|
137
|
+
: calculatedMaxWidth;
|
|
138
|
+
|
|
139
|
+
const label1Default = blockItemStyle?.textLabel1?.default;
|
|
84
140
|
|
|
85
141
|
return {
|
|
86
142
|
fontFamily: platformSelect({
|
|
@@ -91,8 +147,11 @@ export function defaultItemLabelProps(
|
|
|
91
147
|
ios: modal_bottom_sheet_item_label_ios_letter_spacing,
|
|
92
148
|
android: modal_bottom_sheet_item_label_android_letter_spacing,
|
|
93
149
|
}),
|
|
94
|
-
fontSize:
|
|
95
|
-
|
|
150
|
+
fontSize: toNumberWithDefault(
|
|
151
|
+
modal_bottom_sheet_item_label_font_size,
|
|
152
|
+
label1Default?.fontSize
|
|
153
|
+
),
|
|
154
|
+
color: label1Default?.fontColor || modal_bottom_sheet_item_label_font_color,
|
|
96
155
|
focusColor: modal_bottom_sheet_item_label_focus_font_color,
|
|
97
156
|
hoverSelectedColor: modal_bottom_sheet_item_label_hover_selected_font_color,
|
|
98
157
|
selectedColor: modal_bottom_sheet_item_label_selected_font_color,
|
|
@@ -146,7 +205,8 @@ export function getItemLabelProps(
|
|
|
146
205
|
width: number,
|
|
147
206
|
labelProps?:
|
|
148
207
|
| ((theme: PluginConfiguration, width: number) => ItemLabelProps)
|
|
149
|
-
| ItemLabelProps
|
|
208
|
+
| ItemLabelProps,
|
|
209
|
+
blockItemStyle?: Record<string, any>
|
|
150
210
|
) {
|
|
151
211
|
if (labelProps) {
|
|
152
212
|
return typeof labelProps === "function"
|
|
@@ -154,7 +214,7 @@ export function getItemLabelProps(
|
|
|
154
214
|
: labelProps;
|
|
155
215
|
}
|
|
156
216
|
|
|
157
|
-
return defaultItemLabelProps(theme, width);
|
|
217
|
+
return defaultItemLabelProps(theme, width, blockItemStyle);
|
|
158
218
|
}
|
|
159
219
|
|
|
160
220
|
export function getItemProps(
|
|
@@ -162,7 +222,8 @@ export function getItemProps(
|
|
|
162
222
|
width: number,
|
|
163
223
|
itemProps?:
|
|
164
224
|
| ((theme: PluginConfiguration, width: number) => ItemProps)
|
|
165
|
-
| ItemProps
|
|
225
|
+
| ItemProps,
|
|
226
|
+
blockItemStyle?: Record<string, any>
|
|
166
227
|
) {
|
|
167
228
|
if (itemProps) {
|
|
168
229
|
return typeof itemProps === "function"
|
|
@@ -170,5 +231,5 @@ export function getItemProps(
|
|
|
170
231
|
: itemProps;
|
|
171
232
|
}
|
|
172
233
|
|
|
173
|
-
return defaultItemProps(theme, width);
|
|
234
|
+
return defaultItemProps(theme, width, blockItemStyle);
|
|
174
235
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as R from "ramda";
|
|
3
2
|
import { FlatList, StyleSheet, View } from "react-native";
|
|
3
|
+
import { SafeAreaView, EdgeMode, Edge } from "react-native-safe-area-context";
|
|
4
4
|
import { useTheme } from "@applicaster/zapp-react-native-utils/theme";
|
|
5
5
|
import { RiverItem } from "../RiverItem";
|
|
6
6
|
import { RiverFooter } from "../RiverFooter";
|
|
@@ -42,6 +42,12 @@ type Props = {
|
|
|
42
42
|
pullToRefreshPipesV1RefreshingStateUpdater: () => boolean;
|
|
43
43
|
refreshingPipesV1?: boolean;
|
|
44
44
|
stickyHeaderIndices?: number[];
|
|
45
|
+
safeArea?:
|
|
46
|
+
| {
|
|
47
|
+
edges: Record<Edge, EdgeMode>;
|
|
48
|
+
mode: "padding" | "margin" | undefined;
|
|
49
|
+
}
|
|
50
|
+
| undefined;
|
|
45
51
|
};
|
|
46
52
|
|
|
47
53
|
const styles = StyleSheet.create({
|
|
@@ -54,7 +60,7 @@ const getNearestValue = (value, optionA, optionB) =>
|
|
|
54
60
|
Math.abs(value - optionA) < Math.abs(value - optionB) ? optionA : optionB;
|
|
55
61
|
|
|
56
62
|
const scrollIndicatorInsets = { right: 1 };
|
|
57
|
-
const keyExtractor =
|
|
63
|
+
const keyExtractor = (item) => item.id.toString();
|
|
58
64
|
|
|
59
65
|
function ComponentsMapComponent(props: Props) {
|
|
60
66
|
const {
|
|
@@ -70,6 +76,7 @@ function ComponentsMapComponent(props: Props) {
|
|
|
70
76
|
pullToRefreshPipesV1RefreshingStateUpdater,
|
|
71
77
|
refreshingPipesV1,
|
|
72
78
|
stickyHeaderIndices,
|
|
79
|
+
safeArea,
|
|
73
80
|
} = props;
|
|
74
81
|
|
|
75
82
|
const flatListRef = React.useRef<FlatList | null>(null);
|
|
@@ -83,7 +90,7 @@ function ComponentsMapComponent(props: Props) {
|
|
|
83
90
|
|
|
84
91
|
const riverComponents = React.useMemo(() => {
|
|
85
92
|
if (feed?.entry?.length < components.length) {
|
|
86
|
-
return
|
|
93
|
+
return components.slice(0, feed?.entry?.length);
|
|
87
94
|
}
|
|
88
95
|
|
|
89
96
|
return components;
|
|
@@ -98,7 +105,7 @@ function ComponentsMapComponent(props: Props) {
|
|
|
98
105
|
const { loadingState, onLoadFinished, onLoadFailed, shouldShowLoadingError } =
|
|
99
106
|
useLoadingState(riverComponents.length, onLoadDone);
|
|
100
107
|
|
|
101
|
-
const theme = useTheme();
|
|
108
|
+
const theme = useTheme<BaseThemePropertiesMobile>();
|
|
102
109
|
|
|
103
110
|
const renderRiverItem = React.useCallback(
|
|
104
111
|
({ item, index }) => {
|
|
@@ -127,21 +134,13 @@ function ComponentsMapComponent(props: Props) {
|
|
|
127
134
|
|
|
128
135
|
const screenStyle = React.useMemo(
|
|
129
136
|
() => ({
|
|
130
|
-
paddingTop: ifEmptyUseFallback(
|
|
131
|
-
screenConfig.paddingTop,
|
|
132
|
-
R.prop("screen_padding_top")(theme)
|
|
133
|
-
),
|
|
134
|
-
paddingBottom: ifEmptyUseFallback(
|
|
135
|
-
screenConfig.paddingBottom,
|
|
136
|
-
R.prop("screen_padding_bottom")(theme)
|
|
137
|
-
),
|
|
138
137
|
paddingLeft: ifEmptyUseFallback(
|
|
139
138
|
screenConfig.paddingLeft,
|
|
140
|
-
|
|
139
|
+
theme.screen_padding_left
|
|
141
140
|
),
|
|
142
141
|
paddingRight: ifEmptyUseFallback(
|
|
143
142
|
screenConfig.paddingRight,
|
|
144
|
-
|
|
143
|
+
theme.screen_padding_right
|
|
145
144
|
),
|
|
146
145
|
}),
|
|
147
146
|
[riverId]
|
|
@@ -280,50 +279,79 @@ function ComponentsMapComponent(props: Props) {
|
|
|
280
279
|
numberOfComponents={riverComponents.length}
|
|
281
280
|
>
|
|
282
281
|
<ViewportTracker>
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
282
|
+
<>
|
|
283
|
+
<FlatList
|
|
284
|
+
ListHeaderComponent={
|
|
285
|
+
<SafeAreaView
|
|
286
|
+
mode={safeArea?.mode ?? "margin"}
|
|
287
|
+
style={{
|
|
288
|
+
paddingTop: ifEmptyUseFallback(
|
|
289
|
+
screenConfig.paddingTop,
|
|
290
|
+
theme.screen_padding_top
|
|
291
|
+
),
|
|
292
|
+
height: StyleSheet.hairlineWidth,
|
|
293
|
+
}}
|
|
294
|
+
edges={{ top: safeArea?.edges?.top ?? "off" }}
|
|
295
|
+
/>
|
|
296
|
+
}
|
|
297
|
+
testID="components-map-flat-list"
|
|
298
|
+
ref={(ref) => {
|
|
299
|
+
flatListRef.current = ref;
|
|
300
|
+
}}
|
|
301
|
+
// Fix for WebView rerender crashes on Android API 28+
|
|
302
|
+
// https://github.com/react-native-webview/react-native-webview/issues/1915#issuecomment-964035468
|
|
303
|
+
overScrollMode={isAndroid ? "never" : "auto"}
|
|
304
|
+
scrollIndicatorInsets={scrollIndicatorInsets}
|
|
305
|
+
extraData={feed}
|
|
306
|
+
stickyHeaderIndices={stickyHeaderIndices}
|
|
307
|
+
removeClippedSubviews={isAndroid}
|
|
308
|
+
onLayout={handleOnLayout}
|
|
309
|
+
initialNumToRender={3}
|
|
310
|
+
maxToRenderPerBatch={10}
|
|
311
|
+
windowSize={12}
|
|
312
|
+
keyExtractor={keyExtractor}
|
|
313
|
+
renderItem={renderRiverItem}
|
|
314
|
+
data={riverComponents}
|
|
315
|
+
contentContainerStyle={contentContainerStyle}
|
|
316
|
+
ListFooterComponent={
|
|
317
|
+
<>
|
|
318
|
+
<RiverFooter
|
|
319
|
+
flatListHeight={flatListHeight}
|
|
320
|
+
loadingState={loadingState}
|
|
321
|
+
/>
|
|
322
|
+
<SafeAreaView
|
|
323
|
+
mode={safeArea?.mode ?? "margin"}
|
|
324
|
+
style={{
|
|
325
|
+
paddingBottom: ifEmptyUseFallback(
|
|
326
|
+
screenConfig.paddingBottom,
|
|
327
|
+
theme.screen_padding_bottom
|
|
328
|
+
),
|
|
329
|
+
height: StyleSheet.hairlineWidth,
|
|
330
|
+
}}
|
|
331
|
+
edges={{ bottom: safeArea?.edges?.bottom ?? "off" }}
|
|
332
|
+
/>
|
|
333
|
+
</>
|
|
334
|
+
}
|
|
335
|
+
refreshControl={refreshControl}
|
|
336
|
+
onScrollBeginDrag={onScrollBeginDrag}
|
|
337
|
+
onScroll={onScroll}
|
|
338
|
+
onMomentumScrollEnd={_onMomentumScrollEnd}
|
|
339
|
+
onScrollEndDrag={_onScrollEndDrag}
|
|
340
|
+
scrollEventThrottle={16}
|
|
341
|
+
{...scrollViewExtraProps}
|
|
342
|
+
onEndReached={
|
|
343
|
+
/* When wrapped in a parent ScrollView (e.g. tabs),
|
|
344
|
+
this FlatList doesn't scroll so onEndReached can fire repeatedly;
|
|
345
|
+
skip it here and let the parent ScrollView emit scroll-end instead. */
|
|
346
|
+
isScreenWrappedInContainer
|
|
347
|
+
? undefined
|
|
348
|
+
: () => {
|
|
349
|
+
if (!hasUserScrolledRef.current) return;
|
|
350
|
+
emitScrollEndReached();
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
/>
|
|
354
|
+
</>
|
|
327
355
|
</ViewportTracker>
|
|
328
356
|
</ScreenLoadingMeasurements>
|
|
329
357
|
</ComponentsMapRefContext.Provider>
|
|
@@ -333,6 +361,5 @@ function ComponentsMapComponent(props: Props) {
|
|
|
333
361
|
}
|
|
334
362
|
|
|
335
363
|
export const ComponentsMap = React.memo(
|
|
336
|
-
withComponentsMapProvider(ComponentsMapComponent)
|
|
337
|
-
R.equals
|
|
364
|
+
withComponentsMapProvider(ComponentsMapComponent)
|
|
338
365
|
);
|
|
@@ -13,95 +13,125 @@ exports[`componentsMap renders renders components map correctly 1`] = `
|
|
|
13
13
|
>
|
|
14
14
|
<RCTScrollView
|
|
15
15
|
ListFooterComponent={
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"closed": false,
|
|
26
|
-
"currentObservers": null,
|
|
27
|
-
"hasError": false,
|
|
28
|
-
"isStopped": false,
|
|
29
|
-
"observers": [
|
|
30
|
-
SafeSubscriber {
|
|
31
|
-
"_finalizers": [
|
|
32
|
-
Subscription {
|
|
33
|
-
"_finalizers": null,
|
|
34
|
-
"_parentage": [Circular],
|
|
35
|
-
"closed": false,
|
|
36
|
-
"initialTeardown": [Function],
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
"_parentage": null,
|
|
40
|
-
"closed": false,
|
|
41
|
-
"destination": ConsumerObserver {
|
|
42
|
-
"partialObserver": {
|
|
43
|
-
"complete": undefined,
|
|
44
|
-
"error": undefined,
|
|
45
|
-
"next": [Function],
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
"initialTeardown": undefined,
|
|
49
|
-
"isStopped": false,
|
|
16
|
+
<React.Fragment>
|
|
17
|
+
<Memo(RiverFooterComponent)
|
|
18
|
+
flatListHeight={null}
|
|
19
|
+
loadingState={
|
|
20
|
+
BehaviorSubject {
|
|
21
|
+
"_value": {
|
|
22
|
+
"done": false,
|
|
23
|
+
"index": -1,
|
|
24
|
+
"waitForAllComponents": false,
|
|
50
25
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
26
|
+
"closed": false,
|
|
27
|
+
"currentObservers": null,
|
|
28
|
+
"hasError": false,
|
|
29
|
+
"isStopped": false,
|
|
30
|
+
"observers": [
|
|
31
|
+
SafeSubscriber {
|
|
32
|
+
"_finalizers": [
|
|
33
|
+
Subscription {
|
|
34
|
+
"_finalizers": null,
|
|
35
|
+
"_parentage": [Circular],
|
|
36
|
+
"closed": false,
|
|
37
|
+
"initialTeardown": [Function],
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
"_parentage": null,
|
|
41
|
+
"closed": false,
|
|
42
|
+
"destination": ConsumerObserver {
|
|
43
|
+
"partialObserver": {
|
|
44
|
+
"complete": undefined,
|
|
45
|
+
"error": undefined,
|
|
46
|
+
"next": [Function],
|
|
47
|
+
},
|
|
67
48
|
},
|
|
49
|
+
"initialTeardown": undefined,
|
|
50
|
+
"isStopped": false,
|
|
68
51
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
52
|
+
SafeSubscriber {
|
|
53
|
+
"_finalizers": [
|
|
54
|
+
Subscription {
|
|
55
|
+
"_finalizers": null,
|
|
56
|
+
"_parentage": [Circular],
|
|
57
|
+
"closed": false,
|
|
58
|
+
"initialTeardown": [Function],
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
"_parentage": null,
|
|
62
|
+
"closed": false,
|
|
63
|
+
"destination": ConsumerObserver {
|
|
64
|
+
"partialObserver": {
|
|
65
|
+
"complete": undefined,
|
|
66
|
+
"error": undefined,
|
|
67
|
+
"next": [Function],
|
|
68
|
+
},
|
|
79
69
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
70
|
+
"initialTeardown": undefined,
|
|
71
|
+
"isStopped": false,
|
|
72
|
+
},
|
|
73
|
+
SafeSubscriber {
|
|
74
|
+
"_finalizers": [
|
|
75
|
+
Subscription {
|
|
76
|
+
"_finalizers": null,
|
|
77
|
+
"_parentage": [Circular],
|
|
78
|
+
"closed": false,
|
|
79
|
+
"initialTeardown": [Function],
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
"_parentage": null,
|
|
83
|
+
"closed": false,
|
|
84
|
+
"destination": ConsumerObserver {
|
|
85
|
+
"partialObserver": {
|
|
86
|
+
"complete": undefined,
|
|
87
|
+
"error": undefined,
|
|
88
|
+
"next": [Function],
|
|
89
|
+
},
|
|
88
90
|
},
|
|
91
|
+
"initialTeardown": undefined,
|
|
92
|
+
"isStopped": false,
|
|
89
93
|
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
],
|
|
95
|
+
"thrownError": null,
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/>
|
|
99
|
+
<View
|
|
100
|
+
edges={
|
|
101
|
+
{
|
|
102
|
+
"bottom": "off",
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
mode="margin"
|
|
106
|
+
style={
|
|
107
|
+
{
|
|
108
|
+
"height": 0.5,
|
|
109
|
+
"paddingBottom": undefined,
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/>
|
|
113
|
+
</React.Fragment>
|
|
114
|
+
}
|
|
115
|
+
ListHeaderComponent={
|
|
116
|
+
<View
|
|
117
|
+
edges={
|
|
118
|
+
{
|
|
119
|
+
"top": "off",
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
mode="margin"
|
|
123
|
+
style={
|
|
124
|
+
{
|
|
125
|
+
"height": 0.5,
|
|
126
|
+
"paddingTop": undefined,
|
|
95
127
|
}
|
|
96
128
|
}
|
|
97
129
|
/>
|
|
98
130
|
}
|
|
99
131
|
contentContainerStyle={
|
|
100
132
|
{
|
|
101
|
-
"paddingBottom": undefined,
|
|
102
133
|
"paddingLeft": undefined,
|
|
103
134
|
"paddingRight": undefined,
|
|
104
|
-
"paddingTop": undefined,
|
|
105
135
|
}
|
|
106
136
|
}
|
|
107
137
|
data={
|
|
@@ -150,10 +180,30 @@ exports[`componentsMap renders renders components map correctly 1`] = `
|
|
|
150
180
|
}
|
|
151
181
|
}
|
|
152
182
|
stickyHeaderIndices={[]}
|
|
183
|
+
testID="components-map-flat-list"
|
|
153
184
|
viewabilityConfigCallbackPairs={[]}
|
|
154
185
|
windowSize={12}
|
|
155
186
|
>
|
|
156
187
|
<View>
|
|
188
|
+
<View
|
|
189
|
+
collapsable={false}
|
|
190
|
+
onLayout={[Function]}
|
|
191
|
+
>
|
|
192
|
+
<View
|
|
193
|
+
edges={
|
|
194
|
+
{
|
|
195
|
+
"top": "off",
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
mode="margin"
|
|
199
|
+
style={
|
|
200
|
+
{
|
|
201
|
+
"height": 0.5,
|
|
202
|
+
"paddingTop": undefined,
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/>
|
|
206
|
+
</View>
|
|
157
207
|
<View
|
|
158
208
|
onFocusCapture={[Function]}
|
|
159
209
|
onLayout={[Function]}
|
|
@@ -196,6 +246,20 @@ exports[`componentsMap renders renders components map correctly 1`] = `
|
|
|
196
246
|
size="large"
|
|
197
247
|
/>
|
|
198
248
|
</View>
|
|
249
|
+
<View
|
|
250
|
+
edges={
|
|
251
|
+
{
|
|
252
|
+
"bottom": "off",
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
mode="margin"
|
|
256
|
+
style={
|
|
257
|
+
{
|
|
258
|
+
"height": 0.5,
|
|
259
|
+
"paddingBottom": undefined,
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
/>
|
|
199
263
|
</View>
|
|
200
264
|
</View>
|
|
201
265
|
</RCTScrollView>
|
|
@@ -11,9 +11,14 @@ jest.mock(
|
|
|
11
11
|
() => () => null
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
jest.mock("react-native-safe-area-context", () =>
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
jest.mock("react-native-safe-area-context", () => {
|
|
15
|
+
const { View } = jest.requireActual("react-native");
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
SafeAreaView: View,
|
|
19
|
+
useSafeAreaInsets: () => ({ top: 50 }),
|
|
20
|
+
};
|
|
21
|
+
});
|
|
17
22
|
|
|
18
23
|
jest.mock("react-native", () => {
|
|
19
24
|
const RN = jest.genMockFromModule("react-native");
|