@atlaskit/smart-card 46.13.13 → 46.13.15
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 +30 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/block-card-google-doc-with-summarize-rovo-action--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png +2 -2
- package/dist/cjs/ssr.js +6 -2
- package/dist/cjs/state/analytics/startUfoExperience.js +7 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/card-error-boundary/index.js +104 -3
- package/dist/cjs/view/CardWithUrl/card-intersection-observer/index.js +87 -1
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +37 -7
- package/dist/cjs/view/CardWithUrl/loader.js +1 -1
- package/dist/cjs/view/EmbedCard/components/rovo-actions-footer/index.js +4 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-error/index.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-item/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-items-group/index.js +2 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/rovo-chat-utils/index.js +5 -1
- package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/block-card-google-doc-with-summarize-rovo-action--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png +2 -2
- package/dist/es2019/ssr.js +6 -2
- package/dist/es2019/state/analytics/startUfoExperience.js +7 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/card-error-boundary/index.js +105 -2
- package/dist/es2019/view/CardWithUrl/card-intersection-observer/index.js +88 -2
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +37 -7
- package/dist/es2019/view/CardWithUrl/loader.js +1 -1
- package/dist/es2019/view/EmbedCard/components/rovo-actions-footer/index.js +4 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-error/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-item/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-items-group/index.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/rovo-chat-utils/index.js +5 -1
- package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/block-card-google-doc-with-summarize-rovo-action--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png +2 -2
- package/dist/esm/ssr.js +6 -2
- package/dist/esm/state/analytics/startUfoExperience.js +7 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/card-error-boundary/index.js +102 -3
- package/dist/esm/view/CardWithUrl/card-intersection-observer/index.js +88 -2
- package/dist/esm/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +38 -7
- package/dist/esm/view/CardWithUrl/loader.js +1 -1
- package/dist/esm/view/EmbedCard/components/rovo-actions-footer/index.js +4 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-error/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-item/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-items-group/index.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/rovo-chat-utils/index.js +5 -1
- package/dist/types/state/analytics/startUfoExperience.d.ts +6 -1
- package/dist/types/view/CardWithUrl/card-error-boundary/index.d.ts +4 -1
- package/package.json +4 -4
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React, { useCallback } from 'react';
|
|
2
|
+
import React, { useCallback, useEffect, useLayoutEffect, useRef } from 'react';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
|
+
import { getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
|
|
5
|
+
import { startUfoExperience } from '../../../state/analytics/startUfoExperience';
|
|
3
6
|
import useIntersectionObserver from '../../../state/hooks/use-intersection-observer';
|
|
4
7
|
import { useSmartLinkSeenEvent } from '../../../state/hooks/use-smart-link-seen-event';
|
|
8
|
+
import { clearMarks } from '../../../utils/clear-marks';
|
|
9
|
+
import { clearMeasures } from '../../../utils/clear-measures';
|
|
10
|
+
import { shouldSample } from '../../../utils/shouldSample';
|
|
5
11
|
import CardLoaderWrapper from '../card-loader-wrapper';
|
|
6
|
-
var
|
|
12
|
+
var withCardIntersectionObserverOld = function withCardIntersectionObserverOld(Component) {
|
|
7
13
|
return function (props) {
|
|
8
14
|
// TODO: NAVX-4682: Add feature parity to LazyIntersectionObserverCard for no lazy loading
|
|
9
15
|
var appearance = props.appearance,
|
|
@@ -39,4 +45,84 @@ var withCardIntersectionObserver = function withCardIntersectionObserver(Compone
|
|
|
39
45
|
})));
|
|
40
46
|
};
|
|
41
47
|
};
|
|
48
|
+
var withCardIntersectionObserverNew = function withCardIntersectionObserverNew(Component) {
|
|
49
|
+
return function (props) {
|
|
50
|
+
var appearance = props.appearance,
|
|
51
|
+
children = props.children,
|
|
52
|
+
id = props.id,
|
|
53
|
+
onErrorCallback = props.onError,
|
|
54
|
+
ui = props.ui,
|
|
55
|
+
_props$url2 = props.url,
|
|
56
|
+
url = _props$url2 === void 0 ? '' : _props$url2;
|
|
57
|
+
var hasStartedRenderedExperience = useRef(false);
|
|
58
|
+
|
|
59
|
+
// Unlike LazyIntersectionObserverCard, the content is rendered immediately
|
|
60
|
+
// (server rendered) and may reach its final state before intersecting, so the
|
|
61
|
+
// (sampled) rendered experience is started on mount instead of on intersection.
|
|
62
|
+
// Layout effects run before the content's passive effects (where the experience
|
|
63
|
+
// succeeds) and do not run on the server. The ref guards against StrictMode remounts.
|
|
64
|
+
// The start time is backdated to the active UFO interaction (page load / SPA transition)
|
|
65
|
+
// start, so the duration covers the time the card took to render since the interaction began.
|
|
66
|
+
useLayoutEffect(function () {
|
|
67
|
+
if (hasStartedRenderedExperience.current) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
hasStartedRenderedExperience.current = true;
|
|
71
|
+
if (shouldSample()) {
|
|
72
|
+
var _getActiveInteraction;
|
|
73
|
+
var interactionStartTime = (_getActiveInteraction = getActiveInteraction()) === null || _getActiveInteraction === void 0 ? void 0 : _getActiveInteraction.start;
|
|
74
|
+
startUfoExperience('smart-link-rendered', id || 'NULL', {
|
|
75
|
+
ssr: true,
|
|
76
|
+
timingStrategy: interactionStartTime !== undefined ? 'interaction-start' : 'render'
|
|
77
|
+
}, interactionStartTime);
|
|
78
|
+
}
|
|
79
|
+
// Only start once on mount
|
|
80
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
81
|
+
}, []);
|
|
82
|
+
useEffect(function () {
|
|
83
|
+
if (!id) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
// ComponentWillUnmount
|
|
87
|
+
return function () {
|
|
88
|
+
clearMarks(id);
|
|
89
|
+
clearMeasures(id);
|
|
90
|
+
};
|
|
91
|
+
}, [id]);
|
|
92
|
+
var _useSmartLinkSeenEven2 = useSmartLinkSeenEvent({
|
|
93
|
+
appearance: appearance,
|
|
94
|
+
children: children,
|
|
95
|
+
id: id,
|
|
96
|
+
ui: ui,
|
|
97
|
+
url: url
|
|
98
|
+
}),
|
|
99
|
+
onIntersecting = _useSmartLinkSeenEven2.onIntersecting,
|
|
100
|
+
onStatusSettled = _useSmartLinkSeenEven2.onStatusSettled;
|
|
101
|
+
var onError = useCallback(function (data) {
|
|
102
|
+
if (data !== null && data !== void 0 && data.status) {
|
|
103
|
+
onStatusSettled(data.status);
|
|
104
|
+
}
|
|
105
|
+
onErrorCallback === null || onErrorCallback === void 0 || onErrorCallback(data);
|
|
106
|
+
}, [onStatusSettled, onErrorCallback]);
|
|
107
|
+
var ref = useIntersectionObserver({
|
|
108
|
+
onIntersecting: onIntersecting
|
|
109
|
+
});
|
|
110
|
+
return /*#__PURE__*/React.createElement(CardLoaderWrapper, {
|
|
111
|
+
appearance: props.appearance,
|
|
112
|
+
ref: ref
|
|
113
|
+
}, /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
114
|
+
onError: onError
|
|
115
|
+
})));
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
var withCardIntersectionObserver = function withCardIntersectionObserver(Component) {
|
|
119
|
+
var WithCardIntersectionObserverOld = withCardIntersectionObserverOld(Component);
|
|
120
|
+
var WithCardIntersectionObserverNew = withCardIntersectionObserverNew(Component);
|
|
121
|
+
return function (props) {
|
|
122
|
+
if (fg('platform_smartlink_cardssr_missing_events')) {
|
|
123
|
+
return /*#__PURE__*/React.createElement(WithCardIntersectionObserverNew, props);
|
|
124
|
+
}
|
|
125
|
+
return /*#__PURE__*/React.createElement(WithCardIntersectionObserverOld, props);
|
|
126
|
+
};
|
|
127
|
+
};
|
|
42
128
|
export default withCardIntersectionObserver;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import React, { useCallback, useState } from 'react';
|
|
4
|
+
import { useSmartLinkContext } from '@atlaskit/link-provider/use-smart-link-context';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
6
|
import { startUfoExperience } from '../../../state/analytics/startUfoExperience';
|
|
5
7
|
import useIntersectionObserver from '../../../state/hooks/use-intersection-observer';
|
|
6
8
|
import { useSmartLinkSeenEvent } from '../../../state/hooks/use-smart-link-seen-event';
|
|
@@ -9,6 +11,9 @@ import { shouldSample } from '../../../utils/shouldSample';
|
|
|
9
11
|
import CardLoaderWrapper from '../card-loader-wrapper';
|
|
10
12
|
import { CardWithUrlContent } from '../component';
|
|
11
13
|
import { LoadingCardLink } from './LoadingCardLink';
|
|
14
|
+
|
|
15
|
+
/** Statuses that came from a resolver response, so the card can show them again without loading. */
|
|
16
|
+
var SETTLED_STATUSES = new Set(['resolved', 'unauthorized', 'forbidden', 'not_found']);
|
|
12
17
|
export var LazyIntersectionObserverCard = function LazyIntersectionObserverCard(props) {
|
|
13
18
|
var _useState = useState(false),
|
|
14
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -23,6 +28,21 @@ export var LazyIntersectionObserverCard = function LazyIntersectionObserverCard(
|
|
|
23
28
|
onErrorCallback = props.onError,
|
|
24
29
|
ui = props.ui,
|
|
25
30
|
url = props.url;
|
|
31
|
+
var _useSmartLinkContext = useSmartLinkContext(),
|
|
32
|
+
store = _useSmartLinkContext.store;
|
|
33
|
+
// A link the store has already settled (e.g. a remounted card) renders at once, not as the
|
|
34
|
+
// loading placeholder, so its rendered experience starts before the card can succeed it.
|
|
35
|
+
var _useState5 = useState(function () {
|
|
36
|
+
var _store$getState$url;
|
|
37
|
+
var status = store === null || store === void 0 || (_store$getState$url = store.getState()[url]) === null || _store$getState$url === void 0 ? void 0 : _store$getState$url.status;
|
|
38
|
+
var settled = !!status && SETTLED_STATUSES.has(status) && fg('platform_smartlink_render_settled_link_on_mount');
|
|
39
|
+
if (settled && shouldSendRenderedUFOEvent) {
|
|
40
|
+
startUfoExperience('smart-link-rendered', id);
|
|
41
|
+
}
|
|
42
|
+
return settled;
|
|
43
|
+
}),
|
|
44
|
+
_useState6 = _slicedToArray(_useState5, 1),
|
|
45
|
+
isSettledOnMount = _useState6[0];
|
|
26
46
|
var prefetch = usePrefetch(url, appearance);
|
|
27
47
|
var ComponentObserver = appearance === 'inline' ? 'span' : 'div';
|
|
28
48
|
var _useSmartLinkSeenEven = useSmartLinkSeenEvent({
|
|
@@ -42,7 +62,7 @@ export var LazyIntersectionObserverCard = function LazyIntersectionObserverCard(
|
|
|
42
62
|
}, [onStatusSettled, onErrorCallback]);
|
|
43
63
|
var onIntersection = useCallback(function (isIntersecting) {
|
|
44
64
|
if (isIntersecting) {
|
|
45
|
-
if (shouldSendRenderedUFOEvent) {
|
|
65
|
+
if (shouldSendRenderedUFOEvent && !isSettledOnMount) {
|
|
46
66
|
startUfoExperience('smart-link-rendered', id);
|
|
47
67
|
}
|
|
48
68
|
onSeenIntersecting();
|
|
@@ -50,15 +70,26 @@ export var LazyIntersectionObserverCard = function LazyIntersectionObserverCard(
|
|
|
50
70
|
} else {
|
|
51
71
|
prefetch();
|
|
52
72
|
}
|
|
53
|
-
}, [id, onSeenIntersecting, prefetch, shouldSendRenderedUFOEvent]);
|
|
73
|
+
}, [id, isSettledOnMount, onSeenIntersecting, prefetch, shouldSendRenderedUFOEvent]);
|
|
54
74
|
var ref = useIntersectionObserver({
|
|
55
75
|
onIntersection: onIntersection
|
|
56
76
|
});
|
|
57
|
-
var content
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
77
|
+
var content;
|
|
78
|
+
if (isSettledOnMount) {
|
|
79
|
+
content = /*#__PURE__*/React.createElement(ComponentObserver, {
|
|
80
|
+
ref: ref
|
|
81
|
+
}, /*#__PURE__*/React.createElement(CardWithUrlContent, _extends({}, props, {
|
|
82
|
+
onError: onError
|
|
83
|
+
})));
|
|
84
|
+
} else if (isIntersected) {
|
|
85
|
+
content = /*#__PURE__*/React.createElement(CardWithUrlContent, _extends({}, props, {
|
|
86
|
+
onError: onError
|
|
87
|
+
}));
|
|
88
|
+
} else {
|
|
89
|
+
content = /*#__PURE__*/React.createElement(ComponentObserver, {
|
|
90
|
+
ref: ref
|
|
91
|
+
}, /*#__PURE__*/React.createElement(LoadingCardLink, props));
|
|
92
|
+
}
|
|
62
93
|
return /*#__PURE__*/React.createElement(CardLoaderWrapper, {
|
|
63
94
|
appearance: appearance
|
|
64
95
|
}, content);
|
|
@@ -83,7 +83,7 @@ export function CardWithURLRenderer(props) {
|
|
|
83
83
|
// Likewise, chunk loading errors are not caused by a failure of smart-card rendering.
|
|
84
84
|
if (error.name === 'ChunkLoadError') {
|
|
85
85
|
fireEvent('operational.smartLink.chunkLoadFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
|
|
86
|
-
display: appearance,
|
|
86
|
+
display: fg('platform_smartlink_cardssr_missing_events') ? isFlexibleUi ? 'flexible' : appearance : appearance,
|
|
87
87
|
error: error,
|
|
88
88
|
errorInfo: errorInfo,
|
|
89
89
|
definitionId: null
|
|
@@ -10,6 +10,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
10
10
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
11
11
|
import { useIntl } from 'react-intl';
|
|
12
12
|
import Button from '@atlaskit/button/default/button';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
13
14
|
import { WidthObserver } from '@atlaskit/width-detector/width-observer';
|
|
14
15
|
import useInvokeClientAction from '../../../../state/hooks/use-invoke-client-action';
|
|
15
16
|
import useRovoChat from '../../../../state/hooks/use-rovo-chat';
|
|
@@ -104,7 +105,9 @@ var EmbedRovoActionsFooter = function EmbedRovoActionsFooter(_ref2) {
|
|
|
104
105
|
var isPrimaryAction = actions.length === 0;
|
|
105
106
|
// The primary action normally uses the branded AI icon. Visualize keeps its own
|
|
106
107
|
// chart icon so the action stays recognisable, including in the icon-only view.
|
|
107
|
-
|
|
108
|
+
// With platform_sl_rovo_summarize_icon_consistency on, every action keeps its own
|
|
109
|
+
// prompt icon so Summarize matches the inline and block cards.
|
|
110
|
+
var shouldUseBrandedIcon = fg('platform_sl_rovo_summarize_icon_consistency') ? false : isPrimaryAction && promptKey !== RovoChatPromptKey.VISUALIZE;
|
|
108
111
|
actions.push( /*#__PURE__*/React.createElement(RovoPromptButton, {
|
|
109
112
|
hideContent: isPrimaryAction && shouldHidePrimaryActionContent,
|
|
110
113
|
icon: shouldUseBrandedIcon ? /*#__PURE__*/React.createElement(AIEditIcon, null) : promptAction.icon,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import DropdownItem from '@atlaskit/dropdown-menu/dropdown-
|
|
2
|
+
import { DropdownItem } from '@atlaskit/dropdown-menu/dropdown-item';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
4
|
import { handleOnClick } from '../../../../../../utils/handle-on-click';
|
|
5
5
|
var ActionDropdownItem = function ActionDropdownItem(_ref) {
|
|
@@ -14,7 +14,7 @@ import { FormattedMessage } from 'react-intl';
|
|
|
14
14
|
import { di } from 'react-magnetic-di';
|
|
15
15
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
16
16
|
import IconButton from '@atlaskit/button/icon/button';
|
|
17
|
-
import DropdownMenu from '@atlaskit/dropdown-menu/dropdown-menu';
|
|
17
|
+
import { DropdownMenu } from '@atlaskit/dropdown-menu/dropdown-menu';
|
|
18
18
|
import MoreIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
19
19
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
20
20
|
import { ActionName, CardDisplay, SmartLinkSize } from '../../../../../constants';
|
|
@@ -3,7 +3,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
|
-
import DropdownMenu from '@atlaskit/dropdown-menu/dropdown-menu';
|
|
6
|
+
import { DropdownMenu } from '@atlaskit/dropdown-menu/dropdown-menu';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { useAnalyticsEvents } from '../../../../../../../common/analytics/generated/use-analytics-events';
|
|
9
9
|
import extractLozengeActionItems from '../../../../../../../extractors/action/extract-lozenge-action-items';
|
|
@@ -4,8 +4,8 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { Fragment, useCallback, useMemo } from 'react';
|
|
6
6
|
import { FormattedMessage } from 'react-intl';
|
|
7
|
-
import DropdownItem from '@atlaskit/dropdown-menu/dropdown-
|
|
8
|
-
import DropdownItemGroup from '@atlaskit/dropdown-menu/dropdown-
|
|
7
|
+
import { DropdownItem } from '@atlaskit/dropdown-menu/dropdown-item';
|
|
8
|
+
import { DropdownItemGroup } from '@atlaskit/dropdown-menu/dropdown-item-group';
|
|
9
9
|
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
11
|
import { Pressable } from '@atlaskit/primitives/compiled/pressable';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import DropdownItem from '@atlaskit/dropdown-menu/dropdown-
|
|
2
|
+
import { DropdownItem } from '@atlaskit/dropdown-menu/dropdown-item';
|
|
3
3
|
import Lozenge from '@atlaskit/lozenge/new/lozenge';
|
|
4
4
|
var LozengeActionItem = function LozengeActionItem(_ref) {
|
|
5
5
|
var appearance = _ref.appearance,
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import DropdownItemGroup from '@atlaskit/dropdown-menu/dropdown-
|
|
6
|
+
import { DropdownItemGroup } from '@atlaskit/dropdown-menu/dropdown-item-group';
|
|
7
7
|
import LozengeActionItem from '../lozenge-action-item';
|
|
8
8
|
var dropdownItemGroupStyles = null;
|
|
9
9
|
var LozengeActionItemsGroup = function LozengeActionItemsGroup(_ref) {
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
var PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "46.13.
|
|
15
|
+
packageVersion: "46.13.14",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -8,6 +8,7 @@ import AiGenerativeTextSummaryIcon from '@atlaskit/icon/core/ai-generative-text-
|
|
|
8
8
|
import ChartBarIcon from '@atlaskit/icon/core/chart-bar';
|
|
9
9
|
import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
|
|
10
10
|
import { RovoIcon } from '@atlaskit/logo/rovo/icon';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
12
|
import { CardDisplay } from '../../../constants';
|
|
12
13
|
import { messages } from '../../../messages';
|
|
13
14
|
import AiChapterIcon from '../../FlexibleCard/assets/ai-chapter-icon';
|
|
@@ -70,7 +71,10 @@ export var getPromptAction = function getPromptAction(_ref) {
|
|
|
70
71
|
ignoreTag: true
|
|
71
72
|
});
|
|
72
73
|
return {
|
|
73
|
-
icon: /*#__PURE__*/React.createElement(
|
|
74
|
+
icon: fg('platform_sl_rovo_summarize_icon_consistency') ? /*#__PURE__*/React.createElement(AiGenerativeTextSummaryIcon, {
|
|
75
|
+
label: label_summarize,
|
|
76
|
+
size: iconSize
|
|
77
|
+
}) : /*#__PURE__*/React.createElement(AiChatIcon, {
|
|
74
78
|
label: label_summarize,
|
|
75
79
|
size: iconSize
|
|
76
80
|
}),
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { CustomData } from '@atlaskit/ufo/types';
|
|
2
2
|
import type { UfoExperienceName } from './UfoExperienceName';
|
|
3
|
-
export declare const startUfoExperience: (experienceName: UfoExperienceName, id: string, properties?: CustomData
|
|
3
|
+
export declare const startUfoExperience: (experienceName: UfoExperienceName, id: string, properties?: CustomData,
|
|
4
|
+
/**
|
|
5
|
+
* Optional start time (`performance.now()` based). Defaults to now.
|
|
6
|
+
* Only applied when `platform_smartlink_cardssr_missing_events` is enabled.
|
|
7
|
+
*/
|
|
8
|
+
startTime?: number) => void;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CardProps } from '../../Card';
|
|
3
3
|
type CardErrorBoundaryProps = CardProps & Required<Pick<CardProps, 'id' | 'url'>>;
|
|
4
|
-
|
|
4
|
+
type CardErrorBoundaryNewProps = CardErrorBoundaryProps & {
|
|
5
|
+
isFlexibleCard?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const CardErrorBoundary: ({ isFlexibleCard, ...props }: React.PropsWithChildren<CardErrorBoundaryNewProps>) => React.JSX.Element;
|
|
5
8
|
export default CardErrorBoundary;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "46.13.
|
|
3
|
+
"version": "46.13.15",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@atlaskit/checkbox": "^19.3.0",
|
|
52
52
|
"@atlaskit/css": "^1.1.0",
|
|
53
53
|
"@atlaskit/docs": "^12.3.0",
|
|
54
|
-
"@atlaskit/dropdown-menu": "^21.
|
|
54
|
+
"@atlaskit/dropdown-menu": "^21.3.0",
|
|
55
55
|
"@atlaskit/embedded-confluence": "^6.4.0",
|
|
56
56
|
"@atlaskit/feature-gate-js-client": "^8.0.0",
|
|
57
57
|
"@atlaskit/flag": "^19.0.0",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
"@atlaskit/textfield": "^10.3.0",
|
|
95
95
|
"@atlaskit/theme": "^28.2.0",
|
|
96
96
|
"@atlaskit/tile": "^5.0.0",
|
|
97
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
98
|
-
"@atlaskit/tokens": "^20.
|
|
97
|
+
"@atlaskit/tmp-editor-statsig": "^260.0.0",
|
|
98
|
+
"@atlaskit/tokens": "^20.11.0",
|
|
99
99
|
"@atlaskit/tooltip": "^24.4.0",
|
|
100
100
|
"@atlaskit/top-layer": "^7.1.0",
|
|
101
101
|
"@atlaskit/ufo": "^2.0.0",
|