@atlaskit/link-create 3.1.1 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/common/constants.js +1 -1
  3. package/dist/cjs/common/ui/error-boundary-modal/index.js +1 -9
  4. package/dist/cjs/common/ui/error-boundary-ui/error-svg/index.js +1 -10
  5. package/dist/cjs/common/ui/icon/index.js +1 -9
  6. package/dist/cjs/common/ui/message/index.compiled.css +1 -1
  7. package/dist/cjs/common/ui/message/index.js +2 -10
  8. package/dist/cjs/common/ui/modal-hero/index.js +1 -9
  9. package/dist/cjs/controllers/create-field/main.js +1 -9
  10. package/dist/cjs/i18n/en.js +2 -0
  11. package/dist/cjs/i18n/en_GB.js +2 -0
  12. package/dist/cjs/i18n/en_ZZ.js +2 -0
  13. package/dist/cjs/ui/create-form/async-select/main.js +1 -9
  14. package/dist/cjs/ui/create-form/form-footer/main.js +1 -9
  15. package/dist/cjs/ui/create-form/form-loader/main.js +1 -9
  16. package/dist/cjs/ui/create-form/main.js +1 -9
  17. package/dist/cjs/ui/create-form/select/main.js +7 -33
  18. package/dist/cjs/ui/create-form/textfield/main.js +3 -10
  19. package/dist/cjs/ui/create-form/user-picker/main.js +1 -9
  20. package/dist/cjs/ui/inline-create/index.js +1 -9
  21. package/dist/cjs/ui/inline-create/main.js +1 -9
  22. package/dist/cjs/ui/modal-create/index.js +1 -9
  23. package/dist/cjs/ui/modal-create/main.js +1 -9
  24. package/dist/es2019/common/constants.js +1 -1
  25. package/dist/es2019/common/ui/error-boundary-modal/index.js +1 -9
  26. package/dist/es2019/common/ui/error-boundary-ui/error-svg/index.js +1 -9
  27. package/dist/es2019/common/ui/icon/index.js +1 -9
  28. package/dist/es2019/common/ui/message/index.compiled.css +1 -1
  29. package/dist/es2019/common/ui/message/index.js +2 -10
  30. package/dist/es2019/common/ui/modal-hero/index.js +1 -9
  31. package/dist/es2019/controllers/create-field/main.js +1 -9
  32. package/dist/es2019/i18n/en.js +2 -0
  33. package/dist/es2019/i18n/en_GB.js +2 -0
  34. package/dist/es2019/i18n/en_ZZ.js +2 -0
  35. package/dist/es2019/ui/create-form/async-select/main.js +1 -9
  36. package/dist/es2019/ui/create-form/form-footer/main.js +1 -9
  37. package/dist/es2019/ui/create-form/form-loader/main.js +1 -9
  38. package/dist/es2019/ui/create-form/main.js +1 -9
  39. package/dist/es2019/ui/create-form/select/main.js +8 -34
  40. package/dist/es2019/ui/create-form/textfield/main.js +3 -10
  41. package/dist/es2019/ui/create-form/user-picker/main.js +1 -9
  42. package/dist/es2019/ui/inline-create/index.js +1 -9
  43. package/dist/es2019/ui/inline-create/main.js +1 -9
  44. package/dist/es2019/ui/modal-create/index.js +1 -9
  45. package/dist/es2019/ui/modal-create/main.js +1 -9
  46. package/dist/esm/common/constants.js +1 -1
  47. package/dist/esm/common/ui/error-boundary-modal/index.js +1 -9
  48. package/dist/esm/common/ui/error-boundary-ui/error-svg/index.js +1 -9
  49. package/dist/esm/common/ui/icon/index.js +1 -9
  50. package/dist/esm/common/ui/message/index.compiled.css +1 -1
  51. package/dist/esm/common/ui/message/index.js +2 -10
  52. package/dist/esm/common/ui/modal-hero/index.js +1 -9
  53. package/dist/esm/controllers/create-field/main.js +1 -9
  54. package/dist/esm/i18n/en.js +2 -0
  55. package/dist/esm/i18n/en_GB.js +2 -0
  56. package/dist/esm/i18n/en_ZZ.js +2 -0
  57. package/dist/esm/ui/create-form/async-select/main.js +1 -9
  58. package/dist/esm/ui/create-form/form-footer/main.js +1 -9
  59. package/dist/esm/ui/create-form/form-loader/main.js +1 -9
  60. package/dist/esm/ui/create-form/main.js +1 -9
  61. package/dist/esm/ui/create-form/select/main.js +7 -33
  62. package/dist/esm/ui/create-form/textfield/main.js +3 -10
  63. package/dist/esm/ui/create-form/user-picker/main.js +1 -9
  64. package/dist/esm/ui/inline-create/index.js +1 -9
  65. package/dist/esm/ui/inline-create/main.js +1 -9
  66. package/dist/esm/ui/modal-create/index.js +1 -9
  67. package/dist/esm/ui/modal-create/main.js +1 -9
  68. package/dist/types/common/ui/error-boundary-modal/index.d.ts +2 -2
  69. package/dist/types/common/ui/icon/index.d.ts +1 -1
  70. package/dist/types/common/ui/message/index.d.ts +1 -1
  71. package/dist/types/common/ui/modal-hero/index.d.ts +1 -1
  72. package/dist/types/controllers/create-field/main.d.ts +1 -1
  73. package/dist/types/i18n/en.d.ts +2 -0
  74. package/dist/types/i18n/en_GB.d.ts +2 -0
  75. package/dist/types/i18n/en_ZZ.d.ts +2 -0
  76. package/dist/types/ui/create-form/async-select/main.d.ts +8 -2
  77. package/dist/types/ui/create-form/form-footer/main.d.ts +6 -1
  78. package/dist/types/ui/create-form/form-loader/main.d.ts +5 -1
  79. package/dist/types/ui/create-form/main.d.ts +1 -1
  80. package/dist/types/ui/create-form/select/main.d.ts +11 -5
  81. package/dist/types/ui/create-form/textfield/main.d.ts +8 -2
  82. package/dist/types/ui/create-form/user-picker/main.d.ts +5 -2
  83. package/dist/types-ts4.5/common/ui/error-boundary-modal/index.d.ts +2 -2
  84. package/dist/types-ts4.5/common/ui/icon/index.d.ts +1 -1
  85. package/dist/types-ts4.5/common/ui/message/index.d.ts +1 -1
  86. package/dist/types-ts4.5/common/ui/modal-hero/index.d.ts +1 -1
  87. package/dist/types-ts4.5/controllers/create-field/main.d.ts +1 -1
  88. package/dist/types-ts4.5/i18n/en.d.ts +2 -0
  89. package/dist/types-ts4.5/i18n/en_GB.d.ts +2 -0
  90. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +2 -0
  91. package/dist/types-ts4.5/ui/create-form/async-select/main.d.ts +8 -2
  92. package/dist/types-ts4.5/ui/create-form/form-footer/main.d.ts +6 -1
  93. package/dist/types-ts4.5/ui/create-form/form-loader/main.d.ts +5 -1
  94. package/dist/types-ts4.5/ui/create-form/main.d.ts +1 -1
  95. package/dist/types-ts4.5/ui/create-form/select/main.d.ts +11 -5
  96. package/dist/types-ts4.5/ui/create-form/textfield/main.d.ts +8 -2
  97. package/dist/types-ts4.5/ui/create-form/user-picker/main.d.ts +5 -2
  98. package/package.json +3 -11
  99. package/report.api.md +1 -1
  100. package/dist/cjs/common/ui/error-boundary-modal/old/index.js +0 -34
  101. package/dist/cjs/common/ui/error-boundary-ui/error-svg/old/index.js +0 -67
  102. package/dist/cjs/common/ui/icon/old/index.js +0 -26
  103. package/dist/cjs/common/ui/message/old/index.js +0 -81
  104. package/dist/cjs/common/ui/modal-hero/old/index.js +0 -27
  105. package/dist/cjs/controllers/create-field/old/main.js +0 -76
  106. package/dist/cjs/ui/create-form/async-select/old/main.js +0 -195
  107. package/dist/cjs/ui/create-form/form-footer/old/main.js +0 -64
  108. package/dist/cjs/ui/create-form/form-loader/old/main.js +0 -39
  109. package/dist/cjs/ui/create-form/old/main.js +0 -177
  110. package/dist/cjs/ui/create-form/select/old/main.js +0 -127
  111. package/dist/cjs/ui/create-form/textfield/old/main.js +0 -55
  112. package/dist/cjs/ui/create-form/user-picker/old/main.js +0 -72
  113. package/dist/cjs/ui/inline-create/old/index.js +0 -38
  114. package/dist/cjs/ui/inline-create/old/main.js +0 -120
  115. package/dist/cjs/ui/modal-create/old/index.js +0 -44
  116. package/dist/cjs/ui/modal-create/old/main.js +0 -164
  117. package/dist/es2019/common/ui/error-boundary-modal/old/index.js +0 -26
  118. package/dist/es2019/common/ui/error-boundary-ui/error-svg/old/index.js +0 -58
  119. package/dist/es2019/common/ui/icon/old/index.js +0 -18
  120. package/dist/es2019/common/ui/message/old/index.js +0 -74
  121. package/dist/es2019/common/ui/modal-hero/old/index.js +0 -19
  122. package/dist/es2019/controllers/create-field/old/main.js +0 -74
  123. package/dist/es2019/ui/create-form/async-select/old/main.js +0 -137
  124. package/dist/es2019/ui/create-form/form-footer/old/main.js +0 -57
  125. package/dist/es2019/ui/create-form/form-loader/old/main.js +0 -31
  126. package/dist/es2019/ui/create-form/old/main.js +0 -145
  127. package/dist/es2019/ui/create-form/select/old/main.js +0 -106
  128. package/dist/es2019/ui/create-form/textfield/old/main.js +0 -45
  129. package/dist/es2019/ui/create-form/user-picker/old/main.js +0 -59
  130. package/dist/es2019/ui/inline-create/old/index.js +0 -30
  131. package/dist/es2019/ui/inline-create/old/main.js +0 -96
  132. package/dist/es2019/ui/modal-create/old/index.js +0 -36
  133. package/dist/es2019/ui/modal-create/old/main.js +0 -137
  134. package/dist/esm/common/ui/error-boundary-modal/old/index.js +0 -25
  135. package/dist/esm/common/ui/error-boundary-ui/error-svg/old/index.js +0 -60
  136. package/dist/esm/common/ui/icon/old/index.js +0 -18
  137. package/dist/esm/common/ui/message/old/index.js +0 -73
  138. package/dist/esm/common/ui/modal-hero/old/index.js +0 -18
  139. package/dist/esm/controllers/create-field/old/main.js +0 -72
  140. package/dist/esm/ui/create-form/async-select/old/main.js +0 -188
  141. package/dist/esm/ui/create-form/form-footer/old/main.js +0 -56
  142. package/dist/esm/ui/create-form/form-loader/old/main.js +0 -31
  143. package/dist/esm/ui/create-form/old/main.js +0 -174
  144. package/dist/esm/ui/create-form/select/old/main.js +0 -117
  145. package/dist/esm/ui/create-form/textfield/old/main.js +0 -47
  146. package/dist/esm/ui/create-form/user-picker/old/main.js +0 -64
  147. package/dist/esm/ui/inline-create/old/index.js +0 -30
  148. package/dist/esm/ui/inline-create/old/main.js +0 -112
  149. package/dist/esm/ui/modal-create/old/index.js +0 -36
  150. package/dist/esm/ui/modal-create/old/main.js +0 -156
  151. package/dist/types/common/ui/error-boundary-modal/old/index.d.ts +0 -11
  152. package/dist/types/common/ui/error-boundary-ui/error-svg/old/index.d.ts +0 -7
  153. package/dist/types/common/ui/icon/old/index.d.ts +0 -7
  154. package/dist/types/common/ui/message/old/index.d.ts +0 -15
  155. package/dist/types/common/ui/modal-hero/old/index.d.ts +0 -4
  156. package/dist/types/controllers/create-field/old/main.d.ts +0 -7
  157. package/dist/types/ui/create-form/async-select/old/main.d.ts +0 -11
  158. package/dist/types/ui/create-form/form-footer/old/main.d.ts +0 -16
  159. package/dist/types/ui/create-form/form-loader/old/main.d.ts +0 -11
  160. package/dist/types/ui/create-form/old/main.d.ts +0 -54
  161. package/dist/types/ui/create-form/select/old/main.d.ts +0 -24
  162. package/dist/types/ui/create-form/textfield/old/main.d.ts +0 -14
  163. package/dist/types/ui/create-form/user-picker/old/main.d.ts +0 -11
  164. package/dist/types/ui/inline-create/old/index.d.ts +0 -5
  165. package/dist/types/ui/inline-create/old/main.d.ts +0 -8
  166. package/dist/types/ui/modal-create/old/index.d.ts +0 -5
  167. package/dist/types/ui/modal-create/old/main.d.ts +0 -4
  168. package/dist/types-ts4.5/common/ui/error-boundary-modal/old/index.d.ts +0 -11
  169. package/dist/types-ts4.5/common/ui/error-boundary-ui/error-svg/old/index.d.ts +0 -7
  170. package/dist/types-ts4.5/common/ui/icon/old/index.d.ts +0 -7
  171. package/dist/types-ts4.5/common/ui/message/old/index.d.ts +0 -15
  172. package/dist/types-ts4.5/common/ui/modal-hero/old/index.d.ts +0 -4
  173. package/dist/types-ts4.5/controllers/create-field/old/main.d.ts +0 -7
  174. package/dist/types-ts4.5/ui/create-form/async-select/old/main.d.ts +0 -11
  175. package/dist/types-ts4.5/ui/create-form/form-footer/old/main.d.ts +0 -16
  176. package/dist/types-ts4.5/ui/create-form/form-loader/old/main.d.ts +0 -11
  177. package/dist/types-ts4.5/ui/create-form/old/main.d.ts +0 -56
  178. package/dist/types-ts4.5/ui/create-form/select/old/main.d.ts +0 -24
  179. package/dist/types-ts4.5/ui/create-form/textfield/old/main.d.ts +0 -14
  180. package/dist/types-ts4.5/ui/create-form/user-picker/old/main.d.ts +0 -11
  181. package/dist/types-ts4.5/ui/inline-create/old/index.d.ts +0 -5
  182. package/dist/types-ts4.5/ui/inline-create/old/main.d.ts +0 -8
  183. package/dist/types-ts4.5/ui/modal-create/old/index.d.ts +0 -5
  184. package/dist/types-ts4.5/ui/modal-create/old/main.d.ts +0 -4
