@atlaskit/help 7.1.13 → 7.1.15
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/analytics/package.json +8 -1
- package/dist/cjs/components/contexts/navigationContext.js +8 -3
- package/dist/cjs/model/Requests.js +1 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/contexts/navigationContext.js +8 -3
- package/dist/es2019/model/Requests.js +1 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/contexts/navigationContext.js +8 -3
- package/dist/esm/model/Requests.js +1 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/model/Requests.d.ts +1 -0
- package/dist/types-ts4.0/analytics.d.ts +10 -0
- package/dist/types-ts4.0/assets/ErrorImage.d.ts +3 -0
- package/dist/types-ts4.0/assets/NotFoundImage.d.ts +3 -0
- package/dist/types-ts4.0/assets/SomethingWrongImage.d.ts +3 -0
- package/dist/types-ts4.0/assets/WhatsNewIcoExperiment.d.ts +2 -0
- package/dist/types-ts4.0/assets/WhatsNewIcoExperiment.svg +5 -0
- package/dist/types-ts4.0/assets/WhatsNewIconFix.d.ts +2 -0
- package/dist/types-ts4.0/assets/WhatsNewIconFix.svg +5 -0
- package/dist/types-ts4.0/assets/WhatsNewIconImprovement.d.ts +2 -0
- package/dist/types-ts4.0/assets/WhatsNewIconImprovement.svg +3 -0
- package/dist/types-ts4.0/assets/WhatsNewIconNew.d.ts +2 -0
- package/dist/types-ts4.0/assets/WhatsNewIconNew.svg +3 -0
- package/dist/types-ts4.0/assets/WhatsNewIconRemoved.d.ts +2 -0
- package/dist/types-ts4.0/assets/WhatsNewIconRemoved.svg +3 -0
- package/dist/types-ts4.0/components/Article/ArticleContent/index.d.ts +10 -0
- package/dist/types-ts4.0/components/Article/ArticleLoadingFail/index.d.ts +11 -0
- package/dist/types-ts4.0/components/Article/ArticleLoadingFail/styled.d.ts +3 -0
- package/dist/types-ts4.0/components/Article/HelpArticle/Loading/index.d.ts +7 -0
- package/dist/types-ts4.0/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.d.ts +12 -0
- package/dist/types-ts4.0/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.d.ts +12 -0
- package/dist/types-ts4.0/components/Article/HelpArticle/WasHelpfulForm/index.d.ts +14 -0
- package/dist/types-ts4.0/components/Article/HelpArticle/WasHelpfulForm/styled.d.ts +5 -0
- package/dist/types-ts4.0/components/Article/HelpArticle/index.d.ts +8 -0
- package/dist/types-ts4.0/components/Article/WhatsNewArticle/Loading/index.d.ts +7 -0
- package/dist/types-ts4.0/components/Article/WhatsNewArticle/index.d.ts +12 -0
- package/dist/types-ts4.0/components/Article/WhatsNewArticle/styled.d.ts +7 -0
- package/dist/types-ts4.0/components/Article/index.d.ts +3 -0
- package/dist/types-ts4.0/components/Article/styled.d.ts +3 -0
- package/dist/types-ts4.0/components/ArticlesList/ArticlesList.d.ts +7 -0
- package/dist/types-ts4.0/components/ArticlesList/ArticlesListItem/index.d.ts +13 -0
- package/dist/types-ts4.0/components/ArticlesList/ArticlesListItem/styled.d.ts +11 -0
- package/dist/types-ts4.0/components/ArticlesList/constants.d.ts +2 -0
- package/dist/types-ts4.0/components/ArticlesList/index.d.ts +4 -0
- package/dist/types-ts4.0/components/ArticlesList/model/ArticlesListItem.d.ts +11 -0
- package/dist/types-ts4.0/components/ArticlesList/styled.d.ts +5 -0
- package/dist/types-ts4.0/components/Help.d.ts +9 -0
- package/dist/types-ts4.0/components/HelpContent.d.ts +6 -0
- package/dist/types-ts4.0/components/HelpContentButton/index.d.ts +15 -0
- package/dist/types-ts4.0/components/HelpContentButton/styled.d.ts +7 -0
- package/dist/types-ts4.0/components/MessagesIntlProvider.d.ts +11 -0
- package/dist/types-ts4.0/components/RelatedArticles/RelatedArticlesLoading.d.ts +6 -0
- package/dist/types-ts4.0/components/RelatedArticles/index.d.ts +19 -0
- package/dist/types-ts4.0/components/RelatedArticles/styled.d.ts +10 -0
- package/dist/types-ts4.0/components/Search/SearchInput/index.d.ts +7 -0
- package/dist/types-ts4.0/components/Search/SearchInput/styled.d.ts +4 -0
- package/dist/types-ts4.0/components/Search/SearchResults/SearchExternalSite.d.ts +12 -0
- package/dist/types-ts4.0/components/Search/SearchResults/SearchResults.d.ts +9 -0
- package/dist/types-ts4.0/components/Search/SearchResults/SearchResultsEmpty.d.ts +12 -0
- package/dist/types-ts4.0/components/Search/SearchResults/SearchResultsError.d.ts +10 -0
- package/dist/types-ts4.0/components/Search/SearchResults/index.d.ts +3 -0
- package/dist/types-ts4.0/components/Search/SearchResults/styled.d.ts +6 -0
- package/dist/types-ts4.0/components/ShowMoreButton/index.d.ts +16 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewButton/index.d.ts +10 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/index.d.ts +10 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.d.ts +3 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/index.d.ts +11 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.d.ts +3 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.d.ts +13 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.d.ts +9 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.d.ts +7 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/index.d.ts +4 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/model/WhatsNewResultsList.d.ts +12 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.d.ts +7 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/index.d.ts +7 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.d.ts +6 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/index.d.ts +7 -0
- package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/styled.d.ts +5 -0
- package/dist/types-ts4.0/components/constants.d.ts +20 -0
- package/dist/types-ts4.0/components/contexts/headerContext.d.ts +9 -0
- package/dist/types-ts4.0/components/contexts/helpArticleContext.d.ts +13 -0
- package/dist/types-ts4.0/components/contexts/homeContext.d.ts +8 -0
- package/dist/types-ts4.0/components/contexts/navigationContext.d.ts +36 -0
- package/dist/types-ts4.0/components/contexts/relatedArticlesContext.d.ts +12 -0
- package/dist/types-ts4.0/components/contexts/searchContext.d.ts +25 -0
- package/dist/types-ts4.0/components/contexts/whatsNewArticleContext.d.ts +26 -0
- package/dist/types-ts4.0/components/styled.d.ts +13 -0
- package/dist/types-ts4.0/i18n/cs.d.ts +2 -0
- package/dist/types-ts4.0/i18n/da.d.ts +2 -0
- package/dist/types-ts4.0/i18n/de.d.ts +2 -0
- package/dist/types-ts4.0/i18n/en.d.ts +2 -0
- package/dist/types-ts4.0/i18n/en_GB.d.ts +2 -0
- package/dist/types-ts4.0/i18n/es.d.ts +4 -0
- package/dist/types-ts4.0/i18n/et.d.ts +2 -0
- package/dist/types-ts4.0/i18n/fi.d.ts +2 -0
- package/dist/types-ts4.0/i18n/fr.d.ts +2 -0
- package/dist/types-ts4.0/i18n/hu.d.ts +2 -0
- package/dist/types-ts4.0/i18n/index.d.ts +24 -0
- package/dist/types-ts4.0/i18n/is.d.ts +2 -0
- package/dist/types-ts4.0/i18n/it.d.ts +2 -0
- package/dist/types-ts4.0/i18n/ja.d.ts +2 -0
- package/dist/types-ts4.0/i18n/ko.d.ts +2 -0
- package/dist/types-ts4.0/i18n/languages.d.ts +27 -0
- package/dist/types-ts4.0/i18n/nb.d.ts +2 -0
- package/dist/types-ts4.0/i18n/nl.d.ts +2 -0
- package/dist/types-ts4.0/i18n/pl.d.ts +2 -0
- package/dist/types-ts4.0/i18n/pt_BR.d.ts +2 -0
- package/dist/types-ts4.0/i18n/pt_PT.d.ts +2 -0
- package/dist/types-ts4.0/i18n/ro.d.ts +2 -0
- package/dist/types-ts4.0/i18n/ru.d.ts +2 -0
- package/dist/types-ts4.0/i18n/sk.d.ts +2 -0
- package/dist/types-ts4.0/i18n/sv.d.ts +2 -0
- package/dist/types-ts4.0/i18n/zh.d.ts +2 -0
- package/dist/types-ts4.0/index.d.ts +11 -0
- package/dist/types-ts4.0/messages.d.ts +262 -0
- package/dist/types-ts4.0/model/Article.d.ts +30 -0
- package/dist/types-ts4.0/model/Help.d.ts +74 -0
- package/dist/types-ts4.0/model/Requests.d.ts +7 -0
- package/dist/types-ts4.0/model/WhatsNew.d.ts +29 -0
- package/dist/types-ts4.0/util/hooks/cancellablePromise.d.ts +7 -0
- package/dist/types-ts4.0/util/hooks/ctx.d.ts +5 -0
- package/dist/types-ts4.0/util/hooks/previous.d.ts +1 -0
- package/dist/types-ts4.0/util/i18n-util.d.ts +17 -0
- package/dist/types-ts4.0/util/index.d.ts +8 -0
- package/dist/types-ts4.0/util/styled.d.ts +29 -0
- package/dist/types-ts4.0/util/testing/mock.d.ts +8 -0
- package/messages/package.json +8 -1
- package/package.json +10 -3
- package/report.api.md +179 -85
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Article, ArticleItem, ArticleFeedback } from './Article';
|
|
3
|
+
import { WhatsNewArticleItem, WhatsNewArticle, WHATS_NEW_ITEM_TYPES, whatsNewSearchResult } from './WhatsNew';
|
|
4
|
+
import { REQUEST_STATE } from './Requests';
|
|
5
|
+
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
|
+
import { NotificationLogProvider } from '@atlaskit/notification-log-client';
|
|
7
|
+
import type { Props as HelpContentButtonProps } from '../components/HelpContentButton';
|
|
8
|
+
export declare enum ARTICLE_TYPE {
|
|
9
|
+
HELP_ARTICLE = "HELP_ARTICLE",
|
|
10
|
+
WHATS_NEW = "WHATS_NEW"
|
|
11
|
+
}
|
|
12
|
+
export interface HistoryItem {
|
|
13
|
+
uid: number;
|
|
14
|
+
id: string;
|
|
15
|
+
state: REQUEST_STATE;
|
|
16
|
+
type: ARTICLE_TYPE;
|
|
17
|
+
article?: Article | WhatsNewArticle;
|
|
18
|
+
}
|
|
19
|
+
export interface articleId {
|
|
20
|
+
id: string;
|
|
21
|
+
type: ARTICLE_TYPE;
|
|
22
|
+
}
|
|
23
|
+
export interface Help {
|
|
24
|
+
header?: {
|
|
25
|
+
onCloseButtonClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
|
|
26
|
+
onBackButtonClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
|
|
27
|
+
};
|
|
28
|
+
footer?: React.ReactNode;
|
|
29
|
+
home?: {
|
|
30
|
+
homeOptions?: HelpContentButtonProps[];
|
|
31
|
+
};
|
|
32
|
+
search?: {
|
|
33
|
+
onSearch?(value: string): Promise<ArticleItem[]>;
|
|
34
|
+
onSearchInputChanged?(event: React.KeyboardEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent, value: string): void;
|
|
35
|
+
onSearchInputCleared?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
|
|
36
|
+
onSearchResultItemClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, articleData: ArticleItem): void;
|
|
37
|
+
onSearchExternalUrlClick?(event?: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent?: UIAnalyticsEvent): void;
|
|
38
|
+
searchExternalUrl?: string;
|
|
39
|
+
};
|
|
40
|
+
navigation?: {
|
|
41
|
+
navigationData?: {
|
|
42
|
+
articleId: articleId;
|
|
43
|
+
history: HistoryItem[];
|
|
44
|
+
};
|
|
45
|
+
setNavigationData?(navigationData: {
|
|
46
|
+
articleId?: articleId;
|
|
47
|
+
history?: HistoryItem[];
|
|
48
|
+
}): void;
|
|
49
|
+
};
|
|
50
|
+
helpArticle?: {
|
|
51
|
+
onGetHelpArticle?(articleId: articleId): Promise<Article>;
|
|
52
|
+
onHelpArticleLoadingFailTryAgainButtonClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, articleId: articleId): void;
|
|
53
|
+
onWasHelpfulSubmit?(analyticsEvent: UIAnalyticsEvent, articleFeedback: ArticleFeedback, articleData: ArticleItem): Promise<boolean>;
|
|
54
|
+
onWasHelpfulYesButtonClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, ArticleItem: ArticleItem): void;
|
|
55
|
+
onWasHelpfulNoButtonClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, ArticleItem: ArticleItem): void;
|
|
56
|
+
};
|
|
57
|
+
relatedArticles?: {
|
|
58
|
+
routeGroup?: string;
|
|
59
|
+
routeName?: string;
|
|
60
|
+
onGetRelatedArticles?(routeGroup?: string, routeName?: string): Promise<ArticleItem[]>;
|
|
61
|
+
onRelatedArticlesShowMoreClick?(event: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent, isCollapsed: boolean): void;
|
|
62
|
+
onRelatedArticlesListItemClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, articleData: ArticleItem) => void;
|
|
63
|
+
};
|
|
64
|
+
whatsNew?: {
|
|
65
|
+
whatsNewGetNotificationProvider?: Promise<NotificationLogProvider>;
|
|
66
|
+
productName?: string;
|
|
67
|
+
onWhatsNewButtonClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
|
|
68
|
+
onSearchWhatsNewArticles?(filter?: WHATS_NEW_ITEM_TYPES | '', numberOfItems?: number, page?: string): Promise<whatsNewSearchResult>;
|
|
69
|
+
onWhatsNewResultItemClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, whatsNewArticleData: WhatsNewArticleItem): void;
|
|
70
|
+
onSearchWhatsNewShowMoreClick?(event: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent): void;
|
|
71
|
+
onGetWhatsNewArticle?(id: articleId): Promise<WhatsNewArticle>;
|
|
72
|
+
};
|
|
73
|
+
children?: React.ReactNode;
|
|
74
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BODY_FORMAT_TYPES } from '@atlaskit/help-article';
|
|
2
|
+
import type { AdfDoc } from '@atlaskit/help-article';
|
|
3
|
+
export declare enum WHATS_NEW_ITEM_TYPES {
|
|
4
|
+
NEW_FEATURE = "Announcement",
|
|
5
|
+
IMPROVEMENT = "Improvement",
|
|
6
|
+
FIX = "Fix",
|
|
7
|
+
REMOVED = "Removed",
|
|
8
|
+
EXPERIMENT = "Experiment"
|
|
9
|
+
}
|
|
10
|
+
export interface WhatsNewArticle extends WhatsNewArticleItem {
|
|
11
|
+
description: string | AdfDoc;
|
|
12
|
+
bodyFormat?: BODY_FORMAT_TYPES;
|
|
13
|
+
}
|
|
14
|
+
export interface WhatsNewArticleItem {
|
|
15
|
+
title?: string;
|
|
16
|
+
changeTargetSchedule?: string;
|
|
17
|
+
type?: WHATS_NEW_ITEM_TYPES;
|
|
18
|
+
status?: string;
|
|
19
|
+
featureRolloutDate?: string;
|
|
20
|
+
relatedExternalLinks?: string;
|
|
21
|
+
communityUrl?: string;
|
|
22
|
+
href?: string;
|
|
23
|
+
id: string;
|
|
24
|
+
}
|
|
25
|
+
export interface whatsNewSearchResult {
|
|
26
|
+
articles: WhatsNewArticleItem[];
|
|
27
|
+
nextPage: string;
|
|
28
|
+
hasNextPage: boolean;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePrevious(value: any): undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare type LanguageCode = 'zh' | 'cs' | 'da' | 'nl' | 'en' | 'en_GB' | 'et' | 'fi' | 'fr' | 'de' | 'hu' | 'is' | 'it' | 'ja' | 'ko' | 'nb' | 'pl' | 'pt_BR' | 'pt_PT' | 'ro' | 'ru' | 'sk' | 'es' | 'sv';
|
|
2
|
+
export declare type LangCode = LanguageCode | 'pt-BR' | 'pt-PT';
|
|
3
|
+
declare type LocaleMessages = {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Tries to get the most specific messages bundle for a given locale.
|
|
8
|
+
*
|
|
9
|
+
* Strategy:
|
|
10
|
+
* 1. Try to find messages with the exact string (i.e. 'fr_FR')
|
|
11
|
+
* 2. If that doesn't work, try to find messages for the country locale (i.e. 'fr')
|
|
12
|
+
* 3. If that doesn't work, return english messages as a fallback.
|
|
13
|
+
*
|
|
14
|
+
* @param locale string specifying the locale like 'en_GB', or 'fr'.
|
|
15
|
+
*/
|
|
16
|
+
export declare const getMessagesForLocale: (locale: LangCode) => LocaleMessages;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WHATS_NEW_ITEM_TYPES } from '../model/WhatsNew';
|
|
3
|
+
export declare const getTypeIcon: (itemType?: WHATS_NEW_ITEM_TYPES | undefined) => "" | JSX.Element;
|
|
4
|
+
export declare const getTypeTitle: (itemType: WHATS_NEW_ITEM_TYPES) => {
|
|
5
|
+
id: string;
|
|
6
|
+
defaultMessage: string;
|
|
7
|
+
description: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { WHATS_NEW_ITEM_TYPES } from '../model/WhatsNew';
|
|
4
|
+
export declare const DividerLine: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
|
|
5
|
+
/**
|
|
6
|
+
* Loading container
|
|
7
|
+
*/
|
|
8
|
+
declare type LoadingRectangleProps = {
|
|
9
|
+
contentWidth?: string;
|
|
10
|
+
contentHeight?: string;
|
|
11
|
+
marginTop?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const LoadingRectangle: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, LoadingRectangleProps, object>;
|
|
14
|
+
/**
|
|
15
|
+
* Loading Circle
|
|
16
|
+
*/
|
|
17
|
+
declare type LoadingCircleProps = {
|
|
18
|
+
radius?: string;
|
|
19
|
+
marginTop?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const LoadingCircle: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, LoadingCircleProps, object>;
|
|
22
|
+
/**
|
|
23
|
+
* What's new icon
|
|
24
|
+
*/
|
|
25
|
+
declare type WhatsNewTypeIconProps = {
|
|
26
|
+
type?: WHATS_NEW_ITEM_TYPES;
|
|
27
|
+
};
|
|
28
|
+
export declare const WhatsNewTypeIcon: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, WhatsNewTypeIconProps, object>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Article, ArticleItem } from '../../model/Article';
|
|
2
|
+
import { WHATS_NEW_ITEM_TYPES, WhatsNewArticleItem } from '../../model/WhatsNew';
|
|
3
|
+
export declare const getMockArticle: (id: string, routeName?: string, routeGroup?: string, productName?: string, href?: string) => Article;
|
|
4
|
+
export declare const getMockArticleItem: (id: string, routeName?: string, routeGroup?: string, productName?: string, href?: string) => ArticleItem;
|
|
5
|
+
export declare const getMockArticleItemList: (numberOfItems: number) => ArticleItem[];
|
|
6
|
+
export declare const getMockWhatsNewArticle: (id: string, routeName?: string, routeGroup?: string, productName?: string, href?: string) => Article;
|
|
7
|
+
export declare const getMockWhatsNewArticleItem: (id: string, type?: WHATS_NEW_ITEM_TYPES | undefined, title?: string, description?: string, changeTargetSchedule?: string, status?: string, featureRolloutDate?: string, href?: string) => WhatsNewArticleItem;
|
|
8
|
+
export declare const getMockWhatsNewArticleItemList: (numberOfItems: number) => WhatsNewArticleItem[];
|
package/messages/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/messages.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/messages.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/messages.d.ts"
|
|
7
|
+
"types": "../dist/types/messages.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/messages.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/help",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.15",
|
|
4
4
|
"description": "A cross-product help component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,6 +12,13 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.0 <4.5": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.0/*"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
15
22
|
"sideEffects": false,
|
|
16
23
|
"atlaskit:src": "src/index.ts",
|
|
17
24
|
"atlassian": {
|
|
@@ -64,11 +71,11 @@
|
|
|
64
71
|
"@atlaskit/navigation": "^37.0.0",
|
|
65
72
|
"@atlaskit/page": "^12.2.0",
|
|
66
73
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
67
|
-
"@testing-library/react": "^
|
|
74
|
+
"@testing-library/react": "^12.1.5",
|
|
68
75
|
"algoliasearch": "^3.35.1",
|
|
69
76
|
"enzyme": "^3.10.0",
|
|
70
77
|
"react-test-renderer": "^16.8.0",
|
|
71
|
-
"typescript": "4.
|
|
78
|
+
"typescript": "4.5.5"
|
|
72
79
|
},
|
|
73
80
|
"keywords": [
|
|
74
81
|
"atlaskit",
|
package/report.api.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/help"
|
|
1
|
+
## API Report File for "@atlaskit/help"
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
4
8
|
|
|
5
9
|
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
10
|
|
|
@@ -21,49 +25,77 @@ import { WithContextProps } from '@atlaskit/analytics-next';
|
|
|
21
25
|
import { WithIntlProps } from 'react-intl-next';
|
|
22
26
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
// @public (undocumented)
|
|
29
|
+
export interface Article extends ArticleItem {
|
|
30
|
+
// (undocumented)
|
|
25
31
|
body: string | AdfDoc;
|
|
32
|
+
// (undocumented)
|
|
26
33
|
bodyFormat?: BODY_FORMAT_TYPES;
|
|
34
|
+
// (undocumented)
|
|
27
35
|
relatedArticles?: ArticleItem[];
|
|
28
36
|
}
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
// @public (undocumented)
|
|
39
|
+
export enum ARTICLE_ITEM_TYPES {
|
|
40
|
+
// (undocumented)
|
|
31
41
|
topicInProduct = 'topicInProduct',
|
|
32
42
|
}
|
|
33
43
|
|
|
34
|
-
|
|
44
|
+
// @public (undocumented)
|
|
45
|
+
export enum ARTICLE_TYPE {
|
|
46
|
+
// (undocumented)
|
|
35
47
|
HELP_ARTICLE = 'HELP_ARTICLE',
|
|
48
|
+
// (undocumented)
|
|
36
49
|
WHATS_NEW = 'WHATS_NEW',
|
|
37
50
|
}
|
|
38
51
|
|
|
39
|
-
|
|
40
|
-
|
|
52
|
+
// @public (undocumented)
|
|
53
|
+
export interface ArticleFeedback {
|
|
54
|
+
// (undocumented)
|
|
55
|
+
contactMe: boolean;
|
|
56
|
+
// (undocumented)
|
|
41
57
|
feedbackReason: string;
|
|
58
|
+
// (undocumented)
|
|
42
59
|
feedbackReasonText: string;
|
|
43
|
-
|
|
60
|
+
// (undocumented)
|
|
61
|
+
wasHelpful: boolean;
|
|
44
62
|
}
|
|
45
63
|
|
|
46
|
-
|
|
64
|
+
// @public (undocumented)
|
|
65
|
+
export interface articleId {
|
|
66
|
+
// (undocumented)
|
|
47
67
|
id: string;
|
|
68
|
+
// (undocumented)
|
|
48
69
|
type: ARTICLE_TYPE;
|
|
49
70
|
}
|
|
50
71
|
|
|
51
|
-
|
|
72
|
+
// @public (undocumented)
|
|
73
|
+
export interface ArticleItem {
|
|
74
|
+
// (undocumented)
|
|
52
75
|
description?: string;
|
|
76
|
+
// (undocumented)
|
|
77
|
+
href?: string;
|
|
78
|
+
// (undocumented)
|
|
53
79
|
id: string;
|
|
80
|
+
// (undocumented)
|
|
54
81
|
lastPublished: string;
|
|
55
|
-
|
|
56
|
-
|
|
82
|
+
// (undocumented)
|
|
83
|
+
productName?: string;
|
|
84
|
+
// (undocumented)
|
|
57
85
|
routes?: {
|
|
58
86
|
routeName: string;
|
|
59
87
|
routeGroup: string;
|
|
60
88
|
}[];
|
|
89
|
+
// (undocumented)
|
|
90
|
+
title: string;
|
|
91
|
+
// (undocumented)
|
|
61
92
|
topicId?: string;
|
|
62
|
-
|
|
63
|
-
|
|
93
|
+
// (undocumented)
|
|
94
|
+
type: ARTICLE_ITEM_TYPES;
|
|
64
95
|
}
|
|
65
96
|
|
|
66
|
-
|
|
97
|
+
// @public (undocumented)
|
|
98
|
+
export const ArticlesListItem: React_2.FC<
|
|
67
99
|
WithIntlProps<Props_3 & Partial<ArticleItem> & WrappedComponentProps<'intl'>>
|
|
68
100
|
> & {
|
|
69
101
|
WrappedComponent: React_2.ComponentType<
|
|
@@ -71,7 +103,8 @@ export declare const ArticlesListItem: React_2.FC<
|
|
|
71
103
|
>;
|
|
72
104
|
};
|
|
73
105
|
|
|
74
|
-
|
|
106
|
+
// @public (undocumented)
|
|
107
|
+
const _default: React_2.ForwardRefExoticComponent<
|
|
75
108
|
Pick<
|
|
76
109
|
Omit<Props, keyof WithAnalyticsEventsProps> &
|
|
77
110
|
React_2.RefAttributes<any> &
|
|
@@ -82,7 +115,8 @@ declare const _default: React_2.ForwardRefExoticComponent<
|
|
|
82
115
|
>;
|
|
83
116
|
export default _default;
|
|
84
117
|
|
|
85
|
-
|
|
118
|
+
// @public (undocumented)
|
|
119
|
+
export const DividerLine: StyledComponent<
|
|
86
120
|
DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
87
121
|
Pick<
|
|
88
122
|
ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement>,
|
|
@@ -91,7 +125,13 @@ export declare const DividerLine: StyledComponent<
|
|
|
91
125
|
object
|
|
92
126
|
>;
|
|
93
127
|
|
|
94
|
-
|
|
128
|
+
// @public (undocumented)
|
|
129
|
+
export interface Help {
|
|
130
|
+
// (undocumented)
|
|
131
|
+
children?: React.ReactNode;
|
|
132
|
+
// (undocumented)
|
|
133
|
+
footer?: React.ReactNode;
|
|
134
|
+
// (undocumented)
|
|
95
135
|
header?: {
|
|
96
136
|
onCloseButtonClick?(
|
|
97
137
|
event: React.MouseEvent<HTMLElement, MouseEvent>,
|
|
@@ -102,42 +142,7 @@ export declare interface Help {
|
|
|
102
142
|
analyticsEvent: UIAnalyticsEvent,
|
|
103
143
|
): void;
|
|
104
144
|
};
|
|
105
|
-
|
|
106
|
-
home?: {
|
|
107
|
-
homeOptions?: Props_2[];
|
|
108
|
-
};
|
|
109
|
-
search?: {
|
|
110
|
-
onSearch?(value: string): Promise<ArticleItem[]>;
|
|
111
|
-
onSearchInputChanged?(
|
|
112
|
-
event: React.KeyboardEvent<HTMLInputElement>,
|
|
113
|
-
analyticsEvent: UIAnalyticsEvent,
|
|
114
|
-
value: string,
|
|
115
|
-
): void;
|
|
116
|
-
onSearchInputCleared?(
|
|
117
|
-
event: React.MouseEvent<HTMLElement, MouseEvent>,
|
|
118
|
-
analyticsEvent: UIAnalyticsEvent,
|
|
119
|
-
): void;
|
|
120
|
-
onSearchResultItemClick?(
|
|
121
|
-
event: React.MouseEvent<HTMLElement, MouseEvent>,
|
|
122
|
-
analyticsEvent: UIAnalyticsEvent,
|
|
123
|
-
articleData: ArticleItem,
|
|
124
|
-
): void;
|
|
125
|
-
onSearchExternalUrlClick?(
|
|
126
|
-
event?: React.MouseEvent<HTMLElement, MouseEvent>,
|
|
127
|
-
analyticsEvent?: UIAnalyticsEvent,
|
|
128
|
-
): void;
|
|
129
|
-
searchExternalUrl?: string;
|
|
130
|
-
};
|
|
131
|
-
navigation?: {
|
|
132
|
-
navigationData?: {
|
|
133
|
-
articleId: articleId;
|
|
134
|
-
history: HistoryItem[];
|
|
135
|
-
};
|
|
136
|
-
setNavigationData?(navigationData: {
|
|
137
|
-
articleId?: articleId;
|
|
138
|
-
history?: HistoryItem[];
|
|
139
|
-
}): void;
|
|
140
|
-
};
|
|
145
|
+
// (undocumented)
|
|
141
146
|
helpArticle?: {
|
|
142
147
|
onGetHelpArticle?(articleId: articleId): Promise<Article>;
|
|
143
148
|
onHelpArticleLoadingFailTryAgainButtonClick?(
|
|
@@ -161,6 +166,22 @@ export declare interface Help {
|
|
|
161
166
|
ArticleItem: ArticleItem,
|
|
162
167
|
): void;
|
|
163
168
|
};
|
|
169
|
+
// (undocumented)
|
|
170
|
+
home?: {
|
|
171
|
+
homeOptions?: Props_2[];
|
|
172
|
+
};
|
|
173
|
+
// (undocumented)
|
|
174
|
+
navigation?: {
|
|
175
|
+
navigationData?: {
|
|
176
|
+
articleId: articleId;
|
|
177
|
+
history: HistoryItem[];
|
|
178
|
+
};
|
|
179
|
+
setNavigationData?(navigationData: {
|
|
180
|
+
articleId?: articleId;
|
|
181
|
+
history?: HistoryItem[];
|
|
182
|
+
}): void;
|
|
183
|
+
};
|
|
184
|
+
// (undocumented)
|
|
164
185
|
relatedArticles?: {
|
|
165
186
|
routeGroup?: string;
|
|
166
187
|
routeName?: string;
|
|
@@ -179,6 +200,30 @@ export declare interface Help {
|
|
|
179
200
|
articleData: ArticleItem,
|
|
180
201
|
) => void;
|
|
181
202
|
};
|
|
203
|
+
// (undocumented)
|
|
204
|
+
search?: {
|
|
205
|
+
onSearch?(value: string): Promise<ArticleItem[]>;
|
|
206
|
+
onSearchInputChanged?(
|
|
207
|
+
event: React.KeyboardEvent<HTMLInputElement>,
|
|
208
|
+
analyticsEvent: UIAnalyticsEvent,
|
|
209
|
+
value: string,
|
|
210
|
+
): void;
|
|
211
|
+
onSearchInputCleared?(
|
|
212
|
+
event: React.MouseEvent<HTMLElement, MouseEvent>,
|
|
213
|
+
analyticsEvent: UIAnalyticsEvent,
|
|
214
|
+
): void;
|
|
215
|
+
onSearchResultItemClick?(
|
|
216
|
+
event: React.MouseEvent<HTMLElement, MouseEvent>,
|
|
217
|
+
analyticsEvent: UIAnalyticsEvent,
|
|
218
|
+
articleData: ArticleItem,
|
|
219
|
+
): void;
|
|
220
|
+
onSearchExternalUrlClick?(
|
|
221
|
+
event?: React.MouseEvent<HTMLElement, MouseEvent>,
|
|
222
|
+
analyticsEvent?: UIAnalyticsEvent,
|
|
223
|
+
): void;
|
|
224
|
+
searchExternalUrl?: string;
|
|
225
|
+
};
|
|
226
|
+
// (undocumented)
|
|
182
227
|
whatsNew?: {
|
|
183
228
|
whatsNewGetNotificationProvider?: Promise<NotificationLogProvider>;
|
|
184
229
|
productName?: string;
|
|
@@ -202,10 +247,10 @@ export declare interface Help {
|
|
|
202
247
|
): void;
|
|
203
248
|
onGetWhatsNewArticle?(id: articleId): Promise<WhatsNewArticle>;
|
|
204
249
|
};
|
|
205
|
-
children?: React.ReactNode;
|
|
206
250
|
}
|
|
207
251
|
|
|
208
|
-
|
|
252
|
+
// @public (undocumented)
|
|
253
|
+
export const HelpContentButton: ({
|
|
209
254
|
id,
|
|
210
255
|
href,
|
|
211
256
|
notificationMax,
|
|
@@ -216,17 +261,25 @@ export declare const HelpContentButton: ({
|
|
|
216
261
|
tooltipText,
|
|
217
262
|
}: Props_2) => JSX.Element;
|
|
218
263
|
|
|
219
|
-
|
|
220
|
-
|
|
264
|
+
// @public (undocumented)
|
|
265
|
+
export interface HistoryItem {
|
|
266
|
+
// (undocumented)
|
|
267
|
+
article?: Article | WhatsNewArticle;
|
|
268
|
+
// (undocumented)
|
|
221
269
|
id: string;
|
|
270
|
+
// (undocumented)
|
|
222
271
|
state: REQUEST_STATE;
|
|
272
|
+
// (undocumented)
|
|
223
273
|
type: ARTICLE_TYPE;
|
|
224
|
-
|
|
274
|
+
// (undocumented)
|
|
275
|
+
uid: number;
|
|
225
276
|
}
|
|
226
277
|
|
|
227
|
-
|
|
278
|
+
// @public (undocumented)
|
|
279
|
+
type Props = Help & WithAnalyticsEventsProps;
|
|
228
280
|
|
|
229
|
-
|
|
281
|
+
// @public (undocumented)
|
|
282
|
+
type Props_2 = {
|
|
230
283
|
id?: string;
|
|
231
284
|
href?: string;
|
|
232
285
|
notificationMax?: number;
|
|
@@ -241,35 +294,46 @@ declare type Props_2 = {
|
|
|
241
294
|
) => void;
|
|
242
295
|
};
|
|
243
296
|
|
|
244
|
-
|
|
245
|
-
|
|
297
|
+
// @public (undocumented)
|
|
298
|
+
interface Props_3 {
|
|
299
|
+
// (undocumented)
|
|
246
300
|
onClick?: (
|
|
247
301
|
event: React_2.MouseEvent<HTMLElement>,
|
|
248
302
|
analyticsEvent: UIAnalyticsEvent,
|
|
249
303
|
) => void;
|
|
304
|
+
// (undocumented)
|
|
305
|
+
styles?: {};
|
|
250
306
|
}
|
|
251
307
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
routeName?: string;
|
|
308
|
+
// @public (undocumented)
|
|
309
|
+
interface Props_4 {
|
|
310
|
+
// (undocumented)
|
|
256
311
|
onGetRelatedArticles?(
|
|
257
312
|
routeGroup?: string,
|
|
258
313
|
routeName?: string,
|
|
259
314
|
): Promise<ArticleItem[]>;
|
|
315
|
+
// (undocumented)
|
|
260
316
|
onRelatedArticlesListItemClick?: (
|
|
261
317
|
event: React_2.MouseEvent<HTMLElement, MouseEvent>,
|
|
262
318
|
analyticsEvent: UIAnalyticsEvent,
|
|
263
319
|
articleData: ArticleItem,
|
|
264
320
|
) => void;
|
|
321
|
+
// (undocumented)
|
|
265
322
|
onRelatedArticlesShowMoreClick?: (
|
|
266
323
|
event: React_2.MouseEvent<HTMLElement>,
|
|
267
324
|
analyticsEvent: UIAnalyticsEvent,
|
|
268
325
|
isCollapsed: boolean,
|
|
269
326
|
) => void;
|
|
327
|
+
// (undocumented)
|
|
328
|
+
routeGroup?: string;
|
|
329
|
+
// (undocumented)
|
|
330
|
+
routeName?: string;
|
|
331
|
+
// (undocumented)
|
|
332
|
+
style?: 'primary' | 'secondary';
|
|
270
333
|
}
|
|
271
334
|
|
|
272
|
-
|
|
335
|
+
// @public (undocumented)
|
|
336
|
+
export const RelatedArticles: React_2.ForwardRefExoticComponent<
|
|
273
337
|
Omit<Props_4 & WrappedComponentProps<'intl'>, 'intl'> & {
|
|
274
338
|
forwardedRef?: React_2.Ref<any> | undefined;
|
|
275
339
|
} & {
|
|
@@ -278,43 +342,73 @@ export declare const RelatedArticles: React_2.ForwardRefExoticComponent<
|
|
|
278
342
|
React_2.RefAttributes<any>
|
|
279
343
|
>;
|
|
280
344
|
|
|
281
|
-
|
|
345
|
+
// @public (undocumented)
|
|
346
|
+
enum REQUEST_STATE {
|
|
347
|
+
// (undocumented)
|
|
282
348
|
done = 'done',
|
|
283
|
-
|
|
349
|
+
// (undocumented)
|
|
284
350
|
error = 'error',
|
|
351
|
+
// (undocumented)
|
|
352
|
+
load = 'load',
|
|
353
|
+
// (undocumented)
|
|
354
|
+
loading = 'loading',
|
|
355
|
+
// (undocumented)
|
|
285
356
|
reload = 'reload',
|
|
286
357
|
}
|
|
287
358
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
359
|
+
// @public (undocumented)
|
|
360
|
+
export enum WHATS_NEW_ITEM_TYPES {
|
|
361
|
+
// (undocumented)
|
|
362
|
+
EXPERIMENT = 'Experiment',
|
|
363
|
+
// (undocumented)
|
|
291
364
|
FIX = 'Fix',
|
|
365
|
+
// (undocumented)
|
|
366
|
+
IMPROVEMENT = 'Improvement',
|
|
367
|
+
// (undocumented)
|
|
368
|
+
NEW_FEATURE = 'Announcement',
|
|
369
|
+
// (undocumented)
|
|
292
370
|
REMOVED = 'Removed',
|
|
293
|
-
EXPERIMENT = 'Experiment',
|
|
294
371
|
}
|
|
295
372
|
|
|
296
|
-
|
|
297
|
-
|
|
373
|
+
// @public (undocumented)
|
|
374
|
+
export interface WhatsNewArticle extends WhatsNewArticleItem {
|
|
375
|
+
// (undocumented)
|
|
298
376
|
bodyFormat?: BODY_FORMAT_TYPES;
|
|
377
|
+
// (undocumented)
|
|
378
|
+
description: string | AdfDoc;
|
|
299
379
|
}
|
|
300
380
|
|
|
301
|
-
|
|
302
|
-
|
|
381
|
+
// @public (undocumented)
|
|
382
|
+
export interface WhatsNewArticleItem {
|
|
383
|
+
// (undocumented)
|
|
303
384
|
changeTargetSchedule?: string;
|
|
304
|
-
|
|
305
|
-
status?: string;
|
|
306
|
-
featureRolloutDate?: string;
|
|
307
|
-
relatedExternalLinks?: string;
|
|
385
|
+
// (undocumented)
|
|
308
386
|
communityUrl?: string;
|
|
387
|
+
// (undocumented)
|
|
388
|
+
featureRolloutDate?: string;
|
|
389
|
+
// (undocumented)
|
|
309
390
|
href?: string;
|
|
391
|
+
// (undocumented)
|
|
310
392
|
id: string;
|
|
393
|
+
// (undocumented)
|
|
394
|
+
relatedExternalLinks?: string;
|
|
395
|
+
// (undocumented)
|
|
396
|
+
status?: string;
|
|
397
|
+
// (undocumented)
|
|
398
|
+
title?: string;
|
|
399
|
+
// (undocumented)
|
|
400
|
+
type?: WHATS_NEW_ITEM_TYPES;
|
|
311
401
|
}
|
|
312
402
|
|
|
313
|
-
|
|
403
|
+
// @public (undocumented)
|
|
404
|
+
interface whatsNewSearchResult {
|
|
405
|
+
// (undocumented)
|
|
314
406
|
articles: WhatsNewArticleItem[];
|
|
315
|
-
|
|
407
|
+
// (undocumented)
|
|
316
408
|
hasNextPage: boolean;
|
|
409
|
+
// (undocumented)
|
|
410
|
+
nextPage: string;
|
|
317
411
|
}
|
|
318
412
|
|
|
319
|
-
|
|
413
|
+
// (No @packageDocumentation comment for this package)
|
|
320
414
|
```
|