@atlaskit/help 7.7.4 → 7.9.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/analytics.js +1 -1
- package/dist/cjs/components/Article/ArticleLoadingFail/index.js +1 -1
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +1 -1
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +1 -1
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/index.js +1 -1
- package/dist/cjs/components/Article/HelpArticle/index.js +3 -2
- package/dist/cjs/components/Article/WhatsNewArticle/index.js +1 -1
- package/dist/cjs/components/ArticlesList/ArticlesListItem/index.js +4 -4
- package/dist/cjs/components/ArticlesList/ArticlesListItem/styled.js +7 -1
- package/dist/cjs/components/HelpContentButton/index.js +1 -1
- package/dist/cjs/components/RelatedArticles/index.js +1 -1
- package/dist/cjs/components/Search/SearchInput/index.js +1 -1
- package/dist/cjs/components/Search/SearchResults/index.js +2 -1
- package/dist/cjs/components/WhatsNew/WhatsNewButton/index.js +1 -1
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +1 -1
- package/dist/cjs/components/contexts/navigationContext.js +16 -14
- package/dist/es2019/analytics.js +1 -1
- package/dist/es2019/components/Article/ArticleLoadingFail/index.js +1 -1
- package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +1 -1
- package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +1 -1
- package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/index.js +1 -1
- package/dist/es2019/components/Article/HelpArticle/index.js +3 -2
- package/dist/es2019/components/Article/WhatsNewArticle/index.js +1 -1
- package/dist/es2019/components/ArticlesList/ArticlesListItem/index.js +5 -5
- package/dist/es2019/components/ArticlesList/ArticlesListItem/styled.js +6 -0
- package/dist/es2019/components/HelpContentButton/index.js +1 -1
- package/dist/es2019/components/RelatedArticles/index.js +1 -1
- package/dist/es2019/components/Search/SearchInput/index.js +1 -1
- package/dist/es2019/components/Search/SearchResults/index.js +2 -1
- package/dist/es2019/components/WhatsNew/WhatsNewButton/index.js +1 -1
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +1 -1
- package/dist/es2019/components/contexts/navigationContext.js +8 -7
- package/dist/esm/analytics.js +1 -1
- package/dist/esm/components/Article/ArticleLoadingFail/index.js +1 -1
- package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +1 -1
- package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +1 -1
- package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/index.js +1 -1
- package/dist/esm/components/Article/HelpArticle/index.js +3 -2
- package/dist/esm/components/Article/WhatsNewArticle/index.js +1 -1
- package/dist/esm/components/ArticlesList/ArticlesListItem/index.js +5 -5
- package/dist/esm/components/ArticlesList/ArticlesListItem/styled.js +6 -0
- package/dist/esm/components/HelpContentButton/index.js +1 -1
- package/dist/esm/components/RelatedArticles/index.js +1 -1
- package/dist/esm/components/Search/SearchInput/index.js +1 -1
- package/dist/esm/components/Search/SearchResults/index.js +2 -1
- package/dist/esm/components/WhatsNew/WhatsNewButton/index.js +1 -1
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +1 -1
- package/dist/esm/components/contexts/navigationContext.js +16 -14
- package/dist/types/analytics.d.ts +1 -1
- package/dist/types/components/ArticlesList/ArticlesListItem/styled.d.ts +4 -0
- package/dist/types/components/Help.d.ts +1 -1
- package/dist/types/model/Article.d.ts +1 -0
- package/dist/types/model/Help.d.ts +2 -0
- package/dist/types-ts4.5/analytics.d.ts +1 -1
- package/dist/types-ts4.5/components/ArticlesList/ArticlesListItem/styled.d.ts +4 -0
- package/dist/types-ts4.5/components/Help.d.ts +1 -1
- package/dist/types-ts4.5/model/Article.d.ts +1 -0
- package/dist/types-ts4.5/model/Help.d.ts +2 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/help
|
|
2
2
|
|
|
3
|
+
## 7.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#152883](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152883)
|
|
8
|
+
[`a7acb2e02ba15`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a7acb2e02ba15) -
|
|
9
|
+
[ux] Background color for mark highlight changed, title is formatted in a better way
|
|
10
|
+
|
|
11
|
+
## 7.8.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#152220](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152220)
|
|
16
|
+
[`e98602764f64b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e98602764f64b) -
|
|
17
|
+
[ux] Removed title highlight and changed styling for mark element
|
|
18
|
+
|
|
3
19
|
## 7.7.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/cjs/analytics.js
CHANGED
|
@@ -14,5 +14,5 @@ var createAndFire = exports.createAndFire = x.createAndFireEvent('atlaskit');
|
|
|
14
14
|
var defaultAnalyticsAttributes = exports.defaultAnalyticsAttributes = {
|
|
15
15
|
componentName: 'help',
|
|
16
16
|
packageName: "@atlaskit/help",
|
|
17
|
-
packageVersion: "7.
|
|
17
|
+
packageVersion: "7.9.0"
|
|
18
18
|
};
|
|
@@ -15,7 +15,7 @@ var _styled = require("./styled");
|
|
|
15
15
|
var ANALYTICS_CONTEXT_DATA = {
|
|
16
16
|
componentName: 'ArticleLoadingFail',
|
|
17
17
|
packageName: "@atlaskit/help",
|
|
18
|
-
packageVersion: "7.
|
|
18
|
+
packageVersion: "7.9.0"
|
|
19
19
|
};
|
|
20
20
|
var ArticleLoadingFail = exports.ArticleLoadingFail = function ArticleLoadingFail(_ref) {
|
|
21
21
|
var onTryAgainButtonClick = _ref.onTryAgainButtonClick,
|
|
@@ -13,7 +13,7 @@ var _messages = require("../../../../messages");
|
|
|
13
13
|
var ANALYTICS_CONTEXT_DATA = {
|
|
14
14
|
componentName: 'ArticleWasHelpfulNoButton',
|
|
15
15
|
packageName: "@atlaskit/help",
|
|
16
|
-
packageVersion: "7.
|
|
16
|
+
packageVersion: "7.9.0"
|
|
17
17
|
};
|
|
18
18
|
var ArticleWasHelpfulNoButton = exports.ArticleWasHelpfulNoButton = function ArticleWasHelpfulNoButton(_ref) {
|
|
19
19
|
var _ref$isSelected = _ref.isSelected,
|
|
@@ -13,7 +13,7 @@ var _messages = require("../../../../messages");
|
|
|
13
13
|
var ANALYTICS_CONTEXT_DATA = {
|
|
14
14
|
componentName: 'ArticleWasHelpfulYesButton',
|
|
15
15
|
packageName: "@atlaskit/help",
|
|
16
|
-
packageVersion: "7.
|
|
16
|
+
packageVersion: "7.9.0"
|
|
17
17
|
};
|
|
18
18
|
var ArticleWasHelpfulYesButton = exports.ArticleWasHelpfulYesButton = function ArticleWasHelpfulYesButton(_ref) {
|
|
19
19
|
var _ref$isSelected = _ref.isSelected,
|
|
@@ -42,7 +42,7 @@ var FEEDBACK_REASON_TEXT_MAX_LENGTH = '16000';
|
|
|
42
42
|
var ANALYTICS_CONTEXT_DATA = {
|
|
43
43
|
componentName: 'ArticleWasHelpfulForm',
|
|
44
44
|
packageName: "@atlaskit/help",
|
|
45
|
-
packageVersion: "7.
|
|
45
|
+
packageVersion: "7.9.0"
|
|
46
46
|
};
|
|
47
47
|
var buttonStyles = (0, _react2.css)({
|
|
48
48
|
padding: '0',
|
|
@@ -57,14 +57,15 @@ var HelpArticle = exports.HelpArticle = function HelpArticle(_ref) {
|
|
|
57
57
|
}
|
|
58
58
|
openArticle({
|
|
59
59
|
id: articleData.id,
|
|
60
|
-
type: _Help.ARTICLE_TYPE.HELP_ARTICLE
|
|
60
|
+
type: _Help.ARTICLE_TYPE.HELP_ARTICLE,
|
|
61
|
+
contentAri: articleData.contentAri
|
|
61
62
|
});
|
|
62
63
|
}, [openArticle, onRelatedArticlesListItemClick]);
|
|
63
64
|
var handleOnRelatedArticlesShowMoreClick = (0, _react.useCallback)(function (event, analyticsEvent, isCollapsed) {
|
|
64
65
|
analyticsEvent.payload.attributes = {
|
|
65
66
|
componentName: 'Article',
|
|
66
67
|
packageName: "@atlaskit/help",
|
|
67
|
-
packageVersion: "7.
|
|
68
|
+
packageVersion: "7.9.0"
|
|
68
69
|
};
|
|
69
70
|
if (onRelatedArticlesShowMoreClick) {
|
|
70
71
|
onRelatedArticlesShowMoreClick(event, analyticsEvent, isCollapsed);
|
|
@@ -22,7 +22,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
22
22
|
var analyticsContextData = {
|
|
23
23
|
componentName: 'ArticlesListItem',
|
|
24
24
|
packageName: "@atlaskit/help",
|
|
25
|
-
packageVersion: "7.
|
|
25
|
+
packageVersion: "7.9.0"
|
|
26
26
|
};
|
|
27
27
|
var WhatsNewArticle = exports.WhatsNewArticle = function WhatsNewArticle(_ref) {
|
|
28
28
|
var formatMessage = _ref.intl.formatMessage,
|
|
@@ -18,7 +18,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
18
18
|
var ANALYTICS_CONTEXT_DATA = {
|
|
19
19
|
componentName: 'ArticlesListItem',
|
|
20
20
|
packageName: "@atlaskit/help",
|
|
21
|
-
packageVersion: "7.
|
|
21
|
+
packageVersion: "7.9.0"
|
|
22
22
|
};
|
|
23
23
|
var highlightText = function highlightText(text) {
|
|
24
24
|
if (!text) {
|
|
@@ -28,9 +28,9 @@ var highlightText = function highlightText(text) {
|
|
|
28
28
|
var sections = [];
|
|
29
29
|
html.forEach(function (node, i) {
|
|
30
30
|
if (node.nodeName === 'SPAN') {
|
|
31
|
-
sections.push( /*#__PURE__*/_react.default.createElement("
|
|
31
|
+
sections.push( /*#__PURE__*/_react.default.createElement("b", null, /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemDescriptionHighlight, {
|
|
32
32
|
key: i
|
|
33
|
-
}, node.textContent));
|
|
33
|
+
}, node.textContent)));
|
|
34
34
|
} else {
|
|
35
35
|
sections.push(node.textContent);
|
|
36
36
|
}
|
|
@@ -72,7 +72,7 @@ var ArticlesListItem = exports.ArticlesListItem = function ArticlesListItem(_ref
|
|
|
72
72
|
role: "button",
|
|
73
73
|
href: href,
|
|
74
74
|
onClick: handleOnClick
|
|
75
|
-
}, /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemContainer, null, /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemTitleSection, null, /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemTitleText, null,
|
|
75
|
+
}, /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemContainer, null, /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemTitleSection, null, /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemTitleText, null, title), isLastPublishedVisible && /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemLastModified, null, "Last modified: ", lastPublished)), href && /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemLinkIcon, null, /*#__PURE__*/_react.default.createElement(_linkExternalShortcut.default, {
|
|
76
76
|
LEGACY_size: "small",
|
|
77
77
|
label: "",
|
|
78
78
|
color: "var(--ds-icon-subtle, ".concat(colors.N90, ")"),
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.ArticlesListItemWrapper = exports.ArticlesListItemViewCount = exports.ArticlesListItemTypeTitle = exports.ArticlesListItemTrustFactor = exports.ArticlesListItemTitleText = exports.ArticlesListItemTitleSection = exports.ArticlesListItemSource = exports.ArticlesListItemLinkIcon = exports.ArticlesListItemLastModified = exports.ArticlesListItemHelpfulCount = exports.ArticlesListItemDescription = exports.ArticlesListItemContainer = void 0;
|
|
8
|
+
exports.ArticlesListItemWrapper = exports.ArticlesListItemViewCount = exports.ArticlesListItemTypeTitle = exports.ArticlesListItemTrustFactor = exports.ArticlesListItemTitleText = exports.ArticlesListItemTitleSection = exports.ArticlesListItemSource = exports.ArticlesListItemLinkIcon = exports.ArticlesListItemLastModified = exports.ArticlesListItemHelpfulCount = exports.ArticlesListItemDescriptionHighlight = exports.ArticlesListItemDescription = exports.ArticlesListItemContainer = void 0;
|
|
9
9
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
10
|
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
11
11
|
var _typography = require("@atlaskit/theme/typography");
|
|
@@ -152,4 +152,10 @@ var ArticlesListItemLastModified = exports.ArticlesListItemLastModified = _style
|
|
|
152
152
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
153
153
|
color: "var(--ds-text-subtlest, ".concat(colors.N400A, ")"),
|
|
154
154
|
padding: "var(--ds-space-050, 4px)".concat(" 0")
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
|
|
158
|
+
var ArticlesListItemDescriptionHighlight = exports.ArticlesListItemDescriptionHighlight = _styled.default.mark({
|
|
159
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
160
|
+
backgroundColor: "var(--ds-background-accent-yellow-subtlest, ".concat(colors.Y100, ")")
|
|
155
161
|
});
|
|
@@ -17,7 +17,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
17
17
|
var analitycsContextData = {
|
|
18
18
|
componentName: 'HelpContentButton',
|
|
19
19
|
packageName: "@atlaskit/help",
|
|
20
|
-
packageVersion: "7.
|
|
20
|
+
packageVersion: "7.9.0"
|
|
21
21
|
};
|
|
22
22
|
var HelpContentButton = function HelpContentButton(_ref) {
|
|
23
23
|
var _ref$id = _ref.id,
|
|
@@ -33,7 +33,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
33
33
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
34
34
|
|
|
35
35
|
var packageName = "@atlaskit/help";
|
|
36
|
-
var packageVersion = "7.
|
|
36
|
+
var packageVersion = "7.9.0";
|
|
37
37
|
var buttonStyles = (0, _react2.css)({
|
|
38
38
|
padding: '0',
|
|
39
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -32,7 +32,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
32
32
|
var ANALYTICS_CONTEXT_DATA = {
|
|
33
33
|
componentName: 'searchInput',
|
|
34
34
|
packageName: "@atlaskit/help",
|
|
35
|
-
packageVersion: "7.
|
|
35
|
+
packageVersion: "7.9.0"
|
|
36
36
|
};
|
|
37
37
|
var buttonStyles = (0, _react2.css)({
|
|
38
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -63,7 +63,8 @@ var SearchResults = exports.SearchResults = function SearchResults() {
|
|
|
63
63
|
if (!openExternalSearchUrlInNewTab || articleData.href == null) {
|
|
64
64
|
openArticle({
|
|
65
65
|
id: articleData.id,
|
|
66
|
-
type: _Help.ARTICLE_TYPE.HELP_ARTICLE
|
|
66
|
+
type: _Help.ARTICLE_TYPE.HELP_ARTICLE,
|
|
67
|
+
contentAri: articleData.contentAri
|
|
67
68
|
});
|
|
68
69
|
} else {
|
|
69
70
|
window.open(articleData.href, '_blank');
|
|
@@ -21,7 +21,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
21
21
|
var ANALYTICS_CONTEXT_DATA = {
|
|
22
22
|
componentName: 'WhatsNewButton',
|
|
23
23
|
packageName: "@atlaskit/help",
|
|
24
|
-
packageVersion: "7.
|
|
24
|
+
packageVersion: "7.9.0"
|
|
25
25
|
};
|
|
26
26
|
var WhatsNewButton = exports.WhatsNewButton = function WhatsNewButton(_ref) {
|
|
27
27
|
var productName = _ref.productName,
|
package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var _styled2 = require("./styled");
|
|
|
15
15
|
var ANALYTICS_CONTEXT_DATA = {
|
|
16
16
|
componentName: 'ArticlesListItem',
|
|
17
17
|
packageName: "@atlaskit/help",
|
|
18
|
-
packageVersion: "7.
|
|
18
|
+
packageVersion: "7.9.0"
|
|
19
19
|
};
|
|
20
20
|
var WhatsNewResultListItem = exports.WhatsNewResultListItem = function WhatsNewResultListItem(_ref) {
|
|
21
21
|
var formatMessage = _ref.intl.formatMessage,
|
|
@@ -37,13 +37,14 @@ var _createCtx = (0, _ctx.createCtx)(),
|
|
|
37
37
|
_createCtx2 = (0, _slicedToArray2.default)(_createCtx, 2),
|
|
38
38
|
useNavigationContext = exports.useNavigationContext = _createCtx2[0],
|
|
39
39
|
CtxProvider = exports.CtxProvider = _createCtx2[1];
|
|
40
|
-
var getNewHistoryItem = function getNewHistoryItem(id, type) {
|
|
40
|
+
var getNewHistoryItem = function getNewHistoryItem(id, type, contentAri) {
|
|
41
41
|
var uid = Math.floor(Math.random() * Math.pow(10, 17));
|
|
42
42
|
var newHistoryItem = {
|
|
43
43
|
uid: uid,
|
|
44
44
|
id: id,
|
|
45
45
|
type: type,
|
|
46
|
-
state: _Requests.REQUEST_STATE.load
|
|
46
|
+
state: _Requests.REQUEST_STATE.load,
|
|
47
|
+
contentAri: contentAri
|
|
47
48
|
};
|
|
48
49
|
return newHistoryItem;
|
|
49
50
|
};
|
|
@@ -148,7 +149,7 @@ var navigationReducer = function navigationReducer(_ref3, action) {
|
|
|
148
149
|
} else {
|
|
149
150
|
newState = {
|
|
150
151
|
articleId: newArticleId,
|
|
151
|
-
history: [].concat((0, _toConsumableArray2.default)(currentHistory), [getNewHistoryItem(newArticleId.id, newArticleId.type)]),
|
|
152
|
+
history: [].concat((0, _toConsumableArray2.default)(currentHistory), [getNewHistoryItem(newArticleId.id, newArticleId.type, newArticleId.contentAri)]),
|
|
152
153
|
view: getViewForArticleId(newArticleId)
|
|
153
154
|
};
|
|
154
155
|
}
|
|
@@ -156,7 +157,7 @@ var navigationReducer = function navigationReducer(_ref3, action) {
|
|
|
156
157
|
var _newArticleId = action.payload;
|
|
157
158
|
newState = {
|
|
158
159
|
articleId: currentArticleId,
|
|
159
|
-
history: [].concat((0, _toConsumableArray2.default)(currentHistory), [getNewHistoryItem(_newArticleId.id, _newArticleId.type)]),
|
|
160
|
+
history: [].concat((0, _toConsumableArray2.default)(currentHistory), [getNewHistoryItem(_newArticleId.id, _newArticleId.type, _newArticleId.contentAri)]),
|
|
160
161
|
view: getViewForArticleId(currentArticleId)
|
|
161
162
|
};
|
|
162
163
|
} else if (action.type === 'updateHistoryItem' && action.payload) {
|
|
@@ -234,7 +235,7 @@ var NavigationContextProvider = exports.NavigationContextProvider = function Nav
|
|
|
234
235
|
propsHistory = navigationData.history;
|
|
235
236
|
var _useReducer = (0, _react.useReducer)(navigationReducer, {
|
|
236
237
|
articleId: propsArticleId,
|
|
237
|
-
history: !(0, _isEqual.default)(propsArticleId, DEFAULT_ARTICLE_ID) && propsHistory.length === 0 ? [getNewHistoryItem(propsArticleId.id, propsArticleId.type)] : propsHistory,
|
|
238
|
+
history: !(0, _isEqual.default)(propsArticleId, DEFAULT_ARTICLE_ID) && propsHistory.length === 0 ? [getNewHistoryItem(propsArticleId.id, propsArticleId.type, propsArticleId.contentAri)] : propsHistory,
|
|
238
239
|
view: _constants.VIEW.DEFAULT_CONTENT
|
|
239
240
|
}),
|
|
240
241
|
_useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),
|
|
@@ -283,11 +284,12 @@ var NavigationContextProvider = exports.NavigationContextProvider = function Nav
|
|
|
283
284
|
_context.next = 8;
|
|
284
285
|
return onGetHelpArticle({
|
|
285
286
|
id: historyItem.id,
|
|
286
|
-
type: historyItem.type
|
|
287
|
+
type: historyItem.type,
|
|
288
|
+
contentAri: historyItem.contentAri
|
|
287
289
|
});
|
|
288
290
|
case 8:
|
|
289
291
|
article = _context.sent;
|
|
290
|
-
return _context.abrupt("break",
|
|
292
|
+
return _context.abrupt("break", 19);
|
|
291
293
|
case 10:
|
|
292
294
|
if (onGetWhatsNewArticle) {
|
|
293
295
|
_context.next = 12;
|
|
@@ -299,7 +301,7 @@ var NavigationContextProvider = exports.NavigationContextProvider = function Nav
|
|
|
299
301
|
_context.next = 14;
|
|
300
302
|
break;
|
|
301
303
|
}
|
|
302
|
-
return _context.abrupt("break",
|
|
304
|
+
return _context.abrupt("break", 19);
|
|
303
305
|
case 14:
|
|
304
306
|
_context.next = 16;
|
|
305
307
|
return onGetWhatsNewArticle({
|
|
@@ -308,26 +310,26 @@ var NavigationContextProvider = exports.NavigationContextProvider = function Nav
|
|
|
308
310
|
});
|
|
309
311
|
case 16:
|
|
310
312
|
article = _context.sent;
|
|
311
|
-
return _context.abrupt("break",
|
|
313
|
+
return _context.abrupt("break", 19);
|
|
312
314
|
case 18:
|
|
313
315
|
throw new Error('onGetHelpArticle prop not defined');
|
|
314
|
-
case
|
|
316
|
+
case 19:
|
|
315
317
|
return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread({}, historyItem), article && {
|
|
316
318
|
article: article
|
|
317
319
|
}), {}, {
|
|
318
320
|
state: _Requests.REQUEST_STATE.done
|
|
319
321
|
}));
|
|
320
|
-
case
|
|
321
|
-
_context.prev =
|
|
322
|
+
case 22:
|
|
323
|
+
_context.prev = 22;
|
|
322
324
|
_context.t1 = _context["catch"](0);
|
|
323
325
|
return _context.abrupt("return", _objectSpread(_objectSpread({}, historyItem), {}, {
|
|
324
326
|
state: _Requests.REQUEST_STATE.error
|
|
325
327
|
}));
|
|
326
|
-
case
|
|
328
|
+
case 25:
|
|
327
329
|
case "end":
|
|
328
330
|
return _context.stop();
|
|
329
331
|
}
|
|
330
|
-
}, _callee, null, [[0,
|
|
332
|
+
}, _callee, null, [[0, 22]]);
|
|
331
333
|
}));
|
|
332
334
|
return function (_x) {
|
|
333
335
|
return _ref5.apply(this, arguments);
|
package/dist/es2019/analytics.js
CHANGED
|
@@ -8,7 +8,7 @@ import { LoadingErrorMessage, LoadingErrorButtonContainer } from './styled';
|
|
|
8
8
|
const ANALYTICS_CONTEXT_DATA = {
|
|
9
9
|
componentName: 'ArticleLoadingFail',
|
|
10
10
|
packageName: "@atlaskit/help",
|
|
11
|
-
packageVersion: "7.
|
|
11
|
+
packageVersion: "7.9.0"
|
|
12
12
|
};
|
|
13
13
|
export const ArticleLoadingFail = ({
|
|
14
14
|
onTryAgainButtonClick,
|
|
@@ -6,7 +6,7 @@ import { messages } from '../../../../messages';
|
|
|
6
6
|
const ANALYTICS_CONTEXT_DATA = {
|
|
7
7
|
componentName: 'ArticleWasHelpfulNoButton',
|
|
8
8
|
packageName: "@atlaskit/help",
|
|
9
|
-
packageVersion: "7.
|
|
9
|
+
packageVersion: "7.9.0"
|
|
10
10
|
};
|
|
11
11
|
export const ArticleWasHelpfulNoButton = ({
|
|
12
12
|
isSelected = false,
|
|
@@ -6,7 +6,7 @@ import { messages } from '../../../../messages';
|
|
|
6
6
|
const ANALYTICS_CONTEXT_DATA = {
|
|
7
7
|
componentName: 'ArticleWasHelpfulYesButton',
|
|
8
8
|
packageName: "@atlaskit/help",
|
|
9
|
-
packageVersion: "7.
|
|
9
|
+
packageVersion: "7.9.0"
|
|
10
10
|
};
|
|
11
11
|
export const ArticleWasHelpfulYesButton = ({
|
|
12
12
|
isSelected = false,
|
|
@@ -29,7 +29,7 @@ const FEEDBACK_REASON_TEXT_MAX_LENGTH = '16000';
|
|
|
29
29
|
const ANALYTICS_CONTEXT_DATA = {
|
|
30
30
|
componentName: 'ArticleWasHelpfulForm',
|
|
31
31
|
packageName: "@atlaskit/help",
|
|
32
|
-
packageVersion: "7.
|
|
32
|
+
packageVersion: "7.9.0"
|
|
33
33
|
};
|
|
34
34
|
const buttonStyles = css({
|
|
35
35
|
padding: '0',
|
|
@@ -52,14 +52,15 @@ export const HelpArticle = ({
|
|
|
52
52
|
}
|
|
53
53
|
openArticle({
|
|
54
54
|
id: articleData.id,
|
|
55
|
-
type: ARTICLE_TYPE.HELP_ARTICLE
|
|
55
|
+
type: ARTICLE_TYPE.HELP_ARTICLE,
|
|
56
|
+
contentAri: articleData.contentAri
|
|
56
57
|
});
|
|
57
58
|
}, [openArticle, onRelatedArticlesListItemClick]);
|
|
58
59
|
const handleOnRelatedArticlesShowMoreClick = useCallback((event, analyticsEvent, isCollapsed) => {
|
|
59
60
|
analyticsEvent.payload.attributes = {
|
|
60
61
|
componentName: 'Article',
|
|
61
62
|
packageName: "@atlaskit/help",
|
|
62
|
-
packageVersion: "7.
|
|
63
|
+
packageVersion: "7.9.0"
|
|
63
64
|
};
|
|
64
65
|
if (onRelatedArticlesShowMoreClick) {
|
|
65
66
|
onRelatedArticlesShowMoreClick(event, analyticsEvent, isCollapsed);
|
|
@@ -13,7 +13,7 @@ import { WhatsNewTypeTitle, WhatsNewTitleText, WhatsNewIconContainer, RelatedLin
|
|
|
13
13
|
const analyticsContextData = {
|
|
14
14
|
componentName: 'ArticlesListItem',
|
|
15
15
|
packageName: "@atlaskit/help",
|
|
16
|
-
packageVersion: "7.
|
|
16
|
+
packageVersion: "7.9.0"
|
|
17
17
|
};
|
|
18
18
|
export const WhatsNewArticle = ({
|
|
19
19
|
intl: {
|
|
@@ -4,11 +4,11 @@ import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
|
4
4
|
import ShortcutIcon from '@atlaskit/icon/core/migration/link-external--shortcut';
|
|
5
5
|
import { injectIntl } from 'react-intl-next';
|
|
6
6
|
import LikeIcon from '@atlaskit/icon/core/migration/thumbs-up--like';
|
|
7
|
-
import { ArticlesListItemWrapper, ArticlesListItemContainer, ArticlesListItemTitleText, ArticlesListItemDescription, ArticlesListItemLinkIcon, ArticlesListItemTrustFactor, ArticlesListItemViewCount, ArticlesListItemHelpfulCount, ArticlesListItemSource, ArticlesListItemLastModified, ArticlesListItemTitleSection } from './styled';
|
|
7
|
+
import { ArticlesListItemWrapper, ArticlesListItemContainer, ArticlesListItemTitleText, ArticlesListItemDescription, ArticlesListItemLinkIcon, ArticlesListItemTrustFactor, ArticlesListItemViewCount, ArticlesListItemHelpfulCount, ArticlesListItemSource, ArticlesListItemLastModified, ArticlesListItemTitleSection, ArticlesListItemDescriptionHighlight } from './styled';
|
|
8
8
|
const ANALYTICS_CONTEXT_DATA = {
|
|
9
9
|
componentName: 'ArticlesListItem',
|
|
10
10
|
packageName: "@atlaskit/help",
|
|
11
|
-
packageVersion: "7.
|
|
11
|
+
packageVersion: "7.9.0"
|
|
12
12
|
};
|
|
13
13
|
const highlightText = text => {
|
|
14
14
|
if (!text) {
|
|
@@ -18,9 +18,9 @@ const highlightText = text => {
|
|
|
18
18
|
const sections = [];
|
|
19
19
|
html.forEach((node, i) => {
|
|
20
20
|
if (node.nodeName === 'SPAN') {
|
|
21
|
-
sections.push( /*#__PURE__*/React.createElement("
|
|
21
|
+
sections.push( /*#__PURE__*/React.createElement("b", null, /*#__PURE__*/React.createElement(ArticlesListItemDescriptionHighlight, {
|
|
22
22
|
key: i
|
|
23
|
-
}, node.textContent));
|
|
23
|
+
}, node.textContent)));
|
|
24
24
|
} else {
|
|
25
25
|
sections.push(node.textContent);
|
|
26
26
|
}
|
|
@@ -63,7 +63,7 @@ export const ArticlesListItem = ({
|
|
|
63
63
|
role: "button",
|
|
64
64
|
href: href,
|
|
65
65
|
onClick: handleOnClick
|
|
66
|
-
}, /*#__PURE__*/React.createElement(ArticlesListItemContainer, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleSection, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleText, null,
|
|
66
|
+
}, /*#__PURE__*/React.createElement(ArticlesListItemContainer, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleSection, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleText, null, title), isLastPublishedVisible && /*#__PURE__*/React.createElement(ArticlesListItemLastModified, null, "Last modified: ", lastPublished)), href && /*#__PURE__*/React.createElement(ArticlesListItemLinkIcon, null, /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
67
67
|
LEGACY_size: "small",
|
|
68
68
|
label: "",
|
|
69
69
|
color: `var(--ds-icon-subtle, ${colors.N90})`,
|
|
@@ -139,4 +139,10 @@ export const ArticlesListItemLastModified = styled.div({
|
|
|
139
139
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
140
140
|
color: `var(--ds-text-subtlest, ${colors.N400A})`,
|
|
141
141
|
padding: `${"var(--ds-space-050, 4px)"} 0`
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
|
|
145
|
+
export const ArticlesListItemDescriptionHighlight = styled.mark({
|
|
146
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
147
|
+
backgroundColor: `var(--ds-background-accent-yellow-subtlest, ${colors.Y100})`
|
|
142
148
|
});
|
|
@@ -7,7 +7,7 @@ import { HelpContentButtonContainer, HelpContentButtonIcon, HelpContentButtonTex
|
|
|
7
7
|
const analitycsContextData = {
|
|
8
8
|
componentName: 'HelpContentButton',
|
|
9
9
|
packageName: "@atlaskit/help",
|
|
10
|
-
packageVersion: "7.
|
|
10
|
+
packageVersion: "7.9.0"
|
|
11
11
|
};
|
|
12
12
|
const HelpContentButton = ({
|
|
13
13
|
id = '',
|
|
@@ -20,7 +20,7 @@ import { usePrevious } from '../../util/hooks/previous';
|
|
|
20
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
21
|
import { css, jsx } from '@emotion/react';
|
|
22
22
|
const packageName = "@atlaskit/help";
|
|
23
|
-
const packageVersion = "7.
|
|
23
|
+
const packageVersion = "7.9.0";
|
|
24
24
|
const buttonStyles = css({
|
|
25
25
|
padding: '0',
|
|
26
26
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -21,7 +21,7 @@ import { SearchInputContainer, SearchIconContainer, CloseButtonAndSpinnerContain
|
|
|
21
21
|
const ANALYTICS_CONTEXT_DATA = {
|
|
22
22
|
componentName: 'searchInput',
|
|
23
23
|
packageName: "@atlaskit/help",
|
|
24
|
-
packageVersion: "7.
|
|
24
|
+
packageVersion: "7.9.0"
|
|
25
25
|
};
|
|
26
26
|
const buttonStyles = css({
|
|
27
27
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -52,7 +52,8 @@ export const SearchResults = () => {
|
|
|
52
52
|
if (!openExternalSearchUrlInNewTab || articleData.href == null) {
|
|
53
53
|
openArticle({
|
|
54
54
|
id: articleData.id,
|
|
55
|
-
type: ARTICLE_TYPE.HELP_ARTICLE
|
|
55
|
+
type: ARTICLE_TYPE.HELP_ARTICLE,
|
|
56
|
+
contentAri: articleData.contentAri
|
|
56
57
|
});
|
|
57
58
|
} else {
|
|
58
59
|
window.open(articleData.href, '_blank');
|
|
@@ -11,7 +11,7 @@ import { ARTICLE_TYPE } from '../../../model/Help';
|
|
|
11
11
|
const ANALYTICS_CONTEXT_DATA = {
|
|
12
12
|
componentName: 'WhatsNewButton',
|
|
13
13
|
packageName: "@atlaskit/help",
|
|
14
|
-
packageVersion: "7.
|
|
14
|
+
packageVersion: "7.9.0"
|
|
15
15
|
};
|
|
16
16
|
export const WhatsNewButton = ({
|
|
17
17
|
productName,
|
|
@@ -8,7 +8,7 @@ import { WhatsNewResultListItemWrapper, WhatsNewResultListItemTitleContainer, Wh
|
|
|
8
8
|
const ANALYTICS_CONTEXT_DATA = {
|
|
9
9
|
componentName: 'ArticlesListItem',
|
|
10
10
|
packageName: "@atlaskit/help",
|
|
11
|
-
packageVersion: "7.
|
|
11
|
+
packageVersion: "7.9.0"
|
|
12
12
|
};
|
|
13
13
|
export const WhatsNewResultListItem = ({
|
|
14
14
|
intl: {
|
|
@@ -14,13 +14,14 @@ const DEFAULT_ARTICLE_ID = {
|
|
|
14
14
|
type: ARTICLE_TYPE.HELP_ARTICLE
|
|
15
15
|
};
|
|
16
16
|
export const [useNavigationContext, CtxProvider] = createCtx();
|
|
17
|
-
const getNewHistoryItem = (id, type) => {
|
|
17
|
+
const getNewHistoryItem = (id, type, contentAri) => {
|
|
18
18
|
let uid = Math.floor(Math.random() * Math.pow(10, 17));
|
|
19
19
|
const newHistoryItem = {
|
|
20
20
|
uid,
|
|
21
21
|
id,
|
|
22
22
|
type,
|
|
23
|
-
state: REQUEST_STATE.load
|
|
23
|
+
state: REQUEST_STATE.load,
|
|
24
|
+
contentAri
|
|
24
25
|
};
|
|
25
26
|
return newHistoryItem;
|
|
26
27
|
};
|
|
@@ -129,7 +130,7 @@ const navigationReducer = ({
|
|
|
129
130
|
} else {
|
|
130
131
|
newState = {
|
|
131
132
|
articleId: newArticleId,
|
|
132
|
-
history: [...currentHistory, getNewHistoryItem(newArticleId.id, newArticleId.type)],
|
|
133
|
+
history: [...currentHistory, getNewHistoryItem(newArticleId.id, newArticleId.type, newArticleId.contentAri)],
|
|
133
134
|
view: getViewForArticleId(newArticleId)
|
|
134
135
|
};
|
|
135
136
|
}
|
|
@@ -139,7 +140,7 @@ const navigationReducer = ({
|
|
|
139
140
|
} = action;
|
|
140
141
|
newState = {
|
|
141
142
|
articleId: currentArticleId,
|
|
142
|
-
history: [...currentHistory, getNewHistoryItem(newArticleId.id, newArticleId.type)],
|
|
143
|
+
history: [...currentHistory, getNewHistoryItem(newArticleId.id, newArticleId.type, newArticleId.contentAri)],
|
|
143
144
|
view: getViewForArticleId(currentArticleId)
|
|
144
145
|
};
|
|
145
146
|
} else if (action.type === 'updateHistoryItem' && action.payload) {
|
|
@@ -234,7 +235,7 @@ export const NavigationContextProvider = ({
|
|
|
234
235
|
view: currentView
|
|
235
236
|
}, dispatchNavigationAction] = useReducer(navigationReducer, {
|
|
236
237
|
articleId: propsArticleId,
|
|
237
|
-
history: !isEqual(propsArticleId, DEFAULT_ARTICLE_ID) && propsHistory.length === 0 ? [getNewHistoryItem(propsArticleId.id, propsArticleId.type)] : propsHistory,
|
|
238
|
+
history: !isEqual(propsArticleId, DEFAULT_ARTICLE_ID) && propsHistory.length === 0 ? [getNewHistoryItem(propsArticleId.id, propsArticleId.type, propsArticleId.contentAri)] : propsHistory,
|
|
238
239
|
view: VIEW.DEFAULT_CONTENT
|
|
239
240
|
});
|
|
240
241
|
const isOverlayVisible = useMemo(() => {
|
|
@@ -267,7 +268,8 @@ export const NavigationContextProvider = ({
|
|
|
267
268
|
}
|
|
268
269
|
article = await onGetHelpArticle({
|
|
269
270
|
id: historyItem.id,
|
|
270
|
-
type: historyItem.type
|
|
271
|
+
type: historyItem.type,
|
|
272
|
+
contentAri: historyItem.contentAri
|
|
271
273
|
});
|
|
272
274
|
break;
|
|
273
275
|
case ARTICLE_TYPE.WHATS_NEW:
|
|
@@ -284,7 +286,6 @@ export const NavigationContextProvider = ({
|
|
|
284
286
|
break;
|
|
285
287
|
default:
|
|
286
288
|
throw new Error('onGetHelpArticle prop not defined');
|
|
287
|
-
break;
|
|
288
289
|
}
|
|
289
290
|
return {
|
|
290
291
|
...historyItem,
|
package/dist/esm/analytics.js
CHANGED
|
@@ -8,7 +8,7 @@ import { LoadingErrorMessage, LoadingErrorButtonContainer } from './styled';
|
|
|
8
8
|
var ANALYTICS_CONTEXT_DATA = {
|
|
9
9
|
componentName: 'ArticleLoadingFail',
|
|
10
10
|
packageName: "@atlaskit/help",
|
|
11
|
-
packageVersion: "7.
|
|
11
|
+
packageVersion: "7.9.0"
|
|
12
12
|
};
|
|
13
13
|
export var ArticleLoadingFail = function ArticleLoadingFail(_ref) {
|
|
14
14
|
var onTryAgainButtonClick = _ref.onTryAgainButtonClick,
|
|
@@ -6,7 +6,7 @@ import { messages } from '../../../../messages';
|
|
|
6
6
|
var ANALYTICS_CONTEXT_DATA = {
|
|
7
7
|
componentName: 'ArticleWasHelpfulNoButton',
|
|
8
8
|
packageName: "@atlaskit/help",
|
|
9
|
-
packageVersion: "7.
|
|
9
|
+
packageVersion: "7.9.0"
|
|
10
10
|
};
|
|
11
11
|
export var ArticleWasHelpfulNoButton = function ArticleWasHelpfulNoButton(_ref) {
|
|
12
12
|
var _ref$isSelected = _ref.isSelected,
|
|
@@ -6,7 +6,7 @@ import { messages } from '../../../../messages';
|
|
|
6
6
|
var ANALYTICS_CONTEXT_DATA = {
|
|
7
7
|
componentName: 'ArticleWasHelpfulYesButton',
|
|
8
8
|
packageName: "@atlaskit/help",
|
|
9
|
-
packageVersion: "7.
|
|
9
|
+
packageVersion: "7.9.0"
|
|
10
10
|
};
|
|
11
11
|
export var ArticleWasHelpfulYesButton = function ArticleWasHelpfulYesButton(_ref) {
|
|
12
12
|
var _ref$isSelected = _ref.isSelected,
|
|
@@ -30,7 +30,7 @@ var FEEDBACK_REASON_TEXT_MAX_LENGTH = '16000';
|
|
|
30
30
|
var ANALYTICS_CONTEXT_DATA = {
|
|
31
31
|
componentName: 'ArticleWasHelpfulForm',
|
|
32
32
|
packageName: "@atlaskit/help",
|
|
33
|
-
packageVersion: "7.
|
|
33
|
+
packageVersion: "7.9.0"
|
|
34
34
|
};
|
|
35
35
|
var buttonStyles = css({
|
|
36
36
|
padding: '0',
|
|
@@ -48,14 +48,15 @@ export var HelpArticle = function HelpArticle(_ref) {
|
|
|
48
48
|
}
|
|
49
49
|
openArticle({
|
|
50
50
|
id: articleData.id,
|
|
51
|
-
type: ARTICLE_TYPE.HELP_ARTICLE
|
|
51
|
+
type: ARTICLE_TYPE.HELP_ARTICLE,
|
|
52
|
+
contentAri: articleData.contentAri
|
|
52
53
|
});
|
|
53
54
|
}, [openArticle, onRelatedArticlesListItemClick]);
|
|
54
55
|
var handleOnRelatedArticlesShowMoreClick = useCallback(function (event, analyticsEvent, isCollapsed) {
|
|
55
56
|
analyticsEvent.payload.attributes = {
|
|
56
57
|
componentName: 'Article',
|
|
57
58
|
packageName: "@atlaskit/help",
|
|
58
|
-
packageVersion: "7.
|
|
59
|
+
packageVersion: "7.9.0"
|
|
59
60
|
};
|
|
60
61
|
if (onRelatedArticlesShowMoreClick) {
|
|
61
62
|
onRelatedArticlesShowMoreClick(event, analyticsEvent, isCollapsed);
|
|
@@ -13,7 +13,7 @@ import { WhatsNewTypeTitle, WhatsNewTitleText, WhatsNewIconContainer, RelatedLin
|
|
|
13
13
|
var analyticsContextData = {
|
|
14
14
|
componentName: 'ArticlesListItem',
|
|
15
15
|
packageName: "@atlaskit/help",
|
|
16
|
-
packageVersion: "7.
|
|
16
|
+
packageVersion: "7.9.0"
|
|
17
17
|
};
|
|
18
18
|
export var WhatsNewArticle = function WhatsNewArticle(_ref) {
|
|
19
19
|
var formatMessage = _ref.intl.formatMessage,
|
|
@@ -4,11 +4,11 @@ import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
|
4
4
|
import ShortcutIcon from '@atlaskit/icon/core/migration/link-external--shortcut';
|
|
5
5
|
import { injectIntl } from 'react-intl-next';
|
|
6
6
|
import LikeIcon from '@atlaskit/icon/core/migration/thumbs-up--like';
|
|
7
|
-
import { ArticlesListItemWrapper, ArticlesListItemContainer, ArticlesListItemTitleText, ArticlesListItemDescription, ArticlesListItemLinkIcon, ArticlesListItemTrustFactor, ArticlesListItemViewCount, ArticlesListItemHelpfulCount, ArticlesListItemSource, ArticlesListItemLastModified, ArticlesListItemTitleSection } from './styled';
|
|
7
|
+
import { ArticlesListItemWrapper, ArticlesListItemContainer, ArticlesListItemTitleText, ArticlesListItemDescription, ArticlesListItemLinkIcon, ArticlesListItemTrustFactor, ArticlesListItemViewCount, ArticlesListItemHelpfulCount, ArticlesListItemSource, ArticlesListItemLastModified, ArticlesListItemTitleSection, ArticlesListItemDescriptionHighlight } from './styled';
|
|
8
8
|
var ANALYTICS_CONTEXT_DATA = {
|
|
9
9
|
componentName: 'ArticlesListItem',
|
|
10
10
|
packageName: "@atlaskit/help",
|
|
11
|
-
packageVersion: "7.
|
|
11
|
+
packageVersion: "7.9.0"
|
|
12
12
|
};
|
|
13
13
|
var highlightText = function highlightText(text) {
|
|
14
14
|
if (!text) {
|
|
@@ -18,9 +18,9 @@ var highlightText = function highlightText(text) {
|
|
|
18
18
|
var sections = [];
|
|
19
19
|
html.forEach(function (node, i) {
|
|
20
20
|
if (node.nodeName === 'SPAN') {
|
|
21
|
-
sections.push( /*#__PURE__*/React.createElement("
|
|
21
|
+
sections.push( /*#__PURE__*/React.createElement("b", null, /*#__PURE__*/React.createElement(ArticlesListItemDescriptionHighlight, {
|
|
22
22
|
key: i
|
|
23
|
-
}, node.textContent));
|
|
23
|
+
}, node.textContent)));
|
|
24
24
|
} else {
|
|
25
25
|
sections.push(node.textContent);
|
|
26
26
|
}
|
|
@@ -62,7 +62,7 @@ export var ArticlesListItem = function ArticlesListItem(_ref) {
|
|
|
62
62
|
role: "button",
|
|
63
63
|
href: href,
|
|
64
64
|
onClick: handleOnClick
|
|
65
|
-
}, /*#__PURE__*/React.createElement(ArticlesListItemContainer, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleSection, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleText, null,
|
|
65
|
+
}, /*#__PURE__*/React.createElement(ArticlesListItemContainer, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleSection, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleText, null, title), isLastPublishedVisible && /*#__PURE__*/React.createElement(ArticlesListItemLastModified, null, "Last modified: ", lastPublished)), href && /*#__PURE__*/React.createElement(ArticlesListItemLinkIcon, null, /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
66
66
|
LEGACY_size: "small",
|
|
67
67
|
label: "",
|
|
68
68
|
color: "var(--ds-icon-subtle, ".concat(colors.N90, ")"),
|
|
@@ -141,4 +141,10 @@ export var ArticlesListItemLastModified = styled.div({
|
|
|
141
141
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
142
142
|
color: "var(--ds-text-subtlest, ".concat(colors.N400A, ")"),
|
|
143
143
|
padding: "var(--ds-space-050, 4px)".concat(" 0")
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
|
|
147
|
+
export var ArticlesListItemDescriptionHighlight = styled.mark({
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
149
|
+
backgroundColor: "var(--ds-background-accent-yellow-subtlest, ".concat(colors.Y100, ")")
|
|
144
150
|
});
|
|
@@ -7,7 +7,7 @@ import { HelpContentButtonContainer, HelpContentButtonIcon, HelpContentButtonTex
|
|
|
7
7
|
var analitycsContextData = {
|
|
8
8
|
componentName: 'HelpContentButton',
|
|
9
9
|
packageName: "@atlaskit/help",
|
|
10
|
-
packageVersion: "7.
|
|
10
|
+
packageVersion: "7.9.0"
|
|
11
11
|
};
|
|
12
12
|
var HelpContentButton = function HelpContentButton(_ref) {
|
|
13
13
|
var _ref$id = _ref.id,
|
|
@@ -23,7 +23,7 @@ import { usePrevious } from '../../util/hooks/previous';
|
|
|
23
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
24
24
|
import { css, jsx } from '@emotion/react';
|
|
25
25
|
var packageName = "@atlaskit/help";
|
|
26
|
-
var packageVersion = "7.
|
|
26
|
+
var packageVersion = "7.9.0";
|
|
27
27
|
var buttonStyles = css({
|
|
28
28
|
padding: '0',
|
|
29
29
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -21,7 +21,7 @@ import { SearchInputContainer, SearchIconContainer, CloseButtonAndSpinnerContain
|
|
|
21
21
|
var ANALYTICS_CONTEXT_DATA = {
|
|
22
22
|
componentName: 'searchInput',
|
|
23
23
|
packageName: "@atlaskit/help",
|
|
24
|
-
packageVersion: "7.
|
|
24
|
+
packageVersion: "7.9.0"
|
|
25
25
|
};
|
|
26
26
|
var buttonStyles = css({
|
|
27
27
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -53,7 +53,8 @@ export var SearchResults = function SearchResults() {
|
|
|
53
53
|
if (!openExternalSearchUrlInNewTab || articleData.href == null) {
|
|
54
54
|
openArticle({
|
|
55
55
|
id: articleData.id,
|
|
56
|
-
type: ARTICLE_TYPE.HELP_ARTICLE
|
|
56
|
+
type: ARTICLE_TYPE.HELP_ARTICLE,
|
|
57
|
+
contentAri: articleData.contentAri
|
|
57
58
|
});
|
|
58
59
|
} else {
|
|
59
60
|
window.open(articleData.href, '_blank');
|
|
@@ -11,7 +11,7 @@ import { ARTICLE_TYPE } from '../../../model/Help';
|
|
|
11
11
|
var ANALYTICS_CONTEXT_DATA = {
|
|
12
12
|
componentName: 'WhatsNewButton',
|
|
13
13
|
packageName: "@atlaskit/help",
|
|
14
|
-
packageVersion: "7.
|
|
14
|
+
packageVersion: "7.9.0"
|
|
15
15
|
};
|
|
16
16
|
export var WhatsNewButton = function WhatsNewButton(_ref) {
|
|
17
17
|
var productName = _ref.productName,
|
package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { WhatsNewResultListItemWrapper, WhatsNewResultListItemTitleContainer, Wh
|
|
|
8
8
|
var ANALYTICS_CONTEXT_DATA = {
|
|
9
9
|
componentName: 'ArticlesListItem',
|
|
10
10
|
packageName: "@atlaskit/help",
|
|
11
|
-
packageVersion: "7.
|
|
11
|
+
packageVersion: "7.9.0"
|
|
12
12
|
};
|
|
13
13
|
export var WhatsNewResultListItem = function WhatsNewResultListItem(_ref) {
|
|
14
14
|
var formatMessage = _ref.intl.formatMessage,
|
|
@@ -28,13 +28,14 @@ var _createCtx = createCtx(),
|
|
|
28
28
|
useNavigationContext = _createCtx2[0],
|
|
29
29
|
CtxProvider = _createCtx2[1];
|
|
30
30
|
export { useNavigationContext, CtxProvider };
|
|
31
|
-
var getNewHistoryItem = function getNewHistoryItem(id, type) {
|
|
31
|
+
var getNewHistoryItem = function getNewHistoryItem(id, type, contentAri) {
|
|
32
32
|
var uid = Math.floor(Math.random() * Math.pow(10, 17));
|
|
33
33
|
var newHistoryItem = {
|
|
34
34
|
uid: uid,
|
|
35
35
|
id: id,
|
|
36
36
|
type: type,
|
|
37
|
-
state: REQUEST_STATE.load
|
|
37
|
+
state: REQUEST_STATE.load,
|
|
38
|
+
contentAri: contentAri
|
|
38
39
|
};
|
|
39
40
|
return newHistoryItem;
|
|
40
41
|
};
|
|
@@ -139,7 +140,7 @@ var navigationReducer = function navigationReducer(_ref3, action) {
|
|
|
139
140
|
} else {
|
|
140
141
|
newState = {
|
|
141
142
|
articleId: newArticleId,
|
|
142
|
-
history: [].concat(_toConsumableArray(currentHistory), [getNewHistoryItem(newArticleId.id, newArticleId.type)]),
|
|
143
|
+
history: [].concat(_toConsumableArray(currentHistory), [getNewHistoryItem(newArticleId.id, newArticleId.type, newArticleId.contentAri)]),
|
|
143
144
|
view: getViewForArticleId(newArticleId)
|
|
144
145
|
};
|
|
145
146
|
}
|
|
@@ -147,7 +148,7 @@ var navigationReducer = function navigationReducer(_ref3, action) {
|
|
|
147
148
|
var _newArticleId = action.payload;
|
|
148
149
|
newState = {
|
|
149
150
|
articleId: currentArticleId,
|
|
150
|
-
history: [].concat(_toConsumableArray(currentHistory), [getNewHistoryItem(_newArticleId.id, _newArticleId.type)]),
|
|
151
|
+
history: [].concat(_toConsumableArray(currentHistory), [getNewHistoryItem(_newArticleId.id, _newArticleId.type, _newArticleId.contentAri)]),
|
|
151
152
|
view: getViewForArticleId(currentArticleId)
|
|
152
153
|
};
|
|
153
154
|
} else if (action.type === 'updateHistoryItem' && action.payload) {
|
|
@@ -225,7 +226,7 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref4)
|
|
|
225
226
|
propsHistory = navigationData.history;
|
|
226
227
|
var _useReducer = useReducer(navigationReducer, {
|
|
227
228
|
articleId: propsArticleId,
|
|
228
|
-
history: !isEqual(propsArticleId, DEFAULT_ARTICLE_ID) && propsHistory.length === 0 ? [getNewHistoryItem(propsArticleId.id, propsArticleId.type)] : propsHistory,
|
|
229
|
+
history: !isEqual(propsArticleId, DEFAULT_ARTICLE_ID) && propsHistory.length === 0 ? [getNewHistoryItem(propsArticleId.id, propsArticleId.type, propsArticleId.contentAri)] : propsHistory,
|
|
229
230
|
view: VIEW.DEFAULT_CONTENT
|
|
230
231
|
}),
|
|
231
232
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
@@ -274,11 +275,12 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref4)
|
|
|
274
275
|
_context.next = 8;
|
|
275
276
|
return onGetHelpArticle({
|
|
276
277
|
id: historyItem.id,
|
|
277
|
-
type: historyItem.type
|
|
278
|
+
type: historyItem.type,
|
|
279
|
+
contentAri: historyItem.contentAri
|
|
278
280
|
});
|
|
279
281
|
case 8:
|
|
280
282
|
article = _context.sent;
|
|
281
|
-
return _context.abrupt("break",
|
|
283
|
+
return _context.abrupt("break", 19);
|
|
282
284
|
case 10:
|
|
283
285
|
if (onGetWhatsNewArticle) {
|
|
284
286
|
_context.next = 12;
|
|
@@ -290,7 +292,7 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref4)
|
|
|
290
292
|
_context.next = 14;
|
|
291
293
|
break;
|
|
292
294
|
}
|
|
293
|
-
return _context.abrupt("break",
|
|
295
|
+
return _context.abrupt("break", 19);
|
|
294
296
|
case 14:
|
|
295
297
|
_context.next = 16;
|
|
296
298
|
return onGetWhatsNewArticle({
|
|
@@ -299,26 +301,26 @@ export var NavigationContextProvider = function NavigationContextProvider(_ref4)
|
|
|
299
301
|
});
|
|
300
302
|
case 16:
|
|
301
303
|
article = _context.sent;
|
|
302
|
-
return _context.abrupt("break",
|
|
304
|
+
return _context.abrupt("break", 19);
|
|
303
305
|
case 18:
|
|
304
306
|
throw new Error('onGetHelpArticle prop not defined');
|
|
305
|
-
case
|
|
307
|
+
case 19:
|
|
306
308
|
return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread({}, historyItem), article && {
|
|
307
309
|
article: article
|
|
308
310
|
}), {}, {
|
|
309
311
|
state: REQUEST_STATE.done
|
|
310
312
|
}));
|
|
311
|
-
case
|
|
312
|
-
_context.prev =
|
|
313
|
+
case 22:
|
|
314
|
+
_context.prev = 22;
|
|
313
315
|
_context.t1 = _context["catch"](0);
|
|
314
316
|
return _context.abrupt("return", _objectSpread(_objectSpread({}, historyItem), {}, {
|
|
315
317
|
state: REQUEST_STATE.error
|
|
316
318
|
}));
|
|
317
|
-
case
|
|
319
|
+
case 25:
|
|
318
320
|
case "end":
|
|
319
321
|
return _context.stop();
|
|
320
322
|
}
|
|
321
|
-
}, _callee, null, [[0,
|
|
323
|
+
}, _callee, null, [[0, 22]]);
|
|
322
324
|
}));
|
|
323
325
|
return function (_x) {
|
|
324
326
|
return _ref5.apply(this, arguments);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as x from '@atlaskit/analytics-next';
|
|
3
|
-
export declare const withAnalyticsEvents: (createEventMap?: import("@atlaskit/analytics-next/types").CreateEventMap | undefined) => <Props
|
|
3
|
+
export declare const withAnalyticsEvents: (createEventMap?: import("@atlaskit/analytics-next/types").CreateEventMap | undefined) => <Props, Component>(WrappedComponent: import("react").ComponentType<x.WithAnalyticsEventsProps & Props> & Component) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Omit<Props, keyof x.WithAnalyticsEventsProps>>> & import("react").RefAttributes<any>>;
|
|
4
4
|
export declare const withAnalyticsContext: (defaultData?: any) => <Props, Component>(WrappedComponent: import("react").ComponentType<Props> & Component) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Props & x.WithContextProps>> & import("react").RefAttributes<any>>;
|
|
5
5
|
export declare const createAndFire: (payload: x.AnalyticsEventPayload) => (createAnalyticsEvent: x.CreateUIAnalyticsEvent) => x.UIAnalyticsEvent;
|
|
6
6
|
export declare const defaultAnalyticsAttributes: {
|
|
@@ -50,4 +50,8 @@ export declare const ArticlesListItemLastModified: import("@emotion/styled").Sty
|
|
|
50
50
|
theme?: import("@emotion/react").Theme | undefined;
|
|
51
51
|
as?: import("react").ElementType<any> | undefined;
|
|
52
52
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
53
|
+
export declare const ArticlesListItemDescriptionHighlight: import("@emotion/styled").StyledComponent<{
|
|
54
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
55
|
+
as?: import("react").ElementType<any> | undefined;
|
|
56
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
53
57
|
export {};
|
|
@@ -5,5 +5,5 @@ export type Props = HelpInterface & WithAnalyticsEventsProps;
|
|
|
5
5
|
export declare class Help extends React.PureComponent<Props> {
|
|
6
6
|
render(): JSX.Element;
|
|
7
7
|
}
|
|
8
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<
|
|
8
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<HelpInterface, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "analyticsContext" | keyof HelpInterface> & React.RefAttributes<any>>;
|
|
9
9
|
export default _default;
|
|
@@ -15,10 +15,12 @@ export interface HistoryItem {
|
|
|
15
15
|
state: REQUEST_STATE;
|
|
16
16
|
type: ARTICLE_TYPE;
|
|
17
17
|
article?: Article | WhatsNewArticle;
|
|
18
|
+
contentAri?: string;
|
|
18
19
|
}
|
|
19
20
|
export interface articleId {
|
|
20
21
|
id: string;
|
|
21
22
|
type: ARTICLE_TYPE;
|
|
23
|
+
contentAri?: string;
|
|
22
24
|
}
|
|
23
25
|
export interface Help {
|
|
24
26
|
header?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as x from '@atlaskit/analytics-next';
|
|
3
|
-
export declare const withAnalyticsEvents: (createEventMap?: import("@atlaskit/analytics-next/types").CreateEventMap | undefined) => <Props
|
|
3
|
+
export declare const withAnalyticsEvents: (createEventMap?: import("@atlaskit/analytics-next/types").CreateEventMap | undefined) => <Props, Component>(WrappedComponent: import("react").ComponentType<x.WithAnalyticsEventsProps & Props> & Component) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Omit<Props, keyof x.WithAnalyticsEventsProps>>> & import("react").RefAttributes<any>>;
|
|
4
4
|
export declare const withAnalyticsContext: (defaultData?: any) => <Props, Component>(WrappedComponent: import("react").ComponentType<Props> & Component) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Props & x.WithContextProps>> & import("react").RefAttributes<any>>;
|
|
5
5
|
export declare const createAndFire: (payload: x.AnalyticsEventPayload) => (createAnalyticsEvent: x.CreateUIAnalyticsEvent) => x.UIAnalyticsEvent;
|
|
6
6
|
export declare const defaultAnalyticsAttributes: {
|
|
@@ -50,4 +50,8 @@ export declare const ArticlesListItemLastModified: import("@emotion/styled").Sty
|
|
|
50
50
|
theme?: import("@emotion/react").Theme | undefined;
|
|
51
51
|
as?: import("react").ElementType<any> | undefined;
|
|
52
52
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
53
|
+
export declare const ArticlesListItemDescriptionHighlight: import("@emotion/styled").StyledComponent<{
|
|
54
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
55
|
+
as?: import("react").ElementType<any> | undefined;
|
|
56
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
53
57
|
export {};
|
|
@@ -5,5 +5,5 @@ export type Props = HelpInterface & WithAnalyticsEventsProps;
|
|
|
5
5
|
export declare class Help extends React.PureComponent<Props> {
|
|
6
6
|
render(): JSX.Element;
|
|
7
7
|
}
|
|
8
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<
|
|
8
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<HelpInterface, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "analyticsContext" | keyof HelpInterface> & React.RefAttributes<any>>;
|
|
9
9
|
export default _default;
|
|
@@ -15,10 +15,12 @@ export interface HistoryItem {
|
|
|
15
15
|
state: REQUEST_STATE;
|
|
16
16
|
type: ARTICLE_TYPE;
|
|
17
17
|
article?: Article | WhatsNewArticle;
|
|
18
|
+
contentAri?: string;
|
|
18
19
|
}
|
|
19
20
|
export interface articleId {
|
|
20
21
|
id: string;
|
|
21
22
|
type: ARTICLE_TYPE;
|
|
23
|
+
contentAri?: string;
|
|
22
24
|
}
|
|
23
25
|
export interface Help {
|
|
24
26
|
header?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/help",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.9.0",
|
|
4
4
|
"description": "A cross-product help component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
"@atlaskit/form": "^10.5.0",
|
|
45
45
|
"@atlaskit/help-article": "^4.2.0",
|
|
46
46
|
"@atlaskit/help-layout": "^4.3.0",
|
|
47
|
-
"@atlaskit/icon": "^22.
|
|
48
|
-
"@atlaskit/notification-indicator": "^9.
|
|
47
|
+
"@atlaskit/icon": "^22.22.0",
|
|
48
|
+
"@atlaskit/notification-indicator": "^9.4.0",
|
|
49
49
|
"@atlaskit/notification-log-client": "^6.1.0",
|
|
50
50
|
"@atlaskit/radio": "^6.5.0",
|
|
51
51
|
"@atlaskit/section-message": "^6.6.0",
|
|
52
|
-
"@atlaskit/select": "^18.
|
|
52
|
+
"@atlaskit/select": "^18.1.0",
|
|
53
53
|
"@atlaskit/spinner": "^16.3.0",
|
|
54
54
|
"@atlaskit/textarea": "^5.6.0",
|
|
55
55
|
"@atlaskit/textfield": "^6.5.0",
|
|
56
|
-
"@atlaskit/theme": "^13.
|
|
56
|
+
"@atlaskit/theme": "^13.1.0",
|
|
57
57
|
"@atlaskit/tokens": "^2.0.0",
|
|
58
58
|
"@atlaskit/tooltip": "^18.8.0",
|
|
59
59
|
"@babel/runtime": "^7.0.0",
|