@atlaskit/smart-card 26.9.5 → 26.9.7

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 26.9.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`68880de5ecb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/68880de5ecb) - [ux] Closing hover card on right click (open of context menu)
8
+
9
+ ## 26.9.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [`e0a2c926e63`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e0a2c926e63) - [ux] Flexible Smart Links: Fix hover preview shows on mouse leave
14
+
3
15
  ## 26.9.5
4
16
 
5
17
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.9.5",
3
+ "version": "26.9.7",
4
4
  "sideEffects": false
5
5
  }
@@ -19,6 +19,7 @@ var HoverCardControl = function HoverCardControl(_ref) {
19
19
  isHoverPreview = _ref.isHoverPreview,
20
20
  isAuthTooltip = _ref.isAuthTooltip,
21
21
  showServerActions = _ref.showServerActions,
22
+ testId = _ref.testId,
22
23
  url = _ref.url;
23
24
  var _useState = (0, _react.useState)(true),
24
25
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -32,6 +33,11 @@ var HoverCardControl = function HoverCardControl(_ref) {
32
33
  }
33
34
  };
34
35
  }, []);
36
+ var onMouseLeave = (0, _react.useCallback)(function () {
37
+ if (mouseStopTimer.current) {
38
+ clearTimeout(mouseStopTimer.current);
39
+ }
40
+ }, []);
35
41
  var onMouseMove = (0, _react.useCallback)(function (e) {
36
42
  var _e$target$closest;
37
43
  if (mouseStopTimer.current) {
@@ -67,7 +73,9 @@ var HoverCardControl = function HoverCardControl(_ref) {
67
73
  showServerActions: Boolean(showServerActions),
68
74
  url: url
69
75
  }, /*#__PURE__*/_react.default.createElement("span", {
70
- onMouseMove: onMouseMove
76
+ onMouseLeave: onMouseLeave,
77
+ onMouseMove: onMouseMove,
78
+ "data-testid": "".concat(testId, "-hover-card-wrapper")
71
79
  }, children));
72
80
  };
73
81
  var _default = HoverCardControl;
@@ -178,6 +178,7 @@ var Container = function Container(_ref3) {
178
178
  isHoverPreview: canShowHoverPreview,
179
179
  isAuthTooltip: canShowAuthTooltip,
180
180
  showServerActions: showServerActions,
181
+ testId: testId,
181
182
  url: context.url
182
183
  }, container);
183
184
  }
@@ -166,14 +166,20 @@ var HoverCardComponent = function HoverCardComponent(_ref) {
166
166
  }, [hideCard]);
167
167
 
168
168
  // Stop hover preview content to propagate event to parent.
169
- var onChildClick = (0, _react2.useCallback)(function (e) {
169
+ var handleChildClick = (0, _react2.useCallback)(function (e, closeOnClick) {
170
170
  if (!allowEventPropagation) {
171
171
  e.stopPropagation();
172
172
  }
173
- if (closeOnChildClick) {
173
+ if (closeOnClick) {
174
174
  hideCard();
175
175
  }
176
- }, [allowEventPropagation, closeOnChildClick, hideCard]);
176
+ }, [allowEventPropagation, hideCard]);
177
+ var onContextMenuClick = (0, _react2.useCallback)(function (e) {
178
+ return handleChildClick(e, true);
179
+ }, [handleChildClick]);
180
+ var onChildClick = (0, _react2.useCallback)(function (e) {
181
+ return handleChildClick(e, closeOnChildClick);
182
+ }, [closeOnChildClick, handleChildClick]);
177
183
  var content = (0, _react2.useCallback)(function (_ref2) {
178
184
  var update = _ref2.update;
179
185
  var hoverCardContentProps = {
@@ -203,9 +209,10 @@ var HoverCardComponent = function HoverCardComponent(_ref) {
203
209
  onMouseLeave: initHideCard,
204
210
  onMouseMove: setMousePosition,
205
211
  onClick: onChildClick,
212
+ onContextMenu: onContextMenuClick,
206
213
  "data-testid": "hover-card-trigger-wrapper"
207
214
  }), children));
208
- }, [children, initHideCard, initShowCard, onChildClick, setMousePosition]);
215
+ }, [children, initHideCard, initShowCard, onChildClick, onContextMenuClick, setMousePosition]);
209
216
  return (0, _react.jsx)(_popup.default, {
210
217
  testId: "hover-card",
211
218
  isOpen: isOpen && canOpen,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.9.5",
3
+ "version": "26.9.7",
4
4
  "sideEffects": false
5
5
  }
@@ -8,6 +8,7 @@ const HoverCardControl = ({
8
8
  isHoverPreview,
9
9
  isAuthTooltip,
10
10
  showServerActions,
11
+ testId,
11
12
  url
12
13
  }) => {
13
14
  const [canOpen, setCanOpen] = useState(true);
@@ -19,6 +20,11 @@ const HoverCardControl = ({
19
20
  }
20
21
  };
21
22
  }, []);
23
+ const onMouseLeave = useCallback(() => {
24
+ if (mouseStopTimer.current) {
25
+ clearTimeout(mouseStopTimer.current);
26
+ }
27
+ }, []);
22
28
  const onMouseMove = useCallback(e => {
23
29
  var _e$target$closest;
24
30
  if (mouseStopTimer.current) {
@@ -54,7 +60,9 @@ const HoverCardControl = ({
54
60
  showServerActions: Boolean(showServerActions),
55
61
  url: url
56
62
  }, /*#__PURE__*/React.createElement("span", {
57
- onMouseMove: onMouseMove
63
+ onMouseLeave: onMouseLeave,
64
+ onMouseMove: onMouseMove,
65
+ "data-testid": `${testId}-hover-card-wrapper`
58
66
  }, children));
59
67
  };
60
68
  export default HoverCardControl;
@@ -199,6 +199,7 @@ const Container = ({
199
199
  isHoverPreview: canShowHoverPreview,
200
200
  isAuthTooltip: canShowAuthTooltip,
201
201
  showServerActions: showServerActions,
202
+ testId: testId,
202
203
  url: context.url
203
204
  }, container);
204
205
  }
@@ -144,14 +144,16 @@ export const HoverCardComponent = ({
144
144
  }, [hideCard]);
145
145
 
146
146
  // Stop hover preview content to propagate event to parent.
147
- const onChildClick = useCallback(e => {
147
+ const handleChildClick = useCallback((e, closeOnClick) => {
148
148
  if (!allowEventPropagation) {
149
149
  e.stopPropagation();
150
150
  }
151
- if (closeOnChildClick) {
151
+ if (closeOnClick) {
152
152
  hideCard();
153
153
  }
154
- }, [allowEventPropagation, closeOnChildClick, hideCard]);
154
+ }, [allowEventPropagation, hideCard]);
155
+ const onContextMenuClick = useCallback(e => handleChildClick(e, true), [handleChildClick]);
156
+ const onChildClick = useCallback(e => handleChildClick(e, closeOnChildClick), [closeOnChildClick, handleChildClick]);
155
157
  const content = useCallback(({
156
158
  update
157
159
  }) => {
@@ -181,8 +183,9 @@ export const HoverCardComponent = ({
181
183
  onMouseLeave: initHideCard,
182
184
  onMouseMove: setMousePosition,
183
185
  onClick: onChildClick,
186
+ onContextMenu: onContextMenuClick,
184
187
  "data-testid": "hover-card-trigger-wrapper"
185
- }), children)), [children, initHideCard, initShowCard, onChildClick, setMousePosition]);
188
+ }), children)), [children, initHideCard, initShowCard, onChildClick, onContextMenuClick, setMousePosition]);
186
189
  return jsx(Popup, {
187
190
  testId: "hover-card",
188
191
  isOpen: isOpen && canOpen,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.9.5",
3
+ "version": "26.9.7",
4
4
  "sideEffects": false
5
5
  }
@@ -9,6 +9,7 @@ var HoverCardControl = function HoverCardControl(_ref) {
9
9
  isHoverPreview = _ref.isHoverPreview,
10
10
  isAuthTooltip = _ref.isAuthTooltip,
11
11
  showServerActions = _ref.showServerActions,
12
+ testId = _ref.testId,
12
13
  url = _ref.url;
13
14
  var _useState = useState(true),
14
15
  _useState2 = _slicedToArray(_useState, 2),
@@ -22,6 +23,11 @@ var HoverCardControl = function HoverCardControl(_ref) {
22
23
  }
23
24
  };
24
25
  }, []);
26
+ var onMouseLeave = useCallback(function () {
27
+ if (mouseStopTimer.current) {
28
+ clearTimeout(mouseStopTimer.current);
29
+ }
30
+ }, []);
25
31
  var onMouseMove = useCallback(function (e) {
26
32
  var _e$target$closest;
27
33
  if (mouseStopTimer.current) {
@@ -57,7 +63,9 @@ var HoverCardControl = function HoverCardControl(_ref) {
57
63
  showServerActions: Boolean(showServerActions),
58
64
  url: url
59
65
  }, /*#__PURE__*/React.createElement("span", {
60
- onMouseMove: onMouseMove
66
+ onMouseLeave: onMouseLeave,
67
+ onMouseMove: onMouseMove,
68
+ "data-testid": "".concat(testId, "-hover-card-wrapper")
61
69
  }, children));
62
70
  };
63
71
  export default HoverCardControl;
@@ -167,6 +167,7 @@ var Container = function Container(_ref3) {
167
167
  isHoverPreview: canShowHoverPreview,
168
168
  isAuthTooltip: canShowAuthTooltip,
169
169
  showServerActions: showServerActions,
170
+ testId: testId,
170
171
  url: context.url
171
172
  }, container);
172
173
  }
@@ -155,14 +155,20 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
155
155
  }, [hideCard]);
156
156
 
157
157
  // Stop hover preview content to propagate event to parent.
158
- var onChildClick = useCallback(function (e) {
158
+ var handleChildClick = useCallback(function (e, closeOnClick) {
159
159
  if (!allowEventPropagation) {
160
160
  e.stopPropagation();
161
161
  }
162
- if (closeOnChildClick) {
162
+ if (closeOnClick) {
163
163
  hideCard();
164
164
  }
165
- }, [allowEventPropagation, closeOnChildClick, hideCard]);
165
+ }, [allowEventPropagation, hideCard]);
166
+ var onContextMenuClick = useCallback(function (e) {
167
+ return handleChildClick(e, true);
168
+ }, [handleChildClick]);
169
+ var onChildClick = useCallback(function (e) {
170
+ return handleChildClick(e, closeOnChildClick);
171
+ }, [closeOnChildClick, handleChildClick]);
166
172
  var content = useCallback(function (_ref2) {
167
173
  var update = _ref2.update;
168
174
  var hoverCardContentProps = {
@@ -192,9 +198,10 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
192
198
  onMouseLeave: initHideCard,
193
199
  onMouseMove: setMousePosition,
194
200
  onClick: onChildClick,
201
+ onContextMenu: onContextMenuClick,
195
202
  "data-testid": "hover-card-trigger-wrapper"
196
203
  }), children));
197
- }, [children, initHideCard, initShowCard, onChildClick, setMousePosition]);
204
+ }, [children, initHideCard, initShowCard, onChildClick, onContextMenuClick, setMousePosition]);
198
205
  return jsx(Popup, {
199
206
  testId: "hover-card",
200
207
  isOpen: isOpen && canOpen,
@@ -2,5 +2,6 @@ import { ContainerProps } from '../types';
2
2
  export type HoverCardDelayProps = Pick<ContainerProps, 'hideHoverCardPreviewButton' | 'showServerActions'> & {
3
3
  isHoverPreview?: boolean;
4
4
  isAuthTooltip?: boolean;
5
+ testId?: string;
5
6
  url: string;
6
7
  };
@@ -2,5 +2,6 @@ import { ContainerProps } from '../types';
2
2
  export type HoverCardDelayProps = Pick<ContainerProps, 'hideHoverCardPreviewButton' | 'showServerActions'> & {
3
3
  isHoverPreview?: boolean;
4
4
  isAuthTooltip?: boolean;
5
+ testId?: string;
5
6
  url: string;
6
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.9.5",
3
+ "version": "26.9.7",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,14 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.5 <4.9": {
17
- "*": [
18
- "dist/types-ts4.5/*",
19
- "dist/types-ts4.5/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "sideEffects": false,
24
16
  "atlaskit:src": "src/index.ts",
25
17
  "atlassian": {
@@ -45,8 +37,8 @@
45
37
  "@atlaskit/link-analytics": "^8.2.0",
46
38
  "@atlaskit/link-client-extension": "^1.5.0",
47
39
  "@atlaskit/link-extractors": "^1.1.0",
48
- "@atlaskit/linking-common": "^3.3.0",
49
- "@atlaskit/linking-types": "^8.1.0",
40
+ "@atlaskit/linking-common": "^3.4.0",
41
+ "@atlaskit/linking-types": "^8.2.0",
50
42
  "@atlaskit/logo": "^13.14.0",
51
43
  "@atlaskit/lozenge": "^11.4.0",
52
44
  "@atlaskit/media-common": "^7.1.0",
@@ -79,6 +71,7 @@
79
71
  "react-intl-next": "npm:react-intl@^5.18.1"
80
72
  },
81
73
  "devDependencies": {
74
+ "@af/visual-regression": "*",
82
75
  "@atlaskit/avatar": "^21.3.0",
83
76
  "@atlaskit/css-reset": "^6.5.0",
84
77
  "@atlaskit/link-test-helpers": "^4.1.0",
@@ -114,6 +107,22 @@
114
107
  "typescript": "~4.9.5",
115
108
  "xhr-mock": "^2.4.0"
116
109
  },
110
+ "techstack": {
111
+ "@repo/internal": {
112
+ "design-tokens": [
113
+ "color",
114
+ "spacing"
115
+ ]
116
+ }
117
+ },
118
+ "typesVersions": {
119
+ ">=4.5 <4.9": {
120
+ "*": [
121
+ "dist/types-ts4.5/*",
122
+ "dist/types-ts4.5/index.d.ts"
123
+ ]
124
+ }
125
+ },
117
126
  "af:exports": {
118
127
  "./ssr": "./src/ssr.tsx",
119
128
  "./in-product": "./src/in-product.ts",
@@ -135,13 +144,5 @@
135
144
  "type": "boolean"
136
145
  }
137
146
  },
138
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
139
- "techstack": {
140
- "@repo/internal": {
141
- "design-tokens": [
142
- "color",
143
- "spacing"
144
- ]
145
- }
146
- }
147
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
147
148
  }
@@ -1,937 +0,0 @@
1
- ## API Report File for "@atlaskit/smart-card"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- /// <reference types="react" />
8
-
9
- import { APIError } from '@atlaskit/linking-common';
10
- import { Appearance } from '@atlaskit/button/types';
11
- import { BlockCardAdf } from '@atlaskit/linking-common';
12
- import { CardAdf } from '@atlaskit/linking-common';
13
- import { CardAppearance } from '@atlaskit/linking-common';
14
- import { CardContext } from '@atlaskit/link-provider';
15
- import { CardPlatform } from '@atlaskit/link-extractors';
16
- import { CardType } from '@atlaskit/linking-common';
17
- import { CardClient as Client } from '@atlaskit/link-provider';
18
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
19
- import { DatasourceAdf } from '@atlaskit/linking-common';
20
- import { DatasourceAdfView } from '@atlaskit/linking-common';
21
- import { EditorCardProvider } from '@atlaskit/link-provider';
22
- import { editorCardProvider } from '@atlaskit/link-provider';
23
- import { EmbedCardAdf } from '@atlaskit/linking-common';
24
- import { ErrorInfo } from 'react';
25
- import { GasPayload } from '@atlaskit/analytics-gas-types';
26
- import { InlineCardAdf } from '@atlaskit/linking-common';
27
- import { JsonLd } from 'json-ld-types';
28
- import { MessageDescriptor } from 'react-intl-next';
29
- import { SmartCardProvider as Provider } from '@atlaskit/link-provider';
30
- import { ProviderProps } from '@atlaskit/link-provider';
31
- import { default as React_2 } from 'react';
32
- import { ReactChild } from 'react';
33
- import { Ref } from 'react';
34
- import { SerializedStyles } from '@emotion/react';
35
- import { SmartCardContext } from '@atlaskit/link-provider';
36
- import { SmartLinkActionType } from '@atlaskit/linking-types';
37
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
38
- import { WithContextProps } from '@atlaskit/analytics-next';
39
- import { WithIntlProps } from 'react-intl-next';
40
- import { WrappedComponentProps } from 'react-intl-next';
41
-
42
- // @public (undocumented)
43
- export type ActionItem = CustomActionItem | NamedActionItem | NamedDataActionItem;
44
-
45
- // @public
46
- export enum ActionName {
47
- // (undocumented)
48
- CustomAction = "CustomAction",
49
- // (undocumented)
50
- DeleteAction = "DeleteAction",
51
- // (undocumented)
52
- DownloadAction = "DownloadAction",
53
- // (undocumented)
54
- EditAction = "EditAction",
55
- // (undocumented)
56
- PreviewAction = "PreviewAction",
57
- // (undocumented)
58
- ViewAction = "ViewAction"
59
- }
60
-
61
- // @public (undocumented)
62
- type ActionProps = {
63
- size?: SmartLinkSize;
64
- content?: React.ReactNode;
65
- appearance?: Appearance;
66
- onClick: () => any;
67
- icon?: ReactChild;
68
- iconPosition?: 'after' | 'before';
69
- tooltipMessage?: React.ReactNode;
70
- asDropDownItem?: boolean;
71
- overrideCss?: SerializedStyles;
72
- testId?: string;
73
- };
74
-
75
- // @public (undocumented)
76
- export type AnalyticsAction = 'authStarted' | 'chunkLoadFailed' | 'clicked' | 'closed' | 'connectFailed' | 'connectSucceeded' | 'connected' | 'created' | 'dismissed' | 'dwelled' | 'failed' | 'focused' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'started' | 'success' | 'unresolved' | 'updated' | 'viewed';
77
-
78
- // @public (undocumented)
79
- export type AnalyticsActionSubject = 'applicationAccount' | 'button' | 'consentModal' | 'embedPreviewModal' | 'hoverCard' | 'link' | 'modal' | 'smartLink' | 'smartLinkAction' | 'smartLinkIframe' | 'smartLinkQuickAction';
80
-
81
- // @public (undocumented)
82
- type AnalyticsFacade = ReturnType<typeof useSmartLinkAnalytics>;
83
-
84
- // @public (undocumented)
85
- export type AnalyticsHandler = (event: AnalyticsPayload) => void;
86
-
87
- // @public (undocumented)
88
- type AnalyticsName = 'embedPreviewModal';
89
-
90
- // @public (undocumented)
91
- export type AnalyticsPayload = GasPayload & {
92
- action?: AnalyticsAction;
93
- actionSubject: AnalyticsActionSubject;
94
- attributes: GasPayload['attributes'] & {
95
- display?: CardInnerAppearance;
96
- };
97
- };
98
-
99
- // @public (undocumented)
100
- type AnchorTarget = '_blank' | '_parent' | '_self' | '_top';
101
-
102
- export { APIError }
103
-
104
- // @public
105
- type AttachmentCount = {
106
- name: ElementName.AttachmentCount;
107
- };
108
-
109
- // @public
110
- type AuthorGroup = {
111
- name: ElementName.AuthorGroup;
112
- };
113
-
114
- // @public
115
- type BaseActionItem = {
116
- hideContent?: boolean;
117
- hideIcon?: boolean;
118
- name: ActionName;
119
- onClick: () => any;
120
- overrideCss?: SerializedStyles;
121
- size?: SmartLinkSize;
122
- testId?: string;
123
- };
124
-
125
- // @public
126
- type BaseDataActionItem = {
127
- hideContent?: boolean;
128
- hideIcon?: boolean;
129
- name: ActionName;
130
- onClick?: () => any;
131
- overrideCss?: SerializedStyles;
132
- size?: SmartLinkSize;
133
- testId?: string;
134
- };
135
-
136
- export { BlockCardAdf }
137
-
138
- // @public (undocumented)
139
- export const blockCardContentClassName = "block-card-content";
140
-
141
- // @public (undocumented)
142
- export const blockCardContentHeaderClassName = "block-card-content-header";
143
-
144
- // @public (undocumented)
145
- export const blockCardContentHeaderNameClassName = "block-card-content-header-name";
146
-
147
- // @public (undocumented)
148
- export const blockCardErroredViewClassName = "block-card-errored-view";
149
-
150
- // @public (undocumented)
151
- export const blockCardForbiddenViewClassName = "block-card-forbidden-view";
152
-
153
- // @public (undocumented)
154
- export const blockCardForbiddenViewLinkClassName = "block-card-forbidden-view-link";
155
-
156
- // @public (undocumented)
157
- export const blockCardIconImageClassName = "block-card-icon-image";
158
-
159
- // @public (undocumented)
160
- export const blockCardNotFoundViewClassName = "block-card-not-found-view";
161
-
162
- // @public (undocumented)
163
- export const blockCardResolvedViewByClassName = "block-card-resolved-view-by";
164
-
165
- // @public (undocumented)
166
- export const blockCardResolvedViewClassName = "block-card-resolved-view";
167
-
168
- // @public (undocumented)
169
- export const blockCardResolvingViewClassName = "block-card-resolving-view";
170
-
171
- // @public (undocumented)
172
- type BlockProps = {
173
- direction?: SmartLinkDirection;
174
- overrideCss?: SerializedStyles;
175
- size?: SmartLinkSize;
176
- status?: SmartLinkStatus;
177
- testId?: string;
178
- blockRef?: Ref<HTMLDivElement>;
179
- onRender?: () => void;
180
- onTransitionEnd?: () => void;
181
- };
182
-
183
- // @public (undocumented)
184
- export const Card: React_2.ForwardRefExoticComponent<Pick<Omit<React_2.PropsWithChildren<WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof WithAnalyticsEventsProps> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "analyticsEvents" | "appearance" | "children" | "container" | "data" | "embedIframeRef" | "embedIframeUrlType" | "fallbackComponent" | "forwardedRef" | "frameStyle" | "id" | "importer" | "inheritDimensions" | "inlinePreloaderStyle" | "isFrameVisible" | "isSelected" | "key" | "onClick" | "onError" | "onResolve" | "placeholder" | "platform" | "showActions" | "showAuthTooltip" | "showHoverPreview" | "showServerActions" | "testId" | "ui" | "url"> & React_2.RefAttributes<any>>;
185
-
186
- export { CardAdf }
187
-
188
- export { CardAppearance }
189
-
190
- export { CardContext }
191
-
192
- // @public (undocumented)
193
- type CardInnerAppearance = 'embedPreview' | 'flexible' | 'hoverCardPreview' | CardAppearance;
194
-
195
- export { CardPlatform }
196
-
197
- // @public (undocumented)
198
- export interface CardProps extends WithAnalyticsEventsProps {
199
- // @deprecated (undocumented)
200
- analyticsEvents?: AnalyticsFacade;
201
- // (undocumented)
202
- appearance: CardAppearance;
203
- // (undocumented)
204
- children?: React.ReactNode;
205
- // (undocumented)
206
- container?: HTMLElement;
207
- // @deprecated (undocumented)
208
- data?: any;
209
- // (undocumented)
210
- embedIframeRef?: React.Ref<HTMLIFrameElement>;
211
- // (undocumented)
212
- embedIframeUrlType?: EmbedIframeUrlType;
213
- fallbackComponent?: React.ComponentType;
214
- frameStyle?: FrameStyle;
215
- // (undocumented)
216
- id?: string;
217
- // (undocumented)
218
- importer?: (target: any) => void;
219
- inheritDimensions?: boolean;
220
- // (undocumented)
221
- inlinePreloaderStyle?: InlinePreloaderStyle;
222
- // @deprecated (undocumented)
223
- isFrameVisible?: boolean;
224
- // (undocumented)
225
- isSelected?: boolean;
226
- // (undocumented)
227
- onClick?: React.EventHandler<React.KeyboardEvent | React.MouseEvent>;
228
- onError?: OnErrorCallback;
229
- // (undocumented)
230
- onResolve?: OnResolveCallback;
231
- // (undocumented)
232
- placeholder?: string;
233
- // (undocumented)
234
- platform?: CardPlatform;
235
- showActions?: boolean;
236
- // (undocumented)
237
- showAuthTooltip?: boolean;
238
- // (undocumented)
239
- showHoverPreview?: boolean;
240
- showServerActions?: boolean;
241
- // (undocumented)
242
- testId?: string;
243
- // (undocumented)
244
- ui?: FlexibleUiOptions;
245
- // (undocumented)
246
- url?: string;
247
- }
248
-
249
- export { CardType }
250
-
251
- // @public
252
- type ChecklistProgress = {
253
- name: ElementName.ChecklistProgress;
254
- };
255
-
256
- export { Client }
257
-
258
- // @public
259
- type CollaboratorGroup = {
260
- name: ElementName.CollaboratorGroup;
261
- };
262
-
263
- // @public
264
- type CommentCount = {
265
- name: ElementName.CommentCount;
266
- };
267
-
268
- // @public (undocumented)
269
- interface CommonEventProps {
270
- // (undocumented)
271
- definitionId?: string;
272
- // (undocumented)
273
- destinatinoObjectType?: string;
274
- // (undocumented)
275
- destinationProduct?: DestinationProduct | string;
276
- // (undocumented)
277
- destinationSubproduct?: DestinationSubproduct | string;
278
- // (undocumented)
279
- extensionKey?: string;
280
- // (undocumented)
281
- id?: string;
282
- // (undocumented)
283
- location?: string;
284
- // (undocumented)
285
- resourceType?: string;
286
- // (undocumented)
287
- statusDetails?: string;
288
- }
289
-
290
- // @public (undocumented)
291
- type ConnectFailedEventProps = CommonEventProps & {
292
- id?: string;
293
- reason?: string;
294
- };
295
-
296
- // @public (undocumented)
297
- type ConnectSucceededEventProps = CommonEventProps & {
298
- id?: string;
299
- };
300
-
301
- // @public (undocumented)
302
- export const contentFooterClassName = "smart-link-content-footer";
303
-
304
- // @public
305
- type CreatedBy = {
306
- name: ElementName.CreatedBy;
307
- };
308
-
309
- // @public
310
- type CreatedOn = {
311
- name: ElementName.CreatedOn;
312
- text?: string;
313
- };
314
-
315
- // @public
316
- type CustomActionItem = BaseActionItem & {
317
- name: ActionName.CustomAction;
318
- } & (((Required<Pick<ActionProps, 'content'>> & Pick<ActionProps, 'icon' | 'iconPosition'>) & Pick<ActionProps, 'tooltipMessage'>) | (Required<Pick<ActionProps, 'icon' | 'iconPosition'>> & Pick<ActionProps, 'content'>));
319
-
320
- export { DatasourceAdf }
321
-
322
- export { DatasourceAdfView }
323
-
324
- // @public (undocumented)
325
- type DestinationProduct = 'bitbucket' | 'confluence' | 'jira' | 'trello';
326
-
327
- // @public (undocumented)
328
- type DestinationSubproduct = 'core' | 'servicedesk' | 'software';
329
-
330
- // @public
331
- type DueOn = {
332
- name: ElementName.DueOn;
333
- };
334
-
335
- export { EditorCardProvider }
336
-
337
- export { editorCardProvider }
338
-
339
- // @public
340
- export type ElementItem = {
341
- overrideCss?: SerializedStyles;
342
- size?: SmartLinkSize;
343
- testId?: string;
344
- } & ElementItemProps;
345
-
346
- // @public
347
- type ElementItemProps = AttachmentCount | AuthorGroup | ChecklistProgress | CollaboratorGroup | CommentCount | CreatedBy | CreatedOn | DueOn | LatestCommit | LinkIcon | Location_2 | ModifiedBy | ModifiedOn | OwnedBy | Preview | Priority | ProgrammingLanguage | Provider_2 | ReactCount | Snippet | SourceBranch | State_2 | SubscriberCount | TargetBranch | Title | ViewCount | VoteCount;
348
-
349
- // @public
350
- export enum ElementName {
351
- // (undocumented)
352
- AttachmentCount = "AttachmentCount",
353
- // (undocumented)
354
- AuthorGroup = "AuthorGroup",
355
- // (undocumented)
356
- ChecklistProgress = "ChecklistProgress",
357
- // (undocumented)
358
- CollaboratorGroup = "CollaboratorGroup",
359
- // (undocumented)
360
- CommentCount = "CommentCount",
361
- // (undocumented)
362
- CreatedBy = "CreatedBy",
363
- // (undocumented)
364
- CreatedOn = "CreatedOn",
365
- // (undocumented)
366
- DueOn = "DueOn",
367
- // (undocumented)
368
- LatestCommit = "LatestCommit",
369
- // (undocumented)
370
- LinkIcon = "LinkIcon",
371
- // (undocumented)
372
- Location = "Location",
373
- // (undocumented)
374
- ModifiedBy = "ModifiedBy",
375
- // (undocumented)
376
- ModifiedOn = "ModifiedOn",
377
- // (undocumented)
378
- OwnedBy = "OwnedBy",
379
- // (undocumented)
380
- Preview = "Preview",
381
- // (undocumented)
382
- Priority = "Priority",
383
- // (undocumented)
384
- ProgrammingLanguage = "ProgrammingLanguage",
385
- // (undocumented)
386
- Provider = "Provider",
387
- // (undocumented)
388
- ReactCount = "ReactCount",
389
- // (undocumented)
390
- Snippet = "Snippet",
391
- // (undocumented)
392
- SourceBranch = "SourceBranch",
393
- // (undocumented)
394
- State = "State",
395
- // (undocumented)
396
- SubscriberCount = "SubscriberCount",
397
- // (undocumented)
398
- TargetBranch = "TargetBranch",
399
- // (undocumented)
400
- Title = "Title",
401
- // (undocumented)
402
- ViewCount = "ViewCount",
403
- // (undocumented)
404
- VoteCount = "VoteCount"
405
- }
406
-
407
- export { EmbedCardAdf }
408
-
409
- // @public (undocumented)
410
- export const embedHeaderHeight = 32;
411
-
412
- // @public (undocumented)
413
- type EmbedIframeUrlType = 'href' | 'interactiveHref';
414
-
415
- // @public (undocumented)
416
- export class EmbedResizeMessageListener extends React_2.Component<Props, State> {
417
- // (undocumented)
418
- componentDidMount(): void;
419
- // (undocumented)
420
- componentWillUnmount(): void;
421
- // (undocumented)
422
- render(): React_2.ReactNode;
423
- }
424
-
425
- // @public (undocumented)
426
- type ErrorCardType = 'errored' | 'fallback' | 'forbidden' | 'not_found' | 'unauthorized';
427
-
428
- // @public (undocumented)
429
- type FlexibleUiOptions = {
430
- clickableContainer?: boolean;
431
- hideElevation?: boolean;
432
- hideHoverCardPreviewButton?: boolean;
433
- hidePadding?: boolean;
434
- hideBackground?: boolean;
435
- size?: SmartLinkSize;
436
- theme?: SmartLinkTheme;
437
- zIndex?: number;
438
- };
439
-
440
- // @public
441
- export const FooterBlock: React_2.FC<FooterBlockProps>;
442
-
443
- // @public (undocumented)
444
- type FooterBlockProps = {
445
- actions?: ActionItem[];
446
- onActionMenuOpenChange?: (options: OnActionMenuOpenChangeOptions) => void;
447
- } & BlockProps;
448
-
449
- // @public (undocumented)
450
- type FrameStyle = 'hide' | 'show' | 'showOnHover';
451
-
452
- export { InlineCardAdf }
453
-
454
- // @public (undocumented)
455
- type InlinePreloaderStyle = 'on-left-with-skeleton' | 'on-right-without-skeleton';
456
-
457
- // @public (undocumented)
458
- type InstrumentEventProps = CommonEventProps & {
459
- error?: APIError;
460
- status: CardType;
461
- id: string;
462
- };
463
-
464
- // @public (undocumented)
465
- type InvokeFailedEventProps = CommonEventProps & {
466
- id: string;
467
- actionType: string;
468
- display: CardInnerAppearance;
469
- reason: string;
470
- };
471
-
472
- // @public (undocumented)
473
- type InvokeSucceededEventProps = CommonEventProps & {
474
- id: string;
475
- actionType: string;
476
- display: CardInnerAppearance;
477
- };
478
-
479
- // @public (undocumented)
480
- type InvokeType = 'client' | 'server';
481
-
482
- // @public
483
- type LatestCommit = {
484
- name: ElementName.LatestCommit;
485
- };
486
-
487
- // @public
488
- type LinkIcon = {
489
- name: ElementName.LinkIcon;
490
- };
491
-
492
- // @public (undocumented)
493
- export const loadingPlaceholderClassName = "smart-link-loading-placeholder";
494
-
495
- // @public
496
- type Location_2 = {
497
- name: ElementName.Location;
498
- };
499
-
500
- // @public (undocumented)
501
- export enum MediaPlacement {
502
- // (undocumented)
503
- Left = "left",
504
- // (undocumented)
505
- Right = "right"
506
- }
507
-
508
- // @public
509
- export const MetadataBlock: React_2.FC<MetadataBlockProps>;
510
-
511
- // @public (undocumented)
512
- type MetadataBlockProps = {
513
- maxLines?: number;
514
- primary?: ElementItem[];
515
- secondary?: ElementItem[];
516
- } & BlockProps;
517
-
518
- // @public (undocumented)
519
- export const metadataListClassName = "smart-link-metadata-list";
520
-
521
- // @public
522
- type ModifiedBy = {
523
- name: ElementName.ModifiedBy;
524
- };
525
-
526
- // @public
527
- type ModifiedOn = {
528
- name: ElementName.ModifiedOn;
529
- text?: string;
530
- };
531
-
532
- // @public
533
- type NamedActionItem = BaseActionItem & {
534
- name: ActionName.DeleteAction | ActionName.EditAction;
535
- };
536
-
537
- // @public
538
- type NamedDataActionItem = BaseDataActionItem & {
539
- name: ActionName.DownloadAction | ActionName.PreviewAction | ActionName.ViewAction;
540
- };
541
-
542
- // @public (undocumented)
543
- export type OnActionMenuOpenChangeOptions = {
544
- isOpen: boolean;
545
- };
546
-
547
- // @public (undocumented)
548
- type OnErrorCallback = (data: {
549
- status: Extract<CardType, ErrorCardType>;
550
- url: string;
551
- err?: Error;
552
- }) => void;
553
-
554
- // @public (undocumented)
555
- type OnResolveCallback = (data: {
556
- url?: string;
557
- title?: string;
558
- aspectRatio?: number;
559
- }) => void;
560
-
561
- // @public
562
- type OwnedBy = {
563
- name: ElementName.OwnedBy;
564
- };
565
-
566
- // @public
567
- type Preview = {
568
- name: ElementName.Preview;
569
- };
570
-
571
- // @public
572
- export const PreviewBlock: React_2.FC<PreviewBlockProps>;
573
-
574
- // @public (undocumented)
575
- type PreviewBlockProps = {
576
- ignoreContainerPadding?: boolean;
577
- onError?: () => void;
578
- placement?: MediaPlacement;
579
- } & BlockProps;
580
-
581
- // @public (undocumented)
582
- type PreviewDisplay = 'card' | 'embed';
583
-
584
- // @public (undocumented)
585
- type PreviewInvokeMethod = 'keyboard' | 'mouse_click' | 'mouse_hover';
586
-
587
- // @public
588
- type Priority = {
589
- name: ElementName.Priority;
590
- };
591
-
592
- // @public
593
- type ProgrammingLanguage = {
594
- name: ElementName.ProgrammingLanguage;
595
- };
596
-
597
- // @public (undocumented)
598
- interface Props {
599
- // (undocumented)
600
- embedIframeRef: React_2.RefObject<HTMLIFrameElement>;
601
- // (undocumented)
602
- onHeightUpdate: (height: number) => void;
603
- }
604
-
605
- export { Provider }
606
-
607
- // @public
608
- type Provider_2 = {
609
- name: ElementName.Provider;
610
- };
611
-
612
- export { ProviderProps }
613
-
614
- // @public
615
- type ReactCount = {
616
- name: ElementName.ReactCount;
617
- };
618
-
619
- // @public (undocumented)
620
- export type ResolveResponse = JsonLd.Response;
621
-
622
- // @public
623
- type RetryOptions = {
624
- descriptor?: MessageDescriptor;
625
- onClick?: ((e: React.MouseEvent<HTMLElement>) => void) | undefined;
626
- values?: Record<string, string>;
627
- };
628
-
629
- // @public (undocumented)
630
- type ScreenAuthPopupEventProps = CommonEventProps;
631
-
632
- export { SmartCardContext as Context }
633
- export { SmartCardContext }
634
-
635
- // @public
636
- export enum SmartLinkDirection {
637
- // (undocumented)
638
- Horizontal = "horizontal",
639
- // (undocumented)
640
- Vertical = "vertical"
641
- }
642
-
643
- // @public (undocumented)
644
- export class SmartLinkEvents {
645
- // (undocumented)
646
- insertSmartLink(url: string, type: CardInnerAppearance, createAnalyticsEvent?: CreateUIAnalyticsEvent): void;
647
- }
648
-
649
- // @public
650
- export enum SmartLinkPosition {
651
- // (undocumented)
652
- Center = "center",
653
- // (undocumented)
654
- Top = "top"
655
- }
656
-
657
- // @public
658
- export enum SmartLinkSize {
659
- // (undocumented)
660
- Large = "large",
661
- // (undocumented)
662
- Medium = "medium",
663
- // (undocumented)
664
- Small = "small",
665
- // (undocumented)
666
- XLarge = "xlarge"
667
- }
668
-
669
- // @public
670
- enum SmartLinkStatus {
671
- // (undocumented)
672
- Errored = "errored",
673
- // (undocumented)
674
- Fallback = "fallback",
675
- // (undocumented)
676
- Forbidden = "forbidden",
677
- // (undocumented)
678
- NotFound = "not_found",
679
- // (undocumented)
680
- Pending = "pending",
681
- // (undocumented)
682
- Resolved = "resolved",
683
- // (undocumented)
684
- Resolving = "resolving",
685
- // (undocumented)
686
- Unauthorized = "unauthorized"
687
- }
688
-
689
- // @public
690
- export enum SmartLinkTheme {
691
- // (undocumented)
692
- Black = "black",
693
- // (undocumented)
694
- Link = "link"
695
- }
696
-
697
- // @public
698
- type Snippet = {
699
- name: ElementName.Snippet;
700
- };
701
-
702
- // @public
703
- export const SnippetBlock: React_2.FC<SnippetBlockProps>;
704
-
705
- // @public (undocumented)
706
- type SnippetBlockProps = {
707
- maxLines?: number;
708
- } & BlockProps;
709
-
710
- // @public
711
- type SourceBranch = {
712
- name: ElementName.SourceBranch;
713
- };
714
-
715
- // @public (undocumented)
716
- interface State {
717
- }
718
-
719
- // @public
720
- type State_2 = {
721
- name: ElementName.State;
722
- };
723
-
724
- // @public
725
- type SubscriberCount = {
726
- name: ElementName.SubscriberCount;
727
- };
728
-
729
- // @public
730
- type TargetBranch = {
731
- name: ElementName.TargetBranch;
732
- };
733
-
734
- // @public
735
- type Title = {
736
- name: ElementName.Title;
737
- };
738
-
739
- // @public
740
- export const TitleBlock: React_2.FC<TitleBlockProps>;
741
-
742
- // @public (undocumented)
743
- type TitleBlockProps = {
744
- actions?: ActionItem[];
745
- anchorTarget?: AnchorTarget;
746
- hideTitleTooltip?: boolean;
747
- maxLines?: number;
748
- metadata?: ElementItem[];
749
- onActionMenuOpenChange?: (options: OnActionMenuOpenChangeOptions) => void;
750
- position?: SmartLinkPosition;
751
- onClick?: React_2.EventHandler<React_2.KeyboardEvent | React_2.MouseEvent>;
752
- retry?: RetryOptions;
753
- hideRetry?: boolean;
754
- showActionOnHover?: boolean;
755
- subtitle?: ElementItem[];
756
- text?: string;
757
- theme?: SmartLinkTheme;
758
- metadataPosition?: SmartLinkPosition;
759
- } & BlockProps;
760
-
761
- // @public (undocumented)
762
- type TrackAppAccountConnectedProps = CommonEventProps;
763
-
764
- // @public (undocumented)
765
- enum TrackQuickActionFailureReason {
766
- // (undocumented)
767
- PermissionError = "PermissionError",
768
- // (undocumented)
769
- UnknownError = "UnknownError",
770
- // (undocumented)
771
- ValidationError = "ValidationError"
772
- }
773
-
774
- // @public (undocumented)
775
- enum TrackQuickActionType {
776
- // (undocumented)
777
- StatusUpdate = "StatusUpdate"
778
- }
779
-
780
- // @public (undocumented)
781
- type UiActionClickedEventProps = CommonEventProps & {
782
- id: string;
783
- display: CardInnerAppearance;
784
- actionType: string;
785
- invokeType?: InvokeType;
786
- };
787
-
788
- // @public (undocumented)
789
- type UiAuthAlternateAccountEventProps = CommonEventProps & {
790
- display: CardInnerAppearance;
791
- };
792
-
793
- // @public (undocumented)
794
- type UiAuthEventProps = CommonEventProps & {
795
- display: CardInnerAppearance;
796
- };
797
-
798
- // @public (undocumented)
799
- type UiCardClickedEventProps = CommonEventProps & {
800
- id: string;
801
- display: CardInnerAppearance;
802
- status: CardType;
803
- isModifierKeyPressed?: boolean;
804
- actionSubjectId?: string;
805
- };
806
-
807
- // @public (undocumented)
808
- type UiClosedAuthEventProps = CommonEventProps & {
809
- display: CardInnerAppearance;
810
- };
811
-
812
- // @public (undocumented)
813
- type UiHoverCardDismissedEventProps = CommonEventProps & {
814
- previewDisplay: PreviewDisplay;
815
- hoverTime: number;
816
- previewInvokeMethod?: PreviewInvokeMethod;
817
- status: CardType;
818
- };
819
-
820
- // @public (undocumented)
821
- type UiHoverCardOpenLinkClickedEventProps = CommonEventProps & {
822
- previewDisplay: PreviewDisplay;
823
- previewInvokeMethod?: PreviewInvokeMethod;
824
- };
825
-
826
- // @public (undocumented)
827
- type UiHoverCardViewedEventProps = CommonEventProps & {
828
- previewDisplay: PreviewDisplay;
829
- previewInvokeMethod?: PreviewInvokeMethod;
830
- status: CardType;
831
- };
832
-
833
- // @public (undocumented)
834
- type UiIframeDwelledEventProps = CommonEventProps & {
835
- id: string;
836
- display: CardInnerAppearance;
837
- status: CardType;
838
- dwellTime: number;
839
- dwellPercentVisible: number;
840
- };
841
-
842
- // @public (undocumented)
843
- type UiIframeFocusedEventProps = CommonEventProps & {
844
- id: string;
845
- display: CardInnerAppearance;
846
- status: CardType;
847
- };
848
-
849
- // @public (undocumented)
850
- type UiRenderFailedEventProps = CommonEventProps & {
851
- display: CardInnerAppearance;
852
- error: Error;
853
- errorInfo: ErrorInfo;
854
- };
855
-
856
- // @public (undocumented)
857
- type UiRenderSuccessEventProps = CommonEventProps & {
858
- display: CardInnerAppearance;
859
- status: CardType;
860
- };
861
-
862
- // @public @deprecated
863
- export const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: AnalyticsHandler, id?: string, defaultLocation?: string) => {
864
- ui: {
865
- authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthEventProps) => void;
866
- authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthAlternateAccountEventProps) => void;
867
- buttonClickedEvent: (data: Partial<AnalyticsPayload> & {
868
- actionSubjectId: Required<string>;
869
- }) => void;
870
- cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
871
- iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: UiIframeDwelledEventProps) => void;
872
- iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: UiIframeFocusedEventProps) => void;
873
- actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
874
- hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => void;
875
- closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => void;
876
- modalClosedEvent: (data: Partial<AnalyticsPayload> & {
877
- actionSubjectId: Required<string>;
878
- }) => void;
879
- renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderSuccessEventProps) => void;
880
- renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => void;
881
- hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardViewedEventProps) => void;
882
- hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardDismissedEventProps) => void;
883
- learnMoreClickedEvent: () => void;
884
- smartLinkLozengeActionClickedEvent: () => void;
885
- smartLinkLozengeActionListItemClickedEvent: () => void;
886
- smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
887
- };
888
- operational: {
889
- invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => void;
890
- invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
891
- connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectSucceededEventProps) => void;
892
- connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectFailedEventProps) => void;
893
- instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => void;
894
- chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => void;
895
- };
896
- track: {
897
- appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: TrackAppAccountConnectedProps) => void;
898
- appAccountAuthStarted: ({ extensionKey, location, }: TrackAppAccountConnectedProps) => void;
899
- linkUpdated: (props: CommonEventProps & {
900
- [key: string]: any;
901
- }) => void;
902
- smartLinkQuickActionStarted: (props: {
903
- smartLinkActionType: SmartLinkActionType | TrackQuickActionType;
904
- }) => void;
905
- smartLinkQuickActionSuccess: (props: {
906
- smartLinkActionType: SmartLinkActionType | TrackQuickActionType;
907
- }) => void;
908
- smartLinkQuickActionFailed: (props: {
909
- smartLinkActionType: SmartLinkActionType | TrackQuickActionType;
910
- reason?: TrackQuickActionFailureReason;
911
- step?: string;
912
- }) => void;
913
- };
914
- screen: {
915
- authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ScreenAuthPopupEventProps) => void;
916
- modalViewedEvent: (data: Partial<AnalyticsPayload> & {
917
- name: Extract<AnalyticsName, 'embedPreviewModal'>;
918
- }) => void;
919
- };
920
- };
921
-
922
- // @public (undocumented)
923
- export function useSmartLinkEvents(): SmartLinkEvents;
924
-
925
- // @public
926
- type ViewCount = {
927
- name: ElementName.ViewCount;
928
- };
929
-
930
- // @public
931
- type VoteCount = {
932
- name: ElementName.VoteCount;
933
- };
934
-
935
- // (No @packageDocumentation comment for this package)
936
-
937
- ```