@evlop/commons 1.0.152 → 1.0.154

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +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,EA+ChC,CAAA;AAED,eAAe,YAAY,CAAC"}
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,EAiDhC,CAAA;AAED,eAAe,YAAY,CAAC"}
@@ -51,19 +51,20 @@ const I18nProvider = ({ children }) => {
51
51
  i18ninstance_1.default.on("languageChanged", languageChangeHandeller);
52
52
  return () => i18ninstance_1.default.off("languageChanged", languageChangeHandeller);
53
53
  }, [setLanguage]);
54
+ const updatei18nResourceVersion = react_1.useCallback(lodash_1.debounce(() => setVersion(Date.now()), 250), []);
54
55
  react_1.useEffect(() => {
55
- const resourceChangeHandeller = lodash_1.debounce(() => setVersion(Date.now()), 200);
56
+ const resourceChangeHandeller = () => updatei18nResourceVersion();
56
57
  i18ninstance_1.default.on("added", resourceChangeHandeller);
57
58
  i18ninstance_1.default.on("removed", resourceChangeHandeller);
58
59
  return () => {
59
60
  i18ninstance_1.default.off("added", resourceChangeHandeller);
60
61
  i18ninstance_1.default.off("removed", resourceChangeHandeller);
61
62
  };
62
- }, []);
63
+ }, [updatei18nResourceVersion]);
63
64
  react_1.useEffect(() => {
64
65
  lodash_1.forEach(i18nResources, (values, language) => i18ninstance_1.default.addResources(language, 'common', values));
65
- setVersion(Date.now());
66
- }, [i18nResources]);
66
+ updatei18nResourceVersion();
67
+ }, [i18nResources, updatei18nResourceVersion]);
67
68
  const i18nScope = react_1.useMemo(() => ({ v: version, language }), [version, language]);
68
69
  return (react_1.default.createElement(Scope_1.ScopeProvider, { name: "i18n", value: i18nScope }, children));
69
70
  };
@@ -1 +1 @@
1
- {"version":3,"file":"I18nProvider.js","sourceRoot":"","sources":["../../../src/providers/I18nProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAyC;AACzC,+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,CAAC,GAAG,EAAE,CAAC,CAAC;IAEnD,MAAM,QAAQ,GAAG,yBAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC1D,MAAM,WAAW,GAAG,mBAAW,CAAC,CAAC,GAAW,EAAC,EAAE,CAAA,QAAQ,CAAC,0BAAe,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEtG,iBAAS,CAAC,GAAE,EAAE;QACZ,IAAG,QAAQ,KAAK,sBAAY,CAAC,QAAQ;YAAE,OAAO;QAE9C,IAAG,QAAQ,EAAE;YACX,sBAAY,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;SACvC;aAAK;YACJ,WAAW,CAAC,sBAAY,CAAC,QAAQ,CAAC,CAAC;SACpC;IACH,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,iBAAS,CAAC,GAAE,EAAE;QACV,MAAM,uBAAuB,GAAG,CAAC,GAAU,EAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC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AQ,CAAC,CAAC,CAAC;IAE7E,OAAO,CAAC,8BAAC,qBAAa,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,SAAS,IAC5C,QAAQ,CACG,CAAC,CAAC;AACtB,CAAC,CAAA;AAjDY,QAAA,YAAY,gBAiDxB;AAED,kBAAe,oBAAY,CAAC"}
package/package.json CHANGED
@@ -1,28 +1,15 @@
1
1
  {
2
2
  "name": "@evlop/commons",
3
- "version": "1.0.152",
3
+ "version": "1.0.154",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "peerDependencies": {
7
- "@mukti107/redux-rest": "^1.0.20",
8
- "handlebars": "^4.7.6",
7
+ "change-case": "^4.1.2",
8
+ "handlebars": "^4.7.7",
9
9
  "i18next": "^21.8.8",
10
- "change-case": "^4.1.1",
11
- "lodash": "latest",
12
- "polished": "latest",
13
- "react": "latest",
14
- "react-native": "latest",
15
- "@react-navigation/native": "latest",
16
- "react-router": "latest",
17
- "react-redux": "latest",
18
- "react-dnd": "latest",
19
- "recompose": "latest",
20
- "styled-components": "latest",
21
- "socket.io-client": "latest",
22
- "pluralize": "latest",
23
- "query-string": "latest",
24
- "@react-native-async-storage/async-storage": "latest",
25
- "react-native-vector-icons": "^9.0.0",
10
+ "lodash": "^4.17.21",
11
+ "react-native": "^0.68.2",
12
+ "react-native-vector-icons": "^9.1.0",
26
13
  "uuid": "^8.3.2"
27
14
  },
28
15
  "optionalDependencies": {},