@atlaskit/smart-card 38.6.1 → 38.7.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 +8 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/index.js +4 -2
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +4 -1
- package/dist/cjs/view/CardWithUrl/component.js +4 -2
- package/dist/cjs/view/CardWithUrl/loader.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +6 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +5 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +14 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/index.js +4 -2
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +4 -1
- package/dist/es2019/view/CardWithUrl/component.js +4 -2
- package/dist/es2019/view/CardWithUrl/loader.js +4 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +5 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +13 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/index.js +4 -2
- package/dist/esm/view/BlockCard/views/ResolvedView.js +4 -1
- package/dist/esm/view/CardWithUrl/component.js +4 -2
- package/dist/esm/view/CardWithUrl/loader.js +4 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +6 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +5 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +14 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/BlockCard/index.d.ts +1 -1
- package/dist/types/view/BlockCard/types.d.ts +4 -0
- package/dist/types/view/BlockCard/views/types.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +7 -0
- package/dist/types/view/CardWithUrl/types.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +11 -0
- package/dist/types/view/FlexibleCard/types.d.ts +7 -0
- package/dist/types-ts4.5/view/BlockCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/types.d.ts +4 -0
- package/dist/types-ts4.5/view/BlockCard/views/types.d.ts +1 -1
- package/dist/types-ts4.5/view/Card/types.d.ts +7 -0
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/types.d.ts +11 -0
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +7 -0
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 38.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#161907](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/161907)
|
|
8
|
+
[`0f083a35b280f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0f083a35b280f) -
|
|
9
|
+
[ux] Add optional CompetitorPrompt component to display for Smart Link card for experiment
|
|
10
|
+
|
|
3
11
|
## 38.6.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "38.
|
|
14
|
+
packageVersion: "38.7.0"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -29,7 +29,8 @@ var BlockCard = exports.BlockCard = function BlockCard(_ref) {
|
|
|
29
29
|
onResolve = _ref.onResolve,
|
|
30
30
|
onError = _ref.onError,
|
|
31
31
|
testId = _ref.testId,
|
|
32
|
-
actionOptions = _ref.actionOptions
|
|
32
|
+
actionOptions = _ref.actionOptions,
|
|
33
|
+
CompetitorPrompt = _ref.CompetitorPrompt;
|
|
33
34
|
var status = cardState.status;
|
|
34
35
|
var blockCardProps = {
|
|
35
36
|
id: id,
|
|
@@ -42,7 +43,8 @@ var BlockCard = exports.BlockCard = function BlockCard(_ref) {
|
|
|
42
43
|
onError: onError,
|
|
43
44
|
onResolve: onResolve,
|
|
44
45
|
renderers: renderers,
|
|
45
|
-
actionOptions: actionOptions
|
|
46
|
+
actionOptions: actionOptions,
|
|
47
|
+
CompetitorPrompt: CompetitorPrompt
|
|
46
48
|
};
|
|
47
49
|
var _useControlDataExport = (0, _useControlDataExportConfig.useControlDataExportConfig)(),
|
|
48
50
|
_useControlDataExport2 = _useControlDataExport.shouldControlDataExport,
|
|
@@ -41,7 +41,8 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
41
41
|
actionOptions = _ref.actionOptions,
|
|
42
42
|
_ref$testId = _ref.testId,
|
|
43
43
|
testId = _ref$testId === void 0 ? 'smart-block-resolved-view' : _ref$testId,
|
|
44
|
-
url = _ref.url
|
|
44
|
+
url = _ref.url,
|
|
45
|
+
CompetitorPrompt = _ref.CompetitorPrompt;
|
|
45
46
|
var _useState = (0, _react.useState)(false),
|
|
46
47
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
47
48
|
isPreviewBlockErrored = _useState2[0],
|
|
@@ -93,6 +94,8 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
93
94
|
}, (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-context') ? undefined : {
|
|
94
95
|
status: status
|
|
95
96
|
}, {
|
|
97
|
+
CompetitorPrompt: CompetitorPrompt,
|
|
98
|
+
url: url,
|
|
96
99
|
className: (0, _runtime.ax)([(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? "_zulpu2gc _13mh1pd9 _2yhz14q2" : "_zulpcxkx _13mh1pd9"])
|
|
97
100
|
})), /*#__PURE__*/React.createElement(_blocks.MetadataBlock, (0, _extends2.default)({
|
|
98
101
|
primary: topMetadata,
|
|
@@ -49,7 +49,8 @@ function Component(_ref) {
|
|
|
49
49
|
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
50
50
|
removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle,
|
|
51
51
|
resolvingPlaceholder = _ref.resolvingPlaceholder,
|
|
52
|
-
truncateInline = _ref.truncateInline
|
|
52
|
+
truncateInline = _ref.truncateInline,
|
|
53
|
+
CompetitorPrompt = _ref.CompetitorPrompt;
|
|
53
54
|
var _useAnalyticsEventsNe = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
54
55
|
createAnalyticsEvent = _useAnalyticsEventsNe.createAnalyticsEvent;
|
|
55
56
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
@@ -266,7 +267,8 @@ function Component(_ref) {
|
|
|
266
267
|
onResolve: onResolve,
|
|
267
268
|
onError: onError,
|
|
268
269
|
testId: testId,
|
|
269
|
-
actionOptions: actionOptions
|
|
270
|
+
actionOptions: actionOptions,
|
|
271
|
+
CompetitorPrompt: CompetitorPrompt
|
|
270
272
|
});
|
|
271
273
|
case 'embed':
|
|
272
274
|
return /*#__PURE__*/_react.default.createElement(_EmbedCard.EmbedCard, {
|
|
@@ -70,7 +70,8 @@ function CardWithURLRenderer(props) {
|
|
|
70
70
|
fallbackComponent = props.fallbackComponent,
|
|
71
71
|
removeTextHighlightingFromTitle = props.removeTextHighlightingFromTitle,
|
|
72
72
|
resolvingPlaceholder = props.resolvingPlaceholder,
|
|
73
|
-
truncateInline = props.truncateInline
|
|
73
|
+
truncateInline = props.truncateInline,
|
|
74
|
+
CompetitorPrompt = props.CompetitorPrompt;
|
|
74
75
|
var isFlexibleUi = (0, _flexible.isFlexibleUiCard)(children, (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-openness') ? ui : undefined);
|
|
75
76
|
var analyticsContext = (0, _SmartLinkAnalyticsContext.useSmartLinkAnalyticsContext)({
|
|
76
77
|
display: isFlexibleUi ? 'flexible' : appearance,
|
|
@@ -145,7 +146,8 @@ function CardWithURLRenderer(props) {
|
|
|
145
146
|
placeholder: placeholder,
|
|
146
147
|
removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
|
|
147
148
|
resolvingPlaceholder: resolvingPlaceholder,
|
|
148
|
-
truncateInline: truncateInline
|
|
149
|
+
truncateInline: truncateInline,
|
|
150
|
+
CompetitorPrompt: CompetitorPrompt
|
|
149
151
|
};
|
|
150
152
|
return /*#__PURE__*/_react.default.createElement(_reactErrorBoundary.ErrorBoundary, {
|
|
151
153
|
FallbackComponent: ErrorFallback,
|
|
@@ -23,7 +23,7 @@ var _actionGroup = _interopRequireDefault(require("../action-group"));
|
|
|
23
23
|
var _errored = _interopRequireDefault(require("./errored"));
|
|
24
24
|
var _resolved = _interopRequireDefault(require("./resolved"));
|
|
25
25
|
var _resolving = _interopRequireDefault(require("./resolving"));
|
|
26
|
-
var _excluded = ["actions", "anchorTarget", "hideTitleTooltip", "maxLines", "onActionMenuOpenChange", "onClick", "status", "showActionOnHover", "testId", "text", "icon", "theme", "hideRetry", "metadataPosition", "hideIcon", "className", "anchorRef"];
|
|
26
|
+
var _excluded = ["actions", "anchorTarget", "hideTitleTooltip", "maxLines", "onActionMenuOpenChange", "onClick", "status", "showActionOnHover", "testId", "text", "icon", "theme", "hideRetry", "metadataPosition", "hideIcon", "className", "anchorRef", "CompetitorPrompt", "url"];
|
|
27
27
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
28
28
|
var actionStyles = null;
|
|
29
29
|
var getTitleBlockViewComponent = function getTitleBlockViewComponent(status) {
|
|
@@ -78,6 +78,8 @@ var TitleBlock = function TitleBlock(_ref) {
|
|
|
78
78
|
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
79
79
|
className = _ref.className,
|
|
80
80
|
anchorRef = _ref.anchorRef,
|
|
81
|
+
CompetitorPrompt = _ref.CompetitorPrompt,
|
|
82
|
+
url = _ref.url,
|
|
81
83
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
82
84
|
var cardContext = (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-context') ?
|
|
83
85
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -140,6 +142,9 @@ var TitleBlock = function TitleBlock(_ref) {
|
|
|
140
142
|
size: (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-context') ? (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : ui === null || ui === void 0 ? void 0 : ui.size : props === null || props === void 0 ? void 0 : props.size
|
|
141
143
|
}, (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-context') ? undefined : {
|
|
142
144
|
theme: theme
|
|
145
|
+
}, {
|
|
146
|
+
CompetitorPrompt: CompetitorPrompt,
|
|
147
|
+
url: url
|
|
143
148
|
}));
|
|
144
149
|
};
|
|
145
150
|
var _default = exports.default = TitleBlock;
|
|
@@ -12,14 +12,19 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
17
|
var _constants = require("../../../../../../constants");
|
|
16
18
|
var _elements = require("../../../elements");
|
|
17
19
|
var _block = _interopRequireDefault(require("../../block"));
|
|
18
20
|
var _elementGroup = _interopRequireDefault(require("../../element-group"));
|
|
19
21
|
var _utils = require("../../utils");
|
|
20
|
-
var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "text", "icon", "title", "metadataPosition", "hideIcon"];
|
|
22
|
+
var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "text", "icon", "title", "metadataPosition", "hideIcon", "CompetitorPrompt", "url"];
|
|
21
23
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
24
|
var style = null;
|
|
25
|
+
var styles = {
|
|
26
|
+
titleBox: "_1e0c1txw _2lx2vrvc _4cvr1h6o _1bsb1osq"
|
|
27
|
+
};
|
|
23
28
|
|
|
24
29
|
/**
|
|
25
30
|
* This renders a fully resolved TitleBlock.
|
|
@@ -39,6 +44,8 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
39
44
|
title = _ref.title,
|
|
40
45
|
metadataPosition = _ref.metadataPosition,
|
|
41
46
|
hideIcon = _ref.hideIcon,
|
|
47
|
+
CompetitorPrompt = _ref.CompetitorPrompt,
|
|
48
|
+
url = _ref.url,
|
|
42
49
|
blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
50
|
var size = blockProps.size;
|
|
44
51
|
var metadataElements = (0, _utils.renderElementItems)(metadata);
|
|
@@ -54,7 +61,12 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
54
61
|
width: _constants.SmartLinkWidth.Flexible,
|
|
55
62
|
size: blockProps.size,
|
|
56
63
|
className: (0, _runtime.ax)(["_zulp1b66"])
|
|
57
|
-
},
|
|
64
|
+
}, CompetitorPrompt && url && (0, _platformFeatureFlags.fg)('prompt_whiteboard_competitor_link_gate') ? /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
65
|
+
xcss: styles.titleBox
|
|
66
|
+
}, title, /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
67
|
+
sourceUrl: url,
|
|
68
|
+
linkType: 'card'
|
|
69
|
+
})) : title, subtitleElements && /*#__PURE__*/React.createElement(_elementGroup.default, {
|
|
58
70
|
direction: _constants.SmartLinkDirection.Horizontal
|
|
59
71
|
}, subtitleElements)), metadataElements && /*#__PURE__*/React.createElement(_elementGroup.default, {
|
|
60
72
|
direction: _constants.SmartLinkDirection.Horizontal,
|
|
@@ -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: "38.
|
|
23
|
+
packageVersion: "38.7.0",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "38.
|
|
5
|
+
packageVersion: "38.7.0"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -22,7 +22,8 @@ export const BlockCard = ({
|
|
|
22
22
|
onResolve,
|
|
23
23
|
onError,
|
|
24
24
|
testId,
|
|
25
|
-
actionOptions
|
|
25
|
+
actionOptions,
|
|
26
|
+
CompetitorPrompt
|
|
26
27
|
}) => {
|
|
27
28
|
const {
|
|
28
29
|
status
|
|
@@ -36,7 +37,8 @@ export const BlockCard = ({
|
|
|
36
37
|
onError,
|
|
37
38
|
onResolve,
|
|
38
39
|
renderers,
|
|
39
|
-
actionOptions
|
|
40
|
+
actionOptions,
|
|
41
|
+
CompetitorPrompt
|
|
40
42
|
};
|
|
41
43
|
const {
|
|
42
44
|
shouldControlDataExport = false
|
|
@@ -30,7 +30,8 @@ const ResolvedView = ({
|
|
|
30
30
|
onResolve,
|
|
31
31
|
actionOptions,
|
|
32
32
|
testId = 'smart-block-resolved-view',
|
|
33
|
-
url
|
|
33
|
+
url,
|
|
34
|
+
CompetitorPrompt
|
|
34
35
|
}) => {
|
|
35
36
|
const [isPreviewBlockErrored, setIsPreviewBlockErrored] = useState(false);
|
|
36
37
|
const {
|
|
@@ -77,6 +78,8 @@ const ResolvedView = ({
|
|
|
77
78
|
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
78
79
|
status
|
|
79
80
|
}, {
|
|
81
|
+
CompetitorPrompt: CompetitorPrompt,
|
|
82
|
+
url: url,
|
|
80
83
|
className: ax([fg('platform-linking-visual-refresh-v1') ? "_zulpu2gc _13mh1pd9 _2yhz14q2" : "_zulpcxkx _13mh1pd9"])
|
|
81
84
|
})), /*#__PURE__*/React.createElement(MetadataBlock, _extends({
|
|
82
85
|
primary: topMetadata,
|
|
@@ -40,7 +40,8 @@ function Component({
|
|
|
40
40
|
hoverPreviewOptions,
|
|
41
41
|
removeTextHighlightingFromTitle,
|
|
42
42
|
resolvingPlaceholder,
|
|
43
|
-
truncateInline
|
|
43
|
+
truncateInline,
|
|
44
|
+
CompetitorPrompt
|
|
44
45
|
}) {
|
|
45
46
|
const {
|
|
46
47
|
createAnalyticsEvent
|
|
@@ -255,7 +256,8 @@ function Component({
|
|
|
255
256
|
onResolve: onResolve,
|
|
256
257
|
onError: onError,
|
|
257
258
|
testId: testId,
|
|
258
|
-
actionOptions: actionOptions
|
|
259
|
+
actionOptions: actionOptions,
|
|
260
|
+
CompetitorPrompt: CompetitorPrompt
|
|
259
261
|
});
|
|
260
262
|
case 'embed':
|
|
261
263
|
return /*#__PURE__*/React.createElement(EmbedCard, {
|
|
@@ -48,7 +48,8 @@ export function CardWithURLRenderer(props) {
|
|
|
48
48
|
fallbackComponent,
|
|
49
49
|
removeTextHighlightingFromTitle,
|
|
50
50
|
resolvingPlaceholder,
|
|
51
|
-
truncateInline
|
|
51
|
+
truncateInline,
|
|
52
|
+
CompetitorPrompt
|
|
52
53
|
} = props;
|
|
53
54
|
const isFlexibleUi = isFlexibleUiCard(children, fg('platform-linking-flexible-card-openness') ? ui : undefined);
|
|
54
55
|
const analyticsContext = useSmartLinkAnalyticsContext({
|
|
@@ -124,7 +125,8 @@ export function CardWithURLRenderer(props) {
|
|
|
124
125
|
placeholder,
|
|
125
126
|
removeTextHighlightingFromTitle,
|
|
126
127
|
resolvingPlaceholder,
|
|
127
|
-
truncateInline
|
|
128
|
+
truncateInline,
|
|
129
|
+
CompetitorPrompt
|
|
128
130
|
};
|
|
129
131
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
130
132
|
FallbackComponent: ErrorFallback,
|
|
@@ -61,6 +61,8 @@ const TitleBlock = ({
|
|
|
61
61
|
hideIcon = false,
|
|
62
62
|
className,
|
|
63
63
|
anchorRef,
|
|
64
|
+
CompetitorPrompt,
|
|
65
|
+
url,
|
|
64
66
|
...props
|
|
65
67
|
}) => {
|
|
66
68
|
var _props$size;
|
|
@@ -122,6 +124,9 @@ const TitleBlock = ({
|
|
|
122
124
|
size: fg('platform-linking-flexible-card-context') ? (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : ui === null || ui === void 0 ? void 0 : ui.size : props === null || props === void 0 ? void 0 : props.size
|
|
123
125
|
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
124
126
|
theme
|
|
127
|
+
}, {
|
|
128
|
+
CompetitorPrompt: CompetitorPrompt,
|
|
129
|
+
url: url
|
|
125
130
|
}));
|
|
126
131
|
};
|
|
127
132
|
export default TitleBlock;
|
|
@@ -3,12 +3,17 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
8
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkPosition, SmartLinkWidth } from '../../../../../../constants';
|
|
7
9
|
import { LinkIcon } from '../../../elements';
|
|
8
10
|
import Block from '../../block';
|
|
9
11
|
import ElementGroup from '../../element-group';
|
|
10
12
|
import { renderElementItems } from '../../utils';
|
|
11
13
|
const style = null;
|
|
14
|
+
const styles = {
|
|
15
|
+
titleBox: "_1e0c1txw _2lx2vrvc _4cvr1h6o _1bsb1osq"
|
|
16
|
+
};
|
|
12
17
|
|
|
13
18
|
/**
|
|
14
19
|
* This renders a fully resolved TitleBlock.
|
|
@@ -26,6 +31,8 @@ const TitleBlockResolvedView = ({
|
|
|
26
31
|
title,
|
|
27
32
|
metadataPosition,
|
|
28
33
|
hideIcon,
|
|
34
|
+
CompetitorPrompt,
|
|
35
|
+
url,
|
|
29
36
|
...blockProps
|
|
30
37
|
}) => {
|
|
31
38
|
const {
|
|
@@ -44,7 +51,12 @@ const TitleBlockResolvedView = ({
|
|
|
44
51
|
width: SmartLinkWidth.Flexible,
|
|
45
52
|
size: blockProps.size,
|
|
46
53
|
className: ax(["_zulp1b66"])
|
|
47
|
-
},
|
|
54
|
+
}, CompetitorPrompt && url && fg('prompt_whiteboard_competitor_link_gate') ? /*#__PURE__*/React.createElement(Box, {
|
|
55
|
+
xcss: styles.titleBox
|
|
56
|
+
}, title, /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
57
|
+
sourceUrl: url,
|
|
58
|
+
linkType: 'card'
|
|
59
|
+
})) : title, subtitleElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
48
60
|
direction: SmartLinkDirection.Horizontal
|
|
49
61
|
}, subtitleElements)), metadataElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
50
62
|
direction: SmartLinkDirection.Horizontal,
|
|
@@ -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: "38.
|
|
13
|
+
packageVersion: "38.7.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "38.
|
|
7
|
+
packageVersion: "38.7.0"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -22,7 +22,8 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
22
22
|
onResolve = _ref.onResolve,
|
|
23
23
|
onError = _ref.onError,
|
|
24
24
|
testId = _ref.testId,
|
|
25
|
-
actionOptions = _ref.actionOptions
|
|
25
|
+
actionOptions = _ref.actionOptions,
|
|
26
|
+
CompetitorPrompt = _ref.CompetitorPrompt;
|
|
26
27
|
var status = cardState.status;
|
|
27
28
|
var blockCardProps = {
|
|
28
29
|
id: id,
|
|
@@ -35,7 +36,8 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
35
36
|
onError: onError,
|
|
36
37
|
onResolve: onResolve,
|
|
37
38
|
renderers: renderers,
|
|
38
|
-
actionOptions: actionOptions
|
|
39
|
+
actionOptions: actionOptions,
|
|
40
|
+
CompetitorPrompt: CompetitorPrompt
|
|
39
41
|
};
|
|
40
42
|
var _useControlDataExport = useControlDataExportConfig(),
|
|
41
43
|
_useControlDataExport2 = _useControlDataExport.shouldControlDataExport,
|
|
@@ -32,7 +32,8 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
32
32
|
actionOptions = _ref.actionOptions,
|
|
33
33
|
_ref$testId = _ref.testId,
|
|
34
34
|
testId = _ref$testId === void 0 ? 'smart-block-resolved-view' : _ref$testId,
|
|
35
|
-
url = _ref.url
|
|
35
|
+
url = _ref.url,
|
|
36
|
+
CompetitorPrompt = _ref.CompetitorPrompt;
|
|
36
37
|
var _useState = useState(false),
|
|
37
38
|
_useState2 = _slicedToArray(_useState, 2),
|
|
38
39
|
isPreviewBlockErrored = _useState2[0],
|
|
@@ -84,6 +85,8 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
84
85
|
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
85
86
|
status: status
|
|
86
87
|
}, {
|
|
88
|
+
CompetitorPrompt: CompetitorPrompt,
|
|
89
|
+
url: url,
|
|
87
90
|
className: ax([fg('platform-linking-visual-refresh-v1') ? "_zulpu2gc _13mh1pd9 _2yhz14q2" : "_zulpcxkx _13mh1pd9"])
|
|
88
91
|
})), /*#__PURE__*/React.createElement(MetadataBlock, _extends({
|
|
89
92
|
primary: topMetadata,
|
|
@@ -40,7 +40,8 @@ function Component(_ref) {
|
|
|
40
40
|
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
41
41
|
removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle,
|
|
42
42
|
resolvingPlaceholder = _ref.resolvingPlaceholder,
|
|
43
|
-
truncateInline = _ref.truncateInline
|
|
43
|
+
truncateInline = _ref.truncateInline,
|
|
44
|
+
CompetitorPrompt = _ref.CompetitorPrompt;
|
|
44
45
|
var _useAnalyticsEventsNe = useAnalyticsEventsNext(),
|
|
45
46
|
createAnalyticsEvent = _useAnalyticsEventsNe.createAnalyticsEvent;
|
|
46
47
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
@@ -257,7 +258,8 @@ function Component(_ref) {
|
|
|
257
258
|
onResolve: onResolve,
|
|
258
259
|
onError: onError,
|
|
259
260
|
testId: testId,
|
|
260
|
-
actionOptions: actionOptions
|
|
261
|
+
actionOptions: actionOptions,
|
|
262
|
+
CompetitorPrompt: CompetitorPrompt
|
|
261
263
|
});
|
|
262
264
|
case 'embed':
|
|
263
265
|
return /*#__PURE__*/React.createElement(EmbedCard, {
|
|
@@ -58,7 +58,8 @@ export function CardWithURLRenderer(props) {
|
|
|
58
58
|
fallbackComponent = props.fallbackComponent,
|
|
59
59
|
removeTextHighlightingFromTitle = props.removeTextHighlightingFromTitle,
|
|
60
60
|
resolvingPlaceholder = props.resolvingPlaceholder,
|
|
61
|
-
truncateInline = props.truncateInline
|
|
61
|
+
truncateInline = props.truncateInline,
|
|
62
|
+
CompetitorPrompt = props.CompetitorPrompt;
|
|
62
63
|
var isFlexibleUi = isFlexibleUiCard(children, fg('platform-linking-flexible-card-openness') ? ui : undefined);
|
|
63
64
|
var analyticsContext = useSmartLinkAnalyticsContext({
|
|
64
65
|
display: isFlexibleUi ? 'flexible' : appearance,
|
|
@@ -133,7 +134,8 @@ export function CardWithURLRenderer(props) {
|
|
|
133
134
|
placeholder: placeholder,
|
|
134
135
|
removeTextHighlightingFromTitle: removeTextHighlightingFromTitle,
|
|
135
136
|
resolvingPlaceholder: resolvingPlaceholder,
|
|
136
|
-
truncateInline: truncateInline
|
|
137
|
+
truncateInline: truncateInline,
|
|
138
|
+
CompetitorPrompt: CompetitorPrompt
|
|
137
139
|
};
|
|
138
140
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
139
141
|
FallbackComponent: ErrorFallback,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["actions", "anchorTarget", "hideTitleTooltip", "maxLines", "onActionMenuOpenChange", "onClick", "status", "showActionOnHover", "testId", "text", "icon", "theme", "hideRetry", "metadataPosition", "hideIcon", "className", "anchorRef"];
|
|
5
|
+
var _excluded = ["actions", "anchorTarget", "hideTitleTooltip", "maxLines", "onActionMenuOpenChange", "onClick", "status", "showActionOnHover", "testId", "text", "icon", "theme", "hideRetry", "metadataPosition", "hideIcon", "className", "anchorRef", "CompetitorPrompt", "url"];
|
|
6
6
|
import "./index.compiled.css";
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -69,6 +69,8 @@ var TitleBlock = function TitleBlock(_ref) {
|
|
|
69
69
|
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
70
70
|
className = _ref.className,
|
|
71
71
|
anchorRef = _ref.anchorRef,
|
|
72
|
+
CompetitorPrompt = _ref.CompetitorPrompt,
|
|
73
|
+
url = _ref.url,
|
|
72
74
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
73
75
|
var cardContext = fg('platform-linking-flexible-card-context') ?
|
|
74
76
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -131,6 +133,9 @@ var TitleBlock = function TitleBlock(_ref) {
|
|
|
131
133
|
size: fg('platform-linking-flexible-card-context') ? (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : ui === null || ui === void 0 ? void 0 : ui.size : props === null || props === void 0 ? void 0 : props.size
|
|
132
134
|
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
133
135
|
theme: theme
|
|
136
|
+
}, {
|
|
137
|
+
CompetitorPrompt: CompetitorPrompt,
|
|
138
|
+
url: url
|
|
134
139
|
}));
|
|
135
140
|
};
|
|
136
141
|
export default TitleBlock;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "text", "icon", "title", "metadataPosition", "hideIcon"];
|
|
4
|
+
var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "text", "icon", "title", "metadataPosition", "hideIcon", "CompetitorPrompt", "url"];
|
|
5
5
|
import "./index.compiled.css";
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
10
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkPosition, SmartLinkWidth } from '../../../../../../constants';
|
|
9
11
|
import { LinkIcon } from '../../../elements';
|
|
10
12
|
import Block from '../../block';
|
|
11
13
|
import ElementGroup from '../../element-group';
|
|
12
14
|
import { renderElementItems } from '../../utils';
|
|
13
15
|
var style = null;
|
|
16
|
+
var styles = {
|
|
17
|
+
titleBox: "_1e0c1txw _2lx2vrvc _4cvr1h6o _1bsb1osq"
|
|
18
|
+
};
|
|
14
19
|
|
|
15
20
|
/**
|
|
16
21
|
* This renders a fully resolved TitleBlock.
|
|
@@ -30,6 +35,8 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
30
35
|
title = _ref.title,
|
|
31
36
|
metadataPosition = _ref.metadataPosition,
|
|
32
37
|
hideIcon = _ref.hideIcon,
|
|
38
|
+
CompetitorPrompt = _ref.CompetitorPrompt,
|
|
39
|
+
url = _ref.url,
|
|
33
40
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
34
41
|
var size = blockProps.size;
|
|
35
42
|
var metadataElements = renderElementItems(metadata);
|
|
@@ -45,7 +52,12 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
45
52
|
width: SmartLinkWidth.Flexible,
|
|
46
53
|
size: blockProps.size,
|
|
47
54
|
className: ax(["_zulp1b66"])
|
|
48
|
-
},
|
|
55
|
+
}, CompetitorPrompt && url && fg('prompt_whiteboard_competitor_link_gate') ? /*#__PURE__*/React.createElement(Box, {
|
|
56
|
+
xcss: styles.titleBox
|
|
57
|
+
}, title, /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
58
|
+
sourceUrl: url,
|
|
59
|
+
linkType: 'card'
|
|
60
|
+
})) : title, subtitleElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
49
61
|
direction: SmartLinkDirection.Horizontal
|
|
50
62
|
}, subtitleElements)), metadataElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
51
63
|
direction: SmartLinkDirection.Horizontal,
|
|
@@ -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: "38.
|
|
16
|
+
packageVersion: "38.7.0",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type BlockCardProps } from './types';
|
|
3
|
-
export declare const BlockCard: ({ id, url, cardState, authFlow, handleAuthorize, handleFrameClick, renderers, isSelected, onResolve, onError, testId, actionOptions, }: BlockCardProps) => React.JSX.Element;
|
|
3
|
+
export declare const BlockCard: ({ id, url, cardState, authFlow, handleAuthorize, handleFrameClick, renderers, isSelected, onResolve, onError, testId, actionOptions, CompetitorPrompt, }: BlockCardProps) => React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type FlexibleCardProps } from '../../FlexibleCard/types';
|
|
2
|
-
export type FlexibleBlockCardProps = Pick<FlexibleCardProps, 'cardState' | 'id' | 'onAuthorize' | 'onClick' | 'onError' | 'onResolve' | 'renderers' | 'actionOptions' | 'testId' | 'url'>;
|
|
2
|
+
export type FlexibleBlockCardProps = Pick<FlexibleCardProps, 'cardState' | 'id' | 'onAuthorize' | 'onClick' | 'onError' | 'onResolve' | 'renderers' | 'actionOptions' | 'testId' | 'url' | 'CompetitorPrompt'>;
|
|
@@ -105,6 +105,13 @@ export interface BaseCardProps {
|
|
|
105
105
|
* The url link of the resource to be resolved and shown as Smart Link.
|
|
106
106
|
*/
|
|
107
107
|
url?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Competitor Prompt Component for Competitor link experiment
|
|
110
|
+
*/
|
|
111
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
112
|
+
sourceUrl: string;
|
|
113
|
+
linkType?: string;
|
|
114
|
+
}>;
|
|
108
115
|
}
|
|
109
116
|
export interface InlineProps extends HoverPreviewProps {
|
|
110
117
|
/**
|
|
@@ -12,5 +12,5 @@ import { type TitleBlockProps } from './types';
|
|
|
12
12
|
* @see TitleBlockResolvedViewNew
|
|
13
13
|
* @see TitleBlockErroredViewNew
|
|
14
14
|
*/
|
|
15
|
-
declare const TitleBlock: ({ actions, anchorTarget, hideTitleTooltip, maxLines, onActionMenuOpenChange, onClick, status: statusProp, showActionOnHover, testId, text, icon, theme, hideRetry, metadataPosition, hideIcon, className, anchorRef, ...props }: TitleBlockProps) => JSX.Element;
|
|
15
|
+
declare const TitleBlock: ({ actions, anchorTarget, hideTitleTooltip, maxLines, onActionMenuOpenChange, onClick, status: statusProp, showActionOnHover, testId, text, icon, theme, hideRetry, metadataPosition, hideIcon, className, anchorRef, CompetitorPrompt, url, ...props }: TitleBlockProps) => JSX.Element;
|
|
16
16
|
export default TitleBlock;
|
|
@@ -5,5 +5,5 @@ import { type TitleBlockViewProps } from '../types';
|
|
|
5
5
|
* This should render when a Smart Link returns a valid response.
|
|
6
6
|
* @see TitleBlock
|
|
7
7
|
*/
|
|
8
|
-
declare const TitleBlockResolvedView: ({ actionGroup, metadata, position, subtitle, testId, text, icon, title, metadataPosition, hideIcon, ...blockProps }: TitleBlockViewProps) => JSX.Element;
|
|
8
|
+
declare const TitleBlockResolvedView: ({ actionGroup, metadata, position, subtitle, testId, text, icon, title, metadataPosition, hideIcon, CompetitorPrompt, url, ...blockProps }: TitleBlockViewProps) => JSX.Element;
|
|
9
9
|
export default TitleBlockResolvedView;
|
|
@@ -109,6 +109,17 @@ export type TitleBlockProps = {
|
|
|
109
109
|
* A unique identifier for the placeholder loading state, which is constant across all loading states of the same item.
|
|
110
110
|
*/
|
|
111
111
|
placeholderId?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Competitor Prompt Component for Competitor link experiment
|
|
114
|
+
*/
|
|
115
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
116
|
+
sourceUrl: string;
|
|
117
|
+
linkType?: string;
|
|
118
|
+
}>;
|
|
119
|
+
/**
|
|
120
|
+
* The URL of the link for Competitor Prompt experiment
|
|
121
|
+
*/
|
|
122
|
+
url?: string;
|
|
112
123
|
} & BlockProps;
|
|
113
124
|
export type TitleBlockViewProps = TitleBlockProps & {
|
|
114
125
|
actionGroup?: React.ReactNode;
|
|
@@ -87,6 +87,13 @@ export type FlexibleCardProps = {
|
|
|
87
87
|
* Configuration options for hover preview
|
|
88
88
|
*/
|
|
89
89
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
90
|
+
/**
|
|
91
|
+
* Competitor Prompt Component for Competitor link experiment
|
|
92
|
+
*/
|
|
93
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
94
|
+
sourceUrl: string;
|
|
95
|
+
linkType?: string;
|
|
96
|
+
}>;
|
|
90
97
|
};
|
|
91
98
|
export type InternalFlexibleUiOptions = FlexibleUiOptions & {
|
|
92
99
|
hideLegacyButton?: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type BlockCardProps } from './types';
|
|
3
|
-
export declare const BlockCard: ({ id, url, cardState, authFlow, handleAuthorize, handleFrameClick, renderers, isSelected, onResolve, onError, testId, actionOptions, }: BlockCardProps) => React.JSX.Element;
|
|
3
|
+
export declare const BlockCard: ({ id, url, cardState, authFlow, handleAuthorize, handleFrameClick, renderers, isSelected, onResolve, onError, testId, actionOptions, CompetitorPrompt, }: BlockCardProps) => React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type FlexibleCardProps } from '../../FlexibleCard/types';
|
|
2
|
-
export type FlexibleBlockCardProps = Pick<FlexibleCardProps, 'cardState' | 'id' | 'onAuthorize' | 'onClick' | 'onError' | 'onResolve' | 'renderers' | 'actionOptions' | 'testId' | 'url'>;
|
|
2
|
+
export type FlexibleBlockCardProps = Pick<FlexibleCardProps, 'cardState' | 'id' | 'onAuthorize' | 'onClick' | 'onError' | 'onResolve' | 'renderers' | 'actionOptions' | 'testId' | 'url' | 'CompetitorPrompt'>;
|
|
@@ -105,6 +105,13 @@ export interface BaseCardProps {
|
|
|
105
105
|
* The url link of the resource to be resolved and shown as Smart Link.
|
|
106
106
|
*/
|
|
107
107
|
url?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Competitor Prompt Component for Competitor link experiment
|
|
110
|
+
*/
|
|
111
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
112
|
+
sourceUrl: string;
|
|
113
|
+
linkType?: string;
|
|
114
|
+
}>;
|
|
108
115
|
}
|
|
109
116
|
export interface InlineProps extends HoverPreviewProps {
|
|
110
117
|
/**
|
|
@@ -12,5 +12,5 @@ import { type TitleBlockProps } from './types';
|
|
|
12
12
|
* @see TitleBlockResolvedViewNew
|
|
13
13
|
* @see TitleBlockErroredViewNew
|
|
14
14
|
*/
|
|
15
|
-
declare const TitleBlock: ({ actions, anchorTarget, hideTitleTooltip, maxLines, onActionMenuOpenChange, onClick, status: statusProp, showActionOnHover, testId, text, icon, theme, hideRetry, metadataPosition, hideIcon, className, anchorRef, ...props }: TitleBlockProps) => JSX.Element;
|
|
15
|
+
declare const TitleBlock: ({ actions, anchorTarget, hideTitleTooltip, maxLines, onActionMenuOpenChange, onClick, status: statusProp, showActionOnHover, testId, text, icon, theme, hideRetry, metadataPosition, hideIcon, className, anchorRef, CompetitorPrompt, url, ...props }: TitleBlockProps) => JSX.Element;
|
|
16
16
|
export default TitleBlock;
|
package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ import { type TitleBlockViewProps } from '../types';
|
|
|
5
5
|
* This should render when a Smart Link returns a valid response.
|
|
6
6
|
* @see TitleBlock
|
|
7
7
|
*/
|
|
8
|
-
declare const TitleBlockResolvedView: ({ actionGroup, metadata, position, subtitle, testId, text, icon, title, metadataPosition, hideIcon, ...blockProps }: TitleBlockViewProps) => JSX.Element;
|
|
8
|
+
declare const TitleBlockResolvedView: ({ actionGroup, metadata, position, subtitle, testId, text, icon, title, metadataPosition, hideIcon, CompetitorPrompt, url, ...blockProps }: TitleBlockViewProps) => JSX.Element;
|
|
9
9
|
export default TitleBlockResolvedView;
|
|
@@ -109,6 +109,17 @@ export type TitleBlockProps = {
|
|
|
109
109
|
* A unique identifier for the placeholder loading state, which is constant across all loading states of the same item.
|
|
110
110
|
*/
|
|
111
111
|
placeholderId?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Competitor Prompt Component for Competitor link experiment
|
|
114
|
+
*/
|
|
115
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
116
|
+
sourceUrl: string;
|
|
117
|
+
linkType?: string;
|
|
118
|
+
}>;
|
|
119
|
+
/**
|
|
120
|
+
* The URL of the link for Competitor Prompt experiment
|
|
121
|
+
*/
|
|
122
|
+
url?: string;
|
|
112
123
|
} & BlockProps;
|
|
113
124
|
export type TitleBlockViewProps = TitleBlockProps & {
|
|
114
125
|
actionGroup?: React.ReactNode;
|
|
@@ -87,6 +87,13 @@ export type FlexibleCardProps = {
|
|
|
87
87
|
* Configuration options for hover preview
|
|
88
88
|
*/
|
|
89
89
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
90
|
+
/**
|
|
91
|
+
* Competitor Prompt Component for Competitor link experiment
|
|
92
|
+
*/
|
|
93
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
94
|
+
sourceUrl: string;
|
|
95
|
+
linkType?: string;
|
|
96
|
+
}>;
|
|
90
97
|
};
|
|
91
98
|
export type InternalFlexibleUiOptions = FlexibleUiOptions & {
|
|
92
99
|
hideLegacyButton?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "38.
|
|
3
|
+
"version": "38.7.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -260,6 +260,9 @@
|
|
|
260
260
|
},
|
|
261
261
|
"fun-1765_wire_up_glance_panel_to_smart_cards": {
|
|
262
262
|
"type": "boolean"
|
|
263
|
+
},
|
|
264
|
+
"prompt_whiteboard_competitor_link_gate": {
|
|
265
|
+
"type": "boolean"
|
|
263
266
|
}
|
|
264
267
|
},
|
|
265
268
|
"compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/f74ef1bc-7240-4aac-9dc8-9dc43b502089"
|