@atlaskit/smart-card 45.2.4 → 45.3.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 +22 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydone--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydoneonmount--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryerror--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryloading--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryready--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-actions--light-mode.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-actions-with-related-urls--default.png +2 -2
- package/dist/cjs/constants.js +1 -2
- package/dist/cjs/messages.js +0 -10
- package/dist/cjs/ssr.js +1 -45
- package/dist/cjs/utils/ai-summary.js +1 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +4 -61
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +3 -5
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +1 -4
- package/dist/cjs/view/FlexibleCard/components/common/ai-summary/ai-learn-more-anchor.js +1 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/ai-summary/ai-footer/index.js +1 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydone--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydoneonmount--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryerror--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryloading--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryready--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-actions--light-mode.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-actions-with-related-urls--default.png +2 -2
- package/dist/es2019/constants.js +0 -1
- package/dist/es2019/messages.js +0 -10
- package/dist/es2019/ssr.js +3 -45
- package/dist/es2019/utils/ai-summary.js +1 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +3 -54
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +3 -5
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/common/ai-summary/ai-learn-more-anchor.js +2 -3
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/ai-summary/ai-footer/index.js +1 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydone--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydoneonmount--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryerror--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryloading--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryready--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-actions--light-mode.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-actions-with-related-urls--default.png +2 -2
- package/dist/esm/constants.js +0 -1
- package/dist/esm/messages.js +0 -10
- package/dist/esm/ssr.js +3 -46
- package/dist/esm/utils/ai-summary.js +1 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +5 -63
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +3 -5
- package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js +1 -4
- package/dist/esm/view/FlexibleCard/components/common/ai-summary/ai-learn-more-anchor.js +2 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/ai-summary/ai-footer/index.js +1 -2
- package/dist/types/constants.d.ts +0 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/ssr.d.ts +1 -1
- package/package.json +5 -14
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydone--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydone--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydoneonmount--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydoneonmount--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryerror--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryerror--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryloading--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryloading--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryready--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryready--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydone--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydone--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydoneonmount--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydoneonmount--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryerror--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryerror--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryloading--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryloading--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryready--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryready--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydone--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydone--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydoneonmount--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummarydoneonmount--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryerror--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryerror--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryloading--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryloading--default--platform-sl-ai-summary-rebrand-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryready--default--platform-sl-ai-summary-rebrand-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryready--default--platform-sl-ai-summary-rebrand-true.png +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 45.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`05e2e74c028a3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/05e2e74c028a3) -
|
|
8
|
+
Cleanup feature gate platform_sl_ai_summary_rebrand. AI Summary now permanently uses Rovo branding
|
|
9
|
+
(RovoIcon, Rovo content URLs, and Rovo action labels).
|
|
10
|
+
|
|
11
|
+
## 45.2.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`8e8fa5c982de0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e8fa5c982de0) -
|
|
16
|
+
Cleanup feature gate `platform_sl_event_ui_seen`. The new SSR card implementation using
|
|
17
|
+
CardErrorBoundary and the smart link seen event tracking are now permanently enabled.
|
|
18
|
+
- [`5960cad1ecc81`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5960cad1ecc81) -
|
|
19
|
+
Remove unused platform feature flag declarations (no runtime impact)
|
|
20
|
+
- [`ee28cf33718b0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ee28cf33718b0) -
|
|
21
|
+
Add @atlassian/react-compiler-gating as a runtime dependency to enable React Compiler platform
|
|
22
|
+
gating.
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 45.2.4
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-actions--light-mode.png
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:b92a8933c53ddbdc5d5782b5cb71c93635fa8a965388db4dc0c1285792798e7f
|
|
3
|
+
size 36295
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:b92a8933c53ddbdc5d5782b5cb71c93635fa8a965388db4dc0c1285792798e7f
|
|
3
|
+
size 36295
|
package/dist/cjs/constants.js
CHANGED
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.SmartLinkWidth = exports.SmartLinkTheme = exports.SmartLinkStatus = exports.SmartLinkSize = exports.SmartLinkPosition = exports.SmartLinkInternalTheme = exports.SmartLinkDirection = exports.SmartLinkAlignment = exports.MediaType = exports.MediaPlacement = exports.InternalActionName = exports.IconType = exports.ElementName = exports.CardDisplay = exports.CardAction = exports.CONTENT_URL_SECURITY_AND_PERMISSIONS = exports.CONTENT_URL_ROVO = exports.CONTENT_URL_AI_TROUBLESHOOTING = exports.
|
|
6
|
+
exports.SmartLinkWidth = exports.SmartLinkTheme = exports.SmartLinkStatus = exports.SmartLinkSize = exports.SmartLinkPosition = exports.SmartLinkInternalTheme = exports.SmartLinkDirection = exports.SmartLinkAlignment = exports.MediaType = exports.MediaPlacement = exports.InternalActionName = exports.IconType = exports.ElementName = exports.CardDisplay = exports.CardAction = exports.CONTENT_URL_SECURITY_AND_PERMISSIONS = exports.CONTENT_URL_ROVO = exports.CONTENT_URL_AI_TROUBLESHOOTING = exports.CONTENT_URL_ACCEPTABLE_USE_POLICY = exports.CONTENT_URL_3P_ACCOUNT_AUTH = exports.ActionName = void 0;
|
|
7
7
|
var CONTENT_URL_SECURITY_AND_PERMISSIONS = exports.CONTENT_URL_SECURITY_AND_PERMISSIONS = 'https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/#Smart-links';
|
|
8
8
|
var CONTENT_URL_3P_ACCOUNT_AUTH = exports.CONTENT_URL_3P_ACCOUNT_AUTH = 'https://support.atlassian.com/confluence-cloud/docs/what-data-is-sent-and-received-when-pasting-a-smart-link/';
|
|
9
|
-
var CONTENT_URL_AI = exports.CONTENT_URL_AI = 'https://www.atlassian.com/trust/atlassian-intelligence';
|
|
10
9
|
var CONTENT_URL_ROVO = exports.CONTENT_URL_ROVO = 'https://www.atlassian.com/trust/ai';
|
|
11
10
|
var CONTENT_URL_AI_TROUBLESHOOTING = exports.CONTENT_URL_AI_TROUBLESHOOTING = 'https://status.atlassian.com/';
|
|
12
11
|
var CONTENT_URL_ACCEPTABLE_USE_POLICY = exports.CONTENT_URL_ACCEPTABLE_USE_POLICY = 'https://www.atlassian.com/legal/acceptable-use-policy';
|
package/dist/cjs/messages.js
CHANGED
|
@@ -36,11 +36,6 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
36
36
|
defaultMessage: 'Content quality may vary',
|
|
37
37
|
description: 'Additional info about the content summarised by AI.'
|
|
38
38
|
},
|
|
39
|
-
ai_summary_error_generic: {
|
|
40
|
-
id: 'fabric.linking.ai_summary_error_generic',
|
|
41
|
-
defaultMessage: 'Atlassian Intelligence (AI) isn’t responding. Try again later or <a>check the status of AI</a>.',
|
|
42
|
-
description: 'Shown when AI Summary encountered an unexpected error while summarizing the linked resource content.'
|
|
43
|
-
},
|
|
44
39
|
ai_summary_error_generic_rebrand: {
|
|
45
40
|
id: 'fabric.linking.ai_summary_error_generic_rebrand',
|
|
46
41
|
defaultMessage: 'Rovo isn’t responding. Try again later or <a>check the status of AI</a>.',
|
|
@@ -281,11 +276,6 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
281
276
|
defaultMessage: 'Download file',
|
|
282
277
|
description: 'Label for the download file action in a smart link or card action menu, allowing the user to save the linked file locally.'
|
|
283
278
|
},
|
|
284
|
-
ai_summary_action: {
|
|
285
|
-
id: 'fabric.linking.ai_summary_action',
|
|
286
|
-
defaultMessage: 'Summarize with AI',
|
|
287
|
-
description: 'Label for the AI summarize action in a smart link or hover card action menu, allowing the user to generate an AI summary of the linked content.'
|
|
288
|
-
},
|
|
289
279
|
ai_summary_action_rebrand: {
|
|
290
280
|
id: 'fabric.linking.ai_summary_action_rebrand',
|
|
291
281
|
defaultMessage: 'Summarize with Rovo',
|
package/dist/cjs/ssr.js
CHANGED
|
@@ -9,7 +9,6 @@ exports.CardSSR = void 0;
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _reactErrorBoundary = require("react-error-boundary");
|
|
13
12
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
14
13
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
15
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -17,14 +16,13 @@ var _analytics = require("./utils/analytics/analytics");
|
|
|
17
16
|
var _flexible = require("./utils/flexible");
|
|
18
17
|
var _cardErrorBoundary = _interopRequireDefault(require("./view/CardWithUrl/card-error-boundary"));
|
|
19
18
|
var _component = require("./view/CardWithUrl/component");
|
|
20
|
-
var _LoadingCardLink = require("./view/CardWithUrl/component-lazy/LoadingCardLink");
|
|
21
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
20
|
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; }
|
|
23
21
|
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; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
24
22
|
// SSR friendly version of smart-card
|
|
25
23
|
// simplifies the logic around rendering and loading placeholders and
|
|
26
24
|
// only contains whats necessary to render the card on SSR mode
|
|
27
|
-
var
|
|
25
|
+
var CardSSR = exports.CardSSR = function CardSSR(props) {
|
|
28
26
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
29
27
|
var _useState = (0, _react.useState)(function () {
|
|
30
28
|
var _props$id;
|
|
@@ -36,42 +34,6 @@ var CardSSROld = function CardSSROld(props) {
|
|
|
36
34
|
// because they render custom blocks (TitleBlock etc.) requiring a complete response.
|
|
37
35
|
// Override appearance to 'block' for FlexibleCards when FG is enabled.
|
|
38
36
|
var effectiveAppearance = (0, _flexible.isFlexibleUiCard)(props.children, props.ui) && (0, _platformFeatureFlags.fg)('platform_smartlink_inline_resolve_optimization') ? 'block' : props.appearance;
|
|
39
|
-
var cardProps = _objectSpread(_objectSpread({}, props), {}, {
|
|
40
|
-
id: id,
|
|
41
|
-
appearance: effectiveAppearance
|
|
42
|
-
});
|
|
43
|
-
var ErrorFallbackComponent = cardProps.fallbackComponent;
|
|
44
|
-
var errorBoundaryFallbackComponent = function errorBoundaryFallbackComponent() {
|
|
45
|
-
if (ErrorFallbackComponent) {
|
|
46
|
-
return /*#__PURE__*/_react.default.createElement(ErrorFallbackComponent, null);
|
|
47
|
-
}
|
|
48
|
-
return /*#__PURE__*/_react.default.createElement(_LoadingCardLink.LoadingCardLink, cardProps);
|
|
49
|
-
};
|
|
50
|
-
var Component = effectiveAppearance === 'inline' ? 'span' : 'div';
|
|
51
|
-
return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
|
|
52
|
-
data: _analytics.context
|
|
53
|
-
}, /*#__PURE__*/_react.default.createElement(_reactErrorBoundary.ErrorBoundary, {
|
|
54
|
-
FallbackComponent: errorBoundaryFallbackComponent
|
|
55
|
-
}, /*#__PURE__*/_react.default.createElement(Component, {
|
|
56
|
-
className: "loader-wrapper"
|
|
57
|
-
}, /*#__PURE__*/_react.default.createElement(_component.CardWithUrlContent, cardProps))));
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
// SSR friendly version of smart-card
|
|
61
|
-
// simplifies the logic around rendering and loading placeholders and
|
|
62
|
-
// only contains whats necessary to render the card on SSR mode
|
|
63
|
-
var CardSSRNew = function CardSSRNew(props) {
|
|
64
|
-
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
65
|
-
var _useState3 = (0, _react.useState)(function () {
|
|
66
|
-
var _props$id2;
|
|
67
|
-
return (_props$id2 = props.id) !== null && _props$id2 !== void 0 ? _props$id2 : (0, _uuid.default)();
|
|
68
|
-
}),
|
|
69
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 1),
|
|
70
|
-
id = _useState4[0];
|
|
71
|
-
// FlexibleCards always need full ORS data regardless of appearance prop,
|
|
72
|
-
// because they render custom blocks (TitleBlock etc.) requiring a complete response.
|
|
73
|
-
// Override appearance to 'block' for FlexibleCards when FG is enabled.
|
|
74
|
-
var effectiveAppearance = (0, _flexible.isFlexibleUiCard)(props.children, props.ui) && (0, _platformFeatureFlags.fg)('platform_smartlink_inline_resolve_optimization') ? 'block' : props.appearance;
|
|
75
37
|
var propsWithId = _objectSpread(_objectSpread({}, props), {}, {
|
|
76
38
|
id: id,
|
|
77
39
|
appearance: effectiveAppearance
|
|
@@ -79,10 +41,4 @@ var CardSSRNew = function CardSSRNew(props) {
|
|
|
79
41
|
return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
|
|
80
42
|
data: _analytics.context
|
|
81
43
|
}, /*#__PURE__*/_react.default.createElement(_cardErrorBoundary.default, propsWithId, /*#__PURE__*/_react.default.createElement(_component.CardWithUrl, propsWithId)));
|
|
82
|
-
};
|
|
83
|
-
var CardSSR = exports.CardSSR = function CardSSR(props) {
|
|
84
|
-
if ((0, _platformFeatureFlags.fg)('platform_sl_event_ui_seen')) {
|
|
85
|
-
return /*#__PURE__*/_react.default.createElement(CardSSRNew, props);
|
|
86
|
-
}
|
|
87
|
-
return /*#__PURE__*/_react.default.createElement(CardSSROld, props);
|
|
88
44
|
};
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getIsAISummaryEnabled = exports.getAISummaryErrorMessage = void 0;
|
|
7
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
7
|
var _constants = require("../constants");
|
|
9
8
|
var _messages = require("../messages");
|
|
10
9
|
var getIsAISummaryEnabled = exports.getIsAISummaryEnabled = function getIsAISummaryEnabled() {
|
|
@@ -30,7 +29,7 @@ var getAISummaryErrorMessage = exports.getAISummaryErrorMessage = function getAI
|
|
|
30
29
|
};
|
|
31
30
|
default:
|
|
32
31
|
return {
|
|
33
|
-
message:
|
|
32
|
+
message: _messages.messages.ai_summary_error_generic_rebrand,
|
|
34
33
|
url: _constants.CONTENT_URL_AI_TROUBLESHOOTING
|
|
35
34
|
};
|
|
36
35
|
}
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card" || '',
|
|
14
|
-
packageVersion: "45.2.
|
|
14
|
+
packageVersion: "45.2.5" || ''
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -9,7 +9,6 @@ exports.LazyIntersectionObserverCard = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
13
12
|
var _state = require("../../../state");
|
|
14
13
|
var _ufoExperiences = require("../../../state/analytics/ufoExperiences");
|
|
15
14
|
var _useIntersectionObserver = _interopRequireDefault(require("../../../state/hooks/use-intersection-observer"));
|
|
@@ -19,69 +18,14 @@ var _cardLoaderWrapper = _interopRequireDefault(require("../card-loader-wrapper"
|
|
|
19
18
|
var _component = require("../component");
|
|
20
19
|
var _LoadingCardLink = require("./LoadingCardLink");
|
|
21
20
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
|
-
|
|
23
|
-
// HTML element being observed is within `X` px of the target container it is
|
|
24
|
-
// being compared to. Since the default container is the `document`, we set this
|
|
25
|
-
// up to check once a Smart Link is within `X` px from the bottom of the viewport.
|
|
26
|
-
var ROOT_MARGIN_VERTICAL = '360px';
|
|
27
|
-
function LazyIntersectionObserverCardOld(props) {
|
|
28
|
-
var ref = (0, _react.useRef)(null);
|
|
21
|
+
var LazyIntersectionObserverCard = exports.LazyIntersectionObserverCard = function LazyIntersectionObserverCard(props) {
|
|
29
22
|
var _useState = (0, _react.useState)(false),
|
|
30
23
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
isIntersected = _useState2[0],
|
|
25
|
+
setIsIntersected = _useState2[1];
|
|
33
26
|
var _useState3 = (0, _react.useState)((0, _shouldSample.shouldSample)()),
|
|
34
27
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 1),
|
|
35
28
|
shouldSendRenderedUFOEvent = _useState4[0];
|
|
36
|
-
var appearance = props.appearance,
|
|
37
|
-
url = props.url,
|
|
38
|
-
id = props.id;
|
|
39
|
-
var prefetch = (0, _state.usePrefetch)(url, appearance);
|
|
40
|
-
var Component = appearance === 'inline' ? 'span' : 'div';
|
|
41
|
-
var ComponentObserver = Component;
|
|
42
|
-
var onIntersection = (0, _react.useCallback)(function (entries, observer) {
|
|
43
|
-
var isVisible = entries.some(function (entry) {
|
|
44
|
-
return entry.isIntersecting;
|
|
45
|
-
});
|
|
46
|
-
if (isVisible) {
|
|
47
|
-
if (shouldSendRenderedUFOEvent) {
|
|
48
|
-
(0, _ufoExperiences.startUfoExperience)('smart-link-rendered', id);
|
|
49
|
-
}
|
|
50
|
-
setIsIntersecting(true);
|
|
51
|
-
observer.disconnect();
|
|
52
|
-
} else {
|
|
53
|
-
prefetch();
|
|
54
|
-
}
|
|
55
|
-
}, [id, prefetch, shouldSendRenderedUFOEvent]);
|
|
56
|
-
(0, _react.useEffect)(function () {
|
|
57
|
-
if (!ref.current) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
var intersectionObserver = new IntersectionObserver(onIntersection, {
|
|
61
|
-
rootMargin: "".concat(ROOT_MARGIN_VERTICAL, " 0px ").concat(ROOT_MARGIN_VERTICAL, " 0px")
|
|
62
|
-
});
|
|
63
|
-
intersectionObserver.observe(ref.current);
|
|
64
|
-
return function () {
|
|
65
|
-
return intersectionObserver.disconnect();
|
|
66
|
-
};
|
|
67
|
-
}, [ref, onIntersection]);
|
|
68
|
-
var content = isIntersecting ? /*#__PURE__*/_react.default.createElement(_component.CardWithUrlContent, props) : /*#__PURE__*/_react.default.createElement(ComponentObserver, {
|
|
69
|
-
ref: ref
|
|
70
|
-
}, /*#__PURE__*/_react.default.createElement(_LoadingCardLink.LoadingCardLink, props));
|
|
71
|
-
|
|
72
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
73
|
-
return /*#__PURE__*/_react.default.createElement(Component, {
|
|
74
|
-
className: "loader-wrapper"
|
|
75
|
-
}, content);
|
|
76
|
-
}
|
|
77
|
-
var LazyIntersectionObserverCardNew = function LazyIntersectionObserverCardNew(props) {
|
|
78
|
-
var _useState5 = (0, _react.useState)(false),
|
|
79
|
-
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
80
|
-
isIntersected = _useState6[0],
|
|
81
|
-
setIsIntersected = _useState6[1];
|
|
82
|
-
var _useState7 = (0, _react.useState)((0, _shouldSample.shouldSample)()),
|
|
83
|
-
_useState8 = (0, _slicedToArray2.default)(_useState7, 1),
|
|
84
|
-
shouldSendRenderedUFOEvent = _useState8[0];
|
|
85
29
|
var appearance = props.appearance,
|
|
86
30
|
children = props.children,
|
|
87
31
|
id = props.id,
|
|
@@ -127,5 +71,4 @@ var LazyIntersectionObserverCardNew = function LazyIntersectionObserverCardNew(p
|
|
|
127
71
|
return /*#__PURE__*/_react.default.createElement(_cardLoaderWrapper.default, {
|
|
128
72
|
appearance: appearance
|
|
129
73
|
}, content);
|
|
130
|
-
};
|
|
131
|
-
var LazyIntersectionObserverCard = exports.LazyIntersectionObserverCard = (0, _platformFeatureFlagsReact.componentWithFG)('platform_sl_event_ui_seen', LazyIntersectionObserverCardNew, LazyIntersectionObserverCardOld);
|
|
74
|
+
};
|
package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js
CHANGED
|
@@ -11,7 +11,6 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _reactIntl = require("react-intl");
|
|
13
13
|
var _rovo = _interopRequireDefault(require("@atlaskit/icon-lab/core/rovo"));
|
|
14
|
-
var _atlassianIntelligence = _interopRequireDefault(require("@atlaskit/icon/core/atlassian-intelligence"));
|
|
15
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
17
16
|
var _messages = require("../../../../../messages");
|
|
@@ -46,10 +45,9 @@ function AISummariseAction(_ref) {
|
|
|
46
45
|
(_summariseUrl = summariseUrl()) === null || _summariseUrl === void 0 || _summariseUrl.then(onCompleted, onCompleted);
|
|
47
46
|
onClickCallback === null || onClickCallback === void 0 || onClickCallback();
|
|
48
47
|
}, [fireEvent, onClickCallback, onCompleted, summariseUrl]);
|
|
49
|
-
var Icon = (0, _platformFeatureFlags.fg)('platform_sl_ai_summary_rebrand') ? _rovo.default : _atlassianIntelligence.default;
|
|
50
48
|
return /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
51
|
-
content: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage,
|
|
52
|
-
icon: /*#__PURE__*/_react.default.createElement(
|
|
49
|
+
content: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _messages.messages.ai_summary_action_rebrand),
|
|
50
|
+
icon: /*#__PURE__*/_react.default.createElement(_rovo.default, (0, _extends2.default)({
|
|
53
51
|
spacing: "spacious",
|
|
54
52
|
color: "currentColor",
|
|
55
53
|
label: "Summarise with AI"
|
|
@@ -59,6 +57,6 @@ function AISummariseAction(_ref) {
|
|
|
59
57
|
onClick: handleActionClick,
|
|
60
58
|
testId: "".concat(testId, "-summarise-action"),
|
|
61
59
|
isLoading: status === 'loading',
|
|
62
|
-
tooltipMessage: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage,
|
|
60
|
+
tooltipMessage: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _messages.messages.ai_summary_action_description_rebrand)
|
|
63
61
|
}, props));
|
|
64
62
|
}
|
package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/resolved/ai-footer-metadata.js
CHANGED
|
@@ -9,8 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _reactIntl = require("react-intl");
|
|
10
10
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
11
11
|
var _rovo = _interopRequireDefault(require("@atlaskit/icon-lab/core/rovo"));
|
|
12
|
-
var _atlassianIntelligence = _interopRequireDefault(require("@atlaskit/icon/core/atlassian-intelligence"));
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
12
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
16
14
|
var _messages = require("../../../../../../messages");
|
|
@@ -24,7 +22,6 @@ var AIFooterMetadata = exports.AIFooterMetadata = function AIFooterMetadata(_ref
|
|
|
24
22
|
if (status !== 'done') {
|
|
25
23
|
return null;
|
|
26
24
|
}
|
|
27
|
-
var Icon = (0, _platformFeatureFlags.fg)('platform_sl_ai_summary_rebrand') ? _rovo.default : _atlassianIntelligence.default;
|
|
28
25
|
return /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
29
26
|
space: "space.100",
|
|
30
27
|
testId: testId,
|
|
@@ -38,7 +35,7 @@ var AIFooterMetadata = exports.AIFooterMetadata = function AIFooterMetadata(_ref
|
|
|
38
35
|
label: "Information",
|
|
39
36
|
color: "var(--ds-icon-subtle, #505258)"
|
|
40
37
|
}));
|
|
41
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
38
|
+
}), /*#__PURE__*/_react.default.createElement(_rovo.default, {
|
|
42
39
|
label: "AI",
|
|
43
40
|
color: "var(--ds-icon-subtle, #505258)"
|
|
44
41
|
}));
|
|
@@ -9,14 +9,13 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _link = _interopRequireDefault(require("@atlaskit/link"));
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _constants = require("../../../../../constants");
|
|
14
13
|
var _excluded = ["children"];
|
|
15
14
|
var AILearnMoreAnchor = function AILearnMoreAnchor(_ref) {
|
|
16
15
|
var children = _ref.children,
|
|
17
16
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
18
17
|
return /*#__PURE__*/_react.default.createElement(_link.default, (0, _extends2.default)({
|
|
19
|
-
href:
|
|
18
|
+
href: _constants.CONTENT_URL_ROVO,
|
|
20
19
|
target: "_blank",
|
|
21
20
|
rel: "noopener noreferrer"
|
|
22
21
|
}, props), children);
|
|
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
19
19
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
20
20
|
var PACKAGE_DATA = {
|
|
21
21
|
packageName: "@atlaskit/smart-card",
|
|
22
|
-
packageVersion: "45.2.
|
|
22
|
+
packageVersion: "45.2.5",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -13,7 +13,6 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
13
13
|
var _reactIntl = require("react-intl");
|
|
14
14
|
var _informationCircle = _interopRequireDefault(require("@atlaskit/icon/core/information-circle"));
|
|
15
15
|
var _link = _interopRequireDefault(require("@atlaskit/link"));
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
17
|
var _constants = require("../../../../constants");
|
|
19
18
|
var _messages = require("../../../../messages");
|
|
@@ -33,7 +32,7 @@ var AIFooter = function AIFooter() {
|
|
|
33
32
|
}), /*#__PURE__*/React.createElement(_compiled.Text, {
|
|
34
33
|
size: "small"
|
|
35
34
|
}, /*#__PURE__*/React.createElement(_link.default, {
|
|
36
|
-
href:
|
|
35
|
+
href: _constants.CONTENT_URL_ROVO,
|
|
37
36
|
appearance: "subtle",
|
|
38
37
|
target: "_blank"
|
|
39
38
|
}, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage, _messages.messages.ai_disclaimer))));
|
package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-actions--light-mode.png
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:b92a8933c53ddbdc5d5782b5cb71c93635fa8a965388db4dc0c1285792798e7f
|
|
3
|
+
size 36295
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:b92a8933c53ddbdc5d5782b5cb71c93635fa8a965388db4dc0c1285792798e7f
|
|
3
|
+
size 36295
|
package/dist/es2019/constants.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export const CONTENT_URL_SECURITY_AND_PERMISSIONS = 'https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/#Smart-links';
|
|
2
2
|
export const CONTENT_URL_3P_ACCOUNT_AUTH = 'https://support.atlassian.com/confluence-cloud/docs/what-data-is-sent-and-received-when-pasting-a-smart-link/';
|
|
3
|
-
export const CONTENT_URL_AI = 'https://www.atlassian.com/trust/atlassian-intelligence';
|
|
4
3
|
export const CONTENT_URL_ROVO = 'https://www.atlassian.com/trust/ai';
|
|
5
4
|
export const CONTENT_URL_AI_TROUBLESHOOTING = 'https://status.atlassian.com/';
|
|
6
5
|
export const CONTENT_URL_ACCEPTABLE_USE_POLICY = 'https://www.atlassian.com/legal/acceptable-use-policy';
|
package/dist/es2019/messages.js
CHANGED
|
@@ -30,11 +30,6 @@ export const messages = defineMessages({
|
|
|
30
30
|
defaultMessage: 'Content quality may vary',
|
|
31
31
|
description: 'Additional info about the content summarised by AI.'
|
|
32
32
|
},
|
|
33
|
-
ai_summary_error_generic: {
|
|
34
|
-
id: 'fabric.linking.ai_summary_error_generic',
|
|
35
|
-
defaultMessage: 'Atlassian Intelligence (AI) isn’t responding. Try again later or <a>check the status of AI</a>.',
|
|
36
|
-
description: 'Shown when AI Summary encountered an unexpected error while summarizing the linked resource content.'
|
|
37
|
-
},
|
|
38
33
|
ai_summary_error_generic_rebrand: {
|
|
39
34
|
id: 'fabric.linking.ai_summary_error_generic_rebrand',
|
|
40
35
|
defaultMessage: 'Rovo isn’t responding. Try again later or <a>check the status of AI</a>.',
|
|
@@ -275,11 +270,6 @@ export const messages = defineMessages({
|
|
|
275
270
|
defaultMessage: 'Download file',
|
|
276
271
|
description: 'Label for the download file action in a smart link or card action menu, allowing the user to save the linked file locally.'
|
|
277
272
|
},
|
|
278
|
-
ai_summary_action: {
|
|
279
|
-
id: 'fabric.linking.ai_summary_action',
|
|
280
|
-
defaultMessage: 'Summarize with AI',
|
|
281
|
-
description: 'Label for the AI summarize action in a smart link or hover card action menu, allowing the user to generate an AI summary of the linked content.'
|
|
282
|
-
},
|
|
283
273
|
ai_summary_action_rebrand: {
|
|
284
274
|
id: 'fabric.linking.ai_summary_action_rebrand',
|
|
285
275
|
defaultMessage: 'Summarize with Rovo',
|
package/dist/es2019/ssr.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
4
4
|
import uuid from 'uuid';
|
|
5
5
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
@@ -7,12 +7,11 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
7
7
|
import { context } from './utils/analytics/analytics';
|
|
8
8
|
import { isFlexibleUiCard } from './utils/flexible';
|
|
9
9
|
import CardErrorBoundary from './view/CardWithUrl/card-error-boundary';
|
|
10
|
-
import { CardWithUrl
|
|
11
|
-
import { LoadingCardLink } from './view/CardWithUrl/component-lazy/LoadingCardLink';
|
|
10
|
+
import { CardWithUrl } from './view/CardWithUrl/component';
|
|
12
11
|
// SSR friendly version of smart-card
|
|
13
12
|
// simplifies the logic around rendering and loading placeholders and
|
|
14
13
|
// only contains whats necessary to render the card on SSR mode
|
|
15
|
-
const
|
|
14
|
+
export const CardSSR = props => {
|
|
16
15
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
17
16
|
const [id] = useState(() => {
|
|
18
17
|
var _props$id;
|
|
@@ -22,41 +21,6 @@ const CardSSROld = props => {
|
|
|
22
21
|
// because they render custom blocks (TitleBlock etc.) requiring a complete response.
|
|
23
22
|
// Override appearance to 'block' for FlexibleCards when FG is enabled.
|
|
24
23
|
const effectiveAppearance = isFlexibleUiCard(props.children, props.ui) && fg('platform_smartlink_inline_resolve_optimization') ? 'block' : props.appearance;
|
|
25
|
-
const cardProps = {
|
|
26
|
-
...props,
|
|
27
|
-
id,
|
|
28
|
-
appearance: effectiveAppearance
|
|
29
|
-
};
|
|
30
|
-
const ErrorFallbackComponent = cardProps.fallbackComponent;
|
|
31
|
-
const errorBoundaryFallbackComponent = () => {
|
|
32
|
-
if (ErrorFallbackComponent) {
|
|
33
|
-
return /*#__PURE__*/React.createElement(ErrorFallbackComponent, null);
|
|
34
|
-
}
|
|
35
|
-
return /*#__PURE__*/React.createElement(LoadingCardLink, cardProps);
|
|
36
|
-
};
|
|
37
|
-
const Component = effectiveAppearance === 'inline' ? 'span' : 'div';
|
|
38
|
-
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
39
|
-
data: context
|
|
40
|
-
}, /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
41
|
-
FallbackComponent: errorBoundaryFallbackComponent
|
|
42
|
-
}, /*#__PURE__*/React.createElement(Component, {
|
|
43
|
-
className: "loader-wrapper"
|
|
44
|
-
}, /*#__PURE__*/React.createElement(CardWithUrlContent, cardProps))));
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
// SSR friendly version of smart-card
|
|
48
|
-
// simplifies the logic around rendering and loading placeholders and
|
|
49
|
-
// only contains whats necessary to render the card on SSR mode
|
|
50
|
-
const CardSSRNew = props => {
|
|
51
|
-
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
52
|
-
const [id] = useState(() => {
|
|
53
|
-
var _props$id2;
|
|
54
|
-
return (_props$id2 = props.id) !== null && _props$id2 !== void 0 ? _props$id2 : uuid();
|
|
55
|
-
});
|
|
56
|
-
// FlexibleCards always need full ORS data regardless of appearance prop,
|
|
57
|
-
// because they render custom blocks (TitleBlock etc.) requiring a complete response.
|
|
58
|
-
// Override appearance to 'block' for FlexibleCards when FG is enabled.
|
|
59
|
-
const effectiveAppearance = isFlexibleUiCard(props.children, props.ui) && fg('platform_smartlink_inline_resolve_optimization') ? 'block' : props.appearance;
|
|
60
24
|
const propsWithId = {
|
|
61
25
|
...props,
|
|
62
26
|
id,
|
|
@@ -65,10 +29,4 @@ const CardSSRNew = props => {
|
|
|
65
29
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
66
30
|
data: context
|
|
67
31
|
}, /*#__PURE__*/React.createElement(CardErrorBoundary, propsWithId, /*#__PURE__*/React.createElement(CardWithUrl, propsWithId)));
|
|
68
|
-
};
|
|
69
|
-
export const CardSSR = props => {
|
|
70
|
-
if (fg('platform_sl_event_ui_seen')) {
|
|
71
|
-
return /*#__PURE__*/React.createElement(CardSSRNew, props);
|
|
72
|
-
}
|
|
73
|
-
return /*#__PURE__*/React.createElement(CardSSROld, props);
|
|
74
32
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import { CONTENT_URL_ACCEPTABLE_USE_POLICY, CONTENT_URL_AI_TROUBLESHOOTING } from '../constants';
|
|
3
2
|
import { messages } from '../messages';
|
|
4
3
|
export const getIsAISummaryEnabled = (isAdminHubAIEnabled = false, response) => {
|
|
@@ -22,7 +21,7 @@ export const getAISummaryErrorMessage = error => {
|
|
|
22
21
|
};
|
|
23
22
|
default:
|
|
24
23
|
return {
|
|
25
|
-
message:
|
|
24
|
+
message: messages.ai_summary_error_generic_rebrand,
|
|
26
25
|
url: CONTENT_URL_AI_TROUBLESHOOTING
|
|
27
26
|
};
|
|
28
27
|
}
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card" || '',
|
|
5
|
-
packageVersion: "45.2.
|
|
5
|
+
packageVersion: "45.2.5" || ''
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|