@atlaskit/link-create 3.1.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/cjs/common/constants.js +1 -1
- package/dist/cjs/common/ui/error-boundary-modal/index.js +1 -9
- package/dist/cjs/common/ui/error-boundary-ui/error-svg/index.js +1 -10
- package/dist/cjs/common/ui/icon/index.js +1 -9
- package/dist/cjs/common/ui/message/index.js +1 -9
- package/dist/cjs/common/ui/modal-hero/index.js +1 -9
- package/dist/cjs/controllers/create-field/main.js +1 -9
- package/dist/cjs/ui/create-form/async-select/main.js +1 -9
- package/dist/cjs/ui/create-form/form-footer/main.js +1 -9
- package/dist/cjs/ui/create-form/form-loader/main.js +1 -9
- package/dist/cjs/ui/create-form/main.js +1 -9
- package/dist/cjs/ui/create-form/select/main.js +7 -33
- package/dist/cjs/ui/create-form/textfield/main.js +1 -9
- package/dist/cjs/ui/create-form/user-picker/main.js +1 -9
- package/dist/cjs/ui/inline-create/index.js +1 -9
- package/dist/cjs/ui/inline-create/main.js +1 -9
- package/dist/cjs/ui/modal-create/index.js +1 -9
- package/dist/cjs/ui/modal-create/main.js +1 -9
- package/dist/es2019/common/constants.js +1 -1
- package/dist/es2019/common/ui/error-boundary-modal/index.js +1 -9
- package/dist/es2019/common/ui/error-boundary-ui/error-svg/index.js +1 -9
- package/dist/es2019/common/ui/icon/index.js +1 -9
- package/dist/es2019/common/ui/message/index.js +1 -9
- package/dist/es2019/common/ui/modal-hero/index.js +1 -9
- package/dist/es2019/controllers/create-field/main.js +1 -9
- package/dist/es2019/ui/create-form/async-select/main.js +1 -9
- package/dist/es2019/ui/create-form/form-footer/main.js +1 -9
- package/dist/es2019/ui/create-form/form-loader/main.js +1 -9
- package/dist/es2019/ui/create-form/main.js +1 -9
- package/dist/es2019/ui/create-form/select/main.js +8 -34
- package/dist/es2019/ui/create-form/textfield/main.js +1 -9
- package/dist/es2019/ui/create-form/user-picker/main.js +1 -9
- package/dist/es2019/ui/inline-create/index.js +1 -9
- package/dist/es2019/ui/inline-create/main.js +1 -9
- package/dist/es2019/ui/modal-create/index.js +1 -9
- package/dist/es2019/ui/modal-create/main.js +1 -9
- package/dist/esm/common/constants.js +1 -1
- package/dist/esm/common/ui/error-boundary-modal/index.js +1 -9
- package/dist/esm/common/ui/error-boundary-ui/error-svg/index.js +1 -9
- package/dist/esm/common/ui/icon/index.js +1 -9
- package/dist/esm/common/ui/message/index.js +1 -9
- package/dist/esm/common/ui/modal-hero/index.js +1 -9
- package/dist/esm/controllers/create-field/main.js +1 -9
- package/dist/esm/ui/create-form/async-select/main.js +1 -9
- package/dist/esm/ui/create-form/form-footer/main.js +1 -9
- package/dist/esm/ui/create-form/form-loader/main.js +1 -9
- package/dist/esm/ui/create-form/main.js +1 -9
- package/dist/esm/ui/create-form/select/main.js +7 -33
- package/dist/esm/ui/create-form/textfield/main.js +1 -9
- package/dist/esm/ui/create-form/user-picker/main.js +1 -9
- package/dist/esm/ui/inline-create/index.js +1 -9
- package/dist/esm/ui/inline-create/main.js +1 -9
- package/dist/esm/ui/modal-create/index.js +1 -9
- package/dist/esm/ui/modal-create/main.js +1 -9
- package/dist/types/common/ui/error-boundary-modal/index.d.ts +2 -2
- package/dist/types/common/ui/icon/index.d.ts +1 -1
- package/dist/types/common/ui/message/index.d.ts +1 -1
- package/dist/types/common/ui/modal-hero/index.d.ts +1 -1
- package/dist/types/controllers/create-field/main.d.ts +1 -1
- package/dist/types/ui/create-form/async-select/main.d.ts +8 -2
- package/dist/types/ui/create-form/form-footer/main.d.ts +6 -1
- package/dist/types/ui/create-form/form-loader/main.d.ts +5 -1
- package/dist/types/ui/create-form/main.d.ts +1 -1
- package/dist/types/ui/create-form/select/main.d.ts +11 -5
- package/dist/types/ui/create-form/textfield/main.d.ts +8 -2
- package/dist/types/ui/create-form/user-picker/main.d.ts +5 -2
- package/dist/types-ts4.5/common/ui/error-boundary-modal/index.d.ts +2 -2
- package/dist/types-ts4.5/common/ui/icon/index.d.ts +1 -1
- package/dist/types-ts4.5/common/ui/message/index.d.ts +1 -1
- package/dist/types-ts4.5/common/ui/modal-hero/index.d.ts +1 -1
- package/dist/types-ts4.5/controllers/create-field/main.d.ts +1 -1
- package/dist/types-ts4.5/ui/create-form/async-select/main.d.ts +8 -2
- package/dist/types-ts4.5/ui/create-form/form-footer/main.d.ts +6 -1
- package/dist/types-ts4.5/ui/create-form/form-loader/main.d.ts +5 -1
- package/dist/types-ts4.5/ui/create-form/main.d.ts +1 -1
- package/dist/types-ts4.5/ui/create-form/select/main.d.ts +11 -5
- package/dist/types-ts4.5/ui/create-form/textfield/main.d.ts +8 -2
- package/dist/types-ts4.5/ui/create-form/user-picker/main.d.ts +5 -2
- package/package.json +1 -9
- package/report.api.md +1 -1
- package/dist/cjs/common/ui/error-boundary-modal/old/index.js +0 -34
- package/dist/cjs/common/ui/error-boundary-ui/error-svg/old/index.js +0 -67
- package/dist/cjs/common/ui/icon/old/index.js +0 -26
- package/dist/cjs/common/ui/message/old/index.js +0 -81
- package/dist/cjs/common/ui/modal-hero/old/index.js +0 -27
- package/dist/cjs/controllers/create-field/old/main.js +0 -76
- package/dist/cjs/ui/create-form/async-select/old/main.js +0 -195
- package/dist/cjs/ui/create-form/form-footer/old/main.js +0 -64
- package/dist/cjs/ui/create-form/form-loader/old/main.js +0 -39
- package/dist/cjs/ui/create-form/old/main.js +0 -177
- package/dist/cjs/ui/create-form/select/old/main.js +0 -127
- package/dist/cjs/ui/create-form/textfield/old/main.js +0 -55
- package/dist/cjs/ui/create-form/user-picker/old/main.js +0 -72
- package/dist/cjs/ui/inline-create/old/index.js +0 -38
- package/dist/cjs/ui/inline-create/old/main.js +0 -120
- package/dist/cjs/ui/modal-create/old/index.js +0 -44
- package/dist/cjs/ui/modal-create/old/main.js +0 -164
- package/dist/es2019/common/ui/error-boundary-modal/old/index.js +0 -26
- package/dist/es2019/common/ui/error-boundary-ui/error-svg/old/index.js +0 -58
- package/dist/es2019/common/ui/icon/old/index.js +0 -18
- package/dist/es2019/common/ui/message/old/index.js +0 -74
- package/dist/es2019/common/ui/modal-hero/old/index.js +0 -19
- package/dist/es2019/controllers/create-field/old/main.js +0 -74
- package/dist/es2019/ui/create-form/async-select/old/main.js +0 -137
- package/dist/es2019/ui/create-form/form-footer/old/main.js +0 -57
- package/dist/es2019/ui/create-form/form-loader/old/main.js +0 -31
- package/dist/es2019/ui/create-form/old/main.js +0 -145
- package/dist/es2019/ui/create-form/select/old/main.js +0 -106
- package/dist/es2019/ui/create-form/textfield/old/main.js +0 -45
- package/dist/es2019/ui/create-form/user-picker/old/main.js +0 -59
- package/dist/es2019/ui/inline-create/old/index.js +0 -30
- package/dist/es2019/ui/inline-create/old/main.js +0 -96
- package/dist/es2019/ui/modal-create/old/index.js +0 -36
- package/dist/es2019/ui/modal-create/old/main.js +0 -137
- package/dist/esm/common/ui/error-boundary-modal/old/index.js +0 -25
- package/dist/esm/common/ui/error-boundary-ui/error-svg/old/index.js +0 -60
- package/dist/esm/common/ui/icon/old/index.js +0 -18
- package/dist/esm/common/ui/message/old/index.js +0 -73
- package/dist/esm/common/ui/modal-hero/old/index.js +0 -18
- package/dist/esm/controllers/create-field/old/main.js +0 -72
- package/dist/esm/ui/create-form/async-select/old/main.js +0 -188
- package/dist/esm/ui/create-form/form-footer/old/main.js +0 -56
- package/dist/esm/ui/create-form/form-loader/old/main.js +0 -31
- package/dist/esm/ui/create-form/old/main.js +0 -174
- package/dist/esm/ui/create-form/select/old/main.js +0 -117
- package/dist/esm/ui/create-form/textfield/old/main.js +0 -47
- package/dist/esm/ui/create-form/user-picker/old/main.js +0 -64
- package/dist/esm/ui/inline-create/old/index.js +0 -30
- package/dist/esm/ui/inline-create/old/main.js +0 -112
- package/dist/esm/ui/modal-create/old/index.js +0 -36
- package/dist/esm/ui/modal-create/old/main.js +0 -156
- package/dist/types/common/ui/error-boundary-modal/old/index.d.ts +0 -11
- package/dist/types/common/ui/error-boundary-ui/error-svg/old/index.d.ts +0 -7
- package/dist/types/common/ui/icon/old/index.d.ts +0 -7
- package/dist/types/common/ui/message/old/index.d.ts +0 -15
- package/dist/types/common/ui/modal-hero/old/index.d.ts +0 -4
- package/dist/types/controllers/create-field/old/main.d.ts +0 -7
- package/dist/types/ui/create-form/async-select/old/main.d.ts +0 -11
- package/dist/types/ui/create-form/form-footer/old/main.d.ts +0 -16
- package/dist/types/ui/create-form/form-loader/old/main.d.ts +0 -11
- package/dist/types/ui/create-form/old/main.d.ts +0 -54
- package/dist/types/ui/create-form/select/old/main.d.ts +0 -24
- package/dist/types/ui/create-form/textfield/old/main.d.ts +0 -14
- package/dist/types/ui/create-form/user-picker/old/main.d.ts +0 -11
- package/dist/types/ui/inline-create/old/index.d.ts +0 -5
- package/dist/types/ui/inline-create/old/main.d.ts +0 -8
- package/dist/types/ui/modal-create/old/index.d.ts +0 -5
- package/dist/types/ui/modal-create/old/main.d.ts +0 -4
- package/dist/types-ts4.5/common/ui/error-boundary-modal/old/index.d.ts +0 -11
- package/dist/types-ts4.5/common/ui/error-boundary-ui/error-svg/old/index.d.ts +0 -7
- package/dist/types-ts4.5/common/ui/icon/old/index.d.ts +0 -7
- package/dist/types-ts4.5/common/ui/message/old/index.d.ts +0 -15
- package/dist/types-ts4.5/common/ui/modal-hero/old/index.d.ts +0 -4
- package/dist/types-ts4.5/controllers/create-field/old/main.d.ts +0 -7
- package/dist/types-ts4.5/ui/create-form/async-select/old/main.d.ts +0 -11
- package/dist/types-ts4.5/ui/create-form/form-footer/old/main.d.ts +0 -16
- package/dist/types-ts4.5/ui/create-form/form-loader/old/main.d.ts +0 -11
- package/dist/types-ts4.5/ui/create-form/old/main.d.ts +0 -56
- package/dist/types-ts4.5/ui/create-form/select/old/main.d.ts +0 -24
- package/dist/types-ts4.5/ui/create-form/textfield/old/main.d.ts +0 -14
- package/dist/types-ts4.5/ui/create-form/user-picker/old/main.d.ts +0 -11
- package/dist/types-ts4.5/ui/inline-create/old/index.d.ts +0 -5
- package/dist/types-ts4.5/ui/inline-create/old/main.d.ts +0 -8
- package/dist/types-ts4.5/ui/modal-create/old/index.d.ts +0 -5
- package/dist/types-ts4.5/ui/modal-create/old/main.d.ts +0 -4
|
@@ -13,7 +13,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
14
|
var _layering = require("@atlaskit/layering");
|
|
15
15
|
var _modalDialog = require("@atlaskit/modal-dialog");
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
17
|
var _constants = require("../../common/constants");
|
|
19
18
|
var _confirmDismissDialog = require("../../common/ui/confirm-dismiss-dialog");
|
|
@@ -28,7 +27,6 @@ var _exitWarningModalContext = require("../../controllers/exit-warning-modal-con
|
|
|
28
27
|
var _formContext = require("../../controllers/form-context");
|
|
29
28
|
var _pluginContext = require("../../controllers/plugin-context");
|
|
30
29
|
var _messages = require("./messages");
|
|
31
|
-
var _main = _interopRequireDefault(require("./old/main"));
|
|
32
30
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
33
31
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
34
32
|
var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
|
|
@@ -89,7 +87,7 @@ var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
|
|
|
89
87
|
onCancel: onCancel
|
|
90
88
|
})));
|
|
91
89
|
};
|
|
92
|
-
var
|
|
90
|
+
var LinkCreateModal = function LinkCreateModal(props) {
|
|
93
91
|
var shouldCallCloseComplete = (0, _react.useRef)(!props.active);
|
|
94
92
|
|
|
95
93
|
// modal calls onCloseComplete in a useEffect(), so we can track whether
|
|
@@ -157,10 +155,4 @@ var LinkCreateModalNew = function LinkCreateModalNew(props) {
|
|
|
157
155
|
});
|
|
158
156
|
});
|
|
159
157
|
};
|
|
160
|
-
var LinkCreateModal = function LinkCreateModal(props) {
|
|
161
|
-
if ((0, _platformFeatureFlags.fg)('platform_bandicoots-link-create-css')) {
|
|
162
|
-
return /*#__PURE__*/_react.default.createElement(LinkCreateModalNew, props);
|
|
163
|
-
}
|
|
164
|
-
return /*#__PURE__*/_react.default.createElement(_main.default, props);
|
|
165
|
-
};
|
|
166
158
|
var _default = exports.default = LinkCreateModal;
|
|
@@ -10,7 +10,7 @@ export const CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
|
|
|
10
10
|
export const LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
|
|
11
11
|
export const PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/link-create" || '',
|
|
13
|
-
packageVersion: "
|
|
13
|
+
packageVersion: "4.0.0" || '',
|
|
14
14
|
component: COMPONENT_NAME,
|
|
15
15
|
componentName: COMPONENT_NAME
|
|
16
16
|
};
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Modal, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { CREATE_FORM_MAX_WIDTH_IN_PX } from '../../constants';
|
|
5
4
|
import { ErrorBoundaryUI } from '../error-boundary-ui';
|
|
6
|
-
import { ErrorBoundaryModalOld } from './old';
|
|
7
5
|
|
|
8
6
|
/**
|
|
9
7
|
* ErrorBoundaryModal props are the same as those passed to LinkCreate, which
|
|
10
8
|
* are used to control its active state
|
|
11
9
|
*/
|
|
12
10
|
|
|
13
|
-
const
|
|
11
|
+
export const ErrorBoundaryModal = ({
|
|
14
12
|
active,
|
|
15
13
|
onClose
|
|
16
14
|
}) => {
|
|
@@ -20,10 +18,4 @@ const ErrorBoundaryModalNew = ({
|
|
|
20
18
|
shouldScrollInViewport: true,
|
|
21
19
|
width: `${CREATE_FORM_MAX_WIDTH_IN_PX}px`
|
|
22
20
|
}, /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(ErrorBoundaryUI, null))));
|
|
23
|
-
};
|
|
24
|
-
export const ErrorBoundaryModal = props => {
|
|
25
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
26
|
-
return /*#__PURE__*/React.createElement(ErrorBoundaryModalNew, props);
|
|
27
|
-
}
|
|
28
|
-
return /*#__PURE__*/React.createElement(ErrorBoundaryModalOld, props);
|
|
29
21
|
};
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import ErrorSVGOld from './old';
|
|
7
5
|
const WIDTH = 82;
|
|
8
6
|
const errorStyles = null;
|
|
9
7
|
const id = 'link-create-error-svg';
|
|
10
|
-
const
|
|
8
|
+
const ErrorSVG = () => /*#__PURE__*/React.createElement("svg", {
|
|
11
9
|
height: "90",
|
|
12
10
|
viewBox: "0 0 164 212",
|
|
13
11
|
fill: "none",
|
|
@@ -50,10 +48,4 @@ const ErrorSVGNew = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
50
48
|
stopColor: "#EBECF0",
|
|
51
49
|
stopOpacity: ".6"
|
|
52
50
|
}))));
|
|
53
|
-
const ErrorSVG = () => {
|
|
54
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
55
|
-
return /*#__PURE__*/React.createElement(ErrorSVGNew, null);
|
|
56
|
-
}
|
|
57
|
-
return /*#__PURE__*/React.createElement(ErrorSVGOld, null);
|
|
58
|
-
};
|
|
59
51
|
export default ErrorSVG;
|
|
@@ -5,12 +5,10 @@ import React from 'react';
|
|
|
5
5
|
import { useIntl } from 'react-intl-next';
|
|
6
6
|
import Document16Icon from '@atlaskit/icon-file-type/glyph/document/16';
|
|
7
7
|
import PageLiveDoc16Icon from '@atlaskit/icon-object/glyph/page-live-doc/16';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { N20A } from '@atlaskit/theme/colors';
|
|
10
9
|
import { iconLabelMessages } from './messages';
|
|
11
|
-
import { UrlIconOld } from './old';
|
|
12
10
|
const baseStyles = null;
|
|
13
|
-
const
|
|
11
|
+
export const UrlIcon = ({
|
|
14
12
|
url,
|
|
15
13
|
children
|
|
16
14
|
}) => {
|
|
@@ -21,12 +19,6 @@ const UrlIconNew = ({
|
|
|
21
19
|
className: ax(["_2rko1sit _bfhklbf8 _1lrw1f51 _12vemgnk _4t3ipxbi _1bsbpxbi _1o9zidpf"])
|
|
22
20
|
}, children);
|
|
23
21
|
};
|
|
24
|
-
export const UrlIcon = props => {
|
|
25
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
26
|
-
return /*#__PURE__*/React.createElement(UrlIconNew, props);
|
|
27
|
-
}
|
|
28
|
-
return /*#__PURE__*/React.createElement(UrlIconOld, props);
|
|
29
|
-
};
|
|
30
22
|
export const PageIcon = () => {
|
|
31
23
|
const intl = useIntl();
|
|
32
24
|
return /*#__PURE__*/React.createElement(Document16Icon, {
|
|
@@ -5,9 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import { cx } from '@atlaskit/css';
|
|
6
6
|
import SuccessIcon from '@atlaskit/icon/utility/check-circle';
|
|
7
7
|
import ErrorIcon from '@atlaskit/icon/utility/error';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
10
|
-
import { MessageOld } from './old';
|
|
11
9
|
const styles = {
|
|
12
10
|
message: "_zulp1b66 _11c8qk37 _1e0c1txw _1bah1q9y _1pfh1b66"
|
|
13
11
|
};
|
|
@@ -34,7 +32,7 @@ const messageIcons = {
|
|
|
34
32
|
label: "success"
|
|
35
33
|
})
|
|
36
34
|
};
|
|
37
|
-
const
|
|
35
|
+
export const Message = ({
|
|
38
36
|
children,
|
|
39
37
|
appearance = 'default',
|
|
40
38
|
id,
|
|
@@ -56,10 +54,4 @@ const MessageNew = ({
|
|
|
56
54
|
testId: testId,
|
|
57
55
|
id: id
|
|
58
56
|
}, icon && /*#__PURE__*/React.createElement(IconWrapper, null, icon), content);
|
|
59
|
-
};
|
|
60
|
-
export const Message = props => {
|
|
61
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
62
|
-
return /*#__PURE__*/React.createElement(MessageNew, props);
|
|
63
|
-
}
|
|
64
|
-
return /*#__PURE__*/React.createElement(MessageOld, props);
|
|
65
57
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import { Stack } from '@atlaskit/primitives/compiled';
|
|
4
3
|
import { ErrorBoundary } from '../../../common/ui/error-boundary';
|
|
5
|
-
import { ModalHeroOld } from './old';
|
|
6
4
|
const ErrorComponent = () => {
|
|
7
5
|
// when there's an error, render nothing but report the issue
|
|
8
6
|
return /*#__PURE__*/React.createElement(Fragment, null, null);
|
|
9
7
|
};
|
|
10
|
-
const
|
|
8
|
+
export const ModalHero = ({
|
|
11
9
|
hero
|
|
12
10
|
}) => {
|
|
13
11
|
if (!hero) {
|
|
@@ -18,10 +16,4 @@ const ModalHeroNew = ({
|
|
|
18
16
|
}, /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
19
17
|
errorComponent: /*#__PURE__*/React.createElement(ErrorComponent, null)
|
|
20
18
|
}, hero));
|
|
21
|
-
};
|
|
22
|
-
export const ModalHero = props => {
|
|
23
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
24
|
-
return /*#__PURE__*/React.createElement(ModalHeroNew, props);
|
|
25
|
-
}
|
|
26
|
-
return /*#__PURE__*/React.createElement(ModalHeroOld, props);
|
|
27
19
|
};
|
|
@@ -4,12 +4,10 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { Field } from 'react-final-form';
|
|
6
6
|
import { Label, RequiredAsterisk } from '@atlaskit/form';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { Message } from '../../common/ui/message';
|
|
9
8
|
import { shouldShowValidationErrors } from '../../common/utils/form';
|
|
10
|
-
import { CreateFieldOld } from './old/main';
|
|
11
9
|
const fieldWrapperStyles = null;
|
|
12
|
-
const
|
|
10
|
+
export const CreateField = ({
|
|
13
11
|
id,
|
|
14
12
|
name,
|
|
15
13
|
label,
|
|
@@ -68,10 +66,4 @@ const CreateFieldNew = ({
|
|
|
68
66
|
testId: `${testId}-error-message`
|
|
69
67
|
}, submitError || error))));
|
|
70
68
|
});
|
|
71
|
-
};
|
|
72
|
-
export const CreateField = props => {
|
|
73
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
74
|
-
return /*#__PURE__*/React.createElement(CreateFieldNew, props);
|
|
75
|
-
}
|
|
76
|
-
return /*#__PURE__*/React.createElement(CreateFieldOld, props);
|
|
77
69
|
};
|
|
@@ -3,13 +3,11 @@ import React, { useEffect, useMemo, useState } from 'react';
|
|
|
3
3
|
import debounce from 'debounce-promise';
|
|
4
4
|
import { useForm } from 'react-final-form';
|
|
5
5
|
import { useIntl } from 'react-intl-next';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { AsyncSelect as AkAsyncSelect } from '@atlaskit/select';
|
|
8
7
|
import messages from '../../../common/messages';
|
|
9
8
|
import { useLinkCreateCallback } from '../../../controllers/callback-context';
|
|
10
9
|
import { CreateField } from '../../../controllers/create-field';
|
|
11
10
|
import { useFormContext } from '../../../controllers/form-context';
|
|
12
|
-
import { AsyncSelectOld } from './old/main';
|
|
13
11
|
export const TEST_ID = 'link-create-async-select';
|
|
14
12
|
|
|
15
13
|
/**
|
|
@@ -18,7 +16,7 @@ export const TEST_ID = 'link-create-async-select';
|
|
|
18
16
|
* errors returned by the handleSubmit function passed to the form <Form> that
|
|
19
17
|
* have a key matching the `name` of this field are shown below the field.
|
|
20
18
|
*/
|
|
21
|
-
function
|
|
19
|
+
export function AsyncSelect({
|
|
22
20
|
id,
|
|
23
21
|
name,
|
|
24
22
|
label,
|
|
@@ -128,10 +126,4 @@ function AsyncSelectNew({
|
|
|
128
126
|
isLoading: isLoadingDefaultOptions
|
|
129
127
|
}));
|
|
130
128
|
});
|
|
131
|
-
}
|
|
132
|
-
export function AsyncSelect(props) {
|
|
133
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
134
|
-
return /*#__PURE__*/React.createElement(AsyncSelectNew, props);
|
|
135
|
-
}
|
|
136
|
-
return /*#__PURE__*/React.createElement(AsyncSelectOld, props);
|
|
137
129
|
}
|
|
@@ -5,11 +5,9 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import { useIntl } from 'react-intl-next';
|
|
6
6
|
import { ButtonGroup } from '@atlaskit/button';
|
|
7
7
|
import ErrorIcon from '@atlaskit/icon/core/migration/error';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { Button } from '../../../common/ui/Button';
|
|
10
9
|
import { EditButton } from './edit-button';
|
|
11
10
|
import { messages } from './messages';
|
|
12
|
-
import { CreateFormFooterOld } from './old/main';
|
|
13
11
|
import { SubmitButton } from './submit-button';
|
|
14
12
|
const formFooterWrapperStyles = null;
|
|
15
13
|
const errorStyles = null;
|
|
@@ -18,7 +16,7 @@ const errorStyles = null;
|
|
|
18
16
|
* and form error messages. This component is unmounted if
|
|
19
17
|
* hideFooter is true in the Create Form.
|
|
20
18
|
*/
|
|
21
|
-
const
|
|
19
|
+
export const CreateFormFooter = ({
|
|
22
20
|
formErrorMessage,
|
|
23
21
|
handleCancel,
|
|
24
22
|
testId
|
|
@@ -45,10 +43,4 @@ const CreateFormFooterNew = ({
|
|
|
45
43
|
},
|
|
46
44
|
testId: `${testId}-button-cancel`
|
|
47
45
|
}, intl.formatMessage(messages.close)), /*#__PURE__*/React.createElement(EditButton, null), /*#__PURE__*/React.createElement(SubmitButton, null)));
|
|
48
|
-
};
|
|
49
|
-
export const CreateFormFooter = props => {
|
|
50
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
51
|
-
return /*#__PURE__*/React.createElement(CreateFormFooterNew, props);
|
|
52
|
-
}
|
|
53
|
-
return /*#__PURE__*/React.createElement(CreateFormFooterOld, props);
|
|
54
46
|
};
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
import "./main.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import Spinner from '@atlaskit/spinner';
|
|
7
|
-
import { CreateFormLoaderOld } from './old/main';
|
|
8
6
|
const formLoaderStyles = null;
|
|
9
7
|
|
|
10
8
|
/**
|
|
11
9
|
* Wrapper component for the Spinner, shows while the form
|
|
12
10
|
* performs async functions on load.
|
|
13
11
|
*/
|
|
14
|
-
const
|
|
12
|
+
export const CreateFormLoader = ({
|
|
15
13
|
size = 'large'
|
|
16
14
|
}) => {
|
|
17
15
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -21,10 +19,4 @@ const CreateFormLoaderNew = ({
|
|
|
21
19
|
interactionName: "load",
|
|
22
20
|
testId: "link-create-form-loader"
|
|
23
21
|
}));
|
|
24
|
-
};
|
|
25
|
-
export const CreateFormLoader = props => {
|
|
26
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
27
|
-
return /*#__PURE__*/React.createElement(CreateFormLoaderNew, props);
|
|
28
|
-
}
|
|
29
|
-
return /*#__PURE__*/React.createElement(CreateFormLoaderOld, props);
|
|
30
22
|
};
|
|
@@ -7,7 +7,6 @@ import { FORM_ERROR } from 'final-form';
|
|
|
7
7
|
import { Form, FormSpy } from 'react-final-form';
|
|
8
8
|
import { useIntl } from 'react-intl-next';
|
|
9
9
|
import { RequiredAsterisk } from '@atlaskit/form';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
12
11
|
import { LINK_CREATE_FORM_POST_CREATE_FIELD } from '../../common/constants';
|
|
13
12
|
import messages from '../../common/messages';
|
|
@@ -16,11 +15,10 @@ import { useExitWarningModal } from '../../controllers/exit-warning-modal-contex
|
|
|
16
15
|
import { useFormContext } from '../../controllers/form-context';
|
|
17
16
|
import { CreateFormFooter } from './form-footer';
|
|
18
17
|
import { CreateFormLoader } from './form-loader';
|
|
19
|
-
import { CreateFormOld } from './old/main';
|
|
20
18
|
const formStyles = null;
|
|
21
19
|
const RESERVED_FIELDS = [LINK_CREATE_FORM_POST_CREATE_FIELD];
|
|
22
20
|
export const TEST_ID = 'link-create-form';
|
|
23
|
-
const
|
|
21
|
+
export const CreateForm = ({
|
|
24
22
|
children,
|
|
25
23
|
testId = TEST_ID,
|
|
26
24
|
onSubmit,
|
|
@@ -135,10 +133,4 @@ const CreateFormNew = ({
|
|
|
135
133
|
testId: testId
|
|
136
134
|
}));
|
|
137
135
|
});
|
|
138
|
-
};
|
|
139
|
-
export const CreateForm = props => {
|
|
140
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
141
|
-
return /*#__PURE__*/React.createElement(CreateFormNew, props);
|
|
142
|
-
}
|
|
143
|
-
return /*#__PURE__*/React.createElement(CreateFormOld, props);
|
|
144
136
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl-next';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { Inline } from '@atlaskit/primitives/compiled';
|
|
6
5
|
import AkSelect, { components } from '@atlaskit/select';
|
|
7
6
|
import { layers } from '@atlaskit/theme/constants';
|
|
8
7
|
import { UrlIcon } from '../../../common/ui/icon';
|
|
9
8
|
import { CreateField } from '../../../controllers/create-field';
|
|
10
9
|
import { messages } from './messages';
|
|
11
|
-
import { SelectOld, SitePickerOptionOld, SitePickerSingleValueOld, SiteSelectOld } from './old/main';
|
|
12
10
|
export const TEST_ID = 'link-create-select';
|
|
13
11
|
|
|
14
12
|
/**
|
|
@@ -17,7 +15,7 @@ export const TEST_ID = 'link-create-select';
|
|
|
17
15
|
* errors returned by the handleSubmit function passed to the form <Form> that
|
|
18
16
|
* have a key matching the `name` of this field are shown below the field.
|
|
19
17
|
*/
|
|
20
|
-
function
|
|
18
|
+
export function Select({
|
|
21
19
|
id,
|
|
22
20
|
name,
|
|
23
21
|
label,
|
|
@@ -46,28 +44,22 @@ function SelectNew({
|
|
|
46
44
|
}, fieldProps, restProps));
|
|
47
45
|
});
|
|
48
46
|
}
|
|
49
|
-
export
|
|
50
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
51
|
-
return /*#__PURE__*/React.createElement(SelectNew, props);
|
|
52
|
-
}
|
|
53
|
-
return /*#__PURE__*/React.createElement(SelectOld, props);
|
|
54
|
-
}
|
|
55
|
-
const SiteSelectNew = ({
|
|
47
|
+
export const SiteSelect = ({
|
|
56
48
|
options,
|
|
57
49
|
name,
|
|
58
50
|
testId
|
|
59
51
|
}) => {
|
|
60
52
|
const intl = useIntl();
|
|
61
53
|
const siteTestId = testId ? testId : 'link-create-site-picker';
|
|
62
|
-
return /*#__PURE__*/React.createElement(
|
|
54
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
63
55
|
isRequired: true,
|
|
64
56
|
isSearchable: true,
|
|
65
57
|
name: name !== null && name !== void 0 ? name : 'site',
|
|
66
58
|
options: options,
|
|
67
59
|
label: intl.formatMessage(messages.siteLabel),
|
|
68
60
|
components: {
|
|
69
|
-
Option:
|
|
70
|
-
SingleValue:
|
|
61
|
+
Option: SitePickerOption,
|
|
62
|
+
SingleValue: SitePickerSingleValue
|
|
71
63
|
},
|
|
72
64
|
testId: siteTestId,
|
|
73
65
|
styles: {
|
|
@@ -84,12 +76,6 @@ const SiteSelectNew = ({
|
|
|
84
76
|
}
|
|
85
77
|
});
|
|
86
78
|
};
|
|
87
|
-
export const SiteSelect = props => {
|
|
88
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
89
|
-
return /*#__PURE__*/React.createElement(SiteSelectNew, props);
|
|
90
|
-
}
|
|
91
|
-
return /*#__PURE__*/React.createElement(SiteSelectOld, props);
|
|
92
|
-
};
|
|
93
79
|
const SiteRow = ({
|
|
94
80
|
avatarUrl,
|
|
95
81
|
children
|
|
@@ -99,27 +85,15 @@ const SiteRow = ({
|
|
|
99
85
|
}, avatarUrl ? /*#__PURE__*/React.createElement(UrlIcon, {
|
|
100
86
|
url: avatarUrl
|
|
101
87
|
}) : null, children);
|
|
102
|
-
const
|
|
88
|
+
export const SitePickerOption = ({
|
|
103
89
|
children,
|
|
104
90
|
...props
|
|
105
91
|
}) => /*#__PURE__*/React.createElement(components.Option, props, /*#__PURE__*/React.createElement(SiteRow, {
|
|
106
92
|
avatarUrl: props.data.value.avatarUrl
|
|
107
93
|
}, children));
|
|
108
|
-
export const
|
|
109
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
110
|
-
return /*#__PURE__*/React.createElement(SitePickerOptionNew, props);
|
|
111
|
-
}
|
|
112
|
-
return /*#__PURE__*/React.createElement(SitePickerOptionOld, props);
|
|
113
|
-
};
|
|
114
|
-
const SitePickerSingleValueNew = ({
|
|
94
|
+
export const SitePickerSingleValue = ({
|
|
115
95
|
children,
|
|
116
96
|
...props
|
|
117
97
|
}) => /*#__PURE__*/React.createElement(components.SingleValue, props, /*#__PURE__*/React.createElement(SiteRow, {
|
|
118
98
|
avatarUrl: props.data.value.avatarUrl
|
|
119
|
-
}, children));
|
|
120
|
-
export const SitePickerSingleValue = props => {
|
|
121
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
122
|
-
return /*#__PURE__*/React.createElement(SitePickerSingleValueNew, props);
|
|
123
|
-
}
|
|
124
|
-
return /*#__PURE__*/React.createElement(SitePickerSingleValueOld, props);
|
|
125
|
-
};
|
|
99
|
+
}, children));
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import AkTextfield from '@atlaskit/textfield';
|
|
5
4
|
import { CreateField } from '../../../controllers/create-field';
|
|
6
|
-
import { TextFieldOld } from './old/main';
|
|
7
5
|
export const TEST_ID = 'link-create-text-field';
|
|
8
6
|
|
|
9
7
|
/**
|
|
@@ -12,7 +10,7 @@ export const TEST_ID = 'link-create-text-field';
|
|
|
12
10
|
* the handleSubmit function passed to the form <Form> that have a key matching the `name`
|
|
13
11
|
* of this text field are shown above the field.
|
|
14
12
|
*/
|
|
15
|
-
const
|
|
13
|
+
export const TextField = ({
|
|
16
14
|
id,
|
|
17
15
|
name,
|
|
18
16
|
label,
|
|
@@ -38,10 +36,4 @@ const TextFieldNew = ({
|
|
|
38
36
|
id: fieldId
|
|
39
37
|
}, fieldProps, restProps));
|
|
40
38
|
});
|
|
41
|
-
};
|
|
42
|
-
export const TextField = props => {
|
|
43
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
44
|
-
return /*#__PURE__*/React.createElement(TextFieldNew, props);
|
|
45
|
-
}
|
|
46
|
-
return /*#__PURE__*/React.createElement(TextFieldOld, props);
|
|
47
39
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import SmartUserPicker from '@atlaskit/smart-user-picker';
|
|
4
3
|
import { CreateField } from '../../../controllers/create-field';
|
|
5
|
-
import { UserPickerOld } from './old/main';
|
|
6
4
|
export const TEST_ID = 'link-create-user-picker';
|
|
7
5
|
const DEFAULT_DEBOUNCE_TIME = 400;
|
|
8
6
|
const UserPickerWidth = '100%';
|
|
@@ -10,7 +8,7 @@ const UserPickerWidth = '100%';
|
|
|
10
8
|
/**
|
|
11
9
|
* A user picker utilising the SmartUserPicker.
|
|
12
10
|
*/
|
|
13
|
-
const
|
|
11
|
+
export const UserPicker = ({
|
|
14
12
|
productKey,
|
|
15
13
|
siteId,
|
|
16
14
|
name,
|
|
@@ -51,10 +49,4 @@ const UserPickerNew = ({
|
|
|
51
49
|
required: isRequired
|
|
52
50
|
});
|
|
53
51
|
});
|
|
54
|
-
};
|
|
55
|
-
export const UserPicker = props => {
|
|
56
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
57
|
-
return /*#__PURE__*/React.createElement(UserPickerNew, props);
|
|
58
|
-
}
|
|
59
|
-
return /*#__PURE__*/React.createElement(UserPickerOld, props);
|
|
60
52
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
3
3
|
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { PACKAGE_DATA } from '../../common/constants';
|
|
6
5
|
import { ErrorBoundary } from '../../common/ui/error-boundary';
|
|
7
6
|
import { Experience } from '../../common/ui/experience-tracker';
|
|
@@ -9,11 +8,10 @@ import { withLinkCreateAnalyticsContext } from '../../common/utils/analytics';
|
|
|
9
8
|
import { fetchMessagesForLocale } from '../../common/utils/locale/fetch-messages-for-locale';
|
|
10
9
|
import i18nEN from '../../i18n/en';
|
|
11
10
|
import InlineCreate from './main';
|
|
12
|
-
import ComposedLinkCreateOld from './old';
|
|
13
11
|
const LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__*/memo(props => {
|
|
14
12
|
return /*#__PURE__*/React.createElement(Experience, null, /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(InlineCreate, props)));
|
|
15
13
|
}));
|
|
16
|
-
const
|
|
14
|
+
const ComposedLinkCreate = /*#__PURE__*/memo(props => {
|
|
17
15
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
18
16
|
data: PACKAGE_DATA
|
|
19
17
|
}, /*#__PURE__*/React.createElement(IntlMessagesProvider, {
|
|
@@ -21,10 +19,4 @@ const ComposedLinkCreateNew = /*#__PURE__*/memo(props => {
|
|
|
21
19
|
loaderFn: fetchMessagesForLocale
|
|
22
20
|
}, /*#__PURE__*/React.createElement(LinkCreateWithAnalyticsContext, props)));
|
|
23
21
|
});
|
|
24
|
-
const ComposedLinkCreate = /*#__PURE__*/memo(props => {
|
|
25
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
26
|
-
return /*#__PURE__*/React.createElement(ComposedLinkCreateNew, props);
|
|
27
|
-
}
|
|
28
|
-
return /*#__PURE__*/React.createElement(ComposedLinkCreateOld, props);
|
|
29
|
-
});
|
|
30
22
|
export default ComposedLinkCreate;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
5
4
|
import { DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
|
|
6
5
|
import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
|
|
@@ -13,7 +12,6 @@ import { useExitWarningModal } from '../../controllers/exit-warning-modal-contex
|
|
|
13
12
|
import { FormContextProvider } from '../../controllers/form-context';
|
|
14
13
|
import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../controllers/plugin-context';
|
|
15
14
|
import { InlineAnalytics } from './inline-analytics';
|
|
16
|
-
import InlineCreateOld from './old/main';
|
|
17
15
|
const InlineCreateContent = ({
|
|
18
16
|
onCreate,
|
|
19
17
|
onFailure,
|
|
@@ -56,7 +54,7 @@ const InlineCreateContent = ({
|
|
|
56
54
|
onCancel: onCancel
|
|
57
55
|
}));
|
|
58
56
|
};
|
|
59
|
-
const
|
|
57
|
+
const InlineCreate = props => {
|
|
60
58
|
return /*#__PURE__*/React.createElement(LinkCreatePluginsProvider, {
|
|
61
59
|
plugins: props.plugins,
|
|
62
60
|
entityKey: props.entityKey
|
|
@@ -89,10 +87,4 @@ const InlineCreateNew = props => {
|
|
|
89
87
|
})));
|
|
90
88
|
}));
|
|
91
89
|
};
|
|
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
|
-
};
|
|
98
90
|
export default InlineCreate;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
3
3
|
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { PACKAGE_DATA } from '../../common/constants';
|
|
6
5
|
import { ErrorBoundary } from '../../common/ui/error-boundary';
|
|
7
6
|
import { ErrorBoundaryModal } from '../../common/ui/error-boundary-modal';
|
|
@@ -10,7 +9,6 @@ import { withLinkCreateAnalyticsContext } from '../../common/utils/analytics';
|
|
|
10
9
|
import { fetchMessagesForLocale } from '../../common/utils/locale/fetch-messages-for-locale';
|
|
11
10
|
import i18nEN from '../../i18n/en';
|
|
12
11
|
import LinkCreate from './main';
|
|
13
|
-
import ComposedLinkCreateOld from './old';
|
|
14
12
|
const LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__*/memo(props => {
|
|
15
13
|
return /*#__PURE__*/React.createElement(Experience, null, /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
16
14
|
errorComponent: /*#__PURE__*/React.createElement(ErrorBoundaryModal, {
|
|
@@ -19,7 +17,7 @@ const LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE
|
|
|
19
17
|
})
|
|
20
18
|
}, /*#__PURE__*/React.createElement(LinkCreate, props)));
|
|
21
19
|
}));
|
|
22
|
-
const
|
|
20
|
+
const ComposedLinkCreate = /*#__PURE__*/memo(props => {
|
|
23
21
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
24
22
|
data: PACKAGE_DATA
|
|
25
23
|
}, /*#__PURE__*/React.createElement(IntlMessagesProvider, {
|
|
@@ -27,10 +25,4 @@ const ComposedLinkCreateNew = /*#__PURE__*/memo(props => {
|
|
|
27
25
|
loaderFn: fetchMessagesForLocale
|
|
28
26
|
}, /*#__PURE__*/React.createElement(LinkCreateWithAnalyticsContext, props)));
|
|
29
27
|
});
|
|
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);
|
|
35
|
-
});
|
|
36
28
|
export default ComposedLinkCreate;
|
|
@@ -3,7 +3,6 @@ import React, { useLayoutEffect, useRef } from 'react';
|
|
|
3
3
|
import { useIntl } from 'react-intl-next';
|
|
4
4
|
import { Layering } from '@atlaskit/layering';
|
|
5
5
|
import { ModalBody, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
7
|
import { CREATE_FORM_MAX_WIDTH_IN_PX, DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
|
|
9
8
|
import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
|
|
@@ -18,7 +17,6 @@ import { ExitWarningModalProvider, useExitWarningModal } from '../../controllers
|
|
|
18
17
|
import { FormContextProvider } from '../../controllers/form-context';
|
|
19
18
|
import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../controllers/plugin-context';
|
|
20
19
|
import { messages } from './messages';
|
|
21
|
-
import LinkCreateModalOld from './old/main';
|
|
22
20
|
const LinkCreateWithModal = ({
|
|
23
21
|
active,
|
|
24
22
|
modalTitle,
|
|
@@ -78,7 +76,7 @@ const LinkCreateWithModal = ({
|
|
|
78
76
|
onCancel: onCancel
|
|
79
77
|
})));
|
|
80
78
|
};
|
|
81
|
-
const
|
|
79
|
+
const LinkCreateModal = props => {
|
|
82
80
|
const shouldCallCloseComplete = useRef(!props.active);
|
|
83
81
|
|
|
84
82
|
// modal calls onCloseComplete in a useEffect(), so we can track whether
|
|
@@ -128,10 +126,4 @@ const LinkCreateModalNew = props => {
|
|
|
128
126
|
}))));
|
|
129
127
|
}));
|
|
130
128
|
};
|
|
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
|
-
};
|
|
137
129
|
export default LinkCreateModal;
|
|
@@ -10,7 +10,7 @@ export var CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
|
|
|
10
10
|
export var LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
|
|
11
11
|
export var PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/link-create" || '',
|
|
13
|
-
packageVersion: "
|
|
13
|
+
packageVersion: "4.0.0" || '',
|
|
14
14
|
component: COMPONENT_NAME,
|
|
15
15
|
componentName: COMPONENT_NAME
|
|
16
16
|
};
|