@acvl/frontend-components 0.0.28 → 0.0.30
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/dist/cjs/index.js +8 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/v1/forms/utils.d.ts +2 -2
- package/dist/esm/index.js +8 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/v1/forms/utils.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -13,6 +13,6 @@ export interface JSONFormProps {
|
|
|
13
13
|
useLabel?: boolean;
|
|
14
14
|
props?: JSONParserProps;
|
|
15
15
|
}
|
|
16
|
-
export declare const jsonForm: ({ submitData, data, useLabel, props
|
|
17
|
-
export declare const formDataForm: ({ submitData, data, useLabel, props
|
|
16
|
+
export declare const jsonForm: ({ submitData, data, useLabel, props }: JSONFormProps) => any;
|
|
17
|
+
export declare const formDataForm: ({ submitData, data, useLabel, props }: JSONFormProps) => FormData;
|
|
18
18
|
export declare const setErrors: (form: any, error: any) => void;
|
package/dist/esm/index.js
CHANGED
|
@@ -25686,7 +25686,7 @@ const typeSwitch = ({ base_object, base_key, response, submitData, useLabel, dat
|
|
|
25686
25686
|
else if (object instanceof File) {
|
|
25687
25687
|
setValue(response, key, object);
|
|
25688
25688
|
}
|
|
25689
|
-
else if (object
|
|
25689
|
+
else if (dayjs.isDayjs(object)) {
|
|
25690
25690
|
setValue(response, key, object.format(get$1(props, `${key}.format`, "YYYY-MM-DD")));
|
|
25691
25691
|
}
|
|
25692
25692
|
else if ("label" in object && "value" in object) {
|
|
@@ -25762,7 +25762,7 @@ const typeSwitch = ({ base_object, base_key, response, submitData, useLabel, dat
|
|
|
25762
25762
|
break;
|
|
25763
25763
|
}
|
|
25764
25764
|
};
|
|
25765
|
-
const jsonForm = ({ submitData, data, useLabel, props
|
|
25765
|
+
const jsonForm = ({ submitData, data, useLabel, props }) => {
|
|
25766
25766
|
const response = {};
|
|
25767
25767
|
forEach(submitData, function (value, key) {
|
|
25768
25768
|
if (key != "id" && isEqual(get$1(data, key), value))
|
|
@@ -25780,7 +25780,7 @@ const jsonForm = ({ submitData, data, useLabel, props, }) => {
|
|
|
25780
25780
|
});
|
|
25781
25781
|
return response;
|
|
25782
25782
|
};
|
|
25783
|
-
const formDataForm = ({ submitData, data, useLabel, props
|
|
25783
|
+
const formDataForm = ({ submitData, data, useLabel, props }) => {
|
|
25784
25784
|
const formData = new FormData();
|
|
25785
25785
|
forEach(submitData, function (value, key) {
|
|
25786
25786
|
if (key != "id" && isEqual(get$1(data, key), value))
|
|
@@ -28158,6 +28158,11 @@ const FieldArrayField = (props) => {
|
|
|
28158
28158
|
if (reason === GridRowEditStartReasons.cellDoubleClick && detail)
|
|
28159
28159
|
event.defaultMuiPrevented = true;
|
|
28160
28160
|
},
|
|
28161
|
+
onRowEditStop: (params, event) => {
|
|
28162
|
+
if (params.reason === GridRowEditStopReasons.rowFocusOut) {
|
|
28163
|
+
event.defaultMuiPrevented = true;
|
|
28164
|
+
}
|
|
28165
|
+
},
|
|
28161
28166
|
}, props.dataGridProps);
|
|
28162
28167
|
return (jsx(Fragment, { children: jsxs(Grid, { rowSpacing: 1, container: true, size: "grow", direction: "column", ...props.gridProps, children: [jsx(Grid, { size: 12, children: jsx(Typography$1, { variant: "body1", fontWeight: "bold", children: props.label }) }), jsx(Grid, { size: 12, children: jsx(DataGrid, { ...dataGridProps }) })] }) }));
|
|
28163
28168
|
};
|