@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
package/rows/Listicles/index.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var axios = require('axios');
|
|
7
|
+
var PropTypes = require('prop-types');
|
|
8
|
+
var components = require('@quintype/components');
|
|
9
|
+
var reactRedux = require('react-redux');
|
|
10
|
+
require('react-timeago');
|
|
11
|
+
require('date-fns-tz');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
+
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
17
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
8
18
|
|
|
9
19
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
10
20
|
try {
|
|
@@ -2215,21 +2225,21 @@ function get(object, path, defaultValue) {
|
|
|
2215
2225
|
|
|
2216
2226
|
var get_1 = get;
|
|
2217
2227
|
|
|
2218
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
2228
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
2219
2229
|
|
|
2220
2230
|
var StateProvider = function StateProvider(RowComponent) {
|
|
2221
2231
|
return function (props) {
|
|
2222
2232
|
return (
|
|
2223
2233
|
/*#__PURE__*/
|
|
2224
2234
|
// eslint-disable-next-line react/prop-types
|
|
2225
|
-
|
|
2235
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
2226
2236
|
value: props.config
|
|
2227
|
-
}, /*#__PURE__*/
|
|
2237
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
2228
2238
|
);
|
|
2229
2239
|
};
|
|
2230
2240
|
};
|
|
2231
2241
|
var useStateValue = function useStateValue() {
|
|
2232
|
-
return useContext(StateContext);
|
|
2242
|
+
return React.useContext(StateContext);
|
|
2233
2243
|
};
|
|
2234
2244
|
|
|
2235
2245
|
var hexToRGB = function hexToRGB(hex) {
|
|
@@ -2311,15 +2321,15 @@ function isExternalStory() {
|
|
|
2311
2321
|
metadata = _story$metadata === void 0 ? {} : _story$metadata;
|
|
2312
2322
|
return storyTemplate === "news-elsewhere" ? get_1(metadata, ["reference-url"], "") : "";
|
|
2313
2323
|
} // Adds target='_blank' attribute to anchor tags if not present
|
|
2314
|
-
|
|
2315
|
-
"sketches-host":
|
|
2316
|
-
"cdn-name":
|
|
2317
|
-
"cdn-image":
|
|
2324
|
+
PropTypes__default["default"].shape({
|
|
2325
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2326
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2327
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2318
2328
|
});
|
|
2319
|
-
|
|
2320
|
-
headline:
|
|
2321
|
-
"last-published-at":
|
|
2322
|
-
subheadline:
|
|
2329
|
+
PropTypes__default["default"].shape({
|
|
2330
|
+
headline: PropTypes__default["default"].string,
|
|
2331
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2332
|
+
subheadline: PropTypes__default["default"].string
|
|
2323
2333
|
});
|
|
2324
2334
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2325
2335
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2362,7 +2372,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2362
2372
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
2363
2373
|
|
|
2364
2374
|
var borderBottomStyle = function borderBottomStyle() {
|
|
2365
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
2375
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2366
2376
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
2367
2377
|
style: {
|
|
2368
2378
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -2422,40 +2432,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2422
2432
|
}
|
|
2423
2433
|
};
|
|
2424
2434
|
|
|
2425
|
-
return /*#__PURE__*/
|
|
2435
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2426
2436
|
style: {
|
|
2427
2437
|
borderBottom: borderBottomFullStyle
|
|
2428
2438
|
},
|
|
2429
2439
|
"data-test-id": "collection-name",
|
|
2430
2440
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$2)
|
|
2431
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
2441
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2432
2442
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
2433
2443
|
style: {
|
|
2434
2444
|
color: CollectionNameBorderColor,
|
|
2435
2445
|
fontSize: getBorderHeight()
|
|
2436
2446
|
}
|
|
2437
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
2447
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2438
2448
|
href: slug,
|
|
2439
2449
|
"aria-label": "collection-name"
|
|
2440
|
-
}, /*#__PURE__*/
|
|
2450
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
2441
2451
|
};
|
|
2442
2452
|
CollectionNameBase.propTypes = {
|
|
2443
2453
|
/** Collection name border color */
|
|
2444
|
-
collectionNameBorderColor: PropTypes
|
|
2454
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
2445
2455
|
|
|
2446
2456
|
/** The Collection Object from the API response */
|
|
2447
|
-
collection: PropTypes
|
|
2457
|
+
collection: PropTypes.PropTypes.object,
|
|
2448
2458
|
|
|
2449
2459
|
/** The publisher config from the API response */
|
|
2450
|
-
config: PropTypes
|
|
2460
|
+
config: PropTypes.PropTypes.object,
|
|
2451
2461
|
|
|
2452
2462
|
/** The style template for the component */
|
|
2453
|
-
collectionNameTemplate: PropTypes
|
|
2463
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
2454
2464
|
|
|
2455
2465
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
2456
|
-
headerLevel: PropTypes
|
|
2457
|
-
customCollectionName: PropTypes
|
|
2458
|
-
navigate: PropTypes
|
|
2466
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
2467
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
2468
|
+
navigate: PropTypes.PropTypes.bool
|
|
2459
2469
|
};
|
|
2460
2470
|
CollectionNameBase.defaultProps = {
|
|
2461
2471
|
collectionNameTemplate: "",
|
|
@@ -2468,26 +2478,26 @@ function mapStateToProps(state) {
|
|
|
2468
2478
|
};
|
|
2469
2479
|
}
|
|
2470
2480
|
|
|
2471
|
-
var CollectionName = connect(mapStateToProps)(CollectionNameBase);
|
|
2481
|
+
var CollectionName = reactRedux.connect(mapStateToProps)(CollectionNameBase);
|
|
2472
2482
|
|
|
2473
2483
|
var Loading = function Loading(_ref) {
|
|
2474
2484
|
_ref.width;
|
|
2475
2485
|
_ref.height;
|
|
2476
2486
|
_ref.iconColor;
|
|
2477
|
-
return /*#__PURE__*/
|
|
2487
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2478
2488
|
className: "loading-m_loading-indicator__2Dlst"
|
|
2479
|
-
}, /*#__PURE__*/
|
|
2489
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2480
2490
|
width: "40",
|
|
2481
2491
|
height: "40",
|
|
2482
2492
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2483
2493
|
viewBox: "0 0 100 100",
|
|
2484
2494
|
preserveAspectRatio: "xMidYMid"
|
|
2485
|
-
}, /*#__PURE__*/
|
|
2495
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
2486
2496
|
cx: "84",
|
|
2487
2497
|
cy: "50",
|
|
2488
2498
|
r: "0",
|
|
2489
2499
|
fill: "currentColor"
|
|
2490
|
-
}, /*#__PURE__*/
|
|
2500
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
2491
2501
|
attributeName: "r",
|
|
2492
2502
|
values: "10;0;0;0;0",
|
|
2493
2503
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -2496,7 +2506,7 @@ var Loading = function Loading(_ref) {
|
|
|
2496
2506
|
dur: "2s",
|
|
2497
2507
|
repeatCount: "indefinite",
|
|
2498
2508
|
begin: "0s"
|
|
2499
|
-
}), /*#__PURE__*/
|
|
2509
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
2500
2510
|
attributeName: "cx",
|
|
2501
2511
|
values: "84;84;84;84;84",
|
|
2502
2512
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -2505,12 +2515,12 @@ var Loading = function Loading(_ref) {
|
|
|
2505
2515
|
dur: "2s",
|
|
2506
2516
|
repeatCount: "indefinite",
|
|
2507
2517
|
begin: "0s"
|
|
2508
|
-
})), /*#__PURE__*/
|
|
2518
|
+
})), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
2509
2519
|
cx: "84",
|
|
2510
2520
|
cy: "50",
|
|
2511
2521
|
r: ".709",
|
|
2512
2522
|
fill: "currentColor"
|
|
2513
|
-
}, /*#__PURE__*/
|
|
2523
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
2514
2524
|
attributeName: "r",
|
|
2515
2525
|
values: "0;10;10;10;0",
|
|
2516
2526
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -2519,7 +2529,7 @@ var Loading = function Loading(_ref) {
|
|
|
2519
2529
|
dur: "2s",
|
|
2520
2530
|
repeatCount: "indefinite",
|
|
2521
2531
|
begin: "-1s"
|
|
2522
|
-
}), /*#__PURE__*/
|
|
2532
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
2523
2533
|
attributeName: "cx",
|
|
2524
2534
|
values: "16;16;50;84;84",
|
|
2525
2535
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -2528,12 +2538,12 @@ var Loading = function Loading(_ref) {
|
|
|
2528
2538
|
dur: "2s",
|
|
2529
2539
|
repeatCount: "indefinite",
|
|
2530
2540
|
begin: "-1s"
|
|
2531
|
-
})), /*#__PURE__*/
|
|
2541
|
+
})), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
2532
2542
|
cx: "81.59",
|
|
2533
2543
|
cy: "50",
|
|
2534
2544
|
r: "10",
|
|
2535
2545
|
fill: "currentColor"
|
|
2536
|
-
}, /*#__PURE__*/
|
|
2546
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
2537
2547
|
attributeName: "r",
|
|
2538
2548
|
values: "0;10;10;10;0",
|
|
2539
2549
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -2542,7 +2552,7 @@ var Loading = function Loading(_ref) {
|
|
|
2542
2552
|
dur: "2s",
|
|
2543
2553
|
repeatCount: "indefinite",
|
|
2544
2554
|
begin: "-0.5s"
|
|
2545
|
-
}), /*#__PURE__*/
|
|
2555
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
2546
2556
|
attributeName: "cx",
|
|
2547
2557
|
values: "16;16;50;84;84",
|
|
2548
2558
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -2551,12 +2561,12 @@ var Loading = function Loading(_ref) {
|
|
|
2551
2561
|
dur: "2s",
|
|
2552
2562
|
repeatCount: "indefinite",
|
|
2553
2563
|
begin: "-0.5s"
|
|
2554
|
-
})), /*#__PURE__*/
|
|
2564
|
+
})), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
2555
2565
|
cx: "47.59",
|
|
2556
2566
|
cy: "50",
|
|
2557
2567
|
r: "10",
|
|
2558
2568
|
fill: "currentColor"
|
|
2559
|
-
}, /*#__PURE__*/
|
|
2569
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
2560
2570
|
attributeName: "r",
|
|
2561
2571
|
values: "0;10;10;10;0",
|
|
2562
2572
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -2565,7 +2575,7 @@ var Loading = function Loading(_ref) {
|
|
|
2565
2575
|
dur: "2s",
|
|
2566
2576
|
repeatCount: "indefinite",
|
|
2567
2577
|
begin: "0s"
|
|
2568
|
-
}), /*#__PURE__*/
|
|
2578
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
2569
2579
|
attributeName: "cx",
|
|
2570
2580
|
values: "16;16;50;84;84",
|
|
2571
2581
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -2574,12 +2584,12 @@ var Loading = function Loading(_ref) {
|
|
|
2574
2584
|
dur: "2s",
|
|
2575
2585
|
repeatCount: "indefinite",
|
|
2576
2586
|
begin: "0s"
|
|
2577
|
-
})), /*#__PURE__*/
|
|
2587
|
+
})), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
2578
2588
|
cx: "16",
|
|
2579
2589
|
cy: "50",
|
|
2580
2590
|
r: "9.291",
|
|
2581
2591
|
fill: "currentColor"
|
|
2582
|
-
}, /*#__PURE__*/
|
|
2592
|
+
}, /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
2583
2593
|
attributeName: "r",
|
|
2584
2594
|
values: "0;0;10;10;10",
|
|
2585
2595
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -2588,7 +2598,7 @@ var Loading = function Loading(_ref) {
|
|
|
2588
2598
|
dur: "2s",
|
|
2589
2599
|
repeatCount: "indefinite",
|
|
2590
2600
|
begin: "0s"
|
|
2591
|
-
}), /*#__PURE__*/
|
|
2601
|
+
}), /*#__PURE__*/React__default["default"].createElement("animate", {
|
|
2592
2602
|
attributeName: "cx",
|
|
2593
2603
|
values: "16;16;16;50;84",
|
|
2594
2604
|
keyTimes: "0;0.25;0.5;0.75;1",
|
|
@@ -2600,9 +2610,9 @@ var Loading = function Loading(_ref) {
|
|
|
2600
2610
|
}))));
|
|
2601
2611
|
};
|
|
2602
2612
|
Loading.propTypes = {
|
|
2603
|
-
width:
|
|
2604
|
-
height:
|
|
2605
|
-
iconColor:
|
|
2613
|
+
width: PropTypes__default["default"].object,
|
|
2614
|
+
height: PropTypes__default["default"].object,
|
|
2615
|
+
iconColor: PropTypes__default["default"].object
|
|
2606
2616
|
};
|
|
2607
2617
|
|
|
2608
2618
|
var CrownIcon = function CrownIcon(_ref) {
|
|
@@ -2611,7 +2621,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
2611
2621
|
_ref$color = _ref.color,
|
|
2612
2622
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
2613
2623
|
positionTop = _ref.positionTop;
|
|
2614
|
-
return /*#__PURE__*/
|
|
2624
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2615
2625
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2616
2626
|
width: width,
|
|
2617
2627
|
height: height,
|
|
@@ -2620,28 +2630,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
2620
2630
|
position: "relative",
|
|
2621
2631
|
top: positionTop
|
|
2622
2632
|
}
|
|
2623
|
-
}, /*#__PURE__*/
|
|
2633
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2624
2634
|
fill: "none",
|
|
2625
2635
|
fillRule: "evenodd",
|
|
2626
2636
|
stroke: "none",
|
|
2627
2637
|
strokeWidth: "1"
|
|
2628
|
-
}, /*#__PURE__*/
|
|
2638
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2629
2639
|
transform: "translate(8 8)"
|
|
2630
|
-
}, /*#__PURE__*/
|
|
2640
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2631
2641
|
d: "M0 0H24V24H0z"
|
|
2632
|
-
}), /*#__PURE__*/
|
|
2642
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2633
2643
|
fill: color,
|
|
2634
2644
|
fillRule: "nonzero",
|
|
2635
2645
|
transform: "translate(0 2)"
|
|
2636
|
-
}, /*#__PURE__*/
|
|
2646
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2637
2647
|
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"
|
|
2638
2648
|
}))))));
|
|
2639
2649
|
};
|
|
2640
2650
|
CrownIcon.propTypes = {
|
|
2641
|
-
height:
|
|
2642
|
-
width:
|
|
2643
|
-
color:
|
|
2644
|
-
positionTop:
|
|
2651
|
+
height: PropTypes__default["default"].string,
|
|
2652
|
+
width: PropTypes__default["default"].string,
|
|
2653
|
+
color: PropTypes__default["default"].string,
|
|
2654
|
+
positionTop: PropTypes__default["default"].string
|
|
2645
2655
|
};
|
|
2646
2656
|
|
|
2647
2657
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -2650,7 +2660,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
2650
2660
|
_ref$color = _ref.color,
|
|
2651
2661
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
2652
2662
|
positionTop = _ref.positionTop;
|
|
2653
|
-
return /*#__PURE__*/
|
|
2663
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2654
2664
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2655
2665
|
width: width,
|
|
2656
2666
|
height: height,
|
|
@@ -2659,16 +2669,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
2659
2669
|
position: "relative",
|
|
2660
2670
|
top: positionTop
|
|
2661
2671
|
}
|
|
2662
|
-
}, /*#__PURE__*/
|
|
2672
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2663
2673
|
fill: "none",
|
|
2664
2674
|
fillRule: "evenodd",
|
|
2665
2675
|
stroke: "none",
|
|
2666
2676
|
strokeWidth: "1"
|
|
2667
|
-
}, /*#__PURE__*/
|
|
2677
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2668
2678
|
transform: "translate(8 8)"
|
|
2669
|
-
}, /*#__PURE__*/
|
|
2679
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2670
2680
|
d: "M0 0H24V24H0z"
|
|
2671
|
-
}), /*#__PURE__*/
|
|
2681
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2672
2682
|
fill: color,
|
|
2673
2683
|
fillRule: "nonzero",
|
|
2674
2684
|
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",
|
|
@@ -2676,10 +2686,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
2676
2686
|
})))));
|
|
2677
2687
|
};
|
|
2678
2688
|
KeyIcon.propTypes = {
|
|
2679
|
-
height:
|
|
2680
|
-
width:
|
|
2681
|
-
color:
|
|
2682
|
-
positionTop:
|
|
2689
|
+
height: PropTypes__default["default"].string,
|
|
2690
|
+
width: PropTypes__default["default"].string,
|
|
2691
|
+
color: PropTypes__default["default"].string,
|
|
2692
|
+
positionTop: PropTypes__default["default"].string
|
|
2683
2693
|
};
|
|
2684
2694
|
|
|
2685
2695
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -2688,7 +2698,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
2688
2698
|
_ref$color = _ref.color,
|
|
2689
2699
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
2690
2700
|
positionTop = _ref.positionTop;
|
|
2691
|
-
return /*#__PURE__*/
|
|
2701
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2692
2702
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2693
2703
|
width: width,
|
|
2694
2704
|
height: height,
|
|
@@ -2697,28 +2707,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
2697
2707
|
position: "relative",
|
|
2698
2708
|
top: positionTop
|
|
2699
2709
|
}
|
|
2700
|
-
}, /*#__PURE__*/
|
|
2710
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2701
2711
|
fill: "none",
|
|
2702
2712
|
fillRule: "evenodd",
|
|
2703
2713
|
stroke: "none",
|
|
2704
2714
|
strokeWidth: "1"
|
|
2705
|
-
}, /*#__PURE__*/
|
|
2715
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2706
2716
|
transform: "translate(8 8)"
|
|
2707
|
-
}, /*#__PURE__*/
|
|
2717
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2708
2718
|
d: "M0 0H24V24H0z"
|
|
2709
|
-
}), /*#__PURE__*/
|
|
2719
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2710
2720
|
fill: color,
|
|
2711
2721
|
fillRule: "nonzero",
|
|
2712
2722
|
transform: "translate(3)"
|
|
2713
|
-
}, /*#__PURE__*/
|
|
2723
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2714
2724
|
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"
|
|
2715
2725
|
}))))));
|
|
2716
2726
|
};
|
|
2717
2727
|
LockIcon.propTypes = {
|
|
2718
|
-
height:
|
|
2719
|
-
width:
|
|
2720
|
-
color:
|
|
2721
|
-
positionTop:
|
|
2728
|
+
height: PropTypes__default["default"].string,
|
|
2729
|
+
width: PropTypes__default["default"].string,
|
|
2730
|
+
color: PropTypes__default["default"].string,
|
|
2731
|
+
positionTop: PropTypes__default["default"].string
|
|
2722
2732
|
};
|
|
2723
2733
|
|
|
2724
2734
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -2728,7 +2738,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
2728
2738
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
2729
2739
|
_ref$positionTop = _ref.positionTop,
|
|
2730
2740
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
2731
|
-
return /*#__PURE__*/
|
|
2741
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2732
2742
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2733
2743
|
width: width,
|
|
2734
2744
|
height: height,
|
|
@@ -2737,21 +2747,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
2737
2747
|
position: "relative",
|
|
2738
2748
|
top: positionTop
|
|
2739
2749
|
}
|
|
2740
|
-
}, /*#__PURE__*/
|
|
2750
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2741
2751
|
fill: "none",
|
|
2742
2752
|
fillRule: "evenodd",
|
|
2743
2753
|
stroke: "none",
|
|
2744
2754
|
strokeWidth: "1"
|
|
2745
|
-
}, /*#__PURE__*/
|
|
2755
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2746
2756
|
fill: color,
|
|
2747
2757
|
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"
|
|
2748
2758
|
}))));
|
|
2749
2759
|
};
|
|
2750
2760
|
StarIcon.propTypes = {
|
|
2751
|
-
height:
|
|
2752
|
-
width:
|
|
2753
|
-
color:
|
|
2754
|
-
positionTop:
|
|
2761
|
+
height: PropTypes__default["default"].string,
|
|
2762
|
+
width: PropTypes__default["default"].string,
|
|
2763
|
+
color: PropTypes__default["default"].string,
|
|
2764
|
+
positionTop: PropTypes__default["default"].string
|
|
2755
2765
|
};
|
|
2756
2766
|
|
|
2757
2767
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -2763,7 +2773,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2763
2773
|
|
|
2764
2774
|
switch (iconType) {
|
|
2765
2775
|
case "crown":
|
|
2766
|
-
return /*#__PURE__*/
|
|
2776
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
2767
2777
|
width: width,
|
|
2768
2778
|
height: height,
|
|
2769
2779
|
color: color,
|
|
@@ -2771,7 +2781,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2771
2781
|
});
|
|
2772
2782
|
|
|
2773
2783
|
case "lock":
|
|
2774
|
-
return /*#__PURE__*/
|
|
2784
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
2775
2785
|
width: width,
|
|
2776
2786
|
height: height,
|
|
2777
2787
|
color: color,
|
|
@@ -2779,7 +2789,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2779
2789
|
});
|
|
2780
2790
|
|
|
2781
2791
|
case "key":
|
|
2782
|
-
return /*#__PURE__*/
|
|
2792
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
2783
2793
|
width: width,
|
|
2784
2794
|
height: height,
|
|
2785
2795
|
color: color,
|
|
@@ -2787,7 +2797,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2787
2797
|
});
|
|
2788
2798
|
|
|
2789
2799
|
default:
|
|
2790
|
-
return /*#__PURE__*/
|
|
2800
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
2791
2801
|
width: width,
|
|
2792
2802
|
height: height,
|
|
2793
2803
|
color: color,
|
|
@@ -2796,21 +2806,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2796
2806
|
}
|
|
2797
2807
|
};
|
|
2798
2808
|
PremiumStoryIcon.propTypes = {
|
|
2799
|
-
width:
|
|
2800
|
-
height:
|
|
2801
|
-
color:
|
|
2802
|
-
iconType:
|
|
2803
|
-
positionTop:
|
|
2809
|
+
width: PropTypes__default["default"].string,
|
|
2810
|
+
height: PropTypes__default["default"].string,
|
|
2811
|
+
color: PropTypes__default["default"].string,
|
|
2812
|
+
iconType: PropTypes__default["default"].string,
|
|
2813
|
+
positionTop: PropTypes__default["default"].string
|
|
2804
2814
|
};
|
|
2805
2815
|
|
|
2806
2816
|
function LiveIcon() {
|
|
2807
|
-
return /*#__PURE__*/
|
|
2817
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2808
2818
|
className: "live-icon",
|
|
2809
2819
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2810
2820
|
width: "25",
|
|
2811
2821
|
height: "24",
|
|
2812
2822
|
viewBox: "0 0 25 24"
|
|
2813
|
-
}, /*#__PURE__*/
|
|
2823
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2814
2824
|
fill: "#ff5858",
|
|
2815
2825
|
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"
|
|
2816
2826
|
}));
|
|
@@ -2867,37 +2877,37 @@ var Headline = function Headline(_ref) {
|
|
|
2867
2877
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
2868
2878
|
var iconSize = "24px";
|
|
2869
2879
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
2870
|
-
return /*#__PURE__*/
|
|
2880
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2871
2881
|
"data-test-id": "headline",
|
|
2872
2882
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$1)
|
|
2873
|
-
}, premiumStory && /*#__PURE__*/
|
|
2883
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
2874
2884
|
width: iconSize,
|
|
2875
2885
|
height: iconSize,
|
|
2876
2886
|
color: iconColor,
|
|
2877
2887
|
iconType: iconStyle,
|
|
2878
2888
|
positionTop: positionHeadline()
|
|
2879
|
-
}), isLink ? /*#__PURE__*/
|
|
2889
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2880
2890
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
2881
2891
|
externalLink: isExternalStory(story),
|
|
2882
2892
|
"aria-label": "headline"
|
|
2883
|
-
}, /*#__PURE__*/
|
|
2893
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
2884
2894
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$1)
|
|
2885
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
2895
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
2886
2896
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$1)
|
|
2887
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
2897
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
2888
2898
|
};
|
|
2889
2899
|
Headline.propTypes = {
|
|
2890
2900
|
/** The Story Object from the API response */
|
|
2891
|
-
story:
|
|
2901
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
2892
2902
|
|
|
2893
2903
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
2894
|
-
headerLevel:
|
|
2895
|
-
premiumStoryIconConfig:
|
|
2896
|
-
iconColor:
|
|
2897
|
-
iconType:
|
|
2898
|
-
enablePremiumStoryIcon:
|
|
2904
|
+
headerLevel: PropTypes__default["default"].string,
|
|
2905
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
2906
|
+
iconColor: PropTypes__default["default"].string,
|
|
2907
|
+
iconType: PropTypes__default["default"].string,
|
|
2908
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
2899
2909
|
}),
|
|
2900
|
-
isLink:
|
|
2910
|
+
isLink: PropTypes__default["default"].bool
|
|
2901
2911
|
};
|
|
2902
2912
|
Headline.defaultProps = {
|
|
2903
2913
|
headerLevel: "6",
|
|
@@ -2940,22 +2950,22 @@ var ListiclesBase = function ListiclesBase(_ref) {
|
|
|
2940
2950
|
_config$slotConfig = config.slotConfig,
|
|
2941
2951
|
slotConfig = _config$slotConfig === void 0 ? null : _config$slotConfig;
|
|
2942
2952
|
|
|
2943
|
-
var _useState = useState([]),
|
|
2953
|
+
var _useState = React.useState([]),
|
|
2944
2954
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2945
2955
|
subCollectionStories = _useState2[0],
|
|
2946
2956
|
handleApiData = _useState2[1];
|
|
2947
2957
|
|
|
2948
|
-
var _useState3 = useState({}),
|
|
2958
|
+
var _useState3 = React.useState({}),
|
|
2949
2959
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
2950
2960
|
cachedStories = _useState4[0],
|
|
2951
2961
|
updateCachedStories = _useState4[1];
|
|
2952
2962
|
|
|
2953
|
-
var _useState5 = useState(0),
|
|
2963
|
+
var _useState5 = React.useState(0),
|
|
2954
2964
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
2955
2965
|
active = _useState6[0],
|
|
2956
2966
|
handleActive = _useState6[1];
|
|
2957
2967
|
|
|
2958
|
-
var _useState7 = useState(true),
|
|
2968
|
+
var _useState7 = React.useState(true),
|
|
2959
2969
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
2960
2970
|
loading = _useState8[0],
|
|
2961
2971
|
handleLoading = _useState8[1];
|
|
@@ -3004,7 +3014,7 @@ var ListiclesBase = function ListiclesBase(_ref) {
|
|
|
3004
3014
|
}
|
|
3005
3015
|
|
|
3006
3016
|
_context.next = 7;
|
|
3007
|
-
return
|
|
3017
|
+
return axios__default["default"].get("/api/v1/collections/".concat(id, "?limit=9"));
|
|
3008
3018
|
|
|
3009
3019
|
case 7:
|
|
3010
3020
|
res = _context.sent;
|
|
@@ -3017,7 +3027,7 @@ var ListiclesBase = function ListiclesBase(_ref) {
|
|
|
3017
3027
|
|
|
3018
3028
|
case 12:
|
|
3019
3029
|
memoizeStories(id, data);
|
|
3020
|
-
childCollectionItems = collectionToStories(data);
|
|
3030
|
+
childCollectionItems = components.collectionToStories(data);
|
|
3021
3031
|
handleLoading(false);
|
|
3022
3032
|
handleApiData(childCollectionItems);
|
|
3023
3033
|
_context.next = 21;
|
|
@@ -3039,7 +3049,7 @@ var ListiclesBase = function ListiclesBase(_ref) {
|
|
|
3039
3049
|
return _fetchSubCollectionData.apply(this, arguments);
|
|
3040
3050
|
}
|
|
3041
3051
|
|
|
3042
|
-
useEffect(function (id) {
|
|
3052
|
+
React.useEffect(function (id) {
|
|
3043
3053
|
fetchSubCollectionData(id);
|
|
3044
3054
|
}, []);
|
|
3045
3055
|
var items = subCollectionStories.slice(0, 9);
|
|
@@ -3056,9 +3066,9 @@ var ListiclesBase = function ListiclesBase(_ref) {
|
|
|
3056
3066
|
|
|
3057
3067
|
var generateOpinions = function generateOpinions() {
|
|
3058
3068
|
if (slotConfig) {
|
|
3059
|
-
return /*#__PURE__*/
|
|
3069
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3060
3070
|
className: "listicles-m_six-opinions-container__CbjCC"
|
|
3061
|
-
}, getOpinions(6), /*#__PURE__*/
|
|
3071
|
+
}, getOpinions(6), /*#__PURE__*/React__default["default"].createElement("div", null, slotConfig()));
|
|
3062
3072
|
}
|
|
3063
3073
|
|
|
3064
3074
|
return getOpinions();
|
|
@@ -3066,59 +3076,59 @@ var ListiclesBase = function ListiclesBase(_ref) {
|
|
|
3066
3076
|
|
|
3067
3077
|
var getOpinions = function getOpinions() {
|
|
3068
3078
|
var numberOfStories = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 9;
|
|
3069
|
-
return /*#__PURE__*/
|
|
3079
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3070
3080
|
className: "listicles-m_opinions-wrapper__2fpO8"
|
|
3071
3081
|
}, items.slice(0, numberOfStories).map(function (story, index) {
|
|
3072
|
-
return /*#__PURE__*/
|
|
3082
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3073
3083
|
className: "listicles-m_opinion-wrapper__27oZ8",
|
|
3074
3084
|
key: index
|
|
3075
|
-
}, /*#__PURE__*/
|
|
3085
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3076
3086
|
className: "listicles-m_opinion-counter__2ntNh"
|
|
3077
|
-
}, index + 1), /*#__PURE__*/
|
|
3087
|
+
}, index + 1), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
3078
3088
|
story: story
|
|
3079
3089
|
}));
|
|
3080
3090
|
}));
|
|
3081
3091
|
};
|
|
3082
3092
|
|
|
3083
|
-
return /*#__PURE__*/
|
|
3093
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3084
3094
|
className: "full-width-with-padding arrow-component",
|
|
3085
3095
|
"data-test-id": "collection-filter",
|
|
3086
3096
|
style: {
|
|
3087
3097
|
backgroundColor: theme,
|
|
3088
3098
|
color: textColor
|
|
3089
3099
|
}
|
|
3090
|
-
}, /*#__PURE__*/
|
|
3100
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3091
3101
|
className: _getClassName("wrapper ".concat(getCustomStyleName), _styleModuleImportMap)
|
|
3092
|
-
}, /*#__PURE__*/
|
|
3102
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
3093
3103
|
collection: collection,
|
|
3094
3104
|
collectionNameTemplate: collectionNameTemplate,
|
|
3095
3105
|
collectionNameBorderColor: collectionNameBorderColor
|
|
3096
|
-
}), /*#__PURE__*/
|
|
3106
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3097
3107
|
className: "child-collections listicles-m_child-collections__3kb_6"
|
|
3098
3108
|
}, getFilteredCollection.map(function (subCollections, index) {
|
|
3099
|
-
return /*#__PURE__*/
|
|
3109
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3100
3110
|
key: index,
|
|
3101
3111
|
className: ((index === active ? "open-subchild" : "") ? (index === active ? "open-subchild" : "") + " " : "") + _getClassName("child-collection-wrapper ".concat(index === active ? "open-subchild" : ""), _styleModuleImportMap)
|
|
3102
|
-
}, /*#__PURE__*/
|
|
3112
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3103
3113
|
onClick: function onClick(event) {
|
|
3104
3114
|
return openChildCollectionItems(event, index, subCollections.id);
|
|
3105
3115
|
},
|
|
3106
3116
|
className: _getClassName("child-collection ".concat(textColor), _styleModuleImportMap)
|
|
3107
3117
|
}, subCollections.name));
|
|
3108
|
-
})), /*#__PURE__*/
|
|
3118
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", null, loading ? /*#__PURE__*/React__default["default"].createElement(Loading, null) : generateOpinions())));
|
|
3109
3119
|
};
|
|
3110
3120
|
ListiclesBase.propTypes = {
|
|
3111
3121
|
/** collection is the array of objects which is returning by API */
|
|
3112
|
-
collection:
|
|
3122
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
3113
3123
|
|
|
3114
3124
|
/** The config for the Row */
|
|
3115
|
-
config:
|
|
3125
|
+
config: PropTypes__default["default"].shape({
|
|
3116
3126
|
// background color of the row
|
|
3117
|
-
theme:
|
|
3127
|
+
theme: PropTypes__default["default"].string,
|
|
3118
3128
|
// configure ad slot widget and story
|
|
3119
|
-
slotConfig:
|
|
3120
|
-
collectionNameTemplate:
|
|
3121
|
-
collectionNameBorderColor:
|
|
3129
|
+
slotConfig: PropTypes__default["default"].func,
|
|
3130
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
3131
|
+
collectionNameBorderColor: PropTypes__default["default"].string
|
|
3122
3132
|
})
|
|
3123
3133
|
};
|
|
3124
3134
|
ListiclesBase.defaultProps = {
|
|
@@ -3128,4 +3138,5 @@ ListiclesBase.defaultProps = {
|
|
|
3128
3138
|
};
|
|
3129
3139
|
var Listicles = StateProvider(ListiclesBase);
|
|
3130
3140
|
|
|
3131
|
-
|
|
3141
|
+
exports.Listicles = Listicles;
|
|
3142
|
+
exports.ListiclesBase = ListiclesBase;
|