@atlaskit/smart-card 26.59.0 → 26.60.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 +28 -0
- package/dist/cjs/extractors/flexible/actions/extract-ai-summary-action.js +2 -2
- package/dist/cjs/i18n/cs.js +2 -1
- package/dist/cjs/i18n/da.js +2 -1
- package/dist/cjs/i18n/de.js +2 -1
- package/dist/cjs/i18n/en.js +5 -1
- package/dist/cjs/i18n/en_GB.js +5 -1
- package/dist/cjs/i18n/en_ZZ.js +9 -1
- package/dist/cjs/i18n/es.js +2 -1
- package/dist/cjs/i18n/fi.js +2 -1
- package/dist/cjs/i18n/fr.js +2 -1
- package/dist/cjs/i18n/hu.js +2 -1
- package/dist/cjs/i18n/it.js +2 -1
- package/dist/cjs/i18n/ja.js +2 -1
- package/dist/cjs/i18n/ko.js +2 -1
- package/dist/cjs/i18n/nb.js +2 -1
- package/dist/cjs/i18n/nl.js +2 -1
- package/dist/cjs/i18n/pl.js +2 -1
- package/dist/cjs/i18n/pt_BR.js +2 -1
- package/dist/cjs/i18n/ru.js +2 -1
- package/dist/cjs/i18n/sv.js +2 -1
- package/dist/cjs/i18n/th.js +2 -1
- package/dist/cjs/i18n/tr.js +2 -1
- package/dist/cjs/i18n/uk.js +2 -1
- package/dist/cjs/i18n/vi.js +2 -1
- package/dist/cjs/i18n/zh.js +2 -1
- package/dist/cjs/i18n/zh_TW.js +2 -1
- 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/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/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/es2019/extractors/flexible/actions/extract-ai-summary-action.js +1 -1
- package/dist/es2019/i18n/cs.js +2 -1
- package/dist/es2019/i18n/da.js +2 -1
- package/dist/es2019/i18n/de.js +2 -1
- package/dist/es2019/i18n/en.js +5 -1
- package/dist/es2019/i18n/en_GB.js +5 -1
- package/dist/es2019/i18n/en_ZZ.js +9 -1
- package/dist/es2019/i18n/es.js +2 -1
- package/dist/es2019/i18n/fi.js +2 -1
- package/dist/es2019/i18n/fr.js +2 -1
- package/dist/es2019/i18n/hu.js +2 -1
- package/dist/es2019/i18n/it.js +2 -1
- package/dist/es2019/i18n/ja.js +2 -1
- package/dist/es2019/i18n/ko.js +2 -1
- package/dist/es2019/i18n/nb.js +2 -1
- package/dist/es2019/i18n/nl.js +2 -1
- package/dist/es2019/i18n/pl.js +2 -1
- package/dist/es2019/i18n/pt_BR.js +2 -1
- package/dist/es2019/i18n/ru.js +2 -1
- package/dist/es2019/i18n/sv.js +2 -1
- package/dist/es2019/i18n/th.js +2 -1
- package/dist/es2019/i18n/tr.js +2 -1
- package/dist/es2019/i18n/uk.js +2 -1
- package/dist/es2019/i18n/vi.js +2 -1
- package/dist/es2019/i18n/zh.js +2 -1
- package/dist/es2019/i18n/zh_TW.js +2 -1
- 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/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/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/esm/extractors/flexible/actions/extract-ai-summary-action.js +1 -1
- package/dist/esm/i18n/cs.js +2 -1
- package/dist/esm/i18n/da.js +2 -1
- package/dist/esm/i18n/de.js +2 -1
- package/dist/esm/i18n/en.js +5 -1
- package/dist/esm/i18n/en_GB.js +5 -1
- package/dist/esm/i18n/en_ZZ.js +9 -1
- package/dist/esm/i18n/es.js +2 -1
- package/dist/esm/i18n/fi.js +2 -1
- package/dist/esm/i18n/fr.js +2 -1
- package/dist/esm/i18n/hu.js +2 -1
- package/dist/esm/i18n/it.js +2 -1
- package/dist/esm/i18n/ja.js +2 -1
- package/dist/esm/i18n/ko.js +2 -1
- package/dist/esm/i18n/nb.js +2 -1
- package/dist/esm/i18n/nl.js +2 -1
- package/dist/esm/i18n/pl.js +2 -1
- package/dist/esm/i18n/pt_BR.js +2 -1
- package/dist/esm/i18n/ru.js +2 -1
- package/dist/esm/i18n/sv.js +2 -1
- package/dist/esm/i18n/th.js +2 -1
- package/dist/esm/i18n/tr.js +2 -1
- package/dist/esm/i18n/uk.js +2 -1
- package/dist/esm/i18n/vi.js +2 -1
- package/dist/esm/i18n/zh.js +2 -1
- package/dist/esm/i18n/zh_TW.js +2 -1
- 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/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/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/types/extractors/flexible/actions/extract-ai-summary-action.d.ts +3 -3
- package/dist/types/i18n/cs.d.ts +1 -0
- package/dist/types/i18n/da.d.ts +1 -0
- package/dist/types/i18n/de.d.ts +1 -0
- package/dist/types/i18n/en.d.ts +4 -0
- package/dist/types/i18n/en_GB.d.ts +4 -0
- package/dist/types/i18n/en_ZZ.d.ts +8 -0
- package/dist/types/i18n/es.d.ts +1 -0
- package/dist/types/i18n/fi.d.ts +1 -0
- package/dist/types/i18n/fr.d.ts +1 -0
- package/dist/types/i18n/hu.d.ts +1 -0
- package/dist/types/i18n/it.d.ts +1 -0
- package/dist/types/i18n/ja.d.ts +1 -0
- package/dist/types/i18n/ko.d.ts +1 -0
- package/dist/types/i18n/nb.d.ts +1 -0
- package/dist/types/i18n/nl.d.ts +1 -0
- package/dist/types/i18n/pl.d.ts +1 -0
- package/dist/types/i18n/pt_BR.d.ts +1 -0
- package/dist/types/i18n/ru.d.ts +1 -0
- package/dist/types/i18n/sv.d.ts +1 -0
- package/dist/types/i18n/th.d.ts +1 -0
- package/dist/types/i18n/tr.d.ts +1 -0
- package/dist/types/i18n/uk.d.ts +1 -0
- package/dist/types/i18n/vi.d.ts +1 -0
- package/dist/types/i18n/zh.d.ts +1 -0
- package/dist/types/i18n/zh_TW.d.ts +1 -0
- 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/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/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/CustomPopupContainer.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-ts4.5/extractors/flexible/actions/extract-ai-summary-action.d.ts +3 -3
- package/dist/types-ts4.5/i18n/cs.d.ts +1 -0
- package/dist/types-ts4.5/i18n/da.d.ts +1 -0
- package/dist/types-ts4.5/i18n/de.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en.d.ts +4 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +4 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +8 -0
- package/dist/types-ts4.5/i18n/es.d.ts +1 -0
- package/dist/types-ts4.5/i18n/fi.d.ts +1 -0
- package/dist/types-ts4.5/i18n/fr.d.ts +1 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +1 -0
- package/dist/types-ts4.5/i18n/it.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +1 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +1 -0
- package/dist/types-ts4.5/i18n/nl.d.ts +1 -0
- package/dist/types-ts4.5/i18n/pl.d.ts +1 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +1 -0
- package/dist/types-ts4.5/i18n/sv.d.ts +1 -0
- package/dist/types-ts4.5/i18n/th.d.ts +1 -0
- package/dist/types-ts4.5/i18n/tr.d.ts +1 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +1 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +1 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +1 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +1 -0
- 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/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/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/CustomPopupContainer.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/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
|
@@ -133,7 +133,11 @@ var TooltipWrapper = exports.TooltipWrapper = _styled.default.div({
|
|
|
133
133
|
// manage scrolling behaviour.
|
|
134
134
|
// eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression
|
|
135
135
|
var Content = exports.Content = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n border: 1px solid ", ";\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n transition: box-shadow 0.3s;\n\n > .calc-height > div > div {\n left: unset !important;\n width: unset !important;\n height: unset !important;\n position: initial !important;\n padding-bottom: unset !important;\n }\n > .embed-preview > div {\n margin: 0 auto;\n }\n\n ", "\n\n ", "\n\n ", "\n"])), contentBorderRadius, "var(--ds-border, ".concat(_colors.N40, ")"), "var(--ds-surface-raised, white)", function (_ref11) {
|
|
136
|
-
var allowScrollBar = _ref11.allowScrollBar
|
|
136
|
+
var allowScrollBar = _ref11.allowScrollBar,
|
|
137
|
+
removeOverflow = _ref11.removeOverflow;
|
|
138
|
+
if (removeOverflow) {
|
|
139
|
+
return '';
|
|
140
|
+
}
|
|
137
141
|
return allowScrollBar ? 'overflow: auto;' : 'overflow: hidden;';
|
|
138
142
|
}, function (_ref12) {
|
|
139
143
|
var frameStyle = _ref12.frameStyle;
|
|
@@ -10,16 +10,19 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _reactIntlNext = require("react-intl-next");
|
|
13
|
+
var _reactMagneticDi = require("react-magnetic-di");
|
|
13
14
|
var _messages = require("../../../../../messages");
|
|
14
15
|
var _action = _interopRequireDefault(require("../action"));
|
|
15
16
|
var _aiIcon = _interopRequireDefault(require("../../../../common/ai-icon"));
|
|
16
17
|
var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
17
18
|
var _useAiSummary = require("../../../../../state/hooks/use-ai-summary");
|
|
18
|
-
var
|
|
19
|
+
var _utils = require("./utils");
|
|
20
|
+
var _excluded = ["onClick", "onError", "url", "ari", "product"];
|
|
19
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
23
|
var AISummaryActionComponent = exports.AISummaryActionComponent = function AISummaryActionComponent(_ref) {
|
|
22
24
|
var onClickCallback = _ref.onClick,
|
|
25
|
+
onErrorCallback = _ref.onError,
|
|
23
26
|
_ref$url = _ref.url,
|
|
24
27
|
url = _ref$url === void 0 ? '' : _ref$url,
|
|
25
28
|
_ref$ari = _ref.ari,
|
|
@@ -35,26 +38,31 @@ var AISummaryActionComponent = exports.AISummaryActionComponent = function AISum
|
|
|
35
38
|
}),
|
|
36
39
|
status = _useAISummary.state.status,
|
|
37
40
|
summariseUrl = _useAISummary.summariseUrl;
|
|
41
|
+
var onCompleted = (0, _react.useCallback)(function (state) {
|
|
42
|
+
if ((state === null || state === void 0 ? void 0 : state.status) === 'error') {
|
|
43
|
+
onErrorCallback === null || onErrorCallback === void 0 || onErrorCallback((0, _utils.getErrorMessage)(state.error));
|
|
44
|
+
}
|
|
45
|
+
}, [onErrorCallback]);
|
|
38
46
|
var handleActionClick = (0, _react.useCallback)(function () {
|
|
47
|
+
var _summariseUrl;
|
|
39
48
|
fireEvent('ui.button.clicked.aiSummary', {});
|
|
40
49
|
fireEvent('track.aiInteraction.initiated', {
|
|
41
50
|
aiFeatureName: 'Smart Links Summary',
|
|
42
51
|
proactiveAIGenerated: 0,
|
|
43
52
|
userGeneratedAI: 1
|
|
44
53
|
});
|
|
45
|
-
summariseUrl();
|
|
54
|
+
(_summariseUrl = summariseUrl()) === null || _summariseUrl === void 0 || _summariseUrl.then(onCompleted, onCompleted);
|
|
46
55
|
onClickCallback === null || onClickCallback === void 0 || onClickCallback();
|
|
47
|
-
}, [fireEvent, onClickCallback, summariseUrl]);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
56
|
+
}, [fireEvent, onClickCallback, onCompleted, summariseUrl]);
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
58
|
+
content: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.ai_summary_action),
|
|
59
|
+
icon: /*#__PURE__*/_react.default.createElement(_aiIcon.default, {
|
|
60
|
+
label: "Summarise with AI"
|
|
61
|
+
}),
|
|
62
|
+
isLoading: status === 'loading',
|
|
63
|
+
onClick: handleActionClick,
|
|
64
|
+
testId: "smart-action-ai-summary-action",
|
|
65
|
+
tooltipMessage: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.ai_summary_action_description)
|
|
66
|
+
}, props));
|
|
59
67
|
return null;
|
|
60
68
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getErrorMessage = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _reactIntlNext = require("react-intl-next");
|
|
11
|
+
var _aiSummary = require("../../../../../utils/ai-summary");
|
|
12
|
+
var _aiEventErrorViewed = _interopRequireDefault(require("../../common/ai-summary/ai-event-error-viewed"));
|
|
13
|
+
var _aiLearnMoreAnchor = _interopRequireDefault(require("../../common/ai-summary/ai-learn-more-anchor"));
|
|
14
|
+
var getErrorMessage = exports.getErrorMessage = function getErrorMessage(error) {
|
|
15
|
+
var _getAISummaryErrorMes = (0, _aiSummary.getAISummaryErrorMessage)(error),
|
|
16
|
+
message = _getAISummaryErrorMes.message,
|
|
17
|
+
url = _getAISummaryErrorMes.url;
|
|
18
|
+
return {
|
|
19
|
+
appearance: 'error',
|
|
20
|
+
title: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_aiEventErrorViewed.default, {
|
|
21
|
+
reason: error
|
|
22
|
+
}), /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, message, {
|
|
23
|
+
values: {
|
|
24
|
+
a: function a(chunks) {
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement(_aiLearnMoreAnchor.default, {
|
|
26
|
+
href: url
|
|
27
|
+
}, chunks);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
})))
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ActionFooter = void 0;
|
|
8
|
+
var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
|
|
9
|
+
var _primitives = require("@atlaskit/primitives");
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _motionWrapper = _interopRequireDefault(require("../../../common/motion-wrapper"));
|
|
12
|
+
var containerStyles = (0, _primitives.xcss)({
|
|
13
|
+
all: 'unset',
|
|
14
|
+
borderRadius: 'border.radius',
|
|
15
|
+
margin: 'space.100',
|
|
16
|
+
lineHeight: '20px',
|
|
17
|
+
padding: 'space.050',
|
|
18
|
+
paddingInline: 'space.100',
|
|
19
|
+
width: '100%',
|
|
20
|
+
':empty': {
|
|
21
|
+
display: 'none'
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var errorStyles = (0, _primitives.xcss)({
|
|
25
|
+
backgroundColor: 'color.background.danger'
|
|
26
|
+
});
|
|
27
|
+
var titleStyles = (0, _primitives.xcss)({
|
|
28
|
+
color: 'color.text.subtle',
|
|
29
|
+
fontSize: '12px',
|
|
30
|
+
fontStyle: 'normal',
|
|
31
|
+
fontWeight: '400',
|
|
32
|
+
lineHeight: '16px'
|
|
33
|
+
});
|
|
34
|
+
var getIcon = function getIcon(appearance) {
|
|
35
|
+
switch (appearance) {
|
|
36
|
+
case 'error':
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_error.default, {
|
|
38
|
+
primaryColor: "var(--ds-icon-danger, #C9372C)",
|
|
39
|
+
label: "Error",
|
|
40
|
+
size: "small",
|
|
41
|
+
testId: "action-error-icon"
|
|
42
|
+
});
|
|
43
|
+
default:
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var ActionFooter = exports.ActionFooter = function ActionFooter(_ref) {
|
|
48
|
+
var message = _ref.message,
|
|
49
|
+
testId = _ref.testId;
|
|
50
|
+
if (!message) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
54
|
+
testId: "".concat(testId, "-footer"),
|
|
55
|
+
xcss: [containerStyles, message.appearance === 'error' && errorStyles]
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_motionWrapper.default, {
|
|
57
|
+
isFadeIn: true,
|
|
58
|
+
show: true,
|
|
59
|
+
showTransition: true
|
|
60
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
61
|
+
alignBlock: "start",
|
|
62
|
+
grow: "fill",
|
|
63
|
+
space: "space.025"
|
|
64
|
+
}, message.icon || getIcon(message.appearance), /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
65
|
+
xcss: titleStyles
|
|
66
|
+
}, message.title))));
|
|
67
|
+
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
8
10
|
var _react = require("@emotion/react");
|
|
9
11
|
var _primitives = require("@atlaskit/primitives");
|
|
10
12
|
var _react2 = require("react");
|
|
@@ -12,6 +14,8 @@ var _constants = require("../../../../../constants");
|
|
|
12
14
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
13
15
|
var Actions = _interopRequireWildcard(require("../../actions"));
|
|
14
16
|
var _utils = require("../../utils");
|
|
17
|
+
var _actionFooter = require("./action-footer");
|
|
18
|
+
var _reactMagneticDi = require("react-magnetic-di");
|
|
15
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
21
|
/** @jsx jsx */
|
|
@@ -48,7 +52,18 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
48
52
|
testId = _ref$testId === void 0 ? 'smart-block-action' : _ref$testId;
|
|
49
53
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
50
54
|
var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
|
|
55
|
+
var _useState = (0, _react2.useState)(),
|
|
56
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
57
|
+
message = _useState2[0],
|
|
58
|
+
setMessage = _useState2[1];
|
|
51
59
|
var padding = !(ui !== null && ui !== void 0 && ui.hidePadding) ? (0, _utils.getPrimitivesPaddingSpaceBySize)((ui === null || ui === void 0 ? void 0 : ui.size) || _constants.SmartLinkSize.Medium) : undefined;
|
|
60
|
+
var _onClick = (0, _react2.useCallback)(function (name) {
|
|
61
|
+
setMessage(undefined);
|
|
62
|
+
onClickCallback === null || onClickCallback === void 0 || onClickCallback(name);
|
|
63
|
+
}, [onClickCallback]);
|
|
64
|
+
var onError = (0, _react2.useCallback)(function (error) {
|
|
65
|
+
setMessage(error);
|
|
66
|
+
}, []);
|
|
52
67
|
var actions = (0, _react2.useMemo)(function () {
|
|
53
68
|
if (!(context !== null && context !== void 0 && context.actions)) {
|
|
54
69
|
return;
|
|
@@ -62,19 +77,24 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
62
77
|
spaceInline: spaceInline,
|
|
63
78
|
key: name,
|
|
64
79
|
onClick: function onClick() {
|
|
65
|
-
return
|
|
80
|
+
return _onClick(name);
|
|
66
81
|
},
|
|
82
|
+
onError: onError,
|
|
67
83
|
size: size,
|
|
68
84
|
xcss: (0, _primitives.xcss)({
|
|
69
85
|
paddingInline: padding
|
|
70
86
|
})
|
|
71
87
|
}) : null;
|
|
72
88
|
});
|
|
73
|
-
}, [context === null || context === void 0 ? void 0 : context.actions,
|
|
89
|
+
}, [context === null || context === void 0 ? void 0 : context.actions, _onClick, onError, padding, size, spaceInline]);
|
|
74
90
|
return actions ? (0, _react.jsx)("div", {
|
|
75
91
|
css: ignoreContainerPaddingStyles,
|
|
76
92
|
ref: blockRef,
|
|
77
93
|
"data-testid": testId
|
|
78
|
-
}, actions)
|
|
94
|
+
}, actions, (0, _react.jsx)(_actionFooter.ActionFooter, {
|
|
95
|
+
message: message,
|
|
96
|
+
paddingInline: padding,
|
|
97
|
+
testId: testId
|
|
98
|
+
})) : null;
|
|
79
99
|
};
|
|
80
100
|
var _default = exports.default = ActionBlock;
|
|
@@ -17,7 +17,7 @@ var _messages = require("../../../../../../messages");
|
|
|
17
17
|
var _aiIcon = _interopRequireDefault(require("../../../../../common/ai-icon"));
|
|
18
18
|
var _aiIndicatorTooltip = _interopRequireDefault(require("./ai-indicator-tooltip"));
|
|
19
19
|
var _aiIndicatorContainer = _interopRequireDefault(require("./ai-indicator-container"));
|
|
20
|
-
var _aiLearnMoreAnchor = _interopRequireDefault(require("
|
|
20
|
+
var _aiLearnMoreAnchor = _interopRequireDefault(require("../../../common/ai-summary/ai-learn-more-anchor"));
|
|
21
21
|
/** @jsx jsx */
|
|
22
22
|
|
|
23
23
|
var tooltipMsgStyles = (0, _primitives.xcss)({
|
|
@@ -10,10 +10,9 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
10
10
|
var _reactIntlNext = require("react-intl-next");
|
|
11
11
|
var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
|
|
12
12
|
var _primitives = require("@atlaskit/primitives");
|
|
13
|
-
var
|
|
13
|
+
var _aiSummary = require("../../../../../../utils/ai-summary");
|
|
14
|
+
var _aiLearnMoreAnchor = _interopRequireDefault(require("../../../common/ai-summary/ai-learn-more-anchor"));
|
|
14
15
|
var _aiIndicatorContainer = _interopRequireDefault(require("./ai-indicator-container"));
|
|
15
|
-
var _aiLearnMoreAnchor = _interopRequireDefault(require("./ai-learn-more-anchor"));
|
|
16
|
-
var _constants = require("../../../../../../constants");
|
|
17
16
|
var contentStyles = (0, _primitives.xcss)({
|
|
18
17
|
color: 'color.text.subtle',
|
|
19
18
|
fontSize: '11px',
|
|
@@ -34,31 +33,13 @@ var FormattedErrorMessage = function FormattedErrorMessage(_ref) {
|
|
|
34
33
|
}
|
|
35
34
|
}));
|
|
36
35
|
};
|
|
37
|
-
var getErrorMesssageProps = function getErrorMesssageProps(error) {
|
|
38
|
-
switch (error) {
|
|
39
|
-
case 'ACCEPTABLE_USE_VIOLATIONS':
|
|
40
|
-
return {
|
|
41
|
-
message: _messages.messages.ai_summary_error_acceptable_use_violation,
|
|
42
|
-
url: _constants.CONTENT_URL_ACCEPTABLE_USE_POLICY
|
|
43
|
-
};
|
|
44
|
-
case 'HIPAA_CONTENT_DETECTED':
|
|
45
|
-
return {
|
|
46
|
-
message: _messages.messages.ai_summary_error_hipaa_content_detected
|
|
47
|
-
};
|
|
48
|
-
default:
|
|
49
|
-
return {
|
|
50
|
-
message: _messages.messages.ai_summary_error_generic,
|
|
51
|
-
url: _constants.CONTENT_URL_AI_TROUBLESHOOTING
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
36
|
var AIStateError = function AIStateError(_ref2) {
|
|
56
37
|
var appearance = _ref2.appearance,
|
|
57
38
|
testId = _ref2.testId,
|
|
58
39
|
error = _ref2.error;
|
|
59
|
-
var
|
|
60
|
-
message =
|
|
61
|
-
url =
|
|
40
|
+
var _getAISummaryErrorMes = (0, _aiSummary.getAISummaryErrorMessage)(error),
|
|
41
|
+
message = _getAISummaryErrorMes.message,
|
|
42
|
+
url = _getAISummaryErrorMes.url;
|
|
62
43
|
switch (appearance) {
|
|
63
44
|
case 'icon-only':
|
|
64
45
|
return null;
|
|
@@ -15,7 +15,7 @@ var _constants = require("../../../../../../constants");
|
|
|
15
15
|
var _actionGroup = _interopRequireDefault(require("../../action-group"));
|
|
16
16
|
var _block = _interopRequireDefault(require("../../block"));
|
|
17
17
|
var _elementGroup = _interopRequireDefault(require("../../element-group"));
|
|
18
|
-
var
|
|
18
|
+
var _motionWrapper = _interopRequireDefault(require("../../../common/motion-wrapper"));
|
|
19
19
|
var _aiStateIndicator = _interopRequireDefault(require("../ai-state-indicator"));
|
|
20
20
|
var _utils = require("../../utils");
|
|
21
21
|
var _messages = require("../../../../../../messages");
|
|
@@ -24,7 +24,7 @@ var _aiIcon = _interopRequireDefault(require("../../../../../common/ai-icon"));
|
|
|
24
24
|
var _aiSummary = _interopRequireDefault(require("../../../../../common/ai-summary"));
|
|
25
25
|
var _useAnalyticsEvents2 = require("../../../../../../common/analytics/generated/use-analytics-events");
|
|
26
26
|
var _aiEventSummaryViewed = _interopRequireDefault(require("../ai-event-summary-viewed"));
|
|
27
|
-
var _aiEventErrorViewed = _interopRequireDefault(require("
|
|
27
|
+
var _aiEventErrorViewed = _interopRequireDefault(require("../../../common/ai-summary/ai-event-error-viewed"));
|
|
28
28
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
29
29
|
var _react2 = require("@emotion/react");
|
|
30
30
|
var _featureDiscovery = _interopRequireDefault(require("../feature-discovery"));
|
|
@@ -38,7 +38,7 @@ var AISummaryBlockErrorIndicator = exports.AISummaryBlockErrorIndicator = functi
|
|
|
38
38
|
error = _ref.error,
|
|
39
39
|
showTransition = _ref.showTransition,
|
|
40
40
|
testId = _ref.testId;
|
|
41
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_motionWrapper.default, {
|
|
42
42
|
isFadeIn: true,
|
|
43
43
|
show: showErrorIndicator,
|
|
44
44
|
showTransition: showTransition
|
|
@@ -150,7 +150,7 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
150
150
|
}, props.overrideCss)
|
|
151
151
|
}), status === 'done' && /*#__PURE__*/_react.default.createElement(_aiEventSummaryViewed.default, {
|
|
152
152
|
fromCache: isSummarisedOnMountRef.current
|
|
153
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
153
|
+
}), /*#__PURE__*/_react.default.createElement(_motionWrapper.default, {
|
|
154
154
|
minHeight: aiSummaryMinHeight,
|
|
155
155
|
show: showAISummary,
|
|
156
156
|
showTransition: !isSummarisedOnMountRef.current
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var _useAnalyticsEvents2 = require("
|
|
8
|
+
var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
9
9
|
var AIEventErrorViewed = function AIEventErrorViewed(_ref) {
|
|
10
10
|
var reason = _ref.reason;
|
|
11
11
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
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
|
-
var _constants = require("
|
|
11
|
+
var _constants = require("../../../../../constants");
|
|
12
12
|
var _excluded = ["children"];
|
|
13
13
|
var AILearnMoreAnchor = function AILearnMoreAnchor(_ref) {
|
|
14
14
|
var children = _ref.children,
|
|
@@ -5,13 +5,13 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = exports.
|
|
8
|
+
exports.default = exports.MotionWrapper = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _primitives = require("@atlaskit/primitives");
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
var
|
|
14
|
+
var MotionWrapper = exports.MotionWrapper = function MotionWrapper(_ref) {
|
|
15
15
|
var children = _ref.children,
|
|
16
16
|
_ref$isFadeIn = _ref.isFadeIn,
|
|
17
17
|
isFadeIn = _ref$isFadeIn === void 0 ? false : _ref$isFadeIn,
|
|
@@ -52,4 +52,4 @@ var AIMotionWrapper = exports.AIMotionWrapper = function AIMotionWrapper(_ref) {
|
|
|
52
52
|
ref: ref
|
|
53
53
|
}, children) : null;
|
|
54
54
|
};
|
|
55
|
-
var _default = exports.default =
|
|
55
|
+
var _default = exports.default = MotionWrapper;
|
|
@@ -29,7 +29,7 @@ var _click = require("../../../utils/analytics/click");
|
|
|
29
29
|
var _store = require("../../../state/store");
|
|
30
30
|
var _forbidden = _interopRequireDefault(require("./views/forbidden"));
|
|
31
31
|
var _ContentContainer = _interopRequireDefault(require("./ContentContainer"));
|
|
32
|
-
var
|
|
32
|
+
var _aiSummary = require("../../../utils/ai-summary");
|
|
33
33
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
34
34
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
35
35
|
/** @jsx jsx */
|
|
@@ -93,7 +93,7 @@ var HoverCardContent = function HoverCardContent(_ref) {
|
|
|
93
93
|
var linkStatus = (_linkState$status = linkState.status) !== null && _linkState$status !== void 0 ? _linkState$status : 'pending';
|
|
94
94
|
var _useSmartLinkContext = (0, _linkProvider.useSmartLinkContext)(),
|
|
95
95
|
isAdminHubAIEnabled = _useSmartLinkContext.isAdminHubAIEnabled;
|
|
96
|
-
var isAISummaryEnabled = (0,
|
|
96
|
+
var isAISummaryEnabled = (0, _aiSummary.getIsAISummaryEnabled)(isAdminHubAIEnabled, cardState.details);
|
|
97
97
|
var services = (0, _helpers.getServices)(linkState.details);
|
|
98
98
|
var statusRef = (0, _react2.useRef)(linkStatus);
|
|
99
99
|
var analyticsRef = (0, _react2.useRef)(analytics);
|
|
@@ -188,13 +188,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref2) {
|
|
|
188
188
|
}), isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.ActionBlock, {
|
|
189
189
|
onClick: onActionClick,
|
|
190
190
|
spaceInline: "space.150"
|
|
191
|
-
}), isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.
|
|
192
|
-
secondary: [{
|
|
193
|
-
name: _constants.ElementName.Provider,
|
|
194
|
-
testId: 'smart-element-provider'
|
|
195
|
-
}],
|
|
196
|
-
testId: "smart-block-action-footer"
|
|
197
|
-
}), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.FooterBlock, {
|
|
191
|
+
}), isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.FooterBlock, null), !isAISummaryEnabled && !isActionBlockEnabled && /*#__PURE__*/_react.default.createElement(_blocks.FooterBlock, {
|
|
198
192
|
actions: footerActions,
|
|
199
193
|
size: _constants.SmartLinkSize.Large,
|
|
200
194
|
overrideCss: _styled.footerBlockCss
|
|
@@ -48,7 +48,7 @@ var getSimulatedBetterMetadata = function getSimulatedBetterMetadata(extensionKe
|
|
|
48
48
|
});
|
|
49
49
|
case 'trello-object-provider':
|
|
50
50
|
return {
|
|
51
|
-
primary: [_constants.ElementName.
|
|
51
|
+
primary: [_constants.ElementName.CollaboratorGroup, _constants.ElementName.State, _constants.ElementName.DueOn],
|
|
52
52
|
secondary: [_constants.ElementName.ReactCount, _constants.ElementName.CommentCount, _constants.ElementName.AttachmentCount, _constants.ElementName.ChecklistProgress],
|
|
53
53
|
subtitle: [_constants.ElementName.Location]
|
|
54
54
|
};
|
|
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
17
17
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
18
18
|
var PACKAGE_DATA = {
|
|
19
19
|
packageName: "@atlaskit/smart-card",
|
|
20
|
-
packageVersion: "26.
|
|
20
|
+
packageVersion: "26.60.0",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CardAction } from '../../../view/Card/types';
|
|
2
2
|
import { canShowAction } from '../../../utils/actions/can-show-action';
|
|
3
|
-
import { getIsAISummaryEnabled } from '../../../utils/
|
|
3
|
+
import { getIsAISummaryEnabled } from '../../../utils/ai-summary';
|
|
4
4
|
import { extractAri } from '@atlaskit/link-extractors';
|
|
5
5
|
export const extractAISummaryAction = (response, url, actionOptions, aiSummaryConfig) => {
|
|
6
6
|
if (!canShowAction(CardAction.AISummaryAction, actionOptions) || !getIsAISummaryEnabled(aiSummaryConfig === null || aiSummaryConfig === void 0 ? void 0 : aiSummaryConfig.isAdminHubAIEnabled, response) || !(aiSummaryConfig !== null && aiSummaryConfig !== void 0 && aiSummaryConfig.product) || !url) {
|
package/dist/es2019/i18n/cs.js
CHANGED
|
@@ -16,7 +16,8 @@ export default {
|
|
|
16
16
|
'fabric.linking.ai_summarized_info': 'Kvalita informací se může různit. <a>Další informace</a>',
|
|
17
17
|
'fabric.linking.ai_summarizing': 'Atlassian Intelligence pracuje…',
|
|
18
18
|
'fabric.linking.ai_summary_error_acceptable_use_violation': 'Výsledky tohoto souhrnu nemůžeme zobrazit, protože jsou v rozporu se <a>Zásadami přijatelného používání společnosti Atlassian</a>.',
|
|
19
|
-
'fabric.linking.ai_summary_error_generic': 'Atlassian Intelligence
|
|
19
|
+
'fabric.linking.ai_summary_error_generic': 'Atlassian Intelligence (AI) neodpovídá. Zkuste to znovu později nebo <a>zkontrolujte stav AI</a>.',
|
|
20
|
+
'fabric.linking.ai_summary_error_hipaa_content_detected': 'Atlassian Intelligence nedokázala zpracovat vaši žádost, protože váš obsah obsahuje odkazy na obsah omezený HIPAA.',
|
|
20
21
|
'fabric.linking.assigned_to': 'Přiřazeno k: {context}',
|
|
21
22
|
'fabric.linking.beta': 'Beta',
|
|
22
23
|
'fabric.linking.cancel': 'Zrušit',
|
package/dist/es2019/i18n/da.js
CHANGED
|
@@ -16,7 +16,8 @@ export default {
|
|
|
16
16
|
'fabric.linking.ai_summarized_info': 'Informationskvaliteten kan variere. <a>Få mere at vide</a>',
|
|
17
17
|
'fabric.linking.ai_summarizing': 'Atlassian Intelligence arbejder ...',
|
|
18
18
|
'fabric.linking.ai_summary_error_acceptable_use_violation': 'Vi kan ikke vise resultaterne af denne oversigt, da det er i strid med <a>Atlassians politik for acceptabel brug</a>.',
|
|
19
|
-
'fabric.linking.ai_summary_error_generic': 'Atlassian Intelligence
|
|
19
|
+
'fabric.linking.ai_summary_error_generic': 'Atlassian Intelligence (AI) svarer ikke. Prøv igen senere, eller <a>kontrollér status for AI</a>.',
|
|
20
|
+
'fabric.linking.ai_summary_error_hipaa_content_detected': 'Atlassian Intelligence kunne ikke behandle din anmodning, da dit indhold indeholder links til HIPAA-begrænset indhold.',
|
|
20
21
|
'fabric.linking.assigned_to': 'Tildelt til {context}',
|
|
21
22
|
'fabric.linking.beta': 'Beta',
|
|
22
23
|
'fabric.linking.cancel': 'Annuller',
|
package/dist/es2019/i18n/de.js
CHANGED
|
@@ -16,7 +16,8 @@ export default {
|
|
|
16
16
|
'fabric.linking.ai_summarized_info': 'Die Qualität der Informationen kann variieren. <a>Weitere Informationen</a>',
|
|
17
17
|
'fabric.linking.ai_summarizing': 'Atlassian Intelligence arbeitet …',
|
|
18
18
|
'fabric.linking.ai_summary_error_acceptable_use_violation': 'Die Ergebnisse dieser Zusammenfassung können nicht angezeigt werden, da sie gegen die <a>Richtlinie zur akzeptablen Nutzung von Atlassian verstößt</a>.',
|
|
19
|
-
'fabric.linking.ai_summary_error_generic': 'Atlassian Intelligence
|
|
19
|
+
'fabric.linking.ai_summary_error_generic': 'Atlassian Intelligence (AI) reagiert nicht. Versuchen Sie es später erneut oder <a>überprüfen Sie den Status von AI</a>.',
|
|
20
|
+
'fabric.linking.ai_summary_error_hipaa_content_detected': 'Atlassian Intelligence konnte Ihre Anfrage nicht bearbeiten, da sie Links zu HIPAA-beschränkten Inhalten enthält.',
|
|
20
21
|
'fabric.linking.assigned_to': 'Zugewiesen an {context}',
|
|
21
22
|
'fabric.linking.beta': 'Beta',
|
|
22
23
|
'fabric.linking.cancel': 'Abbrechen',
|
package/dist/es2019/i18n/en.js
CHANGED
|
@@ -16,7 +16,8 @@ export default {
|
|
|
16
16
|
'fabric.linking.ai_summarized_info': 'Information quality may vary. <a>Learn more</a>',
|
|
17
17
|
'fabric.linking.ai_summarizing': 'Atlassian Intelligence is working...',
|
|
18
18
|
'fabric.linking.ai_summary_error_acceptable_use_violation': "We cannot show the results of this summary as it goes against <a>Atlassian's Acceptable Use Policy</a>.",
|
|
19
|
-
'fabric.linking.ai_summary_error_generic':
|
|
19
|
+
'fabric.linking.ai_summary_error_generic': 'Atlassian Intelligence (AI) isn’t responding. Try again later or <a>check the status of AI</a>.',
|
|
20
|
+
'fabric.linking.ai_summary_error_hipaa_content_detected': 'Atlassian Intelligence was unable to process your request as your content contains links to HIPAA restricted content.',
|
|
20
21
|
'fabric.linking.assigned_to': 'Assigned to {context}',
|
|
21
22
|
'fabric.linking.beta': 'Beta',
|
|
22
23
|
'fabric.linking.cancel': 'Cancel',
|
|
@@ -36,6 +37,7 @@ export default {
|
|
|
36
37
|
'fabric.linking.connect_unauthorised_account_description': 'Connect your {context} account to collaborate on work across Atlassian products.',
|
|
37
38
|
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Connect your account to collaborate on work across Atlassian products.',
|
|
38
39
|
'fabric.linking.continue': 'Continue',
|
|
40
|
+
'fabric.linking.copied_url_to_clipboard.nonfinal': 'Copied!',
|
|
39
41
|
'fabric.linking.copy_url_to_clipboard': 'Copy link',
|
|
40
42
|
'fabric.linking.couldnt_load_link': "We couldn't load this link for an unknown reason.",
|
|
41
43
|
'fabric.linking.create_on_absolute': 'Created on {context}',
|
|
@@ -46,6 +48,8 @@ export default {
|
|
|
46
48
|
'fabric.linking.direct_access_description': 'Your team uses {product} to collaborate and you can start using it right away!',
|
|
47
49
|
'fabric.linking.direct_access_title': 'Join {product} to view this content',
|
|
48
50
|
'fabric.linking.download': 'Download',
|
|
51
|
+
'fabric.linking.download_description.nonfinal': 'Download this file into your local storage',
|
|
52
|
+
'fabric.linking.download_file.nonfinal': 'Download file',
|
|
49
53
|
'fabric.linking.edit': 'Edit',
|
|
50
54
|
'fabric.linking.follow': 'Follow',
|
|
51
55
|
'fabric.linking.forbidden_access': 'Your access is forbidden',
|
|
@@ -16,7 +16,8 @@ export default {
|
|
|
16
16
|
'fabric.linking.ai_summarized_info': 'Information quality may vary. <a>Learn more</a>',
|
|
17
17
|
'fabric.linking.ai_summarizing': 'Atlassian Intelligence is working...',
|
|
18
18
|
'fabric.linking.ai_summary_error_acceptable_use_violation': "We cannot show the results of this summary as it goes against <a>Atlassian's Acceptable Use Policy</a>.",
|
|
19
|
-
'fabric.linking.ai_summary_error_generic':
|
|
19
|
+
'fabric.linking.ai_summary_error_generic': 'Atlassian Intelligence (AI) isn’t responding. Try again later or <a>check the status of AI</a>.',
|
|
20
|
+
'fabric.linking.ai_summary_error_hipaa_content_detected': 'Atlassian Intelligence was unable to process your request as your content contains links to HIPAA restricted content.',
|
|
20
21
|
'fabric.linking.assigned_to': 'Assigned to {context}',
|
|
21
22
|
'fabric.linking.beta': 'Beta',
|
|
22
23
|
'fabric.linking.cancel': 'Cancel',
|
|
@@ -36,6 +37,7 @@ export default {
|
|
|
36
37
|
'fabric.linking.connect_unauthorised_account_description': 'Connect your {context} account to collaborate on work across Atlassian products.',
|
|
37
38
|
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Connect your account to collaborate on work across Atlassian products.',
|
|
38
39
|
'fabric.linking.continue': 'Continue',
|
|
40
|
+
'fabric.linking.copied_url_to_clipboard.nonfinal': 'Copied!',
|
|
39
41
|
'fabric.linking.copy_url_to_clipboard': 'Copy link',
|
|
40
42
|
'fabric.linking.couldnt_load_link': "We couldn't load this link for an unknown reason.",
|
|
41
43
|
'fabric.linking.create_on_absolute': 'Created on {context}',
|
|
@@ -46,6 +48,8 @@ export default {
|
|
|
46
48
|
'fabric.linking.direct_access_description': 'Your team uses {product} to collaborate and you can start using it right away!',
|
|
47
49
|
'fabric.linking.direct_access_title': 'Join {product} to view this content',
|
|
48
50
|
'fabric.linking.download': 'Download',
|
|
51
|
+
'fabric.linking.download_description.nonfinal': 'Download this file into your local storage',
|
|
52
|
+
'fabric.linking.download_file.nonfinal': 'Download file',
|
|
49
53
|
'fabric.linking.edit': 'Edit',
|
|
50
54
|
'fabric.linking.follow': 'Follow',
|
|
51
55
|
'fabric.linking.forbidden_access': 'Your access is forbidden',
|
|
@@ -12,10 +12,14 @@ export default {
|
|
|
12
12
|
'fabric.linking.add_account': 'Add account',
|
|
13
13
|
'fabric.linking.ai_summarize': 'Summarize',
|
|
14
14
|
'fabric.linking.ai_summarized': 'Summarized by Atlassian Intelligence',
|
|
15
|
+
'fabric.linking.ai_summarized_abbreviation': 'Summarized by AI',
|
|
15
16
|
'fabric.linking.ai_summarized_info': 'Information quality may vary. <a>Learn more</a>',
|
|
16
17
|
'fabric.linking.ai_summarizing': 'Atlassian Intelligence is working...',
|
|
17
|
-
'fabric.linking.
|
|
18
|
+
'fabric.linking.ai_summary_error_acceptable_use_violation': "We cannot show the results of this summary as it goes against <a>Atlassian's Acceptable Use Policy</a>.",
|
|
19
|
+
'fabric.linking.ai_summary_error_generic': 'Atlassian Intelligence (AI) isn’t responding. Try again later or <a>check the status of AI</a>.',
|
|
20
|
+
'fabric.linking.ai_summary_error_hipaa_content_detected': 'Atlassian Intelligence was unable to process your request as your content contains links to HIPAA restricted content.',
|
|
18
21
|
'fabric.linking.assigned_to': 'Assigned to {context}',
|
|
22
|
+
'fabric.linking.beta': 'Beta',
|
|
19
23
|
'fabric.linking.cancel': 'Cancel',
|
|
20
24
|
'fabric.linking.cannot_connect': "Can't connect, try again",
|
|
21
25
|
'fabric.linking.cannot_find_link': "Can't find link",
|
|
@@ -33,6 +37,7 @@ export default {
|
|
|
33
37
|
'fabric.linking.connect_unauthorised_account_description': 'Connect your {context} account to collaborate on work across Atlassian products.',
|
|
34
38
|
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Connect your account to collaborate on work across Atlassian products.',
|
|
35
39
|
'fabric.linking.continue': 'Continue',
|
|
40
|
+
'fabric.linking.copied_url_to_clipboard.nonfinal': 'Copied!',
|
|
36
41
|
'fabric.linking.copy_url_to_clipboard': 'Copy link',
|
|
37
42
|
'fabric.linking.couldnt_load_link': "We couldn't load this link for an unknown reason.",
|
|
38
43
|
'fabric.linking.create_on_absolute': 'Created on {context}',
|
|
@@ -43,6 +48,8 @@ export default {
|
|
|
43
48
|
'fabric.linking.direct_access_description': 'Your team uses {product} to collaborate and you can start using it right away!',
|
|
44
49
|
'fabric.linking.direct_access_title': 'Join {product} to view this content',
|
|
45
50
|
'fabric.linking.download': 'Download',
|
|
51
|
+
'fabric.linking.download_description.nonfinal': 'Download this file into your local storage',
|
|
52
|
+
'fabric.linking.download_file.nonfinal': 'Download file',
|
|
46
53
|
'fabric.linking.edit': 'Edit',
|
|
47
54
|
'fabric.linking.follow': 'Follow',
|
|
48
55
|
'fabric.linking.forbidden_access': 'Your access is forbidden',
|
|
@@ -69,6 +76,7 @@ export default {
|
|
|
69
76
|
'fabric.linking.owned_by': 'Owned by {context}',
|
|
70
77
|
'fabric.linking.pending_request': 'Your access request is pending',
|
|
71
78
|
'fabric.linking.preview_close': 'Close preview',
|
|
79
|
+
'fabric.linking.preview_description.nonfinal': 'Open a full screen preview of this link',
|
|
72
80
|
'fabric.linking.preview_improved': 'Open preview',
|
|
73
81
|
'fabric.linking.preview_max_size': 'View full screen',
|
|
74
82
|
'fabric.linking.preview_min_size': 'Close full screen',
|