@atlaskit/smart-card 34.2.2 → 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 +23 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +201 -263
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +8 -13
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +5 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.compiled.css +34 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +33 -18
- package/dist/cjs/view/FlexibleCard/components/blocks/block/indexOld.js +56 -0
- 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/preview-block/index.js +12 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/indexOld.js +37 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.compiled.css +15 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +18 -52
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.js +104 -0
- 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/FlexibleCard/components/common/image-icon/index.js +4 -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/actions/action/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.compiled.css +34 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +32 -35
- package/dist/es2019/view/FlexibleCard/components/blocks/block/indexOld.js +62 -0
- 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/preview-block/index.js +12 -8
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/indexOld.js +28 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.compiled.css +15 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +14 -62
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.js +106 -0
- 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/FlexibleCard/components/common/image-icon/index.js +1 -3
- 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/actions/action/index.js +1 -3
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +1 -4
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.compiled.css +34 -0
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +31 -20
- package/dist/esm/view/FlexibleCard/components/blocks/block/indexOld.js +50 -0
- 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/preview-block/index.js +12 -8
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/indexOld.js +30 -0
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.compiled.css +15 -0
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +15 -53
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.js +98 -0
- 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/FlexibleCard/components/common/image-icon/index.js +1 -3
- 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/block/index.d.ts +3 -10
- package/dist/types/view/FlexibleCard/components/blocks/block/indexOld.d.ts +11 -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/preview-block/index.d.ts +3 -13
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/indexOld.d.ts +14 -0
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/resolved/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.d.ts +10 -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 +2 -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/block/index.d.ts +3 -10
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/block/indexOld.d.ts +11 -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/preview-block/index.d.ts +3 -13
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/indexOld.d.ts +14 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/resolved/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.d.ts +10 -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 +2 -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 +4 -4
package/dist/esm/utils/index.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import Loadable from 'react-loadable';
|
|
6
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { themeObjectToString } from '@atlaskit/tokens';
|
|
9
|
+
import { IconType } from '../constants';
|
|
10
|
+
import extractFileFormatIcon from '../extractors/flexible/icon/extract-file-formatIcon';
|
|
8
11
|
export var isSpecialEvent = function isSpecialEvent(evt) {
|
|
9
12
|
return evt.isDefaultPrevented() && (isIframe() || isSpecialKey(evt) || isSpecialClick(evt));
|
|
10
13
|
};
|
|
@@ -31,7 +34,7 @@ export var getIconForFileType = function getIconForFileType(fileMimeType) {
|
|
|
31
34
|
if (!fileMimeType) {
|
|
32
35
|
return;
|
|
33
36
|
}
|
|
34
|
-
var icon = fg('platform-smart-card-icon-migration') ? getTypeToIconMap(
|
|
37
|
+
var icon = fg('platform-smart-card-icon-migration') ? getTypeToIconMap(fileMimeType.toLowerCase()) : typeToIcon[fileMimeType.toLowerCase()];
|
|
35
38
|
if (!icon) {
|
|
36
39
|
return;
|
|
37
40
|
}
|
|
@@ -58,7 +61,7 @@ export var getIconForFileType = function getIconForFileType(fileMimeType) {
|
|
|
58
61
|
});
|
|
59
62
|
};
|
|
60
63
|
export var getLabelForFileType = function getLabelForFileType(fileMimeType) {
|
|
61
|
-
var icon = fg('platform-smart-card-icon-migration') ? getTypeToIconMap(
|
|
64
|
+
var icon = fg('platform-smart-card-icon-migration') ? getTypeToIconMap(fileMimeType.toLowerCase()) : typeToIcon[fileMimeType.toLowerCase()];
|
|
62
65
|
if (!icon) {
|
|
63
66
|
return;
|
|
64
67
|
}
|
|
@@ -219,160 +222,111 @@ var typeToIcon = {
|
|
|
219
222
|
return import('@atlaskit/icon-file-type/glyph/folder/16');
|
|
220
223
|
}]
|
|
221
224
|
};
|
|
222
|
-
var
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
'
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
'
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
'
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
'
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
'
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
'
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
|
|
328
|
-
}],
|
|
329
|
-
'video/x-msvideo': ['Video', function () {
|
|
330
|
-
return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
|
|
331
|
-
}],
|
|
332
|
-
'application/zip': ['Archive', function () {
|
|
333
|
-
return import('@atlaskit/icon-file-type/glyph/archive/16');
|
|
334
|
-
}],
|
|
335
|
-
'application/x-tar': ['Archive', function () {
|
|
336
|
-
return import('@atlaskit/icon-file-type/glyph/archive/16');
|
|
337
|
-
}],
|
|
338
|
-
'application/x-gtar': ['Archive', function () {
|
|
339
|
-
return import('@atlaskit/icon-file-type/glyph/archive/16');
|
|
340
|
-
}],
|
|
341
|
-
'application/x-7z-compressed': ['Archive', function () {
|
|
342
|
-
return import('@atlaskit/icon-file-type/glyph/archive/16');
|
|
343
|
-
}],
|
|
344
|
-
'application/x-apple-diskimage': ['Archive', function () {
|
|
345
|
-
return import('@atlaskit/icon-file-type/glyph/archive/16');
|
|
346
|
-
}],
|
|
347
|
-
'application/vnd.rar': ['Archive', function () {
|
|
348
|
-
return import('@atlaskit/icon-file-type/glyph/archive/16');
|
|
349
|
-
}],
|
|
350
|
-
'application/dmg': ['Executable', function () {
|
|
351
|
-
return import('@atlaskit/icon-file-type/glyph/executable/16');
|
|
352
|
-
}],
|
|
353
|
-
'text/css': ['Source Code', function () {
|
|
354
|
-
return import( /* webpackChunkName: "@atlaskit-internal_angle-brackets-icon" */'../common/ui/icons/angle-brackets-icon');
|
|
355
|
-
}],
|
|
356
|
-
'text/html': ['Source Code', function () {
|
|
357
|
-
return import( /* webpackChunkName: "@atlaskit-internal_angle-brackets-icon" */'../common/ui/icons/angle-brackets-icon');
|
|
358
|
-
}],
|
|
359
|
-
'application/javascript': ['Source Code', function () {
|
|
360
|
-
return import( /* webpackChunkName: "@atlaskit-internal_angle-brackets-icon" */'../common/ui/icons/angle-brackets-icon');
|
|
361
|
-
}],
|
|
362
|
-
'application/octet-stream': ['Binary file', function () {
|
|
363
|
-
return import( /* webpackChunkName: "@atlaskit-internal_file-icon" */'../common/ui/icons/file-icon');
|
|
364
|
-
}],
|
|
365
|
-
'application/invision.prototype': ['Prototype', function () {
|
|
366
|
-
return import( /* webpackChunkName: "@atlaskit-internal_file-icon" */'../common/ui/icons/file-icon');
|
|
367
|
-
}],
|
|
368
|
-
// TODO: Figure a way to detect those
|
|
369
|
-
'application/sketch': ['Sketch', function () {
|
|
370
|
-
return import('@atlaskit/icon-file-type/glyph/sketch/16');
|
|
371
|
-
}],
|
|
372
|
-
folder: ['Folder', function () {
|
|
373
|
-
return import( /* webpackChunkName: "@atlaskit-internal_folder-icon" */'../common/ui/icons/folder-icon');
|
|
374
|
-
}]
|
|
375
|
-
};
|
|
225
|
+
export var getLazyIcons = function getLazyIcons() {
|
|
226
|
+
var _ref3;
|
|
227
|
+
return _ref3 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref3, IconType.Document, function () {
|
|
228
|
+
return import( /* webpackChunkName: "@atlaskit-internal_page-icon" */'../common/ui/icons/page-icon');
|
|
229
|
+
}), IconType.Blog, function () {
|
|
230
|
+
return import( /* webpackChunkName: "@atlaskit-internal_glyphBlock" */'@atlaskit/icon-object/glyph/blog/16');
|
|
231
|
+
}), IconType.Audio, function () {
|
|
232
|
+
return import( /* webpackChunkName: "@atlaskit-internal_audio-icon" */'../common/ui/icons/audio-icon');
|
|
233
|
+
}), IconType.Code, function () {
|
|
234
|
+
return import( /* webpackChunkName: "@atlaskit-internal_angle-brackets-icon" */'../common/ui/icons/angle-brackets-icon');
|
|
235
|
+
}), IconType.File, function () {
|
|
236
|
+
return import( /* webpackChunkName: "@atlaskit-internal_file-icon" */'../common/ui/icons/file-icon');
|
|
237
|
+
}), IconType.Folder, function () {
|
|
238
|
+
return import( /* webpackChunkName: "@atlaskit-internal_folder-icon" */'../common/ui/icons/folder-icon');
|
|
239
|
+
}), IconType.Generic, function () {
|
|
240
|
+
return import( /* webpackChunkName: "@atlaskit-internal_file-icon" */'../common/ui/icons/file-icon');
|
|
241
|
+
}), IconType.Image, function () {
|
|
242
|
+
return import( /* webpackChunkName: "@atlaskit-internal_image-icon" */'../common/ui/icons/image-icon');
|
|
243
|
+
}), IconType.Presentation, function () {
|
|
244
|
+
return import( /* webpackChunkName: "@atlaskit-internal_chart-bar-icon" */'../common/ui/icons/chart-bar-icon');
|
|
245
|
+
}), IconType.Spreadsheet, function () {
|
|
246
|
+
return import( /* webpackChunkName: "@atlaskit-internal_list-bullet-icon" */'../common/ui/icons/list-bullet-icon');
|
|
247
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref3, IconType.Video, function () {
|
|
248
|
+
return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
|
|
249
|
+
}), IconType.Project, function () {
|
|
250
|
+
return import( /* webpackChunkName: "@atlaskit-internal_glyphProject" */'@atlaskit/icon/core/migration/people-group');
|
|
251
|
+
}), IconType.Template, function () {
|
|
252
|
+
return import( /* webpackChunkName: "@atlaskit-internal_glyphTemplate" */'@atlaskit/icon/core/migration/file--document-filled');
|
|
253
|
+
}), IconType.Forbidden, function () {
|
|
254
|
+
return import( /* webpackChunkName: "@atlaskit-internal_glyphForbidden" */'@atlaskit/icon/core/migration/lock-locked--lock-filled');
|
|
255
|
+
}), IconType.Default, function () {
|
|
256
|
+
return import( /* webpackChunkName: "@atlaskit-internal_glyphDefault" */'@atlaskit/icon/core/migration/link');
|
|
257
|
+
}), IconType.Archive, function () {
|
|
258
|
+
return import( /* webpackChunkName: "glyphArchive" */'@atlaskit/icon-file-type/glyph/archive/16');
|
|
259
|
+
}), IconType.Executable, function () {
|
|
260
|
+
return import( /* webpackChunkName: "glyphExecutable" */'@atlaskit/icon-file-type/glyph/executable/16');
|
|
261
|
+
}), IconType.GIF, function () {
|
|
262
|
+
return import( /* webpackChunkName: "glyphGIF" */'@atlaskit/icon-file-type/glyph/gif/16');
|
|
263
|
+
}), IconType.GoogleDocs, function () {
|
|
264
|
+
return import( /* webpackChunkName: "glyphGoogleDocs" */'@atlaskit/icon-file-type/glyph/google-doc/16');
|
|
265
|
+
}), IconType.GoogleForms, function () {
|
|
266
|
+
return import( /* webpackChunkName: "glyphGoogleForms" */'@atlaskit/icon-file-type/glyph/google-form/16');
|
|
267
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref3, IconType.GoogleSheets, function () {
|
|
268
|
+
return import( /* webpackChunkName: "glyphGoogleSheets" */'@atlaskit/icon-file-type/glyph/google-sheet/16');
|
|
269
|
+
}), IconType.GoogleSlides, function () {
|
|
270
|
+
return import( /* webpackChunkName: "glyphGoogleSlides" */'@atlaskit/icon-file-type/glyph/google-slide/16');
|
|
271
|
+
}), IconType.MSExcel, function () {
|
|
272
|
+
return import( /* webpackChunkName: "glyphMSExcel" */'@atlaskit/icon-file-type/glyph/excel-spreadsheet/16');
|
|
273
|
+
}), IconType.MSPowerpoint, function () {
|
|
274
|
+
return import( /* webpackChunkName: "glyphMSPowerpoint" */'@atlaskit/icon-file-type/glyph/powerpoint-presentation/16');
|
|
275
|
+
}), IconType.MSWord, function () {
|
|
276
|
+
return import( /* webpackChunkName: "glyphMSWord" */'@atlaskit/icon-file-type/glyph/word-document/16');
|
|
277
|
+
}), IconType.PDF, function () {
|
|
278
|
+
return import( /* webpackChunkName: "glyphPDF" */'@atlaskit/icon-file-type/glyph/pdf-document/16');
|
|
279
|
+
}), IconType.Sketch, function () {
|
|
280
|
+
return import( /* webpackChunkName: "glyphSketch" */'@atlaskit/icon-file-type/glyph/sketch/16');
|
|
281
|
+
}), IconType.Branch, function () {
|
|
282
|
+
return import( /* webpackChunkName: "glyphBranch" */'@atlaskit/icon-object/glyph/branch/16');
|
|
283
|
+
}), IconType.Commit, function () {
|
|
284
|
+
return import( /* webpackChunkName: "glyphCommit" */'@atlaskit/icon-object/glyph/commit/16');
|
|
285
|
+
}), IconType.PullRequest, function () {
|
|
286
|
+
return import( /* webpackChunkName: "glyphPullRequest" */'@atlaskit/icon-object/glyph/pull-request/16');
|
|
287
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref3, IconType.Repo, function () {
|
|
288
|
+
return import( /* webpackChunkName: "glyphRepo" */'@atlaskit/icon-object/glyph/code/16');
|
|
289
|
+
}), IconType.Bug, function () {
|
|
290
|
+
return import( /* webpackChunkName: "glyphBug" */'@atlaskit/icon-object/glyph/bug/16');
|
|
291
|
+
}), IconType.Change, function () {
|
|
292
|
+
return import( /* webpackChunkName: "glyphChange" */'@atlaskit/icon-object/glyph/changes/16');
|
|
293
|
+
}), IconType.Epic, function () {
|
|
294
|
+
return import( /* webpackChunkName: "glyphEpic" */'@atlaskit/icon-object/glyph/epic/16');
|
|
295
|
+
}), IconType.Incident, function () {
|
|
296
|
+
return import( /* webpackChunkName: "glyphIncident" */'@atlaskit/icon-object/glyph/incident/16');
|
|
297
|
+
}), IconType.Problem, function () {
|
|
298
|
+
return import( /* webpackChunkName: "glyphProblem" */'@atlaskit/icon-object/glyph/problem/16');
|
|
299
|
+
}), IconType.ServiceRequest, function () {
|
|
300
|
+
return import( /* webpackChunkName: "glyphServiceRequest" */'@atlaskit/icon-object/glyph/issue/16');
|
|
301
|
+
}), IconType.Story, function () {
|
|
302
|
+
return import( /* webpackChunkName: "glyphStory" */'@atlaskit/icon-object/glyph/story/16');
|
|
303
|
+
}), IconType.SubTask, function () {
|
|
304
|
+
return import( /* webpackChunkName: "glyphSubTask" */'@atlaskit/icon-object/glyph/subtask/16');
|
|
305
|
+
}), IconType.Task, function () {
|
|
306
|
+
return import( /* webpackChunkName: "glyphTask" */'@atlaskit/icon-object/glyph/task/16');
|
|
307
|
+
}), _defineProperty(_defineProperty(_ref3, IconType.Confluence, function () {
|
|
308
|
+
return import( /* webpackChunkName: "glyphConfluence" */'@atlaskit/logo/confluence-icon').then(function (_ref) {
|
|
309
|
+
var ConfluenceIcon = _ref.ConfluenceIcon;
|
|
310
|
+
return {
|
|
311
|
+
default: ConfluenceIcon
|
|
312
|
+
};
|
|
313
|
+
});
|
|
314
|
+
}), IconType.Jira, function () {
|
|
315
|
+
return import( /* webpackChunkName: "glyphJira" */'@atlaskit/logo/jira-icon').then(function (_ref2) {
|
|
316
|
+
var JiraIcon = _ref2.JiraIcon;
|
|
317
|
+
return {
|
|
318
|
+
default: JiraIcon
|
|
319
|
+
};
|
|
320
|
+
});
|
|
321
|
+
});
|
|
322
|
+
};
|
|
323
|
+
var getTypeToIconMap = function getTypeToIconMap(fileFormat) {
|
|
324
|
+
var iconDescriptor = extractFileFormatIcon(fileFormat);
|
|
325
|
+
if (!(iconDescriptor !== null && iconDescriptor !== void 0 && iconDescriptor.icon) || !iconDescriptor.label) {
|
|
326
|
+
return null;
|
|
327
|
+
}
|
|
328
|
+
var lazyIcons = getLazyIcons();
|
|
329
|
+
return [iconDescriptor.label, lazyIcons[iconDescriptor.icon]];
|
|
376
330
|
};
|
|
377
331
|
export var getIframeSandboxAttribute = function getIframeSandboxAttribute(isTrusted) {
|
|
378
332
|
if (isTrusted) {
|
|
@@ -397,7 +351,7 @@ export var sleep = function sleep(ms) {
|
|
|
397
351
|
});
|
|
398
352
|
};
|
|
399
353
|
export var importWithRetry = /*#__PURE__*/function () {
|
|
400
|
-
var
|
|
354
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(importFn) {
|
|
401
355
|
var retries,
|
|
402
356
|
interval,
|
|
403
357
|
_args = arguments;
|
|
@@ -431,11 +385,11 @@ export var importWithRetry = /*#__PURE__*/function () {
|
|
|
431
385
|
}, _callee, null, [[2, 8]]);
|
|
432
386
|
}));
|
|
433
387
|
return function importWithRetry(_x) {
|
|
434
|
-
return
|
|
388
|
+
return _ref4.apply(this, arguments);
|
|
435
389
|
};
|
|
436
390
|
}();
|
|
437
391
|
export var downloadUrl = /*#__PURE__*/function () {
|
|
438
|
-
var
|
|
392
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(url) {
|
|
439
393
|
var isIE11, isSafari, iframeName, link, iframe;
|
|
440
394
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
441
395
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -471,11 +425,11 @@ export var downloadUrl = /*#__PURE__*/function () {
|
|
|
471
425
|
}, _callee2);
|
|
472
426
|
}));
|
|
473
427
|
return function downloadUrl(_x2) {
|
|
474
|
-
return
|
|
428
|
+
return _ref5.apply(this, arguments);
|
|
475
429
|
};
|
|
476
430
|
}();
|
|
477
431
|
export var openUrl = /*#__PURE__*/function () {
|
|
478
|
-
var
|
|
432
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(url) {
|
|
479
433
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
480
434
|
while (1) switch (_context3.prev = _context3.next) {
|
|
481
435
|
case 0:
|
|
@@ -493,7 +447,7 @@ export var openUrl = /*#__PURE__*/function () {
|
|
|
493
447
|
}, _callee3);
|
|
494
448
|
}));
|
|
495
449
|
return function openUrl(_x3) {
|
|
496
|
-
return
|
|
450
|
+
return _ref6.apply(this, arguments);
|
|
497
451
|
};
|
|
498
452
|
}();
|
|
499
453
|
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
3
|
import { SmartLinkSize } from '../../../../../constants';
|
|
6
4
|
import ActionButton from './action-button';
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
3
|
var _excluded = ["onClick"];
|
|
5
|
-
import
|
|
6
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
7
|
-
import { lazy, useCallback } from 'react';
|
|
4
|
+
import React, { lazy, useCallback } from 'react';
|
|
8
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
9
6
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
10
7
|
import { messages } from '../../../../../messages';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
._zulp1j6v{gap:1rem}
|
|
3
|
+
._zulp1k92{gap:1.25rem}
|
|
4
|
+
._zulp1kwk{gap:.5rem}
|
|
5
|
+
._zulp6mu8{gap:.25rem}._12ji1kw7{outline-color:inherit}
|
|
6
|
+
._12ji1snc{outline-color:currentColor!important}
|
|
7
|
+
._12y310yn{outline-width:medium!important}
|
|
8
|
+
._181uglyw{-webkit-user-select:none}
|
|
9
|
+
._18m915vq{overflow-y:hidden}
|
|
10
|
+
._18ql1j28{-webkit-tap-highlight-color:transparent}
|
|
11
|
+
._1bah1y6m{justify-content:flex-start}
|
|
12
|
+
._1e0c1txw{display:flex}
|
|
13
|
+
._1ifmglyw{-webkit-touch-callout:none}
|
|
14
|
+
._1ljq1j6v [data-separator]+[data-separator]:before{margin-right:1rem}
|
|
15
|
+
._1ljq1k92 [data-separator]+[data-separator]:before{margin-right:1.25rem}
|
|
16
|
+
._1ljq1kwk [data-separator]+[data-separator]:before{margin-right:.5rem}
|
|
17
|
+
._1ljq6mu8 [data-separator]+[data-separator]:before{margin-right:.25rem}
|
|
18
|
+
._1ouwidpf>*{min-width:0}
|
|
19
|
+
._1qu2agmp{outline-style:none!important}
|
|
20
|
+
._1reo15vq{overflow-x:hidden}
|
|
21
|
+
._1rkwglyw{-moz-user-select:none}
|
|
22
|
+
._1ul9idpf{min-width:0}
|
|
23
|
+
._1uzp1mp2 [data-separator]+[data-separator]:before{content:"•"}
|
|
24
|
+
._2lx21bp4{flex-direction:column}
|
|
25
|
+
._2lx2vrvc{flex-direction:row}
|
|
26
|
+
._4cvr1h6o{align-items:center}
|
|
27
|
+
._4cvr1y6m{align-items:flex-start}
|
|
28
|
+
._a7e8uxlv [data-smart-element=TargetBranch]+[data-smart-element=SourceBranch]:before{content:"←"}
|
|
29
|
+
._f6ju1ns9>[data-fit-to-content]{min-width:-moz-fit-content;min-width:fit-content}
|
|
30
|
+
._fiawglyw:empty{display:none}
|
|
31
|
+
._syaz1kw7{color:inherit}
|
|
32
|
+
._te17glyw{-ms-user-select:none}
|
|
33
|
+
._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
|
|
34
|
+
._ytq1bjq5 [data-smart-element=SourceBranch]+[data-smart-element=TargetBranch]:before{content:"→"}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* @jsx jsx
|
|
6
|
-
*/
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
7
5
|
import { useEffect } from 'react';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
|
|
8
|
+
import { renderChildren } from '../utils';
|
|
9
|
+
import BlockOld from './indexOld';
|
|
10
|
+
var BaseBlockStyles = null;
|
|
11
|
+
var highlightRemoveStyles = null;
|
|
12
|
+
var gapsStyles = {
|
|
13
|
+
xlarge: "_zulp1k92 _1ljq1k92",
|
|
14
|
+
large: "_zulp1j6v _1ljq1j6v",
|
|
15
|
+
medium: "_zulp1kwk _1ljq1kwk",
|
|
16
|
+
small: "_zulp6mu8 _1ljq6mu8"
|
|
17
|
+
};
|
|
18
|
+
var directionStyles = {
|
|
19
|
+
vertical: "_2lx21bp4 _4cvr1y6m",
|
|
20
|
+
horizontal: "_2lx2vrvc _4cvr1h6o"
|
|
17
21
|
};
|
|
18
22
|
|
|
19
23
|
/**
|
|
@@ -31,20 +35,27 @@ var Block = function Block(_ref) {
|
|
|
31
35
|
size = _ref$size === void 0 ? SmartLinkSize.Medium : _ref$size,
|
|
32
36
|
_ref$testId = _ref.testId,
|
|
33
37
|
testId = _ref$testId === void 0 ? 'smart-block' : _ref$testId,
|
|
34
|
-
|
|
38
|
+
className = _ref.className,
|
|
35
39
|
blockRef = _ref.blockRef,
|
|
36
40
|
onRender = _ref.onRender,
|
|
37
41
|
onTransitionEnd = _ref.onTransitionEnd;
|
|
38
42
|
useEffect(function () {
|
|
39
43
|
onRender && onRender();
|
|
40
44
|
}, [onRender]);
|
|
41
|
-
return
|
|
42
|
-
// eslint-disable-next-line @atlaskit/
|
|
43
|
-
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
47
|
+
className: ax(["_1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf _1bah1y6m _fiawglyw _1ouwidpf _f6ju1ns9 _1uzp1mp2 _ytq1bjq5 _a7e8uxlv", "_12ji1snc _1qu2agmp _12y310yn _12ji1kw7 _syaz1kw7 _18ql1j28 _1ifmglyw _181uglyw _1rkwglyw _te17glyw _uiztglyw", directionStyles[direction], gapsStyles[size], className]),
|
|
44
48
|
"data-smart-block": true,
|
|
45
49
|
"data-testid": testId,
|
|
46
50
|
onTransitionEnd: onTransitionEnd,
|
|
47
51
|
ref: blockRef
|
|
48
52
|
}, renderChildren(children, size));
|
|
49
53
|
};
|
|
50
|
-
|
|
54
|
+
var Exported = function Exported(props) {
|
|
55
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
56
|
+
return /*#__PURE__*/React.createElement(Block, props);
|
|
57
|
+
} else {
|
|
58
|
+
return /*#__PURE__*/React.createElement(BlockOld, props);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
export default Exported;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
6
|
+
*/
|
|
7
|
+
import { useEffect } from 'react';
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
+
import { css, jsx } from '@emotion/react';
|
|
11
|
+
import { ElementName, SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
|
|
12
|
+
import { getBaseStyles, getGapSize, highlightRemoveStyles, renderChildren } from '../utils';
|
|
13
|
+
var getBlockStyles = function getBlockStyles(direction, size
|
|
14
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
15
|
+
) {
|
|
16
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t", "\n\t", "\n justify-content: flex-start;\n\t[data-separator] + [data-separator]:before {\n\t\tcontent: '\u2022';\n\t\tmargin-right: ", "rem;\n\t}\n\t// Pull request elements: source branch \u2192 target branch\n\t[data-smart-element='", "']\n\t\t+ [data-smart-element='", "']:before {\n\t\tcontent: '\u2192';\n\t}\n\t// Pull request elements: target branch \u2190 source branch\n\t[data-smart-element='", "']\n\t\t+ [data-smart-element='", "']:before {\n\t\tcontent: '\u2190';\n\t}\n"])), getBaseStyles(direction, size), highlightRemoveStyles, getGapSize(size), ElementName.SourceBranch, ElementName.TargetBranch, ElementName.TargetBranch, ElementName.SourceBranch);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A block represents a collection of elements and actions that are arranged
|
|
21
|
+
* in a row. All elements and actions should be contained within a Block.
|
|
22
|
+
* @internal
|
|
23
|
+
* @param {ActionGroupProps} ActionGroupProps
|
|
24
|
+
* @see Action
|
|
25
|
+
*/
|
|
26
|
+
var Block = function Block(_ref) {
|
|
27
|
+
var children = _ref.children,
|
|
28
|
+
_ref$direction = _ref.direction,
|
|
29
|
+
direction = _ref$direction === void 0 ? SmartLinkDirection.Horizontal : _ref$direction,
|
|
30
|
+
_ref$size = _ref.size,
|
|
31
|
+
size = _ref$size === void 0 ? SmartLinkSize.Medium : _ref$size,
|
|
32
|
+
_ref$testId = _ref.testId,
|
|
33
|
+
testId = _ref$testId === void 0 ? 'smart-block' : _ref$testId,
|
|
34
|
+
overrideCss = _ref.overrideCss,
|
|
35
|
+
blockRef = _ref.blockRef,
|
|
36
|
+
onRender = _ref.onRender,
|
|
37
|
+
onTransitionEnd = _ref.onTransitionEnd;
|
|
38
|
+
useEffect(function () {
|
|
39
|
+
onRender && onRender();
|
|
40
|
+
}, [onRender]);
|
|
41
|
+
return jsx("div", {
|
|
42
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
43
|
+
css: [getBlockStyles(direction, size), overrideCss],
|
|
44
|
+
"data-smart-block": true,
|
|
45
|
+
"data-testid": testId,
|
|
46
|
+
onTransitionEnd: onTransitionEnd,
|
|
47
|
+
ref: blockRef
|
|
48
|
+
}, renderChildren(children, size));
|
|
49
|
+
};
|
|
50
|
+
export default Block;
|