@evlop/commons 1.0.137 → 1.0.141

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/dist/src/constants/i18ninstance.d.ts.map +1 -1
  2. package/dist/src/constants/i18ninstance.js +8 -0
  3. package/dist/src/constants/i18ninstance.js.map +1 -1
  4. package/dist/src/constants/iconInfo/types.d.ts +5 -5
  5. package/dist/src/constants/iconInfo/types.d.ts.map +1 -1
  6. package/dist/src/helpers/i18nHelpers.d.ts +2 -0
  7. package/dist/src/helpers/i18nHelpers.d.ts.map +1 -0
  8. package/dist/src/helpers/i18nHelpers.js +8 -0
  9. package/dist/src/helpers/i18nHelpers.js.map +1 -0
  10. package/dist/src/helpers/i18nHelpers.native.d.ts +2 -0
  11. package/dist/src/helpers/i18nHelpers.native.d.ts.map +1 -0
  12. package/dist/src/helpers/i18nHelpers.native.js +12 -0
  13. package/dist/src/helpers/i18nHelpers.native.js.map +1 -0
  14. package/dist/src/helpers/index.d.ts +1 -0
  15. package/dist/src/helpers/index.d.ts.map +1 -1
  16. package/dist/src/helpers/index.js +1 -0
  17. package/dist/src/helpers/index.js.map +1 -1
  18. package/dist/src/helpers/themeHelpers.d.ts +5 -5
  19. package/dist/src/helpers/themeHelpers.d.ts.map +1 -1
  20. package/dist/src/helpers/themeHelpers.js +7 -2
  21. package/dist/src/helpers/themeHelpers.js.map +1 -1
  22. package/dist/src/providers/I18nProvider.d.ts.map +1 -1
  23. package/dist/src/providers/I18nProvider.js +21 -5
  24. package/dist/src/providers/I18nProvider.js.map +1 -1
  25. package/dist/src/providers/SessionManager.d.ts +3 -0
  26. package/dist/src/providers/SessionManager.d.ts.map +1 -0
  27. package/dist/src/providers/SessionManager.js +24 -0
  28. package/dist/src/providers/SessionManager.js.map +1 -0
  29. package/dist/src/providers/index.d.ts +1 -0
  30. package/dist/src/providers/index.d.ts.map +1 -1
  31. package/dist/src/providers/index.js +1 -0
  32. package/dist/src/providers/index.js.map +1 -1
  33. package/dist/src/reducers/index.d.ts +13 -0
  34. package/dist/src/reducers/index.d.ts.map +1 -1
  35. package/dist/src/reducers/index.js +3 -0
  36. package/dist/src/reducers/index.js.map +1 -1
  37. package/dist/src/reducers/pages/index.d.ts.map +1 -1
  38. package/dist/src/reducers/pages/index.js +0 -1
  39. package/dist/src/reducers/pages/index.js.map +1 -1
  40. package/dist/src/reducers/session.d.ts +45 -0
  41. package/dist/src/reducers/session.d.ts.map +1 -0
  42. package/dist/src/reducers/session.js +89 -0
  43. package/dist/src/reducers/session.js.map +1 -0
  44. package/package.json +4 -3
@@ -0,0 +1,2 @@
1
+ export declare function getLoacale(): string;
2
+ //# sourceMappingURL=i18nHelpers.d.ts.map
@@ -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,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getLoacale = void 0;
4
+ function getLoacale() {
5
+ return 'en-US';
6
+ }
7
+ exports.getLoacale = getLoacale;
8
+ //# sourceMappingURL=i18nHelpers.js.map
@@ -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,2 @@
1
+ export declare function getLoacale(): any;
2
+ //# sourceMappingURL=i18nHelpers.native.d.ts.map
@@ -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"}
@@ -3,4 +3,5 @@ export * from './functions';
3
3
  export * from './commonStyles';
4
4
  export * from './themeHelpers';
5
5
  export * from './base64';
6
+ export * from './i18nHelpers';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -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]: number;
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]: number;
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]: number;
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]: number;
88
+ [x: string]: string;
89
89
  };
