@atlaskit/link-create 2.12.0 → 2.13.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/link-create
2
2
 
3
+ ## 2.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#143696](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/143696)
8
+ [`9221200c924cb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9221200c924cb) -
9
+ Improves accessibility of CreateField form fields (association of helper and error texts) (by
10
+ clean up of ff linking-platform-create-field-error-association).
11
+
12
+ ### Patch Changes
13
+
14
+ - [#143696](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/143696)
15
+ [`9221200c924cb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9221200c924cb) -
16
+ Fixes bugged closing behaviour when pressing escape after opening the exit warning dialog (by
17
+ cleanup of ff linking-platform-link-create-nest-exit-warning).
18
+
3
19
  ## 2.12.0
4
20
 
5
21
  ### Minor Changes
@@ -13,7 +13,7 @@ var CREATE_FORM_MIN_HEIGHT_IN_PX = exports.CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
13
13
  var LINK_CREATE_FORM_POST_CREATE_FIELD = exports.LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
14
14
  var PACKAGE_DATA = exports.PACKAGE_DATA = {
15
15
  packageName: "@atlaskit/link-create" || '',
16
- packageVersion: "2.12.0" || '',
16
+ packageVersion: "2.13.0" || '',
17
17
  component: COMPONENT_NAME,
18
18
  componentName: COMPONENT_NAME
19
19
  };
@@ -6,11 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.CreateField = CreateField;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _react = require("react");
10
- var _react2 = require("@emotion/react");
9
+ var _react = require("@emotion/react");
11
10
  var _reactFinalForm = require("react-final-form");
12
11
  var _form = require("@atlaskit/form");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
12
  var _message = require("../../common/ui/message");
15
13
  var _form2 = require("../../common/utils/form");
16
14
  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; }
@@ -18,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
18
16
  * @jsxRuntime classic
19
17
  * @jsx jsx
