@gaddario98/react-native-core 1.0.10 → 1.0.11
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/dist/auth/index.mjs +2 -0
- package/dist/auth/index.mjs.map +1 -0
- package/dist/config/index.d.ts +7 -2
- package/dist/config/index.mjs +30 -0
- package/dist/config/index.mjs.map +1 -0
- package/dist/expo/index.mjs +2 -0
- package/dist/expo/index.mjs.map +1 -0
- package/dist/form/index.mjs +2 -0
- package/dist/form/index.mjs.map +1 -0
- package/dist/index.d.ts +8 -3
- package/dist/index.mjs +18 -4175
- package/dist/index.mjs.map +1 -1
- package/dist/layouts/index.mjs +2 -0
- package/dist/layouts/index.mjs.map +1 -0
- package/dist/localization/index.mjs +2 -0
- package/dist/localization/index.mjs.map +1 -0
- package/dist/pages/index.mjs +2 -0
- package/dist/pages/index.mjs.map +1 -0
- package/dist/providers/index.mjs +2 -0
- package/dist/providers/index.mjs.map +1 -0
- package/dist/queries/index.mjs +2 -0
- package/dist/queries/index.mjs.map +1 -0
- package/dist/state/index.mjs +2 -0
- package/dist/state/index.mjs.map +1 -0
- package/dist/tabs/index.mjs +2 -0
- package/dist/tabs/index.mjs.map +1 -0
- package/dist/utiles/index.mjs +2 -0
- package/dist/utiles/index.mjs.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/config/index.d.ts
CHANGED
|
@@ -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,
|
|
15
|
+
declare const setReactNativeConfig: ({ pages, endpoints, localization, links, }: SetReactNativeConfigProps) => void;
|
|
11
16
|
|
|
12
17
|
export { setReactNativeConfig };
|
|
13
18
|
export type { SetReactNativeConfigProps };
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { setDefaultFormFieldContainer } from '@gaddario98/react-form';
|
|
9
|
+
|
|
10
|
+
const setReactNativeConfig = ({ pages, endpoints, localization, links, }) => {
|
|
11
|
+
if (localization === null || localization === void 0 ? void 0 : localization.i18nInitializer) {
|
|
12
|
+
setI18nInitializer(localization.i18nInitializer);
|
|
13
|
+
}
|
|
14
|
+
if (localization === null || localization === void 0 ? void 0 : localization.translationAdapter) {
|
|
15
|
+
setTranslationAdapter(localization.translationAdapter);
|
|
16
|
+
}
|
|
17
|
+
if (localization === null || localization === void 0 ? void 0 : localization.localResources) {
|
|
18
|
+
initializeI18n(localization.localResources);
|
|
19
|
+
}
|
|
20
|
+
setReactNativeStorage();
|
|
21
|
+
setReactNativePageConfig(pages);
|
|
22
|
+
setEndpoints(endpoints);
|
|
23
|
+
setAppLinks(links);
|
|
24
|
+
setDefaultFormFieldContainer(({ children }) => {
|
|
25
|
+
return (jsx(KeyboardAvoidingView, { behavior: Platform.OS === "ios" ? "padding" : undefined, children: children }));
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { setReactNativeConfig };
|
|
30
|
+
//# 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 { setDefaultFormFieldContainer } 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 setDefaultFormFieldContainer(({ children }) => {\n return (\n <KeyboardAvoidingView\n behavior={Platform.OS === \"ios\" ? \"padding\" : undefined}\n >\n {children}\n </KeyboardAvoidingView>\n );\n });\n};\n"],"names":["_jsx"],"mappings":";;;;;;;;;AAuBO,MAAM,oBAAoB,GAAG,CAAC,EACnC,KAAK,EACL,SAAS,EACT,YAAY,EACZ,KAAK,GACqB,KAAI;IAC9B,IAAI,YAAY,aAAZ,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZ,YAAY,CAAE,eAAe,EAAE;AACjC,QAAA,kBAAkB,CAAC,YAAY,CAAC,eAAe,CAAC;;IAElD,IAAI,YAAY,aAAZ,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZ,YAAY,CAAE,kBAAkB,EAAE;AACpC,QAAA,qBAAqB,CAAC,YAAY,CAAC,kBAAkB,CAAC;;IAExD,IAAI,YAAY,aAAZ,YAAY,KAAA,MAAA,GAAA,MAAA,GAAZ,YAAY,CAAE,cAAc,EAAE;AAChC,QAAA,cAAc,CAAC,YAAY,CAAC,cAAc,CAAC;;AAE7C,IAAA,qBAAqB,EAAE;IACvB,wBAAwB,CAAC,KAAK,CAAC;IAC/B,YAAY,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,KAAK,CAAC;AAClB,IAAA,4BAA4B,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAI;QAC5C,QACEA,IAAC,oBAAoB,EAAA,EACnB,QAAQ,EAAE,QAAQ,CAAC,EAAE,KAAK,KAAK,GAAG,SAAS,GAAG,SAAS,EAEtD,QAAA,EAAA,QAAQ,EACY,CAAA;AAE3B,KAAC,CAAC;AACJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -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,
|
|
26
|
+
declare const setReactNativeConfig: ({ pages, endpoints, localization, links, }: SetReactNativeConfigProps) => void;
|
|
22
27
|
|
|
23
28
|
export { setReactNativeConfig };
|
|
24
29
|
export type { SetReactNativeConfigProps };
|