@atlaskit/help 7.2.0 → 7.2.1

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.
Files changed (135) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/components/Article/ArticleLoadingFail/styled.js +2 -3
  3. package/dist/cjs/components/ArticlesList/ArticlesListItem/styled.js +2 -0
  4. package/dist/cjs/components/Search/SearchResults/styled.js +5 -6
  5. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.js +2 -3
  6. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.js +2 -3
  7. package/dist/cjs/version.json +1 -1
  8. package/dist/es2019/components/Article/ArticleLoadingFail/styled.js +2 -3
  9. package/dist/es2019/components/ArticlesList/ArticlesListItem/styled.js +2 -0
  10. package/dist/es2019/components/Search/SearchResults/styled.js +7 -6
  11. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.js +4 -3
  12. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.js +4 -3
  13. package/dist/es2019/version.json +1 -1
  14. package/dist/esm/components/Article/ArticleLoadingFail/styled.js +2 -3
  15. package/dist/esm/components/ArticlesList/ArticlesListItem/styled.js +2 -0
  16. package/dist/esm/components/Search/SearchResults/styled.js +5 -6
  17. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.js +2 -3
  18. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.js +2 -3
  19. package/dist/esm/version.json +1 -1
  20. package/dist/types-ts4.0/analytics.d.ts +10 -0
  21. package/dist/types-ts4.0/assets/ErrorImage.d.ts +3 -0
  22. package/dist/types-ts4.0/assets/NotFoundImage.d.ts +3 -0
  23. package/dist/types-ts4.0/assets/SomethingWrongImage.d.ts +3 -0
  24. package/dist/types-ts4.0/assets/WhatsNewIcoExperiment.d.ts +2 -0
  25. package/dist/types-ts4.0/assets/WhatsNewIcoExperiment.svg +5 -0
  26. package/dist/types-ts4.0/assets/WhatsNewIconFix.d.ts +2 -0
  27. package/dist/types-ts4.0/assets/WhatsNewIconFix.svg +5 -0
  28. package/dist/types-ts4.0/assets/WhatsNewIconImprovement.d.ts +2 -0
  29. package/dist/types-ts4.0/assets/WhatsNewIconImprovement.svg +3 -0
  30. package/dist/types-ts4.0/assets/WhatsNewIconNew.d.ts +2 -0
  31. package/dist/types-ts4.0/assets/WhatsNewIconNew.svg +3 -0
  32. package/dist/types-ts4.0/assets/WhatsNewIconRemoved.d.ts +2 -0
  33. package/dist/types-ts4.0/assets/WhatsNewIconRemoved.svg +3 -0
  34. package/dist/types-ts4.0/components/Article/ArticleContent/index.d.ts +10 -0
  35. package/dist/types-ts4.0/components/Article/ArticleLoadingFail/index.d.ts +11 -0
  36. package/dist/types-ts4.0/components/Article/ArticleLoadingFail/styled.d.ts +3 -0
  37. package/dist/types-ts4.0/components/Article/HelpArticle/Loading/index.d.ts +7 -0
  38. package/dist/types-ts4.0/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.d.ts +12 -0
  39. package/dist/types-ts4.0/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.d.ts +12 -0
  40. package/dist/types-ts4.0/components/Article/HelpArticle/WasHelpfulForm/index.d.ts +14 -0
  41. package/dist/types-ts4.0/components/Article/HelpArticle/WasHelpfulForm/styled.d.ts +5 -0
  42. package/dist/types-ts4.0/components/Article/HelpArticle/index.d.ts +8 -0
  43. package/dist/types-ts4.0/components/Article/WhatsNewArticle/Loading/index.d.ts +7 -0
  44. package/dist/types-ts4.0/components/Article/WhatsNewArticle/index.d.ts +12 -0
  45. package/dist/types-ts4.0/components/Article/WhatsNewArticle/styled.d.ts +7 -0
  46. package/dist/types-ts4.0/components/Article/index.d.ts +3 -0
  47. package/dist/types-ts4.0/components/Article/styled.d.ts +3 -0
  48. package/dist/types-ts4.0/components/ArticlesList/ArticlesList.d.ts +7 -0
  49. package/dist/types-ts4.0/components/ArticlesList/ArticlesListItem/index.d.ts +13 -0
  50. package/dist/types-ts4.0/components/ArticlesList/ArticlesListItem/styled.d.ts +11 -0
  51. package/dist/types-ts4.0/components/ArticlesList/constants.d.ts +2 -0
  52. package/dist/types-ts4.0/components/ArticlesList/index.d.ts +4 -0
  53. package/dist/types-ts4.0/components/ArticlesList/model/ArticlesListItem.d.ts +11 -0
  54. package/dist/types-ts4.0/components/ArticlesList/styled.d.ts +5 -0
  55. package/dist/types-ts4.0/components/Help.d.ts +9 -0
  56. package/dist/types-ts4.0/components/HelpContent.d.ts +6 -0
  57. package/dist/types-ts4.0/components/HelpContentButton/index.d.ts +15 -0
  58. package/dist/types-ts4.0/components/HelpContentButton/styled.d.ts +7 -0
  59. package/dist/types-ts4.0/components/RelatedArticles/RelatedArticlesLoading.d.ts +6 -0
  60. package/dist/types-ts4.0/components/RelatedArticles/index.d.ts +19 -0
  61. package/dist/types-ts4.0/components/RelatedArticles/styled.d.ts +10 -0
  62. package/dist/types-ts4.0/components/Search/SearchInput/index.d.ts +7 -0
  63. package/dist/types-ts4.0/components/Search/SearchInput/styled.d.ts +4 -0
  64. package/dist/types-ts4.0/components/Search/SearchResults/SearchExternalSite.d.ts +12 -0
  65. package/dist/types-ts4.0/components/Search/SearchResults/SearchResults.d.ts +9 -0
  66. package/dist/types-ts4.0/components/Search/SearchResults/SearchResultsEmpty.d.ts +12 -0
  67. package/dist/types-ts4.0/components/Search/SearchResults/SearchResultsError.d.ts +10 -0
  68. package/dist/types-ts4.0/components/Search/SearchResults/index.d.ts +3 -0
  69. package/dist/types-ts4.0/components/Search/SearchResults/styled.d.ts +6 -0
  70. package/dist/types-ts4.0/components/ShowMoreButton/index.d.ts +16 -0
  71. package/dist/types-ts4.0/components/WhatsNew/WhatsNewButton/index.d.ts +10 -0
  72. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/index.d.ts +10 -0
  73. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.d.ts +3 -0
  74. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/index.d.ts +11 -0
  75. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.d.ts +3 -0
  76. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.d.ts +13 -0
  77. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.d.ts +9 -0
  78. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.d.ts +7 -0
  79. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/index.d.ts +4 -0
  80. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/model/WhatsNewResultsList.d.ts +12 -0
  81. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.d.ts +7 -0
  82. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/index.d.ts +7 -0
  83. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.d.ts +6 -0
  84. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/index.d.ts +7 -0
  85. package/dist/types-ts4.0/components/WhatsNew/WhatsNewResults/styled.d.ts +5 -0
  86. package/dist/types-ts4.0/components/constants.d.ts +20 -0
  87. package/dist/types-ts4.0/components/contexts/headerContext.d.ts +9 -0
  88. package/dist/types-ts4.0/components/contexts/helpArticleContext.d.ts +13 -0
  89. package/dist/types-ts4.0/components/contexts/homeContext.d.ts +8 -0
  90. package/dist/types-ts4.0/components/contexts/navigationContext.d.ts +36 -0
  91. package/dist/types-ts4.0/components/contexts/relatedArticlesContext.d.ts +12 -0
  92. package/dist/types-ts4.0/components/contexts/searchContext.d.ts +25 -0
  93. package/dist/types-ts4.0/components/contexts/whatsNewArticleContext.d.ts +26 -0
  94. package/dist/types-ts4.0/components/styled.d.ts +13 -0
  95. package/dist/types-ts4.0/i18n/cs.d.ts +2 -0
  96. package/dist/types-ts4.0/i18n/da.d.ts +2 -0
  97. package/dist/types-ts4.0/i18n/de.d.ts +2 -0
  98. package/dist/types-ts4.0/i18n/en.d.ts +2 -0
  99. package/dist/types-ts4.0/i18n/en_GB.d.ts +2 -0
  100. package/dist/types-ts4.0/i18n/es.d.ts +4 -0
  101. package/dist/types-ts4.0/i18n/et.d.ts +2 -0
  102. package/dist/types-ts4.0/i18n/fi.d.ts +2 -0
  103. package/dist/types-ts4.0/i18n/fr.d.ts +2 -0
  104. package/dist/types-ts4.0/i18n/hu.d.ts +2 -0
  105. package/dist/types-ts4.0/i18n/index.d.ts +24 -0
  106. package/dist/types-ts4.0/i18n/is.d.ts +2 -0
  107. package/dist/types-ts4.0/i18n/it.d.ts +2 -0
  108. package/dist/types-ts4.0/i18n/ja.d.ts +2 -0
  109. package/dist/types-ts4.0/i18n/ko.d.ts +2 -0
  110. package/dist/types-ts4.0/i18n/languages.d.ts +27 -0
  111. package/dist/types-ts4.0/i18n/nb.d.ts +2 -0
  112. package/dist/types-ts4.0/i18n/nl.d.ts +2 -0
  113. package/dist/types-ts4.0/i18n/pl.d.ts +2 -0
  114. package/dist/types-ts4.0/i18n/pt_BR.d.ts +2 -0
  115. package/dist/types-ts4.0/i18n/pt_PT.d.ts +2 -0
  116. package/dist/types-ts4.0/i18n/ro.d.ts +2 -0
  117. package/dist/types-ts4.0/i18n/ru.d.ts +2 -0
  118. package/dist/types-ts4.0/i18n/sk.d.ts +2 -0
  119. package/dist/types-ts4.0/i18n/sv.d.ts +2 -0
  120. package/dist/types-ts4.0/i18n/zh.d.ts +2 -0
  121. package/dist/types-ts4.0/index.d.ts +11 -0
  122. package/dist/types-ts4.0/messages.d.ts +262 -0
  123. package/dist/types-ts4.0/model/Article.d.ts +30 -0
  124. package/dist/types-ts4.0/model/Help.d.ts +74 -0
  125. package/dist/types-ts4.0/model/Requests.d.ts +7 -0
  126. package/dist/types-ts4.0/model/WhatsNew.d.ts +29 -0
  127. package/dist/types-ts4.0/util/hooks/cancellablePromise.d.ts +7 -0
  128. package/dist/types-ts4.0/util/hooks/ctx.d.ts +5 -0
  129. package/dist/types-ts4.0/util/hooks/previous.d.ts +1 -0
  130. package/dist/types-ts4.0/util/i18n-util.d.ts +17 -0
  131. package/dist/types-ts4.0/util/index.d.ts +8 -0
  132. package/dist/types-ts4.0/util/styled.d.ts +29 -0
  133. package/dist/types-ts4.0/util/testing/mock.d.ts +8 -0
  134. package/package.json +3 -2
  135. package/tmp/api-report-tmp.d.ts +300 -0
