@applicaster/zapp-react-native-utils 14.0.35 → 14.0.37-alpha.7626825010
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.
|
@@ -24,6 +24,10 @@ import {
|
|
|
24
24
|
resolveObjectValues,
|
|
25
25
|
} from "../appUtils/contextKeysManager/contextResolver";
|
|
26
26
|
import { useNavigation } from "../reactHooks";
|
|
27
|
+
import {
|
|
28
|
+
getInflatedDataSourceUrl,
|
|
29
|
+
getSearchContext,
|
|
30
|
+
} from "../reactHooks/feed/useInflatedUrl";
|
|
27
31
|
|
|
28
32
|
import {
|
|
29
33
|
useContentTypes,
|
|
@@ -107,12 +111,42 @@ const prepareDefaultActions = (actionExecutor) => {
|
|
|
107
111
|
async (_action, context) => {
|
|
108
112
|
const dispatch = appStore.getDispatch();
|
|
109
113
|
|
|
110
|
-
const
|
|
111
|
-
context?.component?.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
+
const parentComponent = findParentComponent(
|
|
115
|
+
context?.component?.id,
|
|
116
|
+
context?.screenData
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
const componentSource = context?.component?.data?.source;
|
|
120
|
+
|
|
121
|
+
const componentData = componentSource
|
|
122
|
+
? context.component.data
|
|
123
|
+
: parentComponent?.data;
|
|
124
|
+
|
|
125
|
+
const source = componentData?.source;
|
|
126
|
+
const mapping = componentData?.mapping;
|
|
114
127
|
|
|
115
|
-
|
|
128
|
+
let dataSource = source;
|
|
129
|
+
|
|
130
|
+
if (source && mapping) {
|
|
131
|
+
dataSource =
|
|
132
|
+
getInflatedDataSourceUrl({
|
|
133
|
+
source,
|
|
134
|
+
contexts: {
|
|
135
|
+
entry: context?.entryContext,
|
|
136
|
+
screen: context?.screenData,
|
|
137
|
+
search: getSearchContext(null, mapping),
|
|
138
|
+
},
|
|
139
|
+
mapping,
|
|
140
|
+
}) || source;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
log_info(`handleAction: refreshComponent for dataSource:${dataSource}`, {
|
|
144
|
+
source,
|
|
145
|
+
inflatedUrl: dataSource,
|
|
146
|
+
mapping,
|
|
147
|
+
entryContextId: context?.entryContext?.id,
|
|
148
|
+
entryId: context?.entry?.id,
|
|
149
|
+
});
|
|
116
150
|
|
|
117
151
|
// TODO: In theory we should wait callback to complete, before completing the action, but now it's not needed
|
|
118
152
|
// 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": "14.0.
|
|
3
|
+
"version": "14.0.37-alpha.7626825010",
|
|
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": "14.0.
|
|
30
|
+
"@applicaster/applicaster-types": "14.0.37-alpha.7626825010",
|
|
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
|
|