@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,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React, { useEffect } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { ElementName, SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
|
|
6
7
|
import { getBaseStyles, getGapSize, highlightRemoveStyles, renderChildren } from '../utils';
|
|
7
8
|
var getBlockStyles = function getBlockStyles(direction, size) {
|
|
@@ -30,7 +31,7 @@ var Block = function Block(_ref) {
|
|
|
30
31
|
useEffect(function () {
|
|
31
32
|
onRender && onRender();
|
|
32
33
|
}, [onRender]);
|
|
33
|
-
return
|
|
34
|
+
return jsx("div", {
|
|
34
35
|
css: [getBlockStyles(direction, size), overrideCss],
|
|
35
36
|
"data-smart-block": true,
|
|
36
37
|
"data-testid": testId,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
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 { SmartLinkAlignment, SmartLinkDirection, SmartLinkPosition, SmartLinkSize, SmartLinkWidth } from '../../../../../constants';
|
|
6
7
|
import { getBaseStyles, getGapSize, renderChildren } from '../utils';
|
|
7
8
|
import { getMaxLineHeight, getTruncateStyles } from '../../utils';
|
|
@@ -51,7 +52,7 @@ var ElementGroup = function ElementGroup(_ref) {
|
|
|
51
52
|
width = _ref$width === void 0 ? SmartLinkWidth.FitToContent : _ref$width,
|
|
52
53
|
_ref$position = _ref.position,
|
|
53
54
|
position = _ref$position === void 0 ? SmartLinkPosition.Center : _ref$position;
|
|
54
|
-
return
|
|
55
|
+
return jsx("div", {
|
|
55
56
|
css: [getElementGroupStyles(direction, size, align, width, position), overrideCss],
|
|
56
57
|
"data-smart-element-group": true,
|
|
57
58
|
"data-testid": testId
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["status", "testId", "overrideUrl"];
|
|
4
|
+
/** @jsx jsx */
|
|
4
5
|
import React from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
5
7
|
import { SmartLinkStatus } from '../../../../../constants';
|
|
6
8
|
import PreviewBlockResolvedView from './resolved';
|
|
7
9
|
|
|
@@ -18,7 +20,7 @@ var PreviewBlock = function PreviewBlock(_ref) {
|
|
|
18
20
|
testId = _ref$testId === void 0 ? 'smart-block-preview' : _ref$testId,
|
|
19
21
|
overrideUrl = _ref.overrideUrl,
|
|
20
22
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
-
return
|
|
23
|
+
return jsx(PreviewBlockResolvedView, _extends({}, blockProps, {
|
|
22
24
|
testId: testId,
|
|
23
25
|
overrideUrl: overrideUrl
|
|
24
26
|
}));
|
|
@@ -4,8 +4,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
5
|
var _excluded = ["ignoreContainerPadding", "onError", "overrideCss", "placement", "testId", "overrideUrl"];
|
|
6
6
|
var _templateObject, _templateObject2, _templateObject3;
|
|
7
|
+
/** @jsx jsx */
|
|
7
8
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
8
|
-
import { css } from '@emotion/react';
|
|
9
|
+
import { css, jsx } from '@emotion/react';
|
|
9
10
|
import { MediaPlacement } from '../../../../../../constants';
|
|
10
11
|
import Block from '../../block';
|
|
11
12
|
import { Preview } from '../../../elements';
|
|
@@ -68,10 +69,10 @@ var PreviewBlockResolvedView = function PreviewBlockResolvedView(_ref) {
|
|
|
68
69
|
onError();
|
|
69
70
|
}
|
|
70
71
|
}, [onError]);
|
|
71
|
-
return
|
|
72
|
+
return jsx(Block, _extends({}, blockProps, {
|
|
72
73
|
overrideCss: styles,
|
|
73
74
|
testId: "".concat(testId, "-resolved-view")
|
|
74
|
-
}),
|
|
75
|
+
}), jsx(Preview, {
|
|
75
76
|
onError: handleOnError,
|
|
76
77
|
onLoad: handleOnLoad,
|
|
77
78
|
overrideUrl: overrideUrl
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.26.1 */
|
|
2
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
3
|
var _templateObject;
|
|
5
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
6
4
|
import React, { useCallback, useState } from 'react';
|
|
7
5
|
import { useIntl } from 'react-intl-next';
|
|
8
6
|
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.26.1 */
|
|
2
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
3
1
|
import React, { useEffect } from 'react';
|
|
4
2
|
import { Stack, xcss } from '@atlaskit/primitives';
|
|
5
3
|
import { AnalyticsContext, useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -3,9 +3,10 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
4
|
var _excluded = ["actionGroup", "retry", "position", "testId", "title", "hideIcon"];
|
|
5
5
|
var _templateObject, _templateObject2;
|
|
6
|
+
/** @jsx jsx */
|
|
6
7
|
import React from 'react';
|
|
7
8
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
|
-
import { css } from '@emotion/react';
|
|
9
|
+
import { css, jsx } from '@emotion/react';
|
|
9
10
|
import { LinkIcon } from '../../../elements';
|
|
10
11
|
import Block from '../../block';
|
|
11
12
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize } from '../../../../../../constants';
|
|
@@ -40,20 +41,20 @@ var TitleBlockErroredView = function TitleBlockErroredView(_ref) {
|
|
|
40
41
|
var _blockProps$size = blockProps.size,
|
|
41
42
|
size = _blockProps$size === void 0 ? SmartLinkSize.Medium : _blockProps$size;
|
|
42
43
|
var hasAction = onClick !== undefined;
|
|
43
|
-
return
|
|
44
|
+
return jsx(Block, _extends({}, blockProps, {
|
|
44
45
|
testId: "".concat(testId, "-errored-view")
|
|
45
|
-
}), !hideIcon &&
|
|
46
|
+
}), !hideIcon && jsx(LinkIcon, {
|
|
46
47
|
position: position
|
|
47
|
-
}), title, descriptor &&
|
|
48
|
+
}), title, descriptor && jsx(ElementGroup, {
|
|
48
49
|
direction: SmartLinkDirection.Horizontal,
|
|
49
50
|
align: SmartLinkAlignment.Right
|
|
50
|
-
},
|
|
51
|
+
}, jsx("span", {
|
|
51
52
|
className: hasAction ? 'has-action' : '',
|
|
52
53
|
css: getMessageStyles(size, hasAction),
|
|
53
54
|
onClick: onClick,
|
|
54
55
|
"data-testid": "".concat(testId, "-errored-view-message"),
|
|
55
56
|
tabIndex: hasAction ? 0 : -1
|
|
56
|
-
},
|
|
57
|
+
}, jsx(FormattedMessage, _extends({}, descriptor, {
|
|
57
58
|
values: values
|
|
58
59
|
})))), actionGroup);
|
|
59
60
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["actionGroup", "testId", "title", "hideIcon"];
|
|
4
|
+
/** @jsx jsx */
|
|
4
5
|
import React from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
5
7
|
import Block from '../../block';
|
|
6
8
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
7
9
|
import LoadingSkeleton from '../../../common/loading-skeleton';
|
|
@@ -23,12 +25,12 @@ var TitleBlockResolvingView = function TitleBlockResolvingView(_ref) {
|
|
|
23
25
|
size = _blockProps$size === void 0 ? SmartLinkSize.Medium : _blockProps$size;
|
|
24
26
|
var iconWidth = getIconWidth(size);
|
|
25
27
|
var iconStyles = getIconSizeStyles(iconWidth);
|
|
26
|
-
return
|
|
28
|
+
return jsx(Block, _extends({}, blockProps, {
|
|
27
29
|
testId: "".concat(testId, "-resolving-view")
|
|
28
|
-
}), !hideIcon &&
|
|
30
|
+
}), !hideIcon && jsx("span", {
|
|
29
31
|
css: iconStyles,
|
|
30
32
|
"data-testid": "".concat(testId, "-icon")
|
|
31
|
-
},
|
|
33
|
+
}, jsx(LoadingSkeleton, {
|
|
32
34
|
testId: "".concat(testId, "-icon-loading")
|
|
33
35
|
})), title, actionGroup);
|
|
34
36
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import ImageLoader from 'react-render-image';
|
|
3
5
|
import LoadingSkeleton from '../loading-skeleton';
|
|
4
6
|
var ImageIcon = function ImageIcon(_ref) {
|
|
@@ -7,12 +9,12 @@ var ImageIcon = function ImageIcon(_ref) {
|
|
|
7
9
|
url = _ref.url,
|
|
8
10
|
onError = _ref.onError,
|
|
9
11
|
onLoad = _ref.onLoad;
|
|
10
|
-
return
|
|
12
|
+
return jsx(ImageLoader, {
|
|
11
13
|
src: url,
|
|
12
|
-
loading:
|
|
14
|
+
loading: jsx(LoadingSkeleton, {
|
|
13
15
|
testId: "".concat(testId, "-loading")
|
|
14
16
|
}),
|
|
15
|
-
loaded:
|
|
17
|
+
loaded: jsx("img", {
|
|
16
18
|
src: url,
|
|
17
19
|
"data-testid": "".concat(testId, "-image")
|
|
18
20
|
}),
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React from 'react';
|
|
4
|
-
import { css, keyframes } from '@emotion/react';
|
|
5
|
+
import { css, jsx, keyframes } from '@emotion/react';
|
|
5
6
|
var LoadingSkeleton = function LoadingSkeleton(_ref) {
|
|
6
7
|
var testId = _ref.testId,
|
|
7
8
|
width = _ref.width,
|
|
8
9
|
height = _ref.height;
|
|
9
10
|
var animationNameStyles = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% { background-position: 50% 0; }\n 100% { background-position: -50% 0; }\n "])));
|
|
10
11
|
var styles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", "rem;\n height: ", "rem;\n border-radius: 2px;\n user-select: none;\n background: ", ";\n background-image: linear-gradient(\n to right,\n transparent 0%,\n ", " 20%,\n transparent 40%,\n transparent 100%\n );\n background-repeat: no-repeat;\n background-size: 280% 100%;\n display: inline-block;\n\n animation-duration: 1s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-name: ", ";\n animation-timing-function: linear;\n "])), width, height, "var(--ds-skeleton-subtle, #f6f7f8)", "var(--ds-skeleton, #edeef1)", animationNameStyles);
|
|
11
|
-
return
|
|
12
|
+
return jsx("span", {
|
|
12
13
|
css: styles,
|
|
13
14
|
"data-testid": testId
|
|
14
15
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React, { useContext } from 'react';
|
|
4
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
5
6
|
import { MediaPlacement, SmartLinkSize, SmartLinkTheme } from '../../../../constants';
|
|
6
7
|
import { isFlexibleUiBlock, isFlexibleUiPreviewBlock, isFlexibleUiTitleBlock } from '../../../../utils/flexible';
|
|
7
8
|
import { tokens } from '../../../../utils/token';
|
|
@@ -108,7 +109,7 @@ var getLayeredLink = function getLayeredLink(testId, context, children, onClick)
|
|
|
108
109
|
var _ref2 = getTitleBlockProps(children) || {},
|
|
109
110
|
target = _ref2.anchorTarget,
|
|
110
111
|
text = _ref2.text;
|
|
111
|
-
return
|
|
112
|
+
return jsx(LayeredLink, {
|
|
112
113
|
onClick: onClick,
|
|
113
114
|
target: target,
|
|
114
115
|
testId: testId,
|
|
@@ -158,13 +159,13 @@ var Container = function Container(_ref3) {
|
|
|
158
159
|
// `retry` object contains action that can be performed on
|
|
159
160
|
// unresolved link (unauthorized, forbidden, not found, etc.)
|
|
160
161
|
var canShowAuthTooltip = showAuthTooltip && status === 'unauthorized' && retry !== undefined;
|
|
161
|
-
var container =
|
|
162
|
+
var container = jsx("div", {
|
|
162
163
|
css: getContainerStyles(size, hideBackground, hideElevation, hidePadding, clickableContainer, childrenOptions),
|
|
163
164
|
"data-smart-link-container": true,
|
|
164
165
|
"data-testid": testId
|
|
165
166
|
}, clickableContainer ? getLayeredLink(testId, context, children, onClick) : null, renderChildren(children, size, theme, status, retry, onClick));
|
|
166
167
|
if (context !== null && context !== void 0 && context.url && (canShowHoverPreview || canShowAuthTooltip)) {
|
|
167
|
-
return
|
|
168
|
+
return jsx(HoverCardControl, {
|
|
168
169
|
hideHoverCardPreviewButton: hideHoverCardPreviewButton,
|
|
169
170
|
isHoverPreview: canShowHoverPreview,
|
|
170
171
|
isAuthTooltip: canShowAuthTooltip,
|
|
@@ -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 { jsx, css } from '@emotion/react';
|
|
5
6
|
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
|
|
6
7
|
var styles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n // Stretch the invisible link over the whole of the post.\n // Hide the link\u2019s text.\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: hidden;\n text-indent: 100%;\n white-space: nowrap;\n\n // Needs a heightened specificity to trump other anchor.\n // Stack it under all other links in the post text.\n a&.layered-link {\n position: absolute;\n z-index: 0;\n }\n\n // When hovering over the layered link, any hidden action buttons inside\n // the Container should become visible.\n // As actions resides inside blocks and layered link is expected to be\n // on the same level of blocks. That makes the blocks, e.g. TitleBlock,\n // its sibling. Using general sibling combinator here to apply styling to\n // all the siblings of layered link.\n // The general sibling combinator (~) separates two selectors and matches all\n // iterations of the second element, that are following the first element\n // (though not necessarily immediately), and are children of the same parent\n // element.\n &:hover ~ * {\n .actions-button-group {\n opacity: 1;\n }\n }\n"])));
|
|
7
8
|
|
|
@@ -17,7 +18,7 @@ var LayeredLink = function LayeredLink(_ref) {
|
|
|
17
18
|
text = _ref.text,
|
|
18
19
|
url = _ref.url;
|
|
19
20
|
var onMouseDown = useMouseDownEvent();
|
|
20
|
-
return
|
|
21
|
+
return jsx("a", {
|
|
21
22
|
className: "layered-link",
|
|
22
23
|
css: styles,
|
|
23
24
|
"data-testid": "".concat(testId, "-layered-link"),
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React from 'react';
|
|
4
5
|
import AKBadge from '@atlaskit/badge';
|
|
5
|
-
import { css } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
6
7
|
var badgeStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n display: inline-flex;\n"])));
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -20,12 +21,12 @@ var AtlaskitBadge = function AtlaskitBadge(_ref) {
|
|
|
20
21
|
if (!value) {
|
|
21
22
|
return null;
|
|
22
23
|
}
|
|
23
|
-
return
|
|
24
|
+
return jsx("span", {
|
|
24
25
|
css: [badgeStyles, overrideCss],
|
|
25
26
|
"data-fit-to-content": true,
|
|
26
27
|
"data-smart-element": name,
|
|
27
28
|
"data-smart-element-atlaskit-badge": true,
|
|
28
29
|
"data-testid": testId
|
|
29
|
-
},
|
|
30
|
+
}, jsx(AKBadge, null, value));
|
|
30
31
|
};
|
|
31
32
|
export default AtlaskitBadge;
|
|
@@ -3,8 +3,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject, _templateObject2;
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
|
+
/** @jsx jsx */
|
|
6
7
|
import React, { useMemo } from 'react';
|
|
7
|
-
import { css } from '@emotion/react';
|
|
8
|
+
import { css, jsx } from '@emotion/react';
|
|
8
9
|
import AtlaskitAvatarGroup from '@atlaskit/avatar-group';
|
|
9
10
|
import { SmartLinkSize } from '../../../../../constants';
|
|
10
11
|
import { messages } from '../../../../../messages';
|
|
@@ -86,13 +87,13 @@ var AvatarGroup = function AvatarGroup(_ref) {
|
|
|
86
87
|
if (!data.length) {
|
|
87
88
|
return null;
|
|
88
89
|
}
|
|
89
|
-
return
|
|
90
|
+
return jsx("span", {
|
|
90
91
|
css: [getStyles(size), overrideCss],
|
|
91
92
|
"data-fit-to-content": true,
|
|
92
93
|
"data-smart-element": name,
|
|
93
94
|
"data-smart-element-avatar-group": true,
|
|
94
95
|
"data-testid": testId
|
|
95
|
-
},
|
|
96
|
+
}, jsx(AtlaskitAvatarGroup, {
|
|
96
97
|
maxCount: maxCount,
|
|
97
98
|
appearance: "stack",
|
|
98
99
|
size: "small",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _messageMapper;
|
|
4
|
+
/** @jsx jsx */
|
|
4
5
|
import React from 'react';
|
|
5
|
-
import { css } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
6
7
|
import { tokens } from '../../../../../utils/token';
|
|
7
8
|
import { getFormattedMessage, getIconSizeStyles } from '../../utils';
|
|
8
9
|
import { IconType } from '../../../../../constants';
|
|
@@ -25,7 +26,7 @@ var getFormattedMessageFromIcon = function getFormattedMessageFromIcon(icon) {
|
|
|
25
26
|
};
|
|
26
27
|
var renderAtlaskitIcon = function renderAtlaskitIcon(icon, testId) {
|
|
27
28
|
if (icon) {
|
|
28
|
-
return
|
|
29
|
+
return jsx(AtlaskitIcon, {
|
|
29
30
|
icon: icon,
|
|
30
31
|
label: icon,
|
|
31
32
|
testId: "".concat(testId, "-icon")
|
|
@@ -34,7 +35,7 @@ var renderAtlaskitIcon = function renderAtlaskitIcon(icon, testId) {
|
|
|
34
35
|
};
|
|
35
36
|
var renderImageIcon = function renderImageIcon(url, testId) {
|
|
36
37
|
if (url) {
|
|
37
|
-
return
|
|
38
|
+
return jsx(ImageIcon, {
|
|
38
39
|
testId: testId,
|
|
39
40
|
url: url
|
|
40
41
|
});
|
|
@@ -67,15 +68,15 @@ var Badge = function Badge(_ref) {
|
|
|
67
68
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
68
69
|
return null;
|
|
69
70
|
}
|
|
70
|
-
return
|
|
71
|
+
return jsx("span", {
|
|
71
72
|
css: [badgeStyles, overrideCss],
|
|
72
73
|
"data-fit-to-content": true,
|
|
73
74
|
"data-smart-element": name,
|
|
74
75
|
"data-smart-element-badge": true,
|
|
75
76
|
"data-testid": testId
|
|
76
|
-
},
|
|
77
|
+
}, jsx("span", {
|
|
77
78
|
css: iconStyles
|
|
78
|
-
}, badgeIcon),
|
|
79
|
+
}, badgeIcon), jsx("span", {
|
|
79
80
|
css: labelStyles,
|
|
80
81
|
"data-testid": "".concat(testId, "-label")
|
|
81
82
|
}, formattedMessageOrLabel));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject;
|
|
4
|
+
/** @jsx jsx */
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import { useIntl, FormattedMessage } from 'react-intl-next';
|
|
6
|
-
import { css } from '@emotion/react';
|
|
7
|
+
import { css, jsx } from '@emotion/react';
|
|
7
8
|
import { getTruncateStyles } from '../../utils';
|
|
8
9
|
import { tokens } from '../../../../../utils/token';
|
|
9
10
|
import { selectUnit } from '@formatjs/intl-utils';
|
|
@@ -65,13 +66,13 @@ var DateTime = function DateTime(_ref) {
|
|
|
65
66
|
numeric: 'auto'
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
|
-
return
|
|
69
|
+
return jsx("span", {
|
|
69
70
|
css: [styles, overrideCss],
|
|
70
71
|
"data-separator": true,
|
|
71
72
|
"data-smart-element": name,
|
|
72
73
|
"data-smart-element-date-time": true,
|
|
73
74
|
"data-testid": testId
|
|
74
|
-
}, text ? "".concat(text, " ").concat(context) :
|
|
75
|
+
}, text ? "".concat(text, " ").concat(context) : jsx(FormattedMessage, _extends({}, typeToDescriptorMap[type][typeVariant], {
|
|
75
76
|
values: {
|
|
76
77
|
context: context
|
|
77
78
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
|
+
/** @jsx jsx */
|
|
3
4
|
import React, { useMemo } from 'react';
|
|
4
5
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
5
|
-
import { css } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
6
7
|
import { SmartLinkPosition, SmartLinkSize } from '../../../../../constants';
|
|
7
8
|
import AtlaskitIcon from '../../common/atlaskit-icon';
|
|
8
9
|
import ImageIcon from '../../common/image-icon';
|
|
@@ -24,7 +25,7 @@ var getCustomRenderStyles = function getCustomRenderStyles(value) {
|
|
|
24
25
|
};
|
|
25
26
|
var renderAtlaskitIcon = function renderAtlaskitIcon(icon, label, testId) {
|
|
26
27
|
if (icon) {
|
|
27
|
-
return
|
|
28
|
+
return jsx(AtlaskitIcon, {
|
|
28
29
|
icon: icon,
|
|
29
30
|
label: label,
|
|
30
31
|
testId: "".concat(testId, "-icon")
|
|
@@ -32,14 +33,14 @@ var renderAtlaskitIcon = function renderAtlaskitIcon(icon, label, testId) {
|
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
35
|
var renderDefaultIcon = function renderDefaultIcon(label, testId) {
|
|
35
|
-
return
|
|
36
|
+
return jsx(LinkIcon, {
|
|
36
37
|
label: label,
|
|
37
38
|
testId: "".concat(testId, "-default")
|
|
38
39
|
});
|
|
39
40
|
};
|
|
40
41
|
var renderImageIcon = function renderImageIcon(defaultIcon, url, testId) {
|
|
41
42
|
if (url) {
|
|
42
|
-
return
|
|
43
|
+
return jsx(ImageIcon, {
|
|
43
44
|
defaultIcon: defaultIcon,
|
|
44
45
|
testId: testId,
|
|
45
46
|
url: url
|
|
@@ -74,7 +75,7 @@ var Icon = function Icon(_ref) {
|
|
|
74
75
|
var width = getIconWidth(size);
|
|
75
76
|
var styles = getIconStyles(position, width);
|
|
76
77
|
var renderStyles = render ? getCustomRenderStyles(width) : undefined;
|
|
77
|
-
return
|
|
78
|
+
return jsx("div", {
|
|
78
79
|
css: [styles, renderStyles, overrideCss],
|
|
79
80
|
"data-fit-to-content": true,
|
|
80
81
|
"data-smart-element": name,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
4
|
+
/** @jsx jsx */
|
|
4
5
|
import React, { useMemo } from 'react';
|
|
5
|
-
import { css } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
6
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
8
|
import { SmartLinkInternalTheme, SmartLinkSize, SmartLinkTheme } from '../../../../../constants';
|
|
8
9
|
import { getLinkLineHeight, getLinkSizeStyles, getTruncateStyles, hasWhiteSpace } from '../../utils';
|
|
@@ -40,7 +41,7 @@ var getMaxLines = function getMaxLines(maxLines) {
|
|
|
40
41
|
return maxLines;
|
|
41
42
|
};
|
|
42
43
|
var withTooltip = function withTooltip(trigger, content, testId) {
|
|
43
|
-
return
|
|
44
|
+
return jsx(Tooltip, {
|
|
44
45
|
content: content,
|
|
45
46
|
testId: "".concat(testId, "-tooltip"),
|
|
46
47
|
tag: "span"
|
|
@@ -74,7 +75,7 @@ var Link = function Link(_ref) {
|
|
|
74
75
|
var hasSpace = useMemo(function () {
|
|
75
76
|
return text ? hasWhiteSpace(text) : false;
|
|
76
77
|
}, [text]);
|
|
77
|
-
var anchor =
|
|
78
|
+
var anchor = jsx("a", _extends({
|
|
78
79
|
css: [getAnchorStyles(size, theme, getMaxLines(maxLines), hasSpace), overrideCss],
|
|
79
80
|
"data-smart-element": name,
|
|
80
81
|
"data-smart-element-link": true,
|
|
@@ -87,7 +88,7 @@ var Link = function Link(_ref) {
|
|
|
87
88
|
}, target !== '_self' && {
|
|
88
89
|
target: target
|
|
89
90
|
}), text);
|
|
90
|
-
return
|
|
91
|
+
return jsx("span", {
|
|
91
92
|
css: containerStyles
|
|
92
93
|
}, hideTooltip || text === undefined ? anchor : withTooltip(anchor, text, testId));
|
|
93
94
|
};
|
|
@@ -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 AtlaskitLozenge from '@atlaskit/lozenge';
|
|
6
7
|
import LozengeAction from './lozenge-action';
|
|
7
8
|
import { useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -26,17 +27,17 @@ var Lozenge = function Lozenge(_ref) {
|
|
|
26
27
|
if (!text) {
|
|
27
28
|
return null;
|
|
28
29
|
}
|
|
29
|
-
var lozenge = action ?
|
|
30
|
+
var lozenge = action ? jsx(LozengeAction, {
|
|
30
31
|
action: action,
|
|
31
32
|
appearance: appearance,
|
|
32
33
|
testId: testId,
|
|
33
34
|
text: text,
|
|
34
35
|
zIndex: ui === null || ui === void 0 ? void 0 : ui.zIndex
|
|
35
|
-
}) :
|
|
36
|
+
}) : jsx(AtlaskitLozenge, {
|
|
36
37
|
appearance: appearance,
|
|
37
38
|
testId: "".concat(testId, "-lozenge")
|
|
38
39
|
}, text);
|
|
39
|
-
return
|
|
40
|
+
return jsx("span", {
|
|
40
41
|
css: [styles, overrideCss],
|
|
41
42
|
"data-fit-to-content": true,
|
|
42
43
|
"data-smart-element": name,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
2
4
|
import { StorageClient } from '@atlaskit/frontend-utilities/storage-client';
|
|
3
5
|
import { getPulseStyles } from './styled';
|
|
@@ -37,7 +39,7 @@ var FeatureDiscovery = function FeatureDiscovery(_ref) {
|
|
|
37
39
|
}, [storageClient, discovered]);
|
|
38
40
|
var component = useMemo(function () {
|
|
39
41
|
if (!discovered) {
|
|
40
|
-
return
|
|
42
|
+
return jsx("span", {
|
|
41
43
|
css: getPulseStyles(appearance),
|
|
42
44
|
"data-testid": "".concat(testId, "-discovery")
|
|
43
45
|
}, children);
|
|
@@ -2,6 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
5
7
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
8
|
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
7
9
|
import LozengeActionTrigger from './lozenge-action-trigger';
|
|
@@ -133,7 +135,7 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
133
135
|
};
|
|
134
136
|
}(), [action.read, analytics, invoke, isLoaded, text]);
|
|
135
137
|
var trigger = useCallback(function (props) {
|
|
136
|
-
return
|
|
138
|
+
return jsx(LozengeActionTrigger, _extends({}, props, {
|
|
137
139
|
appearance: selected.appearance,
|
|
138
140
|
isOpen: isOpen,
|
|
139
141
|
showFeatureDiscovery: action === null || action === void 0 ? void 0 : action.showFeatureDiscovery,
|
|
@@ -202,7 +204,7 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
202
204
|
}(), [action === null || action === void 0 ? void 0 : action.update, analytics, invoke, linkId, reload, url]);
|
|
203
205
|
var dropdownItemGroup = useMemo(function () {
|
|
204
206
|
if (errorMessage) {
|
|
205
|
-
return
|
|
207
|
+
return jsx(LozengeActionError, {
|
|
206
208
|
errorMessage: errorMessage,
|
|
207
209
|
testId: testId,
|
|
208
210
|
url: url,
|
|
@@ -210,14 +212,14 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
210
212
|
});
|
|
211
213
|
}
|
|
212
214
|
if (items && items.length > 0) {
|
|
213
|
-
return
|
|
215
|
+
return jsx(LozengeActionItemsGroup, {
|
|
214
216
|
testId: testId,
|
|
215
217
|
items: items,
|
|
216
218
|
onClick: handleItemClick
|
|
217
219
|
});
|
|
218
220
|
}
|
|
219
221
|
}, [errorMessage, handleItemClick, items, previewData, testId, url]);
|
|
220
|
-
return
|
|
222
|
+
return jsx(DropdownMenu, {
|
|
221
223
|
isLoading: isLoading,
|
|
222
224
|
isOpen: isOpen,
|
|
223
225
|
onOpenChange: handleOpenChange,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
|
+
/** @jsx jsx */
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
4
6
|
import { Fragment, useMemo, useCallback } from 'react';
|
|
5
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
8
|
import { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
@@ -37,29 +39,29 @@ var LozengeActionError = function LozengeActionError(_ref) {
|
|
|
37
39
|
}
|
|
38
40
|
}, [analytics, handlePreviewClose, isPreviewAvailable, previewData]);
|
|
39
41
|
var content = useMemo(function () {
|
|
40
|
-
return
|
|
42
|
+
return jsx(Fragment, null, jsx("div", {
|
|
41
43
|
css: contentStyles
|
|
42
|
-
},
|
|
44
|
+
}, jsx(ErrorIcon, {
|
|
43
45
|
testId: "".concat(testId, "-icon"),
|
|
44
46
|
size: "medium",
|
|
45
47
|
primaryColor: "var(--ds-icon-danger, ".concat(R500, ")"),
|
|
46
48
|
secondaryColor: "var(--ds-background-danger, ".concat(R50, ")"),
|
|
47
49
|
label: 'error'
|
|
48
|
-
}),
|
|
50
|
+
}), jsx("span", {
|
|
49
51
|
css: textStyles(maxLineNumber),
|
|
50
52
|
"data-testid": "".concat(testId, "-error-message")
|
|
51
|
-
}, typeof errorMessage === 'string' ? errorMessage : getFormattedMessage(errorMessage))), isPreviewAvailable ?
|
|
53
|
+
}, typeof errorMessage === 'string' ? errorMessage : getFormattedMessage(errorMessage))), isPreviewAvailable ? jsx("div", {
|
|
52
54
|
css: linkStyles
|
|
53
|
-
},
|
|
55
|
+
}, jsx("a", {
|
|
54
56
|
target: "_blank",
|
|
55
57
|
"data-testid": "".concat(testId, "-open-embed"),
|
|
56
58
|
onClick: handlePreviewOpen
|
|
57
|
-
},
|
|
59
|
+
}, jsx(FormattedMessage, messages.open_issue_in_jira))) : null);
|
|
58
60
|
}, [errorMessage, handlePreviewOpen, isPreviewAvailable, maxLineNumber, testId]);
|
|
59
|
-
return
|
|
61
|
+
return jsx("span", {
|
|
60
62
|
css: dropdownItemGroupStyles,
|
|
61
63
|
"data-testid": "".concat(testId, "-error-item-group")
|
|
62
|
-
},
|
|
64
|
+
}, jsx(DropdownItemGroup, null, jsx(DropdownItem, {
|
|
63
65
|
testId: "".concat(testId, "-error")
|
|
64
66
|
}, content)));
|
|
65
67
|
};
|