@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.
Files changed (193) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/utils/index.js +201 -263
  4. package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +8 -13
  5. package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +5 -8
  6. package/dist/cjs/view/FlexibleCard/components/blocks/block/index.compiled.css +34 -0
  7. package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +33 -18
  8. package/dist/cjs/view/FlexibleCard/components/blocks/block/indexOld.js +56 -0
  9. package/dist/cjs/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.js +115 -0
  10. package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.compiled.css +46 -0
  11. package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +58 -81
  12. package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +12 -8
  13. package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/indexOld.js +37 -0
  14. package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.compiled.css +15 -0
  15. package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +18 -52
  16. package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.js +104 -0
  17. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.js +135 -0
  18. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.js +108 -0
  19. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +10 -57
  20. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.compiled.css +2 -0
  21. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +38 -37
  22. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.js +58 -0
  23. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +1 -0
  24. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +24 -16
  25. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +48 -0
  26. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +55 -0
  27. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -19
  28. package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +14 -9
  29. package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +4 -9
  30. package/dist/cjs/view/LinkUrl/index.js +1 -1
  31. package/dist/cjs/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +15 -14
  32. package/dist/cjs/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.js +63 -0
  33. package/dist/cjs/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.js +61 -0
  34. package/dist/cjs/view/RelatedLinksModal/components/related-link-item/index.js +20 -19
  35. package/dist/cjs/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.js +51 -0
  36. package/dist/cjs/view/RelatedLinksModal/components/related-links-list/index.js +24 -24
  37. package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.js +66 -0
  38. package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/index.compiled.css +6 -0
  39. package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/index.js +31 -25
  40. package/dist/cjs/view/RelatedLinksModal/views/resolved/ResolvedOld.js +45 -0
  41. package/dist/cjs/view/RelatedLinksModal/views/resolved/index.js +16 -14
  42. package/dist/cjs/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.js +141 -0
  43. package/dist/cjs/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.compiled.css +6 -0
  44. package/dist/cjs/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +56 -50
  45. package/dist/es2019/utils/analytics/analytics.js +1 -1
  46. package/dist/es2019/utils/index.js +69 -55
  47. package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +1 -3
  48. package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +1 -4
  49. package/dist/es2019/view/FlexibleCard/components/blocks/block/index.compiled.css +34 -0
  50. package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +32 -35
  51. package/dist/es2019/view/FlexibleCard/components/blocks/block/indexOld.js +62 -0
  52. package/dist/es2019/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.js +113 -0
  53. package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.compiled.css +46 -0
  54. package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +60 -95
  55. package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +12 -8
  56. package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/indexOld.js +28 -0
  57. package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.compiled.css +15 -0
  58. package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +14 -62
  59. package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.js +106 -0
  60. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.js +118 -0
  61. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.js +102 -0
  62. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +11 -57
  63. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.compiled.css +2 -0
  64. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +35 -36
  65. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.js +50 -0
  66. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +1 -0
  67. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +15 -11
  68. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +42 -0
  69. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +55 -0
  70. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +20 -18
  71. package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +9 -2
  72. package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +1 -3
  73. package/dist/es2019/view/LinkUrl/index.js +1 -1
  74. package/dist/es2019/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +15 -14
  75. package/dist/es2019/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.js +55 -0
  76. package/dist/es2019/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.js +55 -0
  77. package/dist/es2019/view/RelatedLinksModal/components/related-link-item/index.js +19 -18
  78. package/dist/es2019/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.js +42 -0
  79. package/dist/es2019/view/RelatedLinksModal/components/related-links-list/index.js +23 -22
  80. package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.js +58 -0
  81. package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/index.compiled.css +6 -0
  82. package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/index.js +28 -24
  83. package/dist/es2019/view/RelatedLinksModal/views/resolved/ResolvedOld.js +36 -0
  84. package/dist/es2019/view/RelatedLinksModal/views/resolved/index.js +16 -13
  85. package/dist/es2019/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.js +133 -0
  86. package/dist/es2019/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.compiled.css +6 -0
  87. package/dist/es2019/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +53 -49
  88. package/dist/esm/utils/analytics/analytics.js +1 -1
  89. package/dist/esm/utils/index.js +116 -162
  90. package/dist/esm/view/FlexibleCard/components/actions/action/index.js +1 -3
  91. package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +1 -4
  92. package/dist/esm/view/FlexibleCard/components/blocks/block/index.compiled.css +34 -0
  93. package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +31 -20
  94. package/dist/esm/view/FlexibleCard/components/blocks/block/indexOld.js +50 -0
  95. package/dist/esm/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.js +108 -0
  96. package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.compiled.css +46 -0
  97. package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +54 -79
  98. package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +12 -8
  99. package/dist/esm/view/FlexibleCard/components/blocks/preview-block/indexOld.js +30 -0
  100. package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.compiled.css +15 -0
  101. package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +15 -53
  102. package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.js +98 -0
  103. package/dist/esm/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.js +127 -0
  104. package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.js +101 -0
  105. package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +11 -56
  106. package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.compiled.css +2 -0
  107. package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +36 -37
  108. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.js +53 -0
  109. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +1 -0
  110. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +15 -11
  111. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +42 -0
  112. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +55 -0
  113. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +20 -18
  114. package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +14 -9
  115. package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +1 -3
  116. package/dist/esm/view/LinkUrl/index.js +1 -1
  117. package/dist/esm/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +15 -14
  118. package/dist/esm/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.js +53 -0
  119. package/dist/esm/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.js +54 -0
  120. package/dist/esm/view/RelatedLinksModal/components/related-link-item/index.js +19 -18
  121. package/dist/esm/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.js +43 -0
  122. package/dist/esm/view/RelatedLinksModal/components/related-links-list/index.js +24 -23
  123. package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.js +58 -0
  124. package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/index.compiled.css +6 -0
  125. package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/index.js +28 -24
  126. package/dist/esm/view/RelatedLinksModal/views/resolved/ResolvedOld.js +37 -0
  127. package/dist/esm/view/RelatedLinksModal/views/resolved/index.js +16 -13
  128. package/dist/esm/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.js +133 -0
  129. package/dist/esm/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.compiled.css +6 -0
  130. package/dist/esm/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +53 -49
  131. package/dist/types/utils/index.d.ts +2 -0
  132. package/dist/types/view/FlexibleCard/components/blocks/block/index.d.ts +3 -10
  133. package/dist/types/view/FlexibleCard/components/blocks/block/indexOld.d.ts +11 -0
  134. package/dist/types/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.d.ts +17 -0
  135. package/dist/types/view/FlexibleCard/components/blocks/element-group/index.d.ts +5 -9
  136. package/dist/types/view/FlexibleCard/components/blocks/element-group/types.d.ts +1 -0
  137. package/dist/types/view/FlexibleCard/components/blocks/preview-block/index.d.ts +3 -13
  138. package/dist/types/view/FlexibleCard/components/blocks/preview-block/indexOld.d.ts +14 -0
  139. package/dist/types/view/FlexibleCard/components/blocks/preview-block/resolved/index.d.ts +2 -2
  140. package/dist/types/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.d.ts +10 -0
  141. package/dist/types/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.d.ts +16 -0
  142. package/dist/types/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.d.ts +15 -0
  143. package/dist/types/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +5 -7
  144. package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -13
  145. package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.d.ts +9 -0
  146. package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +8 -2
  147. package/dist/types/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.d.ts +14 -0
  148. package/dist/types/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +5 -3
  149. package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +2 -0
  150. package/dist/types/view/RelatedLinksModal/components/RelatedLinksBaseModal.d.ts +3 -7
  151. package/dist/types/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.d.ts +8 -0
  152. package/dist/types/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.d.ts +8 -0
  153. package/dist/types/view/RelatedLinksModal/components/related-link-item/index.d.ts +3 -7
  154. package/dist/types/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.d.ts +8 -0
  155. package/dist/types/view/RelatedLinksModal/components/related-links-list/index.d.ts +3 -7
  156. package/dist/types/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.d.ts +6 -0
  157. package/dist/types/view/RelatedLinksModal/views/errored/error-svg/index.d.ts +2 -6
  158. package/dist/types/view/RelatedLinksModal/views/resolved/ResolvedOld.d.ts +8 -0
  159. package/dist/types/view/RelatedLinksModal/views/resolved/index.d.ts +3 -7
  160. package/dist/types/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.d.ts +6 -0
  161. package/dist/types/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.d.ts +2 -6
  162. package/dist/types-ts4.5/utils/index.d.ts +2 -0
  163. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/block/index.d.ts +3 -10
  164. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/block/indexOld.d.ts +11 -0
  165. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.d.ts +17 -0
  166. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/element-group/index.d.ts +5 -9
  167. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/element-group/types.d.ts +1 -0
  168. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/index.d.ts +3 -13
  169. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/indexOld.d.ts +14 -0
  170. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/resolved/index.d.ts +2 -2
  171. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.d.ts +10 -0
  172. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.d.ts +16 -0
  173. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.d.ts +15 -0
  174. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +5 -7
  175. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -13
  176. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.d.ts +9 -0
  177. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +8 -2
  178. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.d.ts +14 -0
  179. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +5 -3
  180. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +2 -0
  181. package/dist/types-ts4.5/view/RelatedLinksModal/components/RelatedLinksBaseModal.d.ts +3 -7
  182. package/dist/types-ts4.5/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.d.ts +8 -0
  183. package/dist/types-ts4.5/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.d.ts +8 -0
  184. package/dist/types-ts4.5/view/RelatedLinksModal/components/related-link-item/index.d.ts +3 -7
  185. package/dist/types-ts4.5/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.d.ts +8 -0
  186. package/dist/types-ts4.5/view/RelatedLinksModal/components/related-links-list/index.d.ts +3 -7
  187. package/dist/types-ts4.5/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.d.ts +6 -0
  188. package/dist/types-ts4.5/view/RelatedLinksModal/views/errored/error-svg/index.d.ts +2 -6
  189. package/dist/types-ts4.5/view/RelatedLinksModal/views/resolved/ResolvedOld.d.ts +8 -0
  190. package/dist/types-ts4.5/view/RelatedLinksModal/views/resolved/index.d.ts +3 -7
  191. package/dist/types-ts4.5/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.d.ts +6 -0
  192. package/dist/types-ts4.5/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.d.ts +2 -6
  193. package/package.json +4 -4
