@applicaster/zapp-react-native-utils 12.0.0-rc.24 → 12.0.0-rc.25
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.
|
@@ -11,11 +11,9 @@ import * as QuickBrickManager from "@applicaster/zapp-react-native-bridge/QuickB
|
|
|
11
11
|
import { showConfirmationDialog } from "../alertUtils";
|
|
12
12
|
import { createCloudEvent, sendCloudEvent } from "../cloudEventsUtils";
|
|
13
13
|
import { createLogger } from "../logger";
|
|
14
|
-
import {
|
|
15
|
-
StorageMultiSelectProvider
|
|
16
|
-
} from "@applicaster/zapp-react-native-bridge/ZappStorage/StorageMultiSelectProvider";
|
|
14
|
+
import { StorageMultiSelectProvider } from "@applicaster/zapp-react-native-bridge/ZappStorage/StorageMultiSelectProvider";
|
|
17
15
|
|
|
18
|
-
const { log_error,
|
|
16
|
+
const { log_error, log_info } = createLogger({
|
|
19
17
|
subsystem: "ActionExecutorContext",
|
|
20
18
|
category: "General",
|
|
21
19
|
});
|
|
@@ -110,11 +108,17 @@ const prepareDefaultActions = (actionExecutor) => {
|
|
|
110
108
|
const tag = entry?.extensions?.tag;
|
|
111
109
|
|
|
112
110
|
if (keyNamespace && tag) {
|
|
113
|
-
const multiSelectProvider =
|
|
111
|
+
const multiSelectProvider =
|
|
112
|
+
StorageMultiSelectProvider.getProvider(keyNamespace);
|
|
114
113
|
|
|
115
114
|
const selectedItems = await multiSelectProvider.getSelectedAsync();
|
|
116
115
|
const isTagInSelectedItems = selectedItems.includes(tag);
|
|
117
|
-
|
|
116
|
+
|
|
117
|
+
log_info(
|
|
118
|
+
`handleAction: localStorageToggleFlag event will ${
|
|
119
|
+
isTagInSelectedItems ? "remove" : "add"
|
|
120
|
+
} tag: ${tag} for keyNamespace: ${keyNamespace}, current selectedItems: ${selectedItems}`
|
|
121
|
+
);
|
|
118
122
|
|
|
119
123
|
if (selectedItems.includes(tag)) {
|
|
120
124
|
await multiSelectProvider.removeItem(tag);
|
|
@@ -122,13 +126,17 @@ const prepareDefaultActions = (actionExecutor) => {
|
|
|
122
126
|
await multiSelectProvider.addItem(tag);
|
|
123
127
|
}
|
|
124
128
|
} else {
|
|
125
|
-
log_error(
|
|
129
|
+
log_error(
|
|
130
|
+
"handleAction: localStorageToggleFlag event missing keyNamespace or tag",
|
|
131
|
+
{ keyNamespace, tag }
|
|
132
|
+
);
|
|
126
133
|
|
|
127
134
|
return ActionResult.Error;
|
|
128
135
|
}
|
|
129
136
|
|
|
130
137
|
return ActionResult.Success;
|
|
131
|
-
}
|
|
138
|
+
}
|
|
139
|
+
);
|
|
132
140
|
};
|
|
133
141
|
|
|
134
142
|
export const ActionExecutorContext =
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "12.0.0-rc.
|
|
3
|
+
"version": "12.0.0-rc.25",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@applicaster/applicaster-types": "12.0.0-rc.
|
|
31
|
+
"@applicaster/applicaster-types": "12.0.0-rc.25",
|
|
32
32
|
"buffer": "^5.2.1",
|
|
33
33
|
"camelize": "^1.0.0",
|
|
34
34
|
"create-react-context": "^0.2.3",
|