@bsol-oss/react-datatable5 12.0.0-beta.28 → 12.0.0-beta.29
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/index.js +1 -2
- package/dist/index.mjs +1 -2
- package/dist/types/components/Form/components/fields/DatePicker.d.ts +2 -7
- package/dist/types/components/Form/components/fields/FilePicker.d.ts +2 -5
- package/dist/types/components/Form/components/fields/StringInputField.d.ts +2 -5
- package/dist/types/components/Form/components/fields/types.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3795,7 +3795,7 @@ dayjs.extend(utc);
|
|
|
3795
3795
|
const DatePicker = ({ column, schema, prefix }) => {
|
|
3796
3796
|
const { watch, formState: { errors }, setValue, } = reactHookForm.useFormContext();
|
|
3797
3797
|
const { translate } = useSchemaContext();
|
|
3798
|
-
const { required, gridColumn, gridRow, displayDateFormat = "YYYY-MM-DD", dateFormat = "YYYY-MM-DD[T]HH:mm:ss[Z]", } = schema;
|
|
3798
|
+
const { required, gridColumn = "span 4", gridRow = "span 1", displayDateFormat = "YYYY-MM-DD", dateFormat = "YYYY-MM-DD[T]HH:mm:ss[Z]", } = schema;
|
|
3799
3799
|
const isRequired = required?.some((columnId) => columnId === column);
|
|
3800
3800
|
const colLabel = `${prefix}${column}`;
|
|
3801
3801
|
const [open, setOpen] = React.useState(false);
|
|
@@ -3811,7 +3811,6 @@ const DatePicker = ({ column, schema, prefix }) => {
|
|
|
3811
3811
|
// const parsedDate = dayjs.tz(selectedDate, dayjs.tz.guess());
|
|
3812
3812
|
if (!parsedDate.isValid())
|
|
3813
3813
|
return;
|
|
3814
|
-
console.log(selectedDate, parsedDate, parsedDate.format(dateFormat), "dkosfp");
|
|
3815
3814
|
// Format according to dateFormat from schema
|
|
3816
3815
|
const formatted = parsedDate.format(dateFormat);
|
|
3817
3816
|
// Update the form value only if different to avoid loops
|
package/dist/index.mjs
CHANGED
|
@@ -3775,7 +3775,7 @@ dayjs.extend(utc);
|
|
|
3775
3775
|
const DatePicker = ({ column, schema, prefix }) => {
|
|
3776
3776
|
const { watch, formState: { errors }, setValue, } = useFormContext();
|
|
3777
3777
|
const { translate } = useSchemaContext();
|
|
3778
|
-
const { required, gridColumn, gridRow, displayDateFormat = "YYYY-MM-DD", dateFormat = "YYYY-MM-DD[T]HH:mm:ss[Z]", } = schema;
|
|
3778
|
+
const { required, gridColumn = "span 4", gridRow = "span 1", displayDateFormat = "YYYY-MM-DD", dateFormat = "YYYY-MM-DD[T]HH:mm:ss[Z]", } = schema;
|
|
3779
3779
|
const isRequired = required?.some((columnId) => columnId === column);
|
|
3780
3780
|
const colLabel = `${prefix}${column}`;
|
|
3781
3781
|
const [open, setOpen] = useState(false);
|
|
@@ -3791,7 +3791,6 @@ const DatePicker = ({ column, schema, prefix }) => {
|
|
|
3791
3791
|
// const parsedDate = dayjs.tz(selectedDate, dayjs.tz.guess());
|
|
3792
3792
|
if (!parsedDate.isValid())
|
|
3793
3793
|
return;
|
|
3794
|
-
console.log(selectedDate, parsedDate, parsedDate.format(dateFormat), "dkosfp");
|
|
3795
3794
|
// Format according to dateFormat from schema
|
|
3796
3795
|
const formatted = parsedDate.format(dateFormat);
|
|
3797
3796
|
// Update the form value only if different to avoid loops
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
column: string;
|
|
4
|
-
schema: CustomJSONSchema7;
|
|
5
|
-
prefix: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const DatePicker: ({ column, schema, prefix }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { InputDefaultProps } from "./types";
|
|
2
|
+
export declare const DatePicker: ({ column, schema, prefix }: InputDefaultProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
schema: any;
|
|
4
|
-
prefix: any;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { InputDefaultProps } from "./types";
|
|
2
|
+
export declare const FilePicker: ({ column, schema, prefix }: InputDefaultProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface StringInputFieldProps {
|
|
3
|
-
column: string;
|
|
4
|
-
schema: CustomJSONSchema7;
|
|
5
|
-
prefix: string;
|
|
1
|
+
import { InputDefaultProps } from "./types";
|
|
2
|
+
export interface StringInputFieldProps extends InputDefaultProps {
|
|
6
3
|
}
|
|
7
4
|
export interface ForeignKeyProps {
|
|
8
5
|
column: string;
|