@atlaskit/help 7.1.26 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/components/Article/ArticleLoadingFail/styled.js +1 -0
  3. package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/index.js +0 -1
  4. package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/styled.js +3 -3
  5. package/dist/cjs/components/Article/WhatsNewArticle/styled.js +7 -6
  6. package/dist/cjs/components/Article/styled.js +2 -2
  7. package/dist/cjs/components/ArticlesList/ArticlesListItem/styled.js +5 -4
  8. package/dist/cjs/components/ArticlesList/styled.js +2 -2
  9. package/dist/cjs/components/HelpContentButton/styled.js +5 -5
  10. package/dist/cjs/components/RelatedArticles/index.js +28 -30
  11. package/dist/cjs/components/RelatedArticles/styled.js +4 -3
  12. package/dist/cjs/components/Search/SearchInput/styled.js +3 -3
  13. package/dist/cjs/components/Search/SearchResults/styled.js +1 -0
  14. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.js +1 -0
  15. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.js +1 -0
  16. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +5 -4
  17. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +2 -3
  18. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +4 -3
  19. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +3 -3
  20. package/dist/cjs/components/WhatsNew/WhatsNewResults/styled.js +4 -3
  21. package/dist/cjs/components/constants.js +8 -8
  22. package/dist/cjs/components/contexts/navigationContext.js +122 -130
  23. package/dist/cjs/components/contexts/searchContext.js +28 -30
  24. package/dist/cjs/components/contexts/whatsNewArticleContext.js +51 -53
  25. package/dist/cjs/components/styled.js +3 -3
  26. package/dist/cjs/model/Article.js +4 -4
  27. package/dist/cjs/model/Help.js +4 -4
  28. package/dist/cjs/model/Requests.js +4 -4
  29. package/dist/cjs/model/WhatsNew.js +4 -4
  30. package/dist/cjs/util/styled.js +3 -2
  31. package/dist/cjs/version.json +1 -1
  32. package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/styled.js +2 -3
  33. package/dist/es2019/components/Article/WhatsNewArticle/styled.js +8 -8
  34. package/dist/es2019/components/Article/styled.js +1 -2
  35. package/dist/es2019/components/ArticlesList/ArticlesListItem/styled.js +7 -7
  36. package/dist/es2019/components/ArticlesList/styled.js +1 -2
  37. package/dist/es2019/components/HelpContentButton/styled.js +6 -7
  38. package/dist/es2019/components/RelatedArticles/styled.js +5 -5
  39. package/dist/es2019/components/Search/SearchInput/styled.js +8 -9
  40. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +4 -5
  41. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +2 -3
  42. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +5 -4
  43. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +2 -4
  44. package/dist/es2019/components/WhatsNew/WhatsNewResults/styled.js +3 -3
  45. package/dist/es2019/components/constants.js +8 -8
  46. package/dist/es2019/components/styled.js +1 -2
  47. package/dist/es2019/model/Article.js +3 -3
  48. package/dist/es2019/model/Help.js +3 -3
  49. package/dist/es2019/model/Requests.js +3 -3
  50. package/dist/es2019/model/WhatsNew.js +3 -3
  51. package/dist/es2019/util/styled.js +4 -4
  52. package/dist/es2019/version.json +1 -1
  53. package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/styled.js +2 -3
  54. package/dist/esm/components/Article/WhatsNewArticle/styled.js +7 -7
  55. package/dist/esm/components/Article/styled.js +1 -2
  56. package/dist/esm/components/ArticlesList/ArticlesListItem/styled.js +5 -5
  57. package/dist/esm/components/ArticlesList/styled.js +1 -2
  58. package/dist/esm/components/HelpContentButton/styled.js +4 -5
  59. package/dist/esm/components/RelatedArticles/index.js +28 -30
  60. package/dist/esm/components/RelatedArticles/styled.js +4 -4
  61. package/dist/esm/components/Search/SearchInput/styled.js +2 -3
  62. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +4 -5
  63. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +2 -3
  64. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +4 -4
  65. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +2 -4
  66. package/dist/esm/components/WhatsNew/WhatsNewResults/styled.js +3 -3
  67. package/dist/esm/components/constants.js +8 -8
  68. package/dist/esm/components/contexts/navigationContext.js +122 -130
  69. package/dist/esm/components/contexts/searchContext.js +28 -30
  70. package/dist/esm/components/contexts/whatsNewArticleContext.js +51 -53
  71. package/dist/esm/components/styled.js +2 -3
  72. package/dist/esm/model/Article.js +3 -3
  73. package/dist/esm/model/Help.js +3 -3
  74. package/dist/esm/model/Requests.js +3 -3
  75. package/dist/esm/model/WhatsNew.js +3 -3
  76. package/dist/esm/util/styled.js +2 -2
  77. package/dist/esm/version.json +1 -1
  78. package/package.json +21 -21
  79. package/tmp/api-report-tmp.d.ts +0 -300
