@quintype/components 3.0.3-upgrade-R18.0 → 3.1.0-dm-upgrade.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js
CHANGED
|
@@ -110,14 +110,14 @@ function postRequest(url, body) {
|
|
|
110
110
|
return apiClient.url("".concat(mountAt).concat(url)).post(body);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
function _createSuper$
|
|
113
|
+
function _createSuper$q(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$q(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
114
114
|
|
|
115
|
-
function _isNativeReflectConstruct$
|
|
115
|
+
function _isNativeReflectConstruct$q() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
116
116
|
|
|
117
117
|
var BreakingNewsBase = /*#__PURE__*/function (_React$Component) {
|
|
118
118
|
_inherits__default["default"](BreakingNewsBase, _React$Component);
|
|
119
119
|
|
|
120
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
120
|
+
var _super = /*#__PURE__*/_createSuper$q(BreakingNewsBase);
|
|
121
121
|
|
|
122
122
|
function BreakingNewsBase() {
|
|
123
123
|
_classCallCheck__default["default"](this, BreakingNewsBase);
|
|
@@ -321,14 +321,14 @@ function mapDispatchToProps$6(dispatch) {
|
|
|
321
321
|
return {};
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
function _createSuper$
|
|
324
|
+
function _createSuper$p(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$p(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
325
325
|
|
|
326
|
-
function _isNativeReflectConstruct$
|
|
326
|
+
function _isNativeReflectConstruct$p() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
327
327
|
|
|
328
328
|
var ClientSideOnlyBase = /*#__PURE__*/function (_React$Component) {
|
|
329
329
|
_inherits__default["default"](ClientSideOnlyBase, _React$Component);
|
|
330
330
|
|
|
331
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
331
|
+
var _super = /*#__PURE__*/_createSuper$p(ClientSideOnlyBase);
|
|
332
332
|
|
|
333
333
|
function ClientSideOnlyBase() {
|
|
334
334
|
_classCallCheck__default["default"](this, ClientSideOnlyBase);
|
|
@@ -371,9 +371,9 @@ var ClientSideOnlyBase = /*#__PURE__*/function (_React$Component) {
|
|
|
371
371
|
|
|
372
372
|
var ClientSideOnly = /*#__PURE__*/reactRedux.connect(mapStateToProps$9, mapDispatchToProps$6)(ClientSideOnlyBase);
|
|
373
373
|
|
|
374
|
-
function _createSuper$
|
|
374
|
+
function _createSuper$o(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$o(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
375
375
|
|
|
376
|
-
function _isNativeReflectConstruct$
|
|
376
|
+
function _isNativeReflectConstruct$o() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
377
377
|
/**
|
|
378
378
|
* This component can be used along with {@link LazyLoadImages}. Children of `EagerLoadImages` are forced to be eager, if they match the given predicate
|
|
379
379
|
*
|
|
@@ -385,7 +385,7 @@ function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefined" || !
|
|
|
385
385
|
var EagerLoadImages = /*#__PURE__*/function (_React$Component) {
|
|
386
386
|
_inherits__default["default"](EagerLoadImages, _React$Component);
|
|
387
387
|
|
|
388
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
388
|
+
var _super = /*#__PURE__*/_createSuper$o(EagerLoadImages);
|
|
389
389
|
|
|
390
390
|
function EagerLoadImages() {
|
|
391
391
|
_classCallCheck__default["default"](this, EagerLoadImages);
|
|
@@ -415,9 +415,9 @@ EagerLoadImages.childContextTypes = {
|
|
|
415
415
|
lazyLoadEagerPredicate: propTypes.func
|
|
416
416
|
};
|
|
417
417
|
|
|
418
|
-
function _createSuper$
|
|
418
|
+
function _createSuper$n(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$n(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
419
419
|
|
|
420
|
-
function _isNativeReflectConstruct$
|
|
420
|
+
function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
421
421
|
|
|
422
422
|
function defaultErrorFn(props) {
|
|
423
423
|
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
@@ -451,7 +451,7 @@ function withError(clazz) {
|
|
|
451
451
|
return /*#__PURE__*/function (_React$Component) {
|
|
452
452
|
_inherits__default["default"](WithError, _React$Component);
|
|
453
453
|
|
|
454
|
-
var _super = _createSuper$
|
|
454
|
+
var _super = _createSuper$n(WithError);
|
|
455
455
|
|
|
456
456
|
function WithError(props) {
|
|
457
457
|
var _this;
|
|
@@ -642,14 +642,14 @@ var HamburgerButton = /*#__PURE__*/reactRedux.connect(function (state) {
|
|
|
642
642
|
return {};
|
|
643
643
|
}, mapDispatchToProps$5)(HamburgerButtonBase);
|
|
644
644
|
|
|
645
|
-
function _createSuper$
|
|
645
|
+
function _createSuper$m(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$m(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
646
646
|
|
|
647
|
-
function _isNativeReflectConstruct$
|
|
647
|
+
function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
648
648
|
|
|
649
649
|
var ScrollItem = /*#__PURE__*/function (_React$Component) {
|
|
650
650
|
_inherits__default["default"](ScrollItem, _React$Component);
|
|
651
651
|
|
|
652
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
652
|
+
var _super = /*#__PURE__*/_createSuper$m(ScrollItem);
|
|
653
653
|
|
|
654
654
|
function ScrollItem(props) {
|
|
655
655
|
var _this;
|
|
@@ -720,7 +720,7 @@ var ScrollItem = /*#__PURE__*/function (_React$Component) {
|
|
|
720
720
|
var ScrollLoadMore = /*#__PURE__*/function (_React$Component2) {
|
|
721
721
|
_inherits__default["default"](ScrollLoadMore, _React$Component2);
|
|
722
722
|
|
|
723
|
-
var _super2 = /*#__PURE__*/_createSuper$
|
|
723
|
+
var _super2 = /*#__PURE__*/_createSuper$m(ScrollLoadMore);
|
|
724
724
|
|
|
725
725
|
function ScrollLoadMore() {
|
|
726
726
|
_classCallCheck__default["default"](this, ScrollLoadMore);
|
|
@@ -767,7 +767,7 @@ var ScrollLoadMore = /*#__PURE__*/function (_React$Component2) {
|
|
|
767
767
|
var InfiniteScrollBase = /*#__PURE__*/function (_React$Component3) {
|
|
768
768
|
_inherits__default["default"](InfiniteScrollBase, _React$Component3);
|
|
769
769
|
|
|
770
|
-
var _super3 = /*#__PURE__*/_createSuper$
|
|
770
|
+
var _super3 = /*#__PURE__*/_createSuper$m(InfiniteScrollBase);
|
|
771
771
|
|
|
772
772
|
function InfiniteScrollBase(props) {
|
|
773
773
|
var _this8;
|
|
@@ -857,7 +857,7 @@ function withFocusObserver(Component) {
|
|
|
857
857
|
return /*#__PURE__*/function (_React$Component4) {
|
|
858
858
|
_inherits__default["default"](WithFocusObserver, _React$Component4);
|
|
859
859
|
|
|
860
|
-
var _super4 = _createSuper$
|
|
860
|
+
var _super4 = _createSuper$m(WithFocusObserver);
|
|
861
861
|
|
|
862
862
|
function WithFocusObserver(props) {
|
|
863
863
|
var _this11;
|
|
@@ -1000,9 +1000,9 @@ var computeAccess = function computeAccess(previousState, currentState) {
|
|
|
1000
1000
|
return _objectSpread$6(_objectSpread$6({}, previousState), currentAccess);
|
|
1001
1001
|
};
|
|
1002
1002
|
|
|
1003
|
-
function _createSuper$
|
|
1003
|
+
function _createSuper$l(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$l(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
1004
1004
|
|
|
1005
|
-
function _isNativeReflectConstruct$
|
|
1005
|
+
function _isNativeReflectConstruct$l() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
1006
1006
|
/**
|
|
1007
1007
|
* This component can be used to implement InfiniteScroll on the story page. You will need to specify the function which renders the story (which will recieve props.index and props.story), and functions for triggering analytics.
|
|
1008
1008
|
*
|
|
@@ -1054,7 +1054,7 @@ function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefined" || !
|
|
|
1054
1054
|
var InfiniteStoryBase = /*#__PURE__*/function (_React$Component) {
|
|
1055
1055
|
_inherits__default["default"](InfiniteStoryBase, _React$Component);
|
|
1056
1056
|
|
|
1057
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
1057
|
+
var _super = /*#__PURE__*/_createSuper$l(InfiniteStoryBase);
|
|
1058
1058
|
|
|
1059
1059
|
function InfiniteStoryBase(props) {
|
|
1060
1060
|
var _this;
|
|
@@ -1146,9 +1146,9 @@ var InfiniteStoryBase = /*#__PURE__*/function (_React$Component) {
|
|
|
1146
1146
|
return InfiniteStoryBase;
|
|
1147
1147
|
}(React__default["default"].Component);
|
|
1148
1148
|
|
|
1149
|
-
function _createSuper$
|
|
1149
|
+
function _createSuper$k(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$k(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
1150
1150
|
|
|
1151
|
-
function _isNativeReflectConstruct$
|
|
1151
|
+
function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
1152
1152
|
|
|
1153
1153
|
var IntersectionObserverWrapper = /*#__PURE__*/function () {
|
|
1154
1154
|
function IntersectionObserverWrapper(callback) {
|
|
@@ -1292,7 +1292,7 @@ var StubObserverWrapper = /*#__PURE__*/function () {
|
|
|
1292
1292
|
var LazyLoadImages = /*#__PURE__*/function (_React$Component) {
|
|
1293
1293
|
_inherits__default["default"](LazyLoadImages, _React$Component);
|
|
1294
1294
|
|
|
1295
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
1295
|
+
var _super = /*#__PURE__*/_createSuper$k(LazyLoadImages);
|
|
1296
1296
|
|
|
1297
1297
|
function LazyLoadImages(props) {
|
|
1298
1298
|
var _this3;
|
|
@@ -1448,13 +1448,13 @@ LazyCollection.defaultProps = {
|
|
|
1448
1448
|
}
|
|
1449
1449
|
};
|
|
1450
1450
|
|
|
1451
|
-
function _createSuper$
|
|
1451
|
+
function _createSuper$j(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$j(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
1452
1452
|
|
|
1453
|
-
function _isNativeReflectConstruct$
|
|
1453
|
+
function _isNativeReflectConstruct$j() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
1454
1454
|
var LoadMoreStoriesManager = /*#__PURE__*/function (_React$Component) {
|
|
1455
1455
|
_inherits__default["default"](LoadMoreStoriesManager, _React$Component);
|
|
1456
1456
|
|
|
1457
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
1457
|
+
var _super = /*#__PURE__*/_createSuper$j(LoadMoreStoriesManager);
|
|
1458
1458
|
|
|
1459
1459
|
function LoadMoreStoriesManager(props) {
|
|
1460
1460
|
var _this;
|
|
@@ -1516,9 +1516,9 @@ var LoadMoreStoriesManager = /*#__PURE__*/function (_React$Component) {
|
|
|
1516
1516
|
return LoadMoreStoriesManager;
|
|
1517
1517
|
}(React__default["default"].Component);
|
|
1518
1518
|
|
|
1519
|
-
function _createSuper$
|
|
1519
|
+
function _createSuper$i(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$i(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
1520
1520
|
|
|
1521
|
-
function _isNativeReflectConstruct$
|
|
1521
|
+
function _isNativeReflectConstruct$i() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
1522
1522
|
/**
|
|
1523
1523
|
* This component starts with a set of stories, and then provides a load more button. This calls out to `/api/v1/stories` with the properties passed via the `params` prop. The stories are concatenated with the stories in `props.data.stories`, and the contents of `props.data` are passed to the rendered template.
|
|
1524
1524
|
*
|
|
@@ -1550,7 +1550,7 @@ function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefined" || !
|
|
|
1550
1550
|
var LoadMoreStoriesBase = /*#__PURE__*/function (_React$Component) {
|
|
1551
1551
|
_inherits__default["default"](LoadMoreStoriesBase, _React$Component);
|
|
1552
1552
|
|
|
1553
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
1553
|
+
var _super = /*#__PURE__*/_createSuper$i(LoadMoreStoriesBase);
|
|
1554
1554
|
|
|
1555
1555
|
function LoadMoreStoriesBase() {
|
|
1556
1556
|
_classCallCheck__default["default"](this, LoadMoreStoriesBase);
|
|
@@ -1595,9 +1595,9 @@ var LoadMoreStoriesBase = /*#__PURE__*/function (_React$Component) {
|
|
|
1595
1595
|
return LoadMoreStoriesBase;
|
|
1596
1596
|
}(React__default["default"].Component);
|
|
1597
1597
|
|
|
1598
|
-
function _createSuper$
|
|
1598
|
+
function _createSuper$h(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$h(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
1599
1599
|
|
|
1600
|
-
function _isNativeReflectConstruct$
|
|
1600
|
+
function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
1601
1601
|
/**
|
|
1602
1602
|
* This component is very similar to the {@link LoadMoreBase} component but fetches the stories from a `collection`. The api call `/api/v1/collections/{collectionSlug}` is made with the passed collection slug value. The component accepts the `params` prop and a requires a Collection Slug from which to fetch the stories and returns a set of stories only.
|
|
1603
1603
|
*
|
|
@@ -1637,7 +1637,7 @@ function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefined" || !
|
|
|
1637
1637
|
var LoadMoreCollectionStories = /*#__PURE__*/function (_React$Component) {
|
|
1638
1638
|
_inherits__default["default"](LoadMoreCollectionStories, _React$Component);
|
|
1639
1639
|
|
|
1640
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
1640
|
+
var _super = /*#__PURE__*/_createSuper$h(LoadMoreCollectionStories);
|
|
1641
1641
|
|
|
1642
1642
|
function LoadMoreCollectionStories() {
|
|
1643
1643
|
_classCallCheck__default["default"](this, LoadMoreCollectionStories);
|
|
@@ -1820,9 +1820,9 @@ function hashString(string) {
|
|
|
1820
1820
|
return hash;
|
|
1821
1821
|
}
|
|
1822
1822
|
|
|
1823
|
-
function _createSuper$
|
|
1823
|
+
function _createSuper$g(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$g(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
1824
1824
|
|
|
1825
|
-
function _isNativeReflectConstruct$
|
|
1825
|
+
function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
1826
1826
|
function responsiveProps(props) {
|
|
1827
1827
|
var image = new quintypeJs.FocusedImage(props.slug, props.metadata);
|
|
1828
1828
|
|
|
@@ -1843,7 +1843,7 @@ function responsiveProps(props) {
|
|
|
1843
1843
|
var ThumborImage = /*#__PURE__*/function (_React$Component) {
|
|
1844
1844
|
_inherits__default["default"](ThumborImage, _React$Component);
|
|
1845
1845
|
|
|
1846
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
1846
|
+
var _super = /*#__PURE__*/_createSuper$g(ThumborImage);
|
|
1847
1847
|
|
|
1848
1848
|
function ThumborImage(props, context) {
|
|
1849
1849
|
var _this;
|
|
@@ -2093,14 +2093,14 @@ var ResponsiveSource = function ResponsiveSource(props) {
|
|
|
2093
2093
|
}, props));
|
|
2094
2094
|
};
|
|
2095
2095
|
|
|
2096
|
-
function _createSuper$
|
|
2096
|
+
function _createSuper$f(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$f(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
2097
2097
|
|
|
2098
|
-
function _isNativeReflectConstruct$
|
|
2098
|
+
function _isNativeReflectConstruct$f() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
2099
2099
|
|
|
2100
2100
|
var SearchBoxBase = /*#__PURE__*/function (_React$Component) {
|
|
2101
2101
|
_inherits__default["default"](SearchBoxBase, _React$Component);
|
|
2102
2102
|
|
|
2103
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
2103
|
+
var _super = /*#__PURE__*/_createSuper$f(SearchBoxBase);
|
|
2104
2104
|
|
|
2105
2105
|
function SearchBoxBase(props) {
|
|
2106
2106
|
var _this;
|
|
@@ -2210,9 +2210,9 @@ var mapDispatchToProps$3 = function mapDispatchToProps(dispatch) {
|
|
|
2210
2210
|
|
|
2211
2211
|
var SearchBox = /*#__PURE__*/reactRedux.connect(mapStateToProps$5, mapDispatchToProps$3)(SearchBoxBase);
|
|
2212
2212
|
|
|
2213
|
-
function _createSuper$
|
|
2213
|
+
function _createSuper$e(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$e(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
2214
2214
|
|
|
2215
|
-
function _isNativeReflectConstruct$
|
|
2215
|
+
function _isNativeReflectConstruct$e() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
2216
2216
|
/**
|
|
2217
2217
|
* This component is to handle search functionality and also handles load more.
|
|
2218
2218
|
*
|
|
@@ -2236,7 +2236,7 @@ function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !
|
|
|
2236
2236
|
var SearchPageBase = /*#__PURE__*/function (_React$Component) {
|
|
2237
2237
|
_inherits__default["default"](SearchPageBase, _React$Component);
|
|
2238
2238
|
|
|
2239
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
2239
|
+
var _super = /*#__PURE__*/_createSuper$e(SearchPageBase);
|
|
2240
2240
|
|
|
2241
2241
|
function SearchPageBase() {
|
|
2242
2242
|
_classCallCheck__default["default"](this, SearchPageBase);
|
|
@@ -2271,9 +2271,9 @@ var SearchPageBase = /*#__PURE__*/function (_React$Component) {
|
|
|
2271
2271
|
return SearchPageBase;
|
|
2272
2272
|
}(React__default["default"].Component);
|
|
2273
2273
|
|
|
2274
|
-
function _createSuper$
|
|
2274
|
+
function _createSuper$d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$d(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
2275
2275
|
|
|
2276
|
-
function _isNativeReflectConstruct$
|
|
2276
|
+
function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
2277
2277
|
/**
|
|
2278
2278
|
* This component can be used to load some DOM just before it scrolls into the screen. Currently, it does not support unloading. The `margin` prop is passed to `IntersectionObserver`.
|
|
2279
2279
|
*
|
|
@@ -2293,7 +2293,7 @@ function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !
|
|
|
2293
2293
|
var WithLazy = /*#__PURE__*/function (_React$Component) {
|
|
2294
2294
|
_inherits__default["default"](WithLazy, _React$Component);
|
|
2295
2295
|
|
|
2296
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
2296
|
+
var _super = /*#__PURE__*/_createSuper$d(WithLazy);
|
|
2297
2297
|
|
|
2298
2298
|
function WithLazy(props) {
|
|
2299
2299
|
var _this;
|
|
@@ -2359,10 +2359,10 @@ var WithLazy = /*#__PURE__*/function (_React$Component) {
|
|
|
2359
2359
|
return WithLazy;
|
|
2360
2360
|
}(React__default["default"].Component);
|
|
2361
2361
|
|
|
2362
|
-
function _createSuper$
|
|
2362
|
+
function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
2363
2363
|
|
|
2364
|
-
function _isNativeReflectConstruct$
|
|
2365
|
-
var DailyMotion = null;
|
|
2364
|
+
function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
2365
|
+
var DailyMotion$1 = null;
|
|
2366
2366
|
var loaderPromise$1 = null;
|
|
2367
2367
|
|
|
2368
2368
|
function loadLibrary$1() {
|
|
@@ -2370,7 +2370,7 @@ function loadLibrary$1() {
|
|
|
2370
2370
|
loaderPromise$1 = Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2371
2371
|
/* webpackChunkName: "qtc-react-dailymotion" */
|
|
2372
2372
|
'react-dailymotion')); }).then(function (DM) {
|
|
2373
|
-
DailyMotion = DM["default"];
|
|
2373
|
+
DailyMotion$1 = DM["default"];
|
|
2374
2374
|
})["catch"](function (err) {
|
|
2375
2375
|
console.log("Failed to load react-dailymotion", err);
|
|
2376
2376
|
return Promise.reject();
|
|
@@ -2381,13 +2381,13 @@ function loadLibrary$1() {
|
|
|
2381
2381
|
}
|
|
2382
2382
|
|
|
2383
2383
|
function isLibraryLoaded$1() {
|
|
2384
|
-
return DailyMotion !== null;
|
|
2384
|
+
return DailyMotion$1 !== null;
|
|
2385
2385
|
}
|
|
2386
2386
|
|
|
2387
2387
|
var CustomStoryElementDailyMotion = /*#__PURE__*/function (_React$Component) {
|
|
2388
2388
|
_inherits__default["default"](CustomStoryElementDailyMotion, _React$Component);
|
|
2389
2389
|
|
|
2390
|
-
var _super = /*#__PURE__*/_createSuper$
|
|
2390
|
+
var _super = /*#__PURE__*/_createSuper$c(CustomStoryElementDailyMotion);
|
|
2391
2391
|
|
|
2392
2392
|
function CustomStoryElementDailyMotion(props) {
|
|
2393
2393
|
var _this;
|
|
@@ -2460,7 +2460,7 @@ var CustomStoryElementDailyMotion = /*#__PURE__*/function (_React$Component) {
|
|
|
2460
2460
|
videoId = _getVideoID.id;
|
|
2461
2461
|
|
|
2462
2462
|
var dailymotionIframe = function dailymotionIframe() {
|
|
2463
|
-
return /*#__PURE__*/React__default["default"].createElement(DailyMotion, {
|
|
2463
|
+
return /*#__PURE__*/React__default["default"].createElement(DailyMotion$1, {
|
|
2464
2464
|
video: videoId,
|
|
2465
2465
|
opts: _this2.opts,
|
|
2466
2466
|
onPlay: _this2.onPlayCallback,
|
|
@@ -2486,7 +2486,7 @@ var CustomStoryElementDailyMotion = /*#__PURE__*/function (_React$Component) {
|
|
|
2486
2486
|
className: "dailymotion-iframe-wrapper"
|
|
2487
2487
|
}, dailymotionIframe()));
|
|
2488
2488
|
} else if (!this.props.loadIframeOnClick && isLibraryLoaded$1()) {
|
|
2489
|
-
return /*#__PURE__*/React__default["default"].createElement(DailyMotion, {
|
|
2489
|
+
return /*#__PURE__*/React__default["default"].createElement(DailyMotion$1, {
|
|
2490
2490
|
video: videoId,
|
|
2491
2491
|
opts: this.opts,
|
|
2492
2492
|
onPlay: this.onPlayCallback,
|
|
@@ -2508,6 +2508,75 @@ var StoryElementDailyMotion = function StoryElementDailyMotion(props) {
|
|
|
2508
2508
|
});
|
|
2509
2509
|
};
|
|
2510
2510
|
|
|
2511
|
+
function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
2512
|
+
|
|
2513
|
+
function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
2514
|
+
|
|
2515
|
+
var DailyMotion = /*#__PURE__*/function (_React$Component) {
|
|
2516
|
+
_inherits__default["default"](DailyMotion, _React$Component);
|
|
2517
|
+
|
|
2518
|
+
var _super = /*#__PURE__*/_createSuper$b(DailyMotion);
|
|
2519
|
+
|
|
2520
|
+
function DailyMotion(props) {
|
|
2521
|
+
var _this;
|
|
2522
|
+
|
|
2523
|
+
_classCallCheck__default["default"](this, DailyMotion);
|
|
2524
|
+
|
|
2525
|
+
_this = _super.call(this, props);
|
|
2526
|
+
|
|
2527
|
+
_defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "renderVideo", function () {
|
|
2528
|
+
_this.setState({
|
|
2529
|
+
showVideo: true
|
|
2530
|
+
});
|
|
2531
|
+
});
|
|
2532
|
+
|
|
2533
|
+
_defineProperty__default["default"](_assertThisInitialized__default["default"](_this), "dailymotionIframe", function () {
|
|
2534
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2535
|
+
className: "dailymotion-iframe-wrapper"
|
|
2536
|
+
}, atob__default["default"](_this.props.element["embed-js"]));
|
|
2537
|
+
});
|
|
2538
|
+
|
|
2539
|
+
_this.state = {
|
|
2540
|
+
showVideo: false
|
|
2541
|
+
};
|
|
2542
|
+
return _this;
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2545
|
+
_createClass__default["default"](DailyMotion, [{
|
|
2546
|
+
key: "render",
|
|
2547
|
+
value: function render() {
|
|
2548
|
+
var videoId = this.props.element.metadata["video-id"];
|
|
2549
|
+
|
|
2550
|
+
if (this.props.loadIframeOnClick) {
|
|
2551
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2552
|
+
className: "thumbnail-wrapper"
|
|
2553
|
+
}, !this.state.showVideo && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
2554
|
+
className: "dailymotion-playBtn",
|
|
2555
|
+
onClick: this.renderVideo,
|
|
2556
|
+
"aria-label": "Play Video"
|
|
2557
|
+
}), /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2558
|
+
className: "dailymotion-thumbnail",
|
|
2559
|
+
onClick: this.renderVideo,
|
|
2560
|
+
src: "https://www.dailymotion.com/thumbnail/video/".concat(videoId),
|
|
2561
|
+
alt: "daily-motion-video"
|
|
2562
|
+
})), this.state.showVideo && dailymotionIframe());
|
|
2563
|
+
} else if (!this.props.loadIframeOnClick) {
|
|
2564
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, dailymotionIframe());
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
}]);
|
|
2568
|
+
|
|
2569
|
+
return DailyMotion;
|
|
2570
|
+
}(React__default["default"].Component);
|
|
2571
|
+
|
|
2572
|
+
function DailyMotionEmbedScript(props) {
|
|
2573
|
+
return /*#__PURE__*/React__default["default"].createElement(WithLazy, {
|
|
2574
|
+
margin: "0px"
|
|
2575
|
+
}, function () {
|
|
2576
|
+
return /*#__PURE__*/React__default["default"].createElement(DailyMotion, props);
|
|
2577
|
+
});
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2511
2580
|
function _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
2512
2581
|
|
|
2513
2582
|
function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -3138,6 +3207,7 @@ var DEFAULT_TEMPLATES = {
|
|
|
3138
3207
|
image: StoryElementImage,
|
|
3139
3208
|
title: StoryElementTitle,
|
|
3140
3209
|
"dailymotion-video": StoryElementDailyMotion,
|
|
3210
|
+
"dailymotion-embed-script": DailyMotionEmbedScript,
|
|
3141
3211
|
"youtube-video": StoryElementYoutube,
|
|
3142
3212
|
"soundcloud-audio": StoryElementSoundCloud,
|
|
3143
3213
|
jsembed: StoryElementJsembed,
|
|
@@ -23,6 +23,7 @@ import { getQliticsSchema } from "../utils";
|
|
|
23
23
|
import { Link } from "./link";
|
|
24
24
|
import { ResponsiveImage } from "./responsive-image";
|
|
25
25
|
import StoryElementDailyMotion from "./story-elements/dailymotion";
|
|
26
|
+
import DailyMotionEmbedScript from "./story-elements/dailymotion-embed-script";
|
|
26
27
|
import JSEmbed from "./story-elements/jsembed";
|
|
27
28
|
import Polltype from "./story-elements/polltype";
|
|
28
29
|
import { Table } from "./story-elements/table";
|
|
@@ -219,6 +220,7 @@ var DEFAULT_TEMPLATES = {
|
|
|
219
220
|
image: StoryElementImage,
|
|
220
221
|
title: StoryElementTitle,
|
|
221
222
|
"dailymotion-video": StoryElementDailyMotion,
|
|
223
|
+
"dailymotion-embed-script": DailyMotionEmbedScript,
|
|
222
224
|
"youtube-video": StoryElementYoutube,
|
|
223
225
|
"soundcloud-audio": StoryElementSoundCloud,
|
|
224
226
|
jsembed: StoryElementJsembed,
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
+
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); 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); }; }
|
|
10
|
+
|
|
11
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
+
|
|
13
|
+
import atob from "atob";
|
|
14
|
+
import React from "react";
|
|
15
|
+
import { WithLazy } from "../with-lazy";
|
|
16
|
+
|
|
17
|
+
var DailyMotion = /*#__PURE__*/function (_React$Component) {
|
|
18
|
+
_inherits(DailyMotion, _React$Component);
|
|
19
|
+
|
|
20
|
+
var _super = /*#__PURE__*/_createSuper(DailyMotion);
|
|
21
|
+
|
|
22
|
+
function DailyMotion(props) {
|
|
23
|
+
var _this;
|
|
24
|
+
|
|
25
|
+
_classCallCheck(this, DailyMotion);
|
|
26
|
+
|
|
27
|
+
_this = _super.call(this, props);
|
|
28
|
+
|
|
29
|
+
_defineProperty(_assertThisInitialized(_this), "renderVideo", function () {
|
|
30
|
+
_this.setState({
|
|
31
|
+
showVideo: true
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
_defineProperty(_assertThisInitialized(_this), "dailymotionIframe", function () {
|
|
36
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: "dailymotion-iframe-wrapper"
|
|
38
|
+
}, atob(_this.props.element["embed-js"]));
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
_this.state = {
|
|
42
|
+
showVideo: false
|
|
43
|
+
};
|
|
44
|
+
return _this;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
_createClass(DailyMotion, [{
|
|
48
|
+
key: "render",
|
|
49
|
+
value: function render() {
|
|
50
|
+
var videoId = this.props.element.metadata["video-id"];
|
|
51
|
+
|
|
52
|
+
if (this.props.loadIframeOnClick) {
|
|
53
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: "thumbnail-wrapper"
|
|
55
|
+
}, !this.state.showVideo && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
|
|
56
|
+
className: "dailymotion-playBtn",
|
|
57
|
+
onClick: this.renderVideo,
|
|
58
|
+
"aria-label": "Play Video"
|
|
59
|
+
}), /*#__PURE__*/React.createElement("img", {
|
|
60
|
+
className: "dailymotion-thumbnail",
|
|
61
|
+
onClick: this.renderVideo,
|
|
62
|
+
src: "https://www.dailymotion.com/thumbnail/video/".concat(videoId),
|
|
63
|
+
alt: "daily-motion-video"
|
|
64
|
+
})), this.state.showVideo && dailymotionIframe());
|
|
65
|
+
} else if (!this.props.loadIframeOnClick) {
|
|
66
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, dailymotionIframe());
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}]);
|
|
70
|
+
|
|
71
|
+
return DailyMotion;
|
|
72
|
+
}(React.Component);
|
|
73
|
+
|
|
74
|
+
export default function DailyMotionEmbedScript(props) {
|
|
75
|
+
return /*#__PURE__*/React.createElement(WithLazy, {
|
|
76
|
+
margin: "0px"
|
|
77
|
+
}, function () {
|
|
78
|
+
return /*#__PURE__*/React.createElement(DailyMotion, props);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quintype/components",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0-dm-upgrade.1",
|
|
4
4
|
"description": "Components to help build Quintype Node.js apps",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"papaparse": "^5.3.1",
|
|
32
32
|
"prop-types": "^15.7.2",
|
|
33
33
|
"quintype-js": "^1.2.1",
|
|
34
|
-
"react": "^
|
|
34
|
+
"react": "^16.14.0",
|
|
35
35
|
"react-dailymotion": "^0.4.1",
|
|
36
36
|
"react-dfp": "quintype/react-dfp",
|
|
37
37
|
"react-redux": "^7.2.6",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"onchange": "^7.1.0",
|
|
75
75
|
"parcel-bundler": "^1.12.4",
|
|
76
76
|
"prettier": "2.4.1",
|
|
77
|
-
"react-dom": "^
|
|
77
|
+
"react-dom": "^16.14.0",
|
|
78
78
|
"react-testing-library": "^7.0.0",
|
|
79
79
|
"rimraf": "^3.0.2",
|
|
80
80
|
"rollup": "^2.59.0",
|