@evlop/commons 1.0.71 → 1.0.75
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/generateIcons.d.ts +2 -0
- package/dist/generateIcons.d.ts.map +1 -0
- package/dist/generateIcons.js +13 -0
- package/dist/generateIcons.js.map +1 -0
- package/dist/src/classes/Model.d.ts +3 -3
- package/dist/src/components/hoc/withCollection.d.ts +3 -3
- package/dist/src/components/hoc/withCollectionRecord.d.ts +2 -2
- package/dist/src/constants/iconInfo.d.ts +17 -0
- package/dist/src/constants/iconInfo.d.ts.map +1 -0
- package/dist/src/constants/iconInfo.js +47 -0
- package/dist/src/constants/iconInfo.js.map +1 -0
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/constants/index.d.ts.map +1 -1
- package/dist/src/constants/index.js +6 -1
- package/dist/src/constants/index.js.map +1 -1
- package/dist/src/reducers/context.d.ts +3 -3
- package/package.json +7 -3
- package/dist/src/hooks/useNavigator.native.d.ts +0 -3
- package/dist/src/hooks/useNavigator.native.d.ts.map +0 -1
- package/dist/src/hooks/useNavigator.native.js +0 -23
- package/dist/src/hooks/useNavigator.native.js.map +0 -1
- package/dist/src/hooks/useNavigator.web.d.ts +0 -3
- package/dist/src/hooks/useNavigator.web.d.ts.map +0 -1
- package/dist/src/hooks/useNavigator.web.js +0 -23
- package/dist/src/hooks/useNavigator.web.js.map +0 -1
- package/dist/src/hooks/useParams.native.d.ts +0 -2
- package/dist/src/hooks/useParams.native.d.ts.map +0 -1
- package/dist/src/hooks/useParams.native.js +0 -11
- package/dist/src/hooks/useParams.native.js.map +0 -1
- package/dist/src/hooks/useParams.web.d.ts +0 -2
- package/dist/src/hooks/useParams.web.d.ts.map +0 -1
- package/dist/src/hooks/useParams.web.js +0 -11
- package/dist/src/hooks/useParams.web.js.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generateIcons.d.ts","sourceRoot":"","sources":["../generateIcons.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,13 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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"}
|
@@ -12,9 +12,9 @@ export declare class Model {
|
|
12
12
|
constructor(record?: {});
|
13
13
|
static config(schema: any, { modelName, collectionName, singularName, pluralName, ...otherOptions }?: {
|
14
14
|
modelName?: string;
|
15
|
-
collectionName?:
|
16
|
-
singularName?:
|
17
|
-
pluralName?:
|
15
|
+
collectionName?: string;
|
16
|
+
singularName?: string;
|
17
|
+
pluralName?: string;
|
18
18
|
}): void;
|
19
19
|
static get formFields(): any;
|
20
20
|
get viewDetails(): {
|
@@ -2,8 +2,8 @@ export declare function withCollection(collectionName: string): {
|
|
2
2
|
({ children }: {
|
3
3
|
children: any;
|
4
4
|
}): JSX.Element;
|
5
|
-
routeName:
|
6
|
-
path:
|
7
|
-
pageName:
|
5
|
+
routeName: string;
|
6
|
+
path: string;
|
7
|
+
pageName: string;
|
8
8
|
};
|
9
9
|
//# sourceMappingURL=withCollection.d.ts.map
|
@@ -2,8 +2,8 @@ export declare function withCollectionRecord(collectionName: string): {
|
|
2
2
|
({ children }: {
|
3
3
|
children: any;
|
4
4
|
}): JSX.Element;
|
5
|
-
routeName:
|
5
|
+
routeName: string;
|
6
6
|
path: string;
|
7
|
-
pageName:
|
7
|
+
pageName: string;
|
8
8
|
};
|
9
9
|
//# sourceMappingURL=withCollectionRecord.d.ts.map
|
@@ -0,0 +1,17 @@
|
|
1
|
+
declare const iconInfo: {
|
2
|
+
[x: string]: {
|
3
|
+
id: string;
|
4
|
+
label: string;
|
5
|
+
type: string;
|
6
|
+
name: string;
|
7
|
+
variant: string;
|
8
|
+
character: any;
|
9
|
+
} | {
|
10
|
+
id: string;
|
11
|
+
iconName: string;
|
12
|
+
type: string;
|
13
|
+
character: never;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
export default iconInfo;
|
17
|
+
//# sourceMappingURL=iconInfo.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"iconInfo.d.ts","sourceRoot":"","sources":["../../../src/constants/iconInfo.ts"],"names":[],"mappings":"AAoDA,QAAA,MAAO,QAAQ;;;;;;;;;;;;;;CAAgC,CAAC;AAEhD,eAAe,QAAQ,CAAA"}
|
@@ -0,0 +1,47 @@
|
|
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 AntDesign_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/AntDesign.json"));
|
7
|
+
const Entypo_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/Entypo.json"));
|
8
|
+
const EvilIcons_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/EvilIcons.json"));
|
9
|
+
const Feather_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/Feather.json"));
|
10
|
+
const FontAwesome_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/FontAwesome.json"));
|
11
|
+
const FontAwesome5Free_meta_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/FontAwesome5Free_meta.json"));
|
12
|
+
const FontAwesome5Free_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/FontAwesome5Free.json"));
|
13
|
+
const Fontisto_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/Fontisto.json"));
|
14
|
+
const Foundation_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/Foundation.json"));
|
15
|
+
const Ionicons_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/Ionicons.json"));
|
16
|
+
const MaterialCommunityIcons_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json"));
|
17
|
+
const MaterialIcons_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/MaterialIcons.json"));
|
18
|
+
const Octicons_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/Octicons.json"));
|
19
|
+
const SimpleLineIcons_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/SimpleLineIcons.json"));
|
20
|
+
const Zocial_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/Zocial.json"));
|
21
|
+
const change_case_1 = require("change-case");
|
22
|
+
const lodash_1 = require("lodash");
|
23
|
+
const iconLibraries = { Antdesign: AntDesign_json_1.default, Entypo: Entypo_json_1.default, Evilicon: EvilIcons_json_1.default, Feather: Feather_json_1.default, FontAwesome: FontAwesome_json_1.default, Fontisto: Fontisto_json_1.default, Foundation: Foundation_json_1.default, Ionicon: Ionicons_json_1.default, MaterialCommunity: MaterialCommunityIcons_json_1.default, Material: MaterialIcons_json_1.default, Octicon: Octicons_json_1.default, SimpleLineIcon: SimpleLineIcons_json_1.default, Zocial: Zocial_json_1.default };
|
24
|
+
const fa5Icons = lodash_1.chain(FontAwesome5Free_meta_json_1.default)
|
25
|
+
.flatMap((iconNames, variant) => lodash_1.map(iconNames, iconName => ({
|
26
|
+
id: `font-awesome-5:${variant}:${iconName}`,
|
27
|
+
label: iconName,
|
28
|
+
type: 'font-awesome-5',
|
29
|
+
name: iconName,
|
30
|
+
variant,
|
31
|
+
character: FontAwesome5Free_json_1.default[iconName],
|
32
|
+
})))
|
33
|
+
.keyBy('id')
|
34
|
+
.value();
|
35
|
+
const vectorIcons = lodash_1.chain(iconLibraries)
|
36
|
+
.mapValues((libraryIcons) => lodash_1.map(libraryIcons, (character, name) => ({ character, name })))
|
37
|
+
.flatMap((iconsOfCurrentType, iconLibrary) => lodash_1.map(iconsOfCurrentType, ({ name: name, character }) => ({
|
38
|
+
id: `${change_case_1.paramCase(iconLibrary)}:${name}`,
|
39
|
+
iconName: name,
|
40
|
+
type: change_case_1.paramCase(iconLibrary),
|
41
|
+
character
|
42
|
+
})))
|
43
|
+
.keyBy('id')
|
44
|
+
.value();
|
45
|
+
const iconInfo = Object.assign(Object.assign({}, fa5Icons), vectorIcons);
|
46
|
+
exports.default = iconInfo;
|
47
|
+
//# sourceMappingURL=iconInfo.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"iconInfo.js","sourceRoot":"","sources":["../../../src/constants/iconInfo.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,qBAAM,EAAC,CAAC;AAEtK,MAAM,QAAQ,GAAG,cAAK,CAAC,oCAAiB,CAAC;KACpB,OAAO,CACJ,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,CAAC,YAAG,CACvB,SAAS,EACT,QAAQ,CAAC,EAAE,CAAC,CAAC;IACT,EAAE,EAAE,kBAAkB,OAAO,IAAI,QAAQ,EAAE;IAC3C,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,QAAQ;IACd,OAAO;IACP,SAAS,EAAE,+BAAY,CAAC,QAAQ,CAAC;CACpC,CAAC,CACL,CACJ;KACA,KAAK,CAAC,IAAI,CAAC;KACX,KAAK,EAAE,CAAC;AAE7B,MAAM,WAAW,GAAG,cAAK,CAAC,aAAa,CAAC;KAC3B,SAAS,CAAC,CAAC,YAAY,EAAC,EAAE,CAAA,YAAG,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,IAAI,EAAC,EAAE,CAAA,CAAC,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;KACpF,OAAO,CACJ,CAAC,kBAAkB,EAAE,WAAW,EAAC,EAAE,CAAC,YAAG,CAAC,kBAAkB,EACtD,CAAC,EAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,EAAE,EAAE,CAAC,CAAC;IAC1B,EAAE,EAAE,GAAG,uBAAS,CAAC,WAAW,CAAC,IAAI,IAAI,EAAE;IACvC,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,uBAAS,CAAC,WAAW,CAAC;IAC5B,SAAS;CACZ,CAAC,CACL,CACJ;KACA,KAAK,CAAC,IAAI,CAAC;KACX,KAAK,EAAE,CAAC;AAErB,MAAO,QAAQ,mCAAO,QAAQ,GAAK,WAAW,CAAC,CAAC;AAEhD,kBAAe,QAAQ,CAAA"}
|
@@ -8,4 +8,5 @@ export declare const DIRECTION_LEFT = "direction/Left";
|
|
8
8
|
export declare const VERTICAL_LAYOUT = "layout/vertical";
|
9
9
|
export declare const HORIZONTAL_LAYOUT = "layout/horizontal";
|
10
10
|
export declare const TYPE_COMPONENT = "type/component";
|
11
|
+
export { default as iconInfo } from './iconInfo';
|
11
12
|
//# 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,YAAY,QAAiE,CAAC;AAC3F,eAAO,MAAM,UAAU,QAA6E,CAAC;AACrG,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,YAAY,QAAiE,CAAC;AAC3F,eAAO,MAAM,UAAU,QAA6E,CAAC;AACrG,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;AAE/C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
@@ -1,6 +1,9 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
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.SOCKET_URL = exports.API_BASE_URL = void 0;
|
6
|
+
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 = exports.SOCKET_URL = exports.API_BASE_URL = void 0;
|
4
7
|
exports.API_BASE_URL = process.env.API_BASE_URL || process.env.REACT_APP_API_BASE_URL;
|
5
8
|
exports.SOCKET_URL = process.env.SOCKET_URL || process.env.REACT_APP_SOCKET_URL || exports.API_BASE_URL;
|
6
9
|
exports.IS_SSR = ['true', '1'].includes(String(process.env.SSR).toLowerCase());
|
@@ -11,4 +14,6 @@ exports.DIRECTION_LEFT = "direction/Left";
|
|
11
14
|
exports.VERTICAL_LAYOUT = 'layout/vertical';
|
12
15
|
exports.HORIZONTAL_LAYOUT = 'layout/horizontal';
|
13
16
|
exports.TYPE_COMPONENT = "type/component";
|
17
|
+
var iconInfo_1 = require("./iconInfo");
|
18
|
+
Object.defineProperty(exports, "iconInfo", { enumerable: true, get: function () { return __importDefault(iconInfo_1).default; } });
|
14
19
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":";;;;;;AAAa,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;AACxF,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;AAE/C,uCAAiD;AAAxC,qHAAA,OAAO,OAAY"}
|
@@ -7,16 +7,16 @@ export declare const setContext: (context?: {}) => {
|
|
7
7
|
};
|
8
8
|
export declare const addContext: (name: any, data?: {}) => {
|
9
9
|
type: string;
|
10
|
-
name:
|
10
|
+
name: string;
|
11
11
|
data: {};
|
12
12
|
};
|
13
13
|
export declare const resetContext: (name: any) => {
|
14
14
|
type: string;
|
15
|
-
name:
|
15
|
+
name: string;
|
16
16
|
};
|
17
17
|
export declare const updateContext: (name: any, data?: {}) => {
|
18
18
|
type: string;
|
19
|
-
name:
|
19
|
+
name: string;
|
20
20
|
data: {};
|
21
21
|
};
|
22
22
|
declare const context: (state: any, action: any) => any;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@evlop/commons",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.75",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/main.js",
|
6
6
|
"peerDependencies": {
|
@@ -27,12 +27,12 @@
|
|
27
27
|
"moment": "^2.29.1"
|
28
28
|
},
|
29
29
|
"scripts": {
|
30
|
-
"prepack": "tsc",
|
30
|
+
"prepack": " rm -rf dist && tsc",
|
31
31
|
"docs": "jsdoc -c jsdoc.json",
|
32
32
|
"dev": "tsc --watch",
|
33
33
|
"test": "mocha -r ts-node/register src/**/*.test.ts",
|
34
34
|
"build": "tsc",
|
35
|
-
"
|
35
|
+
"generate-icon-names": "ts-node ./generateIcons.ts"
|
36
36
|
},
|
37
37
|
"files": [
|
38
38
|
"dist/*"
|
@@ -46,8 +46,12 @@
|
|
46
46
|
"@types/node": "^15.0.2",
|
47
47
|
"@types/react": "^16.14.0",
|
48
48
|
"chai": "^4.3.4",
|
49
|
+
"change-case": "^4.1.2",
|
49
50
|
"jest": "^26.6.3",
|
51
|
+
"lodash": "^4.17.21",
|
50
52
|
"mocha": "^8.4.0",
|
53
|
+
"react-native-vector-icons": "^9.0.0",
|
54
|
+
"ts-node": "^10.4.0",
|
51
55
|
"typescript": "^4.1.3"
|
52
56
|
}
|
53
57
|
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useNavigator.native.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNavigator.native.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,WAWxB,CAAC;AAEF,eAAO,MAAM,aAAa,WAAe,CAAC"}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.useNavigation = exports.useNavigator = void 0;
|
4
|
-
const native_1 = require("@react-navigation/native");
|
5
|
-
const lodash_1 = require("lodash");
|
6
|
-
const react_1 = require("react");
|
7
|
-
const react_native_1 = require("react-native");
|
8
|
-
const react_redux_1 = require("react-redux");
|
9
|
-
const reducers_1 = require("../reducers");
|
10
|
-
const useNavigator = () => {
|
11
|
-
const navigation = native_1.useNavigation();
|
12
|
-
const route = native_1.useRoute();
|
13
|
-
const dispatch = react_redux_1.useDispatch();
|
14
|
-
return react_1.useMemo(() => lodash_1.assign({}, navigation, {
|
15
|
-
getParam: (name) => lodash_1.get(route.params, name),
|
16
|
-
openPage: (pageId, params) => navigation.push(dispatch(reducers_1.getPageRouteName(pageId)), params),
|
17
|
-
openRoute: (route) => navigation.push(dispatch(reducers_1.getPageRouteName(route))),
|
18
|
-
openURL: (url) => react_native_1.Linking.canOpenURL(url).then((s) => s && react_native_1.Linking.openURL(url)).catch(() => { console.log('url cant be openned'); }),
|
19
|
-
}), [navigation]);
|
20
|
-
};
|
21
|
-
exports.useNavigator = useNavigator;
|
22
|
-
exports.useNavigation = exports.useNavigator;
|
23
|
-
//# sourceMappingURL=useNavigator.native.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useNavigator.native.js","sourceRoot":"","sources":["../../../src/hooks/useNavigator.native.tsx"],"names":[],"mappings":";;;AAAA,qDAAsF;AACtF,mCAAqC;AACrC,iCAAgC;AAChC,+CAAuC;AACvC,6CAAwC;AACxC,0CAA+C;AAExC,MAAM,YAAY,GAAG,GAAE,EAAE;IAC5B,MAAM,UAAU,GAAG,sBAAe,EAAE,CAAC;IACrC,MAAM,KAAK,GAAG,iBAAQ,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAG,yBAAW,EAAE,CAAC;IAE/B,OAAO,eAAO,CAAC,GAAE,EAAE,CAAA,eAAM,CAAC,EAAE,EAAE,UAAU,EAAE;QACtC,QAAQ,EAAE,CAAC,IAAS,EAAE,EAAE,CAAC,YAAG,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC;QAChD,QAAQ,EAAE,CAAC,MAAW,EAAE,MAAW,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,2BAAgB,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC;QACnG,SAAS,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,2BAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7E,OAAO,EAAE,CAAC,GAAQ,EAAE,EAAE,CAAC,sBAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAM,EAAC,EAAE,CAAC,CAAC,IAAI,sBAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAE,EAAE,GAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA,CAAA,CAAC,CAAC;KAC5I,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;AACtB,CAAC,CAAC;AAXW,QAAA,YAAY,gBAWvB;AAEW,QAAA,aAAa,GAAG,oBAAY,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useNavigator.web.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNavigator.web.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,WAWxB,CAAC;AAEF,eAAO,MAAM,aAAa,WAAe,CAAC"}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.useNavigation = exports.useNavigator = void 0;
|
4
|
-
const native_1 = require("@react-navigation/native");
|
5
|
-
const lodash_1 = require("lodash");
|
6
|
-
const react_1 = require("react");
|
7
|
-
const react_native_1 = require("react-native");
|
8
|
-
const react_redux_1 = require("react-redux");
|
9
|
-
const reducers_1 = require("../reducers");
|
10
|
-
const useNavigator = () => {
|
11
|
-
const navigation = native_1.useNavigation();
|
12
|
-
const route = native_1.useRoute();
|
13
|
-
const dispatch = react_redux_1.useDispatch();
|
14
|
-
return react_1.useMemo(() => lodash_1.assign({}, navigation, {
|
15
|
-
getParam: (name) => lodash_1.get(route.params, name),
|
16
|
-
openPage: (pageId, params) => navigation.push(dispatch(reducers_1.getPageRouteName(pageId)), params),
|
17
|
-
openRoute: (route) => navigation.push(dispatch(reducers_1.getPageRouteName(route))),
|
18
|
-
openURL: (url) => react_native_1.Linking.canOpenURL(url).then((s) => s && react_native_1.Linking.openURL(url)).catch(() => { console.log('url cant be openned'); }),
|
19
|
-
}), [navigation]);
|
20
|
-
};
|
21
|
-
exports.useNavigator = useNavigator;
|
22
|
-
exports.useNavigation = exports.useNavigator;
|
23
|
-
//# sourceMappingURL=useNavigator.web.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useNavigator.web.js","sourceRoot":"","sources":["../../../src/hooks/useNavigator.web.tsx"],"names":[],"mappings":";;;AAAA,qDAAsF;AACtF,mCAAqC;AACrC,iCAAgC;AAChC,+CAAuC;AACvC,6CAAwC;AACxC,0CAA+C;AAExC,MAAM,YAAY,GAAG,GAAE,EAAE;IAC5B,MAAM,UAAU,GAAG,sBAAe,EAAE,CAAC;IACrC,MAAM,KAAK,GAAG,iBAAQ,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAG,yBAAW,EAAE,CAAC;IAE/B,OAAO,eAAO,CAAC,GAAE,EAAE,CAAA,eAAM,CAAC,EAAE,EAAE,UAAU,EAAE;QACtC,QAAQ,EAAE,CAAC,IAAS,EAAE,EAAE,CAAC,YAAG,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC;QAChD,QAAQ,EAAE,CAAC,MAAW,EAAE,MAAW,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,2BAAgB,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC;QACnG,SAAS,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,2BAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7E,OAAO,EAAE,CAAC,GAAQ,EAAE,EAAE,CAAC,sBAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAM,EAAC,EAAE,CAAC,CAAC,IAAI,sBAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAE,EAAE,GAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA,CAAA,CAAC,CAAC;KAC5I,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;AACtB,CAAC,CAAC;AAXW,QAAA,YAAY,gBAWvB;AAEW,QAAA,aAAa,GAAG,oBAAY,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useParams.native.d.ts","sourceRoot":"","sources":["../../../src/hooks/useParams.native.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,WAIrB,CAAC"}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.useParams = void 0;
|
4
|
-
const native_1 = require("@react-navigation/native");
|
5
|
-
const react_1 = require("react");
|
6
|
-
const useParams = () => {
|
7
|
-
const { params } = native_1.useRoute();
|
8
|
-
return react_1.useMemo(() => params || {}, [params]);
|
9
|
-
};
|
10
|
-
exports.useParams = useParams;
|
11
|
-
//# sourceMappingURL=useParams.native.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useParams.native.js","sourceRoot":"","sources":["../../../src/hooks/useParams.native.tsx"],"names":[],"mappings":";;;AAAA,qDAA+E;AAC/E,iCAAgC;AAEzB,MAAM,SAAS,GAAG,GAAG,EAAE;IAC1B,MAAM,EAAC,MAAM,EAAC,GAAG,iBAAuB,EAAE,CAAC;IAE3C,OAAO,eAAO,CAAC,GAAE,EAAE,CAAA,MAAM,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/C,CAAC,CAAC;AAJW,QAAA,SAAS,aAIpB"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useParams.web.d.ts","sourceRoot":"","sources":["../../../src/hooks/useParams.web.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,WAIrB,CAAC"}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.useParams = void 0;
|
4
|
-
const native_1 = require("@react-navigation/native");
|
5
|
-
const react_1 = require("react");
|
6
|
-
const useParams = () => {
|
7
|
-
const { params } = native_1.useRoute();
|
8
|
-
return react_1.useMemo(() => params || {}, [params]);
|
9
|
-
};
|
10
|
-
exports.useParams = useParams;
|
11
|
-
//# sourceMappingURL=useParams.web.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useParams.web.js","sourceRoot":"","sources":["../../../src/hooks/useParams.web.tsx"],"names":[],"mappings":";;;AAAA,qDAA+E;AAC/E,iCAAgC;AAEzB,MAAM,SAAS,GAAG,GAAG,EAAE;IAC1B,MAAM,EAAC,MAAM,EAAC,GAAG,iBAAuB,EAAE,CAAC;IAE3C,OAAO,eAAO,CAAC,GAAE,EAAE,CAAA,MAAM,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/C,CAAC,CAAC;AAJW,QAAA,SAAS,aAIpB"}
|