@@ -267,67 +267,65 @@ var NavigationContextProvider = function NavigationContextProvider(_ref4) {
267
267
  var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(historyItem) {
268
268
  var article;
269
269
  return _regenerator.default.wrap(function _callee$(_context) {
270
- while (1) {
271
- switch (_context.prev = _context.next) {
272
- case 0:
273
- _context.prev = 0;
274
- _context.t0 = historyItem.type;
275
- _context.next = _context.t0 === _Help.ARTICLE_TYPE.HELP_ARTICLE ? 4 : _context.t0 === _Help.ARTICLE_TYPE.WHATS_NEW ? 10 : 18;
270
+ while (1) switch (_context.prev = _context.next) {
271
+ case 0:
272
+ _context.prev = 0;
273
+ _context.t0 = historyItem.type;
274
+ _context.next = _context.t0 === _Help.ARTICLE_TYPE.HELP_ARTICLE ? 4 : _context.t0 === _Help.ARTICLE_TYPE.WHATS_NEW ? 10 : 18;
275
+ break;
276
+ case 4:
277
+ if (onGetHelpArticle) {
278
+ _context.next = 6;
276
279
  break;
277
- case 4:
278
- if (onGetHelpArticle) {
279
- _context.next = 6;
280
- break;
281
- }
282
- throw new Error('onGetHelpArticle prop not defined');
283
- case 6:
284
- _context.next = 8;
285
- return onGetHelpArticle({
286
- id: historyItem.id,
287
- type: historyItem.type
288
- });
289
- case 8:
290
- article = _context.sent;
291
- return _context.abrupt("break", 20);
292
- case 10:
293
- if (onGetWhatsNewArticle) {
294
- _context.next = 12;
295
- break;
296
- }
297
- throw new Error('onGetWhatsNewArticle prop not defined');
298
- case 12:
299
- if (!(historyItem.id === '')) {
300
- _context.next = 14;
301
- break;
302
- }
303
- return _context.abrupt("break", 20);
304
- case 14:
305
- _context.next = 16;
306
- return onGetWhatsNewArticle({
307
- id: historyItem.id,
308
- type: historyItem.type
309
- });
310
- case 16:
311
- article = _context.sent;
312
- return _context.abrupt("break", 20);
313
- case 18:
314
- throw new Error('onGetHelpArticle prop not defined');
315
- case 20:
316
- return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread({}, historyItem), article && {
317
- article: article
318
- }), {}, {
319
- state: _Requests.REQUEST_STATE.done
320
- }));
321
- case 23:
322
- _context.prev = 23;
323
- _context.t1 = _context["catch"](0);
324
- return _context.abrupt("return", _objectSpread(_objectSpread({}, historyItem), {}, {
325
- state: _Requests.REQUEST_STATE.error
326
- }));
327
- case 26:
328
- case "end":
329
- return _context.stop();
330
- }
280
+ }
281
+ throw new Error('onGetHelpArticle prop not defined');
282
+ case 6:
283
+ _context.next = 8;
284
+ return onGetHelpArticle({
285
+ id: historyItem.id,
286
+ type: historyItem.type
287
+ });
288
+ case 8:
289
+ article = _context.sent;
290
+ return _context.abrupt("break", 20);
291
+ case 10:
292
+ if (onGetWhatsNewArticle) {
293
+ _context.next = 12;
294
+ break;
295
+ }
296
+ throw new Error('onGetWhatsNewArticle prop not defined');
297
+ case 12:
298
+ if (!(historyItem.id === '')) {
299
+ _context.next = 14;
300
+ break;
301
+ }
302
+ return _context.abrupt("break", 20);
303
+ case 14:
304
+ _context.next = 16;
305
+ return onGetWhatsNewArticle({
306
+ id: historyItem.id,
307
+ type: historyItem.type
308
+ });
309
+ case 16:
310
+ article = _context.sent;
311
+ return _context.abrupt("break", 20);
312
+ case 18:
313
+ throw new Error('onGetHelpArticle prop not defined');
314
+ case 20:
315
+ return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread({}, historyItem), article && {
316
+ article: article
317
+ }), {}, {
318
+ state: _Requests.REQUEST_STATE.done
319
+ }));
320
+ case 23:
321
+ _context.prev = 23;
322
+ _context.t1 = _context["catch"](0);
323
+ return _context.abrupt("return", _objectSpread(_objectSpread({}, historyItem), {}, {
324
+ state: _Requests.REQUEST_STATE.error
325
+ }));
326
+ case 26:
327
+ case "end":
328
+ return _context.stop();
331
329
  }
