@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 reactRedux = require('react-redux');
|
|
7
|
+
var PropTypes = require('prop-types');
|
|
8
|
+
var components = require('@quintype/components');
|
|
9
|
+
var Timeago = require('react-timeago');
|
|
10
|
+
var dateFnsTz = require('date-fns-tz');
|
|
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
|
function _defineProperty(obj, key, value) {
|
|
10
39
|
if (key in obj) {
|
|
@@ -1360,21 +1389,21 @@ function get(object, path, defaultValue) {
|
|
|
1360
1389
|
|
|
1361
1390
|
var get_1 = get;
|
|
1362
1391
|
|
|
1363
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
1392
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
1364
1393
|
|
|
1365
1394
|
var StateProvider = function StateProvider(RowComponent) {
|
|
1366
1395
|
return function (props) {
|
|
1367
1396
|
return (
|
|
1368
1397
|
/*#__PURE__*/
|
|
1369
1398
|
// eslint-disable-next-line react/prop-types
|
|
1370
|
-
|
|
1399
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
1371
1400
|
value: props.config
|
|
1372
|
-
}, /*#__PURE__*/
|
|
1401
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
1373
1402
|
);
|
|
1374
1403
|
};
|
|
1375
1404
|
};
|
|
1376
1405
|
var useStateValue = function useStateValue() {
|
|
1377
|
-
return useContext(StateContext);
|
|
1406
|
+
return React.useContext(StateContext);
|
|
1378
1407
|
};
|
|
1379
1408
|
|
|
1380
1409
|
/**
|
|
@@ -2682,15 +2711,15 @@ function isExternalStory() {
|
|
|
2682
2711
|
metadata = _story$metadata === void 0 ? {} : _story$metadata;
|
|
2683
2712
|
return storyTemplate === "news-elsewhere" ? get_1(metadata, ["reference-url"], "") : "";
|
|
2684
2713
|
} // Adds target='_blank' attribute to anchor tags if not present
|
|
2685
|
-
|
|
2686
|
-
"sketches-host":
|
|
2687
|
-
"cdn-name":
|
|
2688
|
-
"cdn-image":
|
|
2714
|
+
PropTypes__default["default"].shape({
|
|
2715
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2716
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2717
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2689
2718
|
});
|
|
2690
|
-
|
|
2691
|
-
headline:
|
|
2692
|
-
"last-published-at":
|
|
2693
|
-
subheadline:
|
|
2719
|
+
PropTypes__default["default"].shape({
|
|
2720
|
+
headline: PropTypes__default["default"].string,
|
|
2721
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2722
|
+
subheadline: PropTypes__default["default"].string
|
|
2694
2723
|
});
|
|
2695
2724
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2696
2725
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2734,17 +2763,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2734
2763
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2735
2764
|
|
|
2736
2765
|
if (timezone && template === "story") {
|
|
2737
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2738
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2766
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2767
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2739
2768
|
timeZone: timezone
|
|
2740
2769
|
});
|
|
2741
2770
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2742
|
-
return /*#__PURE__*/
|
|
2771
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2743
2772
|
dateTime: formatZonedTime
|
|
2744
2773
|
}, timeStamp);
|
|
2745
2774
|
}
|
|
2746
2775
|
|
|
2747
|
-
return /*#__PURE__*/
|
|
2776
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2748
2777
|
date: date,
|
|
2749
2778
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2750
2779
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2792,10 +2821,10 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2792
2821
|
return null;
|
|
2793
2822
|
}
|
|
2794
2823
|
|
|
2795
|
-
return /*#__PURE__*/
|
|
2824
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2796
2825
|
"data-test-id": "author-image",
|
|
2797
2826
|
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$a)
|
|
2798
|
-
}, /*#__PURE__*/
|
|
2827
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
2799
2828
|
slug: avatarS3Key,
|
|
2800
2829
|
"aspect-ratio": [1, 1],
|
|
2801
2830
|
defaultWidth: 400,
|
|
@@ -2803,14 +2832,14 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2803
2832
|
auto: ["format", "compress"]
|
|
2804
2833
|
},
|
|
2805
2834
|
alt: authorName
|
|
2806
|
-
}) : /*#__PURE__*/
|
|
2835
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2807
2836
|
src: avatarUrl
|
|
2808
2837
|
})));
|
|
2809
2838
|
};
|
|
2810
2839
|
|
|
2811
2840
|
var isPrefix = function isPrefix(dir) {
|
|
2812
2841
|
if (prefix) {
|
|
2813
|
-
return /*#__PURE__*/
|
|
2842
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2814
2843
|
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$a)
|
|
2815
2844
|
}, prefix);
|
|
2816
2845
|
}
|
|
@@ -2818,11 +2847,11 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2818
2847
|
return !hideAuthorImage && authorImage(dir);
|
|
2819
2848
|
};
|
|
2820
2849
|
|
|
2821
|
-
return /*#__PURE__*/
|
|
2850
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2822
2851
|
href: "".concat(mountAt, "/author/") + slug,
|
|
2823
2852
|
"aria-label": "author-name",
|
|
2824
2853
|
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$a)
|
|
2825
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
2854
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2826
2855
|
"data-test-id": "author-name",
|
|
2827
2856
|
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$a)
|
|
2828
2857
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
@@ -2834,18 +2863,18 @@ function mapStateToProps$1(state) {
|
|
|
2834
2863
|
};
|
|
2835
2864
|
}
|
|
2836
2865
|
|
|
2837
|
-
var Author = connect(mapStateToProps$1)(AuthorBase);
|
|
2866
|
+
var Author = reactRedux.connect(mapStateToProps$1)(AuthorBase);
|
|
2838
2867
|
AuthorBase.propTypes = {
|
|
2839
2868
|
/** The Story Object from the API response */
|
|
2840
|
-
story:
|
|
2869
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
2841
2870
|
|
|
2842
2871
|
/** Hide Author Avatar Image */
|
|
2843
|
-
hideAuthorImage:
|
|
2872
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
2844
2873
|
// fix Author bottom of the storyCard
|
|
2845
|
-
isBottom:
|
|
2874
|
+
isBottom: PropTypes__default["default"].bool,
|
|
2846
2875
|
// fix prefix before the author name
|
|
2847
|
-
prefix:
|
|
2848
|
-
config:
|
|
2876
|
+
prefix: PropTypes__default["default"].string,
|
|
2877
|
+
config: PropTypes__default["default"].object
|
|
2849
2878
|
};
|
|
2850
2879
|
AuthorBase.defaultProps = {
|
|
2851
2880
|
hideAuthorImage: false,
|
|
@@ -2859,7 +2888,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
2859
2888
|
_ref$color = _ref.color,
|
|
2860
2889
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
2861
2890
|
positionTop = _ref.positionTop;
|
|
2862
|
-
return /*#__PURE__*/
|
|
2891
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2863
2892
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2864
2893
|
width: width,
|
|
2865
2894
|
height: height,
|
|
@@ -2868,28 +2897,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
2868
2897
|
position: "relative",
|
|
2869
2898
|
top: positionTop
|
|
2870
2899
|
}
|
|
2871
|
-
}, /*#__PURE__*/
|
|
2900
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2872
2901
|
fill: "none",
|
|
2873
2902
|
fillRule: "evenodd",
|
|
2874
2903
|
stroke: "none",
|
|
2875
2904
|
strokeWidth: "1"
|
|
2876
|
-
}, /*#__PURE__*/
|
|
2905
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2877
2906
|
transform: "translate(8 8)"
|
|
2878
|
-
}, /*#__PURE__*/
|
|
2907
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2879
2908
|
d: "M0 0H24V24H0z"
|
|
2880
|
-
}), /*#__PURE__*/
|
|
2909
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2881
2910
|
fill: color,
|
|
2882
2911
|
fillRule: "nonzero",
|
|
2883
2912
|
transform: "translate(0 2)"
|
|
2884
|
-
}, /*#__PURE__*/
|
|
2913
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2885
2914
|
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"
|
|
2886
2915
|
}))))));
|
|
2887
2916
|
};
|
|
2888
2917
|
CrownIcon.propTypes = {
|
|
2889
|
-
height:
|
|
2890
|
-
width:
|
|
2891
|
-
color:
|
|
2892
|
-
positionTop:
|
|
2918
|
+
height: PropTypes__default["default"].string,
|
|
2919
|
+
width: PropTypes__default["default"].string,
|
|
2920
|
+
color: PropTypes__default["default"].string,
|
|
2921
|
+
positionTop: PropTypes__default["default"].string
|
|
2893
2922
|
};
|
|
2894
2923
|
|
|
2895
2924
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -2898,7 +2927,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
2898
2927
|
_ref$color = _ref.color,
|
|
2899
2928
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
2900
2929
|
positionTop = _ref.positionTop;
|
|
2901
|
-
return /*#__PURE__*/
|
|
2930
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2902
2931
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2903
2932
|
width: width,
|
|
2904
2933
|
height: height,
|
|
@@ -2907,16 +2936,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
2907
2936
|
position: "relative",
|
|
2908
2937
|
top: positionTop
|
|
2909
2938
|
}
|
|
2910
|
-
}, /*#__PURE__*/
|
|
2939
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2911
2940
|
fill: "none",
|
|
2912
2941
|
fillRule: "evenodd",
|
|
2913
2942
|
stroke: "none",
|
|
2914
2943
|
strokeWidth: "1"
|
|
2915
|
-
}, /*#__PURE__*/
|
|
2944
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2916
2945
|
transform: "translate(8 8)"
|
|
2917
|
-
}, /*#__PURE__*/
|
|
2946
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2918
2947
|
d: "M0 0H24V24H0z"
|
|
2919
|
-
}), /*#__PURE__*/
|
|
2948
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2920
2949
|
fill: color,
|
|
2921
2950
|
fillRule: "nonzero",
|
|
2922
2951
|
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",
|
|
@@ -2924,10 +2953,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
2924
2953
|
})))));
|
|
2925
2954
|
};
|
|
2926
2955
|
KeyIcon.propTypes = {
|
|
2927
|
-
height:
|
|
2928
|
-
width:
|
|
2929
|
-
color:
|
|
2930
|
-
positionTop:
|
|
2956
|
+
height: PropTypes__default["default"].string,
|
|
2957
|
+
width: PropTypes__default["default"].string,
|
|
2958
|
+
color: PropTypes__default["default"].string,
|
|
2959
|
+
positionTop: PropTypes__default["default"].string
|
|
2931
2960
|
};
|
|
2932
2961
|
|
|
2933
2962
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -2936,7 +2965,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
2936
2965
|
_ref$color = _ref.color,
|
|
2937
2966
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
2938
2967
|
positionTop = _ref.positionTop;
|
|
2939
|
-
return /*#__PURE__*/
|
|
2968
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2940
2969
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2941
2970
|
width: width,
|
|
2942
2971
|
height: height,
|
|
@@ -2945,28 +2974,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
2945
2974
|
position: "relative",
|
|
2946
2975
|
top: positionTop
|
|
2947
2976
|
}
|
|
2948
|
-
}, /*#__PURE__*/
|
|
2977
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2949
2978
|
fill: "none",
|
|
2950
2979
|
fillRule: "evenodd",
|
|
2951
2980
|
stroke: "none",
|
|
2952
2981
|
strokeWidth: "1"
|
|
2953
|
-
}, /*#__PURE__*/
|
|
2982
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2954
2983
|
transform: "translate(8 8)"
|
|
2955
|
-
}, /*#__PURE__*/
|
|
2984
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2956
2985
|
d: "M0 0H24V24H0z"
|
|
2957
|
-
}), /*#__PURE__*/
|
|
2986
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2958
2987
|
fill: color,
|
|
2959
2988
|
fillRule: "nonzero",
|
|
2960
2989
|
transform: "translate(3)"
|
|
2961
|
-
}, /*#__PURE__*/
|
|
2990
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2962
2991
|
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"
|
|
2963
2992
|
}))))));
|
|
2964
2993
|
};
|
|
2965
2994
|
LockIcon.propTypes = {
|
|
2966
|
-
height:
|
|
2967
|
-
width:
|
|
2968
|
-
color:
|
|
2969
|
-
positionTop:
|
|
2995
|
+
height: PropTypes__default["default"].string,
|
|
2996
|
+
width: PropTypes__default["default"].string,
|
|
2997
|
+
color: PropTypes__default["default"].string,
|
|
2998
|
+
positionTop: PropTypes__default["default"].string
|
|
2970
2999
|
};
|
|
2971
3000
|
|
|
2972
3001
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -2976,7 +3005,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
2976
3005
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
2977
3006
|
_ref$positionTop = _ref.positionTop,
|
|
2978
3007
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
2979
|
-
return /*#__PURE__*/
|
|
3008
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2980
3009
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2981
3010
|
width: width,
|
|
2982
3011
|
height: height,
|
|
@@ -2985,21 +3014,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
2985
3014
|
position: "relative",
|
|
2986
3015
|
top: positionTop
|
|
2987
3016
|
}
|
|
2988
|
-
}, /*#__PURE__*/
|
|
3017
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2989
3018
|
fill: "none",
|
|
2990
3019
|
fillRule: "evenodd",
|
|
2991
3020
|
stroke: "none",
|
|
2992
3021
|
strokeWidth: "1"
|
|
2993
|
-
}, /*#__PURE__*/
|
|
3022
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2994
3023
|
fill: color,
|
|
2995
3024
|
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"
|
|
2996
3025
|
}))));
|
|
2997
3026
|
};
|
|
2998
3027
|
StarIcon.propTypes = {
|
|
2999
|
-
height:
|
|
3000
|
-
width:
|
|
3001
|
-
color:
|
|
3002
|
-
positionTop:
|
|
3028
|
+
height: PropTypes__default["default"].string,
|
|
3029
|
+
width: PropTypes__default["default"].string,
|
|
3030
|
+
color: PropTypes__default["default"].string,
|
|
3031
|
+
positionTop: PropTypes__default["default"].string
|
|
3003
3032
|
};
|
|
3004
3033
|
|
|
3005
3034
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -3011,7 +3040,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3011
3040
|
|
|
3012
3041
|
switch (iconType) {
|
|
3013
3042
|
case "crown":
|
|
3014
|
-
return /*#__PURE__*/
|
|
3043
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
3015
3044
|
width: width,
|
|
3016
3045
|
height: height,
|
|
3017
3046
|
color: color,
|
|
@@ -3019,7 +3048,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3019
3048
|
});
|
|
3020
3049
|
|
|
3021
3050
|
case "lock":
|
|
3022
|
-
return /*#__PURE__*/
|
|
3051
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
3023
3052
|
width: width,
|
|
3024
3053
|
height: height,
|
|
3025
3054
|
color: color,
|
|
@@ -3027,7 +3056,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3027
3056
|
});
|
|
3028
3057
|
|
|
3029
3058
|
case "key":
|
|
3030
|
-
return /*#__PURE__*/
|
|
3059
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
3031
3060
|
width: width,
|
|
3032
3061
|
height: height,
|
|
3033
3062
|
color: color,
|
|
@@ -3035,7 +3064,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3035
3064
|
});
|
|
3036
3065
|
|
|
3037
3066
|
default:
|
|
3038
|
-
return /*#__PURE__*/
|
|
3067
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
3039
3068
|
width: width,
|
|
3040
3069
|
height: height,
|
|
3041
3070
|
color: color,
|
|
@@ -3044,21 +3073,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3044
3073
|
}
|
|
3045
3074
|
};
|
|
3046
3075
|
PremiumStoryIcon.propTypes = {
|
|
3047
|
-
width:
|
|
3048
|
-
height:
|
|
3049
|
-
color:
|
|
3050
|
-
iconType:
|
|
3051
|
-
positionTop:
|
|
3076
|
+
width: PropTypes__default["default"].string,
|
|
3077
|
+
height: PropTypes__default["default"].string,
|
|
3078
|
+
color: PropTypes__default["default"].string,
|
|
3079
|
+
iconType: PropTypes__default["default"].string,
|
|
3080
|
+
positionTop: PropTypes__default["default"].string
|
|
3052
3081
|
};
|
|
3053
3082
|
|
|
3054
3083
|
function LiveIcon() {
|
|
3055
|
-
return /*#__PURE__*/
|
|
3084
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3056
3085
|
className: "live-icon",
|
|
3057
3086
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3058
3087
|
width: "25",
|
|
3059
3088
|
height: "24",
|
|
3060
3089
|
viewBox: "0 0 25 24"
|
|
3061
|
-
}, /*#__PURE__*/
|
|
3090
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3062
3091
|
fill: "#ff5858",
|
|
3063
3092
|
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"
|
|
3064
3093
|
}));
|
|
@@ -3115,37 +3144,37 @@ var Headline = function Headline(_ref) {
|
|
|
3115
3144
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3116
3145
|
var iconSize = "24px";
|
|
3117
3146
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
3118
|
-
return /*#__PURE__*/
|
|
3147
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3119
3148
|
"data-test-id": "headline",
|
|
3120
3149
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$9)
|
|
3121
|
-
}, premiumStory && /*#__PURE__*/
|
|
3150
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3122
3151
|
width: iconSize,
|
|
3123
3152
|
height: iconSize,
|
|
3124
3153
|
color: iconColor,
|
|
3125
3154
|
iconType: iconStyle,
|
|
3126
3155
|
positionTop: positionHeadline()
|
|
3127
|
-
}), isLink ? /*#__PURE__*/
|
|
3156
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3128
3157
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3129
3158
|
externalLink: isExternalStory(story),
|
|
3130
3159
|
"aria-label": "headline"
|
|
3131
|
-
}, /*#__PURE__*/
|
|
3160
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3132
3161
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$9)
|
|
3133
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3162
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3134
3163
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$9)
|
|
3135
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3164
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3136
3165
|
};
|
|
3137
3166
|
Headline.propTypes = {
|
|
3138
3167
|
/** The Story Object from the API response */
|
|
3139
|
-
story:
|
|
3168
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3140
3169
|
|
|
3141
3170
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3142
|
-
headerLevel:
|
|
3143
|
-
premiumStoryIconConfig:
|
|
3144
|
-
iconColor:
|
|
3145
|
-
iconType:
|
|
3146
|
-
enablePremiumStoryIcon:
|
|
3171
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3172
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
3173
|
+
iconColor: PropTypes__default["default"].string,
|
|
3174
|
+
iconType: PropTypes__default["default"].string,
|
|
3175
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3147
3176
|
}),
|
|
3148
|
-
isLink:
|
|
3177
|
+
isLink: PropTypes__default["default"].bool
|
|
3149
3178
|
};
|
|
3150
3179
|
Headline.defaultProps = {
|
|
3151
3180
|
headerLevel: "6",
|
|
@@ -3157,20 +3186,20 @@ var UserFallbackIcon = function UserFallbackIcon(_ref) {
|
|
|
3157
3186
|
width = _ref$width === void 0 ? 120 : _ref$width,
|
|
3158
3187
|
_ref$height = _ref.height,
|
|
3159
3188
|
height = _ref$height === void 0 ? 120 : _ref$height;
|
|
3160
|
-
return /*#__PURE__*/
|
|
3189
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3161
3190
|
width: width,
|
|
3162
3191
|
height: height,
|
|
3163
3192
|
viewBox: "0 0 120 120",
|
|
3164
3193
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3165
|
-
}, /*#__PURE__*/
|
|
3194
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3166
3195
|
d: "M93.28 108.98c-1.055-17.675-15.47-31.678-33.098-31.678-17.708 0-32.173 14.129-33.11 31.916 9.415 6.311 20.741 9.993 32.927 9.993 12.338 0 23.795-3.774 33.28-10.23l.001-.001zM58.584 73.283c9.928 0 17.977-8.275 17.977-18.483 0-10.209-8.049-18.484-17.977-18.484-9.929 0-17.977 8.275-17.977 18.484 0 10.208 8.048 18.483 17.977 18.483zM60 120C26.863 120 0 93.137 0 60S26.863 0 60 0s60 26.863 60 60-26.863 60-60 60z",
|
|
3167
3196
|
fill: "#DADADA",
|
|
3168
3197
|
fillRule: "nonzero"
|
|
3169
3198
|
}));
|
|
3170
3199
|
};
|
|
3171
3200
|
UserFallbackIcon.propTypes = {
|
|
3172
|
-
width:
|
|
3173
|
-
height:
|
|
3201
|
+
width: PropTypes__default["default"].object,
|
|
3202
|
+
height: PropTypes__default["default"].object
|
|
3174
3203
|
};
|
|
3175
3204
|
|
|
3176
3205
|
var _styleModuleImportMap$8 = {
|
|
@@ -3190,12 +3219,12 @@ var authorWithImage = function authorWithImage(author, templateStyle) {
|
|
|
3190
3219
|
var avatarUrl = author["avatar-url"],
|
|
3191
3220
|
avatarS3Key = author["avatar-s3-key"],
|
|
3192
3221
|
name = author.name;
|
|
3193
|
-
return /*#__PURE__*/
|
|
3222
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3194
3223
|
"data-test-id": "author-image",
|
|
3195
3224
|
className: "arr--author-image " + _getClassName("author-image ".concat(templateStyle), _styleModuleImportMap$8)
|
|
3196
|
-
}, /*#__PURE__*/
|
|
3225
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3197
3226
|
className: "author-image-m_image-container__19WNd"
|
|
3198
|
-
}, avatarS3Key ? /*#__PURE__*/
|
|
3227
|
+
}, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3199
3228
|
slug: avatarS3Key,
|
|
3200
3229
|
alt: name,
|
|
3201
3230
|
defaultWidth: 250,
|
|
@@ -3205,9 +3234,9 @@ var authorWithImage = function authorWithImage(author, templateStyle) {
|
|
|
3205
3234
|
imgParams: {
|
|
3206
3235
|
auto: ["format", "compress"]
|
|
3207
3236
|
}
|
|
3208
|
-
}) : avatarUrl ? /*#__PURE__*/
|
|
3237
|
+
}) : avatarUrl ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3209
3238
|
src: avatarUrl
|
|
3210
|
-
}) : /*#__PURE__*/
|
|
3239
|
+
}) : /*#__PURE__*/React__default["default"].createElement(UserFallbackIcon, null)));
|
|
3211
3240
|
};
|
|
3212
3241
|
|
|
3213
3242
|
var AuthorImage = function AuthorImage(_ref) {
|
|
@@ -3221,19 +3250,19 @@ var AuthorImage = function AuthorImage(_ref) {
|
|
|
3221
3250
|
var mountAt = config.mountAt || "";
|
|
3222
3251
|
var templateStyle = "";
|
|
3223
3252
|
if (template === "smallerCircle") templateStyle = "smaller-circle";else if (template === "smallCircle") templateStyle = "small-circle";else if (template === "square") templateStyle = "square";
|
|
3224
|
-
if (slug) return /*#__PURE__*/
|
|
3253
|
+
if (slug) return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3225
3254
|
href: "".concat(mountAt, "/author/") + slug
|
|
3226
3255
|
}, authorWithImage(author, templateStyle));else return authorWithImage(author, templateStyle);
|
|
3227
3256
|
};
|
|
3228
3257
|
|
|
3229
3258
|
AuthorImage.propTypes = {
|
|
3230
|
-
author:
|
|
3231
|
-
"avatar-url":
|
|
3232
|
-
"avatar-s3-key":
|
|
3233
|
-
name:
|
|
3234
|
-
slug:
|
|
3259
|
+
author: PropTypes__default["default"].shape({
|
|
3260
|
+
"avatar-url": PropTypes__default["default"].string,
|
|
3261
|
+
"avatar-s3-key": PropTypes__default["default"].string,
|
|
3262
|
+
name: PropTypes__default["default"].string,
|
|
3263
|
+
slug: PropTypes__default["default"].string
|
|
3235
3264
|
}),
|
|
3236
|
-
template:
|
|
3265
|
+
template: PropTypes__default["default"].string
|
|
3237
3266
|
};
|
|
3238
3267
|
|
|
3239
3268
|
var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
@@ -3241,7 +3270,7 @@ var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
|
3241
3270
|
componentName = _ref.componentName,
|
|
3242
3271
|
offset = _ref.offset,
|
|
3243
3272
|
limit = _ref.limit;
|
|
3244
|
-
return /*#__PURE__*/
|
|
3273
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3245
3274
|
id: "ELM-".concat(collection.id),
|
|
3246
3275
|
"data-collection-slug": collection["slug"],
|
|
3247
3276
|
"data-component-name": componentName,
|
|
@@ -3250,13 +3279,13 @@ var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
|
3250
3279
|
});
|
|
3251
3280
|
};
|
|
3252
3281
|
LoadMoreTarget.propTypes = {
|
|
3253
|
-
collection:
|
|
3254
|
-
id:
|
|
3255
|
-
slug:
|
|
3282
|
+
collection: PropTypes__default["default"].shape({
|
|
3283
|
+
id: PropTypes__default["default"].string,
|
|
3284
|
+
slug: PropTypes__default["default"].string
|
|
3256
3285
|
}),
|
|
3257
|
-
componentName:
|
|
3258
|
-
offset:
|
|
3259
|
-
limit:
|
|
3286
|
+
componentName: PropTypes__default["default"].string,
|
|
3287
|
+
offset: PropTypes__default["default"].number,
|
|
3288
|
+
limit: PropTypes__default["default"].number
|
|
3260
3289
|
};
|
|
3261
3290
|
|
|
3262
3291
|
var _styleModuleImportMap$7 = {
|
|
@@ -3295,7 +3324,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3295
3324
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
3296
3325
|
|
|
3297
3326
|
var borderBottomStyle = function borderBottomStyle() {
|
|
3298
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
3327
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3299
3328
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
3300
3329
|
style: {
|
|
3301
3330
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -3355,40 +3384,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3355
3384
|
}
|
|
3356
3385
|
};
|
|
3357
3386
|
|
|
3358
|
-
return /*#__PURE__*/
|
|
3387
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3359
3388
|
style: {
|
|
3360
3389
|
borderBottom: borderBottomFullStyle
|
|
3361
3390
|
},
|
|
3362
3391
|
"data-test-id": "collection-name",
|
|
3363
3392
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$7)
|
|
3364
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
3393
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3365
3394
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
3366
3395
|
style: {
|
|
3367
3396
|
color: CollectionNameBorderColor,
|
|
3368
3397
|
fontSize: getBorderHeight()
|
|
3369
3398
|
}
|
|
3370
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
3399
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3371
3400
|
href: slug,
|
|
3372
3401
|
"aria-label": "collection-name"
|
|
3373
|
-
}, /*#__PURE__*/
|
|
3402
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
3374
3403
|
};
|
|
3375
3404
|
CollectionNameBase.propTypes = {
|
|
3376
3405
|
/** Collection name border color */
|
|
3377
|
-
collectionNameBorderColor: PropTypes
|
|
3406
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
3378
3407
|
|
|
3379
3408
|
/** The Collection Object from the API response */
|
|
3380
|
-
collection: PropTypes
|
|
3409
|
+
collection: PropTypes.PropTypes.object,
|
|
3381
3410
|
|
|
3382
3411
|
/** The publisher config from the API response */
|
|
3383
|
-
config: PropTypes
|
|
3412
|
+
config: PropTypes.PropTypes.object,
|
|
3384
3413
|
|
|
3385
3414
|
/** The style template for the component */
|
|
3386
|
-
collectionNameTemplate: PropTypes
|
|
3415
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
3387
3416
|
|
|
3388
3417
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3389
|
-
headerLevel: PropTypes
|
|
3390
|
-
customCollectionName: PropTypes
|
|
3391
|
-
navigate: PropTypes
|
|
3418
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
3419
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
3420
|
+
navigate: PropTypes.PropTypes.bool
|
|
3392
3421
|
};
|
|
3393
3422
|
CollectionNameBase.defaultProps = {
|
|
3394
3423
|
collectionNameTemplate: "",
|
|
@@ -3401,7 +3430,7 @@ function mapStateToProps(state) {
|
|
|
3401
3430
|
};
|
|
3402
3431
|
}
|
|
3403
3432
|
|
|
3404
|
-
var CollectionName = connect(mapStateToProps)(CollectionNameBase);
|
|
3433
|
+
var CollectionName = reactRedux.connect(mapStateToProps)(CollectionNameBase);
|
|
3405
3434
|
|
|
3406
3435
|
var _styleModuleImportMap$6 = {
|
|
3407
3436
|
"./timestamp.m.css": {
|
|
@@ -3422,18 +3451,18 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3422
3451
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3423
3452
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3424
3453
|
var textColor = getTextColor(configState.theme);
|
|
3425
|
-
return /*#__PURE__*/
|
|
3454
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3426
3455
|
"data-test-id": "publish-time",
|
|
3427
3456
|
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$6)
|
|
3428
|
-
}, /*#__PURE__*/
|
|
3457
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3429
3458
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3430
3459
|
}, getTimeStamp(time, formatter, config))));
|
|
3431
3460
|
};
|
|
3432
3461
|
TimeStamp.propTypes = {
|
|
3433
3462
|
/** The Story Object from the API response */
|
|
3434
|
-
story:
|
|
3435
|
-
isBottom:
|
|
3436
|
-
config:
|
|
3463
|
+
story: PropTypes__default["default"].object,
|
|
3464
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3465
|
+
config: PropTypes__default["default"].object
|
|
3437
3466
|
};
|
|
3438
3467
|
|
|
3439
3468
|
var _styleModuleImportMap$5 = {
|
|
@@ -3449,14 +3478,14 @@ var Dot = function Dot(_ref) {
|
|
|
3449
3478
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3450
3479
|
_ref$color = _ref.color,
|
|
3451
3480
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3452
|
-
return /*#__PURE__*/
|
|
3481
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3453
3482
|
className: _getClassName(color, _styleModuleImportMap$5)
|
|
3454
|
-
}, /*#__PURE__*/
|
|
3483
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3455
3484
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3456
3485
|
width: width,
|
|
3457
3486
|
height: height,
|
|
3458
3487
|
viewBox: "0 0 3 3"
|
|
3459
|
-
}, /*#__PURE__*/
|
|
3488
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3460
3489
|
cx: "87",
|
|
3461
3490
|
cy: "9",
|
|
3462
3491
|
r: "1",
|
|
@@ -3467,9 +3496,9 @@ var Dot = function Dot(_ref) {
|
|
|
3467
3496
|
};
|
|
3468
3497
|
Dot.propTypes = {
|
|
3469
3498
|
/** height , width and color of the dot icon */
|
|
3470
|
-
color:
|
|
3471
|
-
width:
|
|
3472
|
-
height:
|
|
3499
|
+
color: PropTypes__default["default"].string,
|
|
3500
|
+
width: PropTypes__default["default"].string,
|
|
3501
|
+
height: PropTypes__default["default"].string
|
|
3473
3502
|
};
|
|
3474
3503
|
|
|
3475
3504
|
var _styleModuleImportMap$4 = {
|
|
@@ -3485,22 +3514,22 @@ var Divider = function Divider(_ref) {
|
|
|
3485
3514
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3486
3515
|
_ref$color = _ref.color,
|
|
3487
3516
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3488
|
-
return /*#__PURE__*/
|
|
3517
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3489
3518
|
className: _getClassName(color, _styleModuleImportMap$4)
|
|
3490
|
-
}, /*#__PURE__*/
|
|
3519
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3491
3520
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3492
3521
|
width: width,
|
|
3493
3522
|
height: height
|
|
3494
|
-
}, /*#__PURE__*/
|
|
3523
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3495
3524
|
fill: "inherit",
|
|
3496
3525
|
d: "M0 0h1v10H0z"
|
|
3497
3526
|
})));
|
|
3498
3527
|
};
|
|
3499
3528
|
Divider.propTypes = {
|
|
3500
3529
|
/** height , width and color of the dot icon */
|
|
3501
|
-
color:
|
|
3502
|
-
width:
|
|
3503
|
-
height:
|
|
3530
|
+
color: PropTypes__default["default"].string,
|
|
3531
|
+
width: PropTypes__default["default"].string,
|
|
3532
|
+
height: PropTypes__default["default"].string
|
|
3504
3533
|
};
|
|
3505
3534
|
|
|
3506
3535
|
var _styleModuleImportMap$3 = {
|
|
@@ -3523,23 +3552,23 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3523
3552
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3524
3553
|
if (!showReadTime || !readTime) return null;
|
|
3525
3554
|
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
3526
|
-
return /*#__PURE__*/
|
|
3555
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3527
3556
|
"data-test-id": "read-time",
|
|
3528
3557
|
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$3)
|
|
3529
|
-
}, /*#__PURE__*/
|
|
3558
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3530
3559
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3531
|
-
}, /*#__PURE__*/
|
|
3560
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3532
3561
|
color: textColor
|
|
3533
|
-
})), /*#__PURE__*/
|
|
3562
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3534
3563
|
};
|
|
3535
3564
|
ReadTime.propTypes = {
|
|
3536
|
-
story:
|
|
3537
|
-
"read-time":
|
|
3565
|
+
story: PropTypes__default["default"].shape({
|
|
3566
|
+
"read-time": PropTypes__default["default"].number
|
|
3538
3567
|
}),
|
|
3539
|
-
opts:
|
|
3540
|
-
showReadTime:
|
|
3568
|
+
opts: PropTypes__default["default"].shape({
|
|
3569
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3541
3570
|
}),
|
|
3542
|
-
isLightTheme:
|
|
3571
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3543
3572
|
};
|
|
3544
3573
|
|
|
3545
3574
|
var _styleModuleImportMap$2 = {
|
|
@@ -3570,33 +3599,33 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3570
3599
|
|
|
3571
3600
|
var getSeparator = function getSeparator() {
|
|
3572
3601
|
if (separator === "divider") {
|
|
3573
|
-
return /*#__PURE__*/
|
|
3602
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3574
3603
|
color: textColor
|
|
3575
3604
|
});
|
|
3576
3605
|
}
|
|
3577
3606
|
|
|
3578
|
-
return /*#__PURE__*/
|
|
3607
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3579
3608
|
color: textColor
|
|
3580
3609
|
});
|
|
3581
3610
|
};
|
|
3582
3611
|
|
|
3583
3612
|
var getTimeStamp = function getTimeStamp() {
|
|
3584
3613
|
if (!isTime) return null;
|
|
3585
|
-
return /*#__PURE__*/
|
|
3614
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3586
3615
|
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$2)
|
|
3587
|
-
}, getSeparator()), /*#__PURE__*/
|
|
3616
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3588
3617
|
story: story,
|
|
3589
3618
|
config: config
|
|
3590
|
-
}), isReadTime && /*#__PURE__*/
|
|
3619
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3591
3620
|
story: story,
|
|
3592
3621
|
opts: config,
|
|
3593
3622
|
isLightTheme: isLightTheme
|
|
3594
3623
|
}));
|
|
3595
3624
|
};
|
|
3596
3625
|
|
|
3597
|
-
return /*#__PURE__*/
|
|
3626
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3598
3627
|
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$2)
|
|
3599
|
-
}, isAuthor ? /*#__PURE__*/
|
|
3628
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3600
3629
|
story: story,
|
|
3601
3630
|
isBottom: true,
|
|
3602
3631
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3604,19 +3633,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3604
3633
|
}), getTimeStamp()) : getTimeStamp());
|
|
3605
3634
|
};
|
|
3606
3635
|
AuthorWithTime.propTypes = {
|
|
3607
|
-
story:
|
|
3636
|
+
story: PropTypes__default["default"].object,
|
|
3608
3637
|
|
|
3609
3638
|
/** Style of separator between the Author & Timestamp */
|
|
3610
|
-
separator:
|
|
3639
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3611
3640
|
|
|
3612
3641
|
/** hide the author image */
|
|
3613
|
-
hideAuthorImage:
|
|
3642
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3614
3643
|
// fix author and time at the end
|
|
3615
|
-
isBottom:
|
|
3644
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3616
3645
|
// fix prefix before the author name
|
|
3617
|
-
prefix:
|
|
3618
|
-
config:
|
|
3619
|
-
isLightTheme:
|
|
3646
|
+
prefix: PropTypes__default["default"].string,
|
|
3647
|
+
config: PropTypes__default["default"].object,
|
|
3648
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3620
3649
|
};
|
|
3621
3650
|
AuthorWithTime.defaultProps = {
|
|
3622
3651
|
separator: "dot",
|
|
@@ -3658,26 +3687,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
3658
3687
|
if (!showButton) return null;
|
|
3659
3688
|
var textColor = getTextColor(theme);
|
|
3660
3689
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread$1(_objectSpread$1({}, qtConfig), config));
|
|
3661
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
3690
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3662
3691
|
onClick: onClick,
|
|
3663
3692
|
"data-test-id": "load-more",
|
|
3664
3693
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$1)
|
|
3665
|
-
}, buttonText) : /*#__PURE__*/
|
|
3694
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
3666
3695
|
href: slug,
|
|
3667
3696
|
navigateTo: navigate,
|
|
3668
3697
|
"data-test-id": "load-more",
|
|
3669
3698
|
"aria-label": "load-more"
|
|
3670
|
-
}, /*#__PURE__*/
|
|
3699
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3671
3700
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$1)
|
|
3672
3701
|
}, buttonText));
|
|
3673
3702
|
};
|
|
3674
3703
|
LoadmoreButton.propTypes = {
|
|
3675
|
-
collection:
|
|
3676
|
-
template:
|
|
3677
|
-
config:
|
|
3678
|
-
onClick:
|
|
3679
|
-
navigate:
|
|
3680
|
-
qtConfig:
|
|
3704
|
+
collection: PropTypes__default["default"].object,
|
|
3705
|
+
template: PropTypes__default["default"].string,
|
|
3706
|
+
config: PropTypes__default["default"].object,
|
|
3707
|
+
onClick: PropTypes__default["default"].func,
|
|
3708
|
+
navigate: PropTypes__default["default"].func,
|
|
3709
|
+
qtConfig: PropTypes__default["default"].object
|
|
3681
3710
|
};
|
|
3682
3711
|
|
|
3683
3712
|
function _arrayWithHoles(arr) {
|
|
@@ -3750,7 +3779,7 @@ var hasIntersectionObserverSupport = function hasIntersectionObserverSupport() {
|
|
|
3750
3779
|
|
|
3751
3780
|
|
|
3752
3781
|
var getIntersectionObserver = function getIntersectionObserver() {
|
|
3753
|
-
return Promise.resolve(isClient && !hasIntersectionObserverSupport() &&
|
|
3782
|
+
return Promise.resolve(isClient && !hasIntersectionObserverSupport() && Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('intersection-observer')); }));
|
|
3754
3783
|
}; // options for intersection observer in order to improve the effect
|
|
3755
3784
|
|
|
3756
3785
|
|
|
@@ -3783,12 +3812,12 @@ var getObserver = function getObserver() {
|
|
|
3783
3812
|
var useNearScreen = (function (_ref) {
|
|
3784
3813
|
var ref = _ref.ref;
|
|
3785
3814
|
|
|
3786
|
-
var _useState = useState(false),
|
|
3815
|
+
var _useState = React.useState(false),
|
|
3787
3816
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3788
3817
|
show = _useState2[0],
|
|
3789
3818
|
setShow = _useState2[1];
|
|
3790
3819
|
|
|
3791
|
-
useEffect(function () {
|
|
3820
|
+
React.useEffect(function () {
|
|
3792
3821
|
var current = ref.current;
|
|
3793
3822
|
if (!current) return; // get observer async and only when needed
|
|
3794
3823
|
|
|
@@ -3815,36 +3844,36 @@ var EMPTY_HTML = {
|
|
|
3815
3844
|
var isServer = typeof window === "undefined";
|
|
3816
3845
|
var ProgressiveHydration = function ProgressiveHydration(props) {
|
|
3817
3846
|
var children = props.children;
|
|
3818
|
-
var ref = useRef(null);
|
|
3847
|
+
var ref = React.useRef(null);
|
|
3819
3848
|
var isNearScreen = useNearScreen({
|
|
3820
3849
|
ref: ref
|
|
3821
3850
|
});
|
|
3822
|
-
useEffect(function () {
|
|
3851
|
+
React.useEffect(function () {
|
|
3823
3852
|
var el = ref.current; // CLIENT:
|
|
3824
3853
|
// If we want to force the hydration OR the element is near screen
|
|
3825
3854
|
// then we hydrate the content to get the functionality ready
|
|
3826
3855
|
|
|
3827
3856
|
if (isNearScreen) {
|
|
3828
3857
|
var action = el.hasChildNodes() ? "hydrate" : "render";
|
|
3829
|
-
|
|
3858
|
+
ReactDOM__default["default"][action](children, el);
|
|
3830
3859
|
}
|
|
3831
3860
|
}, [children, isNearScreen]); // SERVER: Just render the content as usual
|
|
3832
3861
|
|
|
3833
3862
|
if (isServer) {
|
|
3834
|
-
return /*#__PURE__*/
|
|
3863
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3835
3864
|
ref: ref
|
|
3836
3865
|
}, children);
|
|
3837
3866
|
} // CLIENT: Avoid hydration until we say so
|
|
3838
3867
|
|
|
3839
3868
|
|
|
3840
|
-
return /*#__PURE__*/
|
|
3869
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3841
3870
|
ref: ref,
|
|
3842
3871
|
suppressHydrationWarning: true,
|
|
3843
3872
|
dangerouslySetInnerHTML: EMPTY_HTML
|
|
3844
3873
|
});
|
|
3845
3874
|
};
|
|
3846
3875
|
ProgressiveHydration.propTypes = {
|
|
3847
|
-
children:
|
|
3876
|
+
children: PropTypes__default["default"].element
|
|
3848
3877
|
};
|
|
3849
3878
|
|
|
3850
3879
|
var _styleModuleImportMap = {
|
|
@@ -3889,7 +3918,7 @@ var OpinionCollectionBase = function OpinionCollectionBase(_ref2) {
|
|
|
3889
3918
|
isLoadMoreVisible = _ref2.isLoadMoreVisible,
|
|
3890
3919
|
isLoading = _ref2.isLoading,
|
|
3891
3920
|
isolatedLoadMore = _ref2.isolatedLoadMore;
|
|
3892
|
-
var stories = collectionToStories(collection);
|
|
3921
|
+
var stories = components.collectionToStories(collection);
|
|
3893
3922
|
var _config$theme = config.theme,
|
|
3894
3923
|
theme = _config$theme === void 0 ? "" : _config$theme,
|
|
3895
3924
|
_config$footerButton = config.footerButton,
|
|
@@ -3911,8 +3940,8 @@ var OpinionCollectionBase = function OpinionCollectionBase(_ref2) {
|
|
|
3911
3940
|
_get$component = _get.component,
|
|
3912
3941
|
component = _get$component === void 0 ? null : _get$component;
|
|
3913
3942
|
|
|
3914
|
-
var dispatch = useDispatch();
|
|
3915
|
-
var qtConfig = useSelector(function (state) {
|
|
3943
|
+
var dispatch = reactRedux.useDispatch();
|
|
3944
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
3916
3945
|
return get_1(state, ["qt", "config"], {});
|
|
3917
3946
|
});
|
|
3918
3947
|
if (!stories.length) return null;
|
|
@@ -3925,7 +3954,7 @@ var OpinionCollectionBase = function OpinionCollectionBase(_ref2) {
|
|
|
3925
3954
|
if (!isLoadMoreVisible) return null;
|
|
3926
3955
|
|
|
3927
3956
|
if (isolatedLoadMore) {
|
|
3928
|
-
return /*#__PURE__*/
|
|
3957
|
+
return /*#__PURE__*/React__default["default"].createElement(LoadMoreTarget, {
|
|
3929
3958
|
collection: collection,
|
|
3930
3959
|
componentName: "OpinionCollection",
|
|
3931
3960
|
offset: stories.length,
|
|
@@ -3934,7 +3963,7 @@ var OpinionCollectionBase = function OpinionCollectionBase(_ref2) {
|
|
|
3934
3963
|
}
|
|
3935
3964
|
|
|
3936
3965
|
var url = generateNavigateSlug(collection, qtConfig);
|
|
3937
|
-
return /*#__PURE__*/
|
|
3966
|
+
return /*#__PURE__*/React__default["default"].createElement(ProgressiveHydration, null, /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
3938
3967
|
config: config,
|
|
3939
3968
|
collection: collection,
|
|
3940
3969
|
template: footerButton,
|
|
@@ -3950,20 +3979,20 @@ var OpinionCollectionBase = function OpinionCollectionBase(_ref2) {
|
|
|
3950
3979
|
|
|
3951
3980
|
var getAuthorCard = function getAuthorCard(story) {
|
|
3952
3981
|
var authorData = get_1(story, ["authors", "0"]);
|
|
3953
|
-
return /*#__PURE__*/
|
|
3982
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3954
3983
|
"data-test-id": "story-card"
|
|
3955
|
-
}, /*#__PURE__*/
|
|
3984
|
+
}, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3956
3985
|
story: story,
|
|
3957
3986
|
hideAuthorImage: true
|
|
3958
|
-
}), /*#__PURE__*/
|
|
3987
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3959
3988
|
className: "opinion-collection-m_headline-author__2H6Tv"
|
|
3960
|
-
}, /*#__PURE__*/
|
|
3989
|
+
}, /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
3961
3990
|
story: story
|
|
3962
|
-
}), /*#__PURE__*/
|
|
3991
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorImage, {
|
|
3963
3992
|
author: authorData,
|
|
3964
3993
|
template: "smallerCircle",
|
|
3965
3994
|
config: config
|
|
3966
|
-
})), /*#__PURE__*/
|
|
3995
|
+
})), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
3967
3996
|
story: story,
|
|
3968
3997
|
config: _objectSpread(_objectSpread({}, config), {}, {
|
|
3969
3998
|
disableMeridiem: true,
|
|
@@ -3973,31 +4002,31 @@ var OpinionCollectionBase = function OpinionCollectionBase(_ref2) {
|
|
|
3973
4002
|
};
|
|
3974
4003
|
|
|
3975
4004
|
var countStyleName = stories.length === 2 || stories.length === 3 ? "count-".concat(stories.length) : "";
|
|
3976
|
-
return /*#__PURE__*/
|
|
4005
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3977
4006
|
className: "full-width-with-padding arrow-component",
|
|
3978
4007
|
"data-test-id": "opinion-collection",
|
|
3979
4008
|
style: {
|
|
3980
4009
|
backgroundColor: theme,
|
|
3981
4010
|
color: textColor
|
|
3982
4011
|
}
|
|
3983
|
-
}, /*#__PURE__*/
|
|
4012
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3984
4013
|
className: "opinion-collection-m_opinion-collection__1Bc7h",
|
|
3985
4014
|
style: {
|
|
3986
4015
|
backgroundColor: theme,
|
|
3987
4016
|
color: textColor
|
|
3988
4017
|
}
|
|
3989
|
-
}, /*#__PURE__*/
|
|
4018
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
3990
4019
|
collection: collection,
|
|
3991
4020
|
collectionNameTemplate: collectionNameTemplate,
|
|
3992
4021
|
collectionNameBorderColor: collectionNameBorderColor,
|
|
3993
4022
|
headerLevel: 2
|
|
3994
|
-
}), /*#__PURE__*/
|
|
4023
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3995
4024
|
className: ("content-wrapper ".concat(borderStyle, " ").concat(textColor) ? "content-wrapper ".concat(borderStyle, " ").concat(textColor) + " " : "") + _getClassName("content-wrapper ".concat(borderStyle, " ").concat(textColor, " ").concat(adStyle), _styleModuleImportMap)
|
|
3996
|
-
}, slot ? /*#__PURE__*/
|
|
4025
|
+
}, slot ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3997
4026
|
className: "wrapper-with-ads " + _getClassName("wrapper-with-ads ".concat(countStyleName), _styleModuleImportMap)
|
|
3998
4027
|
}, stories.slice(0, 4).map(function (story) {
|
|
3999
4028
|
return getAuthorCard(story);
|
|
4000
|
-
})), /*#__PURE__*/
|
|
4029
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4001
4030
|
className: "opinion-collection-m_ad-slot__2ZpaC"
|
|
4002
4031
|
}, slot)) : stories.map(function (story) {
|
|
4003
4032
|
return getAuthorCard(story);
|
|
@@ -4009,20 +4038,20 @@ var OpinionCollectionBase = function OpinionCollectionBase(_ref2) {
|
|
|
4009
4038
|
})));
|
|
4010
4039
|
};
|
|
4011
4040
|
OpinionCollectionBase.propTypes = {
|
|
4012
|
-
collection:
|
|
4013
|
-
config:
|
|
4014
|
-
collectionNameBorderColor:
|
|
4015
|
-
theme:
|
|
4016
|
-
collectionNameTemplate:
|
|
4017
|
-
footerButton:
|
|
4018
|
-
border:
|
|
4019
|
-
slotConfig:
|
|
4020
|
-
subsequentLoadCount:
|
|
4041
|
+
collection: PropTypes__default["default"].object,
|
|
4042
|
+
config: PropTypes__default["default"].shape({
|
|
4043
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
4044
|
+
theme: PropTypes__default["default"].string,
|
|
4045
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
4046
|
+
footerButton: PropTypes__default["default"].string,
|
|
4047
|
+
border: PropTypes__default["default"].string,
|
|
4048
|
+
slotConfig: PropTypes__default["default"].array,
|
|
4049
|
+
subsequentLoadCount: PropTypes__default["default"].number
|
|
4021
4050
|
}),
|
|
4022
|
-
getMoreStories:
|
|
4023
|
-
isLoading:
|
|
4024
|
-
isLoadMoreVisible:
|
|
4025
|
-
isolatedLoadMore:
|
|
4051
|
+
getMoreStories: PropTypes__default["default"].func,
|
|
4052
|
+
isLoading: PropTypes__default["default"].bool,
|
|
4053
|
+
isLoadMoreVisible: PropTypes__default["default"].bool,
|
|
4054
|
+
isolatedLoadMore: PropTypes__default["default"].bool
|
|
4026
4055
|
};
|
|
4027
4056
|
OpinionCollectionBase.defaultProps = {
|
|
4028
4057
|
getMoreStories: function getMoreStories() {},
|
|
@@ -4034,4 +4063,5 @@ OpinionCollectionBase.defaultProps = {
|
|
|
4034
4063
|
};
|
|
4035
4064
|
var OpinionCollection = StateProvider(OpinionCollectionBase);
|
|
4036
4065
|
|
|
4037
|
-
|
|
4066
|
+
exports.OpinionCollection = OpinionCollection;
|
|
4067
|
+
exports.OpinionCollectionBase = OpinionCollectionBase;
|