90
90
  declare const colors: {
91
91
  white: string;
@@ -96,7 +96,7 @@ declare const colors: {
96
96
  info: string;
97
97
  warning: string;
98
98
  danger: string;
99
- grey: string;
99
+ gray: string;
100
100
  };
101
101
  declare type BaseColors = typeof colors;
102
102
  declare type BaseColor = keyof BaseColors;
@@ -1 +1 @@
1
- {"version":3,"file":"themeHelpers.d.ts","sourceRoot":"","sources":["../../../src/helpers/themeHelpers.tsx"],"names":[],"mappings":"AA+BA,eAAO,MAAM,iBAAiB,aAAa,MAAM;;;;CAAqF,CAAC;AAGvI,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,MA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AAW,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 => scale * baseSize);
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 = {
@@ -93,7 +98,7 @@ const colors = {
93
98
  info: '#008f7b',
94
99
  warning: '#ff00ff',
95
100
  danger: '#ff0000',
96
- grey: '#696969'
101
+ gray: '#696969'
97
102
  };
98
103
  const colorShades = {
99
104
  // whiten
@@ -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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C,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"}
@@ -1 +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"}
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"}
@@ -25,19 +25,34 @@ Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.I18nProvider = void 0;
26
26
  const lodash_1 = require("lodash");
27
27
  const react_1 = __importStar(require("react"));
28
+ const react_redux_1 = require("react-redux");
28
29
  const i18ninstance_1 = __importDefault(require("../constants/i18ninstance"));
29
30
  const useConfig_1 = require("../hooks/useConfig");
31
+ const reducers_1 = require("../reducers");
30
32
  const Scope_1 = require("./Scope");
31
33
  const I18nProvider = ({ children }) => {
34
+ const dispatch = react_redux_1.useDispatch();
32
35
  const i18nResources = useConfig_1.useConfig('i18n');
33
- const [state, setState] = react_1.useState({ language: i18ninstance_1.default.language, v: Date.now() });
36
+ const [version, setVersion] = react_1.useState(Date.now());
37
+ const language = react_redux_1.useSelector(s => s.session.data.language);
38
+ const setLanguage = react_1.useCallback((lng) => dispatch(reducers_1.setSessionValue('language', lng)), [dispatch]);
34
39
  react_1.useEffect(() => {
35
- const languageChangeHandeller = (lng) => setState(s => (Object.assign(Object.assign({}, s), { language: lng })));
40
+ if (language === i18ninstance_1.default.language)
41
+ return;
42
+ if (language) {
43
+ i18ninstance_1.default.changeLanguage(language);
44
+ }
45
+ else {
46
+ setLanguage(i18ninstance_1.default.language);
47
+ }
48
+ }, [language]);
49
+ react_1.useEffect(() => {
50
+ const languageChangeHandeller = (lng) => setLanguage(lng);
36
51
  i18ninstance_1.default.on("languageChanged", languageChangeHandeller);
37
52
  return () => i18ninstance_1.default.off("languageChanged", languageChangeHandeller);
38
- }, []);
53
+ }, [setLanguage]);
39
54
  react_1.useEffect(() => {
40
- const resourceChangeHandeller = () => setState(s => (Object.assign(Object.assign({}, s), { v: Date.now() })));
55
+ const resourceChangeHandeller = () => setVersion(Date.now());
41
56
  i18ninstance_1.default.on("added", resourceChangeHandeller);
42
57
  i18ninstance_1.default.on("removed", resourceChangeHandeller);
43
58
  return () => {
@@ -48,7 +63,8 @@ const I18nProvider = ({ children }) => {
48
63
  react_1.useEffect(() => {
49
64
  lodash_1.forEach(i18nResources, (values, language) => i18ninstance_1.default.addResources(language, 'common', values));
50
65
  }, [i18nResources]);
51
- return (react_1.default.createElement(Scope_1.ScopeProvider, { name: "i18n", value: state }, children));
66
+ const i18nScope = react_1.useMemo(() => ({ v: version, language }), [version, language]);
67
+ return (react_1.default.createElement(Scope_1.ScopeProvider, { name: "i18n", value: i18nScope }, children));
52
68
  };
53
69
  exports.I18nProvider = I18nProvider;
54
70
  exports.default = exports.I18nProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"I18nProvider.js","sourceRoot":"","sources":["../../../src/providers/I18nProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA+B;AAC/B,+CAAiD;AACjD,6EAAqD;AACrD,kDAA+C;AAC/C,mCAAwC;AAEjC,MAAM,YAAY,GAA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AAO,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"}
@@ -0,0 +1,3 @@
1
+ export declare function SessionManager(): any;
2
+ export default SessionManager;
3
+ //# sourceMappingURL=SessionManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionManager.d.ts","sourceRoot":"","sources":["../../../src/providers/SessionManager.tsx"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,QAmB7B;AAED,eAAe,cAAc,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SessionManager = void 0;
4
+ const lodash_1 = require("lodash");
5
+ const react_1 = require("react");
6
+ const react_redux_1 = require("react-redux");
7
+ const session_1 = require("../reducers/session");
8
+ function SessionManager() {
9
+ const dispatch = react_redux_1.useDispatch();
10
+ const session = react_redux_1.useSelector(s => s.session);
11
+ const [id, data, pendingUpdates] = lodash_1.at(session, ['id', 'data', 'pendingUpdates']);
12
+ react_1.useEffect(() => {
13
+ console.log(id, data, pendingUpdates);
14
+ if (lodash_1.isEmpty(pendingUpdates) || !id)
15
+ return;
16
+ const updates = lodash_1.reduce(pendingUpdates, (values, key) => (Object.assign(Object.assign({}, values), { [key]: lodash_1.isUndefined(data[key]) ? null : data[key] })), {});
17
+ console.log('updating values', updates);
18
+ dispatch(session_1.updateRemoteSessionData(id, updates));
19
+ }, [id, pendingUpdates, data, dispatch]);
20
+ return null;
21
+ }
22
+ exports.SessionManager = SessionManager;
23
+ exports.default = SessionManager;
24
+ //# sourceMappingURL=SessionManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionManager.js","sourceRoot":"","sources":["../../../src/providers/SessionManager.tsx"],"names":[],"mappings":";;;AAAA,mCAA0D;AAC1D,iCAAkC;AAClC,6CAAuD;AACvD,iDAA8D;AAE9D,SAAgB,cAAc;IAE1B,MAAM,QAAQ,GAAG,yBAAW,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,yBAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAE5C,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,cAAc,CAAC,GAAG,WAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAA;IAEhF,iBAAS,CAAC,GAAE,EAAE;QACV,OAAO,CAAC,GAAG,CAAE,EAAE,EAAE,IAAI,EAAE,cAAc,CAAC,CAAA;QACtC,IAAG,gBAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;YAAE,OAAO;QAC1C,MAAM,OAAO,GAAG,eAAM,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,GAAG,EAAC,EAAE,CAAA,iCAC/C,MAAM,KACT,CAAC,GAAG,CAAC,EAAE,oBAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IACjD,EAAE,EAAE,CAAC,CAAA;QACP,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAA;QACvC,QAAQ,CAAC,iCAAuB,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA;IAClD,CAAC,EAAE,CAAC,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEzC,OAAO,IAAI,CAAC;AAChB,CAAC;AAnBD,wCAmBC;AAED,kBAAe,cAAc,CAAC"}
@@ -1,3 +1,4 @@
1
+ export * from './SessionManager';
1
2
  export * from './DataSource';
2
3
  export * from './Scope';
3
4
  export * from './Scopes';
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC"}
@@ -10,6 +10,7 @@ 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("./SessionManager"), exports);
13
14
  __exportStar(require("./DataSource"), exports);
14
15
  __exportStar(require("./Scope"), exports);
15
16
  __exportStar(require("./Scopes"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA6B;AAC7B,0CAAwB;AACxB,2CAAyB;AACzB,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAiC;AACjC,+CAA6B;AAC7B,0CAAwB;AACxB,2CAAyB;AACzB,iDAA+B"}
@@ -16,6 +16,18 @@ export declare const reducers: {
16
16
  adminMenus: (state: any, action: any) => any;
17
17
  form: any;
18
18
  user: (state: any, action: any) => any;
19
+ session: {
20
+ (state: {
21
+ id: string;
22
+ data: {};
23
+ pendingUpdates: any[];
24
+ }, action: any): {
25
+ id: string;
26
+ data: {};
27
+ pendingUpdates: any[];
28
+ };
29
+ persist: boolean;
30
+ };
19
31
  context: (state: any, action: any) => any;
20
32
  components: (state: any, action: any) => any;
21
33
  collection: (state: any, action: any) => any;
@@ -51,5 +63,6 @@ export * from './modals';
51
63
  export * from './notifications';
52
64
  export * from './routes';
53
65
  export * from './user';
66
+ export * from './session';
54
67
  export default reducers;
55
68
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/reducers/index.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,eAAe,KAAyB,CAAC;AACtD,eAAO,MAAM,iBAAiB,KAA2B,CAAC;AAC1D,eAAO,MAAM,qBAAqB,KAAgC,CAAC;AACnE,eAAO,MAAM,eAAe,KAAyB,CAAC;AACtD,eAAO,MAAM,iBAAiB,KAA2B,CAAC;AAC1D,eAAO,MAAM,gBAAgB,KAA2B,CAAC;AAEzD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBpB,CAAC;AAEF,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AAEvB,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/reducers/index.tsx"],"names":[],"mappings":"AAoBA,eAAO,MAAM,eAAe,KAAyB,CAAC;AACtD,eAAO,MAAM,iBAAiB,KAA2B,CAAC;AAC1D,eAAO,MAAM,qBAAqB,KAAgC,CAAC;AACnE,eAAO,MAAM,eAAe,KAAyB,CAAC;AACtD,eAAO,MAAM,iBAAiB,KAA2B,CAAC;AAC1D,eAAO,MAAM,gBAAgB,KAA2B,CAAC;AAEzD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBpB,CAAC;AAEF,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAE1B,eAAe,QAAQ,CAAC"}
@@ -19,6 +19,7 @@ const redux_rest_1 = require("@mukti107/redux-rest");
19
19
  const config_1 = __importDefault(require("./config"));
20
20
  const components_1 = __importDefault(require("./components"));
21
21
  const context_1 = __importDefault(require("./context"));
22
+ const session_1 = __importDefault(require("./session"));
22
23
  const user_1 = __importDefault(require("./user"));
23
24
  const routes_1 = __importDefault(require("./routes"));
24
25
  const icons_1 = __importDefault(require("./icons"));
@@ -46,6 +47,7 @@ exports.reducers = {
46
47
  adminMenus: adminMenus_1.default,
47
48
  form: redux_form_1.reducer,
48
49
  user: user_1.default,
50
+ session: session_1.default,
49
51
  context: context_1.default,
50
52
  components: components_1.default,
51
53
  collection: collection_1.default,
@@ -72,5 +74,6 @@ __exportStar(require("./modals"), exports);
72
74
  __exportStar(require("./notifications"), exports);
73
75
  __exportStar(require("./routes"), exports);
74
76
  __exportStar(require("./user"), exports);
77
+ __exportStar(require("./session"), exports);
75
78
  exports.default = exports.reducers;
76
79
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src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ACJ,OAAO,EAAP,iBAAO;IACP,OAAO,EAAP,iBAAO;IACP,UAAU,EAAV,oBAAU;IACV,UAAU,EAAV,oBAAU;IACV,UAAU,EAAV,oBAAU;IACV,KAAK,EAAL,eAAK;IACL,KAAK,EAAL,eAAK;IACL,MAAM,EAAN,gBAAM;IACN,MAAM,EAAN,gBAAM;IACN,MAAM,EAAN,gBAAM;IACN,aAAa,EAAb,uBAAa;IACb,KAAK,EAAL,eAAK;CACR,CAAC;AAEF,+CAA6B;AAC7B,+CAA6B;AAC7B,+CAA6B;AAC7B,+CAA6B;AAC7B,2CAAyB;AACzB,4CAA0B;AAC1B,0CAAwB;AACxB,0CAAwB;AACxB,0CAAwB;AACxB,0CAAwB;AACxB,2CAAyB;AACzB,kDAAgC;AAChC,2CAAyB;AACzB,yCAAuB;AACvB,4CAA0B;AAE1B,kBAAe,gBAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":"AAiBA,QAAA,MAAM,KAAK;yBAA2C,GAAG;;CAkJxD,CAAC;AAIF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,KAAK;yBAA2C,GAAG;;CAkJxD,CAAC;AAIF,eAAe,KAAK,CAAC"}
@@ -26,7 +26,6 @@ const REST_QUERY_PAGE_RUNNING = "REST_QUERY_PAGE_RUNNING";
26
26
  const REST_QUERY_PAGE_FAILED = "REST_QUERY_PAGE_FAILED";
27
27
  const PAGE_BLOCKS_UPDATED = "PAGE_BLOCKS_UPDATED";
28
28
  const PAGE_DATA_UPDATED = "PAGE_DATA_UPDATED";
29
- // reducer copied from @mukti107/redux-rest
30
29
  const initialState = initialState_1.default;
31
30
  const pages = function (state = initialState, action) {
32
31
  switch (action.type) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","source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E,KAAK,MAAM,CAAC,CAAA;YAEjE,IAAI,SAAS,GAAG,CAAC,CAAC,EAAC;gBACf,MAAM,OAAO,GAAG,eAAM,CAAC,EAAE,EAAE,OAAO,CAAC,SAAS,CAAC,EAAC,OAAO,CAAC,CAAC;gBACvD,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,EAAE,OAAO,CAAC,CAAA;gBACrC,aAAa,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;aACnC;YAED,uCACO,KAAK,KACR,UAAU,EAAE,aAAa,EACzB,OAAO,kCACA,cAAc,KACjB,IAAI,EAAE,OAAO,OAEnB;SACL;QACD;YACI,OAAO,KAAK,CAAC;KACpB;AAET,CAAC,CAAC;AAEF,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;AAErB,kBAAe,KAAK,CAAC"}
@@ -0,0 +1,45 @@
1
+ export declare const SET_SESSION_VALUE = "session/set-value";
2
+ export declare const SET_SESSION_VALUES = "session/set-values";
3
+ export declare const RESET_SESSION = "session/reset";
4
+ export declare const SESSION_UPDATE_REMOTE_STARTED = "session/update-remote-started";
5
+ export declare const SESSION_UPDATE_REMOTE_SUCCESS = "session/update-remote-success";
6
+ export declare const SESSION_UPDATE_REMOTE_FAILED = "session/update-remote-failed";
7
+ export declare const setSessionValue: (key: string, value: any) => {
8
+ type: string;
9
+ key: string;
10
+ value: any;
11
+ };
12
+ export declare const setSessionValues: (values: Object) => {
13
+ type: string;
14
+ values: Object;
15
+ };
16
+ export declare const updateRemoteSessionData: (sessionId: string, values: Object) => {
17
+ method: string;
18
+ types: string[] | ([string, string, string] & {
19
+ length: 3;
20
+ });
21
+ pathParams?: {
22
+ [key: string]: any;
23
+ };
24
+ key?: string;
25
+ isRestRequest: boolean;
26
+ endpoint: string;
27
+ data: any;
28
+ };
29
+ export declare const resetSession: () => {
30
+ type: string;
31
+ };
32
+ declare const session: {
33
+ (state: {
34
+ id: string;
35
+ data: {};
36
+ pendingUpdates: any[];
37
+ }, action: any): {
38
+ id: string;
39
+ data: {};
40
+ pendingUpdates: any[];
41
+ };
42
+ persist: boolean;
43
+ };
44
+ export default session;
45
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/reducers/session.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAE7C,eAAO,MAAM,6BAA6B,kCAAkC,CAAC;AAC7E,eAAO,MAAM,6BAA6B,kCAAkC,CAAC;AAC7E,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AAE3E,eAAO,MAAM,eAAe,QAAQ,MAAM,SAAS,GAAG;;;;CAIpD,CAAC;AAEH,eAAO,MAAM,gBAAgB,WAAY,MAAM;;;CAG7C,CAAC;AAEH,eAAO,MAAM,uBAAuB,cAAc,MAAM,UAAU,MAAM;;;;;;;;;;;;CAQvE,CAAA;AAED,eAAO,MAAM,YAAY;;CAEvB,CAAC;AAUH,QAAA,MAAM,OAAO;;;;;;;;;;;CA6DZ,CAAC;AAGF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resetSession = exports.updateRemoteSessionData = exports.setSessionValues = exports.setSessionValue = exports.SESSION_UPDATE_REMOTE_FAILED = exports.SESSION_UPDATE_REMOTE_SUCCESS = exports.SESSION_UPDATE_REMOTE_STARTED = exports.RESET_SESSION = exports.SET_SESSION_VALUES = exports.SET_SESSION_VALUE = void 0;
4
+ const lodash_1 = require("lodash");
5
+ const uuid_1 = require("uuid");
6
+ const actions_1 = require("../actions");
7
+ const uuidv4 = () => uuid_1.v5(`${lodash_1.random(Number.MAX_SAFE_INTEGER)}${Date.now()}`, 'fa1e65c4-2aad-4ba8-b0e1-3a3955fff466');
8
+ exports.SET_SESSION_VALUE = 'session/set-value';
9
+ exports.SET_SESSION_VALUES = 'session/set-values';
10
+ exports.RESET_SESSION = 'session/reset';
11
+ exports.SESSION_UPDATE_REMOTE_STARTED = 'session/update-remote-started';
12
+ exports.SESSION_UPDATE_REMOTE_SUCCESS = 'session/update-remote-success';
13
+ exports.SESSION_UPDATE_REMOTE_FAILED = 'session/update-remote-failed';
14
+ const setSessionValue = (key, value) => ({
15
+ type: exports.SET_SESSION_VALUE,
16
+ key,
17
+ value,
18
+ });
19
+ exports.setSessionValue = setSessionValue;
20
+ const setSessionValues = (values) => ({
21
+ type: exports.SET_SESSION_VALUES,
22
+ values,
23
+ });
24
+ exports.setSessionValues = setSessionValues;
25
+ const updateRemoteSessionData = (sessionId, values) => {
26
+ return actions_1.request(`/api/sessions/:sessionId`, values, {
27
+ method: "PUT",
28
+ pathParams: {
29
+ sessionId
30
+ },
31
+ types: [exports.SESSION_UPDATE_REMOTE_STARTED, exports.SESSION_UPDATE_REMOTE_SUCCESS, exports.SESSION_UPDATE_REMOTE_FAILED]
32
+ });
33
+ };
34
+ exports.updateRemoteSessionData = updateRemoteSessionData;
35
+ const resetSession = () => ({
36
+ type: exports.RESET_SESSION,
37
+ });
38
+ exports.resetSession = resetSession;
39
+ const generateEmptyState = () => ({
40
+ id: uuidv4(),
41
+ data: {},
42
+ pendingUpdates: [],
43
+ });
44
+ const initialState = generateEmptyState();
45
+ const session = (state = initialState, action) => {
46
+ switch (action.type) {
47
+ case exports.SET_SESSION_VALUE: {
48
+ const { key, value } = action;
49
+ // if values has not changed return current state, no update required
50
+ if (state.data[key] === value)
51
+ return state;
52
+ return Object.assign(Object.assign({}, state), { data: Object.assign(Object.assign({}, state.data), { [key]: value }), pendingUpdates: [...state.pendingUpdates, key] });
53
+ }
54
+ case exports.SET_SESSION_VALUE: {
55
+ const { values } = action;
56
+ // ignore the values that are same as current state values
57
+ const updates = lodash_1.reduce(values, (previous, value, key) => {
58
+ if (state.data[key] === value)
59
+ return previous;
60
+ return Object.assign(Object.assign({}, previous), { [key]: value });
61
+ }, {});
62
+ // if the updates is empty, return current state, no update required
63
+ if (lodash_1.isEmpty(updates))
64
+ return state;
65
+ return Object.assign(Object.assign({}, state), { data: Object.assign(Object.assign({}, state.data), updates), pendingUpdates: [...state.pendingUpdates, lodash_1.keys(updates)] });
66
+ }
67
+ case exports.SESSION_UPDATE_REMOTE_SUCCESS: {
68
+ const { data: values } = action;
69
+ // take only keys, for which updated value is same as current state value
70
+ // to avoide race condition
71
+ const updatedKeys = lodash_1.reduce(values, (previous, value, key) => {
72
+ if (state.data[key] === value)
73
+ return [...previous, key];
74
+ return previous;
75
+ }, []);
76
+ // if the updates is empty, return current state, no update required
77
+ if (lodash_1.isEmpty(updatedKeys))
78
+ return state;
79
+ return Object.assign(Object.assign({}, state), { pendingUpdates: lodash_1.difference(state.pendingUpdates, updatedKeys) });
80
+ }
81
+ case exports.RESET_SESSION:
82
+ return generateEmptyState();
83
+ default:
84
+ return state;
85
+ }
86
+ };
87
+ session.persist = true;
88
+ exports.default = session;
89
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/reducers/session.tsx"],"names":[],"mappings":";;;AAAA,mCAAwE;AACxE,+BAAoC;AACpC,wCAAqC;AAErC,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,SAAM,CAAC,GAAG,eAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,sCAAsC,CAAE,CAAC;AAE3G,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AACxC,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,QAAA,aAAa,GAAG,eAAe,CAAC;AAEhC,QAAA,6BAA6B,GAAG,+BAA+B,CAAC;AAChE,QAAA,6BAA6B,GAAG,+BAA+B,CAAC;AAChE,QAAA,4BAA4B,GAAG,8BAA8B,CAAC;AAEpE,MAAM,eAAe,GAAG,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K,CAAC;YAEtC,uCACO,KAAK,KACR,cAAc,EAAE,mBAAU,CAAC,KAAK,CAAC,cAAc,EAAE,WAAW,CAAC,IAC/D;SACL;QACD,KAAK,qBAAa;YACd,OAAO,kBAAkB,EAAE,CAAC;QAChC;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAC;AAEF,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;AACvB,kBAAe,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evlop/commons",
3
- "version": "1.0.137",
3
+ "version": "1.0.141",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "peerDependencies": {
@@ -27,7 +27,6 @@
27
27
  },
28
28
  "optionalDependencies": {},
29
29
  "dependencies": {
30
- "@evlop/web-components": "^1.0.21",
31
30
  "moment": "^2.29.1",
32
31
  "react-native-base64": "^0.2.1"
33
32
  },
@@ -50,6 +49,7 @@
50
49
  "@types/lodash": "^4.14.168",
51
50
  "@types/node": "^15.0.2",
52
51
  "@types/react": "^16.14.0",
52
+ "@types/react-native": "^0.67.8",
53
53
  "@types/uuid": "^8.3.4",
54
54
  "chai": "^4.3.4",
55
55
  "change-case": "^4.1.2",
@@ -58,7 +58,8 @@
58
58
  "jest": "^26.6.3",
59
59
  "lodash": "^4.17.21",
60
60
  "mocha": "^8.4.0",
61
- "react-native-vector-icons": "^9.0.0",
61
+ "react-native": "^0.68.2",
62
+ "react-native-vector-icons": "^9.1.0",
62
63
  "ts-node": "^10.4.0",
63
64
  "typescript": "^4.1.3",
64
65
  "uuid": "^8.3.2"