332
330
  }, _callee, null, [[0, 23]]);
333
331
  }));
@@ -339,23 +337,21 @@ var NavigationContextProvider = function NavigationContextProvider(_ref4) {
339
337
  var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(historyItem) {
340
338
  var historyItemToReload;
341
339
  return _regenerator.default.wrap(function _callee2$(_context2) {
342
- while (1) {
343
- switch (_context2.prev = _context2.next) {
344
- case 0:
345
- historyItemToReload = _objectSpread({}, historyItem);
346
- if (historyItem.type === _Help.ARTICLE_TYPE.HELP_ARTICLE || historyItem.type === _Help.ARTICLE_TYPE.WHATS_NEW) {
347
- historyItemToReload.state = _Requests.REQUEST_STATE.loading;
348
- } else {
349
- historyItemToReload.state = _Requests.REQUEST_STATE.error;
350
- }
351
- dispatchNavigationAction({
352
- type: 'updateHistoryItem',
353
- payload: historyItemToReload
354
- });
355
- case 3:
356
- case "end":
357
- return _context2.stop();
358
- }
340
+ while (1) switch (_context2.prev = _context2.next) {
341
+ case 0:
342
+ historyItemToReload = _objectSpread({}, historyItem);
343
+ if (historyItem.type === _Help.ARTICLE_TYPE.HELP_ARTICLE || historyItem.type === _Help.ARTICLE_TYPE.WHATS_NEW) {
344
+ historyItemToReload.state = _Requests.REQUEST_STATE.loading;
345
+ } else {
346
+ historyItemToReload.state = _Requests.REQUEST_STATE.error;
347
+ }
348
+ dispatchNavigationAction({
349
+ type: 'updateHistoryItem',
350
+ payload: historyItemToReload
351
+ });
352
+ case 3:
353
+ case "end":
354
+ return _context2.stop();
359
355
  }
360
356
  }, _callee2);
361
357
  }));
@@ -365,45 +361,43 @@ var NavigationContextProvider = function NavigationContextProvider(_ref4) {
365
361
  }(), []);
366
362
  var navigateBack = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
