@evlop/commons 1.0.159 → 1.0.161
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/constants/iconInfo/directed-icons.d.ts +18 -0
- package/dist/src/constants/iconInfo/directed-icons.d.ts.map +1 -0
- package/dist/src/constants/iconInfo/directed-icons.js +327 -0
- package/dist/src/constants/iconInfo/directed-icons.js.map +1 -0
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.d.ts +2 -0
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.d.ts.map +1 -1
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.js +3 -0
- package/dist/src/constants/iconInfo/reactNativeVectorIcons.js.map +1 -1
- package/dist/src/hooks/useActionable.d.ts +1 -0
- package/dist/src/hooks/useActionable.d.ts.map +1 -1
- package/dist/src/hooks/useActionable.js +10 -6
- package/dist/src/hooks/useActionable.js.map +1 -1
- package/dist/src/hooks/useNavigator.app.d.ts +1 -0
- package/dist/src/hooks/useNavigator.app.d.ts.map +1 -1
- package/dist/src/hooks/useNavigator.app.js +7 -5
- package/dist/src/hooks/useNavigator.app.js.map +1 -1
- package/dist/src/hooks/useNavigator.d.ts +1 -0
- package/dist/src/hooks/useNavigator.d.ts.map +1 -1
- package/dist/src/hooks/useNavigator.js +7 -5
- package/dist/src/hooks/useNavigator.js.map +1 -1
- package/package.json +1 -1
@@ -0,0 +1,18 @@
|
|
1
|
+
declare const directedIcons: {
|
2
|
+
"ant-design": import("lodash").Dictionary<boolean>;
|
3
|
+
entypo: import("lodash").Dictionary<boolean>;
|
4
|
+
evilicons: import("lodash").Dictionary<boolean>;
|
5
|
+
"font-awesome": import("lodash").Dictionary<boolean>;
|
6
|
+
"font-awesome-5": import("lodash").Dictionary<boolean>;
|
7
|
+
ionicons: import("lodash").Dictionary<boolean>;
|
8
|
+
"material-icons": import("lodash").Dictionary<boolean>;
|
9
|
+
"material-community-icons": import("lodash").Dictionary<boolean>;
|
10
|
+
feather: import("lodash").Dictionary<boolean>;
|
11
|
+
fontisto: import("lodash").Dictionary<boolean>;
|
12
|
+
foundation: import("lodash").Dictionary<boolean>;
|
13
|
+
octicons: import("lodash").Dictionary<boolean>;
|
14
|
+
"simple-line-icons": import("lodash").Dictionary<boolean>;
|
15
|
+
zocial: import("lodash").Dictionary<boolean>;
|
16
|
+
};
|
17
|
+
export default directedIcons;
|
18
|
+
//# sourceMappingURL=directed-icons.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"directed-icons.d.ts","sourceRoot":"","sources":["../../../../src/constants/iconInfo/directed-icons.ts"],"names":[],"mappings":"AAoUA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;CAAoF,CAAA;AAEvG,eAAe,aAAa,CAAC"}
|
@@ -0,0 +1,327 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const lodash_1 = require("lodash");
|
4
|
+
// list of directed icons as directed icons has to be flipped on RTL layout
|
5
|
+
// list was provide by chatGPT
|
6
|
+
const directedIconsArray = {
|
7
|
+
"ant-design": [
|
8
|
+
"arrowleft",
|
9
|
+
"arrowright",
|
10
|
+
"caretleft",
|
11
|
+
"caretright",
|
12
|
+
"left",
|
13
|
+
"right",
|
14
|
+
"leftcircle",
|
15
|
+
"rightcircle",
|
16
|
+
"leftcircleo",
|
17
|
+
"rightcircleo",
|
18
|
+
"doubleright",
|
19
|
+
"doubleleft",
|
20
|
+
"swapleft",
|
21
|
+
"swapright",
|
22
|
+
"arrowup",
|
23
|
+
"arrowdown",
|
24
|
+
"up",
|
25
|
+
"down",
|
26
|
+
"upcircle",
|
27
|
+
"downcircle",
|
28
|
+
"upcircleo",
|
29
|
+
"downcircleo"
|
30
|
+
],
|
31
|
+
"entypo": [
|
32
|
+
"arrow-with-circle-left",
|
33
|
+
"arrow-with-circle-right",
|
34
|
+
"arrow-left",
|
35
|
+
"arrow-right",
|
36
|
+
"arrow-bold-left",
|
37
|
+
"arrow-bold-right",
|
38
|
+
"chevron-thin-left",
|
39
|
+
"chevron-thin-right",
|
40
|
+
"chevron-left",
|
41
|
+
"chevron-right",
|
42
|
+
"chevron-small-left",
|
43
|
+
"chevron-small-right",
|
44
|
+
"chevron-with-circle-left",
|
45
|
+
"chevron-with-circle-right",
|
46
|
+
"controller-fast-backward",
|
47
|
+
"controller-fast-forward",
|
48
|
+
"controller-next",
|
49
|
+
"controller-paus",
|
50
|
+
"controller-play",
|
51
|
+
"controller-record",
|
52
|
+
"controller-stop"
|
53
|
+
],
|
54
|
+
"evilicons": [
|
55
|
+
"arrow-left",
|
56
|
+
"arrow-right",
|
57
|
+
"chevron-left",
|
58
|
+
"chevron-right",
|
59
|
+
"undo",
|
60
|
+
"redo",
|
61
|
+
"spinner",
|
62
|
+
"spinner-2",
|
63
|
+
"spinner-3"
|
64
|
+
],
|
65
|
+
"font-awesome": [
|
66
|
+
"angle-left",
|
67
|
+
"angle-right",
|
68
|
+
"angle-double-left",
|
69
|
+
"angle-double-right",
|
70
|
+
"arrow-left",
|
71
|
+
"arrow-right",
|
72
|
+
"caret-left",
|
73
|
+
"caret-right",
|
74
|
+
"chevron-left",
|
75
|
+
"chevron-right",
|
76
|
+
"hand-o-left",
|
77
|
+
"hand-o-right",
|
78
|
+
"long-arrow-left",
|
79
|
+
"long-arrow-right",
|
80
|
+
"step-backward",
|
81
|
+
"step-forward",
|
82
|
+
"arrow-circle-left",
|
83
|
+
"arrow-circle-right"
|
84
|
+
],
|
85
|
+
"font-awesome-5": [
|
86
|
+
"arrow-left",
|
87
|
+
"arrow-right",
|
88
|
+
"arrow-up",
|
89
|
+
"arrow-down",
|
90
|
+
"caret-left",
|
91
|
+
"caret-right",
|
92
|
+
"caret-up",
|
93
|
+
"caret-down",
|
94
|
+
"chevron-left",
|
95
|
+
"chevron-right",
|
96
|
+
"chevron-up",
|
97
|
+
"chevron-down",
|
98
|
+
"angle-left",
|
99
|
+
"angle-right",
|
100
|
+
"angle-double-left",
|
101
|
+
"angle-double-right",
|
102
|
+
"long-arrow-alt-left",
|
103
|
+
"long-arrow-alt-right",
|
104
|
+
"long-arrow-alt-up",
|
105
|
+
"long-arrow-alt-down",
|
106
|
+
"redo",
|
107
|
+
"undo",
|
108
|
+
"redo-alt",
|
109
|
+
"undo-alt",
|
110
|
+
"sign-in-alt",
|
111
|
+
"sign-out-alt",
|
112
|
+
"exchange-alt",
|
113
|
+
"reply",
|
114
|
+
"reply-all",
|
115
|
+
"share",
|
116
|
+
"retweet",
|
117
|
+
"level-up-alt",
|
118
|
+
"level-down-alt",
|
119
|
+
"step-backward",
|
120
|
+
"step-forward",
|
121
|
+
"fast-backward",
|
122
|
+
"fast-forward",
|
123
|
+
"backward",
|
124
|
+
"forward",
|
125
|
+
"location-arrow",
|
126
|
+
"compass"
|
127
|
+
],
|
128
|
+
"ionicons": [
|
129
|
+
"arrow-back",
|
130
|
+
"arrow-forward",
|
131
|
+
"arrow-up",
|
132
|
+
"arrow-down",
|
133
|
+
"chevron-back",
|
134
|
+
"chevron-forward",
|
135
|
+
"chevron-up",
|
136
|
+
"chevron-down",
|
137
|
+
"caret-back",
|
138
|
+
"caret-forward",
|
139
|
+
"caret-up",
|
140
|
+
"caret-down",
|
141
|
+
"return-up-back",
|
142
|
+
"return-up-forward",
|
143
|
+
"return-down-back",
|
144
|
+
"return-down-forward",
|
145
|
+
"swap-horizontal",
|
146
|
+
"swap-vertical",
|
147
|
+
"play",
|
148
|
+
"play-skip-back",
|
149
|
+
"play-skip-forward",
|
150
|
+
"play-back",
|
151
|
+
"play-forward",
|
152
|
+
"fast-forward",
|
153
|
+
"rewind",
|
154
|
+
"exit",
|
155
|
+
"enter",
|
156
|
+
"redo",
|
157
|
+
"undo",
|
158
|
+
"log-in",
|
159
|
+
"log-out",
|
160
|
+
"send",
|
161
|
+
"call",
|
162
|
+
"videocam",
|
163
|
+
"videocam-off",
|
164
|
+
"cellular",
|
165
|
+
"cellular-off",
|
166
|
+
"navigate",
|
167
|
+
"navigate-circle",
|
168
|
+
"location",
|
169
|
+
"locate",
|
170
|
+
"compass",
|
171
|
+
"trail-sign",
|
172
|
+
"arrow-redo",
|
173
|
+
"arrow-undo"
|
174
|
+
],
|
175
|
+
"material-icons": [
|
176
|
+
"arrow-back",
|
177
|
+
"arrow-forward",
|
178
|
+
"arrow-upward",
|
179
|
+
"arrow-downward",
|
180
|
+
"keyboard-arrow-left",
|
181
|
+
"keyboard-arrow-right",
|
182
|
+
"keyboard-arrow-up",
|
183
|
+
"keyboard-arrow-down",
|
184
|
+
"navigate-before",
|
185
|
+
"navigate-next",
|
186
|
+
"first-page",
|
187
|
+
"last-page",
|
188
|
+
"redo",
|
189
|
+
"undo",
|
190
|
+
"north",
|
191
|
+
"south",
|
192
|
+
"east",
|
193
|
+
"west",
|
194
|
+
"north-east",
|
195
|
+
"north-west",
|
196
|
+
"south-east",
|
197
|
+
"south-west",
|
198
|
+
"arrow-drop-down",
|
199
|
+
"arrow-drop-up"
|
200
|
+
],
|
201
|
+
"material-community-icons": [
|
202
|
+
"arrow-left",
|
203
|
+
"arrow-right",
|
204
|
+
"arrow-up",
|
205
|
+
"arrow-down",
|
206
|
+
"chevron-left",
|
207
|
+
"chevron-right",
|
208
|
+
"chevron-up",
|
209
|
+
"chevron-down",
|
210
|
+
"menu-left",
|
211
|
+
"menu-right",
|
212
|
+
"menu-up",
|
213
|
+
"menu-down",
|
214
|
+
"skip-next",
|
215
|
+
"skip-previous",
|
216
|
+
"page-first",
|
217
|
+
"page-last",
|
218
|
+
"exit-run",
|
219
|
+
"login",
|
220
|
+
"logout",
|
221
|
+
"redo",
|
222
|
+
"undo",
|
223
|
+
"send",
|
224
|
+
"cellphone",
|
225
|
+
"cellphone-off",
|
226
|
+
"navigate",
|
227
|
+
"compass",
|
228
|
+
"map-marker",
|
229
|
+
"map-marker-outline",
|
230
|
+
"map-marker-check",
|
231
|
+
"map-marker-path",
|
232
|
+
"arrow-expand-horizontal",
|
233
|
+
"arrow-expand-vertical"
|
234
|
+
],
|
235
|
+
"feather": [
|
236
|
+
"arrow-left",
|
237
|
+
"arrow-right",
|
238
|
+
"arrow-up",
|
239
|
+
"arrow-down",
|
240
|
+
"chevron-left",
|
241
|
+
"chevron-right",
|
242
|
+
"chevron-up",
|
243
|
+
"chevron-down",
|
244
|
+
"corner-left-up",
|
245
|
+
"corner-left-down",
|
246
|
+
"corner-right-up",
|
247
|
+
"corner-right-down",
|
248
|
+
"skip-forward",
|
249
|
+
"skip-back"
|
250
|
+
],
|
251
|
+
"fontisto": [
|
252
|
+
"angle-left",
|
253
|
+
"angle-right",
|
254
|
+
"arrow-left",
|
255
|
+
"arrow-right",
|
256
|
+
"caret-left",
|
257
|
+
"caret-right",
|
258
|
+
"chevron-left",
|
259
|
+
"chevron-right",
|
260
|
+
"step-backward",
|
261
|
+
"step-forward",
|
262
|
+
"angle-double-left",
|
263
|
+
"angle-double-right"
|
264
|
+
],
|
265
|
+
"foundation": [
|
266
|
+
"arrow-left",
|
267
|
+
"arrow-right",
|
268
|
+
"arrow-up",
|
269
|
+
"arrow-down",
|
270
|
+
"chevron-left",
|
271
|
+
"chevron-right",
|
272
|
+
"chevron-up",
|
273
|
+
"chevron-down"
|
274
|
+
],
|
275
|
+
"octicons": [
|
276
|
+
"arrow-left",
|
277
|
+
"arrow-right",
|
278
|
+
"arrow-up",
|
279
|
+
"arrow-down",
|
280
|
+
"chevron-left",
|
281
|
+
"chevron-right",
|
282
|
+
"chevron-up",
|
283
|
+
"chevron-down",
|
284
|
+
"triangle-left",
|
285
|
+
"triangle-right",
|
286
|
+
"triangle-up",
|
287
|
+
"triangle-down",
|
288
|
+
"kebab-horizontal",
|
289
|
+
"kebab-vertical",
|
290
|
+
"sign-in",
|
291
|
+
"sign-out",
|
292
|
+
"repo-pull",
|
293
|
+
"repo-push",
|
294
|
+
"diff-added",
|
295
|
+
"diff-removed",
|
296
|
+
"diff-modified"
|
297
|
+
],
|
298
|
+
"simple-line-icons": [
|
299
|
+
"arrow-left",
|
300
|
+
"arrow-right",
|
301
|
+
"arrow-up",
|
302
|
+
"arrow-down",
|
303
|
+
"direction",
|
304
|
+
"directions",
|
305
|
+
"login",
|
306
|
+
"logout",
|
307
|
+
"action-redo",
|
308
|
+
"action-undo",
|
309
|
+
"call-in",
|
310
|
+
"call-out",
|
311
|
+
"paper-plane",
|
312
|
+
"location-pin",
|
313
|
+
"compass",
|
314
|
+
"screen-smartphone",
|
315
|
+
"screen-desktop"
|
316
|
+
],
|
317
|
+
"zocial": [
|
318
|
+
"arrow-left",
|
319
|
+
"arrow-right",
|
320
|
+
"arrow-up",
|
321
|
+
"arrow-down"
|
322
|
+
]
|
323
|
+
};
|
324
|
+
// convert to directedIcons[icon-library][icon-name] => true
|
325
|
+
const directedIcons = lodash_1.mapValues(directedIconsArray, icons => lodash_1.fromPairs(lodash_1.map(icons, icon => [icon, true])));
|
326
|
+
exports.default = directedIcons;
|
327
|
+
//# sourceMappingURL=directed-icons.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"directed-icons.js","sourceRoot":"","sources":["../../../../src/constants/iconInfo/directed-icons.ts"],"names":[],"mappings":";;AAAA,mCAAmD;AAEnD,2EAA2E;AAC3E,8BAA8B;AAC9B,MAAM,kBAAkB,GAAG;IACvB,YAAY,EAAE;QACZ,WAAW;QACX,YAAY;QACZ,WAAW;QACX,YAAY;QACZ,MAAM;QACN,OAAO;QACP,YAAY;QACZ,aAAa;QACb,aAAa;QACb,cAAc;QACd,aAAa;QACb,YAAY;QACZ,UAAU;QACV,WAAW;QACX,SAAS;QACT,WAAW;QACX,IAAI;QACJ,MAAM;QACN,UAAU;QACV,YAAY;QACZ,WAAW;QACX,aAAa;KACd;IACD,QAAQ,EAAE;QACR,wBAAwB;QACxB,yBAAyB;QACzB,YAAY;QACZ,aAAa;QACb,iBAAiB;QACjB,kBAAkB;QAClB,mBAAmB;QACnB,oBAAoB;QACpB,cAAc;QACd,eAAe;QACf,oBAAoB;QACpB,qBAAqB;QACrB,0BAA0B;QAC1B,2BAA2B;QAC3B,0BAA0B;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QACb,YAAY;QACZ,aAAa;QACb,YAAY;QACZ,aAAa;QACb,cAAc;QACd,eAAe;QACf,eAAe;QACf,cAAc;QACd,mBAAmB;QACnB,oBAAoB;KACvB;IACD,YAAY,EAAE;QACV,YAAY;QACZ,aAAa;QACb,UAAU;QACV,YAAY;QACZ,cAAc;QACd,eAAe;QACf,YAAY;QACZ,cAAc;KACjB;IACD,UAAU,EAAE;QACR,YAAY;QACZ,aAAa;QACb,UAAU;QACV,YAAY;QACZ,cAAc;QACd,eAAe;QACf,YAAY;QACZ,cAAc;QACd,eAAe;QACf,gBAAgB;QAChB,aAAa;QACb,eAAe;QACf,kBAAkB;QAClB,gBAAgB;QAChB,SAAS;QACT,UAAU;QACV,WAAW;QACX,WAAW;QACX,YAAY;QACZ,cAAc;QACd,eAAe;KAClB;IACD,mBAAmB,EAAE;QACjB,YAAY;QACZ,aAAa;QACb,UAAU;QACV,YAAY;QACZ,WAAW;QACX,YAAY;QACZ,OAAO;QACP,QAAQ;QACR,aAAa;QACb,aAAa;QACb,SAAS;QACT,UAAU;QACV,aAAa;QACb,cAAc;QACd,SAAS;QACT,mBAAmB;QACnB,gBAAgB;KACnB;IACD,QAAQ,EAAE;QACN,YAAY;QACZ,aAAa;QACb,UAAU;QACV,YAAY;KACf;CACJ,CAAA;AAED,4DAA4D;AAC5D,MAAM,aAAa,GAAG,kBAAS,CAAC,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAS,CAAC,YAAG,CAAC,KAAK,EAAE,IAAI,CAAA,EAAE,CAAA,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;AAEvG,kBAAe,aAAa,CAAC"}
|
@@ -2,12 +2,14 @@ declare const reactNativeVectorIcons: {
|
|
2
2
|
[x: string]: {
|
3
3
|
id: string;
|
4
4
|
type: string;
|
5
|
+
isDirected: boolean;
|
5
6
|
name: string;
|
6
7
|
variant: string;
|
7
8
|
character: any;
|
8
9
|
} | {
|
9
10
|
id: string;
|
10
11
|
type: string;
|
12
|
+
isDirected: any;
|
11
13
|
name: string;
|
12
14
|
character: never;
|
13
15
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reactNativeVectorIcons.d.ts","sourceRoot":"","sources":["../../../../src/constants/iconInfo/reactNativeVectorIcons.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"reactNativeVectorIcons.d.ts","sourceRoot":"","sources":["../../../../src/constants/iconInfo/reactNativeVectorIcons.ts"],"names":[],"mappings":"AAwDA,QAAA,MAAO,sBAAsB;;;;;;;;;;;;;;;CAAgC,CAAC;AAE9D,eAAe,sBAAsB,CAAA"}
|
@@ -20,11 +20,13 @@ const SimpleLineIcons_json_1 = __importDefault(require("react-native-vector-icon
|
|
20
20
|
const Zocial_json_1 = __importDefault(require("react-native-vector-icons/glyphmaps/Zocial.json"));
|
21
21
|
const change_case_1 = require("change-case");
|
22
22
|
const lodash_1 = require("lodash");
|
23
|
+
const directed_icons_1 = __importDefault(require("./directed-icons"));
|
23
24
|
const iconLibraries = { Antdesign: AntDesign_json_1.default, Entypo: Entypo_json_1.default, Evilicons: EvilIcons_json_1.default, Feather: Feather_json_1.default, FontAwesome: FontAwesome_json_1.default, Fontisto: Fontisto_json_1.default, Foundation: Foundation_json_1.default, Ionicons: Ionicons_json_1.default, MaterialCommunityIcons: MaterialCommunityIcons_json_1.default, MaterialIcons: MaterialIcons_json_1.default, Octicon: Octicons_json_1.default, SimpleLineIcons: SimpleLineIcons_json_1.default, Zocial: Zocial_json_1.default };
|
24
25
|
const fa5Icons = lodash_1.chain(FontAwesome5Free_meta_json_1.default)
|
25
26
|
.flatMap((iconNames, variant) => lodash_1.map(iconNames, iconName => ({
|
26
27
|
id: `font-awesome-5:${variant}:${iconName}`,
|
27
28
|
type: 'font-awesome-5',
|
29
|
+
isDirected: lodash_1.get(directed_icons_1.default, ['font-awesome-5', iconName]),
|
28
30
|
name: iconName,
|
29
31
|
variant,
|
30
32
|
character: FontAwesome5Free_json_1.default[iconName],
|
@@ -36,6 +38,7 @@ const vectorIcons = lodash_1.chain(iconLibraries)
|
|
36
38
|
.flatMap((iconsOfCurrentType, iconLibrary) => lodash_1.map(iconsOfCurrentType, ({ name: iconName, character }) => ({
|
37
39
|
id: `${change_case_1.paramCase(iconLibrary)}:${iconName}`,
|
38
40
|
type: change_case_1.paramCase(iconLibrary),
|
41
|
+
isDirected: lodash_1.get(directed_icons_1.default, [change_case_1.paramCase(iconLibrary), iconName]),
|
39
42
|
name: iconName,
|
40
43
|
character
|
41
44
|
})))
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reactNativeVectorIcons.js","sourceRoot":"","sources":["../../../../src/constants/iconInfo/reactNativeVectorIcons.ts"],"names":[],"mappings":";;;;;AAAA,wGAA2E;AAC3E,kGAAqE;AACrE,wGAA2E;AAC3E,oGAAuE;AACvE,4GAA+E;AAC/E,gIAA+F;AAC/F,sHAAqF;AACrF,sGAAyE;AACzE,0GAA6E;AAC7E,sGAAyE;AACzE,kIAAqG;AACrG,gHAAmF;AACnF,sGAAwE;AACxE,oHAAuF;AACvF,kGAAqE;AACrE,6CAAwC;AACxC,
|
1
|
+
{"version":3,"file":"reactNativeVectorIcons.js","sourceRoot":"","sources":["../../../../src/constants/iconInfo/reactNativeVectorIcons.ts"],"names":[],"mappings":";;;;;AAAA,wGAA2E;AAC3E,kGAAqE;AACrE,wGAA2E;AAC3E,oGAAuE;AACvE,4GAA+E;AAC/E,gIAA+F;AAC/F,sHAAqF;AACrF,sGAAyE;AACzE,0GAA6E;AAC7E,sGAAyE;AACzE,kIAAqG;AACrG,gHAAmF;AACnF,sGAAwE;AACxE,oHAAuF;AACvF,kGAAqE;AACrE,6CAAwC;AACxC,mCAAyC;AACzC,sEAA6C;AAE7C,MAAM,aAAa,GAAG,EAAC,SAAS,EAAT,wBAAS,EAAE,MAAM,EAAN,qBAAM,EAAE,SAAS,EAAT,wBAAS,EAAE,OAAO,EAAP,sBAAO,EAAE,WAAW,E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E,YAAG,CAAC,wBAAa,EAAE,CAAC,uBAAS,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC;IAClE,IAAI,EAAE,QAAQ;IACd,SAAS;CACZ,CAAC,CACL,CACJ;KACA,KAAK,CAAC,IAAI,CAAC;KACX,KAAK,EAAE,CAAC;AAErB,MAAO,sBAAsB,mCAAO,QAAQ,GAAK,WAAW,CAAC,CAAC;AAE9D,kBAAe,sBAAsB,CAAA"}
|
@@ -13,6 +13,7 @@ export interface ActionObject {
|
|
13
13
|
callback: Function;
|
14
14
|
}
|
15
15
|
export declare type Action = ActionObject | Function | any;
|
16
|
+
export declare const useActionableWithNavigator: (navigator: any) => (action: Action) => (event?: any) => any;
|
16
17
|
/**
|
17
18
|
* @description a function to map action into action handeller function
|
18
19
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useActionable.d.ts","sourceRoot":"","sources":["../../../src/hooks/useActionable.tsx"],"names":[],"mappings":"AASA;;;;GAIG;AAEF,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IACjC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,QAAQ,EAAE,QAAQ,CAAC;CACtB;AAED,oBAAY,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,GAAG,CAAA;AAElD;;GAEG;AACJ,eAAO,MAAM,aAAa,
|
1
|
+
{"version":3,"file":"useActionable.d.ts","sourceRoot":"","sources":["../../../src/hooks/useActionable.tsx"],"names":[],"mappings":"AASA;;;;GAIG;AAEF,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IACjC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,QAAQ,EAAE,QAAQ,CAAC;CACtB;AAED,oBAAY,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,GAAG,CAAA;AAElD,eAAO,MAAM,0BAA0B,cAAe,GAAG,cAKF,MAAM,cAAc,GAAG,QA0B7E,CAAA;AAED;;GAEG;AACJ,eAAO,MAAM,aAAa,iBA/B8B,MAAM,cAAc,GAAG,QAmC9E,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.useActionable = void 0;
|
6
|
+
exports.useActionable = exports.useActionableWithNavigator = void 0;
|
7
7
|
const react_1 = require("react");
|
8
8
|
const react_redux_1 = require("react-redux");
|
9
9
|
const lodash_1 = require("lodash");
|
@@ -11,11 +11,7 @@ const useNavigator_1 = require("./useNavigator");
|
|
11
11
|
const useScope_1 = require("./useScope");
|
12
12
|
const useTemplate_1 = __importDefault(require("./useTemplate"));
|
13
13
|
const lodash_2 = require("lodash");
|
14
|
-
|
15
|
-
* @description a function to map action into action handeller function
|
16
|
-
*/
|
17
|
-
const useActionable = () => {
|
18
|
-
const navigator = useNavigator_1.useNavigator();
|
14
|
+
const useActionableWithNavigator = (navigator) => {
|
19
15
|
const dispatch = react_redux_1.useDispatch();
|
20
16
|
const scope = useScope_1.useScope();
|
21
17
|
const template = useTemplate_1.default();
|
@@ -49,6 +45,14 @@ const useActionable = () => {
|
|
49
45
|
}, [navigator, dispatch, template, scope]);
|
50
46
|
return createActionHandeller;
|
51
47
|
};
|
48
|
+
exports.useActionableWithNavigator = useActionableWithNavigator;
|
49
|
+
/**
|
50
|
+
* @description a function to map action into action handeller function
|
51
|
+
*/
|
52
|
+
const useActionable = () => {
|
53
|
+
const navigator = useNavigator_1.useNavigator();
|
54
|
+
return exports.useActionableWithNavigator(navigator);
|
55
|
+
};
|
52
56
|
exports.useActionable = useActionable;
|
53
57
|
exports.default = exports.useActionable;
|
54
58
|
//# sourceMappingURL=useActionable.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useActionable.js","sourceRoot":"","sources":["../../../src/hooks/useActionable.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAA6C;AAC7C,6CAA0C;AAC1C,mCAAwC;AACxC,iDAA4C;AAC5C,yCAAoC;AACpC,gEAAwC;AACxC,mCAAiC;
|
1
|
+
{"version":3,"file":"useActionable.js","sourceRoot":"","sources":["../../../src/hooks/useActionable.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAA6C;AAC7C,6CAA0C;AAC1C,mCAAwC;AACxC,iDAA4C;AAC5C,yCAAoC;AACpC,gEAAwC;AACxC,mCAAiC;AAqBzB,MAAM,0BAA0B,GAAG,CAAC,SAAc,EAAE,EAAE;IAC1D,MAAM,QAAQ,GAAG,yBAAW,EAAE,CAAC;IAC/B,MAAM,KAAK,GAAG,mBAAQ,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAG,qBAAW,EAAE,CAAC;IAE/B,MAAM,qBAAqB,GAAI,mBAAW,CAAC,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC,KAAW,EAAE,EAAE;QAC3E,IAAI,WAAW,GAAG,MAAM,CAAC;QAEzB,OAAO,WAAW,IAAI,WAAW,CAAC,OAAO,EAAC;YACtC,WAAW,GAAG,YAAG,CAAC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;SACjD;QAED,IAAG,OAAO,WAAW,KAAK,UAAU;YAAE,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAEhE,IAAG,WA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AAC;AAChC,CAAC,CAAA;AA/BY,QAAA,0BAA0B,8BA+BtC;AAED;;GAEG;AACG,MAAM,aAAa,GAAG,GAAE,EAAE;IAC7B,MAAM,SAAS,GAAG,2BAAY,EAAE,CAAC;IAEjC,OAAO,kCAA0B,CAAC,SAAS,CAAC,CAAA;AAChD,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB;AAEF,kBAAe,qBAAa,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useNavigator.app.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNavigator.app.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,
|
1
|
+
{"version":3,"file":"useNavigator.app.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNavigator.app.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,0BAA0B,eAAgB,GAAG,QASzD,CAAC;AAEF,eAAO,MAAM,YAAY,WAGxB,CAAC;AAEF,eAAO,MAAM,aAAa,WAAe,CAAC"}
|
@@ -1,24 +1,26 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.useNavigation = exports.useNavigator = void 0;
|
3
|
+
exports.useNavigation = exports.useNavigator = exports.useNavigatorWithNavigation = void 0;
|
4
4
|
const native_1 = require("@react-navigation/native");
|
5
5
|
const lodash_1 = require("lodash");
|
6
6
|
const react_1 = require("react");
|
7
7
|
const react_native_1 = require("react-native");
|
8
8
|
const react_redux_1 = require("react-redux");
|
9
9
|
const reducers_1 = require("../reducers");
|
10
|
-
const
|
11
|
-
const navigation = native_1.useNavigation();
|
12
|
-
const route = native_1.useRoute();
|
10
|
+
const useNavigatorWithNavigation = (navigation) => {
|
13
11
|
const dispatch = react_redux_1.useDispatch();
|
14
12
|
const navigator = react_1.useRef({});
|
15
13
|
return react_1.useMemo(() => lodash_1.assign(navigator.current, navigation, {
|
16
|
-
getParam: (name) => lodash_1.get(route.params, name),
|
17
14
|
openPage: (pageId, params) => navigation.navigate(dispatch(reducers_1.getPageRouteName(pageId)), params),
|
18
15
|
openRoute: (route, params) => navigation.navigate(dispatch(reducers_1.getPageRouteName(route)), params),
|
19
16
|
openURL: (url) => react_native_1.Linking.canOpenURL(url).then((s) => s && react_native_1.Linking.openURL(url)).catch(() => { console.log('url cant be openned'); }),
|
20
17
|
}), [navigation]);
|
21
18
|
};
|
19
|
+
exports.useNavigatorWithNavigation = useNavigatorWithNavigation;
|
20
|
+
const useNavigator = () => {
|
21
|
+
const navigation = native_1.useNavigation();
|
22
|
+
return exports.useNavigatorWithNavigation(navigation);
|
23
|
+
};
|
22
24
|
exports.useNavigator = useNavigator;
|
23
25
|
exports.useNavigation = exports.useNavigator;
|
24
26
|
//# sourceMappingURL=useNavigator.app.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useNavigator.app.js","sourceRoot":"","sources":["../../../src/hooks/useNavigator.app.tsx"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"useNavigator.app.js","sourceRoot":"","sources":["../../../src/hooks/useNavigator.app.tsx"],"names":[],"mappings":";;;AAAA,qDAA4E;AAC5E,mCAAgC;AAChC,iCAAwC;AACxC,+CAAuC;AACvC,6CAA0C;AAC1C,0CAA+C;AAExC,MAAM,0BAA0B,GAAG,CAAC,UAAe,EAAC,EAAE;IACzD,MAAM,QAAQ,GAAG,yBAAW,EAAE,CAAC;IAC/B,MAAM,SAAS,GAAG,cAAM,CAAM,EAAE,CAAC,CAAC;IAElC,OAAO,eAAO,CAAC,GAAE,EAAE,CAAA,eAAM,CAAC,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE;QACrD,QAAQ,EAAE,CAAC,MAAW,EAAE,MAAW,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,2BAAgB,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC;QACvG,SAAS,EAAE,CAAC,KAAU,EAAE,MAAW,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,2BAAgB,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC;QACtG,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;AATW,QAAA,0BAA0B,8BASrC;AAEK,MAAM,YAAY,GAAG,GAAE,EAAE;IAC5B,MAAM,UAAU,GAAG,sBAAe,EAAE,CAAC;IACrC,OAAO,kCAA0B,CAAC,UAAU,CAAC,CAAC;AAClD,CAAC,CAAC;AAHW,QAAA,YAAY,gBAGvB;AAEW,QAAA,aAAa,GAAG,oBAAY,CAAC"}
|
@@ -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,0BAA0B,YAAa,GAAG,QAqBtD,CAAA;AAGD,eAAO,MAAM,YAAY,WAIxB,CAAC;AAEF,eAAO,MAAM,aAAa,WAAe,CAAC"}
|
@@ -3,21 +3,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.useNavigation = exports.useNavigator = void 0;
|
6
|
+
exports.useNavigation = exports.useNavigator = exports.useNavigatorWithNavigation = void 0;
|
7
7
|
const lodash_1 = require("lodash");
|
8
8
|
const react_1 = require("react");
|
9
9
|
const react_redux_1 = require("react-redux");
|
10
10
|
const query_string_1 = __importDefault(require("query-string"));
|
11
11
|
const react_router_1 = require("react-router");
|
12
12
|
const reducers_1 = require("../reducers");
|
13
|
-
const
|
13
|
+
const useNavigatorWithNavigation = (history) => {
|
14
14
|
const params = react_router_1.useParams();
|
15
|
-
const history = react_router_1.useHistory();
|
16
15
|
const { state, search, hash, pathname } = react_router_1.useLocation();
|
17
16
|
const dispatch = react_redux_1.useDispatch();
|
18
17
|
const navigator = react_1.useRef({});
|
19
18
|
return react_1.useMemo(() => {
|
20
|
-
const allParams = params;
|
21
19
|
const queryParams = query_string_1.default.parse(search);
|
22
20
|
return lodash_1.assign(navigator.current, history, {
|
23
21
|
pop: history.back,
|
@@ -25,7 +23,6 @@ const useNavigator = () => {
|
|
25
23
|
openPage: (name, params) => history.push(dispatch(reducers_1.getPagePath(name, params))),
|
26
24
|
openRoute: (route) => history.push(route),
|
27
25
|
openURL: (url) => window.open(url),
|
28
|
-
getParam: (name, defaultValue) => allParams[name] || defaultValue,
|
29
26
|
setParams: (params = {}) => history.replace({
|
30
27
|
pathname,
|
31
28
|
hash,
|
@@ -34,6 +31,11 @@ const useNavigator = () => {
|
|
34
31
|
});
|
35
32
|
}, [params, history, pathname, hash, search, state]);
|
36
33
|
};
|
34
|
+
exports.useNavigatorWithNavigation = useNavigatorWithNavigation;
|
35
|
+
const useNavigator = () => {
|
36
|
+
const history = react_router_1.useHistory();
|
37
|
+
return exports.useNavigatorWithNavigation(history);
|
38
|
+
};
|
37
39
|
exports.useNavigator = useNavigator;
|
38
40
|
exports.useNavigation = exports.useNavigator;
|
39
41
|
//# sourceMappingURL=useNavigator.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useNavigator.js","sourceRoot":"","sources":["../../../src/hooks/useNavigator.tsx"],"names":[],"mapp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