@evlop/commons 1.0.133 → 1.0.136

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. package/dist/bin/generate-icons-type.d.ts +2 -0
  2. package/dist/bin/generate-icons-type.d.ts.map +1 -0
  3. package/dist/bin/generate-icons-type.js +29 -0
  4. package/dist/bin/generate-icons-type.js.map +1 -0
  5. package/dist/src/components/index.d.ts +0 -1
  6. package/dist/src/components/index.d.ts.map +1 -1
  7. package/dist/src/components/index.js +0 -1
  8. package/dist/src/components/index.js.map +1 -1
  9. package/dist/src/constants/i18ninstance.d.ts +1 -1
  10. package/dist/src/constants/i18ninstance.d.ts.map +1 -1
  11. package/dist/src/constants/i18ninstance.js +4 -3
  12. package/dist/src/constants/i18ninstance.js.map +1 -1
  13. package/dist/src/constants/iconInfo/index.d.ts +4 -2
  14. package/dist/src/constants/iconInfo/index.d.ts.map +1 -1
  15. package/dist/src/constants/iconInfo/index.js +2 -1
  16. package/dist/src/constants/iconInfo/index.js.map +1 -1
  17. package/dist/src/constants/iconInfo/reactNativeVectorIcons.d.ts +1 -32
  18. package/dist/src/constants/iconInfo/reactNativeVectorIcons.d.ts.map +1 -1
  19. package/dist/src/constants/iconInfo/reactNativeVectorIcons.js +1 -1
  20. package/dist/src/constants/iconInfo/reactNativeVectorIcons.js.map +1 -1
  21. package/dist/src/constants/index.d.ts +2 -2
  22. package/dist/src/constants/index.d.ts.map +1 -1
  23. package/dist/src/constants/index.js +2 -2
  24. package/dist/src/constants/index.js.map +1 -1
  25. package/dist/src/contexts/DataContext.d.ts +1 -1
  26. package/dist/src/contexts/DataContext.d.ts.map +1 -1
  27. package/dist/src/contexts/DataContext.js +2 -2
  28. package/dist/src/contexts/DataContext.js.map +1 -1
  29. package/dist/src/providers/I18nProvider.d.ts +4 -0
  30. package/dist/src/providers/I18nProvider.d.ts.map +1 -0
  31. package/dist/src/providers/I18nProvider.js +55 -0
  32. package/dist/src/providers/I18nProvider.js.map +1 -0
  33. package/dist/src/providers/Scope.d.ts +4 -0
  34. package/dist/src/providers/Scope.d.ts.map +1 -1
  35. package/dist/src/providers/Scope.js +5 -1
  36. package/dist/src/providers/Scope.js.map +1 -1
  37. package/dist/src/providers/Scopes.d.ts +11 -0
  38. package/dist/src/providers/Scopes.d.ts.map +1 -0
  39. package/dist/src/providers/Scopes.js +38 -0
  40. package/dist/src/providers/Scopes.js.map +1 -0
  41. package/dist/src/providers/index.d.ts +3 -1
  42. package/dist/src/providers/index.d.ts.map +1 -1
  43. package/dist/src/providers/index.js +3 -1
  44. package/dist/src/providers/index.js.map +1 -1
  45. package/package.json +2 -2
  46. package/dist/generateIcons.d.ts +0 -2
  47. package/dist/generateIcons.d.ts.map +0 -1
  48. package/dist/generateIcons.js +0 -13
  49. package/dist/generateIcons.js.map +0 -1
  50. package/dist/src/components/I18nManager.d.ts +0 -4
  51. package/dist/src/components/I18nManager.d.ts.map +0 -1
  52. package/dist/src/components/I18nManager.js +0 -20
  53. package/dist/src/components/I18nManager.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=generate-icons-type.d.ts.map
@@ -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.d.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,qCAAqC,EACrC;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,4 +1,3 @@
1
- export * from './I18nManager';
2
1
  export * from './EmptyComponent';
3
2
  export * from './hoc';
