@mjhls/mjh-framework 1.0.694-beta.2 → 1.0.694-beta.3
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/dist/cjs/AD.js +1 -1
- package/dist/cjs/AD300x250.js +2 -2
- package/dist/cjs/AD300x250x600.js +2 -2
- package/dist/cjs/AD728x90.js +2 -2
- package/dist/cjs/ADFloatingFooter.js +2 -2
- package/dist/cjs/ADGutter.js +2 -2
- package/dist/cjs/ADSkyscraper.js +2 -2
- package/dist/cjs/ADSponsoredResources.js +2 -2
- package/dist/cjs/ADWebcast.js +2 -2
- package/dist/cjs/ADWelcome.js +2 -2
- package/dist/cjs/AdSlot.js +2 -2
- package/dist/cjs/ArticleSeriesListing.js +2 -2
- package/dist/cjs/CMEDeck.js +2 -2
- package/dist/cjs/Column2.js +2 -2
- package/dist/cjs/Column3.js +3 -3
- package/dist/cjs/DeckContent.js +3 -3
- package/dist/cjs/DeckQueue.js +3 -3
- package/dist/cjs/{Dfp-1a9e2305.js → Dfp-f6a18ed2.js} +2 -2
- package/dist/cjs/ExternalResources.js +3 -3
- package/dist/cjs/GridContent.js +5 -5
- package/dist/cjs/IssueLanding.js +4 -4
- package/dist/cjs/LeftNav.js +2 -2
- package/dist/cjs/MasterDeck.js +4 -4
- package/dist/cjs/PartnerDetailListing.js +5 -5
- package/dist/cjs/QueueDeckExpanded.js +4 -4
- package/dist/cjs/SideFooter.js +2 -2
- package/dist/cjs/TemplateNormal.js +3 -3
- package/dist/cjs/VideoSeriesListing.js +2 -2
- package/dist/cjs/View.js +139 -178
- package/dist/cjs/{debounce-0106f44a.js → debounce-eb287781.js} +1 -1
- package/dist/cjs/{get-445b7179.js → get-68c52cb1.js} +1 -4
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/getRelatedArticle.js +75 -32
- package/dist/cjs/getSerializers.js +3 -3
- package/dist/cjs/index.js +13 -349
- package/dist/cjs/{isSymbol-488934a7.js → isSymbol-04666465.js} +0 -2
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +3 -3
- package/dist/esm/AD300x250x600.js +3 -3
- package/dist/esm/AD728x90.js +3 -3
- package/dist/esm/ADFloatingFooter.js +3 -3
- package/dist/esm/ADGutter.js +3 -3
- package/dist/esm/ADSkyscraper.js +3 -3
- package/dist/esm/ADSponsoredResources.js +3 -3
- package/dist/esm/ADWebcast.js +3 -3
- package/dist/esm/ADWelcome.js +3 -3
- package/dist/esm/AdSlot.js +3 -3
- package/dist/esm/ArticleSeriesListing.js +2 -2
- package/dist/esm/Auth.js +1 -1
- package/dist/esm/Beam.js +1 -1
- package/dist/esm/CMEDeck.js +3 -3
- package/dist/esm/Column2.js +3 -3
- package/dist/esm/Column3.js +4 -4
- package/dist/esm/DeckContent.js +4 -4
- package/dist/esm/DeckQueue.js +3 -3
- package/dist/esm/{Dfp-0fc96a5d.js → Dfp-96b49def.js} +2 -2
- package/dist/esm/ExternalResources.js +4 -4
- package/dist/esm/GridContent.js +6 -6
- package/dist/esm/HamMagazine.js +1 -1
- package/dist/esm/IssueLanding.js +5 -5
- package/dist/esm/LeftNav.js +3 -3
- package/dist/esm/MasterDeck.js +5 -5
- package/dist/esm/NavDvm.js +1 -1
- package/dist/esm/NavMagazine.js +1 -1
- package/dist/esm/NavNative.js +1 -1
- package/dist/esm/NavNormal.js +1 -1
- package/dist/esm/PartnerDetailListing.js +6 -6
- package/dist/esm/QueueDeckExpanded.js +5 -5
- package/dist/esm/Segment.js +1 -1
- package/dist/esm/SideFooter.js +3 -3
- package/dist/esm/TemplateNormal.js +4 -4
- package/dist/esm/VideoSeriesFilter.js +1 -1
- package/dist/esm/VideoSeriesListing.js +2 -2
- package/dist/esm/View.js +140 -179
- package/dist/esm/{asyncToGenerator-d0f08f8d.js → asyncToGenerator-7c654f36.js} +1 -1
- package/dist/esm/{debounce-3ab4e0ad.js → debounce-1a993acf.js} +1 -1
- package/dist/esm/{get-a36cf4c6.js → get-5ee14cda.js} +2 -2
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/getRelatedArticle.js +76 -33
- package/dist/esm/getSerializers.js +4 -4
- package/dist/esm/index.js +13 -349
- package/dist/esm/{isSymbol-5eb15258.js → isSymbol-807e927e.js} +1 -1
- package/package.json +1 -1
- /package/dist/cjs/{ADInfeed-4ef14853.js → ADInfeed-2fe7211c.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-d42cc813.js → ADlgInfeed-14e17b43.js} +0 -0
- /package/dist/cjs/{index-26569dcc.js → index-a5919bab.js} +0 -0
- /package/dist/esm/{ADInfeed-ddbadcd3.js → ADInfeed-eae71d07.js} +0 -0
- /package/dist/esm/{ADlgInfeed-4d228100.js → ADlgInfeed-c619fe64.js} +0 -0
- /package/dist/esm/{index-42fd3adb.js → index-c376cd8e.js} +0 -0
|
@@ -20,8 +20,8 @@ import 'react-bootstrap/Row';
|
|
|
20
20
|
import 'react-bootstrap/Col';
|
|
21
21
|
import './moment-e2f9b20c.js';
|
|
22
22
|
import 'next/router';
|
|
23
|
-
import './isSymbol-
|
|
24
|
-
import './debounce-
|
|
23
|
+
import './isSymbol-807e927e.js';
|
|
24
|
+
import './debounce-1a993acf.js';
|
|
25
25
|
import 'react-dom';
|
|
26
26
|
import './index-73819142.js';
|
|
27
27
|
import './index-5f9f807a.js';
|
|
@@ -29,7 +29,7 @@ import './main-5d1e4bd3.js';
|
|
|
29
29
|
import './entities-7cc3bf45.js';
|
|
30
30
|
import './stringify-008c8802.js';
|
|
31
31
|
import './slicedToArray-7021e5df.js';
|
|
32
|
-
import './asyncToGenerator-
|
|
32
|
+
import './asyncToGenerator-7c654f36.js';
|
|
33
33
|
import './_set-species-cede29f8.js';
|
|
34
34
|
import './Segment.js';
|
|
35
35
|
import './Beam.js';
|
|
@@ -41,7 +41,7 @@ import 'react-bootstrap';
|
|
|
41
41
|
import './iconBase-602d52fe.js';
|
|
42
42
|
import './index.esm-29e48d38.js';
|
|
43
43
|
import 'react-bootstrap/Button';
|
|
44
|
-
export { g as default } from './index-
|
|
44
|
+
export { g as default } from './index-c376cd8e.js';
|
|
45
45
|
import './util-7700fc59.js';
|
|
46
46
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
47
47
|
import 'react-bootstrap/Pagination';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
2
|
import './_to-object-ded78eb9.js';
|
|
3
3
|
import './es6.string.iterator-9b2af4a5.js';
|
|
4
4
|
import './_library-528f1934.js';
|
|
@@ -6,14 +6,14 @@ import './_iter-detect-59409a32.js';
|
|
|
6
6
|
import './toConsumableArray-725434a0.js';
|
|
7
7
|
import './core.get-iterator-method-54d2e411.js';
|
|
8
8
|
import './_object-pie-71ac75a4.js';
|
|
9
|
-
import
|
|
9
|
+
import './extends-cc5da797.js';
|
|
10
10
|
import './_object-sap-4d59d5bd.js';
|
|
11
11
|
import './inherits-7ee3e0c1.js';
|
|
12
12
|
import './define-property-de3fc946.js';
|
|
13
13
|
import './web.dom.iterable-8956f9a5.js';
|
|
14
14
|
import './typeof-08f2c380.js';
|
|
15
15
|
import './_is-array-49698029.js';
|
|
16
|
-
import
|
|
16
|
+
import 'react';
|
|
17
17
|
import './index-0e45a0b2.js';
|
|
18
18
|
import 'prop-types';
|
|
19
19
|
import 'react-bootstrap/Container';
|
|
@@ -21,9 +21,9 @@ import 'react-bootstrap/Row';
|
|
|
21
21
|
import 'react-bootstrap/Col';
|
|
22
22
|
import 'react-bootstrap/Card';
|
|
23
23
|
import './moment-e2f9b20c.js';
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import './debounce-
|
|
24
|
+
import 'next/router';
|
|
25
|
+
import './isSymbol-807e927e.js';
|
|
26
|
+
import './debounce-1a993acf.js';
|
|
27
27
|
import './index.es-29c1cef5.js';
|
|
28
28
|
import 'react-dom';
|
|
29
29
|
import './visibility-sensor-0baa4eea.js';
|
|
@@ -33,24 +33,24 @@ import './main-5d1e4bd3.js';
|
|
|
33
33
|
import './entities-7cc3bf45.js';
|
|
34
34
|
import './stringify-008c8802.js';
|
|
35
35
|
import './slicedToArray-7021e5df.js';
|
|
36
|
-
import
|
|
36
|
+
import './asyncToGenerator-7c654f36.js';
|
|
37
37
|
import './_set-species-cede29f8.js';
|
|
38
38
|
export { default as Segment } from './Segment.js';
|
|
39
39
|
export { default as Beam } from './Beam.js';
|
|
40
40
|
export { default as AdSlot } from './AdSlot.js';
|
|
41
|
-
import './ADInfeed-
|
|
41
|
+
import './ADInfeed-eae71d07.js';
|
|
42
42
|
export { default as DeckContent } from './DeckContent.js';
|
|
43
43
|
import './lodash-17fdfebb.js';
|
|
44
|
-
import './ADlgInfeed-
|
|
44
|
+
import './ADlgInfeed-c619fe64.js';
|
|
45
45
|
import './getContentCategory-15dcc413.js';
|
|
46
|
-
import
|
|
46
|
+
import './get-5ee14cda.js';
|
|
47
47
|
export { default as AD } from './AD.js';
|
|
48
48
|
import './AuthorComponent-00f13201.js';
|
|
49
49
|
export { default as GridContent } from './GridContent.js';
|
|
50
50
|
export { default as DeckQueue } from './DeckQueue.js';
|
|
51
51
|
import 'react-bootstrap/Media';
|
|
52
52
|
export { default as ThumbnailCard } from './ThumbnailCard.js';
|
|
53
|
-
import
|
|
53
|
+
import './BlockContent-e9b4ddcf.js';
|
|
54
54
|
import './react-social-icons-a7d5c5c7.js';
|
|
55
55
|
export { default as TaxonomyCard } from './TaxonomyCard.js';
|
|
56
56
|
export { default as RolesDeck } from './RolesDeck.js';
|
|
@@ -79,12 +79,11 @@ import 'react-bootstrap/Form';
|
|
|
79
79
|
import './index-ef6d5dcf.js';
|
|
80
80
|
import './js.cookie-6874175c.js';
|
|
81
81
|
export { default as CMEDeck } from './CMEDeck.js';
|
|
82
|
-
|
|
83
|
-
export { g as getSerializers } from './index-42fd3adb.js';
|
|
82
|
+
export { g as getSerializers } from './index-c376cd8e.js';
|
|
84
83
|
import './util-7700fc59.js';
|
|
85
84
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
86
85
|
import 'react-bootstrap/Pagination';
|
|
87
|
-
import
|
|
86
|
+
import 'next/head';
|
|
88
87
|
export { default as ExternalResources } from './ExternalResources.js';
|
|
89
88
|
export { Column1 } from './Column1.js';
|
|
90
89
|
export { default as SideFooter } from './SideFooter.js';
|
|
@@ -171,338 +170,3 @@ export { default as getKeywords } from './getKeywords.js';
|
|
|
171
170
|
export { default as urlFor } from './urlFor.js';
|
|
172
171
|
import './style-inject.es-1f59c1d0.js';
|
|
173
172
|
export { default as PartnerDetailListing } from './PartnerDetailListing.js';
|
|
174
|
-
|
|
175
|
-
/** Built-in value references. */
|
|
176
|
-
var Uint8Array = _root.Uint8Array;
|
|
177
|
-
|
|
178
|
-
/** Used to convert symbols to primitives and strings. */
|
|
179
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
180
|
-
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
181
|
-
|
|
182
|
-
/** `Object#toString` result references. */
|
|
183
|
-
var argsTag = '[object Arguments]';
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* The base implementation of `_.isArguments`.
|
|
187
|
-
*
|
|
188
|
-
* @private
|
|
189
|
-
* @param {*} value The value to check.
|
|
190
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
191
|
-
*/
|
|
192
|
-
function baseIsArguments(value) {
|
|
193
|
-
return isObjectLike_1(value) && _baseGetTag(value) == argsTag;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
var _baseIsArguments = baseIsArguments;
|
|
197
|
-
|
|
198
|
-
/** Used for built-in method references. */
|
|
199
|
-
var objectProto = Object.prototype;
|
|
200
|
-
|
|
201
|
-
/** Used to check objects for own properties. */
|
|
202
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
203
|
-
|
|
204
|
-
/** Built-in value references. */
|
|
205
|
-
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Checks if `value` is likely an `arguments` object.
|
|
209
|
-
*
|
|
210
|
-
* @static
|
|
211
|
-
* @memberOf _
|
|
212
|
-
* @since 0.1.0
|
|
213
|
-
* @category Lang
|
|
214
|
-
* @param {*} value The value to check.
|
|
215
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
216
|
-
* else `false`.
|
|
217
|
-
* @example
|
|
218
|
-
*
|
|
219
|
-
* _.isArguments(function() { return arguments; }());
|
|
220
|
-
* // => true
|
|
221
|
-
*
|
|
222
|
-
* _.isArguments([1, 2, 3]);
|
|
223
|
-
* // => false
|
|
224
|
-
*/
|
|
225
|
-
var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
|
|
226
|
-
return isObjectLike_1(value) && hasOwnProperty.call(value, 'callee') &&
|
|
227
|
-
!propertyIsEnumerable.call(value, 'callee');
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* This method returns `false`.
|
|
232
|
-
*
|
|
233
|
-
* @static
|
|
234
|
-
* @memberOf _
|
|
235
|
-
* @since 4.13.0
|
|
236
|
-
* @category Util
|
|
237
|
-
* @returns {boolean} Returns `false`.
|
|
238
|
-
* @example
|
|
239
|
-
*
|
|
240
|
-
* _.times(2, _.stubFalse);
|
|
241
|
-
* // => [false, false]
|
|
242
|
-
*/
|
|
243
|
-
function stubFalse() {
|
|
244
|
-
return false;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
var stubFalse_1 = stubFalse;
|
|
248
|
-
|
|
249
|
-
var isBuffer_1 = createCommonjsModule(function (module, exports) {
|
|
250
|
-
/** Detect free variable `exports`. */
|
|
251
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
252
|
-
|
|
253
|
-
/** Detect free variable `module`. */
|
|
254
|
-
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
255
|
-
|
|
256
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
|
257
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
258
|
-
|
|
259
|
-
/** Built-in value references. */
|
|
260
|
-
var Buffer = moduleExports ? _root.Buffer : undefined;
|
|
261
|
-
|
|
262
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
263
|
-
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Checks if `value` is a buffer.
|
|
267
|
-
*
|
|
268
|
-
* @static
|
|
269
|
-
* @memberOf _
|
|
270
|
-
* @since 4.3.0
|
|
271
|
-
* @category Lang
|
|
272
|
-
* @param {*} value The value to check.
|
|
273
|
-
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
274
|
-
* @example
|
|
275
|
-
*
|
|
276
|
-
* _.isBuffer(new Buffer(2));
|
|
277
|
-
* // => true
|
|
278
|
-
*
|
|
279
|
-
* _.isBuffer(new Uint8Array(2));
|
|
280
|
-
* // => false
|
|
281
|
-
*/
|
|
282
|
-
var isBuffer = nativeIsBuffer || stubFalse_1;
|
|
283
|
-
|
|
284
|
-
module.exports = isBuffer;
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
var _nodeUtil = createCommonjsModule(function (module, exports) {
|
|
288
|
-
/** Detect free variable `exports`. */
|
|
289
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
290
|
-
|
|
291
|
-
/** Detect free variable `module`. */
|
|
292
|
-
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
293
|
-
|
|
294
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
|
295
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
296
|
-
|
|
297
|
-
/** Detect free variable `process` from Node.js. */
|
|
298
|
-
var freeProcess = moduleExports && _freeGlobal.process;
|
|
299
|
-
|
|
300
|
-
/** Used to access faster Node.js helpers. */
|
|
301
|
-
var nodeUtil = (function() {
|
|
302
|
-
try {
|
|
303
|
-
// Use `util.types` for Node.js 10+.
|
|
304
|
-
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
305
|
-
|
|
306
|
-
if (types) {
|
|
307
|
-
return types;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// Legacy `process.binding('util')` for Node.js < 10.
|
|
311
|
-
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
312
|
-
} catch (e) {}
|
|
313
|
-
}());
|
|
314
|
-
|
|
315
|
-
module.exports = nodeUtil;
|
|
316
|
-
});
|
|
317
|
-
|
|
318
|
-
/* Node.js helper references. */
|
|
319
|
-
var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
|
|
320
|
-
|
|
321
|
-
/* Built-in method references that are verified to be native. */
|
|
322
|
-
var DataView = _getNative(_root, 'DataView');
|
|
323
|
-
|
|
324
|
-
var _DataView = DataView;
|
|
325
|
-
|
|
326
|
-
/* Built-in method references that are verified to be native. */
|
|
327
|
-
var Promise = _getNative(_root, 'Promise');
|
|
328
|
-
|
|
329
|
-
var _Promise = Promise;
|
|
330
|
-
|
|
331
|
-
/* Built-in method references that are verified to be native. */
|
|
332
|
-
var Set = _getNative(_root, 'Set');
|
|
333
|
-
|
|
334
|
-
var _Set = Set;
|
|
335
|
-
|
|
336
|
-
/* Built-in method references that are verified to be native. */
|
|
337
|
-
var WeakMap = _getNative(_root, 'WeakMap');
|
|
338
|
-
|
|
339
|
-
var _WeakMap = WeakMap;
|
|
340
|
-
|
|
341
|
-
/** `Object#toString` result references. */
|
|
342
|
-
var mapTag = '[object Map]',
|
|
343
|
-
objectTag = '[object Object]',
|
|
344
|
-
promiseTag = '[object Promise]',
|
|
345
|
-
setTag = '[object Set]',
|
|
346
|
-
weakMapTag = '[object WeakMap]';
|
|
347
|
-
|
|
348
|
-
var dataViewTag = '[object DataView]';
|
|
349
|
-
|
|
350
|
-
/** Used to detect maps, sets, and weakmaps. */
|
|
351
|
-
var dataViewCtorString = _toSource(_DataView),
|
|
352
|
-
mapCtorString = _toSource(_Map),
|
|
353
|
-
promiseCtorString = _toSource(_Promise),
|
|
354
|
-
setCtorString = _toSource(_Set),
|
|
355
|
-
weakMapCtorString = _toSource(_WeakMap);
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Gets the `toStringTag` of `value`.
|
|
359
|
-
*
|
|
360
|
-
* @private
|
|
361
|
-
* @param {*} value The value to query.
|
|
362
|
-
* @returns {string} Returns the `toStringTag`.
|
|
363
|
-
*/
|
|
364
|
-
var getTag = _baseGetTag;
|
|
365
|
-
|
|
366
|
-
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
367
|
-
if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
368
|
-
(_Map && getTag(new _Map) != mapTag) ||
|
|
369
|
-
(_Promise && getTag(_Promise.resolve()) != promiseTag) ||
|
|
370
|
-
(_Set && getTag(new _Set) != setTag) ||
|
|
371
|
-
(_WeakMap && getTag(new _WeakMap) != weakMapTag)) {
|
|
372
|
-
getTag = function(value) {
|
|
373
|
-
var result = _baseGetTag(value),
|
|
374
|
-
Ctor = result == objectTag ? value.constructor : undefined,
|
|
375
|
-
ctorString = Ctor ? _toSource(Ctor) : '';
|
|
376
|
-
|
|
377
|
-
if (ctorString) {
|
|
378
|
-
switch (ctorString) {
|
|
379
|
-
case dataViewCtorString: return dataViewTag;
|
|
380
|
-
case mapCtorString: return mapTag;
|
|
381
|
-
case promiseCtorString: return promiseTag;
|
|
382
|
-
case setCtorString: return setTag;
|
|
383
|
-
case weakMapCtorString: return weakMapTag;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
return result;
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
var _this = undefined;
|
|
391
|
-
|
|
392
|
-
var blocksToText = function blocksToText(blocks) {
|
|
393
|
-
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
394
|
-
|
|
395
|
-
var defaults = { nonTextBehavior: 'remove' };
|
|
396
|
-
var options = _Object$assign({}, defaults, opts);
|
|
397
|
-
return blocks.map(function (block) {
|
|
398
|
-
if (block._type !== 'block' || !block.children) {
|
|
399
|
-
return options.nonTextBehavior === 'remove' ? '' : '[' + block._type + ' block]';
|
|
400
|
-
}
|
|
401
|
-
return block.children.map(function (child) {
|
|
402
|
-
return child.text;
|
|
403
|
-
}).join('');
|
|
404
|
-
}).join('\n\n');
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
var MetaHead = React__default.memo(function (props) {
|
|
408
|
-
var data = props.data;
|
|
409
|
-
|
|
410
|
-
console.log('inside memo*&********************************************************');
|
|
411
|
-
return React__default.createElement(
|
|
412
|
-
Head,
|
|
413
|
-
null,
|
|
414
|
-
React__default.createElement('meta', { name: 'description', content: blocksToText(data) })
|
|
415
|
-
);
|
|
416
|
-
}, function (prevProps, nextProps) {
|
|
417
|
-
return true;
|
|
418
|
-
// return isEqual(prevProps.data, nextProps.data)
|
|
419
|
-
});
|
|
420
|
-
|
|
421
|
-
var TaxonomyDescription = function TaxonomyDescription(_ref) {
|
|
422
|
-
var data = _ref.data,
|
|
423
|
-
client = _ref.client;
|
|
424
|
-
|
|
425
|
-
var router = useRouter();
|
|
426
|
-
|
|
427
|
-
useEffect(function () {
|
|
428
|
-
if (router && router.asPath && document.querySelector('meta[name="description"]')) {
|
|
429
|
-
console.log('updating');
|
|
430
|
-
document.querySelector('meta[name="description"]').setAttribute('content', router.asPath);
|
|
431
|
-
}
|
|
432
|
-
}, [router]);
|
|
433
|
-
|
|
434
|
-
// const prevPath = usePrevious(router && router.asPath ? router.asPath : null)
|
|
435
|
-
// const currentPath = router && router.asPath ? router.asPath : null
|
|
436
|
-
// useEffect(() => {
|
|
437
|
-
// if (router && router.asPath) {
|
|
438
|
-
// const queryParms = router.asPath.split('?')[1]
|
|
439
|
-
// if (queryParms) {
|
|
440
|
-
// const pageNumber = queryParms.split('&').reduce((acc, item) => {
|
|
441
|
-
// if (item.startsWith('page=')) {
|
|
442
|
-
// if (item.split('=')[1]) {
|
|
443
|
-
// acc = item.split('=')[1]
|
|
444
|
-
// return acc
|
|
445
|
-
// }
|
|
446
|
-
// }
|
|
447
|
-
// }, '')
|
|
448
|
-
// if (pageNumber !== '') {
|
|
449
|
-
// let metaDescription = blocksToText(data)
|
|
450
|
-
// metaDescription = `${metaDescription}| Page ${pageNumber}`
|
|
451
|
-
// console.log({ metaDescription, pageNumber })
|
|
452
|
-
// document.querySelector('meta[name="description"]').setAttribute('content', metaDescription)
|
|
453
|
-
// }
|
|
454
|
-
// }
|
|
455
|
-
// }
|
|
456
|
-
// }, [router])
|
|
457
|
-
|
|
458
|
-
return data && data.length > 0 && React__default.createElement(
|
|
459
|
-
'section',
|
|
460
|
-
{ className: 'taxonomy-description' },
|
|
461
|
-
React__default.createElement(MetaHead, { data: data }),
|
|
462
|
-
React__default.createElement(BlockContent, _extends({ serializers: getSerializers(client), blocks: data, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
|
|
463
|
-
);
|
|
464
|
-
};
|
|
465
|
-
|
|
466
|
-
TaxonomyDescription.getDescription = function () {
|
|
467
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
|
|
468
|
-
var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
469
|
-
var client = arguments[1];
|
|
470
|
-
var query, summary;
|
|
471
|
-
return regenerator.wrap(function _callee$(_context) {
|
|
472
|
-
while (1) {
|
|
473
|
-
switch (_context.prev = _context.next) {
|
|
474
|
-
case 0:
|
|
475
|
-
query = '*[_type == \'taxonomy\' && identifier == \'' + url + '\'][0].summary';
|
|
476
|
-
summary = [];
|
|
477
|
-
_context.prev = 2;
|
|
478
|
-
_context.next = 5;
|
|
479
|
-
return client.fetch(query);
|
|
480
|
-
|
|
481
|
-
case 5:
|
|
482
|
-
summary = _context.sent;
|
|
483
|
-
_context.next = 11;
|
|
484
|
-
break;
|
|
485
|
-
|
|
486
|
-
case 8:
|
|
487
|
-
_context.prev = 8;
|
|
488
|
-
_context.t0 = _context['catch'](2);
|
|
489
|
-
|
|
490
|
-
console.error(_context.t0);
|
|
491
|
-
|
|
492
|
-
case 11:
|
|
493
|
-
return _context.abrupt('return', summary);
|
|
494
|
-
|
|
495
|
-
case 12:
|
|
496
|
-
case 'end':
|
|
497
|
-
return _context.stop();
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
}, _callee, _this, [[2, 8]]);
|
|
501
|
-
}));
|
|
502
|
-
|
|
503
|
-
return function () {
|
|
504
|
-
return _ref2.apply(this, arguments);
|
|
505
|
-
};
|
|
506
|
-
}();
|
|
507
|
-
|
|
508
|
-
export { TaxonomyDescription };
|
|
@@ -200,4 +200,4 @@ function isSymbol(value) {
|
|
|
200
200
|
|
|
201
201
|
var isSymbol_1 = isSymbol;
|
|
202
202
|
|
|
203
|
-
export { _root as _,
|
|
203
|
+
export { _root as _, isObject_1 as a, _baseGetTag as b, _Symbol as c, isSymbol_1 as i };
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|