@atlaskit/help 7.1.26 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/components/Article/ArticleLoadingFail/styled.js +1 -0
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/index.js +0 -1
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/styled.js +3 -3
- package/dist/cjs/components/Article/WhatsNewArticle/styled.js +7 -6
- package/dist/cjs/components/Article/styled.js +2 -2
- package/dist/cjs/components/ArticlesList/ArticlesListItem/styled.js +5 -4
- package/dist/cjs/components/ArticlesList/styled.js +2 -2
- package/dist/cjs/components/HelpContentButton/styled.js +5 -5
- package/dist/cjs/components/RelatedArticles/index.js +28 -30
- package/dist/cjs/components/RelatedArticles/styled.js +4 -3
- package/dist/cjs/components/Search/SearchInput/styled.js +3 -3
- package/dist/cjs/components/Search/SearchResults/styled.js +1 -0
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.js +1 -0
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.js +1 -0
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +5 -4
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +2 -3
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +4 -3
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +3 -3
- package/dist/cjs/components/WhatsNew/WhatsNewResults/styled.js +4 -3
- package/dist/cjs/components/constants.js +8 -8
- package/dist/cjs/components/contexts/navigationContext.js +122 -130
- package/dist/cjs/components/contexts/searchContext.js +28 -30
- package/dist/cjs/components/contexts/whatsNewArticleContext.js +51 -53
- package/dist/cjs/components/styled.js +3 -3
- package/dist/cjs/model/Article.js +4 -4
- package/dist/cjs/model/Help.js +4 -4
- package/dist/cjs/model/Requests.js +4 -4
- package/dist/cjs/model/WhatsNew.js +4 -4
- package/dist/cjs/util/styled.js +3 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/styled.js +2 -3
- package/dist/es2019/components/Article/WhatsNewArticle/styled.js +8 -8
- package/dist/es2019/components/Article/styled.js +1 -2
- package/dist/es2019/components/ArticlesList/ArticlesListItem/styled.js +7 -7
- package/dist/es2019/components/ArticlesList/styled.js +1 -2
- package/dist/es2019/components/HelpContentButton/styled.js +6 -7
- package/dist/es2019/components/RelatedArticles/styled.js +5 -5
- package/dist/es2019/components/Search/SearchInput/styled.js +8 -9
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +4 -5
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +2 -3
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +5 -4
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +2 -4
- package/dist/es2019/components/WhatsNew/WhatsNewResults/styled.js +3 -3
- package/dist/es2019/components/constants.js +8 -8
- package/dist/es2019/components/styled.js +1 -2
- package/dist/es2019/model/Article.js +3 -3
- package/dist/es2019/model/Help.js +3 -3
- package/dist/es2019/model/Requests.js +3 -3
- package/dist/es2019/model/WhatsNew.js +3 -3
- package/dist/es2019/util/styled.js +4 -4
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/styled.js +2 -3
- package/dist/esm/components/Article/WhatsNewArticle/styled.js +7 -7
- package/dist/esm/components/Article/styled.js +1 -2
- package/dist/esm/components/ArticlesList/ArticlesListItem/styled.js +5 -5
- package/dist/esm/components/ArticlesList/styled.js +1 -2
- package/dist/esm/components/HelpContentButton/styled.js +4 -5
- package/dist/esm/components/RelatedArticles/index.js +28 -30
- package/dist/esm/components/RelatedArticles/styled.js +4 -4
- package/dist/esm/components/Search/SearchInput/styled.js +2 -3
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +4 -5
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +2 -3
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +4 -4
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +2 -4
- package/dist/esm/components/WhatsNew/WhatsNewResults/styled.js +3 -3
- package/dist/esm/components/constants.js +8 -8
- package/dist/esm/components/contexts/navigationContext.js +122 -130
- package/dist/esm/components/contexts/searchContext.js +28 -30
- package/dist/esm/components/contexts/whatsNewArticleContext.js +51 -53
- package/dist/esm/components/styled.js +2 -3
- package/dist/esm/model/Article.js +3 -3
- package/dist/esm/model/Help.js +3 -3
- package/dist/esm/model/Requests.js +3 -3
- package/dist/esm/model/WhatsNew.js +3 -3
- package/dist/esm/util/styled.js +2 -2
- package/dist/esm/version.json +1 -1
- package/package.json +21 -21
- package/tmp/api-report-tmp.d.ts +0 -300
|
@@ -52,37 +52,35 @@ export var RelatedArticles = function RelatedArticles(_ref) {
|
|
|
52
52
|
var updateRelatedArticles = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
53
53
|
var _relatedArticles;
|
|
54
54
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
55
|
-
while (1) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
_context.next = 15;
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
_context.prev = 1;
|
|
63
|
-
_context.next = 4;
|
|
64
|
-
return cancellablePromise(onGetRelatedArticles(routeGroup, routeName));
|
|
65
|
-
case 4:
|
|
66
|
-
_relatedArticles = _context.sent;
|
|
67
|
-
setRelatedArticles(_relatedArticles);
|
|
68
|
-
setIsLoading(false);
|
|
69
|
-
setHasError(false);
|
|
70
|
-
_context.next = 13;
|
|
55
|
+
while (1) switch (_context.prev = _context.next) {
|
|
56
|
+
case 0:
|
|
57
|
+
if (!onGetRelatedArticles) {
|
|
58
|
+
_context.next = 15;
|
|
71
59
|
break;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
60
|
+
}
|
|
61
|
+
_context.prev = 1;
|
|
62
|
+
_context.next = 4;
|
|
63
|
+
return cancellablePromise(onGetRelatedArticles(routeGroup, routeName));
|
|
64
|
+
case 4:
|
|
65
|
+
_relatedArticles = _context.sent;
|
|
66
|
+
setRelatedArticles(_relatedArticles);
|
|
67
|
+
setIsLoading(false);
|
|
68
|
+
setHasError(false);
|
|
69
|
+
_context.next = 13;
|
|
70
|
+
break;
|
|
71
|
+
case 10:
|
|
72
|
+
_context.prev = 10;
|
|
73
|
+
_context.t0 = _context["catch"](1);
|
|
74
|
+
setHasError(true);
|
|
75
|
+
case 13:
|
|
76
|
+
_context.next = 17;
|
|
77
|
+
break;
|
|
78
|
+
case 15:
|
|
79
|
+
setIsLoading(false);
|
|
80
|
+
setHasError(false);
|
|
81
|
+
case 17:
|
|
82
|
+
case "end":
|
|
83
|
+
return _context.stop();
|
|
86
84
|
}
|
|
87
85
|
}, _callee, null, [[1, 10]]);
|
|
88
86
|
})), [cancellablePromise, onGetRelatedArticles, routeGroup, routeName]);
|
|
@@ -5,7 +5,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
5
5
|
import { css } from '@emotion/core';
|
|
6
6
|
import styled from '@emotion/styled';
|
|
7
7
|
import * as colors from '@atlaskit/theme/colors';
|
|
8
|
-
import {
|
|
8
|
+
import { fontSize } from '@atlaskit/theme/constants';
|
|
9
9
|
var baseHeading = function baseHeading(size, lineHeight) {
|
|
10
10
|
return "\n font-size: ".concat(size / fontSize(), "em;\n font-style: inherit;\n line-height: ").concat(lineHeight / size, ";\n");
|
|
11
11
|
};
|
|
@@ -13,11 +13,11 @@ export var truncate = function truncate() {
|
|
|
13
13
|
var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
|
|
14
14
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: ", ";\n"])), width);
|
|
15
15
|
};
|
|
16
|
-
export var RelatedArticlesTitle = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n color: ", ";\n font-weight: 600;\n letter-spacing: -0.006em;\n padding: ", "
|
|
16
|
+
export var RelatedArticlesTitle = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n color: ", ";\n font-weight: 600;\n letter-spacing: -0.006em;\n padding: ", " 0;\n"])), baseHeading(16, 20), "var(--ds-text, ".concat(colors.N800, ")"), "var(--ds-space-200, 16px)");
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Loading styled-components
|
|
20
20
|
*/
|
|
21
|
-
export var LoadignRelatedArticleSection = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: ", "
|
|
21
|
+
export var LoadignRelatedArticleSection = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: ", ";\n"])), "var(--ds-space-100, 8px)");
|
|
22
22
|
export var LoadignRelatedArticleList = styled.ul(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n"])));
|
|
23
|
-
export var LoadignRelatedArticleListItem = styled.li(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: block;\n width: 100%;\n padding: ", "
|
|
23
|
+
export var LoadignRelatedArticleListItem = styled.li(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: block;\n width: 100%;\n padding: ", ";\n margin-bottom: ", ";\n box-sizing: border-box;\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)");
|
|
@@ -2,7 +2,6 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3;
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
5
|
export var SearchInputContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n order: 0;\n flex: 0 1 auto;\n align-self: auto;\n width: 100%;\n box-sizing: border-box;\n"])));
|
|
7
|
-
export var SearchIconContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", "
|
|
8
|
-
export var CloseButtonAndSpinnerContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 0;\n padding-right: ", "
|
|
6
|
+
export var SearchIconContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n padding-left: ", ";\n\n & > span {\n padding-left: ", ";\n height: ", ";\n width: ", ";\n box-sizing: border-box;\n }\n"])), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)", "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)");
|
|
7
|
+
export var CloseButtonAndSpinnerContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 0;\n padding-right: ", ";\n position: relative;\n white-space: nowrap;\n\n & > span {\n padding-right: ", ";\n }\n\n & > button,\n & > span {\n display: inline-block;\n vertical-align: middle;\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-050, 4px)");
|
|
@@ -2,13 +2,12 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3;
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
5
|
import { fontSize, fontSizeSmall } from '@atlaskit/theme/constants';
|
|
7
6
|
import * as colors from '@atlaskit/theme/colors';
|
|
8
7
|
export var WhatsNewResultListItemWrapper = styled.a({
|
|
9
8
|
position: "relative",
|
|
10
9
|
boxSizing: "border-box",
|
|
11
|
-
padding: "
|
|
10
|
+
padding: "var(--ds-space-100, 8px)",
|
|
12
11
|
display: "block",
|
|
13
12
|
textDecoration: "none",
|
|
14
13
|
cursor: "pointer",
|
|
@@ -32,6 +31,6 @@ export var WhatsNewResultListItemWrapper = styled.a({
|
|
|
32
31
|
}, function (props) {
|
|
33
32
|
return props.styles;
|
|
34
33
|
});
|
|
35
|
-
export var WhatsNewResultListItemTitleContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n white-space: nowrap;\n margin-bottom: ", "
|
|
36
|
-
export var WhatsNewResultListItemTitleText = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: ", "px;\n display: inline-block;\n vertical-align: middle;\n margin: 0;\n padding-left: ", "
|
|
37
|
-
export var WhatsNewResultListItemDescription = styled.p(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: block;\n line-height: ", "
|
|
34
|
+
export var WhatsNewResultListItemTitleContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n white-space: nowrap;\n margin-bottom: ", ";\n"])), "var(--ds-space-050, 4px)");
|
|
35
|
+
export var WhatsNewResultListItemTitleText = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: ", "px;\n display: inline-block;\n vertical-align: middle;\n margin: 0;\n padding-left: ", ";\n white-space: normal;\n overflow-x: hidden;\n"])), fontSizeSmall(), fontSize(), "var(--ds-space-050, 4px)");
|
|
36
|
+
export var WhatsNewResultListItemDescription = styled.p(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: block;\n line-height: ", ";\n color: ", ";\n margin: 0;\n"])), "var(--ds-font-lineHeight-200, 20px)", "var(--ds-text, ".concat(colors.N800, ")"));
|
package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
4
3
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
4
|
import toDate from 'date-fns/toDate';
|
|
6
5
|
import isYesterday from 'date-fns/isYesterday';
|
|
@@ -44,8 +43,8 @@ var WhatsNewResultsList = function WhatsNewResultsList(_ref) {
|
|
|
44
43
|
return /*#__PURE__*/React.createElement(WhatsNewResultItem, {
|
|
45
44
|
styles: {
|
|
46
45
|
border: style === 'secondary' ? "2px solid ".concat("var(--ds-border, ".concat(colors.N30, ")")) : 0,
|
|
47
|
-
padding: style === 'secondary' ? "".concat(
|
|
48
|
-
marginBottom: style === 'secondary' ? "
|
|
46
|
+
padding: style === 'secondary' ? "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-200, 16px)") : "var(--ds-space-100, 8px)",
|
|
47
|
+
marginBottom: style === 'secondary' ? "var(--ds-space-150, 12px)" : 0
|
|
49
48
|
},
|
|
50
49
|
id: whatsNewArticle.id,
|
|
51
50
|
onClick: function onClick(event, analyticsEvent) {
|
|
@@ -4,13 +4,13 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/core';
|
|
6
6
|
import styled from '@emotion/styled';
|
|
7
|
-
import { fontSizeSmall
|
|
7
|
+
import { fontSizeSmall } from '@atlaskit/theme/constants';
|
|
8
8
|
import * as colors from '@atlaskit/theme/colors';
|
|
9
9
|
export var truncate = function truncate() {
|
|
10
10
|
var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
|
|
11
11
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: ", ";\n"])), width);
|
|
12
12
|
};
|
|
13
13
|
export var WhatsNewResultsListContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n"])));
|
|
14
|
-
export var WhatsNewResultsListGroupWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: ", "
|
|
15
|
-
export var WhatsNewResultsListGroupTitle = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: ", "px;\n font-weight: bold;\n padding: 0 ", "
|
|
16
|
-
export var ToggleShowWhatsNewResultsContainer = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: ", "
|
|
14
|
+
export var WhatsNewResultsListGroupWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: ", " 0 ", " 0;\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)");
|
|
15
|
+
export var WhatsNewResultsListGroupTitle = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: ", "px;\n font-weight: bold;\n padding: 0 ", " ", "\n ", ";\n text-transform: uppercase;\n"])), "var(--ds-text-subtlest, ".concat(colors.N200, ")"), fontSizeSmall(), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)");
|
|
16
|
+
export var ToggleShowWhatsNewResultsContainer = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: ", " 0;\n span {\n margin: 0;\n }\n"])), "var(--ds-space-100, 8px)");
|
|
@@ -2,10 +2,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
|
-
|
|
7
5
|
/**
|
|
8
6
|
* Loading styled-components
|
|
9
7
|
*/
|
|
10
|
-
export var LoadignWhatsNewResultsList = styled.ul(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n margin-top: ", "
|
|
11
|
-
export var LoadignWhatsNewResultsListItem = styled.li(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: block;\n width: 100%;\n padding: ", "
|
|
8
|
+
export var LoadignWhatsNewResultsList = styled.ul(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n margin-top: ", ";\n"])), "var(--ds-space-200, 16px)");
|
|
9
|
+
export var LoadignWhatsNewResultsListItem = styled.li(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: block;\n width: 100%;\n padding: ", ";\n margin: 0;\n box-sizing: border-box;\n"])), "var(--ds-space-100, 8px)");
|
|
@@ -3,7 +3,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import styled from '@emotion/styled';
|
|
5
5
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
|
-
export var WhatsNewResultsContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n background-color: ", ";\n flex: 1;\n flex-direction: column;\n box-sizing: border-box;\n overflow-x: hidden;\n overflow-y: auto;\n z-index: 1;\n padding: ", "
|
|
6
|
+
export var WhatsNewResultsContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n background-color: ", ";\n flex: 1;\n flex-direction: column;\n box-sizing: border-box;\n overflow-x: hidden;\n overflow-y: auto;\n z-index: 1;\n padding: ", ";\n"])), "var(--ds-surface, #FFFFFF)", "var(--ds-space-200, 16px)");
|
|
7
7
|
export var SelectContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", "px;\n"])), 19 * gridSize());
|
|
8
|
-
export var WhatsNewResultsListContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding-top: ", "
|
|
9
|
-
export var WhatsNewResultsListTitleContainer = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 0 ", "
|
|
8
|
+
export var WhatsNewResultsListContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding-top: ", ";\n"])), "var(--ds-space-100, 8px)");
|
|
9
|
+
export var WhatsNewResultsListTitleContainer = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 0 ", ";\n"])), "var(--ds-space-100, 8px)");
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
export var MIN_CHARACTERS_FOR_SEARCH = 3;
|
|
2
2
|
export var LOADING_TIMEOUT = 1000;
|
|
3
3
|
export var NUMBER_OF_WHATS_NEW_ITEMS_PER_PAGE = 10;
|
|
4
|
-
export var VIEW
|
|
5
|
-
|
|
6
|
-
// Animation related consts
|
|
7
|
-
(function (VIEW) {
|
|
4
|
+
export var VIEW = /*#__PURE__*/function (VIEW) {
|
|
8
5
|
VIEW["DEFAULT_CONTENT"] = "DEFAULT_CONTENT";
|
|
9
6
|
VIEW["SEARCH"] = "SEARCH";
|
|
10
7
|
VIEW["ARTICLE"] = "ARTICLE";
|
|
11
8
|
VIEW["WHATS_NEW"] = "WHATS_NEW";
|
|
12
9
|
VIEW["WHATS_NEW_ARTICLE"] = "WHATS_NEW_ARTICLE";
|
|
13
|
-
|
|
10
|
+
return VIEW;
|
|
11
|
+
}({});
|
|
12
|
+
|
|
13
|
+
// Animation related consts
|
|
14
14
|
export var SLIDEIN_OVERLAY_TRANSITION_DURATION_MS = 300;
|
|
15
15
|
export var FADEIN_OVERLAY_TRANSITION_DURATION_MS = 440;
|
|
16
16
|
export var HIDE_CONTENT_DELAY = FADEIN_OVERLAY_TRANSITION_DURATION_MS + 200;
|
|
17
|
-
export var TRANSITION_STATUS
|
|
18
|
-
(function (TRANSITION_STATUS) {
|
|
17
|
+
export var TRANSITION_STATUS = /*#__PURE__*/function (TRANSITION_STATUS) {
|
|
19
18
|
TRANSITION_STATUS["UNMOUNTED"] = "unmounted";
|
|
20
19
|
TRANSITION_STATUS["EXITED"] = "exited";
|
|
21
20
|
TRANSITION_STATUS["ENTERING"] = "entering";
|
|
22
21
|
TRANSITION_STATUS["ENTERED"] = "entered";
|
|
23
22
|
TRANSITION_STATUS["EXITING"] = "exiting";
|
|
24
|
-
|
|
23
|
+
return TRANSITION_STATUS;
|
|
24
|
+
}({});
|
|
@@ -256,67 +256,65 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref4)
|
|
|
256
256
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(historyItem) {
|
|
257
257
|
var article;
|
|
258
258
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
259
|
-
while (1) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
259
|
+
while (1) switch (_context.prev = _context.next) {
|
|
260
|
+
case 0:
|
|
261
|
+
_context.prev = 0;
|
|
262
|
+
_context.t0 = historyItem.type;
|
|
263
|
+
_context.next = _context.t0 === ARTICLE_TYPE.HELP_ARTICLE ? 4 : _context.t0 === ARTICLE_TYPE.WHATS_NEW ? 10 : 18;
|
|
264
|
+
break;
|
|
265
|
+
case 4:
|
|
266
|
+
if (onGetHelpArticle) {
|
|
267
|
+
_context.next = 6;
|
|
265
268
|
break;
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
}));
|
|
316
|
-
case 26:
|
|
317
|
-
case "end":
|
|
318
|
-
return _context.stop();
|
|
319
|
-
}
|
|
269
|
+
}
|
|
270
|
+
throw new Error('onGetHelpArticle prop not defined');
|
|
271
|
+
case 6:
|
|
272
|
+
_context.next = 8;
|
|
273
|
+
return onGetHelpArticle({
|
|
274
|
+
id: historyItem.id,
|
|
275
|
+
type: historyItem.type
|
|
276
|
+
});
|
|
277
|
+
case 8:
|
|
278
|
+
article = _context.sent;
|
|
279
|
+
return _context.abrupt("break", 20);
|
|
280
|
+
case 10:
|
|
281
|
+
if (onGetWhatsNewArticle) {
|
|
282
|
+
_context.next = 12;
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
throw new Error('onGetWhatsNewArticle prop not defined');
|
|
286
|
+
case 12:
|
|
287
|
+
if (!(historyItem.id === '')) {
|
|
288
|
+
_context.next = 14;
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
return _context.abrupt("break", 20);
|
|
292
|
+
case 14:
|
|
293
|
+
_context.next = 16;
|
|
294
|
+
return onGetWhatsNewArticle({
|
|
295
|
+
id: historyItem.id,
|
|
296
|
+
type: historyItem.type
|
|
297
|
+
});
|
|
298
|
+
case 16:
|
|
299
|
+
article = _context.sent;
|
|
300
|
+
return _context.abrupt("break", 20);
|
|
301
|
+
case 18:
|
|
302
|
+
throw new Error('onGetHelpArticle prop not defined');
|
|
303
|
+
case 20:
|
|
304
|
+
return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread({}, historyItem), article && {
|
|
305
|
+
article: article
|
|
306
|
+
}), {}, {
|
|
307
|
+
state: REQUEST_STATE.done
|
|
308
|
+
}));
|
|
309
|
+
case 23:
|
|
310
|
+
_context.prev = 23;
|
|
311
|
+
_context.t1 = _context["catch"](0);
|
|
312
|
+
return _context.abrupt("return", _objectSpread(_objectSpread({}, historyItem), {}, {
|
|
313
|
+
state: REQUEST_STATE.error
|
|
314
|
+
}));
|
|
315
|
+
case 26:
|
|
316
|
+
case "end":
|
|
317
|
+
return _context.stop();
|
|
320
318
|
}
|
|
321
319
|
}, _callee, null, [[0, 23]]);
|
|
322
320
|
}));
|
|
@@ -328,23 +326,21 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref4)
|
|
|
328
326
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(historyItem) {
|
|
329
327
|
var historyItemToReload;
|
|
330
328
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
331
|
-
while (1) {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
return _context2.stop();
|
|
347
|
-
}
|
|
329
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
330
|
+
case 0:
|
|
331
|
+
historyItemToReload = _objectSpread({}, historyItem);
|
|
332
|
+
if (historyItem.type === ARTICLE_TYPE.HELP_ARTICLE || historyItem.type === ARTICLE_TYPE.WHATS_NEW) {
|
|
333
|
+
historyItemToReload.state = REQUEST_STATE.loading;
|
|
334
|
+
} else {
|
|
335
|
+
historyItemToReload.state = REQUEST_STATE.error;
|
|
336
|
+
}
|
|
337
|
+
dispatchNavigationAction({
|
|
338
|
+
type: 'updateHistoryItem',
|
|
339
|
+
payload: historyItemToReload
|
|
340
|
+
});
|
|
341
|
+
case 3:
|
|
342
|
+
case "end":
|
|
343
|
+
return _context2.stop();
|
|
348
344
|
}
|
|
349
345
|
}, _callee2);
|
|
350
346
|
}));
|
|
@@ -354,45 +350,43 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref4)
|
|
|
354
350
|
}(), []);
|
|
355
351
|
var navigateBack = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
356
352
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
357
|
-
while (1) {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
});
|
|
390
|
-
}
|
|
353
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
354
|
+
case 0:
|
|
355
|
+
if (!(currentView === VIEW.SEARCH && onSearch)) {
|
|
356
|
+
_context3.next = 8;
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
if (!(searchValue !== '')) {
|
|
360
|
+
_context3.next = 6;
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
363
|
+
onSearch('');
|
|
364
|
+
return _context3.abrupt("return");
|
|
365
|
+
case 6:
|
|
366
|
+
dispatchNavigationAction({
|
|
367
|
+
type: 'updateView',
|
|
368
|
+
payload: currentArticleId.type
|
|
369
|
+
});
|
|
370
|
+
return _context3.abrupt("return");
|
|
371
|
+
case 8:
|
|
372
|
+
// if the history is not empty and ...
|
|
373
|
+
if (currentHistory.length > 0) {
|
|
374
|
+
// the history has more than one article, navigate back through the history
|
|
375
|
+
if (currentHistory.length > 1) {
|
|
376
|
+
// Remove last element
|
|
377
|
+
dispatchNavigationAction({
|
|
378
|
+
type: 'removeLastHistoryItem'
|
|
379
|
+
});
|
|
380
|
+
} else if (currentHistory.length === 1) {
|
|
381
|
+
// but if the history only has one item, clear the history
|
|
382
|
+
dispatchNavigationAction({
|
|
383
|
+
type: 'removeAllHistoryItems'
|
|
384
|
+
});
|
|
391
385
|
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
386
|
+
}
|
|
387
|
+
case 9:
|
|
388
|
+
case "end":
|
|
389
|
+
return _context3.stop();
|
|
396
390
|
}
|
|
397
391
|
}, _callee3);
|
|
398
392
|
})), [currentView, onSearch, currentHistory.length, searchValue, currentArticleId.type]);
|
|
@@ -475,21 +469,19 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref4)
|
|
|
475
469
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(historyItem) {
|
|
476
470
|
var historyItemUpdate;
|
|
477
471
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
478
|
-
while (1) {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
return _context4.stop();
|
|
492
|
-
}
|
|
472
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
473
|
+
case 0:
|
|
474
|
+
_context4.next = 2;
|
|
475
|
+
return fetchArticleData(historyItem);
|
|
476
|
+
case 2:
|
|
477
|
+
historyItemUpdate = _context4.sent;
|
|
478
|
+
dispatchNavigationAction({
|
|
479
|
+
type: 'updateHistoryItem',
|
|
480
|
+
payload: historyItemUpdate
|
|
481
|
+
});
|
|
482
|
+
case 4:
|
|
483
|
+
case "end":
|
|
484
|
+
return _context4.stop();
|
|
493
485
|
}
|
|
494
486
|
}, _callee4);
|
|
495
487
|
}));
|
|
@@ -41,37 +41,35 @@ export var SearchContextProvider = function SearchContextProvider(_ref) {
|
|
|
41
41
|
results,
|
|
42
42
|
_args = arguments;
|
|
43
43
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
44
|
-
while (1) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
_context.next = 16;
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
_context.prev = 2;
|
|
53
|
-
_context.next = 5;
|
|
54
|
-
return onSearch(value);
|
|
55
|
-
case 5:
|
|
56
|
-
results = _context.sent;
|
|
57
|
-
setSearchResult(results);
|
|
58
|
-
setSearchState(REQUEST_STATE.done);
|
|
59
|
-
_context.next = 14;
|
|
44
|
+
while (1) switch (_context.prev = _context.next) {
|
|
45
|
+
case 0:
|
|
46
|
+
value = _args.length > 0 && _args[0] !== undefined ? _args[0] : '';
|
|
47
|
+
if (!onSearch) {
|
|
48
|
+
_context.next = 16;
|
|
60
49
|
break;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
50
|
+
}
|
|
51
|
+
_context.prev = 2;
|
|
52
|
+
_context.next = 5;
|
|
53
|
+
return onSearch(value);
|
|
54
|
+
case 5:
|
|
55
|
+
results = _context.sent;
|
|
56
|
+
setSearchResult(results);
|
|
57
|
+
setSearchState(REQUEST_STATE.done);
|
|
58
|
+
_context.next = 14;
|
|
59
|
+
break;
|
|
60
|
+
case 10:
|
|
61
|
+
_context.prev = 10;
|
|
62
|
+
_context.t0 = _context["catch"](2);
|
|
63
|
+
setSearchResult([]);
|
|
64
|
+
setSearchState(REQUEST_STATE.error);
|
|
65
|
+
case 14:
|
|
66
|
+
_context.next = 17;
|
|
67
|
+
break;
|
|
68
|
+
case 16:
|
|
69
|
+
setSearchState(REQUEST_STATE.error);
|
|
70
|
+
case 17:
|
|
71
|
+
case "end":
|
|
72
|
+
return _context.stop();
|
|
75
73
|
}
|
|
76
74
|
}, _callee, null, [[2, 10]]);
|
|
77
75
|
})), [onSearch]);
|