@atlaskit/smart-card 26.42.11 → 26.42.12
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 +6 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/components/Action.js +8 -5
- package/dist/cjs/view/BlockCard/components/ActionList.js +11 -9
- package/dist/cjs/view/BlockCard/components/CollaboratorList.js +5 -2
- package/dist/cjs/view/BlockCard/components/Content.js +4 -1
- package/dist/cjs/view/BlockCard/components/ContentFooter.js +4 -1
- package/dist/cjs/view/BlockCard/components/ContentHeader.js +4 -1
- package/dist/cjs/view/BlockCard/components/Emoji.js +5 -2
- package/dist/cjs/view/BlockCard/components/Frame.js +6 -5
- package/dist/cjs/view/BlockCard/components/Link.js +4 -1
- package/dist/cjs/view/BlockCard/components/Name.js +4 -1
- package/dist/cjs/view/BlockCard/components/Provider.js +6 -3
- package/dist/cjs/view/BlockCard/components/Thumbnail.js +6 -5
- package/dist/cjs/view/BlockCard/components/UnresolvedText.js +4 -1
- package/dist/cjs/view/BlockCard/index.js +19 -16
- package/dist/cjs/view/BlockCard/views/ErroredView.js +12 -11
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +12 -9
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +11 -10
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +16 -13
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +7 -4
- package/dist/cjs/view/BlockCard/views/UnauthorizedView.js +10 -9
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +5 -4
- package/dist/cjs/view/BlockCard/views/flexible/utils/withFlexibleUIBlockCardStyle.js +5 -2
- package/dist/cjs/view/EmbedCard/components/Frame.js +15 -12
- package/dist/cjs/view/EmbedCard/components/IframeDwellTracker.js +2 -0
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +8 -5
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +12 -9
- package/dist/cjs/view/EmbedCard/views/UnresolvedView.js +10 -8
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +14 -11
- package/dist/cjs/view/EmbedModal/components/embed-content/index.js +2 -1
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +27 -24
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +5 -4
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +6 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +5 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +9 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +0 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +0 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +6 -5
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -3
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +6 -3
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/container/index.js +4 -3
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/elements/atlaskit-badge/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +6 -5
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +5 -4
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +4 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +4 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/feature-discovery/index.js +10 -7
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +19 -16
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +14 -13
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +6 -4
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +12 -10
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/elements/preview/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/elements/snippet-element/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +2 -1
- package/dist/cjs/view/HoverCard/components/CustomPopupContainer.js +3 -1
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +29 -26
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +19 -16
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +15 -12
- package/dist/cjs/view/HoverCard/index.js +9 -6
- package/dist/cjs/view/LinkUrl/LinkWarningModal/index.js +12 -9
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/Byline.js +4 -1
- package/dist/cjs/view/common/Icon.js +5 -4
- package/dist/cjs/view/common/Metadata.js +7 -4
- package/dist/cjs/view/common/MetadataList.js +5 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/components/Action.js +5 -3
- package/dist/es2019/view/BlockCard/components/ActionList.js +10 -8
- package/dist/es2019/view/BlockCard/components/CollaboratorList.js +4 -2
- package/dist/es2019/view/BlockCard/components/Content.js +3 -1
- package/dist/es2019/view/BlockCard/components/ContentFooter.js +3 -1
- package/dist/es2019/view/BlockCard/components/ContentHeader.js +3 -1
- package/dist/es2019/view/BlockCard/components/Emoji.js +3 -1
- package/dist/es2019/view/BlockCard/components/Frame.js +5 -3
- package/dist/es2019/view/BlockCard/components/Link.js +3 -1
- package/dist/es2019/view/BlockCard/components/Name.js +3 -1
- package/dist/es2019/view/BlockCard/components/Provider.js +5 -3
- package/dist/es2019/view/BlockCard/components/Thumbnail.js +6 -4
- package/dist/es2019/view/BlockCard/components/UnresolvedText.js +3 -1
- package/dist/es2019/view/BlockCard/index.js +19 -16
- package/dist/es2019/view/BlockCard/views/ErroredView.js +10 -8
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +11 -9
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +10 -8
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +15 -13
- package/dist/es2019/view/BlockCard/views/ResolvingView.js +6 -4
- package/dist/es2019/view/BlockCard/views/UnauthorizedView.js +10 -8
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +6 -5
- package/dist/es2019/view/BlockCard/views/flexible/utils/withFlexibleUIBlockCardStyle.js +4 -2
- package/dist/es2019/view/EmbedCard/components/Frame.js +4 -2
- package/dist/es2019/view/EmbedCard/components/IframeDwellTracker.js +1 -0
- package/dist/es2019/view/EmbedCard/views/ErroredView.js +7 -5
- package/dist/es2019/view/EmbedCard/views/ResolvedView.js +6 -4
- package/dist/es2019/view/EmbedCard/views/UnresolvedView.js +10 -9
- package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +10 -8
- package/dist/es2019/view/EmbedModal/components/embed-content/index.js +4 -2
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +22 -20
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +6 -5
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +5 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +10 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +0 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +7 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -3
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +5 -3
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.js +5 -4
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/elements/atlaskit-badge/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +7 -6
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +6 -5
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +5 -4
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +5 -4
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/feature-discovery/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +6 -4
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -8
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +7 -5
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/preview/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/elements/snippet-element/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +3 -2
- package/dist/es2019/view/HoverCard/components/CustomPopupContainer.js +3 -1
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +7 -5
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +9 -7
- package/dist/es2019/view/HoverCard/components/views/resolving/index.js +13 -11
- package/dist/es2019/view/HoverCard/index.js +6 -4
- package/dist/es2019/view/LinkUrl/LinkWarningModal/index.js +11 -9
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/Byline.js +3 -1
- package/dist/es2019/view/common/Icon.js +6 -5
- package/dist/es2019/view/common/Metadata.js +6 -4
- package/dist/es2019/view/common/MetadataList.js +4 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/components/Action.js +5 -3
- package/dist/esm/view/BlockCard/components/ActionList.js +11 -9
- package/dist/esm/view/BlockCard/components/CollaboratorList.js +4 -2
- package/dist/esm/view/BlockCard/components/Content.js +3 -1
- package/dist/esm/view/BlockCard/components/ContentFooter.js +3 -1
- package/dist/esm/view/BlockCard/components/ContentHeader.js +3 -1
- package/dist/esm/view/BlockCard/components/Emoji.js +3 -1
- package/dist/esm/view/BlockCard/components/Frame.js +5 -3
- package/dist/esm/view/BlockCard/components/Link.js +3 -1
- package/dist/esm/view/BlockCard/components/Name.js +3 -1
- package/dist/esm/view/BlockCard/components/Provider.js +5 -3
- package/dist/esm/view/BlockCard/components/Thumbnail.js +6 -4
- package/dist/esm/view/BlockCard/components/UnresolvedText.js +3 -1
- package/dist/esm/view/BlockCard/index.js +19 -16
- package/dist/esm/view/BlockCard/views/ErroredView.js +10 -8
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +11 -9
- package/dist/esm/view/BlockCard/views/NotFoundView.js +10 -8
- package/dist/esm/view/BlockCard/views/ResolvedView.js +15 -13
- package/dist/esm/view/BlockCard/views/ResolvingView.js +6 -4
- package/dist/esm/view/BlockCard/views/UnauthorizedView.js +10 -8
- package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +6 -5
- package/dist/esm/view/BlockCard/views/flexible/utils/withFlexibleUIBlockCardStyle.js +4 -2
- package/dist/esm/view/EmbedCard/components/Frame.js +4 -2
- package/dist/esm/view/EmbedCard/components/IframeDwellTracker.js +1 -0
- package/dist/esm/view/EmbedCard/views/ErroredView.js +7 -5
- package/dist/esm/view/EmbedCard/views/ResolvedView.js +6 -4
- package/dist/esm/view/EmbedCard/views/UnresolvedView.js +10 -9
- package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +10 -8
- package/dist/esm/view/EmbedModal/components/embed-content/index.js +4 -2
- package/dist/esm/view/EmbedModal/components/link-info/index.js +22 -20
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +6 -5
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +5 -3
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +10 -9
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +0 -2
- package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +0 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +7 -6
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +5 -3
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +5 -3
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/container/index.js +5 -4
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/elements/atlaskit-badge/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +7 -6
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +6 -5
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +5 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +5 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/feature-discovery/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +6 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -8
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +5 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +7 -5
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/preview/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/elements/snippet-element/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +3 -2
- package/dist/esm/view/HoverCard/components/CustomPopupContainer.js +3 -1
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +7 -5
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +9 -7
- package/dist/esm/view/HoverCard/components/views/resolving/index.js +13 -11
- package/dist/esm/view/HoverCard/index.js +6 -4
- package/dist/esm/view/LinkUrl/LinkWarningModal/index.js +11 -9
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/Byline.js +3 -1
- package/dist/esm/view/common/Icon.js +6 -5
- package/dist/esm/view/common/Metadata.js +6 -4
- package/dist/esm/view/common/MetadataList.js +4 -2
- package/package.json +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import DocumentFilledIcon from '@atlaskit/icon/glyph/document-filled';
|
|
2
4
|
import { N50, N90 } from '@atlaskit/theme/colors';
|
|
3
5
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
@@ -12,21 +14,21 @@ export var ResolvingView = function ResolvingView(_ref) {
|
|
|
12
14
|
_ref$testId = _ref.testId,
|
|
13
15
|
testId = _ref$testId === void 0 ? 'block-card-resolving-view' : _ref$testId,
|
|
14
16
|
inheritDimensions = _ref.inheritDimensions;
|
|
15
|
-
return
|
|
17
|
+
return jsx(Frame, {
|
|
16
18
|
inheritDimensions: inheritDimensions,
|
|
17
19
|
compact: true,
|
|
18
20
|
isSelected: isSelected,
|
|
19
21
|
testId: testId,
|
|
20
22
|
className: blockCardResolvingViewClassName
|
|
21
|
-
},
|
|
23
|
+
}, jsx(DocumentFilledIcon, {
|
|
22
24
|
size: "small",
|
|
23
25
|
primaryColor: "var(--ds-icon-subtle, ".concat(N50, ")"),
|
|
24
26
|
label: "document-icon"
|
|
25
|
-
}),
|
|
27
|
+
}), jsx("span", {
|
|
26
28
|
css: {
|
|
27
29
|
fontSize: "".concat(fontSize(), "px"),
|
|
28
30
|
color: "var(--ds-text-subtlest, ".concat(N90, ")"),
|
|
29
31
|
marginLeft: gs(0.5)
|
|
30
32
|
}
|
|
31
|
-
},
|
|
33
|
+
}, jsx(FormattedMessage, messages.loading)));
|
|
32
34
|
};
|
|
@@ -2,6 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
5
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
8
|
import { Frame } from '../components/Frame';
|
|
7
9
|
import { Provider } from '../components/Provider';
|
|
@@ -34,29 +36,29 @@ export var UnauthorizedView = function UnauthorizedView(_ref) {
|
|
|
34
36
|
var handleClick = function handleClick(event) {
|
|
35
37
|
return handleClickCommon(event, onClick);
|
|
36
38
|
};
|
|
37
|
-
return
|
|
39
|
+
return jsx(Frame, {
|
|
38
40
|
isSelected: isSelected,
|
|
39
41
|
testId: testId,
|
|
40
42
|
isFluidHeight: true
|
|
41
|
-
},
|
|
43
|
+
}, jsx(Content, {
|
|
42
44
|
isCompact: true
|
|
43
|
-
},
|
|
45
|
+
}, jsx("div", null, jsx(ContentHeader, {
|
|
44
46
|
onClick: handleClick,
|
|
45
47
|
link: link
|
|
46
|
-
},
|
|
48
|
+
}, jsx(Link, {
|
|
47
49
|
url: link,
|
|
48
50
|
testId: testId
|
|
49
|
-
})),
|
|
51
|
+
})), jsx(Byline, {
|
|
50
52
|
testId: testId ? "".concat(testId, "-byline") : undefined,
|
|
51
|
-
text:
|
|
53
|
+
text: jsx(FormattedMessage, _extends({}, textBylineProps, {
|
|
52
54
|
values: {
|
|
53
55
|
context: context.text
|
|
54
56
|
}
|
|
55
57
|
}))
|
|
56
|
-
})),
|
|
58
|
+
})), jsx(ContentFooter, null, jsx(Provider, {
|
|
57
59
|
name: context.text,
|
|
58
60
|
icon: context.icon
|
|
59
|
-
}), showActions &&
|
|
61
|
+
}), showActions && jsx(ActionList, {
|
|
60
62
|
items: actions
|
|
61
63
|
}))));
|
|
62
64
|
};
|
|
@@ -3,7 +3,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
4
|
var _excluded = ["testId"];
|
|
5
5
|
var _templateObject;
|
|
6
|
-
|
|
6
|
+
/** @jsx jsx */
|
|
7
|
+
import { css, jsx } from '@emotion/react';
|
|
7
8
|
import { useCallback, useMemo } from 'react';
|
|
8
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
9
10
|
import { getExtensionKey, hasAuthScopeOverrides } from '../../../../state/helpers';
|
|
@@ -43,12 +44,12 @@ var FlexibleUnauthorisedView = function FlexibleUnauthorisedView(_ref) {
|
|
|
43
44
|
}
|
|
44
45
|
}, [onAuthorize, extensionKey, analytics === null || analytics === void 0 ? void 0 : analytics.track]);
|
|
45
46
|
var content = useMemo(function () {
|
|
46
|
-
return onAuthorize ?
|
|
47
|
+
return onAuthorize ? jsx(UnauthorisedViewContent, {
|
|
47
48
|
providerName: providerName,
|
|
48
49
|
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
49
50
|
analytics: analytics,
|
|
50
51
|
testId: testId
|
|
51
|
-
}) :
|
|
52
|
+
}) : jsx(FormattedMessage, _extends({}, messages[providerName ? 'unauthorised_account_description' : 'unauthorised_account_description_no_provider'], {
|
|
52
53
|
values: {
|
|
53
54
|
context: providerName
|
|
54
55
|
}
|
|
@@ -57,10 +58,10 @@ var FlexibleUnauthorisedView = function FlexibleUnauthorisedView(_ref) {
|
|
|
57
58
|
var actions = useMemo(function () {
|
|
58
59
|
return onAuthorize ? [AuthorizeAction(handleAuthorize, providerName)] : [];
|
|
59
60
|
}, [handleAuthorize, onAuthorize, providerName]);
|
|
60
|
-
return
|
|
61
|
+
return jsx(UnresolvedView, _extends({}, props, {
|
|
61
62
|
actions: actions,
|
|
62
63
|
testId: testId
|
|
63
|
-
}),
|
|
64
|
+
}), jsx("div", {
|
|
64
65
|
css: contentStyles,
|
|
65
66
|
"data-testid": "".concat(testId, "-content")
|
|
66
67
|
}, content));
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { flexibleBlockCardStyle } from '../styled';
|
|
2
4
|
export var withFlexibleUIBlockCardStyle = function withFlexibleUIBlockCardStyle(FlexibleBlockCardView) {
|
|
3
5
|
return function (props) {
|
|
4
|
-
return
|
|
6
|
+
return jsx("div", {
|
|
5
7
|
css: flexibleBlockCardStyle
|
|
6
|
-
},
|
|
8
|
+
}, jsx(FlexibleBlockCardView, props));
|
|
7
9
|
};
|
|
8
10
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import React, { useEffect, useState, useRef } from 'react';
|
|
3
5
|
import { di } from 'react-magnetic-di';
|
|
4
6
|
import { getIframeSandboxAttribute } from '../../../utils';
|
|
@@ -85,13 +87,13 @@ export var Frame = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef) {
|
|
|
85
87
|
if (!url) {
|
|
86
88
|
return null;
|
|
87
89
|
}
|
|
88
|
-
return
|
|
90
|
+
return jsx(React.Fragment, null, jsx(IframeDwellTracker, {
|
|
89
91
|
isIframeLoaded: isIframeLoaded,
|
|
90
92
|
isMouseOver: isMouseOver,
|
|
91
93
|
isWindowFocused: isWindowFocused,
|
|
92
94
|
iframePercentVisible: percentVisible,
|
|
93
95
|
onIframeDwell: onIframeDwell
|
|
94
|
-
}),
|
|
96
|
+
}), jsx(IFrame, {
|
|
95
97
|
childRef: mergedRef,
|
|
96
98
|
src: url,
|
|
97
99
|
"data-testid": "".concat(testId, "-frame"),
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
2
4
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
3
5
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
@@ -13,16 +15,16 @@ export var EmbedCardErroredView = function EmbedCardErroredView(_ref) {
|
|
|
13
15
|
_ref$testId = _ref.testId,
|
|
14
16
|
testId = _ref$testId === void 0 ? 'embed-card-errored-view' : _ref$testId,
|
|
15
17
|
inheritDimensions = _ref.inheritDimensions;
|
|
16
|
-
return
|
|
18
|
+
return jsx(Frame, {
|
|
17
19
|
inheritDimensions: inheritDimensions,
|
|
18
20
|
compact: true,
|
|
19
21
|
isSelected: isSelected,
|
|
20
22
|
testId: testId
|
|
21
|
-
},
|
|
23
|
+
}, jsx(ErrorIcon, {
|
|
22
24
|
size: "small",
|
|
23
25
|
primaryColor: "var(--ds-icon-danger, ".concat(R300, ")"),
|
|
24
26
|
label: "error-icon"
|
|
25
|
-
}),
|
|
27
|
+
}), jsx("span", {
|
|
26
28
|
css: {
|
|
27
29
|
fontSize: "".concat(fontSize(), "px"),
|
|
28
30
|
marginLeft: gs(0.5),
|
|
@@ -35,10 +37,10 @@ export var EmbedCardErroredView = function EmbedCardErroredView(_ref) {
|
|
|
35
37
|
// Fallback options.
|
|
36
38
|
maxHeight: gs(3)
|
|
37
39
|
}
|
|
38
|
-
},
|
|
40
|
+
}, jsx(FormattedMessage, messages.could_not_load_link)), jsx(Button, {
|
|
39
41
|
testId: "err-view-retry",
|
|
40
42
|
appearance: "link",
|
|
41
43
|
spacing: "none",
|
|
42
44
|
onClick: onRetry
|
|
43
|
-
},
|
|
45
|
+
}, jsx(FormattedMessage, messages.try_again)));
|
|
44
46
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import LinkGlyph from '@atlaskit/icon/glyph/link';
|
|
3
5
|
import { ExpandedFrame } from '../components/ExpandedFrame';
|
|
@@ -24,7 +26,7 @@ export var EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
|
24
26
|
var src = typeof iconFromContext === 'string' ? iconFromContext : undefined;
|
|
25
27
|
var text = title || (context === null || context === void 0 ? void 0 : context.text);
|
|
26
28
|
var linkGlyph = React.useMemo(function () {
|
|
27
|
-
return
|
|
29
|
+
return jsx(LinkGlyph, {
|
|
28
30
|
label: "icon",
|
|
29
31
|
size: "small",
|
|
30
32
|
testId: "embed-card-fallback-icon"
|
|
@@ -34,7 +36,7 @@ export var EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
|
34
36
|
if ( /*#__PURE__*/React.isValidElement(iconFromContext)) {
|
|
35
37
|
return iconFromContext;
|
|
36
38
|
}
|
|
37
|
-
return
|
|
39
|
+
return jsx(ImageIcon, {
|
|
38
40
|
src: src,
|
|
39
41
|
default: linkGlyph
|
|
40
42
|
});
|
|
@@ -45,7 +47,7 @@ export var EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
|
45
47
|
if (previewUrl && isSupportTheming && colorMode) {
|
|
46
48
|
previewUrl = "".concat(previewUrl).concat(previewUrl.includes('?') ? '&' : '?', "themeMode=").concat(colorMode);
|
|
47
49
|
}
|
|
48
|
-
return
|
|
50
|
+
return jsx(ExpandedFrame, {
|
|
49
51
|
isSelected: isSelected,
|
|
50
52
|
isFrameVisible: isFrameVisible,
|
|
51
53
|
frameStyle: frameStyle,
|
|
@@ -55,7 +57,7 @@ export var EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
|
55
57
|
text: text,
|
|
56
58
|
onClick: onClick,
|
|
57
59
|
inheritDimensions: inheritDimensions
|
|
58
|
-
},
|
|
60
|
+
}, jsx(Frame, {
|
|
59
61
|
url: previewUrl,
|
|
60
62
|
isTrusted: isTrusted,
|
|
61
63
|
testId: testId,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
3
|
-
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
4
5
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
5
6
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
6
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -19,7 +20,7 @@ export var EmbedCardUnresolvedView = function EmbedCardUnresolvedView(_ref) {
|
|
|
19
20
|
onClick = _ref.onClick,
|
|
20
21
|
testId = _ref.testId,
|
|
21
22
|
children = _ref.children;
|
|
22
|
-
return
|
|
23
|
+
return jsx("div", {
|
|
23
24
|
css: {
|
|
24
25
|
display: 'flex',
|
|
25
26
|
flexDirection: 'column',
|
|
@@ -29,14 +30,14 @@ export var EmbedCardUnresolvedView = function EmbedCardUnresolvedView(_ref) {
|
|
|
29
30
|
paddingBottom: gridSize(6)
|
|
30
31
|
},
|
|
31
32
|
"data-testid": "".concat(testId, "-unresolved-container")
|
|
32
|
-
},
|
|
33
|
+
}, jsx("img", {
|
|
33
34
|
src: image,
|
|
34
35
|
css: {
|
|
35
36
|
height: gridSize(14),
|
|
36
37
|
marginBottom: gridSize(4)
|
|
37
38
|
},
|
|
38
39
|
"data-testid": "".concat(testId, "-unresolved-image")
|
|
39
|
-
}),
|
|
40
|
+
}), jsx("span", {
|
|
40
41
|
css: {
|
|
41
42
|
fontSize: gridSize(2.5),
|
|
42
43
|
marginBottom: gridSize(1.5),
|
|
@@ -44,11 +45,11 @@ export var EmbedCardUnresolvedView = function EmbedCardUnresolvedView(_ref) {
|
|
|
44
45
|
textAlign: 'center'
|
|
45
46
|
},
|
|
46
47
|
"data-testid": "".concat(testId, "-unresolved-title")
|
|
47
|
-
},
|
|
48
|
+
}, jsx(FormattedMessage, _extends({}, messages[title], {
|
|
48
49
|
values: {
|
|
49
50
|
context: context
|
|
50
51
|
}
|
|
51
|
-
}))),
|
|
52
|
+
}))), jsx("span", {
|
|
52
53
|
css: {
|
|
53
54
|
fontSize: fontSize(),
|
|
54
55
|
marginBottom: gridSize(2.5),
|
|
@@ -57,15 +58,15 @@ export var EmbedCardUnresolvedView = function EmbedCardUnresolvedView(_ref) {
|
|
|
57
58
|
lineHeight: gridSize(3)
|
|
58
59
|
},
|
|
59
60
|
"data-testid": "".concat(testId, "-unresolved-description")
|
|
60
|
-
}, children !== null && children !== void 0 ? children :
|
|
61
|
+
}, children !== null && children !== void 0 ? children : jsx(FormattedMessage, _extends({}, messages[description], {
|
|
61
62
|
values: {
|
|
62
63
|
context: context
|
|
63
64
|
}
|
|
64
|
-
}))), button &&
|
|
65
|
+
}))), button && jsx(Button, {
|
|
65
66
|
testId: "button-".concat(button.testId || testId),
|
|
66
67
|
appearance: button.appearance,
|
|
67
68
|
onClick: onClick
|
|
68
|
-
},
|
|
69
|
+
}, jsx(FormattedMessage, _extends({}, messages[button.text], {
|
|
69
70
|
values: {
|
|
70
71
|
context: context
|
|
71
72
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import LinkGlyph from '@atlaskit/icon/glyph/link';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import React, { useMemo } from 'react';
|
|
3
5
|
import { ExpandedFrame } from '../../components/ExpandedFrame';
|
|
4
6
|
import { ImageIcon } from '../../components/ImageIcon';
|
|
@@ -19,16 +21,16 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
19
21
|
if ( /*#__PURE__*/React.isValidElement(iconUrlOrElement)) {
|
|
20
22
|
return iconUrlOrElement;
|
|
21
23
|
}
|
|
22
|
-
return
|
|
24
|
+
return jsx(ImageIcon, {
|
|
23
25
|
src: typeof iconUrlOrElement === 'string' ? iconUrlOrElement : undefined,
|
|
24
|
-
default:
|
|
26
|
+
default: jsx(LinkGlyph, {
|
|
25
27
|
label: "icon",
|
|
26
28
|
size: "small",
|
|
27
29
|
testId: "embed-card-fallback-icon"
|
|
28
30
|
})
|
|
29
31
|
});
|
|
30
32
|
}, [iconUrlOrElement]);
|
|
31
|
-
return
|
|
33
|
+
return jsx(ExpandedFrame, {
|
|
32
34
|
allowScrollBar: true,
|
|
33
35
|
frameStyle: "show",
|
|
34
36
|
href: url,
|
|
@@ -38,19 +40,19 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
38
40
|
onClick: onClick,
|
|
39
41
|
testId: testId,
|
|
40
42
|
text: text
|
|
41
|
-
},
|
|
43
|
+
}, jsx("div", {
|
|
42
44
|
css: containerStyles,
|
|
43
45
|
"data-testid": "".concat(testId, "-unresolved-container")
|
|
44
|
-
},
|
|
46
|
+
}, jsx("div", {
|
|
45
47
|
css: contentStyles
|
|
46
|
-
},
|
|
48
|
+
}, jsx("img", {
|
|
47
49
|
css: imageStyles,
|
|
48
50
|
"data-testid": "".concat(testId, "-unresolved-image"),
|
|
49
51
|
src: image
|
|
50
|
-
}),
|
|
52
|
+
}), jsx("h2", {
|
|
51
53
|
css: titleStyles,
|
|
52
54
|
"data-testid": "".concat(testId, "-unresolved-title")
|
|
53
|
-
}, title),
|
|
55
|
+
}, title), jsx("span", {
|
|
54
56
|
css: descriptionStyles,
|
|
55
57
|
"data-testid": "".concat(testId, "-unresolved-description")
|
|
56
58
|
}, description), button)));
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
|
|
3
5
|
import { di } from 'react-magnetic-di';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
5
7
|
import { getIframeSandboxAttribute } from '../../../../utils';
|
|
6
8
|
import { IFrame } from '../../../EmbedCard/components/IFrame';
|
|
7
9
|
var iframeCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: calc(100vh - 208px);\n"])));
|
|
@@ -19,6 +21,6 @@ var EmbedContent = function EmbedContent(_ref) {
|
|
|
19
21
|
src: src,
|
|
20
22
|
'data-testid': "".concat(testId, "-embed")
|
|
21
23
|
};
|
|
22
|
-
return
|
|
24
|
+
return jsx(IFrame, props);
|
|
23
25
|
};
|
|
24
26
|
export default EmbedContent;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import React, { useMemo } from 'react';
|
|
2
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
3
5
|
import { useModal } from '@atlaskit/modal-dialog';
|
|
@@ -24,9 +26,9 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
24
26
|
onClose = _useModal.onClose;
|
|
25
27
|
var downloadButton = useMemo(function () {
|
|
26
28
|
if (onDownloadButtonClick) {
|
|
27
|
-
return
|
|
28
|
-
content:
|
|
29
|
-
icon:
|
|
29
|
+
return jsx(LinkInfoButton, {
|
|
30
|
+
content: jsx(FormattedMessage, messages.download),
|
|
31
|
+
icon: jsx(DownloadIcon, {
|
|
30
32
|
label: messages.download.defaultMessage
|
|
31
33
|
}),
|
|
32
34
|
onClick: onDownloadButtonClick,
|
|
@@ -36,10 +38,10 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
36
38
|
}, [onDownloadButtonClick, testId]);
|
|
37
39
|
var urlButton = useMemo(function () {
|
|
38
40
|
if (onViewButtonClick) {
|
|
39
|
-
var content = providerName ?
|
|
40
|
-
return
|
|
41
|
+
var content = providerName ? jsx(React.Fragment, null, jsx(FormattedMessage, messages.viewIn), " ", providerName) : jsx(FormattedMessage, messages.viewOriginal);
|
|
42
|
+
return jsx(LinkInfoButton, {
|
|
41
43
|
content: content,
|
|
42
|
-
icon:
|
|
44
|
+
icon: jsx(ShortcutIcon, {
|
|
43
45
|
label: messages.viewOriginal.defaultMessage
|
|
44
46
|
}),
|
|
45
47
|
onClick: onViewButtonClick,
|
|
@@ -50,36 +52,36 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
50
52
|
var sizeButton = useMemo(function () {
|
|
51
53
|
var isFullScreen = size === MAX_MODAL_SIZE;
|
|
52
54
|
var message = isFullScreen ? messages.preview_min_size : messages.preview_max_size;
|
|
53
|
-
var icon = isFullScreen ?
|
|
55
|
+
var icon = isFullScreen ? jsx(VidFullScreenOffIcon, {
|
|
54
56
|
label: message.defaultMessage
|
|
55
|
-
}) :
|
|
57
|
+
}) : jsx(VidFullScreenOnIcon, {
|
|
56
58
|
label: message.defaultMessage
|
|
57
59
|
});
|
|
58
|
-
return
|
|
60
|
+
return jsx("span", {
|
|
59
61
|
className: "smart-link-resize-button"
|
|
60
|
-
},
|
|
61
|
-
content:
|
|
62
|
+
}, jsx(LinkInfoButton, {
|
|
63
|
+
content: jsx(FormattedMessage, message),
|
|
62
64
|
icon: icon,
|
|
63
65
|
onClick: onResizeButtonClick,
|
|
64
66
|
testId: "".concat(testId, "-resize")
|
|
65
67
|
}));
|
|
66
68
|
}, [onResizeButtonClick, size, testId]);
|
|
67
|
-
return
|
|
69
|
+
return jsx("div", {
|
|
68
70
|
css: containerStyles
|
|
69
|
-
}, icon &&
|
|
71
|
+
}, icon && jsx("div", {
|
|
70
72
|
css: iconCss,
|
|
71
73
|
"data-testid": "".concat(testId, "-icon")
|
|
72
|
-
},
|
|
74
|
+
}, jsx(Icon, icon)), jsx("div", {
|
|
73
75
|
css: titleCss
|
|
74
|
-
},
|
|
76
|
+
}, jsx("h3", {
|
|
75
77
|
"data-testid": "".concat(testId, "-title")
|
|
76
|
-
}, title),
|
|
78
|
+
}, title), jsx("span", {
|
|
77
79
|
tabIndex: 0
|
|
78
|
-
})),
|
|
80
|
+
})), jsx("div", {
|
|
79
81
|
css: actionCss
|
|
80
|
-
}, downloadButton, urlButton, sizeButton,
|
|
81
|
-
content:
|
|
82
|
-
icon:
|
|
82
|
+
}, downloadButton, urlButton, sizeButton, jsx(LinkInfoButton, {
|
|
83
|
+
content: jsx(FormattedMessage, messages.preview_close),
|
|
84
|
+
icon: jsx(CrossIcon, {
|
|
83
85
|
label: messages.preview_close.defaultMessage
|
|
84
86
|
}),
|
|
85
87
|
onClick: onClose,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React, { useCallback } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
6
7
|
import { LoadingButton } from '@atlaskit/button';
|
|
7
8
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
@@ -39,14 +40,14 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
39
40
|
handler();
|
|
40
41
|
};
|
|
41
42
|
}, []);
|
|
42
|
-
return
|
|
43
|
+
return jsx("div", {
|
|
43
44
|
css: [getButtonStyle(size, iconOnly), overrideCss],
|
|
44
45
|
"data-testid": "".concat(testId, "-button-wrapper")
|
|
45
|
-
},
|
|
46
|
+
}, jsx(Tooltip, {
|
|
46
47
|
content: tooltipMessage,
|
|
47
48
|
hideTooltipOnClick: true,
|
|
48
49
|
testId: "".concat(testId, "-tooltip")
|
|
49
|
-
}, getBooleanFF('platform.linking-platform.smart-card.follow-button') ?
|
|
50
|
+
}, getBooleanFF('platform.linking-platform.smart-card.follow-button') ? jsx(LoadingButton, {
|
|
50
51
|
appearance: appearance,
|
|
51
52
|
iconAfter: iconAfter,
|
|
52
53
|
iconBefore: iconBefore,
|
|
@@ -55,7 +56,7 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
55
56
|
onClick: onButtonClick(onClick),
|
|
56
57
|
spacing: sizeToButtonSpacing[size],
|
|
57
58
|
testId: testId
|
|
58
|
-
}, content) :
|
|
59
|
+
}, content) : jsx(Button, {
|
|
59
60
|
appearance: appearance,
|
|
60
61
|
iconAfter: iconAfter,
|
|
61
62
|
iconBefore: iconBefore,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
6
7
|
import { getIconSizeStyles } from '../../../utils';
|
|
7
8
|
var getIconWidth = function getIconWidth(size) {
|
|
@@ -23,7 +24,7 @@ var ActionIcon = function ActionIcon(_ref) {
|
|
|
23
24
|
testId = _ref.testId,
|
|
24
25
|
icon = _ref.icon,
|
|
25
26
|
isDisabled = _ref.isDisabled;
|
|
26
|
-
return
|
|
27
|
+
return jsx("span", {
|
|
27
28
|
css: getIconStyles(size, isDisabled),
|
|
28
29
|
"data-testid": "".concat(testId, "-icon")
|
|
29
30
|
}, icon);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import { SmartLinkSize } from '../../../../../constants';
|
|
3
5
|
import ActionButton from './action-button';
|
|
4
6
|
import ActionDropdownItem from './action-dropdown-item';
|
|
@@ -33,7 +35,7 @@ var Action = function Action(_ref) {
|
|
|
33
35
|
if (!onClick) {
|
|
34
36
|
return null;
|
|
35
37
|
}
|
|
36
|
-
var actionIcon = icon &&
|
|
38
|
+
var actionIcon = icon && jsx(ActionIcon, {
|
|
37
39
|
isDisabled: isDisabled,
|
|
38
40
|
icon: icon,
|
|
39
41
|
size: size,
|
|
@@ -42,7 +44,7 @@ var Action = function Action(_ref) {
|
|
|
42
44
|
var iconBefore = icon && iconPosition === 'before' ? actionIcon : undefined;
|
|
43
45
|
var iconAfter = icon && iconPosition === 'after' ? actionIcon : undefined;
|
|
44
46
|
if (asDropDownItem) {
|
|
45
|
-
return
|
|
47
|
+
return jsx(ActionDropdownItem, {
|
|
46
48
|
content: content,
|
|
47
49
|
iconAfter: iconAfter,
|
|
48
50
|
iconBefore: iconBefore,
|
|
@@ -51,7 +53,7 @@ var Action = function Action(_ref) {
|
|
|
51
53
|
testId: testId
|
|
52
54
|
});
|
|
53
55
|
} else {
|
|
54
|
-
return
|
|
56
|
+
return jsx(ActionButton, {
|
|
55
57
|
appearance: appearance,
|
|
56
58
|
content: content,
|
|
57
59
|
iconAfter: iconAfter,
|
package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js
CHANGED
|
@@ -4,6 +4,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
var _excluded = ["name", "hideContent", "hideIcon", "onClick", "isDisabled"];
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
/** @jsx jsx */
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
7
9
|
import React, { useCallback } from 'react';
|
|
8
10
|
import * as Actions from '../../../actions';
|
|
9
11
|
import { isJSXElementNull } from '../../utils';
|
|
@@ -38,7 +40,7 @@ var ActionGroupItem = function ActionGroupItem(_ref) {
|
|
|
38
40
|
if (hideIcon) {
|
|
39
41
|
actionProps.icon = undefined;
|
|
40
42
|
}
|
|
41
|
-
var action =
|
|
43
|
+
var action = jsx(Action, _extends({
|
|
42
44
|
url: "",
|
|
43
45
|
asDropDownItem: asDropDownItems,
|
|
44
46
|
size: size,
|
|
@@ -4,9 +4,10 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
5
|
var _excluded = ["triggerRef"];
|
|
6
6
|
var _templateObject;
|
|
7
|
+
/** @jsx jsx */
|
|
7
8
|
import { useCallback, useMemo, useState } from 'react';
|
|
8
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
9
|
-
import { css } from '@emotion/react';
|
|
10
|
+
import { css, jsx } from '@emotion/react';
|
|
10
11
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
11
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
12
13
|
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
@@ -26,7 +27,7 @@ var renderActionItems = function renderActionItems() {
|
|
|
26
27
|
var asDropDownItems = arguments.length > 3 ? arguments[3] : undefined;
|
|
27
28
|
var onActionItemClick = arguments.length > 4 ? arguments[4] : undefined;
|
|
28
29
|
return items.map(function (item, idx) {
|
|
29
|
-
return
|
|
30
|
+
return jsx(ActionGroupItem, {
|
|
30
31
|
item: item,
|
|
31
32
|
key: idx,
|
|
32
33
|
size: size,
|
|
@@ -84,22 +85,22 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
84
85
|
var actionItems = isMoreThenTwoItems ? renderableActionItems.slice(visibleButtonsNum - 1) : [];
|
|
85
86
|
if (actionItems.length > 0) {
|
|
86
87
|
var spacing = sizeToButtonSpacing[size];
|
|
87
|
-
var moreIcon =
|
|
88
|
+
var moreIcon = jsx(MoreIcon, {
|
|
88
89
|
label: "more"
|
|
89
90
|
});
|
|
90
|
-
var formatMessage =
|
|
91
|
-
return
|
|
91
|
+
var formatMessage = jsx(FormattedMessage, messages.more_actions);
|
|
92
|
+
return jsx(DropdownMenu, {
|
|
92
93
|
isOpen: isOpen,
|
|
93
94
|
onOpenChange: onOpenChange,
|
|
94
95
|
trigger: function trigger(_ref2) {
|
|
95
96
|
var triggerRef = _ref2.triggerRef,
|
|
96
97
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
97
|
-
return
|
|
98
|
+
return jsx(Tooltip, {
|
|
98
99
|
content: formatMessage,
|
|
99
100
|
hideTooltipOnClick: true,
|
|
100
101
|
testId: "action-group-more-button-tooltip",
|
|
101
102
|
tag: "span"
|
|
102
|
-
},
|
|
103
|
+
}, jsx(Button, _extends({}, props, {
|
|
103
104
|
spacing: spacing,
|
|
104
105
|
testId: "action-group-more-button",
|
|
105
106
|
iconBefore: moreIcon,
|
|
@@ -112,10 +113,10 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
112
113
|
}
|
|
113
114
|
return null;
|
|
114
115
|
}, [appearance, isMoreThenTwoItems, isOpen, onActionItemClick, onOpenChange, renderableActionItems, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum]);
|
|
115
|
-
return renderableActionItems.length > 0 ?
|
|
116
|
+
return renderableActionItems.length > 0 ? jsx("div", {
|
|
116
117
|
css: styles,
|
|
117
118
|
className: "actions-button-group",
|
|
118
119
|
"data-action-open": isOpen
|
|
119
|
-
},
|
|
120
|
+
}, jsx(ButtonGroup, null, actionButtons, moreActionDropdown)) : null;
|
|
120
121
|
};
|
|
121
122
|
export default ActionGroup;
|