20
18
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
21
- var fieldWrapperStyles = (0, _react2.css)({
19
+ var fieldWrapperStyles = (0, _react.css)({
22
20
  marginTop: "var(--ds-space-100, 8px)"
23
21
  });
24
22
  function CreateField(_ref) {
@@ -31,7 +29,7 @@ function CreateField(_ref) {
31
29
  testId = _ref.testId,
32
30
  children = _ref.children;
33
31
  var fieldId = id ? id : "link-create-field-".concat(name);
34
- return (0, _react2.jsx)(_reactFinalForm.Field, {
32
+ return (0, _react.jsx)(_reactFinalForm.Field, {
35
33
  name: name,
36
34
  validate: function validate(value) {
37
35
  var _find;
@@ -50,34 +48,29 @@ function CreateField(_ref) {
50
48
  var describedById = "".concat(fieldId, "-description");
51
49
  var errorMessageId = "".concat(fieldId, "-error");
52
50
  var ariaErrorMessage = showErrorMessage ? errorMessageId : undefined;
53
- return (0, _react2.jsx)("div", {
51
+ return (0, _react.jsx)("div", {
54
52
  css: fieldWrapperStyles,
55
53
  "data-testid": testId
56
- }, label && (0, _react2.jsx)(_form.Label, {
54
+ }, label && (0, _react.jsx)(_form.Label, {
57
55
  htmlFor: fieldId,
58
56
  id: "".concat(fieldId, "-label"),
59
57
  testId: "".concat(testId, "-label")
60
- }, label, isRequired && (0, _react2.jsx)(_form.RequiredAsterisk, null)), children(_objectSpread(_objectSpread({}, input), {}, {
58
+ }, label, isRequired && (0, _react.jsx)(_form.RequiredAsterisk, null)), children(_objectSpread(_objectSpread({}, input), {}, {
61
59
  fieldId: fieldId,
62
- isInvalid: isInvalid
63
- }, (0, _platformFeatureFlags.fg)('linking-platform-create-field-error-association') ? {
60
+ isInvalid: isInvalid,
64
61
  isRequired: isRequired,
65
62
  'aria-errormessage': ariaErrorMessage,
66
63
  'aria-describedby': describedById
67
- } : {})), (0, _platformFeatureFlags.fg)('linking-platform-create-field-error-association') ? (0, _react2.jsx)("div", {
64
+ })), (0, _react.jsx)("div", {
68
65
  id: describedById
69
- }, !hasError && validationHelpText && (0, _react2.jsx)(_message.Message, {
66
+ }, !hasError && validationHelpText && (0, _react.jsx)(_message.Message, {
70
67
  testId: "".concat(testId, "-helper-message")
71
- }, validationHelpText), (0, _react2.jsx)("div", {
68
+ }, validationHelpText), (0, _react.jsx)("div", {
72
69
  "aria-live": "polite"
73
- }, showErrorMessage && (0, _react2.jsx)(_message.Message, {
70
+ }, showErrorMessage && (0, _react.jsx)(_message.Message, {
74
71
  id: errorMessageId,
75
72
  appearance: "error",
76
73
  testId: "".concat(testId, "-error-message")
77
- }, submitError || error))) : (0, _react2.jsx)(_react.Fragment, null, !hasError && validationHelpText && (0, _react2.jsx)(_form.HelperMessage, {
78
- testId: "".concat(testId, "-helper-message")
79
- }, validationHelpText), hasError && isInvalid && (0, _react2.jsx)(_form.ErrorMessage, {
80
- testId: "".concat(testId, "-error-message")
81
- }, submitError || error)));
74
+ }, submitError || error))));
82
75
  });
83
76
  }
@@ -16,7 +16,6 @@ var _react2 = require("@emotion/react");
16
16
  var _debouncePromise = _interopRequireDefault(require("debounce-promise"));
17
17
  var _reactFinalForm = require("react-final-form");
18
18
  var _reactIntlNext = require("react-intl-next");
19
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
19
  var _select = require("@atlaskit/select");
21
20
  var _messages = _interopRequireDefault(require("../../../common/messages"));
22
21
  var _callbackContext = require("../../../controllers/callback-context");
@@ -183,19 +182,10 @@ function AsyncSelect(_ref) {
183
182
  var fieldId = _ref4.fieldId,
184
183
  isRequired = _ref4.isRequired,
185
184
  fieldProps = (0, _objectWithoutProperties2.default)(_ref4, _excluded2);
186
- if ((0, _platformFeatureFlags.fg)('linking-platform-create-field-error-association')) {
187
- return (0, _react2.jsx)(_select.AsyncSelect, (0, _extends2.default)({
188
- inputId: fieldId
189
- }, fieldProps, restProps, {
190
- required: isRequired,
191
- loadOptions: debouncedLoadOptions,
192
- defaultOptions: defaultOptions,
193
- isLoading: isLoadingDefaultOptions
194
- }));
195
- }
196
185
  return (0, _react2.jsx)(_select.AsyncSelect, (0, _extends2.default)({
197
186
  inputId: fieldId
198
187
  }, fieldProps, restProps, {
188
+ required: isRequired,
199
189
  loadOptions: debouncedLoadOptions,
200
190
  defaultOptions: defaultOptions,
201
191
  isLoading: isLoadingDefaultOptions
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.TEST_ID = exports.CreateForm = void 0;
9
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
9
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
@@ -17,7 +16,6 @@ var _finalForm = require("final-form");
17
16
  var _reactFinalForm = require("react-final-form");
18
17
  var _reactIntlNext = require("react-intl-next");
19
18
  var _form = require("@atlaskit/form");
20
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
19
  var _primitives = require("@atlaskit/primitives");
22
20
  var _constants = require("../../common/constants");
23
21
  var _messages = _interopRequireDefault(require("../../common/messages"));
@@ -141,15 +139,13 @@ var CreateForm = exports.CreateForm = function CreateForm(_ref) {
141
139
  }, function (_ref5) {
142
140
  var submitError = _ref5.submitError,
143
141
  formProps = (0, _objectWithoutProperties2.default)(_ref5, _excluded);
144
- return (0, _react2.jsx)("form", (0, _extends2.default)({
142
+ return (0, _react2.jsx)("form", {
145
143
  onSubmit: formProps.handleSubmit,
146
- name: "link-create-form"
147
- }, (0, _platformFeatureFlags.fg)('linking-platform-create-field-error-association') ? {
148
- noValidate: true
149
- } : {}, {
144
+ name: "link-create-form",
145
+ noValidate: true,
150
146
  "data-testid": testId,
151
147
  css: formStyles
152
- }), (0, _react2.jsx)(_reactFinalForm.FormSpy, {
148
+ }, (0, _react2.jsx)(_reactFinalForm.FormSpy, {
153
149
  subscription: {
154
150
  modified: true
155
151
  },
@@ -12,7 +12,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
12
12
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
13
  var _react = require("@emotion/react");
14
14
  var _reactIntlNext = require("react-intl-next");
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _primitives = require("@atlaskit/primitives");
17
16
  var _select = _interopRequireWildcard(require("@atlaskit/select"));
18
17
  var _constants = require("@atlaskit/theme/constants");
@@ -62,13 +61,8 @@ function Select(_ref) {
62
61
  var fieldId = _ref2.fieldId,
63
62
  isRequired = _ref2.isRequired,
64
63
  fieldProps = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
65
- if ((0, _platformFeatureFlags.fg)('linking-platform-create-field-error-association')) {
66
- return (0, _react.jsx)(_select.default, (0, _extends2.default)({
67
- required: isRequired,
68
- inputId: fieldId
69
- }, fieldProps, restProps));
70
- }
71
64
  return (0, _react.jsx)(_select.default, (0, _extends2.default)({
65
+ required: isRequired,
72
66
  inputId: fieldId
73
67
  }, fieldProps, restProps));
74
68
  });
@@ -9,7 +9,6 @@ exports.TextField = TextField;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _react = require("@emotion/react");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
14
13
  var _createField = require("../../../controllers/create-field");
15
14
  var _excluded = ["id", "name", "label", "isRequired", "validators", "validationHelpText", "testId"],
@@ -49,15 +48,8 @@ function TextField(_ref) {
49
48
  }, function (_ref2) {
50
49
  var fieldId = _ref2.fieldId,
51
50
  fieldProps = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
52
- if ((0, _platformFeatureFlags.fg)('linking-platform-create-field-error-association')) {
53
- return (0, _react.jsx)(_textfield.default, (0, _extends2.default)({
54
- id: fieldId
55
- }, fieldProps, restProps));
56
- }
57
51
  return (0, _react.jsx)(_textfield.default, (0, _extends2.default)({
58
52
  id: fieldId
59
- }, fieldProps, restProps, {
60
- isRequired: false // Remove the default browser validation
61
- }));
53
+ }, fieldProps, restProps));
62
54
  });
63
55
  }
@@ -13,7 +13,6 @@ var _react2 = require("@emotion/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 _primitives = require("@atlaskit/primitives");
18
17
  var _constants = require("../../common/constants");
19
18
  var _confirmDismissDialog = require("../../common/ui/confirm-dismiss-dialog");
@@ -85,11 +84,7 @@ var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
85
84
  onClose: onComplete,
86
85
  editViewPayload: editViewPayload,
87
86
  activePlugin: activePlugin
88
- }), !(0, _platformFeatureFlags.fg)('linking-platform-link-create-nest-exit-warning') && (0, _react2.jsx)(_confirmDismissDialog.ConfirmDismissDialog, {
89
- active: showExitWarning,
90
- onClose: handleCloseExitWarning,
91
- onCancel: onCancel
92
- }), (0, _platformFeatureFlags.fg)('linking-platform-link-create-nest-exit-warning') && (0, _react2.jsx)(_layering.UNSAFE_LAYERING, {
87
+ }), (0, _react2.jsx)(_layering.UNSAFE_LAYERING, {
93
88
  isDisabled: false
94
89
  }, (0, _react2.jsx)(_confirmDismissDialog.ConfirmDismissDialog, {
95
90
  active: showExitWarning,
@@ -7,7 +7,7 @@ export const CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
7
7
  export const LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
8
8
  export const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/link-create" || '',
10
- packageVersion: "2.12.0" || '',
10
+ packageVersion: "2.13.0" || '',
11
11
  component: COMPONENT_NAME,
12
12
  componentName: COMPONENT_NAME
13
13
  };
@@ -2,13 +2,11 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import { Fragment } from 'react';
6
5
 
7
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
8
7
  import { css, jsx } from '@emotion/react';
9
8
  import { Field } from 'react-final-form';
10
- import { ErrorMessage, HelperMessage, Label, RequiredAsterisk } from '@atlaskit/form';
11
- import { fg } from '@atlaskit/platform-feature-flags';
9
+ import { Label, RequiredAsterisk } from '@atlaskit/form';
12
10
  import { Message } from '../../common/ui/message';
13
11
  import { shouldShowValidationErrors } from '../../common/utils/form';
14
12
  const fieldWrapperStyles = css({
@@ -58,12 +56,10 @@ export function CreateField({
58
56
  ...input,
59
57
  fieldId,
60
58
  isInvalid,
61
- ...(fg('linking-platform-create-field-error-association') ? {
62
- isRequired,
63
- 'aria-errormessage': ariaErrorMessage,
64
- 'aria-describedby': describedById
65
- } : {})
66
- }), fg('linking-platform-create-field-error-association') ? jsx("div", {
59
+ isRequired,
60
+ 'aria-errormessage': ariaErrorMessage,
61
+ 'aria-describedby': describedById
62
+ }), jsx("div", {
67
63
  id: describedById
68
64
  }, !hasError && validationHelpText && jsx(Message, {
69
65
  testId: `${testId}-helper-message`
@@ -73,10 +69,6 @@ export function CreateField({
73
69
  id: errorMessageId,
74
70
  appearance: "error",
75
71
  testId: `${testId}-error-message`
76
- }, submitError || error))) : jsx(Fragment, null, !hasError && validationHelpText && jsx(HelperMessage, {
77
- testId: `${testId}-helper-message`
78
- }, validationHelpText), hasError && isInvalid && jsx(ErrorMessage, {
79
- testId: `${testId}-error-message`
80
- }, submitError || error)));
72
+ }, submitError || error))));
81
73
  });
82
74
  }
@@ -10,7 +10,6 @@ import { jsx } from '@emotion/react';
10
10
  import debounce from 'debounce-promise';
11
11
  import { useForm } from 'react-final-form';
12
12
  import { useIntl } from 'react-intl-next';
13
- import { fg } from '@atlaskit/platform-feature-flags';
14
13
  import { AsyncSelect as AkAsyncSelect } from '@atlaskit/select';
15
14
  import messages from '../../../common/messages';
16
15
  import { useLinkCreateCallback } from '../../../controllers/callback-context';
@@ -124,19 +123,10 @@ export function AsyncSelect({
124
123
  isRequired,
125
124
  ...fieldProps
126
125
  }) => {
127
- if (fg('linking-platform-create-field-error-association')) {
128
- return jsx(AkAsyncSelect, _extends({
129
- inputId: fieldId
130
- }, fieldProps, restProps, {
131
- required: isRequired,
132
- loadOptions: debouncedLoadOptions,
133
- defaultOptions: defaultOptions,
134
- isLoading: isLoadingDefaultOptions
135
- }));
136
- }
137
126
  return jsx(AkAsyncSelect, _extends({
138
127
  inputId: fieldId
139
128
  }, fieldProps, restProps, {
129
+ required: isRequired,
140
130
  loadOptions: debouncedLoadOptions,
141
131
  defaultOptions: defaultOptions,
142
132
  isLoading: isLoadingDefaultOptions
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
1
  /**
3
2
  * @jsxRuntime classic
4
3
  * @jsx jsx
@@ -11,7 +10,6 @@ import { FORM_ERROR } from 'final-form';
11
10
  import { Form, FormSpy } from 'react-final-form';
12
11
  import { useIntl } from 'react-intl-next';
13
12
  import { RequiredAsterisk } from '@atlaskit/form';
14
- import { fg } from '@atlaskit/platform-feature-flags';
15
13
  import { Box } from '@atlaskit/primitives';
16
14
  import { CREATE_FORM_MAX_WIDTH_IN_PX, LINK_CREATE_FORM_POST_CREATE_FIELD } from '../../common/constants';
17
15
  import messages from '../../common/messages';
@@ -110,15 +108,13 @@ export const CreateForm = ({
110
108
  submitError,
111
109
  ...formProps
112
110
  }) => {
113
- return jsx("form", _extends({
111
+ return jsx("form", {
114
112
  onSubmit: formProps.handleSubmit,
115
- name: "link-create-form"
116
- }, fg('linking-platform-create-field-error-association') ? {
117
- noValidate: true
118
- } : {}, {
113
+ name: "link-create-form",
114
+ noValidate: true,
119
115
  "data-testid": testId,
120
116
  css: formStyles
121
- }), jsx(FormSpy, {
117
+ }, jsx(FormSpy, {
122
118
  subscription: {
123
119
  modified: true
124
120
  },
@@ -7,7 +7,6 @@ import _extends from "@babel/runtime/helpers/extends";
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { jsx } from '@emotion/react';
9
9
  import { useIntl } from 'react-intl-next';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
10
  import { Inline } from '@atlaskit/primitives';
12
11
  import AkSelect, { components } from '@atlaskit/select';
13
12
  import { layers } from '@atlaskit/theme/constants';
@@ -45,13 +44,8 @@ export function Select({
45
44
  isRequired,
46
45
  ...fieldProps
47
46
  }) => {
48
- if (fg('linking-platform-create-field-error-association')) {
49
- return jsx(AkSelect, _extends({
50
- required: isRequired,
51
- inputId: fieldId
52
- }, fieldProps, restProps));
53
- }
54
47
  return jsx(AkSelect, _extends({
48
+ required: isRequired,
55
49
  inputId: fieldId
56
50
  }, fieldProps, restProps));
57
51
  });
@@ -5,7 +5,6 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  */
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { jsx } from '@emotion/react';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import AkTextfield from '@atlaskit/textfield';
10
9
  import { CreateField } from '../../../controllers/create-field';
11
10
  export const TEST_ID = 'link-create-text-field';
@@ -39,15 +38,8 @@ export function TextField({
39
38
  fieldId,
40
39
  ...fieldProps
41
40
  }) => {
42
- if (fg('linking-platform-create-field-error-association')) {
43
- return jsx(AkTextfield, _extends({
44
- id: fieldId
45
- }, fieldProps, restProps));
46
- }
47
41
  return jsx(AkTextfield, _extends({
48
42
  id: fieldId
49
- }, fieldProps, restProps, {
50
- isRequired: false // Remove the default browser validation
51
- }));
43
+ }, fieldProps, restProps));
52
44
  });
53
45
  }
@@ -10,7 +10,6 @@ import { jsx } from '@emotion/react';
10
10
  import { useIntl } from 'react-intl-next';
11
11
  import { UNSAFE_LAYERING } from '@atlaskit/layering';
12
12
  import { ModalBody, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
13
- import { fg } from '@atlaskit/platform-feature-flags';
14
13
  import { Box } from '@atlaskit/primitives';
15
14
  import { CREATE_FORM_MAX_WIDTH_IN_PX, DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
16
15
  import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
@@ -76,11 +75,7 @@ const LinkCreateWithModal = ({
76
75
  onClose: onComplete,
77
76
  editViewPayload: editViewPayload,
78
77
  activePlugin: activePlugin
79
- }), !fg('linking-platform-link-create-nest-exit-warning') && jsx(ConfirmDismissDialog, {
80
- active: showExitWarning,
81
- onClose: handleCloseExitWarning,
82
- onCancel: onCancel
83
- }), fg('linking-platform-link-create-nest-exit-warning') && jsx(UNSAFE_LAYERING, {
78
+ }), jsx(UNSAFE_LAYERING, {
84
79
  isDisabled: false
85
80
  }, jsx(ConfirmDismissDialog, {
86
81
  active: showExitWarning,
@@ -7,7 +7,7 @@ export var CREATE_FORM_MIN_HEIGHT_IN_PX = '200';
7
7
  export var LINK_CREATE_FORM_POST_CREATE_FIELD = '__post_create__';
8
8
  export var PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/link-create" || '',
10
- packageVersion: "2.12.0" || '',
10
+ packageVersion: "2.13.0" || '',
11
11
  component: COMPONENT_NAME,
12
12
  componentName: COMPONENT_NAME
13
13
  };
@@ -5,13 +5,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  * @jsxRuntime classic
6
6
  * @jsx jsx
7
7
  */
8
- import { Fragment } from 'react';
9
8
 
10
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
11
10
  import { css, jsx } from '@emotion/react';
12
11
  import { Field } from 'react-final-form';
13
- import { ErrorMessage, HelperMessage, Label, RequiredAsterisk } from '@atlaskit/form';
14
- import { fg } from '@atlaskit/platform-feature-flags';
12
+ import { Label, RequiredAsterisk } from '@atlaskit/form';
15
13
  import { Message } from '../../common/ui/message';
16
14
  import { shouldShowValidationErrors } from '../../common/utils/form';
17
15
  var fieldWrapperStyles = css({
@@ -55,12 +53,11 @@ export function CreateField(_ref) {
55
53
  testId: "".concat(testId, "-label")
56
54
  }, label, isRequired && jsx(RequiredAsterisk, null)), children(_objectSpread(_objectSpread({}, input), {}, {
57
55
  fieldId: fieldId,
58
- isInvalid: isInvalid
59
- }, fg('linking-platform-create-field-error-association') ? {
56
+ isInvalid: isInvalid,
60
57
  isRequired: isRequired,
61
58
  'aria-errormessage': ariaErrorMessage,
62
59
  'aria-describedby': describedById
63
- } : {})), fg('linking-platform-create-field-error-association') ? jsx("div", {
60
+ })), jsx("div", {
64
61
  id: describedById
65
62
  }, !hasError && validationHelpText && jsx(Message, {
66
63
  testId: "".concat(testId, "-helper-message")
@@ -70,10 +67,6 @@ export function CreateField(_ref) {
70
67
  id: errorMessageId,
71
68
  appearance: "error",
72
69
  testId: "".concat(testId, "-error-message")
73
- }, submitError || error))) : jsx(Fragment, null, !hasError && validationHelpText && jsx(HelperMessage, {
74
- testId: "".concat(testId, "-helper-message")
75
- }, validationHelpText), hasError && isInvalid && jsx(ErrorMessage, {
76
- testId: "".concat(testId, "-error-message")
77
- }, submitError || error)));
70
+ }, submitError || error))));
78
71
  });
79
72
  }
@@ -16,7 +16,6 @@ import { jsx } from '@emotion/react';
16
16
  import debounce from 'debounce-promise';
17
17
  import { useForm } from 'react-final-form';
18
18
  import { useIntl } from 'react-intl-next';
19
- import { fg } from '@atlaskit/platform-feature-flags';
20
19
  import { AsyncSelect as AkAsyncSelect } from '@atlaskit/select';
21
20
  import messages from '../../../common/messages';
22
21
  import { useLinkCreateCallback } from '../../../controllers/callback-context';
@@ -176,19 +175,10 @@ export function AsyncSelect(_ref) {
176
175
  var fieldId = _ref4.fieldId,
177
176
  isRequired = _ref4.isRequired,
178
177
  fieldProps = _objectWithoutProperties(_ref4, _excluded2);
179
- if (fg('linking-platform-create-field-error-association')) {
180
- return jsx(AkAsyncSelect, _extends({
181
- inputId: fieldId
182
- }, fieldProps, restProps, {
183
- required: isRequired,
184
- loadOptions: debouncedLoadOptions,
185
- defaultOptions: defaultOptions,
186
- isLoading: isLoadingDefaultOptions
187
- }));
188
- }
189
178
  return jsx(AkAsyncSelect, _extends({
190
179
  inputId: fieldId
191
180
  }, fieldProps, restProps, {
181
+ required: isRequired,
192
182
  loadOptions: debouncedLoadOptions,
193
183
  defaultOptions: defaultOptions,
194
184
  isLoading: isLoadingDefaultOptions
@@ -1,5 +1,4 @@
1
1
  import _typeof from "@babel/runtime/helpers/typeof";
2
- import _extends from "@babel/runtime/helpers/extends";
3
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
4
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
@@ -19,7 +18,6 @@ import { FORM_ERROR } from 'final-form';
19
18
  import { Form, FormSpy } from 'react-final-form';
20
19
  import { useIntl } from 'react-intl-next';
21
20
  import { RequiredAsterisk } from '@atlaskit/form';
22
- import { fg } from '@atlaskit/platform-feature-flags';
23
21
  import { Box } from '@atlaskit/primitives';
24
22
  import { CREATE_FORM_MAX_WIDTH_IN_PX, LINK_CREATE_FORM_POST_CREATE_FIELD } from '../../common/constants';
25
23
  import messages from '../../common/messages';
@@ -137,15 +135,13 @@ export var CreateForm = function CreateForm(_ref) {
137
135
  }, function (_ref5) {
138
136
  var submitError = _ref5.submitError,
139
137
  formProps = _objectWithoutProperties(_ref5, _excluded);
140
- return jsx("form", _extends({
138
+ return jsx("form", {
141
139
  onSubmit: formProps.handleSubmit,
142
- name: "link-create-form"
143
- }, fg('linking-platform-create-field-error-association') ? {
144
- noValidate: true
145
- } : {}, {
140
+ name: "link-create-form",
141
+ noValidate: true,
146
142
  "data-testid": testId,
147
143
  css: formStyles
148
- }), jsx(FormSpy, {
144
+ }, jsx(FormSpy, {
149
145
  subscription: {
150
146
  modified: true
151
147
  },
@@ -15,7 +15,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
15
15
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
16
16
  import { jsx } from '@emotion/react';
17
17
  import { useIntl } from 'react-intl-next';
18
- import { fg } from '@atlaskit/platform-feature-flags';
19
18
  import { Inline } from '@atlaskit/primitives';
20
19
  import AkSelect, { components } from '@atlaskit/select';
21
20
  import { layers } from '@atlaskit/theme/constants';
@@ -52,13 +51,8 @@ export function Select(_ref) {
52
51
  var fieldId = _ref2.fieldId,
53
52
  isRequired = _ref2.isRequired,
54
53
  fieldProps = _objectWithoutProperties(_ref2, _excluded2);
55
- if (fg('linking-platform-create-field-error-association')) {
56
- return jsx(AkSelect, _extends({
57
- required: isRequired,
58
- inputId: fieldId
59
- }, fieldProps, restProps));
60
- }
61
54
  return jsx(AkSelect, _extends({
55
+ required: isRequired,
62
56
  inputId: fieldId
63
57
  }, fieldProps, restProps));
64
58
  });
@@ -8,7 +8,6 @@ var _excluded = ["id", "name", "label", "isRequired", "validators", "validationH
8
8
  */
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import { jsx } from '@emotion/react';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import AkTextfield from '@atlaskit/textfield';
13
12
  import { CreateField } from '../../../controllers/create-field';
14
13
  export var TEST_ID = 'link-create-text-field';
@@ -41,15 +40,8 @@ export function TextField(_ref) {
41
40
  }, function (_ref2) {
42
41
  var fieldId = _ref2.fieldId,
43
42
  fieldProps = _objectWithoutProperties(_ref2, _excluded2);
44
- if (fg('linking-platform-create-field-error-association')) {
45
- return jsx(AkTextfield, _extends({
46
- id: fieldId
47
- }, fieldProps, restProps));
48
- }
49
43
  return jsx(AkTextfield, _extends({
50
44
  id: fieldId
51
- }, fieldProps, restProps, {
52
- isRequired: false // Remove the default browser validation
53
- }));
45
+ }, fieldProps, restProps));
54
46
  });
55
47
  }
@@ -12,7 +12,6 @@ import { jsx } from '@emotion/react';
12
12
  import { useIntl } from 'react-intl-next';
13
13
  import { UNSAFE_LAYERING } from '@atlaskit/layering';
14
14
  import { ModalBody, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
15
- import { fg } from '@atlaskit/platform-feature-flags';
16
15
  import { Box } from '@atlaskit/primitives';
17
16
  import { CREATE_FORM_MAX_WIDTH_IN_PX, DEFAULT_TEST_ID, SCREEN_ID } from '../../common/constants';
18
17
  import { ConfirmDismissDialog } from '../../common/ui/confirm-dismiss-dialog';
@@ -77,11 +76,7 @@ var LinkCreateWithModal = function LinkCreateWithModal(_ref) {
77
76
  onClose: onComplete,
78
77
  editViewPayload: editViewPayload,
79
78
  activePlugin: activePlugin
80
- }), !fg('linking-platform-link-create-nest-exit-warning') && jsx(ConfirmDismissDialog, {
81
- active: showExitWarning,
82
- onClose: handleCloseExitWarning,
83
- onCancel: onCancel
84
- }), fg('linking-platform-link-create-nest-exit-warning') && jsx(UNSAFE_LAYERING, {
79
+ }), jsx(UNSAFE_LAYERING, {
85
80
  isDisabled: false
86
81
  }, jsx(ConfirmDismissDialog, {
87
82
  active: showExitWarning,
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import { jsx } from '@emotion/react';
2
6
  import { type CreateFieldProps } from './types';
3
7
  export declare function CreateField({ id, name, label, isRequired, validators, validationHelpText, testId, children, }: CreateFieldProps): jsx.JSX.Element;
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import { jsx } from '@emotion/react';
2
6
  import { type CreateFieldProps } from './types';
3
7
  export declare function CreateField({ id, name, label, isRequired, validators, validationHelpText, testId, children, }: CreateFieldProps): jsx.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-create",
3
- "version": "2.12.0",
3
+ "version": "2.13.0",
4
4
  "description": "The driver component of meta creation flow",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -45,14 +45,13 @@
45
45
  "@atlaskit/layering": "^0.4.0",
46
46
  "@atlaskit/linking-common": "^5.11.0",
47
47
  "@atlaskit/modal-dialog": "^12.16.0",
48
- "@atlaskit/platform-feature-flags": "^0.3.0",
49
48
  "@atlaskit/primitives": "^12.2.0",
50
49
  "@atlaskit/select": "^17.19.0",
51
50
  "@atlaskit/smart-user-picker": "^6.10.0",
52
51
  "@atlaskit/spinner": "^16.3.0",
53
52
  "@atlaskit/textfield": "^6.5.0",
54
53
  "@atlaskit/theme": "^13.0.0",
55
- "@atlaskit/tokens": "^1.60.0",
54
+ "@atlaskit/tokens": "^1.61.0",
56
55
  "@babel/runtime": "^7.0.0",
57
56
  "@emotion/react": "^11.7.1",
58
57
  "@emotion/styled": "^11.0.0",
@@ -120,13 +119,5 @@
120
119
  "import-no-extraneous-disable-for-examples-and-docs"
121
120
  ]
122
121
  }
123
- },
124
- "platform-feature-flags": {
125
- "linking-platform-link-create-nest-exit-warning": {
126
- "type": "boolean"
127
- },
128
- "linking-platform-create-field-error-association": {
129
- "type": "boolean"
130
- }
131
122
  }
132
123
  }