@applicaster/zapp-react-native-ui-components 12.0.0-rc.31 → 12.0.0-rc.33
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/Cell/Cell.tsx +2 -2
- package/Components/Cell/CellWithFocusable.tsx +21 -14
- package/Components/Cell/TvOSCellComponent.tsx +2 -2
- package/Components/FocusableCell/index.tsx +7 -7
- package/Components/HookRenderer/index.tsx +1 -3
- package/Components/Layout/TV/__tests__/index.test.tsx +1 -13
- package/Components/MasterCell/DefaultComponents/Toggle.tsx +5 -1
- package/Components/MasterCell/utils/index.ts +2 -2
- package/Components/Tabs/TV/styles.ts +1 -1
- package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +211 -163
- package/Decorators/ComponentsMapWrapper/withComponentsMapProvider.tsx +7 -2
- package/package.json +5 -5
package/Components/Cell/Cell.tsx
CHANGED
|
@@ -202,7 +202,7 @@ export class CellComponent extends React.Component<Props> {
|
|
|
202
202
|
groupId,
|
|
203
203
|
isFocusable = true,
|
|
204
204
|
skipFocusManagerRegistration,
|
|
205
|
-
behavior
|
|
205
|
+
behavior,
|
|
206
206
|
} = this.props;
|
|
207
207
|
|
|
208
208
|
const { id } = item;
|
|
@@ -263,7 +263,7 @@ export class CellComponent extends React.Component<Props> {
|
|
|
263
263
|
item,
|
|
264
264
|
focused: this.isCellFocused(focused),
|
|
265
265
|
scrollTo: this.scrollToIndex(event),
|
|
266
|
-
behavior
|
|
266
|
+
behavior,
|
|
267
267
|
}}
|
|
268
268
|
/>
|
|
269
269
|
);
|
|
@@ -35,18 +35,18 @@ const useCellFocusedState = (groupId: string, id: string) => {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
type Props = {
|
|
38
|
-
item: ZappEntry
|
|
39
|
-
CellRenderer: React.ComponentType<{ item: Object
|
|
40
|
-
id: string
|
|
41
|
-
groupId: string
|
|
42
|
-
onFocus: Function
|
|
43
|
-
index: number
|
|
44
|
-
scrollTo: Function
|
|
45
|
-
preferredFocus?: boolean
|
|
46
|
-
skipFocusManagerRegistration?: boolean
|
|
47
|
-
isFocusable?: boolean
|
|
48
|
-
behavior: Behavior
|
|
49
|
-
selected?: boolean
|
|
38
|
+
item: ZappEntry;
|
|
39
|
+
CellRenderer: React.ComponentType<{ item: Object; state: string }>;
|
|
40
|
+
id: string;
|
|
41
|
+
groupId: string;
|
|
42
|
+
onFocus: Function;
|
|
43
|
+
index: number;
|
|
44
|
+
scrollTo: Function;
|
|
45
|
+
preferredFocus?: boolean;
|
|
46
|
+
skipFocusManagerRegistration?: boolean;
|
|
47
|
+
isFocusable?: boolean;
|
|
48
|
+
behavior: Behavior;
|
|
49
|
+
selected?: boolean;
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
export function CellWithFocusable(props: Props) {
|
|
@@ -62,11 +62,18 @@ export function CellWithFocusable(props: Props) {
|
|
|
62
62
|
skipFocusManagerRegistration,
|
|
63
63
|
isFocusable,
|
|
64
64
|
behavior,
|
|
65
|
-
selected
|
|
65
|
+
selected,
|
|
66
66
|
} = props;
|
|
67
67
|
|
|
68
68
|
const isFocused = useCellFocusedState(groupId, id);
|
|
69
|
-
|
|
69
|
+
|
|
70
|
+
const state = useCellState({
|
|
71
|
+
id: item.id,
|
|
72
|
+
behavior,
|
|
73
|
+
focused: isFocused,
|
|
74
|
+
selected,
|
|
75
|
+
});
|
|
76
|
+
|
|
70
77
|
const [focusedButtonId, setFocusedButtonId] = React.useState(undefined);
|
|
71
78
|
|
|
72
79
|
// for horizontal scrolling
|
|
@@ -249,7 +249,7 @@ export class TvOSCellComponent extends React.Component<Props, State> {
|
|
|
249
249
|
hasReceivedFocus,
|
|
250
250
|
groupId,
|
|
251
251
|
isFocusable,
|
|
252
|
-
behavior
|
|
252
|
+
behavior,
|
|
253
253
|
} = this.props;
|
|
254
254
|
|
|
255
255
|
const { id } = item;
|
|
@@ -310,7 +310,7 @@ export class TvOSCellComponent extends React.Component<Props, State> {
|
|
|
310
310
|
item,
|
|
311
311
|
focused: this.props.focused || selectedCell || focused,
|
|
312
312
|
scrollTo: this.scrollTo,
|
|
313
|
-
behavior
|
|
313
|
+
behavior,
|
|
314
314
|
}}
|
|
315
315
|
/>
|
|
316
316
|
);
|
|
@@ -3,12 +3,12 @@ import { Platform } from "react-native";
|
|
|
3
3
|
import { useCellState } from "../MasterCell/utils";
|
|
4
4
|
|
|
5
5
|
type Props = {
|
|
6
|
-
index: number
|
|
7
|
-
item: ZappEntry
|
|
8
|
-
focused: boolean
|
|
9
|
-
scrollTo?: (index: number) => void
|
|
10
|
-
CellRenderer: React.ComponentType<{ item: Object
|
|
11
|
-
behavior: Behavior
|
|
6
|
+
index: number;
|
|
7
|
+
item: ZappEntry;
|
|
8
|
+
focused: boolean;
|
|
9
|
+
scrollTo?: (index: number) => void;
|
|
10
|
+
CellRenderer: React.ComponentType<{ item: Object; state: string }>;
|
|
11
|
+
behavior: Behavior;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
const isAndroid = Platform.OS === "android";
|
|
@@ -20,7 +20,7 @@ export function FocusableCell(props: Props) {
|
|
|
20
20
|
CellRenderer,
|
|
21
21
|
focused,
|
|
22
22
|
scrollTo = null,
|
|
23
|
-
behavior
|
|
23
|
+
behavior,
|
|
24
24
|
} = props;
|
|
25
25
|
|
|
26
26
|
const state = useCellState({ id: item.id, behavior, focused });
|
|
@@ -12,19 +12,7 @@ jest.mock("@applicaster/quick-brick-core/App/ActionSetters", () => ({
|
|
|
12
12
|
useRiverInitialState: () => ({}),
|
|
13
13
|
}));
|
|
14
14
|
|
|
15
|
-
jest.mock("@applicaster/zapp-react-native-utils/reactHooks/screen"
|
|
16
|
-
useCurrentScreenData: jest.fn(() => ({
|
|
17
|
-
navigations: [
|
|
18
|
-
{
|
|
19
|
-
category: "menu",
|
|
20
|
-
navigation_type: "menu",
|
|
21
|
-
styles: {
|
|
22
|
-
hide_secondary_level_menu: false,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
})),
|
|
27
|
-
}));
|
|
15
|
+
jest.mock("@applicaster/zapp-react-native-utils/reactHooks/screen");
|
|
28
16
|
|
|
29
17
|
const Layout = require("..").default;
|
|
30
18
|
|
|
@@ -23,7 +23,11 @@ export const Toggle = (props: Props) => {
|
|
|
23
23
|
iosBackgroundColor,
|
|
24
24
|
} = style;
|
|
25
25
|
|
|
26
|
-
const isSelected = React.useMemo(
|
|
26
|
+
const isSelected = React.useMemo(
|
|
27
|
+
() => cellState === "selected",
|
|
28
|
+
[item?.id, cellState]
|
|
29
|
+
);
|
|
30
|
+
|
|
27
31
|
const actionContext = useActions(action?.identifier);
|
|
28
32
|
|
|
29
33
|
const [actionState, setActionState] = useState(
|
|
@@ -1,249 +1,297 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`PlayerWrapper renders inline 1`] = `
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
Object {
|
|
7
|
-
"bottom": "off",
|
|
8
|
-
"left": "off",
|
|
9
|
-
"right": "off",
|
|
10
|
-
"top": "additive",
|
|
11
|
-
}
|
|
12
|
-
}
|
|
4
|
+
<RNCSafeAreaProvider
|
|
5
|
+
onInsetsChange={[Function]}
|
|
13
6
|
style={
|
|
14
7
|
Array [
|
|
15
8
|
Object {
|
|
16
|
-
"
|
|
17
|
-
},
|
|
18
|
-
Object {
|
|
19
|
-
"backgroundColor": "transparent",
|
|
20
|
-
},
|
|
21
|
-
Object {
|
|
22
|
-
"height": 800,
|
|
23
|
-
"width": 300,
|
|
9
|
+
"flex": 1,
|
|
24
10
|
},
|
|
25
|
-
|
|
11
|
+
undefined,
|
|
26
12
|
]
|
|
27
13
|
}
|
|
28
14
|
>
|
|
29
|
-
<
|
|
15
|
+
<RNCSafeAreaView
|
|
16
|
+
edges={
|
|
17
|
+
Object {
|
|
18
|
+
"bottom": "off",
|
|
19
|
+
"left": "off",
|
|
20
|
+
"right": "off",
|
|
21
|
+
"top": "additive",
|
|
22
|
+
}
|
|
23
|
+
}
|
|
30
24
|
style={
|
|
31
25
|
Array [
|
|
32
26
|
Object {
|
|
33
|
-
"
|
|
34
|
-
"position": "relative",
|
|
35
|
-
"zIndex": 200,
|
|
27
|
+
"flexDirection": "column",
|
|
36
28
|
},
|
|
37
29
|
Object {
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
"backgroundColor": "transparent",
|
|
31
|
+
},
|
|
32
|
+
Object {
|
|
33
|
+
"height": 800,
|
|
34
|
+
"width": 300,
|
|
41
35
|
},
|
|
42
|
-
Object {},
|
|
43
36
|
Object {},
|
|
44
37
|
]
|
|
45
38
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
>
|
|
40
|
+
<View
|
|
41
|
+
style={
|
|
42
|
+
Array [
|
|
43
|
+
Object {
|
|
44
|
+
"alignSelf": "center",
|
|
45
|
+
"position": "relative",
|
|
46
|
+
"zIndex": 200,
|
|
47
|
+
},
|
|
48
|
+
Object {
|
|
49
|
+
"aspectRatio": 1.7777777777777777,
|
|
50
|
+
"height": undefined,
|
|
51
|
+
"width": "100%",
|
|
52
|
+
},
|
|
53
|
+
Object {},
|
|
54
|
+
Object {},
|
|
55
|
+
]
|
|
53
56
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
testID="test-player-container"
|
|
58
|
+
/>
|
|
59
|
+
<View
|
|
60
|
+
configuration={
|
|
61
|
+
Object {
|
|
62
|
+
"tablet_landscape_player_container_background_color": "red",
|
|
63
|
+
"tablet_landscape_sidebar_width": "35%",
|
|
64
|
+
}
|
|
58
65
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"flex": 1,
|
|
64
|
-
"paddingTop": 20,
|
|
66
|
+
entry={
|
|
67
|
+
Object {
|
|
68
|
+
"id": "test",
|
|
69
|
+
}
|
|
65
70
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
isTabletLandscape={false}
|
|
72
|
+
style={
|
|
73
|
+
Object {
|
|
74
|
+
"flex": 1,
|
|
75
|
+
"paddingTop": 20,
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/>
|
|
79
|
+
</RNCSafeAreaView>
|
|
80
|
+
</RNCSafeAreaProvider>
|
|
69
81
|
`;
|
|
70
82
|
|
|
71
83
|
exports[`PlayerWrapper renders inline and docked 1`] = `
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
Object {
|
|
75
|
-
"bottom": "additive",
|
|
76
|
-
"left": "off",
|
|
77
|
-
"right": "off",
|
|
78
|
-
"top": "off",
|
|
79
|
-
}
|
|
80
|
-
}
|
|
84
|
+
<RNCSafeAreaProvider
|
|
85
|
+
onInsetsChange={[Function]}
|
|
81
86
|
style={
|
|
82
87
|
Array [
|
|
83
88
|
Object {
|
|
84
|
-
"
|
|
85
|
-
},
|
|
86
|
-
Object {
|
|
87
|
-
"backgroundColor": "transparent",
|
|
88
|
-
},
|
|
89
|
-
Object {
|
|
90
|
-
"height": 50,
|
|
91
|
-
"width": 300,
|
|
89
|
+
"flex": 1,
|
|
92
90
|
},
|
|
93
|
-
|
|
91
|
+
undefined,
|
|
94
92
|
]
|
|
95
93
|
}
|
|
96
94
|
>
|
|
97
|
-
<
|
|
95
|
+
<RNCSafeAreaView
|
|
96
|
+
edges={
|
|
97
|
+
Object {
|
|
98
|
+
"bottom": "additive",
|
|
99
|
+
"left": "off",
|
|
100
|
+
"right": "off",
|
|
101
|
+
"top": "off",
|
|
102
|
+
}
|
|
103
|
+
}
|
|
98
104
|
style={
|
|
99
105
|
Array [
|
|
100
106
|
Object {
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
"flexDirection": "column",
|
|
108
|
+
},
|
|
109
|
+
Object {
|
|
110
|
+
"backgroundColor": "transparent",
|
|
104
111
|
},
|
|
105
112
|
Object {
|
|
106
|
-
"aspectRatio": undefined,
|
|
107
113
|
"height": 50,
|
|
108
|
-
"width":
|
|
114
|
+
"width": 300,
|
|
109
115
|
},
|
|
110
116
|
Object {},
|
|
111
|
-
Object {},
|
|
112
117
|
]
|
|
113
118
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
>
|
|
120
|
+
<View
|
|
121
|
+
style={
|
|
122
|
+
Array [
|
|
123
|
+
Object {
|
|
124
|
+
"alignSelf": "center",
|
|
125
|
+
"position": "relative",
|
|
126
|
+
"zIndex": 200,
|
|
127
|
+
},
|
|
128
|
+
Object {
|
|
129
|
+
"aspectRatio": undefined,
|
|
130
|
+
"height": 50,
|
|
131
|
+
"width": "100%",
|
|
132
|
+
},
|
|
133
|
+
Object {},
|
|
134
|
+
Object {},
|
|
135
|
+
]
|
|
121
136
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
137
|
+
testID="test-player-container"
|
|
138
|
+
/>
|
|
139
|
+
<View
|
|
140
|
+
style={
|
|
141
|
+
Object {
|
|
142
|
+
"flex": 1,
|
|
143
|
+
"paddingTop": 20,
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/>
|
|
147
|
+
</RNCSafeAreaView>
|
|
148
|
+
</RNCSafeAreaProvider>
|
|
125
149
|
`;
|
|
126
150
|
|
|
127
151
|
exports[`PlayerWrapper renders inline on tablet in landscape orientation 1`] = `
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
Object {
|
|
131
|
-
"bottom": "off",
|
|
132
|
-
"left": "off",
|
|
133
|
-
"right": "off",
|
|
134
|
-
"top": "additive",
|
|
135
|
-
}
|
|
136
|
-
}
|
|
152
|
+
<RNCSafeAreaProvider
|
|
153
|
+
onInsetsChange={[Function]}
|
|
137
154
|
style={
|
|
138
155
|
Array [
|
|
139
156
|
Object {
|
|
140
|
-
"
|
|
141
|
-
},
|
|
142
|
-
Object {
|
|
143
|
-
"backgroundColor": "red",
|
|
144
|
-
},
|
|
145
|
-
Object {
|
|
146
|
-
"height": 800,
|
|
147
|
-
"width": 300,
|
|
157
|
+
"flex": 1,
|
|
148
158
|
},
|
|
149
|
-
|
|
159
|
+
undefined,
|
|
150
160
|
]
|
|
151
161
|
}
|
|
152
162
|
>
|
|
153
|
-
<
|
|
163
|
+
<RNCSafeAreaView
|
|
164
|
+
edges={
|
|
165
|
+
Object {
|
|
166
|
+
"bottom": "off",
|
|
167
|
+
"left": "off",
|
|
168
|
+
"right": "off",
|
|
169
|
+
"top": "additive",
|
|
170
|
+
}
|
|
171
|
+
}
|
|
154
172
|
style={
|
|
155
173
|
Array [
|
|
156
174
|
Object {
|
|
157
|
-
"
|
|
158
|
-
"position": "relative",
|
|
159
|
-
"zIndex": 200,
|
|
175
|
+
"flexDirection": "row",
|
|
160
176
|
},
|
|
161
177
|
Object {
|
|
162
|
-
"
|
|
163
|
-
|
|
164
|
-
|
|
178
|
+
"backgroundColor": "red",
|
|
179
|
+
},
|
|
180
|
+
Object {
|
|
181
|
+
"height": 800,
|
|
182
|
+
"width": 300,
|
|
165
183
|
},
|
|
166
|
-
Object {},
|
|
167
184
|
Object {},
|
|
168
185
|
]
|
|
169
186
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
187
|
+
>
|
|
188
|
+
<View
|
|
189
|
+
style={
|
|
190
|
+
Array [
|
|
191
|
+
Object {
|
|
192
|
+
"alignSelf": "center",
|
|
193
|
+
"position": "relative",
|
|
194
|
+
"zIndex": 200,
|
|
195
|
+
},
|
|
196
|
+
Object {
|
|
197
|
+
"aspectRatio": 1.7777777777777777,
|
|
198
|
+
"height": undefined,
|
|
199
|
+
"width": 195,
|
|
200
|
+
},
|
|
201
|
+
Object {},
|
|
202
|
+
Object {},
|
|
203
|
+
]
|
|
177
204
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
205
|
+
testID="test-player-container"
|
|
206
|
+
/>
|
|
207
|
+
<View
|
|
208
|
+
configuration={
|
|
209
|
+
Object {
|
|
210
|
+
"tablet_landscape_player_container_background_color": "red",
|
|
211
|
+
"tablet_landscape_sidebar_width": "35%",
|
|
212
|
+
}
|
|
182
213
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
"flex": 1,
|
|
188
|
-
"paddingTop": 20,
|
|
214
|
+
entry={
|
|
215
|
+
Object {
|
|
216
|
+
"id": "test",
|
|
217
|
+
}
|
|
189
218
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
219
|
+
isTabletLandscape={true}
|
|
220
|
+
style={
|
|
221
|
+
Object {
|
|
222
|
+
"flex": 1,
|
|
223
|
+
"paddingTop": 20,
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
/>
|
|
227
|
+
</RNCSafeAreaView>
|
|
228
|
+
</RNCSafeAreaProvider>
|
|
193
229
|
`;
|
|
194
230
|
|
|
195
231
|
exports[`PlayerWrapper renders properly 1`] = `
|
|
196
|
-
<
|
|
197
|
-
|
|
198
|
-
Object {
|
|
199
|
-
"bottom": "off",
|
|
200
|
-
"left": "off",
|
|
201
|
-
"right": "off",
|
|
202
|
-
"top": "additive",
|
|
203
|
-
}
|
|
204
|
-
}
|
|
232
|
+
<RNCSafeAreaProvider
|
|
233
|
+
onInsetsChange={[Function]}
|
|
205
234
|
style={
|
|
206
235
|
Array [
|
|
207
236
|
Object {
|
|
208
|
-
"
|
|
209
|
-
},
|
|
210
|
-
Object {
|
|
211
|
-
"backgroundColor": "transparent",
|
|
212
|
-
},
|
|
213
|
-
Object {
|
|
214
|
-
"height": 800,
|
|
215
|
-
"width": 300,
|
|
237
|
+
"flex": 1,
|
|
216
238
|
},
|
|
217
|
-
|
|
239
|
+
undefined,
|
|
218
240
|
]
|
|
219
241
|
}
|
|
220
242
|
>
|
|
221
|
-
<
|
|
243
|
+
<RNCSafeAreaView
|
|
244
|
+
edges={
|
|
245
|
+
Object {
|
|
246
|
+
"bottom": "off",
|
|
247
|
+
"left": "off",
|
|
248
|
+
"right": "off",
|
|
249
|
+
"top": "additive",
|
|
250
|
+
}
|
|
251
|
+
}
|
|
222
252
|
style={
|
|
223
253
|
Array [
|
|
224
254
|
Object {
|
|
225
|
-
"
|
|
226
|
-
"position": "relative",
|
|
227
|
-
"zIndex": 200,
|
|
255
|
+
"flexDirection": "column",
|
|
228
256
|
},
|
|
229
257
|
Object {
|
|
230
|
-
"
|
|
231
|
-
|
|
232
|
-
|
|
258
|
+
"backgroundColor": "transparent",
|
|
259
|
+
},
|
|
260
|
+
Object {
|
|
261
|
+
"height": 800,
|
|
262
|
+
"width": 300,
|
|
233
263
|
},
|
|
234
|
-
Object {},
|
|
235
264
|
Object {},
|
|
236
265
|
]
|
|
237
266
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
267
|
+
>
|
|
268
|
+
<View
|
|
269
|
+
style={
|
|
270
|
+
Array [
|
|
271
|
+
Object {
|
|
272
|
+
"alignSelf": "center",
|
|
273
|
+
"position": "relative",
|
|
274
|
+
"zIndex": 200,
|
|
275
|
+
},
|
|
276
|
+
Object {
|
|
277
|
+
"aspectRatio": 1.7786666666666666,
|
|
278
|
+
"height": undefined,
|
|
279
|
+
"width": "100%",
|
|
280
|
+
},
|
|
281
|
+
Object {},
|
|
282
|
+
Object {},
|
|
283
|
+
]
|
|
245
284
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
285
|
+
testID="test-player-container"
|
|
286
|
+
/>
|
|
287
|
+
<View
|
|
288
|
+
style={
|
|
289
|
+
Object {
|
|
290
|
+
"flex": 1,
|
|
291
|
+
"paddingTop": 20,
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
/>
|
|
295
|
+
</RNCSafeAreaView>
|
|
296
|
+
</RNCSafeAreaProvider>
|
|
249
297
|
`;
|
|
@@ -12,11 +12,16 @@ export function withComponentsMapProvider(Component: React.ComponentType<any>) {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
const setComponentHeightById = (id: string | number, height: number) => {
|
|
15
|
-
componentsHeightMapRef.current = {
|
|
15
|
+
componentsHeightMapRef.current = {
|
|
16
|
+
...componentsHeightMapRef.current,
|
|
17
|
+
[id]: height,
|
|
18
|
+
};
|
|
16
19
|
};
|
|
17
20
|
|
|
18
21
|
return (
|
|
19
|
-
<ComponentsMapProvider
|
|
22
|
+
<ComponentsMapProvider
|
|
23
|
+
{...{ setComponentHeightById, getComponentHeightById }}
|
|
24
|
+
>
|
|
20
25
|
<Component {...props} />
|
|
21
26
|
</ComponentsMapProvider>
|
|
22
27
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "12.0.0-rc.
|
|
3
|
+
"version": "12.0.0-rc.33",
|
|
4
4
|
"description": "Applicaster Zapp React Native ui components for the Quick Brick App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"redux-mock-store": "^1.5.3"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@applicaster/applicaster-types": "12.0.0-rc.
|
|
38
|
-
"@applicaster/zapp-react-native-bridge": "12.0.0-rc.
|
|
39
|
-
"@applicaster/zapp-react-native-redux": "12.0.0-rc.
|
|
40
|
-
"@applicaster/zapp-react-native-utils": "12.0.0-rc.
|
|
37
|
+
"@applicaster/applicaster-types": "12.0.0-rc.33",
|
|
38
|
+
"@applicaster/zapp-react-native-bridge": "12.0.0-rc.33",
|
|
39
|
+
"@applicaster/zapp-react-native-redux": "12.0.0-rc.33",
|
|
40
|
+
"@applicaster/zapp-react-native-utils": "12.0.0-rc.33",
|
|
41
41
|
"promise": "^8.3.0",
|
|
42
42
|
"react-router-native": "^5.1.2",
|
|
43
43
|
"url": "^0.11.0",
|