@atlaskit/link-create 2.13.20 → 2.15.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 (235) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/common/constants.js +4 -1
  3. package/dist/cjs/common/ui/error-boundary-modal/index.js +13 -10
  4. package/dist/cjs/common/ui/error-boundary-modal/old/index.js +34 -0
  5. package/dist/cjs/common/ui/error-boundary-ui/error-svg/index.compiled.css +6 -0
  6. package/dist/cjs/common/ui/error-boundary-ui/error-svg/index.js +32 -25
  7. package/dist/cjs/common/ui/error-boundary-ui/error-svg/old/index.js +67 -0
  8. package/dist/cjs/common/ui/icon/index.compiled.css +7 -0
  9. package/dist/cjs/common/ui/icon/index.js +25 -20
  10. package/dist/cjs/common/ui/icon/old/index.js +26 -0
  11. package/dist/cjs/common/ui/message/index.compiled.css +11 -0
  12. package/dist/cjs/common/ui/message/index.js +33 -40
  13. package/dist/cjs/common/ui/message/old/index.js +81 -0
  14. package/dist/cjs/common/ui/modal-hero/index.js +11 -3
  15. package/dist/cjs/common/ui/modal-hero/old/index.js +27 -0
  16. package/dist/cjs/controllers/create-field/main.compiled.css +1 -0
  17. package/dist/cjs/controllers/create-field/main.js +30 -21
  18. package/dist/cjs/controllers/create-field/old/main.js +76 -0
  19. package/dist/cjs/ui/create-form/async-select/main.js +15 -10
  20. package/dist/cjs/ui/create-form/async-select/old/main.js +195 -0
  21. package/dist/cjs/ui/create-form/form-footer/main.compiled.css +5 -0
  22. package/dist/cjs/ui/create-form/form-footer/main.js +28 -28
  23. package/dist/cjs/ui/create-form/form-footer/old/main.js +64 -0
  24. package/dist/cjs/ui/create-form/form-loader/main.compiled.css +4 -0
  25. package/dist/cjs/ui/create-form/form-loader/main.js +22 -21
  26. package/dist/cjs/ui/create-form/form-loader/old/main.js +39 -0
  27. package/dist/cjs/ui/create-form/main.compiled.css +9 -0
  28. package/dist/cjs/ui/create-form/main.js +26 -21
  29. package/dist/cjs/ui/create-form/old/main.js +177 -0
  30. package/dist/cjs/ui/create-form/select/main.js +41 -20
  31. package/dist/cjs/ui/create-form/select/old/main.js +127 -0
  32. package/dist/cjs/ui/create-form/textfield/main.js +14 -13
  33. package/dist/cjs/ui/create-form/textfield/old/main.js +55 -0
  34. package/dist/cjs/ui/create-form/user-picker/main.js +14 -13
  35. package/dist/cjs/ui/create-form/user-picker/old/main.js +72 -0
  36. package/dist/cjs/ui/inline-create/index.js +17 -14
  37. package/dist/cjs/ui/inline-create/main.js +21 -19
  38. package/dist/cjs/ui/inline-create/old/index.js +38 -0
  39. package/dist/cjs/ui/inline-create/old/main.js +120 -0
  40. package/dist/cjs/ui/modal-create/index.js +19 -16
  41. package/dist/cjs/ui/modal-create/main.js +26 -23
  42. package/dist/cjs/ui/modal-create/old/index.js +44 -0
  43. package/dist/cjs/ui/modal-create/old/main.js +164 -0
  44. package/dist/es2019/common/constants.js +4 -1
  45. package/dist/es2019/common/ui/error-boundary-modal/index.js +12 -9
  46. package/dist/es2019/common/ui/error-boundary-modal/old/index.js +26 -0
  47. package/dist/es2019/common/ui/error-boundary-ui/error-svg/index.compiled.css +6 -0
  48. package/dist/es2019/common/ui/error-boundary-ui/error-svg/index.js +24 -23
  49. package/dist/es2019/common/ui/error-boundary-ui/error-svg/old/index.js +58 -0
  50. package/dist/es2019/common/ui/icon/index.compiled.css +7 -0
  51. package/dist/es2019/common/ui/icon/index.js +23 -18
  52. package/dist/es2019/common/ui/icon/old/index.js +18 -0
  53. package/dist/es2019/common/ui/message/index.compiled.css +11 -0
  54. package/dist/es2019/common/ui/message/index.js +30 -39
  55. package/dist/es2019/common/ui/message/old/index.js +74 -0
  56. package/dist/es2019/common/ui/modal-hero/index.js +10 -2
  57. package/dist/es2019/common/ui/modal-hero/old/index.js +19 -0
  58. package/dist/es2019/controllers/create-field/main.compiled.css +1 -0
  59. package/dist/es2019/controllers/create-field/main.js +26 -23
  60. package/dist/es2019/controllers/create-field/old/main.js +74 -0
  61. package/dist/es2019/ui/create-form/async-select/main.js +12 -11
  62. package/dist/es2019/ui/create-form/async-select/old/main.js +137 -0
  63. package/dist/es2019/ui/create-form/form-footer/main.compiled.css +5 -0
  64. package/dist/es2019/ui/create-form/form-footer/main.js +25 -27
  65. package/dist/es2019/ui/create-form/form-footer/old/main.js +57 -0
  66. package/dist/es2019/ui/create-form/form-loader/main.compiled.css +4 -0
  67. package/dist/es2019/ui/create-form/form-loader/main.js +19 -20
  68. package/dist/es2019/ui/create-form/form-loader/old/main.js +31 -0
  69. package/dist/es2019/ui/create-form/main.compiled.css +9 -0
  70. package/dist/es2019/ui/create-form/main.js +23 -23
  71. package/dist/es2019/ui/create-form/old/main.js +145 -0
  72. package/dist/es2019/ui/create-form/select/main.js +42 -22
  73. package/dist/es2019/ui/create-form/select/old/main.js +106 -0
  74. package/dist/es2019/ui/create-form/textfield/main.js +14 -12
  75. package/dist/es2019/ui/create-form/textfield/old/main.js +45 -0
  76. package/dist/es2019/ui/create-form/user-picker/main.js +14 -12
  77. package/dist/es2019/ui/create-form/user-picker/old/main.js +59 -0
  78. package/dist/es2019/ui/inline-create/index.js +14 -13
  79. package/dist/es2019/ui/inline-create/main.js +21 -18
  80. package/dist/es2019/ui/inline-create/old/index.js +30 -0
  81. package/dist/es2019/ui/inline-create/old/main.js +96 -0
  82. package/dist/es2019/ui/modal-create/index.js +16 -15
  83. package/dist/es2019/ui/modal-create/main.js +23 -22
  84. package/dist/es2019/ui/modal-create/old/index.js +36 -0
  85. package/dist/es2019/ui/modal-create/old/main.js +137 -0
  86. package/dist/esm/common/constants.js +4 -1
  87. package/dist/esm/common/ui/error-boundary-modal/index.js +12 -9
  88. package/dist/esm/common/ui/error-boundary-modal/old/index.js +25 -0
  89. package/dist/esm/common/ui/error-boundary-ui/error-svg/index.compiled.css +6 -0
  90. package/dist/esm/common/ui/error-boundary-ui/error-svg/index.js +28 -24
  91. package/dist/esm/common/ui/error-boundary-ui/error-svg/old/index.js +60 -0
  92. package/dist/esm/common/ui/icon/index.compiled.css +7 -0
  93. package/dist/esm/common/ui/icon/index.js +23 -18
  94. package/dist/esm/common/ui/icon/old/index.js +18 -0
  95. package/dist/esm/common/ui/message/index.compiled.css +11 -0
  96. package/dist/esm/common/ui/message/index.js +30 -39
  97. package/dist/esm/common/ui/message/old/index.js +73 -0
  98. package/dist/esm/common/ui/modal-hero/index.js +10 -2
  99. package/dist/esm/common/ui/modal-hero/old/index.js +18 -0
  100. package/dist/esm/controllers/create-field/main.compiled.css +1 -0
  101. package/dist/esm/controllers/create-field/main.js +25 -22
  102. package/dist/esm/controllers/create-field/old/main.js +72 -0
  103. package/dist/esm/ui/create-form/async-select/main.js +12 -11
  104. package/dist/esm/ui/create-form/async-select/old/main.js +188 -0
  105. package/dist/esm/ui/create-form/form-footer/main.compiled.css +5 -0
  106. package/dist/esm/ui/create-form/form-footer/main.js +24 -26
  107. package/dist/esm/ui/create-form/form-footer/old/main.js +56 -0
  108. package/dist/esm/ui/create-form/form-loader/main.compiled.css +4 -0
  109. package/dist/esm/ui/create-form/form-loader/main.js +18 -19
  110. package/dist/esm/ui/create-form/form-loader/old/main.js +31 -0
  111. package/dist/esm/ui/create-form/main.compiled.css +9 -0
  112. package/dist/esm/ui/create-form/main.js +23 -23
  113. package/dist/esm/ui/create-form/old/main.js +174 -0
  114. package/dist/esm/ui/create-form/select/main.js +41 -21
  115. package/dist/esm/ui/create-form/select/old/main.js +117 -0
  116. package/dist/esm/ui/create-form/textfield/main.js +13 -11
  117. package/dist/esm/ui/create-form/textfield/old/main.js +47 -0
  118. package/dist/esm/ui/create-form/user-picker/main.js +13 -11
  119. package/dist/esm/ui/create-form/user-picker/old/main.js +64 -0
  120. package/dist/esm/ui/inline-create/index.js +14 -13
  121. package/dist/esm/ui/inline-create/main.js +21 -18
  122. package/dist/esm/ui/inline-create/old/index.js +30 -0
  123. package/dist/esm/ui/inline-create/old/main.js +112 -0
  124. package/dist/esm/ui/modal-create/index.js +16 -15
  125. package/dist/esm/ui/modal-create/main.js +23 -22
  126. package/dist/esm/ui/modal-create/old/index.js +36 -0
  127. package/dist/esm/ui/modal-create/old/main.js +156 -0
  128. package/dist/types/common/constants.d.ts +3 -0
  129. package/dist/types/common/ui/Button/index.d.ts +8 -3
  130. package/dist/types/common/ui/ModalDialog/index.d.ts +1 -1
  131. package/dist/types/common/ui/confirm-dismiss-dialog/main.d.ts +2 -2
  132. package/dist/types/common/ui/edit-modal/index.d.ts +1 -1
  133. package/dist/types/common/ui/error-boundary/error-boundary-base/index.d.ts +1 -1
  134. package/dist/types/common/ui/error-boundary/index.d.ts +2 -2
  135. package/dist/types/common/ui/error-boundary-modal/index.d.ts +2 -2
  136. package/dist/types/common/ui/error-boundary-modal/old/index.d.ts +11 -0
  137. package/dist/types/common/ui/error-boundary-ui/error-svg/index.d.ts +2 -6
  138. package/dist/types/common/ui/error-boundary-ui/error-svg/old/index.d.ts +7 -0
  139. package/dist/types/common/ui/error-boundary-ui/index.d.ts +2 -2
  140. package/dist/types/common/ui/experience-tracker/index.d.ts +1 -1
  141. package/dist/types/common/ui/icon/index.d.ts +10 -6
  142. package/dist/types/common/ui/icon/old/index.d.ts +7 -0
  143. package/dist/types/common/ui/link-create-content/index.d.ts +2 -2
  144. package/dist/types/common/ui/message/index.d.ts +1 -2
  145. package/dist/types/common/ui/message/old/index.d.ts +15 -0
  146. package/dist/types/common/ui/modal-hero/index.d.ts +4 -2
  147. package/dist/types/common/ui/modal-hero/old/index.d.ts +4 -0
  148. package/dist/types/controllers/callback-context/main.d.ts +2 -2
  149. package/dist/types/controllers/create-field/main.d.ts +2 -2
  150. package/dist/types/controllers/create-field/old/main.d.ts +7 -0
  151. package/dist/types/controllers/edit-post-create-context/index.d.ts +1 -1
  152. package/dist/types/controllers/exit-warning-modal-context/index.d.ts +1 -1
  153. package/dist/types/controllers/form-context/main.d.ts +2 -2
  154. package/dist/types/controllers/plugin-context/index.d.ts +1 -1
  155. package/dist/types/ui/create-form/async-select/main.d.ts +2 -8
  156. package/dist/types/ui/create-form/async-select/old/main.d.ts +11 -0
  157. package/dist/types/ui/create-form/form-footer/edit-button/index.d.ts +2 -2
  158. package/dist/types/ui/create-form/form-footer/main.d.ts +2 -11
  159. package/dist/types/ui/create-form/form-footer/old/main.d.ts +16 -0
  160. package/dist/types/ui/create-form/form-footer/submit-button/index.d.ts +2 -2
  161. package/dist/types/ui/create-form/form-loader/main.d.ts +2 -10
  162. package/dist/types/ui/create-form/form-loader/old/main.d.ts +11 -0
  163. package/dist/types/ui/create-form/form-spy/index.d.ts +1 -1
  164. package/dist/types/ui/create-form/main.d.ts +1 -2
  165. package/dist/types/ui/create-form/old/main.d.ts +54 -0
  166. package/dist/types/ui/create-form/select/main.d.ts +5 -16
  167. package/dist/types/ui/create-form/select/old/main.d.ts +24 -0
  168. package/dist/types/ui/create-form/textfield/main.d.ts +2 -12
  169. package/dist/types/ui/create-form/textfield/old/main.d.ts +14 -0
  170. package/dist/types/ui/create-form/user-picker/main.d.ts +2 -9
  171. package/dist/types/ui/create-form/user-picker/old/main.d.ts +11 -0
  172. package/dist/types/ui/inline-create/index.d.ts +2 -3
  173. package/dist/types/ui/inline-create/inline-analytics/index.d.ts +2 -2
  174. package/dist/types/ui/inline-create/main.d.ts +2 -6
  175. package/dist/types/ui/inline-create/old/index.d.ts +5 -0
  176. package/dist/types/ui/inline-create/old/main.d.ts +8 -0
  177. package/dist/types/ui/modal-create/index.d.ts +2 -3
  178. package/dist/types/ui/modal-create/main.d.ts +2 -2
  179. package/dist/types/ui/modal-create/old/index.d.ts +5 -0
  180. package/dist/types/ui/modal-create/old/main.d.ts +4 -0
  181. package/dist/types-ts4.5/common/constants.d.ts +3 -0
  182. package/dist/types-ts4.5/common/ui/Button/index.d.ts +8 -3
  183. package/dist/types-ts4.5/common/ui/ModalDialog/index.d.ts +1 -1
  184. package/dist/types-ts4.5/common/ui/confirm-dismiss-dialog/main.d.ts +2 -2
  185. package/dist/types-ts4.5/common/ui/edit-modal/index.d.ts +1 -1
  186. package/dist/types-ts4.5/common/ui/error-boundary/error-boundary-base/index.d.ts +1 -1
  187. package/dist/types-ts4.5/common/ui/error-boundary/index.d.ts +2 -2
  188. package/dist/types-ts4.5/common/ui/error-boundary-modal/index.d.ts +2 -2
  189. package/dist/types-ts4.5/common/ui/error-boundary-modal/old/index.d.ts +11 -0
  190. package/dist/types-ts4.5/common/ui/error-boundary-ui/error-svg/index.d.ts +2 -6
  191. package/dist/types-ts4.5/common/ui/error-boundary-ui/error-svg/old/index.d.ts +7 -0
  192. package/dist/types-ts4.5/common/ui/error-boundary-ui/index.d.ts +2 -2
  193. package/dist/types-ts4.5/common/ui/experience-tracker/index.d.ts +1 -1
  194. package/dist/types-ts4.5/common/ui/icon/index.d.ts +10 -6
  195. package/dist/types-ts4.5/common/ui/icon/old/index.d.ts +7 -0
  196. package/dist/types-ts4.5/common/ui/link-create-content/index.d.ts +2 -2
  197. package/dist/types-ts4.5/common/ui/message/index.d.ts +1 -2
  198. package/dist/types-ts4.5/common/ui/message/old/index.d.ts +15 -0
  199. package/dist/types-ts4.5/common/ui/modal-hero/index.d.ts +4 -2
  200. package/dist/types-ts4.5/common/ui/modal-hero/old/index.d.ts +4 -0
  201. package/dist/types-ts4.5/controllers/callback-context/main.d.ts +2 -2
  202. package/dist/types-ts4.5/controllers/create-field/main.d.ts +2 -2
  203. package/dist/types-ts4.5/controllers/create-field/old/main.d.ts +7 -0
  204. package/dist/types-ts4.5/controllers/edit-post-create-context/index.d.ts +1 -1
  205. package/dist/types-ts4.5/controllers/exit-warning-modal-context/index.d.ts +1 -1
  206. package/dist/types-ts4.5/controllers/form-context/main.d.ts +2 -2
  207. package/dist/types-ts4.5/controllers/plugin-context/index.d.ts +1 -1
  208. package/dist/types-ts4.5/ui/create-form/async-select/main.d.ts +2 -8
  209. package/dist/types-ts4.5/ui/create-form/async-select/old/main.d.ts +11 -0
  210. package/dist/types-ts4.5/ui/create-form/form-footer/edit-button/index.d.ts +2 -2
  211. package/dist/types-ts4.5/ui/create-form/form-footer/main.d.ts +2 -11
  212. package/dist/types-ts4.5/ui/create-form/form-footer/old/main.d.ts +16 -0
  213. package/dist/types-ts4.5/ui/create-form/form-footer/submit-button/index.d.ts +2 -2
  214. package/dist/types-ts4.5/ui/create-form/form-loader/main.d.ts +2 -10
  215. package/dist/types-ts4.5/ui/create-form/form-loader/old/main.d.ts +11 -0
  216. package/dist/types-ts4.5/ui/create-form/form-spy/index.d.ts +1 -1
  217. package/dist/types-ts4.5/ui/create-form/main.d.ts +1 -2
  218. package/dist/types-ts4.5/ui/create-form/old/main.d.ts +56 -0
  219. package/dist/types-ts4.5/ui/create-form/select/main.d.ts +5 -16
  220. package/dist/types-ts4.5/ui/create-form/select/old/main.d.ts +24 -0
  221. package/dist/types-ts4.5/ui/create-form/textfield/main.d.ts +2 -12
  222. package/dist/types-ts4.5/ui/create-form/textfield/old/main.d.ts +14 -0
  223. package/dist/types-ts4.5/ui/create-form/user-picker/main.d.ts +2 -9
  224. package/dist/types-ts4.5/ui/create-form/user-picker/old/main.d.ts +11 -0
  225. package/dist/types-ts4.5/ui/inline-create/index.d.ts +2 -3
  226. package/dist/types-ts4.5/ui/inline-create/inline-analytics/index.d.ts +2 -2
  227. package/dist/types-ts4.5/ui/inline-create/main.d.ts +2 -6
  228. package/dist/types-ts4.5/ui/inline-create/old/index.d.ts +5 -0
  229. package/dist/types-ts4.5/ui/inline-create/old/main.d.ts +8 -0
  230. package/dist/types-ts4.5/ui/modal-create/index.d.ts +2 -3
  231. package/dist/types-ts4.5/ui/modal-create/main.d.ts +2 -2
  232. package/dist/types-ts4.5/ui/modal-create/old/index.d.ts +5 -0
  233. package/dist/types-ts4.5/ui/modal-create/old/main.d.ts +4 -0
  234. package/example-helpers/mock-disclaimer.tsx +1 -1
  235. package/package.json +37 -26
