@atlaskit/help 9.2.1 → 9.2.2
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 +8 -0
- package/afm-cc/tsconfig.json +0 -3
- package/afm-jira/tsconfig.json +0 -3
- package/afm-products/tsconfig.json +0 -3
- package/dist/cjs/analytics.js +1 -1
- package/dist/cjs/assets/IconWrapper.js +0 -2
- package/dist/cjs/assets/WhatsNewIcoExperiment.js +0 -2
- package/dist/cjs/assets/WhatsNewIconFix.js +0 -2
- package/dist/cjs/assets/WhatsNewIconImprovement.js +0 -2
- package/dist/cjs/assets/WhatsNewIconNew.js +0 -2
- package/dist/cjs/assets/WhatsNewIconRemoved.js +0 -2
- package/dist/cjs/components/Article/ArticleLoadingFail/index.js +1 -1
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +1 -1
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +1 -1
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/index.js +3 -3
- package/dist/cjs/components/Article/HelpArticle/index.js +1 -1
- package/dist/cjs/components/Article/WhatsNewArticle/index.js +4 -4
- package/dist/cjs/components/Article/WhatsNewArticle/styled.compiled.css +4 -13
- package/dist/cjs/components/Article/WhatsNewArticle/styled.js +8 -17
- package/dist/cjs/components/ArticlesList/ArticlesList.js +6 -2
- package/dist/cjs/components/ArticlesList/ArticlesListItem/index.js +18 -12
- package/dist/cjs/components/ArticlesList/ArticlesListItem/styled.js +5 -3
- package/dist/cjs/components/ArticlesList/index.js +22 -1
- package/dist/cjs/components/BackButton/index.js +1 -1
- package/dist/cjs/components/HelpContentButton/index.js +4 -4
- package/dist/cjs/components/RelatedArticles/index.js +1 -1
- package/dist/cjs/components/Search/SearchInput/index.js +3 -3
- package/dist/cjs/components/Search/SearchResults/SearchExternalSite.js +2 -2
- package/dist/cjs/components/Search/SearchResults/SearchResultsEmpty.js +2 -2
- package/dist/cjs/components/WhatsNew/WhatsNewButton/index.js +1 -1
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +1 -1
- package/dist/es2019/analytics.js +1 -1
- package/dist/es2019/assets/IconWrapper.js +0 -2
- package/dist/es2019/assets/WhatsNewIcoExperiment.js +0 -2
- package/dist/es2019/assets/WhatsNewIconFix.js +0 -2
- package/dist/es2019/assets/WhatsNewIconImprovement.js +0 -2
- package/dist/es2019/assets/WhatsNewIconNew.js +0 -2
- package/dist/es2019/assets/WhatsNewIconRemoved.js +0 -2
- package/dist/es2019/components/Article/ArticleLoadingFail/index.js +1 -1
- package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +1 -1
- package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +1 -1
- package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/index.js +2 -2
- package/dist/es2019/components/Article/HelpArticle/index.js +1 -1
- package/dist/es2019/components/Article/WhatsNewArticle/index.js +2 -2
- package/dist/es2019/components/Article/WhatsNewArticle/styled.compiled.css +4 -12
- package/dist/es2019/components/Article/WhatsNewArticle/styled.js +8 -12
- package/dist/es2019/components/ArticlesList/ArticlesList.js +6 -2
- package/dist/es2019/components/ArticlesList/ArticlesListItem/index.js +17 -11
- package/dist/es2019/components/ArticlesList/ArticlesListItem/styled.js +4 -3
- package/dist/es2019/components/ArticlesList/index.js +23 -2
- package/dist/es2019/components/BackButton/index.js +1 -1
- package/dist/es2019/components/HelpContentButton/index.js +3 -3
- package/dist/es2019/components/RelatedArticles/index.js +1 -1
- package/dist/es2019/components/Search/SearchInput/index.js +2 -2
- package/dist/es2019/components/Search/SearchResults/SearchExternalSite.js +1 -1
- package/dist/es2019/components/Search/SearchResults/SearchResultsEmpty.js +1 -1
- package/dist/es2019/components/WhatsNew/WhatsNewButton/index.js +1 -1
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +1 -1
- package/dist/esm/analytics.js +1 -1
- package/dist/esm/assets/IconWrapper.js +0 -2
- package/dist/esm/assets/WhatsNewIcoExperiment.js +0 -2
- package/dist/esm/assets/WhatsNewIconFix.js +0 -2
- package/dist/esm/assets/WhatsNewIconImprovement.js +0 -2
- package/dist/esm/assets/WhatsNewIconNew.js +0 -2
- package/dist/esm/assets/WhatsNewIconRemoved.js +0 -2
- package/dist/esm/components/Article/ArticleLoadingFail/index.js +1 -1
- package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +1 -1
- package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +1 -1
- package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/index.js +2 -2
- package/dist/esm/components/Article/HelpArticle/index.js +1 -1
- package/dist/esm/components/Article/WhatsNewArticle/index.js +2 -2
- package/dist/esm/components/Article/WhatsNewArticle/styled.compiled.css +4 -13
- package/dist/esm/components/Article/WhatsNewArticle/styled.js +8 -17
- package/dist/esm/components/ArticlesList/ArticlesList.js +6 -2
- package/dist/esm/components/ArticlesList/ArticlesListItem/index.js +16 -10
- package/dist/esm/components/ArticlesList/ArticlesListItem/styled.js +5 -3
- package/dist/esm/components/ArticlesList/index.js +23 -2
- package/dist/esm/components/BackButton/index.js +1 -1
- package/dist/esm/components/HelpContentButton/index.js +3 -3
- package/dist/esm/components/RelatedArticles/index.js +1 -1
- package/dist/esm/components/Search/SearchInput/index.js +2 -2
- package/dist/esm/components/Search/SearchResults/SearchExternalSite.js +1 -1
- package/dist/esm/components/Search/SearchResults/SearchResultsEmpty.js +1 -1
- package/dist/esm/components/WhatsNew/WhatsNewButton/index.js +1 -1
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +1 -1
- package/dist/types/assets/IconWrapper.d.ts +3 -4
- package/dist/types/components/ArticlesList/ArticlesList.d.ts +1 -0
- package/dist/types/components/ArticlesList/ArticlesListItem/index.d.ts +4 -4
- package/dist/types/components/ArticlesList/ArticlesListItem/styled.d.ts +2 -2
- package/dist/types-ts4.5/assets/IconWrapper.d.ts +3 -4
- package/dist/types-ts4.5/components/ArticlesList/ArticlesList.d.ts +1 -0
- package/dist/types-ts4.5/components/ArticlesList/ArticlesListItem/index.d.ts +4 -4
- package/dist/types-ts4.5/components/ArticlesList/ArticlesListItem/styled.d.ts +2 -2
- package/package.json +10 -11
|
@@ -20,7 +20,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
20
20
|
var ANALYTICS_CONTEXT_DATA = {
|
|
21
21
|
componentName: 'WhatsNewButton',
|
|
22
22
|
packageName: "@atlaskit/help",
|
|
23
|
-
packageVersion: "
|
|
23
|
+
packageVersion: "0.0.0-development"
|
|
24
24
|
};
|
|
25
25
|
var WhatsNewButton = exports.WhatsNewButton = function WhatsNewButton(_ref) {
|
|
26
26
|
var productName = _ref.productName,
|
package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var _styled2 = require("./styled");
|
|
|
15
15
|
var ANALYTICS_CONTEXT_DATA = {
|
|
16
16
|
componentName: 'ArticlesListItem',
|
|
17
17
|
packageName: "@atlaskit/help",
|
|
18
|
-
packageVersion: "
|
|
18
|
+
packageVersion: "0.0.0-development"
|
|
19
19
|
};
|
|
20
20
|
var WhatsNewResultListItem = exports.WhatsNewResultListItem = function WhatsNewResultListItem(_ref) {
|
|
21
21
|
var formatMessage = _ref.intl.formatMessage,
|
package/dist/es2019/analytics.js
CHANGED
|
@@ -4,14 +4,12 @@ import { IconTile } from '@atlaskit/icon';
|
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
export const IconWrapper = ({
|
|
6
6
|
Icon,
|
|
7
|
-
LegacyIcon,
|
|
8
7
|
appearance
|
|
9
8
|
}) => {
|
|
10
9
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
11
10
|
alignItems: "center",
|
|
12
11
|
justifyContent: "center"
|
|
13
12
|
}, !fg('platform-visual-refresh-icons') ? /*#__PURE__*/React.createElement(Icon, {
|
|
14
|
-
LEGACY_fallbackIcon: LegacyIcon,
|
|
15
13
|
label: "",
|
|
16
14
|
color: "var(--ds-icon-inverse, #FFFFFF)"
|
|
17
15
|
}) :
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyFlaskIcon from '@atlaskit/legacy-custom-icons/flask-icon';
|
|
3
2
|
import FlaskIcon from '@atlaskit/icon/core/flask';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { P500 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIcoExperiment() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: FlaskIcon,
|
|
9
|
-
LegacyIcon: LegacyFlaskIcon,
|
|
10
8
|
appearance: `var(--ds-icon-discovery, ${P500})`
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyBugIcon from '@atlaskit/legacy-custom-icons/bug-icon';
|
|
3
2
|
import BugIcon from '@atlaskit/icon/core/bug';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { B500 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconFix() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: BugIcon,
|
|
9
|
-
LegacyIcon: LegacyBugIcon,
|
|
10
8
|
appearance: `var(--ds-icon-information, ${B500})`
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyMegaphoneWithStarIcon from '@atlaskit/legacy-custom-icons/megaphone-star-icon';
|
|
3
2
|
import MegaphoneIcon from '@atlaskit/icon/core/megaphone';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { Y200 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconImprovement() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: MegaphoneIcon,
|
|
9
|
-
LegacyIcon: LegacyMegaphoneWithStarIcon,
|
|
10
8
|
appearance: `var(--ds-icon-warning, ${Y200})`
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyMegaphoneIcon from '@atlaskit/legacy-custom-icons/megaphone-icon';
|
|
3
2
|
import MegaphoneIcon from '@atlaskit/icon/core/megaphone';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { N400 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconNew() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: MegaphoneIcon,
|
|
9
|
-
LegacyIcon: LegacyMegaphoneIcon,
|
|
10
8
|
appearance: `var(--ds-icon, ${N400})`
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyDeleteIcon from '@atlaskit/legacy-custom-icons/delete-icon';
|
|
3
2
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { N700 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconRemoved() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: DeleteIcon,
|
|
9
|
-
LegacyIcon: LegacyDeleteIcon,
|
|
10
8
|
appearance: `var(--ds-icon-disabled, ${N700})`
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -10,7 +10,7 @@ import { LoadingErrorMessage, LoadingErrorButtonContainer, LoadingErrorHeading }
|
|
|
10
10
|
const ANALYTICS_CONTEXT_DATA = {
|
|
11
11
|
componentName: 'ArticleLoadingFail',
|
|
12
12
|
packageName: "@atlaskit/help",
|
|
13
|
-
packageVersion: "
|
|
13
|
+
packageVersion: "0.0.0-development"
|
|
14
14
|
};
|
|
15
15
|
export const ArticleLoadingFail = ({
|
|
16
16
|
onTryAgainButtonClick,
|
|
@@ -6,7 +6,7 @@ import { messages } from '../../../../messages';
|
|
|
6
6
|
const ANALYTICS_CONTEXT_DATA = {
|
|
7
7
|
componentName: 'ArticleWasHelpfulNoButton',
|
|
8
8
|
packageName: "@atlaskit/help",
|
|
9
|
-
packageVersion: "
|
|
9
|
+
packageVersion: "0.0.0-development"
|
|
10
10
|
};
|
|
11
11
|
export const ArticleWasHelpfulNoButton = ({
|
|
12
12
|
isSelected = false,
|
|
@@ -6,7 +6,7 @@ import { messages } from '../../../../messages';
|
|
|
6
6
|
const ANALYTICS_CONTEXT_DATA = {
|
|
7
7
|
componentName: 'ArticleWasHelpfulYesButton',
|
|
8
8
|
packageName: "@atlaskit/help",
|
|
9
|
-
packageVersion: "
|
|
9
|
+
packageVersion: "0.0.0-development"
|
|
10
10
|
};
|
|
11
11
|
export const ArticleWasHelpfulYesButton = ({
|
|
12
12
|
isSelected = false,
|
|
@@ -14,7 +14,7 @@ import Form, { Field, CheckboxField, FormFooter } from '@atlaskit/form';
|
|
|
14
14
|
import { RadioGroup } from '@atlaskit/radio';
|
|
15
15
|
import { Checkbox } from '@atlaskit/checkbox';
|
|
16
16
|
import TextArea from '@atlaskit/textarea';
|
|
17
|
-
import CheckCircleIcon from '@atlaskit/icon/core/
|
|
17
|
+
import CheckCircleIcon from '@atlaskit/icon/core/status-success';
|
|
18
18
|
import { colors } from '@atlaskit/theme';
|
|
19
19
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
20
20
|
import { messages } from '../../../../messages';
|
|
@@ -26,7 +26,7 @@ const FEEDBACK_REASON_TEXT_MAX_LENGTH = '16000';
|
|
|
26
26
|
const ANALYTICS_CONTEXT_DATA = {
|
|
27
27
|
componentName: 'ArticleWasHelpfulForm',
|
|
28
28
|
packageName: "@atlaskit/help",
|
|
29
|
-
packageVersion: "
|
|
29
|
+
packageVersion: "0.0.0-development"
|
|
30
30
|
};
|
|
31
31
|
const buttonStyles = null;
|
|
32
32
|
export const ArticleWasHelpfulForm = ({
|
|
@@ -60,7 +60,7 @@ export const HelpArticle = ({
|
|
|
60
60
|
analyticsEvent.payload.attributes = {
|
|
61
61
|
componentName: 'Article',
|
|
62
62
|
packageName: "@atlaskit/help",
|
|
63
|
-
packageVersion: "
|
|
63
|
+
packageVersion: "0.0.0-development"
|
|
64
64
|
};
|
|
65
65
|
if (onRelatedArticlesShowMoreClick) {
|
|
66
66
|
onRelatedArticlesShowMoreClick(event, analyticsEvent, isCollapsed);
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
3
|
import { BODY_FORMAT_TYPES } from '@atlaskit/help-article';
|
|
4
4
|
import HelpArticleContent from '@atlaskit/help-article';
|
|
5
|
-
import ShortcutIcon from '@atlaskit/icon/core/
|
|
5
|
+
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
6
6
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
7
7
|
import Button from '@atlaskit/button';
|
|
8
8
|
import { messages } from '../../../messages';
|
|
@@ -13,7 +13,7 @@ import { WhatsNewTypeTitle, WhatsNewTitleText, WhatsNewIconContainer, RelatedLin
|
|
|
13
13
|
const analyticsContextData = {
|
|
14
14
|
componentName: 'ArticlesListItem',
|
|
15
15
|
packageName: "@atlaskit/help",
|
|
16
|
-
packageVersion: "
|
|
16
|
+
packageVersion: "0.0.0-development"
|
|
17
17
|
};
|
|
18
18
|
export const WhatsNewArticle = ({
|
|
19
19
|
intl: {
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
1
|
+
|
|
2
|
+
._zulpu2gc{gap:var(--ds-space-100,8px)}._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
3
3
|
._1e0c1o8l{display:inline-block}
|
|
4
|
-
.
|
|
5
|
-
._1hmsglyw{text-decoration-line:none}
|
|
6
|
-
._1reo15vq{overflow-x:hidden}
|
|
7
|
-
._4bfu1r31{text-decoration-color:currentColor}
|
|
8
|
-
._ajmmnqa1{text-decoration-style:solid}
|
|
9
|
-
._k48p1pd9{font-weight:var(--ds-font-weight-semibold,600)}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
10
5
|
._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
|
|
11
|
-
._o5724jg8{white-space:normal}
|
|
12
6
|
._otyru2gc{margin-bottom:var(--ds-space-100,8px)}
|
|
13
|
-
._s7n4nkob{vertical-align:middle}
|
|
14
|
-
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
15
|
-
._syaz1rc1{color:var(--ds-text-subtlest,#5e6c84)}
|
|
7
|
+
._s7n4nkob{vertical-align:middle}
|
|
@@ -2,28 +2,24 @@
|
|
|
2
2
|
import "./styled.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import
|
|
6
|
-
import { N300, N800 } from '@atlaskit/theme/colors';
|
|
7
|
-
const {
|
|
8
|
-
body
|
|
9
|
-
} = fontFallback;
|
|
10
|
-
const whatsNewTypeTitleStyles = null;
|
|
5
|
+
import Heading from '@atlaskit/heading';
|
|
11
6
|
export const WhatsNewTypeTitle = ({
|
|
12
7
|
children
|
|
13
|
-
}) => /*#__PURE__*/React.createElement(
|
|
14
|
-
|
|
8
|
+
}) => /*#__PURE__*/React.createElement(Heading, {
|
|
9
|
+
size: "xsmall",
|
|
10
|
+
as: "h3"
|
|
15
11
|
}, children);
|
|
16
12
|
const whatsNewIconContainerStyles = null;
|
|
17
13
|
export const WhatsNewIconContainer = ({
|
|
18
14
|
children
|
|
19
15
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
20
|
-
className: ax(["
|
|
16
|
+
className: ax(["_zulpu2gc _1e0c1txw _n3tdu2gc"])
|
|
21
17
|
}, children);
|
|
22
|
-
const whatsNewTitleText = null;
|
|
23
18
|
export const WhatsNewTitleText = ({
|
|
24
19
|
children
|
|
25
|
-
}) => /*#__PURE__*/React.createElement(
|
|
26
|
-
|
|
20
|
+
}) => /*#__PURE__*/React.createElement(Heading, {
|
|
21
|
+
size: "xsmall",
|
|
22
|
+
as: "h4"
|
|
27
23
|
}, children);
|
|
28
24
|
const relatedLinkContainerStyles = null;
|
|
29
25
|
export const RelatedLinkContainer = ({
|
|
@@ -26,7 +26,8 @@ const articlesList = ({
|
|
|
26
26
|
articles = [],
|
|
27
27
|
minItemsToDisplay = MIN_ITEMS_TO_DISPLAY,
|
|
28
28
|
numberOfArticlesToDisplay = MIN_ITEMS_TO_DISPLAY,
|
|
29
|
-
onArticlesListItemClick
|
|
29
|
+
onArticlesListItemClick,
|
|
30
|
+
firstExpandedArticleRef
|
|
30
31
|
}) => {
|
|
31
32
|
const isExpanded = numberOfArticlesToDisplay > minItemsToDisplay;
|
|
32
33
|
return articles ? /*#__PURE__*/React.createElement(Box, {
|
|
@@ -35,6 +36,8 @@ const articlesList = ({
|
|
|
35
36
|
role: "list"
|
|
36
37
|
}, articles.slice(0, numberOfArticlesToDisplay).map((article, index) => {
|
|
37
38
|
const isVisible = index < minItemsToDisplay || isExpanded;
|
|
39
|
+
// The first expanded article is at index minItemsToDisplay
|
|
40
|
+
const isFirstExpandedArticle = index === minItemsToDisplay;
|
|
38
41
|
return /*#__PURE__*/React.createElement(Box, {
|
|
39
42
|
as: "li",
|
|
40
43
|
xcss: listStyles,
|
|
@@ -55,7 +58,8 @@ const articlesList = ({
|
|
|
55
58
|
href: article.href,
|
|
56
59
|
trustFactors: article.trustFactors,
|
|
57
60
|
source: article.source,
|
|
58
|
-
lastPublished: article.lastPublished
|
|
61
|
+
lastPublished: article.lastPublished,
|
|
62
|
+
ref: isFirstExpandedArticle ? firstExpandedArticleRef : undefined
|
|
59
63
|
}));
|
|
60
64
|
})) : null;
|
|
61
65
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
2
3
|
import * as colors from '@atlaskit/theme/colors';
|
|
3
4
|
import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
4
|
-
import ShortcutIcon from '@atlaskit/icon/core/
|
|
5
|
+
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
5
6
|
import { injectIntl } from 'react-intl-next';
|
|
6
|
-
import LikeIcon from '@atlaskit/icon/core/
|
|
7
|
+
import LikeIcon from '@atlaskit/icon/core/thumbs-up';
|
|
7
8
|
import { ArticlesListItemWrapper, ArticlesListItemContainer, ArticlesListItemTitleText, ArticlesListItemDescription, ArticlesListItemLinkIcon, ArticlesListItemTrustFactor, ArticlesListItemViewCount, ArticlesListItemHelpfulCount, ArticlesListItemSource, ArticlesListItemLastModified, ArticlesListItemTitleSection, ArticlesListItemDescriptionHighlight } from './styled';
|
|
8
9
|
const ANALYTICS_CONTEXT_DATA = {
|
|
9
10
|
componentName: 'ArticlesListItem',
|
|
10
11
|
packageName: "@atlaskit/help",
|
|
11
|
-
packageVersion: "
|
|
12
|
+
packageVersion: "0.0.0-development"
|
|
12
13
|
};
|
|
13
14
|
const highlightText = text => {
|
|
14
15
|
if (!text) {
|
|
@@ -27,7 +28,7 @@ const highlightText = text => {
|
|
|
27
28
|
});
|
|
28
29
|
return sections;
|
|
29
30
|
};
|
|
30
|
-
export const ArticlesListItem = ({
|
|
31
|
+
export const ArticlesListItem = /*#__PURE__*/forwardRef(({
|
|
31
32
|
styles,
|
|
32
33
|
title,
|
|
33
34
|
description,
|
|
@@ -36,7 +37,7 @@ export const ArticlesListItem = ({
|
|
|
36
37
|
trustFactors,
|
|
37
38
|
source,
|
|
38
39
|
lastPublished
|
|
39
|
-
}) => {
|
|
40
|
+
}, ref) => {
|
|
40
41
|
const {
|
|
41
42
|
createAnalyticsEvent
|
|
42
43
|
} = useAnalyticsEvents();
|
|
@@ -58,6 +59,7 @@ export const ArticlesListItem = ({
|
|
|
58
59
|
const isSourceVisible = source != null;
|
|
59
60
|
const isLastPublishedVisible = lastPublished != null && lastPublished !== '';
|
|
60
61
|
return /*#__PURE__*/React.createElement(ArticlesListItemWrapper, {
|
|
62
|
+
ref: ref,
|
|
61
63
|
styles: styles,
|
|
62
64
|
"aria-disabled": "false",
|
|
63
65
|
role: "button",
|
|
@@ -80,11 +82,15 @@ export const ArticlesListItem = ({
|
|
|
80
82
|
label: "Like",
|
|
81
83
|
LEGACY_size: "small"
|
|
82
84
|
}), trustFactors.helpfulCount)));
|
|
83
|
-
};
|
|
84
|
-
const ArticlesListItemWithContext = props => {
|
|
85
|
+
});
|
|
86
|
+
const ArticlesListItemWithContext = /*#__PURE__*/forwardRef((props, ref) => {
|
|
85
87
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
86
88
|
data: ANALYTICS_CONTEXT_DATA
|
|
87
|
-
}, /*#__PURE__*/React.createElement(ArticlesListItem,
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
}, /*#__PURE__*/React.createElement(ArticlesListItem, _extends({
|
|
90
|
+
ref: ref
|
|
91
|
+
}, props)));
|
|
92
|
+
});
|
|
93
|
+
const _default_1 = injectIntl(ArticlesListItemWithContext, {
|
|
94
|
+
forwardRef: true
|
|
95
|
+
});
|
|
90
96
|
export default _default_1;
|
|
@@ -11,15 +11,16 @@ const {
|
|
|
11
11
|
body
|
|
12
12
|
} = fontFallback;
|
|
13
13
|
const articlesListItemWrapperStyles = null;
|
|
14
|
-
export const ArticlesListItemWrapper = ({
|
|
14
|
+
export const ArticlesListItemWrapper = /*#__PURE__*/React.forwardRef(({
|
|
15
15
|
styles,
|
|
16
16
|
children,
|
|
17
17
|
...rest
|
|
18
|
-
}) => /*#__PURE__*/React.createElement("a", _extends({
|
|
18
|
+
}, ref) => /*#__PURE__*/React.createElement("a", _extends({
|
|
19
|
+
ref: ref,
|
|
19
20
|
style: styles
|
|
20
21
|
}, rest, {
|
|
21
22
|
className: ax(["_4bfu1r31 _1hmsglyw _ajmmnqa1 _2rkofajl _kqswh2mm _vchhusvi _ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvu2gc _1e0c1ule _80omtlke _syaz1wmz _bfhkqtfy _7ehi1ssq _1nrm1r31 _1a3b1r31 _9oik1r31 _1ydc1r31 _c2waglyw _4fprglyw _1bnxglyw _1x28glyw _1iohnqa1 _5goinqa1 _jf4cnqa1 _1726nqa1 _1q5t1r31 _nt751r31 _1dit1r31 _9nxe1r31 _1ohyglyw _49pcglyw _ksodglyw _tpgfglyw _1r9x1o36 _1hvw1o36 _4hz81o36 _12gr1o36 _13roglyw _1bg4glyw _1qb1glyw _1dnaglyw _irr314ae _1di61l7b"])
|
|
22
|
-
}), children);
|
|
23
|
+
}), children));
|
|
23
24
|
const articlesListItemContainerStyles = null;
|
|
24
25
|
export const ArticlesListItemContainer = ({
|
|
25
26
|
children
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
2
2
|
import ArticlesList from './ArticlesList';
|
|
3
3
|
import ShowMoreButton from '../ShowMoreButton';
|
|
4
4
|
import { ArticlesListContainer } from './styled';
|
|
@@ -12,6 +12,8 @@ const ArticleList = ({
|
|
|
12
12
|
onToggleArticlesList
|
|
13
13
|
}) => {
|
|
14
14
|
const [showMoreToggled, setShowMoreToggled] = useState(true);
|
|
15
|
+
const firstExpandedArticleRef = useRef(null);
|
|
16
|
+
const isExpandingRef = useRef(false);
|
|
15
17
|
const getMinItemsToDisplay = () => {
|
|
16
18
|
return minItemsToDisplay ? minItemsToDisplay : MIN_ITEMS_TO_DISPLAY;
|
|
17
19
|
};
|
|
@@ -24,7 +26,24 @@ const ArticleList = ({
|
|
|
24
26
|
const getNumberOfArticlesToDisplay = showMoreToggeled => {
|
|
25
27
|
return showMoreToggeled ? getMinItemsToDisplay() : getMaxItemsToDisplay();
|
|
26
28
|
};
|
|
29
|
+
|
|
30
|
+
// Focus on the first newly revealed article after expansion
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (isExpandingRef.current && !showMoreToggled) {
|
|
33
|
+
if (firstExpandedArticleRef.current) {
|
|
34
|
+
firstExpandedArticleRef.current.focus();
|
|
35
|
+
}
|
|
36
|
+
isExpandingRef.current = false;
|
|
37
|
+
}
|
|
38
|
+
}, [showMoreToggled]);
|
|
39
|
+
const setFirstExpandedArticleRef = useCallback(element => {
|
|
40
|
+
firstExpandedArticleRef.current = element;
|
|
41
|
+
}, []);
|
|
27
42
|
const toggleArticlesList = (event, analyticsEvent) => {
|
|
43
|
+
// Track if we're expanding (going from collapsed to expanded)
|
|
44
|
+
if (showMoreToggled) {
|
|
45
|
+
isExpandingRef.current = true;
|
|
46
|
+
}
|
|
28
47
|
setShowMoreToggled(!showMoreToggled);
|
|
29
48
|
if (onToggleArticlesList) {
|
|
30
49
|
onToggleArticlesList(event, analyticsEvent, !showMoreToggled);
|
|
@@ -36,7 +55,9 @@ const ArticleList = ({
|
|
|
36
55
|
style: style,
|
|
37
56
|
onArticlesListItemClick: onArticlesListItemClick,
|
|
38
57
|
articles: articles,
|
|
39
|
-
numberOfArticlesToDisplay: getNumberOfArticlesToDisplay(showMoreToggled)
|
|
58
|
+
numberOfArticlesToDisplay: getNumberOfArticlesToDisplay(showMoreToggled),
|
|
59
|
+
minItemsToDisplay: getMinItemsToDisplay(),
|
|
60
|
+
firstExpandedArticleRef: setFirstExpandedArticleRef
|
|
40
61
|
}), articles.length > getMinItemsToDisplay() && /*#__PURE__*/React.createElement(ShowMoreButton, {
|
|
41
62
|
minItemsToDisplay: getMinItemsToDisplay(),
|
|
42
63
|
maxItemsToDisplay: getMaxItemsToDisplay(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import ShortcutIcon from '@atlaskit/icon/core/
|
|
2
|
+
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
3
3
|
import Tooltip from '@atlaskit/tooltip';
|
|
4
4
|
import { NotificationIndicator } from '@atlaskit/notification-indicator';
|
|
5
5
|
import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
@@ -7,7 +7,7 @@ import { HelpContentButtonContainer, HelpContentButtonIcon, HelpContentButtonTex
|
|
|
7
7
|
const analitycsContextData = {
|
|
8
8
|
componentName: 'HelpContentButton',
|
|
9
9
|
packageName: "@atlaskit/help",
|
|
10
|
-
packageVersion: "
|
|
10
|
+
packageVersion: "0.0.0-development"
|
|
11
11
|
};
|
|
12
12
|
const HelpContentButton = ({
|
|
13
13
|
id = '',
|
|
@@ -48,7 +48,7 @@ const HelpContentButton = ({
|
|
|
48
48
|
}, /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
49
49
|
color: "currentColor",
|
|
50
50
|
LEGACY_size: "small",
|
|
51
|
-
label: ""
|
|
51
|
+
label: "Opens in a new window"
|
|
52
52
|
}))));
|
|
53
53
|
const target = href ? openInSameTab ? '_self' : '_blank' : undefined;
|
|
54
54
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
@@ -16,7 +16,7 @@ import { RelatedArticlesTitle } from './styled';
|
|
|
16
16
|
import useCancellablePromise from '../../util/hooks/cancellablePromise';
|
|
17
17
|
import { usePrevious } from '../../util/hooks/previous';
|
|
18
18
|
const packageName = "@atlaskit/help";
|
|
19
|
-
const packageVersion = "
|
|
19
|
+
const packageVersion = "0.0.0-development";
|
|
20
20
|
const buttonStyles = null;
|
|
21
21
|
export const RelatedArticles = ({
|
|
22
22
|
style = 'primary',
|
|
@@ -7,7 +7,7 @@ import Textfield from '@atlaskit/textfield';
|
|
|
7
7
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
8
8
|
import Spinner from '@atlaskit/spinner';
|
|
9
9
|
import SearchIcon from '@atlaskit/icon/core/migration/search';
|
|
10
|
-
import EditorCloseIcon from '@atlaskit/icon/core/
|
|
10
|
+
import EditorCloseIcon from '@atlaskit/icon/core/cross';
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
12
|
import { REQUEST_STATE } from '../../../model/Requests';
|
|
13
13
|
import { useSearchContext } from '../../contexts/searchContext';
|
|
@@ -18,7 +18,7 @@ import { useNavigationContext } from '../../contexts/navigationContext';
|
|
|
18
18
|
const ANALYTICS_CONTEXT_DATA = {
|
|
19
19
|
componentName: 'searchInput',
|
|
20
20
|
packageName: "@atlaskit/help",
|
|
21
|
-
packageVersion: "
|
|
21
|
+
packageVersion: "0.0.0-development"
|
|
22
22
|
};
|
|
23
23
|
const buttonStyles = null;
|
|
24
24
|
export const SearchInput = ({
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
3
3
|
import * as colors from '@atlaskit/theme/colors';
|
|
4
4
|
import Button from '@atlaskit/button';
|
|
5
|
-
import ShortcutIcon from '@atlaskit/icon/core/
|
|
5
|
+
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
7
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
8
8
|
import { messages } from '../../../messages';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
3
3
|
import * as colors from '@atlaskit/theme/colors';
|
|
4
4
|
import Button from '@atlaskit/button';
|
|
5
|
-
import ShortcutIcon from '@atlaskit/icon/core/
|
|
5
|
+
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
7
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
8
8
|
import NotFoundImage from '../../../assets/NotFoundImage';
|
|
@@ -11,7 +11,7 @@ import { ARTICLE_TYPE } from '../../../model/Help';
|
|
|
11
11
|
const ANALYTICS_CONTEXT_DATA = {
|
|
12
12
|
componentName: 'WhatsNewButton',
|
|
13
13
|
packageName: "@atlaskit/help",
|
|
14
|
-
packageVersion: "
|
|
14
|
+
packageVersion: "0.0.0-development"
|
|
15
15
|
};
|
|
16
16
|
export const WhatsNewButton = ({
|
|
17
17
|
productName,
|
|
@@ -8,7 +8,7 @@ import { WhatsNewResultListItemWrapper, WhatsNewResultListItemTitleContainer, Wh
|
|
|
8
8
|
const ANALYTICS_CONTEXT_DATA = {
|
|
9
9
|
componentName: 'ArticlesListItem',
|
|
10
10
|
packageName: "@atlaskit/help",
|
|
11
|
-
packageVersion: "
|
|
11
|
+
packageVersion: "0.0.0-development"
|
|
12
12
|
};
|
|
13
13
|
export const WhatsNewResultListItem = ({
|
|
14
14
|
intl: {
|
package/dist/esm/analytics.js
CHANGED
|
@@ -4,13 +4,11 @@ import { IconTile } from '@atlaskit/icon';
|
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
export var IconWrapper = function IconWrapper(_ref) {
|
|
6
6
|
var Icon = _ref.Icon,
|
|
7
|
-
LegacyIcon = _ref.LegacyIcon,
|
|
8
7
|
appearance = _ref.appearance;
|
|
9
8
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
10
9
|
alignItems: "center",
|
|
11
10
|
justifyContent: "center"
|
|
12
11
|
}, !fg('platform-visual-refresh-icons') ? /*#__PURE__*/React.createElement(Icon, {
|
|
13
|
-
LEGACY_fallbackIcon: LegacyIcon,
|
|
14
12
|
label: "",
|
|
15
13
|
color: "var(--ds-icon-inverse, #FFFFFF)"
|
|
16
14
|
}) :
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyFlaskIcon from '@atlaskit/legacy-custom-icons/flask-icon';
|
|
3
2
|
import FlaskIcon from '@atlaskit/icon/core/flask';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { P500 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIcoExperiment() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: FlaskIcon,
|
|
9
|
-
LegacyIcon: LegacyFlaskIcon,
|
|
10
8
|
appearance: "var(--ds-icon-discovery, ".concat(P500, ")")
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyBugIcon from '@atlaskit/legacy-custom-icons/bug-icon';
|
|
3
2
|
import BugIcon from '@atlaskit/icon/core/bug';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { B500 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconFix() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: BugIcon,
|
|
9
|
-
LegacyIcon: LegacyBugIcon,
|
|
10
8
|
appearance: "var(--ds-icon-information, ".concat(B500, ")")
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyMegaphoneWithStarIcon from '@atlaskit/legacy-custom-icons/megaphone-star-icon';
|
|
3
2
|
import MegaphoneIcon from '@atlaskit/icon/core/megaphone';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { Y200 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconImprovement() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: MegaphoneIcon,
|
|
9
|
-
LegacyIcon: LegacyMegaphoneWithStarIcon,
|
|
10
8
|
appearance: "var(--ds-icon-warning, ".concat(Y200, ")")
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyMegaphoneIcon from '@atlaskit/legacy-custom-icons/megaphone-icon';
|
|
3
2
|
import MegaphoneIcon from '@atlaskit/icon/core/megaphone';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { N400 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconNew() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: MegaphoneIcon,
|
|
9
|
-
LegacyIcon: LegacyMegaphoneIcon,
|
|
10
8
|
appearance: "var(--ds-icon, ".concat(N400, ")")
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyDeleteIcon from '@atlaskit/legacy-custom-icons/delete-icon';
|
|
3
2
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { N700 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconRemoved() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: DeleteIcon,
|
|
9
|
-
LegacyIcon: LegacyDeleteIcon,
|
|
10
8
|
appearance: "var(--ds-icon-disabled, ".concat(N700, ")")
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -10,7 +10,7 @@ import { LoadingErrorMessage, LoadingErrorButtonContainer, LoadingErrorHeading }
|
|
|
10
10
|
var ANALYTICS_CONTEXT_DATA = {
|
|
11
11
|
componentName: 'ArticleLoadingFail',
|
|
12
12
|
packageName: "@atlaskit/help",
|
|
13
|
-
packageVersion: "
|
|
13
|
+
packageVersion: "0.0.0-development"
|
|
14
14
|
};
|
|
15
15
|
export var ArticleLoadingFail = function ArticleLoadingFail(_ref) {
|
|
16
16
|
var onTryAgainButtonClick = _ref.onTryAgainButtonClick,
|
|
@@ -6,7 +6,7 @@ import { messages } from '../../../../messages';
|
|
|
6
6
|
var ANALYTICS_CONTEXT_DATA = {
|
|
7
7
|
componentName: 'ArticleWasHelpfulNoButton',
|
|
8
8
|
packageName: "@atlaskit/help",
|
|
9
|
-
packageVersion: "
|
|
9
|
+
packageVersion: "0.0.0-development"
|
|
10
10
|
};
|
|
11
11
|
export var ArticleWasHelpfulNoButton = function ArticleWasHelpfulNoButton(_ref) {
|
|
12
12
|
var _ref$isSelected = _ref.isSelected,
|