@atlaskit/link-create 2.10.0 → 2.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/link-create
2
2
 
3
+ ## 2.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 2.10.0
4
10
 
5
11
  ### 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.10.0" || '',
16
+ packageVersion: "2.10.1" || '',
17
17
  component: COMPONENT_NAME,
18
18
  componentName: COMPONENT_NAME
19
19
  };
@@ -46,6 +46,7 @@ var CreateForm = exports.CreateForm = function CreateForm(_ref) {
46
46
  onCancel = _ref.onCancel,
47
47
  isLoading = _ref.isLoading,
48
48
  hideFooter = _ref.hideFooter,
49
+ hideRequiredFieldMessage = _ref.hideRequiredFieldMessage,
49
50
  initialValues = _ref.initialValues;
50
51
  var _useFormContext = (0, _formContext.useFormContext)(),
51
52
  setFormErrorMessage = _useFormContext.setFormErrorMessage,
@@ -158,7 +159,7 @@ var CreateForm = exports.CreateForm = function CreateForm(_ref) {
158
159
  });
159
160
  setShouldShowWarning(isModified);
160
161
  }
161
- }), (0, _react2.jsx)("p", null, intl.formatMessage(_messages.default.requiredFieldInstruction), " ", (0, _react2.jsx)(_form.RequiredAsterisk, null)), (0, _react2.jsx)(_primitives.Box, null, children), !hideFooter && (0, _react2.jsx)(_formFooter.CreateFormFooter
162
+ }), !hideRequiredFieldMessage && (0, _react2.jsx)("p", null, intl.formatMessage(_messages.default.requiredFieldInstruction), " ", (0, _react2.jsx)(_form.RequiredAsterisk, null)), (0, _react2.jsx)(_primitives.Box, null, children), !hideFooter && (0, _react2.jsx)(_formFooter.CreateFormFooter
162
163
  /**
163
164
  * We will prefer to render the error message connected to
164
165
  * react final form state (submitError) otherwise we can
@@ -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.10.0" || '',
10
+ packageVersion: "2.10.1" || '',
11
11
  component: COMPONENT_NAME,
12
12
  componentName: COMPONENT_NAME
13
13
  };
@@ -33,6 +33,7 @@ export const CreateForm = ({
33
33
  onCancel,
34
34
  isLoading,
35
35
  hideFooter,
36
+ hideRequiredFieldMessage,
36
37
  initialValues
37
38
  }) => {
38
39
  const {
@@ -125,7 +126,7 @@ export const CreateForm = ({
125
126
  const isModified = Object.values(state.modified).some(value => value);
126
127
  setShouldShowWarning(isModified);
127
128
  }
128
- }), jsx("p", null, intl.formatMessage(messages.requiredFieldInstruction), " ", jsx(RequiredAsterisk, null)), jsx(Box, null, children), !hideFooter && jsx(CreateFormFooter
129
+ }), !hideRequiredFieldMessage && jsx("p", null, intl.formatMessage(messages.requiredFieldInstruction), " ", jsx(RequiredAsterisk, null)), jsx(Box, null, children), !hideFooter && jsx(CreateFormFooter
129
130
  /**
130
131
  * We will prefer to render the error message connected to
131
132
  * react final form state (submitError) otherwise we can
@@ -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.10.0" || '',
10
+ packageVersion: "2.10.1" || '',
11
11
  component: COMPONENT_NAME,
12
12
  componentName: COMPONENT_NAME
13
13
  };
@@ -42,6 +42,7 @@ export var CreateForm = function CreateForm(_ref) {
42
42
  onCancel = _ref.onCancel,
43
43
  isLoading = _ref.isLoading,
44
44
  hideFooter = _ref.hideFooter,
45
+ hideRequiredFieldMessage = _ref.hideRequiredFieldMessage,
45
46
  initialValues = _ref.initialValues;
46
47
  var _useFormContext = useFormContext(),
47
48
  setFormErrorMessage = _useFormContext.setFormErrorMessage,
@@ -154,7 +155,7 @@ export var CreateForm = function CreateForm(_ref) {
154
155
  });
155
156
  setShouldShowWarning(isModified);
156
157
  }
157
- }), jsx("p", null, intl.formatMessage(messages.requiredFieldInstruction), " ", jsx(RequiredAsterisk, null)), jsx(Box, null, children), !hideFooter && jsx(CreateFormFooter
158
+ }), !hideRequiredFieldMessage && jsx("p", null, intl.formatMessage(messages.requiredFieldInstruction), " ", jsx(RequiredAsterisk, null)), jsx(Box, null, children), !hideFooter && jsx(CreateFormFooter
158
159
  /**
159
160
  * We will prefer to render the error message connected to
160
161
  * react final form state (submitError) otherwise we can
@@ -39,6 +39,10 @@ export interface CreateFormProps<FormData> {
39
39
  * Hides the rendering of the footer buttons
40
40
  */
41
41
  hideFooter?: boolean;
42
+ /**
43
+ * Hides the "Required fields are marked with an asterisk" message
44
+ */
45
+ hideRequiredFieldMessage?: boolean;
42
46
  /**
43
47
  * Values to initialise the forms initial state with
44
48
  * Should not include values for reserved fields
@@ -46,5 +50,5 @@ export interface CreateFormProps<FormData> {
46
50
  initialValues?: DisallowReservedFields<FormData>;
47
51
  }
48
52
  export declare const TEST_ID = "link-create-form";
49
- export declare const CreateForm: <FormData extends Record<string, any> = {}>({ children, testId, onSubmit, onCancel, isLoading, hideFooter, initialValues, }: CreateFormProps<FormData>) => jsx.JSX.Element;
53
+ export declare const CreateForm: <FormData extends Record<string, any> = {}>({ children, testId, onSubmit, onCancel, isLoading, hideFooter, hideRequiredFieldMessage, initialValues, }: CreateFormProps<FormData>) => jsx.JSX.Element;
50
54
  export {};
@@ -41,6 +41,10 @@ export interface CreateFormProps<FormData> {
41
41
  * Hides the rendering of the footer buttons
42
42
  */
43
43
  hideFooter?: boolean;
44
+ /**
45
+ * Hides the "Required fields are marked with an asterisk" message
46
+ */
47
+ hideRequiredFieldMessage?: boolean;
44
48
  /**
45
49
  * Values to initialise the forms initial state with
46
50
  * Should not include values for reserved fields
@@ -48,5 +52,5 @@ export interface CreateFormProps<FormData> {
48
52
  initialValues?: DisallowReservedFields<FormData>;
49
53
  }
50
54
  export declare const TEST_ID = "link-create-form";
51
- export declare const CreateForm: <FormData extends Record<string, any> = {}>({ children, testId, onSubmit, onCancel, isLoading, hideFooter, initialValues, }: CreateFormProps<FormData>) => jsx.JSX.Element;
55
+ export declare const CreateForm: <FormData extends Record<string, any> = {}>({ children, testId, onSubmit, onCancel, isLoading, hideFooter, hideRequiredFieldMessage, initialValues, }: CreateFormProps<FormData>) => jsx.JSX.Element;
52
56
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-create",
3
- "version": "2.10.0",
3
+ "version": "2.10.1",
4
4
  "description": "The driver component of meta creation flow",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,23 +39,23 @@
39
39
  ".": "./src/index.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@atlaskit/analytics-next": "^9.3.0",
42
+ "@atlaskit/analytics-next": "^10.0.0",
43
43
  "@atlaskit/atlassian-context": "^0.0.0",
44
44
  "@atlaskit/button": "^19.1.0",
45
- "@atlaskit/empty-state": "^7.9.0",
45
+ "@atlaskit/empty-state": "^7.10.0",
46
46
  "@atlaskit/form": "^10.4.0",
47
- "@atlaskit/icon": "^22.7.0",
47
+ "@atlaskit/icon": "^22.10.0",
48
48
  "@atlaskit/icon-file-type": "^6.4.0",
49
49
  "@atlaskit/intl-messages-provider": "^1.0.2",
50
- "@atlaskit/linking-common": "^5.7.0",
50
+ "@atlaskit/linking-common": "^5.9.0",
51
51
  "@atlaskit/modal-dialog": "^12.14.0",
52
- "@atlaskit/primitives": "^11.0.0",
52
+ "@atlaskit/primitives": "^11.1.0",
53
53
  "@atlaskit/select": "^17.11.0",
54
54
  "@atlaskit/smart-user-picker": "^6.10.0",
55
55
  "@atlaskit/spinner": "^16.2.0",
56
56
  "@atlaskit/textfield": "^6.4.0",
57
57
  "@atlaskit/theme": "^12.10.0",
58
- "@atlaskit/tokens": "^1.56.0",
58
+ "@atlaskit/tokens": "^1.57.0",
59
59
  "@babel/runtime": "^7.0.0",
60
60
  "@emotion/react": "^11.7.1",
61
61
  "@emotion/styled": "^11.0.0",
@@ -71,7 +71,7 @@
71
71
  "@af/integration-testing": "*",
72
72
  "@af/visual-regression": "*",
73
73
  "@atlaskit/drawer": "^7.13.0",
74
- "@atlaskit/link-test-helpers": "^7.0.0",
74
+ "@atlaskit/link-test-helpers": "^7.2.0",
75
75
  "@atlaskit/visual-regression": "*",
76
76
  "@atlassian/feature-flags-test-utils": "*",
77
77
  "@testing-library/react": "^12.1.5",