@atlaskit/help 7.3.3 → 7.4.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 (55) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/analytics.js +1 -1
  3. package/dist/cjs/components/Article/ArticleLoadingFail/index.js +1 -1
  4. package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +1 -1
  5. package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +1 -1
  6. package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/index.js +1 -1
  7. package/dist/cjs/components/Article/HelpArticle/index.js +1 -1
  8. package/dist/cjs/components/Article/WhatsNewArticle/index.js +1 -1
  9. package/dist/cjs/components/ArticlesList/ArticlesList.js +8 -2
  10. package/dist/cjs/components/ArticlesList/ArticlesListItem/index.js +19 -4
  11. package/dist/cjs/components/ArticlesList/ArticlesListItem/styled.js +41 -7
  12. package/dist/cjs/components/HelpContentButton/index.js +1 -1
  13. package/dist/cjs/components/RelatedArticles/index.js +1 -1
  14. package/dist/cjs/components/Search/SearchInput/index.js +1 -1
  15. package/dist/cjs/components/WhatsNew/WhatsNewButton/index.js +1 -1
  16. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +1 -1
  17. package/dist/es2019/analytics.js +1 -1
  18. package/dist/es2019/components/Article/ArticleLoadingFail/index.js +1 -1
  19. package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +1 -1
  20. package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +1 -1
  21. package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/index.js +1 -1
  22. package/dist/es2019/components/Article/HelpArticle/index.js +1 -1
  23. package/dist/es2019/components/Article/WhatsNewArticle/index.js +1 -1
  24. package/dist/es2019/components/ArticlesList/ArticlesList.js +8 -2
  25. package/dist/es2019/components/ArticlesList/ArticlesListItem/index.js +20 -5
  26. package/dist/es2019/components/ArticlesList/ArticlesListItem/styled.js +40 -6
  27. package/dist/es2019/components/HelpContentButton/index.js +1 -1
  28. package/dist/es2019/components/RelatedArticles/index.js +1 -1
  29. package/dist/es2019/components/Search/SearchInput/index.js +1 -1
  30. package/dist/es2019/components/WhatsNew/WhatsNewButton/index.js +1 -1
  31. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +1 -1
  32. package/dist/esm/analytics.js +1 -1
  33. package/dist/esm/components/Article/ArticleLoadingFail/index.js +1 -1
  34. package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +1 -1
  35. package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +1 -1
  36. package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/index.js +1 -1
  37. package/dist/esm/components/Article/HelpArticle/index.js +1 -1
  38. package/dist/esm/components/Article/WhatsNewArticle/index.js +1 -1
  39. package/dist/esm/components/ArticlesList/ArticlesList.js +8 -2
  40. package/dist/esm/components/ArticlesList/ArticlesListItem/index.js +20 -5
  41. package/dist/esm/components/ArticlesList/ArticlesListItem/styled.js +40 -6
  42. package/dist/esm/components/HelpContentButton/index.js +1 -1
  43. package/dist/esm/components/RelatedArticles/index.js +1 -1
  44. package/dist/esm/components/Search/SearchInput/index.js +1 -1
  45. package/dist/esm/components/WhatsNew/WhatsNewButton/index.js +1 -1
  46. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +1 -1
  47. package/dist/types/components/ArticlesList/ArticlesList.d.ts +1 -1
  48. package/dist/types/components/ArticlesList/ArticlesListItem/index.d.ts +3 -3
  49. package/dist/types/components/ArticlesList/ArticlesListItem/styled.d.ts +25 -1
  50. package/dist/types/model/Article.d.ts +6 -1
  51. package/dist/types-ts4.5/components/ArticlesList/ArticlesList.d.ts +1 -1
  52. package/dist/types-ts4.5/components/ArticlesList/ArticlesListItem/index.d.ts +3 -3
  53. package/dist/types-ts4.5/components/ArticlesList/ArticlesListItem/styled.d.ts +25 -1
  54. package/dist/types-ts4.5/model/Article.d.ts +6 -1
  55. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/help
2
2
 
