@quintype/arrow 3.15.1-perf.2 → 3.15.1-perf.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/atoms/Author/index.js +38 -29
- package/atoms/AuthorWithTime/index.js +83 -73
- package/atoms/CollectionName/index.js +40 -30
- package/atoms/ExtendedLoadMore/{index-d0f6c865.js → index-3976fac4.js} +59 -51
- package/atoms/ExtendedLoadMore/{index-1e444d20.js → index-3c4ac692.js} +243 -208
- package/atoms/ExtendedLoadMore/index-4ddfe28d.js +93 -0
- package/atoms/ExtendedLoadMore/{index-c61a16dc.js → index-5c8eda4a.js} +88 -80
- package/atoms/ExtendedLoadMore/{index-1256e453.js → index-6e083738.js} +60 -52
- package/atoms/ExtendedLoadMore/{index-fd651f70.js → index-6ecceae4.js} +58 -50
- package/atoms/ExtendedLoadMore/{index-4356ce04.js → index-9e0d32b7.js} +76 -68
- package/atoms/ExtendedLoadMore/{index-beed3a68.js → index-a5c95f84.js} +70 -62
- package/atoms/ExtendedLoadMore/{index-0519e570.js → index-b22f1843.js} +70 -62
- package/atoms/ExtendedLoadMore/{index-e4cf9cb7.js → index-b5936059.js} +72 -64
- package/atoms/ExtendedLoadMore/{index-aba6b278.js → index-bc129cb8.js} +57 -49
- package/atoms/ExtendedLoadMore/{index-ad3c83c3.js → index-e7cde739.js} +74 -46
- package/atoms/ExtendedLoadMore/{index-c2f73d18.js → index-fee73a14.js} +62 -54
- package/atoms/ExtendedLoadMore/index.js +13 -5
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +85 -76
- package/atoms/HeroImage/index.js +69 -60
- package/atoms/LoadmoreButton/index.js +32 -23
- package/atoms/ScrollSnap/index.js +72 -63
- package/atoms/SectionTag/index.js +34 -25
- package/atoms/Subheadline/index.js +31 -22
- package/atoms/TimeStamp/index.js +34 -24
- package/molecules/KeyEvents/index.js +72 -61
- package/molecules/PageIntroductionCard/index.js +43 -34
- package/molecules/SocialShareTemplate/index.js +97 -88
- package/molecules/StoryCard/index.js +242 -232
- package/molecules/StoryElementCard/index.js +512 -483
- package/molecules/StorycardContent/index.js +172 -162
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +345 -333
- package/rows/AsideCollection/index.js +340 -328
- package/rows/AstrologyCollection/index.js +321 -309
- package/rows/AuthorIntroductionCard/index.js +157 -148
- package/rows/AuthorsList/index.js +184 -174
- package/rows/CollectionFilter/index.js +361 -349
- package/rows/ElevenStories/index.js +357 -346
- package/rows/FourColFiveStories/index.js +304 -274
- package/rows/FourColGrid/index.js +351 -321
- package/rows/FourColPortraitStories/index.js +357 -327
- package/rows/FourColSixteenStories/index.js +288 -277
- package/rows/FourColTwelveStories/index.js +315 -304
- package/rows/FourStorySlider/index.js +358 -347
- package/rows/FourStorySliderPortrait/index.js +359 -348
- package/rows/FourTabbedBigStorySlider/index.js +322 -311
- package/rows/FullScreenSlider/index.js +336 -325
- package/rows/HalfScreenSlider/index.js +308 -297
- package/rows/ListComponent/index.js +322 -311
- package/rows/Listicles/index.js +150 -139
- package/rows/MagazineEditions/index.js +104 -93
- package/rows/MagazineHeaderCard/index.js +104 -93
- package/rows/MagazineWidget/index.js +326 -315
- package/rows/OneColStoryList/index.js +365 -335
- package/rows/OpinionCollection/index.js +250 -220
- package/rows/SixColSixStories/index.js +333 -303
- package/rows/StoryCollection/index.js +340 -328
- package/rows/TagIntroductionCard/index.js +30 -21
- package/rows/ThreeColFlexStories/index.js +348 -318
- package/rows/ThreeColFourteenStories/index.js +285 -274
- package/rows/ThreeColGrid/index.js +352 -322
- package/rows/ThreeColSevenStory/index.js +322 -311
- package/rows/ThreeColSixStories/index.js +323 -312
- package/rows/ThreeColTwelveStories/index.js +302 -291
- package/rows/TwoColFourStories/index.js +316 -305
- package/rows/TwoColFourStoryHighlight/index.js +317 -306
- package/rows/TwoColSevenStories/index.js +322 -311
- package/rows/TwoColSixStories/index.js +316 -305
- package/rows/TwoColTenStoriesSidebar/index.js +338 -327
- package/rows/TwoColThreeStories/index.js +316 -305
- package/story-elements/AlsoRead/index.js +70 -61
- package/story-elements/Attachment/index.js +40 -31
- package/story-elements/BigFact/index.js +35 -26
- package/story-elements/BlockQuote/index.js +61 -51
- package/story-elements/Blurb/index.js +36 -27
- package/story-elements/Image/index.js +113 -86
- package/story-elements/ImageGallery/index.js +98 -71
- package/story-elements/ImageSlideshow/index.js +147 -120
- package/story-elements/QuestionAnswer/index.js +55 -46
- package/story-elements/Quote/index.js +37 -28
- package/story-elements/Reference/index.js +40 -31
- package/story-elements/StoryElement/index.js +28 -19
- package/story-elements/Summary/index.js +40 -31
- package/story-elements/Text/index.js +34 -25
- package/story-elements/Video/index.js +29 -20
- package/story-templates/ListicleStoryTemplate/index.js +937 -908
- package/story-templates/LiveBlogStoryTemplate/index.js +942 -913
- package/story-templates/PhotoStoryTemplate/index.js +912 -883
- package/story-templates/TextStoryTemplate/index.js +931 -902
- package/story-templates/VideoStoryTemplate/index.js +897 -868
- package/atoms/ExtendedLoadMore/index-81eb3978.js +0 -86
|
@@ -1,10 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var PropTypes = require('prop-types');
|
|
7
|
+
var components = require('@quintype/components');
|
|
8
|
+
var Timeago = require('react-timeago');
|
|
9
|
+
var dateFnsTz = require('date-fns-tz');
|
|
10
|
+
var reactRedux = require('react-redux');
|
|
11
|
+
var ReactDOM = require('react-dom');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
function _interopNamespace(e) {
|
|
16
|
+
if (e && e.__esModule) return e;
|
|
17
|
+
var n = Object.create(null);
|
|
18
|
+
if (e) {
|
|
19
|
+
Object.keys(e).forEach(function (k) {
|
|
20
|
+
if (k !== 'default') {
|
|
21
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
22
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return e[k]; }
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
n["default"] = e;
|
|
30
|
+
return Object.freeze(n);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
34
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
35
|
+
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
36
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
8
37
|
|
|
9
38
|
/**
|
|
10
39
|
* Checks if `value` is classified as an `Array` object.
|
|
@@ -1345,21 +1374,21 @@ exports["default"] = _default;
|
|
|
1345
1374
|
|
|
1346
1375
|
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
1347
1376
|
|
|
1348
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
1377
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
1349
1378
|
|
|
1350
1379
|
var StateProvider = function StateProvider(RowComponent) {
|
|
1351
1380
|
return function (props) {
|
|
1352
1381
|
return (
|
|
1353
1382
|
/*#__PURE__*/
|
|
1354
1383
|
// eslint-disable-next-line react/prop-types
|
|
1355
|
-
|
|
1384
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
1356
1385
|
value: props.config
|
|
1357
|
-
}, /*#__PURE__*/
|
|
1386
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
1358
1387
|
);
|
|
1359
1388
|
};
|
|
1360
1389
|
};
|
|
1361
1390
|
var useStateValue = function useStateValue() {
|
|
1362
|
-
return useContext(StateContext);
|
|
1391
|
+
return React.useContext(StateContext);
|
|
1363
1392
|
};
|
|
1364
1393
|
|
|
1365
1394
|
function _typeof(obj) {
|
|
@@ -2688,15 +2717,15 @@ var isEmpty = function isEmpty(value) {
|
|
|
2688
2717
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2689
2718
|
_typeof(value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2690
2719
|
};
|
|
2691
|
-
|
|
2692
|
-
"sketches-host":
|
|
2693
|
-
"cdn-name":
|
|
2694
|
-
"cdn-image":
|
|
2720
|
+
PropTypes__default["default"].shape({
|
|
2721
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2722
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2723
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2695
2724
|
});
|
|
2696
|
-
|
|
2697
|
-
headline:
|
|
2698
|
-
"last-published-at":
|
|
2699
|
-
subheadline:
|
|
2725
|
+
PropTypes__default["default"].shape({
|
|
2726
|
+
headline: PropTypes__default["default"].string,
|
|
2727
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2728
|
+
subheadline: PropTypes__default["default"].string
|
|
2700
2729
|
});
|
|
2701
2730
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2702
2731
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2740,17 +2769,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2740
2769
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2741
2770
|
|
|
2742
2771
|
if (timezone && template === "story") {
|
|
2743
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2744
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2772
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2773
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2745
2774
|
timeZone: timezone
|
|
2746
2775
|
});
|
|
2747
2776
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2748
|
-
return /*#__PURE__*/
|
|
2777
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2749
2778
|
dateTime: formatZonedTime
|
|
2750
2779
|
}, timeStamp);
|
|
2751
2780
|
}
|
|
2752
2781
|
|
|
2753
|
-
return /*#__PURE__*/
|
|
2782
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2754
2783
|
date: date,
|
|
2755
2784
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2756
2785
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2764,7 +2793,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
2764
2793
|
_ref$color = _ref.color,
|
|
2765
2794
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
2766
2795
|
positionTop = _ref.positionTop;
|
|
2767
|
-
return /*#__PURE__*/
|
|
2796
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2768
2797
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2769
2798
|
width: width,
|
|
2770
2799
|
height: height,
|
|
@@ -2773,28 +2802,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
2773
2802
|
position: "relative",
|
|
2774
2803
|
top: positionTop
|
|
2775
2804
|
}
|
|
2776
|
-
}, /*#__PURE__*/
|
|
2805
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2777
2806
|
fill: "none",
|
|
2778
2807
|
fillRule: "evenodd",
|
|
2779
2808
|
stroke: "none",
|
|
2780
2809
|
strokeWidth: "1"
|
|
2781
|
-
}, /*#__PURE__*/
|
|
2810
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2782
2811
|
transform: "translate(8 8)"
|
|
2783
|
-
}, /*#__PURE__*/
|
|
2812
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2784
2813
|
d: "M0 0H24V24H0z"
|
|
2785
|
-
}), /*#__PURE__*/
|
|
2814
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2786
2815
|
fill: color,
|
|
2787
2816
|
fillRule: "nonzero",
|
|
2788
2817
|
transform: "translate(0 2)"
|
|
2789
|
-
}, /*#__PURE__*/
|
|
2818
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2790
2819
|
d: "M21.043 19.553c0-.743-.601-1.344-1.344-1.344h-15.4a1.343 1.343 0 100 2.688h15.4c.743 0 1.344-.603 1.344-1.344zM1.598 8.673c.022 0 .042 0 .064-.003l2.131 7.713h16.411l2.132-7.713c.022 0 .041.003.063.003a1.599 1.599 0 10-1.52-1.108L17.025 9.82 12.882 2.95a1.599 1.599 0 10-1.765 0L6.976 9.82 3.121 7.565a1.599 1.599 0 10-1.523 1.107z"
|
|
2791
2820
|
}))))));
|
|
2792
2821
|
};
|
|
2793
2822
|
CrownIcon.propTypes = {
|
|
2794
|
-
height:
|
|
2795
|
-
width:
|
|
2796
|
-
color:
|
|
2797
|
-
positionTop:
|
|
2823
|
+
height: PropTypes__default["default"].string,
|
|
2824
|
+
width: PropTypes__default["default"].string,
|
|
2825
|
+
color: PropTypes__default["default"].string,
|
|
2826
|
+
positionTop: PropTypes__default["default"].string
|
|
2798
2827
|
};
|
|
2799
2828
|
|
|
2800
2829
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -2803,7 +2832,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
2803
2832
|
_ref$color = _ref.color,
|
|
2804
2833
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
2805
2834
|
positionTop = _ref.positionTop;
|
|
2806
|
-
return /*#__PURE__*/
|
|
2835
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2807
2836
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2808
2837
|
width: width,
|
|
2809
2838
|
height: height,
|
|
@@ -2812,16 +2841,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
2812
2841
|
position: "relative",
|
|
2813
2842
|
top: positionTop
|
|
2814
2843
|
}
|
|
2815
|
-
}, /*#__PURE__*/
|
|
2844
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2816
2845
|
fill: "none",
|
|
2817
2846
|
fillRule: "evenodd",
|
|
2818
2847
|
stroke: "none",
|
|
2819
2848
|
strokeWidth: "1"
|
|
2820
|
-
}, /*#__PURE__*/
|
|
2849
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2821
2850
|
transform: "translate(8 8)"
|
|
2822
|
-
}, /*#__PURE__*/
|
|
2851
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2823
2852
|
d: "M0 0H24V24H0z"
|
|
2824
|
-
}), /*#__PURE__*/
|
|
2853
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2825
2854
|
fill: color,
|
|
2826
2855
|
fillRule: "nonzero",
|
|
2827
2856
|
d: "M12.71 4.364A6.54 6.54 0 000 6.545a6.54 6.54 0 0012.71 2.182h4.745v4.364h4.363V8.727H24V4.364H12.71zM6.544 8.727a2.181 2.181 0 110-4.362 2.181 2.181 0 010 4.362z",
|
|
@@ -2829,10 +2858,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
2829
2858
|
})))));
|
|
2830
2859
|
};
|
|
2831
2860
|
KeyIcon.propTypes = {
|
|
2832
|
-
height:
|
|
2833
|
-
width:
|
|
2834
|
-
color:
|
|
2835
|
-
positionTop:
|
|
2861
|
+
height: PropTypes__default["default"].string,
|
|
2862
|
+
width: PropTypes__default["default"].string,
|
|
2863
|
+
color: PropTypes__default["default"].string,
|
|
2864
|
+
positionTop: PropTypes__default["default"].string
|
|
2836
2865
|
};
|
|
2837
2866
|
|
|
2838
2867
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -2841,7 +2870,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
2841
2870
|
_ref$color = _ref.color,
|
|
2842
2871
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
2843
2872
|
positionTop = _ref.positionTop;
|
|
2844
|
-
return /*#__PURE__*/
|
|
2873
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2845
2874
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2846
2875
|
width: width,
|
|
2847
2876
|
height: height,
|
|
@@ -2850,28 +2879,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
2850
2879
|
position: "relative",
|
|
2851
2880
|
top: positionTop
|
|
2852
2881
|
}
|
|
2853
|
-
}, /*#__PURE__*/
|
|
2882
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2854
2883
|
fill: "none",
|
|
2855
2884
|
fillRule: "evenodd",
|
|
2856
2885
|
stroke: "none",
|
|
2857
2886
|
strokeWidth: "1"
|
|
2858
|
-
}, /*#__PURE__*/
|
|
2887
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2859
2888
|
transform: "translate(8 8)"
|
|
2860
|
-
}, /*#__PURE__*/
|
|
2889
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2861
2890
|
d: "M0 0H24V24H0z"
|
|
2862
|
-
}), /*#__PURE__*/
|
|
2891
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2863
2892
|
fill: color,
|
|
2864
2893
|
fillRule: "nonzero",
|
|
2865
2894
|
transform: "translate(3)"
|
|
2866
|
-
}, /*#__PURE__*/
|
|
2895
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2867
2896
|
d: "M15.692 9h-.747V6c0-3.31-2.681-6-5.978-6C5.67 0 2.989 2.69 2.989 6v3h-.747A2.249 2.249 0 000 11.25v10.5A2.249 2.249 0 002.242 24h13.45a2.249 2.249 0 002.242-2.25v-10.5A2.249 2.249 0 0015.692 9zM4.982 6c0-2.206 1.787-4 3.985-4s3.985 1.794 3.985 4v3h-7.97V6z"
|
|
2868
2897
|
}))))));
|
|
2869
2898
|
};
|
|
2870
2899
|
LockIcon.propTypes = {
|
|
2871
|
-
height:
|
|
2872
|
-
width:
|
|
2873
|
-
color:
|
|
2874
|
-
positionTop:
|
|
2900
|
+
height: PropTypes__default["default"].string,
|
|
2901
|
+
width: PropTypes__default["default"].string,
|
|
2902
|
+
color: PropTypes__default["default"].string,
|
|
2903
|
+
positionTop: PropTypes__default["default"].string
|
|
2875
2904
|
};
|
|
2876
2905
|
|
|
2877
2906
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -2881,7 +2910,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
2881
2910
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
2882
2911
|
_ref$positionTop = _ref.positionTop,
|
|
2883
2912
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
2884
|
-
return /*#__PURE__*/
|
|
2913
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2885
2914
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2886
2915
|
width: width,
|
|
2887
2916
|
height: height,
|
|
@@ -2890,21 +2919,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
2890
2919
|
position: "relative",
|
|
2891
2920
|
top: positionTop
|
|
2892
2921
|
}
|
|
2893
|
-
}, /*#__PURE__*/
|
|
2922
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2894
2923
|
fill: "none",
|
|
2895
2924
|
fillRule: "evenodd",
|
|
2896
2925
|
stroke: "none",
|
|
2897
2926
|
strokeWidth: "1"
|
|
2898
|
-
}, /*#__PURE__*/
|
|
2927
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2899
2928
|
fill: color,
|
|
2900
2929
|
d: "M20 26L12.946577 29.7082039 14.2936609 21.854102 8.5873218 16.2917961 16.4732885 15.145898 20 8 23.5267115 15.145898 31.4126782 16.2917961 25.7063391 21.854102 27.053423 29.7082039z"
|
|
2901
2930
|
}))));
|
|
2902
2931
|
};
|
|
2903
2932
|
StarIcon.propTypes = {
|
|
2904
|
-
height:
|
|
2905
|
-
width:
|
|
2906
|
-
color:
|
|
2907
|
-
positionTop:
|
|
2933
|
+
height: PropTypes__default["default"].string,
|
|
2934
|
+
width: PropTypes__default["default"].string,
|
|
2935
|
+
color: PropTypes__default["default"].string,
|
|
2936
|
+
positionTop: PropTypes__default["default"].string
|
|
2908
2937
|
};
|
|
2909
2938
|
|
|
2910
2939
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -2916,7 +2945,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2916
2945
|
|
|
2917
2946
|
switch (iconType) {
|
|
2918
2947
|
case "crown":
|
|
2919
|
-
return /*#__PURE__*/
|
|
2948
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
2920
2949
|
width: width,
|
|
2921
2950
|
height: height,
|
|
2922
2951
|
color: color,
|
|
@@ -2924,7 +2953,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2924
2953
|
});
|
|
2925
2954
|
|
|
2926
2955
|
case "lock":
|
|
2927
|
-
return /*#__PURE__*/
|
|
2956
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
2928
2957
|
width: width,
|
|
2929
2958
|
height: height,
|
|
2930
2959
|
color: color,
|
|
@@ -2932,7 +2961,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2932
2961
|
});
|
|
2933
2962
|
|
|
2934
2963
|
case "key":
|
|
2935
|
-
return /*#__PURE__*/
|
|
2964
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
2936
2965
|
width: width,
|
|
2937
2966
|
height: height,
|
|
2938
2967
|
color: color,
|
|
@@ -2940,7 +2969,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2940
2969
|
});
|
|
2941
2970
|
|
|
2942
2971
|
default:
|
|
2943
|
-
return /*#__PURE__*/
|
|
2972
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
2944
2973
|
width: width,
|
|
2945
2974
|
height: height,
|
|
2946
2975
|
color: color,
|
|
@@ -2949,21 +2978,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2949
2978
|
}
|
|
2950
2979
|
};
|
|
2951
2980
|
PremiumStoryIcon.propTypes = {
|
|
2952
|
-
width:
|
|
2953
|
-
height:
|
|
2954
|
-
color:
|
|
2955
|
-
iconType:
|
|
2956
|
-
positionTop:
|
|
2981
|
+
width: PropTypes__default["default"].string,
|
|
2982
|
+
height: PropTypes__default["default"].string,
|
|
2983
|
+
color: PropTypes__default["default"].string,
|
|
2984
|
+
iconType: PropTypes__default["default"].string,
|
|
2985
|
+
positionTop: PropTypes__default["default"].string
|
|
2957
2986
|
};
|
|
2958
2987
|
|
|
2959
2988
|
function LiveIcon() {
|
|
2960
|
-
return /*#__PURE__*/
|
|
2989
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2961
2990
|
className: "live-icon",
|
|
2962
2991
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2963
2992
|
width: "25",
|
|
2964
2993
|
height: "24",
|
|
2965
2994
|
viewBox: "0 0 25 24"
|
|
2966
|
-
}, /*#__PURE__*/
|
|
2995
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2967
2996
|
fill: "#ff5858",
|
|
2968
2997
|
d: "M12 18a6 6 0 110-12 6 6 0 010 12zm0 2.5a8.5 8.5 0 110-17 8.5 8.5 0 010 17zm0-1a7.5 7.5 0 100-15 7.5 7.5 0 000 15z"
|
|
2969
2998
|
}));
|
|
@@ -3020,37 +3049,37 @@ var Headline = function Headline(_ref) {
|
|
|
3020
3049
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3021
3050
|
var iconSize = "24px";
|
|
3022
3051
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
3023
|
-
return /*#__PURE__*/
|
|
3052
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3024
3053
|
"data-test-id": "headline",
|
|
3025
3054
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$d)
|
|
3026
|
-
}, premiumStory && /*#__PURE__*/
|
|
3055
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3027
3056
|
width: iconSize,
|
|
3028
3057
|
height: iconSize,
|
|
3029
3058
|
color: iconColor,
|
|
3030
3059
|
iconType: iconStyle,
|
|
3031
3060
|
positionTop: positionHeadline()
|
|
3032
|
-
}), isLink ? /*#__PURE__*/
|
|
3061
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3033
3062
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3034
3063
|
externalLink: isExternalStory(story),
|
|
3035
3064
|
"aria-label": "headline"
|
|
3036
|
-
}, /*#__PURE__*/
|
|
3065
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3037
3066
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$d)
|
|
3038
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3067
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3039
3068
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$d)
|
|
3040
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3069
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3041
3070
|
};
|
|
3042
3071
|
Headline.propTypes = {
|
|
3043
3072
|
/** The Story Object from the API response */
|
|
3044
|
-
story:
|
|
3073
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3045
3074
|
|
|
3046
3075
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3047
|
-
headerLevel:
|
|
3048
|
-
premiumStoryIconConfig:
|
|
3049
|
-
iconColor:
|
|
3050
|
-
iconType:
|
|
3051
|
-
enablePremiumStoryIcon:
|
|
3076
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3077
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
3078
|
+
iconColor: PropTypes__default["default"].string,
|
|
3079
|
+
iconType: PropTypes__default["default"].string,
|
|
3080
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3052
3081
|
}),
|
|
3053
|
-
isLink:
|
|
3082
|
+
isLink: PropTypes__default["default"].bool
|
|
3054
3083
|
};
|
|
3055
3084
|
Headline.defaultProps = {
|
|
3056
3085
|
headerLevel: "6",
|
|
@@ -3077,7 +3106,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3077
3106
|
var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
|
|
3078
3107
|
if (!subheadline) return null;
|
|
3079
3108
|
var textColor = getTextColor(config.theme);
|
|
3080
|
-
return /*#__PURE__*/
|
|
3109
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3081
3110
|
style: {
|
|
3082
3111
|
WebkitLineClamp: lineClamp
|
|
3083
3112
|
},
|
|
@@ -3087,15 +3116,15 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3087
3116
|
};
|
|
3088
3117
|
Subheadline.propTypes = {
|
|
3089
3118
|
/** The Story Object from the API response */
|
|
3090
|
-
story:
|
|
3119
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3091
3120
|
// Restricts the number of lines for subheadline.
|
|
3092
|
-
lineClamp:
|
|
3121
|
+
lineClamp: PropTypes__default["default"].number,
|
|
3093
3122
|
|
|
3094
3123
|
/** Number of characters to truncate the subheadline */
|
|
3095
|
-
truncateChars:
|
|
3096
|
-
clazzName:
|
|
3097
|
-
forceShowAtom:
|
|
3098
|
-
showFullContent:
|
|
3124
|
+
truncateChars: PropTypes__default["default"].number,
|
|
3125
|
+
clazzName: PropTypes__default["default"].string,
|
|
3126
|
+
forceShowAtom: PropTypes__default["default"].bool,
|
|
3127
|
+
showFullContent: PropTypes__default["default"].bool
|
|
3099
3128
|
};
|
|
3100
3129
|
Subheadline.defaultProps = {
|
|
3101
3130
|
forceShowAtom: false,
|
|
@@ -3121,18 +3150,18 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3121
3150
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3122
3151
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3123
3152
|
var textColor = getTextColor(configState.theme);
|
|
3124
|
-
return /*#__PURE__*/
|
|
3153
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3125
3154
|
"data-test-id": "publish-time",
|
|
3126
3155
|
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$b)
|
|
3127
|
-
}, /*#__PURE__*/
|
|
3156
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3128
3157
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3129
3158
|
}, getTimeStamp(time, formatter, config))));
|
|
3130
3159
|
};
|
|
3131
3160
|
TimeStamp.propTypes = {
|
|
3132
3161
|
/** The Story Object from the API response */
|
|
3133
|
-
story:
|
|
3134
|
-
isBottom:
|
|
3135
|
-
config:
|
|
3162
|
+
story: PropTypes__default["default"].object,
|
|
3163
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3164
|
+
config: PropTypes__default["default"].object
|
|
3136
3165
|
};
|
|
3137
3166
|
|
|
3138
3167
|
var _styleModuleImportMap$a = {
|
|
@@ -3175,10 +3204,10 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3175
3204
|
return null;
|
|
3176
3205
|
}
|
|
3177
3206
|
|
|
3178
|
-
return /*#__PURE__*/
|
|
3207
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3179
3208
|
"data-test-id": "author-image",
|
|
3180
3209
|
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$a)
|
|
3181
|
-
}, /*#__PURE__*/
|
|
3210
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3182
3211
|
slug: avatarS3Key,
|
|
3183
3212
|
"aspect-ratio": [1, 1],
|
|
3184
3213
|
defaultWidth: 400,
|
|
@@ -3186,14 +3215,14 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3186
3215
|
auto: ["format", "compress"]
|
|
3187
3216
|
},
|
|
3188
3217
|
alt: authorName
|
|
3189
|
-
}) : /*#__PURE__*/
|
|
3218
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3190
3219
|
src: avatarUrl
|
|
3191
3220
|
})));
|
|
3192
3221
|
};
|
|
3193
3222
|
|
|
3194
3223
|
var isPrefix = function isPrefix(dir) {
|
|
3195
3224
|
if (prefix) {
|
|
3196
|
-
return /*#__PURE__*/
|
|
3225
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3197
3226
|
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$a)
|
|
3198
3227
|
}, prefix);
|
|
3199
3228
|
}
|
|
@@ -3201,11 +3230,11 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3201
3230
|
return !hideAuthorImage && authorImage(dir);
|
|
3202
3231
|
};
|
|
3203
3232
|
|
|
3204
|
-
return /*#__PURE__*/
|
|
3233
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3205
3234
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3206
3235
|
"aria-label": "author-name",
|
|
3207
3236
|
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$a)
|
|
3208
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
3237
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3209
3238
|
"data-test-id": "author-name",
|
|
3210
3239
|
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$a)
|
|
3211
3240
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
@@ -3217,18 +3246,18 @@ function mapStateToProps$1(state) {
|
|
|
3217
3246
|
};
|
|
3218
3247
|
}
|
|
3219
3248
|
|
|
3220
|
-
var Author = connect(mapStateToProps$1)(AuthorBase);
|
|
3249
|
+
var Author = reactRedux.connect(mapStateToProps$1)(AuthorBase);
|
|
3221
3250
|
AuthorBase.propTypes = {
|
|
3222
3251
|
/** The Story Object from the API response */
|
|
3223
|
-
story:
|
|
3252
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3224
3253
|
|
|
3225
3254
|
/** Hide Author Avatar Image */
|
|
3226
|
-
hideAuthorImage:
|
|
3255
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3227
3256
|
// fix Author bottom of the storyCard
|
|
3228
|
-
isBottom:
|
|
3257
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3229
3258
|
// fix prefix before the author name
|
|
3230
|
-
prefix:
|
|
3231
|
-
config:
|
|
3259
|
+
prefix: PropTypes__default["default"].string,
|
|
3260
|
+
config: PropTypes__default["default"].object
|
|
3232
3261
|
};
|
|
3233
3262
|
AuthorBase.defaultProps = {
|
|
3234
3263
|
hideAuthorImage: false,
|
|
@@ -3249,14 +3278,14 @@ var Dot = function Dot(_ref) {
|
|
|
3249
3278
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3250
3279
|
_ref$color = _ref.color,
|
|
3251
3280
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3252
|
-
return /*#__PURE__*/
|
|
3281
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3253
3282
|
className: _getClassName(color, _styleModuleImportMap$9)
|
|
3254
|
-
}, /*#__PURE__*/
|
|
3283
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3255
3284
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3256
3285
|
width: width,
|
|
3257
3286
|
height: height,
|
|
3258
3287
|
viewBox: "0 0 3 3"
|
|
3259
|
-
}, /*#__PURE__*/
|
|
3288
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3260
3289
|
cx: "87",
|
|
3261
3290
|
cy: "9",
|
|
3262
3291
|
r: "1",
|
|
@@ -3267,9 +3296,9 @@ var Dot = function Dot(_ref) {
|
|
|
3267
3296
|
};
|
|
3268
3297
|
Dot.propTypes = {
|
|
3269
3298
|
/** height , width and color of the dot icon */
|
|
3270
|
-
color:
|
|
3271
|
-
width:
|
|
3272
|
-
height:
|
|
3299
|
+
color: PropTypes__default["default"].string,
|
|
3300
|
+
width: PropTypes__default["default"].string,
|
|
3301
|
+
height: PropTypes__default["default"].string
|
|
3273
3302
|
};
|
|
3274
3303
|
|
|
3275
3304
|
var _styleModuleImportMap$8 = {
|
|
@@ -3285,22 +3314,22 @@ var Divider = function Divider(_ref) {
|
|
|
3285
3314
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3286
3315
|
_ref$color = _ref.color,
|
|
3287
3316
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3288
|
-
return /*#__PURE__*/
|
|
3317
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3289
3318
|
className: _getClassName(color, _styleModuleImportMap$8)
|
|
3290
|
-
}, /*#__PURE__*/
|
|
3319
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3291
3320
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3292
3321
|
width: width,
|
|
3293
3322
|
height: height
|
|
3294
|
-
}, /*#__PURE__*/
|
|
3323
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3295
3324
|
fill: "inherit",
|
|
3296
3325
|
d: "M0 0h1v10H0z"
|
|
3297
3326
|
})));
|
|
3298
3327
|
};
|
|
3299
3328
|
Divider.propTypes = {
|
|
3300
3329
|
/** height , width and color of the dot icon */
|
|
3301
|
-
color:
|
|
3302
|
-
width:
|
|
3303
|
-
height:
|
|
3330
|
+
color: PropTypes__default["default"].string,
|
|
3331
|
+
width: PropTypes__default["default"].string,
|
|
3332
|
+
height: PropTypes__default["default"].string
|
|
3304
3333
|
};
|
|
3305
3334
|
|
|
3306
3335
|
var _styleModuleImportMap$7 = {
|
|
@@ -3323,23 +3352,23 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3323
3352
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3324
3353
|
if (!showReadTime || !readTime) return null;
|
|
3325
3354
|
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
3326
|
-
return /*#__PURE__*/
|
|
3355
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3327
3356
|
"data-test-id": "read-time",
|
|
3328
3357
|
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$7)
|
|
3329
|
-
}, /*#__PURE__*/
|
|
3358
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3330
3359
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3331
|
-
}, /*#__PURE__*/
|
|
3360
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3332
3361
|
color: textColor
|
|
3333
|
-
})), /*#__PURE__*/
|
|
3362
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3334
3363
|
};
|
|
3335
3364
|
ReadTime.propTypes = {
|
|
3336
|
-
story:
|
|
3337
|
-
"read-time":
|
|
3365
|
+
story: PropTypes__default["default"].shape({
|
|
3366
|
+
"read-time": PropTypes__default["default"].number
|
|
3338
3367
|
}),
|
|
3339
|
-
opts:
|
|
3340
|
-
showReadTime:
|
|
3368
|
+
opts: PropTypes__default["default"].shape({
|
|
3369
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3341
3370
|
}),
|
|
3342
|
-
isLightTheme:
|
|
3371
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3343
3372
|
};
|
|
3344
3373
|
|
|
3345
3374
|
var _styleModuleImportMap$6 = {
|
|
@@ -3370,33 +3399,33 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3370
3399
|
|
|
3371
3400
|
var getSeparator = function getSeparator() {
|
|
3372
3401
|
if (separator === "divider") {
|
|
3373
|
-
return /*#__PURE__*/
|
|
3402
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3374
3403
|
color: textColor
|
|
3375
3404
|
});
|
|
3376
3405
|
}
|
|
3377
3406
|
|
|
3378
|
-
return /*#__PURE__*/
|
|
3407
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3379
3408
|
color: textColor
|
|
3380
3409
|
});
|
|
3381
3410
|
};
|
|
3382
3411
|
|
|
3383
3412
|
var getTimeStamp = function getTimeStamp() {
|
|
3384
3413
|
if (!isTime) return null;
|
|
3385
|
-
return /*#__PURE__*/
|
|
3414
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3386
3415
|
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$6)
|
|
3387
|
-
}, getSeparator()), /*#__PURE__*/
|
|
3416
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3388
3417
|
story: story,
|
|
3389
3418
|
config: config
|
|
3390
|
-
}), isReadTime && /*#__PURE__*/
|
|
3419
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3391
3420
|
story: story,
|
|
3392
3421
|
opts: config,
|
|
3393
3422
|
isLightTheme: isLightTheme
|
|
3394
3423
|
}));
|
|
3395
3424
|
};
|
|
3396
3425
|
|
|
3397
|
-
return /*#__PURE__*/
|
|
3426
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3398
3427
|
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$6)
|
|
3399
|
-
}, isAuthor ? /*#__PURE__*/
|
|
3428
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3400
3429
|
story: story,
|
|
3401
3430
|
isBottom: true,
|
|
3402
3431
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3404,19 +3433,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3404
3433
|
}), getTimeStamp()) : getTimeStamp());
|
|
3405
3434
|
};
|
|
3406
3435
|
AuthorWithTime.propTypes = {
|
|
3407
|
-
story:
|
|
3436
|
+
story: PropTypes__default["default"].object,
|
|
3408
3437
|
|
|
3409
3438
|
/** Style of separator between the Author & Timestamp */
|
|
3410
|
-
separator:
|
|
3439
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3411
3440
|
|
|
3412
3441
|
/** hide the author image */
|
|
3413
|
-
hideAuthorImage:
|
|
3442
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3414
3443
|
// fix author and time at the end
|
|
3415
|
-
isBottom:
|
|
3444
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3416
3445
|
// fix prefix before the author name
|
|
3417
|
-
prefix:
|
|
3418
|
-
config:
|
|
3419
|
-
isLightTheme:
|
|
3446
|
+
prefix: PropTypes__default["default"].string,
|
|
3447
|
+
config: PropTypes__default["default"].object,
|
|
3448
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3420
3449
|
};
|
|
3421
3450
|
AuthorWithTime.defaultProps = {
|
|
3422
3451
|
separator: "dot",
|
|
@@ -3494,27 +3523,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3494
3523
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
3495
3524
|
_ref$iconColor = _ref.iconColor,
|
|
3496
3525
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
3497
|
-
return /*#__PURE__*/
|
|
3526
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3498
3527
|
width: width,
|
|
3499
3528
|
height: height,
|
|
3500
3529
|
viewBox: "0 0 102 76",
|
|
3501
3530
|
version: "1.1"
|
|
3502
|
-
}, /*#__PURE__*/
|
|
3531
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3503
3532
|
id: "demo-home-copy",
|
|
3504
3533
|
stroke: "none",
|
|
3505
3534
|
strokeWidth: "1",
|
|
3506
3535
|
fill: "none",
|
|
3507
3536
|
fillRule: "evenodd",
|
|
3508
3537
|
transform: "translate(-377.000000, -314.000000)"
|
|
3509
|
-
}, /*#__PURE__*/
|
|
3538
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3510
3539
|
id: "Group-13",
|
|
3511
3540
|
transform: "translate(377.000000, 314.000000)"
|
|
3512
|
-
}, /*#__PURE__*/
|
|
3541
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3513
3542
|
d: "M43.2,49.7 L62.2,19.2 L87.2,59.4 L17,59.4 L32.8,39.4 L43.2,49.7 Z M29.9,28.6 C25.8683213,28.6 22.6,25.3316787 22.6,21.3 C22.6,17.2683213 25.8683213,14 29.9,14 C33.9316787,14 37.2,17.2683213 37.2,21.3 C37.2,25.3316787 33.9316787,28.6 29.9,28.6 Z",
|
|
3514
3543
|
id: "Combined-Shape",
|
|
3515
3544
|
fill: iconColor,
|
|
3516
3545
|
fillRule: "nonzero"
|
|
3517
|
-
}), /*#__PURE__*/
|
|
3546
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3518
3547
|
id: "Rectangle-19",
|
|
3519
3548
|
stroke: iconColor,
|
|
3520
3549
|
strokeWidth: "3",
|
|
@@ -3526,24 +3555,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3526
3555
|
}))));
|
|
3527
3556
|
};
|
|
3528
3557
|
ImageFallbackIcon.propTypes = {
|
|
3529
|
-
width:
|
|
3530
|
-
height:
|
|
3531
|
-
iconColor:
|
|
3558
|
+
width: PropTypes__default["default"].object,
|
|
3559
|
+
height: PropTypes__default["default"].object,
|
|
3560
|
+
iconColor: PropTypes__default["default"].object
|
|
3532
3561
|
};
|
|
3533
3562
|
|
|
3534
3563
|
var imageFallback = function imageFallback() {
|
|
3535
|
-
return /*#__PURE__*/
|
|
3564
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3536
3565
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
3537
|
-
}, /*#__PURE__*/
|
|
3566
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3538
3567
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
3539
|
-
}, /*#__PURE__*/
|
|
3568
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
3540
3569
|
};
|
|
3541
3570
|
|
|
3542
3571
|
var FallbackImage = function FallbackImage(_ref) {
|
|
3543
3572
|
var slug = _ref.slug;
|
|
3544
3573
|
|
|
3545
3574
|
if (slug) {
|
|
3546
|
-
return /*#__PURE__*/
|
|
3575
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3547
3576
|
href: slug,
|
|
3548
3577
|
"aria-label": "image-fallback"
|
|
3549
3578
|
}, imageFallback());
|
|
@@ -3552,23 +3581,23 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
3552
3581
|
}
|
|
3553
3582
|
};
|
|
3554
3583
|
FallbackImage.propTypes = {
|
|
3555
|
-
slug:
|
|
3584
|
+
slug: PropTypes__default["default"].string
|
|
3556
3585
|
};
|
|
3557
3586
|
|
|
3558
3587
|
var HyperLinkIcon = function HyperLinkIcon() {
|
|
3559
|
-
return /*#__PURE__*/
|
|
3588
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3560
3589
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3561
3590
|
width: "36",
|
|
3562
3591
|
height: "28"
|
|
3563
|
-
}, /*#__PURE__*/
|
|
3592
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3564
3593
|
fill: "none",
|
|
3565
3594
|
fillRule: "evenodd"
|
|
3566
|
-
}, /*#__PURE__*/
|
|
3595
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3567
3596
|
width: "36",
|
|
3568
3597
|
height: "28",
|
|
3569
3598
|
fill: "#3D6FCF",
|
|
3570
3599
|
rx: "4"
|
|
3571
|
-
}), /*#__PURE__*/
|
|
3600
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3572
3601
|
stroke: "#FFF",
|
|
3573
3602
|
strokeLinecap: "round",
|
|
3574
3603
|
strokeLinejoin: "round",
|
|
@@ -3581,16 +3610,16 @@ var HyperLink = function HyperLink(_ref) {
|
|
|
3581
3610
|
var _ref$hyperLink = _ref.hyperLink,
|
|
3582
3611
|
hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
|
|
3583
3612
|
if (!hyperLink) return null;
|
|
3584
|
-
return /*#__PURE__*/
|
|
3613
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3585
3614
|
href: hyperLink,
|
|
3586
3615
|
"aria-label": "hyperlink-button",
|
|
3587
3616
|
className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
|
|
3588
3617
|
target: "_blank",
|
|
3589
3618
|
rel: "noopener noreferrer"
|
|
3590
|
-
}, /*#__PURE__*/
|
|
3619
|
+
}, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
|
|
3591
3620
|
};
|
|
3592
3621
|
HyperLink.propTypes = {
|
|
3593
|
-
hyperLink:
|
|
3622
|
+
hyperLink: PropTypes__default["default"].string
|
|
3594
3623
|
};
|
|
3595
3624
|
|
|
3596
3625
|
var _styleModuleImportMap$5 = {
|
|
@@ -3626,7 +3655,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3626
3655
|
StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
|
|
3627
3656
|
return null;
|
|
3628
3657
|
} : _config$StoryTemplate;
|
|
3629
|
-
var showImagePlaceholder = useSelector(function (state) {
|
|
3658
|
+
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3630
3659
|
return get_1(state, ["qt", "config", "showPlaceholder"]);
|
|
3631
3660
|
});
|
|
3632
3661
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
@@ -3662,37 +3691,37 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3662
3691
|
var fallbackImage = function fallbackImage() {
|
|
3663
3692
|
if (!slug) {
|
|
3664
3693
|
if (fallbackImageUrl && !isStoryPageImage) {
|
|
3665
|
-
return /*#__PURE__*/
|
|
3694
|
+
return /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3666
3695
|
style: {
|
|
3667
3696
|
paddingTop: imagePadding + "%"
|
|
3668
3697
|
},
|
|
3669
3698
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$5)
|
|
3670
|
-
}, /*#__PURE__*/
|
|
3699
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3671
3700
|
className: "qt-image",
|
|
3672
3701
|
"data-src": "".concat(fallbackImageUrl),
|
|
3673
3702
|
alt: "image-fallback"
|
|
3674
3703
|
}));
|
|
3675
3704
|
}
|
|
3676
3705
|
|
|
3677
|
-
return /*#__PURE__*/
|
|
3706
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3678
3707
|
"data-test-id": "arr--fallback-hero-image",
|
|
3679
3708
|
style: {
|
|
3680
3709
|
paddingTop: imagePadding + "%"
|
|
3681
3710
|
},
|
|
3682
3711
|
className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$5)
|
|
3683
|
-
}, /*#__PURE__*/
|
|
3712
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3684
3713
|
storyTemplate: story["story-template"]
|
|
3685
|
-
}), /*#__PURE__*/
|
|
3714
|
+
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
3686
3715
|
}
|
|
3687
3716
|
|
|
3688
|
-
return /*#__PURE__*/
|
|
3717
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3689
3718
|
style: {
|
|
3690
3719
|
paddingTop: imagePadding + "%"
|
|
3691
3720
|
},
|
|
3692
3721
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$5)
|
|
3693
|
-
}, /*#__PURE__*/
|
|
3722
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3694
3723
|
storyTemplate: story["story-template"]
|
|
3695
|
-
}), /*#__PURE__*/
|
|
3724
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
3696
3725
|
story: story,
|
|
3697
3726
|
aspectRatio: imageAspectRatio,
|
|
3698
3727
|
defaultWidth: defaultWidth,
|
|
@@ -3701,15 +3730,15 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3701
3730
|
auto: ["format", "compress"],
|
|
3702
3731
|
fit: "max"
|
|
3703
3732
|
}
|
|
3704
|
-
})), isStoryPageImage && hyperLink && /*#__PURE__*/
|
|
3733
|
+
})), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
|
|
3705
3734
|
hyperLink: hyperLink
|
|
3706
3735
|
}));
|
|
3707
3736
|
};
|
|
3708
3737
|
|
|
3709
|
-
return story && (isStoryPageImage ? /*#__PURE__*/
|
|
3738
|
+
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3710
3739
|
"data-test-id": "arr--hero-image",
|
|
3711
3740
|
className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$5)
|
|
3712
|
-
}, fallbackImage()) : /*#__PURE__*/
|
|
3741
|
+
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3713
3742
|
"data-test-id": "arr--hero-image",
|
|
3714
3743
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3715
3744
|
externalLink: isExternalStory(story),
|
|
@@ -3719,30 +3748,30 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3719
3748
|
};
|
|
3720
3749
|
HeroImage.propTypes = {
|
|
3721
3750
|
/** The Story Object from the API response */
|
|
3722
|
-
story:
|
|
3751
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3723
3752
|
|
|
3724
3753
|
/** Removes the Hero Image padding for the image to bleed over the margin */
|
|
3725
|
-
FullBleed:
|
|
3754
|
+
FullBleed: PropTypes__default["default"].bool,
|
|
3726
3755
|
|
|
3727
3756
|
/** The default width for the image, in case the browser does not support srcset */
|
|
3728
|
-
defaultWidth:
|
|
3757
|
+
defaultWidth: PropTypes__default["default"].number,
|
|
3729
3758
|
|
|
3730
3759
|
/** The list of available widths */
|
|
3731
|
-
widths:
|
|
3760
|
+
widths: PropTypes__default["default"].array,
|
|
3732
3761
|
// fatch the correct hero image
|
|
3733
|
-
aspectRatio:
|
|
3762
|
+
aspectRatio: PropTypes__default["default"].array,
|
|
3734
3763
|
// Hints for the browser to choose the best size
|
|
3735
3764
|
|
|
3736
3765
|
/** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
|
|
3737
|
-
isHorizontal:
|
|
3766
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3738
3767
|
|
|
3739
3768
|
/** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
|
|
3740
|
-
isHorizontalMobile:
|
|
3769
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3741
3770
|
// this prop is responsive for rendering fallback image on story page
|
|
3742
|
-
defaultFallback:
|
|
3743
|
-
isHorizontalWithImageLast:
|
|
3744
|
-
isStoryPageImage:
|
|
3745
|
-
config:
|
|
3771
|
+
defaultFallback: PropTypes__default["default"].bool,
|
|
3772
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool,
|
|
3773
|
+
isStoryPageImage: PropTypes__default["default"].bool,
|
|
3774
|
+
config: PropTypes__default["default"].object
|
|
3746
3775
|
};
|
|
3747
3776
|
HeroImage.defaultProps = {
|
|
3748
3777
|
FullBleed: true,
|
|
@@ -3792,22 +3821,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3792
3821
|
}
|
|
3793
3822
|
|
|
3794
3823
|
if (!isSection) return null;
|
|
3795
|
-
return /*#__PURE__*/
|
|
3824
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3796
3825
|
href: getUrl,
|
|
3797
3826
|
className: "arrow-component arr--section-name",
|
|
3798
3827
|
"aria-label": "section-name"
|
|
3799
|
-
}, /*#__PURE__*/
|
|
3828
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3800
3829
|
"data-test-id": "sectionTag",
|
|
3801
3830
|
style: {
|
|
3802
3831
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
3803
3832
|
},
|
|
3804
3833
|
className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$4)
|
|
3805
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
3834
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3806
3835
|
className: "section-m_border-left__2oUyp",
|
|
3807
3836
|
style: {
|
|
3808
3837
|
color: sectionTagBorderColor
|
|
3809
3838
|
}
|
|
3810
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
3839
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3811
3840
|
className: "section-m_border-bottom__3cRoD",
|
|
3812
3841
|
style: {
|
|
3813
3842
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -3816,13 +3845,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3816
3845
|
};
|
|
3817
3846
|
SectionTag.propTypes = {
|
|
3818
3847
|
/** The Story Object from the API response */
|
|
3819
|
-
story:
|
|
3848
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3820
3849
|
|
|
3821
3850
|
/** The style template for section tag */
|
|
3822
|
-
template:
|
|
3823
|
-
borderColor:
|
|
3824
|
-
solidBorderColor:
|
|
3825
|
-
isLightTheme:
|
|
3851
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
3852
|
+
borderColor: PropTypes__default["default"].string,
|
|
3853
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
3854
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3826
3855
|
};
|
|
3827
3856
|
SectionTag.defaultProps = {
|
|
3828
3857
|
template: "",
|
|
@@ -3871,7 +3900,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
3871
3900
|
prefix = _ref.prefix,
|
|
3872
3901
|
config = _ref.config,
|
|
3873
3902
|
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
3874
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/
|
|
3903
|
+
if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
3875
3904
|
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
3876
3905
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
3877
3906
|
|
|
@@ -3881,7 +3910,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
3881
3910
|
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
3882
3911
|
var textColor = getTextColor(theme);
|
|
3883
3912
|
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
3884
|
-
var defaultStorycard = /*#__PURE__*/
|
|
3913
|
+
var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
|
|
3885
3914
|
story: story,
|
|
3886
3915
|
aspectRatio: aspectRatio,
|
|
3887
3916
|
border: border,
|
|
@@ -3895,7 +3924,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
3895
3924
|
config: config,
|
|
3896
3925
|
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
3897
3926
|
});
|
|
3898
|
-
return /*#__PURE__*/
|
|
3927
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3899
3928
|
"data-test-id": "story-card",
|
|
3900
3929
|
style: {
|
|
3901
3930
|
backgroundColor: theme,
|
|
@@ -3924,91 +3953,91 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
3924
3953
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
3925
3954
|
var _config$localizationC = config.localizationConfig,
|
|
3926
3955
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
3927
|
-
return /*#__PURE__*/
|
|
3956
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
3928
3957
|
config: config,
|
|
3929
3958
|
story: story,
|
|
3930
3959
|
isHorizontal: true,
|
|
3931
3960
|
isHorizontalMobile: isHorizontalMobile,
|
|
3932
3961
|
aspectRatio: aspectRatio
|
|
3933
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/
|
|
3962
|
+
}) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
3934
3963
|
config: config,
|
|
3935
3964
|
story: story,
|
|
3936
3965
|
isHorizontalWithImageLast: true,
|
|
3937
3966
|
isHorizontalMobile: isHorizontalMobile,
|
|
3938
3967
|
aspectRatio: aspectRatio
|
|
3939
|
-
}) : /*#__PURE__*/
|
|
3968
|
+
}) : /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
3940
3969
|
story: story,
|
|
3941
3970
|
config: config,
|
|
3942
3971
|
isHorizontalMobile: isHorizontalMobile,
|
|
3943
3972
|
aspectRatio: aspectRatio
|
|
3944
|
-
}), /*#__PURE__*/
|
|
3973
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3945
3974
|
className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap$3)
|
|
3946
|
-
}, /*#__PURE__*/
|
|
3975
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
3947
3976
|
story: story,
|
|
3948
3977
|
borderColor: SectionTagborderColor
|
|
3949
|
-
}), /*#__PURE__*/
|
|
3978
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
3950
3979
|
story: story,
|
|
3951
3980
|
headerLevel: headerLevel,
|
|
3952
3981
|
premiumStoryIconConfig: config
|
|
3953
|
-
}), /*#__PURE__*/
|
|
3982
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
3954
3983
|
config: localizationConfig,
|
|
3955
3984
|
story: story,
|
|
3956
3985
|
isBottom: true,
|
|
3957
3986
|
prefix: prefix,
|
|
3958
3987
|
hideAuthorImage: hideAuthorImage
|
|
3959
|
-
}), /*#__PURE__*/
|
|
3988
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
3960
3989
|
story: story
|
|
3961
3990
|
})));
|
|
3962
3991
|
};
|
|
3963
3992
|
|
|
3964
3993
|
DefaultStoryCard.propTypes = {
|
|
3965
|
-
story:
|
|
3966
|
-
border:
|
|
3967
|
-
isBottom:
|
|
3968
|
-
isHorizontal:
|
|
3969
|
-
aspectRatio:
|
|
3970
|
-
isHorizontalMobile:
|
|
3971
|
-
centerAlign:
|
|
3972
|
-
headerLevel:
|
|
3973
|
-
borderColor:
|
|
3974
|
-
hideAuthorImage:
|
|
3975
|
-
prefix:
|
|
3976
|
-
config:
|
|
3977
|
-
isHorizontalWithImageLast:
|
|
3994
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3995
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
3996
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3997
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3998
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
3999
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4000
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4001
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4002
|
+
borderColor: PropTypes__default["default"].string,
|
|
4003
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4004
|
+
prefix: PropTypes__default["default"].string,
|
|
4005
|
+
config: PropTypes__default["default"].object,
|
|
4006
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
3978
4007
|
};
|
|
3979
4008
|
StoryCard.propTypes = {
|
|
3980
4009
|
/** The Story Object from the API response */
|
|
3981
|
-
story:
|
|
3982
|
-
children:
|
|
4010
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4011
|
+
children: PropTypes__default["default"].node,
|
|
3983
4012
|
|
|
3984
4013
|
/** Flip the Story Card to Horizonal mode */
|
|
3985
|
-
isHorizontal:
|
|
4014
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3986
4015
|
|
|
3987
4016
|
/** Add border to the Story Card */
|
|
3988
|
-
border:
|
|
4017
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
3989
4018
|
// story card with background image
|
|
3990
|
-
useImageAsBackground:
|
|
4019
|
+
useImageAsBackground: PropTypes__default["default"].bool,
|
|
3991
4020
|
// story card content overlap with image
|
|
3992
|
-
bgImgContentOverlap:
|
|
4021
|
+
bgImgContentOverlap: PropTypes__default["default"].bool,
|
|
3993
4022
|
|
|
3994
4023
|
/** add aspect ratio for hero image */
|
|
3995
|
-
aspectRatio:
|
|
4024
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
3996
4025
|
|
|
3997
4026
|
/** add theme(dark /light/custom color) for storycard */
|
|
3998
|
-
theme:
|
|
4027
|
+
theme: PropTypes__default["default"].string,
|
|
3999
4028
|
|
|
4000
4029
|
/** flip the story card mobile design horizontal */
|
|
4001
|
-
isHorizontalMobile:
|
|
4030
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4002
4031
|
// make content center align in desktop and left align in mobile
|
|
4003
|
-
centerAlign:
|
|
4004
|
-
headerLevel:
|
|
4005
|
-
borderColor:
|
|
4032
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4033
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4034
|
+
borderColor: PropTypes__default["default"].string,
|
|
4006
4035
|
// handle author image through storycard
|
|
4007
|
-
hideAuthorImage:
|
|
4036
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4008
4037
|
// handle author prefix through storycard
|
|
4009
|
-
prefix:
|
|
4010
|
-
config:
|
|
4011
|
-
isHorizontalWithImageLast:
|
|
4038
|
+
prefix: PropTypes__default["default"].string,
|
|
4039
|
+
config: PropTypes__default["default"].object,
|
|
4040
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4012
4041
|
};
|
|
4013
4042
|
StoryCard.defaultProps = {
|
|
4014
4043
|
isHorizontal: false,
|
|
@@ -4041,14 +4070,14 @@ var StorycardContent = function StorycardContent(_ref) {
|
|
|
4041
4070
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4042
4071
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : "";
|
|
4043
4072
|
var horizontalCard = isHorizontalMobile ? "horizontal-content-wrapper" : "";
|
|
4044
|
-
return /*#__PURE__*/
|
|
4073
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4045
4074
|
"data-test-id": "story-card-content",
|
|
4046
4075
|
style: {
|
|
4047
4076
|
backgroundColor: theme,
|
|
4048
4077
|
color: textColor
|
|
4049
4078
|
},
|
|
4050
4079
|
className: "arr--content-wrapper " + _getClassName("wrapper ".concat(borderTemplate, " ").concat(horizontalCard), _styleModuleImportMap$2)
|
|
4051
|
-
}, children || /*#__PURE__*/
|
|
4080
|
+
}, children || /*#__PURE__*/React__default["default"].createElement(DefaultStoryCardContent, {
|
|
4052
4081
|
story: story,
|
|
4053
4082
|
headerLevel: headerLevel,
|
|
4054
4083
|
isHorizontalMobile: isHorizontalMobile,
|
|
@@ -4066,37 +4095,37 @@ var DefaultStoryCardContent = function DefaultStoryCardContent(_ref2) {
|
|
|
4066
4095
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4067
4096
|
var _config$localizationC = config.localizationConfig,
|
|
4068
4097
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4069
|
-
return /*#__PURE__*/
|
|
4098
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4070
4099
|
story: story,
|
|
4071
4100
|
borderColor: SectionTagborderColor
|
|
4072
|
-
}), /*#__PURE__*/
|
|
4101
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4073
4102
|
story: story,
|
|
4074
4103
|
headerLevel: headerLevel,
|
|
4075
4104
|
premiumStoryIconConfig: config
|
|
4076
|
-
}), /*#__PURE__*/
|
|
4105
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4077
4106
|
config: localizationConfig,
|
|
4078
4107
|
story: story
|
|
4079
4108
|
}));
|
|
4080
4109
|
};
|
|
4081
4110
|
|
|
4082
4111
|
DefaultStoryCardContent.propTypes = {
|
|
4083
|
-
story:
|
|
4084
|
-
border:
|
|
4085
|
-
theme:
|
|
4086
|
-
isHorizontalMobile:
|
|
4087
|
-
headerLevel:
|
|
4088
|
-
borderColor:
|
|
4089
|
-
config:
|
|
4112
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4113
|
+
border: PropTypes__default["default"].string,
|
|
4114
|
+
theme: PropTypes__default["default"].string,
|
|
4115
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4116
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4117
|
+
borderColor: PropTypes__default["default"].string,
|
|
4118
|
+
config: PropTypes__default["default"].object
|
|
4090
4119
|
};
|
|
4091
4120
|
StorycardContent.propTypes = {
|
|
4092
|
-
story:
|
|
4093
|
-
children:
|
|
4094
|
-
theme:
|
|
4095
|
-
border:
|
|
4096
|
-
isHorizontalMobile:
|
|
4097
|
-
headerLevel:
|
|
4098
|
-
borderColor:
|
|
4099
|
-
config:
|
|
4121
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4122
|
+
children: PropTypes__default["default"].node,
|
|
4123
|
+
theme: PropTypes__default["default"].string,
|
|
4124
|
+
border: PropTypes__default["default"].string,
|
|
4125
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4126
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4127
|
+
borderColor: PropTypes__default["default"].string,
|
|
4128
|
+
config: PropTypes__default["default"].object
|
|
4100
4129
|
};
|
|
4101
4130
|
|
|
4102
4131
|
var _styleModuleImportMap$1 = {
|
|
@@ -4135,7 +4164,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
4135
4164
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
4136
4165
|
|
|
4137
4166
|
var borderBottomStyle = function borderBottomStyle() {
|
|
4138
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
4167
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4139
4168
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
4140
4169
|
style: {
|
|
4141
4170
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -4195,40 +4224,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
4195
4224
|
}
|
|
4196
4225
|
};
|
|
4197
4226
|
|
|
4198
|
-
return /*#__PURE__*/
|
|
4227
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4199
4228
|
style: {
|
|
4200
4229
|
borderBottom: borderBottomFullStyle
|
|
4201
4230
|
},
|
|
4202
4231
|
"data-test-id": "collection-name",
|
|
4203
4232
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$1)
|
|
4204
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
4233
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4205
4234
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
4206
4235
|
style: {
|
|
4207
4236
|
color: CollectionNameBorderColor,
|
|
4208
4237
|
fontSize: getBorderHeight()
|
|
4209
4238
|
}
|
|
4210
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
4239
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
4211
4240
|
href: slug,
|
|
4212
4241
|
"aria-label": "collection-name"
|
|
4213
|
-
}, /*#__PURE__*/
|
|
4242
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
4214
4243
|
};
|
|
4215
4244
|
CollectionNameBase.propTypes = {
|
|
4216
4245
|
/** Collection name border color */
|
|
4217
|
-
collectionNameBorderColor: PropTypes
|
|
4246
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
4218
4247
|
|
|
4219
4248
|
/** The Collection Object from the API response */
|
|
4220
|
-
collection: PropTypes
|
|
4249
|
+
collection: PropTypes.PropTypes.object,
|
|
4221
4250
|
|
|
4222
4251
|
/** The publisher config from the API response */
|
|
4223
|
-
config: PropTypes
|
|
4252
|
+
config: PropTypes.PropTypes.object,
|
|
4224
4253
|
|
|
4225
4254
|
/** The style template for the component */
|
|
4226
|
-
collectionNameTemplate: PropTypes
|
|
4255
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
4227
4256
|
|
|
4228
4257
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
4229
|
-
headerLevel: PropTypes
|
|
4230
|
-
customCollectionName: PropTypes
|
|
4231
|
-
navigate: PropTypes
|
|
4258
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
4259
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
4260
|
+
navigate: PropTypes.PropTypes.bool
|
|
4232
4261
|
};
|
|
4233
4262
|
CollectionNameBase.defaultProps = {
|
|
4234
4263
|
collectionNameTemplate: "",
|
|
@@ -4241,7 +4270,7 @@ function mapStateToProps(state) {
|
|
|
4241
4270
|
};
|
|
4242
4271
|
}
|
|
4243
4272
|
|
|
4244
|
-
var CollectionName = connect(mapStateToProps)(CollectionNameBase);
|
|
4273
|
+
var CollectionName = reactRedux.connect(mapStateToProps)(CollectionNameBase);
|
|
4245
4274
|
|
|
4246
4275
|
function _defineProperty(obj, key, value) {
|
|
4247
4276
|
if (key in obj) {
|
|
@@ -4290,26 +4319,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
4290
4319
|
if (!showButton) return null;
|
|
4291
4320
|
var textColor = getTextColor(theme);
|
|
4292
4321
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
|
|
4293
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
4322
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4294
4323
|
onClick: onClick,
|
|
4295
4324
|
"data-test-id": "load-more",
|
|
4296
4325
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap)
|
|
4297
|
-
}, buttonText) : /*#__PURE__*/
|
|
4326
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
4298
4327
|
href: slug,
|
|
4299
4328
|
navigateTo: navigate,
|
|
4300
4329
|
"data-test-id": "load-more",
|
|
4301
4330
|
"aria-label": "load-more"
|
|
4302
|
-
}, /*#__PURE__*/
|
|
4331
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4303
4332
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap)
|
|
4304
4333
|
}, buttonText));
|
|
4305
4334
|
};
|
|
4306
4335
|
LoadmoreButton.propTypes = {
|
|
4307
|
-
collection:
|
|
4308
|
-
template:
|
|
4309
|
-
config:
|
|
4310
|
-
onClick:
|
|
4311
|
-
navigate:
|
|
4312
|
-
qtConfig:
|
|
4336
|
+
collection: PropTypes__default["default"].object,
|
|
4337
|
+
template: PropTypes__default["default"].string,
|
|
4338
|
+
config: PropTypes__default["default"].object,
|
|
4339
|
+
onClick: PropTypes__default["default"].func,
|
|
4340
|
+
navigate: PropTypes__default["default"].func,
|
|
4341
|
+
qtConfig: PropTypes__default["default"].object
|
|
4313
4342
|
};
|
|
4314
4343
|
|
|
4315
4344
|
var isClient = typeof window !== "undefined";
|
|
@@ -4321,7 +4350,7 @@ var hasIntersectionObserverSupport = function hasIntersectionObserverSupport() {
|
|
|
4321
4350
|
|
|
4322
4351
|
|
|
4323
4352
|
var getIntersectionObserver = function getIntersectionObserver() {
|
|
4324
|
-
return Promise.resolve(isClient && !hasIntersectionObserverSupport() &&
|
|
4353
|
+
return Promise.resolve(isClient && !hasIntersectionObserverSupport() && Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('intersection-observer')); }));
|
|
4325
4354
|
}; // options for intersection observer in order to improve the effect
|
|
4326
4355
|
|
|
4327
4356
|
|
|
@@ -4354,12 +4383,12 @@ var getObserver = function getObserver() {
|
|
|
4354
4383
|
var useNearScreen = (function (_ref) {
|
|
4355
4384
|
var ref = _ref.ref;
|
|
4356
4385
|
|
|
4357
|
-
var _useState = useState(false),
|
|
4386
|
+
var _useState = React.useState(false),
|
|
4358
4387
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4359
4388
|
show = _useState2[0],
|
|
4360
4389
|
setShow = _useState2[1];
|
|
4361
4390
|
|
|
4362
|
-
useEffect(function () {
|
|
4391
|
+
React.useEffect(function () {
|
|
4363
4392
|
var current = ref.current;
|
|
4364
4393
|
if (!current) return; // get observer async and only when needed
|
|
4365
4394
|
|
|
@@ -4386,36 +4415,36 @@ var EMPTY_HTML = {
|
|
|
4386
4415
|
var isServer = typeof window === "undefined";
|
|
4387
4416
|
var ProgressiveHydration = function ProgressiveHydration(props) {
|
|
4388
4417
|
var children = props.children;
|
|
4389
|
-
var ref = useRef(null);
|
|
4418
|
+
var ref = React.useRef(null);
|
|
4390
4419
|
var isNearScreen = useNearScreen({
|
|
4391
4420
|
ref: ref
|
|
4392
4421
|
});
|
|
4393
|
-
useEffect(function () {
|
|
4422
|
+
React.useEffect(function () {
|
|
4394
4423
|
var el = ref.current; // CLIENT:
|
|
4395
4424
|
// If we want to force the hydration OR the element is near screen
|
|
4396
4425
|
// then we hydrate the content to get the functionality ready
|
|
4397
4426
|
|
|
4398
4427
|
if (isNearScreen) {
|
|
4399
4428
|
var action = el.hasChildNodes() ? "hydrate" : "render";
|
|
4400
|
-
|
|
4429
|
+
ReactDOM__default["default"][action](children, el);
|
|
4401
4430
|
}
|
|
4402
4431
|
}, [children, isNearScreen]); // SERVER: Just render the content as usual
|
|
4403
4432
|
|
|
4404
4433
|
if (isServer) {
|
|
4405
|
-
return /*#__PURE__*/
|
|
4434
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4406
4435
|
ref: ref
|
|
4407
4436
|
}, children);
|
|
4408
4437
|
} // CLIENT: Avoid hydration until we say so
|
|
4409
4438
|
|
|
4410
4439
|
|
|
4411
|
-
return /*#__PURE__*/
|
|
4440
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4412
4441
|
ref: ref,
|
|
4413
4442
|
suppressHydrationWarning: true,
|
|
4414
4443
|
dangerouslySetInnerHTML: EMPTY_HTML
|
|
4415
4444
|
});
|
|
4416
4445
|
};
|
|
4417
4446
|
ProgressiveHydration.propTypes = {
|
|
4418
|
-
children:
|
|
4447
|
+
children: PropTypes__default["default"].element
|
|
4419
4448
|
};
|
|
4420
4449
|
|
|
4421
4450
|
var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
@@ -4423,7 +4452,7 @@ var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
|
4423
4452
|
componentName = _ref.componentName,
|
|
4424
4453
|
offset = _ref.offset,
|
|
4425
4454
|
limit = _ref.limit;
|
|
4426
|
-
return /*#__PURE__*/
|
|
4455
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4427
4456
|
id: "ELM-".concat(collection.id),
|
|
4428
4457
|
"data-collection-slug": collection["slug"],
|
|
4429
4458
|
"data-component-name": componentName,
|
|
@@ -4432,13 +4461,13 @@ var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
|
4432
4461
|
});
|
|
4433
4462
|
};
|
|
4434
4463
|
LoadMoreTarget.propTypes = {
|
|
4435
|
-
collection:
|
|
4436
|
-
id:
|
|
4437
|
-
slug:
|
|
4464
|
+
collection: PropTypes__default["default"].shape({
|
|
4465
|
+
id: PropTypes__default["default"].string,
|
|
4466
|
+
slug: PropTypes__default["default"].string
|
|
4438
4467
|
}),
|
|
4439
|
-
componentName:
|
|
4440
|
-
offset:
|
|
4441
|
-
limit:
|
|
4468
|
+
componentName: PropTypes__default["default"].string,
|
|
4469
|
+
offset: PropTypes__default["default"].number,
|
|
4470
|
+
limit: PropTypes__default["default"].number
|
|
4442
4471
|
};
|
|
4443
4472
|
|
|
4444
4473
|
var loadMore = function loadMore(_ref) {
|
|
@@ -4479,7 +4508,7 @@ var ThreeColGridBase = function ThreeColGridBase(_ref2) {
|
|
|
4479
4508
|
footerButton = _config$footerButton === void 0 ? "" : _config$footerButton,
|
|
4480
4509
|
_config$subsequentLoa = config.subsequentLoadCount,
|
|
4481
4510
|
subsequentLoadCount = _config$subsequentLoa === void 0 ? 3 : _config$subsequentLoa;
|
|
4482
|
-
var storyItems = collectionToStories(collection);
|
|
4511
|
+
var storyItems = components.collectionToStories(collection);
|
|
4483
4512
|
if (!storyItems.length) return null;
|
|
4484
4513
|
var textColor = getTextColor(theme);
|
|
4485
4514
|
var footerSlot = footerSlotConfig.footerSlot;
|
|
@@ -4491,8 +4520,8 @@ var ThreeColGridBase = function ThreeColGridBase(_ref2) {
|
|
|
4491
4520
|
component = _get.component;
|
|
4492
4521
|
|
|
4493
4522
|
var adWidgetSlot = type === "ad" || type === "widget" ? getSlot(type, component) : null;
|
|
4494
|
-
var dispatch = useDispatch();
|
|
4495
|
-
var qtConfig = useSelector(function (state) {
|
|
4523
|
+
var dispatch = reactRedux.useDispatch();
|
|
4524
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
4496
4525
|
return get_1(state, ["qt", "config"], {});
|
|
4497
4526
|
});
|
|
4498
4527
|
|
|
@@ -4500,7 +4529,7 @@ var ThreeColGridBase = function ThreeColGridBase(_ref2) {
|
|
|
4500
4529
|
if (!isLoadMoreVisible) return null;
|
|
4501
4530
|
|
|
4502
4531
|
if (isolatedLoadMore) {
|
|
4503
|
-
return /*#__PURE__*/
|
|
4532
|
+
return /*#__PURE__*/React__default["default"].createElement(LoadMoreTarget, {
|
|
4504
4533
|
collection: collection,
|
|
4505
4534
|
componentName: "ThreeColGrid",
|
|
4506
4535
|
offset: storyItems.length,
|
|
@@ -4509,7 +4538,7 @@ var ThreeColGridBase = function ThreeColGridBase(_ref2) {
|
|
|
4509
4538
|
}
|
|
4510
4539
|
|
|
4511
4540
|
var url = generateNavigateSlug(collection, qtConfig);
|
|
4512
|
-
return /*#__PURE__*/
|
|
4541
|
+
return /*#__PURE__*/React__default["default"].createElement(ProgressiveHydration, null, /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
4513
4542
|
config: config,
|
|
4514
4543
|
collection: collection,
|
|
4515
4544
|
template: footerButton,
|
|
@@ -4524,19 +4553,19 @@ var ThreeColGridBase = function ThreeColGridBase(_ref2) {
|
|
|
4524
4553
|
};
|
|
4525
4554
|
|
|
4526
4555
|
var storyCard = function storyCard(story) {
|
|
4527
|
-
return /*#__PURE__*/
|
|
4556
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4528
4557
|
className: "three-col-m_cards__2HyyK"
|
|
4529
|
-
}, /*#__PURE__*/
|
|
4558
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4530
4559
|
story: story,
|
|
4531
4560
|
border: border,
|
|
4532
4561
|
theme: theme,
|
|
4533
4562
|
isHorizontalMobile: true,
|
|
4534
4563
|
config: config
|
|
4535
|
-
}, /*#__PURE__*/
|
|
4564
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4536
4565
|
aspectRatio: [[16, 9]],
|
|
4537
4566
|
story: story,
|
|
4538
4567
|
isHorizontalMobile: true
|
|
4539
|
-
}), /*#__PURE__*/
|
|
4568
|
+
}), /*#__PURE__*/React__default["default"].createElement(StorycardContent, {
|
|
4540
4569
|
theme: theme,
|
|
4541
4570
|
border: border,
|
|
4542
4571
|
story: story,
|
|
@@ -4546,27 +4575,27 @@ var ThreeColGridBase = function ThreeColGridBase(_ref2) {
|
|
|
4546
4575
|
})));
|
|
4547
4576
|
};
|
|
4548
4577
|
|
|
4549
|
-
return /*#__PURE__*/
|
|
4578
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4550
4579
|
className: "full-width-with-padding arrow-component",
|
|
4551
4580
|
"data-test-id": "three-col-grid",
|
|
4552
4581
|
style: {
|
|
4553
4582
|
backgroundColor: theme,
|
|
4554
4583
|
color: textColor
|
|
4555
4584
|
}
|
|
4556
|
-
}, /*#__PURE__*/
|
|
4585
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4557
4586
|
className: "three-col-m_three-col-grid__y7rZK"
|
|
4558
|
-
}, /*#__PURE__*/
|
|
4587
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4559
4588
|
collection: collection,
|
|
4560
4589
|
collectionNameTemplate: collectionNameTemplate,
|
|
4561
4590
|
collectionNameBorderColor: collectionNameBorderColor
|
|
4562
|
-
}), /*#__PURE__*/
|
|
4591
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4563
4592
|
className: "three-col-m_wrapper__20m5m"
|
|
4564
4593
|
}, storyItems.slice(0, 2).map(function (story, index) {
|
|
4565
|
-
return /*#__PURE__*/
|
|
4594
|
+
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, {
|
|
4566
4595
|
key: "story-3col1-".concat(index, "-").concat(get_1(story, ["id"], "0"))
|
|
4567
4596
|
}, storyCard(story));
|
|
4568
|
-
}), storyItems.length < 2 && /*#__PURE__*/
|
|
4569
|
-
return /*#__PURE__*/
|
|
4597
|
+
}), storyItems.length < 2 && /*#__PURE__*/React__default["default"].createElement("div", null), adWidgetSlot, storyItems.slice(2).map(function (story, index) {
|
|
4598
|
+
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, {
|
|
4570
4599
|
key: "story-3col1-".concat(index, "-").concat(get_1(story, ["id"], "0"))
|
|
4571
4600
|
}, storyCard(story));
|
|
4572
4601
|
})), getLoadMore({
|
|
@@ -4578,22 +4607,22 @@ var ThreeColGridBase = function ThreeColGridBase(_ref2) {
|
|
|
4578
4607
|
};
|
|
4579
4608
|
ThreeColGridBase.propTypes = {
|
|
4580
4609
|
/** collection is the array of objects which is returning by API */
|
|
4581
|
-
collection:
|
|
4610
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
4582
4611
|
|
|
4583
4612
|
/** The config for the Row */
|
|
4584
|
-
config:
|
|
4585
|
-
theme:
|
|
4586
|
-
border:
|
|
4587
|
-
slotConfig:
|
|
4588
|
-
footerButton:
|
|
4589
|
-
collectionNameTemplate:
|
|
4590
|
-
collectionNameBorderColor:
|
|
4591
|
-
subsequentLoadCount:
|
|
4613
|
+
config: PropTypes__default["default"].shape({
|
|
4614
|
+
theme: PropTypes__default["default"].string,
|
|
4615
|
+
border: PropTypes__default["default"].bool,
|
|
4616
|
+
slotConfig: PropTypes__default["default"].array,
|
|
4617
|
+
footerButton: PropTypes__default["default"].string,
|
|
4618
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
4619
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
4620
|
+
subsequentLoadCount: PropTypes__default["default"].number
|
|
4592
4621
|
}),
|
|
4593
|
-
getMoreStories:
|
|
4594
|
-
isLoadMoreVisible:
|
|
4595
|
-
isLoading:
|
|
4596
|
-
isolatedLoadMore:
|
|
4622
|
+
getMoreStories: PropTypes__default["default"].func,
|
|
4623
|
+
isLoadMoreVisible: PropTypes__default["default"].bool,
|
|
4624
|
+
isLoading: PropTypes__default["default"].bool,
|
|
4625
|
+
isolatedLoadMore: PropTypes__default["default"].bool
|
|
4597
4626
|
};
|
|
4598
4627
|
ThreeColGridBase.defaultProps = {
|
|
4599
4628
|
getMoreStories: function getMoreStories() {},
|
|
@@ -4602,4 +4631,5 @@ ThreeColGridBase.defaultProps = {
|
|
|
4602
4631
|
};
|
|
4603
4632
|
var ThreeColGrid = StateProvider(ThreeColGridBase);
|
|
4604
4633
|
|
|
4605
|
-
|
|
4634
|
+
exports.ThreeColGrid = ThreeColGrid;
|
|
4635
|
+
exports.ThreeColGridBase = ThreeColGridBase;
|