@quintype/arrow 3.15.1-perf.2 → 3.15.1-perf.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/atoms/Author/index.js +38 -29
- package/atoms/AuthorWithTime/index.js +83 -73
- package/atoms/CollectionName/index.js +40 -30
- package/atoms/ExtendedLoadMore/{index-d0f6c865.js → index-3976fac4.js} +59 -51
- package/atoms/ExtendedLoadMore/{index-1e444d20.js → index-3c4ac692.js} +243 -208
- package/atoms/ExtendedLoadMore/index-4ddfe28d.js +93 -0
- package/atoms/ExtendedLoadMore/{index-c61a16dc.js → index-5c8eda4a.js} +88 -80
- package/atoms/ExtendedLoadMore/{index-1256e453.js → index-6e083738.js} +60 -52
- package/atoms/ExtendedLoadMore/{index-fd651f70.js → index-6ecceae4.js} +58 -50
- package/atoms/ExtendedLoadMore/{index-4356ce04.js → index-9e0d32b7.js} +76 -68
- package/atoms/ExtendedLoadMore/{index-beed3a68.js → index-a5c95f84.js} +70 -62
- package/atoms/ExtendedLoadMore/{index-0519e570.js → index-b22f1843.js} +70 -62
- package/atoms/ExtendedLoadMore/{index-e4cf9cb7.js → index-b5936059.js} +72 -64
- package/atoms/ExtendedLoadMore/{index-aba6b278.js → index-bc129cb8.js} +57 -49
- package/atoms/ExtendedLoadMore/{index-ad3c83c3.js → index-e7cde739.js} +74 -46
- package/atoms/ExtendedLoadMore/{index-c2f73d18.js → index-fee73a14.js} +62 -54
- package/atoms/ExtendedLoadMore/index.js +13 -5
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +85 -76
- package/atoms/HeroImage/index.js +69 -60
- package/atoms/LoadmoreButton/index.js +32 -23
- package/atoms/ScrollSnap/index.js +72 -63
- package/atoms/SectionTag/index.js +34 -25
- package/atoms/Subheadline/index.js +31 -22
- package/atoms/TimeStamp/index.js +34 -24
- package/molecules/KeyEvents/index.js +72 -61
- package/molecules/PageIntroductionCard/index.js +43 -34
- package/molecules/SocialShareTemplate/index.js +97 -88
- package/molecules/StoryCard/index.js +242 -232
- package/molecules/StoryElementCard/index.js +512 -483
- package/molecules/StorycardContent/index.js +172 -162
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +345 -333
- package/rows/AsideCollection/index.js +340 -328
- package/rows/AstrologyCollection/index.js +321 -309
- package/rows/AuthorIntroductionCard/index.js +157 -148
- package/rows/AuthorsList/index.js +184 -174
- package/rows/CollectionFilter/index.js +361 -349
- package/rows/ElevenStories/index.js +357 -346
- package/rows/FourColFiveStories/index.js +304 -274
- package/rows/FourColGrid/index.js +351 -321
- package/rows/FourColPortraitStories/index.js +357 -327
- package/rows/FourColSixteenStories/index.js +288 -277
- package/rows/FourColTwelveStories/index.js +315 -304
- package/rows/FourStorySlider/index.js +358 -347
- package/rows/FourStorySliderPortrait/index.js +359 -348
- package/rows/FourTabbedBigStorySlider/index.js +322 -311
- package/rows/FullScreenSlider/index.js +336 -325
- package/rows/HalfScreenSlider/index.js +308 -297
- package/rows/ListComponent/index.js +322 -311
- package/rows/Listicles/index.js +150 -139
- package/rows/MagazineEditions/index.js +104 -93
- package/rows/MagazineHeaderCard/index.js +104 -93
- package/rows/MagazineWidget/index.js +326 -315
- package/rows/OneColStoryList/index.js +365 -335
- package/rows/OpinionCollection/index.js +250 -220
- package/rows/SixColSixStories/index.js +333 -303
- package/rows/StoryCollection/index.js +340 -328
- package/rows/TagIntroductionCard/index.js +30 -21
- package/rows/ThreeColFlexStories/index.js +348 -318
- package/rows/ThreeColFourteenStories/index.js +285 -274
- package/rows/ThreeColGrid/index.js +352 -322
- package/rows/ThreeColSevenStory/index.js +322 -311
- package/rows/ThreeColSixStories/index.js +323 -312
- package/rows/ThreeColTwelveStories/index.js +302 -291
- package/rows/TwoColFourStories/index.js +316 -305
- package/rows/TwoColFourStoryHighlight/index.js +317 -306
- package/rows/TwoColSevenStories/index.js +322 -311
- package/rows/TwoColSixStories/index.js +316 -305
- package/rows/TwoColTenStoriesSidebar/index.js +338 -327
- package/rows/TwoColThreeStories/index.js +316 -305
- package/story-elements/AlsoRead/index.js +70 -61
- package/story-elements/Attachment/index.js +40 -31
- package/story-elements/BigFact/index.js +35 -26
- package/story-elements/BlockQuote/index.js +61 -51
- package/story-elements/Blurb/index.js +36 -27
- package/story-elements/Image/index.js +113 -86
- package/story-elements/ImageGallery/index.js +98 -71
- package/story-elements/ImageSlideshow/index.js +147 -120
- package/story-elements/QuestionAnswer/index.js +55 -46
- package/story-elements/Quote/index.js +37 -28
- package/story-elements/Reference/index.js +40 -31
- package/story-elements/StoryElement/index.js +28 -19
- package/story-elements/Summary/index.js +40 -31
- package/story-elements/Text/index.js +34 -25
- package/story-elements/Video/index.js +29 -20
- package/story-templates/ListicleStoryTemplate/index.js +937 -908
- package/story-templates/LiveBlogStoryTemplate/index.js +942 -913
- package/story-templates/PhotoStoryTemplate/index.js +912 -883
- package/story-templates/TextStoryTemplate/index.js +931 -902
- package/story-templates/VideoStoryTemplate/index.js +897 -868
- package/atoms/ExtendedLoadMore/index-81eb3978.js +0 -86
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var axios = require('axios');
|
|
7
|
+
var PropTypes = require('prop-types');
|
|
8
|
+
var reactRedux = require('react-redux');
|
|
9
|
+
var components = require('@quintype/components');
|
|
10
|
+
var Timeago = require('react-timeago');
|
|
11
|
+
var dateFnsTz = require('date-fns-tz');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
+
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
17
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
18
|
+
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
8
19
|
|
|
9
20
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
10
21
|
try {
|
|
@@ -2215,21 +2226,21 @@ function get(object, path, defaultValue) {
|
|
|
2215
2226
|
|
|
2216
2227
|
var get_1 = get;
|
|
2217
2228
|
|
|
2218
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
2229
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
2219
2230
|
|
|
2220
2231
|
var StateProvider = function StateProvider(RowComponent) {
|
|
2221
2232
|
return function (props) {
|
|
2222
2233
|
return (
|
|
2223
2234
|
/*#__PURE__*/
|
|
2224
2235
|
// eslint-disable-next-line react/prop-types
|
|
2225
|
-
|
|
2236
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
2226
2237
|
value: props.config
|
|
2227
|
-
}, /*#__PURE__*/
|
|
2238
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
2228
2239
|
);
|
|
2229
2240
|
};
|
|
2230
2241
|
};
|
|
2231
2242
|
var useStateValue = function useStateValue() {
|
|
2232
|
-
return useContext(StateContext);
|
|
2243
|
+
return React.useContext(StateContext);
|
|
2233
2244
|
};
|
|
2234
2245
|
|
|
2235
2246
|
function _typeof(obj) {
|
|
@@ -2802,15 +2813,15 @@ var isEmpty = function isEmpty(value) {
|
|
|
2802
2813
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2803
2814
|
_typeof(value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2804
2815
|
};
|
|
2805
|
-
|
|
2806
|
-
"sketches-host":
|
|
2807
|
-
"cdn-name":
|
|
2808
|
-
"cdn-image":
|
|
2816
|
+
PropTypes__default["default"].shape({
|
|
2817
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2818
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2819
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2809
2820
|
});
|
|
2810
|
-
|
|
2811
|
-
headline:
|
|
2812
|
-
"last-published-at":
|
|
2813
|
-
subheadline:
|
|
2821
|
+
PropTypes__default["default"].shape({
|
|
2822
|
+
headline: PropTypes__default["default"].string,
|
|
2823
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2824
|
+
subheadline: PropTypes__default["default"].string
|
|
2814
2825
|
});
|
|
2815
2826
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2816
2827
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2854,17 +2865,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2854
2865
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2855
2866
|
|
|
2856
2867
|
if (timezone && template === "story") {
|
|
2857
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2858
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2868
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2869
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2859
2870
|
timeZone: timezone
|
|
2860
2871
|
});
|
|
2861
2872
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2862
|
-
return /*#__PURE__*/
|
|
2873
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2863
2874
|
dateTime: formatZonedTime
|
|
2864
2875
|
}, timeStamp);
|
|
2865
2876
|
}
|
|
2866
2877
|
|
|
2867
|
-
return /*#__PURE__*/
|
|
2878
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2868
2879
|
date: date,
|
|
2869
2880
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2870
2881
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2908,7 +2919,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2908
2919
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
2909
2920
|
|
|
2910
2921
|
var borderBottomStyle = function borderBottomStyle() {
|
|
2911
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
2922
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2912
2923
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
2913
2924
|
style: {
|
|
2914
2925
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -2968,40 +2979,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2968
2979
|
}
|
|
2969
2980
|
};
|
|
2970
2981
|
|
|
2971
|
-
return /*#__PURE__*/
|
|
2982
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2972
2983
|
style: {
|
|
2973
2984
|
borderBottom: borderBottomFullStyle
|
|
2974
2985
|
},
|
|
2975
2986
|
"data-test-id": "collection-name",
|
|
2976
2987
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$e)
|
|
2977
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
2988
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2978
2989
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
2979
2990
|
style: {
|
|
2980
2991
|
color: CollectionNameBorderColor,
|
|
2981
2992
|
fontSize: getBorderHeight()
|
|
2982
2993
|
}
|
|
2983
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
2994
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2984
2995
|
href: slug,
|
|
2985
2996
|
"aria-label": "collection-name"
|
|
2986
|
-
}, /*#__PURE__*/
|
|
2997
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
2987
2998
|
};
|
|
2988
2999
|
CollectionNameBase.propTypes = {
|
|
2989
3000
|
/** Collection name border color */
|
|
2990
|
-
collectionNameBorderColor: PropTypes
|
|
3001
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
2991
3002
|
|
|
2992
3003
|
/** The Collection Object from the API response */
|
|
2993
|
-
collection: PropTypes
|
|
3004
|
+
collection: PropTypes.PropTypes.object,
|
|
2994
3005
|
|
|
2995
3006
|
/** The publisher config from the API response */
|
|
2996
|
-
config: PropTypes
|
|
3007
|
+
config: PropTypes.PropTypes.object,
|
|
2997
3008
|
|
|
2998
3009
|
/** The style template for the component */
|
|
2999
|
-
collectionNameTemplate: PropTypes
|
|
3010
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
3000
3011
|
|
|
3001
3012
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3002
|
-
headerLevel: PropTypes
|
|
3003
|
-
customCollectionName: PropTypes
|
|
3004
|
-
navigate: PropTypes
|
|
3013
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
3014
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
3015
|
+
navigate: PropTypes.PropTypes.bool
|
|
3005
3016
|
};
|
|
3006
3017
|
CollectionNameBase.defaultProps = {
|
|
3007
3018
|
collectionNameTemplate: "",
|
|
@@ -3014,7 +3025,7 @@ function mapStateToProps$1(state) {
|
|
|
3014
3025
|
};
|
|
3015
3026
|
}
|
|
3016
3027
|
|
|
3017
|
-
var CollectionName = connect(mapStateToProps$1)(CollectionNameBase);
|
|
3028
|
+
var CollectionName = reactRedux.connect(mapStateToProps$1)(CollectionNameBase);
|
|
3018
3029
|
|
|
3019
3030
|
var _styleModuleImportMap$d = {
|
|
3020
3031
|
"./load-more.m.css": {
|
|
@@ -3048,26 +3059,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
3048
3059
|
if (!showButton) return null;
|
|
3049
3060
|
var textColor = getTextColor(theme);
|
|
3050
3061
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread$1(_objectSpread$1({}, qtConfig), config));
|
|
3051
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
3062
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3052
3063
|
onClick: onClick,
|
|
3053
3064
|
"data-test-id": "load-more",
|
|
3054
3065
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$d)
|
|
3055
|
-
}, buttonText) : /*#__PURE__*/
|
|
3066
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
3056
3067
|
href: slug,
|
|
3057
3068
|
navigateTo: navigate,
|
|
3058
3069
|
"data-test-id": "load-more",
|
|
3059
3070
|
"aria-label": "load-more"
|
|
3060
|
-
}, /*#__PURE__*/
|
|
3071
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3061
3072
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$d)
|
|
3062
3073
|
}, buttonText));
|
|
3063
3074
|
};
|
|
3064
3075
|
LoadmoreButton.propTypes = {
|
|
3065
|
-
collection:
|
|
3066
|
-
template:
|
|
3067
|
-
config:
|
|
3068
|
-
onClick:
|
|
3069
|
-
navigate:
|
|
3070
|
-
qtConfig:
|
|
3076
|
+
collection: PropTypes__default["default"].object,
|
|
3077
|
+
template: PropTypes__default["default"].string,
|
|
3078
|
+
config: PropTypes__default["default"].object,
|
|
3079
|
+
onClick: PropTypes__default["default"].func,
|
|
3080
|
+
navigate: PropTypes__default["default"].func,
|
|
3081
|
+
qtConfig: PropTypes__default["default"].object
|
|
3071
3082
|
};
|
|
3072
3083
|
|
|
3073
3084
|
var CrownIcon = function CrownIcon(_ref) {
|
|
@@ -3076,7 +3087,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3076
3087
|
_ref$color = _ref.color,
|
|
3077
3088
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
3078
3089
|
positionTop = _ref.positionTop;
|
|
3079
|
-
return /*#__PURE__*/
|
|
3090
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3080
3091
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3081
3092
|
width: width,
|
|
3082
3093
|
height: height,
|
|
@@ -3085,28 +3096,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3085
3096
|
position: "relative",
|
|
3086
3097
|
top: positionTop
|
|
3087
3098
|
}
|
|
3088
|
-
}, /*#__PURE__*/
|
|
3099
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3089
3100
|
fill: "none",
|
|
3090
3101
|
fillRule: "evenodd",
|
|
3091
3102
|
stroke: "none",
|
|
3092
3103
|
strokeWidth: "1"
|
|
3093
|
-
}, /*#__PURE__*/
|
|
3104
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3094
3105
|
transform: "translate(8 8)"
|
|
3095
|
-
}, /*#__PURE__*/
|
|
3106
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3096
3107
|
d: "M0 0H24V24H0z"
|
|
3097
|
-
}), /*#__PURE__*/
|
|
3108
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3098
3109
|
fill: color,
|
|
3099
3110
|
fillRule: "nonzero",
|
|
3100
3111
|
transform: "translate(0 2)"
|
|
3101
|
-
}, /*#__PURE__*/
|
|
3112
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3102
3113
|
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"
|
|
3103
3114
|
}))))));
|
|
3104
3115
|
};
|
|
3105
3116
|
CrownIcon.propTypes = {
|
|
3106
|
-
height:
|
|
3107
|
-
width:
|
|
3108
|
-
color:
|
|
3109
|
-
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
|
|
3110
3121
|
};
|
|
3111
3122
|
|
|
3112
3123
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -3115,7 +3126,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3115
3126
|
_ref$color = _ref.color,
|
|
3116
3127
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3117
3128
|
positionTop = _ref.positionTop;
|
|
3118
|
-
return /*#__PURE__*/
|
|
3129
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3119
3130
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3120
3131
|
width: width,
|
|
3121
3132
|
height: height,
|
|
@@ -3124,16 +3135,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3124
3135
|
position: "relative",
|
|
3125
3136
|
top: positionTop
|
|
3126
3137
|
}
|
|
3127
|
-
}, /*#__PURE__*/
|
|
3138
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3128
3139
|
fill: "none",
|
|
3129
3140
|
fillRule: "evenodd",
|
|
3130
3141
|
stroke: "none",
|
|
3131
3142
|
strokeWidth: "1"
|
|
3132
|
-
}, /*#__PURE__*/
|
|
3143
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3133
3144
|
transform: "translate(8 8)"
|
|
3134
|
-
}, /*#__PURE__*/
|
|
3145
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3135
3146
|
d: "M0 0H24V24H0z"
|
|
3136
|
-
}), /*#__PURE__*/
|
|
3147
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3137
3148
|
fill: color,
|
|
3138
3149
|
fillRule: "nonzero",
|
|
3139
3150
|
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",
|
|
@@ -3141,10 +3152,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3141
3152
|
})))));
|
|
3142
3153
|
};
|
|
3143
3154
|
KeyIcon.propTypes = {
|
|
3144
|
-
height:
|
|
3145
|
-
width:
|
|
3146
|
-
color:
|
|
3147
|
-
positionTop:
|
|
3155
|
+
height: PropTypes__default["default"].string,
|
|
3156
|
+
width: PropTypes__default["default"].string,
|
|
3157
|
+
color: PropTypes__default["default"].string,
|
|
3158
|
+
positionTop: PropTypes__default["default"].string
|
|
3148
3159
|
};
|
|
3149
3160
|
|
|
3150
3161
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -3153,7 +3164,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3153
3164
|
_ref$color = _ref.color,
|
|
3154
3165
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3155
3166
|
positionTop = _ref.positionTop;
|
|
3156
|
-
return /*#__PURE__*/
|
|
3167
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3157
3168
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3158
3169
|
width: width,
|
|
3159
3170
|
height: height,
|
|
@@ -3162,28 +3173,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3162
3173
|
position: "relative",
|
|
3163
3174
|
top: positionTop
|
|
3164
3175
|
}
|
|
3165
|
-
}, /*#__PURE__*/
|
|
3176
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3166
3177
|
fill: "none",
|
|
3167
3178
|
fillRule: "evenodd",
|
|
3168
3179
|
stroke: "none",
|
|
3169
3180
|
strokeWidth: "1"
|
|
3170
|
-
}, /*#__PURE__*/
|
|
3181
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3171
3182
|
transform: "translate(8 8)"
|
|
3172
|
-
}, /*#__PURE__*/
|
|
3183
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3173
3184
|
d: "M0 0H24V24H0z"
|
|
3174
|
-
}), /*#__PURE__*/
|
|
3185
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3175
3186
|
fill: color,
|
|
3176
3187
|
fillRule: "nonzero",
|
|
3177
3188
|
transform: "translate(3)"
|
|
3178
|
-
}, /*#__PURE__*/
|
|
3189
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3179
3190
|
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"
|
|
3180
3191
|
}))))));
|
|
3181
3192
|
};
|
|
3182
3193
|
LockIcon.propTypes = {
|
|
3183
|
-
height:
|
|
3184
|
-
width:
|
|
3185
|
-
color:
|
|
3186
|
-
positionTop:
|
|
3194
|
+
height: PropTypes__default["default"].string,
|
|
3195
|
+
width: PropTypes__default["default"].string,
|
|
3196
|
+
color: PropTypes__default["default"].string,
|
|
3197
|
+
positionTop: PropTypes__default["default"].string
|
|
3187
3198
|
};
|
|
3188
3199
|
|
|
3189
3200
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -3193,7 +3204,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3193
3204
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3194
3205
|
_ref$positionTop = _ref.positionTop,
|
|
3195
3206
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
3196
|
-
return /*#__PURE__*/
|
|
3207
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3197
3208
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3198
3209
|
width: width,
|
|
3199
3210
|
height: height,
|
|
@@ -3202,21 +3213,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3202
3213
|
position: "relative",
|
|
3203
3214
|
top: positionTop
|
|
3204
3215
|
}
|
|
3205
|
-
}, /*#__PURE__*/
|
|
3216
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3206
3217
|
fill: "none",
|
|
3207
3218
|
fillRule: "evenodd",
|
|
3208
3219
|
stroke: "none",
|
|
3209
3220
|
strokeWidth: "1"
|
|
3210
|
-
}, /*#__PURE__*/
|
|
3221
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3211
3222
|
fill: color,
|
|
3212
3223
|
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"
|
|
3213
3224
|
}))));
|
|
3214
3225
|
};
|
|
3215
3226
|
StarIcon.propTypes = {
|
|
3216
|
-
height:
|
|
3217
|
-
width:
|
|
3218
|
-
color:
|
|
3219
|
-
positionTop:
|
|
3227
|
+
height: PropTypes__default["default"].string,
|
|
3228
|
+
width: PropTypes__default["default"].string,
|
|
3229
|
+
color: PropTypes__default["default"].string,
|
|
3230
|
+
positionTop: PropTypes__default["default"].string
|
|
3220
3231
|
};
|
|
3221
3232
|
|
|
3222
3233
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -3228,7 +3239,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3228
3239
|
|
|
3229
3240
|
switch (iconType) {
|
|
3230
3241
|
case "crown":
|
|
3231
|
-
return /*#__PURE__*/
|
|
3242
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
3232
3243
|
width: width,
|
|
3233
3244
|
height: height,
|
|
3234
3245
|
color: color,
|
|
@@ -3236,7 +3247,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3236
3247
|
});
|
|
3237
3248
|
|
|
3238
3249
|
case "lock":
|
|
3239
|
-
return /*#__PURE__*/
|
|
3250
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
3240
3251
|
width: width,
|
|
3241
3252
|
height: height,
|
|
3242
3253
|
color: color,
|
|
@@ -3244,7 +3255,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3244
3255
|
});
|
|
3245
3256
|
|
|
3246
3257
|
case "key":
|
|
3247
|
-
return /*#__PURE__*/
|
|
3258
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
3248
3259
|
width: width,
|
|
3249
3260
|
height: height,
|
|
3250
3261
|
color: color,
|
|
@@ -3252,7 +3263,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3252
3263
|
});
|
|
3253
3264
|
|
|
3254
3265
|
default:
|
|
3255
|
-
return /*#__PURE__*/
|
|
3266
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
3256
3267
|
width: width,
|
|
3257
3268
|
height: height,
|
|
3258
3269
|
color: color,
|
|
@@ -3261,21 +3272,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3261
3272
|
}
|
|
3262
3273
|
};
|
|
3263
3274
|
PremiumStoryIcon.propTypes = {
|
|
3264
|
-
width:
|
|
3265
|
-
height:
|
|
3266
|
-
color:
|
|
3267
|
-
iconType:
|
|
3268
|
-
positionTop:
|
|
3275
|
+
width: PropTypes__default["default"].string,
|
|
3276
|
+
height: PropTypes__default["default"].string,
|
|
3277
|
+
color: PropTypes__default["default"].string,
|
|
3278
|
+
iconType: PropTypes__default["default"].string,
|
|
3279
|
+
positionTop: PropTypes__default["default"].string
|
|
3269
3280
|
};
|
|
3270
3281
|
|
|
3271
3282
|
function LiveIcon() {
|
|
3272
|
-
return /*#__PURE__*/
|
|
3283
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3273
3284
|
className: "live-icon",
|
|
3274
3285
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3275
3286
|
width: "25",
|
|
3276
3287
|
height: "24",
|
|
3277
3288
|
viewBox: "0 0 25 24"
|
|
3278
|
-
}, /*#__PURE__*/
|
|
3289
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3279
3290
|
fill: "#ff5858",
|
|
3280
3291
|
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"
|
|
3281
3292
|
}));
|
|
@@ -3332,37 +3343,37 @@ var Headline = function Headline(_ref) {
|
|
|
3332
3343
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3333
3344
|
var iconSize = "24px";
|
|
3334
3345
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
3335
|
-
return /*#__PURE__*/
|
|
3346
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3336
3347
|
"data-test-id": "headline",
|
|
3337
3348
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$c)
|
|
3338
|
-
}, premiumStory && /*#__PURE__*/
|
|
3349
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3339
3350
|
width: iconSize,
|
|
3340
3351
|
height: iconSize,
|
|
3341
3352
|
color: iconColor,
|
|
3342
3353
|
iconType: iconStyle,
|
|
3343
3354
|
positionTop: positionHeadline()
|
|
3344
|
-
}), isLink ? /*#__PURE__*/
|
|
3355
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3345
3356
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3346
3357
|
externalLink: isExternalStory(story),
|
|
3347
3358
|
"aria-label": "headline"
|
|
3348
|
-
}, /*#__PURE__*/
|
|
3359
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3349
3360
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$c)
|
|
3350
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3361
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3351
3362
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$c)
|
|
3352
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3363
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3353
3364
|
};
|
|
3354
3365
|
Headline.propTypes = {
|
|
3355
3366
|
/** The Story Object from the API response */
|
|
3356
|
-
story:
|
|
3367
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3357
3368
|
|
|
3358
3369
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3359
|
-
headerLevel:
|
|
3360
|
-
premiumStoryIconConfig:
|
|
3361
|
-
iconColor:
|
|
3362
|
-
iconType:
|
|
3363
|
-
enablePremiumStoryIcon:
|
|
3370
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3371
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
3372
|
+
iconColor: PropTypes__default["default"].string,
|
|
3373
|
+
iconType: PropTypes__default["default"].string,
|
|
3374
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3364
3375
|
}),
|
|
3365
|
-
isLink:
|
|
3376
|
+
isLink: PropTypes__default["default"].bool
|
|
3366
3377
|
};
|
|
3367
3378
|
Headline.defaultProps = {
|
|
3368
3379
|
headerLevel: "6",
|
|
@@ -3389,7 +3400,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3389
3400
|
var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
|
|
3390
3401
|
if (!subheadline) return null;
|
|
3391
3402
|
var textColor = getTextColor(config.theme);
|
|
3392
|
-
return /*#__PURE__*/
|
|
3403
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3393
3404
|
style: {
|
|
3394
3405
|
WebkitLineClamp: lineClamp
|
|
3395
3406
|
},
|
|
@@ -3399,15 +3410,15 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3399
3410
|
};
|
|
3400
3411
|
Subheadline.propTypes = {
|
|
3401
3412
|
/** The Story Object from the API response */
|
|
3402
|
-
story:
|
|
3413
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3403
3414
|
// Restricts the number of lines for subheadline.
|
|
3404
|
-
lineClamp:
|
|
3415
|
+
lineClamp: PropTypes__default["default"].number,
|
|
3405
3416
|
|
|
3406
3417
|
/** Number of characters to truncate the subheadline */
|
|
3407
|
-
truncateChars:
|
|
3408
|
-
clazzName:
|
|
3409
|
-
forceShowAtom:
|
|
3410
|
-
showFullContent:
|
|
3418
|
+
truncateChars: PropTypes__default["default"].number,
|
|
3419
|
+
clazzName: PropTypes__default["default"].string,
|
|
3420
|
+
forceShowAtom: PropTypes__default["default"].bool,
|
|
3421
|
+
showFullContent: PropTypes__default["default"].bool
|
|
3411
3422
|
};
|
|
3412
3423
|
Subheadline.defaultProps = {
|
|
3413
3424
|
forceShowAtom: false,
|
|
@@ -3433,18 +3444,18 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3433
3444
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3434
3445
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3435
3446
|
var textColor = getTextColor(configState.theme);
|
|
3436
|
-
return /*#__PURE__*/
|
|
3447
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3437
3448
|
"data-test-id": "publish-time",
|
|
3438
3449
|
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$a)
|
|
3439
|
-
}, /*#__PURE__*/
|
|
3450
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3440
3451
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3441
3452
|
}, getTimeStamp(time, formatter, config))));
|
|
3442
3453
|
};
|
|
3443
3454
|
TimeStamp.propTypes = {
|
|
3444
3455
|
/** The Story Object from the API response */
|
|
3445
|
-
story:
|
|
3446
|
-
isBottom:
|
|
3447
|
-
config:
|
|
3456
|
+
story: PropTypes__default["default"].object,
|
|
3457
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3458
|
+
config: PropTypes__default["default"].object
|
|
3448
3459
|
};
|
|
3449
3460
|
|
|
3450
3461
|
var _styleModuleImportMap$9 = {
|
|
@@ -3487,10 +3498,10 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3487
3498
|
return null;
|
|
3488
3499
|
}
|
|
3489
3500
|
|
|
3490
|
-
return /*#__PURE__*/
|
|
3501
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3491
3502
|
"data-test-id": "author-image",
|
|
3492
3503
|
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$9)
|
|
3493
|
-
}, /*#__PURE__*/
|
|
3504
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3494
3505
|
slug: avatarS3Key,
|
|
3495
3506
|
"aspect-ratio": [1, 1],
|
|
3496
3507
|
defaultWidth: 400,
|
|
@@ -3498,14 +3509,14 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3498
3509
|
auto: ["format", "compress"]
|
|
3499
3510
|
},
|
|
3500
3511
|
alt: authorName
|
|
3501
|
-
}) : /*#__PURE__*/
|
|
3512
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3502
3513
|
src: avatarUrl
|
|
3503
3514
|
})));
|
|
3504
3515
|
};
|
|
3505
3516
|
|
|
3506
3517
|
var isPrefix = function isPrefix(dir) {
|
|
3507
3518
|
if (prefix) {
|
|
3508
|
-
return /*#__PURE__*/
|
|
3519
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3509
3520
|
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$9)
|
|
3510
3521
|
}, prefix);
|
|
3511
3522
|
}
|
|
@@ -3513,11 +3524,11 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3513
3524
|
return !hideAuthorImage && authorImage(dir);
|
|
3514
3525
|
};
|
|
3515
3526
|
|
|
3516
|
-
return /*#__PURE__*/
|
|
3527
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3517
3528
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3518
3529
|
"aria-label": "author-name",
|
|
3519
3530
|
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$9)
|
|
3520
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
3531
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3521
3532
|
"data-test-id": "author-name",
|
|
3522
3533
|
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$9)
|
|
3523
3534
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
@@ -3529,18 +3540,18 @@ function mapStateToProps(state) {
|
|
|
3529
3540
|
};
|
|
3530
3541
|
}
|
|
3531
3542
|
|
|
3532
|
-
var Author = connect(mapStateToProps)(AuthorBase);
|
|
3543
|
+
var Author = reactRedux.connect(mapStateToProps)(AuthorBase);
|
|
3533
3544
|
AuthorBase.propTypes = {
|
|
3534
3545
|
/** The Story Object from the API response */
|
|
3535
|
-
story:
|
|
3546
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3536
3547
|
|
|
3537
3548
|
/** Hide Author Avatar Image */
|
|
3538
|
-
hideAuthorImage:
|
|
3549
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3539
3550
|
// fix Author bottom of the storyCard
|
|
3540
|
-
isBottom:
|
|
3551
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3541
3552
|
// fix prefix before the author name
|
|
3542
|
-
prefix:
|
|
3543
|
-
config:
|
|
3553
|
+
prefix: PropTypes__default["default"].string,
|
|
3554
|
+
config: PropTypes__default["default"].object
|
|
3544
3555
|
};
|
|
3545
3556
|
AuthorBase.defaultProps = {
|
|
3546
3557
|
hideAuthorImage: false,
|
|
@@ -3561,14 +3572,14 @@ var Dot = function Dot(_ref) {
|
|
|
3561
3572
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3562
3573
|
_ref$color = _ref.color,
|
|
3563
3574
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3564
|
-
return /*#__PURE__*/
|
|
3575
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3565
3576
|
className: _getClassName(color, _styleModuleImportMap$8)
|
|
3566
|
-
}, /*#__PURE__*/
|
|
3577
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3567
3578
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3568
3579
|
width: width,
|
|
3569
3580
|
height: height,
|
|
3570
3581
|
viewBox: "0 0 3 3"
|
|
3571
|
-
}, /*#__PURE__*/
|
|
3582
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3572
3583
|
cx: "87",
|
|
3573
3584
|
cy: "9",
|
|
3574
3585
|
r: "1",
|
|
@@ -3579,9 +3590,9 @@ var Dot = function Dot(_ref) {
|
|
|
3579
3590
|
};
|
|
3580
3591
|
Dot.propTypes = {
|
|
3581
3592
|
/** height , width and color of the dot icon */
|
|
3582
|
-
color:
|
|
3583
|
-
width:
|
|
3584
|
-
height:
|
|
3593
|
+
color: PropTypes__default["default"].string,
|
|
3594
|
+
width: PropTypes__default["default"].string,
|
|
3595
|
+
height: PropTypes__default["default"].string
|
|
3585
3596
|
};
|
|
3586
3597
|
|
|
3587
3598
|
var _styleModuleImportMap$7 = {
|
|
@@ -3597,22 +3608,22 @@ var Divider = function Divider(_ref) {
|
|
|
3597
3608
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3598
3609
|
_ref$color = _ref.color,
|
|
3599
3610
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3600
|
-
return /*#__PURE__*/
|
|
3611
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3601
3612
|
className: _getClassName(color, _styleModuleImportMap$7)
|
|
3602
|
-
}, /*#__PURE__*/
|
|
3613
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3603
3614
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3604
3615
|
width: width,
|
|
3605
3616
|
height: height
|
|
3606
|
-
}, /*#__PURE__*/
|
|
3617
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3607
3618
|
fill: "inherit",
|
|
3608
3619
|
d: "M0 0h1v10H0z"
|
|
3609
3620
|
})));
|
|
3610
3621
|
};
|
|
3611
3622
|
Divider.propTypes = {
|
|
3612
3623
|
/** height , width and color of the dot icon */
|
|
3613
|
-
color:
|
|
3614
|
-
width:
|
|
3615
|
-
height:
|
|
3624
|
+
color: PropTypes__default["default"].string,
|
|
3625
|
+
width: PropTypes__default["default"].string,
|
|
3626
|
+
height: PropTypes__default["default"].string
|
|
3616
3627
|
};
|
|
3617
3628
|
|
|
3618
3629
|
var _styleModuleImportMap$6 = {
|
|
@@ -3635,23 +3646,23 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3635
3646
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3636
3647
|
if (!showReadTime || !readTime) return null;
|
|
3637
3648
|
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
3638
|
-
return /*#__PURE__*/
|
|
3649
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3639
3650
|
"data-test-id": "read-time",
|
|
3640
3651
|
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$6)
|
|
3641
|
-
}, /*#__PURE__*/
|
|
3652
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3642
3653
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3643
|
-
}, /*#__PURE__*/
|
|
3654
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3644
3655
|
color: textColor
|
|
3645
|
-
})), /*#__PURE__*/
|
|
3656
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3646
3657
|
};
|
|
3647
3658
|
ReadTime.propTypes = {
|
|
3648
|
-
story:
|
|
3649
|
-
"read-time":
|
|
3659
|
+
story: PropTypes__default["default"].shape({
|
|
3660
|
+
"read-time": PropTypes__default["default"].number
|
|
3650
3661
|
}),
|
|
3651
|
-
opts:
|
|
3652
|
-
showReadTime:
|
|
3662
|
+
opts: PropTypes__default["default"].shape({
|
|
3663
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3653
3664
|
}),
|
|
3654
|
-
isLightTheme:
|
|
3665
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3655
3666
|
};
|
|
3656
3667
|
|
|
3657
3668
|
var _styleModuleImportMap$5 = {
|
|
@@ -3682,33 +3693,33 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3682
3693
|
|
|
3683
3694
|
var getSeparator = function getSeparator() {
|
|
3684
3695
|
if (separator === "divider") {
|
|
3685
|
-
return /*#__PURE__*/
|
|
3696
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3686
3697
|
color: textColor
|
|
3687
3698
|
});
|
|
3688
3699
|
}
|
|
3689
3700
|
|
|
3690
|
-
return /*#__PURE__*/
|
|
3701
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3691
3702
|
color: textColor
|
|
3692
3703
|
});
|
|
3693
3704
|
};
|
|
3694
3705
|
|
|
3695
3706
|
var getTimeStamp = function getTimeStamp() {
|
|
3696
3707
|
if (!isTime) return null;
|
|
3697
|
-
return /*#__PURE__*/
|
|
3708
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3698
3709
|
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$5)
|
|
3699
|
-
}, getSeparator()), /*#__PURE__*/
|
|
3710
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3700
3711
|
story: story,
|
|
3701
3712
|
config: config
|
|
3702
|
-
}), isReadTime && /*#__PURE__*/
|
|
3713
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3703
3714
|
story: story,
|
|
3704
3715
|
opts: config,
|
|
3705
3716
|
isLightTheme: isLightTheme
|
|
3706
3717
|
}));
|
|
3707
3718
|
};
|
|
3708
3719
|
|
|
3709
|
-
return /*#__PURE__*/
|
|
3720
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3710
3721
|
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$5)
|
|
3711
|
-
}, isAuthor ? /*#__PURE__*/
|
|
3722
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3712
3723
|
story: story,
|
|
3713
3724
|
isBottom: true,
|
|
3714
3725
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3716,19 +3727,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3716
3727
|
}), getTimeStamp()) : getTimeStamp());
|
|
3717
3728
|
};
|
|
3718
3729
|
AuthorWithTime.propTypes = {
|
|
3719
|
-
story:
|
|
3730
|
+
story: PropTypes__default["default"].object,
|
|
3720
3731
|
|
|
3721
3732
|
/** Style of separator between the Author & Timestamp */
|
|
3722
|
-
separator:
|
|
3733
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3723
3734
|
|
|
3724
3735
|
/** hide the author image */
|
|
3725
|
-
hideAuthorImage:
|
|
3736
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3726
3737
|
// fix author and time at the end
|
|
3727
|
-
isBottom:
|
|
3738
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3728
3739
|
// fix prefix before the author name
|
|
3729
|
-
prefix:
|
|
3730
|
-
config:
|
|
3731
|
-
isLightTheme:
|
|
3740
|
+
prefix: PropTypes__default["default"].string,
|
|
3741
|
+
config: PropTypes__default["default"].object,
|
|
3742
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3732
3743
|
};
|
|
3733
3744
|
AuthorWithTime.defaultProps = {
|
|
3734
3745
|
separator: "dot",
|
|
@@ -3745,27 +3756,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3745
3756
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
3746
3757
|
_ref$iconColor = _ref.iconColor,
|
|
3747
3758
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
3748
|
-
return /*#__PURE__*/
|
|
3759
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3749
3760
|
width: width,
|
|
3750
3761
|
height: height,
|
|
3751
3762
|
viewBox: "0 0 102 76",
|
|
3752
3763
|
version: "1.1"
|
|
3753
|
-
}, /*#__PURE__*/
|
|
3764
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3754
3765
|
id: "demo-home-copy",
|
|
3755
3766
|
stroke: "none",
|
|
3756
3767
|
strokeWidth: "1",
|
|
3757
3768
|
fill: "none",
|
|
3758
3769
|
fillRule: "evenodd",
|
|
3759
3770
|
transform: "translate(-377.000000, -314.000000)"
|
|
3760
|
-
}, /*#__PURE__*/
|
|
3771
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3761
3772
|
id: "Group-13",
|
|
3762
3773
|
transform: "translate(377.000000, 314.000000)"
|
|
3763
|
-
}, /*#__PURE__*/
|
|
3774
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3764
3775
|
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",
|
|
3765
3776
|
id: "Combined-Shape",
|
|
3766
3777
|
fill: iconColor,
|
|
3767
3778
|
fillRule: "nonzero"
|
|
3768
|
-
}), /*#__PURE__*/
|
|
3779
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3769
3780
|
id: "Rectangle-19",
|
|
3770
3781
|
stroke: iconColor,
|
|
3771
3782
|
strokeWidth: "3",
|
|
@@ -3777,24 +3788,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3777
3788
|
}))));
|
|
3778
3789
|
};
|
|
3779
3790
|
ImageFallbackIcon.propTypes = {
|
|
3780
|
-
width:
|
|
3781
|
-
height:
|
|
3782
|
-
iconColor:
|
|
3791
|
+
width: PropTypes__default["default"].object,
|
|
3792
|
+
height: PropTypes__default["default"].object,
|
|
3793
|
+
iconColor: PropTypes__default["default"].object
|
|
3783
3794
|
};
|
|
3784
3795
|
|
|
3785
3796
|
var imageFallback = function imageFallback() {
|
|
3786
|
-
return /*#__PURE__*/
|
|
3797
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3787
3798
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
3788
|
-
}, /*#__PURE__*/
|
|
3799
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3789
3800
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
3790
|
-
}, /*#__PURE__*/
|
|
3801
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
3791
3802
|
};
|
|
3792
3803
|
|
|
3793
3804
|
var FallbackImage = function FallbackImage(_ref) {
|
|
3794
3805
|
var slug = _ref.slug;
|
|
3795
3806
|
|
|
3796
3807
|
if (slug) {
|
|
3797
|
-
return /*#__PURE__*/
|
|
3808
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3798
3809
|
href: slug,
|
|
3799
3810
|
"aria-label": "image-fallback"
|
|
3800
3811
|
}, imageFallback());
|
|
@@ -3803,23 +3814,23 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
3803
3814
|
}
|
|
3804
3815
|
};
|
|
3805
3816
|
FallbackImage.propTypes = {
|
|
3806
|
-
slug:
|
|
3817
|
+
slug: PropTypes__default["default"].string
|
|
3807
3818
|
};
|
|
3808
3819
|
|
|
3809
3820
|
var HyperLinkIcon = function HyperLinkIcon() {
|
|
3810
|
-
return /*#__PURE__*/
|
|
3821
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3811
3822
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3812
3823
|
width: "36",
|
|
3813
3824
|
height: "28"
|
|
3814
|
-
}, /*#__PURE__*/
|
|
3825
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3815
3826
|
fill: "none",
|
|
3816
3827
|
fillRule: "evenodd"
|
|
3817
|
-
}, /*#__PURE__*/
|
|
3828
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3818
3829
|
width: "36",
|
|
3819
3830
|
height: "28",
|
|
3820
3831
|
fill: "#3D6FCF",
|
|
3821
3832
|
rx: "4"
|
|
3822
|
-
}), /*#__PURE__*/
|
|
3833
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3823
3834
|
stroke: "#FFF",
|
|
3824
3835
|
strokeLinecap: "round",
|
|
3825
3836
|
strokeLinejoin: "round",
|
|
@@ -3832,16 +3843,16 @@ var HyperLink = function HyperLink(_ref) {
|
|
|
3832
3843
|
var _ref$hyperLink = _ref.hyperLink,
|
|
3833
3844
|
hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
|
|
3834
3845
|
if (!hyperLink) return null;
|
|
3835
|
-
return /*#__PURE__*/
|
|
3846
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3836
3847
|
href: hyperLink,
|
|
3837
3848
|
"aria-label": "hyperlink-button",
|
|
3838
3849
|
className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
|
|
3839
3850
|
target: "_blank",
|
|
3840
3851
|
rel: "noopener noreferrer"
|
|
3841
|
-
}, /*#__PURE__*/
|
|
3852
|
+
}, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
|
|
3842
3853
|
};
|
|
3843
3854
|
HyperLink.propTypes = {
|
|
3844
|
-
hyperLink:
|
|
3855
|
+
hyperLink: PropTypes__default["default"].string
|
|
3845
3856
|
};
|
|
3846
3857
|
|
|
3847
3858
|
var _styleModuleImportMap$4 = {
|
|
@@ -3877,7 +3888,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3877
3888
|
StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
|
|
3878
3889
|
return null;
|
|
3879
3890
|
} : _config$StoryTemplate;
|
|
3880
|
-
var showImagePlaceholder = useSelector(function (state) {
|
|
3891
|
+
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3881
3892
|
return get_1(state, ["qt", "config", "showPlaceholder"]);
|
|
3882
3893
|
});
|
|
3883
3894
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
@@ -3913,37 +3924,37 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3913
3924
|
var fallbackImage = function fallbackImage() {
|
|
3914
3925
|
if (!slug) {
|
|
3915
3926
|
if (fallbackImageUrl && !isStoryPageImage) {
|
|
3916
|
-
return /*#__PURE__*/
|
|
3927
|
+
return /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3917
3928
|
style: {
|
|
3918
3929
|
paddingTop: imagePadding + "%"
|
|
3919
3930
|
},
|
|
3920
3931
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$4)
|
|
3921
|
-
}, /*#__PURE__*/
|
|
3932
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3922
3933
|
className: "qt-image",
|
|
3923
3934
|
"data-src": "".concat(fallbackImageUrl),
|
|
3924
3935
|
alt: "image-fallback"
|
|
3925
3936
|
}));
|
|
3926
3937
|
}
|
|
3927
3938
|
|
|
3928
|
-
return /*#__PURE__*/
|
|
3939
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3929
3940
|
"data-test-id": "arr--fallback-hero-image",
|
|
3930
3941
|
style: {
|
|
3931
3942
|
paddingTop: imagePadding + "%"
|
|
3932
3943
|
},
|
|
3933
3944
|
className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$4)
|
|
3934
|
-
}, /*#__PURE__*/
|
|
3945
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3935
3946
|
storyTemplate: story["story-template"]
|
|
3936
|
-
}), /*#__PURE__*/
|
|
3947
|
+
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
3937
3948
|
}
|
|
3938
3949
|
|
|
3939
|
-
return /*#__PURE__*/
|
|
3950
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3940
3951
|
style: {
|
|
3941
3952
|
paddingTop: imagePadding + "%"
|
|
3942
3953
|
},
|
|
3943
3954
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$4)
|
|
3944
|
-
}, /*#__PURE__*/
|
|
3955
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3945
3956
|
storyTemplate: story["story-template"]
|
|
3946
|
-
}), /*#__PURE__*/
|
|
3957
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
3947
3958
|
story: story,
|
|
3948
3959
|
aspectRatio: imageAspectRatio,
|
|
3949
3960
|
defaultWidth: defaultWidth,
|
|
@@ -3952,15 +3963,15 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3952
3963
|
auto: ["format", "compress"],
|
|
3953
3964
|
fit: "max"
|
|
3954
3965
|
}
|
|
3955
|
-
})), isStoryPageImage && hyperLink && /*#__PURE__*/
|
|
3966
|
+
})), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
|
|
3956
3967
|
hyperLink: hyperLink
|
|
3957
3968
|
}));
|
|
3958
3969
|
};
|
|
3959
3970
|
|
|
3960
|
-
return story && (isStoryPageImage ? /*#__PURE__*/
|
|
3971
|
+
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3961
3972
|
"data-test-id": "arr--hero-image",
|
|
3962
3973
|
className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$4)
|
|
3963
|
-
}, fallbackImage()) : /*#__PURE__*/
|
|
3974
|
+
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3964
3975
|
"data-test-id": "arr--hero-image",
|
|
3965
3976
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3966
3977
|
externalLink: isExternalStory(story),
|
|
@@ -3970,30 +3981,30 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3970
3981
|
};
|
|
3971
3982
|
HeroImage.propTypes = {
|
|
3972
3983
|
/** The Story Object from the API response */
|
|
3973
|
-
story:
|
|
3984
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3974
3985
|
|
|
3975
3986
|
/** Removes the Hero Image padding for the image to bleed over the margin */
|
|
3976
|
-
FullBleed:
|
|
3987
|
+
FullBleed: PropTypes__default["default"].bool,
|
|
3977
3988
|
|
|
3978
3989
|
/** The default width for the image, in case the browser does not support srcset */
|
|
3979
|
-
defaultWidth:
|
|
3990
|
+
defaultWidth: PropTypes__default["default"].number,
|
|
3980
3991
|
|
|
3981
3992
|
/** The list of available widths */
|
|
3982
|
-
widths:
|
|
3993
|
+
widths: PropTypes__default["default"].array,
|
|
3983
3994
|
// fatch the correct hero image
|
|
3984
|
-
aspectRatio:
|
|
3995
|
+
aspectRatio: PropTypes__default["default"].array,
|
|
3985
3996
|
// Hints for the browser to choose the best size
|
|
3986
3997
|
|
|
3987
3998
|
/** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
|
|
3988
|
-
isHorizontal:
|
|
3999
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3989
4000
|
|
|
3990
4001
|
/** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
|
|
3991
|
-
isHorizontalMobile:
|
|
4002
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3992
4003
|
// this prop is responsive for rendering fallback image on story page
|
|
3993
|
-
defaultFallback:
|
|
3994
|
-
isHorizontalWithImageLast:
|
|
3995
|
-
isStoryPageImage:
|
|
3996
|
-
config:
|
|
4004
|
+
defaultFallback: PropTypes__default["default"].bool,
|
|
4005
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool,
|
|
4006
|
+
isStoryPageImage: PropTypes__default["default"].bool,
|
|
4007
|
+
config: PropTypes__default["default"].object
|
|
3997
4008
|
};
|
|
3998
4009
|
HeroImage.defaultProps = {
|
|
3999
4010
|
FullBleed: true,
|
|
@@ -4043,22 +4054,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
4043
4054
|
}
|
|
4044
4055
|
|
|
4045
4056
|
if (!isSection) return null;
|
|
4046
|
-
return /*#__PURE__*/
|
|
4057
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
4047
4058
|
href: getUrl,
|
|
4048
4059
|
className: "arrow-component arr--section-name",
|
|
4049
4060
|
"aria-label": "section-name"
|
|
4050
|
-
}, /*#__PURE__*/
|
|
4061
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4051
4062
|
"data-test-id": "sectionTag",
|
|
4052
4063
|
style: {
|
|
4053
4064
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
4054
4065
|
},
|
|
4055
4066
|
className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$3)
|
|
4056
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
4067
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4057
4068
|
className: "section-m_border-left__2oUyp",
|
|
4058
4069
|
style: {
|
|
4059
4070
|
color: sectionTagBorderColor
|
|
4060
4071
|
}
|
|
4061
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
4072
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4062
4073
|
className: "section-m_border-bottom__3cRoD",
|
|
4063
4074
|
style: {
|
|
4064
4075
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -4067,13 +4078,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
4067
4078
|
};
|
|
4068
4079
|
SectionTag.propTypes = {
|
|
4069
4080
|
/** The Story Object from the API response */
|
|
4070
|
-
story:
|
|
4081
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4071
4082
|
|
|
4072
4083
|
/** The style template for section tag */
|
|
4073
|
-
template:
|
|
4074
|
-
borderColor:
|
|
4075
|
-
solidBorderColor:
|
|
4076
|
-
isLightTheme:
|
|
4084
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
4085
|
+
borderColor: PropTypes__default["default"].string,
|
|
4086
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
4087
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
4077
4088
|
};
|
|
4078
4089
|
SectionTag.defaultProps = {
|
|
4079
4090
|
template: "",
|
|
@@ -4122,7 +4133,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4122
4133
|
prefix = _ref.prefix,
|
|
4123
4134
|
config = _ref.config,
|
|
4124
4135
|
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
4125
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/
|
|
4136
|
+
if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
4126
4137
|
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
4127
4138
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
4128
4139
|
|
|
@@ -4132,7 +4143,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4132
4143
|
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
4133
4144
|
var textColor = getTextColor(theme);
|
|
4134
4145
|
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
4135
|
-
var defaultStorycard = /*#__PURE__*/
|
|
4146
|
+
var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
|
|
4136
4147
|
story: story,
|
|
4137
4148
|
aspectRatio: aspectRatio,
|
|
4138
4149
|
border: border,
|
|
@@ -4146,7 +4157,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4146
4157
|
config: config,
|
|
4147
4158
|
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
4148
4159
|
});
|
|
4149
|
-
return /*#__PURE__*/
|
|
4160
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4150
4161
|
"data-test-id": "story-card",
|
|
4151
4162
|
style: {
|
|
4152
4163
|
backgroundColor: theme,
|
|
@@ -4175,91 +4186,91 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
4175
4186
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4176
4187
|
var _config$localizationC = config.localizationConfig,
|
|
4177
4188
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4178
|
-
return /*#__PURE__*/
|
|
4189
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4179
4190
|
config: config,
|
|
4180
4191
|
story: story,
|
|
4181
4192
|
isHorizontal: true,
|
|
4182
4193
|
isHorizontalMobile: isHorizontalMobile,
|
|
4183
4194
|
aspectRatio: aspectRatio
|
|
4184
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/
|
|
4195
|
+
}) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4185
4196
|
config: config,
|
|
4186
4197
|
story: story,
|
|
4187
4198
|
isHorizontalWithImageLast: true,
|
|
4188
4199
|
isHorizontalMobile: isHorizontalMobile,
|
|
4189
4200
|
aspectRatio: aspectRatio
|
|
4190
|
-
}) : /*#__PURE__*/
|
|
4201
|
+
}) : /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4191
4202
|
story: story,
|
|
4192
4203
|
config: config,
|
|
4193
4204
|
isHorizontalMobile: isHorizontalMobile,
|
|
4194
4205
|
aspectRatio: aspectRatio
|
|
4195
|
-
}), /*#__PURE__*/
|
|
4206
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4196
4207
|
className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap$2)
|
|
4197
|
-
}, /*#__PURE__*/
|
|
4208
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4198
4209
|
story: story,
|
|
4199
4210
|
borderColor: SectionTagborderColor
|
|
4200
|
-
}), /*#__PURE__*/
|
|
4211
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4201
4212
|
story: story,
|
|
4202
4213
|
headerLevel: headerLevel,
|
|
4203
4214
|
premiumStoryIconConfig: config
|
|
4204
|
-
}), /*#__PURE__*/
|
|
4215
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4205
4216
|
config: localizationConfig,
|
|
4206
4217
|
story: story,
|
|
4207
4218
|
isBottom: true,
|
|
4208
4219
|
prefix: prefix,
|
|
4209
4220
|
hideAuthorImage: hideAuthorImage
|
|
4210
|
-
}), /*#__PURE__*/
|
|
4221
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
4211
4222
|
story: story
|
|
4212
4223
|
})));
|
|
4213
4224
|
};
|
|
4214
4225
|
|
|
4215
4226
|
DefaultStoryCard.propTypes = {
|
|
4216
|
-
story:
|
|
4217
|
-
border:
|
|
4218
|
-
isBottom:
|
|
4219
|
-
isHorizontal:
|
|
4220
|
-
aspectRatio:
|
|
4221
|
-
isHorizontalMobile:
|
|
4222
|
-
centerAlign:
|
|
4223
|
-
headerLevel:
|
|
4224
|
-
borderColor:
|
|
4225
|
-
hideAuthorImage:
|
|
4226
|
-
prefix:
|
|
4227
|
-
config:
|
|
4228
|
-
isHorizontalWithImageLast:
|
|
4227
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4228
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4229
|
+
isBottom: PropTypes__default["default"].bool,
|
|
4230
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4231
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4232
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4233
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4234
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4235
|
+
borderColor: PropTypes__default["default"].string,
|
|
4236
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4237
|
+
prefix: PropTypes__default["default"].string,
|
|
4238
|
+
config: PropTypes__default["default"].object,
|
|
4239
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4229
4240
|
};
|
|
4230
4241
|
StoryCard.propTypes = {
|
|
4231
4242
|
/** The Story Object from the API response */
|
|
4232
|
-
story:
|
|
4233
|
-
children:
|
|
4243
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4244
|
+
children: PropTypes__default["default"].node,
|
|
4234
4245
|
|
|
4235
4246
|
/** Flip the Story Card to Horizonal mode */
|
|
4236
|
-
isHorizontal:
|
|
4247
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4237
4248
|
|
|
4238
4249
|
/** Add border to the Story Card */
|
|
4239
|
-
border:
|
|
4250
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4240
4251
|
// story card with background image
|
|
4241
|
-
useImageAsBackground:
|
|
4252
|
+
useImageAsBackground: PropTypes__default["default"].bool,
|
|
4242
4253
|
// story card content overlap with image
|
|
4243
|
-
bgImgContentOverlap:
|
|
4254
|
+
bgImgContentOverlap: PropTypes__default["default"].bool,
|
|
4244
4255
|
|
|
4245
4256
|
/** add aspect ratio for hero image */
|
|
4246
|
-
aspectRatio:
|
|
4257
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4247
4258
|
|
|
4248
4259
|
/** add theme(dark /light/custom color) for storycard */
|
|
4249
|
-
theme:
|
|
4260
|
+
theme: PropTypes__default["default"].string,
|
|
4250
4261
|
|
|
4251
4262
|
/** flip the story card mobile design horizontal */
|
|
4252
|
-
isHorizontalMobile:
|
|
4263
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4253
4264
|
// make content center align in desktop and left align in mobile
|
|
4254
|
-
centerAlign:
|
|
4255
|
-
headerLevel:
|
|
4256
|
-
borderColor:
|
|
4265
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4266
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4267
|
+
borderColor: PropTypes__default["default"].string,
|
|
4257
4268
|
// handle author image through storycard
|
|
4258
|
-
hideAuthorImage:
|
|
4269
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4259
4270
|
// handle author prefix through storycard
|
|
4260
|
-
prefix:
|
|
4261
|
-
config:
|
|
4262
|
-
isHorizontalWithImageLast:
|
|
4271
|
+
prefix: PropTypes__default["default"].string,
|
|
4272
|
+
config: PropTypes__default["default"].object,
|
|
4273
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4263
4274
|
};
|
|
4264
4275
|
StoryCard.defaultProps = {
|
|
4265
4276
|
isHorizontal: false,
|
|
@@ -4292,14 +4303,14 @@ var StorycardContent = function StorycardContent(_ref) {
|
|
|
4292
4303
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4293
4304
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : "";
|
|
4294
4305
|
var horizontalCard = isHorizontalMobile ? "horizontal-content-wrapper" : "";
|
|
4295
|
-
return /*#__PURE__*/
|
|
4306
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4296
4307
|
"data-test-id": "story-card-content",
|
|
4297
4308
|
style: {
|
|
4298
4309
|
backgroundColor: theme,
|
|
4299
4310
|
color: textColor
|
|
4300
4311
|
},
|
|
4301
4312
|
className: "arr--content-wrapper " + _getClassName("wrapper ".concat(borderTemplate, " ").concat(horizontalCard), _styleModuleImportMap$1)
|
|
4302
|
-
}, children || /*#__PURE__*/
|
|
4313
|
+
}, children || /*#__PURE__*/React__default["default"].createElement(DefaultStoryCardContent, {
|
|
4303
4314
|
story: story,
|
|
4304
4315
|
headerLevel: headerLevel,
|
|
4305
4316
|
isHorizontalMobile: isHorizontalMobile,
|
|
@@ -4317,57 +4328,57 @@ var DefaultStoryCardContent = function DefaultStoryCardContent(_ref2) {
|
|
|
4317
4328
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4318
4329
|
var _config$localizationC = config.localizationConfig,
|
|
4319
4330
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4320
|
-
return /*#__PURE__*/
|
|
4331
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4321
4332
|
story: story,
|
|
4322
4333
|
borderColor: SectionTagborderColor
|
|
4323
|
-
}), /*#__PURE__*/
|
|
4334
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4324
4335
|
story: story,
|
|
4325
4336
|
headerLevel: headerLevel,
|
|
4326
4337
|
premiumStoryIconConfig: config
|
|
4327
|
-
}), /*#__PURE__*/
|
|
4338
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4328
4339
|
config: localizationConfig,
|
|
4329
4340
|
story: story
|
|
4330
4341
|
}));
|
|
4331
4342
|
};
|
|
4332
4343
|
|
|
4333
4344
|
DefaultStoryCardContent.propTypes = {
|
|
4334
|
-
story:
|
|
4335
|
-
border:
|
|
4336
|
-
theme:
|
|
4337
|
-
isHorizontalMobile:
|
|
4338
|
-
headerLevel:
|
|
4339
|
-
borderColor:
|
|
4340
|
-
config:
|
|
4345
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4346
|
+
border: PropTypes__default["default"].string,
|
|
4347
|
+
theme: PropTypes__default["default"].string,
|
|
4348
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4349
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4350
|
+
borderColor: PropTypes__default["default"].string,
|
|
4351
|
+
config: PropTypes__default["default"].object
|
|
4341
4352
|
};
|
|
4342
4353
|
StorycardContent.propTypes = {
|
|
4343
|
-
story:
|
|
4344
|
-
children:
|
|
4345
|
-
theme:
|
|
4346
|
-
border:
|
|
4347
|
-
isHorizontalMobile:
|
|
4348
|
-
headerLevel:
|
|
4349
|
-
borderColor:
|
|
4350
|
-
config:
|
|
4354
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4355
|
+
children: PropTypes__default["default"].node,
|
|
4356
|
+
theme: PropTypes__default["default"].string,
|
|
4357
|
+
border: PropTypes__default["default"].string,
|
|
4358
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4359
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4360
|
+
borderColor: PropTypes__default["default"].string,
|
|
4361
|
+
config: PropTypes__default["default"].object
|
|
4351
4362
|
};
|
|
4352
4363
|
|
|
4353
4364
|
var Loading = function Loading(_ref) {
|
|
4354
4365
|
_ref.width;
|
|
4355
4366
|
_ref.height;
|
|
4356
4367
|
_ref.iconColor;
|
|
4357
|
-
return /*#__PURE__*/
|
|
4368
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4358
4369
|
className: "loading-m_loading-indicator__2Dlst"
|
|
4359
|
-
}, /*#__PURE__*/
|
|
4370
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
4360
4371
|
width: "40",
|
|
4361
4372
|
height: "40",
|
|
4362
4373
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4363
4374
|
viewBox: "0 0 100 100",
|
|
4364
4375
|
preserveAspectRatio: "xMidYMid"
|
|
4365
|
-
}, /*#__PURE__*/
|
|
4376
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
4366
4377
|
cx: "84",
|
|
4367
4378
|
cy: "50",
|
|
4368
4379
|
r: "0",
|
|
4369
4380
|
fill: "currentColor"
|
|
4370
|
-
}, /*#__PURE__*/
|
|
4381
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4371
4382
|
attributeName: "r",
|
|
4372
4383
|
values: "10;0;0;0;0",
|
|
4373
4384
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4376,7 +4387,7 @@ var Loading = function Loading(_ref) {
|
|
|
4376
4387
|
dur: "2s",
|
|
4377
4388
|
repeatCount: "indefinite",
|
|
4378
4389
|
begin: "0s"
|
|
4379
|
-
}), /*#__PURE__*/
|
|
4390
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4380
4391
|
attributeName: "cx",
|
|
4381
4392
|
values: "84;84;84;84;84",
|
|
4382
4393
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4385,12 +4396,12 @@ var Loading = function Loading(_ref) {
|
|
|
4385
4396
|
dur: "2s",
|
|
4386
4397
|
repeatCount: "indefinite",
|
|
4387
4398
|
begin: "0s"
|
|
4388
|
-
})), /*#__PURE__*/
|
|
4399
|
+
})), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
4389
4400
|
cx: "84",
|
|
4390
4401
|
cy: "50",
|
|
4391
4402
|
r: ".709",
|
|
4392
4403
|
fill: "currentColor"
|
|
4393
|
-
}, /*#__PURE__*/
|
|
4404
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4394
4405
|
attributeName: "r",
|
|
4395
4406
|
values: "0;10;10;10;0",
|
|
4396
4407
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4399,7 +4410,7 @@ var Loading = function Loading(_ref) {
|
|
|
4399
4410
|
dur: "2s",
|
|
4400
4411
|
repeatCount: "indefinite",
|
|
4401
4412
|
begin: "-1s"
|
|
4402
|
-
}), /*#__PURE__*/
|
|
4413
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4403
4414
|
attributeName: "cx",
|
|
4404
4415
|
values: "16;16;50;84;84",
|
|
4405
4416
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4408,12 +4419,12 @@ var Loading = function Loading(_ref) {
|
|
|
4408
4419
|
dur: "2s",
|
|
4409
4420
|
repeatCount: "indefinite",
|
|
4410
4421
|
begin: "-1s"
|
|
4411
|
-
})), /*#__PURE__*/
|
|
4422
|
+
})), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
4412
4423
|
cx: "81.59",
|
|
4413
4424
|
cy: "50",
|
|
4414
4425
|
r: "10",
|
|
4415
4426
|
fill: "currentColor"
|
|
4416
|
-
}, /*#__PURE__*/
|
|
4427
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4417
4428
|
attributeName: "r",
|
|
4418
4429
|
values: "0;10;10;10;0",
|
|
4419
4430
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4422,7 +4433,7 @@ var Loading = function Loading(_ref) {
|
|
|
4422
4433
|
dur: "2s",
|
|
4423
4434
|
repeatCount: "indefinite",
|
|
4424
4435
|
begin: "-0.5s"
|
|
4425
|
-
}), /*#__PURE__*/
|
|
4436
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4426
4437
|
attributeName: "cx",
|
|
4427
4438
|
values: "16;16;50;84;84",
|
|
4428
4439
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4431,12 +4442,12 @@ var Loading = function Loading(_ref) {
|
|
|
4431
4442
|
dur: "2s",
|
|
4432
4443
|
repeatCount: "indefinite",
|
|
4433
4444
|
begin: "-0.5s"
|
|
4434
|
-
})), /*#__PURE__*/
|
|
4445
|
+
})), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
4435
4446
|
cx: "47.59",
|
|
4436
4447
|
cy: "50",
|
|
4437
4448
|
r: "10",
|
|
4438
4449
|
fill: "currentColor"
|
|
4439
|
-
}, /*#__PURE__*/
|
|
4450
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4440
4451
|
attributeName: "r",
|
|
4441
4452
|
values: "0;10;10;10;0",
|
|
4442
4453
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4445,7 +4456,7 @@ var Loading = function Loading(_ref) {
|
|
|
4445
4456
|
dur: "2s",
|
|
4446
4457
|
repeatCount: "indefinite",
|
|
4447
4458
|
begin: "0s"
|
|
4448
|
-
}), /*#__PURE__*/
|
|
4459
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4449
4460
|
attributeName: "cx",
|
|
4450
4461
|
values: "16;16;50;84;84",
|
|
4451
4462
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4454,12 +4465,12 @@ var Loading = function Loading(_ref) {
|
|
|
4454
4465
|
dur: "2s",
|
|
4455
4466
|
repeatCount: "indefinite",
|
|
4456
4467
|
begin: "0s"
|
|
4457
|
-
})), /*#__PURE__*/
|
|
4468
|
+
})), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
4458
4469
|
cx: "16",
|
|
4459
4470
|
cy: "50",
|
|
4460
4471
|
r: "9.291",
|
|
4461
4472
|
fill: "currentColor"
|
|
4462
|
-
}, /*#__PURE__*/
|
|
4473
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4463
4474
|
attributeName: "r",
|
|
4464
4475
|
values: "0;0;10;10;10",
|
|
4465
4476
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4468,7 +4479,7 @@ var Loading = function Loading(_ref) {
|
|
|
4468
4479
|
dur: "2s",
|
|
4469
4480
|
repeatCount: "indefinite",
|
|
4470
4481
|
begin: "0s"
|
|
4471
|
-
}), /*#__PURE__*/
|
|
4482
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4472
4483
|
attributeName: "cx",
|
|
4473
4484
|
values: "16;16;16;50;84",
|
|
4474
4485
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4480,9 +4491,9 @@ var Loading = function Loading(_ref) {
|
|
|
4480
4491
|
}))));
|
|
4481
4492
|
};
|
|
4482
4493
|
Loading.propTypes = {
|
|
4483
|
-
width:
|
|
4484
|
-
height:
|
|
4485
|
-
iconColor:
|
|
4494
|
+
width: PropTypes__default["default"].object,
|
|
4495
|
+
height: PropTypes__default["default"].object,
|
|
4496
|
+
iconColor: PropTypes__default["default"].object
|
|
4486
4497
|
};
|
|
4487
4498
|
|
|
4488
4499
|
var _styleModuleImportMap = {
|
|
@@ -4539,22 +4550,22 @@ var CollectionFilterBase = function CollectionFilterBase(_ref) {
|
|
|
4539
4550
|
|
|
4540
4551
|
var footerSlot = footerSlotConfig.footerSlot;
|
|
4541
4552
|
|
|
4542
|
-
var _useState = useState([]),
|
|
4553
|
+
var _useState = React.useState([]),
|
|
4543
4554
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4544
4555
|
subCollectionStories = _useState2[0],
|
|
4545
4556
|
handleApiData = _useState2[1];
|
|
4546
4557
|
|
|
4547
|
-
var _useState3 = useState({}),
|
|
4558
|
+
var _useState3 = React.useState({}),
|
|
4548
4559
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
4549
4560
|
cachedStories = _useState4[0],
|
|
4550
4561
|
updateCachedStories = _useState4[1];
|
|
4551
4562
|
|
|
4552
|
-
var _useState5 = useState(0),
|
|
4563
|
+
var _useState5 = React.useState(0),
|
|
4553
4564
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
4554
4565
|
active = _useState6[0],
|
|
4555
4566
|
handleActive = _useState6[1];
|
|
4556
4567
|
|
|
4557
|
-
var _useState7 = useState(true),
|
|
4568
|
+
var _useState7 = React.useState(true),
|
|
4558
4569
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
4559
4570
|
loading = _useState8[0],
|
|
4560
4571
|
handleLoading = _useState8[1];
|
|
@@ -4603,7 +4614,7 @@ var CollectionFilterBase = function CollectionFilterBase(_ref) {
|
|
|
4603
4614
|
}
|
|
4604
4615
|
|
|
4605
4616
|
_context.next = 7;
|
|
4606
|
-
return
|
|
4617
|
+
return axios__default["default"].get("/api/v1/collections/".concat(id));
|
|
4607
4618
|
|
|
4608
4619
|
case 7:
|
|
4609
4620
|
res = _context.sent;
|
|
@@ -4616,7 +4627,7 @@ var CollectionFilterBase = function CollectionFilterBase(_ref) {
|
|
|
4616
4627
|
|
|
4617
4628
|
case 12:
|
|
4618
4629
|
memoizeStories(id, data);
|
|
4619
|
-
childCollectionItems = collectionToStories(data);
|
|
4630
|
+
childCollectionItems = components.collectionToStories(data);
|
|
4620
4631
|
handleLoading(false);
|
|
4621
4632
|
handleApiData(childCollectionItems);
|
|
4622
4633
|
_context.next = 21;
|
|
@@ -4638,11 +4649,11 @@ var CollectionFilterBase = function CollectionFilterBase(_ref) {
|
|
|
4638
4649
|
return _fetchSubCollectionData.apply(this, arguments);
|
|
4639
4650
|
}
|
|
4640
4651
|
|
|
4641
|
-
useEffect(function (id) {
|
|
4652
|
+
React.useEffect(function (id) {
|
|
4642
4653
|
fetchSubCollectionData(id);
|
|
4643
4654
|
}, []);
|
|
4644
|
-
var dispatch = useDispatch();
|
|
4645
|
-
var qtConfig = useSelector(function (state) {
|
|
4655
|
+
var dispatch = reactRedux.useDispatch();
|
|
4656
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
4646
4657
|
return get_1(state, ["qt", "config"], {});
|
|
4647
4658
|
});
|
|
4648
4659
|
var url = generateNavigateSlug(getFilteredCollection[active], qtConfig);
|
|
@@ -4657,20 +4668,20 @@ var CollectionFilterBase = function CollectionFilterBase(_ref) {
|
|
|
4657
4668
|
};
|
|
4658
4669
|
|
|
4659
4670
|
var getVerticalCard = function getVerticalCard(story, index) {
|
|
4660
|
-
return /*#__PURE__*/
|
|
4671
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4661
4672
|
className: "collection-filter-m_card__2IOTX",
|
|
4662
4673
|
key: index
|
|
4663
|
-
}, /*#__PURE__*/
|
|
4674
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4664
4675
|
story: story,
|
|
4665
4676
|
isHorizontalMobile: true,
|
|
4666
4677
|
theme: theme,
|
|
4667
4678
|
border: border,
|
|
4668
4679
|
borderColor: borderColor,
|
|
4669
4680
|
config: config
|
|
4670
|
-
}, /*#__PURE__*/
|
|
4681
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4671
4682
|
story: story,
|
|
4672
4683
|
isHorizontalMobile: true
|
|
4673
|
-
}), /*#__PURE__*/
|
|
4684
|
+
}), /*#__PURE__*/React__default["default"].createElement(StorycardContent, {
|
|
4674
4685
|
story: story,
|
|
4675
4686
|
border: border,
|
|
4676
4687
|
borderColor: borderColor,
|
|
@@ -4679,21 +4690,21 @@ var CollectionFilterBase = function CollectionFilterBase(_ref) {
|
|
|
4679
4690
|
};
|
|
4680
4691
|
|
|
4681
4692
|
var getHorizontalCard = function getHorizontalCard(story, index) {
|
|
4682
|
-
return /*#__PURE__*/
|
|
4693
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4683
4694
|
className: "collection-filter-m_card__2IOTX",
|
|
4684
4695
|
key: index
|
|
4685
|
-
}, /*#__PURE__*/
|
|
4696
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4686
4697
|
story: story,
|
|
4687
4698
|
isHorizontal: true,
|
|
4688
4699
|
theme: theme,
|
|
4689
4700
|
border: border,
|
|
4690
4701
|
borderColor: borderColor,
|
|
4691
4702
|
config: config
|
|
4692
|
-
}, /*#__PURE__*/
|
|
4703
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4693
4704
|
story: story,
|
|
4694
4705
|
isHorizontal: true,
|
|
4695
4706
|
aspectRatio: [[1, 1]]
|
|
4696
|
-
}), /*#__PURE__*/
|
|
4707
|
+
}), /*#__PURE__*/React__default["default"].createElement(StorycardContent, {
|
|
4697
4708
|
story: story,
|
|
4698
4709
|
isHorizontal: true,
|
|
4699
4710
|
border: border,
|
|
@@ -4703,22 +4714,22 @@ var CollectionFilterBase = function CollectionFilterBase(_ref) {
|
|
|
4703
4714
|
};
|
|
4704
4715
|
|
|
4705
4716
|
var storySlot = function storySlot(items) {
|
|
4706
|
-
return /*#__PURE__*/
|
|
4707
|
-
return /*#__PURE__*/
|
|
4717
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, items.slice(6, 9).map(function (story, index) {
|
|
4718
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4708
4719
|
className: "collection-filter-m_card__2IOTX",
|
|
4709
4720
|
key: index
|
|
4710
|
-
}, /*#__PURE__*/
|
|
4721
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4711
4722
|
story: story,
|
|
4712
4723
|
isHorizontal: true,
|
|
4713
4724
|
theme: theme,
|
|
4714
4725
|
border: border,
|
|
4715
4726
|
borderColor: borderColor,
|
|
4716
4727
|
config: config
|
|
4717
|
-
}, /*#__PURE__*/
|
|
4728
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4718
4729
|
story: story,
|
|
4719
4730
|
isHorizontal: true,
|
|
4720
4731
|
aspectRatio: [[1, 1]]
|
|
4721
|
-
}), /*#__PURE__*/
|
|
4732
|
+
}), /*#__PURE__*/React__default["default"].createElement(StorycardContent, {
|
|
4722
4733
|
story: story,
|
|
4723
4734
|
border: border,
|
|
4724
4735
|
borderColor: borderColor,
|
|
@@ -4728,74 +4739,74 @@ var CollectionFilterBase = function CollectionFilterBase(_ref) {
|
|
|
4728
4739
|
};
|
|
4729
4740
|
|
|
4730
4741
|
var footerSlotComp = footerSlot ? footerSlot() : null;
|
|
4731
|
-
return /*#__PURE__*/
|
|
4742
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4732
4743
|
className: "full-width-with-padding arrow-component",
|
|
4733
4744
|
"data-test-id": "collection-filter",
|
|
4734
4745
|
style: {
|
|
4735
4746
|
backgroundColor: theme,
|
|
4736
4747
|
color: textColor
|
|
4737
4748
|
}
|
|
4738
|
-
}, /*#__PURE__*/
|
|
4749
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4739
4750
|
className: "collection-filter-m_wrapper__3Nx_h"
|
|
4740
|
-
}, /*#__PURE__*/
|
|
4751
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4741
4752
|
collection: collection,
|
|
4742
4753
|
collectionNameTemplate: collectionNameTemplate,
|
|
4743
4754
|
collectionNameBorderColor: collectionNameBorderColor
|
|
4744
|
-
}), /*#__PURE__*/
|
|
4755
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4745
4756
|
className: "collection-filter-m_collection-filter__3At2n"
|
|
4746
|
-
}, /*#__PURE__*/
|
|
4757
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4747
4758
|
className: "collection-filter-m_child-collections__2-FiJ"
|
|
4748
4759
|
}, getFilteredCollection.map(function (subCollections, index) {
|
|
4749
|
-
return /*#__PURE__*/
|
|
4760
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4750
4761
|
key: index,
|
|
4751
4762
|
className: _getClassName("child-collection-wrapper ".concat(index === active ? "open-subchild" : ""), _styleModuleImportMap)
|
|
4752
|
-
}, /*#__PURE__*/
|
|
4763
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4753
4764
|
onClick: function onClick(event) {
|
|
4754
4765
|
return openChildCollectionItems(event, index, subCollections.id);
|
|
4755
4766
|
},
|
|
4756
4767
|
className: _getClassName("child-collection ".concat(textColor), _styleModuleImportMap)
|
|
4757
|
-
}, subCollections.name), /*#__PURE__*/
|
|
4768
|
+
}, subCollections.name), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4758
4769
|
className: _getClassName("navigator ".concat(textColor), _styleModuleImportMap)
|
|
4759
4770
|
}));
|
|
4760
|
-
})), /*#__PURE__*/
|
|
4771
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4761
4772
|
className: _getClassName("divider ".concat(textColor), _styleModuleImportMap)
|
|
4762
|
-
}), /*#__PURE__*/
|
|
4773
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4763
4774
|
className: "collection-filter-m_subCollection-wrapper__14azF"
|
|
4764
|
-
}, loading ? /*#__PURE__*/
|
|
4775
|
+
}, loading ? /*#__PURE__*/React__default["default"].createElement(Loading, null) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4765
4776
|
className: "collection-filter-m_subCollection-stories__2RDkI"
|
|
4766
|
-
}, /*#__PURE__*/
|
|
4777
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4767
4778
|
className: "collection-filter-m_cards__1Co_7"
|
|
4768
4779
|
}, items.slice(0, 1).map(function (story, index) {
|
|
4769
|
-
return /*#__PURE__*/
|
|
4780
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4770
4781
|
className: "collection-filter-m_card__2IOTX",
|
|
4771
4782
|
key: index
|
|
4772
|
-
}, /*#__PURE__*/
|
|
4783
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4773
4784
|
story: story,
|
|
4774
4785
|
border: border,
|
|
4775
4786
|
theme: theme,
|
|
4776
4787
|
config: config
|
|
4777
|
-
}, /*#__PURE__*/
|
|
4788
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4778
4789
|
story: story,
|
|
4779
4790
|
aspectRatio: [[16, 9]]
|
|
4780
|
-
}), /*#__PURE__*/
|
|
4791
|
+
}), /*#__PURE__*/React__default["default"].createElement(StorycardContent, {
|
|
4781
4792
|
story: story,
|
|
4782
4793
|
border: border,
|
|
4783
4794
|
borderColor: borderColor,
|
|
4784
4795
|
config: config
|
|
4785
4796
|
})));
|
|
4786
4797
|
}), items.slice(1, 4).map(function (story, index) {
|
|
4787
|
-
return /*#__PURE__*/
|
|
4798
|
+
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, {
|
|
4788
4799
|
key: index
|
|
4789
4800
|
}, getVerticalCard(story, index));
|
|
4790
|
-
})), /*#__PURE__*/
|
|
4801
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4791
4802
|
className: "collection-filter-m_last-column__UP63_"
|
|
4792
4803
|
}, items.slice(4, 6).map(function (story, index) {
|
|
4793
|
-
return /*#__PURE__*/
|
|
4804
|
+
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, {
|
|
4794
4805
|
key: index
|
|
4795
4806
|
}, getHorizontalCard(story, index));
|
|
4796
4807
|
}), getSlot(type, component, function () {
|
|
4797
4808
|
return storySlot(items);
|
|
4798
|
-
}))))), /*#__PURE__*/
|
|
4809
|
+
}))))), /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
4799
4810
|
collection: getFilteredCollection[active],
|
|
4800
4811
|
template: footerButton,
|
|
4801
4812
|
config: config,
|
|
@@ -4807,21 +4818,21 @@ var CollectionFilterBase = function CollectionFilterBase(_ref) {
|
|
|
4807
4818
|
};
|
|
4808
4819
|
CollectionFilterBase.propTypes = {
|
|
4809
4820
|
/** collection is the array of objects which is returning by API */
|
|
4810
|
-
collection:
|
|
4821
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
4811
4822
|
|
|
4812
4823
|
/** The config for the Row */
|
|
4813
|
-
config:
|
|
4824
|
+
config: PropTypes__default["default"].shape({
|
|
4814
4825
|
// section tag border color
|
|
4815
|
-
borderColor:
|
|
4826
|
+
borderColor: PropTypes__default["default"].string,
|
|
4816
4827
|
// background color of the row
|
|
4817
|
-
theme:
|
|
4818
|
-
border:
|
|
4828
|
+
theme: PropTypes__default["default"].string,
|
|
4829
|
+
border: PropTypes__default["default"].string,
|
|
4819
4830
|
// configure ad slot widget and story
|
|
4820
|
-
slotConfig:
|
|
4821
|
-
collectionNameTemplate:
|
|
4822
|
-
footerSlotConfig:
|
|
4823
|
-
footerButton:
|
|
4824
|
-
collectionNameBorderColor:
|
|
4831
|
+
slotConfig: PropTypes__default["default"].array,
|
|
4832
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
4833
|
+
footerSlotConfig: PropTypes__default["default"].object,
|
|
4834
|
+
footerButton: PropTypes__default["default"].string,
|
|
4835
|
+
collectionNameBorderColor: PropTypes__default["default"].string
|
|
4825
4836
|
})
|
|
4826
4837
|
};
|
|
4827
4838
|
CollectionFilterBase.defaultProps = {
|
|
@@ -4831,4 +4842,5 @@ CollectionFilterBase.defaultProps = {
|
|
|
4831
4842
|
};
|
|
4832
4843
|
var CollectionFilter = StateProvider(CollectionFilterBase);
|
|
4833
4844
|
|
|
4834
|
-
|
|
4845
|
+
exports.CollectionFilter = CollectionFilter;
|
|
4846
|
+
exports.CollectionFilterBase = CollectionFilterBase;
|