@gaddario98/react-native-core 1.0.10 → 1.0.12

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/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # react-native-core
2
+
3
+ ## Installation
4
+
5
+ ```bash
6
+ npm install @gaddario98/native
7
+ ```
8
+
9
+ ## Usage
10
+
11
+ [Add usage examples here]
12
+
13
+ ## License
14
+
15
+ MIT
@@ -0,0 +1,2 @@
1
+ export * from '@gaddario98/react-auth';
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,13 +1,18 @@
1
1
  import { PageConfigProps } from '@gaddario98/react-native-pages';
2
+ import { setI18nInitializer, setTranslationAdapter } from '@gaddario98/react-localization';
2
3
  import { AppLinks } from '@gaddario98/react-native-utiles';
3
4
 
4
5
  interface SetReactNativeConfigProps {
5
6
  pages: Partial<PageConfigProps>;
6
- localResources: Record<string, object>;
7
7
  endpoints: Record<string, string>;
8
8
  links: Partial<AppLinks>;
9
+ localization?: {
10
+ i18nInitializer: Parameters<typeof setI18nInitializer>[0];
11
+ translationAdapter: Parameters<typeof setTranslationAdapter>[0];
12
+ localResources?: Record<string, object>;
13
+ };
9
14
  }
10
- declare const setReactNativeConfig: ({ pages, localResources, endpoints, links }: SetReactNativeConfigProps) => void;
15
+ declare const setReactNativeConfig: ({ pages, endpoints, localization, links, }: SetReactNativeConfigProps) => void;
11
16
 
12
17
  export { setReactNativeConfig };
13
18
  export type { SetReactNativeConfigProps };
@@ -0,0 +1,40 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { KeyboardAvoidingView, Platform } from 'react-native';
3
+ import { setI18nInitializer, setTranslationAdapter, initializeI18n } from '@gaddario98/react-localization';
4
+ import { setReactNativeStorage } from '@gaddario98/react-native-state';
5
+ import { setReactNativePageConfig } from '@gaddario98/react-native-pages';
6
+ import { setEndpoints } from '@gaddario98/react-queries';
7
+ import { setAppLinks } from '@gaddario98/react-native-utiles';
8
+ import { setDefaultFormContainer } from '@gaddario98/react-form';
9
+
10
+ const setReactNativeConfig = ({
11
+ pages,
12
+ endpoints,
13
+ localization,
14
+ links
15
+ }) => {
16
+ if (localization === null || localization === void 0 ? void 0 : localization.i18nInitializer) {
17
+ setI18nInitializer(localization.i18nInitializer);
18
+ }
19
+ if (localization === null || localization === void 0 ? void 0 : localization.translationAdapter) {
20
+ setTranslationAdapter(localization.translationAdapter);
21
+ }
22
+ if (localization === null || localization === void 0 ? void 0 : localization.localResources) {
23
+ initializeI18n(localization.localResources);
24
+ }
25
+ setReactNativeStorage();
26
+ setReactNativePageConfig(pages);
27
+ setEndpoints(endpoints);
28
+ setAppLinks(links);
29
+ setDefaultFormContainer(({
30
+ children
31
+ }) => {
32
+ return jsx(KeyboardAvoidingView, {
33
+ behavior: Platform.OS === "ios" ? "padding" : undefined,
34
+ children: children
35
+ });
36
+ });
37
+ };
38
+
39
+ export { setReactNativeConfig };
40
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../config/index.tsx"],"sourcesContent":["import { setReactNativeStorage } from \"../state\";\nimport { setEndpoints } from \"../queries\";\nimport { PageConfigProps, setReactNativePageConfig } from \"../pages\";\nimport {\n initializeI18n,\n setI18nInitializer,\n setTranslationAdapter,\n} from \"../localization\";\nimport { AppLinks, setAppLinks } from \"../utiles\";\nimport { KeyboardAvoidingView, Platform } from \"react-native\";\nimport { setDefaultFormContainer } from \"../form\";\n\nexport interface SetReactNativeConfigProps {\n pages: Partial<PageConfigProps>;\n endpoints: Record<string, string>;\n links: Partial<AppLinks>;\n localization?: {\n i18nInitializer: Parameters<typeof setI18nInitializer>[0];\n translationAdapter: Parameters<typeof setTranslationAdapter>[0];\n localResources?: Record<string, object>;\n };\n}\n\nexport const setReactNativeConfig = ({\n pages,\n endpoints,\n localization,\n links,\n}: SetReactNativeConfigProps) => {\n if (localization?.i18nInitializer) {\n setI18nInitializer(localization.i18nInitializer);\n }\n if (localization?.translationAdapter) {\n setTranslationAdapter(localization.translationAdapter);\n }\n if (localization?.localResources) {\n initializeI18n(localization.localResources);\n }\n setReactNativeStorage();\n setReactNativePageConfig(pages);\n setEndpoints(endpoints);\n setAppLinks(links);\n setDefaultFormContainer(({ children }) => {\n return (\n <KeyboardAvoidingView\n behavior={Platform.OS === \"ios\" ? \"padding\" : undefined}\n >\n {children}\n </KeyboardAvoidingView>\n );\n });\n};\n"],"names":["setReactNativeConfig","pages","endpoints","localization","links","i18nInitializer","setI18nInitializer","translationAdapter","setTranslationAdapter","localResources","initializeI18n","setReactNativeStorage","setReactNativePageConfig","setEndpoints","setAppLinks","setDefaultFormContainer","children","_jsx","KeyboardAvoidingView","behavior","Platform","OS","undefined"],"mappings":";;;;;;;;;AAuBO,MAAMA,oBAAoB,GAAGA,CAAC;EACnCC,KAAK;EACLC,SAAS;EACTC,YAAY;AACZC,EAAAA;AAAK,CACqB,KAAI;AAC9B,EAAA,IAAID,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CAAEE,eAAe,EAAE;AACjCC,IAAAA,kBAAkB,CAACH,YAAY,CAACE,eAAe,CAAC;AAClD,EAAA;AACA,EAAA,IAAIF,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CAAEI,kBAAkB,EAAE;AACpCC,IAAAA,qBAAqB,CAACL,YAAY,CAACI,kBAAkB,CAAC;AACxD,EAAA;AACA,EAAA,IAAIJ,YAAY,aAAZA,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZA,YAAY,CAAEM,cAAc,EAAE;AAChCC,IAAAA,cAAc,CAACP,YAAY,CAACM,cAAc,CAAC;AAC7C,EAAA;AACAE,EAAAA,qBAAqB,EAAE;EACvBC,wBAAwB,CAACX,KAAK,CAAC;EAC/BY,YAAY,CAACX,SAAS,CAAC;EACvBY,WAAW,CAACV,KAAK,CAAC;AAClBW,EAAAA,uBAAuB,CAAC,CAAC;AAAEC,IAAAA;AAAQ,GAAE,KAAI;IACvC,OACEC,IAACC,oBAAoB,EAAA;MACnBC,QAAQ,EAAEC,QAAQ,CAACC,EAAE,KAAK,KAAK,GAAG,SAAS,GAAGC,SAAS;AAAAN,MAAAA,QAAA,EAEtDA;AAAQ,KAAA,CACY;AAE3B,EAAA,CAAC,CAAC;AACJ;;;;"}
@@ -0,0 +1,2 @@
1
+ export * from '@gaddario98/expo';
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from '@gaddario98/react-form';
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  export * from '@gaddario98/react-auth';
2
2
  import { PageConfigProps } from '@gaddario98/react-native-pages';
