admin_lsac 2.0.12 → 2.0.14
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/README.md
CHANGED
package/admin_lsac.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare module 'admin_lsac' {
|
|
|
7
7
|
export interface SimpleField {
|
|
8
8
|
name: string;
|
|
9
9
|
label: string;
|
|
10
|
-
type: 'string' | 'number' | 'file' | 'date';
|
|
10
|
+
type: 'string' | 'number' | 'file' | 'date' | 'datetime-local' | 'time';
|
|
11
11
|
validationSchema: any;
|
|
12
12
|
}
|
|
13
13
|
export interface Option {
|
|
@@ -7,7 +7,7 @@ declare module 'admin_lsac' {
|
|
|
7
7
|
export interface SimpleField {
|
|
8
8
|
name: string;
|
|
9
9
|
label: string;
|
|
10
|
-
type: 'string' | 'number' | 'file' | 'date';
|
|
10
|
+
type: 'string' | 'number' | 'file' | 'date' | 'datetime-local' | 'time';
|
|
11
11
|
validationSchema: any;
|
|
12
12
|
}
|
|
13
13
|
export interface Option {
|
|
@@ -34,7 +34,14 @@ function parseValidation(fields) {
|
|
|
34
34
|
function generateSingleField(formfield, fieldName, key) {
|
|
35
35
|
return (_jsx(Field, { name: fieldName, children: ({ field, form }) => (_jsxs(FormControl, { isInvalid: getIn(form.touched, fieldName) && getIn(form.errors, fieldName), children: [_jsx(FormLabel, { marginTop: 2, children: formfield.label }), formfield.type === 'string' ||
|
|
36
36
|
formfield.type === 'number' ||
|
|
37
|
-
formfield.type === 'date'
|
|
37
|
+
formfield.type === 'date' ||
|
|
38
|
+
formfield.type === 'datetime-local' ||
|
|
39
|
+
formfield.type === 'time' ? (_jsx(Input, { ...field, value: field.value ?? '', type: formfield.type === 'number' ||
|
|
40
|
+
formfield.type === 'date' ||
|
|
41
|
+
formfield.type === 'datetime-local' ||
|
|
42
|
+
formfield.type === 'time'
|
|
43
|
+
? formfield.type
|
|
44
|
+
: 'text' })) : formfield.type === 'file' ? (_jsx(Input, { type: "file", name: fieldName, onChange: (event) => {
|
|
38
45
|
if (event.currentTarget.files != null) {
|
|
39
46
|
form.setFieldValue(fieldName, event.currentTarget.files[0]);
|
|
40
47
|
}
|
package/dist/esm/src/schema.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface TableField {
|
|
|
6
6
|
export interface SimpleField {
|
|
7
7
|
name: string;
|
|
8
8
|
label: string;
|
|
9
|
-
type: 'string' | 'number' | 'file' | 'date';
|
|
9
|
+
type: 'string' | 'number' | 'file' | 'date' | 'datetime-local' | 'time';
|
|
10
10
|
validationSchema: any;
|
|
11
11
|
}
|
|
12
12
|
export interface Option {
|