@mjhls/mjh-framework 1.0.795-beta.0 → 1.0.795-beta.1
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/README.md +1 -1
- package/dist/cjs/ArticleProgramLandingPage.js +1 -1
- package/dist/cjs/Auth.js +7 -7
- package/dist/cjs/ExternalResources.js +1 -1
- package/dist/cjs/HorizontalArticleListing.js +1 -1
- package/dist/cjs/MediaSeriesLanding.js +1 -1
- package/dist/cjs/PartnerDetailListing.js +1 -1
- package/dist/cjs/TaxonomyDescription.js +1 -1
- package/dist/cjs/VideoProgramLandingPage.js +1 -1
- package/dist/cjs/View.js +3 -3
- package/dist/cjs/getRelatedArticle.js +354 -5
- package/dist/cjs/getSerializers.js +1 -1
- package/dist/cjs/index-bd6c9f56.js +211 -0
- package/dist/cjs/{index-cfd1f8c2.js → index-f05824b5.js} +1 -1
- package/dist/cjs/index.js +4 -5
- package/dist/esm/ArticleProgramLandingPage.js +1 -1
- package/dist/esm/Auth.js +6 -6
- package/dist/esm/ExternalResources.js +1 -1
- package/dist/esm/HorizontalArticleListing.js +1 -1
- package/dist/esm/MediaSeriesLanding.js +1 -1
- package/dist/esm/PartnerDetailListing.js +1 -1
- package/dist/esm/TaxonomyDescription.js +1 -1
- package/dist/esm/VideoProgramLandingPage.js +1 -1
- package/dist/esm/View.js +3 -3
- package/dist/esm/getRelatedArticle.js +354 -5
- package/dist/esm/getSerializers.js +1 -1
- package/dist/esm/{index-85f89e4d.js → index-41b5c632.js} +1 -1
- package/dist/esm/index-db3bb315.js +207 -0
- package/dist/esm/index.js +3 -4
- package/package.json +1 -1
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/*!
|
|
4
|
+
* cookie
|
|
5
|
+
* Copyright(c) 2012-2014 Roman Shtylman
|
|
6
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
7
|
+
* MIT Licensed
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Module exports.
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
var parse_1 = parse;
|
|
16
|
+
var serialize_1 = serialize;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Module variables.
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
var decode = decodeURIComponent;
|
|
24
|
+
var encode = encodeURIComponent;
|
|
25
|
+
var pairSplitRegExp = /; */;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* RegExp to match field-content in RFC 7230 sec 3.2
|
|
29
|
+
*
|
|
30
|
+
* field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
|
|
31
|
+
* field-vchar = VCHAR / obs-text
|
|
32
|
+
* obs-text = %x80-FF
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Parse a cookie header.
|
|
39
|
+
*
|
|
40
|
+
* Parse the given cookie header string into an object
|
|
41
|
+
* The object has the various cookies as keys(names) => values
|
|
42
|
+
*
|
|
43
|
+
* @param {string} str
|
|
44
|
+
* @param {object} [options]
|
|
45
|
+
* @return {object}
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
function parse(str, options) {
|
|
50
|
+
if (typeof str !== 'string') {
|
|
51
|
+
throw new TypeError('argument str must be a string');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var obj = {};
|
|
55
|
+
var opt = options || {};
|
|
56
|
+
var pairs = str.split(pairSplitRegExp);
|
|
57
|
+
var dec = opt.decode || decode;
|
|
58
|
+
|
|
59
|
+
for (var i = 0; i < pairs.length; i++) {
|
|
60
|
+
var pair = pairs[i];
|
|
61
|
+
var eq_idx = pair.indexOf('=');
|
|
62
|
+
|
|
63
|
+
// skip things that don't look like key=value
|
|
64
|
+
if (eq_idx < 0) {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
var key = pair.substr(0, eq_idx).trim();
|
|
69
|
+
var val = pair.substr(++eq_idx, pair.length).trim();
|
|
70
|
+
|
|
71
|
+
// quoted values
|
|
72
|
+
if ('"' == val[0]) {
|
|
73
|
+
val = val.slice(1, -1);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// only assign once
|
|
77
|
+
if (undefined == obj[key]) {
|
|
78
|
+
obj[key] = tryDecode(val, dec);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return obj;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Serialize data into a cookie header.
|
|
87
|
+
*
|
|
88
|
+
* Serialize the a name value pair into a cookie string suitable for
|
|
89
|
+
* http headers. An optional options object specified cookie parameters.
|
|
90
|
+
*
|
|
91
|
+
* serialize('foo', 'bar', { httpOnly: true })
|
|
92
|
+
* => "foo=bar; httpOnly"
|
|
93
|
+
*
|
|
94
|
+
* @param {string} name
|
|
95
|
+
* @param {string} val
|
|
96
|
+
* @param {object} [options]
|
|
97
|
+
* @return {string}
|
|
98
|
+
* @public
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
function serialize(name, val, options) {
|
|
102
|
+
var opt = options || {};
|
|
103
|
+
var enc = opt.encode || encode;
|
|
104
|
+
|
|
105
|
+
if (typeof enc !== 'function') {
|
|
106
|
+
throw new TypeError('option encode is invalid');
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (!fieldContentRegExp.test(name)) {
|
|
110
|
+
throw new TypeError('argument name is invalid');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
var value = enc(val);
|
|
114
|
+
|
|
115
|
+
if (value && !fieldContentRegExp.test(value)) {
|
|
116
|
+
throw new TypeError('argument val is invalid');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
var str = name + '=' + value;
|
|
120
|
+
|
|
121
|
+
if (null != opt.maxAge) {
|
|
122
|
+
var maxAge = opt.maxAge - 0;
|
|
123
|
+
|
|
124
|
+
if (isNaN(maxAge) || !isFinite(maxAge)) {
|
|
125
|
+
throw new TypeError('option maxAge is invalid')
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
str += '; Max-Age=' + Math.floor(maxAge);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (opt.domain) {
|
|
132
|
+
if (!fieldContentRegExp.test(opt.domain)) {
|
|
133
|
+
throw new TypeError('option domain is invalid');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
str += '; Domain=' + opt.domain;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (opt.path) {
|
|
140
|
+
if (!fieldContentRegExp.test(opt.path)) {
|
|
141
|
+
throw new TypeError('option path is invalid');
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
str += '; Path=' + opt.path;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (opt.expires) {
|
|
148
|
+
if (typeof opt.expires.toUTCString !== 'function') {
|
|
149
|
+
throw new TypeError('option expires is invalid');
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
str += '; Expires=' + opt.expires.toUTCString();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (opt.httpOnly) {
|
|
156
|
+
str += '; HttpOnly';
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (opt.secure) {
|
|
160
|
+
str += '; Secure';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (opt.sameSite) {
|
|
164
|
+
var sameSite = typeof opt.sameSite === 'string'
|
|
165
|
+
? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
166
|
+
|
|
167
|
+
switch (sameSite) {
|
|
168
|
+
case true:
|
|
169
|
+
str += '; SameSite=Strict';
|
|
170
|
+
break;
|
|
171
|
+
case 'lax':
|
|
172
|
+
str += '; SameSite=Lax';
|
|
173
|
+
break;
|
|
174
|
+
case 'strict':
|
|
175
|
+
str += '; SameSite=Strict';
|
|
176
|
+
break;
|
|
177
|
+
case 'none':
|
|
178
|
+
str += '; SameSite=None';
|
|
179
|
+
break;
|
|
180
|
+
default:
|
|
181
|
+
throw new TypeError('option sameSite is invalid');
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return str;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Try decoding a string using a decoding function.
|
|
190
|
+
*
|
|
191
|
+
* @param {string} str
|
|
192
|
+
* @param {function} decode
|
|
193
|
+
* @private
|
|
194
|
+
*/
|
|
195
|
+
|
|
196
|
+
function tryDecode(str, decode) {
|
|
197
|
+
try {
|
|
198
|
+
return decode(str);
|
|
199
|
+
} catch (e) {
|
|
200
|
+
return str;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
var cookie = {
|
|
205
|
+
parse: parse_1,
|
|
206
|
+
serialize: serialize_1
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
exports.cookie = cookie;
|
|
210
|
+
exports.parse_1 = parse_1;
|
|
211
|
+
exports.serialize_1 = serialize_1;
|
|
@@ -8931,7 +8931,7 @@ var generateSrcSet = function generateSrcSet(source, client) {
|
|
|
8931
8931
|
var builder = index$1.imageUrlBuilder(client);
|
|
8932
8932
|
var imageWidths = [500, 1000, 1500];
|
|
8933
8933
|
var srcSet = imageWidths.reduce(function (result, width, index) {
|
|
8934
|
-
var image = builder.image(source).
|
|
8934
|
+
var image = builder.image(source).width(width).fit('max').auto('format').url();
|
|
8935
8935
|
return result = '' + result + image + ' ' + width + 'w' + (index !== imageWidths.length - 1 ? ', ' : '');
|
|
8936
8936
|
}, '');
|
|
8937
8937
|
return srcSet;
|
package/dist/cjs/index.js
CHANGED
|
@@ -74,7 +74,7 @@ require('./index.esm-90433435.js');
|
|
|
74
74
|
var VideoSeriesListing = require('./VideoSeriesListing.js');
|
|
75
75
|
var ArticleSeriesListing = require('./ArticleSeriesListing.js');
|
|
76
76
|
var ArticleCarousel = require('./ArticleCarousel.js');
|
|
77
|
-
var getSerializers = require('./index-
|
|
77
|
+
var getSerializers = require('./index-f05824b5.js');
|
|
78
78
|
require('./util-f2c1b65b.js');
|
|
79
79
|
require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
80
80
|
require('next/head');
|
|
@@ -171,12 +171,11 @@ var ConferenceArticleCard = require('./ConferenceArticleCard.js');
|
|
|
171
171
|
var KMTracker = require('./KMTracker.js');
|
|
172
172
|
var getSeriesDetail = require('./getSeriesDetail.js');
|
|
173
173
|
var SetCookie = require('./SetCookie.js');
|
|
174
|
-
require('
|
|
175
|
-
var getQuery = require('./getQuery.js');
|
|
174
|
+
require('./index-bd6c9f56.js');
|
|
176
175
|
var getRelatedArticle = require('./getRelatedArticle.js');
|
|
176
|
+
var getQuery = require('./getQuery.js');
|
|
177
177
|
var Auth = require('./Auth.js');
|
|
178
178
|
require('swr');
|
|
179
|
-
require('cookie');
|
|
180
179
|
require('passport-local');
|
|
181
180
|
require('mysql');
|
|
182
181
|
require('./SeriesSlider-4abb21b4.js');
|
|
@@ -366,8 +365,8 @@ exports.ConferenceArticleCard = ConferenceArticleCard;
|
|
|
366
365
|
exports.KMTracker = KMTracker;
|
|
367
366
|
exports.getSeriesDetail = getSeriesDetail;
|
|
368
367
|
exports.SetCookie = SetCookie;
|
|
369
|
-
exports.getQuery = getQuery;
|
|
370
368
|
exports.getRelatedArticle = getRelatedArticle;
|
|
369
|
+
exports.getQuery = getQuery;
|
|
371
370
|
exports.Auth = Auth.default;
|
|
372
371
|
exports.getTargeting = getTargeting.getTargeting;
|
|
373
372
|
exports.View = View;
|
|
@@ -46,7 +46,7 @@ import 'react-bootstrap';
|
|
|
46
46
|
import './iconBase-602d52fe.js';
|
|
47
47
|
import './index.esm-29e48d38.js';
|
|
48
48
|
import ArticleSeriesListing from './ArticleSeriesListing.js';
|
|
49
|
-
import { g as getSerializers } from './index-
|
|
49
|
+
import { g as getSerializers } from './index-41b5c632.js';
|
|
50
50
|
import './util-7700fc59.js';
|
|
51
51
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
52
52
|
import 'next/head';
|
package/dist/esm/Auth.js
CHANGED
|
@@ -14,8 +14,8 @@ import { _ as _JSON$stringify } from './stringify-4330ccdc.js';
|
|
|
14
14
|
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-fc1c2e29.js';
|
|
15
15
|
import { Col, Form, Button, Spinner } from 'react-bootstrap';
|
|
16
16
|
import { u as util } from './util-7700fc59.js';
|
|
17
|
+
import { s as serialize_1, p as parse_1 } from './index-db3bb315.js';
|
|
17
18
|
import useSWR from 'swr';
|
|
18
|
-
import { serialize, parse } from 'cookie';
|
|
19
19
|
import Local from 'passport-local';
|
|
20
20
|
import mysql from 'mysql';
|
|
21
21
|
|
|
@@ -1207,7 +1207,7 @@ var MAX_AGE = 60 * 60 * 8; // 8 hours
|
|
|
1207
1207
|
|
|
1208
1208
|
function setTokenCookie(res, token, eKey) {
|
|
1209
1209
|
var cookies_serailized = [];
|
|
1210
|
-
cookies_serailized.push(
|
|
1210
|
+
cookies_serailized.push(serialize_1(TOKEN_NAME, token, {
|
|
1211
1211
|
//maxAge: MAX_AGE, // we want login cookie to expire when browser
|
|
1212
1212
|
//expires: new Date(Date.now() + MAX_AGE * 1000),
|
|
1213
1213
|
//httpOnly: true,
|
|
@@ -1216,7 +1216,7 @@ function setTokenCookie(res, token, eKey) {
|
|
|
1216
1216
|
//sameSite: 'lax',
|
|
1217
1217
|
}));
|
|
1218
1218
|
|
|
1219
|
-
cookies_serailized.push(
|
|
1219
|
+
cookies_serailized.push(serialize_1('eKey', eKey, {
|
|
1220
1220
|
//maxAge: MAX_AGE, // we want login cookie to expire when browser
|
|
1221
1221
|
//expires: new Date(Date.now() + MAX_AGE * 1000),
|
|
1222
1222
|
//httpOnly: true,
|
|
@@ -1230,12 +1230,12 @@ function setTokenCookie(res, token, eKey) {
|
|
|
1230
1230
|
|
|
1231
1231
|
function removeTokenCookie(res) {
|
|
1232
1232
|
var cookies_serailized = [];
|
|
1233
|
-
cookies_serailized.push(
|
|
1233
|
+
cookies_serailized.push(serialize_1(TOKEN_NAME, '', {
|
|
1234
1234
|
maxAge: -1,
|
|
1235
1235
|
expires: new Date(Date.now() - MAX_AGE * 1000),
|
|
1236
1236
|
path: '/'
|
|
1237
1237
|
}));
|
|
1238
|
-
cookies_serailized.push(
|
|
1238
|
+
cookies_serailized.push(serialize_1('eKey', '', {
|
|
1239
1239
|
maxAge: -1,
|
|
1240
1240
|
expires: new Date(Date.now() - MAX_AGE * 1000),
|
|
1241
1241
|
path: '/'
|
|
@@ -1250,7 +1250,7 @@ function parseCookies(req) {
|
|
|
1250
1250
|
|
|
1251
1251
|
// For pages we do need to parse the cookies.
|
|
1252
1252
|
var cookie = req.headers ? req.headers.cookie : null;
|
|
1253
|
-
return
|
|
1253
|
+
return parse_1(cookie || '');
|
|
1254
1254
|
}
|
|
1255
1255
|
|
|
1256
1256
|
function getTokenCookie(req) {
|
|
@@ -41,7 +41,7 @@ import './GroupDeck.js';
|
|
|
41
41
|
import 'react-bootstrap';
|
|
42
42
|
import './iconBase-602d52fe.js';
|
|
43
43
|
import './index.esm-29e48d38.js';
|
|
44
|
-
import { g as getSerializers } from './index-
|
|
44
|
+
import { g as getSerializers } from './index-41b5c632.js';
|
|
45
45
|
import './util-7700fc59.js';
|
|
46
46
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
47
47
|
import 'next/head';
|
|
@@ -43,7 +43,7 @@ import 'react-bootstrap';
|
|
|
43
43
|
import './iconBase-602d52fe.js';
|
|
44
44
|
import { I as IoIosArrowForward } from './index.esm-29e48d38.js';
|
|
45
45
|
import ArticleCarousel from './ArticleCarousel.js';
|
|
46
|
-
import { g as getSerializers } from './index-
|
|
46
|
+
import { g as getSerializers } from './index-41b5c632.js';
|
|
47
47
|
import './util-7700fc59.js';
|
|
48
48
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
49
49
|
import 'next/head';
|
|
@@ -48,7 +48,7 @@ import './GroupDeck.js';
|
|
|
48
48
|
import 'react-bootstrap';
|
|
49
49
|
import './iconBase-602d52fe.js';
|
|
50
50
|
import './index.esm-29e48d38.js';
|
|
51
|
-
import { g as getSerializers } from './index-
|
|
51
|
+
import { g as getSerializers } from './index-41b5c632.js';
|
|
52
52
|
import './util-7700fc59.js';
|
|
53
53
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
54
54
|
import 'next/head';
|
|
@@ -51,7 +51,7 @@ import './timeDifferenceCalc.js';
|
|
|
51
51
|
import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
52
52
|
import './iconBase-602d52fe.js';
|
|
53
53
|
import './index.esm-29e48d38.js';
|
|
54
|
-
import { g as getSerializers } from './index-
|
|
54
|
+
import { g as getSerializers } from './index-41b5c632.js';
|
|
55
55
|
import './util-7700fc59.js';
|
|
56
56
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
57
57
|
import 'next/head';
|
|
@@ -41,7 +41,7 @@ import './GroupDeck.js';
|
|
|
41
41
|
import 'react-bootstrap';
|
|
42
42
|
import './iconBase-602d52fe.js';
|
|
43
43
|
import './index.esm-29e48d38.js';
|
|
44
|
-
import { g as getSerializers } from './index-
|
|
44
|
+
import { g as getSerializers } from './index-41b5c632.js';
|
|
45
45
|
import './util-7700fc59.js';
|
|
46
46
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
47
47
|
import Head from 'next/head';
|
|
@@ -46,7 +46,7 @@ import 'react-bootstrap';
|
|
|
46
46
|
import './iconBase-602d52fe.js';
|
|
47
47
|
import './index.esm-29e48d38.js';
|
|
48
48
|
import VideoSeriesListing from './VideoSeriesListing.js';
|
|
49
|
-
import { g as getSerializers } from './index-
|
|
49
|
+
import { g as getSerializers } from './index-41b5c632.js';
|
|
50
50
|
import './util-7700fc59.js';
|
|
51
51
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
52
52
|
import 'next/head';
|
package/dist/esm/View.js
CHANGED
|
@@ -43,7 +43,7 @@ import './GroupDeck.js';
|
|
|
43
43
|
import 'react-bootstrap';
|
|
44
44
|
import './iconBase-602d52fe.js';
|
|
45
45
|
import './index.esm-29e48d38.js';
|
|
46
|
-
import { r as renderAuthor, g as getSerializers } from './index-
|
|
46
|
+
import { r as renderAuthor, g as getSerializers } from './index-41b5c632.js';
|
|
47
47
|
import './util-7700fc59.js';
|
|
48
48
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
49
49
|
import Head from 'next/head';
|
|
@@ -59,9 +59,9 @@ import { _ as _Object$keys } from './keys-8eda7a5c.js';
|
|
|
59
59
|
import 'react-bootstrap/Dropdown';
|
|
60
60
|
import { b as FaMinus, c as FaPlus } from './index.esm-cf08bf18.js';
|
|
61
61
|
import getSeriesDetail from './getSeriesDetail.js';
|
|
62
|
-
import '
|
|
63
|
-
import getQuery from './getQuery.js';
|
|
62
|
+
import './index-db3bb315.js';
|
|
64
63
|
import getRelatedArticle from './getRelatedArticle.js';
|
|
64
|
+
import getQuery from './getQuery.js';
|
|
65
65
|
import { S as SeriesSlider } from './SeriesSlider-36be7223.js';
|
|
66
66
|
import { g as getTargeting, a as getContentPlacementUrl } from './getTargeting-82e86707.js';
|
|
67
67
|
import getKeywords from './getKeywords.js';
|