@itcase/forms-web 1.1.121 → 1.1.122
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import r,{useCallback as t}from"react";import i from"clsx";import{Field as o}from"react-final-form";import{useFieldValidationState as a,useValidationAppearanceInputProps as s}from"@itcase/forms-core";import{Repeater as m}from"@itcase/ui-web/components/Repeater";import"../../FieldWrapper/appearance/default.js";import{FieldWrapper as n}from"../../FieldWrapper/FieldWrapper.js";import"@itcase/ui-core/hooks";import"@itcase/ui-web/components/Divider";import"@itcase/ui-web/components/Text";import"../Before/FormFieldBefore.js";import"@itcase/ui-web/components/Group";import"@itcase/ui-web/components/Title";import"../Before/FormFieldBefore.constants.js";const p=r.memo(function(r){const{dataTestId:p,name:c,classNameGroupItem:l,fieldProps:d={},fieldsList:f
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import r,{useCallback as t}from"react";import i from"clsx";import{Field as o}from"react-final-form";import{useFieldValidationState as a,useValidationAppearanceInputProps as s}from"@itcase/forms-core";import{Repeater as m}from"@itcase/ui-web/components/Repeater";import"../../FieldWrapper/appearance/default.js";import{FieldWrapper as n}from"../../FieldWrapper/FieldWrapper.js";import"@itcase/ui-core/hooks";import"@itcase/ui-web/components/Divider";import"@itcase/ui-web/components/Text";import"../Before/FormFieldBefore.js";import"@itcase/ui-web/components/Group";import"@itcase/ui-web/components/Title";import"../Before/FormFieldBefore.constants.js";const p=r.memo(function(r){const{dataTestId:p,name:c,classNameGroupItem:l,fieldProps:d={},fieldsList:f,inputProps:u={},showMessage:h,isDisabled:b,isRequired:g,onChange:w}=r;return e(o,{name:c,initialValue:f,children:function({input:r,meta:o}){const{errorKey:c,errorMessage:f,successKey:F,isErrorState:j,isValidState:v}=a({fieldProps:d,input:r,meta:o}),C=s({inputProps:u,validationStateKey:j?c:v?F:null}),S=t(e=>{r.onChange(e),w&&w(e)},[w,r.onChange]);return e(n,{className:i("form-field_repeater","form__item_repeater",l),dataTestId:p,errorKey:c,errorMessage:f,fieldClassName:"form-repeater",inputName:r.name,metaActive:o.active,metaError:o.error,showMessage:h,isDisabled:b,isErrorState:j,isRequired:g,isValidState:v,...d,children:e(m,{dataTestId:`${p}Repeater`,fieldsList:r.value??[],isDisabled:b,onChange:S,...C})})}})});export{p as FormFieldRepeater};
|
|
@@ -1,4 +1,63 @@
|
|
|
1
1
|
import type { Messages } from './messages.interface';
|
|
2
|
-
declare const DEFAULT_MESSAGES_FIELDS:
|
|
2
|
+
declare const DEFAULT_MESSAGES_FIELDS: {
|
|
3
|
+
url: {
|
|
4
|
+
key: string;
|
|
5
|
+
message: string;
|
|
6
|
+
};
|
|
7
|
+
required: {
|
|
8
|
+
key: string;
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
phone_error: {
|
|
12
|
+
key: string;
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
15
|
+
phone_or_email_required: {
|
|
16
|
+
key: string;
|
|
17
|
+
message: string;
|
|
18
|
+
};
|
|
19
|
+
phone_required: {
|
|
20
|
+
key: string;
|
|
21
|
+
message: string;
|
|
22
|
+
};
|
|
23
|
+
password_required: {
|
|
24
|
+
key: string;
|
|
25
|
+
message: string;
|
|
26
|
+
};
|
|
27
|
+
matches: {
|
|
28
|
+
key: string;
|
|
29
|
+
message: string;
|
|
30
|
+
};
|
|
31
|
+
numeric_value: {
|
|
32
|
+
key: string;
|
|
33
|
+
message: string;
|
|
34
|
+
};
|
|
35
|
+
min: {
|
|
36
|
+
key: string;
|
|
37
|
+
message: ({ min }: {
|
|
38
|
+
max: number;
|
|
39
|
+
min: number;
|
|
40
|
+
}) => string;
|
|
41
|
+
};
|
|
42
|
+
max: {
|
|
43
|
+
key: string;
|
|
44
|
+
message: ({ max }: {
|
|
45
|
+
max: number;
|
|
46
|
+
min: number;
|
|
47
|
+
}) => string;
|
|
48
|
+
};
|
|
49
|
+
invalid_value: {
|
|
50
|
+
key: string;
|
|
51
|
+
message: string;
|
|
52
|
+
};
|
|
53
|
+
email_error: {
|
|
54
|
+
key: string;
|
|
55
|
+
message: string;
|
|
56
|
+
};
|
|
57
|
+
email_required: {
|
|
58
|
+
key: string;
|
|
59
|
+
message: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
3
62
|
export type { Messages };
|
|
4
63
|
export { DEFAULT_MESSAGES_FIELDS };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/forms-web",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.122",
|
|
4
4
|
"description": "Forms fields, inputs, etc.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@itcase/types-core": "^1.1.106",
|
|
58
58
|
"@itcase/types-ui": "^1.1.106",
|
|
59
59
|
"@itcase/ui-core": "^1.11.5",
|
|
60
|
-
"@itcase/ui-web": "^1.11.
|
|
60
|
+
"@itcase/ui-web": "^1.11.10",
|
|
61
61
|
"clsx": "^2.1.1",
|
|
62
62
|
"final-form": "4.20.10",
|
|
63
63
|
"lodash": "^4.18.1",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"@types/lodash": "^4.17.25",
|
|
74
74
|
"concurrently": "^10.0.6"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "d4bbc73f00a653d6b8356e1725c82a1c4b1ebc20"
|
|
77
77
|
}
|