@evlop/commons 1.0.84 → 1.0.85
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/constants/index.d.ts +2 -0
- package/dist/src/constants/index.d.ts.map +1 -1
- package/dist/src/constants/index.js +3 -1
- package/dist/src/constants/index.js.map +1 -1
- package/dist/src/constants/platformSpecific.d.ts +1 -3
- package/dist/src/constants/platformSpecific.d.ts.map +1 -1
- package/dist/src/constants/platformSpecific.js +0 -4
- package/dist/src/constants/platformSpecific.js.map +1 -1
- package/dist/src/hooks/useConfig.d.ts +1 -1
- package/dist/src/hooks/useConfig.d.ts.map +1 -1
- package/dist/src/hooks/useConfig.js.map +1 -1
- package/dist/src/hooks/useNavigator.d.ts.map +1 -1
- package/dist/src/hooks/useNavigator.js +4 -2
- package/dist/src/hooks/useNavigator.js.map +1 -1
- package/package.json +1 -1
@@ -6,6 +6,8 @@ export declare const DIRECTION_LEFT = "direction/Left";
|
|
6
6
|
export declare const VERTICAL_LAYOUT = "layout/vertical";
|
7
7
|
export declare const HORIZONTAL_LAYOUT = "layout/horizontal";
|
8
8
|
export declare const TYPE_COMPONENT = "type/component";
|
9
|
+
export declare const API_BASE_URL: string;
|
10
|
+
export declare const SOCKET_URL: string;
|
9
11
|
export { default as iconInfo } from './iconInfo';
|
10
12
|
export * from './platformSpecific';
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,SAAgE,CAAC;AAEpF,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;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,SAAgE,CAAC;AAEpF,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;AAC/C,eAAO,MAAM,YAAY,QAAiE,CAAC;AAC3F,eAAO,MAAM,UAAU,QAA6E,CAAC;AAErG,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,oBAAoB,CAAC"}
|
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
14
14
|
};
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
exports.iconInfo = exports.TYPE_COMPONENT = exports.HORIZONTAL_LAYOUT = exports.VERTICAL_LAYOUT = exports.DIRECTION_LEFT = exports.DIRECTION_BOTTOM = exports.DIRECTION_RIGHT = exports.DIRECTION_TOP = exports.IS_SSR = void 0;
|
16
|
+
exports.iconInfo = exports.SOCKET_URL = exports.API_BASE_URL = exports.TYPE_COMPONENT = exports.HORIZONTAL_LAYOUT = exports.VERTICAL_LAYOUT = exports.DIRECTION_LEFT = exports.DIRECTION_BOTTOM = exports.DIRECTION_RIGHT = exports.DIRECTION_TOP = exports.IS_SSR = void 0;
|
17
17
|
exports.IS_SSR = ['true', '1'].includes(String(process.env.SSR).toLowerCase());
|
18
18
|
exports.DIRECTION_TOP = "direction/Top";
|
19
19
|
exports.DIRECTION_RIGHT = "direction/Right";
|
@@ -22,6 +22,8 @@ exports.DIRECTION_LEFT = "direction/Left";
|
|
22
22
|
exports.VERTICAL_LAYOUT = 'layout/vertical';
|
23
23
|
exports.HORIZONTAL_LAYOUT = 'layout/horizontal';
|
24
24
|
exports.TYPE_COMPONENT = "type/component";
|
25
|
+
exports.API_BASE_URL = process.env.API_BASE_URL || process.env.REACT_APP_API_BASE_URL;
|
26
|
+
exports.SOCKET_URL = process.env.SOCKET_URL || process.env.REACT_APP_SOCKET_URL || exports.API_BASE_URL;
|
25
27
|
var iconInfo_1 = require("./iconInfo");
|
26
28
|
Object.defineProperty(exports, "iconInfo", { enumerable: true, get: function () { return __importDefault(iconInfo_1).default; } });
|
27
29
|
__exportStar(require("./platformSpecific"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAa,QAAA,MAAM,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAEvE,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,eAAe,GAAG,iBAAiB,CAAC;AACpC,QAAA,gBAAgB,GAAG,kBAAkB,CAAC;AACtC,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAGlC,QAAA,eAAe,GAAG,iBAAiB,CAAC;AACpC,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AAExC,QAAA,cAAc,GAAG,gBAAgB,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAa,QAAA,MAAM,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAEvE,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,eAAe,GAAG,iBAAiB,CAAC;AACpC,QAAA,gBAAgB,GAAG,kBAAkB,CAAC;AACtC,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAGlC,QAAA,eAAe,GAAG,iBAAiB,CAAC;AACpC,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AAExC,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAClC,QAAA,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;AAC9E,QAAA,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,oBAAY,CAAC;AAErG,uCAAiD;AAAxC,qHAAA,OAAO,OAAY;AAC5B,qDAAmC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platformSpecific.d.ts","sourceRoot":"","sources":["../../../src/constants/platformSpecific.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"platformSpecific.d.ts","sourceRoot":"","sources":["../../../src/constants/platformSpecific.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC"}
|
@@ -1,7 +1,3 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.APP_NAME = exports.SOCKET_URL = exports.API_BASE_URL = void 0;
|
4
|
-
exports.API_BASE_URL = process.env.API_BASE_URL || process.env.REACT_APP_API_BASE_URL;
|
5
|
-
exports.SOCKET_URL = process.env.SOCKET_URL || process.env.REACT_APP_SOCKET_URL || exports.API_BASE_URL;
|
6
|
-
exports.APP_NAME = "";
|
7
3
|
//# sourceMappingURL=platformSpecific.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platformSpecific.js","sourceRoot":"","sources":["../../../src/constants/platformSpecific.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"platformSpecific.js","sourceRoot":"","sources":["../../../src/constants/platformSpecific.ts"],"names":[],"mappings":""}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const useConfig: (configName
|
1
|
+
export declare const useConfig: (configName?: string) => any;
|
2
2
|
//# sourceMappingURL=useConfig.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../../src/hooks/useConfig.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,
|
1
|
+
{"version":3,"file":"useConfig.d.ts","sourceRoot":"","sources":["../../../src/hooks/useConfig.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,gBAAiB,MAAM,QAE5C,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useConfig.js","sourceRoot":"","sources":["../../../src/hooks/useConfig.tsx"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,mCAA2B;AAEpB,MAAM,SAAS,GAAG,CAAC,
|
1
|
+
{"version":3,"file":"useConfig.js","sourceRoot":"","sources":["../../../src/hooks/useConfig.tsx"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,mCAA2B;AAEpB,MAAM,SAAS,GAAG,CAAC,UAAmB,EAAC,EAAE;IAC5C,OAAO,yBAAW,CAAC,CAAC,CAA8B,EAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,YAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAE,CAAC;AACxH,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useNavigator.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNavigator.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,
|
1
|
+
{"version":3,"file":"useNavigator.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNavigator.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,WA0BxB,CAAC;AAEF,eAAO,MAAM,aAAa,WAAe,CAAC"}
|
@@ -15,10 +15,11 @@ const useNavigator = () => {
|
|
15
15
|
const history = react_router_1.useHistory();
|
16
16
|
const { state, search, hash, pathname } = react_router_1.useLocation();
|
17
17
|
const dispatch = react_redux_1.useDispatch();
|
18
|
-
|
18
|
+
const navigator = react_1.useRef({});
|
19
|
+
react_1.useEffect(() => {
|
19
20
|
const allParams = params;
|
20
21
|
const queryParams = query_string_1.default.parse(search);
|
21
|
-
|
22
|
+
lodash_1.assign(navigator.current, history, {
|
22
23
|
pop: history.back,
|
23
24
|
navigate: (name, params) => history.push(dispatch(reducers_1.getPagePath(name, params))),
|
24
25
|
openPage: (name, params) => history.push(dispatch(reducers_1.getPagePath(name, params))),
|
@@ -32,6 +33,7 @@ const useNavigator = () => {
|
|
32
33
|
})
|
33
34
|
});
|
34
35
|
}, [params, history, pathname, hash, search, state]);
|
36
|
+
return navigator.current;
|
35
37
|
};
|
36
38
|
exports.useNavigator = useNavigator;
|
37
39
|
exports.useNavigation = exports.useNavigator;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useNavigator.js","sourceRoot":"","sources":["../../../src/hooks/useNavigator.tsx"],"names":[],"mappings":";;;;;;AAAA,mCAAgC;AAChC,
|
1
|
+
{"version":3,"file":"useNavigator.js","sourceRoot":"","sources":["../../../src/hooks/useNavigator.tsx"],"names":[],"mappings":";;;;;;AAAA,mCAAgC;AAChC,iCAAmD;AACnD,6CAA0C;AAC1C,gEAAuC;AACvC,+CAAkE;AAClE,0CAA0C;AAEnC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC7B,MAAM,MAAM,GAAG,wBAAS,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAG,yBAAU,EAAE,CAAC;IAC7B,MAAM,EAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAC,GAAG,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