@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 reactRedux = require('react-redux');
|
|
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 _arrayWithHoles(arr) {
|
|
10
39
|
if (Array.isArray(arr)) return arr;
|
|
@@ -2719,15 +2748,15 @@ function isExternalStory() {
|
|
|
2719
2748
|
metadata = _story$metadata === void 0 ? {} : _story$metadata;
|
|
2720
2749
|
return storyTemplate === "news-elsewhere" ? get_1(metadata, ["reference-url"], "") : "";
|
|
2721
2750
|
} // Adds target='_blank' attribute to anchor tags if not present
|
|
2722
|
-
|
|
2723
|
-
"sketches-host":
|
|
2724
|
-
"cdn-name":
|
|
2725
|
-
"cdn-image":
|
|
2751
|
+
PropTypes__default["default"].shape({
|
|
2752
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2753
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2754
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2726
2755
|
});
|
|
2727
|
-
|
|
2728
|
-
headline:
|
|
2729
|
-
"last-published-at":
|
|
2730
|
-
subheadline:
|
|
2756
|
+
PropTypes__default["default"].shape({
|
|
2757
|
+
headline: PropTypes__default["default"].string,
|
|
2758
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2759
|
+
subheadline: PropTypes__default["default"].string
|
|
2731
2760
|
});
|
|
2732
2761
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2733
2762
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2771,17 +2800,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2771
2800
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2772
2801
|
|
|
2773
2802
|
if (timezone && template === "story") {
|
|
2774
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2775
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2803
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2804
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2776
2805
|
timeZone: timezone
|
|
2777
2806
|
});
|
|
2778
2807
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2779
|
-
return /*#__PURE__*/
|
|
2808
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2780
2809
|
dateTime: formatZonedTime
|
|
2781
2810
|
}, timeStamp);
|
|
2782
2811
|
}
|
|
2783
2812
|
|
|
2784
|
-
return /*#__PURE__*/
|
|
2813
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2785
2814
|
date: date,
|
|
2786
2815
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2787
2816
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2789,21 +2818,21 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2789
2818
|
});
|
|
2790
2819
|
};
|
|
2791
2820
|
|
|
2792
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
2821
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
2793
2822
|
|
|
2794
2823
|
var StateProvider = function StateProvider(RowComponent) {
|
|
2795
2824
|
return function (props) {
|
|
2796
2825
|
return (
|
|
2797
2826
|
/*#__PURE__*/
|
|
2798
2827
|
// eslint-disable-next-line react/prop-types
|
|
2799
|
-
|
|
2828
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
2800
2829
|
value: props.config
|
|
2801
|
-
}, /*#__PURE__*/
|
|
2830
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
2802
2831
|
);
|
|
2803
2832
|
};
|
|
2804
2833
|
};
|
|
2805
2834
|
var useStateValue = function useStateValue() {
|
|
2806
|
-
return useContext(StateContext);
|
|
2835
|
+
return React.useContext(StateContext);
|
|
2807
2836
|
};
|
|
2808
2837
|
|
|
2809
2838
|
var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
@@ -2813,27 +2842,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
2813
2842
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
2814
2843
|
_ref$iconColor = _ref.iconColor,
|
|
2815
2844
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
2816
|
-
return /*#__PURE__*/
|
|
2845
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2817
2846
|
width: width,
|
|
2818
2847
|
height: height,
|
|
2819
2848
|
viewBox: "0 0 102 76",
|
|
2820
2849
|
version: "1.1"
|
|
2821
|
-
}, /*#__PURE__*/
|
|
2850
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2822
2851
|
id: "demo-home-copy",
|
|
2823
2852
|
stroke: "none",
|
|
2824
2853
|
strokeWidth: "1",
|
|
2825
2854
|
fill: "none",
|
|
2826
2855
|
fillRule: "evenodd",
|
|
2827
2856
|
transform: "translate(-377.000000, -314.000000)"
|
|
2828
|
-
}, /*#__PURE__*/
|
|
2857
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2829
2858
|
id: "Group-13",
|
|
2830
2859
|
transform: "translate(377.000000, 314.000000)"
|
|
2831
|
-
}, /*#__PURE__*/
|
|
2860
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2832
2861
|
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",
|
|
2833
2862
|
id: "Combined-Shape",
|
|
2834
2863
|
fill: iconColor,
|
|
2835
2864
|
fillRule: "nonzero"
|
|
2836
|
-
}), /*#__PURE__*/
|
|
2865
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
2837
2866
|
id: "Rectangle-19",
|
|
2838
2867
|
stroke: iconColor,
|
|
2839
2868
|
strokeWidth: "3",
|
|
@@ -2845,24 +2874,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
2845
2874
|
}))));
|
|
2846
2875
|
};
|
|
2847
2876
|
ImageFallbackIcon.propTypes = {
|
|
2848
|
-
width:
|
|
2849
|
-
height:
|
|
2850
|
-
iconColor:
|
|
2877
|
+
width: PropTypes__default["default"].object,
|
|
2878
|
+
height: PropTypes__default["default"].object,
|
|
2879
|
+
iconColor: PropTypes__default["default"].object
|
|
2851
2880
|
};
|
|
2852
2881
|
|
|
2853
2882
|
var imageFallback = function imageFallback() {
|
|
2854
|
-
return /*#__PURE__*/
|
|
2883
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2855
2884
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
2856
|
-
}, /*#__PURE__*/
|
|
2885
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
2857
2886
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
2858
|
-
}, /*#__PURE__*/
|
|
2887
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
2859
2888
|
};
|
|
2860
2889
|
|
|
2861
2890
|
var FallbackImage = function FallbackImage(_ref) {
|
|
2862
2891
|
var slug = _ref.slug;
|
|
2863
2892
|
|
|
2864
2893
|
if (slug) {
|
|
2865
|
-
return /*#__PURE__*/
|
|
2894
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2866
2895
|
href: slug,
|
|
2867
2896
|
"aria-label": "image-fallback"
|
|
2868
2897
|
}, imageFallback());
|
|
@@ -2871,23 +2900,23 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
2871
2900
|
}
|
|
2872
2901
|
};
|
|
2873
2902
|
FallbackImage.propTypes = {
|
|
2874
|
-
slug:
|
|
2903
|
+
slug: PropTypes__default["default"].string
|
|
2875
2904
|
};
|
|
2876
2905
|
|
|
2877
2906
|
var HyperLinkIcon = function HyperLinkIcon() {
|
|
2878
|
-
return /*#__PURE__*/
|
|
2907
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2879
2908
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2880
2909
|
width: "36",
|
|
2881
2910
|
height: "28"
|
|
2882
|
-
}, /*#__PURE__*/
|
|
2911
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2883
2912
|
fill: "none",
|
|
2884
2913
|
fillRule: "evenodd"
|
|
2885
|
-
}, /*#__PURE__*/
|
|
2914
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
2886
2915
|
width: "36",
|
|
2887
2916
|
height: "28",
|
|
2888
2917
|
fill: "#3D6FCF",
|
|
2889
2918
|
rx: "4"
|
|
2890
|
-
}), /*#__PURE__*/
|
|
2919
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2891
2920
|
stroke: "#FFF",
|
|
2892
2921
|
strokeLinecap: "round",
|
|
2893
2922
|
strokeLinejoin: "round",
|
|
@@ -2900,16 +2929,16 @@ var HyperLink = function HyperLink(_ref) {
|
|
|
2900
2929
|
var _ref$hyperLink = _ref.hyperLink,
|
|
2901
2930
|
hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
|
|
2902
2931
|
if (!hyperLink) return null;
|
|
2903
|
-
return /*#__PURE__*/
|
|
2932
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2904
2933
|
href: hyperLink,
|
|
2905
2934
|
"aria-label": "hyperlink-button",
|
|
2906
2935
|
className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
|
|
2907
2936
|
target: "_blank",
|
|
2908
2937
|
rel: "noopener noreferrer"
|
|
2909
|
-
}, /*#__PURE__*/
|
|
2938
|
+
}, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
|
|
2910
2939
|
};
|
|
2911
2940
|
HyperLink.propTypes = {
|
|
2912
|
-
hyperLink:
|
|
2941
|
+
hyperLink: PropTypes__default["default"].string
|
|
2913
2942
|
};
|
|
2914
2943
|
|
|
2915
2944
|
var _styleModuleImportMap$b = {
|
|
@@ -2945,7 +2974,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
2945
2974
|
StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
|
|
2946
2975
|
return null;
|
|
2947
2976
|
} : _config$StoryTemplate;
|
|
2948
|
-
var showImagePlaceholder = useSelector(function (state) {
|
|
2977
|
+
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
2949
2978
|
return get_1(state, ["qt", "config", "showPlaceholder"]);
|
|
2950
2979
|
});
|
|
2951
2980
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
@@ -2981,37 +3010,37 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
2981
3010
|
var fallbackImage = function fallbackImage() {
|
|
2982
3011
|
if (!slug) {
|
|
2983
3012
|
if (fallbackImageUrl && !isStoryPageImage) {
|
|
2984
|
-
return /*#__PURE__*/
|
|
3013
|
+
return /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
2985
3014
|
style: {
|
|
2986
3015
|
paddingTop: imagePadding + "%"
|
|
2987
3016
|
},
|
|
2988
3017
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$b)
|
|
2989
|
-
}, /*#__PURE__*/
|
|
3018
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2990
3019
|
className: "qt-image",
|
|
2991
3020
|
"data-src": "".concat(fallbackImageUrl),
|
|
2992
3021
|
alt: "image-fallback"
|
|
2993
3022
|
}));
|
|
2994
3023
|
}
|
|
2995
3024
|
|
|
2996
|
-
return /*#__PURE__*/
|
|
3025
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2997
3026
|
"data-test-id": "arr--fallback-hero-image",
|
|
2998
3027
|
style: {
|
|
2999
3028
|
paddingTop: imagePadding + "%"
|
|
3000
3029
|
},
|
|
3001
3030
|
className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$b)
|
|
3002
|
-
}, /*#__PURE__*/
|
|
3031
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3003
3032
|
storyTemplate: story["story-template"]
|
|
3004
|
-
}), /*#__PURE__*/
|
|
3033
|
+
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
3005
3034
|
}
|
|
3006
3035
|
|
|
3007
|
-
return /*#__PURE__*/
|
|
3036
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3008
3037
|
style: {
|
|
3009
3038
|
paddingTop: imagePadding + "%"
|
|
3010
3039
|
},
|
|
3011
3040
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$b)
|
|
3012
|
-
}, /*#__PURE__*/
|
|
3041
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3013
3042
|
storyTemplate: story["story-template"]
|
|
3014
|
-
}), /*#__PURE__*/
|
|
3043
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
3015
3044
|
story: story,
|
|
3016
3045
|
aspectRatio: imageAspectRatio,
|
|
3017
3046
|
defaultWidth: defaultWidth,
|
|
@@ -3020,15 +3049,15 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3020
3049
|
auto: ["format", "compress"],
|
|
3021
3050
|
fit: "max"
|
|
3022
3051
|
}
|
|
3023
|
-
})), isStoryPageImage && hyperLink && /*#__PURE__*/
|
|
3052
|
+
})), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
|
|
3024
3053
|
hyperLink: hyperLink
|
|
3025
3054
|
}));
|
|
3026
3055
|
};
|
|
3027
3056
|
|
|
3028
|
-
return story && (isStoryPageImage ? /*#__PURE__*/
|
|
3057
|
+
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3029
3058
|
"data-test-id": "arr--hero-image",
|
|
3030
3059
|
className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$b)
|
|
3031
|
-
}, fallbackImage()) : /*#__PURE__*/
|
|
3060
|
+
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3032
3061
|
"data-test-id": "arr--hero-image",
|
|
3033
3062
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3034
3063
|
externalLink: isExternalStory(story),
|
|
@@ -3038,30 +3067,30 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3038
3067
|
};
|
|
3039
3068
|
HeroImage.propTypes = {
|
|
3040
3069
|
/** The Story Object from the API response */
|
|
3041
|
-
story:
|
|
3070
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3042
3071
|
|
|
3043
3072
|
/** Removes the Hero Image padding for the image to bleed over the margin */
|
|
3044
|
-
FullBleed:
|
|
3073
|
+
FullBleed: PropTypes__default["default"].bool,
|
|
3045
3074
|
|
|
3046
3075
|
/** The default width for the image, in case the browser does not support srcset */
|
|
3047
|
-
defaultWidth:
|
|
3076
|
+
defaultWidth: PropTypes__default["default"].number,
|
|
3048
3077
|
|
|
3049
3078
|
/** The list of available widths */
|
|
3050
|
-
widths:
|
|
3079
|
+
widths: PropTypes__default["default"].array,
|
|
3051
3080
|
// fatch the correct hero image
|
|
3052
|
-
aspectRatio:
|
|
3081
|
+
aspectRatio: PropTypes__default["default"].array,
|
|
3053
3082
|
// Hints for the browser to choose the best size
|
|
3054
3083
|
|
|
3055
3084
|
/** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
|
|
3056
|
-
isHorizontal:
|
|
3085
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3057
3086
|
|
|
3058
3087
|
/** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
|
|
3059
|
-
isHorizontalMobile:
|
|
3088
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3060
3089
|
// this prop is responsive for rendering fallback image on story page
|
|
3061
|
-
defaultFallback:
|
|
3062
|
-
isHorizontalWithImageLast:
|
|
3063
|
-
isStoryPageImage:
|
|
3064
|
-
config:
|
|
3090
|
+
defaultFallback: PropTypes__default["default"].bool,
|
|
3091
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool,
|
|
3092
|
+
isStoryPageImage: PropTypes__default["default"].bool,
|
|
3093
|
+
config: PropTypes__default["default"].object
|
|
3065
3094
|
};
|
|
3066
3095
|
HeroImage.defaultProps = {
|
|
3067
3096
|
FullBleed: true,
|
|
@@ -3123,26 +3152,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
3123
3152
|
if (!showButton) return null;
|
|
3124
3153
|
var textColor = getTextColor(theme);
|
|
3125
3154
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
|
|
3126
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
3155
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3127
3156
|
onClick: onClick,
|
|
3128
3157
|
"data-test-id": "load-more",
|
|
3129
3158
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$a)
|
|
3130
|
-
}, buttonText) : /*#__PURE__*/
|
|
3159
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
3131
3160
|
href: slug,
|
|
3132
3161
|
navigateTo: navigate,
|
|
3133
3162
|
"data-test-id": "load-more",
|
|
3134
3163
|
"aria-label": "load-more"
|
|
3135
|
-
}, /*#__PURE__*/
|
|
3164
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3136
3165
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$a)
|
|
3137
3166
|
}, buttonText));
|
|
3138
3167
|
};
|
|
3139
3168
|
LoadmoreButton.propTypes = {
|
|
3140
|
-
collection:
|
|
3141
|
-
template:
|
|
3142
|
-
config:
|
|
3143
|
-
onClick:
|
|
3144
|
-
navigate:
|
|
3145
|
-
qtConfig:
|
|
3169
|
+
collection: PropTypes__default["default"].object,
|
|
3170
|
+
template: PropTypes__default["default"].string,
|
|
3171
|
+
config: PropTypes__default["default"].object,
|
|
3172
|
+
onClick: PropTypes__default["default"].func,
|
|
3173
|
+
navigate: PropTypes__default["default"].func,
|
|
3174
|
+
qtConfig: PropTypes__default["default"].object
|
|
3146
3175
|
};
|
|
3147
3176
|
|
|
3148
3177
|
var _styleModuleImportMap$9 = {
|
|
@@ -3181,7 +3210,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3181
3210
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
3182
3211
|
|
|
3183
3212
|
var borderBottomStyle = function borderBottomStyle() {
|
|
3184
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
3213
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3185
3214
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
3186
3215
|
style: {
|
|
3187
3216
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -3241,40 +3270,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3241
3270
|
}
|
|
3242
3271
|
};
|
|
3243
3272
|
|
|
3244
|
-
return /*#__PURE__*/
|
|
3273
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3245
3274
|
style: {
|
|
3246
3275
|
borderBottom: borderBottomFullStyle
|
|
3247
3276
|
},
|
|
3248
3277
|
"data-test-id": "collection-name",
|
|
3249
3278
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$9)
|
|
3250
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
3279
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3251
3280
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
3252
3281
|
style: {
|
|
3253
3282
|
color: CollectionNameBorderColor,
|
|
3254
3283
|
fontSize: getBorderHeight()
|
|
3255
3284
|
}
|
|
3256
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
3285
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3257
3286
|
href: slug,
|
|
3258
3287
|
"aria-label": "collection-name"
|
|
3259
|
-
}, /*#__PURE__*/
|
|
3288
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
3260
3289
|
};
|
|
3261
3290
|
CollectionNameBase.propTypes = {
|
|
3262
3291
|
/** Collection name border color */
|
|
3263
|
-
collectionNameBorderColor: PropTypes
|
|
3292
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
3264
3293
|
|
|
3265
3294
|
/** The Collection Object from the API response */
|
|
3266
|
-
collection: PropTypes
|
|
3295
|
+
collection: PropTypes.PropTypes.object,
|
|
3267
3296
|
|
|
3268
3297
|
/** The publisher config from the API response */
|
|
3269
|
-
config: PropTypes
|
|
3298
|
+
config: PropTypes.PropTypes.object,
|
|
3270
3299
|
|
|
3271
3300
|
/** The style template for the component */
|
|
3272
|
-
collectionNameTemplate: PropTypes
|
|
3301
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
3273
3302
|
|
|
3274
3303
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3275
|
-
headerLevel: PropTypes
|
|
3276
|
-
customCollectionName: PropTypes
|
|
3277
|
-
navigate: PropTypes
|
|
3304
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
3305
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
3306
|
+
navigate: PropTypes.PropTypes.bool
|
|
3278
3307
|
};
|
|
3279
3308
|
CollectionNameBase.defaultProps = {
|
|
3280
3309
|
collectionNameTemplate: "",
|
|
@@ -3287,7 +3316,7 @@ function mapStateToProps$1(state) {
|
|
|
3287
3316
|
};
|
|
3288
3317
|
}
|
|
3289
3318
|
|
|
3290
|
-
var CollectionName = connect(mapStateToProps$1)(CollectionNameBase);
|
|
3319
|
+
var CollectionName = reactRedux.connect(mapStateToProps$1)(CollectionNameBase);
|
|
3291
3320
|
|
|
3292
3321
|
var CrownIcon = function CrownIcon(_ref) {
|
|
3293
3322
|
var height = _ref.height,
|
|
@@ -3295,7 +3324,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3295
3324
|
_ref$color = _ref.color,
|
|
3296
3325
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
3297
3326
|
positionTop = _ref.positionTop;
|
|
3298
|
-
return /*#__PURE__*/
|
|
3327
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3299
3328
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3300
3329
|
width: width,
|
|
3301
3330
|
height: height,
|
|
@@ -3304,28 +3333,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3304
3333
|
position: "relative",
|
|
3305
3334
|
top: positionTop
|
|
3306
3335
|
}
|
|
3307
|
-
}, /*#__PURE__*/
|
|
3336
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3308
3337
|
fill: "none",
|
|
3309
3338
|
fillRule: "evenodd",
|
|
3310
3339
|
stroke: "none",
|
|
3311
3340
|
strokeWidth: "1"
|
|
3312
|
-
}, /*#__PURE__*/
|
|
3341
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3313
3342
|
transform: "translate(8 8)"
|
|
3314
|
-
}, /*#__PURE__*/
|
|
3343
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3315
3344
|
d: "M0 0H24V24H0z"
|
|
3316
|
-
}), /*#__PURE__*/
|
|
3345
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3317
3346
|
fill: color,
|
|
3318
3347
|
fillRule: "nonzero",
|
|
3319
3348
|
transform: "translate(0 2)"
|
|
3320
|
-
}, /*#__PURE__*/
|
|
3349
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3321
3350
|
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"
|
|
3322
3351
|
}))))));
|
|
3323
3352
|
};
|
|
3324
3353
|
CrownIcon.propTypes = {
|
|
3325
|
-
height:
|
|
3326
|
-
width:
|
|
3327
|
-
color:
|
|
3328
|
-
positionTop:
|
|
3354
|
+
height: PropTypes__default["default"].string,
|
|
3355
|
+
width: PropTypes__default["default"].string,
|
|
3356
|
+
color: PropTypes__default["default"].string,
|
|
3357
|
+
positionTop: PropTypes__default["default"].string
|
|
3329
3358
|
};
|
|
3330
3359
|
|
|
3331
3360
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -3334,7 +3363,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3334
3363
|
_ref$color = _ref.color,
|
|
3335
3364
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3336
3365
|
positionTop = _ref.positionTop;
|
|
3337
|
-
return /*#__PURE__*/
|
|
3366
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3338
3367
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3339
3368
|
width: width,
|
|
3340
3369
|
height: height,
|
|
@@ -3343,16 +3372,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3343
3372
|
position: "relative",
|
|
3344
3373
|
top: positionTop
|
|
3345
3374
|
}
|
|
3346
|
-
}, /*#__PURE__*/
|
|
3375
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3347
3376
|
fill: "none",
|
|
3348
3377
|
fillRule: "evenodd",
|
|
3349
3378
|
stroke: "none",
|
|
3350
3379
|
strokeWidth: "1"
|
|
3351
|
-
}, /*#__PURE__*/
|
|
3380
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3352
3381
|
transform: "translate(8 8)"
|
|
3353
|
-
}, /*#__PURE__*/
|
|
3382
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3354
3383
|
d: "M0 0H24V24H0z"
|
|
3355
|
-
}), /*#__PURE__*/
|
|
3384
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3356
3385
|
fill: color,
|
|
3357
3386
|
fillRule: "nonzero",
|
|
3358
3387
|
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",
|
|
@@ -3360,10 +3389,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3360
3389
|
})))));
|
|
3361
3390
|
};
|
|
3362
3391
|
KeyIcon.propTypes = {
|
|
3363
|
-
height:
|
|
3364
|
-
width:
|
|
3365
|
-
color:
|
|
3366
|
-
positionTop:
|
|
3392
|
+
height: PropTypes__default["default"].string,
|
|
3393
|
+
width: PropTypes__default["default"].string,
|
|
3394
|
+
color: PropTypes__default["default"].string,
|
|
3395
|
+
positionTop: PropTypes__default["default"].string
|
|
3367
3396
|
};
|
|
3368
3397
|
|
|
3369
3398
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -3372,7 +3401,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3372
3401
|
_ref$color = _ref.color,
|
|
3373
3402
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3374
3403
|
positionTop = _ref.positionTop;
|
|
3375
|
-
return /*#__PURE__*/
|
|
3404
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3376
3405
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3377
3406
|
width: width,
|
|
3378
3407
|
height: height,
|
|
@@ -3381,28 +3410,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3381
3410
|
position: "relative",
|
|
3382
3411
|
top: positionTop
|
|
3383
3412
|
}
|
|
3384
|
-
}, /*#__PURE__*/
|
|
3413
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3385
3414
|
fill: "none",
|
|
3386
3415
|
fillRule: "evenodd",
|
|
3387
3416
|
stroke: "none",
|
|
3388
3417
|
strokeWidth: "1"
|
|
3389
|
-
}, /*#__PURE__*/
|
|
3418
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3390
3419
|
transform: "translate(8 8)"
|
|
3391
|
-
}, /*#__PURE__*/
|
|
3420
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3392
3421
|
d: "M0 0H24V24H0z"
|
|
3393
|
-
}), /*#__PURE__*/
|
|
3422
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3394
3423
|
fill: color,
|
|
3395
3424
|
fillRule: "nonzero",
|
|
3396
3425
|
transform: "translate(3)"
|
|
3397
|
-
}, /*#__PURE__*/
|
|
3426
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3398
3427
|
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"
|
|
3399
3428
|
}))))));
|
|
3400
3429
|
};
|
|
3401
3430
|
LockIcon.propTypes = {
|
|
3402
|
-
height:
|
|
3403
|
-
width:
|
|
3404
|
-
color:
|
|
3405
|
-
positionTop:
|
|
3431
|
+
height: PropTypes__default["default"].string,
|
|
3432
|
+
width: PropTypes__default["default"].string,
|
|
3433
|
+
color: PropTypes__default["default"].string,
|
|
3434
|
+
positionTop: PropTypes__default["default"].string
|
|
3406
3435
|
};
|
|
3407
3436
|
|
|
3408
3437
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -3412,7 +3441,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3412
3441
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3413
3442
|
_ref$positionTop = _ref.positionTop,
|
|
3414
3443
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
3415
|
-
return /*#__PURE__*/
|
|
3444
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3416
3445
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3417
3446
|
width: width,
|
|
3418
3447
|
height: height,
|
|
@@ -3421,21 +3450,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3421
3450
|
position: "relative",
|
|
3422
3451
|
top: positionTop
|
|
3423
3452
|
}
|
|
3424
|
-
}, /*#__PURE__*/
|
|
3453
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3425
3454
|
fill: "none",
|
|
3426
3455
|
fillRule: "evenodd",
|
|
3427
3456
|
stroke: "none",
|
|
3428
3457
|
strokeWidth: "1"
|
|
3429
|
-
}, /*#__PURE__*/
|
|
3458
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3430
3459
|
fill: color,
|
|
3431
3460
|
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"
|
|
3432
3461
|
}))));
|
|
3433
3462
|
};
|
|
3434
3463
|
StarIcon.propTypes = {
|
|
3435
|
-
height:
|
|
3436
|
-
width:
|
|
3437
|
-
color:
|
|
3438
|
-
positionTop:
|
|
3464
|
+
height: PropTypes__default["default"].string,
|
|
3465
|
+
width: PropTypes__default["default"].string,
|
|
3466
|
+
color: PropTypes__default["default"].string,
|
|
3467
|
+
positionTop: PropTypes__default["default"].string
|
|
3439
3468
|
};
|
|
3440
3469
|
|
|
3441
3470
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -3447,7 +3476,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3447
3476
|
|
|
3448
3477
|
switch (iconType) {
|
|
3449
3478
|
case "crown":
|
|
3450
|
-
return /*#__PURE__*/
|
|
3479
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
3451
3480
|
width: width,
|
|
3452
3481
|
height: height,
|
|
3453
3482
|
color: color,
|
|
@@ -3455,7 +3484,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3455
3484
|
});
|
|
3456
3485
|
|
|
3457
3486
|
case "lock":
|
|
3458
|
-
return /*#__PURE__*/
|
|
3487
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
3459
3488
|
width: width,
|
|
3460
3489
|
height: height,
|
|
3461
3490
|
color: color,
|
|
@@ -3463,7 +3492,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3463
3492
|
});
|
|
3464
3493
|
|
|
3465
3494
|
case "key":
|
|
3466
|
-
return /*#__PURE__*/
|
|
3495
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
3467
3496
|
width: width,
|
|
3468
3497
|
height: height,
|
|
3469
3498
|
color: color,
|
|
@@ -3471,7 +3500,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3471
3500
|
});
|
|
3472
3501
|
|
|
3473
3502
|
default:
|
|
3474
|
-
return /*#__PURE__*/
|
|
3503
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
3475
3504
|
width: width,
|
|
3476
3505
|
height: height,
|
|
3477
3506
|
color: color,
|
|
@@ -3480,21 +3509,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3480
3509
|
}
|
|
3481
3510
|
};
|
|
3482
3511
|
PremiumStoryIcon.propTypes = {
|
|
3483
|
-
width:
|
|
3484
|
-
height:
|
|
3485
|
-
color:
|
|
3486
|
-
iconType:
|
|
3487
|
-
positionTop:
|
|
3512
|
+
width: PropTypes__default["default"].string,
|
|
3513
|
+
height: PropTypes__default["default"].string,
|
|
3514
|
+
color: PropTypes__default["default"].string,
|
|
3515
|
+
iconType: PropTypes__default["default"].string,
|
|
3516
|
+
positionTop: PropTypes__default["default"].string
|
|
3488
3517
|
};
|
|
3489
3518
|
|
|
3490
3519
|
function LiveIcon() {
|
|
3491
|
-
return /*#__PURE__*/
|
|
3520
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3492
3521
|
className: "live-icon",
|
|
3493
3522
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3494
3523
|
width: "25",
|
|
3495
3524
|
height: "24",
|
|
3496
3525
|
viewBox: "0 0 25 24"
|
|
3497
|
-
}, /*#__PURE__*/
|
|
3526
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3498
3527
|
fill: "#ff5858",
|
|
3499
3528
|
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"
|
|
3500
3529
|
}));
|
|
@@ -3551,37 +3580,37 @@ var Headline = function Headline(_ref) {
|
|
|
3551
3580
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3552
3581
|
var iconSize = "24px";
|
|
3553
3582
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
3554
|
-
return /*#__PURE__*/
|
|
3583
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3555
3584
|
"data-test-id": "headline",
|
|
3556
3585
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$8)
|
|
3557
|
-
}, premiumStory && /*#__PURE__*/
|
|
3586
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3558
3587
|
width: iconSize,
|
|
3559
3588
|
height: iconSize,
|
|
3560
3589
|
color: iconColor,
|
|
3561
3590
|
iconType: iconStyle,
|
|
3562
3591
|
positionTop: positionHeadline()
|
|
3563
|
-
}), isLink ? /*#__PURE__*/
|
|
3592
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3564
3593
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3565
3594
|
externalLink: isExternalStory(story),
|
|
3566
3595
|
"aria-label": "headline"
|
|
3567
|
-
}, /*#__PURE__*/
|
|
3596
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3568
3597
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$8)
|
|
3569
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3598
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3570
3599
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$8)
|
|
3571
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3600
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3572
3601
|
};
|
|
3573
3602
|
Headline.propTypes = {
|
|
3574
3603
|
/** The Story Object from the API response */
|
|
3575
|
-
story:
|
|
3604
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3576
3605
|
|
|
3577
3606
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3578
|
-
headerLevel:
|
|
3579
|
-
premiumStoryIconConfig:
|
|
3580
|
-
iconColor:
|
|
3581
|
-
iconType:
|
|
3582
|
-
enablePremiumStoryIcon:
|
|
3607
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3608
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
3609
|
+
iconColor: PropTypes__default["default"].string,
|
|
3610
|
+
iconType: PropTypes__default["default"].string,
|
|
3611
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3583
3612
|
}),
|
|
3584
|
-
isLink:
|
|
3613
|
+
isLink: PropTypes__default["default"].bool
|
|
3585
3614
|
};
|
|
3586
3615
|
Headline.defaultProps = {
|
|
3587
3616
|
headerLevel: "6",
|
|
@@ -3623,22 +3652,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3623
3652
|
}
|
|
3624
3653
|
|
|
3625
3654
|
if (!isSection) return null;
|
|
3626
|
-
return /*#__PURE__*/
|
|
3655
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3627
3656
|
href: getUrl,
|
|
3628
3657
|
className: "arrow-component arr--section-name",
|
|
3629
3658
|
"aria-label": "section-name"
|
|
3630
|
-
}, /*#__PURE__*/
|
|
3659
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3631
3660
|
"data-test-id": "sectionTag",
|
|
3632
3661
|
style: {
|
|
3633
3662
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
3634
3663
|
},
|
|
3635
3664
|
className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$7)
|
|
3636
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
3665
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3637
3666
|
className: "section-m_border-left__2oUyp",
|
|
3638
3667
|
style: {
|
|
3639
3668
|
color: sectionTagBorderColor
|
|
3640
3669
|
}
|
|
3641
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
3670
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3642
3671
|
className: "section-m_border-bottom__3cRoD",
|
|
3643
3672
|
style: {
|
|
3644
3673
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -3647,13 +3676,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3647
3676
|
};
|
|
3648
3677
|
SectionTag.propTypes = {
|
|
3649
3678
|
/** The Story Object from the API response */
|
|
3650
|
-
story:
|
|
3679
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3651
3680
|
|
|
3652
3681
|
/** The style template for section tag */
|
|
3653
|
-
template:
|
|
3654
|
-
borderColor:
|
|
3655
|
-
solidBorderColor:
|
|
3656
|
-
isLightTheme:
|
|
3682
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
3683
|
+
borderColor: PropTypes__default["default"].string,
|
|
3684
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
3685
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3657
3686
|
};
|
|
3658
3687
|
SectionTag.defaultProps = {
|
|
3659
3688
|
template: "",
|
|
@@ -3679,18 +3708,18 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3679
3708
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3680
3709
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3681
3710
|
var textColor = getTextColor(configState.theme);
|
|
3682
|
-
return /*#__PURE__*/
|
|
3711
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3683
3712
|
"data-test-id": "publish-time",
|
|
3684
3713
|
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$6)
|
|
3685
|
-
}, /*#__PURE__*/
|
|
3714
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3686
3715
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3687
3716
|
}, getTimeStamp(time, formatter, config))));
|
|
3688
3717
|
};
|
|
3689
3718
|
TimeStamp.propTypes = {
|
|
3690
3719
|
/** The Story Object from the API response */
|
|
3691
|
-
story:
|
|
3692
|
-
isBottom:
|
|
3693
|
-
config:
|
|
3720
|
+
story: PropTypes__default["default"].object,
|
|
3721
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3722
|
+
config: PropTypes__default["default"].object
|
|
3694
3723
|
};
|
|
3695
3724
|
|
|
3696
3725
|
var _styleModuleImportMap$5 = {
|
|
@@ -3733,10 +3762,10 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3733
3762
|
return null;
|
|
3734
3763
|
}
|
|
3735
3764
|
|
|
3736
|
-
return /*#__PURE__*/
|
|
3765
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3737
3766
|
"data-test-id": "author-image",
|
|
3738
3767
|
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$5)
|
|
3739
|
-
}, /*#__PURE__*/
|
|
3768
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3740
3769
|
slug: avatarS3Key,
|
|
3741
3770
|
"aspect-ratio": [1, 1],
|
|
3742
3771
|
defaultWidth: 400,
|
|
@@ -3744,14 +3773,14 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3744
3773
|
auto: ["format", "compress"]
|
|
3745
3774
|
},
|
|
3746
3775
|
alt: authorName
|
|
3747
|
-
}) : /*#__PURE__*/
|
|
3776
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3748
3777
|
src: avatarUrl
|
|
3749
3778
|
})));
|
|
3750
3779
|
};
|
|
3751
3780
|
|
|
3752
3781
|
var isPrefix = function isPrefix(dir) {
|
|
3753
3782
|
if (prefix) {
|
|
3754
|
-
return /*#__PURE__*/
|
|
3783
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3755
3784
|
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$5)
|
|
3756
3785
|
}, prefix);
|
|
3757
3786
|
}
|
|
@@ -3759,11 +3788,11 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3759
3788
|
return !hideAuthorImage && authorImage(dir);
|
|
3760
3789
|
};
|
|
3761
3790
|
|
|
3762
|
-
return /*#__PURE__*/
|
|
3791
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3763
3792
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3764
3793
|
"aria-label": "author-name",
|
|
3765
3794
|
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$5)
|
|
3766
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
3795
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3767
3796
|
"data-test-id": "author-name",
|
|
3768
3797
|
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$5)
|
|
3769
3798
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
@@ -3775,18 +3804,18 @@ function mapStateToProps(state) {
|
|
|
3775
3804
|
};
|
|
3776
3805
|
}
|
|
3777
3806
|
|
|
3778
|
-
var Author = connect(mapStateToProps)(AuthorBase);
|
|
3807
|
+
var Author = reactRedux.connect(mapStateToProps)(AuthorBase);
|
|
3779
3808
|
AuthorBase.propTypes = {
|
|
3780
3809
|
/** The Story Object from the API response */
|
|
3781
|
-
story:
|
|
3810
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3782
3811
|
|
|
3783
3812
|
/** Hide Author Avatar Image */
|
|
3784
|
-
hideAuthorImage:
|
|
3813
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3785
3814
|
// fix Author bottom of the storyCard
|
|
3786
|
-
isBottom:
|
|
3815
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3787
3816
|
// fix prefix before the author name
|
|
3788
|
-
prefix:
|
|
3789
|
-
config:
|
|
3817
|
+
prefix: PropTypes__default["default"].string,
|
|
3818
|
+
config: PropTypes__default["default"].object
|
|
3790
3819
|
};
|
|
3791
3820
|
AuthorBase.defaultProps = {
|
|
3792
3821
|
hideAuthorImage: false,
|
|
@@ -3807,14 +3836,14 @@ var Dot = function Dot(_ref) {
|
|
|
3807
3836
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3808
3837
|
_ref$color = _ref.color,
|
|
3809
3838
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3810
|
-
return /*#__PURE__*/
|
|
3839
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3811
3840
|
className: _getClassName(color, _styleModuleImportMap$4)
|
|
3812
|
-
}, /*#__PURE__*/
|
|
3841
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3813
3842
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3814
3843
|
width: width,
|
|
3815
3844
|
height: height,
|
|
3816
3845
|
viewBox: "0 0 3 3"
|
|
3817
|
-
}, /*#__PURE__*/
|
|
3846
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3818
3847
|
cx: "87",
|
|
3819
3848
|
cy: "9",
|
|
3820
3849
|
r: "1",
|
|
@@ -3825,9 +3854,9 @@ var Dot = function Dot(_ref) {
|
|
|
3825
3854
|
};
|
|
3826
3855
|
Dot.propTypes = {
|
|
3827
3856
|
/** height , width and color of the dot icon */
|
|
3828
|
-
color:
|
|
3829
|
-
width:
|
|
3830
|
-
height:
|
|
3857
|
+
color: PropTypes__default["default"].string,
|
|
3858
|
+
width: PropTypes__default["default"].string,
|
|
3859
|
+
height: PropTypes__default["default"].string
|
|
3831
3860
|
};
|
|
3832
3861
|
|
|
3833
3862
|
var _styleModuleImportMap$3 = {
|
|
@@ -3843,22 +3872,22 @@ var Divider = function Divider(_ref) {
|
|
|
3843
3872
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3844
3873
|
_ref$color = _ref.color,
|
|
3845
3874
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3846
|
-
return /*#__PURE__*/
|
|
3875
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3847
3876
|
className: _getClassName(color, _styleModuleImportMap$3)
|
|
3848
|
-
}, /*#__PURE__*/
|
|
3877
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3849
3878
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3850
3879
|
width: width,
|
|
3851
3880
|
height: height
|
|
3852
|
-
}, /*#__PURE__*/
|
|
3881
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3853
3882
|
fill: "inherit",
|
|
3854
3883
|
d: "M0 0h1v10H0z"
|
|
3855
3884
|
})));
|
|
3856
3885
|
};
|
|
3857
3886
|
Divider.propTypes = {
|
|
3858
3887
|
/** height , width and color of the dot icon */
|
|
3859
|
-
color:
|
|
3860
|
-
width:
|
|
3861
|
-
height:
|
|
3888
|
+
color: PropTypes__default["default"].string,
|
|
3889
|
+
width: PropTypes__default["default"].string,
|
|
3890
|
+
height: PropTypes__default["default"].string
|
|
3862
3891
|
};
|
|
3863
3892
|
|
|
3864
3893
|
var _styleModuleImportMap$2 = {
|
|
@@ -3881,23 +3910,23 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3881
3910
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3882
3911
|
if (!showReadTime || !readTime) return null;
|
|
3883
3912
|
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
3884
|
-
return /*#__PURE__*/
|
|
3913
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3885
3914
|
"data-test-id": "read-time",
|
|
3886
3915
|
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$2)
|
|
3887
|
-
}, /*#__PURE__*/
|
|
3916
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3888
3917
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3889
|
-
}, /*#__PURE__*/
|
|
3918
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3890
3919
|
color: textColor
|
|
3891
|
-
})), /*#__PURE__*/
|
|
3920
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3892
3921
|
};
|
|
3893
3922
|
ReadTime.propTypes = {
|
|
3894
|
-
story:
|
|
3895
|
-
"read-time":
|
|
3923
|
+
story: PropTypes__default["default"].shape({
|
|
3924
|
+
"read-time": PropTypes__default["default"].number
|
|
3896
3925
|
}),
|
|
3897
|
-
opts:
|
|
3898
|
-
showReadTime:
|
|
3926
|
+
opts: PropTypes__default["default"].shape({
|
|
3927
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3899
3928
|
}),
|
|
3900
|
-
isLightTheme:
|
|
3929
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3901
3930
|
};
|
|
3902
3931
|
|
|
3903
3932
|
var _styleModuleImportMap$1 = {
|
|
@@ -3928,33 +3957,33 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3928
3957
|
|
|
3929
3958
|
var getSeparator = function getSeparator() {
|
|
3930
3959
|
if (separator === "divider") {
|
|
3931
|
-
return /*#__PURE__*/
|
|
3960
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3932
3961
|
color: textColor
|
|
3933
3962
|
});
|
|
3934
3963
|
}
|
|
3935
3964
|
|
|
3936
|
-
return /*#__PURE__*/
|
|
3965
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3937
3966
|
color: textColor
|
|
3938
3967
|
});
|
|
3939
3968
|
};
|
|
3940
3969
|
|
|
3941
3970
|
var getTimeStamp = function getTimeStamp() {
|
|
3942
3971
|
if (!isTime) return null;
|
|
3943
|
-
return /*#__PURE__*/
|
|
3972
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3944
3973
|
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$1)
|
|
3945
|
-
}, getSeparator()), /*#__PURE__*/
|
|
3974
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3946
3975
|
story: story,
|
|
3947
3976
|
config: config
|
|
3948
|
-
}), isReadTime && /*#__PURE__*/
|
|
3977
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3949
3978
|
story: story,
|
|
3950
3979
|
opts: config,
|
|
3951
3980
|
isLightTheme: isLightTheme
|
|
3952
3981
|
}));
|
|
3953
3982
|
};
|
|
3954
3983
|
|
|
3955
|
-
return /*#__PURE__*/
|
|
3984
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3956
3985
|
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$1)
|
|
3957
|
-
}, isAuthor ? /*#__PURE__*/
|
|
3986
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3958
3987
|
story: story,
|
|
3959
3988
|
isBottom: true,
|
|
3960
3989
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3962,19 +3991,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3962
3991
|
}), getTimeStamp()) : getTimeStamp());
|
|
3963
3992
|
};
|
|
3964
3993
|
AuthorWithTime.propTypes = {
|
|
3965
|
-
story:
|
|
3994
|
+
story: PropTypes__default["default"].object,
|
|
3966
3995
|
|
|
3967
3996
|
/** Style of separator between the Author & Timestamp */
|
|
3968
|
-
separator:
|
|
3997
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3969
3998
|
|
|
3970
3999
|
/** hide the author image */
|
|
3971
|
-
hideAuthorImage:
|
|
4000
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3972
4001
|
// fix author and time at the end
|
|
3973
|
-
isBottom:
|
|
4002
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3974
4003
|
// fix prefix before the author name
|
|
3975
|
-
prefix:
|
|
3976
|
-
config:
|
|
3977
|
-
isLightTheme:
|
|
4004
|
+
prefix: PropTypes__default["default"].string,
|
|
4005
|
+
config: PropTypes__default["default"].object,
|
|
4006
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3978
4007
|
};
|
|
3979
4008
|
AuthorWithTime.defaultProps = {
|
|
3980
4009
|
separator: "dot",
|
|
@@ -4005,14 +4034,14 @@ var StorycardContent = function StorycardContent(_ref) {
|
|
|
4005
4034
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4006
4035
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : "";
|
|
4007
4036
|
var horizontalCard = isHorizontalMobile ? "horizontal-content-wrapper" : "";
|
|
4008
|
-
return /*#__PURE__*/
|
|
4037
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4009
4038
|
"data-test-id": "story-card-content",
|
|
4010
4039
|
style: {
|
|
4011
4040
|
backgroundColor: theme,
|
|
4012
4041
|
color: textColor
|
|
4013
4042
|
},
|
|
4014
4043
|
className: "arr--content-wrapper " + _getClassName("wrapper ".concat(borderTemplate, " ").concat(horizontalCard), _styleModuleImportMap)
|
|
4015
|
-
}, children || /*#__PURE__*/
|
|
4044
|
+
}, children || /*#__PURE__*/React__default["default"].createElement(DefaultStoryCardContent, {
|
|
4016
4045
|
story: story,
|
|
4017
4046
|
headerLevel: headerLevel,
|
|
4018
4047
|
isHorizontalMobile: isHorizontalMobile,
|
|
@@ -4030,37 +4059,37 @@ var DefaultStoryCardContent = function DefaultStoryCardContent(_ref2) {
|
|
|
4030
4059
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4031
4060
|
var _config$localizationC = config.localizationConfig,
|
|
4032
4061
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4033
|
-
return /*#__PURE__*/
|
|
4062
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4034
4063
|
story: story,
|
|
4035
4064
|
borderColor: SectionTagborderColor
|
|
4036
|
-
}), /*#__PURE__*/
|
|
4065
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4037
4066
|
story: story,
|
|
4038
4067
|
headerLevel: headerLevel,
|
|
4039
4068
|
premiumStoryIconConfig: config
|
|
4040
|
-
}), /*#__PURE__*/
|
|
4069
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4041
4070
|
config: localizationConfig,
|
|
4042
4071
|
story: story
|
|
4043
4072
|
}));
|
|
4044
4073
|
};
|
|
4045
4074
|
|
|
4046
4075
|
DefaultStoryCardContent.propTypes = {
|
|
4047
|
-
story:
|
|
4048
|
-
border:
|
|
4049
|
-
theme:
|
|
4050
|
-
isHorizontalMobile:
|
|
4051
|
-
headerLevel:
|
|
4052
|
-
borderColor:
|
|
4053
|
-
config:
|
|
4076
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4077
|
+
border: PropTypes__default["default"].string,
|
|
4078
|
+
theme: PropTypes__default["default"].string,
|
|
4079
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4080
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4081
|
+
borderColor: PropTypes__default["default"].string,
|
|
4082
|
+
config: PropTypes__default["default"].object
|
|
4054
4083
|
};
|
|
4055
4084
|
StorycardContent.propTypes = {
|
|
4056
|
-
story:
|
|
4057
|
-
children:
|
|
4058
|
-
theme:
|
|
4059
|
-
border:
|
|
4060
|
-
isHorizontalMobile:
|
|
4061
|
-
headerLevel:
|
|
4062
|
-
borderColor:
|
|
4063
|
-
config:
|
|
4085
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4086
|
+
children: PropTypes__default["default"].node,
|
|
4087
|
+
theme: PropTypes__default["default"].string,
|
|
4088
|
+
border: PropTypes__default["default"].string,
|
|
4089
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4090
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4091
|
+
borderColor: PropTypes__default["default"].string,
|
|
4092
|
+
config: PropTypes__default["default"].object
|
|
4064
4093
|
};
|
|
4065
4094
|
|
|
4066
4095
|
var isClient = typeof window !== "undefined";
|
|
@@ -4072,7 +4101,7 @@ var hasIntersectionObserverSupport = function hasIntersectionObserverSupport() {
|
|
|
4072
4101
|
|
|
4073
4102
|
|
|
4074
4103
|
var getIntersectionObserver = function getIntersectionObserver() {
|
|
4075
|
-
return Promise.resolve(isClient && !hasIntersectionObserverSupport() &&
|
|
4104
|
+
return Promise.resolve(isClient && !hasIntersectionObserverSupport() && Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('intersection-observer')); }));
|
|
4076
4105
|
}; // options for intersection observer in order to improve the effect
|
|
4077
4106
|
|
|
4078
4107
|
|
|
@@ -4105,12 +4134,12 @@ var getObserver = function getObserver() {
|
|
|
4105
4134
|
var useNearScreen = (function (_ref) {
|
|
4106
4135
|
var ref = _ref.ref;
|
|
4107
4136
|
|
|
4108
|
-
var _useState = useState(false),
|
|
4137
|
+
var _useState = React.useState(false),
|
|
4109
4138
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4110
4139
|
show = _useState2[0],
|
|
4111
4140
|
setShow = _useState2[1];
|
|
4112
4141
|
|
|
4113
|
-
useEffect(function () {
|
|
4142
|
+
React.useEffect(function () {
|
|
4114
4143
|
var current = ref.current;
|
|
4115
4144
|
if (!current) return; // get observer async and only when needed
|
|
4116
4145
|
|
|
@@ -4137,36 +4166,36 @@ var EMPTY_HTML = {
|
|
|
4137
4166
|
var isServer = typeof window === "undefined";
|
|
4138
4167
|
var ProgressiveHydration = function ProgressiveHydration(props) {
|
|
4139
4168
|
var children = props.children;
|
|
4140
|
-
var ref = useRef(null);
|
|
4169
|
+
var ref = React.useRef(null);
|
|
4141
4170
|
var isNearScreen = useNearScreen({
|
|
4142
4171
|
ref: ref
|
|
4143
4172
|
});
|
|
4144
|
-
useEffect(function () {
|
|
4173
|
+
React.useEffect(function () {
|
|
4145
4174
|
var el = ref.current; // CLIENT:
|
|
4146
4175
|
// If we want to force the hydration OR the element is near screen
|
|
4147
4176
|
// then we hydrate the content to get the functionality ready
|
|
4148
4177
|
|
|
4149
4178
|
if (isNearScreen) {
|
|
4150
4179
|
var action = el.hasChildNodes() ? "hydrate" : "render";
|
|
4151
|
-
|
|
4180
|
+
ReactDOM__default["default"][action](children, el);
|
|
4152
4181
|
}
|
|
4153
4182
|
}, [children, isNearScreen]); // SERVER: Just render the content as usual
|
|
4154
4183
|
|
|
4155
4184
|
if (isServer) {
|
|
4156
|
-
return /*#__PURE__*/
|
|
4185
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4157
4186
|
ref: ref
|
|
4158
4187
|
}, children);
|
|
4159
4188
|
} // CLIENT: Avoid hydration until we say so
|
|
4160
4189
|
|
|
4161
4190
|
|
|
4162
|
-
return /*#__PURE__*/
|
|
4191
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4163
4192
|
ref: ref,
|
|
4164
4193
|
suppressHydrationWarning: true,
|
|
4165
4194
|
dangerouslySetInnerHTML: EMPTY_HTML
|
|
4166
4195
|
});
|
|
4167
4196
|
};
|
|
4168
4197
|
ProgressiveHydration.propTypes = {
|
|
4169
|
-
children:
|
|
4198
|
+
children: PropTypes__default["default"].element
|
|
4170
4199
|
};
|
|
4171
4200
|
|
|
4172
4201
|
var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
@@ -4174,7 +4203,7 @@ var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
|
4174
4203
|
componentName = _ref.componentName,
|
|
4175
4204
|
offset = _ref.offset,
|
|
4176
4205
|
limit = _ref.limit;
|
|
4177
|
-
return /*#__PURE__*/
|
|
4206
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4178
4207
|
id: "ELM-".concat(collection.id),
|
|
4179
4208
|
"data-collection-slug": collection["slug"],
|
|
4180
4209
|
"data-component-name": componentName,
|
|
@@ -4183,13 +4212,13 @@ var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
|
4183
4212
|
});
|
|
4184
4213
|
};
|
|
4185
4214
|
LoadMoreTarget.propTypes = {
|
|
4186
|
-
collection:
|
|
4187
|
-
id:
|
|
4188
|
-
slug:
|
|
4215
|
+
collection: PropTypes__default["default"].shape({
|
|
4216
|
+
id: PropTypes__default["default"].string,
|
|
4217
|
+
slug: PropTypes__default["default"].string
|
|
4189
4218
|
}),
|
|
4190
|
-
componentName:
|
|
4191
|
-
offset:
|
|
4192
|
-
limit:
|
|
4219
|
+
componentName: PropTypes__default["default"].string,
|
|
4220
|
+
offset: PropTypes__default["default"].number,
|
|
4221
|
+
limit: PropTypes__default["default"].number
|
|
4193
4222
|
};
|
|
4194
4223
|
|
|
4195
4224
|
var loadMore = function loadMore(_ref) {
|
|
@@ -4212,7 +4241,7 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
4212
4241
|
isLoading = _ref2.isLoading,
|
|
4213
4242
|
isolatedLoadMore = _ref2.isolatedLoadMore,
|
|
4214
4243
|
hideFirstCard = _ref2.hideFirstCard;
|
|
4215
|
-
var stories = collectionToStories(collection);
|
|
4244
|
+
var stories = components.collectionToStories(collection);
|
|
4216
4245
|
if (!stories.length) return null;
|
|
4217
4246
|
var _config$collectionNam = config.collectionNameBorderColor,
|
|
4218
4247
|
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
@@ -4237,8 +4266,8 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
4237
4266
|
var textColor = getTextColor(theme);
|
|
4238
4267
|
var sectionTagBorderColor = rgbToHex(borderColor);
|
|
4239
4268
|
var adWidgetSlot = type === "ad" || type === "widget" ? getSlot(type, component) : null;
|
|
4240
|
-
var dispatch = useDispatch();
|
|
4241
|
-
var qtConfig = useSelector(function (state) {
|
|
4269
|
+
var dispatch = reactRedux.useDispatch();
|
|
4270
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
4242
4271
|
return get_1(state, ["qt", "config"], {});
|
|
4243
4272
|
});
|
|
4244
4273
|
|
|
@@ -4248,11 +4277,11 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
4248
4277
|
otherStories = _ref4.slice(1);
|
|
4249
4278
|
|
|
4250
4279
|
var storyCard = function storyCard(story) {
|
|
4251
|
-
return /*#__PURE__*/
|
|
4280
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4252
4281
|
config: config,
|
|
4253
4282
|
story: story,
|
|
4254
4283
|
aspectRatio: [[16, 9]]
|
|
4255
|
-
}), /*#__PURE__*/
|
|
4284
|
+
}), /*#__PURE__*/React__default["default"].createElement(StorycardContent, {
|
|
4256
4285
|
theme: theme,
|
|
4257
4286
|
story: story,
|
|
4258
4287
|
config: config,
|
|
@@ -4262,7 +4291,7 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
4262
4291
|
};
|
|
4263
4292
|
|
|
4264
4293
|
var otherCards = function otherCards(story, index) {
|
|
4265
|
-
return /*#__PURE__*/
|
|
4294
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4266
4295
|
className: "four-col-five-stories-m_card__2lzhH",
|
|
4267
4296
|
"data-test-id": "story-card",
|
|
4268
4297
|
key: "four-col-five-story-".concat(index, "-").concat(get_1(story, ["id"], "0"))
|
|
@@ -4273,7 +4302,7 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
4273
4302
|
if (!isLoadMoreVisible) return null;
|
|
4274
4303
|
|
|
4275
4304
|
if (isolatedLoadMore) {
|
|
4276
|
-
return /*#__PURE__*/
|
|
4305
|
+
return /*#__PURE__*/React__default["default"].createElement(LoadMoreTarget, {
|
|
4277
4306
|
collection: collection,
|
|
4278
4307
|
componentName: "FourColFiveStories",
|
|
4279
4308
|
offset: stories.length,
|
|
@@ -4282,7 +4311,7 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
4282
4311
|
}
|
|
4283
4312
|
|
|
4284
4313
|
var url = generateNavigateSlug(collection, qtConfig);
|
|
4285
|
-
return /*#__PURE__*/
|
|
4314
|
+
return /*#__PURE__*/React__default["default"].createElement(ProgressiveHydration, null, /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
4286
4315
|
config: config,
|
|
4287
4316
|
collection: collection,
|
|
4288
4317
|
template: footerButton,
|
|
@@ -4297,26 +4326,26 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
4297
4326
|
};
|
|
4298
4327
|
|
|
4299
4328
|
var renderStories = hideFirstCard ? stories : otherStories;
|
|
4300
|
-
return /*#__PURE__*/
|
|
4329
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4301
4330
|
className: "full-width-with-padding arrow-component",
|
|
4302
4331
|
"data-test-id": "four-col-five-stories",
|
|
4303
4332
|
style: {
|
|
4304
4333
|
backgroundColor: theme,
|
|
4305
4334
|
color: textColor
|
|
4306
4335
|
}
|
|
4307
|
-
}, /*#__PURE__*/
|
|
4336
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4308
4337
|
className: "four-col-five-stories-m_four-col-five-stories__16ja_"
|
|
4309
|
-
}, /*#__PURE__*/
|
|
4338
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4310
4339
|
collection: collection,
|
|
4311
4340
|
collectionNameTemplate: collectionNameTemplate,
|
|
4312
4341
|
collectionNameBorderColor: collectionNameBorderColor,
|
|
4313
4342
|
headerLevel: 2
|
|
4314
|
-
}), /*#__PURE__*/
|
|
4343
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4315
4344
|
className: "four-col-five-stories-m_wrapper__31KAU"
|
|
4316
|
-
}, !hideFirstCard && /*#__PURE__*/
|
|
4345
|
+
}, !hideFirstCard && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4317
4346
|
className: "first-card four-col-five-stories-m_first-card__3dXVH",
|
|
4318
4347
|
"data-test-id": "story-card"
|
|
4319
|
-
}, storyCard(firstStory)), /*#__PURE__*/
|
|
4348
|
+
}, storyCard(firstStory)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4320
4349
|
className: "other-cards four-col-five-stories-m_other-cards__1P4k5"
|
|
4321
4350
|
}, renderStories.slice(0, 3).map(function (story, index) {
|
|
4322
4351
|
return otherCards(story, index);
|
|
@@ -4330,21 +4359,21 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
4330
4359
|
})));
|
|
4331
4360
|
};
|
|
4332
4361
|
FourColFiveStoriesBase.propTypes = {
|
|
4333
|
-
collection:
|
|
4334
|
-
config:
|
|
4335
|
-
collectionNameBorderColor:
|
|
4336
|
-
theme:
|
|
4337
|
-
slotConfig:
|
|
4338
|
-
collectionNameTemplate:
|
|
4339
|
-
footerButton:
|
|
4340
|
-
borderColor:
|
|
4341
|
-
subsequentLoadCount:
|
|
4362
|
+
collection: PropTypes__default["default"].object,
|
|
4363
|
+
config: PropTypes__default["default"].shape({
|
|
4364
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
4365
|
+
theme: PropTypes__default["default"].string,
|
|
4366
|
+
slotConfig: PropTypes__default["default"].array,
|
|
4367
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
4368
|
+
footerButton: PropTypes__default["default"].string,
|
|
4369
|
+
borderColor: PropTypes__default["default"].string,
|
|
4370
|
+
subsequentLoadCount: PropTypes__default["default"].number
|
|
4342
4371
|
}),
|
|
4343
|
-
getMoreStories:
|
|
4344
|
-
isLoading:
|
|
4345
|
-
hideFirstCard:
|
|
4346
|
-
isLoadMoreVisible:
|
|
4347
|
-
isolatedLoadMore:
|
|
4372
|
+
getMoreStories: PropTypes__default["default"].func,
|
|
4373
|
+
isLoading: PropTypes__default["default"].bool,
|
|
4374
|
+
hideFirstCard: PropTypes__default["default"].bool,
|
|
4375
|
+
isLoadMoreVisible: PropTypes__default["default"].bool,
|
|
4376
|
+
isolatedLoadMore: PropTypes__default["default"].bool
|
|
4348
4377
|
};
|
|
4349
4378
|
FourColFiveStoriesBase.defaultProps = {
|
|
4350
4379
|
getMoreStories: function getMoreStories() {},
|
|
@@ -4356,4 +4385,5 @@ FourColFiveStoriesBase.defaultProps = {
|
|
|
4356
4385
|
};
|
|
4357
4386
|
var FourColFiveStories = StateProvider(FourColFiveStoriesBase);
|
|
4358
4387
|
|
|
4359
|
-
|
|
4388
|
+
exports.FourColFiveStories = FourColFiveStories;
|
|
4389
|
+
exports.FourColFiveStoriesBase = FourColFiveStoriesBase;
|