367
363
  return _regenerator.default.wrap(function _callee3$(_context3) {
368
- while (1) {
369
- switch (_context3.prev = _context3.next) {
370
- case 0:
371
- if (!(currentView === _constants.VIEW.SEARCH && onSearch)) {
372
- _context3.next = 8;
373
- break;
374
- }
375
- if (!(searchValue !== '')) {
376
- _context3.next = 6;
377
- break;
378
- }
379
- onSearch('');
380
- return _context3.abrupt("return");
381
- case 6:
382
- dispatchNavigationAction({
383
- type: 'updateView',
384
- payload: currentArticleId.type
385
- });
386
- return _context3.abrupt("return");
387
- case 8:
388
- // if the history is not empty and ...
389
- if (currentHistory.length > 0) {
390
- // the history has more than one article, navigate back through the history
391
- if (currentHistory.length > 1) {
392
- // Remove last element
393
- dispatchNavigationAction({
394
- type: 'removeLastHistoryItem'
395
- });
396
- } else if (currentHistory.length === 1) {
397
- // but if the history only has one item, clear the history
398
- dispatchNavigationAction({
399
- type: 'removeAllHistoryItems'
400
- });
401
- }
364
+ while (1) switch (_context3.prev = _context3.next) {
365
+ case 0:
366
+ if (!(currentView === _constants.VIEW.SEARCH && onSearch)) {
367
+ _context3.next = 8;
368
+ break;
369
+ }
370
+ if (!(searchValue !== '')) {
371
+ _context3.next = 6;
372
+ break;
373
+ }
374
+ onSearch('');
375
+ return _context3.abrupt("return");
376
+ case 6:
377
+ dispatchNavigationAction({
378
+ type: 'updateView',
379
+ payload: currentArticleId.type
380
+ });
381
+ return _context3.abrupt("return");
382
+ case 8:
383
+ // if the history is not empty and ...
384
+ if (currentHistory.length > 0) {
385
+ // the history has more than one article, navigate back through the history
386
+ if (currentHistory.length > 1) {
387
+ // Remove last element
388
+ dispatchNavigationAction({
389
+ type: 'removeLastHistoryItem'
390
+ });
391
+ } else if (currentHistory.length === 1) {
392
+ // but if the history only has one item, clear the history
393
+ dispatchNavigationAction({
394
+ type: 'removeAllHistoryItems'
395
+ });
402
396
  }
403
- case 9:
404
- case "end":
405
- return _context3.stop();
406
- }
397
+ }
398
+ case 9:
399
+ case "end":
400
+ return _context3.stop();
407
401
  }
408
402
  }, _callee3);
409
403
  })), [currentView, onSearch, currentHistory.length, searchValue, currentArticleId.type]);
@@ -486,21 +480,19 @@ var NavigationContextProvider = function NavigationContextProvider(_ref4) {
486
480
  var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(historyItem) {
487
481
  var historyItemUpdate;
488
482
  return _regenerator.default.wrap(function _callee4$(_context4) {
489
- while (1) {
490
- switch (_context4.prev = _context4.next) {
491
- case 0:
492
- _context4.next = 2;
493
- return fetchArticleData(historyItem);
494
- case 2:
495
- historyItemUpdate = _context4.sent;
496
- dispatchNavigationAction({
497
- type: 'updateHistoryItem',
498
- payload: historyItemUpdate
499
- });
500
- case 4:
501
- case "end":
502
- return _context4.stop();
503
- }
483
+ while (1) switch (_context4.prev = _context4.next) {
484
+ case 0:
485
+ _context4.next = 2;
486
+ return fetchArticleData(historyItem);
487
+ case 2:
488
+ historyItemUpdate = _context4.sent;
489
+ dispatchNavigationAction({
490
+ type: 'updateHistoryItem',
491
+ payload: historyItemUpdate
492
+ });
493
+ case 4:
494
+ case "end":
495
+ return _context4.stop();
504
496
  }
505
497
  }, _callee4);
506
498
  }));