@@ -1,156 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
- import _regeneratorRuntime from "@babel/runtime/regenerator";
4
- /* eslint-disable @atlassian/tangerine/import/no-parent-imports */
5
- /**
6
- * @jsxRuntime classic
7
- * @jsx jsx
8
- */
9
- import { useLayoutEffect, useRef } from 'react';
10
-
11
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
- import { jsx } from '@emotion/react';
13
- import { useIntl } from 'react-intl-next';
14
- import { Layering } from '@atlaskit/layering';
15
- import { ModalBody, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
16
- import { Box } from '@atlaskit/primitives';
17
- import { CREATE_FORM_MAX_WIDTH_IN_PX, DEFAULT_TEST_ID, SCREEN_ID } from '../../../common/constants';
18
- import { ConfirmDismissDialog } from '../../../common/ui/confirm-dismiss-dialog';
19
- import { EditModal } from '../../../common/ui/edit-modal';
20
- import { ErrorBoundary } from '../../../common/ui/error-boundary';
21
- import { LinkCreateContent } from '../../../common/ui/link-create-content';
22
- import { ModalHero } from '../../../common/ui/modal-hero';
23
- import { Modal } from '../../../common/ui/ModalDialog';
24
- import { LinkCreateCallbackProvider } from '../../../controllers/callback-context';
25
- import { EditPostCreateModalProvider, useEditPostCreateModal } from '../../../controllers/edit-post-create-context';
26
- import { ExitWarningModalProvider, useExitWarningModal } from '../../../controllers/exit-warning-modal-context';
27
- import { FormContextProvider } from '../../../controllers/form-context';
28
- import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../../controllers/plugin-context';
29
- import { messages } from '../messages';
30
- var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
31
- var active = _ref.active,
32
- modalTitle = _ref.modalTitle,
33
- onCreate = _ref.onCreate,
34
- onFailure = _ref.onFailure,
35
- onCancel = _ref.onCancel,
36
- onComplete = _ref.onComplete,
37
- onOpenComplete = _ref.onOpenComplete,
38
- onCloseComplete = _ref.onCloseComplete,
39
- _ref$testId = _ref.testId,
40
- testId = _ref$testId === void 0 ? DEFAULT_TEST_ID : _ref$testId,
41
- plugins = _ref.plugins,
42
- entityKey = _ref.entityKey,
43
- modalHero = _ref.modalHero;
44
- var intl = useIntl();
45
- var _useExitWarningModal = useExitWarningModal(),
46
- withExitWarning = _useExitWarningModal.withExitWarning,
47
- showExitWarning = _useExitWarningModal.showExitWarning,
48
- setShowExitWarning = _useExitWarningModal.setShowExitWarning;
49
- var _useEditPostCreateMod = useEditPostCreateModal(),
50
- editViewPayload = _useEditPostCreateMod.editViewPayload;
51
- var _useLinkCreatePlugins = useLinkCreatePlugins(),
52
- activePlugin = _useLinkCreatePlugins.activePlugin;
53
- var handleCloseExitWarning = function handleCloseExitWarning() {
54
- return setShowExitWarning(false);
55
- };
56
- return jsx(LinkCreateCallbackProvider, {
57
- onCreate: onCreate,
58
- onFailure: onFailure,
59
- onCancel: withExitWarning(onCancel)
60
- }, jsx(ModalTransition, null, active && jsx(Modal, {
61
- testId: "link-create-modal",
62
- screen: SCREEN_ID,
63
- onClose: withExitWarning(onCancel),
64
- shouldScrollInViewport: true,
65
- onOpenComplete: onOpenComplete,
66
- onCloseComplete: onCloseComplete,
67
- width: "".concat(CREATE_FORM_MAX_WIDTH_IN_PX, "px")
68
- }, jsx(ModalHero, {
69
- hero: modalHero
70
- }), jsx(ModalHeader, null, jsx(ModalTitle, null, modalTitle || intl.formatMessage(messages.heading))), jsx(ModalBody, null, jsx(Box, {
71
- testId: testId
72
- }, jsx(ErrorBoundary, null, jsx(LinkCreateContent, {
73
- plugins: plugins,
74
- entityKey: entityKey
75
- })))))), onComplete && jsx(EditModal, {
76
- onCloseComplete: onCloseComplete,
77
- onClose: onComplete,
78
- editViewPayload: editViewPayload,
79
- activePlugin: activePlugin
80
- }), jsx(Layering, {
81
- isDisabled: false
82
- }, jsx(ConfirmDismissDialog, {
83
- active: showExitWarning,
84
- onClose: handleCloseExitWarning,
85
- onCancel: onCancel
86
- })));
87
- };
88
- var LinkCreateModalOld = function LinkCreateModalOld(props) {
89
- var shouldCallCloseComplete = useRef(!props.active);
90
-
91
- // modal calls onCloseComplete in a useEffect(), so we can track whether
92
- // or not we should execute it based on the active prop in a
93
- // useLayoutEffect() which will be run before child useEffect()s
94
- useLayoutEffect(function () {
95
- // onCloseComplete should only be called when it is not active
96
- shouldCallCloseComplete.current = !props.active;
97
- }, [props.active]);
98
- return jsx(LinkCreatePluginsProvider, {
99
- plugins: props.plugins,
100
- entityKey: props.entityKey
101
- }, function (pluginsProvider) {
102
- return jsx(EditPostCreateModalProvider, {
103
- active: !!props.active
104
- }, function (_ref2) {
105
- var _pluginsProvider$acti;
106
- var setEditViewPayload = _ref2.setEditViewPayload,
107
- editViewPayload = _ref2.editViewPayload,
108
- shouldActivateEditView = _ref2.shouldActivateEditView,
109
- enableEditView = _ref2.enableEditView;
110
- return jsx(FormContextProvider, {
111
- 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
112
- }, jsx(ExitWarningModalProvider, null, jsx(LinkCreateWithModal, _extends({}, props, {
113
- active: props.active && !editViewPayload,
114
- onCreate: ( /*#__PURE__*/function () {
115
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(payload) {
116
- var _props$onCreate;
117
- return _regeneratorRuntime.wrap(function _callee$(_context) {
118
- while (1) switch (_context.prev = _context.next) {
119
- case 0:
120
- _context.next = 2;
121
- return (_props$onCreate = props.onCreate) === null || _props$onCreate === void 0 ? void 0 : _props$onCreate.call(props, payload);
122
- case 2:
123
- // if onComplete exists then there is an edit flow
124
- if (props.onComplete) {
125
- if (shouldActivateEditView()) {
126
- //edit button is pressed
127
- setEditViewPayload(payload);
128
- } else {
129
- //create button is pressed
130
- props.onComplete();
131
- }
132
- }
133
- case 3:
134
- case "end":
135
- return _context.stop();
136
- }
137
- }, _callee);
138
- }));
139
- return function (_x) {
140
- return _ref3.apply(this, arguments);
141
- };
142
- }()),
143
- onCloseComplete: function onCloseComplete() {
144
- if (shouldCallCloseComplete.current) {
145
- var _props$onCloseComplet;
146
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
147
- args[_key] = arguments[_key];
148
- }
149
- (_props$onCloseComplet = props.onCloseComplete) === null || _props$onCloseComplet === void 0 || _props$onCloseComplet.call.apply(_props$onCloseComplet, [props].concat(args));
150
- }
151
- }
152
- }))));
153
- });
154
- });
155
- };
156
- export default LinkCreateModalOld;
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * ErrorBoundaryModal props are the same as those passed to LinkCreate, which
4
- * are used to control its active state
5
- */
6
- type ErrorBoundaryModalProps = {
7
- active?: boolean;
8
- onClose?: () => void;
9
- };
10
- export declare const ErrorBoundaryModalOld: ({ active, onClose, }: ErrorBoundaryModalProps) => JSX.Element;
11
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- declare const ErrorSVGOld: () => jsx.JSX.Element;
7
- export default ErrorSVGOld;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const UrlIconOld: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
- } & {
6
- url?: string | undefined;
7
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,15 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ReactNode } from 'react';
6
- import { jsx } from '@emotion/react';
7
- type MessageAppearance = 'default' | 'error' | 'valid';
8
- type MessageProps = {
9
- id?: string;
10
- appearance?: MessageAppearance;
11
- testId?: string;
12
- children: ReactNode;
13
- };
14
- export declare const MessageOld: ({ children, appearance, id, testId }: MessageProps) => jsx.JSX.Element;
15
- export {};
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare const ModalHeroOld: ({ hero }: {
3
- hero?: React.ReactNode;
4
- }) => React.JSX.Element | null;
@@ -1,7 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- import { type CreateFieldProps } from '../types';
7
- export declare function CreateFieldOld({ id, name, label, isRequired, validators, validationHelpText, testId, children, }: CreateFieldProps): jsx.JSX.Element;
@@ -1,11 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import { type OptionType } from '@atlaskit/select';
3
- import { type AsyncSelectProps } from '../types';
4
- export declare const TEST_ID = "link-create-async-select";
5
- /**
6
- * An async select utilising the Atlaskit AsyncSelect and CreateField.
7
- * Validation is handled by the form on form submission. Any
8
- * errors returned by the handleSubmit function passed to the form <Form> that
9
- * have a key matching the `name` of this field are shown below the field.
10
- */
11
- export declare function AsyncSelectOld<T = OptionType>({ id, name, label, isRequired, validators, validationHelpText, testId, defaultOption: propsDefaultValue, loadOptions: loadOptionsFn, ...restProps }: AsyncSelectProps<T>): jsx.JSX.Element;
@@ -1,16 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- export interface CreateFormFooterProps {
7
- formErrorMessage: string | undefined;
8
- handleCancel: () => void;
9
- testId?: string;
10
- }
11
- /**
12
- * Footer for the Create Form, used as a wrapper for action buttons
13
- * and form error messages. This component is unmounted if
14
- * hideFooter is true in the Create Form.
15
- */
16
- export declare function CreateFormFooterOld({ formErrorMessage, handleCancel, testId, }: CreateFormFooterProps): jsx.JSX.Element;
@@ -1,11 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- import { type SpinnerProps } from '@atlaskit/spinner';
7
- /**
8
- * Wrapper component for the Spinner, shows while the form
9
- * performs async functions on load.
10
- */
11
- export declare function CreateFormLoaderOld({ size }: Partial<SpinnerProps>): jsx.JSX.Element;
@@ -1,54 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ReactNode } from 'react';
6
- import { jsx } from '@emotion/react';
7
- type ReservedFields = {
8
- [Field in (typeof RESERVED_FIELDS)[number]]?: unknown;
9
- };
10
- declare const RESERVED_FIELDS: readonly ["__post_create__"];
11
- type DisallowReservedFields<T> = T & {
12
- [Field in (typeof RESERVED_FIELDS)[number]]?: never;
13
- };
14
- type OmitReservedFields<T> = Omit<T, keyof ReservedFields>;
15
- type Errors = Record<string, string>;
16
- export interface CreateFormProps<FormData> {
17
- /**
18
- * Should resolve to void, or resolve to an object of
19
- * keys (field names) with error messages (key values)
20
- */
21
- onSubmit: (data: OmitReservedFields<FormData>) => void | Errors | Promise<void | Errors>;
22
- /**
23
- * Children to render in the form (form fields)
24
- */
25
- children: ReactNode;
26
- /**
27
- * Test id to render on the form element
28
- */
29
- testId?: string;
30
- /**
31
- * Callback when the cancel button is fired
32
- */
33
- onCancel?: () => void;
34
- /**
35
- * Renders a spinner when true
36
- */
37
- isLoading?: boolean;
38
- /**
39
- * Hides the rendering of the footer buttons
40
- */
41
- hideFooter?: boolean;
42
- /**
43
- * Hides the "Required fields are marked with an asterisk" message
44
- */
45
- hideRequiredFieldMessage?: boolean;
46
- /**
47
- * Values to initialise the forms initial state with
48
- * Should not include values for reserved fields
49
- */
50
- initialValues?: DisallowReservedFields<FormData>;
51
- }
52
- export declare const TEST_ID = "link-create-form";
53
- export declare const CreateFormOld: <FormData extends Record<string, any> = {}>({ children, testId, onSubmit, onCancel, isLoading, hideFooter, hideRequiredFieldMessage, initialValues, }: CreateFormProps<FormData>) => jsx.JSX.Element;
54
- export {};
@@ -1,24 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type PropsWithChildren } from 'react';
6
- import { jsx } from '@emotion/react';
7
- import { type OptionProps, type OptionType, type SingleValueProps } from '@atlaskit/select';
8
- import { type SelectProps, type SitePickerOptionType } from '../types';
9
- export declare const TEST_ID = "link-create-select";
10
- /**
11
- * A select component utilising the Atlaskit Select and CreateField.
12
- * Validation is handled by the form on form submission. Any
13
- * errors returned by the handleSubmit function passed to the form <Form> that
14
- * have a key matching the `name` of this field are shown below the field.
15
- */
16
- export declare function SelectOld<T = OptionType>({ id, name, label, isRequired, validators, validationHelpText, testId, ...restProps }: SelectProps<T>): jsx.JSX.Element;
17
- export type SiteSelectProps = {
18
- testId?: string;
19
- options?: SitePickerOptionType[];
20
- name?: string;
21
- };
22
- export declare const SiteSelectOld: ({ options, name, testId }: SiteSelectProps) => jsx.JSX.Element;
23
- export declare const SitePickerOptionOld: ({ children, ...props }: PropsWithChildren<OptionProps<SitePickerOptionType, false>>) => JSX.Element;
24
- export declare const SitePickerSingleValueOld: ({ children, ...props }: PropsWithChildren<SingleValueProps<SitePickerOptionType, false>>) => JSX.Element;
@@ -1,14 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- import { type TextFieldProps } from '../types';
7
- export declare const TEST_ID = "link-create-text-field";
8
- /**
9
- * A text field utilising the Atlaskit Textfield and CreateField.
10
- * Validation is handled by the form as it is on form submission. Any errors returned by
11
- * the handleSubmit function passed to the form <Form> that have a key matching the `name`
12
- * of this text field are shown above the field.
13
- */
14
- export declare function TextFieldOld({ id, name, label, isRequired, validators, validationHelpText, testId, ...restProps }: TextFieldProps): jsx.JSX.Element;
@@ -1,11 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- import { type UserPickerProps } from '../types';
7
- export declare const TEST_ID = "link-create-user-picker";
8
- /**
9
- * A user picker utilising the SmartUserPicker.
10
- */
11
- export declare function UserPickerOld({ productKey, siteId, name, label, placeholder, validators, testId, defaultValue, }: UserPickerProps): jsx.JSX.Element;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { jsx } from '@emotion/react';
3
- import type { LinkCreateProps } from '../../../common/types';
4
- declare const ComposedLinkCreateOld: import("react").MemoExoticComponent<(props: LinkCreateProps) => jsx.JSX.Element>;
5
- export default ComposedLinkCreateOld;
@@ -1,8 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- import type { LinkCreateProps } from '../../../common/types';
7
- declare const InlineCreateOld: (props: LinkCreateProps) => jsx.JSX.Element;
8
- export default InlineCreateOld;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { jsx } from '@emotion/react';
3
- import { type LinkCreateWithModalProps } from '../../../common/types';
4
- declare const ComposedLinkCreateOld: import("react").MemoExoticComponent<(props: LinkCreateWithModalProps) => jsx.JSX.Element>;
5
- export default ComposedLinkCreateOld;
@@ -1,4 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import type { LinkCreateWithModalProps } from '../../../common/types';
3
- declare const LinkCreateModalOld: (props: LinkCreateWithModalProps) => jsx.JSX.Element;
4
- export default LinkCreateModalOld;
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * ErrorBoundaryModal props are the same as those passed to LinkCreate, which
4
- * are used to control its active state
5
- */
6
- type ErrorBoundaryModalProps = {
7
- active?: boolean;
8
- onClose?: () => void;
9
- };
10
- export declare const ErrorBoundaryModalOld: ({ active, onClose, }: ErrorBoundaryModalProps) => JSX.Element;
11
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- declare const ErrorSVGOld: () => jsx.JSX.Element;
7
- export default ErrorSVGOld;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const UrlIconOld: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
- } & {
6
- url?: string | undefined;
7
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,15 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ReactNode } from 'react';
6
- import { jsx } from '@emotion/react';
7
- type MessageAppearance = 'default' | 'error' | 'valid';
8
- type MessageProps = {
9
- id?: string;
10
- appearance?: MessageAppearance;
11
- testId?: string;
12
- children: ReactNode;
13
- };
14
- export declare const MessageOld: ({ children, appearance, id, testId }: MessageProps) => jsx.JSX.Element;
15
- export {};
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare const ModalHeroOld: ({ hero }: {
3
- hero?: React.ReactNode;
4
- }) => React.JSX.Element | null;
@@ -1,7 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- import { type CreateFieldProps } from '../types';
7
- export declare function CreateFieldOld({ id, name, label, isRequired, validators, validationHelpText, testId, children, }: CreateFieldProps): jsx.JSX.Element;
@@ -1,11 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import { type OptionType } from '@atlaskit/select';
3
- import { type AsyncSelectProps } from '../types';
4
- export declare const TEST_ID = "link-create-async-select";
5
- /**
6
- * An async select utilising the Atlaskit AsyncSelect and CreateField.
7
- * Validation is handled by the form on form submission. Any
8
- * errors returned by the handleSubmit function passed to the form <Form> that
9
- * have a key matching the `name` of this field are shown below the field.
10
- */
11
- export declare function AsyncSelectOld<T = OptionType>({ id, name, label, isRequired, validators, validationHelpText, testId, defaultOption: propsDefaultValue, loadOptions: loadOptionsFn, ...restProps }: AsyncSelectProps<T>): jsx.JSX.Element;
@@ -1,16 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- export interface CreateFormFooterProps {
7
- formErrorMessage: string | undefined;
8
- handleCancel: () => void;
9
- testId?: string;
10
- }
11
- /**
12
- * Footer for the Create Form, used as a wrapper for action buttons
13
- * and form error messages. This component is unmounted if
14
- * hideFooter is true in the Create Form.
15
- */
16
- export declare function CreateFormFooterOld({ formErrorMessage, handleCancel, testId, }: CreateFormFooterProps): jsx.JSX.Element;
@@ -1,11 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- import { type SpinnerProps } from '@atlaskit/spinner';
7
- /**
8
- * Wrapper component for the Spinner, shows while the form
9
- * performs async functions on load.
10
- */
11
- export declare function CreateFormLoaderOld({ size }: Partial<SpinnerProps>): jsx.JSX.Element;
@@ -1,56 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ReactNode } from 'react';
6
- import { jsx } from '@emotion/react';
7
- type ReservedFields = {
8
- [Field in (typeof RESERVED_FIELDS)[number]]?: unknown;
9
- };
10
- declare const RESERVED_FIELDS: readonly [
11
- "__post_create__"
12
- ];
13
- type DisallowReservedFields<T> = T & {
14
- [Field in (typeof RESERVED_FIELDS)[number]]?: never;
15
- };
16
- type OmitReservedFields<T> = Omit<T, keyof ReservedFields>;
17
- type Errors = Record<string, string>;
18
- export interface CreateFormProps<FormData> {
19
- /**
20
- * Should resolve to void, or resolve to an object of
21
- * keys (field names) with error messages (key values)
22
- */
23
- onSubmit: (data: OmitReservedFields<FormData>) => void | Errors | Promise<void | Errors>;
24
- /**
25
- * Children to render in the form (form fields)
26
- */
27
- children: ReactNode;
28
- /**
29
- * Test id to render on the form element
30
- */
31
- testId?: string;
32
- /**
33
- * Callback when the cancel button is fired
34
- */
35
- onCancel?: () => void;
36
- /**
37
- * Renders a spinner when true
38
- */
39
- isLoading?: boolean;
40
- /**
41
- * Hides the rendering of the footer buttons
42
- */
43
- hideFooter?: boolean;
44
- /**
45
- * Hides the "Required fields are marked with an asterisk" message
46
- */
47
- hideRequiredFieldMessage?: boolean;
48
- /**
49
- * Values to initialise the forms initial state with
50
- * Should not include values for reserved fields
51
- */
52
- initialValues?: DisallowReservedFields<FormData>;
53
- }
54
- export declare const TEST_ID = "link-create-form";
55
- export declare const CreateFormOld: <FormData extends Record<string, any> = {}>({ children, testId, onSubmit, onCancel, isLoading, hideFooter, hideRequiredFieldMessage, initialValues, }: CreateFormProps<FormData>) => jsx.JSX.Element;
56
- export {};
@@ -1,24 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type PropsWithChildren } from 'react';
6
- import { jsx } from '@emotion/react';
7
- import { type OptionProps, type OptionType, type SingleValueProps } from '@atlaskit/select';
8
- import { type SelectProps, type SitePickerOptionType } from '../types';
9
- export declare const TEST_ID = "link-create-select";
10
- /**
11
- * A select component utilising the Atlaskit Select and CreateField.
12
- * Validation is handled by the form on form submission. Any
13
- * errors returned by the handleSubmit function passed to the form <Form> that
14
- * have a key matching the `name` of this field are shown below the field.
15
- */
16
- export declare function SelectOld<T = OptionType>({ id, name, label, isRequired, validators, validationHelpText, testId, ...restProps }: SelectProps<T>): jsx.JSX.Element;
17
- export type SiteSelectProps = {
18
- testId?: string;
19
- options?: SitePickerOptionType[];
20
- name?: string;
21
- };
22
- export declare const SiteSelectOld: ({ options, name, testId }: SiteSelectProps) => jsx.JSX.Element;
23
- export declare const SitePickerOptionOld: ({ children, ...props }: PropsWithChildren<OptionProps<SitePickerOptionType, false>>) => JSX.Element;
24
- export declare const SitePickerSingleValueOld: ({ children, ...props }: PropsWithChildren<SingleValueProps<SitePickerOptionType, false>>) => JSX.Element;
@@ -1,14 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- import { type TextFieldProps } from '../types';
7
- export declare const TEST_ID = "link-create-text-field";
8
- /**
9
- * A text field utilising the Atlaskit Textfield and CreateField.
10
- * Validation is handled by the form as it is on form submission. Any errors returned by
11
- * the handleSubmit function passed to the form <Form> that have a key matching the `name`
12
- * of this text field are shown above the field.
13
- */
14
- export declare function TextFieldOld({ id, name, label, isRequired, validators, validationHelpText, testId, ...restProps }: TextFieldProps): jsx.JSX.Element;
@@ -1,11 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- import { type UserPickerProps } from '../types';
7
- export declare const TEST_ID = "link-create-user-picker";
8
- /**
9
- * A user picker utilising the SmartUserPicker.
10
- */
11
- export declare function UserPickerOld({ productKey, siteId, name, label, placeholder, validators, testId, defaultValue, }: UserPickerProps): jsx.JSX.Element;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { jsx } from '@emotion/react';
3
- import type { LinkCreateProps } from '../../../common/types';
4
- declare const ComposedLinkCreateOld: import("react").MemoExoticComponent<(props: LinkCreateProps) => jsx.JSX.Element>;
5
- export default ComposedLinkCreateOld;
@@ -1,8 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- import type { LinkCreateProps } from '../../../common/types';
7
- declare const InlineCreateOld: (props: LinkCreateProps) => jsx.JSX.Element;
8
- export default InlineCreateOld;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { jsx } from '@emotion/react';
3
- import { type LinkCreateWithModalProps } from '../../../common/types';
4
- declare const ComposedLinkCreateOld: import("react").MemoExoticComponent<(props: LinkCreateWithModalProps) => jsx.JSX.Element>;
5
- export default ComposedLinkCreateOld;
@@ -1,4 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import type { LinkCreateWithModalProps } from '../../../common/types';
3
- declare const LinkCreateModalOld: (props: LinkCreateWithModalProps) => jsx.JSX.Element;
4
- export default LinkCreateModalOld;