@atlaskit/link-create 1.14.0 → 1.14.2

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,17 @@
1
1
  # @atlaskit/link-create
2
2
 
3
+ ## 1.14.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#68142](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68142) [`eeee0117234f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eeee0117234f) - EDM-9179: under FF update form error messages and move error messages from form footer to fields
8
+
9
+ ## 1.14.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#68013](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68013) [`a23882ab49f8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a23882ab49f8) - Upgrade depdendency `final-form` for bugfix.
14
+
3
15
  ## 1.14.0
4
16
 
5
17
  ### Minor Changes
@@ -8,7 +8,12 @@ var _reactIntlNext = require("react-intl-next");
8
8
  var _default = exports.default = (0, _reactIntlNext.defineMessages)({
9
9
  genericErrorMessage: {
10
10
  id: 'link-create.unknown-error.heading',
11
- defaultMessage: 'Something went wrong',
11
+ defaultMessage: 'Something went wrong.',
12
12
  description: 'Message when an unknown error occurs'
13
+ },
14
+ requiredFieldInstruction: {
15
+ id: 'linkCreate.form.requiredField.instruction',
16
+ defaultMessage: 'Required fields are marked with an asterisk',
17
+ description: 'Instruction for the required fields in the Link Create form'
13
18
  }
14
19
  });
@@ -15,6 +15,7 @@ var _react2 = require("@emotion/react");
15
15
  var _finalForm = require("final-form");
16
16
  var _reactFinalForm = require("react-final-form");
17
17
  var _reactIntlNext = require("react-intl-next");
18
+ var _form = require("@atlaskit/form");
18
19
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
20
  var _primitives = require("@atlaskit/primitives");
20
21
  var _constants = require("../../common/constants");
@@ -154,7 +155,9 @@ var CreateForm = exports.CreateForm = function CreateForm(_ref) {
154
155
  });
155
156
  setShouldShowWarning(isModified);
156
157
  }