@@ -52,37 +52,35 @@ var SearchContextProvider = function SearchContextProvider(_ref) {
52
52
  results,
53
53
  _args = arguments;
54
54
  return _regenerator.default.wrap(function _callee$(_context) {
55
- while (1) {
56
- switch (_context.prev = _context.next) {
57
- case 0:
58
- value = _args.length > 0 && _args[0] !== undefined ? _args[0] : '';
59
- if (!onSearch) {
60
- _context.next = 16;
61
- break;
62
- }
63
- _context.prev = 2;
64
- _context.next = 5;
65
- return onSearch(value);
66
- case 5:
67
- results = _context.sent;
68
- setSearchResult(results);
69
- setSearchState(_Requests.REQUEST_STATE.done);
70
- _context.next = 14;
55
+ while (1) switch (_context.prev = _context.next) {
56
+ case 0:
57
+ value = _args.length > 0 && _args[0] !== undefined ? _args[0] : '';
58
+ if (!onSearch) {
59
+ _context.next = 16;
71
60
  break;
72
- case 10:
73
- _context.prev = 10;
74
- _context.t0 = _context["catch"](2);
75
- setSearchResult([]);
76
- setSearchState(_Requests.REQUEST_STATE.error);
77
- case 14:
78
- _context.next = 17;
79
- break;
80
- case 16:
81
- setSearchState(_Requests.REQUEST_STATE.error);
82
- case 17:
83
- case "end":
84
- return _context.stop();
85
- }
61
+ }
62
+ _context.prev = 2;
63
+ _context.next = 5;
64
+ return onSearch(value);
65
+ case 5:
66
+ results = _context.sent;
67
+ setSearchResult(results);
68
+ setSearchState(_Requests.REQUEST_STATE.done);
69
+ _context.next = 14;
70
+ break;
71
+ case 10:
72
+ _context.prev = 10;
73
+ _context.t0 = _context["catch"](2);
74
+ setSearchResult([]);
75
+ setSearchState(_Requests.REQUEST_STATE.error);
76
+ case 14:
77
+ _context.next = 17;
78
+ break;
79
+ case 16:
80
+ setSearchState(_Requests.REQUEST_STATE.error);
81
+ case 17:
82
+ case "end":
83
+ return _context.stop();
86
84
  }
87
85
  }, _callee, null, [[2, 10]]);
88
86
  })), [onSearch]);
