@atlaskit/smart-card 26.9.1 → 26.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/hoverCard.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/FlexibleCard/components/container/index.js +1 -0
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +7 -3
- package/dist/cjs/view/HoverCard/index.js +18 -2
- package/dist/es2019/hoverCard.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -0
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +6 -3
- package/dist/es2019/view/HoverCard/index.js +14 -1
- package/dist/esm/hoverCard.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/FlexibleCard/components/container/index.js +1 -0
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +7 -3
- package/dist/esm/view/HoverCard/index.js +15 -0
- package/dist/types/hoverCard.d.ts +1 -1
- package/dist/types/view/HoverCard/index.d.ts +13 -2
- package/dist/types/view/HoverCard/types.d.ts +14 -1
- package/dist/types-ts4.5/hoverCard.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/index.d.ts +13 -2
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +14 -1
- package/package.json +1 -15
- package/tmp/api-report-tmp.d.ts +0 -937
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.9.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`99643bdd534`](https://bitbucket.org/atlassian/atlassian-frontend/commits/99643bdd534) - Fix flexible smart links onclick event not bubble up when hover preview is enabled
|
|
8
|
+
|
|
3
9
|
## 26.9.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/hoverCard.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "HoverCard", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function get() {
|
|
9
|
-
return _HoverCard.
|
|
9
|
+
return _HoverCard.StandaloneHoverCard;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
var _HoverCard = require("./view/HoverCard");
|
package/dist/cjs/version.json
CHANGED
|
@@ -200,6 +200,7 @@ var Container = function Container(_ref3) {
|
|
|
200
200
|
if (context !== null && context !== void 0 && context.url && (canShowHoverPreview || canShowAuthTooltip)) {
|
|
201
201
|
return (0, _react2.jsx)(_HoverCard.HoverCard, {
|
|
202
202
|
url: context === null || context === void 0 ? void 0 : context.url,
|
|
203
|
+
allowEventPropagation: true,
|
|
203
204
|
canOpen: hoverCardCanOpen,
|
|
204
205
|
closeOnChildClick: true,
|
|
205
206
|
hidePreviewButton: hideHoverCardPreviewButton
|
|
@@ -41,7 +41,9 @@ var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
41
41
|
_ref$hidePreviewButto = _ref.hidePreviewButton,
|
|
42
42
|
hidePreviewButton = _ref$hidePreviewButto === void 0 ? false : _ref$hidePreviewButto,
|
|
43
43
|
_ref$showServerAction = _ref.showServerActions,
|
|
44
|
-
showServerActions = _ref$showServerAction === void 0 ? false : _ref$showServerAction
|
|
44
|
+
showServerActions = _ref$showServerAction === void 0 ? false : _ref$showServerAction,
|
|
45
|
+
_ref$allowEventPropag = _ref.allowEventPropagation,
|
|
46
|
+
allowEventPropagation = _ref$allowEventPropag === void 0 ? false : _ref$allowEventPropag;
|
|
45
47
|
var _React$useState = _react2.default.useState(false),
|
|
46
48
|
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
47
49
|
isOpen = _React$useState2[0],
|
|
@@ -165,11 +167,13 @@ var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
165
167
|
|
|
166
168
|
// Stop hover preview content to propagate event to parent.
|
|
167
169
|
var onChildClick = (0, _react2.useCallback)(function (e) {
|
|
168
|
-
|
|
170
|
+
if (!allowEventPropagation) {
|
|
171
|
+
e.stopPropagation();
|
|
172
|
+
}
|
|
169
173
|
if (closeOnChildClick) {
|
|
170
174
|
hideCard();
|
|
171
175
|
}
|
|
172
|
-
}, [closeOnChildClick, hideCard]);
|
|
176
|
+
}, [allowEventPropagation, closeOnChildClick, hideCard]);
|
|
173
177
|
var content = (0, _react2.useCallback)(function (_ref2) {
|
|
174
178
|
var update = _ref2.update;
|
|
175
179
|
var hoverCardContentProps = {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.HoverCard = void 0;
|
|
6
|
+
exports.StandaloneHoverCard = exports.HoverCard = void 0;
|
|
7
7
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
9
|
var _react2 = require("react");
|
|
@@ -32,7 +32,23 @@ var HoverCardWithErrorBoundary = function HoverCardWithErrorBoundary(props) {
|
|
|
32
32
|
}, (0, _react.jsx)(_HoverCardComponent.HoverCardComponent, props, children));
|
|
33
33
|
};
|
|
34
34
|
var HoverCardWithoutAnalyticsContext = (0, _analyticsNext.withAnalyticsEvents)()(HoverCardWithErrorBoundary);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* A hover preview component using within smart links,
|
|
38
|
+
* e.g. inline card's hover preview and auth tooltip, flexible card's hover preview.
|
|
39
|
+
*
|
|
40
|
+
* This component contains additional props that smart-card internal components
|
|
41
|
+
* use to configure hover preview behaviour.
|
|
42
|
+
*/
|
|
35
43
|
var HoverCard = function HoverCard(props) {
|
|
36
44
|
return (0, _react.jsx)(HoverCardWithoutAnalyticsContext, props);
|
|
37
45
|
};
|
|
38
|
-
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* A standalone hover preview component
|
|
49
|
+
*/
|
|
50
|
+
exports.HoverCard = HoverCard;
|
|
51
|
+
var StandaloneHoverCard = function StandaloneHoverCard(props) {
|
|
52
|
+
return (0, _react.jsx)(HoverCard, props);
|
|
53
|
+
};
|
|
54
|
+
exports.StandaloneHoverCard = StandaloneHoverCard;
|
package/dist/es2019/hoverCard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { HoverCard } from './view/HoverCard';
|
|
1
|
+
export { StandaloneHoverCard as HoverCard } from './view/HoverCard';
|
package/dist/es2019/version.json
CHANGED
|
@@ -217,6 +217,7 @@ const Container = ({
|
|
|
217
217
|
if (context !== null && context !== void 0 && context.url && (canShowHoverPreview || canShowAuthTooltip)) {
|
|
218
218
|
return jsx(HoverCard, {
|
|
219
219
|
url: context === null || context === void 0 ? void 0 : context.url,
|
|
220
|
+
allowEventPropagation: true,
|
|
220
221
|
canOpen: hoverCardCanOpen,
|
|
221
222
|
closeOnChildClick: true,
|
|
222
223
|
hidePreviewButton: hideHoverCardPreviewButton
|
|
@@ -24,7 +24,8 @@ export const HoverCardComponent = ({
|
|
|
24
24
|
canOpen = true,
|
|
25
25
|
closeOnChildClick = false,
|
|
26
26
|
hidePreviewButton = false,
|
|
27
|
-
showServerActions = false
|
|
27
|
+
showServerActions = false,
|
|
28
|
+
allowEventPropagation = false
|
|
28
29
|
}) => {
|
|
29
30
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
30
31
|
const fadeOutTimeoutId = useRef();
|
|
@@ -144,11 +145,13 @@ export const HoverCardComponent = ({
|
|
|
144
145
|
|
|
145
146
|
// Stop hover preview content to propagate event to parent.
|
|
146
147
|
const onChildClick = useCallback(e => {
|
|
147
|
-
|
|
148
|
+
if (!allowEventPropagation) {
|
|
149
|
+
e.stopPropagation();
|
|
150
|
+
}
|
|
148
151
|
if (closeOnChildClick) {
|
|
149
152
|
hideCard();
|
|
150
153
|
}
|
|
151
|
-
}, [closeOnChildClick, hideCard]);
|
|
154
|
+
}, [allowEventPropagation, closeOnChildClick, hideCard]);
|
|
152
155
|
const content = useCallback(({
|
|
153
156
|
update
|
|
154
157
|
}) => {
|
|
@@ -27,6 +27,19 @@ const HoverCardWithErrorBoundary = props => {
|
|
|
27
27
|
}, jsx(HoverCardComponent, props, children));
|
|
28
28
|
};
|
|
29
29
|
const HoverCardWithoutAnalyticsContext = withAnalyticsEvents()(HoverCardWithErrorBoundary);
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* A hover preview component using within smart links,
|
|
33
|
+
* e.g. inline card's hover preview and auth tooltip, flexible card's hover preview.
|
|
34
|
+
*
|
|
35
|
+
* This component contains additional props that smart-card internal components
|
|
36
|
+
* use to configure hover preview behaviour.
|
|
37
|
+
*/
|
|
30
38
|
export const HoverCard = props => {
|
|
31
39
|
return jsx(HoverCardWithoutAnalyticsContext, props);
|
|
32
|
-
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* A standalone hover preview component
|
|
44
|
+
*/
|
|
45
|
+
export const StandaloneHoverCard = props => jsx(HoverCard, props);
|
package/dist/esm/hoverCard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { HoverCard } from './view/HoverCard';
|
|
1
|
+
export { StandaloneHoverCard as HoverCard } from './view/HoverCard';
|
package/dist/esm/version.json
CHANGED
|
@@ -189,6 +189,7 @@ var Container = function Container(_ref3) {
|
|
|
189
189
|
if (context !== null && context !== void 0 && context.url && (canShowHoverPreview || canShowAuthTooltip)) {
|
|
190
190
|
return jsx(HoverCard, {
|
|
191
191
|
url: context === null || context === void 0 ? void 0 : context.url,
|
|
192
|
+
allowEventPropagation: true,
|
|
192
193
|
canOpen: hoverCardCanOpen,
|
|
193
194
|
closeOnChildClick: true,
|
|
194
195
|
hidePreviewButton: hideHoverCardPreviewButton
|
|
@@ -30,7 +30,9 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
30
30
|
_ref$hidePreviewButto = _ref.hidePreviewButton,
|
|
31
31
|
hidePreviewButton = _ref$hidePreviewButto === void 0 ? false : _ref$hidePreviewButto,
|
|
32
32
|
_ref$showServerAction = _ref.showServerActions,
|
|
33
|
-
showServerActions = _ref$showServerAction === void 0 ? false : _ref$showServerAction
|
|
33
|
+
showServerActions = _ref$showServerAction === void 0 ? false : _ref$showServerAction,
|
|
34
|
+
_ref$allowEventPropag = _ref.allowEventPropagation,
|
|
35
|
+
allowEventPropagation = _ref$allowEventPropag === void 0 ? false : _ref$allowEventPropag;
|
|
34
36
|
var _React$useState = React.useState(false),
|
|
35
37
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
36
38
|
isOpen = _React$useState2[0],
|
|
@@ -154,11 +156,13 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
154
156
|
|
|
155
157
|
// Stop hover preview content to propagate event to parent.
|
|
156
158
|
var onChildClick = useCallback(function (e) {
|
|
157
|
-
|
|
159
|
+
if (!allowEventPropagation) {
|
|
160
|
+
e.stopPropagation();
|
|
161
|
+
}
|
|
158
162
|
if (closeOnChildClick) {
|
|
159
163
|
hideCard();
|
|
160
164
|
}
|
|
161
|
-
}, [closeOnChildClick, hideCard]);
|
|
165
|
+
}, [allowEventPropagation, closeOnChildClick, hideCard]);
|
|
162
166
|
var content = useCallback(function (_ref2) {
|
|
163
167
|
var update = _ref2.update;
|
|
164
168
|
var hoverCardContentProps = {
|
|
@@ -25,6 +25,21 @@ var HoverCardWithErrorBoundary = function HoverCardWithErrorBoundary(props) {
|
|
|
25
25
|
}, jsx(HoverCardComponent, props, children));
|
|
26
26
|
};
|
|
27
27
|
var HoverCardWithoutAnalyticsContext = withAnalyticsEvents()(HoverCardWithErrorBoundary);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A hover preview component using within smart links,
|
|
31
|
+
* e.g. inline card's hover preview and auth tooltip, flexible card's hover preview.
|
|
32
|
+
*
|
|
33
|
+
* This component contains additional props that smart-card internal components
|
|
34
|
+
* use to configure hover preview behaviour.
|
|
35
|
+
*/
|
|
28
36
|
export var HoverCard = function HoverCard(props) {
|
|
29
37
|
return jsx(HoverCardWithoutAnalyticsContext, props);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* A standalone hover preview component
|
|
42
|
+
*/
|
|
43
|
+
export var StandaloneHoverCard = function StandaloneHoverCard(props) {
|
|
44
|
+
return jsx(HoverCard, props);
|
|
30
45
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { HoverCard } from './view/HoverCard';
|
|
1
|
+
export { StandaloneHoverCard as HoverCard } from './view/HoverCard';
|
|
2
2
|
export type { HoverCardProps } from './view/HoverCard/types';
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import { HoverCardProps } from './types';
|
|
3
|
-
|
|
2
|
+
import { HoverCardInternalProps, HoverCardProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A hover preview component using within smart links,
|
|
5
|
+
* e.g. inline card's hover preview and auth tooltip, flexible card's hover preview.
|
|
6
|
+
*
|
|
7
|
+
* This component contains additional props that smart-card internal components
|
|
8
|
+
* use to configure hover preview behaviour.
|
|
9
|
+
*/
|
|
10
|
+
export declare const HoverCard: (props: HoverCardProps & HoverCardInternalProps) => jsx.JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* A standalone hover preview component
|
|
13
|
+
*/
|
|
14
|
+
export declare const StandaloneHoverCard: (props: HoverCardProps) => jsx.JSX.Element;
|
|
@@ -43,7 +43,20 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
|
43
43
|
*/
|
|
44
44
|
showServerActions?: boolean;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
/**
|
|
47
|
+
* An internal props that internal smart-card components can use to configure
|
|
48
|
+
* hover preview behaviour. The prop contains here are suitable for unsafe
|
|
49
|
+
* or experiment props that will not be or are yet ready to be available on
|
|
50
|
+
* standalone hover card.
|
|
51
|
+
*/
|
|
52
|
+
export interface HoverCardInternalProps {
|
|
53
|
+
/**
|
|
54
|
+
* Allow click event to bubble up from hover preview trigger component.
|
|
55
|
+
* @see EDM-7187 for further details
|
|
56
|
+
*/
|
|
57
|
+
allowEventPropagation?: boolean;
|
|
58
|
+
}
|
|
59
|
+
export interface HoverCardComponentProps extends HoverCardProps, HoverCardInternalProps {
|
|
47
60
|
analyticsHandler?: AnalyticsHandler;
|
|
48
61
|
analytics?: AnalyticsFacade;
|
|
49
62
|
canOpen?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { HoverCard } from './view/HoverCard';
|
|
1
|
+
export { StandaloneHoverCard as HoverCard } from './view/HoverCard';
|
|
2
2
|
export type { HoverCardProps } from './view/HoverCard/types';
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import { HoverCardProps } from './types';
|
|
3
|
-
|
|
2
|
+
import { HoverCardInternalProps, HoverCardProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A hover preview component using within smart links,
|
|
5
|
+
* e.g. inline card's hover preview and auth tooltip, flexible card's hover preview.
|
|
6
|
+
*
|
|
7
|
+
* This component contains additional props that smart-card internal components
|
|
8
|
+
* use to configure hover preview behaviour.
|
|
9
|
+
*/
|
|
10
|
+
export declare const HoverCard: (props: HoverCardProps & HoverCardInternalProps) => jsx.JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* A standalone hover preview component
|
|
13
|
+
*/
|
|
14
|
+
export declare const StandaloneHoverCard: (props: HoverCardProps) => jsx.JSX.Element;
|
|
@@ -43,7 +43,20 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
|
43
43
|
*/
|
|
44
44
|
showServerActions?: boolean;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
/**
|
|
47
|
+
* An internal props that internal smart-card components can use to configure
|
|
48
|
+
* hover preview behaviour. The prop contains here are suitable for unsafe
|
|
49
|
+
* or experiment props that will not be or are yet ready to be available on
|
|
50
|
+
* standalone hover card.
|
|
51
|
+
*/
|
|
52
|
+
export interface HoverCardInternalProps {
|
|
53
|
+
/**
|
|
54
|
+
* Allow click event to bubble up from hover preview trigger component.
|
|
55
|
+
* @see EDM-7187 for further details
|
|
56
|
+
*/
|
|
57
|
+
allowEventPropagation?: boolean;
|
|
58
|
+
}
|
|
59
|
+
export interface HoverCardComponentProps extends HoverCardProps, HoverCardInternalProps {
|
|
47
60
|
analyticsHandler?: AnalyticsHandler;
|
|
48
61
|
analytics?: AnalyticsFacade;
|
|
49
62
|
canOpen?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.9.
|
|
3
|
+
"version": "26.9.2",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -79,25 +79,11 @@
|
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@atlaskit/avatar": "^21.3.0",
|
|
82
|
-
"@atlaskit/checkbox": "^12.6.0",
|
|
83
|
-
"@atlaskit/code": "^14.6.0",
|
|
84
82
|
"@atlaskit/css-reset": "^6.5.0",
|
|
85
|
-
"@atlaskit/docs": "*",
|
|
86
|
-
"@atlaskit/form": "^8.11.0",
|
|
87
|
-
"@atlaskit/inline-message": "^11.5.0",
|
|
88
83
|
"@atlaskit/link-test-helpers": "^4.1.0",
|
|
89
84
|
"@atlaskit/lozenge": "^11.4.0",
|
|
90
85
|
"@atlaskit/media-integration-test-helpers": "^3.0.0",
|
|
91
86
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
92
|
-
"@atlaskit/page": "^12.3.0",
|
|
93
|
-
"@atlaskit/radio": "^5.6.0",
|
|
94
|
-
"@atlaskit/range": "^7.1.0",
|
|
95
|
-
"@atlaskit/section-message": "^6.4.0",
|
|
96
|
-
"@atlaskit/select": "^16.5.0",
|
|
97
|
-
"@atlaskit/table-tree": "^9.6.0",
|
|
98
|
-
"@atlaskit/tabs": "^13.4.0",
|
|
99
|
-
"@atlaskit/textfield": "^5.5.0",
|
|
100
|
-
"@atlaskit/toggle": "^12.6.0",
|
|
101
87
|
"@atlaskit/visual-regression": "*",
|
|
102
88
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
103
89
|
"@atlassian/feature-flags-test-utils": "^0.1.1",
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -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/linking-common';
|
|
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
|
-
```
|