@jescon-technologies/react-native-ui-kit 0.0.7 → 0.0.8

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.
package/.gitattributes ADDED
@@ -0,0 +1,2 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -1,3 +1,2 @@
1
- import ErrorBoundary from './src/Common/ErrorBoundary';
2
- export default ErrorBoundary;
3
- //# sourceMappingURL=index.d.ts.map
1
+ import ErrorBoundary from './src/Common/ErrorBoundary';
2
+ export default ErrorBoundary;
package/index.js ADDED
@@ -0,0 +1 @@
1
+ export { default as ErrorBoundary } from './src/Common/ErrorBoundary';
package/package.json CHANGED
@@ -1,12 +1,10 @@
1
1
  {
2
2
  "name": "@jescon-technologies/react-native-ui-kit",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "A React Native module for Jescon Technologies that provides react-native-ui-kit",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
5
+ "main": "index.js",
6
+ "types": "index.d.ts",
7
7
  "scripts": {
8
- "build": "tsc",
9
- "prepublishOnly": "npm run build",
10
8
  "test": "echo \"Error: no test specified\" && exit 1"
11
9
  },
12
10
  "keywords": [
@@ -24,17 +22,7 @@
24
22
  "url": "https://github.com/dpraful/react-native-ui-kit/issues"
25
23
  },
26
24
  "devDependencies": {
27
- "@types/react": "^19.2.14",
28
- "@types/react-native": "^0.72.8",
29
- "typescript": "^5.0.0"
30
- },
31
- "peerDependencies": {
32
25
  "react": "^18.0.0",
33
26
  "react-native": "^0.69.0"
34
- },
35
- "files": [
36
- "dist",
37
- "LICENSE",
38
- "README.md"
39
- ]
40
- }
27
+ }
28
+ }
@@ -0,0 +1,73 @@
1
+ import React, { ErrorInfo, ReactNode } from 'react';
2
+ import { Button, StyleSheet, Text, View, Image } from 'react-native';
3
+ import { notifyMessage } from '../CommonStyle/ComponentFunctions';
4
+ import { normalize } from '../CommonStyle/componentStyle';
5
+
6
+ interface Props {
7
+ children: ReactNode;
8
+ }
9
+
10
+ interface State {
11
+ hasError: boolean;
12
+ }
13
+
14
+ class ErrorBoundary extends React.Component<Props, State> {
15
+ constructor(props: Props) {
16
+ super(props);
17
+ this.state = { hasError: false };
18
+ }
19
+
20
+ static getDerivedStateFromError(_: Error): State {
21
+ // Update state so the next render will show the fallback UI.
22
+ return { hasError: true };
23
+ }
24
+
25
+ componentDidCatch(error: Error, errorInfo: ErrorInfo) {
26
+ // You can also log the error to an error reporting service
27
+ // console.log('componentDidCatch ', error, ' ', errorInfo);
28
+ notifyMessage("ERROR : " + error + ' ' + errorInfo, 2)
29
+ }
30
+
31
+ render() {
32
+ if (this.state.hasError) {
33
+ // You can render any custom fallback UI
34
+ return (
35
+ <View style={styles.container}>
36
+ <View style={{ width: '100%', }}>
37
+ <Image
38
+ source={{ uri: "https://t4.ftcdn.net/jpg/05/24/04/51/360_F_524045110_UXnCx4GEDapddDi5tdlY96s4g0MxHRvt.jpg" }}
39
+ resizeMode="cover" style={{ height: normalize(200) }} />
40
+ </View>
41
+ <Text style={styles.message}>
42
+ Something went wrong.{'\n'} Our team has taken a note of this issue.
43
+ </Text>
44
+ {/* <Button
45
+ title="Try Again"
46
+ onPress={() => CodePush.restartApp()}
47
+ /> */}
48
+
49
+ </View>
50
+ );
51
+ }
52
+
53
+ return this.props.children;
54
+ }
55
+ }
56
+
57
+ export default ErrorBoundary;
58
+
59
+ const styles = StyleSheet.create({
60
+ container: {
61
+ flex: 1,
62
+ justifyContent: 'center',
63
+ alignItems: 'center',
64
+ backgroundColor: '#fff'
65
+ },
66
+ message: {
67
+ fontSize: normalize(16),
68
+ color: 'black',
69
+ marginBottom: 20,
70
+ textAlign: 'center',
71
+ paddingHorizontal: 10,
72
+ },
73
+ });
@@ -1,15 +0,0 @@
1
- import React, { ErrorInfo, ReactNode } from 'react';
2
- interface Props {
3
- children: ReactNode;
4
- }
5
- interface State {
6
- hasError: boolean;
7
- }
8
- declare class ErrorBoundary extends React.Component<Props, State> {
9
- constructor(props: Props);
10
- static getDerivedStateFromError(_: Error): State;
11
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
12
- render(): any;
13
- }
14
- export default ErrorBoundary;
15
- //# sourceMappingURL=ErrorBoundary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/Common/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWpD,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,cAAM,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBAC3C,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK;IAKhD,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;IAMpD,MAAM;CAwBP;AAED,eAAe,aAAa,CAAC"}
@@ -1,64 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
7
- const react_native_1 = require("react-native");
8
- const normalize = (size) => size;
9
- const notifyMessage = (message, type) => {
10
- if (__DEV__) {
11
- console.warn(message, type);
12
- }
13
- };
14
- class ErrorBoundary extends react_1.default.Component {
15
- constructor(props) {
16
- super(props);
17
- this.state = { hasError: false };
18
- }
19
- static getDerivedStateFromError(_) {
20
- // Update state so the next render will show the fallback UI.
21
- return { hasError: true };
22
- }
23
- componentDidCatch(error, errorInfo) {
24
- // You can also log the error to an error reporting service
25
- // console.log('componentDidCatch ', error, ' ', errorInfo);
26
- notifyMessage("ERROR : " + error + ' ' + errorInfo, 2);
27
- }
28
- render() {
29
- if (this.state.hasError) {
30
- // You can render any custom fallback UI
31
- return (<react_native_1.View style={styles.container}>
32
- <react_native_1.View style={{ width: '100%', }}>
33
- <react_native_1.Image source={{ uri: "https://t4.ftcdn.net/jpg/05/24/04/51/360_F_524045110_UXnCx4GEDapddDi5tdlY96s4g0MxHRvt.jpg" }} resizeMode="cover" style={{ height: normalize(200) }}/>
34
- </react_native_1.View>
35
- <react_native_1.Text style={styles.message}>
36
- Something went wrong.{'\n'} Our team has taken a note of this issue.
37
- </react_native_1.Text>
38
- {/* <Button
39
- title="Try Again"
40
- onPress={() => CodePush.restartApp()}
41
- /> */}
42
-
43
- </react_native_1.View>);
44
- }
45
- return this.props.children;
46
- }
47
- }
48
- exports.default = ErrorBoundary;
49
- const styles = react_native_1.StyleSheet.create({
50
- container: {
51
- flex: 1,
52
- justifyContent: 'center',
53
- alignItems: 'center',
54
- backgroundColor: '#fff'
55
- },
56
- message: {
57
- fontSize: normalize(16),
58
- color: 'black',
59
- marginBottom: 20,
60
- textAlign: 'center',
61
- paddingHorizontal: 10,
62
- },
63
- });
64
- //# sourceMappingURL=ErrorBoundary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/Common/ErrorBoundary.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAoD;AACpD,+CAA6D;AAE7D,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC;AAEzC,MAAM,aAAa,GAAG,CAAC,OAAe,EAAE,IAAa,EAAE,EAAE;IACvD,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC,CAAC;AAUF,MAAM,aAAc,SAAQ,eAAK,CAAC,SAAuB;IACvD,YAAY,KAAY;QACtB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAA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AAU,EAAE,QAAQ;QACpB,eAAe,EAAE,MAAM;KACxB;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,SAAS,CAAC,EAAE,CAAC;QACvB,KAAK,EAAE,OAAO;QACd,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,QAAQ;QACnB,iBAAiB,EAAE,EAAE;KACtB;CACF,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,eAAe,aAAa,CAAC"}
package/dist/index.js DELETED
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const ErrorBoundary_1 = __importDefault(require("./src/Common/ErrorBoundary"));
7
- exports.default = ErrorBoundary_1.default;
8
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;AAAA,+EAAuD;AACvD,kBAAe,uBAAa,CAAC"}
@@ -1,15 +0,0 @@
1
- import React, { ErrorInfo, ReactNode } from 'react';
2
- interface Props {
3
- children: ReactNode;
4
- }
5
- interface State {
6
- hasError: boolean;
7
- }
8
- declare class ErrorBoundary extends React.Component<Props, State> {
9
- constructor(props: Props);
10
- static getDerivedStateFromError(_: Error): State;
11
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
12
- render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
13
- }
14
- export default ErrorBoundary;
15
- //# sourceMappingURL=ErrorBoundary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/Common/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAapD,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,cAAM,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBAC3C,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK;IAKhD,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;IAMpD,MAAM;CAwBP;AAED,eAAe,aAAa,CAAC"}
@@ -1,64 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
7
- const react_native_1 = require("react-native");
8
- const normalize = (size) => size;
9
- const notifyMessage = (message, type) => {
10
- if (__DEV__) {
11
- console.warn(message, type);
12
- }
13
- };
14
- class ErrorBoundary extends react_1.default.Component {
15
- constructor(props) {
16
- super(props);
17
- this.state = { hasError: false };
18
- }
19
- static getDerivedStateFromError(_) {
20
- // Update state so the next render will show the fallback UI.
21
- return { hasError: true };
22
- }
23
- componentDidCatch(error, errorInfo) {
24
- // You can also log the error to an error reporting service
25
- // console.log('componentDidCatch ', error, ' ', errorInfo);
26
- notifyMessage("ERROR : " + error + ' ' + errorInfo, 2);
27
- }
28
- render() {
29
- if (this.state.hasError) {
30
- // You can render any custom fallback UI
31
- return (<react_native_1.View style={styles.container}>
32
- <react_native_1.View style={{ width: '100%', }}>
33
- <react_native_1.Image source={{ uri: "https://t4.ftcdn.net/jpg/05/24/04/51/360_F_524045110_UXnCx4GEDapddDi5tdlY96s4g0MxHRvt.jpg" }} resizeMode="cover" style={{ height: normalize(200) }}/>
34
- </react_native_1.View>
35
- <react_native_1.Text style={styles.message}>
36
- Something went wrong.{'\n'} Our team has taken a note of this issue.
37
- </react_native_1.Text>
38
- {/* <Button
39
- title="Try Again"
40
- onPress={() => CodePush.restartApp()}
41
- /> */}
42
-
43
- </react_native_1.View>);
44
- }
45
- return this.props.children;
46
- }
47
- }
48
- exports.default = ErrorBoundary;
49
- const styles = react_native_1.StyleSheet.create({
50
- container: {
51
- flex: 1,
52
- justifyContent: 'center',
53
- alignItems: 'center',
54
- backgroundColor: '#fff'
55
- },
56
- message: {
57
- fontSize: normalize(16),
58
- color: 'black',
59
- marginBottom: 20,
60
- textAlign: 'center',
61
- paddingHorizontal: 10,
62
- },
63
- });
64
- //# sourceMappingURL=ErrorBoundary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/Common/ErrorBoundary.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAoD;AACpD,+CAA6D;AAI7D,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC;AAEzC,MAAM,aAAa,GAAG,CAAC,OAAe,EAAE,IAAa,EAAE,EAAE;IACvD,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC,CAAC;AAUF,MAAM,aAAc,SAAQ,eAAK,CAAC,SAAuB;IACvD,YAAY,KAAY;QACtB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,CAAQ;QACtC,6DAA6D;QAC7D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;IA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