@atlaskit/smart-card 27.1.0 → 27.2.1
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 +24 -0
- package/dist/cjs/extractors/flexible/extract-state.js +1 -2
- package/dist/cjs/messages.js +17 -2
- package/dist/cjs/state/modal/index.js +69 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/components/ActionIcon.js +22 -14
- package/dist/cjs/view/BlockCard/components/Content.js +3 -1
- package/dist/cjs/view/BlockCard/components/ContentFooter.js +3 -1
- package/dist/cjs/view/BlockCard/components/ContentHeader.js +3 -1
- package/dist/cjs/view/BlockCard/components/Frame.js +6 -2
- package/dist/cjs/view/BlockCard/components/Link.js +3 -1
- package/dist/cjs/view/BlockCard/components/Name.js +3 -1
- package/dist/cjs/view/BlockCard/components/Provider.js +1 -0
- package/dist/cjs/view/BlockCard/views/ErroredView.js +3 -1
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +6 -2
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +3 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +6 -2
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +3 -1
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +2 -0
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -1
- package/dist/cjs/view/CardWithUrl/component-lazy/LoadingCardLink.js +3 -1
- package/dist/cjs/view/CardWithUrl/component.js +3 -2
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +41 -29
- package/dist/cjs/view/EmbedCard/components/ImageIcon.js +3 -1
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +11 -8
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/common/motion-wrapper/index.js +3 -0
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +3 -1
- package/dist/cjs/view/HoverCard/components/ContentContainer.js +2 -0
- package/dist/cjs/view/HoverCard/index.js +2 -1
- package/dist/cjs/view/InlineCard/Frame/index.js +3 -1
- package/dist/cjs/view/InlineCard/Icon.js +3 -1
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +23 -13
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +3 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +10 -7
- package/dist/cjs/view/RelatedLinksModal/components/related-link-item/index.js +56 -0
- package/dist/cjs/view/RelatedLinksModal/components/related-links-list/index.js +41 -0
- package/dist/cjs/view/RelatedLinksModal/components/types.js +5 -0
- package/dist/cjs/view/RelatedLinksModal/views/resolved/index.js +31 -0
- package/dist/cjs/view/RelatedLinksModal/views/resolved/types.js +1 -0
- package/dist/cjs/view/common/Byline.js +3 -1
- package/dist/cjs/view/common/Icon.js +3 -1
- package/dist/cjs/view/common/MetadataList.js +3 -1
- package/dist/es2019/extractors/flexible/extract-state.js +1 -2
- package/dist/es2019/messages.js +17 -2
- package/dist/es2019/state/modal/index.js +47 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/components/ActionIcon.js +22 -14
- 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/Frame.js +6 -2
- 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 +1 -0
- package/dist/es2019/view/BlockCard/views/ErroredView.js +3 -1
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +6 -2
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +3 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +6 -2
- package/dist/es2019/view/BlockCard/views/ResolvingView.js +3 -1
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +2 -0
- package/dist/es2019/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -1
- package/dist/es2019/view/CardWithUrl/component-lazy/LoadingCardLink.js +3 -1
- package/dist/es2019/view/CardWithUrl/component.js +3 -2
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +14 -4
- package/dist/es2019/view/EmbedCard/components/ImageIcon.js +3 -1
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +11 -8
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/common/motion-wrapper/index.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +3 -1
- package/dist/es2019/view/HoverCard/components/ContentContainer.js +2 -0
- package/dist/es2019/view/HoverCard/index.js +2 -1
- package/dist/es2019/view/InlineCard/Frame/index.js +3 -1
- package/dist/es2019/view/InlineCard/Icon.js +3 -1
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +23 -13
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +3 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +10 -7
- package/dist/es2019/view/RelatedLinksModal/components/related-link-item/index.js +50 -0
- package/dist/es2019/view/RelatedLinksModal/components/related-links-list/index.js +33 -0
- package/dist/es2019/view/RelatedLinksModal/views/resolved/index.js +23 -0
- package/dist/es2019/view/RelatedLinksModal/views/resolved/types.js +0 -0
- package/dist/es2019/view/common/Byline.js +3 -1
- package/dist/es2019/view/common/Icon.js +3 -1
- package/dist/es2019/view/common/MetadataList.js +3 -1
- package/dist/esm/extractors/flexible/extract-state.js +1 -2
- package/dist/esm/messages.js +17 -2
- package/dist/esm/state/modal/index.js +59 -0
- package/dist/esm/state/modal/types.js +1 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/components/ActionIcon.js +22 -14
- 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/Frame.js +6 -2
- 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 +1 -0
- package/dist/esm/view/BlockCard/views/ErroredView.js +3 -1
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +6 -2
- package/dist/esm/view/BlockCard/views/NotFoundView.js +3 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +6 -2
- package/dist/esm/view/BlockCard/views/ResolvingView.js +3 -1
- package/dist/esm/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +2 -0
- package/dist/esm/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +3 -1
- package/dist/esm/view/CardWithUrl/component-lazy/LoadingCardLink.js +3 -1
- package/dist/esm/view/CardWithUrl/component.js +3 -2
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +41 -29
- package/dist/esm/view/EmbedCard/components/ImageIcon.js +3 -1
- package/dist/esm/view/EmbedModal/components/link-info/index.js +11 -8
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/common/motion-wrapper/index.js +3 -0
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +3 -1
- package/dist/esm/view/HoverCard/components/ContentContainer.js +2 -0
- package/dist/esm/view/HoverCard/index.js +2 -1
- package/dist/esm/view/InlineCard/Frame/index.js +3 -1
- package/dist/esm/view/InlineCard/Icon.js +3 -1
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +23 -13
- package/dist/esm/view/InlineCard/ResolvedView/index.js +3 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +10 -7
- package/dist/esm/view/RelatedLinksModal/components/related-link-item/index.js +49 -0
- package/dist/esm/view/RelatedLinksModal/components/related-links-list/index.js +34 -0
- package/dist/esm/view/RelatedLinksModal/components/types.js +1 -0
- package/dist/esm/view/RelatedLinksModal/views/resolved/index.js +24 -0
- package/dist/esm/view/RelatedLinksModal/views/resolved/types.js +0 -0
- package/dist/esm/view/common/Byline.js +3 -1
- package/dist/esm/view/common/Icon.js +3 -1
- package/dist/esm/view/common/MetadataList.js +3 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/modal/index.d.ts +19 -0
- package/dist/types/state/modal/types.d.ts +16 -0
- package/dist/types/view/RelatedLinksModal/components/RelatedLinksBaseModal.d.ts +5 -4
- package/dist/types/view/RelatedLinksModal/components/related-link-item/index.d.ts +5 -0
- package/dist/types/view/RelatedLinksModal/components/related-links-list/index.d.ts +5 -0
- package/dist/types/view/RelatedLinksModal/components/types.d.ts +16 -0
- package/dist/types/view/RelatedLinksModal/views/resolved/index.d.ts +5 -0
- package/dist/types/view/RelatedLinksModal/views/resolved/types.d.ts +4 -0
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/state/modal/index.d.ts +19 -0
- package/dist/types-ts4.5/state/modal/types.d.ts +16 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/components/RelatedLinksBaseModal.d.ts +5 -4
- package/dist/types-ts4.5/view/RelatedLinksModal/components/related-link-item/index.d.ts +5 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/components/related-links-list/index.d.ts +5 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/components/types.d.ts +16 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/views/resolved/index.d.ts +5 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/views/resolved/types.d.ts +4 -0
- package/package.json +2 -5
- package/dist/types/view/RelatedLinksModal/types.d.ts +0 -6
- package/dist/types-ts4.5/view/RelatedLinksModal/types.d.ts +0 -6
- /package/dist/cjs/{view/RelatedLinksModal → state/modal}/types.js +0 -0
- /package/dist/es2019/{view/RelatedLinksModal → state/modal}/types.js +0 -0
- /package/dist/{esm/view/RelatedLinksModal → es2019/view/RelatedLinksModal/components}/types.js +0 -0
|
@@ -67,7 +67,9 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
67
67
|
}
|
|
68
68
|
return /*#__PURE__*/React.createElement(ImageLoader, {
|
|
69
69
|
src: url,
|
|
70
|
-
loaded: /*#__PURE__*/React.createElement(Icon
|
|
70
|
+
loaded: /*#__PURE__*/React.createElement(Icon
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
72
|
+
, {
|
|
71
73
|
className: "smart-link-icon",
|
|
72
74
|
src: url,
|
|
73
75
|
"data-testid": "".concat(testId, "-image")
|
|
@@ -118,22 +120,30 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
118
120
|
rightSide = _this$props2.rightSide,
|
|
119
121
|
_this$props2$testId = _this$props2.testId,
|
|
120
122
|
testId = _this$props2$testId === void 0 ? 'inline-card-icon-and-title' : _this$props2$testId;
|
|
121
|
-
var titlePart = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconPositionWrapper, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapper, null), this.renderIcon(testId))), /*#__PURE__*/React.createElement(TitleWrapper
|
|
123
|
+
var titlePart = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconPositionWrapper, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapper, null), this.renderIcon(testId))), /*#__PURE__*/React.createElement(TitleWrapper
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
125
|
+
, {
|
|
122
126
|
style: {
|
|
123
127
|
color: titleTextColor
|
|
124
|
-
}
|
|
128
|
+
}
|
|
129
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
130
|
+
,
|
|
125
131
|
className: TitleWrapperClassName
|
|
126
132
|
}, title));
|
|
127
|
-
return
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
return (
|
|
134
|
+
/*#__PURE__*/
|
|
135
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
136
|
+
React.createElement(IconTitleWrapper, {
|
|
137
|
+
style: {
|
|
138
|
+
color: titleColor
|
|
139
|
+
},
|
|
140
|
+
"data-testid": testId
|
|
141
|
+
}, link ? /*#__PURE__*/React.createElement(LinkAppearance, {
|
|
142
|
+
href: link,
|
|
143
|
+
onClick: this.handleClick,
|
|
144
|
+
onKeyPress: this.handleKeyPress
|
|
145
|
+
}, titlePart) : titlePart, rightSide ? /*#__PURE__*/React.createElement(NoLinkAppearance, null, rightSide) : null)
|
|
146
|
+
);
|
|
137
147
|
}
|
|
138
148
|
}]);
|
|
139
149
|
return IconAndTitleLayout;
|
|
@@ -28,7 +28,9 @@ export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
|
28
28
|
var appearance = lozenge.appearance || 'default';
|
|
29
29
|
return /*#__PURE__*/React.createElement(LozengeWrapper, null, /*#__PURE__*/React.createElement(Lozenge, {
|
|
30
30
|
testId: "inline-card-resolved-view-lozenge",
|
|
31
|
-
appearance: appearance
|
|
31
|
+
appearance: appearance
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
33
|
+
,
|
|
32
34
|
style: lozenge.style,
|
|
33
35
|
isBold: lozenge.isBold
|
|
34
36
|
}, lozenge.text));
|
|
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
10
10
|
import LinkWarningModal from './LinkWarningModal';
|
|
11
11
|
var PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "27.1
|
|
13
|
+
packageVersion: "27.2.1",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
3
5
|
import Button from '@atlaskit/button/new';
|
|
4
6
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
5
7
|
import { messages } from '../../../messages';
|
|
6
|
-
var
|
|
8
|
+
var RelatedLinksBaseModal = function RelatedLinksBaseModal(_ref) {
|
|
7
9
|
var onClose = _ref.onClose,
|
|
8
10
|
showModal = _ref.showModal,
|
|
9
11
|
children = _ref.children;
|
|
10
|
-
return
|
|
11
|
-
onClose: onClose
|
|
12
|
-
|
|
12
|
+
return jsx(ModalTransition, null, showModal && jsx(Modal, {
|
|
13
|
+
onClose: onClose,
|
|
14
|
+
width: "small"
|
|
15
|
+
}, jsx(ModalHeader, null, jsx(ModalTitle, null, jsx(FormattedMessage, messages.related_links_modal_title))), jsx(ModalBody, null, children), jsx(ModalFooter, null, jsx(Button, {
|
|
13
16
|
appearance: "primary",
|
|
14
17
|
onClick: onClose
|
|
15
|
-
},
|
|
18
|
+
}, jsx(FormattedMessage, messages.close)))));
|
|
16
19
|
};
|
|
17
|
-
export default
|
|
20
|
+
export default RelatedLinksBaseModal;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
4
|
+
import { Card, ElementName, SmartLinkPosition, SmartLinkSize, SmartLinkTheme, TitleBlock } from '../../../../index';
|
|
5
|
+
var hoverStyles = xcss({
|
|
6
|
+
':hover': {
|
|
7
|
+
backgroundColor: 'color.background.input.hovered',
|
|
8
|
+
borderRadius: 'border.radius.100',
|
|
9
|
+
marginInline: 'space.negative.100',
|
|
10
|
+
paddingInline: 'space.100'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var relatedLinkItemStyles = css({
|
|
14
|
+
paddingTop: "var(--ds-space-100, 8px)",
|
|
15
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
16
|
+
gap: "var(--ds-space-150, 12px)",
|
|
17
|
+
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
18
|
+
});
|
|
19
|
+
var RelatedLinkItem = function RelatedLinkItem(_ref) {
|
|
20
|
+
var url = _ref.url,
|
|
21
|
+
testId = _ref.testId;
|
|
22
|
+
var subtitle = [{
|
|
23
|
+
name: ElementName.Provider
|
|
24
|
+
}];
|
|
25
|
+
var ui = {
|
|
26
|
+
hideElevation: true,
|
|
27
|
+
hidePadding: true,
|
|
28
|
+
hideBackground: true,
|
|
29
|
+
theme: SmartLinkTheme.Black,
|
|
30
|
+
clickableContainer: true,
|
|
31
|
+
size: SmartLinkSize.Large
|
|
32
|
+
};
|
|
33
|
+
return jsx(Box, {
|
|
34
|
+
testId: testId,
|
|
35
|
+
xcss: hoverStyles
|
|
36
|
+
}, jsx(Card, {
|
|
37
|
+
appearance: "block",
|
|
38
|
+
ui: ui,
|
|
39
|
+
url: url
|
|
40
|
+
}, jsx(TitleBlock, {
|
|
41
|
+
maxLines: 1,
|
|
42
|
+
hideTitleTooltip: true,
|
|
43
|
+
position: SmartLinkPosition.Center,
|
|
44
|
+
subtitle: subtitle,
|
|
45
|
+
overrideCss: relatedLinkItemStyles,
|
|
46
|
+
anchorTarget: "_blank"
|
|
47
|
+
})));
|
|
48
|
+
};
|
|
49
|
+
export default RelatedLinkItem;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
+
import { Box, Stack, xcss } from '@atlaskit/primitives';
|
|
6
|
+
import RelatedLinkItem from '../related-link-item';
|
|
7
|
+
import { messages } from '../../../../messages';
|
|
8
|
+
var RelatedLinksList = function RelatedLinksList(_ref) {
|
|
9
|
+
var urls = _ref.urls,
|
|
10
|
+
title = _ref.title,
|
|
11
|
+
testId = _ref.testId;
|
|
12
|
+
return jsx(Stack, {
|
|
13
|
+
testId: testId
|
|
14
|
+
}, jsx(Box, {
|
|
15
|
+
paddingBlockStart: "space.050",
|
|
16
|
+
xcss: xcss({
|
|
17
|
+
font: "var(--ds-font-heading-xxsmall, normal 600 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
18
|
+
textTransform: 'uppercase'
|
|
19
|
+
})
|
|
20
|
+
}, jsx(FormattedMessage, title)), urls.length > 0 && jsx(Box, null, urls.map(function (url, idx) {
|
|
21
|
+
return jsx(Stack, {
|
|
22
|
+
key: "".concat(idx, "-").concat(url)
|
|
23
|
+
}, jsx(RelatedLinkItem, {
|
|
24
|
+
url: url,
|
|
25
|
+
testId: "".concat(testId, "-item-").concat(idx)
|
|
26
|
+
}));
|
|
27
|
+
})), urls.length === 0 && jsx(Box, {
|
|
28
|
+
paddingBlock: "space.100",
|
|
29
|
+
xcss: xcss({
|
|
30
|
+
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
31
|
+
})
|
|
32
|
+
}, jsx(FormattedMessage, messages.related_links_not_found)));
|
|
33
|
+
};
|
|
34
|
+
export default RelatedLinksList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { messages } from '../../../../messages';
|
|
5
|
+
import RelatedLinksList from '../../components/related-links-list';
|
|
6
|
+
import { Stack } from '@atlaskit/primitives';
|
|
7
|
+
var RelatedLinksResolvedView = function RelatedLinksResolvedView(_ref) {
|
|
8
|
+
var _ref$incomingLinks = _ref.incomingLinks,
|
|
9
|
+
incomingLinks = _ref$incomingLinks === void 0 ? [] : _ref$incomingLinks,
|
|
10
|
+
_ref$outgoingLinks = _ref.outgoingLinks,
|
|
11
|
+
outgoingLinks = _ref$outgoingLinks === void 0 ? [] : _ref$outgoingLinks;
|
|
12
|
+
return jsx(Stack, {
|
|
13
|
+
space: "space.150"
|
|
14
|
+
}, jsx(RelatedLinksList, {
|
|
15
|
+
urls: incomingLinks,
|
|
16
|
+
title: messages.related_links_found_in,
|
|
17
|
+
testId: "incoming-related-links-list"
|
|
18
|
+
}), jsx(RelatedLinksList, {
|
|
19
|
+
urls: outgoingLinks,
|
|
20
|
+
title: messages.related_links_includes_links_to,
|
|
21
|
+
testId: "outgoing-related-links-list"
|
|
22
|
+
}));
|
|
23
|
+
};
|
|
24
|
+
export default RelatedLinksResolvedView;
|
|
File without changes
|
|
@@ -29,7 +29,9 @@ export var Byline = function Byline(_ref) {
|
|
|
29
29
|
// due to HTML its unwrapping behaviour on paste.
|
|
30
30
|
MozUserSelect: 'none'
|
|
31
31
|
}),
|
|
32
|
-
"data-testid": testId
|
|
32
|
+
"data-testid": testId
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
34
|
+
,
|
|
33
35
|
className: className
|
|
34
36
|
}, text || children);
|
|
35
37
|
};
|
|
@@ -56,7 +56,9 @@ export var Icon = function Icon(_ref) {
|
|
|
56
56
|
});
|
|
57
57
|
return jsx("span", {
|
|
58
58
|
css: getSpanStyles(isFlexibleUi),
|
|
59
|
-
"data-testid": testId
|
|
59
|
+
"data-testid": testId
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
61
|
+
,
|
|
60
62
|
className: blockCardIconImageClassName
|
|
61
63
|
}, icon || image || placeholder);
|
|
62
64
|
};
|
|
@@ -17,7 +17,9 @@ export var MetadataList = function MetadataList(_ref) {
|
|
|
17
17
|
marginRight: '0px'
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
|
-
"data-testid": testId
|
|
20
|
+
"data-testid": testId
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
22
|
+
,
|
|
21
23
|
className: metadataListClassName
|
|
22
24
|
}, items.map(function (item) {
|
|
23
25
|
return jsx(Metadata, _extends({
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message' | '
|
|
3
|
+
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SmartLinkModalAPI, type SmartLinkModalProviderProps } from './types';
|
|
3
|
+
export declare const SmartLinkModalContext: React.Context<SmartLinkModalAPI>;
|
|
4
|
+
export declare const SmartLinkModalProvider: ({ children, }: SmartLinkModalProviderProps) => JSX.Element;
|
|
5
|
+
/**
|
|
6
|
+
* Open (lazy load) modal
|
|
7
|
+
*
|
|
8
|
+
* This hook injects the element below Card and standalone HoverCard component.
|
|
9
|
+
* It is intended to solve the issue where modal triggered by the parent component
|
|
10
|
+
* disappear when the parent component is unmounted.
|
|
11
|
+
*
|
|
12
|
+
* For example, clicking on hover card action to open a modal. Once the modal is opened,
|
|
13
|
+
* hover card disappears.
|
|
14
|
+
*
|
|
15
|
+
* Usage:
|
|
16
|
+
* const modal = useSmartLinkModal()
|
|
17
|
+
* modal.open(<SomeLazyLoadModal isOpen={true} onClose={() => modal.close()} />);
|
|
18
|
+
*/
|
|
19
|
+
export declare const useSmartLinkModal: () => SmartLinkModalAPI;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type SmartLinkModalAPI = {
|
|
3
|
+
/**
|
|
4
|
+
* Insert a modal component on the root of Card or standalone HoverCard.
|
|
5
|
+
* This is to ensure that the modal would not be unmounted
|
|
6
|
+
* when HoverCard is unmounted.
|
|
7
|
+
*/
|
|
8
|
+
open: (node: JSX.Element) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Remove modal component.
|
|
11
|
+
*/
|
|
12
|
+
close: () => void;
|
|
13
|
+
};
|
|
14
|
+
export type SmartLinkModalProviderProps = {
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { type RelatedLinksBaseModalProps } from './types';
|
|
4
|
+
declare const RelatedLinksBaseModal: ({ onClose, showModal, children, }: RelatedLinksBaseModalProps) => jsx.JSX.Element;
|
|
5
|
+
export default RelatedLinksBaseModal;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
|
+
import type React from "react";
|
|
3
|
+
export type RelatedLinkItemProp = {
|
|
4
|
+
url: string;
|
|
5
|
+
testId?: string;
|
|
6
|
+
};
|
|
7
|
+
export type RelatedLinksListProp = {
|
|
8
|
+
title: MessageDescriptor;
|
|
9
|
+
urls: string[];
|
|
10
|
+
testId?: string;
|
|
11
|
+
};
|
|
12
|
+
export type RelatedLinksBaseModalProps = {
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
showModal: boolean;
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message' | '
|
|
3
|
+
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SmartLinkModalAPI, type SmartLinkModalProviderProps } from './types';
|
|
3
|
+
export declare const SmartLinkModalContext: React.Context<SmartLinkModalAPI>;
|
|
4
|
+
export declare const SmartLinkModalProvider: ({ children, }: SmartLinkModalProviderProps) => JSX.Element;
|
|
5
|
+
/**
|
|
6
|
+
* Open (lazy load) modal
|
|
7
|
+
*
|
|
8
|
+
* This hook injects the element below Card and standalone HoverCard component.
|
|
9
|
+
* It is intended to solve the issue where modal triggered by the parent component
|
|
10
|
+
* disappear when the parent component is unmounted.
|
|
11
|
+
*
|
|
12
|
+
* For example, clicking on hover card action to open a modal. Once the modal is opened,
|
|
13
|
+
* hover card disappears.
|
|
14
|
+
*
|
|
15
|
+
* Usage:
|
|
16
|
+
* const modal = useSmartLinkModal()
|
|
17
|
+
* modal.open(<SomeLazyLoadModal isOpen={true} onClose={() => modal.close()} />);
|
|
18
|
+
*/
|
|
19
|
+
export declare const useSmartLinkModal: () => SmartLinkModalAPI;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type SmartLinkModalAPI = {
|
|
3
|
+
/**
|
|
4
|
+
* Insert a modal component on the root of Card or standalone HoverCard.
|
|
5
|
+
* This is to ensure that the modal would not be unmounted
|
|
6
|
+
* when HoverCard is unmounted.
|
|
7
|
+
*/
|
|
8
|
+
open: (node: JSX.Element) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Remove modal component.
|
|
11
|
+
*/
|
|
12
|
+
close: () => void;
|
|
13
|
+
};
|
|
14
|
+
export type SmartLinkModalProviderProps = {
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { type RelatedLinksBaseModalProps } from './types';
|
|
4
|
+
declare const RelatedLinksBaseModal: ({ onClose, showModal, children, }: RelatedLinksBaseModalProps) => jsx.JSX.Element;
|
|
5
|
+
export default RelatedLinksBaseModal;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
|
+
import type React from "react";
|
|
3
|
+
export type RelatedLinkItemProp = {
|
|
4
|
+
url: string;
|
|
5
|
+
testId?: string;
|
|
6
|
+
};
|
|
7
|
+
export type RelatedLinksListProp = {
|
|
8
|
+
title: MessageDescriptor;
|
|
9
|
+
urls: string[];
|
|
10
|
+
testId?: string;
|
|
11
|
+
};
|
|
12
|
+
export type RelatedLinksBaseModalProps = {
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
showModal: boolean;
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "27.1
|
|
3
|
+
"version": "27.2.1",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
57
57
|
"@atlaskit/popup": "^1.17.0",
|
|
58
58
|
"@atlaskit/primitives": "^6.3.0",
|
|
59
|
-
"@atlaskit/select": "^17.
|
|
59
|
+
"@atlaskit/select": "^17.10.0",
|
|
60
60
|
"@atlaskit/spinner": "^16.1.0",
|
|
61
61
|
"@atlaskit/textarea": "^5.4.0",
|
|
62
62
|
"@atlaskit/textfield": "^6.3.0",
|
|
@@ -158,9 +158,6 @@
|
|
|
158
158
|
"platform.linking-platform.extractor.improve-bitbucket-file-links": {
|
|
159
159
|
"type": "boolean"
|
|
160
160
|
},
|
|
161
|
-
"platform.linking-platform.smart-card.disable-jira-status-action": {
|
|
162
|
-
"type": "boolean"
|
|
163
|
-
},
|
|
164
161
|
"platform.linking-platform.smart-card.hover-card-ai-summaries": {
|
|
165
162
|
"type": "boolean"
|
|
166
163
|
},
|
|
File without changes
|
|
File without changes
|
/package/dist/{esm/view/RelatedLinksModal → es2019/view/RelatedLinksModal/components}/types.js
RENAMED
|
File without changes
|