@@ -52,61 +52,59 @@ var WhatsNewArticleProvider = function WhatsNewArticleProvider(_ref) {
52
52
  _results,
53
53
  _args = arguments;
54
54
  return _regenerator.default.wrap(function _callee$(_context) {
55
- while (1) {
56
- switch (_context.prev = _context.next) {
57
- case 0:
58
- filter = _args.length > 0 && _args[0] !== undefined ? _args[0] : '';
59
- numberOfItems = _args.length > 1 && _args[1] !== undefined ? _args[1] : _constants.NUMBER_OF_WHATS_NEW_ITEMS_PER_PAGE;
60
- page = _args.length > 2 && _args[2] !== undefined ? _args[2] : '';
61
- setWhatsNewSearchType(filter);
62
- if (!onSearchWhatsNewArticles) {
63
- _context.next = 28;
64
- break;
65
- }
66
- _context.prev = 5;
67
- setSearchWhatsNewArticlesState(_Requests.REQUEST_STATE.loading);
68
- // If the filter type hasn't change, then we are loading an extra page
69
- if (!(filter === whatsNewSearchType && page !== '')) {
70
- _context.next = 14;
71
- break;
72
- }
73
- _context.next = 10;
74
- return onSearchWhatsNewArticles(filter, numberOfItems, page);
75
- case 10:
76
- results = _context.sent;
77
- setSearchWhatsNewArticlesResult({
78
- articles: [].concat((0, _toConsumableArray2.default)(searchWhatsNewArticlesResult !== null && searchWhatsNewArticlesResult !== void 0 && searchWhatsNewArticlesResult.articles ? searchWhatsNewArticlesResult.articles : []), (0, _toConsumableArray2.default)(results.articles)),
79
- hasNextPage: results.hasNextPage,
80
- nextPage: results.nextPage
81
- });
82
- _context.next = 19;
55
+ while (1) switch (_context.prev = _context.next) {
56
+ case 0:
57
+ filter = _args.length > 0 && _args[0] !== undefined ? _args[0] : '';
58
+ numberOfItems = _args.length > 1 && _args[1] !== undefined ? _args[1] : _constants.NUMBER_OF_WHATS_NEW_ITEMS_PER_PAGE;
59
+ page = _args.length > 2 && _args[2] !== undefined ? _args[2] : '';
60
+ setWhatsNewSearchType(filter);
61
+ if (!onSearchWhatsNewArticles) {
62
+ _context.next = 28;
83
63
  break;
84
- case 14:
85
- // new search
86
- setSearchWhatsNewArticlesResult(null);
87
- _context.next = 17;
88
- return onSearchWhatsNewArticles(filter, numberOfItems, page);
89
- case 17:
90
- _results = _context.sent;
91
- setSearchWhatsNewArticlesResult(_results);
92
- case 19:
93
- setSearchWhatsNewArticlesState(_Requests.REQUEST_STATE.done);
94
- _context.next = 26;
64
+ }
65
+ _context.prev = 5;
66
+ setSearchWhatsNewArticlesState(_Requests.REQUEST_STATE.loading);
67
+ // If the filter type hasn't change, then we are loading an extra page
68
+ if (!(filter === whatsNewSearchType && page !== '')) {
69
+ _context.next = 14;
95
70
  break;
96
- case 22:
97
- _context.prev = 22;
98
- _context.t0 = _context["catch"](5);
99
- setSearchWhatsNewArticlesResult(null);
100
- setSearchWhatsNewArticlesState(_Requests.REQUEST_STATE.error);
101
- case 26:
102
- _context.next = 29;
103
- break;
104
- case 28:
105
- setSearchWhatsNewArticlesState(_Requests.REQUEST_STATE.error);
106
- case 29:
107
- case "end":
108
- return _context.stop();
109
- }
71
+ }
72
+ _context.next = 10;
73
+ return onSearchWhatsNewArticles(filter, numberOfItems, page);
74
+ case 10:
75
+ results = _context.sent;
76
+ setSearchWhatsNewArticlesResult({
77
+ articles: [].concat((0, _toConsumableArray2.default)(searchWhatsNewArticlesResult !== null && searchWhatsNewArticlesResult !== void 0 && searchWhatsNewArticlesResult.articles ? searchWhatsNewArticlesResult.articles : []), (0, _toConsumableArray2.default)(results.articles)),
78
+ hasNextPage: results.hasNextPage,
79
+ nextPage: results.nextPage
80
+ });
81
+ _context.next = 19;
82
+ break;
83
+ case 14:
84
+ // new search
85
+ setSearchWhatsNewArticlesResult(null);
86
+ _context.next = 17;
87
+ return onSearchWhatsNewArticles(filter, numberOfItems, page);
88
+ case 17:
89
+ _results = _context.sent;
90
+ setSearchWhatsNewArticlesResult(_results);
91
+ case 19:
92
+ setSearchWhatsNewArticlesState(_Requests.REQUEST_STATE.done);
93
+ _context.next = 26;
94
+ break;
95
+ case 22:
96
+ _context.prev = 22;
97
+ _context.t0 = _context["catch"](5);
98
+ setSearchWhatsNewArticlesResult(null);
99
+ setSearchWhatsNewArticlesState(_Requests.REQUEST_STATE.error);
100
+ case 26:
101
+ _context.next = 29;
102
+ break;
103
+ case 28:
104
+ setSearchWhatsNewArticlesState(_Requests.REQUEST_STATE.error);
105
+ case 29:
106
+ case "end":
107
+ return _context.stop();
110
108
  }
111
109
  }, _callee, null, [[5, 22]]);
112
110
  })), [onSearchWhatsNewArticles, whatsNewSearchType, searchWhatsNewArticlesResult]);
@@ -7,15 +7,15 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.Home = exports.HelpBodyContainer = exports.HelpBody = void 0;
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
9
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
- var _constants = require("@atlaskit/theme/constants");
11
10
  var _templateObject, _templateObject2, _templateObject3;
11
+ /** @jsx jsx */
12
12
  var HelpBodyContainer = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n flex-grow: 1;\n min-height: 0;\n position: relative;\n overflow-y: auto;\n overflow-x: hidden;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-content: stretch;\n align-items: flex-start;\n"])));
13
13
  exports.HelpBodyContainer = HelpBodyContainer;
