@atlaskit/help 4.1.1 → 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.
- package/CHANGELOG.md +24 -0
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +3 -1
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +61 -16
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +8 -4
- package/dist/cjs/components/contexts/navigationContext.js +19 -25
- package/dist/cjs/util/testing/mock.js +3 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +4 -6
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +50 -17
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +3 -0
- package/dist/es2019/components/contexts/navigationContext.js +18 -25
- package/dist/es2019/util/testing/mock.js +2 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +3 -2
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +55 -16
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +4 -3
- package/dist/esm/components/contexts/navigationContext.js +19 -25
- package/dist/esm/util/testing/mock.js +3 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.d.ts +1 -0
- package/dist/types/model/WhatsNew.d.ts +1 -0
- package/dist/types/util/testing/mock.d.ts +1 -1
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
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
|
+
|
|
9
|
+
## 4.2.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 4.2.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`82bdb8cd2d6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/82bdb8cd2d6) - [ux] Updated examples with the "What's New" section
|
|
20
|
+
|
|
21
|
+
## 4.2.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- [`3690098a745`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3690098a745) - [ux] Updated navigation logic for the "What's new" section
|
|
26
|
+
|
|
3
27
|
## 4.1.1
|
|
4
28
|
|
|
5
29
|
### 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
|
|
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
|
|
package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js
CHANGED
|
@@ -9,14 +9,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.default = void 0;
|
|
11
11
|
|
|
12
|
-
var
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
|
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(
|
|
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,23 +104,23 @@ 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 (
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
if (tempHistory.current.length > 0) {
|
|
108
|
+
if (!articleIdSetter) {
|
|
109
|
+
return;
|
|
110
|
+
} // Clear History
|
|
110
111
|
|
|
111
112
|
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
tempHistory.current = [];
|
|
114
|
+
setHistory(tempHistory.current); // Clear host history using the historySetter
|
|
114
115
|
|
|
115
|
-
|
|
116
|
+
historySetter && historySetter(tempHistory.current); // Set article ID to ''
|
|
116
117
|
|
|
117
|
-
if ((articleId === null || articleId === void 0 ? void 0 : articleId.id) !== '') {
|
|
118
118
|
articleIdSetter({
|
|
119
119
|
id: '',
|
|
120
120
|
type: _Help.ARTICLE_TYPE.HELP_ARTICLE
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
}, [articleIdSetter, historySetter
|
|
123
|
+
}, [articleIdSetter, historySetter]);
|
|
124
124
|
var isDefaultContentDefined = (0, _react.useCallback)(function () {
|
|
125
125
|
return homeContent !== undefined || homeOptions !== undefined;
|
|
126
126
|
}, [homeContent, homeOptions]);
|
|
@@ -515,19 +515,6 @@ var NavigationContextProvider = function NavigationContextProvider(_ref) {
|
|
|
515
515
|
return _context4.abrupt("return");
|
|
516
516
|
|
|
517
517
|
case 5:
|
|
518
|
-
if (!(view === _constants.VIEW.WHATS_NEW)) {
|
|
519
|
-
_context4.next = 9;
|
|
520
|
-
break;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
articleIdSetter({
|
|
524
|
-
id: '',
|
|
525
|
-
type: _Help.ARTICLE_TYPE.HELP_ARTICLE
|
|
526
|
-
});
|
|
527
|
-
updateView();
|
|
528
|
-
return _context4.abrupt("return");
|
|
529
|
-
|
|
530
|
-
case 9:
|
|
531
518
|
// if the history is not empty and ...
|
|
532
519
|
if (tempHistory.current.length > 0) {
|
|
533
520
|
// the history has more than one article, navigate back through the history
|
|
@@ -568,13 +555,13 @@ var NavigationContextProvider = function NavigationContextProvider(_ref) {
|
|
|
568
555
|
}
|
|
569
556
|
}
|
|
570
557
|
|
|
571
|
-
case
|
|
558
|
+
case 6:
|
|
572
559
|
case "end":
|
|
573
560
|
return _context4.stop();
|
|
574
561
|
}
|
|
575
562
|
}
|
|
576
563
|
}, _callee4);
|
|
577
|
-
})), [articleIdSetter, clearHistory, fetchArticleData, getCurrentArticle, historySetter, onSearch,
|
|
564
|
+
})), [articleIdSetter, clearHistory, fetchArticleData, getCurrentArticle, historySetter, onSearch, view]);
|
|
578
565
|
var onClose = (0, _react.useCallback)(function (event, analyticsEvent) {
|
|
579
566
|
if (onCloseButtonClick) {
|
|
580
567
|
clearHistory();
|
|
@@ -585,8 +572,15 @@ var NavigationContextProvider = function NavigationContextProvider(_ref) {
|
|
|
585
572
|
if (!articleIdSetter) {
|
|
586
573
|
return;
|
|
587
574
|
}
|
|
575
|
+
/**
|
|
576
|
+
* If the article type is HELP_ARTICLE and the ID is defined we add a new historyItem
|
|
577
|
+
*
|
|
578
|
+
* If the article type is WHATS_NEW it doesn't matter if the the articleId.id is defined or not, we want
|
|
579
|
+
* to add it to the history
|
|
580
|
+
*/
|
|
581
|
+
|
|
588
582
|
|
|
589
|
-
if (articleId && articleId.id) {
|
|
583
|
+
if ((articleId === null || articleId === void 0 ? void 0 : articleId.type) === _Help.ARTICLE_TYPE.HELP_ARTICLE && articleId !== null && articleId !== void 0 && articleId.id || (articleId === null || articleId === void 0 ? void 0 : articleId.type) === _Help.ARTICLE_TYPE.WHATS_NEW) {
|
|
590
584
|
// get the last History Item
|
|
591
585
|
var lastHistoryItem = getCurrentArticle(); // If the last history item articleId isn't different to the current articleId don't do anything
|
|
592
586
|
|
|
@@ -616,7 +610,7 @@ var NavigationContextProvider = function NavigationContextProvider(_ref) {
|
|
|
616
610
|
}
|
|
617
611
|
} else {
|
|
618
612
|
// If article ID is empty clear the history
|
|
619
|
-
if (
|
|
613
|
+
if (!getCurrentArticle()) {
|
|
620
614
|
clearHistory();
|
|
621
615
|
}
|
|
622
616
|
}
|
|
@@ -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
|
|
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
|
};
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import {
|
|
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
|
-
|
|
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
|
`;
|
package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js
CHANGED
|
@@ -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
|
-
}) =>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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,23 +47,23 @@ 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 (
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
if (tempHistory.current.length > 0) {
|
|
51
|
+
if (!articleIdSetter) {
|
|
52
|
+
return;
|
|
53
|
+
} // Clear History
|
|
53
54
|
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
tempHistory.current = [];
|
|
57
|
+
setHistory(tempHistory.current); // Clear host history using the historySetter
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
historySetter && historySetter(tempHistory.current); // Set article ID to ''
|
|
59
60
|
|
|
60
|
-
if ((articleId === null || articleId === void 0 ? void 0 : articleId.id) !== '') {
|
|
61
61
|
articleIdSetter({
|
|
62
62
|
id: '',
|
|
63
63
|
type: ARTICLE_TYPE.HELP_ARTICLE
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
}, [articleIdSetter, historySetter
|
|
66
|
+
}, [articleIdSetter, historySetter]);
|
|
67
67
|
const isDefaultContentDefined = useCallback(() => {
|
|
68
68
|
return homeContent !== undefined || homeOptions !== undefined;
|
|
69
69
|
}, [homeContent, homeOptions]);
|
|
@@ -310,20 +310,6 @@ export const NavigationContextProvider = ({
|
|
|
310
310
|
if (view === VIEW.SEARCH && onSearch) {
|
|
311
311
|
onSearch('');
|
|
312
312
|
return;
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* If the user is in the "What's new" search screen, set the articleId === { id: '', type: ARTICLE_TYPE.HELP_ARTICLE }
|
|
316
|
-
* to display the default content
|
|
317
|
-
*/
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
if (view === VIEW.WHATS_NEW) {
|
|
321
|
-
articleIdSetter({
|
|
322
|
-
id: '',
|
|
323
|
-
type: ARTICLE_TYPE.HELP_ARTICLE
|
|
324
|
-
});
|
|
325
|
-
updateView();
|
|
326
|
-
return;
|
|
327
313
|
} // if the history is not empty and ...
|
|
328
314
|
|
|
329
315
|
|
|
@@ -365,7 +351,7 @@ export const NavigationContextProvider = ({
|
|
|
365
351
|
clearHistory();
|
|
366
352
|
}
|
|
367
353
|
}
|
|
368
|
-
}, [articleIdSetter, clearHistory, fetchArticleData, getCurrentArticle, historySetter, onSearch,
|
|
354
|
+
}, [articleIdSetter, clearHistory, fetchArticleData, getCurrentArticle, historySetter, onSearch, view]);
|
|
369
355
|
const onClose = useCallback((event, analyticsEvent) => {
|
|
370
356
|
if (onCloseButtonClick) {
|
|
371
357
|
clearHistory();
|
|
@@ -376,8 +362,15 @@ export const NavigationContextProvider = ({
|
|
|
376
362
|
if (!articleIdSetter) {
|
|
377
363
|
return;
|
|
378
364
|
}
|
|
365
|
+
/**
|
|
366
|
+
* If the article type is HELP_ARTICLE and the ID is defined we add a new historyItem
|
|
367
|
+
*
|
|
368
|
+
* If the article type is WHATS_NEW it doesn't matter if the the articleId.id is defined or not, we want
|
|
369
|
+
* to add it to the history
|
|
370
|
+
*/
|
|
371
|
+
|
|
379
372
|
|
|
380
|
-
if (articleId && articleId.id) {
|
|
373
|
+
if ((articleId === null || articleId === void 0 ? void 0 : articleId.type) === ARTICLE_TYPE.HELP_ARTICLE && articleId !== null && articleId !== void 0 && articleId.id || (articleId === null || articleId === void 0 ? void 0 : articleId.type) === ARTICLE_TYPE.WHATS_NEW) {
|
|
381
374
|
// get the last History Item
|
|
382
375
|
const lastHistoryItem = getCurrentArticle(); // If the last history item articleId isn't different to the current articleId don't do anything
|
|
383
376
|
|
|
@@ -408,7 +401,7 @@ export const NavigationContextProvider = ({
|
|
|
408
401
|
}
|
|
409
402
|
} else {
|
|
410
403
|
// If article ID is empty clear the history
|
|
411
|
-
if (
|
|
404
|
+
if (!getCurrentArticle()) {
|
|
412
405
|
clearHistory();
|
|
413
406
|
}
|
|
414
407
|
}
|
|
@@ -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
|
};
|
package/dist/es2019/version.json
CHANGED
|
@@ -4,7 +4,8 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
4
4
|
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import styled from '@emotion/styled';
|
|
7
|
-
import {
|
|
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
|
|
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);
|
package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
|
16
|
-
export var
|
|
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,23 +73,23 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref)
|
|
|
73
73
|
|
|
74
74
|
var tempHistory = useRef(propsHistory ? propsHistory : []);
|
|
75
75
|
var clearHistory = useCallback(function () {
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
if (tempHistory.current.length > 0) {
|
|
77
|
+
if (!articleIdSetter) {
|
|
78
|
+
return;
|
|
79
|
+
} // Clear History
|
|
79
80
|
|
|
80
81
|
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
tempHistory.current = [];
|
|
83
|
+
setHistory(tempHistory.current); // Clear host history using the historySetter
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
historySetter && historySetter(tempHistory.current); // Set article ID to ''
|
|
85
86
|
|
|
86
|
-
if ((articleId === null || articleId === void 0 ? void 0 : articleId.id) !== '') {
|
|
87
87
|
articleIdSetter({
|
|
88
88
|
id: '',
|
|
89
89
|
type: ARTICLE_TYPE.HELP_ARTICLE
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
}, [articleIdSetter, historySetter
|
|
92
|
+
}, [articleIdSetter, historySetter]);
|
|
93
93
|
var isDefaultContentDefined = useCallback(function () {
|
|
94
94
|
return homeContent !== undefined || homeOptions !== undefined;
|
|
95
95
|
}, [homeContent, homeOptions]);
|
|
@@ -487,19 +487,6 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref)
|
|
|
487
487
|
return _context4.abrupt("return");
|
|
488
488
|
|
|
489
489
|
case 5:
|
|
490
|
-
if (!(view === VIEW.WHATS_NEW)) {
|
|
491
|
-
_context4.next = 9;
|
|
492
|
-
break;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
articleIdSetter({
|
|
496
|
-
id: '',
|
|
497
|
-
type: ARTICLE_TYPE.HELP_ARTICLE
|
|
498
|
-
});
|
|
499
|
-
updateView();
|
|
500
|
-
return _context4.abrupt("return");
|
|
501
|
-
|
|
502
|
-
case 9:
|
|
503
490
|
// if the history is not empty and ...
|
|
504
491
|
if (tempHistory.current.length > 0) {
|
|
505
492
|
// the history has more than one article, navigate back through the history
|
|
@@ -540,13 +527,13 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref)
|
|
|
540
527
|
}
|
|
541
528
|
}
|
|
542
529
|
|
|
543
|
-
case
|
|
530
|
+
case 6:
|
|
544
531
|
case "end":
|
|
545
532
|
return _context4.stop();
|
|
546
533
|
}
|
|
547
534
|
}
|
|
548
535
|
}, _callee4);
|
|
549
|
-
})), [articleIdSetter, clearHistory, fetchArticleData, getCurrentArticle, historySetter, onSearch,
|
|
536
|
+
})), [articleIdSetter, clearHistory, fetchArticleData, getCurrentArticle, historySetter, onSearch, view]);
|
|
550
537
|
var onClose = useCallback(function (event, analyticsEvent) {
|
|
551
538
|
if (onCloseButtonClick) {
|
|
552
539
|
clearHistory();
|
|
@@ -557,8 +544,15 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref)
|
|
|
557
544
|
if (!articleIdSetter) {
|
|
558
545
|
return;
|
|
559
546
|
}
|
|
547
|
+
/**
|
|
548
|
+
* If the article type is HELP_ARTICLE and the ID is defined we add a new historyItem
|
|
549
|
+
*
|
|
550
|
+
* If the article type is WHATS_NEW it doesn't matter if the the articleId.id is defined or not, we want
|
|
551
|
+
* to add it to the history
|
|
552
|
+
*/
|
|
553
|
+
|
|
560
554
|
|
|
561
|
-
if (articleId && articleId.id) {
|
|
555
|
+
if ((articleId === null || articleId === void 0 ? void 0 : articleId.type) === ARTICLE_TYPE.HELP_ARTICLE && articleId !== null && articleId !== void 0 && articleId.id || (articleId === null || articleId === void 0 ? void 0 : articleId.type) === ARTICLE_TYPE.WHATS_NEW) {
|
|
562
556
|
// get the last History Item
|
|
563
557
|
var lastHistoryItem = getCurrentArticle(); // If the last history item articleId isn't different to the current articleId don't do anything
|
|
564
558
|
|
|
@@ -588,7 +582,7 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref)
|
|
|
588
582
|
}
|
|
589
583
|
} else {
|
|
590
584
|
// If article ID is empty clear the history
|
|
591
|
-
if (
|
|
585
|
+
if (!getCurrentArticle()) {
|
|
592
586
|
clearHistory();
|
|
593
587
|
}
|
|
594
588
|
}
|
|
@@ -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
|
|
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
|
};
|
package/dist/esm/version.json
CHANGED
|
@@ -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>;
|
|
@@ -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.
|
|
3
|
+
"version": "4.2.3",
|
|
4
4
|
"description": "A cross-product help component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"@atlaskit/analytics-next": "^8.0.0",
|
|
31
31
|
"@atlaskit/button": "^16.1.0",
|
|
32
32
|
"@atlaskit/checkbox": "^12.3.0",
|
|
33
|
-
"@atlaskit/form": "^8.
|
|
33
|
+
"@atlaskit/form": "^8.4.0",
|
|
34
34
|
"@atlaskit/help-article": "^4.0.0",
|
|
35
35
|
"@atlaskit/help-layout": "^3.0.0",
|
|
36
|
-
"@atlaskit/icon": "^21.
|
|
36
|
+
"@atlaskit/icon": "^21.9.0",
|
|
37
37
|
"@atlaskit/item": "^12.0.0",
|
|
38
38
|
"@atlaskit/notification-indicator": "^8.0.0",
|
|
39
39
|
"@atlaskit/notification-log-client": "^5.0.0",
|
|
@@ -43,10 +43,11 @@
|
|
|
43
43
|
"@atlaskit/spinner": "^15.1.0",
|
|
44
44
|
"@atlaskit/textarea": "^4.2.0",
|
|
45
45
|
"@atlaskit/textfield": "^5.1.0",
|
|
46
|
-
"@atlaskit/theme": "^
|
|
46
|
+
"@atlaskit/theme": "^12.0.0",
|
|
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"
|