@atlaskit/help 7.2.29 → 7.3.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 (108) hide show
  1. package/CHANGELOG.md +740 -474
  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/ArticleLoadingFail/styled.js +9 -4
  5. package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +1 -1
  6. package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +1 -1
  7. package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/index.js +1 -1
  8. package/dist/cjs/components/Article/HelpArticle/index.js +1 -1
  9. package/dist/cjs/components/Article/WhatsNewArticle/index.js +1 -1
  10. package/dist/cjs/components/Article/styled.js +16 -3
  11. package/dist/cjs/components/ArticlesList/ArticlesListItem/index.js +1 -1
  12. package/dist/cjs/components/ArticlesList/styled.js +16 -5
  13. package/dist/cjs/components/HelpContentButton/index.js +1 -1
  14. package/dist/cjs/components/HelpContentButton/styled.js +9 -0
  15. package/dist/cjs/components/RelatedArticles/index.js +1 -1
  16. package/dist/cjs/components/RelatedArticles/styled.js +30 -8
  17. package/dist/cjs/components/Search/SearchInput/index.js +1 -1
  18. package/dist/cjs/components/Search/SearchInput/styled.js +32 -5
  19. package/dist/cjs/components/Search/SearchResults/index.js +11 -6
  20. package/dist/cjs/components/Search/SearchResults/styled.js +38 -8
  21. package/dist/cjs/components/WhatsNew/WhatsNewButton/index.js +1 -1
  22. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.js +13 -5
  23. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.js +13 -5
  24. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +1 -1
  25. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +23 -6
  26. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +27 -8
  27. package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +15 -4
  28. package/dist/cjs/components/WhatsNew/WhatsNewResults/styled.js +24 -6
  29. package/dist/cjs/components/contexts/searchContext.js +4 -2
  30. package/dist/cjs/components/styled.js +33 -9
  31. package/dist/cjs/model/Help.js +0 -1
  32. package/dist/cjs/util/helpers.js +10 -5
  33. package/dist/cjs/util/styled.js +57 -18
  34. package/dist/es2019/analytics.js +1 -1
  35. package/dist/es2019/components/Article/ArticleLoadingFail/index.js +1 -1
  36. package/dist/es2019/components/Article/ArticleLoadingFail/styled.js +8 -8
  37. package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +1 -1
  38. package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +1 -1
  39. package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/index.js +1 -1
  40. package/dist/es2019/components/Article/HelpArticle/index.js +1 -1
  41. package/dist/es2019/components/Article/WhatsNewArticle/index.js +1 -1
  42. package/dist/es2019/components/Article/styled.js +15 -15
  43. package/dist/es2019/components/ArticlesList/ArticlesListItem/index.js +1 -1
  44. package/dist/es2019/components/ArticlesList/styled.js +14 -14
  45. package/dist/es2019/components/HelpContentButton/index.js +1 -1
  46. package/dist/es2019/components/HelpContentButton/styled.js +9 -0
  47. package/dist/es2019/components/RelatedArticles/index.js +1 -1
  48. package/dist/es2019/components/RelatedArticles/styled.js +28 -29
  49. package/dist/es2019/components/Search/SearchInput/index.js +1 -1
  50. package/dist/es2019/components/Search/SearchInput/styled.js +29 -33
  51. package/dist/es2019/components/Search/SearchResults/index.js +11 -6
  52. package/dist/es2019/components/Search/SearchResults/styled.js +34 -38
  53. package/dist/es2019/components/WhatsNew/WhatsNewButton/index.js +1 -1
  54. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.js +10 -13
  55. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.js +10 -13
  56. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +1 -1
  57. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +21 -21
  58. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +24 -25
  59. package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +14 -14
  60. package/dist/es2019/components/WhatsNew/WhatsNewResults/styled.js +23 -23
  61. package/dist/es2019/components/contexts/searchContext.js +4 -2
  62. package/dist/es2019/components/styled.js +30 -30
  63. package/dist/es2019/model/Help.js +0 -1
  64. package/dist/es2019/util/helpers.js +8 -4
  65. package/dist/es2019/util/styled.js +51 -60
  66. package/dist/esm/analytics.js +1 -1
  67. package/dist/esm/components/Article/ArticleLoadingFail/index.js +1 -1
  68. package/dist/esm/components/Article/ArticleLoadingFail/styled.js +8 -4
  69. package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +1 -1
  70. package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +1 -1
  71. package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/index.js +1 -1
  72. package/dist/esm/components/Article/HelpArticle/index.js +1 -1
  73. package/dist/esm/components/Article/WhatsNewArticle/index.js +1 -1
  74. package/dist/esm/components/Article/styled.js +15 -3
  75. package/dist/esm/components/ArticlesList/ArticlesListItem/index.js +1 -1
  76. package/dist/esm/components/ArticlesList/styled.js +15 -5
  77. package/dist/esm/components/HelpContentButton/index.js +1 -1
  78. package/dist/esm/components/HelpContentButton/styled.js +9 -0
  79. package/dist/esm/components/RelatedArticles/index.js +1 -1
  80. package/dist/esm/components/RelatedArticles/styled.js +28 -7
  81. package/dist/esm/components/Search/SearchInput/index.js +1 -1
  82. package/dist/esm/components/Search/SearchInput/styled.js +31 -5
  83. package/dist/esm/components/Search/SearchResults/index.js +11 -6
  84. package/dist/esm/components/Search/SearchResults/styled.js +36 -7
  85. package/dist/esm/components/WhatsNew/WhatsNewButton/index.js +1 -1
  86. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.js +11 -4
  87. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.js +11 -4
  88. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +1 -1
  89. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +21 -5
  90. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +25 -7
  91. package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +14 -4
  92. package/dist/esm/components/WhatsNew/WhatsNewResults/styled.js +23 -6
  93. package/dist/esm/components/contexts/searchContext.js +4 -2
  94. package/dist/esm/components/styled.js +32 -9
  95. package/dist/esm/model/Help.js +0 -1
  96. package/dist/esm/util/helpers.js +9 -4
  97. package/dist/esm/util/styled.js +57 -18
  98. package/dist/types/analytics.d.ts +2 -2
  99. package/dist/types/components/RelatedArticles/index.d.ts +0 -2
  100. package/dist/types/components/contexts/searchContext.d.ts +5 -4
  101. package/dist/types/model/Help.d.ts +6 -5
  102. package/dist/types/util/helpers.d.ts +4 -1
  103. package/dist/types-ts4.5/analytics.d.ts +2 -2
  104. package/dist/types-ts4.5/components/RelatedArticles/index.d.ts +0 -2
  105. package/dist/types-ts4.5/components/contexts/searchContext.d.ts +5 -4
  106. package/dist/types-ts4.5/model/Help.d.ts +6 -5
  107. package/dist/types-ts4.5/util/helpers.d.ts +4 -1
  108. package/package.json +13 -13