157
- }), (0, _react2.jsx)(_primitives.Box, null, children), !hideFooter && (0, _react2.jsx)(_formFooter.CreateFormFooter
158
+ }), (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-create.enable-expected-field-errors') && (0, _react2.jsx)("p", {
159
+ "aria-hidden": "true"
160
+ }, intl.formatMessage(_messages.default.requiredFieldInstruction), ' ', (0, _react2.jsx)(_form.RequiredAsterisk, null)), (0, _react2.jsx)(_primitives.Box, null, children), !hideFooter && (0, _react2.jsx)(_formFooter.CreateFormFooter
158
161
  /**
159
162
  * We will prefer to render the error message connected to
160
163
  * react final form state (submitError) otherwise we can
@@ -31,7 +31,7 @@ var LinkCreateWithAnalyticsContext = (0, _analytics.withLinkCreateAnalyticsConte
31
31
  }));
32
32
  var PACKAGE_DATA = exports.PACKAGE_DATA = {
33
33
  packageName: "@atlaskit/link-create" || '',
34
- packageVersion: "1.14.0" || '',
34
+ packageVersion: "1.14.2" || '',
35
35
  component: _constants.COMPONENT_NAME,
36
36
  componentName: _constants.COMPONENT_NAME
37
37
  };
@@ -2,7 +2,12 @@ import { defineMessages } from 'react-intl-next';
2
2
  export default defineMessages({
3
3
  genericErrorMessage: {
4
4
  id: 'link-create.unknown-error.heading',
5
- defaultMessage: 'Something went wrong',
5
+ defaultMessage: 'Something went wrong.',
6
6
  description: 'Message when an unknown error occurs'
7
+ },
8
+ requiredFieldInstruction: {
9
+ id: 'linkCreate.form.requiredField.instruction',
10
+ defaultMessage: 'Required fields are marked with an asterisk',
11
+ description: 'Instruction for the required fields in the Link Create form'
7
12
  }
8
13
  });
@@ -4,6 +4,7 @@ import { css, jsx } from '@emotion/react';
4
4
  import { FORM_ERROR } from 'final-form';
5
5
  import { Form, FormSpy } from 'react-final-form';
6
6
  import { useIntl } from 'react-intl-next';
7
+ import { RequiredAsterisk } from '@atlaskit/form';
7
8
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
9
  import { Box } from '@atlaskit/primitives';
9
10
  import { CREATE_FORM_MAX_WIDTH_IN_PX, LINK_CREATE_FORM_POST_CREATE_FIELD } from '../../common/constants';
@@ -119,7 +120,9 @@ export const CreateForm = ({
119
120
  const isModified = Object.values(state.modified).some(value => value);
120
121
  setShouldShowWarning(isModified);
121
122
  }
122
- }), jsx(Box, null, children), !hideFooter && jsx(CreateFormFooter
123
+ }), getBooleanFF('platform.linking-platform.link-create.enable-expected-field-errors') && jsx("p", {
124
+ "aria-hidden": "true"
125
+ }, intl.formatMessage(messages.requiredFieldInstruction), ' ', jsx(RequiredAsterisk, null)), jsx(Box, null, children), !hideFooter && jsx(CreateFormFooter
123
126
  /**
124
127
  * We will prefer to render the error message connected to
125
128
  * react final form state (submitError) otherwise we can
@@ -23,7 +23,7 @@ const LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE
23
23
  }));
24
24
  export const PACKAGE_DATA = {
25
25
  packageName: "@atlaskit/link-create" || '',
26
- packageVersion: "1.14.0" || '',
26
+ packageVersion: "1.14.2" || '',
27
27
  component: COMPONENT_NAME,
28
28
  componentName: COMPONENT_NAME
29
29
  };
@@ -2,7 +2,12 @@ import { defineMessages } from 'react-intl-next';
2
2
  export default defineMessages({
3
3
  genericErrorMessage: {
4
4
  id: 'link-create.unknown-error.heading',
5
- defaultMessage: 'Something went wrong',
5
+ defaultMessage: 'Something went wrong.',
6
6
  description: 'Message when an unknown error occurs'
7
+ },
8
+ requiredFieldInstruction: {
9
+ id: 'linkCreate.form.requiredField.instruction',
10
+ defaultMessage: 'Required fields are marked with an asterisk',
11
+ description: 'Instruction for the required fields in the Link Create form'
7
12
  }
8
13
  });
@@ -12,6 +12,7 @@ import { css, jsx } from '@emotion/react';
12
12
  import { FORM_ERROR } from 'final-form';
13
13
  import { Form, FormSpy } from 'react-final-form';
14
14
  import { useIntl } from 'react-intl-next';
15
+ import { RequiredAsterisk } from '@atlaskit/form';
15
16
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
16
17
  import { Box } from '@atlaskit/primitives';
17
18
  import { CREATE_FORM_MAX_WIDTH_IN_PX, LINK_CREATE_FORM_POST_CREATE_FIELD } from '../../common/constants';
@@ -148,7 +149,9 @@ export var CreateForm = function CreateForm(_ref) {
148
149
  });
149
150
  setShouldShowWarning(isModified);
150
151
  }
151
- }), jsx(Box, null, children), !hideFooter && jsx(CreateFormFooter
152
+ }), getBooleanFF('platform.linking-platform.link-create.enable-expected-field-errors') && jsx("p", {
153
+ "aria-hidden": "true"
154
+ }, intl.formatMessage(messages.requiredFieldInstruction), ' ', jsx(RequiredAsterisk, null)), jsx(Box, null, children), !hideFooter && jsx(CreateFormFooter
152
155
  /**
153
156
  * We will prefer to render the error message connected to
154
157
  * react final form state (submitError) otherwise we can
@@ -23,7 +23,7 @@ var LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__
23
23
  }));
24
24
  export var PACKAGE_DATA = {
25
25
  packageName: "@atlaskit/link-create" || '',
26
- packageVersion: "1.14.0" || '',
26
+ packageVersion: "1.14.2" || '',
27
27
  component: COMPONENT_NAME,
28
28
  componentName: COMPONENT_NAME
29
29
  };
@@ -4,5 +4,10 @@ declare const _default: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ requiredFieldInstruction: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
7
12
  };
8
13
  export default _default;
@@ -4,5 +4,10 @@ declare const _default: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ requiredFieldInstruction: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
7
12
  };
8
13
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-create",
3
- "version": "1.14.0",
3
+ "version": "1.14.2",
4
4
  "description": "The driver component of meta creation flow",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -18,7 +18,7 @@
18
18
  "name": "LinkCreate"
19
19
  }
20
20
  },
21
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
21
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
22
22
  "main": "dist/cjs/index.js",
23
23
  "module": "dist/esm/index.js",
24
24
  "module:es2019": "dist/es2019/index.js",
@@ -46,15 +46,15 @@
46
46
  "@atlaskit/linking-common": "^5.3.0",
47
47
  "@atlaskit/modal-dialog": "^12.10.0",
48
48
  "@atlaskit/platform-feature-flags": "^0.2.1",
49
- "@atlaskit/primitives": "^1.17.0",
49
+ "@atlaskit/primitives": "^1.18.0",
50
50
  "@atlaskit/select": "^17.0.3",
51
51
  "@atlaskit/spinner": "^16.0.0",
52
52
  "@atlaskit/textfield": "^6.0.0",
53
- "@atlaskit/tokens": "^1.33.0",
53
+ "@atlaskit/tokens": "^1.34.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1",
56
56
  "debounce-promise": "^3.1.2",
57
- "final-form": "^4.20.1",
57
+ "final-form": "^4.20.3",
58
58
  "react-final-form": "^6.5.3"
59
59
  },
60
60
  "peerDependencies": {
@@ -128,6 +128,9 @@
128
128
  },
129
129
  "platform.linking-platform.link-create.slo-ignore-failed-fetch": {
130
130
  "type": "boolean"
131
+ },
132
+ "platform.linking-platform.link-create.enable-expected-field-errors": {
133
+ "type": "boolean"
131
134
  }
132
135
  }
133
136
  }