14
14
  var HelpBody = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n box-sizing: border-box;\n order: 0;\n flex: 1 1 auto;\n align-self: auto;\n position: relative;\n overflow-x: hidden;\n overflow-y: auto;\n"])));
15
15
  exports.HelpBody = HelpBody;
16
- var Home = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: ", ";\n height: 100%;\n overflow: ", ";\n padding: ", "px;\n box-sizing: border-box;\n"])), function (props) {
16
+ var Home = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: ", ";\n height: 100%;\n overflow: ", ";\n padding: ", ";\n box-sizing: border-box;\n"])), function (props) {
17
17
  return props.isOverlayFullyVisible ? 'none' : 'block';
18
18
  }, function (props) {
19
19
  return props.isOverlayVisible ? 'hidden' : 'auto';
20
- }, (0, _constants.gridSize)() * 2);
20
+ }, "var(--ds-space-200, 16px)");
21
21
  exports.Home = Home;
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.ARTICLE_ITEM_TYPES = void 0;
7
7
  // TODO - Check if we need to delete this
8
- var ARTICLE_ITEM_TYPES;
9
- exports.ARTICLE_ITEM_TYPES = ARTICLE_ITEM_TYPES;
10
- (function (ARTICLE_ITEM_TYPES) {
8
+ var ARTICLE_ITEM_TYPES = /*#__PURE__*/function (ARTICLE_ITEM_TYPES) {
11
9
  ARTICLE_ITEM_TYPES["topicInProduct"] = "topicInProduct";
12
- })(ARTICLE_ITEM_TYPES || (exports.ARTICLE_ITEM_TYPES = ARTICLE_ITEM_TYPES = {}));
10
+ return ARTICLE_ITEM_TYPES;
11
+ }({});
12
+ exports.ARTICLE_ITEM_TYPES = ARTICLE_ITEM_TYPES;
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.ARTICLE_TYPE = void 0;
7
7
  var _Article = require("./Article");
8
- var ARTICLE_TYPE;
9
- exports.ARTICLE_TYPE = ARTICLE_TYPE;
10
- (function (ARTICLE_TYPE) {
8
+ var ARTICLE_TYPE = /*#__PURE__*/function (ARTICLE_TYPE) {
11
9
  ARTICLE_TYPE["HELP_ARTICLE"] = "HELP_ARTICLE";
12
10
  ARTICLE_TYPE["WHATS_NEW"] = "WHATS_NEW";
13
- })(ARTICLE_TYPE || (exports.ARTICLE_TYPE = ARTICLE_TYPE = {}));
11
+ return ARTICLE_TYPE;
12
+ }({});
13
+ exports.ARTICLE_TYPE = ARTICLE_TYPE;
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.REQUEST_STATE = void 0;
7
- var REQUEST_STATE;
8
- exports.REQUEST_STATE = REQUEST_STATE;
9
- (function (REQUEST_STATE) {
7
+ var REQUEST_STATE = /*#__PURE__*/function (REQUEST_STATE) {
10
8
  REQUEST_STATE["done"] = "done";
11
9
  REQUEST_STATE["loading"] = "loading";
12
10
  REQUEST_STATE["load"] = "load";
13
11
  REQUEST_STATE["error"] = "error";
14
12
  REQUEST_STATE["reload"] = "reload";
15
- })(REQUEST_STATE || (exports.REQUEST_STATE = REQUEST_STATE = {}));
13
+ return REQUEST_STATE;
14
+ }({});
15
+ exports.REQUEST_STATE = REQUEST_STATE;
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.WHATS_NEW_ITEM_TYPES = void 0;
7
- var WHATS_NEW_ITEM_TYPES;
8
- exports.WHATS_NEW_ITEM_TYPES = WHATS_NEW_ITEM_TYPES;
9
- (function (WHATS_NEW_ITEM_TYPES) {
7
+ var WHATS_NEW_ITEM_TYPES = /*#__PURE__*/function (WHATS_NEW_ITEM_TYPES) {
10
8
  WHATS_NEW_ITEM_TYPES["NEW_FEATURE"] = "Announcement";
11
9
  WHATS_NEW_ITEM_TYPES["IMPROVEMENT"] = "Improvement";
12
10
  WHATS_NEW_ITEM_TYPES["FIX"] = "Fix";
13
11
  WHATS_NEW_ITEM_TYPES["REMOVED"] = "Removed";
14
12
  WHATS_NEW_ITEM_TYPES["EXPERIMENT"] = "Experiment";
15
- })(WHATS_NEW_ITEM_TYPES || (exports.WHATS_NEW_ITEM_TYPES = WHATS_NEW_ITEM_TYPES = {}));
13
+ return WHATS_NEW_ITEM_TYPES;
14
+ }({});
15
+ exports.WHATS_NEW_ITEM_TYPES = WHATS_NEW_ITEM_TYPES;
@@ -13,9 +13,10 @@ var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
13
13
  var _core = require("@emotion/core");