@@ -1,11 +1,16 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- export var createArticleObject = function createArticleObject(algoliaResponse) {
5
- var bodyObject = algoliaResponse.hits[0].body;
6
- var stylesObject = algoliaResponse.hits[1].body;
4
+ export var RESPONSE_TYPE = /*#__PURE__*/function (RESPONSE_TYPE) {
5
+ RESPONSE_TYPE["ALGOLIA"] = "ALGOLIA";
6
+ return RESPONSE_TYPE;
7
+ }({});
8
+ export var createArticleObject = function createArticleObject(styles, content) {
9
+ var responseType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : RESPONSE_TYPE.ALGOLIA;
10
+ var bodyObject = content.body;
11
+ var stylesObject = styles.body;
7
12
  var body = "<div class=\"content-platform-support\">".concat(stylesObject, " ").concat(bodyObject, "</div>");
8
- return _objectSpread(_objectSpread({}, algoliaResponse.hits[0]), {}, {
13
+ return _objectSpread(_objectSpread({}, content), {}, {
9
14
  body: body
10
15
  });
11
16
  };
@@ -1,5 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
2
+ var _templateObject;
3
3
  /** @jsx jsx */
4
4
 
5
5
  import { keyframes } from '@emotion/react';
@@ -7,38 +7,77 @@ import styled from '@emotion/styled';
7
7
  import { gridSize } from '@atlaskit/theme/constants';
8
8
  import * as colors from '@atlaskit/theme/colors';
9
9
  import { WHATS_NEW_ITEM_TYPES } from '../model/WhatsNew';
10
- export var DividerLine = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n height: 2px;\n width: 100%;\n padding: 0 ", ";\n margin-top: ", ";\n box-sizing: border-box;\n"])), "var(--ds-border, ".concat(colors.N30A, ")"), "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)");
10
+ export var DividerLine = styled.div({
11
+ backgroundColor: "var(--ds-border, ".concat(colors.N30A, ")"),
12
+ height: '2px',
13
+ width: '100%',
14
+ padding: "0 ".concat("var(--ds-space-200, 16px)"),
15
+ marginTop: "var(--ds-space-200, 16px)",
16
+ boxSizing: 'border-box'
17
+ });
11
18
 
12
19
  /**
13
20
  * Loading container
14
21
  */
15
22
 
16
- var shimmer = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n background-position: -300px 0;\n }\n 100% {\n background-position: 1000px 0;\n }\n"])));
17
- export var LoadingRectangle = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-block;\n vertical-align: middle;\n position: relative;\n height: ", ";\n margin-top: ", ";\n width: ", ";\n border-radius: 2px;\n animation-duration: 1.2s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-name: ", ";\n animation-timing-function: linear;\n background-color: ", ";\n background-image: linear-gradient(\n to right,\n ", " 10%,\n ", " 20%,\n ", " 30%\n );\n background-repeat: no-repeat;\n"])), function (props) {
18
- return props.contentHeight ? props.contentHeight : '1rem';
19
- }, function (props) {
20
- return props.marginTop ? props.marginTop : gridSize() + 'px';
21
- }, function (props) {
22
- return props.contentWidth ? props.contentWidth : '100%';
23
- }, shimmer, "var(--ds-background-neutral, ".concat(colors.N30, ")"), "var(--ds-background-neutral-subtle, ".concat(colors.N30, ")"), "var(--ds-background-neutral, ".concat(colors.N40, ")"), "var(--ds-background-neutral-subtle, ".concat(colors.N30, ")"));
23
+ var shimmer = keyframes({
24
+ '0%': {
25
+ backgroundPosition: '-300px 0'
26
+ },
27
+ '100%': {
28
+ backgroundPosition: '1000px 0'
29
+ }
30
+ });
31
+ export var LoadingRectangle = styled.div(function (props) {
32
+ return {
33
+ display: 'inline-block',
34
+ verticalAlign: 'middle',
35
+ position: 'relative',
36
+ height: props.contentHeight ? props.contentHeight : '1rem',
37
+ marginTop: props.marginTop ? props.marginTop : gridSize() + 'px',
38
+ width: props.contentWidth ? props.contentWidth : '100%',
39
+ borderRadius: '2px',
40
+ animationDuration: '1.2s',
41
+ animationFillMode: 'forwards',
42
+ animationIterationCount: 'infinite',
43
+ animationName: shimmer,
44
+ animationTimingFunction: 'linear',
45
+ backgroundColor: "var(--ds-background-neutral, ".concat(colors.N30, ")"),
46
+ backgroundImage: "linear-gradient( to right, ".concat("var(--ds-background-neutral-subtle, ".concat(colors.N30, ")"), " 10%, ", "var(--ds-background-neutral, ".concat(colors.N40, ")"), " 20%, ", "var(--ds-background-neutral-subtle, ".concat(colors.N30, ")"), " 30% )"),
47
+ backgroundRepeat: 'no-repeat'
48
+ };
49
+ });
24
50
 
