diff --git a/App.tsx b/App.tsx index 737352c4..52577dd4 100644 --- a/App.tsx +++ b/App.tsx @@ -21,8 +21,7 @@ import {NavigationContainer} from '@react-navigation/native'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; import Widget from './src/components/form'; import {navigationRef} from './src/components/utlis/navigationUtlis'; -import {GenericStyles} from './RN-UI-LIB/src/styles'; -import FullScreenLoader from './RN-UI-LIB/src/components/FullScreenLoader'; +import FullScreenLoader from 'RN-UI-LIB/src/components/FullScreenLoader'; function HomeScreen() { return ( diff --git a/RN-UI-LIB b/RN-UI-LIB index 92c6ab31..7bb6e0ed 160000 --- a/RN-UI-LIB +++ b/RN-UI-LIB @@ -1 +1 @@ -Subproject commit 92c6ab3156943408d908a98c4ba30a42385fff16 +Subproject commit 7bb6e0edb3b991e29f728d457c658b033acf2dfd diff --git a/package.json b/package.json index c78cb211..21686e06 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "AVAPP", + "name": "AV_APP", "version": "0.0.1", "private": true, "scripts": { diff --git a/src/components/form/components/CheckboxGroup.tsx b/src/components/form/components/CheckboxGroup.tsx index 5dc034f9..8f50b5a7 100644 --- a/src/components/form/components/CheckboxGroup.tsx +++ b/src/components/form/components/CheckboxGroup.tsx @@ -1,7 +1,7 @@ import {StyleSheet, View} from 'react-native'; import React from 'react'; -import RNCheckboxGroup from '../../../../RN-UI-LIB/src/components/chechbox/CheckboxGroup'; -import {ICheckboxOption} from '../../../../RN-UI-LIB/src/components/chechbox/types'; +import RNCheckboxGroup from 'RN-UI-LIB/src/components/chechbox/CheckboxGroup'; +import {ICheckboxOption} from 'RN-UI-LIB/src/components/chechbox/types'; interface ICheckboxGroup { onSelectionChange: (val: ICheckboxOption[] | null) => void; diff --git a/src/components/form/index.tsx b/src/components/form/index.tsx index b709cad8..37f79612 100644 --- a/src/components/form/index.tsx +++ b/src/components/form/index.tsx @@ -3,12 +3,12 @@ import {useForm} from 'react-hook-form'; import {Pressable, ScrollView, StyleSheet, View} from 'react-native'; import {SafeAreaView} from 'react-native-safe-area-context'; import {useDispatch, useSelector} from 'react-redux'; -import Button from '../../../RN-UI-LIB/src/components/Button'; -import Heading from '../../../RN-UI-LIB/src/components/Heading'; -import Text from '../../../RN-UI-LIB/src/components/Text'; -import CloseIcon from '../../../RN-UI-LIB/src/Icons/CloseIcon'; -import {GenericStyles, getShadowStyle} from '../../../RN-UI-LIB/src/styles'; -import {COLORS} from '../../../RN-UI-LIB/src/styles/colors'; +import Button from 'RN-UI-LIB/src/components/Button'; +import Heading from 'RN-UI-LIB/src/components/Heading'; +import Text from 'RN-UI-LIB/src/components/Text'; +import CloseIcon from 'RN-UI-LIB/src/Icons/CloseIcon'; +import {GenericStyles, getShadowStyle} from 'RN-UI-LIB/src/styles'; +import {COLORS} from 'RN-UI-LIB/src/styles/colors'; import template from '../../data/templateData.json'; import { updateInteraction, diff --git a/src/components/formRenderingEngine/index.tsx b/src/components/formRenderingEngine/index.tsx index ff7aec1c..858eae5e 100644 --- a/src/components/formRenderingEngine/index.tsx +++ b/src/components/formRenderingEngine/index.tsx @@ -1,7 +1,7 @@ import React, {useMemo} from 'react'; import {Button, Pressable, Text, View} from 'react-native'; import {useDispatch, useSelector} from 'react-redux'; -import {GenericStyles} from '../../../RN-UI-LIB/src/styles'; +import {GenericStyles} from 'RN-UI-LIB/src/styles'; import {increaseByOne} from '../../reducer/caseReducre'; import {RootState} from '../../store/store'; import {navigateToScreen} from '../utlis/navigationUtlis'; diff --git a/src/components/utlis/navigationUtlis.ts b/src/components/utlis/navigationUtlis.ts index e2d687ea..c4553614 100644 --- a/src/components/utlis/navigationUtlis.ts +++ b/src/components/utlis/navigationUtlis.ts @@ -1,31 +1,31 @@ -import {StackActions} from '@react-navigation/native'; -import React, {RefObject} from 'react'; +import { StackActions } from '@react-navigation/native'; +import React, { RefObject } from 'react'; export const navigationRef: RefObject = React.createRef(); // if screen already exists then navigate to it otherwise push screen -export function navigateToScreen(name: string, params: object = {}) { +export const navigateToScreen = (name: string, params: object = {}) => { navigationRef.current?.navigate(name, params); } // push a new screen on top of stack -export function pushToScreen(name: string, params: object = {}) { +export const pushToScreen = (name: string, params: object = {}) => { navigationRef.current?.dispatch(StackActions.push(name, params)); } -export function popToScreen(count: number) { +export const popToScreen = (count: number) => { navigationRef.current?.dispatch(StackActions.pop(count)); } -export function goBack() { +export const goBack = () => { navigationRef.current?.goBack(); } -export function resetNavigation(params: { +export const resetNavigation = (params: { routes: Array<{ name: string; }>; index: number | undefined; -}) { +}) => { navigationRef.current?.reset(params); } diff --git a/tsconfig.json b/tsconfig.json index a98b4680..a4d15ba4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,10 @@ // prettier-ignore { - "extends": "@tsconfig/react-native/tsconfig.json", /* Recommended React Native TSConfig base */ + "extends": "@tsconfig/react-native/tsconfig.json", /* Recommended React Native TSConfig base */ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Completeness */ - "skipLibCheck": true, /* Skip type checking all .d.ts files. */ - "paths": { - "@navi/RN-UI/*":[ - "./RN-UI-LIB/src/componets/*" - ] - } + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ } } diff --git a/yarn.lock b/yarn.lock index 29719b49..f397d9c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2133,6 +2133,17 @@ babel-plugin-jest-hoist@^26.6.2: "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" +babel-plugin-module-resolver@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-4.1.0.tgz#22a4f32f7441727ec1fbf4967b863e1e3e9f33e2" + integrity sha512-MlX10UDheRr3lb3P0WcaIdtCSRlxdQsB1sBqL7W0raF070bGl1HQQq5K3T2vf2XAYie+ww+5AKC/WrkjRO2knA== + dependencies: + find-babel-config "^1.2.0" + glob "^7.1.6" + pkg-up "^3.1.0" + reselect "^4.0.0" + resolve "^1.13.1" + babel-plugin-polyfill-corejs2@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz#5d1bd3836d0a19e1b84bbf2d9640ccb6f951c122" @@ -3532,6 +3543,14 @@ finalhandler@1.1.2: statuses "~1.5.0" unpipe "~1.0.0" +find-babel-config@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-1.2.0.tgz#a9b7b317eb5b9860cda9d54740a8c8337a2283a2" + integrity sha512-jB2CHJeqy6a820ssiqwrKMeyC6nNdmrcgkKWJWmpoxpE8RKciYJXCcXRq1h2AzCo5I5BJeN2tkGEO3hLTuePRA== + dependencies: + json5 "^0.5.1" + path-exists "^3.0.0" + find-cache-dir@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" @@ -3755,7 +3774,7 @@ glob@7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: +glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -4924,6 +4943,11 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw== + json5@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" @@ -6022,6 +6046,13 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pkg-up@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" + integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== + dependencies: + find-up "^3.0.0" + plist@^3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.6.tgz#7cfb68a856a7834bca6dbfe3218eb9c7740145d3" @@ -6475,7 +6506,7 @@ requires-port@^1.0.0: resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== -reselect@^4.1.7: +reselect@^4.0.0, reselect@^4.1.7: version "4.1.7" resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.1.7.tgz#56480d9ff3d3188970ee2b76527bd94a95567a42" integrity sha512-Zu1xbUt3/OPwsXL46hvOOoQrap2azE7ZQbokq61BQfiXvhewsKDwhMeZjTX9sX0nvw1t/U5Audyn1I9P/m9z0A== @@ -6507,7 +6538,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== -resolve@^1.10.0, resolve@^1.14.2, resolve@^1.18.1, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.3.2: +resolve@^1.10.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.18.1, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.3.2: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==