@evlop/commons 1.0.134 → 1.0.137
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bin/generate-icons-type.d.ts +2 -0
- package/dist/bin/generate-icons-type.d.ts.map +1 -0
- package/dist/bin/generate-icons-type.js +29 -0
- package/dist/bin/generate-icons-type.js.map +1 -0
- package/dist/src/components/index.d.ts +0 -1
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +0 -1
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/constants/iconInfo/index.d.ts +4 -2
- package/dist/src/constants/iconInfo/index.d.ts.map +1 -1
- package/dist/src/constants/iconInfo/index.js +2 -1
- package/dist/src/constants/iconInfo/index.js.map +1 -1
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.d.ts +1 -32
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.d.ts.map +1 -1
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.js +1 -1
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.js.map +1 -1
- package/dist/src/constants/iconInfo/types.d.ts +38 -0
- package/dist/src/constants/iconInfo/types.d.ts.map +1 -0
- package/dist/src/constants/iconInfo/types.js +3 -0
- package/dist/src/constants/iconInfo/types.js.map +1 -0
- package/dist/src/constants/index.d.ts +2 -2
- package/dist/src/constants/index.d.ts.map +1 -1
- package/dist/src/constants/index.js +1 -2
- package/dist/src/constants/index.js.map +1 -1
- package/dist/src/providers/I18nProvider.d.ts +4 -0
- package/dist/src/providers/I18nProvider.d.ts.map +1 -0
- package/dist/src/providers/I18nProvider.js +55 -0
- package/dist/src/providers/I18nProvider.js.map +1 -0
- package/dist/src/providers/index.d.ts +1 -0
- package/dist/src/providers/index.d.ts.map +1 -1
- package/dist/src/providers/index.js +1 -0
- package/dist/src/providers/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/generateIcons.d.ts +0 -2
- package/dist/generateIcons.d.ts.map +0 -1
- package/dist/generateIcons.js +0 -13
- package/dist/generateIcons.js.map +0 -1
- package/dist/src/components/I18nManager.d.ts +0 -4
- package/dist/src/components/I18nManager.d.ts.map +0 -1
- package/dist/src/components/I18nManager.js +0 -20
- package/dist/src/components/I18nManager.js.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generate-icons-type.d.ts","sourceRoot":"","sources":["../../bin/generate-icons-type.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,29 @@
|
|
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 change_case_1 = require("change-case");
|
7
|
+
const lodash_1 = require("lodash");
|
8
|
+
const reactNativeVectorIcons_1 = __importDefault(require("../src/constants/iconInfo/reactNativeVectorIcons"));
|
9
|
+
const iconByTypes = lodash_1.groupBy(reactNativeVectorIcons_1.default, icon => lodash_1.filter(lodash_1.at(icon, 'type', 'variant')).join(':'));
|
10
|
+
const iconTypeToIconNames = lodash_1.mapValues(iconByTypes, icons => lodash_1.map(icons, 'name'));
|
11
|
+
const icons = lodash_1.reduce(iconTypeToIconNames, ({ typeNames, typeDefinations }, iconNames, iconType) => {
|
12
|
+
const iconsNamesTypeName = change_case_1.pascalCase(iconType);
|
13
|
+
const identifierTypeName = change_case_1.pascalCase(iconType) + 'IconIdentifier';
|
14
|
+
const typeDefination = [
|
15
|
+
`type ${iconsNamesTypeName} = ${lodash_1.join(iconNames.map(iconName => JSON.stringify(iconName)), '|')}`,
|
16
|
+
`type ${identifierTypeName} = \`${iconType}:\${${iconsNamesTypeName}}\``,
|
17
|
+
].join("\n");
|
18
|
+
return { typeNames: [...typeNames, identifierTypeName], typeDefinations: [...typeDefinations, typeDefination] };
|
19
|
+
}, { typeNames: [], typeDefinations: [] });
|
20
|
+
require('fs').writeFileSync('./src/constants/iconInfo/types.ts', [
|
21
|
+
...icons.typeDefinations,
|
22
|
+
`export type IconIdentifier = ${lodash_1.join(icons.typeNames, '|')};`,
|
23
|
+
'',
|
24
|
+
'export type ReactNativeVectorIcons = {[key in IconIdentifier]: Object};',
|
25
|
+
'',
|
26
|
+
'export default IconIdentifier;',
|
27
|
+
].join('\n'));
|
28
|
+
console.log("Generated icon types");
|
29
|
+
//# sourceMappingURL=generate-icons-type.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generate-icons-type.js","sourceRoot":"","sources":["../../bin/generate-icons-type.ts"],"names":[],"mappings":";;;;;AAAA,6CAAyC;AACzC,mCAA2E;AAC3E,8GAAsF;AAEtF,MAAM,WAAW,GAAG,gBAAO,CAAC,gCAAsB,EAAE,IAAI,CAAA,EAAE,CAAC,eAAM,CAAC,WAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1G,MAAM,mBAAmB,GAAG,kBAAS,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,YAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAA;AAE/E,MAAM,KAAK,GAAG,eAAM,CAAC,mBAAmB,EAAE,CAAC,EAAC,SAAS,EAAE,eAAe,EAAC,EAAE,SAAS,EAAE,QAAQ,EAAC,EAAE;IAC7F,MAAM,kBAAkB,GAAG,wBAAU,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,kBAAkB,GAAG,wBAAU,CAAC,QAAQ,CAAC,GAAC,gBAAgB,CAAC;IACjE,MAAM,cAAc,GAAG;QACrB,QAAQ,kBAAkB,MAAM,aAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;QAChG,QAAQ,kBAAkB,QAAQ,QAAQ,OAAO,kBAAkB,KAAK;KACzE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACb,OAAO,EAAE,SAAS,EAAE,CAAC,GAAG,SAAS,EAAE,kBAAkB,CAAC,EAAE,eAAe,EAAE,CAAC,GAAG,eAAe,EAAE,cAAc,CAAC,EAAE,CAAA;AACjH,CAAC,EAAE,EAAC,SAAS,EAAE,EAAE,EAAE,eAAe,EAAE,EAAE,EAAC,CAAC,CAAC;AAGzC,OAAO,CAAC,IAAI,CAAC,CAAC,aAAa,CACzB,mCAAmC,EACnC;IACE,GAAG,KAAK,CAAC,eAAe;IACxB,gCAAgC,aAAI,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,GAAG;IAC7D,EAAE;IACF,yEAAyE;IACzE,EAAE;IACF,gCAAgC;CACjC,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;AAEF,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAgBA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAgBA,cAAc,kBAAkB,CAAC;AAEjC,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC"}
|
@@ -26,7 +26,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
// export * from './FontChooser';
|
27
27
|
// export * from './FontSizeChooser';
|
28
28
|
// export * from './SubToolbar';
|
29
|
-
__exportStar(require("./I18nManager"), exports);
|
30
29
|
__exportStar(require("./EmptyComponent"), exports);
|
31
30
|
// export * from './BackgroundCho';
|
32
31
|
__exportStar(require("./hoc"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8BAA8B;AAC9B,iCAAiC;AACjC,qCAAqC;AACrC,qCAAqC;AACrC,uCAAuC;AACvC,mCAAmC;AACnC,iCAAiC;AACjC,mCAAmC;AACnC,iCAAiC;AACjC,sCAAsC;AACtC,wCAAwC;AACxC,kCAAkC;AAClC,iCAAiC;AACjC,iCAAiC;AACjC,qCAAqC;AACrC,gCAAgC;AAChC,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8BAA8B;AAC9B,iCAAiC;AACjC,qCAAqC;AACrC,qCAAqC;AACrC,uCAAuC;AACvC,mCAAmC;AACnC,iCAAiC;AACjC,mCAAmC;AACnC,iCAAiC;AACjC,sCAAsC;AACtC,wCAAwC;AACxC,kCAAkC;AAClC,iCAAiC;AACjC,iCAAiC;AACjC,qCAAqC;AACrC,gCAAgC;AAChC,mDAAiC;AACjC,mCAAmC;AACnC,wCAAsB;AACtB,4CAA0B;AAE1B,4CAA4C"}
|
@@ -1,3 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import { IconIdentifier, ReactNativeVectorIcons } from './types';
|
2
|
+
declare const icons: ReactNativeVectorIcons;
|
3
|
+
export { IconIdentifier, ReactNativeVectorIcons };
|
4
|
+
export default icons;
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/constants/iconInfo/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/constants/iconInfo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjE,QAAA,MAAM,KAAK,wBAA+B,CAAE;AAE5C,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,CAAA;AACjD,eAAe,KAAK,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/constants/iconInfo/index.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/constants/iconInfo/index.ts"],"names":[],"mappings":";;AAEA,MAAM,KAAK,GAAG,EAA4B,CAAE;AAG5C,kBAAe,KAAK,CAAC"}
|
@@ -1,34 +1,3 @@
|
|
1
|
-
import Entypo from 'react-native-vector-icons/glyphmaps/Entypo.json';
|
2
|
-
import Evilicon from 'react-native-vector-icons/glyphmaps/EvilIcons.json';
|
3
|
-
import Feather from 'react-native-vector-icons/glyphmaps/Feather.json';
|
4
|
-
import FontAwesome from 'react-native-vector-icons/glyphmaps/FontAwesome.json';
|
5
|
-
import FontAwesome5_meta from 'react-native-vector-icons/glyphmaps/FontAwesome5Free_meta.json';
|
6
|
-
import FontAwesome5 from 'react-native-vector-icons/glyphmaps/FontAwesome5Free.json';
|
7
|
-
import Fontisto from 'react-native-vector-icons/glyphmaps/Fontisto.json';
|
8
|
-
import Foundation from 'react-native-vector-icons/glyphmaps/Foundation.json';
|
9
|
-
import Ionicon from 'react-native-vector-icons/glyphmaps/Ionicons.json';
|
10
|
-
import MaterialCommunity from 'react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json';
|
11
|
-
import Material from 'react-native-vector-icons/glyphmaps/MaterialIcons.json';
|
12
|
-
import Octicon from 'react-native-vector-icons/glyphmaps/Octicons.json';
|
13
|
-
import SimpleLineIcon from 'react-native-vector-icons/glyphmaps/SimpleLineIcons.json';
|
14
|
-
import Zocial from 'react-native-vector-icons/glyphmaps/Zocial.json';
|
15
|
-
declare type FaIcons = typeof FontAwesome5_meta;
|
16
|
-
declare type FA5IconVariant = keyof FaIcons;
|
17
|
-
declare type Fa5IconName = keyof (typeof FontAwesome5);
|
18
|
-
declare type Fa5Icon = `font-awesome-5:${FA5IconVariant}:${Fa5IconName}`;
|
19
|
-
declare type EntypoIcon = `entypo:${keyof (typeof Entypo)}`;
|
20
|
-
declare type EvilIcon = `evilicon:${keyof (typeof Evilicon)}`;
|
21
|
-
declare type FeatherIcon = `fetther:${keyof (typeof Feather)}`;
|
22
|
-
declare type FontAwesomeIcon = `font-awesome:${keyof (typeof FontAwesome)}`;
|
23
|
-
declare type FontistoIcon = `fontisto:${keyof (typeof Fontisto)}`;
|
24
|
-
declare type FoundationIcon = `foundation:${keyof (typeof Foundation)}`;
|
25
|
-
declare type IoniconIcon = `ionicon:${keyof (typeof Ionicon)}`;
|
26
|
-
declare type MaterialCommunityIcon = `material-community:${keyof (typeof MaterialCommunity)}`;
|
27
|
-
declare type MaterialIcon = `material:${keyof (typeof Material)}`;
|
28
|
-
declare type OcticonIcon = `octicon:${keyof (typeof Octicon)}`;
|
29
|
-
declare type SimpleLineIconIcon = `simple-line-icon:${keyof (typeof SimpleLineIcon)}`;
|
30
|
-
declare type ZocialIcon = `zocial:${keyof (typeof Zocial)}`;
|
31
|
-
export declare type IconIdentifier = Fa5Icon | EntypoIcon | EvilIcon | FeatherIcon | FontAwesomeIcon | FontistoIcon | FoundationIcon | IoniconIcon | MaterialCommunityIcon | MaterialIcon | OcticonIcon | SimpleLineIconIcon | ZocialIcon;
|
32
1
|
declare const reactNativeVectorIcons: {
|
33
2
|
[x: string]: {
|
34
3
|
id: string;
|
@@ -38,8 +7,8 @@ declare const reactNativeVectorIcons: {
|
|
38
7
|
character: any;
|
39
8
|
} | {
|
40
9
|
id: string;
|
41
|
-
name: string;
|
42
10
|
type: string;
|
11
|
+
name: string;
|
43
12
|
character: never;
|
44
13
|
};
|
45
14
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reactNativeVectorIcons.d.ts","sourceRoot":"","sources":["../../../../src/constants/iconInfo/reactNativeVectorIcons.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"reactNativeVectorIcons.d.ts","sourceRoot":"","sources":["../../../../src/constants/iconInfo/reactNativeVectorIcons.ts"],"names":[],"mappings":"AAqDA,QAAA,MAAO,sBAAsB;;;;;;;;;;;;;CAAgC,CAAC;AAE9D,eAAe,sBAAsB,CAAA"}
|
@@ -35,8 +35,8 @@ const vectorIcons = lodash_1.chain(iconLibraries)
|
|
35
35
|
.mapValues((libraryIcons) => lodash_1.map(libraryIcons, (character, name) => ({ character, name })))
|
36
36
|
.flatMap((iconsOfCurrentType, iconLibrary) => lodash_1.map(iconsOfCurrentType, ({ name: iconName, character }) => ({
|
37
37
|
id: `${change_case_1.paramCase(iconLibrary)}:${iconName}`,
|
38
|
-
name: iconName,
|
39
38
|
type: change_case_1.paramCase(iconLibrary),
|
39
|
+
name: iconName,
|
40
40
|
character
|
41
41
|
})))
|
42
42
|
.keyBy('id')
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reactNativeVectorIcons.js","sourceRoot":"","sources":["../../../../src/constants/iconInfo/reactNativeVectorIcons.ts"],"names":[],"mappings":";;;;;AAAA,wGAA2E;AAC3E,kGAAqE;AACrE,wGAA0E;AAC1E,oGAAuE;AACvE,4GAA+E;AAC/E,gIAA+F;AAC/F,sHAAqF;AACrF,sGAAyE;AACzE,0GAA6E;AAC7E,sGAAwE;AACxE,kIAAgG;AAChG,gHAA8E;AAC9E,sGAAwE;AACxE,oHAAsF;AACtF,kGAAqE;AACrE,6CAAwC;AACxC,mCAAoC;AAEpC,MAAM,aAAa,GAAG,EAAC,SAAS,EAAT,wBAAS,EAAE,MAAM,EAAN,qBAAM,EAAE,QAAQ,EAAR,wBAAQ,EAAE,OAAO,EAAP,sBAAO,EAAE,WAAW,EAAX,0BAAW,EAAC,QAAQ,EAAR,uBAAQ,EAAE,UAAU,EAAV,yBAAU,EAAE,OAAO,EAAP,uBAAO,EAAE,iBAAiB,EAAjB,qCAAiB,EAAE,QAAQ,EAAR,4BAAQ,EAAE,OAAO,EAAP,uBAAO,EAAE,cAAc,EAAd,8BAAc,EAAE,MAAM,EAAN,qBAAM,EAAC,CAAC;
|
1
|
+
{"version":3,"file":"reactNativeVectorIcons.js","sourceRoot":"","sources":["../../../../src/constants/iconInfo/reactNativeVectorIcons.ts"],"names":[],"mappings":";;;;;AAAA,wGAA2E;AAC3E,kGAAqE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