@mjhls/mjh-framework 1.0.1017 → 1.0.1018
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/AlgoliaSearch.js +113 -49
- package/dist/cjs/ArticleProgramLandingPage.js +1 -1
- package/dist/cjs/AuthWrapper.js +89 -19
- package/dist/cjs/ExternalResources.js +1 -1
- package/dist/cjs/HorizontalArticleListing.js +1 -1
- package/dist/cjs/{ImageSlider-17fdaf3b.js → ImageSlider-1ec0408b.js} +156 -116
- package/dist/cjs/IssueLanding.js +1 -1
- package/dist/cjs/{MediaSeriesCard-6882e999.js → MediaSeriesCard-756b0d9a.js} +1 -1
- package/dist/cjs/MediaSeriesLanding.js +4 -4
- package/dist/cjs/MediaSeriesLandingPaginated.js +4 -4
- package/dist/cjs/PartnerDetailListing.js +2 -3
- package/dist/cjs/PartnerDetailListingPaginated.js +2 -3
- package/dist/cjs/PodcastsLanding.js +2 -2
- package/dist/cjs/TaxonomyDescription.js +1 -1
- package/dist/cjs/{Tooltip-96fe6ef6.js → Tooltip-71754b2a.js} +248 -206
- package/dist/cjs/VideoProgramLandingPage.js +1 -1
- package/dist/cjs/View.js +1 -1
- package/dist/cjs/getSerializers.js +1 -1
- package/dist/cjs/index-b95410f0.js +54 -0
- package/dist/cjs/{index-71879a4f.js → index-de9f9069.js} +19 -7
- package/dist/cjs/index.js +3 -5
- package/dist/esm/AlgoliaSearch.js +100 -36
- package/dist/esm/ArticleProgramLandingPage.js +1 -1
- package/dist/esm/AuthWrapper.js +86 -16
- package/dist/esm/ExternalResources.js +1 -1
- package/dist/esm/HorizontalArticleListing.js +1 -1
- package/dist/esm/{ImageSlider-f84174cb.js → ImageSlider-83913c4c.js} +157 -117
- package/dist/esm/IssueLanding.js +1 -1
- package/dist/esm/{MediaSeriesCard-8dc5e25b.js → MediaSeriesCard-f1f91e14.js} +1 -1
- package/dist/esm/MediaSeriesLanding.js +4 -4
- package/dist/esm/MediaSeriesLandingPaginated.js +4 -4
- package/dist/esm/PartnerDetailListing.js +2 -3
- package/dist/esm/PartnerDetailListingPaginated.js +2 -3
- package/dist/esm/PodcastsLanding.js +2 -2
- package/dist/esm/TaxonomyDescription.js +1 -1
- package/dist/esm/{Tooltip-bc98d17e.js → Tooltip-8307d9d1.js} +43 -1
- package/dist/esm/VideoProgramLandingPage.js +1 -1
- package/dist/esm/View.js +1 -1
- package/dist/esm/getSerializers.js +1 -1
- package/dist/esm/index-174b5baf.js +52 -0
- package/dist/esm/{index-fca3cf8e.js → index-29ed16aa.js} +19 -7
- package/dist/esm/index.js +3 -5
- package/package.json +1 -1
- package/dist/cjs/defineProperty-e0fb52c5.js +0 -73
- package/dist/cjs/index-50be6759.js +0 -105
- package/dist/cjs/typeof-1358762e.js +0 -33
- package/dist/esm/defineProperty-23a8f8cd.js +0 -68
- package/dist/esm/index-98ca9cec.js +0 -100
- package/dist/esm/typeof-2f07d0e8.js +0 -30
|
@@ -7,7 +7,7 @@ var BlockContent = require('./BlockContent-96b44364.js');
|
|
|
7
7
|
var Col = require('react-bootstrap/Col');
|
|
8
8
|
var Form = require('react-bootstrap/Form');
|
|
9
9
|
var Button = require('react-bootstrap/Button');
|
|
10
|
-
var getSerializers = require('./index-
|
|
10
|
+
var getSerializers = require('./index-de9f9069.js');
|
|
11
11
|
var VideoSeriesListing = require('./VideoSeriesListing.js');
|
|
12
12
|
require('./_commonjsHelpers-06173234.js');
|
|
13
13
|
require('./core.get-iterator-method-5643aa10.js');
|
package/dist/cjs/View.js
CHANGED
|
@@ -17,7 +17,7 @@ var FormControl = require('react-bootstrap/FormControl');
|
|
|
17
17
|
var Button = require('react-bootstrap/Button');
|
|
18
18
|
var visibilitySensor = require('./visibility-sensor-56020df6.js');
|
|
19
19
|
var SocialShare = require('./SocialShare.js');
|
|
20
|
-
var getSerializers = require('./index-
|
|
20
|
+
var getSerializers = require('./index-de9f9069.js');
|
|
21
21
|
var AdSlot = require('./AdSlot.js');
|
|
22
22
|
var SeriesSlider = require('./SeriesSlider-18fc6e71.js');
|
|
23
23
|
var getTargeting = require('./getTargeting-ba942d9a.js');
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
4
|
+
|
|
5
|
+
var classnames = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
6
|
+
/*!
|
|
7
|
+
Copyright (c) 2017 Jed Watson.
|
|
8
|
+
Licensed under the MIT License (MIT), see
|
|
9
|
+
http://jedwatson.github.io/classnames
|
|
10
|
+
*/
|
|
11
|
+
/* global define */
|
|
12
|
+
|
|
13
|
+
(function () {
|
|
14
|
+
|
|
15
|
+
var hasOwn = {}.hasOwnProperty;
|
|
16
|
+
|
|
17
|
+
function classNames () {
|
|
18
|
+
var classes = [];
|
|
19
|
+
|
|
20
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
21
|
+
var arg = arguments[i];
|
|
22
|
+
if (!arg) continue;
|
|
23
|
+
|
|
24
|
+
var argType = typeof arg;
|
|
25
|
+
|
|
26
|
+
if (argType === 'string' || argType === 'number') {
|
|
27
|
+
classes.push(arg);
|
|
28
|
+
} else if (Array.isArray(arg) && arg.length) {
|
|
29
|
+
var inner = classNames.apply(null, arg);
|
|
30
|
+
if (inner) {
|
|
31
|
+
classes.push(inner);
|
|
32
|
+
}
|
|
33
|
+
} else if (argType === 'object') {
|
|
34
|
+
for (var key in arg) {
|
|
35
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
36
|
+
classes.push(key);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return classes.join(' ');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (module.exports) {
|
|
46
|
+
classNames.default = classNames;
|
|
47
|
+
module.exports = classNames;
|
|
48
|
+
} else {
|
|
49
|
+
window.classNames = classNames;
|
|
50
|
+
}
|
|
51
|
+
}());
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
exports.classnames = classnames;
|
|
@@ -1649,11 +1649,13 @@ function shouldUpdateVideo(prevProps, props) {
|
|
|
1649
1649
|
|
|
1650
1650
|
function filterResetOptions(opts) {
|
|
1651
1651
|
return _objectSpread(_objectSpread({}, opts), {}, {
|
|
1652
|
-
|
|
1652
|
+
height: 0,
|
|
1653
|
+
width: 0,
|
|
1654
|
+
playerVars: _objectSpread(_objectSpread({}, opts.playerVars), {}, {
|
|
1653
1655
|
autoplay: 0,
|
|
1654
1656
|
start: 0,
|
|
1655
1657
|
end: 0
|
|
1656
|
-
}
|
|
1658
|
+
})
|
|
1657
1659
|
});
|
|
1658
1660
|
}
|
|
1659
1661
|
/**
|
|
@@ -1668,7 +1670,7 @@ function filterResetOptions(opts) {
|
|
|
1668
1670
|
|
|
1669
1671
|
|
|
1670
1672
|
function shouldResetPlayer(prevProps, props) {
|
|
1671
|
-
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
1673
|
+
return prevProps.videoId !== props.videoId || !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
1672
1674
|
}
|
|
1673
1675
|
/**
|
|
1674
1676
|
* Check whether a props change should result in an id or className update.
|
|
@@ -1679,7 +1681,7 @@ function shouldResetPlayer(prevProps, props) {
|
|
|
1679
1681
|
|
|
1680
1682
|
|
|
1681
1683
|
function shouldUpdatePlayer(prevProps, props) {
|
|
1682
|
-
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
1684
|
+
return prevProps.id !== props.id || prevProps.className !== props.className || prevProps.opts.width !== props.opts.width || prevProps.opts.height !== props.opts.height || prevProps.title !== props.title;
|
|
1683
1685
|
}
|
|
1684
1686
|
|
|
1685
1687
|
var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
@@ -1766,6 +1768,9 @@ var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
|
1766
1768
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
1767
1769
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
1768
1770
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
1771
|
+
if (_this.props.opts && _this.props.opts.width) iframe.setAttribute('width', _this.props.opts.width);else iframe.removeAttribute('width');
|
|
1772
|
+
if (_this.props.opts && _this.props.opts.height) iframe.setAttribute('height', _this.props.opts.height);else iframe.removeAttribute('height');
|
|
1773
|
+
if (typeof _this.props.title === 'string') iframe.setAttribute('title', _this.props.title);else iframe.setAttribute('title', 'YouTube video player');
|
|
1769
1774
|
});
|
|
1770
1775
|
});
|
|
1771
1776
|
|
|
@@ -1864,7 +1869,8 @@ var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
|
1864
1869
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1865
1870
|
id: this.props.id,
|
|
1866
1871
|
className: this.props.className,
|
|
1867
|
-
ref: this.refContainer
|
|
1872
|
+
ref: this.refContainer,
|
|
1873
|
+
loading: this.props.loading
|
|
1868
1874
|
}));
|
|
1869
1875
|
}
|
|
1870
1876
|
}]);
|
|
@@ -1889,6 +1895,10 @@ YouTube.propTypes = {
|
|
|
1889
1895
|
className: PropTypes__default["default"].string,
|
|
1890
1896
|
// custom class name for player container element
|
|
1891
1897
|
containerClassName: PropTypes__default["default"].string,
|
|
1898
|
+
// custom title for the iFrame, see https://www.w3.org/TR/WCAG20-TECHS/H64.html
|
|
1899
|
+
title: PropTypes__default["default"].string,
|
|
1900
|
+
// custom loading for player element
|
|
1901
|
+
loading: PropTypes__default["default"].oneOf(['lazy', 'eager', 'auto']),
|
|
1892
1902
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
1893
1903
|
opts: PropTypes__default["default"].objectOf(PropTypes__default["default"].any),
|
|
1894
1904
|
// event subscriptions
|
|
@@ -1905,6 +1915,7 @@ YouTube.defaultProps = {
|
|
|
1905
1915
|
videoId: null,
|
|
1906
1916
|
id: null,
|
|
1907
1917
|
className: null,
|
|
1918
|
+
loading: null,
|
|
1908
1919
|
opts: {},
|
|
1909
1920
|
containerClassName: '',
|
|
1910
1921
|
onReady: function onReady() {},
|
|
@@ -1914,7 +1925,8 @@ YouTube.defaultProps = {
|
|
|
1914
1925
|
onEnd: function onEnd() {},
|
|
1915
1926
|
onStateChange: function onStateChange() {},
|
|
1916
1927
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
1917
|
-
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
1928
|
+
onPlaybackQualityChange: function onPlaybackQualityChange() {},
|
|
1929
|
+
title: null
|
|
1918
1930
|
};
|
|
1919
1931
|
|
|
1920
1932
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
@@ -10440,7 +10452,7 @@ var DigiohSmartTag = function DigiohSmartTag(props) {
|
|
|
10440
10452
|
};
|
|
10441
10453
|
|
|
10442
10454
|
var checkUrlIsExternal = function checkUrlIsExternal(url) {
|
|
10443
|
-
if (/https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})|http?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})|(^mailto)/i.test(url)) {
|
|
10455
|
+
if (/https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})|http?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})|(^mailto)|(^tel)/i.test(url)) {
|
|
10444
10456
|
return true;
|
|
10445
10457
|
}
|
|
10446
10458
|
return false;
|
package/dist/cjs/index.js
CHANGED
|
@@ -90,7 +90,7 @@ var VerticalHero = require('./VerticalHero.js');
|
|
|
90
90
|
var YahooHero = require('./YahooHero.js');
|
|
91
91
|
var GridHero = require('./GridHero.js');
|
|
92
92
|
var ConferenceArticleCard = require('./ConferenceArticleCard.js');
|
|
93
|
-
var getSerializers = require('./index-
|
|
93
|
+
var getSerializers = require('./index-de9f9069.js');
|
|
94
94
|
var Beam = require('./Beam.js');
|
|
95
95
|
var Segment = require('./Segment.js');
|
|
96
96
|
var KMTracker = require('./KMTracker.js');
|
|
@@ -158,8 +158,7 @@ require('./_object-to-array-ce86cae7.js');
|
|
|
158
158
|
require('react-bootstrap/Spinner');
|
|
159
159
|
require('react-bootstrap/Form');
|
|
160
160
|
require('./js.cookie-a511c430.js');
|
|
161
|
-
require('./
|
|
162
|
-
require('./index-50be6759.js');
|
|
161
|
+
require('./index-b95410f0.js');
|
|
163
162
|
require('./ConferenceBanner-213003ce.js');
|
|
164
163
|
require('next/head');
|
|
165
164
|
require('@mjhls/mjh-framework/dist/cjs/urlFor');
|
|
@@ -200,8 +199,7 @@ require('./SeriesSlider-18fc6e71.js');
|
|
|
200
199
|
require('./style-inject.es-dcee06b6.js');
|
|
201
200
|
require('disqus-react');
|
|
202
201
|
require('react-twitter-embed');
|
|
203
|
-
require('./ImageSlider-
|
|
204
|
-
require('./defineProperty-e0fb52c5.js');
|
|
202
|
+
require('./ImageSlider-1ec0408b.js');
|
|
205
203
|
require('./VideoSeriesCard.js');
|
|
206
204
|
|
|
207
205
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { _ as _extends$1 } from './extends-6d8e3924.js';
|
|
2
2
|
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-a6ba2ec4.js';
|
|
3
|
-
import { _ as _typeof$
|
|
3
|
+
import { _ as _typeof$1 } from './typeof-e9fc0c5d.js';
|
|
4
4
|
import React__default, { createContext, Component, Fragment, Children, version as version$2 } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import {
|
|
7
|
-
import { _ as _objectWithoutPropertiesLoose$1, a as _setPrototypeOf, b as _extends, c as classnames } from './index-98ca9cec.js';
|
|
6
|
+
import { c as classnames } from './index-174b5baf.js';
|
|
8
7
|
import { DropdownButton } from 'react-bootstrap';
|
|
9
8
|
import urlFor from './urlFor.js';
|
|
10
9
|
import { m as moment } from './moment-bc12cb97.js';
|
|
@@ -21,6 +20,39 @@ import './slicedToArray-6ebcbfea.js';
|
|
|
21
20
|
import './index-3f5c03b2.js';
|
|
22
21
|
import 'react-dom';
|
|
23
22
|
|
|
23
|
+
function _extends() {
|
|
24
|
+
_extends = Object.assign || function (target) {
|
|
25
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
26
|
+
var source = arguments[i];
|
|
27
|
+
|
|
28
|
+
for (var key in source) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
30
|
+
target[key] = source[key];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return _extends.apply(this, arguments);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
42
|
+
if (source == null) return {};
|
|
43
|
+
var target = {};
|
|
44
|
+
var sourceKeys = Object.keys(source);
|
|
45
|
+
var key, i;
|
|
46
|
+
|
|
47
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
48
|
+
key = sourceKeys[i];
|
|
49
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
50
|
+
target[key] = source[key];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return target;
|
|
54
|
+
}
|
|
55
|
+
|
|
24
56
|
function _objectWithoutProperties(source, excluded) {
|
|
25
57
|
if (source == null) return {};
|
|
26
58
|
var target = _objectWithoutPropertiesLoose$1(source, excluded);
|
|
@@ -70,6 +102,15 @@ function _assertThisInitialized(self) {
|
|
|
70
102
|
return self;
|
|
71
103
|
}
|
|
72
104
|
|
|
105
|
+
function _setPrototypeOf(o, p) {
|
|
106
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
107
|
+
o.__proto__ = p;
|
|
108
|
+
return o;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
return _setPrototypeOf(o, p);
|
|
112
|
+
}
|
|
113
|
+
|
|
73
114
|
function _inherits(subClass, superClass) {
|
|
74
115
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
75
116
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -85,11 +126,25 @@ function _inherits(subClass, superClass) {
|
|
|
85
126
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
86
127
|
}
|
|
87
128
|
|
|
129
|
+
function _typeof(obj) {
|
|
130
|
+
"@babel/helpers - typeof";
|
|
131
|
+
|
|
132
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
133
|
+
_typeof = function _typeof(obj) {
|
|
134
|
+
return typeof obj;
|
|
135
|
+
};
|
|
136
|
+
} else {
|
|
137
|
+
_typeof = function _typeof(obj) {
|
|
138
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return _typeof(obj);
|
|
143
|
+
}
|
|
144
|
+
|
|
88
145
|
function _possibleConstructorReturn(self, call) {
|
|
89
|
-
if (call && (_typeof
|
|
146
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
90
147
|
return call;
|
|
91
|
-
} else if (call !== void 0) {
|
|
92
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
93
148
|
}
|
|
94
149
|
|
|
95
150
|
return _assertThisInitialized(self);
|
|
@@ -252,22 +307,6 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
252
307
|
}
|
|
253
308
|
};
|
|
254
309
|
|
|
255
|
-
function _typeof(obj) {
|
|
256
|
-
"@babel/helpers - typeof";
|
|
257
|
-
|
|
258
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
259
|
-
_typeof = function _typeof(obj) {
|
|
260
|
-
return typeof obj;
|
|
261
|
-
};
|
|
262
|
-
} else {
|
|
263
|
-
_typeof = function _typeof(obj) {
|
|
264
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
return _typeof(obj);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
310
|
function ownKeys$f(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
272
311
|
|
|
273
312
|
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$f(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -820,7 +859,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
820
859
|
});
|
|
821
860
|
}
|
|
822
861
|
|
|
823
|
-
var version$1 = '6.
|
|
862
|
+
var version$1 = '6.18.0';
|
|
824
863
|
|
|
825
864
|
function _createSuper$p(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$p(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
826
865
|
|
|
@@ -831,6 +870,7 @@ var withKeysPropType = function withKeysPropType(keys) {
|
|
|
831
870
|
var prop = props[propName];
|
|
832
871
|
|
|
833
872
|
if (prop) {
|
|
873
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
834
874
|
for (var _i = 0, _Object$keys = Object.keys(prop); _i < _Object$keys.length; _i++) {
|
|
835
875
|
var key = _Object$keys[_i];
|
|
836
876
|
|
|
@@ -1263,7 +1303,7 @@ function _arrayWithoutHoles(arr) {
|
|
|
1263
1303
|
}
|
|
1264
1304
|
|
|
1265
1305
|
function _iterableToArray(iter) {
|
|
1266
|
-
if (typeof Symbol !== "undefined" &&
|
|
1306
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
|
1267
1307
|
}
|
|
1268
1308
|
|
|
1269
1309
|
function _unsupportedIterableToArray(o, minLen) {
|
|
@@ -6753,15 +6793,19 @@ ConfigureRelatedItems.propTypes = {
|
|
|
6753
6793
|
};
|
|
6754
6794
|
connectConfigureRelatedItems(ConfigureRelatedItems);
|
|
6755
6795
|
|
|
6796
|
+
var MAX_WILDCARD_FACETS = 20;
|
|
6756
6797
|
var connectDynamicWidgets = createConnectorWithContext({
|
|
6757
6798
|
displayName: 'AlgoliaDynamicWidgets',
|
|
6758
6799
|
defaultProps: {
|
|
6759
6800
|
transformItems: function transformItems(items) {
|
|
6760
6801
|
return items;
|
|
6761
|
-
}
|
|
6802
|
+
},
|
|
6803
|
+
maxValuesPerFacet: 20
|
|
6762
6804
|
},
|
|
6763
6805
|
propTypes: {
|
|
6764
|
-
transformItems: PropTypes.func
|
|
6806
|
+
transformItems: PropTypes.func,
|
|
6807
|
+
facets: PropTypes.arrayOf(PropTypes.string),
|
|
6808
|
+
maxValuesPerFacet: PropTypes.number
|
|
6765
6809
|
},
|
|
6766
6810
|
getProvidedProps: function getProvidedProps(props, _searchState, searchResults) {
|
|
6767
6811
|
var results = getResults(searchResults, {
|
|
@@ -6769,6 +6813,10 @@ var connectDynamicWidgets = createConnectorWithContext({
|
|
|
6769
6813
|
multiIndexContext: props.indexContextValue
|
|
6770
6814
|
});
|
|
6771
6815
|
|
|
6816
|
+
if (props.facets && !(Array.isArray(props.facets) && props.facets.length <= 1 && (props.facets[0] === '*' || props.facets[0] === undefined))) {
|
|
6817
|
+
throw new Error("The `facets` prop only accepts [] or [\"*\"], you passed ".concat(JSON.stringify(props.facets)));
|
|
6818
|
+
}
|
|
6819
|
+
|
|
6772
6820
|
if (!results) {
|
|
6773
6821
|
return {
|
|
6774
6822
|
attributesToRender: []
|
|
@@ -6776,11 +6824,30 @@ var connectDynamicWidgets = createConnectorWithContext({
|
|
|
6776
6824
|
}
|
|
6777
6825
|
|
|
6778
6826
|
var facetOrder = results.renderingContent && results.renderingContent.facetOrdering && results.renderingContent.facetOrdering.facets && results.renderingContent.facetOrdering.facets.order || [];
|
|
6827
|
+
var attributesToRender = props.transformItems(facetOrder, {
|
|
6828
|
+
results: results
|
|
6829
|
+
});
|
|
6830
|
+
|
|
6831
|
+
if (attributesToRender.length > MAX_WILDCARD_FACETS && !props.facets) {
|
|
6832
|
+
// eslint-disable-next-line no-console
|
|
6833
|
+
console.warn("More than ".concat(MAX_WILDCARD_FACETS, " facets are requested to be displayed without explicitly setting which facets to retrieve. This could have a performance impact. Set \"facets\" to [] to do two smaller network requests, or explicitly to ['*'] to avoid this warning."));
|
|
6834
|
+
}
|
|
6835
|
+
|
|
6836
|
+
if (props.maxValuesPerFacet < results._state.maxValuesPerFacet) {
|
|
6837
|
+
// eslint-disable-next-line no-console
|
|
6838
|
+
console.warn("The maxValuesPerFacet set by dynamic widgets (".concat(props.maxValuesPerFacet, ") is smaller than one of the limits set by a widget (").concat(results._state.maxValuesPerFacet, "). This causes a mismatch in query parameters and thus an extra network request when that widget is mounted."));
|
|
6839
|
+
}
|
|
6840
|
+
|
|
6779
6841
|
return {
|
|
6780
|
-
attributesToRender:
|
|
6781
|
-
results: results
|
|
6782
|
-
})
|
|
6842
|
+
attributesToRender: attributesToRender
|
|
6783
6843
|
};
|
|
6844
|
+
},
|
|
6845
|
+
getSearchParameters: function getSearchParameters(searchParameters, props) {
|
|
6846
|
+
return (props.facets || ['*']).reduce(function (acc, curr) {
|
|
6847
|
+
return acc.addFacet(curr);
|
|
6848
|
+
}, searchParameters.setQueryParameters({
|
|
6849
|
+
maxValuesPerFacet: Math.max(props.maxValuesPerFacet || 0, searchParameters.maxValuesPerFacet || 0)
|
|
6850
|
+
}));
|
|
6784
6851
|
}
|
|
6785
6852
|
});
|
|
6786
6853
|
|
|
@@ -9068,17 +9135,14 @@ function _arrayWithHoles(arr) {
|
|
|
9068
9135
|
}
|
|
9069
9136
|
|
|
9070
9137
|
function _iterableToArrayLimit(arr, i) {
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
if (_i == null) return;
|
|
9138
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
9074
9139
|
var _arr = [];
|
|
9075
9140
|
var _n = true;
|
|
9076
9141
|
var _d = false;
|
|
9077
|
-
|
|
9078
|
-
var _s, _e;
|
|
9142
|
+
var _e = undefined;
|
|
9079
9143
|
|
|
9080
9144
|
try {
|
|
9081
|
-
for (_i =
|
|
9145
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
9082
9146
|
_arr.push(_s.value);
|
|
9083
9147
|
|
|
9084
9148
|
if (i && _arr.length === i) break;
|
|
@@ -14844,7 +14908,7 @@ var imageDiv = function imageDiv(hit, styles, client, siteType, defaultImage, va
|
|
|
14844
14908
|
LazyLoad,
|
|
14845
14909
|
{ once: true },
|
|
14846
14910
|
React__default.createElement('img', {
|
|
14847
|
-
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$
|
|
14911
|
+
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$1(hit.thumbnail === 'string') ? hit.thumbnail : defaultImage
|
|
14848
14912
|
})
|
|
14849
14913
|
)
|
|
14850
14914
|
)
|
|
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
|
|
|
3
3
|
import { _ as _extends } from './extends-6d8e3924.js';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
6
|
-
import { g as getSerializers } from './index-
|
|
6
|
+
import { g as getSerializers } from './index-29ed16aa.js';
|
|
7
7
|
import ArticleSeriesListing from './ArticleSeriesListing.js';
|
|
8
8
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
9
9
|
import './core.get-iterator-method-ea258bb1.js';
|
package/dist/esm/AuthWrapper.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
|
|
2
2
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
3
|
-
import { a as _typeof_1 } from './typeof-2f07d0e8.js';
|
|
4
|
-
import { d as defineProperty, b as asyncToGenerator } from './defineProperty-23a8f8cd.js';
|
|
5
3
|
import React__default, { useState, useEffect } from 'react';
|
|
6
4
|
import { Form } from 'react-bootstrap';
|
|
7
5
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
@@ -15,12 +13,27 @@ function _interopRequireDefault(obj) {
|
|
|
15
13
|
};
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
module.exports = _interopRequireDefault;
|
|
19
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
16
|
+
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
20
17
|
});
|
|
21
18
|
|
|
22
19
|
unwrapExports(interopRequireDefault);
|
|
23
20
|
|
|
21
|
+
var _typeof_1 = createCommonjsModule(function (module) {
|
|
22
|
+
function _typeof(obj) {
|
|
23
|
+
"@babel/helpers - typeof";
|
|
24
|
+
|
|
25
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
26
|
+
return typeof obj;
|
|
27
|
+
} : function (obj) {
|
|
28
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
29
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
unwrapExports(_typeof_1);
|
|
36
|
+
|
|
24
37
|
var runtime_1 = createCommonjsModule(function (module) {
|
|
25
38
|
/**
|
|
26
39
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
@@ -779,13 +792,75 @@ try {
|
|
|
779
792
|
|
|
780
793
|
var regenerator = runtime_1;
|
|
781
794
|
|
|
795
|
+
var defineProperty = createCommonjsModule(function (module) {
|
|
796
|
+
function _defineProperty(obj, key, value) {
|
|
797
|
+
if (key in obj) {
|
|
798
|
+
Object.defineProperty(obj, key, {
|
|
799
|
+
value: value,
|
|
800
|
+
enumerable: true,
|
|
801
|
+
configurable: true,
|
|
802
|
+
writable: true
|
|
803
|
+
});
|
|
804
|
+
} else {
|
|
805
|
+
obj[key] = value;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
return obj;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
812
|
+
});
|
|
813
|
+
|
|
814
|
+
unwrapExports(defineProperty);
|
|
815
|
+
|
|
816
|
+
var asyncToGenerator = createCommonjsModule(function (module) {
|
|
817
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
818
|
+
try {
|
|
819
|
+
var info = gen[key](arg);
|
|
820
|
+
var value = info.value;
|
|
821
|
+
} catch (error) {
|
|
822
|
+
reject(error);
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
if (info.done) {
|
|
827
|
+
resolve(value);
|
|
828
|
+
} else {
|
|
829
|
+
Promise.resolve(value).then(_next, _throw);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
function _asyncToGenerator(fn) {
|
|
834
|
+
return function () {
|
|
835
|
+
var self = this,
|
|
836
|
+
args = arguments;
|
|
837
|
+
return new Promise(function (resolve, reject) {
|
|
838
|
+
var gen = fn.apply(self, args);
|
|
839
|
+
|
|
840
|
+
function _next(value) {
|
|
841
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
function _throw(err) {
|
|
845
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
_next(undefined);
|
|
849
|
+
});
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
854
|
+
});
|
|
855
|
+
|
|
856
|
+
unwrapExports(asyncToGenerator);
|
|
857
|
+
|
|
782
858
|
var arrayWithHoles = createCommonjsModule(function (module) {
|
|
783
859
|
function _arrayWithHoles(arr) {
|
|
784
860
|
if (Array.isArray(arr)) return arr;
|
|
785
861
|
}
|
|
786
862
|
|
|
787
|
-
module.exports = _arrayWithHoles;
|
|
788
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
863
|
+
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
789
864
|
});
|
|
790
865
|
|
|
791
866
|
unwrapExports(arrayWithHoles);
|
|
@@ -821,8 +896,7 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
821
896
|
return _arr;
|
|
822
897
|
}
|
|
823
898
|
|
|
824
|
-
module.exports = _iterableToArrayLimit;
|
|
825
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
899
|
+
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
826
900
|
});
|
|
827
901
|
|
|
828
902
|
unwrapExports(iterableToArrayLimit);
|
|
@@ -838,8 +912,7 @@ function _arrayLikeToArray(arr, len) {
|
|
|
838
912
|
return arr2;
|
|
839
913
|
}
|
|
840
914
|
|
|
841
|
-
module.exports = _arrayLikeToArray;
|
|
842
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
915
|
+
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
843
916
|
});
|
|
844
917
|
|
|
845
918
|
unwrapExports(arrayLikeToArray);
|
|
@@ -854,8 +927,7 @@ function _unsupportedIterableToArray(o, minLen) {
|
|
|
854
927
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
|
855
928
|
}
|
|
856
929
|
|
|
857
|
-
module.exports = _unsupportedIterableToArray;
|
|
858
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
930
|
+
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
859
931
|
});
|
|
860
932
|
|
|
861
933
|
unwrapExports(unsupportedIterableToArray);
|
|
@@ -865,8 +937,7 @@ function _nonIterableRest() {
|
|
|
865
937
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
866
938
|
}
|
|
867
939
|
|
|
868
|
-
module.exports = _nonIterableRest;
|
|
869
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
940
|
+
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
870
941
|
});
|
|
871
942
|
|
|
872
943
|
unwrapExports(nonIterableRest);
|
|
@@ -876,8 +947,7 @@ function _slicedToArray(arr, i) {
|
|
|
876
947
|
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
|
|
877
948
|
}
|
|
878
949
|
|
|
879
|
-
module.exports = _slicedToArray;
|
|
880
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
950
|
+
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
881
951
|
});
|
|
882
952
|
|
|
883
953
|
unwrapExports(slicedToArray);
|
|
@@ -2,7 +2,7 @@ import { _ as _extends } from './extends-6d8e3924.js';
|
|
|
2
2
|
import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
|
|
3
3
|
import React__default, { useState, useEffect } from 'react';
|
|
4
4
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
5
|
-
import { g as getSerializers } from './index-
|
|
5
|
+
import { g as getSerializers } from './index-29ed16aa.js';
|
|
6
6
|
import { m as momentTimezone } from './index-30a6257d.js';
|
|
7
7
|
import { useRouter } from 'next/router';
|
|
8
8
|
import Button from 'react-bootstrap/Button';
|
|
@@ -3,7 +3,7 @@ import React__default from 'react';
|
|
|
3
3
|
import ArticleCarousel from './ArticleCarousel.js';
|
|
4
4
|
import { I as IoIosArrowForward } from './index.esm-eb1e8e80.js';
|
|
5
5
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
6
|
-
import { g as getSerializers } from './index-
|
|
6
|
+
import { g as getSerializers } from './index-29ed16aa.js';
|
|
7
7
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
8
8
|
import './core.get-iterator-method-ea258bb1.js';
|
|
9
9
|
import './_object-pie-133f504a.js';
|