@evlop/commons 1.0.139 → 1.0.142
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.js +1 -1
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.js.map +1 -1
- package/dist/src/helpers/i18nHelpers.d.ts +2 -0
- package/dist/src/helpers/i18nHelpers.d.ts.map +1 -0
- package/dist/src/helpers/i18nHelpers.js +8 -0
- package/dist/src/helpers/i18nHelpers.js.map +1 -0
- package/dist/src/helpers/i18nHelpers.native.d.ts +2 -0
- package/dist/src/helpers/i18nHelpers.native.d.ts.map +1 -0
- package/dist/src/helpers/i18nHelpers.native.js +12 -0
- package/dist/src/helpers/i18nHelpers.native.js.map +1 -0
- package/dist/src/helpers/index.d.ts +1 -0
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/index.js +1 -0
- package/dist/src/helpers/index.js.map +1 -1
- package/dist/src/helpers/themeHelpers.d.ts +4 -4
- package/dist/src/helpers/themeHelpers.d.ts.map +1 -1
- package/dist/src/helpers/themeHelpers.js +6 -1
- package/dist/src/helpers/themeHelpers.js.map +1 -1
- package/dist/src/providers/{I18nProvider/index.d.ts → I18nProvider.d.ts} +1 -1
- package/dist/src/providers/I18nProvider.d.ts.map +1 -0
- package/dist/src/providers/{I18nProvider/index.js → I18nProvider.js} +5 -7
- package/dist/src/providers/I18nProvider.js.map +1 -0
- package/package.json +1 -1
- package/dist/src/providers/I18nProvider/index.d.ts.map +0 -1
- package/dist/src/providers/I18nProvider/index.js.map +0 -1
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.app.d.ts +0 -2
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.app.d.ts.map +0 -1
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.app.js +0 -20
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.app.js.map +0 -1
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.d.ts +0 -2
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.d.ts.map +0 -1
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.js +0 -6
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.js.map +0 -1
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.native.d.ts +0 -2
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.native.d.ts.map +0 -1
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.native.js +0 -21
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.native.js.map +0 -1
@@ -20,7 +20,7 @@ const SimpleLineIcons_json_1 = __importDefault(require("react-native-vector-icon
|
|
20
20
|
const Zocial_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/Zocial.json"));
|
21
21
|
const change_case_1 = require("change-case");
|
22
22
|
const lodash_1 = require("lodash");
|
23
|
-
const iconLibraries = { Antdesign: AntDesign_json_1.default, Entypo: Entypo_json_1.default,
|
23
|
+
const iconLibraries = { Antdesign: AntDesign_json_1.default, Entypo: Entypo_json_1.default, Evilicons: EvilIcons_json_1.default, Feather: Feather_json_1.default, FontAwesome: FontAwesome_json_1.default, Fontisto: Fontisto_json_1.default, Foundation: Foundation_json_1.default, Ionicons: Ionicons_json_1.default, MaterialCommunityIcons: MaterialCommunityIcons_json_1.default, MaterialIcons: MaterialIcons_json_1.default, Octicon: Octicons_json_1.default, SimpleLineIcons: SimpleLineIcons_json_1.default, Zocial: Zocial_json_1.default };
|
24
24
|
const fa5Icons = lodash_1.chain(FontAwesome5Free_meta_json_1.default)
|
25
25
|
.flatMap((iconNames, variant) => lodash_1.map(iconNames, iconName => ({
|
26
26
|
id: `font-awesome-5:${variant}:${iconName}`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reactNativeVectorIcons.js","sourceRoot":"","sources":["../../../../src/constants/iconInfo/reactNativeVectorIcons.ts"],"names":[],"mappings":";;;;;AAAA,wGAA2E;AAC3E,kGAAqE;AACrE,
|
1
|
+
{"version":3,"file":"reactNativeVectorIcons.js","sourceRoot":"","sources":["../../../../src/constants/iconInfo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AC,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;KACpF,OAAO,CACJ,CAAC,kBAAkB,EAAE,WAAW,EAAC,EAAE,CAAC,YAAG,CAAC,kBAAkB,EACtD,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAC,EAAE,EAAE,CAAC,CAAC;IAC9B,EAAE,EAAE,GAAG,uBAAS,CAAC,WAAW,CAAC,IAAI,QAAQ,EAAE;IAC3C,IAAI,EAAE,uBAAS,CAAC,WAAW,CAAC;IAC5B,IAAI,EAAE,QAAQ;IACd,SAAS;CACZ,CAAC,CACL,CACJ;KACA,KAAK,CAAC,IAAI,CAAC;KACX,KAAK,EAAE,CAAC;AAErB,MAAO,sBAAsB,mCAAO,QAAQ,GAAK,WAAW,CAAC,CAAC;AAE9D,kBAAe,sBAAsB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"i18nHelpers.d.ts","sourceRoot":"","sources":["../../../src/helpers/i18nHelpers.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,WAEzB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"i18nHelpers.js","sourceRoot":"","sources":["../../../src/helpers/i18nHelpers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,UAAU;IACtB,OAAO,OAAO,CAAA;AAClB,CAAC;AAFD,gCAEC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"i18nHelpers.native.d.ts","sourceRoot":"","sources":["../../../src/helpers/i18nHelpers.native.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,QAKzB"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getLoacale = void 0;
|
4
|
+
const react_native_1 = require("react-native");
|
5
|
+
function getLoacale() {
|
6
|
+
return react_native_1.Platform.select({
|
7
|
+
ios: react_native_1.NativeModules.SettingsManager.settings.AppleLocale || react_native_1.NativeModules.SettingsManager.settings.AppleLanguages[0],
|
8
|
+
android: react_native_1.NativeModules.I18nManager.localeIdentifier,
|
9
|
+
});
|
10
|
+
}
|
11
|
+
exports.getLoacale = getLoacale;
|
12
|
+
//# sourceMappingURL=i18nHelpers.native.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"i18nHelpers.native.js","sourceRoot":"","sources":["../../../src/helpers/i18nHelpers.native.ts"],"names":[],"mappings":";;;AAAA,+CAAuD;AAEvD,SAAgB,UAAU;IACtB,OAAO,uBAAQ,CAAC,MAAM,CAAC;QACnB,GAAG,EAAE,4BAAa,CAAC,eAAe,CAAC,QAAQ,CAAC,WAAW,IAAI,4BAAa,CAAC,eAAe,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;QACnH,OAAO,EAAE,4BAAa,CAAC,WAAW,CAAC,gBAAgB;KACtD,CAAC,CAAA;AACN,CAAC;AALD,gCAKC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
|
@@ -15,4 +15,5 @@ __exportStar(require("./functions"), exports);
|
|
15
15
|
__exportStar(require("./commonStyles"), exports);
|
16
16
|
__exportStar(require("./themeHelpers"), exports);
|
17
17
|
__exportStar(require("./base64"), exports);
|
18
|
+
__exportStar(require("./i18nHelpers"), exports);
|
18
19
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmC;AACnC,8CAA4B;AAC5B,iDAA+B;AAC/B,iDAA+B;AAC/B,2CAAyB"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmC;AACnC,8CAA4B;AAC5B,iDAA+B;AAC/B,iDAA+B;AAC/B,2CAAyB;AACzB,gDAA8B"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
export declare const generateSizeScale: (baseSize: number, variants: {
|
2
2
|
[key: string]: number;
|
3
3
|
}) => {
|
4
|
-
[x: string]:
|
4
|
+
[x: string]: string;
|
5
5
|
};
|
6
6
|
export declare const fontSizes: {
|
7
7
|
xxxxs: number;
|
@@ -37,7 +37,7 @@ declare const fontWeights: {
|
|
37
37
|
declare type FontWeights = typeof fontWeights;
|
38
38
|
declare type FontWeight = keyof FontWeights;
|
39
39
|
export declare const generateFontSizes: (baseFontSize: number) => {
|
40
|
-
[x: string]:
|
40
|
+
[x: string]: string;
|
41
41
|
};
|
42
42
|
export declare const lineHeightVariants: {
|
43
43
|
xxxxs: number;
|
@@ -60,7 +60,7 @@ export declare const lineHeightVariants: {
|
|
60
60
|
declare type LineHeightVariants = typeof lineHeightVariants;
|
61
61
|
declare type LineHeight = keyof LineHeightVariants;
|
62
62
|
export declare const generateLineHeights: (baseFontSize: number) => {
|
63
|
-
[x: string]:
|
63
|
+
[x: string]: string;
|
64
64
|
};
|
65
65
|
export declare const spacingVariations: {
|
66
66
|
none: number;
|
@@ -85,7 +85,7 @@ export declare const spacingVariations: {
|
|
85
85
|
declare type SpaceVariants = typeof fontSizes;
|
86
86
|
declare type Space = keyof SpaceVariants;
|
87
87
|
export declare const generateSpacingSizes: (baseSpacing: number) => {
|
88
|
-
[x: string]:
|
88
|
+
[x: string]: string;
|
89
89
|
};
|
90
90
|
declare const colors: {
|
91
91
|
white: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"themeHelpers.d.ts","sourceRoot":"","sources":["../../../src/helpers/themeHelpers.tsx"],"names":[],"mappings":"AA+BA,eAAO,MAAM,iBAAiB,aAAa,MAAM;;;;
|
1
|
+
{"version":3,"file":"themeHelpers.d.ts","sourceRoot":"","sources":["../../../src/helpers/themeHelpers.tsx"],"names":[],"mappings":"AA+BA,eAAO,MAAM,iBAAiB,aAAa,MAAM;;;;CAI/C,CAAC;AAGH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;CAiBrB,CAAA;AAED,aAAK,SAAS,GAAG,OAAO,SAAS,CAAC;AAClC,aAAK,QAAQ,GAAG,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,WAAW;;;;;;;;;;CAUhB,CAAC;AAEF,aAAK,WAAW,GAAG,OAAO,WAAW,CAAC;AACtC,aAAK,UAAU,GAAG,MAAM,WAAW,CAAC;AAEpC,eAAO,MAAM,iBAAiB,iBAAkB,MAAM;;CAA+C,CAAC;AAGtG,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;CAAmC,CAAC;AACnE,aAAK,kBAAkB,GAAG,OAAO,kBAAkB,CAAC;AACpD,aAAK,UAAU,GAAG,MAAM,kBAAkB,CAAC;AAE3C,eAAO,MAAM,mBAAmB,iBAAkB,MAAM;;CAAwD,CAAC;AAIjH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;CAmB7B,CAAC;AAEF,aAAK,aAAa,GAAG,OAAO,SAAS,CAAC;AACtC,aAAK,KAAK,GAAG,MAAM,aAAa,CAAC;AAEjC,eAAO,MAAM,oBAAoB,gBAAiB,MAAM;;CAAsD,CAAC;AAE/G,QAAA,MAAM,MAAM;;;;;;;;;;CAUX,CAAA;AAED,aAAK,UAAU,GAAG,OAAO,MAAM,CAAC;AAEhC,aAAK,SAAS,GAAG,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,WAAW;;;;;;;;;;;;CAcd,CAAA;AAEH,aAAK,WAAW,GAAG,OAAO,WAAW,CAAC;AAEtC,oBAAY,UAAU,GAAG,MAAM,WAAW,CAAC;AAE3C,aAAK,cAAc,GAAG,OAAO,CAAC,SAAS,EAAE,OAAO,GAAC,OAAO,CAAC,CAAC;AAC1D,aAAK,WAAW,GAAG,GAAG,cAAc,UAAU,UAAU,EAAE,CAAA;AAE1D,oBAAY,KAAK,GAAG,SAAS,GAAG,WAAW,CAAC;AAqB5C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IAAC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;CAAC;;EAuCrE;AACD,MAAM,WAAW,KAAK;IAClB,KAAK,EAAE;SAAE,GAAG,IAAI,KAAK,GAAG,MAAM;KAAC,CAAC;IAChC,SAAS,EAAE;SAAE,GAAG,IAAI,QAAQ,GAAG,MAAM;KAAC,CAAC;IACvC,WAAW,EAAE;SAAE,GAAG,IAAI,UAAU,GAAG,MAAM;KAAC,CAAC;IAC3C,WAAW,EAAE;SAAE,GAAG,IAAI,UAAU,GAAG,MAAM;KAAC,CAAC;IAC3C,MAAM,EAAE;SAAE,GAAG,IAAI,KAAK,GAAG,MAAM;KAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;CACpB"}
|
@@ -23,7 +23,12 @@ function darkenRgb(hex, intensity) {
|
|
23
23
|
const b = Math.round(color.blue * (1 - intensity));
|
24
24
|
return polished_1.rgb(r, g, b);
|
25
25
|
}
|
26
|
-
const generateSizeScale = (baseSize, variants) => lodash_1.mapValues(variants, scale =>
|
26
|
+
const generateSizeScale = (baseSize, variants) => lodash_1.mapValues(variants, scale => {
|
27
|
+
const scaledValue = Math.round(scale * baseSize);
|
28
|
+
if (scaledValue)
|
29
|
+
return `${scaledValue}px`;
|
30
|
+
return null;
|
31
|
+
});
|
27
32
|
exports.generateSizeScale = generateSizeScale;
|
28
33
|
// font sizes
|
29
34
|
exports.fontSizes = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"themeHelpers.js","sourceRoot":"","sources":["../../../src/helpers/themeHelpers.tsx"],"names":[],"mappings":";;;AAAA,mCAAkE;AAClE,uCAAiH;AAEjH,SAAS,UAAU,CAAC,GAAG,EAAE,SAAS;IAC9B,MAAM,KAAK,GAAG,qBAAU,CAAC,GAAG,CAAC,CAAC;IAE9B,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,EAAE,CAAC;KACX;IAED,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC;IAChE,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;IACpE,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;IAElE,OAAO,cAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACtB,CAAC;AAED,SAAS,SAAS,CAAC,GAAG,EAAE,SAAS;IAC/B,MAAM,KAAK,GAAG,qBAAU,CAAC,GAAG,CAAC,CAAC;IAE9B,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,EAAE,CAAC;KACX;IAED,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,GAAC,SAAS,CAAC,CAAC,CAAC;IAChD,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,GAAC,SAAS,CAAC,CAAC,CAAC;IAClD,MAAM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BACV,KAAK,QAAQ;wBACT,MAAM,YAAY,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,CAAC;wBAChD,WAAW,GAAG,iBAAM,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;wBAChD,MAAM;oBACV,KAAK,gBAAgB;wBACjB,MAAM,oBAAoB,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,CAAC;wBACxD,WAAW,GAAG,yBAAc,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC;wBAChE,MAAM;oBACV,KAAK,QAAQ;wBACT,WAAW,GAAG,iBAAM,CAAC,WAAW,CAAC,CAAC;wBAClC,MAAM;oBACV,KAAK,WAAW;wBACZ,WAAW,GAAG,oBAAS,CAAC,WAAW,CAAC,CAAC;wBACrC,MAAM;oBACV,KAAK,OAAO;wBACR,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,EAAE,CAAC;wBACvC,WAAW,GAAG,2BAA2B,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,CAAA;oBACvE,QAAQ;iBACX;aACJ;YAED,OAAO,WAAW,CAAC;QACvB,CAAC;QACD,GAAG,KAAI,OAAO,KAAK,CAAA,CAAC,CAAC;KACxB,CAAC,CAAA;AACN,CAAC;AAvCD,4CAuCC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"I18nProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/I18nProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAOvE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EA8ChC,CAAA;AAED,eAAe,YAAY,CAAC"}
|
@@ -26,11 +26,10 @@ exports.I18nProvider = void 0;
|
|
26
26
|
const lodash_1 = require("lodash");
|
27
27
|
const react_1 = __importStar(require("react"));
|
28
28
|
const react_redux_1 = require("react-redux");
|
29
|
-
const i18ninstance_1 = __importDefault(require("
|
30
|
-
const useConfig_1 = require("
|
31
|
-
const reducers_1 = require("
|
32
|
-
const Scope_1 = require("
|
33
|
-
const useDirectionSwitcher_1 = __importDefault(require("./useDirectionSwitcher"));
|
29
|
+
const i18ninstance_1 = __importDefault(require("../constants/i18ninstance"));
|
30
|
+
const useConfig_1 = require("../hooks/useConfig");
|
31
|
+
const reducers_1 = require("../reducers");
|
32
|
+
const Scope_1 = require("./Scope");
|
34
33
|
const I18nProvider = ({ children }) => {
|
35
34
|
const dispatch = react_redux_1.useDispatch();
|
36
35
|
const i18nResources = useConfig_1.useConfig('i18n');
|
@@ -47,7 +46,6 @@ const I18nProvider = ({ children }) => {
|
|
47
46
|
setLanguage(i18ninstance_1.default.language);
|
48
47
|
}
|
49
48
|
}, [language]);
|
50
|
-
useDirectionSwitcher_1.default(language);
|
51
49
|
react_1.useEffect(() => {
|
52
50
|
const languageChangeHandeller = (lng) => setLanguage(lng);
|
53
51
|
i18ninstance_1.default.on("languageChanged", languageChangeHandeller);
|
@@ -70,4 +68,4 @@ const I18nProvider = ({ children }) => {
|
|
70
68
|
};
|
71
69
|
exports.I18nProvider = I18nProvider;
|
72
70
|
exports.default = exports.I18nProvider;
|
73
|
-
//# sourceMappingURL=
|
71
|
+
//# sourceMappingURL=I18nProvider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"I18nProvider.js","sourceRoot":"","sources":["../../../src/providers/I18nProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA+B;AAC/B,+CAAuE;AACvE,6CAAqD;AACrD,6EAAqD;AACrD,kDAA+C;AAC/C,0CAA8C;AAC9C,mCAAwC;AAEjC,MAAM,YAAY,GAAa,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE;IACnD,MAAM,QAAQ,GAAG,yBAAW,EAAE,CAAC;IAC/B,MAAM,aAAa,GAAG,qBAAS,CAAC,MAAM,CAAC,CAAC;IAExC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,gBAAQ,CAAC,IAAI,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AE,uBAAuB,CAAC,CAAA;YAClD,sBAAY,CAAC,GAAG,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAA;QACtD,CAAC,CAAC;IACR,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,iBAAS,CAAC,GAAG,EAAE;QACb,gBAAO,CAAC,aAAa,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,CAC1C,sBAAY,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CACtD,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,SAAS,GAAG,eAAO,CAAC,GAAE,EAAE,CAAA,CAAC,EAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAC,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE7E,OAAO,CAAC,8BAAC,qBAAa,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,SAAS,IAC5C,QAAQ,CACG,CAAC,CAAC;AACtB,CAAC,CAAA;AA9CY,QAAA,YAAY,gBA8CxB;AAED,kBAAe,oBAAY,CAAC"}
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAQvE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAgDhC,CAAA;AAED,eAAe,YAAY,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA+B;AAC/B,+CAAuE;AACvE,6CAAqD;AACrD,gFAAwD;AACxD,qDAAkD;AAClD,6CAAiD;AACjD,sCAA2C;AAC3C,kFAA0D;AAEnD,MAAM,YAAY,G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,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAA;QAC3D,sBAAY,CAAC,EAAE,CAAC,OAAO,EAAE,uBAAuB,CAAC,CAAA;QACjD,sBAAY,CAAC,EAAE,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAA;QACnD,OAAO,GAAE,EAAE;YACP,sBAAY,CAAC,GAAG,CAAC,OAAO,EAAE,uBAAuB,CAAC,CAAA;YAClD,sBAAY,CAAC,GAAG,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAA;QACtD,CAAC,CAAC;IACR,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,iBAAS,CAAC,GAAG,EAAE;QACb,gBAAO,CAAC,aAAa,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,CAC1C,sBAAY,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CACtD,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,SAAS,GAAG,eAAO,CAAC,GAAE,EAAE,CAAA,CAAC,EAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAC,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE7E,OAAO,CAAC,8BAAC,qBAAa,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,SAAS,IAC5C,QAAQ,CACG,CAAC,CAAC;AACtB,CAAC,CAAA;AAhDY,QAAA,YAAY,gBAgDxB;AAED,kBAAe,oBAAY,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useDirectionSwitcher.app.d.ts","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/useDirectionSwitcher.app.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,GAAG,EAAE,MAAM,QASvD"}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const lodash_1 = require("lodash");
|
4
|
-
const react_1 = require("react");
|
5
|
-
const react_native_1 = require("react-native");
|
6
|
-
const { AppConstants } = react_native_1.NativeModules;
|
7
|
-
const activeDirection = react_native_1.I18nManager.isRTL ? 'rtl' : 'ltr';
|
8
|
-
const rtLanguages = ["ar", "arc", "ckb", "dv", "fa", "ha", "he", "khw", "ks", "ps", "sd", "ur", "uz_af", "yi"];
|
9
|
-
function useDirectionSwitcher(lng) {
|
10
|
-
const languageDirection = react_1.useMemo(() => {
|
11
|
-
return lodash_1.includes(rtLanguages, lodash_1.lowerCase(lng)) ? 'rtl' : 'ltr';
|
12
|
-
}, [lng]);
|
13
|
-
react_1.useEffect(() => {
|
14
|
-
if (languageDirection === activeDirection)
|
15
|
-
return;
|
16
|
-
react_native_1.I18nManager.forceRTL(languageDirection === 'rtl');
|
17
|
-
}, [languageDirection]);
|
18
|
-
}
|
19
|
-
exports.default = useDirectionSwitcher;
|
20
|
-
//# sourceMappingURL=useDirectionSwitcher.app.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useDirectionSwitcher.app.js","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/useDirectionSwitcher.app.ts"],"names":[],"mappings":";;AAAA,mCAA6C;AAC7C,iCAA2C;AAC3C,+CAA0D;AAC1D,MAAM,EAAC,YAAY,EAAC,GAAG,4BAAa,CAAC;AAGrC,MAAM,eAAe,GAAc,0BAAW,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;AAErE,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AAE/G,SAAwB,oBAAoB,CAAC,GAAW;IACpD,MAAM,iBAAiB,GAAG,eAAO,CAAY,GAAE,EAAE;QAC7C,OAAO,iBAAQ,CAAC,WAAW,EAAE,kBAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IACjE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEV,iBAAS,CAAC,GAAE,EAAE;QACV,IAAG,iBAAiB,KAAK,eAAe;YAAE,OAAO;QACjD,0BAAW,CAAC,QAAQ,CAAC,iBAAiB,KAAK,KAAK,CAAC,CAAC;IACtD,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC5B,CAAC;AATD,uCASC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useDirectionSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/useDirectionSwitcher.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,GAAG,EAAE,MAAM,QAEvD"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useDirectionSwitcher.js","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/useDirectionSwitcher.ts"],"names":[],"mappings":";;AACA,SAAwB,oBAAoB,CAAC,GAAW;AAExD,CAAC;AAFD,uCAEC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useDirectionSwitcher.native.d.ts","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/useDirectionSwitcher.native.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,GAAG,EAAE,MAAM,QAUvD"}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const lodash_1 = require("lodash");
|
4
|
-
const react_1 = require("react");
|
5
|
-
const react_native_1 = require("react-native");
|
6
|
-
const { AppConstants } = react_native_1.NativeModules;
|
7
|
-
const activeDirection = react_native_1.I18nManager.isRTL ? 'rtl' : 'ltr';
|
8
|
-
const rtLanguages = ["ar", "arc", "ckb", "dv", "fa", "ha", "he", "khw", "ks", "ps", "sd", "ur", "uz_af", "yi"];
|
9
|
-
function useDirectionSwitcher(lng) {
|
10
|
-
const languageDirection = react_1.useMemo(() => {
|
11
|
-
return lodash_1.includes(rtLanguages, lodash_1.lowerCase(lng)) ? 'rtl' : 'ltr';
|
12
|
-
}, [lng]);
|
13
|
-
react_1.useEffect(() => {
|
14
|
-
if (languageDirection === activeDirection)
|
15
|
-
return;
|
16
|
-
react_native_1.I18nManager.forceRTL(languageDirection === 'rtl');
|
17
|
-
AppConstants.reload();
|
18
|
-
}, [languageDirection]);
|
19
|
-
}
|
20
|
-
exports.default = useDirectionSwitcher;
|
21
|
-
//# sourceMappingURL=useDirectionSwitcher.native.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useDirectionSwitcher.native.js","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/useDirectionSwitcher.native.ts"],"names":[],"mappings":";;AAAA,mCAA6C;AAC7C,iCAA2C;AAC3C,+CAA0D;AAC1D,MAAM,EAAC,YAAY,EAAC,GAAG,4BAAa,CAAC;AAGrC,MAAM,eAAe,GAAc,0BAAW,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;AAErE,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AAE/G,SAAwB,oBAAoB,CAAC,GAAW;IACpD,MAAM,iBAAiB,GAAG,eAAO,CAAY,GAAE,EAAE;QAC7C,OAAO,iBAAQ,CAAC,WAAW,EAAE,kBAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IACjE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEV,iBAAS,CAAC,GAAE,EAAE;QACV,IAAG,iBAAiB,KAAK,eAAe;YAAE,OAAO;QACjD,0BAAW,CAAC,QAAQ,CAAC,iBAAiB,KAAK,KAAK,CAAC,CAAC;QAClD,YAAY,CAAC,MAAM,EAAE,CAAC;IAC1B,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC5B,CAAC;AAVD,uCAUC"}
|