@twreporter/universal-header 3.0.3-rc.0 → 3.0.3-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/lib/actions/auth.js +9 -25
- package/lib/actions/error-action-creators.js +6 -20
- package/lib/components/action-button-item.js +41 -71
- package/lib/components/action-button-item.stories.js +7 -24
- package/lib/components/action-button.js +19 -46
- package/lib/components/channels.js +16 -52
- package/lib/components/channels.stories.js +4 -13
- package/lib/components/customized-link.js +3 -16
- package/lib/components/drop-down-menu.js +10 -52
- package/lib/components/hamburger-footer.js +20 -59
- package/lib/components/hamburger-footer.stories.js +5 -21
- package/lib/components/hamburger-menu-item.js +36 -75
- package/lib/components/hamburger-menu-item.stories.js +17 -48
- package/lib/components/hamburger-menu.js +41 -125
- package/lib/components/hamburger-menu.stories.js +4 -16
- package/lib/components/header.js +28 -100
- package/lib/components/header.stories.js +7 -16
- package/lib/components/icons.js +27 -86
- package/lib/components/icons.stories.js +5 -17
- package/lib/components/slogan.js +7 -24
- package/lib/components/slogan.stories.js +3 -12
- package/lib/components/tab-bar.js +21 -48
- package/lib/components/tab-bar.stories.js +4 -16
- package/lib/constants/action-item-types.js +13 -36
- package/lib/constants/action-types.js +2 -3
- package/lib/constants/actions.js +9 -13
- package/lib/constants/categories.js +5 -9
- package/lib/constants/channels.js +16 -27
- package/lib/constants/colors.js +2 -3
- package/lib/constants/external-links.js +1 -2
- package/lib/constants/fonts.js +2 -5
- package/lib/constants/footer.js +11 -18
- package/lib/constants/hamburger-menu.js +2 -3
- package/lib/constants/prop-types.js +5 -12
- package/lib/constants/slogan.js +1 -2
- package/lib/constants/social-media.js +2 -4
- package/lib/constants/theme.js +2 -3
- package/lib/containers/header.js +108 -200
- package/lib/contexts/header-context.js +2 -7
- package/lib/index.js +3 -9
- package/lib/reducers/auth.js +2 -13
- package/lib/reducers/index.js +1 -6
- package/lib/standalone-header.js +14 -45
- package/lib/storybook/constants/index.js +2 -8
- package/lib/storybook/utils/get-enum-arg.js +2 -5
- package/lib/utils/animations.js +2 -9
- package/lib/utils/icon.js +4 -83
- package/lib/utils/jwt.js +3 -10
- package/lib/utils/links.js +10 -55
- package/lib/utils/theme.js +8 -42
- package/package.json +7 -6
package/lib/utils/icon.js
CHANGED
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = exports.ServiceIcons = exports.Icons = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
9
|
var BookmarkNormalIcon = function BookmarkNormalIcon(props) {
|
|
13
10
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
14
11
|
fillRule: "evenodd",
|
|
@@ -17,7 +14,6 @@ var BookmarkNormalIcon = function BookmarkNormalIcon(props) {
|
|
|
17
14
|
fill: "gray"
|
|
18
15
|
}));
|
|
19
16
|
};
|
|
20
|
-
|
|
21
17
|
BookmarkNormalIcon.defaultProps = {
|
|
22
18
|
width: "16",
|
|
23
19
|
height: "21",
|
|
@@ -25,7 +21,6 @@ BookmarkNormalIcon.defaultProps = {
|
|
|
25
21
|
fill: "none",
|
|
26
22
|
xmlns: "http://www.w3.org/2000/svg"
|
|
27
23
|
};
|
|
28
|
-
|
|
29
24
|
var BookmarkNormalHoverIcon = function BookmarkNormalHoverIcon(props) {
|
|
30
25
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
31
26
|
fillRule: "evenodd",
|
|
@@ -34,7 +29,6 @@ var BookmarkNormalHoverIcon = function BookmarkNormalHoverIcon(props) {
|
|
|
34
29
|
fill: "#262626"
|
|
35
30
|
}));
|
|
36
31
|
};
|
|
37
|
-
|
|
38
32
|
BookmarkNormalHoverIcon.defaultProps = {
|
|
39
33
|
width: "16",
|
|
40
34
|
height: "21",
|
|
@@ -42,7 +36,6 @@ BookmarkNormalHoverIcon.defaultProps = {
|
|
|
42
36
|
fill: "none",
|
|
43
37
|
xmlns: "http://www.w3.org/2000/svg"
|
|
44
38
|
};
|
|
45
|
-
|
|
46
39
|
var BookmarkPhotoIcon = function BookmarkPhotoIcon(props) {
|
|
47
40
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
48
41
|
fillRule: "evenodd",
|
|
@@ -51,7 +44,6 @@ var BookmarkPhotoIcon = function BookmarkPhotoIcon(props) {
|
|
|
51
44
|
fill: "gray"
|
|
52
45
|
}));
|
|
53
46
|
};
|
|
54
|
-
|
|
55
47
|
BookmarkPhotoIcon.defaultProps = {
|
|
56
48
|
width: "16",
|
|
57
49
|
height: "21",
|
|
@@ -59,7 +51,6 @@ BookmarkPhotoIcon.defaultProps = {
|
|
|
59
51
|
fill: "none",
|
|
60
52
|
xmlns: "http://www.w3.org/2000/svg"
|
|
61
53
|
};
|
|
62
|
-
|
|
63
54
|
var BookmarkPhotoHoverIcon = function BookmarkPhotoHoverIcon(props) {
|
|
64
55
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
65
56
|
fillRule: "evenodd",
|
|
@@ -68,7 +59,6 @@ var BookmarkPhotoHoverIcon = function BookmarkPhotoHoverIcon(props) {
|
|
|
68
59
|
fill: "#fff"
|
|
69
60
|
}));
|
|
70
61
|
};
|
|
71
|
-
|
|
72
62
|
BookmarkPhotoHoverIcon.defaultProps = {
|
|
73
63
|
width: "16",
|
|
74
64
|
height: "21",
|
|
@@ -76,7 +66,6 @@ BookmarkPhotoHoverIcon.defaultProps = {
|
|
|
76
66
|
fill: "none",
|
|
77
67
|
xmlns: "http://www.w3.org/2000/svg"
|
|
78
68
|
};
|
|
79
|
-
|
|
80
69
|
var BookmarkTransparentIcon = function BookmarkTransparentIcon(props) {
|
|
81
70
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
82
71
|
fillRule: "evenodd",
|
|
@@ -114,7 +103,6 @@ var BookmarkTransparentIcon = function BookmarkTransparentIcon(props) {
|
|
|
114
103
|
result: "shape"
|
|
115
104
|
}))));
|
|
116
105
|
};
|
|
117
|
-
|
|
118
106
|
BookmarkTransparentIcon.defaultProps = {
|
|
119
107
|
width: "24",
|
|
120
108
|
height: "29",
|
|
@@ -122,7 +110,6 @@ BookmarkTransparentIcon.defaultProps = {
|
|
|
122
110
|
fill: "none",
|
|
123
111
|
xmlns: "http://www.w3.org/2000/svg"
|
|
124
112
|
};
|
|
125
|
-
|
|
126
113
|
var BookmarkTransparentHoverIcon = function BookmarkTransparentHoverIcon(props) {
|
|
127
114
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
128
115
|
fillRule: "evenodd",
|
|
@@ -159,7 +146,6 @@ var BookmarkTransparentHoverIcon = function BookmarkTransparentHoverIcon(props)
|
|
|
159
146
|
result: "shape"
|
|
160
147
|
}))));
|
|
161
148
|
};
|
|
162
|
-
|
|
163
149
|
BookmarkTransparentHoverIcon.defaultProps = {
|
|
164
150
|
width: "24",
|
|
165
151
|
height: "29",
|
|
@@ -167,7 +153,6 @@ BookmarkTransparentHoverIcon.defaultProps = {
|
|
|
167
153
|
fill: "none",
|
|
168
154
|
xmlns: "http://www.w3.org/2000/svg"
|
|
169
155
|
};
|
|
170
|
-
|
|
171
156
|
var LoginNormalIcon = function LoginNormalIcon(props) {
|
|
172
157
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
173
158
|
fillRule: "evenodd",
|
|
@@ -176,7 +161,6 @@ var LoginNormalIcon = function LoginNormalIcon(props) {
|
|
|
176
161
|
fill: "gray"
|
|
177
162
|
}));
|
|
178
163
|
};
|
|
179
|
-
|
|
180
164
|
LoginNormalIcon.defaultProps = {
|
|
181
165
|
width: "20",
|
|
182
166
|
height: "22",
|
|
@@ -184,7 +168,6 @@ LoginNormalIcon.defaultProps = {
|
|
|
184
168
|
fill: "none",
|
|
185
169
|
xmlns: "http://www.w3.org/2000/svg"
|
|
186
170
|
};
|
|
187
|
-
|
|
188
171
|
var LoginNormalHoverIcon = function LoginNormalHoverIcon(props) {
|
|
189
172
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
190
173
|
fillRule: "evenodd",
|
|
@@ -193,7 +176,6 @@ var LoginNormalHoverIcon = function LoginNormalHoverIcon(props) {
|
|
|
193
176
|
fill: "#262626"
|
|
194
177
|
}));
|
|
195
178
|
};
|
|
196
|
-
|
|
197
179
|
LoginNormalHoverIcon.defaultProps = {
|
|
198
180
|
width: "20",
|
|
199
181
|
height: "22",
|
|
@@ -201,7 +183,6 @@ LoginNormalHoverIcon.defaultProps = {
|
|
|
201
183
|
fill: "none",
|
|
202
184
|
xmlns: "http://www.w3.org/2000/svg"
|
|
203
185
|
};
|
|
204
|
-
|
|
205
186
|
var LoginPhotoIcon = function LoginPhotoIcon(props) {
|
|
206
187
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
207
188
|
fillRule: "evenodd",
|
|
@@ -210,7 +191,6 @@ var LoginPhotoIcon = function LoginPhotoIcon(props) {
|
|
|
210
191
|
fill: "gray"
|
|
211
192
|
}));
|
|
212
193
|
};
|
|
213
|
-
|
|
214
194
|
LoginPhotoIcon.defaultProps = {
|
|
215
195
|
width: "20",
|
|
216
196
|
height: "22",
|
|
@@ -218,7 +198,6 @@ LoginPhotoIcon.defaultProps = {
|
|
|
218
198
|
fill: "none",
|
|
219
199
|
xmlns: "http://www.w3.org/2000/svg"
|
|
220
200
|
};
|
|
221
|
-
|
|
222
201
|
var LoginPhotoHoverIcon = function LoginPhotoHoverIcon(props) {
|
|
223
202
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
224
203
|
fillRule: "evenodd",
|
|
@@ -227,7 +206,6 @@ var LoginPhotoHoverIcon = function LoginPhotoHoverIcon(props) {
|
|
|
227
206
|
fill: "#fff"
|
|
228
207
|
}));
|
|
229
208
|
};
|
|
230
|
-
|
|
231
209
|
LoginPhotoHoverIcon.defaultProps = {
|
|
232
210
|
width: "20",
|
|
233
211
|
height: "22",
|
|
@@ -235,7 +213,6 @@ LoginPhotoHoverIcon.defaultProps = {
|
|
|
235
213
|
fill: "none",
|
|
236
214
|
xmlns: "http://www.w3.org/2000/svg"
|
|
237
215
|
};
|
|
238
|
-
|
|
239
216
|
var LoginTransparentIcon = function LoginTransparentIcon(props) {
|
|
240
217
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
241
218
|
fillRule: "evenodd",
|
|
@@ -273,7 +250,6 @@ var LoginTransparentIcon = function LoginTransparentIcon(props) {
|
|
|
273
250
|
result: "shape"
|
|
274
251
|
}))));
|
|
275
252
|
};
|
|
276
|
-
|
|
277
253
|
LoginTransparentIcon.defaultProps = {
|
|
278
254
|
width: "28",
|
|
279
255
|
height: "30",
|
|
@@ -281,7 +257,6 @@ LoginTransparentIcon.defaultProps = {
|
|
|
281
257
|
fill: "none",
|
|
282
258
|
xmlns: "http://www.w3.org/2000/svg"
|
|
283
259
|
};
|
|
284
|
-
|
|
285
260
|
var LoginTransparentHoverIcon = function LoginTransparentHoverIcon(props) {
|
|
286
261
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
287
262
|
fillRule: "evenodd",
|
|
@@ -318,7 +293,6 @@ var LoginTransparentHoverIcon = function LoginTransparentHoverIcon(props) {
|
|
|
318
293
|
result: "shape"
|
|
319
294
|
}))));
|
|
320
295
|
};
|
|
321
|
-
|
|
322
296
|
LoginTransparentHoverIcon.defaultProps = {
|
|
323
297
|
width: "28",
|
|
324
298
|
height: "30",
|
|
@@ -326,7 +300,6 @@ LoginTransparentHoverIcon.defaultProps = {
|
|
|
326
300
|
fill: "none",
|
|
327
301
|
xmlns: "http://www.w3.org/2000/svg"
|
|
328
302
|
};
|
|
329
|
-
|
|
330
303
|
var LogoutNormalIcon = function LogoutNormalIcon(props) {
|
|
331
304
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
332
305
|
fillRule: "evenodd",
|
|
@@ -335,7 +308,6 @@ var LogoutNormalIcon = function LogoutNormalIcon(props) {
|
|
|
335
308
|
fill: "gray"
|
|
336
309
|
}));
|
|
337
310
|
};
|
|
338
|
-
|
|
339
311
|
LogoutNormalIcon.defaultProps = {
|
|
340
312
|
width: "19",
|
|
341
313
|
height: "21",
|
|
@@ -343,7 +315,6 @@ LogoutNormalIcon.defaultProps = {
|
|
|
343
315
|
fill: "none",
|
|
344
316
|
xmlns: "http://www.w3.org/2000/svg"
|
|
345
317
|
};
|
|
346
|
-
|
|
347
318
|
var LogoutNormalHoverIcon = function LogoutNormalHoverIcon(props) {
|
|
348
319
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
349
320
|
fillRule: "evenodd",
|
|
@@ -352,7 +323,6 @@ var LogoutNormalHoverIcon = function LogoutNormalHoverIcon(props) {
|
|
|
352
323
|
fill: "#262626"
|
|
353
324
|
}));
|
|
354
325
|
};
|
|
355
|
-
|
|
356
326
|
LogoutNormalHoverIcon.defaultProps = {
|
|
357
327
|
width: "19",
|
|
358
328
|
height: "21",
|
|
@@ -360,7 +330,6 @@ LogoutNormalHoverIcon.defaultProps = {
|
|
|
360
330
|
fill: "none",
|
|
361
331
|
xmlns: "http://www.w3.org/2000/svg"
|
|
362
332
|
};
|
|
363
|
-
|
|
364
333
|
var LogoutPhotoIcon = function LogoutPhotoIcon(props) {
|
|
365
334
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
366
335
|
fillRule: "evenodd",
|
|
@@ -369,7 +338,6 @@ var LogoutPhotoIcon = function LogoutPhotoIcon(props) {
|
|
|
369
338
|
fill: "gray"
|
|
370
339
|
}));
|
|
371
340
|
};
|
|
372
|
-
|
|
373
341
|
LogoutPhotoIcon.defaultProps = {
|
|
374
342
|
width: "19",
|
|
375
343
|
height: "21",
|
|
@@ -377,7 +345,6 @@ LogoutPhotoIcon.defaultProps = {
|
|
|
377
345
|
fill: "none",
|
|
378
346
|
xmlns: "http://www.w3.org/2000/svg"
|
|
379
347
|
};
|
|
380
|
-
|
|
381
348
|
var LogoutPhotoHoverIcon = function LogoutPhotoHoverIcon(props) {
|
|
382
349
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
383
350
|
fillRule: "evenodd",
|
|
@@ -386,7 +353,6 @@ var LogoutPhotoHoverIcon = function LogoutPhotoHoverIcon(props) {
|
|
|
386
353
|
fill: "#fff"
|
|
387
354
|
}));
|
|
388
355
|
};
|
|
389
|
-
|
|
390
356
|
LogoutPhotoHoverIcon.defaultProps = {
|
|
391
357
|
width: "19",
|
|
392
358
|
height: "21",
|
|
@@ -394,7 +360,6 @@ LogoutPhotoHoverIcon.defaultProps = {
|
|
|
394
360
|
fill: "none",
|
|
395
361
|
xmlns: "http://www.w3.org/2000/svg"
|
|
396
362
|
};
|
|
397
|
-
|
|
398
363
|
var LogoutTransparentIcon = function LogoutTransparentIcon(props) {
|
|
399
364
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
400
365
|
fillRule: "evenodd",
|
|
@@ -432,7 +397,6 @@ var LogoutTransparentIcon = function LogoutTransparentIcon(props) {
|
|
|
432
397
|
result: "shape"
|
|
433
398
|
}))));
|
|
434
399
|
};
|
|
435
|
-
|
|
436
400
|
LogoutTransparentIcon.defaultProps = {
|
|
437
401
|
width: "27",
|
|
438
402
|
height: "29",
|
|
@@ -440,7 +404,6 @@ LogoutTransparentIcon.defaultProps = {
|
|
|
440
404
|
fill: "none",
|
|
441
405
|
xmlns: "http://www.w3.org/2000/svg"
|
|
442
406
|
};
|
|
443
|
-
|
|
444
407
|
var LogoutTransparentHoverIcon = function LogoutTransparentHoverIcon(props) {
|
|
445
408
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
446
409
|
fillRule: "evenodd",
|
|
@@ -477,7 +440,6 @@ var LogoutTransparentHoverIcon = function LogoutTransparentHoverIcon(props) {
|
|
|
477
440
|
result: "shape"
|
|
478
441
|
}))));
|
|
479
442
|
};
|
|
480
|
-
|
|
481
443
|
LogoutTransparentHoverIcon.defaultProps = {
|
|
482
444
|
width: "27",
|
|
483
445
|
height: "29",
|
|
@@ -485,7 +447,6 @@ LogoutTransparentHoverIcon.defaultProps = {
|
|
|
485
447
|
fill: "none",
|
|
486
448
|
xmlns: "http://www.w3.org/2000/svg"
|
|
487
449
|
};
|
|
488
|
-
|
|
489
450
|
var SearchNormalIcon = function SearchNormalIcon(props) {
|
|
490
451
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
491
452
|
fillRule: "evenodd",
|
|
@@ -494,7 +455,6 @@ var SearchNormalIcon = function SearchNormalIcon(props) {
|
|
|
494
455
|
fill: "gray"
|
|
495
456
|
}));
|
|
496
457
|
};
|
|
497
|
-
|
|
498
458
|
SearchNormalIcon.defaultProps = {
|
|
499
459
|
width: "21",
|
|
500
460
|
height: "22",
|
|
@@ -502,7 +462,6 @@ SearchNormalIcon.defaultProps = {
|
|
|
502
462
|
fill: "none",
|
|
503
463
|
xmlns: "http://www.w3.org/2000/svg"
|
|
504
464
|
};
|
|
505
|
-
|
|
506
465
|
var SearchNormalHoverIcon = function SearchNormalHoverIcon(props) {
|
|
507
466
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
508
467
|
fillRule: "evenodd",
|
|
@@ -511,7 +470,6 @@ var SearchNormalHoverIcon = function SearchNormalHoverIcon(props) {
|
|
|
511
470
|
fill: "#262626"
|
|
512
471
|
}));
|
|
513
472
|
};
|
|
514
|
-
|
|
515
473
|
SearchNormalHoverIcon.defaultProps = {
|
|
516
474
|
width: "21",
|
|
517
475
|
height: "22",
|
|
@@ -519,7 +477,6 @@ SearchNormalHoverIcon.defaultProps = {
|
|
|
519
477
|
fill: "none",
|
|
520
478
|
xmlns: "http://www.w3.org/2000/svg"
|
|
521
479
|
};
|
|
522
|
-
|
|
523
480
|
var SearchPhotoIcon = function SearchPhotoIcon(props) {
|
|
524
481
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
525
482
|
fillRule: "evenodd",
|
|
@@ -528,7 +485,6 @@ var SearchPhotoIcon = function SearchPhotoIcon(props) {
|
|
|
528
485
|
fill: "gray"
|
|
529
486
|
}));
|
|
530
487
|
};
|
|
531
|
-
|
|
532
488
|
SearchPhotoIcon.defaultProps = {
|
|
533
489
|
width: "21",
|
|
534
490
|
height: "22",
|
|
@@ -536,7 +492,6 @@ SearchPhotoIcon.defaultProps = {
|
|
|
536
492
|
fill: "none",
|
|
537
493
|
xmlns: "http://www.w3.org/2000/svg"
|
|
538
494
|
};
|
|
539
|
-
|
|
540
495
|
var SearchPhotoHoverIcon = function SearchPhotoHoverIcon(props) {
|
|
541
496
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
542
497
|
fillRule: "evenodd",
|
|
@@ -545,7 +500,6 @@ var SearchPhotoHoverIcon = function SearchPhotoHoverIcon(props) {
|
|
|
545
500
|
fill: "#fff"
|
|
546
501
|
}));
|
|
547
502
|
};
|
|
548
|
-
|
|
549
503
|
SearchPhotoHoverIcon.defaultProps = {
|
|
550
504
|
width: "21",
|
|
551
505
|
height: "22",
|
|
@@ -553,7 +507,6 @@ SearchPhotoHoverIcon.defaultProps = {
|
|
|
553
507
|
fill: "none",
|
|
554
508
|
xmlns: "http://www.w3.org/2000/svg"
|
|
555
509
|
};
|
|
556
|
-
|
|
557
510
|
var SearchTransparentIcon = function SearchTransparentIcon(props) {
|
|
558
511
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
559
512
|
fillRule: "evenodd",
|
|
@@ -591,7 +544,6 @@ var SearchTransparentIcon = function SearchTransparentIcon(props) {
|
|
|
591
544
|
result: "shape"
|
|
592
545
|
}))));
|
|
593
546
|
};
|
|
594
|
-
|
|
595
547
|
SearchTransparentIcon.defaultProps = {
|
|
596
548
|
width: "29",
|
|
597
549
|
height: "30",
|
|
@@ -599,7 +551,6 @@ SearchTransparentIcon.defaultProps = {
|
|
|
599
551
|
fill: "none",
|
|
600
552
|
xmlns: "http://www.w3.org/2000/svg"
|
|
601
553
|
};
|
|
602
|
-
|
|
603
554
|
var SearchTransparentHoverIcon = function SearchTransparentHoverIcon(props) {
|
|
604
555
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
605
556
|
fillRule: "evenodd",
|
|
@@ -636,7 +587,6 @@ var SearchTransparentHoverIcon = function SearchTransparentHoverIcon(props) {
|
|
|
636
587
|
result: "shape"
|
|
637
588
|
}))));
|
|
638
589
|
};
|
|
639
|
-
|
|
640
590
|
SearchTransparentHoverIcon.defaultProps = {
|
|
641
591
|
width: "29",
|
|
642
592
|
height: "30",
|
|
@@ -644,14 +594,12 @@ SearchTransparentHoverIcon.defaultProps = {
|
|
|
644
594
|
fill: "none",
|
|
645
595
|
xmlns: "http://www.w3.org/2000/svg"
|
|
646
596
|
};
|
|
647
|
-
|
|
648
597
|
var ExpandIcon = function ExpandIcon(props) {
|
|
649
598
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
650
599
|
d: "M1 1l4.956 4.389L10.97 1",
|
|
651
600
|
stroke: "gray"
|
|
652
601
|
}));
|
|
653
602
|
};
|
|
654
|
-
|
|
655
603
|
ExpandIcon.defaultProps = {
|
|
656
604
|
width: "12",
|
|
657
605
|
height: "7",
|
|
@@ -659,14 +607,12 @@ ExpandIcon.defaultProps = {
|
|
|
659
607
|
fill: "none",
|
|
660
608
|
xmlns: "http://www.w3.org/2000/svg"
|
|
661
609
|
};
|
|
662
|
-
|
|
663
610
|
var ExpandHoverGrayIcon = function ExpandHoverGrayIcon(props) {
|
|
664
611
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
665
612
|
d: "M1 1l4.956 4.389L10.97 1",
|
|
666
613
|
stroke: "#262626"
|
|
667
614
|
}));
|
|
668
615
|
};
|
|
669
|
-
|
|
670
616
|
ExpandHoverGrayIcon.defaultProps = {
|
|
671
617
|
width: "12",
|
|
672
618
|
height: "7",
|
|
@@ -674,14 +620,12 @@ ExpandHoverGrayIcon.defaultProps = {
|
|
|
674
620
|
fill: "none",
|
|
675
621
|
xmlns: "http://www.w3.org/2000/svg"
|
|
676
622
|
};
|
|
677
|
-
|
|
678
623
|
var ExpandHoverWhiteIcon = function ExpandHoverWhiteIcon(props) {
|
|
679
624
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
680
625
|
d: "M1 1l4.956 4.389L10.97 1",
|
|
681
626
|
stroke: "#fff"
|
|
682
627
|
}));
|
|
683
628
|
};
|
|
684
|
-
|
|
685
629
|
ExpandHoverWhiteIcon.defaultProps = {
|
|
686
630
|
width: "12",
|
|
687
631
|
height: "7",
|
|
@@ -689,14 +633,12 @@ ExpandHoverWhiteIcon.defaultProps = {
|
|
|
689
633
|
fill: "none",
|
|
690
634
|
xmlns: "http://www.w3.org/2000/svg"
|
|
691
635
|
};
|
|
692
|
-
|
|
693
636
|
var CollapseIcon = function CollapseIcon(props) {
|
|
694
637
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
695
638
|
d: "M10.97 5.389L6.014 1 1 5.389",
|
|
696
639
|
stroke: "gray"
|
|
697
640
|
}));
|
|
698
641
|
};
|
|
699
|
-
|
|
700
642
|
CollapseIcon.defaultProps = {
|
|
701
643
|
width: "12",
|
|
702
644
|
height: "6",
|
|
@@ -704,14 +646,12 @@ CollapseIcon.defaultProps = {
|
|
|
704
646
|
fill: "none",
|
|
705
647
|
xmlns: "http://www.w3.org/2000/svg"
|
|
706
648
|
};
|
|
707
|
-
|
|
708
649
|
var CollapseHoverGrayIcon = function CollapseHoverGrayIcon(props) {
|
|
709
650
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
710
651
|
d: "M10.97 5.389L6.014 1 1 5.389",
|
|
711
652
|
stroke: "#262626"
|
|
712
653
|
}));
|
|
713
654
|
};
|
|
714
|
-
|
|
715
655
|
CollapseHoverGrayIcon.defaultProps = {
|
|
716
656
|
width: "12",
|
|
717
657
|
height: "6",
|
|
@@ -719,14 +659,12 @@ CollapseHoverGrayIcon.defaultProps = {
|
|
|
719
659
|
fill: "none",
|
|
720
660
|
xmlns: "http://www.w3.org/2000/svg"
|
|
721
661
|
};
|
|
722
|
-
|
|
723
662
|
var CollapseHoverWhiteIcon = function CollapseHoverWhiteIcon(props) {
|
|
724
663
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
725
664
|
d: "M10.97 5.389L6.014 1 1 5.389",
|
|
726
665
|
stroke: "#fff"
|
|
727
666
|
}));
|
|
728
667
|
};
|
|
729
|
-
|
|
730
668
|
CollapseHoverWhiteIcon.defaultProps = {
|
|
731
669
|
width: "12",
|
|
732
670
|
height: "6",
|
|
@@ -734,14 +672,12 @@ CollapseHoverWhiteIcon.defaultProps = {
|
|
|
734
672
|
fill: "none",
|
|
735
673
|
xmlns: "http://www.w3.org/2000/svg"
|
|
736
674
|
};
|
|
737
|
-
|
|
738
675
|
var ExpandWideIcon = function ExpandWideIcon(props) {
|
|
739
676
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
740
677
|
d: "M1 1l9.445 8L20 1",
|
|
741
678
|
stroke: "#9C9C9C"
|
|
742
679
|
}));
|
|
743
680
|
};
|
|
744
|
-
|
|
745
681
|
ExpandWideIcon.defaultProps = {
|
|
746
682
|
width: "21",
|
|
747
683
|
height: "10",
|
|
@@ -749,14 +685,12 @@ ExpandWideIcon.defaultProps = {
|
|
|
749
685
|
fill: "none",
|
|
750
686
|
xmlns: "http://www.w3.org/2000/svg"
|
|
751
687
|
};
|
|
752
|
-
|
|
753
688
|
var ExpandWideWhiteIcon = function ExpandWideWhiteIcon(props) {
|
|
754
689
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
755
690
|
d: "M1 1l9.445 8L20 1",
|
|
756
691
|
stroke: "#fff"
|
|
757
692
|
}));
|
|
758
693
|
};
|
|
759
|
-
|
|
760
694
|
ExpandWideWhiteIcon.defaultProps = {
|
|
761
695
|
width: "21",
|
|
762
696
|
height: "10",
|
|
@@ -764,14 +698,12 @@ ExpandWideWhiteIcon.defaultProps = {
|
|
|
764
698
|
fill: "none",
|
|
765
699
|
xmlns: "http://www.w3.org/2000/svg"
|
|
766
700
|
};
|
|
767
|
-
|
|
768
701
|
var CollapseWideIcon = function CollapseWideIcon(props) {
|
|
769
702
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
770
703
|
d: "M20 9l-9.445-8L1 9",
|
|
771
704
|
stroke: "#9C9C9C"
|
|
772
705
|
}));
|
|
773
706
|
};
|
|
774
|
-
|
|
775
707
|
CollapseWideIcon.defaultProps = {
|
|
776
708
|
width: "21",
|
|
777
709
|
height: "10",
|
|
@@ -779,14 +711,12 @@ CollapseWideIcon.defaultProps = {
|
|
|
779
711
|
fill: "none",
|
|
780
712
|
xmlns: "http://www.w3.org/2000/svg"
|
|
781
713
|
};
|
|
782
|
-
|
|
783
714
|
var CollapseWideWhiteIcon = function CollapseWideWhiteIcon(props) {
|
|
784
715
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
785
716
|
d: "M20 9l-9.445-8L1 9",
|
|
786
717
|
stroke: "#fff"
|
|
787
718
|
}));
|
|
788
719
|
};
|
|
789
|
-
|
|
790
720
|
CollapseWideWhiteIcon.defaultProps = {
|
|
791
721
|
width: "21",
|
|
792
722
|
height: "10",
|
|
@@ -794,7 +724,6 @@ CollapseWideWhiteIcon.defaultProps = {
|
|
|
794
724
|
fill: "none",
|
|
795
725
|
xmlns: "http://www.w3.org/2000/svg"
|
|
796
726
|
};
|
|
797
|
-
|
|
798
727
|
var MenuIcon = function MenuIcon(props) {
|
|
799
728
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
800
729
|
fillRule: "evenodd",
|
|
@@ -803,7 +732,6 @@ var MenuIcon = function MenuIcon(props) {
|
|
|
803
732
|
fill: "#979797"
|
|
804
733
|
}));
|
|
805
734
|
};
|
|
806
|
-
|
|
807
735
|
MenuIcon.defaultProps = {
|
|
808
736
|
width: "17",
|
|
809
737
|
height: "18",
|
|
@@ -811,7 +739,6 @@ MenuIcon.defaultProps = {
|
|
|
811
739
|
fill: "none",
|
|
812
740
|
xmlns: "http://www.w3.org/2000/svg"
|
|
813
741
|
};
|
|
814
|
-
|
|
815
742
|
var MenuWhiteIcon = function MenuWhiteIcon(props) {
|
|
816
743
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("path", {
|
|
817
744
|
fillRule: "evenodd",
|
|
@@ -820,7 +747,6 @@ var MenuWhiteIcon = function MenuWhiteIcon(props) {
|
|
|
820
747
|
fill: "#fff"
|
|
821
748
|
}));
|
|
822
749
|
};
|
|
823
|
-
|
|
824
750
|
MenuWhiteIcon.defaultProps = {
|
|
825
751
|
width: "17",
|
|
826
752
|
height: "18",
|
|
@@ -828,7 +754,6 @@ MenuWhiteIcon.defaultProps = {
|
|
|
828
754
|
fill: "none",
|
|
829
755
|
xmlns: "http://www.w3.org/2000/svg"
|
|
830
756
|
};
|
|
831
|
-
|
|
832
757
|
var CloseIcon = function CloseIcon(props) {
|
|
833
758
|
return /*#__PURE__*/_react["default"].createElement("svg", props, /*#__PURE__*/_react["default"].createElement("circle", {
|
|
834
759
|
cx: "21",
|
|
@@ -842,7 +767,6 @@ var CloseIcon = function CloseIcon(props) {
|
|
|
842
767
|
fill: "#979797"
|
|
843
768
|
}));
|
|
844
769
|
};
|
|
845
|
-
|
|
846
770
|
CloseIcon.defaultProps = {
|
|
847
771
|
width: "42",
|
|
848
772
|
height: "42",
|
|
@@ -850,7 +774,7 @@ CloseIcon.defaultProps = {
|
|
|
850
774
|
fill: "none",
|
|
851
775
|
xmlns: "http://www.w3.org/2000/svg"
|
|
852
776
|
};
|
|
853
|
-
var ServiceIcons = {
|
|
777
|
+
var ServiceIcons = exports.ServiceIcons = {
|
|
854
778
|
normal: {
|
|
855
779
|
bookmark: [BookmarkNormalIcon, BookmarkNormalHoverIcon],
|
|
856
780
|
login: [LoginNormalIcon, LoginNormalHoverIcon],
|
|
@@ -870,8 +794,7 @@ var ServiceIcons = {
|
|
|
870
794
|
search: [SearchTransparentIcon, SearchTransparentHoverIcon]
|
|
871
795
|
}
|
|
872
796
|
};
|
|
873
|
-
exports.
|
|
874
|
-
var Icons = {
|
|
797
|
+
var Icons = exports.Icons = {
|
|
875
798
|
normal: {
|
|
876
799
|
expand: [ExpandIcon, ExpandHoverGrayIcon],
|
|
877
800
|
collapse: [CollapseIcon, CollapseHoverGrayIcon],
|
|
@@ -897,9 +820,7 @@ var Icons = {
|
|
|
897
820
|
close: CloseIcon
|
|
898
821
|
}
|
|
899
822
|
};
|
|
900
|
-
exports
|
|
901
|
-
var _default = {
|
|
823
|
+
var _default = exports["default"] = {
|
|
902
824
|
ServiceIcons: ServiceIcons,
|
|
903
825
|
Icons: Icons
|
|
904
|
-
};
|
|
905
|
-
exports["default"] = _default;
|
|
826
|
+
};
|
package/lib/utils/jwt.js
CHANGED
|
@@ -4,34 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
9
|
var _ = {
|
|
13
10
|
get: _get["default"]
|
|
14
11
|
};
|
|
12
|
+
|
|
15
13
|
/**
|
|
16
14
|
* Decode the payload of JWT from base64 string into JSON object
|
|
17
15
|
*
|
|
18
16
|
* @param {string} jwt
|
|
19
17
|
* @return {Object} JSON object or null if decoding fails
|
|
20
18
|
*/
|
|
21
|
-
|
|
22
19
|
function decodePayload(jwt) {
|
|
23
20
|
try {
|
|
24
21
|
var payload = _.get(jwt.split('.'), 1);
|
|
25
|
-
|
|
26
22
|
return JSON.parse(Buffer.from(payload, 'base64').toString('utf8'));
|
|
27
23
|
} catch (err) {
|
|
28
24
|
console.error('extract payload from jwt error: ', err); // eslint-disable-line
|
|
29
|
-
|
|
30
25
|
return null;
|
|
31
26
|
}
|
|
32
27
|
}
|
|
33
|
-
|
|
34
|
-
var _default = {
|
|
28
|
+
var _default = exports["default"] = {
|
|
35
29
|
decodePayload: decodePayload
|
|
36
|
-
};
|
|
37
|
-
exports["default"] = _default;
|
|
30
|
+
};
|