@@ -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()[fileMimeType.toLowerCase()] : typeToIcon[fileMimeType.toLowerCase()];
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()[fileMimeType.toLowerCase()] : typeToIcon[fileMimeType.toLowerCase()];
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 getTypeToIconMap = function getTypeToIconMap() {
223
- return {
224
- 'text/plain': ['Document', function () {
225
- return import( /* webpackChunkName: "@atlaskit-internal_page-icon" */'../common/ui/icons/page-icon');
226
- }],
227
- 'application/vnd.oasis.opendocument.text': ['Document', function () {
228
- return import( /* webpackChunkName: "@atlaskit-internal_page-icon" */'../common/ui/icons/page-icon');
229
- }],
230
- 'application/vnd.apple.pages': ['Document', function () {
231
- return import( /* webpackChunkName: "@atlaskit-internal_page-icon" */'../common/ui/icons/page-icon');
232
- }],
233
- 'application/vnd.google-apps.document': ['Google Doc', function () {
234
- return import('@atlaskit/icon-file-type/glyph/google-doc/16');
235
- }],
236
- 'application/msword': ['Word document', function () {
237
- return import('@atlaskit/icon-file-type/glyph/word-document/16');
238
- }],
239
- 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': ['Word document', function () {
240
- return import('@atlaskit/icon-file-type/glyph/word-document/16');
241
- }],
242
- 'application/pdf': ['PDF document', function () {
243
- return import('@atlaskit/icon-file-type/glyph/pdf-document/16');
244
- }],
245
- 'application/vnd.oasis.opendocument.spreadsheet': ['Spreadsheet', function () {
246
- return import( /* webpackChunkName: "@atlaskit-internal_list-bullet-icon" */'../common/ui/icons/list-bullet-icon');
247
- }],
248
- 'application/vnd.apple.numbers': ['Spreadsheet', function () {
249
- return import( /* webpackChunkName: "@atlaskit-internal_list-bullet-icon" */'../common/ui/icons/list-bullet-icon');
250
- }],
251
- 'application/vnd.google-apps.spreadsheet': ['Google Sheet', function () {
252
- return import('@atlaskit/icon-file-type/glyph/google-sheet/16');
253
- }],
254
- 'application/vnd.ms-excel': ['Excel spreadsheet', function () {
255
- return import('@atlaskit/icon-file-type/glyph/excel-spreadsheet/16');
256
- }],
257
- 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': ['Excel spreadsheet', function () {
258
- return import('@atlaskit/icon-file-type/glyph/excel-spreadsheet/16');
259
- }],
260
- 'application/vnd.oasis.opendocument.presentation': ['Presentation', function () {
261
- return import( /* webpackChunkName: "@atlaskit-internal_chart-bar-icon" */'../common/ui/icons/chart-bar-icon');
262
- }],
263
- 'application/vnd.apple.keynote': ['Presentation', function () {
264
- return import( /* webpackChunkName: "@atlaskit-internal_chart-bar-icon" */'../common/ui/icons/chart-bar-icon');
265
- }],
266
- 'application/vnd.google-apps.presentation': ['Google Slide', function () {
267
- return import('@atlaskit/icon-file-type/glyph/google-slide/16');
268
- }],
269
- 'application/vnd.ms-powerpoint': ['PowerPoint presentation', function () {
270
- return import('@atlaskit/icon-file-type/glyph/powerpoint-presentation/16');
271
- }],
272
- 'application/vnd.openxmlformats-officedocument.presentationml.presentation': ['PowerPoint presentation', function () {
273
- return import('@atlaskit/icon-file-type/glyph/powerpoint-presentation/16');
274
- }],
275
- 'application/vnd.google-apps.form': ['Google Form', function () {
276
- return import('@atlaskit/icon-file-type/glyph/google-form/16');
277
- }],
278
- 'image/png': ['Image', function () {
279
- return import( /* webpackChunkName: "@atlaskit-internal_image-icon" */'../common/ui/icons/image-icon');
280
- }],
281
- 'image/jpeg': ['Image', function () {
282
- return import( /* webpackChunkName: "@atlaskit-internal_image-icon" */'../common/ui/icons/image-icon');
283
- }],
284
- 'image/bmp': ['Image', function () {
285
- return import( /* webpackChunkName: "@atlaskit-internal_image-icon" */'../common/ui/icons/image-icon');
286
- }],
287
- 'image/webp': ['Image', function () {
288
- return import( /* webpackChunkName: "@atlaskit-internal_image-icon" */'../common/ui/icons/image-icon');
289
- }],
290
- 'image/svg+xml': ['Image', function () {
291
- return import( /* webpackChunkName: "@atlaskit-internal_image-icon" */'../common/ui/icons/image-icon');
292
- }],
293
- 'image/gif': ['GIF', function () {
294
- return import('@atlaskit/icon-file-type/glyph/gif/16');
295
- }],
296
- 'audio/midi': ['Audio', function () {
297
- return import( /* webpackChunkName: "@atlaskit-internal_audio-icon" */'../common/ui/icons/audio-icon');
298
- }],
299
- 'audio/mpeg': ['Audio', function () {
300
- return import( /* webpackChunkName: "@atlaskit-internal_audio-icon" */'../common/ui/icons/audio-icon');
301
- }],
302
- 'audio/webm': ['Audio', function () {
303
- return import( /* webpackChunkName: "@atlaskit-internal_audio-icon" */'../common/ui/icons/audio-icon');
304
- }],
305
- 'audio/ogg': ['Audio', function () {
306
- return import( /* webpackChunkName: "@atlaskit-internal_audio-icon" */'../common/ui/icons/audio-icon');
307
- }],
308
- 'audio/wav': ['Audio', function () {
309
- return import( /* webpackChunkName: "@atlaskit-internal_audio-icon" */'../common/ui/icons/audio-icon');
310
- }],
311
- 'video/mp4': ['Video', function () {
312
- return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
313
- }],
314
- 'video/quicktime': ['Video', function () {
315
- return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
316
- }],
317
- 'video/mov': ['Video', function () {
318
- return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
319
- }],
320
- 'video/webm': ['Video', function () {
321
- return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
322
- }],
323
- 'video/ogg': ['Video', function () {
324
- return import( /* webpackChunkName: "@atlaskit-internal_video-icon" */'../common/ui/icons/video-icon');
325
- }],
326
- 'video/x-ms-wmv': ['Video', function () {
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 _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(importFn) {
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 _ref.apply(this, arguments);
388
+ return _ref4.apply(this, arguments);
435
389
  };
436
390
  }();
437
391
  export var downloadUrl = /*#__PURE__*/function () {
438
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(url) {
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 _ref2.apply(this, arguments);
428
+ return _ref5.apply(this, arguments);
475
429
  };
476
430
  }();
477
431
  export var openUrl = /*#__PURE__*/function () {
478
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(url) {
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 _ref3.apply(this, arguments);
450
+ return _ref6.apply(this, arguments);
497
451
  };
498
452
  }();
499
453
 
@@ -1,6 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.35.0 */
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 * as React from 'react';
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
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
3
- /**
4
- * @jsxRuntime classic
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
- // 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);
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
- overrideCss = _ref.overrideCss,
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 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],
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
- export default Block;
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;