@times-components/key-facts 2.10.74 → 2.11.0
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/CHANGELOG.md +27 -0
- package/babel.config.js +13 -2
- package/dist/key-facts-prop-types.js +18 -1
- package/dist/key-facts-shared-prop-types.js +16 -1
- package/dist/key-facts-text-prop-types.js +17 -1
- package/dist/key-facts-text.js +77 -1
- package/dist/key-facts.js +64 -1
- package/dist/styles.js +54 -1
- package/package.json +15 -20
- package/rnw.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.11.0](https://github.com/newsuk/times-components/compare/@times-components/key-facts@2.10.76...@times-components/key-facts@2.11.0) (2022-08-18)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **TDP-1712:** remove react-native foreverrrrr ([#3064](https://github.com/newsuk/times-components/issues/3064)) ([2a20cb5](https://github.com/newsuk/times-components/commit/2a20cb5abc10a4e7ca2d62487967f8fcf4eccb62)), closes [#3037](https://github.com/newsuk/times-components/issues/3037) [#3045](https://github.com/newsuk/times-components/issues/3045) [#3050](https://github.com/newsuk/times-components/issues/3050) [#3056](https://github.com/newsuk/times-components/issues/3056) [#3057](https://github.com/newsuk/times-components/issues/3057) [#3066](https://github.com/newsuk/times-components/issues/3066) [#3065](https://github.com/newsuk/times-components/issues/3065) [#3037](https://github.com/newsuk/times-components/issues/3037) [#3045](https://github.com/newsuk/times-components/issues/3045) [#3045](https://github.com/newsuk/times-components/issues/3045) [#3056](https://github.com/newsuk/times-components/issues/3056) [#3066](https://github.com/newsuk/times-components/issues/3066) [#3069](https://github.com/newsuk/times-components/issues/3069) [#3068](https://github.com/newsuk/times-components/issues/3068) [#3070](https://github.com/newsuk/times-components/issues/3070) [#3072](https://github.com/newsuk/times-components/issues/3072) [#3073](https://github.com/newsuk/times-components/issues/3073) [#3071](https://github.com/newsuk/times-components/issues/3071) [#3074](https://github.com/newsuk/times-components/issues/3074) [#3076](https://github.com/newsuk/times-components/issues/3076) [#3079](https://github.com/newsuk/times-components/issues/3079) [#3078](https://github.com/newsuk/times-components/issues/3078) [#3083](https://github.com/newsuk/times-components/issues/3083) [#3087](https://github.com/newsuk/times-components/issues/3087) [#3091](https://github.com/newsuk/times-components/issues/3091) [#3096](https://github.com/newsuk/times-components/issues/3096) [#3102](https://github.com/newsuk/times-components/issues/3102) [#3105](https://github.com/newsuk/times-components/issues/3105) [#3108](https://github.com/newsuk/times-components/issues/3108) [#3111](https://github.com/newsuk/times-components/issues/3111) [#3112](https://github.com/newsuk/times-components/issues/3112) [#3113](https://github.com/newsuk/times-components/issues/3113) [#3114](https://github.com/newsuk/times-components/issues/3114) [#3120](https://github.com/newsuk/times-components/issues/3120) [#3119](https://github.com/newsuk/times-components/issues/3119) [#3112](https://github.com/newsuk/times-components/issues/3112) [#3126](https://github.com/newsuk/times-components/issues/3126) [#3112](https://github.com/newsuk/times-components/issues/3112) [#3126](https://github.com/newsuk/times-components/issues/3126) [#3127](https://github.com/newsuk/times-components/issues/3127) [#3116](https://github.com/newsuk/times-components/issues/3116) [#3128](https://github.com/newsuk/times-components/issues/3128) [#3132](https://github.com/newsuk/times-components/issues/3132) [#3133](https://github.com/newsuk/times-components/issues/3133)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.10.76](https://github.com/newsuk/times-components/compare/@times-components/key-facts@2.10.75...@times-components/key-facts@2.10.76) (2022-08-12)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @times-components/key-facts
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [2.10.75](https://github.com/newsuk/times-components/compare/@times-components/key-facts@2.10.74...@times-components/key-facts@2.10.75) (2022-08-08)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @times-components/key-facts
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [2.10.74](https://github.com/newsuk/times-components/compare/@times-components/key-facts@2.10.73...@times-components/key-facts@2.10.74) (2022-08-08)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @times-components/key-facts
|
package/babel.config.js
CHANGED
|
@@ -3,8 +3,19 @@ module.exports = api => {
|
|
|
3
3
|
return {
|
|
4
4
|
plugins: [
|
|
5
5
|
"babel-plugin-styled-components",
|
|
6
|
-
"@babel/plugin-
|
|
6
|
+
"@babel/plugin-proposal-export-default-from"
|
|
7
7
|
],
|
|
8
|
-
presets: [
|
|
8
|
+
presets: [
|
|
9
|
+
[
|
|
10
|
+
"@babel/preset-env",
|
|
11
|
+
{
|
|
12
|
+
targets: {
|
|
13
|
+
esmodules: true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"@babel/preset-react",
|
|
18
|
+
"@babel/preset-typescript"
|
|
19
|
+
]
|
|
9
20
|
};
|
|
10
21
|
};
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
var _default = {
|
|
13
|
+
ast: _propTypes.default.object.isRequired,
|
|
14
|
+
section: _propTypes.default.string,
|
|
15
|
+
headline: _propTypes.default.string,
|
|
16
|
+
isLiveOrBreaking: _propTypes.default.string
|
|
17
|
+
};
|
|
18
|
+
exports.default = _default;
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const propTypes = {
|
|
13
|
+
children: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.node), _propTypes.default.node]).isRequired
|
|
14
|
+
};
|
|
15
|
+
var _default = propTypes;
|
|
16
|
+
exports.default = _default;
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
var _default = {
|
|
13
|
+
listIndex: _propTypes.default.number.isRequired,
|
|
14
|
+
keyFactItem: _propTypes.default.object.isRequired,
|
|
15
|
+
fireAnalyticsEvent: _propTypes.default.func.isRequired
|
|
16
|
+
};
|
|
17
|
+
exports.default = _default;
|
package/dist/key-facts-text.js
CHANGED
|
@@ -1 +1,77 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTitle = exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _markupForest = require("@times-components/markup-forest");
|
|
11
|
+
|
|
12
|
+
var _markup = _interopRequireDefault(require("@times-components/markup"));
|
|
13
|
+
|
|
14
|
+
var _utils = require("@times-components/utils");
|
|
15
|
+
|
|
16
|
+
var _keyFactsTextPropTypes = _interopRequireDefault(require("./key-facts-text-prop-types"));
|
|
17
|
+
|
|
18
|
+
var _styles = require("./styles");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
+
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
25
|
+
|
|
26
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
+
|
|
28
|
+
const getTitle = data => {
|
|
29
|
+
if (data.children.length === 1) return data.children[0].attributes.value;
|
|
30
|
+
const linkText = data.children.map(child => child.attributes.value);
|
|
31
|
+
const title = linkText.join(" ");
|
|
32
|
+
return title.length > 0 ? title : " ";
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
exports.getTitle = getTitle;
|
|
36
|
+
|
|
37
|
+
const handleClickEventAnalytics = (fireAnalyticsEvent, title, articleFlag) => {
|
|
38
|
+
if (fireAnalyticsEvent) {
|
|
39
|
+
fireAnalyticsEvent({
|
|
40
|
+
action: "Clicked",
|
|
41
|
+
attrs: {
|
|
42
|
+
event_navigation_name: "in-article component clicked : key moments",
|
|
43
|
+
event_navigation_browsing_method: "click",
|
|
44
|
+
article_parent_name: title,
|
|
45
|
+
article_flag: articleFlag
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const KeyFactsText = _ref => {
|
|
52
|
+
let listIndex = _ref.listIndex,
|
|
53
|
+
keyFactItem = _ref.keyFactItem,
|
|
54
|
+
fireAnalyticsEvent = _ref.fireAnalyticsEvent,
|
|
55
|
+
articleFlag = _ref.articleFlag;
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_styles.BulletContainer, {
|
|
57
|
+
key: "key-facts-".concat(listIndex)
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.Bullet, null), /*#__PURE__*/_react.default.createElement(_styles.Text, null, keyFactItem.children.map((data, listItemIndex) => (0, _markupForest.renderTree)(data, _objectSpread(_objectSpread({}, _markup.default), {}, {
|
|
59
|
+
link(key, attributes, renderedChildren) {
|
|
60
|
+
const url = attributes.href;
|
|
61
|
+
const title = getTitle(data);
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(_styles.KeyFactTextLink, {
|
|
63
|
+
key: key,
|
|
64
|
+
onClick: event => {
|
|
65
|
+
(0, _utils.handleOnClickScrollTo)(event, url);
|
|
66
|
+
handleClickEventAnalytics(fireAnalyticsEvent, title, articleFlag);
|
|
67
|
+
},
|
|
68
|
+
href: (0, _utils.handleHrefScrollTo)(url)
|
|
69
|
+
}, renderedChildren);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
}), "key-facts-".concat(listIndex, "-").concat(listItemIndex)))));
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
KeyFactsText.propTypes = _keyFactsTextPropTypes.default;
|
|
76
|
+
var _default = KeyFactsText;
|
|
77
|
+
exports.default = _default;
|
package/dist/key-facts.js
CHANGED
|
@@ -1 +1,64 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _tsComponents = require("@times-components/ts-components");
|
|
11
|
+
|
|
12
|
+
var _keyFactsText = _interopRequireDefault(require("./key-facts-text"));
|
|
13
|
+
|
|
14
|
+
var _keyFactsPropTypes = _interopRequireDefault(require("./key-facts-prop-types"));
|
|
15
|
+
|
|
16
|
+
var _styles = require("./styles");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
const KeyFacts = _ref => {
|
|
21
|
+
let ast = _ref.ast,
|
|
22
|
+
section = _ref.section,
|
|
23
|
+
headline = _ref.headline,
|
|
24
|
+
isLiveOrBreaking = _ref.isLiveOrBreaking;
|
|
25
|
+
const children = ast.children,
|
|
26
|
+
title = ast.attributes.title;
|
|
27
|
+
const keyFactsItems = children[0].children;
|
|
28
|
+
const articleFlag = isLiveOrBreaking ? isLiveOrBreaking.toLowerCase() : "no flag";
|
|
29
|
+
return /*#__PURE__*/_react.default.createElement(_tsComponents.TrackingContextProvider, {
|
|
30
|
+
context: {
|
|
31
|
+
object: "KeyMoments",
|
|
32
|
+
attrs: {
|
|
33
|
+
component_type: "in-article component: key moments: interactive",
|
|
34
|
+
event_navigation_action: "navigation",
|
|
35
|
+
component_name: title,
|
|
36
|
+
section_details: "section : ".concat(section),
|
|
37
|
+
article_name: headline,
|
|
38
|
+
article_flag: articleFlag
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
scrolledEvent: {
|
|
42
|
+
action: "Scrolled",
|
|
43
|
+
attrs: {
|
|
44
|
+
event_navigation_name: "in-article component displayed : key moments",
|
|
45
|
+
event_navigation_browsing_method: "scroll"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}, _ref2 => {
|
|
49
|
+
let fireAnalyticsEvent = _ref2.fireAnalyticsEvent,
|
|
50
|
+
intersectObserverRef = _ref2.intersectObserverRef;
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_styles.KeyFactsContainer, {
|
|
52
|
+
ref: intersectObserverRef
|
|
53
|
+
}, title && /*#__PURE__*/_react.default.createElement(_styles.KeyFactsTitle, null, title), keyFactsItems.map((keyFactItem, index) => /*#__PURE__*/_react.default.createElement(_keyFactsText.default, {
|
|
54
|
+
listIndex: index,
|
|
55
|
+
keyFactItem: keyFactItem,
|
|
56
|
+
fireAnalyticsEvent: fireAnalyticsEvent,
|
|
57
|
+
articleFlag: articleFlag
|
|
58
|
+
})));
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
KeyFacts.propTypes = _keyFactsPropTypes.default;
|
|
63
|
+
var _default = KeyFacts;
|
|
64
|
+
exports.default = _default;
|
package/dist/styles.js
CHANGED
|
@@ -1 +1,54 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.KeyFactsContainer = exports.Text = exports.KeyFactsTitle = exports.Bullet = exports.BulletContainer = exports.KeyFactTextLink = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _tsStyleguide = require("@times-components/ts-styleguide");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
const KeyFactTextLink = _styledComponents.default.a.withConfig({
|
|
15
|
+
displayName: "styles__KeyFactTextLink",
|
|
16
|
+
componentId: "sc-1shod7b-0"
|
|
17
|
+
})(["color:inherit;cursor:pointer;text-decoration:underline;&:hover{color:", ";}&:active{color:", ";}"], _tsStyleguide.colours.functional.brandColour, _tsStyleguide.colours.functional.brandColour);
|
|
18
|
+
|
|
19
|
+
exports.KeyFactTextLink = KeyFactTextLink;
|
|
20
|
+
|
|
21
|
+
const BulletContainer = _styledComponents.default.div.withConfig({
|
|
22
|
+
displayName: "styles__BulletContainer",
|
|
23
|
+
componentId: "sc-1shod7b-1"
|
|
24
|
+
})(["display:flex;flex-direction:row;margin-bottom:", ";padding-left:", ";width:100%;:last-of-type{margin-bottom:0px;}"], (0, _tsStyleguide.spacing)(4), (0, _tsStyleguide.spacing)(1));
|
|
25
|
+
|
|
26
|
+
exports.BulletContainer = BulletContainer;
|
|
27
|
+
|
|
28
|
+
const Bullet = _styledComponents.default.div.withConfig({
|
|
29
|
+
displayName: "styles__Bullet",
|
|
30
|
+
componentId: "sc-1shod7b-2"
|
|
31
|
+
})(["height:6px;width:6px;margin-top:2px;background-color:#9f0000;"]);
|
|
32
|
+
|
|
33
|
+
exports.Bullet = Bullet;
|
|
34
|
+
|
|
35
|
+
const KeyFactsTitle = _styledComponents.default.h2.withConfig({
|
|
36
|
+
displayName: "styles__KeyFactsTitle",
|
|
37
|
+
componentId: "sc-1shod7b-3"
|
|
38
|
+
})(["font-family:", ";font-size:", "px;font-weight:400;margin:0px 0px 20px 0px;color:", ";"], _tsStyleguide.fonts.headline, _tsStyleguide.fontSizes.keyFactsTitle, _tsStyleguide.colours.functional.brandColour);
|
|
39
|
+
|
|
40
|
+
exports.KeyFactsTitle = KeyFactsTitle;
|
|
41
|
+
|
|
42
|
+
const Text = _styledComponents.default.span.withConfig({
|
|
43
|
+
displayName: "styles__Text",
|
|
44
|
+
componentId: "sc-1shod7b-4"
|
|
45
|
+
})(["color:", ";font-family:", ";font-size:", "px;margin-top:-8px;padding-left:", ";width:95%;line-height:28px;"], _tsStyleguide.colours.functional.primary, _tsStyleguide.fonts.bodyRegular, _tsStyleguide.fontSizes.infoSubText, (0, _tsStyleguide.spacing)(3));
|
|
46
|
+
|
|
47
|
+
exports.Text = Text;
|
|
48
|
+
|
|
49
|
+
const KeyFactsContainer = _styledComponents.default.div.withConfig({
|
|
50
|
+
displayName: "styles__KeyFactsContainer",
|
|
51
|
+
componentId: "sc-1shod7b-5"
|
|
52
|
+
})(["margin:0 auto 20px auto;padding:16px 20px;background-color:", ";border-top:2px solid #9f0000;@media (min-width:", "px){width:80.8%;}@media (min-width:", "px){width:56.2%;}"], _tsStyleguide.colours.functional.backgroundPrimary, _tsStyleguide.breakpoints.medium, _tsStyleguide.breakpoints.wide);
|
|
53
|
+
|
|
54
|
+
exports.KeyFactsContainer = KeyFactsContainer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/key-facts",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "Bulleted list of text data",
|
|
5
5
|
"main": "dist/key-facts",
|
|
6
6
|
"dev": "src/key-facts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"prettier:diff": "prettier --list-different '**/*.*'",
|
|
10
10
|
"depcheck": "depcheck --ignores='@babel/*,babel-*,depcheck,eslint,jest,prettier,react-art,stylelint*,webpack*' --ignore-bin-package=false --skip-missing",
|
|
11
11
|
"lint": "eslint . && stylelint . && yarn prettier:diff && yarn depcheck",
|
|
12
|
-
"test:web": "jest --config='./__tests__/
|
|
12
|
+
"test:web": "jest --config='./__tests__/jest.config.js'",
|
|
13
13
|
"prepublishOnly": "yarn transpile && yarn bundle",
|
|
14
14
|
"watch": "watch 'yarn bundle' ./src --ignoreDotFiles --ignoreUnreadable",
|
|
15
15
|
"cleanup-dist": "rm -rf dist",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@babel/core": "7.4.4",
|
|
36
36
|
"@times-components/eslint-config-thetimes": "0.8.18",
|
|
37
|
-
"@times-components/jest-configurator": "
|
|
38
|
-
"@times-components/jest-serializer": "3.
|
|
39
|
-
"@times-components/storybook": "4.
|
|
40
|
-
"@times-components/tealium-utils": "0.
|
|
41
|
-
"@times-components/webpack-configurator": "2.0
|
|
37
|
+
"@times-components/jest-configurator-web": "0.8.0",
|
|
38
|
+
"@times-components/jest-serializer": "3.4.0",
|
|
39
|
+
"@times-components/storybook": "4.5.0",
|
|
40
|
+
"@times-components/tealium-utils": "0.8.0",
|
|
41
|
+
"@times-components/webpack-configurator": "2.1.0",
|
|
42
42
|
"babel-jest": "24.8.0",
|
|
43
43
|
"depcheck": "0.6.9",
|
|
44
44
|
"enzyme": "3.9.0",
|
|
@@ -47,22 +47,17 @@
|
|
|
47
47
|
"mockdate": "3.0.5",
|
|
48
48
|
"prettier": "1.14.3",
|
|
49
49
|
"react": "16.9.0",
|
|
50
|
-
"react-art": "16.6.3",
|
|
51
50
|
"react-dom": "16.9.0",
|
|
52
51
|
"stylelint": "9.4.0",
|
|
53
|
-
"
|
|
54
|
-
"stylelint-config-styled-components": "0.1.1",
|
|
55
|
-
"stylelint-processor-styled-components": "1.3.2",
|
|
56
|
-
"webpack": "4.30.0",
|
|
57
|
-
"webpack-cli": "3.3.1"
|
|
52
|
+
"webpack": "4.30.0"
|
|
58
53
|
},
|
|
59
54
|
"dependencies": {
|
|
60
|
-
"@times-components/markup": "3.
|
|
61
|
-
"@times-components/markup-forest": "1.
|
|
62
|
-
"@times-components/responsive": "0.
|
|
63
|
-
"@times-components/ts-components": "1.
|
|
64
|
-
"@times-components/ts-styleguide": "1.
|
|
65
|
-
"@times-components/utils": "6.
|
|
55
|
+
"@times-components/markup": "3.7.0",
|
|
56
|
+
"@times-components/markup-forest": "1.9.0",
|
|
57
|
+
"@times-components/responsive": "0.14.0",
|
|
58
|
+
"@times-components/ts-components": "1.52.0",
|
|
59
|
+
"@times-components/ts-styleguide": "1.37.0",
|
|
60
|
+
"@times-components/utils": "6.15.0",
|
|
66
61
|
"prop-types": "15.7.2",
|
|
67
62
|
"styled-components": "4.3.2"
|
|
68
63
|
},
|
|
@@ -77,5 +72,5 @@
|
|
|
77
72
|
"publishConfig": {
|
|
78
73
|
"access": "public"
|
|
79
74
|
},
|
|
80
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "fe2f12b7448a88662c53f840772282cd97756c5c"
|
|
81
76
|
}
|
package/rnw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
|
1
|
+
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(e,t){e.exports=require("@times-components/ts-styleguide/rnw")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("styled-components")},function(e,t){e.exports=require("@times-components/utils/rnw")},function(e,t){e.exports=require("@times-components/ts-components/rnw")},function(e,t){e.exports=require("@times-components/markup-forest/rnw")},function(e,t){e.exports=require("@times-components/markup/rnw")},function(e,t,n){"use strict";n.r(t);var r=n(1),o=n.n(r),i=n(5),a=n(6),c=n(7),l=n.n(c),s=n(4),u=n(2),p=n.n(u),d=(p.a.number.isRequired,p.a.object.isRequired,p.a.func.isRequired,n(3)),f=n.n(d),m=n(0);const b=f.a.a.withConfig({displayName:"styles__KeyFactTextLink",componentId:"sc-1shod7b-0"})(["color:inherit;cursor:pointer;text-decoration:underline;&:hover{color:",";}&:active{color:",";}"],m.colours.functional.brandColour,m.colours.functional.brandColour),y=f.a.div.withConfig({displayName:"styles__BulletContainer",componentId:"sc-1shod7b-1"})(["display:flex;flex-direction:row;margin-bottom:",";padding-left:",";width:100%;:last-of-type{margin-bottom:0px;}"],Object(m.spacing)(4),Object(m.spacing)(1)),g=f.a.div.withConfig({displayName:"styles__Bullet",componentId:"sc-1shod7b-2"})(["height:6px;width:6px;margin-top:2px;background-color:#9f0000;"]),h=f.a.h2.withConfig({displayName:"styles__KeyFactsTitle",componentId:"sc-1shod7b-3"})(["font-family:",";font-size:","px;font-weight:400;margin:0px 0px 20px 0px;color:",";"],m.fonts.headline,m.fontSizes.keyFactsTitle,m.colours.functional.brandColour),x=f.a.span.withConfig({displayName:"styles__Text",componentId:"sc-1shod7b-4"})(["color:",";font-family:",";font-size:","px;margin-top:-8px;padding-left:",";width:95%;line-height:28px;"],m.colours.functional.primary,m.fonts.bodyRegular,m.fontSizes.infoSubText,Object(m.spacing)(3)),v=f.a.div.withConfig({displayName:"styles__KeyFactsContainer",componentId:"sc-1shod7b-5"})(["margin:0 auto 20px auto;padding:16px 20px;background-color:",";border-top:2px solid #9f0000;@media (min-width:","px){width:80.8%;}@media (min-width:","px){width:56.2%;}"],m.colours.functional.backgroundPrimary,m.breakpoints.medium,m.breakpoints.wide);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j=e=>{let t=e.listIndex,n=e.keyFactItem,r=e.fireAnalyticsEvent,i=e.articleFlag;return o.a.createElement(y,{key:"key-facts-".concat(t)},o.a.createElement(g,null),o.a.createElement(x,null,n.children.map((e,n)=>Object(a.renderTree)(e,O(O({},l.a),{},{link(t,n,a){const c=n.href,l=(e=>{if(1===e.children.length)return e.children[0].attributes.value;const t=e.children.map(e=>e.attributes.value).join(" ");return t.length>0?t:" "})(e);return o.a.createElement(b,{key:t,onClick:e=>{Object(s.handleOnClickScrollTo)(e,c),((e,t,n)=>{e&&e({action:"Clicked",attrs:{event_navigation_name:"in-article component clicked : key moments",event_navigation_browsing_method:"click",article_parent_name:t,article_flag:n}})})(r,l,i)},href:Object(s.handleHrefScrollTo)(c)},a)}}),"key-facts-".concat(t,"-").concat(n)))))};p.a.object.isRequired,p.a.string,p.a.string,p.a.string;t.default=e=>{let t=e.ast,n=e.section,r=e.headline,a=e.isLiveOrBreaking;const c=t.children,l=t.attributes.title,s=c[0].children,u=a?a.toLowerCase():"no flag";return o.a.createElement(i.TrackingContextProvider,{context:{object:"KeyMoments",attrs:{component_type:"in-article component: key moments: interactive",event_navigation_action:"navigation",component_name:l,section_details:"section : ".concat(n),article_name:r,article_flag:u}},scrolledEvent:{action:"Scrolled",attrs:{event_navigation_name:"in-article component displayed : key moments",event_navigation_browsing_method:"scroll"}}},e=>{let t=e.fireAnalyticsEvent,n=e.intersectObserverRef;return o.a.createElement(v,{ref:n},l&&o.a.createElement(h,null,l),s.map((e,n)=>o.a.createElement(j,{listIndex:n,keyFactItem:e,fireAnalyticsEvent:t,articleFlag:u})))})}}]);
|