14
14
  var _WhatsNew = require("../model/WhatsNew");
15
15
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
16
+ /** @jsx jsx */
16
17
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
- var DividerLine = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n height: 2px;\n width: 100%;\n padding: 0 ", "px;\n margin-top: ", "px;\n box-sizing: border-box;\n"])), "var(--ds-border, ".concat(colors.N30A, ")"), 2 * (0, _constants.gridSize)(), (0, _constants.gridSize)() * 2);
19
+ var DividerLine = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n height: 2px;\n width: 100%;\n padding: 0 ", ";\n margin-top: ", ";\n box-sizing: border-box;\n"])), "var(--ds-border, ".concat(colors.N30A, ")"), "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)");
19
20
 
20
21
  /**
21
22
  * Loading container
@@ -46,7 +47,7 @@ var LoadingCircle = _styled.default.div(_templateObject4 || (_templateObject4 =
46
47
  * What's new icon
47
48
  */
48
49
  exports.LoadingCircle = LoadingCircle;
49
- var WhatsNewTypeIcon = _styled.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n vertical-align: middle;\n position: relative;\n height: ", "px;\n width: ", "px;\n border-radius: 2px;\n background-color: ", ";\n\n & > img {\n width: calc(100% - ", "px);\n height: calc(100% - ", "px);\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n\n & > svg {\n height: 100%;\n width: 100%;\n }\n }\n"])), (0, _constants.gridSize)() * 2, (0, _constants.gridSize)() * 2, function (_ref) {
50
+ var WhatsNewTypeIcon = _styled.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n vertical-align: middle;\n position: relative;\n height: ", ";\n width: ", ";\n border-radius: 2px;\n background-color: ", ";\n\n & > img {\n width: calc(100% - ", "px);\n height: calc(100% - ", "px);\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n\n & > svg {\n height: 100%;\n width: 100%;\n }\n }\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)", function (_ref) {
50
51
  var type = _ref.type;
51
52
  switch (type) {
52
53
  case _WhatsNew.WHATS_NEW_ITEM_TYPES.IMPROVEMENT:
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/help",
3
- "version": "7.1.26",
3
+ "version": "7.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,7 +1,6 @@
1
1
  /** @jsx jsx */
2
2
 
3
3
  import styled from '@emotion/styled';
4
- import { gridSize } from '@atlaskit/theme/constants';
5
4
  import * as colors from '@atlaskit/theme/colors';
6
5
  export const ArticleFeedbackContainer = styled.div`
7
6
  position: relative;
@@ -10,10 +9,10 @@ export const ArticleFeedbackText = styled.div`
10
9
  font-size: 0.75rem;
11
10
  font-weight: bold;
12
11
  color: ${`var(--ds-text-subtlest, ${colors.N200})`};
13
- line-height: ${gridSize() * 4}px;
12
+ line-height: ${"var(--ds-font-lineHeight-500, 32px)"};
14
13
  position: relative;
15
14
  display: inline-block;
16
15
  `;
17
16
  export const ArticleFeedbackAnswerWrapper = styled.div`
18
- padding-top: ${gridSize() * 2}px;
17
+ padding-top: ${"var(--ds-space-200, 16px)"};
19
18
  `;