@@ -0,0 +1,27 @@
1
+ declare const _default: {
2
+ zh: string;
3
+ cs: string;
4
+ da: string;
5
+ nl: string;
6
+ en: string;
7
+ en_GB: string;
8
+ et: string;
9
+ fi: string;
10
+ fr: string;
11
+ de: string;
12
+ hu: string;
13
+ is: string;
14
+ it: string;
15
+ ja: string;
16
+ ko: string;
17
+ nb: string;
18
+ pl: string;
19
+ pt_BR: string;
20
+ pt_PT: string;
21
+ ro: string;
22
+ ru: string;
23
+ sk: string;
24
+ es: string;
25
+ sv: string;
26
+ };
27
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,11 @@
1
+ export { default } from './components/Help';
2
+ export { default as ArticlesListItem } from './components/ArticlesList/ArticlesListItem';
3
+ export { default as RelatedArticles } from './components/RelatedArticles';
4
+ export { default as HelpContentButton } from './components/HelpContentButton';
5
+ export { DividerLine } from './util/styled';
6
+ export { ARTICLE_TYPE } from './model/Help';
7
+ export { ARTICLE_ITEM_TYPES } from './model/Article';
8
+ export type { Help, HistoryItem, articleId } from './model/Help';
9
+ export type { Article, ArticleItem, ArticleFeedback } from './model/Article';
10
+ export { WHATS_NEW_ITEM_TYPES } from './model/WhatsNew';
11
+ export type { WhatsNewArticle, WhatsNewArticleItem } from './model/WhatsNew';
@@ -0,0 +1,262 @@
1
+ export declare const messages: {
2
+ help_loading: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ help_header: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ help_header_whats_new: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ help_close: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
22
+ help_navigation_back: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ description: string;
26
+ };
27
+ help_search_placeholder: {
28
+ id: string;
29
+ defaultMessage: string;
30
+ description: string;
31
+ };
32
+ help_article_rating_title: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
37
+ help_article_rating_option_yes: {
38
+ id: string;
39
+ defaultMessage: string;
40
+ description: string;
41
+ };
42
+ help_article_rating_option_no: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ description: string;
46
+ };
47
+ help_article_rating_form_title: {
48
+ id: string;
49
+ defaultMessage: string;
50
+ description: string;
51
+ };
52
+ help_article_rating_accurate: {
53
+ id: string;
54
+ defaultMessage: string;
55
+ description: string;
56
+ };
57
+ help_article_rating_clear: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
62
+ help_article_rating_relevant: {
63
+ id: string;
64
+ defaultMessage: string;
65
+ description: string;
66
+ };
67
+ help_article_rating_form_submit: {
68
+ id: string;
69
+ defaultMessage: string;
70
+ description: string;
71
+ };
72
+ help_article_rating_form_Success: {
73
+ id: string;
74
+ defaultMessage: string;
75
+ description: string;
76
+ };
77
+ help_article_rating_form_failed: {
78
+ id: string;
79
+ defaultMessage: string;
80
+ description: string;
81
+ };
82
+ help_article_rating_form_failed_try_again: {
83
+ id: string;
84
+ defaultMessage: string;
85
+ description: string;
86
+ };
87
+ help_article_rating_form_cancel: {
88
+ id: string;
89
+ defaultMessage: string;
90
+ description: string;
91
+ };
92
+ help_article_rating_form_contact_me: {
93
+ id: string;
94
+ defaultMessage: string;
95
+ description: string;
96
+ };
97
+ help_article_list_item_type_whats_new: {
98
+ id: string;
99
+ defaultMessage: string;
100
+ description: string;
101
+ };
102
+ help_article_list_item_type_help_article: {
103
+ id: string;
104
+ defaultMessage: string;
105
+ description: string;
106
+ };
107
+ help_related_article_title: {
108
+ id: string;
109
+ defaultMessage: string;
110
+ description: string;
111
+ };
112
+ help_related_article_endpoint_error_title: {
113
+ id: string;
114
+ defaultMessage: string;
115
+ description: string;
116
+ };
117
+ help_related_article_endpoint_error_description: {
118
+ id: string;
119
+ defaultMessage: string;
120
+ description: string;
121
+ };
122
+ help_related_article_endpoint_error_button_label: {
123
+ id: string;
124
+ defaultMessage: string;
125
+ description: string;
126
+ };
127
+ help_search_results_search_external_site: {
128
+ id: string;
129
+ defaultMessage: string;
130
+ description: string;
131
+ };
132
+ help_search_results_no_results: {
133
+ id: string;
134
+ defaultMessage: string;
135
+ description: string;
136
+ };
137
+ help_search_results_no_results_line_two: {
138
+ id: string;
139
+ defaultMessage: string;
140
+ description: string;
141
+ };
142
+ help_search_results_external_site_link: {
143
+ id: string;
144
+ defaultMessage: string;
145
+ description: string;
146
+ };
147
+ help_article_error_title: {
148
+ id: string;
149
+ defaultMessage: string;
150
+ description: string;
151
+ };
152
+ help_article_error_text: {
153
+ id: string;
154
+ defaultMessage: string;
155
+ description: string;
156
+ };
157
+ help_article_error_button_label: {
158
+ id: string;
159
+ defaultMessage: string;
160
+ description: string;
161
+ };
162
+ help_search_error: {
163
+ id: string;
164
+ defaultMessage: string;
165
+ description: string;
166
+ };
167
+ help_search_error_line_two: {
168
+ id: string;
169
+ defaultMessage: string;
170
+ description: string;
171
+ };
172
+ help_search_error_button_label: {
173
+ id: string;
174
+ defaultMessage: string;
175
+ description: string;
176
+ };
177
+ help_whats_new_button_label: {
178
+ id: string;
179
+ defaultMessage: string;
180
+ description: string;
181
+ };
182
+ help_whats_new_button_label_without_product_name: {
183
+ id: string;
184
+ defaultMessage: string;
185
+ description: string;
186
+ };
187
+ help_whats_new_button_tooltip: {
188
+ id: string;
189
+ defaultMessage: string;
190
+ description: string;
191
+ };
192
+ help_whats_new_filter_select_option_all: {
193
+ id: string;
194
+ defaultMessage: string;
195
+ description: string;
196
+ };
197
+ help_whats_new_filter_select_option_new: {
198
+ id: string;
199
+ defaultMessage: string;
200
+ description: string;
201
+ };
202
+ help_whats_new_filter_select_option_improvement: {
203
+ id: string;
204
+ defaultMessage: string;
205
+ description: string;
206
+ };
207
+ help_whats_new_filter_select_option_fix: {
208
+ id: string;
209
+ defaultMessage: string;
210
+ description: string;
211
+ };
212
+ help_whats_new_filter_select_option_removed: {
213
+ id: string;
214
+ defaultMessage: string;
215
+ description: string;
216
+ };
217
+ help_whats_new_filter_select_option_experiment: {
218
+ id: string;
219
+ defaultMessage: string;
220
+ description: string;
221
+ };
222
+ help_whats_new_no_results: {
223
+ id: string;
224
+ defaultMessage: string;
225
+ description: string;
226
+ };
227
+ help_whats_new_no_results_info: {
228
+ id: string;
229
+ defaultMessage: string;
230
+ description: string;
231
+ };
232
+ help_whats_new_no_results_clear_filter_button_label: {
233
+ id: string;
234
+ defaultMessage: string;
235
+ description: string;
236
+ };
237
+ help_whats_new_no_results_clear_filter_info: {
238
+ id: string;
239
+ defaultMessage: string;
240
+ description: string;
241
+ };
242
+ help_whats_new_related_link_support: {
243
+ id: string;
244
+ defaultMessage: string;
245
+ description: string;
246
+ };
247
+ help_whats_new_related_link_community: {
248
+ id: string;
249
+ defaultMessage: string;
250
+ description: string;
251
+ };
252
+ help_show_more_button_label_more: {
253
+ id: string;
254
+ defaultMessage: string;
255
+ description: string;
256
+ };
257
+ help_show_more_button_label_less: {
258
+ id: string;
259
+ defaultMessage: string;
260
+ description: string;
261
+ };
262
+ };
@@ -0,0 +1,30 @@
1
+ import { BODY_FORMAT_TYPES } from '@atlaskit/help-article';
2
+ import type { AdfDoc } from '@atlaskit/help-article';
3
+ export interface Article extends ArticleItem {
4
+ body: string | AdfDoc;
5
+ bodyFormat?: BODY_FORMAT_TYPES;
6
+ relatedArticles?: ArticleItem[];
7
+ }
8
+ export declare enum ARTICLE_ITEM_TYPES {
9
+ topicInProduct = "topicInProduct"
10
+ }
11
+ export interface ArticleItem {
12
+ description?: string;
13
+ id: string;
14
+ lastPublished: string;
15
+ title: string;
16
+ type: ARTICLE_ITEM_TYPES;
17
+ routes?: {
18
+ routeName: string;
19
+ routeGroup: string;
20
+ }[];
21
+ topicId?: string;
22
+ productName?: string;
23
+ href?: string;
24
+ }
25
+ export interface ArticleFeedback {
26
+ wasHelpful: boolean;
27
+ feedbackReason: string;
28
+ feedbackReasonText: string;
29
+ contactMe: boolean;
30
+ }
@@ -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,7 @@
1
+ export declare enum REQUEST_STATE {
2
+ done = "done",
3
+ loading = "loading",
4
+ load = "load",
5
+ error = "error",
6
+ reload = "reload"
7
+ }
@@ -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,7 @@
1
+ export declare function makeCancelable(promise: Promise<any>): {
2
+ promise: Promise<unknown>;
3
+ cancel(): void;
4
+ };
5
+ export default function useCancellablePromise(cancelable?: typeof makeCancelable): {
6
+ cancellablePromise: (p: Promise<any>) => Promise<any>;
7
+ };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare function createCtx<ContextType>(): readonly [
3
+ () => ContextType,
4
+ import("react").Provider<ContextType | undefined>
5
+ ];
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/help",
3
- "version": "7.2.0",
3
+ "version": "7.2.1",
4
4
  "description": "A cross-product help component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -80,7 +80,8 @@
80
80
  "techstack": {
81
81
  "@repo/internal": {
82
82
  "design-tokens": [
83
- "color"
83
+ "color",
84
+ "spacing"
84
85
  ]
85
86
  }
86
87
  }