@quintype/arrow 3.15.1-perf.3 → 3.15.1-perf.4
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 +14 -2103
- package/atoms/Author/styles.arrow.css +1 -1
- package/atoms/AuthorWithTime/index.js +32 -2482
- package/atoms/AuthorWithTime/styles.arrow.css +1 -1
- package/atoms/CollectionName/index.js +12 -2101
- package/atoms/CollectionName/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/{index-b22f1843.js → index-0f809dd9.js} +10 -7
- package/atoms/ExtendedLoadMore/index-142f015c.js +476 -0
- package/atoms/ExtendedLoadMore/{index-bc129cb8.js → index-37a9ccff.js} +18 -10
- package/atoms/ExtendedLoadMore/{index-6e083738.js → index-446679c8.js} +20 -12
- package/atoms/ExtendedLoadMore/{index-9e0d32b7.js → index-44f97338.js} +19 -9
- package/atoms/ExtendedLoadMore/{index-b5936059.js → index-57dd4870.js} +15 -7
- package/atoms/ExtendedLoadMore/{index-fee73a14.js → index-66dd4dbd.js} +15 -7
- package/atoms/ExtendedLoadMore/{index-5c8eda4a.js → index-8462c597.js} +21 -16
- package/atoms/ExtendedLoadMore/{index-3c4ac692.js → index-93cb06d1.js} +42 -51
- package/atoms/ExtendedLoadMore/{index-4ddfe28d.js → index-afd44863.js} +6 -4
- package/atoms/ExtendedLoadMore/{index-3976fac4.js → index-b5754c5d.js} +20 -14
- package/atoms/ExtendedLoadMore/{index-a5c95f84.js → index-bbaf526e.js} +16 -8
- package/atoms/ExtendedLoadMore/{index-6ecceae4.js → index-cfb262ef.js} +18 -9
- package/atoms/ExtendedLoadMore/index.js +8 -1
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +14 -2103
- package/atoms/Headline/styles.arrow.css +1 -1
- package/atoms/HeroImage/index.js +22 -2170
- package/atoms/HeroImage/styles.arrow.css +1 -1
- package/atoms/LoadmoreButton/index.js +12 -2114
- package/atoms/LoadmoreButton/styles.arrow.css +1 -1
- package/atoms/ScrollSnap/index.js +17 -2178
- package/atoms/ScrollSnap/styles.arrow.css +1 -1
- package/atoms/SectionTag/index.js +10 -2099
- package/atoms/SectionTag/styles.arrow.css +1 -1
- package/atoms/Subheadline/index.js +8 -2097
- package/atoms/Subheadline/styles.arrow.css +1 -1
- package/atoms/TimeStamp/index.js +13 -2463
- package/atoms/TimeStamp/styles.arrow.css +1 -1
- package/molecules/KeyEvents/index.js +23 -2545
- package/molecules/KeyEvents/styles.arrow.css +1 -1
- package/molecules/PageIntroductionCard/index.js +17 -2454
- package/molecules/PageIntroductionCard/styles.arrow.css +1 -1
- package/molecules/SocialShareTemplate/index.js +144 -2740
- package/molecules/SocialShareTemplate/styles.arrow.css +1 -1
- package/molecules/StoryCard/index.js +64 -2582
- package/molecules/StoryCard/styles.arrow.css +1 -1
- package/molecules/StoryElementCard/index.js +123 -2893
- package/molecules/StoryElementCard/styles.arrow.css +1 -1
- package/molecules/StorycardContent/index.js +45 -2495
- package/molecules/StorycardContent/styles.arrow.css +1 -1
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +92 -2659
- package/rows/AlternateCollectionFilter/styles.arrow.css +1 -1
- package/rows/AsideCollection/index.js +92 -2659
- package/rows/AsideCollection/styles.arrow.css +1 -1
- package/rows/AstrologyCollection/index.js +89 -2656
- package/rows/AstrologyCollection/styles.arrow.css +1 -1
- package/rows/AuthorIntroductionCard/index.js +27 -2743
- package/rows/AuthorIntroductionCard/styles.arrow.css +1 -1
- package/rows/AuthorsList/index.js +34 -2763
- package/rows/AuthorsList/styles.arrow.css +1 -1
- package/rows/CollectionFilter/index.js +91 -2658
- package/rows/CollectionFilter/styles.arrow.css +1 -1
- package/rows/ElevenStories/index.js +81 -2612
- package/rows/ElevenStories/styles.arrow.css +1 -1
- package/rows/FourColFiveStories/index.js +75 -2603
- package/rows/FourColFiveStories/styles.arrow.css +1 -1
- package/rows/FourColGrid/index.js +92 -2623
- package/rows/FourColGrid/styles.arrow.css +1 -1
- package/rows/FourColPortraitStories/index.js +91 -2622
- package/rows/FourColPortraitStories/styles.arrow.css +1 -1
- package/rows/FourColSixteenStories/index.js +80 -2617
- package/rows/FourColSixteenStories/styles.arrow.css +1 -1
- package/rows/FourColTwelveStories/index.js +72 -2596
- package/rows/FourColTwelveStories/styles.arrow.css +1 -1
- package/rows/FourStorySlider/index.js +84 -2615
- package/rows/FourStorySlider/styles.arrow.css +1 -1
- package/rows/FourStorySliderPortrait/index.js +84 -2615
- package/rows/FourStorySliderPortrait/styles.arrow.css +1 -1
- package/rows/FourTabbedBigStorySlider/index.js +80 -2611
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +1 -1
- package/rows/FullScreenSlider/index.js +85 -2616
- package/rows/FullScreenSlider/styles.arrow.css +1 -1
- package/rows/HalfScreenSlider/index.js +81 -2612
- package/rows/HalfScreenSlider/styles.arrow.css +1 -1
- package/rows/ListComponent/index.js +75 -2606
- package/rows/ListComponent/styles.arrow.css +1 -1
- package/rows/Listicles/index.js +38 -2235
- package/rows/Listicles/styles.arrow.css +1 -1
- package/rows/MagazineEditions/index.js +24 -2487
- package/rows/MagazineEditions/styles.arrow.css +1 -1
- package/rows/MagazineHeaderCard/index.js +26 -2489
- package/rows/MagazineHeaderCard/styles.arrow.css +1 -1
- package/rows/MagazineWidget/index.js +81 -2612
- package/rows/MagazineWidget/styles.arrow.css +1 -1
- package/rows/OneColStoryList/index.js +92 -2623
- package/rows/OneColStoryList/styles.arrow.css +1 -1
- package/rows/OpinionCollection/index.js +61 -2583
- package/rows/OpinionCollection/styles.arrow.css +1 -1
- package/rows/SixColSixStories/index.js +91 -2622
- package/rows/SixColSixStories/styles.arrow.css +1 -1
- package/rows/StoryCollection/index.js +92 -2659
- package/rows/StoryCollection/styles.arrow.css +1 -1
- package/rows/TagIntroductionCard/index.js +9 -1816
- package/rows/TagIntroductionCard/styles.arrow.css +1 -1
- package/rows/ThreeColFlexStories/index.js +91 -2622
- package/rows/ThreeColFlexStories/styles.arrow.css +1 -1
- package/rows/ThreeColFourteenStories/index.js +72 -2596
- package/rows/ThreeColFourteenStories/styles.arrow.css +1 -1
- package/rows/ThreeColGrid/index.js +94 -2625
- package/rows/ThreeColGrid/styles.arrow.css +1 -1
- package/rows/ThreeColSevenStory/index.js +84 -2615
- package/rows/ThreeColSevenStory/styles.arrow.css +1 -1
- package/rows/ThreeColSixStories/index.js +76 -2607
- package/rows/ThreeColSixStories/styles.arrow.css +1 -1
- package/rows/ThreeColTwelveStories/index.js +80 -2617
- package/rows/ThreeColTwelveStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStories/index.js +78 -2609
- package/rows/TwoColFourStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStoryHighlight/index.js +80 -2617
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +1 -1
- package/rows/TwoColSevenStories/index.js +77 -2608
- package/rows/TwoColSevenStories/styles.arrow.css +1 -1
- package/rows/TwoColSixStories/index.js +82 -2619
- package/rows/TwoColSixStories/styles.arrow.css +1 -1
- package/rows/TwoColTenStoriesSidebar/index.js +79 -2610
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +1 -1
- package/rows/TwoColThreeStories/index.js +75 -2606
- package/rows/TwoColThreeStories/styles.arrow.css +1 -1
- package/story-elements/AlsoRead/index.js +24 -2170
- package/story-elements/AlsoRead/styles.arrow.css +1 -1
- package/story-elements/Attachment/index.js +15 -1870
- package/story-elements/Attachment/styles.arrow.css +1 -1
- package/story-elements/BigFact/index.js +16 -1871
- package/story-elements/BigFact/styles.arrow.css +1 -1
- package/story-elements/BlockQuote/index.js +20 -2157
- package/story-elements/BlockQuote/styles.arrow.css +1 -1
- package/story-elements/Blurb/index.js +18 -1932
- package/story-elements/Blurb/styles.arrow.css +1 -1
- package/story-elements/Image/index.js +42 -2251
- package/story-elements/Image/styles.arrow.css +1 -1
- package/story-elements/ImageGallery/index.js +45 -2254
- package/story-elements/ImageGallery/styles.arrow.css +1 -1
- package/story-elements/ImageSlideshow/index.js +48 -2257
- package/story-elements/ImageSlideshow/styles.arrow.css +1 -1
- package/story-elements/QuestionAnswer/index.js +26 -2163
- package/story-elements/QuestionAnswer/styles.arrow.css +1 -1
- package/story-elements/Quote/index.js +17 -1872
- package/story-elements/Quote/styles.arrow.css +1 -1
- package/story-elements/Reference/index.js +15 -1870
- package/story-elements/Reference/styles.arrow.css +1 -1
- package/story-elements/StoryElement/index.js +12 -1725
- package/story-elements/Summary/index.js +18 -1873
- package/story-elements/Summary/styles.arrow.css +1 -1
- package/story-elements/Text/index.js +16 -2153
- package/story-elements/Text/styles.arrow.css +1 -1
- package/story-elements/Video/index.js +12 -1725
- package/story-elements/Video/styles.arrow.css +1 -1
- package/story-templates/ListicleStoryTemplate/index.js +282 -3167
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +504 -3389
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/PhotoStoryTemplate/index.js +287 -3172
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/TextStoryTemplate/index.js +416 -3301
- package/story-templates/TextStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/VideoStoryTemplate/index.js +382 -3267
- package/story-templates/VideoStoryTemplate/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/index-e7cde739.js +0 -3051
|
@@ -1 +1 @@
|
|
|
1
|
-
.collection-name-
|
|
1
|
+
.collection-name-m_collection__2xOPW{font-size:var(--arrow-fs-m);font-weight:var(--arrow-fw-bold);margin-bottom:var(--arrow-spacing-m)}@media (min-width:768px){.collection-name-m_collection__2xOPW{font-size:var(--arrow-fs-l);margin-bottom:var(--arrow-spacing-l)}}.collection-name-m_collection-borderLeft__sm2OQ{align-items:baseline;display:flex}.collection-name-m_collection-borderLeft__sm2OQ .collection-name-m_border-left__0j0qr{margin-right:var(--arrow-spacing-xs);min-width:5px;overflow:hidden;width:5px}.collection-name-m_collection-borderLeft__sm2OQ .collection-name-m_border-left__0j0qr:before{content:"I";font-family:var(--arrow-sans-serif)}.collection-name-m_collection-borderBottomFull__8-REi{display:inline-block}.collection-name-m_collection-borderBottom__QM0lv{display:block}.collection-name-m_collection-crossLine__gO4l0{align-items:center;display:flex}.collection-name-m_collection-crossLine__gO4l0:before{border-top:1px solid var(--arrow-c-mono5);content:" ";flex:1 1 auto;margin-right:var(--arrow-spacing-l);position:relative}.collection-name-m_collection-crossLine__gO4l0:after{border-top:1px solid var(--arrow-c-mono5);content:" ";flex:1 1 auto;margin-left:var(--arrow-spacing-l);position:relative}html[dir=rtl] .collection-name-m_collection-borderLeft__sm2OQ .collection-name-m_border-left__0j0qr{margin-left:var(--arrow-spacing-xs);margin-right:0}html[dir=rtl] .collection-name-m_collection-crossLine__gO4l0:before{margin-left:var(--arrow-spacing-l);margin-right:0}html[dir=rtl] .collection-name-m_collection-crossLine__gO4l0:after{margin-left:0;margin-right:var(--arrow-spacing-l)}.collection-name-m_border-bottom__i9Gqk{height:4px;margin-top:var(--arrow-spacing-xxs);width:20px}.collection-name-m_collection-crossLine__gO4l0 .collection-name-m_border-bottom__i9Gqk{visibility:hidden}.collection-name-m_dark__VlJO3 a,.collection-name-m_dark__VlJO3 h2,.collection-name-m_dark__VlJO3 h3,.collection-name-m_dark__VlJO3 h5{color:var(--arrow-c-mono2)}.collection-name-m_light__xsoWS a,.collection-name-m_light__xsoWS h2,.collection-name-m_light__xsoWS h3,.collection-name-m_light__xsoWS h5{color:var(--arrow-c-invert-mono2)}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-93cb06d1.js');
|
|
6
6
|
var PropTypes = require('prop-types');
|
|
7
|
-
var
|
|
7
|
+
var lodash = require('lodash');
|
|
8
|
+
var index$1 = require('./index-142f015c.js');
|
|
9
|
+
var index$2 = require('./index-8462c597.js');
|
|
8
10
|
|
|
9
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
12
|
|
|
13
|
+
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
11
14
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
15
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
13
16
|
|
|
@@ -28,7 +31,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
28
31
|
forceShowAtom = _ref.forceShowAtom,
|
|
29
32
|
showFullContent = _ref.showFullContent;
|
|
30
33
|
var config = index.useStateValue() || {};
|
|
31
|
-
var subheadline = forceShowAtom ||
|
|
34
|
+
var subheadline = forceShowAtom || lodash.get(config, ["showSubheadline"], true);
|
|
32
35
|
if (!subheadline) return null;
|
|
33
36
|
var textColor = index$1.getTextColor(config.theme);
|
|
34
37
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -36,7 +39,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
36
39
|
WebkitLineClamp: lineClamp
|
|
37
40
|
},
|
|
38
41
|
"data-test-id": "subheadline",
|
|
39
|
-
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") +
|
|
42
|
+
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") + _getClassName__default["default"]("subheadline ".concat(textColor), _styleModuleImportMap$1)
|
|
40
43
|
}, showFullContent || typeof lineClamp === "number" ? story.subheadline : index$1.truncate(story.subheadline, truncateChars, true));
|
|
41
44
|
};
|
|
42
45
|
Subheadline.propTypes = {
|
|
@@ -128,7 +131,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
128
131
|
backgroundColor: theme,
|
|
129
132
|
color: textColor
|
|
130
133
|
},
|
|
131
|
-
className: "arr--story-card " +
|
|
134
|
+
className: "arr--story-card " + _getClassName__default["default"]("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap)
|
|
132
135
|
}, children || defaultStorycard);
|
|
133
136
|
};
|
|
134
137
|
|
|
@@ -169,7 +172,7 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
169
172
|
isHorizontalMobile: isHorizontalMobile,
|
|
170
173
|
aspectRatio: aspectRatio
|
|
171
174
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
172
|
-
className: "arr--story-content " +
|
|
175
|
+
className: "arr--story-content " + _getClassName__default["default"]("content ".concat(alignment), _styleModuleImportMap)
|
|
173
176
|
}, /*#__PURE__*/React__default["default"].createElement(index$2.SectionTag, {
|
|
174
177
|
story: story,
|
|
175
178
|
borderColor: SectionTagborderColor
|
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
4
|
+
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
5
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
6
|
+
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
7
|
+
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
8
|
+
var lodash = require('lodash');
|
|
9
|
+
var PropTypes = require('prop-types');
|
|
10
|
+
var React = require('react');
|
|
11
|
+
var _typeof = require('@babel/runtime/helpers/typeof');
|
|
12
|
+
var Timeago = require('react-timeago');
|
|
13
|
+
var dateFnsTz = require('date-fns-tz');
|
|
14
|
+
|
|
15
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
|
+
|
|
17
|
+
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
18
|
+
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
19
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
20
|
+
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
21
|
+
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
22
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
23
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
|
+
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
25
|
+
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
26
|
+
|
|
27
|
+
function truncate() {
|
|
28
|
+
var string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
29
|
+
var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
|
|
30
|
+
var ellipsis = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
31
|
+
var putEllipsis = ellipsis ? " ..." : "";
|
|
32
|
+
return typeof string === "string" && string.length > limit ? string.substring(0, limit) + putEllipsis : string;
|
|
33
|
+
}
|
|
34
|
+
var timestampToFormat = function timestampToFormat(value, unit, suffix, timestamp) {
|
|
35
|
+
var config = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
36
|
+
var _config$showTime = config.showTime,
|
|
37
|
+
showTime = _config$showTime === void 0 ? false : _config$showTime,
|
|
38
|
+
_config$isTimeFirst = config.isTimeFirst,
|
|
39
|
+
isTimeFirst = _config$isTimeFirst === void 0 ? false : _config$isTimeFirst,
|
|
40
|
+
_config$isUpperCase = config.isUpperCase,
|
|
41
|
+
isUpperCase = _config$isUpperCase === void 0 ? false : _config$isUpperCase,
|
|
42
|
+
_config$disableMeridi = config.disableMeridiem,
|
|
43
|
+
disableMeridiem = _config$disableMeridi === void 0 ? false : _config$disableMeridi,
|
|
44
|
+
_config$timeFormat = config.timeFormat,
|
|
45
|
+
timeFormat = _config$timeFormat === void 0 ? "12hours" : _config$timeFormat;
|
|
46
|
+
var monthList = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
47
|
+
var dateTime = new Date(timestamp);
|
|
48
|
+
var date = dateTime.getDate().toString().padStart(2, 0);
|
|
49
|
+
var month = monthList[dateTime.getMonth()];
|
|
50
|
+
var localizedMonth = month;
|
|
51
|
+
|
|
52
|
+
if (isUpperCase) {
|
|
53
|
+
localizedMonth = lodash.upperCase(month);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
var year = dateTime.getFullYear();
|
|
57
|
+
var localizedMeridiem = config.localizedMeridiem,
|
|
58
|
+
localizedMonths = config.localizedMonths,
|
|
59
|
+
_config$direction = config.direction,
|
|
60
|
+
direction = _config$direction === void 0 ? "ltr" : _config$direction;
|
|
61
|
+
var time = formatAMPM(timestamp, timeFormat);
|
|
62
|
+
var timeWithLocalizedMeridiem = time;
|
|
63
|
+
var timetoShow;
|
|
64
|
+
|
|
65
|
+
if (localizedMonths) {
|
|
66
|
+
localizedMonth = lodash.get(localizedMonths, [lodash.lowerCase(month)]) || month;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (localizedMeridiem) {
|
|
70
|
+
var isAm = time.includes("am");
|
|
71
|
+
var _localizedMeridiem$am = localizedMeridiem.am,
|
|
72
|
+
am = _localizedMeridiem$am === void 0 ? "am" : _localizedMeridiem$am,
|
|
73
|
+
_localizedMeridiem$pm = localizedMeridiem.pm,
|
|
74
|
+
pm = _localizedMeridiem$pm === void 0 ? "pm" : _localizedMeridiem$pm;
|
|
75
|
+
timeWithLocalizedMeridiem = (isAm ? time.replace("am", am) : time.replace("pm", pm)) || time;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (direction === "rtl") {
|
|
79
|
+
timetoShow = showTime ? "".concat(timeWithLocalizedMeridiem) : "";
|
|
80
|
+
return "".concat(date, " ").concat(localizedMonth, ", ").concat(year, " ").concat(timetoShow, " ");
|
|
81
|
+
} else {
|
|
82
|
+
if (disableMeridiem) {
|
|
83
|
+
return "".concat(localizedMonth, " ").concat(date, ", ").concat(year);
|
|
84
|
+
} else if (isTimeFirst) {
|
|
85
|
+
return "".concat(timeWithLocalizedMeridiem, ", ").concat(date, " ").concat(localizedMonth, " ").concat(year);
|
|
86
|
+
} else {
|
|
87
|
+
timetoShow = showTime ? ", ".concat(timeWithLocalizedMeridiem) : "";
|
|
88
|
+
return "".concat(date, " ").concat(localizedMonth, ", ").concat(year).concat(timetoShow);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
function formatter(value, unit, suffix, date, config) {
|
|
93
|
+
var showDateForUnits = ["day", "week", "month", "year"]; // suffix here refers to ago
|
|
94
|
+
// unit here refers to seconds, minute, minutes,...
|
|
95
|
+
|
|
96
|
+
var localizedSuffix = lodash.get(config, ["localizedPublishTime", suffix]) || suffix;
|
|
97
|
+
var localizedUnitOfTime;
|
|
98
|
+
|
|
99
|
+
if (unit === "hour" && value > 23 || showDateForUnits.indexOf(unit) !== -1) {
|
|
100
|
+
return timestampToFormat(value, unit, suffix, date, config);
|
|
101
|
+
} else if (value > 1) {
|
|
102
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", "".concat(unit, "s")]) || "".concat(unit, "s");
|
|
103
|
+
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", unit]) || unit;
|
|
107
|
+
return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix, " ");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function formatAMPM(timestamp) {
|
|
111
|
+
var timeFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "12hours";
|
|
112
|
+
var dateTime = new Date(timestamp);
|
|
113
|
+
var hours = dateTime.getHours();
|
|
114
|
+
var minutes = dateTime.getMinutes();
|
|
115
|
+
var ampm = hours >= 12 ? "pm" : "am";
|
|
116
|
+
hours = hours % 12;
|
|
117
|
+
hours = hours || 12;
|
|
118
|
+
minutes = minutes < 10 ? "0" + minutes : minutes;
|
|
119
|
+
var strTime = hours + ":" + minutes + " " + ampm;
|
|
120
|
+
|
|
121
|
+
if (timeFormat === "24hours") {
|
|
122
|
+
return dateTime.toLocaleTimeString([], {
|
|
123
|
+
hour: "2-digit",
|
|
124
|
+
minute: "2-digit"
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return strTime;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
var hexToRGB = function hexToRGB(hex) {
|
|
132
|
+
var r = parseInt(hex.slice(1, 3), 16);
|
|
133
|
+
var g = parseInt(hex.slice(3, 5), 16);
|
|
134
|
+
var b = parseInt(hex.slice(5, 7), 16);
|
|
135
|
+
return {
|
|
136
|
+
r: r,
|
|
137
|
+
g: g,
|
|
138
|
+
b: b
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
var getLuminanceOfColor = function getLuminanceOfColor(hex) {
|
|
142
|
+
var _hexToRGB = hexToRGB(hex),
|
|
143
|
+
r = _hexToRGB.r,
|
|
144
|
+
g = _hexToRGB.g,
|
|
145
|
+
b = _hexToRGB.b;
|
|
146
|
+
|
|
147
|
+
return r * 0.299 + g * 0.587 + b * 0.114;
|
|
148
|
+
};
|
|
149
|
+
var rgbToHex = function rgbToHex() {
|
|
150
|
+
var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgba(255, 255, 255, 0)";
|
|
151
|
+
var rgba = color.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
|
|
152
|
+
return rgba && rgba.length === 4 ? "#" + ("0" + parseInt(rgba[1], 10).toString(16)).slice(-2) + ("0" + parseInt(rgba[2], 10).toString(16)).slice(-2) + ("0" + parseInt(rgba[3], 10).toString(16)).slice(-2) : color;
|
|
153
|
+
};
|
|
154
|
+
var clientWidths = {
|
|
155
|
+
mobile: 767,
|
|
156
|
+
tablet: 1024
|
|
157
|
+
};
|
|
158
|
+
var clientWidth = function clientWidth(device) {
|
|
159
|
+
var foundDeviceWidth = lodash.get(clientWidths, device);
|
|
160
|
+
|
|
161
|
+
if (foundDeviceWidth) {
|
|
162
|
+
return lodash.get(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return false;
|
|
166
|
+
};
|
|
167
|
+
var getTextColor = function getTextColor() {
|
|
168
|
+
var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgb(255,255,255)";
|
|
169
|
+
var isRegexCheck = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(theme);
|
|
170
|
+
var getHexValue = !isRegexCheck ? rgbToHex(theme) : theme;
|
|
171
|
+
var textColor = getLuminanceOfColor(getHexValue) < 155 ? "light" : "dark";
|
|
172
|
+
return textColor;
|
|
173
|
+
};
|
|
174
|
+
var getSlot = function getSlot(type, component, storyCallback, collectionCallback) {
|
|
175
|
+
switch (type) {
|
|
176
|
+
case "story":
|
|
177
|
+
return storyCallback();
|
|
178
|
+
|
|
179
|
+
case "collection":
|
|
180
|
+
return collectionCallback();
|
|
181
|
+
|
|
182
|
+
default:
|
|
183
|
+
return component ? component() : null;
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
var getSlug = function getSlug(collection) {
|
|
187
|
+
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
188
|
+
var _config$magazineSlug = config.magazineSlug,
|
|
189
|
+
magazineSlug = _config$magazineSlug === void 0 ? "" : _config$magazineSlug,
|
|
190
|
+
_config$isArchivePage = config.isArchivePage,
|
|
191
|
+
isArchivePage = _config$isArchivePage === void 0 ? false : _config$isArchivePage;
|
|
192
|
+
|
|
193
|
+
if (isArchivePage) {
|
|
194
|
+
return "/magazine/archive/".concat(magazineSlug);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (magazineSlug) {
|
|
198
|
+
return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
var isSection = collection.template === "section";
|
|
202
|
+
|
|
203
|
+
if (isSection) {
|
|
204
|
+
var sectionId = lodash.get(collection, ["metadata", "section", "0", "id"], "");
|
|
205
|
+
var sections = config.sections;
|
|
206
|
+
var section = sections && sections.find(function (section) {
|
|
207
|
+
return section.id === sectionId;
|
|
208
|
+
});
|
|
209
|
+
return section ? section["section-url"] : "/";
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return "/collection/".concat(collection.slug);
|
|
213
|
+
};
|
|
214
|
+
function isExternalStory() {
|
|
215
|
+
var story = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
216
|
+
var _story$storyTemplate = story["story-template"],
|
|
217
|
+
storyTemplate = _story$storyTemplate === void 0 ? "" : _story$storyTemplate,
|
|
218
|
+
_story$metadata = story.metadata,
|
|
219
|
+
metadata = _story$metadata === void 0 ? {} : _story$metadata;
|
|
220
|
+
return storyTemplate === "news-elsewhere" ? lodash.get(metadata, ["reference-url"], "") : "";
|
|
221
|
+
} // Adds target='_blank' attribute to anchor tags if not present
|
|
222
|
+
var isEmpty = function isEmpty(value) {
|
|
223
|
+
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
224
|
+
_typeof__default["default"](value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
225
|
+
};
|
|
226
|
+
PropTypes__default["default"].shape({
|
|
227
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
228
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
229
|
+
"cdn-image": PropTypes__default["default"].string
|
|
230
|
+
});
|
|
231
|
+
PropTypes__default["default"].shape({
|
|
232
|
+
headline: PropTypes__default["default"].string,
|
|
233
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
234
|
+
subheadline: PropTypes__default["default"].string
|
|
235
|
+
});
|
|
236
|
+
var getStoryUrl = function getStoryUrl(story) {
|
|
237
|
+
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
238
|
+
return lodash.get(story, ["story-template"]) === "news-elsewhere" ? lodash.get(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
|
|
239
|
+
};
|
|
240
|
+
var navigateTo = function navigateTo(dispatch) {
|
|
241
|
+
var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
242
|
+
global.app.navigateToPage(dispatch, url);
|
|
243
|
+
};
|
|
244
|
+
var generateNavigateSlug = function generateNavigateSlug() {
|
|
245
|
+
var collection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
246
|
+
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
247
|
+
var customUrlPath = arguments.length > 2 ? arguments[2] : undefined;
|
|
248
|
+
|
|
249
|
+
if (customUrlPath) {
|
|
250
|
+
return customUrlPath;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
var _config$magazineSlug2 = config.magazineSlug,
|
|
254
|
+
magazineSlug = _config$magazineSlug2 === void 0 ? "" : _config$magazineSlug2,
|
|
255
|
+
_config$isArchivePage2 = config.isArchivePage,
|
|
256
|
+
isArchivePage = _config$isArchivePage2 === void 0 ? false : _config$isArchivePage2;
|
|
257
|
+
|
|
258
|
+
if (isArchivePage) {
|
|
259
|
+
return "/magazine/archive/".concat(magazineSlug);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (magazineSlug) {
|
|
263
|
+
return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
if (collection) {
|
|
267
|
+
return getSlug(collection, config);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
return "/";
|
|
271
|
+
};
|
|
272
|
+
var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
273
|
+
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
274
|
+
var template = arguments.length > 3 ? arguments[3] : undefined;
|
|
275
|
+
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
276
|
+
|
|
277
|
+
if (timezone && template === "story") {
|
|
278
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
279
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
280
|
+
timeZone: timezone
|
|
281
|
+
});
|
|
282
|
+
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
283
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
284
|
+
dateTime: formatZonedTime
|
|
285
|
+
}, timeStamp);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
289
|
+
date: date,
|
|
290
|
+
formatter: function formatter(value, unit, suffix, date) {
|
|
291
|
+
return _formatter(value, unit, suffix, date, config);
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
var _styleModuleImportMap = {
|
|
297
|
+
"./../Loadmore/load-more.m.css": {
|
|
298
|
+
"button": "load-more-m_button__1mmf1",
|
|
299
|
+
"default": "load-more-m_default__2_k4V",
|
|
300
|
+
"dark": "load-more-m_dark__3dfzb",
|
|
301
|
+
"light": "load-more-m_light__ePZQI"
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
var getTemplate = function getTemplate(templateName) {
|
|
306
|
+
switch (templateName) {
|
|
307
|
+
case "ArrowFourColGrid":
|
|
308
|
+
return /*#__PURE__*/React.lazy(function () {
|
|
309
|
+
return Promise.resolve().then(function () { return require('./index-37a9ccff.js'); });
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
case "ArrowThreeColGrid":
|
|
313
|
+
return /*#__PURE__*/React.lazy(function () {
|
|
314
|
+
return Promise.resolve().then(function () { return require('./index-446679c8.js'); });
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
case "ArrowOneColStoryList":
|
|
318
|
+
return /*#__PURE__*/React.lazy(function () {
|
|
319
|
+
return Promise.resolve().then(function () { return require('./index-bbaf526e.js'); });
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
case "ArrowFourColFiveStories":
|
|
323
|
+
return /*#__PURE__*/React.lazy(function () {
|
|
324
|
+
return Promise.resolve().then(function () { return require('./index-b5754c5d.js'); });
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
case "ArrowOpinionCollection":
|
|
328
|
+
return /*#__PURE__*/React.lazy(function () {
|
|
329
|
+
return Promise.resolve().then(function () { return require('./index-44f97338.js'); });
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
case "ArrowSixColSixStories":
|
|
333
|
+
return /*#__PURE__*/React.lazy(function () {
|
|
334
|
+
return Promise.resolve().then(function () { return require('./index-cfb262ef.js'); });
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
case "ArrowThreeColFlexStories":
|
|
338
|
+
return /*#__PURE__*/React.lazy(function () {
|
|
339
|
+
return Promise.resolve().then(function () { return require('./index-57dd4870.js'); });
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
case "ArrowFourColPortraitStories":
|
|
343
|
+
return /*#__PURE__*/React.lazy(function () {
|
|
344
|
+
return Promise.resolve().then(function () { return require('./index-66dd4dbd.js'); });
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
default:
|
|
348
|
+
return /*#__PURE__*/React.lazy(function () {
|
|
349
|
+
return Promise.resolve().then(function () { return require('./index-446679c8.js'); });
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
var ExtendedLoadMore = function ExtendedLoadMore(_ref) {
|
|
355
|
+
var config = _ref.config,
|
|
356
|
+
componentName = _ref.componentName,
|
|
357
|
+
WithArrowConfig = _ref.WithArrowConfig,
|
|
358
|
+
withSubsequentLoad = _ref.withSubsequentLoad;
|
|
359
|
+
var showButton = lodash.get(config, ["showButton"], true);
|
|
360
|
+
var btnText = lodash.get(config, ["buttonText"], "Read More");
|
|
361
|
+
var theme = lodash.get(config, ["theme"], "");
|
|
362
|
+
var textColor = getTextColor(theme);
|
|
363
|
+
/* Open an array to maintain load-more initiated components to re-render */
|
|
364
|
+
|
|
365
|
+
var _useState = React.useState([]),
|
|
366
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
367
|
+
components = _useState2[0],
|
|
368
|
+
setComponents = _useState2[1];
|
|
369
|
+
|
|
370
|
+
var addComponent = /*#__PURE__*/function () {
|
|
371
|
+
var _ref2 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(event) {
|
|
372
|
+
var collectionSlug, offset, limit, Component, _yield$yield$fetch$js, items, updatedOffset, updatedCompList;
|
|
373
|
+
|
|
374
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
375
|
+
while (1) {
|
|
376
|
+
switch (_context.prev = _context.next) {
|
|
377
|
+
case 0:
|
|
378
|
+
event.persist();
|
|
379
|
+
collectionSlug = event.target.parentElement.getAttribute("data-collection-slug");
|
|
380
|
+
offset = event.target.parentElement.getAttribute("data-collection-offset");
|
|
381
|
+
limit = event.target.parentElement.getAttribute("data-collection-limit");
|
|
382
|
+
Component = getTemplate(componentName);
|
|
383
|
+
_context.next = 7;
|
|
384
|
+
return fetch("/api/v1/collections/".concat(collectionSlug, "?item-type=story&offset=").concat(offset, "&limit=").concat(limit));
|
|
385
|
+
|
|
386
|
+
case 7:
|
|
387
|
+
_context.next = 9;
|
|
388
|
+
return _context.sent.json();
|
|
389
|
+
|
|
390
|
+
case 9:
|
|
391
|
+
_yield$yield$fetch$js = _context.sent;
|
|
392
|
+
items = _yield$yield$fetch$js.items;
|
|
393
|
+
|
|
394
|
+
if (items.length) {
|
|
395
|
+
updatedOffset = parseInt(offset) + parseInt(limit);
|
|
396
|
+
event.target.parentElement.setAttribute("data-collection-offset", updatedOffset);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
updatedCompList = [].concat(_toConsumableArray__default["default"](components), [{
|
|
400
|
+
// Passing a number below the initial collection length (which we will not know here)
|
|
401
|
+
// as the second parameter causes the Load More button to be rendered regardless of
|
|
402
|
+
// the value given to `isLoadMoreVisible`. Since this paramter will be ignored anyway,
|
|
403
|
+
// we pass in a number that is sufficiently always larger.
|
|
404
|
+
Component: WithArrowConfig(withSubsequentLoad(Component, limit || 10, true)),
|
|
405
|
+
props: {
|
|
406
|
+
collection: {
|
|
407
|
+
items: items
|
|
408
|
+
},
|
|
409
|
+
isLoadMoreVisible: false,
|
|
410
|
+
config: config
|
|
411
|
+
},
|
|
412
|
+
componentName: componentName
|
|
413
|
+
}]);
|
|
414
|
+
setComponents(updatedCompList);
|
|
415
|
+
|
|
416
|
+
case 14:
|
|
417
|
+
case "end":
|
|
418
|
+
return _context.stop();
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}, _callee);
|
|
422
|
+
}));
|
|
423
|
+
|
|
424
|
+
return function addComponent(_x) {
|
|
425
|
+
return _ref2.apply(this, arguments);
|
|
426
|
+
};
|
|
427
|
+
}();
|
|
428
|
+
|
|
429
|
+
if (!showButton) return null;
|
|
430
|
+
/* TODO: !HACK! Remove this line post deployment */
|
|
431
|
+
|
|
432
|
+
var componentStyles = function componentStyles(componentName) {
|
|
433
|
+
return componentName === "ArrowOneColStoryList" ? {
|
|
434
|
+
marginLeft: 0
|
|
435
|
+
} : {};
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, components.map(function (_ref3, index) {
|
|
439
|
+
var Component = _ref3.Component,
|
|
440
|
+
props = _ref3.props;
|
|
441
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
442
|
+
style: {
|
|
443
|
+
maxWidth: 1172,
|
|
444
|
+
margin: "auto"
|
|
445
|
+
},
|
|
446
|
+
key: "extendedLoadMoreBase-key-".concat(index)
|
|
447
|
+
}, /*#__PURE__*/React__default["default"].createElement(React.Suspense, {
|
|
448
|
+
fallback: /*#__PURE__*/React__default["default"].createElement("div", null, "Loading...")
|
|
449
|
+
}, /*#__PURE__*/React__default["default"].createElement(Component, props)));
|
|
450
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
451
|
+
style: componentStyles(componentName),
|
|
452
|
+
onClick: addComponent,
|
|
453
|
+
className: "arr--button " + _getClassName__default["default"]("button ".concat(textColor, " default"), _styleModuleImportMap)
|
|
454
|
+
}, btnText));
|
|
455
|
+
};
|
|
456
|
+
ExtendedLoadMore.propTypes = {
|
|
457
|
+
componentName: PropTypes__default["default"].string,
|
|
458
|
+
config: PropTypes__default["default"].object,
|
|
459
|
+
WithArrowConfig: PropTypes__default["default"].func,
|
|
460
|
+
withSubsequentLoad: PropTypes__default["default"].func
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
exports.ExtendedLoadMore = ExtendedLoadMore;
|
|
464
|
+
exports.clientWidth = clientWidth;
|
|
465
|
+
exports.formatter = formatter;
|
|
466
|
+
exports.generateNavigateSlug = generateNavigateSlug;
|
|
467
|
+
exports.getSlot = getSlot;
|
|
468
|
+
exports.getSlug = getSlug;
|
|
469
|
+
exports.getStoryUrl = getStoryUrl;
|
|
470
|
+
exports.getTextColor = getTextColor;
|
|
471
|
+
exports.getTimeStamp = getTimeStamp;
|
|
472
|
+
exports.isEmpty = isEmpty;
|
|
473
|
+
exports.isExternalStory = isExternalStory;
|
|
474
|
+
exports.navigateTo = navigateTo;
|
|
475
|
+
exports.rgbToHex = rgbToHex;
|
|
476
|
+
exports.truncate = truncate;
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var index$2 = require('./index-
|
|
5
|
-
var index$4 = require('./index-
|
|
6
|
-
var index$3 = require('./index-
|
|
7
|
-
var
|
|
8
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$2 = require('./index-0f809dd9.js');
|
|
5
|
+
var index$4 = require('./index-afd44863.js');
|
|
6
|
+
var index$3 = require('./index-8462c597.js');
|
|
7
|
+
var lodash = require('lodash');
|
|
8
|
+
var index$1 = require('./index-93cb06d1.js');
|
|
9
|
+
var index = require('./index-142f015c.js');
|
|
9
10
|
var components = require('@quintype/components');
|
|
10
11
|
var PropTypes = require('prop-types');
|
|
11
12
|
var reactRedux = require('react-redux');
|
|
13
|
+
require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
14
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
15
|
+
require('@babel/runtime/helpers/defineProperty');
|
|
16
|
+
require('react-dom');
|
|
17
|
+
require('@babel/runtime/helpers/toConsumableArray');
|
|
18
|
+
require('@babel/runtime/helpers/asyncToGenerator');
|
|
19
|
+
require('@babel/runtime/regenerator');
|
|
20
|
+
require('@babel/runtime/helpers/typeof');
|
|
12
21
|
require('react-timeago');
|
|
13
22
|
require('date-fns-tz');
|
|
14
|
-
require('react-dom');
|
|
15
23
|
|
|
16
24
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
25
|
|
|
@@ -65,7 +73,7 @@ var FourColGridBase = function FourColGridBase(_ref2) {
|
|
|
65
73
|
var textColor = index.getTextColor(theme);
|
|
66
74
|
var dispatch = reactRedux.useDispatch();
|
|
67
75
|
var qtConfig = reactRedux.useSelector(function (state) {
|
|
68
|
-
return
|
|
76
|
+
return lodash.get(state, ["qt", "config"], {});
|
|
69
77
|
});
|
|
70
78
|
|
|
71
79
|
var getLoadMore = function getLoadMore(opts) {
|
|
@@ -112,12 +120,12 @@ var FourColGridBase = function FourColGridBase(_ref2) {
|
|
|
112
120
|
navigate: navigate
|
|
113
121
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
114
122
|
className: "four-col-m_wrapper__1vOV7"
|
|
115
|
-
}, storyItems.map(function (story, index
|
|
123
|
+
}, storyItems.map(function (story, index) {
|
|
116
124
|
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, {
|
|
117
|
-
key: "story-4col-".concat(index
|
|
125
|
+
key: "story-4col-".concat(index, "-").concat(lodash.get(story, ["id"], "0"))
|
|
118
126
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
119
127
|
className: "four-col-m_story-card-wrapper__1e8p0",
|
|
120
|
-
key: "default-".concat(index
|
|
128
|
+
key: "default-".concat(index)
|
|
121
129
|
}, /*#__PURE__*/React__default["default"].createElement(index$2.StoryCard, {
|
|
122
130
|
story: story,
|
|
123
131
|
border: border,
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var
|
|
5
|
-
var index$2 = require('./index-
|
|
6
|
-
var index$3 = require('./index-
|
|
7
|
-
var index$4 = require('./index-
|
|
8
|
-
var index$1 = require('./index-
|
|
4
|
+
var lodash = require('lodash');
|
|
5
|
+
var index$2 = require('./index-0f809dd9.js');
|
|
6
|
+
var index$3 = require('./index-8462c597.js');
|
|
7
|
+
var index$4 = require('./index-afd44863.js');
|
|
8
|
+
var index$1 = require('./index-93cb06d1.js');
|
|
9
|
+
var index = require('./index-142f015c.js');
|
|
9
10
|
var components = require('@quintype/components');
|
|
10
11
|
var PropTypes = require('prop-types');
|
|
11
12
|
var reactRedux = require('react-redux');
|
|
13
|
+
require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
14
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
15
|
+
require('@babel/runtime/helpers/defineProperty');
|
|
16
|
+
require('react-dom');
|
|
17
|
+
require('@babel/runtime/helpers/toConsumableArray');
|
|
18
|
+
require('@babel/runtime/helpers/asyncToGenerator');
|
|
19
|
+
require('@babel/runtime/regenerator');
|
|
20
|
+
require('@babel/runtime/helpers/typeof');
|
|
12
21
|
require('react-timeago');
|
|
13
22
|
require('date-fns-tz');
|
|
14
|
-
require('react-dom');
|
|
15
23
|
|
|
16
24
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
25
|
|
|
@@ -62,7 +70,7 @@ var ThreeColGridBase = function ThreeColGridBase(_ref2) {
|
|
|
62
70
|
var footerSlot = footerSlotConfig.footerSlot;
|
|
63
71
|
var footerSlotComp = footerSlot ? footerSlot() : null;
|
|
64
72
|
|
|
65
|
-
var _get =
|
|
73
|
+
var _get = lodash.get(slotConfig, [0], {}),
|
|
66
74
|
_get$type = _get.type,
|
|
67
75
|
type = _get$type === void 0 ? "" : _get$type,
|
|
68
76
|
component = _get.component;
|
|
@@ -70,7 +78,7 @@ var ThreeColGridBase = function ThreeColGridBase(_ref2) {
|
|
|
70
78
|
var adWidgetSlot = type === "ad" || type === "widget" ? index.getSlot(type, component) : null;
|
|
71
79
|
var dispatch = reactRedux.useDispatch();
|
|
72
80
|
var qtConfig = reactRedux.useSelector(function (state) {
|
|
73
|
-
return
|
|
81
|
+
return lodash.get(state, ["qt", "config"], {});
|
|
74
82
|
});
|
|
75
83
|
|
|
76
84
|
var getLoadMore = function getLoadMore(opts) {
|
|
@@ -138,13 +146,13 @@ var ThreeColGridBase = function ThreeColGridBase(_ref2) {
|
|
|
138
146
|
collectionNameBorderColor: collectionNameBorderColor
|
|
139
147
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
140
148
|
className: "three-col-m_wrapper__20m5m"
|
|
141
|
-
}, storyItems.slice(0, 2).map(function (story, index
|
|
149
|
+
}, storyItems.slice(0, 2).map(function (story, index) {
|
|
142
150
|
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, {
|
|
143
|
-
key: "story-3col1-".concat(index
|
|
151
|
+
key: "story-3col1-".concat(index, "-").concat(lodash.get(story, ["id"], "0"))
|
|
144
152
|
}, storyCard(story));
|
|
145
|
-
}), storyItems.length < 2 && /*#__PURE__*/React__default["default"].createElement("div", null), adWidgetSlot, storyItems.slice(2).map(function (story, index
|
|
153
|
+
}), storyItems.length < 2 && /*#__PURE__*/React__default["default"].createElement("div", null), adWidgetSlot, storyItems.slice(2).map(function (story, index) {
|
|
146
154
|
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, {
|
|
147
|
-
key: "story-3col1-".concat(index
|
|
155
|
+
key: "story-3col1-".concat(index, "-").concat(lodash.get(story, ["id"], "0"))
|
|
148
156
|
}, storyCard(story));
|
|
149
157
|
})), getLoadMore({
|
|
150
158
|
isLoading: isLoading,
|