@atlaskit/smart-card 34.3.0 → 34.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +201 -263
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.js +115 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.compiled.css +46 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +58 -81
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.js +135 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.js +108 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +10 -57
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.compiled.css +2 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +38 -37
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.js +58 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +24 -16
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +48 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +55 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -19
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +14 -9
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +15 -14
- package/dist/cjs/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.js +63 -0
- package/dist/cjs/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.js +61 -0
- package/dist/cjs/view/RelatedLinksModal/components/related-link-item/index.js +20 -19
- package/dist/cjs/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.js +51 -0
- package/dist/cjs/view/RelatedLinksModal/components/related-links-list/index.js +24 -24
- package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.js +66 -0
- package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/index.compiled.css +6 -0
- package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/index.js +31 -25
- package/dist/cjs/view/RelatedLinksModal/views/resolved/ResolvedOld.js +45 -0
- package/dist/cjs/view/RelatedLinksModal/views/resolved/index.js +16 -14
- package/dist/cjs/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.js +141 -0
- package/dist/cjs/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.compiled.css +6 -0
- package/dist/cjs/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +56 -50
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +69 -55
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.js +113 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.compiled.css +46 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +60 -95
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.js +118 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.js +102 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +11 -57
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.compiled.css +2 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +35 -36
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.js +50 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +15 -11
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +42 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +55 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +20 -18
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +9 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +15 -14
- package/dist/es2019/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.js +55 -0
- package/dist/es2019/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.js +55 -0
- package/dist/es2019/view/RelatedLinksModal/components/related-link-item/index.js +19 -18
- package/dist/es2019/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.js +42 -0
- package/dist/es2019/view/RelatedLinksModal/components/related-links-list/index.js +23 -22
- package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.js +58 -0
- package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/index.compiled.css +6 -0
- package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/index.js +28 -24
- package/dist/es2019/view/RelatedLinksModal/views/resolved/ResolvedOld.js +36 -0
- package/dist/es2019/view/RelatedLinksModal/views/resolved/index.js +16 -13
- package/dist/es2019/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.js +133 -0
- package/dist/es2019/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.compiled.css +6 -0
- package/dist/es2019/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +53 -49
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +116 -162
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.js +108 -0
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.compiled.css +46 -0
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +54 -79
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.js +127 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.js +101 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +11 -56
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.compiled.css +2 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +36 -37
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.js +53 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +15 -11
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +42 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +55 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +20 -18
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +14 -9
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +15 -14
- package/dist/esm/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.js +53 -0
- package/dist/esm/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.js +54 -0
- package/dist/esm/view/RelatedLinksModal/components/related-link-item/index.js +19 -18
- package/dist/esm/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.js +43 -0
- package/dist/esm/view/RelatedLinksModal/components/related-links-list/index.js +24 -23
- package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.js +58 -0
- package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/index.compiled.css +6 -0
- package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/index.js +28 -24
- package/dist/esm/view/RelatedLinksModal/views/resolved/ResolvedOld.js +37 -0
- package/dist/esm/view/RelatedLinksModal/views/resolved/index.js +16 -13
- package/dist/esm/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.js +133 -0
- package/dist/esm/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.compiled.css +6 -0
- package/dist/esm/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +53 -49
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.d.ts +17 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/index.d.ts +5 -9
- package/dist/types/view/FlexibleCard/components/blocks/element-group/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.d.ts +16 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.d.ts +15 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +5 -7
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -13
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.d.ts +9 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +8 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.d.ts +14 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +5 -3
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +1 -0
- package/dist/types/view/RelatedLinksModal/components/RelatedLinksBaseModal.d.ts +3 -7
- package/dist/types/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.d.ts +8 -0
- package/dist/types/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.d.ts +8 -0
- package/dist/types/view/RelatedLinksModal/components/related-link-item/index.d.ts +3 -7
- package/dist/types/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.d.ts +8 -0
- package/dist/types/view/RelatedLinksModal/components/related-links-list/index.d.ts +3 -7
- package/dist/types/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.d.ts +6 -0
- package/dist/types/view/RelatedLinksModal/views/errored/error-svg/index.d.ts +2 -6
- package/dist/types/view/RelatedLinksModal/views/resolved/ResolvedOld.d.ts +8 -0
- package/dist/types/view/RelatedLinksModal/views/resolved/index.d.ts +3 -7
- package/dist/types/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.d.ts +6 -0
- package/dist/types/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.d.ts +2 -6
- package/dist/types-ts4.5/utils/index.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.d.ts +17 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/element-group/index.d.ts +5 -9
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/element-group/types.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.d.ts +16 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.d.ts +15 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +5 -7
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -13
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.d.ts +9 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +8 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.d.ts +14 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +5 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +1 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/components/RelatedLinksBaseModal.d.ts +3 -7
- package/dist/types-ts4.5/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.d.ts +8 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.d.ts +8 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/components/related-link-item/index.d.ts +3 -7
- package/dist/types-ts4.5/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.d.ts +8 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/components/related-links-list/index.d.ts +3 -7
- package/dist/types-ts4.5/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.d.ts +6 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/views/errored/error-svg/index.d.ts +2 -6
- package/dist/types-ts4.5/view/RelatedLinksModal/views/resolved/ResolvedOld.d.ts +8 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/views/resolved/index.d.ts +3 -7
- package/dist/types-ts4.5/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.d.ts +6 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.d.ts +2 -6
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "text", "icon", "title", "metadataPosition", "hideIcon"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
+
import { css } from '@emotion/react';
|
|
8
|
+
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkPosition, SmartLinkWidth } from '../../../../../../constants';
|
|
9
|
+
import { LinkIcon } from '../../../elements';
|
|
10
|
+
import Block from '../../block';
|
|
11
|
+
import ElementGroup from '../../element-group';
|
|
12
|
+
import { renderElementItems } from '../../utils';
|
|
13
|
+
/**
|
|
14
|
+
* This renders a fully resolved TitleBlock.
|
|
15
|
+
* This should render when a Smart Link returns a valid response.
|
|
16
|
+
* @see TitleBlock
|
|
17
|
+
*/
|
|
18
|
+
var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
19
|
+
var actionGroup = _ref.actionGroup,
|
|
20
|
+
_ref$metadata = _ref.metadata,
|
|
21
|
+
metadata = _ref$metadata === void 0 ? [] : _ref$metadata,
|
|
22
|
+
position = _ref.position,
|
|
23
|
+
_ref$subtitle = _ref.subtitle,
|
|
24
|
+
subtitle = _ref$subtitle === void 0 ? [] : _ref$subtitle,
|
|
25
|
+
testId = _ref.testId,
|
|
26
|
+
text = _ref.text,
|
|
27
|
+
icon = _ref.icon,
|
|
28
|
+
title = _ref.title,
|
|
29
|
+
metadataPosition = _ref.metadataPosition,
|
|
30
|
+
hideIcon = _ref.hideIcon,
|
|
31
|
+
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
var metadataElements = renderElementItems(metadata);
|
|
33
|
+
var subtitleElements = renderElementItems(subtitle);
|
|
34
|
+
return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
|
|
35
|
+
testId: "".concat(testId, "-resolved-view")
|
|
36
|
+
}), !hideIcon && /*#__PURE__*/React.createElement(LinkIcon, {
|
|
37
|
+
overrideIcon: icon,
|
|
38
|
+
position: position
|
|
39
|
+
}), /*#__PURE__*/React.createElement(ElementGroup, {
|
|
40
|
+
direction: SmartLinkDirection.Vertical,
|
|
41
|
+
width: SmartLinkWidth.Flexible,
|
|
42
|
+
overrideCss: css({
|
|
43
|
+
gap: "var(--ds-space-050, 0.25rem)"
|
|
44
|
+
})
|
|
45
|
+
}, title, subtitleElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
46
|
+
direction: SmartLinkDirection.Horizontal
|
|
47
|
+
}, subtitleElements)), metadataElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
48
|
+
direction: SmartLinkDirection.Horizontal,
|
|
49
|
+
align: SmartLinkAlignment.Right,
|
|
50
|
+
position: metadataPosition !== null && metadataPosition !== void 0 ? metadataPosition : SmartLinkPosition.Center
|
|
51
|
+
}, metadataElements), actionGroup);
|
|
52
|
+
};
|
|
53
|
+
export default TitleBlockResolvedView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._zulppdf9{gap:var(--ds-space-050,.25rem)}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "text", "icon", "title", "metadataPosition", "hideIcon"];
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { css } from '@emotion/react';
|
|
5
|
+
import "./index.compiled.css";
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
8
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkPosition, SmartLinkWidth } from '../../../../../../constants';
|
|
9
9
|
import { LinkIcon } from '../../../elements';
|
|
10
10
|
import Block from '../../block';
|
|
11
|
-
import ElementGroup from '../../element-group';
|
|
11
|
+
import { ElementGroupNew as ElementGroup } from '../../element-group';
|
|
12
12
|
import { renderElementItems } from '../../utils';
|
|
13
|
+
import TitleBlockResolvedViewOld from './TitleBlockResolvedViewOld';
|
|
14
|
+
var style = null;
|
|
15
|
+
|
|
13
16
|
/**
|
|
14
17
|
* This renders a fully resolved TitleBlock.
|
|
15
18
|
* This should render when a Smart Link returns a valid response.
|
|
16
19
|
* @see TitleBlock
|
|
17
20
|
*/
|
|
18
|
-
var
|
|
21
|
+
var TitleBlockResolvedViewNew = function TitleBlockResolvedViewNew(_ref) {
|
|
19
22
|
var actionGroup = _ref.actionGroup,
|
|
20
23
|
_ref$metadata = _ref.metadata,
|
|
21
24
|
metadata = _ref$metadata === void 0 ? [] : _ref$metadata,
|
|
@@ -39,15 +42,16 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
39
42
|
}), /*#__PURE__*/React.createElement(ElementGroup, {
|
|
40
43
|
direction: SmartLinkDirection.Vertical,
|
|
41
44
|
width: SmartLinkWidth.Flexible,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
})
|
|
45
|
+
size: blockProps.size,
|
|
46
|
+
className: ax(["_zulppdf9"])
|
|
45
47
|
}, title, subtitleElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
46
48
|
direction: SmartLinkDirection.Horizontal
|
|
47
49
|
}, subtitleElements)), metadataElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
48
50
|
direction: SmartLinkDirection.Horizontal,
|
|
49
51
|
align: SmartLinkAlignment.Right,
|
|
50
|
-
position: metadataPosition !== null && metadataPosition !== void 0 ? metadataPosition : SmartLinkPosition.Center
|
|
52
|
+
position: metadataPosition !== null && metadataPosition !== void 0 ? metadataPosition : SmartLinkPosition.Center,
|
|
53
|
+
size: blockProps.size
|
|
51
54
|
}, metadataElements), actionGroup);
|
|
52
55
|
};
|
|
53
|
-
export default
|
|
56
|
+
export default TitleBlockResolvedViewOld;
|
|
57
|
+
export { TitleBlockResolvedViewNew };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["actionGroup", "testId", "title", "hideIcon"];
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
* @jsx jsx
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
+
import { jsx } from '@emotion/react';
|
|
11
|
+
import { SmartLinkSize } from '../../../../../../constants';
|
|
12
|
+
import LoadingSkeleton from '../../../common/loading-skeleton';
|
|
13
|
+
import { getIconSizeStyles, getIconWidth } from '../../../utils';
|
|
14
|
+
import Block from '../../block';
|
|
15
|
+
/**
|
|
16
|
+
* This represents a TitleBlock for a Smart Link that is currently waiting
|
|
17
|
+
* for a request to finish.
|
|
18
|
+
* This should render when a Smart Link has sent a request.
|
|
19
|
+
* @see TitleBlock
|
|
20
|
+
*/
|
|
21
|
+
var TitleBlockResolvingView = function TitleBlockResolvingView(_ref) {
|
|
22
|
+
var actionGroup = _ref.actionGroup,
|
|
23
|
+
testId = _ref.testId,
|
|
24
|
+
title = _ref.title,
|
|
25
|
+
hideIcon = _ref.hideIcon,
|
|
26
|
+
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
+
var _blockProps$size = blockProps.size,
|
|
28
|
+
size = _blockProps$size === void 0 ? SmartLinkSize.Medium : _blockProps$size;
|
|
29
|
+
var iconWidth = getIconWidth(size);
|
|
30
|
+
var iconStyles = getIconSizeStyles(iconWidth);
|
|
31
|
+
return jsx(Block, _extends({}, blockProps, {
|
|
32
|
+
testId: "".concat(testId, "-resolving-view")
|
|
33
|
+
}), !hideIcon &&
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
35
|
+
jsx("span", {
|
|
36
|
+
css: iconStyles,
|
|
37
|
+
"data-testid": "".concat(testId, "-icon")
|
|
38
|
+
}, jsx(LoadingSkeleton, {
|
|
39
|
+
testId: "".concat(testId, "-icon-loading")
|
|
40
|
+
})), title, actionGroup);
|
|
41
|
+
};
|
|
42
|
+
export default TitleBlockResolvingView;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
._16jlidpf{flex-grow:0}
|
|
2
|
+
._19l31j6v img, ._1pr21j6v span, ._1u5t1j6v svg{max-height:1rem}
|
|
3
|
+
._19l31k8s img, ._1pr21k8s span, ._1u5t1k8s svg{max-height:1.5rem}
|
|
4
|
+
._19l3oqnp img, ._1pr2oqnp span, ._1u5toqnp svg{max-height:.75rem}
|
|
5
|
+
._19l3viql img, ._1pr2viql span, ._1u5tviql svg{max-height:2rem}
|
|
6
|
+
._1bsb1j6v{width:1rem}
|
|
7
|
+
._1bsb1k8s{width:1.5rem}
|
|
8
|
+
._1bsboqnp{width:.75rem}
|
|
9
|
+
._1bsbviql{width:2rem}
|
|
10
|
+
._1o9zidpf{flex-shrink:0}
|
|
11
|
+
._1rg21j6v img, ._q7cv1j6v span, ._xwbj1j6v svg{min-width:1rem}
|
|
12
|
+
._1rg21k8s img, ._q7cv1k8s span, ._xwbj1k8s svg{min-width:1.5rem}
|
|
13
|
+
._1rg2oqnp img, ._q7cvoqnp span, ._xwbjoqnp svg{min-width:.75rem}
|
|
14
|
+
._1rg2viql img, ._q7cvviql span, ._xwbjviql svg{min-width:2rem}
|
|
15
|
+
._1tke1j6v{min-height:1rem}
|
|
16
|
+
._1tke1k8s{min-height:1.5rem}
|
|
17
|
+
._1tkeoqnp{min-height:.75rem}
|
|
18
|
+
._1tkeviql{min-height:2rem}
|
|
19
|
+
._1ul91j6v{min-width:1rem}
|
|
20
|
+
._1ul91k8s{min-width:1.5rem}
|
|
21
|
+
._1ul9oqnp{min-width:.75rem}
|
|
22
|
+
._1ul9viql{min-width:2rem}
|
|
23
|
+
._4t3i1j6v{height:1rem}
|
|
24
|
+
._4t3i1k8s{height:1.5rem}
|
|
25
|
+
._4t3ioqnp{height:.75rem}
|
|
26
|
+
._4t3iviql{height:2rem}
|
|
27
|
+
._5jw9idpf svg{padding-bottom:0}
|
|
28
|
+
._7wy9idpf svg{padding-left:0}
|
|
29
|
+
._bna71j6v img, ._1xjx1j6v span, ._17521j6v svg{height:1rem}
|
|
30
|
+
._bna71k8s img, ._1xjx1k8s span, ._17521k8s svg{height:1.5rem}
|
|
31
|
+
._bna7oqnp img, ._1xjxoqnp span, ._1752oqnp svg{height:.75rem}
|
|
32
|
+
._bna7viql img, ._1xjxviql span, ._1752viql svg{height:2rem}
|
|
33
|
+
._c71l1j6v{max-height:1rem}
|
|
34
|
+
._c71l1k8s{max-height:1.5rem}
|
|
35
|
+
._c71loqnp{max-height:.75rem}
|
|
36
|
+
._c71lviql{max-height:2rem}
|
|
37
|
+
._i0dl1wug{flex-basis:auto}
|
|
38
|
+
._i2i3idpf svg{padding-top:0}
|
|
39
|
+
._mezj1j6v img, ._e2oo1j6v span, ._w8l51j6v svg{width:1rem}
|
|
40
|
+
._mezj1k8s img, ._e2oo1k8s span, ._w8l51k8s svg{width:1.5rem}
|
|
41
|
+
._mezjoqnp img, ._e2oooqnp span, ._w8l5oqnp svg{width:.75rem}
|
|
42
|
+
._mezjviql img, ._e2ooviql span, ._w8l5viql svg{width:2rem}
|
|
43
|
+
._p12f1j6v{max-width:1rem}
|
|
44
|
+
._p12f1k8s{max-width:1.5rem}
|
|
45
|
+
._p12foqnp{max-width:.75rem}
|
|
46
|
+
._p12fviql{max-width:2rem}
|
|
47
|
+
._qci81j6v img, ._15iz1j6v span, ._erub1j6v svg{min-height:1rem}
|
|
48
|
+
._qci81k8s img, ._15iz1k8s span, ._erub1k8s svg{min-height:1.5rem}
|
|
49
|
+
._qci8oqnp img, ._15izoqnp span, ._eruboqnp svg{min-height:.75rem}
|
|
50
|
+
._qci8viql img, ._15izviql span, ._erubviql svg{min-height:2rem}
|
|
51
|
+
._rtys1j6v img, ._b8nk1j6v span, ._4x201j6v svg{max-width:1rem}
|
|
52
|
+
._rtys1k8s img, ._b8nk1k8s span, ._4x201k8s svg{max-width:1.5rem}
|
|
53
|
+
._rtysoqnp img, ._b8nkoqnp span, ._4x20oqnp svg{max-width:.75rem}
|
|
54
|
+
._rtysviql img, ._b8nkviql span, ._4x20viql svg{max-width:2rem}
|
|
55
|
+
._uhasidpf svg{padding-right:0}
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
var _excluded = ["actionGroup", "testId", "title", "hideIcon"];
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*/
|
|
5
|
+
import "./index.compiled.css";
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
8
9
|
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
import { jsx } from '@emotion/react';
|
|
11
10
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
12
11
|
import LoadingSkeleton from '../../../common/loading-skeleton';
|
|
13
|
-
import { getIconSizeStyles, getIconWidth } from '../../../utils';
|
|
14
12
|
import Block from '../../block';
|
|
13
|
+
import TitleBlockResolvingViewOld from './TitleBlockResolvingViewOld';
|
|
14
|
+
var iconStyle = {
|
|
15
|
+
'xlarge': "_16jlidpf _1o9zidpf _i0dl1wug _4t3iviql _1tkeviql _c71lviql _1bsbviql _1ul9viql _p12fviql _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna7viql _1xjxviql _1752viql _qci8viql _15izviql _erubviql _19l3viql _1pr2viql _1u5tviql _mezjviql _e2ooviql _w8l5viql _1rg2viql _q7cvviql _xwbjviql _rtysviql _b8nkviql _4x20viql",
|
|
16
|
+
'large': "_16jlidpf _1o9zidpf _i0dl1wug _4t3i1k8s _1tke1k8s _c71l1k8s _1bsb1k8s _1ul91k8s _p12f1k8s _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna71k8s _1xjx1k8s _17521k8s _qci81k8s _15iz1k8s _erub1k8s _19l31k8s _1pr21k8s _1u5t1k8s _mezj1k8s _e2oo1k8s _w8l51k8s _1rg21k8s _q7cv1k8s _xwbj1k8s _rtys1k8s _b8nk1k8s _4x201k8s",
|
|
17
|
+
'medium': "_16jlidpf _1o9zidpf _i0dl1wug _4t3i1j6v _1tke1j6v _c71l1j6v _1bsb1j6v _1ul91j6v _p12f1j6v _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna71j6v _1xjx1j6v _17521j6v _qci81j6v _15iz1j6v _erub1j6v _19l31j6v _1pr21j6v _1u5t1j6v _mezj1j6v _e2oo1j6v _w8l51j6v _1rg21j6v _q7cv1j6v _xwbj1j6v _rtys1j6v _b8nk1j6v _4x201j6v",
|
|
18
|
+
'small': "_16jlidpf _1o9zidpf _i0dl1wug _4t3ioqnp _1tkeoqnp _c71loqnp _1bsboqnp _1ul9oqnp _p12foqnp _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna7oqnp _1xjxoqnp _1752oqnp _qci8oqnp _15izoqnp _eruboqnp _19l3oqnp _1pr2oqnp _1u5toqnp _mezjoqnp _e2oooqnp _w8l5oqnp _1rg2oqnp _q7cvoqnp _xwbjoqnp _rtysoqnp _b8nkoqnp _4x20oqnp"
|
|
19
|
+
};
|
|
15
20
|
/**
|
|
16
21
|
* This represents a TitleBlock for a Smart Link that is currently waiting
|
|
17
22
|
* for a request to finish.
|
|
18
23
|
* This should render when a Smart Link has sent a request.
|
|
19
24
|
* @see TitleBlock
|
|
20
25
|
*/
|
|
21
|
-
var
|
|
26
|
+
var TitleBlockResolvingViewNew = function TitleBlockResolvingViewNew(_ref) {
|
|
22
27
|
var actionGroup = _ref.actionGroup,
|
|
23
28
|
testId = _ref.testId,
|
|
24
29
|
title = _ref.title,
|
|
@@ -26,17 +31,14 @@ var TitleBlockResolvingView = function TitleBlockResolvingView(_ref) {
|
|
|
26
31
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
27
32
|
var _blockProps$size = blockProps.size,
|
|
28
33
|
size = _blockProps$size === void 0 ? SmartLinkSize.Medium : _blockProps$size;
|
|
29
|
-
|
|
30
|
-
var iconStyles = getIconSizeStyles(iconWidth);
|
|
31
|
-
return jsx(Block, _extends({}, blockProps, {
|
|
34
|
+
return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
|
|
32
35
|
testId: "".concat(testId, "-resolving-view")
|
|
33
|
-
}), !hideIcon &&
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"data-testid": "".concat(testId, "-icon")
|
|
38
|
-
}, jsx(LoadingSkeleton, {
|
|
36
|
+
}), !hideIcon && /*#__PURE__*/React.createElement("span", {
|
|
37
|
+
"data-testid": "".concat(testId, "-icon"),
|
|
38
|
+
className: ax([iconStyle[size]])
|
|
39
|
+
}, /*#__PURE__*/React.createElement(LoadingSkeleton, {
|
|
39
40
|
testId: "".concat(testId, "-icon-loading")
|
|
40
41
|
})), title, actionGroup);
|
|
41
42
|
};
|
|
42
|
-
export default
|
|
43
|
+
export default TitleBlockResolvingViewOld;
|
|
44
|
+
export { TitleBlockResolvingViewNew };
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var
|
|
2
|
+
var _importIconMapperOld;
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Loadable from 'react-loadable';
|
|
5
5
|
import DocumentIcon from '@atlaskit/icon-file-type/glyph/document/16';
|
|
6
6
|
import BlogIcon from '@atlaskit/icon-object/glyph/blog/16';
|
|
7
7
|
import { ConfluenceIcon, JiraIcon } from '@atlaskit/logo';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { R400 } from '@atlaskit/theme/colors';
|
|
9
10
|
import { IconType } from '../../../../../constants';
|
|
11
|
+
import { getLazyIcons } from '../../../../../utils';
|
|
10
12
|
// prettier-ignore
|
|
11
|
-
var
|
|
13
|
+
var importIconMapperOld = (_importIconMapperOld = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_importIconMapperOld, IconType.Archive, function () {
|
|
12
14
|
return import( /* webpackChunkName: "glyphArchive" */'@atlaskit/icon-file-type/glyph/archive/16');
|
|
13
15
|
}), IconType.Audio, function () {
|
|
14
16
|
return import( /* webpackChunkName: "glyphAudio" */'@atlaskit/icon-file-type/glyph/audio/16');
|
|
@@ -28,7 +30,7 @@ var importIconMapper = (_importIconMapper = {}, _defineProperty(_defineProperty(
|
|
|
28
30
|
return import( /* webpackChunkName: "glyphGoogleDocs" */'@atlaskit/icon-file-type/glyph/google-doc/16');
|
|
29
31
|
}), IconType.GoogleForms, function () {
|
|
30
32
|
return import( /* webpackChunkName: "glyphGoogleForms" */'@atlaskit/icon-file-type/glyph/google-form/16');
|
|
31
|
-
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
33
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_importIconMapperOld, IconType.GoogleSheets, function () {
|
|
32
34
|
return import( /* webpackChunkName: "glyphGoogleSheets" */'@atlaskit/icon-file-type/glyph/google-sheet/16');
|
|
33
35
|
}), IconType.GoogleSlides, function () {
|
|
34
36
|
return import( /* webpackChunkName: "glyphGoogleSlides" */'@atlaskit/icon-file-type/glyph/google-slide/16');
|
|
@@ -48,7 +50,7 @@ var importIconMapper = (_importIconMapper = {}, _defineProperty(_defineProperty(
|
|
|
48
50
|
return import( /* webpackChunkName: "glyphSketch" */'@atlaskit/icon-file-type/glyph/sketch/16');
|
|
49
51
|
}), IconType.Spreadsheet, function () {
|
|
50
52
|
return import( /* webpackChunkName: "glyphSpreadsheet" */'@atlaskit/icon-file-type/glyph/spreadsheet/16');
|
|
51
|
-
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
53
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_importIconMapperOld, IconType.Template, function () {
|
|
52
54
|
return import( /* webpackChunkName: "glyphTemplate" */'@atlaskit/icon/glyph/document-filled');
|
|
53
55
|
}), IconType.Video, function () {
|
|
54
56
|
return import( /* webpackChunkName: "glyphVideo" */'@atlaskit/icon-file-type/glyph/video/16');
|
|
@@ -68,7 +70,7 @@ var importIconMapper = (_importIconMapper = {}, _defineProperty(_defineProperty(
|
|
|
68
70
|
return import( /* webpackChunkName: "glyphChange" */'@atlaskit/icon-object/glyph/changes/16');
|
|
69
71
|
}), IconType.Epic, function () {
|
|
70
72
|
return import( /* webpackChunkName: "glyphEpic" */'@atlaskit/icon-object/glyph/epic/16');
|
|
71
|
-
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
73
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_importIconMapperOld, IconType.Incident, function () {
|
|
72
74
|
return import( /* webpackChunkName: "glyphIncident" */'@atlaskit/icon-object/glyph/incident/16');
|
|
73
75
|
}), IconType.Problem, function () {
|
|
74
76
|
return import( /* webpackChunkName: "glyphProblem" */'@atlaskit/icon-object/glyph/problem/16');
|
|
@@ -98,7 +100,7 @@ var importIconMapper = (_importIconMapper = {}, _defineProperty(_defineProperty(
|
|
|
98
100
|
return import( /* webpackChunkName: "glyphDefault" */'@atlaskit/icon/glyph/link');
|
|
99
101
|
}), IconType.Error, function () {
|
|
100
102
|
return import( /* webpackChunkName: "glyphError" */'@atlaskit/icon/glyph/error');
|
|
101
|
-
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
103
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_importIconMapperOld, IconType.Forbidden, function () {
|
|
102
104
|
return import( /* webpackChunkName: "glyphForbidden" */'@atlaskit/icon/glyph/lock-filled');
|
|
103
105
|
}), IconType.Attachment, function () {
|
|
104
106
|
return import( /* webpackChunkName: "glyphAttachment" */'@atlaskit/icon/glyph/attachment');
|
|
@@ -118,7 +120,7 @@ var importIconMapper = (_importIconMapper = {}, _defineProperty(_defineProperty(
|
|
|
118
120
|
return import( /* webpackChunkName: "glyphCritical" */'@atlaskit/icon-priority/glyph/priority-critical');
|
|
119
121
|
}), IconType.PriorityHigh, function () {
|
|
120
122
|
return import( /* webpackChunkName: "glyphHigh" */'@atlaskit/icon-priority/glyph/priority-high');
|
|
121
|
-
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
123
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_importIconMapperOld, IconType.PriorityHighest, function () {
|
|
122
124
|
return import( /* webpackChunkName: "glyphHighest" */'@atlaskit/icon-priority/glyph/priority-highest');
|
|
123
125
|
}), IconType.PriorityLow, function () {
|
|
124
126
|
return import( /* webpackChunkName: "glyphLow" */'@atlaskit/icon-priority/glyph/priority-low');
|
|
@@ -138,11 +140,14 @@ var importIconMapper = (_importIconMapper = {}, _defineProperty(_defineProperty(
|
|
|
138
140
|
return import( /* webpackChunkName: "glyphProgrammingLanguage" */'@atlaskit/icon/glyph/code');
|
|
139
141
|
}), IconType.Subscriber, function () {
|
|
140
142
|
return import( /* webpackChunkName: "glyphSubscriber" */'@atlaskit/icon/glyph/people');
|
|
141
|
-
}), _defineProperty(
|
|
143
|
+
}), _defineProperty(_importIconMapperOld, IconType.SubTasksProgress, function () {
|
|
142
144
|
return import( /* webpackChunkName: "glyphSubtaskProgress" */'@atlaskit/icon/glyph/subtask');
|
|
143
145
|
}));
|
|
144
146
|
var getIconImportFn = function getIconImportFn(icon) {
|
|
145
|
-
|
|
147
|
+
if (fg('platform-smart-card-icon-migration')) {
|
|
148
|
+
return getLazyIcons()[icon];
|
|
149
|
+
}
|
|
150
|
+
return importIconMapperOld[icon];
|
|
146
151
|
};
|
|
147
152
|
var importIcon = function importIcon(importFn) {
|
|
148
153
|
return Loadable({
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
var PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "34.
|
|
16
|
+
packageVersion: "34.4.0",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { useCallback, useRef } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React, { useCallback, useRef } from 'react';
|
|
10
2
|
import { FormattedMessage } from 'react-intl-next';
|
|
11
3
|
import Button from '@atlaskit/button/new';
|
|
12
4
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
5
|
+
import { fg } from "@atlaskit/platform-feature-flags";
|
|
13
6
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
14
7
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
15
8
|
import { messages } from '../../../messages';
|
|
9
|
+
import RelatedLinksBaseModalOld from "./RelatedLinksBaseModalOld";
|
|
16
10
|
var fixedWidth = 'small'; // pre-defined 400px by Atlaskit
|
|
17
11
|
|
|
18
12
|
var boxStyles = xcss({
|
|
@@ -36,18 +30,25 @@ var RelatedLinksBaseModal = function RelatedLinksBaseModal(_ref) {
|
|
|
36
30
|
});
|
|
37
31
|
onClose === null || onClose === void 0 || onClose();
|
|
38
32
|
}, [fireEvent, onClose]);
|
|
39
|
-
return
|
|
33
|
+
return /*#__PURE__*/React.createElement(ModalTransition, null, showModal && /*#__PURE__*/React.createElement(Modal, {
|
|
40
34
|
testId: "related-links-modal",
|
|
41
35
|
onClose: closeHandler,
|
|
42
36
|
width: fixedWidth,
|
|
43
37
|
autoFocus: false,
|
|
44
38
|
shouldReturnFocus: false,
|
|
45
39
|
onOpenComplete: openCompleteHandler
|
|
46
|
-
},
|
|
40
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(ModalTitle, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_modal_title))), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Box, {
|
|
47
41
|
xcss: boxStyles
|
|
48
|
-
}, children)),
|
|
42
|
+
}, children)), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
49
43
|
appearance: "primary",
|
|
50
44
|
onClick: closeHandler
|
|
51
|
-
},
|
|
45
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.close)))));
|
|
46
|
+
};
|
|
47
|
+
var RelatedLinksBaseModalExported = function RelatedLinksBaseModalExported(props) {
|
|
48
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
49
|
+
return /*#__PURE__*/React.createElement(RelatedLinksBaseModal, props);
|
|
50
|
+
} else {
|
|
51
|
+
return /*#__PURE__*/React.createElement(RelatedLinksBaseModalOld, props);
|
|
52
|
+
}
|
|
52
53
|
};
|
|
53
|
-
export default
|
|
54
|
+
export default RelatedLinksBaseModalExported;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { useCallback, useRef } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
+
import { jsx } from '@emotion/react';
|
|
10
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
11
|
+
import Button from '@atlaskit/button/new';
|
|
12
|
+
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
13
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
14
|
+
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
15
|
+
import { messages } from '../../../messages';
|
|
16
|
+
var fixedWidth = 'small'; // pre-defined 400px by Atlaskit
|
|
17
|
+
|
|
18
|
+
var boxStyles = xcss({
|
|
19
|
+
height: '396px' // Specified by the designer as this will display 5 incoming links and 2 outgoing links
|
|
20
|
+
});
|
|
21
|
+
var RelatedLinksBaseModal = function RelatedLinksBaseModal(_ref) {
|
|
22
|
+
var onClose = _ref.onClose,
|
|
23
|
+
showModal = _ref.showModal,
|
|
24
|
+
children = _ref.children;
|
|
25
|
+
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
26
|
+
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
27
|
+
var modalOpenTimeRef = useRef(Date.now());
|
|
28
|
+
var openCompleteHandler = useCallback(function (el) {
|
|
29
|
+
el.focus();
|
|
30
|
+
modalOpenTimeRef.current = Date.now();
|
|
31
|
+
fireEvent('ui.modal.opened.relatedLinks', {});
|
|
32
|
+
}, [fireEvent]);
|
|
33
|
+
var closeHandler = useCallback(function () {
|
|
34
|
+
fireEvent('ui.modal.closed.relatedLinks', {
|
|
35
|
+
dwellTime: Date.now() - modalOpenTimeRef.current
|
|
36
|
+
});
|
|
37
|
+
onClose === null || onClose === void 0 || onClose();
|
|
38
|
+
}, [fireEvent, onClose]);
|
|
39
|
+
return jsx(ModalTransition, null, showModal && jsx(Modal, {
|
|
40
|
+
testId: "related-links-modal",
|
|
41
|
+
onClose: closeHandler,
|
|
42
|
+
width: fixedWidth,
|
|
43
|
+
autoFocus: false,
|
|
44
|
+
shouldReturnFocus: false,
|
|
45
|
+
onOpenComplete: openCompleteHandler
|
|
46
|
+
}, jsx(ModalHeader, null, jsx(ModalTitle, null, jsx(FormattedMessage, messages.related_links_modal_title))), jsx(ModalBody, null, jsx(Box, {
|
|
47
|
+
xcss: boxStyles
|
|
48
|
+
}, children)), jsx(ModalFooter, null, jsx(Button, {
|
|
49
|
+
appearance: "primary",
|
|
50
|
+
onClick: closeHandler
|
|
51
|
+
}, jsx(FormattedMessage, messages.close)))));
|
|
52
|
+
};
|
|
53
|
+
export default RelatedLinksBaseModal;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
7
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
8
|
+
import { Card, ElementName, SmartLinkPosition, SmartLinkSize, SmartLinkTheme, TitleBlock } from '../../../../index';
|
|
9
|
+
var hoverStyles = xcss({
|
|
10
|
+
':hover': {
|
|
11
|
+
backgroundColor: 'color.background.input.hovered',
|
|
12
|
+
borderRadius: 'border.radius.100',
|
|
13
|
+
marginInline: 'space.negative.100',
|
|
14
|
+
paddingInline: 'space.100'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
var relatedLinkItemStyles = css({
|
|
18
|
+
paddingTop: "var(--ds-space-100, 8px)",
|
|
19
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
20
|
+
gap: "var(--ds-space-150, 12px)",
|
|
21
|
+
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)"
|
|
22
|
+
});
|
|
23
|
+
var RelatedLinkItem = function RelatedLinkItem(_ref) {
|
|
24
|
+
var url = _ref.url,
|
|
25
|
+
testId = _ref.testId;
|
|
26
|
+
var subtitle = [{
|
|
27
|
+
name: ElementName.Provider,
|
|
28
|
+
hideIcon: true
|
|
29
|
+
}];
|
|
30
|
+
var ui = {
|
|
31
|
+
hideElevation: true,
|
|
32
|
+
hidePadding: true,
|
|
33
|
+
hideBackground: true,
|
|
34
|
+
theme: SmartLinkTheme.Black,
|
|
35
|
+
clickableContainer: true,
|
|
36
|
+
size: SmartLinkSize.Large
|
|
37
|
+
};
|
|
38
|
+
return jsx(Box, {
|
|
39
|
+
testId: testId,
|
|
40
|
+
xcss: hoverStyles
|
|
41
|
+
}, jsx(Card, {
|
|
42
|
+
appearance: "block",
|
|
43
|
+
ui: ui,
|
|
44
|
+
url: url
|
|
45
|
+
}, jsx(TitleBlock, {
|
|
46
|
+
maxLines: 1,
|
|
47
|
+
hideTitleTooltip: true,
|
|
48
|
+
position: SmartLinkPosition.Center,
|
|
49
|
+
subtitle: subtitle,
|
|
50
|
+
overrideCss: relatedLinkItemStyles,
|
|
51
|
+
anchorTarget: "_blank"
|
|
52
|
+
})));
|
|
53
|
+
};
|
|
54
|
+
export default RelatedLinkItem;
|
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
3
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
8
4
|
import { Card, ElementName, SmartLinkPosition, SmartLinkSize, SmartLinkTheme, TitleBlock } from '../../../../index';
|
|
5
|
+
import RelatedLinkItemOld from './RelatedLinkItemOld';
|
|
9
6
|
var hoverStyles = xcss({
|
|
10
7
|
':hover': {
|
|
11
8
|
backgroundColor: 'color.background.input.hovered',
|
|
12
9
|
borderRadius: 'border.radius.100',
|
|
13
10
|
marginInline: 'space.negative.100',
|
|
14
11
|
paddingInline: 'space.100'
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
gap: "var(--ds-space-150, 12px)",
|
|
21
|
-
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)"
|
|
12
|
+
},
|
|
13
|
+
paddingTop: 'space.100',
|
|
14
|
+
paddingBottom: 'space.100',
|
|
15
|
+
gap: 'space.150',
|
|
16
|
+
font: 'font.body.small'
|
|
22
17
|
});
|
|
23
18
|
var RelatedLinkItem = function RelatedLinkItem(_ref) {
|
|
24
19
|
var url = _ref.url,
|
|
@@ -35,20 +30,26 @@ var RelatedLinkItem = function RelatedLinkItem(_ref) {
|
|
|
35
30
|
clickableContainer: true,
|
|
36
31
|
size: SmartLinkSize.Large
|
|
37
32
|
};
|
|
38
|
-
return
|
|
33
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
39
34
|
testId: testId,
|
|
40
35
|
xcss: hoverStyles
|
|
41
|
-
},
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
42
37
|
appearance: "block",
|
|
43
38
|
ui: ui,
|
|
44
39
|
url: url
|
|
45
|
-
},
|
|
40
|
+
}, /*#__PURE__*/React.createElement(TitleBlock, {
|
|
46
41
|
maxLines: 1,
|
|
47
42
|
hideTitleTooltip: true,
|
|
48
43
|
position: SmartLinkPosition.Center,
|
|
49
44
|
subtitle: subtitle,
|
|
50
|
-
overrideCss: relatedLinkItemStyles,
|
|
51
45
|
anchorTarget: "_blank"
|
|
52
46
|
})));
|
|
53
47
|
};
|
|
54
|
-
|
|
48
|
+
var RelatedLinkItemExported = function RelatedLinkItemExported(props) {
|
|
49
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
50
|
+
return /*#__PURE__*/React.createElement(RelatedLinkItem, props);
|
|
51
|
+
} else {
|
|
52
|
+
return /*#__PURE__*/React.createElement(RelatedLinkItemOld, props);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
export default RelatedLinkItemExported;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
+
import { jsx } from '@emotion/react';
|
|
8
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
9
|
+
import { Box, Stack, xcss } from '@atlaskit/primitives';
|
|
10
|
+
import { messages } from '../../../../messages';
|
|
11
|
+
import RelatedLinkItem from '../related-link-item';
|
|
12
|
+
var RelatedLinksList = function RelatedLinksList(_ref) {
|
|
13
|
+
var urls = _ref.urls,
|
|
14
|
+
title = _ref.title,
|
|
15
|
+
testId = _ref.testId;
|
|
16
|
+
return jsx(Stack, {
|
|
17
|
+
testId: testId
|
|
18
|
+
}, jsx(Box, {
|
|
19
|
+
paddingBlockStart: "space.050"
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
21
|
+
,
|
|
22
|
+
xcss: xcss({
|
|
23
|
+
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)",
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
25
|
+
textTransform: 'uppercase'
|
|
26
|
+
})
|
|
27
|
+
}, jsx(FormattedMessage, title)), urls.length > 0 && jsx(Box, null, urls.map(function (url, idx) {
|
|
28
|
+
return jsx(Stack, {
|
|
29
|
+
key: "".concat(idx, "-").concat(url)
|
|
30
|
+
}, jsx(RelatedLinkItem, {
|
|
31
|
+
url: url,
|
|
32
|
+
testId: "".concat(testId, "-item-").concat(idx)
|
|
33
|
+
}));
|
|
34
|
+
})), urls.length === 0 &&
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
36
|
+
jsx(Box, {
|
|
37
|
+
paddingBlock: "space.100",
|
|
38
|
+
xcss: xcss({
|
|
39
|
+
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)"
|
|
40
|
+
})
|
|
41
|
+
}, jsx(FormattedMessage, messages.related_links_not_found)));
|
|
42
|
+
};
|
|
43
|
+
export default RelatedLinksList;
|