@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.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/components/Article/ArticleLoadingFail/styled.js +1 -0
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/index.js +0 -1
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/styled.js +3 -3
- package/dist/cjs/components/Article/WhatsNewArticle/styled.js +7 -6
- package/dist/cjs/components/Article/styled.js +2 -2
- package/dist/cjs/components/ArticlesList/ArticlesListItem/styled.js +5 -4
- package/dist/cjs/components/ArticlesList/styled.js +2 -2
- package/dist/cjs/components/HelpContentButton/styled.js +5 -5
- package/dist/cjs/components/RelatedArticles/index.js +28 -30
- package/dist/cjs/components/RelatedArticles/styled.js +4 -3
- package/dist/cjs/components/Search/SearchInput/styled.js +3 -3
- package/dist/cjs/components/Search/SearchResults/styled.js +1 -0
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.js +1 -0
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.js +1 -0
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +5 -4
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +2 -3
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +4 -3
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +3 -3
- package/dist/cjs/components/WhatsNew/WhatsNewResults/styled.js +4 -3
- package/dist/cjs/components/constants.js +8 -8
- package/dist/cjs/components/contexts/navigationContext.js +122 -130
- package/dist/cjs/components/contexts/searchContext.js +28 -30
- package/dist/cjs/components/contexts/whatsNewArticleContext.js +51 -53
- package/dist/cjs/components/styled.js +3 -3
- package/dist/cjs/model/Article.js +4 -4
- package/dist/cjs/model/Help.js +4 -4
- package/dist/cjs/model/Requests.js +4 -4
- package/dist/cjs/model/WhatsNew.js +4 -4
- package/dist/cjs/util/styled.js +3 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/styled.js +2 -3
- package/dist/es2019/components/Article/WhatsNewArticle/styled.js +8 -8
- package/dist/es2019/components/Article/styled.js +1 -2
- package/dist/es2019/components/ArticlesList/ArticlesListItem/styled.js +7 -7
- package/dist/es2019/components/ArticlesList/styled.js +1 -2
- package/dist/es2019/components/HelpContentButton/styled.js +6 -7
- package/dist/es2019/components/RelatedArticles/styled.js +5 -5
- package/dist/es2019/components/Search/SearchInput/styled.js +8 -9
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +4 -5
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +2 -3
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +5 -4
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +2 -4
- package/dist/es2019/components/WhatsNew/WhatsNewResults/styled.js +3 -3
- package/dist/es2019/components/constants.js +8 -8
- package/dist/es2019/components/styled.js +1 -2
- package/dist/es2019/model/Article.js +3 -3
- package/dist/es2019/model/Help.js +3 -3
- package/dist/es2019/model/Requests.js +3 -3
- package/dist/es2019/model/WhatsNew.js +3 -3
- package/dist/es2019/util/styled.js +4 -4
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/styled.js +2 -3
- package/dist/esm/components/Article/WhatsNewArticle/styled.js +7 -7
- package/dist/esm/components/Article/styled.js +1 -2
- package/dist/esm/components/ArticlesList/ArticlesListItem/styled.js +5 -5
- package/dist/esm/components/ArticlesList/styled.js +1 -2
- package/dist/esm/components/HelpContentButton/styled.js +4 -5
- package/dist/esm/components/RelatedArticles/index.js +28 -30
- package/dist/esm/components/RelatedArticles/styled.js +4 -4
- package/dist/esm/components/Search/SearchInput/styled.js +2 -3
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +4 -5
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +2 -3
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +4 -4
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +2 -4
- package/dist/esm/components/WhatsNew/WhatsNewResults/styled.js +3 -3
- package/dist/esm/components/constants.js +8 -8
- package/dist/esm/components/contexts/navigationContext.js +122 -130
- package/dist/esm/components/contexts/searchContext.js +28 -30
- package/dist/esm/components/contexts/whatsNewArticleContext.js +51 -53
- package/dist/esm/components/styled.js +2 -3
- package/dist/esm/model/Article.js +3 -3
- package/dist/esm/model/Help.js +3 -3
- package/dist/esm/model/Requests.js +3 -3
- package/dist/esm/model/WhatsNew.js +3 -3
- package/dist/esm/util/styled.js +2 -2
- package/dist/esm/version.json +1 -1
- package/package.json +21 -21
- 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
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
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
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
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
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
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
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
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
|
-
|
|
404
|
-
|
|
405
|
-
|
|
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
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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: ", "
|
|
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
|
-
}, (
|
|
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
|
-
|
|
10
|
+
return ARTICLE_ITEM_TYPES;
|
|
11
|
+
}({});
|
|
12
|
+
exports.ARTICLE_ITEM_TYPES = ARTICLE_ITEM_TYPES;
|
package/dist/cjs/model/Help.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
13
|
+
return WHATS_NEW_ITEM_TYPES;
|
|
14
|
+
}({});
|
|
15
|
+
exports.WHATS_NEW_ITEM_TYPES = WHATS_NEW_ITEM_TYPES;
|
package/dist/cjs/util/styled.js
CHANGED
|
@@ -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 ", "
|
|
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: ", "
|
|
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:
|
package/dist/cjs/version.json
CHANGED
|
@@ -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: ${
|
|
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: ${
|
|
17
|
+
padding-top: ${"var(--ds-space-200, 16px)"};
|
|
19
18
|
`;
|