@atlaskit/help 4.2.2 → 4.2.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.
Files changed (23) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +3 -1
  3. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +61 -16
  4. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +8 -4
  5. package/dist/cjs/components/contexts/navigationContext.js +14 -12
  6. package/dist/cjs/util/testing/mock.js +3 -1
  7. package/dist/cjs/version.json +1 -1
  8. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +4 -6
  9. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +50 -17
  10. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +3 -0
  11. package/dist/es2019/components/contexts/navigationContext.js +14 -12
  12. package/dist/es2019/util/testing/mock.js +2 -1
  13. package/dist/es2019/version.json +1 -1
  14. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +3 -2
  15. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +55 -16
  16. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +4 -3
  17. package/dist/esm/components/contexts/navigationContext.js +14 -12
  18. package/dist/esm/util/testing/mock.js +3 -1
  19. package/dist/esm/version.json +1 -1
  20. package/dist/types/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.d.ts +1 -0
  21. package/dist/types/model/WhatsNew.d.ts +1 -0
  22. package/dist/types/util/testing/mock.d.ts +1 -1
  23. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/help
2
2
 
3
+ ## 4.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f9bfb2095bd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f9bfb2095bd) - [ux] Group release notes by date
8
+
3
9
  ## 4.2.2
4
10
 
5
11
  ### Patch Changes
@@ -15,6 +15,8 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
15
15
 
16
16
  var _constants = require("@atlaskit/theme/constants");
17
17
 
18
+ var _typography = require("@atlaskit/theme/typography");
19
+
18
20
  var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
19
21
 
20
22
  var _templateObject, _templateObject2, _templateObject3;
