@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
|
@@ -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
|
-
var
|
|
11
|
+
export var ErrorBoundaryModal = function ErrorBoundaryModal(_ref) {
|
|
14
12
|
var active = _ref.active,
|
|
15
13
|
onClose = _ref.onClose;
|
|
16
14
|
return /*#__PURE__*/React.createElement(ModalTransition, null, active && /*#__PURE__*/React.createElement(Modal, {
|
|
@@ -19,10 +17,4 @@ var ErrorBoundaryModalNew = function ErrorBoundaryModalNew(_ref) {
|
|
|
19
17
|
shouldScrollInViewport: true,
|
|
20
18
|
width: "".concat(CREATE_FORM_MAX_WIDTH_IN_PX, "px")
|
|
21
19
|
}, /*#__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);
|
|
28
20
|
};
|
|
@@ -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
|
var WIDTH = 82;
|
|
8
6
|
var errorStyles = null;
|
|
9
7
|
var id = 'link-create-error-svg';
|
|
10
|
-
var
|
|
8
|
+
var ErrorSVG = function ErrorSVG() {
|
|
11
9
|
return /*#__PURE__*/React.createElement("svg", {
|
|
12
10
|
height: "90",
|
|
13
11
|
viewBox: "0 0 164 212",
|
|
@@ -55,10 +53,4 @@ var ErrorSVGNew = function ErrorSVGNew() {
|
|
|
55
53
|
stopOpacity: ".6"
|
|
56
54
|
}))));
|
|
57
55
|
};
|
|
58
|
-
var ErrorSVG = function ErrorSVG() {
|
|
59
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
60
|
-
return /*#__PURE__*/React.createElement(ErrorSVGNew, null);
|
|
61
|
-
}
|
|
62
|
-
return /*#__PURE__*/React.createElement(ErrorSVGOld, null);
|
|
63
|
-
};
|
|
64
56
|
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
|
var baseStyles = null;
|
|
13
|
-
var
|
|
11
|
+
export var UrlIcon = function UrlIcon(_ref) {
|
|
14
12
|
var url = _ref.url,
|
|
15
13
|
children = _ref.children;
|
|
16
14
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -21,12 +19,6 @@ var UrlIconNew = function UrlIconNew(_ref) {
|
|
|
21
19
|
}
|
|
22
20
|
}, children);
|
|
23
21
|
};
|
|
24
|
-
export var UrlIcon = function 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 var PageIcon = function PageIcon() {
|
|
31
23
|
var 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
|
var styles = {
|
|
12
10
|
message: "_zulp1b66 _11c8qk37 _1e0c1txw _1bah1q9y _1pfh1b66"
|
|
13
11
|
};
|
|
@@ -33,7 +31,7 @@ var messageIcons = {
|
|
|
33
31
|
label: "success"
|
|
34
32
|
})
|
|
35
33
|
};
|
|
36
|
-
var
|
|
34
|
+
export var Message = function Message(_ref2) {
|
|
37
35
|
var children = _ref2.children,
|
|
38
36
|
_ref2$appearance = _ref2.appearance,
|
|
39
37
|
appearance = _ref2$appearance === void 0 ? 'default' : _ref2$appearance,
|
|
@@ -55,10 +53,4 @@ var MessageNew = function MessageNew(_ref2) {
|
|
|
55
53
|
testId: testId,
|
|
56
54
|
id: id
|
|
57
55
|
}, icon && /*#__PURE__*/React.createElement(IconWrapper, null, icon), content);
|
|
58
|
-
};
|
|
59
|
-
export var Message = function Message(props) {
|
|
60
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
61
|
-
return /*#__PURE__*/React.createElement(MessageNew, props);
|
|
62
|
-
}
|
|
63
|
-
return /*#__PURE__*/React.createElement(MessageOld, props);
|
|
64
56
|
};
|
|
@@ -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
|
var ErrorComponent = function 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
|
-
var
|
|
8
|
+
export var ModalHero = function ModalHero(_ref) {
|
|
11
9
|
var hero = _ref.hero;
|
|
12
10
|
if (!hero) {
|
|
13
11
|
return null;
|
|
@@ -17,10 +15,4 @@ var ModalHeroNew = function ModalHeroNew(_ref) {
|
|
|
17
15
|
}, /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
18
16
|
errorComponent: /*#__PURE__*/React.createElement(ErrorComponent, null)
|
|
19
17
|
}, hero));
|
|
20
|
-
};
|
|
21
|
-
export var ModalHero = function ModalHero(props) {
|
|
22
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
23
|
-
return /*#__PURE__*/React.createElement(ModalHeroNew, props);
|
|
24
|
-
}
|
|
25
|
-
return /*#__PURE__*/React.createElement(ModalHeroOld, props);
|
|
26
18
|
};
|
|
@@ -7,12 +7,10 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { Field } from 'react-final-form';
|
|
9
9
|
import { Label, RequiredAsterisk } from '@atlaskit/form';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
import { Message } from '../../common/ui/message';
|
|
12
11
|
import { shouldShowValidationErrors } from '../../common/utils/form';
|
|
13
|
-
import { CreateFieldOld } from './old/main';
|
|
14
12
|
var fieldWrapperStyles = null;
|
|
15
|
-
var
|
|
13
|
+
export var CreateField = function CreateField(_ref) {
|
|
16
14
|
var id = _ref.id,
|
|
17
15
|
name = _ref.name,
|
|
18
16
|
label = _ref.label,
|
|
@@ -66,10 +64,4 @@ var CreateFieldNew = function CreateFieldNew(_ref) {
|
|
|
66
64
|
testId: "".concat(testId, "-error-message")
|
|
67
65
|
}, submitError || error))));
|
|
68
66
|
});
|
|
69
|
-
};
|
|
70
|
-
export var CreateField = function CreateField(props) {
|
|
71
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
72
|
-
return /*#__PURE__*/React.createElement(CreateFieldNew, props);
|
|
73
|
-
}
|
|
74
|
-
return /*#__PURE__*/React.createElement(CreateFieldOld, props);
|
|
75
67
|
};
|
|
@@ -9,13 +9,11 @@ import React, { useEffect, useMemo, useState } from 'react';
|
|
|
9
9
|
import debounce from 'debounce-promise';
|
|
10
10
|
import { useForm } from 'react-final-form';
|
|
11
11
|
import { useIntl } from 'react-intl-next';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import { AsyncSelect as AkAsyncSelect } from '@atlaskit/select';
|
|
14
13
|
import messages from '../../../common/messages';
|
|
15
14
|
import { useLinkCreateCallback } from '../../../controllers/callback-context';
|
|
16
15
|
import { CreateField } from '../../../controllers/create-field';
|
|
17
16
|
import { useFormContext } from '../../../controllers/form-context';
|
|
18
|
-
import { AsyncSelectOld } from './old/main';
|
|
19
17
|
export var TEST_ID = 'link-create-async-select';
|
|
20
18
|
|
|
21
19
|
/**
|
|
@@ -24,7 +22,7 @@ export var TEST_ID = 'link-create-async-select';
|
|
|
24
22
|
* errors returned by the handleSubmit function passed to the form <Form> that
|
|
25
23
|
* have a key matching the `name` of this field are shown below the field.
|
|
26
24
|
*/
|
|
27
|
-
function
|
|
25
|
+
export function AsyncSelect(_ref) {
|
|
28
26
|
var id = _ref.id,
|
|
29
27
|
name = _ref.name,
|
|
30
28
|
label = _ref.label,
|
|
@@ -179,10 +177,4 @@ function AsyncSelectNew(_ref) {
|
|
|
179
177
|
isLoading: isLoadingDefaultOptions
|
|
180
178
|
}));
|
|
181
179
|
});
|
|
182
|
-
}
|
|
183
|
-
export function AsyncSelect(props) {
|
|
184
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
185
|
-
return /*#__PURE__*/React.createElement(AsyncSelectNew, props);
|
|
186
|
-
}
|
|
187
|
-
return /*#__PURE__*/React.createElement(AsyncSelectOld, props);
|
|
188
180
|
}
|
|
@@ -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
|
var formFooterWrapperStyles = null;
|
|
15
13
|
var errorStyles = null;
|
|
@@ -18,7 +16,7 @@ var 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
|
-
var
|
|
19
|
+
export var CreateFormFooter = function CreateFormFooter(_ref) {
|
|
22
20
|
var formErrorMessage = _ref.formErrorMessage,
|
|
23
21
|
handleCancel = _ref.handleCancel,
|
|
24
22
|
testId = _ref.testId;
|
|
@@ -44,10 +42,4 @@ var CreateFormFooterNew = function CreateFormFooterNew(_ref) {
|
|
|
44
42
|
},
|
|
45
43
|
testId: "".concat(testId, "-button-cancel")
|
|
46
44
|
}, intl.formatMessage(messages.close)), /*#__PURE__*/React.createElement(EditButton, null), /*#__PURE__*/React.createElement(SubmitButton, null)));
|
|
47
|
-
};
|
|
48
|
-
export var CreateFormFooter = function CreateFormFooter(props) {
|
|
49
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
50
|
-
return /*#__PURE__*/React.createElement(CreateFormFooterNew, props);
|
|
51
|
-
}
|
|
52
|
-
return /*#__PURE__*/React.createElement(CreateFormFooterOld, props);
|
|
53
45
|
};
|
|
@@ -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
|
var 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
|
-
var
|
|
12
|
+
export var CreateFormLoader = function CreateFormLoader(_ref) {
|
|
15
13
|
var _ref$size = _ref.size,
|
|
16
14
|
size = _ref$size === void 0 ? 'large' : _ref$size;
|
|
17
15
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -21,10 +19,4 @@ var CreateFormLoaderNew = function CreateFormLoaderNew(_ref) {
|
|
|
21
19
|
interactionName: "load",
|
|
22
20
|
testId: "link-create-form-loader"
|
|
23
21
|
}));
|
|
24
|
-
};
|
|
25
|
-
export var CreateFormLoader = function 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
|
};
|
|
@@ -15,7 +15,6 @@ import { FORM_ERROR } from 'final-form';
|
|
|
15
15
|
import { Form, FormSpy } from 'react-final-form';
|
|
16
16
|
import { useIntl } from 'react-intl-next';
|
|
17
17
|
import { RequiredAsterisk } from '@atlaskit/form';
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
18
|
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
20
19
|
import { LINK_CREATE_FORM_POST_CREATE_FIELD } from '../../common/constants';
|
|
21
20
|
import messages from '../../common/messages';
|
|
@@ -24,11 +23,10 @@ import { useExitWarningModal } from '../../controllers/exit-warning-modal-contex
|
|
|
24
23
|
import { useFormContext } from '../../controllers/form-context';
|
|
25
24
|
import { CreateFormFooter } from './form-footer';
|
|
26
25
|
import { CreateFormLoader } from './form-loader';
|
|
27
|
-
import { CreateFormOld } from './old/main';
|
|
28
26
|
var formStyles = null;
|
|
29
27
|
var RESERVED_FIELDS = [LINK_CREATE_FORM_POST_CREATE_FIELD];
|
|
30
28
|
export var TEST_ID = 'link-create-form';
|
|
31
|
-
var
|
|
29
|
+
export var CreateForm = function CreateForm(_ref) {
|
|
32
30
|
var children = _ref.children,
|
|
33
31
|
_ref$testId = _ref.testId,
|
|
34
32
|
testId = _ref$testId === void 0 ? TEST_ID : _ref$testId,
|
|
@@ -164,10 +162,4 @@ var CreateFormNew = function CreateFormNew(_ref) {
|
|
|
164
162
|
testId: testId
|
|
165
163
|
}));
|
|
166
164
|
});
|
|
167
|
-
};
|
|
168
|
-
export var CreateForm = function CreateForm(props) {
|
|
169
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
170
|
-
return /*#__PURE__*/React.createElement(CreateFormNew, props);
|
|
171
|
-
}
|
|
172
|
-
return /*#__PURE__*/React.createElement(CreateFormOld, props);
|
|
173
165
|
};
|
|
@@ -9,14 +9,12 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
9
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { useIntl } from 'react-intl-next';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import { Inline } from '@atlaskit/primitives/compiled';
|
|
14
13
|
import AkSelect, { components } from '@atlaskit/select';
|
|
15
14
|
import { layers } from '@atlaskit/theme/constants';
|
|
16
15
|
import { UrlIcon } from '../../../common/ui/icon';
|
|
17
16
|
import { CreateField } from '../../../controllers/create-field';
|
|
18
17
|
import { messages } from './messages';
|
|
19
|
-
import { SelectOld, SitePickerOptionOld, SitePickerSingleValueOld, SiteSelectOld } from './old/main';
|
|
20
18
|
export var TEST_ID = 'link-create-select';
|
|
21
19
|
|
|
22
20
|
/**
|
|
@@ -25,7 +23,7 @@ export var TEST_ID = 'link-create-select';
|
|
|
25
23
|
* errors returned by the handleSubmit function passed to the form <Form> that
|
|
26
24
|
* have a key matching the `name` of this field are shown below the field.
|
|
27
25
|
*/
|
|
28
|
-
function
|
|
26
|
+
export function Select(_ref) {
|
|
29
27
|
var id = _ref.id,
|
|
30
28
|
name = _ref.name,
|
|
31
29
|
label = _ref.label,
|
|
@@ -53,27 +51,21 @@ function SelectNew(_ref) {
|
|
|
53
51
|
}, fieldProps, restProps));
|
|
54
52
|
});
|
|
55
53
|
}
|
|
56
|
-
export function
|
|
57
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
58
|
-
return /*#__PURE__*/React.createElement(SelectNew, props);
|
|
59
|
-
}
|
|
60
|
-
return /*#__PURE__*/React.createElement(SelectOld, props);
|
|
61
|
-
}
|
|
62
|
-
var SiteSelectNew = function SiteSelectNew(_ref3) {
|
|
54
|
+
export var SiteSelect = function SiteSelect(_ref3) {
|
|
63
55
|
var options = _ref3.options,
|
|
64
56
|
name = _ref3.name,
|
|
65
57
|
testId = _ref3.testId;
|
|
66
58
|
var intl = useIntl();
|
|
67
59
|
var siteTestId = testId ? testId : 'link-create-site-picker';
|
|
68
|
-
return /*#__PURE__*/React.createElement(
|
|
60
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
69
61
|
isRequired: true,
|
|
70
62
|
isSearchable: true,
|
|
71
63
|
name: name !== null && name !== void 0 ? name : 'site',
|
|
72
64
|
options: options,
|
|
73
65
|
label: intl.formatMessage(messages.siteLabel),
|
|
74
66
|
components: {
|
|
75
|
-
Option:
|
|
76
|
-
SingleValue:
|
|
67
|
+
Option: SitePickerOption,
|
|
68
|
+
SingleValue: SitePickerSingleValue
|
|
77
69
|
},
|
|
78
70
|
testId: siteTestId,
|
|
79
71
|
styles: {
|
|
@@ -92,12 +84,6 @@ var SiteSelectNew = function SiteSelectNew(_ref3) {
|
|
|
92
84
|
}
|
|
93
85
|
});
|
|
94
86
|
};
|
|
95
|
-
export var SiteSelect = function SiteSelect(props) {
|
|
96
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
97
|
-
return /*#__PURE__*/React.createElement(SiteSelectNew, props);
|
|
98
|
-
}
|
|
99
|
-
return /*#__PURE__*/React.createElement(SiteSelectOld, props);
|
|
100
|
-
};
|
|
101
87
|
var SiteRow = function SiteRow(_ref4) {
|
|
102
88
|
var avatarUrl = _ref4.avatarUrl,
|
|
103
89
|
children = _ref4.children;
|
|
@@ -108,29 +94,17 @@ var SiteRow = function SiteRow(_ref4) {
|
|
|
108
94
|
url: avatarUrl
|
|
109
95
|
}) : null, children);
|
|
110
96
|
};
|
|
111
|
-
var
|
|
97
|
+
export var SitePickerOption = function SitePickerOption(_ref5) {
|
|
112
98
|
var children = _ref5.children,
|
|
113
99
|
props = _objectWithoutProperties(_ref5, _excluded3);
|
|
114
100
|
return /*#__PURE__*/React.createElement(components.Option, props, /*#__PURE__*/React.createElement(SiteRow, {
|
|
115
101
|
avatarUrl: props.data.value.avatarUrl
|
|
116
102
|
}, children));
|
|
117
103
|
};
|
|
118
|
-
export var
|
|
119
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
120
|
-
return /*#__PURE__*/React.createElement(SitePickerOptionNew, props);
|
|
121
|
-
}
|
|
122
|
-
return /*#__PURE__*/React.createElement(SitePickerOptionOld, props);
|
|
123
|
-
};
|
|
124
|
-
var SitePickerSingleValueNew = function SitePickerSingleValueNew(_ref6) {
|
|
104
|
+
export var SitePickerSingleValue = function SitePickerSingleValue(_ref6) {
|
|
125
105
|
var children = _ref6.children,
|
|
126
106
|
props = _objectWithoutProperties(_ref6, _excluded4);
|
|
127
107
|
return /*#__PURE__*/React.createElement(components.SingleValue, props, /*#__PURE__*/React.createElement(SiteRow, {
|
|
128
108
|
avatarUrl: props.data.value.avatarUrl
|
|
129
109
|
}, children));
|
|
130
|
-
};
|
|
131
|
-
export var SitePickerSingleValue = function SitePickerSingleValue(props) {
|
|
132
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
133
|
-
return /*#__PURE__*/React.createElement(SitePickerSingleValueNew, props);
|
|
134
|
-
}
|
|
135
|
-
return /*#__PURE__*/React.createElement(SitePickerSingleValueOld, props);
|
|
136
110
|
};
|
|
@@ -3,10 +3,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["id", "name", "label", "isRequired", "validators", "validationHelpText", "testId"],
|
|
4
4
|
_excluded2 = ["fieldId"];
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import AkTextfield from '@atlaskit/textfield';
|
|
8
7
|
import { CreateField } from '../../../controllers/create-field';
|
|
9
|
-
import { TextFieldOld } from './old/main';
|
|
10
8
|
export var TEST_ID = 'link-create-text-field';
|
|
11
9
|
|
|
12
10
|
/**
|
|
@@ -15,7 +13,7 @@ export var TEST_ID = 'link-create-text-field';
|
|
|
15
13
|
* the handleSubmit function passed to the form <Form> that have a key matching the `name`
|
|
16
14
|
* of this text field are shown above the field.
|
|
17
15
|
*/
|
|
18
|
-
var
|
|
16
|
+
export var TextField = function TextField(_ref) {
|
|
19
17
|
var id = _ref.id,
|
|
20
18
|
name = _ref.name,
|
|
21
19
|
label = _ref.label,
|
|
@@ -40,10 +38,4 @@ var TextFieldNew = function TextFieldNew(_ref) {
|
|
|
40
38
|
id: fieldId
|
|
41
39
|
}, fieldProps, restProps));
|
|
42
40
|
});
|
|
43
|
-
};
|
|
44
|
-
export var TextField = function TextField(props) {
|
|
45
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
46
|
-
return /*#__PURE__*/React.createElement(TextFieldNew, props);
|
|
47
|
-
}
|
|
48
|
-
return /*#__PURE__*/React.createElement(TextFieldOld, props);
|
|
49
41
|
};
|
|
@@ -4,10 +4,8 @@ var _excluded = ["fieldId", "isRequired"];
|
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import SmartUserPicker from '@atlaskit/smart-user-picker';
|
|
9
8
|
import { CreateField } from '../../../controllers/create-field';
|
|
10
|
-
import { UserPickerOld } from './old/main';
|
|
11
9
|
export var TEST_ID = 'link-create-user-picker';
|
|
12
10
|
var DEFAULT_DEBOUNCE_TIME = 400;
|
|
13
11
|
var UserPickerWidth = '100%';
|
|
@@ -15,7 +13,7 @@ var UserPickerWidth = '100%';
|
|
|
15
13
|
/**
|
|
16
14
|
* A user picker utilising the SmartUserPicker.
|
|
17
15
|
*/
|
|
18
|
-
var
|
|
16
|
+
export var UserPicker = function UserPicker(_ref) {
|
|
19
17
|
var productKey = _ref.productKey,
|
|
20
18
|
siteId = _ref.siteId,
|
|
21
19
|
name = _ref.name,
|
|
@@ -56,10 +54,4 @@ var UserPickerNew = function UserPickerNew(_ref) {
|
|
|
56
54
|
required: isRequired
|
|
57
55
|
});
|
|
58
56
|
});
|
|
59
|
-
};
|
|
60
|
-
export var UserPicker = function UserPicker(props) {
|
|
61
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
62
|
-
return /*#__PURE__*/React.createElement(UserPickerNew, props);
|
|
63
|
-
}
|
|
64
|
-
return /*#__PURE__*/React.createElement(UserPickerOld, props);
|
|
65
57
|
};
|
|
@@ -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
|
var LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__*/memo(function (props) {
|
|
14
12
|
return /*#__PURE__*/React.createElement(Experience, null, /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(InlineCreate, props)));
|
|
15
13
|
}));
|
|
16
|
-
var
|
|
14
|
+
var ComposedLinkCreate = /*#__PURE__*/memo(function (props) {
|
|
17
15
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
18
16
|
data: PACKAGE_DATA
|
|
19
17
|
}, /*#__PURE__*/React.createElement(IntlMessagesProvider, {
|
|
@@ -21,10 +19,4 @@ var ComposedLinkCreateNew = /*#__PURE__*/memo(function (props) {
|
|
|
21
19
|
loaderFn: fetchMessagesForLocale
|
|
22
20
|
}, /*#__PURE__*/React.createElement(LinkCreateWithAnalyticsContext, props)));
|
|
23
21
|
});
|
|
24
|
-
var ComposedLinkCreate = /*#__PURE__*/memo(function (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;
|
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
7
6
|
import { DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
|
|
8
7
|
import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
|
|
@@ -15,7 +14,6 @@ import { useExitWarningModal } from '../../controllers/exit-warning-modal-contex
|
|
|
15
14
|
import { FormContextProvider } from '../../controllers/form-context';
|
|
16
15
|
import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../controllers/plugin-context';
|
|
17
16
|
import { InlineAnalytics } from './inline-analytics';
|
|
18
|
-
import InlineCreateOld from './old/main';
|
|
19
17
|
var InlineCreateContent = function InlineCreateContent(_ref) {
|
|
20
18
|
var onCreate = _ref.onCreate,
|
|
21
19
|
onFailure = _ref.onFailure,
|
|
@@ -57,7 +55,7 @@ var InlineCreateContent = function InlineCreateContent(_ref) {
|
|
|
57
55
|
onCancel: onCancel
|
|
58
56
|
}));
|
|
59
57
|
};
|
|
60
|
-
var
|
|
58
|
+
var InlineCreate = function InlineCreate(props) {
|
|
61
59
|
return /*#__PURE__*/React.createElement(LinkCreatePluginsProvider, {
|
|
62
60
|
plugins: props.plugins,
|
|
63
61
|
entityKey: props.entityKey
|
|
@@ -105,10 +103,4 @@ var InlineCreateNew = function InlineCreateNew(props) {
|
|
|
105
103
|
});
|
|
106
104
|
});
|
|
107
105
|
};
|
|
108
|
-
var InlineCreate = function InlineCreate(props) {
|
|
109
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
110
|
-
return /*#__PURE__*/React.createElement(InlineCreateNew, props);
|
|
111
|
-
}
|
|
112
|
-
return /*#__PURE__*/React.createElement(InlineCreateOld, props);
|
|
113
|
-
};
|
|
114
106
|
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
|
var LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__*/memo(function (props) {
|
|
15
13
|
return /*#__PURE__*/React.createElement(Experience, null, /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
16
14
|
errorComponent: /*#__PURE__*/React.createElement(ErrorBoundaryModal, {
|
|
@@ -19,7 +17,7 @@ var LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__
|
|
|
19
17
|
})
|
|
20
18
|
}, /*#__PURE__*/React.createElement(LinkCreate, props)));
|
|
21
19
|
}));
|
|
22
|
-
var
|
|
20
|
+
var ComposedLinkCreate = /*#__PURE__*/memo(function (props) {
|
|
23
21
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
24
22
|
data: PACKAGE_DATA
|
|
25
23
|
}, /*#__PURE__*/React.createElement(IntlMessagesProvider, {
|
|
@@ -27,10 +25,4 @@ var ComposedLinkCreateNew = /*#__PURE__*/memo(function (props) {
|
|
|
27
25
|
loaderFn: fetchMessagesForLocale
|
|
28
26
|
}, /*#__PURE__*/React.createElement(LinkCreateWithAnalyticsContext, props)));
|
|
29
27
|
});
|
|
30
|
-
var ComposedLinkCreate = /*#__PURE__*/memo(function (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;
|
|
@@ -5,7 +5,6 @@ import React, { useLayoutEffect, useRef } from 'react';
|
|
|
5
5
|
import { useIntl } from 'react-intl-next';
|
|
6
6
|
import { Layering } from '@atlaskit/layering';
|
|
7
7
|
import { ModalBody, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
10
9
|
import { CREATE_FORM_MAX_WIDTH_IN_PX, DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
|
|
11
10
|
import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
|
|
@@ -20,7 +19,6 @@ import { ExitWarningModalProvider, useExitWarningModal } from '../../controllers
|
|
|
20
19
|
import { FormContextProvider } from '../../controllers/form-context';
|
|
21
20
|
import { LinkCreatePluginsProvider, useLinkCreatePlugins } from '../../controllers/plugin-context';
|
|
22
21
|
import { messages } from './messages';
|
|
23
|
-
import LinkCreateModalOld from './old/main';
|
|
24
22
|
var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
|
|
25
23
|
var active = _ref.active,
|
|
26
24
|
modalTitle = _ref.modalTitle,
|
|
@@ -79,7 +77,7 @@ var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
|
|
|
79
77
|
onCancel: onCancel
|
|
80
78
|
})));
|
|
81
79
|
};
|
|
82
|
-
var
|
|
80
|
+
var LinkCreateModal = function LinkCreateModal(props) {
|
|
83
81
|
var shouldCallCloseComplete = useRef(!props.active);
|
|
84
82
|
|
|
85
83
|
// modal calls onCloseComplete in a useEffect(), so we can track whether
|
|
@@ -147,10 +145,4 @@ var LinkCreateModalNew = function LinkCreateModalNew(props) {
|
|
|
147
145
|
});
|
|
148
146
|
});
|
|
149
147
|
};
|
|
150
|
-
var LinkCreateModal = function LinkCreateModal(props) {
|
|
151
|
-
if (fg('platform_bandicoots-link-create-css')) {
|
|
152
|
-
return /*#__PURE__*/React.createElement(LinkCreateModalNew, props);
|
|
153
|
-
}
|
|
154
|
-
return /*#__PURE__*/React.createElement(LinkCreateModalOld, props);
|
|
155
|
-
};
|
|
156
148
|
export default LinkCreateModal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
/**
|
|
3
3
|
* ErrorBoundaryModal props are the same as those passed to LinkCreate, which
|
|
4
4
|
* are used to control its active state
|
|
@@ -7,5 +7,5 @@ type ErrorBoundaryModalProps = {
|
|
|
7
7
|
active?: boolean;
|
|
8
8
|
onClose?: () => void;
|
|
9
9
|
};
|
|
10
|
-
export declare const ErrorBoundaryModal: (
|
|
10
|
+
export declare const ErrorBoundaryModal: ({ active, onClose }: ErrorBoundaryModalProps) => JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -7,7 +7,7 @@ type UrlIconProps = {
|
|
|
7
7
|
url?: string;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
};
|
|
10
|
-
export declare const UrlIcon: (
|
|
10
|
+
export declare const UrlIcon: ({ url, children }: UrlIconProps) => JSX.Element;
|
|
11
11
|
export declare const PageIcon: () => JSX.Element;
|
|
12
12
|
export declare const LiveDocIcon: () => JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/// <reference types="react" />
|
|
6
6
|
import { type CreateFieldProps } from './types';
|
|
7
|
-
export declare const CreateField: (
|
|
7
|
+
export declare const CreateField: ({ id, name, label, isRequired, validators, validationHelpText, testId, children, }: CreateFieldProps) => JSX.Element;
|