@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,25 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-e7cde739.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var PropTypes = require('prop-types');
|
|
6
|
+
var components = require('@quintype/components');
|
|
7
|
+
var reactRedux = require('react-redux');
|
|
8
|
+
var ReactDOM = require('react-dom');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
function _interopNamespace(e) {
|
|
13
|
+
if (e && e.__esModule) return e;
|
|
14
|
+
var n = Object.create(null);
|
|
15
|
+
if (e) {
|
|
16
|
+
Object.keys(e).forEach(function (k) {
|
|
17
|
+
if (k !== 'default') {
|
|
18
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return e[k]; }
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
n["default"] = e;
|
|
27
|
+
return Object.freeze(n);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
31
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
32
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
7
33
|
|
|
8
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
34
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
9
35
|
|
|
10
36
|
var StateProvider = function StateProvider(RowComponent) {
|
|
11
37
|
return function (props) {
|
|
12
38
|
return (
|
|
13
39
|
/*#__PURE__*/
|
|
14
40
|
// eslint-disable-next-line react/prop-types
|
|
15
|
-
|
|
41
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
16
42
|
value: props.config
|
|
17
|
-
}, /*#__PURE__*/
|
|
43
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
18
44
|
);
|
|
19
45
|
};
|
|
20
46
|
};
|
|
21
47
|
var useStateValue = function useStateValue() {
|
|
22
|
-
return useContext(StateContext);
|
|
48
|
+
return React.useContext(StateContext);
|
|
23
49
|
};
|
|
24
50
|
|
|
25
51
|
var CrownIcon = function CrownIcon(_ref) {
|
|
@@ -28,7 +54,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
28
54
|
_ref$color = _ref.color,
|
|
29
55
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
30
56
|
positionTop = _ref.positionTop;
|
|
31
|
-
return /*#__PURE__*/
|
|
57
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
32
58
|
xmlns: "http://www.w3.org/2000/svg",
|
|
33
59
|
width: width,
|
|
34
60
|
height: height,
|
|
@@ -37,28 +63,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
37
63
|
position: "relative",
|
|
38
64
|
top: positionTop
|
|
39
65
|
}
|
|
40
|
-
}, /*#__PURE__*/
|
|
66
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
41
67
|
fill: "none",
|
|
42
68
|
fillRule: "evenodd",
|
|
43
69
|
stroke: "none",
|
|
44
70
|
strokeWidth: "1"
|
|
45
|
-
}, /*#__PURE__*/
|
|
71
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
46
72
|
transform: "translate(8 8)"
|
|
47
|
-
}, /*#__PURE__*/
|
|
73
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
48
74
|
d: "M0 0H24V24H0z"
|
|
49
|
-
}), /*#__PURE__*/
|
|
75
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
50
76
|
fill: color,
|
|
51
77
|
fillRule: "nonzero",
|
|
52
78
|
transform: "translate(0 2)"
|
|
53
|
-
}, /*#__PURE__*/
|
|
79
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
54
80
|
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"
|
|
55
81
|
}))))));
|
|
56
82
|
};
|
|
57
83
|
CrownIcon.propTypes = {
|
|
58
|
-
height:
|
|
59
|
-
width:
|
|
60
|
-
color:
|
|
61
|
-
positionTop:
|
|
84
|
+
height: PropTypes__default["default"].string,
|
|
85
|
+
width: PropTypes__default["default"].string,
|
|
86
|
+
color: PropTypes__default["default"].string,
|
|
87
|
+
positionTop: PropTypes__default["default"].string
|
|
62
88
|
};
|
|
63
89
|
|
|
64
90
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -67,7 +93,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
67
93
|
_ref$color = _ref.color,
|
|
68
94
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
69
95
|
positionTop = _ref.positionTop;
|
|
70
|
-
return /*#__PURE__*/
|
|
96
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
71
97
|
xmlns: "http://www.w3.org/2000/svg",
|
|
72
98
|
width: width,
|
|
73
99
|
height: height,
|
|
@@ -76,16 +102,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
76
102
|
position: "relative",
|
|
77
103
|
top: positionTop
|
|
78
104
|
}
|
|
79
|
-
}, /*#__PURE__*/
|
|
105
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
80
106
|
fill: "none",
|
|
81
107
|
fillRule: "evenodd",
|
|
82
108
|
stroke: "none",
|
|
83
109
|
strokeWidth: "1"
|
|
84
|
-
}, /*#__PURE__*/
|
|
110
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
85
111
|
transform: "translate(8 8)"
|
|
86
|
-
}, /*#__PURE__*/
|
|
112
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
87
113
|
d: "M0 0H24V24H0z"
|
|
88
|
-
}), /*#__PURE__*/
|
|
114
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
89
115
|
fill: color,
|
|
90
116
|
fillRule: "nonzero",
|
|
91
117
|
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",
|
|
@@ -93,10 +119,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
93
119
|
})))));
|
|
94
120
|
};
|
|
95
121
|
KeyIcon.propTypes = {
|
|
96
|
-
height:
|
|
97
|
-
width:
|
|
98
|
-
color:
|
|
99
|
-
positionTop:
|
|
122
|
+
height: PropTypes__default["default"].string,
|
|
123
|
+
width: PropTypes__default["default"].string,
|
|
124
|
+
color: PropTypes__default["default"].string,
|
|
125
|
+
positionTop: PropTypes__default["default"].string
|
|
100
126
|
};
|
|
101
127
|
|
|
102
128
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -105,7 +131,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
105
131
|
_ref$color = _ref.color,
|
|
106
132
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
107
133
|
positionTop = _ref.positionTop;
|
|
108
|
-
return /*#__PURE__*/
|
|
134
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
109
135
|
xmlns: "http://www.w3.org/2000/svg",
|
|
110
136
|
width: width,
|
|
111
137
|
height: height,
|
|
@@ -114,28 +140,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
114
140
|
position: "relative",
|
|
115
141
|
top: positionTop
|
|
116
142
|
}
|
|
117
|
-
}, /*#__PURE__*/
|
|
143
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
118
144
|
fill: "none",
|
|
119
145
|
fillRule: "evenodd",
|
|
120
146
|
stroke: "none",
|
|
121
147
|
strokeWidth: "1"
|
|
122
|
-
}, /*#__PURE__*/
|
|
148
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
123
149
|
transform: "translate(8 8)"
|
|
124
|
-
}, /*#__PURE__*/
|
|
150
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
125
151
|
d: "M0 0H24V24H0z"
|
|
126
|
-
}), /*#__PURE__*/
|
|
152
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
127
153
|
fill: color,
|
|
128
154
|
fillRule: "nonzero",
|
|
129
155
|
transform: "translate(3)"
|
|
130
|
-
}, /*#__PURE__*/
|
|
156
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
131
157
|
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"
|
|
132
158
|
}))))));
|
|
133
159
|
};
|
|
134
160
|
LockIcon.propTypes = {
|
|
135
|
-
height:
|
|
136
|
-
width:
|
|
137
|
-
color:
|
|
138
|
-
positionTop:
|
|
161
|
+
height: PropTypes__default["default"].string,
|
|
162
|
+
width: PropTypes__default["default"].string,
|
|
163
|
+
color: PropTypes__default["default"].string,
|
|
164
|
+
positionTop: PropTypes__default["default"].string
|
|
139
165
|
};
|
|
140
166
|
|
|
141
167
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -145,7 +171,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
145
171
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
146
172
|
_ref$positionTop = _ref.positionTop,
|
|
147
173
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
148
|
-
return /*#__PURE__*/
|
|
174
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
149
175
|
xmlns: "http://www.w3.org/2000/svg",
|
|
150
176
|
width: width,
|
|
151
177
|
height: height,
|
|
@@ -154,21 +180,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
154
180
|
position: "relative",
|
|
155
181
|
top: positionTop
|
|
156
182
|
}
|
|
157
|
-
}, /*#__PURE__*/
|
|
183
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
158
184
|
fill: "none",
|
|
159
185
|
fillRule: "evenodd",
|
|
160
186
|
stroke: "none",
|
|
161
187
|
strokeWidth: "1"
|
|
162
|
-
}, /*#__PURE__*/
|
|
188
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
163
189
|
fill: color,
|
|
164
190
|
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"
|
|
165
191
|
}))));
|
|
166
192
|
};
|
|
167
193
|
StarIcon.propTypes = {
|
|
168
|
-
height:
|
|
169
|
-
width:
|
|
170
|
-
color:
|
|
171
|
-
positionTop:
|
|
194
|
+
height: PropTypes__default["default"].string,
|
|
195
|
+
width: PropTypes__default["default"].string,
|
|
196
|
+
color: PropTypes__default["default"].string,
|
|
197
|
+
positionTop: PropTypes__default["default"].string
|
|
172
198
|
};
|
|
173
199
|
|
|
174
200
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -180,7 +206,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
180
206
|
|
|
181
207
|
switch (iconType) {
|
|
182
208
|
case "crown":
|
|
183
|
-
return /*#__PURE__*/
|
|
209
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
184
210
|
width: width,
|
|
185
211
|
height: height,
|
|
186
212
|
color: color,
|
|
@@ -188,7 +214,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
188
214
|
});
|
|
189
215
|
|
|
190
216
|
case "lock":
|
|
191
|
-
return /*#__PURE__*/
|
|
217
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
192
218
|
width: width,
|
|
193
219
|
height: height,
|
|
194
220
|
color: color,
|
|
@@ -196,7 +222,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
196
222
|
});
|
|
197
223
|
|
|
198
224
|
case "key":
|
|
199
|
-
return /*#__PURE__*/
|
|
225
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
200
226
|
width: width,
|
|
201
227
|
height: height,
|
|
202
228
|
color: color,
|
|
@@ -204,7 +230,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
204
230
|
});
|
|
205
231
|
|
|
206
232
|
default:
|
|
207
|
-
return /*#__PURE__*/
|
|
233
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
208
234
|
width: width,
|
|
209
235
|
height: height,
|
|
210
236
|
color: color,
|
|
@@ -213,21 +239,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
213
239
|
}
|
|
214
240
|
};
|
|
215
241
|
PremiumStoryIcon.propTypes = {
|
|
216
|
-
width:
|
|
217
|
-
height:
|
|
218
|
-
color:
|
|
219
|
-
iconType:
|
|
220
|
-
positionTop:
|
|
242
|
+
width: PropTypes__default["default"].string,
|
|
243
|
+
height: PropTypes__default["default"].string,
|
|
244
|
+
color: PropTypes__default["default"].string,
|
|
245
|
+
iconType: PropTypes__default["default"].string,
|
|
246
|
+
positionTop: PropTypes__default["default"].string
|
|
221
247
|
};
|
|
222
248
|
|
|
223
249
|
function LiveIcon() {
|
|
224
|
-
return /*#__PURE__*/
|
|
250
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
225
251
|
className: "live-icon",
|
|
226
252
|
xmlns: "http://www.w3.org/2000/svg",
|
|
227
253
|
width: "25",
|
|
228
254
|
height: "24",
|
|
229
255
|
viewBox: "0 0 25 24"
|
|
230
|
-
}, /*#__PURE__*/
|
|
256
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
231
257
|
fill: "#ff5858",
|
|
232
258
|
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"
|
|
233
259
|
}));
|
|
@@ -256,8 +282,8 @@ var Headline = function Headline(_ref) {
|
|
|
256
282
|
enablePremiumStoryIcon = _premiumStoryIconConf3 === void 0 ? false : _premiumStoryIconConf3,
|
|
257
283
|
_premiumStoryIconConf4 = premiumStoryIconConfig.showLiveIcon,
|
|
258
284
|
showLiveIcon = _premiumStoryIconConf4 === void 0 ? false : _premiumStoryIconConf4;
|
|
259
|
-
var alternateHeadline = get_1(story, ["alternative", "home", "default", "headline"]);
|
|
260
|
-
var premiumStory = enablePremiumStoryIcon && get_1(story, ["access"]) === "subscription";
|
|
285
|
+
var alternateHeadline = index.get_1(story, ["alternative", "home", "default", "headline"]);
|
|
286
|
+
var premiumStory = enablePremiumStoryIcon && index.get_1(story, ["access"]) === "subscription";
|
|
261
287
|
var headline = alternateHeadline || story.headline;
|
|
262
288
|
var HeaderTag = "h" + headerLevel;
|
|
263
289
|
|
|
@@ -280,41 +306,41 @@ var Headline = function Headline(_ref) {
|
|
|
280
306
|
}
|
|
281
307
|
};
|
|
282
308
|
|
|
283
|
-
var textColor = getTextColor(configData.theme);
|
|
309
|
+
var textColor = index.getTextColor(configData.theme);
|
|
284
310
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
285
311
|
var iconSize = "24px";
|
|
286
|
-
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
287
|
-
return /*#__PURE__*/
|
|
312
|
+
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !index.get_1(story, ["metadata", "is-closed"], false);
|
|
313
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
288
314
|
"data-test-id": "headline",
|
|
289
|
-
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$8)
|
|
290
|
-
}, premiumStory && /*#__PURE__*/
|
|
315
|
+
className: "arrow-component arr--headline " + index._getClassName(wrapperClass, _styleModuleImportMap$8)
|
|
316
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
291
317
|
width: iconSize,
|
|
292
318
|
height: iconSize,
|
|
293
319
|
color: iconColor,
|
|
294
320
|
iconType: iconStyle,
|
|
295
321
|
positionTop: positionHeadline()
|
|
296
|
-
}), isLink ? /*#__PURE__*/
|
|
297
|
-
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
298
|
-
externalLink: isExternalStory(story),
|
|
322
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
323
|
+
href: index.getStoryUrl(story, "/".concat(story.slug)),
|
|
324
|
+
externalLink: index.isExternalStory(story),
|
|
299
325
|
"aria-label": "headline"
|
|
300
|
-
}, /*#__PURE__*/
|
|
301
|
-
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$8)
|
|
302
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
303
|
-
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$8)
|
|
304
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
326
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
327
|
+
className: index._getClassName("headline ".concat(textColor), _styleModuleImportMap$8)
|
|
328
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
329
|
+
className: index._getClassName("headline ".concat(textColor), _styleModuleImportMap$8)
|
|
330
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
305
331
|
};
|
|
306
332
|
Headline.propTypes = {
|
|
307
333
|
/** The Story Object from the API response */
|
|
308
|
-
story:
|
|
334
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
309
335
|
|
|
310
336
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
311
|
-
headerLevel:
|
|
312
|
-
premiumStoryIconConfig:
|
|
313
|
-
iconColor:
|
|
314
|
-
iconType:
|
|
315
|
-
enablePremiumStoryIcon:
|
|
337
|
+
headerLevel: PropTypes__default["default"].string,
|
|
338
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
339
|
+
iconColor: PropTypes__default["default"].string,
|
|
340
|
+
iconType: PropTypes__default["default"].string,
|
|
341
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
316
342
|
}),
|
|
317
|
-
isLink:
|
|
343
|
+
isLink: PropTypes__default["default"].bool
|
|
318
344
|
};
|
|
319
345
|
Headline.defaultProps = {
|
|
320
346
|
headerLevel: "6",
|
|
@@ -336,22 +362,22 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
336
362
|
_ref$config = _ref.config,
|
|
337
363
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
338
364
|
var configState = useStateValue() || {};
|
|
339
|
-
var isTime = get_1(config, ["showTime"], get_1(configState, ["showTime"], true));
|
|
365
|
+
var isTime = index.get_1(config, ["showTime"], index.get_1(configState, ["showTime"], true));
|
|
340
366
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
341
367
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
342
|
-
var textColor = getTextColor(configState.theme);
|
|
343
|
-
return /*#__PURE__*/
|
|
368
|
+
var textColor = index.getTextColor(configState.theme);
|
|
369
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
344
370
|
"data-test-id": "publish-time",
|
|
345
|
-
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$7)
|
|
346
|
-
}, /*#__PURE__*/
|
|
371
|
+
className: "time arr--publish-time " + index._getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$7)
|
|
372
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
347
373
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
348
|
-
}, getTimeStamp(time, formatter, config))));
|
|
374
|
+
}, index.getTimeStamp(time, index.formatter, config))));
|
|
349
375
|
};
|
|
350
376
|
TimeStamp.propTypes = {
|
|
351
377
|
/** The Story Object from the API response */
|
|
352
|
-
story:
|
|
353
|
-
isBottom:
|
|
354
|
-
config:
|
|
378
|
+
story: PropTypes__default["default"].object,
|
|
379
|
+
isBottom: PropTypes__default["default"].bool,
|
|
380
|
+
config: PropTypes__default["default"].object
|
|
355
381
|
};
|
|
356
382
|
|
|
357
383
|
var _styleModuleImportMap$6 = {
|
|
@@ -377,27 +403,27 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
377
403
|
_ref$config = _ref.config,
|
|
378
404
|
config = _ref$config === void 0 ? {} : _ref$config;
|
|
379
405
|
var configData = useStateValue() || {};
|
|
380
|
-
var isAuthor = get_1(configData, ["showAuthor"], true);
|
|
406
|
+
var isAuthor = index.get_1(configData, ["showAuthor"], true);
|
|
381
407
|
|
|
382
|
-
var _get = get_1(story, ["authors", "0"], ""),
|
|
408
|
+
var _get = index.get_1(story, ["authors", "0"], ""),
|
|
383
409
|
avatarUrl = _get["avatar-url"],
|
|
384
410
|
avatarS3Key = _get["avatar-s3-key"],
|
|
385
411
|
authorName = _get.name,
|
|
386
412
|
slug = _get.slug;
|
|
387
413
|
|
|
388
414
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
389
|
-
var textColor = getTextColor(configData.theme);
|
|
390
|
-
var mountAt = get_1(config, ["mountAt"], "");
|
|
415
|
+
var textColor = index.getTextColor(configData.theme);
|
|
416
|
+
var mountAt = index.get_1(config, ["mountAt"], "");
|
|
391
417
|
|
|
392
418
|
var authorImage = function authorImage(dir) {
|
|
393
419
|
if (!avatarUrl && !avatarS3Key) {
|
|
394
420
|
return null;
|
|
395
421
|
}
|
|
396
422
|
|
|
397
|
-
return /*#__PURE__*/
|
|
423
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
398
424
|
"data-test-id": "author-image",
|
|
399
|
-
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$6)
|
|
400
|
-
}, /*#__PURE__*/
|
|
425
|
+
className: index._getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$6)
|
|
426
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
401
427
|
slug: avatarS3Key,
|
|
402
428
|
"aspect-ratio": [1, 1],
|
|
403
429
|
defaultWidth: 400,
|
|
@@ -405,49 +431,49 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
405
431
|
auto: ["format", "compress"]
|
|
406
432
|
},
|
|
407
433
|
alt: authorName
|
|
408
|
-
}) : /*#__PURE__*/
|
|
434
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
409
435
|
src: avatarUrl
|
|
410
436
|
})));
|
|
411
437
|
};
|
|
412
438
|
|
|
413
439
|
var isPrefix = function isPrefix(dir) {
|
|
414
440
|
if (prefix) {
|
|
415
|
-
return /*#__PURE__*/
|
|
416
|
-
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$6)
|
|
441
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
442
|
+
className: "arr-author-prefix " + index._getClassName("prefix ".concat(textColor), _styleModuleImportMap$6)
|
|
417
443
|
}, prefix);
|
|
418
444
|
}
|
|
419
445
|
|
|
420
446
|
return !hideAuthorImage && authorImage(dir);
|
|
421
447
|
};
|
|
422
448
|
|
|
423
|
-
return /*#__PURE__*/
|
|
449
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
424
450
|
href: "".concat(mountAt, "/author/") + slug,
|
|
425
451
|
"aria-label": "author-name",
|
|
426
|
-
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$6)
|
|
427
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
452
|
+
className: "author-name arr-author-name arrow-component " + index._getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$6)
|
|
453
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
428
454
|
"data-test-id": "author-name",
|
|
429
|
-
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$6)
|
|
455
|
+
className: "author-name " + index._getClassName("author-name ".concat(textColor), _styleModuleImportMap$6)
|
|
430
456
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
431
457
|
};
|
|
432
458
|
|
|
433
459
|
function mapStateToProps$1(state) {
|
|
434
460
|
return {
|
|
435
|
-
config: get_1(state, ["qt", "config"], {})
|
|
461
|
+
config: index.get_1(state, ["qt", "config"], {})
|
|
436
462
|
};
|
|
437
463
|
}
|
|
438
464
|
|
|
439
|
-
var Author = connect(mapStateToProps$1)(AuthorBase);
|
|
465
|
+
var Author = reactRedux.connect(mapStateToProps$1)(AuthorBase);
|
|
440
466
|
AuthorBase.propTypes = {
|
|
441
467
|
/** The Story Object from the API response */
|
|
442
|
-
story:
|
|
468
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
443
469
|
|
|
444
470
|
/** Hide Author Avatar Image */
|
|
445
|
-
hideAuthorImage:
|
|
471
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
446
472
|
// fix Author bottom of the storyCard
|
|
447
|
-
isBottom:
|
|
473
|
+
isBottom: PropTypes__default["default"].bool,
|
|
448
474
|
// fix prefix before the author name
|
|
449
|
-
prefix:
|
|
450
|
-
config:
|
|
475
|
+
prefix: PropTypes__default["default"].string,
|
|
476
|
+
config: PropTypes__default["default"].object
|
|
451
477
|
};
|
|
452
478
|
AuthorBase.defaultProps = {
|
|
453
479
|
hideAuthorImage: false,
|
|
@@ -468,14 +494,14 @@ var Dot = function Dot(_ref) {
|
|
|
468
494
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
469
495
|
_ref$color = _ref.color,
|
|
470
496
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
471
|
-
return /*#__PURE__*/
|
|
472
|
-
className: _getClassName(color, _styleModuleImportMap$5)
|
|
473
|
-
}, /*#__PURE__*/
|
|
497
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
498
|
+
className: index._getClassName(color, _styleModuleImportMap$5)
|
|
499
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
474
500
|
xmlns: "http://www.w3.org/2000/svg",
|
|
475
501
|
width: width,
|
|
476
502
|
height: height,
|
|
477
503
|
viewBox: "0 0 3 3"
|
|
478
|
-
}, /*#__PURE__*/
|
|
504
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
479
505
|
cx: "87",
|
|
480
506
|
cy: "9",
|
|
481
507
|
r: "1",
|
|
@@ -486,9 +512,9 @@ var Dot = function Dot(_ref) {
|
|
|
486
512
|
};
|
|
487
513
|
Dot.propTypes = {
|
|
488
514
|
/** height , width and color of the dot icon */
|
|
489
|
-
color:
|
|
490
|
-
width:
|
|
491
|
-
height:
|
|
515
|
+
color: PropTypes__default["default"].string,
|
|
516
|
+
width: PropTypes__default["default"].string,
|
|
517
|
+
height: PropTypes__default["default"].string
|
|
492
518
|
};
|
|
493
519
|
|
|
494
520
|
var _styleModuleImportMap$4 = {
|
|
@@ -504,22 +530,22 @@ var Divider = function Divider(_ref) {
|
|
|
504
530
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
505
531
|
_ref$color = _ref.color,
|
|
506
532
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
507
|
-
return /*#__PURE__*/
|
|
508
|
-
className: _getClassName(color, _styleModuleImportMap$4)
|
|
509
|
-
}, /*#__PURE__*/
|
|
533
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
534
|
+
className: index._getClassName(color, _styleModuleImportMap$4)
|
|
535
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
510
536
|
xmlns: "http://www.w3.org/2000/svg",
|
|
511
537
|
width: width,
|
|
512
538
|
height: height
|
|
513
|
-
}, /*#__PURE__*/
|
|
539
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
514
540
|
fill: "inherit",
|
|
515
541
|
d: "M0 0h1v10H0z"
|
|
516
542
|
})));
|
|
517
543
|
};
|
|
518
544
|
Divider.propTypes = {
|
|
519
545
|
/** height , width and color of the dot icon */
|
|
520
|
-
color:
|
|
521
|
-
width:
|
|
522
|
-
height:
|
|
546
|
+
color: PropTypes__default["default"].string,
|
|
547
|
+
width: PropTypes__default["default"].string,
|
|
548
|
+
height: PropTypes__default["default"].string
|
|
523
549
|
};
|
|
524
550
|
|
|
525
551
|
var _styleModuleImportMap$3 = {
|
|
@@ -537,28 +563,28 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
537
563
|
_ref$isLightTheme = _ref.isLightTheme,
|
|
538
564
|
isLightTheme = _ref$isLightTheme === void 0 ? false : _ref$isLightTheme;
|
|
539
565
|
var config = useStateValue() || {};
|
|
540
|
-
var showReadTime = get_1(config, ["showReadTime"]) || get_1(opts, ["showReadTime"], true);
|
|
541
|
-
var readTime = get_1(story, ["read-time"], 0);
|
|
542
|
-
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
566
|
+
var showReadTime = index.get_1(config, ["showReadTime"]) || index.get_1(opts, ["showReadTime"], true);
|
|
567
|
+
var readTime = index.get_1(story, ["read-time"], 0);
|
|
568
|
+
var textColor = isLightTheme ? "light" : index.getTextColor(config.theme);
|
|
543
569
|
if (!showReadTime || !readTime) return null;
|
|
544
|
-
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
545
|
-
return /*#__PURE__*/
|
|
570
|
+
var timeToRead = index.get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
571
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
546
572
|
"data-test-id": "read-time",
|
|
547
|
-
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$3)
|
|
548
|
-
}, /*#__PURE__*/
|
|
573
|
+
className: "arrow-component arr--read-time " + index._getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$3)
|
|
574
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
549
575
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
550
|
-
}, /*#__PURE__*/
|
|
576
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
551
577
|
color: textColor
|
|
552
|
-
})), /*#__PURE__*/
|
|
578
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
553
579
|
};
|
|
554
580
|
ReadTime.propTypes = {
|
|
555
|
-
story:
|
|
556
|
-
"read-time":
|
|
581
|
+
story: PropTypes__default["default"].shape({
|
|
582
|
+
"read-time": PropTypes__default["default"].number
|
|
557
583
|
}),
|
|
558
|
-
opts:
|
|
559
|
-
showReadTime:
|
|
584
|
+
opts: PropTypes__default["default"].shape({
|
|
585
|
+
showReadTime: PropTypes__default["default"].bool
|
|
560
586
|
}),
|
|
561
|
-
isLightTheme:
|
|
587
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
562
588
|
};
|
|
563
589
|
|
|
564
590
|
var _styleModuleImportMap$2 = {
|
|
@@ -580,42 +606,42 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
580
606
|
config = _ref$config === void 0 ? {} : _ref$config,
|
|
581
607
|
isLightTheme = _ref.isLightTheme;
|
|
582
608
|
var configState = useStateValue() || {};
|
|
583
|
-
var isAuthor = get_1(config, ["showAuthor"], get_1(configState, ["showAuthor"], true));
|
|
584
|
-
var isTime = get_1(config, ["showTime"], get_1(configState, ["showTime"], true));
|
|
585
|
-
var isReadTime = get_1(configState, ["showReadTime"], true);
|
|
609
|
+
var isAuthor = index.get_1(config, ["showAuthor"], index.get_1(configState, ["showAuthor"], true));
|
|
610
|
+
var isTime = index.get_1(config, ["showTime"], index.get_1(configState, ["showTime"], true));
|
|
611
|
+
var isReadTime = index.get_1(configState, ["showReadTime"], true);
|
|
586
612
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
587
613
|
var seperatorStyle = separator === "dot" ? "dot" : "dash";
|
|
588
|
-
var textColor = isLightTheme ? "light" : getTextColor(configState.theme);
|
|
614
|
+
var textColor = isLightTheme ? "light" : index.getTextColor(configState.theme);
|
|
589
615
|
|
|
590
616
|
var getSeparator = function getSeparator() {
|
|
591
617
|
if (separator === "divider") {
|
|
592
|
-
return /*#__PURE__*/
|
|
618
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
593
619
|
color: textColor
|
|
594
620
|
});
|
|
595
621
|
}
|
|
596
622
|
|
|
597
|
-
return /*#__PURE__*/
|
|
623
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
598
624
|
color: textColor
|
|
599
625
|
});
|
|
600
626
|
};
|
|
601
627
|
|
|
602
628
|
var getTimeStamp = function getTimeStamp() {
|
|
603
629
|
if (!isTime) return null;
|
|
604
|
-
return /*#__PURE__*/
|
|
605
|
-
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$2)
|
|
606
|
-
}, getSeparator()), /*#__PURE__*/
|
|
630
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
631
|
+
className: "arr-separator " + index._getClassName("".concat(seperatorStyle), _styleModuleImportMap$2)
|
|
632
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
607
633
|
story: story,
|
|
608
634
|
config: config
|
|
609
|
-
}), isReadTime && /*#__PURE__*/
|
|
635
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
610
636
|
story: story,
|
|
611
637
|
opts: config,
|
|
612
638
|
isLightTheme: isLightTheme
|
|
613
639
|
}));
|
|
614
640
|
};
|
|
615
641
|
|
|
616
|
-
return /*#__PURE__*/
|
|
617
|
-
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$2)
|
|
618
|
-
}, isAuthor ? /*#__PURE__*/
|
|
642
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
643
|
+
className: "arr--author-time " + index._getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$2)
|
|
644
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
619
645
|
story: story,
|
|
620
646
|
isBottom: true,
|
|
621
647
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -623,19 +649,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
623
649
|
}), getTimeStamp()) : getTimeStamp());
|
|
624
650
|
};
|
|
625
651
|
AuthorWithTime.propTypes = {
|
|
626
|
-
story:
|
|
652
|
+
story: PropTypes__default["default"].object,
|
|
627
653
|
|
|
628
654
|
/** Style of separator between the Author & Timestamp */
|
|
629
|
-
separator:
|
|
655
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
630
656
|
|
|
631
657
|
/** hide the author image */
|
|
632
|
-
hideAuthorImage:
|
|
658
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
633
659
|
// fix author and time at the end
|
|
634
|
-
isBottom:
|
|
660
|
+
isBottom: PropTypes__default["default"].bool,
|
|
635
661
|
// fix prefix before the author name
|
|
636
|
-
prefix:
|
|
637
|
-
config:
|
|
638
|
-
isLightTheme:
|
|
662
|
+
prefix: PropTypes__default["default"].string,
|
|
663
|
+
config: PropTypes__default["default"].object,
|
|
664
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
639
665
|
};
|
|
640
666
|
AuthorWithTime.defaultProps = {
|
|
641
667
|
separator: "dot",
|
|
@@ -670,18 +696,18 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
670
696
|
_ref$navigate = _ref.navigate,
|
|
671
697
|
navigate = _ref$navigate === void 0 ? true : _ref$navigate;
|
|
672
698
|
var collectionTitle = useStateValue() || {};
|
|
673
|
-
var showRowTitle = get_1(collectionTitle, ["showRowTitle"], true);
|
|
699
|
+
var showRowTitle = index.get_1(collectionTitle, ["showRowTitle"], true);
|
|
674
700
|
var supportedTemplates = ["borderLeft", "borderBottom", "crossLine", "borderBottomFull"];
|
|
675
701
|
var templateStyle = supportedTemplates.includes(collectionNameTemplate) ? " collection-".concat(collectionNameTemplate) : "";
|
|
676
|
-
var slug = navigate && collection && getSlug(collection, config) || "";
|
|
702
|
+
var slug = navigate && collection && index.getSlug(collection, config) || "";
|
|
677
703
|
var collectionName = customCollectionName || collection.name || "";
|
|
678
|
-
var textColor = getTextColor(collectionTitle.theme);
|
|
704
|
+
var textColor = index.getTextColor(collectionTitle.theme);
|
|
679
705
|
var HeaderTag = "h" + headerLevel;
|
|
680
|
-
var CollectionNameBorderColor = rgbToHex(collectionNameBorderColor);
|
|
706
|
+
var CollectionNameBorderColor = index.rgbToHex(collectionNameBorderColor);
|
|
681
707
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
682
708
|
|
|
683
709
|
var borderBottomStyle = function borderBottomStyle() {
|
|
684
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
710
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
685
711
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
686
712
|
style: {
|
|
687
713
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -689,7 +715,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
689
715
|
}) : "";
|
|
690
716
|
};
|
|
691
717
|
|
|
692
|
-
var isMobile = clientWidth("mobile");
|
|
718
|
+
var isMobile = index.clientWidth("mobile");
|
|
693
719
|
|
|
694
720
|
var getBorderHeight = function getBorderHeight() {
|
|
695
721
|
if (isMobile) {
|
|
@@ -741,40 +767,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
741
767
|
}
|
|
742
768
|
};
|
|
743
769
|
|
|
744
|
-
return /*#__PURE__*/
|
|
770
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
745
771
|
style: {
|
|
746
772
|
borderBottom: borderBottomFullStyle
|
|
747
773
|
},
|
|
748
774
|
"data-test-id": "collection-name",
|
|
749
|
-
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$1)
|
|
750
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
775
|
+
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + index._getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$1)
|
|
776
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
751
777
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
752
778
|
style: {
|
|
753
779
|
color: CollectionNameBorderColor,
|
|
754
780
|
fontSize: getBorderHeight()
|
|
755
781
|
}
|
|
756
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
782
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
757
783
|
href: slug,
|
|
758
784
|
"aria-label": "collection-name"
|
|
759
|
-
}, /*#__PURE__*/
|
|
785
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
760
786
|
};
|
|
761
787
|
CollectionNameBase.propTypes = {
|
|
762
788
|
/** Collection name border color */
|
|
763
|
-
collectionNameBorderColor: PropTypes
|
|
789
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
764
790
|
|
|
765
791
|
/** The Collection Object from the API response */
|
|
766
|
-
collection: PropTypes
|
|
792
|
+
collection: PropTypes.PropTypes.object,
|
|
767
793
|
|
|
768
794
|
/** The publisher config from the API response */
|
|
769
|
-
config: PropTypes
|
|
795
|
+
config: PropTypes.PropTypes.object,
|
|
770
796
|
|
|
771
797
|
/** The style template for the component */
|
|
772
|
-
collectionNameTemplate: PropTypes
|
|
798
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
773
799
|
|
|
774
800
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
775
|
-
headerLevel: PropTypes
|
|
776
|
-
customCollectionName: PropTypes
|
|
777
|
-
navigate: PropTypes
|
|
801
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
802
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
803
|
+
navigate: PropTypes.PropTypes.bool
|
|
778
804
|
};
|
|
779
805
|
CollectionNameBase.defaultProps = {
|
|
780
806
|
collectionNameTemplate: "",
|
|
@@ -783,11 +809,11 @@ CollectionNameBase.defaultProps = {
|
|
|
783
809
|
|
|
784
810
|
function mapStateToProps(state) {
|
|
785
811
|
return {
|
|
786
|
-
config: get_1(state, ["qt", "config"], {})
|
|
812
|
+
config: index.get_1(state, ["qt", "config"], {})
|
|
787
813
|
};
|
|
788
814
|
}
|
|
789
815
|
|
|
790
|
-
var CollectionName = connect(mapStateToProps)(CollectionNameBase);
|
|
816
|
+
var CollectionName = reactRedux.connect(mapStateToProps)(CollectionNameBase);
|
|
791
817
|
|
|
792
818
|
function _defineProperty(obj, key, value) {
|
|
793
819
|
if (key in obj) {
|
|
@@ -834,28 +860,28 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
834
860
|
_config$customUrlPath = config.customUrlPath,
|
|
835
861
|
customUrlPath = _config$customUrlPath === void 0 ? "" : _config$customUrlPath;
|
|
836
862
|
if (!showButton) return null;
|
|
837
|
-
var textColor = getTextColor(theme);
|
|
838
|
-
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
|
|
839
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
863
|
+
var textColor = index.getTextColor(theme);
|
|
864
|
+
var slug = customUrlPath ? "/".concat(customUrlPath) : index.generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
|
|
865
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
840
866
|
onClick: onClick,
|
|
841
867
|
"data-test-id": "load-more",
|
|
842
|
-
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap)
|
|
843
|
-
}, buttonText) : /*#__PURE__*/
|
|
868
|
+
className: "arr--button " + index._getClassName("button ".concat(textColor, " default"), _styleModuleImportMap)
|
|
869
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
844
870
|
href: slug,
|
|
845
871
|
navigateTo: navigate,
|
|
846
872
|
"data-test-id": "load-more",
|
|
847
873
|
"aria-label": "load-more"
|
|
848
|
-
}, /*#__PURE__*/
|
|
849
|
-
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap)
|
|
874
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
875
|
+
className: "arr--button " + index._getClassName("button ".concat(textColor, " default"), _styleModuleImportMap)
|
|
850
876
|
}, buttonText));
|
|
851
877
|
};
|
|
852
878
|
LoadmoreButton.propTypes = {
|
|
853
|
-
collection:
|
|
854
|
-
template:
|
|
855
|
-
config:
|
|
856
|
-
onClick:
|
|
857
|
-
navigate:
|
|
858
|
-
qtConfig:
|
|
879
|
+
collection: PropTypes__default["default"].object,
|
|
880
|
+
template: PropTypes__default["default"].string,
|
|
881
|
+
config: PropTypes__default["default"].object,
|
|
882
|
+
onClick: PropTypes__default["default"].func,
|
|
883
|
+
navigate: PropTypes__default["default"].func,
|
|
884
|
+
qtConfig: PropTypes__default["default"].object
|
|
859
885
|
};
|
|
860
886
|
|
|
861
887
|
var isClient = typeof window !== "undefined";
|
|
@@ -867,7 +893,7 @@ var hasIntersectionObserverSupport = function hasIntersectionObserverSupport() {
|
|
|
867
893
|
|
|
868
894
|
|
|
869
895
|
var getIntersectionObserver = function getIntersectionObserver() {
|
|
870
|
-
return Promise.resolve(isClient && !hasIntersectionObserverSupport() &&
|
|
896
|
+
return Promise.resolve(isClient && !hasIntersectionObserverSupport() && Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('intersection-observer')); }));
|
|
871
897
|
}; // options for intersection observer in order to improve the effect
|
|
872
898
|
|
|
873
899
|
|
|
@@ -900,12 +926,12 @@ var getObserver = function getObserver() {
|
|
|
900
926
|
var useNearScreen = (function (_ref) {
|
|
901
927
|
var ref = _ref.ref;
|
|
902
928
|
|
|
903
|
-
var _useState = useState(false),
|
|
904
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
929
|
+
var _useState = React.useState(false),
|
|
930
|
+
_useState2 = index._slicedToArray(_useState, 2),
|
|
905
931
|
show = _useState2[0],
|
|
906
932
|
setShow = _useState2[1];
|
|
907
933
|
|
|
908
|
-
useEffect(function () {
|
|
934
|
+
React.useEffect(function () {
|
|
909
935
|
var current = ref.current;
|
|
910
936
|
if (!current) return; // get observer async and only when needed
|
|
911
937
|
|
|
@@ -932,36 +958,36 @@ var EMPTY_HTML = {
|
|
|
932
958
|
var isServer = typeof window === "undefined";
|
|
933
959
|
var ProgressiveHydration = function ProgressiveHydration(props) {
|
|
934
960
|
var children = props.children;
|
|
935
|
-
var ref = useRef(null);
|
|
961
|
+
var ref = React.useRef(null);
|
|
936
962
|
var isNearScreen = useNearScreen({
|
|
937
963
|
ref: ref
|
|
938
964
|
});
|
|
939
|
-
useEffect(function () {
|
|
965
|
+
React.useEffect(function () {
|
|
940
966
|
var el = ref.current; // CLIENT:
|
|
941
967
|
// If we want to force the hydration OR the element is near screen
|
|
942
968
|
// then we hydrate the content to get the functionality ready
|
|
943
969
|
|
|
944
970
|
if (isNearScreen) {
|
|
945
971
|
var action = el.hasChildNodes() ? "hydrate" : "render";
|
|
946
|
-
|
|
972
|
+
ReactDOM__default["default"][action](children, el);
|
|
947
973
|
}
|
|
948
974
|
}, [children, isNearScreen]); // SERVER: Just render the content as usual
|
|
949
975
|
|
|
950
976
|
if (isServer) {
|
|
951
|
-
return /*#__PURE__*/
|
|
977
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
952
978
|
ref: ref
|
|
953
979
|
}, children);
|
|
954
980
|
} // CLIENT: Avoid hydration until we say so
|
|
955
981
|
|
|
956
982
|
|
|
957
|
-
return /*#__PURE__*/
|
|
983
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
958
984
|
ref: ref,
|
|
959
985
|
suppressHydrationWarning: true,
|
|
960
986
|
dangerouslySetInnerHTML: EMPTY_HTML
|
|
961
987
|
});
|
|
962
988
|
};
|
|
963
989
|
ProgressiveHydration.propTypes = {
|
|
964
|
-
children:
|
|
990
|
+
children: PropTypes__default["default"].element
|
|
965
991
|
};
|
|
966
992
|
|
|
967
993
|
var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
@@ -969,7 +995,7 @@ var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
|
969
995
|
componentName = _ref.componentName,
|
|
970
996
|
offset = _ref.offset,
|
|
971
997
|
limit = _ref.limit;
|
|
972
|
-
return /*#__PURE__*/
|
|
998
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
973
999
|
id: "ELM-".concat(collection.id),
|
|
974
1000
|
"data-collection-slug": collection["slug"],
|
|
975
1001
|
"data-component-name": componentName,
|
|
@@ -978,13 +1004,22 @@ var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
|
978
1004
|
});
|
|
979
1005
|
};
|
|
980
1006
|
LoadMoreTarget.propTypes = {
|
|
981
|
-
collection:
|
|
982
|
-
id:
|
|
983
|
-
slug:
|
|
1007
|
+
collection: PropTypes__default["default"].shape({
|
|
1008
|
+
id: PropTypes__default["default"].string,
|
|
1009
|
+
slug: PropTypes__default["default"].string
|
|
984
1010
|
}),
|
|
985
|
-
componentName:
|
|
986
|
-
offset:
|
|
987
|
-
limit:
|
|
1011
|
+
componentName: PropTypes__default["default"].string,
|
|
1012
|
+
offset: PropTypes__default["default"].number,
|
|
1013
|
+
limit: PropTypes__default["default"].number
|
|
988
1014
|
};
|
|
989
1015
|
|
|
990
|
-
|
|
1016
|
+
exports.Author = Author;
|
|
1017
|
+
exports.AuthorWithTime = AuthorWithTime;
|
|
1018
|
+
exports.CollectionName = CollectionName;
|
|
1019
|
+
exports.Headline = Headline;
|
|
1020
|
+
exports.LoadMoreTarget = LoadMoreTarget;
|
|
1021
|
+
exports.LoadmoreButton = LoadmoreButton;
|
|
1022
|
+
exports.ProgressiveHydration = ProgressiveHydration;
|
|
1023
|
+
exports.StateProvider = StateProvider;
|
|
1024
|
+
exports._defineProperty = _defineProperty;
|
|
1025
|
+
exports.useStateValue = useStateValue;
|