4
3
  export * from './SkipSSR';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAgBA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AAEjC,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,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,gDAA8B;AAC9B,mDAAiC;AACjC,mCAAmC;AACnC,wCAAsB;AACtB,4CAA0B;AAE1B,4CAA4C"}
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,3 @@
1
- declare const i18nInstance: import("i18next").i18n;
1
+ export declare const i18nInstance: import("i18next").i18n;
2
2
  export default i18nInstance;
3
3
  //# sourceMappingURL=i18ninstance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18ninstance.d.ts","sourceRoot":"","sources":["../../../src/constants/i18ninstance.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,YAAY,wBAA2B,CAAC;AAM9C,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"i18ninstance.d.ts","sourceRoot":"","sources":["../../../src/constants/i18ninstance.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,wBAA2B,CAAC;AAMrD,eAAe,YAAY,CAAC"}
@@ -3,11 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.i18nInstance = void 0;
6
7
  const i18next_1 = __importDefault(require("i18next"));
7
- const i18nInstance = i18next_1.default.createInstance();
8
- i18nInstance.init({
8
+ exports.i18nInstance = i18next_1.default.createInstance();
9
+ exports.i18nInstance.init({
9
10
  fallbackLng: ['en', 'EN'],
10
11
  defaultNS: "common",
11
12
  });
12
- exports.default = i18nInstance;
13
+ exports.default = exports.i18nInstance;
13
14
  //# sourceMappingURL=i18ninstance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18ninstance.js","sourceRoot":"","sources":["../../../src/constants/i18ninstance.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAE9B,MAAM,YAAY,GAAG,iBAAO,CAAC,cAAc,EAAE,CAAC;AAC9C,YAAY,CAAC,IAAI,CAAC;IACd,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACzB,SAAS,EAAE,QAAQ;CACtB,CAAC,CAAC;AAEH,kBAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"i18ninstance.js","sourceRoot":"","sources":["../../../src/constants/i18ninstance.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA8B;AAEjB,QAAA,YAAY,GAAG,iBAAO,CAAC,cAAc,EAAE,CAAC;AACrD,oBAAY,CAAC,IAAI,CAAC;IACd,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACzB,SAAS,EAAE,QAAQ;CACtB,CAAC,CAAC;AAEH,kBAAe,oBAAY,CAAC"}
@@ -1,3 +1,5 @@
1
- declare const _default: {};
2
- export default _default;
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":";AAAA,wBAAiB"}
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,4 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {};
3
+ const icons = {};
4
+ exports.default = icons;
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/constants/iconInfo/index.ts"],"names":[],"mappings":";;AAAA,kBAAe,EAAE,CAAA"}
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":"AACA,OAAO,MAAM,MAAM,iDAAiD,CAAC;AACrE,OAAO,QAAQ,MAAM,oDAAoD,CAAC;AAC1E,OAAO,OAAO,MAAM,kDAAkD,CAAC;AACvE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,iBAAiB,MAAM,gEAAgE,CAAC;AAC/F,OAAO,YAAY,MAAM,2DAA2D,CAAC;AACrF,OAAO,QAAQ,MAAM,mDAAmD,CAAC;AACzE,OAAO,UAAU,MAAM,qDAAqD,CAAC;AAC7E,OAAO,OAAO,MAAM,mDAAmD,CAAC;AACxE,OAAO,iBAAiB,MAAM,iEAAiE,CAAC;AAChG,OAAO,QAAQ,MAAM,wDAAwD,CAAC;AAC9E,OAAO,OAAO,MAAM,mDAAmD,CAAC;AACxE,OAAO,cAAc,MAAM,0DAA0D,CAAC;AACtF,OAAO,MAAM,MAAM,iDAAiD,CAAC;AAKrE,aAAK,OAAO,GAAG,OAAO,iBAAiB,CAAC;AACxC,aAAK,cAAc,GAAG,MAAM,OAAO,CAAC;AACpC,aAAK,WAAW,GAAG,MAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAC7C,aA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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,qBAA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C;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"}
@@ -10,6 +10,6 @@ export declare const HORIZONTAL_LAYOUT = "layout/horizontal";
10
10
  export declare const TYPE_COMPONENT = "type/component";
11
11
  export declare const DATA_SOURCE_KEY_NAMESPACE = "a0aec1c8-4fed-4d5d-b399-504887b3b8e4";
12
12
  export { API_BASE_URL, SOCKET_URL };
13
- export { default as iconInfo } from './iconInfo';
14
- export { default as i18ninstance } from './i18ninstance';
13
+ export { default as iconInfo, IconIdentifier } from './iconInfo';
14
+ export { i18nInstance } from './i18ninstance';
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAI9D,eAAO,MAAM,MAAM,SAAiC,CAAC;AAErD,eAAO,MAAM,MAAM,SAA0E,CAAC;AAE9F,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAG/C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,eAAO,MAAM,yBAAyB,yCAAyC,CAAC;AAChF,OAAO,EAAC,YAAY,EAAE,UAAU,EAAC,CAAA;AAEjC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAI9D,eAAO,MAAM,MAAM,SAAiC,CAAC;AAErD,eAAO,MAAM,MAAM,SAA0E,CAAC;AAE9F,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAG/C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,eAAO,MAAM,yBAAyB,yCAAyC,CAAC;AAChF,OAAO,EAAC,YAAY,EAAE,UAAU,EAAC,CAAA;AAEjC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.i18ninstance = exports.iconInfo = exports.SOCKET_URL = exports.API_BASE_URL = exports.DATA_SOURCE_KEY_NAMESPACE = exports.TYPE_COMPONENT = exports.HORIZONTAL_LAYOUT = exports.VERTICAL_LAYOUT = exports.DIRECTION_LEFT = exports.DIRECTION_BOTTOM = exports.DIRECTION_RIGHT = exports.DIRECTION_TOP = exports.IS_SSR = exports.isNode = void 0;
6
+ exports.i18nInstance = exports.iconInfo = exports.SOCKET_URL = exports.API_BASE_URL = exports.DATA_SOURCE_KEY_NAMESPACE = exports.TYPE_COMPONENT = exports.HORIZONTAL_LAYOUT = exports.VERTICAL_LAYOUT = exports.DIRECTION_LEFT = exports.DIRECTION_BOTTOM = exports.DIRECTION_RIGHT = exports.DIRECTION_TOP = exports.IS_SSR = exports.isNode = void 0;
7
7
  const platformSpecific_1 = require("./platformSpecific");
8
8
  Object.defineProperty(exports, "API_BASE_URL", { enumerable: true, get: function () { return platformSpecific_1.API_BASE_URL; } });
9
9
  Object.defineProperty(exports, "SOCKET_URL", { enumerable: true, get: function () { return platformSpecific_1.SOCKET_URL; } });
@@ -20,5 +20,5 @@ exports.DATA_SOURCE_KEY_NAMESPACE = "a0aec1c8-4fed-4d5d-b399-504887b3b8e4";
20
20
  var iconInfo_1 = require("./iconInfo");
21
21
  Object.defineProperty(exports, "iconInfo", { enumerable: true, get: function () { return __importDefault(iconInfo_1).default; } });
22
22
  var i18ninstance_1 = require("./i18ninstance");
23
- Object.defineProperty(exports, "i18ninstance", { enumerable: true, get: function () { return __importDefault(i18ninstance_1).default; } });
23
+ Object.defineProperty(exports, "i18nInstance", { enumerable: true, get: function () { return i18ninstance_1.i18nInstance; } });
24
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":";;;;;;AAAA,yDAA8D;AAoBtD,6FApBC,+BAAY,OAoBD;AAAE,2FApBC,6BAAU,OAoBD;AAhBnB,QAAA,MAAM,GAAG,OAAO,OAAO,KAAK,WAAW,CAAC;AAExC,QAAA,MAAM,GAAG,cAAM,IAAI,C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D,qHAAA,OAAO,OAAY;AAC5B,+CAA8C;AAArC,4GAAA,YAAY,OAAA"}
@@ -1,5 +1,5 @@
1
1
  declare const DataContext: import("react").Context<{}>;
2
2
  export declare const DataProvider: import("react").Provider<{}>;
3
- export declare const ComponentData: import("react").Consumer<{}>;
3
+ export declare const DataConsumer: import("react").Consumer<{}>;
4
4
  export default DataContext;
5
5
  //# sourceMappingURL=DataContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/DataContext.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW,6BAAoB,CAAC;AAEtC,eAAO,MAAM,YAAY,8BAAuB,CAAC;AAEjD,eAAO,MAAM,aAAa,8BAAuB,CAAC;AAElD,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"DataContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/DataContext.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW,6BAAoB,CAAC;AAEtC,eAAO,MAAM,YAAY,8BAAuB,CAAC;AAEjD,eAAO,MAAM,YAAY,8BAAuB,CAAC;AAEjD,eAAe,WAAW,CAAA"}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ComponentData = exports.DataProvider = void 0;
3
+ exports.DataConsumer = exports.DataProvider = void 0;
4
4
  const react_1 = require("react");
5
5
  const DataContext = react_1.createContext({});
6
6
  exports.DataProvider = DataContext.Provider;
7
- exports.ComponentData = DataContext.Consumer;
7
+ exports.DataConsumer = DataContext.Consumer;
8
8
  exports.default = DataContext;
9
9
  //# sourceMappingURL=DataContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataContext.js","sourceRoot":"","sources":["../../../src/contexts/DataContext.tsx"],"names":[],"mappings":";;;AAAA,iCAAoC;AAEpC,MAAM,WAAW,GAAG,qBAAa,CAAC,EAAE,CAAC,CAAC;AAEzB,QAAA,YAAY,GAAG,WAAW,CAAC,QAAQ,CAAC;AAEpC,QAAA,aAAa,GAAG,WAAW,CAAC,QAAQ,CAAC;AAElD,kBAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"DataContext.js","sourceRoot":"","sources":["../../../src/contexts/DataContext.tsx"],"names":[],"mappings":";;;AAAA,iCAAoC;AAEpC,MAAM,WAAW,GAAG,qBAAa,CAAC,EAAE,CAAC,CAAC;AAEzB,QAAA,YAAY,GAAG,WAAW,CAAC,QAAQ,CAAC;AAEpC,QAAA,YAAY,GAAG,WAAW,CAAC,QAAQ,CAAC;AAEjD,kBAAe,WAAW,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const I18nProvider: React.FC;
3
+ export default I18nProvider;
4
+ //# sourceMappingURL=I18nProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"I18nProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/I18nProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EA6BhC,CAAA;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.I18nProvider = void 0;
26
+ const lodash_1 = require("lodash");
27
+ const react_1 = __importStar(require("react"));
28
+ const i18ninstance_1 = __importDefault(require("../constants/i18ninstance"));
29
+ const useConfig_1 = require("../hooks/useConfig");
30
+ const Scope_1 = require("./Scope");
31
+ const I18nProvider = ({ children }) => {
32
+ const i18nResources = useConfig_1.useConfig('i18n');
33
+ const [state, setState] = react_1.useState({ language: i18ninstance_1.default.language, v: Date.now() });
34
+ react_1.useEffect(() => {
35
+ const languageChangeHandeller = (lng) => setState(s => (Object.assign(Object.assign({}, s), { language: lng })));
36
+ i18ninstance_1.default.on("languageChanged", languageChangeHandeller);
37
+ return () => i18ninstance_1.default.off("languageChanged", languageChangeHandeller);
38
+ }, []);
39
+ react_1.useEffect(() => {
40
+ const resourceChangeHandeller = () => setState(s => (Object.assign(Object.assign({}, s), { v: Date.now() })));
41
+ i18ninstance_1.default.on("added", resourceChangeHandeller);
42
+ i18ninstance_1.default.on("removed", resourceChangeHandeller);
43
+ return () => {
44
+ i18ninstance_1.default.off("added", resourceChangeHandeller);
45
+ i18ninstance_1.default.off("removed", resourceChangeHandeller);
46
+ };
47
+ }, []);
48
+ react_1.useEffect(() => {
49
+ lodash_1.forEach(i18nResources, (values, language) => i18ninstance_1.default.addResources(language, 'common', values));
50
+ }, [i18nResources]);
51
+ return (react_1.default.createElement(Scope_1.ScopeProvider, { name: "i18n", value: state }, children));
52
+ };
53
+ exports.I18nProvider = I18nProvider;
54
+ exports.default = exports.I18nProvider;
55
+ //# sourceMappingURL=I18nProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"I18nProvider.js","sourceRoot":"","sources":["../../../src/providers/I18nProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;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C,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,OAAO,CAAC,8BAAC,qBAAa,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,IACxC,QAAQ,CACG,CAAC,CAAC;AACtB,CAAC,CAAA;AA7BY,QAAA,YAAY,gBA6BxB;AAED,kBAAe,oBAAY,CAAC"}
@@ -3,6 +3,10 @@ interface ScopeProps {
3
3
  name: string;
4
4
  value: any;
5
5
  }
6
+ /**
7
+ * @description use is to provide single scopes name and value
8
+ */
6
9
  export declare const Scope: React.FunctionComponent<ScopeProps>;
10
+ export declare const ScopeProvider: React.FunctionComponent<ScopeProps>;
7
11
  export default Scope;
8
12
  //# sourceMappingURL=Scope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Scope.d.ts","sourceRoot":"","sources":["../../../src/providers/Scope.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAIrC,UAAU,UAAU;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;CACd;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAerD,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Scope.d.ts","sourceRoot":"","sources":["../../../src/providers/Scope.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAIrC,UAAU,UAAU;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;CACd;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAerD,CAAC;AAEF,eAAO,MAAM,aAAa,qCAAQ,CAAC;AAEnC,eAAe,KAAK,CAAC"}
@@ -19,15 +19,19 @@ var __importStar = (this && this.__importStar) || function (mod) {
19
19
  return result;
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.Scope = void 0;
22
+ exports.ScopeProvider = exports.Scope = void 0;
23
23
  const react_1 = __importStar(require("react"));
24
24
  const contexts_1 = require("../contexts");
25
25
  const hooks_1 = require("../hooks");
26
+ /**
27
+ * @description use is to provide single scopes name and value
28
+ */
26
29
  const Scope = ({ name, value, children }) => {
27
30
  const scope = hooks_1.useScope();
28
31
  const newScope = react_1.useMemo(() => (Object.assign(Object.assign({}, scope), { [name]: value })), [scope, name, value]);
29
32
  return (react_1.default.createElement(contexts_1.DataProvider, { value: newScope }, children));
30
33
  };
31
34
  exports.Scope = Scope;
35
+ exports.ScopeProvider = exports.Scope;
32
36
  exports.default = exports.Scope;
33
37
  //# sourceMappingURL=Scope.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Scope.js","sourceRoot":"","sources":["../../../src/providers/Scope.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqC;AACrC,0CAAyC;AACzC,oCAAkC;AAO3B,MAAM,KAAK,GAAwC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAG,QAAQ,EAAC,EAAE,EAAE;IACnF,MAAM,KAAK,GAAG,gBAAQ,EAAE,CAAC;IAEzB,MAAM,QAAQ,GAAG,eAAO,CAAC,GAAE,EAAE,CAAA,iCAElB,KAAK,KACR,CAAC,IAAI,CAAC,EAAE,KAAK,IAEpB,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IAEzB,OAAO,CACH,8BAAC,uBAAY,IAAC,KAAK,EAAE,QAAQ,IACxB,QAAQ,CACE,CAClB,CAAC;AACN,CAAC,CAAC;AAfW,QAAA,KAAK,SAehB;AAEF,kBAAe,aAAK,CAAC"}
1
+ {"version":3,"file":"Scope.js","sourceRoot":"","sources":["../../../src/providers/Scope.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqC;AACrC,0CAAyC;AACzC,oCAAkC;AAOlC;;GAEG;AACI,MAAM,KAAK,GAAwC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAG,QAAQ,EAAC,EAAE,EAAE;IACnF,MAAM,KAAK,GAAG,gBAAQ,EAAE,CAAC;IAEzB,MAAM,QAAQ,GAAG,eAAO,CAAC,GAAE,EAAE,CAAA,iCAElB,KAAK,KACR,CAAC,IAAI,CAAC,EAAE,KAAK,IAEpB,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IAEzB,OAAO,CACH,8BAAC,uBAAY,IAAC,KAAK,EAAE,QAAQ,IACxB,QAAQ,CACE,CAClB,CAAC;AACN,CAAC,CAAC;AAfW,QAAA,KAAK,SAehB;AAEW,QAAA,aAAa,GAAG,aAAK,CAAC;AAEnC,kBAAe,aAAK,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface ScopesProps {
3
+ values: Object;
4
+ }
5
+ /**
6
+ * @description use is to provide multiple scopes
7
+ */
8
+ export declare const Scopes: React.FunctionComponent<ScopesProps>;
9
+ export declare const ScopesProvider: React.FunctionComponent<ScopesProps>;
10
+ export default Scopes;
11
+ //# sourceMappingURL=Scopes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scopes.d.ts","sourceRoot":"","sources":["../../../src/providers/Scopes.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAIrC,UAAU,WAAW;IACjB,MAAM,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAUvD,CAAC;AAEF,eAAO,MAAM,cAAc,sCAAS,CAAC;AAErC,eAAe,MAAM,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.ScopesProvider = exports.Scopes = void 0;
23
+ const lodash_1 = require("lodash");
24
+ const react_1 = __importStar(require("react"));
25
+ const contexts_1 = require("../contexts");
26
+ const hooks_1 = require("../hooks");
27
+ /**
28
+ * @description use is to provide multiple scopes
29
+ */
30
+ const Scopes = ({ values, children }) => {
31
+ const scope = hooks_1.useScope();
32
+ const newScope = react_1.useMemo(() => lodash_1.assign({}, scope, values), [scope, values]);
33
+ return (react_1.default.createElement(contexts_1.DataProvider, { value: newScope }, children));
34
+ };
35
+ exports.Scopes = Scopes;
36
+ exports.ScopesProvider = exports.Scopes;
37
+ exports.default = exports.Scopes;
38
+ //# sourceMappingURL=Scopes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scopes.js","sourceRoot":"","sources":["../../../src/providers/Scopes.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAgC;AAChC,+CAAqC;AACrC,0CAAyC;AACzC,oCAAkC;AAMlC;;GAEG;AACI,MAAM,MAAM,GAAyC,CAAC,EAAC,MAAM,EAAE,QAAQ,EAAC,EAAE,EAAE;IAC/E,MAAM,KAAK,GAAG,gBAAQ,EAAE,CAAC;IAEzB,MAAM,QAAQ,GAAG,eAAO,CAAC,GAAE,EAAE,CAAC,eAAM,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IAE1E,OAAO,CACH,8BAAC,uBAAY,IAAC,KAAK,EAAE,QAAQ,IACxB,QAAQ,CACE,CAClB,CAAC;AACN,CAAC,CAAC;AAVW,QAAA,MAAM,UAUjB;AAEW,QAAA,cAAc,GAAG,cAAM,CAAC;AAErC,kBAAe,cAAM,CAAC"}
@@ -1,3 +1,5 @@
1
- export * from './Scope';
2
1
  export * from './DataSource';
2
+ export * from './Scope';
3
+ export * from './Scopes';
4
+ export * from './I18nProvider';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC"}
@@ -10,6 +10,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./Scope"), exports);
14
13
  __exportStar(require("./DataSource"), exports);
14
+ __exportStar(require("./Scope"), exports);
15
+ __exportStar(require("./Scopes"), exports);
16
+ __exportStar(require("./I18nProvider"), exports);
15
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAAwB;AACxB,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA6B;AAC7B,0CAAwB;AACxB,2CAAyB;AACzB,iDAA+B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evlop/commons",
3
- "version": "1.0.133",
3
+ "version": "1.0.136",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "peerDependencies": {
@@ -36,7 +36,7 @@
36
36
  "docs": "jsdoc -c jsdoc.json",
37
37
  "dev": "tsc --watch",
38
38
  "test": "mocha -r ts-node/register src/**/*.test.ts",
39
- "build": "tsc",
39
+ "build": " ts-node bin/generate-icons-type.ts && tsc",
40
40
  "generate-icon-names": "ts-node ./generateIcons.ts"
41
41
  },
42
42
  "files": [
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=generateIcons.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateIcons.d.ts","sourceRoot":"","sources":["../generateIcons.ts"],"names":[],"mappings":""}
@@ -1,13 +0,0 @@
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 lodash_1 = require("lodash");
7
- const change_case_1 = require("change-case");
8
- const iconInfo_1 = __importDefault(require("./src/constants/iconInfo"));
9
- require('fs').writeFileSync('./src/constants/icons.ts', [
10
- 'const icons = ' + JSON.stringify(lodash_1.chain(Object.keys(iconInfo_1.default)).mapKeys(k => change_case_1.constantCase(k)).mapValues(k => k).value(), null, 2),
11
- 'export default icons;'
12
- ].join('\n'));
13
- //# sourceMappingURL=generateIcons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateIcons.js","sourceRoot":"","sources":["../generateIcons.ts"],"names":[],"mappings":";;;;;AAAA,mCAA+B;AAC/B,6CAA2C;AAC3C,wEAAgD;AAEhD,OAAO,CAAC,IAAI,CAAC,CAAC,aAAa,CACzB,0BAA0B,EAC1B;IACE,gBAAgB,GAAC,IAAI,CAAC,SAAS,CAAC,cAAK,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA,EAAE,CAAA,0BAAY,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA,EAAE,CAAA,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1H,uBAAuB;CACxB,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC"}
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare const I18nManager: React.FC;
3
- export default I18nManager;
4
- //# sourceMappingURL=I18nManager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"I18nManager.d.ts","sourceRoot":"","sources":["../../../src/components/I18nManager.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAU/B,CAAA;AAED,eAAe,WAAW,CAAC"}
@@ -1,20 +0,0 @@
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
- exports.I18nManager = void 0;
7
- const lodash_1 = require("lodash");
8
- const react_1 = require("react");
9
- const i18ninstance_1 = __importDefault(require("../constants/i18ninstance"));
10
- const useConfig_1 = require("../hooks/useConfig");
11
- const I18nManager = () => {
12
- const i18nResources = useConfig_1.useConfig('i18n');
13
- react_1.useEffect(() => {
14
- lodash_1.forEach(i18nResources, (values, language) => i18ninstance_1.default.addResources(language, 'common', values));
15
- }, [i18nResources]);
16
- return null;
17
- };
18
- exports.I18nManager = I18nManager;
19
- exports.default = exports.I18nManager;
20
- //# sourceMappingURL=I18nManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"I18nManager.js","sourceRoot":"","sources":["../../../src/components/I18nManager.tsx"],"names":[],"mappings":";;;;;;AAAA,mCAA+B;AAC/B,iCAAuC;AACvC,6EAAqD;AACrD,kDAA+C;AAExC,MAAM,WAAW,GAAa,GAAG,EAAE;IACxC,MAAM,aAAa,GAAG,qBAAS,CAAC,MAAM,CAAC,CAAC;IAExC,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,OAAO,IAAI,CAAC;AACd,CAAC,CAAA;AAVY,QAAA,WAAW,eAUvB;AAED,kBAAe,mBAAW,CAAC"}