@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 Timeago = require('react-timeago');
|
|
8
|
+
var dateFnsTz = require('date-fns-tz');
|
|
9
|
+
var components = require('@quintype/components');
|
|
10
|
+
var reactRedux = require('react-redux');
|
|
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;
|
|
@@ -2696,15 +2706,15 @@ var isEmpty = function isEmpty(value) {
|
|
|
2696
2706
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2697
2707
|
_typeof(value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2698
2708
|
};
|
|
2699
|
-
|
|
2700
|
-
"sketches-host":
|
|
2701
|
-
"cdn-name":
|
|
2702
|
-
"cdn-image":
|
|
2709
|
+
PropTypes__default["default"].shape({
|
|
2710
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2711
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2712
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2703
2713
|
});
|
|
2704
|
-
|
|
2705
|
-
headline:
|
|
2706
|
-
"last-published-at":
|
|
2707
|
-
subheadline:
|
|
2714
|
+
PropTypes__default["default"].shape({
|
|
2715
|
+
headline: PropTypes__default["default"].string,
|
|
2716
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2717
|
+
subheadline: PropTypes__default["default"].string
|
|
2708
2718
|
});
|
|
2709
2719
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2710
2720
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2748,17 +2758,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2748
2758
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2749
2759
|
|
|
2750
2760
|
if (timezone && template === "story") {
|
|
2751
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2752
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2761
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2762
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2753
2763
|
timeZone: timezone
|
|
2754
2764
|
});
|
|
2755
2765
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2756
|
-
return /*#__PURE__*/
|
|
2766
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2757
2767
|
dateTime: formatZonedTime
|
|
2758
2768
|
}, timeStamp);
|
|
2759
2769
|
}
|
|
2760
2770
|
|
|
2761
|
-
return /*#__PURE__*/
|
|
2771
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2762
2772
|
date: date,
|
|
2763
2773
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2764
2774
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2766,21 +2776,21 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2766
2776
|
});
|
|
2767
2777
|
};
|
|
2768
2778
|
|
|
2769
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
2779
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
2770
2780
|
|
|
2771
2781
|
var StateProvider = function StateProvider(RowComponent) {
|
|
2772
2782
|
return function (props) {
|
|
2773
2783
|
return (
|
|
2774
2784
|
/*#__PURE__*/
|
|
2775
2785
|
// eslint-disable-next-line react/prop-types
|
|
2776
|
-
|
|
2786
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
2777
2787
|
value: props.config
|
|
2778
|
-
}, /*#__PURE__*/
|
|
2788
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
2779
2789
|
);
|
|
2780
2790
|
};
|
|
2781
2791
|
};
|
|
2782
2792
|
var useStateValue = function useStateValue() {
|
|
2783
|
-
return useContext(StateContext);
|
|
2793
|
+
return React.useContext(StateContext);
|
|
2784
2794
|
};
|
|
2785
2795
|
|
|
2786
2796
|
var _styleModuleImportMap$d = {
|
|
@@ -2819,7 +2829,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2819
2829
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
2820
2830
|
|
|
2821
2831
|
var borderBottomStyle = function borderBottomStyle() {
|
|
2822
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
2832
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2823
2833
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
2824
2834
|
style: {
|
|
2825
2835
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -2879,40 +2889,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2879
2889
|
}
|
|
2880
2890
|
};
|
|
2881
2891
|
|
|
2882
|
-
return /*#__PURE__*/
|
|
2892
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2883
2893
|
style: {
|
|
2884
2894
|
borderBottom: borderBottomFullStyle
|
|
2885
2895
|
},
|
|
2886
2896
|
"data-test-id": "collection-name",
|
|
2887
2897
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$d)
|
|
2888
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
2898
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2889
2899
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
2890
2900
|
style: {
|
|
2891
2901
|
color: CollectionNameBorderColor,
|
|
2892
2902
|
fontSize: getBorderHeight()
|
|
2893
2903
|
}
|
|
2894
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
2904
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2895
2905
|
href: slug,
|
|
2896
2906
|
"aria-label": "collection-name"
|
|
2897
|
-
}, /*#__PURE__*/
|
|
2907
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
2898
2908
|
};
|
|
2899
2909
|
CollectionNameBase.propTypes = {
|
|
2900
2910
|
/** Collection name border color */
|
|
2901
|
-
collectionNameBorderColor: PropTypes
|
|
2911
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
2902
2912
|
|
|
2903
2913
|
/** The Collection Object from the API response */
|
|
2904
|
-
collection: PropTypes
|
|
2914
|
+
collection: PropTypes.PropTypes.object,
|
|
2905
2915
|
|
|
2906
2916
|
/** The publisher config from the API response */
|
|
2907
|
-
config: PropTypes
|
|
2917
|
+
config: PropTypes.PropTypes.object,
|
|
2908
2918
|
|
|
2909
2919
|
/** The style template for the component */
|
|
2910
|
-
collectionNameTemplate: PropTypes
|
|
2920
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
2911
2921
|
|
|
2912
2922
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
2913
|
-
headerLevel: PropTypes
|
|
2914
|
-
customCollectionName: PropTypes
|
|
2915
|
-
navigate: PropTypes
|
|
2923
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
2924
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
2925
|
+
navigate: PropTypes.PropTypes.bool
|
|
2916
2926
|
};
|
|
2917
2927
|
CollectionNameBase.defaultProps = {
|
|
2918
2928
|
collectionNameTemplate: "",
|
|
@@ -2925,7 +2935,7 @@ function mapStateToProps$1(state) {
|
|
|
2925
2935
|
};
|
|
2926
2936
|
}
|
|
2927
2937
|
|
|
2928
|
-
var CollectionName = connect(mapStateToProps$1)(CollectionNameBase);
|
|
2938
|
+
var CollectionName = reactRedux.connect(mapStateToProps$1)(CollectionNameBase);
|
|
2929
2939
|
|
|
2930
2940
|
function _iterableToArrayLimit(arr, i) {
|
|
2931
2941
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
@@ -2968,27 +2978,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
2968
2978
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
2969
2979
|
_ref$iconColor = _ref.iconColor,
|
|
2970
2980
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
2971
|
-
return /*#__PURE__*/
|
|
2981
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2972
2982
|
width: width,
|
|
2973
2983
|
height: height,
|
|
2974
2984
|
viewBox: "0 0 102 76",
|
|
2975
2985
|
version: "1.1"
|
|
2976
|
-
}, /*#__PURE__*/
|
|
2986
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2977
2987
|
id: "demo-home-copy",
|
|
2978
2988
|
stroke: "none",
|
|
2979
2989
|
strokeWidth: "1",
|
|
2980
2990
|
fill: "none",
|
|
2981
2991
|
fillRule: "evenodd",
|
|
2982
2992
|
transform: "translate(-377.000000, -314.000000)"
|
|
2983
|
-
}, /*#__PURE__*/
|
|
2993
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2984
2994
|
id: "Group-13",
|
|
2985
2995
|
transform: "translate(377.000000, 314.000000)"
|
|
2986
|
-
}, /*#__PURE__*/
|
|
2996
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2987
2997
|
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",
|
|
2988
2998
|
id: "Combined-Shape",
|
|
2989
2999
|
fill: iconColor,
|
|
2990
3000
|
fillRule: "nonzero"
|
|
2991
|
-
}), /*#__PURE__*/
|
|
3001
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
2992
3002
|
id: "Rectangle-19",
|
|
2993
3003
|
stroke: iconColor,
|
|
2994
3004
|
strokeWidth: "3",
|
|
@@ -3000,24 +3010,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3000
3010
|
}))));
|
|
3001
3011
|
};
|
|
3002
3012
|
ImageFallbackIcon.propTypes = {
|
|
3003
|
-
width:
|
|
3004
|
-
height:
|
|
3005
|
-
iconColor:
|
|
3013
|
+
width: PropTypes__default["default"].object,
|
|
3014
|
+
height: PropTypes__default["default"].object,
|
|
3015
|
+
iconColor: PropTypes__default["default"].object
|
|
3006
3016
|
};
|
|
3007
3017
|
|
|
3008
3018
|
var imageFallback = function imageFallback() {
|
|
3009
|
-
return /*#__PURE__*/
|
|
3019
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3010
3020
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
3011
|
-
}, /*#__PURE__*/
|
|
3021
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3012
3022
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
3013
|
-
}, /*#__PURE__*/
|
|
3023
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
3014
3024
|
};
|
|
3015
3025
|
|
|
3016
3026
|
var FallbackImage = function FallbackImage(_ref) {
|
|
3017
3027
|
var slug = _ref.slug;
|
|
3018
3028
|
|
|
3019
3029
|
if (slug) {
|
|
3020
|
-
return /*#__PURE__*/
|
|
3030
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3021
3031
|
href: slug,
|
|
3022
3032
|
"aria-label": "image-fallback"
|
|
3023
3033
|
}, imageFallback());
|
|
@@ -3026,23 +3036,23 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
3026
3036
|
}
|
|
3027
3037
|
};
|
|
3028
3038
|
FallbackImage.propTypes = {
|
|
3029
|
-
slug:
|
|
3039
|
+
slug: PropTypes__default["default"].string
|
|
3030
3040
|
};
|
|
3031
3041
|
|
|
3032
3042
|
var HyperLinkIcon = function HyperLinkIcon() {
|
|
3033
|
-
return /*#__PURE__*/
|
|
3043
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3034
3044
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3035
3045
|
width: "36",
|
|
3036
3046
|
height: "28"
|
|
3037
|
-
}, /*#__PURE__*/
|
|
3047
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3038
3048
|
fill: "none",
|
|
3039
3049
|
fillRule: "evenodd"
|
|
3040
|
-
}, /*#__PURE__*/
|
|
3050
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3041
3051
|
width: "36",
|
|
3042
3052
|
height: "28",
|
|
3043
3053
|
fill: "#3D6FCF",
|
|
3044
3054
|
rx: "4"
|
|
3045
|
-
}), /*#__PURE__*/
|
|
3055
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3046
3056
|
stroke: "#FFF",
|
|
3047
3057
|
strokeLinecap: "round",
|
|
3048
3058
|
strokeLinejoin: "round",
|
|
@@ -3055,16 +3065,16 @@ var HyperLink = function HyperLink(_ref) {
|
|
|
3055
3065
|
var _ref$hyperLink = _ref.hyperLink,
|
|
3056
3066
|
hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
|
|
3057
3067
|
if (!hyperLink) return null;
|
|
3058
|
-
return /*#__PURE__*/
|
|
3068
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3059
3069
|
href: hyperLink,
|
|
3060
3070
|
"aria-label": "hyperlink-button",
|
|
3061
3071
|
className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
|
|
3062
3072
|
target: "_blank",
|
|
3063
3073
|
rel: "noopener noreferrer"
|
|
3064
|
-
}, /*#__PURE__*/
|
|
3074
|
+
}, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
|
|
3065
3075
|
};
|
|
3066
3076
|
HyperLink.propTypes = {
|
|
3067
|
-
hyperLink:
|
|
3077
|
+
hyperLink: PropTypes__default["default"].string
|
|
3068
3078
|
};
|
|
3069
3079
|
|
|
3070
3080
|
var _styleModuleImportMap$c = {
|
|
@@ -3100,7 +3110,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3100
3110
|
StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
|
|
3101
3111
|
return null;
|
|
3102
3112
|
} : _config$StoryTemplate;
|
|
3103
|
-
var showImagePlaceholder = useSelector(function (state) {
|
|
3113
|
+
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3104
3114
|
return get_1(state, ["qt", "config", "showPlaceholder"]);
|
|
3105
3115
|
});
|
|
3106
3116
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
@@ -3136,37 +3146,37 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3136
3146
|
var fallbackImage = function fallbackImage() {
|
|
3137
3147
|
if (!slug) {
|
|
3138
3148
|
if (fallbackImageUrl && !isStoryPageImage) {
|
|
3139
|
-
return /*#__PURE__*/
|
|
3149
|
+
return /*#__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$c)
|
|
3144
|
-
}, /*#__PURE__*/
|
|
3154
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3145
3155
|
className: "qt-image",
|
|
3146
3156
|
"data-src": "".concat(fallbackImageUrl),
|
|
3147
3157
|
alt: "image-fallback"
|
|
3148
3158
|
}));
|
|
3149
3159
|
}
|
|
3150
3160
|
|
|
3151
|
-
return /*#__PURE__*/
|
|
3161
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3152
3162
|
"data-test-id": "arr--fallback-hero-image",
|
|
3153
3163
|
style: {
|
|
3154
3164
|
paddingTop: imagePadding + "%"
|
|
3155
3165
|
},
|
|
3156
3166
|
className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$c)
|
|
3157
|
-
}, /*#__PURE__*/
|
|
3167
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3158
3168
|
storyTemplate: story["story-template"]
|
|
3159
|
-
}), /*#__PURE__*/
|
|
3169
|
+
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
3160
3170
|
}
|
|
3161
3171
|
|
|
3162
|
-
return /*#__PURE__*/
|
|
3172
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3163
3173
|
style: {
|
|
3164
3174
|
paddingTop: imagePadding + "%"
|
|
3165
3175
|
},
|
|
3166
3176
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$c)
|
|
3167
|
-
}, /*#__PURE__*/
|
|
3177
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3168
3178
|
storyTemplate: story["story-template"]
|
|
3169
|
-
}), /*#__PURE__*/
|
|
3179
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
3170
3180
|
story: story,
|
|
3171
3181
|
aspectRatio: imageAspectRatio,
|
|
3172
3182
|
defaultWidth: defaultWidth,
|
|
@@ -3175,15 +3185,15 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3175
3185
|
auto: ["format", "compress"],
|
|
3176
3186
|
fit: "max"
|
|
3177
3187
|
}
|
|
3178
|
-
})), isStoryPageImage && hyperLink && /*#__PURE__*/
|
|
3188
|
+
})), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
|
|
3179
3189
|
hyperLink: hyperLink
|
|
3180
3190
|
}));
|
|
3181
3191
|
};
|
|
3182
3192
|
|
|
3183
|
-
return story && (isStoryPageImage ? /*#__PURE__*/
|
|
3193
|
+
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3184
3194
|
"data-test-id": "arr--hero-image",
|
|
3185
3195
|
className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$c)
|
|
3186
|
-
}, fallbackImage()) : /*#__PURE__*/
|
|
3196
|
+
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3187
3197
|
"data-test-id": "arr--hero-image",
|
|
3188
3198
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3189
3199
|
externalLink: isExternalStory(story),
|
|
@@ -3193,30 +3203,30 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3193
3203
|
};
|
|
3194
3204
|
HeroImage.propTypes = {
|
|
3195
3205
|
/** The Story Object from the API response */
|
|
3196
|
-
story:
|
|
3206
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3197
3207
|
|
|
3198
3208
|
/** Removes the Hero Image padding for the image to bleed over the margin */
|
|
3199
|
-
FullBleed:
|
|
3209
|
+
FullBleed: PropTypes__default["default"].bool,
|
|
3200
3210
|
|
|
3201
3211
|
/** The default width for the image, in case the browser does not support srcset */
|
|
3202
|
-
defaultWidth:
|
|
3212
|
+
defaultWidth: PropTypes__default["default"].number,
|
|
3203
3213
|
|
|
3204
3214
|
/** The list of available widths */
|
|
3205
|
-
widths:
|
|
3215
|
+
widths: PropTypes__default["default"].array,
|
|
3206
3216
|
// fatch the correct hero image
|
|
3207
|
-
aspectRatio:
|
|
3217
|
+
aspectRatio: PropTypes__default["default"].array,
|
|
3208
3218
|
// Hints for the browser to choose the best size
|
|
3209
3219
|
|
|
3210
3220
|
/** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
|
|
3211
|
-
isHorizontal:
|
|
3221
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3212
3222
|
|
|
3213
3223
|
/** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
|
|
3214
|
-
isHorizontalMobile:
|
|
3224
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3215
3225
|
// this prop is responsive for rendering fallback image on story page
|
|
3216
|
-
defaultFallback:
|
|
3217
|
-
isHorizontalWithImageLast:
|
|
3218
|
-
isStoryPageImage:
|
|
3219
|
-
config:
|
|
3226
|
+
defaultFallback: PropTypes__default["default"].bool,
|
|
3227
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool,
|
|
3228
|
+
isStoryPageImage: PropTypes__default["default"].bool,
|
|
3229
|
+
config: PropTypes__default["default"].object
|
|
3220
3230
|
};
|
|
3221
3231
|
HeroImage.defaultProps = {
|
|
3222
3232
|
FullBleed: true,
|
|
@@ -3237,7 +3247,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3237
3247
|
_ref$color = _ref.color,
|
|
3238
3248
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
3239
3249
|
positionTop = _ref.positionTop;
|
|
3240
|
-
return /*#__PURE__*/
|
|
3250
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3241
3251
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3242
3252
|
width: width,
|
|
3243
3253
|
height: height,
|
|
@@ -3246,28 +3256,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3246
3256
|
position: "relative",
|
|
3247
3257
|
top: positionTop
|
|
3248
3258
|
}
|
|
3249
|
-
}, /*#__PURE__*/
|
|
3259
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3250
3260
|
fill: "none",
|
|
3251
3261
|
fillRule: "evenodd",
|
|
3252
3262
|
stroke: "none",
|
|
3253
3263
|
strokeWidth: "1"
|
|
3254
|
-
}, /*#__PURE__*/
|
|
3264
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3255
3265
|
transform: "translate(8 8)"
|
|
3256
|
-
}, /*#__PURE__*/
|
|
3266
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3257
3267
|
d: "M0 0H24V24H0z"
|
|
3258
|
-
}), /*#__PURE__*/
|
|
3268
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3259
3269
|
fill: color,
|
|
3260
3270
|
fillRule: "nonzero",
|
|
3261
3271
|
transform: "translate(0 2)"
|
|
3262
|
-
}, /*#__PURE__*/
|
|
3272
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3263
3273
|
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"
|
|
3264
3274
|
}))))));
|
|
3265
3275
|
};
|
|
3266
3276
|
CrownIcon.propTypes = {
|
|
3267
|
-
height:
|
|
3268
|
-
width:
|
|
3269
|
-
color:
|
|
3270
|
-
positionTop:
|
|
3277
|
+
height: PropTypes__default["default"].string,
|
|
3278
|
+
width: PropTypes__default["default"].string,
|
|
3279
|
+
color: PropTypes__default["default"].string,
|
|
3280
|
+
positionTop: PropTypes__default["default"].string
|
|
3271
3281
|
};
|
|
3272
3282
|
|
|
3273
3283
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -3276,7 +3286,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3276
3286
|
_ref$color = _ref.color,
|
|
3277
3287
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3278
3288
|
positionTop = _ref.positionTop;
|
|
3279
|
-
return /*#__PURE__*/
|
|
3289
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3280
3290
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3281
3291
|
width: width,
|
|
3282
3292
|
height: height,
|
|
@@ -3285,16 +3295,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3285
3295
|
position: "relative",
|
|
3286
3296
|
top: positionTop
|
|
3287
3297
|
}
|
|
3288
|
-
}, /*#__PURE__*/
|
|
3298
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3289
3299
|
fill: "none",
|
|
3290
3300
|
fillRule: "evenodd",
|
|
3291
3301
|
stroke: "none",
|
|
3292
3302
|
strokeWidth: "1"
|
|
3293
|
-
}, /*#__PURE__*/
|
|
3303
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3294
3304
|
transform: "translate(8 8)"
|
|
3295
|
-
}, /*#__PURE__*/
|
|
3305
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3296
3306
|
d: "M0 0H24V24H0z"
|
|
3297
|
-
}), /*#__PURE__*/
|
|
3307
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3298
3308
|
fill: color,
|
|
3299
3309
|
fillRule: "nonzero",
|
|
3300
3310
|
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",
|
|
@@ -3302,10 +3312,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3302
3312
|
})))));
|
|
3303
3313
|
};
|
|
3304
3314
|
KeyIcon.propTypes = {
|
|
3305
|
-
height:
|
|
3306
|
-
width:
|
|
3307
|
-
color:
|
|
3308
|
-
positionTop:
|
|
3315
|
+
height: PropTypes__default["default"].string,
|
|
3316
|
+
width: PropTypes__default["default"].string,
|
|
3317
|
+
color: PropTypes__default["default"].string,
|
|
3318
|
+
positionTop: PropTypes__default["default"].string
|
|
3309
3319
|
};
|
|
3310
3320
|
|
|
3311
3321
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -3314,7 +3324,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3314
3324
|
_ref$color = _ref.color,
|
|
3315
3325
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3316
3326
|
positionTop = _ref.positionTop;
|
|
3317
|
-
return /*#__PURE__*/
|
|
3327
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3318
3328
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3319
3329
|
width: width,
|
|
3320
3330
|
height: height,
|
|
@@ -3323,28 +3333,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3323
3333
|
position: "relative",
|
|
3324
3334
|
top: positionTop
|
|
3325
3335
|
}
|
|
3326
|
-
}, /*#__PURE__*/
|
|
3336
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3327
3337
|
fill: "none",
|
|
3328
3338
|
fillRule: "evenodd",
|
|
3329
3339
|
stroke: "none",
|
|
3330
3340
|
strokeWidth: "1"
|
|
3331
|
-
}, /*#__PURE__*/
|
|
3341
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3332
3342
|
transform: "translate(8 8)"
|
|
3333
|
-
}, /*#__PURE__*/
|
|
3343
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3334
3344
|
d: "M0 0H24V24H0z"
|
|
3335
|
-
}), /*#__PURE__*/
|
|
3345
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3336
3346
|
fill: color,
|
|
3337
3347
|
fillRule: "nonzero",
|
|
3338
3348
|
transform: "translate(3)"
|
|
3339
|
-
}, /*#__PURE__*/
|
|
3349
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3340
3350
|
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"
|
|
3341
3351
|
}))))));
|
|
3342
3352
|
};
|
|
3343
3353
|
LockIcon.propTypes = {
|
|
3344
|
-
height:
|
|
3345
|
-
width:
|
|
3346
|
-
color:
|
|
3347
|
-
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
|
|
3348
3358
|
};
|
|
3349
3359
|
|
|
3350
3360
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -3354,7 +3364,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3354
3364
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3355
3365
|
_ref$positionTop = _ref.positionTop,
|
|
3356
3366
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
3357
|
-
return /*#__PURE__*/
|
|
3367
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3358
3368
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3359
3369
|
width: width,
|
|
3360
3370
|
height: height,
|
|
@@ -3363,21 +3373,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3363
3373
|
position: "relative",
|
|
3364
3374
|
top: positionTop
|
|
3365
3375
|
}
|
|
3366
|
-
}, /*#__PURE__*/
|
|
3376
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3367
3377
|
fill: "none",
|
|
3368
3378
|
fillRule: "evenodd",
|
|
3369
3379
|
stroke: "none",
|
|
3370
3380
|
strokeWidth: "1"
|
|
3371
|
-
}, /*#__PURE__*/
|
|
3381
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3372
3382
|
fill: color,
|
|
3373
3383
|
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"
|
|
3374
3384
|
}))));
|
|
3375
3385
|
};
|
|
3376
3386
|
StarIcon.propTypes = {
|
|
3377
|
-
height:
|
|
3378
|
-
width:
|
|
3379
|
-
color:
|
|
3380
|
-
positionTop:
|
|
3387
|
+
height: PropTypes__default["default"].string,
|
|
3388
|
+
width: PropTypes__default["default"].string,
|
|
3389
|
+
color: PropTypes__default["default"].string,
|
|
3390
|
+
positionTop: PropTypes__default["default"].string
|
|
3381
3391
|
};
|
|
3382
3392
|
|
|
3383
3393
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -3389,7 +3399,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3389
3399
|
|
|
3390
3400
|
switch (iconType) {
|
|
3391
3401
|
case "crown":
|
|
3392
|
-
return /*#__PURE__*/
|
|
3402
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
3393
3403
|
width: width,
|
|
3394
3404
|
height: height,
|
|
3395
3405
|
color: color,
|
|
@@ -3397,7 +3407,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3397
3407
|
});
|
|
3398
3408
|
|
|
3399
3409
|
case "lock":
|
|
3400
|
-
return /*#__PURE__*/
|
|
3410
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
3401
3411
|
width: width,
|
|
3402
3412
|
height: height,
|
|
3403
3413
|
color: color,
|
|
@@ -3405,7 +3415,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3405
3415
|
});
|
|
3406
3416
|
|
|
3407
3417
|
case "key":
|
|
3408
|
-
return /*#__PURE__*/
|
|
3418
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
3409
3419
|
width: width,
|
|
3410
3420
|
height: height,
|
|
3411
3421
|
color: color,
|
|
@@ -3413,7 +3423,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3413
3423
|
});
|
|
3414
3424
|
|
|
3415
3425
|
default:
|
|
3416
|
-
return /*#__PURE__*/
|
|
3426
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
3417
3427
|
width: width,
|
|
3418
3428
|
height: height,
|
|
3419
3429
|
color: color,
|
|
@@ -3422,21 +3432,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3422
3432
|
}
|
|
3423
3433
|
};
|
|
3424
3434
|
PremiumStoryIcon.propTypes = {
|
|
3425
|
-
width:
|
|
3426
|
-
height:
|
|
3427
|
-
color:
|
|
3428
|
-
iconType:
|
|
3429
|
-
positionTop:
|
|
3435
|
+
width: PropTypes__default["default"].string,
|
|
3436
|
+
height: PropTypes__default["default"].string,
|
|
3437
|
+
color: PropTypes__default["default"].string,
|
|
3438
|
+
iconType: PropTypes__default["default"].string,
|
|
3439
|
+
positionTop: PropTypes__default["default"].string
|
|
3430
3440
|
};
|
|
3431
3441
|
|
|
3432
3442
|
function LiveIcon() {
|
|
3433
|
-
return /*#__PURE__*/
|
|
3443
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3434
3444
|
className: "live-icon",
|
|
3435
3445
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3436
3446
|
width: "25",
|
|
3437
3447
|
height: "24",
|
|
3438
3448
|
viewBox: "0 0 25 24"
|
|
3439
|
-
}, /*#__PURE__*/
|
|
3449
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3440
3450
|
fill: "#ff5858",
|
|
3441
3451
|
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"
|
|
3442
3452
|
}));
|
|
@@ -3493,37 +3503,37 @@ var Headline = function Headline(_ref) {
|
|
|
3493
3503
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3494
3504
|
var iconSize = "24px";
|
|
3495
3505
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
3496
|
-
return /*#__PURE__*/
|
|
3506
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3497
3507
|
"data-test-id": "headline",
|
|
3498
3508
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$b)
|
|
3499
|
-
}, premiumStory && /*#__PURE__*/
|
|
3509
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3500
3510
|
width: iconSize,
|
|
3501
3511
|
height: iconSize,
|
|
3502
3512
|
color: iconColor,
|
|
3503
3513
|
iconType: iconStyle,
|
|
3504
3514
|
positionTop: positionHeadline()
|
|
3505
|
-
}), isLink ? /*#__PURE__*/
|
|
3515
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3506
3516
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3507
3517
|
externalLink: isExternalStory(story),
|
|
3508
3518
|
"aria-label": "headline"
|
|
3509
|
-
}, /*#__PURE__*/
|
|
3519
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3510
3520
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$b)
|
|
3511
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3521
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3512
3522
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$b)
|
|
3513
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3523
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3514
3524
|
};
|
|
3515
3525
|
Headline.propTypes = {
|
|
3516
3526
|
/** The Story Object from the API response */
|
|
3517
|
-
story:
|
|
3527
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3518
3528
|
|
|
3519
3529
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3520
|
-
headerLevel:
|
|
3521
|
-
premiumStoryIconConfig:
|
|
3522
|
-
iconColor:
|
|
3523
|
-
iconType:
|
|
3524
|
-
enablePremiumStoryIcon:
|
|
3530
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3531
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
3532
|
+
iconColor: PropTypes__default["default"].string,
|
|
3533
|
+
iconType: PropTypes__default["default"].string,
|
|
3534
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3525
3535
|
}),
|
|
3526
|
-
isLink:
|
|
3536
|
+
isLink: PropTypes__default["default"].bool
|
|
3527
3537
|
};
|
|
3528
3538
|
Headline.defaultProps = {
|
|
3529
3539
|
headerLevel: "6",
|
|
@@ -3550,7 +3560,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3550
3560
|
var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
|
|
3551
3561
|
if (!subheadline) return null;
|
|
3552
3562
|
var textColor = getTextColor(config.theme);
|
|
3553
|
-
return /*#__PURE__*/
|
|
3563
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3554
3564
|
style: {
|
|
3555
3565
|
WebkitLineClamp: lineClamp
|
|
3556
3566
|
},
|
|
@@ -3560,15 +3570,15 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3560
3570
|
};
|
|
3561
3571
|
Subheadline.propTypes = {
|
|
3562
3572
|
/** The Story Object from the API response */
|
|
3563
|
-
story:
|
|
3573
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3564
3574
|
// Restricts the number of lines for subheadline.
|
|
3565
|
-
lineClamp:
|
|
3575
|
+
lineClamp: PropTypes__default["default"].number,
|
|
3566
3576
|
|
|
3567
3577
|
/** Number of characters to truncate the subheadline */
|
|
3568
|
-
truncateChars:
|
|
3569
|
-
clazzName:
|
|
3570
|
-
forceShowAtom:
|
|
3571
|
-
showFullContent:
|
|
3578
|
+
truncateChars: PropTypes__default["default"].number,
|
|
3579
|
+
clazzName: PropTypes__default["default"].string,
|
|
3580
|
+
forceShowAtom: PropTypes__default["default"].bool,
|
|
3581
|
+
showFullContent: PropTypes__default["default"].bool
|
|
3572
3582
|
};
|
|
3573
3583
|
Subheadline.defaultProps = {
|
|
3574
3584
|
forceShowAtom: false,
|
|
@@ -3594,18 +3604,18 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3594
3604
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3595
3605
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3596
3606
|
var textColor = getTextColor(configState.theme);
|
|
3597
|
-
return /*#__PURE__*/
|
|
3607
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3598
3608
|
"data-test-id": "publish-time",
|
|
3599
3609
|
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$9)
|
|
3600
|
-
}, /*#__PURE__*/
|
|
3610
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3601
3611
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3602
3612
|
}, getTimeStamp(time, formatter, config))));
|
|
3603
3613
|
};
|
|
3604
3614
|
TimeStamp.propTypes = {
|
|
3605
3615
|
/** The Story Object from the API response */
|
|
3606
|
-
story:
|
|
3607
|
-
isBottom:
|
|
3608
|
-
config:
|
|
3616
|
+
story: PropTypes__default["default"].object,
|
|
3617
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3618
|
+
config: PropTypes__default["default"].object
|
|
3609
3619
|
};
|
|
3610
3620
|
|
|
3611
3621
|
var _styleModuleImportMap$8 = {
|
|
@@ -3648,10 +3658,10 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3648
3658
|
return null;
|
|
3649
3659
|
}
|
|
3650
3660
|
|
|
3651
|
-
return /*#__PURE__*/
|
|
3661
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3652
3662
|
"data-test-id": "author-image",
|
|
3653
3663
|
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$8)
|
|
3654
|
-
}, /*#__PURE__*/
|
|
3664
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3655
3665
|
slug: avatarS3Key,
|
|
3656
3666
|
"aspect-ratio": [1, 1],
|
|
3657
3667
|
defaultWidth: 400,
|
|
@@ -3659,14 +3669,14 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3659
3669
|
auto: ["format", "compress"]
|
|
3660
3670
|
},
|
|
3661
3671
|
alt: authorName
|
|
3662
|
-
}) : /*#__PURE__*/
|
|
3672
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3663
3673
|
src: avatarUrl
|
|
3664
3674
|
})));
|
|
3665
3675
|
};
|
|
3666
3676
|
|
|
3667
3677
|
var isPrefix = function isPrefix(dir) {
|
|
3668
3678
|
if (prefix) {
|
|
3669
|
-
return /*#__PURE__*/
|
|
3679
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3670
3680
|
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$8)
|
|
3671
3681
|
}, prefix);
|
|
3672
3682
|
}
|
|
@@ -3674,11 +3684,11 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3674
3684
|
return !hideAuthorImage && authorImage(dir);
|
|
3675
3685
|
};
|
|
3676
3686
|
|
|
3677
|
-
return /*#__PURE__*/
|
|
3687
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3678
3688
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3679
3689
|
"aria-label": "author-name",
|
|
3680
3690
|
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$8)
|
|
3681
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
3691
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3682
3692
|
"data-test-id": "author-name",
|
|
3683
3693
|
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$8)
|
|
3684
3694
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
@@ -3690,18 +3700,18 @@ function mapStateToProps(state) {
|
|
|
3690
3700
|
};
|
|
3691
3701
|
}
|
|
3692
3702
|
|
|
3693
|
-
var Author = connect(mapStateToProps)(AuthorBase);
|
|
3703
|
+
var Author = reactRedux.connect(mapStateToProps)(AuthorBase);
|
|
3694
3704
|
AuthorBase.propTypes = {
|
|
3695
3705
|
/** The Story Object from the API response */
|
|
3696
|
-
story:
|
|
3706
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3697
3707
|
|
|
3698
3708
|
/** Hide Author Avatar Image */
|
|
3699
|
-
hideAuthorImage:
|
|
3709
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3700
3710
|
// fix Author bottom of the storyCard
|
|
3701
|
-
isBottom:
|
|
3711
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3702
3712
|
// fix prefix before the author name
|
|
3703
|
-
prefix:
|
|
3704
|
-
config:
|
|
3713
|
+
prefix: PropTypes__default["default"].string,
|
|
3714
|
+
config: PropTypes__default["default"].object
|
|
3705
3715
|
};
|
|
3706
3716
|
AuthorBase.defaultProps = {
|
|
3707
3717
|
hideAuthorImage: false,
|
|
@@ -3722,14 +3732,14 @@ var Dot = function Dot(_ref) {
|
|
|
3722
3732
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3723
3733
|
_ref$color = _ref.color,
|
|
3724
3734
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3725
|
-
return /*#__PURE__*/
|
|
3735
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3726
3736
|
className: _getClassName(color, _styleModuleImportMap$7)
|
|
3727
|
-
}, /*#__PURE__*/
|
|
3737
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3728
3738
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3729
3739
|
width: width,
|
|
3730
3740
|
height: height,
|
|
3731
3741
|
viewBox: "0 0 3 3"
|
|
3732
|
-
}, /*#__PURE__*/
|
|
3742
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3733
3743
|
cx: "87",
|
|
3734
3744
|
cy: "9",
|
|
3735
3745
|
r: "1",
|
|
@@ -3740,9 +3750,9 @@ var Dot = function Dot(_ref) {
|
|
|
3740
3750
|
};
|
|
3741
3751
|
Dot.propTypes = {
|
|
3742
3752
|
/** height , width and color of the dot icon */
|
|
3743
|
-
color:
|
|
3744
|
-
width:
|
|
3745
|
-
height:
|
|
3753
|
+
color: PropTypes__default["default"].string,
|
|
3754
|
+
width: PropTypes__default["default"].string,
|
|
3755
|
+
height: PropTypes__default["default"].string
|
|
3746
3756
|
};
|
|
3747
3757
|
|
|
3748
3758
|
var _styleModuleImportMap$6 = {
|
|
@@ -3758,22 +3768,22 @@ var Divider = function Divider(_ref) {
|
|
|
3758
3768
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3759
3769
|
_ref$color = _ref.color,
|
|
3760
3770
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3761
|
-
return /*#__PURE__*/
|
|
3771
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3762
3772
|
className: _getClassName(color, _styleModuleImportMap$6)
|
|
3763
|
-
}, /*#__PURE__*/
|
|
3773
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3764
3774
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3765
3775
|
width: width,
|
|
3766
3776
|
height: height
|
|
3767
|
-
}, /*#__PURE__*/
|
|
3777
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3768
3778
|
fill: "inherit",
|
|
3769
3779
|
d: "M0 0h1v10H0z"
|
|
3770
3780
|
})));
|
|
3771
3781
|
};
|
|
3772
3782
|
Divider.propTypes = {
|
|
3773
3783
|
/** height , width and color of the dot icon */
|
|
3774
|
-
color:
|
|
3775
|
-
width:
|
|
3776
|
-
height:
|
|
3784
|
+
color: PropTypes__default["default"].string,
|
|
3785
|
+
width: PropTypes__default["default"].string,
|
|
3786
|
+
height: PropTypes__default["default"].string
|
|
3777
3787
|
};
|
|
3778
3788
|
|
|
3779
3789
|
var _styleModuleImportMap$5 = {
|
|
@@ -3796,23 +3806,23 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3796
3806
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3797
3807
|
if (!showReadTime || !readTime) return null;
|
|
3798
3808
|
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
3799
|
-
return /*#__PURE__*/
|
|
3809
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3800
3810
|
"data-test-id": "read-time",
|
|
3801
3811
|
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$5)
|
|
3802
|
-
}, /*#__PURE__*/
|
|
3812
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3803
3813
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3804
|
-
}, /*#__PURE__*/
|
|
3814
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3805
3815
|
color: textColor
|
|
3806
|
-
})), /*#__PURE__*/
|
|
3816
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3807
3817
|
};
|
|
3808
3818
|
ReadTime.propTypes = {
|
|
3809
|
-
story:
|
|
3810
|
-
"read-time":
|
|
3819
|
+
story: PropTypes__default["default"].shape({
|
|
3820
|
+
"read-time": PropTypes__default["default"].number
|
|
3811
3821
|
}),
|
|
3812
|
-
opts:
|
|
3813
|
-
showReadTime:
|
|
3822
|
+
opts: PropTypes__default["default"].shape({
|
|
3823
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3814
3824
|
}),
|
|
3815
|
-
isLightTheme:
|
|
3825
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3816
3826
|
};
|
|
3817
3827
|
|
|
3818
3828
|
var _styleModuleImportMap$4 = {
|
|
@@ -3843,33 +3853,33 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3843
3853
|
|
|
3844
3854
|
var getSeparator = function getSeparator() {
|
|
3845
3855
|
if (separator === "divider") {
|
|
3846
|
-
return /*#__PURE__*/
|
|
3856
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3847
3857
|
color: textColor
|
|
3848
3858
|
});
|
|
3849
3859
|
}
|
|
3850
3860
|
|
|
3851
|
-
return /*#__PURE__*/
|
|
3861
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3852
3862
|
color: textColor
|
|
3853
3863
|
});
|
|
3854
3864
|
};
|
|
3855
3865
|
|
|
3856
3866
|
var getTimeStamp = function getTimeStamp() {
|
|
3857
3867
|
if (!isTime) return null;
|
|
3858
|
-
return /*#__PURE__*/
|
|
3868
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3859
3869
|
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$4)
|
|
3860
|
-
}, getSeparator()), /*#__PURE__*/
|
|
3870
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3861
3871
|
story: story,
|
|
3862
3872
|
config: config
|
|
3863
|
-
}), isReadTime && /*#__PURE__*/
|
|
3873
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3864
3874
|
story: story,
|
|
3865
3875
|
opts: config,
|
|
3866
3876
|
isLightTheme: isLightTheme
|
|
3867
3877
|
}));
|
|
3868
3878
|
};
|
|
3869
3879
|
|
|
3870
|
-
return /*#__PURE__*/
|
|
3880
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3871
3881
|
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$4)
|
|
3872
|
-
}, isAuthor ? /*#__PURE__*/
|
|
3882
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3873
3883
|
story: story,
|
|
3874
3884
|
isBottom: true,
|
|
3875
3885
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3877,19 +3887,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3877
3887
|
}), getTimeStamp()) : getTimeStamp());
|
|
3878
3888
|
};
|
|
3879
3889
|
AuthorWithTime.propTypes = {
|
|
3880
|
-
story:
|
|
3890
|
+
story: PropTypes__default["default"].object,
|
|
3881
3891
|
|
|
3882
3892
|
/** Style of separator between the Author & Timestamp */
|
|
3883
|
-
separator:
|
|
3893
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3884
3894
|
|
|
3885
3895
|
/** hide the author image */
|
|
3886
|
-
hideAuthorImage:
|
|
3896
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3887
3897
|
// fix author and time at the end
|
|
3888
|
-
isBottom:
|
|
3898
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3889
3899
|
// fix prefix before the author name
|
|
3890
|
-
prefix:
|
|
3891
|
-
config:
|
|
3892
|
-
isLightTheme:
|
|
3900
|
+
prefix: PropTypes__default["default"].string,
|
|
3901
|
+
config: PropTypes__default["default"].object,
|
|
3902
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3893
3903
|
};
|
|
3894
3904
|
AuthorWithTime.defaultProps = {
|
|
3895
3905
|
separator: "dot",
|
|
@@ -3934,22 +3944,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3934
3944
|
}
|
|
3935
3945
|
|
|
3936
3946
|
if (!isSection) return null;
|
|
3937
|
-
return /*#__PURE__*/
|
|
3947
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3938
3948
|
href: getUrl,
|
|
3939
3949
|
className: "arrow-component arr--section-name",
|
|
3940
3950
|
"aria-label": "section-name"
|
|
3941
|
-
}, /*#__PURE__*/
|
|
3951
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3942
3952
|
"data-test-id": "sectionTag",
|
|
3943
3953
|
style: {
|
|
3944
3954
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
3945
3955
|
},
|
|
3946
3956
|
className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$3)
|
|
3947
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
3957
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3948
3958
|
className: "section-m_border-left__2oUyp",
|
|
3949
3959
|
style: {
|
|
3950
3960
|
color: sectionTagBorderColor
|
|
3951
3961
|
}
|
|
3952
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
3962
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3953
3963
|
className: "section-m_border-bottom__3cRoD",
|
|
3954
3964
|
style: {
|
|
3955
3965
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -3958,13 +3968,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3958
3968
|
};
|
|
3959
3969
|
SectionTag.propTypes = {
|
|
3960
3970
|
/** The Story Object from the API response */
|
|
3961
|
-
story:
|
|
3971
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3962
3972
|
|
|
3963
3973
|
/** The style template for section tag */
|
|
3964
|
-
template:
|
|
3965
|
-
borderColor:
|
|
3966
|
-
solidBorderColor:
|
|
3967
|
-
isLightTheme:
|
|
3974
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
3975
|
+
borderColor: PropTypes__default["default"].string,
|
|
3976
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
3977
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3968
3978
|
};
|
|
3969
3979
|
SectionTag.defaultProps = {
|
|
3970
3980
|
template: "",
|
|
@@ -4013,7 +4023,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4013
4023
|
prefix = _ref.prefix,
|
|
4014
4024
|
config = _ref.config,
|
|
4015
4025
|
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
4016
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/
|
|
4026
|
+
if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
4017
4027
|
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
4018
4028
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
4019
4029
|
|
|
@@ -4023,7 +4033,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4023
4033
|
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
4024
4034
|
var textColor = getTextColor(theme);
|
|
4025
4035
|
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
4026
|
-
var defaultStorycard = /*#__PURE__*/
|
|
4036
|
+
var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
|
|
4027
4037
|
story: story,
|
|
4028
4038
|
aspectRatio: aspectRatio,
|
|
4029
4039
|
border: border,
|
|
@@ -4037,7 +4047,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4037
4047
|
config: config,
|
|
4038
4048
|
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
4039
4049
|
});
|
|
4040
|
-
return /*#__PURE__*/
|
|
4050
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4041
4051
|
"data-test-id": "story-card",
|
|
4042
4052
|
style: {
|
|
4043
4053
|
backgroundColor: theme,
|
|
@@ -4066,91 +4076,91 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
4066
4076
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4067
4077
|
var _config$localizationC = config.localizationConfig,
|
|
4068
4078
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4069
|
-
return /*#__PURE__*/
|
|
4079
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4070
4080
|
config: config,
|
|
4071
4081
|
story: story,
|
|
4072
4082
|
isHorizontal: true,
|
|
4073
4083
|
isHorizontalMobile: isHorizontalMobile,
|
|
4074
4084
|
aspectRatio: aspectRatio
|
|
4075
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/
|
|
4085
|
+
}) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4076
4086
|
config: config,
|
|
4077
4087
|
story: story,
|
|
4078
4088
|
isHorizontalWithImageLast: true,
|
|
4079
4089
|
isHorizontalMobile: isHorizontalMobile,
|
|
4080
4090
|
aspectRatio: aspectRatio
|
|
4081
|
-
}) : /*#__PURE__*/
|
|
4091
|
+
}) : /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4082
4092
|
story: story,
|
|
4083
4093
|
config: config,
|
|
4084
4094
|
isHorizontalMobile: isHorizontalMobile,
|
|
4085
4095
|
aspectRatio: aspectRatio
|
|
4086
|
-
}), /*#__PURE__*/
|
|
4096
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4087
4097
|
className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap$2)
|
|
4088
|
-
}, /*#__PURE__*/
|
|
4098
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4089
4099
|
story: story,
|
|
4090
4100
|
borderColor: SectionTagborderColor
|
|
4091
|
-
}), /*#__PURE__*/
|
|
4101
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4092
4102
|
story: story,
|
|
4093
4103
|
headerLevel: headerLevel,
|
|
4094
4104
|
premiumStoryIconConfig: config
|
|
4095
|
-
}), /*#__PURE__*/
|
|
4105
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4096
4106
|
config: localizationConfig,
|
|
4097
4107
|
story: story,
|
|
4098
4108
|
isBottom: true,
|
|
4099
4109
|
prefix: prefix,
|
|
4100
4110
|
hideAuthorImage: hideAuthorImage
|
|
4101
|
-
}), /*#__PURE__*/
|
|
4111
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
4102
4112
|
story: story
|
|
4103
4113
|
})));
|
|
4104
4114
|
};
|
|
4105
4115
|
|
|
4106
4116
|
DefaultStoryCard.propTypes = {
|
|
4107
|
-
story:
|
|
4108
|
-
border:
|
|
4109
|
-
isBottom:
|
|
4110
|
-
isHorizontal:
|
|
4111
|
-
aspectRatio:
|
|
4112
|
-
isHorizontalMobile:
|
|
4113
|
-
centerAlign:
|
|
4114
|
-
headerLevel:
|
|
4115
|
-
borderColor:
|
|
4116
|
-
hideAuthorImage:
|
|
4117
|
-
prefix:
|
|
4118
|
-
config:
|
|
4119
|
-
isHorizontalWithImageLast:
|
|
4117
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4118
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4119
|
+
isBottom: PropTypes__default["default"].bool,
|
|
4120
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4121
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4122
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4123
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4124
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4125
|
+
borderColor: PropTypes__default["default"].string,
|
|
4126
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4127
|
+
prefix: PropTypes__default["default"].string,
|
|
4128
|
+
config: PropTypes__default["default"].object,
|
|
4129
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4120
4130
|
};
|
|
4121
4131
|
StoryCard.propTypes = {
|
|
4122
4132
|
/** The Story Object from the API response */
|
|
4123
|
-
story:
|
|
4124
|
-
children:
|
|
4133
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4134
|
+
children: PropTypes__default["default"].node,
|
|
4125
4135
|
|
|
4126
4136
|
/** Flip the Story Card to Horizonal mode */
|
|
4127
|
-
isHorizontal:
|
|
4137
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4128
4138
|
|
|
4129
4139
|
/** Add border to the Story Card */
|
|
4130
|
-
border:
|
|
4140
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4131
4141
|
// story card with background image
|
|
4132
|
-
useImageAsBackground:
|
|
4142
|
+
useImageAsBackground: PropTypes__default["default"].bool,
|
|
4133
4143
|
// story card content overlap with image
|
|
4134
|
-
bgImgContentOverlap:
|
|
4144
|
+
bgImgContentOverlap: PropTypes__default["default"].bool,
|
|
4135
4145
|
|
|
4136
4146
|
/** add aspect ratio for hero image */
|
|
4137
|
-
aspectRatio:
|
|
4147
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4138
4148
|
|
|
4139
4149
|
/** add theme(dark /light/custom color) for storycard */
|
|
4140
|
-
theme:
|
|
4150
|
+
theme: PropTypes__default["default"].string,
|
|
4141
4151
|
|
|
4142
4152
|
/** flip the story card mobile design horizontal */
|
|
4143
|
-
isHorizontalMobile:
|
|
4153
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4144
4154
|
// make content center align in desktop and left align in mobile
|
|
4145
|
-
centerAlign:
|
|
4146
|
-
headerLevel:
|
|
4147
|
-
borderColor:
|
|
4155
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4156
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4157
|
+
borderColor: PropTypes__default["default"].string,
|
|
4148
4158
|
// handle author image through storycard
|
|
4149
|
-
hideAuthorImage:
|
|
4159
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4150
4160
|
// handle author prefix through storycard
|
|
4151
|
-
prefix:
|
|
4152
|
-
config:
|
|
4153
|
-
isHorizontalWithImageLast:
|
|
4161
|
+
prefix: PropTypes__default["default"].string,
|
|
4162
|
+
config: PropTypes__default["default"].object,
|
|
4163
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4154
4164
|
};
|
|
4155
4165
|
StoryCard.defaultProps = {
|
|
4156
4166
|
isHorizontal: false,
|
|
@@ -4209,26 +4219,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
4209
4219
|
if (!showButton) return null;
|
|
4210
4220
|
var textColor = getTextColor(theme);
|
|
4211
4221
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
|
|
4212
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
4222
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4213
4223
|
onClick: onClick,
|
|
4214
4224
|
"data-test-id": "load-more",
|
|
4215
4225
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$1)
|
|
4216
|
-
}, buttonText) : /*#__PURE__*/
|
|
4226
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
4217
4227
|
href: slug,
|
|
4218
4228
|
navigateTo: navigate,
|
|
4219
4229
|
"data-test-id": "load-more",
|
|
4220
4230
|
"aria-label": "load-more"
|
|
4221
|
-
}, /*#__PURE__*/
|
|
4231
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4222
4232
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$1)
|
|
4223
4233
|
}, buttonText));
|
|
4224
4234
|
};
|
|
4225
4235
|
LoadmoreButton.propTypes = {
|
|
4226
|
-
collection:
|
|
4227
|
-
template:
|
|
4228
|
-
config:
|
|
4229
|
-
onClick:
|
|
4230
|
-
navigate:
|
|
4231
|
-
qtConfig:
|
|
4236
|
+
collection: PropTypes__default["default"].object,
|
|
4237
|
+
template: PropTypes__default["default"].string,
|
|
4238
|
+
config: PropTypes__default["default"].object,
|
|
4239
|
+
onClick: PropTypes__default["default"].func,
|
|
4240
|
+
navigate: PropTypes__default["default"].func,
|
|
4241
|
+
qtConfig: PropTypes__default["default"].object
|
|
4232
4242
|
};
|
|
4233
4243
|
|
|
4234
4244
|
var _styleModuleImportMap = {
|
|
@@ -4248,7 +4258,7 @@ var _styleModuleImportMap = {
|
|
|
4248
4258
|
};
|
|
4249
4259
|
|
|
4250
4260
|
var getChildCollectionData = function getChildCollectionData(collection, config, index) {
|
|
4251
|
-
var stories = collectionToStories(collection);
|
|
4261
|
+
var stories = components.collectionToStories(collection);
|
|
4252
4262
|
if (!stories.length) return null;
|
|
4253
4263
|
|
|
4254
4264
|
var _stories = _toArray(stories),
|
|
@@ -4269,8 +4279,8 @@ var getChildCollectionData = function getChildCollectionData(collection, config,
|
|
|
4269
4279
|
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
4270
4280
|
_config$numberOfStori = config.numberOfStoriesToShowInEachColumn,
|
|
4271
4281
|
numberOfStoriesToShowInEachColumn = _config$numberOfStori === void 0 ? 4 : _config$numberOfStori;
|
|
4272
|
-
var dispatch = useDispatch();
|
|
4273
|
-
var qtConfig = useSelector(function (state) {
|
|
4282
|
+
var dispatch = reactRedux.useDispatch();
|
|
4283
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
4274
4284
|
return get_1(state, ["qt", "config"], {});
|
|
4275
4285
|
});
|
|
4276
4286
|
var SectionTagBorderColor = rgbToHex(borderColor);
|
|
@@ -4280,57 +4290,57 @@ var getChildCollectionData = function getChildCollectionData(collection, config,
|
|
|
4280
4290
|
return null;
|
|
4281
4291
|
}
|
|
4282
4292
|
|
|
4283
|
-
return /*#__PURE__*/
|
|
4293
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4284
4294
|
className: "four-col-sixteen-stories-m_contentWrapper__3w3Y9",
|
|
4285
4295
|
key: index
|
|
4286
|
-
}, /*#__PURE__*/
|
|
4296
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4287
4297
|
collection: collection,
|
|
4288
4298
|
headerLevel: "3",
|
|
4289
4299
|
collectionNameTemplate: collectionNameTemplate,
|
|
4290
4300
|
collectionNameBorderColor: collectionNameBorderColor
|
|
4291
|
-
}), /*#__PURE__*/
|
|
4301
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4292
4302
|
className: _getClassName("cardWrapper ".concat(withSeparator ? "separator" : ""), _styleModuleImportMap)
|
|
4293
|
-
}, /*#__PURE__*/
|
|
4303
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4294
4304
|
className: "storyCardWrapper four-col-sixteen-stories-m_storyCardWrapper__zdEoM"
|
|
4295
|
-
}, /*#__PURE__*/
|
|
4305
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4296
4306
|
story: firstStory,
|
|
4297
4307
|
border: withSeparator ? "bottom" : "",
|
|
4298
4308
|
theme: theme,
|
|
4299
4309
|
config: config,
|
|
4300
4310
|
headerLevel: "6"
|
|
4301
|
-
}, /*#__PURE__*/
|
|
4311
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4302
4312
|
config: config,
|
|
4303
4313
|
story: firstStory,
|
|
4304
4314
|
aspectRatio: [[16, 9], [16, 9]]
|
|
4305
|
-
}), /*#__PURE__*/
|
|
4315
|
+
}), /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4306
4316
|
story: firstStory,
|
|
4307
4317
|
borderColor: SectionTagBorderColor
|
|
4308
|
-
}), /*#__PURE__*/
|
|
4318
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4309
4319
|
story: firstStory,
|
|
4310
4320
|
premiumStoryIconConfig: config
|
|
4311
|
-
}), /*#__PURE__*/
|
|
4321
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4312
4322
|
config: localizationConfig,
|
|
4313
4323
|
story: firstStory,
|
|
4314
4324
|
hideAuthorImage: true
|
|
4315
4325
|
})), otherStories.slice(0, showNumberOfStoriesInEachColumn).map(function (story, index) {
|
|
4316
|
-
return /*#__PURE__*/
|
|
4326
|
+
return /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4317
4327
|
key: index,
|
|
4318
4328
|
story: story,
|
|
4319
4329
|
theme: theme,
|
|
4320
4330
|
border: withSeparator ? "bottom" : "",
|
|
4321
4331
|
config: config
|
|
4322
|
-
}, /*#__PURE__*/
|
|
4332
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4323
4333
|
story: story,
|
|
4324
4334
|
borderColor: SectionTagBorderColor
|
|
4325
|
-
}), /*#__PURE__*/
|
|
4335
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4326
4336
|
story: story,
|
|
4327
4337
|
premiumStoryIconConfig: config
|
|
4328
|
-
}), /*#__PURE__*/
|
|
4338
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4329
4339
|
config: localizationConfig,
|
|
4330
4340
|
story: story,
|
|
4331
4341
|
hideAuthorImage: true
|
|
4332
4342
|
}));
|
|
4333
|
-
}))), /*#__PURE__*/
|
|
4343
|
+
}))), /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
4334
4344
|
collection: collection,
|
|
4335
4345
|
template: footerButton,
|
|
4336
4346
|
config: config,
|
|
@@ -4353,7 +4363,7 @@ var FourColSixteenStoriesBase = function FourColSixteenStoriesBase(_ref) {
|
|
|
4353
4363
|
var _config$theme = config.theme,
|
|
4354
4364
|
theme = _config$theme === void 0 ? "" : _config$theme;
|
|
4355
4365
|
var textColor = getTextColor(theme);
|
|
4356
|
-
return /*#__PURE__*/
|
|
4366
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4357
4367
|
"data-test-id": "four-col-sixteen-stories",
|
|
4358
4368
|
style: {
|
|
4359
4369
|
backgroundColor: theme,
|
|
@@ -4365,11 +4375,12 @@ var FourColSixteenStoriesBase = function FourColSixteenStoriesBase(_ref) {
|
|
|
4365
4375
|
}));
|
|
4366
4376
|
};
|
|
4367
4377
|
FourColSixteenStoriesBase.propTypes = {
|
|
4368
|
-
collection:
|
|
4369
|
-
config:
|
|
4370
|
-
theme:
|
|
4378
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
4379
|
+
config: PropTypes__default["default"].shape({
|
|
4380
|
+
theme: PropTypes__default["default"].string
|
|
4371
4381
|
})
|
|
4372
4382
|
};
|
|
4373
4383
|
var FourColSixteenStories = StateProvider(FourColSixteenStoriesBase);
|
|
4374
4384
|
|
|
4375
|
-
|
|
4385
|
+
exports.FourColSixteenStories = FourColSixteenStories;
|
|
4386
|
+
exports.FourColSixteenStoriesBase = FourColSixteenStoriesBase;
|