25
51
  /**
26
52
  * Loading Circle
27
53
  */
28
54
 
29
- export var LoadingCircle = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: inline-block;\n vertical-align: middle;\n position: relative;\n height: ", ";\n margin-top: ", ";\n width: ", ";\n border-radius: 50%;\n animation-duration: 1.2s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-name: ", ";\n animation-timing-function: linear;\n background-color: ", ";\n background-image: linear-gradient(\n to right,\n ", " 10%,\n ", " 20%,\n ", " 30%\n );\n background-repeat: no-repeat;\n"])), function (props) {
30
- return props.radius ? props.radius : "".concat(gridSize() * 4, "px");
31
- }, function (props) {
32
- return props.marginTop ? props.marginTop : '';
33
- }, function (props) {
34
- return props.radius ? props.radius : "".concat(gridSize() * 4, "px");
35
- }, shimmer, "var(--ds-background-neutral, ".concat(colors.N30, ")"), "var(--ds-background-neutral-subtle, ".concat(colors.N30, ")"), "var(--ds-background-neutral, ".concat(colors.N40, ")"), "var(--ds-background-neutral-subtle, ".concat(colors.N30, ")"));
55
+ export var LoadingCircle = styled.div(function (props) {
56
+ return {
57
+ display: 'inline-block',
58
+ verticalAlign: 'middle',
59
+ position: 'relative',
60
+ height: props.radius ? props.radius : "".concat(gridSize() * 4, "px"),
61
+ marginTop: props.marginTop ? props.marginTop : '',
62
+ width: props.radius ? props.radius : "".concat(gridSize() * 4, "px"),
63
+ borderRadius: '50%',
64
+ animationDuration: '1.2s',
65
+ animationFillMode: 'forwards',
66
+ animationIterationCount: 'infinite',
67
+ animationName: shimmer,
68
+ animationTimingFunction: 'linear',
69
+ backgroundColor: "var(--ds-background-neutral, ".concat(colors.N30, ")"),
70
+ backgroundImage: "linear-gradient( to right, ".concat("var(--ds-background-neutral-subtle, ".concat(colors.N30, ")"), " 10%, ", "var(--ds-background-neutral, ".concat(colors.N40, ")"), " 20%, ", "var(--ds-background-neutral-subtle, ".concat(colors.N30, ")"), " 30% )"),
71
+ backgroundRepeat: 'no-repeat'
72
+ };
73
+ });
36
74
 
