@applicaster/zapp-react-native-utils 13.0.0-alpha.3322585145 → 13.0.0-alpha.3332871333
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.
|
@@ -26,8 +26,6 @@ import {
|
|
|
26
26
|
useContentTypes,
|
|
27
27
|
usePickFromState,
|
|
28
28
|
} from "@applicaster/zapp-react-native-redux/hooks";
|
|
29
|
-
import { TOGGLE_FLAG_MAX_ITEMS_REACHED_EVENT } from "./consts";
|
|
30
|
-
import { postEvent } from "../reactHooks/useSubscriberFor";
|
|
31
29
|
|
|
32
30
|
export const { log_error, log_info, log_debug } = createLogger({
|
|
33
31
|
subsystem: "ActionExecutorContext",
|
|
@@ -76,19 +74,6 @@ function findParentComponent(
|
|
|
76
74
|
return null;
|
|
77
75
|
}
|
|
78
76
|
|
|
79
|
-
// send all data just in case (like for message string formatting)
|
|
80
|
-
// Type is not exported for now
|
|
81
|
-
type MaxTagsReachedEvent = {
|
|
82
|
-
selectedItems: string[];
|
|
83
|
-
maxItems: number;
|
|
84
|
-
tag: string;
|
|
85
|
-
keyNamespace: string;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
async function onMaxTagsReached(data: MaxTagsReachedEvent) {
|
|
89
|
-
postEvent(TOGGLE_FLAG_MAX_ITEMS_REACHED_EVENT, [data]);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
77
|
const prepareDefaultActions = (actionExecutor) => {
|
|
93
78
|
actionExecutor.registerAction("localStorageSet", async (action) => {
|
|
94
79
|
const namespaces = action.options.content;
|
|
@@ -256,13 +241,6 @@ const prepareDefaultActions = (actionExecutor) => {
|
|
|
256
241
|
`handleAction: localStorageToggleFlag event reached max items limit: ${maxItems}, cannot add tag: ${tag}`
|
|
257
242
|
);
|
|
258
243
|
|
|
259
|
-
await onMaxTagsReached({
|
|
260
|
-
selectedItems,
|
|
261
|
-
maxItems,
|
|
262
|
-
tag,
|
|
263
|
-
keyNamespace,
|
|
264
|
-
});
|
|
265
|
-
|
|
266
244
|
return ActionResult.Cancel;
|
|
267
245
|
}
|
|
268
246
|
|
|
@@ -65,6 +65,12 @@ export function getUILanguage() {
|
|
|
65
65
|
return getLanguageCode();
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
/**
|
|
69
|
+
* fallback to en for missing dayjslocalization
|
|
70
|
+
* converts the locale code to a dayjs compatible locale code
|
|
71
|
+
* lowercase input code is expected, e.g. "en-GB" => "en-gb"
|
|
72
|
+
* @param {string} code - locale code, e.g. "en", "fr", "es-LA"
|
|
73
|
+
* */
|
|
68
74
|
export const toDayJSLocaleMap = (code) => {
|
|
69
75
|
const map = {
|
|
70
76
|
hy: "hy-am",
|
|
@@ -73,10 +79,11 @@ export const toDayJSLocaleMap = (code) => {
|
|
|
73
79
|
no: null,
|
|
74
80
|
pa: "pa-in",
|
|
75
81
|
qu: null,
|
|
76
|
-
"es-LA": "es",
|
|
77
82
|
sm: null,
|
|
78
83
|
to: null,
|
|
79
84
|
xh: null,
|
|
85
|
+
"es-LA": "es",
|
|
86
|
+
"en-UK": "en-gb",
|
|
80
87
|
};
|
|
81
88
|
|
|
82
89
|
if (map[code] === null) {
|
|
@@ -251,19 +251,6 @@ const generalContent = () => ({
|
|
|
251
251
|
key: "screen_title",
|
|
252
252
|
initial_value: null,
|
|
253
253
|
},
|
|
254
|
-
{
|
|
255
|
-
type: "text_input",
|
|
256
|
-
label: "Maximum Selection Reached - Alert Description",
|
|
257
|
-
key: "msg_maximum_selection_reached_message",
|
|
258
|
-
initial_value:
|
|
259
|
-
"You’ve reached the maximum number of items you can select.",
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
type: "text_input",
|
|
263
|
-
label: "Maximum Selection Reached - Alert Button",
|
|
264
|
-
key: "msg_maximum_selection_reached_message_ok_button",
|
|
265
|
-
initial_value: "Got it",
|
|
266
|
-
},
|
|
267
254
|
],
|
|
268
255
|
},
|
|
269
256
|
advertising: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "13.0.0-alpha.
|
|
3
|
+
"version": "13.0.0-alpha.3332871333",
|
|
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": "13.0.0-alpha.
|
|
30
|
+
"@applicaster/applicaster-types": "13.0.0-alpha.3332871333",
|
|
31
31
|
"buffer": "^5.2.1",
|
|
32
32
|
"camelize": "^1.0.0",
|
|
33
33
|
"dayjs": "^1.11.10",
|