@applicaster/zapp-react-native-ui-components 12.0.2 → 13.0.0-alpha.1102149799

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.
@@ -14,10 +14,7 @@ import { BaseFocusable } from "../BaseFocusable";
14
14
  import { AccessibilityManager } from "@applicaster/zapp-react-native-utils/appUtils/accessibilityManager";
15
15
 
16
16
  type Props = {
17
- item: {
18
- id: string;
19
- title: string;
20
- };
17
+ item: ZappEntry;
21
18
  index: number;
22
19
  shouldScrollHorizontally: (arg1: [any]) => boolean | null | undefined;
23
20
  shouldScrollVertically: (...args: any) => boolean | null | undefined;
@@ -33,10 +30,9 @@ type Props = {
33
30
  id: string;
34
31
  };
35
32
  selected?: boolean;
36
- CellRenderer: React.ComponentType<{
37
- item: any;
38
- state: string;
39
- }> & { hasFocusableInside: (item: Record<string, string>) => boolean };
33
+ CellRenderer: React.FunctionComponent<any> & {
34
+ hasFocusableInside: (item: ZappEntry) => boolean;
35
+ };
40
36
  preferredFocus: boolean;
41
37
  navigator: {
42
38
  push: (arg1: Record<any, any>) => void;
@@ -46,7 +46,7 @@ const useCellFocusedState = (
46
46
 
47
47
  type Props = {
48
48
  item: ZappEntry;
49
- CellRenderer: React.ComponentType<{ item: Object; state: string }>;
49
+ CellRenderer: React.FunctionComponent<any>;
50
50
  id: string;
51
51
  groupId: string;
52
52
  onFocus: Function;
@@ -36,10 +36,9 @@ type Props = {
36
36
  component_type: string;
37
37
  };
38
38
  selected: boolean;
39
- CellRenderer: React.ComponentType<{
40
- item: any;
41
- state: string;
42
- }> & { hasFocusableInside: (item: any) => boolean };
39
+ CellRenderer: React.FunctionComponent<any> & {
40
+ hasFocusableInside: (item: any) => boolean;
41
+ };
43
42
  preferredFocus: boolean;
44
43
  navigator: {
45
44
  push: (arg1: Record<any, any>) => void;
@@ -1,10 +1,12 @@
1
1
  import { requireNativeComponent, View } from "react-native";
2
2
  import { isAppleTV } from "@applicaster/zapp-react-native-ui-components/Helpers/Platform";
3
3
 
4
+ // @TODO define the types
4
5
  export const FocusableGroupNative = isAppleTV()
5
- ? requireNativeComponent("FocusableGroupViewModule", null)
6
+ ? requireNativeComponent<any>("FocusableGroupViewModule")
6
7
  : View;
7
8
 
9
+ // @TODO define the types
8
10
  export const FocusableItemNative = isAppleTV()
9
- ? requireNativeComponent("FocusableViewModule", null)
11
+ ? requireNativeComponent<any>("FocusableViewModule")
10
12
  : View;
@@ -5,18 +5,18 @@ import { usePickFromState } from "@applicaster/zapp-react-native-redux/hooks";
5
5
 
6
6
  type ComponentProps = {
7
7
  component: {
8
- id: string,
9
- rules: { item_limit: number, component_cells_selectable: boolean },
10
- component_type: string,
8
+ id: string;
9
+ rules: { item_limit: number; component_cells_selectable: boolean };
10
+ component_type: string;
11
11
  styles: {
12
- cell_style: string,
13
- header: { visible: boolean },
14
- component_cells_selectable: boolean,
15
- },
16
- },
17
- zappPipesData: { url: string, data: { title: string } },
18
- selected: boolean,
19
- assets: { menu_button: string },
12
+ cell_style: string;
13
+ header: { visible: boolean };
14
+ component_cells_selectable: boolean;
15
+ };
16
+ };
17
+ zappPipesData: { url: string; data: { title: string } };
18
+ selected: boolean;
19
+ assets: { menu_button: string };
20
20
  };
21
21
 
22
22
  function withAnalytics(Component) {
package/README.md CHANGED
@@ -78,17 +78,6 @@ export default MyAwesomeComponent;
78
78
  export { MyAwesomeComponent } from "./MyAwesomeComponent";
79
79
  ```
80
80
 
81
- We provide flow types for component props - please use it to make sure your component will be compliant
82
-
83
- ```javascript
84
- import * as React from "react";
85
- import type { ZappComponentProps } from "../../flow-types"; // in the root of the project
86
-
87
- export class MyComponent extends React.Component<ZappComponentProps> {
88
- /* ... */
89
- }
90
- ```
91
-
92
81
  ## Connecting my component to Zapp Pipes
93
82
 
94
83
  Zapp App components rely on [Zapp-Pipes](https://github.com/applicaster/zapp-pipes) to load data.
@@ -100,10 +89,9 @@ In order to connect your component to ZappPipes, you simply need to use the `Zap
100
89
  import * as React from "react";
101
90
  import { View, Text } from "react-native";
102
91
  import { zappPipesDataConnector } from "../ZappPipesDataConnector";
103
- import type { ZappComponentProps } from "../../flow-types";
104
92
 
105
93
  @zappPipesDataConnector
106
- export class MyComponent extends React.Component<ZappComponentProps> {
94
+ export class MyComponent extends React.Component {
107
95
  renderComponent = (data) => {
108
96
  return (
109
97
  <View>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "12.0.2",
3
+ "version": "13.0.0-alpha.1102149799",
4
4
  "description": "Applicaster Zapp React Native ui components for the Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -34,20 +34,26 @@
34
34
  "redux-mock-store": "^1.5.3"
35
35
  },
36
36
  "dependencies": {
37
- "@applicaster/applicaster-types": "12.0.2",
38
- "@applicaster/zapp-react-native-bridge": "12.0.2",
39
- "@applicaster/zapp-react-native-redux": "12.0.2",
40
- "@applicaster/zapp-react-native-utils": "12.0.2",
37
+ "@applicaster/applicaster-types": "13.0.0-alpha.1102149799",
38
+ "@applicaster/zapp-react-native-bridge": "13.0.0-alpha.1102149799",
39
+ "@applicaster/zapp-react-native-redux": "13.0.0-alpha.1102149799",
40
+ "@applicaster/zapp-react-native-utils": "13.0.0-alpha.1102149799",
41
41
  "promise": "^8.3.0",
42
42
  "react-router-native": "^5.1.2",
43
43
  "url": "^0.11.0",
44
44
  "uuid": "^3.3.2"
45
45
  },
46
46
  "peerDependencies": {
47
+ "@applicaster/zapp-pipes-v2-client": "*",
47
48
  "@react-native-community/netinfo": "*",
49
+ "@types/node": "*",
50
+ "immer": "*",
48
51
  "react": "17.0.2",
49
52
  "react-native": "0.68.6",
50
53
  "react-native-safe-area-context": "*",
51
- "react-native-svg": "*"
54
+ "react-native-svg": "*",
55
+ "uglify-js": "*",
56
+ "validate-color": "*",
57
+ "zustand": "*"
52
58
  }
53
59
  }