@atlaskit/help 7.1.13 → 7.1.14
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 +6 -0
- 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/package.json +2 -2
- package/report.api.md +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -73,7 +73,7 @@ var getNewHistoryItem = function getNewHistoryItem(id, type) {
|
|
|
73
73
|
uid: uid,
|
|
74
74
|
id: id,
|
|
75
75
|
type: type,
|
|
76
|
-
state: _Requests.REQUEST_STATE.
|
|
76
|
+
state: _Requests.REQUEST_STATE.load
|
|
77
77
|
};
|
|
78
78
|
return newHistoryItem;
|
|
79
79
|
};
|
|
@@ -532,7 +532,6 @@ var NavigationContextProvider = function NavigationContextProvider(_ref4) {
|
|
|
532
532
|
});
|
|
533
533
|
}
|
|
534
534
|
} else {
|
|
535
|
-
// console.log('same articleId');
|
|
536
535
|
if (setNavigationData) {
|
|
537
536
|
var simpleHistory = getSimpleHistory(currentHistory);
|
|
538
537
|
|
|
@@ -597,8 +596,14 @@ var NavigationContextProvider = function NavigationContextProvider(_ref4) {
|
|
|
597
596
|
|
|
598
597
|
var lastHistoryItem = _getCurrentArticle2(currentHistory);
|
|
599
598
|
|
|
600
|
-
if ((lastHistoryItem === null || lastHistoryItem === void 0 ? void 0 : lastHistoryItem.state) === _Requests.REQUEST_STATE.
|
|
599
|
+
if ((lastHistoryItem === null || lastHistoryItem === void 0 ? void 0 : lastHistoryItem.state) === _Requests.REQUEST_STATE.load || (lastHistoryItem === null || lastHistoryItem === void 0 ? void 0 : lastHistoryItem.state) === _Requests.REQUEST_STATE.reload) {
|
|
601
600
|
requestNewArticle(lastHistoryItem);
|
|
601
|
+
dispatchNavigationAction({
|
|
602
|
+
type: 'updateHistoryItem',
|
|
603
|
+
payload: _objectSpread(_objectSpread({}, lastHistoryItem), {}, {
|
|
604
|
+
state: _Requests.REQUEST_STATE.loading
|
|
605
|
+
})
|
|
606
|
+
});
|
|
602
607
|
}
|
|
603
608
|
}, [currentArticleId, currentHistory, fetchArticleData]);
|
|
604
609
|
return /*#__PURE__*/_react.default.createElement(CtxProvider, {
|
|
@@ -10,6 +10,7 @@ exports.REQUEST_STATE = REQUEST_STATE;
|
|
|
10
10
|
(function (REQUEST_STATE) {
|
|
11
11
|
REQUEST_STATE["done"] = "done";
|
|
12
12
|
REQUEST_STATE["loading"] = "loading";
|
|
13
|
+
REQUEST_STATE["load"] = "load";
|
|
13
14
|
REQUEST_STATE["error"] = "error";
|
|
14
15
|
REQUEST_STATE["reload"] = "reload";
|
|
15
16
|
})(REQUEST_STATE || (exports.REQUEST_STATE = REQUEST_STATE = {}));
|
package/dist/cjs/version.json
CHANGED
|
@@ -21,7 +21,7 @@ const getNewHistoryItem = (id, type) => {
|
|
|
21
21
|
uid,
|
|
22
22
|
id,
|
|
23
23
|
type,
|
|
24
|
-
state: REQUEST_STATE.
|
|
24
|
+
state: REQUEST_STATE.load
|
|
25
25
|
};
|
|
26
26
|
return newHistoryItem;
|
|
27
27
|
};
|
|
@@ -417,7 +417,6 @@ export const NavigationContextProvider = ({
|
|
|
417
417
|
});
|
|
418
418
|
}
|
|
419
419
|
} else {
|
|
420
|
-
// console.log('same articleId');
|
|
421
420
|
if (setNavigationData) {
|
|
422
421
|
const simpleHistory = getSimpleHistory(currentHistory);
|
|
423
422
|
|
|
@@ -460,8 +459,14 @@ export const NavigationContextProvider = ({
|
|
|
460
459
|
|
|
461
460
|
const lastHistoryItem = getCurrentArticle(currentHistory);
|
|
462
461
|
|
|
463
|
-
if ((lastHistoryItem === null || lastHistoryItem === void 0 ? void 0 : lastHistoryItem.state) === REQUEST_STATE.
|
|
462
|
+
if ((lastHistoryItem === null || lastHistoryItem === void 0 ? void 0 : lastHistoryItem.state) === REQUEST_STATE.load || (lastHistoryItem === null || lastHistoryItem === void 0 ? void 0 : lastHistoryItem.state) === REQUEST_STATE.reload) {
|
|
464
463
|
requestNewArticle(lastHistoryItem);
|
|
464
|
+
dispatchNavigationAction({
|
|
465
|
+
type: 'updateHistoryItem',
|
|
466
|
+
payload: { ...lastHistoryItem,
|
|
467
|
+
state: REQUEST_STATE.loading
|
|
468
|
+
}
|
|
469
|
+
});
|
|
465
470
|
}
|
|
466
471
|
}, [currentArticleId, currentHistory, fetchArticleData]);
|
|
467
472
|
return /*#__PURE__*/React.createElement(CtxProvider, {
|
|
@@ -3,6 +3,7 @@ export let REQUEST_STATE;
|
|
|
3
3
|
(function (REQUEST_STATE) {
|
|
4
4
|
REQUEST_STATE["done"] = "done";
|
|
5
5
|
REQUEST_STATE["loading"] = "loading";
|
|
6
|
+
REQUEST_STATE["load"] = "load";
|
|
6
7
|
REQUEST_STATE["error"] = "error";
|
|
7
8
|
REQUEST_STATE["reload"] = "reload";
|
|
8
9
|
})(REQUEST_STATE || (REQUEST_STATE = {}));
|
package/dist/es2019/version.json
CHANGED
|
@@ -40,7 +40,7 @@ var getNewHistoryItem = function getNewHistoryItem(id, type) {
|
|
|
40
40
|
uid: uid,
|
|
41
41
|
id: id,
|
|
42
42
|
type: type,
|
|
43
|
-
state: REQUEST_STATE.
|
|
43
|
+
state: REQUEST_STATE.load
|
|
44
44
|
};
|
|
45
45
|
return newHistoryItem;
|
|
46
46
|
};
|
|
@@ -502,7 +502,6 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref4)
|
|
|
502
502
|
});
|
|
503
503
|
}
|
|
504
504
|
} else {
|
|
505
|
-
// console.log('same articleId');
|
|
506
505
|
if (setNavigationData) {
|
|
507
506
|
var simpleHistory = getSimpleHistory(currentHistory);
|
|
508
507
|
|
|
@@ -567,8 +566,14 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref4)
|
|
|
567
566
|
|
|
568
567
|
var lastHistoryItem = _getCurrentArticle2(currentHistory);
|
|
569
568
|
|
|
570
|
-
if ((lastHistoryItem === null || lastHistoryItem === void 0 ? void 0 : lastHistoryItem.state) === REQUEST_STATE.
|
|
569
|
+
if ((lastHistoryItem === null || lastHistoryItem === void 0 ? void 0 : lastHistoryItem.state) === REQUEST_STATE.load || (lastHistoryItem === null || lastHistoryItem === void 0 ? void 0 : lastHistoryItem.state) === REQUEST_STATE.reload) {
|
|
571
570
|
requestNewArticle(lastHistoryItem);
|
|
571
|
+
dispatchNavigationAction({
|
|
572
|
+
type: 'updateHistoryItem',
|
|
573
|
+
payload: _objectSpread(_objectSpread({}, lastHistoryItem), {}, {
|
|
574
|
+
state: REQUEST_STATE.loading
|
|
575
|
+
})
|
|
576
|
+
});
|
|
572
577
|
}
|
|
573
578
|
}, [currentArticleId, currentHistory, fetchArticleData]);
|
|
574
579
|
return /*#__PURE__*/React.createElement(CtxProvider, {
|
|
@@ -3,6 +3,7 @@ export var REQUEST_STATE;
|
|
|
3
3
|
(function (REQUEST_STATE) {
|
|
4
4
|
REQUEST_STATE["done"] = "done";
|
|
5
5
|
REQUEST_STATE["loading"] = "loading";
|
|
6
|
+
REQUEST_STATE["load"] = "load";
|
|
6
7
|
REQUEST_STATE["error"] = "error";
|
|
7
8
|
REQUEST_STATE["reload"] = "reload";
|
|
8
9
|
})(REQUEST_STATE || (REQUEST_STATE = {}));
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/help",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.14",
|
|
4
4
|
"description": "A cross-product help component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@atlaskit/navigation": "^37.0.0",
|
|
65
65
|
"@atlaskit/page": "^12.2.0",
|
|
66
66
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
67
|
-
"@testing-library/react": "^
|
|
67
|
+
"@testing-library/react": "^12.1.5",
|
|
68
68
|
"algoliasearch": "^3.35.1",
|
|
69
69
|
"enzyme": "^3.10.0",
|
|
70
70
|
"react-test-renderer": "^16.8.0",
|