@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 reactRedux = require('react-redux');
|
|
8
|
+
var components = require('@quintype/components');
|
|
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
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
9
19
|
|
|
@@ -1344,21 +1354,21 @@ function get(object, path, defaultValue) {
|
|
|
1344
1354
|
|
|
1345
1355
|
var get_1 = get;
|
|
1346
1356
|
|
|
1347
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
1357
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
1348
1358
|
|
|
1349
1359
|
var StateProvider = function StateProvider(RowComponent) {
|
|
1350
1360
|
return function (props) {
|
|
1351
1361
|
return (
|
|
1352
1362
|
/*#__PURE__*/
|
|
1353
1363
|
// eslint-disable-next-line react/prop-types
|
|
1354
|
-
|
|
1364
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
1355
1365
|
value: props.config
|
|
1356
|
-
}, /*#__PURE__*/
|
|
1366
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
1357
1367
|
);
|
|
1358
1368
|
};
|
|
1359
1369
|
};
|
|
1360
1370
|
var useStateValue = function useStateValue() {
|
|
1361
|
-
return useContext(StateContext);
|
|
1371
|
+
return React.useContext(StateContext);
|
|
1362
1372
|
};
|
|
1363
1373
|
|
|
1364
1374
|
function _typeof(obj) {
|
|
@@ -2678,15 +2688,15 @@ var isEmpty = function isEmpty(value) {
|
|
|
2678
2688
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2679
2689
|
_typeof(value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2680
2690
|
};
|
|
2681
|
-
|
|
2682
|
-
"sketches-host":
|
|
2683
|
-
"cdn-name":
|
|
2684
|
-
"cdn-image":
|
|
2691
|
+
PropTypes__default["default"].shape({
|
|
2692
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2693
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2694
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2685
2695
|
});
|
|
2686
|
-
|
|
2687
|
-
headline:
|
|
2688
|
-
"last-published-at":
|
|
2689
|
-
subheadline:
|
|
2696
|
+
PropTypes__default["default"].shape({
|
|
2697
|
+
headline: PropTypes__default["default"].string,
|
|
2698
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2699
|
+
subheadline: PropTypes__default["default"].string
|
|
2690
2700
|
});
|
|
2691
2701
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2692
2702
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2730,17 +2740,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2730
2740
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2731
2741
|
|
|
2732
2742
|
if (timezone && template === "story") {
|
|
2733
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2734
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2743
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2744
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2735
2745
|
timeZone: timezone
|
|
2736
2746
|
});
|
|
2737
2747
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2738
|
-
return /*#__PURE__*/
|
|
2748
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2739
2749
|
dateTime: formatZonedTime
|
|
2740
2750
|
}, timeStamp);
|
|
2741
2751
|
}
|
|
2742
2752
|
|
|
2743
|
-
return /*#__PURE__*/
|
|
2753
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2744
2754
|
date: date,
|
|
2745
2755
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2746
2756
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2784,7 +2794,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2784
2794
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
2785
2795
|
|
|
2786
2796
|
var borderBottomStyle = function borderBottomStyle() {
|
|
2787
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
2797
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2788
2798
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
2789
2799
|
style: {
|
|
2790
2800
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -2844,40 +2854,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2844
2854
|
}
|
|
2845
2855
|
};
|
|
2846
2856
|
|
|
2847
|
-
return /*#__PURE__*/
|
|
2857
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2848
2858
|
style: {
|
|
2849
2859
|
borderBottom: borderBottomFullStyle
|
|
2850
2860
|
},
|
|
2851
2861
|
"data-test-id": "collection-name",
|
|
2852
2862
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$f)
|
|
2853
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
2863
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2854
2864
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
2855
2865
|
style: {
|
|
2856
2866
|
color: CollectionNameBorderColor,
|
|
2857
2867
|
fontSize: getBorderHeight()
|
|
2858
2868
|
}
|
|
2859
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
2869
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2860
2870
|
href: slug,
|
|
2861
2871
|
"aria-label": "collection-name"
|
|
2862
|
-
}, /*#__PURE__*/
|
|
2872
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
2863
2873
|
};
|
|
2864
2874
|
CollectionNameBase.propTypes = {
|
|
2865
2875
|
/** Collection name border color */
|
|
2866
|
-
collectionNameBorderColor: PropTypes
|
|
2876
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
2867
2877
|
|
|
2868
2878
|
/** The Collection Object from the API response */
|
|
2869
|
-
collection: PropTypes
|
|
2879
|
+
collection: PropTypes.PropTypes.object,
|
|
2870
2880
|
|
|
2871
2881
|
/** The publisher config from the API response */
|
|
2872
|
-
config: PropTypes
|
|
2882
|
+
config: PropTypes.PropTypes.object,
|
|
2873
2883
|
|
|
2874
2884
|
/** The style template for the component */
|
|
2875
|
-
collectionNameTemplate: PropTypes
|
|
2885
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
2876
2886
|
|
|
2877
2887
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
2878
|
-
headerLevel: PropTypes
|
|
2879
|
-
customCollectionName: PropTypes
|
|
2880
|
-
navigate: PropTypes
|
|
2888
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
2889
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
2890
|
+
navigate: PropTypes.PropTypes.bool
|
|
2881
2891
|
};
|
|
2882
2892
|
CollectionNameBase.defaultProps = {
|
|
2883
2893
|
collectionNameTemplate: "",
|
|
@@ -2890,7 +2900,7 @@ function mapStateToProps$1(state) {
|
|
|
2890
2900
|
};
|
|
2891
2901
|
}
|
|
2892
2902
|
|
|
2893
|
-
var CollectionName = connect(mapStateToProps$1)(CollectionNameBase);
|
|
2903
|
+
var CollectionName = reactRedux.connect(mapStateToProps$1)(CollectionNameBase);
|
|
2894
2904
|
|
|
2895
2905
|
function _defineProperty(obj, key, value) {
|
|
2896
2906
|
if (key in obj) {
|
|
@@ -2939,26 +2949,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
2939
2949
|
if (!showButton) return null;
|
|
2940
2950
|
var textColor = getTextColor(theme);
|
|
2941
2951
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
|
|
2942
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
2952
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2943
2953
|
onClick: onClick,
|
|
2944
2954
|
"data-test-id": "load-more",
|
|
2945
2955
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$e)
|
|
2946
|
-
}, buttonText) : /*#__PURE__*/
|
|
2956
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
2947
2957
|
href: slug,
|
|
2948
2958
|
navigateTo: navigate,
|
|
2949
2959
|
"data-test-id": "load-more",
|
|
2950
2960
|
"aria-label": "load-more"
|
|
2951
|
-
}, /*#__PURE__*/
|
|
2961
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2952
2962
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$e)
|
|
2953
2963
|
}, buttonText));
|
|
2954
2964
|
};
|
|
2955
2965
|
LoadmoreButton.propTypes = {
|
|
2956
|
-
collection:
|
|
2957
|
-
template:
|
|
2958
|
-
config:
|
|
2959
|
-
onClick:
|
|
2960
|
-
navigate:
|
|
2961
|
-
qtConfig:
|
|
2966
|
+
collection: PropTypes__default["default"].object,
|
|
2967
|
+
template: PropTypes__default["default"].string,
|
|
2968
|
+
config: PropTypes__default["default"].object,
|
|
2969
|
+
onClick: PropTypes__default["default"].func,
|
|
2970
|
+
navigate: PropTypes__default["default"].func,
|
|
2971
|
+
qtConfig: PropTypes__default["default"].object
|
|
2962
2972
|
};
|
|
2963
2973
|
|
|
2964
2974
|
var CrownIcon = function CrownIcon(_ref) {
|
|
@@ -2967,7 +2977,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
2967
2977
|
_ref$color = _ref.color,
|
|
2968
2978
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
2969
2979
|
positionTop = _ref.positionTop;
|
|
2970
|
-
return /*#__PURE__*/
|
|
2980
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2971
2981
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2972
2982
|
width: width,
|
|
2973
2983
|
height: height,
|
|
@@ -2976,28 +2986,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
2976
2986
|
position: "relative",
|
|
2977
2987
|
top: positionTop
|
|
2978
2988
|
}
|
|
2979
|
-
}, /*#__PURE__*/
|
|
2989
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2980
2990
|
fill: "none",
|
|
2981
2991
|
fillRule: "evenodd",
|
|
2982
2992
|
stroke: "none",
|
|
2983
2993
|
strokeWidth: "1"
|
|
2984
|
-
}, /*#__PURE__*/
|
|
2994
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2985
2995
|
transform: "translate(8 8)"
|
|
2986
|
-
}, /*#__PURE__*/
|
|
2996
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2987
2997
|
d: "M0 0H24V24H0z"
|
|
2988
|
-
}), /*#__PURE__*/
|
|
2998
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2989
2999
|
fill: color,
|
|
2990
3000
|
fillRule: "nonzero",
|
|
2991
3001
|
transform: "translate(0 2)"
|
|
2992
|
-
}, /*#__PURE__*/
|
|
3002
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2993
3003
|
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"
|
|
2994
3004
|
}))))));
|
|
2995
3005
|
};
|
|
2996
3006
|
CrownIcon.propTypes = {
|
|
2997
|
-
height:
|
|
2998
|
-
width:
|
|
2999
|
-
color:
|
|
3000
|
-
positionTop:
|
|
3007
|
+
height: PropTypes__default["default"].string,
|
|
3008
|
+
width: PropTypes__default["default"].string,
|
|
3009
|
+
color: PropTypes__default["default"].string,
|
|
3010
|
+
positionTop: PropTypes__default["default"].string
|
|
3001
3011
|
};
|
|
3002
3012
|
|
|
3003
3013
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -3006,7 +3016,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3006
3016
|
_ref$color = _ref.color,
|
|
3007
3017
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3008
3018
|
positionTop = _ref.positionTop;
|
|
3009
|
-
return /*#__PURE__*/
|
|
3019
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3010
3020
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3011
3021
|
width: width,
|
|
3012
3022
|
height: height,
|
|
@@ -3015,16 +3025,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3015
3025
|
position: "relative",
|
|
3016
3026
|
top: positionTop
|
|
3017
3027
|
}
|
|
3018
|
-
}, /*#__PURE__*/
|
|
3028
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3019
3029
|
fill: "none",
|
|
3020
3030
|
fillRule: "evenodd",
|
|
3021
3031
|
stroke: "none",
|
|
3022
3032
|
strokeWidth: "1"
|
|
3023
|
-
}, /*#__PURE__*/
|
|
3033
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3024
3034
|
transform: "translate(8 8)"
|
|
3025
|
-
}, /*#__PURE__*/
|
|
3035
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3026
3036
|
d: "M0 0H24V24H0z"
|
|
3027
|
-
}), /*#__PURE__*/
|
|
3037
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3028
3038
|
fill: color,
|
|
3029
3039
|
fillRule: "nonzero",
|
|
3030
3040
|
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",
|
|
@@ -3032,10 +3042,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3032
3042
|
})))));
|
|
3033
3043
|
};
|
|
3034
3044
|
KeyIcon.propTypes = {
|
|
3035
|
-
height:
|
|
3036
|
-
width:
|
|
3037
|
-
color:
|
|
3038
|
-
positionTop:
|
|
3045
|
+
height: PropTypes__default["default"].string,
|
|
3046
|
+
width: PropTypes__default["default"].string,
|
|
3047
|
+
color: PropTypes__default["default"].string,
|
|
3048
|
+
positionTop: PropTypes__default["default"].string
|
|
3039
3049
|
};
|
|
3040
3050
|
|
|
3041
3051
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -3044,7 +3054,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3044
3054
|
_ref$color = _ref.color,
|
|
3045
3055
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3046
3056
|
positionTop = _ref.positionTop;
|
|
3047
|
-
return /*#__PURE__*/
|
|
3057
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3048
3058
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3049
3059
|
width: width,
|
|
3050
3060
|
height: height,
|
|
@@ -3053,28 +3063,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3053
3063
|
position: "relative",
|
|
3054
3064
|
top: positionTop
|
|
3055
3065
|
}
|
|
3056
|
-
}, /*#__PURE__*/
|
|
3066
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3057
3067
|
fill: "none",
|
|
3058
3068
|
fillRule: "evenodd",
|
|
3059
3069
|
stroke: "none",
|
|
3060
3070
|
strokeWidth: "1"
|
|
3061
|
-
}, /*#__PURE__*/
|
|
3071
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3062
3072
|
transform: "translate(8 8)"
|
|
3063
|
-
}, /*#__PURE__*/
|
|
3073
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3064
3074
|
d: "M0 0H24V24H0z"
|
|
3065
|
-
}), /*#__PURE__*/
|
|
3075
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3066
3076
|
fill: color,
|
|
3067
3077
|
fillRule: "nonzero",
|
|
3068
3078
|
transform: "translate(3)"
|
|
3069
|
-
}, /*#__PURE__*/
|
|
3079
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3070
3080
|
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"
|
|
3071
3081
|
}))))));
|
|
3072
3082
|
};
|
|
3073
3083
|
LockIcon.propTypes = {
|
|
3074
|
-
height:
|
|
3075
|
-
width:
|
|
3076
|
-
color:
|
|
3077
|
-
positionTop:
|
|
3084
|
+
height: PropTypes__default["default"].string,
|
|
3085
|
+
width: PropTypes__default["default"].string,
|
|
3086
|
+
color: PropTypes__default["default"].string,
|
|
3087
|
+
positionTop: PropTypes__default["default"].string
|
|
3078
3088
|
};
|
|
3079
3089
|
|
|
3080
3090
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -3084,7 +3094,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3084
3094
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3085
3095
|
_ref$positionTop = _ref.positionTop,
|
|
3086
3096
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
3087
|
-
return /*#__PURE__*/
|
|
3097
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3088
3098
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3089
3099
|
width: width,
|
|
3090
3100
|
height: height,
|
|
@@ -3093,21 +3103,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3093
3103
|
position: "relative",
|
|
3094
3104
|
top: positionTop
|
|
3095
3105
|
}
|
|
3096
|
-
}, /*#__PURE__*/
|
|
3106
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3097
3107
|
fill: "none",
|
|
3098
3108
|
fillRule: "evenodd",
|
|
3099
3109
|
stroke: "none",
|
|
3100
3110
|
strokeWidth: "1"
|
|
3101
|
-
}, /*#__PURE__*/
|
|
3111
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3102
3112
|
fill: color,
|
|
3103
3113
|
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"
|
|
3104
3114
|
}))));
|
|
3105
3115
|
};
|
|
3106
3116
|
StarIcon.propTypes = {
|
|
3107
|
-
height:
|
|
3108
|
-
width:
|
|
3109
|
-
color:
|
|
3110
|
-
positionTop:
|
|
3117
|
+
height: PropTypes__default["default"].string,
|
|
3118
|
+
width: PropTypes__default["default"].string,
|
|
3119
|
+
color: PropTypes__default["default"].string,
|
|
3120
|
+
positionTop: PropTypes__default["default"].string
|
|
3111
3121
|
};
|
|
3112
3122
|
|
|
3113
3123
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -3119,7 +3129,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3119
3129
|
|
|
3120
3130
|
switch (iconType) {
|
|
3121
3131
|
case "crown":
|
|
3122
|
-
return /*#__PURE__*/
|
|
3132
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
3123
3133
|
width: width,
|
|
3124
3134
|
height: height,
|
|
3125
3135
|
color: color,
|
|
@@ -3127,7 +3137,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3127
3137
|
});
|
|
3128
3138
|
|
|
3129
3139
|
case "lock":
|
|
3130
|
-
return /*#__PURE__*/
|
|
3140
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
3131
3141
|
width: width,
|
|
3132
3142
|
height: height,
|
|
3133
3143
|
color: color,
|
|
@@ -3135,7 +3145,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3135
3145
|
});
|
|
3136
3146
|
|
|
3137
3147
|
case "key":
|
|
3138
|
-
return /*#__PURE__*/
|
|
3148
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
3139
3149
|
width: width,
|
|
3140
3150
|
height: height,
|
|
3141
3151
|
color: color,
|
|
@@ -3143,7 +3153,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3143
3153
|
});
|
|
3144
3154
|
|
|
3145
3155
|
default:
|
|
3146
|
-
return /*#__PURE__*/
|
|
3156
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
3147
3157
|
width: width,
|
|
3148
3158
|
height: height,
|
|
3149
3159
|
color: color,
|
|
@@ -3152,21 +3162,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3152
3162
|
}
|
|
3153
3163
|
};
|
|
3154
3164
|
PremiumStoryIcon.propTypes = {
|
|
3155
|
-
width:
|
|
3156
|
-
height:
|
|
3157
|
-
color:
|
|
3158
|
-
iconType:
|
|
3159
|
-
positionTop:
|
|
3165
|
+
width: PropTypes__default["default"].string,
|
|
3166
|
+
height: PropTypes__default["default"].string,
|
|
3167
|
+
color: PropTypes__default["default"].string,
|
|
3168
|
+
iconType: PropTypes__default["default"].string,
|
|
3169
|
+
positionTop: PropTypes__default["default"].string
|
|
3160
3170
|
};
|
|
3161
3171
|
|
|
3162
3172
|
function LiveIcon() {
|
|
3163
|
-
return /*#__PURE__*/
|
|
3173
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3164
3174
|
className: "live-icon",
|
|
3165
3175
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3166
3176
|
width: "25",
|
|
3167
3177
|
height: "24",
|
|
3168
3178
|
viewBox: "0 0 25 24"
|
|
3169
|
-
}, /*#__PURE__*/
|
|
3179
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3170
3180
|
fill: "#ff5858",
|
|
3171
3181
|
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"
|
|
3172
3182
|
}));
|
|
@@ -3223,37 +3233,37 @@ var Headline = function Headline(_ref) {
|
|
|
3223
3233
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3224
3234
|
var iconSize = "24px";
|
|
3225
3235
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
3226
|
-
return /*#__PURE__*/
|
|
3236
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3227
3237
|
"data-test-id": "headline",
|
|
3228
3238
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$d)
|
|
3229
|
-
}, premiumStory && /*#__PURE__*/
|
|
3239
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3230
3240
|
width: iconSize,
|
|
3231
3241
|
height: iconSize,
|
|
3232
3242
|
color: iconColor,
|
|
3233
3243
|
iconType: iconStyle,
|
|
3234
3244
|
positionTop: positionHeadline()
|
|
3235
|
-
}), isLink ? /*#__PURE__*/
|
|
3245
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3236
3246
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3237
3247
|
externalLink: isExternalStory(story),
|
|
3238
3248
|
"aria-label": "headline"
|
|
3239
|
-
}, /*#__PURE__*/
|
|
3249
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3240
3250
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$d)
|
|
3241
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3251
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3242
3252
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$d)
|
|
3243
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3253
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3244
3254
|
};
|
|
3245
3255
|
Headline.propTypes = {
|
|
3246
3256
|
/** The Story Object from the API response */
|
|
3247
|
-
story:
|
|
3257
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3248
3258
|
|
|
3249
3259
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3250
|
-
headerLevel:
|
|
3251
|
-
premiumStoryIconConfig:
|
|
3252
|
-
iconColor:
|
|
3253
|
-
iconType:
|
|
3254
|
-
enablePremiumStoryIcon:
|
|
3260
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3261
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
3262
|
+
iconColor: PropTypes__default["default"].string,
|
|
3263
|
+
iconType: PropTypes__default["default"].string,
|
|
3264
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3255
3265
|
}),
|
|
3256
|
-
isLink:
|
|
3266
|
+
isLink: PropTypes__default["default"].bool
|
|
3257
3267
|
};
|
|
3258
3268
|
Headline.defaultProps = {
|
|
3259
3269
|
headerLevel: "6",
|
|
@@ -3280,7 +3290,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3280
3290
|
var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
|
|
3281
3291
|
if (!subheadline) return null;
|
|
3282
3292
|
var textColor = getTextColor(config.theme);
|
|
3283
|
-
return /*#__PURE__*/
|
|
3293
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3284
3294
|
style: {
|
|
3285
3295
|
WebkitLineClamp: lineClamp
|
|
3286
3296
|
},
|
|
@@ -3290,15 +3300,15 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3290
3300
|
};
|
|
3291
3301
|
Subheadline.propTypes = {
|
|
3292
3302
|
/** The Story Object from the API response */
|
|
3293
|
-
story:
|
|
3303
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3294
3304
|
// Restricts the number of lines for subheadline.
|
|
3295
|
-
lineClamp:
|
|
3305
|
+
lineClamp: PropTypes__default["default"].number,
|
|
3296
3306
|
|
|
3297
3307
|
/** Number of characters to truncate the subheadline */
|
|
3298
|
-
truncateChars:
|
|
3299
|
-
clazzName:
|
|
3300
|
-
forceShowAtom:
|
|
3301
|
-
showFullContent:
|
|
3308
|
+
truncateChars: PropTypes__default["default"].number,
|
|
3309
|
+
clazzName: PropTypes__default["default"].string,
|
|
3310
|
+
forceShowAtom: PropTypes__default["default"].bool,
|
|
3311
|
+
showFullContent: PropTypes__default["default"].bool
|
|
3302
3312
|
};
|
|
3303
3313
|
Subheadline.defaultProps = {
|
|
3304
3314
|
forceShowAtom: false,
|
|
@@ -3324,18 +3334,18 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3324
3334
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3325
3335
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3326
3336
|
var textColor = getTextColor(configState.theme);
|
|
3327
|
-
return /*#__PURE__*/
|
|
3337
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3328
3338
|
"data-test-id": "publish-time",
|
|
3329
3339
|
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$b)
|
|
3330
|
-
}, /*#__PURE__*/
|
|
3340
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3331
3341
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3332
3342
|
}, getTimeStamp(time, formatter, config))));
|
|
3333
3343
|
};
|
|
3334
3344
|
TimeStamp.propTypes = {
|
|
3335
3345
|
/** The Story Object from the API response */
|
|
3336
|
-
story:
|
|
3337
|
-
isBottom:
|
|
3338
|
-
config:
|
|
3346
|
+
story: PropTypes__default["default"].object,
|
|
3347
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3348
|
+
config: PropTypes__default["default"].object
|
|
3339
3349
|
};
|
|
3340
3350
|
|
|
3341
3351
|
var _styleModuleImportMap$a = {
|
|
@@ -3378,10 +3388,10 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3378
3388
|
return null;
|
|
3379
3389
|
}
|
|
3380
3390
|
|
|
3381
|
-
return /*#__PURE__*/
|
|
3391
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3382
3392
|
"data-test-id": "author-image",
|
|
3383
3393
|
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$a)
|
|
3384
|
-
}, /*#__PURE__*/
|
|
3394
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3385
3395
|
slug: avatarS3Key,
|
|
3386
3396
|
"aspect-ratio": [1, 1],
|
|
3387
3397
|
defaultWidth: 400,
|
|
@@ -3389,14 +3399,14 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3389
3399
|
auto: ["format", "compress"]
|
|
3390
3400
|
},
|
|
3391
3401
|
alt: authorName
|
|
3392
|
-
}) : /*#__PURE__*/
|
|
3402
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3393
3403
|
src: avatarUrl
|
|
3394
3404
|
})));
|
|
3395
3405
|
};
|
|
3396
3406
|
|
|
3397
3407
|
var isPrefix = function isPrefix(dir) {
|
|
3398
3408
|
if (prefix) {
|
|
3399
|
-
return /*#__PURE__*/
|
|
3409
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3400
3410
|
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$a)
|
|
3401
3411
|
}, prefix);
|
|
3402
3412
|
}
|
|
@@ -3404,11 +3414,11 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3404
3414
|
return !hideAuthorImage && authorImage(dir);
|
|
3405
3415
|
};
|
|
3406
3416
|
|
|
3407
|
-
return /*#__PURE__*/
|
|
3417
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3408
3418
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3409
3419
|
"aria-label": "author-name",
|
|
3410
3420
|
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$a)
|
|
3411
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
3421
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3412
3422
|
"data-test-id": "author-name",
|
|
3413
3423
|
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$a)
|
|
3414
3424
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
@@ -3420,18 +3430,18 @@ function mapStateToProps(state) {
|
|
|
3420
3430
|
};
|
|
3421
3431
|
}
|
|
3422
3432
|
|
|
3423
|
-
var Author = connect(mapStateToProps)(AuthorBase);
|
|
3433
|
+
var Author = reactRedux.connect(mapStateToProps)(AuthorBase);
|
|
3424
3434
|
AuthorBase.propTypes = {
|
|
3425
3435
|
/** The Story Object from the API response */
|
|
3426
|
-
story:
|
|
3436
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3427
3437
|
|
|
3428
3438
|
/** Hide Author Avatar Image */
|
|
3429
|
-
hideAuthorImage:
|
|
3439
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3430
3440
|
// fix Author bottom of the storyCard
|
|
3431
|
-
isBottom:
|
|
3441
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3432
3442
|
// fix prefix before the author name
|
|
3433
|
-
prefix:
|
|
3434
|
-
config:
|
|
3443
|
+
prefix: PropTypes__default["default"].string,
|
|
3444
|
+
config: PropTypes__default["default"].object
|
|
3435
3445
|
};
|
|
3436
3446
|
AuthorBase.defaultProps = {
|
|
3437
3447
|
hideAuthorImage: false,
|
|
@@ -3452,14 +3462,14 @@ var Dot = function Dot(_ref) {
|
|
|
3452
3462
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3453
3463
|
_ref$color = _ref.color,
|
|
3454
3464
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3455
|
-
return /*#__PURE__*/
|
|
3465
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3456
3466
|
className: _getClassName(color, _styleModuleImportMap$9)
|
|
3457
|
-
}, /*#__PURE__*/
|
|
3467
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3458
3468
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3459
3469
|
width: width,
|
|
3460
3470
|
height: height,
|
|
3461
3471
|
viewBox: "0 0 3 3"
|
|
3462
|
-
}, /*#__PURE__*/
|
|
3472
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3463
3473
|
cx: "87",
|
|
3464
3474
|
cy: "9",
|
|
3465
3475
|
r: "1",
|
|
@@ -3470,9 +3480,9 @@ var Dot = function Dot(_ref) {
|
|
|
3470
3480
|
};
|
|
3471
3481
|
Dot.propTypes = {
|
|
3472
3482
|
/** height , width and color of the dot icon */
|
|
3473
|
-
color:
|
|
3474
|
-
width:
|
|
3475
|
-
height:
|
|
3483
|
+
color: PropTypes__default["default"].string,
|
|
3484
|
+
width: PropTypes__default["default"].string,
|
|
3485
|
+
height: PropTypes__default["default"].string
|
|
3476
3486
|
};
|
|
3477
3487
|
|
|
3478
3488
|
var _styleModuleImportMap$8 = {
|
|
@@ -3488,22 +3498,22 @@ var Divider = function Divider(_ref) {
|
|
|
3488
3498
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3489
3499
|
_ref$color = _ref.color,
|
|
3490
3500
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3491
|
-
return /*#__PURE__*/
|
|
3501
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3492
3502
|
className: _getClassName(color, _styleModuleImportMap$8)
|
|
3493
|
-
}, /*#__PURE__*/
|
|
3503
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3494
3504
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3495
3505
|
width: width,
|
|
3496
3506
|
height: height
|
|
3497
|
-
}, /*#__PURE__*/
|
|
3507
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3498
3508
|
fill: "inherit",
|
|
3499
3509
|
d: "M0 0h1v10H0z"
|
|
3500
3510
|
})));
|
|
3501
3511
|
};
|
|
3502
3512
|
Divider.propTypes = {
|
|
3503
3513
|
/** height , width and color of the dot icon */
|
|
3504
|
-
color:
|
|
3505
|
-
width:
|
|
3506
|
-
height:
|
|
3514
|
+
color: PropTypes__default["default"].string,
|
|
3515
|
+
width: PropTypes__default["default"].string,
|
|
3516
|
+
height: PropTypes__default["default"].string
|
|
3507
3517
|
};
|
|
3508
3518
|
|
|
3509
3519
|
var _styleModuleImportMap$7 = {
|
|
@@ -3526,23 +3536,23 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3526
3536
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3527
3537
|
if (!showReadTime || !readTime) return null;
|
|
3528
3538
|
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
3529
|
-
return /*#__PURE__*/
|
|
3539
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3530
3540
|
"data-test-id": "read-time",
|
|
3531
3541
|
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$7)
|
|
3532
|
-
}, /*#__PURE__*/
|
|
3542
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3533
3543
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3534
|
-
}, /*#__PURE__*/
|
|
3544
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3535
3545
|
color: textColor
|
|
3536
|
-
})), /*#__PURE__*/
|
|
3546
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3537
3547
|
};
|
|
3538
3548
|
ReadTime.propTypes = {
|
|
3539
|
-
story:
|
|
3540
|
-
"read-time":
|
|
3549
|
+
story: PropTypes__default["default"].shape({
|
|
3550
|
+
"read-time": PropTypes__default["default"].number
|
|
3541
3551
|
}),
|
|
3542
|
-
opts:
|
|
3543
|
-
showReadTime:
|
|
3552
|
+
opts: PropTypes__default["default"].shape({
|
|
3553
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3544
3554
|
}),
|
|
3545
|
-
isLightTheme:
|
|
3555
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3546
3556
|
};
|
|
3547
3557
|
|
|
3548
3558
|
var _styleModuleImportMap$6 = {
|
|
@@ -3573,33 +3583,33 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3573
3583
|
|
|
3574
3584
|
var getSeparator = function getSeparator() {
|
|
3575
3585
|
if (separator === "divider") {
|
|
3576
|
-
return /*#__PURE__*/
|
|
3586
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3577
3587
|
color: textColor
|
|
3578
3588
|
});
|
|
3579
3589
|
}
|
|
3580
3590
|
|
|
3581
|
-
return /*#__PURE__*/
|
|
3591
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3582
3592
|
color: textColor
|
|
3583
3593
|
});
|
|
3584
3594
|
};
|
|
3585
3595
|
|
|
3586
3596
|
var getTimeStamp = function getTimeStamp() {
|
|
3587
3597
|
if (!isTime) return null;
|
|
3588
|
-
return /*#__PURE__*/
|
|
3598
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3589
3599
|
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$6)
|
|
3590
|
-
}, getSeparator()), /*#__PURE__*/
|
|
3600
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3591
3601
|
story: story,
|
|
3592
3602
|
config: config
|
|
3593
|
-
}), isReadTime && /*#__PURE__*/
|
|
3603
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3594
3604
|
story: story,
|
|
3595
3605
|
opts: config,
|
|
3596
3606
|
isLightTheme: isLightTheme
|
|
3597
3607
|
}));
|
|
3598
3608
|
};
|
|
3599
3609
|
|
|
3600
|
-
return /*#__PURE__*/
|
|
3610
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3601
3611
|
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$6)
|
|
3602
|
-
}, isAuthor ? /*#__PURE__*/
|
|
3612
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3603
3613
|
story: story,
|
|
3604
3614
|
isBottom: true,
|
|
3605
3615
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3607,19 +3617,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3607
3617
|
}), getTimeStamp()) : getTimeStamp());
|
|
3608
3618
|
};
|
|
3609
3619
|
AuthorWithTime.propTypes = {
|
|
3610
|
-
story:
|
|
3620
|
+
story: PropTypes__default["default"].object,
|
|
3611
3621
|
|
|
3612
3622
|
/** Style of separator between the Author & Timestamp */
|
|
3613
|
-
separator:
|
|
3623
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3614
3624
|
|
|
3615
3625
|
/** hide the author image */
|
|
3616
|
-
hideAuthorImage:
|
|
3626
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3617
3627
|
// fix author and time at the end
|
|
3618
|
-
isBottom:
|
|
3628
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3619
3629
|
// fix prefix before the author name
|
|
3620
|
-
prefix:
|
|
3621
|
-
config:
|
|
3622
|
-
isLightTheme:
|
|
3630
|
+
prefix: PropTypes__default["default"].string,
|
|
3631
|
+
config: PropTypes__default["default"].object,
|
|
3632
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3623
3633
|
};
|
|
3624
3634
|
AuthorWithTime.defaultProps = {
|
|
3625
3635
|
separator: "dot",
|
|
@@ -3697,27 +3707,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3697
3707
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
3698
3708
|
_ref$iconColor = _ref.iconColor,
|
|
3699
3709
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
3700
|
-
return /*#__PURE__*/
|
|
3710
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3701
3711
|
width: width,
|
|
3702
3712
|
height: height,
|
|
3703
3713
|
viewBox: "0 0 102 76",
|
|
3704
3714
|
version: "1.1"
|
|
3705
|
-
}, /*#__PURE__*/
|
|
3715
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3706
3716
|
id: "demo-home-copy",
|
|
3707
3717
|
stroke: "none",
|
|
3708
3718
|
strokeWidth: "1",
|
|
3709
3719
|
fill: "none",
|
|
3710
3720
|
fillRule: "evenodd",
|
|
3711
3721
|
transform: "translate(-377.000000, -314.000000)"
|
|
3712
|
-
}, /*#__PURE__*/
|
|
3722
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3713
3723
|
id: "Group-13",
|
|
3714
3724
|
transform: "translate(377.000000, 314.000000)"
|
|
3715
|
-
}, /*#__PURE__*/
|
|
3725
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3716
3726
|
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",
|
|
3717
3727
|
id: "Combined-Shape",
|
|
3718
3728
|
fill: iconColor,
|
|
3719
3729
|
fillRule: "nonzero"
|
|
3720
|
-
}), /*#__PURE__*/
|
|
3730
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3721
3731
|
id: "Rectangle-19",
|
|
3722
3732
|
stroke: iconColor,
|
|
3723
3733
|
strokeWidth: "3",
|
|
@@ -3729,24 +3739,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3729
3739
|
}))));
|
|
3730
3740
|
};
|
|
3731
3741
|
ImageFallbackIcon.propTypes = {
|
|
3732
|
-
width:
|
|
3733
|
-
height:
|
|
3734
|
-
iconColor:
|
|
3742
|
+
width: PropTypes__default["default"].object,
|
|
3743
|
+
height: PropTypes__default["default"].object,
|
|
3744
|
+
iconColor: PropTypes__default["default"].object
|
|
3735
3745
|
};
|
|
3736
3746
|
|
|
3737
3747
|
var imageFallback = function imageFallback() {
|
|
3738
|
-
return /*#__PURE__*/
|
|
3748
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3739
3749
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
3740
|
-
}, /*#__PURE__*/
|
|
3750
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3741
3751
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
3742
|
-
}, /*#__PURE__*/
|
|
3752
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
3743
3753
|
};
|
|
3744
3754
|
|
|
3745
3755
|
var FallbackImage = function FallbackImage(_ref) {
|
|
3746
3756
|
var slug = _ref.slug;
|
|
3747
3757
|
|
|
3748
3758
|
if (slug) {
|
|
3749
|
-
return /*#__PURE__*/
|
|
3759
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3750
3760
|
href: slug,
|
|
3751
3761
|
"aria-label": "image-fallback"
|
|
3752
3762
|
}, imageFallback());
|
|
@@ -3755,23 +3765,23 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
3755
3765
|
}
|
|
3756
3766
|
};
|
|
3757
3767
|
FallbackImage.propTypes = {
|
|
3758
|
-
slug:
|
|
3768
|
+
slug: PropTypes__default["default"].string
|
|
3759
3769
|
};
|
|
3760
3770
|
|
|
3761
3771
|
var HyperLinkIcon = function HyperLinkIcon() {
|
|
3762
|
-
return /*#__PURE__*/
|
|
3772
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3763
3773
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3764
3774
|
width: "36",
|
|
3765
3775
|
height: "28"
|
|
3766
|
-
}, /*#__PURE__*/
|
|
3776
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3767
3777
|
fill: "none",
|
|
3768
3778
|
fillRule: "evenodd"
|
|
3769
|
-
}, /*#__PURE__*/
|
|
3779
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3770
3780
|
width: "36",
|
|
3771
3781
|
height: "28",
|
|
3772
3782
|
fill: "#3D6FCF",
|
|
3773
3783
|
rx: "4"
|
|
3774
|
-
}), /*#__PURE__*/
|
|
3784
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3775
3785
|
stroke: "#FFF",
|
|
3776
3786
|
strokeLinecap: "round",
|
|
3777
3787
|
strokeLinejoin: "round",
|
|
@@ -3784,16 +3794,16 @@ var HyperLink = function HyperLink(_ref) {
|
|
|
3784
3794
|
var _ref$hyperLink = _ref.hyperLink,
|
|
3785
3795
|
hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
|
|
3786
3796
|
if (!hyperLink) return null;
|
|
3787
|
-
return /*#__PURE__*/
|
|
3797
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3788
3798
|
href: hyperLink,
|
|
3789
3799
|
"aria-label": "hyperlink-button",
|
|
3790
3800
|
className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
|
|
3791
3801
|
target: "_blank",
|
|
3792
3802
|
rel: "noopener noreferrer"
|
|
3793
|
-
}, /*#__PURE__*/
|
|
3803
|
+
}, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
|
|
3794
3804
|
};
|
|
3795
3805
|
HyperLink.propTypes = {
|
|
3796
|
-
hyperLink:
|
|
3806
|
+
hyperLink: PropTypes__default["default"].string
|
|
3797
3807
|
};
|
|
3798
3808
|
|
|
3799
3809
|
var _styleModuleImportMap$5 = {
|
|
@@ -3829,7 +3839,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3829
3839
|
StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
|
|
3830
3840
|
return null;
|
|
3831
3841
|
} : _config$StoryTemplate;
|
|
3832
|
-
var showImagePlaceholder = useSelector(function (state) {
|
|
3842
|
+
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3833
3843
|
return get_1(state, ["qt", "config", "showPlaceholder"]);
|
|
3834
3844
|
});
|
|
3835
3845
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
@@ -3865,37 +3875,37 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3865
3875
|
var fallbackImage = function fallbackImage() {
|
|
3866
3876
|
if (!slug) {
|
|
3867
3877
|
if (fallbackImageUrl && !isStoryPageImage) {
|
|
3868
|
-
return /*#__PURE__*/
|
|
3878
|
+
return /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3869
3879
|
style: {
|
|
3870
3880
|
paddingTop: imagePadding + "%"
|
|
3871
3881
|
},
|
|
3872
3882
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$5)
|
|
3873
|
-
}, /*#__PURE__*/
|
|
3883
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3874
3884
|
className: "qt-image",
|
|
3875
3885
|
"data-src": "".concat(fallbackImageUrl),
|
|
3876
3886
|
alt: "image-fallback"
|
|
3877
3887
|
}));
|
|
3878
3888
|
}
|
|
3879
3889
|
|
|
3880
|
-
return /*#__PURE__*/
|
|
3890
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3881
3891
|
"data-test-id": "arr--fallback-hero-image",
|
|
3882
3892
|
style: {
|
|
3883
3893
|
paddingTop: imagePadding + "%"
|
|
3884
3894
|
},
|
|
3885
3895
|
className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$5)
|
|
3886
|
-
}, /*#__PURE__*/
|
|
3896
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3887
3897
|
storyTemplate: story["story-template"]
|
|
3888
|
-
}), /*#__PURE__*/
|
|
3898
|
+
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
3889
3899
|
}
|
|
3890
3900
|
|
|
3891
|
-
return /*#__PURE__*/
|
|
3901
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3892
3902
|
style: {
|
|
3893
3903
|
paddingTop: imagePadding + "%"
|
|
3894
3904
|
},
|
|
3895
3905
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$5)
|
|
3896
|
-
}, /*#__PURE__*/
|
|
3906
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3897
3907
|
storyTemplate: story["story-template"]
|
|
3898
|
-
}), /*#__PURE__*/
|
|
3908
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
3899
3909
|
story: story,
|
|
3900
3910
|
aspectRatio: imageAspectRatio,
|
|
3901
3911
|
defaultWidth: defaultWidth,
|
|
@@ -3904,15 +3914,15 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3904
3914
|
auto: ["format", "compress"],
|
|
3905
3915
|
fit: "max"
|
|
3906
3916
|
}
|
|
3907
|
-
})), isStoryPageImage && hyperLink && /*#__PURE__*/
|
|
3917
|
+
})), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
|
|
3908
3918
|
hyperLink: hyperLink
|
|
3909
3919
|
}));
|
|
3910
3920
|
};
|
|
3911
3921
|
|
|
3912
|
-
return story && (isStoryPageImage ? /*#__PURE__*/
|
|
3922
|
+
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3913
3923
|
"data-test-id": "arr--hero-image",
|
|
3914
3924
|
className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$5)
|
|
3915
|
-
}, fallbackImage()) : /*#__PURE__*/
|
|
3925
|
+
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3916
3926
|
"data-test-id": "arr--hero-image",
|
|
3917
3927
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3918
3928
|
externalLink: isExternalStory(story),
|
|
@@ -3922,30 +3932,30 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3922
3932
|
};
|
|
3923
3933
|
HeroImage.propTypes = {
|
|
3924
3934
|
/** The Story Object from the API response */
|
|
3925
|
-
story:
|
|
3935
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3926
3936
|
|
|
3927
3937
|
/** Removes the Hero Image padding for the image to bleed over the margin */
|
|
3928
|
-
FullBleed:
|
|
3938
|
+
FullBleed: PropTypes__default["default"].bool,
|
|
3929
3939
|
|
|
3930
3940
|
/** The default width for the image, in case the browser does not support srcset */
|
|
3931
|
-
defaultWidth:
|
|
3941
|
+
defaultWidth: PropTypes__default["default"].number,
|
|
3932
3942
|
|
|
3933
3943
|
/** The list of available widths */
|
|
3934
|
-
widths:
|
|
3944
|
+
widths: PropTypes__default["default"].array,
|
|
3935
3945
|
// fatch the correct hero image
|
|
3936
|
-
aspectRatio:
|
|
3946
|
+
aspectRatio: PropTypes__default["default"].array,
|
|
3937
3947
|
// Hints for the browser to choose the best size
|
|
3938
3948
|
|
|
3939
3949
|
/** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
|
|
3940
|
-
isHorizontal:
|
|
3950
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3941
3951
|
|
|
3942
3952
|
/** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
|
|
3943
|
-
isHorizontalMobile:
|
|
3953
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3944
3954
|
// this prop is responsive for rendering fallback image on story page
|
|
3945
|
-
defaultFallback:
|
|
3946
|
-
isHorizontalWithImageLast:
|
|
3947
|
-
isStoryPageImage:
|
|
3948
|
-
config:
|
|
3955
|
+
defaultFallback: PropTypes__default["default"].bool,
|
|
3956
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool,
|
|
3957
|
+
isStoryPageImage: PropTypes__default["default"].bool,
|
|
3958
|
+
config: PropTypes__default["default"].object
|
|
3949
3959
|
};
|
|
3950
3960
|
HeroImage.defaultProps = {
|
|
3951
3961
|
FullBleed: true,
|
|
@@ -3995,22 +4005,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3995
4005
|
}
|
|
3996
4006
|
|
|
3997
4007
|
if (!isSection) return null;
|
|
3998
|
-
return /*#__PURE__*/
|
|
4008
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3999
4009
|
href: getUrl,
|
|
4000
4010
|
className: "arrow-component arr--section-name",
|
|
4001
4011
|
"aria-label": "section-name"
|
|
4002
|
-
}, /*#__PURE__*/
|
|
4012
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4003
4013
|
"data-test-id": "sectionTag",
|
|
4004
4014
|
style: {
|
|
4005
4015
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
4006
4016
|
},
|
|
4007
4017
|
className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$4)
|
|
4008
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
4018
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4009
4019
|
className: "section-m_border-left__2oUyp",
|
|
4010
4020
|
style: {
|
|
4011
4021
|
color: sectionTagBorderColor
|
|
4012
4022
|
}
|
|
4013
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
4023
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4014
4024
|
className: "section-m_border-bottom__3cRoD",
|
|
4015
4025
|
style: {
|
|
4016
4026
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -4019,13 +4029,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
4019
4029
|
};
|
|
4020
4030
|
SectionTag.propTypes = {
|
|
4021
4031
|
/** The Story Object from the API response */
|
|
4022
|
-
story:
|
|
4032
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4023
4033
|
|
|
4024
4034
|
/** The style template for section tag */
|
|
4025
|
-
template:
|
|
4026
|
-
borderColor:
|
|
4027
|
-
solidBorderColor:
|
|
4028
|
-
isLightTheme:
|
|
4035
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
4036
|
+
borderColor: PropTypes__default["default"].string,
|
|
4037
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
4038
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
4029
4039
|
};
|
|
4030
4040
|
SectionTag.defaultProps = {
|
|
4031
4041
|
template: "",
|
|
@@ -4050,33 +4060,33 @@ var SliderHorizontalCard = function SliderHorizontalCard(_ref) {
|
|
|
4050
4060
|
borderColor = _ref$borderColor === void 0 ? "" : _ref$borderColor,
|
|
4051
4061
|
_ref$config = _ref.config,
|
|
4052
4062
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
4053
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/
|
|
4063
|
+
if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
4054
4064
|
var borderStyle = border === "full" ? "border" : "";
|
|
4055
4065
|
var textColor = getTextColor(theme);
|
|
4056
4066
|
var _config$localizationC = config.localizationConfig,
|
|
4057
4067
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4058
|
-
return /*#__PURE__*/
|
|
4068
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4059
4069
|
style: {
|
|
4060
4070
|
backgroundColor: theme,
|
|
4061
4071
|
color: textColor
|
|
4062
4072
|
},
|
|
4063
4073
|
className: _getClassName("horizontal ".concat(borderStyle), _styleModuleImportMap$3)
|
|
4064
|
-
}, /*#__PURE__*/
|
|
4074
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4065
4075
|
config: config,
|
|
4066
4076
|
story: story,
|
|
4067
4077
|
aspectRatio: [[4, 3], [16, 9]]
|
|
4068
|
-
}), /*#__PURE__*/
|
|
4078
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4069
4079
|
className: "arr--content slider-horizontal-card-m_content__1EUZE"
|
|
4070
|
-
}, /*#__PURE__*/
|
|
4080
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4071
4081
|
story: story,
|
|
4072
4082
|
borderColor: borderColor
|
|
4073
|
-
}), /*#__PURE__*/
|
|
4083
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4074
4084
|
story: story,
|
|
4075
4085
|
headerLevel: headerLevel,
|
|
4076
4086
|
premiumStoryIconConfig: config
|
|
4077
|
-
}), /*#__PURE__*/
|
|
4087
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
4078
4088
|
story: story
|
|
4079
|
-
}), /*#__PURE__*/
|
|
4089
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4080
4090
|
config: localizationConfig,
|
|
4081
4091
|
story: story,
|
|
4082
4092
|
isBottom: true,
|
|
@@ -4084,58 +4094,58 @@ var SliderHorizontalCard = function SliderHorizontalCard(_ref) {
|
|
|
4084
4094
|
})));
|
|
4085
4095
|
};
|
|
4086
4096
|
SliderHorizontalCard.propTypes = {
|
|
4087
|
-
story:
|
|
4088
|
-
border:
|
|
4089
|
-
theme:
|
|
4090
|
-
headerLevel:
|
|
4091
|
-
borderColor:
|
|
4092
|
-
config:
|
|
4097
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4098
|
+
border: PropTypes__default["default"].string,
|
|
4099
|
+
theme: PropTypes__default["default"].string,
|
|
4100
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4101
|
+
borderColor: PropTypes__default["default"].string,
|
|
4102
|
+
config: PropTypes__default["default"].object
|
|
4093
4103
|
};
|
|
4094
4104
|
|
|
4095
4105
|
var LeftArrow = function LeftArrow(_ref) {
|
|
4096
4106
|
var _ref$color = _ref.color,
|
|
4097
4107
|
color = _ref$color === void 0 ? "#333" : _ref$color;
|
|
4098
|
-
return /*#__PURE__*/
|
|
4108
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
4099
4109
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4100
4110
|
width: "16",
|
|
4101
4111
|
height: "16",
|
|
4102
4112
|
viewBox: "0 0 10 16"
|
|
4103
|
-
}, /*#__PURE__*/
|
|
4113
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
4104
4114
|
fill: "none",
|
|
4105
4115
|
fillRule: "nonzero"
|
|
4106
|
-
}, /*#__PURE__*/
|
|
4116
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
4107
4117
|
d: "M17 20H-7V-4h24z",
|
|
4108
4118
|
opacity: ".384"
|
|
4109
|
-
}), /*#__PURE__*/
|
|
4119
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
4110
4120
|
stroke: color,
|
|
4111
4121
|
d: "M9 16L1 8l8-8"
|
|
4112
4122
|
})));
|
|
4113
4123
|
};
|
|
4114
4124
|
LeftArrow.propTypes = {
|
|
4115
|
-
color:
|
|
4125
|
+
color: PropTypes__default["default"].string
|
|
4116
4126
|
};
|
|
4117
4127
|
|
|
4118
4128
|
var RightArrow = function RightArrow(_ref) {
|
|
4119
4129
|
var _ref$color = _ref.color,
|
|
4120
4130
|
color = _ref$color === void 0 ? "#333" : _ref$color;
|
|
4121
|
-
return /*#__PURE__*/
|
|
4131
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
4122
4132
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4123
4133
|
width: "16",
|
|
4124
4134
|
height: "16",
|
|
4125
4135
|
viewBox: "0 0 10 16"
|
|
4126
|
-
}, /*#__PURE__*/
|
|
4136
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
4127
4137
|
fill: "none",
|
|
4128
4138
|
fillRule: "nonzero"
|
|
4129
|
-
}, /*#__PURE__*/
|
|
4139
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
4130
4140
|
d: "M-7-4h24v24H-7z",
|
|
4131
4141
|
opacity: ".384"
|
|
4132
|
-
}), /*#__PURE__*/
|
|
4142
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
4133
4143
|
stroke: color,
|
|
4134
4144
|
d: "M1 0l8 8-8 8"
|
|
4135
4145
|
})));
|
|
4136
4146
|
};
|
|
4137
4147
|
RightArrow.propTypes = {
|
|
4138
|
-
color:
|
|
4148
|
+
color: PropTypes__default["default"].string
|
|
4139
4149
|
};
|
|
4140
4150
|
|
|
4141
4151
|
var _styleModuleImportMap$2 = {
|
|
@@ -4173,26 +4183,26 @@ var SliderArrow = function SliderArrow(_ref) {
|
|
|
4173
4183
|
|
|
4174
4184
|
var getLeftArrowClassName = languageDirection === "rtl" ? "left-arrow-rtl" : "left-arrow-ltr";
|
|
4175
4185
|
var getRightArrowClassName = languageDirection === "rtl" ? "right-arrow-rtl" : "right-arrow-ltr";
|
|
4176
|
-
return /*#__PURE__*/
|
|
4186
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, selectedIndex !== 0 ? /*#__PURE__*/React__default["default"].createElement("button", {
|
|
4177
4187
|
onClick: previousClick,
|
|
4178
4188
|
className: ("left-arrow ".concat(getLeftArrowClassName) ? "left-arrow ".concat(getLeftArrowClassName) + " " : "") + _getClassName("arrow left-arrow-".concat(textColor, " ").concat(getLeftArrowClassName), _styleModuleImportMap$2)
|
|
4179
|
-
}, /*#__PURE__*/
|
|
4189
|
+
}, /*#__PURE__*/React__default["default"].createElement(LeftArrow, {
|
|
4180
4190
|
color: textColor === "dark" ? "#fff" : "#333"
|
|
4181
|
-
})) : null, selectedIndex < noOfItems - 1 && rightArrowView() ? /*#__PURE__*/
|
|
4191
|
+
})) : null, selectedIndex < noOfItems - 1 && rightArrowView() ? /*#__PURE__*/React__default["default"].createElement("button", {
|
|
4182
4192
|
onClick: nextClick,
|
|
4183
4193
|
className: ("right-arrow ".concat(getRightArrowClassName) ? "right-arrow ".concat(getRightArrowClassName) + " " : "") + _getClassName("arrow right-arrow-".concat(textColor, " ").concat(getRightArrowClassName), _styleModuleImportMap$2)
|
|
4184
|
-
}, /*#__PURE__*/
|
|
4194
|
+
}, /*#__PURE__*/React__default["default"].createElement(RightArrow, {
|
|
4185
4195
|
color: textColor === "dark" ? "#fff" : "#333"
|
|
4186
4196
|
})) : null);
|
|
4187
4197
|
};
|
|
4188
4198
|
SliderArrow.propTypes = {
|
|
4189
|
-
noOfItems: number,
|
|
4190
|
-
perView: number,
|
|
4191
|
-
slideIndicator: string,
|
|
4192
|
-
previousClick: func,
|
|
4193
|
-
nextClick: func,
|
|
4194
|
-
selectedIndex: number,
|
|
4195
|
-
languageDirection: string
|
|
4199
|
+
noOfItems: PropTypes.number,
|
|
4200
|
+
perView: PropTypes.number,
|
|
4201
|
+
slideIndicator: PropTypes.string,
|
|
4202
|
+
previousClick: PropTypes.func,
|
|
4203
|
+
nextClick: PropTypes.func,
|
|
4204
|
+
selectedIndex: PropTypes.number,
|
|
4205
|
+
languageDirection: PropTypes.string
|
|
4196
4206
|
};
|
|
4197
4207
|
|
|
4198
4208
|
var _styleModuleImportMap$1 = {
|
|
@@ -4220,27 +4230,27 @@ var SliderIndicator = function SliderIndicator(_ref) {
|
|
|
4220
4230
|
|
|
4221
4231
|
var config = useStateValue() || {};
|
|
4222
4232
|
var textColor = getTextColor(config.theme);
|
|
4223
|
-
return /*#__PURE__*/
|
|
4233
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
4224
4234
|
className: "slider-indicators slider-indicator-m_indicators__3MNXc"
|
|
4225
4235
|
}, indicatorItems.map(function (_, index) {
|
|
4226
|
-
return /*#__PURE__*/
|
|
4236
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
4227
4237
|
key: "slider-".concat(index),
|
|
4228
4238
|
className: "indicator slider-indicator-m_indicator__gTv3x",
|
|
4229
4239
|
onClick: function onClick(e) {
|
|
4230
4240
|
return indicatorClick(e, index);
|
|
4231
4241
|
}
|
|
4232
|
-
}, /*#__PURE__*/
|
|
4242
|
+
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
4233
4243
|
"aria-pressed": selectedIndex === index ? "true" : "false",
|
|
4234
4244
|
className: ("indicator-button indicator-".concat(indicatorType) ? "indicator-button indicator-".concat(indicatorType) + " " : "") + _getClassName("indicator-button indicator-".concat(indicatorType, " indicator-").concat(indicatorType, "-").concat(textColor), _styleModuleImportMap$1)
|
|
4235
4245
|
}));
|
|
4236
4246
|
}));
|
|
4237
4247
|
};
|
|
4238
4248
|
SliderIndicator.propTypes = {
|
|
4239
|
-
indicatorItems: array,
|
|
4240
|
-
perView: number,
|
|
4241
|
-
indicatorType: string,
|
|
4242
|
-
indicatorClick: func,
|
|
4243
|
-
selectedIndex: number
|
|
4249
|
+
indicatorItems: PropTypes.array,
|
|
4250
|
+
perView: PropTypes.number,
|
|
4251
|
+
indicatorType: PropTypes.string,
|
|
4252
|
+
indicatorClick: PropTypes.func,
|
|
4253
|
+
selectedIndex: PropTypes.number
|
|
4244
4254
|
};
|
|
4245
4255
|
|
|
4246
4256
|
var smoothScroll = function smoothScroll(node, topOrLeft, horizontal) {
|
|
@@ -4275,24 +4285,24 @@ var ScrollSnap = function ScrollSnap(_ref) {
|
|
|
4275
4285
|
perView = _ref.perView,
|
|
4276
4286
|
slideIndicator = _ref.slideIndicator;
|
|
4277
4287
|
|
|
4278
|
-
var _useState = useState(0),
|
|
4288
|
+
var _useState = React.useState(0),
|
|
4279
4289
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4280
4290
|
selectedIndex = _useState2[0],
|
|
4281
4291
|
setSelectedIndex = _useState2[1];
|
|
4282
4292
|
|
|
4283
|
-
var _useState3 = useState(false),
|
|
4293
|
+
var _useState3 = React.useState(false),
|
|
4284
4294
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
4285
4295
|
autoScroll = _useState4[0],
|
|
4286
4296
|
setAutoScroll = _useState4[1];
|
|
4287
4297
|
|
|
4288
|
-
var languageDirection = useSelector(function (state) {
|
|
4298
|
+
var languageDirection = reactRedux.useSelector(function (state) {
|
|
4289
4299
|
return get_1(state, ["qt", "config", "language", "direction"], "ltr");
|
|
4290
4300
|
});
|
|
4291
4301
|
var noOfItems = children ? children.length : 0;
|
|
4292
|
-
var scroller = useRef(null);
|
|
4302
|
+
var scroller = React.useRef(null);
|
|
4293
4303
|
var numberOfIndicatorsToShow = children.length - (perView - 1);
|
|
4294
4304
|
var indicatorItems = children.slice(0, numberOfIndicatorsToShow);
|
|
4295
|
-
useEffect(function () {
|
|
4305
|
+
React.useEffect(function () {
|
|
4296
4306
|
if (scroller.current) {
|
|
4297
4307
|
scroller.current.addEventListener("scroll", setIndicatorValue(function () {
|
|
4298
4308
|
var value = Math.round(scroller.current.scrollLeft / scroller.current.scrollWidth * noOfItems);
|
|
@@ -4309,7 +4319,7 @@ var ScrollSnap = function ScrollSnap(_ref) {
|
|
|
4309
4319
|
};
|
|
4310
4320
|
}, []); // Infinite scroll
|
|
4311
4321
|
|
|
4312
|
-
useEffect(function () {
|
|
4322
|
+
React.useEffect(function () {
|
|
4313
4323
|
if (isInfinite && !autoScroll) {
|
|
4314
4324
|
var timer = setInterval(function () {
|
|
4315
4325
|
infiniteScroll();
|
|
@@ -4358,23 +4368,23 @@ var ScrollSnap = function ScrollSnap(_ref) {
|
|
|
4358
4368
|
updateItemSelection(newIndex, languageDirection, scroller, noOfItems);
|
|
4359
4369
|
};
|
|
4360
4370
|
|
|
4361
|
-
return /*#__PURE__*/
|
|
4371
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4362
4372
|
className: "scroll-snap-container"
|
|
4363
|
-
}, /*#__PURE__*/
|
|
4373
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4364
4374
|
className: "scroll-snap-wrapper scroll-snap-m_wrapper__1Rz9v",
|
|
4365
4375
|
onMouseEnter: pauseAutoPlay,
|
|
4366
4376
|
onMouseLeave: pauseAutoPlay
|
|
4367
|
-
}, /*#__PURE__*/
|
|
4377
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4368
4378
|
ref: scroller,
|
|
4369
4379
|
className: "scroll-snap-carousel scroll-snap-m_carousel__2m3cg"
|
|
4370
|
-
}, children), isArrow && /*#__PURE__*/
|
|
4380
|
+
}, children), isArrow && /*#__PURE__*/React__default["default"].createElement(SliderArrow, {
|
|
4371
4381
|
noOfItems: noOfItems,
|
|
4372
4382
|
perView: perView,
|
|
4373
4383
|
previousClick: previousClick,
|
|
4374
4384
|
nextClick: nextClick,
|
|
4375
4385
|
selectedIndex: selectedIndex,
|
|
4376
4386
|
languageDirection: languageDirection
|
|
4377
|
-
})), children.length > perView && slideIndicator !== "none" && /*#__PURE__*/
|
|
4387
|
+
})), children.length > perView && slideIndicator !== "none" && /*#__PURE__*/React__default["default"].createElement(SliderIndicator, {
|
|
4378
4388
|
indicatorItems: indicatorItems,
|
|
4379
4389
|
indicatorClick: indicatorClick,
|
|
4380
4390
|
selectedIndex: selectedIndex,
|
|
@@ -4390,13 +4400,13 @@ ScrollSnap.defaultProps = {
|
|
|
4390
4400
|
slideIndicator: "dots"
|
|
4391
4401
|
};
|
|
4392
4402
|
ScrollSnap.propTypes = {
|
|
4393
|
-
children: array.isRequired,
|
|
4394
|
-
isArrow: bool,
|
|
4395
|
-
isInfinite: bool,
|
|
4396
|
-
interval: number,
|
|
4397
|
-
pauseOnHover: bool,
|
|
4398
|
-
perView: number,
|
|
4399
|
-
slideIndicator: string
|
|
4403
|
+
children: PropTypes.array.isRequired,
|
|
4404
|
+
isArrow: PropTypes.bool,
|
|
4405
|
+
isInfinite: PropTypes.bool,
|
|
4406
|
+
interval: PropTypes.number,
|
|
4407
|
+
pauseOnHover: PropTypes.bool,
|
|
4408
|
+
perView: PropTypes.number,
|
|
4409
|
+
slideIndicator: PropTypes.string
|
|
4400
4410
|
};
|
|
4401
4411
|
|
|
4402
4412
|
var _styleModuleImportMap = {
|
|
@@ -4435,7 +4445,7 @@ var HalfScreenSliderBase = function HalfScreenSliderBase(_ref) {
|
|
|
4435
4445
|
_config$isInfinite = config.isInfinite,
|
|
4436
4446
|
isInfinite = _config$isInfinite === void 0 ? false : _config$isInfinite;
|
|
4437
4447
|
var footerSlot = footerSlotConfig.footerSlot;
|
|
4438
|
-
var items = collectionToStories(collection);
|
|
4448
|
+
var items = components.collectionToStories(collection);
|
|
4439
4449
|
var textColor = getTextColor(theme);
|
|
4440
4450
|
var isBorderEnable = border === "full" ? "border" : "";
|
|
4441
4451
|
|
|
@@ -4445,32 +4455,32 @@ var HalfScreenSliderBase = function HalfScreenSliderBase(_ref) {
|
|
|
4445
4455
|
|
|
4446
4456
|
var footerSlotComp = footerSlot ? footerSlot() : null;
|
|
4447
4457
|
var showNumberOfStoriesToShow = getNumberOfStoriesToShow(numberOfStoriesToShow);
|
|
4448
|
-
var dispatch = useDispatch();
|
|
4449
|
-
var qtConfig = useSelector(function (state) {
|
|
4458
|
+
var dispatch = reactRedux.useDispatch();
|
|
4459
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
4450
4460
|
return get_1(state, ["qt", "config"], {});
|
|
4451
4461
|
});
|
|
4452
4462
|
var url = generateNavigateSlug(collection, qtConfig);
|
|
4453
|
-
return /*#__PURE__*/
|
|
4463
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4454
4464
|
className: "full-width-with-padding arrow-component",
|
|
4455
4465
|
"data-test-id": "half-screen-slider",
|
|
4456
4466
|
style: {
|
|
4457
4467
|
backgroundColor: theme,
|
|
4458
4468
|
color: textColor
|
|
4459
4469
|
}
|
|
4460
|
-
}, /*#__PURE__*/
|
|
4470
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4461
4471
|
className: "half-screen-slider-m_half-screen-slider__1rprD"
|
|
4462
|
-
}, /*#__PURE__*/
|
|
4472
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4463
4473
|
collection: collection,
|
|
4464
4474
|
collectionNameTemplate: collectionNameTemplate,
|
|
4465
4475
|
collectionNameBorderColor: collectionNameBorderColor
|
|
4466
|
-
}), /*#__PURE__*/
|
|
4476
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4467
4477
|
className: _getClassName("wrapper ".concat(isBorderEnable, " ").concat(textColor), _styleModuleImportMap)
|
|
4468
|
-
}, /*#__PURE__*/
|
|
4478
|
+
}, /*#__PURE__*/React__default["default"].createElement(ScrollSnap, {
|
|
4469
4479
|
isArrow: navigationArrows,
|
|
4470
4480
|
slideIndicator: slideIndicator,
|
|
4471
4481
|
isInfinite: isInfinite
|
|
4472
4482
|
}, items.slice(0, showNumberOfStoriesToShow).map(function (story, index) {
|
|
4473
|
-
return /*#__PURE__*/
|
|
4483
|
+
return /*#__PURE__*/React__default["default"].createElement(SliderHorizontalCard, {
|
|
4474
4484
|
headerLevel: "2",
|
|
4475
4485
|
key: index,
|
|
4476
4486
|
story: story,
|
|
@@ -4478,7 +4488,7 @@ var HalfScreenSliderBase = function HalfScreenSliderBase(_ref) {
|
|
|
4478
4488
|
borderColor: borderColor,
|
|
4479
4489
|
config: config
|
|
4480
4490
|
});
|
|
4481
|
-
})))), /*#__PURE__*/
|
|
4491
|
+
})))), /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
4482
4492
|
template: footerButton,
|
|
4483
4493
|
collection: collection,
|
|
4484
4494
|
config: config,
|
|
@@ -4489,26 +4499,27 @@ var HalfScreenSliderBase = function HalfScreenSliderBase(_ref) {
|
|
|
4489
4499
|
}), footerSlotComp);
|
|
4490
4500
|
};
|
|
4491
4501
|
HalfScreenSliderBase.propTypes = {
|
|
4492
|
-
footerButton:
|
|
4502
|
+
footerButton: PropTypes__default["default"].string,
|
|
4493
4503
|
|
|
4494
4504
|
/** collection is the array of objects which is returning by API */
|
|
4495
|
-
collection:
|
|
4505
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
4496
4506
|
// config is the configuration of the row
|
|
4497
|
-
config:
|
|
4507
|
+
config: PropTypes__default["default"].object.isRequired,
|
|
4498
4508
|
// border around the storycard
|
|
4499
|
-
border:
|
|
4509
|
+
border: PropTypes__default["default"].string,
|
|
4500
4510
|
// speed of the slider(ms)
|
|
4501
|
-
autoplaySpeed:
|
|
4511
|
+
autoplaySpeed: PropTypes__default["default"].number,
|
|
4502
4512
|
// no of slides in slider
|
|
4503
|
-
numberOfStoriesToShow:
|
|
4513
|
+
numberOfStoriesToShow: PropTypes__default["default"].number,
|
|
4504
4514
|
// background and text color configuration
|
|
4505
|
-
theme:
|
|
4515
|
+
theme: PropTypes__default["default"].string,
|
|
4506
4516
|
// style of the row title
|
|
4507
|
-
collectionTemplate:
|
|
4508
|
-
collectionNameBorderColor:
|
|
4517
|
+
collectionTemplate: PropTypes__default["default"].string,
|
|
4518
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
4509
4519
|
// section tag border color
|
|
4510
|
-
borderColor:
|
|
4520
|
+
borderColor: PropTypes__default["default"].string
|
|
4511
4521
|
};
|
|
4512
4522
|
var HalfScreenSlider = StateProvider(HalfScreenSliderBase);
|
|
4513
4523
|
|
|
4514
|
-
|
|
4524
|
+
exports.HalfScreenSlider = HalfScreenSlider;
|
|
4525
|
+
exports.HalfScreenSliderBase = HalfScreenSliderBase;
|