@evlop/commons 1.0.135 → 1.0.139
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/constants/i18ninstance.d.ts.map +1 -1
- package/dist/src/constants/i18ninstance.js +8 -0
- package/dist/src/constants/i18ninstance.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 +1 -1
- package/dist/src/constants/index.d.ts.map +1 -1
- package/dist/src/constants/index.js.map +1 -1
- package/dist/src/helpers/themeHelpers.d.ts +1 -1
- package/dist/src/helpers/themeHelpers.js +1 -1
- package/dist/src/providers/{I18nProvider.d.ts → I18nProvider/index.d.ts} +1 -1
- package/dist/src/providers/I18nProvider/index.d.ts.map +1 -0
- package/dist/src/providers/{I18nProvider.js → I18nProvider/index.js} +27 -9
- package/dist/src/providers/I18nProvider/index.js.map +1 -0
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.app.d.ts +2 -0
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.app.d.ts.map +1 -0
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.app.js +20 -0
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.app.js.map +1 -0
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.d.ts +2 -0
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.d.ts.map +1 -0
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.js +6 -0
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.js.map +1 -0
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.native.d.ts +2 -0
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.native.d.ts.map +1 -0
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.native.js +21 -0
- package/dist/src/providers/I18nProvider/useDirectionSwitcher.native.js.map +1 -0
- package/dist/src/providers/SessionManager.d.ts +3 -0
- package/dist/src/providers/SessionManager.d.ts.map +1 -0
- package/dist/src/providers/SessionManager.js +24 -0
- package/dist/src/providers/SessionManager.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/dist/src/reducers/index.d.ts +13 -0
- package/dist/src/reducers/index.d.ts.map +1 -1
- package/dist/src/reducers/index.js +3 -0
- package/dist/src/reducers/index.js.map +1 -1
- package/dist/src/reducers/pages/index.d.ts.map +1 -1
- package/dist/src/reducers/pages/index.js +0 -1
- package/dist/src/reducers/pages/index.js.map +1 -1
- package/dist/src/reducers/session.d.ts +45 -0
- package/dist/src/reducers/session.d.ts.map +1 -0
- package/dist/src/reducers/session.js +89 -0
- package/dist/src/reducers/session.js.map +1 -0
- package/package.json +5 -4
- 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/providers/I18nProvider.d.ts.map +0 -1
- package/dist/src/providers/I18nProvider.js.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useDirectionSwitcher.js","sourceRoot":"","sources":["../../../../src/providers/I18nProvider/useDirectionSwitcher.ts"],"names":[],"mappings":";;AACA,SAAwB,oBAAoB,CAAC,GAAW;AAExD,CAAC;AAFD,uCAEC"}
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -0,0 +1,21 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -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 +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":"
|
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/reducers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAkD;AAClD,qDAAuD;AACvD,sDAA8B;AAC9B,8DAAsC;AACtC,wDAAgC;AAChC,kDAA0B;AAC1B,sDAA8B;AAC9B,oDAA4B;AAC5B,sDAA8B;AAC9B,oEAA4C;AAC5C,oDAA4B;AAC5B,oDAA4B;AAC5B,oDAA4B;AAC5B,8DAAsC;AACtC,8DAAsC;AACtC,8DAAsC;AAEtC,MAAM,cAAc,GAAG,8BAAiB,CAAC;AAE5B,QAAA,eAAe,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AACzC,QAAA,iBAAiB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAC7C,QAAA,qBAAqB,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;AACtD,QAAA,eAAe,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AACzC,QAAA,iBAAiB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAC7C,QAAA,gBAAgB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAE5C,QAAA,QAAQ,GAAG;IACpB,KAAK,EAAL,eAAK;IACL,KAAK,EAAE,uBAAe,CAAC,OAAO;IAC9B,OAAO,EAAE,yBAAiB,CAAC,OAAO;IAClC,OAAO,EAAE,wBAAgB,CAAC,OAAO;IACjC,OAAO,EAAE,yBAAiB,CAAC,OAAO;IAClC,UAAU,EAAV,oBAAU;IACV,IAAI,EAAE,oBAAW;IACjB,IAAI,EAAJ,cAAI;IACJ,OAAO,EAAP,iBAAO;IACP,UAAU,EAAV,oBAAU;IACV,UAAU,EAAV,oBAAU;IACV,UAAU,EAAV,oBAAU;IACV,KAAK,EAAL,eAAK;IACL,KAAK,EA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CAAC,OAAO;IACjC,OAAO,EAAE,yBAAiB,CAAC,OAAO;IAClC,UAAU,EAAV,oBAAU;IACV,IAAI,EAAE,oBAAW;IACjB,IAAI,EAAJ,cAAI;IACJ,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":"
|
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","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mCAAgC;AAChC,kEAA+C;AAE/C,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AACxD,MAAM,yBAAyB,GAAG,2BAA2B,CAAC;AAC9D,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AACxD,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAClD,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/reducers/pages/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mCAAgC;AAChC,kEAA+C;AAE/C,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AACxD,MAAM,yBAAyB,GAAG,2BAA2B,CAAC;AAC9D,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAC1D,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AACxD,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAClD,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C,MAAM,YAAY,GAAO,sBAAiB,CAAA;AAC1C,MAAM,KAAK,GAAG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;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,wCA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/B,MAAM,EAAC,IAAI,EAAE,MAAM,EAAC,GAAG,MAAM,CAAC;YAE9B,yEAAyE;YACzE,2BAA2B;YAC3B,MAAM,WAAW,GAAG,eAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAC,EAAE;gBACvD,IAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAI,KAAK;oBAAE,OAAO,CAAC,GAAG,QAAQ,EAAE,GAAG,CAAC,CAAC;gBACvD,OAAO,QAAQ,CAAA;YACnB,CAAC,EAAE,EAAE,CAAC,CAAA;YAEN,oEAAoE;YACpE,IAAG,gBAAO,CAAC,WAAW,CAAC;gBAAE,OAAO,KAAK,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.
|
3
|
+
"version": "1.0.139",
|
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
|
},
|
@@ -36,7 +35,7 @@
|
|
36
35
|
"docs": "jsdoc -c jsdoc.json",
|
37
36
|
"dev": "tsc --watch",
|
38
37
|
"test": "mocha -r ts-node/register src/**/*.test.ts",
|
39
|
-
"build": "tsc",
|
38
|
+
"build": " ts-node bin/generate-icons-type.ts && tsc",
|
40
39
|
"generate-icon-names": "ts-node ./generateIcons.ts"
|
41
40
|
},
|
42
41
|
"files": [
|
@@ -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
|
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"
|
package/dist/generateIcons.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"generateIcons.d.ts","sourceRoot":"","sources":["../generateIcons.ts"],"names":[],"mappings":""}
|
package/dist/generateIcons.js
DELETED
@@ -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 +0,0 @@
|
|
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 +0,0 @@
|
|
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,GAAa,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE;IACnD,MAAM,aAAa,GAAG,qBAAS,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,gBAAQ,CAAC,EAAC,QAAQ,EAAE,sBAAY,CAAC,QAAQ,EAAE,CAAC,EAAE,IAAI,C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