@atlaskit/help 7.2.20 → 7.2.22
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 +12 -0
- package/dist/cjs/analytics.js +3 -3
- 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 +4 -3
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/styled.js +2 -2
- package/dist/cjs/components/Article/HelpArticle/index.js +3 -3
- package/dist/cjs/components/Article/WhatsNewArticle/index.js +3 -3
- package/dist/cjs/components/Article/WhatsNewArticle/styled.js +2 -2
- package/dist/cjs/components/Article/index.js +4 -4
- package/dist/cjs/components/ArticlesList/ArticlesListItem/index.js +3 -3
- package/dist/cjs/components/ArticlesList/ArticlesListItem/styled.js +48 -23
- package/dist/cjs/components/ArticlesList/index.js +2 -2
- package/dist/cjs/components/Help.js +1 -1
- package/dist/cjs/components/HelpContent.js +2 -2
- package/dist/cjs/components/HelpContentButton/index.js +3 -3
- package/dist/cjs/components/HelpContentButton/styled.js +2 -2
- package/dist/cjs/components/RelatedArticles/index.js +3 -3
- package/dist/cjs/components/RelatedArticles/styled.js +2 -2
- 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/Search/SearchResults/index.js +2 -2
- package/dist/cjs/components/Search/SearchResults/styled.js +2 -2
- package/dist/cjs/components/WhatsNew/WhatsNewButton/index.js +3 -3
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.js +2 -2
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.js +2 -2
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +1 -1
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +2 -2
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +2 -2
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/index.js +2 -2
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +2 -2
- package/dist/cjs/components/WhatsNew/WhatsNewResults/index.js +2 -2
- package/dist/cjs/components/contexts/navigationContext.js +2 -2
- package/dist/cjs/components/contexts/searchContext.js +2 -2
- package/dist/cjs/components/contexts/whatsNewArticleContext.js +2 -2
- package/dist/cjs/util/styled.js +2 -2
- package/dist/es2019/analytics.js +1 -1
- 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 +1 -1
- package/dist/es2019/components/Article/HelpArticle/index.js +1 -1
- package/dist/es2019/components/Article/WhatsNewArticle/index.js +1 -1
- package/dist/es2019/components/Article/index.js +2 -2
- package/dist/es2019/components/ArticlesList/ArticlesListItem/index.js +1 -1
- package/dist/es2019/components/ArticlesList/ArticlesListItem/styled.js +46 -48
- package/dist/es2019/components/HelpContentButton/index.js +1 -1
- package/dist/es2019/components/RelatedArticles/index.js +1 -1
- package/dist/es2019/components/Search/SearchInput/index.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/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 +1 -1
- package/dist/esm/components/Article/HelpArticle/index.js +1 -1
- package/dist/esm/components/Article/WhatsNewArticle/index.js +1 -1
- package/dist/esm/components/Article/index.js +2 -2
- package/dist/esm/components/ArticlesList/ArticlesListItem/index.js +1 -1
- package/dist/esm/components/ArticlesList/ArticlesListItem/styled.js +45 -21
- package/dist/esm/components/Help.js +1 -1
- package/dist/esm/components/HelpContentButton/index.js +1 -1
- package/dist/esm/components/RelatedArticles/index.js +1 -1
- package/dist/esm/components/Search/SearchInput/index.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/components/Article/index.d.ts +2 -2
- package/dist/types/components/Search/SearchResults/index.d.ts +2 -2
- package/dist/types/components/contexts/headerContext.d.ts +2 -2
- package/dist/types/components/contexts/helpArticleContext.d.ts +2 -2
- package/dist/types/components/contexts/homeContext.d.ts +2 -2
- package/dist/types/components/contexts/navigationContext.d.ts +4 -4
- package/dist/types/components/contexts/relatedArticlesContext.d.ts +2 -2
- package/dist/types/components/contexts/searchContext.d.ts +2 -2
- package/dist/types/components/contexts/whatsNewArticleContext.d.ts +2 -2
- package/dist/types-ts4.5/components/Article/index.d.ts +2 -2
- package/dist/types-ts4.5/components/Search/SearchResults/index.d.ts +2 -2
- package/dist/types-ts4.5/components/contexts/headerContext.d.ts +2 -2
- package/dist/types-ts4.5/components/contexts/helpArticleContext.d.ts +2 -2
- package/dist/types-ts4.5/components/contexts/homeContext.d.ts +2 -2
- package/dist/types-ts4.5/components/contexts/navigationContext.d.ts +4 -4
- package/dist/types-ts4.5/components/contexts/relatedArticlesContext.d.ts +2 -2
- package/dist/types-ts4.5/components/contexts/searchContext.d.ts +2 -2
- package/dist/types-ts4.5/components/contexts/whatsNewArticleContext.d.ts +2 -2
- package/docs/0-intro.tsx +3 -18
- package/package.json +12 -12
|
@@ -11,7 +11,7 @@ import { ArticleContainer } from './styled';
|
|
|
11
11
|
import ArticleContent from './ArticleContent';
|
|
12
12
|
// Animation
|
|
13
13
|
var defaultStyle = {
|
|
14
|
-
left:
|
|
14
|
+
left: '100%'
|
|
15
15
|
};
|
|
16
16
|
var enableTransition = {
|
|
17
17
|
enabled: {
|
|
@@ -23,7 +23,7 @@ var transitionStyles = {
|
|
|
23
23
|
left: 0
|
|
24
24
|
},
|
|
25
25
|
exited: {
|
|
26
|
-
left:
|
|
26
|
+
left: '100%'
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
export var Article = function Article() {
|
|
@@ -7,7 +7,7 @@ import { ArticlesListItemWrapper, ArticlesListItemContainer, ArticlesListItemTit
|
|
|
7
7
|
var ANALYTICS_CONTEXT_DATA = {
|
|
8
8
|
componentName: 'ArticlesListItem',
|
|
9
9
|
packageName: "@atlaskit/help",
|
|
10
|
-
packageVersion: "7.2.
|
|
10
|
+
packageVersion: "7.2.22"
|
|
11
11
|
};
|
|
12
12
|
export var ArticlesListItem = function ArticlesListItem(_ref) {
|
|
13
13
|
var styles = _ref.styles,
|
|
@@ -1,40 +1,64 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import styled from '@emotion/styled';
|
|
5
3
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
6
4
|
import * as colors from '@atlaskit/theme/colors';
|
|
7
5
|
export var ArticlesListItemWrapper = styled.a({
|
|
8
|
-
position:
|
|
9
|
-
boxSizing:
|
|
6
|
+
position: 'relative',
|
|
7
|
+
boxSizing: 'border-box',
|
|
10
8
|
padding: "var(--ds-space-100, 8px)",
|
|
11
|
-
display:
|
|
12
|
-
textDecoration:
|
|
13
|
-
cursor:
|
|
14
|
-
color: "
|
|
15
|
-
borderRadius:
|
|
9
|
+
display: 'block',
|
|
10
|
+
textDecoration: 'none',
|
|
11
|
+
cursor: 'pointer',
|
|
12
|
+
color: "var(--ds-text-subtlest, ".concat(colors.N200, ")"),
|
|
13
|
+
borderRadius: '3px',
|
|
16
14
|
backgroundColor: "var(--ds-background-neutral-subtle, transparent)",
|
|
17
15
|
'&:hover, &:focus, &:visited, &:active': {
|
|
18
|
-
textDecoration:
|
|
19
|
-
outline:
|
|
20
|
-
outlineOffset:
|
|
16
|
+
textDecoration: 'none',
|
|
17
|
+
outline: 'none',
|
|
18
|
+
outlineOffset: 'none'
|
|
21
19
|
},
|
|
22
20
|
'&:focus': {
|
|
23
21
|
boxShadow: "".concat("var(--ds-border-focused, ".concat(colors.B100, ")"), " 0px 0px 0px 2px inset")
|
|
24
22
|
},
|
|
25
23
|
'&:hover': {
|
|
26
|
-
backgroundColor: "
|
|
24
|
+
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30, ")")
|
|
27
25
|
},
|
|
28
26
|
'&:active': {
|
|
29
|
-
backgroundColor: "
|
|
27
|
+
backgroundColor: "var(--ds-background-neutral-subtle-pressed, ".concat(colors.B50, ")")
|
|
30
28
|
}
|
|
31
29
|
}, function (props) {
|
|
32
30
|
return props.styles;
|
|
33
31
|
});
|
|
34
|
-
export var ArticlesListItemContainer = styled.div(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
export var
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
export var ArticlesListItemContainer = styled.div({
|
|
33
|
+
width: '100%',
|
|
34
|
+
whiteSpace: 'nowrap'
|
|
35
|
+
});
|
|
36
|
+
export var ArticlesListItemTypeTitle = styled.div({
|
|
37
|
+
fontWeight: 'bold',
|
|
38
|
+
fontSize: '11px',
|
|
39
|
+
lineHeight: "var(--ds-font-lineHeight-100, 16px)",
|
|
40
|
+
color: "var(--ds-text-subtlest, ".concat(colors.N200, ")"),
|
|
41
|
+
paddingBottom: "var(--ds-space-050, 4px)"
|
|
42
|
+
});
|
|
43
|
+
export var ArticlesListItemLinkIcon = styled.span({
|
|
44
|
+
alignSelf: 'auto',
|
|
45
|
+
paddingInlineStart: "var(--ds-space-050, 4px)",
|
|
46
|
+
verticalAlign: 'middle'
|
|
47
|
+
});
|
|
48
|
+
export var ArticlesListItemTitleText = styled.span({
|
|
49
|
+
textDecoration: 'none',
|
|
50
|
+
color: "var(--ds-text, ".concat(colors.N800, ")"),
|
|
51
|
+
fontSize: "".concat(fontSize(), "px"),
|
|
52
|
+
fontWeight: 600,
|
|
53
|
+
display: 'inline-block',
|
|
54
|
+
lineHeight: "var(--ds-font-lineHeight-200, 20px)",
|
|
55
|
+
whiteSpace: 'normal',
|
|
56
|
+
overflowX: 'hidden',
|
|
57
|
+
marginBottom: "var(--ds-space-100, 8px)"
|
|
58
|
+
});
|
|
59
|
+
export var ArticlesListItemDescription = styled.p({
|
|
60
|
+
display: 'block',
|
|
61
|
+
lineHeight: "var(--ds-font-lineHeight-200, 20px)",
|
|
62
|
+
color: "var(--ds-text-subtle, ".concat(colors.N400, ")"),
|
|
63
|
+
margin: 0
|
|
64
|
+
});
|
|
@@ -7,7 +7,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
var _excluded = ["children", "footer"];
|
|
9
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
-
function _isNativeReflectConstruct() {
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { withAnalyticsEvents, withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
13
13
|
import { IntlProvider } from 'react-intl-next';
|
|
@@ -7,7 +7,7 @@ import { HelpContentButtonContainer, HelpContentButtonIcon, HelpContentButtonTex
|
|
|
7
7
|
var analitycsContextData = {
|
|
8
8
|
componentName: 'HelpContentButton',
|
|
9
9
|
packageName: "@atlaskit/help",
|
|
10
|
-
packageVersion: "7.2.
|
|
10
|
+
packageVersion: "7.2.22"
|
|
11
11
|
};
|
|
12
12
|
var HelpContentButton = function HelpContentButton(_ref) {
|
|
13
13
|
var _ref$id = _ref.id,
|
|
@@ -18,7 +18,7 @@ import useCancellablePromise from '../../util/hooks/cancellablePromise';
|
|
|
18
18
|
import { usePrevious } from '../../util/hooks/previous';
|
|
19
19
|
import { jsx } from '@emotion/react';
|
|
20
20
|
var packageName = "@atlaskit/help";
|
|
21
|
-
var packageVersion = "7.2.
|
|
21
|
+
var packageVersion = "7.2.22";
|
|
22
22
|
export var RelatedArticles = function RelatedArticles(_ref) {
|
|
23
23
|
var _ref$style = _ref.style,
|
|
24
24
|
style = _ref$style === void 0 ? 'primary' : _ref$style,
|
|
@@ -17,7 +17,7 @@ import { SearchInputContainer, SearchIconContainer, CloseButtonAndSpinnerContain
|
|
|
17
17
|
var ANALYTICS_CONTEXT_DATA = {
|
|
18
18
|
componentName: 'searchInput',
|
|
19
19
|
packageName: "@atlaskit/help",
|
|
20
|
-
packageVersion: "7.2.
|
|
20
|
+
packageVersion: "7.2.22"
|
|
21
21
|
};
|
|
22
22
|
export var SearchInput = function SearchInput(_ref) {
|
|
23
23
|
var formatMessage = _ref.intl.formatMessage;
|
|
@@ -11,7 +11,7 @@ import { ARTICLE_TYPE } from '../../../model/Help';
|
|
|
11
11
|
var ANALYTICS_CONTEXT_DATA = {
|
|
12
12
|
componentName: 'WhatsNewButton',
|
|
13
13
|
packageName: "@atlaskit/help",
|
|
14
|
-
packageVersion: "7.2.
|
|
14
|
+
packageVersion: "7.2.22"
|
|
15
15
|
};
|
|
16
16
|
export var WhatsNewButton = function WhatsNewButton(_ref) {
|
|
17
17
|
var productName = _ref.productName,
|
package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { WhatsNewResultListItemWrapper, WhatsNewResultListItemTitleContainer, Wh
|
|
|
8
8
|
var ANALYTICS_CONTEXT_DATA = {
|
|
9
9
|
componentName: 'ArticlesListItem',
|
|
10
10
|
packageName: "@atlaskit/help",
|
|
11
|
-
packageVersion: "7.2.
|
|
11
|
+
packageVersion: "7.2.22"
|
|
12
12
|
};
|
|
13
13
|
export var WhatsNewResultListItem = function WhatsNewResultListItem(_ref) {
|
|
14
14
|
var formatMessage = _ref.intl.formatMessage,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Article:
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Article: () => JSX.Element;
|
|
3
3
|
export default Article;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const SearchResults:
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const SearchResults: () => JSX.Element;
|
|
3
3
|
export default SearchResults;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
interface HeaderSharedInterface {
|
|
4
4
|
onCloseButtonClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
|
|
5
5
|
onBackButtonClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
|
|
6
6
|
}
|
|
7
7
|
export declare const useHeaderContext: () => HeaderSharedInterface, CtxProvider: React.Provider<HeaderSharedInterface | undefined>;
|
|
8
|
-
export declare const HeaderContextProvider:
|
|
8
|
+
export declare const HeaderContextProvider: ({ onCloseButtonClick, onBackButtonClick, children, }: PropsWithChildren<HeaderSharedInterface>) => JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { Article, ArticleItem, ArticleFeedback } from '../../model/Article';
|
|
4
4
|
import { articleId } from '../../model/Help';
|
|
@@ -10,4 +10,4 @@ export interface HelpArticleContextInterface {
|
|
|
10
10
|
onWasHelpfulSubmit?(analyticsEvent: UIAnalyticsEvent, articleFeedback: ArticleFeedback, articleData: ArticleItem): Promise<boolean>;
|
|
11
11
|
}
|
|
12
12
|
export declare const useHelpArticleContext: () => HelpArticleContextInterface, CtxProvider: React.Provider<HelpArticleContextInterface | undefined>;
|
|
13
|
-
export declare const HelpArticleContextProvider:
|
|
13
|
+
export declare const HelpArticleContextProvider: ({ onGetHelpArticle, onHelpArticleLoadingFailTryAgainButtonClick, onWasHelpfulYesButtonClick, onWasHelpfulNoButtonClick, onWasHelpfulSubmit, children, }: PropsWithChildren<HelpArticleContextInterface>) => JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import type { Props as HelpContentButtonProps } from '../HelpContentButton';
|
|
3
3
|
export interface HomeContextInterface {
|
|
4
4
|
homeOptions?: HelpContentButtonProps[];
|
|
5
5
|
homeContent?: React.ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export declare const useHomeContext: () => HomeContextInterface, CtxProvider: React.Provider<HomeContextInterface | undefined>;
|
|
8
|
-
export declare const HomeContextProvider:
|
|
8
|
+
export declare const HomeContextProvider: ({ homeOptions, homeContent, children, }: PropsWithChildren<HomeContextInterface>) => JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { Article, ArticleItem } from '../../model/Article';
|
|
4
4
|
import { WhatsNewArticleItem, WhatsNewArticle } from '../../model/WhatsNew';
|
|
5
5
|
import { HistoryItem, articleId } from '../../model/Help';
|
|
6
6
|
import { VIEW } from '../constants';
|
|
7
7
|
type ViewType = keyof typeof VIEW;
|
|
8
|
-
|
|
8
|
+
type NavigationProviderInterface = PropsWithChildren<{
|
|
9
9
|
navigationData?: {
|
|
10
10
|
articleId: articleId;
|
|
11
11
|
history: HistoryItem[];
|
|
@@ -14,7 +14,7 @@ interface NavigationProviderInterface {
|
|
|
14
14
|
articleId: articleId;
|
|
15
15
|
history: HistoryItem[];
|
|
16
16
|
}): void;
|
|
17
|
-
}
|
|
17
|
+
}>;
|
|
18
18
|
interface NavigationContextInterface {
|
|
19
19
|
articleId?: articleId;
|
|
20
20
|
history?: HistoryItem[];
|
|
@@ -32,5 +32,5 @@ interface NavigationContextInterface {
|
|
|
32
32
|
onClose?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
|
|
33
33
|
}
|
|
34
34
|
export declare const useNavigationContext: () => NavigationContextInterface, CtxProvider: React.Provider<NavigationContextInterface | undefined>;
|
|
35
|
-
export declare const NavigationContextProvider:
|
|
35
|
+
export declare const NavigationContextProvider: ({ navigationData, setNavigationData, children, }: NavigationProviderInterface) => JSX.Element;
|
|
36
36
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { ArticleItem } from '../../model/Article';
|
|
4
4
|
export interface RelatedArticlesContextInterface {
|
|
@@ -9,4 +9,4 @@ export interface RelatedArticlesContextInterface {
|
|
|
9
9
|
onRelatedArticlesListItemClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, articleData: ArticleItem) => void;
|
|
10
10
|
}
|
|
11
11
|
export declare const useRelatedArticlesContext: () => RelatedArticlesContextInterface, CtxProvider: React.Provider<RelatedArticlesContextInterface | undefined>;
|
|
12
|
-
export declare const RelatedArticlesContextProvider:
|
|
12
|
+
export declare const RelatedArticlesContextProvider: ({ routeGroup, routeName, onGetRelatedArticles, onRelatedArticlesShowMoreClick, onRelatedArticlesListItemClick, children, }: PropsWithChildren<RelatedArticlesContextInterface>) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { ArticleItem } from '../../model/Article';
|
|
4
4
|
import { REQUEST_STATE } from '../../model/Requests';
|
|
@@ -21,5 +21,5 @@ export interface SearchProviderInterface extends SearchSharedInterface {
|
|
|
21
21
|
onSearchResultItemClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, articleData: ArticleItem): void;
|
|
22
22
|
}
|
|
23
23
|
export declare const useSearchContext: () => SearchContextInterface, CtxProvider: React.Provider<SearchContextInterface | undefined>;
|
|
24
|
-
export declare const SearchContextProvider:
|
|
24
|
+
export declare const SearchContextProvider: ({ onSearch, onSearchInputChanged, onSearchInputCleared, onSearchResultItemClick, onSearchExternalUrlClick, searchExternalUrl, children, }: PropsWithChildren<SearchProviderInterface>) => JSX.Element;
|
|
25
25
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { NotificationLogProvider } from '@atlaskit/notification-log-client';
|
|
4
4
|
import { WhatsNewArticleItem, WhatsNewArticle, whatsNewSearchResult } from '../../model/WhatsNew';
|
|
@@ -22,5 +22,5 @@ interface WhatsNewArticleProviderInterface extends WhatsNewArticleSharedInterfac
|
|
|
22
22
|
onSearchWhatsNewArticles?(filter?: WHATS_NEW_ITEM_TYPES | '', numberOfItems?: number, page?: string): Promise<whatsNewSearchResult>;
|
|
23
23
|
}
|
|
24
24
|
export declare const useWhatsNewArticleContext: () => WhatsNewArticleContextInterface, CtxProvider: React.Provider<WhatsNewArticleContextInterface | undefined>;
|
|
25
|
-
export declare const WhatsNewArticleProvider:
|
|
25
|
+
export declare const WhatsNewArticleProvider: ({ whatsNewGetNotificationProvider, onWhatsNewButtonClick, onSearchWhatsNewArticles, onSearchWhatsNewArticlesShowMoreClick, onWhatsNewResultItemClick, onGetWhatsNewArticle, productName, children, }: PropsWithChildren<WhatsNewArticleProviderInterface>) => JSX.Element;
|
|
26
26
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Article:
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Article: () => JSX.Element;
|
|
3
3
|
export default Article;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const SearchResults:
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const SearchResults: () => JSX.Element;
|
|
3
3
|
export default SearchResults;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
interface HeaderSharedInterface {
|
|
4
4
|
onCloseButtonClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
|
|
5
5
|
onBackButtonClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
|
|
6
6
|
}
|
|
7
7
|
export declare const useHeaderContext: () => HeaderSharedInterface, CtxProvider: React.Provider<HeaderSharedInterface | undefined>;
|
|
8
|
-
export declare const HeaderContextProvider:
|
|
8
|
+
export declare const HeaderContextProvider: ({ onCloseButtonClick, onBackButtonClick, children, }: PropsWithChildren<HeaderSharedInterface>) => JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { Article, ArticleItem, ArticleFeedback } from '../../model/Article';
|
|
4
4
|
import { articleId } from '../../model/Help';
|
|
@@ -10,4 +10,4 @@ export interface HelpArticleContextInterface {
|
|
|
10
10
|
onWasHelpfulSubmit?(analyticsEvent: UIAnalyticsEvent, articleFeedback: ArticleFeedback, articleData: ArticleItem): Promise<boolean>;
|
|
11
11
|
}
|
|
12
12
|
export declare const useHelpArticleContext: () => HelpArticleContextInterface, CtxProvider: React.Provider<HelpArticleContextInterface | undefined>;
|
|
13
|
-
export declare const HelpArticleContextProvider:
|
|
13
|
+
export declare const HelpArticleContextProvider: ({ onGetHelpArticle, onHelpArticleLoadingFailTryAgainButtonClick, onWasHelpfulYesButtonClick, onWasHelpfulNoButtonClick, onWasHelpfulSubmit, children, }: PropsWithChildren<HelpArticleContextInterface>) => JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import type { Props as HelpContentButtonProps } from '../HelpContentButton';
|
|
3
3
|
export interface HomeContextInterface {
|
|
4
4
|
homeOptions?: HelpContentButtonProps[];
|
|
5
5
|
homeContent?: React.ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export declare const useHomeContext: () => HomeContextInterface, CtxProvider: React.Provider<HomeContextInterface | undefined>;
|
|
8
|
-
export declare const HomeContextProvider:
|
|
8
|
+
export declare const HomeContextProvider: ({ homeOptions, homeContent, children, }: PropsWithChildren<HomeContextInterface>) => JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { Article, ArticleItem } from '../../model/Article';
|
|
4
4
|
import { WhatsNewArticleItem, WhatsNewArticle } from '../../model/WhatsNew';
|
|
5
5
|
import { HistoryItem, articleId } from '../../model/Help';
|
|
6
6
|
import { VIEW } from '../constants';
|
|
7
7
|
type ViewType = keyof typeof VIEW;
|
|
8
|
-
|
|
8
|
+
type NavigationProviderInterface = PropsWithChildren<{
|
|
9
9
|
navigationData?: {
|
|
10
10
|
articleId: articleId;
|
|
11
11
|
history: HistoryItem[];
|
|
@@ -14,7 +14,7 @@ interface NavigationProviderInterface {
|
|
|
14
14
|
articleId: articleId;
|
|
15
15
|
history: HistoryItem[];
|
|
16
16
|
}): void;
|
|
17
|
-
}
|
|
17
|
+
}>;
|
|
18
18
|
interface NavigationContextInterface {
|
|
19
19
|
articleId?: articleId;
|
|
20
20
|
history?: HistoryItem[];
|
|
@@ -32,5 +32,5 @@ interface NavigationContextInterface {
|
|
|
32
32
|
onClose?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
|
|
33
33
|
}
|
|
34
34
|
export declare const useNavigationContext: () => NavigationContextInterface, CtxProvider: React.Provider<NavigationContextInterface | undefined>;
|
|
35
|
-
export declare const NavigationContextProvider:
|
|
35
|
+
export declare const NavigationContextProvider: ({ navigationData, setNavigationData, children, }: NavigationProviderInterface) => JSX.Element;
|
|
36
36
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { ArticleItem } from '../../model/Article';
|
|
4
4
|
export interface RelatedArticlesContextInterface {
|
|
@@ -9,4 +9,4 @@ export interface RelatedArticlesContextInterface {
|
|
|
9
9
|
onRelatedArticlesListItemClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, articleData: ArticleItem) => void;
|
|
10
10
|
}
|
|
11
11
|
export declare const useRelatedArticlesContext: () => RelatedArticlesContextInterface, CtxProvider: React.Provider<RelatedArticlesContextInterface | undefined>;
|
|
12
|
-
export declare const RelatedArticlesContextProvider:
|
|
12
|
+
export declare const RelatedArticlesContextProvider: ({ routeGroup, routeName, onGetRelatedArticles, onRelatedArticlesShowMoreClick, onRelatedArticlesListItemClick, children, }: PropsWithChildren<RelatedArticlesContextInterface>) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { ArticleItem } from '../../model/Article';
|
|
4
4
|
import { REQUEST_STATE } from '../../model/Requests';
|
|
@@ -21,5 +21,5 @@ export interface SearchProviderInterface extends SearchSharedInterface {
|
|
|
21
21
|
onSearchResultItemClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, articleData: ArticleItem): void;
|
|
22
22
|
}
|
|
23
23
|
export declare const useSearchContext: () => SearchContextInterface, CtxProvider: React.Provider<SearchContextInterface | undefined>;
|
|
24
|
-
export declare const SearchContextProvider:
|
|
24
|
+
export declare const SearchContextProvider: ({ onSearch, onSearchInputChanged, onSearchInputCleared, onSearchResultItemClick, onSearchExternalUrlClick, searchExternalUrl, children, }: PropsWithChildren<SearchProviderInterface>) => JSX.Element;
|
|
25
25
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { NotificationLogProvider } from '@atlaskit/notification-log-client';
|
|
4
4
|
import { WhatsNewArticleItem, WhatsNewArticle, whatsNewSearchResult } from '../../model/WhatsNew';
|
|
@@ -22,5 +22,5 @@ interface WhatsNewArticleProviderInterface extends WhatsNewArticleSharedInterfac
|
|
|
22
22
|
onSearchWhatsNewArticles?(filter?: WHATS_NEW_ITEM_TYPES | '', numberOfItems?: number, page?: string): Promise<whatsNewSearchResult>;
|
|
23
23
|
}
|
|
24
24
|
export declare const useWhatsNewArticleContext: () => WhatsNewArticleContextInterface, CtxProvider: React.Provider<WhatsNewArticleContextInterface | undefined>;
|
|
25
|
-
export declare const WhatsNewArticleProvider:
|
|
25
|
+
export declare const WhatsNewArticleProvider: ({ whatsNewGetNotificationProvider, onWhatsNewButtonClick, onSearchWhatsNewArticles, onSearchWhatsNewArticlesShowMoreClick, onWhatsNewResultItemClick, onGetWhatsNewArticle, productName, children, }: PropsWithChildren<WhatsNewArticleProviderInterface>) => JSX.Element;
|
|
26
26
|
export {};
|
package/docs/0-intro.tsx
CHANGED
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
md,
|
|
4
|
-
code,
|
|
5
|
-
Props,
|
|
6
|
-
AtlassianInternalWarning,
|
|
7
|
-
DevPreviewWarning,
|
|
8
|
-
} from '@atlaskit/docs';
|
|
2
|
+
import { md, code, Props, AtlassianInternalWarning } from '@atlaskit/docs';
|
|
9
3
|
|
|
10
4
|
const helpProps = require('!!extract-react-types-loader!../src/components/Help');
|
|
11
5
|
|
|
12
6
|
export default md`
|
|
13
|
-
${(
|
|
14
|
-
<>
|
|
15
|
-
<div style={{ marginBottom: '0.5rem' }}>
|
|
16
|
-
<AtlassianInternalWarning />
|
|
17
|
-
</div>
|
|
18
|
-
<div style={{ marginTop: '0.5rem' }}>
|
|
19
|
-
<DevPreviewWarning />
|
|
20
|
-
</div>
|
|
21
|
-
</>
|
|
22
|
-
)}
|
|
7
|
+
${(<AtlassianInternalWarning />)}
|
|
23
8
|
|
|
24
9
|
## Usage
|
|
25
10
|
|
|
@@ -41,7 +26,7 @@ import {
|
|
|
41
26
|
var client = algoliasearch('8K6J5OJIQW', 'c982b4b1a6ca921131d35edb63359b8c');
|
|
42
27
|
var index = client.initIndex('product_help_prod');
|
|
43
28
|
|
|
44
|
-
const Example
|
|
29
|
+
const Example = () => {
|
|
45
30
|
const onGetArticle = async (articleId: string): Promise<any> => {
|
|
46
31
|
return new Promise((resolve, reject) => {
|
|
47
32
|
index.search(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/help",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.22",
|
|
4
4
|
"description": "A cross-product help component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,22 +42,22 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
45
|
-
"@atlaskit/button": "^17.
|
|
46
|
-
"@atlaskit/checkbox": "^13.
|
|
45
|
+
"@atlaskit/button": "^17.7.0",
|
|
46
|
+
"@atlaskit/checkbox": "^13.1.0",
|
|
47
47
|
"@atlaskit/form": "^9.0.3",
|
|
48
|
-
"@atlaskit/help-article": "^4.1.
|
|
49
|
-
"@atlaskit/help-layout": "^4.2.
|
|
50
|
-
"@atlaskit/icon": "^22.
|
|
51
|
-
"@atlaskit/notification-indicator": "^9.
|
|
48
|
+
"@atlaskit/help-article": "^4.1.10",
|
|
49
|
+
"@atlaskit/help-layout": "^4.2.15",
|
|
50
|
+
"@atlaskit/icon": "^22.1.0",
|
|
51
|
+
"@atlaskit/notification-indicator": "^9.2.0",
|
|
52
52
|
"@atlaskit/notification-log-client": "^6.1.0",
|
|
53
|
-
"@atlaskit/radio": "^6.
|
|
53
|
+
"@atlaskit/radio": "^6.1.0",
|
|
54
54
|
"@atlaskit/section-message": "^6.4.0",
|
|
55
|
-
"@atlaskit/select": "^17.0
|
|
55
|
+
"@atlaskit/select": "^17.3.0",
|
|
56
56
|
"@atlaskit/spinner": "^16.0.0",
|
|
57
|
-
"@atlaskit/textarea": "^5.
|
|
58
|
-
"@atlaskit/textfield": "^6.
|
|
57
|
+
"@atlaskit/textarea": "^5.1.0",
|
|
58
|
+
"@atlaskit/textfield": "^6.1.0",
|
|
59
59
|
"@atlaskit/theme": "^12.6.0",
|
|
60
|
-
"@atlaskit/tokens": "^1.
|
|
60
|
+
"@atlaskit/tokens": "^1.41.0",
|
|
61
61
|
"@atlaskit/tooltip": "^18.1.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
63
63
|
"@emotion/react": "^11.7.1",
|