@applicaster/zapp-react-native-utils 16.0.0-rc.27 → 16.0.0-rc.29
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.
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
} from "./ActionExecutor";
|
|
8
8
|
import {
|
|
9
9
|
batchRemoveAllFromNamespaceForStorage,
|
|
10
|
+
batchRemoveFromStorage,
|
|
10
11
|
batchSave,
|
|
11
12
|
} from "../zappFrameworkUtils/localStorageHelper";
|
|
12
13
|
import { sessionStorage } from "@applicaster/zapp-react-native-bridge/ZappStorage/SessionStorage";
|
|
@@ -38,6 +39,10 @@ import {
|
|
|
38
39
|
} from "./StorageActions";
|
|
39
40
|
|
|
40
41
|
import { screenSetVariable, screenToggleFlag } from "./ScreenActions";
|
|
42
|
+
import {
|
|
43
|
+
StorageValuesToAdd,
|
|
44
|
+
StorageValuesToRemove,
|
|
45
|
+
} from "../zappFrameworkUtils/types";
|
|
41
46
|
|
|
42
47
|
export const { log_error, log_info, log_debug } = createLogger({
|
|
43
48
|
subsystem: "ActionExecutorContext",
|
|
@@ -89,7 +94,7 @@ function findParentComponent(
|
|
|
89
94
|
|
|
90
95
|
const prepareDefaultActions = (actionExecutor) => {
|
|
91
96
|
actionExecutor.registerAction("localStorageSet", async (action) => {
|
|
92
|
-
const namespaces = action.options.content;
|
|
97
|
+
const namespaces: StorageValuesToAdd = action.options.content;
|
|
93
98
|
await batchSave(namespaces, localStorage);
|
|
94
99
|
// TODO: Add support for ownershipKey and ownershipNamespace
|
|
95
100
|
|
|
@@ -97,13 +102,29 @@ const prepareDefaultActions = (actionExecutor) => {
|
|
|
97
102
|
});
|
|
98
103
|
|
|
99
104
|
actionExecutor.registerAction("sessionStorageSet", async (action) => {
|
|
100
|
-
const namespaces = action.options.content;
|
|
105
|
+
const namespaces: StorageValuesToAdd = action.options.content;
|
|
101
106
|
await batchSave(namespaces, sessionStorage);
|
|
102
107
|
// TODO: Add support for ownershipKey and ownershipNamespace
|
|
103
108
|
|
|
104
109
|
return ActionResult.Success;
|
|
105
110
|
});
|
|
106
111
|
|
|
112
|
+
actionExecutor.registerAction("localStorageRemove", async (action) => {
|
|
113
|
+
const namespaces: StorageValuesToRemove = action.options.content;
|
|
114
|
+
await batchRemoveFromStorage(namespaces, localStorage);
|
|
115
|
+
// TODO: Add support for ownershipKey and ownershipNamespace
|
|
116
|
+
|
|
117
|
+
return ActionResult.Success;
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
actionExecutor.registerAction("sessionStorageRemove", async (action) => {
|
|
121
|
+
const namespaces: StorageValuesToRemove = action.options.content;
|
|
122
|
+
await batchRemoveFromStorage(namespaces, sessionStorage);
|
|
123
|
+
// TODO: Add support for ownershipKey and ownershipNamespace
|
|
124
|
+
|
|
125
|
+
return ActionResult.Success;
|
|
126
|
+
});
|
|
127
|
+
|
|
107
128
|
actionExecutor.registerAction(
|
|
108
129
|
"refreshComponent",
|
|
109
130
|
async (_action, context) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "16.0.0-rc.
|
|
3
|
+
"version": "16.0.0-rc.29",
|
|
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": "16.0.0-rc.
|
|
30
|
+
"@applicaster/applicaster-types": "16.0.0-rc.29",
|
|
31
31
|
"buffer": "^5.2.1",
|
|
32
32
|
"camelize": "^1.0.0",
|
|
33
33
|
"dayjs": "^1.11.10",
|
|
@@ -156,5 +156,9 @@ export const ScreenLoadingMeasurementsListItemWrapper = ({
|
|
|
156
156
|
}: ItemProps) => {
|
|
157
157
|
const { onLayout } = React.useContext(MeasurementsSettersContext);
|
|
158
158
|
|
|
159
|
-
return
|
|
159
|
+
return (
|
|
160
|
+
<View style={styles.container} onLayout={onLayout?.(index)}>
|
|
161
|
+
{children}
|
|
162
|
+
</View>
|
|
163
|
+
);
|
|
160
164
|
};
|