@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) {
|
|
@@ -2790,15 +2801,15 @@ var isEmpty = function isEmpty(value) {
|
|
|
2790
2801
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2791
2802
|
_typeof(value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2792
2803
|
};
|
|
2793
|
-
|
|
2794
|
-
"sketches-host":
|
|
2795
|
-
"cdn-name":
|
|
2796
|
-
"cdn-image":
|
|
2804
|
+
PropTypes__default["default"].shape({
|
|
2805
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2806
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2807
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2797
2808
|
});
|
|
2798
|
-
|
|
2799
|
-
headline:
|
|
2800
|
-
"last-published-at":
|
|
2801
|
-
subheadline:
|
|
2809
|
+
PropTypes__default["default"].shape({
|
|
2810
|
+
headline: PropTypes__default["default"].string,
|
|
2811
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2812
|
+
subheadline: PropTypes__default["default"].string
|
|
2802
2813
|
});
|
|
2803
2814
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2804
2815
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2842,17 +2853,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2842
2853
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2843
2854
|
|
|
2844
2855
|
if (timezone && template === "story") {
|
|
2845
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2846
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2856
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2857
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2847
2858
|
timeZone: timezone
|
|
2848
2859
|
});
|
|
2849
2860
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2850
|
-
return /*#__PURE__*/
|
|
2861
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2851
2862
|
dateTime: formatZonedTime
|
|
2852
2863
|
}, timeStamp);
|
|
2853
2864
|
}
|
|
2854
2865
|
|
|
2855
|
-
return /*#__PURE__*/
|
|
2866
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2856
2867
|
date: date,
|
|
2857
2868
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2858
2869
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2896,7 +2907,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2896
2907
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
2897
2908
|
|
|
2898
2909
|
var borderBottomStyle = function borderBottomStyle() {
|
|
2899
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
2910
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2900
2911
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
2901
2912
|
style: {
|
|
2902
2913
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -2956,40 +2967,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2956
2967
|
}
|
|
2957
2968
|
};
|
|
2958
2969
|
|
|
2959
|
-
return /*#__PURE__*/
|
|
2970
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2960
2971
|
style: {
|
|
2961
2972
|
borderBottom: borderBottomFullStyle
|
|
2962
2973
|
},
|
|
2963
2974
|
"data-test-id": "collection-name",
|
|
2964
2975
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$e)
|
|
2965
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
2976
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2966
2977
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
2967
2978
|
style: {
|
|
2968
2979
|
color: CollectionNameBorderColor,
|
|
2969
2980
|
fontSize: getBorderHeight()
|
|
2970
2981
|
}
|
|
2971
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
2982
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2972
2983
|
href: slug,
|
|
2973
2984
|
"aria-label": "collection-name"
|
|
2974
|
-
}, /*#__PURE__*/
|
|
2985
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
2975
2986
|
};
|
|
2976
2987
|
CollectionNameBase.propTypes = {
|
|
2977
2988
|
/** Collection name border color */
|
|
2978
|
-
collectionNameBorderColor: PropTypes
|
|
2989
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
2979
2990
|
|
|
2980
2991
|
/** The Collection Object from the API response */
|
|
2981
|
-
collection: PropTypes
|
|
2992
|
+
collection: PropTypes.PropTypes.object,
|
|
2982
2993
|
|
|
2983
2994
|
/** The publisher config from the API response */
|
|
2984
|
-
config: PropTypes
|
|
2995
|
+
config: PropTypes.PropTypes.object,
|
|
2985
2996
|
|
|
2986
2997
|
/** The style template for the component */
|
|
2987
|
-
collectionNameTemplate: PropTypes
|
|
2998
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
2988
2999
|
|
|
2989
3000
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
2990
|
-
headerLevel: PropTypes
|
|
2991
|
-
customCollectionName: PropTypes
|
|
2992
|
-
navigate: PropTypes
|
|
3001
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
3002
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
3003
|
+
navigate: PropTypes.PropTypes.bool
|
|
2993
3004
|
};
|
|
2994
3005
|
CollectionNameBase.defaultProps = {
|
|
2995
3006
|
collectionNameTemplate: "",
|
|
@@ -3002,7 +3013,7 @@ function mapStateToProps$1(state) {
|
|
|
3002
3013
|
};
|
|
3003
3014
|
}
|
|
3004
3015
|
|
|
3005
|
-
var CollectionName = connect(mapStateToProps$1)(CollectionNameBase);
|
|
3016
|
+
var CollectionName = reactRedux.connect(mapStateToProps$1)(CollectionNameBase);
|
|
3006
3017
|
|
|
3007
3018
|
var _styleModuleImportMap$d = {
|
|
3008
3019
|
"./load-more.m.css": {
|
|
@@ -3036,26 +3047,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
3036
3047
|
if (!showButton) return null;
|
|
3037
3048
|
var textColor = getTextColor(theme);
|
|
3038
3049
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread$1(_objectSpread$1({}, qtConfig), config));
|
|
3039
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
3050
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3040
3051
|
onClick: onClick,
|
|
3041
3052
|
"data-test-id": "load-more",
|
|
3042
3053
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$d)
|
|
3043
|
-
}, buttonText) : /*#__PURE__*/
|
|
3054
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
3044
3055
|
href: slug,
|
|
3045
3056
|
navigateTo: navigate,
|
|
3046
3057
|
"data-test-id": "load-more",
|
|
3047
3058
|
"aria-label": "load-more"
|
|
3048
|
-
}, /*#__PURE__*/
|
|
3059
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3049
3060
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$d)
|
|
3050
3061
|
}, buttonText));
|
|
3051
3062
|
};
|
|
3052
3063
|
LoadmoreButton.propTypes = {
|
|
3053
|
-
collection:
|
|
3054
|
-
template:
|
|
3055
|
-
config:
|
|
3056
|
-
onClick:
|
|
3057
|
-
navigate:
|
|
3058
|
-
qtConfig:
|
|
3064
|
+
collection: PropTypes__default["default"].object,
|
|
3065
|
+
template: PropTypes__default["default"].string,
|
|
3066
|
+
config: PropTypes__default["default"].object,
|
|
3067
|
+
onClick: PropTypes__default["default"].func,
|
|
3068
|
+
navigate: PropTypes__default["default"].func,
|
|
3069
|
+
qtConfig: PropTypes__default["default"].object
|
|
3059
3070
|
};
|
|
3060
3071
|
|
|
3061
3072
|
var CrownIcon = function CrownIcon(_ref) {
|
|
@@ -3064,7 +3075,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3064
3075
|
_ref$color = _ref.color,
|
|
3065
3076
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
3066
3077
|
positionTop = _ref.positionTop;
|
|
3067
|
-
return /*#__PURE__*/
|
|
3078
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3068
3079
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3069
3080
|
width: width,
|
|
3070
3081
|
height: height,
|
|
@@ -3073,28 +3084,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3073
3084
|
position: "relative",
|
|
3074
3085
|
top: positionTop
|
|
3075
3086
|
}
|
|
3076
|
-
}, /*#__PURE__*/
|
|
3087
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3077
3088
|
fill: "none",
|
|
3078
3089
|
fillRule: "evenodd",
|
|
3079
3090
|
stroke: "none",
|
|
3080
3091
|
strokeWidth: "1"
|
|
3081
|
-
}, /*#__PURE__*/
|
|
3092
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3082
3093
|
transform: "translate(8 8)"
|
|
3083
|
-
}, /*#__PURE__*/
|
|
3094
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3084
3095
|
d: "M0 0H24V24H0z"
|
|
3085
|
-
}), /*#__PURE__*/
|
|
3096
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3086
3097
|
fill: color,
|
|
3087
3098
|
fillRule: "nonzero",
|
|
3088
3099
|
transform: "translate(0 2)"
|
|
3089
|
-
}, /*#__PURE__*/
|
|
3100
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3090
3101
|
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"
|
|
3091
3102
|
}))))));
|
|
3092
3103
|
};
|
|
3093
3104
|
CrownIcon.propTypes = {
|
|
3094
|
-
height:
|
|
3095
|
-
width:
|
|
3096
|
-
color:
|
|
3097
|
-
positionTop:
|
|
3105
|
+
height: PropTypes__default["default"].string,
|
|
3106
|
+
width: PropTypes__default["default"].string,
|
|
3107
|
+
color: PropTypes__default["default"].string,
|
|
3108
|
+
positionTop: PropTypes__default["default"].string
|
|
3098
3109
|
};
|
|
3099
3110
|
|
|
3100
3111
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -3103,7 +3114,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3103
3114
|
_ref$color = _ref.color,
|
|
3104
3115
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3105
3116
|
positionTop = _ref.positionTop;
|
|
3106
|
-
return /*#__PURE__*/
|
|
3117
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3107
3118
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3108
3119
|
width: width,
|
|
3109
3120
|
height: height,
|
|
@@ -3112,16 +3123,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3112
3123
|
position: "relative",
|
|
3113
3124
|
top: positionTop
|
|
3114
3125
|
}
|
|
3115
|
-
}, /*#__PURE__*/
|
|
3126
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3116
3127
|
fill: "none",
|
|
3117
3128
|
fillRule: "evenodd",
|
|
3118
3129
|
stroke: "none",
|
|
3119
3130
|
strokeWidth: "1"
|
|
3120
|
-
}, /*#__PURE__*/
|
|
3131
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3121
3132
|
transform: "translate(8 8)"
|
|
3122
|
-
}, /*#__PURE__*/
|
|
3133
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3123
3134
|
d: "M0 0H24V24H0z"
|
|
3124
|
-
}), /*#__PURE__*/
|
|
3135
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3125
3136
|
fill: color,
|
|
3126
3137
|
fillRule: "nonzero",
|
|
3127
3138
|
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",
|
|
@@ -3129,10 +3140,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3129
3140
|
})))));
|
|
3130
3141
|
};
|
|
3131
3142
|
KeyIcon.propTypes = {
|
|
3132
|
-
height:
|
|
3133
|
-
width:
|
|
3134
|
-
color:
|
|
3135
|
-
positionTop:
|
|
3143
|
+
height: PropTypes__default["default"].string,
|
|
3144
|
+
width: PropTypes__default["default"].string,
|
|
3145
|
+
color: PropTypes__default["default"].string,
|
|
3146
|
+
positionTop: PropTypes__default["default"].string
|
|
3136
3147
|
};
|
|
3137
3148
|
|
|
3138
3149
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -3141,7 +3152,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3141
3152
|
_ref$color = _ref.color,
|
|
3142
3153
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3143
3154
|
positionTop = _ref.positionTop;
|
|
3144
|
-
return /*#__PURE__*/
|
|
3155
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3145
3156
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3146
3157
|
width: width,
|
|
3147
3158
|
height: height,
|
|
@@ -3150,28 +3161,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3150
3161
|
position: "relative",
|
|
3151
3162
|
top: positionTop
|
|
3152
3163
|
}
|
|
3153
|
-
}, /*#__PURE__*/
|
|
3164
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3154
3165
|
fill: "none",
|
|
3155
3166
|
fillRule: "evenodd",
|
|
3156
3167
|
stroke: "none",
|
|
3157
3168
|
strokeWidth: "1"
|
|
3158
|
-
}, /*#__PURE__*/
|
|
3169
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3159
3170
|
transform: "translate(8 8)"
|
|
3160
|
-
}, /*#__PURE__*/
|
|
3171
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3161
3172
|
d: "M0 0H24V24H0z"
|
|
3162
|
-
}), /*#__PURE__*/
|
|
3173
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3163
3174
|
fill: color,
|
|
3164
3175
|
fillRule: "nonzero",
|
|
3165
3176
|
transform: "translate(3)"
|
|
3166
|
-
}, /*#__PURE__*/
|
|
3177
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3167
3178
|
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"
|
|
3168
3179
|
}))))));
|
|
3169
3180
|
};
|
|
3170
3181
|
LockIcon.propTypes = {
|
|
3171
|
-
height:
|
|
3172
|
-
width:
|
|
3173
|
-
color:
|
|
3174
|
-
positionTop:
|
|
3182
|
+
height: PropTypes__default["default"].string,
|
|
3183
|
+
width: PropTypes__default["default"].string,
|
|
3184
|
+
color: PropTypes__default["default"].string,
|
|
3185
|
+
positionTop: PropTypes__default["default"].string
|
|
3175
3186
|
};
|
|
3176
3187
|
|
|
3177
3188
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -3181,7 +3192,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3181
3192
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3182
3193
|
_ref$positionTop = _ref.positionTop,
|
|
3183
3194
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
3184
|
-
return /*#__PURE__*/
|
|
3195
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3185
3196
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3186
3197
|
width: width,
|
|
3187
3198
|
height: height,
|
|
@@ -3190,21 +3201,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3190
3201
|
position: "relative",
|
|
3191
3202
|
top: positionTop
|
|
3192
3203
|
}
|
|
3193
|
-
}, /*#__PURE__*/
|
|
3204
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3194
3205
|
fill: "none",
|
|
3195
3206
|
fillRule: "evenodd",
|
|
3196
3207
|
stroke: "none",
|
|
3197
3208
|
strokeWidth: "1"
|
|
3198
|
-
}, /*#__PURE__*/
|
|
3209
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3199
3210
|
fill: color,
|
|
3200
3211
|
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"
|
|
3201
3212
|
}))));
|
|
3202
3213
|
};
|
|
3203
3214
|
StarIcon.propTypes = {
|
|
3204
|
-
height:
|
|
3205
|
-
width:
|
|
3206
|
-
color:
|
|
3207
|
-
positionTop:
|
|
3215
|
+
height: PropTypes__default["default"].string,
|
|
3216
|
+
width: PropTypes__default["default"].string,
|
|
3217
|
+
color: PropTypes__default["default"].string,
|
|
3218
|
+
positionTop: PropTypes__default["default"].string
|
|
3208
3219
|
};
|
|
3209
3220
|
|
|
3210
3221
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -3216,7 +3227,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3216
3227
|
|
|
3217
3228
|
switch (iconType) {
|
|
3218
3229
|
case "crown":
|
|
3219
|
-
return /*#__PURE__*/
|
|
3230
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
3220
3231
|
width: width,
|
|
3221
3232
|
height: height,
|
|
3222
3233
|
color: color,
|
|
@@ -3224,7 +3235,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3224
3235
|
});
|
|
3225
3236
|
|
|
3226
3237
|
case "lock":
|
|
3227
|
-
return /*#__PURE__*/
|
|
3238
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
3228
3239
|
width: width,
|
|
3229
3240
|
height: height,
|
|
3230
3241
|
color: color,
|
|
@@ -3232,7 +3243,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3232
3243
|
});
|
|
3233
3244
|
|
|
3234
3245
|
case "key":
|
|
3235
|
-
return /*#__PURE__*/
|
|
3246
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
3236
3247
|
width: width,
|
|
3237
3248
|
height: height,
|
|
3238
3249
|
color: color,
|
|
@@ -3240,7 +3251,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3240
3251
|
});
|
|
3241
3252
|
|
|
3242
3253
|
default:
|
|
3243
|
-
return /*#__PURE__*/
|
|
3254
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
3244
3255
|
width: width,
|
|
3245
3256
|
height: height,
|
|
3246
3257
|
color: color,
|
|
@@ -3249,21 +3260,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3249
3260
|
}
|
|
3250
3261
|
};
|
|
3251
3262
|
PremiumStoryIcon.propTypes = {
|
|
3252
|
-
width:
|
|
3253
|
-
height:
|
|
3254
|
-
color:
|
|
3255
|
-
iconType:
|
|
3256
|
-
positionTop:
|
|
3263
|
+
width: PropTypes__default["default"].string,
|
|
3264
|
+
height: PropTypes__default["default"].string,
|
|
3265
|
+
color: PropTypes__default["default"].string,
|
|
3266
|
+
iconType: PropTypes__default["default"].string,
|
|
3267
|
+
positionTop: PropTypes__default["default"].string
|
|
3257
3268
|
};
|
|
3258
3269
|
|
|
3259
3270
|
function LiveIcon() {
|
|
3260
|
-
return /*#__PURE__*/
|
|
3271
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3261
3272
|
className: "live-icon",
|
|
3262
3273
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3263
3274
|
width: "25",
|
|
3264
3275
|
height: "24",
|
|
3265
3276
|
viewBox: "0 0 25 24"
|
|
3266
|
-
}, /*#__PURE__*/
|
|
3277
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3267
3278
|
fill: "#ff5858",
|
|
3268
3279
|
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"
|
|
3269
3280
|
}));
|
|
@@ -3320,37 +3331,37 @@ var Headline = function Headline(_ref) {
|
|
|
3320
3331
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3321
3332
|
var iconSize = "24px";
|
|
3322
3333
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
3323
|
-
return /*#__PURE__*/
|
|
3334
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3324
3335
|
"data-test-id": "headline",
|
|
3325
3336
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$c)
|
|
3326
|
-
}, premiumStory && /*#__PURE__*/
|
|
3337
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3327
3338
|
width: iconSize,
|
|
3328
3339
|
height: iconSize,
|
|
3329
3340
|
color: iconColor,
|
|
3330
3341
|
iconType: iconStyle,
|
|
3331
3342
|
positionTop: positionHeadline()
|
|
3332
|
-
}), isLink ? /*#__PURE__*/
|
|
3343
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3333
3344
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3334
3345
|
externalLink: isExternalStory(story),
|
|
3335
3346
|
"aria-label": "headline"
|
|
3336
|
-
}, /*#__PURE__*/
|
|
3347
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3337
3348
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$c)
|
|
3338
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3349
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3339
3350
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$c)
|
|
3340
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3351
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3341
3352
|
};
|
|
3342
3353
|
Headline.propTypes = {
|
|
3343
3354
|
/** The Story Object from the API response */
|
|
3344
|
-
story:
|
|
3355
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3345
3356
|
|
|
3346
3357
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3347
|
-
headerLevel:
|
|
3348
|
-
premiumStoryIconConfig:
|
|
3349
|
-
iconColor:
|
|
3350
|
-
iconType:
|
|
3351
|
-
enablePremiumStoryIcon:
|
|
3358
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3359
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
3360
|
+
iconColor: PropTypes__default["default"].string,
|
|
3361
|
+
iconType: PropTypes__default["default"].string,
|
|
3362
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3352
3363
|
}),
|
|
3353
|
-
isLink:
|
|
3364
|
+
isLink: PropTypes__default["default"].bool
|
|
3354
3365
|
};
|
|
3355
3366
|
Headline.defaultProps = {
|
|
3356
3367
|
headerLevel: "6",
|
|
@@ -3377,7 +3388,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3377
3388
|
var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
|
|
3378
3389
|
if (!subheadline) return null;
|
|
3379
3390
|
var textColor = getTextColor(config.theme);
|
|
3380
|
-
return /*#__PURE__*/
|
|
3391
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3381
3392
|
style: {
|
|
3382
3393
|
WebkitLineClamp: lineClamp
|
|
3383
3394
|
},
|
|
@@ -3387,15 +3398,15 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3387
3398
|
};
|
|
3388
3399
|
Subheadline.propTypes = {
|
|
3389
3400
|
/** The Story Object from the API response */
|
|
3390
|
-
story:
|
|
3401
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3391
3402
|
// Restricts the number of lines for subheadline.
|
|
3392
|
-
lineClamp:
|
|
3403
|
+
lineClamp: PropTypes__default["default"].number,
|
|
3393
3404
|
|
|
3394
3405
|
/** Number of characters to truncate the subheadline */
|
|
3395
|
-
truncateChars:
|
|
3396
|
-
clazzName:
|
|
3397
|
-
forceShowAtom:
|
|
3398
|
-
showFullContent:
|
|
3406
|
+
truncateChars: PropTypes__default["default"].number,
|
|
3407
|
+
clazzName: PropTypes__default["default"].string,
|
|
3408
|
+
forceShowAtom: PropTypes__default["default"].bool,
|
|
3409
|
+
showFullContent: PropTypes__default["default"].bool
|
|
3399
3410
|
};
|
|
3400
3411
|
Subheadline.defaultProps = {
|
|
3401
3412
|
forceShowAtom: false,
|
|
@@ -3421,18 +3432,18 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3421
3432
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3422
3433
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3423
3434
|
var textColor = getTextColor(configState.theme);
|
|
3424
|
-
return /*#__PURE__*/
|
|
3435
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3425
3436
|
"data-test-id": "publish-time",
|
|
3426
3437
|
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$a)
|
|
3427
|
-
}, /*#__PURE__*/
|
|
3438
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3428
3439
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3429
3440
|
}, getTimeStamp(time, formatter, config))));
|
|
3430
3441
|
};
|
|
3431
3442
|
TimeStamp.propTypes = {
|
|
3432
3443
|
/** The Story Object from the API response */
|
|
3433
|
-
story:
|
|
3434
|
-
isBottom:
|
|
3435
|
-
config:
|
|
3444
|
+
story: PropTypes__default["default"].object,
|
|
3445
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3446
|
+
config: PropTypes__default["default"].object
|
|
3436
3447
|
};
|
|
3437
3448
|
|
|
3438
3449
|
var _styleModuleImportMap$9 = {
|
|
@@ -3475,10 +3486,10 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3475
3486
|
return null;
|
|
3476
3487
|
}
|
|
3477
3488
|
|
|
3478
|
-
return /*#__PURE__*/
|
|
3489
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3479
3490
|
"data-test-id": "author-image",
|
|
3480
3491
|
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$9)
|
|
3481
|
-
}, /*#__PURE__*/
|
|
3492
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3482
3493
|
slug: avatarS3Key,
|
|
3483
3494
|
"aspect-ratio": [1, 1],
|
|
3484
3495
|
defaultWidth: 400,
|
|
@@ -3486,14 +3497,14 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3486
3497
|
auto: ["format", "compress"]
|
|
3487
3498
|
},
|
|
3488
3499
|
alt: authorName
|
|
3489
|
-
}) : /*#__PURE__*/
|
|
3500
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3490
3501
|
src: avatarUrl
|
|
3491
3502
|
})));
|
|
3492
3503
|
};
|
|
3493
3504
|
|
|
3494
3505
|
var isPrefix = function isPrefix(dir) {
|
|
3495
3506
|
if (prefix) {
|
|
3496
|
-
return /*#__PURE__*/
|
|
3507
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3497
3508
|
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$9)
|
|
3498
3509
|
}, prefix);
|
|
3499
3510
|
}
|
|
@@ -3501,11 +3512,11 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3501
3512
|
return !hideAuthorImage && authorImage(dir);
|
|
3502
3513
|
};
|
|
3503
3514
|
|
|
3504
|
-
return /*#__PURE__*/
|
|
3515
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3505
3516
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3506
3517
|
"aria-label": "author-name",
|
|
3507
3518
|
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$9)
|
|
3508
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
3519
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3509
3520
|
"data-test-id": "author-name",
|
|
3510
3521
|
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$9)
|
|
3511
3522
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
@@ -3517,18 +3528,18 @@ function mapStateToProps(state) {
|
|
|
3517
3528
|
};
|
|
3518
3529
|
}
|
|
3519
3530
|
|
|
3520
|
-
var Author = connect(mapStateToProps)(AuthorBase);
|
|
3531
|
+
var Author = reactRedux.connect(mapStateToProps)(AuthorBase);
|
|
3521
3532
|
AuthorBase.propTypes = {
|
|
3522
3533
|
/** The Story Object from the API response */
|
|
3523
|
-
story:
|
|
3534
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3524
3535
|
|
|
3525
3536
|
/** Hide Author Avatar Image */
|
|
3526
|
-
hideAuthorImage:
|
|
3537
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3527
3538
|
// fix Author bottom of the storyCard
|
|
3528
|
-
isBottom:
|
|
3539
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3529
3540
|
// fix prefix before the author name
|
|
3530
|
-
prefix:
|
|
3531
|
-
config:
|
|
3541
|
+
prefix: PropTypes__default["default"].string,
|
|
3542
|
+
config: PropTypes__default["default"].object
|
|
3532
3543
|
};
|
|
3533
3544
|
AuthorBase.defaultProps = {
|
|
3534
3545
|
hideAuthorImage: false,
|
|
@@ -3549,14 +3560,14 @@ var Dot = function Dot(_ref) {
|
|
|
3549
3560
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3550
3561
|
_ref$color = _ref.color,
|
|
3551
3562
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3552
|
-
return /*#__PURE__*/
|
|
3563
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3553
3564
|
className: _getClassName(color, _styleModuleImportMap$8)
|
|
3554
|
-
}, /*#__PURE__*/
|
|
3565
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3555
3566
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3556
3567
|
width: width,
|
|
3557
3568
|
height: height,
|
|
3558
3569
|
viewBox: "0 0 3 3"
|
|
3559
|
-
}, /*#__PURE__*/
|
|
3570
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3560
3571
|
cx: "87",
|
|
3561
3572
|
cy: "9",
|
|
3562
3573
|
r: "1",
|
|
@@ -3567,9 +3578,9 @@ var Dot = function Dot(_ref) {
|
|
|
3567
3578
|
};
|
|
3568
3579
|
Dot.propTypes = {
|
|
3569
3580
|
/** height , width and color of the dot icon */
|
|
3570
|
-
color:
|
|
3571
|
-
width:
|
|
3572
|
-
height:
|
|
3581
|
+
color: PropTypes__default["default"].string,
|
|
3582
|
+
width: PropTypes__default["default"].string,
|
|
3583
|
+
height: PropTypes__default["default"].string
|
|
3573
3584
|
};
|
|
3574
3585
|
|
|
3575
3586
|
var _styleModuleImportMap$7 = {
|
|
@@ -3585,22 +3596,22 @@ var Divider = function Divider(_ref) {
|
|
|
3585
3596
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3586
3597
|
_ref$color = _ref.color,
|
|
3587
3598
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3588
|
-
return /*#__PURE__*/
|
|
3599
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3589
3600
|
className: _getClassName(color, _styleModuleImportMap$7)
|
|
3590
|
-
}, /*#__PURE__*/
|
|
3601
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3591
3602
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3592
3603
|
width: width,
|
|
3593
3604
|
height: height
|
|
3594
|
-
}, /*#__PURE__*/
|
|
3605
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3595
3606
|
fill: "inherit",
|
|
3596
3607
|
d: "M0 0h1v10H0z"
|
|
3597
3608
|
})));
|
|
3598
3609
|
};
|
|
3599
3610
|
Divider.propTypes = {
|
|
3600
3611
|
/** height , width and color of the dot icon */
|
|
3601
|
-
color:
|
|
3602
|
-
width:
|
|
3603
|
-
height:
|
|
3612
|
+
color: PropTypes__default["default"].string,
|
|
3613
|
+
width: PropTypes__default["default"].string,
|
|
3614
|
+
height: PropTypes__default["default"].string
|
|
3604
3615
|
};
|
|
3605
3616
|
|
|
3606
3617
|
var _styleModuleImportMap$6 = {
|
|
@@ -3623,23 +3634,23 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3623
3634
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3624
3635
|
if (!showReadTime || !readTime) return null;
|
|
3625
3636
|
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
3626
|
-
return /*#__PURE__*/
|
|
3637
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3627
3638
|
"data-test-id": "read-time",
|
|
3628
3639
|
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$6)
|
|
3629
|
-
}, /*#__PURE__*/
|
|
3640
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3630
3641
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3631
|
-
}, /*#__PURE__*/
|
|
3642
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3632
3643
|
color: textColor
|
|
3633
|
-
})), /*#__PURE__*/
|
|
3644
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3634
3645
|
};
|
|
3635
3646
|
ReadTime.propTypes = {
|
|
3636
|
-
story:
|
|
3637
|
-
"read-time":
|
|
3647
|
+
story: PropTypes__default["default"].shape({
|
|
3648
|
+
"read-time": PropTypes__default["default"].number
|
|
3638
3649
|
}),
|
|
3639
|
-
opts:
|
|
3640
|
-
showReadTime:
|
|
3650
|
+
opts: PropTypes__default["default"].shape({
|
|
3651
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3641
3652
|
}),
|
|
3642
|
-
isLightTheme:
|
|
3653
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3643
3654
|
};
|
|
3644
3655
|
|
|
3645
3656
|
var _styleModuleImportMap$5 = {
|
|
@@ -3670,33 +3681,33 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3670
3681
|
|
|
3671
3682
|
var getSeparator = function getSeparator() {
|
|
3672
3683
|
if (separator === "divider") {
|
|
3673
|
-
return /*#__PURE__*/
|
|
3684
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3674
3685
|
color: textColor
|
|
3675
3686
|
});
|
|
3676
3687
|
}
|
|
3677
3688
|
|
|
3678
|
-
return /*#__PURE__*/
|
|
3689
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3679
3690
|
color: textColor
|
|
3680
3691
|
});
|
|
3681
3692
|
};
|
|
3682
3693
|
|
|
3683
3694
|
var getTimeStamp = function getTimeStamp() {
|
|
3684
3695
|
if (!isTime) return null;
|
|
3685
|
-
return /*#__PURE__*/
|
|
3696
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3686
3697
|
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$5)
|
|
3687
|
-
}, getSeparator()), /*#__PURE__*/
|
|
3698
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3688
3699
|
story: story,
|
|
3689
3700
|
config: config
|
|
3690
|
-
}), isReadTime && /*#__PURE__*/
|
|
3701
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3691
3702
|
story: story,
|
|
3692
3703
|
opts: config,
|
|
3693
3704
|
isLightTheme: isLightTheme
|
|
3694
3705
|
}));
|
|
3695
3706
|
};
|
|
3696
3707
|
|
|
3697
|
-
return /*#__PURE__*/
|
|
3708
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3698
3709
|
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$5)
|
|
3699
|
-
}, isAuthor ? /*#__PURE__*/
|
|
3710
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3700
3711
|
story: story,
|
|
3701
3712
|
isBottom: true,
|
|
3702
3713
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3704,19 +3715,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3704
3715
|
}), getTimeStamp()) : getTimeStamp());
|
|
3705
3716
|
};
|
|
3706
3717
|
AuthorWithTime.propTypes = {
|
|
3707
|
-
story:
|
|
3718
|
+
story: PropTypes__default["default"].object,
|
|
3708
3719
|
|
|
3709
3720
|
/** Style of separator between the Author & Timestamp */
|
|
3710
|
-
separator:
|
|
3721
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3711
3722
|
|
|
3712
3723
|
/** hide the author image */
|
|
3713
|
-
hideAuthorImage:
|
|
3724
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3714
3725
|
// fix author and time at the end
|
|
3715
|
-
isBottom:
|
|
3726
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3716
3727
|
// fix prefix before the author name
|
|
3717
|
-
prefix:
|
|
3718
|
-
config:
|
|
3719
|
-
isLightTheme:
|
|
3728
|
+
prefix: PropTypes__default["default"].string,
|
|
3729
|
+
config: PropTypes__default["default"].object,
|
|
3730
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3720
3731
|
};
|
|
3721
3732
|
AuthorWithTime.defaultProps = {
|
|
3722
3733
|
separator: "dot",
|
|
@@ -3733,27 +3744,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3733
3744
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
3734
3745
|
_ref$iconColor = _ref.iconColor,
|
|
3735
3746
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
3736
|
-
return /*#__PURE__*/
|
|
3747
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3737
3748
|
width: width,
|
|
3738
3749
|
height: height,
|
|
3739
3750
|
viewBox: "0 0 102 76",
|
|
3740
3751
|
version: "1.1"
|
|
3741
|
-
}, /*#__PURE__*/
|
|
3752
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3742
3753
|
id: "demo-home-copy",
|
|
3743
3754
|
stroke: "none",
|
|
3744
3755
|
strokeWidth: "1",
|
|
3745
3756
|
fill: "none",
|
|
3746
3757
|
fillRule: "evenodd",
|
|
3747
3758
|
transform: "translate(-377.000000, -314.000000)"
|
|
3748
|
-
}, /*#__PURE__*/
|
|
3759
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3749
3760
|
id: "Group-13",
|
|
3750
3761
|
transform: "translate(377.000000, 314.000000)"
|
|
3751
|
-
}, /*#__PURE__*/
|
|
3762
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3752
3763
|
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",
|
|
3753
3764
|
id: "Combined-Shape",
|
|
3754
3765
|
fill: iconColor,
|
|
3755
3766
|
fillRule: "nonzero"
|
|
3756
|
-
}), /*#__PURE__*/
|
|
3767
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3757
3768
|
id: "Rectangle-19",
|
|
3758
3769
|
stroke: iconColor,
|
|
3759
3770
|
strokeWidth: "3",
|
|
@@ -3765,24 +3776,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3765
3776
|
}))));
|
|
3766
3777
|
};
|
|
3767
3778
|
ImageFallbackIcon.propTypes = {
|
|
3768
|
-
width:
|
|
3769
|
-
height:
|
|
3770
|
-
iconColor:
|
|
3779
|
+
width: PropTypes__default["default"].object,
|
|
3780
|
+
height: PropTypes__default["default"].object,
|
|
3781
|
+
iconColor: PropTypes__default["default"].object
|
|
3771
3782
|
};
|
|
3772
3783
|
|
|
3773
3784
|
var imageFallback = function imageFallback() {
|
|
3774
|
-
return /*#__PURE__*/
|
|
3785
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3775
3786
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
3776
|
-
}, /*#__PURE__*/
|
|
3787
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3777
3788
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
3778
|
-
}, /*#__PURE__*/
|
|
3789
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
3779
3790
|
};
|
|
3780
3791
|
|
|
3781
3792
|
var FallbackImage = function FallbackImage(_ref) {
|
|
3782
3793
|
var slug = _ref.slug;
|
|
3783
3794
|
|
|
3784
3795
|
if (slug) {
|
|
3785
|
-
return /*#__PURE__*/
|
|
3796
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3786
3797
|
href: slug,
|
|
3787
3798
|
"aria-label": "image-fallback"
|
|
3788
3799
|
}, imageFallback());
|
|
@@ -3791,23 +3802,23 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
3791
3802
|
}
|
|
3792
3803
|
};
|
|
3793
3804
|
FallbackImage.propTypes = {
|
|
3794
|
-
slug:
|
|
3805
|
+
slug: PropTypes__default["default"].string
|
|
3795
3806
|
};
|
|
3796
3807
|
|
|
3797
3808
|
var HyperLinkIcon = function HyperLinkIcon() {
|
|
3798
|
-
return /*#__PURE__*/
|
|
3809
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3799
3810
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3800
3811
|
width: "36",
|
|
3801
3812
|
height: "28"
|
|
3802
|
-
}, /*#__PURE__*/
|
|
3813
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3803
3814
|
fill: "none",
|
|
3804
3815
|
fillRule: "evenodd"
|
|
3805
|
-
}, /*#__PURE__*/
|
|
3816
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3806
3817
|
width: "36",
|
|
3807
3818
|
height: "28",
|
|
3808
3819
|
fill: "#3D6FCF",
|
|
3809
3820
|
rx: "4"
|
|
3810
|
-
}), /*#__PURE__*/
|
|
3821
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3811
3822
|
stroke: "#FFF",
|
|
3812
3823
|
strokeLinecap: "round",
|
|
3813
3824
|
strokeLinejoin: "round",
|
|
@@ -3820,16 +3831,16 @@ var HyperLink = function HyperLink(_ref) {
|
|
|
3820
3831
|
var _ref$hyperLink = _ref.hyperLink,
|
|
3821
3832
|
hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
|
|
3822
3833
|
if (!hyperLink) return null;
|
|
3823
|
-
return /*#__PURE__*/
|
|
3834
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3824
3835
|
href: hyperLink,
|
|
3825
3836
|
"aria-label": "hyperlink-button",
|
|
3826
3837
|
className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
|
|
3827
3838
|
target: "_blank",
|
|
3828
3839
|
rel: "noopener noreferrer"
|
|
3829
|
-
}, /*#__PURE__*/
|
|
3840
|
+
}, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
|
|
3830
3841
|
};
|
|
3831
3842
|
HyperLink.propTypes = {
|
|
3832
|
-
hyperLink:
|
|
3843
|
+
hyperLink: PropTypes__default["default"].string
|
|
3833
3844
|
};
|
|
3834
3845
|
|
|
3835
3846
|
var _styleModuleImportMap$4 = {
|
|
@@ -3865,7 +3876,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3865
3876
|
StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
|
|
3866
3877
|
return null;
|
|
3867
3878
|
} : _config$StoryTemplate;
|
|
3868
|
-
var showImagePlaceholder = useSelector(function (state) {
|
|
3879
|
+
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3869
3880
|
return get_1(state, ["qt", "config", "showPlaceholder"]);
|
|
3870
3881
|
});
|
|
3871
3882
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
@@ -3901,37 +3912,37 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3901
3912
|
var fallbackImage = function fallbackImage() {
|
|
3902
3913
|
if (!slug) {
|
|
3903
3914
|
if (fallbackImageUrl && !isStoryPageImage) {
|
|
3904
|
-
return /*#__PURE__*/
|
|
3915
|
+
return /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3905
3916
|
style: {
|
|
3906
3917
|
paddingTop: imagePadding + "%"
|
|
3907
3918
|
},
|
|
3908
3919
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$4)
|
|
3909
|
-
}, /*#__PURE__*/
|
|
3920
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3910
3921
|
className: "qt-image",
|
|
3911
3922
|
"data-src": "".concat(fallbackImageUrl),
|
|
3912
3923
|
alt: "image-fallback"
|
|
3913
3924
|
}));
|
|
3914
3925
|
}
|
|
3915
3926
|
|
|
3916
|
-
return /*#__PURE__*/
|
|
3927
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3917
3928
|
"data-test-id": "arr--fallback-hero-image",
|
|
3918
3929
|
style: {
|
|
3919
3930
|
paddingTop: imagePadding + "%"
|
|
3920
3931
|
},
|
|
3921
3932
|
className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$4)
|
|
3922
|
-
}, /*#__PURE__*/
|
|
3933
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3923
3934
|
storyTemplate: story["story-template"]
|
|
3924
|
-
}), /*#__PURE__*/
|
|
3935
|
+
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
3925
3936
|
}
|
|
3926
3937
|
|
|
3927
|
-
return /*#__PURE__*/
|
|
3938
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3928
3939
|
style: {
|
|
3929
3940
|
paddingTop: imagePadding + "%"
|
|
3930
3941
|
},
|
|
3931
3942
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$4)
|
|
3932
|
-
}, /*#__PURE__*/
|
|
3943
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3933
3944
|
storyTemplate: story["story-template"]
|
|
3934
|
-
}), /*#__PURE__*/
|
|
3945
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
3935
3946
|
story: story,
|
|
3936
3947
|
aspectRatio: imageAspectRatio,
|
|
3937
3948
|
defaultWidth: defaultWidth,
|
|
@@ -3940,15 +3951,15 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3940
3951
|
auto: ["format", "compress"],
|
|
3941
3952
|
fit: "max"
|
|
3942
3953
|
}
|
|
3943
|
-
})), isStoryPageImage && hyperLink && /*#__PURE__*/
|
|
3954
|
+
})), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
|
|
3944
3955
|
hyperLink: hyperLink
|
|
3945
3956
|
}));
|
|
3946
3957
|
};
|
|
3947
3958
|
|
|
3948
|
-
return story && (isStoryPageImage ? /*#__PURE__*/
|
|
3959
|
+
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3949
3960
|
"data-test-id": "arr--hero-image",
|
|
3950
3961
|
className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$4)
|
|
3951
|
-
}, fallbackImage()) : /*#__PURE__*/
|
|
3962
|
+
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3952
3963
|
"data-test-id": "arr--hero-image",
|
|
3953
3964
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3954
3965
|
externalLink: isExternalStory(story),
|
|
@@ -3958,30 +3969,30 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3958
3969
|
};
|
|
3959
3970
|
HeroImage.propTypes = {
|
|
3960
3971
|
/** The Story Object from the API response */
|
|
3961
|
-
story:
|
|
3972
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3962
3973
|
|
|
3963
3974
|
/** Removes the Hero Image padding for the image to bleed over the margin */
|
|
3964
|
-
FullBleed:
|
|
3975
|
+
FullBleed: PropTypes__default["default"].bool,
|
|
3965
3976
|
|
|
3966
3977
|
/** The default width for the image, in case the browser does not support srcset */
|
|
3967
|
-
defaultWidth:
|
|
3978
|
+
defaultWidth: PropTypes__default["default"].number,
|
|
3968
3979
|
|
|
3969
3980
|
/** The list of available widths */
|
|
3970
|
-
widths:
|
|
3981
|
+
widths: PropTypes__default["default"].array,
|
|
3971
3982
|
// fatch the correct hero image
|
|
3972
|
-
aspectRatio:
|
|
3983
|
+
aspectRatio: PropTypes__default["default"].array,
|
|
3973
3984
|
// Hints for the browser to choose the best size
|
|
3974
3985
|
|
|
3975
3986
|
/** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
|
|
3976
|
-
isHorizontal:
|
|
3987
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3977
3988
|
|
|
3978
3989
|
/** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
|
|
3979
|
-
isHorizontalMobile:
|
|
3990
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3980
3991
|
// this prop is responsive for rendering fallback image on story page
|
|
3981
|
-
defaultFallback:
|
|
3982
|
-
isHorizontalWithImageLast:
|
|
3983
|
-
isStoryPageImage:
|
|
3984
|
-
config:
|
|
3992
|
+
defaultFallback: PropTypes__default["default"].bool,
|
|
3993
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool,
|
|
3994
|
+
isStoryPageImage: PropTypes__default["default"].bool,
|
|
3995
|
+
config: PropTypes__default["default"].object
|
|
3985
3996
|
};
|
|
3986
3997
|
HeroImage.defaultProps = {
|
|
3987
3998
|
FullBleed: true,
|
|
@@ -4031,22 +4042,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
4031
4042
|
}
|
|
4032
4043
|
|
|
4033
4044
|
if (!isSection) return null;
|
|
4034
|
-
return /*#__PURE__*/
|
|
4045
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
4035
4046
|
href: getUrl,
|
|
4036
4047
|
className: "arrow-component arr--section-name",
|
|
4037
4048
|
"aria-label": "section-name"
|
|
4038
|
-
}, /*#__PURE__*/
|
|
4049
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4039
4050
|
"data-test-id": "sectionTag",
|
|
4040
4051
|
style: {
|
|
4041
4052
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
4042
4053
|
},
|
|
4043
4054
|
className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$3)
|
|
4044
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
4055
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4045
4056
|
className: "section-m_border-left__2oUyp",
|
|
4046
4057
|
style: {
|
|
4047
4058
|
color: sectionTagBorderColor
|
|
4048
4059
|
}
|
|
4049
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
4060
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4050
4061
|
className: "section-m_border-bottom__3cRoD",
|
|
4051
4062
|
style: {
|
|
4052
4063
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -4055,13 +4066,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
4055
4066
|
};
|
|
4056
4067
|
SectionTag.propTypes = {
|
|
4057
4068
|
/** The Story Object from the API response */
|
|
4058
|
-
story:
|
|
4069
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4059
4070
|
|
|
4060
4071
|
/** The style template for section tag */
|
|
4061
|
-
template:
|
|
4062
|
-
borderColor:
|
|
4063
|
-
solidBorderColor:
|
|
4064
|
-
isLightTheme:
|
|
4072
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
4073
|
+
borderColor: PropTypes__default["default"].string,
|
|
4074
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
4075
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
4065
4076
|
};
|
|
4066
4077
|
SectionTag.defaultProps = {
|
|
4067
4078
|
template: "",
|
|
@@ -4110,7 +4121,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4110
4121
|
prefix = _ref.prefix,
|
|
4111
4122
|
config = _ref.config,
|
|
4112
4123
|
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
4113
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/
|
|
4124
|
+
if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
4114
4125
|
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
4115
4126
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
4116
4127
|
|
|
@@ -4120,7 +4131,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4120
4131
|
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
4121
4132
|
var textColor = getTextColor(theme);
|
|
4122
4133
|
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
4123
|
-
var defaultStorycard = /*#__PURE__*/
|
|
4134
|
+
var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
|
|
4124
4135
|
story: story,
|
|
4125
4136
|
aspectRatio: aspectRatio,
|
|
4126
4137
|
border: border,
|
|
@@ -4134,7 +4145,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4134
4145
|
config: config,
|
|
4135
4146
|
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
4136
4147
|
});
|
|
4137
|
-
return /*#__PURE__*/
|
|
4148
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4138
4149
|
"data-test-id": "story-card",
|
|
4139
4150
|
style: {
|
|
4140
4151
|
backgroundColor: theme,
|
|
@@ -4163,91 +4174,91 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
4163
4174
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4164
4175
|
var _config$localizationC = config.localizationConfig,
|
|
4165
4176
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4166
|
-
return /*#__PURE__*/
|
|
4177
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4167
4178
|
config: config,
|
|
4168
4179
|
story: story,
|
|
4169
4180
|
isHorizontal: true,
|
|
4170
4181
|
isHorizontalMobile: isHorizontalMobile,
|
|
4171
4182
|
aspectRatio: aspectRatio
|
|
4172
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/
|
|
4183
|
+
}) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4173
4184
|
config: config,
|
|
4174
4185
|
story: story,
|
|
4175
4186
|
isHorizontalWithImageLast: true,
|
|
4176
4187
|
isHorizontalMobile: isHorizontalMobile,
|
|
4177
4188
|
aspectRatio: aspectRatio
|
|
4178
|
-
}) : /*#__PURE__*/
|
|
4189
|
+
}) : /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4179
4190
|
story: story,
|
|
4180
4191
|
config: config,
|
|
4181
4192
|
isHorizontalMobile: isHorizontalMobile,
|
|
4182
4193
|
aspectRatio: aspectRatio
|
|
4183
|
-
}), /*#__PURE__*/
|
|
4194
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4184
4195
|
className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap$2)
|
|
4185
|
-
}, /*#__PURE__*/
|
|
4196
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4186
4197
|
story: story,
|
|
4187
4198
|
borderColor: SectionTagborderColor
|
|
4188
|
-
}), /*#__PURE__*/
|
|
4199
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4189
4200
|
story: story,
|
|
4190
4201
|
headerLevel: headerLevel,
|
|
4191
4202
|
premiumStoryIconConfig: config
|
|
4192
|
-
}), /*#__PURE__*/
|
|
4203
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4193
4204
|
config: localizationConfig,
|
|
4194
4205
|
story: story,
|
|
4195
4206
|
isBottom: true,
|
|
4196
4207
|
prefix: prefix,
|
|
4197
4208
|
hideAuthorImage: hideAuthorImage
|
|
4198
|
-
}), /*#__PURE__*/
|
|
4209
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
4199
4210
|
story: story
|
|
4200
4211
|
})));
|
|
4201
4212
|
};
|
|
4202
4213
|
|
|
4203
4214
|
DefaultStoryCard.propTypes = {
|
|
4204
|
-
story:
|
|
4205
|
-
border:
|
|
4206
|
-
isBottom:
|
|
4207
|
-
isHorizontal:
|
|
4208
|
-
aspectRatio:
|
|
4209
|
-
isHorizontalMobile:
|
|
4210
|
-
centerAlign:
|
|
4211
|
-
headerLevel:
|
|
4212
|
-
borderColor:
|
|
4213
|
-
hideAuthorImage:
|
|
4214
|
-
prefix:
|
|
4215
|
-
config:
|
|
4216
|
-
isHorizontalWithImageLast:
|
|
4215
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4216
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4217
|
+
isBottom: PropTypes__default["default"].bool,
|
|
4218
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4219
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4220
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4221
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4222
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4223
|
+
borderColor: PropTypes__default["default"].string,
|
|
4224
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4225
|
+
prefix: PropTypes__default["default"].string,
|
|
4226
|
+
config: PropTypes__default["default"].object,
|
|
4227
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4217
4228
|
};
|
|
4218
4229
|
StoryCard.propTypes = {
|
|
4219
4230
|
/** The Story Object from the API response */
|
|
4220
|
-
story:
|
|
4221
|
-
children:
|
|
4231
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4232
|
+
children: PropTypes__default["default"].node,
|
|
4222
4233
|
|
|
4223
4234
|
/** Flip the Story Card to Horizonal mode */
|
|
4224
|
-
isHorizontal:
|
|
4235
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4225
4236
|
|
|
4226
4237
|
/** Add border to the Story Card */
|
|
4227
|
-
border:
|
|
4238
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4228
4239
|
// story card with background image
|
|
4229
|
-
useImageAsBackground:
|
|
4240
|
+
useImageAsBackground: PropTypes__default["default"].bool,
|
|
4230
4241
|
// story card content overlap with image
|
|
4231
|
-
bgImgContentOverlap:
|
|
4242
|
+
bgImgContentOverlap: PropTypes__default["default"].bool,
|
|
4232
4243
|
|
|
4233
4244
|
/** add aspect ratio for hero image */
|
|
4234
|
-
aspectRatio:
|
|
4245
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4235
4246
|
|
|
4236
4247
|
/** add theme(dark /light/custom color) for storycard */
|
|
4237
|
-
theme:
|
|
4248
|
+
theme: PropTypes__default["default"].string,
|
|
4238
4249
|
|
|
4239
4250
|
/** flip the story card mobile design horizontal */
|
|
4240
|
-
isHorizontalMobile:
|
|
4251
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4241
4252
|
// make content center align in desktop and left align in mobile
|
|
4242
|
-
centerAlign:
|
|
4243
|
-
headerLevel:
|
|
4244
|
-
borderColor:
|
|
4253
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4254
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4255
|
+
borderColor: PropTypes__default["default"].string,
|
|
4245
4256
|
// handle author image through storycard
|
|
4246
|
-
hideAuthorImage:
|
|
4257
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4247
4258
|
// handle author prefix through storycard
|
|
4248
|
-
prefix:
|
|
4249
|
-
config:
|
|
4250
|
-
isHorizontalWithImageLast:
|
|
4259
|
+
prefix: PropTypes__default["default"].string,
|
|
4260
|
+
config: PropTypes__default["default"].object,
|
|
4261
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4251
4262
|
};
|
|
4252
4263
|
StoryCard.defaultProps = {
|
|
4253
4264
|
isHorizontal: false,
|
|
@@ -4280,14 +4291,14 @@ var StorycardContent = function StorycardContent(_ref) {
|
|
|
4280
4291
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4281
4292
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : "";
|
|
4282
4293
|
var horizontalCard = isHorizontalMobile ? "horizontal-content-wrapper" : "";
|
|
4283
|
-
return /*#__PURE__*/
|
|
4294
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4284
4295
|
"data-test-id": "story-card-content",
|
|
4285
4296
|
style: {
|
|
4286
4297
|
backgroundColor: theme,
|
|
4287
4298
|
color: textColor
|
|
4288
4299
|
},
|
|
4289
4300
|
className: "arr--content-wrapper " + _getClassName("wrapper ".concat(borderTemplate, " ").concat(horizontalCard), _styleModuleImportMap$1)
|
|
4290
|
-
}, children || /*#__PURE__*/
|
|
4301
|
+
}, children || /*#__PURE__*/React__default["default"].createElement(DefaultStoryCardContent, {
|
|
4291
4302
|
story: story,
|
|
4292
4303
|
headerLevel: headerLevel,
|
|
4293
4304
|
isHorizontalMobile: isHorizontalMobile,
|
|
@@ -4305,57 +4316,57 @@ var DefaultStoryCardContent = function DefaultStoryCardContent(_ref2) {
|
|
|
4305
4316
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4306
4317
|
var _config$localizationC = config.localizationConfig,
|
|
4307
4318
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4308
|
-
return /*#__PURE__*/
|
|
4319
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4309
4320
|
story: story,
|
|
4310
4321
|
borderColor: SectionTagborderColor
|
|
4311
|
-
}), /*#__PURE__*/
|
|
4322
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4312
4323
|
story: story,
|
|
4313
4324
|
headerLevel: headerLevel,
|
|
4314
4325
|
premiumStoryIconConfig: config
|
|
4315
|
-
}), /*#__PURE__*/
|
|
4326
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4316
4327
|
config: localizationConfig,
|
|
4317
4328
|
story: story
|
|
4318
4329
|
}));
|
|
4319
4330
|
};
|
|
4320
4331
|
|
|
4321
4332
|
DefaultStoryCardContent.propTypes = {
|
|
4322
|
-
story:
|
|
4323
|
-
border:
|
|
4324
|
-
theme:
|
|
4325
|
-
isHorizontalMobile:
|
|
4326
|
-
headerLevel:
|
|
4327
|
-
borderColor:
|
|
4328
|
-
config:
|
|
4333
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4334
|
+
border: PropTypes__default["default"].string,
|
|
4335
|
+
theme: PropTypes__default["default"].string,
|
|
4336
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4337
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4338
|
+
borderColor: PropTypes__default["default"].string,
|
|
4339
|
+
config: PropTypes__default["default"].object
|
|
4329
4340
|
};
|
|
4330
4341
|
StorycardContent.propTypes = {
|
|
4331
|
-
story:
|
|
4332
|
-
children:
|
|
4333
|
-
theme:
|
|
4334
|
-
border:
|
|
4335
|
-
isHorizontalMobile:
|
|
4336
|
-
headerLevel:
|
|
4337
|
-
borderColor:
|
|
4338
|
-
config:
|
|
4342
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4343
|
+
children: PropTypes__default["default"].node,
|
|
4344
|
+
theme: PropTypes__default["default"].string,
|
|
4345
|
+
border: PropTypes__default["default"].string,
|
|
4346
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4347
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4348
|
+
borderColor: PropTypes__default["default"].string,
|
|
4349
|
+
config: PropTypes__default["default"].object
|
|
4339
4350
|
};
|
|
4340
4351
|
|
|
4341
4352
|
var Loading = function Loading(_ref) {
|
|
4342
4353
|
_ref.width;
|
|
4343
4354
|
_ref.height;
|
|
4344
4355
|
_ref.iconColor;
|
|
4345
|
-
return /*#__PURE__*/
|
|
4356
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4346
4357
|
className: "loading-m_loading-indicator__2Dlst"
|
|
4347
|
-
}, /*#__PURE__*/
|
|
4358
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
4348
4359
|
width: "40",
|
|
4349
4360
|
height: "40",
|
|
4350
4361
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4351
4362
|
viewBox: "0 0 100 100",
|
|
4352
4363
|
preserveAspectRatio: "xMidYMid"
|
|
4353
|
-
}, /*#__PURE__*/
|
|
4364
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
4354
4365
|
cx: "84",
|
|
4355
4366
|
cy: "50",
|
|
4356
4367
|
r: "0",
|
|
4357
4368
|
fill: "currentColor"
|
|
4358
|
-
}, /*#__PURE__*/
|
|
4369
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4359
4370
|
attributeName: "r",
|
|
4360
4371
|
values: "10;0;0;0;0",
|
|
4361
4372
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4364,7 +4375,7 @@ var Loading = function Loading(_ref) {
|
|
|
4364
4375
|
dur: "2s",
|
|
4365
4376
|
repeatCount: "indefinite",
|
|
4366
4377
|
begin: "0s"
|
|
4367
|
-
}), /*#__PURE__*/
|
|
4378
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4368
4379
|
attributeName: "cx",
|
|
4369
4380
|
values: "84;84;84;84;84",
|
|
4370
4381
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4373,12 +4384,12 @@ var Loading = function Loading(_ref) {
|
|
|
4373
4384
|
dur: "2s",
|
|
4374
4385
|
repeatCount: "indefinite",
|
|
4375
4386
|
begin: "0s"
|
|
4376
|
-
})), /*#__PURE__*/
|
|
4387
|
+
})), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
4377
4388
|
cx: "84",
|
|
4378
4389
|
cy: "50",
|
|
4379
4390
|
r: ".709",
|
|
4380
4391
|
fill: "currentColor"
|
|
4381
|
-
}, /*#__PURE__*/
|
|
4392
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4382
4393
|
attributeName: "r",
|
|
4383
4394
|
values: "0;10;10;10;0",
|
|
4384
4395
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4387,7 +4398,7 @@ var Loading = function Loading(_ref) {
|
|
|
4387
4398
|
dur: "2s",
|
|
4388
4399
|
repeatCount: "indefinite",
|
|
4389
4400
|
begin: "-1s"
|
|
4390
|
-
}), /*#__PURE__*/
|
|
4401
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4391
4402
|
attributeName: "cx",
|
|
4392
4403
|
values: "16;16;50;84;84",
|
|
4393
4404
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4396,12 +4407,12 @@ var Loading = function Loading(_ref) {
|
|
|
4396
4407
|
dur: "2s",
|
|
4397
4408
|
repeatCount: "indefinite",
|
|
4398
4409
|
begin: "-1s"
|
|
4399
|
-
})), /*#__PURE__*/
|
|
4410
|
+
})), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
4400
4411
|
cx: "81.59",
|
|
4401
4412
|
cy: "50",
|
|
4402
4413
|
r: "10",
|
|
4403
4414
|
fill: "currentColor"
|
|
4404
|
-
}, /*#__PURE__*/
|
|
4415
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4405
4416
|
attributeName: "r",
|
|
4406
4417
|
values: "0;10;10;10;0",
|
|
4407
4418
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4410,7 +4421,7 @@ var Loading = function Loading(_ref) {
|
|
|
4410
4421
|
dur: "2s",
|
|
4411
4422
|
repeatCount: "indefinite",
|
|
4412
4423
|
begin: "-0.5s"
|
|
4413
|
-
}), /*#__PURE__*/
|
|
4424
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4414
4425
|
attributeName: "cx",
|
|
4415
4426
|
values: "16;16;50;84;84",
|
|
4416
4427
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4419,12 +4430,12 @@ var Loading = function Loading(_ref) {
|
|
|
4419
4430
|
dur: "2s",
|
|
4420
4431
|
repeatCount: "indefinite",
|
|
4421
4432
|
begin: "-0.5s"
|
|
4422
|
-
})), /*#__PURE__*/
|
|
4433
|
+
})), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
4423
4434
|
cx: "47.59",
|
|
4424
4435
|
cy: "50",
|
|
4425
4436
|
r: "10",
|
|
4426
4437
|
fill: "currentColor"
|
|
4427
|
-
}, /*#__PURE__*/
|
|
4438
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4428
4439
|
attributeName: "r",
|
|
4429
4440
|
values: "0;10;10;10;0",
|
|
4430
4441
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4433,7 +4444,7 @@ var Loading = function Loading(_ref) {
|
|
|
4433
4444
|
dur: "2s",
|
|
4434
4445
|
repeatCount: "indefinite",
|
|
4435
4446
|
begin: "0s"
|
|
4436
|
-
}), /*#__PURE__*/
|
|
4447
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4437
4448
|
attributeName: "cx",
|
|
4438
4449
|
values: "16;16;50;84;84",
|
|
4439
4450
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4442,12 +4453,12 @@ var Loading = function Loading(_ref) {
|
|
|
4442
4453
|
dur: "2s",
|
|
4443
4454
|
repeatCount: "indefinite",
|
|
4444
4455
|
begin: "0s"
|
|
4445
|
-
})), /*#__PURE__*/
|
|
4456
|
+
})), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
4446
4457
|
cx: "16",
|
|
4447
4458
|
cy: "50",
|
|
4448
4459
|
r: "9.291",
|
|
4449
4460
|
fill: "currentColor"
|
|
4450
|
-
}, /*#__PURE__*/
|
|
4461
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4451
4462
|
attributeName: "r",
|
|
4452
4463
|
values: "0;0;10;10;10",
|
|
4453
4464
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4456,7 +4467,7 @@ var Loading = function Loading(_ref) {
|
|
|
4456
4467
|
dur: "2s",
|
|
4457
4468
|
repeatCount: "indefinite",
|
|
4458
4469
|
begin: "0s"
|
|
4459
|
-
}), /*#__PURE__*/
|
|
4470
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
4460
4471
|
attributeName: "cx",
|
|
4461
4472
|
values: "16;16;16;50;84",
|
|
4462
4473
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -4468,9 +4479,9 @@ var Loading = function Loading(_ref) {
|
|
|
4468
4479
|
}))));
|
|
4469
4480
|
};
|
|
4470
4481
|
Loading.propTypes = {
|
|
4471
|
-
width:
|
|
4472
|
-
height:
|
|
4473
|
-
iconColor:
|
|
4482
|
+
width: PropTypes__default["default"].object,
|
|
4483
|
+
height: PropTypes__default["default"].object,
|
|
4484
|
+
iconColor: PropTypes__default["default"].object
|
|
4474
4485
|
};
|
|
4475
4486
|
|
|
4476
4487
|
var _styleModuleImportMap = {
|
|
@@ -4531,22 +4542,22 @@ var AlternateCollectionFilterBase = function AlternateCollectionFilterBase(_ref)
|
|
|
4531
4542
|
showButton = _config$showButton === void 0 ? true : _config$showButton;
|
|
4532
4543
|
var footerSlot = footerSlotConfig.footerSlot;
|
|
4533
4544
|
|
|
4534
|
-
var _useState = useState([]),
|
|
4545
|
+
var _useState = React.useState([]),
|
|
4535
4546
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4536
4547
|
subCollectionStories = _useState2[0],
|
|
4537
4548
|
handleApiData = _useState2[1];
|
|
4538
4549
|
|
|
4539
|
-
var _useState3 = useState({}),
|
|
4550
|
+
var _useState3 = React.useState({}),
|
|
4540
4551
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
4541
4552
|
cachedStories = _useState4[0],
|
|
4542
4553
|
updateCachedStories = _useState4[1];
|
|
4543
4554
|
|
|
4544
|
-
var _useState5 = useState(0),
|
|
4555
|
+
var _useState5 = React.useState(0),
|
|
4545
4556
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
4546
4557
|
active = _useState6[0],
|
|
4547
4558
|
handleActive = _useState6[1];
|
|
4548
4559
|
|
|
4549
|
-
var _useState7 = useState(true),
|
|
4560
|
+
var _useState7 = React.useState(true),
|
|
4550
4561
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
4551
4562
|
loading = _useState8[0],
|
|
4552
4563
|
handleLoading = _useState8[1];
|
|
@@ -4595,7 +4606,7 @@ var AlternateCollectionFilterBase = function AlternateCollectionFilterBase(_ref)
|
|
|
4595
4606
|
}
|
|
4596
4607
|
|
|
4597
4608
|
_context.next = 7;
|
|
4598
|
-
return
|
|
4609
|
+
return axios__default["default"].get("/api/v1/collections/".concat(id, "?limit=7"));
|
|
4599
4610
|
|
|
4600
4611
|
case 7:
|
|
4601
4612
|
res = _context.sent;
|
|
@@ -4608,7 +4619,7 @@ var AlternateCollectionFilterBase = function AlternateCollectionFilterBase(_ref)
|
|
|
4608
4619
|
|
|
4609
4620
|
case 12:
|
|
4610
4621
|
memoizeStories(id, data);
|
|
4611
|
-
childCollectionItems = collectionToStories(data);
|
|
4622
|
+
childCollectionItems = components.collectionToStories(data);
|
|
4612
4623
|
handleLoading(false);
|
|
4613
4624
|
handleApiData(childCollectionItems);
|
|
4614
4625
|
_context.next = 21;
|
|
@@ -4630,11 +4641,11 @@ var AlternateCollectionFilterBase = function AlternateCollectionFilterBase(_ref)
|
|
|
4630
4641
|
return _fetchSubCollectionData.apply(this, arguments);
|
|
4631
4642
|
}
|
|
4632
4643
|
|
|
4633
|
-
useEffect(function (id) {
|
|
4644
|
+
React.useEffect(function (id) {
|
|
4634
4645
|
fetchSubCollectionData(id);
|
|
4635
4646
|
}, []);
|
|
4636
|
-
var dispatch = useDispatch();
|
|
4637
|
-
var qtConfig = useSelector(function (state) {
|
|
4647
|
+
var dispatch = reactRedux.useDispatch();
|
|
4648
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
4638
4649
|
return get_1(state, ["qt", "config"], {});
|
|
4639
4650
|
});
|
|
4640
4651
|
var url = generateNavigateSlug(getFilteredCollection[active], qtConfig);
|
|
@@ -4650,62 +4661,62 @@ var AlternateCollectionFilterBase = function AlternateCollectionFilterBase(_ref)
|
|
|
4650
4661
|
|
|
4651
4662
|
var footerSlotComp = footerSlot ? footerSlot() : null;
|
|
4652
4663
|
var getCustomStyleName = textColor === "light" ? "light-wrapper" : "";
|
|
4653
|
-
return /*#__PURE__*/
|
|
4664
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4654
4665
|
className: "full-width-with-padding arrow-component",
|
|
4655
4666
|
"data-test-id": "collection-filter",
|
|
4656
4667
|
style: {
|
|
4657
4668
|
backgroundColor: theme,
|
|
4658
4669
|
color: textColor
|
|
4659
4670
|
}
|
|
4660
|
-
}, /*#__PURE__*/
|
|
4671
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4661
4672
|
className: _getClassName("wrapper ".concat(getCustomStyleName), _styleModuleImportMap)
|
|
4662
|
-
}, /*#__PURE__*/
|
|
4673
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4663
4674
|
collection: collection,
|
|
4664
4675
|
collectionNameTemplate: collectionNameTemplate,
|
|
4665
4676
|
collectionNameBorderColor: collectionNameBorderColor
|
|
4666
|
-
}), /*#__PURE__*/
|
|
4677
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4667
4678
|
className: "alternate-collection-filter-m_collection-filter__34wis"
|
|
4668
|
-
}, /*#__PURE__*/
|
|
4679
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4669
4680
|
className: "alternate-collection-filter-m_child-collections__9s0wl"
|
|
4670
4681
|
}, getFilteredCollection.map(function (subCollections, index) {
|
|
4671
|
-
return /*#__PURE__*/
|
|
4682
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4672
4683
|
key: index,
|
|
4673
4684
|
className: ((index === active ? "open-subchild" : "") ? (index === active ? "open-subchild" : "") + " " : "") + _getClassName("child-collection-wrapper ".concat(index === active ? "open-subchild" : ""), _styleModuleImportMap)
|
|
4674
|
-
}, /*#__PURE__*/
|
|
4685
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4675
4686
|
onClick: function onClick(event) {
|
|
4676
4687
|
return openChildCollectionItems(event, index, subCollections.id);
|
|
4677
4688
|
},
|
|
4678
4689
|
className: _getClassName("child-collection ".concat(textColor), _styleModuleImportMap)
|
|
4679
|
-
}, subCollections.name), /*#__PURE__*/
|
|
4690
|
+
}, subCollections.name), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4680
4691
|
className: ("navigator ".concat(textColor) ? "navigator ".concat(textColor) + " " : "") + _getClassName("navigator ".concat(textColor), _styleModuleImportMap)
|
|
4681
4692
|
}));
|
|
4682
|
-
})), /*#__PURE__*/
|
|
4693
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4683
4694
|
className: ("divider ".concat(textColor) ? "divider ".concat(textColor) + " " : "") + _getClassName("divider ".concat(textColor), _styleModuleImportMap)
|
|
4684
|
-
}), /*#__PURE__*/
|
|
4695
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4685
4696
|
className: "alternate-collection-filter-m_subCollection-wrapper__3Tj-s"
|
|
4686
|
-
}, loading ? /*#__PURE__*/
|
|
4697
|
+
}, loading ? /*#__PURE__*/React__default["default"].createElement(Loading, null) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4687
4698
|
className: "alternate-collection-filter-m_subCollection-stories__2o4ws"
|
|
4688
|
-
}, /*#__PURE__*/
|
|
4699
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4689
4700
|
className: "alternate-collection-filter-m_cards__30xpt"
|
|
4690
4701
|
}, items.slice(0, 6).map(function (story, index) {
|
|
4691
|
-
return /*#__PURE__*/
|
|
4702
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4692
4703
|
className: "alternate-collection-filter-m_card__1Mb8D",
|
|
4693
4704
|
key: index
|
|
4694
|
-
}, /*#__PURE__*/
|
|
4705
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4695
4706
|
story: story,
|
|
4696
4707
|
border: border,
|
|
4697
4708
|
theme: theme,
|
|
4698
4709
|
config: config
|
|
4699
|
-
}, /*#__PURE__*/
|
|
4710
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4700
4711
|
story: story,
|
|
4701
4712
|
aspectRatio: [[16, 9]]
|
|
4702
|
-
}), /*#__PURE__*/
|
|
4713
|
+
}), /*#__PURE__*/React__default["default"].createElement(StorycardContent, {
|
|
4703
4714
|
story: story,
|
|
4704
4715
|
border: border,
|
|
4705
4716
|
borderColor: borderColor,
|
|
4706
4717
|
config: config
|
|
4707
4718
|
})));
|
|
4708
|
-
}))))), items.length > 6 && /*#__PURE__*/
|
|
4719
|
+
}))))), items.length > 6 && /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
4709
4720
|
collection: getFilteredCollection[active],
|
|
4710
4721
|
template: footerButton,
|
|
4711
4722
|
config: config,
|
|
@@ -4713,25 +4724,25 @@ var AlternateCollectionFilterBase = function AlternateCollectionFilterBase(_ref)
|
|
|
4713
4724
|
return navigateTo(dispatch, url);
|
|
4714
4725
|
},
|
|
4715
4726
|
qtConfig: qtConfig
|
|
4716
|
-
}), /*#__PURE__*/
|
|
4727
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4717
4728
|
className: _getClassName("".concat(showButton ? "" : "no-button-wrapper"), _styleModuleImportMap)
|
|
4718
4729
|
}, footerSlotComp)));
|
|
4719
4730
|
};
|
|
4720
4731
|
AlternateCollectionFilterBase.propTypes = {
|
|
4721
4732
|
/** collection is the array of objects which is returning by API */
|
|
4722
|
-
collection:
|
|
4733
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
4723
4734
|
|
|
4724
4735
|
/** The config for the Row */
|
|
4725
|
-
config:
|
|
4736
|
+
config: PropTypes__default["default"].shape({
|
|
4726
4737
|
// section tag border color
|
|
4727
|
-
borderColor:
|
|
4738
|
+
borderColor: PropTypes__default["default"].string,
|
|
4728
4739
|
// background color of the row
|
|
4729
|
-
theme:
|
|
4730
|
-
border:
|
|
4731
|
-
collectionNameTemplate:
|
|
4732
|
-
footerSlotConfig:
|
|
4733
|
-
footerButton:
|
|
4734
|
-
collectionNameBorderColor:
|
|
4740
|
+
theme: PropTypes__default["default"].string,
|
|
4741
|
+
border: PropTypes__default["default"].string,
|
|
4742
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
4743
|
+
footerSlotConfig: PropTypes__default["default"].object,
|
|
4744
|
+
footerButton: PropTypes__default["default"].string,
|
|
4745
|
+
collectionNameBorderColor: PropTypes__default["default"].string
|
|
4735
4746
|
})
|
|
4736
4747
|
};
|
|
4737
4748
|
AlternateCollectionFilterBase.defaultProps = {
|
|
@@ -4741,4 +4752,5 @@ AlternateCollectionFilterBase.defaultProps = {
|
|
|
4741
4752
|
};
|
|
4742
4753
|
var AlternateCollectionFilter = StateProvider(AlternateCollectionFilterBase);
|
|
4743
4754
|
|
|
4744
|
-
|
|
4755
|
+
exports.AlternateCollectionFilter = AlternateCollectionFilter;
|
|
4756
|
+
exports.AlternateCollectionFilterBase = AlternateCollectionFilterBase;
|