3
3
  export * from '@gaddario98/react-native-pages';
4
+ import { setI18nInitializer, setTranslationAdapter } from '@gaddario98/react-localization';
5
+ export * from '@gaddario98/react-localization';
4
6
  import { AppLinks } from '@gaddario98/react-native-utiles';
5
7
  export * from '@gaddario98/react-native-utiles';
6
8
  export * from '@gaddario98/expo';
7
9
  export * from '@gaddario98/react-form';
8
10
  export * from '@gaddario98/react-native-layouts';
9
- export * from '@gaddario98/react-localization';
10
11
  export * from '@gaddario98/react-native-providers';
11
12
  export * from '@gaddario98/react-queries';
12
13
  export * from '@gaddario98/react-native-state';
@@ -14,11 +15,15 @@ export * from '@gaddario98/react-native-tabs';
14
15
 
15
16
  interface SetReactNativeConfigProps {
16
17
  pages: Partial<PageConfigProps>;
17
- localResources: Record<string, object>;
18
18
  endpoints: Record<string, string>;
19
19
  links: Partial<AppLinks>;
20
+ localization?: {
21
+ i18nInitializer: Parameters<typeof setI18nInitializer>[0];
22
+ translationAdapter: Parameters<typeof setTranslationAdapter>[0];
23
+ localResources?: Record<string, object>;
24
+ };
20
25
  }
21
- declare const setReactNativeConfig: ({ pages, localResources, endpoints, links }: SetReactNativeConfigProps) => void;
26
+ declare const setReactNativeConfig: ({ pages, endpoints, localization, links, }: SetReactNativeConfigProps) => void;
22
27
 
23
28
  export { setReactNativeConfig };
24
29
  export type { SetReactNativeConfigProps };