@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,9 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var PropTypes = require('prop-types');
|
|
7
|
+
var components = require('@quintype/components');
|
|
8
|
+
var reactRedux = require('react-redux');
|
|
9
|
+
var Timeago = require('react-timeago');
|
|
10
|
+
var dateFnsTz = require('date-fns-tz');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
16
|
+
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
7
17
|
|
|
8
18
|
function _arrayWithHoles(arr) {
|
|
9
19
|
if (Array.isArray(arr)) return arr;
|
|
@@ -1379,21 +1389,21 @@ exports["default"] = _default;
|
|
|
1379
1389
|
|
|
1380
1390
|
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
1381
1391
|
|
|
1382
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
1392
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
1383
1393
|
|
|
1384
1394
|
var StateProvider = function StateProvider(RowComponent) {
|
|
1385
1395
|
return function (props) {
|
|
1386
1396
|
return (
|
|
1387
1397
|
/*#__PURE__*/
|
|
1388
1398
|
// eslint-disable-next-line react/prop-types
|
|
1389
|
-
|
|
1399
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
1390
1400
|
value: props.config
|
|
1391
|
-
}, /*#__PURE__*/
|
|
1401
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
1392
1402
|
);
|
|
1393
1403
|
};
|
|
1394
1404
|
};
|
|
1395
1405
|
var useStateValue = function useStateValue() {
|
|
1396
|
-
return useContext(StateContext);
|
|
1406
|
+
return React.useContext(StateContext);
|
|
1397
1407
|
};
|
|
1398
1408
|
|
|
1399
1409
|
function _typeof(obj) {
|
|
@@ -2722,15 +2732,15 @@ var isEmpty = function isEmpty(value) {
|
|
|
2722
2732
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2723
2733
|
_typeof(value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2724
2734
|
};
|
|
2725
|
-
|
|
2726
|
-
"sketches-host":
|
|
2727
|
-
"cdn-name":
|
|
2728
|
-
"cdn-image":
|
|
2735
|
+
PropTypes__default["default"].shape({
|
|
2736
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2737
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2738
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2729
2739
|
});
|
|
2730
|
-
|
|
2731
|
-
headline:
|
|
2732
|
-
"last-published-at":
|
|
2733
|
-
subheadline:
|
|
2740
|
+
PropTypes__default["default"].shape({
|
|
2741
|
+
headline: PropTypes__default["default"].string,
|
|
2742
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2743
|
+
subheadline: PropTypes__default["default"].string
|
|
2734
2744
|
});
|
|
2735
2745
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2736
2746
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2742,17 +2752,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2742
2752
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2743
2753
|
|
|
2744
2754
|
if (timezone && template === "story") {
|
|
2745
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2746
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2755
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2756
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2747
2757
|
timeZone: timezone
|
|
2748
2758
|
});
|
|
2749
2759
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2750
|
-
return /*#__PURE__*/
|
|
2760
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2751
2761
|
dateTime: formatZonedTime
|
|
2752
2762
|
}, timeStamp);
|
|
2753
2763
|
}
|
|
2754
2764
|
|
|
2755
|
-
return /*#__PURE__*/
|
|
2765
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2756
2766
|
date: date,
|
|
2757
2767
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2758
2768
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2796,7 +2806,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2796
2806
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
2797
2807
|
|
|
2798
2808
|
var borderBottomStyle = function borderBottomStyle() {
|
|
2799
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
2809
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2800
2810
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
2801
2811
|
style: {
|
|
2802
2812
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -2856,40 +2866,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2856
2866
|
}
|
|
2857
2867
|
};
|
|
2858
2868
|
|
|
2859
|
-
return /*#__PURE__*/
|
|
2869
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2860
2870
|
style: {
|
|
2861
2871
|
borderBottom: borderBottomFullStyle
|
|
2862
2872
|
},
|
|
2863
2873
|
"data-test-id": "collection-name",
|
|
2864
2874
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$b)
|
|
2865
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
2875
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2866
2876
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
2867
2877
|
style: {
|
|
2868
2878
|
color: CollectionNameBorderColor,
|
|
2869
2879
|
fontSize: getBorderHeight()
|
|
2870
2880
|
}
|
|
2871
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
2881
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2872
2882
|
href: slug,
|
|
2873
2883
|
"aria-label": "collection-name"
|
|
2874
|
-
}, /*#__PURE__*/
|
|
2884
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
2875
2885
|
};
|
|
2876
2886
|
CollectionNameBase.propTypes = {
|
|
2877
2887
|
/** Collection name border color */
|
|
2878
|
-
collectionNameBorderColor: PropTypes
|
|
2888
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
2879
2889
|
|
|
2880
2890
|
/** The Collection Object from the API response */
|
|
2881
|
-
collection: PropTypes
|
|
2891
|
+
collection: PropTypes.PropTypes.object,
|
|
2882
2892
|
|
|
2883
2893
|
/** The publisher config from the API response */
|
|
2884
|
-
config: PropTypes
|
|
2894
|
+
config: PropTypes.PropTypes.object,
|
|
2885
2895
|
|
|
2886
2896
|
/** The style template for the component */
|
|
2887
|
-
collectionNameTemplate: PropTypes
|
|
2897
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
2888
2898
|
|
|
2889
2899
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
2890
|
-
headerLevel: PropTypes
|
|
2891
|
-
customCollectionName: PropTypes
|
|
2892
|
-
navigate: PropTypes
|
|
2900
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
2901
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
2902
|
+
navigate: PropTypes.PropTypes.bool
|
|
2893
2903
|
};
|
|
2894
2904
|
CollectionNameBase.defaultProps = {
|
|
2895
2905
|
collectionNameTemplate: "",
|
|
@@ -2902,7 +2912,7 @@ function mapStateToProps$1(state) {
|
|
|
2902
2912
|
};
|
|
2903
2913
|
}
|
|
2904
2914
|
|
|
2905
|
-
var CollectionName = connect(mapStateToProps$1)(CollectionNameBase);
|
|
2915
|
+
var CollectionName = reactRedux.connect(mapStateToProps$1)(CollectionNameBase);
|
|
2906
2916
|
|
|
2907
2917
|
function _iterableToArrayLimit(arr, i) {
|
|
2908
2918
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
@@ -2945,27 +2955,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
2945
2955
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
2946
2956
|
_ref$iconColor = _ref.iconColor,
|
|
2947
2957
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
2948
|
-
return /*#__PURE__*/
|
|
2958
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2949
2959
|
width: width,
|
|
2950
2960
|
height: height,
|
|
2951
2961
|
viewBox: "0 0 102 76",
|
|
2952
2962
|
version: "1.1"
|
|
2953
|
-
}, /*#__PURE__*/
|
|
2963
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2954
2964
|
id: "demo-home-copy",
|
|
2955
2965
|
stroke: "none",
|
|
2956
2966
|
strokeWidth: "1",
|
|
2957
2967
|
fill: "none",
|
|
2958
2968
|
fillRule: "evenodd",
|
|
2959
2969
|
transform: "translate(-377.000000, -314.000000)"
|
|
2960
|
-
}, /*#__PURE__*/
|
|
2970
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2961
2971
|
id: "Group-13",
|
|
2962
2972
|
transform: "translate(377.000000, 314.000000)"
|
|
2963
|
-
}, /*#__PURE__*/
|
|
2973
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2964
2974
|
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",
|
|
2965
2975
|
id: "Combined-Shape",
|
|
2966
2976
|
fill: iconColor,
|
|
2967
2977
|
fillRule: "nonzero"
|
|
2968
|
-
}), /*#__PURE__*/
|
|
2978
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
2969
2979
|
id: "Rectangle-19",
|
|
2970
2980
|
stroke: iconColor,
|
|
2971
2981
|
strokeWidth: "3",
|
|
@@ -2977,24 +2987,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
2977
2987
|
}))));
|
|
2978
2988
|
};
|
|
2979
2989
|
ImageFallbackIcon.propTypes = {
|
|
2980
|
-
width:
|
|
2981
|
-
height:
|
|
2982
|
-
iconColor:
|
|
2990
|
+
width: PropTypes__default["default"].object,
|
|
2991
|
+
height: PropTypes__default["default"].object,
|
|
2992
|
+
iconColor: PropTypes__default["default"].object
|
|
2983
2993
|
};
|
|
2984
2994
|
|
|
2985
2995
|
var imageFallback = function imageFallback() {
|
|
2986
|
-
return /*#__PURE__*/
|
|
2996
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2987
2997
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
2988
|
-
}, /*#__PURE__*/
|
|
2998
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
2989
2999
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
2990
|
-
}, /*#__PURE__*/
|
|
3000
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
2991
3001
|
};
|
|
2992
3002
|
|
|
2993
3003
|
var FallbackImage = function FallbackImage(_ref) {
|
|
2994
3004
|
var slug = _ref.slug;
|
|
2995
3005
|
|
|
2996
3006
|
if (slug) {
|
|
2997
|
-
return /*#__PURE__*/
|
|
3007
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2998
3008
|
href: slug,
|
|
2999
3009
|
"aria-label": "image-fallback"
|
|
3000
3010
|
}, imageFallback());
|
|
@@ -3003,23 +3013,23 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
3003
3013
|
}
|
|
3004
3014
|
};
|
|
3005
3015
|
FallbackImage.propTypes = {
|
|
3006
|
-
slug:
|
|
3016
|
+
slug: PropTypes__default["default"].string
|
|
3007
3017
|
};
|
|
3008
3018
|
|
|
3009
3019
|
var HyperLinkIcon = function HyperLinkIcon() {
|
|
3010
|
-
return /*#__PURE__*/
|
|
3020
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3011
3021
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3012
3022
|
width: "36",
|
|
3013
3023
|
height: "28"
|
|
3014
|
-
}, /*#__PURE__*/
|
|
3024
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3015
3025
|
fill: "none",
|
|
3016
3026
|
fillRule: "evenodd"
|
|
3017
|
-
}, /*#__PURE__*/
|
|
3027
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3018
3028
|
width: "36",
|
|
3019
3029
|
height: "28",
|
|
3020
3030
|
fill: "#3D6FCF",
|
|
3021
3031
|
rx: "4"
|
|
3022
|
-
}), /*#__PURE__*/
|
|
3032
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3023
3033
|
stroke: "#FFF",
|
|
3024
3034
|
strokeLinecap: "round",
|
|
3025
3035
|
strokeLinejoin: "round",
|
|
@@ -3032,16 +3042,16 @@ var HyperLink = function HyperLink(_ref) {
|
|
|
3032
3042
|
var _ref$hyperLink = _ref.hyperLink,
|
|
3033
3043
|
hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
|
|
3034
3044
|
if (!hyperLink) return null;
|
|
3035
|
-
return /*#__PURE__*/
|
|
3045
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3036
3046
|
href: hyperLink,
|
|
3037
3047
|
"aria-label": "hyperlink-button",
|
|
3038
3048
|
className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
|
|
3039
3049
|
target: "_blank",
|
|
3040
3050
|
rel: "noopener noreferrer"
|
|
3041
|
-
}, /*#__PURE__*/
|
|
3051
|
+
}, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
|
|
3042
3052
|
};
|
|
3043
3053
|
HyperLink.propTypes = {
|
|
3044
|
-
hyperLink:
|
|
3054
|
+
hyperLink: PropTypes__default["default"].string
|
|
3045
3055
|
};
|
|
3046
3056
|
|
|
3047
3057
|
var _styleModuleImportMap$a = {
|
|
@@ -3077,7 +3087,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3077
3087
|
StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
|
|
3078
3088
|
return null;
|
|
3079
3089
|
} : _config$StoryTemplate;
|
|
3080
|
-
var showImagePlaceholder = useSelector(function (state) {
|
|
3090
|
+
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3081
3091
|
return get_1(state, ["qt", "config", "showPlaceholder"]);
|
|
3082
3092
|
});
|
|
3083
3093
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
@@ -3113,37 +3123,37 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3113
3123
|
var fallbackImage = function fallbackImage() {
|
|
3114
3124
|
if (!slug) {
|
|
3115
3125
|
if (fallbackImageUrl && !isStoryPageImage) {
|
|
3116
|
-
return /*#__PURE__*/
|
|
3126
|
+
return /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3117
3127
|
style: {
|
|
3118
3128
|
paddingTop: imagePadding + "%"
|
|
3119
3129
|
},
|
|
3120
3130
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$a)
|
|
3121
|
-
}, /*#__PURE__*/
|
|
3131
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3122
3132
|
className: "qt-image",
|
|
3123
3133
|
"data-src": "".concat(fallbackImageUrl),
|
|
3124
3134
|
alt: "image-fallback"
|
|
3125
3135
|
}));
|
|
3126
3136
|
}
|
|
3127
3137
|
|
|
3128
|
-
return /*#__PURE__*/
|
|
3138
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3129
3139
|
"data-test-id": "arr--fallback-hero-image",
|
|
3130
3140
|
style: {
|
|
3131
3141
|
paddingTop: imagePadding + "%"
|
|
3132
3142
|
},
|
|
3133
3143
|
className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$a)
|
|
3134
|
-
}, /*#__PURE__*/
|
|
3144
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3135
3145
|
storyTemplate: story["story-template"]
|
|
3136
|
-
}), /*#__PURE__*/
|
|
3146
|
+
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
3137
3147
|
}
|
|
3138
3148
|
|
|
3139
|
-
return /*#__PURE__*/
|
|
3149
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3140
3150
|
style: {
|
|
3141
3151
|
paddingTop: imagePadding + "%"
|
|
3142
3152
|
},
|
|
3143
3153
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$a)
|
|
3144
|
-
}, /*#__PURE__*/
|
|
3154
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3145
3155
|
storyTemplate: story["story-template"]
|
|
3146
|
-
}), /*#__PURE__*/
|
|
3156
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
3147
3157
|
story: story,
|
|
3148
3158
|
aspectRatio: imageAspectRatio,
|
|
3149
3159
|
defaultWidth: defaultWidth,
|
|
@@ -3152,15 +3162,15 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3152
3162
|
auto: ["format", "compress"],
|
|
3153
3163
|
fit: "max"
|
|
3154
3164
|
}
|
|
3155
|
-
})), isStoryPageImage && hyperLink && /*#__PURE__*/
|
|
3165
|
+
})), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
|
|
3156
3166
|
hyperLink: hyperLink
|
|
3157
3167
|
}));
|
|
3158
3168
|
};
|
|
3159
3169
|
|
|
3160
|
-
return story && (isStoryPageImage ? /*#__PURE__*/
|
|
3170
|
+
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3161
3171
|
"data-test-id": "arr--hero-image",
|
|
3162
3172
|
className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$a)
|
|
3163
|
-
}, fallbackImage()) : /*#__PURE__*/
|
|
3173
|
+
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3164
3174
|
"data-test-id": "arr--hero-image",
|
|
3165
3175
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3166
3176
|
externalLink: isExternalStory(story),
|
|
@@ -3170,30 +3180,30 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3170
3180
|
};
|
|
3171
3181
|
HeroImage.propTypes = {
|
|
3172
3182
|
/** The Story Object from the API response */
|
|
3173
|
-
story:
|
|
3183
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3174
3184
|
|
|
3175
3185
|
/** Removes the Hero Image padding for the image to bleed over the margin */
|
|
3176
|
-
FullBleed:
|
|
3186
|
+
FullBleed: PropTypes__default["default"].bool,
|
|
3177
3187
|
|
|
3178
3188
|
/** The default width for the image, in case the browser does not support srcset */
|
|
3179
|
-
defaultWidth:
|
|
3189
|
+
defaultWidth: PropTypes__default["default"].number,
|
|
3180
3190
|
|
|
3181
3191
|
/** The list of available widths */
|
|
3182
|
-
widths:
|
|
3192
|
+
widths: PropTypes__default["default"].array,
|
|
3183
3193
|
// fatch the correct hero image
|
|
3184
|
-
aspectRatio:
|
|
3194
|
+
aspectRatio: PropTypes__default["default"].array,
|
|
3185
3195
|
// Hints for the browser to choose the best size
|
|
3186
3196
|
|
|
3187
3197
|
/** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
|
|
3188
|
-
isHorizontal:
|
|
3198
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3189
3199
|
|
|
3190
3200
|
/** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
|
|
3191
|
-
isHorizontalMobile:
|
|
3201
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3192
3202
|
// this prop is responsive for rendering fallback image on story page
|
|
3193
|
-
defaultFallback:
|
|
3194
|
-
isHorizontalWithImageLast:
|
|
3195
|
-
isStoryPageImage:
|
|
3196
|
-
config:
|
|
3203
|
+
defaultFallback: PropTypes__default["default"].bool,
|
|
3204
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool,
|
|
3205
|
+
isStoryPageImage: PropTypes__default["default"].bool,
|
|
3206
|
+
config: PropTypes__default["default"].object
|
|
3197
3207
|
};
|
|
3198
3208
|
HeroImage.defaultProps = {
|
|
3199
3209
|
FullBleed: true,
|
|
@@ -3214,7 +3224,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3214
3224
|
_ref$color = _ref.color,
|
|
3215
3225
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
3216
3226
|
positionTop = _ref.positionTop;
|
|
3217
|
-
return /*#__PURE__*/
|
|
3227
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3218
3228
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3219
3229
|
width: width,
|
|
3220
3230
|
height: height,
|
|
@@ -3223,28 +3233,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3223
3233
|
position: "relative",
|
|
3224
3234
|
top: positionTop
|
|
3225
3235
|
}
|
|
3226
|
-
}, /*#__PURE__*/
|
|
3236
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3227
3237
|
fill: "none",
|
|
3228
3238
|
fillRule: "evenodd",
|
|
3229
3239
|
stroke: "none",
|
|
3230
3240
|
strokeWidth: "1"
|
|
3231
|
-
}, /*#__PURE__*/
|
|
3241
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3232
3242
|
transform: "translate(8 8)"
|
|
3233
|
-
}, /*#__PURE__*/
|
|
3243
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3234
3244
|
d: "M0 0H24V24H0z"
|
|
3235
|
-
}), /*#__PURE__*/
|
|
3245
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3236
3246
|
fill: color,
|
|
3237
3247
|
fillRule: "nonzero",
|
|
3238
3248
|
transform: "translate(0 2)"
|
|
3239
|
-
}, /*#__PURE__*/
|
|
3249
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3240
3250
|
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"
|
|
3241
3251
|
}))))));
|
|
3242
3252
|
};
|
|
3243
3253
|
CrownIcon.propTypes = {
|
|
3244
|
-
height:
|
|
3245
|
-
width:
|
|
3246
|
-
color:
|
|
3247
|
-
positionTop:
|
|
3254
|
+
height: PropTypes__default["default"].string,
|
|
3255
|
+
width: PropTypes__default["default"].string,
|
|
3256
|
+
color: PropTypes__default["default"].string,
|
|
3257
|
+
positionTop: PropTypes__default["default"].string
|
|
3248
3258
|
};
|
|
3249
3259
|
|
|
3250
3260
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -3253,7 +3263,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3253
3263
|
_ref$color = _ref.color,
|
|
3254
3264
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3255
3265
|
positionTop = _ref.positionTop;
|
|
3256
|
-
return /*#__PURE__*/
|
|
3266
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3257
3267
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3258
3268
|
width: width,
|
|
3259
3269
|
height: height,
|
|
@@ -3262,16 +3272,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3262
3272
|
position: "relative",
|
|
3263
3273
|
top: positionTop
|
|
3264
3274
|
}
|
|
3265
|
-
}, /*#__PURE__*/
|
|
3275
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3266
3276
|
fill: "none",
|
|
3267
3277
|
fillRule: "evenodd",
|
|
3268
3278
|
stroke: "none",
|
|
3269
3279
|
strokeWidth: "1"
|
|
3270
|
-
}, /*#__PURE__*/
|
|
3280
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3271
3281
|
transform: "translate(8 8)"
|
|
3272
|
-
}, /*#__PURE__*/
|
|
3282
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3273
3283
|
d: "M0 0H24V24H0z"
|
|
3274
|
-
}), /*#__PURE__*/
|
|
3284
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3275
3285
|
fill: color,
|
|
3276
3286
|
fillRule: "nonzero",
|
|
3277
3287
|
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",
|
|
@@ -3279,10 +3289,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3279
3289
|
})))));
|
|
3280
3290
|
};
|
|
3281
3291
|
KeyIcon.propTypes = {
|
|
3282
|
-
height:
|
|
3283
|
-
width:
|
|
3284
|
-
color:
|
|
3285
|
-
positionTop:
|
|
3292
|
+
height: PropTypes__default["default"].string,
|
|
3293
|
+
width: PropTypes__default["default"].string,
|
|
3294
|
+
color: PropTypes__default["default"].string,
|
|
3295
|
+
positionTop: PropTypes__default["default"].string
|
|
3286
3296
|
};
|
|
3287
3297
|
|
|
3288
3298
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -3291,7 +3301,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3291
3301
|
_ref$color = _ref.color,
|
|
3292
3302
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3293
3303
|
positionTop = _ref.positionTop;
|
|
3294
|
-
return /*#__PURE__*/
|
|
3304
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3295
3305
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3296
3306
|
width: width,
|
|
3297
3307
|
height: height,
|
|
@@ -3300,28 +3310,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3300
3310
|
position: "relative",
|
|
3301
3311
|
top: positionTop
|
|
3302
3312
|
}
|
|
3303
|
-
}, /*#__PURE__*/
|
|
3313
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3304
3314
|
fill: "none",
|
|
3305
3315
|
fillRule: "evenodd",
|
|
3306
3316
|
stroke: "none",
|
|
3307
3317
|
strokeWidth: "1"
|
|
3308
|
-
}, /*#__PURE__*/
|
|
3318
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3309
3319
|
transform: "translate(8 8)"
|
|
3310
|
-
}, /*#__PURE__*/
|
|
3320
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3311
3321
|
d: "M0 0H24V24H0z"
|
|
3312
|
-
}), /*#__PURE__*/
|
|
3322
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3313
3323
|
fill: color,
|
|
3314
3324
|
fillRule: "nonzero",
|
|
3315
3325
|
transform: "translate(3)"
|
|
3316
|
-
}, /*#__PURE__*/
|
|
3326
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3317
3327
|
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"
|
|
3318
3328
|
}))))));
|
|
3319
3329
|
};
|
|
3320
3330
|
LockIcon.propTypes = {
|
|
3321
|
-
height:
|
|
3322
|
-
width:
|
|
3323
|
-
color:
|
|
3324
|
-
positionTop:
|
|
3331
|
+
height: PropTypes__default["default"].string,
|
|
3332
|
+
width: PropTypes__default["default"].string,
|
|
3333
|
+
color: PropTypes__default["default"].string,
|
|
3334
|
+
positionTop: PropTypes__default["default"].string
|
|
3325
3335
|
};
|
|
3326
3336
|
|
|
3327
3337
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -3331,7 +3341,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3331
3341
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3332
3342
|
_ref$positionTop = _ref.positionTop,
|
|
3333
3343
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
3334
|
-
return /*#__PURE__*/
|
|
3344
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3335
3345
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3336
3346
|
width: width,
|
|
3337
3347
|
height: height,
|
|
@@ -3340,21 +3350,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3340
3350
|
position: "relative",
|
|
3341
3351
|
top: positionTop
|
|
3342
3352
|
}
|
|
3343
|
-
}, /*#__PURE__*/
|
|
3353
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3344
3354
|
fill: "none",
|
|
3345
3355
|
fillRule: "evenodd",
|
|
3346
3356
|
stroke: "none",
|
|
3347
3357
|
strokeWidth: "1"
|
|
3348
|
-
}, /*#__PURE__*/
|
|
3358
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3349
3359
|
fill: color,
|
|
3350
3360
|
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"
|
|
3351
3361
|
}))));
|
|
3352
3362
|
};
|
|
3353
3363
|
StarIcon.propTypes = {
|
|
3354
|
-
height:
|
|
3355
|
-
width:
|
|
3356
|
-
color:
|
|
3357
|
-
positionTop:
|
|
3364
|
+
height: PropTypes__default["default"].string,
|
|
3365
|
+
width: PropTypes__default["default"].string,
|
|
3366
|
+
color: PropTypes__default["default"].string,
|
|
3367
|
+
positionTop: PropTypes__default["default"].string
|
|
3358
3368
|
};
|
|
3359
3369
|
|
|
3360
3370
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -3366,7 +3376,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3366
3376
|
|
|
3367
3377
|
switch (iconType) {
|
|
3368
3378
|
case "crown":
|
|
3369
|
-
return /*#__PURE__*/
|
|
3379
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
3370
3380
|
width: width,
|
|
3371
3381
|
height: height,
|
|
3372
3382
|
color: color,
|
|
@@ -3374,7 +3384,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3374
3384
|
});
|
|
3375
3385
|
|
|
3376
3386
|
case "lock":
|
|
3377
|
-
return /*#__PURE__*/
|
|
3387
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
3378
3388
|
width: width,
|
|
3379
3389
|
height: height,
|
|
3380
3390
|
color: color,
|
|
@@ -3382,7 +3392,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3382
3392
|
});
|
|
3383
3393
|
|
|
3384
3394
|
case "key":
|
|
3385
|
-
return /*#__PURE__*/
|
|
3395
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
3386
3396
|
width: width,
|
|
3387
3397
|
height: height,
|
|
3388
3398
|
color: color,
|
|
@@ -3390,7 +3400,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3390
3400
|
});
|
|
3391
3401
|
|
|
3392
3402
|
default:
|
|
3393
|
-
return /*#__PURE__*/
|
|
3403
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
3394
3404
|
width: width,
|
|
3395
3405
|
height: height,
|
|
3396
3406
|
color: color,
|
|
@@ -3399,21 +3409,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3399
3409
|
}
|
|
3400
3410
|
};
|
|
3401
3411
|
PremiumStoryIcon.propTypes = {
|
|
3402
|
-
width:
|
|
3403
|
-
height:
|
|
3404
|
-
color:
|
|
3405
|
-
iconType:
|
|
3406
|
-
positionTop:
|
|
3412
|
+
width: PropTypes__default["default"].string,
|
|
3413
|
+
height: PropTypes__default["default"].string,
|
|
3414
|
+
color: PropTypes__default["default"].string,
|
|
3415
|
+
iconType: PropTypes__default["default"].string,
|
|
3416
|
+
positionTop: PropTypes__default["default"].string
|
|
3407
3417
|
};
|
|
3408
3418
|
|
|
3409
3419
|
function LiveIcon() {
|
|
3410
|
-
return /*#__PURE__*/
|
|
3420
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3411
3421
|
className: "live-icon",
|
|
3412
3422
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3413
3423
|
width: "25",
|
|
3414
3424
|
height: "24",
|
|
3415
3425
|
viewBox: "0 0 25 24"
|
|
3416
|
-
}, /*#__PURE__*/
|
|
3426
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3417
3427
|
fill: "#ff5858",
|
|
3418
3428
|
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"
|
|
3419
3429
|
}));
|
|
@@ -3470,37 +3480,37 @@ var Headline = function Headline(_ref) {
|
|
|
3470
3480
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3471
3481
|
var iconSize = "24px";
|
|
3472
3482
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
3473
|
-
return /*#__PURE__*/
|
|
3483
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3474
3484
|
"data-test-id": "headline",
|
|
3475
3485
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$9)
|
|
3476
|
-
}, premiumStory && /*#__PURE__*/
|
|
3486
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3477
3487
|
width: iconSize,
|
|
3478
3488
|
height: iconSize,
|
|
3479
3489
|
color: iconColor,
|
|
3480
3490
|
iconType: iconStyle,
|
|
3481
3491
|
positionTop: positionHeadline()
|
|
3482
|
-
}), isLink ? /*#__PURE__*/
|
|
3492
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3483
3493
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3484
3494
|
externalLink: isExternalStory(story),
|
|
3485
3495
|
"aria-label": "headline"
|
|
3486
|
-
}, /*#__PURE__*/
|
|
3496
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3487
3497
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$9)
|
|
3488
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3498
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3489
3499
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$9)
|
|
3490
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3500
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3491
3501
|
};
|
|
3492
3502
|
Headline.propTypes = {
|
|
3493
3503
|
/** The Story Object from the API response */
|
|
3494
|
-
story:
|
|
3504
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3495
3505
|
|
|
3496
3506
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3497
|
-
headerLevel:
|
|
3498
|
-
premiumStoryIconConfig:
|
|
3499
|
-
iconColor:
|
|
3500
|
-
iconType:
|
|
3501
|
-
enablePremiumStoryIcon:
|
|
3507
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3508
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
3509
|
+
iconColor: PropTypes__default["default"].string,
|
|
3510
|
+
iconType: PropTypes__default["default"].string,
|
|
3511
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3502
3512
|
}),
|
|
3503
|
-
isLink:
|
|
3513
|
+
isLink: PropTypes__default["default"].bool
|
|
3504
3514
|
};
|
|
3505
3515
|
Headline.defaultProps = {
|
|
3506
3516
|
headerLevel: "6",
|
|
@@ -3527,7 +3537,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3527
3537
|
var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
|
|
3528
3538
|
if (!subheadline) return null;
|
|
3529
3539
|
var textColor = getTextColor(config.theme);
|
|
3530
|
-
return /*#__PURE__*/
|
|
3540
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3531
3541
|
style: {
|
|
3532
3542
|
WebkitLineClamp: lineClamp
|
|
3533
3543
|
},
|
|
@@ -3537,15 +3547,15 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3537
3547
|
};
|
|
3538
3548
|
Subheadline.propTypes = {
|
|
3539
3549
|
/** The Story Object from the API response */
|
|
3540
|
-
story:
|
|
3550
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3541
3551
|
// Restricts the number of lines for subheadline.
|
|
3542
|
-
lineClamp:
|
|
3552
|
+
lineClamp: PropTypes__default["default"].number,
|
|
3543
3553
|
|
|
3544
3554
|
/** Number of characters to truncate the subheadline */
|
|
3545
|
-
truncateChars:
|
|
3546
|
-
clazzName:
|
|
3547
|
-
forceShowAtom:
|
|
3548
|
-
showFullContent:
|
|
3555
|
+
truncateChars: PropTypes__default["default"].number,
|
|
3556
|
+
clazzName: PropTypes__default["default"].string,
|
|
3557
|
+
forceShowAtom: PropTypes__default["default"].bool,
|
|
3558
|
+
showFullContent: PropTypes__default["default"].bool
|
|
3549
3559
|
};
|
|
3550
3560
|
Subheadline.defaultProps = {
|
|
3551
3561
|
forceShowAtom: false,
|
|
@@ -3571,18 +3581,18 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3571
3581
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3572
3582
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3573
3583
|
var textColor = getTextColor(configState.theme);
|
|
3574
|
-
return /*#__PURE__*/
|
|
3584
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3575
3585
|
"data-test-id": "publish-time",
|
|
3576
3586
|
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$7)
|
|
3577
|
-
}, /*#__PURE__*/
|
|
3587
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3578
3588
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3579
3589
|
}, getTimeStamp(time, formatter, config))));
|
|
3580
3590
|
};
|
|
3581
3591
|
TimeStamp.propTypes = {
|
|
3582
3592
|
/** The Story Object from the API response */
|
|
3583
|
-
story:
|
|
3584
|
-
isBottom:
|
|
3585
|
-
config:
|
|
3593
|
+
story: PropTypes__default["default"].object,
|
|
3594
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3595
|
+
config: PropTypes__default["default"].object
|
|
3586
3596
|
};
|
|
3587
3597
|
|
|
3588
3598
|
var _styleModuleImportMap$6 = {
|
|
@@ -3625,10 +3635,10 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3625
3635
|
return null;
|
|
3626
3636
|
}
|
|
3627
3637
|
|
|
3628
|
-
return /*#__PURE__*/
|
|
3638
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3629
3639
|
"data-test-id": "author-image",
|
|
3630
3640
|
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$6)
|
|
3631
|
-
}, /*#__PURE__*/
|
|
3641
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3632
3642
|
slug: avatarS3Key,
|
|
3633
3643
|
"aspect-ratio": [1, 1],
|
|
3634
3644
|
defaultWidth: 400,
|
|
@@ -3636,14 +3646,14 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3636
3646
|
auto: ["format", "compress"]
|
|
3637
3647
|
},
|
|
3638
3648
|
alt: authorName
|
|
3639
|
-
}) : /*#__PURE__*/
|
|
3649
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3640
3650
|
src: avatarUrl
|
|
3641
3651
|
})));
|
|
3642
3652
|
};
|
|
3643
3653
|
|
|
3644
3654
|
var isPrefix = function isPrefix(dir) {
|
|
3645
3655
|
if (prefix) {
|
|
3646
|
-
return /*#__PURE__*/
|
|
3656
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3647
3657
|
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$6)
|
|
3648
3658
|
}, prefix);
|
|
3649
3659
|
}
|
|
@@ -3651,11 +3661,11 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3651
3661
|
return !hideAuthorImage && authorImage(dir);
|
|
3652
3662
|
};
|
|
3653
3663
|
|
|
3654
|
-
return /*#__PURE__*/
|
|
3664
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3655
3665
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3656
3666
|
"aria-label": "author-name",
|
|
3657
3667
|
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$6)
|
|
3658
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
3668
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3659
3669
|
"data-test-id": "author-name",
|
|
3660
3670
|
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$6)
|
|
3661
3671
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
@@ -3667,18 +3677,18 @@ function mapStateToProps(state) {
|
|
|
3667
3677
|
};
|
|
3668
3678
|
}
|
|
3669
3679
|
|
|
3670
|
-
var Author = connect(mapStateToProps)(AuthorBase);
|
|
3680
|
+
var Author = reactRedux.connect(mapStateToProps)(AuthorBase);
|
|
3671
3681
|
AuthorBase.propTypes = {
|
|
3672
3682
|
/** The Story Object from the API response */
|
|
3673
|
-
story:
|
|
3683
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3674
3684
|
|
|
3675
3685
|
/** Hide Author Avatar Image */
|
|
3676
|
-
hideAuthorImage:
|
|
3686
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3677
3687
|
// fix Author bottom of the storyCard
|
|
3678
|
-
isBottom:
|
|
3688
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3679
3689
|
// fix prefix before the author name
|
|
3680
|
-
prefix:
|
|
3681
|
-
config:
|
|
3690
|
+
prefix: PropTypes__default["default"].string,
|
|
3691
|
+
config: PropTypes__default["default"].object
|
|
3682
3692
|
};
|
|
3683
3693
|
AuthorBase.defaultProps = {
|
|
3684
3694
|
hideAuthorImage: false,
|
|
@@ -3699,14 +3709,14 @@ var Dot = function Dot(_ref) {
|
|
|
3699
3709
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3700
3710
|
_ref$color = _ref.color,
|
|
3701
3711
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3702
|
-
return /*#__PURE__*/
|
|
3712
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3703
3713
|
className: _getClassName(color, _styleModuleImportMap$5)
|
|
3704
|
-
}, /*#__PURE__*/
|
|
3714
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3705
3715
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3706
3716
|
width: width,
|
|
3707
3717
|
height: height,
|
|
3708
3718
|
viewBox: "0 0 3 3"
|
|
3709
|
-
}, /*#__PURE__*/
|
|
3719
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3710
3720
|
cx: "87",
|
|
3711
3721
|
cy: "9",
|
|
3712
3722
|
r: "1",
|
|
@@ -3717,9 +3727,9 @@ var Dot = function Dot(_ref) {
|
|
|
3717
3727
|
};
|
|
3718
3728
|
Dot.propTypes = {
|
|
3719
3729
|
/** height , width and color of the dot icon */
|
|
3720
|
-
color:
|
|
3721
|
-
width:
|
|
3722
|
-
height:
|
|
3730
|
+
color: PropTypes__default["default"].string,
|
|
3731
|
+
width: PropTypes__default["default"].string,
|
|
3732
|
+
height: PropTypes__default["default"].string
|
|
3723
3733
|
};
|
|
3724
3734
|
|
|
3725
3735
|
var _styleModuleImportMap$4 = {
|
|
@@ -3735,22 +3745,22 @@ var Divider = function Divider(_ref) {
|
|
|
3735
3745
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3736
3746
|
_ref$color = _ref.color,
|
|
3737
3747
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3738
|
-
return /*#__PURE__*/
|
|
3748
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3739
3749
|
className: _getClassName(color, _styleModuleImportMap$4)
|
|
3740
|
-
}, /*#__PURE__*/
|
|
3750
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3741
3751
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3742
3752
|
width: width,
|
|
3743
3753
|
height: height
|
|
3744
|
-
}, /*#__PURE__*/
|
|
3754
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3745
3755
|
fill: "inherit",
|
|
3746
3756
|
d: "M0 0h1v10H0z"
|
|
3747
3757
|
})));
|
|
3748
3758
|
};
|
|
3749
3759
|
Divider.propTypes = {
|
|
3750
3760
|
/** height , width and color of the dot icon */
|
|
3751
|
-
color:
|
|
3752
|
-
width:
|
|
3753
|
-
height:
|
|
3761
|
+
color: PropTypes__default["default"].string,
|
|
3762
|
+
width: PropTypes__default["default"].string,
|
|
3763
|
+
height: PropTypes__default["default"].string
|
|
3754
3764
|
};
|
|
3755
3765
|
|
|
3756
3766
|
var _styleModuleImportMap$3 = {
|
|
@@ -3773,23 +3783,23 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3773
3783
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3774
3784
|
if (!showReadTime || !readTime) return null;
|
|
3775
3785
|
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
3776
|
-
return /*#__PURE__*/
|
|
3786
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3777
3787
|
"data-test-id": "read-time",
|
|
3778
3788
|
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$3)
|
|
3779
|
-
}, /*#__PURE__*/
|
|
3789
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3780
3790
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3781
|
-
}, /*#__PURE__*/
|
|
3791
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3782
3792
|
color: textColor
|
|
3783
|
-
})), /*#__PURE__*/
|
|
3793
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3784
3794
|
};
|
|
3785
3795
|
ReadTime.propTypes = {
|
|
3786
|
-
story:
|
|
3787
|
-
"read-time":
|
|
3796
|
+
story: PropTypes__default["default"].shape({
|
|
3797
|
+
"read-time": PropTypes__default["default"].number
|
|
3788
3798
|
}),
|
|
3789
|
-
opts:
|
|
3790
|
-
showReadTime:
|
|
3799
|
+
opts: PropTypes__default["default"].shape({
|
|
3800
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3791
3801
|
}),
|
|
3792
|
-
isLightTheme:
|
|
3802
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3793
3803
|
};
|
|
3794
3804
|
|
|
3795
3805
|
var _styleModuleImportMap$2 = {
|
|
@@ -3820,33 +3830,33 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3820
3830
|
|
|
3821
3831
|
var getSeparator = function getSeparator() {
|
|
3822
3832
|
if (separator === "divider") {
|
|
3823
|
-
return /*#__PURE__*/
|
|
3833
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3824
3834
|
color: textColor
|
|
3825
3835
|
});
|
|
3826
3836
|
}
|
|
3827
3837
|
|
|
3828
|
-
return /*#__PURE__*/
|
|
3838
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3829
3839
|
color: textColor
|
|
3830
3840
|
});
|
|
3831
3841
|
};
|
|
3832
3842
|
|
|
3833
3843
|
var getTimeStamp = function getTimeStamp() {
|
|
3834
3844
|
if (!isTime) return null;
|
|
3835
|
-
return /*#__PURE__*/
|
|
3845
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3836
3846
|
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$2)
|
|
3837
|
-
}, getSeparator()), /*#__PURE__*/
|
|
3847
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3838
3848
|
story: story,
|
|
3839
3849
|
config: config
|
|
3840
|
-
}), isReadTime && /*#__PURE__*/
|
|
3850
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3841
3851
|
story: story,
|
|
3842
3852
|
opts: config,
|
|
3843
3853
|
isLightTheme: isLightTheme
|
|
3844
3854
|
}));
|
|
3845
3855
|
};
|
|
3846
3856
|
|
|
3847
|
-
return /*#__PURE__*/
|
|
3857
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3848
3858
|
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$2)
|
|
3849
|
-
}, isAuthor ? /*#__PURE__*/
|
|
3859
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3850
3860
|
story: story,
|
|
3851
3861
|
isBottom: true,
|
|
3852
3862
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3854,19 +3864,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3854
3864
|
}), getTimeStamp()) : getTimeStamp());
|
|
3855
3865
|
};
|
|
3856
3866
|
AuthorWithTime.propTypes = {
|
|
3857
|
-
story:
|
|
3867
|
+
story: PropTypes__default["default"].object,
|
|
3858
3868
|
|
|
3859
3869
|
/** Style of separator between the Author & Timestamp */
|
|
3860
|
-
separator:
|
|
3870
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3861
3871
|
|
|
3862
3872
|
/** hide the author image */
|
|
3863
|
-
hideAuthorImage:
|
|
3873
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3864
3874
|
// fix author and time at the end
|
|
3865
|
-
isBottom:
|
|
3875
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3866
3876
|
// fix prefix before the author name
|
|
3867
|
-
prefix:
|
|
3868
|
-
config:
|
|
3869
|
-
isLightTheme:
|
|
3877
|
+
prefix: PropTypes__default["default"].string,
|
|
3878
|
+
config: PropTypes__default["default"].object,
|
|
3879
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3870
3880
|
};
|
|
3871
3881
|
AuthorWithTime.defaultProps = {
|
|
3872
3882
|
separator: "dot",
|
|
@@ -3911,22 +3921,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3911
3921
|
}
|
|
3912
3922
|
|
|
3913
3923
|
if (!isSection) return null;
|
|
3914
|
-
return /*#__PURE__*/
|
|
3924
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3915
3925
|
href: getUrl,
|
|
3916
3926
|
className: "arrow-component arr--section-name",
|
|
3917
3927
|
"aria-label": "section-name"
|
|
3918
|
-
}, /*#__PURE__*/
|
|
3928
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3919
3929
|
"data-test-id": "sectionTag",
|
|
3920
3930
|
style: {
|
|
3921
3931
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
3922
3932
|
},
|
|
3923
3933
|
className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$1)
|
|
3924
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
3934
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3925
3935
|
className: "section-m_border-left__2oUyp",
|
|
3926
3936
|
style: {
|
|
3927
3937
|
color: sectionTagBorderColor
|
|
3928
3938
|
}
|
|
3929
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
3939
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3930
3940
|
className: "section-m_border-bottom__3cRoD",
|
|
3931
3941
|
style: {
|
|
3932
3942
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -3935,13 +3945,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3935
3945
|
};
|
|
3936
3946
|
SectionTag.propTypes = {
|
|
3937
3947
|
/** The Story Object from the API response */
|
|
3938
|
-
story:
|
|
3948
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3939
3949
|
|
|
3940
3950
|
/** The style template for section tag */
|
|
3941
|
-
template:
|
|
3942
|
-
borderColor:
|
|
3943
|
-
solidBorderColor:
|
|
3944
|
-
isLightTheme:
|
|
3951
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
3952
|
+
borderColor: PropTypes__default["default"].string,
|
|
3953
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
3954
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3945
3955
|
};
|
|
3946
3956
|
SectionTag.defaultProps = {
|
|
3947
3957
|
template: "",
|
|
@@ -3990,7 +4000,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
3990
4000
|
prefix = _ref.prefix,
|
|
3991
4001
|
config = _ref.config,
|
|
3992
4002
|
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
3993
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/
|
|
4003
|
+
if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
3994
4004
|
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
3995
4005
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
3996
4006
|
|
|
@@ -4000,7 +4010,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4000
4010
|
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
4001
4011
|
var textColor = getTextColor(theme);
|
|
4002
4012
|
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
4003
|
-
var defaultStorycard = /*#__PURE__*/
|
|
4013
|
+
var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
|
|
4004
4014
|
story: story,
|
|
4005
4015
|
aspectRatio: aspectRatio,
|
|
4006
4016
|
border: border,
|
|
@@ -4014,7 +4024,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4014
4024
|
config: config,
|
|
4015
4025
|
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
4016
4026
|
});
|
|
4017
|
-
return /*#__PURE__*/
|
|
4027
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4018
4028
|
"data-test-id": "story-card",
|
|
4019
4029
|
style: {
|
|
4020
4030
|
backgroundColor: theme,
|
|
@@ -4043,91 +4053,91 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
4043
4053
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4044
4054
|
var _config$localizationC = config.localizationConfig,
|
|
4045
4055
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4046
|
-
return /*#__PURE__*/
|
|
4056
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4047
4057
|
config: config,
|
|
4048
4058
|
story: story,
|
|
4049
4059
|
isHorizontal: true,
|
|
4050
4060
|
isHorizontalMobile: isHorizontalMobile,
|
|
4051
4061
|
aspectRatio: aspectRatio
|
|
4052
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/
|
|
4062
|
+
}) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4053
4063
|
config: config,
|
|
4054
4064
|
story: story,
|
|
4055
4065
|
isHorizontalWithImageLast: true,
|
|
4056
4066
|
isHorizontalMobile: isHorizontalMobile,
|
|
4057
4067
|
aspectRatio: aspectRatio
|
|
4058
|
-
}) : /*#__PURE__*/
|
|
4068
|
+
}) : /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4059
4069
|
story: story,
|
|
4060
4070
|
config: config,
|
|
4061
4071
|
isHorizontalMobile: isHorizontalMobile,
|
|
4062
4072
|
aspectRatio: aspectRatio
|
|
4063
|
-
}), /*#__PURE__*/
|
|
4073
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4064
4074
|
className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap)
|
|
4065
|
-
}, /*#__PURE__*/
|
|
4075
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4066
4076
|
story: story,
|
|
4067
4077
|
borderColor: SectionTagborderColor
|
|
4068
|
-
}), /*#__PURE__*/
|
|
4078
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4069
4079
|
story: story,
|
|
4070
4080
|
headerLevel: headerLevel,
|
|
4071
4081
|
premiumStoryIconConfig: config
|
|
4072
|
-
}), /*#__PURE__*/
|
|
4082
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4073
4083
|
config: localizationConfig,
|
|
4074
4084
|
story: story,
|
|
4075
4085
|
isBottom: true,
|
|
4076
4086
|
prefix: prefix,
|
|
4077
4087
|
hideAuthorImage: hideAuthorImage
|
|
4078
|
-
}), /*#__PURE__*/
|
|
4088
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
4079
4089
|
story: story
|
|
4080
4090
|
})));
|
|
4081
4091
|
};
|
|
4082
4092
|
|
|
4083
4093
|
DefaultStoryCard.propTypes = {
|
|
4084
|
-
story:
|
|
4085
|
-
border:
|
|
4086
|
-
isBottom:
|
|
4087
|
-
isHorizontal:
|
|
4088
|
-
aspectRatio:
|
|
4089
|
-
isHorizontalMobile:
|
|
4090
|
-
centerAlign:
|
|
4091
|
-
headerLevel:
|
|
4092
|
-
borderColor:
|
|
4093
|
-
hideAuthorImage:
|
|
4094
|
-
prefix:
|
|
4095
|
-
config:
|
|
4096
|
-
isHorizontalWithImageLast:
|
|
4094
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4095
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4096
|
+
isBottom: PropTypes__default["default"].bool,
|
|
4097
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4098
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4099
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4100
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4101
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4102
|
+
borderColor: PropTypes__default["default"].string,
|
|
4103
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4104
|
+
prefix: PropTypes__default["default"].string,
|
|
4105
|
+
config: PropTypes__default["default"].object,
|
|
4106
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4097
4107
|
};
|
|
4098
4108
|
StoryCard.propTypes = {
|
|
4099
4109
|
/** The Story Object from the API response */
|
|
4100
|
-
story:
|
|
4101
|
-
children:
|
|
4110
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4111
|
+
children: PropTypes__default["default"].node,
|
|
4102
4112
|
|
|
4103
4113
|
/** Flip the Story Card to Horizonal mode */
|
|
4104
|
-
isHorizontal:
|
|
4114
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4105
4115
|
|
|
4106
4116
|
/** Add border to the Story Card */
|
|
4107
|
-
border:
|
|
4117
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4108
4118
|
// story card with background image
|
|
4109
|
-
useImageAsBackground:
|
|
4119
|
+
useImageAsBackground: PropTypes__default["default"].bool,
|
|
4110
4120
|
// story card content overlap with image
|
|
4111
|
-
bgImgContentOverlap:
|
|
4121
|
+
bgImgContentOverlap: PropTypes__default["default"].bool,
|
|
4112
4122
|
|
|
4113
4123
|
/** add aspect ratio for hero image */
|
|
4114
|
-
aspectRatio:
|
|
4124
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4115
4125
|
|
|
4116
4126
|
/** add theme(dark /light/custom color) for storycard */
|
|
4117
|
-
theme:
|
|
4127
|
+
theme: PropTypes__default["default"].string,
|
|
4118
4128
|
|
|
4119
4129
|
/** flip the story card mobile design horizontal */
|
|
4120
|
-
isHorizontalMobile:
|
|
4130
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4121
4131
|
// make content center align in desktop and left align in mobile
|
|
4122
|
-
centerAlign:
|
|
4123
|
-
headerLevel:
|
|
4124
|
-
borderColor:
|
|
4132
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4133
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4134
|
+
borderColor: PropTypes__default["default"].string,
|
|
4125
4135
|
// handle author image through storycard
|
|
4126
|
-
hideAuthorImage:
|
|
4136
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4127
4137
|
// handle author prefix through storycard
|
|
4128
|
-
prefix:
|
|
4129
|
-
config:
|
|
4130
|
-
isHorizontalWithImageLast:
|
|
4138
|
+
prefix: PropTypes__default["default"].string,
|
|
4139
|
+
config: PropTypes__default["default"].object,
|
|
4140
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4131
4141
|
};
|
|
4132
4142
|
StoryCard.defaultProps = {
|
|
4133
4143
|
isHorizontal: false,
|
|
@@ -4144,7 +4154,7 @@ var ThreeColFourteenStoriesBase = function ThreeColFourteenStoriesBase(_ref) {
|
|
|
4144
4154
|
collection = _ref$collection === void 0 ? {} : _ref$collection,
|
|
4145
4155
|
_ref$config = _ref.config,
|
|
4146
4156
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
4147
|
-
var items = collectionToStories(collection);
|
|
4157
|
+
var items = components.collectionToStories(collection);
|
|
4148
4158
|
var _config$collectionNam = config.collectionNameBorderColor,
|
|
4149
4159
|
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
4150
4160
|
_config$borderColor = config.borderColor,
|
|
@@ -4177,7 +4187,7 @@ var ThreeColFourteenStoriesBase = function ThreeColFourteenStoriesBase(_ref) {
|
|
|
4177
4187
|
var storyCallBack = function storyCallBack() {
|
|
4178
4188
|
var restOftheStories = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
4179
4189
|
return restOftheStories.slice(10, 13).map(function (item) {
|
|
4180
|
-
return /*#__PURE__*/
|
|
4190
|
+
return /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4181
4191
|
key: item,
|
|
4182
4192
|
story: item,
|
|
4183
4193
|
isHorizontal: true,
|
|
@@ -4187,55 +4197,55 @@ var ThreeColFourteenStoriesBase = function ThreeColFourteenStoriesBase(_ref) {
|
|
|
4187
4197
|
});
|
|
4188
4198
|
};
|
|
4189
4199
|
|
|
4190
|
-
return /*#__PURE__*/
|
|
4200
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4191
4201
|
className: "full-width-with-padding arrow-component",
|
|
4192
4202
|
"data-test-id": "three-col-fourteen-stories",
|
|
4193
4203
|
style: {
|
|
4194
4204
|
backgroundColor: theme,
|
|
4195
4205
|
color: textColor
|
|
4196
4206
|
}
|
|
4197
|
-
}, /*#__PURE__*/
|
|
4207
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4198
4208
|
className: "three-col-fourteen-story-m_wrapper__1aJe1"
|
|
4199
|
-
}, /*#__PURE__*/
|
|
4209
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4200
4210
|
collection: collection,
|
|
4201
4211
|
collectionNameTemplate: collectionNameTemplate,
|
|
4202
4212
|
collectionNameBorderColor: collectionNameBorderColor
|
|
4203
|
-
}), /*#__PURE__*/
|
|
4213
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4204
4214
|
className: "three-col-fourteen-story-m_storycards-row__2ANrZ"
|
|
4205
|
-
}, /*#__PURE__*/
|
|
4215
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4206
4216
|
className: "first-card three-col-fourteen-story-m_card-with-separator__3MQHS three-col-fourteen-story-m_first-card__1nakj"
|
|
4207
|
-
}, /*#__PURE__*/
|
|
4217
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4208
4218
|
story: firstStory,
|
|
4209
4219
|
headerLevel: "2",
|
|
4210
4220
|
theme: theme,
|
|
4211
4221
|
aspectRatio: [[16, 9], [16, 9]],
|
|
4212
4222
|
config: config
|
|
4213
|
-
}, /*#__PURE__*/
|
|
4223
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4214
4224
|
story: firstStory,
|
|
4215
4225
|
aspectRatio: [[16, 9], [16, 9]]
|
|
4216
|
-
}), /*#__PURE__*/
|
|
4226
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4217
4227
|
className: "card-content"
|
|
4218
|
-
}, /*#__PURE__*/
|
|
4228
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4219
4229
|
story: firstStory,
|
|
4220
4230
|
borderColor: borderColor
|
|
4221
|
-
}), /*#__PURE__*/
|
|
4231
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4222
4232
|
story: firstStory,
|
|
4223
4233
|
headerLevel: "2",
|
|
4224
4234
|
premiumStoryIconConfig: config
|
|
4225
|
-
})), /*#__PURE__*/
|
|
4235
|
+
})), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
4226
4236
|
story: firstStory,
|
|
4227
4237
|
forceShowAtom: true
|
|
4228
|
-
})), secondStory && /*#__PURE__*/
|
|
4238
|
+
})), secondStory && /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4229
4239
|
border: border,
|
|
4230
4240
|
story: secondStory,
|
|
4231
4241
|
isHorizontal: true,
|
|
4232
4242
|
aspectRatio: [[1, 1], [4, 3]],
|
|
4233
4243
|
borderColor: borderColor,
|
|
4234
4244
|
config: config
|
|
4235
|
-
})), /*#__PURE__*/
|
|
4245
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4236
4246
|
className: "second-card three-col-fourteen-story-m_card-with-separator__3MQHS three-col-fourteen-story-m_second-card__3u49K"
|
|
4237
4247
|
}, restOftheStories.length > 0 && restOftheStories.slice(0, 6).map(function (item) {
|
|
4238
|
-
return /*#__PURE__*/
|
|
4248
|
+
return /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4239
4249
|
key: item,
|
|
4240
4250
|
story: item,
|
|
4241
4251
|
isHorizontal: true,
|
|
@@ -4245,10 +4255,10 @@ var ThreeColFourteenStoriesBase = function ThreeColFourteenStoriesBase(_ref) {
|
|
|
4245
4255
|
borderColor: borderColor,
|
|
4246
4256
|
config: config
|
|
4247
4257
|
});
|
|
4248
|
-
})), /*#__PURE__*/
|
|
4258
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4249
4259
|
className: "third-card three-col-fourteen-story-m_card-with-separator__3MQHS three-col-fourteen-story-m_third-card__wA-vu"
|
|
4250
4260
|
}, restOftheStories.length > 0 && restOftheStories.slice(6, 10).map(function (item) {
|
|
4251
|
-
return /*#__PURE__*/
|
|
4261
|
+
return /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4252
4262
|
key: items,
|
|
4253
4263
|
story: item,
|
|
4254
4264
|
isHorizontal: true,
|
|
@@ -4258,7 +4268,7 @@ var ThreeColFourteenStoriesBase = function ThreeColFourteenStoriesBase(_ref) {
|
|
|
4258
4268
|
borderColor: borderColor,
|
|
4259
4269
|
config: config
|
|
4260
4270
|
});
|
|
4261
|
-
}), /*#__PURE__*/
|
|
4271
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4262
4272
|
className: "three-col-fourteen-story-m_ad-slot__1XHTV"
|
|
4263
4273
|
}, getSlot(type, component, function () {
|
|
4264
4274
|
return storyCallBack(restOftheStories);
|
|
@@ -4266,18 +4276,19 @@ var ThreeColFourteenStoriesBase = function ThreeColFourteenStoriesBase(_ref) {
|
|
|
4266
4276
|
};
|
|
4267
4277
|
ThreeColFourteenStoriesBase.propTypes = {
|
|
4268
4278
|
/** collection is the array of objects which is returning by API */
|
|
4269
|
-
collection:
|
|
4279
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
4270
4280
|
|
|
4271
4281
|
/** The config for the Row */
|
|
4272
|
-
config:
|
|
4273
|
-
theme:
|
|
4274
|
-
border:
|
|
4275
|
-
slotConfig:
|
|
4276
|
-
collectionNameTemplate:
|
|
4277
|
-
collectionNameBorderColor:
|
|
4278
|
-
borderColor:
|
|
4282
|
+
config: PropTypes__default["default"].shape({
|
|
4283
|
+
theme: PropTypes__default["default"].string,
|
|
4284
|
+
border: PropTypes__default["default"].string,
|
|
4285
|
+
slotConfig: PropTypes__default["default"].array,
|
|
4286
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
4287
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
4288
|
+
borderColor: PropTypes__default["default"].string
|
|
4279
4289
|
})
|
|
4280
4290
|
};
|
|
4281
4291
|
var ThreeColFourteenStories = StateProvider(ThreeColFourteenStoriesBase);
|
|
4282
4292
|
|
|
4283
|
-
|
|
4293
|
+
exports.ThreeColFourteenStories = ThreeColFourteenStories;
|
|
4294
|
+
exports.ThreeColFourteenStoriesBase = ThreeColFourteenStoriesBase;
|