@@ -56,7 +58,7 @@ var WhatsNewResultListItemTitleContainer = _styled.default.div(_templateObject |
56
58
 
57
59
  exports.WhatsNewResultListItemTitleContainer = WhatsNewResultListItemTitleContainer;
58
60
 
59
- var WhatsNewResultListItemTitleText = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n text-decoration: none;\n color: ", ";\n font-size: ", "px;\n font-weight: 600;\n display: inline-block;\n vertical-align: middle;\n padding-left: ", "px;\n line-height: ", "px;\n white-space: normal;\n overflow-x: hidden;\n"])), colors.N800, (0, _constants.fontSize)(), (0, _constants.gridSize)() / 2, (0, _constants.gridSize)() * 2.5);
61
+ var WhatsNewResultListItemTitleText = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n display: inline-block;\n vertical-align: middle;\n margin: 0;\n padding-left: ", "px;\n white-space: normal;\n overflow-x: hidden;\n"])), (0, _typography.h400)(), (0, _constants.gridSize)() / 2);
60
62
 
61
63
  exports.WhatsNewResultListItemTitleText = WhatsNewResultListItemTitleText;
62
64
 
@@ -9,14 +9,26 @@ Object.defineProperty(exports, "__esModule", {
9
9
  });
10
10
  exports.default = void 0;
11
11
 
12
- var _react = _interopRequireDefault(require("react"));
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+
14
+ var _react = _interopRequireWildcard(require("react"));
13
15
 
14
16
  var _constants = require("@atlaskit/theme/constants");
15
17
 
16
18
  var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
17
19
 
20
+ var _toDate = _interopRequireDefault(require("date-fns/toDate"));
21
+
22
+ var _isYesterday = _interopRequireDefault(require("date-fns/isYesterday"));
23
+
24
+ var _isToday = _interopRequireDefault(require("date-fns/isToday"));
25
+
26
+ var _format = _interopRequireDefault(require("date-fns/format"));
27
+
18
28
  var _WhatsNewResultItem = _interopRequireDefault(require("./WhatsNewResultItem"));
19
29
 
30
+ var _styled = require("./styled");
31
+
20
32
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
33
 
22
34
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -27,23 +39,56 @@ var WhatsNewResultsList = function WhatsNewResultsList(_ref) {
27
39
  _ref$whatsNewArticles = _ref.whatsNewArticles,
28
40
  whatsNewArticles = _ref$whatsNewArticles === void 0 ? [] : _ref$whatsNewArticles,
29
41
  onWhatsNewResultItemClick = _ref.onWhatsNewResultItemClick;
30
- return whatsNewArticles && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, whatsNewArticles.map(function (whatsNewArticle, i) {
31
- return /*#__PURE__*/_react.default.createElement(_WhatsNewResultItem.default, {
32
- styles: {
33
- border: style === 'secondary' ? "2px solid ".concat(colors.N30) : 0,
34
- padding: style === 'secondary' ? "".concat((0, _constants.gridSize)(), "px ").concat((0, _constants.gridSize)() * 2, "px") : "".concat((0, _constants.gridSize)(), "px"),
35
- marginBottom: style === 'secondary' ? "".concat((0, _constants.gridSize)() * 1.5, "px") : 0
36
- },
37
- id: whatsNewArticle.id,
38
- onClick: function onClick(event, analyticsEvent) {
39
- if (onWhatsNewResultItemClick) {
40
- onWhatsNewResultItemClick(event, analyticsEvent, whatsNewArticle);
42
+
43
+ var _useState = (0, _react.useState)({}),
44
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
45
+ whatsNewArticlesGroupedByDate = _useState2[0],
46
+ setListValuesGrouped = _useState2[1];
47
+
48
+ (0, _react.useEffect)(function () {
49
+ var whatsNewArticlesGroupedByDateTemp = {};
50
+ whatsNewArticles === null || whatsNewArticles === void 0 ? void 0 : whatsNewArticles.forEach(function (whatsNewArticle) {
51
+ var featureRolloutDateString = whatsNewArticle === null || whatsNewArticle === void 0 ? void 0 : whatsNewArticle.featureRolloutDate;
52
+
53
+ if (featureRolloutDateString) {
54
+ var featureRolloutDateArray = featureRolloutDateString.split('-').map(function (dateValue) {
55
+ return parseInt(dateValue);
56
+ });
57
+ var featureRolloutDate = (0, _toDate.default)(new Date(featureRolloutDateArray[0], featureRolloutDateArray[1], featureRolloutDateArray[2]));
58
+
59
+ if (whatsNewArticlesGroupedByDateTemp[featureRolloutDateString]) {
60
+ whatsNewArticlesGroupedByDateTemp[featureRolloutDateString].items.push(whatsNewArticle);
61
+ } else {
62
+ whatsNewArticlesGroupedByDateTemp[featureRolloutDateString] = {
63
+ title: (0, _isToday.default)(featureRolloutDate) ? 'Today' : (0, _isYesterday.default)(featureRolloutDate) ? 'Yesterday' : (0, _format.default)(featureRolloutDate, 'PPPP'),
64
+ items: [whatsNewArticle]
65
+ };
41
66
  }
42
- },
43
- type: whatsNewArticle.type,
44
- title: whatsNewArticle.title,
45
- key: whatsNewArticle.id
67
+ }
46
68
  });
69
+ setListValuesGrouped(whatsNewArticlesGroupedByDateTemp);
70
+ }, [whatsNewArticles]);
71
+ return whatsNewArticlesGroupedByDate && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, Object.keys(whatsNewArticlesGroupedByDate).map(function (key) {
72
+ return /*#__PURE__*/_react.default.createElement(_styled.WhatsNewResultsListGroupWrapper, {
73
+ key: key
74
+ }, /*#__PURE__*/_react.default.createElement(_styled.WhatsNewResultsListGroupTitle, null, whatsNewArticlesGroupedByDate[key].title), whatsNewArticlesGroupedByDate[key].items.map(function (whatsNewArticle, i) {
75
+ return /*#__PURE__*/_react.default.createElement(_WhatsNewResultItem.default, {
76
+ styles: {
77
+ border: style === 'secondary' ? "2px solid ".concat(colors.N30) : 0,
78
+ padding: style === 'secondary' ? "".concat((0, _constants.gridSize)(), "px ").concat((0, _constants.gridSize)() * 2, "px") : "".concat((0, _constants.gridSize)(), "px"),
79
+ marginBottom: style === 'secondary' ? "".concat((0, _constants.gridSize)() * 1.5, "px") : 0
80
+ },
81
+ id: whatsNewArticle.id,
82
+ onClick: function onClick(event, analyticsEvent) {
83
+ if (onWhatsNewResultItemClick) {
84
+ onWhatsNewResultItemClick(event, analyticsEvent, whatsNewArticle);
85
+ }
86
+ },
87
+ type: whatsNewArticle.type,
88
+ title: whatsNewArticle.title,
89
+ key: whatsNewArticle.id
90
+ });
91
+ }));
47
92
  }));
48
93
  };
49
94
 
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.ToggleShowWhatsNewResultsContainer = exports.WhatsNewResultsListGroupTitle = exports.WhatsNewResultsListContainer = exports.truncate = void 0;
10
+ exports.ToggleShowWhatsNewResultsContainer = exports.WhatsNewResultsListGroupTitle = exports.WhatsNewResultsListGroupWrapper = exports.WhatsNewResultsListContainer = exports.truncate = void 0;
11
11
 
12
12
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
13
 
@@ -19,7 +19,7 @@ var _constants = require("@atlaskit/theme/constants");
19
19
 
20
20
  var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
21
21
 
22
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
22
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
23
23
 
24
24
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
25
 
@@ -36,10 +36,14 @@ var WhatsNewResultsListContainer = _styled.default.div(_templateObject2 || (_tem
36
36
 
37
37
  exports.WhatsNewResultsListContainer = WhatsNewResultsListContainer;
38
38
 
39
- var WhatsNewResultsListGroupTitle = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: ", "px;\n font-weight: bold;\n padding: 0 ", "px ", "px ", "px;\n text-transform: uppercase;\n"])), colors.N200, (0, _constants.fontSizeSmall)(), (0, _constants.gridSize)(), (0, _constants.gridSize)(), (0, _constants.gridSize)());
39
+ var WhatsNewResultsListGroupWrapper = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", "px 0 0 0;\n"])), (0, _constants.gridSize)());
40
+
41
+ exports.WhatsNewResultsListGroupWrapper = WhatsNewResultsListGroupWrapper;
42
+
43
+ var WhatsNewResultsListGroupTitle = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: ", "px;\n font-weight: bold;\n padding: 0 ", "px ", "px ", "px;\n text-transform: uppercase;\n"])), colors.N200, (0, _constants.fontSizeSmall)(), (0, _constants.gridSize)(), (0, _constants.gridSize)(), (0, _constants.gridSize)());
40
44
 
41
45
  exports.WhatsNewResultsListGroupTitle = WhatsNewResultsListGroupTitle;
42
46
 
43
- var ToggleShowWhatsNewResultsContainer = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", "px 0;\n span {\n margin: 0;\n }\n"])), (0, _constants.gridSize)());
47
+ var ToggleShowWhatsNewResultsContainer = _styled.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", "px 0;\n span {\n margin: 0;\n }\n"])), (0, _constants.gridSize)());
44
48
 
45
49
  exports.ToggleShowWhatsNewResultsContainer = ToggleShowWhatsNewResultsContainer;
@@ -104,20 +104,22 @@ var NavigationContextProvider = function NavigationContextProvider(_ref) {
104
104
 
105
105
  var tempHistory = (0, _react.useRef)(propsHistory ? propsHistory : []);
106
106
  var clearHistory = (0, _react.useCallback)(function () {
107
- if (!articleIdSetter) {
108
- return;
109
- } // Clear History
107
+ if (tempHistory.current.length > 0) {
108
+ if (!articleIdSetter) {
109
+ return;
110
+ } // Clear History
110
111
 
111
112
 
112
- tempHistory.current = [];
113
- setHistory(tempHistory.current); // Clear host history using the historySetter
113
+ tempHistory.current = [];
114
+ setHistory(tempHistory.current); // Clear host history using the historySetter
114
115
 
115
- historySetter && historySetter(tempHistory.current); // Set article ID to ''
116
+ historySetter && historySetter(tempHistory.current); // Set article ID to ''
116
117
 
117
- articleIdSetter({
118
- id: '',
119
- type: _Help.ARTICLE_TYPE.HELP_ARTICLE
120
- });
118
+ articleIdSetter({
119
+ id: '',
120
+ type: _Help.ARTICLE_TYPE.HELP_ARTICLE
121
+ });
122
+ }
121
123
  }, [articleIdSetter, historySetter]);
122
124
  var isDefaultContentDefined = (0, _react.useCallback)(function () {
123
125
  return homeContent !== undefined || homeOptions !== undefined;
@@ -608,12 +610,12 @@ var NavigationContextProvider = function NavigationContextProvider(_ref) {
608
610
  }
609
611
  } else {
610
612
  // If article ID is empty clear the history
611
- if (history.length > 0) {
613
+ if (!getCurrentArticle()) {
612
614
  clearHistory();
613
615
  }
614
616
  }
615
617
  }
616
- }, [articleId, articleIdSetter, clearHistory, fetchArticleData, getCurrentArticle, updateHistoryItem, history.length]);
618
+ }, [articleId, articleIdSetter, clearHistory, fetchArticleData, getCurrentArticle, updateHistoryItem]);
617
619
  /**
618
620
  * VIEW effect
619
621
  * Set the view value based on the values of articleId
@@ -93,13 +93,15 @@ var getMockWhatsNewArticleItem = function getMockWhatsNewArticleItem(id, type) {
93
93
  var description = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
94
94
  var changeTargetSchedule = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
95
95
  var status = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : '';
96
- var href = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : '';
96
+ var featureRolloutDate = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : '01-01-2022';
97
+ var href = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : '';
97
98
  return {
98
99
  title: title,
99
100
  changeTargetSchedule: changeTargetSchedule,
100
101
  type: type,
101
102
  status: status,
102
103
  href: href,
104
+ featureRolloutDate: featureRolloutDate,
103
105
  id: id
104
106
  };
105
107
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/help",
3
- "version": "4.2.2",
3
+ "version": "4.2.3",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import styled from '@emotion/styled';
3
- import { fontSize, gridSize } from '@atlaskit/theme/constants';
3
+ import { gridSize } from '@atlaskit/theme/constants';
4
+ import { h400 } from '@atlaskit/theme/typography';
4
5
  import * as colors from '@atlaskit/theme/colors';
5
6
  export const WhatsNewResultListItemWrapper = styled.a({
6
7
  position: `relative`,
@@ -32,14 +33,11 @@ export const WhatsNewResultListItemTitleContainer = styled.div`
32
33
  margin-bottom: ${gridSize() / 2}px;
33
34
  `;
34
35
  export const WhatsNewResultListItemTitleText = styled.span`
35
- text-decoration: none;
36
- color: ${colors.N800};
37
- font-size: ${fontSize()}px;
38
- font-weight: 600;
36
+ ${h400()}
39
37
  display: inline-block;
40
38
  vertical-align: middle;
39
+ margin: 0;
41
40
  padding-left: ${gridSize() / 2}px;
42
- line-height: ${gridSize() * 2.5}px;
43
41
  white-space: normal;
44
42
  overflow-x: hidden;
45
43
  `;
@@ -1,27 +1,60 @@
1
- import React from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import { gridSize } from '@atlaskit/theme/constants';
3
3
  import * as colors from '@atlaskit/theme/colors';
4
+ import toDate from 'date-fns/toDate';
5
+ import isYesterday from 'date-fns/isYesterday';
6
+ import isToday from 'date-fns/isToday';
7
+ import formatDate from 'date-fns/format';
4
8
  import WhatsNewResultItem from './WhatsNewResultItem';
9
+ import { WhatsNewResultsListGroupTitle, WhatsNewResultsListGroupWrapper } from './styled';
5
10
 
6
11
  const WhatsNewResultsList = ({
7
12
  style = 'primary',
8
13
  whatsNewArticles = [],
9
14
  onWhatsNewResultItemClick
10
- }) => whatsNewArticles && /*#__PURE__*/React.createElement(React.Fragment, null, whatsNewArticles.map((whatsNewArticle, i) => /*#__PURE__*/React.createElement(WhatsNewResultItem, {
11
- styles: {
12
- border: style === 'secondary' ? `2px solid ${colors.N30}` : 0,
13
- padding: style === 'secondary' ? `${gridSize()}px ${gridSize() * 2}px` : `${gridSize()}px`,
14
- marginBottom: style === 'secondary' ? `${gridSize() * 1.5}px` : 0
15
- },
16
- id: whatsNewArticle.id,
17
- onClick: (event, analyticsEvent) => {
18
- if (onWhatsNewResultItemClick) {
19
- onWhatsNewResultItemClick(event, analyticsEvent, whatsNewArticle);
20
- }
21
- },
22
- type: whatsNewArticle.type,
23
- title: whatsNewArticle.title,
24
- key: whatsNewArticle.id
25
- })));
15
+ }) => {
16
+ const [whatsNewArticlesGroupedByDate, setListValuesGrouped] = useState({});
17
+ useEffect(() => {
18
+ let whatsNewArticlesGroupedByDateTemp = {};
19
+ whatsNewArticles === null || whatsNewArticles === void 0 ? void 0 : whatsNewArticles.forEach(whatsNewArticle => {
20
+ const featureRolloutDateString = whatsNewArticle === null || whatsNewArticle === void 0 ? void 0 : whatsNewArticle.featureRolloutDate;
21
+
22
+ if (featureRolloutDateString) {
23
+ const featureRolloutDateArray = featureRolloutDateString.split('-').map(dateValue => parseInt(dateValue));
24
+ const featureRolloutDate = toDate(new Date(featureRolloutDateArray[0], featureRolloutDateArray[1], featureRolloutDateArray[2]));
25
+
26
+ if (whatsNewArticlesGroupedByDateTemp[featureRolloutDateString]) {
27
+ whatsNewArticlesGroupedByDateTemp[featureRolloutDateString].items.push(whatsNewArticle);
28
+ } else {
29
+ whatsNewArticlesGroupedByDateTemp[featureRolloutDateString] = {
30
+ title: isToday(featureRolloutDate) ? 'Today' : isYesterday(featureRolloutDate) ? 'Yesterday' : formatDate(featureRolloutDate, 'PPPP'),
31
+ items: [whatsNewArticle]
32
+ };
33
+ }
34
+ }
35
+ });
36
+ setListValuesGrouped(whatsNewArticlesGroupedByDateTemp);
37
+ }, [whatsNewArticles]);
38
+ return whatsNewArticlesGroupedByDate && /*#__PURE__*/React.createElement(React.Fragment, null, Object.keys(whatsNewArticlesGroupedByDate).map(function (key) {
39
+ return /*#__PURE__*/React.createElement(WhatsNewResultsListGroupWrapper, {
40
+ key: key
41
+ }, /*#__PURE__*/React.createElement(WhatsNewResultsListGroupTitle, null, whatsNewArticlesGroupedByDate[key].title), whatsNewArticlesGroupedByDate[key].items.map((whatsNewArticle, i) => /*#__PURE__*/React.createElement(WhatsNewResultItem, {
42
+ styles: {
43
+ border: style === 'secondary' ? `2px solid ${colors.N30}` : 0,
44
+ padding: style === 'secondary' ? `${gridSize()}px ${gridSize() * 2}px` : `${gridSize()}px`,
45
+ marginBottom: style === 'secondary' ? `${gridSize() * 1.5}px` : 0
46
+ },
47
+ id: whatsNewArticle.id,
48
+ onClick: (event, analyticsEvent) => {
49
+ if (onWhatsNewResultItemClick) {
50
+ onWhatsNewResultItemClick(event, analyticsEvent, whatsNewArticle);
51
+ }
52
+ },
53
+ type: whatsNewArticle.type,
54
+ title: whatsNewArticle.title,
55
+ key: whatsNewArticle.id
56
+ })));
57
+ }));
58
+ };
26
59
 
27
60
  export default WhatsNewResultsList;
@@ -12,6 +12,9 @@ export const truncate = (width = '100%') => css`
12
12
  export const WhatsNewResultsListContainer = styled.div`
13
13
  position: relative;
14
14
  `;
15
+ export const WhatsNewResultsListGroupWrapper = styled.div`
16
+ padding: ${gridSize()}px 0 0 0;
17
+ `;
15
18
  export const WhatsNewResultsListGroupTitle = styled.div`
16
19
  color: ${colors.N200};
17
20
  font-size: ${fontSizeSmall()}px;
@@ -47,20 +47,22 @@ export const NavigationContextProvider = ({
47
47
  const [history, setHistory] = useState(propsHistory ? propsHistory : []);
48
48
  const tempHistory = useRef(propsHistory ? propsHistory : []);
49
49
  const clearHistory = useCallback(() => {
50
- if (!articleIdSetter) {
51
- return;
52
- } // Clear History
50
+ if (tempHistory.current.length > 0) {
51
+ if (!articleIdSetter) {
52
+ return;
53
+ } // Clear History
53
54
 
54
55
 
55
- tempHistory.current = [];
56
- setHistory(tempHistory.current); // Clear host history using the historySetter
56
+ tempHistory.current = [];
57
+ setHistory(tempHistory.current); // Clear host history using the historySetter
57
58
 
58
- historySetter && historySetter(tempHistory.current); // Set article ID to ''
59
+ historySetter && historySetter(tempHistory.current); // Set article ID to ''
59
60
 
60
- articleIdSetter({
61
- id: '',
62
- type: ARTICLE_TYPE.HELP_ARTICLE
63
- });
61
+ articleIdSetter({
62
+ id: '',
63
+ type: ARTICLE_TYPE.HELP_ARTICLE
64
+ });
65
+ }
64
66
  }, [articleIdSetter, historySetter]);
65
67
  const isDefaultContentDefined = useCallback(() => {
66
68
  return homeContent !== undefined || homeOptions !== undefined;
@@ -399,12 +401,12 @@ export const NavigationContextProvider = ({
399
401
  }
400
402
  } else {
401
403
  // If article ID is empty clear the history
402
- if (history.length > 0) {
404
+ if (!getCurrentArticle()) {
403
405
  clearHistory();
404
406
  }
405
407
  }
406
408
  }
407
- }, [articleId, articleIdSetter, clearHistory, fetchArticleData, getCurrentArticle, updateHistoryItem, history.length]);
409
+ }, [articleId, articleIdSetter, clearHistory, fetchArticleData, getCurrentArticle, updateHistoryItem]);
408
410
  /**
409
411
  * VIEW effect
410
412
  * Set the view value based on the values of articleId
@@ -56,13 +56,14 @@ export const getMockWhatsNewArticle = (id, routeName = '', routeGroup = '', prod
56
56
  relatedArticles: getMockArticleItemList(10)
57
57
  };
58
58
  };
59
- export const getMockWhatsNewArticleItem = (id, type, title = `Mock What's New article title`, description = '', changeTargetSchedule = '', status = '', href = '') => {
59
+ export const getMockWhatsNewArticleItem = (id, type, title = `Mock What's New article title`, description = '', changeTargetSchedule = '', status = '', featureRolloutDate = '01-01-2022', href = '') => {
60
60
  return {
61
61
  title,
62
62
  changeTargetSchedule,
63
63
  type,
64
64
  status,
65
65
  href,
66
+ featureRolloutDate,
66
67
  id
67
68
  };
68
69
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/help",
3
- "version": "4.2.2",
3
+ "version": "4.2.3",
4
4
  "sideEffects": false
5
5
  }
@@ -4,7 +4,8 @@ var _templateObject, _templateObject2, _templateObject3;
4
4
 
5
5
  /** @jsx jsx */
6
6
  import styled from '@emotion/styled';
7
- import { fontSize, gridSize } from '@atlaskit/theme/constants';
7
+ import { gridSize } from '@atlaskit/theme/constants';
8
+ import { h400 } from '@atlaskit/theme/typography';
8
9
  import * as colors from '@atlaskit/theme/colors';
9
10
  export var WhatsNewResultListItemWrapper = styled.a({
10
11
  position: "relative",
@@ -33,5 +34,5 @@ export var WhatsNewResultListItemWrapper = styled.a({
33
34
  return props.styles;
34
35
  });
35
36
  export var WhatsNewResultListItemTitleContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n white-space: nowrap;\n margin-bottom: ", "px;\n"])), gridSize() / 2);
36
- export var WhatsNewResultListItemTitleText = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n text-decoration: none;\n color: ", ";\n font-size: ", "px;\n font-weight: 600;\n display: inline-block;\n vertical-align: middle;\n padding-left: ", "px;\n line-height: ", "px;\n white-space: normal;\n overflow-x: hidden;\n"])), colors.N800, fontSize(), gridSize() / 2, gridSize() * 2.5);
37
+ export var WhatsNewResultListItemTitleText = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n display: inline-block;\n vertical-align: middle;\n margin: 0;\n padding-left: ", "px;\n white-space: normal;\n overflow-x: hidden;\n"])), h400(), gridSize() / 2);
37
38
  export var WhatsNewResultListItemDescription = styled.p(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: block;\n line-height: ", "px;\n color: ", ";\n margin: 0;\n"])), gridSize() * 2.5, colors.N400);
@@ -1,7 +1,13 @@
1
- import React from 'react';
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import React, { useEffect, useState } from 'react';
2
3
  import { gridSize } from '@atlaskit/theme/constants';
3
4
  import * as colors from '@atlaskit/theme/colors';
5
+ import toDate from 'date-fns/toDate';
6
+ import isYesterday from 'date-fns/isYesterday';
7
+ import isToday from 'date-fns/isToday';
8
+ import formatDate from 'date-fns/format';
4
9
  import WhatsNewResultItem from './WhatsNewResultItem';
10
+ import { WhatsNewResultsListGroupTitle, WhatsNewResultsListGroupWrapper } from './styled';
5
11
 
6
12
  var WhatsNewResultsList = function WhatsNewResultsList(_ref) {
7
13
  var _ref$style = _ref.style,
@@ -9,23 +15,56 @@ var WhatsNewResultsList = function WhatsNewResultsList(_ref) {
9
15
  _ref$whatsNewArticles = _ref.whatsNewArticles,
10
16
  whatsNewArticles = _ref$whatsNewArticles === void 0 ? [] : _ref$whatsNewArticles,
11
17
  onWhatsNewResultItemClick = _ref.onWhatsNewResultItemClick;
12
- return whatsNewArticles && /*#__PURE__*/React.createElement(React.Fragment, null, whatsNewArticles.map(function (whatsNewArticle, i) {
13
- return /*#__PURE__*/React.createElement(WhatsNewResultItem, {
14
- styles: {
15
- border: style === 'secondary' ? "2px solid ".concat(colors.N30) : 0,
16
- padding: style === 'secondary' ? "".concat(gridSize(), "px ").concat(gridSize() * 2, "px") : "".concat(gridSize(), "px"),
17
- marginBottom: style === 'secondary' ? "".concat(gridSize() * 1.5, "px") : 0
18
- },
19
- id: whatsNewArticle.id,
20
- onClick: function onClick(event, analyticsEvent) {
21
- if (onWhatsNewResultItemClick) {
22
- onWhatsNewResultItemClick(event, analyticsEvent, whatsNewArticle);
18
+
19
+ var _useState = useState({}),
20
+ _useState2 = _slicedToArray(_useState, 2),
21
+ whatsNewArticlesGroupedByDate = _useState2[0],
22
+ setListValuesGrouped = _useState2[1];
23
+
24
+ useEffect(function () {
25
+ var whatsNewArticlesGroupedByDateTemp = {};
26
+ whatsNewArticles === null || whatsNewArticles === void 0 ? void 0 : whatsNewArticles.forEach(function (whatsNewArticle) {
27
+ var featureRolloutDateString = whatsNewArticle === null || whatsNewArticle === void 0 ? void 0 : whatsNewArticle.featureRolloutDate;
28
+
29
+ if (featureRolloutDateString) {
30
+ var featureRolloutDateArray = featureRolloutDateString.split('-').map(function (dateValue) {
31
+ return parseInt(dateValue);
32
+ });
33
+ var featureRolloutDate = toDate(new Date(featureRolloutDateArray[0], featureRolloutDateArray[1], featureRolloutDateArray[2]));
34
+
35
+ if (whatsNewArticlesGroupedByDateTemp[featureRolloutDateString]) {
36
+ whatsNewArticlesGroupedByDateTemp[featureRolloutDateString].items.push(whatsNewArticle);
37
+ } else {
38
+ whatsNewArticlesGroupedByDateTemp[featureRolloutDateString] = {
39
+ title: isToday(featureRolloutDate) ? 'Today' : isYesterday(featureRolloutDate) ? 'Yesterday' : formatDate(featureRolloutDate, 'PPPP'),
40
+ items: [whatsNewArticle]
41
+ };
23
42
  }
24
- },
25
- type: whatsNewArticle.type,
26
- title: whatsNewArticle.title,
27
- key: whatsNewArticle.id
43
+ }
28
44
  });
45
+ setListValuesGrouped(whatsNewArticlesGroupedByDateTemp);
46
+ }, [whatsNewArticles]);
47
+ return whatsNewArticlesGroupedByDate && /*#__PURE__*/React.createElement(React.Fragment, null, Object.keys(whatsNewArticlesGroupedByDate).map(function (key) {
48
+ return /*#__PURE__*/React.createElement(WhatsNewResultsListGroupWrapper, {
49
+ key: key
50
+ }, /*#__PURE__*/React.createElement(WhatsNewResultsListGroupTitle, null, whatsNewArticlesGroupedByDate[key].title), whatsNewArticlesGroupedByDate[key].items.map(function (whatsNewArticle, i) {
51
+ return /*#__PURE__*/React.createElement(WhatsNewResultItem, {
52
+ styles: {
53
+ border: style === 'secondary' ? "2px solid ".concat(colors.N30) : 0,
54
+ padding: style === 'secondary' ? "".concat(gridSize(), "px ").concat(gridSize() * 2, "px") : "".concat(gridSize(), "px"),
55
+ marginBottom: style === 'secondary' ? "".concat(gridSize() * 1.5, "px") : 0
56
+ },
57
+ id: whatsNewArticle.id,
58
+ onClick: function onClick(event, analyticsEvent) {
59
+ if (onWhatsNewResultItemClick) {
60
+ onWhatsNewResultItemClick(event, analyticsEvent, whatsNewArticle);
61
+ }
62
+ },
63
+ type: whatsNewArticle.type,
64
+ title: whatsNewArticle.title,
65
+ key: whatsNewArticle.id
66
+ });
67
+ }));
29
68
  }));
30
69
  };
31
70
 
@@ -1,6 +1,6 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
 
3
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
4
4
 
5
5
  /** @jsx jsx */
6
6
  import { css } from '@emotion/core';
@@ -12,5 +12,6 @@ export var truncate = function truncate() {
12
12
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: ", ";\n"])), width);
13
13
  };
14
14
  export var WhatsNewResultsListContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n"])));
15
- export var WhatsNewResultsListGroupTitle = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: ", "px;\n font-weight: bold;\n padding: 0 ", "px ", "px ", "px;\n text-transform: uppercase;\n"])), colors.N200, fontSizeSmall(), gridSize(), gridSize(), gridSize());
16
- export var ToggleShowWhatsNewResultsContainer = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: ", "px 0;\n span {\n margin: 0;\n }\n"])), gridSize());
15
+ export var WhatsNewResultsListGroupWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: ", "px 0 0 0;\n"])), gridSize());
16
+ export var WhatsNewResultsListGroupTitle = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: ", "px;\n font-weight: bold;\n padding: 0 ", "px ", "px ", "px;\n text-transform: uppercase;\n"])), colors.N200, fontSizeSmall(), gridSize(), gridSize(), gridSize());
17
+ export var ToggleShowWhatsNewResultsContainer = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: ", "px 0;\n span {\n margin: 0;\n }\n"])), gridSize());
@@ -73,20 +73,22 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref)
73
73
 
74
74
  var tempHistory = useRef(propsHistory ? propsHistory : []);
75
75
  var clearHistory = useCallback(function () {
76
- if (!articleIdSetter) {
77
- return;
78
- } // Clear History
76
+ if (tempHistory.current.length > 0) {
77
+ if (!articleIdSetter) {
78
+ return;
79
+ } // Clear History
79
80
 
80
81
 
81
- tempHistory.current = [];
82
- setHistory(tempHistory.current); // Clear host history using the historySetter
82
+ tempHistory.current = [];
83
+ setHistory(tempHistory.current); // Clear host history using the historySetter
83
84
 
84
- historySetter && historySetter(tempHistory.current); // Set article ID to ''
85
+ historySetter && historySetter(tempHistory.current); // Set article ID to ''
85
86
 
86
- articleIdSetter({
87
- id: '',
88
- type: ARTICLE_TYPE.HELP_ARTICLE
89
- });
87
+ articleIdSetter({
88
+ id: '',
89
+ type: ARTICLE_TYPE.HELP_ARTICLE
90
+ });
91
+ }
90
92
  }, [articleIdSetter, historySetter]);
91
93
  var isDefaultContentDefined = useCallback(function () {
92
94
  return homeContent !== undefined || homeOptions !== undefined;
@@ -580,12 +582,12 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref)
580
582
  }
581
583
  } else {
582
584
  // If article ID is empty clear the history
583
- if (history.length > 0) {
585
+ if (!getCurrentArticle()) {
584
586
  clearHistory();
585
587
  }
586
588
  }
587
589
  }
588
- }, [articleId, articleIdSetter, clearHistory, fetchArticleData, getCurrentArticle, updateHistoryItem, history.length]);
590
+ }, [articleId, articleIdSetter, clearHistory, fetchArticleData, getCurrentArticle, updateHistoryItem]);
589
591
  /**
590
592
  * VIEW effect
591
593
  * Set the view value based on the values of articleId
@@ -73,13 +73,15 @@ export var getMockWhatsNewArticleItem = function getMockWhatsNewArticleItem(id,
73
73
  var description = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
74
74
  var changeTargetSchedule = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
75
75
  var status = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : '';
76
- var href = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : '';
76
+ var featureRolloutDate = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : '01-01-2022';
77
+ var href = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : '';
77
78
  return {
78
79
  title: title,
79
80
  changeTargetSchedule: changeTargetSchedule,
80
81
  type: type,
81
82
  status: status,
82
83
  href: href,
84
+ featureRolloutDate: featureRolloutDate,
83
85
  id: id
84
86
  };
85
87
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/help",
3
- "version": "4.2.2",
3
+ "version": "4.2.3",
4
4
  "sideEffects": false
5
5
  }
@@ -2,5 +2,6 @@
2
2
  /// <reference types="react" />
3
3
  export declare const truncate: (width?: string) => import("@emotion/core").SerializedStyles;
4
4
  export declare const WhatsNewResultsListContainer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css">, any>;
5
+ export declare const WhatsNewResultsListGroupWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css">, any>;
5
6
  export declare const WhatsNewResultsListGroupTitle: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css">, any>;
6
7
  export declare const ToggleShowWhatsNewResultsContainer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css">, any>;
@@ -16,6 +16,7 @@ export interface WhatsNewArticleItem {
16
16
  changeTargetSchedule?: string;
17
17
  type?: WHATS_NEW_ITEM_TYPES;
18
18
  status?: string;
19
+ featureRolloutDate?: string;
19
20
  relatedExternalLinks?: string;
20
21
  communityUrl?: string;
21
22
  href?: string;
@@ -4,5 +4,5 @@ export declare const getMockArticle: (id: string, routeName?: string, routeGroup
4
4
  export declare const getMockArticleItem: (id: string, routeName?: string, routeGroup?: string, productName?: string, href?: string) => ArticleItem;
5
5
  export declare const getMockArticleItemList: (numberOfItems: number) => ArticleItem[];
6
6
  export declare const getMockWhatsNewArticle: (id: string, routeName?: string, routeGroup?: string, productName?: string, href?: string) => Article;
7
- export declare const getMockWhatsNewArticleItem: (id: string, type?: WHATS_NEW_ITEM_TYPES | undefined, title?: string, description?: string, changeTargetSchedule?: string, status?: string, href?: string) => WhatsNewArticleItem;
7
+ export declare const getMockWhatsNewArticleItem: (id: string, type?: WHATS_NEW_ITEM_TYPES | undefined, title?: string, description?: string, changeTargetSchedule?: string, status?: string, featureRolloutDate?: string, href?: string) => WhatsNewArticleItem;
8
8
  export declare const getMockWhatsNewArticleItemList: (numberOfItems: number) => WhatsNewArticleItem[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/help",
3
- "version": "4.2.2",
3
+ "version": "4.2.3",
4
4
  "description": "A cross-product help component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -47,6 +47,7 @@
47
47
  "@babel/runtime": "^7.0.0",
48
48
  "@emotion/core": "^10.0.9",
49
49
  "@emotion/styled": "^10.0.7",
50
+ "date-fns": "^2.17.0",
50
51
  "lodash": "^4.17.15",
51
52
  "react-animate-height": "^2.0.5",
52
53
  "react-transition-group": "^4.4.1"