@atlaskit/smart-card 26.63.1 → 26.65.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/extractors/common/primitives/extractSummary.js +7 -1
- package/dist/cjs/messages.js +5 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/icons/info/index.js +34 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/index.js +32 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +50 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/resolved/index.js +28 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/types.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/index.js +7 -0
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/common/primitives/extractSummary.js +7 -1
- package/dist/es2019/messages.js +5 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/icons/info/index.js +23 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/index.js +23 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +45 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/resolved/index.js +23 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/types.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/index.js +1 -0
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +2 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/common/primitives/extractSummary.js +7 -1
- package/dist/esm/messages.js +5 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/icons/info/index.js +27 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/index.js +25 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +43 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/resolved/index.js +21 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/types.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/index.js +1 -0
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +2 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/common/primitives/extractSummary.d.ts +4 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-footer-block/icons/info/index.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-footer-block/index.d.ts +10 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-footer-block/resolved/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-footer-block/types.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/blocks/index.d.ts +1 -0
- package/dist/types-ts4.5/extractors/common/primitives/extractSummary.d.ts +4 -1
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-footer-block/icons/info/index.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-footer-block/index.d.ts +10 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-footer-block/resolved/index.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-footer-block/types.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/index.d.ts +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.65.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#98998](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98998)
|
|
8
|
+
[`935587894f94`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/935587894f94) -
|
|
9
|
+
Trim snippet content on extractSummary. `extractSummary` will now return undefined if the type
|
|
10
|
+
is incorrect.
|
|
11
|
+
|
|
12
|
+
## 26.64.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#98584](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98584)
|
|
17
|
+
[`da59d9847b3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/da59d9847b3b) -
|
|
18
|
+
[ux] Add AI Summary footer flex block
|
|
19
|
+
|
|
3
20
|
## 26.63.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -4,6 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.extractSummary = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Return link summary
|
|
9
|
+
*/
|
|
7
10
|
var extractSummary = exports.extractSummary = function extractSummary(jsonLd) {
|
|
8
|
-
|
|
11
|
+
if (typeof (jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.summary) === 'string') {
|
|
12
|
+
var summary = jsonLd.summary.trim();
|
|
13
|
+
return Boolean(summary) ? summary : undefined;
|
|
14
|
+
}
|
|
9
15
|
};
|
package/dist/cjs/messages.js
CHANGED
|
@@ -36,6 +36,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
36
36
|
defaultMessage: 'Information quality may vary. <a>Learn more</a>',
|
|
37
37
|
description: 'Additional info about the content summarised by AI.'
|
|
38
38
|
},
|
|
39
|
+
ai_summarized_info_short: {
|
|
40
|
+
id: 'fabric.linking.ai_summarized_info_short.nonfinal',
|
|
41
|
+
defaultMessage: 'Content quality may vary',
|
|
42
|
+
description: 'Additional info about the content summarised by AI.'
|
|
43
|
+
},
|
|
39
44
|
ai_summarizing: {
|
|
40
45
|
id: 'fabric.linking.ai_summarizing',
|
|
41
46
|
defaultMessage: 'Atlassian Intelligence is working...',
|
|
@@ -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.65.0"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.InfoIcon = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _icon = _interopRequireDefault(require("@atlaskit/icon"));
|
|
11
|
+
var CustomGlyph = function CustomGlyph(props) {
|
|
12
|
+
return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
|
|
13
|
+
width: "16",
|
|
14
|
+
height: "16",
|
|
15
|
+
viewBox: "0 0 16 16",
|
|
16
|
+
fill: "none"
|
|
17
|
+
}, props), /*#__PURE__*/_react.default.createElement("path", {
|
|
18
|
+
d: "M7 5C7 5.55228 7.44772 6 8 6C8.55228 6 9 5.55228 9 5C9 4.44772 8.55228 4 8 4C7.44772 4 7 4.44772 7 5Z",
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
21
|
+
d: "M7.25 7L7.25 12H8.75L8.75 7H7.25Z",
|
|
22
|
+
fill: "currentColor"
|
|
23
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
24
|
+
fillRule: "evenodd",
|
|
25
|
+
clipRule: "evenodd",
|
|
26
|
+
d: "M8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1ZM2.5 8C2.5 11.0376 4.96243 13.5 8 13.5C11.0376 13.5 13.5 11.0376 13.5 8C13.5 4.96243 11.0376 2.5 8 2.5C4.96243 2.5 2.5 4.96243 2.5 8Z",
|
|
27
|
+
fill: "currentColor"
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
var InfoIcon = exports.InfoIcon = function InfoIcon(props) {
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_icon.default, (0, _extends2.default)({}, props, {
|
|
32
|
+
glyph: CustomGlyph
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
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 _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _resolved = _interopRequireDefault(require("./resolved"));
|
|
12
|
+
var _constants = require("../../../../../constants");
|
|
13
|
+
var _excluded = ["status", "testId"];
|
|
14
|
+
/**
|
|
15
|
+
* Represents a AIFooterBlock, designed to show provider metadata in
|
|
16
|
+
* addition to AI tooltip icons if AI is enabled
|
|
17
|
+
* @param {AIFooterBlockProps} AIFooterBlockProps
|
|
18
|
+
* @see Block
|
|
19
|
+
*/
|
|
20
|
+
var AIFooterBlock = function AIFooterBlock(_ref) {
|
|
21
|
+
var status = _ref.status,
|
|
22
|
+
_ref$testId = _ref.testId,
|
|
23
|
+
testId = _ref$testId === void 0 ? 'smart-ai-footer-block' : _ref$testId,
|
|
24
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
25
|
+
if (status !== _constants.SmartLinkStatus.Resolved) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_resolved.default, (0, _extends2.default)({}, props, {
|
|
29
|
+
testId: testId
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
32
|
+
var _default = exports.default = AIFooterBlock;
|
package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.AIFooterMetadata = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactMagneticDi = require("react-magnetic-di");
|
|
10
|
+
var _reactIntlNext = require("react-intl-next");
|
|
11
|
+
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
12
|
+
var _primitives = require("@atlaskit/primitives");
|
|
13
|
+
var _aiStateIndicator = _interopRequireDefault(require("../../ai-summary-block/ai-state-indicator"));
|
|
14
|
+
var _info = require("../icons/info");
|
|
15
|
+
var _messages = require("../../../../../../messages");
|
|
16
|
+
var _useAiSummary = require("../../../../../../state/hooks/use-ai-summary");
|
|
17
|
+
var AIFooterMetadata = exports.AIFooterMetadata = function AIFooterMetadata(_ref) {
|
|
18
|
+
var testId = _ref.testId,
|
|
19
|
+
url = _ref.url,
|
|
20
|
+
ari = _ref.ari,
|
|
21
|
+
product = _ref.product;
|
|
22
|
+
var _useAISummary = (0, _useAiSummary.useAISummary)({
|
|
23
|
+
url: url,
|
|
24
|
+
ari: ari,
|
|
25
|
+
product: product
|
|
26
|
+
}),
|
|
27
|
+
status = _useAISummary.state.status;
|
|
28
|
+
if (status !== 'done') {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
32
|
+
space: "space.100",
|
|
33
|
+
testId: testId,
|
|
34
|
+
alignInline: "end",
|
|
35
|
+
grow: "fill"
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
37
|
+
content: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.ai_summarized_info_short),
|
|
38
|
+
position: "top"
|
|
39
|
+
}, function (tooltipProps) {
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Box, tooltipProps, /*#__PURE__*/_react.default.createElement(_info.InfoIcon, {
|
|
41
|
+
label: "Information",
|
|
42
|
+
size: "small",
|
|
43
|
+
primaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
44
|
+
}));
|
|
45
|
+
}), /*#__PURE__*/_react.default.createElement(_aiStateIndicator.default, {
|
|
46
|
+
appearance: "icon-only",
|
|
47
|
+
state: "done",
|
|
48
|
+
testId: "ai-tooltip"
|
|
49
|
+
}));
|
|
50
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
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 _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _block = _interopRequireDefault(require("../../block"));
|
|
11
|
+
var _elements = require("../../../elements");
|
|
12
|
+
var _constants = require("../../../../../../constants");
|
|
13
|
+
var _aiFooterMetadata = require("./ai-footer-metadata");
|
|
14
|
+
var _flexibleUiContext = require("../../../../../../state/flexible-ui-context");
|
|
15
|
+
var AIFooterBlockResolvedView = function AIFooterBlockResolvedView(props) {
|
|
16
|
+
var _context$actions;
|
|
17
|
+
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
18
|
+
var actionData = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.InternalActionName.AISummaryAction];
|
|
19
|
+
var testId = props.testId;
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement(_block.default, (0, _extends2.default)({}, props, {
|
|
21
|
+
testId: "".concat(testId, "-resolved-view")
|
|
22
|
+
}), /*#__PURE__*/_react.default.createElement(_elements.Provider, {
|
|
23
|
+
testId: "".concat(testId, "-provider")
|
|
24
|
+
}), actionData ? /*#__PURE__*/_react.default.createElement(_aiFooterMetadata.AIFooterMetadata, (0, _extends2.default)({}, actionData, {
|
|
25
|
+
testId: "".concat(testId, "-ai-metadata")
|
|
26
|
+
})) : null);
|
|
27
|
+
};
|
|
28
|
+
var _default = exports.default = AIFooterBlockResolvedView;
|
|
@@ -161,7 +161,7 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
161
161
|
testId: "".concat(testId, "-ai-summary"),
|
|
162
162
|
minHeight: aiSummaryMinHeight,
|
|
163
163
|
content: content,
|
|
164
|
-
showIcon: isSummarisedOnMountRef.current
|
|
164
|
+
showIcon: !(0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.hover-card-action-redesign') && isSummarisedOnMountRef.current
|
|
165
165
|
})), !(0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.hover-card-action-redesign') && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
166
166
|
alignBlock: "center",
|
|
167
167
|
alignInline: "end",
|
|
@@ -4,6 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
+
Object.defineProperty(exports, "AIFooterBlock", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _aiFooterBlock.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
7
13
|
Object.defineProperty(exports, "AISummaryBlock", {
|
|
8
14
|
enumerable: true,
|
|
9
15
|
get: function get() {
|
|
@@ -73,4 +79,5 @@ var _block = _interopRequireDefault(require("./block"));
|
|
|
73
79
|
var _resolved = _interopRequireDefault(require("./footer-block/resolved"));
|
|
74
80
|
var _relatedUrlsBlock = _interopRequireDefault(require("./related-urls-block"));
|
|
75
81
|
var _aiSummaryBlock = _interopRequireDefault(require("./ai-summary-block"));
|
|
82
|
+
var _aiFooterBlock = _interopRequireDefault(require("./ai-footer-block"));
|
|
76
83
|
var _actionBlock = _interopRequireDefault(require("./action-block"));
|
|
@@ -191,7 +191,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
|
|
|
191
191
|
}), isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.ActionBlock, {
|
|
192
192
|
onClick: onActionClick,
|
|
193
193
|
spaceInline: "space.100"
|
|
194
|
-
}), isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.
|
|
194
|
+
}), isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.AIFooterBlock, null), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.FooterBlock, {
|
|
195
195
|
actions: footerActions,
|
|
196
196
|
size: _constants.SmartLinkSize.Large,
|
|
197
197
|
overrideCss: _styled.footerBlockCss
|
|
@@ -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.65.0",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return link summary
|
|
3
|
+
*/
|
|
1
4
|
export const extractSummary = jsonLd => {
|
|
2
|
-
|
|
5
|
+
if (typeof (jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.summary) === 'string') {
|
|
6
|
+
const summary = jsonLd.summary.trim();
|
|
7
|
+
return Boolean(summary) ? summary : undefined;
|
|
8
|
+
}
|
|
3
9
|
};
|
package/dist/es2019/messages.js
CHANGED
|
@@ -30,6 +30,11 @@ export const messages = defineMessages({
|
|
|
30
30
|
defaultMessage: 'Information quality may vary. <a>Learn more</a>',
|
|
31
31
|
description: 'Additional info about the content summarised by AI.'
|
|
32
32
|
},
|
|
33
|
+
ai_summarized_info_short: {
|
|
34
|
+
id: 'fabric.linking.ai_summarized_info_short.nonfinal',
|
|
35
|
+
defaultMessage: 'Content quality may vary',
|
|
36
|
+
description: 'Additional info about the content summarised by AI.'
|
|
37
|
+
},
|
|
33
38
|
ai_summarizing: {
|
|
34
39
|
id: 'fabric.linking.ai_summarizing',
|
|
35
40
|
defaultMessage: 'Atlassian Intelligence is working...',
|
|
@@ -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.65.0"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Icon from '@atlaskit/icon';
|
|
4
|
+
const CustomGlyph = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
5
|
+
width: "16",
|
|
6
|
+
height: "16",
|
|
7
|
+
viewBox: "0 0 16 16",
|
|
8
|
+
fill: "none"
|
|
9
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
10
|
+
d: "M7 5C7 5.55228 7.44772 6 8 6C8.55228 6 9 5.55228 9 5C9 4.44772 8.55228 4 8 4C7.44772 4 7 4.44772 7 5Z",
|
|
11
|
+
fill: "currentColor"
|
|
12
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
13
|
+
d: "M7.25 7L7.25 12H8.75L8.75 7H7.25Z",
|
|
14
|
+
fill: "currentColor"
|
|
15
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
16
|
+
fillRule: "evenodd",
|
|
17
|
+
clipRule: "evenodd",
|
|
18
|
+
d: "M8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1ZM2.5 8C2.5 11.0376 4.96243 13.5 8 13.5C11.0376 13.5 13.5 11.0376 13.5 8C13.5 4.96243 11.0376 2.5 8 2.5C4.96243 2.5 2.5 4.96243 2.5 8Z",
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
}));
|
|
21
|
+
export const InfoIcon = props => /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
|
|
22
|
+
glyph: CustomGlyph
|
|
23
|
+
}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import AIFooterBlockResolvedView from './resolved';
|
|
4
|
+
import { SmartLinkStatus } from '../../../../../constants';
|
|
5
|
+
/**
|
|
6
|
+
* Represents a AIFooterBlock, designed to show provider metadata in
|
|
7
|
+
* addition to AI tooltip icons if AI is enabled
|
|
8
|
+
* @param {AIFooterBlockProps} AIFooterBlockProps
|
|
9
|
+
* @see Block
|
|
10
|
+
*/
|
|
11
|
+
const AIFooterBlock = ({
|
|
12
|
+
status,
|
|
13
|
+
testId = 'smart-ai-footer-block',
|
|
14
|
+
...props
|
|
15
|
+
}) => {
|
|
16
|
+
if (status !== SmartLinkStatus.Resolved) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return /*#__PURE__*/React.createElement(AIFooterBlockResolvedView, _extends({}, props, {
|
|
20
|
+
testId: testId
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
export default AIFooterBlock;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { di } from 'react-magnetic-di';
|
|
3
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
5
|
+
import { Box, Inline } from '@atlaskit/primitives';
|
|
6
|
+
import AIStateIndicator from '../../ai-summary-block/ai-state-indicator';
|
|
7
|
+
import { InfoIcon } from '../icons/info';
|
|
8
|
+
import { messages } from '../../../../../../messages';
|
|
9
|
+
import { useAISummary } from '../../../../../../state/hooks/use-ai-summary';
|
|
10
|
+
export const AIFooterMetadata = ({
|
|
11
|
+
testId,
|
|
12
|
+
url,
|
|
13
|
+
ari,
|
|
14
|
+
product
|
|
15
|
+
}) => {
|
|
16
|
+
const {
|
|
17
|
+
state: {
|
|
18
|
+
status
|
|
19
|
+
}
|
|
20
|
+
} = useAISummary({
|
|
21
|
+
url,
|
|
22
|
+
ari,
|
|
23
|
+
product
|
|
24
|
+
});
|
|
25
|
+
if (status !== 'done') {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/React.createElement(Inline, {
|
|
29
|
+
space: "space.100",
|
|
30
|
+
testId: testId,
|
|
31
|
+
alignInline: "end",
|
|
32
|
+
grow: "fill"
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
34
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.ai_summarized_info_short),
|
|
35
|
+
position: "top"
|
|
36
|
+
}, tooltipProps => /*#__PURE__*/React.createElement(Box, tooltipProps, /*#__PURE__*/React.createElement(InfoIcon, {
|
|
37
|
+
label: "Information",
|
|
38
|
+
size: "small",
|
|
39
|
+
primaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
40
|
+
}))), /*#__PURE__*/React.createElement(AIStateIndicator, {
|
|
41
|
+
appearance: "icon-only",
|
|
42
|
+
state: "done",
|
|
43
|
+
testId: "ai-tooltip"
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Block from '../../block';
|
|
4
|
+
import { Provider } from '../../../elements';
|
|
5
|
+
import { InternalActionName } from '../../../../../../constants';
|
|
6
|
+
import { AIFooterMetadata } from './ai-footer-metadata';
|
|
7
|
+
import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
|
|
8
|
+
const AIFooterBlockResolvedView = props => {
|
|
9
|
+
var _context$actions;
|
|
10
|
+
const context = useFlexibleUiContext();
|
|
11
|
+
const actionData = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[InternalActionName.AISummaryAction];
|
|
12
|
+
const {
|
|
13
|
+
testId
|
|
14
|
+
} = props;
|
|
15
|
+
return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
|
|
16
|
+
testId: `${testId}-resolved-view`
|
|
17
|
+
}), /*#__PURE__*/React.createElement(Provider, {
|
|
18
|
+
testId: `${testId}-provider`
|
|
19
|
+
}), actionData ? /*#__PURE__*/React.createElement(AIFooterMetadata, _extends({}, actionData, {
|
|
20
|
+
testId: `${testId}-ai-metadata`
|
|
21
|
+
})) : null);
|
|
22
|
+
};
|
|
23
|
+
export default AIFooterBlockResolvedView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -153,7 +153,7 @@ const AISummaryBlockResolvedView = props => {
|
|
|
153
153
|
testId: `${testId}-ai-summary`,
|
|
154
154
|
minHeight: aiSummaryMinHeight,
|
|
155
155
|
content: content,
|
|
156
|
-
showIcon: isSummarisedOnMountRef.current
|
|
156
|
+
showIcon: !getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') && isSummarisedOnMountRef.current
|
|
157
157
|
})), !getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Inline, {
|
|
158
158
|
alignBlock: "center",
|
|
159
159
|
alignInline: "end",
|
|
@@ -9,4 +9,5 @@ export { default as CustomBlock } from './block';
|
|
|
9
9
|
export { default as InternalFooterBlock } from './footer-block/resolved';
|
|
10
10
|
export { default as RelatedUrlsBlock } from './related-urls-block';
|
|
11
11
|
export { default as AISummaryBlock } from './ai-summary-block';
|
|
12
|
+
export { default as AIFooterBlock } from './ai-footer-block';
|
|
12
13
|
export { default as ActionBlock } from './action-block';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
3
3
|
import { ActionName, CardDisplay, ElementName, SmartLinkPosition, SmartLinkSize, SmartLinkDirection } from '../../../../../constants';
|
|
4
|
-
import { FooterBlock, MetadataBlock, RelatedUrlsBlock, SnippetBlock, TitleBlock, AISummaryBlock, CustomBlock, ActionBlock } from '../../../../FlexibleCard/components/blocks';
|
|
4
|
+
import { FooterBlock, MetadataBlock, RelatedUrlsBlock, SnippetBlock, TitleBlock, AISummaryBlock, CustomBlock, ActionBlock, AIFooterBlock } from '../../../../FlexibleCard/components/blocks';
|
|
5
5
|
import { footerBlockCss, hiddenSnippetStyles, metadataBlockCss } from './styled';
|
|
6
6
|
import FlexibleCard from '../../../../FlexibleCard';
|
|
7
7
|
import { getMetadata } from '../../../utils';
|
|
@@ -184,7 +184,7 @@ const HoverCardResolvedView = ({
|
|
|
184
184
|
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(ActionBlock, {
|
|
185
185
|
onClick: onActionClick,
|
|
186
186
|
spaceInline: "space.100"
|
|
187
|
-
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(
|
|
187
|
+
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(AIFooterBlock, null), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/React.createElement(FooterBlock, {
|
|
188
188
|
actions: footerActions,
|
|
189
189
|
size: SmartLinkSize.Large,
|
|
190
190
|
overrideCss: footerBlockCss
|
|
@@ -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.65.0",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return link summary
|
|
3
|
+
*/
|
|
1
4
|
export var extractSummary = function extractSummary(jsonLd) {
|
|
2
|
-
|
|
5
|
+
if (typeof (jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.summary) === 'string') {
|
|
6
|
+
var summary = jsonLd.summary.trim();
|
|
7
|
+
return Boolean(summary) ? summary : undefined;
|
|
8
|
+
}
|
|
3
9
|
};
|
package/dist/esm/messages.js
CHANGED
|
@@ -30,6 +30,11 @@ export var messages = defineMessages({
|
|
|
30
30
|
defaultMessage: 'Information quality may vary. <a>Learn more</a>',
|
|
31
31
|
description: 'Additional info about the content summarised by AI.'
|
|
32
32
|
},
|
|
33
|
+
ai_summarized_info_short: {
|
|
34
|
+
id: 'fabric.linking.ai_summarized_info_short.nonfinal',
|
|
35
|
+
defaultMessage: 'Content quality may vary',
|
|
36
|
+
description: 'Additional info about the content summarised by AI.'
|
|
37
|
+
},
|
|
33
38
|
ai_summarizing: {
|
|
34
39
|
id: 'fabric.linking.ai_summarizing',
|
|
35
40
|
defaultMessage: 'Atlassian Intelligence is working...',
|
|
@@ -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.65.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Icon from '@atlaskit/icon';
|
|
4
|
+
var CustomGlyph = function CustomGlyph(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
6
|
+
width: "16",
|
|
7
|
+
height: "16",
|
|
8
|
+
viewBox: "0 0 16 16",
|
|
9
|
+
fill: "none"
|
|
10
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
11
|
+
d: "M7 5C7 5.55228 7.44772 6 8 6C8.55228 6 9 5.55228 9 5C9 4.44772 8.55228 4 8 4C7.44772 4 7 4.44772 7 5Z",
|
|
12
|
+
fill: "currentColor"
|
|
13
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
14
|
+
d: "M7.25 7L7.25 12H8.75L8.75 7H7.25Z",
|
|
15
|
+
fill: "currentColor"
|
|
16
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
17
|
+
fillRule: "evenodd",
|
|
18
|
+
clipRule: "evenodd",
|
|
19
|
+
d: "M8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1ZM2.5 8C2.5 11.0376 4.96243 13.5 8 13.5C11.0376 13.5 13.5 11.0376 13.5 8C13.5 4.96243 11.0376 2.5 8 2.5C4.96243 2.5 2.5 4.96243 2.5 8Z",
|
|
20
|
+
fill: "currentColor"
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
export var InfoIcon = function InfoIcon(props) {
|
|
24
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
|
|
25
|
+
glyph: CustomGlyph
|
|
26
|
+
}));
|
|
27
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["status", "testId"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import AIFooterBlockResolvedView from './resolved';
|
|
6
|
+
import { SmartLinkStatus } from '../../../../../constants';
|
|
7
|
+
/**
|
|
8
|
+
* Represents a AIFooterBlock, designed to show provider metadata in
|
|
9
|
+
* addition to AI tooltip icons if AI is enabled
|
|
10
|
+
* @param {AIFooterBlockProps} AIFooterBlockProps
|
|
11
|
+
* @see Block
|
|
12
|
+
*/
|
|
13
|
+
var AIFooterBlock = function AIFooterBlock(_ref) {
|
|
14
|
+
var status = _ref.status,
|
|
15
|
+
_ref$testId = _ref.testId,
|
|
16
|
+
testId = _ref$testId === void 0 ? 'smart-ai-footer-block' : _ref$testId,
|
|
17
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
if (status !== SmartLinkStatus.Resolved) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
return /*#__PURE__*/React.createElement(AIFooterBlockResolvedView, _extends({}, props, {
|
|
22
|
+
testId: testId
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
export default AIFooterBlock;
|
package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { di } from 'react-magnetic-di';
|
|
3
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
5
|
+
import { Box, Inline } from '@atlaskit/primitives';
|
|
6
|
+
import AIStateIndicator from '../../ai-summary-block/ai-state-indicator';
|
|
7
|
+
import { InfoIcon } from '../icons/info';
|
|
8
|
+
import { messages } from '../../../../../../messages';
|
|
9
|
+
import { useAISummary } from '../../../../../../state/hooks/use-ai-summary';
|
|
10
|
+
export var AIFooterMetadata = function AIFooterMetadata(_ref) {
|
|
11
|
+
var testId = _ref.testId,
|
|
12
|
+
url = _ref.url,
|
|
13
|
+
ari = _ref.ari,
|
|
14
|
+
product = _ref.product;
|
|
15
|
+
var _useAISummary = useAISummary({
|
|
16
|
+
url: url,
|
|
17
|
+
ari: ari,
|
|
18
|
+
product: product
|
|
19
|
+
}),
|
|
20
|
+
status = _useAISummary.state.status;
|
|
21
|
+
if (status !== 'done') {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return /*#__PURE__*/React.createElement(Inline, {
|
|
25
|
+
space: "space.100",
|
|
26
|
+
testId: testId,
|
|
27
|
+
alignInline: "end",
|
|
28
|
+
grow: "fill"
|
|
29
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
30
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.ai_summarized_info_short),
|
|
31
|
+
position: "top"
|
|
32
|
+
}, function (tooltipProps) {
|
|
33
|
+
return /*#__PURE__*/React.createElement(Box, tooltipProps, /*#__PURE__*/React.createElement(InfoIcon, {
|
|
34
|
+
label: "Information",
|
|
35
|
+
size: "small",
|
|
36
|
+
primaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
37
|
+
}));
|
|
38
|
+
}), /*#__PURE__*/React.createElement(AIStateIndicator, {
|
|
39
|
+
appearance: "icon-only",
|
|
40
|
+
state: "done",
|
|
41
|
+
testId: "ai-tooltip"
|
|
42
|
+
}));
|
|
43
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Block from '../../block';
|
|
4
|
+
import { Provider } from '../../../elements';
|
|
5
|
+
import { InternalActionName } from '../../../../../../constants';
|
|
6
|
+
import { AIFooterMetadata } from './ai-footer-metadata';
|
|
7
|
+
import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
|
|
8
|
+
var AIFooterBlockResolvedView = function AIFooterBlockResolvedView(props) {
|
|
9
|
+
var _context$actions;
|
|
10
|
+
var context = useFlexibleUiContext();
|
|
11
|
+
var actionData = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[InternalActionName.AISummaryAction];
|
|
12
|
+
var testId = props.testId;
|
|
13
|
+
return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
|
|
14
|
+
testId: "".concat(testId, "-resolved-view")
|
|
15
|
+
}), /*#__PURE__*/React.createElement(Provider, {
|
|
16
|
+
testId: "".concat(testId, "-provider")
|
|
17
|
+
}), actionData ? /*#__PURE__*/React.createElement(AIFooterMetadata, _extends({}, actionData, {
|
|
18
|
+
testId: "".concat(testId, "-ai-metadata")
|
|
19
|
+
})) : null);
|
|
20
|
+
};
|
|
21
|
+
export default AIFooterBlockResolvedView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -151,7 +151,7 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
151
151
|
testId: "".concat(testId, "-ai-summary"),
|
|
152
152
|
minHeight: aiSummaryMinHeight,
|
|
153
153
|
content: content,
|
|
154
|
-
showIcon: isSummarisedOnMountRef.current
|
|
154
|
+
showIcon: !getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') && isSummarisedOnMountRef.current
|
|
155
155
|
})), !getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Inline, {
|
|
156
156
|
alignBlock: "center",
|
|
157
157
|
alignInline: "end",
|
|
@@ -9,4 +9,5 @@ export { default as CustomBlock } from './block';
|
|
|
9
9
|
export { default as InternalFooterBlock } from './footer-block/resolved';
|
|
10
10
|
export { default as RelatedUrlsBlock } from './related-urls-block';
|
|
11
11
|
export { default as AISummaryBlock } from './ai-summary-block';
|
|
12
|
+
export { default as AIFooterBlock } from './ai-footer-block';
|
|
12
13
|
export { default as ActionBlock } from './action-block';
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
4
4
|
import { ActionName, CardDisplay, ElementName, SmartLinkPosition, SmartLinkSize, SmartLinkDirection } from '../../../../../constants';
|
|
5
|
-
import { FooterBlock, MetadataBlock, RelatedUrlsBlock, SnippetBlock, TitleBlock, AISummaryBlock, CustomBlock, ActionBlock } from '../../../../FlexibleCard/components/blocks';
|
|
5
|
+
import { FooterBlock, MetadataBlock, RelatedUrlsBlock, SnippetBlock, TitleBlock, AISummaryBlock, CustomBlock, ActionBlock, AIFooterBlock } from '../../../../FlexibleCard/components/blocks';
|
|
6
6
|
import { footerBlockCss, hiddenSnippetStyles, metadataBlockCss } from './styled';
|
|
7
7
|
import FlexibleCard from '../../../../FlexibleCard';
|
|
8
8
|
import { getMetadata } from '../../../utils';
|
|
@@ -182,7 +182,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
|
|
|
182
182
|
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(ActionBlock, {
|
|
183
183
|
onClick: onActionClick,
|
|
184
184
|
spaceInline: "space.100"
|
|
185
|
-
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(
|
|
185
|
+
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(AIFooterBlock, null), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/React.createElement(FooterBlock, {
|
|
186
186
|
actions: footerActions,
|
|
187
187
|
size: SmartLinkSize.Large,
|
|
188
188
|
overrideCss: footerBlockCss
|
|
@@ -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.65.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_action' | 'ai_summary_action_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_goal' | 'unfollow_goal_description' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
|
|
3
|
+
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_action' | 'ai_summary_action_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_goal' | 'unfollow_goal_description' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AIFooterBlockProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a AIFooterBlock, designed to show provider metadata in
|
|
5
|
+
* addition to AI tooltip icons if AI is enabled
|
|
6
|
+
* @param {AIFooterBlockProps} AIFooterBlockProps
|
|
7
|
+
* @see Block
|
|
8
|
+
*/
|
|
9
|
+
declare const AIFooterBlock: ({ status, testId, ...props }: AIFooterBlockProps) => JSX.Element | null;
|
|
10
|
+
export default AIFooterBlock;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AISummaryActionData } from '../../../../../../state/flexible-ui-context/types';
|
|
3
|
+
export declare const AIFooterMetadata: ({ testId, url, ari, product, }: AISummaryActionData & {
|
|
4
|
+
testId?: string | undefined;
|
|
5
|
+
}) => JSX.Element | null;
|
|
@@ -7,4 +7,5 @@ export { default as CustomBlock } from './block';
|
|
|
7
7
|
export { default as InternalFooterBlock } from './footer-block/resolved';
|
|
8
8
|
export { default as RelatedUrlsBlock } from './related-urls-block';
|
|
9
9
|
export { default as AISummaryBlock } from './ai-summary-block';
|
|
10
|
+
export { default as AIFooterBlock } from './ai-footer-block';
|
|
10
11
|
export { default as ActionBlock } from './action-block';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_action' | 'ai_summary_action_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_goal' | 'unfollow_goal_description' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
|
|
3
|
+
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_action' | 'ai_summary_action_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_goal' | 'unfollow_goal_description' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AIFooterBlockProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a AIFooterBlock, designed to show provider metadata in
|
|
5
|
+
* addition to AI tooltip icons if AI is enabled
|
|
6
|
+
* @param {AIFooterBlockProps} AIFooterBlockProps
|
|
7
|
+
* @see Block
|
|
8
|
+
*/
|
|
9
|
+
declare const AIFooterBlock: ({ status, testId, ...props }: AIFooterBlockProps) => JSX.Element | null;
|
|
10
|
+
export default AIFooterBlock;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AISummaryActionData } from '../../../../../../state/flexible-ui-context/types';
|
|
3
|
+
export declare const AIFooterMetadata: ({ testId, url, ari, product, }: AISummaryActionData & {
|
|
4
|
+
testId?: string | undefined;
|
|
5
|
+
}) => JSX.Element | null;
|
|
@@ -7,4 +7,5 @@ export { default as CustomBlock } from './block';
|
|
|
7
7
|
export { default as InternalFooterBlock } from './footer-block/resolved';
|
|
8
8
|
export { default as RelatedUrlsBlock } from './related-urls-block';
|
|
9
9
|
export { default as AISummaryBlock } from './ai-summary-block';
|
|
10
|
+
export { default as AIFooterBlock } from './ai-footer-block';
|
|
10
11
|
export { default as ActionBlock } from './action-block';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.65.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/primitives": "^6.1.0",
|
|
56
56
|
"@atlaskit/spinner": "^16.1.0",
|
|
57
57
|
"@atlaskit/theme": "^12.8.0",
|
|
58
|
-
"@atlaskit/tokens": "^1.
|
|
58
|
+
"@atlaskit/tokens": "^1.48.0",
|
|
59
59
|
"@atlaskit/tooltip": "^18.3.0",
|
|
60
60
|
"@atlaskit/ufo": "^0.2.0",
|
|
61
61
|
"@babel/runtime": "^7.0.0",
|