@mjhls/mjh-framework 1.0.284 → 1.0.285
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/VideoSeriesListing.js +1 -2
- package/dist/cjs/{YoutubeGroup-1ec66294.js → YoutubeGroup-98ffbc57.js} +433 -1
- package/dist/cjs/YoutubeGroup.js +1 -2
- package/dist/cjs/index.js +37 -21
- package/dist/esm/VideoSeriesListing.js +1 -2
- package/dist/esm/{YoutubeGroup-a87b8967.js → YoutubeGroup-562ed456.js} +433 -1
- package/dist/esm/YoutubeGroup.js +1 -2
- package/dist/esm/index.js +38 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,8 +18,7 @@ var Router = require('next/router');
|
|
|
18
18
|
var Router__default = _interopDefault(Router);
|
|
19
19
|
require('react-dom');
|
|
20
20
|
require('./index-fa0fb52c.js');
|
|
21
|
-
var YoutubeGroup = require('./YoutubeGroup-
|
|
22
|
-
require('smoothscroll-polyfill');
|
|
21
|
+
var YoutubeGroup = require('./YoutubeGroup-98ffbc57.js');
|
|
23
22
|
var index_esm = require('./index.esm-340d3792.js');
|
|
24
23
|
|
|
25
24
|
var VideoSeriesListing = function (_React$Component) {
|
|
@@ -7,7 +7,6 @@ var React = require('react');
|
|
|
7
7
|
var React__default = _interopDefault(React);
|
|
8
8
|
require('next/link');
|
|
9
9
|
var index$1 = require('./index-fa0fb52c.js');
|
|
10
|
-
var smoothscroll = _interopDefault(require('smoothscroll-polyfill'));
|
|
11
10
|
|
|
12
11
|
var getYoutubeId = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
13
12
|
(function (root, factory) {
|
|
@@ -58,6 +57,439 @@ var getYoutubeId = _commonjsHelpers.createCommonjsModule(function (module, expor
|
|
|
58
57
|
}));
|
|
59
58
|
});
|
|
60
59
|
|
|
60
|
+
var smoothscroll = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
61
|
+
/* smoothscroll v0.4.4 - 2019 - Dustan Kasten, Jeremias Menichelli - MIT License */
|
|
62
|
+
(function () {
|
|
63
|
+
|
|
64
|
+
// polyfill
|
|
65
|
+
function polyfill() {
|
|
66
|
+
// aliases
|
|
67
|
+
var w = window;
|
|
68
|
+
var d = document;
|
|
69
|
+
|
|
70
|
+
// return if scroll behavior is supported and polyfill is not forced
|
|
71
|
+
if (
|
|
72
|
+
'scrollBehavior' in d.documentElement.style &&
|
|
73
|
+
w.__forceSmoothScrollPolyfill__ !== true
|
|
74
|
+
) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// globals
|
|
79
|
+
var Element = w.HTMLElement || w.Element;
|
|
80
|
+
var SCROLL_TIME = 468;
|
|
81
|
+
|
|
82
|
+
// object gathering original scroll methods
|
|
83
|
+
var original = {
|
|
84
|
+
scroll: w.scroll || w.scrollTo,
|
|
85
|
+
scrollBy: w.scrollBy,
|
|
86
|
+
elementScroll: Element.prototype.scroll || scrollElement,
|
|
87
|
+
scrollIntoView: Element.prototype.scrollIntoView
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// define timing method
|
|
91
|
+
var now =
|
|
92
|
+
w.performance && w.performance.now
|
|
93
|
+
? w.performance.now.bind(w.performance)
|
|
94
|
+
: Date.now;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* indicates if a the current browser is made by Microsoft
|
|
98
|
+
* @method isMicrosoftBrowser
|
|
99
|
+
* @param {String} userAgent
|
|
100
|
+
* @returns {Boolean}
|
|
101
|
+
*/
|
|
102
|
+
function isMicrosoftBrowser(userAgent) {
|
|
103
|
+
var userAgentPatterns = ['MSIE ', 'Trident/', 'Edge/'];
|
|
104
|
+
|
|
105
|
+
return new RegExp(userAgentPatterns.join('|')).test(userAgent);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/*
|
|
109
|
+
* IE has rounding bug rounding down clientHeight and clientWidth and
|
|
110
|
+
* rounding up scrollHeight and scrollWidth causing false positives
|
|
111
|
+
* on hasScrollableSpace
|
|
112
|
+
*/
|
|
113
|
+
var ROUNDING_TOLERANCE = isMicrosoftBrowser(w.navigator.userAgent) ? 1 : 0;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* changes scroll position inside an element
|
|
117
|
+
* @method scrollElement
|
|
118
|
+
* @param {Number} x
|
|
119
|
+
* @param {Number} y
|
|
120
|
+
* @returns {undefined}
|
|
121
|
+
*/
|
|
122
|
+
function scrollElement(x, y) {
|
|
123
|
+
this.scrollLeft = x;
|
|
124
|
+
this.scrollTop = y;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* returns result of applying ease math function to a number
|
|
129
|
+
* @method ease
|
|
130
|
+
* @param {Number} k
|
|
131
|
+
* @returns {Number}
|
|
132
|
+
*/
|
|
133
|
+
function ease(k) {
|
|
134
|
+
return 0.5 * (1 - Math.cos(Math.PI * k));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* indicates if a smooth behavior should be applied
|
|
139
|
+
* @method shouldBailOut
|
|
140
|
+
* @param {Number|Object} firstArg
|
|
141
|
+
* @returns {Boolean}
|
|
142
|
+
*/
|
|
143
|
+
function shouldBailOut(firstArg) {
|
|
144
|
+
if (
|
|
145
|
+
firstArg === null ||
|
|
146
|
+
typeof firstArg !== 'object' ||
|
|
147
|
+
firstArg.behavior === undefined ||
|
|
148
|
+
firstArg.behavior === 'auto' ||
|
|
149
|
+
firstArg.behavior === 'instant'
|
|
150
|
+
) {
|
|
151
|
+
// first argument is not an object/null
|
|
152
|
+
// or behavior is auto, instant or undefined
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (typeof firstArg === 'object' && firstArg.behavior === 'smooth') {
|
|
157
|
+
// first argument is an object and behavior is smooth
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// throw error when behavior is not supported
|
|
162
|
+
throw new TypeError(
|
|
163
|
+
'behavior member of ScrollOptions ' +
|
|
164
|
+
firstArg.behavior +
|
|
165
|
+
' is not a valid value for enumeration ScrollBehavior.'
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* indicates if an element has scrollable space in the provided axis
|
|
171
|
+
* @method hasScrollableSpace
|
|
172
|
+
* @param {Node} el
|
|
173
|
+
* @param {String} axis
|
|
174
|
+
* @returns {Boolean}
|
|
175
|
+
*/
|
|
176
|
+
function hasScrollableSpace(el, axis) {
|
|
177
|
+
if (axis === 'Y') {
|
|
178
|
+
return el.clientHeight + ROUNDING_TOLERANCE < el.scrollHeight;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (axis === 'X') {
|
|
182
|
+
return el.clientWidth + ROUNDING_TOLERANCE < el.scrollWidth;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* indicates if an element has a scrollable overflow property in the axis
|
|
188
|
+
* @method canOverflow
|
|
189
|
+
* @param {Node} el
|
|
190
|
+
* @param {String} axis
|
|
191
|
+
* @returns {Boolean}
|
|
192
|
+
*/
|
|
193
|
+
function canOverflow(el, axis) {
|
|
194
|
+
var overflowValue = w.getComputedStyle(el, null)['overflow' + axis];
|
|
195
|
+
|
|
196
|
+
return overflowValue === 'auto' || overflowValue === 'scroll';
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* indicates if an element can be scrolled in either axis
|
|
201
|
+
* @method isScrollable
|
|
202
|
+
* @param {Node} el
|
|
203
|
+
* @param {String} axis
|
|
204
|
+
* @returns {Boolean}
|
|
205
|
+
*/
|
|
206
|
+
function isScrollable(el) {
|
|
207
|
+
var isScrollableY = hasScrollableSpace(el, 'Y') && canOverflow(el, 'Y');
|
|
208
|
+
var isScrollableX = hasScrollableSpace(el, 'X') && canOverflow(el, 'X');
|
|
209
|
+
|
|
210
|
+
return isScrollableY || isScrollableX;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* finds scrollable parent of an element
|
|
215
|
+
* @method findScrollableParent
|
|
216
|
+
* @param {Node} el
|
|
217
|
+
* @returns {Node} el
|
|
218
|
+
*/
|
|
219
|
+
function findScrollableParent(el) {
|
|
220
|
+
while (el !== d.body && isScrollable(el) === false) {
|
|
221
|
+
el = el.parentNode || el.host;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
return el;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* self invoked function that, given a context, steps through scrolling
|
|
229
|
+
* @method step
|
|
230
|
+
* @param {Object} context
|
|
231
|
+
* @returns {undefined}
|
|
232
|
+
*/
|
|
233
|
+
function step(context) {
|
|
234
|
+
var time = now();
|
|
235
|
+
var value;
|
|
236
|
+
var currentX;
|
|
237
|
+
var currentY;
|
|
238
|
+
var elapsed = (time - context.startTime) / SCROLL_TIME;
|
|
239
|
+
|
|
240
|
+
// avoid elapsed times higher than one
|
|
241
|
+
elapsed = elapsed > 1 ? 1 : elapsed;
|
|
242
|
+
|
|
243
|
+
// apply easing to elapsed time
|
|
244
|
+
value = ease(elapsed);
|
|
245
|
+
|
|
246
|
+
currentX = context.startX + (context.x - context.startX) * value;
|
|
247
|
+
currentY = context.startY + (context.y - context.startY) * value;
|
|
248
|
+
|
|
249
|
+
context.method.call(context.scrollable, currentX, currentY);
|
|
250
|
+
|
|
251
|
+
// scroll more if we have not reached our destination
|
|
252
|
+
if (currentX !== context.x || currentY !== context.y) {
|
|
253
|
+
w.requestAnimationFrame(step.bind(w, context));
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* scrolls window or element with a smooth behavior
|
|
259
|
+
* @method smoothScroll
|
|
260
|
+
* @param {Object|Node} el
|
|
261
|
+
* @param {Number} x
|
|
262
|
+
* @param {Number} y
|
|
263
|
+
* @returns {undefined}
|
|
264
|
+
*/
|
|
265
|
+
function smoothScroll(el, x, y) {
|
|
266
|
+
var scrollable;
|
|
267
|
+
var startX;
|
|
268
|
+
var startY;
|
|
269
|
+
var method;
|
|
270
|
+
var startTime = now();
|
|
271
|
+
|
|
272
|
+
// define scroll context
|
|
273
|
+
if (el === d.body) {
|
|
274
|
+
scrollable = w;
|
|
275
|
+
startX = w.scrollX || w.pageXOffset;
|
|
276
|
+
startY = w.scrollY || w.pageYOffset;
|
|
277
|
+
method = original.scroll;
|
|
278
|
+
} else {
|
|
279
|
+
scrollable = el;
|
|
280
|
+
startX = el.scrollLeft;
|
|
281
|
+
startY = el.scrollTop;
|
|
282
|
+
method = scrollElement;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// scroll looping over a frame
|
|
286
|
+
step({
|
|
287
|
+
scrollable: scrollable,
|
|
288
|
+
method: method,
|
|
289
|
+
startTime: startTime,
|
|
290
|
+
startX: startX,
|
|
291
|
+
startY: startY,
|
|
292
|
+
x: x,
|
|
293
|
+
y: y
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// ORIGINAL METHODS OVERRIDES
|
|
298
|
+
// w.scroll and w.scrollTo
|
|
299
|
+
w.scroll = w.scrollTo = function() {
|
|
300
|
+
// avoid action when no arguments are passed
|
|
301
|
+
if (arguments[0] === undefined) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// avoid smooth behavior if not required
|
|
306
|
+
if (shouldBailOut(arguments[0]) === true) {
|
|
307
|
+
original.scroll.call(
|
|
308
|
+
w,
|
|
309
|
+
arguments[0].left !== undefined
|
|
310
|
+
? arguments[0].left
|
|
311
|
+
: typeof arguments[0] !== 'object'
|
|
312
|
+
? arguments[0]
|
|
313
|
+
: w.scrollX || w.pageXOffset,
|
|
314
|
+
// use top prop, second argument if present or fallback to scrollY
|
|
315
|
+
arguments[0].top !== undefined
|
|
316
|
+
? arguments[0].top
|
|
317
|
+
: arguments[1] !== undefined
|
|
318
|
+
? arguments[1]
|
|
319
|
+
: w.scrollY || w.pageYOffset
|
|
320
|
+
);
|
|
321
|
+
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// LET THE SMOOTHNESS BEGIN!
|
|
326
|
+
smoothScroll.call(
|
|
327
|
+
w,
|
|
328
|
+
d.body,
|
|
329
|
+
arguments[0].left !== undefined
|
|
330
|
+
? ~~arguments[0].left
|
|
331
|
+
: w.scrollX || w.pageXOffset,
|
|
332
|
+
arguments[0].top !== undefined
|
|
333
|
+
? ~~arguments[0].top
|
|
334
|
+
: w.scrollY || w.pageYOffset
|
|
335
|
+
);
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
// w.scrollBy
|
|
339
|
+
w.scrollBy = function() {
|
|
340
|
+
// avoid action when no arguments are passed
|
|
341
|
+
if (arguments[0] === undefined) {
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// avoid smooth behavior if not required
|
|
346
|
+
if (shouldBailOut(arguments[0])) {
|
|
347
|
+
original.scrollBy.call(
|
|
348
|
+
w,
|
|
349
|
+
arguments[0].left !== undefined
|
|
350
|
+
? arguments[0].left
|
|
351
|
+
: typeof arguments[0] !== 'object' ? arguments[0] : 0,
|
|
352
|
+
arguments[0].top !== undefined
|
|
353
|
+
? arguments[0].top
|
|
354
|
+
: arguments[1] !== undefined ? arguments[1] : 0
|
|
355
|
+
);
|
|
356
|
+
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// LET THE SMOOTHNESS BEGIN!
|
|
361
|
+
smoothScroll.call(
|
|
362
|
+
w,
|
|
363
|
+
d.body,
|
|
364
|
+
~~arguments[0].left + (w.scrollX || w.pageXOffset),
|
|
365
|
+
~~arguments[0].top + (w.scrollY || w.pageYOffset)
|
|
366
|
+
);
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
// Element.prototype.scroll and Element.prototype.scrollTo
|
|
370
|
+
Element.prototype.scroll = Element.prototype.scrollTo = function() {
|
|
371
|
+
// avoid action when no arguments are passed
|
|
372
|
+
if (arguments[0] === undefined) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// avoid smooth behavior if not required
|
|
377
|
+
if (shouldBailOut(arguments[0]) === true) {
|
|
378
|
+
// if one number is passed, throw error to match Firefox implementation
|
|
379
|
+
if (typeof arguments[0] === 'number' && arguments[1] === undefined) {
|
|
380
|
+
throw new SyntaxError('Value could not be converted');
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
original.elementScroll.call(
|
|
384
|
+
this,
|
|
385
|
+
// use left prop, first number argument or fallback to scrollLeft
|
|
386
|
+
arguments[0].left !== undefined
|
|
387
|
+
? ~~arguments[0].left
|
|
388
|
+
: typeof arguments[0] !== 'object' ? ~~arguments[0] : this.scrollLeft,
|
|
389
|
+
// use top prop, second argument or fallback to scrollTop
|
|
390
|
+
arguments[0].top !== undefined
|
|
391
|
+
? ~~arguments[0].top
|
|
392
|
+
: arguments[1] !== undefined ? ~~arguments[1] : this.scrollTop
|
|
393
|
+
);
|
|
394
|
+
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
var left = arguments[0].left;
|
|
399
|
+
var top = arguments[0].top;
|
|
400
|
+
|
|
401
|
+
// LET THE SMOOTHNESS BEGIN!
|
|
402
|
+
smoothScroll.call(
|
|
403
|
+
this,
|
|
404
|
+
this,
|
|
405
|
+
typeof left === 'undefined' ? this.scrollLeft : ~~left,
|
|
406
|
+
typeof top === 'undefined' ? this.scrollTop : ~~top
|
|
407
|
+
);
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
// Element.prototype.scrollBy
|
|
411
|
+
Element.prototype.scrollBy = function() {
|
|
412
|
+
// avoid action when no arguments are passed
|
|
413
|
+
if (arguments[0] === undefined) {
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
// avoid smooth behavior if not required
|
|
418
|
+
if (shouldBailOut(arguments[0]) === true) {
|
|
419
|
+
original.elementScroll.call(
|
|
420
|
+
this,
|
|
421
|
+
arguments[0].left !== undefined
|
|
422
|
+
? ~~arguments[0].left + this.scrollLeft
|
|
423
|
+
: ~~arguments[0] + this.scrollLeft,
|
|
424
|
+
arguments[0].top !== undefined
|
|
425
|
+
? ~~arguments[0].top + this.scrollTop
|
|
426
|
+
: ~~arguments[1] + this.scrollTop
|
|
427
|
+
);
|
|
428
|
+
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
this.scroll({
|
|
433
|
+
left: ~~arguments[0].left + this.scrollLeft,
|
|
434
|
+
top: ~~arguments[0].top + this.scrollTop,
|
|
435
|
+
behavior: arguments[0].behavior
|
|
436
|
+
});
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
// Element.prototype.scrollIntoView
|
|
440
|
+
Element.prototype.scrollIntoView = function() {
|
|
441
|
+
// avoid smooth behavior if not required
|
|
442
|
+
if (shouldBailOut(arguments[0]) === true) {
|
|
443
|
+
original.scrollIntoView.call(
|
|
444
|
+
this,
|
|
445
|
+
arguments[0] === undefined ? true : arguments[0]
|
|
446
|
+
);
|
|
447
|
+
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// LET THE SMOOTHNESS BEGIN!
|
|
452
|
+
var scrollableParent = findScrollableParent(this);
|
|
453
|
+
var parentRects = scrollableParent.getBoundingClientRect();
|
|
454
|
+
var clientRects = this.getBoundingClientRect();
|
|
455
|
+
|
|
456
|
+
if (scrollableParent !== d.body) {
|
|
457
|
+
// reveal element inside parent
|
|
458
|
+
smoothScroll.call(
|
|
459
|
+
this,
|
|
460
|
+
scrollableParent,
|
|
461
|
+
scrollableParent.scrollLeft + clientRects.left - parentRects.left,
|
|
462
|
+
scrollableParent.scrollTop + clientRects.top - parentRects.top
|
|
463
|
+
);
|
|
464
|
+
|
|
465
|
+
// reveal parent in viewport unless is fixed
|
|
466
|
+
if (w.getComputedStyle(scrollableParent).position !== 'fixed') {
|
|
467
|
+
w.scrollBy({
|
|
468
|
+
left: parentRects.left,
|
|
469
|
+
top: parentRects.top,
|
|
470
|
+
behavior: 'smooth'
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
} else {
|
|
474
|
+
// reveal element in viewport
|
|
475
|
+
w.scrollBy({
|
|
476
|
+
left: clientRects.left,
|
|
477
|
+
top: clientRects.top,
|
|
478
|
+
behavior: 'smooth'
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
{
|
|
485
|
+
// commonjs
|
|
486
|
+
module.exports = { polyfill: polyfill };
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
}());
|
|
490
|
+
});
|
|
491
|
+
var smoothscroll_1 = smoothscroll.polyfill;
|
|
492
|
+
|
|
61
493
|
// kick off the polyfill!
|
|
62
494
|
|
|
63
495
|
/*
|
package/dist/cjs/YoutubeGroup.js
CHANGED
|
@@ -6,8 +6,7 @@ require('prop-types');
|
|
|
6
6
|
require('next/link');
|
|
7
7
|
require('react-dom');
|
|
8
8
|
require('./index-fa0fb52c.js');
|
|
9
|
-
var YoutubeGroup = require('./YoutubeGroup-
|
|
10
|
-
require('smoothscroll-polyfill');
|
|
9
|
+
var YoutubeGroup = require('./YoutubeGroup-98ffbc57.js');
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -40,8 +40,7 @@ require('react-bootstrap/Media');
|
|
|
40
40
|
var ThumbnailCard = require('./ThumbnailCard.js');
|
|
41
41
|
var TaxonomyCard = require('./TaxonomyCard-cf5bbc07.js');
|
|
42
42
|
var GroupDeck = require('./GroupDeck.js');
|
|
43
|
-
var YoutubeGroup = require('./YoutubeGroup-
|
|
44
|
-
require('smoothscroll-polyfill');
|
|
43
|
+
var YoutubeGroup = require('./YoutubeGroup-98ffbc57.js');
|
|
45
44
|
var reactBootstrap = require('react-bootstrap');
|
|
46
45
|
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
47
46
|
var index_esm = require('./index.esm-340d3792.js');
|
|
@@ -14114,46 +14113,63 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
14114
14113
|
};
|
|
14115
14114
|
|
|
14116
14115
|
/*
|
|
14117
|
-
This dropdown is used inside Article body to display related content placement pages
|
|
14118
|
-
|
|
14116
|
+
This dropdown is used inside Article body to display related content placement and document group pages
|
|
14117
|
+
sample usage: <ArticleDetailDropdown article={props.article} exclude={['News']} style={{ backgroundColor: 'var(--primary)', border: 0 }} />
|
|
14119
14118
|
|
|
14120
|
-
|
|
14119
|
+
- accepts any normal html arrtibute (style, id, class)
|
|
14121
14120
|
|
|
14122
|
-
'
|
|
14121
|
+
- in article query, need to add '...' to content_placement to retreive additional info needed, and document_group to retrieve group data if available
|
|
14122
|
+
|
|
14123
|
+
'content_placement': taxonomyMapping[]-> {
|
|
14123
14124
|
...,
|
|
14124
14125
|
'ancestor': parent->parent->identifier,
|
|
14125
14126
|
'parent': parent->identifier,
|
|
14126
14127
|
'path': identifier
|
|
14127
|
-
|
|
14128
|
-
|
|
14128
|
+
},
|
|
14129
|
+
'document_group': documentGroup-> {
|
|
14130
|
+
name,
|
|
14131
|
+
'parent': parent->identifier,
|
|
14132
|
+
'path': identifier.current
|
|
14133
|
+
}
|
|
14129
14134
|
*/
|
|
14130
14135
|
|
|
14131
14136
|
var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
|
|
14132
|
-
var
|
|
14133
|
-
contentPlacement = _props$contentPlaceme === undefined ? false : _props$contentPlaceme,
|
|
14137
|
+
var article = props.article,
|
|
14134
14138
|
_props$exclude = props.exclude,
|
|
14135
|
-
exclude = _props$exclude === undefined ? [
|
|
14136
|
-
|
|
14137
|
-
if (contentPlacement.length == 1 && exclude.includes(contentPlacement[0].name) || contentPlacement == false) {
|
|
14138
|
-
return null;
|
|
14139
|
-
}
|
|
14139
|
+
exclude = _props$exclude === undefined ? [] : _props$exclude;
|
|
14140
14140
|
|
|
14141
|
+
var _props = _extends$2._extends({}, props);
|
|
14142
|
+
delete _props.article;
|
|
14143
|
+
delete _props.exclude;
|
|
14141
14144
|
return React__default.createElement(
|
|
14142
14145
|
Dropdown,
|
|
14143
|
-
|
|
14146
|
+
null,
|
|
14144
14147
|
React__default.createElement(
|
|
14145
14148
|
Dropdown.Toggle,
|
|
14146
|
-
|
|
14149
|
+
_props,
|
|
14147
14150
|
'Related Topics'
|
|
14148
14151
|
),
|
|
14149
14152
|
React__default.createElement(
|
|
14150
14153
|
Dropdown.Menu,
|
|
14151
14154
|
null,
|
|
14152
|
-
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
+
article.document_group && React__default.createElement(
|
|
14156
|
+
Dropdown.Item,
|
|
14157
|
+
{ href: '/' + article.document_group.parent.current + '/' + article.document_group.path },
|
|
14158
|
+
article.document_group.name
|
|
14159
|
+
),
|
|
14160
|
+
article.content_placement && article.content_placement.length > 0 && article.content_placement.map(function (cp, i) {
|
|
14161
|
+
if (exclude.includes(cp.name)) return;
|
|
14162
|
+
var href = '';
|
|
14163
|
+
if (cp.ancestor) {
|
|
14164
|
+
href = '/' + cp.ancestor + '/' + cp.identifier;
|
|
14165
|
+
} else if (cp.parent) {
|
|
14166
|
+
href = '/' + cp.parent + '/' + cp.identifier;
|
|
14167
|
+
} else {
|
|
14168
|
+
href = '/' + cp.identifier;
|
|
14169
|
+
}
|
|
14170
|
+
return React__default.createElement(
|
|
14155
14171
|
Dropdown.Item,
|
|
14156
|
-
{ key:
|
|
14172
|
+
{ key: i, href: href },
|
|
14157
14173
|
cp.name
|
|
14158
14174
|
);
|
|
14159
14175
|
})
|
|
@@ -12,8 +12,7 @@ import 'next/link';
|
|
|
12
12
|
import { withRouter } from 'next/router';
|
|
13
13
|
import 'react-dom';
|
|
14
14
|
import './index-5f9f807a.js';
|
|
15
|
-
import { Y as YoutubeGroup } from './YoutubeGroup-
|
|
16
|
-
import 'smoothscroll-polyfill';
|
|
15
|
+
import { Y as YoutubeGroup } from './YoutubeGroup-562ed456.js';
|
|
17
16
|
import { a as IoIosArrowForward } from './index.esm-536609db.js';
|
|
18
17
|
|
|
19
18
|
var VideoSeriesListing = function (_React$Component) {
|
|
@@ -2,7 +2,6 @@ import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpe
|
|
|
2
2
|
import React__default, { useEffect } from 'react';
|
|
3
3
|
import 'next/link';
|
|
4
4
|
import { L as LazyLoad } from './index-5f9f807a.js';
|
|
5
|
-
import smoothscroll from 'smoothscroll-polyfill';
|
|
6
5
|
|
|
7
6
|
var getYoutubeId = createCommonjsModule(function (module, exports) {
|
|
8
7
|
(function (root, factory) {
|
|
@@ -53,6 +52,439 @@ var getYoutubeId = createCommonjsModule(function (module, exports) {
|
|
|
53
52
|
}));
|
|
54
53
|
});
|
|
55
54
|
|
|
55
|
+
var smoothscroll = createCommonjsModule(function (module, exports) {
|
|
56
|
+
/* smoothscroll v0.4.4 - 2019 - Dustan Kasten, Jeremias Menichelli - MIT License */
|
|
57
|
+
(function () {
|
|
58
|
+
|
|
59
|
+
// polyfill
|
|
60
|
+
function polyfill() {
|
|
61
|
+
// aliases
|
|
62
|
+
var w = window;
|
|
63
|
+
var d = document;
|
|
64
|
+
|
|
65
|
+
// return if scroll behavior is supported and polyfill is not forced
|
|
66
|
+
if (
|
|
67
|
+
'scrollBehavior' in d.documentElement.style &&
|
|
68
|
+
w.__forceSmoothScrollPolyfill__ !== true
|
|
69
|
+
) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// globals
|
|
74
|
+
var Element = w.HTMLElement || w.Element;
|
|
75
|
+
var SCROLL_TIME = 468;
|
|
76
|
+
|
|
77
|
+
// object gathering original scroll methods
|
|
78
|
+
var original = {
|
|
79
|
+
scroll: w.scroll || w.scrollTo,
|
|
80
|
+
scrollBy: w.scrollBy,
|
|
81
|
+
elementScroll: Element.prototype.scroll || scrollElement,
|
|
82
|
+
scrollIntoView: Element.prototype.scrollIntoView
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// define timing method
|
|
86
|
+
var now =
|
|
87
|
+
w.performance && w.performance.now
|
|
88
|
+
? w.performance.now.bind(w.performance)
|
|
89
|
+
: Date.now;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* indicates if a the current browser is made by Microsoft
|
|
93
|
+
* @method isMicrosoftBrowser
|
|
94
|
+
* @param {String} userAgent
|
|
95
|
+
* @returns {Boolean}
|
|
96
|
+
*/
|
|
97
|
+
function isMicrosoftBrowser(userAgent) {
|
|
98
|
+
var userAgentPatterns = ['MSIE ', 'Trident/', 'Edge/'];
|
|
99
|
+
|
|
100
|
+
return new RegExp(userAgentPatterns.join('|')).test(userAgent);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/*
|
|
104
|
+
* IE has rounding bug rounding down clientHeight and clientWidth and
|
|
105
|
+
* rounding up scrollHeight and scrollWidth causing false positives
|
|
106
|
+
* on hasScrollableSpace
|
|
107
|
+
*/
|
|
108
|
+
var ROUNDING_TOLERANCE = isMicrosoftBrowser(w.navigator.userAgent) ? 1 : 0;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* changes scroll position inside an element
|
|
112
|
+
* @method scrollElement
|
|
113
|
+
* @param {Number} x
|
|
114
|
+
* @param {Number} y
|
|
115
|
+
* @returns {undefined}
|
|
116
|
+
*/
|
|
117
|
+
function scrollElement(x, y) {
|
|
118
|
+
this.scrollLeft = x;
|
|
119
|
+
this.scrollTop = y;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* returns result of applying ease math function to a number
|
|
124
|
+
* @method ease
|
|
125
|
+
* @param {Number} k
|
|
126
|
+
* @returns {Number}
|
|
127
|
+
*/
|
|
128
|
+
function ease(k) {
|
|
129
|
+
return 0.5 * (1 - Math.cos(Math.PI * k));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* indicates if a smooth behavior should be applied
|
|
134
|
+
* @method shouldBailOut
|
|
135
|
+
* @param {Number|Object} firstArg
|
|
136
|
+
* @returns {Boolean}
|
|
137
|
+
*/
|
|
138
|
+
function shouldBailOut(firstArg) {
|
|
139
|
+
if (
|
|
140
|
+
firstArg === null ||
|
|
141
|
+
typeof firstArg !== 'object' ||
|
|
142
|
+
firstArg.behavior === undefined ||
|
|
143
|
+
firstArg.behavior === 'auto' ||
|
|
144
|
+
firstArg.behavior === 'instant'
|
|
145
|
+
) {
|
|
146
|
+
// first argument is not an object/null
|
|
147
|
+
// or behavior is auto, instant or undefined
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (typeof firstArg === 'object' && firstArg.behavior === 'smooth') {
|
|
152
|
+
// first argument is an object and behavior is smooth
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// throw error when behavior is not supported
|
|
157
|
+
throw new TypeError(
|
|
158
|
+
'behavior member of ScrollOptions ' +
|
|
159
|
+
firstArg.behavior +
|
|
160
|
+
' is not a valid value for enumeration ScrollBehavior.'
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* indicates if an element has scrollable space in the provided axis
|
|
166
|
+
* @method hasScrollableSpace
|
|
167
|
+
* @param {Node} el
|
|
168
|
+
* @param {String} axis
|
|
169
|
+
* @returns {Boolean}
|
|
170
|
+
*/
|
|
171
|
+
function hasScrollableSpace(el, axis) {
|
|
172
|
+
if (axis === 'Y') {
|
|
173
|
+
return el.clientHeight + ROUNDING_TOLERANCE < el.scrollHeight;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (axis === 'X') {
|
|
177
|
+
return el.clientWidth + ROUNDING_TOLERANCE < el.scrollWidth;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* indicates if an element has a scrollable overflow property in the axis
|
|
183
|
+
* @method canOverflow
|
|
184
|
+
* @param {Node} el
|
|
185
|
+
* @param {String} axis
|
|
186
|
+
* @returns {Boolean}
|
|
187
|
+
*/
|
|
188
|
+
function canOverflow(el, axis) {
|
|
189
|
+
var overflowValue = w.getComputedStyle(el, null)['overflow' + axis];
|
|
190
|
+
|
|
191
|
+
return overflowValue === 'auto' || overflowValue === 'scroll';
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* indicates if an element can be scrolled in either axis
|
|
196
|
+
* @method isScrollable
|
|
197
|
+
* @param {Node} el
|
|
198
|
+
* @param {String} axis
|
|
199
|
+
* @returns {Boolean}
|
|
200
|
+
*/
|
|
201
|
+
function isScrollable(el) {
|
|
202
|
+
var isScrollableY = hasScrollableSpace(el, 'Y') && canOverflow(el, 'Y');
|
|
203
|
+
var isScrollableX = hasScrollableSpace(el, 'X') && canOverflow(el, 'X');
|
|
204
|
+
|
|
205
|
+
return isScrollableY || isScrollableX;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* finds scrollable parent of an element
|
|
210
|
+
* @method findScrollableParent
|
|
211
|
+
* @param {Node} el
|
|
212
|
+
* @returns {Node} el
|
|
213
|
+
*/
|
|
214
|
+
function findScrollableParent(el) {
|
|
215
|
+
while (el !== d.body && isScrollable(el) === false) {
|
|
216
|
+
el = el.parentNode || el.host;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return el;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* self invoked function that, given a context, steps through scrolling
|
|
224
|
+
* @method step
|
|
225
|
+
* @param {Object} context
|
|
226
|
+
* @returns {undefined}
|
|
227
|
+
*/
|
|
228
|
+
function step(context) {
|
|
229
|
+
var time = now();
|
|
230
|
+
var value;
|
|
231
|
+
var currentX;
|
|
232
|
+
var currentY;
|
|
233
|
+
var elapsed = (time - context.startTime) / SCROLL_TIME;
|
|
234
|
+
|
|
235
|
+
// avoid elapsed times higher than one
|
|
236
|
+
elapsed = elapsed > 1 ? 1 : elapsed;
|
|
237
|
+
|
|
238
|
+
// apply easing to elapsed time
|
|
239
|
+
value = ease(elapsed);
|
|
240
|
+
|
|
241
|
+
currentX = context.startX + (context.x - context.startX) * value;
|
|
242
|
+
currentY = context.startY + (context.y - context.startY) * value;
|
|
243
|
+
|
|
244
|
+
context.method.call(context.scrollable, currentX, currentY);
|
|
245
|
+
|
|
246
|
+
// scroll more if we have not reached our destination
|
|
247
|
+
if (currentX !== context.x || currentY !== context.y) {
|
|
248
|
+
w.requestAnimationFrame(step.bind(w, context));
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* scrolls window or element with a smooth behavior
|
|
254
|
+
* @method smoothScroll
|
|
255
|
+
* @param {Object|Node} el
|
|
256
|
+
* @param {Number} x
|
|
257
|
+
* @param {Number} y
|
|
258
|
+
* @returns {undefined}
|
|
259
|
+
*/
|
|
260
|
+
function smoothScroll(el, x, y) {
|
|
261
|
+
var scrollable;
|
|
262
|
+
var startX;
|
|
263
|
+
var startY;
|
|
264
|
+
var method;
|
|
265
|
+
var startTime = now();
|
|
266
|
+
|
|
267
|
+
// define scroll context
|
|
268
|
+
if (el === d.body) {
|
|
269
|
+
scrollable = w;
|
|
270
|
+
startX = w.scrollX || w.pageXOffset;
|
|
271
|
+
startY = w.scrollY || w.pageYOffset;
|
|
272
|
+
method = original.scroll;
|
|
273
|
+
} else {
|
|
274
|
+
scrollable = el;
|
|
275
|
+
startX = el.scrollLeft;
|
|
276
|
+
startY = el.scrollTop;
|
|
277
|
+
method = scrollElement;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// scroll looping over a frame
|
|
281
|
+
step({
|
|
282
|
+
scrollable: scrollable,
|
|
283
|
+
method: method,
|
|
284
|
+
startTime: startTime,
|
|
285
|
+
startX: startX,
|
|
286
|
+
startY: startY,
|
|
287
|
+
x: x,
|
|
288
|
+
y: y
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// ORIGINAL METHODS OVERRIDES
|
|
293
|
+
// w.scroll and w.scrollTo
|
|
294
|
+
w.scroll = w.scrollTo = function() {
|
|
295
|
+
// avoid action when no arguments are passed
|
|
296
|
+
if (arguments[0] === undefined) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// avoid smooth behavior if not required
|
|
301
|
+
if (shouldBailOut(arguments[0]) === true) {
|
|
302
|
+
original.scroll.call(
|
|
303
|
+
w,
|
|
304
|
+
arguments[0].left !== undefined
|
|
305
|
+
? arguments[0].left
|
|
306
|
+
: typeof arguments[0] !== 'object'
|
|
307
|
+
? arguments[0]
|
|
308
|
+
: w.scrollX || w.pageXOffset,
|
|
309
|
+
// use top prop, second argument if present or fallback to scrollY
|
|
310
|
+
arguments[0].top !== undefined
|
|
311
|
+
? arguments[0].top
|
|
312
|
+
: arguments[1] !== undefined
|
|
313
|
+
? arguments[1]
|
|
314
|
+
: w.scrollY || w.pageYOffset
|
|
315
|
+
);
|
|
316
|
+
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// LET THE SMOOTHNESS BEGIN!
|
|
321
|
+
smoothScroll.call(
|
|
322
|
+
w,
|
|
323
|
+
d.body,
|
|
324
|
+
arguments[0].left !== undefined
|
|
325
|
+
? ~~arguments[0].left
|
|
326
|
+
: w.scrollX || w.pageXOffset,
|
|
327
|
+
arguments[0].top !== undefined
|
|
328
|
+
? ~~arguments[0].top
|
|
329
|
+
: w.scrollY || w.pageYOffset
|
|
330
|
+
);
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
// w.scrollBy
|
|
334
|
+
w.scrollBy = function() {
|
|
335
|
+
// avoid action when no arguments are passed
|
|
336
|
+
if (arguments[0] === undefined) {
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// avoid smooth behavior if not required
|
|
341
|
+
if (shouldBailOut(arguments[0])) {
|
|
342
|
+
original.scrollBy.call(
|
|
343
|
+
w,
|
|
344
|
+
arguments[0].left !== undefined
|
|
345
|
+
? arguments[0].left
|
|
346
|
+
: typeof arguments[0] !== 'object' ? arguments[0] : 0,
|
|
347
|
+
arguments[0].top !== undefined
|
|
348
|
+
? arguments[0].top
|
|
349
|
+
: arguments[1] !== undefined ? arguments[1] : 0
|
|
350
|
+
);
|
|
351
|
+
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// LET THE SMOOTHNESS BEGIN!
|
|
356
|
+
smoothScroll.call(
|
|
357
|
+
w,
|
|
358
|
+
d.body,
|
|
359
|
+
~~arguments[0].left + (w.scrollX || w.pageXOffset),
|
|
360
|
+
~~arguments[0].top + (w.scrollY || w.pageYOffset)
|
|
361
|
+
);
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
// Element.prototype.scroll and Element.prototype.scrollTo
|
|
365
|
+
Element.prototype.scroll = Element.prototype.scrollTo = function() {
|
|
366
|
+
// avoid action when no arguments are passed
|
|
367
|
+
if (arguments[0] === undefined) {
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// avoid smooth behavior if not required
|
|
372
|
+
if (shouldBailOut(arguments[0]) === true) {
|
|
373
|
+
// if one number is passed, throw error to match Firefox implementation
|
|
374
|
+
if (typeof arguments[0] === 'number' && arguments[1] === undefined) {
|
|
375
|
+
throw new SyntaxError('Value could not be converted');
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
original.elementScroll.call(
|
|
379
|
+
this,
|
|
380
|
+
// use left prop, first number argument or fallback to scrollLeft
|
|
381
|
+
arguments[0].left !== undefined
|
|
382
|
+
? ~~arguments[0].left
|
|
383
|
+
: typeof arguments[0] !== 'object' ? ~~arguments[0] : this.scrollLeft,
|
|
384
|
+
// use top prop, second argument or fallback to scrollTop
|
|
385
|
+
arguments[0].top !== undefined
|
|
386
|
+
? ~~arguments[0].top
|
|
387
|
+
: arguments[1] !== undefined ? ~~arguments[1] : this.scrollTop
|
|
388
|
+
);
|
|
389
|
+
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
var left = arguments[0].left;
|
|
394
|
+
var top = arguments[0].top;
|
|
395
|
+
|
|
396
|
+
// LET THE SMOOTHNESS BEGIN!
|
|
397
|
+
smoothScroll.call(
|
|
398
|
+
this,
|
|
399
|
+
this,
|
|
400
|
+
typeof left === 'undefined' ? this.scrollLeft : ~~left,
|
|
401
|
+
typeof top === 'undefined' ? this.scrollTop : ~~top
|
|
402
|
+
);
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
// Element.prototype.scrollBy
|
|
406
|
+
Element.prototype.scrollBy = function() {
|
|
407
|
+
// avoid action when no arguments are passed
|
|
408
|
+
if (arguments[0] === undefined) {
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// avoid smooth behavior if not required
|
|
413
|
+
if (shouldBailOut(arguments[0]) === true) {
|
|
414
|
+
original.elementScroll.call(
|
|
415
|
+
this,
|
|
416
|
+
arguments[0].left !== undefined
|
|
417
|
+
? ~~arguments[0].left + this.scrollLeft
|
|
418
|
+
: ~~arguments[0] + this.scrollLeft,
|
|
419
|
+
arguments[0].top !== undefined
|
|
420
|
+
? ~~arguments[0].top + this.scrollTop
|
|
421
|
+
: ~~arguments[1] + this.scrollTop
|
|
422
|
+
);
|
|
423
|
+
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
this.scroll({
|
|
428
|
+
left: ~~arguments[0].left + this.scrollLeft,
|
|
429
|
+
top: ~~arguments[0].top + this.scrollTop,
|
|
430
|
+
behavior: arguments[0].behavior
|
|
431
|
+
});
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
// Element.prototype.scrollIntoView
|
|
435
|
+
Element.prototype.scrollIntoView = function() {
|
|
436
|
+
// avoid smooth behavior if not required
|
|
437
|
+
if (shouldBailOut(arguments[0]) === true) {
|
|
438
|
+
original.scrollIntoView.call(
|
|
439
|
+
this,
|
|
440
|
+
arguments[0] === undefined ? true : arguments[0]
|
|
441
|
+
);
|
|
442
|
+
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// LET THE SMOOTHNESS BEGIN!
|
|
447
|
+
var scrollableParent = findScrollableParent(this);
|
|
448
|
+
var parentRects = scrollableParent.getBoundingClientRect();
|
|
449
|
+
var clientRects = this.getBoundingClientRect();
|
|
450
|
+
|
|
451
|
+
if (scrollableParent !== d.body) {
|
|
452
|
+
// reveal element inside parent
|
|
453
|
+
smoothScroll.call(
|
|
454
|
+
this,
|
|
455
|
+
scrollableParent,
|
|
456
|
+
scrollableParent.scrollLeft + clientRects.left - parentRects.left,
|
|
457
|
+
scrollableParent.scrollTop + clientRects.top - parentRects.top
|
|
458
|
+
);
|
|
459
|
+
|
|
460
|
+
// reveal parent in viewport unless is fixed
|
|
461
|
+
if (w.getComputedStyle(scrollableParent).position !== 'fixed') {
|
|
462
|
+
w.scrollBy({
|
|
463
|
+
left: parentRects.left,
|
|
464
|
+
top: parentRects.top,
|
|
465
|
+
behavior: 'smooth'
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
} else {
|
|
469
|
+
// reveal element in viewport
|
|
470
|
+
w.scrollBy({
|
|
471
|
+
left: clientRects.left,
|
|
472
|
+
top: clientRects.top,
|
|
473
|
+
behavior: 'smooth'
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
{
|
|
480
|
+
// commonjs
|
|
481
|
+
module.exports = { polyfill: polyfill };
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
}());
|
|
485
|
+
});
|
|
486
|
+
var smoothscroll_1 = smoothscroll.polyfill;
|
|
487
|
+
|
|
56
488
|
// kick off the polyfill!
|
|
57
489
|
|
|
58
490
|
/*
|
package/dist/esm/YoutubeGroup.js
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -35,9 +35,8 @@ import { B as BlockContent } from './TaxonomyCard-ee1a22ae.js';
|
|
|
35
35
|
export { T as TaxonomyCard } from './TaxonomyCard-ee1a22ae.js';
|
|
36
36
|
import GroupDeck from './GroupDeck.js';
|
|
37
37
|
export { default as GroupDeck } from './GroupDeck.js';
|
|
38
|
-
import { g as getYoutubeId } from './YoutubeGroup-
|
|
39
|
-
export { Y as YoutubeGroup } from './YoutubeGroup-
|
|
40
|
-
import 'smoothscroll-polyfill';
|
|
38
|
+
import { g as getYoutubeId } from './YoutubeGroup-562ed456.js';
|
|
39
|
+
export { Y as YoutubeGroup } from './YoutubeGroup-562ed456.js';
|
|
41
40
|
import { Spinner as Spinner$1, Container as Container$1, Row as Row$1, Col as Col$1, Carousel, Table, Figure as Figure$1, Button as Button$1, ProgressBar, Card } from 'react-bootstrap';
|
|
42
41
|
export { default as QueueDeckExpanded } from './QueueDeckExpanded.js';
|
|
43
42
|
import { I as IoMdArrowDropdown } from './index.esm-536609db.js';
|
|
@@ -14112,46 +14111,63 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
14112
14111
|
};
|
|
14113
14112
|
|
|
14114
14113
|
/*
|
|
14115
|
-
This dropdown is used inside Article body to display related content placement pages
|
|
14116
|
-
|
|
14114
|
+
This dropdown is used inside Article body to display related content placement and document group pages
|
|
14115
|
+
sample usage: <ArticleDetailDropdown article={props.article} exclude={['News']} style={{ backgroundColor: 'var(--primary)', border: 0 }} />
|
|
14117
14116
|
|
|
14118
|
-
|
|
14117
|
+
- accepts any normal html arrtibute (style, id, class)
|
|
14119
14118
|
|
|
14120
|
-
'
|
|
14119
|
+
- in article query, need to add '...' to content_placement to retreive additional info needed, and document_group to retrieve group data if available
|
|
14120
|
+
|
|
14121
|
+
'content_placement': taxonomyMapping[]-> {
|
|
14121
14122
|
...,
|
|
14122
14123
|
'ancestor': parent->parent->identifier,
|
|
14123
14124
|
'parent': parent->identifier,
|
|
14124
14125
|
'path': identifier
|
|
14125
|
-
|
|
14126
|
-
|
|
14126
|
+
},
|
|
14127
|
+
'document_group': documentGroup-> {
|
|
14128
|
+
name,
|
|
14129
|
+
'parent': parent->identifier,
|
|
14130
|
+
'path': identifier.current
|
|
14131
|
+
}
|
|
14127
14132
|
*/
|
|
14128
14133
|
|
|
14129
14134
|
var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
|
|
14130
|
-
var
|
|
14131
|
-
contentPlacement = _props$contentPlaceme === undefined ? false : _props$contentPlaceme,
|
|
14135
|
+
var article = props.article,
|
|
14132
14136
|
_props$exclude = props.exclude,
|
|
14133
|
-
exclude = _props$exclude === undefined ? [
|
|
14134
|
-
|
|
14135
|
-
if (contentPlacement.length == 1 && exclude.includes(contentPlacement[0].name) || contentPlacement == false) {
|
|
14136
|
-
return null;
|
|
14137
|
-
}
|
|
14137
|
+
exclude = _props$exclude === undefined ? [] : _props$exclude;
|
|
14138
14138
|
|
|
14139
|
+
var _props = _extends$2({}, props);
|
|
14140
|
+
delete _props.article;
|
|
14141
|
+
delete _props.exclude;
|
|
14139
14142
|
return React__default.createElement(
|
|
14140
14143
|
Dropdown,
|
|
14141
|
-
|
|
14144
|
+
null,
|
|
14142
14145
|
React__default.createElement(
|
|
14143
14146
|
Dropdown.Toggle,
|
|
14144
|
-
|
|
14147
|
+
_props,
|
|
14145
14148
|
'Related Topics'
|
|
14146
14149
|
),
|
|
14147
14150
|
React__default.createElement(
|
|
14148
14151
|
Dropdown.Menu,
|
|
14149
14152
|
null,
|
|
14150
|
-
|
|
14151
|
-
|
|
14152
|
-
|
|
14153
|
+
article.document_group && React__default.createElement(
|
|
14154
|
+
Dropdown.Item,
|
|
14155
|
+
{ href: '/' + article.document_group.parent.current + '/' + article.document_group.path },
|
|
14156
|
+
article.document_group.name
|
|
14157
|
+
),
|
|
14158
|
+
article.content_placement && article.content_placement.length > 0 && article.content_placement.map(function (cp, i) {
|
|
14159
|
+
if (exclude.includes(cp.name)) return;
|
|
14160
|
+
var href = '';
|
|
14161
|
+
if (cp.ancestor) {
|
|
14162
|
+
href = '/' + cp.ancestor + '/' + cp.identifier;
|
|
14163
|
+
} else if (cp.parent) {
|
|
14164
|
+
href = '/' + cp.parent + '/' + cp.identifier;
|
|
14165
|
+
} else {
|
|
14166
|
+
href = '/' + cp.identifier;
|
|
14167
|
+
}
|
|
14168
|
+
return React__default.createElement(
|
|
14153
14169
|
Dropdown.Item,
|
|
14154
|
-
{ key:
|
|
14170
|
+
{ key: i, href: href },
|
|
14155
14171
|
cp.name
|
|
14156
14172
|
);
|
|
14157
14173
|
})
|