@commercetools-uikit/field-warnings 19.9.0 → 19.10.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.
|
@@ -68,7 +68,7 @@ FieldWarnings.displayName = 'FieldWarnings';
|
|
|
68
68
|
var FieldWarnings$1 = FieldWarnings;
|
|
69
69
|
|
|
70
70
|
// NOTE: This string will be replaced on build time with the package version.
|
|
71
|
-
var version = "19.
|
|
71
|
+
var version = "19.10.0";
|
|
72
72
|
|
|
73
73
|
exports["default"] = FieldWarnings$1;
|
|
74
74
|
exports.version = version;
|
|
@@ -61,7 +61,7 @@ FieldWarnings.displayName = 'FieldWarnings';
|
|
|
61
61
|
var FieldWarnings$1 = FieldWarnings;
|
|
62
62
|
|
|
63
63
|
// NOTE: This string will be replaced on build time with the package version.
|
|
64
|
-
var version = "19.
|
|
64
|
+
var version = "19.10.0";
|
|
65
65
|
|
|
66
66
|
exports["default"] = FieldWarnings$1;
|
|
67
67
|
exports.version = version;
|
|
@@ -57,6 +57,6 @@ FieldWarnings.displayName = 'FieldWarnings';
|
|
|
57
57
|
var FieldWarnings$1 = FieldWarnings;
|
|
58
58
|
|
|
59
59
|
// NOTE: This string will be replaced on build time with the package version.
|
|
60
|
-
var version = "19.
|
|
60
|
+
var version = "19.10.0";
|
|
61
61
|
|
|
62
62
|
export { FieldWarnings$1 as default, version };
|
|
@@ -2,10 +2,26 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
type TWarningRenderer = (key: string, warning?: boolean) => ReactNode;
|
|
3
3
|
export type TFieldWarnings = Record<string, boolean>;
|
|
4
4
|
export type TFieldWarningsProps = {
|
|
5
|
+
/**
|
|
6
|
+
* ID of the warning field.
|
|
7
|
+
*/
|
|
5
8
|
id?: string;
|
|
9
|
+
/**
|
|
10
|
+
* List of warnings. Only entries with truthy values will count as active warnings.
|
|
11
|
+
*/
|
|
6
12
|
warnings?: TFieldWarnings;
|
|
13
|
+
/**
|
|
14
|
+
* `true` when the warning messages should be rendered. Usually you'd pass in a `touched` state of fields.
|
|
15
|
+
*/
|
|
7
16
|
isVisible?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Function which gets called with each warning key (from the `warnings` prop) and may render a warning message or return `null` to hand the warning handling off to `renderDefaultWarning`.
|
|
19
|
+
*/
|
|
8
20
|
renderWarning?: TWarningRenderer;
|
|
21
|
+
/**
|
|
22
|
+
* Function which gets called with each warning key (from the `warnings` prop) for which `renderWarning` returned `null`.
|
|
23
|
+
* It may render a warning message or return `null` to hand the warning handling off to `FieldWarning`s built-in warning handling.
|
|
24
|
+
*/
|
|
9
25
|
renderDefaultWarning?: TWarningRenderer;
|
|
10
26
|
};
|
|
11
27
|
declare const FieldWarnings: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/field-warnings",
|
|
3
3
|
"description": "Renders warnings based on configuration.",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.10.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/messages": "19.
|
|
24
|
+
"@commercetools-uikit/messages": "19.10.0",
|
|
25
25
|
"@emotion/react": "^11.10.5",
|
|
26
26
|
"@emotion/styled": "^11.10.5",
|
|
27
27
|
"prop-types": "15.8.1"
|