@atlaskit/smart-card 26.59.1 → 26.61.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 +40 -0
- package/dist/cjs/extractors/common/icon/extractIcon.js +19 -1
- package/dist/cjs/extractors/common/icon/index.js +7 -0
- package/dist/cjs/extractors/embed/index.js +26 -1
- package/dist/cjs/extractors/flexible/actions/extract-ai-summary-action.js +2 -2
- package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +33 -4
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +2 -1
- package/dist/cjs/utils/{get-is-ai-summary-enabled.js → ai-summary.js} +21 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/flexible/utils/index.js +8 -0
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +4 -51
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +2 -0
- package/dist/cjs/view/EmbedCard/components/styled.js +5 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +0 -3
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +22 -14
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/utils.js +32 -0
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/goal-icon/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/projects-icon/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +67 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +23 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +5 -24
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +4 -4
- package/dist/cjs/view/FlexibleCard/components/{blocks/ai-summary-block/ai-event-error-viewed/index.js → common/ai-summary/ai-event-error-viewed.js} +1 -1
- package/dist/cjs/view/FlexibleCard/components/{blocks/ai-summary-block/ai-state-indicator → common/ai-summary}/ai-learn-more-anchor.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/{blocks/ai-summary-block/ai-motion-wrapper → common/motion-wrapper}/index.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/common/motion-wrapper/types.js +5 -0
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +2 -2
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +1 -7
- package/dist/cjs/view/HoverCard/utils.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/ai-icon/index.js +23 -20
- package/dist/cjs/view/common/ai-summary/index.js +1 -0
- package/dist/es2019/extractors/common/icon/extractIcon.js +21 -1
- package/dist/es2019/extractors/common/icon/index.js +1 -0
- package/dist/es2019/extractors/embed/index.js +28 -2
- package/dist/es2019/extractors/flexible/actions/extract-ai-summary-action.js +1 -1
- package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +34 -3
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -0
- package/dist/es2019/utils/ai-summary.js +25 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/flexible/utils/index.js +8 -0
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +2 -44
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +2 -0
- package/dist/es2019/view/EmbedCard/components/styled.js +8 -2
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +0 -3
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +21 -13
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/utils.js +24 -0
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/goal-icon/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/projects-icon/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +61 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +19 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +3 -22
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +4 -4
- package/dist/es2019/view/FlexibleCard/components/{blocks/ai-summary-block/ai-event-error-viewed/index.js → common/ai-summary/ai-event-error-viewed.js} +1 -1
- package/dist/es2019/view/FlexibleCard/components/{blocks/ai-summary-block/ai-state-indicator → common/ai-summary}/ai-learn-more-anchor.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/{blocks/ai-summary-block/ai-motion-wrapper → common/motion-wrapper}/index.js +2 -2
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +1 -1
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +1 -7
- package/dist/es2019/view/HoverCard/utils.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/ai-icon/index.js +104 -99
- package/dist/es2019/view/common/ai-summary/index.js +1 -0
- package/dist/esm/extractors/common/icon/extractIcon.js +19 -1
- package/dist/esm/extractors/common/icon/index.js +1 -0
- package/dist/esm/extractors/embed/index.js +27 -2
- package/dist/esm/extractors/flexible/actions/extract-ai-summary-action.js +1 -1
- package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +33 -3
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +2 -1
- package/dist/esm/utils/{get-is-ai-summary-enabled.js → ai-summary.js} +20 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/flexible/utils/index.js +8 -0
- package/dist/esm/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +3 -50
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +2 -0
- package/dist/esm/view/EmbedCard/components/styled.js +5 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +0 -3
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +22 -14
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/utils.js +25 -0
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/goal-icon/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/projects-icon/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +60 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/types.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +23 -4
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-done.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +5 -24
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +4 -4
- package/dist/esm/view/FlexibleCard/components/{blocks/ai-summary-block/ai-event-error-viewed/index.js → common/ai-summary/ai-event-error-viewed.js} +1 -1
- package/dist/esm/view/FlexibleCard/components/{blocks/ai-summary-block/ai-state-indicator → common/ai-summary}/ai-learn-more-anchor.js +1 -1
- package/dist/esm/view/FlexibleCard/components/{blocks/ai-summary-block/ai-motion-wrapper → common/motion-wrapper}/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/common/motion-wrapper/types.js +1 -0
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +1 -1
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +1 -7
- package/dist/esm/view/HoverCard/utils.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/ai-icon/index.js +23 -20
- package/dist/esm/view/common/ai-summary/index.js +1 -0
- package/dist/types/extractors/common/icon/index.d.ts +1 -0
- package/dist/types/extractors/embed/index.d.ts +3 -3
- package/dist/types/extractors/flexible/actions/extract-ai-summary-action.d.ts +3 -3
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/index.d.ts +1 -1
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +1 -1
- package/dist/types/state/hooks/use-ai-summary/index.d.ts +1 -1
- package/dist/types/utils/ai-summary.d.ts +8 -0
- package/dist/types/view/BlockCard/views/flexible/utils/index.d.ts +2 -2
- package/dist/types/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.d.ts +1 -4
- package/dist/types/view/EmbedCard/components/ExpandedFrame.d.ts +2 -2
- package/dist/types/view/EmbedCard/components/styled.d.ts +1 -0
- package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/action-icon/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +11 -1
- package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.d.ts +3 -3
- package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/utils.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/actions/follow-action/goal-icon/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/follow-action/projects-icon/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/action-block/action-footer/index.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-block/action-footer/types.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/common/motion-wrapper/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/{blocks/ai-summary-block/ai-motion-wrapper → common/motion-wrapper}/types.d.ts +1 -1
- package/dist/types/view/HoverCard/components/HoverCardContent.d.ts +2 -2
- package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +3 -3
- package/dist/types/view/common/ai-summary/index.d.ts +1 -1
- package/dist/types-ts4.5/extractors/common/icon/index.d.ts +1 -0
- package/dist/types-ts4.5/extractors/embed/index.d.ts +3 -3
- package/dist/types-ts4.5/extractors/flexible/actions/extract-ai-summary-action.d.ts +3 -3
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/index.d.ts +1 -1
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +1 -1
- package/dist/types-ts4.5/state/hooks/use-ai-summary/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/ai-summary.d.ts +8 -0
- package/dist/types-ts4.5/view/BlockCard/views/flexible/utils/index.d.ts +2 -2
- package/dist/types-ts4.5/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.d.ts +1 -4
- package/dist/types-ts4.5/view/EmbedCard/components/ExpandedFrame.d.ts +2 -2
- package/dist/types-ts4.5/view/EmbedCard/components/styled.d.ts +1 -0
- package/dist/types-ts4.5/view/EmbedCard/views/ResolvedView.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-icon/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +11 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.d.ts +3 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/utils.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/goal-icon/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/projects-icon/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/action-footer/index.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/action-footer/types.d.ts +8 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/common/motion-wrapper/index.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/{blocks/ai-summary-block/ai-motion-wrapper → common/motion-wrapper}/types.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/HoverCardContent.d.ts +2 -2
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +3 -3
- package/dist/types-ts4.5/view/common/ai-summary/index.d.ts +1 -1
- package/package.json +9 -9
- package/dist/es2019/utils/get-is-ai-summary-enabled.js +0 -5
- package/dist/types/utils/get-is-ai-summary-enabled.d.ts +0 -2
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/index.d.ts +0 -4
- package/dist/types-ts4.5/utils/get-is-ai-summary-enabled.d.ts +0 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/index.d.ts +0 -4
- /package/dist/cjs/view/FlexibleCard/components/blocks/{ai-summary-block/ai-motion-wrapper → action-block/action-footer}/types.js +0 -0
- /package/dist/es2019/view/FlexibleCard/components/blocks/{ai-summary-block/ai-motion-wrapper → action-block/action-footer}/types.js +0 -0
- /package/dist/{esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper → es2019/view/FlexibleCard/components/common/motion-wrapper}/types.js +0 -0
- /package/dist/types/view/FlexibleCard/components/{blocks/ai-summary-block/ai-event-error-viewed/index.d.ts → common/ai-summary/ai-event-error-viewed.d.ts} +0 -0
- /package/dist/types/view/FlexibleCard/components/{blocks/ai-summary-block/ai-state-indicator → common/ai-summary}/ai-learn-more-anchor.d.ts +0 -0
- /package/dist/types-ts4.5/view/FlexibleCard/components/{blocks/ai-summary-block/ai-event-error-viewed/index.d.ts → common/ai-summary/ai-event-error-viewed.d.ts} +0 -0
- /package/dist/types-ts4.5/view/FlexibleCard/components/{blocks/ai-summary-block/ai-state-indicator → common/ai-summary}/ai-learn-more-anchor.d.ts +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
+
import { getAISummaryErrorMessage } from '../../../../../utils/ai-summary';
|
|
5
|
+
import AIEventErrorViewed from '../../common/ai-summary/ai-event-error-viewed';
|
|
6
|
+
import AILearnMoreAnchor from '../../common/ai-summary/ai-learn-more-anchor';
|
|
7
|
+
export var getErrorMessage = function getErrorMessage(error) {
|
|
8
|
+
var _getAISummaryErrorMes = getAISummaryErrorMessage(error),
|
|
9
|
+
message = _getAISummaryErrorMes.message,
|
|
10
|
+
url = _getAISummaryErrorMes.url;
|
|
11
|
+
return {
|
|
12
|
+
appearance: 'error',
|
|
13
|
+
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AIEventErrorViewed, {
|
|
14
|
+
reason: error
|
|
15
|
+
}), /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, message, {
|
|
16
|
+
values: {
|
|
17
|
+
a: function a(chunks) {
|
|
18
|
+
return /*#__PURE__*/React.createElement(AILearnMoreAnchor, {
|
|
19
|
+
href: url
|
|
20
|
+
}, chunks);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
})))
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -12,7 +12,7 @@ var GoalGlyph = function GoalGlyph(props) {
|
|
|
12
12
|
fillRule: "evenodd",
|
|
13
13
|
clipRule: "evenodd",
|
|
14
14
|
d: "M12.6667 8C12.6667 10.5773 10.5773 12.6667 8 12.6667C5.42267 12.6667 3.33333 10.5773 3.33333 8C3.33333 5.42267 5.42267 3.33333 8 3.33333C10.5773 3.33333 12.6667 5.42267 12.6667 8ZM14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629 4.68629 2 8 2C11.3137 2 14 4.68629 14 8ZM9.33333 8C9.33333 8.73638 8.73638 9.33333 8 9.33333C7.26362 9.33333 6.66667 8.73638 6.66667 8C6.66667 7.26362 7.26362 6.66667 8 6.66667C8.73638 6.66667 9.33333 7.26362 9.33333 8ZM10.6667 8C10.6667 9.47276 9.47276 10.6667 8 10.6667C6.52724 10.6667 5.33333 9.47276 5.33333 8C5.33333 6.52724 6.52724 5.33333 8 5.33333C9.47276 5.33333 10.6667 6.52724 10.6667 8Z",
|
|
15
|
-
fill: "#
|
|
15
|
+
fill: "var(--ds-icon, #44546F)"
|
|
16
16
|
}));
|
|
17
17
|
};
|
|
18
18
|
export var GoalIcon = function GoalIcon(props) {
|
|
@@ -12,7 +12,7 @@ var ProjectsGlyph = function ProjectsGlyph(props) {
|
|
|
12
12
|
fillRule: "evenodd",
|
|
13
13
|
clipRule: "evenodd",
|
|
14
14
|
d: "M9.88573 4.00002C9.70892 4.00002 9.53935 4.07026 9.41433 4.19528L6.97282 6.63678L4.20525 6.94429C4.05479 6.96101 3.91451 7.02844 3.80746 7.13548L3.60959 7.33335L4.35367 8.07743C4.6791 8.40287 4.6791 8.93051 4.35367 9.25594L3.47152 10.1381C3.21117 10.3984 2.78906 10.3984 2.52871 10.1381C2.26836 9.87774 2.26836 9.45563 2.52871 9.19528L3.0573 8.66669L2.43108 8.04046C2.04055 7.64993 2.04055 7.01677 2.43108 6.62625L2.86465 6.19267C3.18578 5.87154 3.60664 5.66927 4.05801 5.61911L6.36073 5.36326L8.47152 3.25247C8.84659 2.8774 9.3553 2.66669 9.88573 2.66669H12.0001C12.7365 2.66669 13.3334 3.26364 13.3334 4.00002V6.1144C13.3334 6.64483 13.1227 7.15354 12.7477 7.52862L10.6369 9.6394L10.381 11.9421C10.3309 12.3935 10.1286 12.8143 9.80746 13.1355L9.37389 13.5691C8.98336 13.9596 8.3502 13.9596 7.95967 13.5691L7.33345 12.9428L6.80485 13.4714C6.5445 13.7318 6.12239 13.7318 5.86204 13.4714C5.60169 13.2111 5.60169 12.789 5.86204 12.5286L6.74419 11.6465C7.06963 11.321 7.59726 11.321 7.9227 11.6465L8.66678 12.3905L8.86466 12.1927C8.9717 12.0856 9.03912 11.9453 9.05584 11.7949L9.36335 9.02731L11.8049 6.58581C11.9299 6.46078 12.0001 6.29121 12.0001 6.1144V4.00002H9.88573ZM5.80486 10.1953C6.06521 10.4556 6.06521 10.8777 5.80486 11.1381L3.80486 13.1381C3.54451 13.3984 3.1224 13.3984 2.86205 13.1381C2.6017 12.8777 2.6017 12.4556 2.86205 12.1953L4.86205 10.1953C5.1224 9.93493 5.54451 9.93493 5.80486 10.1953ZM10.0001 6.66669C10.3683 6.66669 10.6668 6.36821 10.6668 6.00002C10.6668 5.63183 10.3683 5.33335 10.0001 5.33335C9.63193 5.33335 9.33346 5.63183 9.33346 6.00002C9.33346 6.36821 9.63193 6.66669 10.0001 6.66669Z",
|
|
15
|
-
fill: "#
|
|
15
|
+
fill: "var(--ds-icon, #44546F)"
|
|
16
16
|
}));
|
|
17
17
|
};
|
|
18
18
|
export var ProjectsIcon = function ProjectsIcon(props) {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
2
|
+
import { Box, Inline, xcss } from '@atlaskit/primitives';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import MotionWrapper from '../../../common/motion-wrapper';
|
|
5
|
+
var containerStyles = xcss({
|
|
6
|
+
all: 'unset',
|
|
7
|
+
borderRadius: 'border.radius',
|
|
8
|
+
margin: 'space.100',
|
|
9
|
+
lineHeight: '20px',
|
|
10
|
+
padding: 'space.050',
|
|
11
|
+
paddingInline: 'space.100',
|
|
12
|
+
width: '100%',
|
|
13
|
+
':empty': {
|
|
14
|
+
display: 'none'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
var errorStyles = xcss({
|
|
18
|
+
backgroundColor: 'color.background.danger'
|
|
19
|
+
});
|
|
20
|
+
var titleStyles = xcss({
|
|
21
|
+
color: 'color.text.subtle',
|
|
22
|
+
fontSize: '12px',
|
|
23
|
+
fontStyle: 'normal',
|
|
24
|
+
fontWeight: '400',
|
|
25
|
+
lineHeight: '16px'
|
|
26
|
+
});
|
|
27
|
+
var getIcon = function getIcon(appearance) {
|
|
28
|
+
switch (appearance) {
|
|
29
|
+
case 'error':
|
|
30
|
+
return /*#__PURE__*/React.createElement(ErrorIcon, {
|
|
31
|
+
primaryColor: "var(--ds-icon-danger, #C9372C)",
|
|
32
|
+
label: "Error",
|
|
33
|
+
size: "small",
|
|
34
|
+
testId: "action-error-icon"
|
|
35
|
+
});
|
|
36
|
+
default:
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
export var ActionFooter = function ActionFooter(_ref) {
|
|
41
|
+
var message = _ref.message,
|
|
42
|
+
testId = _ref.testId;
|
|
43
|
+
if (!message) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
47
|
+
testId: "".concat(testId, "-footer"),
|
|
48
|
+
xcss: [containerStyles, message.appearance === 'error' && errorStyles]
|
|
49
|
+
}, /*#__PURE__*/React.createElement(MotionWrapper, {
|
|
50
|
+
isFadeIn: true,
|
|
51
|
+
show: true,
|
|
52
|
+
showTransition: true
|
|
53
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
54
|
+
alignBlock: "start",
|
|
55
|
+
grow: "fill",
|
|
56
|
+
space: "space.025"
|
|
57
|
+
}, message.icon || getIcon(message.appearance), /*#__PURE__*/React.createElement(Box, {
|
|
58
|
+
xcss: titleStyles
|
|
59
|
+
}, message.title))));
|
|
60
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
1
2
|
/** @jsx jsx */
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { xcss } from '@atlaskit/primitives';
|
|
4
|
-
import { useMemo } from 'react';
|
|
5
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
5
6
|
import { SmartLinkSize } from '../../../../../constants';
|
|
6
7
|
import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
7
8
|
import * as Actions from '../../actions';
|
|
8
9
|
import { getPrimitivesPaddingSpaceBySize } from '../../utils';
|
|
10
|
+
import { ActionFooter } from './action-footer';
|
|
11
|
+
import { di } from 'react-magnetic-di';
|
|
9
12
|
var ignoreContainerPaddingStyles = css({
|
|
10
13
|
display: 'flex',
|
|
11
14
|
flexDirection: 'column',
|
|
@@ -38,7 +41,18 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
38
41
|
testId = _ref$testId === void 0 ? 'smart-block-action' : _ref$testId;
|
|
39
42
|
var context = useFlexibleUiContext();
|
|
40
43
|
var ui = useFlexibleUiOptionContext();
|
|
44
|
+
var _useState = useState(),
|
|
45
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
+
message = _useState2[0],
|
|
47
|
+
setMessage = _useState2[1];
|
|
41
48
|
var padding = !(ui !== null && ui !== void 0 && ui.hidePadding) ? getPrimitivesPaddingSpaceBySize((ui === null || ui === void 0 ? void 0 : ui.size) || SmartLinkSize.Medium) : undefined;
|
|
49
|
+
var _onClick = useCallback(function (name) {
|
|
50
|
+
setMessage(undefined);
|
|
51
|
+
onClickCallback === null || onClickCallback === void 0 || onClickCallback(name);
|
|
52
|
+
}, [onClickCallback]);
|
|
53
|
+
var onError = useCallback(function (error) {
|
|
54
|
+
setMessage(error);
|
|
55
|
+
}, []);
|
|
42
56
|
var actions = useMemo(function () {
|
|
43
57
|
if (!(context !== null && context !== void 0 && context.actions)) {
|
|
44
58
|
return;
|
|
@@ -52,19 +66,24 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
52
66
|
spaceInline: spaceInline,
|
|
53
67
|
key: name,
|
|
54
68
|
onClick: function onClick() {
|
|
55
|
-
return
|
|
69
|
+
return _onClick(name);
|
|
56
70
|
},
|
|
71
|
+
onError: onError,
|
|
57
72
|
size: size,
|
|
58
73
|
xcss: xcss({
|
|
59
74
|
paddingInline: padding
|
|
60
75
|
})
|
|
61
76
|
}) : null;
|
|
62
77
|
});
|
|
63
|
-
}, [context === null || context === void 0 ? void 0 : context.actions,
|
|
78
|
+
}, [context === null || context === void 0 ? void 0 : context.actions, _onClick, onError, padding, size, spaceInline]);
|
|
64
79
|
return actions ? jsx("div", {
|
|
65
80
|
css: ignoreContainerPaddingStyles,
|
|
66
81
|
ref: blockRef,
|
|
67
82
|
"data-testid": testId
|
|
68
|
-
}, actions
|
|
83
|
+
}, actions, jsx(ActionFooter, {
|
|
84
|
+
message: message,
|
|
85
|
+
paddingInline: padding,
|
|
86
|
+
testId: testId
|
|
87
|
+
})) : null;
|
|
69
88
|
};
|
|
70
89
|
export default ActionBlock;
|
|
@@ -11,7 +11,7 @@ import { messages } from '../../../../../../messages';
|
|
|
11
11
|
import AIIcon from '../../../../../common/ai-icon';
|
|
12
12
|
import AIIndicatorTooltip from './ai-indicator-tooltip';
|
|
13
13
|
import AIIndicatorContainer from './ai-indicator-container';
|
|
14
|
-
import AILearnMoreAnchor from '
|
|
14
|
+
import AILearnMoreAnchor from '../../../common/ai-summary/ai-learn-more-anchor';
|
|
15
15
|
var tooltipMsgStyles = xcss({
|
|
16
16
|
color: 'color.text',
|
|
17
17
|
fontSize: '14px',
|
|
@@ -3,10 +3,9 @@ import React from 'react';
|
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
5
5
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
6
|
-
import {
|
|
6
|
+
import { getAISummaryErrorMessage } from '../../../../../../utils/ai-summary';
|
|
7
|
+
import AILearnMoreAnchor from '../../../common/ai-summary/ai-learn-more-anchor';
|
|
7
8
|
import AIIndicatorContainer from './ai-indicator-container';
|
|
8
|
-
import AILearnMoreAnchor from './ai-learn-more-anchor';
|
|
9
|
-
import { CONTENT_URL_ACCEPTABLE_USE_POLICY, CONTENT_URL_AI_TROUBLESHOOTING } from '../../../../../../constants';
|
|
10
9
|
var contentStyles = xcss({
|
|
11
10
|
color: 'color.text.subtle',
|
|
12
11
|
fontSize: '11px',
|
|
@@ -27,31 +26,13 @@ var FormattedErrorMessage = function FormattedErrorMessage(_ref) {
|
|
|
27
26
|
}
|
|
28
27
|
}));
|
|
29
28
|
};
|
|
30
|
-
var getErrorMesssageProps = function getErrorMesssageProps(error) {
|
|
31
|
-
switch (error) {
|
|
32
|
-
case 'ACCEPTABLE_USE_VIOLATIONS':
|
|
33
|
-
return {
|
|
34
|
-
message: messages.ai_summary_error_acceptable_use_violation,
|
|
35
|
-
url: CONTENT_URL_ACCEPTABLE_USE_POLICY
|
|
36
|
-
};
|
|
37
|
-
case 'HIPAA_CONTENT_DETECTED':
|
|
38
|
-
return {
|
|
39
|
-
message: messages.ai_summary_error_hipaa_content_detected
|
|
40
|
-
};
|
|
41
|
-
default:
|
|
42
|
-
return {
|
|
43
|
-
message: messages.ai_summary_error_generic,
|
|
44
|
-
url: CONTENT_URL_AI_TROUBLESHOOTING
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
29
|
var AIStateError = function AIStateError(_ref2) {
|
|
49
30
|
var appearance = _ref2.appearance,
|
|
50
31
|
testId = _ref2.testId,
|
|
51
32
|
error = _ref2.error;
|
|
52
|
-
var
|
|
53
|
-
message =
|
|
54
|
-
url =
|
|
33
|
+
var _getAISummaryErrorMes = getAISummaryErrorMessage(error),
|
|
34
|
+
message = _getAISummaryErrorMes.message,
|
|
35
|
+
url = _getAISummaryErrorMes.url;
|
|
55
36
|
switch (appearance) {
|
|
56
37
|
case 'icon-only':
|
|
57
38
|
return null;
|
|
@@ -7,7 +7,7 @@ import { ActionName, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '.
|
|
|
7
7
|
import ActionGroup from '../../action-group';
|
|
8
8
|
import Block from '../../block';
|
|
9
9
|
import ElementGroup from '../../element-group';
|
|
10
|
-
import
|
|
10
|
+
import MotionWrapper from '../../../common/motion-wrapper';
|
|
11
11
|
import AIStateIndicator from '../ai-state-indicator';
|
|
12
12
|
import { renderElementItems } from '../../utils';
|
|
13
13
|
import { messages } from '../../../../../../messages';
|
|
@@ -16,7 +16,7 @@ import AIIcon from '../../../../../common/ai-icon';
|
|
|
16
16
|
import AISummary from '../../../../../common/ai-summary';
|
|
17
17
|
import { useAnalyticsEvents } from '../../../../../../common/analytics/generated/use-analytics-events';
|
|
18
18
|
import AIEventSummaryViewed from '../ai-event-summary-viewed';
|
|
19
|
-
import AIEventErrorViewed from '
|
|
19
|
+
import AIEventErrorViewed from '../../../common/ai-summary/ai-event-error-viewed';
|
|
20
20
|
import { di } from 'react-magnetic-di';
|
|
21
21
|
import { css } from '@emotion/react';
|
|
22
22
|
import FeatureDiscovery from '../feature-discovery';
|
|
@@ -28,7 +28,7 @@ export var AISummaryBlockErrorIndicator = function AISummaryBlockErrorIndicator(
|
|
|
28
28
|
error = _ref.error,
|
|
29
29
|
showTransition = _ref.showTransition,
|
|
30
30
|
testId = _ref.testId;
|
|
31
|
-
return /*#__PURE__*/React.createElement(
|
|
31
|
+
return /*#__PURE__*/React.createElement(MotionWrapper, {
|
|
32
32
|
isFadeIn: true,
|
|
33
33
|
show: showErrorIndicator,
|
|
34
34
|
showTransition: showTransition
|
|
@@ -140,7 +140,7 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
140
140
|
}, props.overrideCss)
|
|
141
141
|
}), status === 'done' && /*#__PURE__*/React.createElement(AIEventSummaryViewed, {
|
|
142
142
|
fromCache: isSummarisedOnMountRef.current
|
|
143
|
-
}), /*#__PURE__*/React.createElement(
|
|
143
|
+
}), /*#__PURE__*/React.createElement(MotionWrapper, {
|
|
144
144
|
minHeight: aiSummaryMinHeight,
|
|
145
145
|
show: showAISummary,
|
|
146
146
|
showTransition: !isSummarisedOnMountRef.current
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import { useAnalyticsEvents } from '
|
|
2
|
+
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
3
3
|
var AIEventErrorViewed = function AIEventErrorViewed(_ref) {
|
|
4
4
|
var reason = _ref.reason;
|
|
5
5
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["children"];
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { CONTENT_URL_AI } from '
|
|
5
|
+
import { CONTENT_URL_AI } from '../../../../../constants';
|
|
6
6
|
var AILearnMoreAnchor = function AILearnMoreAnchor(_ref) {
|
|
7
7
|
var children = _ref.children,
|
|
8
8
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { Box } from '@atlaskit/primitives';
|
|
3
3
|
import React, { useEffect, useRef, useState } from 'react';
|
|
4
|
-
export var
|
|
4
|
+
export var MotionWrapper = function MotionWrapper(_ref) {
|
|
5
5
|
var children = _ref.children,
|
|
6
6
|
_ref$isFadeIn = _ref.isFadeIn,
|
|
7
7
|
isFadeIn = _ref$isFadeIn === void 0 ? false : _ref$isFadeIn,
|
|
@@ -42,4 +42,4 @@ export var AIMotionWrapper = function AIMotionWrapper(_ref) {
|
|
|
42
42
|
ref: ref
|
|
43
43
|
}, children) : null;
|
|
44
44
|
};
|
|
45
|
-
export default
|
|
45
|
+
export default MotionWrapper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -22,7 +22,7 @@ import { fireLinkClickedEvent } from '../../../utils/analytics/click';
|
|
|
22
22
|
import { useSmartCardState } from '../../../state/store';
|
|
23
23
|
import HoverCardForbiddenView from './views/forbidden';
|
|
24
24
|
import ContentContainer from './ContentContainer';
|
|
25
|
-
import { getIsAISummaryEnabled } from '../../../utils/
|
|
25
|
+
import { getIsAISummaryEnabled } from '../../../utils/ai-summary';
|
|
26
26
|
export var hoverCardClassName = 'smart-links-hover-preview';
|
|
27
27
|
export var getCopyAction = function getCopyAction(url) {
|
|
28
28
|
return {
|
|
@@ -179,13 +179,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
|
|
|
179
179
|
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(ActionBlock, {
|
|
180
180
|
onClick: onActionClick,
|
|
181
181
|
spaceInline: "space.150"
|
|
182
|
-
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(
|
|
183
|
-
secondary: [{
|
|
184
|
-
name: ElementName.Provider,
|
|
185
|
-
testId: 'smart-element-provider'
|
|
186
|
-
}],
|
|
187
|
-
testId: "smart-block-action-footer"
|
|
188
|
-
}), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/React.createElement(FooterBlock, {
|
|
182
|
+
}), isActionBlockEnabled && /*#__PURE__*/React.createElement(FooterBlock, null), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/React.createElement(FooterBlock, {
|
|
189
183
|
actions: footerActions,
|
|
190
184
|
size: SmartLinkSize.Large,
|
|
191
185
|
overrideCss: footerBlockCss
|
|
@@ -41,7 +41,7 @@ var getSimulatedBetterMetadata = function getSimulatedBetterMetadata(extensionKe
|
|
|
41
41
|
});
|
|
42
42
|
case 'trello-object-provider':
|
|
43
43
|
return {
|
|
44
|
-
primary: [ElementName.
|
|
44
|
+
primary: [ElementName.CollaboratorGroup, ElementName.State, ElementName.DueOn],
|
|
45
45
|
secondary: [ElementName.ReactCount, ElementName.CommentCount, ElementName.AttachmentCount, ElementName.ChecklistProgress],
|
|
46
46
|
subtitle: [ElementName.Location]
|
|
47
47
|
};
|
|
@@ -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.61.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import SVG from '@atlaskit/icon/svg';
|
|
3
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { B200, B400 } from '@atlaskit/theme/colors';
|
|
4
5
|
/**
|
|
5
6
|
* The bulk of this file is originally from
|
|
@@ -7,6 +8,8 @@ import { B200, B400 } from '@atlaskit/theme/colors';
|
|
|
7
8
|
* with modifications
|
|
8
9
|
*/
|
|
9
10
|
var AiIcon = function AiIcon(props) {
|
|
11
|
+
var iconColor = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : "var(--ds-icon-accent-blue, ".concat(B200, ")");
|
|
12
|
+
var textColor = getBooleanFF('platform.linking-platform.smart-card.hover-card-action-redesign') ? "var(--ds-icon, #44546F)" : "var(--ds-text-accent-blue, ".concat(B400, ")");
|
|
10
13
|
return /*#__PURE__*/React.createElement(SVG, props, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
11
14
|
id: "ai_icon_lg0",
|
|
12
15
|
x1: "21",
|
|
@@ -16,12 +19,12 @@ var AiIcon = function AiIcon(props) {
|
|
|
16
19
|
gradientUnits: "userSpaceOnUse"
|
|
17
20
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
18
21
|
offset: "0.270833",
|
|
19
|
-
stopColor:
|
|
20
|
-
color:
|
|
22
|
+
stopColor: iconColor,
|
|
23
|
+
color: iconColor
|
|
21
24
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
22
25
|
offset: "1",
|
|
23
|
-
stopColor:
|
|
24
|
-
color:
|
|
26
|
+
stopColor: textColor,
|
|
27
|
+
color: textColor
|
|
25
28
|
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
26
29
|
id: "ai_icon_lg1",
|
|
27
30
|
x1: "12.5",
|
|
@@ -31,12 +34,12 @@ var AiIcon = function AiIcon(props) {
|
|
|
31
34
|
gradientUnits: "userSpaceOnUse"
|
|
32
35
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
33
36
|
offset: "0.1875",
|
|
34
|
-
stopColor:
|
|
35
|
-
color:
|
|
37
|
+
stopColor: iconColor,
|
|
38
|
+
color: iconColor
|
|
36
39
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
37
40
|
offset: "1",
|
|
38
|
-
stopColor:
|
|
39
|
-
color:
|
|
41
|
+
stopColor: textColor,
|
|
42
|
+
color: textColor
|
|
40
43
|
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
41
44
|
id: "ai_icon_lg2",
|
|
42
45
|
x1: "6.82996",
|
|
@@ -45,12 +48,12 @@ var AiIcon = function AiIcon(props) {
|
|
|
45
48
|
y2: "12",
|
|
46
49
|
gradientUnits: "userSpaceOnUse"
|
|
47
50
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
48
|
-
stopColor:
|
|
49
|
-
color:
|
|
51
|
+
stopColor: textColor,
|
|
52
|
+
color: textColor
|
|
50
53
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
51
54
|
offset: "0.791667",
|
|
52
|
-
stopColor:
|
|
53
|
-
color:
|
|
55
|
+
stopColor: iconColor,
|
|
56
|
+
color: iconColor
|
|
54
57
|
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
55
58
|
id: "ai_icon_lg3",
|
|
56
59
|
x1: "12.5",
|
|
@@ -59,12 +62,12 @@ var AiIcon = function AiIcon(props) {
|
|
|
59
62
|
y2: "21",
|
|
60
63
|
gradientUnits: "userSpaceOnUse"
|
|
61
64
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
62
|
-
stopColor:
|
|
63
|
-
color:
|
|
65
|
+
stopColor: textColor,
|
|
66
|
+
color: textColor
|
|
64
67
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
65
68
|
offset: "0.802083",
|
|
66
|
-
stopColor:
|
|
67
|
-
color:
|
|
69
|
+
stopColor: iconColor,
|
|
70
|
+
color: iconColor
|
|
68
71
|
}))), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
69
72
|
fillRule: "evenodd",
|
|
70
73
|
clipRule: "evenodd",
|
|
@@ -89,22 +92,22 @@ var AiIcon = function AiIcon(props) {
|
|
|
89
92
|
fillRule: "evenodd",
|
|
90
93
|
clipRule: "evenodd",
|
|
91
94
|
d: "M14.2929 14.2929C14.6835 13.9024 15.3166 13.9024 15.7071 14.2929L19.7071 18.2929C20.0977 18.6834 20.0977 19.3166 19.7071 19.7071C19.3166 20.0976 18.6835 20.0976 18.2929 19.7071L14.2929 15.7071C13.9024 15.3166 13.9024 14.6834 14.2929 14.2929Z",
|
|
92
|
-
fill:
|
|
95
|
+
fill: iconColor
|
|
93
96
|
}), /*#__PURE__*/React.createElement("path", {
|
|
94
97
|
fillRule: "evenodd",
|
|
95
98
|
clipRule: "evenodd",
|
|
96
99
|
d: "M19.7071 4.29289C20.0977 4.68342 20.0977 5.31658 19.7071 5.70711L15.7071 9.70711C15.3166 10.0976 14.6835 10.0976 14.2929 9.70711C13.9024 9.31658 13.9024 8.68342 14.2929 8.29289L18.2929 4.29289C18.6835 3.90237 19.3166 3.90237 19.7071 4.29289Z",
|
|
97
|
-
fill:
|
|
100
|
+
fill: iconColor
|
|
98
101
|
}), /*#__PURE__*/React.createElement("path", {
|
|
99
102
|
fillRule: "evenodd",
|
|
100
103
|
clipRule: "evenodd",
|
|
101
104
|
d: "M4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C10.0976 8.68342 10.0976 9.31658 9.70711 9.70711C9.31658 10.0976 8.68342 10.0976 8.29289 9.70711L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289Z",
|
|
102
|
-
fill:
|
|
105
|
+
fill: iconColor
|
|
103
106
|
}), /*#__PURE__*/React.createElement("path", {
|
|
104
107
|
fillRule: "evenodd",
|
|
105
108
|
clipRule: "evenodd",
|
|
106
109
|
d: "M9.70711 14.2929C10.0976 14.6834 10.0976 15.3166 9.70711 15.7071L5.70711 19.7071C5.31658 20.0976 4.68342 20.0976 4.29289 19.7071C3.90237 19.3166 3.90237 18.6834 4.29289 18.2929L8.29289 14.2929C8.68342 13.9024 9.31658 13.9024 9.70711 14.2929Z",
|
|
107
|
-
fill:
|
|
110
|
+
fill: iconColor
|
|
108
111
|
})));
|
|
109
112
|
};
|
|
110
113
|
export default AiIcon;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { extractFileFormat } from './extractFileFormat';
|
|
2
|
+
export { prioritiseIcon } from './prioritiseIcon';
|
|
2
3
|
export { extractIcon } from './extractIcon';
|
|
3
4
|
export { extractIconFromDocument } from './extractIconFromDocument';
|
|
4
5
|
export { extractIconFromTask } from './extractIconFromTask';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JsonLd } from 'json-ld-types';
|
|
2
|
-
import { CardPlatform, EmbedIframeUrlType } from '../../view/Card/types';
|
|
3
|
-
import { EmbedCardResolvedViewProps } from '../../view/EmbedCard/views/ResolvedView';
|
|
1
|
+
import { type JsonLd } from 'json-ld-types';
|
|
2
|
+
import { type CardPlatform, type EmbedIframeUrlType } from '../../view/Card/types';
|
|
3
|
+
import { type EmbedCardResolvedViewProps } from '../../view/EmbedCard/views/ResolvedView';
|
|
4
4
|
export declare const extractEmbedProps: (jsonLd: JsonLd.Data.BaseData, meta?: JsonLd.Meta.BaseMeta, platform?: CardPlatform, iframeUrlType?: EmbedIframeUrlType) => EmbedCardResolvedViewProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JsonLd } from 'json-ld-types';
|
|
1
|
+
import { type JsonLd } from 'json-ld-types';
|
|
2
2
|
import { type CardActionOptions } from '../../../view/Card/types';
|
|
3
|
-
import { AISummaryActionData } from '../../../state/flexible-ui-context/types';
|
|
4
|
-
import { AISummaryConfig } from '../../../state/hooks/use-ai-summary-config/types';
|
|
3
|
+
import { type AISummaryActionData } from '../../../state/flexible-ui-context/types';
|
|
4
|
+
import { type AISummaryConfig } from '../../../state/hooks/use-ai-summary-config/types';
|
|
5
5
|
export declare const extractAISummaryAction: (response: JsonLd.Response, url?: string, actionOptions?: CardActionOptions, aiSummaryConfig?: AISummaryConfig) => AISummaryActionData | undefined;
|
|
@@ -10,7 +10,7 @@ export declare class AISummaryService implements AISummaryServiceInt {
|
|
|
10
10
|
private onError?;
|
|
11
11
|
constructor(props: AISummaryServiceProps);
|
|
12
12
|
private fetchStream;
|
|
13
|
-
summariseUrl(): Promise<
|
|
13
|
+
summariseUrl(): Promise<AISummaryState>;
|
|
14
14
|
private isExpectedError;
|
|
15
15
|
subscribe(stateSetter: StateSetter): () => void;
|
|
16
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="filesystem" />
|
|
2
2
|
import type { ProductType } from '@atlaskit/linking-common';
|
|
3
3
|
export interface AISummaryServiceInt {
|
|
4
|
-
summariseUrl: () => Promise<
|
|
4
|
+
summariseUrl: () => Promise<AISummaryState>;
|
|
5
5
|
state: AISummaryState;
|
|
6
6
|
subscribe: (stateSetter: StateSetter) => () => void;
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AISummaryServiceProps, AISummaryState } from './ai-summary-service/types';
|
|
2
2
|
export declare const useAISummary: (props: AISummaryServiceProps) => {
|
|
3
|
-
summariseUrl: () => Promise<
|
|
3
|
+
summariseUrl: () => Promise<AISummaryState> | undefined;
|
|
4
4
|
state: AISummaryState;
|
|
5
5
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { JsonLd } from 'json-ld-types';
|
|
2
|
+
import type { MessageDescriptor } from 'react-intl-next';
|
|
3
|
+
import type { ErrorMessage } from '../state/hooks/use-ai-summary/ai-summary-service/types';
|
|
4
|
+
export declare const getIsAISummaryEnabled: (isAdminHubAIEnabled?: boolean, response?: JsonLd.Response) => boolean;
|
|
5
|
+
export declare const getAISummaryErrorMessage: (error?: ErrorMessage) => {
|
|
6
|
+
message: MessageDescriptor;
|
|
7
|
+
url?: string;
|
|
8
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { JsonLd } from 'json-ld-types';
|
|
1
|
+
import type { JsonLd } from 'json-ld-types';
|
|
2
2
|
import type { FlexibleUiOptions } from '../../../../FlexibleCard/types';
|
|
3
3
|
import type { FooterBlockProps } from '../../../../FlexibleCard/components/blocks/footer-block/types';
|
|
4
4
|
import type { PreviewBlockProps } from '../../../../FlexibleCard/components/blocks/preview-block/types';
|
|
5
5
|
import type { TitleBlockProps } from '../../../../FlexibleCard/components/blocks/title-block/types';
|
|
6
|
-
import { ElementItem } from '../../../../FlexibleCard/components/blocks/types';
|
|
6
|
+
import type { ElementItem } from '../../../../FlexibleCard/components/blocks/types';
|
|
7
7
|
export declare const getSimulatedBetterMetadata: (cardDetails?: JsonLd.Response) => SimulatedMetadata;
|
|
8
8
|
type SimulatedMetadata = {
|
|
9
9
|
titleMetadata: ElementItem[];
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CardWithUrlContentProps } from '../types';
|
|
3
|
-
declare function
|
|
4
|
-
declare function LazyIntersectionObserverCardNext(props: CardWithUrlContentProps): JSX.Element;
|
|
5
|
-
export declare const LazyIntersectionObserverCard: typeof LazyIntersectionObserverCardNext | typeof LazyIntersectionObserverCardLegacy;
|
|
6
|
-
export {};
|
|
3
|
+
export declare function LazyIntersectionObserverCard(props: CardWithUrlContentProps): JSX.Element;
|
|
@@ -46,6 +46,7 @@ export declare const TooltipWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
46
46
|
export interface ContentProps {
|
|
47
47
|
isInteractive: boolean;
|
|
48
48
|
allowScrollBar: boolean;
|
|
49
|
+
removeOverflow?: boolean;
|
|
49
50
|
frameStyle?: FrameStyle;
|
|
50
51
|
}
|
|
51
52
|
export declare const Content: import("@emotion/styled").StyledComponent<{
|
|
@@ -3,7 +3,13 @@ import type { Space, XCSS } from '@atlaskit/primitives';
|
|
|
3
3
|
import type { SerializedStyles } from '@emotion/react';
|
|
4
4
|
import type { ReactChild, ReactNode } from 'react';
|
|
5
5
|
import type { SmartLinkSize } from '../../../../../constants';
|
|
6
|
-
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
|
+
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
7
|
+
export type ActionMessageAppearance = 'error';
|
|
8
|
+
export type ActionMessage = {
|
|
9
|
+
appearance?: ActionMessageAppearance;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
};
|
|
7
13
|
export type ActionProps = {
|
|
8
14
|
/**
|
|
9
15
|
* Determines the appearance of the action.
|
|
@@ -25,6 +31,10 @@ export type ActionProps = {
|
|
|
25
31
|
* Determines the onClick behaviour of the Action.
|
|
26
32
|
*/
|
|
27
33
|
onClick: () => any;
|
|
34
|
+
/**
|
|
35
|
+
* Error callback - each action is to provide its own implementation.
|
|
36
|
+
*/
|
|
37
|
+
onError?: (error: ActionMessage) => void;
|
|
28
38
|
/**
|
|
29
39
|
* Determines the icon rendered within the Action.
|
|
30
40
|
*/
|