@atlaskit/smart-card 39.3.0 → 40.0.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 +36 -0
- package/dist/cjs/extractors/flexible/index.js +3 -7
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/state/flexible-ui-context/index.js +3 -24
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +8 -21
- package/dist/cjs/view/BlockCard/views/unresolved-view/index.js +6 -16
- package/dist/cjs/view/BlockCard/views/utils/index.js +3 -10
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +0 -12
- package/dist/cjs/view/FlexibleCard/components/actions/custom-unresolved-action/index.compiled.css +3 -0
- package/dist/cjs/view/FlexibleCard/components/actions/custom-unresolved-action/index.js +79 -0
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +8 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/index.js +7 -18
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/index.js +7 -18
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +7 -18
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +14 -46
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +5 -12
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +8 -20
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +3 -22
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +8 -28
- package/dist/cjs/view/FlexibleCard/components/container/index.js +36 -126
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/elements/custom-by-access-type-element/index.js +15 -12
- package/dist/cjs/view/FlexibleCard/components/elements/title-element/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/external.js +6 -0
- package/dist/cjs/view/FlexibleCard/index.js +11 -30
- package/dist/cjs/view/FlexibleCard/utils.js +3 -7
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +1 -1
- package/dist/cjs/view/HoverCard/components/views/forbidden/index.js +10 -22
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +8 -21
- package/dist/cjs/view/HoverCard/styled.js +1 -12
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/RelatedLinksModal/components/related-link-item/index.js +0 -3
- package/dist/es2019/extractors/flexible/index.js +2 -7
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/state/flexible-ui-context/index.js +2 -23
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +10 -23
- package/dist/es2019/view/BlockCard/views/unresolved-view/index.js +7 -17
- package/dist/es2019/view/BlockCard/views/utils/index.js +2 -9
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +0 -12
- package/dist/es2019/view/FlexibleCard/components/actions/custom-unresolved-action/index.compiled.css +3 -0
- package/dist/es2019/view/FlexibleCard/components/actions/custom-unresolved-action/index.js +73 -0
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/index.js +5 -16
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/index.js +5 -16
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +5 -16
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +12 -44
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +3 -10
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +7 -18
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +4 -24
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +7 -26
- package/dist/es2019/view/FlexibleCard/components/container/index.js +8 -100
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/elements/custom-by-access-type-element/index.js +15 -12
- package/dist/es2019/view/FlexibleCard/components/elements/title-element/index.js +2 -3
- package/dist/es2019/view/FlexibleCard/external.js +1 -0
- package/dist/es2019/view/FlexibleCard/index.js +14 -33
- package/dist/es2019/view/FlexibleCard/utils.js +4 -8
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +2 -2
- package/dist/es2019/view/HoverCard/components/views/forbidden/index.js +10 -22
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +9 -22
- package/dist/es2019/view/HoverCard/styled.js +0 -11
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/components/related-link-item/index.js +0 -3
- package/dist/esm/extractors/flexible/index.js +4 -8
- package/dist/esm/index.js +1 -1
- package/dist/esm/state/flexible-ui-context/index.js +2 -23
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +10 -23
- package/dist/esm/view/BlockCard/views/unresolved-view/index.js +7 -17
- package/dist/esm/view/BlockCard/views/utils/index.js +2 -9
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +0 -12
- package/dist/esm/view/FlexibleCard/components/actions/custom-unresolved-action/index.compiled.css +3 -0
- package/dist/esm/view/FlexibleCard/components/actions/custom-unresolved-action/index.js +72 -0
- package/dist/esm/view/FlexibleCard/components/actions/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/index.js +7 -18
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/index.js +7 -18
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +7 -18
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +14 -46
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +5 -12
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +8 -20
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +4 -23
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +8 -28
- package/dist/esm/view/FlexibleCard/components/container/index.js +39 -130
- package/dist/esm/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/elements/custom-by-access-type-element/index.js +15 -12
- package/dist/esm/view/FlexibleCard/components/elements/title-element/index.js +2 -3
- package/dist/esm/view/FlexibleCard/external.js +1 -0
- package/dist/esm/view/FlexibleCard/index.js +14 -33
- package/dist/esm/view/FlexibleCard/utils.js +3 -7
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +2 -2
- package/dist/esm/view/HoverCard/components/views/forbidden/index.js +10 -22
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +9 -22
- package/dist/esm/view/HoverCard/styled.js +0 -11
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/components/related-link-item/index.js +0 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/index.d.ts +0 -12
- package/dist/types/state/flexible-ui-context/types.d.ts +0 -7
- package/dist/types/view/BlockCard/views/utils/index.d.ts +0 -4
- package/dist/types/view/FlexibleCard/components/actions/custom-unresolved-action/index.d.ts +16 -0
- package/dist/types/view/FlexibleCard/components/actions/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-footer-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/footer-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +1 -13
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +3 -8
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/custom-by-access-type-element/index.d.ts +2 -1
- package/dist/types/view/FlexibleCard/external.d.ts +2 -1
- package/dist/types/view/HoverCard/styled.d.ts +0 -4
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/state/flexible-ui-context/index.d.ts +0 -12
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +0 -7
- package/dist/types-ts4.5/view/BlockCard/views/utils/index.d.ts +0 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/custom-unresolved-action/index.d.ts +16 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/index.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-footer-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/footer-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +1 -1
- 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/types.d.ts +1 -13
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +3 -8
- package/dist/types-ts4.5/view/FlexibleCard/components/container/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/custom-by-access-type-element/index.d.ts +2 -1
- package/dist/types-ts4.5/view/FlexibleCard/external.d.ts +2 -1
- package/dist/types-ts4.5/view/HoverCard/styled.d.ts +0 -4
- package/package.json +5 -8
|
@@ -17,6 +17,12 @@ Object.defineProperty(exports, "CustomByStatusElement", {
|
|
|
17
17
|
return _elements.CustomByStatusElement;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
+
Object.defineProperty(exports, "CustomUnresolvedAction", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _actions.CustomUnresolvedAction;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
20
26
|
exports.toActionProps = exports.VoteCountElement = exports.ViewCountElement = exports.UnresolvedAction = exports.TitleElement = exports.TargetBranchElement = exports.SubscriberCountElement = exports.SubTasksProgressElement = exports.StoryPointsElement = exports.StateElement = exports.SourceBranchElement = exports.SnippetElement = exports.SentOnElement = exports.ReadTimeElement = exports.ReactCountElement = exports.ProviderElement = exports.ProgrammingLanguageElement = exports.PriorityElement = exports.PreviewElement = exports.PreviewAction = exports.OwnedByGroupElement = exports.OwnedByElement = exports.ModifiedOnElement = exports.ModifiedByElement = exports.LocationElement = exports.LinkIconElement = exports.LatestCommitElement = exports.FollowAction = exports.DueOnElement = exports.DownloadAction = void 0;
|
|
21
27
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
22
28
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var _useAnalyticsEvents2 = require("../../common/analytics/generated/use-analytics-events");
|
|
13
12
|
var _constants = require("../../constants");
|
|
14
13
|
var _flexibleUiContext = require("../../state/flexible-ui-context");
|
|
@@ -24,6 +23,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
24
23
|
* @see Container
|
|
25
24
|
*/
|
|
26
25
|
var FlexibleCard = function FlexibleCard(_ref) {
|
|
26
|
+
var _flexibleCardContext$;
|
|
27
27
|
var _ref$appearance = _ref.appearance,
|
|
28
28
|
appearance = _ref$appearance === void 0 ? 'flexible' : _ref$appearance,
|
|
29
29
|
cardState = _ref.cardState,
|
|
@@ -65,20 +65,16 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
65
65
|
url: url
|
|
66
66
|
});
|
|
67
67
|
}, [aiSummaryConfig, appearance, fireEvent, details, id, onAuthorize, onClick, origin, renderers, resolve, actionOptions, status, url]);
|
|
68
|
-
var flexibleCardContext = (0,
|
|
69
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
70
|
-
(0, _react.useMemo)(function () {
|
|
68
|
+
var flexibleCardContext = (0, _react.useMemo)(function () {
|
|
71
69
|
return {
|
|
72
70
|
data: context,
|
|
73
71
|
status: status,
|
|
74
72
|
ui: ui
|
|
75
73
|
};
|
|
76
|
-
}, [context, status, ui])
|
|
77
|
-
var retry = (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-unresolved-action') ? undefined : (0, _utils.getRetryOptions)(url, status, details, onAuthorize);
|
|
74
|
+
}, [context, status, ui]);
|
|
78
75
|
var _ref2 = context || {},
|
|
79
|
-
linkTitle = _ref2.linkTitle
|
|
80
|
-
|
|
81
|
-
var title = (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-context') ? linkTitle === null || linkTitle === void 0 ? void 0 : linkTitle.text : titleOld;
|
|
76
|
+
linkTitle = _ref2.linkTitle;
|
|
77
|
+
var title = linkTitle === null || linkTitle === void 0 ? void 0 : linkTitle.text;
|
|
82
78
|
(0, _react.useEffect)(function () {
|
|
83
79
|
switch (status) {
|
|
84
80
|
case _constants.SmartLinkStatus.Resolved:
|
|
@@ -103,33 +99,18 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
103
99
|
break;
|
|
104
100
|
}
|
|
105
101
|
}, [onError, onResolve, status, title, url]);
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}, /*#__PURE__*/_react.default.createElement(_container.default, (0, _extends2.default)({
|
|
110
|
-
testId: testId
|
|
111
|
-
}, ui, {
|
|
112
|
-
onClick: onClick,
|
|
113
|
-
retry: retry,
|
|
114
|
-
showHoverPreview: showHoverPreview,
|
|
115
|
-
hoverPreviewOptions: hoverPreviewOptions,
|
|
116
|
-
actionOptions: actionOptions,
|
|
117
|
-
status: status
|
|
118
|
-
}), children));
|
|
119
|
-
}
|
|
120
|
-
return /*#__PURE__*/_react.default.createElement(_flexibleUiContext.FlexibleUiOptionContext.Provider, {
|
|
121
|
-
value: ui
|
|
122
|
-
}, /*#__PURE__*/_react.default.createElement(_flexibleUiContext.FlexibleUiContext.Provider, {
|
|
123
|
-
value: context
|
|
102
|
+
var retry = (_flexibleCardContext$ = flexibleCardContext.data) === null || _flexibleCardContext$ === void 0 || (_flexibleCardContext$ = _flexibleCardContext$.actions) === null || _flexibleCardContext$ === void 0 ? void 0 : _flexibleCardContext$[_constants.InternalActionName.UnresolvedAction];
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement(_flexibleUiContext.FlexibleCardContext.Provider, {
|
|
104
|
+
value: flexibleCardContext
|
|
124
105
|
}, /*#__PURE__*/_react.default.createElement(_container.default, (0, _extends2.default)({
|
|
125
106
|
testId: testId
|
|
126
107
|
}, ui, {
|
|
127
108
|
onClick: onClick,
|
|
128
|
-
retry: retry,
|
|
129
109
|
showHoverPreview: showHoverPreview,
|
|
130
110
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
131
111
|
actionOptions: actionOptions,
|
|
132
|
-
status: status
|
|
133
|
-
|
|
112
|
+
status: status,
|
|
113
|
+
retry: retry
|
|
114
|
+
}), children));
|
|
134
115
|
};
|
|
135
116
|
var _default = exports.default = FlexibleCard;
|
|
@@ -30,12 +30,9 @@ var getContextByStatus = exports.getContextByStatus = function getContextByStatu
|
|
|
30
30
|
switch (status) {
|
|
31
31
|
case _constants.SmartLinkStatus.Pending:
|
|
32
32
|
case _constants.SmartLinkStatus.Resolving:
|
|
33
|
-
return
|
|
33
|
+
return {
|
|
34
34
|
linkTitle: (0, _extractLinkTitle.default)(status, url, response, onClick),
|
|
35
35
|
url: url
|
|
36
|
-
} : {
|
|
37
|
-
title: url,
|
|
38
|
-
url: url
|
|
39
36
|
};
|
|
40
37
|
case _constants.SmartLinkStatus.Resolved:
|
|
41
38
|
return (0, _flexible.default)(params);
|
|
@@ -47,12 +44,11 @@ var getContextByStatus = exports.getContextByStatus = function getContextByStatu
|
|
|
47
44
|
default:
|
|
48
45
|
return _objectSpread({
|
|
49
46
|
url: url,
|
|
50
|
-
title: (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-context') ? undefined : url,
|
|
51
47
|
linkIcon: (0, _icon.extractErrorIcon)(response, status),
|
|
52
|
-
linkTitle: (0,
|
|
48
|
+
linkTitle: (0, _extractLinkTitle.default)(status, url, response, onClick),
|
|
53
49
|
preview: (0, _extractPreview.extractSmartLinkPreviewImage)(response),
|
|
54
50
|
provider: (0, _extractProviderIcon.extractSmartLinkProviderIcon)(response),
|
|
55
|
-
actions: (0,
|
|
51
|
+
actions: (0, _defineProperty2.default)({}, _constants.InternalActionName.UnresolvedAction, getRetryOptions(url, status, response, params.onAuthorize))
|
|
56
52
|
}, (0, _platformFeatureFlags.fg)('bandicoots-smart-card-teamwork-context') ? {
|
|
57
53
|
meta: {
|
|
58
54
|
accessType: response === null || response === void 0 || (_response$meta = response.meta) === null || _response$meta === void 0 || (_response$meta = _response$meta.requestAccess) === null || _response$meta === void 0 ? void 0 : _response$meta.accessType
|
|
@@ -114,7 +114,7 @@ var HoverCardContent = function HoverCardContent(_ref) {
|
|
|
114
114
|
position: _constants.SmartLinkPosition.Center,
|
|
115
115
|
subtitle: subtitle
|
|
116
116
|
};
|
|
117
|
-
var uiOptions =
|
|
117
|
+
var uiOptions = _styled.flexibleUiOptions;
|
|
118
118
|
if ((0, _platformFeatureFlags.fg)('cc-ai-linking-platform-snippet-renderer')) {
|
|
119
119
|
uiOptions.enableSnippetRenderer = true;
|
|
120
120
|
}
|
|
@@ -17,7 +17,6 @@ var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
|
17
17
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
18
18
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
19
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
|
-
var _constants = require("../../../../../constants");
|
|
21
20
|
var _extractAccessContext = require("../../../../../extractors/common/context/extractAccessContext");
|
|
22
21
|
var _extractHostname = _interopRequireDefault(require("../../../../../extractors/common/hostname/extractHostname"));
|
|
23
22
|
var _messages = require("../../../../../messages");
|
|
@@ -56,39 +55,28 @@ var HoverCardForbiddenView = function HoverCardForbiddenView(_ref) {
|
|
|
56
55
|
var ButtonComponent = (0, _platformFeatureFlags.fg)('platform-smart-card-remove-legacy-button') ? _new.default : _button.default;
|
|
57
56
|
return /*#__PURE__*/React.createElement(_FlexibleCard.default, (0, _extends2.default)({}, flexibleCardProps, {
|
|
58
57
|
testId: testId
|
|
59
|
-
}), /*#__PURE__*/React.createElement(_blocks.PreviewBlock,
|
|
58
|
+
}), /*#__PURE__*/React.createElement(_blocks.PreviewBlock, {
|
|
60
59
|
ignoreContainerPadding: true,
|
|
61
|
-
testId: testId
|
|
62
|
-
}, (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-context') ? undefined : {
|
|
63
|
-
status: _constants.SmartLinkStatus.Forbidden
|
|
64
|
-
}, {
|
|
60
|
+
testId: testId,
|
|
65
61
|
className: (0, _runtime.ax)(["_13lipd34 _qrwqpd34 _otyru2gc"])
|
|
66
|
-
})
|
|
67
|
-
testId: "".concat(testId, "-title")
|
|
68
|
-
}, (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-context') ? undefined : {
|
|
69
|
-
status: _constants.SmartLinkStatus.Forbidden
|
|
70
|
-
}, {
|
|
62
|
+
}), /*#__PURE__*/React.createElement(_blocks.CustomBlock, {
|
|
63
|
+
testId: "".concat(testId, "-title"),
|
|
71
64
|
className: (0, _runtime.ax)(["_1bah1h6o _k48p1pd9 _19pku2gc"])
|
|
72
|
-
}
|
|
65
|
+
}, /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages[titleMessageKey], {
|
|
73
66
|
values: {
|
|
74
67
|
product: product
|
|
75
68
|
}
|
|
76
|
-
}))), /*#__PURE__*/React.createElement(_blocks.CustomBlock,
|
|
77
|
-
testId: "".concat(testId, "-content")
|
|
78
|
-
}, (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-context') ? undefined : {
|
|
79
|
-
status: _constants.SmartLinkStatus.Forbidden
|
|
80
|
-
}, {
|
|
69
|
+
}))), /*#__PURE__*/React.createElement(_blocks.CustomBlock, {
|
|
70
|
+
testId: "".concat(testId, "-content"),
|
|
81
71
|
className: (0, _runtime.ax)(["_11c8dcr7 _1e0c1nu9 _1bah1h6o _19pkze3t _y3gn1h6o"])
|
|
82
|
-
}
|
|
72
|
+
}, /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages[descriptiveMessageKey], {
|
|
83
73
|
values: {
|
|
84
74
|
product: product,
|
|
85
75
|
hostname: hostname
|
|
86
76
|
}
|
|
87
|
-
}))), action && /*#__PURE__*/React.createElement(_blocks.CustomBlock,
|
|
88
|
-
status: _constants.SmartLinkStatus.Forbidden
|
|
89
|
-
}, {
|
|
77
|
+
}))), action && /*#__PURE__*/React.createElement(_blocks.CustomBlock, {
|
|
90
78
|
className: (0, _runtime.ax)(["_1bah1h6o _19pku2gc"])
|
|
91
|
-
}
|
|
79
|
+
}, /*#__PURE__*/React.createElement(ButtonComponent, {
|
|
92
80
|
testId: "".concat(testId, "-button"),
|
|
93
81
|
onClick: action === null || action === void 0 ? void 0 : action.promise,
|
|
94
82
|
appearance: "primary",
|
|
@@ -11,7 +11,6 @@ require("./index.compiled.css");
|
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
16
15
|
var _constants = require("../../../../../constants");
|
|
17
16
|
var _analytics = require("../../../../../state/analytics");
|
|
@@ -67,40 +66,28 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
67
66
|
fallbackElementHeight: snippetHeight.current,
|
|
68
67
|
response: cardState.details
|
|
69
68
|
});
|
|
70
|
-
var snippet = imagePreview ? null : /*#__PURE__*/_react.default.createElement(_blocks.SnippetBlock,
|
|
71
|
-
status: _constants.SmartLinkStatus.Resolved
|
|
72
|
-
}, {
|
|
69
|
+
var snippet = imagePreview ? null : /*#__PURE__*/_react.default.createElement(_blocks.SnippetBlock, {
|
|
73
70
|
className: (0, _runtime.ax)(["_ca0q1b66"])
|
|
74
|
-
})
|
|
71
|
+
});
|
|
75
72
|
var aiSummaryMinHeight = snippet ? snippetHeight.current : 0;
|
|
76
73
|
return /*#__PURE__*/_react.default.createElement(_FlexibleCard.default, flexibleCardProps, imagePreview, /*#__PURE__*/_react.default.createElement(_blocks.TitleBlock, (0, _extends2.default)({}, titleBlockProps, {
|
|
77
|
-
metadataPosition: _constants.SmartLinkPosition.Top
|
|
78
|
-
}, (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-context') ? undefined : {
|
|
79
|
-
status: _constants.SmartLinkStatus.Resolved
|
|
80
|
-
}, {
|
|
74
|
+
metadataPosition: _constants.SmartLinkPosition.Top,
|
|
81
75
|
className: (0, _runtime.ax)(["_zulpu2gc _quenze3t _oebj1txw _13mh1pd9"])
|
|
82
|
-
})), /*#__PURE__*/_react.default.createElement(_blocks.MetadataBlock,
|
|
76
|
+
})), /*#__PURE__*/_react.default.createElement(_blocks.MetadataBlock, {
|
|
83
77
|
primary: primary,
|
|
84
78
|
secondary: secondary,
|
|
85
79
|
maxLines: 1,
|
|
86
80
|
size: _constants.SmartLinkSize.Medium
|
|
87
|
-
},
|
|
88
|
-
status: _constants.SmartLinkStatus.Resolved
|
|
89
|
-
})), isAISummaryEnabled ? /*#__PURE__*/_react.default.createElement(_blocks.AISummaryBlock, (0, _extends2.default)({
|
|
81
|
+
}), isAISummaryEnabled ? /*#__PURE__*/_react.default.createElement(_blocks.AISummaryBlock, {
|
|
90
82
|
aiSummaryMinHeight: aiSummaryMinHeight,
|
|
91
83
|
placeholder: snippet
|
|
92
|
-
}
|
|
93
|
-
status: _constants.SmartLinkStatus.Resolved
|
|
94
|
-
})) : snippet, /*#__PURE__*/_react.default.createElement(_blocks.SnippetBlock, (0, _extends2.default)({
|
|
84
|
+
}) : snippet, /*#__PURE__*/_react.default.createElement(_blocks.SnippetBlock, {
|
|
95
85
|
testId: "hidden-snippet",
|
|
96
86
|
onRender: onSnippetRender,
|
|
97
|
-
blockRef: snippetBlockRef
|
|
98
|
-
}, (0, _platformFeatureFlags.fg)('platform-linking-flexible-card-context') ? undefined : {
|
|
99
|
-
status: _constants.SmartLinkStatus.Resolved
|
|
100
|
-
}, {
|
|
87
|
+
blockRef: snippetBlockRef,
|
|
101
88
|
isHidden: true,
|
|
102
89
|
className: (0, _runtime.ax)(["_3um015vq _kqswstnw"])
|
|
103
|
-
})
|
|
90
|
+
}), /*#__PURE__*/_react.default.createElement(_blocks.ActionBlock, {
|
|
104
91
|
onClick: onActionClick,
|
|
105
92
|
spaceInline: "space.100",
|
|
106
93
|
className: (0, _runtime.ax)(["_n3td1b66"])
|
|
@@ -3,22 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.flexibleUiOptions = exports.HOVER_CARD_Z_INDEX = exports.CARD_WIDTH_REM = exports.CARD_GAP_PX = void 0;
|
|
7
7
|
var _constants = require("@atlaskit/theme/constants");
|
|
8
8
|
var _constants2 = require("../../constants");
|
|
9
9
|
// Temporary fix for Confluence inline comment on editor mod has z-index of 500, Jira issue view has z-index of 510
|
|
10
10
|
var HOVER_CARD_Z_INDEX = exports.HOVER_CARD_Z_INDEX = _constants.layers.modal();
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
14
|
-
*/
|
|
15
|
-
var flexibleUiOptionsOld = exports.flexibleUiOptionsOld = {
|
|
16
|
-
hideBackground: true,
|
|
17
|
-
hideElevation: true,
|
|
18
|
-
hideLegacyButton: true,
|
|
19
|
-
size: _constants2.SmartLinkSize.Medium,
|
|
20
|
-
zIndex: HOVER_CARD_Z_INDEX + 1
|
|
21
|
-
};
|
|
22
11
|
var flexibleUiOptions = exports.flexibleUiOptions = {
|
|
23
12
|
hideBackground: true,
|
|
24
13
|
hideElevation: true,
|
|
@@ -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: "39.
|
|
23
|
+
packageVersion: "39.4.0",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -10,7 +10,6 @@ require("./index.compiled.css");
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
-
var _constants = require("../../../../constants");
|
|
14
13
|
var _index = require("../../../../index");
|
|
15
14
|
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); }
|
|
16
15
|
var hoverStyleOld = null;
|
|
@@ -53,8 +52,6 @@ var RelatedLinkItem = function RelatedLinkItem(_ref) {
|
|
|
53
52
|
subtitle: subtitle,
|
|
54
53
|
anchorTarget: "_blank",
|
|
55
54
|
size: ui.size,
|
|
56
|
-
theme: ui.theme,
|
|
57
|
-
status: _constants.SmartLinkStatus.Resolved,
|
|
58
55
|
className: (0, _runtime.ax)(["_zulputpp _11c81o8v _ca0qu2gc _n3tdu2gc"])
|
|
59
56
|
})));
|
|
60
57
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractPersonOwnedBy, extractSmartLinkAri, extractSmartLinkAuthorGroup, extractSmartLinkCreatedBy, extractSmartLinkCreatedOn, extractSmartLinkModifiedBy, extractSmartLinkModifiedOn,
|
|
1
|
+
import { extractPersonOwnedBy, extractSmartLinkAri, extractSmartLinkAuthorGroup, extractSmartLinkCreatedBy, extractSmartLinkCreatedOn, extractSmartLinkModifiedBy, extractSmartLinkModifiedOn, extractSmartLinkUrl, extractType } from '@atlaskit/link-extractors';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
3
|
import { extractSmartLinkSummary } from '../common/primitives/extractSummary';
|
|
4
4
|
import { extractFlexibleCardActions } from './actions';
|
|
@@ -60,9 +60,7 @@ const extractFlexibleUiContext = ({
|
|
|
60
60
|
dueOn: extractDueOn(data),
|
|
61
61
|
latestCommit: extractLatestCommit(data),
|
|
62
62
|
linkIcon: extractSmartLinkIcon(response),
|
|
63
|
-
|
|
64
|
-
linkTitle: extractLinkTitle(status, props.url, response, onClick)
|
|
65
|
-
}),
|
|
63
|
+
linkTitle: extractLinkTitle(status, props.url, response, onClick),
|
|
66
64
|
location: extractLocation(data),
|
|
67
65
|
modifiedBy: extractSmartLinkModifiedBy(response),
|
|
68
66
|
modifiedOn: extractSmartLinkModifiedOn(response),
|
|
@@ -83,9 +81,6 @@ const extractFlexibleUiContext = ({
|
|
|
83
81
|
...(fg('platform-linking-user-attributes-component') && {
|
|
84
82
|
userAttributes: extractUserAttributes(data)
|
|
85
83
|
}),
|
|
86
|
-
...(fg('platform-linking-flexible-card-context') ? undefined : {
|
|
87
|
-
title: extractSmartLinkTitle(response) || url
|
|
88
|
-
}),
|
|
89
84
|
...(fg('platform-linking-team-member-count-component') && {
|
|
90
85
|
teamMemberCount: extractTeamMemberCount(data)
|
|
91
86
|
}),
|
package/dist/es2019/index.js
CHANGED
|
@@ -15,6 +15,6 @@ export { loadingPlaceholderClassName } from './view/CardWithUrl/component-lazy/L
|
|
|
15
15
|
export { ActionName, ElementName, MediaPlacement, SmartLinkDirection, SmartLinkPosition, SmartLinkSize, SmartLinkTheme } from './constants';
|
|
16
16
|
export { MetadataBlock, PreviewBlock, SnippetBlock, TitleBlock, FooterBlock, CustomBlock } from './view/FlexibleCard/components/blocks';
|
|
17
17
|
export { AssignedToElement, AssignedToGroupElement, AttachmentCountElement, AuthorGroupElement, ChecklistProgressElement, CollaboratorGroupElement, CommentCountElement, CreatedOnElement, CreatedByElement, DueOnElement, LatestCommitElement, LinkIconElement, LocationElement, ModifiedByElement, ModifiedOnElement, OwnedByElement, OwnedByGroupElement, PreviewElement, PriorityElement, ProgrammingLanguageElement, ProviderElement, ReactCountElement, ReadTimeElement, SentOnElement, SnippetElement, SourceBranchElement, StateElement, StoryPointsElement, SubscriberCountElement, SubTasksProgressElement, TargetBranchElement, TitleElement, ViewCountElement, VoteCountElement, CustomByAccessTypeElement, CustomByStatusElement } from './view/FlexibleCard/external';
|
|
18
|
-
export { CopyLinkAction, CustomAction, DownloadAction, FollowAction, PreviewAction, UnresolvedAction } from './view/FlexibleCard/external';
|
|
18
|
+
export { CopyLinkAction, CustomAction, DownloadAction, FollowAction, PreviewAction, UnresolvedAction, CustomUnresolvedAction } from './view/FlexibleCard/external';
|
|
19
19
|
/** @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-661 Internal documentation for deprecation (no external access)} */
|
|
20
20
|
export { editorCardProvider, EditorCardProvider } from '@atlaskit/link-provider';
|
|
@@ -1,36 +1,15 @@
|
|
|
1
1
|
import { createContext, useContext } from 'react';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
/**
|
|
4
3
|
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
5
4
|
* underlying elements.
|
|
6
5
|
*/
|
|
7
6
|
export const FlexibleCardContext = /*#__PURE__*/createContext(undefined);
|
|
8
7
|
export const useFlexibleCardContext = () => useContext(FlexibleCardContext);
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
12
|
-
* underlying elements.
|
|
13
|
-
* @deprecated Remove on cleanup of platform-linking-flexible-card-context
|
|
14
|
-
*/
|
|
15
|
-
export const FlexibleUiContext = /*#__PURE__*/createContext(undefined);
|
|
16
8
|
export const useFlexibleUiContext = () => {
|
|
17
9
|
var _useFlexibleCardConte;
|
|
18
|
-
return
|
|
19
|
-
(_useFlexibleCardConte = useFlexibleCardContext()) === null || _useFlexibleCardConte === void 0 ? void 0 : _useFlexibleCardConte.data :
|
|
20
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
21
|
-
useContext(FlexibleUiContext);
|
|
10
|
+
return (_useFlexibleCardConte = useFlexibleCardContext()) === null || _useFlexibleCardConte === void 0 ? void 0 : _useFlexibleCardConte.data;
|
|
22
11
|
};
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* This provides the ui options that will be used by Smart Links Flexible UI
|
|
26
|
-
* to render its underlying elements.
|
|
27
|
-
* @deprecated Remove on cleanup of platform-linking-flexible-card-context
|
|
28
|
-
*/
|
|
29
|
-
export const FlexibleUiOptionContext = /*#__PURE__*/createContext(undefined);
|
|
30
12
|
export const useFlexibleUiOptionContext = () => {
|
|
31
13
|
var _useFlexibleCardConte2;
|
|
32
|
-
return
|
|
33
|
-
(_useFlexibleCardConte2 = useFlexibleCardContext()) === null || _useFlexibleCardConte2 === void 0 ? void 0 : _useFlexibleCardConte2.ui :
|
|
34
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
35
|
-
useContext(FlexibleUiOptionContext);
|
|
14
|
+
return (_useFlexibleCardConte2 = useFlexibleCardContext()) === null || _useFlexibleCardConte2 === void 0 ? void 0 : _useFlexibleCardConte2.ui;
|
|
36
15
|
};
|
|
@@ -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: "39.
|
|
5
|
+
packageVersion: "39.4.0"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -6,10 +6,10 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
import { useEffect, useMemo, useState } from 'react';
|
|
7
7
|
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
-
import { ActionName, ElementName, SmartLinkPosition
|
|
9
|
+
import { ActionName, ElementName, SmartLinkPosition } from '../../../constants';
|
|
10
10
|
import FlexibleCard from '../../FlexibleCard';
|
|
11
11
|
import { FooterBlock, MetadataBlock, PreviewBlock, SnippetBlock, TitleBlock } from '../../FlexibleCard/components/blocks';
|
|
12
|
-
import { FlexibleCardUiOptions,
|
|
12
|
+
import { FlexibleCardUiOptions, getSimulatedBetterMetadata, PreviewBlockOptions, titleBlockOptions } from './utils';
|
|
13
13
|
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
14
14
|
const titleBlockCss = null;
|
|
15
15
|
const footerBlockCss = null;
|
|
@@ -55,8 +55,7 @@ const ResolvedView = ({
|
|
|
55
55
|
name: ActionName.DownloadAction,
|
|
56
56
|
hideIcon: true
|
|
57
57
|
}], []);
|
|
58
|
-
const
|
|
59
|
-
const uiOptions = fg('platform-linking-flexible-card-context') ? FlexibleCardUiOptions : FlexibleCardUiOptionsOld;
|
|
58
|
+
const uiOptions = FlexibleCardUiOptions;
|
|
60
59
|
if (fg('cc-ai-linking-platform-snippet-renderer')) {
|
|
61
60
|
uiOptions.enableSnippetRenderer = true;
|
|
62
61
|
}
|
|
@@ -76,36 +75,24 @@ const ResolvedView = ({
|
|
|
76
75
|
subtitle: [{
|
|
77
76
|
name: ElementName.Location
|
|
78
77
|
}],
|
|
79
|
-
metadataPosition: SmartLinkPosition.Top
|
|
80
|
-
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
81
|
-
status
|
|
82
|
-
}, {
|
|
78
|
+
metadataPosition: SmartLinkPosition.Top,
|
|
83
79
|
CompetitorPrompt: CompetitorPrompt,
|
|
84
80
|
url: url,
|
|
85
81
|
hideIconLoadingSkeleton: hideIconLoadingSkeleton,
|
|
86
82
|
className: ax(["_zulpu2gc _13mh1pd9 _2yhz14q2"])
|
|
87
|
-
})), /*#__PURE__*/React.createElement(MetadataBlock,
|
|
83
|
+
})), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
88
84
|
primary: topMetadata,
|
|
89
85
|
maxLines: 1
|
|
90
|
-
},
|
|
91
|
-
status: SmartLinkStatus.Resolved
|
|
92
|
-
})), /*#__PURE__*/React.createElement(SnippetBlock, null), /*#__PURE__*/React.createElement(MetadataBlock, _extends({
|
|
86
|
+
}), /*#__PURE__*/React.createElement(SnippetBlock, null), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
93
87
|
primary: bottomMetadata,
|
|
94
88
|
maxLines: 1
|
|
95
|
-
},
|
|
96
|
-
status: SmartLinkStatus.Resolved
|
|
97
|
-
})), !isPreviewBlockErrored ? /*#__PURE__*/React.createElement(PreviewBlock, _extends({}, PreviewBlockOptions, {
|
|
89
|
+
}), !isPreviewBlockErrored ? /*#__PURE__*/React.createElement(PreviewBlock, _extends({}, PreviewBlockOptions, {
|
|
98
90
|
onError: () => {
|
|
99
91
|
setIsPreviewBlockErrored(true);
|
|
100
92
|
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
})) : null, /*#__PURE__*/React.createElement(FooterBlock, _extends({
|
|
104
|
-
actions: footerActions
|
|
105
|
-
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
106
|
-
status: SmartLinkStatus.Resolved
|
|
107
|
-
}, {
|
|
93
|
+
})) : null, /*#__PURE__*/React.createElement(FooterBlock, {
|
|
94
|
+
actions: footerActions,
|
|
108
95
|
className: ax(["_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb", safari && fg('platform-linking-visual-refresh-v2') && "_4t3i1osq"])
|
|
109
|
-
}))
|
|
96
|
+
}));
|
|
110
97
|
};
|
|
111
98
|
export default withFlexibleUIBlockCardStyle(ResolvedView);
|
|
@@ -8,7 +8,7 @@ import { browser } from '@atlaskit/linking-common/user-agent';
|
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import FlexibleCard from '../../../FlexibleCard';
|
|
10
10
|
import { CustomBlock, InternalFooterBlock, PreviewBlock, TitleBlock } from '../../../FlexibleCard/components/blocks';
|
|
11
|
-
import { FlexibleCardUiOptions,
|
|
11
|
+
import { FlexibleCardUiOptions, PreviewBlockOptions, titleBlockOptions } from '../utils';
|
|
12
12
|
const customBlockStyles = null;
|
|
13
13
|
const titleBlockCss = null;
|
|
14
14
|
const footerBlockCss = null;
|
|
@@ -38,28 +38,18 @@ const UnresolvedView = ({
|
|
|
38
38
|
onError: onError,
|
|
39
39
|
origin: "smartLinkCard",
|
|
40
40
|
testId: testId,
|
|
41
|
-
ui:
|
|
41
|
+
ui: FlexibleCardUiOptions,
|
|
42
42
|
url: url
|
|
43
43
|
}, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockOptions, {
|
|
44
44
|
hideIcon: !!title,
|
|
45
|
-
text: title
|
|
46
|
-
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
47
|
-
status: cardState.status
|
|
48
|
-
}, {
|
|
45
|
+
text: title,
|
|
49
46
|
className: ax(["_zulpu2gc _13mh1pd9 _2yhz14q2"])
|
|
50
|
-
})), /*#__PURE__*/React.createElement(CustomBlock,
|
|
51
|
-
status: cardState.status
|
|
52
|
-
}, {
|
|
47
|
+
})), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
53
48
|
className: ax(["_zulp1b66 _1e0c1txw _4cvr1y6m _1wpz1fhb _7yjtidpf _ngc01fxt"])
|
|
54
|
-
}
|
|
55
|
-
status: cardState.status
|
|
56
|
-
})), /*#__PURE__*/React.createElement(InternalFooterBlock, _extends({
|
|
49
|
+
}, children), showPreview && /*#__PURE__*/React.createElement(PreviewBlock, PreviewBlockOptions), /*#__PURE__*/React.createElement(InternalFooterBlock, {
|
|
57
50
|
actions: actions,
|
|
58
|
-
testId: "smart-block-card-footer"
|
|
59
|
-
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
60
|
-
status: cardState.status
|
|
61
|
-
}, {
|
|
51
|
+
testId: "smart-block-card-footer",
|
|
62
52
|
className: ax(["_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb", safari && fg('platform-linking-visual-refresh-v2') && "_4t3i1osq"])
|
|
63
|
-
}))
|
|
53
|
+
}));
|
|
64
54
|
};
|
|
65
55
|
export default UnresolvedView;
|
|
@@ -28,7 +28,7 @@ const baseBottomMetaData = [{
|
|
|
28
28
|
name: ElementName.ChecklistProgress
|
|
29
29
|
}];
|
|
30
30
|
export const getSimulatedBetterMetadata = cardDetails => {
|
|
31
|
-
var _getExtensionKey, _data$Type$includes, _data$Type
|
|
31
|
+
var _getExtensionKey, _data$Type$includes, _data$Type;
|
|
32
32
|
const extensionKey = (_getExtensionKey = getExtensionKey(cardDetails)) !== null && _getExtensionKey !== void 0 ? _getExtensionKey : '';
|
|
33
33
|
const data = cardDetails === null || cardDetails === void 0 ? void 0 : cardDetails.data;
|
|
34
34
|
const defaultTitleMetadata = [{
|
|
@@ -79,7 +79,7 @@ export const getSimulatedBetterMetadata = cardDetails => {
|
|
|
79
79
|
};
|
|
80
80
|
case 'jira-object-provider':
|
|
81
81
|
const isJiraTask = (_data$Type$includes = (_data$Type = data['@type']) === null || _data$Type === void 0 ? void 0 : _data$Type.includes('atlassian:Task')) !== null && _data$Type$includes !== void 0 ? _data$Type$includes : false;
|
|
82
|
-
const isJiraPlan =
|
|
82
|
+
const isJiraPlan = data['atlassian:ownedBy'] ? true : false;
|
|
83
83
|
let topMetadata = [{
|
|
84
84
|
name: ElementName.AuthorGroup
|
|
85
85
|
}, {
|
|
@@ -156,13 +156,6 @@ export const getSimulatedBetterMetadata = cardDetails => {
|
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
|
-
/**
|
|
160
|
-
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
161
|
-
*/
|
|
162
|
-
export const FlexibleCardUiOptionsOld = {
|
|
163
|
-
hideElevation: true,
|
|
164
|
-
hideLegacyButton: true
|
|
165
|
-
};
|
|
166
159
|
export const FlexibleCardUiOptions = {
|
|
167
160
|
hideElevation: true,
|
|
168
161
|
hideLegacyButton: true,
|
|
@@ -10,16 +10,9 @@ import { SmartLinkSize } from '../../../../../../constants';
|
|
|
10
10
|
import { useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
|
|
11
11
|
import { withOverrideCss } from '../../../common/with-override-css';
|
|
12
12
|
import { sizeToButtonSpacing } from '../../../utils';
|
|
13
|
-
// TODO: Remove on fg cleanup: platform-linking-visual-refresh-v1
|
|
14
13
|
const IconOnlyLarge = null;
|
|
15
|
-
|
|
16
|
-
// TODO: Remove on fg cleanup: platform-linking-visual-refresh-v1
|
|
17
14
|
const SizeSmall = null;
|
|
18
|
-
|
|
19
|
-
// TODO: Remove on fg cleanup: platform-linking-visual-refresh-v1
|
|
20
15
|
const SizeSmallIconOnly = null;
|
|
21
|
-
|
|
22
|
-
// TODO: Remove on fg cleanup: platform-linking-visual-refresh-v1
|
|
23
16
|
const SizeSmallNotIconOnly = null;
|
|
24
17
|
const IconButtonAppearanceMap = {
|
|
25
18
|
default: 'default',
|
|
@@ -134,12 +127,7 @@ const ActionButtonRefresh = /*#__PURE__*/forwardRef(({
|
|
|
134
127
|
ref: ref
|
|
135
128
|
}, button);
|
|
136
129
|
});
|
|
137
|
-
|
|
138
|
-
// On cleanup of platform-linking-visual-refresh-v1, this should become
|
|
139
|
-
// export default withOverrideCss(ActionButton);
|
|
140
130
|
const ActionButtonRefreshWithOverrideCss = withOverrideCss(ActionButtonRefresh);
|
|
141
|
-
|
|
142
|
-
// TODO: Remove on fg cleanup: platform-linking-visual-refresh-v1
|
|
143
131
|
const ActionButtonNew = ({
|
|
144
132
|
appearance = 'default',
|
|
145
133
|
content,
|