37
75
  /**
38
76
  * What's new icon
39
77
  */
40
78
 
41
- export var WhatsNewTypeIcon = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: inline-block;\n vertical-align: middle;\n position: relative;\n height: ", ";\n width: ", ";\n border-radius: 2px;\n background-color: ", ";\n\n & > img {\n width: calc(100% - ", "px);\n height: calc(100% - ", "px);\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n\n & > svg {\n height: 100%;\n width: 100%;\n }\n }\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)", function (_ref) {
79
+ // eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression -- needs manual remediation
80
+ export var WhatsNewTypeIcon = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block;\n vertical-align: middle;\n position: relative;\n height: ", ";\n width: ", ";\n border-radius: 2px;\n background-color: ", ";\n\n & > img {\n width: calc(100% - ", "px);\n height: calc(100% - ", "px);\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n\n & > svg {\n height: 100%;\n width: 100%;\n }\n }\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)", function (_ref) {
42
81
  var type = _ref.type;
43
82
  switch (type) {
44
83
  case WHATS_NEW_ITEM_TYPES.IMPROVEMENT:
@@ -1,7 +1,7 @@
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 extends x.WithAnalyticsEventsProps, Component>(WrappedComponent: import("react").JSXElementConstructor<Props> & Component) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Omit<Props, keyof x.WithAnalyticsEventsProps>>> & import("react").RefAttributes<any>>;
4
- export declare const withAnalyticsContext: (defaultData?: any) => <Props, Component>(WrappedComponent: import("react").JSXElementConstructor<Props> & Component) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Props & x.WithContextProps>> & import("react").RefAttributes<any>>;
3
+ export declare const withAnalyticsEvents: (createEventMap?: import("@atlaskit/analytics-next/types").CreateEventMap | undefined) => <Props extends x.WithAnalyticsEventsProps, Component>(WrappedComponent: import("react").ComponentType<Props> & Component) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Omit<Props, keyof x.WithAnalyticsEventsProps>>> & import("react").RefAttributes<any>>;
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: {
7
7
  componentName: string;
@@ -15,7 +15,5 @@ export interface Props {
15
15
  export declare const RelatedArticles: React.FC<Props & WrappedComponentProps>;
16
16
  declare const _default: React.ForwardRefExoticComponent<Omit<Props & WrappedComponentProps, "intl"> & {
17
17
  forwardedRef?: React.Ref<any> | undefined;
18
- } & {
19
- children?: React.ReactNode;
20
18
  } & import("@atlaskit/analytics-next").WithContextProps & React.RefAttributes<any>>;
21
19
  export default _default;
@@ -1,12 +1,13 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- import { ArticleItem } from '../../model/Article';
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
+ import { type ArticleItem } from '../../model/Article';
4
4
  import { REQUEST_STATE } from '../../model/Requests';
5
5
  interface SearchSharedInterface {
6
6
  onSearchInputChanged?(event: React.KeyboardEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent, value: string): void;
7
7
  onSearchInputCleared?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
8
8
  onSearchExternalUrlClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
9
9
  searchExternalUrl?: string;
10
+ openExternalSearchUrlInNewTab?: boolean;
10
11
  }
11
12
  export interface SearchContextInterface extends SearchSharedInterface {
12
13
  onSearch?(value?: string): void;
@@ -21,5 +22,5 @@ export interface SearchProviderInterface extends SearchSharedInterface {
21
22
  onSearchResultItemClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, articleData: ArticleItem): void;
22
23
  }
23
24
  export declare const useSearchContext: () => SearchContextInterface, CtxProvider: React.Provider<SearchContextInterface | undefined>;
24
- export declare const SearchContextProvider: ({ onSearch, onSearchInputChanged, onSearchInputCleared, onSearchResultItemClick, onSearchExternalUrlClick, searchExternalUrl, children, }: PropsWithChildren<SearchProviderInterface>) => JSX.Element;
25
+ export declare const SearchContextProvider: ({ onSearch, onSearchInputChanged, onSearchInputCleared, onSearchResultItemClick, onSearchExternalUrlClick, searchExternalUrl, children, openExternalSearchUrlInNewTab }: PropsWithChildren<SearchProviderInterface>) => JSX.Element;
25
26
  export {};
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { Article, ArticleItem, ArticleFeedback } from './Article';
3
- import { WhatsNewArticleItem, WhatsNewArticle, WHATS_NEW_ITEM_TYPES, whatsNewSearchResult } from './WhatsNew';
4
- import { REQUEST_STATE } from './Requests';
5
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
6
- import { NotificationLogProvider } from '@atlaskit/notification-log-client';
2
+ import { type Article, type ArticleItem, type ArticleFeedback } from './Article';
3
+ import { type WhatsNewArticleItem, type WhatsNewArticle, type WHATS_NEW_ITEM_TYPES, type whatsNewSearchResult } from './WhatsNew';
4
+ import { type REQUEST_STATE } from './Requests';
5
+ import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
6
+ import { type NotificationLogProvider } from '@atlaskit/notification-log-client';
7
7
  import type { Props as HelpContentButtonProps } from '../components/HelpContentButton';
8
8
  export declare enum ARTICLE_TYPE {
9
9
  HELP_ARTICLE = "HELP_ARTICLE",
@@ -36,6 +36,7 @@ export interface Help {
36
36
  onSearchResultItemClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, articleData: ArticleItem): void;
37
37
  onSearchExternalUrlClick?(event?: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent?: UIAnalyticsEvent): void;
38
38
  searchExternalUrl?: string;
39
+ openExternalSearchUrlInNewTab?: boolean;
39
40
  };
40
41
  navigation?: {
41
42
  navigationData?: {
@@ -1,2 +1,5 @@
1
1
  import { Article } from '../model/Article';
2
- export declare const createArticleObject: (algoliaResponse: any) => Article;
2
+ export declare enum RESPONSE_TYPE {
3
+ ALGOLIA = "ALGOLIA"
4
+ }
5
+ export declare const createArticleObject: (styles: any, content: any, responseType?: RESPONSE_TYPE) => Article;
@@ -1,7 +1,7 @@
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 extends x.WithAnalyticsEventsProps, Component>(WrappedComponent: import("react").JSXElementConstructor<Props> & Component) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Omit<Props, keyof x.WithAnalyticsEventsProps>>> & import("react").RefAttributes<any>>;
4
- export declare const withAnalyticsContext: (defaultData?: any) => <Props, Component>(WrappedComponent: import("react").JSXElementConstructor<Props> & Component) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Props & x.WithContextProps>> & import("react").RefAttributes<any>>;
3
+ export declare const withAnalyticsEvents: (createEventMap?: import("@atlaskit/analytics-next/types").CreateEventMap | undefined) => <Props extends x.WithAnalyticsEventsProps, Component>(WrappedComponent: import("react").ComponentType<Props> & Component) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Omit<Props, keyof x.WithAnalyticsEventsProps>>> & import("react").RefAttributes<any>>;
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: {
7
7
  componentName: string;
@@ -15,7 +15,5 @@ export interface Props {
15
15
  export declare const RelatedArticles: React.FC<Props & WrappedComponentProps>;
16
16
  declare const _default: React.ForwardRefExoticComponent<Omit<Props & WrappedComponentProps, "intl"> & {
17
17
  forwardedRef?: React.Ref<any> | undefined;
18
- } & {
19
- children?: React.ReactNode;
20
18
  } & import("@atlaskit/analytics-next").WithContextProps & React.RefAttributes<any>>;
21
19
  export default _default;
@@ -1,12 +1,13 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- import { ArticleItem } from '../../model/Article';
1
+ import React, { type PropsWithChildren } from 'react';
2
+ import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
+ import { type ArticleItem } from '../../model/Article';
4
4
  import { REQUEST_STATE } from '../../model/Requests';
5
5
  interface SearchSharedInterface {
6
6
  onSearchInputChanged?(event: React.KeyboardEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent, value: string): void;
7
7
  onSearchInputCleared?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
8
8
  onSearchExternalUrlClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
9
9
  searchExternalUrl?: string;
10
+ openExternalSearchUrlInNewTab?: boolean;
10
11
  }
11
12
  export interface SearchContextInterface extends SearchSharedInterface {
12
13
  onSearch?(value?: string): void;
@@ -21,5 +22,5 @@ export interface SearchProviderInterface extends SearchSharedInterface {
21
22
  onSearchResultItemClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, articleData: ArticleItem): void;
22
23
  }
23
24
  export declare const useSearchContext: () => SearchContextInterface, CtxProvider: React.Provider<SearchContextInterface | undefined>;
24
- export declare const SearchContextProvider: ({ onSearch, onSearchInputChanged, onSearchInputCleared, onSearchResultItemClick, onSearchExternalUrlClick, searchExternalUrl, children, }: PropsWithChildren<SearchProviderInterface>) => JSX.Element;
25
+ export declare const SearchContextProvider: ({ onSearch, onSearchInputChanged, onSearchInputCleared, onSearchResultItemClick, onSearchExternalUrlClick, searchExternalUrl, children, openExternalSearchUrlInNewTab }: PropsWithChildren<SearchProviderInterface>) => JSX.Element;
25
26
  export {};
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { Article, ArticleItem, ArticleFeedback } from './Article';
3
- import { WhatsNewArticleItem, WhatsNewArticle, WHATS_NEW_ITEM_TYPES, whatsNewSearchResult } from './WhatsNew';
4
- import { REQUEST_STATE } from './Requests';
5
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
6
- import { NotificationLogProvider } from '@atlaskit/notification-log-client';
2
+ import { type Article, type ArticleItem, type ArticleFeedback } from './Article';
3
+ import { type WhatsNewArticleItem, type WhatsNewArticle, type WHATS_NEW_ITEM_TYPES, type whatsNewSearchResult } from './WhatsNew';
4
+ import { type REQUEST_STATE } from './Requests';
5
+ import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
6
+ import { type NotificationLogProvider } from '@atlaskit/notification-log-client';
7
7
  import type { Props as HelpContentButtonProps } from '../components/HelpContentButton';
8
8
  export declare enum ARTICLE_TYPE {
9
9
  HELP_ARTICLE = "HELP_ARTICLE",
@@ -36,6 +36,7 @@ export interface Help {
36
36
  onSearchResultItemClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, articleData: ArticleItem): void;
37
37
  onSearchExternalUrlClick?(event?: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent?: UIAnalyticsEvent): void;
38
38
  searchExternalUrl?: string;
39
+ openExternalSearchUrlInNewTab?: boolean;
39
40
  };
40
41
  navigation?: {
41
42
  navigationData?: {
@@ -1,2 +1,5 @@
1
1
  import { Article } from '../model/Article';
2
- export declare const createArticleObject: (algoliaResponse: any) => Article;
2
+ export declare enum RESPONSE_TYPE {
3
+ ALGOLIA = "ALGOLIA"
4
+ }
5
+ export declare const createArticleObject: (styles: any, content: any, responseType?: RESPONSE_TYPE) => Article;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/help",
3
- "version": "7.2.29",
3
+ "version": "7.3.0",
4
4
  "description": "A cross-product help component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,24 +41,24 @@
41
41
  "ak-postbuild": "ls -d dist/* | xargs -n 1 copyfiles -u 1 -V src/**/*.svg"
42
42
  },
43
43
  "dependencies": {
44
- "@atlaskit/analytics-next": "^9.2.0",
45
- "@atlaskit/button": "^17.8.0",
46
- "@atlaskit/checkbox": "^13.1.0",
47
- "@atlaskit/form": "^9.1.0",
44
+ "@atlaskit/analytics-next": "^9.3.0",
45
+ "@atlaskit/button": "^17.14.0",
46
+ "@atlaskit/checkbox": "^13.3.0",
47
+ "@atlaskit/form": "^9.3.0",
48
48
  "@atlaskit/help-article": "^4.1.10",
49
49
  "@atlaskit/help-layout": "^4.2.15",
50
50
  "@atlaskit/icon": "^22.1.0",
51
51
  "@atlaskit/notification-indicator": "^9.2.0",
52
52
  "@atlaskit/notification-log-client": "^6.1.0",
53
- "@atlaskit/radio": "^6.1.0",
54
- "@atlaskit/section-message": "^6.4.0",
55
- "@atlaskit/select": "^17.3.0",
56
- "@atlaskit/spinner": "^16.0.0",
57
- "@atlaskit/textarea": "^5.2.0",
58
- "@atlaskit/textfield": "^6.1.0",
53
+ "@atlaskit/radio": "^6.3.0",
54
+ "@atlaskit/section-message": "^6.5.0",
55
+ "@atlaskit/select": "^17.8.0",
56
+ "@atlaskit/spinner": "^16.1.0",
57
+ "@atlaskit/textarea": "^5.4.0",
58
+ "@atlaskit/textfield": "^6.3.0",
59
59
  "@atlaskit/theme": "^12.7.0",
60
- "@atlaskit/tokens": "^1.42.0",
61
- "@atlaskit/tooltip": "^18.1.0",
60
+ "@atlaskit/tokens": "^1.45.0",
61
+ "@atlaskit/tooltip": "^18.3.0",
62
62
  "@babel/runtime": "^7.0.0",
63
63
  "@emotion/react": "^11.7.1",
64
64
  "@emotion/styled": "^11.0.0",