@atlaskit/smart-card 43.22.5 → 43.23.1
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 +17 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/block-card-errored-title-block-competitor-prompt--default.png +0 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view-competitor-prompt--default.png +0 -0
- package/dist/cjs/extractors/action/extract-invoke-preview-action.js +1 -1
- package/dist/cjs/view/BlockCard/views/UnauthorisedView.js +1 -2
- package/dist/cjs/view/BlockCard/views/unresolved-view/index.js +2 -5
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +2 -7
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +2 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/block-card-errored-title-block-competitor-prompt--default.png +0 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view-competitor-prompt--default.png +0 -0
- package/dist/es2019/extractors/action/extract-invoke-preview-action.js +1 -1
- package/dist/es2019/view/BlockCard/views/UnauthorisedView.js +1 -2
- package/dist/es2019/view/BlockCard/views/unresolved-view/index.js +2 -5
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +2 -7
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +2 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +2 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/block-card-errored-title-block-competitor-prompt--default.png +0 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view-competitor-prompt--default.png +0 -0
- package/dist/esm/extractors/action/extract-invoke-preview-action.js +1 -1
- package/dist/esm/view/BlockCard/views/UnauthorisedView.js +1 -2
- package/dist/esm/view/BlockCard/views/unresolved-view/index.js +2 -5
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +2 -7
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +2 -3
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +2 -3
- package/dist/types/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +1 -1
- package/package.json +4 -7
- package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/block-card-errored-title-block-competitor-prompt--default--prompt-whiteboard-competitor-link-gate-false.png +0 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/block-card-errored-title-block-competitor-prompt--default--prompt-whiteboard-competitor-link-gate-true.png +0 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view--default--prompt-whiteboard-competitor-link-gate-false.png +0 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view--default--prompt-whiteboard-competitor-link-gate-true.png +0 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view-competitor-prompt--default--prompt-whiteboard-competitor-link-gate-false.png +0 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view-competitor-prompt--default--prompt-whiteboard-competitor-link-gate-true.png +0 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/block-card-errored-title-block-competitor-prompt--default--prompt-whiteboard-competitor-link-gate-false.png +0 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/block-card-errored-title-block-competitor-prompt--default--prompt-whiteboard-competitor-link-gate-true.png +0 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view--default--prompt-whiteboard-competitor-link-gate-false.png +0 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view--default--prompt-whiteboard-competitor-link-gate-true.png +0 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view-competitor-prompt--default--prompt-whiteboard-competitor-link-gate-false.png +0 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view-competitor-prompt--default--prompt-whiteboard-competitor-link-gate-true.png +0 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/block-card-errored-title-block-competitor-prompt--default--prompt-whiteboard-competitor-link-gate-false.png +0 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/block-card-errored-title-block-competitor-prompt--default--prompt-whiteboard-competitor-link-gate-true.png +0 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view--default--prompt-whiteboard-competitor-link-gate-false.png +0 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view--default--prompt-whiteboard-competitor-link-gate-true.png +0 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view-competitor-prompt--default--prompt-whiteboard-competitor-link-gate-false.png +0 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-resolved-view-competitor-prompt--default--prompt-whiteboard-competitor-link-gate-true.png +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 43.23.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 43.23.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`110cf61eebfdd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/110cf61eebfdd) -
|
|
14
|
+
[ux] Cleanup prompt_whiteboard_competitor_link_gate
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 43.22.5
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
Binary file
|
|
Binary file
|
|
@@ -62,7 +62,7 @@ var extractInvokePreviewAction = exports.extractInvokePreviewAction = function e
|
|
|
62
62
|
var src = (_extractPreviewData = (0, _linkExtractors.extractPreview)(data, 'web')) === null || _extractPreviewData === void 0 ? void 0 : _extractPreviewData.src;
|
|
63
63
|
|
|
64
64
|
// disallow preview modals within preview panels
|
|
65
|
-
if (!hasPreviewPanel && isInPreviewPanel
|
|
65
|
+
if (!hasPreviewPanel && isInPreviewPanel) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
if (src) {
|
|
@@ -15,7 +15,6 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
15
15
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
16
16
|
var _reactIntlNext = require("react-intl-next");
|
|
17
17
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
18
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
18
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
20
19
|
var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-analytics-events");
|
|
21
20
|
var _constants = require("../../../constants");
|
|
@@ -122,7 +121,7 @@ var NewUnauthorisedBlock = function NewUnauthorisedBlock(_ref) {
|
|
|
122
121
|
size: _constants.SmartLinkSize.Large,
|
|
123
122
|
items: actions
|
|
124
123
|
}) : null;
|
|
125
|
-
var competitorPrompt = CompetitorPrompt && data !== null && data !== void 0 && data.url
|
|
124
|
+
var competitorPrompt = CompetitorPrompt && data !== null && data !== void 0 && data.url ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
126
125
|
sourceUrl: data === null || data === void 0 ? void 0 : data.url,
|
|
127
126
|
linkType: 'card'
|
|
128
127
|
}) : null;
|
|
@@ -13,7 +13,6 @@ var React = _react;
|
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
15
|
var _userAgent = require("@atlaskit/linking-common/user-agent");
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _FlexibleCard = _interopRequireDefault(require("../../../FlexibleCard"));
|
|
18
17
|
var _blocks = require("../../../FlexibleCard/components/blocks");
|
|
19
18
|
var _utils = require("../utils");
|
|
@@ -53,10 +52,8 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
53
52
|
url: url
|
|
54
53
|
}, /*#__PURE__*/React.createElement(_blocks.TitleBlock, (0, _extends2.default)({}, _utils.titleBlockOptions, {
|
|
55
54
|
hideIcon: !!title,
|
|
56
|
-
text: title
|
|
57
|
-
|
|
58
|
-
CompetitorPrompt: CompetitorPrompt
|
|
59
|
-
} : undefined, {
|
|
55
|
+
text: title,
|
|
56
|
+
CompetitorPrompt: CompetitorPrompt,
|
|
60
57
|
className: (0, _runtime.ax)(["_zulpu2gc _13mh1pd9 _2yhz13af"])
|
|
61
58
|
})), /*#__PURE__*/React.createElement(_blocks.CustomBlock, {
|
|
62
59
|
className: (0, _runtime.ax)(["_zulp1b66 _1e0c1txw _4cvr1y6m _1wpz1fhb _7yjtidpf _ngc0i7uo"])
|
|
@@ -11,7 +11,6 @@ require("./ExpandedFrame.compiled.css");
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
16
15
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
17
16
|
var _useLinkClicked = require("../../../state/analytics/useLinkClicked");
|
|
@@ -47,9 +46,7 @@ var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
47
46
|
return (0, _utils.handleClickCommon)(event, onClick);
|
|
48
47
|
};
|
|
49
48
|
var handleMouseDown = (0, _useLinkClicked.useMouseDownEvent)();
|
|
50
|
-
|
|
51
|
-
// Note: cleanup fg based on results of prompt_whiteboard_competitor_link experiment
|
|
52
|
-
var CompetitorPromptComponent = CompetitorPrompt && href && (0, _platformFeatureFlags.fg)('prompt_whiteboard_competitor_link_gate') ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
49
|
+
var CompetitorPromptComponent = CompetitorPrompt && href ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
53
50
|
sourceUrl: href,
|
|
54
51
|
linkType: "embed"
|
|
55
52
|
}) : null;
|
|
@@ -146,9 +143,7 @@ var ExpandedFrameUpdated = function ExpandedFrameUpdated(_ref2) {
|
|
|
146
143
|
return (0, _utils.handleClickCommon)(event, onClick);
|
|
147
144
|
};
|
|
148
145
|
var handleMouseDown = (0, _useLinkClicked.useMouseDownEvent)();
|
|
149
|
-
|
|
150
|
-
// Note: cleanup fg based on results of prompt_whiteboard_competitor_link experiment
|
|
151
|
-
var CompetitorPromptComponent = CompetitorPrompt && href && (0, _platformFeatureFlags.fg)('prompt_whiteboard_competitor_link_gate') ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
146
|
+
var CompetitorPromptComponent = CompetitorPrompt && href ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
152
147
|
sourceUrl: href,
|
|
153
148
|
linkType: "embed"
|
|
154
149
|
}) : null;
|
|
@@ -11,7 +11,6 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
11
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
16
15
|
var _constants = require("../../../../../../constants");
|
|
17
16
|
var _flexibleUiContext = require("../../../../../../state/flexible-ui-context");
|
|
@@ -35,7 +34,7 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
35
34
|
var _context$actions;
|
|
36
35
|
var actionGroup = _ref.actionGroup,
|
|
37
36
|
hideRetry = _ref.hideRetry,
|
|
38
|
-
|
|
37
|
+
_retry = _ref.retry,
|
|
39
38
|
position = _ref.position,
|
|
40
39
|
testId = _ref.testId,
|
|
41
40
|
title = _ref.title,
|
|
@@ -45,7 +44,7 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
45
44
|
blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
46
45
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
47
46
|
var showRetry = !hideRetry && Boolean(context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.InternalActionName.UnresolvedAction]);
|
|
48
|
-
var competitorPrompt = CompetitorPrompt && context !== null && context !== void 0 && context.url
|
|
47
|
+
var competitorPrompt = CompetitorPrompt && context !== null && context !== void 0 && context.url ? /*#__PURE__*/_react.default.createElement(CompetitorPrompt, {
|
|
49
48
|
sourceUrl: context === null || context === void 0 ? void 0 : context.url,
|
|
50
49
|
linkType: 'card'
|
|
51
50
|
}) : null;
|
|
@@ -12,7 +12,6 @@ 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
15
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
16
|
var _constants = require("../../../../../../constants");
|
|
18
17
|
var _elements = require("../../../elements");
|
|
@@ -39,7 +38,7 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
39
38
|
_ref$subtitle = _ref.subtitle,
|
|
40
39
|
subtitle = _ref$subtitle === void 0 ? [] : _ref$subtitle,
|
|
41
40
|
testId = _ref.testId,
|
|
42
|
-
|
|
41
|
+
_text = _ref.text,
|
|
43
42
|
icon = _ref.icon,
|
|
44
43
|
title = _ref.title,
|
|
45
44
|
metadataPosition = _ref.metadataPosition,
|
|
@@ -63,7 +62,7 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
63
62
|
width: _constants.SmartLinkWidth.Flexible,
|
|
64
63
|
size: blockProps.size,
|
|
65
64
|
className: (0, _runtime.ax)(["_zulp1b66"])
|
|
66
|
-
}, CompetitorPrompt && url
|
|
65
|
+
}, CompetitorPrompt && url ? /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
67
66
|
xcss: styles.titleBox
|
|
68
67
|
}, title, /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
69
68
|
sourceUrl: url,
|
|
Binary file
|
|
Binary file
|
|
@@ -53,7 +53,7 @@ export const extractInvokePreviewAction = param => {
|
|
|
53
53
|
const src = (_extractPreviewData = extractPreviewData(data, 'web')) === null || _extractPreviewData === void 0 ? void 0 : _extractPreviewData.src;
|
|
54
54
|
|
|
55
55
|
// disallow preview modals within preview panels
|
|
56
|
-
if (!hasPreviewPanel && isInPreviewPanel
|
|
56
|
+
if (!hasPreviewPanel && isInPreviewPanel) {
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
if (src) {
|
|
@@ -6,7 +6,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
import { useCallback, useMemo } from 'react';
|
|
7
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
8
|
import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
11
10
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
12
11
|
import { ElementName, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../constants';
|
|
@@ -113,7 +112,7 @@ const NewUnauthorisedBlock = ({
|
|
|
113
112
|
size: SmartLinkSize.Large,
|
|
114
113
|
items: actions
|
|
115
114
|
}) : null;
|
|
116
|
-
const competitorPrompt = CompetitorPrompt && data !== null && data !== void 0 && data.url
|
|
115
|
+
const competitorPrompt = CompetitorPrompt && data !== null && data !== void 0 && data.url ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
117
116
|
sourceUrl: data === null || data === void 0 ? void 0 : data.url,
|
|
118
117
|
linkType: 'card'
|
|
119
118
|
}) : null;
|
|
@@ -5,7 +5,6 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
7
|
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import FlexibleCard from '../../../FlexibleCard';
|
|
10
9
|
import { CustomBlock, InternalFooterBlock, PreviewBlock, TitleBlock } from '../../../FlexibleCard/components/blocks';
|
|
11
10
|
import { FlexibleCardUiOptions, PreviewBlockOptions, titleBlockOptions } from '../utils';
|
|
@@ -42,10 +41,8 @@ const UnresolvedView = ({
|
|
|
42
41
|
url: url
|
|
43
42
|
}, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockOptions, {
|
|
44
43
|
hideIcon: !!title,
|
|
45
|
-
text: title
|
|
46
|
-
|
|
47
|
-
CompetitorPrompt
|
|
48
|
-
} : undefined, {
|
|
44
|
+
text: title,
|
|
45
|
+
CompetitorPrompt: CompetitorPrompt,
|
|
49
46
|
className: ax(["_zulpu2gc _13mh1pd9 _2yhz13af"])
|
|
50
47
|
})), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
51
48
|
className: ax(["_zulp1b66 _1e0c1txw _4cvr1y6m _1wpz1fhb _7yjtidpf _ngc0i7uo"])
|
|
@@ -5,7 +5,6 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
// eslint-disable-next-line no-unused-vars
|
|
7
7
|
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
10
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
11
10
|
import { useMouseDownEvent } from '../../../state/analytics/useLinkClicked';
|
|
@@ -31,9 +30,7 @@ const ExpandedFrame = ({
|
|
|
31
30
|
const isInteractive = () => !isPlaceholder && (Boolean(href) || Boolean(onClick));
|
|
32
31
|
const handleClick = event => handleClickCommon(event, onClick);
|
|
33
32
|
const handleMouseDown = useMouseDownEvent();
|
|
34
|
-
|
|
35
|
-
// Note: cleanup fg based on results of prompt_whiteboard_competitor_link experiment
|
|
36
|
-
const CompetitorPromptComponent = CompetitorPrompt && href && fg('prompt_whiteboard_competitor_link_gate') ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
33
|
+
const CompetitorPromptComponent = CompetitorPrompt && href ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
37
34
|
sourceUrl: href,
|
|
38
35
|
linkType: "embed"
|
|
39
36
|
}) : null;
|
|
@@ -122,9 +119,7 @@ const ExpandedFrameUpdated = ({
|
|
|
122
119
|
const isInteractive = () => !isPlaceholder && (Boolean(href) || Boolean(onClick));
|
|
123
120
|
const handleClick = event => handleClickCommon(event, onClick);
|
|
124
121
|
const handleMouseDown = useMouseDownEvent();
|
|
125
|
-
|
|
126
|
-
// Note: cleanup fg based on results of prompt_whiteboard_competitor_link experiment
|
|
127
|
-
const CompetitorPromptComponent = CompetitorPrompt && href && fg('prompt_whiteboard_competitor_link_gate') ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
122
|
+
const CompetitorPromptComponent = CompetitorPrompt && href ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
128
123
|
sourceUrl: href,
|
|
129
124
|
linkType: "embed"
|
|
130
125
|
}) : null;
|
|
@@ -3,7 +3,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
7
|
import { InternalActionName, SmartLinkAlignment } from '../../../../../../constants';
|
|
9
8
|
import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
|
|
@@ -25,7 +24,7 @@ const styles = {
|
|
|
25
24
|
const TitleBlockErroredView = ({
|
|
26
25
|
actionGroup,
|
|
27
26
|
hideRetry,
|
|
28
|
-
retry,
|
|
27
|
+
retry: _retry,
|
|
29
28
|
position,
|
|
30
29
|
testId,
|
|
31
30
|
title,
|
|
@@ -37,7 +36,7 @@ const TitleBlockErroredView = ({
|
|
|
37
36
|
var _context$actions;
|
|
38
37
|
const context = useFlexibleUiContext();
|
|
39
38
|
const showRetry = !hideRetry && Boolean(context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[InternalActionName.UnresolvedAction]);
|
|
40
|
-
const competitorPrompt = CompetitorPrompt && context !== null && context !== void 0 && context.url
|
|
39
|
+
const competitorPrompt = CompetitorPrompt && context !== null && context !== void 0 && context.url ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
41
40
|
sourceUrl: context === null || context === void 0 ? void 0 : context.url,
|
|
42
41
|
linkType: 'card'
|
|
43
42
|
}) : null;
|
|
@@ -3,7 +3,6 @@ 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
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
7
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkPosition, SmartLinkWidth } from '../../../../../../constants';
|
|
9
8
|
import { LinkIcon } from '../../../elements';
|
|
@@ -26,7 +25,7 @@ const TitleBlockResolvedView = ({
|
|
|
26
25
|
position,
|
|
27
26
|
subtitle = [],
|
|
28
27
|
testId,
|
|
29
|
-
text,
|
|
28
|
+
text: _text,
|
|
30
29
|
icon,
|
|
31
30
|
title,
|
|
32
31
|
metadataPosition,
|
|
@@ -53,7 +52,7 @@ const TitleBlockResolvedView = ({
|
|
|
53
52
|
width: SmartLinkWidth.Flexible,
|
|
54
53
|
size: blockProps.size,
|
|
55
54
|
className: ax(["_zulp1b66"])
|
|
56
|
-
}, CompetitorPrompt && url
|
|
55
|
+
}, CompetitorPrompt && url ? /*#__PURE__*/React.createElement(Box, {
|
|
57
56
|
xcss: styles.titleBox
|
|
58
57
|
}, title, /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
59
58
|
sourceUrl: url,
|
|
Binary file
|
|
Binary file
|
|
@@ -55,7 +55,7 @@ export var extractInvokePreviewAction = function extractInvokePreviewAction(para
|
|
|
55
55
|
var src = (_extractPreviewData = extractPreviewData(data, 'web')) === null || _extractPreviewData === void 0 ? void 0 : _extractPreviewData.src;
|
|
56
56
|
|
|
57
57
|
// disallow preview modals within preview panels
|
|
58
|
-
if (!hasPreviewPanel && isInPreviewPanel
|
|
58
|
+
if (!hasPreviewPanel && isInPreviewPanel) {
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
if (src) {
|
|
@@ -8,7 +8,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
8
8
|
import { useCallback, useMemo } from 'react';
|
|
9
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
10
10
|
import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
13
12
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
14
13
|
import { ElementName, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../constants';
|
|
@@ -113,7 +112,7 @@ var NewUnauthorisedBlock = function NewUnauthorisedBlock(_ref) {
|
|
|
113
112
|
size: SmartLinkSize.Large,
|
|
114
113
|
items: actions
|
|
115
114
|
}) : null;
|
|
116
|
-
var competitorPrompt = CompetitorPrompt && data !== null && data !== void 0 && data.url
|
|
115
|
+
var competitorPrompt = CompetitorPrompt && data !== null && data !== void 0 && data.url ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
117
116
|
sourceUrl: data === null || data === void 0 ? void 0 : data.url,
|
|
118
117
|
linkType: 'card'
|
|
119
118
|
}) : null;
|
|
@@ -5,7 +5,6 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
7
|
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import FlexibleCard from '../../../FlexibleCard';
|
|
10
9
|
import { CustomBlock, InternalFooterBlock, PreviewBlock, TitleBlock } from '../../../FlexibleCard/components/blocks';
|
|
11
10
|
import { FlexibleCardUiOptions, PreviewBlockOptions, titleBlockOptions } from '../utils';
|
|
@@ -44,10 +43,8 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
44
43
|
url: url
|
|
45
44
|
}, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockOptions, {
|
|
46
45
|
hideIcon: !!title,
|
|
47
|
-
text: title
|
|
48
|
-
|
|
49
|
-
CompetitorPrompt: CompetitorPrompt
|
|
50
|
-
} : undefined, {
|
|
46
|
+
text: title,
|
|
47
|
+
CompetitorPrompt: CompetitorPrompt,
|
|
51
48
|
className: ax(["_zulpu2gc _13mh1pd9 _2yhz13af"])
|
|
52
49
|
})), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
53
50
|
className: ax(["_zulp1b66 _1e0c1txw _4cvr1y6m _1wpz1fhb _7yjtidpf _ngc0i7uo"])
|
|
@@ -5,7 +5,6 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
// eslint-disable-next-line no-unused-vars
|
|
7
7
|
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
10
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
11
10
|
import { useMouseDownEvent } from '../../../state/analytics/useLinkClicked';
|
|
@@ -39,9 +38,7 @@ var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
39
38
|
return handleClickCommon(event, onClick);
|
|
40
39
|
};
|
|
41
40
|
var handleMouseDown = useMouseDownEvent();
|
|
42
|
-
|
|
43
|
-
// Note: cleanup fg based on results of prompt_whiteboard_competitor_link experiment
|
|
44
|
-
var CompetitorPromptComponent = CompetitorPrompt && href && fg('prompt_whiteboard_competitor_link_gate') ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
41
|
+
var CompetitorPromptComponent = CompetitorPrompt && href ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
45
42
|
sourceUrl: href,
|
|
46
43
|
linkType: "embed"
|
|
47
44
|
}) : null;
|
|
@@ -138,9 +135,7 @@ var ExpandedFrameUpdated = function ExpandedFrameUpdated(_ref2) {
|
|
|
138
135
|
return handleClickCommon(event, onClick);
|
|
139
136
|
};
|
|
140
137
|
var handleMouseDown = useMouseDownEvent();
|
|
141
|
-
|
|
142
|
-
// Note: cleanup fg based on results of prompt_whiteboard_competitor_link experiment
|
|
143
|
-
var CompetitorPromptComponent = CompetitorPrompt && href && fg('prompt_whiteboard_competitor_link_gate') ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
138
|
+
var CompetitorPromptComponent = CompetitorPrompt && href ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
144
139
|
sourceUrl: href,
|
|
145
140
|
linkType: "embed"
|
|
146
141
|
}) : null;
|
|
@@ -5,7 +5,6 @@ var _excluded = ["actionGroup", "hideRetry", "retry", "position", "testId", "tit
|
|
|
5
5
|
import "./index.compiled.css";
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
10
9
|
import { InternalActionName, SmartLinkAlignment } from '../../../../../../constants';
|
|
11
10
|
import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
|
|
@@ -28,7 +27,7 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
28
27
|
var _context$actions;
|
|
29
28
|
var actionGroup = _ref.actionGroup,
|
|
30
29
|
hideRetry = _ref.hideRetry,
|
|
31
|
-
|
|
30
|
+
_retry = _ref.retry,
|
|
32
31
|
position = _ref.position,
|
|
33
32
|
testId = _ref.testId,
|
|
34
33
|
title = _ref.title,
|
|
@@ -38,7 +37,7 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
38
37
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
39
38
|
var context = useFlexibleUiContext();
|
|
40
39
|
var showRetry = !hideRetry && Boolean(context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[InternalActionName.UnresolvedAction]);
|
|
41
|
-
var competitorPrompt = CompetitorPrompt && context !== null && context !== void 0 && context.url
|
|
40
|
+
var competitorPrompt = CompetitorPrompt && context !== null && context !== void 0 && context.url ? /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
42
41
|
sourceUrl: context === null || context === void 0 ? void 0 : context.url,
|
|
43
42
|
linkType: 'card'
|
|
44
43
|
}) : null;
|
|
@@ -5,7 +5,6 @@ var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "t
|
|
|
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
8
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
10
9
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkPosition, SmartLinkWidth } from '../../../../../../constants';
|
|
11
10
|
import { LinkIcon } from '../../../elements';
|
|
@@ -30,7 +29,7 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
30
29
|
_ref$subtitle = _ref.subtitle,
|
|
31
30
|
subtitle = _ref$subtitle === void 0 ? [] : _ref$subtitle,
|
|
32
31
|
testId = _ref.testId,
|
|
33
|
-
|
|
32
|
+
_text = _ref.text,
|
|
34
33
|
icon = _ref.icon,
|
|
35
34
|
title = _ref.title,
|
|
36
35
|
metadataPosition = _ref.metadataPosition,
|
|
@@ -54,7 +53,7 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
54
53
|
width: SmartLinkWidth.Flexible,
|
|
55
54
|
size: blockProps.size,
|
|
56
55
|
className: ax(["_zulp1b66"])
|
|
57
|
-
}, CompetitorPrompt && url
|
|
56
|
+
}, CompetitorPrompt && url ? /*#__PURE__*/React.createElement(Box, {
|
|
58
57
|
xcss: styles.titleBox
|
|
59
58
|
}, title, /*#__PURE__*/React.createElement(CompetitorPrompt, {
|
|
60
59
|
sourceUrl: url,
|
|
@@ -7,5 +7,5 @@ import { type TitleBlockViewProps } from '../types';
|
|
|
7
7
|
* or the backend response was errored or malformed.
|
|
8
8
|
* @see TitleBlock
|
|
9
9
|
*/
|
|
10
|
-
declare const TitleBlockErroredView: ({ actionGroup, hideRetry, retry, position, testId, title, icon, hideIcon, CompetitorPrompt, ...blockProps }: TitleBlockViewProps) => React.JSX.Element;
|
|
10
|
+
declare const TitleBlockErroredView: ({ actionGroup, hideRetry, retry: _retry, position, testId, title, icon, hideIcon, CompetitorPrompt, ...blockProps }: TitleBlockViewProps) => React.JSX.Element;
|
|
11
11
|
export default TitleBlockErroredView;
|
|
@@ -4,5 +4,5 @@ import { type TitleBlockViewProps } from '../types';
|
|
|
4
4
|
* This should render when a Smart Link returns a valid response.
|
|
5
5
|
* @see TitleBlock
|
|
6
6
|
*/
|
|
7
|
-
declare const TitleBlockResolvedView: ({ actionGroup, metadata, position, subtitle, testId, text, icon, title, metadataPosition, hideIcon, CompetitorPrompt, url, hideIconLoadingSkeleton, ...blockProps }: TitleBlockViewProps) => JSX.Element;
|
|
7
|
+
declare const TitleBlockResolvedView: ({ actionGroup, metadata, position, subtitle, testId, text: _text, icon, title, metadataPosition, hideIcon, CompetitorPrompt, url, hideIconLoadingSkeleton, ...blockProps }: TitleBlockViewProps) => JSX.Element;
|
|
8
8
|
export default TitleBlockResolvedView;
|
|
@@ -7,5 +7,5 @@ import { type TitleBlockViewProps } from '../types';
|
|
|
7
7
|
* or the backend response was errored or malformed.
|
|
8
8
|
* @see TitleBlock
|
|
9
9
|
*/
|
|
10
|
-
declare const TitleBlockErroredView: ({ actionGroup, hideRetry, retry, position, testId, title, icon, hideIcon, CompetitorPrompt, ...blockProps }: TitleBlockViewProps) => React.JSX.Element;
|
|
10
|
+
declare const TitleBlockErroredView: ({ actionGroup, hideRetry, retry: _retry, position, testId, title, icon, hideIcon, CompetitorPrompt, ...blockProps }: TitleBlockViewProps) => React.JSX.Element;
|
|
11
11
|
export default TitleBlockErroredView;
|
package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ import { type TitleBlockViewProps } from '../types';
|
|
|
4
4
|
* This should render when a Smart Link returns a valid response.
|
|
5
5
|
* @see TitleBlock
|
|
6
6
|
*/
|
|
7
|
-
declare const TitleBlockResolvedView: ({ actionGroup, metadata, position, subtitle, testId, text, icon, title, metadataPosition, hideIcon, CompetitorPrompt, url, hideIconLoadingSkeleton, ...blockProps }: TitleBlockViewProps) => JSX.Element;
|
|
7
|
+
declare const TitleBlockResolvedView: ({ actionGroup, metadata, position, subtitle, testId, text: _text, icon, title, metadataPosition, hideIcon, CompetitorPrompt, url, hideIconLoadingSkeleton, ...blockProps }: TitleBlockViewProps) => JSX.Element;
|
|
8
8
|
export default TitleBlockResolvedView;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "43.
|
|
3
|
+
"version": "43.23.1",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
64
64
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
65
65
|
"@atlaskit/popup": "^4.13.0",
|
|
66
|
-
"@atlaskit/primitives": "^
|
|
66
|
+
"@atlaskit/primitives": "^18.0.0",
|
|
67
67
|
"@atlaskit/react-ufo": "^5.0.0",
|
|
68
68
|
"@atlaskit/section-message": "^8.12.0",
|
|
69
69
|
"@atlaskit/select": "^21.7.0",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"@atlaskit/textfield": "^8.2.0",
|
|
73
73
|
"@atlaskit/theme": "^21.0.0",
|
|
74
74
|
"@atlaskit/tile": "^1.0.0",
|
|
75
|
-
"@atlaskit/tmp-editor-statsig": "^17.
|
|
76
|
-
"@atlaskit/tokens": "^
|
|
75
|
+
"@atlaskit/tmp-editor-statsig": "^17.10.0",
|
|
76
|
+
"@atlaskit/tokens": "^11.0.0",
|
|
77
77
|
"@atlaskit/tooltip": "^20.14.0",
|
|
78
78
|
"@atlaskit/ufo": "^0.4.0",
|
|
79
79
|
"@babel/runtime": "^7.0.0",
|
|
@@ -183,9 +183,6 @@
|
|
|
183
183
|
"platform_editor_content_mode_button_mvp": {
|
|
184
184
|
"type": "boolean"
|
|
185
185
|
},
|
|
186
|
-
"prompt_whiteboard_competitor_link_gate": {
|
|
187
|
-
"type": "boolean"
|
|
188
|
-
},
|
|
189
186
|
"platform-linking-team-member-count-component": {
|
|
190
187
|
"type": "boolean"
|
|
191
188
|
},
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|