@@ -1,11 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
- import { jsx } from '@emotion/react';
8
- import { Box } from '@atlaskit/primitives';
2
+ import React from 'react';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { Box } from '@atlaskit/primitives/compiled';
9
5
  import { DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
10
6
  import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
11
7
  import { EditModal } from '../../common/ui/edit-modal';
@@ -17,6 +13,7 @@ import { useExitWarningModal } from '../../controllers/exit-warning-modal-contex
17
13
  import { FormContextProvider } from '../../controllers/form-context';
18
14
  import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../controllers/plugin-context';
19
15
  import { InlineAnalytics } from './inline-analytics';
16
+ import InlineCreateOld from './old/main';
20
17
  const InlineCreateContent = ({
21
18
  onCreate,
22
19
  onFailure,
@@ -38,32 +35,32 @@ const InlineCreateContent = ({
38
35
  activePlugin
39
36
  } = useLinkCreatePlugins();
40
37
  const handleCloseExitWarning = () => setShowExitWarning(false);
41
- return jsx(LinkCreateCallbackProvider, {
38
+ return /*#__PURE__*/React.createElement(LinkCreateCallbackProvider, {
42
39
  onCreate: onCreate,
43
40
  onFailure: onFailure,
44
41
  onCancel: withExitWarning(onCancel)
45
- }, jsx(ErrorBoundary, null, jsx(InlineAnalytics, {
42
+ }, /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(InlineAnalytics, {
46
43
  screen: SCREEN_ID
47
- }, jsx(Box, {
44
+ }, /*#__PURE__*/React.createElement(Box, {
48
45
  testId: testId
49
- }, jsx(LinkCreateContent, {
46
+ }, /*#__PURE__*/React.createElement(LinkCreateContent, {
50
47
  plugins: plugins,
51
48
  entityKey: entityKey
52
- })))), onComplete && jsx(EditModal, {
49
+ })))), onComplete && /*#__PURE__*/React.createElement(EditModal, {
53
50
  onClose: onComplete,
54
51
  editViewPayload: editViewPayload,
55
52
  activePlugin: activePlugin
56
- }), jsx(ConfirmDismissDialog, {
53
+ }), /*#__PURE__*/React.createElement(ConfirmDismissDialog, {
57
54
  active: showExitWarning,
58
55
  onClose: handleCloseExitWarning,
59
56
  onCancel: onCancel
60
57
  }));
61
58
  };
62
- const InlineCreate = props => {
63
- return jsx(LinkCreatePluginsProvider, {
59
+ const InlineCreateNew = props => {
60
+ return /*#__PURE__*/React.createElement(LinkCreatePluginsProvider, {
64
61
  plugins: props.plugins,
65
62
  entityKey: props.entityKey
66
- }, pluginsProvider => jsx(EditPostCreateModalProvider, {
63
+ }, pluginsProvider => /*#__PURE__*/React.createElement(EditPostCreateModalProvider, {
67
64
  active: true
68
65
  }, ({
69
66
  setEditViewPayload,
@@ -71,9 +68,9 @@ const InlineCreate = props => {
71
68
  enableEditView
72
69
  }) => {
73
70
  var _pluginsProvider$acti;
74
- return jsx(FormContextProvider, {
71
+ return /*#__PURE__*/React.createElement(FormContextProvider, {
75
72
  enableEditView: pluginsProvider !== null && pluginsProvider !== void 0 && (_pluginsProvider$acti = pluginsProvider.activePlugin) !== null && _pluginsProvider$acti !== void 0 && _pluginsProvider$acti.editView && props !== null && props !== void 0 && props.onComplete ? enableEditView : undefined
76
- }, jsx(InlineCreateContent, _extends({}, props, {
73
+ }, /*#__PURE__*/React.createElement(InlineCreateContent, _extends({}, props, {
77
74
  onCreate: async payload => {
78
75
  var _props$onCreate;
79
76
  await ((_props$onCreate = props.onCreate) === null || _props$onCreate === void 0 ? void 0 : _props$onCreate.call(props, payload));
@@ -92,4 +89,10 @@ const InlineCreate = props => {
92
89
  })));
93
90
  }));
94
91
  };
92
+ const InlineCreate = props => {
93
+ if (fg('platform_bandicoots-link-create-css')) {
94
+ return /*#__PURE__*/React.createElement(InlineCreateNew, props);
95
+ }
96
+ return /*#__PURE__*/React.createElement(InlineCreateOld, props);
97
+ };
95
98
  export default InlineCreate;
@@ -0,0 +1,30 @@
1
+ /* eslint-disable @atlassian/tangerine/import/no-parent-imports */
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
6
+ import { memo } from 'react';
7
+
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
+ import { jsx } from '@emotion/react';
10
+ import { AnalyticsContext } from '@atlaskit/analytics-next';
11
+ import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
12
+ import { PACKAGE_DATA } from '../../../common/constants';
13
+ import { ErrorBoundary } from '../../../common/ui/error-boundary';
14
+ import { Experience } from '../../../common/ui/experience-tracker';
15
+ import { withLinkCreateAnalyticsContext } from '../../../common/utils/analytics';
16
+ import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
17
+ import i18nEN from '../../../i18n/en';
18
+ import InlineCreate from '../main';
19
+ const LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__*/memo(props => {
20
+ return jsx(Experience, null, jsx(ErrorBoundary, null, jsx(InlineCreate, props)));
21
+ }));
22
+ const ComposedLinkCreateOld = /*#__PURE__*/memo(props => {
23
+ return jsx(AnalyticsContext, {
24
+ data: PACKAGE_DATA
25
+ }, jsx(IntlMessagesProvider, {
26
+ defaultMessages: i18nEN,
27
+ loaderFn: fetchMessagesForLocale
28
+ }, jsx(LinkCreateWithAnalyticsContext, props)));
29
+ });
30
+ export default ComposedLinkCreateOld;
@@ -0,0 +1,96 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ /* eslint-disable @atlassian/tangerine/import/no-parent-imports */
3
+ /**
4
+ * @jsxRuntime classic
5
+ * @jsx jsx
6
+ */
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ import { jsx } from '@emotion/react';
9
+ import { Box } from '@atlaskit/primitives';
10
+ import { DEFAULT_TEST_ID, SCREEN_ID } from '../../../common/constants';
11
+ import { ConfirmDismissDialog } from '../../../common/ui/confirm-dismiss-dialog';
12
+ import { EditModal } from '../../../common/ui/edit-modal';
13
+ import { ErrorBoundary } from '../../../common/ui/error-boundary';
14
+ import { LinkCreateContent } from '../../../common/ui/link-create-content';
15
+ import { LinkCreateCallbackProvider } from '../../../controllers/callback-context';
16
+ import { EditPostCreateModalProvider, useEditPostCreateModal } from '../../../controllers/edit-post-create-context';
17
+ import { useExitWarningModal } from '../../../controllers/exit-warning-modal-context';
18
+ import { FormContextProvider } from '../../../controllers/form-context';
19
+ import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../../controllers/plugin-context';
20
+ import { InlineAnalytics } from '../inline-analytics';
21
+ const InlineCreateContent = ({
22
+ onCreate,
23
+ onFailure,
24
+ onCancel,
25
+ onComplete,
26
+ plugins,
27
+ entityKey,
28
+ testId = DEFAULT_TEST_ID
29
+ }) => {
30
+ const {
31
+ withExitWarning,
32
+ showExitWarning,
33
+ setShowExitWarning
34
+ } = useExitWarningModal();
35
+ const {
36
+ editViewPayload
37
+ } = useEditPostCreateModal();
38
+ const {
39
+ activePlugin
40
+ } = useLinkCreatePlugins();
41
+ const handleCloseExitWarning = () => setShowExitWarning(false);
42
+ return jsx(LinkCreateCallbackProvider, {
43
+ onCreate: onCreate,
44
+ onFailure: onFailure,
45
+ onCancel: withExitWarning(onCancel)
46
+ }, jsx(ErrorBoundary, null, jsx(InlineAnalytics, {
47
+ screen: SCREEN_ID
48
+ }, jsx(Box, {
49
+ testId: testId
50
+ }, jsx(LinkCreateContent, {
51
+ plugins: plugins,
52
+ entityKey: entityKey
53
+ })))), onComplete && jsx(EditModal, {
54
+ onClose: onComplete,
55
+ editViewPayload: editViewPayload,
56
+ activePlugin: activePlugin
57
+ }), jsx(ConfirmDismissDialog, {
58
+ active: showExitWarning,
59
+ onClose: handleCloseExitWarning,
60
+ onCancel: onCancel
61
+ }));
62
+ };
63
+ const InlineCreateOld = props => {
64
+ return jsx(LinkCreatePluginsProvider, {
65
+ plugins: props.plugins,
66
+ entityKey: props.entityKey
67
+ }, pluginsProvider => jsx(EditPostCreateModalProvider, {
68
+ active: true
69
+ }, ({
70
+ setEditViewPayload,
71
+ shouldActivateEditView,
72
+ enableEditView
73
+ }) => {
74
+ var _pluginsProvider$acti;
75
+ return jsx(FormContextProvider, {
76
+ enableEditView: pluginsProvider !== null && pluginsProvider !== void 0 && (_pluginsProvider$acti = pluginsProvider.activePlugin) !== null && _pluginsProvider$acti !== void 0 && _pluginsProvider$acti.editView && props !== null && props !== void 0 && props.onComplete ? enableEditView : undefined
77
+ }, jsx(InlineCreateContent, _extends({}, props, {
78
+ onCreate: async payload => {
79
+ var _props$onCreate;
80
+ await ((_props$onCreate = props.onCreate) === null || _props$onCreate === void 0 ? void 0 : _props$onCreate.call(props, payload));
81
+
82
+ // if onComplete exists then there is an edit flow
83
+ if (props.onComplete) {
84
+ if (shouldActivateEditView()) {
85
+ //edit button is pressed
86
+ setEditViewPayload(payload);
87
+ } else {
88
+ //create button is pressed
89
+ props.onComplete();
90
+ }
91
+ }
92
+ }
93
+ })));
94
+ }));
95
+ };
96
+ export default InlineCreateOld;
@@ -1,13 +1,7 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { memo } from 'react';
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { jsx } from '@emotion/react';
1
+ import React, { memo } from 'react';
9
2
  import { AnalyticsContext } from '@atlaskit/analytics-next';
10
3
  import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
11
5
  import { PACKAGE_DATA } from '../../common/constants';
12
6
  import { ErrorBoundary } from '../../common/ui/error-boundary';
13
7
  import { ErrorBoundaryModal } from '../../common/ui/error-boundary-modal';
@@ -16,20 +10,27 @@ import { withLinkCreateAnalyticsContext } from '../../common/utils/analytics';
16
10
  import { fetchMessagesForLocale } from '../../common/utils/locale/fetch-messages-for-locale';
17
11
  import i18nEN from '../../i18n/en';
18
12
  import LinkCreate from './main';
13
+ import ComposedLinkCreateOld from './old';
19
14
  const LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__*/memo(props => {
20
- return jsx(Experience, null, jsx(ErrorBoundary, {
21
- errorComponent: jsx(ErrorBoundaryModal, {
15
+ return /*#__PURE__*/React.createElement(Experience, null, /*#__PURE__*/React.createElement(ErrorBoundary, {
16
+ errorComponent: /*#__PURE__*/React.createElement(ErrorBoundaryModal, {
22
17
  active: props.active,
23
18
  onClose: props.onCancel
24
19
  })
25
- }, jsx(LinkCreate, props)));
20
+ }, /*#__PURE__*/React.createElement(LinkCreate, props)));
26
21
  }));
27
- const ComposedLinkCreate = /*#__PURE__*/memo(props => {
28
- return jsx(AnalyticsContext, {
22
+ const ComposedLinkCreateNew = /*#__PURE__*/memo(props => {
23
+ return /*#__PURE__*/React.createElement(AnalyticsContext, {
29
24
  data: PACKAGE_DATA
30
- }, jsx(IntlMessagesProvider, {
25
+ }, /*#__PURE__*/React.createElement(IntlMessagesProvider, {
31
26
  defaultMessages: i18nEN,
32
27
  loaderFn: fetchMessagesForLocale
33
- }, jsx(LinkCreateWithAnalyticsContext, props)));
28
+ }, /*#__PURE__*/React.createElement(LinkCreateWithAnalyticsContext, props)));
29
+ });
30
+ const ComposedLinkCreate = /*#__PURE__*/memo(props => {
31
+ if (fg('platform_bandicoots-link-create-css')) {
32
+ return /*#__PURE__*/React.createElement(ComposedLinkCreateNew, props);
33
+ }
34
+ return /*#__PURE__*/React.createElement(ComposedLinkCreateOld, props);
34
35
  });
35
36
  export default ComposedLinkCreate;
@@ -1,16 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
- import { useLayoutEffect, useRef } from 'react';
7
-
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { jsx } from '@emotion/react';
2
+ import React, { useLayoutEffect, useRef } from 'react';
10
3
  import { useIntl } from 'react-intl-next';
11
4
  import { Layering } from '@atlaskit/layering';
12
5
  import { ModalBody, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
13
- import { Box } from '@atlaskit/primitives';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
7
+ import { Box } from '@atlaskit/primitives/compiled';
14
8
  import { CREATE_FORM_MAX_WIDTH_IN_PX, DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
15
9
  import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
16
10
  import { EditModal } from '../../common/ui/edit-modal';
@@ -24,6 +18,7 @@ import { ExitWarningModalProvider, useExitWarningModal } from '../../controllers
24
18
  import { FormContextProvider } from '../../controllers/form-context';
25
19
  import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../controllers/plugin-context';
26
20
  import { messages } from './messages';
21
+ import LinkCreateModalOld from './old/main';
27
22
  const LinkCreateWithModal = ({
28
23
  active,
29
24
  modalTitle,
@@ -51,11 +46,11 @@ const LinkCreateWithModal = ({
51
46
  activePlugin
52
47
  } = useLinkCreatePlugins();
53
48
  const handleCloseExitWarning = () => setShowExitWarning(false);
54
- return jsx(LinkCreateCallbackProvider, {
49
+ return /*#__PURE__*/React.createElement(LinkCreateCallbackProvider, {
55
50
  onCreate: onCreate,
56
51
  onFailure: onFailure,
57
52
  onCancel: withExitWarning(onCancel)
58
- }, jsx(ModalTransition, null, active && jsx(Modal, {
53
+ }, /*#__PURE__*/React.createElement(ModalTransition, null, active && /*#__PURE__*/React.createElement(Modal, {
59
54
  testId: "link-create-modal",
60
55
  screen: SCREEN_ID,
61
56
  onClose: withExitWarning(onCancel),
@@ -63,27 +58,27 @@ const LinkCreateWithModal = ({
63
58
  onOpenComplete: onOpenComplete,
64
59
  onCloseComplete: onCloseComplete,
65
60
  width: `${CREATE_FORM_MAX_WIDTH_IN_PX}px`
66
- }, jsx(ModalHero, {
61
+ }, /*#__PURE__*/React.createElement(ModalHero, {
67
62
  hero: modalHero
68
- }), jsx(ModalHeader, null, jsx(ModalTitle, null, modalTitle || intl.formatMessage(messages.heading))), jsx(ModalBody, null, jsx(Box, {
63
+ }), /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(ModalTitle, null, modalTitle || intl.formatMessage(messages.heading))), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Box, {
69
64
  testId: testId
70
- }, jsx(ErrorBoundary, null, jsx(LinkCreateContent, {
65
+ }, /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(LinkCreateContent, {
71
66
  plugins: plugins,
72
67
  entityKey: entityKey
73
- })))))), onComplete && jsx(EditModal, {
68
+ })))))), onComplete && /*#__PURE__*/React.createElement(EditModal, {
74
69
  onCloseComplete: onCloseComplete,
75
70
  onClose: onComplete,
76
71
  editViewPayload: editViewPayload,
77
72
  activePlugin: activePlugin
78
- }), jsx(Layering, {
73
+ }), /*#__PURE__*/React.createElement(Layering, {
79
74
  isDisabled: false
80
- }, jsx(ConfirmDismissDialog, {
75
+ }, /*#__PURE__*/React.createElement(ConfirmDismissDialog, {
81
76
  active: showExitWarning,
82
77
  onClose: handleCloseExitWarning,
83
78
  onCancel: onCancel
84
79
  })));
85
80
  };
86
- const LinkCreateModal = props => {
81
+ const LinkCreateModalNew = props => {
87
82
  const shouldCallCloseComplete = useRef(!props.active);
88
83
 
89
84
  // modal calls onCloseComplete in a useEffect(), so we can track whether
@@ -93,10 +88,10 @@ const LinkCreateModal = props => {
93
88
  // onCloseComplete should only be called when it is not active
94
89
  shouldCallCloseComplete.current = !props.active;
95
90
  }, [props.active]);
96
- return jsx(LinkCreatePluginsProvider, {
91
+ return /*#__PURE__*/React.createElement(LinkCreatePluginsProvider, {
97
92
  plugins: props.plugins,
98
93
  entityKey: props.entityKey
99
- }, pluginsProvider => jsx(EditPostCreateModalProvider, {
94
+ }, pluginsProvider => /*#__PURE__*/React.createElement(EditPostCreateModalProvider, {
100
95
  active: !!props.active
101
96
  }, ({
102
97
  setEditViewPayload,
@@ -105,9 +100,9 @@ const LinkCreateModal = props => {
105
100
  enableEditView
106
101
  }) => {
107
102
  var _pluginsProvider$acti;
108
- return jsx(FormContextProvider, {
103
+ return /*#__PURE__*/React.createElement(FormContextProvider, {
109
104
  enableEditView: pluginsProvider !== null && pluginsProvider !== void 0 && (_pluginsProvider$acti = pluginsProvider.activePlugin) !== null && _pluginsProvider$acti !== void 0 && _pluginsProvider$acti.editView && props !== null && props !== void 0 && props.onComplete ? enableEditView : undefined
110
- }, jsx(ExitWarningModalProvider, null, jsx(LinkCreateWithModal, _extends({}, props, {
105
+ }, /*#__PURE__*/React.createElement(ExitWarningModalProvider, null, /*#__PURE__*/React.createElement(LinkCreateWithModal, _extends({}, props, {
111
106
  active: props.active && !editViewPayload,
112
107
  onCreate: async payload => {
113
108
  var _props$onCreate;
@@ -133,4 +128,10 @@ const LinkCreateModal = props => {
133
128
  }))));
134
129
  }));
135
130
  };
131
+ const LinkCreateModal = props => {
132
+ if (fg('platform_bandicoots-link-create-css')) {
133
+ return /*#__PURE__*/React.createElement(LinkCreateModalNew, props);
134
+ }
135
+ return /*#__PURE__*/React.createElement(LinkCreateModalOld, props);
136
+ };
136
137
  export default LinkCreateModal;
@@ -0,0 +1,36 @@
1
+ /* eslint-disable @atlassian/tangerine/import/no-parent-imports */
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
6
+ import { memo } from 'react';
7
+
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
+ import { jsx } from '@emotion/react';
10
+ import { AnalyticsContext } from '@atlaskit/analytics-next';
11
+ import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
12
+ import { PACKAGE_DATA } from '../../../common/constants';
13
+ import { ErrorBoundary } from '../../../common/ui/error-boundary';
14
+ import { ErrorBoundaryModal } from '../../../common/ui/error-boundary-modal';
15
+ import { Experience } from '../../../common/ui/experience-tracker';
16
+ import { withLinkCreateAnalyticsContext } from '../../../common/utils/analytics';
17
+ import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
18
+ import i18nEN from '../../../i18n/en';
19
+ import LinkCreate from '../main';
20
+ const LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__*/memo(props => {
21
+ return jsx(Experience, null, jsx(ErrorBoundary, {
22
+ errorComponent: jsx(ErrorBoundaryModal, {
23
+ active: props.active,
24
+ onClose: props.onCancel
25
+ })
26
+ }, jsx(LinkCreate, props)));
27
+ }));
28
+ const ComposedLinkCreateOld = /*#__PURE__*/memo(props => {
29
+ return jsx(AnalyticsContext, {
30
+ data: PACKAGE_DATA
31
+ }, jsx(IntlMessagesProvider, {
32
+ defaultMessages: i18nEN,
33
+ loaderFn: fetchMessagesForLocale
34
+ }, jsx(LinkCreateWithAnalyticsContext, props)));
35
+ });
36
+ export default ComposedLinkCreateOld;
@@ -0,0 +1,137 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ /* eslint-disable @atlassian/tangerine/import/no-parent-imports */
3
+ /**
4
+ * @jsxRuntime classic
5
+ * @jsx jsx
6
+ */
7
+ import { useLayoutEffect, useRef } from 'react';
8
+
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
+ import { jsx } from '@emotion/react';
11
+ import { useIntl } from 'react-intl-next';
12
+ import { Layering } from '@atlaskit/layering';
13
+ import { ModalBody, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
14
+ import { Box } from '@atlaskit/primitives';
15
+ import { CREATE_FORM_MAX_WIDTH_IN_PX, DEFAULT_TEST_ID, SCREEN_ID } from '../../../common/constants';
16
+ import { ConfirmDismissDialog } from '../../../common/ui/confirm-dismiss-dialog';
17
+ import { EditModal } from '../../../common/ui/edit-modal';
18
+ import { ErrorBoundary } from '../../../common/ui/error-boundary';
19
+ import { LinkCreateContent } from '../../../common/ui/link-create-content';
20
+ import { ModalHero } from '../../../common/ui/modal-hero';
21
+ import { Modal } from '../../../common/ui/ModalDialog';
22
+ import { LinkCreateCallbackProvider } from '../../../controllers/callback-context';
23
+ import { EditPostCreateModalProvider, useEditPostCreateModal } from '../../../controllers/edit-post-create-context';
24
+ import { ExitWarningModalProvider, useExitWarningModal } from '../../../controllers/exit-warning-modal-context';
25
+ import { FormContextProvider } from '../../../controllers/form-context';
26
+ import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../../controllers/plugin-context';
27
+ import { messages } from '../messages';
28
+ const LinkCreateWithModal = ({
29
+ active,
30
+ modalTitle,
31
+ onCreate,
32
+ onFailure,
33
+ onCancel,
34
+ onComplete,
35
+ onOpenComplete,
36
+ onCloseComplete,
37
+ testId = DEFAULT_TEST_ID,
38
+ plugins,
39
+ entityKey,
40
+ modalHero
41
+ }) => {
42
+ const intl = useIntl();
43
+ const {
44
+ withExitWarning,
45
+ showExitWarning,
46
+ setShowExitWarning
47
+ } = useExitWarningModal();
48
+ const {
49
+ editViewPayload
50
+ } = useEditPostCreateModal();
51
+ const {
52
+ activePlugin
53
+ } = useLinkCreatePlugins();
54
+ const handleCloseExitWarning = () => setShowExitWarning(false);
55
+ return jsx(LinkCreateCallbackProvider, {
56
+ onCreate: onCreate,
57
+ onFailure: onFailure,
58
+ onCancel: withExitWarning(onCancel)
59
+ }, jsx(ModalTransition, null, active && jsx(Modal, {
60
+ testId: "link-create-modal",
61
+ screen: SCREEN_ID,
62
+ onClose: withExitWarning(onCancel),
63
+ shouldScrollInViewport: true,
64
+ onOpenComplete: onOpenComplete,
65
+ onCloseComplete: onCloseComplete,
66
+ width: `${CREATE_FORM_MAX_WIDTH_IN_PX}px`
67
+ }, jsx(ModalHero, {
68
+ hero: modalHero
69
+ }), jsx(ModalHeader, null, jsx(ModalTitle, null, modalTitle || intl.formatMessage(messages.heading))), jsx(ModalBody, null, jsx(Box, {
70
+ testId: testId
71
+ }, jsx(ErrorBoundary, null, jsx(LinkCreateContent, {
72
+ plugins: plugins,
73
+ entityKey: entityKey
74
+ })))))), onComplete && jsx(EditModal, {
75
+ onCloseComplete: onCloseComplete,
76
+ onClose: onComplete,
77
+ editViewPayload: editViewPayload,
78
+ activePlugin: activePlugin
79
+ }), jsx(Layering, {
80
+ isDisabled: false
81
+ }, jsx(ConfirmDismissDialog, {
82
+ active: showExitWarning,
83
+ onClose: handleCloseExitWarning,
84
+ onCancel: onCancel
85
+ })));
86
+ };
87
+ const LinkCreateModalOld = props => {
88
+ const shouldCallCloseComplete = useRef(!props.active);
89
+
90
+ // modal calls onCloseComplete in a useEffect(), so we can track whether
91
+ // or not we should execute it based on the active prop in a
92
+ // useLayoutEffect() which will be run before child useEffect()s
93
+ useLayoutEffect(() => {
94
+ // onCloseComplete should only be called when it is not active
95
+ shouldCallCloseComplete.current = !props.active;
96
+ }, [props.active]);
97
+ return jsx(LinkCreatePluginsProvider, {
98
+ plugins: props.plugins,
99
+ entityKey: props.entityKey
100
+ }, pluginsProvider => jsx(EditPostCreateModalProvider, {
101
+ active: !!props.active
102
+ }, ({
103
+ setEditViewPayload,
104
+ editViewPayload,
105
+ shouldActivateEditView,
106
+ enableEditView
107
+ }) => {
108
+ var _pluginsProvider$acti;
109
+ return jsx(FormContextProvider, {
110
+ enableEditView: pluginsProvider !== null && pluginsProvider !== void 0 && (_pluginsProvider$acti = pluginsProvider.activePlugin) !== null && _pluginsProvider$acti !== void 0 && _pluginsProvider$acti.editView && props !== null && props !== void 0 && props.onComplete ? enableEditView : undefined
111
+ }, jsx(ExitWarningModalProvider, null, jsx(LinkCreateWithModal, _extends({}, props, {
112
+ active: props.active && !editViewPayload,
113
+ onCreate: async payload => {
114
+ var _props$onCreate;
115
+ await ((_props$onCreate = props.onCreate) === null || _props$onCreate === void 0 ? void 0 : _props$onCreate.call(props, payload));
116
+
117
+ // if onComplete exists then there is an edit flow
118
+ if (props.onComplete) {
119
+ if (shouldActivateEditView()) {
120
+ //edit button is pressed
121
+ setEditViewPayload(payload);
122
+ } else {
123
+ //create button is pressed
124
+ props.onComplete();
125
+ }
126
+ }
127
+ },
128
+ onCloseComplete: (...args) => {
129
+ if (shouldCallCloseComplete.current) {
130
+ var _props$onCloseComplet;
131
+ (_props$onCloseComplet = props.onCloseComplete) === null || _props$onCloseComplet === void 0 ? void 0 : _props$onCloseComplet.call(props, ...args);
132
+ }
133
+ }
134
+ }))));
135
+ }));
136
+ };
137
+ export default LinkCreateModalOld;
@@ -3,11 +3,14 @@ export var COMPONENT_NAME = 'linkCreate';
3
3
  export var SCREEN_ID = 'linkCreateScreen';
4
4
  export var DEFAULT_TEST_ID = 'link-create';
5
5
  export var CREATE_FORM_MAX_WIDTH_IN_PX = '480';
6
+ /**
7
+ * @deprecated Remove on FF clean up platform_bandicoots-link-create-css
8
+ */
6
9
  export var CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
7
10
  export var LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
8
11
  export var PACKAGE_DATA = {
9
12
  packageName: "@atlaskit/link-create" || '',
10
- packageVersion: "2.13.20" || '',
13
+ packageVersion: "2.15.0" || '',
11
14
  component: COMPONENT_NAME,
12
15
  componentName: COMPONENT_NAME
13
16
  };
@@ -1,25 +1,28 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { jsx } from '@emotion/react';
1
+ import React from 'react';
7
2
  import Modal, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
8
4
  import { CREATE_FORM_MAX_WIDTH_IN_PX } from '../../constants';
9
5
  import { ErrorBoundaryUI } from '../error-boundary-ui';
6
+ import { ErrorBoundaryModalOld } from './old';
10
7
 
11
8
  /**
12
9
  * ErrorBoundaryModal props are the same as those passed to LinkCreate, which
13
10
  * are used to control its active state
14
11
  */
15
12
 
16
- export var ErrorBoundaryModal = function ErrorBoundaryModal(_ref) {
13
+ var ErrorBoundaryModalNew = function ErrorBoundaryModalNew(_ref) {
17
14
  var active = _ref.active,
18
15
  onClose = _ref.onClose;
19
- return jsx(ModalTransition, null, active && jsx(Modal, {
16
+ return /*#__PURE__*/React.createElement(ModalTransition, null, active && /*#__PURE__*/React.createElement(Modal, {
20
17
  testId: "link-create-error-boundary-modal",
21
18
  onClose: onClose,
22
19
  shouldScrollInViewport: true,
23
20
  width: "".concat(CREATE_FORM_MAX_WIDTH_IN_PX, "px")
24
- }, jsx(ModalBody, null, jsx(ErrorBoundaryUI, null))));
21
+ }, /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(ErrorBoundaryUI, null))));
22
+ };
23
+ export var ErrorBoundaryModal = function ErrorBoundaryModal(props) {
24
+ if (fg('platform_bandicoots-link-create-css')) {
25
+ return /*#__PURE__*/React.createElement(ErrorBoundaryModalNew, props);
26
+ }
27
+ return /*#__PURE__*/React.createElement(ErrorBoundaryModalOld, props);
25
28
  };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
+ import { jsx } from '@emotion/react';
7
+ import Modal, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
8
+ import { CREATE_FORM_MAX_WIDTH_IN_PX } from '../../../constants';
9
+ import { ErrorBoundaryUI } from '../../error-boundary-ui';
10
+
11
+ /**
12
+ * ErrorBoundaryModal props are the same as those passed to LinkCreate, which
13
+ * are used to control its active state
14
+ */
15
+
16
+ export var ErrorBoundaryModalOld = function ErrorBoundaryModalOld(_ref) {
17
+ var active = _ref.active,
18
+ onClose = _ref.onClose;
19
+ return jsx(ModalTransition, null, active && jsx(Modal, {
20
+ testId: "link-create-error-boundary-modal",
21
+ onClose: onClose,
22
+ shouldScrollInViewport: true,
23
+ width: "".concat(CREATE_FORM_MAX_WIDTH_IN_PX, "px")
24
+ }, jsx(ModalBody, null, jsx(ErrorBoundaryUI, null))));
25
+ };
@@ -0,0 +1,6 @@
1
+ ._18u01wug{margin-left:auto}
2
+ ._19pkidpf{margin-top:0}
3
+ ._1bsb1883{width:var(--_fegmhw)}
4
+ ._1e0c1ule{display:block}
5
+ ._2hwx1wug{margin-right:auto}
6
+ ._otyr1ejb{margin-bottom:var(--ds-space-300,24px)}