@applicaster/zapp-react-native-utils 13.0.0-rc.101 → 13.0.0-rc.103
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,6 +26,8 @@ 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";
|
|
29
31
|
|
|
30
32
|
export const { log_error, log_info, log_debug } = createLogger({
|
|
31
33
|
subsystem: "ActionExecutorContext",
|
|
@@ -74,6 +76,19 @@ function findParentComponent(
|
|
|
74
76
|
return null;
|
|
75
77
|
}
|
|
76
78
|
|
|
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
|
+
|
|
77
92
|
const prepareDefaultActions = (actionExecutor) => {
|
|
78
93
|
actionExecutor.registerAction("localStorageSet", async (action) => {
|
|
79
94
|
const namespaces = action.options.content;
|
|
@@ -241,6 +256,13 @@ const prepareDefaultActions = (actionExecutor) => {
|
|
|
241
256
|
`handleAction: localStorageToggleFlag event reached max items limit: ${maxItems}, cannot add tag: ${tag}`
|
|
242
257
|
);
|
|
243
258
|
|
|
259
|
+
await onMaxTagsReached({
|
|
260
|
+
selectedItems,
|
|
261
|
+
maxItems,
|
|
262
|
+
tag,
|
|
263
|
+
keyNamespace,
|
|
264
|
+
});
|
|
265
|
+
|
|
244
266
|
return ActionResult.Cancel;
|
|
245
267
|
}
|
|
246
268
|
|
|
@@ -251,6 +251,19 @@ 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
|
+
},
|
|
254
267
|
],
|
|
255
268
|
},
|
|
256
269
|
advertising: {
|
package/manifestUtils/keys.js
CHANGED
|
@@ -21,7 +21,14 @@ const ZAPPIFEST_FIELDS = {
|
|
|
21
21
|
},
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
const
|
|
24
|
+
const TV_PLATFORMS_FOR_FONTS = [
|
|
25
|
+
"tvOS",
|
|
26
|
+
"android",
|
|
27
|
+
"LG",
|
|
28
|
+
"samsung",
|
|
29
|
+
"roku",
|
|
30
|
+
"vizio",
|
|
31
|
+
];
|
|
25
32
|
|
|
26
33
|
const MOBILE_PLATFORMS = [
|
|
27
34
|
"ios",
|
|
@@ -30,6 +37,15 @@ const MOBILE_PLATFORMS = [
|
|
|
30
37
|
"android_for_quickbrick",
|
|
31
38
|
];
|
|
32
39
|
|
|
40
|
+
const TV_PLATFORMS = [
|
|
41
|
+
"android_tv_for_quickbrick",
|
|
42
|
+
"amazon_fire_tv_for_quickbrick",
|
|
43
|
+
"tvos_for_quickbrick",
|
|
44
|
+
"samsung_tv",
|
|
45
|
+
"lg_tv",
|
|
46
|
+
"vizio",
|
|
47
|
+
];
|
|
48
|
+
|
|
33
49
|
const FontPropsForTVPlatform = (platform) => ({
|
|
34
50
|
[`${R.toLower(platform)}FontFamily`]: {
|
|
35
51
|
name: `${platform} font family`,
|
|
@@ -99,7 +115,7 @@ const TV_FONT_KEY_DATA = {
|
|
|
99
115
|
name: "focused font color",
|
|
100
116
|
type: ZAPPIFEST_FIELDS.color_picker,
|
|
101
117
|
},
|
|
102
|
-
...R.reduce(addTVFontsForPlatform, {},
|
|
118
|
+
...R.reduce(addTVFontsForPlatform, {}, TV_PLATFORMS_FOR_FONTS),
|
|
103
119
|
textAlignment: {
|
|
104
120
|
name: "text alignment",
|
|
105
121
|
type: ZAPPIFEST_FIELDS.select,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "13.0.0-rc.
|
|
3
|
+
"version": "13.0.0-rc.103",
|
|
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-rc.
|
|
30
|
+
"@applicaster/applicaster-types": "13.0.0-rc.103",
|
|
31
31
|
"buffer": "^5.2.1",
|
|
32
32
|
"camelize": "^1.0.0",
|
|
33
33
|
"dayjs": "^1.11.10",
|