@atlaskit/smart-card 26.46.4 → 26.47.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 +17 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/components/Content.js +6 -0
- package/dist/cjs/view/BlockCard/components/ContentHeader.js +6 -0
- package/dist/cjs/view/BlockCard/components/Name.js +6 -0
- package/dist/cjs/view/BlockCard/views/ErroredView.js +6 -0
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +13 -0
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +6 -0
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +12 -0
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +6 -0
- package/dist/cjs/view/CardWithUrl/component.js +3 -2
- package/dist/cjs/view/CardWithUrl/loader.js +4 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/Icon.js +6 -0
- package/dist/cjs/view/common/ai-summary/index.js +38 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/components/Content.js +6 -0
- package/dist/es2019/view/BlockCard/components/ContentHeader.js +6 -0
- package/dist/es2019/view/BlockCard/components/Name.js +6 -0
- package/dist/es2019/view/BlockCard/views/ErroredView.js +6 -0
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +13 -0
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +6 -0
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +12 -0
- package/dist/es2019/view/BlockCard/views/ResolvingView.js +6 -0
- package/dist/es2019/view/CardWithUrl/component.js +3 -2
- package/dist/es2019/view/CardWithUrl/loader.js +4 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/Icon.js +6 -0
- package/dist/es2019/view/common/ai-summary/index.js +35 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/components/Content.js +6 -0
- package/dist/esm/view/BlockCard/components/ContentHeader.js +6 -0
- package/dist/esm/view/BlockCard/components/Name.js +6 -0
- package/dist/esm/view/BlockCard/views/ErroredView.js +6 -0
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +13 -0
- package/dist/esm/view/BlockCard/views/NotFoundView.js +6 -0
- package/dist/esm/view/BlockCard/views/ResolvedView.js +12 -0
- package/dist/esm/view/BlockCard/views/ResolvingView.js +6 -0
- package/dist/esm/view/CardWithUrl/component.js +3 -2
- package/dist/esm/view/CardWithUrl/loader.js +4 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/Icon.js +6 -0
- package/dist/esm/view/common/ai-summary/index.js +31 -0
- package/dist/types/view/BlockCard/components/Content.d.ts +6 -0
- package/dist/types/view/BlockCard/components/ContentHeader.d.ts +6 -0
- package/dist/types/view/BlockCard/components/Name.d.ts +6 -0
- package/dist/types/view/BlockCard/views/ErroredView.d.ts +6 -0
- package/dist/types/view/BlockCard/views/ForbiddenView.d.ts +12 -0
- package/dist/types/view/BlockCard/views/NotFoundView.d.ts +6 -0
- package/dist/types/view/BlockCard/views/ResolvedView.d.ts +12 -0
- package/dist/types/view/BlockCard/views/ResolvingView.d.ts +6 -0
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +6 -0
- package/dist/types/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types/view/common/Icon.d.ts +6 -0
- package/dist/types/view/common/ai-summary/index.d.ts +20 -0
- package/dist/types-ts4.5/view/BlockCard/components/Content.d.ts +6 -0
- package/dist/types-ts4.5/view/BlockCard/components/ContentHeader.d.ts +6 -0
- package/dist/types-ts4.5/view/BlockCard/components/Name.d.ts +6 -0
- package/dist/types-ts4.5/view/BlockCard/views/ErroredView.d.ts +6 -0
- package/dist/types-ts4.5/view/BlockCard/views/ForbiddenView.d.ts +12 -0
- package/dist/types-ts4.5/view/BlockCard/views/NotFoundView.d.ts +6 -0
- package/dist/types-ts4.5/view/BlockCard/views/ResolvedView.d.ts +12 -0
- package/dist/types-ts4.5/view/BlockCard/views/ResolvingView.d.ts +6 -0
- package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
- package/dist/types-ts4.5/view/Card/types.d.ts +6 -0
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types-ts4.5/view/common/Icon.d.ts +6 -0
- package/dist/types-ts4.5/view/common/ai-summary/index.d.ts +20 -0
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.47.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#70641](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70641) [`ace1983306b8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ace1983306b8) - EDM-8787 Add useLegacyBlockCard prop to smart card
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 26.46.5
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#71028](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71028) [`8b1c78df8102`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8b1c78df8102) - AI Summary Preview component added
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 26.46.4
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
22
22
|
var context = exports.context = {
|
|
23
23
|
componentName: 'smart-cards',
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "26.
|
|
25
|
+
packageVersion: "26.47.0"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -8,6 +8,12 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
var _utils = require("../../common/utils");
|
|
9
9
|
/** @jsx jsx */
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Class name for selecting non-flexible block card content
|
|
13
|
+
*
|
|
14
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
15
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
16
|
+
*/
|
|
11
17
|
var blockCardContentClassName = exports.blockCardContentClassName = 'block-card-content';
|
|
12
18
|
var Content = exports.Content = function Content(_ref) {
|
|
13
19
|
var children = _ref.children,
|
|
@@ -8,6 +8,12 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
var _useLinkClicked = require("../../../state/analytics/useLinkClicked");
|
|
9
9
|
/** @jsx jsx */
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Class name for selecting non-flexible block card header
|
|
13
|
+
*
|
|
14
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
15
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
16
|
+
*/
|
|
11
17
|
var blockCardContentHeaderClassName = exports.blockCardContentHeaderClassName = 'block-card-content-header';
|
|
12
18
|
var ContentHeader = exports.ContentHeader = function ContentHeader(_ref) {
|
|
13
19
|
var onClick = _ref.onClick,
|
|
@@ -9,6 +9,12 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
9
9
|
var _utils = require("../../common/utils");
|
|
10
10
|
/** @jsx jsx */
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Class name for selecting non-flexible block card header name
|
|
14
|
+
*
|
|
15
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
16
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
17
|
+
*/
|
|
12
18
|
var blockCardContentHeaderNameClassName = exports.blockCardContentHeaderNameClassName = 'block-card-content-header-name';
|
|
13
19
|
var Name = exports.Name = function Name(_ref) {
|
|
14
20
|
var name = _ref.name,
|
|
@@ -25,6 +25,12 @@ var _RetryAction = require("../actions/RetryAction");
|
|
|
25
25
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26
26
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */
|
|
27
27
|
var textDescriptionProps = _objectSpread({}, _messages.messages.could_not_load_link);
|
|
28
|
+
/**
|
|
29
|
+
* Class name for selecting non-flexible errored block card
|
|
30
|
+
*
|
|
31
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
32
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
33
|
+
*/
|
|
28
34
|
var blockCardErroredViewClassName = exports.blockCardErroredViewClassName = 'block-card-errored-view';
|
|
29
35
|
var ErroredView = exports.ErroredView = function ErroredView(_ref) {
|
|
30
36
|
var _ref$isSelected = _ref.isSelected,
|
|
@@ -24,7 +24,20 @@ var _Link = require("../components/Link");
|
|
|
24
24
|
var _UnresolvedText = require("../components/UnresolvedText");
|
|
25
25
|
/** @jsx jsx */
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Class name for selecting non-flexible forbidden block card
|
|
29
|
+
*
|
|
30
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
31
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
32
|
+
*/
|
|
27
33
|
var blockCardForbiddenViewClassName = exports.blockCardForbiddenViewClassName = 'block-card-forbidden-view';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Class name for selecting link inside non-flexible forbidden block card
|
|
37
|
+
*
|
|
38
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
39
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
40
|
+
*/
|
|
28
41
|
var blockCardForbiddenViewLinkClassName = exports.blockCardForbiddenViewLinkClassName = 'block-card-forbidden-view-link';
|
|
29
42
|
var ForbiddenView = exports.ForbiddenView = function ForbiddenView(_ref) {
|
|
30
43
|
var _ref$context = _ref.context,
|
|
@@ -24,6 +24,12 @@ var _handlers = require("../utils/handlers");
|
|
|
24
24
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25
25
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */
|
|
26
26
|
var textDescriptionProps = _objectSpread({}, _messages.messages.not_found_description);
|
|
27
|
+
/**
|
|
28
|
+
* Class name for selecting non-flexible not-found block card
|
|
29
|
+
*
|
|
30
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
31
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
32
|
+
*/
|
|
27
33
|
var blockCardNotFoundViewClassName = exports.blockCardNotFoundViewClassName = 'block-card-not-found-view';
|
|
28
34
|
var NotFoundView = exports.NotFoundView = function NotFoundView(_ref) {
|
|
29
35
|
var _ref$context = _ref.context,
|
|
@@ -25,7 +25,19 @@ var _utils = require("../../common/utils");
|
|
|
25
25
|
var _handlers = require("../utils/handlers");
|
|
26
26
|
/** @jsx jsx */
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Class name for selecting non-flexible resolved block card
|
|
30
|
+
*
|
|
31
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
32
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
33
|
+
*/
|
|
28
34
|
var blockCardResolvedViewClassName = exports.blockCardResolvedViewClassName = 'block-card-resolved-view';
|
|
35
|
+
/**
|
|
36
|
+
* Class name for selecting non-flexible resolved byline
|
|
37
|
+
*
|
|
38
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
39
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
40
|
+
*/
|
|
29
41
|
var blockCardResolvedViewByClassName = exports.blockCardResolvedViewByClassName = 'block-card-resolved-view-by';
|
|
30
42
|
var ResolvedView = exports.ResolvedView = function ResolvedView(_ref) {
|
|
31
43
|
var _ref$icon = _ref.icon,
|
|
@@ -15,6 +15,12 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
15
15
|
var _messages = require("../../../messages");
|
|
16
16
|
/** @jsx jsx */
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Class name for selecting non-flexible resolving block card
|
|
20
|
+
*
|
|
21
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
22
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
23
|
+
*/
|
|
18
24
|
var blockCardResolvingViewClassName = exports.blockCardResolvingViewClassName = 'block-card-resolving-view';
|
|
19
25
|
var ResolvingView = exports.ResolvingView = function ResolvingView(_ref) {
|
|
20
26
|
var _ref$isSelected = _ref.isSelected,
|
|
@@ -49,7 +49,8 @@ function Component(_ref) {
|
|
|
49
49
|
children = _ref.children,
|
|
50
50
|
showHoverPreview = _ref.showHoverPreview,
|
|
51
51
|
showAuthTooltip = _ref.showAuthTooltip,
|
|
52
|
-
analyticsEvents = _ref.analyticsEvents
|
|
52
|
+
analyticsEvents = _ref.analyticsEvents,
|
|
53
|
+
useLegacyBlockCard = _ref.useLegacyBlockCard;
|
|
53
54
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
54
55
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
55
56
|
|
|
@@ -246,7 +247,7 @@ function Component(_ref) {
|
|
|
246
247
|
testId: testId,
|
|
247
248
|
actionOptions: actionOptions,
|
|
248
249
|
platform: platform,
|
|
249
|
-
enableFlexibleBlockCard: enableFlexibleBlockCardFlag
|
|
250
|
+
enableFlexibleBlockCard: enableFlexibleBlockCardFlag && useLegacyBlockCard !== true
|
|
250
251
|
});
|
|
251
252
|
case 'embed':
|
|
252
253
|
return /*#__PURE__*/_react.default.createElement(_EmbedCard.EmbedCard, {
|
|
@@ -62,7 +62,8 @@ function CardWithURLRenderer(props) {
|
|
|
62
62
|
showAuthTooltip = props.showAuthTooltip,
|
|
63
63
|
analyticsEvents = props.analyticsEvents,
|
|
64
64
|
placeholder = props.placeholder,
|
|
65
|
-
fallbackComponent = props.fallbackComponent
|
|
65
|
+
fallbackComponent = props.fallbackComponent,
|
|
66
|
+
useLegacyBlockCard = props.useLegacyBlockCard;
|
|
66
67
|
var analytics = (0, _analytics.useSmartLinkAnalytics)(url !== null && url !== void 0 ? url : '', undefined, id);
|
|
67
68
|
var isFlexibleUi = (0, _flexible.isFlexibleUiCard)(children);
|
|
68
69
|
var errorHandler = (0, _react.useCallback)(function (error, info) {
|
|
@@ -130,7 +131,8 @@ function CardWithURLRenderer(props) {
|
|
|
130
131
|
showHoverPreview: showHoverPreview,
|
|
131
132
|
showAuthTooltip: showAuthTooltip,
|
|
132
133
|
analyticsEvents: analyticsEvents,
|
|
133
|
-
placeholder: placeholder
|
|
134
|
+
placeholder: placeholder,
|
|
135
|
+
useLegacyBlockCard: useLegacyBlockCard
|
|
134
136
|
};
|
|
135
137
|
return /*#__PURE__*/_react.default.createElement(_reactErrorBoundary.ErrorBoundary, {
|
|
136
138
|
FallbackComponent: ErrorFallback,
|
|
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
17
17
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
18
18
|
var PACKAGE_DATA = {
|
|
19
19
|
packageName: "@atlaskit/smart-card",
|
|
20
|
-
packageVersion: "26.
|
|
20
|
+
packageVersion: "26.47.0",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -13,6 +13,12 @@ var _link = _interopRequireDefault(require("@atlaskit/icon/glyph/link"));
|
|
|
13
13
|
var _utils = require("./utils");
|
|
14
14
|
var _templateObject, _templateObject2;
|
|
15
15
|
/** @jsx jsx */
|
|
16
|
+
/**
|
|
17
|
+
* Class name for selecting non-flexible block card icon image
|
|
18
|
+
*
|
|
19
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
20
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
21
|
+
*/
|
|
16
22
|
var blockCardIconImageClassName = exports.blockCardIconImageClassName = 'block-card-icon-image';
|
|
17
23
|
var getImageStyles = function getImageStyles(isFlexibleUi) {
|
|
18
24
|
if (isFlexibleUi) {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _markdownToJsx = _interopRequireDefault(require("markdown-to-jsx"));
|
|
11
|
+
var _react2 = require("@emotion/react");
|
|
12
|
+
var _templateObject;
|
|
13
|
+
/** @jsx jsx */
|
|
14
|
+
var AISummaryCSS = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n overflow-y: auto;\n font-size: 0.75rem;\n line-height: 1rem;\n word-wrap: break-word;\n white-space: normal;\n"])));
|
|
15
|
+
/**
|
|
16
|
+
* A component to render a response from AI in markdown text.
|
|
17
|
+
* @internal
|
|
18
|
+
* @param {AISummaryProps} AISummaryProps
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
var AISummary = function AISummary(_ref) {
|
|
22
|
+
var content = _ref.content,
|
|
23
|
+
overrideCss = _ref.overrideCss,
|
|
24
|
+
_ref$testId = _ref.testId,
|
|
25
|
+
testId = _ref$testId === void 0 ? 'ai-summary' : _ref$testId;
|
|
26
|
+
if (!content) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return (0, _react2.jsx)(_markdownToJsx.default, {
|
|
30
|
+
"data-testid": testId,
|
|
31
|
+
css: [AISummaryCSS, overrideCss],
|
|
32
|
+
children: content,
|
|
33
|
+
options: {
|
|
34
|
+
forceWrapper: true
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
var _default = exports.default = AISummary;
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "26.
|
|
7
|
+
packageVersion: "26.47.0"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { gs, mq } from '../../common/utils';
|
|
4
|
+
/**
|
|
5
|
+
* Class name for selecting non-flexible block card content
|
|
6
|
+
*
|
|
7
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
8
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
9
|
+
*/
|
|
4
10
|
export const blockCardContentClassName = 'block-card-content';
|
|
5
11
|
export const Content = ({
|
|
6
12
|
children,
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { useMouseDownEvent } from '../../../state/analytics/useLinkClicked';
|
|
4
|
+
/**
|
|
5
|
+
* Class name for selecting non-flexible block card header
|
|
6
|
+
*
|
|
7
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
8
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
9
|
+
*/
|
|
4
10
|
export const blockCardContentHeaderClassName = 'block-card-content-header';
|
|
5
11
|
export const ContentHeader = ({
|
|
6
12
|
onClick,
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
4
4
|
import { gs } from '../../common/utils';
|
|
5
|
+
/**
|
|
6
|
+
* Class name for selecting non-flexible block card header name
|
|
7
|
+
*
|
|
8
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
9
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
10
|
+
*/
|
|
5
11
|
export const blockCardContentHeaderNameClassName = 'block-card-content-header-name';
|
|
6
12
|
export const Name = ({
|
|
7
13
|
name,
|
|
@@ -18,6 +18,12 @@ import { RetryAction } from '../actions/RetryAction';
|
|
|
18
18
|
const textDescriptionProps = {
|
|
19
19
|
...messages.could_not_load_link
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Class name for selecting non-flexible errored block card
|
|
23
|
+
*
|
|
24
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
25
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
26
|
+
*/
|
|
21
27
|
export const blockCardErroredViewClassName = 'block-card-errored-view';
|
|
22
28
|
export const ErroredView = ({
|
|
23
29
|
isSelected = false,
|
|
@@ -15,7 +15,20 @@ import { ContentHeader } from '../components/ContentHeader';
|
|
|
15
15
|
import { handleClickCommon } from '../utils/handlers';
|
|
16
16
|
import { Link } from '../components/Link';
|
|
17
17
|
import { UnresolvedText } from '../components/UnresolvedText';
|
|
18
|
+
/**
|
|
19
|
+
* Class name for selecting non-flexible forbidden block card
|
|
20
|
+
*
|
|
21
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
22
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
23
|
+
*/
|
|
18
24
|
export const blockCardForbiddenViewClassName = 'block-card-forbidden-view';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Class name for selecting link inside non-flexible forbidden block card
|
|
28
|
+
*
|
|
29
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
30
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
31
|
+
*/
|
|
19
32
|
export const blockCardForbiddenViewLinkClassName = 'block-card-forbidden-view-link';
|
|
20
33
|
export const ForbiddenView = ({
|
|
21
34
|
context = {
|
|
@@ -17,6 +17,12 @@ import { handleClickCommon } from '../utils/handlers';
|
|
|
17
17
|
const textDescriptionProps = {
|
|
18
18
|
...messages.not_found_description
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Class name for selecting non-flexible not-found block card
|
|
22
|
+
*
|
|
23
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
24
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
25
|
+
*/
|
|
20
26
|
export const blockCardNotFoundViewClassName = 'block-card-not-found-view';
|
|
21
27
|
export const NotFoundView = ({
|
|
22
28
|
context = {
|
|
@@ -17,7 +17,19 @@ import { ContentHeader } from '../components/ContentHeader';
|
|
|
17
17
|
import { ContentFooter } from '../components/ContentFooter';
|
|
18
18
|
import { gs } from '../../common/utils';
|
|
19
19
|
import { handleClickCommon } from '../utils/handlers';
|
|
20
|
+
/**
|
|
21
|
+
* Class name for selecting non-flexible resolved block card
|
|
22
|
+
*
|
|
23
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
24
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
25
|
+
*/
|
|
20
26
|
export const blockCardResolvedViewClassName = 'block-card-resolved-view';
|
|
27
|
+
/**
|
|
28
|
+
* Class name for selecting non-flexible resolved byline
|
|
29
|
+
*
|
|
30
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
31
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
32
|
+
*/
|
|
21
33
|
export const blockCardResolvedViewByClassName = 'block-card-resolved-view-by';
|
|
22
34
|
export const ResolvedView = ({
|
|
23
35
|
icon = {},
|
|
@@ -7,6 +7,12 @@ import { Frame } from '../components/Frame';
|
|
|
7
7
|
import { gs } from '../../common/utils';
|
|
8
8
|
import { FormattedMessage } from 'react-intl-next';
|
|
9
9
|
import { messages } from '../../../messages';
|
|
10
|
+
/**
|
|
11
|
+
* Class name for selecting non-flexible resolving block card
|
|
12
|
+
*
|
|
13
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
14
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
15
|
+
*/
|
|
10
16
|
export const blockCardResolvingViewClassName = 'block-card-resolving-view';
|
|
11
17
|
export const ResolvingView = ({
|
|
12
18
|
isSelected = false,
|
|
@@ -39,7 +39,8 @@ function Component({
|
|
|
39
39
|
children,
|
|
40
40
|
showHoverPreview,
|
|
41
41
|
showAuthTooltip,
|
|
42
|
-
analyticsEvents
|
|
42
|
+
analyticsEvents,
|
|
43
|
+
useLegacyBlockCard
|
|
43
44
|
}) {
|
|
44
45
|
const {
|
|
45
46
|
createAnalyticsEvent
|
|
@@ -233,7 +234,7 @@ function Component({
|
|
|
233
234
|
testId: testId,
|
|
234
235
|
actionOptions: actionOptions,
|
|
235
236
|
platform: platform,
|
|
236
|
-
enableFlexibleBlockCard: enableFlexibleBlockCardFlag
|
|
237
|
+
enableFlexibleBlockCard: enableFlexibleBlockCardFlag && useLegacyBlockCard !== true
|
|
237
238
|
});
|
|
238
239
|
case 'embed':
|
|
239
240
|
return /*#__PURE__*/React.createElement(EmbedCard, {
|
|
@@ -42,7 +42,8 @@ export function CardWithURLRenderer(props) {
|
|
|
42
42
|
showAuthTooltip,
|
|
43
43
|
analyticsEvents,
|
|
44
44
|
placeholder,
|
|
45
|
-
fallbackComponent
|
|
45
|
+
fallbackComponent,
|
|
46
|
+
useLegacyBlockCard
|
|
46
47
|
} = props;
|
|
47
48
|
const analytics = useSmartLinkAnalytics(url !== null && url !== void 0 ? url : '', undefined, id);
|
|
48
49
|
const isFlexibleUi = isFlexibleUiCard(children);
|
|
@@ -109,7 +110,8 @@ export function CardWithURLRenderer(props) {
|
|
|
109
110
|
showHoverPreview,
|
|
110
111
|
showAuthTooltip,
|
|
111
112
|
analyticsEvents,
|
|
112
|
-
placeholder
|
|
113
|
+
placeholder,
|
|
114
|
+
useLegacyBlockCard
|
|
113
115
|
};
|
|
114
116
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
115
117
|
FallbackComponent: ErrorFallback,
|
|
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
7
7
|
import LinkWarningModal from './LinkWarningModal';
|
|
8
8
|
const PACKAGE_DATA = {
|
|
9
9
|
packageName: "@atlaskit/smart-card",
|
|
10
|
-
packageVersion: "26.
|
|
10
|
+
packageVersion: "26.47.0",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -4,6 +4,12 @@ import React from 'react';
|
|
|
4
4
|
import ImageLoader from 'react-render-image';
|
|
5
5
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
6
6
|
import { gs } from './utils';
|
|
7
|
+
/**
|
|
8
|
+
* Class name for selecting non-flexible block card icon image
|
|
9
|
+
*
|
|
10
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
11
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
12
|
+
*/
|
|
7
13
|
export const blockCardIconImageClassName = 'block-card-icon-image';
|
|
8
14
|
const getImageStyles = isFlexibleUi => {
|
|
9
15
|
if (isFlexibleUi) {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Markdown from 'markdown-to-jsx';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
|
+
const AISummaryCSS = css`
|
|
6
|
+
overflow-y: auto;
|
|
7
|
+
font-size: 0.75rem;
|
|
8
|
+
line-height: 1rem;
|
|
9
|
+
word-wrap: break-word;
|
|
10
|
+
white-space: normal;
|
|
11
|
+
`;
|
|
12
|
+
/**
|
|
13
|
+
* A component to render a response from AI in markdown text.
|
|
14
|
+
* @internal
|
|
15
|
+
* @param {AISummaryProps} AISummaryProps
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const AISummary = ({
|
|
19
|
+
content,
|
|
20
|
+
overrideCss,
|
|
21
|
+
testId = 'ai-summary'
|
|
22
|
+
}) => {
|
|
23
|
+
if (!content) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return jsx(Markdown, {
|
|
27
|
+
"data-testid": testId,
|
|
28
|
+
css: [AISummaryCSS, overrideCss],
|
|
29
|
+
children: content,
|
|
30
|
+
options: {
|
|
31
|
+
forceWrapper: true
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
export default AISummary;
|
|
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
export var context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "26.
|
|
18
|
+
packageVersion: "26.47.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { gs, mq } from '../../common/utils';
|
|
4
|
+
/**
|
|
5
|
+
* Class name for selecting non-flexible block card content
|
|
6
|
+
*
|
|
7
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
8
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
9
|
+
*/
|
|
4
10
|
export var blockCardContentClassName = 'block-card-content';
|
|
5
11
|
export var Content = function Content(_ref) {
|
|
6
12
|
var children = _ref.children,
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { useMouseDownEvent } from '../../../state/analytics/useLinkClicked';
|
|
4
|
+
/**
|
|
5
|
+
* Class name for selecting non-flexible block card header
|
|
6
|
+
*
|
|
7
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
8
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
9
|
+
*/
|
|
4
10
|
export var blockCardContentHeaderClassName = 'block-card-content-header';
|
|
5
11
|
export var ContentHeader = function ContentHeader(_ref) {
|
|
6
12
|
var onClick = _ref.onClick,
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
4
4
|
import { gs } from '../../common/utils';
|
|
5
|
+
/**
|
|
6
|
+
* Class name for selecting non-flexible block card header name
|
|
7
|
+
*
|
|
8
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
9
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
10
|
+
*/
|
|
5
11
|
export var blockCardContentHeaderNameClassName = 'block-card-content-header-name';
|
|
6
12
|
export var Name = function Name(_ref) {
|
|
7
13
|
var name = _ref.name,
|
|
@@ -19,6 +19,12 @@ import { Link } from '../components/Link';
|
|
|
19
19
|
import { UnresolvedText } from '../components/UnresolvedText';
|
|
20
20
|
import { RetryAction } from '../actions/RetryAction';
|
|
21
21
|
var textDescriptionProps = _objectSpread({}, messages.could_not_load_link);
|
|
22
|
+
/**
|
|
23
|
+
* Class name for selecting non-flexible errored block card
|
|
24
|
+
*
|
|
25
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
26
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
27
|
+
*/
|
|
22
28
|
export var blockCardErroredViewClassName = 'block-card-errored-view';
|
|
23
29
|
export var ErroredView = function ErroredView(_ref) {
|
|
24
30
|
var _ref$isSelected = _ref.isSelected,
|
|
@@ -16,7 +16,20 @@ import { ContentHeader } from '../components/ContentHeader';
|
|
|
16
16
|
import { handleClickCommon } from '../utils/handlers';
|
|
17
17
|
import { Link } from '../components/Link';
|
|
18
18
|
import { UnresolvedText } from '../components/UnresolvedText';
|
|
19
|
+
/**
|
|
20
|
+
* Class name for selecting non-flexible forbidden block card
|
|
21
|
+
*
|
|
22
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
23
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
24
|
+
*/
|
|
19
25
|
export var blockCardForbiddenViewClassName = 'block-card-forbidden-view';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Class name for selecting link inside non-flexible forbidden block card
|
|
29
|
+
*
|
|
30
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
31
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
32
|
+
*/
|
|
20
33
|
export var blockCardForbiddenViewLinkClassName = 'block-card-forbidden-view-link';
|
|
21
34
|
export var ForbiddenView = function ForbiddenView(_ref) {
|
|
22
35
|
var _ref$context = _ref.context,
|
|
@@ -18,6 +18,12 @@ import { Link } from '../components/Link';
|
|
|
18
18
|
import { UnresolvedText } from '../components/UnresolvedText';
|
|
19
19
|
import { handleClickCommon } from '../utils/handlers';
|
|
20
20
|
var textDescriptionProps = _objectSpread({}, messages.not_found_description);
|
|
21
|
+
/**
|
|
22
|
+
* Class name for selecting non-flexible not-found block card
|
|
23
|
+
*
|
|
24
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
25
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
26
|
+
*/
|
|
21
27
|
export var blockCardNotFoundViewClassName = 'block-card-not-found-view';
|
|
22
28
|
export var NotFoundView = function NotFoundView(_ref) {
|
|
23
29
|
var _ref$context = _ref.context,
|
|
@@ -17,7 +17,19 @@ import { ContentHeader } from '../components/ContentHeader';
|
|
|
17
17
|
import { ContentFooter } from '../components/ContentFooter';
|
|
18
18
|
import { gs } from '../../common/utils';
|
|
19
19
|
import { handleClickCommon } from '../utils/handlers';
|
|
20
|
+
/**
|
|
21
|
+
* Class name for selecting non-flexible resolved block card
|
|
22
|
+
*
|
|
23
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
24
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
25
|
+
*/
|
|
20
26
|
export var blockCardResolvedViewClassName = 'block-card-resolved-view';
|
|
27
|
+
/**
|
|
28
|
+
* Class name for selecting non-flexible resolved byline
|
|
29
|
+
*
|
|
30
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
31
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
32
|
+
*/
|
|
21
33
|
export var blockCardResolvedViewByClassName = 'block-card-resolved-view-by';
|
|
22
34
|
export var ResolvedView = function ResolvedView(_ref) {
|
|
23
35
|
var _ref$icon = _ref.icon,
|
|
@@ -7,6 +7,12 @@ import { Frame } from '../components/Frame';
|
|
|
7
7
|
import { gs } from '../../common/utils';
|
|
8
8
|
import { FormattedMessage } from 'react-intl-next';
|
|
9
9
|
import { messages } from '../../../messages';
|
|
10
|
+
/**
|
|
11
|
+
* Class name for selecting non-flexible resolving block card
|
|
12
|
+
*
|
|
13
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
14
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
15
|
+
*/
|
|
10
16
|
export var blockCardResolvingViewClassName = 'block-card-resolving-view';
|
|
11
17
|
export var ResolvingView = function ResolvingView(_ref) {
|
|
12
18
|
var _ref$isSelected = _ref.isSelected,
|
|
@@ -39,7 +39,8 @@ function Component(_ref) {
|
|
|
39
39
|
children = _ref.children,
|
|
40
40
|
showHoverPreview = _ref.showHoverPreview,
|
|
41
41
|
showAuthTooltip = _ref.showAuthTooltip,
|
|
42
|
-
analyticsEvents = _ref.analyticsEvents
|
|
42
|
+
analyticsEvents = _ref.analyticsEvents,
|
|
43
|
+
useLegacyBlockCard = _ref.useLegacyBlockCard;
|
|
43
44
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
44
45
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
45
46
|
|
|
@@ -236,7 +237,7 @@ function Component(_ref) {
|
|
|
236
237
|
testId: testId,
|
|
237
238
|
actionOptions: actionOptions,
|
|
238
239
|
platform: platform,
|
|
239
|
-
enableFlexibleBlockCard: enableFlexibleBlockCardFlag
|
|
240
|
+
enableFlexibleBlockCard: enableFlexibleBlockCardFlag && useLegacyBlockCard !== true
|
|
240
241
|
});
|
|
241
242
|
case 'embed':
|
|
242
243
|
return /*#__PURE__*/React.createElement(EmbedCard, {
|
|
@@ -50,7 +50,8 @@ export function CardWithURLRenderer(props) {
|
|
|
50
50
|
showAuthTooltip = props.showAuthTooltip,
|
|
51
51
|
analyticsEvents = props.analyticsEvents,
|
|
52
52
|
placeholder = props.placeholder,
|
|
53
|
-
fallbackComponent = props.fallbackComponent
|
|
53
|
+
fallbackComponent = props.fallbackComponent,
|
|
54
|
+
useLegacyBlockCard = props.useLegacyBlockCard;
|
|
54
55
|
var analytics = useSmartLinkAnalytics(url !== null && url !== void 0 ? url : '', undefined, id);
|
|
55
56
|
var isFlexibleUi = isFlexibleUiCard(children);
|
|
56
57
|
var errorHandler = useCallback(function (error, info) {
|
|
@@ -118,7 +119,8 @@ export function CardWithURLRenderer(props) {
|
|
|
118
119
|
showHoverPreview: showHoverPreview,
|
|
119
120
|
showAuthTooltip: showAuthTooltip,
|
|
120
121
|
analyticsEvents: analyticsEvents,
|
|
121
|
-
placeholder: placeholder
|
|
122
|
+
placeholder: placeholder,
|
|
123
|
+
useLegacyBlockCard: useLegacyBlockCard
|
|
122
124
|
};
|
|
123
125
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
124
126
|
FallbackComponent: ErrorFallback,
|
|
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
10
10
|
import LinkWarningModal from './LinkWarningModal';
|
|
11
11
|
var PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "26.
|
|
13
|
+
packageVersion: "26.47.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -6,6 +6,12 @@ import React from 'react';
|
|
|
6
6
|
import ImageLoader from 'react-render-image';
|
|
7
7
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
8
8
|
import { gs } from './utils';
|
|
9
|
+
/**
|
|
10
|
+
* Class name for selecting non-flexible block card icon image
|
|
11
|
+
*
|
|
12
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
13
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
14
|
+
*/
|
|
9
15
|
export var blockCardIconImageClassName = 'block-card-icon-image';
|
|
10
16
|
var getImageStyles = function getImageStyles(isFlexibleUi) {
|
|
11
17
|
if (isFlexibleUi) {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import Markdown from 'markdown-to-jsx';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
7
|
+
var AISummaryCSS = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow-y: auto;\n font-size: 0.75rem;\n line-height: 1rem;\n word-wrap: break-word;\n white-space: normal;\n"])));
|
|
8
|
+
/**
|
|
9
|
+
* A component to render a response from AI in markdown text.
|
|
10
|
+
* @internal
|
|
11
|
+
* @param {AISummaryProps} AISummaryProps
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
var AISummary = function AISummary(_ref) {
|
|
15
|
+
var content = _ref.content,
|
|
16
|
+
overrideCss = _ref.overrideCss,
|
|
17
|
+
_ref$testId = _ref.testId,
|
|
18
|
+
testId = _ref$testId === void 0 ? 'ai-summary' : _ref$testId;
|
|
19
|
+
if (!content) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return jsx(Markdown, {
|
|
23
|
+
"data-testid": testId,
|
|
24
|
+
css: [AISummaryCSS, overrideCss],
|
|
25
|
+
children: content,
|
|
26
|
+
options: {
|
|
27
|
+
forceWrapper: true
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
export default AISummary;
|
|
@@ -5,5 +5,11 @@ export interface ContentProps {
|
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
isCompact?: boolean;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Class name for selecting non-flexible block card content
|
|
10
|
+
*
|
|
11
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
12
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
13
|
+
*/
|
|
8
14
|
export declare const blockCardContentClassName = "block-card-content";
|
|
9
15
|
export declare const Content: ({ children, isCompact }: ContentProps) => jsx.JSX.Element;
|
|
@@ -6,5 +6,11 @@ export interface ContentHeaderProps {
|
|
|
6
6
|
link: string;
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Class name for selecting non-flexible block card header
|
|
11
|
+
*
|
|
12
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
13
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
14
|
+
*/
|
|
9
15
|
export declare const blockCardContentHeaderClassName = "block-card-content-header";
|
|
10
16
|
export declare const ContentHeader: ({ onClick, link, children, }: ContentHeaderProps) => jsx.JSX.Element;
|
|
@@ -8,5 +8,11 @@ export interface NameProps {
|
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
textColor?: string;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Class name for selecting non-flexible block card header name
|
|
13
|
+
*
|
|
14
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
15
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
16
|
+
*/
|
|
11
17
|
export declare const blockCardContentHeaderNameClassName = "block-card-content-header-name";
|
|
12
18
|
export declare const Name: ({ name, isLeftPadded, testId, textColor, }: NameProps) => jsx.JSX.Element;
|
|
@@ -10,5 +10,11 @@ export interface ErroredViewProps {
|
|
|
10
10
|
testId?: string;
|
|
11
11
|
inheritDimensions?: boolean;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Class name for selecting non-flexible errored block card
|
|
15
|
+
*
|
|
16
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
17
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
18
|
+
*/
|
|
13
19
|
export declare const blockCardErroredViewClassName = "block-card-errored-view";
|
|
14
20
|
export declare const ErroredView: ({ isSelected, testId, link, onClick, onRetry, inheritDimensions, }: ErroredViewProps) => jsx.JSX.Element;
|
|
@@ -19,6 +19,18 @@ export interface PermissionDeniedProps {
|
|
|
19
19
|
actionOptions?: CardActionOptions;
|
|
20
20
|
requestAccessContext?: RequestAccessContextProps;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Class name for selecting non-flexible forbidden block card
|
|
24
|
+
*
|
|
25
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
26
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
27
|
+
*/
|
|
22
28
|
export declare const blockCardForbiddenViewClassName = "block-card-forbidden-view";
|
|
29
|
+
/**
|
|
30
|
+
* Class name for selecting link inside non-flexible forbidden block card
|
|
31
|
+
*
|
|
32
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
33
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
34
|
+
*/
|
|
23
35
|
export declare const blockCardForbiddenViewLinkClassName = "block-card-forbidden-view-link";
|
|
24
36
|
export declare const ForbiddenView: ({ context, isSelected, actions, testId, link, onClick, requestAccessContext, actionOptions, }: PermissionDeniedProps) => jsx.JSX.Element;
|
|
@@ -13,5 +13,11 @@ export interface NotFoundProps {
|
|
|
13
13
|
icon: IconProps;
|
|
14
14
|
testId?: string;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Class name for selecting non-flexible not-found block card
|
|
18
|
+
*
|
|
19
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
20
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
21
|
+
*/
|
|
16
22
|
export declare const blockCardNotFoundViewClassName = "block-card-not-found-view";
|
|
17
23
|
export declare const NotFoundView: ({ context, isSelected, testId, link, onClick, }: NotFoundProps) => jsx.JSX.Element;
|
|
@@ -30,6 +30,18 @@ export interface ResolvedViewProps {
|
|
|
30
30
|
/** It determines whether a link source supports different design theme modes */
|
|
31
31
|
isSupportTheming?: boolean;
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Class name for selecting non-flexible resolved block card
|
|
35
|
+
*
|
|
36
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
37
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
38
|
+
*/
|
|
33
39
|
export declare const blockCardResolvedViewClassName = "block-card-resolved-view";
|
|
40
|
+
/**
|
|
41
|
+
* Class name for selecting non-flexible resolved byline
|
|
42
|
+
*
|
|
43
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
44
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
45
|
+
*/
|
|
34
46
|
export declare const blockCardResolvedViewByClassName = "block-card-resolved-view-by";
|
|
35
47
|
export declare const ResolvedView: ({ icon, actions, thumbnail, context, title, titleTextColor, titlePrefix, isSelected, users, handleAvatarClick, handleMoreAvatarsClick, onClick, link, byline, lozenge, details, testId, }: ResolvedViewProps) => jsx.JSX.Element;
|
|
@@ -5,5 +5,11 @@ export interface ResolvingProps {
|
|
|
5
5
|
testId?: string;
|
|
6
6
|
inheritDimensions?: boolean;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Class name for selecting non-flexible resolving block card
|
|
10
|
+
*
|
|
11
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
12
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
13
|
+
*/
|
|
8
14
|
export declare const blockCardResolvingViewClassName = "block-card-resolving-view";
|
|
9
15
|
export declare const ResolvingView: ({ isSelected, testId, inheritDimensions, }: ResolvingProps) => jsx.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CardAppearance, CardPlatform, CardProps } from './types';
|
|
3
3
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "container" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
4
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "container" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "useLegacyBlockCard" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
5
5
|
export type { CardAppearance, CardProps, CardPlatform };
|
|
@@ -101,4 +101,10 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
101
101
|
*/
|
|
102
102
|
analyticsEvents?: AnalyticsFacade;
|
|
103
103
|
placeholder?: string;
|
|
104
|
+
/**
|
|
105
|
+
* When enabled the legacy block card is always used, even if the enableFlexibleBlockCard flag is set to true.
|
|
106
|
+
* Usage is strongly discouraged. This should only be used if there is a specific reason you're
|
|
107
|
+
* unable to use the new flexible block cards.
|
|
108
|
+
*/
|
|
109
|
+
useLegacyBlockCard?: boolean;
|
|
104
110
|
}
|
|
@@ -8,5 +8,11 @@ export interface IconProps {
|
|
|
8
8
|
testId?: string;
|
|
9
9
|
isFlexibleUi?: boolean;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Class name for selecting non-flexible block card icon image
|
|
13
|
+
*
|
|
14
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
15
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
16
|
+
*/
|
|
11
17
|
export declare const blockCardIconImageClassName = "block-card-icon-image";
|
|
12
18
|
export declare const Icon: ({ url, icon, defaultIcon, testId, isFlexibleUi, }: IconProps) => jsx.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SerializedStyles } from '@emotion/react';
|
|
4
|
+
type AISummaryProps = {
|
|
5
|
+
content?: string;
|
|
6
|
+
showAIIcon?: boolean;
|
|
7
|
+
overrideCss?: SerializedStyles;
|
|
8
|
+
/**
|
|
9
|
+
* appears as a data attribute `data-testid` in the rendered code,
|
|
10
|
+
* serving as a hook for automated tests
|
|
11
|
+
*/
|
|
12
|
+
testId?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A component to render a response from AI in markdown text.
|
|
16
|
+
* @internal
|
|
17
|
+
* @param {AISummaryProps} AISummaryProps
|
|
18
|
+
*/
|
|
19
|
+
declare const AISummary: React.FC<AISummaryProps>;
|
|
20
|
+
export default AISummary;
|
|
@@ -5,5 +5,11 @@ export interface ContentProps {
|
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
isCompact?: boolean;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Class name for selecting non-flexible block card content
|
|
10
|
+
*
|
|
11
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
12
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
13
|
+
*/
|
|
8
14
|
export declare const blockCardContentClassName = "block-card-content";
|
|
9
15
|
export declare const Content: ({ children, isCompact }: ContentProps) => jsx.JSX.Element;
|
|
@@ -6,5 +6,11 @@ export interface ContentHeaderProps {
|
|
|
6
6
|
link: string;
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Class name for selecting non-flexible block card header
|
|
11
|
+
*
|
|
12
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
13
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
14
|
+
*/
|
|
9
15
|
export declare const blockCardContentHeaderClassName = "block-card-content-header";
|
|
10
16
|
export declare const ContentHeader: ({ onClick, link, children, }: ContentHeaderProps) => jsx.JSX.Element;
|
|
@@ -8,5 +8,11 @@ export interface NameProps {
|
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
textColor?: string;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Class name for selecting non-flexible block card header name
|
|
13
|
+
*
|
|
14
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
15
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
16
|
+
*/
|
|
11
17
|
export declare const blockCardContentHeaderNameClassName = "block-card-content-header-name";
|
|
12
18
|
export declare const Name: ({ name, isLeftPadded, testId, textColor, }: NameProps) => jsx.JSX.Element;
|
|
@@ -10,5 +10,11 @@ export interface ErroredViewProps {
|
|
|
10
10
|
testId?: string;
|
|
11
11
|
inheritDimensions?: boolean;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Class name for selecting non-flexible errored block card
|
|
15
|
+
*
|
|
16
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
17
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
18
|
+
*/
|
|
13
19
|
export declare const blockCardErroredViewClassName = "block-card-errored-view";
|
|
14
20
|
export declare const ErroredView: ({ isSelected, testId, link, onClick, onRetry, inheritDimensions, }: ErroredViewProps) => jsx.JSX.Element;
|
|
@@ -19,6 +19,18 @@ export interface PermissionDeniedProps {
|
|
|
19
19
|
actionOptions?: CardActionOptions;
|
|
20
20
|
requestAccessContext?: RequestAccessContextProps;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Class name for selecting non-flexible forbidden block card
|
|
24
|
+
*
|
|
25
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
26
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
27
|
+
*/
|
|
22
28
|
export declare const blockCardForbiddenViewClassName = "block-card-forbidden-view";
|
|
29
|
+
/**
|
|
30
|
+
* Class name for selecting link inside non-flexible forbidden block card
|
|
31
|
+
*
|
|
32
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
33
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
34
|
+
*/
|
|
23
35
|
export declare const blockCardForbiddenViewLinkClassName = "block-card-forbidden-view-link";
|
|
24
36
|
export declare const ForbiddenView: ({ context, isSelected, actions, testId, link, onClick, requestAccessContext, actionOptions, }: PermissionDeniedProps) => jsx.JSX.Element;
|
|
@@ -13,5 +13,11 @@ export interface NotFoundProps {
|
|
|
13
13
|
icon: IconProps;
|
|
14
14
|
testId?: string;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Class name for selecting non-flexible not-found block card
|
|
18
|
+
*
|
|
19
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
20
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
21
|
+
*/
|
|
16
22
|
export declare const blockCardNotFoundViewClassName = "block-card-not-found-view";
|
|
17
23
|
export declare const NotFoundView: ({ context, isSelected, testId, link, onClick, }: NotFoundProps) => jsx.JSX.Element;
|
|
@@ -30,6 +30,18 @@ export interface ResolvedViewProps {
|
|
|
30
30
|
/** It determines whether a link source supports different design theme modes */
|
|
31
31
|
isSupportTheming?: boolean;
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Class name for selecting non-flexible resolved block card
|
|
35
|
+
*
|
|
36
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
37
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
38
|
+
*/
|
|
33
39
|
export declare const blockCardResolvedViewClassName = "block-card-resolved-view";
|
|
40
|
+
/**
|
|
41
|
+
* Class name for selecting non-flexible resolved byline
|
|
42
|
+
*
|
|
43
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
44
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
45
|
+
*/
|
|
34
46
|
export declare const blockCardResolvedViewByClassName = "block-card-resolved-view-by";
|
|
35
47
|
export declare const ResolvedView: ({ icon, actions, thumbnail, context, title, titleTextColor, titlePrefix, isSelected, users, handleAvatarClick, handleMoreAvatarsClick, onClick, link, byline, lozenge, details, testId, }: ResolvedViewProps) => jsx.JSX.Element;
|
|
@@ -5,5 +5,11 @@ export interface ResolvingProps {
|
|
|
5
5
|
testId?: string;
|
|
6
6
|
inheritDimensions?: boolean;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Class name for selecting non-flexible resolving block card
|
|
10
|
+
*
|
|
11
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
12
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
13
|
+
*/
|
|
8
14
|
export declare const blockCardResolvingViewClassName = "block-card-resolving-view";
|
|
9
15
|
export declare const ResolvingView: ({ isSelected, testId, inheritDimensions, }: ResolvingProps) => jsx.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CardAppearance, CardPlatform, CardProps } from './types';
|
|
3
3
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "container" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
4
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "container" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "actionOptions" | "onResolve" | "ui" | "showHoverPreview" | "showAuthTooltip" | "platform" | "isHovered" | "isFrameVisible" | "frameStyle" | "importer" | "showActions" | "showServerActions" | "fallbackComponent" | "embedIframeRef" | "embedIframeUrlType" | "inlinePreloaderStyle" | "analyticsEvents" | "useLegacyBlockCard" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
5
5
|
export type { CardAppearance, CardProps, CardPlatform };
|
|
@@ -101,4 +101,10 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
101
101
|
*/
|
|
102
102
|
analyticsEvents?: AnalyticsFacade;
|
|
103
103
|
placeholder?: string;
|
|
104
|
+
/**
|
|
105
|
+
* When enabled the legacy block card is always used, even if the enableFlexibleBlockCard flag is set to true.
|
|
106
|
+
* Usage is strongly discouraged. This should only be used if there is a specific reason you're
|
|
107
|
+
* unable to use the new flexible block cards.
|
|
108
|
+
*/
|
|
109
|
+
useLegacyBlockCard?: boolean;
|
|
104
110
|
}
|
|
@@ -8,5 +8,11 @@ export interface IconProps {
|
|
|
8
8
|
testId?: string;
|
|
9
9
|
isFlexibleUi?: boolean;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Class name for selecting non-flexible block card icon image
|
|
13
|
+
*
|
|
14
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
15
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
16
|
+
*/
|
|
11
17
|
export declare const blockCardIconImageClassName = "block-card-icon-image";
|
|
12
18
|
export declare const Icon: ({ url, icon, defaultIcon, testId, isFlexibleUi, }: IconProps) => jsx.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SerializedStyles } from '@emotion/react';
|
|
4
|
+
type AISummaryProps = {
|
|
5
|
+
content?: string;
|
|
6
|
+
showAIIcon?: boolean;
|
|
7
|
+
overrideCss?: SerializedStyles;
|
|
8
|
+
/**
|
|
9
|
+
* appears as a data attribute `data-testid` in the rendered code,
|
|
10
|
+
* serving as a hook for automated tests
|
|
11
|
+
*/
|
|
12
|
+
testId?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A component to render a response from AI in markdown text.
|
|
16
|
+
* @internal
|
|
17
|
+
* @param {AISummaryProps} AISummaryProps
|
|
18
|
+
*/
|
|
19
|
+
declare const AISummary: React.FC<AISummaryProps>;
|
|
20
|
+
export default AISummary;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.47.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/avatar-group": "^9.5.0",
|
|
32
32
|
"@atlaskit/badge": "^15.2.0",
|
|
33
33
|
"@atlaskit/button": "^17.3.0",
|
|
34
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
34
|
+
"@atlaskit/dropdown-menu": "^12.5.0",
|
|
35
35
|
"@atlaskit/icon": "^22.0.0",
|
|
36
36
|
"@atlaskit/icon-file-type": "^6.4.0",
|
|
37
37
|
"@atlaskit/icon-object": "^6.3.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@atlaskit/primitives": "^2.0.0",
|
|
52
52
|
"@atlaskit/spinner": "^16.0.0",
|
|
53
53
|
"@atlaskit/theme": "^12.6.0",
|
|
54
|
-
"@atlaskit/tokens": "^1.
|
|
54
|
+
"@atlaskit/tokens": "^1.36.0",
|
|
55
55
|
"@atlaskit/tooltip": "^18.1.0",
|
|
56
56
|
"@atlaskit/ufo": "^0.2.0",
|
|
57
57
|
"@babel/runtime": "^7.0.0",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"@formatjs/intl-utils": "^3.8.4",
|
|
61
61
|
"facepaint": "^1.2.1",
|
|
62
62
|
"json-ld-types": "^3.11.0",
|
|
63
|
+
"markdown-to-jsx": "^7.1.7",
|
|
63
64
|
"react-error-boundary": "^3.1.3",
|
|
64
65
|
"react-lazily-render": "^1.2.0",
|
|
65
66
|
"react-loadable": "^5.1.0",
|