@applicaster/zapp-react-native-utils 15.1.0 → 15.1.1-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.
|
@@ -25,6 +25,10 @@ import {
|
|
|
25
25
|
resolveObjectValues,
|
|
26
26
|
} from "../appUtils/contextKeysManager/contextResolver";
|
|
27
27
|
import { useNavigation } from "../reactHooks";
|
|
28
|
+
import {
|
|
29
|
+
getInflatedDataSourceUrl,
|
|
30
|
+
getSearchContext,
|
|
31
|
+
} from "../reactHooks/feed/useInflatedUrl";
|
|
28
32
|
|
|
29
33
|
import {
|
|
30
34
|
useContentTypes,
|
|
@@ -128,12 +132,42 @@ const prepareDefaultActions = (actionExecutor) => {
|
|
|
128
132
|
async (_action, context) => {
|
|
129
133
|
const dispatch = appStore.getDispatch();
|
|
130
134
|
|
|
131
|
-
const
|
|
132
|
-
context?.component?.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
const parentComponent = findParentComponent(
|
|
136
|
+
context?.component?.id,
|
|
137
|
+
context?.screenData
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
const componentSource = context?.component?.data?.source;
|
|
141
|
+
|
|
142
|
+
const componentData = componentSource
|
|
143
|
+
? context.component.data
|
|
144
|
+
: parentComponent?.data;
|
|
145
|
+
|
|
146
|
+
const source = componentData?.source;
|
|
147
|
+
const mapping = componentData?.mapping;
|
|
135
148
|
|
|
136
|
-
|
|
149
|
+
let dataSource = source;
|
|
150
|
+
|
|
151
|
+
if (source && mapping) {
|
|
152
|
+
dataSource =
|
|
153
|
+
getInflatedDataSourceUrl({
|
|
154
|
+
source,
|
|
155
|
+
contexts: {
|
|
156
|
+
entry: context?.entryContext,
|
|
157
|
+
screen: context?.screenData,
|
|
158
|
+
search: getSearchContext(null, mapping),
|
|
159
|
+
},
|
|
160
|
+
mapping,
|
|
161
|
+
}) || source;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
log_info(`handleAction: refreshComponent for dataSource:${dataSource}`, {
|
|
165
|
+
source,
|
|
166
|
+
inflatedUrl: dataSource,
|
|
167
|
+
mapping,
|
|
168
|
+
entryContextId: context?.entryContext?.id,
|
|
169
|
+
entryId: context?.entry?.id,
|
|
170
|
+
});
|
|
137
171
|
|
|
138
172
|
// TODO: In theory we should wait callback to complete, before completing the action, but now it's not needed
|
|
139
173
|
// TODO: handle focused item removal
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "15.1.0",
|
|
3
|
+
"version": "15.1.1-rc.0",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@applicaster/applicaster-types": "15.1.0",
|
|
30
|
+
"@applicaster/applicaster-types": "15.1.1-rc.0",
|
|
31
31
|
"buffer": "^5.2.1",
|
|
32
32
|
"camelize": "^1.0.0",
|
|
33
33
|
"dayjs": "^1.11.10",
|
|
@@ -54,7 +54,7 @@ export const useCellClick = ({
|
|
|
54
54
|
component?.rules?.component_cells_selectable
|
|
55
55
|
);
|
|
56
56
|
|
|
57
|
-
const [
|
|
57
|
+
const [entryContext, setEntryContext] =
|
|
58
58
|
ZappPipesEntryContext.useZappPipesContext(pathname);
|
|
59
59
|
|
|
60
60
|
const logTimestamp = useProfilerLogging();
|
|
@@ -89,6 +89,7 @@ export const useCellClick = ({
|
|
|
89
89
|
screenState,
|
|
90
90
|
screenRoute: pathname,
|
|
91
91
|
screenStateStore,
|
|
92
|
+
entryContext,
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
95
|
|