@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,6 +1,8 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
var _excluded = ["triggerRef"];
|
|
4
|
+
/** @jsx jsx */
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
4
6
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
5
7
|
import Button from '@atlaskit/button/standard-button';
|
|
6
8
|
import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
@@ -11,25 +13,25 @@ export var ActionList = function ActionList(_ref) {
|
|
|
11
13
|
var items = _ref.items;
|
|
12
14
|
var actionsToShow = items.slice(0, 2);
|
|
13
15
|
var actionsToList = items.slice(2, items.length);
|
|
14
|
-
return
|
|
16
|
+
return jsx("div", {
|
|
15
17
|
css: mq({
|
|
16
18
|
display: 'flex',
|
|
17
19
|
marginTop: [gs(2), 0]
|
|
18
20
|
})
|
|
19
|
-
},
|
|
20
|
-
return
|
|
21
|
+
}, jsx(ButtonGroup, null, actionsToShow.map(function (action) {
|
|
22
|
+
return jsx(Action, _extends({
|
|
21
23
|
key: action.id
|
|
22
24
|
}, action));
|
|
23
|
-
})), actionsToList.length ?
|
|
25
|
+
})), actionsToList.length ? jsx("div", {
|
|
24
26
|
css: {
|
|
25
27
|
marginLeft: gs(0.5)
|
|
26
28
|
}
|
|
27
|
-
},
|
|
29
|
+
}, jsx(DropdownMenu, {
|
|
28
30
|
trigger: function trigger(_ref2) {
|
|
29
31
|
var triggerRef = _ref2.triggerRef,
|
|
30
32
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
31
|
-
return
|
|
32
|
-
iconBefore:
|
|
33
|
+
return jsx(Button, _extends({}, props, {
|
|
34
|
+
iconBefore: jsx(MoreIcon, {
|
|
33
35
|
label: "more"
|
|
34
36
|
}),
|
|
35
37
|
ref: triggerRef,
|
|
@@ -40,10 +42,10 @@ export var ActionList = function ActionList(_ref) {
|
|
|
40
42
|
}));
|
|
41
43
|
},
|
|
42
44
|
placement: "right-start"
|
|
43
|
-
},
|
|
45
|
+
}, jsx(DropdownItemGroup, {
|
|
44
46
|
testId: "dropdown-menu"
|
|
45
47
|
}, actionsToList.map(function (actionToList) {
|
|
46
|
-
return
|
|
48
|
+
return jsx(DropdownItem, {
|
|
47
49
|
key: actionToList.id
|
|
48
50
|
}, actionToList.text);
|
|
49
51
|
})))) : null);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
2
4
|
import { mq } from '../../common/utils';
|
|
3
5
|
export var CollaboratorList = function CollaboratorList(_ref) {
|
|
@@ -11,11 +13,11 @@ export var CollaboratorList = function CollaboratorList(_ref) {
|
|
|
11
13
|
if (items.length === 0) {
|
|
12
14
|
return null;
|
|
13
15
|
}
|
|
14
|
-
return
|
|
16
|
+
return jsx("span", {
|
|
15
17
|
css: mq({
|
|
16
18
|
display: ['none', 'inherit']
|
|
17
19
|
})
|
|
18
|
-
},
|
|
20
|
+
}, jsx(AvatarGroup, {
|
|
19
21
|
maxCount: 4,
|
|
20
22
|
appearance: "stack",
|
|
21
23
|
size: "small",
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { gs, mq } from '../../common/utils';
|
|
2
4
|
export var blockCardContentClassName = 'block-card-content';
|
|
3
5
|
export var Content = function Content(_ref) {
|
|
4
6
|
var children = _ref.children,
|
|
5
7
|
_ref$isCompact = _ref.isCompact,
|
|
6
8
|
isCompact = _ref$isCompact === void 0 ? false : _ref$isCompact;
|
|
7
|
-
return
|
|
9
|
+
return jsx("div", {
|
|
8
10
|
css: mq({
|
|
9
11
|
padding: isCompact ? gs(1) : gs(2),
|
|
10
12
|
display: 'flex',
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { gs, mq } from '../../common/utils';
|
|
2
4
|
export var contentFooterClassName = 'smart-link-content-footer';
|
|
3
5
|
export var ContentFooter = function ContentFooter(_ref) {
|
|
4
6
|
var children = _ref.children,
|
|
5
7
|
_ref$hasSpaceBetween = _ref.hasSpaceBetween,
|
|
6
8
|
hasSpaceBetween = _ref$hasSpaceBetween === void 0 ? false : _ref$hasSpaceBetween;
|
|
7
|
-
return
|
|
9
|
+
return jsx("div", {
|
|
8
10
|
css: mq({
|
|
9
11
|
display: 'flex',
|
|
10
12
|
flexDirection: ['column', 'row'],
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { useMouseDownEvent } from '../../../state/analytics/useLinkClicked';
|
|
2
4
|
export var blockCardContentHeaderClassName = 'block-card-content-header';
|
|
3
5
|
export var ContentHeader = function ContentHeader(_ref) {
|
|
@@ -5,7 +7,7 @@ export var ContentHeader = function ContentHeader(_ref) {
|
|
|
5
7
|
link = _ref.link,
|
|
6
8
|
children = _ref.children;
|
|
7
9
|
var onMouseDown = useMouseDownEvent();
|
|
8
|
-
return
|
|
10
|
+
return jsx("a", {
|
|
9
11
|
onClick: onClick,
|
|
10
12
|
onMouseDown: onMouseDown,
|
|
11
13
|
href: link,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { gs } from '../../common/utils';
|
|
3
5
|
export var Emoji = function Emoji(_ref) {
|
|
4
6
|
var emoji = _ref.emoji;
|
|
5
|
-
return
|
|
7
|
+
return jsx("span", {
|
|
6
8
|
css: {
|
|
7
9
|
height: gs(2.5),
|
|
8
10
|
width: gs(2),
|
|
@@ -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 React from 'react';
|
|
5
7
|
import { N20A, N30A, B200, N40A, N50A } from '@atlaskit/theme/colors';
|
|
6
8
|
import { gs, br, mq } from '../../common/utils';
|
|
@@ -10,7 +12,7 @@ export var Frame = function Frame() {
|
|
|
10
12
|
isHoverable: false,
|
|
11
13
|
isFluidHeight: false
|
|
12
14
|
};
|
|
13
|
-
return props.compact ?
|
|
15
|
+
return props.compact ? jsx(CompactFrame, props) : jsx(ExpandedFrame, props);
|
|
14
16
|
};
|
|
15
17
|
var sharedFrameStyles = {
|
|
16
18
|
maxWidth: gs(95),
|
|
@@ -25,7 +27,7 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
25
27
|
testId = _ref.testId,
|
|
26
28
|
className = _ref.className,
|
|
27
29
|
isFluidHeight = _ref.isFluidHeight;
|
|
28
|
-
return
|
|
30
|
+
return jsx("div", {
|
|
29
31
|
css: mq(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
|
|
30
32
|
'&:hover': isHoverable ? {
|
|
31
33
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4064
|
|
@@ -51,7 +53,7 @@ export var CompactFrame = function CompactFrame(_ref2) {
|
|
|
51
53
|
testId = _ref2.testId,
|
|
52
54
|
className = _ref2.className,
|
|
53
55
|
inheritDimensions = _ref2.inheritDimensions;
|
|
54
|
-
return
|
|
56
|
+
return jsx("div", {
|
|
55
57
|
css: mq(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
|
|
56
58
|
'&:hover': isHoverable ? {
|
|
57
59
|
backgroundColor: "var(--ds-background-neutral-hovered, ".concat(N30A, ")")
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { B400 } from '@atlaskit/theme/colors';
|
|
2
4
|
export var Link = function Link(_ref) {
|
|
3
5
|
var url = _ref.url,
|
|
4
6
|
_ref$testId = _ref.testId,
|
|
5
7
|
testId = _ref$testId === void 0 ? 'block-card' : _ref$testId,
|
|
6
8
|
className = _ref.className;
|
|
7
|
-
return
|
|
9
|
+
return jsx("span", {
|
|
8
10
|
"data-testid": "".concat(testId, "-link"),
|
|
9
11
|
className: className,
|
|
10
12
|
css: {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
2
4
|
import { gs } from '../../common/utils';
|
|
3
5
|
export var blockCardContentHeaderNameClassName = 'block-card-content-header-name';
|
|
@@ -7,7 +9,7 @@ export var Name = function Name(_ref) {
|
|
|
7
9
|
isLeftPadded = _ref$isLeftPadded === void 0 ? true : _ref$isLeftPadded,
|
|
8
10
|
testId = _ref.testId,
|
|
9
11
|
textColor = _ref.textColor;
|
|
10
|
-
return
|
|
12
|
+
return jsx("span", {
|
|
11
13
|
css: {
|
|
12
14
|
fontSize: "".concat(fontSize(), "px"),
|
|
13
15
|
fontWeight: 500,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import { N300 } from '@atlaskit/theme/colors';
|
|
2
4
|
import { gs } from '../../common/utils';
|
|
3
5
|
export var Provider = function Provider(_ref) {
|
|
@@ -5,7 +7,7 @@ export var Provider = function Provider(_ref) {
|
|
|
5
7
|
icon = _ref.icon;
|
|
6
8
|
var iconToRender = icon || null;
|
|
7
9
|
if (typeof icon === 'string') {
|
|
8
|
-
iconToRender =
|
|
10
|
+
iconToRender = jsx("img", {
|
|
9
11
|
className: "smart-link-icon",
|
|
10
12
|
css: {
|
|
11
13
|
height: gs(1.5),
|
|
@@ -14,14 +16,14 @@ export var Provider = function Provider(_ref) {
|
|
|
14
16
|
src: icon
|
|
15
17
|
});
|
|
16
18
|
}
|
|
17
|
-
return
|
|
19
|
+
return jsx("div", {
|
|
18
20
|
css: {
|
|
19
21
|
display: 'flex',
|
|
20
22
|
alignItems: 'center',
|
|
21
23
|
fontSize: gs(1.5),
|
|
22
24
|
whiteSpace: 'normal'
|
|
23
25
|
}
|
|
24
|
-
}, iconToRender,
|
|
26
|
+
}, iconToRender, jsx("span", {
|
|
25
27
|
css: {
|
|
26
28
|
color: "var(--ds-text-subtlest, ".concat(N300, ")"),
|
|
27
29
|
margin: 0,
|
|
@@ -1,9 +1,11 @@
|
|
|
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 { gs, mq } from '../../common/utils';
|
|
5
7
|
export var Thumbnail = function Thumbnail(props) {
|
|
6
|
-
return props.color ?
|
|
8
|
+
return props.color ? jsx(ThumbnailWithBackground, props) : jsx(ThumbnailDefault, props);
|
|
7
9
|
};
|
|
8
10
|
var sharedStyles = {
|
|
9
11
|
// The dimensions of the image are set in this manner
|
|
@@ -14,7 +16,7 @@ var sharedStyles = {
|
|
|
14
16
|
export var ThumbnailDefault = function ThumbnailDefault(_ref) {
|
|
15
17
|
var src = _ref.src,
|
|
16
18
|
testId = _ref.testId;
|
|
17
|
-
return
|
|
19
|
+
return jsx("div", {
|
|
18
20
|
css: mq(_objectSpread(_objectSpread({}, sharedStyles), {}, {
|
|
19
21
|
backgroundSize: 'cover',
|
|
20
22
|
backgroundRepeat: 'no-repeat',
|
|
@@ -29,7 +31,7 @@ export var ThumbnailWithBackground = function ThumbnailWithBackground(_ref2) {
|
|
|
29
31
|
var src = _ref2.src,
|
|
30
32
|
color = _ref2.color,
|
|
31
33
|
testId = _ref2.testId;
|
|
32
|
-
return
|
|
34
|
+
return jsx("div", {
|
|
33
35
|
css: mq(_objectSpread(_objectSpread({}, sharedStyles), {}, {
|
|
34
36
|
backgroundColor: color,
|
|
35
37
|
display: 'flex',
|
|
@@ -38,7 +40,7 @@ export var ThumbnailWithBackground = function ThumbnailWithBackground(_ref2) {
|
|
|
38
40
|
})),
|
|
39
41
|
"data-testid": testId,
|
|
40
42
|
"data-trello-do-not-use-override": testId
|
|
41
|
-
},
|
|
43
|
+
}, jsx("img", {
|
|
42
44
|
src: src,
|
|
43
45
|
css: {
|
|
44
46
|
height: '90px',
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
export var UnresolvedText = function UnresolvedText(_ref) {
|
|
2
4
|
var icon = _ref.icon,
|
|
3
5
|
text = _ref.text;
|
|
4
|
-
return
|
|
6
|
+
return jsx("span", {
|
|
5
7
|
css: {
|
|
6
8
|
display: 'flex',
|
|
7
9
|
alignItems: 'center'
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
|
|
2
4
|
import { getExtensionKey } from '../../state/helpers';
|
|
3
5
|
import { extractBlockProps } from '../../extractors/block';
|
|
4
6
|
import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
|
|
@@ -19,6 +21,7 @@ import FlexibleNotFoundViewOld from './views/flexible/FlexibleNotFoundViewOld';
|
|
|
19
21
|
import FlexibleForbiddenView from './views/flexible/FlexibleForbiddenView';
|
|
20
22
|
import FlexibleForbiddenViewOld from './views/flexible/FlexibleForbiddenViewOld';
|
|
21
23
|
import FlexibleErroredView from './views/flexible/FlexibleErroredView';
|
|
24
|
+
import { jsx } from '@emotion/react';
|
|
22
25
|
import { handleClickCommon } from './utils/handlers';
|
|
23
26
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
24
27
|
export { default as PreviewAction } from './actions/PreviewAction';
|
|
@@ -72,25 +75,25 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
72
75
|
switch (status) {
|
|
73
76
|
case 'pending':
|
|
74
77
|
case 'resolving':
|
|
75
|
-
return
|
|
78
|
+
return jsx(FlexibleResolvedView, _extends({}, flexibleBlockCardProps, {
|
|
76
79
|
testId: 'smart-block-resolving-view'
|
|
77
80
|
}));
|
|
78
81
|
case 'resolved':
|
|
79
|
-
return
|
|
82
|
+
return jsx(FlexibleResolvedView, flexibleBlockCardProps);
|
|
80
83
|
case 'unauthorized':
|
|
81
|
-
return
|
|
84
|
+
return jsx(FlexibleUnauthorisedView, _extends({}, flexibleBlockCardProps, {
|
|
82
85
|
onAuthorize: handleAuthorize
|
|
83
86
|
}));
|
|
84
87
|
case 'forbidden':
|
|
85
|
-
return getBooleanFF('platform.linking-platform.smart-card.cross-join') ?
|
|
88
|
+
return getBooleanFF('platform.linking-platform.smart-card.cross-join') ? jsx(FlexibleForbiddenView, _extends({}, flexibleBlockCardProps, {
|
|
86
89
|
onAuthorize: handleAuthorize
|
|
87
|
-
})) :
|
|
90
|
+
})) : jsx(FlexibleForbiddenViewOld, _extends({}, flexibleBlockCardProps, {
|
|
88
91
|
onAuthorize: handleAuthorize
|
|
89
92
|
}));
|
|
90
93
|
case 'not_found':
|
|
91
|
-
return getBooleanFF('platform.linking-platform.smart-card.cross-join') ?
|
|
94
|
+
return getBooleanFF('platform.linking-platform.smart-card.cross-join') ? jsx(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
|
|
92
95
|
onAuthorize: handleAuthorize
|
|
93
|
-
})) :
|
|
96
|
+
})) : jsx(FlexibleNotFoundViewOld, _extends({}, flexibleBlockCardProps, {
|
|
94
97
|
onAuthorize: handleAuthorize
|
|
95
98
|
}));
|
|
96
99
|
case 'fallback':
|
|
@@ -103,14 +106,14 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
103
106
|
});
|
|
104
107
|
}
|
|
105
108
|
if (authFlow && authFlow === 'disabled') {
|
|
106
|
-
return
|
|
109
|
+
return jsx(CardLinkView, {
|
|
107
110
|
link: url,
|
|
108
111
|
isSelected: isSelected,
|
|
109
112
|
onClick: handleFrameClick,
|
|
110
113
|
testId: "".concat(testId, "-").concat(status)
|
|
111
114
|
});
|
|
112
115
|
}
|
|
113
|
-
return
|
|
116
|
+
return jsx(FlexibleErroredView, _extends({}, flexibleBlockCardProps, {
|
|
114
117
|
onAuthorize: handleAuthorize
|
|
115
118
|
}));
|
|
116
119
|
}
|
|
@@ -118,7 +121,7 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
118
121
|
switch (status) {
|
|
119
122
|
case 'pending':
|
|
120
123
|
case 'resolving':
|
|
121
|
-
return
|
|
124
|
+
return jsx(BlockCardResolvingView, {
|
|
122
125
|
testId: testId,
|
|
123
126
|
isSelected: isSelected
|
|
124
127
|
});
|
|
@@ -130,7 +133,7 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
130
133
|
url: url
|
|
131
134
|
});
|
|
132
135
|
}
|
|
133
|
-
return
|
|
136
|
+
return jsx(BlockCardResolvedView, _extends({}, resolvedViewProps, {
|
|
134
137
|
isSelected: isSelected,
|
|
135
138
|
testId: testId,
|
|
136
139
|
showActions: showActions,
|
|
@@ -144,7 +147,7 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
144
147
|
});
|
|
145
148
|
}
|
|
146
149
|
var unauthorizedViewProps = extractBlockProps(data, meta, extractorOpts);
|
|
147
|
-
return
|
|
150
|
+
return jsx(BlockCardUnauthorisedView, _extends({}, unauthorizedViewProps, {
|
|
148
151
|
isSelected: isSelected,
|
|
149
152
|
testId: testId,
|
|
150
153
|
showActions: showActions,
|
|
@@ -165,7 +168,7 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
165
168
|
url: url,
|
|
166
169
|
context: (_forbiddenViewProps$c = forbiddenViewProps.context) === null || _forbiddenViewProps$c === void 0 ? void 0 : _forbiddenViewProps$c.text
|
|
167
170
|
});
|
|
168
|
-
return
|
|
171
|
+
return jsx(BlockCardForbiddenView, _extends({}, forbiddenViewProps, {
|
|
169
172
|
isSelected: isSelected,
|
|
170
173
|
showActions: showActions,
|
|
171
174
|
actions: handleAuthorize ? [ForbiddenAction(handleAuthorize)] : [],
|
|
@@ -180,7 +183,7 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
180
183
|
});
|
|
181
184
|
}
|
|
182
185
|
var notFoundViewProps = extractBlockProps(data, meta, extractorOpts);
|
|
183
|
-
return
|
|
186
|
+
return jsx(BlockCardNotFoundView, _extends({}, notFoundViewProps, {
|
|
184
187
|
isSelected: isSelected,
|
|
185
188
|
testId: testId,
|
|
186
189
|
onClick: handleFrameClick
|
|
@@ -195,14 +198,14 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
195
198
|
});
|
|
196
199
|
}
|
|
197
200
|
if (authFlow && authFlow === 'disabled') {
|
|
198
|
-
return
|
|
201
|
+
return jsx(CardLinkView, {
|
|
199
202
|
link: url,
|
|
200
203
|
isSelected: isSelected,
|
|
201
204
|
onClick: handleFrameClick,
|
|
202
205
|
testId: "".concat(testId, "-").concat(status)
|
|
203
206
|
});
|
|
204
207
|
}
|
|
205
|
-
return
|
|
208
|
+
return jsx(BlockCardErroredView, {
|
|
206
209
|
link: url,
|
|
207
210
|
isSelected: isSelected,
|
|
208
211
|
onRetry: handleErrorRetry,
|
|
@@ -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 { FormattedMessage } from 'react-intl-next';
|
|
5
7
|
import { useMemo } from 'react';
|
|
6
8
|
import { R300 } from '@atlaskit/theme/colors';
|
|
@@ -36,29 +38,29 @@ export var ErroredView = function ErroredView(_ref) {
|
|
|
36
38
|
var actions = useMemo(function () {
|
|
37
39
|
return onRetry ? [RetryAction(onRetry)] : [];
|
|
38
40
|
}, [onRetry]);
|
|
39
|
-
return
|
|
41
|
+
return jsx(Frame, {
|
|
40
42
|
isSelected: isSelected,
|
|
41
43
|
testId: testId,
|
|
42
44
|
className: blockCardErroredViewClassName,
|
|
43
45
|
isFluidHeight: true,
|
|
44
46
|
inheritDimensions: inheritDimensions
|
|
45
|
-
},
|
|
47
|
+
}, jsx(Content, {
|
|
46
48
|
isCompact: true
|
|
47
|
-
},
|
|
49
|
+
}, jsx("div", null, jsx(ContentHeader, {
|
|
48
50
|
onClick: handleClick,
|
|
49
51
|
link: link
|
|
50
|
-
},
|
|
52
|
+
}, jsx(Link, {
|
|
51
53
|
url: link,
|
|
52
54
|
testId: testId
|
|
53
|
-
})),
|
|
54
|
-
icon:
|
|
55
|
+
})), jsx(Byline, null, jsx(UnresolvedText, {
|
|
56
|
+
icon: jsx(WarningIcon, {
|
|
55
57
|
label: "errored-warning-icon",
|
|
56
58
|
size: "small",
|
|
57
59
|
primaryColor: "var(--ds-icon-warning, ".concat(R300, ")"),
|
|
58
60
|
testId: "".concat(testId, "-warning-icon")
|
|
59
61
|
}),
|
|
60
|
-
text:
|
|
61
|
-
}))),
|
|
62
|
+
text: jsx(FormattedMessage, textDescriptionProps)
|
|
63
|
+
}))), jsx(ContentFooter, null, jsx(ActionList, {
|
|
62
64
|
items: actions
|
|
63
65
|
}))));
|
|
64
66
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
3
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
6
|
import { R300 } from '@atlaskit/theme/colors';
|
|
5
7
|
import LockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
@@ -42,36 +44,36 @@ export var ForbiddenView = function ForbiddenView(_ref) {
|
|
|
42
44
|
_requestAccessContext = requestAccessContext.descriptiveMessageKey,
|
|
43
45
|
descriptiveMessageKey = _requestAccessContext === void 0 ? 'invalid_permissions_description' : _requestAccessContext;
|
|
44
46
|
var items = action ? [].concat(_toConsumableArray(actions), [action]) : actions;
|
|
45
|
-
return
|
|
47
|
+
return jsx(Frame, {
|
|
46
48
|
isSelected: isSelected,
|
|
47
49
|
testId: testId,
|
|
48
50
|
className: blockCardForbiddenViewClassName,
|
|
49
51
|
isFluidHeight: true
|
|
50
|
-
},
|
|
52
|
+
}, jsx(Content, {
|
|
51
53
|
isCompact: true
|
|
52
|
-
},
|
|
54
|
+
}, jsx("div", null, jsx(ContentHeader, {
|
|
53
55
|
onClick: handleClick,
|
|
54
56
|
link: link
|
|
55
|
-
},
|
|
57
|
+
}, jsx(Link, {
|
|
56
58
|
url: link,
|
|
57
59
|
testId: testId,
|
|
58
60
|
className: blockCardForbiddenViewLinkClassName
|
|
59
|
-
})),
|
|
60
|
-
icon:
|
|
61
|
+
})), jsx(Byline, null, jsx(UnresolvedText, {
|
|
62
|
+
icon: jsx(LockIcon, {
|
|
61
63
|
label: "forbidden-lock-icon",
|
|
62
64
|
size: "small",
|
|
63
65
|
primaryColor: "var(--ds-icon-danger, ".concat(R300, ")"),
|
|
64
66
|
testId: "".concat(testId, "-lock-icon")
|
|
65
67
|
}),
|
|
66
|
-
text:
|
|
68
|
+
text: jsx(FormattedMessage, _extends({}, messages[descriptiveMessageKey], {
|
|
67
69
|
values: {
|
|
68
70
|
context: context.text
|
|
69
71
|
}
|
|
70
72
|
}))
|
|
71
|
-
}))),
|
|
73
|
+
}))), jsx(ContentFooter, null, jsx(Provider, {
|
|
72
74
|
name: context.text,
|
|
73
75
|
icon: context.icon
|
|
74
|
-
}), showActions &&
|
|
76
|
+
}), showActions && jsx(ActionList, {
|
|
75
77
|
items: items
|
|
76
78
|
}))));
|
|
77
79
|
};
|
|
@@ -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 React from 'react';
|
|
5
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
8
|
import { R300 } from '@atlaskit/theme/colors';
|
|
@@ -33,28 +35,28 @@ export var NotFoundView = function NotFoundView(_ref) {
|
|
|
33
35
|
var handleClick = function handleClick(event) {
|
|
34
36
|
return handleClickCommon(event, onClick);
|
|
35
37
|
};
|
|
36
|
-
return
|
|
38
|
+
return jsx(Frame, {
|
|
37
39
|
isSelected: isSelected,
|
|
38
40
|
testId: testId,
|
|
39
41
|
className: blockCardNotFoundViewClassName,
|
|
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
|
-
})),
|
|
50
|
-
icon:
|
|
51
|
+
})), jsx(Byline, null, jsx(UnresolvedText, {
|
|
52
|
+
icon: jsx(WarningIcon, {
|
|
51
53
|
label: "not-found-warning-icon",
|
|
52
54
|
size: "small",
|
|
53
55
|
primaryColor: "var(--ds-icon-warning, ".concat(R300, ")"),
|
|
54
56
|
testId: "".concat(testId, "-warning-icon")
|
|
55
57
|
}),
|
|
56
|
-
text:
|
|
57
|
-
}))),
|
|
58
|
+
text: jsx(FormattedMessage, textDescriptionProps)
|
|
59
|
+
}))), jsx(ContentFooter, null, jsx(Provider, {
|
|
58
60
|
name: context.text,
|
|
59
61
|
icon: context.icon
|
|
60
62
|
}))));
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
1
3
|
import Lozenge from '@atlaskit/lozenge';
|
|
2
4
|
import { Frame } from '../components/Frame';
|
|
3
5
|
import { Thumbnail } from '../components/Thumbnail';
|
|
@@ -52,11 +54,11 @@ export var ResolvedView = function ResolvedView(_ref) {
|
|
|
52
54
|
testId = _ref$testId === void 0 ? 'block-card-resolved-view' : _ref$testId,
|
|
53
55
|
_ref$showActions = _ref.showActions,
|
|
54
56
|
showActions = _ref$showActions === void 0 ? true : _ref$showActions;
|
|
55
|
-
var resolvedMetadata = details.length > 0 ?
|
|
57
|
+
var resolvedMetadata = details.length > 0 ? jsx(MetadataList, {
|
|
56
58
|
testId: testId ? "".concat(testId, "-meta") : undefined,
|
|
57
59
|
items: details
|
|
58
60
|
}) : undefined;
|
|
59
|
-
var resolvedByline =
|
|
61
|
+
var resolvedByline = jsx(Byline, {
|
|
60
62
|
testId: testId ? "".concat(testId, "-by") : undefined,
|
|
61
63
|
className: blockCardResolvedViewByClassName
|
|
62
64
|
}, byline);
|
|
@@ -64,44 +66,44 @@ export var ResolvedView = function ResolvedView(_ref) {
|
|
|
64
66
|
return handleClickCommon(event, onClick);
|
|
65
67
|
};
|
|
66
68
|
var hasActions = showActions && actions.length > 0;
|
|
67
|
-
return
|
|
69
|
+
return jsx(Frame, {
|
|
68
70
|
isSelected: isSelected,
|
|
69
71
|
testId: testId,
|
|
70
72
|
className: blockCardResolvedViewClassName
|
|
71
|
-
},
|
|
73
|
+
}, jsx(Content, null, jsx("div", null, jsx("div", {
|
|
72
74
|
css: {
|
|
73
75
|
display: 'flex',
|
|
74
76
|
justifyContent: 'space-between',
|
|
75
77
|
alignItems: 'flex-start'
|
|
76
78
|
}
|
|
77
|
-
},
|
|
79
|
+
}, jsx(ContentHeader, {
|
|
78
80
|
onClick: handleClick,
|
|
79
81
|
link: link
|
|
80
|
-
}, titlePrefix ?
|
|
82
|
+
}, titlePrefix ? jsx(Emoji, {
|
|
81
83
|
emoji: titlePrefix
|
|
82
|
-
}) :
|
|
84
|
+
}) : jsx(Icon, icon), jsx(Name, {
|
|
83
85
|
name: title,
|
|
84
86
|
textColor: titleTextColor
|
|
85
|
-
}), lozenge &&
|
|
87
|
+
}), lozenge && jsx(LozengeBlockWrapper, {
|
|
86
88
|
css: {
|
|
87
89
|
height: gs(2.5),
|
|
88
90
|
display: 'flex',
|
|
89
91
|
alignItems: 'center',
|
|
90
92
|
justifyContent: 'center'
|
|
91
93
|
}
|
|
92
|
-
},
|
|
94
|
+
}, jsx(Lozenge, lozenge, lozenge.text))), jsx(CollaboratorList, {
|
|
93
95
|
items: users,
|
|
94
96
|
handleAvatarClick: handleAvatarClick,
|
|
95
97
|
handleMoreAvatarsClick: handleMoreAvatarsClick,
|
|
96
98
|
testId: testId ? "".concat(testId, "-collaborator-list") : undefined
|
|
97
|
-
})), resolvedByline, resolvedMetadata),
|
|
99
|
+
})), resolvedByline, resolvedMetadata), jsx(ContentFooter, {
|
|
98
100
|
hasSpaceBetween: hasActions
|
|
99
|
-
},
|
|
101
|
+
}, jsx(Provider, {
|
|
100
102
|
name: context.text,
|
|
101
103
|
icon: context.icon
|
|
102
|
-
}), hasActions &&
|
|
104
|
+
}), hasActions && jsx(ActionList, {
|
|
103
105
|
items: actions
|
|
104
|
-
}))), thumbnail ?
|
|
106
|
+
}))), thumbnail ? jsx(Thumbnail, {
|
|
105
107
|
src: thumbnail,
|
|
106
108
|
testId: testId ? "".concat(testId, "-thumb") : undefined
|
|
107
109
|
}) : null);
|