3
+ ## 7.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#101167](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101167)
8
+ [`52a888c912e8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/52a888c912e8) -
9
+ [ux] Display 4 extra article details in Article search display
10
+
11
+ 1. Last published
12
+
13
+ 2. Content source
14
+
15
+ 3. Helpful count
16
+
17
+ 4. View count
18
+
19
+ All changes are backward compatible
20
+
3
21
  ## 7.3.3
4
22
 
5
23
  ### Patch Changes
@@ -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.3.3"
17
+ packageVersion: "7.4.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.3.3"
18
+ packageVersion: "7.4.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.3.3"
16
+ packageVersion: "7.4.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.3.3"
16
+ packageVersion: "7.4.0"
17
17
  };
18
18
  var ArticleWasHelpfulYesButton = exports.ArticleWasHelpfulYesButton = function ArticleWasHelpfulYesButton(_ref) {
19
19
  var _ref$isSelected = _ref.isSelected,
@@ -37,7 +37,7 @@ var FEEDBACK_REASON_TEXT_MAX_LENGTH = '16000';
37
37
  var ANALYTICS_CONTEXT_DATA = {
38
38
  componentName: 'ArticleWasHelpfulForm',
39
39
  packageName: "@atlaskit/help",
40
- packageVersion: "7.3.3"
40
+ packageVersion: "7.4.0"
41
41
  };
42
42
  var ArticleWasHelpfulForm = exports.ArticleWasHelpfulForm = function ArticleWasHelpfulForm(_ref) {
43
43
  var onWasHelpfulSubmit = _ref.onWasHelpfulSubmit,
@@ -64,7 +64,7 @@ var HelpArticle = exports.HelpArticle = function HelpArticle(_ref) {
64
64
  analyticsEvent.payload.attributes = {
65
65
  componentName: 'Article',
66
66
  packageName: "@atlaskit/help",
67
- packageVersion: "7.3.3"
67
+ packageVersion: "7.4.0"
68
68
  };
69
69
  if (onRelatedArticlesShowMoreClick) {
70
70
  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.3.3"
25
+ packageVersion: "7.4.0"
26
26
  };
27
27
  var WhatsNewArticle = exports.WhatsNewArticle = function WhatsNewArticle(_ref) {
28
28
  var formatMessage = _ref.intl.formatMessage,
@@ -46,7 +46,10 @@ var articlesList = function articlesList(_ref) {
46
46
  title: article.title,
47
47
  description: article.description,
48
48
  key: article.id,
49
- href: article.href
49
+ href: article.href,
50
+ trustFactors: article.trustFactors,
51
+ source: article.source,
52
+ lastPublished: article.lastPublished
50
53
  });
51
54
  })), /*#__PURE__*/_react.default.createElement(_reactAnimateHeight.default, {
52
55
  duration: _constants.ANIMATE_HEIGHT_TRANSITION_DURATION_MS,
@@ -64,7 +67,10 @@ var articlesList = function articlesList(_ref) {
64
67
  title: article.title,
65
68
  description: article.description,
66
69
  key: article.id,
67
- href: article.href
70
+ href: article.href,
71
+ trustFactors: article.trustFactors,
72
+ source: article.source,
73
+ lastPublished: article.lastPublished
68
74
  });
69
75
  })));
70
76
  };
@@ -11,13 +11,14 @@ var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
11
11
  var _analyticsNext = require("@atlaskit/analytics-next");
12
12
  var _shortcut = _interopRequireDefault(require("@atlaskit/icon/glyph/shortcut"));
13
13
  var _reactIntlNext = require("react-intl-next");
14
+ var _like = _interopRequireDefault(require("@atlaskit/icon/glyph/like"));
14
15
  var _styled = require("./styled");
15
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
18
  var ANALYTICS_CONTEXT_DATA = {
18
19
  componentName: 'ArticlesListItem',
19
20
  packageName: "@atlaskit/help",
20
- packageVersion: "7.3.3"
21
+ packageVersion: "7.4.0"
21
22
  };
22
23
  var ArticlesListItem = exports.ArticlesListItem = function ArticlesListItem(_ref) {
23
24
  var styles = _ref.styles,
@@ -25,7 +26,10 @@ var ArticlesListItem = exports.ArticlesListItem = function ArticlesListItem(_ref
25
26
  description = _ref.description,
26
27
  _ref$href = _ref.href,
27
28
  href = _ref$href === void 0 ? '' : _ref$href,
28
- onClick = _ref.onClick;
29
+ onClick = _ref.onClick,
30
+ trustFactors = _ref.trustFactors,
31
+ source = _ref.source,
32
+ lastPublished = _ref.lastPublished;
29
33
  var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
30
34
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
31
35
  var handleOnClick = function handleOnClick(event) {
@@ -37,18 +41,29 @@ var ArticlesListItem = exports.ArticlesListItem = function ArticlesListItem(_ref
37
41
  onClick(event, _analyticsEvent);
38
42
  }
39
43
  };
44
+
45
+ // Check if trust factors are available
46
+ var isNumViewsVisible = (trustFactors === null || trustFactors === void 0 ? void 0 : trustFactors.numViews) != null;
47
+ var isHelpfulCountVisible = (trustFactors === null || trustFactors === void 0 ? void 0 : trustFactors.helpfulCount) != null;
48
+ var isTrustFactorVisible = isNumViewsVisible || isHelpfulCountVisible;
49
+ // Check if source is available
50
+ var isSourceVisible = source != null;
51
+ var isLastPublishedVisible = lastPublished != null && lastPublished !== '';
40
52
  return /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemWrapper, {
41
53
  styles: styles,
42
54
  "aria-disabled": "false",
43
55
  role: "button",
44
56
  href: href,
45
57
  onClick: handleOnClick
46
- }, /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemContainer, null, /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemTitleText, null, title, href && /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemLinkIcon, null, /*#__PURE__*/_react.default.createElement(_shortcut.default, {
58
+ }, /*#__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(_shortcut.default, {
47
59
  size: "small",
48
60
  label: "",
49
61
  primaryColor: "var(--ds-icon-subtle, ".concat(colors.N90, ")"),
50
62
  secondaryColor: "var(--ds-icon-subtle, ".concat(colors.N90, ")")
51
- })))), /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemDescription, null, description));
63
+ }))), /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemDescription, null, description), isSourceVisible && /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemSource, null, source), isTrustFactorVisible && /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemTrustFactor, null, isNumViewsVisible && /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemViewCount, null, trustFactors.numViews, " views"), isHelpfulCountVisible && /*#__PURE__*/_react.default.createElement(_styled.ArticlesListItemHelpfulCount, null, /*#__PURE__*/_react.default.createElement(_like.default, {
64
+ label: "Like",
65
+ size: "small"
66
+ }), trustFactors.helpfulCount)));
52
67
  };
53
68
  var ArticlesListItemWithContext = function ArticlesListItemWithContext(props) {
54
69
  return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
@@ -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.ArticlesListItemTypeTitle = exports.ArticlesListItemTitleText = exports.ArticlesListItemLinkIcon = 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.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");
@@ -42,31 +42,65 @@ var ArticlesListItemWrapper = exports.ArticlesListItemWrapper = _styled.default.
42
42
  });
43
43
  var ArticlesListItemContainer = exports.ArticlesListItemContainer = _styled.default.div({
44
44
  width: '100%',
45
- whiteSpace: 'nowrap'
45
+ whiteSpace: 'nowrap',
46
+ display: 'flex'
47
+ });
48
+ var ArticlesListItemTitleSection = exports.ArticlesListItemTitleSection = _styled.default.div({
49
+ display: 'flex',
50
+ flexDirection: 'column',
51
+ flexGrow: 1
46
52
  });
47
53
  var ArticlesListItemTypeTitle = exports.ArticlesListItemTypeTitle = _styled.default.div({
48
54
  font: "var(--ds-font-body-small, ".concat(_typography.fontFallback.body.small, ")"),
49
55
  fontWeight: "var(--ds-font-weight-bold, bold)",
50
- color: "var(--ds-text-subtlest, ".concat(colors.N200, ")"),
51
- paddingBottom: "var(--ds-space-050, 4px)"
56
+ color: "var(--ds-text-subtlest, ".concat(colors.N200, ")")
52
57
  });
53
58
  var ArticlesListItemLinkIcon = exports.ArticlesListItemLinkIcon = _styled.default.span({
54
59
  alignSelf: 'auto',
55
60
  paddingInlineStart: "var(--ds-space-050, 4px)",
56
61
  verticalAlign: 'middle'
57
62
  });
58
- var ArticlesListItemTitleText = exports.ArticlesListItemTitleText = _styled.default.span({
63
+ var ArticlesListItemTitleText = exports.ArticlesListItemTitleText = _styled.default.p({
59
64
  textDecoration: 'none',
60
65
  color: "var(--ds-text, ".concat(colors.N800, ")"),
61
66
  font: "var(--ds-font-heading-xsmall, ".concat(_typography.fontFallback.heading.xsmall, ")"),
62
67
  display: 'inline-block',
63
68
  whiteSpace: 'normal',
64
69
  overflow: 'hidden',
65
- marginBottom: "var(--ds-space-100, 8px)"
70
+ marginBottom: "var(--ds-space-100, 4px)"
66
71
  });
67
72
  var ArticlesListItemDescription = exports.ArticlesListItemDescription = _styled.default.p({
68
73
  display: 'block',
69
74
  lineHeight: '20px',
70
75
  color: "var(--ds-text-subtle, ".concat(colors.N400, ")"),
71
- margin: 0
76
+ margin: 0,
77
+ paddingBottom: "var(--ds-space-025, 2px)"
78
+ });
79
+ var ArticlesListItemSource = exports.ArticlesListItemSource = _styled.default.div({
80
+ display: 'flex',
81
+ alignItems: 'center',
82
+ font: "var(--ds-font-heading-xxsmall, ".concat(_typography.fontFallback.heading.xxsmall, ")"),
83
+ color: "var(--ds-surface-hovered, ".concat(colors.N200, ")"),
84
+ padding: "var(--ds-space-050, 4px)".concat(" 0"),
85
+ fontWeight: "var(--ds-font-weight-bold, bold)",
86
+ textTransform: 'uppercase'
87
+ });
88
+ var ArticlesListItemTrustFactor = exports.ArticlesListItemTrustFactor = _styled.default.div({
89
+ display: 'flex',
90
+ alignItems: 'center',
91
+ font: "var(--ds-font-body-small, ".concat(_typography.fontFallback.body.small, ")"),
92
+ color: "var(--ds-background-accent-gray-subtlest-pressed, ".concat(colors.N400, ")"),
93
+ paddingTop: "var(--ds-space-025, 2px)"
94
+ });
95
+ var ArticlesListItemViewCount = exports.ArticlesListItemViewCount = _styled.default.span({
96
+ paddingRight: "var(--ds-space-100, 8px)"
97
+ });
98
+ var ArticlesListItemHelpfulCount = exports.ArticlesListItemHelpfulCount = _styled.default.span({
99
+ display: 'inline-flex',
100
+ paddingRight: "var(--ds-space-100, 8px)"
101
+ });
102
+ var ArticlesListItemLastModified = exports.ArticlesListItemLastModified = _styled.default.div({
103
+ font: "var(--ds-font-body-small, ".concat(_typography.fontFallback.body.small, ")"),
104
+ color: "var(--ds-text-subtle, ".concat(colors.N200, ")"),
105
+ padding: "var(--ds-space-050, 4px)".concat(" 0")
72
106
  });
@@ -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.3.3"
20
+ packageVersion: "7.4.0"
21
21
  };
22
22
  var HelpContentButton = function HelpContentButton(_ref) {
23
23
  var _ref$id = _ref.id,
@@ -28,7 +28,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
28
28
  /** @jsxFrag */
29
29
 
30
30
  var packageName = "@atlaskit/help";
31
- var packageVersion = "7.3.3";
31
+ var packageVersion = "7.4.0";
32
32
  var RelatedArticles = exports.RelatedArticles = function RelatedArticles(_ref) {
33
33
  var _ref$style = _ref.style,
34
34
  style = _ref$style === void 0 ? 'primary' : _ref$style,
@@ -27,7 +27,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
27
27
  var ANALYTICS_CONTEXT_DATA = {
28
28
  componentName: 'searchInput',
29
29
  packageName: "@atlaskit/help",
30
- packageVersion: "7.3.3"
30
+ packageVersion: "7.4.0"
31
31
  };
32
32
  var SearchInput = exports.SearchInput = function SearchInput(_ref) {
33
33
  var formatMessage = _ref.intl.formatMessage;
@@ -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.3.3"
24
+ packageVersion: "7.4.0"
25
25
  };
26
26
  var WhatsNewButton = exports.WhatsNewButton = function WhatsNewButton(_ref) {
27
27
  var productName = _ref.productName,
@@ -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.3.3"
18
+ packageVersion: "7.4.0"
19
19
  };
20
20
  var WhatsNewResultListItem = exports.WhatsNewResultListItem = function WhatsNewResultListItem(_ref) {
21
21
  var formatMessage = _ref.intl.formatMessage,
@@ -5,5 +5,5 @@ export const createAndFire = x.createAndFireEvent('atlaskit');
5
5
  export const defaultAnalyticsAttributes = {
6
6
  componentName: 'help',
7
7
  packageName: "@atlaskit/help",
8
- packageVersion: "7.3.3"
8
+ packageVersion: "7.4.0"
9
9
  };
@@ -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.3.3"
11
+ packageVersion: "7.4.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.3.3"
9
+ packageVersion: "7.4.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.3.3"
9
+ packageVersion: "7.4.0"
10
10
  };
11
11
  export const ArticleWasHelpfulYesButton = ({
12
12
  isSelected = false,
@@ -25,7 +25,7 @@ const FEEDBACK_REASON_TEXT_MAX_LENGTH = '16000';
25
25
  const ANALYTICS_CONTEXT_DATA = {
26
26
  componentName: 'ArticleWasHelpfulForm',
27
27
  packageName: "@atlaskit/help",
28
- packageVersion: "7.3.3"
28
+ packageVersion: "7.4.0"
29
29
  };
30
30
  export const ArticleWasHelpfulForm = ({
31
31
  onWasHelpfulSubmit,
@@ -59,7 +59,7 @@ export const HelpArticle = ({
59
59
  analyticsEvent.payload.attributes = {
60
60
  componentName: 'Article',
61
61
  packageName: "@atlaskit/help",
62
- packageVersion: "7.3.3"
62
+ packageVersion: "7.4.0"
63
63
  };
64
64
  if (onRelatedArticlesShowMoreClick) {
65
65
  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.3.3"
16
+ packageVersion: "7.4.0"
17
17
  };
18
18
  export const WhatsNewArticle = ({
19
19
  intl: {
@@ -35,7 +35,10 @@ const articlesList = ({
35
35
  title: article.title,
36
36
  description: article.description,
37
37
  key: article.id,
38
- href: article.href
38
+ href: article.href,
39
+ trustFactors: article.trustFactors,
40
+ source: article.source,
41
+ lastPublished: article.lastPublished
39
42
  });
40
43
  })), /*#__PURE__*/React.createElement(AnimateHeight, {
41
44
  duration: ANIMATE_HEIGHT_TRANSITION_DURATION_MS,
@@ -52,6 +55,9 @@ const articlesList = ({
52
55
  title: article.title,
53
56
  description: article.description,
54
57
  key: article.id,
55
- href: article.href
58
+ href: article.href,
59
+ trustFactors: article.trustFactors,
60
+ source: article.source,
61
+ lastPublished: article.lastPublished
56
62
  }))));
57
63
  export default articlesList;
@@ -3,18 +3,22 @@ import * as colors from '@atlaskit/theme/colors';
3
3
  import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
4
4
  import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
5
5
  import { injectIntl } from 'react-intl-next';
6
- import { ArticlesListItemWrapper, ArticlesListItemContainer, ArticlesListItemTitleText, ArticlesListItemDescription, ArticlesListItemLinkIcon } from './styled';
6
+ import LikeIcon from '@atlaskit/icon/glyph/like';
7
+ import { ArticlesListItemWrapper, ArticlesListItemContainer, ArticlesListItemTitleText, ArticlesListItemDescription, ArticlesListItemLinkIcon, ArticlesListItemTrustFactor, ArticlesListItemViewCount, ArticlesListItemHelpfulCount, ArticlesListItemSource, ArticlesListItemLastModified, ArticlesListItemTitleSection } from './styled';
7
8
  const ANALYTICS_CONTEXT_DATA = {
8
9
  componentName: 'ArticlesListItem',
9
10
  packageName: "@atlaskit/help",
10
- packageVersion: "7.3.3"
11
+ packageVersion: "7.4.0"
11
12
  };
12
13
  export const ArticlesListItem = ({
13
14
  styles,
14
15
  title,
15
16
  description,
16
17
  href = '',
17
- onClick
18
+ onClick,
19
+ trustFactors,
20
+ source,
21
+ lastPublished
18
22
  }) => {
19
23
  const {
20
24
  createAnalyticsEvent
@@ -28,18 +32,29 @@ export const ArticlesListItem = ({
28
32
  onClick(event, analyticsEvent);
29
33
  }
30
34
  };
35
+
36
+ // Check if trust factors are available
37
+ const isNumViewsVisible = (trustFactors === null || trustFactors === void 0 ? void 0 : trustFactors.numViews) != null;
38
+ const isHelpfulCountVisible = (trustFactors === null || trustFactors === void 0 ? void 0 : trustFactors.helpfulCount) != null;
39
+ const isTrustFactorVisible = isNumViewsVisible || isHelpfulCountVisible;
40
+ // Check if source is available
41
+ const isSourceVisible = source != null;
42
+ const isLastPublishedVisible = lastPublished != null && lastPublished !== '';
31
43
  return /*#__PURE__*/React.createElement(ArticlesListItemWrapper, {
32
44
  styles: styles,
33
45
  "aria-disabled": "false",
34
46
  role: "button",
35
47
  href: href,
36
48
  onClick: handleOnClick
37
- }, /*#__PURE__*/React.createElement(ArticlesListItemContainer, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleText, null, title, href && /*#__PURE__*/React.createElement(ArticlesListItemLinkIcon, null, /*#__PURE__*/React.createElement(ShortcutIcon, {
49
+ }, /*#__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, {
38
50
  size: "small",
39
51
  label: "",
40
52
  primaryColor: `var(--ds-icon-subtle, ${colors.N90})`,
41
53
  secondaryColor: `var(--ds-icon-subtle, ${colors.N90})`
42
- })))), /*#__PURE__*/React.createElement(ArticlesListItemDescription, null, description));
54
+ }))), /*#__PURE__*/React.createElement(ArticlesListItemDescription, null, description), isSourceVisible && /*#__PURE__*/React.createElement(ArticlesListItemSource, null, source), isTrustFactorVisible && /*#__PURE__*/React.createElement(ArticlesListItemTrustFactor, null, isNumViewsVisible && /*#__PURE__*/React.createElement(ArticlesListItemViewCount, null, trustFactors.numViews, " views"), isHelpfulCountVisible && /*#__PURE__*/React.createElement(ArticlesListItemHelpfulCount, null, /*#__PURE__*/React.createElement(LikeIcon, {
55
+ label: "Like",
56
+ size: "small"
57
+ }), trustFactors.helpfulCount)));
43
58
  };
44
59
  const ArticlesListItemWithContext = props => {
45
60
  return /*#__PURE__*/React.createElement(AnalyticsContext, {
@@ -29,31 +29,65 @@ export const ArticlesListItemWrapper = styled.a({
29
29
  }, props => props.styles);
30
30
  export const ArticlesListItemContainer = styled.div({
31
31
  width: '100%',
32
- whiteSpace: 'nowrap'
32
+ whiteSpace: 'nowrap',
33
+ display: 'flex'
34
+ });
35
+ export const ArticlesListItemTitleSection = styled.div({
36
+ display: 'flex',
37
+ flexDirection: 'column',
38
+ flexGrow: 1
33
39
  });
34
40
  export const ArticlesListItemTypeTitle = styled.div({
35
41
  font: `var(--ds-font-body-small, ${fontFallback.body.small})`,
36
42
  fontWeight: "var(--ds-font-weight-bold, bold)",
37
- color: `var(--ds-text-subtlest, ${colors.N200})`,
38
- paddingBottom: "var(--ds-space-050, 4px)"
43
+ color: `var(--ds-text-subtlest, ${colors.N200})`
39
44
  });
40
45
  export const ArticlesListItemLinkIcon = styled.span({
41
46
  alignSelf: 'auto',
42
47
  paddingInlineStart: "var(--ds-space-050, 4px)",
43
48
  verticalAlign: 'middle'
44
49
  });
45
- export const ArticlesListItemTitleText = styled.span({
50
+ export const ArticlesListItemTitleText = styled.p({
46
51
  textDecoration: 'none',
47
52
  color: `var(--ds-text, ${colors.N800})`,
48
53
  font: `var(--ds-font-heading-xsmall, ${fontFallback.heading.xsmall})`,
49
54
  display: 'inline-block',
50
55
  whiteSpace: 'normal',
51
56
  overflow: 'hidden',
52
- marginBottom: "var(--ds-space-100, 8px)"
57
+ marginBottom: "var(--ds-space-100, 4px)"
53
58
  });
54
59
  export const ArticlesListItemDescription = styled.p({
55
60
  display: 'block',
56
61
  lineHeight: '20px',
57
62
  color: `var(--ds-text-subtle, ${colors.N400})`,
58
- margin: 0
63
+ margin: 0,
64
+ paddingBottom: "var(--ds-space-025, 2px)"
65
+ });
66
+ export const ArticlesListItemSource = styled.div({
67
+ display: 'flex',
68
+ alignItems: 'center',
69
+ font: `var(--ds-font-heading-xxsmall, ${fontFallback.heading.xxsmall})`,
70
+ color: `var(--ds-surface-hovered, ${colors.N200})`,
71
+ padding: `${"var(--ds-space-050, 4px)"} 0`,
72
+ fontWeight: "var(--ds-font-weight-bold, bold)",
73
+ textTransform: 'uppercase'
74
+ });
75
+ export const ArticlesListItemTrustFactor = styled.div({
76
+ display: 'flex',
77
+ alignItems: 'center',
78
+ font: `var(--ds-font-body-small, ${fontFallback.body.small})`,
79
+ color: `var(--ds-background-accent-gray-subtlest-pressed, ${colors.N400})`,
80
+ paddingTop: "var(--ds-space-025, 2px)"
81
+ });
82
+ export const ArticlesListItemViewCount = styled.span({
83
+ paddingRight: "var(--ds-space-100, 8px)"
84
+ });
85
+ export const ArticlesListItemHelpfulCount = styled.span({
86
+ display: 'inline-flex',
87
+ paddingRight: "var(--ds-space-100, 8px)"
88
+ });
89
+ export const ArticlesListItemLastModified = styled.div({
90
+ font: `var(--ds-font-body-small, ${fontFallback.body.small})`,
91
+ color: `var(--ds-text-subtle, ${colors.N200})`,
92
+ padding: `${"var(--ds-space-050, 4px)"} 0`
59
93
  });
@@ -7,7 +7,7 @@ import { HelpContentButtonContainer, HelpContentButtonIcon, HelpContentButtonTex
7
7
  const analitycsContextData = {
8
8
  componentName: 'HelpContentButton',
9
9
  packageName: "@atlaskit/help",
10
- packageVersion: "7.3.3"
10
+ packageVersion: "7.4.0"
11
11
  };
12
12
  const HelpContentButton = ({
13
13
  id = '',
@@ -15,7 +15,7 @@ import useCancellablePromise from '../../util/hooks/cancellablePromise';
15
15
  import { usePrevious } from '../../util/hooks/previous';
16
16
  import { jsx } from '@emotion/react';
17
17
  const packageName = "@atlaskit/help";
18
- const packageVersion = "7.3.3";
18
+ const packageVersion = "7.4.0";
19
19
  export const RelatedArticles = ({
20
20
  style = 'primary',
21
21
  routeGroup,
@@ -17,7 +17,7 @@ import { SearchInputContainer, SearchIconContainer, CloseButtonAndSpinnerContain
17
17
  const ANALYTICS_CONTEXT_DATA = {
18
18
  componentName: 'searchInput',
19
19
  packageName: "@atlaskit/help",
20
- packageVersion: "7.3.3"
20
+ packageVersion: "7.4.0"
21
21
  };
22
22
  export const SearchInput = ({
23
23
  intl: {
@@ -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.3.3"
14
+ packageVersion: "7.4.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.3.3"
11
+ packageVersion: "7.4.0"
12
12
  };
13
13
  export const WhatsNewResultListItem = ({
14
14
  intl: {
@@ -5,5 +5,5 @@ export var createAndFire = x.createAndFireEvent('atlaskit');
5
5
  export var defaultAnalyticsAttributes = {
6
6
  componentName: 'help',
7
7
  packageName: "@atlaskit/help",
8
- packageVersion: "7.3.3"
8
+ packageVersion: "7.4.0"
9
9
  };
@@ -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.3.3"
11
+ packageVersion: "7.4.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.3.3"
9
+ packageVersion: "7.4.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.3.3"
9
+ packageVersion: "7.4.0"
10
10
  };
11
11
  export var ArticleWasHelpfulYesButton = function ArticleWasHelpfulYesButton(_ref) {
12
12
  var _ref$isSelected = _ref.isSelected,
@@ -26,7 +26,7 @@ var FEEDBACK_REASON_TEXT_MAX_LENGTH = '16000';
26
26
  var ANALYTICS_CONTEXT_DATA = {
27
27
  componentName: 'ArticleWasHelpfulForm',
28
28
  packageName: "@atlaskit/help",
29
- packageVersion: "7.3.3"
29
+ packageVersion: "7.4.0"
30
30
  };
31
31
  export var ArticleWasHelpfulForm = function ArticleWasHelpfulForm(_ref) {
32
32
  var onWasHelpfulSubmit = _ref.onWasHelpfulSubmit,
@@ -55,7 +55,7 @@ export var HelpArticle = function HelpArticle(_ref) {
55
55
  analyticsEvent.payload.attributes = {
56
56
  componentName: 'Article',
57
57
  packageName: "@atlaskit/help",
58
- packageVersion: "7.3.3"
58
+ packageVersion: "7.4.0"
59
59
  };
60
60
  if (onRelatedArticlesShowMoreClick) {
61
61
  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.3.3"
16
+ packageVersion: "7.4.0"
17
17
  };
18
18
  export var WhatsNewArticle = function WhatsNewArticle(_ref) {
19
19
  var formatMessage = _ref.intl.formatMessage,
@@ -39,7 +39,10 @@ var articlesList = function articlesList(_ref) {
39
39
  title: article.title,
40
40
  description: article.description,
41
41
  key: article.id,
42
- href: article.href
42
+ href: article.href,
43
+ trustFactors: article.trustFactors,
44
+ source: article.source,
45
+ lastPublished: article.lastPublished
43
46
  });
44
47
  })), /*#__PURE__*/React.createElement(AnimateHeight, {
45
48
  duration: ANIMATE_HEIGHT_TRANSITION_DURATION_MS,
@@ -57,7 +60,10 @@ var articlesList = function articlesList(_ref) {
57
60
  title: article.title,
58
61
  description: article.description,
59
62
  key: article.id,
60
- href: article.href
63
+ href: article.href,
64
+ trustFactors: article.trustFactors,
65
+ source: article.source,
66
+ lastPublished: article.lastPublished
61
67
  });
62
68
  })));
63
69
  };
@@ -3,11 +3,12 @@ import * as colors from '@atlaskit/theme/colors';
3
3
  import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
4
4
  import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
5
5
  import { injectIntl } from 'react-intl-next';
6
- import { ArticlesListItemWrapper, ArticlesListItemContainer, ArticlesListItemTitleText, ArticlesListItemDescription, ArticlesListItemLinkIcon } from './styled';
6
+ import LikeIcon from '@atlaskit/icon/glyph/like';
7
+ import { ArticlesListItemWrapper, ArticlesListItemContainer, ArticlesListItemTitleText, ArticlesListItemDescription, ArticlesListItemLinkIcon, ArticlesListItemTrustFactor, ArticlesListItemViewCount, ArticlesListItemHelpfulCount, ArticlesListItemSource, ArticlesListItemLastModified, ArticlesListItemTitleSection } from './styled';
7
8
  var ANALYTICS_CONTEXT_DATA = {
8
9
  componentName: 'ArticlesListItem',
9
10
  packageName: "@atlaskit/help",
10
- packageVersion: "7.3.3"
11
+ packageVersion: "7.4.0"
11
12
  };
12
13
  export var ArticlesListItem = function ArticlesListItem(_ref) {
13
14
  var styles = _ref.styles,
@@ -15,7 +16,10 @@ export var ArticlesListItem = function ArticlesListItem(_ref) {
15
16
  description = _ref.description,
16
17
  _ref$href = _ref.href,
17
18
  href = _ref$href === void 0 ? '' : _ref$href,
18
- onClick = _ref.onClick;
19
+ onClick = _ref.onClick,
20
+ trustFactors = _ref.trustFactors,
21
+ source = _ref.source,
22
+ lastPublished = _ref.lastPublished;
19
23
  var _useAnalyticsEvents = useAnalyticsEvents(),
20
24
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
21
25
  var handleOnClick = function handleOnClick(event) {
@@ -27,18 +31,29 @@ export var ArticlesListItem = function ArticlesListItem(_ref) {
27
31
  onClick(event, _analyticsEvent);
28
32
  }
29
33
  };
34
+
35
+ // Check if trust factors are available
36
+ var isNumViewsVisible = (trustFactors === null || trustFactors === void 0 ? void 0 : trustFactors.numViews) != null;
37
+ var isHelpfulCountVisible = (trustFactors === null || trustFactors === void 0 ? void 0 : trustFactors.helpfulCount) != null;
38
+ var isTrustFactorVisible = isNumViewsVisible || isHelpfulCountVisible;
39
+ // Check if source is available
40
+ var isSourceVisible = source != null;
41
+ var isLastPublishedVisible = lastPublished != null && lastPublished !== '';
30
42
  return /*#__PURE__*/React.createElement(ArticlesListItemWrapper, {
31
43
  styles: styles,
32
44
  "aria-disabled": "false",
33
45
  role: "button",
34
46
  href: href,
35
47
  onClick: handleOnClick
36
- }, /*#__PURE__*/React.createElement(ArticlesListItemContainer, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleText, null, title, href && /*#__PURE__*/React.createElement(ArticlesListItemLinkIcon, null, /*#__PURE__*/React.createElement(ShortcutIcon, {
48
+ }, /*#__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, {
37
49
  size: "small",
38
50
  label: "",
39
51
  primaryColor: "var(--ds-icon-subtle, ".concat(colors.N90, ")"),
40
52
  secondaryColor: "var(--ds-icon-subtle, ".concat(colors.N90, ")")
41
- })))), /*#__PURE__*/React.createElement(ArticlesListItemDescription, null, description));
53
+ }))), /*#__PURE__*/React.createElement(ArticlesListItemDescription, null, description), isSourceVisible && /*#__PURE__*/React.createElement(ArticlesListItemSource, null, source), isTrustFactorVisible && /*#__PURE__*/React.createElement(ArticlesListItemTrustFactor, null, isNumViewsVisible && /*#__PURE__*/React.createElement(ArticlesListItemViewCount, null, trustFactors.numViews, " views"), isHelpfulCountVisible && /*#__PURE__*/React.createElement(ArticlesListItemHelpfulCount, null, /*#__PURE__*/React.createElement(LikeIcon, {
54
+ label: "Like",
55
+ size: "small"
56
+ }), trustFactors.helpfulCount)));
42
57
  };
43
58
  var ArticlesListItemWithContext = function ArticlesListItemWithContext(props) {
44
59
  return /*#__PURE__*/React.createElement(AnalyticsContext, {
@@ -31,31 +31,65 @@ export var ArticlesListItemWrapper = styled.a({
31
31
  });
32
32
  export var ArticlesListItemContainer = styled.div({
33
33
  width: '100%',
34
- whiteSpace: 'nowrap'
34
+ whiteSpace: 'nowrap',
35
+ display: 'flex'
36
+ });
37
+ export var ArticlesListItemTitleSection = styled.div({
38
+ display: 'flex',
39
+ flexDirection: 'column',
40
+ flexGrow: 1
35
41
  });
36
42
  export var ArticlesListItemTypeTitle = styled.div({
37
43
  font: "var(--ds-font-body-small, ".concat(fontFallback.body.small, ")"),
38
44
  fontWeight: "var(--ds-font-weight-bold, bold)",
39
- color: "var(--ds-text-subtlest, ".concat(colors.N200, ")"),
40
- paddingBottom: "var(--ds-space-050, 4px)"
45
+ color: "var(--ds-text-subtlest, ".concat(colors.N200, ")")
41
46
  });
42
47
  export var ArticlesListItemLinkIcon = styled.span({
43
48
  alignSelf: 'auto',
44
49
  paddingInlineStart: "var(--ds-space-050, 4px)",
45
50
  verticalAlign: 'middle'
46
51
  });
47
- export var ArticlesListItemTitleText = styled.span({
52
+ export var ArticlesListItemTitleText = styled.p({
48
53
  textDecoration: 'none',
49
54
  color: "var(--ds-text, ".concat(colors.N800, ")"),
50
55
  font: "var(--ds-font-heading-xsmall, ".concat(fontFallback.heading.xsmall, ")"),
51
56
  display: 'inline-block',
52
57
  whiteSpace: 'normal',
53
58
  overflow: 'hidden',
54
- marginBottom: "var(--ds-space-100, 8px)"
59
+ marginBottom: "var(--ds-space-100, 4px)"
55
60
  });
56
61
  export var ArticlesListItemDescription = styled.p({
57
62
  display: 'block',
58
63
  lineHeight: '20px',
59
64
  color: "var(--ds-text-subtle, ".concat(colors.N400, ")"),
60
- margin: 0
65
+ margin: 0,
66
+ paddingBottom: "var(--ds-space-025, 2px)"
67
+ });
68
+ export var ArticlesListItemSource = styled.div({
69
+ display: 'flex',
70
+ alignItems: 'center',
71
+ font: "var(--ds-font-heading-xxsmall, ".concat(fontFallback.heading.xxsmall, ")"),
72
+ color: "var(--ds-surface-hovered, ".concat(colors.N200, ")"),
73
+ padding: "var(--ds-space-050, 4px)".concat(" 0"),
74
+ fontWeight: "var(--ds-font-weight-bold, bold)",
75
+ textTransform: 'uppercase'
76
+ });
77
+ export var ArticlesListItemTrustFactor = styled.div({
78
+ display: 'flex',
79
+ alignItems: 'center',
80
+ font: "var(--ds-font-body-small, ".concat(fontFallback.body.small, ")"),
81
+ color: "var(--ds-background-accent-gray-subtlest-pressed, ".concat(colors.N400, ")"),
82
+ paddingTop: "var(--ds-space-025, 2px)"
83
+ });
84
+ export var ArticlesListItemViewCount = styled.span({
85
+ paddingRight: "var(--ds-space-100, 8px)"
86
+ });
87
+ export var ArticlesListItemHelpfulCount = styled.span({
88
+ display: 'inline-flex',
89
+ paddingRight: "var(--ds-space-100, 8px)"
90
+ });
91
+ export var ArticlesListItemLastModified = styled.div({
92
+ font: "var(--ds-font-body-small, ".concat(fontFallback.body.small, ")"),
93
+ color: "var(--ds-text-subtle, ".concat(colors.N200, ")"),
94
+ padding: "var(--ds-space-050, 4px)".concat(" 0")
61
95
  });
@@ -7,7 +7,7 @@ import { HelpContentButtonContainer, HelpContentButtonIcon, HelpContentButtonTex
7
7
  var analitycsContextData = {
8
8
  componentName: 'HelpContentButton',
9
9
  packageName: "@atlaskit/help",
10
- packageVersion: "7.3.3"
10
+ packageVersion: "7.4.0"
11
11
  };
12
12
  var HelpContentButton = function HelpContentButton(_ref) {
13
13
  var _ref$id = _ref.id,
@@ -18,7 +18,7 @@ import useCancellablePromise from '../../util/hooks/cancellablePromise';
18
18
  import { usePrevious } from '../../util/hooks/previous';
19
19
  import { jsx } from '@emotion/react';
20
20
  var packageName = "@atlaskit/help";
21
- var packageVersion = "7.3.3";
21
+ var packageVersion = "7.4.0";
22
22
  export var RelatedArticles = function RelatedArticles(_ref) {
23
23
  var _ref$style = _ref.style,
24
24
  style = _ref$style === void 0 ? 'primary' : _ref$style,
@@ -17,7 +17,7 @@ import { SearchInputContainer, SearchIconContainer, CloseButtonAndSpinnerContain
17
17
  var ANALYTICS_CONTEXT_DATA = {
18
18
  componentName: 'searchInput',
19
19
  packageName: "@atlaskit/help",
20
- packageVersion: "7.3.3"
20
+ packageVersion: "7.4.0"
21
21
  };
22
22
  export var SearchInput = function SearchInput(_ref) {
23
23
  var formatMessage = _ref.intl.formatMessage;
@@ -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.3.3"
14
+ packageVersion: "7.4.0"
15
15
  };
16
16
  export var WhatsNewButton = function WhatsNewButton(_ref) {
17
17
  var productName = _ref.productName,
@@ -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.3.3"
11
+ packageVersion: "7.4.0"
12
12
  };
13
13
  export var WhatsNewResultListItem = function WhatsNewResultListItem(_ref) {
14
14
  var formatMessage = _ref.intl.formatMessage,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ArticlesList as ArticlesListInterface } from './model/ArticlesListItem';
2
+ import { type ArticlesList as ArticlesListInterface } from './model/ArticlesListItem';
3
3
  export interface Props {
4
4
  numberOfArticlesToDisplay?: number;
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- import { WrappedComponentProps } from 'react-intl-next';
4
- import { ArticleItem } from '../../../model/Article';
2
+ import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
+ import { type WrappedComponentProps } from 'react-intl-next';
4
+ import { type ArticleItem } from '../../../model/Article';
5
5
  interface Props {
6
6
  styles?: {};
7
7
  onClick?: (event: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
@@ -10,6 +10,10 @@ export declare const ArticlesListItemContainer: import("@emotion/styled").Styled
10
10
  theme?: import("@emotion/react").Theme | undefined;
11
11
  as?: import("react").ElementType<any> | undefined;
12
12
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
+ export declare const ArticlesListItemTitleSection: import("@emotion/styled").StyledComponent<{
14
+ theme?: import("@emotion/react").Theme | undefined;
15
+ as?: import("react").ElementType<any> | undefined;
16
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
17
  export declare const ArticlesListItemTypeTitle: import("@emotion/styled").StyledComponent<{
14
18
  theme?: import("@emotion/react").Theme | undefined;
15
19
  as?: import("react").ElementType<any> | undefined;
@@ -21,9 +25,29 @@ export declare const ArticlesListItemLinkIcon: import("@emotion/styled").StyledC
21
25
  export declare const ArticlesListItemTitleText: import("@emotion/styled").StyledComponent<{
22
26
  theme?: import("@emotion/react").Theme | undefined;
23
27
  as?: import("react").ElementType<any> | undefined;
24
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
28
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
25
29
  export declare const ArticlesListItemDescription: import("@emotion/styled").StyledComponent<{
26
30
  theme?: import("@emotion/react").Theme | undefined;
27
31
  as?: import("react").ElementType<any> | undefined;
28
32
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
33
+ export declare const ArticlesListItemSource: import("@emotion/styled").StyledComponent<{
34
+ theme?: import("@emotion/react").Theme | undefined;
35
+ as?: import("react").ElementType<any> | undefined;
36
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
37
+ export declare const ArticlesListItemTrustFactor: import("@emotion/styled").StyledComponent<{
38
+ theme?: import("@emotion/react").Theme | undefined;
39
+ as?: import("react").ElementType<any> | undefined;
40
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
41
+ export declare const ArticlesListItemViewCount: import("@emotion/styled").StyledComponent<{
42
+ theme?: import("@emotion/react").Theme | undefined;
43
+ as?: import("react").ElementType<any> | undefined;
44
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
45
+ export declare const ArticlesListItemHelpfulCount: import("@emotion/styled").StyledComponent<{
46
+ theme?: import("@emotion/react").Theme | undefined;
47
+ as?: import("react").ElementType<any> | undefined;
48
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
49
+ export declare const ArticlesListItemLastModified: import("@emotion/styled").StyledComponent<{
50
+ theme?: import("@emotion/react").Theme | undefined;
51
+ as?: import("react").ElementType<any> | undefined;
52
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
29
53
  export {};
@@ -1,4 +1,4 @@
1
- import { BODY_FORMAT_TYPES } from '@atlaskit/help-article';
1
+ import { type BODY_FORMAT_TYPES } from '@atlaskit/help-article';
2
2
  import type { AdfDoc } from '@atlaskit/help-article';
3
3
  export interface Article extends ArticleItem {
4
4
  body: string | AdfDoc;
@@ -21,6 +21,11 @@ export interface ArticleItem {
21
21
  topicId?: string;
22
22
  productName?: string;
23
23
  href?: string;
24
+ trustFactors?: {
25
+ numViews?: number;
26
+ helpfulCount?: number;
27
+ };
28
+ source?: string;
24
29
  }
25
30
  export interface ArticleFeedback {
26
31
  wasHelpful: boolean;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ArticlesList as ArticlesListInterface } from './model/ArticlesListItem';
2
+ import { type ArticlesList as ArticlesListInterface } from './model/ArticlesListItem';
3
3
  export interface Props {
4
4
  numberOfArticlesToDisplay?: number;
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- import { WrappedComponentProps } from 'react-intl-next';
4
- import { ArticleItem } from '../../../model/Article';
2
+ import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
+ import { type WrappedComponentProps } from 'react-intl-next';
4
+ import { type ArticleItem } from '../../../model/Article';
5
5
  interface Props {
6
6
  styles?: {};
7
7
  onClick?: (event: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
@@ -10,6 +10,10 @@ export declare const ArticlesListItemContainer: import("@emotion/styled").Styled
10
10
  theme?: import("@emotion/react").Theme | undefined;
11
11
  as?: import("react").ElementType<any> | undefined;
12
12
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
+ export declare const ArticlesListItemTitleSection: import("@emotion/styled").StyledComponent<{
14
+ theme?: import("@emotion/react").Theme | undefined;
15
+ as?: import("react").ElementType<any> | undefined;
16
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
17
  export declare const ArticlesListItemTypeTitle: import("@emotion/styled").StyledComponent<{
14
18
  theme?: import("@emotion/react").Theme | undefined;
15
19
  as?: import("react").ElementType<any> | undefined;
@@ -21,9 +25,29 @@ export declare const ArticlesListItemLinkIcon: import("@emotion/styled").StyledC
21
25
  export declare const ArticlesListItemTitleText: import("@emotion/styled").StyledComponent<{
22
26
  theme?: import("@emotion/react").Theme | undefined;
23
27
  as?: import("react").ElementType<any> | undefined;
24
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
28
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
25
29
  export declare const ArticlesListItemDescription: import("@emotion/styled").StyledComponent<{
26
30
  theme?: import("@emotion/react").Theme | undefined;
27
31
  as?: import("react").ElementType<any> | undefined;
28
32
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
33
+ export declare const ArticlesListItemSource: import("@emotion/styled").StyledComponent<{
34
+ theme?: import("@emotion/react").Theme | undefined;
35
+ as?: import("react").ElementType<any> | undefined;
36
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
37
+ export declare const ArticlesListItemTrustFactor: import("@emotion/styled").StyledComponent<{
38
+ theme?: import("@emotion/react").Theme | undefined;
39
+ as?: import("react").ElementType<any> | undefined;
40
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
41
+ export declare const ArticlesListItemViewCount: import("@emotion/styled").StyledComponent<{
42
+ theme?: import("@emotion/react").Theme | undefined;
43
+ as?: import("react").ElementType<any> | undefined;
44
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
45
+ export declare const ArticlesListItemHelpfulCount: import("@emotion/styled").StyledComponent<{
46
+ theme?: import("@emotion/react").Theme | undefined;
47
+ as?: import("react").ElementType<any> | undefined;
48
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
49
+ export declare const ArticlesListItemLastModified: import("@emotion/styled").StyledComponent<{
50
+ theme?: import("@emotion/react").Theme | undefined;
51
+ as?: import("react").ElementType<any> | undefined;
52
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
29
53
  export {};
@@ -1,4 +1,4 @@
1
- import { BODY_FORMAT_TYPES } from '@atlaskit/help-article';
1
+ import { type BODY_FORMAT_TYPES } from '@atlaskit/help-article';
2
2
  import type { AdfDoc } from '@atlaskit/help-article';
3
3
  export interface Article extends ArticleItem {
4
4
  body: string | AdfDoc;
@@ -21,6 +21,11 @@ export interface ArticleItem {
21
21
  topicId?: string;
22
22
  productName?: string;
23
23
  href?: string;
24
+ trustFactors?: {
25
+ numViews?: number;
26
+ helpfulCount?: number;
27
+ };
28
+ source?: string;
24
29
  }
25
30
  export interface ArticleFeedback {
26
31
  wasHelpful: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/help",
3
- "version": "7.3.3",
3
+ "version": "7.4.0",
4
4
  "description": "A cross-product help component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -44,10 +44,10 @@
44
44
  "@atlaskit/analytics-next": "^9.3.0",
45
45
  "@atlaskit/button": "^17.14.0",
46
46
  "@atlaskit/checkbox": "^13.3.0",
47
- "@atlaskit/form": "^10.0.0",
47
+ "@atlaskit/form": "^10.1.0",
48
48
  "@atlaskit/help-article": "^4.1.10",
49
49
  "@atlaskit/help-layout": "^4.2.15",
50
- "@atlaskit/icon": "^22.1.0",
50
+ "@atlaskit/icon": "^22.2.0",
51
51
  "@atlaskit/notification-indicator": "^9.2.0",
52
52
  "@atlaskit/notification-log-client": "^6.1.0",
53
53
  "@atlaskit/radio": "^6.3.0",
@@ -58,7 +58,7 @@
58
58
  "@atlaskit/textfield": "^6.3.0",
59
59
  "@atlaskit/theme": "^12.8.0",
60
60
  "@atlaskit/tokens": "^1.48.0",
61
- "@atlaskit/tooltip": "^18.3.0",
61
+ "@atlaskit/tooltip": "^18.4.0",
62
62
  "@babel/runtime": "^7.0.0",
63
63
  "@emotion/react": "^11.7.1",
64
64
  "@emotion/styled": "^11.0.0",