@atlaskit/smart-card 33.0.0 → 33.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +0 -3
- package/dist/cjs/view/CardWithUrl/loader.js +0 -2
- package/dist/cjs/view/FlexibleCard/components/container/index.js +1 -4
- package/dist/cjs/view/FlexibleCard/index.js +0 -3
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +1 -4
- package/dist/cjs/view/InlineCard/index.js +0 -3
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +0 -3
- package/dist/es2019/view/CardWithUrl/loader.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/index.js +0 -3
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +1 -3
- package/dist/es2019/view/InlineCard/index.js +0 -3
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +0 -3
- package/dist/esm/view/CardWithUrl/loader.js +0 -2
- package/dist/esm/view/FlexibleCard/components/container/index.js +1 -4
- package/dist/esm/view/FlexibleCard/index.js +0 -3
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -4
- package/dist/esm/view/InlineCard/index.js +0 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +0 -5
- package/dist/types/view/CardWithUrl/types.d.ts +0 -4
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/container/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/types.d.ts +0 -6
- package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +1 -6
- package/dist/types/view/InlineCard/index.d.ts +1 -1
- package/dist/types/view/InlineCard/types.d.ts +0 -4
- package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
- package/dist/types-ts4.5/view/Card/types.d.ts +0 -5
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +0 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/container/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/container/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +0 -6
- package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +1 -6
- package/dist/types-ts4.5/view/InlineCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/types.d.ts +0 -4
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 33.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#98407](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98407)
|
|
8
|
+
[`1fcb5e982a41c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1fcb5e982a41c) -
|
|
9
|
+
[ux] Remove showAuthTooltip from smart-card
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 33.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
|
@@ -15,7 +15,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
var context = exports.context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "33.
|
|
18
|
+
packageVersion: "33.1.0"
|
|
19
19
|
};
|
|
20
20
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -48,7 +48,6 @@ function Component(_ref) {
|
|
|
48
48
|
children = _ref.children,
|
|
49
49
|
showHoverPreview = _ref.showHoverPreview,
|
|
50
50
|
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
51
|
-
showAuthTooltip = _ref.showAuthTooltip,
|
|
52
51
|
analyticsEvents = _ref.analyticsEvents,
|
|
53
52
|
removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle,
|
|
54
53
|
resolvingPlaceholder = _ref.resolvingPlaceholder,
|
|
@@ -214,7 +213,6 @@ function Component(_ref) {
|
|
|
214
213
|
ui: ui,
|
|
215
214
|
showHoverPreview: showHoverPreview,
|
|
216
215
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
217
|
-
showAuthTooltip: (0, _platformFeatureFlags.fg)('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
218
216
|
actionOptions: actionOptions,
|
|
219
217
|
url: url,
|
|
220
218
|
testId: testId,
|
|
@@ -246,7 +244,6 @@ function Component(_ref) {
|
|
|
246
244
|
inlinePreloaderStyle: inlinePreloaderStyle,
|
|
247
245
|
showHoverPreview: showHoverPreview,
|
|
248
246
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
249
|
-
showAuthTooltip: (0, _platformFeatureFlags.fg)('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
250
247
|
actionOptions: actionOptions,
|
|
251
248
|
removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
|
|
252
249
|
resolvingPlaceholder: resolvingPlaceholder,
|
|
@@ -68,7 +68,6 @@ function CardWithURLRenderer(props) {
|
|
|
68
68
|
ui = props.ui,
|
|
69
69
|
showHoverPreview = props.showHoverPreview,
|
|
70
70
|
hoverPreviewOptions = props.hoverPreviewOptions,
|
|
71
|
-
showAuthTooltip = props.showAuthTooltip,
|
|
72
71
|
placeholder = props.placeholder,
|
|
73
72
|
fallbackComponent = props.fallbackComponent,
|
|
74
73
|
removeTextHighlightingFromTitle = props.removeTextHighlightingFromTitle,
|
|
@@ -155,7 +154,6 @@ function CardWithURLRenderer(props) {
|
|
|
155
154
|
ui: ui,
|
|
156
155
|
showHoverPreview: showHoverPreview,
|
|
157
156
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
158
|
-
showAuthTooltip: (0, _platformFeatureFlags.fg)('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
159
157
|
placeholder: placeholder,
|
|
160
158
|
removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
|
|
161
159
|
resolvingPlaceholder: resolvingPlaceholder,
|
|
@@ -10,7 +10,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
14
|
var _constants = require("../../../../constants");
|
|
16
15
|
var _flexibleUiContext = require("../../../../state/flexible-ui-context");
|
|
@@ -185,8 +184,6 @@ var Container = function Container(_ref3) {
|
|
|
185
184
|
hidePadding = _ref3$hidePadding === void 0 ? false : _ref3$hidePadding,
|
|
186
185
|
onClick = _ref3.onClick,
|
|
187
186
|
retry = _ref3.retry,
|
|
188
|
-
_ref3$showAuthTooltip = _ref3.showAuthTooltip,
|
|
189
|
-
showAuthTooltip = _ref3$showAuthTooltip === void 0 ? false : _ref3$showAuthTooltip,
|
|
190
187
|
_ref3$showHoverPrevie = _ref3.showHoverPreview,
|
|
191
188
|
showHoverPreview = _ref3$showHoverPrevie === void 0 ? false : _ref3$showHoverPrevie,
|
|
192
189
|
hoverPreviewOptions = _ref3.hoverPreviewOptions,
|
|
@@ -203,7 +200,7 @@ var Container = function Container(_ref3) {
|
|
|
203
200
|
var canShowHoverPreview = showHoverPreview && status === 'resolved';
|
|
204
201
|
// `retry` object contains action that can be performed on
|
|
205
202
|
// unresolved link (unauthorized, forbidden, not found, etc.)
|
|
206
|
-
var canShowAuthTooltip =
|
|
203
|
+
var canShowAuthTooltip = showHoverPreview && status === 'unauthorized' && retry !== undefined;
|
|
207
204
|
var container = (0, _react2.jsx)("div", {
|
|
208
205
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
209
206
|
css: getContainerStyles(size, hideBackground, hideElevation, hidePadding, clickableContainer, childrenOptions),
|
|
@@ -9,7 +9,6 @@ exports.default = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
|
|
14
13
|
var _constants = require("../../constants");
|
|
15
14
|
var _flexibleUiContext = require("../../state/flexible-ui-context");
|
|
@@ -41,7 +40,6 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
41
40
|
onResolve = _ref.onResolve,
|
|
42
41
|
origin = _ref.origin,
|
|
43
42
|
renderers = _ref.renderers,
|
|
44
|
-
showAuthTooltip = _ref.showAuthTooltip,
|
|
45
43
|
showHoverPreview = _ref.showHoverPreview,
|
|
46
44
|
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
47
45
|
actionOptions = _ref.actionOptions,
|
|
@@ -118,7 +116,6 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
118
116
|
showHoverPreview: showHoverPreview,
|
|
119
117
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
120
118
|
actionOptions: actionOptions,
|
|
121
|
-
showAuthTooltip: (0, _platformFeatureFlags.fg)('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
122
119
|
status: status
|
|
123
120
|
}), children))));
|
|
124
121
|
};
|
|
@@ -10,7 +10,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
10
10
|
var _reactIntlNext = require("react-intl-next");
|
|
11
11
|
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
12
12
|
var _lockFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/lock-filled"));
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
14
|
var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-analytics-events");
|
|
16
15
|
var _messages = require("../../../messages");
|
|
@@ -34,8 +33,6 @@ var InlineCardUnauthorizedView = exports.InlineCardUnauthorizedView = function I
|
|
|
34
33
|
isSelected = _ref.isSelected,
|
|
35
34
|
_ref$testId = _ref.testId,
|
|
36
35
|
testId = _ref$testId === void 0 ? 'inline-card-unauthorized-view' : _ref$testId,
|
|
37
|
-
_ref$showAuthTooltip = _ref.showAuthTooltip,
|
|
38
|
-
showAuthTooltip = _ref$showAuthTooltip === void 0 ? false : _ref$showAuthTooltip,
|
|
39
36
|
_ref$showHoverPreview = _ref.showHoverPreview,
|
|
40
37
|
showHoverPreview = _ref$showHoverPreview === void 0 ? false : _ref$showHoverPreview,
|
|
41
38
|
truncateInline = _ref.truncateInline,
|
|
@@ -76,7 +73,7 @@ var InlineCardUnauthorizedView = exports.InlineCardUnauthorizedView = function I
|
|
|
76
73
|
onClick: onClick,
|
|
77
74
|
titleColor: "var(--ds-text-subtle, ".concat(_colors.N500, ")")
|
|
78
75
|
}), renderActionButton());
|
|
79
|
-
if (onAuthorise &&
|
|
76
|
+
if (onAuthorise && showHoverPreview) {
|
|
80
77
|
return /*#__PURE__*/_react.default.createElement(_HoverCard.HoverCard, {
|
|
81
78
|
url: url,
|
|
82
79
|
id: id
|
|
@@ -41,7 +41,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
41
41
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
42
42
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
43
43
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
44
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
45
44
|
var _constants = require("../../constants");
|
|
46
45
|
var _extractAccessContext = require("../../extractors/common/context/extractAccessContext");
|
|
47
46
|
var _inline = require("../../extractors/inline");
|
|
@@ -72,7 +71,6 @@ var InlineCard = exports.InlineCard = function InlineCard(_ref) {
|
|
|
72
71
|
inlinePreloaderStyle = _ref.inlinePreloaderStyle,
|
|
73
72
|
showHoverPreview = _ref.showHoverPreview,
|
|
74
73
|
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
75
|
-
showAuthTooltip = _ref.showAuthTooltip,
|
|
76
74
|
actionOptions = _ref.actionOptions,
|
|
77
75
|
removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle,
|
|
78
76
|
resolvingPlaceholder = _ref.resolvingPlaceholder,
|
|
@@ -146,7 +144,6 @@ var InlineCard = exports.InlineCard = function InlineCard(_ref) {
|
|
|
146
144
|
onClick: handleFrameClick,
|
|
147
145
|
onAuthorise: handleAuthorize,
|
|
148
146
|
testId: testIdWithStatus,
|
|
149
|
-
showAuthTooltip: (0, _platformFeatureFlags.fg)('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
150
147
|
showHoverPreview: showHoverPreview,
|
|
151
148
|
id: id,
|
|
152
149
|
analytics: analytics,
|
|
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
20
20
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
21
21
|
var PACKAGE_DATA = {
|
|
22
22
|
packageName: "@atlaskit/smart-card",
|
|
23
|
-
packageVersion: "33.
|
|
23
|
+
packageVersion: "33.1.0",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -3,7 +3,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
3
3
|
export const context = {
|
|
4
4
|
componentName: 'smart-cards',
|
|
5
5
|
packageName: "@atlaskit/smart-card",
|
|
6
|
-
packageVersion: "33.
|
|
6
|
+
packageVersion: "33.1.0"
|
|
7
7
|
};
|
|
8
8
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
9
9
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -38,7 +38,6 @@ function Component({
|
|
|
38
38
|
children,
|
|
39
39
|
showHoverPreview,
|
|
40
40
|
hoverPreviewOptions,
|
|
41
|
-
showAuthTooltip,
|
|
42
41
|
analyticsEvents,
|
|
43
42
|
removeTextHighlightingFromTitle,
|
|
44
43
|
resolvingPlaceholder,
|
|
@@ -202,7 +201,6 @@ function Component({
|
|
|
202
201
|
ui: ui,
|
|
203
202
|
showHoverPreview: showHoverPreview,
|
|
204
203
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
205
|
-
showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
206
204
|
actionOptions: actionOptions,
|
|
207
205
|
url: url,
|
|
208
206
|
testId: testId,
|
|
@@ -234,7 +232,6 @@ function Component({
|
|
|
234
232
|
inlinePreloaderStyle: inlinePreloaderStyle,
|
|
235
233
|
showHoverPreview: showHoverPreview,
|
|
236
234
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
237
|
-
showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
238
235
|
actionOptions: actionOptions,
|
|
239
236
|
removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
|
|
240
237
|
resolvingPlaceholder: resolvingPlaceholder,
|
|
@@ -45,7 +45,6 @@ export function CardWithURLRenderer(props) {
|
|
|
45
45
|
ui,
|
|
46
46
|
showHoverPreview,
|
|
47
47
|
hoverPreviewOptions,
|
|
48
|
-
showAuthTooltip,
|
|
49
48
|
placeholder,
|
|
50
49
|
fallbackComponent,
|
|
51
50
|
removeTextHighlightingFromTitle,
|
|
@@ -133,7 +132,6 @@ export function CardWithURLRenderer(props) {
|
|
|
133
132
|
ui,
|
|
134
133
|
showHoverPreview,
|
|
135
134
|
hoverPreviewOptions,
|
|
136
|
-
showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
137
135
|
placeholder,
|
|
138
136
|
removeTextHighlightingFromTitle,
|
|
139
137
|
resolvingPlaceholder,
|
|
@@ -7,7 +7,6 @@ import React, { useContext } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { di } from 'react-magnetic-di';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
import { N40 } from '@atlaskit/theme/colors';
|
|
12
11
|
import { MediaPlacement, SmartLinkSize, SmartLinkTheme } from '../../../../constants';
|
|
13
12
|
import { FlexibleUiContext } from '../../../../state/flexible-ui-context';
|
|
@@ -191,7 +190,6 @@ const Container = ({
|
|
|
191
190
|
hidePadding = false,
|
|
192
191
|
onClick,
|
|
193
192
|
retry,
|
|
194
|
-
showAuthTooltip = false,
|
|
195
193
|
showHoverPreview = false,
|
|
196
194
|
hoverPreviewOptions,
|
|
197
195
|
actionOptions,
|
|
@@ -205,7 +203,7 @@ const Container = ({
|
|
|
205
203
|
const canShowHoverPreview = showHoverPreview && status === 'resolved';
|
|
206
204
|
// `retry` object contains action that can be performed on
|
|
207
205
|
// unresolved link (unauthorized, forbidden, not found, etc.)
|
|
208
|
-
const canShowAuthTooltip =
|
|
206
|
+
const canShowAuthTooltip = showHoverPreview && status === 'unauthorized' && retry !== undefined;
|
|
209
207
|
const container = jsx("div", {
|
|
210
208
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
211
209
|
css: getContainerStyles(size, hideBackground, hideElevation, hidePadding, clickableContainer, childrenOptions),
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect, useMemo } from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
5
4
|
import { SmartLinkStatus } from '../../constants';
|
|
6
5
|
import { FlexibleUiAnalyticsContext, FlexibleUiContext, FlexibleUiOptionContext } from '../../state/flexible-ui-context';
|
|
@@ -27,7 +26,6 @@ const FlexibleCard = ({
|
|
|
27
26
|
onResolve,
|
|
28
27
|
origin,
|
|
29
28
|
renderers,
|
|
30
|
-
showAuthTooltip,
|
|
31
29
|
showHoverPreview,
|
|
32
30
|
hoverPreviewOptions,
|
|
33
31
|
actionOptions,
|
|
@@ -109,7 +107,6 @@ const FlexibleCard = ({
|
|
|
109
107
|
showHoverPreview: showHoverPreview,
|
|
110
108
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
111
109
|
actionOptions: actionOptions,
|
|
112
|
-
showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
113
110
|
status: status
|
|
114
111
|
}), children))));
|
|
115
112
|
};
|
|
@@ -3,7 +3,6 @@ import React from 'react';
|
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import Button from '@atlaskit/button';
|
|
5
5
|
import LockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { N500, R400 } from '@atlaskit/theme/colors';
|
|
8
7
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
9
8
|
import { messages } from '../../../messages';
|
|
@@ -26,7 +25,6 @@ export const InlineCardUnauthorizedView = ({
|
|
|
26
25
|
onClick,
|
|
27
26
|
isSelected,
|
|
28
27
|
testId = 'inline-card-unauthorized-view',
|
|
29
|
-
showAuthTooltip = false,
|
|
30
28
|
showHoverPreview = false,
|
|
31
29
|
truncateInline,
|
|
32
30
|
context
|
|
@@ -68,7 +66,7 @@ export const InlineCardUnauthorizedView = ({
|
|
|
68
66
|
onClick: onClick,
|
|
69
67
|
titleColor: `var(--ds-text-subtle, ${N500})`
|
|
70
68
|
}), renderActionButton());
|
|
71
|
-
if (onAuthorise &&
|
|
69
|
+
if (onAuthorise && showHoverPreview) {
|
|
72
70
|
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
73
71
|
url: url,
|
|
74
72
|
id: id
|
|
@@ -3,7 +3,6 @@ import React, { useEffect } from 'react';
|
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
4
|
import { extractProvider } from '@atlaskit/link-extractors';
|
|
5
5
|
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { SmartLinkStatus } from '../../constants';
|
|
8
7
|
import { extractRequestAccessContextImproved } from '../../extractors/common/context/extractAccessContext';
|
|
9
8
|
import { extractInlineProps } from '../../extractors/inline';
|
|
@@ -32,7 +31,6 @@ export const InlineCard = ({
|
|
|
32
31
|
inlinePreloaderStyle,
|
|
33
32
|
showHoverPreview,
|
|
34
33
|
hoverPreviewOptions,
|
|
35
|
-
showAuthTooltip,
|
|
36
34
|
actionOptions,
|
|
37
35
|
removeTextHighlightingFromTitle,
|
|
38
36
|
resolvingPlaceholder,
|
|
@@ -111,7 +109,6 @@ export const InlineCard = ({
|
|
|
111
109
|
onClick: handleFrameClick,
|
|
112
110
|
onAuthorise: handleAuthorize,
|
|
113
111
|
testId: testIdWithStatus,
|
|
114
|
-
showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
115
112
|
showHoverPreview: showHoverPreview,
|
|
116
113
|
id: id,
|
|
117
114
|
analytics: analytics,
|
|
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
10
10
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
11
11
|
const PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "33.
|
|
13
|
+
packageVersion: "33.1.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -8,7 +8,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
8
8
|
export var context = {
|
|
9
9
|
componentName: 'smart-cards',
|
|
10
10
|
packageName: "@atlaskit/smart-card",
|
|
11
|
-
packageVersion: "33.
|
|
11
|
+
packageVersion: "33.1.0"
|
|
12
12
|
};
|
|
13
13
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
14
14
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -38,7 +38,6 @@ function Component(_ref) {
|
|
|
38
38
|
children = _ref.children,
|
|
39
39
|
showHoverPreview = _ref.showHoverPreview,
|
|
40
40
|
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
41
|
-
showAuthTooltip = _ref.showAuthTooltip,
|
|
42
41
|
analyticsEvents = _ref.analyticsEvents,
|
|
43
42
|
removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle,
|
|
44
43
|
resolvingPlaceholder = _ref.resolvingPlaceholder,
|
|
@@ -204,7 +203,6 @@ function Component(_ref) {
|
|
|
204
203
|
ui: ui,
|
|
205
204
|
showHoverPreview: showHoverPreview,
|
|
206
205
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
207
|
-
showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
208
206
|
actionOptions: actionOptions,
|
|
209
207
|
url: url,
|
|
210
208
|
testId: testId,
|
|
@@ -236,7 +234,6 @@ function Component(_ref) {
|
|
|
236
234
|
inlinePreloaderStyle: inlinePreloaderStyle,
|
|
237
235
|
showHoverPreview: showHoverPreview,
|
|
238
236
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
239
|
-
showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
240
237
|
actionOptions: actionOptions,
|
|
241
238
|
removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
|
|
242
239
|
resolvingPlaceholder: resolvingPlaceholder,
|
|
@@ -55,7 +55,6 @@ export function CardWithURLRenderer(props) {
|
|
|
55
55
|
ui = props.ui,
|
|
56
56
|
showHoverPreview = props.showHoverPreview,
|
|
57
57
|
hoverPreviewOptions = props.hoverPreviewOptions,
|
|
58
|
-
showAuthTooltip = props.showAuthTooltip,
|
|
59
58
|
placeholder = props.placeholder,
|
|
60
59
|
fallbackComponent = props.fallbackComponent,
|
|
61
60
|
removeTextHighlightingFromTitle = props.removeTextHighlightingFromTitle,
|
|
@@ -142,7 +141,6 @@ export function CardWithURLRenderer(props) {
|
|
|
142
141
|
ui: ui,
|
|
143
142
|
showHoverPreview: showHoverPreview,
|
|
144
143
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
145
|
-
showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
146
144
|
placeholder: placeholder,
|
|
147
145
|
removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
|
|
148
146
|
resolvingPlaceholder: resolvingPlaceholder,
|
|
@@ -9,7 +9,6 @@ import React, { useContext } from 'react';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { di } from 'react-magnetic-di';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import { N40 } from '@atlaskit/theme/colors';
|
|
14
13
|
import { MediaPlacement, SmartLinkSize, SmartLinkTheme } from '../../../../constants';
|
|
15
14
|
import { FlexibleUiContext } from '../../../../state/flexible-ui-context';
|
|
@@ -176,8 +175,6 @@ var Container = function Container(_ref3) {
|
|
|
176
175
|
hidePadding = _ref3$hidePadding === void 0 ? false : _ref3$hidePadding,
|
|
177
176
|
onClick = _ref3.onClick,
|
|
178
177
|
retry = _ref3.retry,
|
|
179
|
-
_ref3$showAuthTooltip = _ref3.showAuthTooltip,
|
|
180
|
-
showAuthTooltip = _ref3$showAuthTooltip === void 0 ? false : _ref3$showAuthTooltip,
|
|
181
178
|
_ref3$showHoverPrevie = _ref3.showHoverPreview,
|
|
182
179
|
showHoverPreview = _ref3$showHoverPrevie === void 0 ? false : _ref3$showHoverPrevie,
|
|
183
180
|
hoverPreviewOptions = _ref3.hoverPreviewOptions,
|
|
@@ -194,7 +191,7 @@ var Container = function Container(_ref3) {
|
|
|
194
191
|
var canShowHoverPreview = showHoverPreview && status === 'resolved';
|
|
195
192
|
// `retry` object contains action that can be performed on
|
|
196
193
|
// unresolved link (unauthorized, forbidden, not found, etc.)
|
|
197
|
-
var canShowAuthTooltip =
|
|
194
|
+
var canShowAuthTooltip = showHoverPreview && status === 'unauthorized' && retry !== undefined;
|
|
198
195
|
var container = jsx("div", {
|
|
199
196
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
200
197
|
css: getContainerStyles(size, hideBackground, hideElevation, hidePadding, clickableContainer, childrenOptions),
|
|
@@ -3,7 +3,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import React, { useEffect, useMemo } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
8
7
|
import { SmartLinkStatus } from '../../constants';
|
|
9
8
|
import { FlexibleUiAnalyticsContext, FlexibleUiContext, FlexibleUiOptionContext } from '../../state/flexible-ui-context';
|
|
@@ -32,7 +31,6 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
32
31
|
onResolve = _ref.onResolve,
|
|
33
32
|
origin = _ref.origin,
|
|
34
33
|
renderers = _ref.renderers,
|
|
35
|
-
showAuthTooltip = _ref.showAuthTooltip,
|
|
36
34
|
showHoverPreview = _ref.showHoverPreview,
|
|
37
35
|
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
38
36
|
actionOptions = _ref.actionOptions,
|
|
@@ -109,7 +107,6 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
109
107
|
showHoverPreview: showHoverPreview,
|
|
110
108
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
111
109
|
actionOptions: actionOptions,
|
|
112
|
-
showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
113
110
|
status: status
|
|
114
111
|
}), children))));
|
|
115
112
|
};
|
|
@@ -3,7 +3,6 @@ import React from 'react';
|
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import Button from '@atlaskit/button';
|
|
5
5
|
import LockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { N500, R400 } from '@atlaskit/theme/colors';
|
|
8
7
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
9
8
|
import { messages } from '../../../messages';
|
|
@@ -27,8 +26,6 @@ export var InlineCardUnauthorizedView = function InlineCardUnauthorizedView(_ref
|
|
|
27
26
|
isSelected = _ref.isSelected,
|
|
28
27
|
_ref$testId = _ref.testId,
|
|
29
28
|
testId = _ref$testId === void 0 ? 'inline-card-unauthorized-view' : _ref$testId,
|
|
30
|
-
_ref$showAuthTooltip = _ref.showAuthTooltip,
|
|
31
|
-
showAuthTooltip = _ref$showAuthTooltip === void 0 ? false : _ref$showAuthTooltip,
|
|
32
29
|
_ref$showHoverPreview = _ref.showHoverPreview,
|
|
33
30
|
showHoverPreview = _ref$showHoverPreview === void 0 ? false : _ref$showHoverPreview,
|
|
34
31
|
truncateInline = _ref.truncateInline,
|
|
@@ -69,7 +66,7 @@ export var InlineCardUnauthorizedView = function InlineCardUnauthorizedView(_ref
|
|
|
69
66
|
onClick: onClick,
|
|
70
67
|
titleColor: "var(--ds-text-subtle, ".concat(N500, ")")
|
|
71
68
|
}), renderActionButton());
|
|
72
|
-
if (onAuthorise &&
|
|
69
|
+
if (onAuthorise && showHoverPreview) {
|
|
73
70
|
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
74
71
|
url: url,
|
|
75
72
|
id: id
|
|
@@ -3,7 +3,6 @@ import React, { useEffect } from 'react';
|
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
4
|
import { extractProvider } from '@atlaskit/link-extractors';
|
|
5
5
|
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { SmartLinkStatus } from '../../constants';
|
|
8
7
|
import { extractRequestAccessContextImproved } from '../../extractors/common/context/extractAccessContext';
|
|
9
8
|
import { extractInlineProps } from '../../extractors/inline';
|
|
@@ -33,7 +32,6 @@ export var InlineCard = function InlineCard(_ref) {
|
|
|
33
32
|
inlinePreloaderStyle = _ref.inlinePreloaderStyle,
|
|
34
33
|
showHoverPreview = _ref.showHoverPreview,
|
|
35
34
|
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
36
|
-
showAuthTooltip = _ref.showAuthTooltip,
|
|
37
35
|
actionOptions = _ref.actionOptions,
|
|
38
36
|
removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle,
|
|
39
37
|
resolvingPlaceholder = _ref.resolvingPlaceholder,
|
|
@@ -107,7 +105,6 @@ export var InlineCard = function InlineCard(_ref) {
|
|
|
107
105
|
onClick: handleFrameClick,
|
|
108
106
|
onAuthorise: handleAuthorize,
|
|
109
107
|
testId: testIdWithStatus,
|
|
110
|
-
showAuthTooltip: fg('platform_deprecate-showauthtooltip-smart-card') ? undefined : showAuthTooltip,
|
|
111
108
|
showHoverPreview: showHoverPreview,
|
|
112
109
|
id: id,
|
|
113
110
|
analytics: analytics,
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
var PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "33.
|
|
16
|
+
packageVersion: "33.1.0",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -3,5 +3,5 @@ import { type WrappedComponentProps } from 'react-intl-next';
|
|
|
3
3
|
import { type CardAppearance, type CardPlatform, type CardProps } from './types';
|
|
4
4
|
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<Omit<CardProps & WrappedComponentProps, "intl"> & {
|
|
5
5
|
forwardedRef?: React.Ref<any> | undefined;
|
|
6
|
-
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "testId" | "appearance" | "container" | "key" | "id" | "placeholder" | "children" | "onError" | "onClick" | "ui" | "actionOptions" | "hoverPreviewOptions" | "onResolve" | "showHoverPreview" | "
|
|
6
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "testId" | "appearance" | "container" | "key" | "id" | "placeholder" | "children" | "onError" | "onClick" | "ui" | "actionOptions" | "hoverPreviewOptions" | "onResolve" | "showHoverPreview" | "inlinePreloaderStyle" | "isHovered" | "removeTextHighlightingFromTitle" | "resolvingPlaceholder" | "truncateInline" | "fallbackComponent" | "isSelected" | "embedIframeRef" | "embedIframeUrlType" | "frameStyle" | "inheritDimensions" | "platform" | "analyticsContext" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
7
7
|
export type { CardAppearance, CardProps, CardPlatform };
|
|
@@ -48,11 +48,6 @@ interface HoverPreviewProps extends ActionProps {
|
|
|
48
48
|
* Configuration for hover card.
|
|
49
49
|
*/
|
|
50
50
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
51
|
-
/**
|
|
52
|
-
* Flag to display unresolved views on hover preview.
|
|
53
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
54
|
-
*/
|
|
55
|
-
showAuthTooltip?: boolean;
|
|
56
51
|
}
|
|
57
52
|
export interface BaseCardProps {
|
|
58
53
|
/**
|
|
@@ -27,10 +27,6 @@ export type CardWithUrlContentProps = {
|
|
|
27
27
|
children?: React.ReactNode;
|
|
28
28
|
showHoverPreview?: boolean;
|
|
29
29
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
32
|
-
*/
|
|
33
|
-
showAuthTooltip?: boolean;
|
|
34
30
|
analyticsEvents?: AnalyticsFacade;
|
|
35
31
|
placeholder?: string;
|
|
36
32
|
removeTextHighlightingFromTitle?: boolean;
|
|
@@ -10,5 +10,5 @@ export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: b
|
|
|
10
10
|
* @internal
|
|
11
11
|
* @see Block
|
|
12
12
|
*/
|
|
13
|
-
declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry,
|
|
13
|
+
declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry, showHoverPreview, hoverPreviewOptions, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
|
|
14
14
|
export default Container;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
2
|
import { type SmartLinkStatus } from '../../../../constants';
|
|
3
3
|
import { type FlexibleCardProps, type FlexibleUiOptions, type RetryOptions } from '../../types';
|
|
4
|
-
export type ContainerProps = PropsWithChildren<Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'hoverPreviewOptions' | 'actionOptions'
|
|
4
|
+
export type ContainerProps = PropsWithChildren<Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'hoverPreviewOptions' | 'actionOptions'> & FlexibleUiOptions & {
|
|
5
5
|
/**
|
|
6
6
|
* The options that determine the retry behaviour when a Smart Link errors.
|
|
7
7
|
*/
|
|
@@ -6,5 +6,5 @@ import { type FlexibleCardProps } from './types';
|
|
|
6
6
|
* Note: TitleBlock is mandatory for a Flexible Card to render.
|
|
7
7
|
* @see Container
|
|
8
8
|
*/
|
|
9
|
-
declare const FlexibleCard: ({ analytics, appearance, cardState, children, id, onAuthorize, onClick, onError, onResolve, origin, renderers,
|
|
9
|
+
declare const FlexibleCard: ({ analytics, appearance, cardState, children, id, onAuthorize, onClick, onError, onResolve, origin, renderers, showHoverPreview, hoverPreviewOptions, actionOptions, testId, ui, url, }: FlexibleCardProps) => JSX.Element;
|
|
10
10
|
export default FlexibleCard;
|
|
@@ -93,12 +93,6 @@ export type FlexibleCardProps = {
|
|
|
93
93
|
* Configuration options for hover preview
|
|
94
94
|
*/
|
|
95
95
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
96
|
-
/**
|
|
97
|
-
* Determines whether to show an unauthorised view of the hover card
|
|
98
|
-
* when a user hovers over a smartlink.
|
|
99
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
100
|
-
*/
|
|
101
|
-
showAuthTooltip?: boolean;
|
|
102
96
|
};
|
|
103
97
|
export type FlexibleUiOptions = {
|
|
104
98
|
/**
|
|
@@ -15,11 +15,6 @@ export interface InlineCardUnauthorizedViewProps {
|
|
|
15
15
|
isSelected?: boolean;
|
|
16
16
|
/** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
|
|
17
17
|
testId?: string;
|
|
18
|
-
/**
|
|
19
|
-
* A flag that determines is a tooltip should show up on hover over the unauthorised link
|
|
20
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
21
|
-
*/
|
|
22
|
-
showAuthTooltip?: boolean;
|
|
23
18
|
/** Enables showing a custom preview on hover of link */
|
|
24
19
|
showHoverPreview?: boolean;
|
|
25
20
|
/** A smart link id that may be used in analytics */
|
|
@@ -31,4 +26,4 @@ export interface InlineCardUnauthorizedViewProps {
|
|
|
31
26
|
/** Truncates the card to one line */
|
|
32
27
|
truncateInline?: boolean;
|
|
33
28
|
}
|
|
34
|
-
export declare const InlineCardUnauthorizedView: ({ url, id, icon, onAuthorise, onClick, isSelected, testId,
|
|
29
|
+
export declare const InlineCardUnauthorizedView: ({ url, id, icon, onAuthorise, onClick, isSelected, testId, showHoverPreview, truncateInline, context, }: InlineCardUnauthorizedViewProps) => JSX.Element;
|
|
@@ -6,4 +6,4 @@ import { InlineCardResolvingView } from './ResolvingView';
|
|
|
6
6
|
import { type InlineCardProps } from './types';
|
|
7
7
|
import { InlineCardUnauthorizedView } from './UnauthorisedView';
|
|
8
8
|
export { InlineCardResolvedView, InlineCardResolvingView, InlineCardErroredView, InlineCardForbiddenView, InlineCardUnauthorizedView, };
|
|
9
|
-
export declare const InlineCard: ({ analytics, id, url, cardState, handleAuthorize, handleFrameClick, isSelected, isHovered, renderers, onResolve, onError, testId, inlinePreloaderStyle, showHoverPreview, hoverPreviewOptions,
|
|
9
|
+
export declare const InlineCard: ({ analytics, id, url, cardState, handleAuthorize, handleFrameClick, isSelected, isHovered, renderers, onResolve, onError, testId, inlinePreloaderStyle, showHoverPreview, hoverPreviewOptions, actionOptions, removeTextHighlightingFromTitle, resolvingPlaceholder, truncateInline, }: InlineCardProps) => JSX.Element;
|
|
@@ -23,10 +23,6 @@ export type InlineCardProps = {
|
|
|
23
23
|
renderers?: CardProviderRenderers;
|
|
24
24
|
showHoverPreview?: boolean;
|
|
25
25
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
28
|
-
*/
|
|
29
|
-
showAuthTooltip?: boolean;
|
|
30
26
|
actionOptions?: CardActionOptions;
|
|
31
27
|
analytics: AnalyticsFacade;
|
|
32
28
|
removeTextHighlightingFromTitle?: boolean;
|
|
@@ -3,5 +3,5 @@ import { type WrappedComponentProps } from 'react-intl-next';
|
|
|
3
3
|
import { type CardAppearance, type CardPlatform, type CardProps } from './types';
|
|
4
4
|
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<Omit<CardProps & WrappedComponentProps, "intl"> & {
|
|
5
5
|
forwardedRef?: React.Ref<any> | undefined;
|
|
6
|
-
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "testId" | "appearance" | "container" | "key" | "id" | "placeholder" | "children" | "onError" | "onClick" | "ui" | "actionOptions" | "hoverPreviewOptions" | "onResolve" | "showHoverPreview" | "
|
|
6
|
+
}, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "testId" | "appearance" | "container" | "key" | "id" | "placeholder" | "children" | "onError" | "onClick" | "ui" | "actionOptions" | "hoverPreviewOptions" | "onResolve" | "showHoverPreview" | "inlinePreloaderStyle" | "isHovered" | "removeTextHighlightingFromTitle" | "resolvingPlaceholder" | "truncateInline" | "fallbackComponent" | "isSelected" | "embedIframeRef" | "embedIframeUrlType" | "frameStyle" | "inheritDimensions" | "platform" | "analyticsContext" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
7
7
|
export type { CardAppearance, CardProps, CardPlatform };
|
|
@@ -48,11 +48,6 @@ interface HoverPreviewProps extends ActionProps {
|
|
|
48
48
|
* Configuration for hover card.
|
|
49
49
|
*/
|
|
50
50
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
51
|
-
/**
|
|
52
|
-
* Flag to display unresolved views on hover preview.
|
|
53
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
54
|
-
*/
|
|
55
|
-
showAuthTooltip?: boolean;
|
|
56
51
|
}
|
|
57
52
|
export interface BaseCardProps {
|
|
58
53
|
/**
|
|
@@ -27,10 +27,6 @@ export type CardWithUrlContentProps = {
|
|
|
27
27
|
children?: React.ReactNode;
|
|
28
28
|
showHoverPreview?: boolean;
|
|
29
29
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
32
|
-
*/
|
|
33
|
-
showAuthTooltip?: boolean;
|
|
34
30
|
analyticsEvents?: AnalyticsFacade;
|
|
35
31
|
placeholder?: string;
|
|
36
32
|
removeTextHighlightingFromTitle?: boolean;
|
|
@@ -10,5 +10,5 @@ export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: b
|
|
|
10
10
|
* @internal
|
|
11
11
|
* @see Block
|
|
12
12
|
*/
|
|
13
|
-
declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry,
|
|
13
|
+
declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry, showHoverPreview, hoverPreviewOptions, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
|
|
14
14
|
export default Container;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type PropsWithChildren } from 'react';
|
|
2
2
|
import { type SmartLinkStatus } from '../../../../constants';
|
|
3
3
|
import { type FlexibleCardProps, type FlexibleUiOptions, type RetryOptions } from '../../types';
|
|
4
|
-
export type ContainerProps = PropsWithChildren<Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'hoverPreviewOptions' | 'actionOptions'
|
|
4
|
+
export type ContainerProps = PropsWithChildren<Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'hoverPreviewOptions' | 'actionOptions'> & FlexibleUiOptions & {
|
|
5
5
|
/**
|
|
6
6
|
* The options that determine the retry behaviour when a Smart Link errors.
|
|
7
7
|
*/
|
|
@@ -6,5 +6,5 @@ import { type FlexibleCardProps } from './types';
|
|
|
6
6
|
* Note: TitleBlock is mandatory for a Flexible Card to render.
|
|
7
7
|
* @see Container
|
|
8
8
|
*/
|
|
9
|
-
declare const FlexibleCard: ({ analytics, appearance, cardState, children, id, onAuthorize, onClick, onError, onResolve, origin, renderers,
|
|
9
|
+
declare const FlexibleCard: ({ analytics, appearance, cardState, children, id, onAuthorize, onClick, onError, onResolve, origin, renderers, showHoverPreview, hoverPreviewOptions, actionOptions, testId, ui, url, }: FlexibleCardProps) => JSX.Element;
|
|
10
10
|
export default FlexibleCard;
|
|
@@ -93,12 +93,6 @@ export type FlexibleCardProps = {
|
|
|
93
93
|
* Configuration options for hover preview
|
|
94
94
|
*/
|
|
95
95
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
96
|
-
/**
|
|
97
|
-
* Determines whether to show an unauthorised view of the hover card
|
|
98
|
-
* when a user hovers over a smartlink.
|
|
99
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
100
|
-
*/
|
|
101
|
-
showAuthTooltip?: boolean;
|
|
102
96
|
};
|
|
103
97
|
export type FlexibleUiOptions = {
|
|
104
98
|
/**
|
|
@@ -15,11 +15,6 @@ export interface InlineCardUnauthorizedViewProps {
|
|
|
15
15
|
isSelected?: boolean;
|
|
16
16
|
/** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
|
|
17
17
|
testId?: string;
|
|
18
|
-
/**
|
|
19
|
-
* A flag that determines is a tooltip should show up on hover over the unauthorised link
|
|
20
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
21
|
-
*/
|
|
22
|
-
showAuthTooltip?: boolean;
|
|
23
18
|
/** Enables showing a custom preview on hover of link */
|
|
24
19
|
showHoverPreview?: boolean;
|
|
25
20
|
/** A smart link id that may be used in analytics */
|
|
@@ -31,4 +26,4 @@ export interface InlineCardUnauthorizedViewProps {
|
|
|
31
26
|
/** Truncates the card to one line */
|
|
32
27
|
truncateInline?: boolean;
|
|
33
28
|
}
|
|
34
|
-
export declare const InlineCardUnauthorizedView: ({ url, id, icon, onAuthorise, onClick, isSelected, testId,
|
|
29
|
+
export declare const InlineCardUnauthorizedView: ({ url, id, icon, onAuthorise, onClick, isSelected, testId, showHoverPreview, truncateInline, context, }: InlineCardUnauthorizedViewProps) => JSX.Element;
|
|
@@ -6,4 +6,4 @@ import { InlineCardResolvingView } from './ResolvingView';
|
|
|
6
6
|
import { type InlineCardProps } from './types';
|
|
7
7
|
import { InlineCardUnauthorizedView } from './UnauthorisedView';
|
|
8
8
|
export { InlineCardResolvedView, InlineCardResolvingView, InlineCardErroredView, InlineCardForbiddenView, InlineCardUnauthorizedView, };
|
|
9
|
-
export declare const InlineCard: ({ analytics, id, url, cardState, handleAuthorize, handleFrameClick, isSelected, isHovered, renderers, onResolve, onError, testId, inlinePreloaderStyle, showHoverPreview, hoverPreviewOptions,
|
|
9
|
+
export declare const InlineCard: ({ analytics, id, url, cardState, handleAuthorize, handleFrameClick, isSelected, isHovered, renderers, onResolve, onError, testId, inlinePreloaderStyle, showHoverPreview, hoverPreviewOptions, actionOptions, removeTextHighlightingFromTitle, resolvingPlaceholder, truncateInline, }: InlineCardProps) => JSX.Element;
|
|
@@ -23,10 +23,6 @@ export type InlineCardProps = {
|
|
|
23
23
|
renderers?: CardProviderRenderers;
|
|
24
24
|
showHoverPreview?: boolean;
|
|
25
25
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-23150 Internal documentation for deprecation (no external access)}
|
|
28
|
-
*/
|
|
29
|
-
showAuthTooltip?: boolean;
|
|
30
26
|
actionOptions?: CardActionOptions;
|
|
31
27
|
analytics: AnalyticsFacade;
|
|
32
28
|
removeTextHighlightingFromTitle?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "33.
|
|
3
|
+
"version": "33.1.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/link-analytics": "^8.6.0",
|
|
46
46
|
"@atlaskit/link-client-extension": "^3.0.0",
|
|
47
47
|
"@atlaskit/link-extractors": "^1.9.0",
|
|
48
|
-
"@atlaskit/linking-common": "^6.
|
|
48
|
+
"@atlaskit/linking-common": "^6.1.0",
|
|
49
49
|
"@atlaskit/linking-types": "^9.5.0",
|
|
50
50
|
"@atlaskit/logo": "^15.1.0",
|
|
51
51
|
"@atlaskit/lozenge": "^11.12.0",
|
|
@@ -168,9 +168,6 @@
|
|
|
168
168
|
"linking_platform_show_lozenge_atlassian_state": {
|
|
169
169
|
"type": "boolean"
|
|
170
170
|
},
|
|
171
|
-
"platform_deprecate-showauthtooltip-smart-card": {
|
|
172
|
-
"type": "boolean"
|
|
173
|
-
},
|
|
174
171
|
"smart_links_for_plans_platform": {
|
|
175
172
|
"type": "boolean"
|
|
176
173
|
},
|